summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-04-22 22:14:39 +0000
committerKarl Berry <karl@freefriends.org>2016-04-22 22:14:39 +0000
commitfc4466b32ed330a956ac603b00fd145524cff49a (patch)
tree2c50e2b8de13aa9233b2c76dffe201558f169e86 /Master/texmf-dist/tex/context/base
parent50e2368597d5f6fe2057195d0ae6a9f2044923e4 (diff)
context (22apr16)
git-svn-id: svn://tug.org/texlive/trunk@40691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base')
-rw-r--r--Master/texmf-dist/tex/context/base/char-cjk.lua365
-rw-r--r--Master/texmf-dist/tex/context/base/context-version.pdfbin4177 -> 4253 bytes
-rw-r--r--Master/texmf-dist/tex/context/base/core-env.lua261
-rw-r--r--Master/texmf-dist/tex/context/base/font-map.lua535
-rw-r--r--Master/texmf-dist/tex/context/base/font-mis.lua117
-rw-r--r--Master/texmf-dist/tex/context/base/font-otc.lua349
-rw-r--r--Master/texmf-dist/tex/context/base/font-oth.lua51
-rw-r--r--Master/texmf-dist/tex/context/base/font-oti.lua91
-rw-r--r--Master/texmf-dist/tex/context/base/font-ott.lua1119
-rw-r--r--Master/texmf-dist/tex/context/base/lang-all.xml376
-rw-r--r--Master/texmf-dist/tex/context/base/lang-frq-de.lua12
-rw-r--r--Master/texmf-dist/tex/context/base/lang-frq-en.lua26
-rw-r--r--Master/texmf-dist/tex/context/base/lang-frq-nl.lua12
-rw-r--r--Master/texmf-dist/tex/context/base/lang-url.lua186
-rw-r--r--Master/texmf-dist/tex/context/base/lxml-ini.lua142
-rw-r--r--Master/texmf-dist/tex/context/base/m-arabtex.mkii450
-rw-r--r--Master/texmf-dist/tex/context/base/m-barcodes.mkiv122
-rw-r--r--Master/texmf-dist/tex/context/base/m-chart.lua945
-rw-r--r--Master/texmf-dist/tex/context/base/m-chart.mkii1315
-rw-r--r--Master/texmf-dist/tex/context/base/m-chart.mkvi540
-rw-r--r--Master/texmf-dist/tex/context/base/m-chemic.mkii21
-rw-r--r--Master/texmf-dist/tex/context/base/m-chemic.mkiv20
-rw-r--r--Master/texmf-dist/tex/context/base/m-cweb.tex1371
-rw-r--r--Master/texmf-dist/tex/context/base/m-database.lua132
-rw-r--r--Master/texmf-dist/tex/context/base/m-database.mkii420
-rw-r--r--Master/texmf-dist/tex/context/base/m-database.mkiv211
-rw-r--r--Master/texmf-dist/tex/context/base/m-datastrc.tex228
-rw-r--r--Master/texmf-dist/tex/context/base/m-directives.mkiv3
-rw-r--r--Master/texmf-dist/tex/context/base/m-dratex.mkii21
-rw-r--r--Master/texmf-dist/tex/context/base/m-edtsnc.mkii207
-rw-r--r--Master/texmf-dist/tex/context/base/m-educat.tex217
-rw-r--r--Master/texmf-dist/tex/context/base/m-fields.mkiv70
-rw-r--r--Master/texmf-dist/tex/context/base/m-format.tex409
-rw-r--r--Master/texmf-dist/tex/context/base/m-graph.mkii231
-rw-r--r--Master/texmf-dist/tex/context/base/m-graph.mkiv133
-rw-r--r--Master/texmf-dist/tex/context/base/m-hemistich.mkiv120
-rw-r--r--Master/texmf-dist/tex/context/base/m-ipsum.mkiv198
-rw-r--r--Master/texmf-dist/tex/context/base/m-json.mkiv30
-rw-r--r--Master/texmf-dist/tex/context/base/m-layout.tex102
-rw-r--r--Master/texmf-dist/tex/context/base/m-level.mkii94
-rw-r--r--Master/texmf-dist/tex/context/base/m-logcategories.mkiv3
-rw-r--r--Master/texmf-dist/tex/context/base/m-markdown.lua824
-rw-r--r--Master/texmf-dist/tex/context/base/m-markdown.mkiv88
-rw-r--r--Master/texmf-dist/tex/context/base/m-mathcrap.mkiv76
-rw-r--r--Master/texmf-dist/tex/context/base/m-matrix.mkiv495
-rw-r--r--Master/texmf-dist/tex/context/base/m-mkii.mkiv21
-rw-r--r--Master/texmf-dist/tex/context/base/m-mkivhacks.mkiv50
-rw-r--r--Master/texmf-dist/tex/context/base/m-narrowtt.tex39
-rw-r--r--Master/texmf-dist/tex/context/base/m-newmat.tex80
-rw-r--r--Master/texmf-dist/tex/context/base/m-nodechart.lua175
-rw-r--r--Master/texmf-dist/tex/context/base/m-nodechart.mkvi125
-rw-r--r--Master/texmf-dist/tex/context/base/m-ntb-to-xtb.mkiv5
-rw-r--r--Master/texmf-dist/tex/context/base/m-obsolete.mkii5
-rw-r--r--Master/texmf-dist/tex/context/base/m-obsolete.mkiv5
-rw-r--r--Master/texmf-dist/tex/context/base/m-oldfun.mkiv714
-rw-r--r--Master/texmf-dist/tex/context/base/m-oldnum.mkiv416
-rw-r--r--Master/texmf-dist/tex/context/base/m-pdfsnc.mkii200
-rw-r--r--Master/texmf-dist/tex/context/base/m-pictex.tex255
-rw-r--r--Master/texmf-dist/tex/context/base/m-pipemode.mkiv7
-rw-r--r--Master/texmf-dist/tex/context/base/m-pstricks.lua74
-rw-r--r--Master/texmf-dist/tex/context/base/m-pstricks.mkii127
-rw-r--r--Master/texmf-dist/tex/context/base/m-pstricks.mkiv65
-rw-r--r--Master/texmf-dist/tex/context/base/m-punk.mkiv258
-rw-r--r--Master/texmf-dist/tex/context/base/m-r.mkii174
-rw-r--r--Master/texmf-dist/tex/context/base/m-scite.mkiv275
-rw-r--r--Master/texmf-dist/tex/context/base/m-spreadsheet.lua332
-rw-r--r--Master/texmf-dist/tex/context/base/m-spreadsheet.mkiv221
-rw-r--r--Master/texmf-dist/tex/context/base/m-sql.mkiv17
-rw-r--r--Master/texmf-dist/tex/context/base/m-steps.lua226
-rw-r--r--Master/texmf-dist/tex/context/base/m-steps.mkii837
-rw-r--r--Master/texmf-dist/tex/context/base/m-steps.mkvi382
-rw-r--r--Master/texmf-dist/tex/context/base/m-streams.tex446
-rw-r--r--Master/texmf-dist/tex/context/base/m-subsub.tex76
-rw-r--r--Master/texmf-dist/tex/context/base/m-tex4ht.mkii9
-rw-r--r--Master/texmf-dist/tex/context/base/m-timing.mkiv102
-rw-r--r--Master/texmf-dist/tex/context/base/m-trackers.mkiv3
-rw-r--r--Master/texmf-dist/tex/context/base/m-translate.mkiv127
-rw-r--r--Master/texmf-dist/tex/context/base/m-units.mkii904
-rw-r--r--Master/texmf-dist/tex/context/base/m-units.mkiv912
-rw-r--r--Master/texmf-dist/tex/context/base/m-visual.mkii315
-rw-r--r--Master/texmf-dist/tex/context/base/m-visual.mkiv809
-rw-r--r--Master/texmf-dist/tex/context/base/m-zint.mkiv112
-rw-r--r--Master/texmf-dist/tex/context/base/math-noa.lua1304
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/anch-bar.mkii (renamed from Master/texmf-dist/tex/context/base/anch-bar.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/anch-pgr.mkii (renamed from Master/texmf-dist/tex/context/base/anch-pgr.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/anch-pos.mkii (renamed from Master/texmf-dist/tex/context/base/anch-pos.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/anch-snc.mkii (renamed from Master/texmf-dist/tex/context/base/anch-snc.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/bibl-tra.mkii (renamed from Master/texmf-dist/tex/context/base/bibl-tra.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/buff-ini.mkii (renamed from Master/texmf-dist/tex/context/base/buff-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/buff-ver.mkii (renamed from Master/texmf-dist/tex/context/base/buff-ver.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/catc-act.mkii (renamed from Master/texmf-dist/tex/context/base/catc-act.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/catc-ctx.mkii (renamed from Master/texmf-dist/tex/context/base/catc-ctx.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/catc-def.mkii (renamed from Master/texmf-dist/tex/context/base/catc-def.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/catc-ini.mkii (renamed from Master/texmf-dist/tex/context/base/catc-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/catc-sym.mkii (renamed from Master/texmf-dist/tex/context/base/catc-sym.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/catc-xml.mkii (renamed from Master/texmf-dist/tex/context/base/catc-xml.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/colo-ema.mkii (renamed from Master/texmf-dist/tex/context/base/colo-ema.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/colo-ext.mkii (renamed from Master/texmf-dist/tex/context/base/colo-ext.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/colo-hex.mkii (renamed from Master/texmf-dist/tex/context/base/colo-hex.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/colo-ini.mkii (renamed from Master/texmf-dist/tex/context/base/colo-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/colo-rgb.mkii (renamed from Master/texmf-dist/tex/context/base/colo-rgb.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/colo-run.mkii (renamed from Master/texmf-dist/tex/context/base/colo-run.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/colo-x11.mkii (renamed from Master/texmf-dist/tex/context/base/colo-x11.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/colo-xwi.mkii (renamed from Master/texmf-dist/tex/context/base/colo-xwi.mkii)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/cont-cs.mkii (renamed from Master/texmf-dist/tex/context/base/cont-cs.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/cont-de.mkii (renamed from Master/texmf-dist/tex/context/base/cont-de.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/cont-en.mkii (renamed from Master/texmf-dist/tex/context/base/cont-en.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/cont-err.mkii (renamed from Master/texmf-dist/tex/context/base/cont-err.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/cont-fil.mkii (renamed from Master/texmf-dist/tex/context/base/cont-fil.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/cont-fr.mkii (renamed from Master/texmf-dist/tex/context/base/cont-fr.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/cont-gb.mkii (renamed from Master/texmf-dist/tex/context/base/cont-gb.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/cont-it.mkii (renamed from Master/texmf-dist/tex/context/base/cont-it.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/cont-log.mkii (renamed from Master/texmf-dist/tex/context/base/cont-log.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/cont-new.mkii (renamed from Master/texmf-dist/tex/context/base/cont-new.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/cont-nl.mkii (renamed from Master/texmf-dist/tex/context/base/cont-nl.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/cont-ro.mkii (renamed from Master/texmf-dist/tex/context/base/cont-ro.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/cont-sys.ori (renamed from Master/texmf-dist/tex/context/base/cont-sys.ori)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/context.mkii (renamed from Master/texmf-dist/tex/context/base/context.mkii)1
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/core-con.mkii (renamed from Master/texmf-dist/tex/context/base/core-con.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/core-ctx.mkii (renamed from Master/texmf-dist/tex/context/base/core-ctx.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/core-def.mkii (renamed from Master/texmf-dist/tex/context/base/core-def.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/core-env.mkii (renamed from Master/texmf-dist/tex/context/base/core-env.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/core-fil.mkii (renamed from Master/texmf-dist/tex/context/base/core-fil.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/core-fnt.mkii (renamed from Master/texmf-dist/tex/context/base/core-fnt.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/core-gen.mkii (renamed from Master/texmf-dist/tex/context/base/core-gen.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/core-ini.mkii (renamed from Master/texmf-dist/tex/context/base/core-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/core-job.mkii (renamed from Master/texmf-dist/tex/context/base/core-job.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/core-mis.mkii (renamed from Master/texmf-dist/tex/context/base/core-mis.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/core-par.mkii (renamed from Master/texmf-dist/tex/context/base/core-par.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/core-stg.mkii (renamed from Master/texmf-dist/tex/context/base/core-stg.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/core-sys.mkii (renamed from Master/texmf-dist/tex/context/base/core-sys.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/core-two.mkii (renamed from Master/texmf-dist/tex/context/base/core-two.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/core-uti.mkii (renamed from Master/texmf-dist/tex/context/base/core-uti.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/core-var.mkii (renamed from Master/texmf-dist/tex/context/base/core-var.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-032.mkii (renamed from Master/texmf-dist/tex/context/base/enco-032.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-037.mkii (renamed from Master/texmf-dist/tex/context/base/enco-037.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-acc.mkii (renamed from Master/texmf-dist/tex/context/base/enco-acc.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-agr.mkii (renamed from Master/texmf-dist/tex/context/base/enco-agr.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-ans.mkii (renamed from Master/texmf-dist/tex/context/base/enco-ans.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-cas.mkii (renamed from Master/texmf-dist/tex/context/base/enco-cas.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-chi.mkii (renamed from Master/texmf-dist/tex/context/base/enco-chi.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-com.mkii (renamed from Master/texmf-dist/tex/context/base/enco-com.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-cyr.mkii (renamed from Master/texmf-dist/tex/context/base/enco-cyr.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-def.mkii (renamed from Master/texmf-dist/tex/context/base/enco-def.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-ec.mkii (renamed from Master/texmf-dist/tex/context/base/enco-ec.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-ecm.mkii (renamed from Master/texmf-dist/tex/context/base/enco-ecm.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-el.mkii (renamed from Master/texmf-dist/tex/context/base/enco-el.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-fde.mkii (renamed from Master/texmf-dist/tex/context/base/enco-fde.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-ffr.mkii (renamed from Master/texmf-dist/tex/context/base/enco-ffr.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-fpl.mkii (renamed from Master/texmf-dist/tex/context/base/enco-fpl.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-fro.mkii (renamed from Master/texmf-dist/tex/context/base/enco-fro.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-fsl.mkii (renamed from Master/texmf-dist/tex/context/base/enco-fsl.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-grk.mkii (renamed from Master/texmf-dist/tex/context/base/enco-grk.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-heb.mkii (renamed from Master/texmf-dist/tex/context/base/enco-heb.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-ibm.mkii (renamed from Master/texmf-dist/tex/context/base/enco-ibm.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-il2.mkii (renamed from Master/texmf-dist/tex/context/base/enco-il2.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-ini.mkii (renamed from Master/texmf-dist/tex/context/base/enco-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-l7x.mkii (renamed from Master/texmf-dist/tex/context/base/enco-l7x.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-lat.mkii (renamed from Master/texmf-dist/tex/context/base/enco-lat.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-mis.mkii (renamed from Master/texmf-dist/tex/context/base/enco-mis.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-pdf.mkii (renamed from Master/texmf-dist/tex/context/base/enco-pdf.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-pfr.mkii (renamed from Master/texmf-dist/tex/context/base/enco-pfr.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-pol.mkii (renamed from Master/texmf-dist/tex/context/base/enco-pol.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-qx.mkii (renamed from Master/texmf-dist/tex/context/base/enco-qx.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-raw.mkii (renamed from Master/texmf-dist/tex/context/base/enco-raw.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-run.mkii (renamed from Master/texmf-dist/tex/context/base/enco-run.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-t5.mkii (renamed from Master/texmf-dist/tex/context/base/enco-t5.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-tbo.mkii (renamed from Master/texmf-dist/tex/context/base/enco-tbo.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-uc.mkii (renamed from Master/texmf-dist/tex/context/base/enco-uc.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-vis.mkii (renamed from Master/texmf-dist/tex/context/base/enco-vis.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-vna.mkii (renamed from Master/texmf-dist/tex/context/base/enco-vna.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-win.mkii (renamed from Master/texmf-dist/tex/context/base/enco-win.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/enco-x5.mkii (renamed from Master/texmf-dist/tex/context/base/enco-x5.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/filt-bas.mkii (renamed from Master/texmf-dist/tex/context/base/filt-bas.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/filt-ini.mkii (renamed from Master/texmf-dist/tex/context/base/filt-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/font-arb.mkii (renamed from Master/texmf-dist/tex/context/base/font-arb.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/font-bfm.mkii (renamed from Master/texmf-dist/tex/context/base/font-bfm.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/font-chi.mkii (renamed from Master/texmf-dist/tex/context/base/font-chi.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/font-heb.mkii (renamed from Master/texmf-dist/tex/context/base/font-heb.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/font-ini.mkii (renamed from Master/texmf-dist/tex/context/base/font-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/font-jap.mkii (renamed from Master/texmf-dist/tex/context/base/font-jap.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/font-run.mkii (renamed from Master/texmf-dist/tex/context/base/font-run.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/font-uni.mkii (renamed from Master/texmf-dist/tex/context/base/font-uni.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/font-unk.mkii (renamed from Master/texmf-dist/tex/context/base/font-unk.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/font-xtx.mkii (renamed from Master/texmf-dist/tex/context/base/font-xtx.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/grph-fig.mkii (renamed from Master/texmf-dist/tex/context/base/grph-fig.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/grph-inc.mkii (renamed from Master/texmf-dist/tex/context/base/grph-inc.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/grph-trf.mkii (renamed from Master/texmf-dist/tex/context/base/grph-trf.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/hand-def.mkii (renamed from Master/texmf-dist/tex/context/base/hand-def.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/hand-ini.mkii (renamed from Master/texmf-dist/tex/context/base/hand-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/java-ans.mkii (renamed from Master/texmf-dist/tex/context/base/java-ans.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/java-exa.mkii (renamed from Master/texmf-dist/tex/context/base/java-exa.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/java-fil.mkii (renamed from Master/texmf-dist/tex/context/base/java-fil.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/java-fld.mkii (renamed from Master/texmf-dist/tex/context/base/java-fld.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/java-ini.mkii (renamed from Master/texmf-dist/tex/context/base/java-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/java-stp.mkii (renamed from Master/texmf-dist/tex/context/base/java-stp.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-alt.mkii (renamed from Master/texmf-dist/tex/context/base/lang-alt.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-ana.mkii (renamed from Master/texmf-dist/tex/context/base/lang-ana.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-art.mkii (renamed from Master/texmf-dist/tex/context/base/lang-art.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-bal.mkii (renamed from Master/texmf-dist/tex/context/base/lang-bal.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-cel.mkii (renamed from Master/texmf-dist/tex/context/base/lang-cel.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-chi.mkii (renamed from Master/texmf-dist/tex/context/base/lang-chi.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-ctx.mkii (renamed from Master/texmf-dist/tex/context/base/lang-ctx.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-cyr.mkii (renamed from Master/texmf-dist/tex/context/base/lang-cyr.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-dis.mkii (renamed from Master/texmf-dist/tex/context/base/lang-dis.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-frd.mkii (renamed from Master/texmf-dist/tex/context/base/lang-frd.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-frq.mkii (renamed from Master/texmf-dist/tex/context/base/lang-frq.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-ger.mkii (renamed from Master/texmf-dist/tex/context/base/lang-ger.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-grk.mkii (renamed from Master/texmf-dist/tex/context/base/lang-grk.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-ind.mkii (renamed from Master/texmf-dist/tex/context/base/lang-ind.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-ini.mkii (renamed from Master/texmf-dist/tex/context/base/lang-ini.mkii)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-ita.mkii (renamed from Master/texmf-dist/tex/context/base/lang-ita.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-jap.mkii (renamed from Master/texmf-dist/tex/context/base/lang-jap.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-lab.mkii (renamed from Master/texmf-dist/tex/context/base/lang-lab.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-mis.mkii (renamed from Master/texmf-dist/tex/context/base/lang-mis.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-run.mkii (renamed from Master/texmf-dist/tex/context/base/lang-run.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-sla.mkii (renamed from Master/texmf-dist/tex/context/base/lang-sla.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-spa.mkii (renamed from Master/texmf-dist/tex/context/base/lang-spa.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-spe.mkii (renamed from Master/texmf-dist/tex/context/base/lang-spe.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-ura.mkii (renamed from Master/texmf-dist/tex/context/base/lang-ura.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-url.mkii (renamed from Master/texmf-dist/tex/context/base/lang-url.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/lang-vn.mkii (renamed from Master/texmf-dist/tex/context/base/lang-vn.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/math-ams.mkii (renamed from Master/texmf-dist/tex/context/base/math-ams.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/math-arr.mkii (renamed from Master/texmf-dist/tex/context/base/math-arr.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/math-cow.mkii (renamed from Master/texmf-dist/tex/context/base/math-cow.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/math-eul.mkii (renamed from Master/texmf-dist/tex/context/base/math-eul.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/math-fou.mkii (renamed from Master/texmf-dist/tex/context/base/math-fou.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/math-frc.mkii (renamed from Master/texmf-dist/tex/context/base/math-frc.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/math-ini.mkii (renamed from Master/texmf-dist/tex/context/base/math-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/math-lbr.mkii (renamed from Master/texmf-dist/tex/context/base/math-lbr.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/math-pln.mkii (renamed from Master/texmf-dist/tex/context/base/math-pln.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/math-run.mkii (renamed from Master/texmf-dist/tex/context/base/math-run.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/math-tex.mkii (renamed from Master/texmf-dist/tex/context/base/math-tex.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/math-tim.mkii (renamed from Master/texmf-dist/tex/context/base/math-tim.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/math-uni.mkii (renamed from Master/texmf-dist/tex/context/base/math-uni.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/meta-clp.mkii (renamed from Master/texmf-dist/tex/context/base/meta-clp.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/meta-dum.mkii (renamed from Master/texmf-dist/tex/context/base/meta-dum.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/meta-fig.mkii (renamed from Master/texmf-dist/tex/context/base/meta-fig.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/meta-ini.mkii (renamed from Master/texmf-dist/tex/context/base/meta-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/meta-mis.mkii (renamed from Master/texmf-dist/tex/context/base/meta-mis.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/meta-nav.mkii (renamed from Master/texmf-dist/tex/context/base/meta-nav.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/meta-pag.mkii (renamed from Master/texmf-dist/tex/context/base/meta-pag.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/meta-pdf.mkii (renamed from Master/texmf-dist/tex/context/base/meta-pdf.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/meta-pre.mkii (renamed from Master/texmf-dist/tex/context/base/meta-pre.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/meta-tex.mkii (renamed from Master/texmf-dist/tex/context/base/meta-tex.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/meta-txt.mkii (renamed from Master/texmf-dist/tex/context/base/meta-txt.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/meta-xml.mkii (renamed from Master/texmf-dist/tex/context/base/meta-xml.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-aux.mkii (renamed from Master/texmf-dist/tex/context/base/mult-aux.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-chk.mkii (renamed from Master/texmf-dist/tex/context/base/mult-chk.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-com.mkii (renamed from Master/texmf-dist/tex/context/base/mult-com.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-con.mkii (renamed from Master/texmf-dist/tex/context/base/mult-con.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-de.mkii (renamed from Master/texmf-dist/tex/context/base/mult-de.mkii)134
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-def.mkii (renamed from Master/texmf-dist/tex/context/base/mult-def.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-en.mkii (renamed from Master/texmf-dist/tex/context/base/mult-en.mkii)134
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-fr.mkii (renamed from Master/texmf-dist/tex/context/base/mult-fr.mkii)134
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-fst.mkii (renamed from Master/texmf-dist/tex/context/base/mult-fst.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-ini.mkii (renamed from Master/texmf-dist/tex/context/base/mult-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-it.mkii (renamed from Master/texmf-dist/tex/context/base/mult-it.mkii)134
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-mcs.mkii (renamed from Master/texmf-dist/tex/context/base/mult-mcs.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-mde.mkii (renamed from Master/texmf-dist/tex/context/base/mult-mde.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-men.mkii (renamed from Master/texmf-dist/tex/context/base/mult-men.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-mfr.mkii (renamed from Master/texmf-dist/tex/context/base/mult-mfr.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-mit.mkii (renamed from Master/texmf-dist/tex/context/base/mult-mit.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-mnl.mkii (renamed from Master/texmf-dist/tex/context/base/mult-mnl.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-mno.mkii (renamed from Master/texmf-dist/tex/context/base/mult-mno.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-mpe.mkii (renamed from Master/texmf-dist/tex/context/base/mult-mpe.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-mro.mkii (renamed from Master/texmf-dist/tex/context/base/mult-mro.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-nl.mkii (renamed from Master/texmf-dist/tex/context/base/mult-nl.mkii)134
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-pe.mkii (renamed from Master/texmf-dist/tex/context/base/mult-pe.mkii)134
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-ro.mkii (renamed from Master/texmf-dist/tex/context/base/mult-ro.mkii)134
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-sys.mkii (renamed from Master/texmf-dist/tex/context/base/mult-sys.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/norm-alo.mkii (renamed from Master/texmf-dist/tex/context/base/norm-alo.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/norm-ctx.mkii (renamed from Master/texmf-dist/tex/context/base/norm-ctx.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/norm-etx.mkii (renamed from Master/texmf-dist/tex/context/base/norm-etx.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/norm-ltx.mkii (renamed from Master/texmf-dist/tex/context/base/norm-ltx.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/norm-ptx.mkii (renamed from Master/texmf-dist/tex/context/base/norm-ptx.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/norm-tex.mkii (renamed from Master/texmf-dist/tex/context/base/norm-tex.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/norm-xtx.mkii (renamed from Master/texmf-dist/tex/context/base/norm-xtx.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/pack-box.mkii (renamed from Master/texmf-dist/tex/context/base/pack-box.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/pack-lyr.mkii (renamed from Master/texmf-dist/tex/context/base/pack-lyr.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/pack-obj.mkii (renamed from Master/texmf-dist/tex/context/base/pack-obj.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/pack-rul.mkii (renamed from Master/texmf-dist/tex/context/base/pack-rul.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-app.mkii (renamed from Master/texmf-dist/tex/context/base/page-app.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-bck.mkii (renamed from Master/texmf-dist/tex/context/base/page-bck.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-flw.mkii (renamed from Master/texmf-dist/tex/context/base/page-flw.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-imp.mkii (renamed from Master/texmf-dist/tex/context/base/page-imp.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-ini.mkii (renamed from Master/texmf-dist/tex/context/base/page-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-ins.mkii (renamed from Master/texmf-dist/tex/context/base/page-ins.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-lay.mkii (renamed from Master/texmf-dist/tex/context/base/page-lay.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-lin.mkii (renamed from Master/texmf-dist/tex/context/base/page-lin.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-log.mkii (renamed from Master/texmf-dist/tex/context/base/page-log.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-mak.mkii (renamed from Master/texmf-dist/tex/context/base/page-mak.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-mar.mkii (renamed from Master/texmf-dist/tex/context/base/page-mar.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-mis.mkii (renamed from Master/texmf-dist/tex/context/base/page-mis.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-mul.mkii (renamed from Master/texmf-dist/tex/context/base/page-mul.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-not.mkii (renamed from Master/texmf-dist/tex/context/base/page-not.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-one.mkii (renamed from Master/texmf-dist/tex/context/base/page-one.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-par.mkii (renamed from Master/texmf-dist/tex/context/base/page-par.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-plg.mkii (renamed from Master/texmf-dist/tex/context/base/page-plg.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-run.mkii (renamed from Master/texmf-dist/tex/context/base/page-run.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-set.mkii (renamed from Master/texmf-dist/tex/context/base/page-set.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-sid.mkii (renamed from Master/texmf-dist/tex/context/base/page-sid.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-spr.mkii (renamed from Master/texmf-dist/tex/context/base/page-spr.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-str.mkii (renamed from Master/texmf-dist/tex/context/base/page-str.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/page-txt.mkii (renamed from Master/texmf-dist/tex/context/base/page-txt.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/pdfr-def.mkii (renamed from Master/texmf-dist/tex/context/base/pdfr-def.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/pdfr-ec.mkii (renamed from Master/texmf-dist/tex/context/base/pdfr-ec.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/pdfr-il2.mkii (renamed from Master/texmf-dist/tex/context/base/pdfr-il2.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/prop-ini.mkii (renamed from Master/texmf-dist/tex/context/base/prop-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/prop-lay.mkii (renamed from Master/texmf-dist/tex/context/base/prop-lay.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/prop-mis.mkii (renamed from Master/texmf-dist/tex/context/base/prop-mis.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-8859-1.mkii (renamed from Master/texmf-dist/tex/context/base/regi-8859-1.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-8859-10.mkii (renamed from Master/texmf-dist/tex/context/base/regi-8859-10.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-8859-13.mkii (renamed from Master/texmf-dist/tex/context/base/regi-8859-13.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-8859-15.mkii (renamed from Master/texmf-dist/tex/context/base/regi-8859-15.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-8859-16.mkii (renamed from Master/texmf-dist/tex/context/base/regi-8859-16.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-8859-2.mkii (renamed from Master/texmf-dist/tex/context/base/regi-8859-2.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-8859-3.mkii (renamed from Master/texmf-dist/tex/context/base/regi-8859-3.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-8859-4.mkii (renamed from Master/texmf-dist/tex/context/base/regi-8859-4.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-8859-5.mkii (renamed from Master/texmf-dist/tex/context/base/regi-8859-5.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-8859-7.mkii (renamed from Master/texmf-dist/tex/context/base/regi-8859-7.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-8859-9.mkii (renamed from Master/texmf-dist/tex/context/base/regi-8859-9.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-cp1250.mkii (renamed from Master/texmf-dist/tex/context/base/regi-cp1250.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-cp1251.mkii (renamed from Master/texmf-dist/tex/context/base/regi-cp1251.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-cp1252.mkii (renamed from Master/texmf-dist/tex/context/base/regi-cp1252.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-cp1253.mkii (renamed from Master/texmf-dist/tex/context/base/regi-cp1253.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-cp1254.mkii (renamed from Master/texmf-dist/tex/context/base/regi-cp1254.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-cp1257.mkii (renamed from Master/texmf-dist/tex/context/base/regi-cp1257.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-cyp.mkii (renamed from Master/texmf-dist/tex/context/base/regi-cyp.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-cyr.mkii (renamed from Master/texmf-dist/tex/context/base/regi-cyr.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-def.mkii (renamed from Master/texmf-dist/tex/context/base/regi-def.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-ibm.mkii (renamed from Master/texmf-dist/tex/context/base/regi-ibm.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-ini.mkii (renamed from Master/texmf-dist/tex/context/base/regi-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-mac.mkii (renamed from Master/texmf-dist/tex/context/base/regi-mac.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-syn.mkii (renamed from Master/texmf-dist/tex/context/base/regi-syn.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-uni.mkii (renamed from Master/texmf-dist/tex/context/base/regi-uni.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-utf.mkii (renamed from Master/texmf-dist/tex/context/base/regi-utf.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/regi-vis.mkii (renamed from Master/texmf-dist/tex/context/base/regi-vis.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/scrn-fld.mkii (renamed from Master/texmf-dist/tex/context/base/scrn-fld.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/scrn-hlp.mkii (renamed from Master/texmf-dist/tex/context/base/scrn-hlp.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/scrn-int.mkii (renamed from Master/texmf-dist/tex/context/base/scrn-int.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/scrn-nav.mkii (renamed from Master/texmf-dist/tex/context/base/scrn-nav.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/sort-def.mkii (renamed from Master/texmf-dist/tex/context/base/sort-def.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/sort-ini.mkii (renamed from Master/texmf-dist/tex/context/base/sort-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/sort-lan.mkii (renamed from Master/texmf-dist/tex/context/base/sort-lan.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/spac-gen.mkii (renamed from Master/texmf-dist/tex/context/base/spac-gen.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/spac-grd.mkii (renamed from Master/texmf-dist/tex/context/base/spac-grd.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/spec-def.mkii (renamed from Master/texmf-dist/tex/context/base/spec-def.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/spec-dpm.mkii (renamed from Master/texmf-dist/tex/context/base/spec-dpm.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/spec-dpx.mkii (renamed from Master/texmf-dist/tex/context/base/spec-dpx.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/spec-dvi.mkii (renamed from Master/texmf-dist/tex/context/base/spec-dvi.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/spec-fdf.mkii (renamed from Master/texmf-dist/tex/context/base/spec-fdf.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/spec-ini.mkii (renamed from Master/texmf-dist/tex/context/base/spec-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/spec-mis.mkii (renamed from Master/texmf-dist/tex/context/base/spec-mis.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/spec-pdf.mkii (renamed from Master/texmf-dist/tex/context/base/spec-pdf.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/spec-ps.mkii (renamed from Master/texmf-dist/tex/context/base/spec-ps.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/spec-tpd.mkii (renamed from Master/texmf-dist/tex/context/base/spec-tpd.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/spec-tr.mkii (renamed from Master/texmf-dist/tex/context/base/spec-tr.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/spec-tst.mkii (renamed from Master/texmf-dist/tex/context/base/spec-tst.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/spec-var.mkii (renamed from Master/texmf-dist/tex/context/base/spec-var.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/spec-win.mkii (renamed from Master/texmf-dist/tex/context/base/spec-win.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/spec-xet.mkii (renamed from Master/texmf-dist/tex/context/base/spec-xet.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/spec-xtx.mkii (renamed from Master/texmf-dist/tex/context/base/spec-xtx.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/spec-yy.mkii (renamed from Master/texmf-dist/tex/context/base/spec-yy.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/strc-blk.mkii (renamed from Master/texmf-dist/tex/context/base/strc-blk.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/strc-des.mkii (renamed from Master/texmf-dist/tex/context/base/strc-des.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/strc-flt.mkii (renamed from Master/texmf-dist/tex/context/base/strc-flt.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/strc-itm.mkii (renamed from Master/texmf-dist/tex/context/base/strc-itm.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/strc-lnt.mkii (renamed from Master/texmf-dist/tex/context/base/strc-lnt.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/strc-lst.mkii (renamed from Master/texmf-dist/tex/context/base/strc-lst.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/strc-mar.mkii (renamed from Master/texmf-dist/tex/context/base/strc-mar.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/strc-mat.mkii (renamed from Master/texmf-dist/tex/context/base/strc-mat.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/strc-not.mkii (renamed from Master/texmf-dist/tex/context/base/strc-not.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/strc-num.mkii (renamed from Master/texmf-dist/tex/context/base/strc-num.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/strc-pag.mkii (renamed from Master/texmf-dist/tex/context/base/strc-pag.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/strc-ref.mkii (renamed from Master/texmf-dist/tex/context/base/strc-ref.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/strc-reg.mkii (renamed from Master/texmf-dist/tex/context/base/strc-reg.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/strc-sec.mkii (renamed from Master/texmf-dist/tex/context/base/strc-sec.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/strc-swd.mkii (renamed from Master/texmf-dist/tex/context/base/strc-swd.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/strc-syn.mkii (renamed from Master/texmf-dist/tex/context/base/strc-syn.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-ali.mkii (renamed from Master/texmf-dist/tex/context/base/supp-ali.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-box.mkii (renamed from Master/texmf-dist/tex/context/base/supp-box.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-dir.mkii (renamed from Master/texmf-dist/tex/context/base/supp-dir.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-emp.mkii (renamed from Master/texmf-dist/tex/context/base/supp-emp.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-eps.mkii (renamed from Master/texmf-dist/tex/context/base/supp-eps.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-fil.mkii (renamed from Master/texmf-dist/tex/context/base/supp-fil.mkii)20
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-fun.mkii (renamed from Master/texmf-dist/tex/context/base/supp-fun.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-lat.mkii (renamed from Master/texmf-dist/tex/context/base/supp-lat.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-mat.mkii (renamed from Master/texmf-dist/tex/context/base/supp-mat.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-mis.mkii733
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-mis.tex (renamed from Master/texmf-dist/tex/context/base/supp-mis.tex)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-mpe.mkii1371
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-mpe.tex (renamed from Master/texmf-dist/tex/context/base/supp-mpe.tex)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-mps.mkii (renamed from Master/texmf-dist/tex/context/base/supp-mps.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-mrk.mkii (renamed from Master/texmf-dist/tex/context/base/supp-mrk.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-num.mkii (renamed from Master/texmf-dist/tex/context/base/supp-num.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-pat.mkii (renamed from Master/texmf-dist/tex/context/base/supp-pat.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-pdf.mkii2187
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-pdf.tex (renamed from Master/texmf-dist/tex/context/base/supp-pdf.tex)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-ran.mkii (renamed from Master/texmf-dist/tex/context/base/supp-ran.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-spe.mkii (renamed from Master/texmf-dist/tex/context/base/supp-spe.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-tpi.mkii (renamed from Master/texmf-dist/tex/context/base/supp-tpi.mkii)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/supp-vis.mkii (renamed from Master/texmf-dist/tex/context/base/supp-vis.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/symb-cow.mkii (renamed from Master/texmf-dist/tex/context/base/symb-cow.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/symb-eur.mkii (renamed from Master/texmf-dist/tex/context/base/symb-eur.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/symb-glm.mkii (renamed from Master/texmf-dist/tex/context/base/symb-glm.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/symb-ini.mkii (renamed from Master/texmf-dist/tex/context/base/symb-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/symb-jmn.mkii (renamed from Master/texmf-dist/tex/context/base/symb-jmn.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/symb-mis.mkii (renamed from Master/texmf-dist/tex/context/base/symb-mis.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/symb-mvs.mkii (renamed from Master/texmf-dist/tex/context/base/symb-mvs.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/symb-nav.mkii (renamed from Master/texmf-dist/tex/context/base/symb-nav.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/symb-run.mkii (renamed from Master/texmf-dist/tex/context/base/symb-run.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/symb-uni.mkii (renamed from Master/texmf-dist/tex/context/base/symb-uni.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/symb-was.mkii (renamed from Master/texmf-dist/tex/context/base/symb-was.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/syst-con.mkii (renamed from Master/texmf-dist/tex/context/base/syst-con.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/syst-ext.mkii (renamed from Master/texmf-dist/tex/context/base/syst-ext.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/syst-fnt.mkii (renamed from Master/texmf-dist/tex/context/base/syst-fnt.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/syst-gen.mkii (renamed from Master/texmf-dist/tex/context/base/syst-gen.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/syst-ini.mkii (renamed from Master/texmf-dist/tex/context/base/syst-ini.mkii)144
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/syst-new.mkii (renamed from Master/texmf-dist/tex/context/base/syst-new.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/syst-pln.mkii (renamed from Master/texmf-dist/tex/context/base/syst-pln.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/syst-rtp.mkii (renamed from Master/texmf-dist/tex/context/base/syst-rtp.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/syst-rtp.mkiv (renamed from Master/texmf-dist/tex/context/base/syst-rtp.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/syst-str.mkii (renamed from Master/texmf-dist/tex/context/base/syst-str.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/syst-tex.mkii314
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/tabl-com.mkii (renamed from Master/texmf-dist/tex/context/base/tabl-com.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/tabl-ltb.mkii (renamed from Master/texmf-dist/tex/context/base/tabl-ltb.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/tabl-ntb.mkii (renamed from Master/texmf-dist/tex/context/base/tabl-ntb.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/tabl-nte.mkii (renamed from Master/texmf-dist/tex/context/base/tabl-nte.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/tabl-pln.mkii (renamed from Master/texmf-dist/tex/context/base/tabl-pln.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/tabl-tab.mkii (renamed from Master/texmf-dist/tex/context/base/tabl-tab.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/tabl-tbl.mkii (renamed from Master/texmf-dist/tex/context/base/tabl-tbl.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/tabl-tsp.mkii (renamed from Master/texmf-dist/tex/context/base/tabl-tsp.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/thrd-pic.mkii (renamed from Master/texmf-dist/tex/context/base/thrd-pic.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/thrd-ran.mkii (renamed from Master/texmf-dist/tex/context/base/thrd-ran.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/thrd-tab.mkii (renamed from Master/texmf-dist/tex/context/base/thrd-tab.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/thrd-trg.mkii (renamed from Master/texmf-dist/tex/context/base/thrd-trg.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/trac-vis.mkii (renamed from Master/texmf-dist/tex/context/base/trac-vis.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/type-def.mkii (renamed from Master/texmf-dist/tex/context/base/type-def.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/type-ini.mkii (renamed from Master/texmf-dist/tex/context/base/type-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/type-one.mkii (renamed from Master/texmf-dist/tex/context/base/type-one.mkii)510
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/type-otf.mkii (renamed from Master/texmf-dist/tex/context/base/type-otf.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/type-run.mkii (renamed from Master/texmf-dist/tex/context/base/type-run.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/type-set.mkii (renamed from Master/texmf-dist/tex/context/base/type-set.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/type-siz.mkii (renamed from Master/texmf-dist/tex/context/base/type-siz.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/type-tmf.mkii (renamed from Master/texmf-dist/tex/context/base/type-tmf.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/typo-ini.mkii (renamed from Master/texmf-dist/tex/context/base/typo-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/unic-000.mkii (renamed from Master/texmf-dist/tex/context/base/unic-000.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/unic-001.mkii (renamed from Master/texmf-dist/tex/context/base/unic-001.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/unic-002.mkii (renamed from Master/texmf-dist/tex/context/base/unic-002.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/unic-003.mkii (renamed from Master/texmf-dist/tex/context/base/unic-003.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/unic-004.mkii (renamed from Master/texmf-dist/tex/context/base/unic-004.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/unic-005.mkii (renamed from Master/texmf-dist/tex/context/base/unic-005.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/unic-030.mkii (renamed from Master/texmf-dist/tex/context/base/unic-030.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/unic-031.mkii (renamed from Master/texmf-dist/tex/context/base/unic-031.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/unic-032.mkii (renamed from Master/texmf-dist/tex/context/base/unic-032.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/unic-033.mkii (renamed from Master/texmf-dist/tex/context/base/unic-033.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/unic-034.mkii (renamed from Master/texmf-dist/tex/context/base/unic-034.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/unic-035.mkii (renamed from Master/texmf-dist/tex/context/base/unic-035.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/unic-037.mkii (renamed from Master/texmf-dist/tex/context/base/unic-037.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/unic-039.mkii (renamed from Master/texmf-dist/tex/context/base/unic-039.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/unic-251.mkii (renamed from Master/texmf-dist/tex/context/base/unic-251.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/unic-cjk.mkii (renamed from Master/texmf-dist/tex/context/base/unic-cjk.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/unic-exp.mkii (renamed from Master/texmf-dist/tex/context/base/unic-exp.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/unic-ini.mkii (renamed from Master/texmf-dist/tex/context/base/unic-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/unic-run.mkii (renamed from Master/texmf-dist/tex/context/base/unic-run.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/verb-c.mkii (renamed from Master/texmf-dist/tex/context/base/verb-c.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/verb-eif.mkii (renamed from Master/texmf-dist/tex/context/base/verb-eif.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/verb-ini.mkii (renamed from Master/texmf-dist/tex/context/base/verb-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/verb-js.mkii (renamed from Master/texmf-dist/tex/context/base/verb-js.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/verb-jv.mkii (renamed from Master/texmf-dist/tex/context/base/verb-jv.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/verb-mp.mkii (renamed from Master/texmf-dist/tex/context/base/verb-mp.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/verb-pas.mkii (renamed from Master/texmf-dist/tex/context/base/verb-pas.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/verb-pl.mkii (renamed from Master/texmf-dist/tex/context/base/verb-pl.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/verb-raw.mkii (renamed from Master/texmf-dist/tex/context/base/verb-raw.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/verb-sql.mkii (renamed from Master/texmf-dist/tex/context/base/verb-sql.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/verb-tex.mkii (renamed from Master/texmf-dist/tex/context/base/verb-tex.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/verb-xml.mkii (renamed from Master/texmf-dist/tex/context/base/verb-xml.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xetx-chr.mkii (renamed from Master/texmf-dist/tex/context/base/xetx-chr.mkii)20
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xetx-cls.mkii (renamed from Master/texmf-dist/tex/context/base/xetx-cls.mkii)269
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xetx-ini.mkii (renamed from Master/texmf-dist/tex/context/base/xetx-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xetx-utf.mkii (renamed from Master/texmf-dist/tex/context/base/xetx-utf.mkii)432
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-cml.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-cml.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-ent.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-ent.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-exp.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-exp.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-ext.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-ext.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-hyp.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-hyp.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-ini.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-ini.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-map.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-map.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-mea.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-mea.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-meb.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-meb.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-mec.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-mec.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-meh.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-meh.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-men.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-men.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-meo.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-meo.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-mer.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-mer.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-mmc.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-mmc.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-mml.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-mml.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-mmp.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-mmp.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-mxa.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-mxa.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-mxb.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-mxb.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-mxc.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-mxc.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-mxh.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-mxh.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-mxn.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-mxn.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-mxo.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-mxo.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-mxr.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-mxr.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-pml.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-pml.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-pmu.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-pmu.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-pre.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-pre.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-prs.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-prs.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-raw.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-raw.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-rng.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-rng.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-run.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-run.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-stk.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-stk.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-utf.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-utf.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-xsd.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-xsd.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/xtag-xsl.mkii (renamed from Master/texmf-dist/tex/context/base/xtag-xsl.mkii)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/anch-bar.mkiv (renamed from Master/texmf-dist/tex/context/base/anch-bar.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/anch-bck.mkvi (renamed from Master/texmf-dist/tex/context/base/anch-bck.mkvi)1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/anch-pgr.lua (renamed from Master/texmf-dist/tex/context/base/anch-pgr.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/anch-pgr.mkiv (renamed from Master/texmf-dist/tex/context/base/anch-pgr.mkiv)15
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/anch-pos.lua (renamed from Master/texmf-dist/tex/context/base/anch-pos.lua)13
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/anch-pos.mkiv (renamed from Master/texmf-dist/tex/context/base/anch-pos.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/anch-snc.mkiv (renamed from Master/texmf-dist/tex/context/base/anch-snc.mkiv)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/anch-tab.mkiv (renamed from Master/texmf-dist/tex/context/base/anch-tab.mkiv)6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/attr-col.lua (renamed from Master/texmf-dist/tex/context/base/attr-col.lua)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/attr-col.mkiv (renamed from Master/texmf-dist/tex/context/base/attr-col.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/attr-eff.lua (renamed from Master/texmf-dist/tex/context/base/attr-eff.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/attr-eff.mkiv (renamed from Master/texmf-dist/tex/context/base/attr-eff.mkiv)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/attr-ini.lua (renamed from Master/texmf-dist/tex/context/base/attr-ini.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/attr-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/attr-ini.mkiv)40
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/attr-lay.lua (renamed from Master/texmf-dist/tex/context/base/attr-lay.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/attr-lay.mkiv (renamed from Master/texmf-dist/tex/context/base/attr-lay.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/attr-mkr.lua (renamed from Master/texmf-dist/tex/context/base/attr-mkr.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/attr-mkr.mkiv (renamed from Master/texmf-dist/tex/context/base/attr-mkr.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/attr-neg.lua (renamed from Master/texmf-dist/tex/context/base/attr-neg.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/attr-neg.mkiv (renamed from Master/texmf-dist/tex/context/base/attr-neg.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/back-exp.lua (renamed from Master/texmf-dist/tex/context/base/back-exp.lua)128
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/back-exp.mkiv (renamed from Master/texmf-dist/tex/context/base/back-exp.mkiv)32
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/back-ini.lua (renamed from Master/texmf-dist/tex/context/base/back-ini.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/back-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/back-ini.mkiv)47
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/back-pdf.lua (renamed from Master/texmf-dist/tex/context/base/back-pdf.lua)91
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/back-pdf.mkiv (renamed from Master/texmf-dist/tex/context/base/back-pdf.mkiv)318
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/back-swf.mkiv (renamed from Master/texmf-dist/tex/context/base/back-swf.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/back-u3d.mkiv (renamed from Master/texmf-dist/tex/context/base/back-u3d.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/bibl-bib.lua (renamed from Master/texmf-dist/tex/context/base/bibl-bib.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/bibl-bib.mkiv (renamed from Master/texmf-dist/tex/context/base/bibl-bib.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/bibl-tra.lua (renamed from Master/texmf-dist/tex/context/base/bibl-tra.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/bibl-tra.mkiv (renamed from Master/texmf-dist/tex/context/base/bibl-tra.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/bibl-tst.lua (renamed from Master/texmf-dist/tex/context/base/bibl-tst.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/blob-ini.lua (renamed from Master/texmf-dist/tex/context/base/blob-ini.lua)53
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/blob-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/blob-ini.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-imp-default.lua (renamed from Master/texmf-dist/tex/context/base/buff-imp-default.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-imp-default.mkiv (renamed from Master/texmf-dist/tex/context/base/buff-imp-default.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-imp-escaped.lua (renamed from Master/texmf-dist/tex/context/base/buff-imp-escaped.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-imp-escaped.mkiv (renamed from Master/texmf-dist/tex/context/base/buff-imp-escaped.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-imp-lua.lua (renamed from Master/texmf-dist/tex/context/base/buff-imp-lua.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-imp-lua.mkiv (renamed from Master/texmf-dist/tex/context/base/buff-imp-lua.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-imp-mp.lua (renamed from Master/texmf-dist/tex/context/base/buff-imp-mp.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-imp-mp.mkiv (renamed from Master/texmf-dist/tex/context/base/buff-imp-mp.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-imp-nested.lua (renamed from Master/texmf-dist/tex/context/base/buff-imp-nested.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-imp-nested.mkiv (renamed from Master/texmf-dist/tex/context/base/buff-imp-nested.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-imp-parsed-xml.lua (renamed from Master/texmf-dist/tex/context/base/buff-imp-parsed-xml.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-imp-parsed-xml.mkiv (renamed from Master/texmf-dist/tex/context/base/buff-imp-parsed-xml.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-imp-tex.lua (renamed from Master/texmf-dist/tex/context/base/buff-imp-tex.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-imp-tex.mkiv (renamed from Master/texmf-dist/tex/context/base/buff-imp-tex.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-imp-xml.lua (renamed from Master/texmf-dist/tex/context/base/buff-imp-xml.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-imp-xml.mkiv (renamed from Master/texmf-dist/tex/context/base/buff-imp-xml.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-ini.lua (renamed from Master/texmf-dist/tex/context/base/buff-ini.lua)145
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/buff-ini.mkiv)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-par.lua (renamed from Master/texmf-dist/tex/context/base/buff-par.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-par.mkvi (renamed from Master/texmf-dist/tex/context/base/buff-par.mkvi)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-ver.lua (renamed from Master/texmf-dist/tex/context/base/buff-ver.lua)49
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-ver.mkiv (renamed from Master/texmf-dist/tex/context/base/buff-ver.mkiv)78
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/bxml-apa.mkiv (renamed from Master/texmf-dist/tex/context/base/bxml-apa.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/catc-act.mkiv (renamed from Master/texmf-dist/tex/context/base/catc-act.mkiv)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/catc-ctx.mkiv (renamed from Master/texmf-dist/tex/context/base/catc-ctx.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/catc-def.mkiv (renamed from Master/texmf-dist/tex/context/base/catc-def.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/catc-ini.lua (renamed from Master/texmf-dist/tex/context/base/catc-ini.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/catc-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/catc-ini.mkiv)76
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/catc-sym.mkiv (renamed from Master/texmf-dist/tex/context/base/catc-sym.mkiv)62
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/catc-xml.mkiv (renamed from Master/texmf-dist/tex/context/base/catc-xml.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/char-act.mkiv (renamed from Master/texmf-dist/tex/context/base/char-act.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/char-cjk.lua1293
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/char-def.lua (renamed from Master/texmf-dist/tex/context/base/char-def.lua)15765
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/char-enc.lua (renamed from Master/texmf-dist/tex/context/base/char-enc.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/char-enc.mkiv (renamed from Master/texmf-dist/tex/context/base/char-enc.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/char-ent.lua (renamed from Master/texmf-dist/tex/context/base/char-ent.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/char-fio.lua (renamed from Master/texmf-dist/tex/context/base/char-fio.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/char-ini.lua (renamed from Master/texmf-dist/tex/context/base/char-ini.lua)105
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/char-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/char-ini.mkiv)16
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/char-map.lua (renamed from Master/texmf-dist/tex/context/base/char-map.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/char-tex.lua (renamed from Master/texmf-dist/tex/context/base/char-tex.lua)50
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/char-utf.lua (renamed from Master/texmf-dist/tex/context/base/char-utf.lua)39
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/char-utf.mkiv (renamed from Master/texmf-dist/tex/context/base/char-utf.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/chem-ini.lua (renamed from Master/texmf-dist/tex/context/base/chem-ini.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/chem-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/chem-ini.mkiv)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/chem-str.lua (renamed from Master/texmf-dist/tex/context/base/chem-str.lua)22
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/chem-str.mkiv (renamed from Master/texmf-dist/tex/context/base/chem-str.mkiv)52
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cldf-bas.lua (renamed from Master/texmf-dist/tex/context/base/cldf-bas.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cldf-bas.mkiv (renamed from Master/texmf-dist/tex/context/base/cldf-bas.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cldf-com.lua (renamed from Master/texmf-dist/tex/context/base/cldf-com.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cldf-com.mkiv (renamed from Master/texmf-dist/tex/context/base/cldf-com.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cldf-ini.lua (renamed from Master/texmf-dist/tex/context/base/cldf-ini.lua)837
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cldf-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/cldf-ini.mkiv)14
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cldf-int.lua (renamed from Master/texmf-dist/tex/context/base/cldf-int.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cldf-int.mkiv (renamed from Master/texmf-dist/tex/context/base/cldf-int.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cldf-prs.lua (renamed from Master/texmf-dist/tex/context/base/cldf-prs.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cldf-scn.lua (renamed from Master/texmf-dist/tex/context/base/cldf-scn.lua)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cldf-stp.lua69
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cldf-ver.lua (renamed from Master/texmf-dist/tex/context/base/cldf-ver.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cldf-ver.mkiv (renamed from Master/texmf-dist/tex/context/base/cldf-ver.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/colo-ext.mkiv (renamed from Master/texmf-dist/tex/context/base/colo-ext.mkiv)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/colo-grp.mkiv (renamed from Master/texmf-dist/tex/context/base/colo-grp.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/colo-icc.lua (renamed from Master/texmf-dist/tex/context/base/colo-icc.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/colo-imp-crayola.mkiv254
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/colo-imp-dem.mkiv (renamed from Master/texmf-dist/tex/context/base/colo-imp-dem.mkiv)19
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/colo-imp-ema.mkiv (renamed from Master/texmf-dist/tex/context/base/colo-imp-ema.mkiv)136
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/colo-imp-ral.mkiv239
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/colo-imp-rgb.mkiv (renamed from Master/texmf-dist/tex/context/base/colo-imp-rgb.mkiv)68
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/colo-imp-x11.mkiv (renamed from Master/texmf-dist/tex/context/base/colo-imp-x11.mkiv)235
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/colo-imp-xwi.mkiv (renamed from Master/texmf-dist/tex/context/base/colo-imp-xwi.mkiv)12
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/colo-ini.lua (renamed from Master/texmf-dist/tex/context/base/colo-ini.lua)11
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/colo-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/colo-ini.mkiv)240
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/colo-run.lua (renamed from Master/texmf-dist/tex/context/base/colo-run.lua)56
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/colo-run.mkiv (renamed from Master/texmf-dist/tex/context/base/colo-run.mkiv)171
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-cs.mkiv (renamed from Master/texmf-dist/tex/context/base/cont-cs.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-de.mkiv (renamed from Master/texmf-dist/tex/context/base/cont-de.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-en.mkiv (renamed from Master/texmf-dist/tex/context/base/cont-en.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-fil.mkiv (renamed from Master/texmf-dist/tex/context/base/cont-fil.mkiv)5
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-fr.mkiv (renamed from Master/texmf-dist/tex/context/base/cont-fr.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-gb.mkiv (renamed from Master/texmf-dist/tex/context/base/cont-gb.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-it.mkiv (renamed from Master/texmf-dist/tex/context/base/cont-it.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-log.mkiv (renamed from Master/texmf-dist/tex/context/base/cont-log.mkiv)37
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv (renamed from Master/texmf-dist/tex/context/base/cont-new.mkiv)5
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-nl.mkiv (renamed from Master/texmf-dist/tex/context/base/cont-nl.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-nop.mkiv (renamed from Master/texmf-dist/tex/context/base/cont-nop.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-pe.mkiv (renamed from Master/texmf-dist/tex/context/base/cont-pe.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-ro.mkiv (renamed from Master/texmf-dist/tex/context/base/cont-ro.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-run.lua (renamed from Master/texmf-dist/tex/context/base/cont-run.lua)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-run.mkiv (renamed from Master/texmf-dist/tex/context/base/cont-run.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv (renamed from Master/texmf-dist/tex/context/base/cont-yes.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/context-base.lmx (renamed from Master/texmf-dist/tex/context/base/context-base.lmx)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/context-characters.lmx (renamed from Master/texmf-dist/tex/context/base/context-characters.lmx)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/context-debug.lmx (renamed from Master/texmf-dist/tex/context/base/context-debug.lmx)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/context-error.lmx (renamed from Master/texmf-dist/tex/context/base/context-error.lmx)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/context-fonttest.lmx (renamed from Master/texmf-dist/tex/context/base/context-fonttest.lmx)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/context-help.lmx (renamed from Master/texmf-dist/tex/context/base/context-help.lmx)56
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/context-performance.tex66
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/context-timing.lmx (renamed from Master/texmf-dist/tex/context/base/context-timing.lmx)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/context-todo.tex57
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/context.css (renamed from Master/texmf-dist/tex/context/base/context.css)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/context.lus (renamed from Master/texmf-dist/tex/context/base/context.lus)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/context.mkiv (renamed from Master/texmf-dist/tex/context/base/context.mkiv)33
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-con.lua (renamed from Master/texmf-dist/tex/context/base/core-con.lua)201
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-con.mkiv (renamed from Master/texmf-dist/tex/context/base/core-con.mkiv)77
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-ctx.ctx (renamed from Master/texmf-dist/tex/context/base/core-ctx.ctx)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-ctx.lua (renamed from Master/texmf-dist/tex/context/base/core-ctx.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-ctx.mkiv (renamed from Master/texmf-dist/tex/context/base/core-ctx.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-dat.lua (renamed from Master/texmf-dist/tex/context/base/core-dat.lua)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-dat.mkiv (renamed from Master/texmf-dist/tex/context/base/core-dat.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-def.mkiv (renamed from Master/texmf-dist/tex/context/base/core-def.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-env.lua274
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-env.mkiv (renamed from Master/texmf-dist/tex/context/base/core-env.mkiv)241
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/core-ini.mkiv)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-sys.lua (renamed from Master/texmf-dist/tex/context/base/core-sys.lua)7
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-sys.mkiv (renamed from Master/texmf-dist/tex/context/base/core-sys.mkiv)3
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-two.lua (renamed from Master/texmf-dist/tex/context/base/core-two.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-two.mkiv (renamed from Master/texmf-dist/tex/context/base/core-two.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-uti.lua (renamed from Master/texmf-dist/tex/context/base/core-uti.lua)37
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-uti.mkiv (renamed from Master/texmf-dist/tex/context/base/core-uti.mkiv)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-aux.lua (renamed from Master/texmf-dist/tex/context/base/data-aux.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-bin.lua (renamed from Master/texmf-dist/tex/context/base/data-bin.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-con.lua (renamed from Master/texmf-dist/tex/context/base/data-con.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-crl.lua (renamed from Master/texmf-dist/tex/context/base/data-crl.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-ctx.lua (renamed from Master/texmf-dist/tex/context/base/data-ctx.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-env.lua (renamed from Master/texmf-dist/tex/context/base/data-env.lua)5
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-exp.lua (renamed from Master/texmf-dist/tex/context/base/data-exp.lua)36
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-fil.lua (renamed from Master/texmf-dist/tex/context/base/data-fil.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-gen.lua (renamed from Master/texmf-dist/tex/context/base/data-gen.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-ini.lua (renamed from Master/texmf-dist/tex/context/base/data-ini.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-inp.lua (renamed from Master/texmf-dist/tex/context/base/data-inp.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-lst.lua (renamed from Master/texmf-dist/tex/context/base/data-lst.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-lua.lua (renamed from Master/texmf-dist/tex/context/base/data-lua.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-met.lua (renamed from Master/texmf-dist/tex/context/base/data-met.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-out.lua (renamed from Master/texmf-dist/tex/context/base/data-out.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-pre.lua (renamed from Master/texmf-dist/tex/context/base/data-pre.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-res.lua (renamed from Master/texmf-dist/tex/context/base/data-res.lua)14
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-sch.lua (renamed from Master/texmf-dist/tex/context/base/data-sch.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-tex.lua (renamed from Master/texmf-dist/tex/context/base/data-tex.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-tmf.lua (renamed from Master/texmf-dist/tex/context/base/data-tmf.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-tmp.lua (renamed from Master/texmf-dist/tex/context/base/data-tmp.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-tre.lua (renamed from Master/texmf-dist/tex/context/base/data-tre.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-use.lua (renamed from Master/texmf-dist/tex/context/base/data-use.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-vir.lua (renamed from Master/texmf-dist/tex/context/base/data-vir.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-zip.lua (renamed from Master/texmf-dist/tex/context/base/data-zip.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/enco-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/enco-ini.mkiv)38
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/export-example.css (renamed from Master/texmf-dist/tex/context/base/export-example.css)26
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/export-example.rng (renamed from Master/texmf-dist/tex/context/base/export-example.rng)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/export-example.tex (renamed from Master/texmf-dist/tex/context/base/export-example.tex)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/file-ini.lua (renamed from Master/texmf-dist/tex/context/base/file-ini.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/file-ini.mkvi (renamed from Master/texmf-dist/tex/context/base/file-ini.mkvi)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/file-job.lua (renamed from Master/texmf-dist/tex/context/base/file-job.lua)15
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/file-job.mkvi (renamed from Master/texmf-dist/tex/context/base/file-job.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/file-lib.lua (renamed from Master/texmf-dist/tex/context/base/file-lib.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/file-lib.mkvi (renamed from Master/texmf-dist/tex/context/base/file-lib.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/file-mod.lua (renamed from Master/texmf-dist/tex/context/base/file-mod.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/file-mod.mkvi (renamed from Master/texmf-dist/tex/context/base/file-mod.mkvi)49
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/file-res.lua (renamed from Master/texmf-dist/tex/context/base/file-res.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/file-res.mkvi (renamed from Master/texmf-dist/tex/context/base/file-res.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/file-syn.lua (renamed from Master/texmf-dist/tex/context/base/file-syn.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/file-syn.mkvi (renamed from Master/texmf-dist/tex/context/base/file-syn.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-afk.lua (renamed from Master/texmf-dist/tex/context/base/font-afk.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-afm.lua (renamed from Master/texmf-dist/tex/context/base/font-afm.lua)242
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-age.lua (renamed from Master/texmf-dist/tex/context/base/font-age.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-agl.lua (renamed from Master/texmf-dist/tex/context/base/font-agl.lua)91
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-aux.lua (renamed from Master/texmf-dist/tex/context/base/font-aux.lua)76
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-aux.mkvi (renamed from Master/texmf-dist/tex/context/base/font-aux.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-cff.lua1698
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-chk.lua (renamed from Master/texmf-dist/tex/context/base/font-chk.lua)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-chk.mkiv (renamed from Master/texmf-dist/tex/context/base/font-chk.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-cid.lua (renamed from Master/texmf-dist/tex/context/base/font-cid.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-col.lua (renamed from Master/texmf-dist/tex/context/base/font-col.lua)51
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-col.mkvi (renamed from Master/texmf-dist/tex/context/base/font-col.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-con.lua (renamed from Master/texmf-dist/tex/context/base/font-con.lua)132
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua (renamed from Master/texmf-dist/tex/context/base/font-ctx.lua)151
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-def.lua (renamed from Master/texmf-dist/tex/context/base/font-def.lua)6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-dsp.lua2200
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-emp.mkvi (renamed from Master/texmf-dist/tex/context/base/font-emp.mkvi)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-enc.lua (renamed from Master/texmf-dist/tex/context/base/font-enc.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-enh.lua (renamed from Master/texmf-dist/tex/context/base/font-enh.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-ext.lua (renamed from Master/texmf-dist/tex/context/base/font-ext.lua)84
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-fbk.lua (renamed from Master/texmf-dist/tex/context/base/font-fbk.lua)27
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-fea.mkvi (renamed from Master/texmf-dist/tex/context/base/font-fea.mkvi)21
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-fil.mkvi (renamed from Master/texmf-dist/tex/context/base/font-fil.mkvi)195
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-gbn.lua255
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-gds.lua (renamed from Master/texmf-dist/tex/context/base/font-gds.lua)150
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-gds.mkvi (renamed from Master/texmf-dist/tex/context/base/font-gds.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-hsh.lua (renamed from Master/texmf-dist/tex/context/base/font-hsh.lua)41
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-ini.lua (renamed from Master/texmf-dist/tex/context/base/font-ini.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-ini.mkvi (renamed from Master/texmf-dist/tex/context/base/font-ini.mkvi)247
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-inj.lua (renamed from Master/texmf-dist/tex/context/base/font-inj.lua)435
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-ldr.lua (renamed from Master/texmf-dist/tex/context/base/font-ldr.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-lib.mkvi (renamed from Master/texmf-dist/tex/context/base/font-lib.mkvi)38
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-log.lua (renamed from Master/texmf-dist/tex/context/base/font-log.lua)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-lua.lua (renamed from Master/texmf-dist/tex/context/base/font-lua.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-map.lua517
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-mat.mkvi (renamed from Master/texmf-dist/tex/context/base/font-mat.mkvi)63
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-mis.lua51
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-mps.lua450
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-nod.lua (renamed from Master/texmf-dist/tex/context/base/font-nod.lua)52
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-odk.lua (renamed from Master/texmf-dist/tex/context/base/font-odk.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-odv.lua (renamed from Master/texmf-dist/tex/context/base/font-odv.lua)199
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-off.lua229
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-osd.lua2414
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-ota.lua (renamed from Master/texmf-dist/tex/context/base/font-ota.lua)102
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-otb.lua (renamed from Master/texmf-dist/tex/context/base/font-otb.lua)10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-otc.lua747
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-otd.lua (renamed from Master/texmf-dist/tex/context/base/font-otd.lua)75
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-otf.lua (renamed from Master/texmf-dist/tex/context/base/font-otf.lua)905
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-oth.lua9
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-oti.lua158
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-otj.lua1532
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-otl.lua839
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-otn.lua (renamed from Master/texmf-dist/tex/context/base/font-otn.lua)2170
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-oto.lua452
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-otp.lua (renamed from Master/texmf-dist/tex/context/base/font-otp.lua)5
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-otr.lua2335
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-ots.lua3765
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-ott.lua1130
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-oup.lua2157
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-pat.lua (renamed from Master/texmf-dist/tex/context/base/font-pat.lua)17
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-pre.mkiv (renamed from Master/texmf-dist/tex/context/base/font-pre.mkiv)45
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-run.mkiv (renamed from Master/texmf-dist/tex/context/base/font-run.mkiv)308
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-sel.lua (renamed from Master/texmf-dist/tex/context/base/font-sel.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-sel.mkvi (renamed from Master/texmf-dist/tex/context/base/font-sel.mkvi)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-set.mkvi (renamed from Master/texmf-dist/tex/context/base/font-set.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-sol.lua (renamed from Master/texmf-dist/tex/context/base/font-sol.lua)48
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-sol.mkvi (renamed from Master/texmf-dist/tex/context/base/font-sol.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-sty.mkvi (renamed from Master/texmf-dist/tex/context/base/font-sty.mkvi)16
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-sym.mkvi (renamed from Master/texmf-dist/tex/context/base/font-sym.mkvi)8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-syn.lua (renamed from Master/texmf-dist/tex/context/base/font-syn.lua)566
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-tfm.lua (renamed from Master/texmf-dist/tex/context/base/font-tfm.lua)49
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-tmp.lua118
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-tra.mkiv (renamed from Master/texmf-dist/tex/context/base/font-tra.mkiv)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-trt.lua (renamed from Master/texmf-dist/tex/context/base/font-trt.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-ttf.lua480
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-uni.mkiv (renamed from Master/texmf-dist/tex/context/base/font-uni.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-unk.mkiv (renamed from Master/texmf-dist/tex/context/base/font-unk.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-var.mkvi (renamed from Master/texmf-dist/tex/context/base/font-var.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-vf.lua (renamed from Master/texmf-dist/tex/context/base/font-vf.lua)53
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-xtx.lua97
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-epd.lua (renamed from Master/texmf-dist/tex/context/base/grph-epd.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-epd.mkiv (renamed from Master/texmf-dist/tex/context/base/grph-epd.mkiv)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-fig.mkiv (renamed from Master/texmf-dist/tex/context/base/grph-fig.mkiv)30
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-fil.lua (renamed from Master/texmf-dist/tex/context/base/grph-fil.lua)26
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-inc.lua (renamed from Master/texmf-dist/tex/context/base/grph-inc.lua)59
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-inc.mkiv (renamed from Master/texmf-dist/tex/context/base/grph-inc.mkiv)39
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-raw.lua (renamed from Master/texmf-dist/tex/context/base/grph-raw.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-raw.mkiv (renamed from Master/texmf-dist/tex/context/base/grph-raw.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-rul.lua185
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-rul.mkiv89
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-swf.lua (renamed from Master/texmf-dist/tex/context/base/grph-swf.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-trf.mkiv (renamed from Master/texmf-dist/tex/context/base/grph-trf.mkiv)32
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-u3d.lua (renamed from Master/texmf-dist/tex/context/base/grph-u3d.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-wnd.lua (renamed from Master/texmf-dist/tex/context/base/grph-wnd.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/hand-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/hand-ini.mkiv)21
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/java-imp-exa.mkiv (renamed from Master/texmf-dist/tex/context/base/java-imp-exa.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/java-imp-fil.mkiv (renamed from Master/texmf-dist/tex/context/base/java-imp-fil.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/java-imp-fld.mkiv (renamed from Master/texmf-dist/tex/context/base/java-imp-fld.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/java-imp-rhh.mkiv (renamed from Master/texmf-dist/tex/context/base/java-imp-rhh.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/java-imp-stp.mkiv (renamed from Master/texmf-dist/tex/context/base/java-imp-stp.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/java-ini.lua (renamed from Master/texmf-dist/tex/context/base/java-ini.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/java-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/java-ini.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-boolean.lua (renamed from Master/texmf-dist/tex/context/base/l-boolean.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-dir.lua (renamed from Master/texmf-dist/tex/context/base/l-dir.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-file.lua (renamed from Master/texmf-dist/tex/context/base/l-file.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-function.lua (renamed from Master/texmf-dist/tex/context/base/l-function.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-gzip.lua (renamed from Master/texmf-dist/tex/context/base/l-gzip.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-io.lua (renamed from Master/texmf-dist/tex/context/base/l-io.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-lpeg.lua (renamed from Master/texmf-dist/tex/context/base/l-lpeg.lua)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-lua.lua (renamed from Master/texmf-dist/tex/context/base/l-lua.lua)48
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-math.lua (renamed from Master/texmf-dist/tex/context/base/l-math.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-md5.lua (renamed from Master/texmf-dist/tex/context/base/l-md5.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-number.lua (renamed from Master/texmf-dist/tex/context/base/l-number.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-os.lua (renamed from Master/texmf-dist/tex/context/base/l-os.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-package.lua (renamed from Master/texmf-dist/tex/context/base/l-package.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-pdfview.lua (renamed from Master/texmf-dist/tex/context/base/l-pdfview.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-sandbox.lua (renamed from Master/texmf-dist/tex/context/base/l-sandbox.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-set.lua (renamed from Master/texmf-dist/tex/context/base/l-set.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-string.lua (renamed from Master/texmf-dist/tex/context/base/l-string.lua)7
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-table.lua (renamed from Master/texmf-dist/tex/context/base/l-table.lua)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-unicode.lua (renamed from Master/texmf-dist/tex/context/base/l-unicode.lua)9
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-url.lua (renamed from Master/texmf-dist/tex/context/base/l-url.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-xml.lua (renamed from Master/texmf-dist/tex/context/base/l-xml.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-def.lua (renamed from Master/texmf-dist/tex/context/base/lang-def.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-def.mkiv (renamed from Master/texmf-dist/tex/context/base/lang-def.mkiv)13
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-dis.lua (renamed from Master/texmf-dist/tex/context/base/lang-dis.lua)110
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-frd.mkiv (renamed from Master/texmf-dist/tex/context/base/lang-frd.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-frq-de.lua12
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-frq-en.lua26
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-frq-nl.lua12
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-frq.mkiv (renamed from Master/texmf-dist/tex/context/base/lang-frq.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-hyp.lua (renamed from Master/texmf-dist/tex/context/base/lang-hyp.lua)190
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-hyp.mkiv (renamed from Master/texmf-dist/tex/context/base/lang-hyp.mkiv)11
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-ini.lua (renamed from Master/texmf-dist/tex/context/base/lang-ini.lua)74
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/lang-ini.mkiv)107
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-lab.lua (renamed from Master/texmf-dist/tex/context/base/lang-lab.lua)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-lab.mkiv (renamed from Master/texmf-dist/tex/context/base/lang-lab.mkiv)83
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-mis.mkiv (renamed from Master/texmf-dist/tex/context/base/lang-mis.mkiv)381
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-rep.lua (renamed from Master/texmf-dist/tex/context/base/lang-rep.lua)109
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-rep.mkiv (renamed from Master/texmf-dist/tex/context/base/lang-rep.mkiv)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-spa.mkiv (renamed from Master/texmf-dist/tex/context/base/lang-spa.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-txt.lua (renamed from Master/texmf-dist/tex/context/base/lang-txt.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-url.lua167
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-url.mkiv (renamed from Master/texmf-dist/tex/context/base/lang-url.mkiv)3
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-wrd.lua (renamed from Master/texmf-dist/tex/context/base/lang-wrd.lua)142
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-wrd.mkiv (renamed from Master/texmf-dist/tex/context/base/lang-wrd.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/layo-ini.lua (renamed from Master/texmf-dist/tex/context/base/layo-ini.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/layo-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/layo-ini.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-ano.lua (renamed from Master/texmf-dist/tex/context/base/lpdf-ano.lua)333
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-col.lua (renamed from Master/texmf-dist/tex/context/base/lpdf-col.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-enc.lua (renamed from Master/texmf-dist/tex/context/base/lpdf-enc.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-epa.lua (renamed from Master/texmf-dist/tex/context/base/lpdf-epa.lua)15
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-epd.lua (renamed from Master/texmf-dist/tex/context/base/lpdf-epd.lua)6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-fld.lua (renamed from Master/texmf-dist/tex/context/base/lpdf-fld.lua)72
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-fmt.lua (renamed from Master/texmf-dist/tex/context/base/lpdf-fmt.lua)91
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-grp.lua (renamed from Master/texmf-dist/tex/context/base/lpdf-grp.lua)67
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-ini.lua (renamed from Master/texmf-dist/tex/context/base/lpdf-ini.lua)298
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-mis.lua (renamed from Master/texmf-dist/tex/context/base/lpdf-mis.lua)74
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-mov.lua (renamed from Master/texmf-dist/tex/context/base/lpdf-mov.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-nod.lua (renamed from Master/texmf-dist/tex/context/base/lpdf-nod.lua)112
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-pda.xml (renamed from Master/texmf-dist/tex/context/base/lpdf-pda.xml)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-pdx.xml (renamed from Master/texmf-dist/tex/context/base/lpdf-pdx.xml)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-pua.xml202
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-ren.lua (renamed from Master/texmf-dist/tex/context/base/lpdf-ren.lua)29
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-res.lua40
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-swf.lua (renamed from Master/texmf-dist/tex/context/base/lpdf-swf.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-tag.lua (renamed from Master/texmf-dist/tex/context/base/lpdf-tag.lua)60
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-u3d.lua (renamed from Master/texmf-dist/tex/context/base/lpdf-u3d.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-wid.lua (renamed from Master/texmf-dist/tex/context/base/lpdf-wid.lua)1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-xmp.lua (renamed from Master/texmf-dist/tex/context/base/lpdf-xmp.lua)143
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-bas.mkiv (renamed from Master/texmf-dist/tex/context/base/luat-bas.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-bwc.lua (renamed from Master/texmf-dist/tex/context/base/luat-bwc.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-cbk.lua (renamed from Master/texmf-dist/tex/context/base/luat-cbk.lua)148
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-cnf.lua (renamed from Master/texmf-dist/tex/context/base/luat-cnf.lua)24
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua (renamed from Master/texmf-dist/tex/context/base/luat-cod.lua)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-cod.mkiv (renamed from Master/texmf-dist/tex/context/base/luat-cod.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-env.lua (renamed from Master/texmf-dist/tex/context/base/luat-env.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-exe.lua (renamed from Master/texmf-dist/tex/context/base/luat-exe.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-fio.lua (renamed from Master/texmf-dist/tex/context/base/luat-fio.lua)71
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-fmt.lua (renamed from Master/texmf-dist/tex/context/base/luat-fmt.lua)25
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-ini.lua (renamed from Master/texmf-dist/tex/context/base/luat-ini.lua)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/luat-ini.mkiv)16
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-iop.lua (renamed from Master/texmf-dist/tex/context/base/luat-iop.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-lib.mkiv (renamed from Master/texmf-dist/tex/context/base/luat-lib.mkiv)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-lua.lua (renamed from Master/texmf-dist/tex/context/base/luat-lua.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-mac.lua (renamed from Master/texmf-dist/tex/context/base/luat-mac.lua)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-run.lua (renamed from Master/texmf-dist/tex/context/base/luat-run.lua)7
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-soc.lua (renamed from Master/texmf-dist/tex/context/base/luat-soc.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-sta.lua (renamed from Master/texmf-dist/tex/context/base/luat-sta.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-sto.lua (renamed from Master/texmf-dist/tex/context/base/luat-sto.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-usr.lua (renamed from Master/texmf-dist/tex/context/base/luat-usr.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-usr.mkiv (renamed from Master/texmf-dist/tex/context/base/luat-usr.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua (renamed from Master/texmf-dist/tex/context/base/lxml-aux.lua)103
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-css.lua (renamed from Master/texmf-dist/tex/context/base/lxml-css.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-css.mkiv (renamed from Master/texmf-dist/tex/context/base/lxml-css.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.lua (renamed from Master/texmf-dist/tex/context/base/lxml-ctx.lua)23
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.mkiv (renamed from Master/texmf-dist/tex/context/base/lxml-ctx.mkiv)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-dir.lua (renamed from Master/texmf-dist/tex/context/base/lxml-dir.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-ent.lua (renamed from Master/texmf-dist/tex/context/base/lxml-ent.lua)13
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-inf.lua (renamed from Master/texmf-dist/tex/context/base/lxml-inf.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-ini.lua143
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/lxml-ini.mkiv)318
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-lpt.lua (renamed from Master/texmf-dist/tex/context/base/lxml-lpt.lua)438
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-mis.lua (renamed from Master/texmf-dist/tex/context/base/lxml-mis.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-sor.lua (renamed from Master/texmf-dist/tex/context/base/lxml-sor.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-sor.mkiv (renamed from Master/texmf-dist/tex/context/base/lxml-sor.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-tab.lua (renamed from Master/texmf-dist/tex/context/base/lxml-tab.lua)999
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-tex.lua (renamed from Master/texmf-dist/tex/context/base/lxml-tex.lua)520
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-xml.lua (renamed from Master/texmf-dist/tex/context/base/lxml-xml.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/m-newcolumnsets.mkiv38
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/m-oldbibtex.mkiv (renamed from Master/texmf-dist/tex/context/base/m-oldbibtex.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/m-oldotf.mkiv77
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-acc.mkvi (renamed from Master/texmf-dist/tex/context/base/math-acc.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-act.lua (renamed from Master/texmf-dist/tex/context/base/math-act.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-ali.mkiv (renamed from Master/texmf-dist/tex/context/base/math-ali.mkiv)59
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-arr.mkiv (renamed from Master/texmf-dist/tex/context/base/math-arr.mkiv)76
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-def.mkiv (renamed from Master/texmf-dist/tex/context/base/math-def.mkiv)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-del.mkiv (renamed from Master/texmf-dist/tex/context/base/math-del.mkiv)53
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-dim.lua (renamed from Master/texmf-dist/tex/context/base/math-dim.lua)6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-dir.lua (renamed from Master/texmf-dist/tex/context/base/math-dir.lua)11
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-dis.mkiv (renamed from Master/texmf-dist/tex/context/base/math-dis.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-ext.lua (renamed from Master/texmf-dist/tex/context/base/math-ext.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-fbk.lua (renamed from Master/texmf-dist/tex/context/base/math-fbk.lua)50
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-fen.mkiv (renamed from Master/texmf-dist/tex/context/base/math-fen.mkiv)431
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-for.mkiv (renamed from Master/texmf-dist/tex/context/base/math-for.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-frc.lua (renamed from Master/texmf-dist/tex/context/base/math-frc.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-frc.mkiv (renamed from Master/texmf-dist/tex/context/base/math-frc.mkiv)92
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-ini.lua (renamed from Master/texmf-dist/tex/context/base/math-ini.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/math-ini.mkiv)411
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-inl.mkiv (renamed from Master/texmf-dist/tex/context/base/math-inl.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-int.mkiv (renamed from Master/texmf-dist/tex/context/base/math-int.mkiv)12
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-map.lua (renamed from Master/texmf-dist/tex/context/base/math-map.lua)28
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-mis.mkiv (renamed from Master/texmf-dist/tex/context/base/math-mis.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-noa.lua1763
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-pln.mkiv (renamed from Master/texmf-dist/tex/context/base/math-pln.mkiv)36
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-rad.mkvi (renamed from Master/texmf-dist/tex/context/base/math-rad.mkvi)8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-ren.lua (renamed from Master/texmf-dist/tex/context/base/math-ren.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-scr.mkiv (renamed from Master/texmf-dist/tex/context/base/math-scr.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-stc.mkvi (renamed from Master/texmf-dist/tex/context/base/math-stc.mkvi)27
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-tag.lua (renamed from Master/texmf-dist/tex/context/base/math-tag.lua)17
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-ttv.lua (renamed from Master/texmf-dist/tex/context/base/math-ttv.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-vfu.lua (renamed from Master/texmf-dist/tex/context/base/math-vfu.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-fig.mkiv (renamed from Master/texmf-dist/tex/context/base/meta-fig.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-fnt.lua (renamed from Master/texmf-dist/tex/context/base/meta-fnt.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-fnt.mkiv (renamed from Master/texmf-dist/tex/context/base/meta-fnt.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-fun.lua (renamed from Master/texmf-dist/tex/context/base/meta-fun.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-fun.mkiv (renamed from Master/texmf-dist/tex/context/base/meta-fun.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-grd.mkiv (renamed from Master/texmf-dist/tex/context/base/meta-grd.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-imp-clp.mkiv (renamed from Master/texmf-dist/tex/context/base/meta-imp-clp.mkiv)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-imp-dum.mkiv (renamed from Master/texmf-dist/tex/context/base/meta-imp-dum.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-imp-fen.mkiv (renamed from Master/texmf-dist/tex/context/base/meta-imp-fen.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-imp-grid.mkiv63
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-imp-mis.mkiv (renamed from Master/texmf-dist/tex/context/base/meta-imp-mis.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-imp-nav.mkiv (renamed from Master/texmf-dist/tex/context/base/meta-imp-nav.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-imp-outlines.mkiv176
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-imp-pre.mkiv (renamed from Master/texmf-dist/tex/context/base/meta-imp-pre.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-imp-tab.mkiv (renamed from Master/texmf-dist/tex/context/base/meta-imp-tab.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-imp-txt.mkiv (renamed from Master/texmf-dist/tex/context/base/meta-imp-txt.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-ini.lua (renamed from Master/texmf-dist/tex/context/base/meta-ini.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/meta-ini.mkiv)51
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-pag.mkiv (renamed from Master/texmf-dist/tex/context/base/meta-pag.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-pdf.lua (renamed from Master/texmf-dist/tex/context/base/meta-pdf.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-pdf.mkiv (renamed from Master/texmf-dist/tex/context/base/meta-pdf.mkiv)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-pdh.lua (renamed from Master/texmf-dist/tex/context/base/meta-pdh.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-pdh.mkiv (renamed from Master/texmf-dist/tex/context/base/meta-pdh.mkiv)24
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-tex.lua (renamed from Master/texmf-dist/tex/context/base/meta-tex.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-tex.mkiv (renamed from Master/texmf-dist/tex/context/base/meta-tex.mkiv)10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-xml.mkiv (renamed from Master/texmf-dist/tex/context/base/meta-xml.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/metatex.lus (renamed from Master/texmf-dist/tex/context/base/metatex.lus)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/metatex.tex (renamed from Master/texmf-dist/tex/context/base/metatex.tex)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.lua (renamed from Master/texmf-dist/tex/context/base/mlib-ctx.lua)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.mkiv (renamed from Master/texmf-dist/tex/context/base/mlib-ctx.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-int.lua (renamed from Master/texmf-dist/tex/context/base/mlib-int.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-lua.lua (renamed from Master/texmf-dist/tex/context/base/mlib-lua.lua)33
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-pdf.lua (renamed from Master/texmf-dist/tex/context/base/mlib-pdf.lua)232
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-pdf.mkiv (renamed from Master/texmf-dist/tex/context/base/mlib-pdf.mkiv)8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-pps.lua (renamed from Master/texmf-dist/tex/context/base/mlib-pps.lua)150
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-pps.mkiv (renamed from Master/texmf-dist/tex/context/base/mlib-pps.mkiv)26
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-run.lua (renamed from Master/texmf-dist/tex/context/base/mlib-run.lua)50
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mtx-context-arrange.tex (renamed from Master/texmf-dist/tex/context/base/mtx-context-arrange.tex)1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mtx-context-combine.tex (renamed from Master/texmf-dist/tex/context/base/mtx-context-combine.tex)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mtx-context-common.tex (renamed from Master/texmf-dist/tex/context/base/mtx-context-common.tex)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mtx-context-copy.tex (renamed from Master/texmf-dist/tex/context/base/mtx-context-copy.tex)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mtx-context-ideas.tex (renamed from Master/texmf-dist/tex/context/base/mtx-context-ideas.tex)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mtx-context-listing.tex (renamed from Master/texmf-dist/tex/context/base/mtx-context-listing.tex)9
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mtx-context-markdown.tex (renamed from Master/texmf-dist/tex/context/base/mtx-context-markdown.tex)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mtx-context-precache.tex (renamed from Master/texmf-dist/tex/context/base/mtx-context-precache.tex)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mtx-context-select.tex (renamed from Master/texmf-dist/tex/context/base/mtx-context-select.tex)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mtx-context-setups.tex78
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mtx-context-sql.tex (renamed from Master/texmf-dist/tex/context/base/mtx-context-sql.tex)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mtx-context-timing.tex (renamed from Master/texmf-dist/tex/context/base/mtx-context-timing.tex)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mtx-context-trim.tex72
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mtx-context-xml.tex (renamed from Master/texmf-dist/tex/context/base/mtx-context-xml.tex)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-aux.lua (renamed from Master/texmf-dist/tex/context/base/mult-aux.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-aux.mkiv (renamed from Master/texmf-dist/tex/context/base/mult-aux.mkiv)47
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-chk.lua (renamed from Master/texmf-dist/tex/context/base/mult-chk.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-chk.mkiv (renamed from Master/texmf-dist/tex/context/base/mult-chk.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-def.lua (renamed from Master/texmf-dist/tex/context/base/mult-def.lua)2433
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-def.mkiv46
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-dim.mkvi (renamed from Master/texmf-dist/tex/context/base/mult-dim.mkvi)59
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-fun.lua (renamed from Master/texmf-dist/tex/context/base/mult-fun.lua)20
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-ini.lua (renamed from Master/texmf-dist/tex/context/base/mult-ini.lua)184
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/mult-ini.mkiv)13
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-low.lua (renamed from Master/texmf-dist/tex/context/base/mult-low.lua)36
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-mes.lua (renamed from Master/texmf-dist/tex/context/base/mult-mes.lua)3
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-mps.lua (renamed from Master/texmf-dist/tex/context/base/mult-mps.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-prm.lua (renamed from Master/texmf-dist/tex/context/base/mult-prm.lua)188
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-prm.mkiv (renamed from Master/texmf-dist/tex/context/base/mult-prm.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-sys.mkiv (renamed from Master/texmf-dist/tex/context/base/mult-sys.mkiv)96
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-acc.lua (renamed from Master/texmf-dist/tex/context/base/node-acc.lua)30
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-aux.lua (renamed from Master/texmf-dist/tex/context/base/node-aux.lua)61
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-bck.lua (renamed from Master/texmf-dist/tex/context/base/node-bck.lua)26
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-bck.mkiv (renamed from Master/texmf-dist/tex/context/base/node-bck.mkiv)21
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-dir.lua (renamed from Master/texmf-dist/tex/context/base/node-dir.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-ext.lua (renamed from Master/texmf-dist/tex/context/base/node-ext.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-fin.lua (renamed from Master/texmf-dist/tex/context/base/node-fin.lua)109
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-fin.mkiv (renamed from Master/texmf-dist/tex/context/base/node-fin.mkiv)8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-fnt.lua514
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-ini.lua356
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/node-ini.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-ltp.lua (renamed from Master/texmf-dist/tex/context/base/node-ltp.lua)479
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-met.lua (renamed from Master/texmf-dist/tex/context/base/node-met.lua)313
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-mig.lua (renamed from Master/texmf-dist/tex/context/base/node-mig.lua)26
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-mig.mkiv (renamed from Master/texmf-dist/tex/context/base/node-mig.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-nut.lua (renamed from Master/texmf-dist/tex/context/base/node-nut.lua)337
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-pag.lua (renamed from Master/texmf-dist/tex/context/base/node-pag.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-pag.mkiv (renamed from Master/texmf-dist/tex/context/base/node-pag.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-ppt.lua (renamed from Master/texmf-dist/tex/context/base/node-ppt.lua)6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-pro.lua (renamed from Master/texmf-dist/tex/context/base/node-pro.lua)83
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-ref.lua (renamed from Master/texmf-dist/tex/context/base/node-ref.lua)294
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-res.lua (renamed from Master/texmf-dist/tex/context/base/node-res.lua)344
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-rul.lua (renamed from Master/texmf-dist/tex/context/base/node-rul.lua)173
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-rul.mkiv (renamed from Master/texmf-dist/tex/context/base/node-rul.mkiv)76
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-ser.lua (renamed from Master/texmf-dist/tex/context/base/node-ser.lua)3
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-shp.lua (renamed from Master/texmf-dist/tex/context/base/node-shp.lua)41
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-snp.lua (renamed from Master/texmf-dist/tex/context/base/node-snp.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-tex.lua (renamed from Master/texmf-dist/tex/context/base/node-tex.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-tra.lua (renamed from Master/texmf-dist/tex/context/base/node-tra.lua)169
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-tsk.lua (renamed from Master/texmf-dist/tex/context/base/node-tsk.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-tst.lua (renamed from Master/texmf-dist/tex/context/base/node-tst.lua)7
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-typ.lua (renamed from Master/texmf-dist/tex/context/base/node-typ.lua)61
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/norm-ctx.mkiv (renamed from Master/texmf-dist/tex/context/base/norm-ctx.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-bar.mkiv (renamed from Master/texmf-dist/tex/context/base/pack-bar.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-bck.mkvi (renamed from Master/texmf-dist/tex/context/base/pack-bck.mkvi)26
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-box.mkiv (renamed from Master/texmf-dist/tex/context/base/pack-box.mkiv)95
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-com.mkiv (renamed from Master/texmf-dist/tex/context/base/pack-com.mkiv)90
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-cut.mkiv (renamed from Master/texmf-dist/tex/context/base/pack-cut.mkiv)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-fen.mkiv (renamed from Master/texmf-dist/tex/context/base/pack-fen.mkiv)16
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-lyr.mkiv (renamed from Master/texmf-dist/tex/context/base/pack-lyr.mkiv)121
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-mis.mkvi (renamed from Master/texmf-dist/tex/context/base/pack-mis.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-mrl.mkiv (renamed from Master/texmf-dist/tex/context/base/pack-mrl.mkiv)53
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-obj.lua262
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-obj.mkiv162
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-pos.mkiv (renamed from Master/texmf-dist/tex/context/base/pack-pos.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-rul.lua (renamed from Master/texmf-dist/tex/context/base/pack-rul.lua)31
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkiv (renamed from Master/texmf-dist/tex/context/base/pack-rul.mkiv)257
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-app.mkiv (renamed from Master/texmf-dist/tex/context/base/page-app.mkiv)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-bck.mkiv (renamed from Master/texmf-dist/tex/context/base/page-bck.mkiv)30
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-box.mkvi (renamed from Master/texmf-dist/tex/context/base/page-box.mkvi)32
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-brk.mkiv (renamed from Master/texmf-dist/tex/context/base/page-brk.mkiv)53
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-col.mkiv (renamed from Master/texmf-dist/tex/context/base/page-col.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-com.mkiv (renamed from Master/texmf-dist/tex/context/base/page-com.mkiv)8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-cst.lua1454
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-cst.mkiv778
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-fac.mkiv (renamed from Master/texmf-dist/tex/context/base/page-fac.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-flt.lua (renamed from Master/texmf-dist/tex/context/base/page-flt.lua)30
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-flt.mkiv (renamed from Master/texmf-dist/tex/context/base/page-flt.mkiv)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-flw.mkiv (renamed from Master/texmf-dist/tex/context/base/page-flw.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-grd.mkiv (renamed from Master/texmf-dist/tex/context/base/page-grd.mkiv)28
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-imp.mkiv (renamed from Master/texmf-dist/tex/context/base/page-imp.mkiv)90
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-inf.mkiv (renamed from Master/texmf-dist/tex/context/base/page-inf.mkiv)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/page-ini.mkiv)5
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-inj.lua (renamed from Master/texmf-dist/tex/context/base/page-inj.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-inj.mkvi (renamed from Master/texmf-dist/tex/context/base/page-inj.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-ins.lua (renamed from Master/texmf-dist/tex/context/base/page-ins.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-ins.mkiv (renamed from Master/texmf-dist/tex/context/base/page-ins.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-lay.mkiv (renamed from Master/texmf-dist/tex/context/base/page-lay.mkiv)79
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-lin.lua (renamed from Master/texmf-dist/tex/context/base/page-lin.lua)351
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-lin.mkvi (renamed from Master/texmf-dist/tex/context/base/page-lin.mkvi)66
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-mak.mkvi (renamed from Master/texmf-dist/tex/context/base/page-mak.mkvi)5
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-mbk.mkvi (renamed from Master/texmf-dist/tex/context/base/page-mbk.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-mix.lua (renamed from Master/texmf-dist/tex/context/base/page-mix.lua)64
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-mix.mkiv (renamed from Master/texmf-dist/tex/context/base/page-mix.mkiv)77
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-mrk.mkiv (renamed from Master/texmf-dist/tex/context/base/page-mrk.mkiv)15
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-mul.mkiv (renamed from Master/texmf-dist/tex/context/base/page-mul.mkiv)8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-not.mkiv (renamed from Master/texmf-dist/tex/context/base/page-not.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-one.mkiv (renamed from Master/texmf-dist/tex/context/base/page-one.mkiv)16
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-otr.lua12
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-otr.mkvi (renamed from Master/texmf-dist/tex/context/base/page-otr.mkvi)62
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-par.mkiv (renamed from Master/texmf-dist/tex/context/base/page-par.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-plg.mkiv (renamed from Master/texmf-dist/tex/context/base/page-plg.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-pst.lua (renamed from Master/texmf-dist/tex/context/base/page-pst.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-pst.mkiv (renamed from Master/texmf-dist/tex/context/base/page-pst.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-run.mkiv (renamed from Master/texmf-dist/tex/context/base/page-run.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-sel.mkvi (renamed from Master/texmf-dist/tex/context/base/page-sel.mkvi)40
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-set.mkiv (renamed from Master/texmf-dist/tex/context/base/page-set.mkiv)156
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-sid.mkiv (renamed from Master/texmf-dist/tex/context/base/page-sid.mkiv)12
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-spr.mkiv (renamed from Master/texmf-dist/tex/context/base/page-spr.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-str.lua (renamed from Master/texmf-dist/tex/context/base/page-str.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-str.mkiv (renamed from Master/texmf-dist/tex/context/base/page-str.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-txt.mkvi (renamed from Master/texmf-dist/tex/context/base/page-txt.mkvi)292
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-var.mkiv (renamed from Master/texmf-dist/tex/context/base/page-var.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/phys-dim.lua (renamed from Master/texmf-dist/tex/context/base/phys-dim.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/phys-dim.mkiv (renamed from Master/texmf-dist/tex/context/base/phys-dim.mkiv)28
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/prop-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/prop-ini.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-aut.lua (renamed from Master/texmf-dist/tex/context/base/publ-aut.lua)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-dat.lua (renamed from Master/texmf-dist/tex/context/base/publ-dat.lua)52
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-fnd.lua (renamed from Master/texmf-dist/tex/context/base/publ-fnd.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.lua (renamed from Master/texmf-dist/tex/context/base/publ-imp-apa.lua)27
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.mkvi (renamed from Master/texmf-dist/tex/context/base/publ-imp-apa.mkvi)83
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-aps.lua (renamed from Master/texmf-dist/tex/context/base/publ-imp-aps.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-aps.mkvi (renamed from Master/texmf-dist/tex/context/base/publ-imp-aps.mkvi)26
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-author.mkvi (renamed from Master/texmf-dist/tex/context/base/publ-imp-author.mkvi)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-cite.mkvi (renamed from Master/texmf-dist/tex/context/base/publ-imp-cite.mkvi)7
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-commands.mkvi (renamed from Master/texmf-dist/tex/context/base/publ-imp-commands.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-default.lua (renamed from Master/texmf-dist/tex/context/base/publ-imp-default.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-default.mkvi (renamed from Master/texmf-dist/tex/context/base/publ-imp-default.mkvi)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-definitions.mkvi (renamed from Master/texmf-dist/tex/context/base/publ-imp-definitions.mkvi)10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-list.mkvi (renamed from Master/texmf-dist/tex/context/base/publ-imp-list.mkvi)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-page.mkvi (renamed from Master/texmf-dist/tex/context/base/publ-imp-page.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-replacements.lua (renamed from Master/texmf-dist/tex/context/base/publ-imp-replacements.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-test.bib (renamed from Master/texmf-dist/tex/context/base/publ-imp-test.bib)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua (renamed from Master/texmf-dist/tex/context/base/publ-ini.lua)229
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/publ-ini.mkiv)116
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-jrn.lua (renamed from Master/texmf-dist/tex/context/base/publ-jrn.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-old.mkiv (renamed from Master/texmf-dist/tex/context/base/publ-old.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-oth.lua (renamed from Master/texmf-dist/tex/context/base/publ-oth.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-reg.lua (renamed from Master/texmf-dist/tex/context/base/publ-reg.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-sor.lua (renamed from Master/texmf-dist/tex/context/base/publ-sor.lua)50
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-tra.lua (renamed from Master/texmf-dist/tex/context/base/publ-tra.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-tra.mkiv (renamed from Master/texmf-dist/tex/context/base/publ-tra.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-usr.lua (renamed from Master/texmf-dist/tex/context/base/publ-usr.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-usr.mkiv (renamed from Master/texmf-dist/tex/context/base/publ-usr.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-xml.mkiv (renamed from Master/texmf-dist/tex/context/base/publ-xml.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-8859-1.lua (renamed from Master/texmf-dist/tex/context/base/regi-8859-1.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-8859-10.lua (renamed from Master/texmf-dist/tex/context/base/regi-8859-10.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-8859-11.lua (renamed from Master/texmf-dist/tex/context/base/regi-8859-11.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-8859-13.lua (renamed from Master/texmf-dist/tex/context/base/regi-8859-13.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-8859-14.lua (renamed from Master/texmf-dist/tex/context/base/regi-8859-14.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-8859-15.lua (renamed from Master/texmf-dist/tex/context/base/regi-8859-15.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-8859-16.lua (renamed from Master/texmf-dist/tex/context/base/regi-8859-16.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-8859-2.lua (renamed from Master/texmf-dist/tex/context/base/regi-8859-2.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-8859-3.lua (renamed from Master/texmf-dist/tex/context/base/regi-8859-3.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-8859-4.lua (renamed from Master/texmf-dist/tex/context/base/regi-8859-4.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-8859-5.lua (renamed from Master/texmf-dist/tex/context/base/regi-8859-5.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-8859-6.lua (renamed from Master/texmf-dist/tex/context/base/regi-8859-6.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-8859-7.lua (renamed from Master/texmf-dist/tex/context/base/regi-8859-7.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-8859-8.lua (renamed from Master/texmf-dist/tex/context/base/regi-8859-8.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-8859-9.lua (renamed from Master/texmf-dist/tex/context/base/regi-8859-9.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-cp1250.lua (renamed from Master/texmf-dist/tex/context/base/regi-cp1250.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-cp1251.lua (renamed from Master/texmf-dist/tex/context/base/regi-cp1251.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-cp1252.lua (renamed from Master/texmf-dist/tex/context/base/regi-cp1252.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-cp1253.lua (renamed from Master/texmf-dist/tex/context/base/regi-cp1253.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-cp1254.lua (renamed from Master/texmf-dist/tex/context/base/regi-cp1254.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-cp1255.lua (renamed from Master/texmf-dist/tex/context/base/regi-cp1255.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-cp1256.lua (renamed from Master/texmf-dist/tex/context/base/regi-cp1256.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-cp1257.lua (renamed from Master/texmf-dist/tex/context/base/regi-cp1257.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-cp1258.lua (renamed from Master/texmf-dist/tex/context/base/regi-cp1258.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-demo.lua (renamed from Master/texmf-dist/tex/context/base/regi-demo.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-ini.lua (renamed from Master/texmf-dist/tex/context/base/regi-ini.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/regi-ini.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/regi-pdfdoc.lua (renamed from Master/texmf-dist/tex/context/base/regi-pdfdoc.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-bar.mkvi (renamed from Master/texmf-dist/tex/context/base/scrn-bar.mkvi)123
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-but.lua (renamed from Master/texmf-dist/tex/context/base/scrn-but.lua)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-but.mkvi (renamed from Master/texmf-dist/tex/context/base/scrn-but.mkvi)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-fld.lua (renamed from Master/texmf-dist/tex/context/base/scrn-fld.lua)11
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-fld.mkvi (renamed from Master/texmf-dist/tex/context/base/scrn-fld.mkvi)25
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-hlp.lua (renamed from Master/texmf-dist/tex/context/base/scrn-hlp.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-hlp.mkvi (renamed from Master/texmf-dist/tex/context/base/scrn-hlp.mkvi)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-ini.lua (renamed from Master/texmf-dist/tex/context/base/scrn-ini.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-ini.mkvi (renamed from Master/texmf-dist/tex/context/base/scrn-ini.mkvi)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-pag.lua (renamed from Master/texmf-dist/tex/context/base/scrn-pag.lua)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-pag.mkvi (renamed from Master/texmf-dist/tex/context/base/scrn-pag.mkvi)79
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-ref.lua (renamed from Master/texmf-dist/tex/context/base/scrn-ref.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-ref.mkvi (renamed from Master/texmf-dist/tex/context/base/scrn-ref.mkvi)20
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-wid.lua (renamed from Master/texmf-dist/tex/context/base/scrn-wid.lua)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-wid.mkvi (renamed from Master/texmf-dist/tex/context/base/scrn-wid.mkvi)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrp-cjk.lua (renamed from Master/texmf-dist/tex/context/base/scrp-cjk.lua)31
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrp-eth.lua (renamed from Master/texmf-dist/tex/context/base/scrp-eth.lua)1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrp-ini.lua (renamed from Master/texmf-dist/tex/context/base/scrp-ini.lua)101
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrp-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/scrp-ini.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrp-tha.lua (renamed from Master/texmf-dist/tex/context/base/scrp-tha.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/sort-ini.lua (renamed from Master/texmf-dist/tex/context/base/sort-ini.lua)57
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/sort-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/sort-ini.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/sort-lan.lua (renamed from Master/texmf-dist/tex/context/base/sort-lan.lua)6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-adj.lua (renamed from Master/texmf-dist/tex/context/base/spac-adj.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-adj.mkiv (renamed from Master/texmf-dist/tex/context/base/spac-adj.mkiv)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua (renamed from Master/texmf-dist/tex/context/base/spac-ali.lua)7
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-ali.mkiv (renamed from Master/texmf-dist/tex/context/base/spac-ali.mkiv)199
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-chr.lua (renamed from Master/texmf-dist/tex/context/base/spac-chr.lua)50
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-chr.mkiv (renamed from Master/texmf-dist/tex/context/base/spac-chr.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-def.mkiv (renamed from Master/texmf-dist/tex/context/base/spac-def.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-flr.mkiv (renamed from Master/texmf-dist/tex/context/base/spac-flr.mkiv)54
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-grd.mkiv (renamed from Master/texmf-dist/tex/context/base/spac-grd.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-hor.lua (renamed from Master/texmf-dist/tex/context/base/spac-hor.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-hor.mkiv (renamed from Master/texmf-dist/tex/context/base/spac-hor.mkiv)108
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-lin.mkiv (renamed from Master/texmf-dist/tex/context/base/spac-lin.mkiv)13
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-pag.mkiv (renamed from Master/texmf-dist/tex/context/base/spac-pag.mkiv)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-par.mkiv (renamed from Master/texmf-dist/tex/context/base/spac-par.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua943
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-prf.mkvi117
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-ver.lua (renamed from Master/texmf-dist/tex/context/base/spac-ver.lua)738
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-ver.mkiv (renamed from Master/texmf-dist/tex/context/base/spac-ver.mkiv)358
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/status-files.pdfbin0 -> 9125 bytes
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/status-lua.pdfbin0 -> 267932 bytes
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/status-mkiv.lua (renamed from Master/texmf-dist/tex/context/base/status-mkiv.lua)17
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/status-mkiv.tex (renamed from Master/texmf-dist/tex/context/base/status-mkiv.tex)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-bkm.lua (renamed from Master/texmf-dist/tex/context/base/strc-bkm.lua)1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-bkm.mkiv (renamed from Master/texmf-dist/tex/context/base/strc-bkm.mkiv)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-blk.lua (renamed from Master/texmf-dist/tex/context/base/strc-blk.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-blk.mkiv (renamed from Master/texmf-dist/tex/context/base/strc-blk.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-con.lua (renamed from Master/texmf-dist/tex/context/base/strc-con.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-con.mkvi (renamed from Master/texmf-dist/tex/context/base/strc-con.mkvi)88
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-def.mkiv (renamed from Master/texmf-dist/tex/context/base/strc-def.mkiv)10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-des.mkvi (renamed from Master/texmf-dist/tex/context/base/strc-des.mkvi)22
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-doc.lua (renamed from Master/texmf-dist/tex/context/base/strc-doc.lua)34
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-doc.mkiv (renamed from Master/texmf-dist/tex/context/base/strc-doc.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-enu.mkvi (renamed from Master/texmf-dist/tex/context/base/strc-enu.mkvi)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-flt.lua (renamed from Master/texmf-dist/tex/context/base/strc-flt.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi (renamed from Master/texmf-dist/tex/context/base/strc-flt.mkvi)326
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-ind.mkiv (renamed from Master/texmf-dist/tex/context/base/strc-ind.mkiv)6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-ini.lua (renamed from Master/texmf-dist/tex/context/base/strc-ini.lua)37
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-ini.mkvi (renamed from Master/texmf-dist/tex/context/base/strc-ini.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-itm.lua (renamed from Master/texmf-dist/tex/context/base/strc-itm.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-itm.mkvi (renamed from Master/texmf-dist/tex/context/base/strc-itm.mkvi)193
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-lab.mkiv (renamed from Master/texmf-dist/tex/context/base/strc-lab.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-lev.lua (renamed from Master/texmf-dist/tex/context/base/strc-lev.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-lev.mkvi (renamed from Master/texmf-dist/tex/context/base/strc-lev.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-lnt.mkvi (renamed from Master/texmf-dist/tex/context/base/strc-lnt.mkvi)14
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-lst.lua (renamed from Master/texmf-dist/tex/context/base/strc-lst.lua)59
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-lst.mkvi (renamed from Master/texmf-dist/tex/context/base/strc-lst.mkvi)209
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-mar.lua (renamed from Master/texmf-dist/tex/context/base/strc-mar.lua)6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-mar.mkiv (renamed from Master/texmf-dist/tex/context/base/strc-mar.mkiv)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-mat.lua (renamed from Master/texmf-dist/tex/context/base/strc-mat.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-mat.mkiv (renamed from Master/texmf-dist/tex/context/base/strc-mat.mkiv)135
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-not.lua (renamed from Master/texmf-dist/tex/context/base/strc-not.lua)105
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-not.mkvi (renamed from Master/texmf-dist/tex/context/base/strc-not.mkvi)346
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-num.lua (renamed from Master/texmf-dist/tex/context/base/strc-num.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-num.mkiv (renamed from Master/texmf-dist/tex/context/base/strc-num.mkiv)37
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-pag.lua (renamed from Master/texmf-dist/tex/context/base/strc-pag.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-pag.mkiv (renamed from Master/texmf-dist/tex/context/base/strc-pag.mkiv)15
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-ref.lua (renamed from Master/texmf-dist/tex/context/base/strc-ref.lua)77
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-ref.mkvi (renamed from Master/texmf-dist/tex/context/base/strc-ref.mkvi)158
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-reg.lua (renamed from Master/texmf-dist/tex/context/base/strc-reg.lua)23
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-reg.mkiv (renamed from Master/texmf-dist/tex/context/base/strc-reg.mkiv)75
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-ren.mkiv (renamed from Master/texmf-dist/tex/context/base/strc-ren.mkiv)20
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-rsc.lua (renamed from Master/texmf-dist/tex/context/base/strc-rsc.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-sbe.mkiv (renamed from Master/texmf-dist/tex/context/base/strc-sbe.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-sec.mkiv (renamed from Master/texmf-dist/tex/context/base/strc-sec.mkiv)89
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-syn.lua (renamed from Master/texmf-dist/tex/context/base/strc-syn.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-syn.mkiv (renamed from Master/texmf-dist/tex/context/base/strc-syn.mkiv)17
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-tag.lua (renamed from Master/texmf-dist/tex/context/base/strc-tag.lua)23
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-tag.mkiv (renamed from Master/texmf-dist/tex/context/base/strc-tag.mkiv)27
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-xml.mkiv (renamed from Master/texmf-dist/tex/context/base/strc-xml.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/supp-box.lua (renamed from Master/texmf-dist/tex/context/base/supp-box.lua)194
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/supp-box.mkiv (renamed from Master/texmf-dist/tex/context/base/supp-box.mkiv)188
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/supp-dir.mkiv (renamed from Master/texmf-dist/tex/context/base/supp-dir.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/supp-mat.mkiv (renamed from Master/texmf-dist/tex/context/base/supp-mat.mkiv)16
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/supp-ran.lua (renamed from Master/texmf-dist/tex/context/base/supp-ran.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/supp-ran.mkiv (renamed from Master/texmf-dist/tex/context/base/supp-ran.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/supp-vis.mkiv (renamed from Master/texmf-dist/tex/context/base/supp-vis.mkiv)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/symb-imp-cc.mkiv (renamed from Master/texmf-dist/tex/context/base/symb-imp-cc.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/symb-imp-cow.mkiv (renamed from Master/texmf-dist/tex/context/base/symb-imp-cow.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/symb-imp-eur.mkiv (renamed from Master/texmf-dist/tex/context/base/symb-imp-eur.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/symb-imp-jmn.mkiv (renamed from Master/texmf-dist/tex/context/base/symb-imp-jmn.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/symb-imp-mis.mkiv (renamed from Master/texmf-dist/tex/context/base/symb-imp-mis.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/symb-imp-mvs.mkiv (renamed from Master/texmf-dist/tex/context/base/symb-imp-mvs.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/symb-imp-nav.mkiv (renamed from Master/texmf-dist/tex/context/base/symb-imp-nav.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/symb-ini.lua (renamed from Master/texmf-dist/tex/context/base/symb-ini.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/symb-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/symb-ini.mkiv)11
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/symb-run.mkiv (renamed from Master/texmf-dist/tex/context/base/symb-run.mkiv)26
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-aux.lua514
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-aux.mkiv (renamed from Master/texmf-dist/tex/context/base/syst-aux.mkiv)796
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-con.lua (renamed from Master/texmf-dist/tex/context/base/syst-con.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-con.mkiv (renamed from Master/texmf-dist/tex/context/base/syst-con.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-fnt.mkiv (renamed from Master/texmf-dist/tex/context/base/syst-fnt.mkiv)6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/syst-ini.mkiv)331
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-lua.lua (renamed from Master/texmf-dist/tex/context/base/syst-lua.lua)63
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-lua.mkiv (renamed from Master/texmf-dist/tex/context/base/syst-lua.mkiv)38
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-mes.mkiv (renamed from Master/texmf-dist/tex/context/base/syst-mes.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-pln.mkiv (renamed from Master/texmf-dist/tex/context/base/syst-pln.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-com.mkiv (renamed from Master/texmf-dist/tex/context/base/tabl-com.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-ltb.mkiv780
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-mis.mkiv (renamed from Master/texmf-dist/tex/context/base/tabl-mis.mkiv)5
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-ntb.mkiv (renamed from Master/texmf-dist/tex/context/base/tabl-ntb.mkiv)117
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-nte.mkiv (renamed from Master/texmf-dist/tex/context/base/tabl-nte.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-pln.mkiv (renamed from Master/texmf-dist/tex/context/base/tabl-pln.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-tab.mkiv (renamed from Master/texmf-dist/tex/context/base/tabl-tab.mkiv)1226
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.lua (renamed from Master/texmf-dist/tex/context/base/tabl-tbl.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.mkiv (renamed from Master/texmf-dist/tex/context/base/tabl-tbl.mkiv)90
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-tsp.mkiv (renamed from Master/texmf-dist/tex/context/base/tabl-tsp.mkiv)22
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-xnt.mkvi (renamed from Master/texmf-dist/tex/context/base/tabl-xnt.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.lua (renamed from Master/texmf-dist/tex/context/base/tabl-xtb.lua)45
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.mkvi (renamed from Master/texmf-dist/tex/context/base/tabl-xtb.mkvi)24
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/task-ini.lua (renamed from Master/texmf-dist/tex/context/base/task-ini.lua)61
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/task-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/task-ini.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/toks-ini.lua281
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/toks-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/toks-ini.mkiv)1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/toks-map.lua (renamed from Master/texmf-dist/tex/context/base/toks-map.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/toks-map.mkiv (renamed from Master/texmf-dist/tex/context/base/toks-map.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/toks-scn.lua (renamed from Master/texmf-dist/tex/context/base/toks-scn.lua)10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/toks-tra.lua292
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/toks-tra.mkiv (renamed from Master/texmf-dist/tex/context/base/toks-tra.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-ctx.lua (renamed from Master/texmf-dist/tex/context/base/trac-ctx.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-ctx.mkiv (renamed from Master/texmf-dist/tex/context/base/trac-ctx.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-deb.lua (renamed from Master/texmf-dist/tex/context/base/trac-deb.lua)69
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-deb.mkiv (renamed from Master/texmf-dist/tex/context/base/trac-deb.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-exp.lua (renamed from Master/texmf-dist/tex/context/base/trac-exp.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-fil.lua (renamed from Master/texmf-dist/tex/context/base/trac-fil.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-inf.lua (renamed from Master/texmf-dist/tex/context/base/trac-inf.lua)8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-jus.lua (renamed from Master/texmf-dist/tex/context/base/trac-jus.lua)10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-jus.mkiv (renamed from Master/texmf-dist/tex/context/base/trac-jus.mkiv)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-lmx.lua (renamed from Master/texmf-dist/tex/context/base/trac-lmx.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-log.lua (renamed from Master/texmf-dist/tex/context/base/trac-log.lua)22
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-par.lua (renamed from Master/texmf-dist/tex/context/base/trac-par.lua)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-pro.lua (renamed from Master/texmf-dist/tex/context/base/trac-pro.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-set.lua (renamed from Master/texmf-dist/tex/context/base/trac-set.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-tex.lua118
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-tex.mkiv (renamed from Master/texmf-dist/tex/context/base/trac-tex.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-tim.lua (renamed from Master/texmf-dist/tex/context/base/trac-tim.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-vis.lua (renamed from Master/texmf-dist/tex/context/base/trac-vis.lua)607
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-vis.mkiv (renamed from Master/texmf-dist/tex/context/base/trac-vis.mkiv)55
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-xml.lua (renamed from Master/texmf-dist/tex/context/base/trac-xml.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/type-def.mkiv (renamed from Master/texmf-dist/tex/context/base/type-def.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/type-fbk.mkiv (renamed from Master/texmf-dist/tex/context/base/type-fbk.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/type-ini.lua (renamed from Master/texmf-dist/tex/context/base/type-ini.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/type-ini.mkvi (renamed from Master/texmf-dist/tex/context/base/type-ini.mkvi)30
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/type-lua.mkiv (renamed from Master/texmf-dist/tex/context/base/type-lua.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/type-one.mkiv (renamed from Master/texmf-dist/tex/context/base/type-one.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/type-otf.mkiv (renamed from Master/texmf-dist/tex/context/base/type-otf.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/type-set.mkiv (renamed from Master/texmf-dist/tex/context/base/type-set.mkiv)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/type-siz.mkiv (renamed from Master/texmf-dist/tex/context/base/type-siz.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/type-tmf.mkiv (renamed from Master/texmf-dist/tex/context/base/type-tmf.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-bld.lua (renamed from Master/texmf-dist/tex/context/base/typo-bld.lua)165
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-bld.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-bld.mkiv)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-brk.lua500
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-brk.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-brk.mkiv)24
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-cap.lua (renamed from Master/texmf-dist/tex/context/base/typo-cap.lua)80
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-cap.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-cap.mkiv)10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua (renamed from Master/texmf-dist/tex/context/base/typo-chr.lua)6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-chr.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-chr.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-cln.lua (renamed from Master/texmf-dist/tex/context/base/typo-cln.lua)8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-cln.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-cln.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-del.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-del.mkiv)143
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-dha.lua458
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-dig.lua (renamed from Master/texmf-dist/tex/context/base/typo-dig.lua)15
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-dig.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-dig.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-dir.lua (renamed from Master/texmf-dist/tex/context/base/typo-dir.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-dir.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-dir.mkiv)3
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-drp.lua (renamed from Master/texmf-dist/tex/context/base/typo-drp.lua)123
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-drp.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-drp.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-dua.lua (renamed from Master/texmf-dist/tex/context/base/typo-dua.lua)112
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-dub.lua (renamed from Master/texmf-dist/tex/context/base/typo-dub.lua)210
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-duc.lua1025
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-fln.lua (renamed from Master/texmf-dist/tex/context/base/typo-fln.lua)3
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-fln.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-fln.mkiv)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-ini.lua (renamed from Master/texmf-dist/tex/context/base/typo-ini.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-ini.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-inj.lua (renamed from Master/texmf-dist/tex/context/base/typo-inj.lua)32
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-inj.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-inj.mkiv)21
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-itc.lua (renamed from Master/texmf-dist/tex/context/base/typo-itc.lua)208
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-itc.mkvi (renamed from Master/texmf-dist/tex/context/base/typo-itc.mkvi)3
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-itm.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-itm.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-krn.lua (renamed from Master/texmf-dist/tex/context/base/typo-krn.lua)128
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-krn.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-krn.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-lan.lua (renamed from Master/texmf-dist/tex/context/base/typo-lan.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-lan.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-lan.mkiv)3
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-lig.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-lig.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-lin.lua471
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-lin.mkiv25
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-man.lua (renamed from Master/texmf-dist/tex/context/base/typo-man.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-mar.lua (renamed from Master/texmf-dist/tex/context/base/typo-mar.lua)221
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-mar.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-mar.mkiv)65
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-pag.lua (renamed from Master/texmf-dist/tex/context/base/typo-pag.lua)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-pag.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-pag.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-par.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-par.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-prc.lua (renamed from Master/texmf-dist/tex/context/base/typo-prc.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-prc.mkvi (renamed from Master/texmf-dist/tex/context/base/typo-prc.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-rep.lua (renamed from Master/texmf-dist/tex/context/base/typo-rep.lua)6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-rep.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-rep.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-scr.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-scr.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-spa.lua (renamed from Master/texmf-dist/tex/context/base/typo-spa.lua)8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-spa.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-spa.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-sus.lua (renamed from Master/texmf-dist/tex/context/base/typo-sus.lua)14
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-sus.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-sus.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-tal.lua (renamed from Master/texmf-dist/tex/context/base/typo-tal.lua)25
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-tal.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-tal.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-txt.mkvi (renamed from Master/texmf-dist/tex/context/base/typo-txt.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-wrp.lua (renamed from Master/texmf-dist/tex/context/base/typo-wrp.lua)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-wrp.mkiv (renamed from Master/texmf-dist/tex/context/base/typo-wrp.mkiv)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/unic-ini.lua (renamed from Master/texmf-dist/tex/context/base/unic-ini.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/unic-ini.mkiv (renamed from Master/texmf-dist/tex/context/base/unic-ini.mkiv)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-deb.lua (renamed from Master/texmf-dist/tex/context/base/util-deb.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-dim.lua (renamed from Master/texmf-dist/tex/context/base/util-dim.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-env.lua (renamed from Master/texmf-dist/tex/context/base/util-env.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-fil.lua167
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-fmt.lua (renamed from Master/texmf-dist/tex/context/base/util-fmt.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-jsn.lua (renamed from Master/texmf-dist/tex/context/base/util-jsn.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-lib-imp-gm.lua69
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-lib-imp-gs.lua212
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-lib.lua (renamed from Master/texmf-dist/tex/context/base/util-lib.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-lua.lua (renamed from Master/texmf-dist/tex/context/base/util-lua.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-mrg.lua (renamed from Master/texmf-dist/tex/context/base/util-mrg.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-pck.lua (renamed from Master/texmf-dist/tex/context/base/util-pck.lua)56
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-prs.lua (renamed from Master/texmf-dist/tex/context/base/util-prs.lua)11
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-ran.lua (renamed from Master/texmf-dist/tex/context/base/util-ran.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-sac.lua202
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-sbx.lua (renamed from Master/texmf-dist/tex/context/base/util-sbx.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-sci.lua (renamed from Master/texmf-dist/tex/context/base/util-sci.lua)8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-seq.lua (renamed from Master/texmf-dist/tex/context/base/util-seq.lua)1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-soc.lua (renamed from Master/texmf-dist/tex/context/base/util-soc.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-client.lua (renamed from Master/texmf-dist/tex/context/base/util-sql-imp-client.lua)38
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-library.lua (renamed from Master/texmf-dist/tex/context/base/util-sql-imp-library.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-swiglib.lua (renamed from Master/texmf-dist/tex/context/base/util-sql-imp-swiglib.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-sql-loggers.lua (renamed from Master/texmf-dist/tex/context/base/util-sql-loggers.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-sql-sessions.lua (renamed from Master/texmf-dist/tex/context/base/util-sql-sessions.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-sql-tickets.lua (renamed from Master/texmf-dist/tex/context/base/util-sql-tickets.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-sql-tracers.lua71
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-sql-users.lua (renamed from Master/texmf-dist/tex/context/base/util-sql-users.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-sql.lua (renamed from Master/texmf-dist/tex/context/base/util-sql.lua)14
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-sta.lua (renamed from Master/texmf-dist/tex/context/base/util-sta.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-sto.lua (renamed from Master/texmf-dist/tex/context/base/util-sto.lua)21
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-str.lua (renamed from Master/texmf-dist/tex/context/base/util-str.lua)15
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-tab.lua (renamed from Master/texmf-dist/tex/context/base/util-tab.lua)67
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-tpl.lua (renamed from Master/texmf-dist/tex/context/base/util-tpl.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-you.lua (renamed from Master/texmf-dist/tex/context/base/util-you.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mult-def.mkiv177
-rw-r--r--Master/texmf-dist/tex/context/base/node-fnt.lua556
-rw-r--r--Master/texmf-dist/tex/context/base/node-ini.lua262
-rw-r--r--Master/texmf-dist/tex/context/base/node-inj.lua603
-rw-r--r--Master/texmf-dist/tex/context/base/pack-obj.lua93
-rw-r--r--Master/texmf-dist/tex/context/base/pack-obj.mkiv415
-rw-r--r--Master/texmf-dist/tex/context/base/ppchtex.mkii3555
-rw-r--r--Master/texmf-dist/tex/context/base/ppchtex.mkiv3445
-rw-r--r--Master/texmf-dist/tex/context/base/rlxcache.rlx71
-rw-r--r--Master/texmf-dist/tex/context/base/rlxtools.rlx136
-rw-r--r--Master/texmf-dist/tex/context/base/s-abr-01.tex370
-rw-r--r--Master/texmf-dist/tex/context/base/s-abr-02.tex22
-rw-r--r--Master/texmf-dist/tex/context/base/s-abr-03.tex22
-rw-r--r--Master/texmf-dist/tex/context/base/s-abr-04.tex24
-rw-r--r--Master/texmf-dist/tex/context/base/s-art-01.mkiv62
-rw-r--r--Master/texmf-dist/tex/context/base/s-cdr-01.tex145
-rw-r--r--Master/texmf-dist/tex/context/base/s-chi-00.mkii76
-rw-r--r--Master/texmf-dist/tex/context/base/s-def-01.mkiv10
-rw-r--r--Master/texmf-dist/tex/context/base/s-faq-00.tex93
-rw-r--r--Master/texmf-dist/tex/context/base/s-faq-01.tex215
-rw-r--r--Master/texmf-dist/tex/context/base/s-faq-02.tex63
-rw-r--r--Master/texmf-dist/tex/context/base/s-faq-03.tex70
-rw-r--r--Master/texmf-dist/tex/context/base/s-figures-names.mkiv99
-rw-r--r--Master/texmf-dist/tex/context/base/s-fnt-01.mkii61
-rw-r--r--Master/texmf-dist/tex/context/base/s-fnt-02.mkii133
-rw-r--r--Master/texmf-dist/tex/context/base/s-fnt-10.mkiv166
-rw-r--r--Master/texmf-dist/tex/context/base/s-fnt-20.mkiv161
-rw-r--r--Master/texmf-dist/tex/context/base/s-fnt-21.mkiv64
-rw-r--r--Master/texmf-dist/tex/context/base/s-fnt-24.mkiv83
-rw-r--r--Master/texmf-dist/tex/context/base/s-fonts-coverage.lua123
-rw-r--r--Master/texmf-dist/tex/context/base/s-fonts-coverage.mkiv131
-rw-r--r--Master/texmf-dist/tex/context/base/s-fonts-features.lua161
-rw-r--r--Master/texmf-dist/tex/context/base/s-fonts-features.mkiv82
-rw-r--r--Master/texmf-dist/tex/context/base/s-fonts-goodies.lua117
-rw-r--r--Master/texmf-dist/tex/context/base/s-fonts-goodies.mkiv37
-rw-r--r--Master/texmf-dist/tex/context/base/s-fonts-ligatures.mkiv292
-rw-r--r--Master/texmf-dist/tex/context/base/s-fonts-missing.lua91
-rw-r--r--Master/texmf-dist/tex/context/base/s-fonts-missing.mkiv56
-rw-r--r--Master/texmf-dist/tex/context/base/s-fonts-shapes.lua323
-rw-r--r--Master/texmf-dist/tex/context/base/s-fonts-shapes.mkiv117
-rw-r--r--Master/texmf-dist/tex/context/base/s-fonts-system.lua68
-rw-r--r--Master/texmf-dist/tex/context/base/s-fonts-system.mkiv39
-rw-r--r--Master/texmf-dist/tex/context/base/s-fonts-tables.lua321
-rw-r--r--Master/texmf-dist/tex/context/base/s-fonts-tables.mkiv37
-rw-r--r--Master/texmf-dist/tex/context/base/s-fonts-vectors.lua104
-rw-r--r--Master/texmf-dist/tex/context/base/s-fonts-vectors.mkiv72
-rw-r--r--Master/texmf-dist/tex/context/base/s-grk-00.mkii77
-rw-r--r--Master/texmf-dist/tex/context/base/s-inf-01.mkvi260
-rw-r--r--Master/texmf-dist/tex/context/base/s-inf-02.mkiv27
-rw-r--r--Master/texmf-dist/tex/context/base/s-inf-03.mkiv372
-rw-r--r--Master/texmf-dist/tex/context/base/s-inf-04.mkiv48
-rw-r--r--Master/texmf-dist/tex/context/base/s-jap-00.mkii23
-rw-r--r--Master/texmf-dist/tex/context/base/s-languages-counters.lua52
-rw-r--r--Master/texmf-dist/tex/context/base/s-languages-counters.mkiv30
-rw-r--r--Master/texmf-dist/tex/context/base/s-languages-frequencies.lua33
-rw-r--r--Master/texmf-dist/tex/context/base/s-languages-frequencies.mkiv38
-rw-r--r--Master/texmf-dist/tex/context/base/s-languages-hyphenation.lua135
-rw-r--r--Master/texmf-dist/tex/context/base/s-languages-hyphenation.mkiv77
-rw-r--r--Master/texmf-dist/tex/context/base/s-languages-sorting.lua118
-rw-r--r--Master/texmf-dist/tex/context/base/s-languages-sorting.mkiv30
-rw-r--r--Master/texmf-dist/tex/context/base/s-languages-system.lua62
-rw-r--r--Master/texmf-dist/tex/context/base/s-languages-system.mkiv32
-rw-r--r--Master/texmf-dist/tex/context/base/s-languages-words.lua32
-rw-r--r--Master/texmf-dist/tex/context/base/s-languages-words.mkiv22
-rw-r--r--Master/texmf-dist/tex/context/base/s-mag-01.tex412
-rw-r--r--Master/texmf-dist/tex/context/base/s-map-10.mkii491
-rw-r--r--Master/texmf-dist/tex/context/base/s-map-10.mkiv494
-rw-r--r--Master/texmf-dist/tex/context/base/s-math-characters.lua242
-rw-r--r--Master/texmf-dist/tex/context/base/s-math-characters.mkiv193
-rw-r--r--Master/texmf-dist/tex/context/base/s-math-coverage.lua197
-rw-r--r--Master/texmf-dist/tex/context/base/s-math-coverage.mkiv38
-rw-r--r--Master/texmf-dist/tex/context/base/s-math-extensibles.mkiv145
-rw-r--r--Master/texmf-dist/tex/context/base/s-math-parameters.lua135
-rw-r--r--Master/texmf-dist/tex/context/base/s-math-parameters.mkiv41
-rw-r--r--Master/texmf-dist/tex/context/base/s-math-repertoire.mkiv487
-rw-r--r--Master/texmf-dist/tex/context/base/s-mod-00.mkii511
-rw-r--r--Master/texmf-dist/tex/context/base/s-mod-00.mkiv24
-rw-r--r--Master/texmf-dist/tex/context/base/s-mod-01.mkii155
-rw-r--r--Master/texmf-dist/tex/context/base/s-mod-01.mkiv390
-rw-r--r--Master/texmf-dist/tex/context/base/s-mod-02.mkii421
-rw-r--r--Master/texmf-dist/tex/context/base/s-mod-02.mkiv24
-rw-r--r--Master/texmf-dist/tex/context/base/s-mod.ctx24
-rw-r--r--Master/texmf-dist/tex/context/base/s-pages-statistics.mkiv134
-rw-r--r--Master/texmf-dist/tex/context/base/s-physics-units.mkiv30
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-00.tex202
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-01.tex404
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-02.tex381
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-03.tex257
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-04.tex377
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-05.tex240
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-06.tex324
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-07.tex212
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-08.tex271
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-09.tex380
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-10.tex308
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-11.tex220
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-12.tex226
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-13.tex302
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-14.tex263
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-15.tex186
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-16.tex203
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-17.mkii399
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-17.mkiv408
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-18.tex173
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-19.tex347
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-22.tex319
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-23.tex109
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-26.tex255
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-27.tex181
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-30.mkii258
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-30.mkiv257
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-50.tex101
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-60.mkii143
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-60.mkiv212
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-61.tex275
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-62.tex224
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-63.tex77
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-64.tex208
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-66.tex161
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-67.tex155
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-68.tex150
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-69.mkiv336
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-70.mkiv176
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-71.lua63
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-71.mkii213
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-71.mkiv170
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-93.tex208
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-96.tex188
-rw-r--r--Master/texmf-dist/tex/context/base/s-present-tiles.mkiv318
-rw-r--r--Master/texmf-dist/tex/context/base/s-ptj-01.tex425
-rw-r--r--Master/texmf-dist/tex/context/base/s-references-show.mkiv132
-rw-r--r--Master/texmf-dist/tex/context/base/s-reg-01.mkiv60
-rw-r--r--Master/texmf-dist/tex/context/base/s-set-31.mkiv118
-rw-r--r--Master/texmf-dist/tex/context/base/s-sql-tables.lua152
-rw-r--r--Master/texmf-dist/tex/context/base/s-sql-tables.mkiv24
-rw-r--r--Master/texmf-dist/tex/context/base/s-structure-sections.mkiv80
-rw-r--r--Master/texmf-dist/tex/context/base/s-syntax.mkii54
-rw-r--r--Master/texmf-dist/tex/context/base/s-syntax.mkiv96
-rw-r--r--Master/texmf-dist/tex/context/base/s-typesetting-kerning.mkiv209
-rw-r--r--Master/texmf-dist/tex/context/base/s-youless.mkiv171
-rw-r--r--Master/texmf-dist/tex/context/base/spac-prf.mkiv31
-rw-r--r--Master/texmf-dist/tex/context/base/status-files.pdfbin24456 -> 0 bytes
-rw-r--r--Master/texmf-dist/tex/context/base/status-lua.pdfbin251190 -> 0 bytes
-rw-r--r--Master/texmf-dist/tex/context/base/syst-aux.lua229
-rw-r--r--Master/texmf-dist/tex/context/base/tabl-ltb.mkiv766
-rw-r--r--Master/texmf-dist/tex/context/base/toks-ini.lua256
-rw-r--r--Master/texmf-dist/tex/context/base/toks-tra.lua298
-rw-r--r--Master/texmf-dist/tex/context/base/trac-tex.lua122
-rw-r--r--Master/texmf-dist/tex/context/base/type-buy.mkii571
-rw-r--r--Master/texmf-dist/tex/context/base/type-cbg.mkii352
-rw-r--r--Master/texmf-dist/tex/context/base/type-cow.mkii85
-rw-r--r--Master/texmf-dist/tex/context/base/type-exp.mkii95
-rw-r--r--Master/texmf-dist/tex/context/base/type-fsf.mkii94
-rw-r--r--Master/texmf-dist/tex/context/base/type-ghz.mkii409
-rw-r--r--Master/texmf-dist/tex/context/base/type-hgz.mkii1
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-antykwa.mkiv228
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-antykwapoltawskiego.mkiv140
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-asana.mkiv35
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-averia.mkiv90
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-buy.mkiv135
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-cambria.mkiv77
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-charter.mkiv36
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-cleartype.mkiv56
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-computer-modern-unicode.mkiv64
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-cow.mkiv85
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-dejavu.mkiv106
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-ebgaramond.mkiv45
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-euler.mkiv91
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-ghz.mkiv322
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-hgz.mkiv1
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-husayni.mkiv198
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-hvmath.mkiv30
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-inconsolata.mkiv25
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-informal.mkiv52
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-ipaex.mkiv137
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-iwona.mkiv236
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-kurier.mkiv56
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-latinmodern.mkiv238
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-lato.mkiv56
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-liberation.mkiv47
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-libertine.mkiv63
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-lmnames.mkiv129
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-lucida-opentype.mkiv92
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-lucida-typeone.mkiv134
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-mathdesign.mkiv133
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-mathdigits.mkiv53
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-mathtimes.mkiv31
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-mscore.mkiv64
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-opendyslexic.mkiv39
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-osx.mkiv567
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-postscript.mkiv26
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-punknova.mkiv34
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-texgyre.mkiv288
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-unfonts.mkiv142
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-xits.mkiv60
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-xitsbidi.mkiv16
-rw-r--r--Master/texmf-dist/tex/context/base/type-mac.mkii593
-rw-r--r--Master/texmf-dist/tex/context/base/type-msw.mkii1
-rw-r--r--Master/texmf-dist/tex/context/base/type-pre.mkii253
-rw-r--r--Master/texmf-dist/tex/context/base/type-run.mkiv51
-rw-r--r--Master/texmf-dist/tex/context/base/type-win.mkii69
-rw-r--r--Master/texmf-dist/tex/context/base/type-xtx.mkii563
-rw-r--r--Master/texmf-dist/tex/context/base/typo-brk.lua352
-rw-r--r--Master/texmf-dist/tex/context/base/typo-dha.lua415
-rw-r--r--Master/texmf-dist/tex/context/base/util-sql-tracers.lua48
-rw-r--r--Master/texmf-dist/tex/context/base/x-asciimath.lua2101
-rw-r--r--Master/texmf-dist/tex/context/base/x-asciimath.mkiv393
-rw-r--r--Master/texmf-dist/tex/context/base/x-calcmath.lua363
-rw-r--r--Master/texmf-dist/tex/context/base/x-calcmath.mkii24
-rw-r--r--Master/texmf-dist/tex/context/base/x-calcmath.mkiv80
-rw-r--r--Master/texmf-dist/tex/context/base/x-cals.lua221
-rw-r--r--Master/texmf-dist/tex/context/base/x-cals.mkiv45
-rw-r--r--Master/texmf-dist/tex/context/base/x-chemml.lua51
-rw-r--r--Master/texmf-dist/tex/context/base/x-chemml.mkii212
-rw-r--r--Master/texmf-dist/tex/context/base/x-chemml.mkiv228
-rw-r--r--Master/texmf-dist/tex/context/base/x-chemml.xsd93
-rw-r--r--Master/texmf-dist/tex/context/base/x-contml.mkii491
-rw-r--r--Master/texmf-dist/tex/context/base/x-contml.xsd375
-rw-r--r--Master/texmf-dist/tex/context/base/x-corres.mkii136
-rw-r--r--Master/texmf-dist/tex/context/base/x-corres.rng170
-rw-r--r--Master/texmf-dist/tex/context/base/x-ct.lua167
-rw-r--r--Master/texmf-dist/tex/context/base/x-ct.mkiv29
-rw-r--r--Master/texmf-dist/tex/context/base/x-dir-01.tex145
-rw-r--r--Master/texmf-dist/tex/context/base/x-dir-05.mkii51
-rw-r--r--Master/texmf-dist/tex/context/base/x-dir-05.mkiv74
-rw-r--r--Master/texmf-dist/tex/context/base/x-entities.mkiv18
-rw-r--r--Master/texmf-dist/tex/context/base/x-fdf-00.mkii41
-rw-r--r--Master/texmf-dist/tex/context/base/x-fe.mkii143
-rw-r--r--Master/texmf-dist/tex/context/base/x-fig-00.dtd24
-rw-r--r--Master/texmf-dist/tex/context/base/x-fig-00.mkii252
-rw-r--r--Master/texmf-dist/tex/context/base/x-fig-00.xsd77
-rw-r--r--Master/texmf-dist/tex/context/base/x-fig-01.mkii461
-rw-r--r--Master/texmf-dist/tex/context/base/x-fig-02.mkii78
-rw-r--r--Master/texmf-dist/tex/context/base/x-fig-03.mkii44
-rw-r--r--Master/texmf-dist/tex/context/base/x-fo.mkii4057
-rw-r--r--Master/texmf-dist/tex/context/base/x-foxet.mkii28
-rw-r--r--Master/texmf-dist/tex/context/base/x-foxet.mkiv29
-rw-r--r--Master/texmf-dist/tex/context/base/x-html.mkiv379
-rw-r--r--Master/texmf-dist/tex/context/base/x-ldx.ctx23
-rw-r--r--Master/texmf-dist/tex/context/base/x-ldx.lua341
-rw-r--r--Master/texmf-dist/tex/context/base/x-ldx.mkiv196
-rw-r--r--Master/texmf-dist/tex/context/base/x-math-svg.lua176
-rw-r--r--Master/texmf-dist/tex/context/base/x-mathml-basics.mkiv276
-rw-r--r--Master/texmf-dist/tex/context/base/x-mathml-html.mkiv40
-rw-r--r--Master/texmf-dist/tex/context/base/x-mathml.lua896
-rw-r--r--Master/texmf-dist/tex/context/base/x-mathml.mkii28
-rw-r--r--Master/texmf-dist/tex/context/base/x-mathml.mkiv2598
-rw-r--r--Master/texmf-dist/tex/context/base/x-mathml.xsd11
-rw-r--r--Master/texmf-dist/tex/context/base/x-newcml.mkii456
-rw-r--r--Master/texmf-dist/tex/context/base/x-newmme.mkii423
-rw-r--r--Master/texmf-dist/tex/context/base/x-newmml.mkii2744
-rw-r--r--Master/texmf-dist/tex/context/base/x-newmml.mkiv16
-rw-r--r--Master/texmf-dist/tex/context/base/x-newmmo.mkii210
-rw-r--r--Master/texmf-dist/tex/context/base/x-newpml.mkii250
-rw-r--r--Master/texmf-dist/tex/context/base/x-om2cml.xsl1342
-rw-r--r--Master/texmf-dist/tex/context/base/x-openmath.mkii4
-rw-r--r--Master/texmf-dist/tex/context/base/x-openmath.xsl35
-rw-r--r--Master/texmf-dist/tex/context/base/x-pfs-01.mkiv399
-rw-r--r--Master/texmf-dist/tex/context/base/x-pfsense.ctx15
-rw-r--r--Master/texmf-dist/tex/context/base/x-physml.mkii16
-rw-r--r--Master/texmf-dist/tex/context/base/x-physml.mkiv16
-rw-r--r--Master/texmf-dist/tex/context/base/x-physml.xsd172
-rw-r--r--Master/texmf-dist/tex/context/base/x-res-00.mkii67
-rw-r--r--Master/texmf-dist/tex/context/base/x-res-01.mkii487
-rw-r--r--Master/texmf-dist/tex/context/base/x-res-01.mkiv427
-rw-r--r--Master/texmf-dist/tex/context/base/x-res-02.mkii72
-rw-r--r--Master/texmf-dist/tex/context/base/x-res-03.mkii44
-rw-r--r--Master/texmf-dist/tex/context/base/x-res-04.mkii336
-rw-r--r--Master/texmf-dist/tex/context/base/x-res-08.mkii129
-rw-r--r--Master/texmf-dist/tex/context/base/x-res-09.mkii69
-rw-r--r--Master/texmf-dist/tex/context/base/x-res-10.mkii75
-rw-r--r--Master/texmf-dist/tex/context/base/x-res-11.mkii110
-rw-r--r--Master/texmf-dist/tex/context/base/x-res-12.mkii53
-rw-r--r--Master/texmf-dist/tex/context/base/x-res-20.mkii231
-rw-r--r--Master/texmf-dist/tex/context/base/x-res-50.mkii427
-rw-r--r--Master/texmf-dist/tex/context/base/x-res-50.mkiv431
-rw-r--r--Master/texmf-dist/tex/context/base/x-sch-00.mkii382
-rw-r--r--Master/texmf-dist/tex/context/base/x-sch-01.mkii122
-rw-r--r--Master/texmf-dist/tex/context/base/x-set-01.mkii79
-rw-r--r--Master/texmf-dist/tex/context/base/x-set-02.mkii30
-rw-r--r--Master/texmf-dist/tex/context/base/x-set-11.mkii837
-rw-r--r--Master/texmf-dist/tex/context/base/x-set-11.mkiv855
-rw-r--r--Master/texmf-dist/tex/context/base/x-set-12.mkii258
-rw-r--r--Master/texmf-dist/tex/context/base/x-set-12.mkiv267
-rw-r--r--Master/texmf-dist/tex/context/base/x-sm2om.xsl233
-rw-r--r--Master/texmf-dist/tex/context/base/x-steps.mkii85
-rw-r--r--Master/texmf-dist/tex/context/base/x-steps.mkiv102
-rw-r--r--Master/texmf-dist/tex/context/base/x-udhr.mkiv98
-rw-r--r--Master/texmf-dist/tex/context/base/x-xfdf.mkiv72
-rw-r--r--Master/texmf-dist/tex/context/base/x-xml-01.mkii91
-rw-r--r--Master/texmf-dist/tex/context/base/x-xml-02.mkii91
-rw-r--r--Master/texmf-dist/tex/context/base/x-xml-11.mkii134
-rw-r--r--Master/texmf-dist/tex/context/base/x-xtag.mkiv90
1731 files changed, 80514 insertions, 109550 deletions
diff --git a/Master/texmf-dist/tex/context/base/char-cjk.lua b/Master/texmf-dist/tex/context/base/char-cjk.lua
deleted file mode 100644
index 30f61889620..00000000000
--- a/Master/texmf-dist/tex/context/base/char-cjk.lua
+++ /dev/null
@@ -1,365 +0,0 @@
-if not modules then modules = { } end modules ['char-cjk'] = {
- version = 1.001,
- comment = "companion to char-ini.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local setmetatable = setmetatable
-local insert = table.insert
-local floor = math.floor
-local formatters = string.formatters
-local utfchar = utf.char
-
-local ranges = characters.ranges
-local allocate = utilities.storage.allocate
-
--- Hangul Syllable
-
--- The following conversion is taken from unicode.org/reports/tr15/tr15-23.html#Hangul
--- but adapted to our needs.
-
--- local SBase = 0xAC00
---
--- local LBase, LCount = 0x1100, 19
--- local VBase, VCount = 0x1161, 21
--- local TBase, TCount = 0x11A7, 28
---
--- local NCount = VCount * TCount
--- local SCount = LCount * NCount
---
--- local function decomposed(unicode)
--- local SIndex = unicode - SBase
--- if SIndex >= 0 and SIndex < SCount then
--- local lead_consonant = LBase + floor( SIndex / NCount)
--- local medial_vowel = VBase + floor((SIndex % NCount) / TCount)
--- local tail_consonant = TBase + SIndex % TCount
--- if tail_consonant ~= TBase then
--- return lead_consonant, medial_vowel, tail_consonant
--- else
--- return lead_consonant, medial_vowel
--- end
--- end
--- end
---
--- Lua will optimize the inline constants so the next variant is
--- 10% faster. In practice this will go unnoticed, but it's also less
--- code, so let's do it. Pushing the constant section into the
--- function body saves 5%.
-
-local function decomposed(unicode)
- local index = unicode - 0xAC00
- if index >= 0 and index < 19 * 21 * 28 then
- local lead_consonant = 0x1100 + floor( index / (21 * 28))
- local medial_vowel = 0x1161 + floor((index % (21 * 28)) / 28)
- local tail_consonant = 0x11A7 + index % 28
- if tail_consonant ~= 0x11A7 then
- return lead_consonant, medial_vowel, tail_consonant
- else
- return lead_consonant, medial_vowel
- end
- end
-end
-
-local lead_consonants = { [0] =
- "G", "GG", "N", "D", "DD", "R", "M", "B", "BB",
- "S", "SS", "", "J", "JJ", "C", "K", "T", "P", "H"
-}
-
-local medial_vowels = { [0] =
- "A", "AE", "YA", "YAE", "EO", "E", "YEO", "YE", "O",
- "WA", "WAE", "OE", "YO", "U", "WEO", "WE", "WI",
- "YU", "EU", "YI", "I"
-}
-
-local tail_consonants = { [0] =
- "", "G", "GG", "GS", "N", "NJ", "NH", "D", "L", "LG", "LM",
- "LB", "LS", "LT", "LP", "LH", "M", "B", "BS",
- "S", "SS", "NG", "J", "C", "K", "T", "P", "H"
-}
-
--- local function description(unicode)
--- local index = unicode - 0xAC00
--- if index >= 0 and index < 19 * 21 * 28 then
--- local lead_consonant = floor( index / NCount)
--- local medial_vowel = floor((index % NCount) / TCount)
--- local tail_consonant = index % TCount
--- return formatters["HANGUL SYLLABLE %s%s%s"](
--- lead_consonants[lead_consonant],
--- medial_vowels [medial_vowel ],
--- tail_consonants[tail_consonant]
--- )
--- end
--- end
-
-local function description(unicode)
- local index = unicode - 0xAC00
- if index >= 0 and index < 19 * 21 * 28 then
- local lead_consonant = floor( index / (21 * 28))
- local medial_vowel = floor((index % (21 * 28)) / 28)
- local tail_consonant = index % 28
- return formatters["HANGUL SYLLABLE %s%s%s"](
- lead_consonants[lead_consonant],
- medial_vowels [medial_vowel ],
- tail_consonants[tail_consonant]
- )
- end
-end
-
--- so far
-
--- We have a [lead consonant,medial vowel,tail consonant] where the last one
--- is optional. For sort ranges we need the first one but some are collapsed.
--- Beware, we map to modern so the font should support it.
-
-local function leadconsonant(unicode)
- return
- -- unicode < 0xAC00 and nil -- original
- -- unicode > 0xD7AF and nil or -- original
- unicode >= 0xD558 and 0x314E or -- 하 => ㅎ
- unicode >= 0xD30C and 0x314D or -- 파 => ã…
- unicode >= 0xD0C0 and 0x314C or -- 타 => ㅌ
- unicode >= 0xCE74 and 0x314B or -- ì¹´ => ã…‹
- unicode >= 0xCC28 and 0x314A or -- ì°¨ => ã…Š
- unicode >= 0xC790 and 0x3148 or -- ìž => ã…ˆ
- unicode >= 0xC544 and 0x3147 or -- ì•„ => ã…‡
- unicode >= 0xC0AC and 0x3145 or -- 사 => ㅅ
- unicode >= 0xBC14 and 0x3142 or -- ë°” => ã…‚
- unicode >= 0xB9C8 and 0x3141 or -- 마 => ã…
- unicode >= 0xB77C and 0x3139 or -- ë¼ => ㄹ
- unicode >= 0xB2E4 and 0x3137 or -- 다 => ㄷ
- unicode >= 0xB098 and 0x3134 or -- 나 => ㄴ
- unicode >= 0xAC00 and 0x3131 or -- 가 => ㄱ
- nil -- can't happen
-end
-
-local remapped = { -- this might be merged into char-def.lua
- [0x1100] = 0x3131, -- G
- [0x1101] = 0x3132, -- GG
- [0x1102] = 0x3134, -- N
- [0x1103] = 0x3137, -- D
- [0x1104] = 0x3138, -- DD
- [0x1105] = 0x3139, -- R
- -- [0X111A] = 0x3140, -- LH used for last sound
- [0x1106] = 0x3141, -- M
- [0x1107] = 0x3142, -- B
- [0x1108] = 0x3143, -- BB
- -- [0x1121] = 0x3144, -- BS used for last sound
- [0x1109] = 0x3145, -- S
- [0x110A] = 0x3146, -- SS
- [0x110B] = 0x3147, -- (IEUNG) no sound but has form
- [0x110C] = 0x3148, -- J
- [0x110D] = 0x3149, -- JJ
- [0x110E] = 0x314A, -- C
- [0x110F] = 0x314B, -- K
- [0x1110] = 0x314C, -- T
- [0x1111] = 0x314D, -- P
- [0x1112] = 0x314E, -- H
-
- [0x1161] = 0x314F, -- A
- [0x1162] = 0x3150, -- AE
- [0x1163] = 0x3151, -- YA
- [0x1164] = 0x3152, -- YAE
- [0x1165] = 0x3153, -- EO
- [0x1166] = 0x3154, -- E
- [0x1167] = 0x3155, -- YEO
- [0x1168] = 0x3156, -- YE
- [0x1169] = 0x3157, -- O
- [0x116A] = 0x3158, -- WA
- [0x116B] = 0x3159, -- WAE
- [0x116C] = 0x315A, -- OE
- [0x116D] = 0x315B, -- YO
- [0x116E] = 0x315C, -- U
- [0x116F] = 0x315D, -- WEO
- [0x1170] = 0x315E, -- WE
- [0x1171] = 0x315F, -- WI
- [0x1172] = 0x3160, -- YU
- [0x1173] = 0x3161, -- EU
- [0x1174] = 0x3162, -- YI
- [0x1175] = 0x3163, -- I
-
- [0x11A8] = 0x3131, -- G
- [0x11A9] = 0x3132, -- GG
- [0x11AA] = 0x3133, -- GS
- [0x11AB] = 0x3134, -- N
- [0x11AC] = 0x3135, -- NJ
- [0x11AD] = 0x3136, -- NH
- [0x11AE] = 0x3137, -- D
- [0x11AF] = 0x3139, -- L
- [0x11B0] = 0x313A, -- LG
- [0x11B1] = 0x313B, -- LM
- [0x11B2] = 0x313C, -- LB
- [0x11B3] = 0x313D, -- LS
- [0x11B4] = 0x313E, -- LT
- [0x11B5] = 0x313F, -- LP
- [0x11B6] = 0x3140, -- LH
- [0x11B7] = 0x3141, -- M
- [0x11B8] = 0x3142, -- B
- [0x11B9] = 0x3144, -- BS
- [0x11BA] = 0x3145, -- S
- [0x11BB] = 0x3146, -- SS
- [0x11BC] = 0x3147, -- NG
- [0x11BD] = 0x3148, -- J
- [0x11BE] = 0x314A, -- C
- [0x11BF] = 0x314B, -- K
- [0x11C0] = 0x314C, -- T
- [0x11C1] = 0x314D, -- P
- [0x11C2] = 0x314E, -- H
-}
-
-characters.hangul = allocate {
- decomposed = decomposed,
- description = description,
- leadconsonant = leadconsonant,
- remapped = remapped,
-}
-
--- so far
-
-local hangul_syllable_basetable = {
- category = "lo",
- cjkwd = "w",
- description = "<Hangul Syllable>",
- direction = "l",
- linebreak = "h2",
-}
-
-local hangul_syllable_metatable = {
- __index = function(t,k)
- local u = t.unicodeslot
- if k == "fscode" or k == "leadconsonant" then
- return leadconsonant(u)
- elseif k == "decomposed" then
- return { decomposed(u) }
- elseif k == "specials" then
- return { "char", decomposed(u) }
- elseif k == "description" then
- return description(u)
- else
- return hangul_syllable_basetable[k]
- end
- end
-}
-
-function characters.remap_hangul_syllabe(t)
- local tt = type(t)
- if tt == "number" then
- return remapped[t] or t
- elseif tt == "table" then
- local r = { }
- for i=1,#t do
- local ti = t[i]
- r[i] = remapped[ti] or ti
- end
- return r
- else
- return t
- end
-end
-
-local hangul_syllable_extender = function(k,v)
- local t = {
- unicodeslot = k,
- }
- setmetatable(t,hangul_syllable_metatable)
- return t
-end
-
-local hangul_syllable_range = {
- first = 0xAC00,
- last = 0xD7A3,
- extender = hangul_syllable_extender,
-}
-
-setmetatable(hangul_syllable_range, hangul_syllable_metatable)
-
--- CJK Ideograph
-
-local cjk_ideograph_metatable = {
- __index = {
- category = "lo",
- cjkwd = "w",
- description = "<CJK Ideograph>",
- direction = "l",
- linebreak = "id",
- }
-}
-
-local cjk_ideograph_extender = function(k,v)
- local t = {
- -- shcode = shcode,
- unicodeslot = k,
- }
- setmetatable(t,cjk_ideograph_metatable)
- return t
-end
-
-local cjk_ideograph_range = {
- first = 0x4E00,
- last = 0x9FBB,
- extender = cjk_ideograph_extender,
-}
-
--- CJK Ideograph Extension A
-
-local cjk_ideograph_extension_a_metatable = {
- __index = {
- category = "lo",
- cjkwd = "w",
- description = "<CJK Ideograph Extension A>",
- direction = "l",
- linebreak = "id",
- }
-}
-
-local cjk_ideograph_extension_a_extender = function(k,v)
- local t = {
- -- shcode = shcode,
- unicodeslot = k,
- }
- setmetatable(t,cjk_ideograph_extension_a_metatable)
- return t
-end
-
-local cjk_ideograph_extension_a_range = {
- first = 0x3400,
- last = 0x4DB5,
- extender = cjk_ideograph_extension_a_extender,
-}
-
--- CJK Ideograph Extension B
-
-local cjk_ideograph_extension_b_metatable = {
- __index = {
- category = "lo",
- cjkwd = "w",
- description = "<CJK Ideograph Extension B>",
- direction = "l",
- linebreak = "id",
- }
-}
-
-local cjk_ideograph_extension_b_extender = function(k,v)
- local t = {
- -- shcode = shcode,
- unicodeslot = k,
- }
- setmetatable(t,cjk_ideograph_extension_b_metatable)
- return t
-end
-
-local cjk_ideograph_extension_b_range = {
- first = 0x20000,
- last = 0x2A6D6,
- extender = cjk_ideograph_extension_b_extender,
-}
-
--- Ranges
-
-insert(ranges, hangul_syllable_range)
-insert(ranges, cjk_ideograph_range)
-insert(ranges, cjk_ideograph_extension_a_range)
-insert(ranges, cjk_ideograph_extension_b_range)
-
--- Japanese
diff --git a/Master/texmf-dist/tex/context/base/context-version.pdf b/Master/texmf-dist/tex/context/base/context-version.pdf
index 5244e0ba98b..daf462b45de 100644
--- a/Master/texmf-dist/tex/context/base/context-version.pdf
+++ b/Master/texmf-dist/tex/context/base/context-version.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/context/base/core-env.lua b/Master/texmf-dist/tex/context/base/core-env.lua
deleted file mode 100644
index a3a87b7f78e..00000000000
--- a/Master/texmf-dist/tex/context/base/core-env.lua
+++ /dev/null
@@ -1,261 +0,0 @@
-if not modules then modules = { } end modules ['core-env'] = {
- version = 1.001,
- comment = "companion to core-env.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
--- maybe this will move to the context name space although the
--- plurals are unlikely to clash with future tex primitives
---
--- if tex.modes['xxxx'] then .... else .... end
-
-local P, C, S, Cc, lpegmatch, patterns = lpeg.P, lpeg.C, lpeg.S, lpeg.Cc, lpeg.match, lpeg.patterns
-
-local texgetcount = tex.getcount
-local texsetcount = tex.setcount
-
-local allocate = utilities.storage.allocate
-local setmetatableindex = table.setmetatableindex
-local setmetatablecall = table.setmetatablecall
-
-local context = context
-
-tex.modes = allocate { }
-tex.systemmodes = allocate { }
-tex.constants = allocate { }
-tex.conditionals = allocate { }
-tex.ifs = allocate { }
-tex.isdefined = allocate { }
-
-local modes = { }
-local systemmodes = { }
-
--- if newtoken then -- we keep the old code for historic reasons
-
- -- undefined: mode == 0 or cmdname = "undefined_cs"
-
- local create = newtoken.create
-
- local cache = table.setmetatableindex(function(t,k)
- local v = create(k)
- t[k] = v
- return v
- end)
-
- -- we can have a modes cache too
-
- local iftrue = cache["iftrue"].mode
- local undefined = cache["*undefined*crap*"].mode -- is this ok?
-
- setmetatableindex(tex.modes, function(t,k)
- local m = modes[k]
- if m then
- return m()
- else
- local n = "mode>" .. k
- if cache[n].mode == 0 then
- return false
- else
- modes[k] = function() return texgetcount(n) == 1 end
- return texgetcount(n) == 1 -- 2 is prevented
- end
- end
- end)
-
- setmetatableindex(tex.systemmodes, function(t,k)
- local m = systemmodes[k]
- if m then
- return m()
- else
- local n = "mode>*" .. k
- if cache[n].mode == 0 then
- return false
- else
- systemmodes[k] = function() return texgetcount(n) == 1 end
- return texgetcount(n) == 1 -- 2 is prevented
- end
- end
- end)
-
- setmetatableindex(tex.constants, function(t,k)
- return cache[k].mode ~= 0 and texgetcount(k) or 0
- end)
-
- setmetatableindex(tex.conditionals, function(t,k) -- 0 == true
- return cache[k].mode ~= 0 and texgetcount(k) == 0
- end)
-
- table.setmetatableindex(tex.ifs, function(t,k)
- -- local mode = cache[k].mode
- -- if mode == 0 then
- -- return nil
- -- else
- -- return mode == iftrue
- -- end
- return cache[k].mode == iftrue
- end)
-
- setmetatableindex(tex.isdefined, function(t,k)
- return k and cache[k].mode ~= 0
- end)
-
- setmetatablecall(tex.isdefined, function(t,k)
- return k and cache[k].mode ~= 0
- end)
-
- local dimencode = cache["scratchdimen" ].command
- local countcode = cache["scratchcounter"].command
- local tokencode = cache["scratchtoken" ].command
- local skipcode = cache["scratchskip" ].command
-
- local types = {
- [dimencode] = "dimen",
- [countcode] = "count",
- [tokencode] = "token",
- [skipcode ] = "skip",
- }
-
- function tex.isdimen(name)
- return cache[name].command == dimencode
- end
-
- function tex.iscount(name)
- return cache[name].command == countcode
- end
-
- function tex.istoken(name)
- return cache[name].command == tokencode
- end
-
- function tex.isskip(name)
- return cache[name].command == skipcode
- end
-
- function tex.type(name)
- return types[cache[name].command] or "macro"
- end
-
--- else
---
--- local csname_id = token.csname_id
--- local create = token.create
---
--- local undefined = csname_id("*undefined*crap*")
--- local iftrue = create("iftrue")[2] -- inefficient hack
---
--- setmetatableindex(tex.modes, function(t,k)
--- local m = modes[k]
--- if m then
--- return m()
--- else
--- local n = "mode>" .. k
--- if csname_id(n) == undefined then
--- return false
--- else
--- modes[k] = function() return texgetcount(n) == 1 end
--- return texgetcount(n) == 1 -- 2 is prevented
--- end
--- end
--- end)
---
--- setmetatableindex(tex.systemmodes, function(t,k)
--- local m = systemmodes[k]
--- if m then
--- return m()
--- else
--- local n = "mode>*" .. k
--- if csname_id(n) == undefined then
--- return false
--- else
--- systemmodes[k] = function() return texgetcount(n) == 1 end
--- return texgetcount(n) == 1 -- 2 is prevented
--- end
--- end
--- end)
---
--- setmetatableindex(tex.constants, function(t,k)
--- return csname_id(k) ~= undefined and texgetcount(k) or 0
--- end)
---
--- setmetatableindex(tex.conditionals, function(t,k) -- 0 == true
--- return csname_id(k) ~= undefined and texgetcount(k) == 0
--- end)
---
--- setmetatableindex(tex.ifs, function(t,k)
--- -- k = "if" .. k -- better not
--- return csname_id(k) ~= undefined and create(k)[2] == iftrue -- inefficient, this create, we need a helper
--- end)
---
--- setmetatableindex(tex.isdefined, function(t,k)
--- return k and csname_id(k) ~= undefined
--- end)
--- setmetatablecall(tex.isdefined, function(t,k)
--- return k and csname_id(k) ~= undefined
--- end)
---
--- local lookuptoken = token.lookup
---
--- local dimencode = lookuptoken("scratchdimen" )[1]
--- local countcode = lookuptoken("scratchcounter")[1]
--- local tokencode = lookuptoken("scratchtoken" )[1]
--- local skipcode = lookuptoken("scratchskip" )[1]
---
--- local types = {
--- [dimencode] = "dimen",
--- [countcode] = "count",
--- [tokencode] = "token",
--- [skipcode ] = "skip",
--- }
---
--- function tex.isdimen(name)
--- return lookuptoken(name)[1] == dimencode
--- end
---
--- function tex.iscount(name)
--- return lookuptoken(name)[1] == countcode
--- end
---
--- function tex.istoken(name)
--- return lookuptoken(name)[1] == tokencode
--- end
---
--- function tex.isskip(name)
--- return lookuptoken(name)[1] == skipcode
--- end
---
--- function tex.type(name)
--- return types[lookuptoken(name)[1]] or "macro"
--- end
---
--- end
-
-function context.setconditional(name,value)
- if value then
- context.settruevalue(name)
- else
- context.setfalsevalue(name)
- end
-end
-
----- arg = P("{") * C(patterns.nested) * P("}") + Cc("")
-
-local sep = S("), ")
-local str = C((1-sep)^1)
-local tag = P("(") * C((1-S(")" ))^1) * P(")")
-local arg = P("(") * C((1-S("){"))^1) * P("{") * C((1-P("}"))^0) * P("}") * P(")")
-
-local pattern = (
- P("lua") * tag / context.luasetup
- + P("xml") * arg / context.setupwithargument -- or xmlw as xmlsetup has swapped arguments
- + (P("tex") * tag + str) / context.texsetup
- + sep^1
-)^1
-
-interfaces.implement {
- name = "autosetups",
- actions = function(str) lpegmatch(pattern,str) end,
- arguments = "string"
-}
-
diff --git a/Master/texmf-dist/tex/context/base/font-map.lua b/Master/texmf-dist/tex/context/base/font-map.lua
deleted file mode 100644
index 449a00f2efd..00000000000
--- a/Master/texmf-dist/tex/context/base/font-map.lua
+++ /dev/null
@@ -1,535 +0,0 @@
-if not modules then modules = { } end modules ['font-map'] = {
- version = 1.001,
- comment = "companion to font-ini.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local tonumber, next, type = tonumber, next, type
-
-local match, format, find, concat, gsub, lower = string.match, string.format, string.find, table.concat, string.gsub, string.lower
-local P, R, S, C, Ct, Cc, lpegmatch = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Ct, lpeg.Cc, lpeg.match
-local utfbyte = utf.byte
-local floor = math.floor
-local formatters = string.formatters
-
-local trace_loading = false trackers.register("fonts.loading", function(v) trace_loading = v end)
-local trace_mapping = false trackers.register("fonts.mapping", function(v) trace_unimapping = v end)
-
-local report_fonts = logs.reporter("fonts","loading") -- not otf only
-
-local fonts = fonts or { }
-local mappings = fonts.mappings or { }
-fonts.mappings = mappings
-
-local allocate = utilities.storage.allocate
-
---[[ldx--
-<p>Eventually this code will disappear because map files are kind
-of obsolete. Some code may move to runtime or auxiliary modules.</p>
-<p>The name to unciode related code will stay of course.</p>
---ldx]]--
-
-local function loadlumtable(filename) -- will move to font goodies
- local lumname = file.replacesuffix(file.basename(filename),"lum")
- local lumfile = resolvers.findfile(lumname,"map") or ""
- if lumfile ~= "" and lfs.isfile(lumfile) then
- if trace_loading or trace_mapping then
- report_fonts("loading map table %a",lumfile)
- end
- lumunic = dofile(lumfile)
- return lumunic, lumfile
- end
-end
-
-local hex = R("AF","09")
-local hexfour = (hex*hex*hex*hex) / function(s) return tonumber(s,16) end
-local hexsix = (hex*hex*hex*hex*hex*hex) / function(s) return tonumber(s,16) end
-local dec = (R("09")^1) / tonumber
-local period = P(".")
-local unicode = P("uni") * (hexfour * (period + P(-1)) * Cc(false) + Ct(hexfour^1) * Cc(true))
-local ucode = P("u") * (hexsix * (period + P(-1)) * Cc(false) + Ct(hexsix ^1) * Cc(true))
-local index = P("index") * dec * Cc(false)
-
-local parser = unicode + ucode + index
-
-local parsers = { }
-
-local function makenameparser(str)
- if not str or str == "" then
- return parser
- else
- local p = parsers[str]
- if not p then
- p = P(str) * period * dec * Cc(false)
- parsers[str] = p
- end
- return p
- end
-end
-
-local f_single = formatters["%04X"]
-local f_double = formatters["%04X%04X"]
-
-local function tounicode16(unicode,name)
- if unicode < 0x10000 then
- return f_single(unicode)
- elseif unicode < 0x1FFFFFFFFF then
- return f_double(floor(unicode/1024),unicode%1024+0xDC00)
- else
- report_fonts("can't convert %a in %a into tounicode",unicode,name)
- end
-end
-
-local function tounicode16sequence(unicodes,name)
- local t = { }
- for l=1,#unicodes do
- local u = unicodes[l]
- if u < 0x10000 then
- t[l] = f_single(u)
- elseif unicode < 0x1FFFFFFFFF then
- t[l] = f_double(floor(u/1024),u%1024+0xDC00)
- else
- report_fonts ("can't convert %a in %a into tounicode",u,name)
- return
- end
- end
- return concat(t)
-end
-
-local function tounicode(unicode,name)
- if type(unicode) == "table" then
- local t = { }
- for l=1,#unicode do
- local u = unicode[l]
- if u < 0x10000 then
- t[l] = f_single(u)
- elseif u < 0x1FFFFFFFFF then
- t[l] = f_double(floor(u/1024),u%1024+0xDC00)
- else
- report_fonts ("can't convert %a in %a into tounicode",u,name)
- return
- end
- end
- return concat(t)
- else
- if unicode < 0x10000 then
- return f_single(unicode)
- elseif unicode < 0x1FFFFFFFFF then
- return f_double(floor(unicode/1024),unicode%1024+0xDC00)
- else
- report_fonts("can't convert %a in %a into tounicode",unicode,name)
- end
- end
-end
-
-
-local function fromunicode16(str)
- if #str == 4 then
- return tonumber(str,16)
- else
- local l, r = match(str,"(....)(....)")
- return (tonumber(l,16))*0x400 + tonumber(r,16) - 0xDC00
- end
-end
-
--- Slightly slower:
---
--- local p = C(4) * (C(4)^-1) / function(l,r)
--- if r then
--- return (tonumber(l,16))*0x400 + tonumber(r,16) - 0xDC00
--- else
--- return tonumber(l,16)
--- end
--- end
---
--- local function fromunicode16(str)
--- return lpegmatch(p,str)
--- end
-
--- This is quite a bit faster but at the cost of some memory but if we
--- do this we will also use it elsewhere so let's not follow this route
--- now. I might use this method in the plain variant (no caching there)
--- but then I need a flag that distinguishes between code branches.
---
--- local cache = { }
---
--- function mappings.tounicode16(unicode)
--- local s = cache[unicode]
--- if not s then
--- if unicode < 0x10000 then
--- s = format("%04X",unicode)
--- else
--- s = format("%04X%04X",unicode/0x400+0xD800,unicode%0x400+0xDC00)
--- end
--- cache[unicode] = s
--- end
--- return s
--- end
-
-mappings.loadlumtable = loadlumtable
-mappings.makenameparser = makenameparser
-mappings.tounicode = tounicode
-mappings.tounicode16 = tounicode16
-mappings.tounicode16sequence = tounicode16sequence
-mappings.fromunicode16 = fromunicode16
-
-local ligseparator = P("_")
-local varseparator = P(".")
-local namesplitter = Ct(C((1 - ligseparator - varseparator)^1) * (ligseparator * C((1 - ligseparator - varseparator)^1))^0)
-
--- local function test(name)
--- local split = lpegmatch(namesplitter,name)
--- print(string.formatters["%s: [% t]"](name,split))
--- end
-
--- maybe: ff fi fl ffi ffl => f_f f_i f_l f_f_i f_f_l
-
--- test("i.f_")
--- test("this")
--- test("this.that")
--- test("japan1.123")
--- test("such_so_more")
--- test("such_so_more.that")
-
--- to be completed .. for fonts that use unicodes for ligatures which
--- is a actually a bad thing and should be avoided in the first place
-
-local overloads = allocate {
- IJ = { name = "I_J", unicode = { 0x49, 0x4A }, mess = 0x0132 },
- ij = { name = "i_j", unicode = { 0x69, 0x6A }, mess = 0x0133 },
- ff = { name = "f_f", unicode = { 0x66, 0x66 }, mess = 0xFB00 },
- fi = { name = "f_i", unicode = { 0x66, 0x69 }, mess = 0xFB01 },
- fl = { name = "f_l", unicode = { 0x66, 0x6C }, mess = 0xFB02 },
- ffi = { name = "f_f_i", unicode = { 0x66, 0x66, 0x69 }, mess = 0xFB03 },
- ffl = { name = "f_f_l", unicode = { 0x66, 0x66, 0x6C }, mess = 0xFB04 },
- fj = { name = "f_j", unicode = { 0x66, 0x6A } },
- fk = { name = "f_k", unicode = { 0x66, 0x6B } },
-}
-
-for k, v in next, overloads do
- local name = v.name
- local mess = v.mess
- if name then
- overloads[name] = v
- end
- if mess then
- overloads[mess] = v
- end
-end
-
-mappings.overloads = overloads
-
-function mappings.addtounicode(data,filename)
- local resources = data.resources
- local properties = data.properties
- local descriptions = data.descriptions
- local unicodes = resources.unicodes
- local lookuptypes = resources.lookuptypes
- if not unicodes then
- return
- end
- -- we need to move this code
- unicodes['space'] = unicodes['space'] or 32
- unicodes['hyphen'] = unicodes['hyphen'] or 45
- unicodes['zwj'] = unicodes['zwj'] or 0x200D
- unicodes['zwnj'] = unicodes['zwnj'] or 0x200C
- local private = fonts.constructors.privateoffset
- local unicodevector = fonts.encodings.agl.unicodes -- loaded runtime in context
- ----- namevector = fonts.encodings.agl.names -- loaded runtime in context
- local missing = { }
- local lumunic, uparser, oparser
- local cidinfo, cidnames, cidcodes, usedmap
- --
- cidinfo = properties.cidinfo
- usedmap = cidinfo and fonts.cid.getmap(cidinfo)
- --
- if usedmap then
- oparser = usedmap and makenameparser(cidinfo.ordering)
- cidnames = usedmap.names
- cidcodes = usedmap.unicodes
- end
- uparser = makenameparser()
- local ns, nl = 0, 0
- for unic, glyph in next, descriptions do
- local index = glyph.index
- local name = glyph.name
- local r = overloads[name]
- if r then
- -- get rid of weird ligatures
- -- glyph.name = r.name
- glyph.unicode = r.unicode
- elseif unic == -1 or unic >= private or (unic >= 0xE000 and unic <= 0xF8FF) or unic == 0xFFFE or unic == 0xFFFF then
- local unicode = lumunic and lumunic[name] or unicodevector[name]
- if unicode then
- glyph.unicode = unicode
- ns = ns + 1
- end
- -- cidmap heuristics, beware, there is no guarantee for a match unless
- -- the chain resolves
- if (not unicode) and usedmap then
- local foundindex = lpegmatch(oparser,name)
- if foundindex then
- unicode = cidcodes[foundindex] -- name to number
- if unicode then
- glyph.unicode = unicode
- ns = ns + 1
- else
- local reference = cidnames[foundindex] -- number to name
- if reference then
- local foundindex = lpegmatch(oparser,reference)
- if foundindex then
- unicode = cidcodes[foundindex]
- if unicode then
- glyph.unicode = unicode
- ns = ns + 1
- end
- end
- if not unicode or unicode == "" then
- local foundcodes, multiple = lpegmatch(uparser,reference)
- if foundcodes then
- glyph.unicode = foundcodes
- if multiple then
- nl = nl + 1
- unicode = true
- else
- ns = ns + 1
- unicode = foundcodes
- end
- end
- end
- end
- end
- end
- end
- -- a.whatever or a_b_c.whatever or a_b_c (no numbers) a.b_
- --
- -- It is not trivial to find a solution that suits all fonts. We tried several alternatives
- -- and this one seems to work reasonable also with fonts that use less standardized naming
- -- schemes. The extra private test is tested by KE and seems to work okay with non-typical
- -- fonts as well.
- --
- -- The next time I look into this, I'll add an extra analysis step to the otf loader (we can
- -- resolve some tounicodes by looking into the gsub data tables that are bound to glyphs.
- --
- if not unicode or unicode == "" then
- local split = lpegmatch(namesplitter,name)
- local nsplit = split and #split or 0
- local t, n = { }, 0
- unicode = true
- for l=1,nsplit do
- local base = split[l]
- local u = unicodes[base] or unicodevector[base]
- if not u then
- break
- elseif type(u) == "table" then
- if u[1] >= private then
- unicode = false
- break
- end
- n = n + 1
- t[n] = u[1]
- else
- if u >= private then
- unicode = false
- break
- end
- n = n + 1
- t[n] = u
- end
- end
- if n == 0 then -- done then
- -- nothing
- elseif n == 1 then
- glyph.unicode = t[1]
- else
- glyph.unicode = t
- end
- nl = nl + 1
- end
- -- last resort (we might need to catch private here as well)
- if not unicode or unicode == "" then
- local foundcodes, multiple = lpegmatch(uparser,name)
- if foundcodes then
- glyph.unicode = foundcodes
- if multiple then
- nl = nl + 1
- unicode = true
- else
- ns = ns + 1
- unicode = foundcodes
- end
- end
- end
- -- check using substitutes and alternates
- local r = overloads[unicode]
- if r then
- unicode = r.unicode
- glyph.unicode = unicode
- end
- --
- if not unicode then
- missing[name] = true
- end
- end
- end
- if next(missing) then
- local guess = { }
- -- helper
- local function check(gname,code,unicode)
- local description = descriptions[code]
- -- no need to add a self reference
- local variant = description.name
- if variant == gname then
- return
- end
- -- the variant already has a unicode (normally that resultrs in a default tounicode to self)
- local unic = unicodes[variant]
- if unic == -1 or unic >= private or (unic >= 0xE000 and unic <= 0xF8FF) or unic == 0xFFFE or unic == 0xFFFF then
- -- no default mapping and therefore maybe no tounicode yet
- else
- return
- end
- -- the variant already has a tounicode
- if descriptions[code].unicode then
- return
- end
- -- add to the list
- local g = guess[variant]
- -- local r = overloads[unicode]
- -- if r then
- -- unicode = r.unicode
- -- end
- if g then
- g[gname] = unicode
- else
- guess[variant] = { [gname] = unicode }
- end
- end
- --
- for unicode, description in next, descriptions do
- local slookups = description.slookups
- if slookups then
- local gname = description.name
- for tag, data in next, slookups do
- local lookuptype = lookuptypes[tag]
- if lookuptype == "alternate" then
- for i=1,#data do
- check(gname,data[i],unicode)
- end
- elseif lookuptype == "substitution" then
- check(gname,data,unicode)
- end
- end
- end
- local mlookups = description.mlookups
- if mlookups then
- local gname = description.name
- for tag, list in next, mlookups do
- local lookuptype = lookuptypes[tag]
- if lookuptype == "alternate" then
- for i=1,#list do
- local data = list[i]
- for i=1,#data do
- check(gname,data[i],unicode)
- end
- end
- elseif lookuptype == "substitution" then
- for i=1,#list do
- check(gname,list[i],unicode)
- end
- end
- end
- end
- end
- -- resolve references
- local done = true
- while done do
- done = false
- for k, v in next, guess do
- if type(v) ~= "number" then
- for kk, vv in next, v do
- if vv == -1 or vv >= private or (vv >= 0xE000 and vv <= 0xF8FF) or vv == 0xFFFE or vv == 0xFFFF then
- local uu = guess[kk]
- if type(uu) == "number" then
- guess[k] = uu
- done = true
- end
- else
- guess[k] = vv
- done = true
- end
- end
- end
- end
- end
- -- wrap up
- local orphans = 0
- local guessed = 0
- for k, v in next, guess do
- if type(v) == "number" then
- descriptions[unicodes[k]].unicode = descriptions[v].unicode or v -- can also be a table
- guessed = guessed + 1
- else
- local t = nil
- local l = lower(k)
- local u = unicodes[l]
- if not u then
- orphans = orphans + 1
- elseif u == -1 or u >= private or (u >= 0xE000 and u <= 0xF8FF) or u == 0xFFFE or u == 0xFFFF then
- local unicode = descriptions[u].unicode
- if unicode then
- descriptions[unicodes[k]].unicode = unicode
- guessed = guessed + 1
- else
- orphans = orphans + 1
- end
- else
- orphans = orphans + 1
- end
- end
- end
- if trace_loading and orphans > 0 or guessed > 0 then
- report_fonts("%s glyphs with no related unicode, %s guessed, %s orphans",guessed+orphans,guessed,orphans)
- end
- end
- if trace_mapping then
- for unic, glyph in table.sortedhash(descriptions) do
- local name = glyph.name
- local index = glyph.index
- local unicode = glyph.unicode
- if unicode then
- if type(unicode) == "table" then
- local unicodes = { }
- for i=1,#unicode do
- unicodes[i] = formatters("%U",unicode[i])
- end
- report_fonts("internal slot %U, name %a, unicode %U, tounicode % t",index,name,unic,unicodes)
- else
- report_fonts("internal slot %U, name %a, unicode %U, tounicode %U",index,name,unic,unicode)
- end
- else
- report_fonts("internal slot %U, name %a, unicode %U",index,name,unic)
- end
- end
- end
- if trace_loading and (ns > 0 or nl > 0) then
- report_fonts("%s tounicode entries added, ligatures %s",nl+ns,ns)
- end
-end
-
--- local parser = makenameparser("Japan1")
--- local parser = makenameparser()
--- local function test(str)
--- local b, a = lpegmatch(parser,str)
--- print((a and table.serialize(b)) or b)
--- end
--- test("a.sc")
--- test("a")
--- test("uni1234")
--- test("uni1234.xx")
--- test("uni12349876")
--- test("u123400987600")
--- test("index1234")
--- test("Japan1.123")
diff --git a/Master/texmf-dist/tex/context/base/font-mis.lua b/Master/texmf-dist/tex/context/base/font-mis.lua
deleted file mode 100644
index 0ec95ee1b56..00000000000
--- a/Master/texmf-dist/tex/context/base/font-mis.lua
+++ /dev/null
@@ -1,117 +0,0 @@
-if not modules then modules = { } end modules ['font-mis'] = {
- version = 1.001,
- comment = "companion to mtx-fonts",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local next = next
-local lower, strip = string.lower, string.strip
-
--- also used in other scripts so we need to check some tables:
-
-fonts = fonts or { }
-
-fonts.helpers = fonts.helpers or { }
-local helpers = fonts.helpers
-
-fonts.handlers = fonts.handlers or { }
-local handlers = fonts.handlers
-
-handlers.otf = handlers.otf or { }
-local otf = handlers.otf
-
-otf.version = otf.version or 2.803
-otf.cache = otf.cache or containers.define("fonts", "otf", otf.version, true)
-
-local fontloader = fontloader
-local font_to_table = fontloader.to_table
-local open_font = fontloader.open
-local get_font_info = fontloader.info
-local close_font = fontloader.close
-
-function otf.loadcached(filename,format,sub)
- -- no recache when version mismatch
- local name = file.basename(file.removesuffix(filename))
- if sub == "" then sub = false end
- local hash = name
- if sub then
- hash = hash .. "-" .. sub
- end
- hash = containers.cleanname(hash)
- local data = containers.read(otf.cache, hash)
- if data and not data.verbose then
- otf.enhancers.unpack(data)
- return data
- else
- return nil
- end
-end
-
-local featuregroups = { "gsub", "gpos" }
-
-function fonts.helpers.getfeatures(name,t,script,language) -- maybe per font type
- local t = lower(t or (name and file.suffix(name)) or "")
- if t == "otf" or t == "ttf" or t == "ttc" or t == "dfont" then
- local filename = resolvers.findfile(name,t) or ""
- if filename ~= "" then
- local data = otf.loadcached(filename)
- if data and data.resources and data.resources.features then
- return data.resources.features
- else
- local ff = open_font(filename)
- if ff then
- local data = font_to_table(ff)
- close_font(ff)
- local features = { }
- for k=1,#featuregroups do
- local what = featuregroups[k]
- local dw = data[what]
- if dw then
- local f = { }
- features[what] = f
- for i=1,#dw do
- local d = dw[i]
- local dfeatures = d.features
- if dfeatures then
- for i=1,#dfeatures do
- local df = dfeatures[i]
- local tag = strip(lower(df.tag))
- local ft = f[tag] if not ft then ft = {} f[tag] = ft end
- local dfscripts = df.scripts
- for i=1,#dfscripts do
- local ds = dfscripts[i]
- local scri = strip(lower(ds.script))
- local fts = ft[scri] if not fts then fts = {} ft[scri] = fts end
- local dslangs = ds.langs
- for i=1,#dslangs do
- local lang = dslangs[i]
- lang = strip(lower(lang))
- if scri == script then
- if lang == language then
- fts[lang] = 'sl'
- else
- fts[lang] = 's'
- end
- else
- if lang == language then
- fts[lang] = 'l'
- else
- fts[lang] = true
- end
- end
- end
- end
- end
- end
- end
- end
- end
- return features
- end
- end
- end
- end
- return nil, nil
-end
diff --git a/Master/texmf-dist/tex/context/base/font-otc.lua b/Master/texmf-dist/tex/context/base/font-otc.lua
deleted file mode 100644
index f7f8e9ce2c1..00000000000
--- a/Master/texmf-dist/tex/context/base/font-otc.lua
+++ /dev/null
@@ -1,349 +0,0 @@
-if not modules then modules = { } end modules ['font-otc'] = {
- version = 1.001,
- comment = "companion to font-otf.lua (context)",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local format, insert = string.format, table.insert
-local type, next = type, next
-local lpegmatch = lpeg.match
-
--- we assume that the other otf stuff is loaded already
-
-local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end)
-local report_otf = logs.reporter("fonts","otf loading")
-
-local fonts = fonts
-local otf = fonts.handlers.otf
-local registerotffeature = otf.features.register
-local setmetatableindex = table.setmetatableindex
-
--- In the userdata interface we can not longer tweak the loaded font as
--- conveniently as before. For instance, instead of pushing extra data in
--- in the table using the original structure, we now have to operate on
--- the mkiv representation. And as the fontloader interface is modelled
--- after fontforge we cannot change that one too much either.
-
-local types = {
- substitution = "gsub_single",
- ligature = "gsub_ligature",
- alternate = "gsub_alternate",
-}
-
-setmetatableindex(types, function(t,k) t[k] = k return k end) -- "key"
-
-local everywhere = { ["*"] = { ["*"] = true } } -- or: { ["*"] = { "*" } }
-local noflags = { }
-
-local function addfeature(data,feature,specifications)
- local descriptions = data.descriptions
- local resources = data.resources
- local lookups = resources.lookups
- local gsubfeatures = resources.features.gsub
- if gsubfeatures and gsubfeatures[feature] then
- -- already present
- else
- local sequences = resources.sequences
- local fontfeatures = resources.features
- local unicodes = resources.unicodes
- local lookuptypes = resources.lookuptypes
- local splitter = lpeg.splitter(" ",unicodes)
- local done = 0
- local skip = 0
- if not specifications[1] then
- -- so we accept a one entry specification
- specifications = { specifications }
- end
- -- subtables are tables themselves but we also accept flattened singular subtables
- for s=1,#specifications do
- local specification = specifications[s]
- local valid = specification.valid
- if not valid or valid(data,specification,feature) then
- local initialize = specification.initialize
- if initialize then
- -- when false is returned we initialize only once
- specification.initialize = initialize(specification) and initialize or nil
- end
- local askedfeatures = specification.features or everywhere
- local subtables = specification.subtables or { specification.data } or { }
- local featuretype = types[specification.type or "substitution"]
- local featureflags = specification.flags or noflags
- local featureorder = specification.order or { feature }
- local added = false
- local featurename = format("ctx_%s_%s",feature,s)
- local st = { }
- for t=1,#subtables do
- local list = subtables[t]
- local full = format("%s_%s",featurename,t)
- st[t] = full
- if featuretype == "gsub_ligature" then
- lookuptypes[full] = "ligature"
- for code, ligature in next, list do
- local unicode = tonumber(code) or unicodes[code]
- local description = descriptions[unicode]
- if description then
- local slookups = description.slookups
- if type(ligature) == "string" then
- ligature = { lpegmatch(splitter,ligature) }
- end
- local present = true
- for i=1,#ligature do
- if not descriptions[ligature[i]] then
- present = false
- break
- end
- end
- if present then
- if slookups then
- slookups[full] = ligature
- else
- description.slookups = { [full] = ligature }
- end
- done, added = done + 1, true
- else
- skip = skip + 1
- end
- end
- end
- elseif featuretype == "gsub_single" then
- lookuptypes[full] = "substitution"
- for code, replacement in next, list do
- local unicode = tonumber(code) or unicodes[code]
- local description = descriptions[unicode]
- if description then
- local slookups = description.slookups
- replacement = tonumber(replacement) or unicodes[replacement]
- if descriptions[replacement] then
- if slookups then
- slookups[full] = replacement
- else
- description.slookups = { [full] = replacement }
- end
- done, added = done + 1, true
- end
- end
- end
- end
- end
- if added then
- -- script = { lang1, lang2, lang3 } or script = { lang1 = true, ... }
- for k, v in next, askedfeatures do
- if v[1] then
- askedfeatures[k] = table.tohash(v)
- end
- end
- local sequence = {
- chain = 0,
- features = { [feature] = askedfeatures },
- flags = featureflags,
- name = featurename,
- order = featureorder,
- subtables = st,
- type = featuretype,
- }
- if specification.prepend then
- insert(sequences,1,sequence)
- else
- insert(sequences,sequence)
- end
- -- register in metadata (merge as there can be a few)
- if not gsubfeatures then
- gsubfeatures = { }
- fontfeatures.gsub = gsubfeatures
- end
- local k = gsubfeatures[feature]
- if not k then
- k = { }
- gsubfeatures[feature] = k
- end
- for script, languages in next, askedfeatures do
- local kk = k[script]
- if not kk then
- kk = { }
- k[script] = kk
- end
- for language, value in next, languages do
- kk[language] = value
- end
- end
- end
- end
- end
- if trace_loading then
- report_otf("registering feature %a, affected glyphs %a, skipped glyphs %a",feature,done,skip)
- end
- end
-end
-
-otf.enhancers.addfeature = addfeature
-
-local extrafeatures = { }
-
-function otf.addfeature(name,specification)
- extrafeatures[name] = specification
-end
-
-local function enhance(data,filename,raw)
- for feature, specification in next, extrafeatures do
- addfeature(data,feature,specification)
- end
-end
-
-otf.enhancers.register("check extra features",enhance)
-
--- tlig --
-
-local tlig = { -- we need numbers for some fonts so ...
- -- endash = "hyphen hyphen",
- -- emdash = "hyphen hyphen hyphen",
- [0x2013] = { 0x002D, 0x002D },
- [0x2014] = { 0x002D, 0x002D, 0x002D },
- -- quotedblleft = "quoteleft quoteleft",
- -- quotedblright = "quoteright quoteright",
- -- quotedblleft = "grave grave",
- -- quotedblright = "quotesingle quotesingle",
- -- quotedblbase = "comma comma",
-}
-
-local tlig_specification = {
- type = "ligature",
- features = everywhere,
- data = tlig,
- order = { "tlig" },
- flags = noflags,
- prepend = true,
-}
-
-otf.addfeature("tlig",tlig_specification)
-
-registerotffeature {
- name = 'tlig',
- description = 'tex ligatures',
-}
-
--- trep
-
-local trep = {
- -- [0x0022] = 0x201D,
- [0x0027] = 0x2019,
- -- [0x0060] = 0x2018,
-}
-
-local trep_specification = {
- type = "substitution",
- features = everywhere,
- data = trep,
- order = { "trep" },
- flags = noflags,
- prepend = true,
-}
-
-otf.addfeature("trep",trep_specification)
-
-registerotffeature {
- name = 'trep',
- description = 'tex replacements',
-}
-
--- tcom
-
-if characters.combined then
-
- local tcom = { }
-
- local function initialize()
- characters.initialize()
- for first, seconds in next, characters.combined do
- for second, combination in next, seconds do
- tcom[combination] = { first, second }
- end
- end
- -- return false
- end
-
- local tcom_specification = {
- type = "ligature",
- features = everywhere,
- data = tcom,
- order = { "tcom" },
- flags = noflags,
- initialize = initialize,
- }
-
- otf.addfeature("tcom",tcom_specification)
-
- registerotffeature {
- name = 'tcom',
- description = 'tex combinations',
- }
-
-end
-
--- anum
-
-local anum_arabic = {
- [0x0030] = 0x0660,
- [0x0031] = 0x0661,
- [0x0032] = 0x0662,
- [0x0033] = 0x0663,
- [0x0034] = 0x0664,
- [0x0035] = 0x0665,
- [0x0036] = 0x0666,
- [0x0037] = 0x0667,
- [0x0038] = 0x0668,
- [0x0039] = 0x0669,
-}
-
-local anum_persian = {
- [0x0030] = 0x06F0,
- [0x0031] = 0x06F1,
- [0x0032] = 0x06F2,
- [0x0033] = 0x06F3,
- [0x0034] = 0x06F4,
- [0x0035] = 0x06F5,
- [0x0036] = 0x06F6,
- [0x0037] = 0x06F7,
- [0x0038] = 0x06F8,
- [0x0039] = 0x06F9,
-}
-
-local function valid(data)
- local features = data.resources.features
- if features then
- for k, v in next, features do
- for k, v in next, v do
- if v.arab then
- return true
- end
- end
- end
- end
-end
-
-local anum_specification = {
- {
- type = "substitution",
- features = { arab = { urd = true, dflt = true } },
- order = { "anum" },
- data = anum_arabic,
- flags = noflags, -- { },
- valid = valid,
- },
- {
- type = "substitution",
- features = { arab = { urd = true } },
- order = { "anum" },
- data = anum_persian,
- flags = noflags, -- { },
- valid = valid,
- },
-}
-
-otf.addfeature("anum",anum_specification) -- todo: only when there is already an arab script feature
-
-registerotffeature {
- name = 'anum',
- description = 'arabic digits',
-}
diff --git a/Master/texmf-dist/tex/context/base/font-oth.lua b/Master/texmf-dist/tex/context/base/font-oth.lua
deleted file mode 100644
index 59dca31d918..00000000000
--- a/Master/texmf-dist/tex/context/base/font-oth.lua
+++ /dev/null
@@ -1,51 +0,0 @@
-if not modules then modules = { } end modules ['font-oth'] = {
- version = 1.001,
- comment = "companion to font-oth.lua (helpers)",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local fonts = fonts
-local otf = fonts.handlers.otf
-
--- todo: use nodemode data is available
-
-function otf.getalternate(tfmdata,k,kind,value) -- just initialize nodemode and use that (larger mem print)
- if value then
- local description = tfmdata.descriptions[k]
- if description then
- local slookups = description.slookups -- we assume only slookups (we can always extend)
- if slookups then
- local shared = tfmdata.shared
- local rawdata = shared and shared.rawdata
- if rawdata then
- local lookuptypes = rawdata.resources.lookuptypes
- if lookuptypes then
- local properties = tfmdata.properties
- -- we could cache these
- local validlookups, lookuplist = otf.collectlookups(rawdata,kind,properties.script,properties.language)
- if validlookups then
- local choice = tonumber(value) or 1 -- no random here (yet)
- for l=1,#lookuplist do
- local lookup = lookuplist[l]
- local found = slookups[lookup]
- if found then
- local lookuptype = lookuptypes[lookup]
- if lookuptype == "substitution" then
- return found
- elseif lookuptype == "alternate" then
- return found[choice] or found[#found]
- else
- -- ignore
- end
- end
- end
- end
- end
- end
- end
- end
- end
- return k
-end
diff --git a/Master/texmf-dist/tex/context/base/font-oti.lua b/Master/texmf-dist/tex/context/base/font-oti.lua
deleted file mode 100644
index 06c2a42fac2..00000000000
--- a/Master/texmf-dist/tex/context/base/font-oti.lua
+++ /dev/null
@@ -1,91 +0,0 @@
-if not modules then modules = { } end modules ['font-oti'] = {
- version = 1.001,
- comment = "companion to font-ini.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local lower = string.lower
-
-local fonts = fonts
-local constructors = fonts.constructors
-
-local otf = constructors.newhandler("otf")
-local otffeatures = constructors.newfeatures("otf")
-local otftables = otf.tables
-local registerotffeature = otffeatures.register
-
-local allocate = utilities.storage.allocate
-
-registerotffeature {
- name = "features",
- description = "initialization of feature handler",
- default = true,
-}
-
--- these are later hooked into node and base initializaters
-
-local function setmode(tfmdata,value)
- if value then
- tfmdata.properties.mode = lower(value)
- end
-end
-
-local function setlanguage(tfmdata,value)
- if value then
- local cleanvalue = lower(value)
- local languages = otftables and otftables.languages
- local properties = tfmdata.properties
- if not languages then
- properties.language = cleanvalue
- elseif languages[value] then
- properties.language = cleanvalue
- else
- properties.language = "dflt"
- end
- end
-end
-
-local function setscript(tfmdata,value)
- if value then
- local cleanvalue = lower(value)
- local scripts = otftables and otftables.scripts
- local properties = tfmdata.properties
- if not scripts then
- properties.script = cleanvalue
- elseif scripts[value] then
- properties.script = cleanvalue
- else
- properties.script = "dflt"
- end
- end
-end
-
-registerotffeature {
- name = "mode",
- description = "mode",
- initializers = {
- base = setmode,
- node = setmode,
- }
-}
-
-registerotffeature {
- name = "language",
- description = "language",
- initializers = {
- base = setlanguage,
- node = setlanguage,
- }
-}
-
-registerotffeature {
- name = "script",
- description = "script",
- initializers = {
- base = setscript,
- node = setscript,
- }
-}
-
diff --git a/Master/texmf-dist/tex/context/base/font-ott.lua b/Master/texmf-dist/tex/context/base/font-ott.lua
deleted file mode 100644
index 1f9a1ac041a..00000000000
--- a/Master/texmf-dist/tex/context/base/font-ott.lua
+++ /dev/null
@@ -1,1119 +0,0 @@
-if not modules then modules = { } end modules ['font-ott'] = {
- version = 1.001,
- comment = "companion to font-otf.lua (tables)",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files",
- -- dataonly = true,
-}
-
-local type, next, tonumber, tostring, rawget, rawset = type, next, tonumber, tostring, rawget, rawset
-local gsub, lower, format, match = string.gsub, string.lower, string.format, string.match
-local is_boolean = string.is_boolean
-
-local setmetatableindex = table.setmetatableindex
-local setmetatablenewindex = table.setmetatablenewindex
-local allocate = utilities.storage.allocate
-
-local fonts = fonts
-local otf = fonts.handlers.otf
-local otffeatures = otf.features
-local registerotffeature = otffeatures.register
-
-local tables = otf.tables or { }
-otf.tables = tables
-
-local statistics = otf.statistics or { }
-otf.statistics = statistics
-
-local scripts = allocate {
- ['arab'] = 'arabic',
- ['armn'] = 'armenian',
- ['bali'] = 'balinese',
- ['beng'] = 'bengali',
- ['bopo'] = 'bopomofo',
- ['brai'] = 'braille',
- ['bugi'] = 'buginese',
- ['buhd'] = 'buhid',
- ['byzm'] = 'byzantine music',
- ['cans'] = 'canadian syllabics',
- ['cher'] = 'cherokee',
- ['copt'] = 'coptic',
- ['cprt'] = 'cypriot syllabary',
- ['cyrl'] = 'cyrillic',
- ['deva'] = 'devanagari',
- ['dev2'] = 'devanagari variant 2',
- ['dsrt'] = 'deseret',
- ['ethi'] = 'ethiopic',
- ['geor'] = 'georgian',
- ['glag'] = 'glagolitic',
- ['goth'] = 'gothic',
- ['grek'] = 'greek',
- ['gujr'] = 'gujarati',
- ['guru'] = 'gurmukhi',
- ['hang'] = 'hangul',
- ['hani'] = 'cjk ideographic',
- ['hano'] = 'hanunoo',
- ['hebr'] = 'hebrew',
- ['ital'] = 'old italic',
- ['jamo'] = 'hangul jamo',
- ['java'] = 'javanese',
- ['kana'] = 'hiragana and katakana',
- ['khar'] = 'kharosthi',
- ['khmr'] = 'khmer',
- ['knda'] = 'kannada',
- ['lao' ] = 'lao',
- ['latn'] = 'latin',
- ['limb'] = 'limbu',
- ['linb'] = 'linear b',
- ['math'] = 'mathematical alphanumeric symbols',
- ['mlym'] = 'malayalam',
- ['mlm2'] = 'malayalam variant 2',
- ['mong'] = 'mongolian',
- ['musc'] = 'musical symbols',
- ['mymr'] = 'myanmar',
- ['nko' ] = "n'ko",
- ['ogam'] = 'ogham',
- ['orya'] = 'oriya',
- ['osma'] = 'osmanya',
- ['phag'] = 'phags-pa',
- ['phnx'] = 'phoenician',
- ['runr'] = 'runic',
- ['shaw'] = 'shavian',
- ['sinh'] = 'sinhala',
- ['sylo'] = 'syloti nagri',
- ['syrc'] = 'syriac',
- ['tagb'] = 'tagbanwa',
- ['tale'] = 'tai le',
- ['talu'] = 'tai lu',
- ['taml'] = 'tamil',
- ['telu'] = 'telugu',
- ['tfng'] = 'tifinagh',
- ['tglg'] = 'tagalog',
- ['thaa'] = 'thaana',
- ['thai'] = 'thai',
- ['tibt'] = 'tibetan',
- ['ugar'] = 'ugaritic cuneiform',
- ['xpeo'] = 'old persian cuneiform',
- ['xsux'] = 'sumero-akkadian cuneiform',
- ['yi' ] = 'yi',
-}
-
-local languages = allocate {
- ['aba'] = 'abaza',
- ['abk'] = 'abkhazian',
- ['ady'] = 'adyghe',
- ['afk'] = 'afrikaans',
- ['afr'] = 'afar',
- ['agw'] = 'agaw',
- ['als'] = 'alsatian',
- ['alt'] = 'altai',
- ['amh'] = 'amharic',
- ['ara'] = 'arabic',
- ['ari'] = 'aari',
- ['ark'] = 'arakanese',
- ['asm'] = 'assamese',
- ['ath'] = 'athapaskan',
- ['avr'] = 'avar',
- ['awa'] = 'awadhi',
- ['aym'] = 'aymara',
- ['aze'] = 'azeri',
- ['bad'] = 'badaga',
- ['bag'] = 'baghelkhandi',
- ['bal'] = 'balkar',
- ['bau'] = 'baule',
- ['bbr'] = 'berber',
- ['bch'] = 'bench',
- ['bcr'] = 'bible cree',
- ['bel'] = 'belarussian',
- ['bem'] = 'bemba',
- ['ben'] = 'bengali',
- ['bgr'] = 'bulgarian',
- ['bhi'] = 'bhili',
- ['bho'] = 'bhojpuri',
- ['bik'] = 'bikol',
- ['bil'] = 'bilen',
- ['bkf'] = 'blackfoot',
- ['bli'] = 'balochi',
- ['bln'] = 'balante',
- ['blt'] = 'balti',
- ['bmb'] = 'bambara',
- ['bml'] = 'bamileke',
- ['bos'] = 'bosnian',
- ['bre'] = 'breton',
- ['brh'] = 'brahui',
- ['bri'] = 'braj bhasha',
- ['brm'] = 'burmese',
- ['bsh'] = 'bashkir',
- ['bti'] = 'beti',
- ['cat'] = 'catalan',
- ['ceb'] = 'cebuano',
- ['che'] = 'chechen',
- ['chg'] = 'chaha gurage',
- ['chh'] = 'chattisgarhi',
- ['chi'] = 'chichewa',
- ['chk'] = 'chukchi',
- ['chp'] = 'chipewyan',
- ['chr'] = 'cherokee',
- ['chu'] = 'chuvash',
- ['cmr'] = 'comorian',
- ['cop'] = 'coptic',
- ['cos'] = 'corsican',
- ['cre'] = 'cree',
- ['crr'] = 'carrier',
- ['crt'] = 'crimean tatar',
- ['csl'] = 'church slavonic',
- ['csy'] = 'czech',
- ['dan'] = 'danish',
- ['dar'] = 'dargwa',
- ['dcr'] = 'woods cree',
- ['deu'] = 'german',
- ['dgr'] = 'dogri',
- ['div'] = 'divehi',
- ['djr'] = 'djerma',
- ['dng'] = 'dangme',
- ['dnk'] = 'dinka',
- ['dri'] = 'dari',
- ['dun'] = 'dungan',
- ['dzn'] = 'dzongkha',
- ['ebi'] = 'ebira',
- ['ecr'] = 'eastern cree',
- ['edo'] = 'edo',
- ['efi'] = 'efik',
- ['ell'] = 'greek',
- ['eng'] = 'english',
- ['erz'] = 'erzya',
- ['esp'] = 'spanish',
- ['eti'] = 'estonian',
- ['euq'] = 'basque',
- ['evk'] = 'evenki',
- ['evn'] = 'even',
- ['ewe'] = 'ewe',
- ['fan'] = 'french antillean',
- ['far'] = 'farsi',
- ['fin'] = 'finnish',
- ['fji'] = 'fijian',
- ['fle'] = 'flemish',
- ['fne'] = 'forest nenets',
- ['fon'] = 'fon',
- ['fos'] = 'faroese',
- ['fra'] = 'french',
- ['fri'] = 'frisian',
- ['frl'] = 'friulian',
- ['fta'] = 'futa',
- ['ful'] = 'fulani',
- ['gad'] = 'ga',
- ['gae'] = 'gaelic',
- ['gag'] = 'gagauz',
- ['gal'] = 'galician',
- ['gar'] = 'garshuni',
- ['gaw'] = 'garhwali',
- ['gez'] = "ge'ez",
- ['gil'] = 'gilyak',
- ['gmz'] = 'gumuz',
- ['gon'] = 'gondi',
- ['grn'] = 'greenlandic',
- ['gro'] = 'garo',
- ['gua'] = 'guarani',
- ['guj'] = 'gujarati',
- ['hai'] = 'haitian',
- ['hal'] = 'halam',
- ['har'] = 'harauti',
- ['hau'] = 'hausa',
- ['haw'] = 'hawaiin',
- ['hbn'] = 'hammer-banna',
- ['hil'] = 'hiligaynon',
- ['hin'] = 'hindi',
- ['hma'] = 'high mari',
- ['hnd'] = 'hindko',
- ['ho'] = 'ho',
- ['hri'] = 'harari',
- ['hrv'] = 'croatian',
- ['hun'] = 'hungarian',
- ['hye'] = 'armenian',
- ['ibo'] = 'igbo',
- ['ijo'] = 'ijo',
- ['ilo'] = 'ilokano',
- ['ind'] = 'indonesian',
- ['ing'] = 'ingush',
- ['inu'] = 'inuktitut',
- ['iri'] = 'irish',
- ['irt'] = 'irish traditional',
- ['isl'] = 'icelandic',
- ['ism'] = 'inari sami',
- ['ita'] = 'italian',
- ['iwr'] = 'hebrew',
- ['jan'] = 'japanese',
- ['jav'] = 'javanese',
- ['jii'] = 'yiddish',
- ['jud'] = 'judezmo',
- ['jul'] = 'jula',
- ['kab'] = 'kabardian',
- ['kac'] = 'kachchi',
- ['kal'] = 'kalenjin',
- ['kan'] = 'kannada',
- ['kar'] = 'karachay',
- ['kat'] = 'georgian',
- ['kaz'] = 'kazakh',
- ['keb'] = 'kebena',
- ['kge'] = 'khutsuri georgian',
- ['kha'] = 'khakass',
- ['khk'] = 'khanty-kazim',
- ['khm'] = 'khmer',
- ['khs'] = 'khanty-shurishkar',
- ['khv'] = 'khanty-vakhi',
- ['khw'] = 'khowar',
- ['kik'] = 'kikuyu',
- ['kir'] = 'kirghiz',
- ['kis'] = 'kisii',
- ['kkn'] = 'kokni',
- ['klm'] = 'kalmyk',
- ['kmb'] = 'kamba',
- ['kmn'] = 'kumaoni',
- ['kmo'] = 'komo',
- ['kms'] = 'komso',
- ['knr'] = 'kanuri',
- ['kod'] = 'kodagu',
- ['koh'] = 'korean old hangul',
- ['kok'] = 'konkani',
- ['kon'] = 'kikongo',
- ['kop'] = 'komi-permyak',
- ['kor'] = 'korean',
- ['koz'] = 'komi-zyrian',
- ['kpl'] = 'kpelle',
- ['kri'] = 'krio',
- ['krk'] = 'karakalpak',
- ['krl'] = 'karelian',
- ['krm'] = 'karaim',
- ['krn'] = 'karen',
- ['krt'] = 'koorete',
- ['ksh'] = 'kashmiri',
- ['ksi'] = 'khasi',
- ['ksm'] = 'kildin sami',
- ['kui'] = 'kui',
- ['kul'] = 'kulvi',
- ['kum'] = 'kumyk',
- ['kur'] = 'kurdish',
- ['kuu'] = 'kurukh',
- ['kuy'] = 'kuy',
- ['kyk'] = 'koryak',
- ['lad'] = 'ladin',
- ['lah'] = 'lahuli',
- ['lak'] = 'lak',
- ['lam'] = 'lambani',
- ['lao'] = 'lao',
- ['lat'] = 'latin',
- ['laz'] = 'laz',
- ['lcr'] = 'l-cree',
- ['ldk'] = 'ladakhi',
- ['lez'] = 'lezgi',
- ['lin'] = 'lingala',
- ['lma'] = 'low mari',
- ['lmb'] = 'limbu',
- ['lmw'] = 'lomwe',
- ['lsb'] = 'lower sorbian',
- ['lsm'] = 'lule sami',
- ['lth'] = 'lithuanian',
- ['ltz'] = 'luxembourgish',
- ['lub'] = 'luba',
- ['lug'] = 'luganda',
- ['luh'] = 'luhya',
- ['luo'] = 'luo',
- ['lvi'] = 'latvian',
- ['maj'] = 'majang',
- ['mak'] = 'makua',
- ['mal'] = 'malayalam traditional',
- ['man'] = 'mansi',
- ['map'] = 'mapudungun',
- ['mar'] = 'marathi',
- ['maw'] = 'marwari',
- ['mbn'] = 'mbundu',
- ['mch'] = 'manchu',
- ['mcr'] = 'moose cree',
- ['mde'] = 'mende',
- ['men'] = "me'en",
- ['miz'] = 'mizo',
- ['mkd'] = 'macedonian',
- ['mle'] = 'male',
- ['mlg'] = 'malagasy',
- ['mln'] = 'malinke',
- ['mlr'] = 'malayalam reformed',
- ['mly'] = 'malay',
- ['mnd'] = 'mandinka',
- ['mng'] = 'mongolian',
- ['mni'] = 'manipuri',
- ['mnk'] = 'maninka',
- ['mnx'] = 'manx gaelic',
- ['moh'] = 'mohawk',
- ['mok'] = 'moksha',
- ['mol'] = 'moldavian',
- ['mon'] = 'mon',
- ['mor'] = 'moroccan',
- ['mri'] = 'maori',
- ['mth'] = 'maithili',
- ['mts'] = 'maltese',
- ['mun'] = 'mundari',
- ['nag'] = 'naga-assamese',
- ['nan'] = 'nanai',
- ['nas'] = 'naskapi',
- ['ncr'] = 'n-cree',
- ['ndb'] = 'ndebele',
- ['ndg'] = 'ndonga',
- ['nep'] = 'nepali',
- ['new'] = 'newari',
- ['ngr'] = 'nagari',
- ['nhc'] = 'norway house cree',
- ['nis'] = 'nisi',
- ['niu'] = 'niuean',
- ['nkl'] = 'nkole',
- ['nko'] = "n'ko",
- ['nld'] = 'dutch',
- ['nog'] = 'nogai',
- ['nor'] = 'norwegian',
- ['nsm'] = 'northern sami',
- ['nta'] = 'northern tai',
- ['nto'] = 'esperanto',
- ['nyn'] = 'nynorsk',
- ['oci'] = 'occitan',
- ['ocr'] = 'oji-cree',
- ['ojb'] = 'ojibway',
- ['ori'] = 'oriya',
- ['oro'] = 'oromo',
- ['oss'] = 'ossetian',
- ['paa'] = 'palestinian aramaic',
- ['pal'] = 'pali',
- ['pan'] = 'punjabi',
- ['pap'] = 'palpa',
- ['pas'] = 'pashto',
- ['pgr'] = 'polytonic greek',
- ['pil'] = 'pilipino',
- ['plg'] = 'palaung',
- ['plk'] = 'polish',
- ['pro'] = 'provencal',
- ['ptg'] = 'portuguese',
- ['qin'] = 'chin',
- ['raj'] = 'rajasthani',
- ['rbu'] = 'russian buriat',
- ['rcr'] = 'r-cree',
- ['ria'] = 'riang',
- ['rms'] = 'rhaeto-romanic',
- ['rom'] = 'romanian',
- ['roy'] = 'romany',
- ['rsy'] = 'rusyn',
- ['rua'] = 'ruanda',
- ['rus'] = 'russian',
- ['sad'] = 'sadri',
- ['san'] = 'sanskrit',
- ['sat'] = 'santali',
- ['say'] = 'sayisi',
- ['sek'] = 'sekota',
- ['sel'] = 'selkup',
- ['sgo'] = 'sango',
- ['shn'] = 'shan',
- ['sib'] = 'sibe',
- ['sid'] = 'sidamo',
- ['sig'] = 'silte gurage',
- ['sks'] = 'skolt sami',
- ['sky'] = 'slovak',
- ['sla'] = 'slavey',
- ['slv'] = 'slovenian',
- ['sml'] = 'somali',
- ['smo'] = 'samoan',
- ['sna'] = 'sena',
- ['snd'] = 'sindhi',
- ['snh'] = 'sinhalese',
- ['snk'] = 'soninke',
- ['sog'] = 'sodo gurage',
- ['sot'] = 'sotho',
- ['sqi'] = 'albanian',
- ['srb'] = 'serbian',
- ['srk'] = 'saraiki',
- ['srr'] = 'serer',
- ['ssl'] = 'south slavey',
- ['ssm'] = 'southern sami',
- ['sur'] = 'suri',
- ['sva'] = 'svan',
- ['sve'] = 'swedish',
- ['swa'] = 'swadaya aramaic',
- ['swk'] = 'swahili',
- ['swz'] = 'swazi',
- ['sxt'] = 'sutu',
- ['syr'] = 'syriac',
- ['tab'] = 'tabasaran',
- ['taj'] = 'tajiki',
- ['tam'] = 'tamil',
- ['tat'] = 'tatar',
- ['tcr'] = 'th-cree',
- ['tel'] = 'telugu',
- ['tgn'] = 'tongan',
- ['tgr'] = 'tigre',
- ['tgy'] = 'tigrinya',
- ['tha'] = 'thai',
- ['tht'] = 'tahitian',
- ['tib'] = 'tibetan',
- ['tkm'] = 'turkmen',
- ['tmn'] = 'temne',
- ['tna'] = 'tswana',
- ['tne'] = 'tundra nenets',
- ['tng'] = 'tonga',
- ['tod'] = 'todo',
- ['trk'] = 'turkish',
- ['tsg'] = 'tsonga',
- ['tua'] = 'turoyo aramaic',
- ['tul'] = 'tulu',
- ['tuv'] = 'tuvin',
- ['twi'] = 'twi',
- ['udm'] = 'udmurt',
- ['ukr'] = 'ukrainian',
- ['urd'] = 'urdu',
- ['usb'] = 'upper sorbian',
- ['uyg'] = 'uyghur',
- ['uzb'] = 'uzbek',
- ['ven'] = 'venda',
- ['vit'] = 'vietnamese',
- ['wa' ] = 'wa',
- ['wag'] = 'wagdi',
- ['wcr'] = 'west-cree',
- ['wel'] = 'welsh',
- ['wlf'] = 'wolof',
- ['xbd'] = 'tai lue',
- ['xhs'] = 'xhosa',
- ['yak'] = 'yakut',
- ['yba'] = 'yoruba',
- ['ycr'] = 'y-cree',
- ['yic'] = 'yi classic',
- ['yim'] = 'yi modern',
- ['zhh'] = 'chinese hong kong',
- ['zhp'] = 'chinese phonetic',
- ['zhs'] = 'chinese simplified',
- ['zht'] = 'chinese traditional',
- ['znd'] = 'zande',
- ['zul'] = 'zulu'
-}
-
-local features = allocate {
- ['aalt'] = 'access all alternates',
- ['abvf'] = 'above-base forms',
- ['abvm'] = 'above-base mark positioning',
- ['abvs'] = 'above-base substitutions',
- ['afrc'] = 'alternative fractions',
- ['akhn'] = 'akhands',
- ['blwf'] = 'below-base forms',
- ['blwm'] = 'below-base mark positioning',
- ['blws'] = 'below-base substitutions',
- ['c2pc'] = 'petite capitals from capitals',
- ['c2sc'] = 'small capitals from capitals',
- ['calt'] = 'contextual alternates',
- ['case'] = 'case-sensitive forms',
- ['ccmp'] = 'glyph composition/decomposition',
- ['cjct'] = 'conjunct forms',
- ['clig'] = 'contextual ligatures',
- ['cpsp'] = 'capital spacing',
- ['cswh'] = 'contextual swash',
- ['curs'] = 'cursive positioning',
- ['dflt'] = 'default processing',
- ['dist'] = 'distances',
- ['dlig'] = 'discretionary ligatures',
- ['dnom'] = 'denominators',
- ['dtls'] = 'dotless forms', -- math
- ['expt'] = 'expert forms',
- ['falt'] = 'final glyph alternates',
- ['fin2'] = 'terminal forms #2',
- ['fin3'] = 'terminal forms #3',
- ['fina'] = 'terminal forms',
- ['flac'] = 'flattened accents over capitals', -- math
- ['frac'] = 'fractions',
- ['fwid'] = 'full width',
- ['half'] = 'half forms',
- ['haln'] = 'halant forms',
- ['halt'] = 'alternate half width',
- ['hist'] = 'historical forms',
- ['hkna'] = 'horizontal kana alternates',
- ['hlig'] = 'historical ligatures',
- ['hngl'] = 'hangul',
- ['hojo'] = 'hojo kanji forms',
- ['hwid'] = 'half width',
- ['init'] = 'initial forms',
- ['isol'] = 'isolated forms',
- ['ital'] = 'italics',
- ['jalt'] = 'justification alternatives',
- ['jp04'] = 'jis2004 forms',
- ['jp78'] = 'jis78 forms',
- ['jp83'] = 'jis83 forms',
- ['jp90'] = 'jis90 forms',
- ['kern'] = 'kerning',
- ['lfbd'] = 'left bounds',
- ['liga'] = 'standard ligatures',
- ['ljmo'] = 'leading jamo forms',
- ['lnum'] = 'lining figures',
- ['locl'] = 'localized forms',
- ['mark'] = 'mark positioning',
- ['med2'] = 'medial forms #2',
- ['medi'] = 'medial forms',
- ['mgrk'] = 'mathematical greek',
- ['mkmk'] = 'mark to mark positioning',
- ['mset'] = 'mark positioning via substitution',
- ['nalt'] = 'alternate annotation forms',
- ['nlck'] = 'nlc kanji forms',
- ['nukt'] = 'nukta forms',
- ['numr'] = 'numerators',
- ['onum'] = 'old style figures',
- ['opbd'] = 'optical bounds',
- ['ordn'] = 'ordinals',
- ['ornm'] = 'ornaments',
- ['palt'] = 'proportional alternate width',
- ['pcap'] = 'petite capitals',
- ['pnum'] = 'proportional figures',
- ['pref'] = 'pre-base forms',
- ['pres'] = 'pre-base substitutions',
- ['pstf'] = 'post-base forms',
- ['psts'] = 'post-base substitutions',
- ['pwid'] = 'proportional widths',
- ['qwid'] = 'quarter widths',
- ['rand'] = 'randomize',
- ['rkrf'] = 'rakar forms',
- ['rlig'] = 'required ligatures',
- ['rphf'] = 'reph form',
- ['rtbd'] = 'right bounds',
- ['rtla'] = 'right-to-left alternates',
- ['rtlm'] = 'right to left math', -- math
- ['ruby'] = 'ruby notation forms',
- ['salt'] = 'stylistic alternates',
- ['sinf'] = 'scientific inferiors',
- ['size'] = 'optical size',
- ['smcp'] = 'small capitals',
- ['smpl'] = 'simplified forms',
- -- ['ss01'] = 'stylistic set 1',
- -- ['ss02'] = 'stylistic set 2',
- -- ['ss03'] = 'stylistic set 3',
- -- ['ss04'] = 'stylistic set 4',
- -- ['ss05'] = 'stylistic set 5',
- -- ['ss06'] = 'stylistic set 6',
- -- ['ss07'] = 'stylistic set 7',
- -- ['ss08'] = 'stylistic set 8',
- -- ['ss09'] = 'stylistic set 9',
- -- ['ss10'] = 'stylistic set 10',
- -- ['ss11'] = 'stylistic set 11',
- -- ['ss12'] = 'stylistic set 12',
- -- ['ss13'] = 'stylistic set 13',
- -- ['ss14'] = 'stylistic set 14',
- -- ['ss15'] = 'stylistic set 15',
- -- ['ss16'] = 'stylistic set 16',
- -- ['ss17'] = 'stylistic set 17',
- -- ['ss18'] = 'stylistic set 18',
- -- ['ss19'] = 'stylistic set 19',
- -- ['ss20'] = 'stylistic set 20',
- ['ssty'] = 'script style', -- math
- ['subs'] = 'subscript',
- ['sups'] = 'superscript',
- ['swsh'] = 'swash',
- ['titl'] = 'titling',
- ['tjmo'] = 'trailing jamo forms',
- ['tnam'] = 'traditional name forms',
- ['tnum'] = 'tabular figures',
- ['trad'] = 'traditional forms',
- ['twid'] = 'third widths',
- ['unic'] = 'unicase',
- ['valt'] = 'alternate vertical metrics',
- ['vatu'] = 'vattu variants',
- ['vert'] = 'vertical writing',
- ['vhal'] = 'alternate vertical half metrics',
- ['vjmo'] = 'vowel jamo forms',
- ['vkna'] = 'vertical kana alternates',
- ['vkrn'] = 'vertical kerning',
- ['vpal'] = 'proportional alternate vertical metrics',
- ['vrt2'] = 'vertical rotation',
- ['zero'] = 'slashed zero',
-
- ['trep'] = 'traditional tex replacements',
- ['tlig'] = 'traditional tex ligatures',
-
- ['ss..'] = 'stylistic set ..',
- ['cv..'] = 'character variant ..',
- ['js..'] = 'justification ..',
-
- ["dv.."] = "devanagari ..",
- ["ml.."] = "malayalam ..",
-}
-
-local baselines = allocate {
- ['hang'] = 'hanging baseline',
- ['icfb'] = 'ideographic character face bottom edge baseline',
- ['icft'] = 'ideographic character face tope edige baseline',
- ['ideo'] = 'ideographic em-box bottom edge baseline',
- ['idtp'] = 'ideographic em-box top edge baseline',
- ['math'] = 'mathmatical centered baseline',
- ['romn'] = 'roman baseline'
-}
-
-tables.scripts = scripts
-tables.languages = languages
-tables.features = features
-tables.baselines = baselines
-
-local acceptscripts = true directives.register("otf.acceptscripts", function(v) acceptscripts = v end)
-local acceptlanguages = true directives.register("otf.acceptlanguages", function(v) acceptlanguages = v end)
-
-local report_checks = logs.reporter("fonts","checks")
-
--- hm, we overload the metatables
-
-if otffeatures.features then
- for k, v in next, otffeatures.features do
- features[k] = v
- end
- otffeatures.features = features
-end
-
-local function swapped(h)
- local r = { }
- for k, v in next, h do
- r[gsub(v,"[^a-z0-9]","")] = k -- is already lower
- end
- return r
-end
-
-local verbosescripts = allocate(swapped(scripts ))
-local verboselanguages = allocate(swapped(languages))
-local verbosefeatures = allocate(swapped(features ))
-local verbosebaselines = allocate(swapped(baselines))
-
--- lets forget about trailing spaces
-
-local function resolve(t,k)
- if k then
- k = gsub(lower(k),"[^a-z0-9]","")
- local v = rawget(t,k)
- if v then
- return v
- end
- end
-end
-
-setmetatableindex(verbosescripts, resolve)
-setmetatableindex(verboselanguages, resolve)
-setmetatableindex(verbosefeatures, resolve)
-setmetatableindex(verbosebaselines, resolve)
-
--- We could optimize the next lookups by using an extra metatable and storing
--- already found values but in practice there are not that many lookups so
--- it's never a bottleneck.
-
-setmetatableindex(scripts, function(t,k)
- if k then
- k = lower(k)
- if k == "dflt" then
- return k
- end
- local v = rawget(t,k)
- if v then
- return v
- end
- k = gsub(k," ","")
- v = rawget(t,v)
- if v then
- return v
- elseif acceptscripts then
- report_checks("registering extra script %a",k)
- rawset(t,k,k)
- return k
- end
- end
- return "dflt"
-end)
-
-setmetatableindex(languages, function(t,k)
- if k then
- k = lower(k)
- if k == "dflt" then
- return k
- end
- local v = rawget(t,k)
- if v then
- return v
- end
- k = gsub(k," ","")
- v = rawget(t,v)
- if v then
- return v
- elseif acceptlanguages then
- report_checks("registering extra language %a",k)
- rawset(t,k,k)
- return k
- end
- end
- return "dflt"
-end)
-
-setmetatablenewindex(languages, "ignore")
-setmetatablenewindex(baselines, "ignore")
-setmetatablenewindex(baselines, "ignore")
-
-local function resolve(t,k)
- if k then
- k = lower(k)
- local v = rawget(t,k)
- if v then
- return v
- end
- k = gsub(k," ","")
- local v = rawget(t,k)
- if v then
- return v
- end
- local tag, dd = match(k,"(..)(%d+)")
- if tag and dd then
- local v = rawget(t,tag)
- if v then
- return v -- return format(v,tonumber(dd)) -- old way
- else
- local v = rawget(t,tag.."..") -- nicer in overview
- if v then
- return (gsub(v,"%.%.",tonumber(dd))) -- new way
- end
- end
- end
- end
- return k -- "dflt"
-end
-
-setmetatableindex(features, resolve)
-
-local function assign(t,k,v)
- if k and v then
- v = lower(v)
- rawset(t,k,v) -- rawset ?
- -- rawset(features,gsub(v,"[^a-z0-9]",""),k) -- why ? old code
- end
-end
-
-setmetatablenewindex(features, assign)
-
-local checkers = {
- rand = function(v)
- return v == true and "random" or v
- end
-}
-
--- Keep this:
---
--- function otf.features.normalize(features)
--- if features then
--- local h = { }
--- for k, v in next, features do
--- k = lower(k)
--- if k == "language" then
--- v = gsub(lower(v),"[^a-z0-9]","")
--- h.language = rawget(verboselanguages,v) or (languages[v] and v) or "dflt" -- auto adds
--- elseif k == "script" then
--- v = gsub(lower(v),"[^a-z0-9]","")
--- h.script = rawget(verbosescripts,v) or (scripts[v] and v) or "dflt" -- auto adds
--- else
--- if type(v) == "string" then
--- local b = is_boolean(v)
--- if type(b) == "nil" then
--- v = tonumber(v) or lower(v)
--- else
--- v = b
--- end
--- end
--- if not rawget(features,k) then
--- k = rawget(verbosefeatures,k) or k
--- end
--- local c = checkers[k]
--- h[k] = c and c(v) or v
--- end
--- end
--- return h
--- end
--- end
-
--- inspect(fonts.handlers.otf.statistics.usedfeatures)
-
-if not storage then
- return
-end
-
-local usedfeatures = statistics.usedfeatures or { }
-statistics.usedfeatures = usedfeatures
-
-table.setmetatableindex(usedfeatures, function(t,k) if k then local v = { } t[k] = v return v end end) -- table.autotable
-
-storage.register("fonts/otf/usedfeatures", usedfeatures, "fonts.handlers.otf.statistics.usedfeatures" )
-
-function otf.features.normalize(features)
- if features then
- local h = { }
- for key, value in next, features do
- local k = lower(key)
- if k == "language" then
- local v = gsub(lower(value),"[^a-z0-9]","")
- h.language = rawget(verboselanguages,v) or (languages[v] and v) or "dflt" -- auto adds
- elseif k == "script" then
- local v = gsub(lower(value),"[^a-z0-9]","")
- h.script = rawget(verbosescripts,v) or (scripts[v] and v) or "dflt" -- auto adds
- else
- local uk = usedfeatures[key]
- local uv = uk[value]
- if uv then
- -- report_checks("feature value %a first seen at %a",value,key)
- else
- uv = tonumber(value) -- before boolean as there we also handle 0/1
- if uv then
- -- we're okay
- elseif type(value) == "string" then
- local b = is_boolean(value)
- if type(b) == "nil" then
- uv = lower(value)
- else
- uv = b
- end
- else
- uv = value
- end
- if not rawget(features,k) then
- k = rawget(verbosefeatures,k) or k
- end
- local c = checkers[k]
- if c then
- uv = c(uv) or vc
- end
- uk[value] = uv
- end
- h[k] = uv
- end
- end
- return h
- end
-end
-
---~ table.print(otf.features.normalize({ language = "dutch", liga = "yes", ss99 = true, aalt = 3, abcd = "yes" } ))
-
--- When I feel the need ...
-
---~ tables.aat = {
---~ [ 0] = {
---~ name = "allTypographicFeaturesType",
---~ [ 0] = "allTypeFeaturesOnSelector",
---~ [ 1] = "allTypeFeaturesOffSelector",
---~ },
---~ [ 1] = {
---~ name = "ligaturesType",
---~ [0 ] = "requiredLigaturesOnSelector",
---~ [1 ] = "requiredLigaturesOffSelector",
---~ [2 ] = "commonLigaturesOnSelector",
---~ [3 ] = "commonLigaturesOffSelector",
---~ [4 ] = "rareLigaturesOnSelector",
---~ [5 ] = "rareLigaturesOffSelector",
---~ [6 ] = "logosOnSelector ",
---~ [7 ] = "logosOffSelector ",
---~ [8 ] = "rebusPicturesOnSelector",
---~ [9 ] = "rebusPicturesOffSelector",
---~ [10] = "diphthongLigaturesOnSelector",
---~ [11] = "diphthongLigaturesOffSelector",
---~ [12] = "squaredLigaturesOnSelector",
---~ [13] = "squaredLigaturesOffSelector",
---~ [14] = "abbrevSquaredLigaturesOnSelector",
---~ [15] = "abbrevSquaredLigaturesOffSelector",
---~ },
---~ [ 2] = {
---~ name = "cursiveConnectionType",
---~ [ 0] = "unconnectedSelector",
---~ [ 1] = "partiallyConnectedSelector",
---~ [ 2] = "cursiveSelector ",
---~ },
---~ [ 3] = {
---~ name = "letterCaseType",
---~ [ 0] = "upperAndLowerCaseSelector",
---~ [ 1] = "allCapsSelector ",
---~ [ 2] = "allLowerCaseSelector",
---~ [ 3] = "smallCapsSelector ",
---~ [ 4] = "initialCapsSelector",
---~ [ 5] = "initialCapsAndSmallCapsSelector",
---~ },
---~ [ 4] = {
---~ name = "verticalSubstitutionType",
---~ [ 0] = "substituteVerticalFormsOnSelector",
---~ [ 1] = "substituteVerticalFormsOffSelector",
---~ },
---~ [ 5] = {
---~ name = "linguisticRearrangementType",
---~ [ 0] = "linguisticRearrangementOnSelector",
---~ [ 1] = "linguisticRearrangementOffSelector",
---~ },
---~ [ 6] = {
---~ name = "numberSpacingType",
---~ [ 0] = "monospacedNumbersSelector",
---~ [ 1] = "proportionalNumbersSelector",
---~ },
---~ [ 7] = {
---~ name = "appleReserved1Type",
---~ },
---~ [ 8] = {
---~ name = "smartSwashType",
---~ [ 0] = "wordInitialSwashesOnSelector",
---~ [ 1] = "wordInitialSwashesOffSelector",
---~ [ 2] = "wordFinalSwashesOnSelector",
---~ [ 3] = "wordFinalSwashesOffSelector",
---~ [ 4] = "lineInitialSwashesOnSelector",
---~ [ 5] = "lineInitialSwashesOffSelector",
---~ [ 6] = "lineFinalSwashesOnSelector",
---~ [ 7] = "lineFinalSwashesOffSelector",
---~ [ 8] = "nonFinalSwashesOnSelector",
---~ [ 9] = "nonFinalSwashesOffSelector",
---~ },
---~ [ 9] = {
---~ name = "diacriticsType",
---~ [ 0] = "showDiacriticsSelector",
---~ [ 1] = "hideDiacriticsSelector",
---~ [ 2] = "decomposeDiacriticsSelector",
---~ },
---~ [10] = {
---~ name = "verticalPositionType",
---~ [ 0] = "normalPositionSelector",
---~ [ 1] = "superiorsSelector ",
---~ [ 2] = "inferiorsSelector ",
---~ [ 3] = "ordinalsSelector ",
---~ },
---~ [11] = {
---~ name = "fractionsType",
---~ [ 0] = "noFractionsSelector",
---~ [ 1] = "verticalFractionsSelector",
---~ [ 2] = "diagonalFractionsSelector",
---~ },
---~ [12] = {
---~ name = "appleReserved2Type",
---~ },
---~ [13] = {
---~ name = "overlappingCharactersType",
---~ [ 0] = "preventOverlapOnSelector",
---~ [ 1] = "preventOverlapOffSelector",
---~ },
---~ [14] = {
---~ name = "typographicExtrasType",
---~ [0 ] = "hyphensToEmDashOnSelector",
---~ [1 ] = "hyphensToEmDashOffSelector",
---~ [2 ] = "hyphenToEnDashOnSelector",
---~ [3 ] = "hyphenToEnDashOffSelector",
---~ [4 ] = "unslashedZeroOnSelector",
---~ [5 ] = "unslashedZeroOffSelector",
---~ [6 ] = "formInterrobangOnSelector",
---~ [7 ] = "formInterrobangOffSelector",
---~ [8 ] = "smartQuotesOnSelector",
---~ [9 ] = "smartQuotesOffSelector",
---~ [10] = "periodsToEllipsisOnSelector",
---~ [11] = "periodsToEllipsisOffSelector",
---~ },
---~ [15] = {
---~ name = "mathematicalExtrasType",
---~ [ 0] = "hyphenToMinusOnSelector",
---~ [ 1] = "hyphenToMinusOffSelector",
---~ [ 2] = "asteriskToMultiplyOnSelector",
---~ [ 3] = "asteriskToMultiplyOffSelector",
---~ [ 4] = "slashToDivideOnSelector",
---~ [ 5] = "slashToDivideOffSelector",
---~ [ 6] = "inequalityLigaturesOnSelector",
---~ [ 7] = "inequalityLigaturesOffSelector",
---~ [ 8] = "exponentsOnSelector",
---~ [ 9] = "exponentsOffSelector",
---~ },
---~ [16] = {
---~ name = "ornamentSetsType",
---~ [ 0] = "noOrnamentsSelector",
---~ [ 1] = "dingbatsSelector ",
---~ [ 2] = "piCharactersSelector",
---~ [ 3] = "fleuronsSelector ",
---~ [ 4] = "decorativeBordersSelector",
---~ [ 5] = "internationalSymbolsSelector",
---~ [ 6] = "mathSymbolsSelector",
---~ },
---~ [17] = {
---~ name = "characterAlternativesType",
---~ [ 0] = "noAlternatesSelector",
---~ },
---~ [18] = {
---~ name = "designComplexityType",
---~ [ 0] = "designLevel1Selector",
---~ [ 1] = "designLevel2Selector",
---~ [ 2] = "designLevel3Selector",
---~ [ 3] = "designLevel4Selector",
---~ [ 4] = "designLevel5Selector",
---~ },
---~ [19] = {
---~ name = "styleOptionsType",
---~ [ 0] = "noStyleOptionsSelector",
---~ [ 1] = "displayTextSelector",
---~ [ 2] = "engravedTextSelector",
---~ [ 3] = "illuminatedCapsSelector",
---~ [ 4] = "titlingCapsSelector",
---~ [ 5] = "tallCapsSelector ",
---~ },
---~ [20] = {
---~ name = "characterShapeType",
---~ [0 ] = "traditionalCharactersSelector",
---~ [1 ] = "simplifiedCharactersSelector",
---~ [2 ] = "jis1978CharactersSelector",
---~ [3 ] = "jis1983CharactersSelector",
---~ [4 ] = "jis1990CharactersSelector",
---~ [5 ] = "traditionalAltOneSelector",
---~ [6 ] = "traditionalAltTwoSelector",
---~ [7 ] = "traditionalAltThreeSelector",
---~ [8 ] = "traditionalAltFourSelector",
---~ [9 ] = "traditionalAltFiveSelector",
---~ [10] = "expertCharactersSelector",
---~ },
---~ [21] = {
---~ name = "numberCaseType",
---~ [ 0] = "lowerCaseNumbersSelector",
---~ [ 1] = "upperCaseNumbersSelector",
---~ },
---~ [22] = {
---~ name = "textSpacingType",
---~ [ 0] = "proportionalTextSelector",
---~ [ 1] = "monospacedTextSelector",
---~ [ 2] = "halfWidthTextSelector",
---~ [ 3] = "normallySpacedTextSelector",
---~ },
---~ [23] = {
---~ name = "transliterationType",
---~ [ 0] = "noTransliterationSelector",
---~ [ 1] = "hanjaToHangulSelector",
---~ [ 2] = "hiraganaToKatakanaSelector",
---~ [ 3] = "katakanaToHiraganaSelector",
---~ [ 4] = "kanaToRomanizationSelector",
---~ [ 5] = "romanizationToHiraganaSelector",
---~ [ 6] = "romanizationToKatakanaSelector",
---~ [ 7] = "hanjaToHangulAltOneSelector",
---~ [ 8] = "hanjaToHangulAltTwoSelector",
---~ [ 9] = "hanjaToHangulAltThreeSelector",
---~ },
---~ [24] = {
---~ name = "annotationType",
---~ [ 0] = "noAnnotationSelector",
---~ [ 1] = "boxAnnotationSelector",
---~ [ 2] = "roundedBoxAnnotationSelector",
---~ [ 3] = "circleAnnotationSelector",
---~ [ 4] = "invertedCircleAnnotationSelector",
---~ [ 5] = "parenthesisAnnotationSelector",
---~ [ 6] = "periodAnnotationSelector",
---~ [ 7] = "romanNumeralAnnotationSelector",
---~ [ 8] = "diamondAnnotationSelector",
---~ },
---~ [25] = {
---~ name = "kanaSpacingType",
---~ [ 0] = "fullWidthKanaSelector",
---~ [ 1] = "proportionalKanaSelector",
---~ },
---~ [26] = {
---~ name = "ideographicSpacingType",
---~ [ 0] = "fullWidthIdeographsSelector",
---~ [ 1] = "proportionalIdeographsSelector",
---~ },
---~ [103] = {
---~ name = "cjkRomanSpacingType",
---~ [ 0] = "halfWidthCJKRomanSelector",
---~ [ 1] = "proportionalCJKRomanSelector",
---~ [ 2] = "defaultCJKRomanSelector",
---~ [ 3] = "fullWidthCJKRomanSelector",
---~ },
---~ }
diff --git a/Master/texmf-dist/tex/context/base/lang-all.xml b/Master/texmf-dist/tex/context/base/lang-all.xml
deleted file mode 100644
index 503cb0ae5db..00000000000
--- a/Master/texmf-dist/tex/context/base/lang-all.xml
+++ /dev/null
@@ -1,376 +0,0 @@
-<?xml version='1.0' standalone='yes'?>
-
-<!-- author: Willy Egger -->
-
-<descriptions>
-
-<description language='ba'>
- <sourcefile>bahyph.tex</sourcefile>
- <title>TeX hyphenation patterns for the Basque language</title>
- <copyright>
- <year>1991</year>
- <owner>Julio Sanchez (jsanchez@gmv.es)</owner>
- <comment>These patterns have been derived from "On Word Division in Spanish"
- Jos'e A. Ma~nas</comment>
- </copyright>
- <copyright>
- <year>1997</year>
- <owner>Juan M. Aguirregabiria (wtpagagj@lg.ehu.es)</owner>
- <comment>Adaption to TeX based on shyphen.sh</comment>
- </copyright>
-</description>
-
-<description language='ca'>
- <sourcefile>cahyph.tex</sourcefile>
- <title>TeX hyphenation patterns for the Catalan language</title>
- <remarks>Version 1.11</remarks>
- <copyright>
- <year>1991-1995 </year>
- <owner>Gon\c{c}al Badenes,Francina Turon</owner>
- </copyright>
- <copyright>
- <year>1991-2003</year>
- <owner>Gon\c{c}al Badenes</owner>
- </copyright>
-</description>
-
-<description language='cy'>
- <sourcefile>cyhyph.tex</sourcefile>
- <title>TeX hyphenation patterns for the Welsh Language</title>
- <remarks>v3,GNU General Public License</remarks>
- <copyright>
- <year>1996</year>
- <owner>Yannis Haralambous</owner>
- <comment>Inputs cathyph.tex, patterns in EC/DC encoding</comment>
- </copyright>
-</description>
-
-<description language='cz'>
- <sourcefile>czhyphen.tex</sourcefile>
- <title>TeX hyphenation patterns for the Czech language</title>
- <copyright>
- <year>1991</year>
- <owner>Karel Horak</owner>
- <comment>List of exceptions</comment>
- </copyright>
- <copyright>
- <year>1995</year>
- <owner>Pavel Sevecek (\v{S}eve\v{c}ek) (pavel@lingea.cz)</owner>
- <comment>Macros, adaption for TeX 2</comment>
- </copyright>
- <!-- samples>
- <sample>au-to-ma-tic-ký</sample>
- <sample>bram-bo-rák</sample>
- <sample>da-ta-bá-ze</sample>
- <sample>kr-ka-vec</sample>
- <sample>Kro-me-ríš</sample>
- <sample>ob-hos-po-da-ro-vat</sample>
- <sample>rem-dich</sample>
- <sample>scvrk-nout</sample>
- <sample>za-les-nit</sample>
- <sample>že-žu-lic-ka</sample>
- </samples -->
-</description>
-
-<description language='da'>
- <sourcefile>dkspecial.tex dkcommon.tex</sourcefile>
- <title>TeX hyphenation patterns for the Danish language</title>
- <copyright/>
-</description>
-
-<description language='de'>
- <sourcefile>dehyphn.tex</sourcefile>
- <title>TeX hyphenation patterns for the German language (new orthography)</title>
- <copyright>
- <year>1988, 1991</year>
- <owner>Rechenzentrum der Ruhr-Universitaet Bochum</owner>
- <comment>German hyphen patterns</comment>
- </copyright>
- <copyright>
- <year>1993, 1994, 1999</year>
- <owner>Bernd Raichle/DANTE e.V.</owner>
- <comment>Macros, adaption for TeX 2</comment>
- </copyright>
- <copyright>
- <year>1998-2001</year>
- <owner>Walter Schmidt</owner>
- <comment>Adaption to new German orthography</comment>
- </copyright>
-</description>
-
-<description language='deo'>
- <sourcefile>dehypht.tex</sourcefile>
- <title>TeX hyphenation patterns for the German language (traditional orthography)</title>
- <copyright>
- <year>1988, 1991</year>
- <owner>Rechenzentrum der Ruhr-Universitaet Bochum</owner>
- <comment>German hyphen patterns</comment>
- </copyright>
- <copyright>
- <year>1993, 1994, 1999</year>
- <owner>Bernd Raichle/DANTE e.V.</owner>
- <comment>Macros, adaption for TeX 2</comment>
- </copyright>
-</description>
-
-<description language='en'>
- <sourcefile>hyphen.tex</sourcefile>
- <title>Plain TeX hyphenation patterns for the English language (US) </title>
- <remarks>[NOT TO BE CHANGED IN ANY WAY!]</remarks>
- <copyright/>
-</description>
-
-<description language='es'>
- <sourcefile>eshyph.tex</sourcefile>
- <title>TeX hyphenation patterns for the Spanish language</title>
- <copyright>
- <year>1993</year>
- <owner>Francesc Carmona (franc@porthos.bio.ub.es)</owner>
- </copyright>
-</description>
-
-<description language='fi'>
- <sourcefile>fihyph.tex</sourcefile>
- <title>TeX hyphenation patterns for the Finnish language</title>
- <copyright>
- <year>1986</year>
- <owner>Kauko Saarinen</owner>
- <comment>First release</comment>
- </copyright>
- <copyright>
- <year>1988</year>
- <owner>Fred Karlsson</owner>
- <comment>Completely rewritten patterns</comment>
- </copyright>
- <copyright>
- <year>1989</year>
- <owner>Fred Karlsson</owner>
- <comment>Some vowel tripples added</comment>
- </copyright>
- <copyright>
- <year>1995</year>
- <owner>Thomas Esser</owner>
- <comment>Added \uccode and \lccode </comment>
- </copyright>
-</description>
-
-<description language='fr'>
- <sourcefile>frhyph.tex</sourcefile>
- <title>TeX hyphenation patterns for the French language</title>
- <remarks>V2.11</remarks>
- <copyright>
- <owner>Jacques Desarmenien, Norman Buckle, Michael Ferguson, Justin Bur, Daniel Flipo and Bernard Gaulle</owner>
- </copyright>
- <copyright>
- <year>1996</year>
- <owner>Bernd Raichle/DANTE e.V.</owner>
- <comment>Adaption for TeX 3.x and MLTeX 3.x (2.x)</comment>
- </copyright>
-</description>
-
-<description language='hr'>
- <sourcefile> hrhyph.tex</sourcefile>
- <title>TeX hyphenation patterns for the Croatian language</title>
- <copyright>
- <year>1994, 1996</year>
- <owner>Marinovi\'c Igor (migor@student.math.hr)</owner>
- </copyright>
-</description>
-
-<description language='hu'>
- <sourcefile> huhyphn.tex</sourcefile>
- <title>TeX hyphenation patterns for the Hungarian language</title>
-</description>
-
-<description language='is'>
- <sourcefile>ishyph.tex</sourcefile>
- <title>Plain TeX hyphenation patterns for the Icelandic language</title>
- <remarks>[NOT TO BE CHANGED IN ANY WAY!]</remarks>
- <copyright>
- <year>1987</year>
- <owner>Jorgen Pind</owner>
- </copyright>
-</description>
-
-<description language='it'>
- <sourcefile>ithyph.tex</sourcefile>
- <title>TeX hyphenation patterns for the Italian language</title>
- <remarks>v4.8d</remarks>
- <copyright>
- <year>1998, 2001</year>
- <owner>Claudio Beccari</owner>
- </copyright>
- <copyright>
- <year>1993, 1994, 1999</year>
- <owner>Bernd Raichle/DANTE e.V.</owner>
- <comment>Macros, adaption for TeX 2</comment>
- </copyright>
-</description>
-
-<description language='la'>
- <sourcefile>lahyph.tex</sourcefile>
- <title>TeX hyphenation patterns for the Latin language</title>
- <remarks>v3.0b</remarks>
- <copyright>
- <year>1999-2001</year>
- <owner>Claudio Beccari</owner>
- </copyright>
- <copyright>
- <year>1993, 1994, 1998, 1999</year>
- <owner>Bernd Raichle/DANTE e.V.</owner>
- <comment>Macro code in 'dehypht.tex'</comment>
- </copyright>
-</description>
-
-<description language='nl'>
- <sourcefile>nehyph96.tex</sourcefile>
- <title>TeX hyphenation patterns for the Dutch language</title>
- <copyright>
- <year>1996</year>
- <owner> Piet Tutelaers (P.T.H.Tutelaers@tue.nl)</owner>
- <comment>8-bit hyphenation patterns for TeX based upon the new Dutch
- spelling, officially since 1 August 1996. These patterns follow
- the new hyphenation rules in the `Woordenlijst Nederlandse
- Taal, SDU Uitgevers, Den Haag 1995' (the so called `Groene
- Boekje') described in section 5.2 (Het afbreekteken)</comment>
- </copyright>
-</description>
-
-<!-- Watch the next one: what a naming mess. What user can keep track of
-such an inconsistent name scheme (well, no name scheme). Please warn me
-when yet another name shows up -->
-
-<description language='no'>
- <sourcefile>nohyph.tex</sourcefile>
- <title>TeX hyphenation patterns for the Norwegian language</title>
- <copyright>
- <year>2005</year>
- <owner>Rune Kleveland with patches from Ole Michael Selberg</owner>
- <comment>nohyphbx.tex</comment>
- </copyright>
- <copyright>
- <year>200+</year>
- <owner>Rune Kleveland</owner>
- <comment>nohyphb.tex</comment>
- </copyright>
- <copyright>
- <year>199+</year>
- <owner>Dag Langmyhr and student</owner>
- <comment>nohyph2.tex</comment>
- </copyright>
- <copyright>
- <year>199+</year>
- <owner>Ivar Aavatsmark and others</owner>
- <comment>nohyph.tex sometimes named nohyph1.tex</comment>
- </copyright>
- <copyright>
- <year>1992,1993</year>
- <owner>Ivar Aavatsmark</owner>
- <comment>nohyphen.tex based on danhyph.tex</comment>
- </copyright>
- <copyright>
- <year>1994</year>
- <owner>Preben Randhol, Jon Martin Solaas</owner>
- </copyright>
- <copyright>
- <year>1995</year>
- <owner>Thomas Esser (te@dbs.uni-hannover.de)</owner>
- <comment>Make patterns work with non-T1 encoding</comment>
- </copyright>
-</description>
-
-<description language='pl'>
- <sourcefile>plhyph.tex</sourcefile>
- <title>TeX hyphenation patterns for the Polish language</title>
- <copyright/>
-</description>
-
-<description language='pt'>
- <sourcefile>pthyph.tex</sourcefile>
- <title>TeX hyphenation patterns for the Portuguese language</title>
- <copyright/>
-</description>
-
-<description language='ro'>
- <sourcefile>rohyph.tex</sourcefile>
- <title>TeX hyphenation patterns for the Romanian language</title>
- <copyright/>
-</description>
-
-<description language='sk'>
- <sourcefile>skhyphen.tex skhyphen.ex</sourcefile>
- <title>TeX hyphenation patterns for the Slovakian language</title>
- <copyright>
- <year>1992</year>
- <owner>Jana Chlebikova</owner>
- </copyright>
- <copyright>
- <year>1991</year>
- <owner>Karel Horak</owner>
- <comment>List of exceptions</comment>
- </copyright>
-</description>
-
-<description language='sl'>
- <sourcefile>sihyph.tex</sourcefile>
- <title>TeX hyphenation patterns for the Slovenian language</title>
- <copyright>
- <year>1990</year>
- <owner>TeXCeX (SLO),TeXCeH Norbert Schwarz</owner>
- </copyright>
- <copyright>
- <year>1994</year>
- <owner>Leon "Zlajpah (leon.zlajpah@ijs.si)</owner>
- <comment>Use of code page 852 in patterns</comment>
- </copyright>
- <copyright>
- <year>1995,1997</year>
- <owner>Leon "Zlajpah (leon.zlajpah@ijs.si)</owner>
- <comment>Adaptaion of Slovenian hyphenation pattens, macros</comment>
- </copyright>
-</description>
-
-<description language='sv'>
- <sourcefile>svhyph.tex</sourcefile>
- <title>TeX hyphenation patterns for the Swedish language</title>
- <copyright>
- <year>1991,1994</year>
- <owner>Jan Michael Rynning</owner>
- </copyright>
-</description>
-
-<description language='tr'>
- <sourcefile>tkhyph.tex</sourcefile>
- <title>TeX hyphenation patterns for the modern Turkish language</title>
- <copyright>
- <year>1996</year>
- <owner>Yannis Haralambous</owner>
- <comment>A mechanically generated Turkish Hyphenation table for TeX,
- using the University of Washington diacritical coding
- developed by P. A. MacKay for the Ottoman Texts Project</comment>
- </copyright>
-</description>
-
-<description language='uk'>
- <sourcefile>ukhyphen.tex</sourcefile>
- <title>TeX hyphenation patterns for the English language (UK)</title>
- <copyright/>
-</description>
-
-<description language='vn'>
- <comment>Vietnamese needs no patterns.</comment>
-</description>
-
-<description language='agr'>
- <sourcefile>grahyph4.tex</sourcefile>
- <title>TeX hyphenation patterns for the ancient Greek language</title>
- <copyright>
- <year>2004</year>
- <owner>Dimitrios Filippou</owner>
- <comment>These hyphenation patterns are explained in "ancient.pdf".
- Hyphenation examples are given in the file "anc-test.pdf".
- Some doubtful patterns are marked by three question marks "???".</comment>
- </copyright>
-</description>
-
-</descriptions>
diff --git a/Master/texmf-dist/tex/context/base/lang-frq-de.lua b/Master/texmf-dist/tex/context/base/lang-frq-de.lua
deleted file mode 100644
index 3733f39f92e..00000000000
--- a/Master/texmf-dist/tex/context/base/lang-frq-de.lua
+++ /dev/null
@@ -1,12 +0,0 @@
-return {
- language = "de",
- source = "http://www.blankenburg.de/gat/pages/fach/info/analyse2.htm",
- frequencies = {
- [0x0061] = 6.47, [0x0062] = 1.93, [0x0063] = 2.68, [0x0064] = 4.83, [0x0065] = 17.48,
- [0x0066] = 1.65, [0x0067] = 3.06, [0x0068] = 4.23, [0x0069] = 7.73, [0x006A] = 0.27,
- [0x006B] = 1.46, [0x006C] = 3.49, [0x006D] = 2.58, [0x006E] = 9.84, [0x006F] = 2.98,
- [0x0070] = 0.96, [0x0071] = 0.02, [0x0072] = 7.54, [0x0073] = 6.83, [0x0074] = 6.13,
- [0x0075] = 4.17, [0x0076] = 0.94, [0x0077] = 1.48, [0x0078] = 0.04, [0x0079] = 0.08,
- [0x007A] = 1.14,
- }
-}
diff --git a/Master/texmf-dist/tex/context/base/lang-frq-en.lua b/Master/texmf-dist/tex/context/base/lang-frq-en.lua
deleted file mode 100644
index 9e18d716679..00000000000
--- a/Master/texmf-dist/tex/context/base/lang-frq-en.lua
+++ /dev/null
@@ -1,26 +0,0 @@
--- return {
--- language = "en",
--- source = "http://caislab.icu.ac.kr/course/2001/spring/ice605/down/010306.pdf",
--- frequencies = {
--- [0x0061] = 8.2, [0x0062] = 1.5, [0x0063] = 2.8, [0x0064] = 4.3, [0x0065] = 12.7,
--- [0x0066] = 2.2, [0x0067] = 2.0, [0x0068] = 6.1, [0x0069] = 7.0, [0x006A] = 0.2,
--- [0x006B] = 0.8, [0x006C] = 4.0, [0x006D] = 2.4, [0x006E] = 6.7, [0x006F] = 7.5,
--- [0x0070] = 1.9, [0x0071] = 0.1, [0x0072] = 6.0, [0x0073] = 6.3, [0x0074] = 9.1,
--- [0x0075] = 2.8, [0x0076] = 1.0, [0x0077] = 2.3, [0x0078] = 0.1, [0x0079] = 2.0,
--- [0x007A] = 0.1,
--- }
--- }
-
-return {
- language = "en",
- source = "http://www.blankenburg.de/gat/pages/fach/info/analyse2.htm",
- frequencies = {
- [0x0061] = 8.04, [0x0062] = 1.54, [0x0063] = 3.06, [0x0064] = 3.99, [0x0065] = 12.51,
- [0x0066] = 2.30, [0x0067] = 1.96, [0x0068] = 5.49, [0x0069] = 7.26, [0x006A] = 0.16,
- [0x006B] = 0.67, [0x006C] = 4.14, [0x006D] = 2.53, [0x006E] = 7.09, [0x006F] = 7.60,
- [0x0070] = 2.00, [0x0071] = 0.11, [0x0072] = 6.12, [0x0073] = 6.54, [0x0074] = 9.25,
- [0x0075] = 2.71, [0x0076] = 0.99, [0x0077] = 1.92, [0x0078] = 0.19, [0x0079] = 1.73,
- [0x007A] = 0.09,
- }
-}
-
diff --git a/Master/texmf-dist/tex/context/base/lang-frq-nl.lua b/Master/texmf-dist/tex/context/base/lang-frq-nl.lua
deleted file mode 100644
index 7b640b77929..00000000000
--- a/Master/texmf-dist/tex/context/base/lang-frq-nl.lua
+++ /dev/null
@@ -1,12 +0,0 @@
-return {
- language = "nl",
- source = "http://www.onzetaal.nl/advies/letterfreq.html",
- frequencies = {
- [0x0061] = 7.47, [0x0062] = 1.58, [0x0063] = 1.24, [0x0064] = 5.93, [0x0065] = 18.91,
- [0x0066] = 0.81, [0x0067] = 3.40, [0x0068] = 2.38, [0x0069] = 6.50, [0x006A] = 1.46,
- [0x006B] = 2.25, [0x006C] = 3.57, [0x006D] = 2.21, [0x006E] = 10.03, [0x006F] = 6.06,
- [0x0070] = 1.57, [0x0071] = 0.009, [0x0072] = 6.41, [0x0073] = 3.73, [0x0074] = 6.79,
- [0x0075] = 1.99, [0x0076] = 2.85, [0x0077] = 1.52, [0x0078] = 0.04, [0x0079] = 0.035,
- [0x007A] = 1.39,
- }
-}
diff --git a/Master/texmf-dist/tex/context/base/lang-url.lua b/Master/texmf-dist/tex/context/base/lang-url.lua
deleted file mode 100644
index 39418beefa2..00000000000
--- a/Master/texmf-dist/tex/context/base/lang-url.lua
+++ /dev/null
@@ -1,186 +0,0 @@
-if not modules then modules = { } end modules ['lang-url'] = {
- version = 1.001,
- comment = "companion to lang-url.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local utfcharacters, utfvalues, utfbyte, utfchar = utf.characters, utf.values, utf.byte, utf.char
-
-local commands = commands
-local context = context
-
-local implement = interfaces.implement
-
-local variables = interfaces.variables
-local v_before = variables.before
-local v_after = variables.after
-
-local is_letter = characters.is_letter
-
---[[
-<p>Hyphenating <l n='url'/>'s is somewhat tricky and a matter of taste. I did
-consider using a dedicated hyphenation pattern or dealing with it by node
-parsing, but the following solution suits as well. After all, we're mostly
-dealing with <l n='ascii'/> characters.</p>
-]]--
-
-commands.hyphenatedurl = commands.hyphenatedurl or { }
-local hyphenatedurl = commands.hyphenatedurl
-
-local characters = utilities.storage.allocate {
- ["!"] = "before",
- ["\""] = "before",
- ["#"] = "before",
- ["$"] = "before",
- ["%"] = "before",
- ["&"] = "before",
- ["("] = "before",
- ["*"] = "before",
- ["+"] = "before",
- [","] = "before",
- ["-"] = "before",
- ["."] = "before",
- ["/"] = "before",
- [":"] = "before",
- [";"] = "before",
- ["<"] = "before",
- ["="] = "before",
- [">"] = "before",
- ["?"] = "before",
- ["@"] = "before",
- ["["] = "before",
- ["\\"] = "before",
- ["^"] = "before",
- ["_"] = "before",
- ["`"] = "before",
- ["{"] = "before",
- ["|"] = "before",
- ["~"] = "before",
-
- ["'"] = "after",
- [")"] = "after",
- ["]"] = "after",
- ["}"] = "after",
-}
-
-local mapping = utilities.storage.allocate {
- -- [utfchar(0xA0)] = "~", -- nbsp (catch)
-}
-
-hyphenatedurl.characters = characters
-hyphenatedurl.mapping = mapping
-hyphenatedurl.lefthyphenmin = 2
-hyphenatedurl.righthyphenmin = 3
-hyphenatedurl.discretionary = nil
-
--- more fun is to write nodes .. maybe it's nicer to do this
--- in an attribute handler anyway
-
--- local ctx_a = context.a
--- local ctx_b = context.b
--- local ctx_d = context.d
--- local ctx_n = context.n
--- local ctx_s = context.s
-
--- local function action(hyphenatedurl,str,left,right,disc)
--- local n = 0
--- local b = math.max( left or hyphenatedurl.lefthyphenmin, 2)
--- local e = math.min(#str-(right or hyphenatedurl.righthyphenmin)+2,#str)
--- local d = disc or hyphenatedurl.discretionary
--- local p = nil
--- for s in utfcharacters(str) do
--- n = n + 1
--- s = mapping[s] or s
--- if n > 1 then
--- ctx_s() -- can be option
--- end
--- if s == d then
--- ctx_d(utfbyte(s))
--- else
--- local c = characters[s]
--- if not c or n <= b or n >= e then
--- ctx_n(utfbyte(s))
--- elseif c == 1 then
--- ctx_b(utfbyte(s))
--- elseif c == 2 then
--- ctx_a(utfbyte(s))
--- end
--- end
--- p = s
--- end
--- end
-
-local ctx_a = context.a
-local ctx_b = context.b
-local ctx_d = context.d
-local ctx_c = context.c
-local ctx_l = context.l
-local ctx_C = context.C
-local ctx_L = context.L
-
-local function action(hyphenatedurl,str,left,right,disc)
- local n = 0
- local b = math.max( left or hyphenatedurl.lefthyphenmin, 2)
- local e = math.min(#str-(right or hyphenatedurl.righthyphenmin)+2,#str)
- local d = disc or hyphenatedurl.discretionary
- local p = nil
- for s in utfcharacters(str) do
- n = n + 1
- s = mapping[s] or s
- if s == d then
- ctx_d(utfbyte(s))
- else
- local c = characters[s]
- if c == v_before then
- p = false
- ctx_b(utfbyte(s))
- elseif c == v_after then
- p = false
- ctx_a(utfbyte(s))
- else
- local l = is_letter[s]
- if n <= b or n >= e then
- if p and l then
- ctx_L(utfbyte(s))
- else
- ctx_C(utfbyte(s))
- end
- elseif p and l then
- ctx_l(utfbyte(s))
- else
- ctx_c(utfbyte(s))
- end
- p = l
- end
- end
- end
-end
-
--- hyphenatedurl.action = function(_,...) action(...) end -- sort of obsolete
-
-table.setmetatablecall(hyphenatedurl,action) -- watch out: a caller
-
--- todo, no interface in mkiv yet
-
-function hyphenatedurl.setcharacters(str,value) -- 1, 2 == before, after
- for s in utfcharacters(str) do
- characters[s] = value or v_before
- end
-end
-
--- .hyphenatedurl.setcharacters("')]}",2)
-
-implement {
- name = "sethyphenatedurlcharacters",
- actions = hyphenatedurl.setcharacters,
- arguments = { "string", "string" }
-}
-
-implement {
- name = "hyphenatedurl",
- scope = "private",
- actions = function(...) action(hyphenatedurl,...) end,
- arguments = { "string", "integer", "integer", "string" }
-}
diff --git a/Master/texmf-dist/tex/context/base/lxml-ini.lua b/Master/texmf-dist/tex/context/base/lxml-ini.lua
deleted file mode 100644
index 115403395e5..00000000000
--- a/Master/texmf-dist/tex/context/base/lxml-ini.lua
+++ /dev/null
@@ -1,142 +0,0 @@
-if not modules then modules = { } end modules ['lxml-ini'] = {
- version = 1.001,
- comment = "this module is the basis for the lxml-* ones",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local xml = xml
-local lxml = lxml
-
--- this defines an extra scanner lxmlid:
-
-local scanners = tokens.scanners
-local scanstring = scanners.string
-local getid = lxml.id
-
-scanners.lxmlid = function() return getid(scanstring()) end
-
-local implement = interfaces.implement
-
--- lxml.id
-
-implement { name = "lxmlid", actions = lxml.getid, arguments = "string" }
-
-implement { name = "xmldoif", actions = lxml.doif, arguments = { "string", "string" } }
-implement { name = "xmldoifnot", actions = lxml.doifnot, arguments = { "string", "string" } }
-implement { name = "xmldoifelse", actions = lxml.doifelse, arguments = { "string", "string" } }
-implement { name = "xmldoiftext", actions = lxml.doiftext, arguments = { "string", "string" } }
-implement { name = "xmldoifnottext", actions = lxml.doifnottext, arguments = { "string", "string" } }
-implement { name = "xmldoifelsetext", actions = lxml.doifelsetext, arguments = { "string", "string" } }
-
-implement { name = "xmldoifempty", actions = lxml.doifempty, arguments = { "string", "string" } }
-implement { name = "xmldoifnotempty", actions = lxml.doifnotempty, arguments = { "string", "string" } }
-implement { name = "xmldoifelseempty", actions = lxml.doifelseempty, arguments = { "string", "string" } }
-implement { name = "xmldoifselfempty", actions = lxml.doifempty, arguments = "string" }
-implement { name = "xmldoifnotselfempty", actions = lxml.doifnotempty, arguments = "string" }
-implement { name = "xmldoifelseselfempty", actions = lxml.doifelseempty, arguments = "string" }
-
---------- { name = "xmlcontent", actions = lxml.content, arguments = "string" }
---------- { name = "xmlflushstripped", actions = lxml.strip, arguments = { "string", true } }
-implement { name = "xmlall", actions = lxml.all, arguments = { "string", "string" } }
-implement { name = "xmlatt", actions = lxml.att, arguments = { "string", "string" } }
-implement { name = "xmlattdef", actions = lxml.att, arguments = { "string", "string", "string" } }
-implement { name = "xmlattribute", actions = lxml.attribute, arguments = { "string", "string", "string" } }
-implement { name = "xmlattributedef", actions = lxml.attribute, arguments = { "string", "string", "string", "string" } }
-implement { name = "xmlchainatt", actions = lxml.chainattribute, arguments = { "string", "'/'", "string" } }
-implement { name = "xmlchainattdef", actions = lxml.chainattribute, arguments = { "string", "'/'", "string", "string" } }
-implement { name = "xmlrefatt", actions = lxml.refatt, arguments = { "string", "string" } }
-implement { name = "xmlchecknamespace", actions = xml.checknamespace, arguments = { "lxmlid", "string", "string" } }
-implement { name = "xmlcommand", actions = lxml.command, arguments = { "string", "string", "string" } }
-implement { name = "xmlconcat", actions = lxml.concat, arguments = { "string", "string", "string" } } -- \detokenize{#3}
-implement { name = "xmlconcatrange", actions = lxml.concatrange, arguments = { "string", "string", "string", "string", "string" } } -- \detokenize{#5}
-implement { name = "xmlcontext", actions = lxml.context, arguments = { "string", "string" } }
-implement { name = "xmlcount", actions = lxml.count, arguments = { "string", "string" } }
-implement { name = "xmldelete", actions = lxml.delete, arguments = { "string", "string" } }
-implement { name = "xmldirect", actions = lxml.direct, arguments = "string" }
-implement { name = "xmldirectives", actions = lxml.directives.setup, arguments = "string" }
-implement { name = "xmldirectivesafter", actions = lxml.directives.after, arguments = "string" }
-implement { name = "xmldirectivesbefore", actions = lxml.directives.before, arguments = "string" }
-implement { name = "xmldisplayverbatim", actions = lxml.displayverbatim, arguments = "string" }
-implement { name = "xmlelement", actions = lxml.element, arguments = { "string", "string" } } -- could be integer but now we can alias
-implement { name = "xmlfilter", actions = lxml.filter, arguments = { "string", "string" } }
-implement { name = "xmlfilterlist", actions = lxml.filterlist, arguments = { "string", "string" } }
-implement { name = "xmlfirst", actions = lxml.first, arguments = { "string", "string" } }
-implement { name = "xmlflush", actions = lxml.flush, arguments = "string" }
-implement { name = "xmlflushcontext", actions = lxml.context, arguments = "string" }
-implement { name = "xmlflushlinewise", actions = lxml.flushlinewise, arguments = "string" }
-implement { name = "xmlflushspacewise", actions = lxml.flushspacewise, arguments = "string" }
-implement { name = "xmlfunction", actions = lxml.applyfunction, arguments = { "string", "string" } }
-implement { name = "xmlinclude", actions = lxml.include, arguments = { "string", "string", "string", true } }
-implement { name = "xmlincludeoptions", actions = lxml.include, arguments = { "string", "string", "string", "string" } }
-implement { name = "xmlinclusion", actions = lxml.inclusion, arguments = "string" }
-implement { name = "xmlinclusions", actions = lxml.inclusions, arguments = "string" }
-implement { name = "xmlbadinclusions", actions = lxml.badinclusions, arguments = "string" }
-implement { name = "xmlindex", actions = lxml.index, arguments = { "string", "string", "string" } } -- can be integer but now we can alias
-implement { name = "xmlinfo", actions = lxml.info, arguments = "string" }
-implement { name = "xmlinlineverbatim", actions = lxml.inlineverbatim, arguments = "string" }
-implement { name = "xmllast", actions = lxml.last, arguments = "string" }
-implement { name = "xmlload", actions = lxml.load, arguments = { "string", "string", "string", "string" } }
-implement { name = "xmlloadbuffer", actions = lxml.loadbuffer, arguments = { "string", "string", "string", "string" } }
-implement { name = "xmlloaddata", actions = lxml.loaddata, arguments = { "string", "string", "string", "string" } }
-implement { name = "xmlloaddirectives", actions = lxml.directives.load, arguments = "string" }
-implement { name = "xmlloadregistered", actions = lxml.loadregistered, arguments = { "string", "string", "string" } }
-implement { name = "xmlmain", actions = lxml.main, arguments = "string" }
-implement { name = "xmlmatch", actions = lxml.match, arguments = "string" }
-implement { name = "xmlname", actions = lxml.name, arguments = "string" }
-implement { name = "xmlnamespace", actions = lxml.namespace, arguments = "string" }
-implement { name = "xmlnonspace", actions = lxml.nonspace, arguments = { "string", "string" } }
-implement { name = "xmlpos", actions = lxml.pos, arguments = "string" }
-implement { name = "xmlraw", actions = lxml.raw, arguments = { "string", "string" } }
-implement { name = "xmlregisterns", actions = xml.registerns, arguments = { "string", "string" } }
-implement { name = "xmlremapname", actions = xml.remapname, arguments = { "lxmlid", "string","string","string" } }
-implement { name = "xmlremapnamespace", actions = xml.renamespace, arguments = { "lxmlid", "string", "string" } }
-implement { name = "xmlsave", actions = lxml.save, arguments = { "string", "string" } }
---------- { name = "xmlsetfunction", actions = lxml.setaction, arguments = { "string", "string", "string" } }
-implement { name = "xmlsetsetup", actions = lxml.setsetup, arguments = { "string", "string", "string" } }
-implement { name = "xmlsnippet", actions = lxml.snippet, arguments = { "string", "string" } }
-implement { name = "xmlstrip", actions = lxml.strip, arguments = { "string", "string" } }
-implement { name = "xmlstripanywhere", actions = lxml.strip, arguments = { "string", "string", true, true } }
-implement { name = "xmlstripnolines", actions = lxml.strip, arguments = { "string", "string", true } }
-implement { name = "xmlstripped", actions = lxml.stripped, arguments = { "string", "string" } }
-implement { name = "xmlstrippednolines", actions = lxml.stripped, arguments = { "string", "string", true } }
-implement { name = "xmltag", actions = lxml.tag, arguments = "string" }
-implement { name = "xmltext", actions = lxml.text, arguments = { "string", "string" } }
-implement { name = "xmltobuffer", actions = lxml.tobuffer, arguments = { "string", "string", "string" } }
-implement { name = "xmltobufferverbose", actions = lxml.tobuffer, arguments = { "string", "string", "string", true } }
-implement { name = "xmltofile", actions = lxml.tofile, arguments = { "string", "string", "string" } }
-implement { name = "xmltoparameters", actions = lxml.toparameters, arguments = "string" }
-implement { name = "xmlverbatim", actions = lxml.verbatim, arguments = "string" }
-
-implement { name = "xmlstartraw", actions = lxml.startraw }
-implement { name = "xmlstopraw", actions = lxml.stopraw }
-
-implement { name = "xmlprependsetup", actions = lxml.installsetup, arguments = { 1, "string", "string" } } -- 2:*
-implement { name = "xmlappendsetup", actions = lxml.installsetup, arguments = { 2, "string", "string" } } -- 2:*
-implement { name = "xmlbeforesetup", actions = lxml.installsetup, arguments = { 3, "string", "string", "string" } } -- 2:*
-implement { name = "xmlaftersetup", actions = lxml.installsetup, arguments = { 4, "string", "string", "string" } } -- 2:*
-implement { name = "xmlprependdocumentsetup", actions = lxml.installsetup, arguments = { 1, "string", "string" } }
-implement { name = "xmlappenddocumentsetup", actions = lxml.installsetup, arguments = { 2, "string", "string" } }
-implement { name = "xmlbeforedocumentsetup", actions = lxml.installsetup, arguments = { 3, "string", "string", "string" } }
-implement { name = "xmlafterdocumentsetup", actions = lxml.installsetup, arguments = { 4, "string", "string" } }
-implement { name = "xmlremovesetup", actions = lxml.removesetup, arguments = { "string", "string" } } -- 1:*
-implement { name = "xmlremovedocumentsetup", actions = lxml.removesetup, arguments = { "string", "string" } }
-implement { name = "xmlflushdocumentsetups", actions = lxml.flushsetups, arguments = { "string", "string", "string" } } -- 2:*
-implement { name = "xmlresetdocumentsetups", actions = lxml.resetsetups, arguments = "string" }
-
-implement { name = "xmlgetindex", actions = lxml.getindex, arguments = { "string", "string" } }
-implement { name = "xmlwithindex", actions = lxml.withindex, arguments = { "string", "string", "string" } }
-
-implement { name = "xmlsetentity", actions = xml.registerentity, arguments = { "string", "string" } }
-implement { name = "xmltexentity", actions = lxml.registerentity, arguments = { "string", "string" } }
-
-implement { name = "xmlsetcommandtotext", actions = lxml.setcommandtotext, arguments = "string" }
-implement { name = "xmlsetcommandtonone", actions = lxml.setcommandtonone, arguments = "string" }
-
-implement { name = "xmlstarttiming", actions = function() statistics.starttiming(lxml) end }
-implement { name = "xmlstoptiming", actions = function() statistics.stoptiming (lxml) end }
-
--- kind of special (3rd argument is a function)
-
-commands.xmlsetfunction = lxml.setaction
diff --git a/Master/texmf-dist/tex/context/base/m-arabtex.mkii b/Master/texmf-dist/tex/context/base/m-arabtex.mkii
deleted file mode 100644
index dea1cae252d..00000000000
--- a/Master/texmf-dist/tex/context/base/m-arabtex.mkii
+++ /dev/null
@@ -1,450 +0,0 @@
-%D \module
-%D [ file=m-arabtex, % was font-arb,
-%D version=2003.02.22, % 1999.11.06,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Arabic,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% 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\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
-%D Wisse and Imran Ahsan Nyazee asked me if \CONTEXT\ could
-%D support \ARABTEX, a package that provides right to left
-%D typesetting of (several variants of) arab and hebrew.
-%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 This is a beta version, since I still have to take care of some
-%D macros that conflict with existing stuff.
-
-\unprotect
-
-\definesystemvariable{ARABTEX}
-
-\def\setupARABTEX
- {\getparameters[\??ARABTEX]}
-
-\setupARABTEX
- [\s!rscale=1.2,
- \c!before=,
- \c!after=,
- \c!inner=\setarab,
- \c!style=\setarabicfont\fontstylesuffix]
-
-%D A few (maybe too) simple hooks into the font mechanism. The
-%D hook into the language module is not yet done.
-
-% \unexpanded\def\setarabicfont#1% rscale
-% {\scratchdimen\@@ARABTEXrscale\bodyfontsize
-% \font\arbfont\truefontname{Arabic#1} at \currentfontscale\scratchdimen
-% \setx@skels
-% \newfonttrue
-% \arbfont}
-%
-% more modern
-%
-% \unexpanded\def\setarabicfont#1% rscale
-% {\definefont[arbfont][Arabic#1 sa \@@ARABTEXrscale]%
-% \setx@skels
-% \newfonttrue
-% \arbfont}
-%
-% more efficient
-
-\unexpanded\def\setarabicfont#1%
- {\setx@skels
- \newfonttrue
- \definedfont[Arabic#1 sa \ARABTEXparameter\s!rscale]}
-
-%D Just to be compatible with Arab\TEX\ we define:
-
-\unexpanded\def\nash {\setarabicfont\s!Regular}
-\unexpanded\def\nashbf {\setarabicfont\s!Bold }
-\unexpanded\def\pnash {\setarabicfont\s!Regular}
-\unexpanded\def\pnashbf{\setarabicfont\s!Bold }
-\unexpanded\def\xnash {\setarabicfont\s!Regular}
-\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 \CONTEXT\ way and define an anvironment that we later can
-%D adapt.
-
-\newif\if@ignore
-\newif\if@endpe
-
-\def\setupARABTEXalternative[#1]%
- {\dodoubleempty\getparameters[\??ARABTEX#1]}
-
-\def\defineARABTEXalternative
- {\dodoubleempty\dodefineARABTEXalternative}
-
-\def\dodefineARABTEXalternative[#1][#2]%
- {\iffirstargument % \startarab is defined but used already
- \getparameters
- [\??ARABTEX#1]
- [\c!before=\@@ARABTEXbefore,
- \c!after=\@@ARABTEXafter,
- \c!inner=\@@ARABTEXinner,
- \c!style=\@@ARABTEXstyle,
- \s!rscale=\@@ARABTEXrscale,
- #2]%
- \setvalue {\e!start#1}{\displayARABTEXalternative{#1}}%
- \unexpanded\setvalue{#1}{\inlineARABTEXalternative {#1}}%
- \unexpanded\def\RL{\getvalue{#1}}%
- \unexpanded\def\LR{\a@LR}%
- \let\R=\RL
- \let\L=\LR
- \expandafter\all@wcmd\csname\e!stop#1\endcsname
- \else
- \defineARABTEXalternative[arabic]%
- \fi}
-
-\def\initializeARABTEXinternals
- {\ARABTEXparameter\c!inner
- \the\everyARABTEXpreset}
-
-\newtoks \everyARABTEXpreset
-
-\let\currentARABTEXalternative\empty
-
-\def\ARABTEXparameter#1%
- {\csname\??ARABTEX\currentARABTEXalternative#1\endcsname}
-
-\def\inlineARABTEXalternative#1#2%
- {\bgroup
- \edef\currentARABTEXalternative{#1}%
- \initializeARABTEXinternals
- \a@RL{#2}%
- \egroup}
-
-\def\displayARABTEXalternative#1%
- {\dodoubleempty\dostartARABTEXalternative[#1]}
-
-\def\dostartARABTEXalternative[#1][#2]%
- {\begingroup
- \edef\currentARABTEXalternative{#1}%
- \getparameters[\??ARABTEX\currentARABTEXalternative][#2]%
- \ifnum1<0\ARABTEXparameter\c!n\relax
- \startcolumns
- \else
- \ARABTEXparameter\c!before
- \fi
- \initializeARABTEXinternals
- \initializeARABTEXend
- \arabtext
- \initializeARABTEXalternative}
-
-\def\initializeARABTEXalternative
- {\ARABTEXparameter\c!style}
-
-\def\initializeARABTEXend% \CONTEXT\ does use \end quite differently
- {\long\def\end##1%
- {\endarabtext
- \ifnum1<0\ARABTEXparameter\c!n\relax
- \stopcolumns
- \else
- \ARABTEXparameter\c!after
- \fi
- \endgroup}%
- \let\a@l@end\end
- \letvalue{\e!stop\currentARABTEXalternative}=\end
- \long\def\end##1%
- {\endarabtext
- \endgroup
- \if@ignore\global\@ignorefalse\expandafter\ignorespaces\fi}}
-
-%D Arabic verbatim.
-
-\def\typearab{\a@@verb}
-
-%D Some \LATEX\ macros.
-
-\def \makeatletter{\unprotect}
-\def \makeatother {\protect}
-\def \typeout {\writestatus{arabtex}}
-
-%D We have to save some macros.
-
-\let\ARABTEXversion=\empty
-
-\def\startloadingARABTEX% ugly hacks
- {\catcode`!=12
- \catcode`?=12
- \pushmacro\output \let \output \scratchtoks
- \pushmacro\LaTeX \let \LaTeX \undefined
- \pushmacro\CJK \let \CJK \undefined
-% \pushmacro\peek@token \let \peek@token \undefined
-% \pushmacro\edmacloaded \let \edmacloaded \undefined
- \pushmacro\year \let \year \normalyear
- \pushmacro\month \let \month \normalmonth
- \pushmacro\day \let \day \normalday
- \pushmacro\input \def \input ##1 {\normalinput ##1 }
- \pushmacro\linewidth
- \pushmacro\datum \def\datum {\toks0}
- \pushmacro\version \def\version {\toks2}
- \pushmacro\theversion \let\theversion \ARABTEXversion
- \pushmacro\emphasize
- \pushmacro\cap}
-
-\def\stoploadingARABTEX
- {\catcode`!=11
- \catcode`?=11
- \popmacro\cap
- \popmacro\emphasize
- \popmacro\theversion
- \popmacro\version
- \popmacro\datum
- \popmacro\linewidth
- \popmacro\input
- \popmacro\day
- \popmacro\month
- \popmacro\year
-% \popmacro\edmacloaded
-% \popmacro\peek@token
- \popmacro\CJK
- \popmacro\LaTeX
- \popmacro\output}
-
-%D We save some macros:
-
-\startloadingARABTEX
-
-%D When loading \ARABTEX\ we have to set back the~! and~?.
-
-\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.
-
-\let\ARABTEXversion\theversion
-\let\ARABTEXcap \cap
-
-\appendtoks
- \let\cap\ARABTEXcap
-\to \everyARABTEXpreset
-
-\def\ARABTEXsh@ft#1%
- {\dimen@.00#1ex
- \multiply\dimen@\slantperpoint
- \kern-.0156\dimen@}
-
-\appendtoks
- \let\sh@ft\ARABTEXsh@ft
-\to \everyARABTEXpreset
-
-\def\ARABTEXd#1%
- {{\o@lign{\relax#1\crcr\hidewidth\sh@ft{10}%
- .\hidewidth}}}
-
-\def\ARABTEXb#1%
- {{\o@lign{\relax#1\crcr\hidewidth\sh@ft{29}%
- \vbox to.2ex{\hbox{\char22}\vss}\hidewidth}}}
-
-\appendtoks
- \let\b\ARABTEXb
- \let\d\ARABTEXd
-\to \everyARABTEXpreset
-
-\def \ARABTEXbreakA {\hfill\break}
-\def \ARABTEXbreakB {\break}
-\edef\ARABTEXbar {\string|}
-\def \ARABTEXcomma {\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
-
-\appendtoks
- \let\\=\ARABTEXbreakA
- \let\|=\ARABTEXbreakB
- \let |=\ARABTEXbar
- \let\,=\ARABTEXcomma
-\to \everyARABTEXpreset
-
-\let\ARABTEXprotect\relax
-
-\appendtoks
- \let\protect\ARABTEXprotect
-\to \everyARABTEXpreset
-
-%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.
-
-% \bgroup
-% \catcode`\<=\@other
-% \unexpanded\gdef\a@ins
-% {\ifmmode
-% \expandafter<%
-% \else
-% \dontleavehmode \bgroup
-% \arab@codes \set@arabfont \@waslafalse \@wasfalse
-% \expandafter\arab@insert
-% \fi}
-% \unexpanded\gdef\<{\a@ins}
-% \catcode`\<=\active
-% \global\let<=\a@ins
-% \egroup
-%
-% cleaner:
-
-\defineactivecharacter < {\a@ins} \unexpanded\gdef\<{\a@ins}%
-
-\def\normal@a@ins
- {\dontleavehmode % context prefers this instead of \leavevmode
- \bgroup
- \arab@codes
- \set@arabfont
- \@waslafalse
- \@wasfalse
- \arab@insert}
-
-\unexpanded\gdef\a@ins
- {\mathortext<\normal@a@ins}
-
-%D We also need to register a few macros:
-
-\all@wcmd\initializeARABTEXalternative % no argument, internal command
-\all@wcmd\tx % no argument, small font
-\all@wcmd\txx % no argument, smaller font
-
-%D We also hook it into the presetter.
-
-\appendtoks
- \let\normaltx \tx \def\tx {\normaltx \setarabicfont\fontstylesuffix}%
- \let\normaltxx\txx\def\txx{\normaltxx\setarabicfont\fontstylesuffix}%
-\to \everyARABTEXpreset
-
-%D The main definitions are:
-
-\definefontsynonym [ArabicRegular] [xnsh14]
-\definefontsynonym [ArabicBold] [xnsh14bf]
-
-\defineARABTEXalternative
- [arabic]
- [\c!inner=\setarab,
- \c!style=\setarabicfont\fontstylesuffix]
-
-\defineARABTEXalternative
- [farsi]
- [\c!inner=\setfarsi,
- \c!style=\setarabicfont\fontstylesuffix]
-
-\defineARABTEXalternative
- [urdu]
- [\c!inner=\seturdu,
- \c!style=\setarabicfont\fontstylesuffix]
-
-\defineARABTEXalternative
- [maghribi]
- [\c!inner=\setmaghribi,
- \c!style=\setarabicfont\fontstylesuffix]
-
-%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)
-%D and .. (video) concentrates on the common grounds of arabs
-%D and jews: their ancestor Abram. Listening to the \CDROM's
-%D of {\em The Cave}, provided me the right ambiance for
-%D filling in the details of this module. In {\em The Cave},
-%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 load Hebrew support as well:
-
-\unexpanded\def\sethebrewfont#1%
- {\setx@skels
- \newfonttrue
- \definedfont[Hebrew#1 sa \ARABTEXparameter\s!rscale]}
-
-% \let \setheb \sethebrew
-
-\unexpanded\def\pheb {\sethebrewfont\s!Regular}
-\unexpanded\def\phebbf{\sethebrewfont\s!Bold}
-
-% \startloadingARABTEX
-
-% \ReadFile{hebtex.sty}
-% \ReadFile{apatch.sty}
-% \ReadFile{hepatch.sty}
-
-% \stoploadingARABTEX
-
-\definefontsynonym [HebrewRegular] [hclassic]
-\definefontsynonym [HebrewBold] [hcaption]
-
-\defineARABTEXalternative
- [hebrew]
- [\c!inner=\sethebrew,
- \c!style=\sethebrewfont\fontstylesuffix]
-
-%D Now we're done:
-
-\protect \endinput
-
-% everyoutput : \charsubdefmax \arab@charsubdefmax
-
-% \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!bijlage=al-mul.haqu
-
-% \usemodule[arabtex]
-%
-% \usetypescript[postscript] \switchtotypeface[postscript]
-%
-% \setarab \novocalize
-%
-% \starttext
-%
-% \placecontent
-%
-% \section{\<mu.hammad>} % short arabic use \< .. >
-% \section{\<mu.hammad>} % short arabic use \< .. >
-%
-% \startarabic
-% mu.hammad 'i_d q"aAm zay"d" + i_d yaqUm zyd + A_d zyd q"aAm
-%
-% mu.hammad 'i_d q"aAm zay"d" + i_d yaqUm zyd + A_d zyd q"aAm
-% \stoparabic
-%
-% \section{\<al-maq.sad>}
-%
-% \startarabic
-% mu.hammad 'i_d q"aAm zay"d" + i_d yaqUm zyd + A_d zyd q"aAm
-% \stoparabic
-%
-% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-barcodes.mkiv b/Master/texmf-dist/tex/context/base/m-barcodes.mkiv
deleted file mode 100644
index e4c43b37650..00000000000
--- a/Master/texmf-dist/tex/context/base/m-barcodes.mkiv
+++ /dev/null
@@ -1,122 +0,0 @@
-%D \module
-%D [ file=m-barcodes,
-%D version=2010.03.14,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=Barcodes,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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{barcodes}{the 'zint' module is a better choice}
-
-% \startTEXpage
-% \startPSTRICKS
-% \pspicture(-4mm,-1mm)(38mm,26mm)
-% \psbarcode{9781860742712}{includetext guardwhitespace}{ean13}%
-% \endpspicture
-% \stopPSTRICKS
-% \stopTEXpage
-
-% 978-94-90688-01-1
-%
-% 978 = ean isbn identifier (979 also)
-% 94 = country code
-% 90688 = publisher code
-% 01 = title 1
-% 1 = checksum
-
-\usemodule[pstricks]
-
-\usePSTRICKSmodule[pst-barcode]
-
-\definefont[barcodefont][file:ocrb10]
-% \definefont[barcodefont][file:texgyreheros-regular]
-
-\startluacode
-moduledata.barcodes = { }
-
-local function split(code)
- local t = { string.byte(code,1,#code) }
- if #t >= 12 then
- local s = 0
- for i=1,11,2 do
- s = s + (t[i]-48)
- end
- for i=2,12,2 do
- s = s + 3 * (t[i]-48)
- end
- local m = s % 10
- local c = (m > 0 and (10 - m)) or 0
- return t, s, m, c
- end
-end
-
-function moduledata.barcodes.isbn_1(original)
- local code = string.gsub(original,"%-","")
- local t, s, m, c = split(code)
- if t then
- if #t == 13 then
- local e = ((c == t[13] - 48) and "correct") or "wrong"
- logs.report("isbn code","code=%s, sum=%s, checksum=%s, modulo=%s, status=%s",original,s,m,c,e)
- else
- logs.report("isbn code","code=%s, sum=%s, checksum=%s, modulo=%s",original,s,m,c)
- code= code .. c
- end
- end
- context(code)
-end
-
-function moduledata.barcodes.isbn_2(original)
- local code = string.gsub(original,"%-","")
- local t, s, m, c = split(code)
- if t and #t == 12 then
- original = original .. "-" .. c
- end
- context(original)
-end
-\stopluacode
-
-\startsetups barcode:isbn
- \scale
- [width=5cm]
- {
- \vbox {
- \hbox {
- \hskip3.7mm
- \scale[width=34mm]{\barcodefont ISBN \ctxlua{moduledata.barcodes.isbn_2("\getvariable{barcode}{code}")}}
- }
- \par
- \normalexpanded { \noexpand \setPSTRICKS {
- \noexpand \pspicture(-4mm,-1mm)(38mm,26mm)
- \noexpand \psbarcode {
- \ctxlua{moduledata.barcodes.isbn_1("\getvariable{barcode}{code}")}
- } {
- includetext guardwhitespace
- } {
- ean13
- }
- \noexpand \endpspicture
- }
- \noexpand \processPSTRICKS }
- }
- }
-\stopsetups
-
-\unexpanded\def\barcode[#1]%
- {\bgroup
- \setvariables[barcode][type=isbn,#1]%
- \directsetup{barcode:\getvariable{barcode}{type}}%
- \egroup}
-
-\continueifinputfile{m-barcodes.mkiv}
-
-\starttext
- \startTEXpage
- \barcode[type=isbn,code=978-94-90688-01-1]
- \stopTEXpage
-\stoptext
-
diff --git a/Master/texmf-dist/tex/context/base/m-chart.lua b/Master/texmf-dist/tex/context/base/m-chart.lua
deleted file mode 100644
index f1e7f4cb937..00000000000
--- a/Master/texmf-dist/tex/context/base/m-chart.lua
+++ /dev/null
@@ -1,945 +0,0 @@
-if not modules then modules = { } end modules ['x-flow'] = {
- version = 1.001,
- comment = "companion to m-flow.mkvi",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
--- when we can resolve mpcolor at the lua end we will
--- use metapost.graphic(....) directly
-
--- todo: labels
-
-moduledata.charts = moduledata.charts or { }
-
-local gsub, match, find, format, lower = string.gsub, string.match, string.find, string.format, string.lower
-local setmetatableindex = table.setmetatableindex
-local P, S, C, Cc, lpegmatch = lpeg.P, lpeg.S, lpeg.C, lpeg.Cc, lpeg.match
-
-local report_chart = logs.reporter("chart")
-
-local variables = interfaces.variables
-
-local v_yes = variables.yes
-local v_no = variables.no
-local v_none = variables.none
-local v_standard = variables.standard
-local v_overlay = variables.overlay
-local v_round = variables.round
-local v_test = variables.test
-
-local defaults = {
- chart = {
- name = "",
- option = "",
- backgroundcolor = "",
- width = 100*65536,
- height = 50*65536,
- dx = 30*65536,
- dy = 30*65536,
- offset = 0,
- bodyfont = "",
- dot = "",
- hcompact = variables_no,
- vcompact = variables_no,
- autofocus = "",
- focus = "",
- labeloffset = 5*65536,
- commentoffset = 5*65536,
- exitoffset = 0,
-
- },
- shape = { -- FLOS
- rulethickness = 65536,
- default = "",
- framecolor = "darkblue",
- backgroundcolor = "lightgray",
- },
- focus = { -- FLOF
- rulethickness = 65536,
- framecolor = "darkred",
- backgroundcolor = "gray",
- },
- line = { -- FLOL
- rulethickness = 65536,
- radius = 10*65536,
- color = "darkgreen",
- corner = "",
- dash = "",
- arrow = "",
- offset = "",
- },
- set = { -- FLOX
- },
- split = {
- nx = 3,
- ny = 3,
- command = "",
- marking = "",
- before = "",
- after = "",
- }
-}
-
-local validshapes = {
- ["node"] = { kind = "shape", number = 0 },
- ["action"] = { kind = "shape", number = 24 },
- ["procedure"] = { kind = "shape", number = 5 },
- ["product"] = { kind = "shape", number = 12 },
- ["decision"] = { kind = "shape", number = 14 },
- ["archive"] = { kind = "shape", number = 19 },
- ["loop"] = { kind = "shape", number = 35 },
- ["wait"] = { kind = "shape", number = 6 },
- ["subprocedure"] = { kind = "shape", number = 20 },
- ["singledocument"] = { kind = "shape", number = 32 },
- ["multidocument"] = { kind = "shape", number = 33 },
-
- ["right"] = { kind = "line", number = 66 },
- ["left"] = { kind = "line", number = 67 },
- ["up"] = { kind = "line", number = 68 },
- ["down"] = { kind = "line", number = 69 },
-}
-
-local validlabellocations = {
- l = "l", left = "l",
- r = "r", right = "r",
- t = "t", top = "t",
- b = "b", bottom = "b",
- lt = "lt",
- rt = "rt",
- lb = "lb",
- rb = "rb",
- tl = "tl",
- tr = "tr",
- bl = "bl",
- br = "br",
-}
-
-local validcommentlocations = {
- l = "l", left = "l",
- r = "r", right = "r",
- t = "t", top = "t",
- b = "b", bottom = "b",
- lt = "lt",
- rt = "rt",
- lb = "lb",
- rb = "rb",
- tl = "tl",
- tr = "tr",
- bl = "bl",
- br = "br",
-}
-
-local validtextlocations = {
- l = "l", left = "l",
- r = "r", right = "r",
- t = "t", top = "t",
- b = "b", bottom = "b",
- c = "c", center = "c",
- m = "c", middle = "m",
- lt = "lt",
- rt = "rt",
- lb = "lb",
- rb = "rb",
- tl = "lt",
- tr = "rt",
- bl = "lb",
- br = "rb",
-}
-
-setmetatableindex(validshapes,function(t,k)
- local l = gsub(lower(k)," ","")
- local v = rawget(t,l)
- if not v then
- local n = tonumber(k)
- if n then
- v = { kind = "shape", number = n }
- else
- v = rawget(t,"action")
- end
- end
- t[k] = v
- return v
-end)
-
-local charts = { }
-
-local data, hash, temp, last_x, last_y, name
-
-function commands.flow_start_chart(chartname)
- data = { }
- hash = { }
- last_x, last_y = 0, 0
- name = chartname
-end
-
-function commands.flow_stop_chart()
- charts[name] = {
- data = data,
- hash = hash,
- last_x = last_x,
- last_y = last_y,
- }
- data, hash, temp = nil, nil, nil
-end
-
--- function commands.flow_set(chartname,chartdata)
--- local hash = { }
--- local data = { }
--- charts[name] = {
--- data = data,
--- hash = hash,
--- }
--- for i=1,#chartdata do
--- local di = data[i]
--- local name = di.name or ""
--- if name then
--- data[#data+1] = {
--- name = name,
--- labels = di.labels or { },
--- comments = di.comments or { },
--- exits = di.exits or { },
--- connections = di.connections or { },
--- settings = di.settings or { },
--- x = di.x or 1,
--- y = di.y or 1,
--- }
--- hash[name] = i
--- end
--- end
--- end
-
-function commands.flow_reset(chartname)
- charts[name] = nil
-end
-
-function commands.flow_set_current_cell(n)
- temp = data[tonumber(n)] or { }
-end
-
-function commands.flow_start_cell(settings)
- temp = {
- texts = { },
- labels = { },
- exits = { },
- connections = { },
- settings = settings,
- x = 1,
- y = 1,
- realx = 1,
- realy = 1,
- name = "",
- }
-end
-
-function commands.flow_stop_cell()
- data[#data+1] = temp
- hash[temp.name or #data] = temp
-end
-
-function commands.flow_set_name(str)
- temp.name = str
-end
-
-function commands.flow_set_shape(str)
- temp.shape = str
-end
-
-function commands.flow_set_destination(str)
- temp.destination = str
-end
-
-function commands.flow_set_text(align,str)
- temp.texts[#temp.texts+1] = {
- location = align,
- text = str,
- }
-end
-
-function commands.flow_set_overlay(str)
- temp.overlay = str
-end
-
-function commands.flow_set_focus(str)
- temp.focus = str
-end
-
-function commands.flow_set_figure(str)
- temp.figure = str
-end
-
-function commands.flow_set_label(location,text)
- temp.labels[#temp.labels+1] = {
- location = location,
- text = text,
- }
-end
-
-function commands.flow_set_comment(location,text)
- local connections = temp.connections
- if connections then
- local connection = connections[#connections]
- if connection then
- local comments = connection.comments
- if comments then
- comments[#comments+1] = {
- location = location,
- text = text,
- }
- end
- end
- end
-end
-
-function commands.flow_set_exit(location,text)
- temp.exits[#temp.exits+1] = {
- location = location,
- text = text,
- }
-end
-
-function commands.flow_set_include(name,x,y,settings)
- data[#data+1] = {
- include = name,
- x = x,
- y = y,
- -- settings = settings,
- }
-end
-
-local function inject(includedata,data,hash)
- local subchart = charts[includedata.include]
- if not subchart then
- return
- end
- local subdata = subchart.data
- if not subdata then
- return
- end
- local xoffset = (includedata.x or 1) - 1
- local yoffset = (includedata.y or 1) - 1
- local settings = includedata.settings
- for i=1,#subdata do
- local si = subdata[i]
- if si.include then
- inject(si,data,hash)
- else
- local x = si.x + xoffset
- local y = si.y + yoffset
- local t = {
- x = x,
- y = y,
- realx = x,
- realy = y,
- settings = settings,
- }
- setmetatableindex(t,si)
- data[#data+1] = t
- hash[si.name or #data] = t
- end
- end
-end
-
-local function pack(data,field)
- local list, max = { }, 0
- for e=1,#data do
- local d = data[e]
- local f = d[field]
- list[f] = true
- if f > max then
- max = f
- end
- end
- for i=1,max do
- if not list[i] then
- for e=1,#data do
- local d = data[e]
- local f = d[field]
- if f > i then
- d[field] = f - 1
- end
- end
- end
- end
-end
-
-local function expanded(chart,chartsettings)
- local expandeddata = { }
- local expandedhash = { }
- local expandedchart = {
- data = expandeddata,
- hash = expandedhash,
- }
- setmetatableindex(expandedchart,chart)
- local data = chart.data
- local hash = chart.hash
- for i=1,#data do
- local di = data[i]
- if di.include then
- inject(di,expandeddata,expandedhash)
- else
- expandeddata[#expandeddata+1] = di
- expandedhash[di.name or #expandeddata] = di
- end
- end
- --
- expandedchart.settings = chartsettings or { }
- -- make locals
- chartsettings.shape = chartsettings.shape or { }
- chartsettings.focus = chartsettings.focus or { }
- chartsettings.line = chartsettings.line or { }
- chartsettings.set = chartsettings.set or { }
- chartsettings.split = chartsettings.split or { }
- chartsettings.chart = chartsettings.chart or { }
- setmetatableindex(chartsettings.shape,defaults.shape)
- setmetatableindex(chartsettings.focus,defaults.focus)
- setmetatableindex(chartsettings.line ,defaults.line )
- setmetatableindex(chartsettings.set ,defaults.set )
- setmetatableindex(chartsettings.split,defaults.split)
- setmetatableindex(chartsettings.chart,defaults.chart)
- --
- if chartsettings.chart.vcompact == v_yes then
- pack(expandeddata,"y")
- end
- if chartsettings.chart.hcompact == v_yes then
- pack(expandeddata,"x")
- end
- --
- for i=1,#expandeddata do
- local cell = expandeddata[i]
- local settings = cell.settings
- if not settings then
- cell.settings = chartsettings
- else
- settings.shape = settings.shape or { }
- settings.focus = settings.focus or { }
- settings.line = settings.line or { }
- setmetatableindex(settings.shape,chartsettings.shape)
- setmetatableindex(settings.focus,chartsettings.focus)
- setmetatableindex(settings.line ,chartsettings.line)
- end
- end
- return expandedchart
-end
-
-local splitter = lpeg.splitat(",")
-
-function commands.flow_set_location(x,y)
- if type(x) == "string" and not y then
- x, y = lpegmatch(splitter,x)
- end
- if not x or x == "" then
- x = last_x
- elseif type(x) == "number" then
- -- ok
- elseif x == "+" then
- x = last_x + 1
- elseif x == "-" then
- x = last_x - 1
- elseif find(x,"^[%+%-]") then
- x = last_x + (tonumber(x) or 0)
- else
- x = tonumber(x)
- end
- if not y or y == "" then
- y = last_y
- elseif type(y) == "number" then
- -- ok
- elseif y == "+" then
- y = last_y + 1
- elseif x == "-" then
- y = last_y - 1
- elseif find(y,"^[%+%-]") then
- y = last_y + (tonumber(y) or 0)
- else
- y = tonumber(y)
- end
- temp.x = x or 1
- temp.y = y or 1
- temp.realx = x or 1
- temp.realy = y or 1
- last_x = x or last_x
- last_y = y or last_y
-end
-
-function commands.flow_set_connection(location,displacement,name)
- local dx, dy = lpegmatch(splitter,displacement)
- dx = tonumber(dx)
- dy = tonumber(dy)
- temp.connections[#temp.connections+1] = {
- location = location,
- dx = dx or 0,
- dy = dy or 0,
- name = name,
- comments = { },
- }
-end
-
-local function visible(chart,cell)
- local x, y = cell.x, cell.y
- return
- x >= chart.from_x and x <= chart.to_x and
- y >= chart.from_y and y <= chart.to_y and cell
-end
-
-local function process_cells(chart,xoffset,yoffset)
- local data = chart.data
- if not data then
- return
- end
- local focus = utilities.parsers.settings_to_hash(chart.settings.chart.focus or "")
- for i=1,#data do
- local cell = visible(chart,data[i])
- if cell then
- local settings = cell.settings
- local shapesettings = settings.shape
- local shape = cell.shape
- if not shape or shape == "" then
- shape = shapesettings.default or "none"
- end
- if shape ~= v_none then
- local shapedata = validshapes[shape]
- context("flow_begin_sub_chart ;") -- when is this needed
- if shapedata.kind == "line" then
- local linesettings = settings.line
- context("flow_shape_line_color := \\MPcolor{%s} ;", linesettings.color)
- context("flow_shape_fill_color := \\MPcolor{%s} ;", linesettings.backgroundcolor)
- context("flow_shape_line_width := %p ; ", linesettings.rulethickness)
- elseif focus[cell.focus] or focus[cell.name] then
- local focussettings = settings.focus
- context("flow_shape_line_color := \\MPcolor{%s} ;", focussettings.framecolor)
- context("flow_shape_fill_color := \\MPcolor{%s} ;", focussettings.backgroundcolor)
- context("flow_shape_line_width := %p ; ", focussettings.rulethickness)
- else
- local shapesettings = settings.shape
- context("flow_shape_line_color := \\MPcolor{%s} ;", shapesettings.framecolor)
- context("flow_shape_fill_color := \\MPcolor{%s} ;", shapesettings.backgroundcolor)
- context("flow_shape_line_width := %p ; " , shapesettings.rulethickness)
- end
- context("flow_peepshape := false ;") -- todo
- context("flow_new_shape(%s,%s,%s) ;",cell.x+xoffset,cell.y+yoffset,shapedata.number)
- context("flow_end_sub_chart ;")
- end
- end
- end
-end
-
--- todo : make lpeg for splitter
-
-local sign = S("+p") / "1"
- + S("-m") / "-1"
-
-local full = C(P("left"))
- + C(P("right"))
- + C(P("top"))
- + C(P("bottom"))
-
-local char = P("l") / "left"
- + P("r") / "right"
- + P("t") / "top"
- + P("b") / "bottom"
-
-local space = P(" ")^0
-
-local what = space
- * (sign + Cc("0"))
- * space
- * (full + char)
- * space
- * (sign + Cc("0"))
- * space
- * (full + char)
- * space
- * P(-1)
-
--- print(lpegmatch(what,"lr"))
--- print(lpegmatch(what,"+l+r"))
--- print(lpegmatch(what,"+l"))
--- print(lpegmatch(what,"+ left+r "))
-
-local function process_connections(chart,xoffset,yoffset)
- local data = chart.data
- local hash = chart.hash
- if not data then
- return
- end
- local settings = chart.settings
- for i=1,#data do
- local cell = visible(chart,data[i])
- if cell then
- local connections = cell.connections
- for j=1,#connections do
- local connection = connections[j]
- local othername = connection.name
- local othercell = hash[othername]
- if othercell then -- and visible(chart,data[i]) then
- local cellx, celly = cell.x, cell.y
- local otherx, othery, location = othercell.x, othercell.y, connection.location
- if otherx > 0 and othery > 0 and cellx > 0 and celly > 0 and connection.location then
- local what_cell, where_cell, what_other, where_other = lpegmatch(what,location)
- if what_cell and where_cell and what_other and where_other then
- local linesettings = settings.line
- context("flow_smooth := %s ;", linesettings.corner == v_round and "true" or "false")
- context("flow_dashline := %s ;", linesettings.dash == v_yes and "true" or "false")
- context("flow_arrowtip := %s ;", linesettings.arrow == v_yes and "true" or "false")
- context("flow_touchshape := %s ;", linesettings.offset == v_none and "true" or "false")
- context("flow_dsp_x := %s ; flow_dsp_y := %s ;",connection.dx or 0, connection.dy or 0)
- context("flow_connection_line_color := \\MPcolor{%s} ;",linesettings.color)
- context("flow_connection_line_width := %p ;",linesettings.rulethickness)
- context("flow_connect_%s_%s (%s) (%s,%s,%s) (%s,%s,%s) ;",where_cell,where_other,j,cellx,celly,what_cell,otherx,othery,what_other)
- context("flow_dsp_x := 0 ; flow_dsp_y := 0 ;")
- end
- end
- end
- end
- end
- end
-end
-
-local texttemplate = "\\setvariables[flowcell:text][x=%s,y=%s,text={%s},align={%s},figure={%s},destination={%s}]"
-
-local splitter = lpeg.splitat(":")
-
-local function process_texts(chart,xoffset,yoffset)
- local data = chart.data
- local hash = chart.hash
- if not data then
- return
- end
- for i=1,#data do
- local cell = visible(chart,data[i])
- if cell then
- local x = cell.x or 1
- local y = cell.y or 1
- local texts = cell.texts
- for i=1,#texts do
- local text = texts[i]
- local data = text.text
- local align = validlabellocations[text.align or ""] or text.align or ""
- local figure = i == 1 and cell.figure or ""
- local destination = i == 1 and cell.destination or ""
- context('flow_chart_draw_text(%s,%s,textext("%s")) ;',x,y,format(texttemplate,x,y,data,align,figure,destination))
- end
- local labels = cell.labels
- for i=1,#labels do
- local label = labels[i]
- local text = label.text
- local location = validlabellocations[label.location or ""] or label.location or ""
- if text and location then
- context('flow_chart_draw_label(%s,%s,"%s",textext("\\strut %s")) ;',x,y,location,text)
- end
- end
- local exits = cell.exits
- for i=1,#exits do
- local exit = exits[i]
- local text = exit.text
- local location = validlabellocations[exit.location or ""]
- if text and location then
- -- maybe make autoexit an option
- if location == "l" and x == chart.from_x + 1 or
- location == "r" and x == chart.to_x - 1 or
- location == "t" and y == chart.to_y - 1 or
- location == "b" and y == chart.from_y + 1 then
- context('flow_chart_draw_exit(%s,%s,"%s",textext("\\strut %s")) ;',x,y,location,text)
- end
- end
- end
- local connections = cell.connections
- for i=1,#connections do
- local comments = connections[i].comments
- for j=1,#comments do
- local comment = comments[j]
- local text = comment.text
- local location = comment.location or ""
- local length = 0
- -- "tl" "tl:*" "tl:0.5"
- local loc, len = lpegmatch(splitter,location) -- do the following in lpeg
- if len == "*" then
- location = validcommentlocations[loc] or ""
- if location == "" then
- location = "*"
- else
- location = location .. ":*"
- end
- elseif loc then
- location = validcommentlocations[loc] or "*"
- length = tonumber(len) or 0
- else
- location = validcommentlocations[location] or ""
- end
- if text and location then
- context('flow_chart_draw_comment(%s,%s,%s,"%s",%s,textext("\\strut %s")) ;',x,y,i,location,length,text)
- end
- end
- end
- end
- end
-end
-
-local function getchart(settings,forced_x,forced_y,forced_nx,forced_ny)
- if not settings then
- print("no settings given")
- return
- end
- local chartname = settings.chart.name
- if not chartname then
- print("no name given")
- return
- end
- local chart = charts[chartname]
- if not chart then
- print("no such chart",chartname)
- return
- end
--- chart = table.copy(chart)
- chart = expanded(chart,settings)
- local chartsettings = chart.settings.chart
- local autofocus = chart.settings.chart.autofocus
- if autofocus then
- autofocus = utilities.parsers.settings_to_hash(autofocus)
- if not next(autofocus) then
- autofocus = false
- end
- end
- -- check natural window
- local x = forced_x or tonumber(chartsettings.x)
- local y = forced_y or tonumber(chartsettings.y)
- local nx = forced_nx or tonumber(chartsettings.nx)
- local ny = forced_ny or tonumber(chartsettings.ny)
- --
- local minx, miny, maxx, maxy = 0, 0, 0, 0
- local data = chart.data
- for i=1,#data do
- local cell = data[i]
- if not autofocus or autofocus[cell.name] then -- offsets probably interfere with autofocus
- local x = cell.x
- local y = cell.y
- if minx == 0 or x < minx then minx = x end
- if miny == 0 or y < miny then miny = y end
- if minx == 0 or x > maxx then maxx = x end
- if miny == 0 or y > maxy then maxy = y end
- end
- end
- -- print("1>",x,y,nx,ny)
- -- print("2>",minx, miny, maxx, maxy)
- -- check of window should be larger (maybe autofocus + nx/ny?)
- if autofocus then
- -- x and y are ignored
- if nx and nx > 0 then
- maxx = minx + nx - 1
- end
- if ny and ny > 0 then
- maxy = miny + ny - 1
- end
- else
- if x and x > 0 then
- minx = x
- end
- if y and y > 0 then
- miny = y
- end
- if nx and nx > 0 then
- maxx = minx + nx - 1
- end
- if ny and ny > 0 then
- maxy = miny + ny - 1
- end
- end
--- print("3>",minx, miny, maxx, maxy)
- --
- local nx = maxx - minx + 1
- local ny = maxy - miny + 1
- -- relocate cells
- for i=1,#data do
- local cell = data[i]
- cell.x = cell.realx - minx + 1
- cell.y = cell.realy - miny + 1
- end
- chart.from_x = 1
- chart.from_y = 1
- chart.to_x = nx
- chart.to_y = ny
- chart.nx = nx
- chart.ny = ny
- --
- chart.shift_x = minx + 1
- chart.shift_y = miny + 1
- --
- return chart
-end
-
-local function makechart(chart)
- local settings = chart.settings
- local chartsettings = settings.chart
- --
- context.begingroup()
- context.forgetall()
- --
- context.startMPcode()
- context("if unknown context_flow : input mp-char.mpiv ; fi ;")
- context("flow_begin_chart(0,%s,%s);",chart.nx,chart.ny)
- --
- if chartsettings.option == v_test or chartsettings.dot == v_yes then
- context("flow_show_con_points := true ;")
- context("flow_show_mid_points := true ;")
- context("flow_show_all_points := true ;")
- elseif chartsettings.dot ~= "" then -- no checking done, private option
- context("flow_show_%s_points := true ;",chartsettings.dot)
- end
- --
- local backgroundcolor = chartsettings.backgroundcolor
- if backgroundcolor and backgroundcolor ~= "" then
- context("flow_chart_background_color := \\MPcolor{%s} ;",backgroundcolor)
- end
- --
- local shapewidth = chartsettings.width
- local gridwidth = shapewidth + 2*chartsettings.dx
- local shapeheight = chartsettings.height
- local gridheight = shapeheight + 2*chartsettings.dy
- local chartoffset = chartsettings.offset
- local labeloffset = chartsettings.labeloffset
- local exitoffset = chartsettings.exitoffset
- local commentoffset = chartsettings.commentoffset
- context("flow_grid_width := %p ;", gridwidth)
- context("flow_grid_height := %p ;", gridheight)
- context("flow_shape_width := %p ;", shapewidth)
- context("flow_shape_height := %p ;", shapeheight)
- context("flow_chart_offset := %p ;", chartoffset)
- context("flow_label_offset := %p ;", labeloffset)
- context("flow_exit_offset := %p ;", exitoffset)
- context("flow_comment_offset := %p ;", commentoffset)
- --
- local radius = settings.line.radius
- local rulethickness = settings.line.rulethickness
- local dx = chartsettings.dx
- local dy = chartsettings.dy
- if radius < rulethickness then
- radius = 2.5*rulethickness
- if radius > dx then
- radius = dx
- end
- if radius > dy then
- radius = dy
- end
- end
- context("flow_connection_line_width := %p ;", rulethickness)
- context("flow_connection_smooth_size := %p ;", radius)
- context("flow_connection_arrow_size := %p ;", radius)
- context("flow_connection_dash_size := %p ;", radius)
- --
- local offset = chartsettings.offset -- todo: pass string
- if offset == v_none or offset == v_overlay or offset == "" then
- offset = -2.5 * radius -- or rulethickness?
- elseif offset == v_standard then
- offset = radius -- or rulethickness?
- end
- context("flow_chart_offset := %p ;",offset)
- --
- context("flow_reverse_y := true ;")
- process_cells(chart,0,0)
- process_connections(chart,0,0)
- process_texts(chart,0,0)
- -- context("clip_chart(%s,%s,%s,%s) ;",x,y,nx,ny) -- todo: draw lines but not shapes
- context("flow_end_chart ;")
- context.stopMPcode()
- context.endgroup()
-end
-
-local function splitchart(chart)
- local settings = chart.settings
- local splitsettings = settings.split
- local chartsettings = settings.chart
- --
- local name = chartsettings.name
- --
- local from_x = chart.from_x
- local from_y = chart.from_y
- local to_x = chart.to_x
- local to_y = chart.to_y
- --
- local step_x = splitsettings.nx or to_x
- local step_y = splitsettings.ny or to_y
- local delta_x = splitsettings.dx or 0
- local delta_y = splitsettings.dy or 0
- --
- report_chart("spliting %a from (%s,%s) upto (%s,%s) with steps (%s,%s) and overlap (%s,%s)",
- name,from_x,from_y,to_x,to_y,step_x,step_y,delta_x,delta_y)
- --
- local part_x = 0
- local first_x = from_x
- while true do
- part_x = part_x + 1
- local last_x = first_x + step_x - 1
- local done = last_x >= to_x
- if done then
- last_x = to_x
- end
--- if first_x >= to_x then
--- break
--- end
- local part_y = 0
- local first_y = from_y
- while true do
- part_y = part_y + 1
- local last_y = first_y + step_y - 1
- local done = last_y >= to_y
- if done then
- last_y = to_y
- end
--- if first_y >= to_y then
--- break
--- end
- --
-local data = chart.data
-for i=1,#data do
- local cell = data[i]
--- inspect(cell)
- local cx, cy = cell.x, cell.y
- if cx >= first_x and cx <= last_x then
- if cy >= first_y and cy <= last_y then
- report_chart("part (%s,%s) of %a is split from (%s,%s) -> (%s,%s)",part_x,part_y,name,first_x,first_y,last_x,last_y)
- local x = first_x
- local y = first_y
- local nx = last_x - first_x + 1
- local ny = last_y - first_y + 1
- context.beforeFLOWsplit()
- context.handleFLOWsplit(function()
- makechart(getchart(settings,x,y,nx,ny)) -- we need to pass frozen settings !
- end)
- context.afterFLOWsplit()
- break
- end
- end
-end
- --
- if done then
- break
- else
- first_y = last_y + 1 - delta_y
- end
- end
- if done then
- break
- else
- first_x = last_x + 1 - delta_x
- end
- end
-end
-
-function commands.flow_make_chart(settings)
- local chart = getchart(settings)
- if chart then
- local settings = chart.settings
- if settings then
- local chartsettings = settings.chart
- if chartsettings and chartsettings.split == v_yes then
- splitchart(chart)
- else
- makechart(chart)
- end
- else
- makechart(chart)
- end
- end
-end
diff --git a/Master/texmf-dist/tex/context/base/m-chart.mkii b/Master/texmf-dist/tex/context/base/m-chart.mkii
deleted file mode 100644
index 8a5f480ee7f..00000000000
--- a/Master/texmf-dist/tex/context/base/m-chart.mkii
+++ /dev/null
@@ -1,1315 +0,0 @@
-%D \module
-%D [ file=m-chart,
-%D version=1998.10.10,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Flow Charts,
-%D author={Hans Hagen \& Ton Otten},
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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: \localpushmacro/\localpopmacro (dohandleflowchart etc)
-% todo: make mkiv variant
-% todo: use dimexpr/numspr
-
-% will be redone with layers and dimexpr or even better, by just using
-% textext .. a nice example of old code
-
-%D This is an experimental module. Pieces of code will be moved
-%D to other modules. More features are possible but will be
-%D interfaces later.
-%D
-%D When finished this module will be documented. The main macro
-%D is still a rather big one and there is some redundant and
-%D slow code that needs a clean up.
-
-% arrow, dash
-% crossing
-% \goto -> \normalgoto
-% class -> class:name (ref prefix)
-% c, automatisch geen overlap zoeken
-% eind eerder chart connecties
-% relateren aan korps
-% check op bestaan naam, bestaan shape
-% auto als extern figuur
-% subchart
-% pijlen
-% focus
-% ook nog \MPmessage
-% areapath -> krappe vlak
-% clippath -> gehele vlak
-%
-% offset : clip offset
-% breedte : breedte cel
-% hoogte : hoogte cel
-% dx : halve afstand in breedte (grid breedte = breedte + 2dx)
-% dy : halve afstand in hoogte (grid hoogte = hoogte + 2dy)
-% x : x offset (clipping)
-% y : y offset (clipping)
-% nx : minimaal aantal cellen horizontaal
-% ny : minimaal aantal cellen vertikaal
-%
-% shape none en geen equivalent maken
-%
-% kaderkleur achtergrondkleur
-% lijnkleur lijndikte
-% focus focuskaderkleur focusachtergrondkleur
-% richting
-%
-% focus koppelen aan kleur
-
-\unprotect
-
-\definesorting [flowchart] [flowcharts] [\v!none] % no access
-\setupsorting [flowchart] [\c!state=\v!stop] % off by default
-
-\def\@FLOW@{@FLOW@}
-\def\@FLOC@{@FLOC@}
-\def\@FLOX@{@FLOX@}
-
-\def\@@FLOW{@@FLOW}
-\def\@@FLOL{@@FLOL}
-\def\@@FLOS{@@FLOS}
-\def\@@FLOF{@@FLOF}
-\def\@@FLOT{@@FLOT}
-\def\@@FLOX{@@FLOX}
-
-\def\@@MPx {@@MPx}
-\def\@@MPy {@@MPy}
-
-\def\FLOWbufferprefix{flw-}
-
-\def\processFLOWbuffer#1{\getbuffer[\FLOWbufferprefix#1]}
-\def\typeFLOWbuffer #1{\typebuffer[\FLOWbufferprefix#1]}
-
-\def\setFLOWname#1#2% funny hack that makes sure that we get
- {\bgroup % names that are acceptable for METAPOST
- \lccode`0=`a\lccode`1=`b\lccode`2=`c\lccode`3=`d\lccode`4=`e%
- \lccode`5=`f\lccode`6=`g\lccode`7=`h\lccode`8=`i\lccode`9=`j%
- \lccode` =`\_\lccode`-=`\_\lccode`_=`\_%
- \lowercase{\gdef#1{#2}}%
- \egroup}
-
-% een gobble als default is sneller, en dan alleen setten als
-% nodig
-
-\def\resetFLOWcell
- {% variables
- \global\let\FLOWname \empty
- \global\let\FLOWalign \empty
- \global\let\FLOWshape \empty
- \global\let\FLOWlocation \empty
- \global\let\FLOWtext \empty
- \global\let\FLOWhelp \empty
- \global\let\FLOWdestination\empty
- \global\let\FLOWoverlay \empty
- \global\let\FLOWfocus \empty
- \global\let\tFLOWlabel \empty
- \global\let\bFLOWlabel \empty
- \global\let\lFLOWlabel \empty
- \global\let\rFLOWlabel \empty
- \global\let\bcFLOWlabel \empty
- \global\let\tcFLOWlabel \empty
- \global\let\lcFLOWlabel \empty
- \global\let\rcFLOWlabel \empty
- \global\let\tFLOWexit \empty
- \global\let\bFLOWexit \empty
- \global\let\lFLOWexit \empty
- \global\let\rFLOWexit \empty
- % commands
- \let\name \doFLOWname
- \let\shape \doFLOWshape
- \let\destination\doFLOWdestination
- \let\location \doFLOWlocation
- \let\focus \doFLOWfocus
- \let\overlay \doFLOWoverlay
- \let\figure \doFLOWfigure
- \let\text \doFLOWtext
- \let\comment \doFLOWcomment
- \let\label \doFLOWlabel
- \let\help \doFLOWhelp
- \let\connection \doFLOWconnection
- \let\exit \doFLOWexit
- % convenience commands
- \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}
-
-\def\doFLOWshape#1%
- {\gdef\FLOWshape{#1}\ignorespaces}
-
-\def\doFLOWdestination#1%
- {\gdef\FLOWdestination{#1}\ignorespaces}
-
-\def\doFLOWlocation#1%
- {\setFLOWlocation#1\end\ignorespaces}
-
-\def\doFLOWfocus#1%
- {\gdef\FLOWfocus{#1}\ignorespaces}
-
-\def\doFLOWoverlay#1%
- {\gdef\FLOWoverlay{#1}\ignorespaces}
-
-\def\doFLOWfigure#1%
- {\defineoverlay[\s!dummy][\overlayfigure{#1}]%
- \overlay\s!dummy}
-
-\def\doFLOWtext
- {\dosingleempty\dodoFLOWtext}
-
-\def\dodoFLOWtext[#1]% % #2%
- {\gdef\FLOWalign{#1}\gdef\FLOWtext}% {#2}}
-
-\def\doFLOWcomment[#1]#2%
- {\ignorespaces\dogobblesingleempty}
-
-\def\doFLOWlabel[#1]#2% wordt dit gebruikt ?
- {\setgvalue{#1FLOWlabel}{#2}\ignorespaces}
-
-\def\doFLOWhelp#1%
- {\gdef\FLOWhelp{#1}\ignorespaces}
-
-\def\doFLOWconnection
- {\dodoubleempty\dodoFLOWconnection}
-
-\def\dodoFLOWconnection[#1][#2]#3%
- {\ignorespaces}
-
-\def\doFLOWconnect
- {\connection}
-
-\def\doFLOWlocate
- {\location}
-
-\def\doFLOWexit[#1]#2%
- {\setgvalue{#1FLOWexit}{#2}\ignorespaces}
-
-\def\startFLOWchart
- {\bgroup
- \let\stopFLOWchart\egroup
- \obeylines % lelijk, buffers nog eens fatsoeneren
- \dodoubleempty\dostartFLOWchart}
-
-\def\dostartFLOWchart[#1][#2]%
- {\preparenextFLOWchart{#1}{#2}%
- \dostartbuffer[\FLOWbufferprefix\nofFLOWcharts][startFLOWchart][stopFLOWchart]}
-
-\def\defineFLOWchart%
- {\dodoubleempty\dodefineFLOWchart}
-
-\long\def\dodefineFLOWchart[#1][#2]#3%
- {\preparenextFLOWchart{#1}{#2}%
- \setbuffer[\FLOWbufferprefix\nofFLOWcharts]#3\endbuffer}
-
-\def\preparenextFLOWchart#1#2%
- {\doglobal\increment\nofFLOWcharts
- \flowchart{#1}%
- \setxvalue{\@FLOW@-#1}{\noexpand\dohandleflowchart[\nofFLOWcharts][#2]}}
-
-\def\setupFLOWcharts{\dodoubleargument\getparameters[\@@FLOW]}
-\def\setupFLOWlines {\dodoubleargument\getparameters[\@@FLOL]}
-\def\setupFLOWshapes{\dodoubleargument\getparameters[\@@FLOS]}
-\def\setupFLOWfocus {\dodoubleargument\getparameters[\@@FLOF]}
-\def\setupFLOWsets {\dodoubleargument\getparameters[\@@FLOX]}
-
-\setupFLOWcharts
- [\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,
- \c!ny=0, % 1,
- \c!x=1,
- \c!y=1,
- \c!autofocus=,
- \c!focus=,
- \c!background=, % \v!color,
- \c!backgroundcolor=\s!white,
- \c!rulethickness=\linewidth,
- \c!frame=\v!off,
- \c!framecolor=]
-
-\setupFLOWlines
- [\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!framecolor=FLOWframecolor,
- \c!background=\v!color,
- \c!backgroundcolor=FLOWbackgroundcolor,
- \c!backgroundscreen=\@@rsscreen,
- \c!rulethickness=.15\bodyfontsize, % 2pt,
- \c!offset=.5\bodyfontsize]
-
-\setupFLOWfocus
- [\c!framecolor=FLOWfocuscolor,
- \c!background=\@@FLOSbackground,
- \c!backgroundcolor=\@@FLOSbackgroundcolor,
- \c!backgroundscreen=\@@FLOSbackgroundscreen,
- \c!rulethickness=\@@FLOSrulethickness,
- \c!offset=\@@FLOSoffset]
-
-\definecolor [FLOWfocuscolor] [s=.2]
-\definecolor [FLOWlinecolor] [s=.5]
-\definecolor [FLOWframecolor] [s=.7]
-\definecolor [FLOWbackgroundcolor] [s=.9]
-
-\newcounter\includeFLOWx
-\newcounter\includeFLOWy
-
-\def\includeFLOWchart
- {\dodoubleempty\doincludeFLOWchart}
-
-\def\doincludeFLOWchart[#1][#2]%
- {\pushmacro\includeFLOWx
- \pushmacro\includeFLOWy
- \getparameters[FLOWi][x=1,y=1,#2]%
- \increment(\includeFLOWx,0\FLOWix)\decrement\includeFLOWx
- \increment(\includeFLOWy,0\FLOWiy)\decrement\includeFLOWy
- \def\dodoincludeFLOWchart##1%
- {\doifdefined{\@FLOW@-##1}
- {\globalpushmacro\dohandleflowchart % was local
- \gdef\dohandleflowchart[####1][####2]%
- {\globalpopmacro\dohandleflowchart % was local
- \resetFLOWlocation
- \processFLOWbuffer{####1}}%
- \getvalue{\@FLOW@-##1}}}%
- \processcommalist[#1]\dodoincludeFLOWchart
- \popmacro\includeFLOWx
- \popmacro\includeFLOWy}
-
-\def\resetFLOWlocation
- {\globallet\lastFLOWx\!!zerocount
- \globallet\lastFLOWy\!!zerocount}
-
-\def\dosetFLOWlocation[#1#2]#3#4%
- {\processaction
- [#1#2]
- [ +=>\scratchcounter\numexpr#4+ 1+#3\relax,
- -=>\scratchcounter\numexpr#4- 1+#3\relax,
- +#2=>\scratchcounter\numexpr#4+#2+#3\relax,
- -#2=>\scratchcounter\numexpr#4-#2+#3\relax,
- \s!default=>\scratchcounter\numexpr#4 +#3\relax,
- \s!unknown=>\scratchcounter\numexpr0#1#2+#3\relax]%
- \xdef#4{\the\scratchcounter}}
-
-\def\setFLOWlocation#1,#2\end
- {\dosetFLOWlocation[#1\empty]\includeFLOWx\lastFLOWx
- \dosetFLOWlocation[#2\empty]\includeFLOWy\lastFLOWy
- \xdef\FLOWlocation{\lastFLOWx,\lastFLOWy}}
-
-\def\FLOWshapes
- {node, action, procedure, product, decision, archive,
- loop, wait, subprocedure, singledocument, multidocument,
- sub procedure, single document, multi document, up, down,
- left, right}
-
-\def\FLOWlines
- {up, down, left, right}
-
-\def\FLOWsetconnect#1%
- {\donefalse
- \let\cFLOWfrom\empty
- \let\cFLOWto\empty
- \let\zFLOWfrom\!!zerocount
- \let\zFLOWto\!!zerocount
- \handletokens#1\with\doFLOWsetconnect
- \ifx\cFLOWto\empty\let\cFLOWfrom\empty\fi}
-
-\def\doFLOWsetconnect#1%
- {\ifx #1p%
- \ifdone\def\zFLOWto{+1}\else\def\zFLOWfrom{+1}\fi
- \else\ifx#1+%
- \ifdone\def\zFLOWto{+1}\else\def\zFLOWfrom{+1}\fi
- \else\ifx#1n%
- \ifdone\def\zFLOWto{-1}\else\def\zFLOWfrom{-1}\fi
- \else\ifx#1-%
- \ifdone\def\zFLOWto{-1}\else\def\zFLOWfrom{-1}\fi
- \else\ifdone
- \edef\cFLOWto{\FLOWconnector#1}%
- \else
- \edef\cFLOWfrom{\FLOWconnector#1}%
- \donetrue
- \fi\fi\fi\fi\fi}
-
-\def\FLOWconnector#1%
- {\if#1bbottom\else\if#1ttop\else\if#1lleft\else\if#1rright\fi\fi\fi\fi}
-
-\newif\ifFLOWscaling \FLOWscalingtrue
-
-\def\@@FLOW@@offset{\@@FLOWoffset}
-
-\def\getFLOWchart
- {\dodoubleempty\dogetFLOWchart}
-
-\def\dogetFLOWchart[#1][#2]%
- {\doifundefinedelse{\@FLOW@-#1}
- {\writestatus{FLOW}{unknown chart #1}%
- \framed
- [\c!width=12\bodyfontsize,\c!height=8\bodyfontsize]
- {\tttf [chart #1]}}
- {\dodogetFLOWchart[#1][#2]}}
-
-\def\dodogetFLOWchart[#1][#2]% to be split a bit more
- {\vbox\bgroup
- \insidefloattrue
- \forgetall
- \dontcomplain
- % \offinterlineskip % we now explicitly use \nointerlineskip later on
- \def\dohandleflowchart[##1][##2]%
- {\def\currentFLOWnumber{##1}%
- \getparameters[\@@FLOW][##2]}%
- \getvalue{\@FLOW@-#1}%
- \getparameters[\@@FLOW][#2]% dubbelop ?
- \doifsomething{\@@FLOWautofocus}
- {\checkFLOWautofocus}%
- %\message{AUTOSHAPE 3: (\@@FLOWx,\@@FLOWy)->(\@@FLOWnx,\@@FLOWny)}\wait
- \global\let\FLOWwidth \@@FLOWnx
- \global\let\FLOWheight\@@FLOWny
- \let\startFLOWcell\startFLOWcellA
- \resetFLOWlocation
- \processFLOWbuffer\currentFLOWnumber
- \ifcase\@@FLOWnx\relax \let\@@FLOWnx\FLOWwidth \fi
- \ifcase\@@FLOWny\relax \let\@@FLOWny\FLOWheight \fi
- \doifnothing{\@@FLOWmaxwidth\@@FLOWmaxheight}{\FLOWscalingfalse}%
- \ifFLOWscaling
- \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=\@@FLOWmaxwidth
- \dimen2=\@@FLOWwidth
- \dimen4=\@@FLOWdx
- \advance\dimen2 2\dimen4
- \dimen2=\@@FLOWnx\dimen2
- \advance\dimen2 2\dimen4
- \ifdim\dimen2>\dimen0
- \advance\scratchcounter \minusone
- \else
- \dimen0=\@@FLOWmaxheight
- \dimen2=\@@FLOWheight
- \dimen4=\@@FLOWdy
- \advance\dimen2 2\dimen4
- \dimen2=\@@FLOWny\dimen2
- \advance\dimen2 2\dimen4
- \ifdim\dimen2>\dimen0
- \advance\scratchcounter \minusone
- \else
- \exitloop
- \fi
- \fi
- \else
- \exitloop
- \fi}%
- \expanded{\switchtobodyfont[\the\scratchcounter pt]}%
- \forgetall
- % \offinterlineskip % needed ?
- \else\ifx\@@FLOWbodyfont\empty\else
- \expanded{\switchtobodyfont[\@@FLOWbodyfont]}% \expanded ?
- \fi\fi
- \global\let\FLOWcells\empty
- \dimen0=\@@FLOWwidth
- \edef\FLOWshapewidth{\the\dimen0}%
- \dimen2=\@@FLOWdx
- \advance\dimen0 2\dimen2
- \edef\FLOWgridwidth{\the\dimen0}%
- \dimen0=\@@FLOWheight
- \edef\FLOWshapeheight{\the\dimen0}%
- \dimen2=\@@FLOWdy
- \advance\dimen0 2\dimen2
- \edef\FLOWgridheight{\the\dimen0}%
- \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\@@FLOLradius{\the\scratchdimen}%
- \ifdim\@@FLOLradius>\@@FLOWdx
- \scratchdimen=\@@FLOWdx
- \edef\@@FLOLradius{\the\scratchdimen}%
- \fi
- \ifdim\@@FLOLradius>\@@FLOWdy
- \scratchdimen=\@@FLOWdy
- \edef\@@FLOLradius{\the\scratchdimen}%
- \fi
- \else
- \scratchdimen=\@@FLOLradius
- \edef\@@FLOLradius{\the\scratchdimen}%
- \fi
- \processaction % magic 2.5
- [\@@FLOWoffset]
- [ \v!none=>\scratchdimen=-2.5\scratchdimen,
- \v!overlay=>\scratchdimen=-2.5\scratchdimen,
- \v!standard=>\scratchdimen=\scratchdimen,
- \s!unknown=>\scratchdimen=\@@FLOWoffset,
- \s!default=>\scratchdimen=-2.5\scratchdimen]%
- \edef\@@FLOW@@offset{\the\scratchdimen}%
- \forgetall
- \offinterlineskip
- \resetMPdrawing
- \doglobal\newcounter\FLOWcomment
- \startMPdrawing
- if unknown context_char : input mp-char.mpii ; fi ;
- grid_width := \FLOWgridwidth ;
- grid_height := \FLOWgridheight ;
- shape_width := \FLOWshapewidth ;
- shape_height := \FLOWshapeheight ;
- connection_line_width := \@@FLOLrulethickness ;
- connection_smooth_size := \@@FLOLradius ;
- connection_arrow_size := \@@FLOLradius ;
- connection_dash_size := \@@FLOLradius ;
- currentpicture := nullpicture ;
- begin_chart(0,\FLOWwidth,\FLOWheight);
- reverse_y := true ;
- chart_offset := \@@FLOW@@offset ;
- \stopMPdrawing
- \doifelsenothing\@@FLOWbackgroundcolor
- {\startMPdrawing
- chart_background_color := white ;
- \stopMPdrawing}
- {\startMPdrawing
- chart_background_color := \MPcolor{\@@FLOWbackgroundcolor} ;
- \stopMPdrawing}%
- \doif\@@FLOWoption\v!test
- {\startMPdrawing
- show_con_points := true ;
- show_mid_points := true ;
- show_all_points := true ;
- \stopMPdrawing}%
- \processaction % private
- [\@@FLOWdot]
- [ \v!yes=>\startMPdrawing
- show_con_points := true ;
- show_mid_points := true ;
- show_all_points := true ;
- \stopMPdrawing,
- \s!unknown=>\startMPdrawing
- show_\@@FLOWdot_points := true ;
- \stopMPdrawing]%
-\doglobal\newcounter\FLOWcomment
- \let\startFLOWcell\startFLOWcellB
- \resetFLOWlocation
- \processFLOWbuffer\currentFLOWnumber
-\doglobal\newcounter\FLOWcomment
- \let\startFLOWcell\startFLOWcellC
- \resetFLOWlocation
- \processFLOWbuffer\currentFLOWnumber
- \startMPdrawing
- clip_chart(\@@FLOWx,\@@FLOWy,\@@FLOWnx,\@@FLOWny) ;
- end_chart ;
- \stopMPdrawing
- \MPdrawingdonetrue
- \setbox0\hbox
- {\MPstaticgraphictrue
- \MPshiftdrawingfalse
- \getMPdrawing}%
- \def\MPmessage##1%
- {\writestatus{MP charts}{##1}}%
- \def\MPposition##1##2##3%
- {\setvalue{\@@MPx##1}{##2}\setvalue{\@@MPy##1}{##3}}%
- \def\MPclippath##1##2##3##4%
- {\def\clipMPllx{##1bp}\def\clipMPlly{##2bp}%
- \def\clipMPurx{##3bp}\def\clipMPury{##4bp}}%
- \def\MPareapath##1##2##3##4%
- {\def\areaMPllx{##1bp}\def\areaMPlly{##2bp}%
- \def\areaMPurx{##3bp}\def\areaMPury{##4bp}}%
- \getMPdata
- \doglobal\newcounter\FLOWcomment
- \let\startFLOWcell\startFLOWcellD
- \setbox2\vbox to \ht0
- {\forgetall % \offinterlineskip
- \resetFLOWlocation
- \processFLOWbuffer\currentFLOWnumber\vss}%
- \setbox2\hbox
- {\hskip\@@FLOW@@offset\lower\@@FLOW@@offset\box2}%
- \wd2\wd0\ht2\ht0\dp2\dp0
- \let\startFLOWcell\startFLOWcellE
- \setbox4\vbox to \ht0
- {\forgetall % \offinterlineskip
- \resetFLOWlocation
- \processFLOWbuffer\currentFLOWnumber\vss}%
- \setbox4\hbox
- {\hskip\@@FLOW@@offset\lower\@@FLOW@@offset\box4}%
- \wd4\wd0\ht4\ht0\dp4\dp0
- \doifelse\@@FLOWoption\v!test
- {\setbox6\vbox
- {\forgetall
- \vskip\@@FLOW@@offset
- \hskip\@@FLOW@@offset
- \basegrid
- [\c!x=\@@FLOWx,\c!nx=\@@FLOWnx,\c!dx=\withoutpt\FLOWgridwidth,
- \c!y=\@@FLOWy,\c!ny=\@@FLOWny,\c!dy=\withoutpt\FLOWgridheight,
- \c!xstep=1,\c!ystep=1,
- \c!unit=pt,\c!location=\v!middle]}%
- \wd6\wd0\ht6\ht0\dp6\dp0
- \setbox8\vbox
- {\forgetall
- \offinterlineskip
- \vskip\@@FLOW@@offset
- \dostepwiserecurse\@@FLOWy\@@FLOWny\plusone
- {\vbox to \FLOWgridheight
- {\vfill
- \hskip\@@FLOW@@offset
- \hbox
- {\dostepwiserecurse\@@FLOWx\@@FLOWnx\plusone
- {\hbox to \FLOWgridwidth
- {\hfill
- \framed
- [\c!framecolor=red,
- \c!width=\FLOWshapewidth,
- \c!height=\FLOWshapeheight]
- {}%
- \hfill}}}
- \vfill}}}%
- \wd8\wd0\ht8\ht0\dp8\dp0
- \framed
- [\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!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}
-
-% Pass A
-
-\long\def\startFLOWcellA#1\stopFLOWcell%
- {\resetFLOWcell
- \ignorespaces#1\unskip
- \expandafter\getFLOWlocationA\FLOWlocation\end
- \ignorespaces}
-
-\def\getFLOWlocationA#1,#2\end
- {\ifnum0#1>\FLOWwidth \xdef\FLOWwidth {#1}\fi
- \ifnum0#2>\FLOWheight\xdef\FLOWheight{#2}\fi}
-
-% Pass B
-%
-% beware: the - after \@FLOC@ is needed since name can be
-% empty and we don't want to redefine \@FLOC@ itself by
-% mistake
-
-\long\def\startFLOWcellB#1\stopFLOWcell
- {\resetFLOWcell\ignorespaces#1\unskip
- \setxvalue{\@FLOC@-\FLOWname}{\FLOWlocation}% kost veel cs's
- \ifx\FLOWshape\empty
- \global\let\FLOWshape\@@FLOSdefault
- \fi
- \doifnot\FLOWshape{none} % {\v!none}
- {\ExpandBothAfter\doifinsetelse{\FLOWshape}{\FLOWshapes}
- {\edef\FLOWshapetag{shape_\FLOWshape}% beter \expanded
- \@EA\setFLOWname\@EA\FLOWshapetag\@EA{\FLOWshapetag}}
- {\doifnumberelse\FLOWshape
- {\let\FLOWshapetag\FLOWshape}
- {\let\FLOWshapetag\empty}}%
- \ifx\FLOWshapetag\empty \else
- \ExpandBothAfter\doifinsetelse{\FLOWshape}{\FLOWlines}
- {\chardef\FLOWstate0 }
- {\ExpandBothAfter\doifcommonelse{\FLOWcell,\FLOWfocus}{\@@FLOWfocus}
- {\chardef\FLOWstate1 }
- {\chardef\FLOWstate2 }}%
- \startMPdrawing
- begin_sub_chart ;
- \ifcase\FLOWstate
- shape_line_color := \MPcolor{\@@FLOLcolor} ;
- shape_fill_color := \MPcolor{\@@FLOLcolor} ;
- shape_line_width := \@@FLOLrulethickness ;
- \or
- shape_line_color := \MPcolor{\@@FLOFframecolor} ;
- shape_fill_color := \MPcolor{\@@FLOFbackgroundcolor} ;
- shape_line_width := \@@FLOFrulethickness ;
- \or
- shape_line_color := \MPcolor{\@@FLOSframecolor} ;
- shape_fill_color := \MPcolor{\@@FLOSbackgroundcolor} ;
- shape_line_width := \@@FLOSrulethickness ;
- \fi
- %\ifx\FLOWoverlay\empty
- % peepshape := false ;
- %\else
- % peepshape := true ;
- %\fi
- peepshape := \ifx\FLOWoverlay\empty false \else true \fi ;
- new_shape(\FLOWlocation,\FLOWshapetag) ;
- end_sub_chart ;
- \stopMPdrawing
- \fi}%
- \ignorespaces}
-
-% Pass C
-
-\long\def\startFLOWcellC#1\stopFLOWcell%
- {\resetFLOWcell
-\pushmacro\lastFLOWx
-\pushmacro\lastFLOWy
- \ignorespaces#1\unskip % makes sure that vars are set
-\popmacro\lastFLOWy
-\popmacro\lastFLOWx
- \let\connection\doFLOWconnectionC
- \ignorespaces#1\unskip}
-
-\def\FLOWorigin{0,0}
-
-\def\doFLOWdisplace[#1,#2,#3]% experiment
- {dsp_x := #1 ; dsp_y := #2 ;}
-
-\def\doFLOWconnectionC
- {\dodoubleempty\dodoFLOWconnectionC}
-
-\def\dodoFLOWconnectionC[#1][#2]#3%
- {\doglobal\increment\FLOWcomment
- \setFLOWname\otherFLOWname{name_#3}%
- \doifdefinedelse{\@FLOC@-\FLOWname}
- {\edef\FLOWfrom{\getvalue{\@FLOC@-\FLOWname}}}
- {\let \FLOWfrom \FLOWorigin}%
- \ifx\FLOWfrom\FLOWorigin \else
- \doifdefinedelse{\@FLOC@-\otherFLOWname}
- {\edef\FLOWto {\getvalue{\@FLOC@-\otherFLOWname}}}
- {\let \FLOWto \FLOWorigin}%
- \ifx\FLOWto\FLOWorigin \else
- \FLOWsetconnect{#1}%
- \ifx\cFLOWfrom\empty \else
- \doifelse\@@FLOLcorner\v!round
- {\startMPdrawing smooth := true ; \stopMPdrawing}
- {\startMPdrawing smooth := false ; \stopMPdrawing}%
- \doifelse\@@FLOLdash\v!yes
- {\startMPdrawing dashline := true ; \stopMPdrawing}
- {\startMPdrawing dashline := false ; \stopMPdrawing}%
- \doifelse\@@FLOLarrow\v!yes
- {\startMPdrawing arrowtip := true ; \stopMPdrawing}
- {\startMPdrawing arrowtip := false ; \stopMPdrawing}%
- \doifelse\@@FLOLoffset\v!none
- {\startMPdrawing touchshape := true ; \stopMPdrawing}
- {\startMPdrawing touchshape := false ; \stopMPdrawing}%
-%\doifsomething{#2}
-% {\startMPdrawing
-% \doFLOWdisplace[0#2,0,0]%
-% \stopMPdrawing}%
- \startMPdrawing
-\doFLOWdisplace[0#2,0,0]%
- connection_line_color := \MPcolor{\@@FLOLcolor} ;
- connection_line_width := \@@FLOLrulethickness ;
- connect_\cFLOWfrom_\cFLOWto (\FLOWfrom,\zFLOWfrom) (\FLOWto,\zFLOWto) ;
-\doFLOWdisplace[0,0,0]%
- \stopMPdrawing
- \fi
- \fi
- \fi
- \ignorespaces}
-
-% Pass D
-
-\long\def\startFLOWcellD#1\stopFLOWcell
- {\resetFLOWcell
-\pushmacro\lastFLOWx
-\pushmacro\lastFLOWy
- \ignorespaces#1\unskip % presets vars
-\popmacro\lastFLOWy
-\popmacro\lastFLOWx
- \let\doprocessFLOWcell\doprocessFLOWcellD
- \expandafter\doprocessFLOWcellD\FLOWlocation\end
- \let\connection\doFLOWconnectionD
- \let\comment\doFLOWcommentD
- \ignorespaces#1\unskip\ignorespaces}
-
-\def\doFLOWconnectionD
- {\dodoubleempty\dodoFLOWconnectionD}
-
-\def\dodoFLOWconnectionD[#1][#2]#3%
- {\doglobal\increment\FLOWcomment
- \ignorespaces}
-
-\def\doFLOWcommentD[#1]#2%
- {\bgroup
- \let\FLOW \middlebox
- \let\FLOWb \bottombox
- \let\FLOWbl\bottomleftbox
- \let\FLOWbr\bottomrightbox
- \let\FLOWt \topbox
- \let\FLOWtl\topleftbox
- \let\FLOWtr\toprightbox
- \let\FLOWl \leftbox
- \let\FLOWlt\lefttopbox
- \let\FLOWlb\leftbottombox
- \let\FLOWr \rightbox
- \let\FLOWrt\righttopbox
- \let\FLOWrb\rightbottombox
- \let\FLOWc \middlebox
-%\ifdefined{FLOW#1}%
- \ifcase0\getvalue{\@@MPx\FLOWcomment}\getvalue{\@@MPy\FLOWcomment}\relax
- \else
- \ifdim\getvalue{\@@MPx\FLOWcomment}\s!bp<\areaMPllx\relax\else
- \ifdim\getvalue{\@@MPx\FLOWcomment}\s!bp>\areaMPurx\relax\else
- \ifdim\getvalue{\@@MPy\FLOWcomment}\s!bp<\areaMPlly\relax\else
- \ifdim\getvalue{\@@MPy\FLOWcomment}\s!bp>\areaMPury\relax\else
- \dimen0=\getvalue{\@@MPx\FLOWcomment}\s!bp
- \advance\dimen0 -\@@FLOW@@offset
- \advance\dimen0 -\clipMPllx
- \dimen2=\clipMPury
- \advance\dimen2 -\@@FLOW@@offset
- \advance\dimen2 -\getvalue{\@@MPy\FLOWcomment}\s!bp
- \setbox\scratchbox\hbox{\strut#2}%
- \boxoffset.5\bodyfontsize
- \setbox\scratchbox\hbox{\hskip\dimen0\lower\dimen2\getvalue{FLOW#1}{\box\scratchbox}}%
- \smashbox\scratchbox
- \box\scratchbox
- \boxoffset\zeropoint
- \nointerlineskip % really needed
- \fi
- \fi
- \fi
- \fi
- \fi
-%\fi
- \egroup
- \ignorespaces}
-
-% pass D
-
-\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}
-
-\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
- \def\FLOWx{#1}%
- \def\FLOWy{#2}%
- \directsetup{flowcell}%
- \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=\@@FLOSoffset]}%
- \framed
- [\c!frame=\v!off,\c!background=flowcell,
- \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
- \boxoffset\zeropoint
- \fi}
-
-% For Willy Egger:
-%
-% \startsetups flowcell
-% \definelayer
-% [flowcell]
-% [width=\FLOWshapewidth,
-% height=\FLOWshapeheight]
-% \setlayerframed
-% [flowcell]
-% [preset=rightbottom,offset=1ex]
-% [frame=off]
-% {\tx(\FLOWx,\FLOWy)}
-% \stopsetups
-
-% Pass E
-
-\long\def\startFLOWcellE#1\stopFLOWcell
- {\resetFLOWcell
- \ignorespaces#1\unskip
- \let\doprocessFLOWcell\doprocessFLOWcellE
- \expandafter\doprocessFLOWcell\FLOWlocation\end}
-
-\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\@@FLOWminx{100}\let\@@FLOWminy\@@FLOWminx
- \def\@@FLOWmaxx {0}\let\@@FLOWmaxy\@@FLOWmaxx
- \def\@@FLOWabsx {0}\let\@@FLOWabsy\@@FLOWabsx
- \let\startFLOWcell\startFLOWcellF
- \resetFLOWlocation
- \processFLOWbuffer\currentFLOWnumber
- %\message{AUTOSHAPE 1: (\@@FLOWminx,\@@FLOWminy)->(\@@FLOWmaxx,\@@FLOWmaxy)}%
- \ifnum\@@FLOWabsx<\@@FLOWmaxx\let\@@FLOWmaxx\@@FLOWabsx\fi
- \ifnum\@@FLOWabsy<\@@FLOWmaxy\let\@@FLOWmaxy\@@FLOWabsy\fi
- %\message{AUTOSHAPE 2: (\@@FLOWminx,\@@FLOWminy)->(\@@FLOWmaxx,\@@FLOWmaxy)}%
- \donetrue
- \ifnum\@@FLOWminx=100 \donefalse\fi
- \ifnum\@@FLOWminy=100 \donefalse\fi
- \ifnum\@@FLOWmaxx=0 \donefalse\fi
- \ifnum\@@FLOWmaxy=0 \donefalse\fi
- \doFLOWcheckF\@@FLOWx\@@FLOWminx\@@FLOWmaxx\@@FLOWnx
- \doFLOWcheckF\@@FLOWy\@@FLOWminy\@@FLOWmaxy\@@FLOWny}
-
-\def\startFLOWcellF#1\stopFLOWcell%
- {\resetFLOWcell
- \ignorespaces#1\unskip
- \expandafter\doFLOWlocationF\FLOWlocation\end}%
-
-\def\doFLOWlocationF#1,#2\end%
- {\ifnum#1>\@@FLOWabsx\def\@@FLOWabsx{#1}\fi
- \ifnum#2>\@@FLOWabsy\def\@@FLOWabsy{#2}\fi
- \ExpandBothAfter\doifinset{\FLOWcell}{\@@FLOWautofocus}
- {\dodoFLOWlocationF{#1}<-\@@FLOWminx
- \dodoFLOWlocationF{#1}>+\@@FLOWmaxx
- \dodoFLOWlocationF{#2}<-\@@FLOWminy
- \dodoFLOWlocationF{#2}>+\@@FLOWmaxy}}
-
-\def\dodoFLOWlocationF#1#2#3#4%
- {\ifnum#1#2#4\relax
- \!!counta=#1\advance\!!counta #31\relax
- \edef#4{\ifnum\!!counta<1 1\else\the\!!counta\fi}%
- \fi}
-
-\def\doFLOWcheckF#1#2#3#4%
- {\ifdone
- \let#1=#2%
- \!!counta=#3%
- \advance\!!counta \plusone\advance\!!counta -#2\relax
- \ifnum\!!counta<1 \!!counta=1 \fi
- \edef#4{\the\!!counta}%
- \else
- \let#1\!!plusone
- \let#4\!!zerocount % no {1}
- \fi}
-
-% \useFLOWchart[name][parent][setting,setting][additional settings]
-% \useFLOWchart[name][parent][additional settings]
-
-\let\currentFLOWchart\empty
-
-\def\useFLOWchart
- {\doquadrupleempty\douseFLOWchart}
-
-\def\douseFLOWchart[#1][#2][#3][#4]% name parent sets mainsettings
- {\iffourthargument
- \setvalue{\@FLOW@--#1}[##1]{\setgetFLOWchart[#2][#3][#4,##1]}%
- \else
- \checkparameters[#3]%
- \ifparameters
- \setvalue{\@FLOW@--#1}[##1]{\setgetFLOWchart[#2][][#3,##1]}%
- \else
- \setvalue{\@FLOW@--#1}[##1]{\setgetFLOWchart[#2][#3][##1]}%
- \fi
- \fi}
-
-\def\setgetFLOWchart[#1][#2][#3]%
- {\def\docommand##1{}% cell line focus ?
- \processcommalist[#2]\docommand
- \getFLOWchart[#1][#3]}
-
-\def\doFLOWchart[#1][#2]%
- {\hbox\bgroup\vbox\bgroup % vmode suppresses spaces
-\def\currentFLOWchart{#1}%
- \doifundefinedelse{\@FLOW@--#1}
- {\getFLOWchart[#1][#2]}
- {\getvalue{\@FLOW@--#1}[#2]}%
- \egroup\egroup}
-
-\def\FLOWchart%
- {\dodoubleempty\doFLOWchart}
-
-%D A hook into the help system.
-
-\def\showFLOWhelp#1%
- {\doifhelpinfo\FLOWhelp
- {\setbox#1=\hbox
- {\setbox\scratchbox=\hbox{\lower\@@FLOWdy\hbox
- {\helpbutton
- [\c!width=\wd0,\c!color=,\c!height=\@@FLOWdy,\c!frame=\v!no]%
- [\FLOWhelp]}}%
- \smashbox\scratchbox
- \setbox#1=\vbox
- {\forgetall\offinterlineskip\box#1\box\scratchbox}%
- \box#1}}}
-
-%D The next section is dedicated to splitting up charts.
-
-\def\getFLOWsize[#1]%
- {\bgroup\let\dodogetFLOWchart\dogetFLOWsize\FLOWchart[#1]\egroup}
-
-\def\dogetFLOWsize[#1][#2]%
- {\setbox\scratchbox=\vbox
- {\globallet\FLOWmaxwidth \!!zerocount
- \globallet\FLOWmaxheight\!!zerocount
- \def\getFLOWlocation##1,##2\end
- {\ifnum0##1>\FLOWmaxwidth \xdef\FLOWmaxwidth {##1}\fi
- \ifnum0##2>\FLOWmaxheight\xdef\FLOWmaxheight{##2}\fi}%
- \resetFLOWcell
- \long\def\startFLOWcell##1\stopFLOWcell
- {{##1\expandafter\getFLOWlocation\FLOWlocation\end}}%
- \def\dohandleflowchart[##1][##2]%
- {\resetFLOWlocation
- \processFLOWbuffer{##1}}%
- \getvalue{\@FLOW@-#1}}}
-
-\def\setupFLOWsplit%
- {\dodoubleargument\getparameters[\@@FLOT]}
-
-\setupFLOWsplit%
- [\c!nx=3,\c!ny=3,
- \c!dx=1,\c!dy=1,
- \c!command=,
- \c!marking=\v!on,
- \c!before=,\c!after=]
-
-\def\FLOWsplitx {1}
-\def\FLOWsplity {1}
-\def\FLOWsplitnx{1}
-\def\FLOWsplitny{1}
-
-\def\FLOWcharts
- {\dodoubleempty\doFLOWcharts}
-
-%D While splitting, the following variables are available:
-%D
-%D \starttyping
-%D \FLOWsplitnx \FLOWsplitny \FLOWsplitx \FLOWsplity
-%D \stoptyping
-
-\def\doFLOWcharts[#1][#2]%
- {\bgroup
- \getFLOWsize[#1]%
- \dodoFLOWcharts\relax
- \global\let\FLOWsplitnx\FLOWsplitx
- \global\let\FLOWsplitny\FLOWsplity
- \dodoFLOWcharts{\dododoFLOWcharts[#1][#2]}%
- \egroup}
-
-\def\dodoFLOWcharts#1%
- {\def\@@FLOTx{1}%
- \global\let\FLOWsplitx\@@FLOTx
- \doloop
- {\def\@@FLOTy{1}%
- \global\let\FLOWsplity\@@FLOTy
- \doloop
- {\bgroup
- \scratchcounter\FLOWmaxwidth
- \advance\scratchcounter -\@@FLOTx
- \advance\scratchcounter \plusone
- \ifnum\scratchcounter<\@@FLOTnx\edef\@@FLOTnx{\the\scratchcounter}\fi
- \scratchcounter\FLOWmaxheight
- \advance\scratchcounter -\@@FLOTy
- \advance\scratchcounter \plusone
- \ifnum\scratchcounter<\@@FLOTny\edef\@@FLOTny{\the\scratchcounter}\fi
- #1% does something with the float, or not
- \egroup
- \increment(\@@FLOTy,\@@FLOTny)%
- \ifnum\@@FLOTy>\FLOWmaxheight
- \exitloop
- \else
- \doglobal\increment\FLOWsplity
- \decrement(\@@FLOTy,\@@FLOTdy)%
- \fi}%
- \increment(\@@FLOTx,\@@FLOTnx)%
- \ifnum\@@FLOTx>\FLOWmaxwidth
- \exitloop
- \else
- \doglobal\increment\FLOWsplitx
- \decrement(\@@FLOTx,\@@FLOTdx)%
- \fi}}
-
-\def\dododoFLOWcharts[#1][#2]%
- {\bgroup
- \@@FLOTbefore
- \doifnot\@@FLOTmarking\v!on{\let\cuthbox\hbox}%
- \cuthbox
- {\@@FLOTcommand
- {\FLOWchart[#1][#2,
- \c!x=\@@FLOTx,\c!nx=\@@FLOTnx,
- \c!y=\@@FLOTy,\c!ny=\@@FLOTny]}}%
- \@@FLOTafter
- \egroup}
-
-%D An example of splitting is given below:
-%D
-%D \starttyping
-%D \setupFLOWsplit
-%D [nx=5,ny=10,
-%D dx=0,dy=0,
-%D before=,
-%D after=\page]
-%D
-%D \FLOWcharts[mybigflow]
-%D \stoptyping
-%D
-%D Or, one can say:
-%D
-%D \starttyping
-%D \splitfloat
-%D {\placefigure{What a big flowchart this is!}}
-%D {\FLOWcharts[mybigflow]}
-%D \stoptyping
-
-%D \macros
-%D {typeFLOWchart}
-%D
-%D For documentation purposes the following macro is
-%D provided. Watch the use of the first and last line hooks,
-%D which is needed because the start and stop commands are
-%D not part of the buffer.
-
-\def\typeFLOWchart[#1]%
- {\bgroup
- \def\dohandleflowchart[##1][##2]{\typeFLOWbuffer{##1}}%
- \defconvertedargument\firstverbatimfileline{\startFLOWchart[#1]}%
- \defconvertedargument\lastverbatimfileline {\stopFLOWchart}%
- \getvalue{\@FLOW@-#1}
- \egroup}
-
-%D New:
-%D
-%D \starttyping
-%D \setupFLOWcharts[command=\Whow]
-%D
-%D \startFLOWset[convert-en] % [tag][convert-en]
-%D \subFLOWchart[a][x=1,y=1,nx=3,ny=3]
-%D \subFLOWchart[b][x=1,y=2,nx=3,ny=3]
-%D \subFLOWchart[c][x=2,y=1,nx=3,ny=3]
-%D \stopFLOWset
-%D
-%D \def\Whow#1%
-%D {\ifnum\currentFLOWset=1 \framed{Some Chart}\fi}
-%D
-%D \FLOWset[convert-en] % [tag]
-%D
-%D \def\Whow#1%
-%D {\setuphead[state=high]
-%D \startstandardmakeup
-%D \centerbox{#1}
-%D \stopstandardmakeup}
-%D
-%D \FLOWset[convert-en] % [tag]
-%D \stoptyping
-
-\def\startFLOWset
- {\dodoubleempty\dostartFLOWset}
-
-\def\dostartFLOWset[#1][#2]#3\stopFLOWset % tag name data
- {\ifsecondargument
- \long\setvalue{\@FLOX@#1}{\dohandleFLOWset{#1}{#2}{#3}}%
- \else
- \long\setvalue{\@FLOX@#1}{\dohandleFLOWset{#1}{#1}{#3}}%
- \fi}
-
-\long\def\dohandleFLOWset#1#2#3% tag name data
- {\bgroup
- \def\subFLOWchart
- {\dodoubleempty\dosubFLOWchart}%
- \def\dosubFLOWchart[##1][##2]% subtag settings
- {\ifsecondargument
- \dodohandleFLOWset{#1}{##1}{#2}{##2}%
- \else
- \subFLOWchart[][##1]%
- \fi}%
- #3%
- \egroup}
-
-\def\dodohandleFLOWset#1#2#3#4% tag subtag name settings
- {\increment\currentFLOWset
- \bgroup
- \@@FLOXcommand
- {\ifnum\currentFLOWset=1 \pagereference[#1]\fi
- \doifsomething{#2}
- {\setupreferencing[\c!prefix=]%
- \pagereference[#1:#2]% -:#1:#2
- \setupreferencing[\c!prefix=#1:#2]}%
- \FLOWchart[#3][#4]}%
- \egroup}
-
-\def\FLOWset[#1]%
- {\newcounter\currentFLOWset
- \doifdefinedelse{\@FLOX@#1}
- {\getvalue{\@FLOX@#1}}
- {\dodohandleFLOWset{#1}{}{#1}{}}}
-
-\newcounter\currentFLOWset
-
-\setupFLOWsets
- [\c!command=]
-
-%D This will be an option:
-
-% \def\startFLOWchart%
-% {\dodoubleempty\dostartFLOWchart}
-%
-% \long\def\dostartFLOWchart[#1][#2]#3\stopFLOWchart
-% {\preparenextFLOWchart{#1}{#2}%
-% \long\setgvalue{\FLOWbufferprefix\nofFLOWcharts}{#3}}
-%
-% \long\def\dodefineFLOWchart[#1][#2]#3%
-% {\preparenextFLOWchart{#1}{#2}%
-% \long\setgvalue{\FLOWbufferprefix\nofFLOWcharts}{#3}}
-%
-% \def\processFLOWbuffer#1{\getvalue{\FLOWbufferprefix#1}}
-% \def\typeFLOWbuffer #1{[Sorry, no verbatim chart #1 available.]}
-
-%D The \XML\ interface:
-
-\startXMLdefinitions flowchart
-
-\defineXMLargument [flowchartdefinition]
- {\defineFLOWchart[\XMLpar{flowchartdefinition}{identifier}{unknown}]}
-
-\defineXMLpickup [flowcell]
- {\startFLOWcell
- \defineXMLargument[name]{\unspaceafter\name}%
- \defineXMLargument[shape]{\unspaceafter\shape}%
- \defineXMLnestedargument[text]{\text}}
- {\stopFLOWcell}
-
-\defineXMLenvironment [location] % global unspace/store
- {\bgroup\defineXMLpush[x]\defineXMLpush[y]}
- {\XMLunspace{x}\XMLunspace{y}%
- \expanded{\egroup\noexpand\location{\XMLpop{x},\XMLpop{y}}}}
-
-\defineXMLenvironment [connection]
- {\bgroup\defineXMLpush[type]\defineXMLpush[name]}%
- {\XMLunspace{type}\XMLunspace{name}%
- \expanded{\egroup\noexpand\connection[\XMLpop{type}]{\XMLpop{name}}}}
-
-\defineXMLsingular [flowchart]
- {\expanded{\FLOWchart[\XMLpar{flowchart}{identifier}{unknown}]}}
-
-\defineXMLdirective [flowchart] [shapes] \setupFLOWshapes
-\defineXMLdirective [flowchart] [lines] \setupFLOWlines
-
-\stopXMLdefinitions
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/m-chart.mkvi b/Master/texmf-dist/tex/context/base/m-chart.mkvi
deleted file mode 100644
index a0c8b2244a9..00000000000
--- a/Master/texmf-dist/tex/context/base/m-chart.mkvi
+++ /dev/null
@@ -1,540 +0,0 @@
-%D \module
-%D [ file=m-chart,
-%D version=2011.10.1, % 1998.10.10,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Flow Charts,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 (if used):
-% flowsets
-% autoscaling (bodyfontsteps)
-% comment
-% overlay
-%
-% todo:
-% \useFLOWchart[name][parent][setting,setting][additional settings]
-% \useFLOWchart[name][parent][additional settings]
-% setups
-% mp instance with less files
-
-\registerctxluafile{m-chart}{}
-
-\unprotect
-
-% todo: figure out a nice way to define the lot: share current and
-% support current as name (nb: we need to set parent then)
-
-\installcorenamespace {flowchart} % \def\??flch{@@flch} % chart
-\installcorenamespace {flowline} % \def\??flln{@@flln} % line
-\installcorenamespace {flowshape} % \def\??flsh{@@flsh} % shape
-\installcorenamespace {flowfocus} % \def\??flfc{@@flfc} % focus
-\installcorenamespace {flowsets} % \def\??flst{@@flst} % sets
-\installcorenamespace {flowsplit} % \def\??flsp{@@flsp} % split
-
-\installsimplecommandhandler \??flowchart {FLOWchart} \??flowchart % maybe just a setuphandler
-\installsimplecommandhandler \??flowline {FLOWline} \??flowline % maybe just a setuphandler
-\installsimplecommandhandler \??flowshape {FLOWshape} \??flowshape % maybe just a setuphandler
-\installsimplecommandhandler \??flowfocus {FLOWfocus} \??flowfocus % maybe just a setuphandler
-\installsimplecommandhandler \??flowsets {FLOWsets} \??flowsets % maybe just a setuphandler
-\installsimplecommandhandler \??flowsplit {FLOWsplit} \??flowsplit % maybe just a setuphandler
-
-\let\setupFLOWcharts\setupFLOWchart
-\let\setupFLOWlines \setupFLOWline
-\let\setupFLOWshapes\setupFLOWshape
-\let\setupFLOWsets \setupFLOWset
-
-\setupFLOWcharts
- [\c!width=12\bodyfontsize,
- \c!height=7\bodyfontsize,
- \c!offset=\FLOWlineparameter\c!rulethickness,
- \c!dx=2\bodyfontsize,
- \c!dy=2\bodyfontsize,
- \c!nx=0,
- \c!ny=0,
- \c!x=1,
- \c!y=1,
- \c!labeloffset=.5\bodyfontsize,
- \c!commentoffset=.5\bodyfontsize,
- \c!exitoffset=\zeropoint,
- % \c!split=\v!no,
- % \c!maxwidth=,
- % \c!maxheight=,
- % \c!option=,
- % \c!bodyfont=,
- % \c!dot=, % private option
- % \c!autofocus=,
- % \c!focus=,
- % \c!background=,
- % \c!framecolor=
- % \c!backgroundcolor=, % \s!white
- \c!rulethickness=.15\bodyfontsize, %\linewidth,
- \c!frame=\v!off]
-
-\setupFLOWlines
- [\c!corner=\v!round,
- \c!arrow=\v!yes,
- \c!dash=\v!no,
- \c!radius=.375\bodyfontsize,
- \c!color=FLOWlinecolor,
- \c!rulethickness=.15\bodyfontsize,
- \c!offset=\zeropoint]
-
-\setupFLOWshapes
- [\c!default=action,
- \c!framecolor=FLOWframecolor,
- \c!background=\v!color,
- \c!backgroundcolor=FLOWbackgroundcolor,
- \c!rulethickness=.15\bodyfontsize,
- \c!offset=.5\bodyfontsize]
-
-\setupFLOWfocus
- [\c!framecolor=FLOWfocuscolor,
- \c!background=\FLOWshapeparameter\c!background,
- \c!backgroundcolor=\FLOWshapeparameter\c!backgroundcolor,
- \c!rulethickness=\FLOWshapeparameter\c!rulethickness,
- \c!offset=\FLOWshapeparameter\c!offset]
-
-\setupFLOWsplit
- [\c!dx=0,
- \c!dy=0,
- % \c!command=,
- % \c!before=,
- % \c!after=,
- \c!nx=3,
- \c!ny=4]
-
-\unexpanded\def\beforeFLOWsplit{\FLOWsplitparameter\c!before}
-\unexpanded\def\afterFLOWsplit {\FLOWsplitparameter\c!after}
-\unexpanded\def\handleFLOWsplit{\FLOWsplitparameter\c!command}
-
-\definecolor [FLOWfocuscolor] [s=.2]
-\definecolor [FLOWlinecolor] [s=.5]
-\definecolor [FLOWframecolor] [s=.7]
-\definecolor [FLOWbackgroundcolor] [s=.9]
-
-\newtoks\everyFLOWchart
-
-\unexpanded\def\module_charts_process[#name]%
- {\ctxcommand{flow_start_chart("#name")}}
-
-\unexpanded\def\startFLOWchart
- {\startnointerference
- \the\everyFLOWchart
- \dosingleempty\module_charts_start_chart}
-
-\unexpanded\def\module_charts_start_chart[#name]%
- {\ctxcommand{flow_start_chart("#name")}}
-
-\unexpanded\def\stopFLOWchart
- {\ctxcommand{flow_stop_chart()}%
- \stopnointerference}
-
-\unexpanded\def\defineFLOWchart % for old times sake
- {\dodoubleempty\module_charts_FLOW_define}
-
-\unexpanded\def\module_charts_FLOW_define[#name][#settings]#cells% todo: save settings
- {\startnointerference
- \the\everyFLOWchart
- \ctxcommand{flow_start_chart("#name")}%
- #cells%
- \ctxcommand{flow_stop_chart()}%
- \stopnointerference}
-
-\unexpanded\def\startFLOWcell
- {\dodoubleempty\module_charts_start_cell}
-
-\unexpanded\def\module_charts_start_cell[#1][#2]%
- {\begingroup
- \iffirstargument
- \setupFLOWshape[#1]%
- \fi
- \ifsecondargument
- \setupFLOWline[#2]%
- \fi
- \ctxcommand{flow_start_cell {
- shape = {
- rulethickness = \number\dimexpr\FLOWshapeparameter\c!rulethickness,
- default = "\FLOWshapeparameter\c!default",
- framecolor = "\FLOWshapeparameter\c!framecolor",
- backgroundcolor = "\FLOWshapeparameter\c!backgroundcolor",
- },
- focus = {
- rulethickness = \number\dimexpr\FLOWfocusparameter\c!rulethickness,
- framecolor = "\FLOWfocusparameter\c!framecolor",
- backgroundcolor = "\FLOWfocusparameter\c!backgroundcolor",
- },
- line = {
- rulethickness = \number\dimexpr\FLOWlineparameter\c!rulethickness,
- radius = \number\dimexpr\FLOWlineparameter\c!radius,
- color = "\FLOWlineparameter\c!color",
- corner = "\FLOWlineparameter\c!corner",
- dash = "\FLOWlineparameter\c!dash",
- arrow = "\FLOWlineparameter\c!arrow",
- offset = \number\dimexpr\FLOWlineparameter\c!offset,
- },
- } }%
- \endgroup}
-
-\unexpanded\def\stopFLOWcell
- {\ctxcommand{flow_stop_cell()}}
-
-\unexpanded\def\FLOWchart
- {\dodoubleempty\module_charts_process}
-
-\def\module_charts_process[#name][#settings]%
- {\bgroup % \vbox removed
- \insidefloattrue
- \dontcomplain
- \setupFLOWchart[#settings]%
- \usebodyfontparameter\FLOWchartparameter
- \ctxcommand{flow_make_chart {
- chart = {
- name = "#name",
- option = "\FLOWchartparameter\c!option",
- backgroundcolor = "\FLOWchartparameter\c!backgroundcolor",
- width = \number\dimexpr\FLOWchartparameter\c!width,
- height = \number\dimexpr\FLOWchartparameter\c!height,
- dx = \number\dimexpr\FLOWchartparameter\c!dx,
- dy = \number\dimexpr\FLOWchartparameter\c!dy,
- offset = \number\dimexpr\FLOWchartparameter\c!offset,
- % bodyfont = "\FLOWchartparameter\c!bodyfont",
- dot = "\FLOWchartparameter\c!dot", % private option
- hcompact = "\FLOWchartparameter\c!hcompact", % undocumented option
- vcompact = "\FLOWchartparameter\c!vcompact", % undocumented option
- focus = "\FLOWchartparameter\c!focus",
- autofocus = "\FLOWchartparameter\c!autofocus",
- nx = "\FLOWchartparameter\c!nx",
- ny = "\FLOWchartparameter\c!ny",
- x = "\FLOWchartparameter\c!x",
- y = "\FLOWchartparameter\c!y",
- labeloffset = \number\dimexpr\FLOWchartparameter\c!labeloffset,
- commentoffset = \number\dimexpr\FLOWchartparameter\c!commentoffset,
- exitoffset = \number\dimexpr\FLOWchartparameter\c!exitoffset,
- split = "\FLOWchartparameter\c!split",
- },
- shape = {
- rulethickness = \number\dimexpr\FLOWshapeparameter\c!rulethickness,
- default = "\FLOWshapeparameter\c!default",
- framecolor = "\FLOWshapeparameter\c!framecolor",
- backgroundcolor = "\FLOWshapeparameter\c!backgroundcolor",
- },
- focus = {
- rulethickness = \number\dimexpr\FLOWfocusparameter\c!rulethickness,
- framecolor = "\FLOWfocusparameter\c!framecolor",
- backgroundcolor = "\FLOWfocusparameter\c!backgroundcolor",
- },
- line = {
- rulethickness = \number\dimexpr\FLOWlineparameter\c!rulethickness,
- radius = \number\dimexpr\FLOWlineparameter\c!radius,
- color = "\FLOWlineparameter\c!color",
- corner = "\FLOWlineparameter\c!corner",
- dash = "\FLOWlineparameter\c!dash",
- arrow = "\FLOWlineparameter\c!arrow",
- offset = "\FLOWlineparameter\c!offset",
- },
- set = {
- },
- split = {
- nx = \number\FLOWsplitparameter\c!nx,
- ny = \number\FLOWsplitparameter\c!ny,
- dx = \number\FLOWsplitparameter\c!dx,
- dy = \number\FLOWsplitparameter\c!dy,
- command = "",
- marking = "\FLOWsplitparameter\c!marking",
- before = "",
- after = "",
- }
- } }%
- \egroup}
-
-\unexpanded\def\FLOWcharts
- {\dodoubleempty\FLOW_charts}
-
-\def\FLOW_charts[#name][#settings]
- {\begingroup
- \setupFLOWchart[\c!split=\v!yes]%
- \setupFLOWsplit[#settings]%
- \module_charts_process[#name][]% \FLOWchart...
- \endgroup}
-
-\appendtoks
- \let\name \FLOW_name
- \let\shape \FLOW_shape
- \let\destination\FLOW_destination
- \let\focus \FLOW_focus
- \let\overlay \FLOW_overlay
- \let\location \FLOW_location
- \let\text \FLOW_text
- \let\label \FLOW_label
- \let\comment \FLOW_comment
- \let\exit \FLOW_exit
- \let\connection \FLOW_connection
- \let\include \FLOW_include
- \let\figure \FLOW_figure
- %
- \let\connect \FLOW_connection
- \let\locate \FLOW_location
- %
- \let\includeFLOWchart\include
-\to \everyFLOWchart
-
-\unexpanded\def\FLOW_name #name{\ctxcommand{flow_set_name("#name")}\ignorespaces}
-\unexpanded\def\FLOW_shape #shape{\ctxcommand{flow_set_shape("#shape")}\ignorespaces}
-\unexpanded\def\FLOW_destination#destination{\ctxcommand{flow_set_destination("#destination")}\ignorespaces}
-\unexpanded\def\FLOW_focus #focus{\ctxcommand{flow_set_focus("#focus")}\ignorespaces}
-\unexpanded\def\FLOW_overlay #overlay{\ctxcommand{flow_set_overlay("#overlay")}\ignorespaces}
-\unexpanded\def\FLOW_location #location{\ctxcommand{flow_set_location("#location")}\ignorespaces}
-\unexpanded\def\FLOW_figure #figure{\ctxcommand{flow_set_figure("#figure")}\ignorespaces}
-
-\unexpanded\def\FLOW_text {\dosingleempty\module_charts_FLOW_text}
-\unexpanded\def\FLOW_label {\dosingleempty\module_charts_FLOW_label}
-\unexpanded\def\FLOW_comment {\dosingleempty\module_charts_FLOW_comment}
-\unexpanded\def\FLOW_exit {\dosingleempty\module_charts_FLOW_exit}
-\unexpanded\def\FLOW_connection{\dodoubleempty\module_charts_FLOW_connection}
-\unexpanded\def\FLOW_include {\dodoubleempty\module_charts_FLOW_include}
-
-\unexpanded\def\module_charts_FLOW_text [#align]#text{\ctxcommand{flow_set_text("#align",\!!bs\detokenize{#text}\!!es)}\ignorespaces}
-\unexpanded\def\module_charts_FLOW_label [#location]#text{\ctxcommand{flow_set_label("#location",\!!bs\detokenize{#text}\!!es)}\ignorespaces}
-\unexpanded\def\module_charts_FLOW_comment [#location]#text{\ctxcommand{flow_set_comment("#location",\!!bs\detokenize{#text}\!!es)}\ignorespaces}
-\unexpanded\def\module_charts_FLOW_exit [#location]#text{\ctxcommand{flow_set_exit("#location",\!!bs\detokenize{#text}\!!es)}\ignorespaces}
-\unexpanded\def\module_charts_FLOW_connection[#location][#offset]#name{\ctxcommand{flow_set_connection("#location","#offset","#name")}\ignorespaces}
-
-\unexpanded\def\module_charts_FLOW_include [#name][#settings]{%
- \begingroup
- \getparameters[FLOWi][x=1,y=1,#settings]%
- \ctxcommand{flow_set_include("#name",\number\FLOWix,\number\FLOWiy,\!!bs\detokenize{#settings}\!!es)}%
- \endgroup
- \ignorespaces
-}
-
-\setvariables
- [flowcell:text]
- [x=1,
- y=1,
- text=,
- align=,
- set=\setups{flowcell:text:place}]
-
-\def\FLOWx{\getvariable{flowcell:text}{x}} % compatibility (for Willi)
-\def\FLOWy{\getvariable{flowcell:text}{y}} % compatibility (for Willi)
-
-% \c!background={\@@FLOWbackground,\FLOWoverlay},
-
-\defineoverlay
- [flowcell:figure]
- [\overlayfigure{\getvariable{flowcell:text}{figure}}]
-
-\startsetups flowcell:text:place
- \begingroup
- \iftrialtypesetting
- \directsetup{flowcell:text:place:indeed}
- \else \iflocation
- \doifelsenothing {\getvariable{flowcell:text}{destination}} {
- \directsetup{flowcell:text:place:indeed}
- } {
- % tricky: scaling and moving around is not taken into account
- \setupinteraction[\c!color=,\c!contrastcolor=]
- \gotobox{\directsetup{flowcell:text:place:indeed}}[\getvariable{flowcell:text}{destination}]
- }
- \else
- \directsetup{flowcell:text:place:indeed}
- \fi \fi
- \endgroup
-\stopsetups
-
-\startsetups flowcell:text:place:indeed
- \begingroup
- \directsetup{flowcell:text:user}
- \doifelsenothing {\getvariable{flowcell:text}{figure}} {
- \expandcheckedcsname{flowcell:}{\getvariable{flowcell:text}{align}}\empty
- {\getvariable{flowcell:text}{text}}
- } {
- \expandcheckedcsname{flowcell:}{\getvariable{flowcell:text}{align}}\empty
- [\c!background=flowcell:figure]
- {\getvariable{flowcell:text}{text}}
- }
- \endgroup
-\stopsetups
-
-\defineframed % to be discussed: shape or global
- [flowcell:base]
- [\c!offset=\v!overlay, % no strut ?
- \c!frame=\FLOWchartparameter\c!frame,
- \c!background=\FLOWchartparameter\c!background,
- \c!backgroundcolor=\FLOWchartparameter\c!backgroundcolor,
- %\c!foregroundcolor=\FLOWshapeparameter\c!foregroundcolor,
- \c!align=\v!middle,
- \c!bottom=\vfill,
- \c!top=\vfill,
- \c!width=\FLOWchartparameter\c!width,
- \c!height=\FLOWchartparameter\c!height,
- % \c!rulethickness=\FLOWchartparameter\c!rulethickness,
- \c!rulethickness=\zeropoint, % comment for tracing
- \c!framecolor=\FLOWchartparameter\c!framecolor]
-
-\defineframed[flowcell:] [flowcell:base]
-\defineframed[flowcell:l] [flowcell:base][\c!align=\v!flushleft]
-\defineframed[flowcell:r] [flowcell:base][\c!align=\v!flushright]
-\defineframed[flowcell:m] [flowcell:base][\c!align=\v!middle]
-\defineframed[flowcell:c] [flowcell:base][\c!align=\v!middle]
-
-\defineframed[flowcell:t] [flowcell:base][\c!top=]
-\defineframed[flowcell:b] [flowcell:base][\c!bottom=]
-
-\defineframed[flowcell:lt][flowcell:base][\c!top=,\c!align=\v!flushleft]
-\defineframed[flowcell:rt][flowcell:base][\c!top=,\c!align=\v!flushright]
-\defineframed[flowcell:mt][flowcell:base][\c!top=,\c!align=\v!middle]
-\defineframed[flowcell:ct][flowcell:base][\c!top=,\c!align=\v!middle]
-
-\defineframed[flowcell:lb][flowcell:base][\c!bottom=,\c!align=\v!flushleft]
-\defineframed[flowcell:rb][flowcell:base][\c!bottom=,\c!align=\v!flushright]
-\defineframed[flowcell:mb][flowcell:base][\c!bottom=,\c!align=\v!middle]
-\defineframed[flowcell:cb][flowcell:base][\c!bottom=,\c!align=\v!middle]
-
-% \startsetups flowcell:text:user
-% \setupframed
-% [flowcell:base]
-% [background=flowcell]
-% \definelayer
-% [flowcell]
-% [width=\namedframedparameter{flowcell:base}{width},
-% height=\namedframedparameter{flowcell:base}{height}]
-% \setlayerframed
-% [flowcell]
-% [preset=rightbottom,offset=-2.75ex]
-% [frame=off]
-% {\tx\FLOWx.\FLOWy}
-% \stopsetups
-%
-% % or:
-%
-% \setupframed
-% [flowcell:base]
-% [background={flowcell-1,flowcell-2}]
-%
-% \defineoverlay
-% [flowcell-1]
-% [\directsetup{flowcell-1}]
-%
-% \definelayer
-% [flowcell-2]
-% [width=\overlaywidth,
-% height=\overlayheight]
-%
-% \startsetups flowcell-1
-% \setlayerframed
-% [flowcell-2]
-% [preset=rightbottom,offset=-2.75ex]
-% [frame=off]
-% {\tx\FLOWx.\FLOWy}
-% \stopsetups
-
-% %D \starttyping
-% %D \setupFLOWsplit
-% %D [nx=5,ny=10,
-% %D dx=0,dy=0,
-% %D before=,
-% %D after=\page]
-% %D
-% %D \FLOWcharts[mybigflow]
-% %D \stoptyping
-% %D
-% %D \starttyping
-% %D \splitfloat
-% %D {\placefigure{What a big flowchart this is!}}
-% %D {\FLOWcharts[mybigflow]}
-% %D \stoptyping
-
-% \setupFLOWsplit
-% [nx=5,
-% ny=8,
-% dx=1,
-% dy=1,
-% command=\framed,
-% before=\page,
-% after=\page]
-%
-% \FLOWchart[demo] \page
-% \FLOWchart[demo][split=yes] \page
-% \FLOWchart[demo][x=1,y=1,nx=5,ny=8] \page
-% \FLOWchart[demo][x=1,y=9,nx=5,ny=10] \page
-
-\protect
-
-\continueifinputfile{m-chart.mkvi}
-
-\input chrt-xml.tex
-
-\usemodule[abr-01]
-
-\setupFLOWcharts[option=test]
-\setupFLOWcharts[frame=on]
-\setupinteraction[state=start]
-
-% \setupFLOWcharts[dx=30pt,dy=30pt]
-
-\startMPinclusions
- predefined_shapes[101] := fullcircle ;
-\stopMPinclusions
-
-\startFLOWchart[demo]
- \startFLOWcell[framecolor=darkgray]
- \name {start}
- \location {1,1}
- \shape {action}
- \text {start}
- \connection [bl] {one}
- \stopFLOWcell
- \startFLOWcell[framecolor=darkred]
- \name {one}
-% \destination{CloseDocument}
- \location {2,2}
-% \shape {action}
- \shape {101}
- \text {first}
-% \label [b] {\bfx bottom}
- \connection [rt] {two}
-% \exit [l] {exit l}
-% \exit [r] {exit r}
-% \exit [t] {exit t}
-% \exit [b] {exit b}
- \stopFLOWcell
- \setupFLOWshapes[framecolor=darkgray]
- \startFLOWcell % [foregroundcolor=white]
- \name {two}
-% \destination{CloseDocument}
- \location {3,3}
- \shape {action}
- \text {second}
- \figure {cow.pdf}
-% \label [l] {\bfx left}
-% \exit [l] {exit l}
-% \exit [r] {exit r}
-% \exit [t] {exit t}
-% \exit [b] {exit b}
- \stopFLOWcell
-\stopFLOWchart
-
-\starttext
-
-\startTEXpage
-% \FLOWchart[convert-en]
-% \FLOWchart[conversion 1]
-% \FLOWchart[conversion 7]
-% \FLOWchart[conversion 9]
-% \FLOWchart[conversion 10]
- \FLOWchart[demo]
-
-\stopTEXpage
-
-\startTEXpage
- \FLOWchart[conversion 10]
-\stopTEXpage
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-chemic.mkii b/Master/texmf-dist/tex/context/base/m-chemic.mkii
deleted file mode 100644
index 0b3c98221a1..00000000000
--- a/Master/texmf-dist/tex/context/base/m-chemic.mkii
+++ /dev/null
@@ -1,21 +0,0 @@
-%D \module
-%D [ file=ppchtex (m-chemic),
-%D version=1997.03.19,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=\PPCHTEX\ (Plain Pictex Context cHemie \TEX),
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D suggestions={Tobias Burnus, Dirk Kuypers \& Ton Otten},
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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\psaxes\undefined \ifx\beginpicture\undefined
- \usemodule[pictex]
-\fi \fi
-
-\input ppchtex.mkii \relax
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/m-chemic.mkiv b/Master/texmf-dist/tex/context/base/m-chemic.mkiv
deleted file mode 100644
index 1dd403fae79..00000000000
--- a/Master/texmf-dist/tex/context/base/m-chemic.mkiv
+++ /dev/null
@@ -1,20 +0,0 @@
-%D \module
-%D [ file=ppchtex (m-chemic),
-%D version=1997.03.19,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=\PPCHTEX\ (Plain Pictex Context cHemie \TEX),
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D suggestions={Tobias Burnus, Dirk Kuypers \& Ton Otten},
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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{ppchtex}{not loaded as support for chemistry in now built in}
-
-% \usemodule[pictex] % we will get rid of this
-% \input ppchtex.mkiv \relax
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/m-cweb.tex b/Master/texmf-dist/tex/context/base/m-cweb.tex
deleted file mode 100644
index bf80e229c14..00000000000
--- a/Master/texmf-dist/tex/context/base/m-cweb.tex
+++ /dev/null
@@ -1,1371 +0,0 @@
-%D \module
-%D [ file=m-cweb,
-%D version=1997.01.15,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=\CWEB\ Pretty Printing Macros,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 First some auxiliary stuff, to be moved to system module.
-
-\def\dodofindfirstcharacter#1%
- {\ifx#1\relax
- \let\next=\egroup
- \else
- \handlecase
- {\expandafter\ifnum\expandafter\catcode\expandafter`#1=11
- \def\next##1\relax{\egroup\def\firstcharacter{#1}}%
- \fi}%
- \fi
- \next}
-
-\def\dofindfirstcharacter#1#2%
- {\def\firstcharacter{}%
- \bgroup
- \defconvertedargument\ascii{#2}%
- \let\next\dodofindfirstcharacter
- \let\handlecase#1%
- \expandafter\next\ascii\relax}
-
-\def\normalcase#1%
- {#1}
-
-\def\findfirstcharacter%
- {\dofindfirstcharacter\lowercase}
-
-\def\FindFirstCharacter%
- {\dofindfirstcharacter\normalcase}
-
-\def\FINDFIRSTCHARACTER%
- {\dofindfirstcharacter\uppercase}
-
-% nog doen:
-%
-% \deactivateCWEB in output routine
-% status info
-% gelinkte entries
-% parskip en parindent
-
-%D \gdef\CWEBquote#1.{{\em Quote :}\ #1.} % checks the .
-
-%D This module (re)implements the \CWEB\ macros as defined in
-%D the file \type{cwebmac.tex}.
-%D
-%D \CWEB\ uses short, often one character long, names for
-%D macros. This is no real problem because no one is supposed
-%D to read and understand the files generated by \CWEB. The
-%D standard macros are meant for \PLAIN\ \TEX\ users. In
-%D \CONTEXT\ and other macro packages however, there is a
-%D potential conflict with format specific or user defined
-%D commands. Furthermore, the \CWEB\ macros implement their own
-%D output routines. When integrating \CWEB\ documents in
-%D another environment, the \CWEB\ specific macros have to be
-%D made local. The first part of this module is dedicated to
-%D this feature.
-%D
-%D Instead of using \type{\def} and \type{\let} for defining
-%D macros, we use:
-%D
-%D \starttyping
-%D \defCEBmacro arguments {meaning}
-%D \letCEBmacro arguments {meaning}
-%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.
-%D Because we want to be much more flexible, we implemented our
-%D own alternatives, and therefore have to bypass the original
-%D ones. The next macro is used for defining these obsolete
-%D \CWEB\ macros. The dummies take care of arguments.
-%D
-%D \starttyping
-%D \defCEBdummy arguments {meaning}
-%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
-%D activate the \CWEB\ macros, which are saved under a
-%D different name, second it can be used to temporary restore
-%D the meanings, for instance when the output routine builds
-%D the page.
-
-\newtoks\CWEBmacros
-
-%D Activating and deactivating is done by means of:
-%D
-%D \starttyping
-%D \activateCWEB
-%D \deactivateCWEB
-%D \stoptyping
-%D
-%D Which are implemented as:
-
-\def\activateCWEB%
- {\let\doCWEB=\activateCWEBmacro
- \the\CWEBmacros}
-
-\def\deactivateCWEB%
- {\let\doCWEB=\deactivateCWEBmacro
- \the\CWEBmacros}
-
-%D The three definition macros append the name of the macro to
-%D the list. The first two macros save the meaning, the last one
-%D assigns \type{{}} to the macro and gobbles original meaning.
-
-\long\def\defCWEBmacro#1%
- {\appendtoks\doCWEB#1\to\CWEBmacros
- \setvalue{newCWEB\string#1}}
-
-\long\def\letCWEBmacro#1%
- {\appendtoks\doCWEB#1\to\CWEBmacros
- \letvalue{newCWEB\string#1}}
-
-\long\def\defCWEBdummy#1#2#%
- {\appendtoks\doCWEB#1\to\CWEBmacros
- \setvalue{newCWEB\string#1}#2{}%
- \gobbleoneargument}
-
-%D The macro \type{\defCWEBdummy} of course takes care of the
-%D argument. This leaves the two (de|)|activating macros:
-
-\def\CWEBmacro#1%
- {\getvalue{newCWEB\string#1}}
-
-\def\activateCWEBmacro#1%
- {\letvalue{oldCWEB\string#1}=#1%
- \def#1{\CWEBmacro#1}}
-
-\def\deactivateCWEBmacro#1%
- {\expandafter\let\expandafter#1\expandafter=\csname oldCWEB\string#1\endcsname}
-
-%D I did consider loading the \CWEB\ macros using temporary
-%D substitutes of \type{\def}, \type{\font}, \type{\newbox} etc.
-%D The main problem is that the file contains more than
-%D definitions and taking all kind of assignments into account
-%D too would not make things easier. So I decided to stick to
-%D the method as just described.
-
-%D Now we're ready for the real job. What follows is a partial
-%D adaption of the file \type{cwebmac.tex}, version 3.1, dated
-%D September 1994 and written by Levy and Knuth. When possible
-%D we kept the original meaning, but we've granted ourselves
-%D the freedom to reformat the macro's for readibility.
-%D
-%D We'll only present the macros we actually use. The source
-%D however contains the original implementation.
-
-% standard macros for CWEB listings (in addition to plain.tex)
-% Version 3.1 --- September 1994.
-%
-% \ifx\documentstyle\undefined\else\endinput\fi % LaTeX will use other macros
-%
-% \xdef\fmtversion{\fmtversion+CWEB3.1}
-
-%D \macros{.}{}
-%D
-%D \CWEBquote preserve a way to get the dot accent (all
-%D other accents will still work as usual).
-
-\letCWEBmacro\: = \.
-
-% \parskip = 0pt % no stretch between paragraphs
-% \parindent = 1em % for paragraphs and for the first line of C text
-
-% \font\ninerm = cmr9
-% \let\mc = \ninerm % medium caps
-% \font\eightrm = cmr8
-% \let\sc = \eightrm % small caps (NOT a caps-and-small-caps font)
-% \let\mainfont = \tenrm
-% \let\cmntfont = \tenrm
-% \font\tenss = cmss10
-% \let\cmntfont = \tenss % alternative comment font
-% \font\titlefont = cmr7 scaled \magstep4 % title on the contents page
-% \font\ttitlefont = cmtt10 scaled \magstep2 % typewriter type in title
-% \font\tentex = cmtex10 % TeX extended character set (used in strings)
-% \fontextraspace\tentex = 0pt % no double space after sentences
-
-%D \macros{mc,sc,cmntfont,eightrm}{}
-%D
-%D The naming of the fonts in in line with those in \PLAIN\
-%D \TEX. Although \CONTEXT\ implements its own scheme, there is
-%D still support for the \PLAIN\ ones. We keep the original
-%D names, but change their meaning. That way the macros obey
-%D switching to other sizes or styles.
-
-\defCWEBmacro\mc {\tx}
-\defCWEBmacro\sc {\txx}
-\defCWEBmacro\cmntfont {\ss}
-\defCWEBmacro\eightrm {\tx}
-
-%D \macros{tentex,sevenrm,sevensy,teni}{}
-%D
-%D The next one uses a temporary solution. The \type{cmtex10}
-%D font is not part of the default mechanism. We make use of
-%D the \CONTEXT\ variables \type{\textface}, \type{\scriptface}
-%D and \type{\scriptscriptface}, which hold the current
-%D sizes.
-
-\defCWEBmacro\tentex%
- {\font\next=cmtex10 at \textface
- \fontextraspace\next\zeropoint
- \next}
-
-\defCWEBmacro\sevenrm {\getvalue{\scriptface rmtf}}
-\defCWEBmacro\sevensy {\getvalue{\scriptface mmsy}}
-\defCWEBmacro\teni {\getvalue{\textface mmmi}}
-
-%D \macros{CWEBpt}{}
-%D
-%D The original macros are based on a 10~point bodyfont size. We
-%D therefore have to specify dimension in points a bit
-%D different. Specifications like .6pt are changed to
-%D \type{.06} times \type{\bodyfontsize}.
-
-\defCWEBmacro\CWEBpt {\bodyfontsize} % still dutch
-
-%D \macros{CEE,UNIX,TEX,CPLUSPLUS}{}
-%D
-%D Next come some logo's. It does not make much sense to use
-%D the \CONTEXT\ logo mechanism here, so we simply say:
-
-\defCWEBmacro \CEE/{{\mc C\spacefactor1000}}
-\defCWEBmacro \UNIX/{{\mc U\kern-.05emNIX\spacefactor1000}}
-\defCWEBmacro \TEX/{\TeX}
-\defCWEBmacro\CPLUSPLUS/{{\mc C\PP\spacefactor1000}}
-\defCWEBmacro \Cee{\CEE/} % for backward compatibility
-
-%D \macros{\ }{}
-%D
-%D Now we come to the real work: the short commands that make
-%D up the typography.
-%D
-%D \CWEBquote italic type for identifiers.
-
-\defCWEBmacro\\#1%
- {\leavevmode\hbox{\it#1\/\kern.05em}}
-
-%D \macros{\string|}{}
-%D
-%D \CWEBquote one letter identifiers look better this way.
-
-\defCWEBmacro\|#1%
- {\leavevmode\hbox{$#1$}}
-
-%D \macros{\string\&}{}
-%D
-%D \CWEBquote boldface type for reserved words.
-
-\defCWEBmacro\&#1%
- {\leavevmode
- \hbox
- {\def\_%
- {\kern.04em
- \vbox{\hrule width.3em height .06\CWEBpt}% .6pt}%
- \kern.08em}%
- \bf#1\/\kern.05em}}
-
-%D \macros{.}{}
-%D
-%D Here we use the previously saved period. This macro
-%D takes care of special characters in strings.
-
-\defCWEBmacro\.#1%
- {\leavevmode
- \hbox
- {\tentex % typewriter type for strings
- \let\\=\BS % backslash in a string
- \let\{=\LB % left brace in a string
- \let\}=\RB % right brace in a string
- \let\~=\TL % tilde in a string
- \let\ =\SP % space in a string
- \let\_=\UL % underline in a string
- \let\&=\AM % ampersand in a string
- \let\^=\CF % circumflex in a string
- #1\kern.05em}}
-
-%D \macros{)}{}
-%D
-%D Some discretionary hack.
-
-\defCWEBmacro\)%
- {\discretionary{\hbox{\tentex\BS}}{}{}}
-
-%D \macros{AT}{}
-%D
-%D \CWEBquote at sign for control text (not needed in versions
-%D $>=$ 2.9).
-
-\defCWEBmacro\AT{@}
-
-%D \macros{ATL,postATL,NOATL}{}
-%D
-%D A two step macro that handles whatever.
-
-\defCWEBmacro\ATL%
- {\par
- \noindent
- \bgroup
- \catcode`\_=12
- \postATL}
-
-\defCWEBmacro\postATL#1 #2 %
- {\bf letter \\{\uppercase{\char"#1}} tangles as \tentex "#2"%
- \egroup
- \par}
-
-\defCWEBmacro\noATL#1 #2 %
- {}
-
-%D \macros{noatl}{}
-%D
-%D \CWEBquote suppress output from \type{@l}.
-
-\defCWEBmacro\noatl%
- {\let\ATL=\noATL}
-
-% \defCWEBmacro\ATH%
-% {\X\kern-.5em:Preprocessor definitions\X}
-
-%D \macros{PB}
-%D
-%D \CWEBquote hook for program brackets {\tttf\string|...\string|}
-%D in TeX part or section name.
-
-\defCWEBmacro\PB%
- {\relax}
-
-% \chardef\AM = `\& % ampersand character in a string
-% \chardef\BS = `\\ % backslash in a string
-% \chardef\LB = `\{ % left brace in a string
-% \chardef\RB = `\} % right brace in a string
-% \chardef\TL = `\~ % tilde in a string
-% \chardef\UL = `\_ % underline character in a string
-% \chardef\CF = `\^ % circumflex character in a string
-
-\defCWEBmacro\AM {\char`\&} % ampersand character in a string
-\defCWEBmacro\BS {\char`\\} % backslash in a string
-\defCWEBmacro\LB {\char`\{} % left brace in a string
-\defCWEBmacro\RB {\char`\}} % right brace in a string
-\defCWEBmacro\TL {\char`\~} % tilde in a string
-\defCWEBmacro\UL {\char`\_} % underline character in a string
-\defCWEBmacro\CF {\char`\^} % circumflex character in a string
-
-\defCWEBmacro\SP {{\tt\char`\ }} % (visible) space in a string
-
-% \newbox\PPbox \setbox\PPbox=\hbox
-% {\kern.5pt\raise1pt\hbox{\sevenrm+\kern-1pt+}\kern.5pt}
-% \newbox\MMbox \setbox\MMbox=\hbox
-% {\kern.5pt\raise1pt\hbox{\sevensy\char0\kern-1pt\char0}\kern.5pt}
-% \newbox\MGbox \setbox\MGbox=\hbox % symbol for ->
-% {\kern-2pt\lower3pt\hbox{\teni\char'176}\kern1pt}
-% \newbox\MODbox \setbox\MODbox=\hbox
-% {\eightrm\%}
-%
-% \def\PP {\copy\PPbox}
-% \def\MM {\copy\MMbox}
-% \def\MG {\copy\MGbox}
-% \def\MOD {\mathbin{\copy\MODbox}}
-
-\defCWEBmacro\PP% symbol for ++
- {\kern.05\CWEBpt
- \raise.1\CWEBpt\hbox{\sevenrm+\kern-.1\CWEBpt+}%
- \kern.05\CWEBpt}
-
-\defCWEBmacro\MM%
- {\kern.05\CWEBpt
- \raise.1\CWEBpt\hbox{\sevensy\char0\kern-.1\CWEBpt\char0}%
- \kern.05\CWEBpt}
-
-\defCWEBmacro\MG%
- {\kern-.2\CWEBpt
- \lower.3\CWEBpt\hbox{\teni\char'176}%
- \kern .1\CWEBpt}
-
-\defCWEBmacro\MRL#1%
- {\mathrel{\let\K==#1}}
-
-% \def\MRL#1%
-% {\KK#1}
-% \def\KK#1#2%
-% {\buildrel\;#1\over{#2}}
-
-\letCWEBmacro\GG = \gg
-\letCWEBmacro\LL = \ll
-\letCWEBmacro\NULL = \Lambda
-
-% \mathchardef\AND = "2026 % bitwise and; also \& (unary operator)
-
-\defCWEBmacro\AND% redefines itself (funny)
- {\mathchardef\AND="2026 \AND} % bitwise and; also \& (unary operator)
-
-\letCWEBmacro\OR = \mid % bitwise or
-\letCWEBmacro\XOR = \oplus % bitwise exclusive or
-\defCWEBmacro\CM {{\sim}} % bitwise complement
-\defCWEBmacro\MOD {\mathbin{\eightrm\%}}
-\defCWEBmacro\DC {\kern.1em{::}\kern.1em} % symbol for ::
-\defCWEBmacro\PA {\mathbin{.*}} % symbol for .*
-\defCWEBmacro\MGA {\mathbin{\MG*}} % symbol for ->*
-\defCWEBmacro\this {\&{this}}
-
-% \newbox \bak % backspace one em
-% \newbox \bakk % backspace two ems
-%
-% \setbox\bak =\hbox to -1em{}
-% \setbox\bakk=\hbox to -2em{}
-
-\newcount\CWEBind % current indentation in ems
-
-\defCWEBmacro\1% indent one more notch
- {\global\advance\CWEBind by 1
- \hangindent\CWEBind em}
-
-\defCWEBmacro\2% indent one less notch
- {\global\advance\CWEBind by -1 }
-
-\defCWEBmacro\3#1% optional break within a statement
- {\hfil
- \penalty#10
- \hfilneg}
-
-\defCWEBmacro\4% backspace one notch
- {\hbox to -1em{}}
-
-\defCWEBmacro\5% optional break
- {\hfil
- \penalty-1
- \hfilneg
- \kern2.5em
- \hbox to -2em{}%
- \ignorespaces}
-
-\defCWEBmacro\6% forced break
- {\ifmmode
- \else
- \par
- \hangindent\CWEBind em
- \noindent
- \kern\CWEBind em
- \hbox to -2em{}%
- \ignorespaces
- \fi}
-
-\defCWEBmacro\7% forced break and a little extra space
- {\Y
- \6}
-
-\defCWEBmacro\8% no indentation
- {\hskip-\CWEBind em
- \hskip 2em}
-
-\defCWEBmacro\9#1%
- {}
-
-\newcount\gdepth % depth of current major group, plus one
-\newcount\secpagedepth
-\secpagedepth=3 % page breaks will occur for depths -1, 0, and 1
-
-% \newtoks\gtitle % title of current major group
-% \newskip\intersecskip
-% \intersecskip=12pt minus 3pt % space between sections
-
-% \let\yskip=\smallskip
-
-\defCWEBmacro\?%
- {\mathrel?}
-
-% \def\note#1#2.%
-% {\Y\noindent
-% {\hangindent2em\baselineskip10pt\eightrm#1~#2.\par}}
-
-\defCWEBmacro\lapstar%
- {\rlap{*}}
-
-% \def\stsec%
-% {\rightskip=0pt % get out of C mode (cf. \B)
-% \sfcode`;=1500
-% \pretolerance 200
-% \hyphenpenalty 50
-% \exhyphenpenalty 50
-% \noindent{\let\*=\lapstar\bf\secstar.\quad}}
-%
-% \let\startsection=\stsec
-
-\defCWEBmacro\defin#1%
- {\global\advance\CWEBind by 2 \1\&{#1 } } % begin `define' or `format'
-
-% \def\A% xref for doubly defined section name
-% {\note{See also section}}
-%
-% \def\As% xref for multiply defined section name
-% {\note{See also sections}}
-
-\defCWEBmacro\B%
- {\rightskip=0pt plus 100pt minus 10pt % go into C mode
- \sfcode`;=3000
- \pretolerance 10000
- \hyphenpenalty 1000 % so strings can be broken (discretionary \ is inserted)
- \exhyphenpenalty 10000
- \global\CWEBind=2 \1\ \unskip}
-
-\defCWEBmacro\C#1%
- {\5\5\quad$/\ast\,${\cmntfont #1}$\,\ast/$}
-
-% \let\SHC\C % "// short comments" treated like "/* ordinary comments */"
-
-\defCWEBmacro\SHC#1%
- {\5\5\quad$//\,${\cmntfont#1}}
-
-% \def\C#1{\5\5\quad$\triangleright\,${\cmntfont#1}$\,\triangleleft$}
-% \def\SHC#1{\5\5\quad$\diamond\,${\cmntfont#1}}
-
-\defCWEBmacro\D% macro definition
- {\defin{\#define}}
-
-\letCWEBmacro\E=\equiv % equivalence sign
-
-% \def\ET% conjunction between two section numbers
-% { and~}
-%
-% \def\ETs% conjunction between the last two of several section numbers
-% {, and~}
-
-\defCWEBmacro\F% format definition
- {\defin{format}}
-
-\letCWEBmacro\G = \ge % greater than or equal sign
-
-% \H is long Hungarian umlaut accent
-
-\letCWEBmacro\I = \ne % unequal sign
-
-\defCWEBmacro\J% TANGLE's join operation
- {\.{@\&}}
-
-% \let\K== % assignment operator
-
-\letCWEBmacro\K = \leftarrow % "honest" alternative to standard assignment operator
-
-% \L is Polish letter suppressed-L
-
-% \outer\def\M#1%
-% {\MN{#1}%
-% \ifon
-% \vfil
-% \penalty-100
-% \vfilneg % beginning of section
-% \vskip\intersecskip
-% \startsection
-% \ignorespaces}
-%
-% \outer\def\N#1#2#3.%
-% {\gdepth=#1%
-% \gtitle={#3}%
-% \MN{#2}% beginning of starred section
-% \ifon
-% \ifnum#1<\secpagedepth
-% \vfil
-% \eject % force page break if depth is small
-% \else
-% \vfil
-% \penalty-100
-% \vfilneg
-% \vskip\intersecskip
-% \fi
-% \fi
-% \message{*\secno}% progress report
-% \edef\next%
-% {\write\cont % write to contents file
-% {\ZZ{#3}{#1}{\secno}{\noexpand\the\pageno}}}%
-% \next % \ZZ{title}{depth}{sec}{page}
-% \ifon
-% \startsection
-% {\bf#3.\quad}%
-% \ignorespaces}
-%
-% \def\MN#1%
-% {\par % common code for \M, \N
-% {\xdef\secstar{#1}%
-% \let\*=\empty
-% \xdef\secno{#1}}% remove \* from section name
-% \ifx\secno\secstar
-% \onmaybe
-% \else
-% \ontrue
-% \fi
-% \mark{{{\tensy x}\secno}{\the\gdepth}{\the\gtitle}}}
-%
-% each \mark is {section reference or null}{depth plus 1}{group title}
-
-% \O is Scandinavian letter O-with-slash
-% \P is paragraph sign
-
-\defCWEBmacro\Q {\note{This code is cited in section}} % xref for mention of a section
-\defCWEBmacro\Qs {\note{This code is cited in sections}} % xref for mentions of a section
-
-% \S is section sign
-
-\defCWEBmacro\T#1%
- {\leavevmode % octal, hex or decimal constant
- \hbox
- {$\def\?{\kern.2em}%
- \def\$##1{\egroup_{\,\rm##1}\bgroup}% suffix to constant
- \def\_{\cdot 10^{\aftergroup}}% power of ten (via dirty trick)
- \let\~=\oct
- \let\^=\hex
- {#1}$}}
-
-\defCWEBmacro\U {\note{This code is used in section}} % xref for use of a section
-\defCWEBmacro\Us {\note{This code is used in sections}} % xref for uses of a section
-
-\letCWEBmacro\R = \lnot % logical not
-\letCWEBmacro\V = \lor % logical or
-\letCWEBmacro\W = \land % logical and
-
-% defined later on
-%
-% \def\X#1:#2\X%
-% {\ifmmode
-% \gdef\XX{\null$\null}%
-% \else
-% \gdef\XX{}%
-% \fi % section name
-% \XX$\langle\,${#2\eightrm\kern.5em#1}$\,\rangle$\XX}
-
-\unprotect
-
-\def\theCWEByskip {\blank[\v!small]}
-\def\theCWEBvskip {\blank[\v!big]}
-
-\protect
-
-\defCWEBmacro\Y%
- {\par
- \yskip}
-
-\defCWEBmacro\yskip%
- {\theCWEByskip}
-
-\letCWEBmacro\Z = \le
-% \letCWEBmacro\ZZ = \let % now you can \write the control sequence \ZZ
-\letCWEBmacro\* = *
-
-\defCWEBmacro\oct%
- {\hbox{$^\circ$\kern-.1em\it\aftergroup\?\aftergroup}}
-
-\defCWEBmacro\hex%
- {\hbox{$^{\scriptscriptstyle\#}$\tt\aftergroup}}
-
-\defCWEBmacro\vb#1%
- {\leavevmode
- \hbox
- {\kern.2\CWEBpt
- \vrule
- \vtop
- {\vbox
- {\hrule
- \hbox{\strut\kern.2\CWEBpt\.{#1}\kern.2\CWEBpt}}
- \hrule}%
- \vrule
- \kern.2\CWEBpt}} % verbatim string
-
-\def\onmaybe%
- {\let\ifon=\maybe}
-
-\let\maybe=\iftrue
-
-\newif\ifon
-
-% \newif\iftitle
-% \newif\ifpagesaved
-%
-% \def\lheader%
-% {\mainfont
-% \the\pageno
-% \eightrm
-% \qquad
-% \grouptitle
-% \hfill
-% \title
-% \qquad
-% \mainfont
-% \topsecno} % top line on left-hand pages
-%
-% \def\rheader%
-% {\mainfont
-% \topsecno
-% \eightrm
-% \qquad
-% \title
-% \hfill
-% \grouptitle
-% \qquad
-% \mainfont
-% \the\pageno} % top line on right-hand pages
-%
-% \def\grouptitle
-% {\let\i=I
-% \let\j=J
-% \uppercase\expandafter{\expandafter\takethree\topmark}}
-%
-% \def\topsecno%
-% {\expandafter\takeone\topmark}
-%
-% \def\takeone #1#2#3{#1}
-% \def\taketwo #1#2#3{#2}
-% \def\takethree #1#2#3{#3}
-%
-% \def\nullsec%
-% {\eightrm
-% \kern-2em} % the \kern-2em cancels \qquad in headers
-%
-% \let\page=\pagebody % \def\page {\box255 }
-% \raggedbottom % \normalbottom % faster, but loses plain TeX footnotes
-%
-% \def\normaloutput#1#2#3%
-% {\shipout\vbox
-% {\ifodd
-% \pageno
-% \hoffset=\pageshift
-% \fi
-% \vbox to \fullpageheight
-% {\iftitle
-% \global\titlefalse
-% \else
-% \hbox to \pagewidth
-% {\vbox to 10pt{}%
-% \ifodd\pageno #3\else#2\fi}
-% \fi
-% \vfill#1}} % parameter #1 is the page itself
-% \global\advance\pageno by 1}
-%
-% \gtitle={\.{CWEB} output} % this running head is reset by starred sections
-%
-% \mark{\noexpand\nullsec0{\the\gtitle}}
-%
-% \def\title%
-% {\expandafter\uppercase\expandafter{\jobname}}
-%
-% \def\topofcontents%
-% {\centerline{\titlefont\title}
-% \vskip.7in
-% \vfill} % this material will start the table of contents page
-
-\def\botofcontents%
- {\vfill
- \centerline{\covernote}} % this material will end the table of contents page
-
-\def\covernote%
- {}
-
-% some leftover
-
-\defCWEBmacro\contentspagenumber{0} % default page number for table of contents
-
-% \newdimen\pagewidth \pagewidth = 158mm % the width of each page
-% \newdimen\pageheight \pageheight = 223mm % the height of each page
-% \newdimen\fullpageheight \fullpageheight = 240mm % page height including headlines
-% \newdimen\pageshift \pageshift = 0in % shift righthand pages wrt lefthand ones
-%
-% \def\magnify#1%
-% {\mag=#1
-% \pagewidth=6.5truein
-% \pageheight=8.7truein
-% \fullpageheight=9truein
-% \setpage}
-%
-% \def\setpage%
-% {\hsize\pagewidth
-% \vsize\pageheight} % use after changing page size
-%
-% \def\contentsfile {\jobname.toc} % file that gets table of contents info
-% \def\readcontents {\input \contentsfile}
-% \def\readindex {\input \jobname.idx}
-% \def\readsections {\input \jobname.scn}
-%
-% \newwrite\cont
-% \output{\setbox0=\page % the first page is garbage
-% \openout\cont=\contentsfile
-% \write\cont{\catcode `\noexpand\@=11\relax} % \makeatletter
-% \global\output{\normaloutput\page\lheader\rheader}}
-% \setpage
-% \vbox to \vsize{} % the first \topmark won't be null
-
-\defCWEBdummy\magnify#1% magnify the page
- {}
-
-\defCWEBmacro\ch%
- {\note{The following sections were changed by the change file:}
- \let\*=\relax}
-
-% \newbox\sbox % saved box preceding the index
-% \newbox\lbox % lefthand column in the index
-%
-% \def\inx%
-% {\par\vskip6pt plus 1fil % we are beginning the index
-% \def\page{\box255 }
-% \normalbottom
-% \write\cont{} % ensure that the contents file isn't empty
-% \write\cont{\catcode `\noexpand\@=12\relax} % \makeatother
-% \closeout\cont % the contents information has been fully gathered
-% \output
-% {\ifpagesaved
-% \normaloutput{\box\sbox}\lheader\rheader
-% \fi
-% \global\setbox\sbox=\page
-% \global\pagesavedtrue}
-% \pagesavedfalse
-% \eject % eject the page-so-far and predecessors
-% \setbox\sbox\vbox{\unvbox\sbox} % take it out of its box
-% \vsize=\pageheight
-% \advance\vsize by -\ht\sbox % the remaining height
-% \hsize=.5\pagewidth
-% \advance\hsize by -10pt
-% % column width for the index (20pt between cols)
-% \parfillskip 0pt plus .6\hsize % try to avoid almost empty lines
-% \def\lr{L} % this tells whether the left or right column is next
-% \output
-% {\if L\lr
-% \global\setbox\lbox=\page
-% \gdef\lr{R}
-% \else
-% \normaloutput
-% {\vbox to\pageheight
-% {\box\sbox
-% \vss
-% \hbox to\pagewidth{\box\lbox\hfil\page}}}
-% \lheader
-% \rheader
-% \global\vsize\pageheight\gdef\lr{L}\global\pagesavedfalse\fi}
-% \message{Index:}
-% \parskip 0pt plus .5pt
-% \outer\def\I##1, {\par\hangindent2em\noindent##1:\kern1em} % index entry
-% \def\[##1]{$\underline{##1}$} % underlined index item
-% \rm
-% \rightskip0pt plus 2.5em
-% \tolerance 10000
-% \let\*=\lapstar
-% \hyphenpenalty 10000
-% \parindent0pt
-% \readindex}
-%
-% \def\fin%
-% {\par\vfill\eject % this is done when we are ending the index
-% \ifpagesaved\null\vfill\eject\fi % output a null index column
-% \if L\lr\else\null\vfill\eject\fi % finish the current page
-% \parfillskip 0pt plus 1fil
-% \def\grouptitle{NAMES OF THE SECTIONS}
-% \let\topsecno=\nullsec
-% \message{Section names:}
-% \output={\normaloutput\page\lheader\rheader}
-% \setpage
-% \def\note##1##2.{\quad{\eightrm##1~##2.}}
-% \def\Q{\note{Cited in section}} % crossref for mention of a section
-% \def\Qs{\note{Cited in sections}} % crossref for mentions of a section
-% \def\U{\note{Used in section}} % crossref for use of a section
-% \def\Us{\note{Used in sections}} % crossref for uses of a section
-% \def\I{\par\hangindent 2em}\let\*=*
-% \readsections}
-%
-% \def\con%
-% {\par\vfill\eject % finish the section names
-% %\ifodd\pageno\else\titletrue\null\vfill\eject\fi % for duplex printers
-% \rightskip = 0pt
-% \hyphenpenalty = 50
-% \tolerance = 200
-% \setpage
-% \output={\normaloutput\page\lheader\rheader}
-% \titletrue % prepare to output the table of contents
-% \pageno=\contentspagenumber
-% \def\grouptitle{TABLE OF CONTENTS}
-% \message{Table of contents:}
-% \topofcontents
-% \line{\hfil Section\hbox to3em{\hss Page}}
-% \let\ZZ=\contentsline
-% \readcontents\relax % read the contents info
-% \botofcontents
-% \end} % print the contents page(s) and terminate
-%
-% \def\contentsline#1#2#3#4%
-% {\ifnum#2=0
-% \smallbreak
-% \fi
-% \line{\consetup{#2}#1
-% \rm\leaders\hbox to .5em{.\hfil}\hfil\ #3\hbox to3em{\hss#4}}}
-%
-
-\defCWEBmacro\consetup#1%
- {\ifcase#1 \bf % depth -1 (@**)
- \or % depth 0 (@*)
- \or \hskip2em % depth 1 (@*1)
- \or \hskip4em % depth 2 (@*2)
- \or \hskip6em % depth 3 (@*3)
- \or \hskip8em % depth 4 (@*4)
- \or \hskip10em % depth 5 (@*5)
- \else \hskip12em
- \fi} % depth 6 or more
-
-\defCWEBdummy \inx {} % index
-\defCWEBdummy \fin {} % finish
-\defCWEBdummy \con {} % table of contents and finish
-
-\defCWEBdummy \noinx {} % no indexes or table of contents
-\defCWEBdummy \nosecs {} % no index of section names or table of contents
-\defCWEBdummy \nocon {} % no table of contents
-
-\defCWEBmacro\,%
- {\relax
- \ifmmode
- \mskip\thinmuskip
- \else
- \thinspace
- \fi}
-
-% \def\noinx%
-% {\let\inx=\end}
-%
-% \def\nosecs%
-% {\let\FIN=\fin
-% \def\fin%
-% {\let\parfillskip=\end
-% \FIN}}
-%
-% \def\nocon%
-% {\let\con=\end}
-%
-% \newcount\twodigits
-%
-% \def\hours%
-% {\twodigits=\time
-% \divide\twodigits by 60
-% \printtwodigits
-% \multiply\twodigits by -60
-% \advance\twodigits by \time
-% :\printtwodigits}
-%
-% \def\gobbleone1{}
-%
-% \def\printtwodigits%
-% {\advance\twodigits by 100
-% \expandafter\gobbleone\number\twodigits
-% \advance\twodigits by -100 }
-%
-% \def\today%
-% {\ifcase\month
-% \or January\or February\or March\or April\or May\or June%
-% \or July\or August\or September\or October\or November\or December%
-% \fi
-% \space
-% \number\day, \number\year}
-%
-% \def\datethis%
-% {\def\startsection%
-% {\leftline{\sc\today\ at \hours}
-% \bigskip
-% \let\startsection=\stsec
-% \stsec}}
-%
-% \def\datecontentspage%
-% {\def\topofcontents%
-% {\leftline{\sc\today\ at \hours}
-% \bigskip
-% \centerline{\titlefont\title}
-% \vfill}}
-
-\defCWEBdummy\datethis {} % say `\datethis' in limbo, to get your listing timestamped before section 1
-\defCWEBdummy\datecontentspage {} % timestamps the contents page
-
-\defCWEBmacro\TeX%
- {{\ifmmode\it\fi
- \leavevmode
- \hbox{T\kern-.1667em\lower.424ex\hbox{E}\hskip-.125em X}}}
-
-% alternative implementation
-
-\newif\ifCWEBnotes
-
-\defCWEBmacro\Q {\CWEBnotesfalse \note{This code is cited in section}} % xref for mention of a section
-\defCWEBmacro\Qs {\CWEBnotestrue \note{This code is cited in sections}} % xref for mentions of a section
-
-\defCWEBmacro\U {\CWEBnotesfalse \note{This code is used in section}} % xref for use of a section
-\defCWEBmacro\Us {\CWEBnotestrue \note{This code is used in sections}} % xref for uses of a section
-
-\defCWEBmacro\A {\CWEBnotesfalse \note{See also section}} % xref for doubly defined section name
-\defCWEBmacro\As {\CWEBnotestrue \note{See also sections}} % xref for multiply defined section name
-
-\defCWEBmacro\ET% conjunction between two section numbers
- { and~}
-
-\defCWEBmacro\ETs% conjunction between the last two of several section numbers
- {, and~}
-
-%\def\processCWEBsectionnumbers[#1]%
-% {\bgroup
-% \def\CWEBcomma%
-% {\def\CWEBcomma{, }}%
-% \def\docommand##1%
-% {\bgroup
-% \def\[####1]{####1}%
-% \xdef\CWEBreference{##1}%
-% \egroup
-% \CWEBcomma{\naar{\donottest{##1}}[web:\CWEBreference]}}%
-% \processcommalist[{#1}]\docommand
-% \egroup}
-
-% \def\processCWEBsectionnumbers[#1]%
-% {\bgroup
-% \def\CWEBcomma%
-% {\def\CWEBcomma{, }}%
-% \def\docommand##1%
-% {\bgroup
-% \def\(####1){####1}%
-% \xdef\CWEBreference{##1}%
-% \egroup
-% \CWEBcomma
-% {\localcolortrue\naar{\donottest{##1}}[web:\CWEBreference]}}%
-% \bgroup
-% \def\[##1]{\(##1)}\let\(=\relax\xdef\CWEBreferences{#1}%
-% \egroup
-% \unexpanded\def\(##1){\[##1]}%
-% \processcommacommand[\CWEBreferences]\docommand
-% \egroup}
-
-\def\processCWEBsectionnumbers[#1]%
- {\bgroup
- \def\CWEBcomma%
- {\def\CWEBcomma{, }}%
- \def\docommand##1%
- {\bgroup
- \def\[####1]{####1}%
- \xdef\CWEBreference{##1}%
- \egroup
- \CWEBcomma{\localcolortrue\goto{\donottest{##1}}[web:\CWEBreference]}}%
- \processlist{(}{)}{,}\docommand(#1)
- \egroup}
-
-\def\processCWEBsectionnotes%
- {\catcode`\s=12
- \doprocessCWEBsectionnotes}
-
-\def\doprocessCWEBsectionnotes#1.%
- {\ifCWEBnotes
- \def\next##1\ET##2##3.%
- {\processCWEBsectionnumbers[##1]%
- \if##2s%
- {, and~\goto{##3}[web:##3]}%
- \else
- { and~\goto{##2##3}[web:##2##3]}%
- \fi}%
- \next#1.%
- \else
- \goto{#1}[web:#1]%
- \fi
- \afterCWEBnote % inside group!
- \egroup}
-
-\let\afterCWEBnote=\relax
-
-\defCWEBmacro\note#1%
- {\bgroup
- \Y\noindent
- \def\afterCWEBnote{\par}%
- \hangindent2em
- %\baselineskip10pt
- \eightrm#1~\processCWEBsectionnotes}
-
-\def\oldCWEBmacroX#1:#2\X% original
- {\ifmmode
- \gdef\XX{\null$\null}%
- \else
- \gdef\XX{}%
- \fi % section name
- \XX$\langle\,${#2\eightrm\kern.5em#1}$\,\rangle$\XX}
-
-\defCWEBmacro\ATH%
- {\oldCWEBmacroX\kern-.5em:Preprocessor definitions\X}
-
-\def\newCWEBmacroX#1:#2\X% original
- {\ifmmode
- \gdef\XX{\null$\null}%
- \else
- \gdef\XX{}%
- \fi % section name
- \XX$\langle\,$%
- {#2\eightrm\kern.5em\processCWEBsectionnumbers[{#1}]}%
- $\,\rangle$\XX}
-
-\defCWEBmacro\X#1:#2\X%
- {\newCWEBmacroX#1:#2\X}
-
-\definemarking[CWEBfilename]
-\definemarking[CWEBsectiontitle]
-\definemarking[CWEBsectionnumber]
-\definemarking[CWEBsectiondepth]
-
-\defCWEBmacro\M#1%
- {\MN{#1}%
- \ifon
- \vfil
- \penalty-100
- \vfilneg % beginning of section
- \theCWEBvskip
- \startsection
- \pagereference[web:#1]%
- \expanded{\marking[CWEBsectionnumber]{\secno}}%
- \expanded{\marking[CWEBsectiondepth]{\the\gdepth}}%
- \ignorespaces}
-
-\defCWEBmacro\N#1#2#3.%
- {\gdepth=#1%
- \MN{#2}% beginning of starred section
- \ifon
- \ifnum#1<\secpagedepth
- \vfil
- \eject % force page break if depth is small
- \else
- \vfil
- \penalty-100
- \vfilneg
- \theCWEBvskip
- \fi
- \fi
- \message{*\secno}% progress report
- \makesectionformat % context
- \defconvertedargument\ascii{#3}%
- \edef\next%
- {\write\CWEBcont % write to contents file
- {\string\ZZ{\ascii}{#1}{\secno}%
- {\sectionformat::\noexpand\userfolio}{\noexpand\realfolio}}}%
- \next % \ZZ{title}{depth}{sec}{page}
- \ifon
- \startsection
- \pagereference[web:#2]%
- \marking[CWEBsectiontitle] {#3}%
- \expanded{\marking[CWEBsectionnumber]{\secno}}%
- \expanded{\marking[CWEBsectiondepth]{\the\gdepth}}%
- {\bf#3.\quad}%
- \ignorespaces}
-
-\defCWEBmacro\MN#1%
- {\par % common code for \M, \N
- {\xdef\secstar{#1}%
- \let\*=\empty
- \xdef\secno{#1}}% remove \* from section name
- \ifx\secno\secstar
- \onmaybe
- \else
- \ontrue
- \fi}
-
-\newif\iflinktoCWEBfile
-
-\def\setCWEBlinkfile#1%
- {\linktoCWEBfiletrue
- \def\otherCWEBfile{#1}}
-
-\unprotect
-
-\def\gotoCWEBsection#1[#2]%
- {\iflinktoCWEBfile
- \bgroup
- \setupinteraction[\c!color=,\c!style=]%
- \let\savedreferenceprefix=\referenceprefix
- \localcolortrue
- \goto{#1}[\otherCWEBfile::\savedreferenceprefix web:#2]%
- \egroup
- \else
- #1%
- \fi}
-
-\protect
-
-\defCWEBmacro\startsection%
- {\rightskip=0pt % get out of C mode (cf. \B)
- \sfcode`;=1500
- \pretolerance 200
- \hyphenpenalty 50
- \exhyphenpenalty 50
- \noindent
- \bgroup
- \let\*=\lapstar
- \gotoCWEBsection{\bf\secstar.\quad}[\secno]%
- \egroup}
-
-\def\ignoreCWEBinput%
- {\let\normalinput=\input
- \def\input ##1 %
- {\let\input=\normalinput}}
-
-\def\loadCWEBmacros#1%
- {\let\oldN=\N
- \def\N{\bgroup\setbox0=\vbox\bgroup\endinput}%
- \ignoreCWEBinput
- \ReadFile{#1.tex}%
- \egroup\egroup
- \let\N=\oldN}
-
-\def\resetCWEBcontext%
- {\catcode`\|=12 % used in context discretionaries
- \everypar{} % used for context indentation and floats
- \parskip=0pt % no stretch between cweb paragraphs
- \parindent=1em} % is related to cweb backspace etc
-
-\newwrite\CWEBcont
-
-\def\processCWEBsource #1 %
- {\bgroup
- \resetCWEBcontext
- \activateCWEB
- \ignoreCWEBinput
- \immediate\openout\CWEBcont=#1.toc
- \write\CWEBcont{\noexpand\unprotect}
- \message{Source:}
- \marking[CWEBfilename]{#1}
- \ReadFile{#1.tex}\relax
- \write\CWEBcont{\noexpand\protect}
- \closeout\CWEBcont
- \par
- \egroup}
-
-\def\resetCWEBindexentry%
- {\xdef\currentCWEBindexentry{}}
-
-\def\showCWEBindexentry#1% can be redefined
- {\theCWEBvskip
- \vskip3\lineheight
- \goodbreak
- \vskip-3\lineheight
- {\pagereference[web:#1]\bf#1}%
- \theCWEBvskip}
-
-\def\checkCWEBindexentry#1%
- {\bgroup
- \def\\##1{##1}% a dummy that also removes the {}
- \def\|##1{##1}% another dummy
- \def\.##1{*##1}% and another (the typewriter one)
- \def\&##1{##1}% and a last one
- \def\9##1{##1}% hold this one
- \catcode`*=11
- \expandafter\def\expandafter\entry\expandafter{#1}%
- \defconvertedcommand\ascii\entry
- \expanded{\FINDFIRSTCHARACTER{\ascii}}%
- \doifnot{\currentCWEBindexentry}{\firstcharacter}
- {\doifnot{\firstcharacter}{*} % signal for \firstbunch
- {\global\let\currentCWEBindexentry=\firstcharacter
- \showCWEBindexentry{\currentCWEBindexentry}}}%
- \egroup}
-
-\def\theCWEBbeforeindex {\startcolumns}
-\def\theCWEBafterindex {\stopcolumns}
-
-\def\processCWEBindex #1 %
- {\bgroup
- \resetCWEBcontext
- \activateCWEB
- \resetCWEBindexentry
- \def\I##1, %
- {\par
- \checkCWEBindexentry{##1}%
- \hangindent2em
- \noindent##1:\kern1em%
- \def\next####1.%
- {\processCWEBsectionnumbers[{####1}]}%
- \next}%
- \def\[##1]%
- {$\underline{##1}$}%
- \let\*=\lapstar
- \parfillskip 0pt plus .6\hsize % try to avoid almost empty lines
-% \parskip 0pt plus .5pt
- \rightskip0pt plus 2.5em
- \tolerance 10000
- \hyphenpenalty 10000
- \parindent0pt
- \message{Index:}
- \marking[CWEBfilename] {#1}
- \marking[CWEBsectiontitle] {index}
- \marking[CWEBsectionnumber]{}
- \marking[CWEBsectiondepth]{}
- \loadCWEBmacros{#1}
- \theCWEBbeforeindex
- \ReadFile{#1.idx}\relax
- \theCWEBafterindex
- \par
- \egroup}
-
-\def\processCWEBsections #1 %
- {\bgroup
- \resetCWEBcontext
- \activateCWEB
- \loadCWEBmacros{#1}
- \parfillskip = 0pt plus 1fil
- \parindent = 0pt
- \let\topsecno=\nullsec
- \def\note##1%
- {\quad
- \bgroup
- \eightrm
- ##1~\processCWEBsectionnotes}
- \def\Q {\CWEBnotesfalse \note{Cited in section}} % crossref for mention of a section
- \def\Qs{\CWEBnotestrue \note{Cited in sections}} % crossref for mentions of a section
- \def\U {\CWEBnotesfalse \note{Used in section}} % crossref for use of a section
- \def\Us{\CWEBnotestrue \note{Used in sections}} % crossref for uses of a section
- \def\I {\par\hangindent 2em}%
- \let\*=*
- \message{Section names:}
- \marking[CWEBfilename] {#1}
- \marking[CWEBsectiontitle] {sections}
- \marking[CWEBsectionnumber]{}
- \marking[CWEBsectiondepth]{}
- \loadCWEBmacros{#1}
- \ReadFile{#1.scn}\relax
- \par
- \botofcontents
- \par
- \egroup}
-
-\def\processCWEBcontents #1 %
- {\bgroup
- \resetCWEBcontext
- \activateCWEB
- \loadCWEBmacros{#1}
- \rightskip = 0pt
- \hyphenpenalty = 50
- \tolerance = 200
- \parindent = 0pt
- \line{\hfil Section\hbox to3em{\hss Page}}
- \let\ZZ=\contentsline
- \message{Table of contents:}
- \marking[CWEBfilename] {#1}
- \marking[CWEBsectiontitle] {table of contents}
- \marking[CWEBsectionnumber]{}
- \marking[CWEBsectiondepth]{}
- \loadCWEBmacros{#1}
- \ReadFile{#1.toc}\relax
- \par
- \egroup}
-
-\defCWEBmacro\contentsline#1#2#3#4#5%
- {\ifnum#2=0
- \smallbreak
- \fi
- \line{\consetup{#2}#1
- \rm
- \leaders\hbox to .5em{.\hfil}\hfil\
- {\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 \type{\ifx#1\CWEBdefined}.)
-
-\def\outer#1#2%
- {\ifx#2\undefined
- \expandafter#1\expandafter#2%
- \else
- \expandafter#1\expandafter\ThrowAway
- \fi}
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/m-database.lua b/Master/texmf-dist/tex/context/base/m-database.lua
deleted file mode 100644
index 91e9636eeb0..00000000000
--- a/Master/texmf-dist/tex/context/base/m-database.lua
+++ /dev/null
@@ -1,132 +0,0 @@
-if not modules then modules = { } end modules ['m-database'] = {
- version = 1.001,
- comment = "companion to m-database.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local sub, gmatch = string.sub, string.gmatch
-local concat = table.concat
-local lpegpatterns, lpegmatch, lpegsplitat = lpeg.patterns, lpeg.match, lpeg.splitat
-local lpegP, lpegC, lpegS, lpegCt, lpegCc, lpegCs = lpeg.P, lpeg.C, lpeg.S, lpeg.Ct, lpeg.Cc, lpeg.Cs
-local stripstring = string.strip
-
-moduledata.database = moduledata.database or { }
-moduledata.database.csv = moduledata.database.csv or { }
-
--- One also needs to enable context.trace, here we only plug in some code (maybe
--- some day this tracker will also toggle the main context tracer.
-
-local trace_flush = false trackers.register("module.database.flush", function(v) trace_flush = v end)
-local report_database = logs.reporter("database")
-
-local context = context
-
-local l_tab = lpegpatterns.tab
-local l_space = lpegpatterns.space
-local l_comma = lpegpatterns.comma
-local l_empty = lpegS("\t\n\r ")^0 * lpegP(-1)
-
-local v_yes = interfaces.variables.yes
-
-local separators = { -- not interfaced
- tab = l_tab,
- tabs = l_tab^1,
- comma = l_comma,
- space = l_space,
- spaces = l_space^1,
-}
-
-function moduledata.database.csv.process(settings)
- local data
- if settings.type == "file" then
- local filename = resolvers.finders.byscheme("any",settings.database)
- data = filename ~= "" and io.loaddata(filename)
- data = data and string.splitlines(data)
- else
- data = buffers.getlines(settings.database)
- end
- if data and #data > 0 then
- local catcodes = tonumber(settings.catcodes) or tex.catcodetable
- context.pushcatcodes(catcodes)
- if trace_flush then
- context.pushlogger(report_database)
- end
- local separatorchar, quotechar, commentchar = settings.separator, settings.quotechar, settings.commentchar
- local before, after = settings.before or "", settings.after or ""
- local first, last = settings.first or "", settings.last or ""
- local left, right = settings.left or "", settings.right or ""
- local setups = settings.setups or ""
- local strip = settings.strip == v_yes or false
- local command = settings.command or ""
- separatorchar = (not separatorchar and ",") or separators[separatorchar] or separatorchar
- local separator = type(separatorchar) == "string" and lpegS(separatorchar) or separatorchar
- local whatever = lpegC((1 - separator)^0)
- if quotechar and quotechar ~= "" then
- local quotedata = nil
- for chr in gmatch(quotechar,".") do
- local quotechar = lpegP(chr)
- local quoteword = lpegCs(((l_space^0 * quotechar)/"") * (1 - quotechar)^0 * ((quotechar * l_space^0)/""))
- if quotedata then
- quotedata = quotedata + quoteword
- else
- quotedata = quoteword
- end
- end
- whatever = quotedata + whatever
- end
- local checker = commentchar ~= "" and lpegS(commentchar)
- if strip then
- whatever = whatever / stripstring
- end
- if left ~= "" then
- whatever = lpegCc(left) * whatever
- end
- if right ~= "" then
- whatever = whatever * lpegCc(right)
- end
- if command ~= "" then
- whatever = lpegCc("{") * whatever * lpegCc("}")
- end
- whatever = whatever * (separator/"" * whatever)^0
- if first ~= "" then
- whatever = lpegCc(first) * whatever
- end
- if last ~= "" then
- whatever = whatever * lpegCc(last)
- end
- if command ~= "" then
- whatever = lpegCs(lpegCc(command) * whatever)
- else
- whatever = lpegCs(whatever)
- end
- local found = false
- for i=1,#data do
- local line = data[i]
- if not lpegmatch(l_empty,line) and (not checker or not lpegmatch(checker,line)) then
- if not found then
- if setups ~= "" then
- context.begingroup()
- context.setups { setups }
- end
- context(before)
- found = true
- end
- context(lpegmatch(whatever,line))
- end
- end
- if found then
- context(after)
- if setups ~= "" then
- context.endgroup()
- end
- end
- context.popcatcodes()
- if trace_flush then
- context.poplogger()
- end
- else
- -- message
- end
-end
diff --git a/Master/texmf-dist/tex/context/base/m-database.mkii b/Master/texmf-dist/tex/context/base/m-database.mkii
deleted file mode 100644
index abb67986e02..00000000000
--- a/Master/texmf-dist/tex/context/base/m-database.mkii
+++ /dev/null
@@ -1,420 +0,0 @@
-%D \module
-%D [ file=m-database,
-%D version=2006.04.23,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Database Thingies,
-%D author=Hans Hagen\& Taco Hoekwater,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\unprotect
-
-% % % to be added to mult-* files
-%
-% % % todo: \dontcollectseparatedlist via k/v
-
-\definesystemvariable{ls}
-
-\def\c!first {first}
-\def\c!last {last}
-\def\c!quotechar {quotechar}
-
-\let\@NX\noexpand
-
-%D {processquotedlist}
-%D
-%D An even more general list processing macro is the
-%D following one:
-%D
-%D \starttyping
-%D \processquotedlist{beginsym}{endsym}{separator}\docommand list
-%D \stoptyping
-%D
-%D This one supports arbitrary open and close symbols as well
-%D as user defined separators.
-%D
-%D \starttyping
-%D \processquotedlist(){,}{"}\docommand(a=>b=>c=>d)
-%D \stoptyping
-
-\def\processquotedlist#1#2#3#4#5%
- {\def\csvquotechar{#4}%
- \edef\doconvertcsvquoteditem#4##1#4##2%
- {\@NX\ifx##2#3%
- \let\@NX\next\@NX\doconvertcsvlist
- \def\@NX\arg{#3}%
- \edef\@NX\temp{##1}%
- \@NX\expanded{\@NX#5{\@NX\temp}}%
- \@NX\else
- \let\@NX\next\@NX\redoconvertcsvquoteditem
- \def\@NX\arg{##1\@NX\csvquotechar}%
- \@NX\fi
- \@NX\expandafter\@NX\next\@NX\arg}%
- \edef\redoconvertcsvquoteditem##1#4##2%
- {\@NX\ifx##2#3%
- \let\@NX\next\@NX\doconvertcsvlist
- \def\@NX\arg{#3}%
- \edef\@NX\temp{##1}%
- \@NX\expanded{\@NX#5{\@NX\temp}}%
- \@NX\else
- \let\@NX\next\@NX\redoconvertcsvquoteditem
- \def\@NX\arg{##1\@NX\csvquotechar}%
- \@NX\fi
- \@NX\expandafter\@NX\next\@NX\arg}%
- \edef\doconvertcsvitem##1#3%
- {\edef\@NX\temp{##1}%
- \@NX\expanded{\@NX#5{\@NX\temp}}%
- \@NX\doconvertcsvlist#3}%
- \edef\doconvertcsvlist#3##1%
- {\@NX\ifx##1\@NX#2%
- \let\@NX\next \@NX\gobbleoneargument
- \@NX\else\@NX\ifx##1#4%
- \let\@NX\next \@NX\doconvertcsvquoteditem
- \@NX\else
- \let\@NX\next \@NX\doconvertcsvitem
- \@NX\fi\@NX\fi \@NX\next##1}%
- \doconvertcsvitem}
-
-\gdef\doprocessseparatedquoteditem#1%
- {\appendseparatedlistparameter\c!left%
- \appendseparatedlistcontent{#1}%
- \appendseparatedlistparameter\c!right}
-
-% a version more robust with regard to {a a} b c d situations:
-
-\edef\detokenizedrelax{\detokenize{\relax}}
-
-\edef\processseplistseparator{\detokenize{,}}%
-
-\def\dodefineprocessseplist#1#2% separator \docommand
- {\edef\processseplistseparator{\detokenize{#1}}%
- \def\dodoprocessseplist##1##2#1%
- {\edef\!!stringa{\detokenize{##1}}%
- \ifx\detokenizedrelax\!!stringa
- \expandafter\nodoprocessseplist
- % \else\ifx\!!stringa#1%
- \else\ifx\!!stringa\processseplistseparator
- #2{}%
- #2{##2}%
- \expandafter\expandafter\expandafter\dodoprocessseplist
- \else
- #2{##1##2}%
- \expandafter\expandafter\expandafter\dodoprocessseplist
- \fi\fi}%
- \def\doprocessseplist##1\relax
- {\dodoprocessseplist##1#1\relax#1\relax\relax\end}}
-
-\def\nodoprocessseplist#1\end
- {}
-
-\long\def\processseplist#1#2#3\relax raw version
- {\dodefineprocessseplist{#1}{#2}%
- \dodoprocessseplist#3#1\relax#1\relax\relax\end}
-
-% \dodefineprocessseplist{,}\test
-% \dodoprocessseplist{,}a,b,c\relax,\relax\relax\end
-% \doprocessseplista,b,c\relax
-
-% \def\test#1{[#1]}
-% \startlines
-% \processseplist{,}\test ,2,,\relax
-% \processseplist{,}\test ,,,44\relax
-% \processseplist{,}\test ,,33,44\relax
-% \processseplist{,}\test 11,,33,44\relax
-% \processseplist{,}\test 1,2,3,4\relax
-% \stoplines
-
-\newtoks\separatedlistdata
-
-\def\appendseparatedlistparameter#1%
- {\@EAEAEA\appendtoks\csname\??ls\currentseparatedlist#1\endcsname\to\separatedlistdata}
-
-\def\appendseparatedlistcontent#1%
- {\appendtoks#1\to\separatedlistdata}
-
-\def\flushseparatedlistdata
- {\the\separatedlistdata
- \separatedlistdata\emptytoks}
-
-\def\initializeseparatedlistdata
- {\separatedlistdata{\egroup}}
-
-\def\dontcollectseparatedlist
- {\def\dodoprocessseparatedfileline
- {\the\separatedlistdata
- \separatedlistdata\emptytoks
- \doprocessseparatedfileline}%
- \def\dodoprocessseparatedline
- {\the\separatedlistdata
- \separatedlistdata\emptytoks
- \doprocessseparatedline}%
- \let\flushseparatedlistdata\egroup
- \let\initializeseparatedlistdata\donothing}
-
-\chardef\separatedlistmode\zerocount
-
-\def\setcurrentlistseparator
- {\edef\currentlistseparator
- {\executeifdefined
- {\??ls::\csname\??ls\currentseparatedlist\c!separator\endcsname}%
- {\csname\??ls\currentseparatedlist\c!separator\endcsname}}%
- \doifvalue{\??ls\currentseparatedlist\c!separator}{tab}
- {\catcode`\^^I=12\relax}%
- \ifx\currentlistseparator\empty\def\currentlistseparator{,}\fi}
-
-\bgroup \catcode`\^^I=12
- \setgvalue{\??ls::tab}{ }
- \setgvalue{\??ls::space}{ }
- \setgvalue{\??ls::comma}{,}
-\egroup
-
-\def\doprocessseparatedfileline
- {\ifeof\scratchread
- \ifcase\separatedlistmode\appendseparatedlistparameter\c!after\fi
- \immediate\closein\scratchread
- \expandafter\flushseparatedlistdata
- \else\ifx\line\empty
- % skip, can be comment
- \read\scratchread to\line
- \@EA\dodoprocessseparatedfileline
- \else
- \appendseparatedlistparameter{\ifcase\separatedlistmode\c!first\else\c!command\fi}%
- \ifx\currentlistquotechar\empty%
- \expandafter\doprocessseplist\line\relax
- \else
- \expanded{\processquotedlist{}{\noexpand\end}%
- {\currentlistseparator}{\currentlistquotechar}%
- \noexpand\doprocessseparatedquoteditem \line\currentlistseparator\noexpand\end}%
- \fi
- \ifcase\separatedlistmode\appendseparatedlistparameter\c!last\fi
- \read\scratchread to\line
- \@EAEAEA\dodoprocessseparatedfileline
- \fi\fi}
-
-\def\dodoprocessseparatedfileline
- {\doprocessseparatedfileline}
-
-\def\doprocessseparatedfile[#1][#2]%
- {\bgroup
- \edef\currentseparatedlist{#1}%
- \doifdefined{\??ls\currentseparatedlist\c!command}{\chardef\separatedlistmode\plusone}%
- \setcurrentlistseparator
- \edef\currentlistquotechar{\csname\??ls\currentseparatedlist\c!quotechar\endcsname}%
- \expandafter\dodefineprocessseplist\expandafter{\currentlistseparator}\doprocessseparateditem
- \initializeseparatedlistdata
- \directsetup{\currentseparatedlist:\executeifdefined{\??ls\currentseparatedlist\c!setups}\s!default}%
- \ifcase\separatedlistmode\appendseparatedlistparameter\c!before\fi
- \endlinechar\minusone
- \ignorelines
- \catcode`\#\@@comment
- \immediate\openin\scratchread=#2\relax % todo: \doopenin
- \read\scratchread to\line
- \doprocessseparatedfileline}
-
-\def\dostartseparatedlist#1[#2]%
- {\bgroup
- \edef\currentseparatedlist{#2}%
- \doifdefined{\??ls\currentseparatedlist\c!command}{\chardef\separatedlistmode\plusone}%
- \obeylines
- \let#1\relax
- \def\separateslistend{#1}%
- \setcurrentlistseparator
- \edef\currentlistquotechar{\csname\??ls\currentseparatedlist\c!quotechar\endcsname}%
- \expandafter\dodefineprocessseplist\expandafter{\currentlistseparator}\doprocessseparateditem
- \directsetup{\currentseparatedlist:\executeifdefined{\??ls\currentseparatedlist\c!setups}\s!default}%
- \initializeseparatedlistdata
- \ifcase\separatedlistmode\appendseparatedlistparameter\c!before\fi
- \dodostartseparatedlist}
-
-\def\redoprocessseparatedline#1%
- {\def\!!stringa{#1}%
- \ifx\!!stringa\separateslistend
- \ifcase\separatedlistmode\appendseparatedlistparameter\c!after\fi
- \expandafter\flushseparatedlistdata
- \else%
- \appendseparatedlistparameter{\ifcase\separatedlistmode\c!first\else\c!command\fi}%
- \ifx\currentlistquotechar\empty%
- \doprocessseplist#1\relax
- \else%
- \defconvertedargument\csvdata{#1}%
- \expanded{\processquotedlist{}{\noexpand\end}%
- {\currentlistseparator}{\currentlistquotechar}%
- \noexpand\doprocessseparatedquoteditem \csvdata\currentlistseparator\noexpand\end}%
- \fi
- \ifcase\separatedlistmode\appendseparatedlistparameter\c!last\fi
- \expandafter\dodoprocessseparatedline
- \fi}
-
-\def\doprocessseparatedline
- {\doifnextbgroupelse\xdoprocessseparatedline\ydoprocessseparatedline}
-
-\def\dodoprocessseparatedline
- {\doprocessseparatedline}
-
-\def\doprocessseparateditem#1%
- {\ifcase\separatedlistmode
- \appendseparatedlistparameter\c!left
- \appendseparatedlistcontent{#1}%
- \appendseparatedlistparameter\c!right
- \else
- \appendseparatedlistcontent{{#1}}%
- \fi}
-
-
-\bgroup \obeylines
-
- \gdef\dodostartseparatedlist#1
- {\doprocessseparatedline}
-
- \gdef\xdoprocessseparatedline#1#2
- {\redoprocessseparatedline{{{#1}}#2}}
-
- \gdef\ydoprocessseparatedline#1
- {\redoprocessseparatedline{#1}}
-
-\egroup
-
-\startsetups CSV:unix
- \catcode`\#=\@@comment
-\stopsetups
-
-\def\defineseparatedlist
- {\dodoubleempty\dodefineseparatedlist}
-
-\def\dodefineseparatedlist[#1][#2]%
- {\setvalue{\e!start#1}{\expandafter\dostartseparatedlist\csname\e!stop#1\endcsname[#1]}%
- \getparameters
- [\??ls#1]
- [\c!separator=,
- \c!quotechar=,
- \c!first=,
- \c!left=,
- \c!before=,
- \c!right=,
- \c!last=,
- \c!after=,
-% \c!command=,
- #2]}
-
-\def\setupseparatedlist
- {\dodoubleempty\dosetupseparatedlist}
-
-\def\dosetupseparatedlist[#1]% [#2]
- {\getparameter[\??ls#1]} % [#2]
-
-\def\startseparatedlist[#1]%
- {\dostartseparatedlist\stopseparatedlist[#1]}
-
-\def\processseparatedfile
- {\dodoubleargument\doprocessseparatedfile}
-
-\protect \doifnotmode{demo}{\endinput}
-
-\defineseparatedlist
- [CSV]
- [separator={,},
- first=\bTR,last=\eTR,
- left=\bTD,right=\eTD,
- before=\bTABLE,after=\eTABLE]
-
-\startseparatedlist[CSV]
-a,b,c
-d,e,f
-\stopseparatedlist
-
-\startCSV
-a,b,c
-d,e,f
-\stopCSV
-
-\defineseparatedlist
- [CSV]
- [separator={,},
- quotechar={"},
- first=\NC,last=\NR,
- left=,right=\NC,
- before={\starttabulate[|l|l|l|]},after=\stoptabulate]
-
-\startCSV
-a,b,"c,d"
-d,"""",f
-\stopCSV
-
-\defineseparatedlist
- [CSV]
- [separator={ },
- first=\NC,last=\NR,
- left=,right=\NC,
- before={\starttabulate[|l|l|l|]},after=\stoptabulate]
-
-\startCSV
-a b c
-d e f
-\stopCSV
-
-\defineseparatedlist
- [CSV]
- [setups=unix,
- first=\NC,last=\NR,
- left=,right=\NC,
- before={\starttabulate[|l|l|l|]},after=\stoptabulate]
-
-% \startsetups CSV:unix
-% \catcode`\#=\@@comment
-% \stopsetups
-
-% %1,2,3
-% 1,2,3
-% # 4,5,6
-% 4,5,6
-
-\processseparatedfile[CSV][test.dat]
-
-\defineseparatedlist
- [CSVX]
- [command=\Whatever,
- separator={,},
- first=\bTR,last=\eTR,
- left=\bTD,right=\eTD,
- before=\bTABLE,after=\eTABLE]
-
-\def\Whatever#1#2#3{[#1][#2][#3]\endgraf}
-
-\startseparatedlist[CSVX]
-a,b,c
-d,e,f
-\stopseparatedlist
-
-\defineseparatedlist[CSV]
- [separator=comma,
- before=\bTABLE, after=\eTABLE,
- first=\bTR, last=\eTR,
- left=\bTD, right=\eTD]
-
-\startCSV
-a,b,c,Ä
-d,e,f,Å¡
-\stopCSV
-
-\enableregime[utf]
-
-\defineseparatedlist[X][separator=X,left=(,right=),first=\endgraf,last=\endgraf]
-\defineseparatedlist[Y][separator=Y,left=(,right=),first=\endgraf,last=\endgraf]
-
-\startX
-aXb
-Xc
-ÄXÅ¡
-\stopX
-
-\startY
-aYb
-Yc
-ÄYÅ¡
-\stopY
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-database.mkiv b/Master/texmf-dist/tex/context/base/m-database.mkiv
deleted file mode 100644
index cc7dd3d7207..00000000000
--- a/Master/texmf-dist/tex/context/base/m-database.mkiv
+++ /dev/null
@@ -1,211 +0,0 @@
-%D \module
-%D [ file=m-database,
-%D version=2010.08.04,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Database Thingies,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D For Mojca.
-
-\registerctxluafile{m-database}{1.001}
-
-\unprotect
-
-\definenamespace
- [db]
- [type=module,
- comment=database module,
- version=1,
- name=database,
- parent=db,
- setup=yes,
- command=yes]
-
-\setupdatabase
- [\c!separator={,},
- \c!quotechar=,
- \c!commentchar=,
- \c!strip=\v!no,
- \c!before=,
- \c!after=,
- \c!first=,
- \c!last=,
- \c!left=,
- \c!right=]
-
-% \let\currentdatabase\empty \the\everypresetdatabase % or just:
-
-\setupdatabase
- [\c!separator={,}]
-
-\def\module_database_process#1#2#3%
- {\edef\currentdatabasetype{#1}%
- \edef\currentdatabase {#2}%
- \edef\currentdatabasename{#3}%
- \ifx\currentdatabasename\empty
- \let\currentdatabasename\currentdatabase
- \let\currentdatabase\empty
- \fi
- \ctxlua{moduledata.database.csv.process {
- name = "\currentdatabase",
- type = "\currentdatabasetype",
- database = "\currentdatabasename",
- strip = "\databaseparameter\c!strip",
- separator = \!!bs\databaseparameter\c!separator \!!es,
- quotechar = \!!bs\databaseparameter\c!quotechar \!!es,
- commentchar = \!!bs\databaseparameter\c!commentchar\!!es,
- setups = \!!bs\databaseparameter\c!setups \!!es,
- before = \!!bs\databaseparameter\c!before \!!es,
- after = \!!bs\databaseparameter\c!after \!!es,
- first = \!!bs\databaseparameter\c!first \!!es,
- last = \!!bs\databaseparameter\c!last \!!es,
- left = \!!bs\databaseparameter\c!left \!!es,
- right = \!!bs\databaseparameter\c!right \!!es,
- command = \!!bs\databaseparameter\c!command \!!es,
- catcodes = \number\catcodetable
- }}}
-
-\unexpanded\def\processdatabasebuffer{\dodoubleempty\module_database_process_buffer}
-\unexpanded\def\processdatabasefile {\dodoubleempty\module_database_process_file}
-
-\def\module_database_process_buffer[#1][#2]{\module_database_process{buffer}{#1}{#2}}
-\def\module_database_process_file [#1][#2]{\module_database_process{file} {#1}{#2}}
-
-% for old times sake:
-
-\unexpanded\def\defineseparatedlist {\dodoubleempty\module_database_separated_list_define}
-\unexpanded\def\processseparatedfile{\dodoubleempty\module_database_separated_list_process}
-
-\def\module_database_separated_list_define[#1][#2]%
- {\definedatabase[#1][#2]%
- \setuvalue{\e!start#1}{\grabbufferdatadirect{#1}{\e!start#1}{\e!stop#1}}%
- \setuvalue{\e!stop#1}{\processdatabasebuffer[#1][#1]}}
-
-\def\module_database_separated_list_process[#1][#2]%
- {\processdatabasefile[#1][#2]}
-
-\unexpanded\def\startseparatedlist[#1]% to be interfaced
- {\unexpanded\def\stopseparatedlist{\processdatabasebuffer[#1][#1]}%
- \grabbufferdatadirect{#1}{startseparatedlist}{stopseparatedlist}}
-
-\let\setupseparatedlist\setupdatabase
-
-\protect
-
-\continueifinputfile{m-database.mkiv}
-
-\starttext
-
-% m-database.txt
-%
-% 1,2,3,4,5
-% 6,7,8,"9,x",0
-% A,B,C,D
-% E,,F
-% G
-
-\definedatabase[test]
-
-\setupdatabase
- [test]
- [separator={,},
- quotechar={"},
- before={<},
- after={>},
- first={\endgraf[},
- last={]\endgraf},
- left={ (},
- right={) }]
-
-\startbuffer[testbuffer]
-1,2,3,4,5
-6,7,8,"9,x",0
-A,B,C,D
-E,,F
-G
-\stopbuffer
-
-\processdatabasebuffer[test][testbuffer]
-
-\processdatabasefile[test][m-database.txt]
-
-\defineseparatedlist
- [CSV]
- [separator={,},
- before=\bTABLE,after=\eTABLE,
- first=\bTR,last=\eTR,
- left=\bTD,right=\eTD]
-
-% \startseparatedlist[CSV]
-% a,b,c
-% d,e,f
-% \stopseparatedlist
-
-\startCSV
-a,b,c
-d,e,f
-\stopCSV
-
-\defineseparatedlist
- [CSV]
- [separator={,+},quotechar={"'},commentchar=\letterhash,
- before={\starttabulate[|l|l|l|]},after=\stoptabulate,
- first=\NC,last=\NR,
- left=,right=\NC]
-
-\startCSV
-#a,b,"c,d"
-a,b,"c,d"
-a,'b,c',d
-"a,b"+c+d
-\stopCSV
-
-\defineseparatedlist
- [CSV]
- [separator=space,
- first=\NC,last=\NR,
- left=,right=\NC,
- before={\starttabulate[|l|l|l|]},after=\stoptabulate]
-
-\startCSV
-a b c
-d e f
-\stopCSV
-
-\startsetups csv:unix
- \catcode\hashasciicode\commentcatcode
-\stopsetups
-
-\defineseparatedlist
- [CSV]
- [setups=csv:unix,
- separator={,},
- first=\NC,last=\NR,
- left=,right=\NC,
- before={\starttabulate[|l|l|l|]},after=\stoptabulate]
-
-\processseparatedfile[CSV][m-database.txt]
-
-\defineseparatedlist[CSV]
- [separator=comma,
- before=\bTABLE, after=\eTABLE,
- first=\bTR, last=\eTR,
- left=\bTD, right=\eTD]
-
-\startCSV
-a,b,c,Ä
-d,e,f,Å¡
-\stopCSV
-
-\startseparatedlist[CSV]
-a,b,c,Ä
-d,e,f,Å¡
-\stopseparatedlist
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-datastrc.tex b/Master/texmf-dist/tex/context/base/m-datastrc.tex
deleted file mode 100644
index 1fd5a9e42c4..00000000000
--- a/Master/texmf-dist/tex/context/base/m-datastrc.tex
+++ /dev/null
@@ -1,228 +0,0 @@
-%D \module
-%D [ file=m-datastrc, % was: core-dat % was core-02a
-%D version=1999.08.10, % 1997.03.31,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Database Support, % 2A
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Core Macros / Database Support}
-
-\unprotect
-
-%D This module is a (limited) rewrite of the original \type
-%D {core-02a} module, the module that dealt with managing a
-%D database of addresses. The principles and methods have not
-%D changed; they are only generalized.
-%D
-%D A database file |<|in most cases such a base is generated
-%D from another one|>| is structured as follows:
-%D
-%D \starttyping
-%D \startrecord{tag}
-%D \memberofgroup{grouplist}
-%D \setrecordentry{name}{...}
-%D ....
-%D \stoprecord
-%D \stoptyping
-%D
-%D The interface to such a database is defined as follows:
-%D
-%D \starttyping
-%D \definerecord[class][settings]
-%D \setuprecord[class][settings]
-%D \definerecordentry[class][name]
-%D \stoptyping
-%D
-%D and processed by
-%D
-%D \starttyping
-%D \processrecords[file list][tag and/or group list]
-%D \stoptyping
-%D
-%D The actual processing is done by a macro assigned to \type
-%D {command}:
-%D
-%D \starttyping
-%D \setuprecord[class][command=\DoWithRecord]
-%D \stoptyping
-%D
-%D Given that one can ask for a field with
-%D
-%D \starttyping
-%D \getrecordentry{name}
-%D \stoptyping
-%D
-%D such a command can look like:
-%D
-%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 \stoptyping
-%D
-%D The argument passed is the tag. The database can look like:
-%D
-%D \starttyping
-%D \startrecord{hagenj}
-%D \memberofgroup{a,b}
-%D \setrecordentry{naam}{Hans}
-%D \setrecordentry{family name}{Hagen}
-%D \setrecordentry{postal address}{J. Hagen\\Ridderstraat 29\\Hasselt NL}
-%D \stoprecord
-%D
-%D \startrecord{ottenaf}
-%D \memberofgroup{a}
-%D \setrecordentry{name}{Ton}
-%D \setrecordentry{family name}{Otten}
-%D \setrecordentry{postal address}{A.F. Otten\\Prinsengracht 17\\Hasselt NL}
-%D \stoprecord
-%D \stoptyping
-%D
-%D The definition of this database looks like:
-%D
-%D \starttyping
-%D \definerecord[address][command=\DoWithRecord]
-%D
-%D \definerecordentry[address][name]
-%D \definerecordentry[address][family name]
-%D \definerecordentry[address][postal address]
-%D \stoptyping
-%D
-%D The actual processing is now done by (for instance):
-%D
-%D \starttyping
-%D \processrecords[datafile][hagenj]
-%D \processrecords[datafile][hagenj,offenaf]
-%D \processrecords[datafile][all]
-%D \processrecords[datafile][a]
-%D \processrecords[datafile][b]
-%D \stoptyping
-%D
-%D Of course one can reassign the command used to handle the
-%D records in between.
-
-% \??kt ->
-% \??kw ->
-
-\def\??db {@@db}
-\def\c!velden{velden}
-
-%\newevery \everyrecord \EveryRecord
-
-\def\definerecord
- {\dodoubleempty\dodefinerecord}
-
-\def\dodefinerecord[#1][#2]%
- {\getparameters
- [\??db#1]
- [\c!velden=,
- \c!command=\gobbleoneargument,
- #2]}
-
-\def\setuprecord
- {\dodoubleargument\dosetuprecord}
-
-\def\dosetuprecord[#1][#2]%
- {\getparameters[\??db#1][#2]}%
-
-\def\definerecordentry[#1][#2]%
- {\edef\recordentries{\getvalue{\??db#1\c!velden}}%
- \addtocommalist{#2}\recordentries
- \letvalue{\??db#1\c!velden}\recordentries}
-
-%D Watch out: the entries are defined global! While
-%D processing a record, no grouping is applied.
-
-\def\getrecordentry #1{\getvalue {\??db:#1}}
-\def\resetrecordentry #1{\letgvalueempty{\??db:#1}}
-\def\assignrecordentry#1{\setgvalue {\??db:#1}}
-
-\long\def\skiprecord#1\stoprecord
- {\egroup}
-
-\newif\ifrecordok
-
-\newtoks\resetrecordlist
-
-\def\processrecords
- {\dotripleargument\doprocessrecords}
-
-\def\doprocessrecords[#1][#2][#3]%
- {\bgroup
- \ifx\\\undefined\let\\\relax\fi
- \def\docommand##1%
- {\resetrecordentry{##1}%
- \appendtoks\resetrecordentry{##1}\to\resetrecordlist}%
- \processcommacommand[\getvalue{\??db#1\c!velden}]\docommand
- \let\setrecordentry\skiprecord
- \the\resetrecordlist
- \doifelse{#2}\v!all % 't Is nu eenmaal alles
- \recordoktrue
- {\doifelsenothing{#2} % of niets
- \recordoktrue
- \recordokfalse}% % zullen we maar zeggen.
- \ifrecordok
- \let\askedrecords\v!all
- \else
- \makerawcommalist[#2]\askedrecords
- \fi
- \def\checkrecord##1%
- {\rawdoifinsetelse{##1}{\askedrecords}{\recordoktrue}{}}%
- \def\presetrecord##1%
- {\let\setrecordentry\assignrecordentry
- \let\memberofgroup\gobbleoneargument
- \the\resetrecordlist
- \def\stoprecord{\dostoprecord{##1}}}%
- \def\memberofgroup##1%
- {\doifsomething{##1}
- {\rawprocesscommalist[##1]\checkrecord}%
- \ifrecordok
- \presetrecord{##1}%
- \else
- \expandafter\skiprecord
- \fi}%
- \def\startrecord##1%
- {\bgroup
- \ifrecordok
- \presetrecord{##1}%
- \else
- \checkrecord{##1}%
- \ifrecordok
- \presetrecord{##1}%
- \fi
- \fi}%
- \def\dostoprecord##1%
- {\relax
- \egroup
- %\the\everyrecord
- \getvalue{\??db#1\c!command}{##1}}%
- \showmessage\m!databases1\askedrecords
- \def\doprocessrecords##1%
- {\readjobfile{##1}
- {\showmessage\m!databases2{(job)}}
- {\readsysfile{##1}
- {\showmessage\m!databases3{(sys)}}
- {\showmessage\m!databases4{}}}}%
- \processcommalist[#3]\doprocessrecords
- \egroup}
-
-%D While writing the original implementation, I did some
-%D experiments with \type {%} before each entry and changing
-%D the category code of the comment char. Because \TEX\ scans
-%D the line anyway |<|this is needed because the end of line
-%D character can be non standard|>| this is not faster.
-%D
-%D Although this mechanism could have been combined with the
-%D block moving mechanism, the current implementation is
-%D prefered out of speed reasons.
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/m-directives.mkiv b/Master/texmf-dist/tex/context/base/m-directives.mkiv
deleted file mode 100644
index 8b551b27abd..00000000000
--- a/Master/texmf-dist/tex/context/base/m-directives.mkiv
+++ /dev/null
@@ -1,3 +0,0 @@
-\starttext
- \showdirectives
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-dratex.mkii b/Master/texmf-dist/tex/context/base/m-dratex.mkii
deleted file mode 100644
index 2b5f0be2a6f..00000000000
--- a/Master/texmf-dist/tex/context/base/m-dratex.mkii
+++ /dev/null
@@ -1,21 +0,0 @@
-%D \module
-%D [ file=m-dratex,
-%D version=2005.11.25,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=\DRATEX\ Loading Macros,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details
-
-\readfile{DraTex.sty}{}{\readfile{dratex.sty}{}{\endinput}}
-
-\letvalue{:NewCount}\newcount
-\letvalue{:NewDimen}\newdimen
-
-\readfile{AlDraTex.sty}{}{\readfile{aldratex.sty}{}{\endinput}}
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/m-edtsnc.mkii b/Master/texmf-dist/tex/context/base/m-edtsnc.mkii
deleted file mode 100644
index 0f66893e833..00000000000
--- a/Master/texmf-dist/tex/context/base/m-edtsnc.mkii
+++ /dev/null
@@ -1,207 +0,0 @@
-%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 ADE \& \CONTEXT\ Development Team}]
-%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/Master/texmf-dist/tex/context/base/m-educat.tex b/Master/texmf-dist/tex/context/base/m-educat.tex
deleted file mode 100644
index 93b1a6c5db3..00000000000
--- a/Master/texmf-dist/tex/context/base/m-educat.tex
+++ /dev/null
@@ -1,217 +0,0 @@
-%D \module
-%D [ file=m-educat,
-%D version=2003.03.05,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=Educational Extras,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 will collect a few macros cq.\ definitions
-%D meant for educational use. Most of the code has been laying
-%D around for some time and has been (or is still) used in
-%D \PRAGMA\ projects.
-
-\unprotect
-
-\definesystemvariable{iv}
-
-\definecolor [answerareacolor] [s=.90]
-\definecolor [answerlinecolor] [white]
-
-\definetextbackground
- [\v!answerarea]
- [\c!location=\v!text,
- \c!n=0,
- \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
-
-\def\setupanswerarea
- {\setuptextbackground[\v!answerarea]}
-
-\setvalue\e!answerspace
- {\dosingleempty\doanswerspace}
-
-\def\doanswerspace[#1]%
- {\begingroup
- \dontcomplain
- \setupanswerarea
- [\c!n=0,\c!m=,#1,\c!location=\v!text]%
- \doifelsenothing{\textbackgroundparameter\c!m}
- {\expandafter\donoanswerspace}
- {\expandafter\dodoanswerspace}%
- [#1]}
-
-\def\donoanswerspace[#1]#2%
- {\setupthinrules
- [\c!alternative=\textbackgroundparameter\c!alternative,
- \c!color=\textbackgroundparameter\c!framecolor,
- \c!background=\textbackgroundparameter\c!background,
- \c!backgroundcolor=\textbackgroundparameter\c!backgroundcolor,
- \c!rulethickness=\textbackgroundparameter\c!rulethickness]%
- \doifelse{\textbackgroundparameter\c!n}{*}
- {\thinrule
- \par}
- {\scratchcounter0\textbackgroundparameter\c!n\relax
- % tricky, guess
- \def\processisolatedword##1%
- {\setbox\scratchbox=\hbox{##1}%
- \vbox{\hsize\wd\scratchbox\thinrule
- \ifcase\scratchcounter\else
- \setbox\scratchbox=\hbox{\space}%
- \nobreak\hskip\zeropoint \!!minus \wd\scratchbox
- \vbox{\hsize\wd\scratchbox\thinrule}%
- \fi}}%
- \processisolatedwords{#2}\processisolatedword
- % so far
- \ifcase\scratchcounter \else \ifnum\scratchcounter<3
- \nobreak \vbox{\hsize\scratchcounter em\thinrule}%
- \else % more
- \advance \scratchcounter -2
- \dorecurse\scratchcounter{\allowbreak\vbox{\hsize1em\thinrule}}%
- \nobreak \vbox{\hsize2em\thinrule}%
- \fi \fi}%
- \endgroup}
-
-\def\dodoanswerspace[#1]#2% m case
- {\getvalue{\e!start\v!answerarea}%
- #2%
- \doifelse{\textbackgroundparameter\c!m}{*}
- {\hfill\strut
- \getvalue{\e!stop\v!answerarea}%
- \par}
- {\scratchcounter0\textbackgroundparameter\c!m\relax
- \ifcase\scratchcounter \else \ifnum\scratchcounter<3
- \nobreak \hbox to \scratchcounter em{\strut\hss}%
- \else % more
- \advance \scratchcounter -2
- \dorecurse\scratchcounter{\allowbreak\hbox to 1em{\strut\hss}}%
- \nobreak \hbox to 2em{\strut\hss}%
- \fi \fi
- \getvalue{\e!stop\v!answerarea}}%
- \endgroup}
-
-\setvalue{\e!start\e!answerlines}%
- {\dosingleempty\dostartanswerlines}
-
-\def\dostartanswerlines[#1]%
- {\begingroup
- \dontcomplain
- \setupanswerarea
- [\c!n=0,\c!m=,#1,\c!location=\v!text]%
- \doifnot{\textbackgroundparameter\c!option}\v!joinedup\softbreak
- \doifelsenothing{\textbackgroundparameter\c!m}
- {\expandafter\donostartanswerlines}
- {\expandafter\dodostartanswerlines}%
- [#1]}
-
-\def\donostartanswerlines[#1]%
- {\setupthinrules
- [\c!alternative=\textbackgroundparameter\c!alternative,
- \c!color=\textbackgroundparameter\c!framecolor,
- \c!background=\textbackgroundparameter\c!background,
- \c!backgroundcolor=\textbackgroundparameter\c!backgroundcolor,
- \c!rulethickness=\textbackgroundparameter\c!rulethickness]%
- \thinrules[\c!n=\textbackgroundparameter\c!n]\par
- \endgroup
- \grabuntil{\e!stop\e!answerlines}}
-
-\def\dodostartanswerlines[#1]%
- {\begingroup
- \getvalue{\e!start\v!answerarea}%
- \ignorespaces}
-
-\setvalue{\e!stop\e!answerlines}%
- {\scratchcounter0\textbackgroundparameter\c!m\relax
- % a \softbreak is more efficient in pos dan \par
- \ifcase\scratchcounter
- % nothing
- \or
- \softbreak
- \else
- \softbreak
- \advance \scratchcounter \minusone
- \dorecurse\scratchcounter{\strut\hfill\strut\softbreak}%
- \fi
- \strut\hfill\strut
- \getvalue{\e!stop\v!answerarea}%
- \par\endgroup\endgroup}
-
-\setvalue\e!answerlines
- {\dosingleempty\doanswerlines}
-
-\def\doanswerlines[#1]#2%
- {\getvalue{\e!start\e!answerlines}[#1]%
- #2%
- \getvalue{\e!stop\e!answerlines}}
-
-\protect \doifnotmode{demo}{\endinput}
-
-%D Test materiaal.
-
-\starttext
-
-\startnotmode[answers]
-
- \setupanswerarea[level=+1]
-
-\stopnotmode
-
-\setupcolors[state=start]
-
-test test test \answerspace [n=10] {Whow}. test test test
-test tets test test \answerspace [n=10] {Whow}. test test
-test test tets test test \answerspace [n=10] {Whow}. test
-test test test tets test test \answerspace [n=10] {Whow}.
-test test test test test test \answerspace [n=*] {Whow.}
-
-test test test test test test test \startanswerlines
-[n=3] What A Junk Answer \stopanswerlines
-
-test test test test test test test \startanswerlines
-[n=3,alternative=0] What A Junk Answer \stopanswerlines
-
-test test test test test test test \startanswerlines
-[n=3,alternative=1] What A Junk Answer \stopanswerlines
-
-test test test test test test test \startanswerlines
-[n=3,alternative=2] What A Junk Answer \stopanswerlines
-
-\startitemize[paragraph]
-\item \startanswerlines [option=seried,n=2] xxx \stopanswerlines
-\stopitemize
-
-test test test \answerspace [m=10] {Whow}. test test test
-test tets test test \answerspace [m=10] {Whow}. test test
-test test tets test test \answerspace [m=10] {Whow}. test
-test test test tets test test \answerspace [m=10] {Whow}.
-test test test test test test \answerspace [m=*] {Whow.}
-
-test test test test test test test \startanswerlines
-[m=2] What A Junk Answer \stopanswerlines
-
-test test test test test test test \startanswerlines
-[m=2,alternative=0] What A Junk Answer \stopanswerlines
-
-test test test test test test test \startanswerlines
-[m=2,alternative=1] What A Junk Answer \stopanswerlines
-
-test test test test test test test \startanswerlines
-[m=2,alternative=2] What A Junk Answer \stopanswerlines
-
-\startitemize[paragraph]
-\item \startanswerlines [option=seried,m=2] xxx \stopanswerlines
-\stopitemize
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-fields.mkiv b/Master/texmf-dist/tex/context/base/m-fields.mkiv
deleted file mode 100644
index 46b77f8d39b..00000000000
--- a/Master/texmf-dist/tex/context/base/m-fields.mkiv
+++ /dev/null
@@ -1,70 +0,0 @@
-%D \module
-%D [ file=m-fields,
-%D version=2010.03.14,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=Fields,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 A rather old example of field usage is the following. It
-%D makes no sense to have this in the core.
-%D
-%D \starttyping
-%D before \fillinfield[oeps]{whatever} after
-%D \stoptyping
-
-\startJSpreamble{FillInField} used later
- function CheckFillInField(right) {
- if (event.value.toLowerCase() == right.toLowerCase()) {
- event.target.hidden = true ;
- }
- event.value = ""
- }
-\stopJSpreamble
-
-\newcount\noffillinfields
-
-\definefieldcategory
- [fillinfield]
- [\c!n=1024,
- \c!height=\strutht,
- \c!depth=\strutdp,
- \c!align=\v!middle,
- \c!color=red,
- \c!fieldframecolor=blue,
- \c!fieldbackgroundcolor=\s!white,
- \c!validate=JS(CheckFillInField{\therightanswer})]
-
-\def\fillinfield
- {\dosingleempty\dofillinfield}
-
-\def\dofillinfield[#1]#2%
- {\dontleavehmode
- \hbox
- {\forgetall
- \global\advance\noffillinfields\plusone
- \edef\currentfillinfieldname{fillinfield:\number\noffillinfields}%
- \useJSscripts[ans]%
- \definefieldbody
- [\currentfillinfieldname]
- [\c!type=\v!line,
- \c!category=fillinfield]%
- \doifelsenothing{#1}
- {\def\therightanswer{#2}}
- {\def\therightanswer{#1}}%
- \setbox0\hbox{\strut#2}%
- \setbox2\hbox{\strut\therightanswer}%
- \dimen0=\dimexpr\ifdim\wd0>\wd2 \wd0 \else \wd2 \fi + .2em\relax
- \hbox to \wd0
- {\wd0\zeropoint
- \box0
- \hss\fieldbody[\currentfillinfieldname][\c!width=\dimen0]\hss}}}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/m-format.tex b/Master/texmf-dist/tex/context/base/m-format.tex
deleted file mode 100644
index e974e4a1101..00000000000
--- a/Master/texmf-dist/tex/context/base/m-format.tex
+++ /dev/null
@@ -1,409 +0,0 @@
-%D \module
-%D [ file=m-formay,
-%D version=ancient,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Ancient Formatting Code,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D Here is some code that I had laying around and had forgotten
-%D about. Let's make it a module and see if there is interest in
-%D such things.
-
-% \defineformatblock [poem]
-% \defineformatsegment [verse] % [poem]
-% \defineformatline [line] % [verse]
-%
-% \startpoem [title] [author]
-% \startverse [ref]
-% \startline [ref]
-%
-% block : voor na tussen *tekstletter *tekstkleur
-%
-% segment : voor na tussen *tekstletter *tekstkleur
-% : links rechts linkeroffset rechteroffset
-% : ?marge *evenmarge *onevenmarge breedte
-% : nummer *nummercommando *conversie
-% : nummerletter nummerkleur *label
-%
-% line : voor na tussen *tekstletter *tekstkleur
-% : nummer *nummercommando *conversie
-% : nummerletter nummerkleur *label
-%
-% * = todo
-
-\unprotect
-
-\definesystemvariable {fx} % format block
-\definesystemvariable {fy} % format segment
-\definesystemvariable {fz} % format line
-
-\def\defineformatblock
- {\dodoubleempty\dodefineformatblock}
-
-\def\dodefineformatblock[#1][#2]%
- {\setupformatblock
- [#1]
- [\c!before=\blank,\c!after=\blank,\c!inbetween=\blank,
- \c!textstyle=,\c!textcolor=,#2]%
- \setvalue{\e!start#1}{\startformatblock[#1]}%
- \setvalue{\e!stop #1}{\stopformatblock}}
-
-\def\setupformatblock
- {\dodoubleempty\dosetupformatblock}
-
-\def\setupformatblock[#1]%
- {\getparameters[\??fx#1]}
-
-\def\startformatblock[#1]%
- {\dotriplegroupempty\dostartformatblock{#1}}
-
-\def\dostartformatblock#1#2#3
- {\bgroup
- \getvalue{\??fx#1\c!before}
- \doglobal\newcounter\formatsegmentcounter
- \doglobal\newcounter\formatlinecounter
- \doglobal\newcounter\formatlinesubcounter
- \doglobal\newcounter\formatlinemaxcounter
- \doifsomething{#2}{\leftaligned{#2}\getvalue{\??fx#1\c!inbetween}}
- \def\stopformatblock%
- {\doifsomething{#3}{\getvalue{\??fx#1\c!inbetween}\leftaligned{#3}}
- \getvalue{\??fx#1\c!after}
- \egroup}}
-
-\def\defineformatsegment
- {\dodoubleempty\dodefineformatsegment}
-
-\def\dodefineformatsegment[#1][#2]%
- {\setupformatsegment
- [#1]
- [\c!before=\blank,\c!after=\blank,\c!inbetween=\blank,
- \c!textstyle=,\c!textcolor=,\c!left=,\c!right=,
- \c!leftoffset=\!!zeropoint,\c!rightoffset=\!!zeropoint,
- %\c!margin=\!!zeropoint,\c!evenmargin=\!!zeropoint,\c!oddmargin=\hsize,
- \c!width=\hsize,\c!numberstyle=,\c!numbercolor=,\c!number=\v!no,
- \c!numbercommand=,\c!conversion=,\c!label=,
- #2]%
- \setvalue{\e!start#1}{\startformatsegment[#1]}%
- \setvalue{\e!stop #1}{\stopformatsegment}}
-
-\def\setupformatsegment
- {\dodoubleempty\dosetupformatsegment}
-
-\def\setupformatsegment[#1]%
- {\getparameters[\??fy#1]}
-
-\def\placeformatsegmentcounter
- {\formatsegmentcounter\quad\hphantom{\placeformatlinecounter}}
-
-\def\placeformatlinecounter
- {\formatlinecounter}
-
-\def\startformatsegment[#1]%
- {\bgroup
- \doifelsevalue{\??fy#1\c!number}\v!yes
- {\def\doplaceformatsegmentcounter
- {\inleftmargin
- {\doattributes{\??fy#1}\c!numberstyle\c!numbercolor
- {\placeformatsegmentcounter}}}}
- {\let\doplaceformatsegmentcounter\relax}%
- \getvalue{\??fy#1\c!before}
- \doglobal\increment\formatsegmentcounter
- \def\formatrightoffset{\getvalue{\??fy#1\c!rightoffset}}
- \def\formatleftoffset {\getvalue{\??fy#1\c!leftoffset}}
- \def\formatminwidth {\getvalue{\??fy#1\c!minwidth}}
- \def\formatwidth {\getvalue{\??fy#1\c!width}}
- %\def\formatmargin {\getvalue{\??fy#1\c!margin}}
- \def\formatbefore {\getvalue{\??fy#1\c!before}}
- \def\formatinbetween {\getvalue{\??fy#1\c!inbetween}}
- \def\formatafter {\getvalue{\??fy#1\c!after}}
- \def\formatleft {\getvalue{\??fy#1\c!left}}
- \def\formatright {\getvalue{\??fy#1\c!right}}
- \@@segmentvarianta
- \getvalue{@@segmentvariant\getvalue{\??fy#1\c!alternative}}
- \def\stopformatsegment
- {\getvalue{\??fy#1\c!after}
- \egroup}}
-
-\newif\iftraceformatblock
-
-\def\@@segmentvarianta % ragged right, symbols
- {\let\formatraggedness\raggedright
- \let\dostartformatline\dostartformatlineab
- \let\formatleftfirst\relax \let\formatrightfirst\hfill
- \let\formatleftnext \hfill \let\formatrightnext \relax}
-
-\def\@@segmentvariantb % ragged right, equal parts, symbols
- {\let\formatraggedness\raggedcenter
- \let\dostartformatline\dostartformatlineab
- \let\formatleftfirst\relax \let\formatrightfirst\hfill
- \let\formatleftnext \hfill \let\formatrightnext \relax}
-
-\def\@@segmentvariantc % ragged right
- {\let\formatraggedness\veryraggedright
- \let\dostartformatline\dostartformatlinecde
- \let\formatleftnext\relax \let\formatrightnext\hfill}
-
-\def\@@segmentvariantd % ragged center
- {\let\formatraggedness\veryraggedcenter
- \let\dostartformatline\dostartformatlinecde
- \let\formatleftnext\hfill \let\formatrightnext\hfill}
-
-\def\@@segmentvariante % ragged left
- {\let\formatraggedness\veryraggedleft
- \let\dostartformatline\dostartformatlinecde
- \let\formatleftnext\hfill \let\formatrightnext\relax}
-
-\def\defineformatline
- {\dodoubleempty\dodefineformatline}
-
-\def\dodefineformatline[#1][#2]%
- {\setupformatline
- [#1]
- [\c!before=\blank,\c!after=\blank,\c!inbetween=\blank,
- \c!textstyle=,\c!textcolor=,
- \c!number=\v!no,\c!numbercommand=,\c!conversion=,
- \c!numberstyle=,\c!numbercolor=,\c!label=,
- #2]%
- \setvalue{\e!start#1}{\startformatline[#1]}%
- \setvalue{\e!stop #1}{\stopformatline}}
-
-\def\setupformatline
- {\dodoubleempty\dosetupformatline}
-
-\def\setupformatline[#1]%
- {\getparameters[\??fz#1]}
-
-\newconditional\formatforcedbreak
-
-\def\startformatline[#1]%
- {\bgroup
- \doifelsevalue{\??fz#1\c!number}\v!yes
- {\def\doplaceformatlinecounter
- {\inleftmargin
- {\doattributes{\??fz#1}\c!numberstyle\c!numbercolor
- {\placeformatlinecounter}}}}
- {\let\doplaceformatlinecounter\relax}%
- \global\setfalse\formatforcedbreak
- \def\\{\break\global\settrue\formatforcedbreak}%
- \hsize\formatwidth
- \doglobal\increment\formatlinecounter
- \par
- \nobreak
- \def\stopformatline
- {\unskip\unskip\unskip\unskip\unskip\egroup
- \let\doplaceformatsegmentcounter\relax}
- \postponenotes
- \dowithnextbox{\dostartformatline}\hbox\bgroup\ignorespaces}
-
-\def\dostartformatlineab
- {%\dosetleftskipadaption\formatmargin
- %\advance\hsize-\leftskipadaption\relax
- \ifdim\nextboxwd>\hsize
- \beginofshapebox
- \forgetall
- \hangafter\plusone
- \hangindent\formatleftoffset
- \formatraggedness
- \hskip\formatrightoffset
- \unhbox\nextbox\par
- \endofshapebox
- %\advance\hsize \leftskipadaption
- \doglobal\newcounter\formatlinesubcounter
- \reshapebox
- {\doglobal\increment\formatlinesubcounter}
- \global\let\formatlinemaxcounter\formatlinesubcounter
- \reshapebox
- {\doglobal\decrement\formatlinesubcounter
- \ifnum\formatlinesubcounter=\zerocount
- \doplaceformatsegmentcounter
- \doplaceformatlinecounter
- \hskip-\formatrightoffset
- %\hskip\leftskipadaption
- \formatleftfirst
- \unhbox\shapebox
- \ifnum\formatlinemaxcounter>\plusone
- \ifx\formatright\empty\else
- \shapedhbox to \zeropoint{\formatright\hss}%
- \fi
- \fi
- \formatrightfirst
- \iftraceformatblock
- \ruledhskip\formatrightoffset\hskip-\formatrightoffset
- \fi
- \else
- %\hskip\leftskipadaption
- \iftraceformatblock
- \ruledhskip\formatleftoffset\hskip-\formatleftoffset
- \fi
- \formatleftnext
- \ifx\formatleft\empty\else
- \shapedhbox to \zeropoint{\hss\formatleft}%
- \fi
- \unhbox\shapebox
- \formatrightnext
- \fi}
- \flushshapebox
- \else
- \dontleavehmode\hbox
- {\doplaceformatsegmentcounter
- \doplaceformatlinecounter
- %\hskip\leftskipadaption
- \formatleftfirst
- \unhbox\nextbox
- \formatrightfirst}
- \fi
- \par
- \egroup}
-
-\def\dostartformatlinecde
- {%\dosetleftskipadaption\formatmargin
- %\advance\hsize -\leftskipadaption\relax
- \dimen0=\hsize
- \ifconditional\formatforcedbreak\else
- \ifdim\formatminwidth>\zeropoint\relax
- \ifdim\nextboxwd>\hsize
- \doloop
- {\global\dimen1=\dimen0
- \beginofshapebox
- \hsize\dimen0
- \forgetall
- \formatraggedness
- \unhcopy\nextbox\par
- \endofshapebox
- \reshapebox
- {\setbox\scratchbox=\hbox{\unhbox\shapebox}%
- \ifdim\wd\scratchbox<\dimen1
- \global\dimen1=\wd\scratchbox
- \fi}
- \ifdim\dimen1<\formatminwidth\relax
- \advance\dimen0 by -.25em
- \else
- \exitloop
- \fi
- \ifdim\dimen0<10em
- \dimen0=\hsize
- \exitloop
- \fi}
- \fi
- \fi
- \fi
- \beginofshapebox
- \hsize\dimen0
- \forgetall
- \formatraggedness
- \unhcopy\nextbox\par
- \endofshapebox
- %\advance\hsize \leftskipadaption
- \doglobal\newcounter\formatlinesubcounter
- \reshapebox
- {\doglobal\increment\formatlinesubcounter}%
- \global\let\formatlinemaxcounter\formatlinesubcounter
- \reshapebox
- {\doglobal\decrement\formatlinesubcounter
- \ifnum\formatlinesubcounter=\zerocount
- \doplaceformatsegmentcounter
- \doplaceformatlinecounter
- \fi
- %\hskip\leftskipadaption
- \formatleftnext
- \unhbox\shapebox
- \formatrightnext\strut}% strut prevents unskip
- \flushshapebox
- \par
- \egroup}
-
-\defineformatblock[poem]
- [\c!before=\blank,
- \c!inbetween={\blank[\v!medium]},
- \c!after=\blank]
-
-\defineformatsegment[verse]
- [\c!alternative=\v!left,
- \c!width=\hsize,
- %\c!margin=\!!zeropoint,
- \c!before={\blank[\v!medium]},
- \c!after={\blank[\v!medium]},
- \c!inbetween={\blank[\v!medium]},
- \c!leftoffset=3em,
- \c!rightoffset=2em,
- \c!minwidth=5em,
- \c!left={$[$\enspace},
- \c!right={\enspace$]$}]
-
-\defineformatline[line]
- []
-
-\protect \doifnotmode{demo} {\endinput}
-
-% evt defineblank[formatbefore,formatinbetween,formatafter]
-
-%\showframe \traceformatblocktrue
-
-\usemodule[visual]
-
-\setuplayout[height=middle,topspace=1cm,header=0pt,footer=0pt]
-\setupbodyfont[10pt]
-
-% All interfaces supported, but testing with english; todo:
-% more options, more alternatives, inheritance and mixed
-% definitions, and so.
-
-\starttext
-
-\startbuffer
-\startbuffer[poem]
-\startpoem{A Random Poem}{Hans Hagen}
- \startverse
- \startline \fakewords{4}{8} \stopline
- \startline \fakewords{4}{8} \stopline
- \startline \fakewords{4}{8} \stopline
- \startline \fakewords{4}{8} \stopline
- \stopverse
- \startverse
- \startline \fakewords{4}{8} \stopline
- \startline \fakewords{4}{8} \stopline
- \startline \fakewords{4}{8} \stopline
- \startline \fakewords{4}{8} \stopline
- \stopverse
-\stoppoem
-\stopbuffer
-
-\setupformatsegment[verse][width=.4\hsize,number=yes,numberstyle=slanted]
-\setupformatline [line] [number=yes,numberstyle=smallslanted]
-
-\startbuffer[x]
-\setupformatsegment[verse][leftoffset=0pt,rightoffset=0pt,left=,right=]
-\stopbuffer
-
-\section{Alternative A}
-
-\setupformatsegment[verse][alternative=a] {\getbuffer[poem]}
-\setupformatsegment[verse][alternative=a] {\getbuffer[x,poem]}
-
-\section{Alternative B}
-
-\setupformatsegment[verse][alternative=b] {\getbuffer[poem]}
-\setupformatsegment[verse][alternative=b] {\getbuffer[x,poem]}
-
-\section{Alternative C}
-
-\setupformatsegment[verse][alternative=c] {\getbuffer[poem]}
-
-\section{Alternative D}
-
-\setupformatsegment[verse][alternative=d] {\getbuffer[poem]}
-
-\section{Alternative E}
-
-\setupformatsegment[verse][alternative=e] {\getbuffer[poem]}
-\stopbuffer
-
-\typebuffer \getbuffer
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-graph.mkii b/Master/texmf-dist/tex/context/base/m-graph.mkii
deleted file mode 100644
index 8e28cf53724..00000000000
--- a/Master/texmf-dist/tex/context/base/m-graph.mkii
+++ /dev/null
@@ -1,231 +0,0 @@
-%D \module
-%D [ file=m-graph,
-%D version=2000.08.06,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=\METAPOST\ graph module support,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 I finally finished graph support, if only because I could
-%D not stand the idea that Karel Wesseling would revert to
-%D \PiCTeX.
-
-% pre 2000.08.06 version
-%
-% \forceMPTEXgraphictrue
-%
-% \startMPinitializations
-% initialize_numbers ; % make sure that pseudo typesetting is set up
-% input graph ; % load the graph package
-% Autoform := "@g" ; % change the % template char into @
-% \stopMPinitializations
-
-%D The latest version does things more automatically (and
-%D efficiently when no text processing is needed). For
-%D definitions embedded in your document, you need to
-%D use \type {@} as template character, in external files,
-%D \type {%} is also supported.
-
-\startMPinclusions
- input graph ;
-\stopMPinclusions
-
-%D Graphics that have \type {begingraph} in them are
-%D recognized as such and force handling of embedded \TEX\
-%D code.
-
-\forceMPTEXcheck{begingraph}
-
-%D If you run into troubles, try:
-%D
-%D \starttyping
-%D \forceMPTEXgraphictrue
-%D \stoptyping
-%D
-%D A demo can be run with:
-%D
-%D \starttyping
-%D texexec --mode=demo --pdf m-graph
-%D \stoptyping
-
-\startMPinclusions
- % @# is X_ or Y_; $ is Gxcvlin_ or Gycvlin_; l and h are numeric or string
- % It would not be OK to set (@#low,@#high) to a pair expression because $ might
- % try to rescale @#low when evaluating the right-hand side for @#high.
- vardef Gsetr_@\#(suffix $)(expr l, h) =
- Gclbnds_@\# ;
- if @\#ctyp>0 :
- @\#low = if abs @\#ctyp<>log: $ fi Mlog_Str l ;
- @\#high = if abs @\#ctyp<>log: $ fi Mlog_Str h ;
- else :
- -@\#high = if abs @\#ctyp<>log: $ fi Mlog_Str l ;
- -@\#low = if abs @\#ctyp<>log: $ fi Mlog_Str h ;
- fi
- enddef ;
-\stopMPinclusions
-
-\doifnotmode {demo} {\endinput}
-
-%D You need to have the data files in your path,
-%D otherwise the run is aborted.
-
-\doiffileelse {agepop91.d} {} {\writestatus{graph}{no data files found}\wait\end}
-
-%D The test:
-
-\starttext
-
-\startMPpage
-draw begingraph(3in,2in);
- gdraw "agepop91.d";
- endgraph;
-\stopMPpage
-
-\startMPpage
-draw begingraph(3in,2in);
- gdraw "agepop91.d" plot btex$\bullet$etex;
- endgraph;
-\stopMPpage
-
-\startMPpage
-draw begingraph(3in,2in);
- glabel.lft(btex \vbox{\hbox{Population} \hbox{in millions}} etex, OUT);
- glabel.bot(btex Age in years etex, OUT);
- gdraw "agepopm.d";
- endgraph;
-\stopMPpage
-
-\startMPpage
-draw begingraph(3in,2in);
- glabel.lft(btex \vbox{\hbox{Population} \hbox{in millions}} etex, OUT);
- glabel.bot(btex Age in years etex, OUT);
- setrange(origin, whatever,whatever);
- gdraw "agepopm.d";
- endgraph;
-\stopMPpage
-
-\startMPpage
-draw begingraph(2.3in,2in);
- setcoords(log,log);
- glabel.lft(btex Seconds etex,OUT);
- glabel.bot(btex Matrix size etex,
- OUT);
- gdraw "matmul.d" dashed evenly;
- glabel.ulft(btex Standard etex,8);
- gdraw "matmul.d";
- glabel.lrt(btex Strassen etex,7);
- endgraph;
-\stopMPpage
-
-\startMPpage
-draw begingraph(6.5cm,4.5cm);
- setrange(80,0, 90,whatever);
- glabel.bot(btex Year etex, OUT);
- glabel.lft(btex \vbox{\hbox{Emissions in} \hbox{thousands of}
- \hbox{metric tons} \hbox{(heavy line)}}etex, OUT);
- gdraw "lead.d" withpen pencircle scaled 1.5pt;
- autogrid(,otick.lft);
- setcoords(linear,linear);
- setrange(80,0, 90,whatever);
- glabel.rt(btex \vbox{\hbox{Micrograms} \hbox{per cubic}
- \hbox{meter of air} \hbox{(thin line)}}etex, OUT);
- gdraw "lead.d";
- autogrid(otick.bot,otick.rt);
- endgraph;
-\stopMPpage
-
-\stoptext
-
-% 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 \starttyping
-% %D \startMPcode
-% %D draw begingraph(130mm,35mm);
-% %D setrange(0,0,10,22000);
-% %D glabel.lft(btex {correct 0--22000} etex rotated 90, OUT);
-% %D autogrid(itick.bot,grid.lft) withcolor .75white ;
-% %D endgraph;
-% %D \stopMPcode
-% %D
-% %D \startMPcode
-% %D draw begingraph(130mm,35mm);
-% %D setrange(0,50,10,22000);
-% %D glabel.lft(btex {wrong 50--22000} etex rotated 90, OUT);
-% %D autogrid(itick.bot,grid.lft) withcolor .75white ;
-% %D endgraph;
-% %D \stopMPcode
-% %D
-% %D \startMPcode
-% %D draw begingraph(130mm,35mm);
-% %D setrange(0,110,10,30000);
-% %D glabel.lft(btex {failed 110--22000} etex rotated 90, OUT);
-% %D autogrid(itick.bot,grid.lft) withcolor .75white ;
-% %D endgraph;
-% %D \stopMPcode
-% %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 \starttyping
-% %D setrange(0,0,"22000","22000")
-% %D \stoptyping
-% %D
-% %D Folowing this suggesion, I provide the following
-% %D extension:
-
-% def begingraph(expr w, h) =
-% begingroup
-% save X_, Y_, Gfin_, Gcur_, Gcbb_, Gneedgr_, Gneedfr_, Gdidsc_;
-% save Gdpic_, Gppic_, Ggl_, Garw_;
-% picture Gfin_, Gcur_, Gcbb_, Gdpic_, Gppic_, Ggl_[];
-% boolean Gneedgr_, Gneedfr_, Gdidsc_;
-% Gfin_ = nullpicture;
-% Gcur_ = nullpicture;
-% Gcbb_ = nullpicture;
-% X_.ctyp = Y_.ctyp = linear;
-% Z_.gdim = (w,h);
-% X_.sc = Y_.sc = 0;
-% Gneedgr_ = true;
-% Gneedfr_ = true;
-% Gdidsc_ = false;
-% Gdpic_ = nullpicture;
-% Garw_ = 0;
-% scantokens everybegingraph ;
-% enddef;
-%
-% boolean fixsetrange ; fixsetrange := true ;
-%
-% vardef dosetrange(text t) =
-% interim warningcheck:=0;
-% save r_; r_=0;
-% string r_[]s;
-% for x_=
-% for p_=t: if pair p_: xpart p_, ypart fi p_, endfor:
-% r_[incr r_] if string x_: s fi = x_;
-% if r_>2:
-% Gsetr_ if r_=3: X_(Gxcvlin_) else: Y_(Gycvlin_) fi(
-% r_[r_-2] if unknown r_[r_-2]: s fi, x_);
-% fi
-% exitif r_=4;
-% endfor
-% enddef;
-%
-% vardef setrange(text t) =
-% if fixsetrange : dosetrange(0,0,20000,20000) ; fi ;
-% dosetrange(t) ;
-% enddef ;
-%
-% if unknown everybegingraph :
-% string everybegingraph ;
-% % everybegingraph := "setrange(0,0,20000,20000)" ;
-% fi ;
diff --git a/Master/texmf-dist/tex/context/base/m-graph.mkiv b/Master/texmf-dist/tex/context/base/m-graph.mkiv
deleted file mode 100644
index 62c4ec4cb87..00000000000
--- a/Master/texmf-dist/tex/context/base/m-graph.mkiv
+++ /dev/null
@@ -1,133 +0,0 @@
-%D \module
-%D [ file=m-graph,
-%D version=2008.09.08,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=\METAPOST\ graph module support,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% We just assume lua specification instead of the graph ones that
-% are limited by what mp can do. We support @ as replacement for
-% the percent symbol. We also add a specifier when no one is given.
-
-\unprotect
-
-\defineMPinstance
- [graph]
- [\s!format=metafun,
- \s!extensions=\v!yes,
- \s!initializations=\v!yes,
- \c!method=\s!double]
-
-\startMPdefinitions{graph}
- if unknown context_grap : input mp-grap.mpiv ; fi ;
-\stopMPdefinitions
-
-\protect
-
-\continueifinputfile{m-graph.mkiv}
-
-%D We put this test here as in \type {meta-tex.mkiv} it would abort due to redefinition
-%D of namespaces.
-
-\starttext
-
-\startMPpage[instance=graph]
- label.rt(format("@g","1e-8"), (0, 0)) ;
- label.rt(format("@g","1e+8"), (2cm, 0)) ;
- label.rt(format("@g","1e-10"), (0, -0.5cm)) ;
- label.rt(format("@g","1e+10"), (2cm,-0.5cm)) ;
- label.rt(format("@g","1e-12"), (0, -1.0cm)) ;
- label.rt(format("@g","1e+12"), (2cm,-1.0cm)) ;
- label.rt(format("@g","1e-0"), (0, -1.5cm)) ;
- label.rt(format("@g","1e+0"), (2cm,-1.5cm)) ;
- label.rt(format("@g","1"), (0, -2.0cm)) ;
- label.rt(format("@g","1"), (2cm,-2.0cm)) ;
- label.rt(format("@g","1e-102"),(0, -2.5cm)) ;
- label.rt(format("@g","1e+102"),(2cm,-2.5cm)) ;
- currentpicture := currentpicture shifted (-4cm,0) ;
- %
- label.rt(format("@j","1e-8"), (0, 0)) ;
- label.rt(format("@j","1e+8"), (2cm, 0)) ;
- label.rt(format("@j","1e-10"), (0, -0.5cm)) ;
- label.rt(format("@j","1e+10"), (2cm,-0.5cm)) ;
- label.rt(format("@j","1e-12"), (0, -1.0cm)) ;
- label.rt(format("@j","1e+12"), (2cm,-1.0cm)) ;
- label.rt(format("@j","1e-0"), (0, -1.5cm)) ;
- label.rt(format("@j","1e+0"), (2cm,-1.5cm)) ;
- label.rt(format("@j","1"), (0, -2.0cm)) ;
- label.rt(format("@j","1"), (2cm,-2.0cm)) ;
- label.rt(format("@j","1e-102"),(0, -2.5cm)) ;
- label.rt(format("@j","1e+102"),(2cm,-2.5cm)) ;
- label.rt(formatted("(@f,@f)",(1.23,4.56)),(0cm,-3.0cm)) ;
- label.rt(formatted("(@i,@i)",(1.23,4.56)),(0cm,-3.5cm)) ;
- label.rt(formatted("(@g,@g)",(1.23,4.56)),(0cm,-4.0cm)) ;
- label.rt(formatted("(@e,@e)",(1.23,4.56)),(0cm,-4.5cm)) ;
- label.rt(formatted("(@j,@j)",(1.23,4.56)),(0cm,-5.0cm)) ;
-\stopMPpage
-
-\stoptext
-
-% \startMPpage[instance=graph]
-% draw begingraph(3in,2in);
-% gdraw "t:/metapost/grphdata/agepop91.d";
-% endgraph;
-% \stopMPpage
-
-% \startMPpage[instance=graph]
-% draw begingraph(3in,2in);
-% gdraw "agepop91.d" plot btex $\bullet$ etex;
-% endgraph;
-% \stopMPpage
-
-% \startMPpage[instance=graph]
-% draw begingraph(3in,2in);
-% glabel.lft(btex \vbox{\hbox{Population} \hbox{in millions}} etex, OUT);
-% glabel.bot(btex Age in years etex, OUT);
-% gdraw "agepopm.d";
-% endgraph;
-% \stopMPpage
-
-% \startMPpage[instance=graph]
-% draw begingraph(3in,2in);
-% glabel.lft(btex \vbox{\hbox{Population} \hbox{in millions}} etex, OUT);
-% glabel.bot(btex Age in years etex, OUT);
-% setrange(origin, whatever,whatever);
-% gdraw "agepopm.d";
-% endgraph;
-% \stopMPpage
-
-% \startMPpage[instance=graph]
-% draw begingraph(2.3in,2in);
-% setcoords(log,log);
-% glabel.lft(btex Seconds etex,OUT);
-% glabel.bot(btex Matrix size etex,
-% OUT);
-% gdraw "matmul.d" dashed evenly;
-% glabel.ulft(btex Standard etex,8);
-% gdraw "matmul.d";
-% glabel.lrt(btex Strassen etex,7);
-% endgraph;
-% \stopMPpage
-
-% \startMPpage[instance=graph]
-% draw begingraph(6.5cm,4.5cm);
-% setrange(80,0, 90,whatever);
-% glabel.bot(btex Year etex, OUT);
-% glabel.lft(btex \vbox{\hbox{Emissions in} \hbox{thousands of}
-% \hbox{metric tons} \hbox{(heavy line)}}etex, OUT);
-% gdraw "lead.d" withpen pencircle scaled 1.5pt;
-% autogrid(,otick.lft);
-% setcoords(linear,linear);
-% setrange(80,0, 90,whatever);
-% glabel.rt(btex \vbox{\hbox{Micrograms} \hbox{per cubic}
-% \hbox{meter of air} \hbox{(thin line)}}etex, OUT);
-% gdraw "lead.d";
-% autogrid(otick.bot,otick.rt);
-% endgraph;
-% \stopMPpage
diff --git a/Master/texmf-dist/tex/context/base/m-hemistich.mkiv b/Master/texmf-dist/tex/context/base/m-hemistich.mkiv
deleted file mode 100644
index 7a849d415be..00000000000
--- a/Master/texmf-dist/tex/context/base/m-hemistich.mkiv
+++ /dev/null
@@ -1,120 +0,0 @@
-%D \module
-%D [ file=m-hemistich,
-%D version=2013.08.26,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=Hemistiches,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D This is an experimental module for Idris. More is possible but not now.
-
-\unprotect
-
-\installcorenamespace{hemistich}
-
-\installcommandhandler \??hemistich {hemistich} \??hemistich
-
-\setuphemistich
- [\c!width=\v!local,
- \c!distance=4\emwidth,
- \c!separator=\vl\hskip.25em\vl]
-
-\unexpanded\def\hemistiches
- {\dosingleempty\dohemistiches}
-
-\unexpanded\def\dohemistiches
- {\dodohemistiches\empty}
-
-\unexpanded\def\dodohemistiches#1[#2]#3#4%
- {\dontleavehmode
- \begingroup
- \doifelseassignment{#2}
- {\edef\currenthemistich{#1}%
- \setupcurrenthemistich[#2]}
- {\def\currenthemistich{#2}}%
- \doifelse{\hemistichparameter\c!width}\v!local
- {\scratchwidth\availablehsize}
- {\scratchwidth\hemistichparameter\c!width\relax}%
- \spaceskip\zeropoint\s!plus\plusone\s!fill\relax
- \dostarttagged\t!division\currenthemistich
- \hbox to \scratchwidth\bgroup
- \scratchwidth.5\dimexpr\scratchwidth-\hemistichparameter\c!distance\relax
- \hbox to \scratchwidth\bgroup
- \dostarttagged\t!construct\c!lefttext
- \usehemistichstyleandcolor\c!leftstyle\c!leftcolor#3%
- \dostoptagged
- \egroup
- \hss
- \begingroup
- \dostarttagged\t!construct\c!separator
- \usehemistichstyleandcolor\c!separatorstyle\c!separatorcolor
- \hemistichparameter\c!separator
- \dostoptagged
- \endgroup
- \hss
- \hbox to \scratchwidth\bgroup
- \dostarttagged\t!construct\c!righttext
- \usehemistichstyleandcolor\c!rightstyle\c!rightcolor#4%
- \dostoptagged
- \egroup
- \egroup
- \dostoptagged
- \endgroup}
-
-\unexpanded\def\hemistichescaesura#1#2#3%
- {\dodohemistiches\empty[\c!separator={#2}]{#1}{#3}}
-
-\appendtoks
- \setvalue{\currenthemistich}{\dohemistiches{\currenthemistich}}%
-\to \everydefinehemistich
-
-\protect
-
-\continueifinputfile{m-hemistich.mkiv}
-
-\setuphemistich
- [leftcolor=darkred,
- separatorcolor=darkgreen,
- rightcolor=darkblue]
-
-\setupwhitespace
- [big]
-
-\starttext
-
-% \righttoleft
-
-\hemistichescaesura{left side of the brain}{equals}{right side of the brain}
-
-\hemistiches{left side of the brain}{right side of the brain}
-
-\startitemize
- \startitem
- \hemistiches{left side of the brain}{right side of the brain}
- \startitemize
- \startitem
- \hemistiches{left side of the brain}{right side of the brain}
- \startitemize
- \startitem
- \hemistiches{left side of the brain}{right side of the brain}
- \stopitem
- \stopitemize
- \stopitem
- \stopitemize
- \startitem
- \hemistiches{left side of the brain}{right side of the brain}
- \stopitem
- \stopitem
-\stopitemize
-
-\startitemize
-\item \hemistiches{left side of the brain}{right side of the brain}
-\stopitemize
-
-\stoptext
-
diff --git a/Master/texmf-dist/tex/context/base/m-ipsum.mkiv b/Master/texmf-dist/tex/context/base/m-ipsum.mkiv
deleted file mode 100644
index 1c5901d8696..00000000000
--- a/Master/texmf-dist/tex/context/base/m-ipsum.mkiv
+++ /dev/null
@@ -1,198 +0,0 @@
-%D \module
-%D [ file=m-ipsum,
-%D version=2012.07.19,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=Ipsum,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 After some discussing on the mailing list I made this example of
-%D an implementation. Of course there can be alternatives as it's a
-%D nice exercise in module writing.
-
-\startluacode
-
-local patterns = lpeg.patterns
-
-local variables = interfaces.variables
-local v_random = variables.random
-
-local lowercase = characters.lower
-
-local ipsum = { }
-moduledata.ipsum = ipsum
-
-local data = { }
-
-local function getfiledata(settings)
- local filename = settings.filename or ""
- local filedata = data[filename]
- if not filedata then
- local text = resolvers.loadtexfile(filename) or ""
- local paragraphs = lpeg.match(patterns.paragraphs,text) or { }
- local sentences = lpeg.match(patterns.sentences, text) or { }
- local words = lpeg.match(patterns.words, text) or { }
- for i=1,#words do
- words[i] = lowercase(words[i])
- end
- filedata = {
- -- [variables.paragraphs] = paragraphs,
- [variables.paragraph] = paragraphs,
- [variables.lines] = sentences,
- [variables.line] = sentences,
- [variables.words] = words,
- [variables.word] = words,
- }
- -- inspect(filedata)
- data[filename] = filedata
- end
- local d = filedata[settings.alternative or v_paragraph] or filedata[v_paragraph] or { }
- local nd = #d
- local n = settings.n
- if n ~= v_random then
- n = tonumber(n) or 0
- if n == 0 then
- n = nd
- end
- end
- return d, n, nd
-end
-
-function moduledata.ipsum.typeset(settings)
- local d, n, nd = getfiledata(settings)
- if nd > 0 then
- context(settings.before)
- if n == v_random then
- context(settings.left)
- context(d[math.random(1,nd)])
- context(settings.right)
- else
- for i=1,n do
- context(settings.left)
- context(d[i])
- context(settings.right)
- if i < n then
- context(settings.inbetween)
- end
- end
- end
- context(settings.after)
- end
-end
-
-function moduledata.ipsum.direct(settings)
- local d, n, nd = getfiledata(settings)
- if nd == 0 then
- -- nothing
- elseif n == v_random then
- context(d[math.random(1,nd)])
- else
- for i=1,n do
- context(d[i])
- if i < n then
- context(settings.separator)
- end
- end
- end
-end
-
-\stopluacode
-
-\unprotect
-
-\installnamespace {ipsum}
-
-\installcommandhandler \????ipsum {ipsum} \????ipsum
-
-\setupipsum
- [\c!file=lorem,
- \c!alternative=\v!paragraph,
- %\c!language=,
- %\c!styl=,
- %\c!color=,
- \c!n=0,
- \c!left=,
- \c!right=,
- \c!before=,
- \c!after=,
- \c!separator=,
- \c!inbetween=]
-
-\installactionhandler{ipsum} % grouped
-
-\startsetups[handler:action:ipsum]
- \useipsumstyleandcolor\c!style\c!color
- \uselanguageparameter\ipsumparameter
- \ctxlua{moduledata.ipsum.typeset {
- alternative = "\ipsumparameter\c!alternative",
- filename = "\ipsumparameter\c!file",
- n = "\ipsumparameter\c!n",
- left = "\luaescapestring{\ipsumparameter\c!left}",
- right = "\luaescapestring{\ipsumparameter\c!right}",
- before = "\luaescapestring{\ipsumparameter\c!before}",
- after = "\luaescapestring{\ipsumparameter\c!after}",
- inbetween = "\luaescapestring{\ipsumparameter\c!inbetween}",
- }}
-\stopsetups
-
-\def\directipsum#1% only one argument, expanded
- {\ctxlua{moduledata.ipsum.typeset {
- alternative = "\namedipsumparameter{#1}\c!alternative",
- filename = "\namedipsumparameter{#1}\c!file",
- n = "\namedipsumparameter{#1}\c!n",
- separator = "\luaescapestring{\ipsumparameter\c!separator}",
- }}
-}
-
-\protect
-
-\continueifinputfile{m-ipsum.mkiv}
-
-\setupbodyfont[dejavu,11pt]
-
-\starttext
-
- \ipsum[alternative=paragraph,before=\blank,after=\blank,language=la]
-
- \ipsum[alternative=lines,n=2,right=\par,before=\blank,after=\blank,language=la]
-
- \ipsum[alternative=lines,n=random,before=\blank,after=\blank,language=la]
-
- \ipsum[alternative=lines,before=\startitemize,after=\stopitemize,left=\startitem,right=\stopitem,language=la]
-
- \ipsum[alternative=words,left=(,right=),inbetween=\space,language=la]
-
- \page
-
- \defineipsum
- [ward]
- [file=ward,
- before=\blank,
- after=\blank]
-
- \defineipsum
- [ward:itemize]
- [ward]
- [alternative=lines,
- before={\startitemize[packed]},
- after=\stopitemize,
- left=\startitem,
- right=\stopitem]
-
- \defineipsum
- [ward:title]
- [ward]
- [alternative=lines,
- n=random]
-
- \subject{\directipsum{ward:title}}
-
- \ipsum[ward]
- \ipsum[ward:itemize]
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-json.mkiv b/Master/texmf-dist/tex/context/base/m-json.mkiv
deleted file mode 100644
index 329aa0f316c..00000000000
--- a/Master/texmf-dist/tex/context/base/m-json.mkiv
+++ /dev/null
@@ -1,30 +0,0 @@
-%D \module
-%D [ file=m-json,
-%D version=2012.08.03,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Json,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 is a side effect of looking into json. Currently there are
-%D only a few helpers:
-%D
-%D \starttyping
-%D moduledata.json.tolua (str)
-%D moduledata.json.tostring(val)
-%D \stoptyping
-%D
-%D Nothing spectacular but maybe handy to have around.
-
-\startmodule [json]
-
-% check for: utilities.json
-
-\registerctxluafile{util-jsn}{}
-
-\stopmodule
diff --git a/Master/texmf-dist/tex/context/base/m-layout.tex b/Master/texmf-dist/tex/context/base/m-layout.tex
deleted file mode 100644
index 5ccf0e98731..00000000000
--- a/Master/texmf-dist/tex/context/base/m-layout.tex
+++ /dev/null
@@ -1,102 +0,0 @@
-%D \module
-%D [ file=m-layout,
-%D version=2004.01.16,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Additional Layouts,
-%D author={Hans Hagen \& Ton Otten},
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% layout-preset - thf th tf
-
-%D This is a preliminary module, don't depend on these dimensions yet.
-
-\readsysfile{lang-frq}\donothing\donothing
-\readsysfile{lang-frd}\donothing\donothing
-
-\unprotect
-
-% \def\layouthwratio{\withoutpt\the\dimexpr8\paperheight/\dimexpr(\paperwidth/ 8192)\relax}
-% \def\layouthwratio{\withoutpt\the\dimexpr4\paperheight/\dimexpr(\paperwidth/16384)\relax}
-% \def\layouthwratio{\withoutpt\the\dimexpr2\paperheight/\dimexpr(\paperwidth/32768)\relax}
-
-\def\layouthwratio
- {\withoutpt\the\dimexpr2\paperheight/(\paperwidth/32768)\relax}
-
-\def\layouthfheight
- {\dimexpr\layoutparameter\c!header+\layoutparameter\c!headerdistance+
- \layoutparameter\c!footer+\layoutparameter\c!footerdistance\relax}
-
-\startsetups[preset-1]
-
- \xdef\layoutwidth {\dimexpr\layoutparameter\c!width\relax}
- \gdef\layoutheight{\dimexpr\layouthwratio\dimexpr\layoutwidth\relax+\layouthfheight\relax}
-
-\stopsetups
-
-\definelayout
- [preset-1-1]
- [\c!preset=preset-1,
- \c!backspace=\dimexpr(\paperwidth-\layoutwidth)/2\relax,
- \c!width=\dimexpr2\paperwidth/3\relax,
- \c!cutspace=\dimexpr(\paperwidth-\layoutwidth)/2\relax,
- \c!margin=\dimexpr(\paperwidth-\layoutwidth)/3\relax,
- \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=\dimexpr1\dimexpr\paperheight-(\layoutheight+\layouthfheight)\relax/3\relax,
- \c!bottomspace=\dimexpr2\dimexpr\paperheight-(\layoutheight+\layouthfheight)\relax/3\relax]
-
-\startsetups[preset-2]
-
- \gdef\layouthstep{\dimexpr\paperwidth /\layoutparameter\c!columns\relax}
- \gdef\layoutvstep{\dimexpr\paperheight/\layoutparameter\c!columns\relax}
-
-\stopsetups
-
-\definelayout
- [preset-2-1]
- [\c!preset=preset-2,
- \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\relax,
- \c!bottomspace=\dimexpr(2\layoutvstep)-\layoutparameter\c!header-\layoutparameter\c!headerdistance\relax]
-
-\definelayout
- [preset-2-2]
- [\c!preset=preset-2,
- \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
-% \setuplayout[preset-2-1] test \showframe \page
-% \setuplayout[preset-2-1][columns=10] \setuplayout[preset-2-1] test \showframe \page
-% \setuplayout[preset-2-2] test \showframe \page
-% \setuplayout[preset-2-2][columns=10] \setuplayout[preset-2-2] test \showframe \page
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/m-level.mkii b/Master/texmf-dist/tex/context/base/m-level.mkii
deleted file mode 100644
index d758288d7ef..00000000000
--- a/Master/texmf-dist/tex/context/base/m-level.mkii
+++ /dev/null
@@ -1,94 +0,0 @@
-%D \module
-%D [ file=level,
-%D version=2002.10.20,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=Catching Nesting Errors,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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
-
-\newcount\currentnesting
-
-\def\startnesting#1%
- {\global\advance\currentnesting\plusone
- \setxvalue{level::\number\currentnesting}{#1}}
-
-\def\stopnesting#1%
- {\edef\nestingstring{#1}%
- \relax\ifnum\currentnesting>\zerocount
- \doifelsevalue{level::\number\currentnesting}\nestingstring
- {\global\advance\currentnesting\minusone}
- {\@EA\reportnestingerror\@EA\stoptext}
- \else
- \@EA\reportnestingerror\@EA\stoptext
- \fi}
-
-\def\checknesting
- {\relax\ifnum\currentnesting>\zerocount
- \def\nestingstring{end of document}%
- \@EA\reportnestingerror
- \fi}
-
-\def\reportnestingerror
- {\endgraf
- \global\let\checknesting\relax
- \bgroup \definedfont[Mono at 18pt]\incolortrue
- \setupinterlinespace
- \raggedright
- \bgroup \red
- \ifnum\currentnesting>\plusone
- wrong end level
- \else
- too many end levels
- \fi
- at \nestingstring\space in line \number\inputlineno
- \ifnum\currentnesting>\zerocount, stack:\fi\endgraf
- \egroup
- \dostepwiserecurse\currentnesting\plusone\minusone
- {\space\getvalue{level::\recurselevel}}
- \endgraf
- \egroup
- \writestatus\m!systems{quitting due to level error}\wait
- \batchmode}
-
-\prependtoks
- \checknesting
-\to \everystoptext
-
-\protect \doifnotmode{demo}{\endinput}
-
-\starttext
-
-% \startnesting{eerste}
-% \startnesting{tweede}
-% \startnesting{derde}
-% \startnesting{vierde}
-% test
-% \stopnesting{vierde}
-% \stopnesting{eerste}
-
-% \startnesting{eerste}
-% \startnesting{tweede}
-% test
-% \stopnesting{vierde}
-% \stopnesting{derde}
-% \stopnesting{tweede}
-% \stopnesting{eerste}
-
-\startnesting{eerste}
- \startnesting{tweede}
- \startnesting{derde}
- \startnesting{vierde}
- test
- \stopnesting{vierde}
- \stopnesting{derde}
- \stopnesting{tweede}
-\stopnesting{eerste}
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-logcategories.mkiv b/Master/texmf-dist/tex/context/base/m-logcategories.mkiv
deleted file mode 100644
index 954cd58c483..00000000000
--- a/Master/texmf-dist/tex/context/base/m-logcategories.mkiv
+++ /dev/null
@@ -1,3 +0,0 @@
-\starttext
- \showlogcategories
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-markdown.lua b/Master/texmf-dist/tex/context/base/m-markdown.lua
deleted file mode 100644
index 1f9402f60e3..00000000000
--- a/Master/texmf-dist/tex/context/base/m-markdown.lua
+++ /dev/null
@@ -1,824 +0,0 @@
-if not modules then modules = { } end modules ['m-markdown'] = {
- version = 1.002,
- comment = "companion to m-markdown.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "see below",
- license = "see context related readme files"
-}
-
---[[
-Copyright (C) 2009 John MacFarlane / Khaled Hosny / Hans Hagen
-
-The main parser is derived from the lunamark parser written by John MacFarlane. You
-can download lunamark from:
-
- http://github.com/jgm/lunamark.git
-
-Khaled Hosny provided the context writer for lunamark and that was used as starting
-point for the mapping. The original code can be fetched from the above location.
-
-While playing with the original code I got the feeling that lpeg could perform better.
-The slowdown was due to the fact that the parser's lpeg was reconstructed each time a
-nested parse was needed. After changing that code a bit I could bring down parsing of
-some test code from 2 seconds to less than 0.1 second so I decided to stick to this
-parser instead of writing my own. After all, the peg code looks pretty impressive and
-visiting Johns pandoc pages is worth the effort:
-
- http://johnmacfarlane.net/pandoc/
-
-The code here is mostly meant for processing snippets embedded in a context
-documents and is no replacement for pandoc at all. Therefore an alternative is to use
-pandoc in combination with Aditya's filter module.
-
-As I changed (and optimized) the original code, it will be clear that all errors
-are mine. Eventually I might also adapt the parser code a bit more. When I ran into of
-closure stack limitations I decided to flatten the code. The following implementation
-seems to be a couple of hundred times faster than what I started with which is not that
-bad.
-
-This is a second rewrite. The mentioned speed gain largely depended on the kind of
-content: blocks, references and items can be rather demanding. Also, There were
-some limitations with respect to the captures. So, table storage has been removed in
-favor of strings, and nesting has been simplified. The first example at the end of this
-file now takes .33 seconds for 567KB code (resulting in over 1MB) so we're getting there.
-
-There will be a third rewrite eventually.
-]]--
-
--- todo: we have better quote and tag scanners in ctx
--- todo: provide an xhtml mapping
--- todo: add a couple of extensions
--- todo: check patches to the real peg
-
-local type, next, tonumber = type, next, tonumber
-local lower, upper, gsub, rep, gmatch, format, length = string.lower, string.upper, string.gsub, string.rep, string.gmatch, string.format, string.len
-local concat = table.concat
-local P, R, S, V, C, Ct, Cg, Cb, Cmt, Cc, Cf, Cs = lpeg.P, lpeg.R, lpeg.S, lpeg.V, lpeg.C, lpeg.Ct, lpeg.Cg, lpeg.Cb, lpeg.Cmt, lpeg.Cc, lpeg.Cf, lpeg.Cs
-local lpegmatch = lpeg.match
-local utfbyte, utfchar = utf.byte, utf.char
-
-moduledata = moduledata or { }
-moduledata.markdown = moduledata.markdown or { }
-local markdown = moduledata.markdown
-
-local nofruns, nofbytes, nofhtmlblobs = 0, 0, 0
-
----------------------------------------------------------------------------------------------
-
-local nestedparser
-local syntax
-
-nestedparser = function(str) return lpegmatch(syntax,str) end
-
----------------------------------------------------------------------------------------------
-
-local asterisk = P("*")
-local dash = P("-")
-local plus = P("+")
-local underscore = P("_")
-local period = P(".")
-local hash = P("#")
-local ampersand = P("&")
-local backtick = P("`")
-local less = P("<")
-local more = P(">")
-local space = P(" ")
-local squote = P("'")
-local dquote = P('"')
-local lparent = P("(")
-local rparent = P(")")
-local lbracket = P("[")
-local rbracket = P("]")
-local slash = P("/")
-local equal = P("=")
-local colon = P(":")
-local semicolon = P(";")
-local exclamation = P("!")
-
-local digit = R("09")
-local hexdigit = R("09","af","AF")
-local alphanumeric = R("AZ","az","09")
-
-local doubleasterisks = P("**")
-local doubleunderscores = P("__")
-local fourspaces = P(" ")
-
-local any = P(1)
-local always = P("")
-
-local tab = P("\t")
-local spacechar = S("\t ")
-local spacing = S(" \n\r\t")
-local newline = P("\r")^-1 * P("\n")
-local spaceornewline = spacechar + newline
-local nonspacechar = any - spaceornewline
-local optionalspace = spacechar^0
-local spaces = spacechar^1
-local eof = - any
-local nonindentspace = space^-3
-local blankline = optionalspace * C(newline)
-local blanklines = blankline^0
-local skipblanklines = (optionalspace * newline)^0
-local linechar = P(1 - newline)
-local indent = fourspaces + (nonindentspace * tab) / ""
-local indentedline = indent /"" * C(linechar^1 * (newline + eof))
-local optionallyindentedline = indent^-1 /"" * C(linechar^1 * (newline + eof))
-local spnl = optionalspace * (newline * optionalspace)^-1
-local specialchar = S("*_`*&[]<!\\")
-local normalchar = any - (specialchar + spaceornewline)
-local line = C((any - newline)^0 * newline)
- + C(any^1 * eof)
-local nonemptyline = (any - newline)^1 * newline
-
----------------------------------------------------------------------------------------------
-
-local function lineof(c)
- return (nonindentspace * (P(c) * optionalspace)^3 * newline * blankline^1)
-end
-
-local lineof_asterisks = lineof(asterisk)
-local lineof_dashes = lineof(dash)
-local lineof_underscores = lineof(underscore)
-
-local bullet = nonindentspace * (plus + (asterisk - lineof_asterisks) + (dash - lineof_dashes)) * spaces
-local enumerator = nonindentspace * digit^1 * period * spaces
-
----------------------------------------------------------------------------------------------
-
-local openticks = Cg(backtick^1, "ticks")
-local closeticks = space^-1 * Cmt(C(backtick^1) * Cb("ticks"), function(s,i,a,b) return #a == #b and i end)
-local intickschar = (any - S(" \n\r`"))
- + (newline * -blankline)
- + (space - closeticks)
- + (backtick^1 - closeticks)
-local inticks = openticks * space^-1 * C(intickschar^1) * closeticks
-
----------------------------------------------------------------------------------------------
-
-local leader = space^-3
-local nestedbrackets = P { lbracket * ((1 - lbracket - rbracket) + V(1))^0 * rbracket }
-local tag = lbracket * C((nestedbrackets + 1 - rbracket)^0) * rbracket
-local url = less * C((1-more)^0) * more
- + C((1-spacing- rparent)^1) -- sneaky: ) for resolver
-local title_s = squote * lpeg.C((1-squote )^0) * squote
-local title_d = dquote * lpeg.C((1-dquote )^0) * dquote
-local title_p = lparent * lpeg.C((1-rparent)^0) * rparent
-local title = title_s + title_d + title_p
-local optionaltitle = ((spacing^0 * title * spacechar^0) + lpeg.Cc(""))
-
-local references = { }
-
-local function register_link(tag,url,title)
- tag = lower(gsub(tag, "[ \n\r\t]+", " "))
- references[tag] = { url, title }
-end
-
-local function direct_link(label,url,title) -- title is typical html thing
- return label, url, title
-end
-
-local function indirect_link(label,tag)
- if tag == "" then
- tag = label
- end
- tag = lower(gsub(tag, "[ \n\r\t]+", " "))
- local r = references[tag]
- if r then
- return label, r[1], r[2]
- else
- return label, tag, ""
- end
-end
-
-local define_reference_parser = (leader * tag * colon * spacechar^0 * url * optionaltitle) / register_link
-local direct_link_parser = tag * spacechar^0 * lparent * (url + Cc("")) * optionaltitle * rparent / direct_link
-local indirect_link_parser = tag * spacechar^0 * tag / indirect_link
-
-local rparser = (define_reference_parser+1)^0
-
-local function referenceparser(str)
- references = { }
- lpegmatch(rparser,str)
-end
-
--- local reftest = [[
--- [1]: <http://example.com/>
--- [3]:http://example.com/ (Optional Title Here)
--- [2]: http://example.com/ 'Optional Title Here'
--- [a]: http://example.com/ "Optional *oeps* Title Here"
--- ]]
---
--- local linktest = [[
--- [This link] (http://example.net/)
--- [an example] (http://example.com/ "Title")
--- [an example][1]
--- [an example] [2]
--- ]]
---
--- lpeg.match((define_reference_parser+1)^0,reftest)
---
--- inspect(references)
---
--- lpeg.match((direct_link_parser/print + indirect_link_parser/print + 1)^0,linktest)
-
----------------------------------------------------------------------------------------------
-
-local blocktags = table.tohash {
- "address", "blockquote" , "center", "dir", "div", "p", "pre",
- "li", "ol", "ul", "dl", "dd",
- "form", "fieldset", "isindex", "menu", "noframes", "frameset",
- "h1", "h2", "h3", "h4", "h5", "h6",
- "hr", "ht", "script", "noscript",
- "table", "tbody", "tfoot", "thead", "th", "td", "tr",
-}
-
------ htmlattributevalue = squote * C((any - (blankline + squote))^0) * squote
------ + dquote * C((any - (blankline + dquote))^0) * dquote
------ + (any - S("\t >"))^1 -- any - tab - space - more
------ htmlattribute = (alphanumeric + S("_-"))^1 * spnl * (equal * spnl * htmlattributevalue)^-1 * spnl
------ htmlcomment = P("<!--") * (any - P("-->"))^0 * P("-->")
-
------ htmltag = less * spnl * slash^-1 * alphanumeric^1 * spnl * htmlattribute^0 * slash^-1 * spnl * more
------
------ blocktag = Cmt(C(alphanumeric^1), function(s,i,a) return blocktags[lower(a)] and i, a end)
------
------ openblocktag = less * Cg(blocktag, "opentag") * spnl * htmlattribute^0 * more
------ closeblocktag = less * slash * Cmt(C(alphanumeric^1) * Cb("opentag"), function(s,i,a,b) return lower(a) == lower(b) and i end) * spnl * more
------ selfclosingblocktag = less * blocktag * spnl * htmlattribute^0 * slash * more
------
------ displayhtml = Cs { "HtmlBlock",
------ InBlockTags = openblocktag * (V("HtmlBlock") + (any - closeblocktag))^0 * closeblocktag,
------ HtmlBlock = C(V("InBlockTags") + selfclosingblocktag + htmlcomment),
------ }
------
------ inlinehtml = Cs(htmlcomment + htmltag)
-
--- There is no reason to support crappy html, so we expect proper attributes.
-
-local htmlattributevalue = squote * C((any - (blankline + squote))^0) * squote
- + dquote * C((any - (blankline + dquote))^0) * dquote
-local htmlattribute = (alphanumeric + S("_-"))^1 * spnl * equal * spnl * htmlattributevalue * spnl
-
-local htmlcomment = P("<!--") * (any - P("-->"))^0 * P("-->")
-local htmlinstruction = P("<?") * (any - P("?>" ))^0 * P("?>" )
-
--- We don't care too much about matching elements and there is no reason why display elements could not
--- have inline elements so the above should be patched then. Well, markdown mixed with html is not meant
--- for anything else than webpages anyway.
-
-local blocktag = Cmt(C(alphanumeric^1), function(s,i,a) return blocktags[lower(a)] and i, a end)
-
-local openelement = less * alphanumeric^1 * spnl * htmlattribute^0 * more
-local closeelement = less * slash * alphanumeric^1 * spnl * more
-local emptyelement = less * alphanumeric^1 * spnl * htmlattribute^0 * slash * more
-
-local displaytext = (any - less)^1
-local inlinetext = displaytext / nestedparser
-
-local displayhtml = #(less * blocktag * spnl * htmlattribute^0 * more)
- * Cs { "HtmlBlock",
- InBlockTags = openelement * (V("HtmlBlock") + displaytext)^0 * closeelement,
- HtmlBlock = (V("InBlockTags") + emptyelement + htmlcomment + htmlinstruction),
- }
-
-local inlinehtml = Cs { "HtmlBlock",
- InBlockTags = openelement * (V("HtmlBlock") + inlinetext)^0 * closeelement,
- HtmlBlock = (V("InBlockTags") + emptyelement + htmlcomment + htmlinstruction),
- }
-
----------------------------------------------------------------------------------------------
-
-local hexentity = ampersand * hash * S("Xx") * C(hexdigit ^1) * semicolon
-local decentity = ampersand * hash * C(digit ^1) * semicolon
-local tagentity = ampersand * C(alphanumeric^1) * semicolon
-
----------------------------------------------------------------------------------------------
-
--- --[[
-
-local escaped = {
- ["{" ] = "",
- ["}" ] = "",
- ["$" ] = "",
- ["&" ] = "",
- ["#" ] = "",
- ["~" ] = "",
- ["|" ] = "",
- ["%%"] = "",
- ["\\"] = "",
-}
-
-for k, v in next, escaped do
- escaped[k] = "\\char" .. utfbyte(k) .. "{}"
-end
-
-local function c_string(s) -- has to be done more often
- return (gsub(s,".",escaped))
-end
-
-local c_linebreak = "\\crlf\n" -- is this ok?
-local c_space = " "
-
-local function c_paragraph(c)
- return c .. "\n\n" -- { "\\startparagraph ", c, " \\stopparagraph\n" }
-end
-
-local function listitem(c)
- return format("\n\\startitem\n%s\n\\stopitem\n",nestedparser(c))
-end
-
-local function c_tightbulletlist(c)
- return format("\n\\startmarkdownitemize[packed]\n%s\\stopmarkdownitemize\n",c)
-end
-
-local function c_loosebulletlist(c)
- return format("\n\\startmarkdownitemize\n\\stopmarkdownitemize\n",c)
-end
-
-local function c_tightorderedlist(c)
- return format("\n\\startmarkdownitemize[n,packed]\n%s\\stopmarkdownitemize\n",c)
-end
-
-local function c_looseorderedlist(c)
- return format("\n\\startmarkdownitemize[n]\n%s\\stopmarkdownitemize\n",c)
-end
-
-local function c_inline_html(content)
- nofhtmlblobs = nofhtmlblobs + 1
- return format("\\markdowninlinehtml{%s}",content)
-end
-
-local function c_display_html(content)
- nofhtmlblobs = nofhtmlblobs + 1
- return format("\\startmarkdowndisplayhtml\n%s\n\\stopmarkdowndisplayhtml",content)
-end
-
-local function c_emphasis(c)
- return format("\\markdownemphasis{%s}",c)
-end
-
-local function c_strong(c)
- return format("\\markdownstrong{%s}",c)
-end
-
-local function c_blockquote(c)
- return format("\\startmarkdownblockquote\n%s\\stopmarkdownblockquote\n",nestedparser(c))
-end
-
-local function c_verbatim(c)
- return format("\\startmarkdowntyping\n%s\\stopmarkdowntyping\n",c)
-end
-
-local function c_code(c)
- return format("\\markdowntype{%s}",c)
-end
-
-local levels = { "", "", "", "", "", "" }
-
-local function c_start_document()
- levels = { "", "", "", "", "", "" }
- return ""
-end
-
-local function c_stop_document()
- return concat(levels,"\n") or ""
-end
-
-local function c_heading(level,c)
- if level > #levels then
- level = #levels
- end
- local finish = concat(levels,"\n",level) or ""
- for i=level+1,#levels do
- levels[i] = ""
- end
- levels[level] = "\\stopstructurelevel"
- return format("%s\\startstructurelevel[markdown][title={%s}]\n",finish,c)
-end
-
-local function c_hrule()
- return "\\markdownrule\n"
-end
-
-local function c_link(lab,src,tit)
- return format("\\goto{%s}[url(%s)]",nestedparser(lab),src)
-end
-
-local function c_image(lab,src,tit)
- return format("\\externalfigure[%s]",src)
-end
-
-local function c_email_link(address)
- return format("\\goto{%s}[url(mailto:%s)]",c_string(address),address)
-end
-
-local function c_url_link(url)
- return format("\\goto{%s}[url(%s)]",c_string(url),url)
-end
-
-local function f_heading(c,n)
- return c_heading(n,c)
-end
-
-local function c_hex_entity(s)
- return utfchar(tonumber(s,16))
-end
-
-local function c_dec_entity(s)
- return utfchar(tonumber(s))
-end
-
-local function c_tag_entity(s)
- return s -- we can use the default resolver
-end
-
---]]
-
----------------------------------------------------------------------------------------------
-
---[[
-
-local escaped = {
- ["<"] = "&lt;",
- [">"] = "&gt;",
- ["&"] = "&amp;",
- ['"'] = "&quot;",
-}
-
-local function c_string(s) -- has to be done more often
- return (gsub(s,".",escaped))
-end
-
-local c_linebreak = "<br/>"
-local c_space = " "
-
-local function c_paragraph(c)
- return format("<p>%s</p>\n", c)
-end
-
-local function listitem(c)
- return format("<li>%s</li>",nestedparser(c))
-end
-
-local function c_tightbulletlist(c)
- return format("<ul>\n%s\n</ul>\n",c)
-end
-
-local function c_loosebulletlist(c)
- return format("<ul>\n%s\n</ul>\n",c)
-end
-
-local function c_tightorderedlist(c)
- return format("<ol>\n%s\n</ol>\n",c)
-end
-
-local function c_looseorderedlist(c)
- return format("<ol>\n%s\n</ol>\n",c)
-end
-
-local function c_inline_html(content)
- nofhtmlblobs = nofhtmlblobs + 1
- return content
-end
-
-local function c_display_html(content)
- nofhtmlblobs = nofhtmlblobs + 1
- return format("\n%s\n",content)
-end
-
-local function c_emphasis(c)
- return format("<em>%s</em>",c)
-end
-
-local function c_strong(c)
- return format("<strong>%s</strong>",c)
-end
-
-local function c_blockquote(c)
- return format("<blockquote>\n%s\n</blockquote>",nestedparser(c))
-end
-
-local function c_verbatim(c)
- return format("<pre><code>%s</code></pre>",c)
-end
-
-local function c_code(c)
- return format("<code>%s</code>",c)
-end
-
-local c_start_document = ""
-local c_stop_document = ""
-
-local function c_heading(level,c)
- return format("<h%d>%s</h%d>\n",level,c,level)
-end
-
-local function c_hrule()
- return "<hr/>\n"
-end
-
-local function c_link(lab,src,tit)
- local titattr = #tit > 0 and format(" title=%q",tit) or ""
- return format("<a href=%q%s>%s</a>",src,titattr,nestedparser(lab))
-end
-
-local function c_image(lab,src,tit)
- return format("<img href=%q title=%q>%s</a>",src,tit,nestedparser(lab))
-end
-
-local function c_email_link(address)
- return format("<a href=%q>%s</a>","mailto:",address,c_escape(address))
-end
-
-local function c_url_link(url)
- return format("<a href=%q>%s</a>",url,c_string(url))
-end
-
-local function f_heading(c,n)
- return c_heading(n,c)
-end
-
-local function c_hex_entity(s)
- return utfchar(tonumber(s,16))
-end
-
-local function c_dec_entity(s)
- return utfchar(tonumber(s))
-end
-
-local function c_tag_entity(s)
- return format("&%s;",s)
-end
-
---]]
-
----------------------------------------------------------------------------------------------
-
-local Str = normalchar^1 / c_string
-local Space = spacechar^1 / c_space
-local Symbol = specialchar / c_string
-local Code = inticks / c_code
-
-local HeadingStart = C(hash * hash^-5) / length
-local HeadingStop = optionalspace * hash^0 * optionalspace * newline * blanklines
-local HeadingLevel = equal^3 * Cc(1)
- + dash ^3 * Cc(2)
-
-local NormalEndline = optionalspace * newline * -(
- blankline
- + more
- + HeadingStart
- + ( line * (P("===")^3 + P("---")^3) * newline )
- ) / c_space
-
-local LineBreak = P(" ") * NormalEndline / c_linebreak
-
-local TerminalEndline = optionalspace * newline * eof / ""
-
-local Endline = LineBreak
- + TerminalEndline
- + NormalEndline
-
-local AutoLinkUrl = less * C(alphanumeric^1 * P("://") * (any - (newline + more))^1) * more / c_url_link
-local AutoLinkEmail = less * C((alphanumeric + S("-_+"))^1 * P("@") * (any - (newline + more))^1) * more / c_email_link
-
-local DirectLink = direct_link_parser / c_link
-local IndirectLink = indirect_link_parser / c_link
-
-local ImageLink = exclamation * (direct_link_parser + indirect_link_parser) / c_image -- we can combine this with image ... smaller lpeg
-
-local UlOrStarLine = asterisk^4
- + underscore^4
- + (spaces * S("*_")^1 * #spaces) / c_string
-
-local EscapedChar = P("\\") * C(P(1 - newline)) / c_string
-
-local InlineHtml = inlinehtml / c_inline_html
-local DisplayHtml = displayhtml / c_display_html
-local HtmlEntity = hexentity / c_hex_entity
- + decentity / c_dec_entity
- + tagentity / c_tag_entity
-
-local NestedList = Cs(optionallyindentedline - (bullet + enumerator))^1 / nestedparser
-
-local ListBlockLine = -blankline * -(indent^-1 * (bullet + enumerator)) * optionallyindentedline
-
-local Verbatim = Cs(blanklines * (indentedline - blankline)^1) / c_verbatim
- * (blankline^1 + eof) -- not really needed, probably capture trailing? we can do that beforehand
-
-local Blockquote = Cs((
- ((nonindentspace * more * space^-1)/"" * linechar^0 * newline)^1
- * ((linechar - blankline)^1 * newline)^0
- * blankline^0
- )^1) / c_blockquote
-
-local HorizontalRule = (lineof_asterisks + lineof_dashes + lineof_underscores) / c_hrule
-
-local Reference = define_reference_parser / ""
-
--- could be a mini grammar
-
-local ListBlock = line * ListBlockLine^0
-local ListContinuationBlock = blanklines * indent * ListBlock
-local ListItem = Cs(ListBlock * (NestedList + ListContinuationBlock^0)) / listitem
-
----- LeadingLines = blankline^0 / ""
----- TrailingLines = blankline^1 * #(any) / "\n"
-
-syntax = Cs { "Document",
-
- Document = V("Display")^0,
-
- Display = blankline -- ^1/"\n"
- + Blockquote
- + Verbatim
- + Reference
- + HorizontalRule
- + HeadingStart * optionalspace * Cs((V("Inline") - HeadingStop)^1) * HeadingStop / c_heading
- + Cs((V("Inline") - Endline)^1) * newline * HeadingLevel * newline * blanklines / f_heading
- + Cs((bullet /"" * ListItem)^1) * blanklines * -bullet / c_tightbulletlist
- + Cs((bullet /"" * ListItem * C(blanklines))^1) / c_loosebulletlist
- + Cs((enumerator /"" * ListItem)^1) * blanklines * -enumerator / c_tightorderedlist
- + Cs((enumerator /"" * ListItem * C(blanklines))^1) / c_looseorderedlist
- + DisplayHtml
- + nonindentspace * Cs(V("Inline")^1)* newline * blankline^1 / c_paragraph
- + V("Inline")^1,
-
- Inline = Str
- + Space
- + Endline
- + UlOrStarLine -- still needed ?
- + doubleasterisks * -spaceornewline * Cs((V("Inline") - doubleasterisks )^1) * doubleasterisks / c_strong
- + doubleunderscores * -spaceornewline * Cs((V("Inline") - doubleunderscores)^1) * doubleunderscores / c_strong
- + asterisk * -spaceornewline * Cs((V("Inline") - asterisk )^1) * asterisk / c_emphasis
- + underscore * -spaceornewline * Cs((V("Inline") - underscore )^1) * underscore / c_emphasis
- + ImageLink
- + DirectLink
- + IndirectLink
- + AutoLinkUrl
- + AutoLinkEmail
- + Code
- + InlineHtml
- + HtmlEntity
- + EscapedChar
- + Symbol,
-
-}
-
----------------------------------------------------------------------------------------------
-
-local function convert(str)
- nofruns = nofruns + 1
- nofbytes = nofbytes + #str
- statistics.starttiming(markdown)
- referenceparser(str)
- local result = c_start_document() .. nestedparser(str) .. c_stop_document()
- statistics.stoptiming(markdown)
- return result
-end
-
-markdown.convert = convert
-
-function markdown.typesetstring(data)
- if data and data ~= "" then
- local result = convert(data)
- context.viafile(result)
- end
-end
-
-function markdown.typesetbuffer(name)
- markdown.typesetstring(buffers.getcontent(name))
-end
-
-function markdown.typesetfile(name)
- local fullname = resolvers.findctxfile(name)
- if fullname and fullname ~= "" then
- markdown.typesetstring(io.loaddata(fullname))
- end
-end
-
-statistics.register("markdown",function()
- if nofruns > 0 then
- return format("%s bytes converted, %s runs, %s html blobs, %s seconds used",
- nofbytes, nofruns, nofhtmlblobs, statistics.elapsedtime(markdown))
- end
-end)
-
----------------------------------------------------------------------------------------------
-
---~ context.starttext()
---~ moduledata.markdown.convert(str)
---~ context.stoptext()
-
-if not tex.jobname then
-
- local one = [[
-Test *123*
-==========
-
-<b>BOLD *BOLD* BOLD</b>
-
-<pre>PRE <b>PRE</b> PRE</pre>
-
-
-* Test
-** Test
-* Test1
- * Test2
-* Test
-
-Test
-====
-
-> test
-> test **123** *123*
-> test `code`
-
-test
-
-Test
-====
-
-> test
-> test
-> test
-
-test
-oeps
-
-more
-
- code
- code
-
-oeps
-
-[an example][a]
-
-[an example] [2]
-
-[a]: http://example.com/ "Optional *oeps* Title Here"
-[2]: http://example.com/ 'Optional Title Here'
-[3]: http://example.com/ (Optional Title Here)
-
-[an example][a]
-
-[an example] [2]
-
-[an [tricky] example](http://example.com/ "Title")
-
-[This **xx** link](http://example.net/)
- ]]
-
--- This snippet takes some 4 seconds in the original parser (the one that is
--- a bit clearer from the perspective of grammars but somewhat messy with
--- respect to the captures. In the above parser it takes .1 second. Also,
--- in the later case only memory is the limit.
-
- local two = [[
-Test
-====
-* Test
-** Test
-* Test
-** Test
-* Test
-
-Test
-====
-
-> test
-> test
-> test
-
-test
-
-Test
-====
-
-> test
-> test
-> test
-
-test
- ]]
-
- local function test(str)
- local n = 1 -- 000
- local t = os.clock()
- local one = convert(str)
- -- print("runtime",1,#str,#one,os.clock()-t)
- str = string.rep(str,n)
- local t = os.clock()
- local two = convert(str)
- print(two)
- -- print("runtime",n,#str,#two,os.clock()-t)
- -- print(format("==============\n%s\n==============",one))
- end
-
- -- test(one)
- -- test(two)
- -- test(io.read("*all"))
-
-
-end
diff --git a/Master/texmf-dist/tex/context/base/m-markdown.mkiv b/Master/texmf-dist/tex/context/base/m-markdown.mkiv
deleted file mode 100644
index 6e003651309..00000000000
--- a/Master/texmf-dist/tex/context/base/m-markdown.mkiv
+++ /dev/null
@@ -1,88 +0,0 @@
-%D \module
-%D [ file=x-markdown,
-%D version=2011.07.19,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Processing MarkDown,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Modules / MarkDown Renderer}
-
-%D This module deals with markdown which is a document encoding that
-%D some \CONTEXT\ like much. It reminds me of the kind of minimal coding
-%D we used before we ran into \TEX\ and were using a somewhat simple
-%D rendering (pagination, etc) of documents. As I'm no user myself, it
-%D is up to others to provide documentation and examples.
-
-\registerctxluafile{m-markdown}{1.001}
-
-\unprotect
-
-% basic interface
-
-\definebuffer[markdown]
-
-\unexpanded\def\stopmarkdown
- {\ctxlua{moduledata.markdown.typesetbuffer("\thedefinedbuffer{markdown}")}}
-
-\unexpanded\def\processmarkdownfile#1% maybe [] or both
- {\ctxlua{moduledata.markdown.typesetfile("#1")}}
-
-\unexpanded\def\markdown#1% maybe [] or both
- {\ctxlua{moduledata.markdown.typesetstring(\!!bs#1\!!es)}}
-
-% commands
-
-\defineitemgroup
- [markdownitemize]
-
-\definetyping
- [markdowntyping]
-
-\definetype
- [markdowntype]
-
-\definetype
- [markdowninlinehtml]
-
-\definetyping
- [markdowndisplayhtml]
-
-\definedelimitedtext
- [markdownblockquote]
- [quotation]
-
-\definehighlight
- [markdownemphasis]
- [style=\em]
-
-\definehighlight
- [markdownstrong]
- [style=\bf]
-
-\definestructurelevels
- [markdown]
- [\v!chapter,
- \v!section,
- \v!subsection,
- \v!subsubsection,
- \v!subsubsubsection,
- \v!subsubsubsubsection]
-
-\unexpanded\def\markdownrule
- {\hairline\par}
-
-\protect
-
-\continueifinputfile{m-markdown.mkiv}
-
-\starttext
- \startmarkdown
- % some examples needed
- \stopmarkdown
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-mathcrap.mkiv b/Master/texmf-dist/tex/context/base/m-mathcrap.mkiv
deleted file mode 100644
index 25efd2d5de3..00000000000
--- a/Master/texmf-dist/tex/context/base/m-mathcrap.mkiv
+++ /dev/null
@@ -1,76 +0,0 @@
-%D \module
-%D [ file=m-mathcrap,
-%D version=2010.05.30,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Math Crap,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D This is meant for those who want to use the (incomplete and sort of useless)
-%D unicode superscripts and subscripts. We should look ahead and collapse them
-%D but I will only implement that in calcmath when the need is there. Now the
-%D spacing can be somewhat non optimal but probably that does not matter here.
-%D
-%D \startbuffer
-%D $aâ‚€â‚₂₃₄₅₆₇₈₉₋₌₊$
-%D \stopbuffer
-%D
-%D \typebuffer \blank \getbuffer \blank
-
-\unprotect
-
-\unexpanded\def\mathunicodesupercrap#1{\mathortext{{\normalsuperscript{#1}}}{\high{#1}}}
-\unexpanded\def\mathunicodesubcrap #1{\mathortext{{\normalsubscript {#1}}}{\low {#1}}}
-
-\ifdefined\installanddefineactivecharacter\else
-
- \def\installanddefineactivecharacter #1 #2% we need this as command
- {\normalexpanded{\noexpand\installactivecharacter \utfchar{#1} }%
- \defineactivecharacter #1 {#2}}
-
-\fi
-
-\installanddefineactivecharacter "2070 {\mathunicodesupercrap 0}
-\installanddefineactivecharacter "00B9 {\mathunicodesupercrap 1}
-\installanddefineactivecharacter "00B2 {\mathunicodesupercrap 2}
-\installanddefineactivecharacter "00B3 {\mathunicodesupercrap 3}
-\installanddefineactivecharacter "2074 {\mathunicodesupercrap 4}
-\installanddefineactivecharacter "2075 {\mathunicodesupercrap 5}
-\installanddefineactivecharacter "2076 {\mathunicodesupercrap 6}
-\installanddefineactivecharacter "2077 {\mathunicodesupercrap 7}
-\installanddefineactivecharacter "2078 {\mathunicodesupercrap 8}
-\installanddefineactivecharacter "2079 {\mathunicodesupercrap 9}
-\installanddefineactivecharacter "207A {\mathunicodesupercrap +}
-\installanddefineactivecharacter "207B {\mathunicodesupercrap -}
-\installanddefineactivecharacter "207C {\mathunicodesupercrap =}
-\installanddefineactivecharacter "207D {\mathunicodesupercrap (}
-\installanddefineactivecharacter "207E {\mathunicodesupercrap )}
-\installanddefineactivecharacter "207F {\mathunicodesupercrap n}
-
-\installanddefineactivecharacter "2080 {\mathunicodesubcrap 0}
-\installanddefineactivecharacter "2081 {\mathunicodesubcrap 1}
-\installanddefineactivecharacter "2082 {\mathunicodesubcrap 2}
-\installanddefineactivecharacter "2083 {\mathunicodesubcrap 3}
-\installanddefineactivecharacter "2084 {\mathunicodesubcrap 4}
-\installanddefineactivecharacter "2085 {\mathunicodesubcrap 5}
-\installanddefineactivecharacter "2086 {\mathunicodesubcrap 6}
-\installanddefineactivecharacter "2087 {\mathunicodesubcrap 7}
-\installanddefineactivecharacter "2088 {\mathunicodesubcrap 8}
-\installanddefineactivecharacter "2089 {\mathunicodesubcrap 9}
-\installanddefineactivecharacter "208A {\mathunicodesubcrap +}
-\installanddefineactivecharacter "208B {\mathunicodesubcrap -}
-\installanddefineactivecharacter "208C {\mathunicodesubcrap =}
-\installanddefineactivecharacter "208D {\mathunicodesubcrap (}
-\installanddefineactivecharacter "208E {\mathunicodesubcrap )}
-\installanddefineactivecharacter "2090 {\mathunicodesubcrap A}
-\installanddefineactivecharacter "2091 {\mathunicodesubcrap E}
-\installanddefineactivecharacter "2092 {\mathunicodesubcrap O}
-\installanddefineactivecharacter "2093 {\mathunicodesubcrap X}
-%installanddefineactivecharacter "2094 {\mathunicodesubcrap ?} % SCHWAA
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/m-matrix.mkiv b/Master/texmf-dist/tex/context/base/m-matrix.mkiv
deleted file mode 100644
index ccb376e39c7..00000000000
--- a/Master/texmf-dist/tex/context/base/m-matrix.mkiv
+++ /dev/null
@@ -1,495 +0,0 @@
-%D \module
-%D [ file=m-matrix,
-%D version=2014.11.04, % already a year older
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=Matrices,
-%D author={Jeong Dalyoung \& Hans Hagen},
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 code is based on a post by Dalyoung on the context list. After that
-%D we turned it into a module and improved the code a bit. Feel free to ask
-%D us for more. Once we're satisfied, a more general helper l-matrix could
-%D be made. Dalyoung does the clever bits, and Hans only cleanes up and
-%D optimizes a bit.
-
-% \registerctxluafile{l-matrix}{1.001} % not yet
-
-\startmodule[matrix]
-
-\startluacode
-
-local settings_to_hash = utilities.parsers.settings_to_hash
-local formatters = string.formatters
-local copy = table.copy
-local insert = table.insert
-local remove = table.remove
-
-local matrix = { }
-moduledata.matrix = matrix
-
-local f_matrix_slot = formatters["%s_{%s%s}"]
-
-function matrix.symbolic(sym, x, y, nx ,ny) -- symMatrix("a", "m", "n")
- local nx = nx or 2
- local ny = ny or nx
- local function filled(i,y)
- local mrow = { }
- for j=1,nx do
- mrow[#mrow+1] = f_matrix_slot(sym,i,j)
- end
- mrow[#mrow+1] = "\\cdots"
- mrow[#mrow+1] = f_matrix_slot(sym,i,y)
- return mrow
- end
- local function dummy()
- local mrow = { }
- for j=1,nx do
- mrow[#mrow+1] = "\\vdots"
- end
- mrow[#mrow+1] = "\\ddots"
- mrow[#mrow+1] = "\\vdots"
- return mrow
- end
- --
- local mm = { }
- for i=1,ny do
- mm[i] = filled(i,y)
- end
- mm[#mm+1] = dummy()
- mm[#mm+1] = filled(x,y)
- return mm
-end
-
--- todo: define a matrix at the tex end so that we have more control
-
-local fences_p = {
- left = "\\left(\\,",
- right = "\\,\\right)",
-}
-
-local fences_b = {
- left = "\\left[\\,",
- right = "\\,\\right]",
-}
-
-function matrix.typeset(m,options)
- local options = settings_to_hash(options or "")
- context.startmatrix(options.determinant and fences_b or fences_p)
- for i=1, #m do
- local mi = m[i]
- for j=1,#mi do
- context.NC(mi[j])
- end
- context.NR()
- end
- context.stopmatrix()
-end
-
--- interchange two rows (i-th, j-th)
-
-function matrix.swap(t,i,j)
- t[i], t[j] = t[j], t[i]
-end
-
--- replace i-th row with factor * (i-th row)
-
-function matrix.multiply(m,i,factor)
- local mi = m[i]
- for k=1,#mi do
- mi[k] = factor * mi[k]
- end
- return m
-end
-
--- scalar product "factor * m"
-
-function matrix.scalar(m, factor)
- for i=1,#m do
- local mi = m[i]
- for j=1,#mi do
- mi[j] = factor * mi[j]
- end
- end
- return m
-end
-
--- replace i-th row with i-th row + factor * (j-th row)
-
-function matrix.sumrow(m,i,j,factor)
- local mi = m[i]
- local mj = m[j]
- for k=1,#mi do
- mi[k] = mi[k] + factor * mj[k]
- end
-end
-
--- transpose of a matrix
-
-function matrix.transpose(m)
- local t = { }
- for j=1,#m[1] do
- local r = { }
- for i=1,#m do
- r[i] = m[i][j]
- end
- t[j] = r
- end
- return t
-end
-
--- inner product of two vectors
-
-function matrix.inner(u,v)
- local nu = #u
- if nu == 0 then
- return 0
- end
- local nv = #v
- if nv ~= nu then
- return 0
- end
- local result = 0
- for i=1,nu do
- result = result + u[i] * v[i]
- end
- return result
-end
-
--- product of two matrices
-
-function matrix.product(m1,m2)
- local product = { }
- if #m1[1] == #m2 then
- for i=1,#m1 do
- local m1i = m1[i]
- local mrow = { }
- for j=1,#m2[1] do
- local temp = 0
- for k=1,#m1[1] do
- temp = temp + m1i[k] * m2[k][j]
- end
- mrow[j] = temp
- end
- product[i] = mrow
- end
- end
- return product
-end
-
-local function uppertri(m,sign)
- local temp = copy(m)
- for i=1,#temp-1 do
- local pivot = temp[i][i]
- if pivot == 0 then
- local pRow = i +1
- while temp[pRow][i] == 0 do
- pRow = pRow + 1
- if pRow > #temp then -- if there is no nonzero number
- return temp
- end
- end
- temp[i], temp[pRow] = temp[pRow], temp[i]
- if sign then
- sign = -sign
- end
- end
- local mi = temp[i]
- for k=i+1, #temp do
- local factor = -temp[k][i]/mi[i]
- local mk = temp[k]
- for l=i,#mk do
- mk[l] = mk[l] + factor * mi[l]
- end
- end
- end
- if sign then
- return temp, sign
- else
- return temp
- end
-end
-
-matrix.uppertri = uppertri
-
-function matrix.determinant(m)
- if #m == #m[1] then
- local d = 1
- local t, s = uppertri(m,1)
- for i=1,#t do
- d = d * t[i][i]
- end
- return s*d
- else
- return 0
- end
-end
-
-local function rowechelon(m,r)
- local temp = copy(m)
- local pRow = 1
- local pCol = 1
- while pRow <= #temp do
- local pivot = temp[pRow][pCol]
- if pivot == 0 then
- local i = pRow
- local n = #temp
- while temp[i][pCol] == 0 do
- i = i + 1
- if i > n then
- -- no nonzero number in a column
- pCol = pCol + 1
- if pCol > #temp[pRow] then
- -- there is no nonzero number in a row
- return temp
- end
- i = pRow
- end
- end
- temp[pRow], temp[i] = temp[i], temp[pRow]
- end
- local row = temp[pRow]
- pivot = row[pCol]
- for l=pCol,#row do
- row[l] = row[l]/pivot
- end
-
- if r == 1 then
- -- make the "reduced row echelon form"
- local row = temp[pRow]
- for k=1,pRow-1 do
- local current = temp[k]
- local factor = -current[pCol]
- local mk = current
- for l=pCol,#mk do
- mk[l] = mk[l] + factor * row[l]
- end
- end
- end
- -- just make the row echelon form
- local row = temp[pRow]
- for k=pRow+1, #temp do
- local current = temp[k]
- local factor = -current[pCol]
- local mk = current
- for l=pCol,#mk do
- mk[l] = mk[l] + factor * row[l]
- end
- end
- pRow = pRow + 1
- pCol = pCol + 1
-
- if pRow > #temp or pCol > #temp[1] then
- pRow = #temp + 1
- end
- end
- return temp
-end
-
-matrix.rowechelon = rowechelon
-matrix.rowEchelon = rowechelon
-
--- solve the linear equation m X = c
-
-local function solve(m,c)
- local n = #m
- if n ~= #c then
- return copy(m)
- end
- local newm = copy(m)
- local temp = copy(c)
- for i=1,n do
- insert(newm[i],temp[i])
- end
- return rowechelon(newm,1)
-end
-
-matrix.solve = solve
-
--- find the inverse matrix of m
-
-local function inverse(m)
- local n = #m
- local temp = copy(m)
- if n ~= #m[1] then
- return temp
- end
- for i=1,n do
- for j=1,n do
- insert(temp[i],j == i and 1 or 0)
- end
- end
- temp = rowechelon(temp,1)
- for i=1,n do
- for j=1,n do
- remove(temp[i], 1)
- end
- end
- return temp
-end
-
-matrix.inverse = inverse
-
-\stopluacode
-
-\stopmodule
-
-\unexpanded\def\ctxmodulematrix#1{\ctxlua{moduledata.matrix.#1}}
-
-\continueifinputfile{m-matrix.mkiv}
-
-\starttext
-
-\startluacode
-document.DemoMatrixA = {
- { 0, 2, 4, -4, 1 },
- { 0, 0, 2, 3, 4 },
- { 2, 2, -6, 2, 4 },
- { 2, 0, -6, 9, 7 },
- { 2, 3, 4, 5, 6 },
- { 6, 6, -6, 6, 6 },
-}
-
-document.DemoMatrixB = {
- { 0, 2, 4, -4, 1 },
- { 0, 0, 2, 3, 4 },
- { 2, 2, -6, 2, 4 },
- { 2, 0, -6, 9, 7 },
- { 2, 2, -6, 2, 4 },
- { 2, 2, -6, 2, 4 },
-}
-\stopluacode
-
-\startsubject[title={A symbolic matrix}]
-
-\ctxmodulematrix{typeset(moduledata.matrix.symbolic("a", "m", "n"))}
-\ctxmodulematrix{typeset(moduledata.matrix.symbolic("a", "m", "n", 4, 8))}
-
-\stopsubject
-
-\startsubject[title={Swap two rows (2 and 4)}]
-
-\startluacode
-moduledata.matrix.typeset(document.DemoMatrixA)
-context.blank()
-moduledata.matrix.swap(document.DemoMatrixA, 2, 4)
-context.blank()
-moduledata.matrix.typeset(document.DemoMatrixA)
-\stopluacode
-
-\stopsubject
-
-\startsubject[title={Multiply $3 \times r_2$}]
-
-\startluacode
-moduledata.matrix.typeset(document.DemoMatrixA)
-context.blank()
-moduledata.matrix.typeset(moduledata.matrix.multiply(document.DemoMatrixA, 2, 3))
-\stopluacode
-
-\stopsubject
-
-\startsubject[title={Row 2 + $3 \times r_4$}]
-
-\startluacode
-moduledata.matrix.typeset(document.DemoMatrixA)
-context.blank()
-moduledata.matrix.sumrow(document.DemoMatrixA, 2, 3, 4)
-context.blank()
-moduledata.matrix.typeset(document.DemoMatrixA)
-\stopluacode
-
-\stopsubject
-
-\startsubject[title={Transpose a matrix}]
-
-\startluacode
-moduledata.matrix.typeset(document.DemoMatrixA)
-context.blank()
-moduledata.matrix.typeset(moduledata.matrix.transpose(document.DemoMatrixA))
-\stopluacode
-
-\stopsubject
-
-\startsubject[title={The inner product of two vectors}]
-
-\startluacode
-context(moduledata.matrix.inner({ 1, 2, 3 }, { 3, 1, 2 }))
-context.blank()
-context(moduledata.matrix.inner({ 1, 2, 3 }, { 3, 1, 2, 4 }))
-\stopluacode
-
-\startsubject[title={The product of two matrices}]
-
-\startluacode
-moduledata.matrix.typeset(document.DemoMatrixA)
-context.blank()
-moduledata.matrix.typeset(moduledata.matrix.product(document.DemoMatrixA,document.DemoMatrixA))
-\stopluacode
-
-\stopsubject
-
-\startsubject[title={An Upper Triangular Matrix}]
-
-\ctxmodulematrix{typeset(moduledata.matrix.uppertri(document.DemoMatrixB))}
-
-\startsubject[title={A determinant}]
-
-\startluacode
-local m = {
- { 1, 2, 4 },
- { 0, 0, 2 },
- { 2, 2, -6 },
-}
-context(moduledata.matrix.determinant(m))
-\stopluacode
-
-\stopsubject
-
-\startsubject[title={Row echelon form}]
-
-\startluacode
-local m = {
- { 1, 3, -2, 0, 2, 0, 0 },
- { 2, 6, -5, -2, 4, -3, -1 },
- { 0, 0, 5, 10, 0, 15, 5 },
- { 2, 6, 0, 8, 4, 18, 6 },
-}
-
-moduledata.matrix.typeset(m)
-moduledata.matrix.typeset(moduledata.matrix.rowechelon(m,1))
-\stopluacode
-
-\stopsubject
-
-\startsubject[title={Solving linear equation}]
-
-\startluacode
-local m = {
- { 1, 3, -2, 0 },
- { 2, 0, 1, 2 },
- { 6, -5, -2, 4 },
- { -3, -1, 5, 10 },
-}
-
-local c = { 5, 2, 6, 8 }
-
-moduledata.matrix.typeset(moduledata.matrix.solve(m,c))
-\stopluacode
-
-\stopsubject
-
-\startsubject[title={Inverse matrix}]
-
-\startcombination[2*1]
- {\ctxlua{moduledata.matrix.typeset { { 1, 1, 1 }, { 0, 2, 3 }, { 3, 2, 1 } }}} {}
- {\ctxlua{moduledata.matrix.typeset(moduledata.matrix.inverse { { 1, 1, 1 }, { 0, 2, 3 }, { 3, 2, 1 } })}} {}
-\stopcombination
-
-\stopsubject
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-mkii.mkiv b/Master/texmf-dist/tex/context/base/m-mkii.mkiv
deleted file mode 100644
index dcfd29d2092..00000000000
--- a/Master/texmf-dist/tex/context/base/m-mkii.mkiv
+++ /dev/null
@@ -1,21 +0,0 @@
-% todo
-
-\unprotect
-
-\writestatus\m!system{loading some mkii compatibility hacks}
-
-% Compatibility for font-ini
-
-\let\normalxi=\xi
-
-\definebodyfontswitch [xii] [\!!twelvepoint]
-\definebodyfontswitch [xi] [\!!elevenpoint]
-\definebodyfontswitch [x] [\!!tenpoint]
-\definebodyfontswitch [ix] [\!!ninepoint]
-\definebodyfontswitch [viii] [\!!eightpoint]
-\definebodyfontswitch [vii] [\!!sevenpoint]
-\definebodyfontswitch [vi] [\!!sixpoint]
-
-\unexpanded\def\xi{\ifmmode\normalxi\else\elevenpoint\fi}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/m-mkivhacks.mkiv b/Master/texmf-dist/tex/context/base/m-mkivhacks.mkiv
deleted file mode 100644
index 3ed002e1d50..00000000000
--- a/Master/texmf-dist/tex/context/base/m-mkivhacks.mkiv
+++ /dev/null
@@ -1,50 +0,0 @@
-%D \module
-%D [ file=m-mkivhacks,
-%D version=2008.10.20,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Temporary Compatilibility Hacks,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 For Aditya, who needed it for his thesis.
-
-\startluacode
- -- -- a lot or work
- --
- -- mathematics.slots.euler = {
- -- [0x03B1] = { "mr", 0x0B }, -- alpha
- -- }
- --
- -- mathematics.slots.euler = table.merge(mathematics.slots.traditional,mathematics.slots.euler)
- --
- -- versus a quick hack
-
- document.hacks = document.hacks or { }
-
- function document.hacks()
- mathematics.families.lcgreek = mathematics.families.mr
- mathematics.families.ucgreek = mathematics.families.mr
- mathematics.families.vargreek = mathematics.families.mr
-
- mathematics.define(mathematics.slots.euler)
- end
-\stopluacode
-
-% \usemodule[mkivhacks] \setups{eulermath}
-% \definetypeface[modern][mm][math][euler][default]
-% \usemathcollection[eul]
-% \switchtobodyfont[modern,11pt]
-% \starttext
-% $\alpha$
-% \stoptext
-
-\startsetups eulermath
- \ctxlua{document.hacks()}
-\stopsetups
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/m-narrowtt.tex b/Master/texmf-dist/tex/context/base/m-narrowtt.tex
deleted file mode 100644
index 129bf270b9d..00000000000
--- a/Master/texmf-dist/tex/context/base/m-narrowtt.tex
+++ /dev/null
@@ -1,39 +0,0 @@
-%D \module
-%D [ file=m-narrowtt,
-%D version=2005.09.08,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Narrow Verbatim,
-%D author={Hans Hagen \& Ton Otten},
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Test file
-%D
-%D \starttyping
-%D \startTEX
-%D \usemodule[narrowtt]
-%D \starttext
-%D \starttyping
-%D Test test test.
-%D \stoptyping
-%D test \type {test} test \type{test} test
-%D \starttyping
-%D Test test test.
-%D \stoptyping
-%D \stoptext
-%D \stopTEX
-
-\unprotect
-
-\definetypeface
- [narrowtt] [tt]
- [mono] [modern-condensed] [default] [encoding=\defaultencoding]
-
-\definetyping[n\v!typing] \setuptyping[n\v!typing][style=\narrowtt]
-\definetype [n\v!type] \setuptype [n\v!type] [style=\narrowtt]
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/m-newmat.tex b/Master/texmf-dist/tex/context/base/m-newmat.tex
deleted file mode 100644
index 202fec76ff1..00000000000
--- a/Master/texmf-dist/tex/context/base/m-newmat.tex
+++ /dev/null
@@ -1,80 +0,0 @@
-%D \module
-%D [ file=m-newmat,
-%D version=2000.11.16,
-%D title=\CONTEXT\ Math Module,
-%D subtitle=AMS-like math extensions,
-%D author={Taco Hoekwater \& Hans Hagen},
-%D date=\currentdate,
-%D copyright={Taco Hoekwater \& Hans Hagen}]
-%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.
-
-\unprotect
-
-%D Code has been integrated.
-
-\protect \endinput
-
-%D This module collects macros that \TEX\ users kind of expect
-%D to be available when typesetting math. Most of them
-%D originate in the \AMS\ macro packages. We have taken the
-%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 \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 \type {[]}.
-
-\def\startsubarray
- {\doifnextcharelse\bgroup
- \simplestartsubarray{\dosingleempty\complexstartsubarray}}
-
-\def\complexstartsubarray[#1]%
- {\simplestartsubarray{#1}}
-
-\def\simplestartsubarray#1%
- {\vcenter\bgroup
- \baselineskip\fontdimen10 \scriptfont\plustwo
- \advance\baselineskip\fontdimen12 \scriptfont\plustwo
- \lineskip\plusthree\fontdimen8 \scriptfont\plusthree
- \lineskiplimit\lineskip
- \ialign\bgroup\ifx c#1\hfil\fi$\mathsurround\zeropoint\scriptstyle##$\hfil\crcr}
-
-\def\stopsubarray
- {\crcr\egroup
- \egroup}
-
-\def\startsubstack
- {\doifnextcharelse\bgroup
- \simplestartsubstack{\dosingleempty\complexstartsubstack}}
-
-\def\complexstartsubstack[#1]%
- {\simplestartsubstack{#1}}
-
-\def\simplesubstack#1%
- {\startsubarray[c]#1\stopsubarray}
-
-\def\startsmallmatrix
- {\null
- \,%
- \vcenter\bgroup
- \baselineskip6\ex@
- \lineskip1.5\ex@
- \lineskiplimit\lineskip
- \ialign\bgroup\hfil$\mathsurround\zeropoint\scriptstyle##$\hfil&&\thickspace\hfil
- $\mathsurround\zeropoint\scriptstyle##$\hfil\crcr}
-
-\def\stopsmallmatrix
- {\crcr\egroup
- \egroup
- \,}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/m-nodechart.lua b/Master/texmf-dist/tex/context/base/m-nodechart.lua
deleted file mode 100644
index 612b737672a..00000000000
--- a/Master/texmf-dist/tex/context/base/m-nodechart.lua
+++ /dev/null
@@ -1,175 +0,0 @@
-if not modules then modules = { } end modules ['m-nodechart'] = {
- version = 1.001,
- comment = "companion to m-nodechart.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local format = string.format
-local points = number.nopts
-local ptfactor = number.dimenfactors.pt
-
-local nodecodes = nodes.nodecodes
-local kerncodes = nodes.kerncodes
-local penaltycodes = nodes.penaltycodes
-local gluecodes = nodes.gluecodes
-local whatsitcodes = nodes.whatsitcodes
-
-moduledata.charts = moduledata.charts or { }
-moduledata.charts.nodes = moduledata.charts.nodes or { }
-
-local formatters = { }
-
--- subtype font char lang left right uchyph components xoffset yoffset width height depth
-
-function formatters.glyph(n,comment)
- return format("\\doFLOWglyphnode{%s}{%s}{%s}{%s}{U+%05X}",comment,n.subtype,n.font,n.char,n.char)
-end
-
--- pre post replace
-
-function formatters.disc(n,comment)
- return format("\\doFLOWdiscnode{%s}{%s}",comment,n.subtype)
-end
-
--- subtype kern
-
-function formatters.kern(n,comment)
- -- return format("\\doFLOWkernnode{%s}{%s}{%s}",comment,kerncodes[n.subtype],points(n.kern))
- return format("\\doFLOWkernnode{%s}{%s}{%.4f}",comment,kerncodes[n.subtype],n.kern*ptfactor)
-end
-
--- subtype penalty
-
-function formatters.penalty(n,comment)
- return format("\\doFLOWpenaltynode{%s}{%s}{%s}",comment,"penalty",n.penalty)
-end
-
--- subtype width leader spec (stretch shrink ...
-
-function formatters.glue(n,comment)
- local s = n.spec
- -- return format("\\doFLOWgluenode{%s}{%s}{%s}{%s}{%s}",comment,gluecodes[n.subtype],points(s.width),points(s.stretch),points(s.shrink))
- return format("\\doFLOWgluenode{%s}{%s}{%.4f}{%.4f}{%.4f}",comment,gluecodes[n.subtype],s.width*ptfactor,s.stretch*ptfactor,s.shrink*ptfactor)
-end
-
--- subtype width leader spec (stretch shrink ...
-
-function formatters.whatsit(n,comment)
- local subtype = n.subtype
- local whatsit = whatsitcodes[subtype]
- if whatsit == "dir" or whatsit == "localpar" then
- return format("\\doFLOWdirnode{%s}{%s}{%s}",comment,whatsit,n.dir)
- else
- return nodecodes[n.id]
- end
-end
-
--- I will make a dedicated set of shapes for this.
-
-local shapes = {
- glyph = "procedure",
- disc = "procedure",
- kern = "action",
- penalty = "action",
- glue = "action",
-}
-
-local function flow_nodes_to_chart(specification)
- local head = specification.head
- local box = specification.box
- local comment = specification.comment or ""
- local x = specification.x or 1
- local y = specification.y or 0
- --
- if box then
- box = tex.getbox(tonumber(box))
- head = box and box.list
- end
- --
- local current = head
- --
- while current do
- local nodecode = nodecodes[current.id]
- local formatter = formatters[nodecode]
- local shape = shapes[nodecode]
- y = y + 1
- local next = current.next
- commands.flow_start_cell { shape = { framecolor = "nodechart:" .. nodecode } }
- commands.flow_set_name(tostring(current))
- commands.flow_set_location(x,y)
- if shape then
- commands.flow_set_shape(shape)
- end
- if formatter then
- commands.flow_set_text("node",formatter(current,comment))
- else
- commands.flow_set_text("node",nodecode)
- end
- if next then
- commands.flow_set_connection("bt","",tostring(next))
- end
- if nodecode == "glyph" then
- local components = current.components
- if components then
- commands.flow_set_connection("rl","",tostring(components))
- commands.flow_stop_cell()
- n = flow_nodes_to_chart { head = components, comment = "component",x = x+2, y = y-1 }
- else
- commands.flow_stop_cell()
- end
- elseif nodecode == "disc" then
- local pre = current.pre
- local pos = current.post
- local rep = current.replace
- if pre and not rep and not rep then
- if pre then
- commands.flow_set_connection("rl","",tostring(pre))
- end
- commands.flow_stop_cell()
- if pre then
- n = flow_nodes_to_chart { head = pre, comment = "prebreak", x = x+1, y = y-1 }
- end
- else
- if pre then
- commands.flow_set_connection("+rl","",tostring(pre))
- end
- if rep then
- commands.flow_set_connection("rl","",tostring(rep))
- end
- if pos then
- commands.flow_set_connection("-rl","",tostring(pos))
- end
- commands.flow_stop_cell()
- if pre then
- n = flow_nodes_to_chart{ head = pre, comment = "prebreak", x = x+1, y = y-2 }
- end
- if rep then
- n = flow_nodes_to_chart{ head = rep, comment = "replacement", x = x+1, y = y-1 }
- end
- if pos then
- n = flow_nodes_to_chart{ head = pos, comment = "postbreak", x = x+1, y = y }
- end
- end
- elseif nodecode == "hlist" then
- local list = current.list
- if list then
- commands.flow_set_connection("rl","",tostring(list))
- commands.flow_stop_cell()
- n = flow_nodes_to_chart { head = list, comment = "list", x = x+2, y = y-1 }
- else
- commands.flow_stop_cell()
- end
- else
- commands.flow_stop_cell()
- end
- current = next
- end
-end
-
-function moduledata.charts.nodes.chart(specification)
- commands.flow_start_chart(specification.name)
- flow_nodes_to_chart(specification)
- commands.flow_stop_chart()
-end
diff --git a/Master/texmf-dist/tex/context/base/m-nodechart.mkvi b/Master/texmf-dist/tex/context/base/m-nodechart.mkvi
deleted file mode 100644
index c9d9858506c..00000000000
--- a/Master/texmf-dist/tex/context/base/m-nodechart.mkvi
+++ /dev/null
@@ -1,125 +0,0 @@
-%D \module
-%D [ file=m-nodechart,
-%D version=2011.11.11, % nos sure when it started, needed for fonts-mkiv
-%D title=\CONTEXT\ Modules,
-%D subtitle=Node Visualization,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\registerctxluafile{m-nodechart}{1.001}
-
-\usemodule[chart]
-
-\unprotect
-
-\def\enspaceminus{\hskip.5em minus .25em\relax}
-
-\starttexdefinition unexpanded doFLOWglyphnode #comment #subtype #font #char #unicode
- \dontleavehmode\hbox{\bf\setstrut\strut \doifsomething{#comment}{#comment\enspaceminus:\enspaceminus}glyph #subtype}
- \vss
- \dontleavehmode\hbox{\tx\setstrut\strut font\enspaceminus#font:\enspace#unicode:\enspaceminus\setfontofid{#font}\char#char}
-\stoptexdefinition
-
-\starttexdefinition unexpanded doFLOWdiscnode #comment #subtype
- \dontleavehmode\hbox{\bf\setstrut\strut disc}
- \vss
- \dontleavehmode\hbox{\tx\setstrut\strut}
-\stoptexdefinition
-
-\starttexdefinition unexpanded doFLOWkernnode #comment #subtype #kern
- \dontleavehmode\hbox{\bf\setstrut\strut#subtype}
- \vss
- \dontleavehmode\hbox{\tx\setstrut\strut#kern}
-\stoptexdefinition
-
-\starttexdefinition unexpanded doFLOWpenaltynode #comment #subtype #penalty
- \dontleavehmode\hbox{\bf\setstrut\strut#subtype}
- \vss
- \dontleavehmode\hbox{\tx\setstrut\strut#penalty}
-\stoptexdefinition
-
-\starttexdefinition unexpanded doFLOWgluenode #comment #subtype #width #shrink #stretch
- \dontleavehmode\hbox{\bf\setstrut\strut#subtype}
- \vss
- \dontleavehmode\hbox{\tx\setstrut\strut#width\enspaceminus-\enspaceminus#shrink\enspaceminus+\enspaceminus#stretch}
-\stoptexdefinition
-
-\starttexdefinition unexpanded doFLOWdirnode #comment #subtype #direction
- \dontleavehmode\hbox{\bf\setstrut\strut#subtype}
- \vss
- \dontleavehmode\hbox{\tx\setstrut\strut#direction}
-\stoptexdefinition
-
-\defineframed
- [flowcell:node]
- [flowcell:base]
- [\c!top=\vss,
- \c!bottom=\vss,
- \c!align=\v!middle,
- \c!foregroundstyle=\tt]
-
-% this is a temporary interface ... we will have instances and optional settings
-
-\unexpanded\def\boxtoFLOWchart[#name]#box%
- {\ctxlua{moduledata.charts.nodes.chart {
- name = "#name",
- box = \number#box,
- }}}
-
-\unexpanded\def\nextboxtoFLOWchart[#name]%
- {\dowithnextbox{\boxtoFLOWchart[#name]\nextbox}}
-
-\unexpanded\def\hboxtoFLOWchart[#name]%
- {\nextboxtoFLOWchart[#name]\hbox}
-
-\unexpanded\def\vboxtoFLOWchart[#name]%
- {\nextboxtoFLOWchart[#name]\vbox}
-
-\protect
-
-\continueifinputfile{m-nodechart.mkvi}
-
-\definecolor[nodechart:glyph][darkred]
-
-\setupbodyfont[dejavu,10pt]
-
-\starttext
-
-\startTEXpage[offset=10pt]
-
- \hboxtoFLOWchart[dummy]{an affil\discretionary{-}{-}{!}iation}
-
- \FLOWchart[dummy][width=14em,height=3em,dx=1em,dy=.75em,hcompact=yes]
-
-\stopTEXpage
-
-\startTEXpage[offset=10pt]
-
- \hboxtoFLOWchart[dummy]{an affiliation}
-
- \FLOWchart[dummy][width=14em,height=3em,dx=.5em,dy=.75em,hcompact=yes]
-
-\stopTEXpage
-
-\startTEXpage[offset=10pt]
-
- \hboxtoFLOWchart[dummy]{\nl effe fijn fietsen}
-
- \FLOWchart[dummy][width=14em,height=3em,dx=.5em,dy=.75em,hcompact=yes]
-
-\stopTEXpage
-
-\startTEXpage[offset=10pt]
-
- \hboxtoFLOWchart[dummy]{\righttoleft t\kern 1pt est}
-
- \FLOWchart[dummy][width=14em,height=3em,dx=.5em,dy=.75em,hcompact=yes]
-
-\stopTEXpage
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-ntb-to-xtb.mkiv b/Master/texmf-dist/tex/context/base/m-ntb-to-xtb.mkiv
deleted file mode 100644
index 55b4ab25926..00000000000
--- a/Master/texmf-dist/tex/context/base/m-ntb-to-xtb.mkiv
+++ /dev/null
@@ -1,5 +0,0 @@
-\loadmkvifile{tabl-xnt}
-
-\mapTABLEtoxtable
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/m-obsolete.mkii b/Master/texmf-dist/tex/context/base/m-obsolete.mkii
deleted file mode 100644
index a97002cf64c..00000000000
--- a/Master/texmf-dist/tex/context/base/m-obsolete.mkii
+++ /dev/null
@@ -1,5 +0,0 @@
-\unprotect
-
-\writestatus\m!systems{skipping obsolete module}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/m-obsolete.mkiv b/Master/texmf-dist/tex/context/base/m-obsolete.mkiv
deleted file mode 100644
index 2d4518181e6..00000000000
--- a/Master/texmf-dist/tex/context/base/m-obsolete.mkiv
+++ /dev/null
@@ -1,5 +0,0 @@
-\unprotect
-
-\writestatus\m!system{skipping obsolete module}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/m-oldfun.mkiv b/Master/texmf-dist/tex/context/base/m-oldfun.mkiv
deleted file mode 100644
index 3f2ec0263ed..00000000000
--- a/Master/texmf-dist/tex/context/base/m-oldfun.mkiv
+++ /dev/null
@@ -1,714 +0,0 @@
-%D \module
-%D [ file=m-oldfun, % was: supp-fun
-%D version=1995.10.10,
-%D title=\CONTEXT\ Support Macros,
-%D subtitle=Fun Stuff,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Beware, these macros wil be replaced and at some point this
-%D module will not be preloaded any more.
-
-%D This module implements some typographics tricks that can
-%D be fun when designing document layouts. The examples use
-%D macros that are typical to \CONTEXT, but non \CONTEXT\
-%D users can use the drop caps and first line treatment
-%D macros without problems. This module will be extended
-%D when the need for more of such tricks arises.
-
-\writestatus{loading}{ConTeXt Support Macros / Fun Stuff}
-
-%D \macros
-%D {DroppedCaps, DroppedString, DroppedIndent, DroppedLines}
-%D
-%D \startbuffer
-%D \DroppedCaps
-%D {\color[green]} {SerifBold}
-%D {\the\dimexpr2.2\baselineskip} {2pt} {\the\baselineskip} {2}
-%D Let's start
-%D \stopbuffer
-%D
-%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
-%D unfriendly implementation.
-%D
-%D \typebuffer
-%D
-%D As we will see, there are 7 different settings involved. The
-%D first argument takes a command that is used to do whatever
-%D fancy things we want to do, but normally this one will be
-%D empty. The second argument takes the font. Because we're
-%D dealing with something very typographic, there is no real
-%D reason to adopt complicated font switching schemes, a mere
-%D name will do. Font encodings can bring no harm, because the
-%D alphanumeric characters are nearly always located at their
-%D natural position in the encoding vector.
-%D
-%D \startbuffer
-%D \DroppedCaps
-%D {\color[red]} {SerifBold}
-%D {\the\baselineskip} {0pt} {0pt} {1}
-%D This simple
-%D \stopbuffer
-%D
-%D \getbuffer case shows us what happens when we apply minimal
-%D values. Here we used:
-%D
-%D \typebuffer
-%D
-%D \startbuffer
-%D \DroppedCaps
-%D {\color[red]} {SerifBold}
-%D {\the\dimexpr2\baselineskip} {0pt} {\the\baselineskip} {2}
-%D Is this ugly
-%D \stopbuffer
-%D
-%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
-%D determines the hanging indentation. In this paragraph we
-%D set the height to two times the baselinedistance and use
-%D two hanging lines:
-%D
-%D \typebuffer
-%D
-%D Here, the first character is moved down one baseline. Here
-%D we also see why the horizontal offset is important. The
-%D first example (showing the~L) sets this to a few points and
-%D also used a slightly larger height.
-%D
-%D Of course common users (typist) are not supposed to see this
-%D kind of fuzzy definitions, but fortunately \TEX\ permits us
-%D to hide them in macros. Using a macro also enables us to
-%D garantee consistency throughout the document:
-%D
-%D \startbuffer
-%D \def\MyDroppedCaps%
-%D {\DroppedCaps
-%D {\color[green]} {SerifBold}
-%D {\the\dimexpr5\baselineskip} {3pt} {\the\dimexpr3\baselineskip} {4}}
-%D
-%D \MyDroppedCaps The implementation
-%D \stopbuffer
-%D
-%D \typebuffer
-%D
-%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
-%D combined some arguments, like the height, vertical offset
-%D and the number of lines, but the current implementation
-%D proved to be the most flexible. One should be aware of the
-%D fact that the offsets depend on the design of the glyphs
-%D used.
-
-\let\DroppedIndent\!!zeropoint \def\DroppedLines{0}
-
-\def\DroppedString{ABCDEFGHIJKLMNOPQRSTUVWXYZ}
-
-\let\globaldropcaps\global % will be an option, but on by default
-
-\unexpanded\def\localdropcaps{\let\globaldropcaps\relax}
-
-\chardef\DroppedStatus = 0 % 0=done 1=starting 2=doing 3=error
-\chardef\DropMode = 0 % 1 == marginhang
-
-\ifx\keeplinestogether\undefined
- \let\keeplinestogether\gobbleoneargument
-\fi
-
-\unexpanded\def\DroppedCaps#1#2#3#4#5#6#7% does not yet handle accented chars
- {\defconvertedargument\asciia{#7}%
- \defconvertedcommand \asciib{\DroppedString}%
- \doifelseinstring\asciia\asciib
- {\noindentation
- \dontleavehmode
- \checkindentation % redo this one
- %\ifhmode\hskip-\parindent\fi % sensitive for context mechanism
- \keeplinestogether{#6}%
- \setbox0\hbox{\definedfont[#2 at #3]#1{#7}\hskip#4}%
- \ifdim\dp0>\strutdp % one of those Q's , will be option
- \setbox2\hbox{\raise\dp0\hbox{\lower\strutdp\copy0}}%
- \ht2\ht0
- \dp0\strutdp
- \setbox0\box2
- \fi
- \setbox0\hbox
- {\ifnum\DropMode=\plusone
- \hskip-\wd0\wd0\zeropoint
- \fi
- \lower#5\box0}%
- \ht0\strutht
- \dp0\strutdp
- \ifnum\DropMode=\plusone
- \globaldropcaps\let\DroppedIndent\!!zeropoint
- \globaldropcaps\edef\DroppedLines{\number\maxdimen}%
- \globaldropcaps\chardef\DroppedStatus\plusthree
- \else
- \globaldropcaps\edef\DroppedIndent{\the\wd0}%
- \globaldropcaps\edef\DroppedLines {\number#6}%
- \globaldropcaps\chardef\DroppedStatus\plustwo
- \globaldropcaps\hangindent\DroppedIndent
- \globaldropcaps\hangafter-\DroppedLines
-% \noindent
- \noindentation
- \checkindentation % redo this one
- \hskip-\DroppedIndent
- \fi
- \vbox{\forgetall\box0}%
- \nobreak
- \let\next\ignorespaces} % Could be a one character word !
- {\globaldropcaps\let\DroppedIndent\!!zeropoint
- \globaldropcaps\edef\DroppedLines{\number\maxdimen}%
- \globaldropcaps\chardef\DroppedStatus\plusthree
- \def\next{#7}}%
- \let\globaldropcaps\global
- \next}
-
-%D Before we go to the next topic, we summarize this command:
-%D
-%D \starttyping
-%D \DroppedCaps
-%D {command} {font}
-%D {height} {hoffset} {voffset} {lines}
-%D \stoptyping
-%D
-%D Sometimes you need to make sure that the global settings are
-%D kept local, as in:
-%D
-% %D \startbuffer
-% %D \defineparagraphs[SomePar][n=2,rule=on]
-% %D \setupparagraphs [SomePar][1][width=.5\textwidth]
-% %D \setupparagraphs [SomePar][2][width=.5\textwidth]
-%D \startbuffer
-%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
-%D to explicitly keep the hanging indentation local, like it or
-%D not.
-%D \SomePar
-%D \localdropcaps\NiceDroppedCaps{}{cmr12}{0pt}{2}Here we need
-%D to explicitly keep the hanging indentation local, like it or
-%D not.
-%D \stopSomePar
-%D \stopbuffer
-%D
-%D \typebuffer \getbuffer
-
-%D \macros
-%D {AutoDroppedCaps, CheckDroppedCaps}
-%D
-%D {\em To be documented.}
-
-% example usage
-%
-% \def\bpar{\ifvmode\CheckDroppedCaps\fi}
-% \def\epar{\ifhmode\par\fi\CheckDroppedCaps}
-
-\newcount\lastprevgraf
-\newcount\droppedlines
-
-\unexpanded\def\CheckDroppedCaps
- {\global\lastprevgraf\prevgraf}
-
-\unexpanded\def\AutoDroppedCaps % will be proper core stuff since it
- {\globaldropcaps\chardef\DroppedStatus\plusone
- \global\lastprevgraf\zerocount
- \global\droppedlines\zerocount
- \EveryPar{\doAutoDroppedCaps}}
-
-\let\AutoDroppedNext\relax
-
-\ifx\AutoDroppedCapsCommand\undefined
- \unexpanded\def\AutoDroppedCapsCommand{\NiceDroppedCaps{}{SerifBold}{.125em}{3}}
-\fi
-
-\unexpanded\def\doAutoDroppedCaps
- {\ifcase\DroppedStatus % done
- \let\next\relax
- \or % starting
- % \ifnum\lastprevgraf>0 % tricky, probably a wrong par
- % \globaldropcaps\chardef\DroppedStatus=3 % and inhibits dropped
- % \let\next\relax % caps after titles and more than once
- % \else % so let's nill this rubishly code fragment
- \let\next\AutoDroppedCapsCommand
- % \fi % and hope for the best
- \or % doing
- \global\advance\droppedlines \lastprevgraf
- \ifnum\droppedlines=\zerocount
- \globaldropcaps\chardef\DroppedStatus\zerocount
- \let\next\relax
- \else\ifnum\droppedlines>\zerocount
- \ifnum\droppedlines<\DroppedLines\relax
- \globaldropcaps\hangindent\DroppedIndent
- \globaldropcaps\hangafter-\DroppedLines
- \globaldropcaps\advance\hangafter \droppedlines
- \hskip-\parindent % brrr
- \let\next\AutoDroppedNext
- \else
- \globaldropcaps\chardef\DroppedStatus\zerocount
- \let\next\relax
- \fi
- \else
- \globaldropcaps\chardef\DroppedStatus\zerocount
- \let\next\relax
- \fi\fi
- \or % error
- \globaldropcaps\chardef\DroppedStatus\zerocount
- \let\next\relax
- \fi
- \next}
-
-%D \macros
-%D {LineDroppedCaps, NiceDroppedCaps}
-%D
-%D To save definitions, we also provide:
-%D
-%D \starttyping
-%D \LineDroppedCaps {command} {font} {hoffset} {lines}
-%D \NiceDroppedCaps {command} {font} {hoffset} {lines}
-%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
-%D line height, a value that gives a pleasant grayness.
-
-\unexpanded\def\DoLineDroppedCaps#1#2#3#4#5% compensation command font offset lines
- {\scratchcounter#5%
- \advance\scratchcounter \minusone
- \scratchdimen\scratchcounter\baselineskip
- \advance\scratchdimen #1%
- \NormalizeFontHeight\DummyFont{W}\scratchdimen{#3}%
- \DroppedCaps{#2}{#3}\TheNormalizedFontSize{#4}
- {\scratchcounter\baselineskip}{#5}}
-
-\unexpanded\def\LineDroppedCaps% command font offset lines
- {\DoLineDroppedCaps{\strutht}}
-
-\unexpanded\def\NiceDroppedCaps% command font offset lines
- {\DoLineDroppedCaps{.5\baselineskip}}
-
-%D \macros
-%D {TreatFirstLine}
-%D
-%D \startbuffer
-%D \TreatFirstLine {\sc} {} {} {}
-%D Instead of limiting its action to one token, the next macro
-%D treats the whole first line. This paragraph was typeset by
-%D saying:
-%D \stopbuffer
-%D
-%D \getbuffer
-%D
-%D \typebuffer
-%D
-%D \startbuffer
-%D \TreatFirstLine {\startcolor[red]\bf} {\stopcolor} {} {}
-%D The combined color and font effect is also possible,
-%D although one must be careful in using macros that accumulate
-%D grouping, but the commands used here are pretty save in that
-%D respect.
-%D \stopbuffer
-%D
-%D \getbuffer
-%D
-%D \typebuffer
-%D
-%D Before we explain the third and fourth argument, we show the
-%D implementation. Those who know a bit about the way \TEX\
-%D treats tokens, will probably see in one glance that this
-%D alternative works all right for most text||only situations
-%D in which there is enough text available for the first line,
-%D but that more complicated things will blow. One has to live
-%D with that. A workaround is rather trivial but obscures the
-%D principles used.
-
-\unexpanded\def\TreatFirstLine#1#2#3#4% before, after, first, next
- {\leavevmode
- \bgroup
- \forgetall
- \bgroup
- #1%
- \setbox0\emptybox
- \setbox2\emptybox
- \def\grabfirstline##1 %
- {\setbox2\hbox
- {\ifvoid0
- {#3{\ignorespaces##1}}%
- \else
- \unhcopy0\ {#4{##1}}%
- \fi}%
- \ifdim\wd2=\zeropoint
- \setbox0\emptybox
- \setbox2\emptybox
- \@EA\grabfirstline
- \else\ifdim\wd2>\hsize
- \hbox to \hsize{\strut\unhbox0}#2\egroup
- \break##1\
- \egroup
- \else
- \setbox0\box2
- \@EAEAEA\grabfirstline
- \fi\fi}%
- \grabfirstline}
-
-%D \startbuffer
-%D \gdef\FunnyCommand
-%D {\getrandomfloat\FunnyR{0}{1}%
-%D \getrandomfloat\FunnyG{0}{1}%
-%D \getrandomfloat\FunnyB{0}{1}%
-%D \definecolor[FunnyColor][r=\FunnyR,g=\FunnyG,b=\FunnyB]%
-%D \color[FunnyColor]}
-%D
-%D %\TreatFirstLine {\bf} {} {\FunnyCommand} {\FunnyCommand}
-%D The third and fourth argument can be used to gain special
-%D effects on the individual words. Of course one needs ...
-%D \stopbuffer
-%D
-%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.
-%D
-%D \typebuffer
-%D
-%D Like in dropped caps case, one can hide such treatments in a
-%D macro, like:
-%D
-%D \starttyping
-%D \def\MyTreatFirstLine%
-%D {\TreatFirstLine{\bf}{}{\FunnyCommand}{\FunnyCommand}}
-%D \stoptyping
-
-%D \macros
-%D {reshapebox}
-%D
-%D \startbuffer
-%D \beginofshapebox
-%D When using \CONTEXT, one can also apply this funny command
-%D to whole lines by using the reshape mechanism. Describing
-%D this interesting mechanism falls outside the scope of this
-%D module, so we only show the trick. This is an example of
-%D low level \CONTEXT\ functionality: it's all there, and it's
-%D stable, but not entirely meant for novice users.
-%D \endofshapebox
-%D
-%D \reshapebox{\FunnyCommand{\box\shapebox}} \flushshapebox
-%D \stopbuffer
-%D
-%D \getbuffer
-%D
-%D \typebuffer
-%D
-%D This mechanism permits hyphenation and therefore gives
-%D better results than the previously discussed macro
-%D \type{\TreatFirstLine}.
-
-%D \macros
-%D {TreatFirstCharacter}
-%D
-%D \startbuffer
-%D \TreatFirstCharacter{\bf\color[green]} Just to be
-%D \stopbuffer
-%D
-%D \getbuffer complete we also offer a very simple one
-%D character alternative, that is not that hard to understand:
-
-\unexpanded\def\TreatFirstCharacter#1#2% command, character
- {{#1{#2}}}
-
-%D A previous paragraph started with:
-%D
-%D \typebuffer
-
-%D \macros
-%D {StackCharacters}
-%D
-%D The next hack deals with vertical stacking.
-
-\unexpanded\def\StackCharacters#1#2#3#4% sequence vsize vskip command
- {\vbox #2
- {\forgetall
- \baselineskip\zeropoint
- \def\StackCharacter##1{#4{##1}\cr\noalign{#3}}%
- \halign
- {\hss##\hss&##\cr
- \handletokens#1\with\StackCharacter\cr}}}
-
-%D \startbuffer
-%D \StackCharacters{CONTEXT}{}{\vskip.2ex}{\FunnyCommand}
-%D \stopbuffer
-%D
-%D Such a stack looks like:
-%D
-%D \startlinecorrection
-%D \hbox to \hsize
-%D {$\hss\bfd
-%D \vcenter{\StackCharacters{TEX} {}{\vskip.2ex}{\FunnyCommand}}%
-%D \hss
-%D \vcenter{\StackCharacters{CON} {}{\vskip.2ex}{\FunnyCommand}}
-%D \hss
-%D \vcenter{\StackCharacters{TEXT} {}{\vskip.2ex}{\FunnyCommand}}
-%D \hss
-%D \vcenter{\StackCharacters{CONTEXT}{}{\vskip.2ex}{\FunnyCommand}}
-%D \hss$}
-%D \stoplinecorrection
-%D
-%D and is typeset by saying:
-%D
-%D \typebuffer
-%D
-%D An alternative would have been
-%D
-%D \starttyping
-%D \StackCharacters {CONTEXT} {to 5cm} {\vfill} {\FunnyCommand}
-%D \stoptyping
-
-%D \macros
-%D {processtokens}
-%D
-%D At a lower level horizontal and vertical manipulations are
-%D already supported by:
-%D
-%D \starttyping
-%D \processtokens {begin} {between} {end} {space} {text}
-%D \stoptyping
-%D
-%D \startbuffer[a]
-%D \processtokens
-%D {\hbox to .5\hsize\bgroup} {\hfill}
-%D {\egroup} {\space} {LET'S HAVE}
-%D \stopbuffer
-%D
-%D \startbuffer[b]
-%D \processtokens
-%D {\vbox\bgroup\raggedcenter\hsize1em}
-%D {\vskip.25ex} {\egroup} {\strut} {FUN}
-%D \stopbuffer
-%D
-%D This macro is able to typeset:
-%D
-%D \leavevmode\hbox to \hsize
-%D {$\hfil\hfil
-%D \vcenter{\bf\getbuffer[a]}%
-%D \hfil
-%D \vcenter{\bfd\getbuffer[b]}%
-%D \hfil\hfil$}
-%D
-%D which was specified as:
-%D
-%D \typebuffer[a]
-%D \typebuffer[b]
-
-%D \macros
-%D {NormalizeFontHeight, NormalizeFontWidth,
-%D TheNormalizedFontSize}
-%D
-%D Next we introduce some font manipulation macros. When we
-%D want to typeset some text spread in a well defined area, it
-%D can be considered bad practice to manipulate character and
-%D word spacing. In such situations the next few macros can be
-%D of help:
-%D
-%D \starttyping
-%D \NormalizeFontHeight \name {sample text} {height} {font}
-%D \NormalizeFontWidth \name {sample text} {width} {font}
-%D \stoptyping
-%D
-%D These are implemented using an auxilliary macro:
-
-\unexpanded\def\NormalizeFontHeight{\NormalizeFontSize\ht}
-\unexpanded\def\NormalizeFontWidth {\NormalizeFontSize\wd}
-
-\unexpanded\def\NormalizeFontSize#1#2#3#4#5%
- {\bgroup
- \dimen0=#4% #4 can be \ht0 or so
- \setbox0\hbox{\definedfont[#5 at 5pt]#3}% 10pt
- \ifdim\wd0>\zeropoint
- \dimen2=#10 % #1 is \wd or \ht
- \dimen4=\maxdimen % 10000pt
- \divide\dimen4 \dimen2
- \divide\dimen0 1638 % 1000
- \dimen0=\number\dimen4\dimen0
- \divide \dimen0 \plustwo % ...
- \xdef\TheNormalizedFontSize{\the\dimen0}%
- \else
- \dimen0\bodyfontsize
- \fi
- \normalexpanded{\egroup\def\noexpand#2{\definedfont[#5 at \the\dimen0]}}}
-
-%D Afterwards, we have access to the calculated size by:
-
-\let\TheNormalizedFontSize\!!zeropoint
-
-%D Extra:
-
-\unexpanded\def\WidthSpanningText#1#2#3% text width font
- {\hbox{\NormalizeFontWidth\temp{#1}{#2}{#3}\temp\the\everydefinedfont#1}}
-
-%D Consider for instance:
-%D
-%D \startbuffer
-%D \NormalizeFontHeight \tmp {X} {2\baselineskip} {cmr10}
-%D
-%D {\tmp To Be Or Not To Be}
-%D \stopbuffer
-%D
-%D \typebuffer
-%D
-%D This shows up as (we also show the baselines):
-%D
-%D {\showbaselines\getbuffer}
-%D
-%D The horizontal counterpart is:
-%D
-%D \startbuffer
-%D \NormalizeFontWidth \tmp {This Line Fits} {\hsize} {cmr10}
-%D
-%D \hbox{\tmp This Line Fits}
-%D \stopbuffer
-%D
-%D \typebuffer
-%D
-%D The calculated font scale is avaliable in the macro
-%D \type{\NormalizedFontSize}.
-%D
-%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 \starttyping
-%D \NormalizeFontHeight {text} \DroppedFont {2\baselineskip} {cmbx12}
-%D
-%D \def\NicelyDroppedCaps
-%D {\DroppedCaps
-%D {\color[green]}
-%D {\DroppedFont}
-%D {2pt}
-%D {\baselineskip}
-%D {2}}
-%D \stoptyping
-%D
-%D It's up to the reader to test this one.
-
-\unexpanded\def\FirstNCharacters#1#2% \FirstNCharacters{3}{fr{\"o}beln}
- {\bgroup
- \scratchcounter\zerocount
- \def\docommand##1%
- {\ifnum\scratchcounter=#1\else
- ##1\relax % catches ##1 = \"e and alike
- \advance\scratchcounter\plusone
- \fi}
- \handletokens#2\with\docommand
- \egroup}
-
-%D \macros
-%D {FittingText}
-%D
-%D First used in Pascal (demo-bbv):
-%D
-%D \startbuffer
-%D \ruledvbox{\FittingText{3cm}{1cm}{Serif}{24pt}{1pt}{1}
-%D {\veryraggedright
-%D \hangindent1em\hangafter1\relax
-%D \begstrut \dorecurse{8}{Bram Marta }\unskip \endstrut}}
-%D
-%D \ruledvbox{\FittingText{3cm}{1cm}{Serif}{24pt}{1pt}{1}
-%D {\raggedleft\begstrut Bram\\Marta \unskip\endstrut}}
-%D \stopbuffer
-%D
-%D \typebuffer
-%D
-%D \startlinecorrection
-%D \getbuffer
-%D \stoplinecorrection
-
-% #1 width #2 height #3 font #4 size #5 step #6 interlinie #7 text
-
-\unexpanded\def\FittingText#1#2#3#4#5#6#7%
- {\bgroup
- \forgetall
- \dontcomplain
- \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!interlinespace=#6]}%
- \getvalue\s!dummy
- \setbox\scratchbox\vbox{#7\endgraf}%
- \ifdim\ht\scratchbox>\!!heightb
- \advance\!!heighta-#5%
- \else
- \beginshapebox
- \unvcopy\scratchbox
- \endshapebox
- \global\dimen1\hsize
- \reshapebox
- {\setbox\shapebox\hbox{\unhbox\shapebox}%
- \ifdim\wd\shapebox>\dimen1
- \global\dimen1\wd\shapebox
- \fi}%
- \ifdim\dimen1>\hsize
- \advance\!!heighta-#5%
- \else
- \exitloop
- \fi
- \fi
- \else
- \exitloop
- \fi}%
- %\writestatus{\strippedcsname\FittingText}{height: \the\!!heighta}%
- \unvbox\scratchbox
- \egroup}
-
-% \font width gap font spec text
-
-\unexpanded\def\NormalizeFontWidthSpread#1#2#3#4#5#6%
- {\global\setfalse\NFSpread
- \scratchdimen#3%
- \scratchdimen-.5\scratchdimen
- \advance\scratchdimen#2\relax
- \NormalizeFontWidth
- #1%
- {\def\+{\global\settrue\NFSpread\gobbleuntil\relax}%
- \def\\{\gobbleuntil\relax}% newline
- \setupspacing
- #6\relax}%
- {\scratchdimen}%
- {#4}%
- \ifconditional\NFSpread
- % de gap valt in de binding
- \else
- \definefont[\strippedcsname#1][#4 #5]%
- \fi}
-
-\unexpanded\def\SpreadGapText#1#2%
- {{\def\+{\kern#1}#2}}
-
-\unexpanded\def\GapText#1#2#3#4#5% width distance font spec title
- {\bgroup
- \NormalizeFontWidthSpread\DummyFont{#1}{#2}{#3}{#4}{#5}%
- \DummyFont\setupspacing\SpreadGapText{#2}{#5}\endgraf
- \egroup}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/m-oldnum.mkiv b/Master/texmf-dist/tex/context/base/m-oldnum.mkiv
deleted file mode 100644
index 382c56eb674..00000000000
--- a/Master/texmf-dist/tex/context/base/m-oldnum.mkiv
+++ /dev/null
@@ -1,416 +0,0 @@
-%D \module
-%D [ file=m-oldnum, % was: supp-num
-%D version=1998.05.15,
-%D title=\CONTEXT\ Support Macros,
-%D subtitle=Numbers,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% See end for transition to mkiv.
-
-\writestatus{loading}{ConTeXt Support Macros / Numbers}
-
-\unprotect
-
-%D \macros
-%D {digits, setdigitmode, setdigitsign}
-%D
-%D Depending on the digit mode the command \type {\digits}
-%D normalizes number patterns depending on the language set.
-%D
-%D \starttyping
-%D This will never be a \digits{1.000.000} seller.
-%D \stoptyping
-%D
-%D or
-%D
-%D \starttyping
-%D I will never grow longer than \digits 1.86 \Meter.
-%D \stoptyping
-%D
-%D The different modes are shown in:
-%D
-%D \startbuffer
-%D \setdigitmode 1 \digits 12.345,90 \digits 12.345.000 \digits 1,23
-%D \setdigitmode 2 \digits 12.345,90 \digits 12.345.000 \digits 1,23
-%D \setdigitmode 3 \digits 12.345,90 \digits 12.345.000 \digits 1,23
-%D \setdigitmode 4 \digits 12.345,90 \digits 12.345.000 \digits 1,23
-%D \setdigitmode 5 \digits 12.345,90 \digits 12.345.000 \digits 1,23
-%D \setdigitmode 6 \digits 12.345,90 \digits 12.345.000 \digits 1,23
-%D \stopbuffer
-%D
-%D \typebuffer
-%
-% This is typset as:
-%
-% \startlines
-% \getbuffer
-% \stoplines
-%D
-%D The sign can be typeset as is or within the space of a
-%D digit.
-%D
-%D \startbuffer
-%D \setdigitsign 0 \digits +12.345,90
-%D \setdigitsign 1 \digits +12.345,90
-%D \setdigitsign 2 \digits +12.345,90
-%D \setdigitsign 3 \digits +12.345,90
-%D \stopbuffer
-%D
-%D \typebuffer
-%D
-% This is typset as:
-%
-% \startlines
-% \getbuffer
-% \stoplines
-
-\chardef\digitoutputmode=1 % 0..6
-\chardef\digitsignmode =0 % 0..3
-
-\unexpanded\def\setdigitmode{\chardef\digitoutputmode}
-\unexpanded\def\setdigitsign{\chardef\digitsignmode}
-
-%D The digit modes are:
-%D
-%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
-\let\savedpowerdigits\empty \chardef\powerdigits =0
-
-%D The first stage of the \type {\digit} macro takes care of
-%D the grouped call, the other branch handles the fuzzy
-%D delimited calls.
-
-\ifdefined\mbox \else \let\mbox\hbox \fi
-
-\unexpanded\def\digits
- {\bgroup
- \let~@%
- \doifelsenextbgroup\dodigits{\doifelsenextchar\normalmathshift\domathdigits\grabdigit}}
-
-\def\dodigits#1%
- {\grabdigit#1\relax}
-
-\def\domathdigits$#1$%
- {\mbox{\grabdigit#1\relax}} % adding $ $ goes wrong in tabulate
-
-\def\grabdigit
- {\futurelet\next\scandigit}
-
-%D Watch the test for \type {\nextobeyedline}, because the
-%D endofline token can be \type {\def'd}, not \type {\let}'d,
-%D we need to do an indirect test (see \type {verb-ini.tex})
-%D for details. (This probably needs an update.)
-
-\ifx\normalmathshift\undefined \let\normalmathshift=$ \fi
-
-\unexpanded\def\scandigit
- {\ifx\next\blankspace
- \let\next\handledigits
- \else\ifx\next\nextobeyedline % the indirect one
- \let\next\handledigits
- \else\ifx\next\bgroup
- \let\next\handledigits
- \else\ifx\next\egroup
- \let\next\handledigits
- \else\ifx\next\normalmathshift
- \let\next\handledigits
- \else
- \let\next\collectdigit
- \fi\fi\fi\fi\fi
- \next}
-
-%D We store the power||of||ten (to be signaled by \type {^},
-%D \type {e} or~\type {E}) in a seperate macro so that we can
-%D typeset it in superscript. The space placeholders are
-%D replaced by a \type {@}.
-
-\unexpanded\def\savedigit#1#2%
- {\edef#1{#1\saveddigits#2}\let\saveddigits\empty}
-
-\unexpanded\def\collectdigit#1%
- {\ifx#1~%
- \savedigit\collecteddigits @%
- \else\if#1_% tricky as can be several catcodes ... will become lua code anyway
- \savedigit\collecteddigits @%
- \else\if\noexpand#1\relax
- \let\grabdigit\handledigits
- \else\ifcase\powerdigits
- \if#1E%
- \chardef\powerdigits\plusone
- \else\if#1e%
- \chardef\powerdigits\plusone
- \else\if#1^%
- \chardef\powerdigits\plusone
- \else
- \savedigit\collecteddigits#1%
- %\doifelsenumber{#1}
- % {\savedigit\collecteddigits#1}
- % {\def\saveddigits{#1}}%
- \fi\fi\fi
- \else
- \savedigit\savedpowerdigits#1%
- %\doifelsenumber{#1}
- % {\savedigit\savedpowerdigits#1}
- % {\def\saveddigits{#1}}%
- \fi\fi\fi\fi
- \grabdigit}
-
-\let\handlemathdigits\firstofoneargument
-\let\handletextdigits\mathematics
-
-\unexpanded\def\handledigits
- {%\ifcase\powerdigits
- % \edef\collecteddigits{\collecteddigits\saveddigits}%
- %\else
- % \edef\savedpowerdigits{\savedpowerdigits\saveddigits}%
- %\fi
- \ifmmode
- \handlemathdigits{\dohandledigits}%
- \else
- \dontleavehmode\hbox{\handletextdigits{\dohandledigits}}%
- \fi
- \egroup}
-
-%D Although we could do with one pass, a second pass for
-%D handling the stored sequence is more readable.
-
-\ifnum\texengine=\luatexengine
-
- \def\dohandledigits
- {\mathcode`\,="002C \mathcode`\.="002E % pretty hard coded
- \expandafter\handletokens\collecteddigits\with\scandigits
- \ifcase\powerdigits\else\digitpowerseparator^{\savedpowerdigits}\fi}
-
- \chardef\mathaxisfontid\zerocount
-
-\else
-
- \def\dohandledigits
- {\mathcode`\,="013B \mathcode`\.="013A % pretty hard coded
- \expandafter\handletokens\collecteddigits\with\scandigits
- \ifcase\powerdigits\else\digitpowerseparator^{\savedpowerdigits}\fi}
-
- \chardef\mathaxisfontid\plustwo
-
-\fi
-
-\def\doscandigit#1%
- {\ifcase\skipdigit\@EA\hbox\else\@EA\hphantom\fi\bgroup
- \mathematics % brr, needed because of stored punctuation
- {\ifnum\digitinputmode=#1\relax
- \ifcase\digitoutputmode
- \or .%
- \or ,%
- \or \mskip\thinmuskip
- \or \mskip\thinmuskip
- \or \mskip\thickmuskip
- \or \mskip\thickmuskip
- \fi
- \else
- \ifodd\digitoutputmode,\else.\fi
- \fi}%
- \egroup}
-
-%D The signs can be made smaller and sqeezed into the width
-%D of a digit. Watch the \type {\mathaxisheight} trickery (this
-%D font related register stored the math axis).
-
-% 0,=
-% 0,== second = results in delta(00,=)
-% 0,- is invalid, should be =
-% 0,-- is invalid, should be ==
-
-\unexpanded\def\digitzeroamount
- {\digitsgn\zeroamount
- \def\digitzeroamount
- {\hphantom
- {00\setbox\scratchbox\hbox{$\zeroamount$}%
- \hskip-\wd\scratchbox}%
- \let\digitzeroamount\empty}}
-
-\unexpanded\def\scandigits#1%
- {\if#1.\digitsep1\else
- \if#1,\digitsep2\else
- \if#1@\digitnop \else
- \if#1_\digitnop \else
- \if#1/\digitsgn{\hphantom{+}}\chardef\skipdigit0\else
- \if#1-\ifcase\skipdigit\digitsgn-\else
- \box\digitsepbox\digitzeroamount \fi\chardef\skipdigit0\else
- \if#1+\digitsgn+\chardef\skipdigit0\else
- \if#1=\box\digitsepbox\digitzeroamount \chardef\skipdigit0\else
- \if#1s\digitsgn{\hphantom{\positive}}\chardef\skipdigit0\else
- \if#1p\digitsgn\positive\chardef\skipdigit0\else
- \if#1m\digitsgn\negative\chardef\skipdigit0\else
- \if#1n\digitsgn\negative\chardef\skipdigit0\else
- \box\digitsepbox #1\chardef\skipdigit0\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
-
-\newbox\digitsepbox \chardef\autodigitmode=1
-
-\unexpanded\def\digitsep#1%
- {\ifcase\autodigitmode
- \doscandigit#1%
- \else
- \setbox\digitsepbox\hbox{\doscandigit#1}%
- \fi
- \chardef\skipdigit0\relax}
-
-% strange, does not work
-%
-% \def\digitnop
-% {\hphantom{\box\digitsepbox}%
-% \hphantom{0}\chardef\skipdigit1\relax}
-%
-% while this works
-
-\unexpanded\def\digitnop
- {\hbox{\hphantom{\box\digitsepbox}}%
- \hphantom{0}\chardef\skipdigit1\relax}
-
-% but this doesn't
-%
-% \def\digitnop
-% {\hphantom{\box\digitsepbox0}%
-% \chardef\skipdigit1\relax}
-
-\unexpanded\def\digitsgn#1%
- {\ifcase\digitsignmode#1\else
- \hbox
- {\setbox\scratchbox\hbox{0}%
- \scratchdimen\mathaxisheight\textfont\mathaxisfontid
- \def\digitsgn##1##2%
- {\advance\scratchdimen-\mathaxisheight##1\mathaxisfontid
- \raise\scratchdimen
- \hbox to \wd\scratchbox{\hss$##2#1$\hss}}%
- \ifcase\digitsignmode\or
- \digitsgn\textfont \textstyle \or
- \digitsgn\scriptfont \scriptstyle \or
- \digitsgn\scriptscriptfont\scriptscriptstyle\fi}%
- \fi}
-
-\ifx\undefined\zeroamount \def\zeroamount{-} \fi
-\ifx\undefined\positive \def\positive {+} \fi
-\ifx\undefined\negative \def\negative {-} \fi
-
-%D The digit parser handles a bunch of special characters as
-%D well as different formats. We strongly suggest you to use
-%D the grouped call.
-%D
-%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
-%D \NC \type{_} \NC \NC invisible space \NC \NR
-%D \NC \type{/} \NC \NC invisible sign \NC \NR
-%D \NC \type{-} \NC $-$ \NC minus sign \NC \NR
-%D \NC \type{+} \NC $+$ \NC plus sign \NC \NR
-%D \NC \type{s} \NC \NC invisible high sign \NC \NR
-%D \NC \type{p} \NC $\positive$ \NC high plus sign \NC \NR
-%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 \stoptabulate
-%D
-%D These triggers are used in the following examples.
-%D
-%D \startbuffer
-%D \digits 12
-%D \digits{~~~.~~~.~~~.68.712,34}
-%D \digits ~~~.~~~.~~~.68.712,34
-%D \digits ___.___.111.68.712,34
-%D \digits 111.111.111.68.712,34
-%D \digits 12.345,90
-%D \digits 12.345.000
-%D \digits 12,34
-%D \digits{392.857.230.68.712,34}
-%D {\digits1234}
-%D \digits{1234}
-%D \digits 1234\relax
-%D $\digits 123.222,00$
-%D \digits 123.222,00
-%D \digits 123.222,==
-%D \digits 123.222,00^10
-%D \digits 123.222,00e10
-%D \digits /123.222,00e-12
-%D \digits -123.222,00e-12
-%D \digits +123.222,00e-12
-%D \digits n123.222,00e-12
-%D \digits s123.222,00e-12
-%D \digits p123.222,00e-12
-%D \stopbuffer
-%D
-%D \typebuffer
-%
-% \startlines
-% \getbuffer
-% \stoplines
-
-%D \macros
-%D {Digits}
-%D
-%D We also permit:
-
-\let\Digits\digits
-
-%D These macros are complicated by the fact that we also
-%D have to support cases like:
-%D
-%D \starttyping
-%D {\digits1234}
-%D \digits{1234}
-%D \digits 1234\whatever
-%D $\digits 123.222,00$
-%D \digits 123.222,00.
-%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 \starttyping
-%D \digits 123.222,00^10
-%D \stoptyping
-%D
-%D The separator is defined as:
-
-% \def\digitpowerseparator%
-% {\cdot10} % {\times10}
-
-\def\digitpowerseparator
- {\ifx\collecteddigits\empty\else\cdot\fi10}
-
-%D \macros
-%D {digittemplate}
-%D
-%D Users can specify the way they enter those digits by saying
-%D something like:
-%D
-%D \starttyping
-%D \digittemplate 12.000.000,00 % \digittemplate .,
-%D \stoptyping
-
-\unexpanded\def\digittemplate #1 %
- {\chardef\digitinputmode\zerocount
- \handletokens#1\with\scandigittemplate}
-
-\unexpanded\def\scandigittemplate#1%
- {\if #1.\ifcase\digitinputmode\chardef\digitinputmode\plusone \fi% period
- \else\if#1,\ifcase\digitinputmode\chardef\digitinputmode\plustwo \fi% comma
- \fi\fi}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/m-pdfsnc.mkii b/Master/texmf-dist/tex/context/base/m-pdfsnc.mkii
deleted file mode 100644
index 12e2e2d68ba..00000000000
--- a/Master/texmf-dist/tex/context/base/m-pdfsnc.mkii
+++ /dev/null
@@ -1,200 +0,0 @@
-%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 ADE \& \CONTEXT\ Development Team}]
-%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/Master/texmf-dist/tex/context/base/m-pictex.tex b/Master/texmf-dist/tex/context/base/m-pictex.tex
deleted file mode 100644
index 27dc6a43914..00000000000
--- a/Master/texmf-dist/tex/context/base/m-pictex.tex
+++ /dev/null
@@ -1,255 +0,0 @@
-%D \module
-%D [ file=m-pictex,
-%D version=1997.01.15,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=\PICTEX\ Loading Macros,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 is one big hack. This hack is not needed when
-%D using \ETEX, so there we simply load \PICTEX\ and quit.
-
-%D Not every package defines \type{\fiverm}, \PICTEX's pixel,
-%D so let's take care of that omision here. The actual loading
-%D of \PICTEX\ depends on the package. For \LATEX\ users we
-%D take care of loading the auxiliary ones too.
-
-\def\loadpictex
- {\ifx\grid\undefined \else \let\normalgrid\grid \fi
- \ifx\axis\undefined \else \let\normalaxis\axis \fi
- \ifx\undefined\fiverm
- \font\fiverm=cmr5
- \fi
- \ifx\beginpicture\undefined
- \ifx\newenvironment\undefined
- \loadmarkfile{thrd-pic}%
- \else
- \input prepictex.tex \relax
- \input pictex.tex \relax
- \input postpictex.tex \relax
- \fi
- \fi
- \ifx\normalgrid\undefined \else
- \let\pictexgrid\grid
- \let\grid\normalgrid
- \fi
- \ifx\normalaxis\undefined \else
- \let\pictexaxis\axis
- \let\axis\normalaxis
- \fi}
-
-\ifx\eTeXversion\undefined \else \loadpictex \expandafter \endinput \fi
-
-%D When not in \ETEX\ and not in \CONTEXT, we load a few
-%D auxiliary macros.
-
-\ifx \undefined \writestatus \input supp-mis.tex \relax \fi
-
-\unprotect
-
-%D \TEX\ provides 256 \DIMENSIONS\ and 256 \SKIPS. In \CONTEXT\
-%D this is no problem, but in packages that have many
-%D authors, one can be quite sure that a lot of \DIMENSIONS\ are
-%D allocated. Packages that use \PICTEX\ can therefore run out
-%D of \DIMENSIONS\ quite fast. This module was written as a
-%D reaction to persistent problems with loading \PPCHTEX\ in
-%D \LATEX\ and \PICTEX\ deserves a solution. I therefore
-%D dedicate this module to Tobias Burnus and Dirk Kuypers, who
-%D use \PPCHTEX\ in a \LATEX\ environment and suggested a lot
-%D of extensions to the repertoire of \PPCHTEX\ commands.
-%D
-%D This module presents a solution that is quite effective: all
-%D \DIMENSIONS\ are drawn from the pool of \DIMENSIONS\ and
-%D \SKIPS, depending on the availability. This is possible
-%D because \DIMENSIONS\ are \SKIPS\ without a glue component.
-%D Therefore we can use \SKIPS\ as \DIMENSIONS. However, some
-%D incompatibility can result from assignments that look like:
-%D
-%D \starttyping
-%D \somedimen=\someskip
-%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
-%D glue. Because \PICTEX\ uses no glue components, I thought
-%D I could interchange both register types without problems,
-%D but alas, this didn't hold for all \DIMENSIONS.
-
-%D In \PLAIN\ \TEX\ the allocation macros are defined with (as)
-%D \type{\outer}. This means that they cannot appear inside
-%D macros, not even in an indirect way. We therefore have to
-%D redefine both \type{\newdimen} and \type{\newskip} to
-%D non||\type{\outer} alternatives. In most macro packages this
-%D redefinition already took place. We save the original
-%D meanings, so we can restores them afterwards.
-
-% \def\temporarynewdimen {\alloc@1\dimen\dimendef\insc@unt}
-% \def\temporarynewskip {\alloc@2\skip \skipdef \insc@unt}
-
-\let\normalnewdimen \newdimen
-\let\normalnewskip \newskip
-
-\let\temporarynewdimen\newdimen
-\let\temporarynewskip \newskip
-
-%D Here comes the trick. Depending on how many \DIMENSIONS\ and
-%D \SKIPS\ are allocated, the \type{\newdimen} assigns a
-%D \DIMENSIONS\ or \SKIP. \PLAIN\ \TEX\ allocates 15 \DIMENSIONS\
-%D and 17 \SKIPS. After loading \PICTEX, 71 \DIMENSIONS\ and
-%D and 71 \SKIPS\ are allocated. Indeed, \PICTEX\ needs 110
-%D \DIMENSIONS !
-%D
-%D \starttyping
-%D \def\newdimen
-%D {\ifnum\count11>\count12
-%D \let\next\temporarynewskip
-%D \else
-%D \let\next\temporarynewdimen
-%D \fi
-%D \next}
-%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
-%D sometimes leads to unwanted results. It took me some hours
-%D to find out that the source of errors originated in
-%D constructions like:
-%D
-%D \starttyping
-%D \ifdim\DimenOne<\DimenTwo whatever you want \else or not \fi
-%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 \starttyping
-%D \skip0=\dimen0 plus 10pt minus 5pt
-%D \stoptyping
-%D
-%D The most robust solution to this problem is:
-%D
-%D \starttyping
-%D \ifdim\DimenOne<\DimenTwo\relax right \else wrong \fi
-%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
-%D allocation of \DIMENSIONS\ when the name of the macro
-%D explictly stated the character sequence \type{dimen}. A next
-%D implementation therefore automatically declared all
-%D \DIMENSIONS\ with this sequence in their names with
-%D \type{\dimen}. Again I was too optimistic, so now we do it
-%D this way (the comments are from \PICTEX, which like \TABLE,
-%D is an example of a well documented package):
-
-\temporarynewdimen\!dimenA %.AW.X.DVEUL..OYQRST
-\temporarynewdimen\!dimenB %....X.DVEU...O.QRS.
-\temporarynewdimen\!dimenC %..W.X.DVEU......RS.
-\temporarynewdimen\!dimenD %..W.X.DVEU....Y.RS.
-\temporarynewdimen\!dimenE %..W........G..YQ.S.
-\temporarynewdimen\!dimenF %...........G..YQ.S.
-\temporarynewdimen\!dimenG %...........G..YQ.S.
-\temporarynewdimen\!dimenH %...........G..Y..S.
-\temporarynewdimen\!dimenI %...BX.........Y....
-\temporarynewdimen\!dxpos %..W......U..P....S.
-\temporarynewdimen\!dypos %..WB.....U..P......
-\temporarynewdimen\!xloc %..WB.....U.......S.
-\temporarynewdimen\!xpos %..........L.P..Q.ST
-\temporarynewdimen\!yloc %..WB.....U.......S.
-\temporarynewdimen\!ypos %..........L.P..Q.ST
-\temporarynewdimen\!zpt %.AWBX.DVEULGP.YQ.ST
-
-%D Tobias tested this module in all kind of \LATEX\ dialects
-%D so we were able to find out that we also needed to declare:
-
-\temporarynewdimen\linethickness
-
-%D After all, the new definition of \type{\newdimen} became:
-
-\def\newdimen#1%
- {\ifx#1\undefined
- \ifnum\count11>\count12\relax
- \temporarynewskip#1\relax
- \else
- \temporarynewdimen#1\relax
- \fi
- %\edef\ascii{\meaning#1}%
- %\immediate\write20{\string#1 becomes \ascii}%
- \else
- %\edef\ascii{\meaning#1}%
- %\immediate\write20{\string#1 already is \ascii}%
- \fi}
-
-% \def\newdimen#1%
-% {\bgroup
-% \escapechar=-1
-% \def\next##1##2%
-% {\def\next####1##1####2####3\next%
-% {\egroup
-% \if####2@
-% \temporarynewdimen#1\relax
-% \ifnum\count11>\count12
-% \temporarynewskip#1\relax
-% \else
-% \temporarynewdimen#1\relax
-% \fi\fi}%
-% \expandafter\next\string##2##1@@\next}%
-% \expandafter\next\expandafter{\string\dimen}#1}
-%
-% This macro is as unreadable, inefficient and as compact as
-% can be, but uses no extra hash entries, which sometimes are
-% scarce too. A more readable alternative, that also takes
-% explicit \SKIPS\ into account, is included in the source.
-%
-% \def\doifregisterpreferenceelse#1#2#3#4%
-% {\def\dodoifregisterpreferenceelse##1#1##2##3\war{\if##2@}%
-% \expandafter\dodoifregisterpreferenceelse\string#2#1@@\war
-% #4%
-% \else
-% #3%
-% \fi}
-%
-% \def\newdimen#1%
-% {\bgroup
-% \escapechar=-1
-% \expandafter\doifregisterpreferenceelse\expandafter{\string\dimen}#1
-% {\egroup
-% \temporarynewdimen#1}
-% {\expandafter\doifregisterpreferenceelse\expandafter{\string\skip}#1
-% {\egroup
-% \temporarynewskip#1}
-% {\egroup
-% \ifnum\count11>\count12
-% \temporarynewskip#1\relax
-% \else
-% \temporarynewdimen#1\relax
-% \fi}}}
-
-%D Curious readers can still find the previous solution in
-%D the source. The next macro is used instead of
-%D \type{\input}. This macro also reports some statistics.
-
-\def\dimeninput#1 %
- {\message{[before: d=\the\count11,s=\the\count12]}%
- \input #1 \relax
- \message{[after: d=\the\count11,s=\the\count12]}}%
-
-%D Now we can load \PICTEX:
-
-\loadpictex
-
-%D Finally we restore the old definitions of \type{\newdimen}
-%D and \type{\newskip}:
-
-\let\newdimen=\normalnewdimen
-\let\newskip =\normalnewskip
-
-%D and just hope for the best.
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/m-pipemode.mkiv b/Master/texmf-dist/tex/context/base/m-pipemode.mkiv
deleted file mode 100644
index e96394c431e..00000000000
--- a/Master/texmf-dist/tex/context/base/m-pipemode.mkiv
+++ /dev/null
@@ -1,7 +0,0 @@
-% For Mojca: context --global m-pipemode.mkiv
-
-\disabledirectives[system.errorcontext]
-
-\starttext
-
-\let\stoptext\relax
diff --git a/Master/texmf-dist/tex/context/base/m-pstricks.lua b/Master/texmf-dist/tex/context/base/m-pstricks.lua
deleted file mode 100644
index b151e313ac8..00000000000
--- a/Master/texmf-dist/tex/context/base/m-pstricks.lua
+++ /dev/null
@@ -1,74 +0,0 @@
-if not modules then modules = { } end modules ['m-pstricks'] = {
- version = 1.001,
- comment = "companion to m-pstricks.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
--- The following will be done when I need ps tricks figures
--- in large quantities:
---
--- + hash graphics and only process them once
--- + save md5 checksums in tuc file
---
--- It's no big deal but has a low priority.
-
-local format, lower, concat, gmatch = string.format, string.lower, table.concat, string.gmatch
-local variables = interfaces.variables
-
-moduledata.pstricks = moduledata.pstricks or { }
-
-local report_pstricks = logs.reporter("pstricks")
-
-local template = [[
-\starttext
- \pushcatcodetable
- \setcatcodetable\texcatcodes
- \usemodule[pstric]
- %s
- \popcatcodetable
- \startTEXpage
- \hbox\bgroup
- \ignorespaces
- %s
- \removeunwantedspaces
- \egroup
- \obeydepth %% temp hack as we need to figure this out
- \stopTEXpage
-\stoptext
-]]
-
-local loaded = { }
-local graphics = 0
-
-function moduledata.pstricks.usemodule(names)
- for name in gmatch(names,"([^%s,]+)") do
- loaded[#loaded+1] = format([[\readfile{%s}{}{}]],name)
- end
-end
-
-function moduledata.pstricks.process(n)
- graphics = graphics + 1
- local name = format("%s-pstricks-%04i",tex.jobname,graphics)
- local data = buffers.collectcontent("def-"..n)
- local tmpfile = name .. ".tmp"
- local epsfile = name .. ".ps"
- local pdffile = name .. ".pdf"
- local loaded = concat(loaded,"\n")
- os.remove(epsfile)
- os.remove(pdffile)
- io.savedata(tmpfile,format(template,loaded,data))
- os.execute(format("mtxrun --script texexec %s --once --dvips",tmpfile))
- if lfs.isfile(epsfile) then
- os.execute(format("ps2pdf %s %s",epsfile,pdffile))
- -- todo: direct call but not now
- if lfs.isfile(pdffile) then
- context.externalfigure( { pdffile }, { object = variables.no } )
- else
- report_pstricks("run failed, no pdf file")
- end
- else
- report_pstricks("run failed, no ps file")
- end
-end
diff --git a/Master/texmf-dist/tex/context/base/m-pstricks.mkii b/Master/texmf-dist/tex/context/base/m-pstricks.mkii
deleted file mode 100644
index d41f1987118..00000000000
--- a/Master/texmf-dist/tex/context/base/m-pstricks.mkii
+++ /dev/null
@@ -1,127 +0,0 @@
-%D \module
-%D [ file=m-pstricks,
-%D version=1997.01.15,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=\PSTRICKS\ Connections,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% pstricks is not supported in context mkii (it's no problem doing that
-% but as we also need to support latex it would become quite messy so for
-% context we use metapost and for latex pstricks)
-
-%M \usemodule[pstric]
-
-\letvalue{@unused}\plussixteen
-\letvalue{alloc@}\gobblefivearguments
-
-\chardef\oldbarcode\the\catcode`\| \catcode`\|=12
-
-\def\loadpstrickscolors#1%
- {\pushmacro\dodefinecolor
- \pushmacro\dodefinepalet
- \pushmacro\dodefinecolorgroup
- \def\dodefinecolor[##1][##2]%
- {\doifassignmentelse{##2}
- {\getparameters[pstricks][r=0,g=0,b=0,##2]%
- \expanded{\newrgbcolor{##1}{{\pstricksr} {\pstricksg} {\pstricksb}}}}%
- {}}%
- \def\dodefinepalet [##1][##2]{}%
- \def\dodefinecolorgroup[##1][##2][##3]{}%
- \writestatus{pstricks}{loading colors from #1}%
- \input #1 \relax
- \popmacro\dodefinecolorgroup
- \popmacro\dodefinepalet
- \popmacro\dodefinecolor}
-
-\doifelse{\jobsuffix}{dvi}
- {\input multido \relax
- \input pstricks \relax
- \input pst-plot \relax
- \loadpstrickscolors{colo-rgb.mkii}}
- {\writestatus{pstricks}{using indirect method; enable write18}}
-
-\catcode`\|=\oldbarcode
-
-\def\loadpstricksmodule[#1]%
- {\chardef\oldbarcode\the\catcode`\|
- \catcode`\|=12
- \readfile{#1}{}{}%
- \catcode`\|=\oldbarcode}
-
-%D The next piece of code is for John Culleton who suggested to
-%D handle \PSTRICKS\ in a similar fashion as \METAPOST, i.e.\
-%D using a child process. For the moment there is no support
-%D for passing environments, so these should be called
-%D explicitly inside this environment.
-
-\unprotect
-
-%D \startPSTRICKS[offset=2pt] ... \stopPSTRICKS
-%D
-%D works in both dvi and pdf mode
-%D
-%D % \usemodule[pstric]
-%D
-%D \startPSTRICKS
-%D \pspicture(0,0)(10,10)
-%D \dorecurse{10}{\psline(0,0)(\recurselevel,10)}
-%D \dorecurse{10}{\psline(0,0)(10,\recurselevel)}
-%D \endpspicture
-%D \stopPSTRICKS
-
-\def\startPSTRICKS
- {\dosingleempty\dostartPSTRICKS}
-
-% \ifx\startTEXapplication\undefined
-%
-% \long\def\dostartPSTRICKS[#1]#2\stopPSTRICKS
-% {\doifelse{\jobsuffix}{dvi}
-% {#2}
-% {\bgroup
-% \setbuffer[pstricks]%
-% \usemodule[pstric]%
-% \setbox\scratchbox\hbox{#2}%
-% % There is probably a nicer way to handle this
-% \immediate\openout\scratchwrite=\bufferprefix dim.tmp
-% \immediate\write\scratchwrite{\dimen0=\the\ht\scratchbox}%
-% \immediate\write\scratchwrite{\dimen2=\the\wd\scratchbox}%
-% \immediate\closeout\scratchwrite
-% % Quick and dirty
-% \startTEXpage[#1]\box\scratchbox\stopTEXpage
-% \endbuffer
-% % Here we go!
-% %\immediate\write18{texexec \bufferprefix pstricks.tmp --once --batch}%
-% %\immediate\write18{dvips -G0 -Ppdf \bufferprefix pstricks -o}%
-% %\immediate\write18{ps2pdf \bufferprefix pstricks.ps \bufferprefix pstricks.pdf}%
-% \executesystemcommand{texexec \bufferprefix pstricks.tmp --once --batch}%
-% \executesystemcommand{dvips -G0 -Ppdf \bufferprefix pstricks -o}%
-% \executesystemcommand{texmfstart pstopdf \bufferprefix pstricks.ps \bufferprefix pstricks.pdf}%
-% % We pick up the dimensions from the scratch file.
-% \readlocfile{\bufferprefix pstricks-dim.tmp}{}{}%
-% % 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!no]}%
-% \setbox\scratchbox\hbox
-% {\lower\ht\scratchbox\hbox{\raise\dimen2\box\scratchbox}}%
-% \wd\scratchbox\dimen0
-% \ht\scratchbox\dimen2
-% \dp\scratchbox\zeropoint
-% \box\scratchbox
-% \egroup}}
-%
-% \fi
-
-\long\def\dostartPSTRICKS[#1]#2\stopPSTRICKS
- {\doifelse{\jobsuffix}{dvi} % will some day move to app as switch
- {\hbox{#2}}
-% {\startTEXapplication[#1]{\usemodule[pstric]}#2\stopTEXapplication}}
- {\startTEXapplication[#1]{}#2\stopTEXapplication}}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/m-pstricks.mkiv b/Master/texmf-dist/tex/context/base/m-pstricks.mkiv
deleted file mode 100644
index 421607aafe9..00000000000
--- a/Master/texmf-dist/tex/context/base/m-pstricks.mkiv
+++ /dev/null
@@ -1,65 +0,0 @@
-%D \module
-%D [ file=m-pstricks,
-%D version=2010.03.14,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=\PSTRICKS\ Connections,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\registerctxluafile{m-pstricks}{}
-
-\unprotect
-
-% best we can make a special colors module
-%
-% \let\@unused\plussixteen
-% \let\alloc@ \gobblefivearguments
-%
-% \def\loadpstrickscolors#1%
-% {\pushmacro\dodefinecolor
-% \pushmacro\dodefinepalet
-% \pushmacro\dodefinecolorgroup
-% \def\dodefinecolor[##1][##2]%
-% {\doifassignmentelse{##2}
-% {\getparameters[pstricks][r=0,g=0,b=0,##2]%
-% \expanded{\newrgbcolor{##1}{{\pstricksr} {\pstricksg} {\pstricksb}}}}%
-% {}}%
-% \def\dodefinepalet [##1][##2]{}%
-% \def\dodefinecolorgroup[##1][##2][##3]{}%
-% \writestatus{pstricks}{loading colors from #1}%
-% \input #1 \relax
-% \popmacro\dodefinecolorgroup
-% \popmacro\dodefinepalet
-% \popmacro\dodefinecolor}
-%
-% \input multido \relax
-% \input pstricks \relax
-% \input pst-plot \relax
-%
-% \loadpstrickscolors{colo-rgb}
-
-\definebuffer[PSTRICKS]
-
-\unexpanded\def\processPSTRICKS {\ctxlua{moduledata.pstricks.process(\thebuffernumber{PSTRICKS})}}
-\unexpanded\def\usePSTRICKSmodule[#1]{\ctxlua{moduledata.pstricks.usemodule("#1")}}
-\unexpanded\def\setPSTRICKS #1{\setbuffer[def-\thebuffernumber{PSTRICKS}]#1\endbuffer}
-
-\let\stopPSTRICKS\processPSTRICKS
-
-%D \starttyping
-%D \usemodule[pstricks]
-%D \usePSTRICKSmodule[pst-barcode]
-%D
-%D \startPSTRICKS
-%D \pspicture(-4mm,-1mm)(38mm,26mm)
-%D \psbarcode{9781860742712}{includetext guardwhitespace}{ean13}%
-%D \endpspicture
-%D \stopPSTRICKS
-%D \stoptyping
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/m-punk.mkiv b/Master/texmf-dist/tex/context/base/m-punk.mkiv
deleted file mode 100644
index c8021a92f4e..00000000000
--- a/Master/texmf-dist/tex/context/base/m-punk.mkiv
+++ /dev/null
@@ -1,258 +0,0 @@
-%D \module
-%D [ file=m-punk,
-%D version=2008.04.15,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Punk Support,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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\luaversion\undefined \endinput \fi
-
-% At some point the font generation code will move into the
-% ConTeXt MkIV kernel.
-
-\startluacode
-local concat = table.concat
-local chardata = characters.data
-local fontdata = fonts.hashes.identifiers
-
-fonts.mp = fonts.mp or { }
-
-fonts.mp.version = fonts.mp.version or 1.15
-fonts.mp.inline = true
-fonts.mp.cache = containers.define("fonts", "mp", fonts.mp.version, true)
-
-metapost.characters = metapost.characters or { }
-
--- todo: use table share as in otf
-
-local characters, descriptions = { }, { }
-local factor, l, n, w, h, d, total, variants = 100, { }, 0, 0, 0, 0, 0, 0, true
-
--- A next version of mplib will provide the tfm font information which
--- gives better glyph dimensions, plus additional kerning information.
-
-local flusher = {
- startfigure = function(chrnum,llx,lly,urx,ury)
- l, n = { }, chrnum
- w, h, d = urx - llx, ury, -lly
- total = total + 1
- inline = fonts.mp.inline
- end,
- flushfigure = function(t)
- for i=1, #t do
- l[#l+1] = t[i]
- end
- end,
- stopfigure = function()
- local cd = chardata[n]
- if inline then
- descriptions[n] = {
- -- unicode = n,
- name = cd and cd.adobename,
- width = w*100,
- height = h*100,
- depth = d*100,
- boundingbox = { 0, -d, w, h },
- }
- characters[n] = {
- commands = { -- todo: xforms, should happen in backend
- { "special", "pdf: " .. concat(l," ") },
- }
- }
- else
- descriptions[n] = {
- -- unicode = n,
- name = cd and cd.adobename,
- width = w*100,
- height = h*100,
- depth = d*100,
- boundingbox = { 0, -d, w, h },
- }
- characters[n] = {
- commands = {
- { "image", { stream = concat(l," "), bbox = { 0, -d*65536, w*65536, h*65536 } } },
- }
- }
- end
- end
-}
-
-metapost.characters.instances = metapost.characters.instances or 10
-
-function metapost.characters.process(mpxformat, name, instances, scalefactor)
- statistics.starttiming(metapost.characters)
- scalefactor = scalefactor or 1
- instances = instances or metapost.characters.instances or 10
- local fontname = file.removesuffix(file.basename(name))
- local hash = file.robustname(string.format("%s %05i %03i", fontname, scalefactor*1000, instances))
- local lists = containers.read(fonts.mp.cache, hash)
- if not lists then
- statistics.starttiming(flusher)
- -- we can use a format per font
- local data = io.loaddata(resolvers.findfile(name))
- metapost.reset(mpxformat)
- metapost.setoutercolor(2) -- no outer color and no reset either
- lists = { }
- for i=1,instances do
- characters = { }
- descriptions = { }
- metapost.process(
- mpxformat,
- {
- "randomseed := " .. i*10 .. ";",
- "scale_factor := " .. scalefactor .. " ;",
- data
- },
- false,
- flusher,
- false,
- false,
- "all"
- )
- lists[i] = {
- characters = characters,
- descriptions = descriptions,
- parameters = {
- designsize = 655360,
- slant = 0,
- space = 333 * scalefactor,
- space_stretch = 166.5 * scalefactor,
- space_shrink = 111 * scalefactor,
- x_height = 431 * scalefactor,
- quad = 1000 * scalefactor,
- extra_space = 0,
- },
- properties = {
- name = string.format("%s-%03i",hash,i),
- virtualized = true,
- spacer = "space",
- }
- }
- end
- metapost.reset(mpxformat) -- saves memory
- lists = containers.write(fonts.mp.cache, hash, lists)
- statistics.stoptiming(flusher)
- end
- variants = variants + #lists
- statistics.stoptiming(metapost.characters)
- return lists
-end
-
-function fonts.handlers.vf.combiner.commands.metafont(g,v)
- local size = g.specification.size
- local data = metapost.characters.process(v[2],v[3],v[4],size/655360)
- local list, t = { }, { }
- for d=1,#data do
- t = data[d]
- t = fonts.constructors.scale(t, -1000)
- local id = font.nextid()
- t.fonts = { { id = id } }
- fontdata[id] = t
- fonts.handlers.vf.helpers.composecharacters(t)
- list[d] = font.define(t)
- end
- for k, v in next, t do
- g[k] = v -- kind of replace, when not present, make nil
- end
- g.properties.virtualized = true
- g.variants = list
- print(g)
-end
-
-fonts.definers.methods.install( "punk", {
- { "metafont", "mfplain", "punkfont.mp", 10 },
-} )
-fonts.definers.methods.install( "punkbold", {
- { "metafont", "mfplain", "punkfont-bold.mp", 10 },
-} )
-fonts.definers.methods.install( "punkslanted", {
- { "metafont", "mfplain", "punkfont-slanted.mp", 10 },
-} )
-fonts.definers.methods.install( "punkboldslanted", {
- { "metafont", "mfplain", "punkfont-boldslanted.mp", 10 },
-} )
-
--- typesetters.cases.register("RandomPunk", function(current)
--- local used = fontdata[current].variants
--- if used then
--- local f = math.random(1,#used)
--- current.font = used[f]
--- return current, true
--- else
--- return current, false
--- end
--- end)
-
-local getfont = nodes.nuts.getfont
-local setfield = nodes.nuts.setfield
-local random = math.random
-
-typesetters.cases.register("RandomPunk", function(start)
- local used = fontdata[getfont(start)].variants
- if used then
- local f = random(1,#used)
- setfield(start,"font",used[f])
- return start, true
- else
- return start, false
- end
-end)
-
-metapost.characters.flusher = flusher
-
-statistics.register("metapost font generation", function()
- local time = statistics.elapsedtime(flusher)
- if total > 0 then
- return string.format("%i glyphs, %.3f seconds runtime, %i glyphs/second", total, time, total/time)
- else
- return string.format("%i glyphs, %.3f seconds runtime", total, time)
- end
-end)
-
-statistics.register("metapost font loading",function()
- local time = statistics.elapsedtime(metapost.characters)
- if variants > 0 then
- return string.format("%.3f seconds, %i instances, %0.3f instances/second", time, variants, variants/time)
- else
- return string.format("%.3f seconds, %i instances", time, variants)
- end
-end)
-\stopluacode
-
-\unexpanded\def\EnableRandomPunk {\setcharactercasing[RandomPunk]}
-\unexpanded\def\RandomPunk {\groupedcommand\EnableRandomPunk\donothing}
-\unexpanded\def\StartRandomPunk {\begingroup\EnableRandomPunk}
-\unexpanded\def\StopRandomPunk {\endgroup}
-
-\starttypescript [serif] [punk]
- \definefontsynonym [Serif] [demo@punk]
- \definefontsynonym [SerifBold] [demobold@punkbold]
- \definefontsynonym [SerifSlanted] [demoslanted@punkslanted]
- \definefontsynonym [SerifBoldSlanted] [demoboldslanted@punkboldslanted]
- \definefontsynonym [SerifItalic] [SerifSlanted]
- \definefontsynonym [SerifBoldItalic] [SerifBoldSlanted]
-\stoptypescript
-
-\starttypescript [punk]
- \definetypeface [punk] [rm] [serif] [punk] [default]
-\stoptypescript
-
-\endinput
-
-\usetypescript[punk]
-
-\setupbodyfont[punk,14pt]
-
-\starttext
- \definedfont[demo@punk at 10pt]hello world\par
- \definedfont[demo@punk at 12pt]hello world\par
- \definedfont[demo@punk at 16pt]hello world\par
- \definedfont[demo@punk at 20pt]hello world\par
-\stoptext
-
diff --git a/Master/texmf-dist/tex/context/base/m-r.mkii b/Master/texmf-dist/tex/context/base/m-r.mkii
deleted file mode 100644
index c2cb7ba8816..00000000000
--- a/Master/texmf-dist/tex/context/base/m-r.mkii
+++ /dev/null
@@ -1,174 +0,0 @@
-%D \module
-%D [ file=m-r,
-%D version=2006.06.06,
-%D title=\CONTEXT\ Modules,
-%D subtitle=R Support,
-%D author={Johan Sandblom \& Hans Hagen},
-%D date=\currentdate,
-%D copyright={Johan Sandblom \& 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.
-
-\unprotect
-
-%D The following R-processor is a variation on Johan Sandblom's
-%D prototype.
-%D
-%D We can combine both variants in one macro definition. Also, we
-%D can minimize the number of runs by checking for a change.
-
-%D JS: The call to R has \type {-q} in order to prevent banner,
-%D \type {--save} to make sure it saves the workspace after the run,
-%D \type {--restore} to make sure it reads any workspace from a
-%D previous session.
-
-%D An easier and better solution is to use the buffering mechanisms:
-
-\def\Rbufferprefix{r-}
-
-\newcounter\nofRfiles
-
-\def\Rfile{\TEXbufferfile{\Rbufferprefix\nofRfiles}}
-
-\def\startR
- {\doglobal\increment\nofRfiles
- \dostartbuffer[\Rbufferprefix\nofRfiles][startR][stopR]}
-
-\def\stopR
- {\doifmode{*\v!first}\runR
- \typefile{\Rfile.out}}
-
-\def\startRhidden
- {\doglobal\increment\nofRfiles
- \dostartbuffer[\Rbufferprefix\nofRfiles][startRhidden][stopRhidden]}
-
-\def\stopRhidden
- {\doifmode{*\v!first}\runR}
-
-\def\runR
- {\executesystemcommand{texmfstart
- --ifchanged=\Rfile\space --direct R
- CMD BATCH -q --save --restore \Rfile\space \Rfile.out}}
-
-\protect \doifnotmode{demo}{\endinput}
-
-% Johan's test file:
-
-\usemodule[r]
-
-\def\R{R}
-
-\setupcolors[state=start]
-
-\setuptyping
- [Rtype]
- [color=darkgreen]
-
-\starttext
-
-First a test of whether the workspace is persistent:
-bla
-
-\startR
-a <- "bla"
-b <- "blabla"
-ls()
-\stopR
-
-One \R run ends, another begins.
-
-\startR
-ls()
-\stopR
-
-Now follows a hidden \R run which cleans the R workspace
-
-\startRhidden
-rm(list=ls())
-save.image()
-\stopRhidden
-
-What is in the workspace now?
-
-\startR
-ls()
-\stopR
-
-Then a small test of generating a graphic, in this case a pdf
-\startR
-ushape <- c(rexp(500000), 12-rexp(500000))
-pdf("ushape.pdf")
-par(mfrow=c(1,2))
-hist(ushape)
-plot(density(ushape), main="Density")
-dev.off()
-\stopR
-
-The graphic \type{ushape.pdf} can be included in the standard \CONTEXT\ way
-\startbuffer
-\placefigure{An ugly distribution}{\externalfigure[ushape]}
-\stopbuffer
-\typebuffer
-\getbuffer
-
-\startR
-x <- rnorm(900)
-y <- rexp(900)
-# test comment
-f <- gl(9,9,900)
-summary(aov(y~x+Error(f)))
-library(lattice)
-pdf("lattice.pdf")
-xyplot(y~x|f)
-dev.off()
-\stopR
-
-With \type{Sweave} lattice graphics calls must be enclosed in
-\type{print()} statements but that is not necessary here.
-
-\startbuffer
-\placefigure[here]{Lattice graphics}{\externalfigure[lattice]}
-\stopbuffer
-\typebuffer
-\getbuffer
-
-A test string with nasty characters. In \R, the result of a statement
-is not printed by default. Enclosing the statement in parentheses,
-however causes the parser to see only the value of the statement and
-applying the \type{print()} method.
-\startR
-(test <- ".*\\\\ [[{[{]{[{[{}\]\}=?!+%#|<|>@$")
-cat(test)
-\stopR
-
-A combination
-\startbuffer
-\placefigure{A combination of two previously used graphics}{
-\startcombination[2*1]
- {\externalfigure[ushape][width=.4\textwidth]}{The first graphic, rescaled}
- {\externalfigure[lattice][width=.4\textwidth]}{The second graphic, rescaled}}
-\stopcombination
-\stopbuffer
-\typebuffer
-\getbuffer
-
-Testing a function definition.
-
-\startR
-a.df <- data.frame(a=1:2, b=rnorm(2))
-a.df$a
-testfunction <- function(a=NULL, ...) {
- for(i in 1:length(a)) {
- gsub(a[[i]], "([a-r]|[A-R])", "bla")}
- print(a)}
-\stopR
-
-What is in the workspace now?
-
-\startR
-ls()
-\stopR
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-scite.mkiv b/Master/texmf-dist/tex/context/base/m-scite.mkiv
deleted file mode 100644
index 7a8e8b06e6f..00000000000
--- a/Master/texmf-dist/tex/context/base/m-scite.mkiv
+++ /dev/null
@@ -1,275 +0,0 @@
-%D \module
-%D [ file=m-scite,
-%D version=2014.04.28,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=\SCITE\ lexers,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% We can simplify the scite lexers, as long as we're able to return the
-% lexed result table and provide alexer module with the functions that
-% the lexer expects (so I need to decipher the cxx file).
-%
-% lexer._TOKENSTYLES : table
-% lexer._CHILDREN : flag
-% lexer._EXTRASTYLES : table
-% lexer._GRAMMAR : flag
-%
-% lexers.load : function
-% lexers.lex : function
-%
-% And some properties that map styles onto scintilla styling. I get the
-% impression that we end up with something simpler, a hybrid between the
-% scite lexing and the current context way, so we get an intermediate
-% step, with some penalty for context, but at least I don't have to
-% maintain two sets (three sets as we also have a line based series).
-
-% TODO: as these files are in tds we can locate them and set the lexer root
-% to that one. Currently we're on: we're on context/documents.
-
-% This is an experiment: eventually we need to hook it into the verbatim code
-% and deal with widow lines and so.
-
-\startluacode
-
--- todo: merge with collapse
--- todo: prehash whitespaces
-
--- todo: hook into the pretty print code
--- todo: a simple catcode regime with only \ { }
-
-local gsub, sub, find = string.gsub, string.sub, string.find
-local concat = table.concat
-local formatters = string.formatters
-local lpegmatch = lpeg.match
-local setmetatableindex = table.setmetatableindex
-
-local scite = require("util-sci")
-buffers.scite = scite
-
--- context output:
-
-local f_def_color = formatters["\\definecolor[slxc%s][h=%s%s%s]%%"]
-local f_fore_none = formatters["\\def\\slx%s#1{{\\slxc%s#1}}%%"]
-local f_fore_bold = formatters["\\def\\slx%s#1{{\\slxc%s\\bf#1}}%%"]
-local f_none_bold = formatters["\\def\\slx%s#1{{\\bf#1}}%%"]
-local f_none_none = formatters["\\def\\slx%s#1{{#1}}%%"]
-local f_texstyled = formatters["\\slx%s{%s}"]
-
-local f_mapping = [[
-\let\string\slxL\string\letterleftbrace
-\let\string\slxR\string\letterrightbrace
-\let\string\slxM\string\letterdollar
-\let\string\slxV\string\letterbar
-\let\string\slxU\string\letterhat
-\let\string\slxD\string\letterunderscore
-\let\string\slxH\string\letterhash
-\let\string\slxB\string\letterbackslash
-\let\string\slxP\string\letterpercent
-\let\string\slxS\string\fixedspace
-%]]
-
-local replacer = lpeg.replacer {
- ["{"] = "\\slxL ",
- ["}"] = "\\slxR ",
- ["$"] = "\\slxM ",
- ["^"] = "\\slxU ",
- ["_"] = "\\slxD ",
- ["|"] = "\\slxV ",
- ["#"] = "\\slxH ",
- ["\\"] = "\\slxB ",
- ["%"] = "\\slxP ",
- [" "] = "\\slxS ",
-}
-
-local colors = nil
-
-local function exportcolors()
- if not colors then
- scite.loadscitelexer()
- local function black(f)
- return (f[1] == f[2]) and (f[2] == f[3]) and (f[3] == '00')
- end
- local result, r = { f_mapping }, 1
- for k, v in table.sortedhash(lexer.context.styles) do
- local fore = v.fore
- if fore and not black(fore) then
- r = r + 1
- result[r] = f_def_color(k,fore[1],fore[2],fore[3])
- end
- end
- r = r + 1
- result[r] = "%"
- for k, v in table.sortedhash(lexer.context.styles) do
- local bold = v.bold
- local fore = v.fore
- r = r + 1
- if fore and not black(fore) then
- if bold then
- result[r] = f_fore_bold(k,k)
- else
- result[r] = f_fore_none(k,k)
- end
- else
- if bold then
- result[r] = f_none_bold(k)
- else
- result[r] = f_none_none(k)
- end
- end
- end
- colors = concat(result,"\n")
- end
- return colors
-end
-
-local function exportwhites()
- return setmetatableindex(function(t,k)
- local v = find(k,"white") and true or false
- t[k] = v
- return v
- end)
-end
-
-local function exportstyled(lexer,text)
- local result = lexer.lex(lexer,text,0)
- local start = 1
- local whites = exportwhites()
- local buffer = { }
- for i=1,#result,2 do
- local style = result[i]
- local position = result[i+1]
- local txt = sub(text,start,position-1)
- txt = lpegmatch(replacer,txt)
- if whites[style] then
- buffer[#buffer+1] = txt
- else
- buffer[#buffer+1] = f_texstyled(style,txt)
- end
- start = position
- end
- buffer = concat(buffer)
- return buffer
-end
-
-function scite.installcommands()
- context(exportcolors())
-end
-
-local function lexdata(data,lexname)
- buffers.assign("lex",exportstyled(scite.loadedlexers[lexname],data or ""))
-end
-
-scite.lexdata = lexdata
-
-function scite.lexbuffer(name,lexname)
- lexdata(buffers.getcontent(name) or "",lexname or "tex")
-end
-
-function scite.lexfile(filename,lexname)
- lexdata(io.loaddata(filename) or "",lexname or file.suffix(filename))
-end
-
--- html output
-
-\stopluacode
-
-% This is a preliminary interface.
-
-\unprotect
-
-\unexpanded\def\installscitecommands
- {\ctxlua{buffers.scite.installcommands()}%
- \let\installscitecommands\relax}
-
-\unexpanded\def\startscite{\startlines}
-\unexpanded\def\stopscite {\stoplines}
-
-\unexpanded\def\scitefile
- {\dosingleargument\module_scite_file}
-
-\unexpanded\def\module_scite_file[#1]%
- {\start
- \ctxlua{buffers.scite.lexfile("#1")}%
- \installscitecommands
- \tt
- \dontcomplain
- \setcatcodetable\ctxcatcodes % needed in xml
- \startscite
- \getbuffer[lex]%
- \stopscite
- \stop}
-
-\unexpanded\def\scitebuffer
- {\dodoubleargument\module_scite_buffer}
-
-\unexpanded\def\module_scite_buffer[#1][#2]%
- {\start
- \ifsecondargument
- \ctxlua{buffers.scite.lexbuffer("#2","#1")}%
- \else
- \ctxlua{buffers.scite.lexbuffer("#1","tex")}%
- \fi
- \installscitecommands
- \tt
- \dontcomplain
- \setcatcodetable\ctxcatcodes % needed in xml
- \startscite
- \getbuffer[lex]%
- \stopscite
- \stop}
-
-\protect
-
-\continueifinputfile{m-scite.mkiv}
-
-\setupbodyfont[dejavu,8pt]
-
-\setuplayout
- [width=middle,
- height=middle,
- header=1cm,
- footer=1cm,
- topspace=1cm,
- bottomspace=1cm,
- backspace=1cm]
-
-\startbuffer[demo]
-\startsubsubject[title={oeps}]
-
-\startMPcode
- draw fullcircle
- scaled 2cm
- withpen pencircle scaled 1mm
- withcolor .5green;
- draw textext (
- lua (
- "local function f(s) return string.upper(s) end mp.quoted(f('foo'))"
- )
- ) withcolor .5red ;
-\stopMPcode
-
-\startluacode
- context("foo")
-\stopluacode
-
-\stopsubsubject
-\stopbuffer
-
-\starttext
-
-% \scitefile[../lexers/scite-context-lexer.lua] \page
-% \scitefile[t:/manuals/about/about-metafun.tex] \page
-% \scitefile[t:/sources/strc-sec.mkiv] \page
-% \scitefile[e:/tmp/mp.w] \page
-% \scitefile[t:/manuals/hybrid/tugboat.bib] \page
-\scitefile[e:/tmp/test.bib] \page
-
-% \getbuffer[demo] \scitebuffer[demo]
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-spreadsheet.lua b/Master/texmf-dist/tex/context/base/m-spreadsheet.lua
deleted file mode 100644
index 1b3c5cb34f5..00000000000
--- a/Master/texmf-dist/tex/context/base/m-spreadsheet.lua
+++ /dev/null
@@ -1,332 +0,0 @@
-if not modules then modules = { } end modules ['m-spreadsheet'] = {
- version = 1.001,
- comment = "companion to m-spreadsheet.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local byte, format, gsub, find = string.byte, string.format, string.gsub, string.find
-local R, P, S, C, V, Cs, Cc, Ct, Cg, Cf, Carg = lpeg.R, lpeg.P, lpeg.S, lpeg.C, lpeg.V, lpeg.Cs, lpeg.Cc, lpeg.Ct, lpeg.Cg, lpeg.Cf, lpeg.Carg
-local lpegmatch, patterns = lpeg.match, lpeg.patterns
-local setmetatable, loadstring, next, tostring, tonumber,rawget = setmetatable, loadstring, next, tostring, tonumber, rawget
-local formatters = string.formatters
-
-local context = context
-
-local splitthousands = utilities.parsers.splitthousands
-local variables = interfaces.variables
-
-local v_yes = variables.yes
-
-moduledata = moduledata or { }
-
-local spreadsheets = { }
-moduledata.spreadsheets = spreadsheets
-
-local data = {
- -- nothing yet
-}
-
-local settings = {
- period = ".",
- comma = ",",
-}
-
-spreadsheets.data = data
-spreadsheets.settings = settings
-
-local defaultname = "default"
-local stack = { }
-local current = defaultname
-
-local d_mt ; d_mt = {
- __index = function(t,k)
- local v = { }
- setmetatable(v,d_mt)
- t[k] = v
- return v
- end,
-}
-
-local s_mt ; s_mt = {
- __index = function(t,k)
- local v = settings[k]
- t[k] = v
- return v
- end,
-}
-
-function spreadsheets.setup(t)
- for k, v in next, t do
- settings[k] = v
- end
-end
-
-local function emptydata(name,settings)
- local data = { }
- local specifications = { }
- local settings = settings or { }
- setmetatable(data,d_mt)
- setmetatable(specifications,d_mt)
- setmetatable(settings,s_mt)
- return {
- name = name,
- data = data,
- maxcol = 0,
- maxrow = 0,
- settings = settings,
- temp = { }, -- for local usage
- specifications = specifications,
- }
-end
-
-function spreadsheets.reset(name)
- if not name or name == "" then name = defaultname end
- data[name] = emptydata(name,data[name] and data[name].settings)
-end
-
-function spreadsheets.start(name,s)
- if not name or name == "" then
- name = defaultname
- end
- if not s then
- s = { }
- end
- table.insert(stack,current)
- current = name
- if data[current] then
- setmetatable(s,s_mt)
- data[current].settings = s
- else
- data[current] = emptydata(name,s)
- end
-end
-
-function spreadsheets.stop()
- current = table.remove(stack)
-end
-
-spreadsheets.reset()
-
-local offset = byte("A") - 1
-
-local function assign(s,n)
- return formatters["moduledata.spreadsheets.data['%s'].data[%s]"](n,byte(s)-offset)
-end
-
-function datacell(a,b,...)
- local n = 0
- if b then
- local t = { a, b, ... }
- for i=1,#t do
- n = n * (i-1) * 26 + byte(t[i]) - offset
- end
- else
- n = byte(a) - offset
- end
- return formatters["dat[%s]"](n)
-end
-
-local function checktemplate(s)
- if find(s,"%",1,true) then
- -- normal template
- return s
- elseif find(s,"@",1,true) then
- -- tex specific template
- return gsub(s,"@","%%")
- else
- -- tex specific quick template
- return "%" .. s
- end
-end
-
-local quoted = Cs(patterns.unquoted)
-local spaces = patterns.whitespace^0
-local cell = C(R("AZ"))^1 / datacell * (Cc("[") * (R("09")^1) * Cc("]") + #P(1))
-
--- A nasty aspect of lpeg: Cf ( spaces * Cc("") * { "start" ... this will create a table that will
--- be reused, so we accumulate!
-
-local pattern = Cf ( spaces * Ct("") * { "start",
- start = V("value") + V("set") + V("format") + V("string") + V("code"),
- value = Cg(P([[=]]) * spaces * Cc("kind") * Cc("value")) * V("code"),
- set = Cg(P([[!]]) * spaces * Cc("kind") * Cc("set")) * V("code"),
- format = Cg(P([[@]]) * spaces * Cc("kind") * Cc("format")) * spaces * Cg(Cc("template") * Cs(quoted/checktemplate)) * V("code"),
- string = Cg(#S([["']]) * Cc("kind") * Cc("string")) * Cg(Cc("content") * quoted),
- code = spaces * Cg(Cc("code") * Cs((cell + P(1))^0)),
-}, rawset)
-
-local functions = { }
-spreadsheets.functions = functions
-
-function functions._s_(row,col,c,f,t)
- local r = 0
- if f and t then -- f..t
- -- ok
- elseif f then -- 1..f
- f, t = 1, f
- else
- f, t = 1, row - 1
- end
- for i=f,t do
- local ci = c[i]
- if type(ci) == "number" then
- r = r + ci
- end
- end
- return r
-end
-
-functions.fmt = string.tformat
-
-local f_code = formatters [ [[
- local _m_ = moduledata.spreadsheets
- local dat = _m_.data['%s'].data
- local tmp = _m_.temp
- local fnc = _m_.functions
- local row = %s
- local col = %s
- function fnc.sum(...) return fnc._s_(row,col,...) end
- local sum = fnc.sum
- local fmt = fnc.fmt
- return %s
-]] ]
-
--- to be considered: a weak cache
-
-local function propername(name)
- if name ~= "" then
- return name
- elseif current ~= "" then
- return current
- else
- return defaultname
- end
-end
-
--- if name == "" then name = current if name == "" then name = defaultname end end
-
-local function execute(name,r,c,str)
- if str ~= "" then
- local d = data[name]
- if c > d.maxcol then
- d.maxcol = c
- end
- if r > d.maxrow then
- d.maxrow = r
- end
- local specification = lpegmatch(pattern,str,1,name)
- d.specifications[c][r] = specification
- local kind = specification.kind
- if kind == "string" then
- return specification.content or ""
- else
- local code = specification.code
- if code and code ~= "" then
- code = f_code(name,r,c,code or "")
- local result = loadstring(code) -- utilities.lua.strippedloadstring(code,true) -- when tracing
- result = result and result()
- if type(result) == "function" then
- result = result()
- end
- if type(result) == "number" then
- d.data[c][r] = result
- end
- if not result then
- -- nothing
- elseif kind == "set" then
- -- no return
- elseif kind == "format" then
- return formatters[specification.template](result)
- else
- return result
- end
- end
- end
- end
-end
-
-function spreadsheets.set(name,r,c,str)
- name = propername(name)
- execute(name,r,c,str)
-end
-
-function spreadsheets.get(name,r,c,str)
- name = propername(name)
- local dname = data[name]
- if not dname then
- -- nothing
- elseif not str or str == "" then
- context(dname.data[c][r] or 0)
- else
- local result = execute(name,r,c,str)
- if result then
--- if type(result) == "number" then
--- dname.data[c][r] = result
--- result = tostring(result)
--- end
- local settings = dname.settings
- local split = settings.split
- local period = settings.period
- local comma = settings.comma
- if split == v_yes then
- result = splitthousands(result)
- end
- if period == "" then period = nil end
- if comma == "" then comma = nil end
- result = gsub(result,".",{ ["."] = period, [","] = comma })
- context(result)
- end
- end
-end
-
-function spreadsheets.doifelsecell(name,r,c)
- name = propername(name)
- local d = data[name]
- local d = d and d.data
- local r = d and rawget(d,r)
- local c = r and rawget(r,c)
- commands.doifelse(c)
-end
-
-local function simplify(name)
- name = propername(name)
- local data = data[name]
- if data then
- data = data.data
- local temp = { }
- for k, v in next, data do
- local t = { }
- temp[k] = t
- for kk, vv in next, v do
- if type(vv) == "function" then
- t[kk] = "<function>"
- else
- t[kk] = vv
- end
- end
- end
- return temp
- end
-end
-
-local function serialize(name)
- local s = simplify(name)
- if s then
- return table.serialize(s,name)
- else
- return formatters["<unknown spreadsheet %a>"](name)
- end
-end
-
-spreadsheets.simplify = simplify
-spreadsheets.serialize = serialize
-
-function spreadsheets.inspect(name)
- inspect(serialize(name))
-end
-
-function spreadsheets.tocontext(name)
- context.tocontext(simplify(name))
-end
diff --git a/Master/texmf-dist/tex/context/base/m-spreadsheet.mkiv b/Master/texmf-dist/tex/context/base/m-spreadsheet.mkiv
deleted file mode 100644
index 914a2b57a9e..00000000000
--- a/Master/texmf-dist/tex/context/base/m-spreadsheet.mkiv
+++ /dev/null
@@ -1,221 +0,0 @@
-%D \module
-%D [ file=m-spreadsheet,
-%D version=2011.02.21,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=Spreadsheets,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D This is an experimental follow up on discussion on the mailing list.
-
-\registerctxluafile{m-spreadsheet}{1.001}
-
-\unprotect
-
-% todo: get(...) set(..) ctx(...)
-
-\installcorenamespace{spreadsheet}
-
-\installcommandhandler \??spreadsheet {spreadsheet} \??spreadsheet
-
-\appendtoks
- \ctxlua{moduledata.spreadsheets.setup{ % global !
- period = \!!bs\spreadsheetparameter\c!period\!!es,
- comma = \!!bs\spreadsheetparameter\c!comma\!!es,
- split = \!!bs\spreadsheetparameter\c!split\!!es,
- }}%
-\to \everysetupspreadsheet
-
-\setupspreadsheet
- [%\c!comma=,
- %\c!period=,
- \c!split=\v!no]
-
-\unexpanded\def\resetspreadsheet
- {\dosingleempty\module_spreadsheet_reset}
-
-\unexpanded\def\module_spreadsheet_reset[#1]%
- {\ctxlua{moduledata.spreadsheets.reset("#1")}}
-
-\unexpanded\def\startspreadsheet
- {\dosingleempty\module_spreadsheet_start}
-
-\unexpanded\def\module_spreadsheet_start[#1]%
- {\pushmacro\currentspreadsheet
- \edef\currentspreadsheet{#1}%
- \checkspreadsheetparent
- \edef\m_spreadsheet_period{\spreadsheetparameter\c!period}%
- \edef\m_spreadsheet_comma {\spreadsheetparameter\c!comma}%
- \ctxlua{moduledata.spreadsheets.start("#1", {
- period = \!!bs\detokenize\expandafter{\m_spreadsheet_period}\!!es,
- comma = \!!bs\detokenize\expandafter{\m_spreadsheet_comma}\!!es,
- split = \!!bs\spreadsheetparameter\c!split\!!es,
- })}}
-
-\unexpanded\def\stopspreadsheet
- {\ctxlua{moduledata.spreadsheets.stop()}%
- \popmacro\currentspreadsheet}
-
-\unexpanded\def\showspreadsheet
- {\dosingleempty\module_spreadsheet_show}
-
-\unexpanded\def\module_spreadsheet_show[#1]%
- {\ctxlua{moduledata.spreadsheets.tocontext("#1")}}
-
-\unexpanded\def\inspectspreadsheet
- {\dosingleempty\module_spreadsheet_inspect}
-
-\unexpanded\def\module_spreadsheet_inspect[#1]%
- {\ctxlua{moduledata.spreadsheets.inspect("#1")}}
-
-\unexpanded\def\setspreadsheet
- {\dosingleempty\module_spreadsheet_set}
-
-\unexpanded\def\module_spreadsheet_set[#1]#2#3#4%
- {\ctxlua{moduledata.spreadsheets.set("#1",\number#2,\number#3,"#4")}}
-
-\unexpanded\def\getspreadsheet
- {\dosingleempty\module_spreadsheet_get}
-
-\unexpanded\def\module_spreadsheet_get[#1]#2#3#4%
- {\ctxlua{moduledata.spreadsheets.get("#1",\number#2,\number#3,"#4")}}
-
-\unexpanded\def\doifelsespreadsheetcell
- {\dosingleempty\module_spreadsheet_doifelse_cell}
-
-\let\doifspreadsheetcellelse\doifelsespreadsheetcell
-
-\unexpanded\def\module_spreadsheet_doifelse_cell[#1]#2#3%
- {\ctxlua{moduledata.spreadsheets.doifelsecell("#1",\number#2,\number#3)}}
-
-\ifdefined\tblrow
-
- \def\TABLEsetspreadsheet#1{\ctxlua{moduledata.spreadsheets.set("",\number\tblrow+1,\number\tblcol,\!!bs#1\!!es)}}
- \def\TABLEgetspreadsheet#1{\ctxlua{moduledata.spreadsheets.get("",\number\tblrow+1,\number\tblcol,\!!bs#1\!!es)}}
-
-\else
-
- \def\TABLEsetspreadsheet#1{\ctxlua{moduledata.spreadsheets.set("",\number\c_tabl_ntb_row+1,\number\c_tabl_ntb_col,\!!bs#1\!!es)}}
- \def\TABLEgetspreadsheet#1{\ctxlua{moduledata.spreadsheets.get("",\number\c_tabl_ntb_row+1,\number\c_tabl_ntb_col,\!!bs#1\!!es)}}
-
-\fi
-
-\appendtoks
- \module_spreadsheet_reset[\currentspreadsheet]%
- \let\setspr\TABLEsetspreadsheet
- \let\getspr\TABLEgetspreadsheet
-\to \everyTABLEpass
-
-\unexpanded\def\startspreadsheettable % quick and dirty
- {\dodoubleempty\module_spreadsheet_start_table}
-
-\unexpanded\def\module_spreadsheet_start_table[#1][#2]%
- {\bgroup
- \let\startrow \module_spreadsheet_row_start
- \let\stoprow \module_spreadsheet_row_stop
- \let\startcell\module_spreadsheet_cell_start
- \let\stopcell \module_spreadsheet_cell_stop
- \doifelseassignment{#1}
- {\module_spreadsheet_start
- \directsetup{spreadsheet:before:\currentspreadsheet}%
- \bTABLE[\c!align=\v!flushright,#1]}
- {\module_spreadsheet_start[#1]%
- \directsetup{spreadsheet:before:\currentspreadsheet}%
- \bTABLE[\c!align=\v!flushright,#2]}}
-
-\unexpanded\def\stopspreadsheettable
- {\eTABLE
- \directsetup{spreadsheet:after:\currentspreadsheet}%
- \stopspreadsheet
- \egroup}
-
-\unexpanded\def\module_spreadsheet_row_start{\bTR}
-\unexpanded\def\module_spreadsheet_row_stop {\eTR}
-
-\unexpanded\def\module_spreadsheet_cell_start
- {\doifelsenextoptional\module_spreadsheet_cell_start_yes\module_spreadsheet_cell_start_nop}
-
-\unexpanded\def\module_spreadsheet_cell_start_yes[#1]#2\stopcell
- {\bTD[#1]\getspr{#2}\eTD}
-
-\unexpanded\def\module_spreadsheet_cell_start_nop#1\stopcell
- {\bTD\getspr{#1}\eTD}
-
-\let\module_spreadsheet_cell_stop\relax
-
-\protect
-
-\continueifinputfile{m-spreadsheet.mkiv}
-
-\starttext
-
-\bTABLE[align=middle]
- \bTR
- \bTD \getspr{100} \eTD \bTD test \setspr{30} \eTD
- \eTR
- \bTR
- \bTD \getspr{20} \eTD \bTD \getspr{4+3} \eTD
- \eTR
- \bTR
- \bTD \getspr{A[1] + A[2]} \eTD
- \bTD \getspr{B1 + B2} \eTD
- \eTR
- \bTR
- \bTD[nx=2] \bf \getspr{(A[3] + B[3]) /100} \eTD
- \eTR
- \bTR
- \bTD[nx=2] \bf \getspr{string.format("\letterpercent0.3f",(A[3] + B[3]) /100)} \eTD
- \eTR
- \bTR
- \bTD[nx=2] \bf \getspr{fmt("@0.3f",(sum(A,1,2)) / 10)} \eTD
- \eTR
-\eTABLE
-
-\setupspreadsheet[mysheet]
-
-\startspreadsheet[mysheet]
-
-\bTABLE[align=middle]
- \bTR
- \bTD \getspr{100} \eTD \bTD test \setspr{30} \eTD
- \eTR
- \bTR
- \bTD \getspr{20} \eTD \bTD \getspr{4+3.5} \eTD
- \eTR
- \bTR
- \bTD \getspr{A[1] + A[2]} \eTD
- \bTD \getspr{B[1] + B[2]} \eTD
- \eTR
- \bTR
- \bTD[nx=2] \bf \getspr{A[3] + B[3]} \eTD
- \eTR
-\eTABLE
-
-\stopspreadsheet
-
-\blank
-
-\setupspreadsheet[test][period={{\bf\middlered .}},comma={{\bf\middlegreen ,}},split=yes]
-
-\startspreadsheettable[test]
- \startrow
- \startcell 123456.78 \stopcell
- \startcell 1234567.89 \stopcell
- \startcell A[1] + B[1] \stopcell
- \stoprow
-\stopspreadsheettable
-
-\blank
-
-% \showspreadsheet
-% \showspreadsheet[mysheet]
-
-\doifelsespreadsheetcell[mysheet]{1}{2}{YES}{NOP}
-\doifelsespreadsheetcell[myshoot]{1}{2}{YES}{NOP}
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-sql.mkiv b/Master/texmf-dist/tex/context/base/m-sql.mkiv
deleted file mode 100644
index 60cbdd1be3b..00000000000
--- a/Master/texmf-dist/tex/context/base/m-sql.mkiv
+++ /dev/null
@@ -1,17 +0,0 @@
-%D \module
-%D [ file=m-sql,
-%D version=2012.07.12,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=SQL,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\registerctxluafile{util-tpl}{}
-\registerctxluafile{util-sql}{}
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/m-steps.lua b/Master/texmf-dist/tex/context/base/m-steps.lua
deleted file mode 100644
index 8eb4815506e..00000000000
--- a/Master/texmf-dist/tex/context/base/m-steps.lua
+++ /dev/null
@@ -1,226 +0,0 @@
-if not modules then modules = { } end modules ['x-flow'] = {
- version = 1.001,
- comment = "companion to m-flow.mkvi",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
--- when we can resolve mpcolor at the lua end we will use metapost.graphic(....) directly
-
-moduledata.steps = moduledata.steps or { }
-
-local variables = interfaces.variables
-
-local trace_charts = false
-
-local defaults = {
- chart = {
- dx = 10*65436,
- dy = 10*65436,
- },
- cell = {
- alternative = 1,
- offset = 2*65436,
- rulethickness = 65436,
- framecolor = "blue",
- backgroundcolor = "gray",
- },
- text = {
- alternative = 1,
- offset = 2*65436,
- distance = 4*65436,
- rulethickness = 65436,
- framecolor = "red",
- backgroundcolor = "gray",
- },
- line = {
- alternative = 1,
- rulethickness = 65436,
- height = 30*65436,
- distance = 10*65436,
- offset = 5*65436,
- color = "green",
- },
-}
-
--- todo : name (no name then direct)
--- maybe: includes
--- maybe: flush ranges
-
-local charts = { }
-local steps = { }
-
-function commands.step_start_chart(name)
- name = name or ""
- steps = { }
- charts[name] = {
- steps = steps,
- }
-end
-
-function commands.step_stop_chart()
-end
-
-function commands.step_make_chart(settings)
- local chartsettings = settings.chart
- if not chartsettings then
- print("no chart")
- return
- end
- local chartname = chartsettings.name
- if not chartname then
- print("no name given")
- return
- end
- local chart = charts[chartname]
- if not chart then
- print("no such chart",chartname)
- return
- end
- local steps = chart.steps or { }
- --
- table.setmetatableindex(settings,defaults)
- --
- if trace_charts then
- inspect(steps)
- end
- --
- local textsettings = settings.text
- local cellsettings = settings.cell
- local linesettings = settings.line
- --
- context.startMPcode()
- context("if unknown context_cell : input mp-step.mpiv ; fi ;")
- context("step_begin_chart ;")
- --
- if chartsettings.alternative == variables.vertical then
- context("chart_vertical := true ;")
- end
- --
- context("text_line_color := \\MPcolor{%s} ;", textsettings.framecolor)
- context("text_line_width := %p ;", textsettings.rulethickness)
- context("text_fill_color := \\MPcolor{%s} ;", textsettings.backgroundcolor)
- context("text_offset := %p ;", textsettings.offset)
- context("text_distance_set := %p ;", textsettings.distance)
- --
- context("cell_line_color := \\MPcolor{%s} ;", cellsettings.framecolor)
- context("cell_line_width := %p ;", cellsettings.rulethickness)
- context("cell_fill_color := \\MPcolor{%s} ;", cellsettings.backgroundcolor)
- context("cell_offset := %p ;", cellsettings.offset)
- context("cell_distance_x := %p ;", cellsettings.dx)
- context("cell_distance_y := %p ;", cellsettings.dy)
- --
- context("line_line_color := \\MPcolor{%s} ;", linesettings.color)
- context("line_line_width := %p ;", linesettings.rulethickness)
- context("line_distance := %p ;", linesettings.distance)
- context("line_offset := %p ;", linesettings.offset)
- --
- for i=1,#steps do
- local step = steps[i]
- context("step_begin_cell ;")
- if step.cell_top ~= "" then
- context('step_cell_top("%s") ;',string.strip(step.cell_top))
- end
- if step.cell_bot ~= "" then
- context('step_cell_bot("%s") ;',string.strip(step.cell_bot))
- end
- if step.text_top ~= "" then
- context('step_text_top("%s") ;',string.strip(step.text_top))
- end
- if step.text_mid ~= "" then
- context('step_text_mid("%s") ;',string.strip(step.text_mid))
- end
- if step.text_bot ~= "" then
- context('step_text_bot("%s") ;',string.strip(step.text_bot))
- end
- context("step_end_cell ;")
- end
- --
- context("step_end_chart ;")
- context.stopMPcode()
-end
-
-function commands.step_cells(top,bot)
- steps[#steps+1] = {
- cell_top = top or "",
- cell_bot = bot or "",
- text_top = "",
- text_mid = "",
- text_bot = "",
- }
-end
-
-function commands.step_texts(top,bot)
- if #steps > 0 then
- steps[#steps].text_top = top or ""
- steps[#steps].text_bot = bot or ""
- end
-end
-
-function commands.step_cell(top)
- steps[#steps+1] = {
- cell_top = top or "",
- cell_bot = "",
- text_top = "",
- text_mid = "",
- text_bot = "",
- }
-end
-
-function commands.step_text(top)
- if #steps > 0 then
- steps[#steps].text_top = top or ""
- end
-end
-
-function commands.step_textset(left,middle,right)
- if #steps > 0 then
- steps[#steps].text_top = left or ""
- steps[#steps].text_mid = middle or ""
- steps[#steps].text_bot = right or ""
- end
-end
-
-function commands.step_start_cell()
- steps[#steps+1] = {
- cell_top = "",
- cell_bot = "",
- text_top = "",
- text_mid = "",
- text_bot = "",
- }
-end
-
-function commands.step_stop_cell()
-end
-
-function commands.step_text_top(str)
- if #steps > 0 then
- steps[#steps].text_top = str or ""
- end
-end
-
-function commands.step_text_mid(str)
- if #steps > 0 then
- steps[#steps].text_mid = str or ""
- end
-end
-
-function commands.step_text_bot(str)
- if #steps > 0 then
- steps[#steps].text_bot = str or ""
- end
-end
-
-function commands.step_cell_top(str)
- if #steps > 0 then
- steps[#steps].cell_top = str or ""
- end
-end
-
-function commands.step_cell_bot(str)
- if #steps > 0 then
- steps[#steps].cell_bot = str or ""
- end
-end
diff --git a/Master/texmf-dist/tex/context/base/m-steps.mkii b/Master/texmf-dist/tex/context/base/m-steps.mkii
deleted file mode 100644
index e6bd45548c3..00000000000
--- a/Master/texmf-dist/tex/context/base/m-steps.mkii
+++ /dev/null
@@ -1,837 +0,0 @@
-%D \module
-%D [ file=m-steps,
-%D version=2001.05.28,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Step Charts \& Tables,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D When I need this module, I will reimplement it by using the new
-%D sometxt macro. Anyhow, it reflects the state of 2001.
-
-\unprotect
-
-% temp hack :
-
-% \ifx\v!kleinkorps\undefined \let\v!kleinkorps\setsmallbodyfont \fi
-
-% end of hack
-
-\definecolor [STEPlinecolor] [s=.5]
-\definecolor [STEPframecolor] [s=.7]
-\definecolor [STEPbackgroundcolor] [s=.9]
-
-\def\@@STPF{@@STPF} % frames
-
-\def\@@STPC{@@STPC} % charts
-\def\@@STPT{@@STPT} % tables
-
-\def\@@STEC{@@STEC} % cells
-\def\@@STET{@@STET} % tables
-\def\@@STEL{@@STEL} % lines
-
-\def\setupSTEPcharts{\dodoubleargument\getparameters[\@@STPC]}
-\def\setupSTEPtables{\dodoubleargument\getparameters[\@@STPT]}
-\def\setupSTEPcells {\dodoubleargument\getparameters[\@@STEC]}
-\def\setupSTEPtexts {\dodoubleargument\getparameters[\@@STET]}
-\def\setupSTEPlines {\dodoubleargument\getparameters[\@@STEL]}
-
-\setupSTEPcharts
- [\c!before=\blank,
- \c!after=\blank,
- %\c!distance=.25em, % nvt
- \c!hoffset=1em,
- \c!voffset=1ex,
- \c!method=1,
- \c!height=2ex,
- \c!offset=.15\bodyfontsize]
-
-\setupSTEPtables
- [\c!before=\blank,
- \c!after=\blank,
- \c!distance=.25em,
- %\c!hoffset=1em, % nvt
- \c!voffset=1ex,
- \c!method=1,
- \c!width=4em,
- \c!offset=.15\bodyfontsize]
-
-\setupSTEPcells
- [\c!alternative=24,
- \c!background=\v!color,
- \c!backgroundcolor=STEPbackgroundcolor,
- \c!rulethickness=.1\bodyfontsize,
- \c!framecolor=STEPframecolor,
- \c!offset=.25\bodyfontsize,
- \c!style=,
- \c!color=]
-
-\setupSTEPtexts
- [\c!alternative=24,
- \c!background=\v!color,
- \c!backgroundcolor=STEPbackgroundcolor,
- \c!rulethickness=.1\bodyfontsize,
- \c!framecolor=STEPframecolor,
- \c!offset=.25\bodyfontsize,
- \c!style=\v!smallbodyfont,
- \c!color=]
-
-\setupSTEPlines
- [\c!alternative=1,
- \c!rulethickness=.15\bodyfontsize,
- \c!color=STEPlinecolor]
-
-\def\initializeSTEP
- {\initializeSTET \initializeSTEC \initializeSTEL}
-
-\def\initializeSTPC
- {\freezedimenmacro\@@STPCoffset
- \startMPdrawing
- line_v_offset := \@@STPCoffset ;
- line_method := \@@STPCmethod ; % only charts
- \stopMPdrawing}
-
-\def\initializeSTPT
- {\freezedimenmacro\@@STPToffset
- \startMPdrawing
- line_h_offset := \@@STPToffset ;
- line_method := \@@STPTmethod ; % only charts
- \stopMPdrawing}
-
-\def\initializeSTET
- {\freezedimenmacro\@@STETrulethickness
- \freezedimenmacro\@@STEToffset}
-
-\def\initializeSTEC
- {\freezedimenmacro\@@STECrulethickness
- \freezedimenmacro\@@STECoffset}
-
-\def\initializeSTEL
- {\freezedimenmacro\@@STELrulethickness}
-
-%D ...
-
-\presetlocalframed[\@@STPF]
-
-\def\@@stepcell#1%
- {\doattributes\@@STEC\c!style\c!color
- {\localframed
- [\@@STPF][\c!offset=\@@STECoffset,\c!frame=\v!off]
- {\ignorespaces#1\unskip}}}
-
-\def\@@stepfake#1%
- {\doattributes\@@STEC\c!style\c!color
- {\ignorespaces#1\unskip}}
-
-\def\@@steptext#1%
- {\doattributes\@@STET\c!style\c!color
- {\localframed
- [\@@STPF][\c!offset=\@@STEToffset,\c!frame=\v!off]
- {\ignorespaces#1\unskip}}}
-
-%D The first attempt was purely \METAPOST\ based and spawned
-%D the typesetting to the \METAFUN\ handler. This method
-%D collects the cells, and directly passes them on to
-%D \METAPOST. This method is the cleanest, but has the
-%D disadvantage that one cannot embed hyperlinks or document
-%D dependent definitions in the cells. The implementation
-%D roughly looks as follows:
-%D
-%D \starttyping
-%D \def\startSTEPchart%
-%D {\bgroup
-%D \startMPdrawing
-%D input mp-step.mpii ; begin_step_chart ;
-%D \stopMPdrawing
-%D \initializeSTEP
-%D \let\cells\stepchartcells \def\cell{\cells{}}%
-%D \let\texts\stepcharttexts \def\text{\texts{}}}
-%D
-%D \def\stepchartcells#1#2%
-%D {\setMPtext{tdummy}{\strut\ignorespaces#1\unskip}% beter etex/btex
-%D \setMPtext{bdummy}{\strut\ignorespaces#2\unskip}% beter etex/btex
-%D \startMPdrawing
-%D set_step_chart_cells(\MPstring{tdummy},\MPstring{bdummy}) ;
-%D \stopMPdrawing}
-%D
-%D \def\stepcharttexts#1#2%
-%D {\setMPtext{tdummy}{\strut\ignorespaces#1\unskip}% beter etex/btex
-%D \setMPtext{bdummy}{\strut\ignorespaces#2\unskip}% beter etex/btex
-%D \startMPdrawing
-%D set_step_chart_texts(\MPstring{tdummy},\MPstring{bdummy}) ;
-%D \stopMPdrawing}
-%D
-%D \def\stopSTEPchart
-%D {\startMPdrawing
-%D end_step_chart ;
-%D \stopMPdrawing
-%D \MPdrawingdonetrue
-%D \getMPdrawing
-%D \resetMPdrawing
-%D \egroup}
-%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
-%D passes: one to build the table, another to synchronize the
-%D positions, and a third one beause the dimensions may have
-%D changed. The last pass is a result from the fact that
-%D positions are related to the page.
-%D
-%D The second attempt was based on tabulations and used the
-%D build in position tracking mechanism, which uses two
-%D position nodes per cell.
-%D
-%D This method collects the content in token list registers
-%D and build a table from them. In the collecting pass, the
-%D graphics are build stepwise. We need to collect because the
-%D order of definitions is not the same as the order of
-%D typesetting. We show this alternative too because it
-%D demonstrates how to apply backgrounds to table cells.
-%D
-%D \starttyping
-%D \newtoks\stepsonetop \newtoks\stepstwotop
-%D \newtoks\stepsonebot \newtoks\stepstwobot
-%D \stoptyping
-%D
-%D During the collecting phase, we temporarily have to
-%D increment the name space counter.
-%D
-%D \starttyping
-%D \def\startSTEPchart%
-%D {\bgroup
-%D \resetMPdrawing
-%D \advance\noftabpositions\plusone % begin of preroll
-%D \startMPdrawing
-%D input mp-step.mpii ;
-%D begin_step_chart ;
-%D \stopMPdrawing
-%D \initializeSTEP
-%D \newcounter\cellcounter
-%D \stepsonetop\emptytoks \chardef\somesteponetop=1
-%D \stepsonebot\emptytoks \chardef\somesteponebot=1
-%D \stepstwotop\emptytoks \chardef\somesteptwotop=1
-%D \stepstwobot\emptytoks \chardef\somesteptwobot=1
-%D \let\cells\stepchartcells \def\cell{\cells{}}%
-%D \let\texts\stepcharttexts \def\text{\texts{}}}
-%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.
-%D
-%D Watch how we anchor the graphic to the main table box. This
-%D is needed since the graphic may be larger than the table
-%D itself. Actually, these small point took me the most time to
-%D digest, even with the right tools (anchors) already in
-%D place.
-%D
-%D \starttyping
-%D \def\stopSTEPchart
-%D {\splittabulatefalse
-%D \insidefloattrue
-%D \startMPdrawing
-%D nofcells := \cellcounter ;
-%D end_step_chart ;
-%D anchor_box(\MPpos{\tbPOSprefix origin}) ;
-%D \stopMPdrawing
-%D \MPdrawingdonetrue
-%D \advance\noftabpositions\minusone % end of preroll
-%D \setbox0=\vbox
-%D {\getMPdrawing}
-%D \resetMPdrawing
-%D \increment(\cellcounter,\cellcounter)\decrement\cellcounter
-%D \setbox2=\vbox
-%D {\definetabulate[chart][|*{\cellcounter}{ck0|}] % k0 nills space
-%D \startchart
-%D \ifcase\somesteptwotop \the\stepstwotop \NC \NR \noalign{\kern2ex} \fi
-%D \ifcase\somesteponetop \the\stepsonetop \NC \NR \noalign{\kern2ex} \fi
-%D \ifcase\somesteponebot \the\stepsonebot \NC \NR \noalign{\kern2ex} \fi
-%D \ifcase\somesteptwobot \the\stepstwobot \NC \NR \noalign{\kern2ex} \fi
-%D \noalign{\kern-2ex}%
-%D \stopchart}
-%D \hbox
-%D {\scratchdimen\wd0
-%D \advance\scratchdimen \MPllx bp
-%D \raise\MPlly bp\box0
-%D \hskip-\scratchdimen
-%D \hpos{\tbPOSprefix origin}{\box2}}
-%D \egroup}
-%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 \starttyping
-%D \newcounter\cellcounter
-%D \newcounter\textcounter
-%D
-%D \def\stepchartcells#1#2%
-%D {\doloop
-%D {\ifnum\cellcounter>\textcounter
-%D \stepcharttexts{}{}%
-%D \else
-%D \exitloop
-%D \fi}%
-%D \increment\cellcounter
-%D \doifelsenothing{#1}
-%D {\startMPdrawing
-%D cells[t][\cellcounter] := origin ;
-%D \stopMPdrawing
-%D \appendtoks\NC\NC\to\stepsonetop}
-%D {\chardef\somesteponetop=0
-%D \edef\stepidentifier{\cellcounter-t-c}%
-%D \startMPdrawing
-%D initialize_area(\MPpos{b:\tbPOSprefix\stepidentifier},
-%D \MPpos{e:\tbPOSprefix\stepidentifier}) ;
-%D cells[t][\cellcounter] := pxy ;
-%D \stopMPdrawing
-%D \@EA\appendtoks\@EA\stepidentifierposition\@EA{\stepidentifier}#1\NC\to\stepsonetop}%
-%D \doifelsenothing{#2}
-%D {\startMPdrawing
-%D cells[b][\cellcounter] := origin ;
-%D \stopMPdrawing
-%D \appendtoks\NC\NC\to\stepsonebot}
-%D {\chardef\somesteponebot=0
-%D \edef\stepidentifier{\cellcounter-b-c}%
-%D \startMPdrawing
-%D initialize_area(\MPpos{b:\tbPOSprefix\stepidentifier},
-%D \MPpos{e:\tbPOSprefix\stepidentifier}) ;
-%D cells[b][\cellcounter] := pxy ;
-%D \stopMPdrawing
-%D \@EA\appendtoks\@EA\stepidentifierposition\@EA{\stepidentifier}#2\NC\to\stepsonebot}}
-%D
-%D \def\stepcharttexts#1#2% \cellcounter = nofcells
-%D {\increment\textcounter
-%D \doifelsenothing{#1}
-%D {\startMPdrawing
-%D texts[t][\cellcounter][\textcounter] := origin ;
-%D \stopMPdrawing
-%D \appendtoks\NC\NC\to\stepstwotop}
-%D {\chardef\somesteptwotop=0
-%D \edef\stepidentifier{\cellcounter-\textcounter-t-t}%
-%D \startMPdrawing
-%D initialize_area(\MPpos{b:\tbPOSprefix\stepidentifier},
-%D \MPpos{e:\tbPOSprefix\stepidentifier}) ;
-%D texts[t][\cellcounter][\textcounter] := pxy ;
-%D \stopMPdrawing
-%D \@EA\appendtoks\@EA\NC\@EA\textcellposition\@EA{\stepidentifier}#1\to\stepstwotop}%
-%D \doifelsenothing{#2}
-%D {\startMPdrawing
-%D texts[b][\cellcounter][\textcounter] := origin ;
-%D \stopMPdrawing
-%D \appendtoks\NC\NC\to\stepstwobot}
-%D {\chardef\somesteptwobot=0
-%D \edef\stepidentifier{\cellcounter-\textcounter-b-t}%
-%D \startMPdrawing
-%D initialize_area(\MPpos{b:\tbPOSprefix\stepidentifier},
-%D \MPpos{e:\tbPOSprefix\stepidentifier}) ;
-%D texts[b][\cellcounter][\textcounter] := pxy ;
-%D \stopMPdrawing
-%D \@EA\appendtoks\@EA\NC\@EA\textcellposition\@EA{\stepidentifier}#2\to\stepstwobot}}
-%D \stoptyping
-%D
-%D Here are the hooks that take care of calculating the cell
-%D dimensions.
-%D
-%D \starttyping
-%D \def\textcellposition#1{\GSC[#1:text]}
-%D \def\stepidentifierposition#1{\GSC[#1:step]}
-%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
-%D current mechanism.
-%D
-%D Since this method was not that efficient, a third one was
-%D implemented, which used one position per cell. So,
-%D
-%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,
-%D which are not defined in the order they show up. This
-%D solution uses multiple passes over the definitions. First
-%D the cells and texts are processed and the associated
-%D graphics are defined in the \METAPOST\ file. Next the
-%D lines are flushed. We need to do that in a second pass,
-%D because in order to determine the nature of the line,
-%D \METAPOST\ needs to know if the start and end cells exist.
-%D This need comes from the fact that we store the shapes
-%D and lines kind of directly with their associated colors and
-%D types, so that we can change the settings in between. So,
-%D changing for instance the line color, can take place
-%D locally.
-
-\newbox\stepboxone \newbox\stepboxtwo
-\newbox\textboxone \newbox\textboxtwo
-
-%D We need to define a dedicated name space counter.
-
-\newcounter\currentstepchart
-
-\def\stepchartprefix{@sc@-\currentstepchart-}
-
-%D Next we define the initialization part of the macros.
-
-\newcounter\cellcounter
-\newcounter\textcounter
-
-\def\startSTEPchart
- {\dosingleempty\dostartSTEPchart}
-
-\long\def\dostartSTEPchart[#1]#2\stopSTEPchart
- {\ifinsidefloat
- \else
- \whitespace
- \@@STPCbefore
- \startbaselinecorrection
- \setlocalhsize
- \noindent
- \fi
- \vbox\bgroup
- \setupSTEPcharts[#1]%
- \forgetall
- \pushMPdrawing
- \resetMPdrawing
- \doglobal\increment\currentstepchart
- \startMPdrawing
- input mp-step.mpii ;
- begin_step_chart ;
- \stopMPdrawing
- \initializeSTEP
- \initializeSTPC
- \global\chardef\somestepboxone\plusone
- \global\chardef\sometextboxone\plusone
- \global\chardef\somestepboxtwo\somestepboxone
- \global\chardef\sometextboxtwo\sometextboxone
- \def\startlines{\bgroup\setupSTEPlines}%
- \def\stoplines {\egroup}%
- \def\cells{\dosingleempty\dostepchartcells}
- \def\texts{\dosingleempty\dostepcharttexts}
- \def\cell {\dosingleempty\docell}%
- \def\text {\dosingleempty\dotext}%
- \def\docell[##1]{\dostepchartcells[##1]{}}%
- \def\dotext[##1]{\dostepcharttexts[##1]{}}
- \doglobal\newcounter\cellcounter
- \doglobal\newcounter\textcounter
- \let\dostepchartcells\doSTEPchartcellsA
- \let\dostepcharttexts\doSTEPcharttextsA
- {#2} % pass one: cells and texts {} keeps setting local
- \startMPdrawing
- nofcells := \cellcounter ;
- analyze_step_chart ;
- \stopMPdrawing
- \doglobal\newcounter\cellcounter
- \doglobal\newcounter\textcounter
- \let\dostepchartcells\doSTEPchartcellsB
- \let\dostepcharttexts\doSTEPcharttextsB
- {#2} % pass two: lines
- \startMPdrawing
- end_step_chart ;
- % if box_found(\MPpos{\stepchartprefix origin}) :
- % initialize_box(\MPpos{\stepchartprefix origin}) ;
- % draw pxy ;
- % fi ;
- anchor_box(\MPpos{\stepchartprefix origin}) ;
- \stopMPdrawing
- \MPdrawingdonetrue
- \doifelse\@@STPCmethod{0}
- {\setbox0\null}
- {\setbox0\vbox{\MPstaticgraphictrue\getMPdrawing}}%
- \resetMPdrawing
- \setbox2\vbox
- {\offinterlineskip
- \scratchdimen\@@STPCheight
- \advance\scratchdimen\@@STPCoffset
- \advance\scratchdimen\@@STPCoffset
- \ifcase\sometextboxone \box\textboxone \vskip\scratchdimen \fi
- \ifcase\somestepboxone \box\stepboxone \vskip\@@STPCvoffset \fi
- \ifcase\somestepboxtwo \box\stepboxtwo \vskip\scratchdimen \fi
- \ifcase\sometextboxtwo \box\textboxtwo \vskip\@@STPCvoffset \fi
- \global\setbox\stepboxone\emptybox \global\setbox\stepboxtwo\emptybox % needed indeed
- \global\setbox\textboxone\emptybox \global\setbox\textboxtwo\emptybox % needed indeed
- %\kern-\scratchdimen % no, instead:
- \vskip-\lastskip}
- \hbox
- {\scratchdimen\wd0
- \advance\scratchdimen \MPllx bp
- \raise\MPlly bp\box0
- \hskip-\scratchdimen
- \hpos{\stepchartprefix origin}{\box2}}%
- \popMPdrawing
- \egroup
- \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
-%D the text rows. After adding the step cells, we flush text
-%D cells that are defined but not yet processed.
-
-\def\doSTEPchartcellsA[#1]#2#3%
- {% synchronize texts
- \doSTEPchartcellsAB[#1]{#2}{#3}%
- % package steps
- \setbox0\hbox{\doifsomething{#2}{\@@stepcell{#2}}}%
- \setbox2\hbox{\doifsomething{#3}{\@@stepcell{#3}}}%
- \ifdim\wd0>\zeropoint \!!doneafalse \else \!!doneatrue \fi
- \ifdim\wd2>\zeropoint \!!donebfalse \else \!!donebtrue \fi
- \ifdim\wd0>\wd2
- \setbox2\hbox to \wd0{\hss\box2\hss}%
- \else
- \setbox0\hbox to \wd2{\hss\box0\hss}%
- \fi
- \if!!donea
- \startMPdrawing
- cells[t][\cellcounter] := nullpicture ;
- \stopMPdrawing
- \else
- \global\chardef\somestepboxone\zerocount
- \edef\stepidentifier{\stepchartprefix\cellcounter-t-c}%
- \setbox0\hbox{\hpos{\stepidentifier}{\box0}}%
- \bgroup
- \iffirstargument\setupSTEPcells[#1]\fi\initializeSTEC
- \startMPdrawing
- initialize_box(\MPpos{\stepidentifier}) ;
- cells[t][\cellcounter] := \MPcellsgraphic ;
- \stopMPdrawing
- \egroup
- \fi
- \if!!doneb
- \startMPdrawing
- cells[b][\cellcounter] := nullpicture ;
- \stopMPdrawing
- \else
- \global\chardef\somestepboxtwo\zerocount
- \edef\stepidentifier{\stepchartprefix\cellcounter-b-c}%
- \setbox2\hbox{\hpos{\stepidentifier}{\box2}}%
- \bgroup
- \iffirstargument\setupSTEPcells[#1]\fi\initializeSTEC
- \startMPdrawing
- initialize_box(\MPpos{\stepidentifier}) ;
- cells[b][\cellcounter] := \MPcellsgraphic ;
- \stopMPdrawing
- \egroup
- \fi
- \global\setbox\stepboxone\hbox
- {\ifdim\wd\stepboxone>\zeropoint
- \box\stepboxone\hskip\@@STPChoffset\else
- \fi\box0}%
- \global\setbox\stepboxtwo\hbox
- {\ifdim\wd\stepboxtwo>\zeropoint
- \box\stepboxtwo\hskip\@@STPChoffset\else
- \fi\box2}%
- % flush saved texts
- \doSTEPchartcellsBA}
-
-\def\doSTEPchartcellsB[#1]#2#3%
- {\doSTEPchartcellsAB[#1]{#2}{#3}%
- \doSTEPchartcellsBA}
-
-\def\doSTEPchartcellsAB[#1]#2#3%
- {\doloop
- {\ifnum\cellcounter>\textcounter
- \texts{}{}\else\exitloop
- \fi}%
- \doglobal\increment\cellcounter}
-
-\def\doSTEPchartcellsBA
- {\scratchtoks\stepchartbuffer
- \stepchartbuffer\emptytoks
- \the\scratchtoks}
-
-\def\MPcellsgraphic
- {image ( drawshape (
- \@@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
-%D point of the connecting arrow. Although several methods are
-%D possible, we've chosen a funny collector that flushes one
-%D step text at a time.
-
-\newtoks\stepchartbuffer
-
-\def\doSTEPcharttextsA[#1]% #2 #3
- {\dodoSTEPcharttextsA{\cellcounter}{#1}}
-
-\def\dodoSTEPcharttextsA#1#2#3#4% #1=number #2=setup
- {\dodoSTEPcharttextsAB{#1}{#2}{#3}{#4}\dodoSTEPcharttextsA
- \ifnum\textcounter>\cellcounter\relax
- \doglobal\decrement\textcounter\relax
- \else
- \setbox0\hbox{\doifsomething{#3}{\@@steptext{#3}}}%
- \setbox2\hbox{\doifsomething{#4}{\@@steptext{#4}}}%
- \ifdim\wd0>\zeropoint \!!doneafalse \else \!!doneatrue \fi
- \ifdim\wd2>\zeropoint \!!donebfalse \else \!!donebtrue \fi
- \if!!donea
- \setbox0\hbox to \@@STPChoffset{\hss}%
- \startMPdrawing
- texts[t][#1][\textcounter] := nullpicture ;
- \stopMPdrawing
- \else
- \global\chardef\sometextboxone\zerocount
- \edef\stepidentifier{\stepchartprefix#1-\textcounter-t-t}%
- \setbox0\hbox to \@@STPChoffset
- {\hss\hpos{\stepidentifier}{\box0}\hss}%
- \bgroup
- \setupSTEPtexts[#2]\initializeSTET
- \startMPdrawing
- initialize_box(\MPpos{\stepidentifier}) ;
- texts[t][#1][\textcounter] := \MPtextsgraphic ;
- \stopMPdrawing
- \egroup
- \fi
- \if!!doneb
- \setbox2\hbox to \@@STPChoffset{\hss}%
- \startMPdrawing
- texts[b][#1][\textcounter] := nullpicture ;
- \stopMPdrawing
- \else
- \global\chardef\sometextboxtwo\zerocount
- \edef\stepidentifier{\stepchartprefix#1-\textcounter-b-t}%
- \setbox2\hbox to \@@STPChoffset
- {\hss\hpos{\stepidentifier}{\box2}\hss}%
- \bgroup
- \setupSTEPtexts[#2]\initializeSTET
- \startMPdrawing
- initialize_box(\MPpos{\stepidentifier}) ;
- texts[b][#1][\textcounter] := \MPtextsgraphic ;
- \stopMPdrawing
- \egroup
- \fi
- \global\setbox\textboxone\hbox
- {\hbox to \wd\stepboxone{\box\textboxone\hss}\box0}
- \global\setbox\textboxtwo\hbox
- {\hbox to \wd\stepboxtwo{\box\textboxtwo\hss}\box2}
- \fi}
-
-\def\doSTEPcharttextsB[#1]% #2 #3
- {\dodoSTEPcharttextsB{\cellcounter}{#1}}
-
-\def\dodoSTEPcharttextsB#1#2#3#4% #1=number #2=setup
- {\dodoSTEPcharttextsAB{#1}{#2}{#3}{#4}\dodoSTEPcharttextsB
- \ifnum\textcounter>\cellcounter\relax
- \doglobal\decrement\textcounter\relax
- \else
- \bgroup
- \initializeSTEL
- \startMPdrawing
- lines[t][#1][\textcounter] := \MPcharttoplinesgraphic{#1}\textcounter ;
- lines[b][#1][\textcounter] := \MPchartbotlinesgraphic{#1}\textcounter ;
- \stopMPdrawing
- \egroup
- \fi}
-
-\def\dodoSTEPcharttextsAB#1#2#3#4#5% #1=number #2=setup
- {\doglobal\increment\textcounter\relax
- \ifnum\textcounter>\cellcounter\relax
- \@EA\appendtoks\@EA#5\@EA{#1}{#2}{#3}{#4}\to\stepchartbuffer
- \fi}
-
-\def\MPtextsgraphic
- {image(drawshape(
- \@@STETalternative, pxy enlarged (-.5*\@@STEToffset),
- \@@STETrulethickness, \MPcolor{\@@STETframecolor},
- \MPcolor{\@@STETbackgroundcolor} ) )}
-
-\def\MPcharttoplinesgraphic#1#2%
- {image(drawline(
- \@@STELalternative, get_step_chart_top_line(#1,#2),
- \@@STELrulethickness, \MPcolor{\@@STELcolor} ) )}
-
-\def\MPchartbotlinesgraphic#1#2%
- {image(drawline(
- \@@STELalternative, get_step_chart_bot_line(#1,#2),
- \@@STELrulethickness, \MPcolor{\@@STELcolor} ) )}
-
-%D Step tables are the vertical counterpart of stepcharts.
-
-\newcounter\currentsteptable
-
-\def\steptableprefix{@st@-\currentsteptable-}
-
-\def\startSTEPtable
- {\dosingleempty\dostartSTEPtable}
-
-\def\dostartSTEPtable[#1]#2\stopSTEPtable
- {\dostartSTEPaligntable[0][#1]#2\stopSTEPaligntable}
-
-\def\startSTEPaligntable
- {\dodoubleempty\dostartSTEPaligntable[1]}
-
-\def\dostartSTEPaligntable[#1][#2]#3\stopSTEPaligntable % flag settings data
- {\ifinsidefloat
- \else
- \whitespace
- \@@STPTbefore
- \startbaselinecorrection
- \setlocalhsize
- \noindent
- \fi
- \vbox\bgroup
- \setupSTEPtables[#2]%
- \forgetall
- \pushMPdrawing
- \doglobal\increment\currentsteptable
- \startMPdrawing
- input mp-step.mpii ;
- begin_step_table ;
- \stopMPdrawing
- \initializeSTEP
- \initializeSTPT
- \def\startlines{\bgroup\setupSTEPlines}%
- \def\stoplines {\egroup}%
- \def\prep##1{\ignorespaces##1\unskip\enspace\ignorespaces}%
- \def\cell {\dosingleempty\docell}%
- \def\cells {\dosingleempty\docells}%
- \def\text {\dosingleempty\dotext}%
- % first graphic pass, also trial pass
- \global\dimen1\zeropoint
- \global\dimen3\zeropoint
- \global\dimen5\zeropoint
- \def\docell[##1]%
- {\docells[##1]{}{}}%
- \def\docells[##1]##2##3##4%
- {\doglobal\increment\cellcounter
- \bgroup
- \iffirstargument\setupSTEPcells[##1]\fi
- \initializeSTEC
- \startMPdrawing
- if box_found(\MPpos{\steptableprefix\cellcounter-c}) :
- initialize_box(\MPpos{\steptableprefix\cellcounter-c}) ;
- cells[\cellcounter] := \MPcellsgraphic ;
- fi ;
- \stopMPdrawing
- \egroup
- \def\do####1####2%
- {\setbox\scratchbox\hbox{\@@stepfake{####2}}%
- \ifdim\wd\scratchbox>\dimen####1\global\dimen####1=\wd\scratchbox\fi}%
- \ifcase#1\else\do1{##2}\do3{##3}\fi\do5{##4}}%
- \def\dotext[##1]##2%
- {\bgroup
- \iffirstargument\setupSTEPtexts[##1]\fi
- \initializeSTET
- \startMPdrawing
- if box_found(\MPpos{\steptableprefix\cellcounter-t}) :
- initialize_box(\MPpos{\steptableprefix\cellcounter-t}) ;
- texts[\cellcounter] := \MPtextsgraphic ;
- fi ;
- \stopMPdrawing
- \egroup}
- \doglobal\newcounter\cellcounter#3
- % second graphic pass pass, drawing lines
- \def\docells[##1]##2##3##4%
- {\doglobal\increment\cellcounter}
- \def\dotext[##1]##2%
- {\bgroup
- \initializeSTEL
- \startMPdrawing
- lines[\cellcounter] := \MPtablelinesgraphic ;
- \stopMPdrawing
- \egroup}
- \doglobal\newcounter\cellcounter#3
- % finishing graphic touch
- \startMPdrawing
- nofcells := \cellcounter ;
- end_step_table ;
- anchor_box(\MPpos{\steptableprefix origin}) ;
- \stopMPdrawing
- \MPdrawingdonetrue
- \doifelse\@@STPTmethod{0}
- {\setbox0\null}
- {\setbox0\vbox{\MPstaticgraphictrue\getMPdrawing}}%
- \resetMPdrawing
- % typesetting pass
- \dimen6=\@@STPTdistance \dimen6=2\dimen6
- % cell width
- \dimen8=\dimen1
- \advance\dimen8\dimen3
- \advance\dimen8\dimen5
- % offset width
- \ifcase#1\else \advance\dimen8 \dimen6 \fi
- % arrow width
- \advance\dimen8 \@@STPTwidth
- \advance\dimen8 \@@STPToffset
- \advance\dimen8 \@@STPToffset
- \def\docells[##1]##2##3##4%
- {\doglobal\increment\cellcounter
- \def\do####1####2####3####4% % strut really needed there !
- {\hbox to \dimen####1{####2\@@stepfake{####3}\strut####4}}%
- \setbox8\hbox
- {\ifcase#1\else
- \do1\hss{##2}\relax \hskip\@@STPTdistance
- \do3\hss{##3}\hss \hskip\@@STPTdistance
- \fi
- \do5\relax{##4}\hss}%
- \hpos{\steptableprefix\cellcounter-c}{\@@stepcell{\box8}}
- \endgraf
- \nointerlineskip
- \kern\@@STPTvoffset}
- \def\dotext[##1]##2%
- {\bgroup
- \hskip\dimen8
- \advance\hsize-\dimen8
- \advance\hsize-\dimen6 % twice the offset
- \setbox0\hbox{\@@steptext{##2}}%
-% to do
-% \ifdim\wd0>\hsize
-% \setbox0=\vbox{\@@steptext{##2}}%
-% \fi
-% align
- \hpos{\steptableprefix\cellcounter-t}{\box0}%
- \endgraf
- \egroup
- \nointerlineskip
- \kern\@@STPTvoffset}
- \setbox2\vbox
- {\doglobal\newcounter\cellcounter
- #3\kern-\@@STPTvoffset}
- \hbox
- {\scratchdimen\wd0
- \advance\scratchdimen \MPllx bp
- \raise\MPlly bp\box0
- \hskip-\scratchdimen
- \hpos{\steptableprefix origin}{\box2}}
- \popMPdrawing
- \egroup
- \ifinsidefloat \else \stopbaselinecorrection \@@STPTafter \fi}
-
-\def\MPtablelinesgraphic
- {image ( drawline (
- \@@STELalternative, get_step_table_line(\cellcounter),
- \@@STELrulethickness, \MPcolor{\@@STELcolor} ) )}
-
-\protect
-
-\continueifinputfile{m-steps.tex}
-
-% A simple paragraph-flow test:
-
-\starttext
-
-\startbuffer
-\startSTEPchart
-\cells {A} {B}
-\cells {one} {five} \texts{$+2$}{$-2$}
-\cells {two} {four} \texts{$+3$}{$-3$}
-\cells {three} {three} \texts{$+4$}{$-4$}
-\cells {four} {two} \texts{$+5$}{$-5$}
-\cells {five} {one}
-\stopSTEPchart
-\stopbuffer
-
-\getbuffer
-
-\startnarrower \getbuffer \stopnarrower
-
-\placefigure[left]{}{\getbuffer}
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-steps.mkvi b/Master/texmf-dist/tex/context/base/m-steps.mkvi
deleted file mode 100644
index c9c5a063620..00000000000
--- a/Master/texmf-dist/tex/context/base/m-steps.mkvi
+++ /dev/null
@@ -1,382 +0,0 @@
-%D \module
-%D [ file=m-steps,
-%D version=2011.10.07, % 2001.05.28,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Step Charts \& Tables,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% multiple texts?
-
-\registerctxluafile{m-steps}{}
-
-\unprotect
-
-\installcorenamespace {stepcharts}
-\installcorenamespace {steptables}
-\installcorenamespace {stepcells}
-\installcorenamespace {steptexts}
-\installcorenamespace {steplines}
-
-\installsimplecommandhandler \??stepcharts {STEPchart} \??stepcharts
-\installsimplecommandhandler \??steptables {STEPtable} \??steptables
-\installsimplecommandhandler \??stepcells {STEPcell} \??stepcells
-\installsimplecommandhandler \??steptexts {STEPtext} \??steptexts
-\installsimplecommandhandler \??steplines {STEPline} \??steplines
-
-\let\setupSTEPcharts\setupSTEPchart
-\let\setupSTEPtables\setupSTEPtable
-\let\setupSTEPcells \setupSTEPcell
-\let\setupSTEPtexts \setupSTEPtext
-\let\setupSTEPlines \setupSTEPline
-
-% numeric text_text_distance ; text_text_distance := 20pt ;
-% numeric step_distance ; step_distance := 20pt ;
-
-\setupSTEPcharts
- [\c!alternative=\v!horizontal,
- \c!before=\blank,
- \c!after=\blank]
-% \c!offset=.15\bodyfontsize
-% \c!height=2ex
-
-% \setupSTEPtables
-% [\c!before=\blank,
-% \c!after=\blank,
-% \c!distance=.25em,
-% \c!voffset=1ex,
-% \c!method=1,
-% \c!width=4em,
-% \c!offset=.15\bodyfontsize]
-
-\setupSTEPcells
- [\c!alternative=1, % TODO
-% \c!style=,
-% \c!color=,
- \c!dx=\bodyfontsize,
- \c!dy=\bodyfontsize,
- \c!background=\v!color,
- \c!backgroundcolor=STEPbackgroundcolor,
- \c!rulethickness=.1\bodyfontsize,
- \c!framecolor=STEPframecolor,
- \c!offset=.25\bodyfontsize]
-
-\setupSTEPtexts
- [\c!alternative=1, % TODO
-% \c!style=\v!smallbodyfont,
-% \c!color=,
- \c!background=\v!color,
- \c!backgroundcolor=STEPbackgroundcolor,
- \c!rulethickness=.1\bodyfontsize,
- \c!framecolor=STEPframecolor,
- \c!distance=.5\bodyfontsize,
- \c!offset=.25\bodyfontsize]
-
-\setupSTEPlines
- [\c!alternative=1, % TODO
- \c!rulethickness=.15\bodyfontsize,
- \c!height=3\bodyfontsize,
- \c!distance=.5\bodyfontsize,
- \c!offset=.25\bodyfontsize,
- \c!color=STEPlinecolor]
-
-\definecolor [STEPlinecolor] [s=.5]
-\definecolor [STEPframecolor] [s=.7]
-\definecolor [STEPbackgroundcolor] [s=.9]
-
-\newtoks\everySTEPchart
-
-\unexpanded\def\startSTEPchart
- {\begingroup
- \dodoubleempty\module_steps_start_chart}
-
-\def\module_steps_start_chart[#name][#settings]%
- {\startnointerference
- \iffirstargument
- \doifelseassignment{#name}
- {\let\currentSTEPchart\empty
- \xdef\module_steps_flush_chart{\module_steps_chart[][#name]}}
- {\edef\currentSTEPchart{#name}%
- \glet\module_steps_flush_chart\relax}% settings are not stored
- \else
- \let\currentSTEPchart\empty
- \gdef\module_steps_flush_chart{\module_steps_chart[][]}%
- \fi
- \the\everySTEPchart
- \ctxcommand{step_start_chart("\currentSTEPchart")}}
-
-\unexpanded\def\stopSTEPchart
- {\ctxcommand{step_stop_chart()}%
- \stopnointerference
- \module_steps_flush_chart
- \endgroup}
-
-\unexpanded\def\startSTEPtable
- {\begingroup
- \setupSTEPchart[\c!alternative=\v!vertical]%
- \dodoubleempty\module_steps_start_chart}
-
-\let\stopSTEPtable\stopSTEPchart
-
-\let\module_steps_flush_chart\relax
-
-\unexpanded\def\STEPchart
- {\dodoubleempty\module_steps_chart}
-
-\unexpanded\def\module_steps_chart[#name][#settings]%
- {\begingroup
- \setupSTEPchart[#settings]%
- \ifinsidefloat
- \makeSTEPchart[#name]%
- \else
- \STEPchartparameter\c!before
- \startbaselinecorrection
- \setlocalhsize
- \makeSTEPchart[#name]%
- \stopbaselinecorrection
- \STEPchartparameter\c!after
- \fi
- \endgroup}
-
-\unexpanded\def\makeSTEPchart[#name]%
- {\ctxcommand{step_make_chart {
- chart = {
- name = "#name",
- alternative = "\STEPchartparameter\c!alternative",
- },
- cell = {
- alternative = "\STEPcellparameter\c!alternative", % TODO: shapes
- offset = \number\dimexpr\STEPcellparameter\c!offset,
- rulethickness = \number\dimexpr\STEPcellparameter\c!rulethickness,
- framecolor = "\STEPcellparameter\c!framecolor",
- backgroundcolor = "\STEPcellparameter\c!backgroundcolor",
- dx = \number\dimexpr\STEPcellparameter\c!dx,
- dy = \number\dimexpr\STEPcellparameter\c!dy,
- },
- text = {
- alternative = "\STEPtextparameter\c!alternative", % TODO: shapes
- offset = \number\dimexpr\STEPtextparameter\c!offset,
- distance = \number\dimexpr\STEPtextparameter\c!distance,
- rulethickness = \number\dimexpr\STEPtextparameter\c!rulethickness,
- framecolor = "\STEPtextparameter\c!framecolor",
- backgroundcolor = "\STEPtextparameter\c!backgroundcolor",
- },
- line = {
- alternative = "\STEPlineparameter\c!alternative", % TODO: dash, arrow
- rulethickness = \number\dimexpr\STEPlineparameter\c!rulethickness,
- height = \number\dimexpr\STEPlineparameter\c!height,
- distance = \number\dimexpr\STEPlineparameter\c!distance,
- offset = \number\dimexpr\STEPlineparameter\c!offset,
- color = "\STEPlineparameter\c!color",
- },
- }}}
-
-\unexpanded\def\startSTEPcell
- {\ctxcommand{step_start_cell()}}
-
-\unexpanded\def\stopSTEPcell
- {\ctxcommand{step_stop_cell()}}
-
-\unexpanded\def\module_steps_cells#top#bot%
- {\ctxcommand{step_cells(\!!bs\detokenize{#top}\!!es,\!!bs\detokenize{#bot}\!!es)}}
-
-\unexpanded\def\module_steps_texts#top#bot%
- {\ctxcommand{step_texts(\!!bs\detokenize{#top}\!!es,\!!bs\detokenize{#bot}\!!es)}}
-
-\unexpanded\def\module_steps_cell#str%
- {\ctxcommand{step_cell(\!!bs\detokenize{#str}\!!es)}}
-
-\unexpanded\def\module_steps_text#str%
- {\ctxcommand{step_text(\!!bs\detokenize{#str}\!!es)}}
-
-\unexpanded\def\module_steps_textset#left#middle#right%
- {\ctxcommand{step_textset(\!!bs\detokenize{#left}\!!es,\!!bs\detokenize{#middle}\!!es,\!!bs\detokenize{#right}\!!es)}}
-
-\unexpanded\def\module_steps_toptext#top%
- {\ctxcommand{step_text_top(\!!bs\detokenize{#top}\!!es)}}
-
-\unexpanded\def\module_steps_bottext#bot%
- {\ctxcommand{step_text_bot(\!!bs\detokenize{#bot}\!!es)}}
-
-\unexpanded\def\module_steps_topcell#top%
- {\ctxcommand{step_cell_top(\!!bs\detokenize{#top}\!!es)}}
-
-\unexpanded\def\module_steps_botcell#bot%
- {\ctxcommand{step_cell_bot(\!!bs\detokenize{#bot}\!!es)}}
-
-\appendtoks
- \let\cells \module_steps_cells
- \let\texts \module_steps_texts
- \let\cell \module_steps_cell
- \let\text \module_steps_text
- \let\textset\module_steps_textset
- \let\toptext\module_steps_toptext
- \let\bottext\module_steps_bottext
- \let\topcell\module_steps_topcell
- \let\botcell\module_steps_botcell
-\to \everySTEPchart
-
-% todo: mapping can be done in lua
-
-\startxmlsetups xml:step:define
- \xmlsetsetup{#1} {stepchart|steptable} {xml:step:*}
-\stopxmlsetups
-
-\xmlregistersetup{xml:step:define}
-
-\startxmlsetups xml:step:stepchart
- \startSTEPchart
- \xmlfilter{#1}{/(cells|texts|stepcell|cell|text)/command(xml:step:*)}
- \stopSTEPchart
-\stopxmlsetups
-
-\startxmlsetups xml:step:steptable
- \startSTEPtable
- \xmlfilter{#1}{/(cells|texts|stepcell|cell|text)/command(xml:step:*)}
- \stopSTEPtable
-\stopxmlsetups
-
-\startxmlsetups xml:step:cells
- \cells {\xmltext{#1}{/top}} {\xmltext{#1}{/bot}}
-\stopxmlsetups
-
-\startxmlsetups xml:step:texts
- \texts {\xmltext{#1}{/top}} {\xmltext{#1}{/bot}}
-\stopxmlsetups
-
-\startxmlsetups xml:step:stepcell
- \cells {\xmltext{#1}{/topcell}} {\xmltext{#1}{/botcell}}
- \texts {\xmltext{#1}{/toptext}} {\xmltext{#1}{/bottext}}
-\stopxmlsetups
-
-\startxmlsetups xml:step:cell
- \cell {\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups xml:step:text
- \text {\xmlflush{#1}}
-\stopxmlsetups
-
-\protect
-
-\continueifinputfile{m-steps.mkvi}
-
-\starttext
-
-\startbuffer
-<stepchart>
- <cell> some cell </cell>
- <text> some text </text>
- <cell> some cell </cell>
- <text> some text </text>
- <cell> some cell </cell>
-</stepchart>
-\stopbuffer
-
-\typebuffer \processxmlbuffer
-
-
-\startbuffer
-<steptable>
- <cell> some cell </cell>
- <text> some text </text>
- <cell> some cell </cell>
- <text> some text </text>
- <cell> some cell </cell>
-</steptable>
-\stopbuffer
-
-\typebuffer \processxmlbuffer
-
-\page
-
-\startSTEPchart
- \cells {A} {B}
- \cells {one} {five} \texts{$+2$}{$-2$}
- \cells {two} {four} \texts{$+3$}{$-3$}
- \cells {three} {three} \texts{$+4$}{$-4$}
- \cells {four} {two} \texts{$+5$}{$-5$}
- \cells {five} {one}
-\stopSTEPchart
-
-\startSTEPtable
- \cell {one} \textset{$x$} {=}{$a+b+c$}
- \cell {two} \textset{$c+d$}{=}{$y$}
- \cell {three}
-\stopSTEPtable
-
-
-\page
-
-\startbuffer
-<stepchart>
- <cells> <top> some text </top> <bot> some text </bot> </cells>
- <texts> <top> text </top> <bot> text </bot> </texts>
- <cells> <top> some text </top> <bot> some text </bot> </cells>
-</stepchart>
-\stopbuffer
-
-\processxmlbuffer
-
-\startbuffer
-<stepchart>
- <cell> some text </cell>
- <texts> <top> text </top> <bot> text </bot> </texts>
- <cell> some text </cell>
-</stepchart>
-\stopbuffer
-
-\processxmlbuffer
-
-\page
-
-\startSTEPchart[second]
- \startSTEPcell
- \topcell {A}
- \botcell {B}
- \startSTEPcell
- \topcell {one}
- \botcell {five}
- \toptext {$+2$}
- \bottext {$-2$}
- \stopSTEPcell
- \startSTEPcell
- \topcell {two}
- \botcell {four}
- \toptext {$+3$}
- \bottext {$-3$}
- \stopSTEPcell
- \startSTEPcell
- \topcell {three}
- \botcell {three}
- \toptext {$+4$}
- \bottext {$-4$}
- \stopSTEPcell
- \startSTEPcell
- \topcell {four}
- \botcell {two}
- \toptext {$+5$}
- \bottext {$-5$}
- \stopSTEPcell
- \startSTEPcell
- \topcell {five}
- \botcell {one}
- \stopSTEPcell
-\stopSTEPchart
-
-\STEPchart[first][alternative=horizontal]
-\STEPchart[first][alternative=vertical]
-
-\page
-
-\STEPchart[second][alternative=horizontal]
-\STEPchart[second][alternative=vertical]
-
-\page
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-streams.tex b/Master/texmf-dist/tex/context/base/m-streams.tex
deleted file mode 100644
index a8589a89c13..00000000000
--- a/Master/texmf-dist/tex/context/base/m-streams.tex
+++ /dev/null
@@ -1,446 +0,0 @@
-%D \module
-%D [ file=m-streams,
-%D version=2006.03.21,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Streams,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 First we implement a simple left||right synchronization
-%D mechanism, which we may perfect and extend over time.
-
-\unprotect
-
-\defineoutputstream [\v!left]
-\defineoutputstream [\v!right]
-
-\definemarknote[\v!left]
-\definemarknote[\v!right]
-
-\startsetups stream:\v!left:bottom
- \flushmarknotes[\v!left]
-\stopsetups
-\startsetups stream:\v!right:bottom
- \flushmarknotes[\v!right]
-\stopsetups
-\startsetups stream:\v!left:reset
- \erasemarknotes[\v!left]
-\stopsetups
-\startsetups stream:\v!right:reset
- \erasemarknotes[\v!right]
-\stopsetups
-
-\def\LeftNote {\setmarknote [\v!left]} % {#1}
-\def\RightNote {\setmarknote [\v!right]} % {#1}
-\def\SwitchToLeft {\enableoutputstream [\v!left]}
-\def\SwitchToRight {\enableoutputstream [\v!right]}
-\def\SwitchToNormal {\enableoutputstream [\s!default]}
-\def\SynchronizeLeftAndRight{\synchronizeoutputstreams[\v!left,\v!right]}
-\def\FlushLeftAndRight {\flushoutputstreampages [\v!left,\v!right]}
-
-\protect
-
-% \topskip \strutheight
-% \splittopskip\strutheight
-
-%D Example of usage:
-%D
-%D \starttyping
-%D \nopenalties \setupinterlinespace[top=height] \setupcolors[state=start]
-%D
-%D \showgrid \showstruts
-%D
-%D \starttext
-%D
-%D \title{Whatever} \page
-%D
-%D \dorecurse {5} {
-%D \let\RecurseLevel\recurselevel
-%D \SwitchToLeft \dorecurse{10}{\dontleavehmode{\tf\RecurseLevel:l \begstrut \input tufte \endstrut \endgraf}}
-%D \SwitchToRight \dorecurse{10}{\dontleavehmode{\sl\RecurseLevel:r \begstrut \input knuth \endstrut \endgraf}}
-%D \SwitchToNormal \SynchronizeLeftAndRight
-%D \SwitchToLeft \dorecurse{10}{\dontleavehmode{\bf\RecurseLevel:l \begstrut \input zapf \endstrut \endgraf}}
-%D \SwitchToRight \dorecurse{10}{\dontleavehmode{\bs\RecurseLevel:r \begstrut \input davis \endstrut \endgraf}}
-%D \SwitchToNormal \SynchronizeLeftAndRight
-%D }
-%D
-%D \FlushLeftAndRight
-%D
-%D \stoptext
-%D \stoptyping
-%D
-%D Another example:
-%D
-%D \starttyping
-%D \nopenalties \setupinterlinespace[top=height] \setupcolors[state=start]
-%D
-%D \showgrid \showstruts
-%D
-%D \starttext
-%D
-%D \SwitchToNormal \FlushLeftAndRight \page
-%D
-%D \def\StartCouple{\page\SwitchToNormal}
-%D \def\StopCouple {\SwitchToNormal \SynchronizeLeftAndRight \FlushLeftAndRight}
-%D
-%D \def\Original {\SwitchToNormal\SynchronizeLeftAndRight\SwitchToLeft}
-%D \def\Translation{\SwitchToRight}
-%D
-%D \StartCouple
-%D \dorecurse{10} {
-%D \Original o: \begstrut \inright{\blackrule}\input tufte \endstrut \LeftNote {tufte} \endgraf
-%D \Translation t: \begstrut \inleft {\blackrule}\input zapf \endstrut \RightNote{zapf} \endgraf
-%D \Original o: \begstrut \inright{\blackrule}\input knuth \endstrut \LeftNote {knuth} \endgraf
-%D \Translation t: \begstrut \inleft {\blackrule}\input davis \endstrut \RightNote{davis} \endgraf
-%D \Original o: \begstrut \inright{\blackrule}\input douglas \endstrut \LeftNote {douglas} \endgraf
-%D \Translation t: \begstrut \inleft {\blackrule}\input bryson \endstrut \RightNote{bryson} \endgraf
-%D }
-%D \StopCouple
-%D \stoptext
-%D \stoptyping
-
-%D Next we implement stream layers.
-
-\unprotect
-
-\def\overloadtextwidth#1%
- {\makeupwidth#1\relax
- \textwidth\makeupwidth
- \hsize\makeupwidth}
-
-\startsetups streamlayer:default:settings
- % set hsize etc, like \overloadtextwidth{12cm}
-\stopsetups
-
-\startsetups streamlayer:default:extras
- % flush goodies, like local floats
-\stopsetups
-
-\startsetups streamlayer:default:place
- \setlayer
- [\currentstreamlayer]
- [\c!preset=\v!left\v!top]
- {\outputstreambox[\currentstreamlayer]}%
-\stopsetups
-
-\startsetups streamlayer:default:copy
- \setlayer
- [\currentstreamlayer]
- [\c!preset=\v!left\v!top]
- {\outputstreamcopy[\currentstreamlayer]}%
-\stopsetups
-
-\startsetups streamlayer:default:reset
- \outputstreambox[\currentstreamlayer]
-\stopsetups
-
-\startsetups streamlayer:default:flush
- \tightlayer[\currentstreamlayer]
-\stopsetups
-
-\def\definestreamlayer
- {\dodoubleempty\dodefinestreamlayer}
-
-\def\dodefinestreamlayer[#1][#2]%
- {\defineoutputstream[#1]%
- \defineoutputstream[main]%
- \definelayer[#1][\c!method=\v!fit,\c!width=\textwidth,#2]}
-
-\def\dostreamsetups#1%
- {\doifsetupselse{streamlayer:\currentstreamlayer:#1}
- {\directsetup{streamlayer:\currentstreamlayer:#1}}
- {\directsetup{streamlayer:\s!default:#1}}}
-
-\def\startstreamlayer[#1]%
- {\bgroup
-% \def\startstreamlayer[##1]{\bgroup\let\stopstreamlayer\egroup}%
- \edef\currentstreamlayer{#1}%
- \enableoutputstream[main]%
- \synchronizeoutput
- \enableoutputstream[\currentstreamlayer]%
- \bgroup
- \dostreamsetups{settings}}
-
-\def\stopstreamlayer
- {\endgraf
- \egroup
- \disableoutputstream % \enableoutputstream[\s!default]%
- \outputstreambox[main]%
-% \dostreamsetups{place}%
-% \dostreamsetups{extras}%
-% \dostreamsetups{flush}%
- \egroup}
-
-\def\preparestreamlayer{\dosingleempty\dopreparestreamlayer}
-\def\flushstreamlayer {\dosingleempty\doflushstreamlayer }
-\def\placestreamlayer {\dosingleempty\doplacestreamlayer }
-
-\def\dopreparestreamlayer[#1]%
- {\bgroup
- \edef\currentstreamlayer{\iffirstargument#1\else\currentstreamlayer\fi}%
- \dostreamsetups{place}%
- \dostreamsetups{extras}%
-% \dostreamsetups{flush}%
- \egroup}
-
-\def\doflushstreamlayer[#1]%
- {\bgroup
- \edef\currentstreamlayer{\iffirstargument#1\else\currentstreamlayer\fi}%
- \dostreamsetups{flush}%
- \egroup}
-
-\def\doplacestreamlayer[#1]%
- {\preparestreamlayer[#1]%
- \flushstreamlayer[#1]}
-
-\protect
-
-%D Usage:
-
-%D \starttyping
-%D \setupinterlinespace[top=height]
-%D
-%D \setupcolors[state=start]
-%D
-%D \definestreamlayer[block]
-%D
-%D \definemeasure[localtextwidth] [\dimexpr.7\textwidth\relax]
-%D \definemeasure[localfloatwidth][\dimexpr.3\textwidth-2\bodyfontsize\relax]
-%D
-%D \startsetups streamlayer:block:settings
-%D \hsize=\measure{localtextwidth}
-%D \setupfloat[figure][maxwidth=\measure{localfloatwidth}]
-%D \stopsetups
-%D
-%D \startsetups streamlayer:block:extras
-%D \setuplocalfloats
-%D [before=\blank,
-%D after=\blank,
-%D inbetween=\blank]
-%D \setbox\scratchbox\vbox{\hsize\measure{localfloatwidth}\getlocalfloats}
-%D \ifdim\ht\scratchbox>\thelayerheight\currentstreamlayer\relax
-%D % more float than text
-%D \setlayerframed
-%D [\currentstreamlayer]
-%D [preset=righttop]
-%D [frame=off,
-%D offset=overlay]
-%D {\box\scratchbox}
-%D \else
-%D % more text than float
-%D \setuplocalfloats
-%D [before=\vfill,
-%D after=\removedepth\vfill,
-%D inbetween=\removedepth\vfill]
-%D \setlayerframed
-%D [\currentstreamlayer]
-%D [preset=righttop]
-%D [frame=off,
-%D offset=overlay]
-%D {\vbox to \thelayerheight\currentstreamlayer {\hsize\measure{localfloatwidth}\getlocalfloats}}
-%D \fi
-%D \resetlocalfloats
-%D \stopsetups
-%D
-%D \startsetups streamlayer:block:place
-%D \setlayerframed
-%D [\currentstreamlayer]
-%D [preset=lefttop]
-%D [frame=off,
-%D offset=overlay]
-%D {\outputstreambox[\currentstreamlayer]}%
-%D \stopsetups
-%D
-%D \startsetups streamlayer:block:flush
-%D \framed
-%D [offset=overlay,
-%D frame=off,
-%D background=color,
-%D backgroundcolor=red]
-%D {\tightlayer[\currentstreamlayer]}
-%D \stopsetups
-%D
-%D \setupbodyfont[small]
-%D
-%D \starttext
-%D
-%D \dorecurse {10} {
-%D \startstreamlayer[block]
-%D \title{Sample \recurselevel}
-%D \input tufte \endgraf
-%D \placefigure[local]{}{}
-%D \placefigure[local]{}{}
-%D \ifodd\recurselevel\relax \placefigure[local]{}{} \fi
-%D \startitemize[columns]
-%D \item xxx
-%D \item xxx
-%D \item xxx
-%D \item xxx
-%D \item xxx
-%D \stopitemize
-%D \stopstreamlayer
-%D \placestreamlayer[block]
-%D }
-%D
-%D \dorecurse {10} {
-%D \startstreamlayer[block]
-%D \title{Sample \recurselevel}
-%D \startcolumns
-%D \input tufte
-%D \stopcolumns
-%D \stopstreamlayer
-%D \placestreamlayer[block]
-%D }
-%D
-%D \stoptext
-%D \stoptyping
-
-\def\starttextstreamlayer
- {\startstreamlayer}
-
-\def\stoptextstreamlayer
- {\endgraf
- % maybe depth if no proper depth and no skip
- \removelastskip
- \stopstreamlayer}
-
-\def\placetextstreamlayer{\placestreamlayer}
-
-%D \starttyping
-%D \definestreamlayer[whatever][width=12cm]
-%D
-%D \startstreamlayer[whatever]
-%D \startitemize[columns,two][after=]
-%D \item one
-%D \item two
-%D \item three
-%D \item four
-%D \stopitemize
-%D \stopstreamlayer
-%D
-%D \framed[strut=no,align=normal]{\placestreamlayer[whatever]\obeydepth}
-%D
-%D \starttextstreamlayer[whatever]
-%D \startitemize[columns,two]
-%D \item one
-%D \item two
-%D \item three
-%D \item four
-%D \stopitemize
-%D \stoptextstreamlayer
-%D
-%D \framed[strut=no]{\placetextstreamlayer[whatever]}
-%D \stoptyping
-
-\endinput
-
-\setupinterlinespace[top=height]
-
-\setupcolors[state=start]
-
-\definestreamlayer[block]
-
-\definemeasure[localtextwidth] [\dimexpr.7\textwidth\relax]
-\definemeasure[localfloatwidth][\dimexpr.3\textwidth-2\bodyfontsize\relax]
-
-\startsetups streamlayer:block:settings
- \hsize=\measure{localtextwidth}
- \setupfloat[figure][maxwidth=\measure{localfloatwidth}]
-\stopsetups
-
-\startsetups streamlayer:block:extras
- \setuplocalfloats
- [before=\whitespace\blank,
- after=\whitespace\blank,
- inbetween=\whitespace\blank]
- \setbox\scratchbox\vbox{\hsize\measure{localfloatwidth}\getlocalfloats}
- \ifdim\ht\scratchbox>\thelayerheight\currentstreamlayer\relax
- % more float than text
- \setlayerframed
- [\currentstreamlayer]
- [preset=righttop]
- [frame=off,
- offset=overlay]
- {\box\scratchbox}
- \else
- % more text than float
- \setuplocalfloats
- [before=\vfill,
- after=\removedepth\vfill,
- inbetween=\removedepth\vfill]
- \setlayerframed
- [\currentstreamlayer]
- [preset=righttop]
- [frame=off,
- offset=overlay]
- {\vbox to \thelayerheight\currentstreamlayer {\hsize\measure{localfloatwidth}\getlocalfloats}}
- \fi
- \resetlocalfloats
-\stopsetups
-
-\startsetups streamlayer:block:place
- \setlayerframed
- [\currentstreamlayer]
- [preset=lefttop]
- [frame=off,
- offset=overlay]
- {\outputstreambox[\currentstreamlayer]}%
-\stopsetups
-
-\startsetups streamlayer:block:flush
- \framed
- [offset=overlay,
- frame=off,
- background=color,
- backgroundcolor=red]
- {\tightlayer[\currentstreamlayer]}
-\stopsetups
-
-\setupbodyfont[small]
-
-\starttext
-
-% \definestreamlayer[block]
-%
-% \startstreamlayer[block]
-% \title{Sample \recurselevel}
-% \startcolumns
-% \dorecurse{4}{\input tufte \par}
-% \stopcolumns
-% \stopstreamlayer
-% \placestreamlayer[block]
-
-\dorecurse {10} {
- \startstreamlayer[block]
- \title{Sample \recurselevel}
- \input tufte \endgraf
- \placefigure[local]{}{}
- \placefigure[local]{}{}
- \ifodd\recurselevel\relax \placefigure[local]{}{} \fi
- \startitemize[columns]
- \item xxx
- \item xxx
- \item xxx
- \item xxx
- \item xxx
- \stopitemize
- \stopstreamlayer
- \placestreamlayer[block]
-}
-
-\dorecurse {10} {
- \startstreamlayer[block]
- \title{Sample \recurselevel}
- \startcolumns
- \input tufte
- \stopcolumns
- \stopstreamlayer
- \placestreamlayer[block]
-}
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-subsub.tex b/Master/texmf-dist/tex/context/base/m-subsub.tex
deleted file mode 100644
index 88be1168000..00000000000
--- a/Master/texmf-dist/tex/context/base/m-subsub.tex
+++ /dev/null
@@ -1,76 +0,0 @@
-%D \module
-%D [ file=m-subsub,
-%D version=2000.12.14,
-%D title=\CONTEXT\ Private Modules,
-%D subtitle=More Section Levels,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. This module is not public.
-
-\unprotect
-
-\definesection[\s!section-8]
-\definesection[\s!section-9]
-\definesection[\s!section-10]
-\definesection[\s!section-11]
-\definesection[\s!section-12]
-
-\definehead
- [\v!subsubsubsubsubsection]
- [\c!section=\s!section-8,
- \c!default=\v!subsubsubsubsection]
-
-\definehead
- [\v!subsubsubsubsubsubsection]
- [\c!section=\s!section-9,
- \c!default=\v!subsubsubsubsubsection]
-
-\definehead
- [\v!subsubsubsubsubsubsubsection]
- [\c!section=\s!section-10,
- \c!default=\v!subsubsubsubsubsubsection]
-
-\definehead
- [\v!subsubsubsubsubsubsubsubsection]
- [\c!section=\s!section-11,
- \c!default=\v!subsubsubsubsubsubsubsection]
-
-\definehead
- [\v!subsubsubsubsubsubsubsubsubsection]
- [\c!section=\s!section-12,
- \c!default=\v!subsubsubsubsubsubsubsubsection]
-
-\definehead
- [\v!subsubsubsubsubsubject]
- [\c!coupling=\v!subsubsubsubsubsection,
- \c!default=\v!subsubsubsubsubsection,
- \c!incrementnumber=\v!no]
-
-\definehead
- [\v!subsubsubsubsubsubsubject]
- [\c!coupling=\v!subsubsubsubsubsubsection,
- \c!default=\v!subsubsubsubsubsubsection,
- \c!incrementnumber=\v!no]
-
-\definehead
- [\v!subsubsubsubsubsubsubsubject]
- [\c!coupling=\v!subsubsubsubsubsubsubsection,
- \c!default=\v!subsubsubsubsubsubsubsection,
- \c!incrementnumber=\v!no]
-
-\definehead
- [\v!subsubsubsubsubsubsubsubsubject]
- [\c!coupling=\v!subsubsubsubsubsubsubsubsection,
- \c!default=\v!subsubsubsubsubsubsubsubsection,
- \c!incrementnumber=\v!no]
-
-\definehead
- [\v!subsubsubsubsubsubsubsubsubsubject]
- [\c!coupling=\v!subsubsubsubsubsubsubsubsubsection,
- \c!default=\v!subsubsubsubsubsubsubsubsubsection,
- \c!incrementnumber=\v!no]
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/m-tex4ht.mkii b/Master/texmf-dist/tex/context/base/m-tex4ht.mkii
deleted file mode 100644
index 8a3dc9dbb03..00000000000
--- a/Master/texmf-dist/tex/context/base/m-tex4ht.mkii
+++ /dev/null
@@ -1,9 +0,0 @@
-%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/Master/texmf-dist/tex/context/base/m-timing.mkiv b/Master/texmf-dist/tex/context/base/m-timing.mkiv
deleted file mode 100644
index 5502768f697..00000000000
--- a/Master/texmf-dist/tex/context/base/m-timing.mkiv
+++ /dev/null
@@ -1,102 +0,0 @@
-%D \module
-%D [ file=m-timing,
-%D version=2007.12.23,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Timing,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\ifdefined\ShowNamedUsage \endinput \fi
-
-%D Written at the end of 2007, this module is dedicated to Taco. Reaching this
-%D point in \LUATEX\ was a non trivial effort. By visualizing a bit what happens
-%D when pages come out of \LUATEX, you may get an idea what is involved. It took
-%D much time an dedication to reach this point in the development. Add to that
-%D those daily Skype intense discussion, testing and debugging moments. Time flies
-%D but progress is impressive. The motto of this module could be: what you see
-%D is what you get. An there is much more to come \unknown.
-
-% \usemodule[timing]
-% \setupcolors[state=start]
-% \starttext
-% \dorecurse{200}{\input tufte \par} \ShowUsage{}
-% \stoptext
-
-\definecolor[usage:line] [darkred]
-\definecolor[usage:time] [darkblue]
-\definecolor[usage:frame][darkgray]
-
-\ctxloadluafile{trac-tim}{}
-
-\startluacode
-local progress = moduledata.progress
-
-function progress.show(filename,parameters,nodes,other)
- for n, name in pairs(parameters or progress.parameters()) do
- context.ShowNamedUsage(filename or progress.defaultfilename,name,other or "")
- end
- for n, name in pairs(nodes or progress.nodes(filename)) do
- context.ShowNamedUsage(filename or progress.defaultfilename,name,other or "")
- end
-end
-\stopluacode
-
-% \everyfirstshipout
-
-\startnotmode[no-timing]
- \appendtoks\ctxlua{moduledata.progress.store()}\to\everystarttext
- \appendtoks\ctxlua{moduledata.progress.store()}\to\everyshipout
- \ctxlua{luatex.registerstopactions(function() moduledata.progress.save() end)}
-\stopnotmode
-
-\unexpanded\def\ShowNamedUsage#1#2#3%
- {\setbox\scratchbox\vbox\bgroup
- \startMPcode
- begingroup ; save p, q, b, h, w ;
- path p, q, b ; numeric h, w ;
- p := \cldcontext{moduledata.progress.path("#1","#2")} ;
- % p := p shifted -llcorner p ;
- if bbwidth(p) > 0 :
- h := 100 ; w := 2 * h ;
- w := \the\textwidth-3pt ; % correct for pen
- p := p xstretched w ;
- b := boundingbox (llcorner p -- llcorner p shifted (w,h)) ;
- pickup pencircle scaled 3pt ; linecap := butt ;
- draw b withcolor \MPcolor{usage:frame} ;
- draw p withcolor \MPcolor{usage:line} ;
- if ("#3" <> "") and ("#3" <> "#2") :
- q := \cldcontext{moduledata.progress.path("#1","#3")} ;
- % q := q shifted -llcorner q ;
- if bbwidth(q) > 1 :
- q := q xstretched w ;
- pickup pencircle scaled 1.5pt ; linecap := butt ;
- draw q withcolor \MPcolor{usage:time} ;
- fi ;
- fi ;
- fi ;
- endgroup ;
- \stopMPcode
- \egroup
- \scratchdimen\wd\scratchbox
- \ifdim\scratchdimen>\zeropoint
- \startlinecorrection
- \box\scratchbox \endgraf
- \hbox to \scratchdimen{\tttf\strut\detokenize{#2}\hss
- min:\cldcontext{moduledata.progress.bot("#1","\detokenize{#2}")}, %
- max:\cldcontext{moduledata.progress.top("#1","\detokenize{#2}")}, %
- pages:\cldcontext{moduledata.progress.pages("#1")}%
- }%
- \stoplinecorrection
- \fi}
-
-\unexpanded\def\LoadUsage #1{\ctxlua{moduledata.progress.convert("#1")}}
-\unexpanded\def\ShowUsage #1{\ctxlua{moduledata.progress.show("#1",nil,nil,"elapsed_time")}}
-\unexpanded\def\ShowMemoryUsage#1{\ctxlua{moduledata.progress.show("#1",nil,{}, "elapsed_time")}}
-\unexpanded\def\ShowNodeUsage #1{\ctxlua{moduledata.progress.show("#1",{},nil, "elapsed_time")}}
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/m-trackers.mkiv b/Master/texmf-dist/tex/context/base/m-trackers.mkiv
deleted file mode 100644
index 95c34b16f65..00000000000
--- a/Master/texmf-dist/tex/context/base/m-trackers.mkiv
+++ /dev/null
@@ -1,3 +0,0 @@
-\starttext
- \showtrackers
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-translate.mkiv b/Master/texmf-dist/tex/context/base/m-translate.mkiv
deleted file mode 100644
index 2e6cbe95088..00000000000
--- a/Master/texmf-dist/tex/context/base/m-translate.mkiv
+++ /dev/null
@@ -1,127 +0,0 @@
-%D \module
-%D [ file=m-translate,
-%D version=2008.10.09,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Translations,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 can make this module more clever (wildcards and such) but since
-%D it's only a demo we stick to the simple case for now. After all, it's
-%D better to fix your source.
-
-\startluacode
- local translators = { }
-
- moduledata.translators = translators
-
- local compiled, list = nil, nil
-
- -- function translators.register(from,to)
- -- local l = lpeg.P(from)/to
- -- if not list then
- -- list = l
- -- else
- -- list = list + l
- -- end
- -- compiled = nil
- -- end
- --
- -- function translators.translate(s)
- -- if list then
- -- if not compiled then
- -- compiled = lpeg.Cs((list + lpeg.P(1))^0)
- -- end
- -- return compiled:match(s)
- -- else
- -- return s
- -- end
- -- end
-
- -- local function prepare()
-
- function translators.register(from,to)
- if not list then
- list = { [from] = to }
- else
- list[from] = to
- end
- compiled = nil
- end
-
- function translators.translate(s)
- if list then
- if not compiled then
- local tree = lpeg.utfchartabletopattern(list)
- compiled = lpeg.Cs((tree/list + lpeg.patterns.utf8character)^0 * lpeg.P(-1)) -- the P(1) is needed in order to accept non utf
- end
- return compiled:match(s)
- else
- return s
- end
- end
-
- local textlineactions = resolvers.openers.helpers.textlineactions
-
- utilities.sequencers.appendaction(textlineactions,"after","moduledata.translators.translate")
-
- function translators.enable()
- utilities.sequencers.enableaction(textlineactions,"moduledata.translators.translate")
- end
-
- function translators.disable()
- utilities.sequencers.disableaction(textlineactions,"moduledata.translators.translate")
- end
-
- function translators.reset(s)
- translators.enable()
- list, compiled = nil, nil
- end
-
- translators.disable()
-\stopluacode
-
-\unprotect
-
-\unexpanded\def\translateinput
- {\dodoubleargument\module_translate_input}
-
-\def\module_translate_input[#1][#2]%
- {\ctxlua{moduledata.translators.register(\!!bs#1\!!es,\!!bs#2\!!es)}}
-
-\unexpanded\def\resetinputtranslation
- {\ctxlua{moduledata.translators.reset()}}
-
-\unexpanded\def\enableinputtranslation
- {\ctxlua{moduledata.translators.enable()}}
-
-\unexpanded\def\disableinputtranslation
- {\ctxlua{moduledata.translators.disable()}}
-
-\unexpanded\def\readtranslatedfile#1%
- {\enableinputtranslation
- \readfile{#1}\donothing\donothing
- \disableinputtranslation}
-
-\protect
-
-\continueifinputfile{m-translate.mkiv}
-
-\starttext
-
- \translateinput[Moica][Mojca]
- % \translateinput[Idris][Idris (aka ادريس)]
- \translateinput[Idris][Idris (aka <something arabic here>)]
-
- \enableinputtranslation
-
- Well, it's not that hard to satisfy Idris' and Moicas \TEX\ needs.
-
- \readtranslatedfile{tufte}
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-units.mkii b/Master/texmf-dist/tex/context/base/m-units.mkii
deleted file mode 100644
index af4629d4860..00000000000
--- a/Master/texmf-dist/tex/context/base/m-units.mkii
+++ /dev/null
@@ -1,904 +0,0 @@
-%D \module
-%D [ file=m-units,
-%D version=1997.03.19,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=Scientific Units,
-%D author={Hans Hagen \& Ton Otten},
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Scientific units can be typeset in math mode pretty well,
-%D but occasionally one has to take care of spacing.
-%D Furthermore, entering these units is not that natural as
-%D wanted. Therefore this module presents a more natural way of
-%D doing things, like:
-%D
-%D \starttyping
-%D 1.23 \Cubic \Meter \Per \Second
-%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
-%D manual for this module.
-
-%D Message number~1 deals with overruling the \type {\Degrees}
-%D macro defined in the core modules. Let's say that this is
-%D an upward compatibility issue.
-
-\startmessages dutch library: units
- title: eenheden
- 1: gebruik \string\Degrees\space\string\Celsius\space in plaats van \string\Celsius !
-\stopmessages
-
-\startmessages english library: units
- title: units
- 1: use \string\Degrees\space\string\Celsius\space instead of \string\Celsius !
-\stopmessages
-
-\startmessages german library: units
- title: Einheiten
- 1: Verwende \string\Degrees\space\string\Celsius\space statt \string\Celsius !
-\stopmessages
-
-\startmessages italian library: units
- title: unita
- 1: usare \string\Degrees\space\string\Celsius\space invece di \string\Celsius !
-\stopmessages
-
-\startmessages norwegian library: units
- title: enheter
- 1: bruk \string\Degrees\space\string\Celsius\space istedenfor \string\Celsius !
-\stopmessages
-
-\startmessages romanian library: units
- title: unitati
- 1: folositi \string\Degrees\space\string\Celsius\space in locul \string\Celsius !
-\stopmessages
-
-\startmessages french library: units
- title: unitas
- 1: utilisez \string\Degrees\space\string\Celsius\space A la place de \string\Celsius !
-\stopmessages
-
-\unprotect
-
-%D This runtime loadable module implements a way of defining
-%D units. The core macro is \type {\dimension}, a rather clever
-%D one that is able to cooperate with some other dimension
-%D related macros. As said, this module enables user to enter:
-%D
-%D \startbuffer
-%D some 10 \Square \Meter \Per \Second or more
-%D \stopbuffer
-%D
-%D \getbuffer
-%D
-%D as:
-%D
-%D \typebuffer
-%D
-%D The units itself are implemented as synonyms.
-%D
-%D \starttyping
-%D \definesynonyms [unit] [units] [\unitmeaning]
-%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
-%D units by saying \type {\placelistofunits}
-%D
-%D We have to use the command \type {\unitmeaning} instead
-%D of \type {\meaning}, simply because the latter is a \TEX\
-%D primitive we don't want to loose. We use the label text
-%D mechanism for translations.
-
-%D \macros
-%D {dimension}
-%D
-%D The core of this module is the low level macro \type
-%D {\dimension}. Before presenting this macro, it's best to
-%D look at some applications, because it's supposed to show
-%D some intelligence that can beter be understood from the
-%D context.
-%D
-%D The next useless examples show some of the cases we want
-%D to handle in a proper way.
-%D
-%D \startbuffer
-%D ... 10 \Square \Meter \Per \Volt \
-%D ... 10 \Square \Meter \Volt \
-%D ... 10 \Meter \Volt \
-%D ... 10 \Milli \Square \Meter \Per \Volt \
-%D ... 10 \Square \Milli \Meter \Per \Volt \
-%D ... 10 \Meter \Times \Meter \
-%D ... 10 \Square \Meter \Times \Meter \
-%D ... 10 \Square \Milli \Meter \Times \Meter \
-%D \stopbuffer
-%D
-%D \typebuffer
-%D
-%D Becomes:
-%D
-%D \getbuffer
-
-%D \macros
-%D {mathematicstypeface, dimensiontypeface,
-%D dimensionhalfspace, dimensionbackspace}
-%D
-%D There are some low level constants, that can be changed
-%D when needed. Some day I will write a decent setup command.
-
-\def\mathematicstypeface{\rm}
-\def\dimensiontypeface {\tf}
-
-\def\dimensionhalfspace {\ifmmode\,\else\hskip+.1em\relax\fi}
-\def\dimensionbackspace {\ifmmode\!\else\hskip-.1em\relax\fi}
-
-%D \macros
-%D {smashdimensionpower}
-%D
-%D Sometimes the baseline distance is not enough to provide
-%D for superscripts, so we smash their height by default.
-
-\newif\ifsmashdimensionpower \smashdimensionpowertrue
-
-%D The dimension mechanism uses a lot of signals to keep
-%D track if the current state.
-
-\newsignal\dimensionsignal
-\newsignal\dimensionpowersignal
-\newsignal\dimensionmidfixsignal
-\newsignal\dimensionaddfixsignal
-
-\let\thedimensionprefix = \empty
-\let\thedimensionpower = \empty
-
-%D \macros
-%D {spaceddimensions,textdimensions}
-%D
-%D The actual definition of \type {\dimension} overruled the
-%D one in the core modules. The boolean can be used to
-%D force spacing between units. Vergelijk {\Newton \Meter}
-%D eens met {\spaceddimensionstrue \Newton \Meter}. The
-%D rather ugly test prevents problems with nested dimensions.
-
-\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
-%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 \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 \stoptyping
-
-\newif\ifnesteddimension \nesteddimensionfalse % local switch
-
-\def\dodimensionpower#1%
- {\iftextdimensions\expandafter\high\else\expandafter^\fi{#1}}
-
-\def\ustartmathmode {\iftextdimensions\else\expandafter\startmathmode \fi}
-\def\ustopmathmode {\iftextdimensions\else\expandafter\stopmathmode \fi}
-\def\umathematicstypeface{\iftextdimensions\else\expandafter\mathematicstypeface\fi}
-
-%D In forced text mode, we ignore spacing in monospaced fonts.
-
-\def\udimensionhalfspace {\dodimensionspace\dimensionhalfspace}
-\def\udimensionbackspace {\dodimensionspace\dimensionbackspace}
-
-\def\dodimensionspace
- {\iftextdimensions
- \begingroup
- \setbox0\hbox{i}%
- \setbox2\hbox{m}%
- \ifdim\wd0=\wd2
- \endgroup
- \@EAEAEA\gobbleoneargument
- \else
- \endgroup
- \fi
- \fi}
-
-\unexpanded\def\dimension#1%
- {\begingroup
- \global\let\savedthedimensionprefix\thedimensionprefix
- \global\let\savedthedimensionpower\thedimensionpower
- \unexpanded\def\dimension##1{\global\nesteddimensiontrue}%
- \let\dimensionprefix\dimension
- \let\dimensionmidfix\dimension
- \let\dimensionsuffix\dimension
- \let\dimensionpower \dimension
- \global\nesteddimensionfalse
- \setbox\scratchbox\hbox{\ustartmathmode#1\ustopmathmode}% pre-roll
- \global\let\thedimensionprefix\savedthedimensionprefix
- \global\let\thedimensionpower \savedthedimensionpower
- \endgroup
- \ifnesteddimension#1\else\dodimension{#1}\fi}
-
-\def\dodimension#1%
- {\dontbreakdimension
- \ifdim\scratchdimen=\zeropoint\relax
- \ifmmode
- \udimensionhalfspace
- \udimensionhalfspace
- \fi
- \ustartmathmode\dimensiontypeface
- \else
- \ustartmathmode\dimensiontypeface
- \ifspaceddimensions
- \ifdim\scratchdimen=\dimensionsignal\relax
- \udimensionhalfspace
- \else\ifdim\scratchdimen=\dimensionpowersignal\relax
- \udimensionhalfspace
- \fi
- \fi
- \fi
- \fi
- \umathematicstypeface\thedimensionprefix#1%
- \ifx\thedimensionpower\empty
- \else\ifsmashdimensionpower
- \setbox\scratchbox=\hbox
- {\iftextdimensions
- \tx\thedimensionpower
- \else
- $\scriptstyle\thedimensionpower$%
- \fi}%
- \ht\scratchbox=\zeropoint
- \dodimensionpower{\box\scratchbox}%
- \else
- \dodimensionpower{\thedimensionpower}%
- \fi\fi
- \ustopmathmode
- % otherwise nobreak before space in 2 \Milli \Meter\ blabla
- \doifnotmode{atpragma}{\nobreak}% this was always \nobreak
- % only test this at pragma
- \ifx\thedimensionpower\empty
- \hskip\dimensionsignal
- \else
- \hskip\dimensionpowersignal
- \fi
- \global\let\thedimensionprefix\empty
- \global\let\thedimensionpower\empty}
-
-%D \macros
-%D {dontbreakdimension,
-%D dimensionprefix, dimensionaddfix,
-%D dimensionnopfix, dimensionmidfix,
-%D dimensionpower}
-%D
-%D Here are some auxilliary macros.
-
-\def\dontbreakdimension
- {\scratchdimen\lastskip
- \unskip
- \nobreak
- \hskip\scratchdimen
- \nobreak}
-
-\def\dimensionprefix#1%
- {\gdef\thedimensionprefix{#1}}
-
-\def\dimensionaddfix#1%
- {\unskip
- %\mathematics{\umathematicstypeface#1}%
- \ustartmathmode\umathematicstypeface#1\ustopmathmode
- \nobreak
- \hskip\dimensionaddfixsignal}
-
-\def\dimensionnopfix#1%
- {\dontbreakdimension
- \ifdim\scratchdimen=\dimensionpowersignal\relax
- \ustartmathmode
- \else
- \ustartmathmode
- \udimensionhalfspace
- \nobreak
- \fi
- \umathematicstypeface#1%
- \ustopmathmode
- \nobreak
- \hskip\dimensionsignal}
-
-\def\dimensionmidfix#1%
- {\dontbreakdimension
- \ifdim\scratchdimen=\dimensionpowersignal\relax
- \ustartmathmode
- \udimensionbackspace
- \nobreak
- \else
- \ustartmathmode
- \fi
- \umathematicstypeface#1%
- \ustopmathmode
- \nobreak
- \hskip\dimensionmidfixsignal}
-
-\def\dimensionpower#1%
- {\gdef\thedimensionpower{#1}}
-
-%D \macros
-%D {SIunits, noSI, doSI}
-%D
-%D Some low level unit switching macros:
-
-\newif\ifSIunits \SIunitstrue
-
-\def\noSI#1{\begingroup\SIunitsfalse#1\endgroup}
-\def\doSI#1{\begingroup\SIunitstrue #1\endgroup}
-
-%D \macros
-%D {Degrees}
-%D
-%D We can fake the degrees symbol with:
-
-\def\Degrees{\dimensionaddfix{\mathematics{^\circ}}}
-
-%D \macros
-%D {Unit, NoUnit}
-%D
-%D When a dimension has no leading number, we can use \type
-%D {\Unit}, and when no unit is appended, \type {\NoUnit} is
-%D to be used, just to prevent the prefix migrating to the
-%D next occasion.
-
-\def\Unit {\hskip\dimensionsignal}
-\def\NoUnit {\dimension{}}
-
-%D The mechanism described at the top of this module, depends
-%D on several dimensional components, like prefixes:
-
-\def\Atto {\dimensionprefix{a}}
-\def\Femto {\dimensionprefix{f}}
-\def\Pico {\dimensionprefix{p}}
-\def\Nano {\dimensionprefix{n}}
-\def\Micro {\dimensionprefix{\iftextdimensions u\else\mu\fi}}
-\def\Milli {\dimensionprefix{m}}
-\def\Centi {\dimensionprefix{c}}
-\def\Deci {\dimensionprefix{d}} % 10^01
-\def\Hecto {\dimensionprefix{h}} % 10^02
-\def\Kilo {\dimensionprefix{k}} % 10^03
-\def\Mega {\dimensionprefix{M}} % 10^06
-\def\Giga {\dimensionprefix{G}} % 10^09
-\def\Tera {\dimensionprefix{T}} % 10^12
-\def\Peta {\dimensionprefix{P}} % 10^15
-\def\Exa {\dimensionprefix{E}} % 10^18
-
-%def\Terra {\dimensionprefix{T}} % for old times sake
-
-\def\Kibi {\dimensionprefix{ki}} % 2^10
-\def\Mebi {\dimensionprefix{Mi}} % 2^20
-\def\Gibi {\dimensionprefix{Gi}} % 2^30
-\def\Tebi {\dimensionprefix{Ti}} % 2^40
-\def\Pebi {\dimensionprefix{Pi}} % 2^50
-
-%D and binary prefixes:
-
-\def\Kibi {\dimensionprefix{Ki}}
-\def\Mebi {\dimensionprefix{Mi}}
-\def\Gibi {\dimensionprefix{Gi}}
-\def\Tebi {\dimensionprefix{Ti}}
-\def\Pebi {\dimensionprefix{Pi}}
-\def\Exbi {\dimensionprefix{Ei}}
-\def\Zebi {\dimensionprefix{Zi}}
-\def\Yobi {\dimensionprefix{Yi}}
-
-%D and operators:
-
-\def\Times {\dimensionnopfix{\iftextdimensions.\else\cdot\fi}}
-\def\Solidus {\dimensionmidfix{/}}
-\def\Per {\dimensionmidfix{/}}
-\def\OutOf {\dimensionnopfix{:}}
-
-%D and suffixes:
-
-\def\Linear {\dimensionpower{1}}
-\def\Square {\dimensionpower{2}}
-\def\Cubic {\dimensionpower{3}}
-
-\def\Inverse {\dimensionpower{-1}}
-\def\ILinear {\dimensionpower{-1}}
-\def\ISquare {\dimensionpower{-2}}
-\def\ICubic {\dimensionpower{-3}}
-
-%D Apart from these components, the units themselves are
-%D defined using the synonym mechanism. First we define some
-%D length and volume related units.
-
-\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!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!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]
- [u:sec=seconde,
- u:psec=picoseconde,
- u:fsec=femtoseconde,
- u:nsec=nanoseconde,
- u:usec=microseconde,
- u:msec=milliseconde,
- u:year=jaar,
- u:month=maand,
- u:week=week,
- u:day=dag,
- u:hour=uur,
- u:min=minuten]
-
-\setuplabeltext
- [\s!en]
- [u:sec=second,
- u:fsec=femtosecond,
- u:psec=picosecond,
- u:nsec=nanosecond,
- u:usec=microsecond,
- u:msec=millisecond,
- u:year=year,
- u:month=month,
- u:week=week,
- u:day=day,
- u:hour=hour,
- u:min=minutes]
-
-\setuplabeltext
- [\s!de]
- [u:sec=Sekunde,
- u:fsec=Femtosekunde,
- u:psec=Picosekunde,
- u:nsec=Nanosekunde,
- u:usec=Microsekunde,
- u:msec=Millisekunde,
- u:year=Jahr,
- u:month=Monat,
- u:week=Woche,
- u:day=Tag,
- u:hour=Stunde,
- u:min=Minuten]
-
-\setuplabeltext
- [\s!hr]
- [u:sec=sekunda,
- u:fsec=femtosekunda,
- u:psec=pikosekunda,
- u:nsec=nanosekunda,
- u:usec=mikrosekunda,
- u:msec=milisekunda,
- u:year=godina,
- u:month=mjesec,
- u:week=tjedan,
- u:day=dan,
- u:hour=sat,
- u:min=minuta]
-
-\setuplabeltext
- [\s!it]
- [u:sec=secondo,
- u:fsec=femtosecondo,
- u:psec=picosecondo,
- u:nsec=nanosecondo,
- u:usec=microsecondo,
- u:msec=millisecondo,
- u:year=anno,
- u:month=mese,
- u:week=settimana,
- u:day=giorno,
- u:hour=ora,
- u:min=minuti]
-
-%D Then we define some angles.
-
-\getvalue{\v!unit} [Rad] {rad} {\labeltext{u:rad}}
-\getvalue{\v!unit} [Deg] {{\mathematics{^\circ}}} {\labeltext{u:deg}}
-
-\setuplabeltext
- [\s!nl]
- [u:rad=hoek radialen,
- u:deg=hoek graden]
-
-\setuplabeltext
- [\s!en]
- [u:rad=angle radians,
- u:deg=angle degrees]
-
-\setuplabeltext
- [\s!de]
- [u:rad=Bogenma\SS,
- u:deg=Gradma\SS]
-
-\setuplabeltext
- [\s!hr]
- [u:rad=radijani,
- u:deg=kutni stupnjevi]
-
-\setuplabeltext
- [\s!it]
- [u:rad=radianti,
- u:deg=angoli sessagesimali]
-
-%D Rotation and frequency related units are defined by:
-
-\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!unit} [RevPerSec] {RPS} {\labeltext{u:rps}}
-\getvalue{\v!unit} [RevPerMin] {RPM} {\labeltext{u:rpm}}
-
-\setuplabeltext
- [\s!nl]
- [u:rps=omwentelingen per seconde,
- u:rpm=omwentelingen per minuut]
-
-\setuplabeltext
- [\s!en]
- [u:rps=revolutions per second,
- u:rpm=revolutions per minute]
-
-\setuplabeltext
- [\s!de]
- [u:rps=Umdrehungen pro Sekunde,
- u:rpm=Umdrehungen pro Minute]
-
-\setuplabeltext
- [\s!hr]
- [u:rps=okretaji po sekundi,
- u:rpm=okretaji po minuti]
-
-\setuplabeltext
- [\s!it]
- [u:rps=giri al secondo,
- u:rpm=giri al minuto]
-
-%D Mass and force:
-
-\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!unit} [Newton] {N} {Newton}
-\getvalue{\v!unit} [kNewton] {\Kilo \Newton} {kilo Newton}
-
-\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]
- [u:u=atomaire massa eenheid]
-
-\setuplabeltext
- [\s!en]
- [u:u=atom mass unit]
-
-\setuplabeltext
- [\s!de]
- [u:u=Atomare Masseneinheit]
-
-\setuplabeltext
- [\s!hr]
- [u:u=unificirana atomska jedinica mase]
-
-\setuplabeltext
- [\s!it]
- [u:u=unit\`a di massa atomica]
-
-%D Energy units comes in two alternatives:
-
-\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!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!unit} [Celsius] {C} {Celsius}
-\getvalue{\v!unit} [Kelvin] {K} {Kelvin}
-\getvalue{\v!unit} [Fahrenheit] {F} {Fahrenheit}
-
-%D Some chemic related units are:
-
-\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!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!unit} [Ohm] {\Omega} {Ohm}
-\getvalue{\v!unit} [kOhm] {\Kilo \Ohm} {kilo Ohm}
-
-\getvalue{\v!unit} [Siemens] {S} {Siemens}
-
-\getvalue{\v!unit} [Ampere] {A} {Amp\`ere}
-\getvalue{\v!unit} [mAmpere] {\Milli \Ampere} {milli Amp\`ere}
-
-\getvalue{\v!unit} [Coulomb] {C} {Coulomb}
-
-\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!unit} [Tesla] {T} {Tesla}
-
-\getvalue{\v!unit} [VoltAC] {V_{\xbox{ac}}} {\labeltext{u:vac}}
-\getvalue{\v!unit} [VoltDC] {V_{\xbox{dc}}} {\labeltext{u:vdc}}
-
-\setuplabeltext
- [\s!nl]
- [u:vac=wisselspanning,
- u:vdc=gelijkspanning]
-
-\setuplabeltext
- [\s!en]
- [u:vac=alternating current,
- u:vdc=direct current]
-
-\setuplabeltext
- [\s!de]
- [u:vac=Wechselspannung,
- u:vdc=Gleichspannung]
-
-\setuplabeltext
- [\s!hr]
- [u:vac=izmjeni\ccaron ni napon,
- u:vdc=istosmjerni napon]
-
-\setuplabeltext
- [\s!it]
- [u:vac=corrente alternata,
- u:vdc=corrente continua]
-
-%D Network bandwidth is specified in Bits:
-
-\getvalue{\v!unit} [Bit] {bit} {\labeltext{u:bit}}
-\getvalue{\v!unit} [Baud] {Bd} {Baud (Bit/s)}
-
-%D Computer memory size is specified in Bytes:
-
-\getvalue{\v!unit} [Byte] {B} {\labeltext{u: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}
-
-\setuplabeltext
- [\s!en]
- [u:bit=Bit,
- u:byte=Byte]
-
-\setuplabeltext
- [\s!hr]
- [u:bit=bit,
- u:byte=bajt]
-
-%D Telecommunication call density is specified in Erlangs:
-
-\getvalue{\v!unit} [Erlang] {E} {Erlang}
-
-%D Some radiation related units:
-
-\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!unit} [Candela] {cd} {Candela}
-
-%D and some sound ones:
-
-\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!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} {\labeltext{u: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!unit} [Percent] {\xPercent } {percent}
-\getvalue{\v!unit} [Permille] {\xPromille} {promille}
-\getvalue{\v!unit} [Promille] {\xPromille} {promille}
-
-%D Some more, thanks to Tobias:
-
-\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]
- [u:at=technische atmosfeer,
- u:atm=fysische atmosfeer,
- u:ft=voet,
- u:cal=calorie,
- u:f=kracht (force),
- u:kcal=kilocalorie]
-
-\setuplabeltext
- [\s!en]
- [u:at=technical atmospheric pressure,
- u:atm=physical atmospheric pressure,
- u:ft=foot,
- u:inch=inch,
- u:cal=calory,
- u:f=force,
- u:kcal=kilocalory]
-
-\setuplabeltext
- [\s!de]
- [u:at=Technischer atmosph\"arischer Druck,
- u:atm=physkalischer atmosph\"arischer Druck,
- u:ft=Fu\SS,
- u:cal=Kalorien,
- u:f=Force,
- u:kcal=Kilokalorien]
-
-\setuplabeltext
- [\s!hr]
- [u:at=tehni\ccaron ka atmosfera,
- u:atm=standardna atmosfera,
- u:ft=stopa,
- u:inch=in\ccaron a,
- u:cal=kalorija,
- u:f=Force,
- u:kcal=Kilokalorien]
-
-\setuplabeltext
- [\s!it]
- [u:at=pressione atmosferica tecnica,
- u:atm=pressione atmosfera fisica,
- u:ft=piede,
- u:cal=caloria,
- u:f=forza,
- u:kcal=chilocaloria]
-
-%D Here are some old ones, still there for compatibility
-%D reasons. These will probably be obsolete in a few years.
-
-\def\MeterTwee {\Square \Meter}
-\def\mMeterTwee {\Square \Milli \Meter}
-\def\cMeterTwee {\Square \Centi \Meter}
-\def\dMeterTwee {\Square \Deci \Meter}
-\def\kMeterTwee {\Square \Kilo \Meter}
-
-\def\MeterDrie {\Cubic \Meter}
-\def\mMeterDrie {\Cubic \Milli \Meter}
-\def\cMeterDrie {\Kubic \Centi \Meter}
-\def\dMeterDrie {\Cubic \Deci \Meter}
-\def\kMeterDrie {\Cubic \Kilo \Meter}
-
-\def\LiterTwee {\Square \Liter}
-\def\SecTwee {\Square \Sec}
-\def\SecMinEen {\Inverse \Sec}
-
-%D To make ourselves happy, we define some dutch specific
-%D units:
-
-\startinterface dutch
-
- \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
- \let \Graden \Deg
- \let \PaardeKracht \PaardenKracht
- \let \Atoom \Atom
- \let \Heure \Hour
- \let \Jaar \Year
- \let \Maand \Month
- \let \Dag \Day
- \let \Uur \Hour
-
-\stopinterface
-
-%D Finally we define some equivalents. By using \type {\let}
-%D we can be sure that they don't end up double in the lists of
-%D units.
-
-\let \Second \Sec
-\let \Kubic \Cubic
-\let \IKubic \ICubic
-
-%D Option:
-
-% \def\Micro{\dimensionprefix{\iftextdimensions\mathematics\mu \else\mu \fi}}
-% \def\Times{\dimensionnopfix{\iftextdimensions\mathematics\cdot\else\cdot\fi}}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/m-units.mkiv b/Master/texmf-dist/tex/context/base/m-units.mkiv
deleted file mode 100644
index b0db8d54895..00000000000
--- a/Master/texmf-dist/tex/context/base/m-units.mkiv
+++ /dev/null
@@ -1,912 +0,0 @@
-%D \module
-%D [ file=m-units,
-%D version=1997.03.19,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=Scientific Units,
-%D author={Hans Hagen \& Ton Otten},
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Best use the built in unit handle!
-
-%D Scientific units can be typeset in math mode pretty well,
-%D but occasionally one has to take care of spacing.
-%D Furthermore, entering these units is not that natural as
-%D wanted. Therefore this module presents a more natural way of
-%D doing things, like:
-%D
-%D \starttyping
-%D 1.23 \Cubic \Meter \Per \Second
-%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
-%D manual for this module.
-
-%D Message number~1 deals with overruling the \type {\Degrees}
-%D macro defined in the core modules. Let's say that this is
-%D an upward compatibility issue.
-
-\startmessages dutch library: units
- title: eenheden
- 1: gebruik \string\Degrees\space\string\Celsius\space in plaats van \string\Celsius !
-\stopmessages
-
-\startmessages english library: units
- title: units
- 1: use \string\Degrees\space\string\Celsius\space instead of \string\Celsius !
-\stopmessages
-
-\startmessages german library: units
- title: Einheiten
- 1: Verwende \string\Degrees\space\string\Celsius\space statt \string\Celsius !
-\stopmessages
-
-\startmessages italian library: units
- title: unita
- 1: usare \string\Degrees\space\string\Celsius\space invece di \string\Celsius !
-\stopmessages
-
-\startmessages norwegian library: units
- title: enheter
- 1: bruk \string\Degrees\space\string\Celsius\space istedenfor \string\Celsius !
-\stopmessages
-
-\startmessages romanian library: units
- title: unitati
- 1: folositi \string\Degrees\space\string\Celsius\space in locul \string\Celsius !
-\stopmessages
-
-\startmessages french library: units
- title: unitas
- 1: utilisez \string\Degrees\space\string\Celsius\space A la place de \string\Celsius !
-\stopmessages
-
-\registerctxluafile{x-mathml}{}
-
-\unprotect
-
-\writestatus{\m!units}{The units module is obsolete because functionality is built into the core.}
-
-\let\unit\undefined
-
-\definesynonyms
- [\v!unit]
- [\v!units]
- [\unitmeaning]
-
-\setupsynonyms
- [\v!unit]
- [\c!synonymcommand=\dimension]
-
-\startmodule[units]
-
-%D This runtime loadable module implements a way of defining
-%D units. The core macro is \type {\dimension}, a rather clever
-%D one that is able to cooperate with some other dimension
-%D related macros. As said, this module enables user to enter:
-%D
-%D \starttyping
-%D some 10 \Square \Meter \Per \Second or more
-%D \stoptyping
-%D
-%D The units itself are implemented as synonyms.
-%D
-%D \starttyping
-%D \definesynonyms [unit] [units] [\unitmeaning]
-%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
-%D units by saying \type {\placelistofunits}
-%D
-%D We have to use the command \type {\unitmeaning} instead
-%D of \type {\meaning}, simply because the latter is a \TEX\
-%D primitive we don't want to loose. We use the label text
-%D mechanism for translations.
-
-%D \macros
-%D {dimension}
-%D
-%D The core of this module is the low level macro \type
-%D {\dimension}. Before presenting this macro, it's best to
-%D look at some applications, because it's supposed to show
-%D some intelligence that can beter be understood from the
-%D context.
-%D
-%D The next useless examples show some of the cases we want
-%D to handle in a proper way.
-%D
-%D \starttyping
-%D ... 10 \Square \Meter \Per \Volt \
-%D ... 10 \Square \Meter \Volt \
-%D ... 10 \Meter \Volt \
-%D ... 10 \Milli \Square \Meter \Per \Volt \
-%D ... 10 \Square \Milli \Meter \Per \Volt \
-%D ... 10 \Meter \Times \Meter \
-%D ... 10 \Square \Meter \Times \Meter \
-%D ... 10 \Square \Milli \Meter \Times \Meter \
-%D \stoptyping
-
-%D \macros
-%D {mathematicstypeface, dimensiontypeface,
-%D dimensionhalfspace, dimensionbackspace}
-%D
-%D There are some low level constants, that can be changed
-%D when needed. Some day I will write a decent setup command.
-
-\def\mathematicstypeface{\rm}
-\def\dimensiontypeface {\tf}
-
-\def\dimensionhalfspace {\ifmmode\,\else\hskip+.1em\relax\fi}
-\def\dimensionbackspace {\ifmmode\!\else\hskip-.1em\relax\fi}
-
-%D \macros
-%D {smashdimensionpower}
-%D
-%D Sometimes the baseline distance is not enough to provide
-%D for superscripts, so we smash their height by default.
-
-\newif\ifsmashdimensionpower \smashdimensionpowertrue
-
-%D The dimension mechanism uses a lot of signals to keep
-%D track if the current state.
-
-\newsignal\dimensionsignal
-\newsignal\dimensionpowersignal
-\newsignal\dimensionmidfixsignal
-\newsignal\dimensionaddfixsignal
-
-\let\thedimensionprefix = \empty
-\let\thedimensionpower = \empty
-
-%D \macros
-%D {spaceddimensions,textdimensions}
-%D
-%D The actual definition of \type {\dimension} overruled the
-%D one in the core modules. The boolean can be used to
-%D force spacing between units. The rather ugly test prevents
-%D problems with nested dimensions.
-
-\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
-%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 \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 \stoptyping
-
-\newif\ifnesteddimension \nesteddimensionfalse % local switch
-
-\def\dodimensionpower#1%
- {\iftextdimensions\expandafter\high\else\expandafter\normalsuperscript\fi{#1}}
-
-\def\ustartmathmode {\iftextdimensions\else\expandafter\startmathmode \fi}
-\def\ustopmathmode {\iftextdimensions\else\expandafter\stopmathmode \fi}
-\def\umathematicstypeface{\iftextdimensions\else\expandafter\mathematicstypeface\fi}
-
-%D In forced text mode, we ignore spacing in monospaced fonts.
-
-\def\udimensionhalfspace {\dodimensionspace\dimensionhalfspace}
-\def\udimensionbackspace {\dodimensionspace\dimensionbackspace}
-
-\def\dodimensionspace
- {\iftextdimensions
- \begingroup
- \setbox0\hbox{i}%
- \setbox2\hbox{m}%
- \ifdim\wd0=\wd2
- \endgroup
- \@EAEAEA\gobbleoneargument
- \else
- \endgroup
- \fi
- \fi}
-
-\unexpanded\def\dimension#1%
- {\begingroup
- \global\let\savedthedimensionprefix\thedimensionprefix
- \global\let\savedthedimensionpower\thedimensionpower
- \unexpanded\def\dimension##1{\global\nesteddimensiontrue}%
- \let\dimensionprefix\dimension
- \let\dimensionmidfix\dimension
- \let\dimensionsuffix\dimension
- \let\dimensionpower \dimension
- \global\nesteddimensionfalse
- \setbox\scratchbox\hbox{\ustartmathmode#1\ustopmathmode}% pre-roll
- \global\let\thedimensionprefix\savedthedimensionprefix
- \global\let\thedimensionpower \savedthedimensionpower
- \endgroup
- \ifnesteddimension#1\else\dodimension{#1}\fi}
-
-\def\dodimension#1%
- {\dontbreakdimension
- \ifdim\scratchdimen=\zeropoint\relax
- \ifmmode
- \udimensionhalfspace
- \udimensionhalfspace
- \fi
- \ustartmathmode\dimensiontypeface
- \else
- \ustartmathmode\dimensiontypeface
- \ifspaceddimensions
- \ifdim\scratchdimen=\dimensionsignal\relax
- \udimensionhalfspace
- \else\ifdim\scratchdimen=\dimensionpowersignal\relax
- \udimensionhalfspace
- \fi
- \fi
- \fi
- \fi
- \umathematicstypeface\thedimensionprefix#1%
- \ifx\thedimensionpower\empty
- \else\ifsmashdimensionpower
- \setbox\scratchbox=\hbox
- {\iftextdimensions
- \tx\thedimensionpower
- \else
- $\scriptstyle\thedimensionpower$%
- \fi}%
- \ht\scratchbox=\zeropoint
- \dodimensionpower{\box\scratchbox}%
- \else
- \dodimensionpower{\thedimensionpower}%
- \fi\fi
- \ustopmathmode
- % otherwise nobreak before space in 2 \Milli \Meter\ blabla
- \doifnotmode{atpragma}{\nobreak}% this was always \nobreak
- % only test this at pragma
- \ifx\thedimensionpower\empty
- \hskip\dimensionsignal
- \else
- \hskip\dimensionpowersignal
- \fi
- \global\let\thedimensionprefix\empty
- \global\let\thedimensionpower\empty}
-
-%D \macros
-%D {dontbreakdimension,
-%D dimensionprefix, dimensionaddfix,
-%D dimensionnopfix, dimensionmidfix,
-%D dimensionpower}
-%D
-%D Here are some auxilliary macros.
-
-\def\dontbreakdimension
- {\scratchdimen\lastskip
- \unskip
- \nobreak
- \hskip\scratchdimen
- \nobreak}
-
-\def\dimensionprefix#1%
- {\gdef\thedimensionprefix{#1}}
-
-\def\dimensionaddfix#1%
- {\unskip
- %\mathematics{\umathematicstypeface#1}%
- \ustartmathmode\umathematicstypeface#1\ustopmathmode
- \nobreak
- \hskip\dimensionaddfixsignal}
-
-\def\dimensionnopfix#1%
- {\dontbreakdimension
- \ifdim\scratchdimen=\dimensionpowersignal\relax
- \ustartmathmode
- \else
- \ustartmathmode
- \udimensionhalfspace
- \nobreak
- \fi
- \umathematicstypeface#1%
- \ustopmathmode
- \nobreak
- \hskip\dimensionsignal}
-
-\def\dimensionmidfix#1%
- {\dontbreakdimension
- \ifdim\scratchdimen=\dimensionpowersignal\relax
- \ustartmathmode
- \udimensionbackspace
- \nobreak
- \else
- \ustartmathmode
- \fi
- \umathematicstypeface#1%
- \ustopmathmode
- \nobreak
- \hskip\dimensionmidfixsignal}
-
-\def\dimensionpower#1%
- {\gdef\thedimensionpower{#1}}
-
-%D \macros
-%D {SIunits, noSI, doSI}
-%D
-%D Some low level unit switching macros:
-
-\newif\ifSIunits \SIunitstrue
-
-\def\noSI#1{\begingroup\SIunitsfalse#1\endgroup}
-\def\doSI#1{\begingroup\SIunitstrue #1\endgroup}
-
-%D \macros
-%D {Degrees}
-%D
-%D We can fake the degrees symbol with:
-
-\def\Degrees{\dimensionaddfix{\mathematics{\normalsuperscript\circ}}}
-
-%D \macros
-%D {Unit, NoUnit}
-%D
-%D When a dimension has no leading number, we can use \type
-%D {\Unit}, and when no unit is appended, \type {\NoUnit} is
-%D to be used, just to prevent the prefix migrating to the
-%D next occasion.
-
-\def\Unit {\hskip\dimensionsignal}
-\def\NoUnit {\dimension{}}
-
-%D The mechanism described at the top of this module, depends
-%D on several dimensional components, like prefixes:
-
-\def\Atto {\dimensionprefix{a}}
-\def\Femto {\dimensionprefix{f}}
-\def\Pico {\dimensionprefix{p}}
-\def\Nano {\dimensionprefix{n}}
-\def\Micro {\dimensionprefix{\iftextdimensions u\else\mu\fi}}
-\def\Milli {\dimensionprefix{m}}
-\def\Centi {\dimensionprefix{c}}
-\def\Deci {\dimensionprefix{d}} % 10^{01}
-\def\Hecto {\dimensionprefix{h}} % 10^{02}
-\def\Kilo {\dimensionprefix{k}} % 10^{03}
-\def\Mega {\dimensionprefix{M}} % 10^{06}
-\def\Giga {\dimensionprefix{G}} % 10^{09}
-\def\Tera {\dimensionprefix{T}} % 10^{12}
-\def\Peta {\dimensionprefix{P}} % 10^{15}
-\def\Exa {\dimensionprefix{E}} % 10^{18}
-
-%def\Terra {\dimensionprefix{T}} % for old times sake
-
-\def\Kibi {\dimensionprefix{ki}} % 2^{10}
-\def\Mebi {\dimensionprefix{Mi}} % 2^{20}
-\def\Gibi {\dimensionprefix{Gi}} % 2^{30}
-\def\Tebi {\dimensionprefix{Ti}} % 2^{40}
-\def\Pebi {\dimensionprefix{Pi}} % 2^{50}
-
-%D and binary prefixes:
-
-\def\Kibi {\dimensionprefix{Ki}}
-\def\Mebi {\dimensionprefix{Mi}}
-\def\Gibi {\dimensionprefix{Gi}}
-\def\Tebi {\dimensionprefix{Ti}}
-\def\Pebi {\dimensionprefix{Pi}}
-\def\Exbi {\dimensionprefix{Ei}}
-\def\Zebi {\dimensionprefix{Zi}}
-\def\Yobi {\dimensionprefix{Yi}}
-
-%D and operators:
-
-\def\Times {\dimensionnopfix{\iftextdimensions.\else\cdot\fi}}
-\def\Solidus {\dimensionmidfix{/}}
-\def\Per {\dimensionmidfix{/}}
-\def\OutOf {\dimensionnopfix{:}}
-
-%D and suffixes:
-
-\def\Linear {\dimensionpower{1}}
-\def\Square {\dimensionpower{2}}
-\def\Cubic {\dimensionpower{3}}
-
-\def\Inverse {\dimensionpower{-1}}
-\def\ILinear {\dimensionpower{-1}}
-\def\ISquare {\dimensionpower{-2}}
-\def\ICubic {\dimensionpower{-3}}
-
-%D Apart from these components, the units themselves are
-%D defined using the synonym mechanism. First we define some
-%D length and volume related units.
-
-\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!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!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]
- [u:sec=seconde,
- u:psec=picoseconde,
- u:fsec=femtoseconde,
- u:nsec=nanoseconde,
- u:usec=microseconde,
- u:msec=milliseconde,
- u:year=jaar,
- u:month=maand,
- u:week=week,
- u:day=dag,
- u:hour=uur,
- u:min=minuten]
-
-\setuplabeltext
- [\s!en]
- [u:sec=second,
- u:fsec=femtosecond,
- u:psec=picosecond,
- u:nsec=nanosecond,
- u:usec=microsecond,
- u:msec=millisecond,
- u:year=year,
- u:month=month,
- u:week=week,
- u:day=day,
- u:hour=hour,
- u:min=minutes]
-
-\setuplabeltext
- [\s!de]
- [u:sec=Sekunde,
- u:fsec=Femtosekunde,
- u:psec=Picosekunde,
- u:nsec=Nanosekunde,
- u:usec=Microsekunde,
- u:msec=Millisekunde,
- u:year=Jahr,
- u:month=Monat,
- u:week=Woche,
- u:day=Tag,
- u:hour=Stunde,
- u:min=Minuten]
-
-\setuplabeltext
- [\s!hr]
- [u:sec=sekunda,
- u:fsec=femtosekunda,
- u:psec=pikosekunda,
- u:nsec=nanosekunda,
- u:usec=mikrosekunda,
- u:msec=milisekunda,
- u:year=godina,
- u:month=mjesec,
- u:week=tjedan,
- u:day=dan,
- u:hour=sat,
- u:min=minuta]
-
-\setuplabeltext
- [\s!it]
- [u:sec=secondo,
- u:fsec=femtosecondo,
- u:psec=picosecondo,
- u:nsec=nanosecondo,
- u:usec=microsecondo,
- u:msec=millisecondo,
- u:year=anno,
- u:month=mese,
- u:week=settimana,
- u:day=giorno,
- u:hour=ora,
- u:min=minuti]
-
-%D Then we define some angles.
-
-\getvalue{\v!unit} [Rad] {rad} {\labeltext{u:rad}}
-\getvalue{\v!unit} [Deg] {{\mathematics{\normalsuperscript\circ}}} {\labeltext{u:deg}}
-
-\setuplabeltext
- [\s!nl]
- [u:rad=hoek radialen,
- u:deg=hoek graden]
-
-\setuplabeltext
- [\s!en]
- [u:rad=angle radians,
- u:deg=angle degrees]
-
-\setuplabeltext
- [\s!de]
- [u:rad=Bogenma\SS,
- u:deg=Gradma\SS]
-
-\setuplabeltext
- [\s!hr]
- [u:rad=radijani,
- u:deg=kutni stupnjevi]
-
-\setuplabeltext
- [\s!it]
- [u:rad=radianti,
- u:deg=angoli sessagesimali]
-
-%D Rotation and frequency related units are defined by:
-
-\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!unit} [RevPerSec] {RPS} {\labeltext{u:rps}}
-\getvalue{\v!unit} [RevPerMin] {RPM} {\labeltext{u:rpm}}
-
-\setuplabeltext
- [\s!nl]
- [u:rps=omwentelingen per seconde,
- u:rpm=omwentelingen per minuut]
-
-\setuplabeltext
- [\s!en]
- [u:rps=revolutions per second,
- u:rpm=revolutions per minute]
-
-\setuplabeltext
- [\s!de]
- [u:rps=Umdrehungen pro Sekunde,
- u:rpm=Umdrehungen pro Minute]
-
-\setuplabeltext
- [\s!hr]
- [u:rps=okretaji po sekundi,
- u:rpm=okretaji po minuti]
-
-\setuplabeltext
- [\s!it]
- [u:rps=giri al secondo,
- u:rpm=giri al minuto]
-
-%D Mass and force:
-
-\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!unit} [Newton] {N} {Newton}
-\getvalue{\v!unit} [kNewton] {\Kilo \Newton} {kilo Newton}
-
-\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]
- [u:u=atomaire massa eenheid]
-
-\setuplabeltext
- [\s!en]
- [u:u=atom mass unit]
-
-\setuplabeltext
- [\s!de]
- [u:u=Atomare Masseneinheit]
-
-\setuplabeltext
- [\s!hr]
- [u:u=unificirana atomska jedinica mase]
-
-\setuplabeltext
- [\s!it]
- [u:u=unit\`a di massa atomica]
-
-%D Energy units comes in two alternatives:
-
-\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!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!unit} [Celsius] {C} {Celsius}
-\getvalue{\v!unit} [Kelvin] {K} {Kelvin}
-\getvalue{\v!unit} [Fahrenheit] {F} {Fahrenheit}
-
-%D Some chemic related units are:
-
-\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!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!unit} [Ohm] {\Omega} {Ohm}
-\getvalue{\v!unit} [kOhm] {\Kilo \Ohm} {kilo Ohm}
-
-\getvalue{\v!unit} [Siemens] {S} {Siemens}
-
-\getvalue{\v!unit} [Ampere] {A} {Amp\`ere}
-\getvalue{\v!unit} [mAmpere] {\Milli \Ampere} {milli Amp\`ere}
-
-\getvalue{\v!unit} [Coulomb] {C} {Coulomb}
-
-\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!unit} [Tesla] {T} {Tesla}
-
-\getvalue{\v!unit} [VoltAC] {V\normalsubscript{\xbox{ac}}} {\labeltext{u:vac}}
-\getvalue{\v!unit} [VoltDC] {V\normalsubscript{\xbox{dc}}} {\labeltext{u:vdc}}
-
-\setuplabeltext
- [\s!nl]
- [u:vac=wisselspanning,
- u:vdc=gelijkspanning]
-
-\setuplabeltext
- [\s!en]
- [u:vac=alternating current,
- u:vdc=direct current]
-
-\setuplabeltext
- [\s!de]
- [u:vac=Wechselspannung,
- u:vdc=Gleichspannung]
-
-\setuplabeltext
- [\s!hr]
- [u:vac=izmjeni\ccaron ni napon,
- u:vdc=istosmjerni napon]
-
-\setuplabeltext
- [\s!it]
- [u:vac=corrente alternata,
- u:vdc=corrente continua]
-
-%D Network bandwidth is specified in Bits:
-
-\getvalue{\v!unit} [Bit] {bit} {\labeltext{u:bit}}
-\getvalue{\v!unit} [Baud] {Bd} {Baud (Bit/s)}
-
-%D Computer memory size is specified in Bytes:
-
-\getvalue{\v!unit} [Byte] {B} {\labeltext{u: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}
-
-\setuplabeltext
- [\s!en]
- [u:bit=Bit,
- u:byte=Byte]
-
-\setuplabeltext
- [\s!hr]
- [u:bit=bit,
- u:byte=bajt]
-
-%D Telecommunication call density is specified in Erlangs:
-
-\getvalue{\v!unit} [Erlang] {E} {Erlang}
-
-%D Some radiation related units:
-
-\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!unit} [Candela] {cd} {Candela}
-
-%D and some sound ones:
-
-\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!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} {\labeltext{u: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!unit} [Percent] {\xPercent } {percent}
-\getvalue{\v!unit} [Permille] {\xPromille} {promille}
-\getvalue{\v!unit} [Promille] {\xPromille} {promille}
-
-%D Some more, thanks to Tobias:
-
-\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]
- [u:at=technische atmosfeer,
- u:atm=fysische atmosfeer,
- u:ft=voet,
- u:cal=calorie,
- u:f=kracht (force),
- u:kcal=kilocalorie]
-
-\setuplabeltext
- [\s!en]
- [u:at=technical atmospheric pressure,
- u:atm=physical atmospheric pressure,
- u:ft=foot,
- u:inch=inch,
- u:cal=calory,
- u:f=force,
- u:kcal=kilocalory]
-
-\setuplabeltext
- [\s!de]
- [u:at=Technischer atmosph\"arischer Druck,
- u:atm=physkalischer atmosph\"arischer Druck,
- u:ft=Fu\SS,
- u:cal=Kalorien,
- u:f=Force,
- u:kcal=Kilokalorien]
-
-\setuplabeltext
- [\s!hr]
- [u:at=tehni\ccaron ka atmosfera,
- u:atm=standardna atmosfera,
- u:ft=stopa,
- u:inch=in\ccaron a,
- u:cal=kalorija,
- u:f=Force,
- u:kcal=Kilokalorien]
-
-\setuplabeltext
- [\s!it]
- [u:at=pressione atmosferica tecnica,
- u:atm=pressione atmosfera fisica,
- u:ft=piede,
- u:cal=caloria,
- u:f=forza,
- u:kcal=chilocaloria]
-
-%D Here are some old ones, still there for compatibility
-%D reasons. These will probably be obsolete in a few years.
-
-\def\MeterTwee {\Square \Meter}
-\def\mMeterTwee {\Square \Milli \Meter}
-\def\cMeterTwee {\Square \Centi \Meter}
-\def\dMeterTwee {\Square \Deci \Meter}
-\def\kMeterTwee {\Square \Kilo \Meter}
-
-\def\MeterDrie {\Cubic \Meter}
-\def\mMeterDrie {\Cubic \Milli \Meter}
-\def\cMeterDrie {\Kubic \Centi \Meter}
-\def\dMeterDrie {\Cubic \Deci \Meter}
-\def\kMeterDrie {\Cubic \Kilo \Meter}
-
-\def\LiterTwee {\Square \Liter}
-\def\SecTwee {\Square \Sec}
-\def\SecMinEen {\Inverse \Sec}
-
-%D To make ourselves happy, we define some dutch specific
-%D units:
-
-\startinterface dutch
-
- \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
- \let \Graden \Deg
- \let \PaardeKracht \PaardenKracht
- \let \Atoom \Atom
- \let \Heure \Hour
- \let \Jaar \Year
- \let \Maand \Month
- \let \Dag \Day
- \let \Uur \Hour
-
-\stopinterface
-
-%D Finally we define some equivalents. By using \type {\let}
-%D we can be sure that they don't end up double in the lists of
-%D units.
-
-\let \Second \Sec
-\let \Kubic \Cubic
-\let \IKubic \ICubic
-
-%D Option:
-
-% \def\Micro{\dimensionprefix{\iftextdimensions\mathematics\mu \else\mu \fi}}
-% \def\Times{\dimensionnopfix{\iftextdimensions\mathematics\cdot\else\cdot\fi}}
-
-\stopmodule
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/m-visual.mkii b/Master/texmf-dist/tex/context/base/m-visual.mkii
deleted file mode 100644
index ae52f65718f..00000000000
--- a/Master/texmf-dist/tex/context/base/m-visual.mkii
+++ /dev/null
@@ -1,315 +0,0 @@
-%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 ADE \& \CONTEXT\ Development Team}]
-%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.
-
-%D For Mojca:
-%D
-%D \starttyping
-%D \def\simplethesis
-%D {\setupsystem[random=1234]
-%D \title{\fakewords{3}{4}}
-%D \placelist[chapter,section]
-%D \dorecurse{6}
-%D {\chapter{\fakewords{5}{10}}
-%D \dorecurse{5}
-%D {\section{\fakewords{2}{5}}
-%D \dorecurse{2}
-%D {\dorecurse{3}{\fakewords{100}{200}\endgraf}
-%D \placefigure{\fakewords{8}{15}}{\fakefigure{5cm}{3cm}{10cm}{5cm}}
-%D \dorecurse{2}{\fakewords{100}{200}\endgraf}}}}}
-%D
-%D \starttext
-%D \simplethesis
-%D \stoptext
-%D \stoptyping
-
-\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}
-
-\def\dorandomrecurse#1%
- {\getrandomcount\scratchcounter{1}{#1}%
- \dorecurse\scratchcounter}
-
-% 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=\v!off,
- \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 \type{\bodyfontgrid}\space test
-%D test \type{\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
-
-\def\showlowlevelstream
- {\def\PDFcode{\lowlevelstream\PDFcode\normalPDFcode}%
- \def\special{\lowlevelstream\special\normalspecial}}
-
-\def\showlowlevelstreamonly
- {\def\PDFcode{\lowlevelstream\PDFcode\gobbleoneargument}%
- \def\special{\lowlevelstream\special\gobbleoneargument}}
-
-\startnotmode[mkiv]
-
- \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}
-
-\stopnotmode
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/m-visual.mkiv b/Master/texmf-dist/tex/context/base/m-visual.mkiv
deleted file mode 100644
index d502159669a..00000000000
--- a/Master/texmf-dist/tex/context/base/m-visual.mkiv
+++ /dev/null
@@ -1,809 +0,0 @@
-%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 ADE \& \CONTEXT\ Development Team}]
-%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 Much will probably be replaced by \LUA\ based solutions which is
-%D rather trivial and fun doing.
-
-%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
-
-\unexpanded\def\fakerule#1%
- {\strut
- \begingroup
- \directcolored[fakerulecolor]%
- \iffakebaseline
- \vrule\s!height1.25ex\s!depth-.05ex\s!width#1%
- \kern-#1%
- \vrule\s!height-.05ex\s!depth .25ex\s!width#1%
- \else
- \vrule\s!height1.25ex\s!depth .25ex\s!width#1%
- \fi
- \endgroup
- \allowbreak}
-
-\unexpanded\def\dorandomrecurse#1%
- {\getrandomcount\scratchcounter{1}{#1}%
- \dorecurse\scratchcounter}
-
-% 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}
-
-\unexpanded\def\showfakewords
- {\let\dofakewords\doshowfakewords}
-
-\unexpanded\def\fakeword
- {\fakewords{1}{1}} % no \plusone
-
-\unexpanded\def\fakeparindent
- {\noindent
- \ifindentation
- \ifx\dofakedroppedcaps\relax
- {\fakeparindentcolor
- \vrule
- \s!height \strutheight % not longer .5ex
- \s!depth \strutdepth % not longer 0pt
- \s!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
- \s!width#1\wd\scratchbox
- \s!height\ht\scratchbox
- \s!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}
-
-\unexpanded\def\fakefigure
- {\dodoubleempty\dofakefigure}
-
-\def\dofakefigure[#1][#2]#3#4#5#6% [] [] minwidth maxwidth minheight maxheight
- {\getvalue{\e!place\v!figure}
- [#1][#2]%
- {\freezerandomseed
- \let\endstrut\relax
- \let\begstrut\relax
- \doifelseinset{#1}{\v!left,\v!right}
- {\fakewords{2}{4}}
- {\fakewords{4}{10}}}%
- {\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=\v!off,
- \c!background=\v!color,
- \c!backgroundcolor=fakeparindentcolor]
- {\bf\white#1}}%
- \defrostrandomseed}
-
-\unexpanded\def\fakeimage#1#2#3#4%
- {\getrandomdimen{\dimen0}{#1}{#3}%
- \getrandomdimen{\dimen2}{#2}{#4}%
- \framed
- [\c!width=\dimen0,
- \c!height=\dimen2,
- \c!frame=\v!off,
- \c!background=\v!color,
- \c!backgroundcolor=fakeparindentcolor]
- {}}
-
-\unexpanded\def\fakeformula
- {\dimen0\zeropoint
- \getrandomcount\scratchcounter{3}{6}%
- \dorecurse\scratchcounter
- {\getrandomdimen\scratchdimen{0.5em}{1.5em}%
- \mathord{\red\fakerule\scratchdimen}%
- \ifnum\recurselevel<\scratchcounter+\fi
- \advance\scratchdimen\dimen0}%
- =\mathinner{\red\fakerule\scratchdimen}}
-
-\unexpanded\def\fakespacingformula
- {\color[fakebaselinecolor]{\ruledbaseline}\fakeformula}
-
-%D test \type{\bodyfontgrid}\space test
-%D test \type{\emexgrid} \space test
-
-\unexpanded\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\s!width6\linewidth\s!height3\linewidth\s!depth3\linewidth
- \hss}}}
-
-\unexpanded\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]}}}
-
-\unexpanded\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 For Mojca:
-
-\unexpanded\def\simplethesis
- {\setupsystem[random=1234]
- \title{\fakewords{3}{4}}
- \placelist[chapter,section]
- \dorecurse{6}
- {\chapter{\fakewords{5}{10}}
- \dorecurse{5}
- {\section{\fakewords{2}{5}}
- \dorecurse{2}
- {\dorecurse{3}{\fakewords{100}{200}\endgraf}
- \placefigure{\fakewords{8}{15}}{\fakeimage{5cm}{3cm}{10cm}{5cm}}
- \dorecurse{2}{\fakewords{100}{200}\endgraf}}}}}
-
-%D Moved code:
-
-%D \module
-%D [ file=trac-vis, % was core-vis,
-%D version=1996.06.01,
-%D title=\CONTEXT\ Tracking Macros,
-%D subtitle=Visualization,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 adds some more visualization cues to the ones
-%D supplied in the support module.
-%D
-%D %\everypar dual character, \the\everypar and \everypar=
-%D %\hrule cannot be grabbed in advance, switches mode
-%D %\vrule cannot be grabbed in advance, switches mode
-%D %
-%D %\indent only explicit ones
-%D %\noindent only explicit ones
-%D %\par only explicit ones
-%D
-%D %\leftskip only if explicit one
-%D %\rightskip only if explicit one
-
-\writestatus{loading}{ConTeXt Tracking Macros / Visualization}
-
-\unprotect
-
-%D \macros
-%D {indent, noindent, par}
-%D
-%D \TeX\ acts upon paragraphs. In mosts documents paragraphs
-%D are separated by empty lines, which internally are handled as
-%D \type{\par}. Paragraphs can be indented or not, depending on
-%D the setting of \type{\parindent}, the first token of a
-%D paragraph and/or user suppressed or forced indentation.
-%D
-%D Because the actual typesetting is based on both explicit
-%D user and implicit system actions, visualization is only
-%D possible for the user supplied \type{\indent},
-%D \type{\noindent}, and \type{\par}. Other
-%D 'clever' tricks will quite certainly lead to more failures
-%D than successes, so we only support these three explicit
-%D primitives and one macro:
-
-\unexpanded\def\showparagraphcue#1#2#3#4#5%
- {\bgroup
- \scratchdimen#1\relax
- \dontinterfere
- \dontcomplain
- %boxrulewidth5\testrulewidth
- #3#4\relax
- \setbox\scratchbox\normalhbox to \scratchdimen
- {#2{\ruledhbox to \scratchdimen
- {\vrule #5 20\testrulewidth \s!width \zeropoint
- \normalhss}}}%
- \smashbox\scratchbox
- \normalpenalty\plustenthousand
- \box\scratchbox
- \egroup}
-
-\unexpanded\def\ruledhanging
- {\ifdim\hangindent>\zeropoint
- \ifnum\hangafter<\zerocount
- \normalhbox
- {%boxrulewidth5\testrulewidth
- \setbox\scratchbox\ruledhbox to \hangindent
- {\scratchdimen\strutht
- \advance\scratchdimen \strutdp
- \vrule
- \s!width \zeropoint
- \s!height \zeropoint
- \s!depth -\hangafter\scratchdimen}%
- \normalhskip-\hangindent
- \smashbox\scratchbox
- \raise\strutht\box\scratchbox}%
- \fi
- \fi}
-
-\unexpanded\def\ruledparagraphcues
- {\bgroup
- \dontcomplain
- \normalhbox to \zeropoint
- {\ifdim\leftskip>\zeropoint\relax
- \showparagraphcue\leftskip\llap\relax\relax\!!depth
- \normalhskip-\leftskip
- \fi
- \ruledhanging
- \normalhskip\hsize
- \ifdim\rightskip>\zeropoint\relax
- \normalhskip-\rightskip
- \showparagraphcue\rightskip\relax\relax\relax\!!depth
- \fi}%
- \egroup}
-
-\unexpanded\def\ruledpar
- {\relax
- \ifhmode
- \showparagraphcue{40\testrulewidth}\relax\rightrulefalse\relax\s!height
- \fi
- \normalpar}
-
-\unexpanded\def\rulednoindent
- {\relax
- \normalnoindent
- \ruledparagraphcues
- \showparagraphcue{40\testrulewidth}\llap\leftrulefalse\relax\s!height}
-
-\unexpanded\def\ruledindent
- {\relax
- \normalnoindent
- \ruledparagraphcues
- \ifdim\parindent>\zeropoint
- \showparagraphcue\parindent\relax\relax\relax\s!height
- \else
- \showparagraphcue{40\testrulewidth}\llap\relax\relax\s!height
- \fi
- \normalhskip\parindent}
-
-\unexpanded\def\dontshowimplicits
- {\let\noindent \normalnoindent
- \let\indent \normalindent
- \let\par \normalpar}
-
-\unexpanded\def\showimplicits
- {\testrulewidth \defaulttestrulewidth
- \let\noindent \rulednoindent
- \let\indent \ruledindent
- \let\par \ruledpar}
-
-%D The next few||line examples show the four cues. Keep in
-%D mind that we only see them when we explicitly open or close
-%D a paragraph.
-%D
-%D \bgroup
-%D \def\voorbeeld#1%
-%D {#1Visualizing some \TeX\ primitives and Plain \TeX\
-%D macros can be very instructive, at least it is to me.
-%D Here we see {\tt\string#1} and {\tt\string\ruledpar} in
-%D action, while {\tt\string\parindent} equals
-%D {\tt\the\parindent}.\ruledpar}
-%D
-%D \showimplicits
-%D
-%D \voorbeeld \indent
-%D \voorbeeld \noindent
-%D
-%D \parindent=60pt
-%D
-%D \voorbeeld \indent
-%D \voorbeeld \noindent
-%D
-%D \startnarrower
-%D \voorbeeld \indent
-%D \voorbeeld \noindent
-%D \stopnarrower
-%D \egroup
-%D
-%D These examples also demonstrate the visualization of
-%D \type {\leftskip} and \type {\rightskip}. The macro
-%D \type {\nofruledbaselines} determines the number of lines
-%D shown.
-
-\newcounter\ruledbaselines
-
-\def\nofruledbaselines{3}
-
-\unexpanded\def\ruledbaseline
- {\vrule \s!width \zeropoint
- \bgroup
- \dontinterfere
- \doglobal\increment\ruledbaselines
- \scratchdimen\nofruledbaselines\baselineskip
- \setbox\scratchbox\normalvbox to 2\scratchdimen
- {\leaders
- \normalhbox
- {\strut
- \vrule
- \s!height \testrulewidth
- \s!depth \testrulewidth
- \s!width 120\points}
- \normalvfill}%
- \smashbox\scratchbox
- \advance\scratchdimen \strutheightfactor\baselineskip
- \setbox\scratchbox\normalhbox
- {\normalhskip -48\points
- \normalhbox to 24\points
- {\normalhss
- {\ttxx\ruledbaselines}%
- \normalhskip6\points}%
- \raise\scratchdimen\box\scratchbox}%
- \smashbox\scratchbox
- \box\scratchbox
- \egroup}
-
-\unexpanded\def\showbaselines
- {\testrulewidth\defaulttestrulewidth
- \EveryPar{\ruledbaseline}}
-
-%D \macros
-%D {showpagebuilder}
-%D
-%D The next tracing option probaly is only of use to me and a
-%D few \CONTEXT\ hackers.
-
-\unexpanded\def\showpagebuilder
- {\EveryPar{\doshowpagebuilder}}
-
-\unexpanded\def\doshowpagebuilder
- {\strut\llap
- {\startcolor[blue]\vl
- \high{\infofont v:\the\vsize }\vl
- \high{\infofont g:\the\pagegoal }\vl
- \high{\infofont t:\the\pagetotal}\vl
- \stopcolor}}
-
-%D \macros
-%D {colormarkbox,rastermarkbox}
-%D
-%D This macro is used in the pagebody routine. No other use
-%D is advocated here.
-%D
-%D \starttyping
-%D \colormarkbox0
-%D \stoptyping
-
-\def\colormarkoffset{\cutmarkoffset}
-\def\colormarklength{\cutmarklength}
-
-\def\dodocolorrangeA#1%
- {\fastcolored[#1]{\hrule\s!width3em\s!height\scratchdimen\s!depth\zeropoint}}
-
-\def\docolorrangeA#1 #2 %
- {\vbox
- {\hsize3em % \scratchdimen
- \ifcase#1\or
- \dodocolorrangeA{c=#2}\or
- \dodocolorrangeA{m=#2}\or
- \dodocolorrangeA{y=#2}\or
- \dodocolorrangeA{m=#2,y=#2}\or
- \dodocolorrangeA{c=#2,y=#2}\or
- \dodocolorrangeA{c=#2,m=#2}\fi
- \ifdim\scratchdimen>1ex
- \vskip-\scratchdimen
- \vbox to \scratchdimen
- {\vss\hbox to 3em{\hss#2\hss}\vss}%
- \fi}}
-
-\def\colorrangeA#1%
- {\vbox
- {\startcolor[\s!white]%
- \scratchdimen\dimexpr(-\colormarklength*4+\tractempheight+\tractempdepth)/21\relax
- \offinterlineskip
- \docolorrangeA #1 1.00 \docolorrangeA #1 0.95
- \docolorrangeA #1 0.75
- \docolorrangeA #1 0.50
- \docolorrangeA #1 0.25 \docolorrangeA #1 0.05
- \docolorrangeA #1 0.00
- \stopcolor}}
-
-\def\docolorrangeB #1 #2 #3 #4 #5 %
- {\fastcolored
- [\c!c=#2,\c!m=#3,\c!y=#4,\c!k=#5]
- {\vrule\s!width\scratchdimen\s!height\colormarklength\s!depth\zeropoint}%
- \ifdim\scratchdimen>2em
- \hskip-\scratchdimen
- \vbox to \colormarklength
- {\vss\hbox to \scratchdimen{\hss#1\hss}\vss}%
- \fi}
-
-\def\colorrangeB
- {\hbox
- {\startcolor[\s!white]%
- \scratchdimen\dimexpr(-\colormarklength*\plustwo+\tractempwidth)/11\relax
- \docolorrangeB .5~C .5 0 0 0
- \docolorrangeB .5~M 0 .5 0 0
- \docolorrangeB .5~Y 0 0 .5 0
- \docolorrangeB .5~K 0 0 0 .5
- \docolorrangeB C 1 0 0 0
- \docolorrangeB G 1 0 1 0
- \docolorrangeB Y 0 0 1 0
- \docolorrangeB R 0 1 1 0
- \docolorrangeB M 0 1 0 0
- \docolorrangeB B 1 1 0 0
- \docolorrangeB K 0 0 0 1
- \stopcolor}}
-
-\def\docolorrangeC#1 %
- {\fastcolored
- [\c!s=#1]%
- {\vrule\s!width\scratchdimen\s!height\colormarklength\s!depth\zeropoint}%
- \ifdim\scratchdimen>2em
- \hskip-\scratchdimen
- \vbox to \colormarklength
- {\vss\hbox to \scratchdimen{\hss#1\hss}\vss}%
- \fi}
-
-\def\colorrangeC
- {\hbox
- {\startcolor[\s!white]%
- \scratchdimen\dimexpr(-\colormarklength*2+\tractempwidth)/14\relax
- \docolorrangeC 1 \docolorrangeC .95
- \docolorrangeC .9 \docolorrangeC .85
- \docolorrangeC .8 \docolorrangeC .75
- \docolorrangeC .7
- \docolorrangeC .6
- \docolorrangeC .5
- \docolorrangeC .4
- \docolorrangeC .3
- \docolorrangeC .2
- \docolorrangeC .1
- \docolorrangeC 0
- \stopcolor}}
-
-\def\docolormarkbox#1#2%
- {\tractempheight\ht#2%
- \tractempdepth \dp#2%
- \tractempwidth \wd#2%
- \setbox#2\hbox
- {\scratchdimen\dimexpr\colormarklength/2\relax
- \forgetall
- \ssxx
- \setbox\scratchbox\vbox
- {\offinterlineskip
- \vskip\dimexpr-\colormarkoffset\scratchdimen-2\scratchdimen\relax
- \ifcase#1\relax
- \vskip\dimexpr\colormarklength+\scratchdimen+\tractempheight\relax
- \else
- \hbox to \tractempwidth{\hss\hbox{\colorrangeB}\hss}%
- \vskip\colormarkoffset\scratchdimen
- \vbox to \tractempheight
- {\vss
- \hbox to \tractempwidth
- {\llap{\colorrangeA1\hskip\colormarkoffset\scratchdimen}\hfill
- \rlap{\hskip\colormarkoffset\scratchdimen\colorrangeA4}}%
- \vss
- \hbox to \tractempwidth
- {\llap{\colorrangeA2\hskip\colormarkoffset\scratchdimen}\hfill
- \rlap{\hskip\colormarkoffset\scratchdimen\colorrangeA5}}%
- \vss
- \hbox to \tractempwidth
- {\llap{\colorrangeA3\hskip\colormarkoffset\scratchdimen}\hfill
- \rlap{\hskip\colormarkoffset\scratchdimen\colorrangeA6}}%
- \vss}%
- \fi
- \vskip\colormarkoffset\scratchdimen
- \hbox to \tractempwidth
- {\hss\lower\tractempdepth\hbox{\colorrangeC}\hss}}%
- \ht\scratchbox\tractempheight
- \dp\scratchbox\tractempdepth
- \wd\scratchbox\zeropoint
- \box\scratchbox
- \box#2}%
- \wd#2\tractempwidth
- \ht#2\tractempheight
- \dp#2\tractempdepth}
-
-\unexpanded\def\colormarkbox {\docolormarkbox\plusone } % #1
-\unexpanded\def\rastermarkbox{\docolormarkbox\zerocount} % #1
-
-%D \macros
-%D {showwhatsits, dontshowwhatsits}
-%D
-%D \TEX\ has three so called whatsits: \type {\mark}, \type
-%D {\write} and \type {\special}. The first one keeps track of
-%D the current state at page boundaries, the last two are used
-%D to communicate to the outside world. Due to fact that
-%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 \setupcolors[state=start]
-%D
-%D Whatsits show up \color[blue]{in color} and are
-%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
-%D \egroup
-
-\newif\ifimmediatewrite
-
-\let\supernormalmark \normalmark % mark may already been superseded
-\let\supernormalmarks \normalmarks % mark may already been superseded
-
-\unexpanded\def\showwhatsits
- {\protected\def\normalmark {\visualwhatsit100+m\supernormalmark }%
- \protected\def\normalmarks{\visualwhatsit100+m\supernormalmarks}%
- \protected\def\special {\visualwhatsit0100s\normalspecial }%
- \protected\def\write {\visualwhatsit001-w\normalwrite }%
- \let\immediate\immediatewhatsit
- \appendtoks\dontshowwhatsits\to\everystoptext}
-
-\unexpanded\def\immediatewhatsit
- {\bgroup\futurelet\next\doimmediatewhatsit}
-
-\unexpanded\def\doimmediatewhatsit
- {\ifx\next\write
- \egroup\immediatewritetrue
- \else
- \egroup\expandafter\normalimmediate
- \fi}
-
-\unexpanded\def\dontshowwhatsits
- {\let\immediate \normalimmediate
- \let\normalmark\supernormalmark
- \let\special \normalspecial
- \let\write \normalwrite}
-
-\unexpanded\def\visualwhatsit#1#2#3#4#5%
- {\bgroup
- \pushwhatsit
- \dontinterfere
- \dontcomplain
- \dontshowcomposition
- \dontshowwhatsits
- \ttx
- \ifvmode\donetrue\else\donefalse\fi
- \setbox\scratchbox\hbox
- {\ifdone
- \colored[r=#1,g=#2,b=#3]{#5}% temp hack
- \else
- \colored[s=0]{#5}% temp hack
- \fi}%
- \setbox\scratchbox\hbox
- {\ifdone
- \colored[r=#1,g=#2,b=#3]{\vrule\s!width\wd\scratchbox}% temp hack
- \else
- \colored[s=0]{\vrule\s!width\wd\scratchbox}% temp hack
- \fi
- \hskip-\wd\scratchbox\box\scratchbox}%
- \scratchdimen1ex
- \setbox\scratchbox\hbox
- {\ifdone\hskip\else\raise#4\fi\scratchdimen\box\scratchbox}%
- \smashbox\scratchbox
- \ifdone\nointerlineskip\fi
- \box\scratchbox
- \ifvmode\nointerlineskip\fi
- \popwhatsit
- \egroup
- \ifimmediatewrite
- \immediatewritefalse
- \expandafter\normalimmediate
- \fi}
-
-\unexpanded\def\pushwhatsit
- {\ifzeropt\lastskip
- \ifcase\lastpenalty
- \ifzeropt\lastkern
- \ifhmode
- \let\popwhatsit\relax
- \else
- \edef\popwhatsit{\prevdepth\the\prevdepth}%
- \fi
- \else
- \ifhmode
- \edef\popwhatsit{\kern\the\lastkern}\unkern
- \else
- \edef\popwhatsit{\kern\the\lastkern\prevdepth\the\prevdepth}%
- \kern-\lastkern
- \fi
- \fi
- \else
- \ifhmode
- \edef\popwhatsit{\the\lastpenalty}%
- \unpenalty
- \else
- \edef\popwhatsit{\penalty\the\lastpenalty\prevdepth\the\prevdepth}%
- %\nobreak
- \fi
- \fi
- \else
- \ifhmode
- \edef\popwhatsit{\hskip\the\lastskip}\unskip
- \else
- \edef\popwhatsit{\vskip\the\lastskip\prevdepth\the\prevdepth}%
- \vskip-\lastskip
- \fi
- \fi}
-
-%D The next macro can be used to keep track of classes of
-%D boxes (handy for development cq.\ tracing).
-
-\def\dodotagbox#1#2#3% can be reimplemented
- {\def\next##1##2##3##4%
- {\vbox to \ht#2{##3\hbox to \wd#2{##1#3##2}##4}}%
- \processaction
- [#1]
- [ l=>\next\relax\hfill\vfill\vfill,
- r=>\next\hfill\relax\vfill\vfill,
- t=>\next\hfill\hfill\relax\vfill,
- b=>\next\hfill\hfill\vfill\relax,
- lt=>\next\relax\hfill\relax\vfill,
- lb=>\next\relax\hfill\vfill\relax,
- rt=>\next\hfill\relax\relax\vfill,
- rb=>\next\hfill\relax\vfill\relax,
- tl=>\next\relax\hfill\relax\vfill,
- bl=>\next\relax\hfill\vfill\relax,
- tr=>\next\hfill\relax\relax\vfill,
- br=>\next\hfill\relax\vfill\relax,
- \s!default=>\next\hfill\hfill\vfill\vfill,
- \s!unknown=>\next\hfill\hfill\vfill\vfill]}
-
-\def\dotagbox[#1]#2%
- {\bgroup
- \dowithnextbox
- {\setbox\scratchbox\flushnextbox
- \setbox\nextbox\ifhbox\nextbox\hbox\else\vbox\fi
- \bgroup
- \startoverlay
- {\copy\scratchbox}
- {\dodotagbox{#1}\scratchbox{\framed
- [\c!background=\v!color,\c!backgroundcolor=\v!gray]{#2}}}
- \stopoverlay
- \egroup
- \nextboxwd\the\wd\scratchbox
- \nextboxht\the\ht\scratchbox
- \nextboxdp\the\dp\scratchbox
- \flushnextbox
- \egroup}}
-
-\unexpanded\def\tagbox
- {\dosingleempty\dotagbox}
-
-%D \macros
-%D {coloredhbox,coloredvbox,coloredvtop,
-%D coloredstrut}
-%D
-%D The following visualizations are used in some of the manuals:
-
-\definecolor[boxcolor:ht][r=.5,g=.75,b=.5]
-\definecolor[boxcolor:dp][r=.5,g=.5,b=.75]
-\definecolor[boxcolor:wd][r=.75,g=.5,b=.5]
-\definecolor[strutcolor] [r=.5,g=.25,b=.25]
-
-\unexpanded\def\coloredbox#1%
- {\dowithnextbox{#1{\hbox
- {\blackrule[\c!width=\nextboxwd,\c!height=\nextboxht,\c!depth=\zeropoint,\c!color=boxcolor:ht]%
- \hskip-\nextboxwd
- \blackrule[\c!width=\nextboxwd,\c!height=\zeropoint,\c!depth=\nextboxdp,\c!color=boxcolor:dp]%
- \hskip-\nextboxwd
- \box\nextbox}}}#1}
-
-\unexpanded\def\coloredhbox{\coloredbox\hbox}
-\unexpanded\def\coloredvbox{\coloredbox\vbox}
-\unexpanded\def\coloredvtop{\coloredbox\vtop}
-
-\unexpanded\def\coloredstrut
- {\color[strutcolor]{\def\strutwidth{2\points}\setstrut\strut}}
-
-\protect
-
-\continueifinputfile{m-visual.mkiv}
-
-\starttext
- \simplethesis
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/m-zint.mkiv b/Master/texmf-dist/tex/context/base/m-zint.mkiv
deleted file mode 100644
index 4957c846173..00000000000
--- a/Master/texmf-dist/tex/context/base/m-zint.mkiv
+++ /dev/null
@@ -1,112 +0,0 @@
-%D \module
-%D [ file=m-zint,
-%D version=2010.12.07,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=Zint Barcode Generator,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Using \type {zint} seems to be the easiest way to generate
-%D (PDF417) barcodes so therefore we now have this module. There
-%D are proper (also windows) binaries at:
-%D
-%D \starttyping
-%D http://www.zint.org.uk
-%D \stoptyping
-%D
-%D There is a bit more code than needed as we want to be able to
-%D feed names.
-
-\startluacode
-
-moduledata.zint = { }
-
-local format, lower, gsub = string.format, string.lower, string.gsub
-local patterns = lpeg.patterns
-
-local zint = "zint" -- '"c:/program files/zint/zint.exe"'
-local defaultcode = "PDF417"
-
-local whitespace = patterns.whitespace
-local spaces = whitespace^0
-local key = (spaces / "") * patterns.digit^0 * (patterns.colon * spaces / "")
-local value = (whitespace / "" + (1 - key))^1
-local pattern = lpeg.Cf(lpeg.Ct("") * (lpeg.Cg((lpeg.Cs(key) / tonumber) * (lpeg.Cs(value) / lower)) + patterns.anything)^0,rawset)
-
-local reverse
-
-local function cleancode(code)
- if not code or code == "" then
- code = defaultcode
- end
- return lower(gsub(code," ",""))
-end
-
-local function numberofcode(code)
- if not reverse then
- local types = os.resultof(format("%s --types",zint)) or ""
- local formats = lpeg.match(pattern,types)
- if not formats or not next(formats) then
- return code
- end
- reverse = table.swapped(formats) or { }
- end
- code = cleancode(code)
- return reverse[code] or code
-end
-
-function moduledata.zint.generate(code,data,suffix,options)
- if not data or data == "" then
- data = "unset"
- end
- local code = cleancode(code)
- local base = format("zint-%s-%s",code,md5.hex(data))
- local name = file.addsuffix(base,suffix or "eps")
- if not lfs.isfile(name) then
- local temp = file.addsuffix(base,"tmp")
- local code = numberofcode(code)
- logs.simple("using 'zint' to generate '%s'",base)
- io.savedata(temp,data)
- os.execute(format('%s --barcode=%s --output="%s" --input="%s" %s',zint,code,name,temp,options or ""))
- os.remove(temp)
- end
- return name
-end
-
-\stopluacode
-
-\unprotect
-
-\unexpanded\def\barcode[#1]% [alternative=,text=]
- {\bgroup
- \getdummyparameters
- [\c!alternative=,\c!text=,#1]%
- \externalfigure
- [\cldcontext{moduledata.zint.generate("\dummyparameter\c!alternative",\!!bs\dummyparameter\c!text\!!es)}]%
- [#1,\c!alternative=,\c!text=]%
- \egroup}
-
-\protect
-
-\continueifinputfile{m-zint.mkiv}
-
-\starttext
-
- \externalfigure[\cldcontext{moduledata.zint.generate("PDF417",[[Hans Hagen]])}]
- \blank
- \externalfigure[\cldcontext{moduledata.zint.generate("PDF417","Ton Otten")}]
- \blank
- \externalfigure[\cldcontext{moduledata.zint.generate("ISBN","9789490688011")}]
- \blank
- \barcode[text=Does It Work?,width=\textwidth]
- \blank
- \barcode[alternative=isbn,text=9789490688011,width=3cm]
-
-\stoptext
-
-
diff --git a/Master/texmf-dist/tex/context/base/math-noa.lua b/Master/texmf-dist/tex/context/base/math-noa.lua
deleted file mode 100644
index cdbbe36c377..00000000000
--- a/Master/texmf-dist/tex/context/base/math-noa.lua
+++ /dev/null
@@ -1,1304 +0,0 @@
-if not modules then modules = { } end modules ['math-noa'] = {
- version = 1.001,
- comment = "companion to math-ini.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
--- beware: this is experimental code and there will be a more
--- generic (attribute value driven) interface too but for the
--- moment this is ok
---
--- we will also make dedicated processors (faster)
---
--- beware: names will change as we wil make noads.xxx.handler i.e. xxx
--- subnamespaces
-
--- 20D6 -> 2190
--- 20D7 -> 2192
-
-local utfchar, utfbyte = utf.char, utf.byte
-local formatters = string.formatters
-local div = math.div
-
-local fonts, nodes, node, mathematics = fonts, nodes, node, mathematics
-
-local otf = fonts.handlers.otf
-local otffeatures = fonts.constructors.newfeatures("otf")
-local registerotffeature = otffeatures.register
-
-local privateattribute = attributes.private
-local registertracker = trackers.register
-local registerdirective = directives.register
-local logreporter = logs.reporter
-
-local trace_remapping = false registertracker("math.remapping", function(v) trace_remapping = v end)
-local trace_processing = false registertracker("math.processing", function(v) trace_processing = v end)
-local trace_analyzing = false registertracker("math.analyzing", function(v) trace_analyzing = v end)
-local trace_normalizing = false registertracker("math.normalizing", function(v) trace_normalizing = v end)
-local trace_collapsing = false registertracker("math.collapsing", function(v) trace_collapsing = v end)
-local trace_patching = false registertracker("math.patching", function(v) trace_patching = v end)
-local trace_goodies = false registertracker("math.goodies", function(v) trace_goodies = v end)
-local trace_variants = false registertracker("math.variants", function(v) trace_variants = v end)
-local trace_alternates = false registertracker("math.alternates", function(v) trace_alternates = v end)
-local trace_italics = false registertracker("math.italics", function(v) trace_italics = v end)
-local trace_families = false registertracker("math.families", function(v) trace_families = v end)
-
-local check_coverage = true registerdirective("math.checkcoverage", function(v) check_coverage = v end)
-
-local report_processing = logreporter("mathematics","processing")
-local report_remapping = logreporter("mathematics","remapping")
-local report_normalizing = logreporter("mathematics","normalizing")
-local report_collapsing = logreporter("mathematics","collapsing")
-local report_patching = logreporter("mathematics","patching")
-local report_goodies = logreporter("mathematics","goodies")
-local report_variants = logreporter("mathematics","variants")
-local report_alternates = logreporter("mathematics","alternates")
-local report_italics = logreporter("mathematics","italics")
-local report_families = logreporter("mathematics","families")
-
-local a_mathrendering = privateattribute("mathrendering")
-local a_exportstatus = privateattribute("exportstatus")
-
-local nuts = nodes.nuts
-local nodepool = nuts.pool
-local tonut = nuts.tonut
-local nutstring = nuts.tostring
-
-local getfield = nuts.getfield
-local setfield = nuts.setfield
-local getnext = nuts.getnext
-local getprev = nuts.getprev
-local getid = nuts.getid
-local getfont = nuts.getfont
-local getsubtype = nuts.getsubtype
-local getchar = nuts.getchar
-local getattr = nuts.getattr
-local setattr = nuts.setattr
-
-local insert_node_after = nuts.insert_after
-local insert_node_before = nuts.insert_before
-local free_node = nuts.free
-local new_node = nuts.new -- todo: pool: math_noad math_sub
-local copy_node = nuts.copy
-
-local mlist_to_hlist = nodes.mlist_to_hlist
-
-local font_of_family = node.family_font
-
-local new_kern = nodepool.kern
-local new_rule = nodepool.rule
-
-local fonthashes = fonts.hashes
-local fontdata = fonthashes.identifiers
-local fontcharacters = fonthashes.characters
-local fontproperties = fonthashes.properties
-local fontitalics = fonthashes.italics
-local fontemwidths = fonthashes.emwidths
-local fontexheights = fonthashes.exheights
-
-local variables = interfaces.variables
-local texsetattribute = tex.setattribute
-local texgetattribute = tex.getattribute
-local unsetvalue = attributes.unsetvalue
-
-local chardata = characters.data
-
-noads = noads or { } -- todo: only here
-local noads = noads
-
-noads.processors = noads.processors or { }
-local processors = noads.processors
-
-noads.handlers = noads.handlers or { }
-local handlers = noads.handlers
-
-local tasks = nodes.tasks
-
-local nodecodes = nodes.nodecodes
-local noadcodes = nodes.noadcodes
-
-local noad_ord = noadcodes.ord
-local noad_rel = noadcodes.rel
-local noad_punct = noadcodes.punct
-local noad_opdisplaylimits= noadcodes.opdisplaylimits
-local noad_oplimits = noadcodes.oplimits
-local noad_opnolimits = noadcodes.opnolimits
-
-local math_noad = nodecodes.noad -- attr nucleus sub sup
-local math_accent = nodecodes.accent -- attr nucleus sub sup accent
-local math_radical = nodecodes.radical -- attr nucleus sub sup left degree
-local math_fraction = nodecodes.fraction -- attr nucleus sub sup left right
-local math_box = nodecodes.subbox -- attr list
-local math_sub = nodecodes.submlist -- attr list
-local math_char = nodecodes.mathchar -- attr fam char
-local math_textchar = nodecodes.mathtextchar -- attr fam char
-local math_delim = nodecodes.delim -- attr small_fam small_char large_fam large_char
-local math_style = nodecodes.style -- attr style
-local math_choice = nodecodes.choice -- attr display text script scriptscript
-local math_fence = nodecodes.fence -- attr subtype
-
-local hlist_code = nodecodes.hlist
-local glyph_code = nodecodes.glyph
-
-local left_fence_code = 1
-local right_fence_code = 3
-
-local function process(start,what,n,parent)
- if n then n = n + 1 else n = 0 end
- local prev = nil
- while start do
- local id = getid(start)
- if trace_processing then
- if id == math_noad then
- report_processing("%w%S, class %a",n*2,nutstring(start),noadcodes[getsubtype(start)])
- elseif id == math_char then
- local char = getchar(start)
- local fam = getfield(start,"fam")
- local font = font_of_family(fam)
- report_processing("%w%S, family %a, font %a, char %a, shape %c",n*2,nutstring(start),fam,font,char,char)
- else
- report_processing("%w%S",n*2,nutstring(start))
- end
- end
- local proc = what[id]
- if proc then
- -- report_processing("start processing")
- local done, newstart = proc(start,what,n,parent) -- prev is bugged: or getprev(start)
- if newstart then
- start = newstart
- -- report_processing("stop processing (new start)")
- else
- -- report_processing("stop processing")
- end
- elseif id == math_char or id == math_textchar or id == math_delim then
- break
- elseif id == math_noad then
-if prev then
- -- we have no proper prev in math nodes yet
- setfield(start,"prev",prev)
-end
-
- local noad = getfield(start,"nucleus") if noad then process(noad,what,n,start) end -- list
- noad = getfield(start,"sup") if noad then process(noad,what,n,start) end -- list
- noad = getfield(start,"sub") if noad then process(noad,what,n,start) end -- list
- elseif id == math_box or id == math_sub then
- local noad = getfield(start,"list") if noad then process(noad,what,n,start) end -- list (not getlist !)
- elseif id == math_fraction then
- local noad = getfield(start,"num") if noad then process(noad,what,n,start) end -- list
- noad = getfield(start,"denom") if noad then process(noad,what,n,start) end -- list
- noad = getfield(start,"left") if noad then process(noad,what,n,start) end -- delimiter
- noad = getfield(start,"right") if noad then process(noad,what,n,start) end -- delimiter
- elseif id == math_choice then
- local noad = getfield(start,"display") if noad then process(noad,what,n,start) end -- list
- noad = getfield(start,"text") if noad then process(noad,what,n,start) end -- list
- noad = getfield(start,"script") if noad then process(noad,what,n,start) end -- list
- noad = getfield(start,"scriptscript") if noad then process(noad,what,n,start) end -- list
- elseif id == math_fence then
- local noad = getfield(start,"delim") if noad then process(noad,what,n,start) end -- delimiter
- elseif id == math_radical then
- local noad = getfield(start,"nucleus") if noad then process(noad,what,n,start) end -- list
- noad = getfield(start,"sup") if noad then process(noad,what,n,start) end -- list
- noad = getfield(start,"sub") if noad then process(noad,what,n,start) end -- list
- noad = getfield(start,"left") if noad then process(noad,what,n,start) end -- delimiter
- noad = getfield(start,"degree") if noad then process(noad,what,n,start) end -- list
- elseif id == math_accent then
- local noad = getfield(start,"nucleus") if noad then process(noad,what,n,start) end -- list
- noad = getfield(start,"sup") if noad then process(noad,what,n,start) end -- list
- noad = getfield(start,"sub") if noad then process(noad,what,n,start) end -- list
- noad = getfield(start,"accent") if noad then process(noad,what,n,start) end -- list
- noad = getfield(start,"bot_accent") if noad then process(noad,what,n,start) end -- list
- elseif id == math_style then
- -- has a next
- else
- -- glue, penalty, etc
- end
-prev = start
- start = getnext(start)
- end
-end
-
-local function processnoads(head,actions,banner)
- if trace_processing then
- report_processing("start %a",banner)
- process(tonut(head),actions)
- report_processing("stop %a",banner)
- else
- process(tonut(head),actions)
- end
-end
-
-noads.process = processnoads
-
---
-
-local unknowns = { }
-local checked = { } -- simple case
-local tracked = false trackers.register("fonts.missing", function(v) tracked = v end)
-local cached = table.setmetatableindex("table") -- complex case
-
-local function errorchar(font,char)
- local done = unknowns[char]
- if done then
- unknowns[char] = done + 1
- else
- unknowns[char] = 1
- end
- if tracked then
- -- slower as we check each font too and we always replace as math has
- -- more demands than text
- local fake = cached[font][char]
- if fake then
- return fake
- else
- local kind, fake = fonts.checkers.placeholder(font,char)
- if not fake or kind ~= "char" then
- fake = 0x3F
- end
- cached[font][char] = fake
- return fake
- end
- else
- -- only simple checking, report at the end so one should take
- -- action anyway ... we can miss a few checks but that is ok
- -- as there is at least one reported
- if not checked[char] then
- if trace_normalizing then
- report_normalizing("character %C is not available",char)
- end
- checked[char] = true
- end
- return 0x3F
- end
-end
-
--- experiment (when not present fall back to fam 0) -- needs documentation
-
--- 0-2 regular
--- 3-5 bold
--- 6-8 pseudobold
-
--- this could best be integrated in the remapper, and if we run into problems, we
--- might as well do this
-
-local families = { }
-local a_mathfamily = privateattribute("mathfamily")
-local boldmap = mathematics.boldmap
-
-local familymap = { [0] =
- "regular",
- "regular",
- "regular",
- "bold",
- "bold",
- "bold",
- "pseudobold",
- "pseudobold",
- "pseudobold",
-}
-
-families[math_char] = function(pointer)
- if getfield(pointer,"fam") == 0 then
- local a = getattr(pointer,a_mathfamily)
- if a and a > 0 then
- setattr(pointer,a_mathfamily,0)
- if a > 5 then
- local char = getchar(pointer)
- local bold = boldmap[char]
- local newa = a - 3
- if not bold then
- if trace_families then
- report_families("no bold replacement for %C, family %s with remap %s becomes %s with remap %s",char,a,familymap[a],newa,familymap[newa])
- end
- setfield(pointer,"fam",newa)
- elseif not fontcharacters[font_of_family(newa)][bold] then
- if trace_families then
- report_families("no bold character for %C, family %s with remap %s becomes %s with remap %s",char,a,familymap[a],newa,familymap[newa])
- end
- if newa > 3 then
- setfield(pointer,"fam",newa-3)
- end
- else
- setattr(pointer,a_exportstatus,char)
- setfield(pointer,"char",bold)
- if trace_families then
- report_families("replacing %C by bold %C, family %s with remap %s becomes %s with remap %s",char,bold,a,familymap[a],newa,familymap[newa])
- end
- setfield(pointer,"fam",newa)
- end
- else
- local char = getchar(pointer)
- if not fontcharacters[font_of_family(a)][char] then
- if trace_families then
- report_families("no bold replacement for %C",char)
- end
- else
- if trace_families then
- report_families("family of %C becomes %s with remap %s",char,a,familymap[a])
- end
- setfield(pointer,"fam",a)
- end
- end
- end
- end
-end
-
-families[math_delim] = function(pointer)
- if getfield(pointer,"small_fam") == 0 then
- local a = getattr(pointer,a_mathfamily)
- if a and a > 0 then
- setattr(pointer,a_mathfamily,0)
- if a > 5 then
- -- no bold delimiters in unicode
- a = a - 3
- end
- local char = getfield(pointer,"small_char")
- local okay = fontcharacters[font_of_family(a)][char]
- if okay then
- setfield(pointer,"small_fam",a)
- elseif a > 2 then
- setfield(pointer,"small_fam",a-3)
- end
- local char = getfield(pointer,"large_char")
- local okay = fontcharacters[font_of_family(a)][char]
- if okay then
- setfield(pointer,"large_fam",a)
- elseif a > 2 then
- setfield(pointer,"large_fam",a-3)
- end
- else
- setfield(pointer,"small_fam",0)
- setfield(pointer,"large_fam",0)
- end
- end
-end
-
-families[math_textchar] = families[math_char]
-
-function handlers.families(head,style,penalties)
- processnoads(head,families,"families")
- return true
-end
-
--- character remapping
-
-local a_mathalphabet = privateattribute("mathalphabet")
-local a_mathgreek = privateattribute("mathgreek")
-
-processors.relocate = { }
-
-local function report_remap(tag,id,old,new,extra)
- report_remapping("remapping %s in font %s from %C to %C%s",tag,id,old,new,extra)
-end
-
-local remapalphabets = mathematics.remapalphabets
-local fallbackstyleattr = mathematics.fallbackstyleattr
-local setnodecolor = nodes.tracers.colors.set
-
-local function checked(pointer)
- local char = getchar(pointer)
- local fam = getfield(pointer,"fam")
- local id = font_of_family(fam)
- local tc = fontcharacters[id]
- if not tc[char] then
- local specials = characters.data[char].specials
- if specials and (specials[1] == "char" or specials[1] == "font") then
- newchar = specials[#specials]
- if trace_remapping then
- report_remap("fallback",id,char,newchar)
- end
- if trace_analyzing then
- setnodecolor(pointer,"font:isol")
- end
- setattr(pointer,a_exportstatus,char) -- testcase: exponentiale
- setfield(pointer,"char",newchar)
- return true
- end
- end
-end
-
-processors.relocate[math_char] = function(pointer)
- local g = getattr(pointer,a_mathgreek) or 0
- local a = getattr(pointer,a_mathalphabet) or 0
- local char = getchar(pointer)
- local fam = getfield(pointer,"fam")
- local font = font_of_family(fam)
- local characters = fontcharacters[font]
- if a > 0 or g > 0 then
- if a > 0 then
- setattr(pointer,a_mathgreek,0)
- end
- if g > 0 then
- setattr(pointer,a_mathalphabet,0)
- end
- local newchar = remapalphabets(char,a,g)
- if newchar then
- if characters[newchar] then
- if trace_remapping then
- report_remap("char",font,char,newchar)
- end
- if trace_analyzing then
- setnodecolor(pointer,"font:isol")
- end
- setfield(pointer,"char",newchar)
- return true
- else
- local fallback = fallbackstyleattr(a)
- if fallback then
- local newchar = remapalphabets(char,fallback,g)
- if newchar then
- if characters[newchar] then
- if trace_remapping then
- report_remap("char",font,char,newchar," (fallback remapping used)")
- end
- if trace_analyzing then
- setnodecolor(pointer,"font:isol")
- end
- setfield(pointer,"char",newchar)
- return true
- elseif trace_remapping then
- report_remap("char",font,char,newchar," fails (no fallback character)")
- end
- elseif trace_remapping then
- report_remap("char",font,char,newchar," fails (no fallback remap character)")
- end
- elseif trace_remapping then
- report_remap("char",font,char,newchar," fails (no fallback style)")
- end
- end
- end
- end
- if not characters[char] then
- setfield(pointer,"char",errorchar(font,char))
- end
- if trace_analyzing then
- setnodecolor(pointer,"font:medi")
- end
- if check_coverage then
- return checked(pointer)
- end
-end
-
-processors.relocate[math_textchar] = function(pointer)
- if trace_analyzing then
- setnodecolor(pointer,"font:init")
- end
-end
-
-processors.relocate[math_delim] = function(pointer)
- if trace_analyzing then
- setnodecolor(pointer,"font:fina")
- end
-end
-
-function handlers.relocate(head,style,penalties)
- processnoads(head,processors.relocate,"relocate")
- return true
-end
-
--- rendering (beware, not exported)
-
-processors.render = { }
-
-local rendersets = mathematics.renderings.numbers or { } -- store
-
-processors.render[math_char] = function(pointer)
- local attr = getattr(pointer,a_mathrendering)
- if attr and attr > 0 then
- local char = getchar(pointer)
- local renderset = rendersets[attr]
- if renderset then
- local newchar = renderset[char]
- if newchar then
- local fam = getfield(pointer,"fam")
- local font = font_of_family(fam)
- local characters = fontcharacters[font]
- if characters and characters[newchar] then
- setfield(pointer,"char",newchar)
- setattr(pointer,a_exportstatus,char)
- end
- end
- end
- end
-end
-
-function handlers.render(head,style,penalties)
- processnoads(head,processors.render,"render")
- return true
-end
-
--- some resize options (this works ok because the content is
--- empty and no larger next will be forced)
---
--- beware: we don't use \delcode but \Udelcode and as such have
--- no large_fam; also, we need to check for subtype and/or
--- small_fam not being 0 because \. sits in 0,0 by default
---
--- todo: just replace the character by an ord noad
--- and remove the right delimiter as well
-
-local mathsize = privateattribute("mathsize")
-
-local resize = { } processors.resize = resize
-
-resize[math_fence] = function(pointer)
- local subtype = getsubtype(pointer)
- if subtype == left_fence_code or subtype == right_fence_code then
- local a = getattr(pointer,mathsize)
- if a and a > 0 then
- local method, size = div(a,100), a % 100
- setattr(pointer,mathsize,0)
- local delimiter = getfield(pointer,"delim")
- local chr = getfield(delimiter,"small_char")
- if chr > 0 then
- local fam = getfield(delimiter,"small_fam")
- local id = font_of_family(fam)
- if id > 0 then
- setfield(delimiter,"small_char",mathematics.big(fontdata[id],chr,size,method))
- end
- end
- end
- end
-end
-
-function handlers.resize(head,style,penalties)
- processnoads(head,resize,"resize")
- return true
-end
-
--- normalize scripts
-
-local unscript = { } noads.processors.unscript = unscript
-local superscripts = characters.superscripts
-local subscripts = characters.subscripts
-local fractions = characters.fractions
-local replaced = { }
-
-local function replace(pointer,what,n,parent)
- pointer = parent -- we're following the parent list (chars trigger this)
- local next = getnext(pointer)
- local start_super, stop_super, start_sub, stop_sub
- local mode = "unset"
- while next and getid(next) == math_noad do
- local nextnucleus = getfield(next,"nucleus")
- if nextnucleus and getid(nextnucleus) == math_char and not getfield(next,"sub") and not getfield(next,"sup") then
- local char = getchar(nextnucleus)
- local s = superscripts[char]
- if s then
- if not start_super then
- start_super = next
- mode = "super"
- elseif mode == "sub" then
- break
- end
- stop_super = next
- next = getnext(next)
- setfield(nextnucleus,"char",s)
- replaced[char] = (replaced[char] or 0) + 1
- if trace_normalizing then
- report_normalizing("superscript %C becomes %C",char,s)
- end
- else
- local s = subscripts[char]
- if s then
- if not start_sub then
- start_sub = next
- mode = "sub"
- elseif mode == "super" then
- break
- end
- stop_sub = next
- next = getnext(next)
- setfield(nextnucleus,"char",s)
- replaced[char] = (replaced[char] or 0) + 1
- if trace_normalizing then
- report_normalizing("subscript %C becomes %C",char,s)
- end
- else
- break
- end
- end
- else
- break
- end
- end
- if start_super then
- if start_super == stop_super then
- setfield(pointer,"sup",getfield(start_super,"nucleus"))
- else
- local list = new_node(math_sub) -- todo attr
- setfield(list,"list",start_super)
- setfield(pointer,"sup",list)
- end
- if mode == "super" then
- setfield(pointer,"next",getnext(stop_super))
- end
- setfield(stop_super,"next",nil)
- end
- if start_sub then
- if start_sub == stop_sub then
- setfield(pointer,"sub",getfield(start_sub,"nucleus"))
- else
- local list = new_node(math_sub) -- todo attr
- setfield(list,"list",start_sub)
- setfield(pointer,"sub",list)
- end
- if mode == "sub" then
- setfield(pointer,"next",getnext(stop_sub))
- end
- setfield(stop_sub,"next",nil)
- end
- -- we could return stop
-end
-
-unscript[math_char] = replace -- not noads as we need to recurse
-
-function handlers.unscript(head,style,penalties)
- processnoads(head,unscript,"unscript")
--- processnoads(head,checkers,"checkers")
- return true
-end
-
-local function collected(list)
- if list and next(list) then
- local n, t = 0, { }
- for k, v in table.sortedpairs(list) do
- n = n + v
- t[#t+1] = formatters["%C"](k)
- end
- return formatters["% t (n=%s)"](t,n)
- end
-end
-
-statistics.register("math script replacements", function()
- return collected(replaced)
-end)
-
-statistics.register("unknown math characters", function()
- return collected(unknowns)
-end)
-
--- math alternates: (in xits lgf: $ABC$ $\cal ABC$ $\mathalternate{cal}\cal ABC$)
--- math alternates: (in lucidanova lgf: $ABC \mathalternate{italic} ABC$)
-
--- todo: set alternate for specific symbols
-
-local function initializemathalternates(tfmdata)
- local goodies = tfmdata.goodies
- if goodies then
- local shared = tfmdata.shared
- for i=1,#goodies do
- -- first one counts
- -- we can consider sharing the attributes ... todo (only once scan)
- local mathgoodies = goodies[i].mathematics
- local alternates = mathgoodies and mathgoodies.alternates
- if alternates then
- if trace_goodies then
- report_goodies("loading alternates for font %a",tfmdata.properties.name)
- end
- local lastattribute, attributes = 0, { }
- for k, v in next, alternates do
- lastattribute = lastattribute + 1
- v.attribute = lastattribute
- attributes[lastattribute] = v
- end
- shared.mathalternates = alternates -- to be checked if shared is ok here
- shared.mathalternatesattributes = attributes -- to be checked if shared is ok here
- return
- end
- end
- end
-end
-
-registerotffeature {
- name = "mathalternates",
- description = "additional math alternative shapes",
- initializers = {
- base = initializemathalternates,
- node = initializemathalternates,
- }
-}
-
-local getalternate = otf.getalternate
-
-local a_mathalternate = privateattribute("mathalternate")
-
-local alternate = { } -- processors.alternate = alternate
-
-function mathematics.setalternate(fam,tag)
- local id = font_of_family(fam)
- local tfmdata = fontdata[id]
- local mathalternates = tfmdata.shared and tfmdata.shared.mathalternates
- if mathalternates then
- local m = mathalternates[tag]
- texsetattribute(a_mathalternate,m and m.attribute or unsetvalue)
- end
-end
-
-alternate[math_char] = function(pointer)
- local a = getattr(pointer,a_mathalternate)
- if a and a > 0 then
- setattr(pointer,a_mathalternate,0)
- local tfmdata = fontdata[font_of_family(getfield(pointer,"fam"))] -- we can also have a famdata
- local mathalternatesattributes = tfmdata.shared.mathalternatesattributes
- if mathalternatesattributes then
- local what = mathalternatesattributes[a]
- local alt = getalternate(tfmdata,getchar(pointer),what.feature,what.value)
- if alt then
- if trace_alternates then
- report_alternates("alternate %a, value %a, replacing glyph %U by glyph %U",
- tostring(what.feature),tostring(what.value),getchar(pointer),alt)
- end
- setfield(pointer,"char",alt)
- end
- end
- end
-end
-
-function handlers.check(head,style,penalties)
- processnoads(head,alternate,"check")
- return true
-end
-
--- italics: we assume that only characters matter
---
--- = we check for correction first because accessing nodes is slower
--- = the actual glyph is not that important (we can control it with numbers)
-
--- Italic correction in luatex math is a mess. There are all kind of assumptions based on
--- old fonts and new font. Eventually there should be a flag that can signal to ignore all
--- those heuristics. We want to deal with it ourselves also in the perspective of mxed math
--- and text.
-
-local a_mathitalics = privateattribute("mathitalics")
-
-local italics = { }
-local default_factor = 1/20
-
-local function getcorrection(method,font,char) -- -- or character.italic -- (this one is for tex)
-
- local correction, fromvisual
-
- if method == 1 then
- -- only font data triggered by fontitalics
- local italics = fontitalics[font]
- if italics then
- local character = fontcharacters[font][char]
- if character then
- correction = character.italic_correction
- if correction and correction ~= 0 then
- return correction, false
- end
- end
- end
- elseif method == 2 then
- -- only font data triggered by fontdata
- local character = fontcharacters[font][char]
- if character then
- correction = character.italic_correction
- if correction and correction ~= 0 then
- return correction, false
- end
- end
- elseif method == 3 then
- -- only quad based by selective
- local visual = chardata[char].visual
- if not visual then
- -- skip
- elseif visual == "it" or visual == "bi" then
- correction = fontproperties[font].mathitalic_defaultvalue or default_factor*fontemwidths[font]
- if correction and correction ~= 0 then
- return correction, true
- end
- end
- elseif method == 4 then
- -- combination of 1 and 3
- local italics = fontitalics[font]
- if italics then
- local character = fontcharacters[font][char]
- if character then
- correction = character.italic_correction
- if correction and correction ~= 0 then
- return correction, false
- end
- end
- end
- if not correction then
- local visual = chardata[char].visual
- if not visual then
- -- skip
- elseif visual == "it" or visual == "bi" then
- correction = fontproperties[font].mathitalic_defaultvalue or default_factor*fontemwidths[font]
- if correction and correction ~= 0 then
- return correction, true
- end
- end
- end
- end
-
-end
-
-local setcolor = nodes.tracers.colors.set
-local resetcolor = nodes.tracers.colors.reset
-local italic_kern = new_kern
-local c_positive_d = "trace:db"
-local c_negative_d = "trace:dr"
-
-local function insert_kern(current,kern)
- local sub = new_node(math_sub) -- todo: pool
- local noad = new_node(math_noad) -- todo: pool
- setfield(sub,"list",kern)
- setfield(kern,"next",noad)
- setfield(noad,"nucleus",current)
- return sub
-end
-
-registertracker("math.italics.visualize", function(v)
- if v then
- italic_kern = function(k,font)
- local ex = 1.5 * fontexheights[font]
- if k > 0 then
- return setcolor(new_rule(k,ex,ex),c_positive_d)
- else
- -- influences un*
- return old_kern(k) .. setcolor(new_rule(-k,ex,ex),c_negative_d) .. old_kern(k)
- end
- end
- else
- italic_kern = new_kern
- end
-end)
-
-italics[math_char] = function(pointer,what,n,parent)
- local method = getattr(pointer,a_mathitalics)
- if method and method > 0 then
- local char = getchar(pointer)
- local font = font_of_family(getfield(pointer,"fam")) -- todo: table
- local correction, visual = getcorrection(method,font,char)
- if correction then
- local pid = getid(parent)
- local sub, sup
- if pid == math_noad then
- sup = getfield(parent,"sup")
- sub = getfield(parent,"sub")
- end
- if sup or sub then
- local subtype = getsubtype(parent)
- if subtype == noad_oplimits then
- if sup then
- setfield(parent,"sup",insert_kern(sup,italic_kern(correction,font)))
- if trace_italics then
- report_italics("method %a, adding %p italic correction for upper limit of %C",method,correction,char)
- end
- end
- if sub then
- local correction = - correction
- setfield(parent,"sub",insert_kern(sub,italic_kern(correction,font)))
- if trace_italics then
- report_italics("method %a, adding %p italic correction for lower limit of %C",method,correction,char)
- end
- end
- elseif sup then
- if pointer ~= sub then
- setfield(parent,"sup",insert_kern(sup,italic_kern(correction,font)))
- if trace_italics then
- report_italics("method %a, adding %p italic correction before superscript after %C",method,correction,char)
- end
- else
- -- otherwise we inject twice
- end
- end
- else
- local next_noad = getnext(parent)
- if not next_noad then
- if n== 1 then -- only at the outer level .. will become an option (always,endonly,none)
- if trace_italics then
- report_italics("method %a, adding %p italic correction between %C and end math",method,correctio,char)
- end
- insert_node_after(parent,parent,italic_kern(correction,font))
- end
- elseif getid(next_noad) == math_noad then
- local next_subtype = getsubtype(next_noad)
- if next_subtype == noad_punct or next_subtype == noad_ord then
- local next_nucleus = getfield(next_noad,"nucleus")
- if getid(next_nucleus) == math_char then
- local next_char = getchar(next_nucleus)
- local next_data = chardata[next_char]
- local visual = next_data.visual
- if visual == "it" or visual == "bi" then
- -- if trace_italics then
- -- report_italics("method %a, skipping %p italic correction between italic %C and italic %C",method,correction,char,next_char)
- -- end
- else
- local category = next_data.category
- if category == "nd" or category == "ll" or category == "lu" then
- if trace_italics then
- report_italics("method %a, adding %p italic correction between italic %C and non italic %C",method,correction,char,next_char)
- end
- insert_node_after(parent,parent,italic_kern(correction,font))
- -- elseif next_data.height > (fontexheights[font]/2) then
- -- if trace_italics then
- -- report_italics("method %a, adding %p italic correction between %C and ascending %C",method,correction,char,next_char)
- -- end
- -- insert_node_after(parent,parent,italic_kern(correction,font))
- -- elseif trace_italics then
- -- -- report_italics("method %a, skipping %p italic correction between %C and %C",method,correction,char,next_char)
- end
- end
- end
- end
- end
- end
- end
- end
-end
-
-function handlers.italics(head,style,penalties)
- processnoads(head,italics,"italics")
- return true
-end
-
-local enable
-
-enable = function()
- tasks.enableaction("math", "noads.handlers.italics")
- if trace_italics then
- report_italics("enabling math italics")
- end
- enable = false
-end
-
--- best do this only on math mode (less overhead)
-
-function mathematics.setitalics(n)
- if enable then
- enable()
- end
- if n == variables.reset then
- texsetattribute(a_mathitalics,unsetvalue)
- else
- texsetattribute(a_mathitalics,tonumber(n) or unsetvalue)
- end
-end
-
-function mathematics.resetitalics()
- texsetattribute(a_mathitalics,unsetvalue)
-end
-
--- primes and such
-
-local collapse = { } processors.collapse = collapse
-
-local mathpairs = characters.mathpairs
-
-mathpairs[0x2032] = { [0x2032] = 0x2033, [0x2033] = 0x2034, [0x2034] = 0x2057 } -- (prime,prime) (prime,doubleprime) (prime,tripleprime)
-mathpairs[0x2033] = { [0x2032] = 0x2034, [0x2033] = 0x2057 } -- (doubleprime,prime) (doubleprime,doubleprime)
-mathpairs[0x2034] = { [0x2032] = 0x2057 } -- (tripleprime,prime)
-
-mathpairs[0x2035] = { [0x2035] = 0x2036, [0x2036] = 0x2037 } -- (reversedprime,reversedprime) (reversedprime,doublereversedprime)
-mathpairs[0x2036] = { [0x2035] = 0x2037 } -- (doublereversedprime,reversedprime)
-
-mathpairs[0x222B] = { [0x222B] = 0x222C, [0x222C] = 0x222D }
-mathpairs[0x222C] = { [0x222B] = 0x222D }
-
-mathpairs[0x007C] = { [0x007C] = 0x2016, [0x2016] = 0x2980 } -- bar+bar=double bar+double=triple
-mathpairs[0x2016] = { [0x007C] = 0x2980 } -- double+bar=triple
-
-local movesub = {
- -- primes
- [0x2032] = 0xFE932,
- [0x2033] = 0xFE933,
- [0x2034] = 0xFE934,
- [0x2057] = 0xFE957,
- -- reverse primes
- [0x2035] = 0xFE935,
- [0x2036] = 0xFE936,
- [0x2037] = 0xFE937,
-}
-
-local validpair = {
- [noad_rel] = true,
- [noad_ord] = true,
- [noad_opdisplaylimits] = true,
- [noad_oplimits] = true,
- [noad_opnolimits] = true,
-}
-
-local function movesubscript(parent,current_nucleus,current_char)
- local prev = getfield(parent,"prev")
- if prev and getid(prev) == math_noad then
- if not getfield(prev,"sup") and not getfield(prev,"sub") then
- -- {f} {'}_n => f_n^'
- setfield(current_nucleus,"char",movesub[current_char or getchar(current_nucleus)])
- local nucleus = getfield(parent,"nucleus")
- local sub = getfield(parent,"sub")
- local sup = getfield(parent,"sup")
- setfield(prev,"sup",nucleus)
- setfield(prev,"sub",sub)
- local dummy = copy_node(nucleus)
- setfield(dummy,"char",0)
- setfield(parent,"nucleus",dummy)
- setfield(parent,"sub",nil)
- if trace_collapsing then
- report_collapsing("fixing subscript")
- end
- elseif not getfield(prev,"sup") then
- -- {f} {'}_n => f_n^'
- setfield(current_nucleus,"char",movesub[current_char or getchar(current_nucleus)])
- local nucleus = getfield(parent,"nucleus")
- local sup = getfield(parent,"sup")
- setfield(prev,"sup",nucleus)
- local dummy = copy_node(nucleus)
- setfield(dummy,"char",0)
- setfield(parent,"nucleus",dummy)
- if trace_collapsing then
- report_collapsing("fixing subscript")
- end
- end
- end
-end
-
-local function collapsepair(pointer,what,n,parent,nested) -- todo: switch to turn in on and off
- if parent then
- if validpair[getsubtype(parent)] then
- local current_nucleus = getfield(parent,"nucleus")
- if getid(current_nucleus) == math_char then
- local current_char = getchar(current_nucleus)
- if not getfield(parent,"sub") and not getfield(parent,"sup") then
- local mathpair = mathpairs[current_char]
- if mathpair then
- local next_noad = getnext(parent)
- if next_noad and getid(next_noad) == math_noad then
- if validpair[getsubtype(next_noad)] then
- local next_nucleus = getfield(next_noad,"nucleus")
- local next_char = getchar(next_nucleus)
- if getid(next_nucleus) == math_char then
- local newchar = mathpair[next_char]
- if newchar then
- local fam = getfield(current_nucleus,"fam")
- local id = font_of_family(fam)
- local characters = fontcharacters[id]
- if characters and characters[newchar] then
- if trace_collapsing then
- report_collapsing("%U + %U => %U",current_char,next_char,newchar)
- end
- setfield(current_nucleus,"char",newchar)
- local next_next_noad = getnext(next_noad)
- if next_next_noad then
- setfield(parent,"next",next_next_noad)
- setfield(next_next_noad,"prev",parent)
- else
- setfield(parent,"next",nil)
- end
- setfield(parent,"sup",getfield(next_noad,"sup"))
- setfield(parent,"sub",getfield(next_noad,"sub"))
- setfield(next_noad,"sup",nil)
- setfield(next_noad,"sub",nil)
- free_node(next_noad)
- collapsepair(pointer,what,n,parent,true)
- -- if not nested and movesub[current_char] then
- -- movesubscript(parent,current_nucleus,current_char)
- -- end
- end
- elseif not nested and movesub[current_char] then
- movesubscript(parent,current_nucleus,current_char)
- end
- end
- end
- elseif not nested and movesub[current_char] then
- movesubscript(parent,current_nucleus,current_char)
- end
- elseif not nested and movesub[current_char] then
- movesubscript(parent,current_nucleus,current_char)
- end
- elseif not nested and movesub[current_char] then
- movesubscript(parent,current_nucleus,current_char)
- end
- end
- end
- end
-end
-
-collapse[math_char] = collapsepair
-
-function noads.handlers.collapse(head,style,penalties)
- processnoads(head,collapse,"collapse")
- return true
-end
-
--- variants
-
-local variants = { }
-
-local validvariants = { -- fast check on valid
- [0x2229] = 0xFE00, [0x222A] = 0xFE00,
- [0x2268] = 0xFE00, [0x2269] = 0xFE00,
- [0x2272] = 0xFE00, [0x2273] = 0xFE00,
- [0x228A] = 0xFE00, [0x228B] = 0xFE00,
- [0x2293] = 0xFE00, [0x2294] = 0xFE00,
- [0x2295] = 0xFE00,
- [0x2297] = 0xFE00,
- [0x229C] = 0xFE00,
- [0x22DA] = 0xFE00, [0x22DB] = 0xFE00,
- [0x2A3C] = 0xFE00, [0x2A3D] = 0xFE00,
- [0x2A9D] = 0xFE00, [0x2A9E] = 0xFE00,
- [0x2AAC] = 0xFE00, [0x2AAD] = 0xFE00,
- [0x2ACB] = 0xFE00, [0x2ACC] = 0xFE00,
-}
-
-variants[math_char] = function(pointer,what,n,parent) -- also set export value
- local char = getchar(pointer)
- local selector = validvariants[char]
- if selector then
- local next = getnext(parent)
- if next and getid(next) == math_noad then
- local nucleus = getfield(next,"nucleus")
- if nucleus and getid(nucleus) == math_char and getchar(nucleus) == selector then
- local variant
- local tfmdata = fontdata[font_of_family(getfield(pointer,"fam"))] -- we can also have a famdata
- local mathvariants = tfmdata.resources.variants -- and variantdata
- if mathvariants then
- mathvariants = mathvariants[selector]
- if mathvariants then
- variant = mathvariants[char]
- end
- end
- if variant then
- setfield(pointer,"char",variant)
- setattr(pointer,a_exportstatus,char) -- we don't export the variant as it's visual markup
- if trace_variants then
- report_variants("variant (%U,%U) replaced by %U",char,selector,variant)
- end
- else
- if trace_variants then
- report_variants("no variant (%U,%U)",char,selector)
- end
- end
- setfield(next,"prev",pointer)
- setfield(parent,"next",getnext(next))
- free_node(next)
- end
- end
- end
-end
-
-function handlers.variants(head,style,penalties)
- processnoads(head,variants,"unicode variant")
- return true
-end
-
--- for manuals
-
-local classes = { }
-
-local colors = {
- [noadcodes.rel] = "trace:dr",
- [noadcodes.ord] = "trace:db",
- [noadcodes.bin] = "trace:dg",
- [noadcodes.open] = "trace:dm",
- [noadcodes.close] = "trace:dm",
- [noadcodes.punct] = "trace:dc",
- -- [noadcodes.opdisplaylimits] = "",
- -- [noadcodes.oplimits] = "",
- -- [noadcodes.opnolimits] = "",
- -- [noadcodes.inner = "",
- -- [noadcodes.under = "",
- -- [noadcodes.over = "",
- -- [noadcodes.vcenter = "",
-}
-
-classes[math_char] = function(pointer,what,n,parent)
- local color = colors[getsubtype(parent)]
- if color then
- setcolor(pointer,color)
- else
- resetcolor(pointer)
- end
-end
-
-function handlers.classes(head,style,penalties)
- processnoads(head,classes,"classes")
- return true
-end
-
-registertracker("math.classes",function(v) tasks.setaction("math","noads.handlers.classes",v) end)
-
--- just for me
-
-function handlers.showtree(head,style,penalties)
- inspect(nodes.totree(head))
-end
-
-registertracker("math.showtree",function(v) tasks.setaction("math","noads.handlers.showtree",v) end)
-
--- the normal builder
-
-function builders.kernel.mlist_to_hlist(head,style,penalties)
- return mlist_to_hlist(head,style,penalties), true
-end
-
--- function builders.kernel.mlist_to_hlist(head,style,penalties)
--- print("!!!!!!! BEFORE",penalties)
--- for n in node.traverse(head) do print(n) end
--- print("!!!!!!!")
--- head = mlist_to_hlist(head,style,penalties)
--- print("!!!!!!! AFTER")
--- for n in node.traverse(head) do print(n) end
--- print("!!!!!!!")
--- return head, true
--- end
-
-tasks.new {
- name = "math",
- arguments = 2,
- processor = utilities.sequencers.nodeprocessor,
- sequence = {
- "before",
- "normalizers",
- "builders",
- "after",
- },
-}
-
-tasks.freezegroup("math", "normalizers") -- experimental
-tasks.freezegroup("math", "builders") -- experimental
-
-local actions = tasks.actions("math") -- head, style, penalties
-
-local starttiming, stoptiming = statistics.starttiming, statistics.stoptiming
-
-function processors.mlist_to_hlist(head,style,penalties)
- starttiming(noads)
- local head, done = actions(head,style,penalties)
- stoptiming(noads)
- return head, done
-end
-
-callbacks.register('mlist_to_hlist',processors.mlist_to_hlist,"preprocessing math list")
-
--- tracing
-
-statistics.register("math processing time", function()
- return statistics.elapsedseconds(noads)
-end)
-
--- interface
-
-local implement = interfaces.implement
-
-implement {
- name = "setmathalternate",
- actions = mathematics.setalternate,
- arguments = { "integer", "string" }
-}
-
-implement {
- name = "setmathitalics",
- actions = mathematics.setitalics
-}
-
-implement {
- name = "resetmathitalics",
- actions = mathematics.resetitalics
-}
diff --git a/Master/texmf-dist/tex/context/base/anch-bar.mkii b/Master/texmf-dist/tex/context/base/mkii/anch-bar.mkii
index 39d5c7f77e7..39d5c7f77e7 100644
--- a/Master/texmf-dist/tex/context/base/anch-bar.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/anch-bar.mkii
diff --git a/Master/texmf-dist/tex/context/base/anch-pgr.mkii b/Master/texmf-dist/tex/context/base/mkii/anch-pgr.mkii
index 4ceea844c1f..4ceea844c1f 100644
--- a/Master/texmf-dist/tex/context/base/anch-pgr.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/anch-pgr.mkii
diff --git a/Master/texmf-dist/tex/context/base/anch-pos.mkii b/Master/texmf-dist/tex/context/base/mkii/anch-pos.mkii
index b86cee5cc03..b86cee5cc03 100644
--- a/Master/texmf-dist/tex/context/base/anch-pos.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/anch-pos.mkii
diff --git a/Master/texmf-dist/tex/context/base/anch-snc.mkii b/Master/texmf-dist/tex/context/base/mkii/anch-snc.mkii
index 01704e0c8e6..01704e0c8e6 100644
--- a/Master/texmf-dist/tex/context/base/anch-snc.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/anch-snc.mkii
diff --git a/Master/texmf-dist/tex/context/base/bibl-tra.mkii b/Master/texmf-dist/tex/context/base/mkii/bibl-tra.mkii
index 868ca0fc681..868ca0fc681 100644
--- a/Master/texmf-dist/tex/context/base/bibl-tra.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/bibl-tra.mkii
diff --git a/Master/texmf-dist/tex/context/base/buff-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/buff-ini.mkii
index 7fdb89e45cd..7fdb89e45cd 100644
--- a/Master/texmf-dist/tex/context/base/buff-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/buff-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/buff-ver.mkii b/Master/texmf-dist/tex/context/base/mkii/buff-ver.mkii
index fbe56892ea1..fbe56892ea1 100644
--- a/Master/texmf-dist/tex/context/base/buff-ver.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/buff-ver.mkii
diff --git a/Master/texmf-dist/tex/context/base/catc-act.mkii b/Master/texmf-dist/tex/context/base/mkii/catc-act.mkii
index 6535afc56b8..6535afc56b8 100644
--- a/Master/texmf-dist/tex/context/base/catc-act.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/catc-act.mkii
diff --git a/Master/texmf-dist/tex/context/base/catc-ctx.mkii b/Master/texmf-dist/tex/context/base/mkii/catc-ctx.mkii
index 8bb43c1f92c..8bb43c1f92c 100644
--- a/Master/texmf-dist/tex/context/base/catc-ctx.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/catc-ctx.mkii
diff --git a/Master/texmf-dist/tex/context/base/catc-def.mkii b/Master/texmf-dist/tex/context/base/mkii/catc-def.mkii
index 25044bdf056..25044bdf056 100644
--- a/Master/texmf-dist/tex/context/base/catc-def.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/catc-def.mkii
diff --git a/Master/texmf-dist/tex/context/base/catc-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/catc-ini.mkii
index 7527466e103..7527466e103 100644
--- a/Master/texmf-dist/tex/context/base/catc-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/catc-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/catc-sym.mkii b/Master/texmf-dist/tex/context/base/mkii/catc-sym.mkii
index 55782f11ed2..55782f11ed2 100644
--- a/Master/texmf-dist/tex/context/base/catc-sym.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/catc-sym.mkii
diff --git a/Master/texmf-dist/tex/context/base/catc-xml.mkii b/Master/texmf-dist/tex/context/base/mkii/catc-xml.mkii
index 45eb5a421a1..45eb5a421a1 100644
--- a/Master/texmf-dist/tex/context/base/catc-xml.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/catc-xml.mkii
diff --git a/Master/texmf-dist/tex/context/base/colo-ema.mkii b/Master/texmf-dist/tex/context/base/mkii/colo-ema.mkii
index 11d76f34209..11d76f34209 100644
--- a/Master/texmf-dist/tex/context/base/colo-ema.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/colo-ema.mkii
diff --git a/Master/texmf-dist/tex/context/base/colo-ext.mkii b/Master/texmf-dist/tex/context/base/mkii/colo-ext.mkii
index 5b39a8e85dd..5b39a8e85dd 100644
--- a/Master/texmf-dist/tex/context/base/colo-ext.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/colo-ext.mkii
diff --git a/Master/texmf-dist/tex/context/base/colo-hex.mkii b/Master/texmf-dist/tex/context/base/mkii/colo-hex.mkii
index ddf2d47065d..ddf2d47065d 100644
--- a/Master/texmf-dist/tex/context/base/colo-hex.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/colo-hex.mkii
diff --git a/Master/texmf-dist/tex/context/base/colo-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/colo-ini.mkii
index 56b9d14da80..56b9d14da80 100644
--- a/Master/texmf-dist/tex/context/base/colo-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/colo-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/colo-rgb.mkii b/Master/texmf-dist/tex/context/base/mkii/colo-rgb.mkii
index f734c7a014c..f734c7a014c 100644
--- a/Master/texmf-dist/tex/context/base/colo-rgb.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/colo-rgb.mkii
diff --git a/Master/texmf-dist/tex/context/base/colo-run.mkii b/Master/texmf-dist/tex/context/base/mkii/colo-run.mkii
index 02da462d385..02da462d385 100644
--- a/Master/texmf-dist/tex/context/base/colo-run.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/colo-run.mkii
diff --git a/Master/texmf-dist/tex/context/base/colo-x11.mkii b/Master/texmf-dist/tex/context/base/mkii/colo-x11.mkii
index 45d3aac6248..45d3aac6248 100644
--- a/Master/texmf-dist/tex/context/base/colo-x11.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/colo-x11.mkii
diff --git a/Master/texmf-dist/tex/context/base/colo-xwi.mkii b/Master/texmf-dist/tex/context/base/mkii/colo-xwi.mkii
index 13d04759e77..48ffe234eff 100644
--- a/Master/texmf-dist/tex/context/base/colo-xwi.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/colo-xwi.mkii
@@ -128,7 +128,7 @@
\definecolor [snow] [r=1.00,g=0.98,b=0.98]
\definecolor [springgreen] [r=0.00,g=1.00,b=0.50]
\definecolor [steelblue] [r=0.27,g=0.51,b=0.71]
-\definecolor [tan ] [r=0.82,g=0.71,b=0.55]
+\definecolor [tancolor] [r=0.82,g=0.71,b=0.55] % we don't want it to clash
\definecolor [thistle] [r=0.85,g=0.75,b=0.85]
\definecolor [tomato] [r=1.00,g=0.39,b=0.28]
\definecolor [turquoise] [r=0.25,g=0.88,b=0.82]
diff --git a/Master/texmf-dist/tex/context/base/cont-cs.mkii b/Master/texmf-dist/tex/context/base/mkii/cont-cs.mkii
index 89b781c37a1..89b781c37a1 100644
--- a/Master/texmf-dist/tex/context/base/cont-cs.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/cont-cs.mkii
diff --git a/Master/texmf-dist/tex/context/base/cont-de.mkii b/Master/texmf-dist/tex/context/base/mkii/cont-de.mkii
index 5badc59d00b..5badc59d00b 100644
--- a/Master/texmf-dist/tex/context/base/cont-de.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/cont-de.mkii
diff --git a/Master/texmf-dist/tex/context/base/cont-en.mkii b/Master/texmf-dist/tex/context/base/mkii/cont-en.mkii
index 9d0d4de2e33..9d0d4de2e33 100644
--- a/Master/texmf-dist/tex/context/base/cont-en.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/cont-en.mkii
diff --git a/Master/texmf-dist/tex/context/base/cont-err.mkii b/Master/texmf-dist/tex/context/base/mkii/cont-err.mkii
index 00118f6ccec..00118f6ccec 100644
--- a/Master/texmf-dist/tex/context/base/cont-err.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/cont-err.mkii
diff --git a/Master/texmf-dist/tex/context/base/cont-fil.mkii b/Master/texmf-dist/tex/context/base/mkii/cont-fil.mkii
index 604ea233d06..604ea233d06 100644
--- a/Master/texmf-dist/tex/context/base/cont-fil.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/cont-fil.mkii
diff --git a/Master/texmf-dist/tex/context/base/cont-fr.mkii b/Master/texmf-dist/tex/context/base/mkii/cont-fr.mkii
index e70cfe65eec..e70cfe65eec 100644
--- a/Master/texmf-dist/tex/context/base/cont-fr.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/cont-fr.mkii
diff --git a/Master/texmf-dist/tex/context/base/cont-gb.mkii b/Master/texmf-dist/tex/context/base/mkii/cont-gb.mkii
index 5cd0a9635b0..5cd0a9635b0 100644
--- a/Master/texmf-dist/tex/context/base/cont-gb.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/cont-gb.mkii
diff --git a/Master/texmf-dist/tex/context/base/cont-it.mkii b/Master/texmf-dist/tex/context/base/mkii/cont-it.mkii
index f15171403b3..f15171403b3 100644
--- a/Master/texmf-dist/tex/context/base/cont-it.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/cont-it.mkii
diff --git a/Master/texmf-dist/tex/context/base/cont-log.mkii b/Master/texmf-dist/tex/context/base/mkii/cont-log.mkii
index 6a7a707952d..6a7a707952d 100644
--- a/Master/texmf-dist/tex/context/base/cont-log.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/cont-log.mkii
diff --git a/Master/texmf-dist/tex/context/base/cont-new.mkii b/Master/texmf-dist/tex/context/base/mkii/cont-new.mkii
index f0385c0653a..f0385c0653a 100644
--- a/Master/texmf-dist/tex/context/base/cont-new.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/cont-new.mkii
diff --git a/Master/texmf-dist/tex/context/base/cont-nl.mkii b/Master/texmf-dist/tex/context/base/mkii/cont-nl.mkii
index f9cefaaac06..f9cefaaac06 100644
--- a/Master/texmf-dist/tex/context/base/cont-nl.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/cont-nl.mkii
diff --git a/Master/texmf-dist/tex/context/base/cont-ro.mkii b/Master/texmf-dist/tex/context/base/mkii/cont-ro.mkii
index d68cf5a4558..d68cf5a4558 100644
--- a/Master/texmf-dist/tex/context/base/cont-ro.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/cont-ro.mkii
diff --git a/Master/texmf-dist/tex/context/base/cont-sys.ori b/Master/texmf-dist/tex/context/base/mkii/cont-sys.ori
index fa438a78d4f..fa438a78d4f 100644
--- a/Master/texmf-dist/tex/context/base/cont-sys.ori
+++ b/Master/texmf-dist/tex/context/base/mkii/cont-sys.ori
diff --git a/Master/texmf-dist/tex/context/base/context.mkii b/Master/texmf-dist/tex/context/base/mkii/context.mkii
index 990c8bd11c8..84679a9a21d 100644
--- a/Master/texmf-dist/tex/context/base/context.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/context.mkii
@@ -85,6 +85,7 @@
\loadmarkfile{xetx-cls}
\fi
+
%D To enable selective loading, we say:
\newif\ifCONTEXT \CONTEXTtrue % will disappear
diff --git a/Master/texmf-dist/tex/context/base/core-con.mkii b/Master/texmf-dist/tex/context/base/mkii/core-con.mkii
index 46fbe9b9ee6..46fbe9b9ee6 100644
--- a/Master/texmf-dist/tex/context/base/core-con.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/core-con.mkii
diff --git a/Master/texmf-dist/tex/context/base/core-ctx.mkii b/Master/texmf-dist/tex/context/base/mkii/core-ctx.mkii
index c693d10db6f..c693d10db6f 100644
--- a/Master/texmf-dist/tex/context/base/core-ctx.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/core-ctx.mkii
diff --git a/Master/texmf-dist/tex/context/base/core-def.mkii b/Master/texmf-dist/tex/context/base/mkii/core-def.mkii
index 971e8953d99..971e8953d99 100644
--- a/Master/texmf-dist/tex/context/base/core-def.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/core-def.mkii
diff --git a/Master/texmf-dist/tex/context/base/core-env.mkii b/Master/texmf-dist/tex/context/base/mkii/core-env.mkii
index 6058c4c9fa8..6058c4c9fa8 100644
--- a/Master/texmf-dist/tex/context/base/core-env.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/core-env.mkii
diff --git a/Master/texmf-dist/tex/context/base/core-fil.mkii b/Master/texmf-dist/tex/context/base/mkii/core-fil.mkii
index 16daf7bf60f..16daf7bf60f 100644
--- a/Master/texmf-dist/tex/context/base/core-fil.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/core-fil.mkii
diff --git a/Master/texmf-dist/tex/context/base/core-fnt.mkii b/Master/texmf-dist/tex/context/base/mkii/core-fnt.mkii
index 542ca062a68..542ca062a68 100644
--- a/Master/texmf-dist/tex/context/base/core-fnt.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/core-fnt.mkii
diff --git a/Master/texmf-dist/tex/context/base/core-gen.mkii b/Master/texmf-dist/tex/context/base/mkii/core-gen.mkii
index 0d7fcebe00c..0d7fcebe00c 100644
--- a/Master/texmf-dist/tex/context/base/core-gen.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/core-gen.mkii
diff --git a/Master/texmf-dist/tex/context/base/core-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/core-ini.mkii
index 04535bec6f6..04535bec6f6 100644
--- a/Master/texmf-dist/tex/context/base/core-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/core-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/core-job.mkii b/Master/texmf-dist/tex/context/base/mkii/core-job.mkii
index e2dc16031ff..e2dc16031ff 100644
--- a/Master/texmf-dist/tex/context/base/core-job.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/core-job.mkii
diff --git a/Master/texmf-dist/tex/context/base/core-mis.mkii b/Master/texmf-dist/tex/context/base/mkii/core-mis.mkii
index c44d61cbc3e..c44d61cbc3e 100644
--- a/Master/texmf-dist/tex/context/base/core-mis.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/core-mis.mkii
diff --git a/Master/texmf-dist/tex/context/base/core-par.mkii b/Master/texmf-dist/tex/context/base/mkii/core-par.mkii
index 69e2976d1f3..69e2976d1f3 100644
--- a/Master/texmf-dist/tex/context/base/core-par.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/core-par.mkii
diff --git a/Master/texmf-dist/tex/context/base/core-stg.mkii b/Master/texmf-dist/tex/context/base/mkii/core-stg.mkii
index 0d98da851d3..0d98da851d3 100644
--- a/Master/texmf-dist/tex/context/base/core-stg.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/core-stg.mkii
diff --git a/Master/texmf-dist/tex/context/base/core-sys.mkii b/Master/texmf-dist/tex/context/base/mkii/core-sys.mkii
index 54778eeed52..54778eeed52 100644
--- a/Master/texmf-dist/tex/context/base/core-sys.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/core-sys.mkii
diff --git a/Master/texmf-dist/tex/context/base/core-two.mkii b/Master/texmf-dist/tex/context/base/mkii/core-two.mkii
index 235be988edc..235be988edc 100644
--- a/Master/texmf-dist/tex/context/base/core-two.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/core-two.mkii
diff --git a/Master/texmf-dist/tex/context/base/core-uti.mkii b/Master/texmf-dist/tex/context/base/mkii/core-uti.mkii
index bd2fa46a0ff..bd2fa46a0ff 100644
--- a/Master/texmf-dist/tex/context/base/core-uti.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/core-uti.mkii
diff --git a/Master/texmf-dist/tex/context/base/core-var.mkii b/Master/texmf-dist/tex/context/base/mkii/core-var.mkii
index 55c587fbfaf..55c587fbfaf 100644
--- a/Master/texmf-dist/tex/context/base/core-var.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/core-var.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-032.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-032.mkii
index e3c24271e55..e3c24271e55 100644
--- a/Master/texmf-dist/tex/context/base/enco-032.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-032.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-037.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-037.mkii
index a2aad46a575..a2aad46a575 100644
--- a/Master/texmf-dist/tex/context/base/enco-037.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-037.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-acc.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-acc.mkii
index 7484fd50ee2..7484fd50ee2 100644
--- a/Master/texmf-dist/tex/context/base/enco-acc.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-acc.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-agr.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-agr.mkii
index 1dbb9b577af..1dbb9b577af 100644
--- a/Master/texmf-dist/tex/context/base/enco-agr.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-agr.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-ans.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-ans.mkii
index c71b2451a60..c71b2451a60 100644
--- a/Master/texmf-dist/tex/context/base/enco-ans.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-ans.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-cas.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-cas.mkii
index 6ac35eb325c..6ac35eb325c 100644
--- a/Master/texmf-dist/tex/context/base/enco-cas.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-cas.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-chi.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-chi.mkii
index 727720565fd..727720565fd 100644
--- a/Master/texmf-dist/tex/context/base/enco-chi.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-chi.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-com.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-com.mkii
index 620ac0c96ee..620ac0c96ee 100644
--- a/Master/texmf-dist/tex/context/base/enco-com.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-com.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-cyr.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-cyr.mkii
index aa412d8d3a4..aa412d8d3a4 100644
--- a/Master/texmf-dist/tex/context/base/enco-cyr.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-cyr.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-def.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-def.mkii
index 20c885d4dca..20c885d4dca 100644
--- a/Master/texmf-dist/tex/context/base/enco-def.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-def.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-ec.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-ec.mkii
index 918c85e1261..918c85e1261 100644
--- a/Master/texmf-dist/tex/context/base/enco-ec.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-ec.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-ecm.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-ecm.mkii
index 8a97065747a..8a97065747a 100644
--- a/Master/texmf-dist/tex/context/base/enco-ecm.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-ecm.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-el.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-el.mkii
index f268dcb3c24..f268dcb3c24 100644
--- a/Master/texmf-dist/tex/context/base/enco-el.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-el.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-fde.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-fde.mkii
index 57e572c04f4..57e572c04f4 100644
--- a/Master/texmf-dist/tex/context/base/enco-fde.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-fde.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-ffr.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-ffr.mkii
index 7e605bb052c..7e605bb052c 100644
--- a/Master/texmf-dist/tex/context/base/enco-ffr.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-ffr.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-fpl.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-fpl.mkii
index ddf86569838..ddf86569838 100644
--- a/Master/texmf-dist/tex/context/base/enco-fpl.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-fpl.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-fro.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-fro.mkii
index af127216383..af127216383 100644
--- a/Master/texmf-dist/tex/context/base/enco-fro.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-fro.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-fsl.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-fsl.mkii
index 8fbca98cafc..8fbca98cafc 100644
--- a/Master/texmf-dist/tex/context/base/enco-fsl.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-fsl.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-grk.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-grk.mkii
index 6264f362e88..6264f362e88 100644
--- a/Master/texmf-dist/tex/context/base/enco-grk.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-grk.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-heb.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-heb.mkii
index a4ef2cd2c11..a4ef2cd2c11 100644
--- a/Master/texmf-dist/tex/context/base/enco-heb.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-heb.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-ibm.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-ibm.mkii
index 48695ca5298..48695ca5298 100644
--- a/Master/texmf-dist/tex/context/base/enco-ibm.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-ibm.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-il2.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-il2.mkii
index 9b08dc8972f..9b08dc8972f 100644
--- a/Master/texmf-dist/tex/context/base/enco-il2.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-il2.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-ini.mkii
index 8603f2420e1..8603f2420e1 100644
--- a/Master/texmf-dist/tex/context/base/enco-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-l7x.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-l7x.mkii
index 2a0d12c9f57..2a0d12c9f57 100644
--- a/Master/texmf-dist/tex/context/base/enco-l7x.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-l7x.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-lat.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-lat.mkii
index 2623aae8d7d..2623aae8d7d 100644
--- a/Master/texmf-dist/tex/context/base/enco-lat.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-lat.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-mis.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-mis.mkii
index 28523685e4e..28523685e4e 100644
--- a/Master/texmf-dist/tex/context/base/enco-mis.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-mis.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-pdf.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-pdf.mkii
index 28e96067361..28e96067361 100644
--- a/Master/texmf-dist/tex/context/base/enco-pdf.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-pdf.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-pfr.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-pfr.mkii
index aca2436c130..aca2436c130 100644
--- a/Master/texmf-dist/tex/context/base/enco-pfr.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-pfr.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-pol.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-pol.mkii
index ec49c6e1d37..ec49c6e1d37 100644
--- a/Master/texmf-dist/tex/context/base/enco-pol.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-pol.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-qx.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-qx.mkii
index b184fe0ac0c..b184fe0ac0c 100644
--- a/Master/texmf-dist/tex/context/base/enco-qx.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-qx.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-raw.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-raw.mkii
index e3a46e3d768..e3a46e3d768 100644
--- a/Master/texmf-dist/tex/context/base/enco-raw.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-raw.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-run.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-run.mkii
index 2f60a35b874..2f60a35b874 100644
--- a/Master/texmf-dist/tex/context/base/enco-run.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-run.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-t5.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-t5.mkii
index 3f51b85855b..3f51b85855b 100644
--- a/Master/texmf-dist/tex/context/base/enco-t5.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-t5.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-tbo.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-tbo.mkii
index 5733acd32e0..5733acd32e0 100644
--- a/Master/texmf-dist/tex/context/base/enco-tbo.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-tbo.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-uc.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-uc.mkii
index 0be22318a0f..0be22318a0f 100644
--- a/Master/texmf-dist/tex/context/base/enco-uc.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-uc.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-vis.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-vis.mkii
index 3c1fd776566..3c1fd776566 100644
--- a/Master/texmf-dist/tex/context/base/enco-vis.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-vis.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-vna.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-vna.mkii
index 42fee43417b..42fee43417b 100644
--- a/Master/texmf-dist/tex/context/base/enco-vna.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-vna.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-win.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-win.mkii
index 826371d8a68..826371d8a68 100644
--- a/Master/texmf-dist/tex/context/base/enco-win.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-win.mkii
diff --git a/Master/texmf-dist/tex/context/base/enco-x5.mkii b/Master/texmf-dist/tex/context/base/mkii/enco-x5.mkii
index cde394e294c..cde394e294c 100644
--- a/Master/texmf-dist/tex/context/base/enco-x5.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/enco-x5.mkii
diff --git a/Master/texmf-dist/tex/context/base/filt-bas.mkii b/Master/texmf-dist/tex/context/base/mkii/filt-bas.mkii
index fedeb694b19..fedeb694b19 100644
--- a/Master/texmf-dist/tex/context/base/filt-bas.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/filt-bas.mkii
diff --git a/Master/texmf-dist/tex/context/base/filt-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/filt-ini.mkii
index f2f59349a51..f2f59349a51 100644
--- a/Master/texmf-dist/tex/context/base/filt-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/filt-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/font-arb.mkii b/Master/texmf-dist/tex/context/base/mkii/font-arb.mkii
index 3ec0395f32a..3ec0395f32a 100644
--- a/Master/texmf-dist/tex/context/base/font-arb.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/font-arb.mkii
diff --git a/Master/texmf-dist/tex/context/base/font-bfm.mkii b/Master/texmf-dist/tex/context/base/mkii/font-bfm.mkii
index 0a25ec7422f..0a25ec7422f 100644
--- a/Master/texmf-dist/tex/context/base/font-bfm.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/font-bfm.mkii
diff --git a/Master/texmf-dist/tex/context/base/font-chi.mkii b/Master/texmf-dist/tex/context/base/mkii/font-chi.mkii
index 5e545722735..5e545722735 100644
--- a/Master/texmf-dist/tex/context/base/font-chi.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/font-chi.mkii
diff --git a/Master/texmf-dist/tex/context/base/font-heb.mkii b/Master/texmf-dist/tex/context/base/mkii/font-heb.mkii
index 3ec0395f32a..3ec0395f32a 100644
--- a/Master/texmf-dist/tex/context/base/font-heb.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/font-heb.mkii
diff --git a/Master/texmf-dist/tex/context/base/font-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/font-ini.mkii
index 2bee006370f..2bee006370f 100644
--- a/Master/texmf-dist/tex/context/base/font-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/font-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/font-jap.mkii b/Master/texmf-dist/tex/context/base/mkii/font-jap.mkii
index b8aa3d8368d..b8aa3d8368d 100644
--- a/Master/texmf-dist/tex/context/base/font-jap.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/font-jap.mkii
diff --git a/Master/texmf-dist/tex/context/base/font-run.mkii b/Master/texmf-dist/tex/context/base/mkii/font-run.mkii
index 04fcd576a60..04fcd576a60 100644
--- a/Master/texmf-dist/tex/context/base/font-run.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/font-run.mkii
diff --git a/Master/texmf-dist/tex/context/base/font-uni.mkii b/Master/texmf-dist/tex/context/base/mkii/font-uni.mkii
index 77eb680e20f..77eb680e20f 100644
--- a/Master/texmf-dist/tex/context/base/font-uni.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/font-uni.mkii
diff --git a/Master/texmf-dist/tex/context/base/font-unk.mkii b/Master/texmf-dist/tex/context/base/mkii/font-unk.mkii
index 241369f6812..241369f6812 100644
--- a/Master/texmf-dist/tex/context/base/font-unk.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/font-unk.mkii
diff --git a/Master/texmf-dist/tex/context/base/font-xtx.mkii b/Master/texmf-dist/tex/context/base/mkii/font-xtx.mkii
index e7a6c8d80cc..e7a6c8d80cc 100644
--- a/Master/texmf-dist/tex/context/base/font-xtx.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/font-xtx.mkii
diff --git a/Master/texmf-dist/tex/context/base/grph-fig.mkii b/Master/texmf-dist/tex/context/base/mkii/grph-fig.mkii
index c488ccc4f6c..c488ccc4f6c 100644
--- a/Master/texmf-dist/tex/context/base/grph-fig.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/grph-fig.mkii
diff --git a/Master/texmf-dist/tex/context/base/grph-inc.mkii b/Master/texmf-dist/tex/context/base/mkii/grph-inc.mkii
index 33f11a2bc8f..33f11a2bc8f 100644
--- a/Master/texmf-dist/tex/context/base/grph-inc.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/grph-inc.mkii
diff --git a/Master/texmf-dist/tex/context/base/grph-trf.mkii b/Master/texmf-dist/tex/context/base/mkii/grph-trf.mkii
index bd9875806b9..bd9875806b9 100644
--- a/Master/texmf-dist/tex/context/base/grph-trf.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/grph-trf.mkii
diff --git a/Master/texmf-dist/tex/context/base/hand-def.mkii b/Master/texmf-dist/tex/context/base/mkii/hand-def.mkii
index ab0044a8eda..ab0044a8eda 100644
--- a/Master/texmf-dist/tex/context/base/hand-def.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/hand-def.mkii
diff --git a/Master/texmf-dist/tex/context/base/hand-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/hand-ini.mkii
index 1d41c3adab7..1d41c3adab7 100644
--- a/Master/texmf-dist/tex/context/base/hand-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/hand-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/java-ans.mkii b/Master/texmf-dist/tex/context/base/mkii/java-ans.mkii
index 7e310baa495..7e310baa495 100644
--- a/Master/texmf-dist/tex/context/base/java-ans.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/java-ans.mkii
diff --git a/Master/texmf-dist/tex/context/base/java-exa.mkii b/Master/texmf-dist/tex/context/base/mkii/java-exa.mkii
index 584ee13512d..584ee13512d 100644
--- a/Master/texmf-dist/tex/context/base/java-exa.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/java-exa.mkii
diff --git a/Master/texmf-dist/tex/context/base/java-fil.mkii b/Master/texmf-dist/tex/context/base/mkii/java-fil.mkii
index 20376af44d6..20376af44d6 100644
--- a/Master/texmf-dist/tex/context/base/java-fil.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/java-fil.mkii
diff --git a/Master/texmf-dist/tex/context/base/java-fld.mkii b/Master/texmf-dist/tex/context/base/mkii/java-fld.mkii
index 0a76cc93c12..0a76cc93c12 100644
--- a/Master/texmf-dist/tex/context/base/java-fld.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/java-fld.mkii
diff --git a/Master/texmf-dist/tex/context/base/java-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/java-ini.mkii
index 2e62ca166f4..2e62ca166f4 100644
--- a/Master/texmf-dist/tex/context/base/java-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/java-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/java-stp.mkii b/Master/texmf-dist/tex/context/base/mkii/java-stp.mkii
index 7283c8ceb3d..7283c8ceb3d 100644
--- a/Master/texmf-dist/tex/context/base/java-stp.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/java-stp.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-alt.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-alt.mkii
index 1e49945d5fd..1e49945d5fd 100644
--- a/Master/texmf-dist/tex/context/base/lang-alt.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-alt.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-ana.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-ana.mkii
index f2dc4a17c00..f2dc4a17c00 100644
--- a/Master/texmf-dist/tex/context/base/lang-ana.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-ana.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-art.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-art.mkii
index 20216b571bf..20216b571bf 100644
--- a/Master/texmf-dist/tex/context/base/lang-art.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-art.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-bal.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-bal.mkii
index 4ab751a448d..4ab751a448d 100644
--- a/Master/texmf-dist/tex/context/base/lang-bal.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-bal.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-cel.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-cel.mkii
index e6519497b3d..e6519497b3d 100644
--- a/Master/texmf-dist/tex/context/base/lang-cel.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-cel.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-chi.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-chi.mkii
index 5d61281b0a2..5d61281b0a2 100644
--- a/Master/texmf-dist/tex/context/base/lang-chi.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-chi.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-ctx.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-ctx.mkii
index 2aecb918ee2..2aecb918ee2 100644
--- a/Master/texmf-dist/tex/context/base/lang-ctx.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-ctx.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-cyr.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-cyr.mkii
index eed3ec80e68..eed3ec80e68 100644
--- a/Master/texmf-dist/tex/context/base/lang-cyr.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-cyr.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-dis.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-dis.mkii
index 213c5110f57..213c5110f57 100644
--- a/Master/texmf-dist/tex/context/base/lang-dis.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-dis.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-frd.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-frd.mkii
index be4e07b75df..be4e07b75df 100644
--- a/Master/texmf-dist/tex/context/base/lang-frd.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-frd.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-frq.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-frq.mkii
index afeb5329c64..afeb5329c64 100644
--- a/Master/texmf-dist/tex/context/base/lang-frq.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-frq.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-ger.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-ger.mkii
index d33620cc7bc..d33620cc7bc 100644
--- a/Master/texmf-dist/tex/context/base/lang-ger.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-ger.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-grk.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-grk.mkii
index 9fd59382a0c..9fd59382a0c 100644
--- a/Master/texmf-dist/tex/context/base/lang-grk.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-grk.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-ind.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-ind.mkii
index bb33dacfd24..bb33dacfd24 100644
--- a/Master/texmf-dist/tex/context/base/lang-ind.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-ind.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-ini.mkii
index 6ad6f02e3ad..4561f4dd1f3 100644
--- a/Master/texmf-dist/tex/context/base/lang-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-ini.mkii
@@ -670,9 +670,9 @@
\def\nopatterns{\normallanguage\minusone}
-%D \XETEX\ is \UNICODE:
+%D \XETEX\ (and also \LUATEX) are \UNICODE:
-\ifnum\texengine=\xetexengine
+\ifnum\texengine>\pdftexengine
\def\synchronizepatternswithfont{}
\def\doloadpatterns #1#2{\dodoloadpatterns{#1}{#2}\s!default\s!default}
diff --git a/Master/texmf-dist/tex/context/base/lang-ita.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-ita.mkii
index 04acf3265c2..04acf3265c2 100644
--- a/Master/texmf-dist/tex/context/base/lang-ita.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-ita.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-jap.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-jap.mkii
index 1417e8ec58c..1417e8ec58c 100644
--- a/Master/texmf-dist/tex/context/base/lang-jap.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-jap.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-lab.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-lab.mkii
index 1ff964615e0..1ff964615e0 100644
--- a/Master/texmf-dist/tex/context/base/lang-lab.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-lab.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-mis.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-mis.mkii
index 3923df3e8ae..3923df3e8ae 100644
--- a/Master/texmf-dist/tex/context/base/lang-mis.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-mis.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-run.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-run.mkii
index 320ee8dabf6..320ee8dabf6 100644
--- a/Master/texmf-dist/tex/context/base/lang-run.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-run.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-sla.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-sla.mkii
index 81f9a9bf711..81f9a9bf711 100644
--- a/Master/texmf-dist/tex/context/base/lang-sla.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-sla.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-spa.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-spa.mkii
index 313e5f3e6e7..313e5f3e6e7 100644
--- a/Master/texmf-dist/tex/context/base/lang-spa.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-spa.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-spe.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-spe.mkii
index 11c57af3f23..11c57af3f23 100644
--- a/Master/texmf-dist/tex/context/base/lang-spe.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-spe.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-ura.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-ura.mkii
index 21bc8d94a74..21bc8d94a74 100644
--- a/Master/texmf-dist/tex/context/base/lang-ura.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-ura.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-url.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-url.mkii
index 1f340ffb0e4..1f340ffb0e4 100644
--- a/Master/texmf-dist/tex/context/base/lang-url.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-url.mkii
diff --git a/Master/texmf-dist/tex/context/base/lang-vn.mkii b/Master/texmf-dist/tex/context/base/mkii/lang-vn.mkii
index e564d989c70..e564d989c70 100644
--- a/Master/texmf-dist/tex/context/base/lang-vn.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/lang-vn.mkii
diff --git a/Master/texmf-dist/tex/context/base/math-ams.mkii b/Master/texmf-dist/tex/context/base/mkii/math-ams.mkii
index c73a890c02f..c73a890c02f 100644
--- a/Master/texmf-dist/tex/context/base/math-ams.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/math-ams.mkii
diff --git a/Master/texmf-dist/tex/context/base/math-arr.mkii b/Master/texmf-dist/tex/context/base/mkii/math-arr.mkii
index 71a833b8974..71a833b8974 100644
--- a/Master/texmf-dist/tex/context/base/math-arr.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/math-arr.mkii
diff --git a/Master/texmf-dist/tex/context/base/math-cow.mkii b/Master/texmf-dist/tex/context/base/mkii/math-cow.mkii
index 04f659b4425..04f659b4425 100644
--- a/Master/texmf-dist/tex/context/base/math-cow.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/math-cow.mkii
diff --git a/Master/texmf-dist/tex/context/base/math-eul.mkii b/Master/texmf-dist/tex/context/base/mkii/math-eul.mkii
index f502445259c..f502445259c 100644
--- a/Master/texmf-dist/tex/context/base/math-eul.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/math-eul.mkii
diff --git a/Master/texmf-dist/tex/context/base/math-fou.mkii b/Master/texmf-dist/tex/context/base/mkii/math-fou.mkii
index 26b03d73ec9..26b03d73ec9 100644
--- a/Master/texmf-dist/tex/context/base/math-fou.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/math-fou.mkii
diff --git a/Master/texmf-dist/tex/context/base/math-frc.mkii b/Master/texmf-dist/tex/context/base/mkii/math-frc.mkii
index b14c9377497..b14c9377497 100644
--- a/Master/texmf-dist/tex/context/base/math-frc.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/math-frc.mkii
diff --git a/Master/texmf-dist/tex/context/base/math-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/math-ini.mkii
index d6d10feb323..d6d10feb323 100644
--- a/Master/texmf-dist/tex/context/base/math-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/math-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/math-lbr.mkii b/Master/texmf-dist/tex/context/base/mkii/math-lbr.mkii
index 0aa1df66514..0aa1df66514 100644
--- a/Master/texmf-dist/tex/context/base/math-lbr.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/math-lbr.mkii
diff --git a/Master/texmf-dist/tex/context/base/math-pln.mkii b/Master/texmf-dist/tex/context/base/mkii/math-pln.mkii
index 975869c702c..975869c702c 100644
--- a/Master/texmf-dist/tex/context/base/math-pln.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/math-pln.mkii
diff --git a/Master/texmf-dist/tex/context/base/math-run.mkii b/Master/texmf-dist/tex/context/base/mkii/math-run.mkii
index 79d08fbedb1..79d08fbedb1 100644
--- a/Master/texmf-dist/tex/context/base/math-run.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/math-run.mkii
diff --git a/Master/texmf-dist/tex/context/base/math-tex.mkii b/Master/texmf-dist/tex/context/base/mkii/math-tex.mkii
index e3dd634e6ef..e3dd634e6ef 100644
--- a/Master/texmf-dist/tex/context/base/math-tex.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/math-tex.mkii
diff --git a/Master/texmf-dist/tex/context/base/math-tim.mkii b/Master/texmf-dist/tex/context/base/mkii/math-tim.mkii
index da7d17e7ba6..da7d17e7ba6 100644
--- a/Master/texmf-dist/tex/context/base/math-tim.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/math-tim.mkii
diff --git a/Master/texmf-dist/tex/context/base/math-uni.mkii b/Master/texmf-dist/tex/context/base/mkii/math-uni.mkii
index 5c75a9fb44b..5c75a9fb44b 100644
--- a/Master/texmf-dist/tex/context/base/math-uni.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/math-uni.mkii
diff --git a/Master/texmf-dist/tex/context/base/meta-clp.mkii b/Master/texmf-dist/tex/context/base/mkii/meta-clp.mkii
index 5c9206deee9..5c9206deee9 100644
--- a/Master/texmf-dist/tex/context/base/meta-clp.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/meta-clp.mkii
diff --git a/Master/texmf-dist/tex/context/base/meta-dum.mkii b/Master/texmf-dist/tex/context/base/mkii/meta-dum.mkii
index dae30ed695b..dae30ed695b 100644
--- a/Master/texmf-dist/tex/context/base/meta-dum.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/meta-dum.mkii
diff --git a/Master/texmf-dist/tex/context/base/meta-fig.mkii b/Master/texmf-dist/tex/context/base/mkii/meta-fig.mkii
index 31fe5fc0c0e..31fe5fc0c0e 100644
--- a/Master/texmf-dist/tex/context/base/meta-fig.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/meta-fig.mkii
diff --git a/Master/texmf-dist/tex/context/base/meta-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/meta-ini.mkii
index 9780fecfadf..9780fecfadf 100644
--- a/Master/texmf-dist/tex/context/base/meta-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/meta-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/meta-mis.mkii b/Master/texmf-dist/tex/context/base/mkii/meta-mis.mkii
index e8282c381b8..e8282c381b8 100644
--- a/Master/texmf-dist/tex/context/base/meta-mis.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/meta-mis.mkii
diff --git a/Master/texmf-dist/tex/context/base/meta-nav.mkii b/Master/texmf-dist/tex/context/base/mkii/meta-nav.mkii
index 45a31ba5ecf..45a31ba5ecf 100644
--- a/Master/texmf-dist/tex/context/base/meta-nav.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/meta-nav.mkii
diff --git a/Master/texmf-dist/tex/context/base/meta-pag.mkii b/Master/texmf-dist/tex/context/base/mkii/meta-pag.mkii
index 82a525a0820..82a525a0820 100644
--- a/Master/texmf-dist/tex/context/base/meta-pag.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/meta-pag.mkii
diff --git a/Master/texmf-dist/tex/context/base/meta-pdf.mkii b/Master/texmf-dist/tex/context/base/mkii/meta-pdf.mkii
index e1311339878..e1311339878 100644
--- a/Master/texmf-dist/tex/context/base/meta-pdf.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/meta-pdf.mkii
diff --git a/Master/texmf-dist/tex/context/base/meta-pre.mkii b/Master/texmf-dist/tex/context/base/mkii/meta-pre.mkii
index 098be030b19..098be030b19 100644
--- a/Master/texmf-dist/tex/context/base/meta-pre.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/meta-pre.mkii
diff --git a/Master/texmf-dist/tex/context/base/meta-tex.mkii b/Master/texmf-dist/tex/context/base/mkii/meta-tex.mkii
index ab0f244570f..ab0f244570f 100644
--- a/Master/texmf-dist/tex/context/base/meta-tex.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/meta-tex.mkii
diff --git a/Master/texmf-dist/tex/context/base/meta-txt.mkii b/Master/texmf-dist/tex/context/base/mkii/meta-txt.mkii
index dc8bb7ca83b..dc8bb7ca83b 100644
--- a/Master/texmf-dist/tex/context/base/meta-txt.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/meta-txt.mkii
diff --git a/Master/texmf-dist/tex/context/base/meta-xml.mkii b/Master/texmf-dist/tex/context/base/mkii/meta-xml.mkii
index 71708a0f9a5..71708a0f9a5 100644
--- a/Master/texmf-dist/tex/context/base/meta-xml.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/meta-xml.mkii
diff --git a/Master/texmf-dist/tex/context/base/mult-aux.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-aux.mkii
index 3869a95db2e..3869a95db2e 100644
--- a/Master/texmf-dist/tex/context/base/mult-aux.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-aux.mkii
diff --git a/Master/texmf-dist/tex/context/base/mult-chk.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-chk.mkii
index cde00fd44c4..cde00fd44c4 100644
--- a/Master/texmf-dist/tex/context/base/mult-chk.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-chk.mkii
diff --git a/Master/texmf-dist/tex/context/base/mult-com.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-com.mkii
index 600819b7ebc..600819b7ebc 100644
--- a/Master/texmf-dist/tex/context/base/mult-com.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-com.mkii
diff --git a/Master/texmf-dist/tex/context/base/mult-con.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-con.mkii
index 7d0a47bd0a6..7d0a47bd0a6 100644
--- a/Master/texmf-dist/tex/context/base/mult-con.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-con.mkii
diff --git a/Master/texmf-dist/tex/context/base/mult-de.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-de.mkii
index 90aae390e0d..e0099f4e7e7 100644
--- a/Master/texmf-dist/tex/context/base/mult-de.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-de.mkii
@@ -3,6 +3,7 @@
% definitions for interface variables for language de
%
\setinterfacevariable{Addition}{Zusatz}
+\setinterfacevariable{Alphabetic}{Alphabetic}
\setinterfacevariable{Balloon}{Ballon}
\setinterfacevariable{Cap}{Kap}
\setinterfacevariable{Capital}{Versalien}
@@ -27,6 +28,7 @@
\setinterfacevariable{NextPage}{FolgendeSeite}
\setinterfacevariable{Numbers}{Ziffern}
\setinterfacevariable{OpenNamedDocument}{OpenNamedDocument}
+\setinterfacevariable{Ordinal}{Ordinal}
\setinterfacevariable{Paragraph}{Absatz}
\setinterfacevariable{PauseMovie}{PauseFilm}
\setinterfacevariable{PauseRendering}{PauseRendering}
@@ -72,19 +74,24 @@
\setinterfacevariable{action}{aktion}
\setinterfacevariable{after}{nach}
\setinterfacevariable{all}{alles}
+\setinterfacevariable{alphabetic}{alphabetic}
\setinterfacevariable{always}{immer}
\setinterfacevariable{and}{und}
\setinterfacevariable{answerarea}{answerarea}
\setinterfacevariable{appendices}{anhaenge}
\setinterfacevariable{appendix}{anhang}
\setinterfacevariable{april}{april}
+\setinterfacevariable{aside}{aside}
+\setinterfacevariable{atleftmargin}{atleftmargin}
\setinterfacevariable{atmargin}{amrand}
\setinterfacevariable{atpage}{aufseite}
+\setinterfacevariable{atrightmargin}{atrightmargin}
\setinterfacevariable{attachment}{attachment}
\setinterfacevariable{august}{august}
\setinterfacevariable{author}{autor}
\setinterfacevariable{auto}{auto}
\setinterfacevariable{autointro}{autointro}
+\setinterfacevariable{autopunctuation}{autopunctuation}
\setinterfacevariable{back}{zurueck}
\setinterfacevariable{background}{hintergrund}
\setinterfacevariable{backmatter}{epiloge}
@@ -100,6 +107,7 @@
\setinterfacevariable{bigger}{bigger}
\setinterfacevariable{bigpreference}{grosszuegig}
\setinterfacevariable{blank}{blanko}
+\setinterfacevariable{block}{block}
\setinterfacevariable{blockquote}{blockquote}
\setinterfacevariable{bodymatter}{haupttexte}
\setinterfacevariable{bodypart}{haupttext}
@@ -108,28 +116,37 @@
\setinterfacevariable{boldslanted}{fettgeneigt}
\setinterfacevariable{bookmark}{bookmark}
\setinterfacevariable{both}{beide}
+\setinterfacevariable{bothtext}{bothtext}
\setinterfacevariable{bottom}{unten}
+\setinterfacevariable{box}{box}
\setinterfacevariable{brief}{brief}
\setinterfacevariable{broad}{breit}
\setinterfacevariable{buffer}{puffer}
\setinterfacevariable{by}{pro}
\setinterfacevariable{calligraphic}{kalligraphie}
+\setinterfacevariable{camel}{camel}
\setinterfacevariable{cap}{kap}
\setinterfacevariable{capital}{versalien}
\setinterfacevariable{center}{center}
+\setinterfacevariable{centerlast}{centerlast}
\setinterfacevariable{chapter}{kapitel}
\setinterfacevariable{character}{buchstabe}
\setinterfacevariable{characters}{buchstaben}
+\setinterfacevariable{chemical}{chemical}
+\setinterfacevariable{chemicals}{chemicals}
\setinterfacevariable{chemistry}{chemistry}
\setinterfacevariable{cite}{cite}
\setinterfacevariable{color}{farbe}
\setinterfacevariable{column}{column}
\setinterfacevariable{columns}{spalten}
+\setinterfacevariable{combination}{combination}
\setinterfacevariable{command}{befehl}
\setinterfacevariable{commands}{befehle}
\setinterfacevariable{comment}{kommentar}
\setinterfacevariable{component}{komponente}
+\setinterfacevariable{compressseparator}{compressseparator}
\setinterfacevariable{concept}{konzept}
+\setinterfacevariable{construction}{construction}
\setinterfacevariable{content}{inhalt}
\setinterfacevariable{contents}{inhalte}
\setinterfacevariable{continue}{fortsetzten}
@@ -138,6 +155,7 @@
\setinterfacevariable{conversion}{konversion}
\setinterfacevariable{current}{aktuell}
\setinterfacevariable{cutspace}{cutspace}
+\setinterfacevariable{dataset}{dataset}
\setinterfacevariable{date}{datum}
\setinterfacevariable{day}{tag}
\setinterfacevariable{december}{dezember}
@@ -151,6 +169,7 @@
\setinterfacevariable{down}{down}
\setinterfacevariable{each}{jede}
\setinterfacevariable{edge}{kante}
+\setinterfacevariable{eight}{acht}
\setinterfacevariable{embed}{embed}
\setinterfacevariable{empty}{leer}
\setinterfacevariable{end}{end}
@@ -160,6 +179,7 @@
\setinterfacevariable{even}{gerade}
\setinterfacevariable{export}{export}
\setinterfacevariable{external}{extern}
+\setinterfacevariable{extremestretch}{extremestretch}
\setinterfacevariable{fact}{gegeben}
\setinterfacevariable{february}{februar}
\setinterfacevariable{figure}{abbildung}
@@ -195,6 +215,7 @@
\setinterfacevariable{friday}{freitag}
\setinterfacevariable{frontmatter}{einleitungen}
\setinterfacevariable{frontpart}{einleitung}
+\setinterfacevariable{fullhz}{fullhz}
\setinterfacevariable{global}{global}
\setinterfacevariable{graphic}{grafik}
\setinterfacevariable{graphics}{grafiken}
@@ -223,14 +244,28 @@
\setinterfacevariable{indices}{indizies}
\setinterfacevariable{informeel}{informeel}
\setinterfacevariable{inherit}{inherit}
+\setinterfacevariable{ininner}{ininner}
+\setinterfacevariable{ininneredge}{ininneredge}
+\setinterfacevariable{ininnermargin}{ininnermargin}
\setinterfacevariable{inleft}{imlinken}
+\setinterfacevariable{inleftedge}{imlinkenrand}
+\setinterfacevariable{inleftmargin}{inlinkermarginale}
+\setinterfacevariable{inline}{inline}
\setinterfacevariable{inmargin}{imrand}
\setinterfacevariable{inner}{innen}
\setinterfacevariable{inneredge}{inneredge}
\setinterfacevariable{innermargin}{innermargin}
+\setinterfacevariable{inother}{inother}
+\setinterfacevariable{inouter}{inouter}
+\setinterfacevariable{inouteredge}{inouteredge}
+\setinterfacevariable{inoutermargin}{inoutermargin}
\setinterfacevariable{inright}{imrechten}
+\setinterfacevariable{inrightedge}{imrechtenrand}
+\setinterfacevariable{inrightmargin}{inrechtermarginale}
+\setinterfacevariable{integral}{integral}
\setinterfacevariable{interaction}{interaktion}
\setinterfacevariable{interactionmenu}{interaktionsmenue}
+\setinterfacevariable{interactive}{interactive}
\setinterfacevariable{intermezzi}{intermezzi}
\setinterfacevariable{intermezzo}{intermezzo}
\setinterfacevariable{intext}{imtext}
@@ -245,6 +280,7 @@
\setinterfacevariable{july}{juli}
\setinterfacevariable{june}{juni}
\setinterfacevariable{keep}{behalte}
+\setinterfacevariable{kerncharacters}{kerncharacters}
\setinterfacevariable{knockout}{knockout}
\setinterfacevariable{label}{label}
\setinterfacevariable{landscape}{querformat}
@@ -263,6 +299,7 @@
\setinterfacevariable{legend}{legende}
\setinterfacevariable{less}{less}
\setinterfacevariable{lesshyphenation}{lesshyphenation}
+\setinterfacevariable{letterspacing}{letterspacing}
\setinterfacevariable{line}{zeile}
\setinterfacevariable{linenote}{linenote}
\setinterfacevariable{lines}{zeilen}
@@ -272,6 +309,7 @@
\setinterfacevariable{logo}{logo}
\setinterfacevariable{logos}{logos}
\setinterfacevariable{lohi}{hoti}
+\setinterfacevariable{long}{long}
\setinterfacevariable{loose}{lose}
\setinterfacevariable{low}{tief}
\setinterfacevariable{ls}{ls}
@@ -280,6 +318,7 @@
\setinterfacevariable{march}{maerz}
\setinterfacevariable{margin}{marginalie}
\setinterfacevariable{marginedge}{marginalkante}
+\setinterfacevariable{margintext}{marginaltext}
\setinterfacevariable{margintitle}{marginaltitel}
\setinterfacevariable{marking}{beschriftung}
\setinterfacevariable{math}{math}
@@ -300,9 +339,11 @@
\setinterfacevariable{minheight}{minhoehe}
\setinterfacevariable{minwidth}{minbreite}
\setinterfacevariable{mirrored}{gespiegelt}
+\setinterfacevariable{mixed}{mixed}
\setinterfacevariable{monday}{montag}
\setinterfacevariable{mono}{mono}
\setinterfacevariable{monobold}{monofett}
+\setinterfacevariable{mononormal}{mononormal}
\setinterfacevariable{month}{monat}
\setinterfacevariable{more}{more}
\setinterfacevariable{morehyphenation}{morehyphenation}
@@ -316,17 +357,23 @@
\setinterfacevariable{nextoddpage}{naechsteungeradeseite}
\setinterfacevariable{nextpage}{folgendeseite}
\setinterfacevariable{nextsubpage}{folgendeunterseite}
+\setinterfacevariable{nine}{neun}
\setinterfacevariable{no}{nein}
\setinterfacevariable{nocheck}{nocheck}
+\setinterfacevariable{nodepth}{nodepth}
\setinterfacevariable{nofit}{nofit}
\setinterfacevariable{nogrid}{nogrid}
+\setinterfacevariable{noheight}{noheight}
\setinterfacevariable{nohz}{nohz}
+\setinterfacevariable{noline}{noline}
\setinterfacevariable{nomarking}{keinebeschriftung}
\setinterfacevariable{none}{kein}
\setinterfacevariable{nonumber}{nonumber}
+\setinterfacevariable{norepeat}{norepeat}
\setinterfacevariable{normal}{normal}
\setinterfacevariable{nospacing}{nospacing}
\setinterfacevariable{not}{nicht}
+\setinterfacevariable{notation}{notation}
\setinterfacevariable{note}{note}
\setinterfacevariable{nothanging}{nothanging}
\setinterfacevariable{nothyphenated}{nothyphenated}
@@ -340,9 +387,11 @@
\setinterfacevariable{off}{aus}
\setinterfacevariable{offset}{offset}
\setinterfacevariable{old}{old}
+\setinterfacevariable{oldstyle}{oldstyle}
\setinterfacevariable{on}{an}
\setinterfacevariable{one}{eins}
\setinterfacevariable{opposite}{gegenueber}
+\setinterfacevariable{ordinal}{ordinal}
\setinterfacevariable{outer}{aussen}
\setinterfacevariable{outeredge}{outeredge}
\setinterfacevariable{outermargin}{outermargin}
@@ -411,6 +460,7 @@
\setinterfacevariable{samepage}{selbeseite}
\setinterfacevariable{sans}{sans}
\setinterfacevariable{sansbold}{sansfett}
+\setinterfacevariable{sansnormal}{sansnormal}
\setinterfacevariable{sansserif}{grotesk}
\setinterfacevariable{saturday}{samstag}
\setinterfacevariable{screen}{raster}
@@ -421,12 +471,19 @@
\setinterfacevariable{selectfont}{selectfont}
\setinterfacevariable{september}{september}
\setinterfacevariable{serif}{serif}
+\setinterfacevariable{serifbold}{serifbold}
+\setinterfacevariable{serifnormal}{serifnormal}
\setinterfacevariable{serried}{kleinerabstand}
\setinterfacevariable{setups}{setups}
+\setinterfacevariable{seven}{sieben}
\setinterfacevariable{sheet}{sheet}
+\setinterfacevariable{shiftdown}{shiftdown}
+\setinterfacevariable{shiftup}{shiftup}
\setinterfacevariable{short}{kurz}
\setinterfacevariable{simplefonts}{simplefonts}
+\setinterfacevariable{simplelist}{simplelist}
\setinterfacevariable{singlesided}{einzelseitig}
+\setinterfacevariable{six}{sechs}
\setinterfacevariable{slanted}{geneigt}
\setinterfacevariable{slantedbold}{geneigtfett}
\setinterfacevariable{small}{klein}
@@ -444,6 +501,7 @@
\setinterfacevariable{smalltype}{kleintippen}
\setinterfacevariable{somewhere}{irgendwo}
\setinterfacevariable{sorted}{sortiert}
+\setinterfacevariable{sorting}{sorting}
\setinterfacevariable{space}{spatium}
\setinterfacevariable{spacing}{spatiumausgleich}
\setinterfacevariable{speech}{speech}
@@ -456,6 +514,7 @@
\setinterfacevariable{stop}{stop}
\setinterfacevariable{stopper}{trenner}
\setinterfacevariable{stretch}{strecken}
+\setinterfacevariable{stretched}{stretched}
\setinterfacevariable{strict}{streng}
\setinterfacevariable{strong}{strong}
\setinterfacevariable{strut}{strut}
@@ -489,6 +548,7 @@
\setinterfacevariable{sym}{sym}
\setinterfacevariable{symbol}{symbol}
\setinterfacevariable{synchronize}{synchronize}
+\setinterfacevariable{synonym}{synonym}
\setinterfacevariable{system}{systeme}
\setinterfacevariable{table}{tabelle}
\setinterfacevariable{tablehead}{tabellenueberschrift}
@@ -519,6 +579,7 @@
\setinterfacevariable{underbars}{unterstreichen}
\setinterfacevariable{understrike}{understrike}
\setinterfacevariable{understrikes}{understrikes}
+\setinterfacevariable{unframed}{unframed}
\setinterfacevariable{unit}{einheit}
\setinterfacevariable{units}{einheiten}
\setinterfacevariable{unknown}{unbekannt}
@@ -531,6 +592,8 @@
\setinterfacevariable{very}{sehr}
\setinterfacevariable{verystrict}{sehrstreng}
\setinterfacevariable{verytolerant}{sehrtolerant}
+\setinterfacevariable{vfenced}{vfenced}
+\setinterfacevariable{vulgarfraction}{vulgarfraction}
\setinterfacevariable{weak}{weak}
\setinterfacevariable{wednesday}{mittwoch}
\setinterfacevariable{week}{woche}
@@ -539,6 +602,7 @@
\setinterfacevariable{wide}{breit}
\setinterfacevariable{width}{breite}
\setinterfacevariable{word}{wort}
+\setinterfacevariable{words}{words}
\setinterfacevariable{xml}{xml}
\setinterfacevariable{year}{jahr}
\setinterfacevariable{yes}{ja}
@@ -564,8 +628,10 @@
\setinterfaceconstant{artauthoretaldisplay}{artauthoretaldisplay}
\setinterfaceconstant{artauthoretallimit}{artauthoretallimit}
\setinterfaceconstant{artauthoretaltext}{artauthoretaltext}
+\setinterfaceconstant{artoffset}{artoffset}
\setinterfaceconstant{at}{bei}
\setinterfaceconstant{author}{autor}
+\setinterfaceconstant{authorconversion}{authorconversion}
\setinterfaceconstant{authoretaldisplay}{authoretaldisplay}
\setinterfaceconstant{authoretallimit}{authoretallimit}
\setinterfaceconstant{authoretaltext}{authoretaltext}
@@ -596,6 +662,7 @@
\setinterfaceconstant{bidi}{bidi}
\setinterfaceconstant{big}{gross}
\setinterfaceconstant{blank}{blanko}
+\setinterfaceconstant{bleedoffset}{bleedoffset}
\setinterfaceconstant{blockway}{blockauf}
\setinterfaceconstant{bodyfont}{fliesstext}
\setinterfaceconstant{boffset}{boffset}
@@ -620,6 +687,8 @@
\setinterfaceconstant{calculate}{berechnen}
\setinterfaceconstant{category}{category}
\setinterfaceconstant{ccommand}{cbefehl}
+\setinterfaceconstant{character}{character}
+\setinterfaceconstant{characters}{characters}
\setinterfaceconstant{check}{check}
\setinterfaceconstant{click}{klick}
\setinterfaceconstant{clickin}{klickin}
@@ -634,15 +703,19 @@
\setinterfaceconstant{column}{spalte}
\setinterfaceconstant{columndistance}{spaltenabstand}
\setinterfaceconstant{columns}{spalten}
+\setinterfaceconstant{comma}{comma}
\setinterfaceconstant{command}{befehl}
\setinterfaceconstant{commandafter}{zumbefehl}
\setinterfaceconstant{commandbefore}{vorbefehl}
\setinterfaceconstant{commands}{befehle}
+\setinterfaceconstant{comment}{comment}
+\setinterfaceconstant{commentchar}{commentchar}
\setinterfaceconstant{commentoffset}{commentoffset}
\setinterfaceconstant{compact}{compact}
\setinterfaceconstant{component}{component}
\setinterfaceconstant{compoundhyphen}{compoundhyphen}
\setinterfaceconstant{compress}{compress}
+\setinterfaceconstant{compressseparator}{compressseparator}
\setinterfaceconstant{concerns}{concerns}
\setinterfaceconstant{connector}{connector}
\setinterfaceconstant{continue}{fortsetzen}
@@ -654,12 +727,14 @@
\setinterfaceconstant{coupling}{verknuepfung}
\setinterfaceconstant{couplingway}{verkopplungsart}
\setinterfaceconstant{criterium}{kriterium}
+\setinterfaceconstant{cropoffset}{cropoffset}
\setinterfaceconstant{cssfile}{cssfile}
\setinterfaceconstant{current}{aktuell}
\setinterfaceconstant{cutspace}{cutspace}
\setinterfaceconstant{dash}{strich}
\setinterfaceconstant{dat}{dat}
\setinterfaceconstant{database}{database}
+\setinterfaceconstant{dataset}{dataset}
\setinterfaceconstant{date}{datum}
\setinterfaceconstant{deepnumbercommand}{deepnumbercommand}
\setinterfaceconstant{deeptextcommand}{deeptextcommand}
@@ -671,8 +746,10 @@
\setinterfaceconstant{directory}{verzeichnis}
\setinterfaceconstant{display}{bildschirm}
\setinterfaceconstant{distance}{abstand}
+\setinterfaceconstant{domain}{domain}
\setinterfaceconstant{dot}{punkt}
\setinterfaceconstant{doublesided}{doppelseitig}
+\setinterfaceconstant{down}{down}
\setinterfaceconstant{dummy}{dummy}
\setinterfaceconstant{dx}{dx}
\setinterfaceconstant{dy}{dy}
@@ -688,6 +765,10 @@
\setinterfaceconstant{equalheight}{equalheight}
\setinterfaceconstant{equalwidth}{equalwidth}
\setinterfaceconstant{escape}{escape}
+\setinterfaceconstant{etaldisplay}{etaldisplay}
+\setinterfaceconstant{etallimit}{etallimit}
+\setinterfaceconstant{etaloption}{etaloption}
+\setinterfaceconstant{etaltext}{etaltext}
\setinterfaceconstant{evenmargin}{geraderand}
\setinterfaceconstant{exitoffset}{exitoffset}
\setinterfaceconstant{expansion}{expansion}
@@ -697,18 +778,24 @@
\setinterfaceconstant{fallback}{fallback}
\setinterfaceconstant{family}{familie}
\setinterfaceconstant{features}{features}
+\setinterfaceconstant{fences}{fences}
+\setinterfaceconstant{field}{field}
\setinterfaceconstant{fieldbackgroundcolor}{feldhintergrundfarbe}
\setinterfaceconstant{fieldframecolor}{feldrahmenfarbe}
\setinterfaceconstant{fieldlayer}{fieldlayer}
\setinterfaceconstant{fieldoffset}{feldoffset}
\setinterfaceconstant{file}{datei}
+\setinterfaceconstant{filler}{filler}
\setinterfaceconstant{filtercommand}{filtercommand}
\setinterfaceconstant{finalnamesep}{finalnamesep}
+\setinterfaceconstant{finalpagesep}{finalpagesep}
\setinterfaceconstant{finalpubsep}{finalpubsep}
+\setinterfaceconstant{first}{first}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{ersteseite}
\setinterfaceconstant{focus}{focus}
\setinterfaceconstant{focusin}{focusin}
+\setinterfaceconstant{focusoffset}{focusoffset}
\setinterfaceconstant{focusout}{focusout}
\setinterfaceconstant{footer}{fusszeile}
\setinterfaceconstant{footerdistance}{fusszeilenabstand}
@@ -717,6 +804,7 @@
\setinterfaceconstant{foregroundcolor}{foregroundcolor}
\setinterfaceconstant{foregroundstyle}{foregroundstyle}
\setinterfaceconstant{format}{formatieren}
+\setinterfaceconstant{fractions}{fractions}
\setinterfaceconstant{frame}{rahmen}
\setinterfaceconstant{framecolor}{rahmenfarbe}
\setinterfaceconstant{framecorner}{rahmenwinkel}
@@ -725,10 +813,14 @@
\setinterfaceconstant{frameradius}{rahmenradius}
\setinterfaceconstant{frames}{umrahmen}
\setinterfaceconstant{from}{von}
+\setinterfaceconstant{functioncolor}{functioncolor}
+\setinterfaceconstant{functionstyle}{functionstyle}
\setinterfaceconstant{get}{hole}
\setinterfaceconstant{global}{global}
\setinterfaceconstant{goodies}{goodies}
\setinterfaceconstant{grid}{gritter}
+\setinterfaceconstant{group}{group}
+\setinterfaceconstant{groupsuffix}{groupsuffix}
\setinterfaceconstant{hang}{haengend}
\setinterfaceconstant{hcompact}{hcompact}
\setinterfaceconstant{headalign}{headalign}
@@ -748,19 +840,23 @@
\setinterfaceconstant{hoffset}{hoffset}
\setinterfaceconstant{horoffset}{rumpfabstand}
\setinterfaceconstant{hyphen}{hyphen}
+\setinterfaceconstant{hyphens}{hyphens}
\setinterfaceconstant{icommand}{ibefehl}
+\setinterfaceconstant{ignore}{ignore}
\setinterfaceconstant{in}{in}
\setinterfaceconstant{inbetween}{zwischen}
\setinterfaceconstant{increment}{erhoehen}
\setinterfaceconstant{incrementnumber}{nummererhoehen}
\setinterfaceconstant{indenting}{einziehen}
\setinterfaceconstant{indentnext}{ziehefolgendeein}
+\setinterfaceconstant{index}{index}
\setinterfaceconstant{indicator}{indikator}
\setinterfaceconstant{initialsep}{initialsep}
\setinterfaceconstant{inner}{innen}
\setinterfaceconstant{innermargin}{innermargin}
\setinterfaceconstant{inputfile}{inputfile}
\setinterfaceconstant{insidesection}{insidesection}
+\setinterfaceconstant{instance}{instance}
\setinterfaceconstant{intent}{intent}
\setinterfaceconstant{interaction}{interaktion}
\setinterfaceconstant{interlinespace}{zeilenabstande}
@@ -769,15 +865,21 @@
\setinterfaceconstant{italicfont}{italicfont}
\setinterfaceconstant{itemalign}{itemalign}
\setinterfaceconstant{items}{posten}
+\setinterfaceconstant{joiners}{joiners}
+\setinterfaceconstant{journalconversion}{journalconversion}
\setinterfaceconstant{juniorsep}{juniorsep}
+\setinterfaceconstant{keeptogether}{keeptogether}
\setinterfaceconstant{ken}{ken}
\setinterfaceconstant{keyexpansion}{keyexpansion}
\setinterfaceconstant{keys}{keys}
\setinterfaceconstant{keyword}{keyword}
\setinterfaceconstant{label}{label}
\setinterfaceconstant{labeloffset}{labeloffset}
+\setinterfaceconstant{language}{language}
+\setinterfaceconstant{last}{last}
\setinterfaceconstant{lastnamesep}{lastnamesep}
\setinterfaceconstant{lastpage}{letzteseite}
+\setinterfaceconstant{lastpagesep}{lastpagesep}
\setinterfaceconstant{lastpubsep}{lastpubsep}
\setinterfaceconstant{layout}{layout}
\setinterfaceconstant{left}{links}
@@ -798,6 +900,7 @@
\setinterfaceconstant{leftsubsentence}{linkersubsatz}
\setinterfaceconstant{lefttext}{linkertext}
\setinterfaceconstant{leftwidth}{linkerbreite}
+\setinterfaceconstant{leftwords}{leftwords}
\setinterfaceconstant{less}{less}
\setinterfaceconstant{level}{niveau}
\setinterfaceconstant{levels}{niveaus}
@@ -854,10 +957,15 @@
\setinterfaceconstant{nbottom}{nunten}
\setinterfaceconstant{nc}{nc}
\setinterfaceconstant{next}{folgende}
+\setinterfaceconstant{nextleft}{nextleft}
+\setinterfaceconstant{nextleftquotation}{nextleftquotation}
+\setinterfaceconstant{nextright}{nextright}
+\setinterfaceconstant{nextrightquotation}{nextrightquotation}
\setinterfaceconstant{nl}{nl}
\setinterfaceconstant{nleft}{nlinks}
\setinterfaceconstant{nlines}{zzeile}
\setinterfaceconstant{norm}{norm}
+\setinterfaceconstant{note}{note}
\setinterfaceconstant{nr}{nr}
\setinterfaceconstant{nright}{nrechts}
\setinterfaceconstant{ntop}{noben}
@@ -888,6 +996,7 @@
\setinterfaceconstant{openaction}{oeffenaktion}
\setinterfaceconstant{openpage}{openpage}
\setinterfaceconstant{openpageaction}{openpageaction}
+\setinterfaceconstant{openup}{openup}
\setinterfaceconstant{opticalsize}{opticalsize}
\setinterfaceconstant{option}{option}
\setinterfaceconstant{order}{order}
@@ -901,8 +1010,10 @@
\setinterfaceconstant{pagecolor}{seitenfarbe}
\setinterfaceconstant{pagecolormodel}{pagecolormodel}
\setinterfaceconstant{pagecommand}{seitenbefehl}
+\setinterfaceconstant{pageconnector}{pageconnector}
\setinterfaceconstant{pageconversion}{pageconversion}
\setinterfaceconstant{pageconversionset}{pageconversionset}
+\setinterfaceconstant{pageleft}{pageleft}
\setinterfaceconstant{pagenumber}{seitennummer}
\setinterfaceconstant{pageprefix}{pageprefix}
\setinterfaceconstant{pageprefixconnector}{pageprefixconnector}
@@ -913,7 +1024,9 @@
\setinterfaceconstant{pageprefixset}{pageprefixset}
\setinterfaceconstant{pageprefixstarter}{pageprefixstarter}
\setinterfaceconstant{pageprefixstopper}{pageprefixstopper}
+\setinterfaceconstant{pageright}{pageright}
\setinterfaceconstant{pagesegments}{pagesegments}
+\setinterfaceconstant{pagesep}{pagesep}
\setinterfaceconstant{pageseparatorset}{pageseparatorset}
\setinterfaceconstant{pageset}{pageset}
\setinterfaceconstant{pagestarter}{pagestarter}
@@ -923,6 +1036,7 @@
\setinterfaceconstant{palet}{palette}
\setinterfaceconstant{paper}{papier}
\setinterfaceconstant{paragraph}{absatz}
+\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{platziere}
\setinterfaceconstant{placehead}{setzekopf}
\setinterfaceconstant{placestopper}{setzetrenner}
@@ -943,7 +1057,9 @@
\setinterfaceconstant{printable}{druckbar}
\setinterfaceconstant{process}{process}
\setinterfaceconstant{profile}{profile}
+\setinterfaceconstant{properties}{properties}
\setinterfaceconstant{pubsep}{pubsep}
+\setinterfaceconstant{quotechar}{quotechar}
\setinterfaceconstant{radius}{radius}
\setinterfaceconstant{random}{zufaellig}
\setinterfaceconstant{range}{range}
@@ -951,18 +1067,24 @@
\setinterfaceconstant{ref}{ref}
\setinterfaceconstant{refcommand}{refcommand}
\setinterfaceconstant{reference}{referenz}
+\setinterfaceconstant{referencemethod}{referencemethod}
\setinterfaceconstant{referenceprefix}{referenceprefix}
\setinterfaceconstant{referencing}{referieren}
\setinterfaceconstant{region}{region}
\setinterfaceconstant{regionin}{regionin}
\setinterfaceconstant{regionout}{regionaus}
+\setinterfaceconstant{register}{register}
\setinterfaceconstant{regularfeatures}{regularfeatures}
\setinterfaceconstant{regularfont}{regularfont}
+\setinterfaceconstant{renderingsetup}{renderingsetup}
\setinterfaceconstant{repeat}{wiederholen}
\setinterfaceconstant{reset}{reset}
\setinterfaceconstant{resetnumber}{resetnumber}
\setinterfaceconstant{resolution}{aufloesung}
+\setinterfaceconstant{resources}{resources}
+\setinterfaceconstant{reverse}{reverse}
\setinterfaceconstant{right}{rechts}
+\setinterfaceconstant{rightchars}{rightchars}
\setinterfaceconstant{rightcolor}{rechterfarbe}
\setinterfaceconstant{rightcompoundhyphen}{rightcompoundhyphen}
\setinterfaceconstant{rightedge}{rechtekante}
@@ -980,6 +1102,7 @@
\setinterfaceconstant{rightsubsentence}{rechtersubsatz}
\setinterfaceconstant{righttext}{rechtertext}
\setinterfaceconstant{rightwidth}{rechterbreite}
+\setinterfaceconstant{rightwords}{rightwords}
\setinterfaceconstant{roffset}{roffset}
\setinterfaceconstant{rotation}{rotation}
\setinterfaceconstant{rule}{linie}
@@ -994,6 +1117,7 @@
\setinterfaceconstant{scope}{bereich}
\setinterfaceconstant{screen}{raster}
\setinterfaceconstant{section}{abschnitt}
+\setinterfaceconstant{sectionblock}{sectionblock}
\setinterfaceconstant{sectionconversion}{sectionconversion}
\setinterfaceconstant{sectionconversionset}{sectionconversionset}
\setinterfaceconstant{sectionnumber}{abschnittsnummer}
@@ -1030,6 +1154,7 @@
\setinterfaceconstant{spacebefore}{vorspatium}
\setinterfaceconstant{spaceinbetween}{spaceinbetween}
\setinterfaceconstant{spacing}{spatiumausgleich}
+\setinterfaceconstant{specification}{specification}
\setinterfaceconstant{split}{split}
\setinterfaceconstant{splitcolor}{splitcolor}
\setinterfaceconstant{splitmethod}{splitmethod}
@@ -1054,10 +1179,12 @@
\setinterfaceconstant{surnamefirstnamesep}{surnamefirstnamesep}
\setinterfaceconstant{surnameinitialsep}{surnameinitialsep}
\setinterfaceconstant{surnamesep}{surnamesep}
+\setinterfaceconstant{svgstyle}{svgstyle}
\setinterfaceconstant{sx}{sx}
\setinterfaceconstant{sy}{sy}
\setinterfaceconstant{symalign}{symausrichtung}
\setinterfaceconstant{symbol}{symbol}
+\setinterfaceconstant{symbolcommand}{symbolcommand}
\setinterfaceconstant{symbolset}{symbolset}
\setinterfaceconstant{symcolor}{symfarbe}
\setinterfaceconstant{symstyle}{symstil}
@@ -1067,6 +1194,7 @@
\setinterfaceconstant{synonymstyle}{synonymstil}
\setinterfaceconstant{tab}{tab}
\setinterfaceconstant{text}{text}
+\setinterfaceconstant{textalign}{textalign}
\setinterfaceconstant{textcolor}{textfarbe}
\setinterfaceconstant{textcommand}{textbefehl}
\setinterfaceconstant{textdistance}{textdistance}
@@ -1098,9 +1226,12 @@
\setinterfaceconstant{topspace}{kopfspatium}
\setinterfaceconstant{topstate}{statusoben}
\setinterfaceconstant{totalnumber}{totalnumber}
+\setinterfaceconstant{translate}{translate}
+\setinterfaceconstant{trimoffset}{trimoffset}
\setinterfaceconstant{type}{typ}
\setinterfaceconstant{unit}{einheit}
\setinterfaceconstant{unknownreference}{unbekantereferenz}
+\setinterfaceconstant{up}{up}
\setinterfaceconstant{urlalternative}{urlalternative}
\setinterfaceconstant{urlspace}{urlspatium}
\setinterfaceconstant{validate}{validieren}
@@ -1110,15 +1241,18 @@
\setinterfaceconstant{vector}{vector}
\setinterfaceconstant{veroffset}{kopfoffset}
\setinterfaceconstant{vfil}{vfil}
+\setinterfaceconstant{viewerprefix}{viewerprefix}
\setinterfaceconstant{voffset}{voffset}
\setinterfaceconstant{vonsep}{vonsep}
\setinterfaceconstant{way}{art}
\setinterfaceconstant{wfactor}{bfaktor}
\setinterfaceconstant{white}{weiss}
\setinterfaceconstant{width}{breite}
+\setinterfaceconstant{words}{words}
\setinterfaceconstant{xfactor}{xfaktor}
\setinterfaceconstant{xhtml}{xhtml}
\setinterfaceconstant{xmax}{xmax}
+\setinterfaceconstant{xmlsetup}{xmlsetup}
\setinterfaceconstant{xoffset}{xoffset}
\setinterfaceconstant{xscale}{xformat}
\setinterfaceconstant{xstep}{xschritt}
diff --git a/Master/texmf-dist/tex/context/base/mult-def.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-def.mkii
index a75ef993f55..a75ef993f55 100644
--- a/Master/texmf-dist/tex/context/base/mult-def.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-def.mkii
diff --git a/Master/texmf-dist/tex/context/base/mult-en.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-en.mkii
index b08070ba044..116868cc980 100644
--- a/Master/texmf-dist/tex/context/base/mult-en.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-en.mkii
@@ -3,6 +3,7 @@
% definitions for interface variables for language en
%
\setinterfacevariable{Addition}{Addition}
+\setinterfacevariable{Alphabetic}{Alphabetic}
\setinterfacevariable{Balloon}{Balloon}
\setinterfacevariable{Cap}{Cap}
\setinterfacevariable{Capital}{Capital}
@@ -27,6 +28,7 @@
\setinterfacevariable{NextPage}{NextPage}
\setinterfacevariable{Numbers}{Numbers}
\setinterfacevariable{OpenNamedDocument}{OpenNamedDocument}
+\setinterfacevariable{Ordinal}{Ordinal}
\setinterfacevariable{Paragraph}{Paragraph}
\setinterfacevariable{PauseMovie}{PauseMovie}
\setinterfacevariable{PauseRendering}{PauseRendering}
@@ -72,19 +74,24 @@
\setinterfacevariable{action}{action}
\setinterfacevariable{after}{after}
\setinterfacevariable{all}{all}
+\setinterfacevariable{alphabetic}{alphabetic}
\setinterfacevariable{always}{always}
\setinterfacevariable{and}{and}
\setinterfacevariable{answerarea}{answerarea}
\setinterfacevariable{appendices}{appendices}
\setinterfacevariable{appendix}{appendix}
\setinterfacevariable{april}{april}
+\setinterfacevariable{aside}{aside}
+\setinterfacevariable{atleftmargin}{atleftmargin}
\setinterfacevariable{atmargin}{atmargin}
\setinterfacevariable{atpage}{atpage}
+\setinterfacevariable{atrightmargin}{atrightmargin}
\setinterfacevariable{attachment}{attachment}
\setinterfacevariable{august}{august}
\setinterfacevariable{author}{author}
\setinterfacevariable{auto}{auto}
\setinterfacevariable{autointro}{autointro}
+\setinterfacevariable{autopunctuation}{autopunctuation}
\setinterfacevariable{back}{back}
\setinterfacevariable{background}{background}
\setinterfacevariable{backmatter}{backmatter}
@@ -100,6 +107,7 @@
\setinterfacevariable{bigger}{bigger}
\setinterfacevariable{bigpreference}{bigpreference}
\setinterfacevariable{blank}{blank}
+\setinterfacevariable{block}{block}
\setinterfacevariable{blockquote}{blockquote}
\setinterfacevariable{bodymatter}{bodymatter}
\setinterfacevariable{bodypart}{bodypart}
@@ -108,28 +116,37 @@
\setinterfacevariable{boldslanted}{boldslanted}
\setinterfacevariable{bookmark}{bookmark}
\setinterfacevariable{both}{both}
+\setinterfacevariable{bothtext}{bothtext}
\setinterfacevariable{bottom}{bottom}
+\setinterfacevariable{box}{box}
\setinterfacevariable{brief}{brief}
\setinterfacevariable{broad}{broad}
\setinterfacevariable{buffer}{buffer}
\setinterfacevariable{by}{by}
\setinterfacevariable{calligraphic}{calligraphic}
+\setinterfacevariable{camel}{camel}
\setinterfacevariable{cap}{cap}
\setinterfacevariable{capital}{capital}
\setinterfacevariable{center}{center}
+\setinterfacevariable{centerlast}{centerlast}
\setinterfacevariable{chapter}{chapter}
\setinterfacevariable{character}{character}
\setinterfacevariable{characters}{characters}
+\setinterfacevariable{chemical}{chemical}
+\setinterfacevariable{chemicals}{chemicals}
\setinterfacevariable{chemistry}{chemistry}
\setinterfacevariable{cite}{cite}
\setinterfacevariable{color}{color}
\setinterfacevariable{column}{column}
\setinterfacevariable{columns}{columns}
+\setinterfacevariable{combination}{combination}
\setinterfacevariable{command}{command}
\setinterfacevariable{commands}{commands}
\setinterfacevariable{comment}{comment}
\setinterfacevariable{component}{component}
+\setinterfacevariable{compressseparator}{compressseparator}
\setinterfacevariable{concept}{concept}
+\setinterfacevariable{construction}{construction}
\setinterfacevariable{content}{content}
\setinterfacevariable{contents}{contents}
\setinterfacevariable{continue}{continue}
@@ -138,6 +155,7 @@
\setinterfacevariable{conversion}{conversion}
\setinterfacevariable{current}{current}
\setinterfacevariable{cutspace}{cutspace}
+\setinterfacevariable{dataset}{dataset}
\setinterfacevariable{date}{date}
\setinterfacevariable{day}{day}
\setinterfacevariable{december}{december}
@@ -151,6 +169,7 @@
\setinterfacevariable{down}{down}
\setinterfacevariable{each}{each}
\setinterfacevariable{edge}{edge}
+\setinterfacevariable{eight}{eight}
\setinterfacevariable{embed}{embed}
\setinterfacevariable{empty}{empty}
\setinterfacevariable{end}{end}
@@ -160,6 +179,7 @@
\setinterfacevariable{even}{even}
\setinterfacevariable{export}{export}
\setinterfacevariable{external}{external}
+\setinterfacevariable{extremestretch}{extremestretch}
\setinterfacevariable{fact}{fact}
\setinterfacevariable{february}{february}
\setinterfacevariable{figure}{figure}
@@ -195,6 +215,7 @@
\setinterfacevariable{friday}{friday}
\setinterfacevariable{frontmatter}{frontmatter}
\setinterfacevariable{frontpart}{frontpart}
+\setinterfacevariable{fullhz}{fullhz}
\setinterfacevariable{global}{global}
\setinterfacevariable{graphic}{graphic}
\setinterfacevariable{graphics}{graphics}
@@ -223,14 +244,28 @@
\setinterfacevariable{indices}{indices}
\setinterfacevariable{informeel}{informeel}
\setinterfacevariable{inherit}{inherit}
+\setinterfacevariable{ininner}{ininner}
+\setinterfacevariable{ininneredge}{ininneredge}
+\setinterfacevariable{ininnermargin}{ininnermargin}
\setinterfacevariable{inleft}{inleft}
+\setinterfacevariable{inleftedge}{inleftedge}
+\setinterfacevariable{inleftmargin}{inleftmargin}
+\setinterfacevariable{inline}{inline}
\setinterfacevariable{inmargin}{inmargin}
\setinterfacevariable{inner}{inner}
\setinterfacevariable{inneredge}{inneredge}
\setinterfacevariable{innermargin}{innermargin}
+\setinterfacevariable{inother}{inother}
+\setinterfacevariable{inouter}{inouter}
+\setinterfacevariable{inouteredge}{inouteredge}
+\setinterfacevariable{inoutermargin}{inoutermargin}
\setinterfacevariable{inright}{inright}
+\setinterfacevariable{inrightedge}{inrightedge}
+\setinterfacevariable{inrightmargin}{inrightmargin}
+\setinterfacevariable{integral}{integral}
\setinterfacevariable{interaction}{interaction}
\setinterfacevariable{interactionmenu}{interactionmenu}
+\setinterfacevariable{interactive}{interactive}
\setinterfacevariable{intermezzi}{intermezzi}
\setinterfacevariable{intermezzo}{intermezzo}
\setinterfacevariable{intext}{intext}
@@ -245,6 +280,7 @@
\setinterfacevariable{july}{july}
\setinterfacevariable{june}{june}
\setinterfacevariable{keep}{keep}
+\setinterfacevariable{kerncharacters}{kerncharacters}
\setinterfacevariable{knockout}{knockout}
\setinterfacevariable{label}{label}
\setinterfacevariable{landscape}{landscape}
@@ -263,6 +299,7 @@
\setinterfacevariable{legend}{legend}
\setinterfacevariable{less}{less}
\setinterfacevariable{lesshyphenation}{lesshyphenation}
+\setinterfacevariable{letterspacing}{letterspacing}
\setinterfacevariable{line}{line}
\setinterfacevariable{linenote}{linenote}
\setinterfacevariable{lines}{lines}
@@ -272,6 +309,7 @@
\setinterfacevariable{logo}{logo}
\setinterfacevariable{logos}{logos}
\setinterfacevariable{lohi}{lohi}
+\setinterfacevariable{long}{long}
\setinterfacevariable{loose}{loose}
\setinterfacevariable{low}{low}
\setinterfacevariable{ls}{ls}
@@ -280,6 +318,7 @@
\setinterfacevariable{march}{march}
\setinterfacevariable{margin}{margin}
\setinterfacevariable{marginedge}{marginedge}
+\setinterfacevariable{margintext}{margintext}
\setinterfacevariable{margintitle}{margintitle}
\setinterfacevariable{marking}{marking}
\setinterfacevariable{math}{math}
@@ -300,9 +339,11 @@
\setinterfacevariable{minheight}{minheight}
\setinterfacevariable{minwidth}{minwidth}
\setinterfacevariable{mirrored}{mirrored}
+\setinterfacevariable{mixed}{mixed}
\setinterfacevariable{monday}{monday}
\setinterfacevariable{mono}{mono}
\setinterfacevariable{monobold}{monobold}
+\setinterfacevariable{mononormal}{mononormal}
\setinterfacevariable{month}{month}
\setinterfacevariable{more}{more}
\setinterfacevariable{morehyphenation}{morehyphenation}
@@ -316,17 +357,23 @@
\setinterfacevariable{nextoddpage}{nextoddpage}
\setinterfacevariable{nextpage}{nextpage}
\setinterfacevariable{nextsubpage}{nextsubpage}
+\setinterfacevariable{nine}{nine}
\setinterfacevariable{no}{no}
\setinterfacevariable{nocheck}{nocheck}
+\setinterfacevariable{nodepth}{nodepth}
\setinterfacevariable{nofit}{nofit}
\setinterfacevariable{nogrid}{nogrid}
+\setinterfacevariable{noheight}{noheight}
\setinterfacevariable{nohz}{nohz}
+\setinterfacevariable{noline}{noline}
\setinterfacevariable{nomarking}{nomarking}
\setinterfacevariable{none}{none}
\setinterfacevariable{nonumber}{nonumber}
+\setinterfacevariable{norepeat}{norepeat}
\setinterfacevariable{normal}{normal}
\setinterfacevariable{nospacing}{nospacing}
\setinterfacevariable{not}{not}
+\setinterfacevariable{notation}{notation}
\setinterfacevariable{note}{note}
\setinterfacevariable{nothanging}{nothanging}
\setinterfacevariable{nothyphenated}{nothyphenated}
@@ -340,9 +387,11 @@
\setinterfacevariable{off}{off}
\setinterfacevariable{offset}{offset}
\setinterfacevariable{old}{old}
+\setinterfacevariable{oldstyle}{oldstyle}
\setinterfacevariable{on}{on}
\setinterfacevariable{one}{one}
\setinterfacevariable{opposite}{opposite}
+\setinterfacevariable{ordinal}{ordinal}
\setinterfacevariable{outer}{outer}
\setinterfacevariable{outeredge}{outeredge}
\setinterfacevariable{outermargin}{outermargin}
@@ -411,6 +460,7 @@
\setinterfacevariable{samepage}{samepage}
\setinterfacevariable{sans}{sans}
\setinterfacevariable{sansbold}{sansbold}
+\setinterfacevariable{sansnormal}{sansnormal}
\setinterfacevariable{sansserif}{sansserif}
\setinterfacevariable{saturday}{saturday}
\setinterfacevariable{screen}{screen}
@@ -421,12 +471,19 @@
\setinterfacevariable{selectfont}{selectfont}
\setinterfacevariable{september}{september}
\setinterfacevariable{serif}{serif}
+\setinterfacevariable{serifbold}{serifbold}
+\setinterfacevariable{serifnormal}{serifnormal}
\setinterfacevariable{serried}{serried}
\setinterfacevariable{setups}{setups}
+\setinterfacevariable{seven}{seven}
\setinterfacevariable{sheet}{sheet}
+\setinterfacevariable{shiftdown}{shiftdown}
+\setinterfacevariable{shiftup}{shiftup}
\setinterfacevariable{short}{short}
\setinterfacevariable{simplefonts}{simplefonts}
+\setinterfacevariable{simplelist}{simplelist}
\setinterfacevariable{singlesided}{singlesided}
+\setinterfacevariable{six}{six}
\setinterfacevariable{slanted}{slanted}
\setinterfacevariable{slantedbold}{slantedbold}
\setinterfacevariable{small}{small}
@@ -444,6 +501,7 @@
\setinterfacevariable{smalltype}{smalltype}
\setinterfacevariable{somewhere}{somewhere}
\setinterfacevariable{sorted}{sorted}
+\setinterfacevariable{sorting}{sorting}
\setinterfacevariable{space}{space}
\setinterfacevariable{spacing}{spacing}
\setinterfacevariable{speech}{speech}
@@ -456,6 +514,7 @@
\setinterfacevariable{stop}{stop}
\setinterfacevariable{stopper}{stopper}
\setinterfacevariable{stretch}{stretch}
+\setinterfacevariable{stretched}{stretched}
\setinterfacevariable{strict}{strict}
\setinterfacevariable{strong}{strong}
\setinterfacevariable{strut}{strut}
@@ -489,6 +548,7 @@
\setinterfacevariable{sym}{sym}
\setinterfacevariable{symbol}{symbol}
\setinterfacevariable{synchronize}{synchronize}
+\setinterfacevariable{synonym}{synonym}
\setinterfacevariable{system}{system}
\setinterfacevariable{table}{table}
\setinterfacevariable{tablehead}{tablehead}
@@ -519,6 +579,7 @@
\setinterfacevariable{underbars}{underbars}
\setinterfacevariable{understrike}{understrike}
\setinterfacevariable{understrikes}{understrikes}
+\setinterfacevariable{unframed}{unframed}
\setinterfacevariable{unit}{unit}
\setinterfacevariable{units}{units}
\setinterfacevariable{unknown}{unknown}
@@ -531,6 +592,8 @@
\setinterfacevariable{very}{very}
\setinterfacevariable{verystrict}{verystrict}
\setinterfacevariable{verytolerant}{verytolerant}
+\setinterfacevariable{vfenced}{vfenced}
+\setinterfacevariable{vulgarfraction}{vulgarfraction}
\setinterfacevariable{weak}{weak}
\setinterfacevariable{wednesday}{wednesday}
\setinterfacevariable{week}{week}
@@ -539,6 +602,7 @@
\setinterfacevariable{wide}{wide}
\setinterfacevariable{width}{width}
\setinterfacevariable{word}{word}
+\setinterfacevariable{words}{words}
\setinterfacevariable{xml}{xml}
\setinterfacevariable{year}{year}
\setinterfacevariable{yes}{yes}
@@ -564,8 +628,10 @@
\setinterfaceconstant{artauthoretaldisplay}{artauthoretaldisplay}
\setinterfaceconstant{artauthoretallimit}{artauthoretallimit}
\setinterfaceconstant{artauthoretaltext}{artauthoretaltext}
+\setinterfaceconstant{artoffset}{artoffset}
\setinterfaceconstant{at}{at}
\setinterfaceconstant{author}{author}
+\setinterfaceconstant{authorconversion}{authorconversion}
\setinterfaceconstant{authoretaldisplay}{authoretaldisplay}
\setinterfaceconstant{authoretallimit}{authoretallimit}
\setinterfaceconstant{authoretaltext}{authoretaltext}
@@ -596,6 +662,7 @@
\setinterfaceconstant{bidi}{bidi}
\setinterfaceconstant{big}{big}
\setinterfaceconstant{blank}{blank}
+\setinterfaceconstant{bleedoffset}{bleedoffset}
\setinterfaceconstant{blockway}{blockway}
\setinterfaceconstant{bodyfont}{bodyfont}
\setinterfaceconstant{boffset}{boffset}
@@ -620,6 +687,8 @@
\setinterfaceconstant{calculate}{calculate}
\setinterfaceconstant{category}{category}
\setinterfaceconstant{ccommand}{ccommand}
+\setinterfaceconstant{character}{character}
+\setinterfaceconstant{characters}{characters}
\setinterfaceconstant{check}{check}
\setinterfaceconstant{click}{click}
\setinterfaceconstant{clickin}{clickin}
@@ -634,15 +703,19 @@
\setinterfaceconstant{column}{column}
\setinterfaceconstant{columndistance}{columndistance}
\setinterfaceconstant{columns}{columns}
+\setinterfaceconstant{comma}{comma}
\setinterfaceconstant{command}{command}
\setinterfaceconstant{commandafter}{commandafter}
\setinterfaceconstant{commandbefore}{commandbefore}
\setinterfaceconstant{commands}{commands}
+\setinterfaceconstant{comment}{comment}
+\setinterfaceconstant{commentchar}{commentchar}
\setinterfaceconstant{commentoffset}{commentoffset}
\setinterfaceconstant{compact}{compact}
\setinterfaceconstant{component}{component}
\setinterfaceconstant{compoundhyphen}{compoundhyphen}
\setinterfaceconstant{compress}{compress}
+\setinterfaceconstant{compressseparator}{compressseparator}
\setinterfaceconstant{concerns}{concerns}
\setinterfaceconstant{connector}{connector}
\setinterfaceconstant{continue}{continue}
@@ -654,12 +727,14 @@
\setinterfaceconstant{coupling}{coupling}
\setinterfaceconstant{couplingway}{couplingway}
\setinterfaceconstant{criterium}{criterium}
+\setinterfaceconstant{cropoffset}{cropoffset}
\setinterfaceconstant{cssfile}{cssfile}
\setinterfaceconstant{current}{current}
\setinterfaceconstant{cutspace}{cutspace}
\setinterfaceconstant{dash}{dash}
\setinterfaceconstant{dat}{dat}
\setinterfaceconstant{database}{database}
+\setinterfaceconstant{dataset}{dataset}
\setinterfaceconstant{date}{date}
\setinterfaceconstant{deepnumbercommand}{deepnumbercommand}
\setinterfaceconstant{deeptextcommand}{deeptextcommand}
@@ -671,8 +746,10 @@
\setinterfaceconstant{directory}{directory}
\setinterfaceconstant{display}{display}
\setinterfaceconstant{distance}{distance}
+\setinterfaceconstant{domain}{domain}
\setinterfaceconstant{dot}{dot}
\setinterfaceconstant{doublesided}{doublesided}
+\setinterfaceconstant{down}{down}
\setinterfaceconstant{dummy}{dummy}
\setinterfaceconstant{dx}{dx}
\setinterfaceconstant{dy}{dy}
@@ -688,6 +765,10 @@
\setinterfaceconstant{equalheight}{equalheight}
\setinterfaceconstant{equalwidth}{equalwidth}
\setinterfaceconstant{escape}{escape}
+\setinterfaceconstant{etaldisplay}{etaldisplay}
+\setinterfaceconstant{etallimit}{etallimit}
+\setinterfaceconstant{etaloption}{etaloption}
+\setinterfaceconstant{etaltext}{etaltext}
\setinterfaceconstant{evenmargin}{evenmargin}
\setinterfaceconstant{exitoffset}{exitoffset}
\setinterfaceconstant{expansion}{expansion}
@@ -697,18 +778,24 @@
\setinterfaceconstant{fallback}{fallback}
\setinterfaceconstant{family}{family}
\setinterfaceconstant{features}{features}
+\setinterfaceconstant{fences}{fences}
+\setinterfaceconstant{field}{field}
\setinterfaceconstant{fieldbackgroundcolor}{fieldbackgroundcolor}
\setinterfaceconstant{fieldframecolor}{fieldframecolor}
\setinterfaceconstant{fieldlayer}{fieldlayer}
\setinterfaceconstant{fieldoffset}{fieldoffset}
\setinterfaceconstant{file}{file}
+\setinterfaceconstant{filler}{filler}
\setinterfaceconstant{filtercommand}{filtercommand}
\setinterfaceconstant{finalnamesep}{finalnamesep}
+\setinterfaceconstant{finalpagesep}{finalpagesep}
\setinterfaceconstant{finalpubsep}{finalpubsep}
+\setinterfaceconstant{first}{first}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{firstpage}
\setinterfaceconstant{focus}{focus}
\setinterfaceconstant{focusin}{focusin}
+\setinterfaceconstant{focusoffset}{focusoffset}
\setinterfaceconstant{focusout}{focusout}
\setinterfaceconstant{footer}{footer}
\setinterfaceconstant{footerdistance}{footerdistance}
@@ -717,6 +804,7 @@
\setinterfaceconstant{foregroundcolor}{foregroundcolor}
\setinterfaceconstant{foregroundstyle}{foregroundstyle}
\setinterfaceconstant{format}{format}
+\setinterfaceconstant{fractions}{fractions}
\setinterfaceconstant{frame}{frame}
\setinterfaceconstant{framecolor}{framecolor}
\setinterfaceconstant{framecorner}{framecorner}
@@ -725,10 +813,14 @@
\setinterfaceconstant{frameradius}{frameradius}
\setinterfaceconstant{frames}{frames}
\setinterfaceconstant{from}{from}
+\setinterfaceconstant{functioncolor}{functioncolor}
+\setinterfaceconstant{functionstyle}{functionstyle}
\setinterfaceconstant{get}{get}
\setinterfaceconstant{global}{global}
\setinterfaceconstant{goodies}{goodies}
\setinterfaceconstant{grid}{grid}
+\setinterfaceconstant{group}{group}
+\setinterfaceconstant{groupsuffix}{groupsuffix}
\setinterfaceconstant{hang}{hang}
\setinterfaceconstant{hcompact}{hcompact}
\setinterfaceconstant{headalign}{headalign}
@@ -748,19 +840,23 @@
\setinterfaceconstant{hoffset}{hoffset}
\setinterfaceconstant{horoffset}{horoffset}
\setinterfaceconstant{hyphen}{hyphen}
+\setinterfaceconstant{hyphens}{hyphens}
\setinterfaceconstant{icommand}{icommand}
+\setinterfaceconstant{ignore}{ignore}
\setinterfaceconstant{in}{in}
\setinterfaceconstant{inbetween}{inbetween}
\setinterfaceconstant{increment}{increment}
\setinterfaceconstant{incrementnumber}{incrementnumber}
\setinterfaceconstant{indenting}{indenting}
\setinterfaceconstant{indentnext}{indentnext}
+\setinterfaceconstant{index}{index}
\setinterfaceconstant{indicator}{indicator}
\setinterfaceconstant{initialsep}{initialsep}
\setinterfaceconstant{inner}{inner}
\setinterfaceconstant{innermargin}{innermargin}
\setinterfaceconstant{inputfile}{inputfile}
\setinterfaceconstant{insidesection}{insidesection}
+\setinterfaceconstant{instance}{instance}
\setinterfaceconstant{intent}{intent}
\setinterfaceconstant{interaction}{interaction}
\setinterfaceconstant{interlinespace}{interlinespace}
@@ -769,15 +865,21 @@
\setinterfaceconstant{italicfont}{italicfont}
\setinterfaceconstant{itemalign}{itemalign}
\setinterfaceconstant{items}{items}
+\setinterfaceconstant{joiners}{joiners}
+\setinterfaceconstant{journalconversion}{journalconversion}
\setinterfaceconstant{juniorsep}{juniorsep}
+\setinterfaceconstant{keeptogether}{keeptogether}
\setinterfaceconstant{ken}{ken}
\setinterfaceconstant{keyexpansion}{keyexpansion}
\setinterfaceconstant{keys}{keys}
\setinterfaceconstant{keyword}{keyword}
\setinterfaceconstant{label}{label}
\setinterfaceconstant{labeloffset}{labeloffset}
+\setinterfaceconstant{language}{language}
+\setinterfaceconstant{last}{last}
\setinterfaceconstant{lastnamesep}{lastnamesep}
\setinterfaceconstant{lastpage}{lastpage}
+\setinterfaceconstant{lastpagesep}{lastpagesep}
\setinterfaceconstant{lastpubsep}{lastpubsep}
\setinterfaceconstant{layout}{layout}
\setinterfaceconstant{left}{left}
@@ -798,6 +900,7 @@
\setinterfaceconstant{leftsubsentence}{leftsubsentence}
\setinterfaceconstant{lefttext}{lefttext}
\setinterfaceconstant{leftwidth}{leftwidth}
+\setinterfaceconstant{leftwords}{leftwords}
\setinterfaceconstant{less}{less}
\setinterfaceconstant{level}{level}
\setinterfaceconstant{levels}{levels}
@@ -854,10 +957,15 @@
\setinterfaceconstant{nbottom}{nbottom}
\setinterfaceconstant{nc}{nc}
\setinterfaceconstant{next}{next}
+\setinterfaceconstant{nextleft}{nextleft}
+\setinterfaceconstant{nextleftquotation}{nextleftquotation}
+\setinterfaceconstant{nextright}{nextright}
+\setinterfaceconstant{nextrightquotation}{nextrightquotation}
\setinterfaceconstant{nl}{nl}
\setinterfaceconstant{nleft}{nleft}
\setinterfaceconstant{nlines}{nlines}
\setinterfaceconstant{norm}{norm}
+\setinterfaceconstant{note}{note}
\setinterfaceconstant{nr}{nr}
\setinterfaceconstant{nright}{nright}
\setinterfaceconstant{ntop}{ntop}
@@ -888,6 +996,7 @@
\setinterfaceconstant{openaction}{openaction}
\setinterfaceconstant{openpage}{openpage}
\setinterfaceconstant{openpageaction}{openpageaction}
+\setinterfaceconstant{openup}{openup}
\setinterfaceconstant{opticalsize}{opticalsize}
\setinterfaceconstant{option}{option}
\setinterfaceconstant{order}{order}
@@ -901,8 +1010,10 @@
\setinterfaceconstant{pagecolor}{pagecolor}
\setinterfaceconstant{pagecolormodel}{pagecolormodel}
\setinterfaceconstant{pagecommand}{pagecommand}
+\setinterfaceconstant{pageconnector}{pageconnector}
\setinterfaceconstant{pageconversion}{pageconversion}
\setinterfaceconstant{pageconversionset}{pageconversionset}
+\setinterfaceconstant{pageleft}{pageleft}
\setinterfaceconstant{pagenumber}{pagenumber}
\setinterfaceconstant{pageprefix}{pageprefix}
\setinterfaceconstant{pageprefixconnector}{pageprefixconnector}
@@ -913,7 +1024,9 @@
\setinterfaceconstant{pageprefixset}{pageprefixset}
\setinterfaceconstant{pageprefixstarter}{pageprefixstarter}
\setinterfaceconstant{pageprefixstopper}{pageprefixstopper}
+\setinterfaceconstant{pageright}{pageright}
\setinterfaceconstant{pagesegments}{pagesegments}
+\setinterfaceconstant{pagesep}{pagesep}
\setinterfaceconstant{pageseparatorset}{pageseparatorset}
\setinterfaceconstant{pageset}{pageset}
\setinterfaceconstant{pagestarter}{pagestarter}
@@ -923,6 +1036,7 @@
\setinterfaceconstant{palet}{palet}
\setinterfaceconstant{paper}{paper}
\setinterfaceconstant{paragraph}{paragraph}
+\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{place}
\setinterfaceconstant{placehead}{placehead}
\setinterfaceconstant{placestopper}{placestopper}
@@ -943,7 +1057,9 @@
\setinterfaceconstant{printable}{printable}
\setinterfaceconstant{process}{process}
\setinterfaceconstant{profile}{profile}
+\setinterfaceconstant{properties}{properties}
\setinterfaceconstant{pubsep}{pubsep}
+\setinterfaceconstant{quotechar}{quotechar}
\setinterfaceconstant{radius}{radius}
\setinterfaceconstant{random}{random}
\setinterfaceconstant{range}{range}
@@ -951,18 +1067,24 @@
\setinterfaceconstant{ref}{ref}
\setinterfaceconstant{refcommand}{refcommand}
\setinterfaceconstant{reference}{reference}
+\setinterfaceconstant{referencemethod}{referencemethod}
\setinterfaceconstant{referenceprefix}{referenceprefix}
\setinterfaceconstant{referencing}{referencing}
\setinterfaceconstant{region}{region}
\setinterfaceconstant{regionin}{regionin}
\setinterfaceconstant{regionout}{regionout}
+\setinterfaceconstant{register}{register}
\setinterfaceconstant{regularfeatures}{regularfeatures}
\setinterfaceconstant{regularfont}{regularfont}
+\setinterfaceconstant{renderingsetup}{renderingsetup}
\setinterfaceconstant{repeat}{repeat}
\setinterfaceconstant{reset}{reset}
\setinterfaceconstant{resetnumber}{resetnumber}
\setinterfaceconstant{resolution}{resolution}
+\setinterfaceconstant{resources}{resources}
+\setinterfaceconstant{reverse}{reverse}
\setinterfaceconstant{right}{right}
+\setinterfaceconstant{rightchars}{rightchars}
\setinterfaceconstant{rightcolor}{rightcolor}
\setinterfaceconstant{rightcompoundhyphen}{rightcompoundhyphen}
\setinterfaceconstant{rightedge}{rightedge}
@@ -980,6 +1102,7 @@
\setinterfaceconstant{rightsubsentence}{rightsubsentence}
\setinterfaceconstant{righttext}{righttext}
\setinterfaceconstant{rightwidth}{rightwidth}
+\setinterfaceconstant{rightwords}{rightwords}
\setinterfaceconstant{roffset}{roffset}
\setinterfaceconstant{rotation}{rotation}
\setinterfaceconstant{rule}{rule}
@@ -994,6 +1117,7 @@
\setinterfaceconstant{scope}{scope}
\setinterfaceconstant{screen}{screen}
\setinterfaceconstant{section}{section}
+\setinterfaceconstant{sectionblock}{sectionblock}
\setinterfaceconstant{sectionconversion}{sectionconversion}
\setinterfaceconstant{sectionconversionset}{sectionconversionset}
\setinterfaceconstant{sectionnumber}{sectionnumber}
@@ -1030,6 +1154,7 @@
\setinterfaceconstant{spacebefore}{spacebefore}
\setinterfaceconstant{spaceinbetween}{spaceinbetween}
\setinterfaceconstant{spacing}{spacing}
+\setinterfaceconstant{specification}{specification}
\setinterfaceconstant{split}{split}
\setinterfaceconstant{splitcolor}{splitcolor}
\setinterfaceconstant{splitmethod}{splitmethod}
@@ -1054,10 +1179,12 @@
\setinterfaceconstant{surnamefirstnamesep}{surnamefirstnamesep}
\setinterfaceconstant{surnameinitialsep}{surnameinitialsep}
\setinterfaceconstant{surnamesep}{surnamesep}
+\setinterfaceconstant{svgstyle}{svgstyle}
\setinterfaceconstant{sx}{sx}
\setinterfaceconstant{sy}{sy}
\setinterfaceconstant{symalign}{symalign}
\setinterfaceconstant{symbol}{symbol}
+\setinterfaceconstant{symbolcommand}{symbolcommand}
\setinterfaceconstant{symbolset}{symbolset}
\setinterfaceconstant{symcolor}{symcolor}
\setinterfaceconstant{symstyle}{symstyle}
@@ -1067,6 +1194,7 @@
\setinterfaceconstant{synonymstyle}{synonymstyle}
\setinterfaceconstant{tab}{tab}
\setinterfaceconstant{text}{text}
+\setinterfaceconstant{textalign}{textalign}
\setinterfaceconstant{textcolor}{textcolor}
\setinterfaceconstant{textcommand}{textcommand}
\setinterfaceconstant{textdistance}{textdistance}
@@ -1098,9 +1226,12 @@
\setinterfaceconstant{topspace}{topspace}
\setinterfaceconstant{topstate}{topstate}
\setinterfaceconstant{totalnumber}{totalnumber}
+\setinterfaceconstant{translate}{translate}
+\setinterfaceconstant{trimoffset}{trimoffset}
\setinterfaceconstant{type}{type}
\setinterfaceconstant{unit}{unit}
\setinterfaceconstant{unknownreference}{unknownreference}
+\setinterfaceconstant{up}{up}
\setinterfaceconstant{urlalternative}{urlalternative}
\setinterfaceconstant{urlspace}{urlspace}
\setinterfaceconstant{validate}{validate}
@@ -1110,15 +1241,18 @@
\setinterfaceconstant{vector}{vector}
\setinterfaceconstant{veroffset}{veroffset}
\setinterfaceconstant{vfil}{vfil}
+\setinterfaceconstant{viewerprefix}{viewerprefix}
\setinterfaceconstant{voffset}{voffset}
\setinterfaceconstant{vonsep}{vonsep}
\setinterfaceconstant{way}{way}
\setinterfaceconstant{wfactor}{wfactor}
\setinterfaceconstant{white}{white}
\setinterfaceconstant{width}{width}
+\setinterfaceconstant{words}{words}
\setinterfaceconstant{xfactor}{xfactor}
\setinterfaceconstant{xhtml}{xhtml}
\setinterfaceconstant{xmax}{xmax}
+\setinterfaceconstant{xmlsetup}{xmlsetup}
\setinterfaceconstant{xoffset}{xoffset}
\setinterfaceconstant{xscale}{xscale}
\setinterfaceconstant{xstep}{xstep}
diff --git a/Master/texmf-dist/tex/context/base/mult-fr.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-fr.mkii
index d76da18d9e0..44251d72764 100644
--- a/Master/texmf-dist/tex/context/base/mult-fr.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-fr.mkii
@@ -3,6 +3,7 @@
% definitions for interface variables for language fr
%
\setinterfacevariable{Addition}{Ajout}
+\setinterfacevariable{Alphabetic}{Alphabetic}
\setinterfacevariable{Balloon}{Ballon}
\setinterfacevariable{Cap}{Cap}
\setinterfacevariable{Capital}{Capitale}
@@ -27,6 +28,7 @@
\setinterfacevariable{NextPage}{PageSuivante}
\setinterfacevariable{Numbers}{Numeros}
\setinterfacevariable{OpenNamedDocument}{OuvreDocumentNomme}
+\setinterfacevariable{Ordinal}{Ordinal}
\setinterfacevariable{Paragraph}{Paragraphe}
\setinterfacevariable{PauseMovie}{PauseFilm}
\setinterfacevariable{PauseRendering}{PauseRendering}
@@ -72,19 +74,24 @@
\setinterfacevariable{action}{action}
\setinterfacevariable{after}{apres}
\setinterfacevariable{all}{tout}
+\setinterfacevariable{alphabetic}{alphabetic}
\setinterfacevariable{always}{toujours}
\setinterfacevariable{and}{and}
\setinterfacevariable{answerarea}{answerarea}
\setinterfacevariable{appendices}{annexes}
\setinterfacevariable{appendix}{annexe}
\setinterfacevariable{april}{avril}
+\setinterfacevariable{aside}{aside}
+\setinterfacevariable{atleftmargin}{atleftmargin}
\setinterfacevariable{atmargin}{alamarge}
\setinterfacevariable{atpage}{alapage}
+\setinterfacevariable{atrightmargin}{atrightmargin}
\setinterfacevariable{attachment}{attachment}
\setinterfacevariable{august}{août}
\setinterfacevariable{author}{auteur}
\setinterfacevariable{auto}{auto}
\setinterfacevariable{autointro}{autointro}
+\setinterfacevariable{autopunctuation}{autopunctuation}
\setinterfacevariable{back}{retour}
\setinterfacevariable{background}{arriereplan}
\setinterfacevariable{backmatter}{epilogue}
@@ -100,6 +107,7 @@
\setinterfacevariable{bigger}{bigger}
\setinterfacevariable{bigpreference}{grandepreference}
\setinterfacevariable{blank}{vide}
+\setinterfacevariable{block}{block}
\setinterfacevariable{blockquote}{blockquote}
\setinterfacevariable{bodymatter}{texteprincipal}
\setinterfacevariable{bodypart}{corpsdetexte}
@@ -108,28 +116,37 @@
\setinterfacevariable{boldslanted}{inclinegras}
\setinterfacevariable{bookmark}{marquepage}
\setinterfacevariable{both}{lesdeux}
+\setinterfacevariable{bothtext}{bothtext}
\setinterfacevariable{bottom}{inf}
+\setinterfacevariable{box}{box}
\setinterfacevariable{brief}{brief}
\setinterfacevariable{broad}{large}
\setinterfacevariable{buffer}{buffer}
\setinterfacevariable{by}{par}
\setinterfacevariable{calligraphic}{calligraphique}
+\setinterfacevariable{camel}{camel}
\setinterfacevariable{cap}{cap}
\setinterfacevariable{capital}{capitale}
\setinterfacevariable{center}{center}
+\setinterfacevariable{centerlast}{centerlast}
\setinterfacevariable{chapter}{chapitre}
\setinterfacevariable{character}{caractere}
\setinterfacevariable{characters}{caracteres}
+\setinterfacevariable{chemical}{chemical}
+\setinterfacevariable{chemicals}{chemicals}
\setinterfacevariable{chemistry}{chemistry}
\setinterfacevariable{cite}{cite}
\setinterfacevariable{color}{couleur}
\setinterfacevariable{column}{colonne}
\setinterfacevariable{columns}{colonnes}
+\setinterfacevariable{combination}{combination}
\setinterfacevariable{command}{commande}
\setinterfacevariable{commands}{commandes}
\setinterfacevariable{comment}{commentaire}
\setinterfacevariable{component}{composant}
+\setinterfacevariable{compressseparator}{compressseparator}
\setinterfacevariable{concept}{concept}
+\setinterfacevariable{construction}{construction}
\setinterfacevariable{content}{contenu}
\setinterfacevariable{contents}{contenus}
\setinterfacevariable{continue}{continue}
@@ -138,6 +155,7 @@
\setinterfacevariable{conversion}{conversion}
\setinterfacevariable{current}{courant}
\setinterfacevariable{cutspace}{cutspace}
+\setinterfacevariable{dataset}{dataset}
\setinterfacevariable{date}{date}
\setinterfacevariable{day}{jour}
\setinterfacevariable{december}{decembre}
@@ -151,6 +169,7 @@
\setinterfacevariable{down}{down}
\setinterfacevariable{each}{chaque}
\setinterfacevariable{edge}{bord}
+\setinterfacevariable{eight}{eight}
\setinterfacevariable{embed}{embed}
\setinterfacevariable{empty}{vide}
\setinterfacevariable{end}{end}
@@ -160,6 +179,7 @@
\setinterfacevariable{even}{paire}
\setinterfacevariable{export}{export}
\setinterfacevariable{external}{external}
+\setinterfacevariable{extremestretch}{extremestretch}
\setinterfacevariable{fact}{fait}
\setinterfacevariable{february}{fevrier}
\setinterfacevariable{figure}{figure}
@@ -195,6 +215,7 @@
\setinterfacevariable{friday}{vendredi}
\setinterfacevariable{frontmatter}{preambule}
\setinterfacevariable{frontpart}{preface}
+\setinterfacevariable{fullhz}{fullhz}
\setinterfacevariable{global}{global}
\setinterfacevariable{graphic}{graphique}
\setinterfacevariable{graphics}{graphiques}
@@ -223,14 +244,28 @@
\setinterfacevariable{indices}{indices}
\setinterfacevariable{informeel}{informeel}
\setinterfacevariable{inherit}{herite}
+\setinterfacevariable{ininner}{ininner}
+\setinterfacevariable{ininneredge}{ininneredge}
+\setinterfacevariable{ininnermargin}{ininnermargin}
\setinterfacevariable{inleft}{dansgauche}
+\setinterfacevariable{inleftedge}{dansbordgauche}
+\setinterfacevariable{inleftmargin}{dansmargegauche}
+\setinterfacevariable{inline}{inline}
\setinterfacevariable{inmargin}{dansmarge}
\setinterfacevariable{inner}{interieur}
\setinterfacevariable{inneredge}{bordinterieur}
\setinterfacevariable{innermargin}{margeinterieure}
+\setinterfacevariable{inother}{inother}
+\setinterfacevariable{inouter}{inouter}
+\setinterfacevariable{inouteredge}{inouteredge}
+\setinterfacevariable{inoutermargin}{inoutermargin}
\setinterfacevariable{inright}{dansdroit}
+\setinterfacevariable{inrightedge}{dansborddroit}
+\setinterfacevariable{inrightmargin}{dansmargedroite}
+\setinterfacevariable{integral}{integral}
\setinterfacevariable{interaction}{interaction}
\setinterfacevariable{interactionmenu}{menuinteraction}
+\setinterfacevariable{interactive}{interactive}
\setinterfacevariable{intermezzi}{intermezzi}
\setinterfacevariable{intermezzo}{intermezzo}
\setinterfacevariable{intext}{danstexte}
@@ -245,6 +280,7 @@
\setinterfacevariable{july}{juillet}
\setinterfacevariable{june}{juin}
\setinterfacevariable{keep}{maintient}
+\setinterfacevariable{kerncharacters}{kerncharacters}
\setinterfacevariable{knockout}{knockout}
\setinterfacevariable{label}{etiquette}
\setinterfacevariable{landscape}{paysage}
@@ -263,6 +299,7 @@
\setinterfacevariable{legend}{legende}
\setinterfacevariable{less}{less}
\setinterfacevariable{lesshyphenation}{lesshyphenation}
+\setinterfacevariable{letterspacing}{letterspacing}
\setinterfacevariable{line}{ligne}
\setinterfacevariable{linenote}{noteligne}
\setinterfacevariable{lines}{lignes}
@@ -272,6 +309,7 @@
\setinterfacevariable{logo}{logo}
\setinterfacevariable{logos}{logos}
\setinterfacevariable{lohi}{baha}
+\setinterfacevariable{long}{long}
\setinterfacevariable{loose}{perte}
\setinterfacevariable{low}{bas}
\setinterfacevariable{ls}{ls}
@@ -280,6 +318,7 @@
\setinterfacevariable{march}{mars}
\setinterfacevariable{margin}{marge}
\setinterfacevariable{marginedge}{bordmarge}
+\setinterfacevariable{margintext}{textemarge}
\setinterfacevariable{margintitle}{titremarge}
\setinterfacevariable{marking}{marquage}
\setinterfacevariable{math}{math}
@@ -300,9 +339,11 @@
\setinterfacevariable{minheight}{hauteurmin}
\setinterfacevariable{minwidth}{largeurmin}
\setinterfacevariable{mirrored}{reflete}
+\setinterfacevariable{mixed}{mixed}
\setinterfacevariable{monday}{lundi}
\setinterfacevariable{mono}{mono}
\setinterfacevariable{monobold}{monogras}
+\setinterfacevariable{mononormal}{mononormal}
\setinterfacevariable{month}{mois}
\setinterfacevariable{more}{more}
\setinterfacevariable{morehyphenation}{morehyphenation}
@@ -316,17 +357,23 @@
\setinterfacevariable{nextoddpage}{pageimpairesuivante}
\setinterfacevariable{nextpage}{pagesuivante}
\setinterfacevariable{nextsubpage}{souspagesuivante}
+\setinterfacevariable{nine}{nine}
\setinterfacevariable{no}{non}
\setinterfacevariable{nocheck}{nonverifie}
+\setinterfacevariable{nodepth}{nodepth}
\setinterfacevariable{nofit}{nofit}
\setinterfacevariable{nogrid}{nogrid}
+\setinterfacevariable{noheight}{noheight}
\setinterfacevariable{nohz}{nohz}
+\setinterfacevariable{noline}{noline}
\setinterfacevariable{nomarking}{sansmarquage}
\setinterfacevariable{none}{rien}
\setinterfacevariable{nonumber}{sansnumero}
+\setinterfacevariable{norepeat}{norepeat}
\setinterfacevariable{normal}{normal}
\setinterfacevariable{nospacing}{sansespacement}
\setinterfacevariable{not}{pas}
+\setinterfacevariable{notation}{notation}
\setinterfacevariable{note}{note}
\setinterfacevariable{nothanging}{nonsuspendu}
\setinterfacevariable{nothyphenated}{nothyphenated}
@@ -340,9 +387,11 @@
\setinterfacevariable{off}{desactive}
\setinterfacevariable{offset}{offset}
\setinterfacevariable{old}{old}
+\setinterfacevariable{oldstyle}{oldstyle}
\setinterfacevariable{on}{actif}
\setinterfacevariable{one}{un}
\setinterfacevariable{opposite}{opposition}
+\setinterfacevariable{ordinal}{ordinal}
\setinterfacevariable{outer}{exterieur}
\setinterfacevariable{outeredge}{bordexterieur}
\setinterfacevariable{outermargin}{margeexterieure}
@@ -411,6 +460,7 @@
\setinterfacevariable{samepage}{memepage}
\setinterfacevariable{sans}{sans}
\setinterfacevariable{sansbold}{sansgras}
+\setinterfacevariable{sansnormal}{sansnormal}
\setinterfacevariable{sansserif}{sansserif}
\setinterfacevariable{saturday}{samedi}
\setinterfacevariable{screen}{ecran}
@@ -421,12 +471,19 @@
\setinterfacevariable{selectfont}{selectfont}
\setinterfacevariable{september}{septembre}
\setinterfacevariable{serif}{serif}
+\setinterfacevariable{serifbold}{serifbold}
+\setinterfacevariable{serifnormal}{serifnormal}
\setinterfacevariable{serried}{serried}
\setinterfacevariable{setups}{setups}
+\setinterfacevariable{seven}{seven}
\setinterfacevariable{sheet}{sheet}
+\setinterfacevariable{shiftdown}{shiftdown}
+\setinterfacevariable{shiftup}{shiftup}
\setinterfacevariable{short}{short}
\setinterfacevariable{simplefonts}{simplefonts}
+\setinterfacevariable{simplelist}{simplelist}
\setinterfacevariable{singlesided}{recto}
+\setinterfacevariable{six}{six}
\setinterfacevariable{slanted}{incline}
\setinterfacevariable{slantedbold}{grasincline}
\setinterfacevariable{small}{petit}
@@ -444,6 +501,7 @@
\setinterfacevariable{smalltype}{petittype}
\setinterfacevariable{somewhere}{qqpart}
\setinterfacevariable{sorted}{trie}
+\setinterfacevariable{sorting}{sorting}
\setinterfacevariable{space}{espace}
\setinterfacevariable{spacing}{espacement}
\setinterfacevariable{speech}{discours}
@@ -456,6 +514,7 @@
\setinterfacevariable{stop}{stoppe}
\setinterfacevariable{stopper}{stopper}
\setinterfacevariable{stretch}{etire}
+\setinterfacevariable{stretched}{stretched}
\setinterfacevariable{strict}{strict}
\setinterfacevariable{strong}{strong}
\setinterfacevariable{strut}{strut}
@@ -489,6 +548,7 @@
\setinterfacevariable{sym}{sym}
\setinterfacevariable{symbol}{symbole}
\setinterfacevariable{synchronize}{synchronize}
+\setinterfacevariable{synonym}{synonym}
\setinterfacevariable{system}{systeme}
\setinterfacevariable{table}{tableau}
\setinterfacevariable{tablehead}{tetetableau}
@@ -519,6 +579,7 @@
\setinterfacevariable{underbars}{sousligne}
\setinterfacevariable{understrike}{understrike}
\setinterfacevariable{understrikes}{understrikes}
+\setinterfacevariable{unframed}{unframed}
\setinterfacevariable{unit}{unite}
\setinterfacevariable{units}{unites}
\setinterfacevariable{unknown}{inconnu}
@@ -531,6 +592,8 @@
\setinterfacevariable{very}{tres}
\setinterfacevariable{verystrict}{tresstrict}
\setinterfacevariable{verytolerant}{trestolerant}
+\setinterfacevariable{vfenced}{vfenced}
+\setinterfacevariable{vulgarfraction}{vulgarfraction}
\setinterfacevariable{weak}{weak}
\setinterfacevariable{wednesday}{mercredi}
\setinterfacevariable{week}{semaine}
@@ -539,6 +602,7 @@
\setinterfacevariable{wide}{ample}
\setinterfacevariable{width}{largeur}
\setinterfacevariable{word}{mot}
+\setinterfacevariable{words}{words}
\setinterfacevariable{xml}{xml}
\setinterfacevariable{year}{annee}
\setinterfacevariable{yes}{oui}
@@ -564,8 +628,10 @@
\setinterfaceconstant{artauthoretaldisplay}{artauthoretaldisplay}
\setinterfaceconstant{artauthoretallimit}{artauthoretallimit}
\setinterfaceconstant{artauthoretaltext}{artauthoretaltext}
+\setinterfaceconstant{artoffset}{artoffset}
\setinterfaceconstant{at}{a}
\setinterfaceconstant{author}{auteur}
+\setinterfaceconstant{authorconversion}{authorconversion}
\setinterfaceconstant{authoretaldisplay}{authoretaldisplay}
\setinterfaceconstant{authoretallimit}{authoretallimit}
\setinterfaceconstant{authoretaltext}{authoretaltext}
@@ -596,6 +662,7 @@
\setinterfaceconstant{bidi}{bidi}
\setinterfaceconstant{big}{grand}
\setinterfaceconstant{blank}{vide}
+\setinterfaceconstant{bleedoffset}{bleedoffset}
\setinterfaceconstant{blockway}{blockway}
\setinterfaceconstant{bodyfont}{policecorps}
\setinterfaceconstant{boffset}{boffset}
@@ -620,6 +687,8 @@
\setinterfaceconstant{calculate}{calculer}
\setinterfaceconstant{category}{category}
\setinterfaceconstant{ccommand}{ccommande}
+\setinterfaceconstant{character}{character}
+\setinterfaceconstant{characters}{characters}
\setinterfaceconstant{check}{check}
\setinterfaceconstant{click}{clic}
\setinterfaceconstant{clickin}{clicinterieur}
@@ -634,15 +703,19 @@
\setinterfaceconstant{column}{colonne}
\setinterfaceconstant{columndistance}{distancecolonne}
\setinterfaceconstant{columns}{colonnes}
+\setinterfaceconstant{comma}{comma}
\setinterfaceconstant{command}{commande}
\setinterfaceconstant{commandafter}{commandeapres}
\setinterfaceconstant{commandbefore}{commandeavant}
\setinterfaceconstant{commands}{commandes}
+\setinterfaceconstant{comment}{comment}
+\setinterfaceconstant{commentchar}{commentchar}
\setinterfaceconstant{commentoffset}{commentoffset}
\setinterfaceconstant{compact}{compact}
\setinterfaceconstant{component}{composant}
\setinterfaceconstant{compoundhyphen}{compoundhyphen}
\setinterfaceconstant{compress}{compress}
+\setinterfaceconstant{compressseparator}{compressseparator}
\setinterfaceconstant{concerns}{concerns}
\setinterfaceconstant{connector}{connector}
\setinterfaceconstant{continue}{continue}
@@ -654,12 +727,14 @@
\setinterfaceconstant{coupling}{couplage}
\setinterfaceconstant{couplingway}{modecouplage}
\setinterfaceconstant{criterium}{critere}
+\setinterfaceconstant{cropoffset}{cropoffset}
\setinterfaceconstant{cssfile}{cssfile}
\setinterfaceconstant{current}{courant}
\setinterfaceconstant{cutspace}{cutspace}
\setinterfaceconstant{dash}{pointille}
\setinterfaceconstant{dat}{dat}
\setinterfaceconstant{database}{database}
+\setinterfaceconstant{dataset}{dataset}
\setinterfaceconstant{date}{date}
\setinterfaceconstant{deepnumbercommand}{deepnumbercommand}
\setinterfaceconstant{deeptextcommand}{deeptextcommand}
@@ -671,8 +746,10 @@
\setinterfaceconstant{directory}{repertoire}
\setinterfaceconstant{display}{affichage}
\setinterfaceconstant{distance}{distance}
+\setinterfaceconstant{domain}{domain}
\setinterfaceconstant{dot}{point}
\setinterfaceconstant{doublesided}{rectoverso}
+\setinterfaceconstant{down}{down}
\setinterfaceconstant{dummy}{dummy}
\setinterfaceconstant{dx}{dx}
\setinterfaceconstant{dy}{dy}
@@ -688,6 +765,10 @@
\setinterfaceconstant{equalheight}{equalheight}
\setinterfaceconstant{equalwidth}{equalwidth}
\setinterfaceconstant{escape}{escape}
+\setinterfaceconstant{etaldisplay}{etaldisplay}
+\setinterfaceconstant{etallimit}{etallimit}
+\setinterfaceconstant{etaloption}{etaloption}
+\setinterfaceconstant{etaltext}{etaltext}
\setinterfaceconstant{evenmargin}{margepaire}
\setinterfaceconstant{exitoffset}{exitoffset}
\setinterfaceconstant{expansion}{expansion}
@@ -697,18 +778,24 @@
\setinterfaceconstant{fallback}{fallback}
\setinterfaceconstant{family}{famille}
\setinterfaceconstant{features}{features}
+\setinterfaceconstant{fences}{fences}
+\setinterfaceconstant{field}{field}
\setinterfaceconstant{fieldbackgroundcolor}{couleurarrierreplanchamp}
\setinterfaceconstant{fieldframecolor}{couleurcadrechamp}
\setinterfaceconstant{fieldlayer}{calquechamp}
\setinterfaceconstant{fieldoffset}{offsetchamp}
\setinterfaceconstant{file}{fichier}
+\setinterfaceconstant{filler}{filler}
\setinterfaceconstant{filtercommand}{filtercommand}
\setinterfaceconstant{finalnamesep}{finalnamesep}
+\setinterfaceconstant{finalpagesep}{finalpagesep}
\setinterfaceconstant{finalpubsep}{finalpubsep}
+\setinterfaceconstant{first}{first}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{premierepage}
\setinterfaceconstant{focus}{focus}
\setinterfaceconstant{focusin}{focusin}
+\setinterfaceconstant{focusoffset}{focusoffset}
\setinterfaceconstant{focusout}{focusout}
\setinterfaceconstant{footer}{pdp}
\setinterfaceconstant{footerdistance}{dsitancepdp}
@@ -717,6 +804,7 @@
\setinterfaceconstant{foregroundcolor}{couleurpremierplan}
\setinterfaceconstant{foregroundstyle}{stylepremierplan}
\setinterfaceconstant{format}{formatter}
+\setinterfaceconstant{fractions}{fractions}
\setinterfaceconstant{frame}{cadre}
\setinterfaceconstant{framecolor}{couleurcadre}
\setinterfaceconstant{framecorner}{coincadre}
@@ -725,10 +813,14 @@
\setinterfaceconstant{frameradius}{rayoncadre}
\setinterfaceconstant{frames}{cadres}
\setinterfaceconstant{from}{de}
+\setinterfaceconstant{functioncolor}{functioncolor}
+\setinterfaceconstant{functionstyle}{functionstyle}
\setinterfaceconstant{get}{obtient}
\setinterfaceconstant{global}{global}
\setinterfaceconstant{goodies}{goodies}
\setinterfaceconstant{grid}{grille}
+\setinterfaceconstant{group}{group}
+\setinterfaceconstant{groupsuffix}{groupsuffix}
\setinterfaceconstant{hang}{suspend}
\setinterfaceconstant{hcompact}{hcompact}
\setinterfaceconstant{headalign}{headalign}
@@ -748,19 +840,23 @@
\setinterfaceconstant{hoffset}{decalagehauteur}
\setinterfaceconstant{horoffset}{horoffset}
\setinterfaceconstant{hyphen}{hyphen}
+\setinterfaceconstant{hyphens}{hyphens}
\setinterfaceconstant{icommand}{icommande}
+\setinterfaceconstant{ignore}{ignore}
\setinterfaceconstant{in}{in}
\setinterfaceconstant{inbetween}{entre}
\setinterfaceconstant{increment}{incremente}
\setinterfaceconstant{incrementnumber}{incrementenumero}
\setinterfaceconstant{indenting}{composeenalinea}
\setinterfaceconstant{indentnext}{indentesuivant}
+\setinterfaceconstant{index}{index}
\setinterfaceconstant{indicator}{indicateur}
\setinterfaceconstant{initialsep}{initialsep}
\setinterfaceconstant{inner}{interieur}
\setinterfaceconstant{innermargin}{margeinterieure}
\setinterfaceconstant{inputfile}{fichierentree}
\setinterfaceconstant{insidesection}{insidesection}
+\setinterfaceconstant{instance}{instance}
\setinterfaceconstant{intent}{intent}
\setinterfaceconstant{interaction}{interaction}
\setinterfaceconstant{interlinespace}{espaceinterligne}
@@ -769,15 +865,21 @@
\setinterfaceconstant{italicfont}{italicfont}
\setinterfaceconstant{itemalign}{itemalign}
\setinterfaceconstant{items}{elements}
+\setinterfaceconstant{joiners}{joiners}
+\setinterfaceconstant{journalconversion}{journalconversion}
\setinterfaceconstant{juniorsep}{juniorsep}
+\setinterfaceconstant{keeptogether}{keeptogether}
\setinterfaceconstant{ken}{ken}
\setinterfaceconstant{keyexpansion}{keyexpansion}
\setinterfaceconstant{keys}{keys}
\setinterfaceconstant{keyword}{motcle}
\setinterfaceconstant{label}{etiquette}
\setinterfaceconstant{labeloffset}{labeloffset}
+\setinterfaceconstant{language}{language}
+\setinterfaceconstant{last}{last}
\setinterfaceconstant{lastnamesep}{lastnamesep}
\setinterfaceconstant{lastpage}{dernierepage}
+\setinterfaceconstant{lastpagesep}{lastpagesep}
\setinterfaceconstant{lastpubsep}{lastpubsep}
\setinterfaceconstant{layout}{layout}
\setinterfaceconstant{left}{gauche}
@@ -798,6 +900,7 @@
\setinterfaceconstant{leftsubsentence}{sousphrasegauche}
\setinterfaceconstant{lefttext}{textegauche}
\setinterfaceconstant{leftwidth}{largeurgauche}
+\setinterfaceconstant{leftwords}{leftwords}
\setinterfaceconstant{less}{less}
\setinterfaceconstant{level}{niveau}
\setinterfaceconstant{levels}{niveaux}
@@ -854,10 +957,15 @@
\setinterfaceconstant{nbottom}{ninf}
\setinterfaceconstant{nc}{nc}
\setinterfaceconstant{next}{suivant}
+\setinterfaceconstant{nextleft}{nextleft}
+\setinterfaceconstant{nextleftquotation}{nextleftquotation}
+\setinterfaceconstant{nextright}{nextright}
+\setinterfaceconstant{nextrightquotation}{nextrightquotation}
\setinterfaceconstant{nl}{nl}
\setinterfaceconstant{nleft}{ngauche}
\setinterfaceconstant{nlines}{nlignes}
\setinterfaceconstant{norm}{norme}
+\setinterfaceconstant{note}{note}
\setinterfaceconstant{nr}{nr}
\setinterfaceconstant{nright}{ndroite}
\setinterfaceconstant{ntop}{nsup}
@@ -888,6 +996,7 @@
\setinterfaceconstant{openaction}{actionouverture}
\setinterfaceconstant{openpage}{openpage}
\setinterfaceconstant{openpageaction}{actionouverturepage}
+\setinterfaceconstant{openup}{openup}
\setinterfaceconstant{opticalsize}{opticalsize}
\setinterfaceconstant{option}{option}
\setinterfaceconstant{order}{order}
@@ -901,8 +1010,10 @@
\setinterfaceconstant{pagecolor}{couleurpage}
\setinterfaceconstant{pagecolormodel}{pagecolormodel}
\setinterfaceconstant{pagecommand}{commandepage}
+\setinterfaceconstant{pageconnector}{pageconnector}
\setinterfaceconstant{pageconversion}{pageconversion}
\setinterfaceconstant{pageconversionset}{pageconversionset}
+\setinterfaceconstant{pageleft}{pageleft}
\setinterfaceconstant{pagenumber}{numeropage}
\setinterfaceconstant{pageprefix}{pageprefix}
\setinterfaceconstant{pageprefixconnector}{pageprefixconnector}
@@ -913,7 +1024,9 @@
\setinterfaceconstant{pageprefixset}{pageprefixset}
\setinterfaceconstant{pageprefixstarter}{pageprefixstarter}
\setinterfaceconstant{pageprefixstopper}{pageprefixstopper}
+\setinterfaceconstant{pageright}{pageright}
\setinterfaceconstant{pagesegments}{pagesegments}
+\setinterfaceconstant{pagesep}{pagesep}
\setinterfaceconstant{pageseparatorset}{pageseparatorset}
\setinterfaceconstant{pageset}{pageset}
\setinterfaceconstant{pagestarter}{pagestarter}
@@ -923,6 +1036,7 @@
\setinterfaceconstant{palet}{palette}
\setinterfaceconstant{paper}{papier}
\setinterfaceconstant{paragraph}{paragraphe}
+\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{place}
\setinterfaceconstant{placehead}{placetete}
\setinterfaceconstant{placestopper}{emplacementstopper}
@@ -943,7 +1057,9 @@
\setinterfaceconstant{printable}{editable}
\setinterfaceconstant{process}{process}
\setinterfaceconstant{profile}{profile}
+\setinterfaceconstant{properties}{properties}
\setinterfaceconstant{pubsep}{pubsep}
+\setinterfaceconstant{quotechar}{quotechar}
\setinterfaceconstant{radius}{rayon}
\setinterfaceconstant{random}{aleatoire}
\setinterfaceconstant{range}{range}
@@ -951,18 +1067,24 @@
\setinterfaceconstant{ref}{ref}
\setinterfaceconstant{refcommand}{refcommand}
\setinterfaceconstant{reference}{reference}
+\setinterfaceconstant{referencemethod}{referencemethod}
\setinterfaceconstant{referenceprefix}{referenceprefix}
\setinterfaceconstant{referencing}{referencing}
\setinterfaceconstant{region}{region}
\setinterfaceconstant{regionin}{entreregion}
\setinterfaceconstant{regionout}{regionexterieure}
+\setinterfaceconstant{register}{register}
\setinterfaceconstant{regularfeatures}{regularfeatures}
\setinterfaceconstant{regularfont}{regularfont}
+\setinterfaceconstant{renderingsetup}{renderingsetup}
\setinterfaceconstant{repeat}{repete}
\setinterfaceconstant{reset}{reset}
\setinterfaceconstant{resetnumber}{raznumero}
\setinterfaceconstant{resolution}{resolution}
+\setinterfaceconstant{resources}{resources}
+\setinterfaceconstant{reverse}{inverse}
\setinterfaceconstant{right}{droite}
+\setinterfaceconstant{rightchars}{rightchars}
\setinterfaceconstant{rightcolor}{couleurdroite}
\setinterfaceconstant{rightcompoundhyphen}{rightcompoundhyphen}
\setinterfaceconstant{rightedge}{borddroit}
@@ -980,6 +1102,7 @@
\setinterfaceconstant{rightsubsentence}{sousphrasedroite}
\setinterfaceconstant{righttext}{textedroit}
\setinterfaceconstant{rightwidth}{largeurdroite}
+\setinterfaceconstant{rightwords}{rightwords}
\setinterfaceconstant{roffset}{roffset}
\setinterfaceconstant{rotation}{rotation}
\setinterfaceconstant{rule}{ligne}
@@ -994,6 +1117,7 @@
\setinterfaceconstant{scope}{scope}
\setinterfaceconstant{screen}{ecran}
\setinterfaceconstant{section}{section}
+\setinterfaceconstant{sectionblock}{sectionblock}
\setinterfaceconstant{sectionconversion}{sectionconversion}
\setinterfaceconstant{sectionconversionset}{sectionconversionset}
\setinterfaceconstant{sectionnumber}{numerosection}
@@ -1030,6 +1154,7 @@
\setinterfaceconstant{spacebefore}{espaceavant}
\setinterfaceconstant{spaceinbetween}{spaceinbetween}
\setinterfaceconstant{spacing}{espacement}
+\setinterfaceconstant{specification}{specification}
\setinterfaceconstant{split}{split}
\setinterfaceconstant{splitcolor}{splitcolor}
\setinterfaceconstant{splitmethod}{splitmethod}
@@ -1054,10 +1179,12 @@
\setinterfaceconstant{surnamefirstnamesep}{surnamefirstnamesep}
\setinterfaceconstant{surnameinitialsep}{surnameinitialsep}
\setinterfaceconstant{surnamesep}{surnamesep}
+\setinterfaceconstant{svgstyle}{svgstyle}
\setinterfaceconstant{sx}{sx}
\setinterfaceconstant{sy}{sy}
\setinterfaceconstant{symalign}{symalignement}
\setinterfaceconstant{symbol}{symbole}
+\setinterfaceconstant{symbolcommand}{symbolcommand}
\setinterfaceconstant{symbolset}{jeusymbole}
\setinterfaceconstant{symcolor}{couleursym}
\setinterfaceconstant{symstyle}{stylesym}
@@ -1067,6 +1194,7 @@
\setinterfaceconstant{synonymstyle}{stylesynonyme}
\setinterfaceconstant{tab}{tab}
\setinterfaceconstant{text}{texte}
+\setinterfaceconstant{textalign}{textalign}
\setinterfaceconstant{textcolor}{couleurtexte}
\setinterfaceconstant{textcommand}{commandetexte}
\setinterfaceconstant{textdistance}{distancetexte}
@@ -1098,9 +1226,12 @@
\setinterfaceconstant{topspace}{espacesup}
\setinterfaceconstant{topstate}{etatsup}
\setinterfaceconstant{totalnumber}{totalnumber}
+\setinterfaceconstant{translate}{translate}
+\setinterfaceconstant{trimoffset}{trimoffset}
\setinterfaceconstant{type}{type}
\setinterfaceconstant{unit}{unite}
\setinterfaceconstant{unknownreference}{referenceinconnue}
+\setinterfaceconstant{up}{up}
\setinterfaceconstant{urlalternative}{alternativeurl}
\setinterfaceconstant{urlspace}{espaceurl}
\setinterfaceconstant{validate}{valider}
@@ -1110,15 +1241,18 @@
\setinterfaceconstant{vector}{vector}
\setinterfaceconstant{veroffset}{veroffset}
\setinterfaceconstant{vfil}{vfil}
+\setinterfaceconstant{viewerprefix}{viewerprefix}
\setinterfaceconstant{voffset}{voffset}
\setinterfaceconstant{vonsep}{vonsep}
\setinterfaceconstant{way}{mode}
\setinterfaceconstant{wfactor}{facteurlargeur}
\setinterfaceconstant{white}{blanc}
\setinterfaceconstant{width}{largeur}
+\setinterfaceconstant{words}{words}
\setinterfaceconstant{xfactor}{xfactor}
\setinterfaceconstant{xhtml}{xhtml}
\setinterfaceconstant{xmax}{xmax}
+\setinterfaceconstant{xmlsetup}{xmlsetup}
\setinterfaceconstant{xoffset}{xoffset}
\setinterfaceconstant{xscale}{xscale}
\setinterfaceconstant{xstep}{xstep}
diff --git a/Master/texmf-dist/tex/context/base/mult-fst.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-fst.mkii
index 36c3f181f22..36c3f181f22 100644
--- a/Master/texmf-dist/tex/context/base/mult-fst.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-fst.mkii
diff --git a/Master/texmf-dist/tex/context/base/mult-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-ini.mkii
index 76f6d69f2b8..76f6d69f2b8 100644
--- a/Master/texmf-dist/tex/context/base/mult-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/mult-it.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-it.mkii
index 6474d93c4c3..e6de935e67a 100644
--- a/Master/texmf-dist/tex/context/base/mult-it.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-it.mkii
@@ -3,6 +3,7 @@
% definitions for interface variables for language it
%
\setinterfacevariable{Addition}{Aggiunta}
+\setinterfacevariable{Alphabetic}{Alphabetic}
\setinterfacevariable{Balloon}{Pallone}
\setinterfacevariable{Cap}{Cap}
\setinterfacevariable{Capital}{Maiuscolo}
@@ -27,6 +28,7 @@
\setinterfacevariable{NextPage}{PaginaSuccessiva}
\setinterfacevariable{Numbers}{Numeri}
\setinterfacevariable{OpenNamedDocument}{OpenNamedDocument}
+\setinterfacevariable{Ordinal}{Ordinal}
\setinterfacevariable{Paragraph}{Capoverso}
\setinterfacevariable{PauseMovie}{PausaFilm}
\setinterfacevariable{PauseRendering}{PauseRendering}
@@ -72,19 +74,24 @@
\setinterfacevariable{action}{azione}
\setinterfacevariable{after}{dopo}
\setinterfacevariable{all}{tutti}
+\setinterfacevariable{alphabetic}{alphabetic}
\setinterfacevariable{always}{sempre}
\setinterfacevariable{and}{and}
\setinterfacevariable{answerarea}{answerarea}
\setinterfacevariable{appendices}{appendici}
\setinterfacevariable{appendix}{appendice}
\setinterfacevariable{april}{aprile}
+\setinterfacevariable{aside}{aside}
+\setinterfacevariable{atleftmargin}{atleftmargin}
\setinterfacevariable{atmargin}{almargine}
\setinterfacevariable{atpage}{apagina}
+\setinterfacevariable{atrightmargin}{atrightmargin}
\setinterfacevariable{attachment}{attachment}
\setinterfacevariable{august}{agosto}
\setinterfacevariable{author}{autore}
\setinterfacevariable{auto}{auto}
\setinterfacevariable{autointro}{autointro}
+\setinterfacevariable{autopunctuation}{autopunctuation}
\setinterfacevariable{back}{dietro}
\setinterfacevariable{background}{sfondo}
\setinterfacevariable{backmatter}{postambolo}
@@ -100,6 +107,7 @@
\setinterfacevariable{bigger}{bigger}
\setinterfacevariable{bigpreference}{grandepreferenza}
\setinterfacevariable{blank}{rigovuoto}
+\setinterfacevariable{block}{block}
\setinterfacevariable{blockquote}{blockquote}
\setinterfacevariable{bodymatter}{testiprincipali}
\setinterfacevariable{bodypart}{testoprincipale}
@@ -108,28 +116,37 @@
\setinterfacevariable{boldslanted}{grassettoinclinato}
\setinterfacevariable{bookmark}{segnalibro}
\setinterfacevariable{both}{entrambi}
+\setinterfacevariable{bothtext}{bothtext}
\setinterfacevariable{bottom}{fondo}
+\setinterfacevariable{box}{box}
\setinterfacevariable{brief}{brief}
\setinterfacevariable{broad}{ampio}
\setinterfacevariable{buffer}{buffer}
\setinterfacevariable{by}{da}
\setinterfacevariable{calligraphic}{calligrafico}
+\setinterfacevariable{camel}{camel}
\setinterfacevariable{cap}{cap}
\setinterfacevariable{capital}{maiuscolo}
\setinterfacevariable{center}{center}
+\setinterfacevariable{centerlast}{centerlast}
\setinterfacevariable{chapter}{capitolo}
\setinterfacevariable{character}{lettera}
\setinterfacevariable{characters}{lettere}
+\setinterfacevariable{chemical}{chemical}
+\setinterfacevariable{chemicals}{chemicals}
\setinterfacevariable{chemistry}{chemistry}
\setinterfacevariable{cite}{cite}
\setinterfacevariable{color}{colore}
\setinterfacevariable{column}{colonna}
\setinterfacevariable{columns}{colonne}
+\setinterfacevariable{combination}{combination}
\setinterfacevariable{command}{comando}
\setinterfacevariable{commands}{comandi}
\setinterfacevariable{comment}{commento}
\setinterfacevariable{component}{componente}
+\setinterfacevariable{compressseparator}{compressseparator}
\setinterfacevariable{concept}{concetto}
+\setinterfacevariable{construction}{construction}
\setinterfacevariable{content}{indice}
\setinterfacevariable{contents}{indici}
\setinterfacevariable{continue}{continua}
@@ -138,6 +155,7 @@
\setinterfacevariable{conversion}{coversione}
\setinterfacevariable{current}{corrente}
\setinterfacevariable{cutspace}{cutspace}
+\setinterfacevariable{dataset}{dataset}
\setinterfacevariable{date}{data}
\setinterfacevariable{day}{giorno}
\setinterfacevariable{december}{dicembre}
@@ -151,6 +169,7 @@
\setinterfacevariable{down}{down}
\setinterfacevariable{each}{ogni}
\setinterfacevariable{edge}{bordo}
+\setinterfacevariable{eight}{eight}
\setinterfacevariable{embed}{embed}
\setinterfacevariable{empty}{vuoto}
\setinterfacevariable{end}{end}
@@ -160,6 +179,7 @@
\setinterfacevariable{even}{pari}
\setinterfacevariable{export}{export}
\setinterfacevariable{external}{esterno}
+\setinterfacevariable{extremestretch}{extremestretch}
\setinterfacevariable{fact}{fatto}
\setinterfacevariable{february}{febbraio}
\setinterfacevariable{figure}{figura}
@@ -195,6 +215,7 @@
\setinterfacevariable{friday}{venerdi}
\setinterfacevariable{frontmatter}{preambolo}
\setinterfacevariable{frontpart}{prefazione}
+\setinterfacevariable{fullhz}{fullhz}
\setinterfacevariable{global}{globale}
\setinterfacevariable{graphic}{grafico}
\setinterfacevariable{graphics}{grafici}
@@ -223,14 +244,28 @@
\setinterfacevariable{indices}{indicianalitici}
\setinterfacevariable{informeel}{informeel}
\setinterfacevariable{inherit}{inherit}
+\setinterfacevariable{ininner}{ininner}
+\setinterfacevariable{ininneredge}{ininneredge}
+\setinterfacevariable{ininnermargin}{ininnermargin}
\setinterfacevariable{inleft}{insinistra}
+\setinterfacevariable{inleftedge}{inlatosinistro}
+\setinterfacevariable{inleftmargin}{inmarginesinistro}
+\setinterfacevariable{inline}{inline}
\setinterfacevariable{inmargin}{inmargine}
\setinterfacevariable{inner}{interno}
\setinterfacevariable{inneredge}{bordointerno}
\setinterfacevariable{innermargin}{margineinterno}
+\setinterfacevariable{inother}{inother}
+\setinterfacevariable{inouter}{inouter}
+\setinterfacevariable{inouteredge}{inouteredge}
+\setinterfacevariable{inoutermargin}{inoutermargin}
\setinterfacevariable{inright}{indestra}
+\setinterfacevariable{inrightedge}{inlatodestro}
+\setinterfacevariable{inrightmargin}{inmarginedestro}
+\setinterfacevariable{integral}{integral}
\setinterfacevariable{interaction}{interazione}
\setinterfacevariable{interactionmenu}{menuinterattivo}
+\setinterfacevariable{interactive}{interactive}
\setinterfacevariable{intermezzi}{intermezzi}
\setinterfacevariable{intermezzo}{intermezzo}
\setinterfacevariable{intext}{intesto}
@@ -245,6 +280,7 @@
\setinterfacevariable{july}{luglio}
\setinterfacevariable{june}{giugno}
\setinterfacevariable{keep}{mantieni}
+\setinterfacevariable{kerncharacters}{kerncharacters}
\setinterfacevariable{knockout}{knockout}
\setinterfacevariable{label}{etichetta}
\setinterfacevariable{landscape}{orizzontale}
@@ -263,6 +299,7 @@
\setinterfacevariable{legend}{legenda}
\setinterfacevariable{less}{less}
\setinterfacevariable{lesshyphenation}{lesshyphenation}
+\setinterfacevariable{letterspacing}{letterspacing}
\setinterfacevariable{line}{riga}
\setinterfacevariable{linenote}{linenote}
\setinterfacevariable{lines}{righe}
@@ -272,6 +309,7 @@
\setinterfacevariable{logo}{logo}
\setinterfacevariable{logos}{loghi}
\setinterfacevariable{lohi}{pedap}
+\setinterfacevariable{long}{long}
\setinterfacevariable{loose}{lento}
\setinterfacevariable{low}{basso}
\setinterfacevariable{ls}{ls}
@@ -280,6 +318,7 @@
\setinterfacevariable{march}{marzo}
\setinterfacevariable{margin}{margine}
\setinterfacevariable{marginedge}{bordomargine}
+\setinterfacevariable{margintext}{testoinmargine}
\setinterfacevariable{margintitle}{titoloinmargine}
\setinterfacevariable{marking}{marcatura}
\setinterfacevariable{math}{math}
@@ -300,9 +339,11 @@
\setinterfacevariable{minheight}{altezzamin}
\setinterfacevariable{minwidth}{ampiezzamin}
\setinterfacevariable{mirrored}{riflesso}
+\setinterfacevariable{mixed}{mixed}
\setinterfacevariable{monday}{lunedi}
\setinterfacevariable{mono}{mono}
\setinterfacevariable{monobold}{monograssetto}
+\setinterfacevariable{mononormal}{mononormal}
\setinterfacevariable{month}{mese}
\setinterfacevariable{more}{more}
\setinterfacevariable{morehyphenation}{morehyphenation}
@@ -316,17 +357,23 @@
\setinterfacevariable{nextoddpage}{paginadisparisuccessiva}
\setinterfacevariable{nextpage}{paginasuccessiva}
\setinterfacevariable{nextsubpage}{sottopaginasuccessiva}
+\setinterfacevariable{nine}{nine}
\setinterfacevariable{no}{no}
\setinterfacevariable{nocheck}{nocheck}
+\setinterfacevariable{nodepth}{nodepth}
\setinterfacevariable{nofit}{nofit}
\setinterfacevariable{nogrid}{nogrid}
+\setinterfacevariable{noheight}{noheight}
\setinterfacevariable{nohz}{nohz}
+\setinterfacevariable{noline}{noline}
\setinterfacevariable{nomarking}{nomarcature}
\setinterfacevariable{none}{nessuno}
\setinterfacevariable{nonumber}{nonumber}
+\setinterfacevariable{norepeat}{norepeat}
\setinterfacevariable{normal}{normale}
\setinterfacevariable{nospacing}{nospacing}
\setinterfacevariable{not}{non}
+\setinterfacevariable{notation}{notation}
\setinterfacevariable{note}{note}
\setinterfacevariable{nothanging}{nonsospeso}
\setinterfacevariable{nothyphenated}{nonsillabato}
@@ -340,9 +387,11 @@
\setinterfacevariable{off}{disattivo}
\setinterfacevariable{offset}{offset}
\setinterfacevariable{old}{old}
+\setinterfacevariable{oldstyle}{oldstyle}
\setinterfacevariable{on}{attivo}
\setinterfacevariable{one}{uno}
\setinterfacevariable{opposite}{opposto}
+\setinterfacevariable{ordinal}{ordinal}
\setinterfacevariable{outer}{esterno}
\setinterfacevariable{outeredge}{bordoesterno}
\setinterfacevariable{outermargin}{margineesterno}
@@ -411,6 +460,7 @@
\setinterfacevariable{samepage}{stessapagina}
\setinterfacevariable{sans}{sans}
\setinterfacevariable{sansbold}{sansgrassetto}
+\setinterfacevariable{sansnormal}{sansnormal}
\setinterfacevariable{sansserif}{sansserif}
\setinterfacevariable{saturday}{sabato}
\setinterfacevariable{screen}{schermo}
@@ -421,12 +471,19 @@
\setinterfacevariable{selectfont}{selectfont}
\setinterfacevariable{september}{settembre}
\setinterfacevariable{serif}{serif}
+\setinterfacevariable{serifbold}{serifbold}
+\setinterfacevariable{serifnormal}{serifnormal}
\setinterfacevariable{serried}{vicino}
\setinterfacevariable{setups}{setups}
+\setinterfacevariable{seven}{seven}
\setinterfacevariable{sheet}{sheet}
+\setinterfacevariable{shiftdown}{shiftdown}
+\setinterfacevariable{shiftup}{shiftup}
\setinterfacevariable{short}{short}
\setinterfacevariable{simplefonts}{simplefonts}
+\setinterfacevariable{simplelist}{simplelist}
\setinterfacevariable{singlesided}{facciasingola}
+\setinterfacevariable{six}{six}
\setinterfacevariable{slanted}{inclinato}
\setinterfacevariable{slantedbold}{inclinatograssetto}
\setinterfacevariable{small}{piccolo}
@@ -444,6 +501,7 @@
\setinterfacevariable{smalltype}{piccolotype}
\setinterfacevariable{somewhere}{daqualcheparte}
\setinterfacevariable{sorted}{ordinato}
+\setinterfacevariable{sorting}{sorting}
\setinterfacevariable{space}{spazio}
\setinterfacevariable{spacing}{spaziatura}
\setinterfacevariable{speech}{speech}
@@ -456,6 +514,7 @@
\setinterfacevariable{stop}{termina}
\setinterfacevariable{stopper}{stopper}
\setinterfacevariable{stretch}{dilata}
+\setinterfacevariable{stretched}{stretched}
\setinterfacevariable{strict}{rigido}
\setinterfacevariable{strong}{strong}
\setinterfacevariable{strut}{strut}
@@ -489,6 +548,7 @@
\setinterfacevariable{sym}{sim}
\setinterfacevariable{symbol}{simbolo}
\setinterfacevariable{synchronize}{synchronize}
+\setinterfacevariable{synonym}{synonym}
\setinterfacevariable{system}{sistema}
\setinterfacevariable{table}{tabella}
\setinterfacevariable{tablehead}{testatabella}
@@ -519,6 +579,7 @@
\setinterfacevariable{underbars}{sottolinee}
\setinterfacevariable{understrike}{understrike}
\setinterfacevariable{understrikes}{understrikes}
+\setinterfacevariable{unframed}{unframed}
\setinterfacevariable{unit}{unita}
\setinterfacevariable{units}{unita}
\setinterfacevariable{unknown}{ignoto}
@@ -531,6 +592,8 @@
\setinterfacevariable{very}{molto}
\setinterfacevariable{verystrict}{moltorigido}
\setinterfacevariable{verytolerant}{moltotollerante}
+\setinterfacevariable{vfenced}{vfenced}
+\setinterfacevariable{vulgarfraction}{vulgarfraction}
\setinterfacevariable{weak}{weak}
\setinterfacevariable{wednesday}{mercoledi}
\setinterfacevariable{week}{settimana}
@@ -539,6 +602,7 @@
\setinterfacevariable{wide}{ampio}
\setinterfacevariable{width}{ampiezza}
\setinterfacevariable{word}{parola}
+\setinterfacevariable{words}{words}
\setinterfacevariable{xml}{xml}
\setinterfacevariable{year}{anno}
\setinterfacevariable{yes}{si}
@@ -564,8 +628,10 @@
\setinterfaceconstant{artauthoretaldisplay}{artauthoretaldisplay}
\setinterfaceconstant{artauthoretallimit}{artauthoretallimit}
\setinterfaceconstant{artauthoretaltext}{artauthoretaltext}
+\setinterfaceconstant{artoffset}{artoffset}
\setinterfaceconstant{at}{ad}
\setinterfaceconstant{author}{autore}
+\setinterfaceconstant{authorconversion}{authorconversion}
\setinterfaceconstant{authoretaldisplay}{authoretaldisplay}
\setinterfaceconstant{authoretallimit}{authoretallimit}
\setinterfaceconstant{authoretaltext}{authoretaltext}
@@ -596,6 +662,7 @@
\setinterfaceconstant{bidi}{bidi}
\setinterfaceconstant{big}{grande}
\setinterfaceconstant{blank}{rigovuoto}
+\setinterfaceconstant{bleedoffset}{bleedoffset}
\setinterfaceconstant{blockway}{blockway}
\setinterfaceconstant{bodyfont}{fonttesto}
\setinterfaceconstant{boffset}{boffset}
@@ -620,6 +687,8 @@
\setinterfaceconstant{calculate}{calcola}
\setinterfaceconstant{category}{category}
\setinterfaceconstant{ccommand}{ccomando}
+\setinterfaceconstant{character}{character}
+\setinterfaceconstant{characters}{characters}
\setinterfaceconstant{check}{check}
\setinterfaceconstant{click}{click}
\setinterfaceconstant{clickin}{clickdentro}
@@ -634,15 +703,19 @@
\setinterfaceconstant{column}{colonna}
\setinterfaceconstant{columndistance}{distanzacolonne}
\setinterfaceconstant{columns}{colonne}
+\setinterfaceconstant{comma}{comma}
\setinterfaceconstant{command}{comando}
\setinterfaceconstant{commandafter}{comdandodopo}
\setinterfaceconstant{commandbefore}{comandoprima}
\setinterfaceconstant{commands}{comandi}
+\setinterfaceconstant{comment}{comment}
+\setinterfaceconstant{commentchar}{commentchar}
\setinterfaceconstant{commentoffset}{commentoffset}
\setinterfaceconstant{compact}{compact}
\setinterfaceconstant{component}{component}
\setinterfaceconstant{compoundhyphen}{compoundhyphen}
\setinterfaceconstant{compress}{compress}
+\setinterfaceconstant{compressseparator}{compressseparator}
\setinterfaceconstant{concerns}{concerns}
\setinterfaceconstant{connector}{connector}
\setinterfaceconstant{continue}{continua}
@@ -654,12 +727,14 @@
\setinterfaceconstant{coupling}{accoppiamento}
\setinterfaceconstant{couplingway}{modoaccoppiamento}
\setinterfaceconstant{criterium}{criterio}
+\setinterfaceconstant{cropoffset}{cropoffset}
\setinterfaceconstant{cssfile}{cssfile}
\setinterfaceconstant{current}{corrente}
\setinterfaceconstant{cutspace}{cutspace}
\setinterfaceconstant{dash}{dash}
\setinterfaceconstant{dat}{dat}
\setinterfaceconstant{database}{database}
+\setinterfaceconstant{dataset}{dataset}
\setinterfaceconstant{date}{data}
\setinterfaceconstant{deepnumbercommand}{deepnumbercommand}
\setinterfaceconstant{deeptextcommand}{deeptextcommand}
@@ -671,8 +746,10 @@
\setinterfaceconstant{directory}{directory}
\setinterfaceconstant{display}{display}
\setinterfaceconstant{distance}{distanza}
+\setinterfaceconstant{domain}{domain}
\setinterfaceconstant{dot}{punto}
\setinterfaceconstant{doublesided}{doppiafaccia}
+\setinterfaceconstant{down}{down}
\setinterfaceconstant{dummy}{dummy}
\setinterfaceconstant{dx}{dx}
\setinterfaceconstant{dy}{dy}
@@ -688,6 +765,10 @@
\setinterfaceconstant{equalheight}{equalheight}
\setinterfaceconstant{equalwidth}{equalwidth}
\setinterfaceconstant{escape}{escape}
+\setinterfaceconstant{etaldisplay}{etaldisplay}
+\setinterfaceconstant{etallimit}{etallimit}
+\setinterfaceconstant{etaloption}{etaloption}
+\setinterfaceconstant{etaltext}{etaltext}
\setinterfaceconstant{evenmargin}{marginepari}
\setinterfaceconstant{exitoffset}{exitoffset}
\setinterfaceconstant{expansion}{espansione}
@@ -697,18 +778,24 @@
\setinterfaceconstant{fallback}{fallback}
\setinterfaceconstant{family}{famiglia}
\setinterfaceconstant{features}{features}
+\setinterfaceconstant{fences}{fences}
+\setinterfaceconstant{field}{field}
\setinterfaceconstant{fieldbackgroundcolor}{coloresfondocampo}
\setinterfaceconstant{fieldframecolor}{colorecornicecampo}
\setinterfaceconstant{fieldlayer}{fieldlayer}
\setinterfaceconstant{fieldoffset}{offsetcampo}
\setinterfaceconstant{file}{file}
+\setinterfaceconstant{filler}{filler}
\setinterfaceconstant{filtercommand}{filtercommand}
\setinterfaceconstant{finalnamesep}{finalnamesep}
+\setinterfaceconstant{finalpagesep}{finalpagesep}
\setinterfaceconstant{finalpubsep}{finalpubsep}
+\setinterfaceconstant{first}{first}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{primapagina}
\setinterfaceconstant{focus}{focus}
\setinterfaceconstant{focusin}{focusin}
+\setinterfaceconstant{focusoffset}{focusoffset}
\setinterfaceconstant{focusout}{focusout}
\setinterfaceconstant{footer}{piedipagina}
\setinterfaceconstant{footerdistance}{distanzapdp}
@@ -717,6 +804,7 @@
\setinterfaceconstant{foregroundcolor}{coloreprimopiano}
\setinterfaceconstant{foregroundstyle}{foregroundstyle}
\setinterfaceconstant{format}{format}
+\setinterfaceconstant{fractions}{fractions}
\setinterfaceconstant{frame}{cornice}
\setinterfaceconstant{framecolor}{colorecornice}
\setinterfaceconstant{framecorner}{angolocornice}
@@ -725,10 +813,14 @@
\setinterfaceconstant{frameradius}{raggiocornice}
\setinterfaceconstant{frames}{cornici}
\setinterfaceconstant{from}{da}
+\setinterfaceconstant{functioncolor}{functioncolor}
+\setinterfaceconstant{functionstyle}{functionstyle}
\setinterfaceconstant{get}{prendi}
\setinterfaceconstant{global}{globale}
\setinterfaceconstant{goodies}{goodies}
\setinterfaceconstant{grid}{griglia}
+\setinterfaceconstant{group}{group}
+\setinterfaceconstant{groupsuffix}{groupsuffix}
\setinterfaceconstant{hang}{sospendi}
\setinterfaceconstant{hcompact}{hcompact}
\setinterfaceconstant{headalign}{headalign}
@@ -748,19 +840,23 @@
\setinterfaceconstant{hoffset}{hoffset}
\setinterfaceconstant{horoffset}{horoffset}
\setinterfaceconstant{hyphen}{hyphen}
+\setinterfaceconstant{hyphens}{hyphens}
\setinterfaceconstant{icommand}{icomando}
+\setinterfaceconstant{ignore}{ignore}
\setinterfaceconstant{in}{in}
\setinterfaceconstant{inbetween}{tra}
\setinterfaceconstant{increment}{incremento}
\setinterfaceconstant{incrementnumber}{incrementanumero}
\setinterfaceconstant{indenting}{rientro}
\setinterfaceconstant{indentnext}{rientrasuccessivo}
+\setinterfaceconstant{index}{index}
\setinterfaceconstant{indicator}{indicatore}
\setinterfaceconstant{initialsep}{initialsep}
\setinterfaceconstant{inner}{interno}
\setinterfaceconstant{innermargin}{margineinterno}
\setinterfaceconstant{inputfile}{inputfile}
\setinterfaceconstant{insidesection}{insidesection}
+\setinterfaceconstant{instance}{instance}
\setinterfaceconstant{intent}{intent}
\setinterfaceconstant{interaction}{interazione}
\setinterfaceconstant{interlinespace}{interlinea}
@@ -769,15 +865,21 @@
\setinterfaceconstant{italicfont}{italicfont}
\setinterfaceconstant{itemalign}{itemalign}
\setinterfaceconstant{items}{elementi}
+\setinterfaceconstant{joiners}{joiners}
+\setinterfaceconstant{journalconversion}{journalconversion}
\setinterfaceconstant{juniorsep}{juniorsep}
+\setinterfaceconstant{keeptogether}{keeptogether}
\setinterfaceconstant{ken}{ken}
\setinterfaceconstant{keyexpansion}{keyexpansion}
\setinterfaceconstant{keys}{keys}
\setinterfaceconstant{keyword}{parolachiave}
\setinterfaceconstant{label}{etichetta}
\setinterfaceconstant{labeloffset}{labeloffset}
+\setinterfaceconstant{language}{language}
+\setinterfaceconstant{last}{last}
\setinterfaceconstant{lastnamesep}{lastnamesep}
\setinterfaceconstant{lastpage}{ultimapagina}
+\setinterfaceconstant{lastpagesep}{lastpagesep}
\setinterfaceconstant{lastpubsep}{lastpubsep}
\setinterfaceconstant{layout}{layout}
\setinterfaceconstant{left}{sinistra}
@@ -798,6 +900,7 @@
\setinterfaceconstant{leftsubsentence}{sottofrasesinistra}
\setinterfaceconstant{lefttext}{testosinistro}
\setinterfaceconstant{leftwidth}{ampiezzasinistra}
+\setinterfaceconstant{leftwords}{leftwords}
\setinterfaceconstant{less}{less}
\setinterfaceconstant{level}{livello}
\setinterfaceconstant{levels}{livelli}
@@ -854,10 +957,15 @@
\setinterfaceconstant{nbottom}{nfondo}
\setinterfaceconstant{nc}{nc}
\setinterfaceconstant{next}{successivo}
+\setinterfaceconstant{nextleft}{nextleft}
+\setinterfaceconstant{nextleftquotation}{nextleftquotation}
+\setinterfaceconstant{nextright}{nextright}
+\setinterfaceconstant{nextrightquotation}{nextrightquotation}
\setinterfaceconstant{nl}{nl}
\setinterfaceconstant{nleft}{nsinistra}
\setinterfaceconstant{nlines}{nrighe}
\setinterfaceconstant{norm}{norma}
+\setinterfaceconstant{note}{note}
\setinterfaceconstant{nr}{nr}
\setinterfaceconstant{nright}{ndestra}
\setinterfaceconstant{ntop}{ncima}
@@ -888,6 +996,7 @@
\setinterfaceconstant{openaction}{azioneapri}
\setinterfaceconstant{openpage}{openpage}
\setinterfaceconstant{openpageaction}{azioneapripagina}
+\setinterfaceconstant{openup}{openup}
\setinterfaceconstant{opticalsize}{opticalsize}
\setinterfaceconstant{option}{opzione}
\setinterfaceconstant{order}{order}
@@ -901,8 +1010,10 @@
\setinterfaceconstant{pagecolor}{colorepagina}
\setinterfaceconstant{pagecolormodel}{pagecolormodel}
\setinterfaceconstant{pagecommand}{comandopagina}
+\setinterfaceconstant{pageconnector}{pageconnector}
\setinterfaceconstant{pageconversion}{pageconversion}
\setinterfaceconstant{pageconversionset}{pageconversionset}
+\setinterfaceconstant{pageleft}{pageleft}
\setinterfaceconstant{pagenumber}{numeropagina}
\setinterfaceconstant{pageprefix}{pageprefix}
\setinterfaceconstant{pageprefixconnector}{pageprefixconnector}
@@ -913,7 +1024,9 @@
\setinterfaceconstant{pageprefixset}{pageprefixset}
\setinterfaceconstant{pageprefixstarter}{pageprefixstarter}
\setinterfaceconstant{pageprefixstopper}{pageprefixstopper}
+\setinterfaceconstant{pageright}{pageright}
\setinterfaceconstant{pagesegments}{pagesegments}
+\setinterfaceconstant{pagesep}{pagesep}
\setinterfaceconstant{pageseparatorset}{pageseparatorset}
\setinterfaceconstant{pageset}{pageset}
\setinterfaceconstant{pagestarter}{pagestarter}
@@ -923,6 +1036,7 @@
\setinterfaceconstant{palet}{tavolozza}
\setinterfaceconstant{paper}{carta}
\setinterfaceconstant{paragraph}{capoverso}
+\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{metti}
\setinterfaceconstant{placehead}{mettitesta}
\setinterfaceconstant{placestopper}{mettistopper}
@@ -943,7 +1057,9 @@
\setinterfaceconstant{printable}{stampabile}
\setinterfaceconstant{process}{process}
\setinterfaceconstant{profile}{profile}
+\setinterfaceconstant{properties}{properties}
\setinterfaceconstant{pubsep}{pubsep}
+\setinterfaceconstant{quotechar}{quotechar}
\setinterfaceconstant{radius}{raggio}
\setinterfaceconstant{random}{casuale}
\setinterfaceconstant{range}{range}
@@ -951,18 +1067,24 @@
\setinterfaceconstant{ref}{ref}
\setinterfaceconstant{refcommand}{refcommand}
\setinterfaceconstant{reference}{riferimento}
+\setinterfaceconstant{referencemethod}{referencemethod}
\setinterfaceconstant{referenceprefix}{referenceprefix}
\setinterfaceconstant{referencing}{referencing}
\setinterfaceconstant{region}{region}
\setinterfaceconstant{regionin}{entraregione}
\setinterfaceconstant{regionout}{esciregione}
+\setinterfaceconstant{register}{register}
\setinterfaceconstant{regularfeatures}{regularfeatures}
\setinterfaceconstant{regularfont}{regularfont}
+\setinterfaceconstant{renderingsetup}{renderingsetup}
\setinterfaceconstant{repeat}{ripeti}
\setinterfaceconstant{reset}{reset}
\setinterfaceconstant{resetnumber}{resetnumber}
\setinterfaceconstant{resolution}{risoluzione}
+\setinterfaceconstant{resources}{resources}
+\setinterfaceconstant{reverse}{invertito}
\setinterfaceconstant{right}{destra}
+\setinterfaceconstant{rightchars}{rightchars}
\setinterfaceconstant{rightcolor}{coloredestra}
\setinterfaceconstant{rightcompoundhyphen}{rightcompoundhyphen}
\setinterfaceconstant{rightedge}{bordodestro}
@@ -980,6 +1102,7 @@
\setinterfaceconstant{rightsubsentence}{sottofrasedestra}
\setinterfaceconstant{righttext}{testodestro}
\setinterfaceconstant{rightwidth}{ampiezzadestra}
+\setinterfaceconstant{rightwords}{rightwords}
\setinterfaceconstant{roffset}{roffset}
\setinterfaceconstant{rotation}{rotazione}
\setinterfaceconstant{rule}{linea}
@@ -994,6 +1117,7 @@
\setinterfaceconstant{scope}{scope}
\setinterfaceconstant{screen}{schermo}
\setinterfaceconstant{section}{sezione}
+\setinterfaceconstant{sectionblock}{sectionblock}
\setinterfaceconstant{sectionconversion}{sectionconversion}
\setinterfaceconstant{sectionconversionset}{sectionconversionset}
\setinterfaceconstant{sectionnumber}{numerosezione}
@@ -1030,6 +1154,7 @@
\setinterfaceconstant{spacebefore}{spazioprima}
\setinterfaceconstant{spaceinbetween}{spaceinbetween}
\setinterfaceconstant{spacing}{spaziatura}
+\setinterfaceconstant{specification}{specification}
\setinterfaceconstant{split}{separa}
\setinterfaceconstant{splitcolor}{splitcolor}
\setinterfaceconstant{splitmethod}{splitmethod}
@@ -1054,10 +1179,12 @@
\setinterfaceconstant{surnamefirstnamesep}{surnamefirstnamesep}
\setinterfaceconstant{surnameinitialsep}{surnameinitialsep}
\setinterfaceconstant{surnamesep}{surnamesep}
+\setinterfaceconstant{svgstyle}{svgstyle}
\setinterfaceconstant{sx}{sx}
\setinterfaceconstant{sy}{sy}
\setinterfaceconstant{symalign}{symallinea}
\setinterfaceconstant{symbol}{simbolo}
+\setinterfaceconstant{symbolcommand}{symbolcommand}
\setinterfaceconstant{symbolset}{setsimboli}
\setinterfaceconstant{symcolor}{coloresimbolo}
\setinterfaceconstant{symstyle}{stilesimbolo}
@@ -1067,6 +1194,7 @@
\setinterfaceconstant{synonymstyle}{stilesinonimi}
\setinterfaceconstant{tab}{tab}
\setinterfaceconstant{text}{testo}
+\setinterfaceconstant{textalign}{textalign}
\setinterfaceconstant{textcolor}{coloretesto}
\setinterfaceconstant{textcommand}{comandotesto}
\setinterfaceconstant{textdistance}{distanzatesto}
@@ -1098,9 +1226,12 @@
\setinterfaceconstant{topspace}{spaziocima}
\setinterfaceconstant{topstate}{statocima}
\setinterfaceconstant{totalnumber}{totalnumber}
+\setinterfaceconstant{translate}{translate}
+\setinterfaceconstant{trimoffset}{trimoffset}
\setinterfaceconstant{type}{type}
\setinterfaceconstant{unit}{unita}
\setinterfaceconstant{unknownreference}{riferimentoingoto}
+\setinterfaceconstant{up}{up}
\setinterfaceconstant{urlalternative}{alternativaurl}
\setinterfaceconstant{urlspace}{spaziourl}
\setinterfaceconstant{validate}{verifica}
@@ -1110,15 +1241,18 @@
\setinterfaceconstant{vector}{vector}
\setinterfaceconstant{veroffset}{veroffset}
\setinterfaceconstant{vfil}{vfil}
+\setinterfaceconstant{viewerprefix}{viewerprefix}
\setinterfaceconstant{voffset}{voffset}
\setinterfaceconstant{vonsep}{vonsep}
\setinterfaceconstant{way}{modo}
\setinterfaceconstant{wfactor}{wfactor}
\setinterfaceconstant{white}{bianco}
\setinterfaceconstant{width}{ampiezza}
+\setinterfaceconstant{words}{words}
\setinterfaceconstant{xfactor}{xfactor}
\setinterfaceconstant{xhtml}{xhtml}
\setinterfaceconstant{xmax}{xmax}
+\setinterfaceconstant{xmlsetup}{xmlsetup}
\setinterfaceconstant{xoffset}{xoffset}
\setinterfaceconstant{xscale}{xscale}
\setinterfaceconstant{xstep}{xstep}
diff --git a/Master/texmf-dist/tex/context/base/mult-mcs.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-mcs.mkii
index c733798e642..c733798e642 100644
--- a/Master/texmf-dist/tex/context/base/mult-mcs.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-mcs.mkii
diff --git a/Master/texmf-dist/tex/context/base/mult-mde.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-mde.mkii
index 4d7f009e482..4d7f009e482 100644
--- a/Master/texmf-dist/tex/context/base/mult-mde.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-mde.mkii
diff --git a/Master/texmf-dist/tex/context/base/mult-men.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-men.mkii
index a8d42935602..a8d42935602 100644
--- a/Master/texmf-dist/tex/context/base/mult-men.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-men.mkii
diff --git a/Master/texmf-dist/tex/context/base/mult-mfr.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-mfr.mkii
index 7fee954c039..7fee954c039 100644
--- a/Master/texmf-dist/tex/context/base/mult-mfr.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-mfr.mkii
diff --git a/Master/texmf-dist/tex/context/base/mult-mit.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-mit.mkii
index 9d09e267654..9d09e267654 100644
--- a/Master/texmf-dist/tex/context/base/mult-mit.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-mit.mkii
diff --git a/Master/texmf-dist/tex/context/base/mult-mnl.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-mnl.mkii
index fb527d4adeb..fb527d4adeb 100644
--- a/Master/texmf-dist/tex/context/base/mult-mnl.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-mnl.mkii
diff --git a/Master/texmf-dist/tex/context/base/mult-mno.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-mno.mkii
index bbbc3a6585c..bbbc3a6585c 100644
--- a/Master/texmf-dist/tex/context/base/mult-mno.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-mno.mkii
diff --git a/Master/texmf-dist/tex/context/base/mult-mpe.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-mpe.mkii
index a8d42935602..a8d42935602 100644
--- a/Master/texmf-dist/tex/context/base/mult-mpe.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-mpe.mkii
diff --git a/Master/texmf-dist/tex/context/base/mult-mro.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-mro.mkii
index 70673c31717..70673c31717 100644
--- a/Master/texmf-dist/tex/context/base/mult-mro.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-mro.mkii
diff --git a/Master/texmf-dist/tex/context/base/mult-nl.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-nl.mkii
index 22350dc50c3..8c2063ea8d6 100644
--- a/Master/texmf-dist/tex/context/base/mult-nl.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-nl.mkii
@@ -3,6 +3,7 @@
% definitions for interface variables for language nl
%
\setinterfacevariable{Addition}{Toevoeging}
+\setinterfacevariable{Alphabetic}{Alphabetic}
\setinterfacevariable{Balloon}{Ballon}
\setinterfacevariable{Cap}{Kap}
\setinterfacevariable{Capital}{Kapitaal}
@@ -27,6 +28,7 @@
\setinterfacevariable{NextPage}{VolgendePagina}
\setinterfacevariable{Numbers}{Cijfers}
\setinterfacevariable{OpenNamedDocument}{OpenDocumentOpNaam}
+\setinterfacevariable{Ordinal}{Ordinal}
\setinterfacevariable{Paragraph}{Paragraaf}
\setinterfacevariable{PauseMovie}{PauzeerFilm}
\setinterfacevariable{PauseRendering}{PauzeerRendering}
@@ -72,19 +74,24 @@
\setinterfacevariable{action}{actie}
\setinterfacevariable{after}{na}
\setinterfacevariable{all}{alles}
+\setinterfacevariable{alphabetic}{alphabetic}
\setinterfacevariable{always}{altijd}
\setinterfacevariable{and}{en}
\setinterfacevariable{answerarea}{antwoordgebied}
\setinterfacevariable{appendices}{bijlagen}
\setinterfacevariable{appendix}{bijlage}
\setinterfacevariable{april}{april}
+\setinterfacevariable{aside}{aside}
+\setinterfacevariable{atleftmargin}{oplinkermarge}
\setinterfacevariable{atmargin}{opmarge}
\setinterfacevariable{atpage}{oppagina}
+\setinterfacevariable{atrightmargin}{oprechtermarge}
\setinterfacevariable{attachment}{aanhangsel}
\setinterfacevariable{august}{augustus}
\setinterfacevariable{author}{auteur}
\setinterfacevariable{auto}{auto}
\setinterfacevariable{autointro}{autointro}
+\setinterfacevariable{autopunctuation}{autopunctuation}
\setinterfacevariable{back}{terug}
\setinterfacevariable{background}{achtergrond}
\setinterfacevariable{backmatter}{uitleidingen}
@@ -100,6 +107,7 @@
\setinterfacevariable{bigger}{groter}
\setinterfacevariable{bigpreference}{grotevoorkeur}
\setinterfacevariable{blank}{blanko}
+\setinterfacevariable{block}{block}
\setinterfacevariable{blockquote}{blokcitaat}
\setinterfacevariable{bodymatter}{hoofdteksten}
\setinterfacevariable{bodypart}{hoofdtekst}
@@ -108,28 +116,37 @@
\setinterfacevariable{boldslanted}{vetschuin}
\setinterfacevariable{bookmark}{bookmark}
\setinterfacevariable{both}{beide}
+\setinterfacevariable{bothtext}{bothtext}
\setinterfacevariable{bottom}{onder}
+\setinterfacevariable{box}{box}
\setinterfacevariable{brief}{brief}
\setinterfacevariable{broad}{ruim}
\setinterfacevariable{buffer}{buffer}
\setinterfacevariable{by}{per}
\setinterfacevariable{calligraphic}{calligrafie}
+\setinterfacevariable{camel}{camel}
\setinterfacevariable{cap}{kap}
\setinterfacevariable{capital}{kapitaal}
\setinterfacevariable{center}{centreer}
+\setinterfacevariable{centerlast}{centerlast}
\setinterfacevariable{chapter}{hoofdstuk}
\setinterfacevariable{character}{letter}
\setinterfacevariable{characters}{letters}
+\setinterfacevariable{chemical}{chemical}
+\setinterfacevariable{chemicals}{chemicals}
\setinterfacevariable{chemistry}{chemie}
\setinterfacevariable{cite}{cite}
\setinterfacevariable{color}{kleur}
\setinterfacevariable{column}{kolom}
\setinterfacevariable{columns}{kolommen}
+\setinterfacevariable{combination}{combination}
\setinterfacevariable{command}{commando}
\setinterfacevariable{commands}{commandos}
\setinterfacevariable{comment}{commentaar}
\setinterfacevariable{component}{onderdeel}
+\setinterfacevariable{compressseparator}{compressseparator}
\setinterfacevariable{concept}{concept}
+\setinterfacevariable{construction}{construction}
\setinterfacevariable{content}{inhoud}
\setinterfacevariable{contents}{inhouden}
\setinterfacevariable{continue}{verder}
@@ -138,6 +155,7 @@
\setinterfacevariable{conversion}{conversie}
\setinterfacevariable{current}{huidige}
\setinterfacevariable{cutspace}{snijwit}
+\setinterfacevariable{dataset}{dataset}
\setinterfacevariable{date}{datum}
\setinterfacevariable{day}{dag}
\setinterfacevariable{december}{december}
@@ -151,6 +169,7 @@
\setinterfacevariable{down}{omlaag}
\setinterfacevariable{each}{elk}
\setinterfacevariable{edge}{rand}
+\setinterfacevariable{eight}{acht}
\setinterfacevariable{embed}{sluitin}
\setinterfacevariable{empty}{leeg}
\setinterfacevariable{end}{eind}
@@ -160,6 +179,7 @@
\setinterfacevariable{even}{even}
\setinterfacevariable{export}{export}
\setinterfacevariable{external}{extern}
+\setinterfacevariable{extremestretch}{extremestretch}
\setinterfacevariable{fact}{gegeven}
\setinterfacevariable{february}{februari}
\setinterfacevariable{figure}{figuur}
@@ -195,6 +215,7 @@
\setinterfacevariable{friday}{vrijdag}
\setinterfacevariable{frontmatter}{inleidingen}
\setinterfacevariable{frontpart}{inleiding}
+\setinterfacevariable{fullhz}{fullenhz}
\setinterfacevariable{global}{globaal}
\setinterfacevariable{graphic}{grafiek}
\setinterfacevariable{graphics}{grafieken}
@@ -223,14 +244,28 @@
\setinterfacevariable{indices}{indices}
\setinterfacevariable{informeel}{informeel}
\setinterfacevariable{inherit}{erf}
+\setinterfacevariable{ininner}{inbinnen}
+\setinterfacevariable{ininneredge}{ininneredge}
+\setinterfacevariable{ininnermargin}{ininnermargin}
\setinterfacevariable{inleft}{inlinker}
+\setinterfacevariable{inleftedge}{inlinkerrand}
+\setinterfacevariable{inleftmargin}{inlinkermarge}
+\setinterfacevariable{inline}{inline}
\setinterfacevariable{inmargin}{inmarge}
\setinterfacevariable{inner}{binnen}
\setinterfacevariable{inneredge}{binnenrand}
\setinterfacevariable{innermargin}{binnenmarge}
+\setinterfacevariable{inother}{inandere}
+\setinterfacevariable{inouter}{inbuiten}
+\setinterfacevariable{inouteredge}{inouteredge}
+\setinterfacevariable{inoutermargin}{inoutermargin}
\setinterfacevariable{inright}{inrechter}
+\setinterfacevariable{inrightedge}{inrechterrand}
+\setinterfacevariable{inrightmargin}{inrechtermarge}
+\setinterfacevariable{integral}{integral}
\setinterfacevariable{interaction}{interactie}
\setinterfacevariable{interactionmenu}{interactiemenu}
+\setinterfacevariable{interactive}{interactive}
\setinterfacevariable{intermezzi}{intermezzos}
\setinterfacevariable{intermezzo}{intermezzo}
\setinterfacevariable{intext}{intekst}
@@ -245,6 +280,7 @@
\setinterfacevariable{july}{juli}
\setinterfacevariable{june}{juni}
\setinterfacevariable{keep}{handhaaf}
+\setinterfacevariable{kerncharacters}{kerncharacters}
\setinterfacevariable{knockout}{knockout}
\setinterfacevariable{label}{label}
\setinterfacevariable{landscape}{liggend}
@@ -263,6 +299,7 @@
\setinterfacevariable{legend}{legenda}
\setinterfacevariable{less}{minder}
\setinterfacevariable{lesshyphenation}{lesshyphenation}
+\setinterfacevariable{letterspacing}{letterspacing}
\setinterfacevariable{line}{regel}
\setinterfacevariable{linenote}{regelnoot}
\setinterfacevariable{lines}{regels}
@@ -272,6 +309,7 @@
\setinterfacevariable{logo}{logo}
\setinterfacevariable{logos}{logos}
\setinterfacevariable{lohi}{laho}
+\setinterfacevariable{long}{long}
\setinterfacevariable{loose}{los}
\setinterfacevariable{low}{laag}
\setinterfacevariable{ls}{ls}
@@ -280,6 +318,7 @@
\setinterfacevariable{march}{maart}
\setinterfacevariable{margin}{marge}
\setinterfacevariable{marginedge}{kantlijn}
+\setinterfacevariable{margintext}{margetekst}
\setinterfacevariable{margintitle}{margetitel}
\setinterfacevariable{marking}{markering}
\setinterfacevariable{math}{math}
@@ -300,9 +339,11 @@
\setinterfacevariable{minheight}{minhoogte}
\setinterfacevariable{minwidth}{minbreedte}
\setinterfacevariable{mirrored}{gespiegeld}
+\setinterfacevariable{mixed}{mixed}
\setinterfacevariable{monday}{maandag}
\setinterfacevariable{mono}{mono}
\setinterfacevariable{monobold}{monovet}
+\setinterfacevariable{mononormal}{mononormal}
\setinterfacevariable{month}{maand}
\setinterfacevariable{more}{meer}
\setinterfacevariable{morehyphenation}{morehyphenation}
@@ -316,17 +357,23 @@
\setinterfacevariable{nextoddpage}{volgendeonevenpagina}
\setinterfacevariable{nextpage}{volgendepagina}
\setinterfacevariable{nextsubpage}{volgendesubpagina}
+\setinterfacevariable{nine}{negen}
\setinterfacevariable{no}{nee}
\setinterfacevariable{nocheck}{geencontrole}
+\setinterfacevariable{nodepth}{nodepth}
\setinterfacevariable{nofit}{nietpassend}
\setinterfacevariable{nogrid}{geengrid}
+\setinterfacevariable{noheight}{noheight}
\setinterfacevariable{nohz}{geenhz}
+\setinterfacevariable{noline}{noline}
\setinterfacevariable{nomarking}{geenmarkering}
\setinterfacevariable{none}{geen}
\setinterfacevariable{nonumber}{geennummer}
+\setinterfacevariable{norepeat}{norepeat}
\setinterfacevariable{normal}{normaal}
\setinterfacevariable{nospacing}{geenspatiering}
\setinterfacevariable{not}{niet}
+\setinterfacevariable{notation}{notation}
\setinterfacevariable{note}{note}
\setinterfacevariable{nothanging}{niethangend}
\setinterfacevariable{nothyphenated}{nietafgebroken}
@@ -340,9 +387,11 @@
\setinterfacevariable{off}{uit}
\setinterfacevariable{offset}{offset}
\setinterfacevariable{old}{oud}
+\setinterfacevariable{oldstyle}{oldstyle}
\setinterfacevariable{on}{aan}
\setinterfacevariable{one}{een}
\setinterfacevariable{opposite}{naast}
+\setinterfacevariable{ordinal}{ordinal}
\setinterfacevariable{outer}{buiten}
\setinterfacevariable{outeredge}{buitenrand}
\setinterfacevariable{outermargin}{buitenmarge}
@@ -411,6 +460,7 @@
\setinterfacevariable{samepage}{zelfdepagina}
\setinterfacevariable{sans}{sans}
\setinterfacevariable{sansbold}{sansvet}
+\setinterfacevariable{sansnormal}{sansnormal}
\setinterfacevariable{sansserif}{schreefloos}
\setinterfacevariable{saturday}{zaterdag}
\setinterfacevariable{screen}{raster}
@@ -421,12 +471,19 @@
\setinterfacevariable{selectfont}{selectfont}
\setinterfacevariable{september}{september}
\setinterfacevariable{serif}{serif}
+\setinterfacevariable{serifbold}{serifbold}
+\setinterfacevariable{serifnormal}{serifnormal}
\setinterfacevariable{serried}{aanelkaar}
\setinterfacevariable{setups}{setups}
+\setinterfacevariable{seven}{zeven}
\setinterfacevariable{sheet}{sheet}
+\setinterfacevariable{shiftdown}{shiftdown}
+\setinterfacevariable{shiftup}{shiftup}
\setinterfacevariable{short}{kort}
\setinterfacevariable{simplefonts}{simplefonts}
+\setinterfacevariable{simplelist}{simplelist}
\setinterfacevariable{singlesided}{enkelzijdig}
+\setinterfacevariable{six}{zes}
\setinterfacevariable{slanted}{schuin}
\setinterfacevariable{slantedbold}{schuinvet}
\setinterfacevariable{small}{klein}
@@ -444,6 +501,7 @@
\setinterfacevariable{smalltype}{kleintype}
\setinterfacevariable{somewhere}{ergens}
\setinterfacevariable{sorted}{gesorteerd}
+\setinterfacevariable{sorting}{sorting}
\setinterfacevariable{space}{spatie}
\setinterfacevariable{spacing}{spatiering}
\setinterfacevariable{speech}{spraak}
@@ -456,6 +514,7 @@
\setinterfacevariable{stop}{stop}
\setinterfacevariable{stopper}{afsluiter}
\setinterfacevariable{stretch}{rek}
+\setinterfacevariable{stretched}{stretched}
\setinterfacevariable{strict}{streng}
\setinterfacevariable{strong}{sterk}
\setinterfacevariable{strut}{strut}
@@ -489,6 +548,7 @@
\setinterfacevariable{sym}{sym}
\setinterfacevariable{symbol}{symbool}
\setinterfacevariable{synchronize}{synchroniseer}
+\setinterfacevariable{synonym}{synonym}
\setinterfacevariable{system}{systeem}
\setinterfacevariable{table}{tabel}
\setinterfacevariable{tablehead}{tabelkop}
@@ -519,6 +579,7 @@
\setinterfacevariable{underbars}{onderstrepen}
\setinterfacevariable{understrike}{understrike}
\setinterfacevariable{understrikes}{understrikes}
+\setinterfacevariable{unframed}{unframed}
\setinterfacevariable{unit}{eenheid}
\setinterfacevariable{units}{eenheden}
\setinterfacevariable{unknown}{onbekend}
@@ -531,6 +592,8 @@
\setinterfacevariable{very}{zeer}
\setinterfacevariable{verystrict}{zeerstreng}
\setinterfacevariable{verytolerant}{zeersoepel}
+\setinterfacevariable{vfenced}{vfenced}
+\setinterfacevariable{vulgarfraction}{vulgarfraction}
\setinterfacevariable{weak}{zwak}
\setinterfacevariable{wednesday}{woensdag}
\setinterfacevariable{week}{week}
@@ -539,6 +602,7 @@
\setinterfacevariable{wide}{breed}
\setinterfacevariable{width}{breedte}
\setinterfacevariable{word}{woord}
+\setinterfacevariable{words}{words}
\setinterfacevariable{xml}{xml}
\setinterfacevariable{year}{jaar}
\setinterfacevariable{yes}{ja}
@@ -564,8 +628,10 @@
\setinterfaceconstant{artauthoretaldisplay}{artauthoretaldisplay}
\setinterfaceconstant{artauthoretallimit}{artauthoretallimit}
\setinterfaceconstant{artauthoretaltext}{artauthoretaltext}
+\setinterfaceconstant{artoffset}{artoffset}
\setinterfaceconstant{at}{op}
\setinterfaceconstant{author}{auteur}
+\setinterfaceconstant{authorconversion}{authorconversion}
\setinterfaceconstant{authoretaldisplay}{authoretaldisplay}
\setinterfaceconstant{authoretallimit}{authoretallimit}
\setinterfaceconstant{authoretaltext}{authoretaltext}
@@ -596,6 +662,7 @@
\setinterfaceconstant{bidi}{bidi}
\setinterfaceconstant{big}{groot}
\setinterfaceconstant{blank}{blanko}
+\setinterfaceconstant{bleedoffset}{bleedoffset}
\setinterfaceconstant{blockway}{blokwijze}
\setinterfaceconstant{bodyfont}{korps}
\setinterfaceconstant{boffset}{boffset}
@@ -620,6 +687,8 @@
\setinterfaceconstant{calculate}{bereken}
\setinterfaceconstant{category}{categorie}
\setinterfaceconstant{ccommand}{ccommando}
+\setinterfaceconstant{character}{character}
+\setinterfaceconstant{characters}{characters}
\setinterfaceconstant{check}{check}
\setinterfaceconstant{click}{klik}
\setinterfaceconstant{clickin}{klikin}
@@ -634,15 +703,19 @@
\setinterfaceconstant{column}{kolom}
\setinterfaceconstant{columndistance}{kolomafstand}
\setinterfaceconstant{columns}{kolommen}
+\setinterfaceconstant{comma}{comma}
\setinterfaceconstant{command}{commando}
\setinterfaceconstant{commandafter}{nacommando}
\setinterfaceconstant{commandbefore}{voorcommando}
\setinterfaceconstant{commands}{commandos}
+\setinterfaceconstant{comment}{comment}
+\setinterfaceconstant{commentchar}{commentchar}
\setinterfaceconstant{commentoffset}{commentoffset}
\setinterfaceconstant{compact}{compact}
\setinterfaceconstant{component}{component}
\setinterfaceconstant{compoundhyphen}{koppelteken}
\setinterfaceconstant{compress}{comprimeren}
+\setinterfaceconstant{compressseparator}{compressseparator}
\setinterfaceconstant{concerns}{betreft}
\setinterfaceconstant{connector}{connector}
\setinterfaceconstant{continue}{doorgaan}
@@ -654,12 +727,14 @@
\setinterfaceconstant{coupling}{koppeling}
\setinterfaceconstant{couplingway}{koppelwijze}
\setinterfaceconstant{criterium}{criterium}
+\setinterfaceconstant{cropoffset}{cropoffset}
\setinterfaceconstant{cssfile}{cssfile}
\setinterfaceconstant{current}{huidige}
\setinterfaceconstant{cutspace}{snijwit}
\setinterfaceconstant{dash}{streep}
\setinterfaceconstant{dat}{dat}
\setinterfaceconstant{database}{database}
+\setinterfaceconstant{dataset}{dataset}
\setinterfaceconstant{date}{datum}
\setinterfaceconstant{deepnumbercommand}{diepnummercommando}
\setinterfaceconstant{deeptextcommand}{dieptekstcommando}
@@ -671,8 +746,10 @@
\setinterfaceconstant{directory}{directory}
\setinterfaceconstant{display}{scherm}
\setinterfaceconstant{distance}{afstand}
+\setinterfaceconstant{domain}{domain}
\setinterfaceconstant{dot}{punt}
\setinterfaceconstant{doublesided}{dubbelzijdig}
+\setinterfaceconstant{down}{down}
\setinterfaceconstant{dummy}{dummy}
\setinterfaceconstant{dx}{dx}
\setinterfaceconstant{dy}{dy}
@@ -688,6 +765,10 @@
\setinterfaceconstant{equalheight}{equalheight}
\setinterfaceconstant{equalwidth}{equalwidth}
\setinterfaceconstant{escape}{escape}
+\setinterfaceconstant{etaldisplay}{etaldisplay}
+\setinterfaceconstant{etallimit}{etallimit}
+\setinterfaceconstant{etaloption}{etaloption}
+\setinterfaceconstant{etaltext}{etaltext}
\setinterfaceconstant{evenmargin}{evenmarge}
\setinterfaceconstant{exitoffset}{exitoffset}
\setinterfaceconstant{expansion}{expansie}
@@ -697,18 +778,24 @@
\setinterfaceconstant{fallback}{terugval}
\setinterfaceconstant{family}{soort}
\setinterfaceconstant{features}{features}
+\setinterfaceconstant{fences}{fences}
+\setinterfaceconstant{field}{field}
\setinterfaceconstant{fieldbackgroundcolor}{veldachtergrondkleur}
\setinterfaceconstant{fieldframecolor}{veldkaderkleur}
\setinterfaceconstant{fieldlayer}{veldlaag}
\setinterfaceconstant{fieldoffset}{veldoffset}
\setinterfaceconstant{file}{file}
+\setinterfaceconstant{filler}{filler}
\setinterfaceconstant{filtercommand}{filtercommand}
\setinterfaceconstant{finalnamesep}{finalnamesep}
+\setinterfaceconstant{finalpagesep}{finalpagesep}
\setinterfaceconstant{finalpubsep}{finalpubsep}
+\setinterfaceconstant{first}{first}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{eerstepagina}
\setinterfaceconstant{focus}{focus}
\setinterfaceconstant{focusin}{focusin}
+\setinterfaceconstant{focusoffset}{focusoffset}
\setinterfaceconstant{focusout}{focusuit}
\setinterfaceconstant{footer}{voet}
\setinterfaceconstant{footerdistance}{voetafstand}
@@ -717,6 +804,7 @@
\setinterfaceconstant{foregroundcolor}{voorgrondkleur}
\setinterfaceconstant{foregroundstyle}{voorgrondletter}
\setinterfaceconstant{format}{formatteer}
+\setinterfaceconstant{fractions}{breuken}
\setinterfaceconstant{frame}{kader}
\setinterfaceconstant{framecolor}{kaderkleur}
\setinterfaceconstant{framecorner}{kaderhoek}
@@ -725,10 +813,14 @@
\setinterfaceconstant{frameradius}{kaderstraal}
\setinterfaceconstant{frames}{hokjes}
\setinterfaceconstant{from}{van}
+\setinterfaceconstant{functioncolor}{functioncolor}
+\setinterfaceconstant{functionstyle}{functionstyle}
\setinterfaceconstant{get}{haal}
\setinterfaceconstant{global}{globaal}
\setinterfaceconstant{goodies}{goodies}
\setinterfaceconstant{grid}{grid}
+\setinterfaceconstant{group}{group}
+\setinterfaceconstant{groupsuffix}{groupsuffix}
\setinterfaceconstant{hang}{hang}
\setinterfaceconstant{hcompact}{hcomprimeer}
\setinterfaceconstant{headalign}{kopuitlijnen}
@@ -748,19 +840,23 @@
\setinterfaceconstant{hoffset}{hoffset}
\setinterfaceconstant{horoffset}{rugoffset}
\setinterfaceconstant{hyphen}{hyphen}
+\setinterfaceconstant{hyphens}{hyphens}
\setinterfaceconstant{icommand}{icommando}
+\setinterfaceconstant{ignore}{ignore}
\setinterfaceconstant{in}{in}
\setinterfaceconstant{inbetween}{tussen}
\setinterfaceconstant{increment}{verhoog}
\setinterfaceconstant{incrementnumber}{verhoognummer}
\setinterfaceconstant{indenting}{inspringen}
\setinterfaceconstant{indentnext}{springvolgendein}
+\setinterfaceconstant{index}{index}
\setinterfaceconstant{indicator}{aanduiding}
\setinterfaceconstant{initialsep}{initialsep}
\setinterfaceconstant{inner}{binnen}
\setinterfaceconstant{innermargin}{binnenmarge}
\setinterfaceconstant{inputfile}{inputfile}
\setinterfaceconstant{insidesection}{binnensectie}
+\setinterfaceconstant{instance}{instance}
\setinterfaceconstant{intent}{intent}
\setinterfaceconstant{interaction}{interactie}
\setinterfaceconstant{interlinespace}{interlinie}
@@ -769,15 +865,21 @@
\setinterfaceconstant{italicfont}{italicfont}
\setinterfaceconstant{itemalign}{itemuitlijnen}
\setinterfaceconstant{items}{items}
+\setinterfaceconstant{joiners}{joiners}
+\setinterfaceconstant{journalconversion}{journalconversion}
\setinterfaceconstant{juniorsep}{juniorsep}
+\setinterfaceconstant{keeptogether}{keeptogether}
\setinterfaceconstant{ken}{ken}
\setinterfaceconstant{keyexpansion}{sleutelexpansie}
\setinterfaceconstant{keys}{sleutels}
\setinterfaceconstant{keyword}{trefwoord}
\setinterfaceconstant{label}{label}
\setinterfaceconstant{labeloffset}{labeloffset}
+\setinterfaceconstant{language}{language}
+\setinterfaceconstant{last}{last}
\setinterfaceconstant{lastnamesep}{lastnamesep}
\setinterfaceconstant{lastpage}{laatstepagina}
+\setinterfaceconstant{lastpagesep}{lastpagesep}
\setinterfaceconstant{lastpubsep}{lastpubsep}
\setinterfaceconstant{layout}{layout}
\setinterfaceconstant{left}{links}
@@ -798,6 +900,7 @@
\setinterfaceconstant{leftsubsentence}{linkersubzin}
\setinterfaceconstant{lefttext}{linkertekst}
\setinterfaceconstant{leftwidth}{linkerbreedte}
+\setinterfaceconstant{leftwords}{leftwords}
\setinterfaceconstant{less}{minder}
\setinterfaceconstant{level}{niveau}
\setinterfaceconstant{levels}{niveaus}
@@ -854,10 +957,15 @@
\setinterfaceconstant{nbottom}{nonder}
\setinterfaceconstant{nc}{nc}
\setinterfaceconstant{next}{volgende}
+\setinterfaceconstant{nextleft}{nextleft}
+\setinterfaceconstant{nextleftquotation}{nextleftquotation}
+\setinterfaceconstant{nextright}{nextright}
+\setinterfaceconstant{nextrightquotation}{nextrightquotation}
\setinterfaceconstant{nl}{nl}
\setinterfaceconstant{nleft}{nlinks}
\setinterfaceconstant{nlines}{nregels}
\setinterfaceconstant{norm}{norm}
+\setinterfaceconstant{note}{note}
\setinterfaceconstant{nr}{nr}
\setinterfaceconstant{nright}{nrechts}
\setinterfaceconstant{ntop}{nboven}
@@ -888,6 +996,7 @@
\setinterfaceconstant{openaction}{openactie}
\setinterfaceconstant{openpage}{openpagina}
\setinterfaceconstant{openpageaction}{openpaginaactie}
+\setinterfaceconstant{openup}{openup}
\setinterfaceconstant{opticalsize}{opticalsize}
\setinterfaceconstant{option}{optie}
\setinterfaceconstant{order}{volgorde}
@@ -901,8 +1010,10 @@
\setinterfaceconstant{pagecolor}{paginakleur}
\setinterfaceconstant{pagecolormodel}{paginakleurmodel}
\setinterfaceconstant{pagecommand}{paginacommando}
+\setinterfaceconstant{pageconnector}{pageconnector}
\setinterfaceconstant{pageconversion}{pageconversion}
\setinterfaceconstant{pageconversionset}{pageconversionset}
+\setinterfaceconstant{pageleft}{pageleft}
\setinterfaceconstant{pagenumber}{paginanummer}
\setinterfaceconstant{pageprefix}{pageprefix}
\setinterfaceconstant{pageprefixconnector}{pageprefixconnector}
@@ -913,7 +1024,9 @@
\setinterfaceconstant{pageprefixset}{pageprefixset}
\setinterfaceconstant{pageprefixstarter}{pageprefixstarter}
\setinterfaceconstant{pageprefixstopper}{pageprefixstopper}
+\setinterfaceconstant{pageright}{pageright}
\setinterfaceconstant{pagesegments}{pagesegments}
+\setinterfaceconstant{pagesep}{pagesep}
\setinterfaceconstant{pageseparatorset}{pageseparatorset}
\setinterfaceconstant{pageset}{pageset}
\setinterfaceconstant{pagestarter}{pagestarter}
@@ -923,6 +1036,7 @@
\setinterfaceconstant{palet}{palet}
\setinterfaceconstant{paper}{papier}
\setinterfaceconstant{paragraph}{alinea}
+\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{plaatsen}
\setinterfaceconstant{placehead}{plaatskop}
\setinterfaceconstant{placestopper}{plaatsafsluiter}
@@ -943,7 +1057,9 @@
\setinterfaceconstant{printable}{printbaar}
\setinterfaceconstant{process}{proces}
\setinterfaceconstant{profile}{profile}
+\setinterfaceconstant{properties}{properties}
\setinterfaceconstant{pubsep}{pubsep}
+\setinterfaceconstant{quotechar}{quotechar}
\setinterfaceconstant{radius}{straal}
\setinterfaceconstant{random}{willekeur}
\setinterfaceconstant{range}{bereik}
@@ -951,18 +1067,24 @@
\setinterfaceconstant{ref}{ref}
\setinterfaceconstant{refcommand}{refcommand}
\setinterfaceconstant{reference}{referentie}
+\setinterfaceconstant{referencemethod}{referencemethod}
\setinterfaceconstant{referenceprefix}{referenceprefix}
\setinterfaceconstant{referencing}{refereren}
\setinterfaceconstant{region}{gebied}
\setinterfaceconstant{regionin}{gebiedin}
\setinterfaceconstant{regionout}{gebieduit}
+\setinterfaceconstant{register}{register}
\setinterfaceconstant{regularfeatures}{regularfeatures}
\setinterfaceconstant{regularfont}{regularfont}
+\setinterfaceconstant{renderingsetup}{renderingsetup}
\setinterfaceconstant{repeat}{herhaal}
\setinterfaceconstant{reset}{reset}
\setinterfaceconstant{resetnumber}{resetnummer}
\setinterfaceconstant{resolution}{resolutie}
+\setinterfaceconstant{resources}{resources}
+\setinterfaceconstant{reverse}{omgekeerd}
\setinterfaceconstant{right}{rechts}
+\setinterfaceconstant{rightchars}{rightchars}
\setinterfaceconstant{rightcolor}{rechterkleur}
\setinterfaceconstant{rightcompoundhyphen}{rechterkoppelteken}
\setinterfaceconstant{rightedge}{rechterrand}
@@ -980,6 +1102,7 @@
\setinterfaceconstant{rightsubsentence}{rechtersubzin}
\setinterfaceconstant{righttext}{rechtertekst}
\setinterfaceconstant{rightwidth}{rechterbreedte}
+\setinterfaceconstant{rightwords}{rightwords}
\setinterfaceconstant{roffset}{roffset}
\setinterfaceconstant{rotation}{rotatie}
\setinterfaceconstant{rule}{lijn}
@@ -994,6 +1117,7 @@
\setinterfaceconstant{scope}{scope}
\setinterfaceconstant{screen}{raster}
\setinterfaceconstant{section}{sectie}
+\setinterfaceconstant{sectionblock}{sectionblock}
\setinterfaceconstant{sectionconversion}{sectionconversion}
\setinterfaceconstant{sectionconversionset}{sectionconversionset}
\setinterfaceconstant{sectionnumber}{sectienummer}
@@ -1030,6 +1154,7 @@
\setinterfaceconstant{spacebefore}{voorwit}
\setinterfaceconstant{spaceinbetween}{tussenwit}
\setinterfaceconstant{spacing}{spatiering}
+\setinterfaceconstant{specification}{specification}
\setinterfaceconstant{split}{splitsen}
\setinterfaceconstant{splitcolor}{splitskleur}
\setinterfaceconstant{splitmethod}{splitsmethode}
@@ -1054,10 +1179,12 @@
\setinterfaceconstant{surnamefirstnamesep}{surnamefirstnamesep}
\setinterfaceconstant{surnameinitialsep}{surnameinitialsep}
\setinterfaceconstant{surnamesep}{surnamesep}
+\setinterfaceconstant{svgstyle}{svgstyle}
\setinterfaceconstant{sx}{sx}
\setinterfaceconstant{sy}{sy}
\setinterfaceconstant{symalign}{symuitlijnen}
\setinterfaceconstant{symbol}{symbool}
+\setinterfaceconstant{symbolcommand}{symbolcommand}
\setinterfaceconstant{symbolset}{symboolset}
\setinterfaceconstant{symcolor}{symkleur}
\setinterfaceconstant{symstyle}{symletter}
@@ -1067,6 +1194,7 @@
\setinterfaceconstant{synonymstyle}{synoniemletter}
\setinterfaceconstant{tab}{tab}
\setinterfaceconstant{text}{tekst}
+\setinterfaceconstant{textalign}{textalign}
\setinterfaceconstant{textcolor}{tekstkleur}
\setinterfaceconstant{textcommand}{tekstcommando}
\setinterfaceconstant{textdistance}{tekstafstand}
@@ -1098,9 +1226,12 @@
\setinterfaceconstant{topspace}{kopwit}
\setinterfaceconstant{topstate}{bovenstatus}
\setinterfaceconstant{totalnumber}{totalnumber}
+\setinterfaceconstant{translate}{translate}
+\setinterfaceconstant{trimoffset}{trimoffset}
\setinterfaceconstant{type}{type}
\setinterfaceconstant{unit}{eenheid}
\setinterfaceconstant{unknownreference}{onbekendereferentie}
+\setinterfaceconstant{up}{up}
\setinterfaceconstant{urlalternative}{urlvariant}
\setinterfaceconstant{urlspace}{urlspatie}
\setinterfaceconstant{validate}{valideer}
@@ -1110,15 +1241,18 @@
\setinterfaceconstant{vector}{vector}
\setinterfaceconstant{veroffset}{kopoffset}
\setinterfaceconstant{vfil}{vfil}
+\setinterfaceconstant{viewerprefix}{viewerprefix}
\setinterfaceconstant{voffset}{voffset}
\setinterfaceconstant{vonsep}{vonsep}
\setinterfaceconstant{way}{wijze}
\setinterfaceconstant{wfactor}{bfactor}
\setinterfaceconstant{white}{wit}
\setinterfaceconstant{width}{breedte}
+\setinterfaceconstant{words}{words}
\setinterfaceconstant{xfactor}{xfactor}
\setinterfaceconstant{xhtml}{xhtml}
\setinterfaceconstant{xmax}{xmax}
+\setinterfaceconstant{xmlsetup}{xmlsetup}
\setinterfaceconstant{xoffset}{xoffset}
\setinterfaceconstant{xscale}{xschaal}
\setinterfaceconstant{xstep}{xstap}
diff --git a/Master/texmf-dist/tex/context/base/mult-pe.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-pe.mkii
index 32cf32db1c3..a058f9ad362 100644
--- a/Master/texmf-dist/tex/context/base/mult-pe.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-pe.mkii
@@ -3,6 +3,7 @@
% definitions for interface variables for language pe
%
\setinterfacevariable{Addition}{جمع}
+\setinterfacevariable{Alphabetic}{Alphabetic}
\setinterfacevariable{Balloon}{بادکنک}
\setinterfacevariable{Cap}{Cap}
\setinterfacevariable{Capital}{Capital}
@@ -27,6 +28,7 @@
\setinterfacevariable{NextPage}{صÙحه‌بعدی}
\setinterfacevariable{Numbers}{شماره‌ها}
\setinterfacevariable{OpenNamedDocument}{بازکردن‌نوشتار‌ذخیره‌شده}
+\setinterfacevariable{Ordinal}{Ordinal}
\setinterfacevariable{Paragraph}{پاراگراÙ}
\setinterfacevariable{PauseMovie}{ایست‌Ùیلم}
\setinterfacevariable{PauseRendering}{توقÙ‌تعبیر}
@@ -72,19 +74,24 @@
\setinterfacevariable{action}{کنش}
\setinterfacevariable{after}{بعداز}
\setinterfacevariable{all}{همه}
+\setinterfacevariable{alphabetic}{alphabetic}
\setinterfacevariable{always}{همواره}
\setinterfacevariable{and}{and}
\setinterfacevariable{answerarea}{answerarea}
\setinterfacevariable{appendices}{پیوستها}
\setinterfacevariable{appendix}{پیوست}
\setinterfacevariable{april}{آوریل}
+\setinterfacevariable{aside}{aside}
+\setinterfacevariable{atleftmargin}{درحاشیه‌چپ}
\setinterfacevariable{atmargin}{درحاشیه}
\setinterfacevariable{atpage}{درصÙحه}
+\setinterfacevariable{atrightmargin}{درحاشیه‌راست}
\setinterfacevariable{attachment}{attachment}
\setinterfacevariable{august}{آگوست}
\setinterfacevariable{author}{author}
\setinterfacevariable{auto}{خودکار}
\setinterfacevariable{autointro}{پیشگÙتارخودکار}
+\setinterfacevariable{autopunctuation}{autopunctuation}
\setinterfacevariable{back}{پشت}
\setinterfacevariable{background}{پس‌زمینه}
\setinterfacevariable{backmatter}{پس‌مطلب}
@@ -100,6 +107,7 @@
\setinterfacevariable{bigger}{bigger}
\setinterfacevariable{bigpreference}{اولویت‌بزرگ}
\setinterfacevariable{blank}{خالی}
+\setinterfacevariable{block}{block}
\setinterfacevariable{blockquote}{نقل‌بلوک}
\setinterfacevariable{bodymatter}{مطلب‌بدنه}
\setinterfacevariable{bodypart}{قسمت‌بدنه}
@@ -108,28 +116,37 @@
\setinterfacevariable{boldslanted}{خوابیده‌مشکی}
\setinterfacevariable{bookmark}{چوبخط}
\setinterfacevariable{both}{هردو}
+\setinterfacevariable{bothtext}{bothtext}
\setinterfacevariable{bottom}{پایین}
+\setinterfacevariable{box}{box}
\setinterfacevariable{brief}{مختصر}
\setinterfacevariable{broad}{گسترده}
\setinterfacevariable{buffer}{باÙر}
\setinterfacevariable{by}{بوسیله}
\setinterfacevariable{calligraphic}{خوشنویسی}
+\setinterfacevariable{camel}{camel}
\setinterfacevariable{cap}{cap}
\setinterfacevariable{capital}{capital}
\setinterfacevariable{center}{مرکز}
+\setinterfacevariable{centerlast}{centerlast}
\setinterfacevariable{chapter}{Ùصل}
\setinterfacevariable{character}{حرÙ}
\setinterfacevariable{characters}{حرÙها}
+\setinterfacevariable{chemical}{chemical}
+\setinterfacevariable{chemicals}{chemicals}
\setinterfacevariable{chemistry}{chemistry}
\setinterfacevariable{cite}{cite}
\setinterfacevariable{color}{رنگ}
\setinterfacevariable{column}{ستون}
\setinterfacevariable{columns}{ستونها}
+\setinterfacevariable{combination}{combination}
\setinterfacevariable{command}{Ùرمان}
\setinterfacevariable{commands}{Ùرمانها}
\setinterfacevariable{comment}{توضیح}
\setinterfacevariable{component}{مولÙÙ‡}
+\setinterfacevariable{compressseparator}{compressseparator}
\setinterfacevariable{concept}{Ù…Ùهوم}
+\setinterfacevariable{construction}{construction}
\setinterfacevariable{content}{محتوا}
\setinterfacevariable{contents}{محتویات}
\setinterfacevariable{continue}{ادامه}
@@ -138,6 +155,7 @@
\setinterfacevariable{conversion}{تبدیل}
\setinterfacevariable{current}{جاری}
\setinterfacevariable{cutspace}{Ùضای‌برش}
+\setinterfacevariable{dataset}{dataset}
\setinterfacevariable{date}{تاریخ}
\setinterfacevariable{day}{روز}
\setinterfacevariable{december}{دسامبر}
@@ -151,6 +169,7 @@
\setinterfacevariable{down}{down}
\setinterfacevariable{each}{هر}
\setinterfacevariable{edge}{لبه}
+\setinterfacevariable{eight}{eight}
\setinterfacevariable{embed}{embed}
\setinterfacevariable{empty}{تهی}
\setinterfacevariable{end}{end}
@@ -160,6 +179,7 @@
\setinterfacevariable{even}{زوج}
\setinterfacevariable{export}{export}
\setinterfacevariable{external}{خارجی}
+\setinterfacevariable{extremestretch}{extremestretch}
\setinterfacevariable{fact}{fact}
\setinterfacevariable{february}{Ùوریه}
\setinterfacevariable{figure}{Ø´Ú©Ù„}
@@ -195,6 +215,7 @@
\setinterfacevariable{friday}{جمعه}
\setinterfacevariable{frontmatter}{پیش‌مطلب}
\setinterfacevariable{frontpart}{پیش‌قسمت}
+\setinterfacevariable{fullhz}{fullhz}
\setinterfacevariable{global}{سراسری}
\setinterfacevariable{graphic}{گراÙیک}
\setinterfacevariable{graphics}{گراÙیکها}
@@ -223,14 +244,28 @@
\setinterfacevariable{indices}{نمایه‌ها}
\setinterfacevariable{informeel}{informeel}
\setinterfacevariable{inherit}{ارث‌بردن}
+\setinterfacevariable{ininner}{درداخلی}
+\setinterfacevariable{ininneredge}{ininneredge}
+\setinterfacevariable{ininnermargin}{ininnermargin}
\setinterfacevariable{inleft}{درون‌چپ}
+\setinterfacevariable{inleftedge}{درلبه‌چپ}
+\setinterfacevariable{inleftmargin}{درحاشیه‌چپ}
+\setinterfacevariable{inline}{inline}
\setinterfacevariable{inmargin}{درون‌حاشیه}
\setinterfacevariable{inner}{داخلی}
\setinterfacevariable{inneredge}{لبه‌داخلی}
\setinterfacevariable{innermargin}{حاشیه‌داخلی}
+\setinterfacevariable{inother}{inother}
+\setinterfacevariable{inouter}{درخارجی}
+\setinterfacevariable{inouteredge}{inouteredge}
+\setinterfacevariable{inoutermargin}{inoutermargin}
\setinterfacevariable{inright}{درون‌راست}
+\setinterfacevariable{inrightedge}{درلبه‌راست}
+\setinterfacevariable{inrightmargin}{درحاشیه‌راست}
+\setinterfacevariable{integral}{integral}
\setinterfacevariable{interaction}{پانل}
\setinterfacevariable{interactionmenu}{منوی‌پانل}
+\setinterfacevariable{interactive}{interactive}
\setinterfacevariable{intermezzi}{میان‌پرده‌ها}
\setinterfacevariable{intermezzo}{میان‌پرده}
\setinterfacevariable{intext}{درون‌متن}
@@ -245,6 +280,7 @@
\setinterfacevariable{july}{ژولای}
\setinterfacevariable{june}{ژوئن}
\setinterfacevariable{keep}{نگهدار}
+\setinterfacevariable{kerncharacters}{kerncharacters}
\setinterfacevariable{knockout}{knockout}
\setinterfacevariable{label}{برچسب}
\setinterfacevariable{landscape}{صÙحه‌گسترده}
@@ -263,6 +299,7 @@
\setinterfacevariable{legend}{راهنما}
\setinterfacevariable{less}{less}
\setinterfacevariable{lesshyphenation}{شکست‌کلمات‌کمتر}
+\setinterfacevariable{letterspacing}{letterspacing}
\setinterfacevariable{line}{خط}
\setinterfacevariable{linenote}{خط‌نوشت}
\setinterfacevariable{lines}{خطها}
@@ -272,6 +309,7 @@
\setinterfacevariable{logo}{آرم}
\setinterfacevariable{logos}{آرمها}
\setinterfacevariable{lohi}{پابا}
+\setinterfacevariable{long}{long}
\setinterfacevariable{loose}{شل}
\setinterfacevariable{low}{پایین}
\setinterfacevariable{ls}{ls}
@@ -280,6 +318,7 @@
\setinterfacevariable{march}{مارس}
\setinterfacevariable{margin}{حاشیه}
\setinterfacevariable{marginedge}{لبه‌حاشیه}
+\setinterfacevariable{margintext}{متن‌حاشیه}
\setinterfacevariable{margintitle}{عنوان‌حاشیه}
\setinterfacevariable{marking}{نشانه‌گذاری}
\setinterfacevariable{math}{math}
@@ -300,9 +339,11 @@
\setinterfacevariable{minheight}{کمترین‌ارتÙاع}
\setinterfacevariable{minwidth}{کمترین‌عرض}
\setinterfacevariable{mirrored}{منعکس}
+\setinterfacevariable{mixed}{mixed}
\setinterfacevariable{monday}{دوشنبه}
\setinterfacevariable{mono}{مونو}
\setinterfacevariable{monobold}{monobold}
+\setinterfacevariable{mononormal}{mononormal}
\setinterfacevariable{month}{ماه}
\setinterfacevariable{more}{more}
\setinterfacevariable{morehyphenation}{شکست‌کلمات‌بیشتر}
@@ -316,17 +357,23 @@
\setinterfacevariable{nextoddpage}{صÙحه‌Ùردبعدی}
\setinterfacevariable{nextpage}{صÙحه‌بعدی}
\setinterfacevariable{nextsubpage}{زیرصÙحه‌بعدی}
+\setinterfacevariable{nine}{nine}
\setinterfacevariable{no}{نه}
\setinterfacevariable{nocheck}{بدون‌بررسی}
+\setinterfacevariable{nodepth}{nodepth}
\setinterfacevariable{nofit}{بدون‌پرکردن}
\setinterfacevariable{nogrid}{بدون‌توری}
+\setinterfacevariable{noheight}{noheight}
\setinterfacevariable{nohz}{nohz}
+\setinterfacevariable{noline}{noline}
\setinterfacevariable{nomarking}{بدون‌نشانه‌گذاری}
\setinterfacevariable{none}{هیچکدام}
\setinterfacevariable{nonumber}{بدون‌شماره}
+\setinterfacevariable{norepeat}{norepeat}
\setinterfacevariable{normal}{نرمال}
\setinterfacevariable{nospacing}{بدون‌Ùضاگذاری}
\setinterfacevariable{not}{بدون}
+\setinterfacevariable{notation}{notation}
\setinterfacevariable{note}{note}
\setinterfacevariable{nothanging}{بدون‌آویزان‌کردن}
\setinterfacevariable{nothyphenated}{بدون‌شکست}
@@ -340,9 +387,11 @@
\setinterfacevariable{off}{خاموش}
\setinterfacevariable{offset}{Ø¢Ùست}
\setinterfacevariable{old}{قدیمی}
+\setinterfacevariable{oldstyle}{oldstyle}
\setinterfacevariable{on}{روی}
\setinterfacevariable{one}{یک}
\setinterfacevariable{opposite}{مخالÙ}
+\setinterfacevariable{ordinal}{ordinal}
\setinterfacevariable{outer}{خارجی}
\setinterfacevariable{outeredge}{لبه‌خارجی}
\setinterfacevariable{outermargin}{حاشیه‌خارجی}
@@ -411,6 +460,7 @@
\setinterfacevariable{samepage}{همان‌صÙحه}
\setinterfacevariable{sans}{سانز}
\setinterfacevariable{sansbold}{مشکی‌سانز}
+\setinterfacevariable{sansnormal}{sansnormal}
\setinterfacevariable{sansserif}{سانزسریÙ}
\setinterfacevariable{saturday}{شنبه}
\setinterfacevariable{screen}{پرده}
@@ -421,12 +471,19 @@
\setinterfacevariable{selectfont}{selectfont}
\setinterfacevariable{september}{سپتامبر}
\setinterfacevariable{serif}{سریÙ}
+\setinterfacevariable{serifbold}{serifbold}
+\setinterfacevariable{serifnormal}{serifnormal}
\setinterfacevariable{serried}{تنگ‌هم}
\setinterfacevariable{setups}{setups}
+\setinterfacevariable{seven}{seven}
\setinterfacevariable{sheet}{ورقه}
+\setinterfacevariable{shiftdown}{shiftdown}
+\setinterfacevariable{shiftup}{shiftup}
\setinterfacevariable{short}{short}
\setinterfacevariable{simplefonts}{simplefonts}
+\setinterfacevariable{simplelist}{simplelist}
\setinterfacevariable{singlesided}{یک‌رو}
+\setinterfacevariable{six}{six}
\setinterfacevariable{slanted}{خوابیده}
\setinterfacevariable{slantedbold}{مشکی‌خوابیده}
\setinterfacevariable{small}{Ú©ÙˆÚ†Ú©}
@@ -444,6 +501,7 @@
\setinterfacevariable{smalltype}{تایپ‌کوچک}
\setinterfacevariable{somewhere}{جایی}
\setinterfacevariable{sorted}{مرتب}
+\setinterfacevariable{sorting}{sorting}
\setinterfacevariable{space}{Ùضا}
\setinterfacevariable{spacing}{Ùضاگذاری}
\setinterfacevariable{speech}{سخنرانی}
@@ -456,6 +514,7 @@
\setinterfacevariable{stop}{پایان}
\setinterfacevariable{stopper}{ایست}
\setinterfacevariable{stretch}{بکش}
+\setinterfacevariable{stretched}{stretched}
\setinterfacevariable{strict}{اکید}
\setinterfacevariable{strong}{محکم}
\setinterfacevariable{strut}{بست}
@@ -489,6 +548,7 @@
\setinterfacevariable{sym}{نم}
\setinterfacevariable{symbol}{نماد}
\setinterfacevariable{synchronize}{تطابق}
+\setinterfacevariable{synonym}{synonym}
\setinterfacevariable{system}{سیستم}
\setinterfacevariable{table}{جدول}
\setinterfacevariable{tablehead}{سرجدول}
@@ -519,6 +579,7 @@
\setinterfacevariable{underbars}{میله‌‌های‌زیر}
\setinterfacevariable{understrike}{understrike}
\setinterfacevariable{understrikes}{understrikes}
+\setinterfacevariable{unframed}{unframed}
\setinterfacevariable{unit}{واحد}
\setinterfacevariable{units}{واحدها}
\setinterfacevariable{unknown}{ناشناس}
@@ -531,6 +592,8 @@
\setinterfacevariable{very}{خیلی}
\setinterfacevariable{verystrict}{خیلی‌سختگیر}
\setinterfacevariable{verytolerant}{خیلی‌بردبار}
+\setinterfacevariable{vfenced}{vfenced}
+\setinterfacevariable{vulgarfraction}{vulgarfraction}
\setinterfacevariable{weak}{Ù‡Ùته}
\setinterfacevariable{wednesday}{چهارشنبه}
\setinterfacevariable{week}{Ù‡Ùته}
@@ -539,6 +602,7 @@
\setinterfacevariable{wide}{گسترده}
\setinterfacevariable{width}{عرض}
\setinterfacevariable{word}{word}
+\setinterfacevariable{words}{words}
\setinterfacevariable{xml}{xml}
\setinterfacevariable{year}{سال}
\setinterfacevariable{yes}{بله}
@@ -564,8 +628,10 @@
\setinterfaceconstant{artauthoretaldisplay}{artauthoretaldisplay}
\setinterfaceconstant{artauthoretallimit}{artauthoretallimit}
\setinterfaceconstant{artauthoretaltext}{artauthoretaltext}
+\setinterfaceconstant{artoffset}{artoffset}
\setinterfaceconstant{at}{در}
\setinterfaceconstant{author}{نویسنده}
+\setinterfaceconstant{authorconversion}{authorconversion}
\setinterfaceconstant{authoretaldisplay}{authoretaldisplay}
\setinterfaceconstant{authoretallimit}{authoretallimit}
\setinterfaceconstant{authoretaltext}{authoretaltext}
@@ -596,6 +662,7 @@
\setinterfaceconstant{bidi}{bidi}
\setinterfaceconstant{big}{بزرگ}
\setinterfaceconstant{blank}{خالی}
+\setinterfaceconstant{bleedoffset}{bleedoffset}
\setinterfaceconstant{blockway}{راه‌بلوک}
\setinterfaceconstant{bodyfont}{قلم‌بدنه}
\setinterfaceconstant{boffset}{boffset}
@@ -620,6 +687,8 @@
\setinterfaceconstant{calculate}{محاسبه}
\setinterfaceconstant{category}{category}
\setinterfaceconstant{ccommand}{Ùرمان}
+\setinterfaceconstant{character}{character}
+\setinterfaceconstant{characters}{characters}
\setinterfaceconstant{check}{check}
\setinterfaceconstant{click}{Ùشردن}
\setinterfaceconstant{clickin}{Ùشردن‌داخل}
@@ -634,15 +703,19 @@
\setinterfaceconstant{column}{ستون}
\setinterfaceconstant{columndistance}{Ùاصله‌ستون}
\setinterfaceconstant{columns}{ستونها}
+\setinterfaceconstant{comma}{comma}
\setinterfaceconstant{command}{Ùرمان}
\setinterfaceconstant{commandafter}{Ùرمان‌بعداز}
\setinterfaceconstant{commandbefore}{Ùرمان‌قبل‌از}
\setinterfaceconstant{commands}{Ùرمانها}
+\setinterfaceconstant{comment}{comment}
+\setinterfaceconstant{commentchar}{commentchar}
\setinterfaceconstant{commentoffset}{commentoffset}
\setinterfaceconstant{compact}{compact}
\setinterfaceconstant{component}{مولÙÙ‡}
\setinterfaceconstant{compoundhyphen}{compoundhyphen}
\setinterfaceconstant{compress}{Ùشردن}
+\setinterfaceconstant{compressseparator}{compressseparator}
\setinterfaceconstant{concerns}{concerns}
\setinterfaceconstant{connector}{connector}
\setinterfaceconstant{continue}{ادامه}
@@ -654,12 +727,14 @@
\setinterfaceconstant{coupling}{تزویج}
\setinterfaceconstant{couplingway}{روش‌تزویج}
\setinterfaceconstant{criterium}{criterium}
+\setinterfaceconstant{cropoffset}{cropoffset}
\setinterfaceconstant{cssfile}{cssfile}
\setinterfaceconstant{current}{جاری}
\setinterfaceconstant{cutspace}{Ùضای‌برش}
\setinterfaceconstant{dash}{دش}
\setinterfaceconstant{dat}{dat}
\setinterfaceconstant{database}{database}
+\setinterfaceconstant{dataset}{dataset}
\setinterfaceconstant{date}{تاریخ}
\setinterfaceconstant{deepnumbercommand}{Ùرمان‌شماره‌عمیق}
\setinterfaceconstant{deeptextcommand}{Ùرمان‌متن‌عمیق}
@@ -671,8 +746,10 @@
\setinterfaceconstant{directory}{پوشه}
\setinterfaceconstant{display}{نمایش}
\setinterfaceconstant{distance}{Ùاصله}
+\setinterfaceconstant{domain}{domain}
\setinterfaceconstant{dot}{نقطه}
\setinterfaceconstant{doublesided}{دورو}
+\setinterfaceconstant{down}{down}
\setinterfaceconstant{dummy}{مصنوعی}
\setinterfaceconstant{dx}{dx}
\setinterfaceconstant{dy}{dy}
@@ -688,6 +765,10 @@
\setinterfaceconstant{equalheight}{ارتÙاع‌یکسان}
\setinterfaceconstant{equalwidth}{عرض‌یکسان}
\setinterfaceconstant{escape}{Ùرار}
+\setinterfaceconstant{etaldisplay}{etaldisplay}
+\setinterfaceconstant{etallimit}{etallimit}
+\setinterfaceconstant{etaloption}{etaloption}
+\setinterfaceconstant{etaltext}{etaltext}
\setinterfaceconstant{evenmargin}{حاشیه‌زوج}
\setinterfaceconstant{exitoffset}{exitoffset}
\setinterfaceconstant{expansion}{گسترش}
@@ -697,18 +778,24 @@
\setinterfaceconstant{fallback}{عقب‌ریختن}
\setinterfaceconstant{family}{خانواده}
\setinterfaceconstant{features}{features}
+\setinterfaceconstant{fences}{fences}
+\setinterfaceconstant{field}{field}
\setinterfaceconstant{fieldbackgroundcolor}{رنگ‌پس‌زمینه‌میدان}
\setinterfaceconstant{fieldframecolor}{رنگ‌قالب‌میدان}
\setinterfaceconstant{fieldlayer}{لایه‌میدان}
\setinterfaceconstant{fieldoffset}{Ø¢Ùست‌میدان}
\setinterfaceconstant{file}{پرونده}
+\setinterfaceconstant{filler}{filler}
\setinterfaceconstant{filtercommand}{filtercommand}
\setinterfaceconstant{finalnamesep}{finalnamesep}
+\setinterfaceconstant{finalpagesep}{finalpagesep}
\setinterfaceconstant{finalpubsep}{finalpubsep}
+\setinterfaceconstant{first}{first}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{صÙحه‌اول}
\setinterfaceconstant{focus}{تمرکز}
\setinterfaceconstant{focusin}{تمرکزدرون}
+\setinterfaceconstant{focusoffset}{focusoffset}
\setinterfaceconstant{focusout}{تمرکزبیرون}
\setinterfaceconstant{footer}{ته‌برگ}
\setinterfaceconstant{footerdistance}{Ùاصله‌ته‌برگ}
@@ -717,6 +804,7 @@
\setinterfaceconstant{foregroundcolor}{رنگ‌پیش‌زمینه}
\setinterfaceconstant{foregroundstyle}{سبک‌پیش‌زمینه}
\setinterfaceconstant{format}{شمایل}
+\setinterfaceconstant{fractions}{fractions}
\setinterfaceconstant{frame}{قالب}
\setinterfaceconstant{framecolor}{رنگ‌قالب}
\setinterfaceconstant{framecorner}{گوشه‌قالب}
@@ -725,10 +813,14 @@
\setinterfaceconstant{frameradius}{شعاع‌قالب}
\setinterfaceconstant{frames}{قالبها}
\setinterfaceconstant{from}{از}
+\setinterfaceconstant{functioncolor}{functioncolor}
+\setinterfaceconstant{functionstyle}{functionstyle}
\setinterfaceconstant{get}{بگیر}
\setinterfaceconstant{global}{سراسری}
\setinterfaceconstant{goodies}{goodies}
\setinterfaceconstant{grid}{توری}
+\setinterfaceconstant{group}{group}
+\setinterfaceconstant{groupsuffix}{groupsuffix}
\setinterfaceconstant{hang}{بیاویز}
\setinterfaceconstant{hcompact}{hcompact}
\setinterfaceconstant{headalign}{headalign}
@@ -748,19 +840,23 @@
\setinterfaceconstant{hoffset}{Ø¢Ùست‌ا}
\setinterfaceconstant{horoffset}{Ø¢Ùست‌اÙÙ‚}
\setinterfaceconstant{hyphen}{شکستن}
+\setinterfaceconstant{hyphens}{hyphens}
\setinterfaceconstant{icommand}{icommand}
+\setinterfaceconstant{ignore}{ignore}
\setinterfaceconstant{in}{درون}
\setinterfaceconstant{inbetween}{دربین}
\setinterfaceconstant{increment}{اÙزایش}
\setinterfaceconstant{incrementnumber}{شماره‌اÙزایش}
\setinterfaceconstant{indenting}{تورÙتگی}
\setinterfaceconstant{indentnext}{متن‌تورÙته}
+\setinterfaceconstant{index}{index}
\setinterfaceconstant{indicator}{اندیکاتور}
\setinterfaceconstant{initialsep}{initialsep}
\setinterfaceconstant{inner}{داخلی}
\setinterfaceconstant{innermargin}{حاشیه‌داخلی}
\setinterfaceconstant{inputfile}{پرونده‌ورودی}
\setinterfaceconstant{insidesection}{insidesection}
+\setinterfaceconstant{instance}{instance}
\setinterfaceconstant{intent}{intent}
\setinterfaceconstant{interaction}{پانل}
\setinterfaceconstant{interlinespace}{Ùضای‌بین‌خط}
@@ -769,15 +865,21 @@
\setinterfaceconstant{italicfont}{italicfont}
\setinterfaceconstant{itemalign}{تنظیم‌آیتم}
\setinterfaceconstant{items}{آیتمها}
+\setinterfaceconstant{joiners}{joiners}
+\setinterfaceconstant{journalconversion}{journalconversion}
\setinterfaceconstant{juniorsep}{juniorsep}
+\setinterfaceconstant{keeptogether}{keeptogether}
\setinterfaceconstant{ken}{ken}
\setinterfaceconstant{keyexpansion}{گسترش‌کلید}
\setinterfaceconstant{keys}{keys}
\setinterfaceconstant{keyword}{کلید‌واژه}
\setinterfaceconstant{label}{برچسب}
\setinterfaceconstant{labeloffset}{labeloffset}
+\setinterfaceconstant{language}{language}
+\setinterfaceconstant{last}{last}
\setinterfaceconstant{lastnamesep}{lastnamesep}
\setinterfaceconstant{lastpage}{صÙحه‌آخر}
+\setinterfaceconstant{lastpagesep}{lastpagesep}
\setinterfaceconstant{lastpubsep}{lastpubsep}
\setinterfaceconstant{layout}{layout}
\setinterfaceconstant{left}{Ú†Ù¾}
@@ -798,6 +900,7 @@
\setinterfaceconstant{leftsubsentence}{زیرجمله‌چپ}
\setinterfaceconstant{lefttext}{متن‌چپ}
\setinterfaceconstant{leftwidth}{عرض‌خط}
+\setinterfaceconstant{leftwords}{leftwords}
\setinterfaceconstant{less}{less}
\setinterfaceconstant{level}{مرحله}
\setinterfaceconstant{levels}{مرحله‌ها}
@@ -854,10 +957,15 @@
\setinterfaceconstant{nbottom}{nbottom}
\setinterfaceconstant{nc}{nc}
\setinterfaceconstant{next}{بعدی}
+\setinterfaceconstant{nextleft}{nextleft}
+\setinterfaceconstant{nextleftquotation}{nextleftquotation}
+\setinterfaceconstant{nextright}{nextright}
+\setinterfaceconstant{nextrightquotation}{nextrightquotation}
\setinterfaceconstant{nl}{nl}
\setinterfaceconstant{nleft}{nleft}
\setinterfaceconstant{nlines}{nlines}
\setinterfaceconstant{norm}{norm}
+\setinterfaceconstant{note}{note}
\setinterfaceconstant{nr}{nr}
\setinterfaceconstant{nright}{nright}
\setinterfaceconstant{ntop}{ntop}
@@ -888,6 +996,7 @@
\setinterfaceconstant{openaction}{عمل‌باز}
\setinterfaceconstant{openpage}{openpage}
\setinterfaceconstant{openpageaction}{عمل‌صÙحه‌باز}
+\setinterfaceconstant{openup}{openup}
\setinterfaceconstant{opticalsize}{opticalsize}
\setinterfaceconstant{option}{گزینه}
\setinterfaceconstant{order}{order}
@@ -901,8 +1010,10 @@
\setinterfaceconstant{pagecolor}{رنگ‌صÙحه}
\setinterfaceconstant{pagecolormodel}{pagecolormodel}
\setinterfaceconstant{pagecommand}{Ùرمان‌صÙحه}
+\setinterfaceconstant{pageconnector}{pageconnector}
\setinterfaceconstant{pageconversion}{pageconversion}
\setinterfaceconstant{pageconversionset}{pageconversionset}
+\setinterfaceconstant{pageleft}{pageleft}
\setinterfaceconstant{pagenumber}{شماره‌صÙحه}
\setinterfaceconstant{pageprefix}{pageprefix}
\setinterfaceconstant{pageprefixconnector}{pageprefixconnector}
@@ -913,7 +1024,9 @@
\setinterfaceconstant{pageprefixset}{pageprefixset}
\setinterfaceconstant{pageprefixstarter}{pageprefixstarter}
\setinterfaceconstant{pageprefixstopper}{pageprefixstopper}
+\setinterfaceconstant{pageright}{pageright}
\setinterfaceconstant{pagesegments}{pagesegments}
+\setinterfaceconstant{pagesep}{pagesep}
\setinterfaceconstant{pageseparatorset}{pageseparatorset}
\setinterfaceconstant{pageset}{pageset}
\setinterfaceconstant{pagestarter}{pagestarter}
@@ -923,6 +1036,7 @@
\setinterfaceconstant{palet}{لوح}
\setinterfaceconstant{paper}{برگ}
\setinterfaceconstant{paragraph}{پاراگراÙ}
+\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{بگذار}
\setinterfaceconstant{placehead}{بگذارسر}
\setinterfaceconstant{placestopper}{بگذارایست}
@@ -943,7 +1057,9 @@
\setinterfaceconstant{printable}{قابل‌چاپ}
\setinterfaceconstant{process}{پردازش}
\setinterfaceconstant{profile}{profile}
+\setinterfaceconstant{properties}{properties}
\setinterfaceconstant{pubsep}{pubsep}
+\setinterfaceconstant{quotechar}{quotechar}
\setinterfaceconstant{radius}{شعاع}
\setinterfaceconstant{random}{تصادÙÛŒ}
\setinterfaceconstant{range}{range}
@@ -951,18 +1067,24 @@
\setinterfaceconstant{ref}{رج}
\setinterfaceconstant{refcommand}{refcommand}
\setinterfaceconstant{reference}{مرجع}
+\setinterfaceconstant{referencemethod}{referencemethod}
\setinterfaceconstant{referenceprefix}{referenceprefix}
\setinterfaceconstant{referencing}{مراجعه}
\setinterfaceconstant{region}{region}
\setinterfaceconstant{regionin}{ناحیه‌درون}
\setinterfaceconstant{regionout}{ناحیه‌بیرون}
+\setinterfaceconstant{register}{register}
\setinterfaceconstant{regularfeatures}{regularfeatures}
\setinterfaceconstant{regularfont}{regularfont}
+\setinterfaceconstant{renderingsetup}{renderingsetup}
\setinterfaceconstant{repeat}{تکرار}
\setinterfaceconstant{reset}{بازنشانی}
\setinterfaceconstant{resetnumber}{بازنشانی‌شماره}
\setinterfaceconstant{resolution}{Ú©ÛŒÙیت}
+\setinterfaceconstant{resources}{resources}
+\setinterfaceconstant{reverse}{برعکس}
\setinterfaceconstant{right}{راست}
+\setinterfaceconstant{rightchars}{rightchars}
\setinterfaceconstant{rightcolor}{رنگ‌راست}
\setinterfaceconstant{rightcompoundhyphen}{rightcompoundhyphen}
\setinterfaceconstant{rightedge}{لبه‌راست}
@@ -980,6 +1102,7 @@
\setinterfaceconstant{rightsubsentence}{زیرجمله‌راست}
\setinterfaceconstant{righttext}{متن‌راست}
\setinterfaceconstant{rightwidth}{عرض‌راست}
+\setinterfaceconstant{rightwords}{rightwords}
\setinterfaceconstant{roffset}{roffset}
\setinterfaceconstant{rotation}{دوران}
\setinterfaceconstant{rule}{خط}
@@ -994,6 +1117,7 @@
\setinterfaceconstant{scope}{طرح}
\setinterfaceconstant{screen}{پرده}
\setinterfaceconstant{section}{بخش}
+\setinterfaceconstant{sectionblock}{sectionblock}
\setinterfaceconstant{sectionconversion}{sectionconversion}
\setinterfaceconstant{sectionconversionset}{sectionconversionset}
\setinterfaceconstant{sectionnumber}{شماره‌بخش}
@@ -1030,6 +1154,7 @@
\setinterfaceconstant{spacebefore}{Ùضا‌قبل‌از}
\setinterfaceconstant{spaceinbetween}{Ùضا‌دربین}
\setinterfaceconstant{spacing}{Ùضاگذاری}
+\setinterfaceconstant{specification}{specification}
\setinterfaceconstant{split}{شکاÙتن}
\setinterfaceconstant{splitcolor}{شکاÙتن‌رنگ}
\setinterfaceconstant{splitmethod}{روش‌شکاÙتن}
@@ -1054,10 +1179,12 @@
\setinterfaceconstant{surnamefirstnamesep}{surnamefirstnamesep}
\setinterfaceconstant{surnameinitialsep}{surnameinitialsep}
\setinterfaceconstant{surnamesep}{surnamesep}
+\setinterfaceconstant{svgstyle}{svgstyle}
\setinterfaceconstant{sx}{sx}
\setinterfaceconstant{sy}{sy}
\setinterfaceconstant{symalign}{تنظیم‌نماد}
\setinterfaceconstant{symbol}{نماد}
+\setinterfaceconstant{symbolcommand}{symbolcommand}
\setinterfaceconstant{symbolset}{مجموعه‌نماد}
\setinterfaceconstant{symcolor}{رنگ‌نماد}
\setinterfaceconstant{symstyle}{سبک‌نماد}
@@ -1067,6 +1194,7 @@
\setinterfaceconstant{synonymstyle}{سبک‌مترادÙ}
\setinterfaceconstant{tab}{تب}
\setinterfaceconstant{text}{متن}
+\setinterfaceconstant{textalign}{textalign}
\setinterfaceconstant{textcolor}{رنگ‌متن}
\setinterfaceconstant{textcommand}{Ùرمان‌متن}
\setinterfaceconstant{textdistance}{Ùاصله‌متن}
@@ -1098,9 +1226,12 @@
\setinterfaceconstant{topspace}{Ùضای‌بالا}
\setinterfaceconstant{topstate}{وضعیت‌بالا}
\setinterfaceconstant{totalnumber}{totalnumber}
+\setinterfaceconstant{translate}{translate}
+\setinterfaceconstant{trimoffset}{trimoffset}
\setinterfaceconstant{type}{تایپ}
\setinterfaceconstant{unit}{واحد}
\setinterfaceconstant{unknownreference}{مرجع‌ناشناس}
+\setinterfaceconstant{up}{up}
\setinterfaceconstant{urlalternative}{urlalternative}
\setinterfaceconstant{urlspace}{urlspace}
\setinterfaceconstant{validate}{تاییداعتبار}
@@ -1110,15 +1241,18 @@
\setinterfaceconstant{vector}{vector}
\setinterfaceconstant{veroffset}{Ø¢Ùست‌عم}
\setinterfaceconstant{vfil}{vfil}
+\setinterfaceconstant{viewerprefix}{viewerprefix}
\setinterfaceconstant{voffset}{Ø¢Ùست‌ع}
\setinterfaceconstant{vonsep}{vonsep}
\setinterfaceconstant{way}{راه}
\setinterfaceconstant{wfactor}{wfactor}
\setinterfaceconstant{white}{سÙید}
\setinterfaceconstant{width}{عرض}
+\setinterfaceconstant{words}{words}
\setinterfaceconstant{xfactor}{Ùاکتورایکس}
\setinterfaceconstant{xhtml}{xhtml}
\setinterfaceconstant{xmax}{xmax}
+\setinterfaceconstant{xmlsetup}{xmlsetup}
\setinterfaceconstant{xoffset}{Ø¢Ùست‌ایکس}
\setinterfaceconstant{xscale}{مقیاس‌ایکس}
\setinterfaceconstant{xstep}{گام‌ایکس}
diff --git a/Master/texmf-dist/tex/context/base/mult-ro.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-ro.mkii
index a5d90033f03..062230226d0 100644
--- a/Master/texmf-dist/tex/context/base/mult-ro.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-ro.mkii
@@ -3,6 +3,7 @@
% definitions for interface variables for language ro
%
\setinterfacevariable{Addition}{Adaugare}
+\setinterfacevariable{Alphabetic}{Alphabetic}
\setinterfacevariable{Balloon}{Balon}
\setinterfacevariable{Cap}{Cap}
\setinterfacevariable{Capital}{Majuscula}
@@ -27,6 +28,7 @@
\setinterfacevariable{NextPage}{PaginaUrmatoare}
\setinterfacevariable{Numbers}{Numere}
\setinterfacevariable{OpenNamedDocument}{OpenNamedDocument}
+\setinterfacevariable{Ordinal}{Ordinal}
\setinterfacevariable{Paragraph}{Paragraf}
\setinterfacevariable{PauseMovie}{PauzaFilm}
\setinterfacevariable{PauseRendering}{PauseRendering}
@@ -72,19 +74,24 @@
\setinterfacevariable{action}{actiune}
\setinterfacevariable{after}{dupa}
\setinterfacevariable{all}{tot}
+\setinterfacevariable{alphabetic}{alphabetic}
\setinterfacevariable{always}{totdeauna}
\setinterfacevariable{and}{and}
\setinterfacevariable{answerarea}{answerarea}
\setinterfacevariable{appendices}{apendixuri}
\setinterfacevariable{appendix}{apendix}
\setinterfacevariable{april}{aprilie}
+\setinterfacevariable{aside}{aside}
+\setinterfacevariable{atleftmargin}{atleftmargin}
\setinterfacevariable{atmargin}{lamargine}
\setinterfacevariable{atpage}{lapagina}
+\setinterfacevariable{atrightmargin}{atrightmargin}
\setinterfacevariable{attachment}{attachment}
\setinterfacevariable{august}{august}
\setinterfacevariable{author}{autor}
\setinterfacevariable{auto}{auto}
\setinterfacevariable{autointro}{autointro}
+\setinterfacevariable{autopunctuation}{autopunctuation}
\setinterfacevariable{back}{inapot}
\setinterfacevariable{background}{fundal}
\setinterfacevariable{backmatter}{epilogul}
@@ -100,6 +107,7 @@
\setinterfacevariable{bigger}{bigger}
\setinterfacevariable{bigpreference}{preferintamare}
\setinterfacevariable{blank}{blank}
+\setinterfacevariable{block}{block}
\setinterfacevariable{blockquote}{blockquote}
\setinterfacevariable{bodymatter}{principalul}
\setinterfacevariable{bodypart}{principal}
@@ -108,28 +116,37 @@
\setinterfacevariable{boldslanted}{aldininclinat}
\setinterfacevariable{bookmark}{semncarte}
\setinterfacevariable{both}{ambele}
+\setinterfacevariable{bothtext}{bothtext}
\setinterfacevariable{bottom}{subsol}
+\setinterfacevariable{box}{box}
\setinterfacevariable{brief}{brief}
\setinterfacevariable{broad}{broad}
\setinterfacevariable{buffer}{buffer}
\setinterfacevariable{by}{de}
\setinterfacevariable{calligraphic}{caligrafic}
+\setinterfacevariable{camel}{camel}
\setinterfacevariable{cap}{cap}
\setinterfacevariable{capital}{majuscula}
\setinterfacevariable{center}{center}
+\setinterfacevariable{centerlast}{centerlast}
\setinterfacevariable{chapter}{capitol}
\setinterfacevariable{character}{caracter}
\setinterfacevariable{characters}{caractere}
+\setinterfacevariable{chemical}{chemical}
+\setinterfacevariable{chemicals}{chemicals}
\setinterfacevariable{chemistry}{chemistry}
\setinterfacevariable{cite}{cite}
\setinterfacevariable{color}{culoare}
\setinterfacevariable{column}{coloana}
\setinterfacevariable{columns}{coloane}
+\setinterfacevariable{combination}{combination}
\setinterfacevariable{command}{comanda}
\setinterfacevariable{commands}{comenzi}
\setinterfacevariable{comment}{comentariu}
\setinterfacevariable{component}{componenta}
+\setinterfacevariable{compressseparator}{compressseparator}
\setinterfacevariable{concept}{concept}
+\setinterfacevariable{construction}{construction}
\setinterfacevariable{content}{cuprins}
\setinterfacevariable{contents}{cuprinsuri}
\setinterfacevariable{continue}{continuu}
@@ -138,6 +155,7 @@
\setinterfacevariable{conversion}{conversie}
\setinterfacevariable{current}{curent}
\setinterfacevariable{cutspace}{cutspace}
+\setinterfacevariable{dataset}{dataset}
\setinterfacevariable{date}{data}
\setinterfacevariable{day}{zi}
\setinterfacevariable{december}{decembrie}
@@ -151,6 +169,7 @@
\setinterfacevariable{down}{down}
\setinterfacevariable{each}{fiecare}
\setinterfacevariable{edge}{bordura}
+\setinterfacevariable{eight}{eight}
\setinterfacevariable{embed}{embed}
\setinterfacevariable{empty}{gol}
\setinterfacevariable{end}{end}
@@ -160,6 +179,7 @@
\setinterfacevariable{even}{par}
\setinterfacevariable{export}{export}
\setinterfacevariable{external}{extern}
+\setinterfacevariable{extremestretch}{extremestretch}
\setinterfacevariable{fact}{fapt}
\setinterfacevariable{february}{februarie}
\setinterfacevariable{figure}{figura}
@@ -195,6 +215,7 @@
\setinterfacevariable{friday}{vineri}
\setinterfacevariable{frontmatter}{prologul}
\setinterfacevariable{frontpart}{prolog}
+\setinterfacevariable{fullhz}{fullhz}
\setinterfacevariable{global}{global}
\setinterfacevariable{graphic}{graficul}
\setinterfacevariable{graphics}{graficele}
@@ -223,14 +244,28 @@
\setinterfacevariable{indices}{indexuri}
\setinterfacevariable{informeel}{informeel}
\setinterfacevariable{inherit}{inherit}
+\setinterfacevariable{ininner}{ininner}
+\setinterfacevariable{ininneredge}{ininneredge}
+\setinterfacevariable{ininnermargin}{ininnermargin}
\setinterfacevariable{inleft}{instanga}
+\setinterfacevariable{inleftedge}{inparteastanga}
+\setinterfacevariable{inleftmargin}{inmargineastanga}
+\setinterfacevariable{inline}{inline}
\setinterfacevariable{inmargin}{inmargine}
\setinterfacevariable{inner}{intern}
\setinterfacevariable{inneredge}{inneredge}
\setinterfacevariable{innermargin}{innermargin}
+\setinterfacevariable{inother}{inother}
+\setinterfacevariable{inouter}{inouter}
+\setinterfacevariable{inouteredge}{inouteredge}
+\setinterfacevariable{inoutermargin}{inoutermargin}
\setinterfacevariable{inright}{indreapta}
+\setinterfacevariable{inrightedge}{inparteadreapta}
+\setinterfacevariable{inrightmargin}{inmargineadreapta}
+\setinterfacevariable{integral}{integral}
\setinterfacevariable{interaction}{interactiune}
\setinterfacevariable{interactionmenu}{meniuinteractiune}
+\setinterfacevariable{interactive}{interactive}
\setinterfacevariable{intermezzi}{intermezzi}
\setinterfacevariable{intermezzo}{intermezzo}
\setinterfacevariable{intext}{intext}
@@ -245,6 +280,7 @@
\setinterfacevariable{july}{iulie}
\setinterfacevariable{june}{iunie}
\setinterfacevariable{keep}{mentine}
+\setinterfacevariable{kerncharacters}{kerncharacters}
\setinterfacevariable{knockout}{knockout}
\setinterfacevariable{label}{eticheta}
\setinterfacevariable{landscape}{vedere}
@@ -263,6 +299,7 @@
\setinterfacevariable{legend}{legenda}
\setinterfacevariable{less}{less}
\setinterfacevariable{lesshyphenation}{lesshyphenation}
+\setinterfacevariable{letterspacing}{letterspacing}
\setinterfacevariable{line}{linie}
\setinterfacevariable{linenote}{linenote}
\setinterfacevariable{lines}{linii}
@@ -272,6 +309,7 @@
\setinterfacevariable{logo}{logo}
\setinterfacevariable{logos}{logos}
\setinterfacevariable{lohi}{lohi}
+\setinterfacevariable{long}{long}
\setinterfacevariable{loose}{larg}
\setinterfacevariable{low}{jos}
\setinterfacevariable{ls}{ls}
@@ -280,6 +318,7 @@
\setinterfacevariable{march}{martie}
\setinterfacevariable{margin}{margine}
\setinterfacevariable{marginedge}{marginebordura}
+\setinterfacevariable{margintext}{textmarginal}
\setinterfacevariable{margintitle}{titlumarginal}
\setinterfacevariable{marking}{marcaje}
\setinterfacevariable{math}{math}
@@ -300,9 +339,11 @@
\setinterfacevariable{minheight}{inaltimeminima}
\setinterfacevariable{minwidth}{latimeminima}
\setinterfacevariable{mirrored}{oglindit}
+\setinterfacevariable{mixed}{mixed}
\setinterfacevariable{monday}{luni}
\setinterfacevariable{mono}{mono}
\setinterfacevariable{monobold}{monoaldin}
+\setinterfacevariable{mononormal}{mononormal}
\setinterfacevariable{month}{luna}
\setinterfacevariable{more}{more}
\setinterfacevariable{morehyphenation}{morehyphenation}
@@ -316,17 +357,23 @@
\setinterfacevariable{nextoddpage}{paginaimparaurmatoarea}
\setinterfacevariable{nextpage}{paginaurmatoare}
\setinterfacevariable{nextsubpage}{urmatoareasubpagina}
+\setinterfacevariable{nine}{nine}
\setinterfacevariable{no}{nu}
\setinterfacevariable{nocheck}{nocheck}
+\setinterfacevariable{nodepth}{nodepth}
\setinterfacevariable{nofit}{nofit}
\setinterfacevariable{nogrid}{nogrid}
+\setinterfacevariable{noheight}{noheight}
\setinterfacevariable{nohz}{nohz}
+\setinterfacevariable{noline}{noline}
\setinterfacevariable{nomarking}{faramarcare}
\setinterfacevariable{none}{niciunul}
\setinterfacevariable{nonumber}{nonumber}
+\setinterfacevariable{norepeat}{norepeat}
\setinterfacevariable{normal}{normal}
\setinterfacevariable{nospacing}{nospacing}
\setinterfacevariable{not}{nu}
+\setinterfacevariable{notation}{notation}
\setinterfacevariable{note}{note}
\setinterfacevariable{nothanging}{nothanging}
\setinterfacevariable{nothyphenated}{nedespsilabe}
@@ -340,9 +387,11 @@
\setinterfacevariable{off}{dezactivat}
\setinterfacevariable{offset}{offset}
\setinterfacevariable{old}{old}
+\setinterfacevariable{oldstyle}{oldstyle}
\setinterfacevariable{on}{on}
\setinterfacevariable{one}{unu}
\setinterfacevariable{opposite}{opus}
+\setinterfacevariable{ordinal}{ordinal}
\setinterfacevariable{outer}{extern}
\setinterfacevariable{outeredge}{outeredge}
\setinterfacevariable{outermargin}{outermargin}
@@ -411,6 +460,7 @@
\setinterfacevariable{samepage}{aceeasipagina}
\setinterfacevariable{sans}{sans}
\setinterfacevariable{sansbold}{sansaldin}
+\setinterfacevariable{sansnormal}{sansnormal}
\setinterfacevariable{sansserif}{sansserif}
\setinterfacevariable{saturday}{sambata}
\setinterfacevariable{screen}{ecran}
@@ -421,12 +471,19 @@
\setinterfacevariable{selectfont}{selectfont}
\setinterfacevariable{september}{septembrie}
\setinterfacevariable{serif}{serif}
+\setinterfacevariable{serifbold}{serifbold}
+\setinterfacevariable{serifnormal}{serifnormal}
\setinterfacevariable{serried}{serried}
\setinterfacevariable{setups}{setups}
+\setinterfacevariable{seven}{seven}
\setinterfacevariable{sheet}{sheet}
+\setinterfacevariable{shiftdown}{shiftdown}
+\setinterfacevariable{shiftup}{shiftup}
\setinterfacevariable{short}{short}
\setinterfacevariable{simplefonts}{simplefonts}
+\setinterfacevariable{simplelist}{simplelist}
\setinterfacevariable{singlesided}{ofata}
+\setinterfacevariable{six}{six}
\setinterfacevariable{slanted}{inclinat}
\setinterfacevariable{slantedbold}{inclinataldin}
\setinterfacevariable{small}{mic}
@@ -444,6 +501,7 @@
\setinterfacevariable{smalltype}{mictype}
\setinterfacevariable{somewhere}{undeva}
\setinterfacevariable{sorted}{sortat}
+\setinterfacevariable{sorting}{sorting}
\setinterfacevariable{space}{spatiu}
\setinterfacevariable{spacing}{spatiere}
\setinterfacevariable{speech}{speech}
@@ -456,6 +514,7 @@
\setinterfacevariable{stop}{stop}
\setinterfacevariable{stopper}{stopper}
\setinterfacevariable{stretch}{dilatat}
+\setinterfacevariable{stretched}{stretched}
\setinterfacevariable{strict}{strict}
\setinterfacevariable{strong}{strong}
\setinterfacevariable{strut}{strut}
@@ -489,6 +548,7 @@
\setinterfacevariable{sym}{sym}
\setinterfacevariable{symbol}{simbol}
\setinterfacevariable{synchronize}{synchronize}
+\setinterfacevariable{synonym}{synonym}
\setinterfacevariable{system}{sistem}
\setinterfacevariable{table}{tabelul}
\setinterfacevariable{tablehead}{antettabel}
@@ -519,6 +579,7 @@
\setinterfacevariable{underbars}{sublinii}
\setinterfacevariable{understrike}{understrike}
\setinterfacevariable{understrikes}{understrikes}
+\setinterfacevariable{unframed}{unframed}
\setinterfacevariable{unit}{unitate}
\setinterfacevariable{units}{unitati}
\setinterfacevariable{unknown}{necunoscut}
@@ -531,6 +592,8 @@
\setinterfacevariable{very}{foarte}
\setinterfacevariable{verystrict}{foartestrict}
\setinterfacevariable{verytolerant}{foartetolerant}
+\setinterfacevariable{vfenced}{vfenced}
+\setinterfacevariable{vulgarfraction}{vulgarfraction}
\setinterfacevariable{weak}{weak}
\setinterfacevariable{wednesday}{miercuri}
\setinterfacevariable{week}{saptamana}
@@ -539,6 +602,7 @@
\setinterfacevariable{wide}{larg}
\setinterfacevariable{width}{latime}
\setinterfacevariable{word}{cuvant}
+\setinterfacevariable{words}{words}
\setinterfacevariable{xml}{xml}
\setinterfacevariable{year}{an}
\setinterfacevariable{yes}{da}
@@ -564,8 +628,10 @@
\setinterfaceconstant{artauthoretaldisplay}{artauthoretaldisplay}
\setinterfaceconstant{artauthoretallimit}{artauthoretallimit}
\setinterfaceconstant{artauthoretaltext}{artauthoretaltext}
+\setinterfaceconstant{artoffset}{artoffset}
\setinterfaceconstant{at}{la}
\setinterfaceconstant{author}{autor}
+\setinterfaceconstant{authorconversion}{authorconversion}
\setinterfaceconstant{authoretaldisplay}{authoretaldisplay}
\setinterfaceconstant{authoretallimit}{authoretallimit}
\setinterfaceconstant{authoretaltext}{authoretaltext}
@@ -596,6 +662,7 @@
\setinterfaceconstant{bidi}{bidi}
\setinterfaceconstant{big}{mare}
\setinterfaceconstant{blank}{blanc}
+\setinterfaceconstant{bleedoffset}{bleedoffset}
\setinterfaceconstant{blockway}{blockway}
\setinterfaceconstant{bodyfont}{fonttext}
\setinterfaceconstant{boffset}{boffset}
@@ -620,6 +687,8 @@
\setinterfaceconstant{calculate}{calculeaza}
\setinterfaceconstant{category}{category}
\setinterfaceconstant{ccommand}{comandac}
+\setinterfaceconstant{character}{character}
+\setinterfaceconstant{characters}{characters}
\setinterfaceconstant{check}{check}
\setinterfaceconstant{click}{click}
\setinterfaceconstant{clickin}{clickintru}
@@ -634,15 +703,19 @@
\setinterfaceconstant{column}{coloana}
\setinterfaceconstant{columndistance}{distantacoloane}
\setinterfaceconstant{columns}{coloane}
+\setinterfaceconstant{comma}{comma}
\setinterfaceconstant{command}{comanda}
\setinterfaceconstant{commandafter}{comandadupa}
\setinterfaceconstant{commandbefore}{comandainainte}
\setinterfaceconstant{commands}{comenzi}
+\setinterfaceconstant{comment}{comment}
+\setinterfaceconstant{commentchar}{commentchar}
\setinterfaceconstant{commentoffset}{commentoffset}
\setinterfaceconstant{compact}{compact}
\setinterfaceconstant{component}{component}
\setinterfaceconstant{compoundhyphen}{compoundhyphen}
\setinterfaceconstant{compress}{compress}
+\setinterfaceconstant{compressseparator}{compressseparator}
\setinterfaceconstant{concerns}{concerns}
\setinterfaceconstant{connector}{connector}
\setinterfaceconstant{continue}{continua}
@@ -654,12 +727,14 @@
\setinterfaceconstant{coupling}{cuplare}
\setinterfaceconstant{couplingway}{modcuplare}
\setinterfaceconstant{criterium}{criteriu}
+\setinterfaceconstant{cropoffset}{cropoffset}
\setinterfaceconstant{cssfile}{cssfile}
\setinterfaceconstant{current}{curent}
\setinterfaceconstant{cutspace}{cutspace}
\setinterfaceconstant{dash}{dash}
\setinterfaceconstant{dat}{dat}
\setinterfaceconstant{database}{database}
+\setinterfaceconstant{dataset}{dataset}
\setinterfaceconstant{date}{data}
\setinterfaceconstant{deepnumbercommand}{deepnumbercommand}
\setinterfaceconstant{deeptextcommand}{deeptextcommand}
@@ -671,8 +746,10 @@
\setinterfaceconstant{directory}{director}
\setinterfaceconstant{display}{display}
\setinterfaceconstant{distance}{distanta}
+\setinterfaceconstant{domain}{domain}
\setinterfaceconstant{dot}{punct}
\setinterfaceconstant{doublesided}{douafete}
+\setinterfaceconstant{down}{down}
\setinterfaceconstant{dummy}{dummy}
\setinterfaceconstant{dx}{dx}
\setinterfaceconstant{dy}{dy}
@@ -688,6 +765,10 @@
\setinterfaceconstant{equalheight}{equalheight}
\setinterfaceconstant{equalwidth}{equalwidth}
\setinterfaceconstant{escape}{escape}
+\setinterfaceconstant{etaldisplay}{etaldisplay}
+\setinterfaceconstant{etallimit}{etallimit}
+\setinterfaceconstant{etaloption}{etaloption}
+\setinterfaceconstant{etaltext}{etaltext}
\setinterfaceconstant{evenmargin}{marginepara}
\setinterfaceconstant{exitoffset}{exitoffset}
\setinterfaceconstant{expansion}{expansiune}
@@ -697,18 +778,24 @@
\setinterfaceconstant{fallback}{fallback}
\setinterfaceconstant{family}{familie}
\setinterfaceconstant{features}{features}
+\setinterfaceconstant{fences}{fences}
+\setinterfaceconstant{field}{field}
\setinterfaceconstant{fieldbackgroundcolor}{culoarefundalcamp}
\setinterfaceconstant{fieldframecolor}{culoareframecamp}
\setinterfaceconstant{fieldlayer}{fieldlayer}
\setinterfaceconstant{fieldoffset}{offsetcamp}
\setinterfaceconstant{file}{fisier}
+\setinterfaceconstant{filler}{filler}
\setinterfaceconstant{filtercommand}{filtercommand}
\setinterfaceconstant{finalnamesep}{finalnamesep}
+\setinterfaceconstant{finalpagesep}{finalpagesep}
\setinterfaceconstant{finalpubsep}{finalpubsep}
+\setinterfaceconstant{first}{first}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{primapagina}
\setinterfaceconstant{focus}{focus}
\setinterfaceconstant{focusin}{focusin}
+\setinterfaceconstant{focusoffset}{focusoffset}
\setinterfaceconstant{focusout}{focusout}
\setinterfaceconstant{footer}{subsol}
\setinterfaceconstant{footerdistance}{distantasubsol}
@@ -717,6 +804,7 @@
\setinterfaceconstant{foregroundcolor}{foregroundcolor}
\setinterfaceconstant{foregroundstyle}{foregroundstyle}
\setinterfaceconstant{format}{format}
+\setinterfaceconstant{fractions}{fractions}
\setinterfaceconstant{frame}{frame}
\setinterfaceconstant{framecolor}{culoareframe}
\setinterfaceconstant{framecorner}{coltframe}
@@ -725,10 +813,14 @@
\setinterfaceconstant{frameradius}{razaframe}
\setinterfaceconstant{frames}{frames}
\setinterfaceconstant{from}{dela}
+\setinterfaceconstant{functioncolor}{functioncolor}
+\setinterfaceconstant{functionstyle}{functionstyle}
\setinterfaceconstant{get}{adu}
\setinterfaceconstant{global}{global}
\setinterfaceconstant{goodies}{goodies}
\setinterfaceconstant{grid}{grid}
+\setinterfaceconstant{group}{group}
+\setinterfaceconstant{groupsuffix}{groupsuffix}
\setinterfaceconstant{hang}{suspenda}
\setinterfaceconstant{hcompact}{hcompact}
\setinterfaceconstant{headalign}{headalign}
@@ -748,19 +840,23 @@
\setinterfaceconstant{hoffset}{hoffset}
\setinterfaceconstant{horoffset}{offsetoriz}
\setinterfaceconstant{hyphen}{hyphen}
+\setinterfaceconstant{hyphens}{hyphens}
\setinterfaceconstant{icommand}{comandai}
+\setinterfaceconstant{ignore}{ignore}
\setinterfaceconstant{in}{in}
\setinterfaceconstant{inbetween}{intre}
\setinterfaceconstant{increment}{increment}
\setinterfaceconstant{incrementnumber}{numarincrement}
\setinterfaceconstant{indenting}{aliniat}
\setinterfaceconstant{indentnext}{aliniaturmator}
+\setinterfaceconstant{index}{index}
\setinterfaceconstant{indicator}{indicator}
\setinterfaceconstant{initialsep}{initialsep}
\setinterfaceconstant{inner}{intern}
\setinterfaceconstant{innermargin}{innermargin}
\setinterfaceconstant{inputfile}{inputfile}
\setinterfaceconstant{insidesection}{insidesection}
+\setinterfaceconstant{instance}{instance}
\setinterfaceconstant{intent}{intent}
\setinterfaceconstant{interaction}{interactiune}
\setinterfaceconstant{interlinespace}{spatiereinterliniara}
@@ -769,15 +865,21 @@
\setinterfaceconstant{italicfont}{italicfont}
\setinterfaceconstant{itemalign}{itemalign}
\setinterfaceconstant{items}{elemente}
+\setinterfaceconstant{joiners}{joiners}
+\setinterfaceconstant{journalconversion}{journalconversion}
\setinterfaceconstant{juniorsep}{juniorsep}
+\setinterfaceconstant{keeptogether}{keeptogether}
\setinterfaceconstant{ken}{ken}
\setinterfaceconstant{keyexpansion}{keyexpansion}
\setinterfaceconstant{keys}{keys}
\setinterfaceconstant{keyword}{keyword}
\setinterfaceconstant{label}{eticheta}
\setinterfaceconstant{labeloffset}{labeloffset}
+\setinterfaceconstant{language}{language}
+\setinterfaceconstant{last}{last}
\setinterfaceconstant{lastnamesep}{lastnamesep}
\setinterfaceconstant{lastpage}{ultimapagina}
+\setinterfaceconstant{lastpagesep}{lastpagesep}
\setinterfaceconstant{lastpubsep}{lastpubsep}
\setinterfaceconstant{layout}{layout}
\setinterfaceconstant{left}{stanga}
@@ -798,6 +900,7 @@
\setinterfaceconstant{leftsubsentence}{subpropozitiestanga}
\setinterfaceconstant{lefttext}{textstanga}
\setinterfaceconstant{leftwidth}{latimestanga}
+\setinterfaceconstant{leftwords}{leftwords}
\setinterfaceconstant{less}{less}
\setinterfaceconstant{level}{nivel}
\setinterfaceconstant{levels}{nivele}
@@ -854,10 +957,15 @@
\setinterfaceconstant{nbottom}{njos}
\setinterfaceconstant{nc}{nc}
\setinterfaceconstant{next}{urmatorul}
+\setinterfaceconstant{nextleft}{nextleft}
+\setinterfaceconstant{nextleftquotation}{nextleftquotation}
+\setinterfaceconstant{nextright}{nextright}
+\setinterfaceconstant{nextrightquotation}{nextrightquotation}
\setinterfaceconstant{nl}{nl}
\setinterfaceconstant{nleft}{nstanga}
\setinterfaceconstant{nlines}{nlinii}
\setinterfaceconstant{norm}{norm}
+\setinterfaceconstant{note}{note}
\setinterfaceconstant{nr}{nr}
\setinterfaceconstant{nright}{ndreapta}
\setinterfaceconstant{ntop}{nsus}
@@ -888,6 +996,7 @@
\setinterfaceconstant{openaction}{actiunedeschidere}
\setinterfaceconstant{openpage}{openpage}
\setinterfaceconstant{openpageaction}{actiunedeschiderepagina}
+\setinterfaceconstant{openup}{openup}
\setinterfaceconstant{opticalsize}{opticalsize}
\setinterfaceconstant{option}{optiune}
\setinterfaceconstant{order}{order}
@@ -901,8 +1010,10 @@
\setinterfaceconstant{pagecolor}{culoarepagina}
\setinterfaceconstant{pagecolormodel}{pagecolormodel}
\setinterfaceconstant{pagecommand}{comandapagina}
+\setinterfaceconstant{pageconnector}{pageconnector}
\setinterfaceconstant{pageconversion}{pageconversion}
\setinterfaceconstant{pageconversionset}{pageconversionset}
+\setinterfaceconstant{pageleft}{pageleft}
\setinterfaceconstant{pagenumber}{numarpagina}
\setinterfaceconstant{pageprefix}{pageprefix}
\setinterfaceconstant{pageprefixconnector}{pageprefixconnector}
@@ -913,7 +1024,9 @@
\setinterfaceconstant{pageprefixset}{pageprefixset}
\setinterfaceconstant{pageprefixstarter}{pageprefixstarter}
\setinterfaceconstant{pageprefixstopper}{pageprefixstopper}
+\setinterfaceconstant{pageright}{pageright}
\setinterfaceconstant{pagesegments}{pagesegments}
+\setinterfaceconstant{pagesep}{pagesep}
\setinterfaceconstant{pageseparatorset}{pageseparatorset}
\setinterfaceconstant{pageset}{pageset}
\setinterfaceconstant{pagestarter}{pagestarter}
@@ -923,6 +1036,7 @@
\setinterfaceconstant{palet}{paleta}
\setinterfaceconstant{paper}{hartie}
\setinterfaceconstant{paragraph}{paragraf}
+\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{pune}
\setinterfaceconstant{placehead}{punetitlu}
\setinterfaceconstant{placestopper}{punestopper}
@@ -943,7 +1057,9 @@
\setinterfaceconstant{printable}{tiparibil}
\setinterfaceconstant{process}{process}
\setinterfaceconstant{profile}{profile}
+\setinterfaceconstant{properties}{properties}
\setinterfaceconstant{pubsep}{pubsep}
+\setinterfaceconstant{quotechar}{quotechar}
\setinterfaceconstant{radius}{raza}
\setinterfaceconstant{random}{aleator}
\setinterfaceconstant{range}{range}
@@ -951,18 +1067,24 @@
\setinterfaceconstant{ref}{ref}
\setinterfaceconstant{refcommand}{refcommand}
\setinterfaceconstant{reference}{referinta}
+\setinterfaceconstant{referencemethod}{referencemethod}
\setinterfaceconstant{referenceprefix}{referenceprefix}
\setinterfaceconstant{referencing}{referinta}
\setinterfaceconstant{region}{region}
\setinterfaceconstant{regionin}{regiuneintrare}
\setinterfaceconstant{regionout}{regiuneiesire}
+\setinterfaceconstant{register}{register}
\setinterfaceconstant{regularfeatures}{regularfeatures}
\setinterfaceconstant{regularfont}{regularfont}
+\setinterfaceconstant{renderingsetup}{renderingsetup}
\setinterfaceconstant{repeat}{repeta}
\setinterfaceconstant{reset}{reset}
\setinterfaceconstant{resetnumber}{resetnumber}
\setinterfaceconstant{resolution}{rezolutie}
+\setinterfaceconstant{resources}{resources}
+\setinterfaceconstant{reverse}{reverse}
\setinterfaceconstant{right}{dreapta}
+\setinterfaceconstant{rightchars}{rightchars}
\setinterfaceconstant{rightcolor}{culoaredreapta}
\setinterfaceconstant{rightcompoundhyphen}{rightcompoundhyphen}
\setinterfaceconstant{rightedge}{borduradreapta}
@@ -980,6 +1102,7 @@
\setinterfaceconstant{rightsubsentence}{subpropozitiedreapta}
\setinterfaceconstant{righttext}{textdreapta}
\setinterfaceconstant{rightwidth}{marginedreapta}
+\setinterfaceconstant{rightwords}{rightwords}
\setinterfaceconstant{roffset}{roffset}
\setinterfaceconstant{rotation}{rotatie}
\setinterfaceconstant{rule}{rigla}
@@ -994,6 +1117,7 @@
\setinterfaceconstant{scope}{scop}
\setinterfaceconstant{screen}{ecran}
\setinterfaceconstant{section}{sectiune}
+\setinterfaceconstant{sectionblock}{sectionblock}
\setinterfaceconstant{sectionconversion}{sectionconversion}
\setinterfaceconstant{sectionconversionset}{sectionconversionset}
\setinterfaceconstant{sectionnumber}{numarsectiune}
@@ -1030,6 +1154,7 @@
\setinterfaceconstant{spacebefore}{spatiuinainte}
\setinterfaceconstant{spaceinbetween}{spaceinbetween}
\setinterfaceconstant{spacing}{spatiere}
+\setinterfaceconstant{specification}{specification}
\setinterfaceconstant{split}{split}
\setinterfaceconstant{splitcolor}{splitcolor}
\setinterfaceconstant{splitmethod}{splitmethod}
@@ -1054,10 +1179,12 @@
\setinterfaceconstant{surnamefirstnamesep}{surnamefirstnamesep}
\setinterfaceconstant{surnameinitialsep}{surnameinitialsep}
\setinterfaceconstant{surnamesep}{surnamesep}
+\setinterfaceconstant{svgstyle}{svgstyle}
\setinterfaceconstant{sx}{sx}
\setinterfaceconstant{sy}{sy}
\setinterfaceconstant{symalign}{symaliniere}
\setinterfaceconstant{symbol}{simbol}
+\setinterfaceconstant{symbolcommand}{symbolcommand}
\setinterfaceconstant{symbolset}{setsimbol}
\setinterfaceconstant{symcolor}{culoaresimbol}
\setinterfaceconstant{symstyle}{stilsimbol}
@@ -1067,6 +1194,7 @@
\setinterfaceconstant{synonymstyle}{stilsinonim}
\setinterfaceconstant{tab}{tab}
\setinterfaceconstant{text}{text}
+\setinterfaceconstant{textalign}{textalign}
\setinterfaceconstant{textcolor}{culoaretext}
\setinterfaceconstant{textcommand}{comandatext}
\setinterfaceconstant{textdistance}{textdistance}
@@ -1098,9 +1226,12 @@
\setinterfaceconstant{topspace}{spatiusus}
\setinterfaceconstant{topstate}{staresus}
\setinterfaceconstant{totalnumber}{totalnumber}
+\setinterfaceconstant{translate}{translate}
+\setinterfaceconstant{trimoffset}{trimoffset}
\setinterfaceconstant{type}{type}
\setinterfaceconstant{unit}{unitate}
\setinterfaceconstant{unknownreference}{referintanecunoscuta}
+\setinterfaceconstant{up}{up}
\setinterfaceconstant{urlalternative}{urlalternativ}
\setinterfaceconstant{urlspace}{spatiuurl}
\setinterfaceconstant{validate}{verifica}
@@ -1110,15 +1241,18 @@
\setinterfaceconstant{vector}{vector}
\setinterfaceconstant{veroffset}{veroffset}
\setinterfaceconstant{vfil}{vfil}
+\setinterfaceconstant{viewerprefix}{viewerprefix}
\setinterfaceconstant{voffset}{voffset}
\setinterfaceconstant{vonsep}{vonsep}
\setinterfaceconstant{way}{mod}
\setinterfaceconstant{wfactor}{factorw}
\setinterfaceconstant{white}{alb}
\setinterfaceconstant{width}{latime}
+\setinterfaceconstant{words}{words}
\setinterfaceconstant{xfactor}{xfactor}
\setinterfaceconstant{xhtml}{xhtml}
\setinterfaceconstant{xmax}{xmax}
+\setinterfaceconstant{xmlsetup}{xmlsetup}
\setinterfaceconstant{xoffset}{xoffset}
\setinterfaceconstant{xscale}{xscala}
\setinterfaceconstant{xstep}{xstep}
diff --git a/Master/texmf-dist/tex/context/base/mult-sys.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-sys.mkii
index 1961fdf11b1..1961fdf11b1 100644
--- a/Master/texmf-dist/tex/context/base/mult-sys.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-sys.mkii
diff --git a/Master/texmf-dist/tex/context/base/norm-alo.mkii b/Master/texmf-dist/tex/context/base/mkii/norm-alo.mkii
index d359cf7e88f..d359cf7e88f 100644
--- a/Master/texmf-dist/tex/context/base/norm-alo.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/norm-alo.mkii
diff --git a/Master/texmf-dist/tex/context/base/norm-ctx.mkii b/Master/texmf-dist/tex/context/base/mkii/norm-ctx.mkii
index b1a4c7d3593..b1a4c7d3593 100644
--- a/Master/texmf-dist/tex/context/base/norm-ctx.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/norm-ctx.mkii
diff --git a/Master/texmf-dist/tex/context/base/norm-etx.mkii b/Master/texmf-dist/tex/context/base/mkii/norm-etx.mkii
index bd244e4d1e9..bd244e4d1e9 100644
--- a/Master/texmf-dist/tex/context/base/norm-etx.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/norm-etx.mkii
diff --git a/Master/texmf-dist/tex/context/base/norm-ltx.mkii b/Master/texmf-dist/tex/context/base/mkii/norm-ltx.mkii
index 9a8f7ba576c..9a8f7ba576c 100644
--- a/Master/texmf-dist/tex/context/base/norm-ltx.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/norm-ltx.mkii
diff --git a/Master/texmf-dist/tex/context/base/norm-ptx.mkii b/Master/texmf-dist/tex/context/base/mkii/norm-ptx.mkii
index 14a57aeec1b..14a57aeec1b 100644
--- a/Master/texmf-dist/tex/context/base/norm-ptx.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/norm-ptx.mkii
diff --git a/Master/texmf-dist/tex/context/base/norm-tex.mkii b/Master/texmf-dist/tex/context/base/mkii/norm-tex.mkii
index 0bd54f71a99..0bd54f71a99 100644
--- a/Master/texmf-dist/tex/context/base/norm-tex.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/norm-tex.mkii
diff --git a/Master/texmf-dist/tex/context/base/norm-xtx.mkii b/Master/texmf-dist/tex/context/base/mkii/norm-xtx.mkii
index 851b90b310c..851b90b310c 100644
--- a/Master/texmf-dist/tex/context/base/norm-xtx.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/norm-xtx.mkii
diff --git a/Master/texmf-dist/tex/context/base/pack-box.mkii b/Master/texmf-dist/tex/context/base/mkii/pack-box.mkii
index 1752e2b9122..1752e2b9122 100644
--- a/Master/texmf-dist/tex/context/base/pack-box.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/pack-box.mkii
diff --git a/Master/texmf-dist/tex/context/base/pack-lyr.mkii b/Master/texmf-dist/tex/context/base/mkii/pack-lyr.mkii
index 1b0c0fd63f2..1b0c0fd63f2 100644
--- a/Master/texmf-dist/tex/context/base/pack-lyr.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/pack-lyr.mkii
diff --git a/Master/texmf-dist/tex/context/base/pack-obj.mkii b/Master/texmf-dist/tex/context/base/mkii/pack-obj.mkii
index 81523d52564..81523d52564 100644
--- a/Master/texmf-dist/tex/context/base/pack-obj.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/pack-obj.mkii
diff --git a/Master/texmf-dist/tex/context/base/pack-rul.mkii b/Master/texmf-dist/tex/context/base/mkii/pack-rul.mkii
index 7399cacd811..7399cacd811 100644
--- a/Master/texmf-dist/tex/context/base/pack-rul.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/pack-rul.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-app.mkii b/Master/texmf-dist/tex/context/base/mkii/page-app.mkii
index 75e0cf87467..75e0cf87467 100644
--- a/Master/texmf-dist/tex/context/base/page-app.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-app.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-bck.mkii b/Master/texmf-dist/tex/context/base/mkii/page-bck.mkii
index 4c636d29e34..4c636d29e34 100644
--- a/Master/texmf-dist/tex/context/base/page-bck.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-bck.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-flw.mkii b/Master/texmf-dist/tex/context/base/mkii/page-flw.mkii
index ba8fd3eabaf..ba8fd3eabaf 100644
--- a/Master/texmf-dist/tex/context/base/page-flw.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-flw.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-imp.mkii b/Master/texmf-dist/tex/context/base/mkii/page-imp.mkii
index bf10504b48c..bf10504b48c 100644
--- a/Master/texmf-dist/tex/context/base/page-imp.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-imp.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/page-ini.mkii
index bc4aab60f89..bc4aab60f89 100644
--- a/Master/texmf-dist/tex/context/base/page-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-ins.mkii b/Master/texmf-dist/tex/context/base/mkii/page-ins.mkii
index ce0f51d7282..ce0f51d7282 100644
--- a/Master/texmf-dist/tex/context/base/page-ins.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-ins.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-lay.mkii b/Master/texmf-dist/tex/context/base/mkii/page-lay.mkii
index 61ff8764f38..61ff8764f38 100644
--- a/Master/texmf-dist/tex/context/base/page-lay.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-lay.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-lin.mkii b/Master/texmf-dist/tex/context/base/mkii/page-lin.mkii
index c6b352ae73c..c6b352ae73c 100644
--- a/Master/texmf-dist/tex/context/base/page-lin.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-lin.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-log.mkii b/Master/texmf-dist/tex/context/base/mkii/page-log.mkii
index c64c27bce03..c64c27bce03 100644
--- a/Master/texmf-dist/tex/context/base/page-log.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-log.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-mak.mkii b/Master/texmf-dist/tex/context/base/mkii/page-mak.mkii
index 3a513137fe8..3a513137fe8 100644
--- a/Master/texmf-dist/tex/context/base/page-mak.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-mak.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-mar.mkii b/Master/texmf-dist/tex/context/base/mkii/page-mar.mkii
index d386d8ab93b..d386d8ab93b 100644
--- a/Master/texmf-dist/tex/context/base/page-mar.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-mar.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-mis.mkii b/Master/texmf-dist/tex/context/base/mkii/page-mis.mkii
index a61b2435baf..a61b2435baf 100644
--- a/Master/texmf-dist/tex/context/base/page-mis.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-mis.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-mul.mkii b/Master/texmf-dist/tex/context/base/mkii/page-mul.mkii
index decf784f04e..decf784f04e 100644
--- a/Master/texmf-dist/tex/context/base/page-mul.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-mul.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-not.mkii b/Master/texmf-dist/tex/context/base/mkii/page-not.mkii
index 7bb9824307c..7bb9824307c 100644
--- a/Master/texmf-dist/tex/context/base/page-not.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-not.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-one.mkii b/Master/texmf-dist/tex/context/base/mkii/page-one.mkii
index fe4b285cb91..fe4b285cb91 100644
--- a/Master/texmf-dist/tex/context/base/page-one.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-one.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-par.mkii b/Master/texmf-dist/tex/context/base/mkii/page-par.mkii
index 9b5e0b6ebfa..9b5e0b6ebfa 100644
--- a/Master/texmf-dist/tex/context/base/page-par.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-par.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-plg.mkii b/Master/texmf-dist/tex/context/base/mkii/page-plg.mkii
index 3c3255f4c70..3c3255f4c70 100644
--- a/Master/texmf-dist/tex/context/base/page-plg.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-plg.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-run.mkii b/Master/texmf-dist/tex/context/base/mkii/page-run.mkii
index b128c192d87..b128c192d87 100644
--- a/Master/texmf-dist/tex/context/base/page-run.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-run.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-set.mkii b/Master/texmf-dist/tex/context/base/mkii/page-set.mkii
index 3c8c87e5c40..3c8c87e5c40 100644
--- a/Master/texmf-dist/tex/context/base/page-set.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-set.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-sid.mkii b/Master/texmf-dist/tex/context/base/mkii/page-sid.mkii
index 6c3447e1ca0..6c3447e1ca0 100644
--- a/Master/texmf-dist/tex/context/base/page-sid.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-sid.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-spr.mkii b/Master/texmf-dist/tex/context/base/mkii/page-spr.mkii
index 65e435d7c2f..65e435d7c2f 100644
--- a/Master/texmf-dist/tex/context/base/page-spr.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-spr.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-str.mkii b/Master/texmf-dist/tex/context/base/mkii/page-str.mkii
index df0cc5aa2fd..df0cc5aa2fd 100644
--- a/Master/texmf-dist/tex/context/base/page-str.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-str.mkii
diff --git a/Master/texmf-dist/tex/context/base/page-txt.mkii b/Master/texmf-dist/tex/context/base/mkii/page-txt.mkii
index dd643b1b4e6..dd643b1b4e6 100644
--- a/Master/texmf-dist/tex/context/base/page-txt.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/page-txt.mkii
diff --git a/Master/texmf-dist/tex/context/base/pdfr-def.mkii b/Master/texmf-dist/tex/context/base/mkii/pdfr-def.mkii
index b3f67b93f82..b3f67b93f82 100644
--- a/Master/texmf-dist/tex/context/base/pdfr-def.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/pdfr-def.mkii
diff --git a/Master/texmf-dist/tex/context/base/pdfr-ec.mkii b/Master/texmf-dist/tex/context/base/mkii/pdfr-ec.mkii
index e2208aa3657..e2208aa3657 100644
--- a/Master/texmf-dist/tex/context/base/pdfr-ec.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/pdfr-ec.mkii
diff --git a/Master/texmf-dist/tex/context/base/pdfr-il2.mkii b/Master/texmf-dist/tex/context/base/mkii/pdfr-il2.mkii
index 81f9c42acca..81f9c42acca 100644
--- a/Master/texmf-dist/tex/context/base/pdfr-il2.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/pdfr-il2.mkii
diff --git a/Master/texmf-dist/tex/context/base/prop-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/prop-ini.mkii
index 11efd036234..11efd036234 100644
--- a/Master/texmf-dist/tex/context/base/prop-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/prop-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/prop-lay.mkii b/Master/texmf-dist/tex/context/base/mkii/prop-lay.mkii
index 77c48ca6ed2..77c48ca6ed2 100644
--- a/Master/texmf-dist/tex/context/base/prop-lay.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/prop-lay.mkii
diff --git a/Master/texmf-dist/tex/context/base/prop-mis.mkii b/Master/texmf-dist/tex/context/base/mkii/prop-mis.mkii
index 47fb9ea0661..47fb9ea0661 100644
--- a/Master/texmf-dist/tex/context/base/prop-mis.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/prop-mis.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-1.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-8859-1.mkii
index 00439ae9e3e..00439ae9e3e 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-1.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-8859-1.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-10.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-8859-10.mkii
index 6646860342a..6646860342a 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-10.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-8859-10.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-13.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-8859-13.mkii
index f1b1dbe7870..f1b1dbe7870 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-13.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-8859-13.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-15.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-8859-15.mkii
index 1455161c30e..1455161c30e 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-15.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-8859-15.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-16.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-8859-16.mkii
index f284c4116e7..f284c4116e7 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-16.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-8859-16.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-2.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-8859-2.mkii
index 9efc27a7968..9efc27a7968 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-2.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-8859-2.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-3.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-8859-3.mkii
index 99fa66ac313..99fa66ac313 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-3.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-8859-3.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-4.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-8859-4.mkii
index c7adf34710e..c7adf34710e 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-4.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-8859-4.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-5.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-8859-5.mkii
index 807d74640b4..807d74640b4 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-5.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-8859-5.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-7.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-8859-7.mkii
index 1c8197a4270..1c8197a4270 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-7.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-8859-7.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-9.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-8859-9.mkii
index 60757b2e684..60757b2e684 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-9.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-8859-9.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-cp1250.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-cp1250.mkii
index c13ee53e2c1..c13ee53e2c1 100644
--- a/Master/texmf-dist/tex/context/base/regi-cp1250.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-cp1250.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-cp1251.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-cp1251.mkii
index 66576bd16be..66576bd16be 100644
--- a/Master/texmf-dist/tex/context/base/regi-cp1251.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-cp1251.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-cp1252.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-cp1252.mkii
index 316d694a67e..316d694a67e 100644
--- a/Master/texmf-dist/tex/context/base/regi-cp1252.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-cp1252.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-cp1253.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-cp1253.mkii
index 05d53c1298e..05d53c1298e 100644
--- a/Master/texmf-dist/tex/context/base/regi-cp1253.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-cp1253.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-cp1254.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-cp1254.mkii
index 73f8f270820..73f8f270820 100644
--- a/Master/texmf-dist/tex/context/base/regi-cp1254.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-cp1254.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-cp1257.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-cp1257.mkii
index 4c9cb56f059..4c9cb56f059 100644
--- a/Master/texmf-dist/tex/context/base/regi-cp1257.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-cp1257.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-cyp.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-cyp.mkii
index 3f45ace2307..3f45ace2307 100644
--- a/Master/texmf-dist/tex/context/base/regi-cyp.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-cyp.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-cyr.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-cyr.mkii
index 1910c0e7cb3..1910c0e7cb3 100644
--- a/Master/texmf-dist/tex/context/base/regi-cyr.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-cyr.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-def.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-def.mkii
index 3af0c9d3c5d..3af0c9d3c5d 100644
--- a/Master/texmf-dist/tex/context/base/regi-def.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-def.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-ibm.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-ibm.mkii
index 5756e77054f..5756e77054f 100644
--- a/Master/texmf-dist/tex/context/base/regi-ibm.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-ibm.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-ini.mkii
index 1122ce18ac9..1122ce18ac9 100644
--- a/Master/texmf-dist/tex/context/base/regi-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-mac.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-mac.mkii
index 30f57ab18cb..30f57ab18cb 100644
--- a/Master/texmf-dist/tex/context/base/regi-mac.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-mac.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-syn.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-syn.mkii
index 09fd59deeb5..09fd59deeb5 100644
--- a/Master/texmf-dist/tex/context/base/regi-syn.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-syn.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-uni.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-uni.mkii
index fe2f99a4f2d..fe2f99a4f2d 100644
--- a/Master/texmf-dist/tex/context/base/regi-uni.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-uni.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-utf.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-utf.mkii
index 09926a17231..09926a17231 100644
--- a/Master/texmf-dist/tex/context/base/regi-utf.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-utf.mkii
diff --git a/Master/texmf-dist/tex/context/base/regi-vis.mkii b/Master/texmf-dist/tex/context/base/mkii/regi-vis.mkii
index 1807bdc93df..1807bdc93df 100644
--- a/Master/texmf-dist/tex/context/base/regi-vis.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/regi-vis.mkii
diff --git a/Master/texmf-dist/tex/context/base/scrn-fld.mkii b/Master/texmf-dist/tex/context/base/mkii/scrn-fld.mkii
index 993b510ea4b..993b510ea4b 100644
--- a/Master/texmf-dist/tex/context/base/scrn-fld.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/scrn-fld.mkii
diff --git a/Master/texmf-dist/tex/context/base/scrn-hlp.mkii b/Master/texmf-dist/tex/context/base/mkii/scrn-hlp.mkii
index c526f51ebb4..c526f51ebb4 100644
--- a/Master/texmf-dist/tex/context/base/scrn-hlp.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/scrn-hlp.mkii
diff --git a/Master/texmf-dist/tex/context/base/scrn-int.mkii b/Master/texmf-dist/tex/context/base/mkii/scrn-int.mkii
index 01d8501e217..01d8501e217 100644
--- a/Master/texmf-dist/tex/context/base/scrn-int.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/scrn-int.mkii
diff --git a/Master/texmf-dist/tex/context/base/scrn-nav.mkii b/Master/texmf-dist/tex/context/base/mkii/scrn-nav.mkii
index 3bb56bacee7..3bb56bacee7 100644
--- a/Master/texmf-dist/tex/context/base/scrn-nav.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/scrn-nav.mkii
diff --git a/Master/texmf-dist/tex/context/base/sort-def.mkii b/Master/texmf-dist/tex/context/base/mkii/sort-def.mkii
index 168f94e9e9a..168f94e9e9a 100644
--- a/Master/texmf-dist/tex/context/base/sort-def.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/sort-def.mkii
diff --git a/Master/texmf-dist/tex/context/base/sort-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/sort-ini.mkii
index 8114f82c8eb..8114f82c8eb 100644
--- a/Master/texmf-dist/tex/context/base/sort-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/sort-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/sort-lan.mkii b/Master/texmf-dist/tex/context/base/mkii/sort-lan.mkii
index c239623718f..c239623718f 100644
--- a/Master/texmf-dist/tex/context/base/sort-lan.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/sort-lan.mkii
diff --git a/Master/texmf-dist/tex/context/base/spac-gen.mkii b/Master/texmf-dist/tex/context/base/mkii/spac-gen.mkii
index 91e37925041..91e37925041 100644
--- a/Master/texmf-dist/tex/context/base/spac-gen.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/spac-gen.mkii
diff --git a/Master/texmf-dist/tex/context/base/spac-grd.mkii b/Master/texmf-dist/tex/context/base/mkii/spac-grd.mkii
index 97699de51c4..97699de51c4 100644
--- a/Master/texmf-dist/tex/context/base/spac-grd.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/spac-grd.mkii
diff --git a/Master/texmf-dist/tex/context/base/spec-def.mkii b/Master/texmf-dist/tex/context/base/mkii/spec-def.mkii
index 60051579d04..60051579d04 100644
--- a/Master/texmf-dist/tex/context/base/spec-def.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/spec-def.mkii
diff --git a/Master/texmf-dist/tex/context/base/spec-dpm.mkii b/Master/texmf-dist/tex/context/base/mkii/spec-dpm.mkii
index fe721405aee..fe721405aee 100644
--- a/Master/texmf-dist/tex/context/base/spec-dpm.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/spec-dpm.mkii
diff --git a/Master/texmf-dist/tex/context/base/spec-dpx.mkii b/Master/texmf-dist/tex/context/base/mkii/spec-dpx.mkii
index 323152e0b3c..323152e0b3c 100644
--- a/Master/texmf-dist/tex/context/base/spec-dpx.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/spec-dpx.mkii
diff --git a/Master/texmf-dist/tex/context/base/spec-dvi.mkii b/Master/texmf-dist/tex/context/base/mkii/spec-dvi.mkii
index 89a1330a2e5..89a1330a2e5 100644
--- a/Master/texmf-dist/tex/context/base/spec-dvi.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/spec-dvi.mkii
diff --git a/Master/texmf-dist/tex/context/base/spec-fdf.mkii b/Master/texmf-dist/tex/context/base/mkii/spec-fdf.mkii
index 0713fa80cd1..0713fa80cd1 100644
--- a/Master/texmf-dist/tex/context/base/spec-fdf.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/spec-fdf.mkii
diff --git a/Master/texmf-dist/tex/context/base/spec-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/spec-ini.mkii
index 9361ed2225a..9361ed2225a 100644
--- a/Master/texmf-dist/tex/context/base/spec-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/spec-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/spec-mis.mkii b/Master/texmf-dist/tex/context/base/mkii/spec-mis.mkii
index de0debd3cdf..de0debd3cdf 100644
--- a/Master/texmf-dist/tex/context/base/spec-mis.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/spec-mis.mkii
diff --git a/Master/texmf-dist/tex/context/base/spec-pdf.mkii b/Master/texmf-dist/tex/context/base/mkii/spec-pdf.mkii
index 33722f60345..33722f60345 100644
--- a/Master/texmf-dist/tex/context/base/spec-pdf.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/spec-pdf.mkii
diff --git a/Master/texmf-dist/tex/context/base/spec-ps.mkii b/Master/texmf-dist/tex/context/base/mkii/spec-ps.mkii
index 02ec16453cb..02ec16453cb 100644
--- a/Master/texmf-dist/tex/context/base/spec-ps.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/spec-ps.mkii
diff --git a/Master/texmf-dist/tex/context/base/spec-tpd.mkii b/Master/texmf-dist/tex/context/base/mkii/spec-tpd.mkii
index 042d5cdfe36..042d5cdfe36 100644
--- a/Master/texmf-dist/tex/context/base/spec-tpd.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/spec-tpd.mkii
diff --git a/Master/texmf-dist/tex/context/base/spec-tr.mkii b/Master/texmf-dist/tex/context/base/mkii/spec-tr.mkii
index 19ddb7495a3..19ddb7495a3 100644
--- a/Master/texmf-dist/tex/context/base/spec-tr.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/spec-tr.mkii
diff --git a/Master/texmf-dist/tex/context/base/spec-tst.mkii b/Master/texmf-dist/tex/context/base/mkii/spec-tst.mkii
index 4f580e7b403..4f580e7b403 100644
--- a/Master/texmf-dist/tex/context/base/spec-tst.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/spec-tst.mkii
diff --git a/Master/texmf-dist/tex/context/base/spec-var.mkii b/Master/texmf-dist/tex/context/base/mkii/spec-var.mkii
index 3641ba9599e..3641ba9599e 100644
--- a/Master/texmf-dist/tex/context/base/spec-var.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/spec-var.mkii
diff --git a/Master/texmf-dist/tex/context/base/spec-win.mkii b/Master/texmf-dist/tex/context/base/mkii/spec-win.mkii
index e16984a56e6..e16984a56e6 100644
--- a/Master/texmf-dist/tex/context/base/spec-win.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/spec-win.mkii
diff --git a/Master/texmf-dist/tex/context/base/spec-xet.mkii b/Master/texmf-dist/tex/context/base/mkii/spec-xet.mkii
index 0cbd55ba7fd..0cbd55ba7fd 100644
--- a/Master/texmf-dist/tex/context/base/spec-xet.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/spec-xet.mkii
diff --git a/Master/texmf-dist/tex/context/base/spec-xtx.mkii b/Master/texmf-dist/tex/context/base/mkii/spec-xtx.mkii
index 81b83e66318..81b83e66318 100644
--- a/Master/texmf-dist/tex/context/base/spec-xtx.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/spec-xtx.mkii
diff --git a/Master/texmf-dist/tex/context/base/spec-yy.mkii b/Master/texmf-dist/tex/context/base/mkii/spec-yy.mkii
index b5a1d590b08..b5a1d590b08 100644
--- a/Master/texmf-dist/tex/context/base/spec-yy.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/spec-yy.mkii
diff --git a/Master/texmf-dist/tex/context/base/strc-blk.mkii b/Master/texmf-dist/tex/context/base/mkii/strc-blk.mkii
index b6056769c87..b6056769c87 100644
--- a/Master/texmf-dist/tex/context/base/strc-blk.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/strc-blk.mkii
diff --git a/Master/texmf-dist/tex/context/base/strc-des.mkii b/Master/texmf-dist/tex/context/base/mkii/strc-des.mkii
index e699df9ea1d..e699df9ea1d 100644
--- a/Master/texmf-dist/tex/context/base/strc-des.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/strc-des.mkii
diff --git a/Master/texmf-dist/tex/context/base/strc-flt.mkii b/Master/texmf-dist/tex/context/base/mkii/strc-flt.mkii
index 26125c65f96..26125c65f96 100644
--- a/Master/texmf-dist/tex/context/base/strc-flt.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/strc-flt.mkii
diff --git a/Master/texmf-dist/tex/context/base/strc-itm.mkii b/Master/texmf-dist/tex/context/base/mkii/strc-itm.mkii
index 697618323bb..697618323bb 100644
--- a/Master/texmf-dist/tex/context/base/strc-itm.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/strc-itm.mkii
diff --git a/Master/texmf-dist/tex/context/base/strc-lnt.mkii b/Master/texmf-dist/tex/context/base/mkii/strc-lnt.mkii
index 3c878a8d232..3c878a8d232 100644
--- a/Master/texmf-dist/tex/context/base/strc-lnt.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/strc-lnt.mkii
diff --git a/Master/texmf-dist/tex/context/base/strc-lst.mkii b/Master/texmf-dist/tex/context/base/mkii/strc-lst.mkii
index ffb1a4dbde4..ffb1a4dbde4 100644
--- a/Master/texmf-dist/tex/context/base/strc-lst.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/strc-lst.mkii
diff --git a/Master/texmf-dist/tex/context/base/strc-mar.mkii b/Master/texmf-dist/tex/context/base/mkii/strc-mar.mkii
index 2ae81e47bb5..2ae81e47bb5 100644
--- a/Master/texmf-dist/tex/context/base/strc-mar.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/strc-mar.mkii
diff --git a/Master/texmf-dist/tex/context/base/strc-mat.mkii b/Master/texmf-dist/tex/context/base/mkii/strc-mat.mkii
index 34f716f3bdf..34f716f3bdf 100644
--- a/Master/texmf-dist/tex/context/base/strc-mat.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/strc-mat.mkii
diff --git a/Master/texmf-dist/tex/context/base/strc-not.mkii b/Master/texmf-dist/tex/context/base/mkii/strc-not.mkii
index bee21342ea7..bee21342ea7 100644
--- a/Master/texmf-dist/tex/context/base/strc-not.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/strc-not.mkii
diff --git a/Master/texmf-dist/tex/context/base/strc-num.mkii b/Master/texmf-dist/tex/context/base/mkii/strc-num.mkii
index 99fb687c865..99fb687c865 100644
--- a/Master/texmf-dist/tex/context/base/strc-num.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/strc-num.mkii
diff --git a/Master/texmf-dist/tex/context/base/strc-pag.mkii b/Master/texmf-dist/tex/context/base/mkii/strc-pag.mkii
index 40e69b849b3..40e69b849b3 100644
--- a/Master/texmf-dist/tex/context/base/strc-pag.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/strc-pag.mkii
diff --git a/Master/texmf-dist/tex/context/base/strc-ref.mkii b/Master/texmf-dist/tex/context/base/mkii/strc-ref.mkii
index 8a135eb043e..8a135eb043e 100644
--- a/Master/texmf-dist/tex/context/base/strc-ref.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/strc-ref.mkii
diff --git a/Master/texmf-dist/tex/context/base/strc-reg.mkii b/Master/texmf-dist/tex/context/base/mkii/strc-reg.mkii
index 45be825258f..45be825258f 100644
--- a/Master/texmf-dist/tex/context/base/strc-reg.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/strc-reg.mkii
diff --git a/Master/texmf-dist/tex/context/base/strc-sec.mkii b/Master/texmf-dist/tex/context/base/mkii/strc-sec.mkii
index 01ca71eadbc..01ca71eadbc 100644
--- a/Master/texmf-dist/tex/context/base/strc-sec.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/strc-sec.mkii
diff --git a/Master/texmf-dist/tex/context/base/strc-swd.mkii b/Master/texmf-dist/tex/context/base/mkii/strc-swd.mkii
index 1525ab597a1..1525ab597a1 100644
--- a/Master/texmf-dist/tex/context/base/strc-swd.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/strc-swd.mkii
diff --git a/Master/texmf-dist/tex/context/base/strc-syn.mkii b/Master/texmf-dist/tex/context/base/mkii/strc-syn.mkii
index 2ba5c94679e..2ba5c94679e 100644
--- a/Master/texmf-dist/tex/context/base/strc-syn.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/strc-syn.mkii
diff --git a/Master/texmf-dist/tex/context/base/supp-ali.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-ali.mkii
index c4a1aadc526..c4a1aadc526 100644
--- a/Master/texmf-dist/tex/context/base/supp-ali.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-ali.mkii
diff --git a/Master/texmf-dist/tex/context/base/supp-box.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-box.mkii
index 55641fd6336..55641fd6336 100644
--- a/Master/texmf-dist/tex/context/base/supp-box.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-box.mkii
diff --git a/Master/texmf-dist/tex/context/base/supp-dir.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-dir.mkii
index f4f2949035b..f4f2949035b 100644
--- a/Master/texmf-dist/tex/context/base/supp-dir.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-dir.mkii
diff --git a/Master/texmf-dist/tex/context/base/supp-emp.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-emp.mkii
index ba9e09e3a4c..ba9e09e3a4c 100644
--- a/Master/texmf-dist/tex/context/base/supp-emp.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-emp.mkii
diff --git a/Master/texmf-dist/tex/context/base/supp-eps.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-eps.mkii
index fb99469c5d6..fb99469c5d6 100644
--- a/Master/texmf-dist/tex/context/base/supp-eps.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-eps.mkii
diff --git a/Master/texmf-dist/tex/context/base/supp-fil.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-fil.mkii
index b76dfb901a2..9a981797e05 100644
--- a/Master/texmf-dist/tex/context/base/supp-fil.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-fil.mkii
@@ -37,9 +37,17 @@
\def\f!parentpath {..}
\fi
-\def\openinputfile #1#2{\immediate\openin #1="#2"\relax} \def\closeinputfile #1{\immediate\closein #1}
-\def\openoutputfile#1#2{\immediate\openout#1="#2"\relax} \def\closeoutputfile#1{\immediate\closeout#1}
-
+\ifnum\texengine=\luatexengine
+ \def\openinputfile #1#2{\openin #1{#2}\relax}
+ \def\openoutputfile#1#2{\immediate\openout#1{#2}\relax}
+\else
+ \def\openinputfile #1#2{\openin #1 "#2"\relax}
+ \def\openoutputfile#1#2{\immediate\openout#1 "#2"\relax}
+\fi
+
+\def\closeinputfile #1{\immediate\closein #1}
+\def\closeoutputfile#1{\immediate\closeout#1}
+
%D \macros
%D {pushendofline,popendofline}
%D
@@ -235,7 +243,11 @@
\unexpanded\def\input{\normalinput}
-\def\inputgivenfile#1{\normalinput"#1"\relax}
+\ifnum\texengine=\luatexengine
+ \def\inputgivenfile#1{\normalinput{#1}\relax}
+\else
+ \def\inputgivenfile#1{\normalinput"#1"\relax}
+\fi
%D \macros
%D {readfile,ReadFile,maxreadlevel}
diff --git a/Master/texmf-dist/tex/context/base/supp-fun.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-fun.mkii
index 9bba4f5a85f..9bba4f5a85f 100644
--- a/Master/texmf-dist/tex/context/base/supp-fun.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-fun.mkii
diff --git a/Master/texmf-dist/tex/context/base/supp-lat.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-lat.mkii
index 343a7674c27..343a7674c27 100644
--- a/Master/texmf-dist/tex/context/base/supp-lat.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-lat.mkii
diff --git a/Master/texmf-dist/tex/context/base/supp-mat.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-mat.mkii
index e8a34fc90ee..e8a34fc90ee 100644
--- a/Master/texmf-dist/tex/context/base/supp-mat.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-mat.mkii
diff --git a/Master/texmf-dist/tex/context/base/mkii/supp-mis.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-mis.mkii
new file mode 100644
index 00000000000..bc511e518b6
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-mis.mkii
@@ -0,0 +1,733 @@
+%D \module
+%D [ file=supp-mis,
+%D version=2004.10.26, % 1997.01.04,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=Missing (For Generic Use),
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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 I will clean up this module (a la supp-pdf.tex preamble).
+
+%D Some support modules are more or less independant. This
+%D module, which is not part of plain \CONTEXT, provides the
+%D missing macros and declarations of registers.
+
+\ifx \undefined \writestatus \else \expandafter \endinput \fi
+
+%D Because \LATEX\ has no safe package loading mechanism, we
+%D need to take care of possible interference.
+
+\def\StartLatexHack % replace this by the one in supp-pdf
+ {\edef\StopLatexHack
+ {\catcode\string`\noexpand/=\the\catcode\string`/
+ \catcode\string`\noexpand-=\the\catcode\string`-
+ \catcode\string`\noexpand:=\the\catcode\string`:
+ \catcode\string`\noexpand;=\the\catcode\string`;
+ \catcode\string`\noexpand"=\the\catcode\string`"
+ \catcode\string`\noexpand<=\the\catcode\string`<
+ \catcode\string`\noexpand>=\the\catcode\string`>
+ \catcode\string`\noexpand`=\the\catcode\string``}%
+ \catcode\string`/=12 \catcode\string`-=12
+ \catcode\string`:=12 \catcode\string`;=12
+ \catcode\string`"=12 \catcode\string`<=12
+ \catcode\string`>=12 \catcode\string``=12 }
+
+%D This hack is needed especially for \LATEX\ users who use
+%D the Babel package. The Germans have active \type {"}'s, the
+%D Poles have \type {/}, while the French have \type {:} and
+%D \type {;} defines as command (thanks to Daniel Flipo for
+%D pointing that out and testing). Potentially active \type
+%D {?}'s and \type {!}'s are less dangerous since they are
+%D handled by the \type {\protect} and \type {\unprotect}
+%D macros.
+
+\StartLatexHack
+
+%D \macros
+%D {ifnocontextobject}
+%D
+%D First we take care of redundant defining. The next set of
+%D macros are a bit complicated by the fact that Plain
+%D \TEX\ defines the \type{\new}||macros as being outer.
+%D Furthermore nested \type{\if}'s can get us into
+%D trouble.
+
+\def\definecontextobject
+ {\iftrue}
+
+\def\gobblecontextobject
+ {\setbox0\hbox
+ \bgroup
+ \long\def\gobblecontextobject##1\fi{\egroup}%
+ \expandafter\gobblecontextobject\string}
+
+\long\def\ifnocontextobject#1\do
+ {\ifx#1\undefined
+ \expandafter\definecontextobject
+ \else
+ %\writestatus{system}{beware of conflicting \string#1}%
+ \expandafter\gobblecontextobject
+ \fi}
+
+%D \macros
+%D {beginETEX,beginTEX}
+%D
+%D Outside \CONTEXT\ we will not be \ETEX||aware.
+
+\long\def\beginETEX #1\endETEX {}
+
+\let\beginTEX\relax \let\endTEX\relax
+
+%D \macros
+%D {writestatus}
+%D
+%D We start each module with a message. Normally the output is
+%D formatted, but here we keep things simple.
+
+\ifnocontextobject \writestatus \do
+
+ \def\writestatus#1#2{\immediate\write16{#1 : #2}}
+
+\fi
+
+%D Let's see if it works.
+
+\writestatus{loading}{ConTeXt Support Macros / Miscellaneous (2004.10.26)}
+
+%D \macros
+%D {protect,unprotect}
+%D
+%D Next we present a poor mans alternative for \type{\protect}
+%D and \type{\unprotect}, two commands that enable us to use
+%D the characters \type{@}, \type{!} and \type{?} in macro
+%D names.
+
+\ifnocontextobject \protect \do
+
+ \let\protect\relax
+
+\fi
+
+\newcount\protectiondepth
+
+\ifnocontextobject \unprotect \do
+
+ \def\unprotect
+ {\advance\protectiondepth 1
+ \ifnum\protectiondepth=1
+ \let\normalprotect=\protect
+ \def\protect
+ {\ifnum\protectiondepth>0
+ \advance\protectiondepth -1
+ \ifnum\protectiondepth=0
+ \doprotect
+ \let\protect=\normalprotect
+ \fi
+ \fi}
+ \edef\doprotect
+ {\catcode`\noexpand @=\the\catcode`@\relax
+ \catcode`\noexpand !=\the\catcode`!\relax
+ \catcode`\noexpand ?=\the\catcode`?\relax}
+ \catcode`@=11
+ \catcode`!=11
+ \catcode`?=11
+ \fi}
+
+\fi
+
+%D We start using this one it at once.
+
+\unprotect
+
+%D \macros
+%D {scratch...,if...,next...}
+%D
+%D We need some scratch registers. Users are free to use them,
+%D but can never be sure of their value once another macro is
+%D called. We only allocate things when they are yet
+%D undefined. This way we can't mess up other macro packages,
+%D but of course previous definitions can mess up our modules.
+
+\ifnocontextobject \donetrue \do \newif\ifdone \fi
+
+% no time now, will do a better test later (based on dimendef)
+
+\def\!!stringa{plain} \ifx\!!stringa\fmtname \donetrue \else
+\def\!!stringa{eplain} \ifx\!!stringa\fmtname \donetrue \else
+\def\!!stringa{babel-plain} \ifx\!!stringa\fmtname \donetrue \else
+ \donefalse \fi \fi \fi
+
+\ifdone
+ % plain defines some 15 dimens, so we need to define a few
+ % dummies in order to get out of the scratch area
+ \newdimen\scratchdimen % 16
+ \newdimen\scratchdimen % 17
+ \newdimen\scratchdimen % 18
+ \newdimen\scratchdimen % 19
+ \newdimen\scratchdimen % 20
+ \newdimen\scratchdimen % 21
+\fi
+
+\def\stripnewabove#1%
+ {\ifnum10<9#1 #1\else\expandafter\stripnewabove\fi}%
+
+\def\newabove\csname#1\endcsname#2% \dimen \name
+ {\csname#1\endcsname#2%
+ \ifnum\expandafter\stripnewabove\meaning#2>20\else
+ \newabove\csname#1\endcsname#2%
+ \fi}
+
+\ifnocontextobject \scratchcounter \do \newabove \csname newcount\endcsname \scratchcounter \fi
+\ifnocontextobject \scratchtoks \do \newabove \csname newtoks\endcsname \scratchtoks \fi
+\ifnocontextobject \scratchdimen \do \newabove \csname newdimen\endcsname \scratchdimen \fi
+\ifnocontextobject \scratchskip \do \newabove \csname newskip\endcsname \scratchskip \fi
+\ifnocontextobject \scratchmuskip \do \newabove \csname newmuskip\endcsname \scratchmuskip \fi
+\ifnocontextobject \scratchbox \do \csname newbox\endcsname \scratchbox \fi
+\ifnocontextobject \scratchread \do \csname newread\endcsname \scratchread \fi
+\ifnocontextobject \scratchwrite \do \csname newwrite\endcsname \scratchwrite \fi
+
+%D Watch out, in the past we ran into troubles with \type {\onepoint}
+%D (and others) mening something different in \LATEX\ then here. In
+%D such situations clashes are bound to happen. For this reason the
+%D assignments are no inside the test. We try to catch those situations
+%D but we cannot keep ahead of the future.
+
+\ifnocontextobject \zeropoint \do \newdimen \zeropoint \zeropoint = 0pt \fi % else problems with dimen12
+\ifnocontextobject \onepoint \do \newdimen \onepoint \onepoint = 1pt \fi
+\ifnocontextobject \onebasepoint \do \newdimen \onebasepoint \onebasepoint = 1bp \fi
+\ifnocontextobject \zerocount \do \chardef \zerocount = 0 \fi
+\ifnocontextobject \plusone \do \chardef \plusone = 1 \fi
+\ifnocontextobject \minusone \do \newcount \minusone \minusone = -1 \fi
+\ifnocontextobject \thousandpoint \do \newdimen \thousandpoint \thousandpoint = 1000pt \fi
+\ifnocontextobject \onerealpoint \do \newdimen \onerealpoint \onerealpoint = 1pt \fi % latex has a funny \onepoint
+
+\ifnocontextobject \emptytoks \do \newtoks \emptytoks \fi
+\ifnocontextobject \nextbox \do \newbox \nextbox \fi
+\ifnocontextobject \nextdepth \do \newdimen \nextdepth \fi
+
+\ifnocontextobject \CONTEXTtrue \do \newif\ifCONTEXT \fi
+\ifnocontextobject \eightbitcharacterstrue \do \newif\ifeightbitcharacters \fi
+\ifnocontextobject \MPdrawingdonetrue \do \newif\ifMPdrawingdone \fi
+
+\ifnocontextobject \ifzeropt \do \let\ifzeropt\ifcase \fi
+
+%D \macros
+%D {@@...}
+%D
+%D We use symbolic name for \CATCODES. They can only be used
+%D when we are in unprotected state.
+
+\ifnocontextobject \@@escape \do \chardef\@@escape = 0 \fi
+\ifnocontextobject \@@begingroup \do \chardef\@@begingroup = 1 \fi
+\ifnocontextobject \@@endgroup \do \chardef\@@endgroup = 2 \fi
+\ifnocontextobject \@@endofline \do \chardef\@@endofline = 5 \fi
+\ifnocontextobject \@@ignore \do \chardef\@@ignore = 9 \fi
+\ifnocontextobject \@@space \do \chardef\@@space = 10 \fi
+\ifnocontextobject \@@letter \do \chardef\@@letter = 11 \fi
+\ifnocontextobject \@@other \do \chardef\@@other = 12 \fi
+\ifnocontextobject \@@active \do \chardef\@@active = 13 \fi
+\ifnocontextobject \@@comment \do \chardef\@@comment = 14 \fi
+
+\def\s!sp{sp}
+\def\s!pt{pt}
+\def\s!bp{bp}
+
+%D \macros
+%D {@EA,expanded,expandoneargafter,expandtwoargsafter}
+%D
+%D Also needed:
+
+\let\@EA=\expandafter \let\@@expanded\empty
+
+\def\expanded#1%
+ {\long\xdef\@@expanded{\noexpand#1}\@@expanded}
+
+\def\expandoneargafter#1#2%
+ {\@EA#1\@EA{#2}}
+
+\def\expandtwoargsafter#1#2#3%
+ {\@EA\@EA\@EA#1\@EA\@EA\@EA{\@EA#2\@EA}\@EA{#3}}
+
+\def\@EAEAEA{\@EA\@EA\@EA}
+
+%D \macros
+%D {everyline,EveryLine,EveryPar}
+%D
+%D In \CONTEXT\ we use \type{\everypar} for special purposes
+%D and provide \type{\EveryPar} as an alternative. The same
+%D goes for \type{\everyline} and \type{\EveryLine}.
+
+\ifnocontextobject \everyline \do \newtoks\everyline \fi
+\ifnocontextobject \EveryPar \do \let\EveryPar =\everypar \fi
+\ifnocontextobject \EveryLine \do \let\EveryLine=\everyline \fi
+
+%D \macros
+%D {globallet}
+
+\def\globallet{\global\let}
+
+%D \macros
+%D {!!...}
+%D
+%D We reserve ourselves some scratch strings (i.e. macros)
+%D and some more counters.
+
+\ifnocontextobject \!!stringa \do \def\!!stringa {} \fi
+\ifnocontextobject \!!stringb \do \def\!!stringb {} \fi
+\ifnocontextobject \!!stringc \do \def\!!stringc {} \fi
+\ifnocontextobject \!!stringd \do \def\!!stringd {} \fi
+
+\ifnocontextobject \!!counta \do \newcount\!!counta {} \fi
+\ifnocontextobject \!!countb \do \newcount\!!countb {} \fi
+
+%D \macros
+%D {!!...}
+%D
+%D The next set of definitions speed up processing a bit.
+%D Furthermore it saves memory.
+
+\ifnocontextobject \!!zeropoint \do \def\!!zeropoint {0pt} \fi
+\ifnocontextobject \!!zerocount \do \def\!!zerocount {0} \fi
+\ifnocontextobject \!!tenthousand \do \def\!!tenthousand {10000} \fi
+
+\ifnocontextobject \!!width \do \def\!!width {width} \fi
+\ifnocontextobject \!!height \do \def\!!height {height} \fi
+\ifnocontextobject \!!depth \do \def\!!depth {depth} \fi
+
+\ifnocontextobject \!!plus \do \def\!!plus {plus} \fi
+\ifnocontextobject \!!minus \do \def\!!minus {minus} \fi
+\ifnocontextobject \!!to \do \def\!!to {to} \fi
+
+%D \macros
+%D {smashbox}
+%D
+%D The system modules offer a range of smashing macros, of
+%D which we only copied \type{\smashbox}.
+
+\ifnocontextobject \smashbox \do
+
+ \def\smashbox#1%
+ {\wd#1\zeropoint
+ \ht#1\zeropoint
+ \dp#1\zeropoint}
+
+\fi
+
+%D \macros
+%D {dowithnextbox}
+%D
+%D Also without further comment, we introduce a macro that
+%D gets the next box and does something usefull with it.
+%D Because the \type{\afterassignment} is executed inside the
+%D box, we have to use a \type{\aftergroup} too.
+
+\ifnocontextobject \dowithnextbox \do
+
+ \def\dowithnextbox#1%
+ {\def\dodowithnextbox{#1}%
+ \afterassignment\dododowithnextbox
+ \setbox\nextbox}
+
+ \def\dododowithnextbox%
+ {\aftergroup\dodowithnextbox}
+
+\fi
+
+%D \macros
+%D {setvalue,setevalue,setxvalue,,setgvalue,
+%D getvalue,
+%D letvalue,letgvalue}
+%D
+%D The next two macros expand their argument to
+%D \type{\argument}. The first one is used to define macro's
+%D the second one executes them.
+
+\ifnocontextobject \setvalue \do
+
+ \def\setvalue #1{\expandafter\def\csname#1\endcsname}
+ \def\setevalue#1{\expandafter\edef\csname#1\endcsname}
+ \def\setgvalue#1{\expandafter\gdef\csname#1\endcsname}
+ \def\setxvalue#1{\expandafter\xdef\csname#1\endcsname}
+ \def\getvalue #1{\csname#1\endcsname}
+ \def\letvalue #1{\expandafter\let\csname#1\endcsname}
+ \def\letgvalue#1{\global\expandafter\let\csname#1\endcsname}
+\fi
+
+%D \macros
+%D {unexpanded}
+%D
+%D The next command can be used as prefixed for commands that
+%D need protection during tests and writing to files. This
+%D is a very \CONTEXT\ specific one.
+
+\ifnocontextobject \unexpanded \do
+
+ \let\unexpanded\relax
+
+\fi
+
+%D \macros
+%D {convertargument}
+%D
+%D The original one offers a bit more, like global assignment, the
+%D the next implementation is however a bit more byte saving.
+
+\ifnocontextobject \convertargument \do
+
+ \def\doconvertargument#1>{}
+
+ \long\def\convertargument#1\to#2%
+ {\long\def\@@convertedargument{#1}%
+ \edef#2{\expandafter\doconvertargument\meaning\@@convertedargument}}
+
+\fi
+
+%D \macros
+%D {forgetall}
+%D
+%D Sometimes we have to disable interference of whatever kind
+%D of skips and mechanisms. The next macro resets some.
+
+\ifnocontextobject \forgetall \do
+
+ \def\forgetall
+ {\parskip\zeropoint
+ \leftskip\zeropoint
+ \parindent\zeropoint
+ \everypar{}}
+
+\fi
+
+%D \macros
+%D {withoutpt,
+%D ScaledPointsToBigPoints,ScaledPointsToWholeBigPoints}
+%D
+%D \TEX\ lacks some real datastructure. We can however use
+%D \DIMENSIONS. This kind of trickery is needed when we want
+%D \TEX\ to communicate with the outside world (by means of
+%D \type{\specials}).
+
+\ifnocontextobject \withoutpt \do
+
+ {\catcode`\.=\@@other
+ \catcode`\p=\@@other
+ \catcode`\t=\@@other
+ \gdef\WITHOUTPT#1pt{#1}}
+
+ \def\withoutpt#1%
+ {\expandafter\WITHOUTPT#1}
+
+ \def\ScaledPointsToBigPoints#1#2%
+ {\scratchdimen=#1sp\relax
+ \scratchdimen=.996264\scratchdimen
+ \edef#2{\withoutpt{\the\scratchdimen}}}
+
+ \def\ScaledPointsToWholeBigPoints#1#2%
+ {\scratchdimen=#1sp
+ \scratchdimen=.996264\scratchdimen
+ \scratchcounter=\scratchdimen
+ \advance\scratchcounter by 32768
+ \divide\scratchcounter by 65536
+ \edef#2{\the\scratchcounter}}
+
+\fi
+
+%D \macros
+%D {doprocessfile}
+%D
+%D This macro takes three arguments: the file number, the
+%D filename and a macro that handles the content of a read
+%D line.
+
+\newif\iffileprocessed
+
+\ifnocontextobject \doprocessfile \do
+
+ \def\doprocessfile#1#2#3%
+ {\openin#1=#2\relax
+ \ifeof#1%
+ \fileprocessedfalse
+ \closein#1\relax
+ \else
+ \fileprocessedtrue
+ \gdef\dofinishfile%
+ {\closein#1\relax
+ \global\let\doprocessline\relax}%
+ \gdef\doprocessline%
+ {\ifeof#1%
+ \dofinishfile
+ \else
+ \global\read#1 to \fileline
+ #3\relax
+ \expandafter\doprocessline
+ \fi}%
+ \expandafter\doprocessline
+ \fi}
+
+\fi
+
+%D \macros
+%D {uncatcodespecials}
+%D
+%D This one is taken from the \TEX\ book. The \CONTEXT\
+%D alternative is a bit different, but we hope this one works
+%D here.
+
+\ifx\dospecials\undefined
+
+ \def\dospecials
+ {\do\ \do\\\do\{\do\}\do\$%
+ \do\#\do\^\do\_\do\&\do\%%
+ \do\~\do\^^A\do\^^K}
+
+\fi
+
+\ifnocontextobject \uncatcodespecials \do
+
+ \def\uncatcodespecials
+ {\def\do##1{\catcode`##1=12 }\dospecials
+ \catcode`\ =\@@space
+ \catcode`\^^L=\@@ignore
+ \catcode`\^^M=\@@endofline
+ \catcode`\^^?=\@@ignore}
+
+\fi
+
+\ifnocontextobject \setnaturalcatcodes \do
+
+\def\setnaturalcatcodes
+ {\catcode`\!=\@@other \catcode`\?=\@@other \catcode`\@=\@@other
+ \catcode`\#=\@@other \catcode`\&=\@@other \catcode`\|=\@@other
+ \catcode`\$=\@@other \catcode`\^=\@@other \catcode`\_=\@@other
+ \catcode`\*=\@@other \catcode`\/=\@@other
+ \catcode`\-=\@@other \catcode`+=\@@other
+ \catcode`\==\@@other \catcode`\<=\@@other \catcode`\>=\@@other
+ \catcode`\"=\@@other \catcode`\'=\@@other \catcode`\`=\@@other
+ \catcode`\:=\@@other \catcode`\;=\@@other
+ \catcode`\,=\@@other \catcode`\.=\@@other \catcode`\~=\@@other
+ \catcode`\(=\@@other \catcode`\)=\@@other
+ \catcode`\{=\@@other \catcode`\}=\@@other
+ \catcode`\\=\@@other \catcode`\%=\@@other }
+
+\fi
+
+%D \macros
+%D {doglobal}
+%D
+%D Some \CONTEXT\ low level macros can have a \type{\doglobal}
+%D prefix. Let's just forget about that here:
+
+\ifnocontextobject \doglobal \do \let\doglobal\relax \fi
+
+%D The next obscure one is needed in the generic verbatim
+%D environment. When we end up with more of these, it's time
+%D to load the module \type{syst-gen}.
+
+\ifnocontextobject \doifincsnameelse \do
+
+ \def\dodoifincsnameelse#1#2%
+ {\def\dododoifincsnameelse##1#1##2##3\war%
+ {\csname\if##2@iffalse\else iftrue\fi\endcsname}%
+ \expandafter\dododoifincsnameelse#2#1@@\war}
+
+ \long\def\doifincsnameelse#1#2#3#4%
+ {\edef\@@instring{#1}%
+ \expandafter\dodoifincsnameelse\expandafter{\@@instring}{#2}%
+ #3%
+ \else
+ #4%
+ \fi}
+
+\fi
+
+%D \macros
+%D {dostepwiserecurse, dorecurse, doloop, exitloop}
+%D
+%D The next loop macro is a real weak one, and does not offer
+%D the full \CONTEXT\ functionality, let alone nesting, but
+%D for simple purposes, its behaviour is acceptable.
+
+\newcount\recursecounter
+
+\def\dostepwiserecurse#1#2#3#4% very weak and rubishly version
+ {\ifnum#2<#1\relax\else\dodostepwiserecurse{#1}{#2}{#3}{#4}\fi}
+
+\def\dodostepwiserecurse#1#2#3#4% very weak and rubishly version
+ {\recursecounter=#1\relax
+ \loop
+ \edef\recurselevel{\the\recursecounter}%
+ #4\relax
+ \ifnum\recursecounter<#2\relax
+ \advance\recursecounter by #3\relax
+ \repeat}
+
+\def\dorecurse#1%
+ {\dostepwiserecurse{1}{#1}{1}}
+
+\def\doloop
+ {\dostepwiserecurse{1}{\maxdimen}{1}}
+
+\def\exitloop
+ {\recursecounter=\maxdimen}
+
+%D \macros
+%D {ifundefined,doifdefined,doifundefined,
+%D doifdefinedelse,doifundefinedelse}
+%D
+%D These alteratives are not robust but suitable for simple
+%D usage. The official ones are a bit faster.
+
+\ifnocontextobject \doifdefined \do
+
+ \def\ifundefined#1%
+ {\expandafter\ifx\csname#1\endcsname\relax}
+
+ \def\doifdefinedelse#1#2#3%
+ {\expandafter\ifx\csname#1\endcsname\relax#3\else#2\fi}
+
+ \def\doifundefinedelse#1#2#3%
+ {\expandafter\ifx\csname#1\endcsname\relax#2\else#3\fi}
+
+ \def\doifdefined#1#2%
+ {\expandafter\ifx\csname#1\endcsname\relax\else#2\fi}
+
+ \def\doifundefined#1#2%
+ {\expandafter\ifx\csname#1\endcsname\relax#2\fi}
+
+\fi
+
+%D \macros
+%D {doifinstringelse}
+%D
+%D It seems like we end up with more and more macros here.
+%D Sigh.
+
+\ifnocontextobject \doifinstringelse \do
+
+ \def\p!doifinstringelse#1#2%
+ {\def\pp!doifinstringelse##1#1##2##3\war%
+ {\csname if\if##2@fals\else tru\fi e\endcsname}%
+ \expanded{\pp!doifinstringelse#2#1@@\noexpand\war}}
+
+ \long\def\doifinstringelse#1#2#3#4%
+ {\edef\@@@instring{#1}%
+ \@EA\p!doifinstringelse\@EA{\@@@instring}{#2}#3\else#4\fi}
+
+\fi
+
+%D \macros
+%D {twodigitrounding}
+%D
+%D We don't support rounding outside \CONTEXT. Sorry.
+
+\def\twodigitrounding#1{#1}
+
+%D \macros
+%D {lineheight}
+%D
+%D In \CONTEXT\ we have \type{\lineheight}, which in many
+%D cases matches \type {\baselineskip}.
+
+\ifnocontextobject \lineheight \do
+
+ \def\lineheight{\baselineskip}
+
+\fi
+
+%D \macros
+%D {dohandletokens}
+%D
+%D The following macro is the simplified version, but good
+%D enough for day to day hacks.
+%D
+%D \starttyping
+%D \dohandletokens some text\with\somemacro
+%D \stoptyping
+
+\ifnocontextobject \dohandletokens \do
+
+\def\dodohandletokens
+ {\ifx\next\end \else
+ \docommand{\next}%
+ \expandafter\dohandletokens
+ \fi}
+
+\def\dohandletokens
+ {\afterassignment\dodohandletokens\let\next= }
+
+\long\def\handletokens#1\with#2%
+ {\let\docommand=#2%
+ \dohandletokens#1\end}
+
+\fi
+
+%D Very reduced:
+
+\long\def\appendtoks#1\to#2%
+ {\scratchtoks{#1}\expanded{#2{\the#2\the\scratchtoks}}}
+
+%D Well, also handy.
+
+\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 New.
+
+\let\donothing\empty
+
+%D Also new:
+
+\def\letempty #1{\let#1\empty}
+\def\globalletempty#1{\global\let#1\empty}
+
+\def\letvalueempty #1{\expandafter\let\csname#1\endcsname\empty}
+\def\letgvalueempty#1{\global\expandafter\let\csname#1\endcsname\empty}
+
+%D Sigh
+
+\def\settrue #1{\chardef#1\zerocount}
+\def\setfalse#1{\chardef#1\plusone}
+
+\let\newconditional = \setfalse
+\let\ifconditional = \ifcase
+
+%D We could load \type {norm-tex} but this takes less hash space:
+
+\let \normalif = \if
+\let \normalifcase = \ifcase
+\let \normalifcat = \ifcat
+\let \normalifdim = \ifdim
+\let \normalifeof = \ifeof
+\let \normaliffalse = \iffalse
+\let \normalifhbox = \ifhbox
+\let \normalifhmode = \ifhmode
+\let \normalifinner = \ifinner
+\let \normalifmmode = \ifmmode
+\let \normalifnum = \ifnum
+\let \normalifodd = \ifodd
+\let \normaliftrue = \iftrue
+\let \normalifvbox = \ifvbox
+\let \normalifvmode = \ifvmode
+\let \normalifvoid = \ifvoid
+\let \normalifx = \ifx
+\let \normalfi = \fi
+\let \normalelse = \else
+
+\let \normalunexpanded = \unexpanded % beware the primitive, not the context one
+
+%D That's it. Please forget this junk and take a look at how
+%D it should be done.
+
+\StopLatexHack \protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/supp-mis.tex b/Master/texmf-dist/tex/context/base/mkii/supp-mis.tex
index bda8d4f6fda..bda8d4f6fda 100644
--- a/Master/texmf-dist/tex/context/base/supp-mis.tex
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-mis.tex
diff --git a/Master/texmf-dist/tex/context/base/mkii/supp-mpe.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-mpe.mkii
new file mode 100644
index 00000000000..2e5e7e52820
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-mpe.mkii
@@ -0,0 +1,1371 @@
+%D \module
+%D [ file=supp-mpe,
+%D version=1999.07.10,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=METAPOST Special Extensions,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% fuzzy and complicating is the fact that we need to support
+% context as well as mptopdf, so we cannot fall back on the
+% special drivers and color module (although there may be
+% good reasons to use a smaller context instead); also,
+% shading is handled here while it should move to the special
+% driver - to do!
+
+%D This module is still experimental and deals with some
+%D extensions to \METAPOST. When using \POSTSCRIPT\ output,
+%D these extensions can be supplied by means of proper
+%D preamble definitions, but when producing \PDF\ we have to
+%D set up the appropriate datastructures ourselves. It acts as
+%D a plug in into \type {supp-pdf}. As soon as we need more
+%D extensions, we will generalize these macro. Some
+%D definitions will move to the special drivers.
+
+%D For usage in plain \TEX, say something:
+%D
+%D \starttyping
+%D \input supp-pdf
+%D \input supp-mpe
+%D
+%D \MPcmykcolorstrue
+%D \MPspotcolorstrue
+%D \makeMPintoPDFobject\plusone
+%D \stoptyping
+
+\ifx\writestatus\undefined
+ \immediate\write16{[Loading MPS to PDF extensions.]}
+\else
+ \writestatus{loading}{ConTeXt Support Macros / MPS extensions}
+\fi
+
+%D We implement extensions by using the \METAPOST\ special
+%D mechanism. Opposite to \TEX's specials, the \METAPOST\ ones
+%D are flushed before or after the graphic data, but thereby
+%D are no longer connected to a position.
+%D
+%D We implement specials by overloading the \type {fill}
+%D operator. By counting the fills, we can let the converter
+%D treat the appropriate fill in a special way. The
+%D specification of the speciality can have two forms,
+%D determined by the setting of a boolean variable:
+%D
+%D \starttyping
+%D _inline_specials_ := false ; % comment like code (default)
+%D _inline_specials_ := true ; % command like code
+%D \stoptyping
+%D
+%D When the specification is embedded as comment, it looks
+%D like:
+%D
+%D \starttyping
+%D %%MetaPostSpecial <size> <data> <number> <identifier>
+%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 \starttyping
+%D inline : <data> <number> <identifier> <size> special
+%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
+%D has identifier~2. Alltogether, the number of parameters is
+%D specified in \type {size}. The \type {number} is the number
+%D of the fill that needs the special treatment. For a type~2
+%D and~3 shaded fill, the datablock contains the following
+
+%D data:
+%D
+%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 \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. \footnote {Actually,
+%D the macros here are just as generic.}
+%D
+%D Currently the only extension concerns shading, which is
+%D accomplished by handling yet another value of \type
+%D {\finiMPpath}. The recource disctionary is stored and
+%D later picked up by the general \CONTEXT\ figure inclusion
+%D macros.
+
+\unprotect
+
+%D The \type {%%MetaPostSpecials: version.revision signal} line
+%D triggers this module into handling color specifications kind
+%D of special. We need this safeguard for non||special
+%D usage.
+
+\chardef\MPspecialversion = 0 % specials when >1
+\chardef\MPspecialrevision = 0 % specials when >1
+\chardef\MPspecialsignal = 0 % passed on by graphic
+
+\chardef\inlineMPspecials = 1 % only needed for stack resetting
+
+%D This macro handles the special definitions that are
+%D passed as comment.
+
+\def\dohandleMPspecialcomment#1
+ {\setMPargument{#1}%
+ \advance\scratchcounter \minusone
+ \ifcase\scratchcounter
+ \handleMPspecialcommand
+ \donetrue
+ \doresetMPstack
+ \let\handleMPsequence\dohandleMPsequence
+ \expandafter\handleMPsequence
+ \else
+ \expandafter\dohandleMPspecialcomment
+ \fi}
+
+\def\handleMPspecialcomment #1 % number of arguments
+ {\doresetMPstack
+ \scratchcounter#1\relax
+ \ifcase\scratchcounter % when zero, inline shading is used
+ \chardef\inlineMPspecials\plusone
+ \let\handleMPsequence\dohandleMPsequence
+ \expandafter\handleMPsequence
+ \else
+ \chardef\inlineMPspecials\zerocount
+ \expandafter\dohandleMPspecialcomment
+ \fi}
+
+%D When defined inline, we use another macro to handle the
+%D definitions. Actually, this macro is called by the
+%D previous ones.
+
+\def\handleMPspecialcommand
+ {\ifcase\inlineMPspecials\or
+ \advance\nofMParguments \minusone % pop the size
+ \fi
+ \ifundefined\MPspecial
+ \message{[unknown \MPspecial]}%
+ \else
+ \csname\MPspecial\endcsname
+ \fi
+ \ifcase\inlineMPspecials
+ \doresetMPstack % 0
+ \else
+ \resetMPstack % 1
+ \fi}
+
+%D This macro triggers special support. Currently, the
+%D version and revision number are not used. Any version number
+%D greater than zero will enable special support.
+
+\newconditional\manyMPspecials % \settrue\manyMPspecials
+
+\def\handleMPspecialscomment #1.#2 #3 % version.revision signal #4=div=1000|10000
+ {\doresetMPstack
+ \chardef\MPspecialversion #1%
+ \chardef\MPspecialrevision#2%
+ \chardef\MPspecialsignal #3%
+ \let\handleMPsequence\dohandleMPsequence
+ \ifnum#1=\plusone
+ \expandafter\handleMPsequence
+ \else
+ \expandafter\handleMPspecialscommentx
+ \fi}
+
+\def\handleMPspecialscommentx #1 % version 2
+% {\doifelsedoifelse{#1}{10000}{\settrue\manyMPspecials}{\setfalse\manyMPspecials}% local
+ {\ifnum10000=0#1\relax
+ \settrue \manyMPspecials
+ \else
+ \setfalse\manyMPspecials
+ \fi
+ \setMPextensions
+ \handleMPsequence}
+
+% one can say (in meta-ini):
+%
+% \prependtoks
+% _special_div_ := 1000\ifconditional\manyMPspecials0\fi ;
+% \to \MPextensions
+
+%D In case of \PDF, we need to prepare resourcs.
+
+\newtoks\MPstartresources
+\newtoks\MPstopresources
+
+\def\startMPresources
+ {\the\MPstartresources
+ \ifx\currentPDFresources\empty\else
+ \message{[unused resources]}%
+ \fi
+ \global\let\currentPDFresources\empty}
+
+\def\stopMPresources
+ {\let\currentPDFresources\empty
+ \the\MPstopresources}
+
+%D Since colors are not subjected to transformations, we can
+%D only use colors as signal. In our case, we use a dummy colored
+%D path with a red color component of \type {0.n}, so \type
+%D {0.001} is the first path and \type {0.010} the tenth. Since
+%D \METAPOST strips trailing zeros, we have to padd the string.
+
+\newif\ifMPcmykcolors
+\newif\ifMPspotcolors
+
+\ifx\normalhandleMPrgbcolor\undefined % in case we reload this module
+
+ \let\normalhandleMPrgbcolor \handleMPrgbcolor
+ \let\normalhandleMPcmykcolor\handleMPcmykcolor
+ \let\normalhandleMPgraycolor\handleMPgraycolor
+ \let\normalhandleMPspotcolor\handleMPspotcolor
+
+\fi
+
+%D When we are using \CONTEXT, we will fall back to the
+%D better color conversion routines. This also has the advantage
+%D that we don't have to parse and convert the file. In this
+%D alternative, \type {\!MP} is not (yet) supported. Because
+%D we can (for efficiency reasons) turn off strokecolor,
+%D something we cannot do in \METAPOST\ converted code.
+
+\newif\ifPDFMPstrokecolor \PDFMPstrokecolortrue
+
+%D [This code should move to meta-ini.]
+
+\ifCONTEXT % we can use this for a better xgstate handling
+
+ \def\checkPDFMPstrokecolor
+ {\ifPDFMPstrokecolor \PDFstrokecolortrue \fi}
+
+ \def\normalhandleMPrgbcolor
+ {{\checkPDFMPstrokecolor\execcolorR\gMPa1:\gMPa2:\gMPa3:0:0\od}}
+
+ \def\normalhandleMPcmykcolor
+ {{\checkPDFMPstrokecolor\execcolorC\gMPa1:\gMPa2:\gMPa3:\gMPa4:0:0\od}}
+
+ \def\normalhandleMPgraycolor
+ {{\checkPDFMPstrokecolor\execcolorS\gMPa1:0:0\od}}
+
+% \def\normalhandleMPspotcolor
+% {{\checkPDFMPstrokecolor\execcolorP\gMPa1:\gMPa2:0:0\od}}
+
+ \def\normalhandleMPspotcolor % ???
+ {{\checkPDFMPstrokecolor\execcolorP\gMPa1:\gMPa2:\gMPa3:\gMPa4:0:0\od}}
+
+\fi
+
+% In the previous macros we use the special drivers. A more
+% direct approach would have been:
+%
+% \def\doPDFstartrgbcolormode#1#2#3%
+% {\PDFcode{#1 #2 #3 rg #1 #2 #3 RG}}
+%
+% \def\doPDFstartcmykcolormode#1#2#3#4%
+% {\PDFcode{#1 #2 #3 #4 k #1 #2 #3 #4 K}}
+%
+% \def\doPDFstartgraycolormode#1%
+% {\PDFcode{#1 g #1 G}}
+%
+% \appendtoks
+% \let\dostartrgbcolormode \doPDFstartrgbcolormode
+% \let\dostartcmykcolormode\doPDFstartcmykcolormode
+% \let\dostartgraycolormode\doPDFstartgraycolormode
+% \to \everyMPtoPDFconversion
+
+%D Now we can handle special color signals. We only do this
+%D when special are detected.
+
+% \def\MPrgbnumber#1{\expandafter\doMPrgbnumber#1000.0000\relax}
+% \def\doMPrgbnumber#1.#2#3#4#5\relax{#2#3#4}
+
+%D We cannot use \type {\everyMPtoPDFconversion} because in \MPTOPDF\
+%D we don't have the \type {\appendtoks} macro available.
+
+\def\setMPextensions
+ {\ifconditional\manyMPspecials
+ \def\MPrgbnumber##1{\expandafter\doMPrgbnumber##10000.00000\relax}%
+ \def\doMPrgbnumber##1.##2##3##4##5##6\relax{##2##3##4##5}%
+ \else
+ \def\MPrgbnumber##1{\expandafter\doMPrgbnumber##1000.0000\relax}%
+ \def\doMPrgbnumber##1.##2##3##4##5\relax{##2##3##4}%
+ \fi}
+
+%D The naive case looks like:
+%D
+%D \starttyping
+%D \def\handleMPrgbcolor%
+%D {\setMPcolor
+%D \ifcase\MPspecialversion
+%D \resetMPcolor\normalhandleMPrgbcolor
+%D \else\ifnum\MPrgbnumber\lastMPrvalue=\MPspecialsignal
+%D % consider it to be a signal
+%D \else
+%D \resetMPcolor\normalhandleMPrgbcolor
+%D \fi\fi}
+%D \stoptyping
+%D
+%D However, since we want \CMYK\ support, we will use the
+%D following implementation:
+
+% \def\setMPcolor
+% {\edef\lastMPrvalue{\gMPa1}%
+% \edef\lastMPgvalue{\gMPa2}%
+% \edef\lastMPbvalue{\gMPa3}}
+%
+% speed up (hardly called, so no let is needed)
+
+\def\setMPcolor
+ {\edef\lastMPrvalue{\csname\@@MP01\endcsname}%
+ \edef\lastMPgvalue{\csname\@@MP02\endcsname}%
+ \edef\lastMPbvalue{\csname\@@MP03\endcsname}}
+
+\def\zeroMPrgbvalue{0.0}
+
+\def\resetMPcolor
+ {\let\lastMPrvalue\zeroMPrgbvalue
+ \let\lastMPgvalue\zeroMPrgbvalue
+ \let\lastMPbvalue\zeroMPrgbvalue}
+
+\resetMPcolor
+
+\def\@@MPSK{@MPSK@}
+\def\@@MPSP{@MPSP@}
+
+\def\interceptMPcmykcolor % todo : \ifMPcmykcolors
+ {\ifcase\MPrgbnumber\lastMPgvalue
+ % cannot happen
+ \or
+ % 1 == cmyk color spec
+ \ifMPcmykcolors \dointerceptMPcmykcolor \fi
+ \or
+ % 2 == spot color
+ \ifMPspotcolors \dointerceptMPspotcolor \fi
+ \or
+ % 3 == rgb transparency
+ \invokeMPtransparencyspecial
+ \or
+ % 4 == cmyk transparency
+ \ifMPcmykcolors \invokeMPtransparencyspecial \fi
+ \or
+ % 5 == spot transparency
+ \ifMPspotcolors \invokeMPtransparencyspecial \fi
+ \else
+ % \writestatus{MPtoPDF}{unknown direct special}%
+ \fi}
+
+% ifcsname
+
+\def\dointerceptMPcmykcolor
+ {\revokeMPtransparencyspecial
+ \@EA\ifx\csname\@@MPSK\number\MPrgbnumber\lastMPbvalue\endcsname\relax\else
+ \@EA\@EA\@EA\setMPcmyk\csname\@@MPSK\number\MPrgbnumber\lastMPbvalue\endcsname
+ \normalhandleMPcmykcolor
+ \fi}
+
+\def\dointerceptMPspotcolor
+ {\revokeMPtransparencyspecial
+ \@EA\ifx\csname\@@MPSP\number\MPrgbnumber\lastMPbvalue\endcsname\relax\else
+ \@EA\@EA\@EA\setMPspot\csname\@@MPSP\number\MPrgbnumber\lastMPbvalue\endcsname
+ \normalhandleMPspotcolor
+ \fi}
+
+\def\handleMPrgbcolor
+ {\resetMPcolor
+ \ifcase\MPspecialversion
+ \normalhandleMPrgbcolor
+ \else
+ \setMPcolor
+ \ifnum\MPrgbnumber\lastMPrvalue=\MPspecialsignal\relax
+ \interceptMPcmykcolor
+ \else
+ \revokeMPtransparencyspecial
+ \normalhandleMPrgbcolor
+ \fi
+ \fi}
+
+\def\handleMPgraycolor
+ {\resetMPcolor
+ \ifcase\MPspecialversion \else \revokeMPtransparencyspecial \fi
+ \normalhandleMPgraycolor}
+
+\def\handleMPcmykcolor
+ {\resetMPcolor
+ \ifcase\MPspecialversion \else \revokeMPtransparencyspecial \fi
+ \normalhandleMPcmykcolor}
+
+%D Specials are define and recalled using:
+
+\def\MPspecial
+ {MP special \gMPs\nofMParguments}
+
+\def\defineMPspecial#1#2%
+ {\setvalue{MP special #1}{#2}}
+
+%D The path processing macro is slightly extended.
+
+\newtoks \invokeMPspecials
+
+\def\finishMPpath
+ {\PDFcode
+ {\ifcase\finiMPpath W n\or S\or f\or B\else W n\fi
+ \extraMPpathcode}}
+
+\def\processMPpath
+ {\checkMPpath % !
+ \ifcase\nofMPsegments\else
+ \let\extraMPpathcode\empty
+ \ifcase\MPspecialversion\else
+ \ifnum\MPrgbnumber\lastMPrvalue=\MPspecialsignal
+ \ifnum\MPrgbnumber\lastMPgvalue>10 % really needed
+ \scratchcounter\MPrgbnumber\lastMPbvalue
+ \edef\currentMPspecial{\the\scratchcounter}%
+\let\previousMPcolorspec\currentMPcolorspec
+\edef\currentMPcolorspec{\lastMPrvalue\lastMPgvalue\lastMPbvalue}%
+\ifx\previousMPcolorspec\currentMPcolorspec \else
+ \revokeMPtransparencyspecial
+\fi
+ \ifnum\finiMPpath=2 % to outer level
+ \the\invokeMPspecials
+ \fi
+ \fi
+ \fi
+ \fi
+ \flushMPpath
+ \closeMPpath
+ \finishMPpath
+ \fi
+ \let\handleMPsequence\dohandleMPsequence
+ \resetMPstack
+ \nofMPsegments0
+ \handleMPsequence}
+
+%D Shading is an example of a more advanced graphic feature,
+%D but users will seldom encounter those complications. Here
+%D we only show a few simple examples, but many other
+%D alternatives are possible by setting up the functions built
+%D in \PDF\ in the appropriate way.
+%D
+%D Shading has to do with interpolation between two or more
+%D points or user supplied ranges. In \PDF, the specifications
+%D of a shade has to be encapsulated in objects and passed on
+%D as resources. This is a \PDF\ level 1.3. feature. One can
+%D simulate three dimensional shades as well and define simple
+%D functions using a limited set of \POSTSCRIPT\ primitives.
+%D Given the power of \METAPOST\ and these \PDF\ features, we
+%D can achieve superb graphic effects.
+%D
+%D Since everything is hidden in \TEX\ and \METAPOST\ graphics,
+%D we can stick to high level \CONTEXT\ command, as shown in
+%D the following exmples.
+%D
+%D \startbuffer
+%D \startuniqueMPgraphic{CircularShade}
+%D path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
+%D circular_shade(p,0,.2red,.9red) ;
+%D \stopuniqueMPgraphic
+%D
+%D \startuniqueMPgraphic{LinearShade}
+%D path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
+%D linear_shade(p,0,.2blue,.9blue) ;
+%D \stopuniqueMPgraphic
+%D
+%D \startuniqueMPgraphic{DuotoneShade}
+%D path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
+%D linear_shade(p,2,.5green,.5red) ;
+%D \stopuniqueMPgraphic
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \getbuffer
+%D
+%D These graphics can be hooked into the overlay mechanism,
+%D which is available in many commands.
+%D
+%D \startbuffer
+%D \defineoverlay[demo 1][\uniqueMPgraphic{CircularShade}]
+%D \defineoverlay[demo 2][\uniqueMPgraphic {LinearShade}]
+%D \defineoverlay[demo 3][\uniqueMPgraphic {DuotoneShade}]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \getbuffer
+%D
+%D These backgrounds can for instance be applied to \type
+%D {\framed}:
+%D
+%D \startbuffer
+%D \setupframed[width=3cm,height=2cm,frame=off]
+%D \startcombination[3*1]
+%D {\framed[background=demo 1]{\bfd \white Demo 1}} {}
+%D {\framed[background=demo 2]{\bfd \white Demo 2}} {}
+%D {\framed[background=demo 3]{\bfd \white Demo 3}} {}
+%D \stopcombination
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%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.
+%D
+%D \def\SomeShade#1#2#3#4#5%
+%D {\startuniqueMPgraphic{Shade-#1}
+%D width := \overlaywidth ;
+%D height := \overlayheight ;
+%D path p ; p := unitsquare xscaled width yscaled height ;
+%D #2_shade(p,#3,#4,#5) ;
+%D \stopuniqueMPgraphic
+%D \defineoverlay[Shade-#1][\uniqueMPgraphic{Shade-#1}]%
+%D \framed[backgroundachtergrond=Shade-#1,width=2cm,height=2cm,frame=off]{}}
+%D
+%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 \stopcombination
+%D \stoplinecorrection
+%D
+%D \blank
+%D
+%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 \stopcombination
+%D \stoplinecorrection
+%D
+%D \blank
+%D
+%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 \stopcombination
+%D \stoplinecorrection
+%D
+%D These macros closely cooperate with the \METAPOST\ module
+%D \type {mp-spec.mp}, which is part of the \CONTEXT\
+%D distribution.
+%D
+%D The low level (\PDF) implementation is based on the \TEX\
+%D based \METAPOST\ to \PDF\ converter. Shading is supported
+%D by overloading the \type {fill} operator as implemented
+%D earlier. In \PDF\ type~2 and~3 shading functions are
+%D specified in terms of:
+%D
+%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 \stoptabulate
+
+\newcount\currentPDFshade % 0 % global (document wide) counter
+\let\currentMPshades\empty
+
+\def\startMPshading#1%
+ {\edef\currentMPspecial{\gMPs{#1}}}
+
+\def\stopMPshading
+ {\global\advance\currentPDFshade \plusone
+ \setxvalue{obj:Sh:\currentMPspecial}%
+ {/Sh\the\currentPDFshade\space\the\pdflastobj\space0 R }%
+ \setxvalue{mps:Sh:\currentMPspecial}%
+ {\the\currentPDFshade}}
+
+\appendtoks
+ \global\let\currentMPshades\empty
+\to \MPstartresources
+
+\appendtoks
+ \ifx\currentMPshades\empty \else
+ \xdef\currentPDFresources{\currentPDFresources
+ /Shading <<\currentMPshades>>}%
+ \fi
+\to \MPstopresources
+
+\def\invokeMPshadespecial
+ {\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
+
+%D We need to convert the \CMYK\ specials into colors, because
+%D we have to do it twice, we define a macro.
+
+% \def\checkMPshadingcolor#1#2#3#4#5%
+% {\edef\tempMPrvalue{\csname\@@MP0#1\endcsname}%
+% \edef\tempMPgvalue{\csname\@@MP0#2\endcsname}%
+% \edef\tempMPbvalue{\csname\@@MP0#3\endcsname}%
+% \edef#5%
+% {\ifx\tempMPrvalue\tempMPgvalue
+% \ifx\tempMPrvalue\tempMPbvalue
+% \ifx\tempMPgvalue\tempMPbvalue
+% \tempMPbvalue
+% \fi
+% \fi
+% \fi}%
+% \edef#4% todo : spotcolors
+% {\ifnum\MPrgbnumber\tempMPrvalue=\MPspecialsignal\space
+% \ifMPcmykcolors\getvalue{\@@MPSK\number\MPrgbnumber\tempMPbvalue}\fi
+% \fi}}
+
+\def\checkMPshadingcolor#1#2#3#4#5%
+ {\edef\tempMPrvalue{\csname\@@MP0#1\endcsname}%
+ \edef\tempMPgvalue{\csname\@@MP0#2\endcsname}%
+ \edef\tempMPbvalue{\csname\@@MP0#3\endcsname}%
+ \global\let\MPresolvedspace\MPgrayspace
+ \global\let\MPresolvedcolor\!!zerocount
+ \ifnum\MPrgbnumber\tempMPrvalue=\MPspecialsignal\relax
+ \ifcase\MPrgbnumber\tempMPgvalue
+ \or % 1 = cmyk
+ \ifMPcmykcolors
+ \expanded{\resolveMPcmykcolor\getvalue{\@@MPSK\number\MPrgbnumber\tempMPbvalue}}\end
+ \fi
+ \or % 2 = spot
+ \ifMPspotcolors
+ \expanded{\resolveMPspotcolor\getvalue{\@@MPSP\number\MPrgbnumber\tempMPbvalue}}\end
+ \fi
+ \or
+ % 3 = rgb transparency
+ % to do
+ \or
+ % 4 == cmyk transparency
+ % \ifMPcmykcolors
+ % to do
+ % \fi
+ \or
+ % 5 == spot transparency
+ % \ifMPspotcolors
+ % to do
+ % \fi
+ \fi
+ \else
+ \ifx\tempMPrvalue\tempMPgvalue
+ \ifx\tempMPrvalue\tempMPbvalue
+ \expanded{\resolveMPgraycolor\tempMPbvalue}\end
+ \else
+ \expanded{\resolveMPrgbcolor\tempMPrvalue\space\tempMPgvalue\space\tempMPbvalue}\end
+ \fi
+ \else
+ \expanded{\resolveMPrgbcolor\tempMPrvalue\space\tempMPgvalue\space\tempMPbvalue}\end
+ \fi
+ \fi
+ \let#4\MPresolvedcolor
+ \let#5\MPresolvedspace}
+
+%D We also need to make sure that we have two \RGB\ or
+%D \CMYK colors, since we have to set the colorspace.
+
+\def\setMPshadingcolors#1#2#3#4#5#6% color space
+ {\checkMPshadingcolor{#1}{#2}{#3}\MPshadeAc\MPshadeAs
+ \checkMPshadingcolor{#4}{#5}{#6}\MPshadeBc\MPshadeBs
+ \ifx\MPshadeAs\MPshadeBs
+ \let\MPshadeA\MPshadeAc
+ \let\MPshadeB\MPshadeBc
+ \let\MPshadeC\MPshadeAs
+ \else\ifx\MPshadeAs\MPgrayspace
+ \ifx\MPshadeBs\MPrgbspace
+ \edef\MPshadeA{\MPshadeAc\space\MPshadeAc\space\MPshadeAc}%
+ \else
+ \negatecolorcomponent\MPshadeAc
+ \edef\MPshadeA{0 0 0 \MPshadeAc}%
+ \fi
+ \let\MPshadeB\MPshadeBc
+ \let\MPshadeC\MPshadeBs
+ \else\ifx\MPshadeBs\MPgrayspace
+ \let\MPshadeA\MPshadeAc
+ \ifx\MPshadeAs\MPrgbspace
+ \edef\MPshadeB{\MPshadeBc\space\MPshadeBc\space\MPshadeBc}%
+ \else
+ \negatecolorcomponent\MPshadeBc
+ \edef\MPshadeB{0 0 0 \MPshadeBc}%
+ \fi
+ \let\MPshadeC\MPshadeAs
+ \else
+ % different color spaces
+ \def\MPshadeA{1}%
+ \def\MPshadeB{1}%
+ \let\MPshadeC\MPgrayspace
+ \fi\fi\fi}
+
+\let\MPshadeA\MPcmykWhite
+\let\MPshadeB\MPcmykBlack
+\let\MPshadeC\MPgrayspace
+
+%D The reason why this macro is a bit complicates is that we
+%D handle black and white situations (otherwise we would have
+%D to use \CMYK\ b/w in case of a \CMYK\ shade).
+
+%D Here are the special handlers:
+
+\defineMPspecial{30}
+ {\startMPshading{14}% type 2
+ \setMPshadingcolors{4}{5}{6}{9}{10}{11}%
+ \immediate\pdfobj
+ {<</FunctionType 2
+ /Domain [\gMPs1 \gMPs2]
+ /C0 [\MPshadeA]
+ /C1 [\MPshadeB]
+ /N \gMPs3>>}%
+ \immediate\pdfobj
+ {<</ShadingType 2
+ /ColorSpace /\MPshadeC\space
+ /Function \the\pdflastobj\space 0 R
+ /Coords [\gMPs7 \gMPs8 \gMPs{12} \gMPs{13}]
+ /Extend [true true]>>}%
+ \stopMPshading}
+
+\defineMPspecial{31}
+ {\startMPshading{16}% type 3
+ \setMPshadingcolors{4}{5}{6}{10}{11}{12}%
+ \immediate\pdfobj
+ {<</FunctionType 2
+ /Domain [\gMPs1 \gMPs2]
+ /C0 [\MPshadeA]
+ /C1 [\MPshadeB]
+ /N \gMPs3>>}%
+ \immediate\pdfobj
+ {<</ShadingType 3
+ /ColorSpace /\MPshadeC\space
+ /Function \the\pdflastobj\space 0 R
+ /Coords [\gMPs7 \gMPs8 \gMPs9 \gMPs{13} \gMPs{14} \gMPs{15}]
+ /Extend [true true]>>}%
+ \stopMPshading}
+
+%D Figure inclusion is kind of strange to \METAPOST, but when
+%D Santiago Muelas started discussing this with me, I was able
+%D to cook up a solution using specials.
+
+\def\invokeMPfigurespecial%
+ {\getvalue{mps:gr:\currentMPspecial}} % or \relax
+
+\appendtoks \invokeMPfigurespecial \to \invokeMPspecials
+
+\defineMPspecial{10}
+ {\setxvalue{mps:gr:\gMPs8}%
+ {\noexpand\handleMPfigurespecial
+ {\gMPs1}{\gMPs2}{\gMPs3}{\gMPs4}{\gMPs5}{\gMPs6}{\gMPs7}%
+ \noexpand\setxvalue{mps:gr:\gMPs8}{}}}
+
+% \def\handleMPfigurespecial#1#2#3#4#5#6#7%
+% {\vbox to 0pt
+% {\vss
+% \hbox to 0pt
+% {\pdfliteral{q #1 #2 #3 #4 #5 #6 cm}%
+% \pdfimage width 1bp height 1bp {#7}% maybe 10 is better
+% \pdfliteral{Q}%
+% \hss}}}
+%
+% better, since xform reuse
+
+\def\handleMPfigurespecial#1#2#3#4#5#6#7% todo : combine with ext fig
+ {\vbox to \zeropoint
+ {\vss
+ \hbox to \zeropoint
+ {\ifcase\pdfoutput\or % will be hooked into the special driver
+ \doiffileelse{#7}
+ {\doifundefinedelse{mps:x:#7}
+ {\immediate\pdfximage\!!width\onebasepoint\!!height\onebasepoint{#7}%
+ \setxvalue{mps:x:#7}{\pdfrefximage\the\pdflastximage}}%
+ {\message{[reusing figure #7]}}%
+ \PDFcode{q #1 #2 #3 #4 #5 #6 cm}%
+ \rlap{\getvalue{mps:x:#7}}%
+ \PDFcode{Q}}
+ {\message{[unknown figure #7]}}%
+ \fi
+ \hss}}}
+
+%D An example of using both special features is the
+%D following.
+%D
+%D \starttyping
+%D \startMPpage
+%D externalfigure "hakker1b.png" scaled 22cm rotated 10 shifted (-2cm,0cm);
+%D externalfigure "hakker1b.png" scaled 10cm rotated -10 ;
+%D externalfigure "hakker1b.png" scaled 7cm rotated 45 shifted (8cm,12cm) ;
+%D path p ; p := unitcircle xscaled 15cm yscaled 20cm;
+%D path q ; q := p rotatedaround(center p,90) ;
+%D path r ; r := buildcycle(p,q) ; clip currentpicture to r ;
+%D path s ; s := boundingbox currentpicture enlarged 5mm ;
+%D picture c ; c := currentpicture ; currentpicture := nullpicture ;
+%D circular_shade(s,0,.2red,.9red) ;
+%D addto currentpicture also c ;
+%D \stopMPpage
+%D \stoptyping
+
+%D This is some experimental hyperlink driver that I wrote
+%D for Mark Wicks.
+
+\defineMPspecial{20}
+ {\setxvalue{mps:hl:\gMPs6}%
+ {\noexpand\handleMPhyperlink
+ {\gMPs1}{\gMPs2}{\gMPs3}{\gMPs4}{\gMPs5}%
+ \noexpand\setxvalue{mps:hl:\gMPs6}{}}}
+
+\def\handleMPhyperlink#1#2#3#4#5%
+ {%\ifcase\pdfoutput\or
+ \setbox\scratchbox\hbox
+ {\setbox\scratchbox\null
+ \scratchdimen#1\onebasepoint\scratchdimen-\scratchdimen
+ \advance\scratchdimen#3\onebasepoint
+ \wd\scratchbox\scratchdimen
+ \scratchdimen#2\onebasepoint\scratchdimen-\scratchdimen
+ \advance\scratchdimen#4\onebasepoint
+ \ht\scratchbox\scratchdimen
+ \incolorfalse
+ \gotobox{\box\scratchbox}[#5]}%
+ \setbox\scratchbox\hbox
+ {\scratchdimen\MPxoffset\onebasepoint\advance\scratchdimen#1\onebasepoint
+ \hskip\scratchdimen
+ \scratchdimen\MPyoffset\onebasepoint\advance\scratchdimen#2\onebasepoint
+ \raise\scratchdimen\box\scratchbox}%
+ \smashbox\scratchbox
+ \box\scratchbox
+ }%\fi}
+
+\def\invokeMPhyperlinkspecial%
+ {\getvalue{mps:hl:\currentMPspecial}} % or \relax
+
+\appendtoks \invokeMPhyperlinkspecial \to \invokeMPspecials
+
+%D Special number~1 is dedicated to \CMYK\ support. If you
+%D want to know why: look at this:
+%D
+%D \startbuffer[mp]
+%D fill fullcircle xyscaled (3cm,1cm) withcolor \MPcolor{test} ;
+%D \stopbuffer
+%D
+%D \startbuffer[cmyk]
+%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 \stopcombination
+%D \stopbuffer
+%D
+%D \placefigure
+%D {\CMYK\ support disabled,
+%D conversion to \RGB.}
+%D {\setupcolors[cmyk=nee,state=start]\getbuffer[cmyk]}
+%D
+%D \placefigure
+%D {\CMYK\ support enabled,
+%D no support in \METAPOST.}
+%D {\setupcolors[cmyk=ja,mpcmyk=nee,state=start]\getbuffer[cmyk]}
+%D
+%D \placefigure
+%D {\CMYK\ support enabled,
+%D no conversion to \RGB,
+%D support in \METAPOST}
+%D {\setupcolors[cmyk=ja,state=start]\getbuffer[cmyk]}
+
+\defineMPspecial{1}
+ {\ifMPcmykcolors
+ \setxvalue{\@@MPSK\gMPs1}{\gMPs2 \gMPs3 \gMPs4 \gMPs5 }%
+ \fi}
+
+\def\setMPcmyk#1 #2 #3 #4 %
+ {\setvalue{\@@MP01}{#1}%
+ \setvalue{\@@MP02}{#2}%
+ \setvalue{\@@MP03}{#3}%
+ \setvalue{\@@MP04}{#4}}
+
+%\defineMPspecial{2}
+% {\ifMPspotcolors
+% \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 \gMPs4 \gMPs5 }% space is essential
+ \checkMPspot{\gMPs2}{\gMPs3}{\gMPs4}{\gMPs5}%
+ \fi}
+
+\def\setMPspot#1 #2 #3 #4 %
+ {\setvalue{\@@MP01}{#1}%
+ \setvalue{\@@MP02}{#2}%
+ \setvalue{\@@MP03}{#3}%
+ \setvalue{\@@MP04}{#4}}
+
+\def\checkMPspot#1#2#3#4%
+ {\expanded{\resolveMPspotcolor#1 #2 #3 #4}\end
+ \ifx\MPspotspace\MPresolvedspace
+ \edef\MPspotspacespec{/\MPspotspace\space}%
+ \doifinstringelse\MPspotspacespec\currentMPcolorspaces
+ \donothing\registerMPcolorspace
+ \fi}
+
+%D This special (number 50) passes positions to a tex file.
+%D This method uses a two||pass approach an (mis|)|used the
+%D context positioning macros. In \type {core-pos} we will
+%D implement the low level submacro needed.
+%D
+%D \startbuffer
+%D \definelayer[test]
+%D
+%D \setlayer
+%D [test]
+%D [x=\MPx{somepos-1},y=\MPy{somepos-1}]
+%D {Whatever we want here!}
+%D
+%D \setlayer
+%D [test]
+%D [x=\MPx{somepos-2},y=\MPy{somepos-2}]
+%D {Whatever we need there!}
+%D
+%D \startuseMPgraphic{oeps}
+%D draw fullcircle scaled 6cm withcolor red ;
+%D register ("somepos-1",1cm,2cm,center currentpicture) ;
+%D register ("somepos-2",4cm,3cm,(-1cm,-2cm)) ;
+%D \stopuseMPgraphic
+%D
+%D \framed[background=test,offset=overlay]{\useMPgraphic{oeps}}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Here the width and height are not realy used, but one can
+%D imagine situations where tex has to work with values
+%D calculated by \METAPOST.
+%D
+%D \startlinecorrection
+%D \getbuffer
+%D \stoplinecorrection
+%D
+%D Later we will implement a more convenient macro:
+%D
+%D \starttyping
+%D \setMPlayer [test] [somepos-1] {Whatever we want here!}
+%D \setMPlayer [test] [somepos-2] {Whatever we need there!}
+%D \stoptyping
+
+\ifx\dosavepositionwhd\undefined
+ \let\dosavepositionwhd\gobblesevenarguments
+\fi
+
+\defineMPspecial{50} % x y width height label
+ {\bgroup
+ \scratchdimen\MPllx\onebasepoint\scratchdimen-\scratchdimen
+ % \scratchdimen-\MPllx\onebasepoint % moet ook werken
+ \advance\scratchdimen\gMPs1\onebasepoint
+ \edef\x{\number\scratchdimen}%
+ \scratchdimen\gMPs2\onebasepoint
+ \scratchdimen-\scratchdimen
+ \advance\scratchdimen\MPury\onebasepoint
+ \edef\y{\number\scratchdimen}%
+ \scratchdimen\gMPs3\onebasepoint
+ \edef\w{\number\scratchdimen}%
+ \scratchdimen\gMPs4\onebasepoint
+ \edef\h{\number\scratchdimen}%
+ \dosavepositionwhd{\gMPs5}0\x\y\w\h0%
+ \egroup}
+
+%D Transparency support used specials 60 (rgb) and 61
+%D (cmyk).
+%D
+%D \startbuffer
+%D u := 2cm ; path p ; p := fullcircle scaled u shifted (u/4,0);
+%D
+%D fill p rotated 90 withcolor transparent(1,.5,yellow) ;
+%D fill p rotated 210 withcolor transparent(1,.5,green) ;
+%D fill p rotated 330 withcolor transparent(1,.5,blue) ;
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \startlinecorrection \processMPbuffer \stoplinecorrection
+%D
+%D One can also communicate colors between \CONTEXT\ and
+%D \METAPOST:
+%D
+%D \startbuffer
+%D \definecolor[tcyan] [c=1,k=.2,t=.5]
+%D \definecolor[tmagenta][m=1,k=.2,t=.5]
+%D \definecolor[tyellow] [y=1,k=.2,t=.5]
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D \startbuffer
+%D u := 2cm ; path p ; p := fullcircle scaled u shifted (u/4,0);
+%D
+%D fill p rotated 90 withcolor \MPcolor{tcyan} ;
+%D fill p rotated 210 withcolor \MPcolor{tmagenta} ;
+%D fill p rotated 330 withcolor \MPcolor{tyellow} ;
+%D \stopbuffer
+%D
+%D \startlinecorrection \processMPbuffer \stoplinecorrection
+%D
+%D We save all the three components needed in one macro,
+%D just to save hash space.
+
+\def\@@MPST{@MPST@}
+
+\def\assignMPStransparency#1#2#3%
+ {\edef\PDFtransparencyidentifier{#1}%
+ \edef\PDFtransparencyreference {#2}%
+ \edef\PDFtransparencycolorspecs{#3}}
+
+% \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%
+ \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
+ /\MPresolvedspace\space CS
+ \PDFgetspotcolorspec\MPresolvedcolor
+ \fi\fi\fi\fi}
+
+\defineMPspecial{3} % rgb
+ {\edef\currentMPspecial{\gMPs6}%
+ \presetPDFtransparency{\gMPs1}{\gMPs2}%
+ \expanded{\resolveMPrgbcolor\gMPs3 \gMPs4 \gMPs5}\end
+ \setevalue{\@@MPST\currentMPspecial}% was \setxvalue, bug !
+ {\noexpand\assignMPStransparency
+ {\PDFtransparencyidentifier}%
+ {\PDFtransparencyreference}%
+ {\PDFtransparencyspec}}}
+
+\defineMPspecial{4} % cmyk
+ {\edef\currentMPspecial{\gMPs7}%
+ \presetPDFtransparency{\gMPs1}{\gMPs2}%
+ \expanded{\resolveMPcmykcolor\gMPs3 \gMPs4 \gMPs5 \gMPs6}\end
+ \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{\gMPs7}%
+ \presetPDFtransparency{\gMPs1}{\gMPs2}%
+ \checkMPspot{\gMPs3}{\gMPs4}{\gMPs5}{\gMPs6}%
+ \setevalue{\@@MPST\currentMPspecial}% was \setxvalue, bug !
+ {\noexpand\assignMPStransparency
+ {\PDFtransparencyidentifier}%
+ {\PDFtransparencyreference}%
+ {\PDFtransparencyspec}}}
+
+% beware: for the moment only supported in pdftex; needs a cleanup!
+
+\def\registerMPcolorspace
+ {\doifobjectreferencefoundelse{PDFCS}\MPspotspace
+ {\doPDFgetobjectreference{PDFCS}\MPspotspace\PDFobjectreference
+ \xdef\currentMPcolorspaces
+ {\currentMPcolorspaces\MPspotspacespec\PDFobjectreference\space}}
+ \donothing}
+
+%D We need to add resource specifications!
+
+\appendtoks
+ \global\let\currentMPcolorspaces\empty
+\to \MPstartresources
+
+\appendtoks
+ \ifx\currentMPcolorspaces\empty \else
+ \xdef\currentPDFresources{\currentPDFresources
+ /ColorSpace <<\currentMPcolorspaces>>}%
+ \fi
+\to \MPstopresources
+
+%D For efficiency reasons, we fall back on the allocation
+%D mechanisms already present. For use within \MPTOPDF, we
+%D provide a fall back routine.
+
+\let\currentMPtransparencies\empty
+
+% \def\invokeMPtransparencyspecial
+% {\doifdefined{\@@MPST\currentMPspecial}
+% {\getvalue{\@@MPST\currentMPspecial}%
+% \doifinstringelse
+% {\PDFtransparencyidentifier}{\currentMPtransparencies}
+% {}
+% {\xdef\currentMPtransparencies
+% {\currentMPtransparencies
+% \PDFtransparencyidentifier\space
+% \PDFtransparencyreference\space}}%
+% \def\extraMPpathcode{ Q}%
+% \PDFcode{q
+% \PDFtransparencycolorspecs\space
+% \PDFtransparencyidentifier\space gs}}}
+
+% this one triggers a new graphic state
+
+\def\invokeMPtransparencyspecial
+ {\scratchcounter\MPrgbnumber\lastMPbvalue
+ \edef\currentMPspecial{\the\scratchcounter}%
+ \ifundefined{\@@MPST\currentMPspecial}\else
+ \getvalue{\@@MPST\currentMPspecial}%
+ \doifinstringelse\PDFtransparencyidentifier\currentMPtransparencies
+ \donothing\registerMPtransparencyresource % slow
+ \PDFcode
+ {\PDFtransparencycolorspecs\space
+ \PDFtransparencyidentifier\space gs}%
+ % potential optimization
+ % \setevalue{\@@MPST\currentMPspecial}%
+ % {\PDFcode
+ % {\PDFtransparencycolorspecs\space
+ % \PDFtransparencyidentifier\space gs}}%
+ % \getvalue{\@@MPST\currentMPspecial}%
+ \let\revokeMPtransparencyspecial\dorevokeMPtransparencyspecial
+ \fi}
+
+% this one does a reset
+
+\let\revokeMPtransparencyspecial\relax
+
+\appendtoks
+ \revokeMPtransparencyspecial
+\to \MPstopresources
+
+\def\dorevokeMPtransparencyspecial % only called if state is set
+ {\ifx\PDFtransparencyresetidentifier\empty\else
+ \doifinstringelse\PDFtransparencyresetidentifier\currentMPtransparencies
+ \donothing\registerMPtransparencyresetresource
+ \PDFcode{\PDFtransparencyresetidentifier\space gs}%
+ % potential optimization
+ % \def\dorevokeMPtransparencyspecial
+ % {\PDFcode
+ % {\PDFtransparencycolorspecs\space
+ % \PDFtransparencyidentifier\space gs}}%
+ \let\dorevokeMPtransparencyspecial\dodorevokeMPtransparencyspecial
+ \let\revokeMPtransparencyspecial\relax % invoke sets it
+ \fi}
+
+% and this one a simplified reset
+
+% \def\dodorevokeMPtransparencyspecial % used after first invocation
+% {\getvalue{\@@MPST0}%
+% \PDFcode{\PDFtransparencyidentifier\space gs}}
+
+\def\dodorevokeMPtransparencyspecial % used after first invocation
+ {\PDFcode{\PDFtransparencyresetidentifier\space gs}%
+ \let\revokeMPtransparencyspecial\relax} % invoke sets it
+
+% add a resource entry
+
+\def\registerMPtransparencyresource
+ {\xdef\currentMPtransparencies
+ {\currentMPtransparencies
+ \PDFtransparencyidentifier\space
+ \PDFtransparencyreference\space}}
+
+\def\registerMPtransparencyresetresource
+ {\xdef\currentMPtransparencies
+ {\currentMPtransparencies
+ \PDFtransparencyresetidentifier\space
+ \PDFtransparencyresetreference\space}}
+
+\appendtoks \invokeMPtransparencyspecial \to \invokeMPspecials
+
+\ifCONTEXT \else
+
+ \def\@@MPSTN{@MPSTN@}
+ \def\@@MPSTO{@MPSTO@}
+
+ \newcount\PDFcurrenttransparency
+
+ \let\PDFtransparencyresetidentifier\empty
+ \let\PDFtransparencyresetreference \empty
+
+ \let\PDFtransparencyidentifier\empty
+ \let\PDFtransparencyreference \empty
+
+ \def\initializePDFtransparency
+ {\global\let\initializePDFtransparency\relax
+ \presetPDFtransparency{1}{1}%
+ \xdef\PDFtransparencyresetidentifier{/Tr0}%
+ \xdef\PDFtransparencyresetreference{\the\pdflastobj\space 0 R}}
+
+ \def\presetPDFtransparency#1#2%
+ {\initializePDFtransparency
+ \@EA\ifx\csname\@@MPSTO#1:#2\endcsname\relax
+ \global\advance\PDFcurrenttransparency \plusone
+ \immediate\pdfobj{\PDFtransparencydictionary{#1}{#2}{}}%
+ \setxvalue{\@@MPSTN#1:#2}{\the\PDFcurrenttransparency}%
+ \setxvalue{\@@MPSTO#1:#2}{\the\pdflastobj}%
+ \fi
+ \edef\PDFtransparencyidentifier{/Tr\getvalue{\@@MPSTN#1:#2}}%
+ \edef\PDFtransparencyreference{\getvalue{\@@MPSTO#1:#2} 0 R}}
+
+ \def\PDFtransparencydictionary#1#2#3% type fraction extras
+ {<</Type /ExtGState
+ /ca #2 /CA #2
+ /BM /\ifcase#1 Normal\or Normal\or Multiply\or Screen\or
+ Overlay\or SoftLight\or HardLight\or ColorDodge\or
+ ColorBurn\or Darken\or Lighten\or Difference\or
+ Exclusion\or Hue\or Saturation\or Color\or
+ Luminosity\else Compatible\fi
+ #3>>}
+
+\fi
+
+\appendtoks
+ \global\let\currentMPtransparencies\empty
+\to \MPstartresources
+
+\appendtoks
+ \ifx\currentMPtransparencies\empty \else
+ \xdef\currentPDFresources{\currentPDFresources
+ /ExtGState <<\currentMPtransparencies>>}%
+ \fi
+\to \MPstopresources
+
+%D In all cases, we need to keep track of the resources
+%D used.
+
+%D A few auxiliary macros:
+
+\def\MPgrayspace{DeviceGray}
+\def\MPrgbspace {DeviceRGB}
+\def\MPcmykspace{DeviceCMYK}
+\let\MPspotspace\MPgrayspace
+
+\def\MPcmykBlack{0 0 0 0}
+\def\MPcmykWhite{0 0 0 1}
+
+\ifCONTEXT
+
+ \def\startMPcolorresolve
+ {\bgroup
+ \def\dostartgraycolormode##1%
+ {\global\let\MPresolvedspace\MPgrayspace
+ \xdef\MPresolvedcolor{##1}}%
+ \def\dostartrgbcolormode ##1##2##3%
+ {\global\let\MPresolvedspace\MPrgbspace
+ \xdef\MPresolvedcolor{##1 ##2 ##3}}%
+ \def\dostartcmykcolormode##1##2##3##4%
+ {\global\let\MPresolvedspace\MPcmykspace
+ \xdef\MPresolvedcolor{##1 ##2 ##3 ##4}}%
+ \def\dostartspotcolormode##1##2%
+ {\global\let\MPspotspace\empty
+ \xdef\MPresolvedspace{##1}%
+ \xdef\MPresolvedcolor{##2}%
+ \global\let\MPspotspace\MPresolvedspace}% signal
+ \dostartgraycolormode\!!zerocount} % kind of hackery initialization
+
+ \let\stopMPcolorresolve\egroup
+
+ \def\resolveMPrgbcolor#1 #2 #3\end
+ {\startMPcolorresolve
+ \execcolorR#1:#2:#3:0:0\od
+ \stopMPcolorresolve}
+
+ \def\resolveMPcmykcolor#1 #2 #3 #4\end
+ {\startMPcolorresolve
+ \execcolorC#1:#2:#3:#4:0:0\od
+ \stopMPcolorresolve}
+
+ \def\resolveMPgraycolor#1\end
+ {\startMPcolorresolve
+ \execcolorS#1:0:0\od
+ \stopMPcolorresolve}
+
+% \def\resolveMPspotcolor#1 #2\end
+% {\startMPcolorresolve
+% \execcolorP#1:#2:0:0\od
+% \stopMPcolorresolve}
+
+ \def\resolveMPspotcolor#1 #2 #3 #4\end
+ {\startMPcolorresolve
+ \ifnum#2>\plusone
+ \checkmultitonecolor{#1}%
+ \fi
+ \execcolorP#1:#2:#3:#4:0:0\od
+ \stopMPcolorresolve}
+
+\else
+
+ \def\resolveMPspotcolor#1 #2\end
+ {\global\let\MPresolvedspace\MPgrayspace
+ \xdef\MPresolvedcolor{0}}
+
+ \def\resolveMPrgbcolor#1 #2 #3\end
+ {\global\let\MPresolvedspace\MPrgbspace
+ \xdef\MPresolvedcolor{#1 #2 #3}}
+
+ \def\resolveMPcmykcolor#1 #2 #3 #4\end
+ {\global\let\MPresolvedspace\MPcmykspace
+ \xdef\MPresolvedcolor{#1 #2 #3 #4}}
+
+ \def\resolveMPgraycolor#1\end
+ {\global\let\MPresolvedspace\MPgrayspace
+ \xdef\MPresolvedcolor{#1}} % should be inverted
+
+\fi
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/supp-mpe.tex b/Master/texmf-dist/tex/context/base/mkii/supp-mpe.tex
index f4438133a2a..f4438133a2a 100644
--- a/Master/texmf-dist/tex/context/base/supp-mpe.tex
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-mpe.tex
diff --git a/Master/texmf-dist/tex/context/base/supp-mps.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-mps.mkii
index 3991280e6d4..3991280e6d4 100644
--- a/Master/texmf-dist/tex/context/base/supp-mps.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-mps.mkii
diff --git a/Master/texmf-dist/tex/context/base/supp-mrk.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-mrk.mkii
index b9d476c2a7c..b9d476c2a7c 100644
--- a/Master/texmf-dist/tex/context/base/supp-mrk.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-mrk.mkii
diff --git a/Master/texmf-dist/tex/context/base/supp-num.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-num.mkii
index 5e35a20b07d..5e35a20b07d 100644
--- a/Master/texmf-dist/tex/context/base/supp-num.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-num.mkii
diff --git a/Master/texmf-dist/tex/context/base/supp-pat.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-pat.mkii
index 425eae215f6..425eae215f6 100644
--- a/Master/texmf-dist/tex/context/base/supp-pat.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-pat.mkii
diff --git a/Master/texmf-dist/tex/context/base/mkii/supp-pdf.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
new file mode 100644
index 00000000000..4dd2db776b3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
@@ -0,0 +1,2187 @@
+%D \module
+%D [ file=supp-pdf,
+%D version=2006.09.02, % 2004.12.16,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=\METAPOST\ to \PDF\ conversion,
+%D author=Hans Hagen \& others (see text),
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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\writestatus\undefined
+ \immediate\write16{[Loading MPS to PDF converter (version 2006.09.02).]}
+\else
+ \writestatus{loading}{ConTeXt Support Macros / PDF}
+\fi
+
+%D This module is not optimized because it is used outside
+%D \CONTEXT\ and we cannot forsee what interference will take
+%D place. We no longer load supp-mis. I got too tired of
+%D keeping track of interferences with non \CONTEXT\ usage so
+%D I moved the necessary code in here and use a derived version
+%D in \CONTEXT. When I have the time I will clean up some of the
+%D code that is of no use for non||\CONTEXT\ users.
+
+\ifx\contextversion\undefined
+
+ \chardef\mptopdfstoredatcode\catcode`\@
+
+ \catcode\string`@=11
+
+ \def\unprotect
+ {\let\@@mpstopdf@@unprotect \unprotect
+ \let\@@mpstopdf@@protect \protect
+ \edef\protect
+ {\noexpand \let \noexpand \protect \noexpand \@@mpstopdf@@protect
+ \noexpand \let \noexpand \unprotect \noexpand \@@mpstopdf@@unprotect
+ % context specific
+ \catcode\string`\noexpand @=\the\catcode\string`@
+ \catcode\string`\noexpand !=\the\catcode\string`!
+ \catcode\string`\noexpand ?=\the\catcode\string`?
+ % latex specific
+ \catcode\string`\noexpand /=\the\catcode\string`/
+ \catcode\string`\noexpand -=\the\catcode\string`-
+ \catcode\string`\noexpand :=\the\catcode\string`:
+ \catcode\string`\noexpand ;=\the\catcode\string`;
+ \catcode\string`\noexpand "=\the\catcode\string`"
+ \catcode\string`\noexpand <=\the\catcode\string`<
+ \catcode\string`\noexpand >=\the\catcode\string`>
+ \catcode\string`\noexpand `=\the\catcode\string``}
+ \catcode\string`@=11 \catcode\string`!=11 \catcode\string`?=11
+ \catcode\string`/=12 \catcode\string`-=12
+ \catcode\string`:=12 \catcode\string`;=12
+ \catcode\string`>=12 \catcode\string`<=12
+ \catcode\string`"=12 \catcode\string``=12 }
+
+ \def\defineMPtoPDFfallbacks
+ {% shortcuts
+ \chardef\@@escape 0
+ \chardef\@@begingroup 1
+ \chardef\@@endgroup 2
+ \chardef\@@endofline 5
+ \chardef\@@ignore 9
+ \chardef\@@space 10
+ \chardef\@@letter 11
+ \chardef\@@other 12
+ \chardef\@@active 13
+ \chardef\@@comment 14
+ % placeholders
+ \ifx\withoutpt \undefined \let\withoutpt \@@mptopdf@@withoutpt \fi
+ \ifx\twodigitrounding \undefined \let\twodigitrounding \@@mptopdf@@twodigitrounding \fi
+ \ifx\forgetall \undefined \let\forgetall \@@mptopdf@@forgetall \fi
+ \ifx\uncatcodespecials \undefined \let\uncatcodespecials \@@mptopdf@@uncatcodespecials \fi
+ \ifx\setnaturalcatcodes\undefined \let\setnaturalcatcodes\@@mptopdf@@setnaturalcatcodes \fi
+ \ifx\dospecials \undefined \let\dospecials \@@mptopdf@@dospecials \fi}
+
+ \def\@@mptopdf@@forgetall
+ {\parskip0pt\leftskip0pt\parindent0pt\everypar{}}
+
+ \def\@@mptopdf@@twodigitrounding#1%
+ {#1}%
+
+ \def\@@mptopdf@@uncatcodespecials
+ {\def\do##1{\catcode`##1=\@@other}\dospecials
+ \catcode`\ =\@@space
+ \catcode`\^^L=\@@ignore
+ \catcode`\^^M=\@@endofline
+ \catcode`\^^?=\@@ignore}
+
+ \def\@@mptopdf@@setnaturalcatcodes
+ {\catcode`\!=\@@other \catcode`\?=\@@other \catcode`\@=\@@other
+ \catcode`\#=\@@other \catcode`\&=\@@other \catcode`\|=\@@other
+ \catcode`\$=\@@other \catcode`\^=\@@other \catcode`\_=\@@other
+ \catcode`\*=\@@other \catcode`\/=\@@other
+ \catcode`\-=\@@other \catcode`+=\@@other
+ \catcode`\==\@@other \catcode`\<=\@@other \catcode`\>=\@@other
+ \catcode`\"=\@@other \catcode`\'=\@@other \catcode`\`=\@@other
+ \catcode`\:=\@@other \catcode`\;=\@@other
+ \catcode`\,=\@@other \catcode`\.=\@@other \catcode`\~=\@@other
+ \catcode`\(=\@@other \catcode`\)=\@@other
+ \catcode`\{=\@@other \catcode`\}=\@@other
+ \catcode`\\=\@@other \catcode`\%=\@@other}
+
+ \def\@@mptopdf@@dospecials
+ {\do\ \do\\\do\{\do\}\do\$%
+ \do\#\do\^\do\_\do\&\do\%%
+ \do\~\do\^^A\do\^^K}
+
+ {
+ \catcode`\.=12
+ \catcode`\p=12
+ \catcode`\t=12
+ \gdef\@@MPTOPDF@@WITHOUTPT#1pt{#1}
+ }
+
+ \def\@@mptopdf@@withoutpt#1%
+ {\expandafter\@@MPTOPDF@@WITHOUTPT#1}
+
+% \def\@@mptopdf@@newabove#1#2% \dimen \name
+% {#1#2%
+% \ifnum\expandafter\gobblesixarguments\meaning#2>20\else
+% \expandafter\@@mptopdf@@newabove\expandafter#1\expandafter#2%
+% \fi}
+
+ \def\@@mptopdf@@stripnewabove#1%
+ {\ifnum10<9#1 #1\else\expandafter\@@mptopdf@@stripnewabove\fi}%
+
+ \def\@@mptopdf@@newabove\csname#1\endcsname#2% \dimen \name
+ {\csname#1\endcsname#2%
+ \ifnum\expandafter\@@mptopdf@@stripnewabove\meaning#2>20\else
+ \@@mptopdf@@newabove\csname#1\endcsname#2%
+ \fi}
+
+ \@@mptopdf@@newabove \csname newcount\endcsname \scratchcounter
+ \@@mptopdf@@newabove \csname newdimen\endcsname \scratchdimen
+ \csname newbox\endcsname \scratchbox
+
+ \expandafter \newif \csname ifdone\endcsname
+
+ \catcode`\@=\mptopdfstoredatcode
+
+\else
+
+ \let\defineMPtoPDFfallbacks\relax
+
+\fi
+
+%D These macros are written as generic as possible. Some
+%D general support macro's are loaded from a small module
+%D especially made for non \CONTEXT\ use. In this module I
+%D use a matrix transformation macro written by Tanmoy
+%D Bhattacharya. Thanks to extensive testing by Sebastian
+%D Ratz I was able to complete this module within reasonable
+%D time. This module has support for \METAPOST\ extensions
+%D built in.
+%D
+%D Daniel H. Luecking came up with a better (more precise)
+%D transformation method. You can recognize his comment by
+%D his initials. (We keep the old code around because it's a
+%D nice illustration on how a module like this evolves.)
+
+%D Beware, we cannot use \type{\zeropoint} here since it may be
+%D defined in the range \type{\dimen0} - 20 which we happen to use
+%D as scratch registers; inside context we may consider
+%D using dedicated registers.
+
+%D This module handles some \PDF\ conversion and insertions
+%D topics. By default, the macros use the \PDFTEX\ primitive
+%D \type{\pdfliteral} when available. Since \PDFTEX\ is now the
+%D default engine for \TEX\ distributions, we need a more complex
+%D test.
+
+\unprotect
+
+\ifx\PDFcode\undefined
+ \ifx\pdfliteral\undefined
+ \def\PDFcode#1{\special{PDF: #1}}
+ \else\ifx\pdfoutput\undefined
+ \def\PDFcode#1{\special{PDF: #1}}
+ \else\ifcase\pdfoutput
+ \def\PDFcode#1{\special{PDF: #1}}
+ \else % pdftex as well as in pdf mode
+ \let\PDFcode\pdfliteral
+ \fi\fi\fi
+\else
+ % we probably use context
+\fi
+
+%D First we define a handy constant:
+
+\bgroup \defineMPtoPDFfallbacks \catcode`\%=\@@other \xdef\letterpercent{\string%} \egroup
+
+%D \macros
+%D {pdfimage,pdfimages,pdfclippedimage}
+%D
+%D Starting with pdftex version 14, images are included more
+%D natural to the form embedding. This enables alternative
+%D images to be embedded.
+%D
+%D \starttyping
+%D \pdfimage <optional dimensions> {file}
+%D \pdfimages <optional dimensions> {high res file} {low res file}
+%D \stoptyping
+%D
+%D The first one replaces the pre||version||14 original,
+%D while the latter provides alternative images.
+%D
+%D The next macro is dedicated to Maarten Gelderman, who
+%D needed to paste prepared \PDF\ pages into conference
+%D proceedings.
+%D
+%D \starttyping
+%D \pdfclippedimage <optional dimensions> {file} {l} {r} {t} {b}
+%D \stoptyping
+
+\ifx\pdftexversion\undefined \else \ifnum\pdftexversion>13
+
+ \def\pdfimage#1#%
+ {\dopdfimage{#1}}
+
+ \def\dopdfimage#1#2%
+ {\immediate\pdfximage#1{#2}%
+ \pdfrefximage\pdflastximage}
+
+ \def\pdfimages#1#%
+ {\dopdfimages{#1}}
+
+ \def\dopdfimages#1#2#3%
+ {\immediate\pdfximage#1{#2}%
+ \immediate\pdfobj{[ << /Image \the\pdflastximage\space0 R /DefaultForPrinting true >> ]}%
+ \immediate\pdfximage#1 attr {/Alternates \the\pdflastobj\space0 R}{#3}%
+ \pdfrefximage\pdflastximage}
+
+ \def\pdfclippedimage#1#% specs {file}{left}{right}{top}{bottom}
+ {\dopdfclippedimage{#1}}
+
+ \def\dopdfclippedimage#1#2#3#4#5#6%
+ {\bgroup
+ \pdfximage#1{#2}%
+ \setbox\scratchbox\hbox
+ {\pdfrefximage\pdflastximage}%
+ \hsize\wd\scratchbox
+ \advance\hsize -#3
+ \advance\hsize -#4
+ \vsize\ht\scratchbox
+ \advance\vsize -#5
+ \advance\vsize -#6
+ \setbox\scratchbox\vbox to \vsize
+ {\vskip-#5\hbox to \hsize{\hskip-#3\box\scratchbox\hss}}%
+ \pdfxform\scratchbox
+ \pdfrefxform\pdflastxform
+ \egroup}
+
+\fi \fi
+
+%D If you want to save a few hash entries, you may prefer the
+%D less readable alternatives, like:
+%D
+%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 \stoptyping
+
+%D For old times sake we provide a few aliases. These will be
+%D removed some day.
+
+\ifx\pdftexversion\undefined \else \ifnum\pdftexversion>13
+
+ \let\pdfform =\pdfxform
+ \let\pdflastform=\pdflastxform
+ \let\pdfrefform =\pdfrefxform
+
+\fi \fi
+
+%D The main conversion macro wraps the \PDF\ codes in a box
+%D that is output as an object. The graphics are embedded
+%D in~\type{q} and~\type{Q} and are scaled and positioned using
+%D one transform call (\type{cm}). This saves some additional
+%D scaling.
+
+%D \macros
+%D {convertMPtoPDF}
+%D
+%D The next set of macros implements \METAPOST\ to \PDF\
+%D conversion. Because we want to test as fast as possible, we
+%D first define the \POSTSCRIPT\ operators that \METAPOST\
+%D uses. We don't define irrelevant ones, because these are
+%D skipped anyway.
+
+%D The converter can be made a bit faster by replacing the
+%D two test macros (the ones with the many \type {\if's}) by
+%D a call to named branch macros (something \typ {\getvalue
+%D {xPSmoveto}}. For everyday documents with relatively
+%D small graphics the gain in speed can be neglected.
+
+\def \PScurveto {curveto}
+\def \PSlineto {lineto}
+\def \PSmoveto {moveto}
+\def \PSshowpage {showpage}
+\def \PSnewpath {newpath}
+\def \PSfshow {fshow}
+\def \PSclosepath {closepath}
+\def \PSfill {fill}
+\def \PSstroke {stroke}
+\def \PSclip {clip}
+\def \PSrlineto {rlineto}
+\def \PSsetlinejoin {setlinejoin}
+\def \PSsetlinecap {setlinecap}
+\def \PSsetmiterlimit {setmiterlimit}
+\def \PSsetgray {setgray}
+\def \PSsetrgbcolor {setrgbcolor}
+\def \PSsetcmykcolor {setcmykcolor}
+\def \PSsetdash {setdash}
+\def \PSgsave {gsave}
+\def \PSgrestore {grestore}
+\def \PStranslate {translate}
+\def \PSscale {scale}
+\def \PSconcat {concat}
+\def \PSdtransform {dtransform}
+\def \PSsetlinewidth {setlinewidth}
+\def \PSpop {pop}
+
+\def \PSnfont {nfont} % was needed for TUG98 proceedings
+\def \PSspecial {special} % extensions to MetaPost
+
+%D A previous version set \type {%} to ignore, which
+%D simplified the following definitions. At the start of
+%D conversion the percent character was made active again.
+%D Because the whole graphic is one paragraph (there are no
+%D empty lines) this does not give the desired effect. This
+%D went unnoticed untill Scott Pakin sent me a test file
+%D percent characters in a string. So, from now on we have
+%D to prefix the following strings with percentages.
+
+%D Some day I'll figure out a better solution (line by line reading
+%D using \ETEX).
+
+\edef \PSBoundingBox {\letterpercent\letterpercent BoundingBox:}
+\edef \PSHiResBoundingBox {\letterpercent\letterpercent HiResBoundingBox:}
+\edef \PSExactBoundingBox {\letterpercent\letterpercent ExactBoundingBox:}
+\edef \PSMetaPostSpecial {\letterpercent\letterpercent MetaPostSpecial:}
+\edef \PSMetaPostSpecials {\letterpercent\letterpercent MetaPostSpecials:}
+\edef \PSPage {\letterpercent\letterpercent Page:}
+\edef \PSBeginProlog {\letterpercent\letterpercent BeginProlog}
+\edef \PSEndProlog {\letterpercent\letterpercent EndProlog}
+\edef \PSEof {\letterpercent\letterpercent EOF}
+
+%D By the way, the \type {setcmykcolor} operator is not
+%D output by \METAPOST\ but can result from converting the
+%D \cap{RGB} color specifications, as implemented in
+%D \type{supp-mps}.
+
+%D In \POSTSCRIPT\ arguments precede the operators. Due to the
+%D fact that in some translations we need access to those
+%D arguments, and also because sometimes we have to skip them,
+%D we stack them up. The stack is one||dimensional for non path
+%D operators and two||dimensional for operators inside a path.
+%D This is because we have to save the whole path for
+%D (optional) postprocessing. Values are pushed onto the stack
+%D by:
+%D
+%D \starttyping
+%D \setMPargument {value}
+%D \stoptyping
+%D
+%D They can be retrieved by the short named macros:
+%D
+%D \starttyping
+%D \gMPa {number}
+%D \gMPs {number}
+%D \stoptyping
+%D
+%D When scanning a path specification, we also save the
+%D operator, using
+%D
+%D \starttyping
+%D \setMPkeyword {n}
+%D \stoptyping
+%D
+%D The path drawing operators are coded for speed: \type{clip},
+%D \type{stroke}, \type{fill} and \type{fillstroke} become
+%D 1, 2, 3 and~4.
+%D
+%D When processing the path this code can be retrieved
+%D using
+%D
+%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\
+%D \type{\nofMPsegments} and \type{\nofMParguments}.
+
+\newcount\nofMPsegments
+\newcount\nofMParguments
+
+%D These variables hold the coordinates. The argument part of
+%D the stack is reset by:
+%D
+%D \starttyping
+%D \resetMPstack
+%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
+%D more, we use the constant \type{\@@MP}.
+
+\def\@@MP{@@MP}
+
+\def\setMPargument% #1%
+ {\advance\nofMParguments 1
+ \expandafter\def
+ \csname\@@MP\the\nofMPsegments\the\nofMParguments\endcsname} % {#1}
+
+\def\letMPargument
+ {\advance\nofMParguments 1
+ \expandafter\let
+ \csname\@@MP\the\nofMPsegments\the\nofMParguments\endcsname}
+
+\def\setMPsequence#1 %
+ {\advance\nofMParguments 1
+ \expandafter\def
+ \csname\@@MP\the\nofMPsegments\the\nofMParguments\endcsname{#1}%
+ \handleMPsequence}
+
+\def\gMPa#1%
+ {\csname\@@MP0\number#1\endcsname}
+
+\def\gMPs#1%
+ {\csname\@@MP\the\nofMPsegments\number#1\endcsname}
+
+\def\dogMPa#1%
+ {\expandafter\expandafter\expandafter\do\csname\@@MP0\number#1\endcsname}
+
+\def\setMPkeyword#1 %
+ {\expandafter\def\csname\@@MP\the\nofMPsegments0\endcsname{#1}%
+ \advance\nofMPsegments 1
+ \nofMParguments0}
+
+\def\getMPkeyword% #1%
+ {\csname\@@MP\the\nofMPsegments0\endcsname} % {\csname\@@MP#10\endcsname}
+
+\def\docleanupMPargument#1% we need this because args can have [ or ] pre/appended
+ {\expandafter\edef\csname\@@MP\the\nofMPsegments\number#1\endcsname
+ {\csname\@@MP\the\nofMPsegments\number#1\endcsname}}
+
+%D When we reset the stack, we can assume that all further
+%D comment is to be ignored and handled in strings.
+%D By redefining the reset macro after the first call, we
+%D save some run time. Only use this macro after all
+%D comments are processed and use the simple alternative
+%D when dealing with comments.
+
+\def\doresetMPstack
+ {\nofMParguments0\relax}
+
+\def\resetMPstack
+ {\let\handleMPgraphic\handleMPendgraphic
+ \let\resetMPstack\doresetMPstack
+ \resetMPstack}
+
+%D The arguments are saved with the preceding command
+%D \type{\do}. By default this command expands to nothing, but
+%D when we deal with strings it's used to strip off the
+%D \type{(} and \type{)}.
+%D
+%D Strings are kind of tricky, because characters can be
+%D passed verbatim \type{(hello)}, by octal number
+%D \type{(\005)} or as command \type{(\()}. We therefore
+%D cannot simply ignore \type{(} and \type{)}, the way we do
+%D with \type{[} and \type{]}. Another complication is that
+%D strings may contain characters that normally have a
+%D special meaning in \TEX, like \type{$} and \type{{}}.
+%D
+%D A previous solution made \type{\} an active character and
+%D let it look ahead for a number or characters. We had to
+%D abandon this scheme because of the need for verbatim
+%D support. The next solution involved some \CATCODE\
+%D trickery but works well.
+
+\def\octalMPcharacter#1#2#3%
+ {\char'#1#2#3\relax}
+
+%D curly braces and squarly brackets are stored in the argument stack
+%D as part of strings, for instance in:
+%D
+%D \starttyping
+%D /fshow {exch findfont exch scalefont setfont show}bind def
+%D [3 3 ] 0 setdash
+%D \stoptyping
+%D
+%D but we need to keep them in situation like
+%D
+%D \starttyping
+%D ([bla bla] bla bla) ec-lmr10 9.96265 fshow
+%D ({bla bla} bla bla) ec-lmr10 9.96265 fshow
+%D \stoptyping
+%D
+%D So, when we store the snippets, we keep the special tokens, and
+%D when needed we either ignore or obey them
+
+\bgroup
+\defineMPtoPDFfallbacks
+\catcode`\|=\@@comment
+\catcode`\%=\@@active
+\catcode`\[=\@@active
+\catcode`\]=\@@active
+\catcode`\{=\@@active
+\catcode`\}=\@@active
+\catcode`B=\@@begingroup
+\catcode`E=\@@endgroup
+\gdef\keepMPspecials|
+ B\let%\letterpercent|
+ \def[B\noexpand[E|
+ \def]B\noexpand]E|
+ \def{B\noexpand{E|
+ \def}B\noexpand}EE
+\gdef\ignoreMPspecials|
+ B\let%\letterpercent|
+ \def[BE|
+ \def]BE|
+ \def{BE|
+ \def}BEE
+\gdef\obeyMPspecials|
+ B\def%B\char 37\relax E|
+ \def[B\char 91\relax E|
+ \def]B\char 93\relax E|
+ \def{B\char123\relax E|
+ \def}B\char125\relax EE
+\gdef\setMPspecials|
+ B\setnaturalcatcodes
+ \catcode`\\=\@@escape
+ \catcode`\%=\@@active
+ \catcode`\[=\@@active
+ \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|
+ \def\\B\char92\relax E|
+ \def\0B\octalMPcharacter0E|
+ \def\1B\octalMPcharacter1E|
+ \def\2B\octalMPcharacter2E|
+ \def\3B\octalMPcharacter3E|
+ \def\4B\octalMPcharacter4E|
+ \def\5B\octalMPcharacter5E|
+ \def\6B\octalMPcharacter6E|
+ \def\7B\octalMPcharacter7E|
+ \def\8B\octalMPcharacter8E|
+ \def\9B\octalMPcharacter9EE
+\egroup
+
+%D We use the comment symbol as a sort of trigger. Beware!
+%D The whole graphic is seen as on eparagraph, which means
+%D that we cannot change the catcodes in between.
+
+\bgroup
+\defineMPtoPDFfallbacks
+\catcode`\%=\@@active
+\gdef\startMPscanning{\let%=\startMPconversion}
+\egroup
+
+%D In earlier versions we used the sequence
+%D
+%D \starttyping
+%D \expandafter\handleMPsequence\input filename\relax
+%D \stoptyping
+%D
+%D Persistent problems in \LATEX\ however forced us to use a
+%D different scheme. Every \POSTSCRIPT\ file starts with a
+%D \type{%}, so we temporary make this an active character
+%D that starts the scanning and redefines itself. (The problem
+%D originates in the redefinition by \LATEX\ of the
+%D \type{\input} primitive.)
+
+\def\startMPconversion
+ {\keepMPspecials
+ \handleMPsequence}
+
+%D Here comes the main loop. Most arguments are numbers. This
+%D means that they can be recognized by their \type{\lccode}.
+%D This method saves a lot of processing time. We could
+%D speed up the conversion by handling the \type{path}
+%D seperately.
+
+\def\dohandleMPsequence#1%
+ {\ifdone
+ \ifcase\lccode`#1\relax
+ \expandafter\expandafter\expandafter\dohandleMPsequenceA
+ \else
+ \expandafter\expandafter\expandafter\dohandleMPsequenceB
+ \fi
+ \else
+ \expandafter\dohandleMPsequenceC
+ \fi#1}
+
+\let\dohandleMPsequenceA\setMPsequence
+
+\def\installMPSkeywordN#1#2%
+ {\expandafter\def\csname\@@MP:N:#1\endcsname{#2}}
+
+\def\installMPSshortcutN#1#2% todo: \let
+ {\expandafter\let\csname\@@MP:N:#1\expandafter\endcsname\csname\@@MP:N:#2\endcsname}
+
+\def\dohandleMPsequenceB#1 %
+ {\edef\somestring{#1}%
+ \ifcsname\@@MP:N:\somestring\endcsname
+ \csname\@@MP:N:\somestring\expandafter\endcsname
+ \else
+ \expandafter\handleMPgraphic
+ \fi
+ \handleMPsequence}
+
+\ifx\eTeXversion\undefined
+ \def\dohandleMPsequenceB#1 %
+ {\edef\somestring{#1}%
+ \expandafter\ifx\csname\@@MP:N:\somestring\endcsname\relax
+ \expandafter\handleMPgraphic
+ \else
+ \csname\@@MP:N:\somestring\expandafter\endcsname
+ \fi
+ \handleMPsequence}
+\fi
+
+\installMPSkeywordN \PSmoveto
+ {\edef\lastMPmoveX{\gMPa1}%
+ \edef\lastMPmoveY{\gMPa2}%
+ \resetMPstack}
+\installMPSkeywordN \PSnewpath
+ {\let\handleMPsequence\handleMPpath}
+\installMPSkeywordN \PSgsave
+ {\PDFcode{q}%
+ \resetMPstack}
+\installMPSkeywordN \PSgrestore
+ {\PDFcode{Q}%
+ \resetMPstack}
+\installMPSkeywordN \PSdtransform % == setlinewidth
+ {\let\handleMPsequence\handleMPdtransform}
+ % after that we will encounter more tokens until setlinewidth+pop
+ % or pop+setlinewidth which we catch next; we explicitly need to
+ % reset the stack since [] n setdash may follow; a more clever
+ % approach would be to read on till the condition is met, but it's
+ % the only pop / setlinewidth we will encounter so ...
+\installMPSkeywordN \PSsetlinewidth
+ {% already handled in dtransform
+ \resetMPstack}
+\installMPSkeywordN \PSpop
+ {% already handled in dtransform
+ \resetMPstack}
+\installMPSkeywordN \PSconcat
+ {\cleanupMPconcat
+ \PDFcode{\gMPa1 \gMPa2 \gMPa3 \gMPa4 \gMPa5 \gMPa6 cm}%
+ \resetMPstack}
+\installMPSkeywordN \PSsetrgbcolor
+ {\handleMPrgbcolor
+ \resetMPstack}
+\installMPSkeywordN \PSsetcmykcolor
+ {\handleMPcmykcolor
+ \resetMPstack}
+\installMPSkeywordN \PSsetgray
+ {\handleMPgraycolor
+ \resetMPstack}
+\installMPSkeywordN \PStranslate
+ {\PDFcode{1 0 0 1 \gMPa1 \gMPa2 cm}%
+ \resetMPstack}
+\installMPSkeywordN \PSsetdash
+ {\handleMPsetdash
+ \resetMPstack}
+\installMPSkeywordN \PSsetlinejoin
+ {\PDFcode{\gMPa1 j}%
+ \resetMPstack}
+\installMPSkeywordN \PSsetmiterlimit
+ {\PDFcode{\gMPa1 M}%
+ \resetMPstack}
+\installMPSkeywordN \PSfshow
+ {%\PDFcode{n}% removed !
+ \handleMPfshow
+ \resetMPstack}
+\installMPSkeywordN \PSsetlinecap
+ {\PDFcode{\gMPa1 J}%
+ \resetMPstack}
+\installMPSkeywordN \PSrlineto
+ {\flushMPmoveto
+ \PDFcode{\!MP\lastMPmoveX\space\!MP\lastMPmoveY\space l S}%
+ \resetMPmoveto
+ \resetMPstack}
+\installMPSkeywordN \PSscale
+ {\PDFcode{\gMPa1 0 0 \gMPa2 0 0 cm}%
+ \resetMPstack}
+\installMPSkeywordN \PSspecial
+ {\handleMPspecialcommand
+ \resetMPstack}
+
+\installMPSshortcutN {n} \PSnewpath
+\installMPSshortcutN {p} \PSclosepath
+\installMPSshortcutN {l} \PSlineto
+\installMPSshortcutN {r} \PSrlineto
+\installMPSshortcutN {m} \PSmoveto
+\installMPSshortcutN {c} \PScurveto
+\installMPSshortcutN {C} \PSsetcmykcolor
+\installMPSshortcutN {G} \PSsetgray
+\installMPSshortcutN {R} \PSsetrgbcolor
+\installMPSshortcutN {lj} \PSsetlinejoin
+\installMPSshortcutN {ml} \PSsetmiterlimit
+\installMPSshortcutN {lc} \PSsetlinecap
+\installMPSshortcutN {sd} \PSsetdash
+\installMPSshortcutN {S} \PSstroke
+\installMPSshortcutN {F} \PSfill
+\installMPSshortcutN {W} \PSclip
+
+\installMPSshortcutN {q} \PSgsave
+\installMPSshortcutN {Q} \PSgrestore
+
+\installMPSshortcutN {s} \PSscale
+\installMPSshortcutN {t} \PSconcat
+\installMPSshortcutN {P} \PSshowpage
+
+\installMPSkeywordN {hlw} {\PDFcode{\gMPa1 w}\resetMPstack}
+\installMPSkeywordN {vlw} {\PDFcode{\gMPa1 w}\resetMPstack}
+\installMPSkeywordN {rd} {\PDFcode{[] 0 d}\resetMPstack}
+
+\def\dohandleMPsequenceC#1 %
+ {\edef\somestring{#1}%
+ \handleMPgraphic % {#1}%
+ \handleMPsequence}
+
+%D Since colors are not sensitive to transformations, they
+%D are sometimes used for signaling. Therefore, we handle them
+%D separately. The next macro can be redefined if needed.
+
+\def\handleMPrgbcolor
+ {\PDFcode{\!MPgMPa1 \!MPgMPa2 \!MPgMPa3 rg
+ \!MPgMPa1 \!MPgMPa2 \!MPgMPa3 RG}}
+
+\def\handleMPcmykcolor
+ {\PDFcode{\!MPgMPa1 \!MPgMPa2 \!MPgMPa3 \!MPgMPa4 k
+ \!MPgMPa1 \!MPgMPa2 \!MPgMPa3 \!MPgMPa4 K}}
+
+\def\handleMPgraycolor
+ {\PDFcode{\!MPgMPa1 g
+ \!MPgMPa1 G}}
+
+\def\handleMPspotcolor
+ {\PDFcode{0 g
+ 0 G}}
+
+%D Beginning and ending the graphics is taken care of by the
+%D macro \type{\handleMPgraphic}, which is redefined when
+%D the first graphics operator is met.
+
+\def\handleMPendgraphic % #1%
+ {\ifx\somestring\PSshowpage
+ \let\handleMPsequence\finishMPgraphic
+ \else\ifx\somestring\PSEof
+ \let\handleMPsequence\finishMPgraphic
+ \else
+ \letMPargument\somestring % {#1}%
+ \fi\fi}
+
+\def\handleMPbegingraphic % #1%
+ {\ifx\somestring\PSBoundingBox
+ \def\handleMPsequence{\handleMPboundingbox1}%
+ \else\ifx\somestring\PSHiResBoundingBox
+ \def\handleMPsequence{\handleMPboundingbox2}%
+ \else\ifx\somestring\PSExactBoundingBox
+ \def\handleMPsequence{\handleMPboundingbox3}%
+ \else\ifx\somestring\PSshowpage
+ \let\handleMPsequence\finishMPgraphic
+ \else\ifx\somestring\PSEof
+ \let\handleMPsequence\finishMPgraphic
+ \else\ifx\somestring\PSPage
+ \let\handleMPsequence\handleMPpage
+ \else\ifx\somestring\PSMetaPostSpecials
+ \let\handleMPsequence\handleMPspecialscomment
+ \else\ifx\somestring\PSMetaPostSpecial
+ \let\handleMPsequence\handleMPspecialcomment
+ \else\ifx\somestring\PSBeginProlog
+ \let\handleMPsequence\handleMPprolog
+ \else
+ \letMPargument\somestring % {#1}%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi}
+
+\let\handleMPgraphic=\handleMPbegingraphic
+
+%D New: we can best filter the prolog because nowdays it can contain
+%D quite some code.
+
+% hm, catcode mess, so we need to tweak %'s catcode here
+% \long\expandafter\def\expandafter\handleMPprolog\expandafter#\expandafter1\PSEndProlog%
+% but today i'm not in the mood for ugly stuff
+
+\long\def\handleMPprolog#1EndProlog %
+ {\doresetMPstack
+ \let\handleMPsequence\dohandleMPsequence
+ \handleMPsequence}
+
+%D We check for three kind of bounding boxes: the normal one
+%D and two high precision ones:
+%D
+%D \starttyping
+%D BoundingBox: llx lly ucx ucy
+%D HiResBoundingBox: llx lly ucx ucy
+%D ExactBoundingBox: llx lly ucx ucy
+%D \stoptyping
+%D
+%D The original as well as the recalculated dimensions are
+%D saved for later use.
+
+\newif\ifskipemptyMPgraphic \skipemptyMPgraphicfalse
+
+\chardef\currentMPboundingbox=0
+
+\def\handleMPboundingbox#1#2 #3 #4 #5
+ {\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
+ \xdef\MPxoffset{\withoutpt\the\dimen0}%
+ \xdef\MPyoffset{\withoutpt\the\dimen2}%
+ \dimen0=#2bp
+ \dimen0=-\dimen0
+ \dimen2=#3bp
+ \dimen2=-\dimen2
+ \advance\dimen0 #4bp
+ \dimen0=\MPxscale\dimen0
+ \xdef\MPwidth{\the\dimen0}%
+ \advance\dimen2 #5bp
+ \xdef\MPyshift{\the\dimen2}% unscaled
+ \dimen2=\MPyscale\dimen2
+ \xdef\MPheight{\the\dimen2}%
+ \chardef\currentMPboundingbox#1\relax
+ \fi
+ \doresetMPstack
+ \let\handleMPsequence\dohandleMPsequence
+ \let\next\handleMPsequence
+ \ifskipemptyMPgraphic
+ \ifdim\MPheight=0pt\relax\ifdim\MPwidth=0pt\relax
+ \def\next{\endinput\finishMPgraphic}%
+ \fi\fi
+ \fi
+ \next}
+
+%D Unless defined otherwise, we simply ignore specialcomments.
+
+\def\handleMPspecialcomment
+ {\doresetMPstack
+ \let\handleMPsequence\dohandleMPsequence
+ \handleMPsequence}
+
+\let\handleMPspecialscomment\handleMPspecialcomment
+
+%D We use the \type{page} comment as a signal that
+%D stackbuilding can be started.
+
+\def\handleMPpage #1 #2
+ {\doresetMPstack
+ \donetrue
+ \let\handleMPsequence\dohandleMPsequence
+ \handleMPsequence}
+
+%D The same applies to the special extensions.
+
+\def\handleMPspecialcommand
+ {\doresetMPstack
+ \let\handleMPsequence\dohandleMPsequence
+ \handleMPsequence}
+
+%D \METAPOST\ draws its dots by moving to a location and
+%D invoking \type{0 0 rlineto}. This operator is not
+%D available in \PDF. Our solution is straightforward: we draw
+%D a line from $(current\_x, current\_y)$ to itself. This
+%D means that the arguments of the preceding \type{moveto} have
+%D to be saved.
+
+\def\lastMPmoveX{0}
+\def\lastMPmoveY{0}
+
+%D These saved coordinates are also used when we handle the
+%D texts. Text handling proved to be a bit of a nuisance, but
+%D finally I saw the light. It proved that we also had to
+%D take care of \type{(split arguments)}.
+
+% \def\setMPfshowfont#1#2%
+% {\font\temp=#1\space at #2\relax\temp}
+
+% \startMPcode
+% draw btex Ga toch effe f\kern0ptietsen?{}` etex ;
+% \stopMPcode
+
+\newtoks \everyMPshowfont
+
+\def\setMPfshowfont#1#2%
+ {\font\temp=#1\space at #2\relax\temp
+ \the\everyMPshowfont}
+
+\let\MPfshowcommand\empty
+
+%D The next hackery handles characters one by one. We only support this
+%D for the latest greatest \METAPOST\ binaries, the ones that escape
+%D problematic chars.
+
+\def\doflushMPtext#1%
+ {\edef\!!stringa{#1}%
+ \expandafter\dodoflushMPtext\!!stringa\relax}
+
+\def\dodoflushMPtext
+ {\afterassignment\dododoflushMPtext\let\nexttoken=}
+
+\def\dododoflushMPtext
+ {\ifx\nexttoken\relax
+ % done
+ \else\ifx\nexttoken\char
+ \expandafter\expandafter\expandafter\dodododoflushMPtext
+ \else
+ {\nexttoken}%
+ \expandafter\expandafter\expandafter\dodoflushMPtext
+ \fi\fi}
+
+\def\dodododoflushMPtext
+ {\afterassignment\dododododoflushMPtext\scratchcounter}
+
+\def\dododododoflushMPtext
+ {{\char\scratchcounter}\let\next\dodoflushMPtext}
+
+\def\dohandleMPfshow
+ {\bgroup
+ \setbox\scratchbox\hbox
+ {\obeyMPspecials
+ \let\ \relax % mp breaks long lines and appends a \
+ \edef\size{\gMPa\nofMParguments}%
+ \ifx\size\PSnfont % round font size (to pt)
+ \advance\nofMParguments -1
+ \expandafter\scratchdimen\gMPa\nofMParguments pt\relax
+ \ifdim\scratchdimen<1pt
+ \def\size{1pt}%
+ \else
+ \advance\scratchdimen .5pt
+ \def\size##1.##2\relax{\def\size{##1pt}}%
+ \expandafter\size\the\scratchdimen\relax
+ \fi
+ \else
+ \edef\size{\size bp}%
+ \fi
+ \advance\nofMParguments -1
+ %\font\temp=\gMPa\nofMParguments\space at \size
+ \let\temp\relax % to be sure
+ \setMPfshowfont{\gMPa\nofMParguments}\size
+ \advance\nofMParguments -1
+ \temp
+ \MPfshowcommand
+ {\ifnum\nofMParguments=1
+ \def\do(##1){##1}%
+ \doflushMPtext{\dogMPa1}% only latest mp gets this treatment
+ \else
+ % we need to catch ( a ) (a a a) (\123 \123 \123) etc
+ \scratchcounter1
+ \def\dodo##1% Andreas Fieger's bug: (\304...)
+ {\edef\!!stringa{##1\empty\empty}% and another one: ( 11) -> \ifx 11
+ \ifx\!!stringa\MPspacechar\MPspacechar\else\expandafter##1\fi}%
+ \def\do(##1{\dodo{##1}}%
+ \dogMPa\scratchcounter\MPspacechar
+ \let\do\relax
+ \loop
+ \advance\scratchcounter 1
+ \ifnum\scratchcounter<\nofMParguments\relax
+ \gMPa\scratchcounter\MPspacechar
+ \repeat
+ \def\do##1){\dodo{##1}}%
+ \dogMPa\scratchcounter
+ \fi
+ \unskip}}%
+ \setbox\scratchbox\hbox
+ {\hskip\lastMPmoveX bp\raise\lastMPmoveY bp\box\scratchbox}%
+ \ht\scratchbox0pt%
+ \dp\scratchbox0pt%
+ \wd\scratchbox0pt%
+ \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.
+
+% \def\MPspacechar{\space} % normal case
+
+\def\MPspacechar{\char32\relax} % old solution does not work with math
+
+%D However, the following implementation is more robust, since
+%D some fonts have funny visible spaces in the space slot. This
+%D gives a mismatch between the space that \METAPOST\ took into
+%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
+%D safely assume that \METAPOST\ considers \type {\char32} to
+%D be the space.
+
+\def\MPspacechar{\setbox\scratchbox\hbox{\char32}\kern\wd\scratchbox}
+
+%D Well, this does not work with math fonts, so:
+
+\def\MPspacechar{\char32\relax}
+
+%D Most operators are just converted and keep their
+%D arguments. Dashes however need a bit different treatment,
+%D otherwise \PDF\ viewers complain loudly. Another
+%D complication is that one argument comes after the \type{]}.
+%D When reading the data, we simply ignore the array boundary
+%D characters. We save ourselves some redundant newlines and
+%D at the same time keep the output readable by packing the
+%D literals.
+
+\def\handleMPsetdash
+ {\bgroup
+ \ignoreMPspecials
+ \def\somestring{[}%
+ \scratchcounter1
+ \loop
+ \ifnum\scratchcounter<\nofMParguments
+ \edef\somestring{\somestring\space\gMPa\scratchcounter}%
+ \advance\scratchcounter 1
+ \repeat
+ \edef\somestring{\somestring]\gMPa\scratchcounter\space d}%
+ \PDFcode{\somestring}%
+ \egroup}
+
+%D The \type{setlinewidth} commands looks a bit complicated. There are
+%D two alternatives, that result in a similar look in both
+%D $x$- and $y$-dorection. As John Hobby says:
+%D
+%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 \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
+%D the path is {\em primarily vertical}. It rounds the width
+%D so that vertical lines come out an integer number of pixels
+%D wide in device space. The \type{0 y ...} form does the same
+%D for paths that are {\em primarily horizontal}. The reason
+%D why I did this is Knuth insists on getting exactly the
+%D widths \TEX\ intends for the horizontal and vertical rules
+%D in \type{btex...etex} output. (Note that PostScript scan
+%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 \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\gMPa1 pt>0pt
+ \PDFcode{\gMPa1 w}%
+ \def\next##1 ##2 ##3 ##4 ##5 ##6 {\handleMPsequence}%
+ \else
+ \PDFcode{\gMPa2 w}%
+ \def\next##1 ##2 ##3 ##4 {\handleMPsequence}%
+ \fi
+ \let\handleMPsequence\dohandleMPsequence
+ \resetMPstack
+ \next}
+
+%D The most complicated command is \type{concat}. \METAPOST\
+%D applies this operator to \type{stroke}. At that moment the
+%D points set by \type{curveto} and \type{moveto}, are already
+%D fixed. In \PDF\ however the \type{cm} operator affects the
+%D points as well as the pen (stroke). Like more \PDF\
+%D operators, \type{cm} is defined in a bit ambiguous way.
+%D The only save route for non||circular penshapes, is saving
+%D the path, recalculating the points and applying the
+%D transformation matrix in such a way that we can be sure
+%D that its behavior is well defined. This comes down to
+%D inverting the path and applying \type{cm} to that path as
+%D well as the pen. This all means that we have to save the
+%D path.
+
+%D In \METAPOST\ there are three ways to handle a path $p$:
+%D
+%D \starttyping
+%D draw p; fill p; filldraw p;
+%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.\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
+%D macro \type{\handleMPsequence}.
+
+\def\handleMPpath
+ {\chardef\finiMPpath0
+ \let\closeMPpath\relax
+ \let\flushMPpath\flushnormalMPpath
+ \resetMPstack
+ \nofMPsegments1
+ \let\handleMPsequence\dohandleMPpath
+ \dohandleMPpath}
+
+%D Most paths are drawn with simple round pens. Therefore we've
+%D split up the routine in two.
+
+\def\flushnormalMPsegment
+ {\ifcase\getMPkeyword\relax
+ \PDFcode{\!MPgMPs1 \!MPgMPs2 l}%
+ \or
+ \PDFcode{\!MPgMPs1 \!MPgMPs2 \!MPgMPs3 \!MPgMPs4 \!MPgMPs5 \!MPgMPs6 c}%
+ \or
+ \PDFcode{\!MP\lastMPmoveX\space\!MP\lastMPmoveY\space l}%
+ \or
+ \edef\lastMPmoveX{\gMPs1}% evt \!MP here
+ \edef\lastMPmoveY{\gMPs2}%
+ \PDFcode{\!MP\lastMPmoveX\space \!MP\lastMPmoveY\space m}%
+ \fi}
+
+\def\flushconcatMPsegment
+ {\ifcase\getMPkeyword\relax
+ \doMPconcat{\gMPs1}\a{\gMPs2}\b%
+ \PDFcode{\!MP\a\space\!MP\b\space l}%
+ \or
+ \doMPconcat{\gMPs1}\a{\gMPs2}\b%
+ \doMPconcat{\gMPs3}\c{\gMPs4}\d%
+ \doMPconcat{\gMPs5}\e{\gMPs6}\f%
+ \PDFcode{\!MP\a\space\!MP\b\space
+ \!MP\c\space\!MP\d\space
+ \!MP\e\space\!MP\f\space c}%
+ \or
+ \bgroup
+ \noMPtranslate
+ \doMPconcat\lastMPmoveX\a\lastMPmoveY\b%
+ \PDFcode{\!MP\a\space\!MP\b\space l S}%
+ \egroup
+ \or
+ \edef\lastMPmoveX{\gMPs1}%
+ \edef\lastMPmoveY{\gMPs2}%
+ \doMPconcat\lastMPmoveX\a\lastMPmoveY\b%
+ \PDFcode{\!MP\a\space\!MP\b\space m}%
+ \fi}
+
+% \def\flushnormalMPpath
+% {\scratchcounter\nofMPsegments
+% \nofMPsegments 1
+% \loop
+% \flushnormalMPsegment
+% \advance\nofMPsegments 1
+% \ifnum\nofMPsegments<\scratchcounter
+% \repeat}
+%
+% \def\flushconcatMPpath
+% {\scratchcounter\nofMPsegments
+% \nofMPsegments 1
+% \loop
+% \flushconcatMPsegment
+% \advance\nofMPsegments 1
+% \ifnum\nofMPsegments<\scratchcounter
+% \repeat}
+%
+% an alternative is presented below: (no \def assignment)
+
+\def\doflushsomeMPpath
+ {\dodoflushsomeMPpath
+ \advance\nofMPsegments 1
+ \ifnum\nofMPsegments<\scratchcounter
+ \expandafter\doflushsomeMPpath
+ \fi}
+
+\def\flushsomeMPpath
+ {\scratchcounter\nofMPsegments
+ \nofMPsegments 1
+ \doflushsomeMPpath}
+
+\def\flushnormalMPpath{\let\dodoflushsomeMPpath\flushnormalMPsegment\flushsomeMPpath}
+
+%OLD \def\flushconcatMPpath{\let\dodoflushsomeMPpath\flushconcatMPsegment\flushsomeMPpath}
+
+%NEW pre-calculate 1/D so it needn't be repeated for each control point.
+
+\def\flushconcatMPpath
+ {\MPreciprocaldeterminant
+ \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 \starttyping
+%D \doMPconcat {x position} \xresult {y position} \yresult
+%D \stoptyping
+%D
+%D By setting the auxiliary \DIMENSIONS\ \type{\dimen0} upto
+%D \type{\dimen10} only once per path, we save over 20\% run
+%D time. Some more speed was gained by removing some parameter
+%D passing. These macros can be optimized a bit more by using
+%D more constants. There is however not much need for further
+%D optimization because penshapes usually are round and
+%D therefore need no transformation. Nevertheless we move the
+%D factor to the outer level and use a bit different \type{pt}
+%D removal macro. Although the values represent base points,
+%D we converted them to pure points, simply because those can
+%D be converted back.
+
+%OLD \mathchardef\MPconcatfactor=256 % beware don't remove spaces before it
+
+%OLD \def\doMPreducedimen#1
+%OLD {\count0\MPconcatfactor
+%OLD \advance\dimen#1 \ifdim\dimen#1>0pt .5\else -.5\fi\count0
+%OLD \divide\dimen#1 \count0\relax}
+
+%OLD % too inaccurate (see old pragma logo)
+%OLD
+%OLD \def\doMPreducedimen#1
+%OLD {\count0=\MPconcatfactor
+%OLD \divide\dimen#1 \count0\relax}
+
+%OLD \def\doMPreducedimen#1
+%OLD {\advance\dimen#1 \ifdim\dimen#1>0pt .5\else -.5\fi\MPconcatfactor
+%OLD \divide\dimen#1 \MPconcatfactor}
+
+%D The transformation code is rewritten by Daniel H. Luecking who
+%D describes his patch as follows:
+%D
+%D We would like to divide 1 by $X$, but all divisions are integer so
+%D for accuracy we want to convert to large integers and make sure the
+%D integer quotient has as many significant digits as possible. Thus we
+%D need to replace $1/X$ with $M/N$ where $N$ is as large as possible
+%D and $M/N$ is as large as possible. Also for simplicity $M$ should be
+%D a power of 2. So we make $M = 2^{30}$ \footnote{$2^{31} - 1$ is the
+%D largest legal integer. Using it (and simply ignoring the inaccuracy
+%D caused by $-1$) turns out to be at least as accurate in all cases,
+%D and more accurate in some.} (largest legal power of 2) and adjust
+%D $X$ downward (if necessary) to the the range $1-2^{16}$. This gives
+%D at least 15 significant binary digits, (almost as accurate as
+%D \METAPOST\ for numbers near 1) or almost 5 significant figures
+%D (decimal).
+
+\newcount\MPscratchCnt
+\newdimen\MPscratchDim % will be assigned global
+
+\def\MPadjustdimen % sets \MPscratchDim and \MPscratchCnt
+ {\MPscratchCnt0
+ \doMPadjustdimen}
+
+\def\doMPadjustdimen
+ {\ifdim\MPscratchDim>1pt
+ \divide\MPscratchDim 2
+ \advance\MPscratchCnt 1
+ \expandafter\doMPadjustdimen
+ \fi}
+
+%OLD \def\doMPexpanddimen#1
+%OLD {\multiply\dimen#1 \MPconcatfactor\relax}
+
+%D DHL: When viewed as an integer, $1 \hbox{pt}=2^{16}$ so $2^{32}/X$
+%D is the right way to do $(1 \hbox{pt})/(X \hbox{pt})$ and get the
+%D answer in points. But we are limited to $2^{30}/X$. However, we
+%D actually do $[ 2^{30} / (X/2^K) ]*2^{2-K}$ where $K$ is the number
+%D of halvings it takes to bring $X$ below $1 \hbox{pt}$. If $K$ is 0
+%D or 1 we readjust by multiplying by 4 or 2, otherwise by halving
+%D $(K-2)$ times \type {\MPscratchCnt} holds the value of $K$ from
+%D \type {\MPadjustdimen}.
+
+\def\MPreadjustdimen % acts on \MPscratchDim and MPscratchCnt
+ {\ifcase\MPscratchCnt
+ \multiply\scratchdimen 4
+ \or
+ \multiply\scratchdimen 2
+ \else
+ \expandafter\doMPreadjustdimen
+ \fi}
+
+\def\doMPreadjustdimen
+ {\ifnum\MPscratchCnt>2
+ \divide\scratchdimen 2
+ \advance\MPscratchCnt -1
+ \expandafter\doMPreadjustdimen
+ \fi}
+
+\def\MPreciprocaldeterminant
+ {\scratchdimen\withoutpt\the\dimen0 \dimen6 % s_x*s_y
+ \advance\scratchdimen - \withoutpt\the\dimen2 \dimen4 % s_x*s_y - r_x*r_y
+ \ifdim\scratchdimen<0pt % we need a positive dimension
+ \scratchdimen-\scratchdimen % for \MPadjustdimen (?)
+ \doMPreciprocal
+ \scratchdimen-\scratchdimen
+ \else
+ \doMPreciprocal
+ \fi
+ \edef\MPreciprocal{\withoutpt\the\scratchdimen}}
+
+\newcount\MPnumerator \MPnumerator = 1073741824 % 2^{30}
+
+% todo: dimexpr
+
+\def\doMPreciprocal % replace \scratchdimen with its reciprocal
+ {\ifdim\scratchdimen=1pt \else
+ \MPadjustdimen
+ \scratchcounter\MPnumerator
+ \divide\scratchcounter\scratchdimen
+ \scratchdimen1\scratchcounter % 1 needed !
+ \MPreadjustdimen
+ \fi}
+
+%OLD \def\presetMPconcat
+%OLD {\dimen 0=\gMPs1pt \doMPreducedimen 0 % r_x
+%OLD \dimen 2=\gMPs2pt \doMPreducedimen 2 % s_x
+%OLD \dimen 4=\gMPs3pt \doMPreducedimen 4 % s_y
+%OLD \dimen 6=\gMPs4pt \doMPreducedimen 6 % r_y
+%OLD \dimen 8=\gMPs5pt \doMPreducedimen 8 % t_x
+%OLD \dimen10=\gMPs6pt \doMPreducedimen10 } % t_y
+%OLD
+%OLD \def\presetMPscale
+%OLD {\dimen 0=\gMPs1pt \doMPreducedimen 0
+%OLD \dimen 2=0pt
+%OLD \dimen 4=0pt
+%OLD \dimen 6=\gMPs2pt \doMPreducedimen 6
+%OLD \dimen 8=0pt
+%OLD \dimen10=0pt}
+
+\def\cleanupMPconcat
+ {\ignoreMPspecials
+ \docleanupMPargument1%
+ \docleanupMPargument6%
+ \keepMPspecials}
+
+\def\presetMPconcat
+ {\dimen 0=\gMPs1pt % s_x
+ \dimen 2=\gMPs2pt % r_x
+ \dimen 4=\gMPs3pt % r_y
+ \dimen 6=\gMPs4pt % s_y
+ \dimen 8=\gMPs5pt % t_x
+ \dimen10=\gMPs6pt} % t_y
+
+\def\presetMPscale
+ {\dimen 0=\gMPs1pt
+ \dimen 2=0pt
+ \dimen 4=0pt
+ \dimen 6=\gMPs2pt
+ \dimen 8=0pt
+ \dimen10=0pt}
+
+\def\noMPtranslate % use this one grouped
+ {\dimen 8=0pt % t_x
+ \dimen10=0pt} % t_y
+
+%D \starttyping
+%D \def\doMPconcat#1#2#3#4%
+%D {\dimen12=#1 pt \doMPreducedimen12 % p_x
+%D \dimen14=#3 pt \doMPreducedimen14 % p_y
+%D %
+%D \dimen16 \dimen 0
+%D \multiply \dimen16 \dimen 6
+%D \dimen20 \dimen 2
+%D \multiply \dimen20 \dimen 4
+%D \advance \dimen16 -\dimen20
+%D %
+%D \dimen18 \dimen12
+%D \multiply \dimen18 \dimen 6
+%D \dimen20 \dimen14
+%D \multiply \dimen20 \dimen 4
+%D \advance \dimen18 -\dimen20
+%D \dimen20 \dimen 4
+%D \multiply \dimen20 \dimen10
+%D \advance \dimen18 \dimen20
+%D \dimen20 \dimen 6
+%D \multiply \dimen20 \dimen 8
+%D \advance \dimen18 -\dimen20
+%D %
+%D \multiply \dimen12 -\dimen 2
+%D \multiply \dimen14 \dimen 0
+%D \advance \dimen12 \dimen14
+%D \dimen20 \dimen 2
+%D \multiply \dimen20 \dimen 8
+%D \advance \dimen12 \dimen20
+%D \dimen20 \dimen 0
+%D \multiply \dimen20 \dimen10
+%D \advance \dimen12 -\dimen20
+%D %
+%D \doMPreducedimen16
+%D \divide \dimen18 \dimen16 \doMPexpanddimen18
+%D \divide \dimen12 \dimen16 \doMPexpanddimen12
+%D %
+%D \edef#2{\withoutpt\the\dimen18}% % p_x^\prime
+%D \edef#4{\withoutpt\the\dimen12}} % p_y^\prime
+%D \stoptyping
+
+%D The following optimization resulted from some tests by
+%D and email exchanges with Sanjoy Mahajan.
+%D
+%D \starttyping
+%D \def\doMPconcat#1#2#3#4%
+%D {\dimen12=#1 pt \doMPreducedimen12 % p_x
+%D \dimen14=#3 pt \doMPreducedimen14 % p_y
+%D %
+%D \dimen16 \dimen 0
+%D \multiply \dimen16 \dimen 6
+%D \dimen20 \dimen 2
+%D \multiply \dimen20 \dimen 4
+%D \advance \dimen16 -\dimen20
+%D %
+%D \dimen18 \dimen12
+%D \multiply \dimen18 \dimen 6
+%D \dimen20 \dimen14
+%D \multiply \dimen20 \dimen 4
+%D \advance \dimen18 -\dimen20
+%D \dimen20 \dimen 4
+%D \multiply \dimen20 \dimen10
+%D \advance \dimen18 \dimen20
+%D \dimen20 \dimen 6
+%D \multiply \dimen20 \dimen 8
+%D \advance \dimen18 -\dimen20
+%D %
+%D \multiply \dimen12 -\dimen 2
+%D \multiply \dimen14 \dimen 0
+%D \advance \dimen12 \dimen14
+%D \dimen20 \dimen 2
+%D \multiply \dimen20 \dimen 8
+%D \advance \dimen12 \dimen20
+%D \dimen20 \dimen 0
+%D \multiply \dimen20 \dimen10
+%D \advance \dimen12 -\dimen20
+%D %
+%D %\ifdim\dimen16>1pt % oeps, can be < 1pt too
+%D \ifdim\dimen16=1pt \else
+%D \ifdim\dimen16>\MPconcatfactor pt
+%D \doMPreducedimen16
+%D \divide \dimen18 \dimen16 \doMPexpanddimen18
+%D \divide \dimen12 \dimen16 \doMPexpanddimen12
+%D \else
+%D \divide \dimen18 \dimen16 \doMPexpanddimen18 \doMPexpanddimen18
+%D \divide \dimen12 \dimen16 \doMPexpanddimen12 \doMPexpanddimen12
+%D \fi
+%D \fi
+%D %
+%D \edef#2{\withoutpt\the\dimen18}% % p_x^\prime
+%D \edef#4{\withoutpt\the\dimen12}} % p_y^\prime
+%D \stoptyping
+%D
+%D But, this one is still too inaccurate, so we now have:
+
+% \def\doMPconcat#1#2#3#4%
+% {\dimen12=#1pt % p_x
+% \dimen14=#3pt % p_y
+% %
+% % we should test for >-1024 too, but for the moment take the gamble
+% \chardef\MPfactor1\ifdim\dimen12<1024pt \ifdim\dimen14<1024pt 6\fi\fi
+% %
+% \multiply\dimen12 \MPfactor
+% \multiply\dimen14 \MPfactor
+% %
+% \doMPreducedimen12
+% \doMPreducedimen14
+% %
+% \dimen16 \dimen 0
+% \multiply \dimen16 \dimen 6
+% \dimen20 \dimen 2
+% \multiply \dimen20 \dimen 4
+% \advance \dimen16 -\dimen20
+% %
+% \dimen18 \dimen12
+% \multiply \dimen18 \dimen 6
+% \dimen20 \dimen14
+% \multiply \dimen20 \dimen 4
+% \advance \dimen18 -\dimen20
+% \dimen20 \dimen 4
+% \multiply \dimen20 \dimen10
+% \advance \dimen18 \dimen20
+% \dimen20 \dimen 6
+% \multiply \dimen20 \dimen 8
+% \advance \dimen18 -\dimen20
+% %
+% \multiply \dimen12 -\dimen 2
+% \multiply \dimen14 \dimen 0
+% \advance \dimen12 \dimen14
+% \dimen20 \dimen 2
+% \multiply \dimen20 \dimen 8
+% \advance \dimen12 \dimen20
+% \dimen20 \dimen 0
+% \multiply \dimen20 \dimen10
+% \advance \dimen12 -\dimen20
+% %
+% \ifdim\dimen16=1pt \else
+% \ifdim\dimen16>\MPconcatfactor pt
+% \doMPreducedimen16
+% \divide \dimen18 \dimen16 \doMPexpanddimen18
+% \divide \dimen12 \dimen16 \doMPexpanddimen12
+% \else
+% \divide \dimen18 \dimen16 \doMPexpanddimen18 \doMPexpanddimen18
+% \divide \dimen12 \dimen16 \doMPexpanddimen12 \doMPexpanddimen12
+% \fi
+% \fi
+% %
+% \divide\dimen18 \MPfactor
+% \divide\dimen12 \MPfactor
+% %
+% \edef#2{\withoutpt\the\dimen18}% % p_x^\prime
+% \edef#4{\withoutpt\the\dimen12}} % p_y^\prime
+
+%D DHL: Ideally, $r_x$, $r_y$, $s_x$, $s_y$ should be in macros, not
+%D dimensions (they are scalar quantities after all, not lengths). I
+%D suppose the authors decided to do calculations with integer
+%D arithmetic instead of using real factors because it's faster.
+%D However, the actual macros test slower, possibly because I've
+%D omitted three nested loops. In my test files, my approach is more
+%D accurate. It is also far simpler and overflow does not seem to be a
+%D significant concern. The scale factors written by Metapost are (?)
+%D always $<=1$ (it scales coordinates internally) and coordinates are
+%D always likely to be less than \type {\maxdimen}.
+%D
+%D If this should ever cause problems, the scale factors can be reduced.
+
+% \def\doMPconcat#1#2#3#4%
+% {\dimen12=#1pt % p_x % #1pt
+% \dimen14=#3pt % p_y % #3pt
+% \advance\dimen12 -\dimen8 % p_x - t_x
+% \advance\dimen14 -\dimen10 % p_y - t_y
+% \dimen18=\withoutpt\the\dimen6 \dimen12 % s_y(p_x - t_x)
+% \advance\dimen18 -\withoutpt\the\dimen4 \dimen14 % - r_y(p_y-t_y)
+% \dimen14=\withoutpt\the\dimen0 \dimen14 % s_x(p_y-t_y)
+% \advance\dimen14 -\withoutpt\the\dimen2 \dimen12 % - r_x(p_x-t_x)
+% % \MPscratchDim contains precomputed 1/D:
+% \dimen18=\withoutpt\the\MPscratchDim \dimen18
+% \dimen14=\withoutpt\the\MPscratchDim \dimen14
+% \edef#2{\withoutpt\the\dimen18}% % p_x^\prime
+% \edef#4{\withoutpt\the\dimen14}} % p_y^\prime
+
+\def\doMPconcat#1#2#3#4%
+ {\dimen12=#1pt % p_x % #1pt
+ \dimen14=#3pt % p_y % #3pt
+ \advance\dimen12 -\dimen8 % p_x - t_x
+ \advance\dimen14 -\dimen10 % p_y - t_y
+ \dimen18=\withoutpt\the\dimen6 \dimen12 % s_y(p_x - t_x)
+ \advance\dimen18 -\withoutpt\the\dimen4 \dimen14 % - r_y(p_y-t_y)
+ \dimen14=\withoutpt\the\dimen0 \dimen14 % s_x(p_y-t_y)
+ \advance\dimen14 -\withoutpt\the\dimen2 \dimen12 % - r_x(p_x-t_x)
+ % \MPreciprocal contains precomputed 1/D:
+ \dimen18=\MPreciprocal\dimen18
+ \dimen14=\MPreciprocal\dimen14
+ \edef#2{\withoutpt\the\dimen18}% % p_x^\prime
+ \edef#4{\withoutpt\the\dimen14}} % p_y^\prime
+
+% faster but not that often used
+%
+% \def\doMPconcat#1#2#3#4%
+% {\dimen12\dimexpr#1\points-\dimen 8\relax % p_x-t_x
+% \dimen14\dimexpr#3\points-\dimen10\relax % p_y-t_y
+% \dimen18\dimexpr\withoutpt\the\dimen6\dimen12-\withoutpt\the\dimen4\dimen14\relax % s_y(p_x-t_x)-r_y(p_y-t_y)
+% \dimen14\dimexpr\withoutpt\the\dimen0\dimen14-\withoutpt\the\dimen2\dimen12\relax % s_x(p_y-t_y)-r_x(p_x-t_x)
+% \edef#2{\withoutpt\the\dimexpr\MPreciprocal\dimen18\relax}% % p_x^\prime
+% \edef#4{\withoutpt\the\dimexpr\MPreciprocal\dimen14\relax}} % p_y^\prime
+
+%D One reason for Daniel to write this patch was that at small sizes
+%D the accuracy was less than optimal. Here is a test that demonstrates
+%D that his alternative is pretty good:
+%D
+%D \startlinecorrection
+%D \startMPcode
+%D for i = 5cm,1cm,5mm,1mm,.5mm,.1mm,.01mm :
+%D draw fullcircle scaled i withpen pencircle xscaled (i/10) yscaled (i/20) rotated 45 ;
+%D endfor ;
+%D \stopMPcode
+%D \stoplinecorrection
+
+%D The following explanation of the conversion process was
+%D posted to the \PDFTEX\ mailing list by Tanmoy. The original
+%D macro was part of a set of macro's that included sinus and
+%D cosinus calculations as well as scaling and translating. The
+%D \METAPOST\ to \PDF\ conversion however only needs
+%D transformation.
+
+%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
+%D that the device space coordinates are $(D_x, D_y)$. Then, in
+%D \POSTSCRIPT\ $(D_x, D_y)$ can be written in terms of
+%D $(U_x, U_y)$ in matrix notation, either as
+%D
+%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 \stopformula
+%D
+%D or
+%D
+%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 \stopformula
+%D
+%D both of which is a shorthand for the same set of equations:
+%D
+%D \placeformula
+%D \startformula
+%D D_x = s_x U_x + r_y U_y + t_x
+%D \stopformula
+%D
+%D \placeformula
+%D \startformula
+%D D_y = r_x U_x + s_y U_y + t_y
+%D \stopformula
+%D
+%D which define what is called an `affine transformation'.
+%D
+%D \POSTSCRIPT\ represents the `transformation matrix' as a
+%D six element matrix instead of a $3\times 3$ array because
+%D three of the elements are always~0, 0 and~1. Thus the above
+%D transformation is written in postscript as $[s_x\, r_x\,
+%D r_y\, s_y\, t_x\, t_y]$. However, when doing any
+%D calculations, it is useful to go back to the original
+%D matrix notation (whichever: I will use the second) and
+%D continue from there.
+%D
+%D As an example, if the current transformation matrix is
+%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 \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.
+%D
+%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 \stopnarrower
+%D
+%D Well, what is the net effect? In matrix notation, it is
+%D
+%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 \stopformula
+%D
+%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 \stopformula
+%D
+%D where $(I_x, I_y)$ is the intermediate coordinate.
+%D
+%D Now, the beauty of the matrix notation is that when there is
+%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$\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 \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 \stopformula
+%D
+%D with
+%D
+%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
+%D r_y^\prime & = s_x c + r_y d \cr
+%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 \stopformula
+
+%D In fact, the same rule is true not only when one is going
+%D from user coordinates to device coordinates, but whenever
+%D one is composing two `transformations' together
+%D (transformations are `associative'). Note that the formula
+%D is not symmetric: you have to keep track of which
+%D transformation existed before (i.e.\ the equivalent of
+%D $[s_x\, r_x\, r_y\, s_y\, t_x\, t_y]$) and which was
+%D specified later (i.e.\ the equivalent of $[a\, b\, c\, d\,
+%D e\, f]$). Note also that the language can be rather
+%D confusing: the one specified later `acts earlier',
+%D converting the user space coordinates to intermediate
+%D coordinates, which are then acted upon by the pre||existing
+%D transformation. The important point is that order of
+%D transformation matrices cannot be flipped (transformations
+%D are not `commutative').
+%D
+%D Now what does it mean to move a transformation matrix
+%D before a drawing? What it means is that given a point
+%D $(P_x, P_y)$ we need a different set of coordinates
+%D $(P_x^\prime, P_y^\prime)$ such that if the transformation
+%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 \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 \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 \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
+%D 0 &0 &1 \cr}
+%D \pmatrix{P_x\cr
+%D P_y\cr
+%D 1 \cr}
+%D \stopformula
+%D
+%D where, the inverse transformation matrix is given by
+%D
+%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
+%D s_y^\prime & = s_x / D \cr
+%D r_x^\prime & = - r_x / D \cr
+%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 \stopformula
+%D
+%D And you can see that when expanded out, this does
+%D give the formulas:
+%D
+%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 \stopformula
+%D
+%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 \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
+%D be represented as 2.3pt for example. In this scheme,
+%D multiplying two numbers involves multiplying the \DIMENSION\
+%D registers and dividing by 65536. Accuracy demands that the
+%D division be done as late as possible, but overflow
+%D considerations need early division.
+%D
+%D Division involves dividing the two \DIMENSION\ registers and
+%D multiplying the result by 65536. Again, accuracy would
+%D demand that the numerator be multiplied (and|/|or the
+%D denominator divided) early: but that can lead to overflow
+%D which needs to be avoided.
+%D
+%D If nothing is known about the numbers to start with (in
+%D concat), I have chosen to divide the 65536 as a 256 in each
+%D operand. However, in the series calculating the sine and
+%D cosine, I know that the terms are small (because I never
+%D have an angle greater than 45 degrees), so I chose to
+%D apportion the factor in a different way.
+
+%M \stop
+
+%D The path is output using the values saved on the stack. If
+%D needed, all coordinates are recalculated.
+
+\def\finishMPpath
+ {\PDFcode{\ifcase\finiMPpath W n\or S\or f\or B\fi}}
+
+\def\processMPpath
+ {\checkMPpath
+ \ifcase\nofMPsegments\else
+ \flushMPpath
+ \closeMPpath
+ \finishMPpath
+ \fi
+ \let\handleMPsequence\dohandleMPsequence
+ \resetMPstack
+ \nofMPsegments0
+ \handleMPsequence}
+
+%D The following \METAPOST\ code is quite valid but, when
+%D processed and converted to \PDF, will make a file
+%D unprintable on a Hewlett Packard printer (from Acrobat
+%D $v<=5$). Who is to blame, the driver of the OS layer in
+%D between, is hard to determine, so we add an additional
+%D check.
+%D
+%D \starttyping
+%D clip currentpicture to origin -- cycle ;
+%D setbounds currentpicture to fullsquare scaled 5cm ;
+%D \stoptyping
+
+\def\checkMPpath
+ {\ifcase\finiMPpath
+ \ifnum\nofMPsegments<3 % n is one ahead
+ \message{omitting zero clip path}%
+ \nofMPsegments0
+ \fi
+ \fi}
+
+%D In \PDF\ the \type{cm} operator must precede the path
+%D specification. We therefore can output the \type{cm} at
+%D the moment we encounter it.
+
+\def\handleMPpathconcat
+ {\presetMPconcat
+ \PDFcode{\gMPs1 \gMPs2 \gMPs3 \gMPs4 \gMPs5 \gMPs6 cm}%
+ \resetMPstack}
+
+\def\handleMPpathscale
+ {\presetMPscale
+ \PDFcode{\gMPs1 0 0 \gMPs2 0 0 cm}%
+ \resetMPstack}
+
+%D This macro interprets the path and saves it as compact as
+%D possible.
+
+\def\dohandleMPpath#1%
+ {\ifcase\lccode`#1\relax
+ \expandafter\dohandleMPpathA
+ \else
+ \expandafter\dohandleMPpathB
+ \fi#1}
+
+%\def\dohandleMPpathA#1 %
+% {\setMPargument{#1}%
+% \handleMPsequence}
+
+\let\dohandleMPpathA\setMPsequence
+
+% \def\dohandleMPpathB#1 %
+% {\def\somestring{#1}%
+% \ifx\somestring\PSlineto
+% \setMPkeyword0
+% \else\ifx\somestring\PScurveto
+% \setMPkeyword1
+% \else\ifx\somestring\PSrlineto
+% \setMPkeyword2
+% \else\ifx\somestring\PSmoveto
+% \setMPkeyword3
+% \else\ifx\somestring\PSclip
+% % \chardef\finiMPpath0 % already
+% \let\handleMPsequence\processMPpath
+% \else\ifx\somestring\PSgsave
+% \chardef\finiMPpath3
+% \else\ifx\somestring\PSgrestore
+% \else\ifx\somestring\PSfill
+% \ifcase\finiMPpath
+% \chardef\finiMPpath2
+% \let\handleMPsequence\processMPpath
+% \fi
+% \else\ifx\somestring\PSstroke
+% \ifcase\finiMPpath
+% \chardef\finiMPpath1
+% \fi
+% \let\handleMPsequence\processMPpath
+% \else\ifx\somestring\PSclosepath
+% \def\closeMPpath{\PDFcode{h}}%
+% \else\ifx\somestring\PSconcat
+% \cleanupMPconcat
+% \let\flushMPpath\flushconcatMPpath
+% \handleMPpathconcat
+% \else\ifx\somestring\PSscale
+% \let\flushMPpath\flushconcatMPpath
+% \handleMPpathscale
+% \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+% \handleMPsequence}
+
+\def\installMPSkeywordP#1#2%
+ {\expandafter\def\csname\@@MP:P:#1\endcsname{#2}}
+
+\def\installMPSshortcutP#1#2% todo: \let
+ {\expandafter\let\csname\@@MP:P:#1\expandafter\endcsname\csname\@@MP:P:#2\endcsname}
+
+\def\dohandleMPpathB#1 %
+ {\def\somestring{#1}%
+ \ifcsname\@@MP:P:\somestring\endcsname
+ \csname\@@MP:P:\somestring\expandafter\endcsname
+ \fi
+ \handleMPsequence}
+
+\ifx\eTeXversion\undefined
+ \def\dohandleMPpathB#1 %
+ {\def\somestring{#1}%
+ \csname\@@MP:P:\somestring\endcsname
+ \handleMPsequence}
+\fi
+
+\installMPSkeywordP \PSlineto
+ {\setMPkeyword0 }
+\installMPSkeywordP \PScurveto
+ {\setMPkeyword1 }
+\installMPSkeywordP \PSrlineto
+ {\setMPkeyword2 }
+\installMPSkeywordP \PSmoveto
+ {\edef\lastMPmoveX{\gMPs1}%
+ \edef\lastMPmoveY{\gMPs2}%
+ \resetMPstack
+ \setMPkeyword3 }
+\installMPSkeywordP \PSclip
+ {% \chardef\finiMPpath\zerocount % already
+ \let\handleMPsequence\processMPpath}
+\installMPSkeywordP \PSgsave
+ {\chardef\finiMPpath3 }
+\installMPSkeywordP \PSgrestore
+ {}
+\installMPSkeywordP \PSfill
+ {\ifcase\finiMPpath
+ \chardef\finiMPpath2
+ \let\handleMPsequence\processMPpath
+ \fi}
+\installMPSkeywordP \PSstroke
+ {\ifcase\finiMPpath
+ \chardef\finiMPpath1
+ \fi
+ \let\handleMPsequence\processMPpath}
+\installMPSkeywordP \PSclosepath
+ {\def\closeMPpath{\PDFcode{h}}}
+\installMPSkeywordP \PSconcat
+ {\cleanupMPconcat
+ \let\flushMPpath\flushconcatMPpath
+ \handleMPpathconcat}
+\installMPSkeywordP \PSscale
+ {\let\flushMPpath\flushconcatMPpath
+ \handleMPpathscale}
+
+\installMPSshortcutP {l} \PSlineto
+\installMPSshortcutP {r} \PSrlineto
+\installMPSshortcutP {m} \PSmoveto
+\installMPSshortcutP {c} \PScurveto
+
+\installMPSshortcutP {q} \PSgsave
+\installMPSshortcutP {Q} \PSgrestore
+\installMPSshortcutP {S} \PSstroke
+\installMPSshortcutP {F} \PSfill
+\installMPSshortcutP {B} \PSgsave
+\installMPSshortcutP {W} \PSclip
+\installMPSshortcutP {p} \PSclosepath
+
+\installMPSshortcutP {s} \PSscale
+\installMPSshortcutP {t} \PSconcat
+
+%D The main conversion command is:
+%D
+%D \starttyping
+%D \convertMPtoPDF {filename} {x scale} {y scale}
+%D \stoptyping
+%D
+%D The dimensions are derived from the bounding box. So we
+%D only have to say:
+%D
+%D \starttyping
+%D \convertMPtoPDF{mp-pra-1.eps}{1}{1}
+%D \convertMPtoPDF{mp-pra-1.eps}{.5}{.5}
+%D \stoptyping
+
+%D \macros
+%D {makeMPintoPDFobject,lastPDFMPobject}
+%D
+%D For experts there are a few more options. When attributes
+%D are to be added, the code must be embedded in an object
+%D accompanied with the appropriate directives. One can
+%D influence this process with \type {\makeMPintoPDFobject}.
+%D
+%D This option defaults to~0, because \CONTEXT\ takes care
+%D of objects at another level, which saves some bytes.
+%D
+%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 \stoptabulate
+%D
+%D The last object number used is avaliable in the macro
+%D \type {\lastPDFMPobject}.
+
+\ifx\makeMPintoPDFobject\undefined \newcount\makeMPintoPDFobject \fi
+
+\def\lastPDFMPobject{0}
+
+%D The additional code needed can be made available in the
+%D (global) macro \type {\currentPDFresources}.
+
+\let\currentPDFresources\empty
+
+\newtoks\everyMPtoPDFconversion
+
+\def\convertMPtoPDF % #1#2#3%
+ {\bgroup
+ \defineMPtoPDFfallbacks
+ \ifx\pdfdecimaldigits\undefined\else \pdfdecimaldigits=5 \fi % new
+ \setbox\scratchbox\vbox\bgroup
+ \xdef\MPheight{0pt}%
+ \xdef\MPwidth {0pt}%
+ \forgetall
+ \offinterlineskip
+ \startMPresources
+ \doprocessMPtoPDFfile} %
+
+%D The next one is kind of private and probably will become obsolete):
+
+\def\processMPtoPDFfile % file xscale yscale
+ {\bgroup
+ \let\finishMPgraphic\egroup
+ \doprocessMPtoPDFfile}
+
+\let\setMPextensions\relax
+
+\def\doprocessMPtoPDFfile#1#2#3% file xscale yscale
+ {\setMPspecials
+ \setMPextensions
+ \the\everyMPtoPDFconversion
+ \catcode`\^^M=\@@endofline
+ \startMPscanning
+ \let\do\empty
+ \xdef\MPxscale{#2}%
+ \xdef\MPyscale{#3}%
+ \xdef\MPxoffset{0}%
+ \xdef\MPyoffset{0}%
+ \xdef\MPyshift{0pt}%
+ \donefalse
+ \let\handleMPsequence\dohandleMPsequence
+ \message{[MP to PDF]}% was: [MP to PDF #1] but there is a (#1) anyway
+ \input#1\relax}
+
+\def\PDFMPformoffset
+ {\ifx\objectoffset\undefined0pt\else\objectoffset\fi}
+
+\chardef\blackoutMPgraphic0 % in ConTeXt 1
+
+\def\finishMPgraphic
+ {\stopMPresources
+ \egroup
+ \setbox\scratchbox\vbox
+ {\forgetall
+ \hbox
+ {\PDFcode{q \MPxscale\space 0 0 \MPyscale\space \MPxoffset\space \MPyoffset\space cm}%
+ \ifcase\blackoutMPgraphic\or\PDFcode{0 g 0 G}\fi
+ \lower\MPyshift\box\scratchbox % unscaled shift
+ \PDFcode{Q}}}%
+ \ht\scratchbox\MPheight
+ \wd\scratchbox\MPwidth
+ \dp\scratchbox0pt\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
+ % \makeMPintoPDFobject0 % no pdftex at all
+ %\else\ifx\pdftexversion\undefined
+ % \makeMPintoPDFobject0 % no pdftex at all
+ %\else\ifnum\pdftexversion<14
+ % \makeMPintoPDFobject0 % 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)
+ \makeMPintoPDFobject1
+ \fi\fi
+ \ifcase\makeMPintoPDFobject
+ \box#1%
+ \or
+ \scratchdimen\PDFMPformoffset\relax
+ \ifdim\scratchdimen>0pt % compensate for error
+ \setbox#1\vbox spread 2\scratchdimen
+ {\forgetall\vss\hbox spread 2\scratchdimen{\hss\box#1\hss}\vss}%
+ \fi
+ \setMPPDFobject{\currentPDFresources}{#1}%
+ \ifdim\scratchdimen>0pt % compensate for error
+ \vbox to \MPheight
+ {\forgetall\vss\hbox to \MPwidth{\hss\getMPPDFobject\hss}\vss}%
+ \else
+ \getMPPDFobject
+ \fi
+ \global\let\currentPDFresources\empty
+ \else
+ \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
+ \ifx\everyPDFxform\undefined\else\the\everyPDFxform\fi
+ \immediate\pdfxform resources{#1}#2%
+ \edef\getMPPDFobject{\noexpand\pdfrefxform\the\pdflastxform}%
+ \fi\fi\fi}
+
+\let\getMPPDFobject\relax
+
+%D \macros
+%D {deleteMPgraphic,
+%D startMPresources,
+%D stopMPresources}
+%D
+%D Here are a few hooks for \CONTEXT\ specific things.
+
+\ifx\deleteMPgraphic\undefined
+ \def\deleteMPgraphic#1{}
+\fi
+
+\ifx\startMPresources\undefined
+ \let\startMPresources\relax
+ \let\stopMPresources\relax
+\fi
+
+%D \macros
+%D {twodigitMPoutput}
+%D
+%D We can limit the precision to two digits after the comma
+%D by saying:
+%D
+%D \starttyping
+%D \twodigitMPoutput
+%D \stoptyping
+%D
+%D This option only works in \CONTEXT\ combined with \ETEX.
+
+\def\twodigitMPoutput
+ {\let\!MP \twodigitrounding
+ \def\!MPgMPs##1{\twodigitrounding{\gMPs##1}}%
+ \def\!MPgMPa##1{\twodigitrounding{\gMPa##1}}}
+
+\let\!MP \empty
+\let\!MPgMPa\gMPa
+\let\!MPgMPs\gMPs
+
+%D This kind of conversion is possible because \METAPOST\
+%D does all the calculations. Converting other \POSTSCRIPT\
+%D files would drive both me and \TEX\ crazy.
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/supp-pdf.tex b/Master/texmf-dist/tex/context/base/mkii/supp-pdf.tex
index 2ae87806782..2ae87806782 100644
--- a/Master/texmf-dist/tex/context/base/supp-pdf.tex
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-pdf.tex
diff --git a/Master/texmf-dist/tex/context/base/supp-ran.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-ran.mkii
index 0a39026bfd3..0a39026bfd3 100644
--- a/Master/texmf-dist/tex/context/base/supp-ran.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-ran.mkii
diff --git a/Master/texmf-dist/tex/context/base/supp-spe.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-spe.mkii
index 4625695c7a2..4625695c7a2 100644
--- a/Master/texmf-dist/tex/context/base/supp-spe.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-spe.mkii
diff --git a/Master/texmf-dist/tex/context/base/supp-tpi.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-tpi.mkii
index dc230563b71..2c3e282e390 100644
--- a/Master/texmf-dist/tex/context/base/supp-tpi.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-tpi.mkii
@@ -20,7 +20,7 @@
%D implemented in \type{supp-mps}.
\ifnum\texengine=\luatexengine
- \endinput
+ \expandafter \endinput
\fi
\ifx\undefined\writestatus \input supp-mis.mkii \relax \fi
diff --git a/Master/texmf-dist/tex/context/base/supp-vis.mkii b/Master/texmf-dist/tex/context/base/mkii/supp-vis.mkii
index 22a745b1308..22a745b1308 100644
--- a/Master/texmf-dist/tex/context/base/supp-vis.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/supp-vis.mkii
diff --git a/Master/texmf-dist/tex/context/base/symb-cow.mkii b/Master/texmf-dist/tex/context/base/mkii/symb-cow.mkii
index 933a00c45e7..933a00c45e7 100644
--- a/Master/texmf-dist/tex/context/base/symb-cow.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/symb-cow.mkii
diff --git a/Master/texmf-dist/tex/context/base/symb-eur.mkii b/Master/texmf-dist/tex/context/base/mkii/symb-eur.mkii
index 67023ec91c0..67023ec91c0 100644
--- a/Master/texmf-dist/tex/context/base/symb-eur.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/symb-eur.mkii
diff --git a/Master/texmf-dist/tex/context/base/symb-glm.mkii b/Master/texmf-dist/tex/context/base/mkii/symb-glm.mkii
index ff94bfe7fc7..ff94bfe7fc7 100644
--- a/Master/texmf-dist/tex/context/base/symb-glm.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/symb-glm.mkii
diff --git a/Master/texmf-dist/tex/context/base/symb-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/symb-ini.mkii
index 3154c8a04c4..3154c8a04c4 100644
--- a/Master/texmf-dist/tex/context/base/symb-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/symb-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/symb-jmn.mkii b/Master/texmf-dist/tex/context/base/mkii/symb-jmn.mkii
index aea2dce7b0b..aea2dce7b0b 100644
--- a/Master/texmf-dist/tex/context/base/symb-jmn.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/symb-jmn.mkii
diff --git a/Master/texmf-dist/tex/context/base/symb-mis.mkii b/Master/texmf-dist/tex/context/base/mkii/symb-mis.mkii
index dacb816b411..dacb816b411 100644
--- a/Master/texmf-dist/tex/context/base/symb-mis.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/symb-mis.mkii
diff --git a/Master/texmf-dist/tex/context/base/symb-mvs.mkii b/Master/texmf-dist/tex/context/base/mkii/symb-mvs.mkii
index aae4e92d66c..aae4e92d66c 100644
--- a/Master/texmf-dist/tex/context/base/symb-mvs.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/symb-mvs.mkii
diff --git a/Master/texmf-dist/tex/context/base/symb-nav.mkii b/Master/texmf-dist/tex/context/base/mkii/symb-nav.mkii
index c9d1aae1d73..c9d1aae1d73 100644
--- a/Master/texmf-dist/tex/context/base/symb-nav.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/symb-nav.mkii
diff --git a/Master/texmf-dist/tex/context/base/symb-run.mkii b/Master/texmf-dist/tex/context/base/mkii/symb-run.mkii
index 8b8c62d8b55..8b8c62d8b55 100644
--- a/Master/texmf-dist/tex/context/base/symb-run.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/symb-run.mkii
diff --git a/Master/texmf-dist/tex/context/base/symb-uni.mkii b/Master/texmf-dist/tex/context/base/mkii/symb-uni.mkii
index f5435810f15..f5435810f15 100644
--- a/Master/texmf-dist/tex/context/base/symb-uni.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/symb-uni.mkii
diff --git a/Master/texmf-dist/tex/context/base/symb-was.mkii b/Master/texmf-dist/tex/context/base/mkii/symb-was.mkii
index e131cf04dae..e131cf04dae 100644
--- a/Master/texmf-dist/tex/context/base/symb-was.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/symb-was.mkii
diff --git a/Master/texmf-dist/tex/context/base/syst-con.mkii b/Master/texmf-dist/tex/context/base/mkii/syst-con.mkii
index c1ad788cfe5..c1ad788cfe5 100644
--- a/Master/texmf-dist/tex/context/base/syst-con.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/syst-con.mkii
diff --git a/Master/texmf-dist/tex/context/base/syst-ext.mkii b/Master/texmf-dist/tex/context/base/mkii/syst-ext.mkii
index 39f4145f278..39f4145f278 100644
--- a/Master/texmf-dist/tex/context/base/syst-ext.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/syst-ext.mkii
diff --git a/Master/texmf-dist/tex/context/base/syst-fnt.mkii b/Master/texmf-dist/tex/context/base/mkii/syst-fnt.mkii
index 5669475a634..5669475a634 100644
--- a/Master/texmf-dist/tex/context/base/syst-fnt.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/syst-fnt.mkii
diff --git a/Master/texmf-dist/tex/context/base/syst-gen.mkii b/Master/texmf-dist/tex/context/base/mkii/syst-gen.mkii
index 8b71b77d5fc..8b71b77d5fc 100644
--- a/Master/texmf-dist/tex/context/base/syst-gen.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/syst-gen.mkii
diff --git a/Master/texmf-dist/tex/context/base/syst-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/syst-ini.mkii
index 9988efc10ca..7ae5f6c814f 100644
--- a/Master/texmf-dist/tex/context/base/syst-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/syst-ini.mkii
@@ -90,10 +90,9 @@
\expandafter\end
\fi
-% todo: pdfsave pdfrestore pdfcolor... don't initialize them
-
\ifnum\texengine=\luatexengine
\directlua 0 { % this info is stored in the format
+ % kpse.set_program_name("context")
lua.name[0] = "main ctx instance"
local extraprimitives = tex.extraprimitives
local enableprimitives = tex.enableprimitives
@@ -119,6 +118,141 @@
}
\fi
+\ifdefined\pdfextension
+
+ % promoted
+
+ \let\pdfpagewidth \pagewidth
+ \let\pdfpageheight \pageheight
+
+ \let\pdfadjustspacing \adjustspacing
+ \let\pdfprotrudechars \protrudechars
+ \let\pdfnoligatures \ignoreligaturesinfont
+ \let\pdffontexpand \expandglyphsinfont
+ \let\pdfcopyfont \copyfont
+
+ \let\pdfxform \saveboxresource
+ \let\pdflastxform \lastsavedboxresourceindex
+ \let\pdfrefxform \useboxresource
+
+ \let\pdfximage \saveimageresource
+ \let\pdflastximage \lastsavedimageresourceindex
+ \let\pdflastximagepages\lastsavedimageresourcepages
+ \let\pdfrefximage \useimageresource
+
+ \let\pdfsavepos \savepos
+ \let\pdflastxpos \lastxpos
+ \let\pdflastypos \lastypos
+
+ % \let\pdftexversion \luatexversion
+ % \let\pdftexrevision \luatexrevision
+ \let\pdftexbanner \luatexbanner
+
+ \let\pdfoutput \outputmode
+ \let\pdfdraftmode \draftmode
+
+ \let\pdfpxdimen \pxdimen
+
+ \let\pdfinsertht \insertht
+
+ % also promoted
+
+ % \let\pdfnormaldeviate \normaldeviate
+ % \let\pdfuniformdeviate \uniformdeviate
+ % \let\pdfsetrandomseed \setrandomseed
+ % \let\pdfrandomseed \randomseed
+ %
+ % \let\pdfprimitive \primitive
+ %
+ % \let\expandafter\csname ifpdfabsnum\expandafter\endcsname\csname ifabsnum\endcsname
+ % \let\expandafter\csname ifpdfabsdim\expandafter\endcsname\csname ifabsdim\endcsname
+ % \let\expandafter\csname ifpdfprimitive\expandafter\endcsname\csname ifprimitive\endcsname
+
+ % removed (also some others but already long ago)
+
+ \newdimen\pdfeachlineheight
+ \newdimen\pdfeachlinedepth
+ \newdimen\pdflastlinedepth
+ \newdimen\pdffirstlineheight
+ \newdimen\pdfignoreddimen
+
+ % grouped
+
+ \protected\def\pdfliteral {\pdfextension literal}
+ \protected\def\pdfcolorstack {\pdfextension colorstack}
+ \protected\def\pdfsetmatrix {\pdfextension setmatrix}
+ \protected\def\pdfsave {\pdfextension save\relax}
+ \protected\def\pdfrestore {\pdfextension restore\relax}
+ \protected\def\pdfobj {\pdfextension obj }
+ \protected\def\pdfrefobj {\pdfextension refobj }
+ \protected\def\pdfannot {\pdfextension annot }
+ \protected\def\pdfstartlink {\pdfextension startlink }
+ \protected\def\pdfendlink {\pdfextension endlink\relax}
+ \protected\def\pdfoutline {\pdfextension outline }
+ \protected\def\pdfdest {\pdfextension dest }
+ \protected\def\pdfthread {\pdfextension thread }
+ \protected\def\pdfstartthread {\pdfextension startthread }
+ \protected\def\pdfendthread {\pdfextension endthread\relax}
+ \protected\def\pdfinfo {\pdfextension info }
+ \protected\def\pdfcatalog {\pdfextension catalog }
+ \protected\def\pdfnames {\pdfextension names }
+ \protected\def\pdfincludechars {\pdfextension includechars }
+ \protected\def\pdffontattr {\pdfextension fontattr }
+ \protected\def\pdfmapfile {\pdfextension mapfile }
+ \protected\def\pdfmapline {\pdfextension mapline }
+ \protected\def\pdftrailer {\pdfextension trailer }
+ \protected\def\pdfglyphtounicode {\pdfextension glyphtounicode }
+
+ % grouped
+
+ \def\pdftexversion {\numexpr\pdffeedback version}
+ \def\pdftexrevision {\pdffeedback revision}
+ \def\pdflastlink {\numexpr\pdffeedback lastlink}
+ \def\pdfretval {\numexpr\pdffeedback retval}
+ \def\pdflastobj {\numexpr\pdffeedback lastobj}
+ \def\pdflastannot {\numexpr\pdffeedback lastannot}
+ \def\pdfxformname {\numexpr\pdffeedback xformname}
+ \def\pdfcreationdate {\pdffeedback creationdate}
+ \def\pdffontname {\numexpr\pdffeedback fontname}
+ \def\pdffontobjnum {\numexpr\pdffeedback fontobjnum}
+ \def\pdffontsize {\dimexpr\pdffeedback fontsize}
+ \def\pdfpageref {\numexpr\pdffeedback pageref}
+ \def\pdfcolorstackinit {\pdffeedback colorstackinit}
+
+ % used when defined
+
+ \edef\pdfcompresslevel {\pdfvariable compresslevel} \pdfcompresslevel 9
+ \edef\pdfobjcompresslevel {\pdfvariable objcompresslevel} \pdfobjcompresslevel 1
+ \edef\pdfdecimaldigits {\pdfvariable decimaldigits} \pdfdecimaldigits 3
+ \edef\pdfgamma {\pdfvariable gamma} \pdfgamma 1000
+ \edef\pdfimageresolution {\pdfvariable imageresolution} \pdfimageresolution 71
+ \edef\pdfimageapplygamma {\pdfvariable imageapplygamma} \pdfimageapplygamma 0
+ \edef\pdfimagegamma {\pdfvariable imagegamma} \pdfimagegamma 2200
+ \edef\pdfimagehicolor {\pdfvariable imagehicolor} \pdfimagehicolor 1
+ \edef\pdfimageaddfilename {\pdfvariable imageaddfilename} \pdfimageaddfilename 1
+ \edef\pdfpkresolution {\pdfvariable pkresolution} \pdfpkresolution 72
+ \edef\pdfinclusioncopyfonts {\pdfvariable inclusioncopyfonts} \pdfinclusioncopyfonts 0
+ \edef\pdfinclusionerrorlevel {\pdfvariable inclusionerrorlevel} \pdfinclusionerrorlevel 0
+ \edef\pdfgentounicode {\pdfvariable gentounicode} \pdfgentounicode 0
+ \edef\pdfpagebox {\pdfvariable pagebox} \pdfpagebox 0
+ \edef\pdfminorversion {\pdfvariable minorversion} \pdfminorversion 4
+ \edef\pdfuniqueresname {\pdfvariable uniqueresname} \pdfuniqueresname 0
+
+ \edef\pdfhorigin {\pdfvariable horigin} \pdfhorigin 1in
+ \edef\pdfvorigin {\pdfvariable vorigin} \pdfvorigin 1in
+ \edef\pdflinkmargin {\pdfvariable linkmargin} \pdflinkmargin 0pt
+ \edef\pdfdestmargin {\pdfvariable destmargin} \pdfdestmargin 0pt
+ \edef\pdfthreadmargin {\pdfvariable threadmargin} \pdfthreadmargin 0pt
+
+ \edef\pdfpagesattr {\pdfvariable pagesattr}
+ \edef\pdfpageattr {\pdfvariable pageattr}
+ \edef\pdfpageresources {\pdfvariable pageresources}
+ \edef\pdfxformattr {\pdfvariable xformattr}
+ \edef\pdfxformresources {\pdfvariable xformresources}
+ \edef\pdfpkmode {\pdfvariable pkmode}
+
+\fi
+
%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:
@@ -278,6 +412,12 @@
\fi\fi
#1#2#3#4#5}
+%D Goodie:
+
+\ifnum\texengine=\luatexengine
+ \input luatex-pdf \relax
+\fi
+
%D Since the number of chars exceed 256 now, we can use \type
%D {\chardef} instead of the more limited \type {\mathchardef}.
diff --git a/Master/texmf-dist/tex/context/base/syst-new.mkii b/Master/texmf-dist/tex/context/base/mkii/syst-new.mkii
index 34b535b901e..34b535b901e 100644
--- a/Master/texmf-dist/tex/context/base/syst-new.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/syst-new.mkii
diff --git a/Master/texmf-dist/tex/context/base/syst-pln.mkii b/Master/texmf-dist/tex/context/base/mkii/syst-pln.mkii
index 1032b40b595..1032b40b595 100644
--- a/Master/texmf-dist/tex/context/base/syst-pln.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/syst-pln.mkii
diff --git a/Master/texmf-dist/tex/context/base/syst-rtp.mkii b/Master/texmf-dist/tex/context/base/mkii/syst-rtp.mkii
index fc0f503b062..fc0f503b062 100644
--- a/Master/texmf-dist/tex/context/base/syst-rtp.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/syst-rtp.mkii
diff --git a/Master/texmf-dist/tex/context/base/syst-rtp.mkiv b/Master/texmf-dist/tex/context/base/mkii/syst-rtp.mkiv
index 82c0778b43f..82c0778b43f 100644
--- a/Master/texmf-dist/tex/context/base/syst-rtp.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkii/syst-rtp.mkiv
diff --git a/Master/texmf-dist/tex/context/base/syst-str.mkii b/Master/texmf-dist/tex/context/base/mkii/syst-str.mkii
index aacb70ec742..aacb70ec742 100644
--- a/Master/texmf-dist/tex/context/base/syst-str.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/syst-str.mkii
diff --git a/Master/texmf-dist/tex/context/base/mkii/syst-tex.mkii b/Master/texmf-dist/tex/context/base/mkii/syst-tex.mkii
new file mode 100644
index 00000000000..fee2b51b228
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkii/syst-tex.mkii
@@ -0,0 +1,314 @@
+%D \module
+%D [ file=syst-tex,
+%D version=1999.03.17, % an oldie: 1995.10.10
+%D title=\CONTEXT\ System Macros,
+%D subtitle=Efficient \PLAIN\ \TEX\ loading,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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 file is used by mptopdf.
+
+%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.
+
+\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.
+
+\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}}
+
+%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.
+
+\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}.
+
+\let\normalinput = \input
+\def\input #1 {\skipmessage{\string\input}}
+
+%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 but skipping.
+
+\let\normalskewchar = \skewchar
+\def\skewchar #1=#2 {\skipmessage{\string\skewchar}}
+
+\let\normaltextfont = \textfont
+\let\normalscriptfont = \scriptfont
+\let\normalscriptscriptfont = \scriptscriptfont
+
+\def\textfont #1=#2{\skipmessage{\string\textfont}}
+\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.
+
+\let\normalfont = \font
+
+\def\skipscaled scaled #1 {}
+
+\long\def\font#1=#2 #3%
+ {\ifx#3s%
+ \skipmessage{scaled \string\font}%
+ \let\next\skipscaled
+ \else
+ \skipmessage{\string\font}%
+ \let\next\relax
+ \fi
+ \next#3}
+
+% or:
+%
+% \long\def\font#1=#2 #3%
+% {\ifx#3s%
+% \skipmessage{scaled \string\font}%
+% \expandafter\skipscaled
+% \else
+% \skipmessage{\string\font}%
+% \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
+%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}
+
+%D We need to define \type{\tenrm} for switching to
+%D \type{\rm}.
+
+\def\tenrm%
+ {\skipmessage{\string\tenrm}}
+
+%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 \starttyping
+%D \let\normalbordermatrix=\bordermatrix
+%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 \stoptyping
+
+%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.
+
+\ifx\pdftexversion\undefined
+ \chardef\pdfoutput=0
+\else
+ \pdfoutput=0
+\fi
+
+%D When applicable, we also load the \ETEX\ source and
+%D definition files.
+
+\bgroup \obeylines
+
+\ifx\eTeXversion\undefined
+
+ \long\gdef\beginETEX#1\endETEX%
+ {}
+
+ \gdef\beginTEX%
+ {\bgroup\obeylines\dobeginTEX}
+
+ \gdef\dobeginTEX#1
+ {\egroup}
+
+ \global\let\endTEX\relax
+
+\else
+
+ \long\gdef\beginTEX#1\endTEX%
+ {}
+
+ \gdef\beginETEX%
+ {\bgroup\obeylines\dobeginETEX}
+
+% \gdef\dobeginETEX#1
+% {\egroup\immediate\write16%
+% {system (E-TEX) : [line \the\inputlineno] \detokenize{#1}}}
+
+ \gdef\dobeginETEX#1
+ {\egroup}
+
+ \global\let\endETEX\relax
+
+\fi
+
+\egroup
+
+% \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
+%
+% \def\input#1%
+% {\bgroup
+% \skipmessage{\string\input}%
+% \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
+%
+% \let\fmtversion\normalfmtversion
+%
+% \savinghyphcodes=1
+%
+% \endETEX
+%
+% \ifx\normalprotected \undefined \let\normalprotected \protected \fi
+% \ifx\normalunexpanded\undefined \let\normalunexpanded\unexpanded \fi
+% \ifx\normalexpanded \undefined \let\normalexpanded \expanded \fi
+
+\beginETEX \savinghyphcodes
+
+ \savinghyphcodes=1
+
+\endETEX
+
+%D We restore some redefined primitives to their old meaning.
+
+\let\font = \normalfont
+\let\skewchar = \normalskewchar
+\let\textfont = \normaltextfont
+\let\scriptfont = \normalscriptfont
+\let\scriptscriptfont = \normalscriptscriptfont
+\let\input = \normalinput
+\let\outer = \normalouter
+
+%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.
+
+\let\skipmessage = \undefined
+\let\skipscaled = \undefined
+\let\normalfont = \undefined
+\let\normalskewchar = \undefined
+\let\normaltextfont = \undefined
+\let\normalscriptfont = \undefined
+\let\normalscriptscriptfont = \undefined
+
+% \let\normalinput = \undefined
+% \let\normalouter = \undefined
+
+%D We want a bit more statistics and some less logging info
+%D in the \type{log} file.
+
+\def\wlog#1{}
+
+% \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.
+
+\catcode`@=11
+
+%D Somehow this one does not work ok in math mode:
+
+\def\ph@nt%
+ {\bgroup
+ \ifmmode
+ \expandafter\mathpalette\expandafter\mathph@nt
+ \else
+ \expandafter\makeph@nt
+ \fi}
+
+\def\finph@nt%
+ {\setbox\tw@\null
+ \ifv@ \ht\tw@\ht\z@ \dp\tw@\dp\z@ \fi
+ \ifh@ \wd\tw@\wd\z@ \fi
+ \box\tw@
+ \egroup}
+
+%D But this one does work.
+
+\def\ph@nt%
+ {\ifmmode
+ \expandafter\mathpalette\expandafter\mathph@nt
+ \else
+ \bgroup\expandafter\makeph@nt
+ \fi}
+
+\def\finph@nt%
+ {\setbox\tw@\null
+ \ifv@ \ht\tw@\ht\z@ \dp\tw@\dp\z@ \fi
+ \ifh@ \wd\tw@\wd\z@ \fi
+ \box\tw@
+ \ifmmode\else\egroup\fi}
+
+\catcode`@=12
+
+%D Just for tracing purposes wet set:
+
+\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.
+
+\newtoks \everydump
+
+\let\normaldump \dump
+
+\def\dump{\the\everydump\normaldump}
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/tabl-com.mkii b/Master/texmf-dist/tex/context/base/mkii/tabl-com.mkii
index 8a0bb9e0c48..8a0bb9e0c48 100644
--- a/Master/texmf-dist/tex/context/base/tabl-com.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/tabl-com.mkii
diff --git a/Master/texmf-dist/tex/context/base/tabl-ltb.mkii b/Master/texmf-dist/tex/context/base/mkii/tabl-ltb.mkii
index bac2b589376..bac2b589376 100644
--- a/Master/texmf-dist/tex/context/base/tabl-ltb.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/tabl-ltb.mkii
diff --git a/Master/texmf-dist/tex/context/base/tabl-ntb.mkii b/Master/texmf-dist/tex/context/base/mkii/tabl-ntb.mkii
index fbf43eb1edc..fbf43eb1edc 100644
--- a/Master/texmf-dist/tex/context/base/tabl-ntb.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/tabl-ntb.mkii
diff --git a/Master/texmf-dist/tex/context/base/tabl-nte.mkii b/Master/texmf-dist/tex/context/base/mkii/tabl-nte.mkii
index 6a5391f243b..6a5391f243b 100644
--- a/Master/texmf-dist/tex/context/base/tabl-nte.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/tabl-nte.mkii
diff --git a/Master/texmf-dist/tex/context/base/tabl-pln.mkii b/Master/texmf-dist/tex/context/base/mkii/tabl-pln.mkii
index 39bb50f2329..39bb50f2329 100644
--- a/Master/texmf-dist/tex/context/base/tabl-pln.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/tabl-pln.mkii
diff --git a/Master/texmf-dist/tex/context/base/tabl-tab.mkii b/Master/texmf-dist/tex/context/base/mkii/tabl-tab.mkii
index 7909e509284..7909e509284 100644
--- a/Master/texmf-dist/tex/context/base/tabl-tab.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/tabl-tab.mkii
diff --git a/Master/texmf-dist/tex/context/base/tabl-tbl.mkii b/Master/texmf-dist/tex/context/base/mkii/tabl-tbl.mkii
index 9f2d7df475c..9f2d7df475c 100644
--- a/Master/texmf-dist/tex/context/base/tabl-tbl.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/tabl-tbl.mkii
diff --git a/Master/texmf-dist/tex/context/base/tabl-tsp.mkii b/Master/texmf-dist/tex/context/base/mkii/tabl-tsp.mkii
index 59e9185e81d..59e9185e81d 100644
--- a/Master/texmf-dist/tex/context/base/tabl-tsp.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/tabl-tsp.mkii
diff --git a/Master/texmf-dist/tex/context/base/thrd-pic.mkii b/Master/texmf-dist/tex/context/base/mkii/thrd-pic.mkii
index 3c25d8a81d1..3c25d8a81d1 100644
--- a/Master/texmf-dist/tex/context/base/thrd-pic.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/thrd-pic.mkii
diff --git a/Master/texmf-dist/tex/context/base/thrd-ran.mkii b/Master/texmf-dist/tex/context/base/mkii/thrd-ran.mkii
index 276a4f6249f..276a4f6249f 100644
--- a/Master/texmf-dist/tex/context/base/thrd-ran.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/thrd-ran.mkii
diff --git a/Master/texmf-dist/tex/context/base/thrd-tab.mkii b/Master/texmf-dist/tex/context/base/mkii/thrd-tab.mkii
index dd3838ce2d4..dd3838ce2d4 100644
--- a/Master/texmf-dist/tex/context/base/thrd-tab.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/thrd-tab.mkii
diff --git a/Master/texmf-dist/tex/context/base/thrd-trg.mkii b/Master/texmf-dist/tex/context/base/mkii/thrd-trg.mkii
index c0106f5a3f1..c0106f5a3f1 100644
--- a/Master/texmf-dist/tex/context/base/thrd-trg.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/thrd-trg.mkii
diff --git a/Master/texmf-dist/tex/context/base/trac-vis.mkii b/Master/texmf-dist/tex/context/base/mkii/trac-vis.mkii
index be7a204ec1d..be7a204ec1d 100644
--- a/Master/texmf-dist/tex/context/base/trac-vis.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/trac-vis.mkii
diff --git a/Master/texmf-dist/tex/context/base/type-def.mkii b/Master/texmf-dist/tex/context/base/mkii/type-def.mkii
index 0ff1e0b7d8f..0ff1e0b7d8f 100644
--- a/Master/texmf-dist/tex/context/base/type-def.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/type-def.mkii
diff --git a/Master/texmf-dist/tex/context/base/type-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/type-ini.mkii
index c6b0a8931d9..c6b0a8931d9 100644
--- a/Master/texmf-dist/tex/context/base/type-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/type-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/type-one.mkii b/Master/texmf-dist/tex/context/base/mkii/type-one.mkii
index e98f6864a64..4f6e437457c 100644
--- a/Master/texmf-dist/tex/context/base/type-one.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/type-one.mkii
@@ -188,66 +188,66 @@
%D {NNN}, i.e.\ four digit numbers).
\starttypescript [serif] [computer-modern] [cyr]
- \definefontsynonym [cmb10] [wcmb10] [encoding=t2a]
- \definefontsynonym [cmbsy10] [wcmbsy10] [encoding=t2a]
- \definefontsynonym [cmbx10] [wcmbx10] [encoding=t2a]
- \definefontsynonym [cmbx12] [wcmbx12] [encoding=t2a]
- \definefontsynonym [cmbx5] [wcmbx5] [encoding=t2a]
- \definefontsynonym [cmbx6] [wcmbx6] [encoding=t2a]
- \definefontsynonym [cmbx7] [wcmbx7] [encoding=t2a]
- \definefontsynonym [cmbx8] [wcmbx8] [encoding=t2a]
- \definefontsynonym [cmbx9] [wcmbx9] [encoding=t2a]
- \definefontsynonym [cmbxsl10] [wcmbxsl10] [encoding=t2a]
- \definefontsynonym [cmbxti10] [wcmbxti10] [encoding=t2a]
- \definefontsynonym [cmcsc10] [wcmcsc10] [encoding=t2a]
- %definefontsynonym [cmdunh10] [wcmdunh10] [encoding=t2a]
- \definefontsynonym [cminch] [wcminch] [encoding=t2a]
- \definefontsynonym [cmr10] [wcmr10] [encoding=t2a]
- \definefontsynonym [cmr12] [wcmr12] [encoding=t2a]
- \definefontsynonym [cmr17] [wcmr17] [encoding=t2a]
- \definefontsynonym [cmr5] [wcmr5] [encoding=t2a]
- \definefontsynonym [cmr6] [wcmr6] [encoding=t2a]
- \definefontsynonym [cmr7] [wcmr7] [encoding=t2a]
- \definefontsynonym [cmr8] [wcmr8] [encoding=t2a]
- \definefontsynonym [cmr9] [wcmr9] [encoding=t2a]
- \definefontsynonym [cmsl10] [wcmsl10] [encoding=t2a]
- \definefontsynonym [cmsl12] [wcmsl12] [encoding=t2a]
- \definefontsynonym [cmsl8] [wcmsl8] [encoding=t2a]
- \definefontsynonym [cmsl9] [wcmsl9] [encoding=t2a]
- \definefontsynonym [cmti10] [wcmti10] [encoding=t2a]
- \definefontsynonym [cmti12] [wcmti12] [encoding=t2a]
- \definefontsynonym [cmti7] [wcmti7] [encoding=t2a]
- \definefontsynonym [cmti8] [wcmti8] [encoding=t2a]
- \definefontsynonym [cmti9] [wcmti9] [encoding=t2a]
- \definefontsynonym [cmu10] [wcmu10] [encoding=t2a]
+ \definefontsynonym [cmb10] [wcmb10] [encoding=t2a]
+ \definefontsynonym [cmbsy10] [wcmbsy10] [encoding=t2a]
+ \definefontsynonym [cmbx10] [wcmbx10] [encoding=t2a]
+ \definefontsynonym [cmbx12] [wcmbx12] [encoding=t2a]
+ \definefontsynonym [cmbx5] [wcmbx5] [encoding=t2a]
+ \definefontsynonym [cmbx6] [wcmbx6] [encoding=t2a]
+ \definefontsynonym [cmbx7] [wcmbx7] [encoding=t2a]
+ \definefontsynonym [cmbx8] [wcmbx8] [encoding=t2a]
+ \definefontsynonym [cmbx9] [wcmbx9] [encoding=t2a]
+ \definefontsynonym [cmbxsl10] [wcmbxsl10] [encoding=t2a]
+ \definefontsynonym [cmbxti10] [wcmbxti10] [encoding=t2a]
+ \definefontsynonym [cmcsc10] [wcmcsc10] [encoding=t2a]
+ %definefontsynonym [cmdunh10] [wcmdunh10] [encoding=t2a]
+ \definefontsynonym [cminch] [wcminch] [encoding=t2a]
+ \definefontsynonym [cmr10] [wcmr10] [encoding=t2a]
+ \definefontsynonym [cmr12] [wcmr12] [encoding=t2a]
+ \definefontsynonym [cmr17] [wcmr17] [encoding=t2a]
+ \definefontsynonym [cmr5] [wcmr5] [encoding=t2a]
+ \definefontsynonym [cmr6] [wcmr6] [encoding=t2a]
+ \definefontsynonym [cmr7] [wcmr7] [encoding=t2a]
+ \definefontsynonym [cmr8] [wcmr8] [encoding=t2a]
+ \definefontsynonym [cmr9] [wcmr9] [encoding=t2a]
+ \definefontsynonym [cmsl10] [wcmsl10] [encoding=t2a]
+ \definefontsynonym [cmsl12] [wcmsl12] [encoding=t2a]
+ \definefontsynonym [cmsl8] [wcmsl8] [encoding=t2a]
+ \definefontsynonym [cmsl9] [wcmsl9] [encoding=t2a]
+ \definefontsynonym [cmti10] [wcmti10] [encoding=t2a]
+ \definefontsynonym [cmti12] [wcmti12] [encoding=t2a]
+ \definefontsynonym [cmti7] [wcmti7] [encoding=t2a]
+ \definefontsynonym [cmti8] [wcmti8] [encoding=t2a]
+ \definefontsynonym [cmti9] [wcmti9] [encoding=t2a]
+ \definefontsynonym [cmu10] [wcmu10] [encoding=t2a]
\stoptypescript
\starttypescript [sans] [computer-modern] [cyr]
- \definefontsynonym [cmss10] [wcmss10] [encoding=t2a]
- \definefontsynonym [cmss12] [wcmss12] [encoding=t2a]
- \definefontsynonym [cmss17] [wcmss17] [encoding=t2a]
- \definefontsynonym [cmss8] [wcmss8] [encoding=t2a]
- \definefontsynonym [cmss9] [wcmss9] [encoding=t2a]
- %definefontsynonym [cmssbi10] [wcmssbi10] [encoding=t2a]
- \definefontsynonym [cmssbx10] [wcmssbx10] [encoding=t2a]
- \definefontsynonym [cmssdc10] [wcmssdc10] [encoding=t2a]
- \definefontsynonym [cmssi10] [wcmssi10] [encoding=t2a]
- \definefontsynonym [cmssi12] [wcmssi12] [encoding=t2a]
- \definefontsynonym [cmssi17] [wcmssi17] [encoding=t2a]
- \definefontsynonym [cmssi8] [wcmssi8] [encoding=t2a]
- \definefontsynonym [cmssi9] [wcmssi9] [encoding=t2a]
- \definefontsynonym [cmssq8] [wcmssq8] [encoding=t2a]
- \definefontsynonym [cmssqi8] [wcmssqi8] [encoding=t2a]
+ \definefontsynonym [cmss10] [wcmss10] [encoding=t2a]
+ \definefontsynonym [cmss12] [wcmss12] [encoding=t2a]
+ \definefontsynonym [cmss17] [wcmss17] [encoding=t2a]
+ \definefontsynonym [cmss8] [wcmss8] [encoding=t2a]
+ \definefontsynonym [cmss9] [wcmss9] [encoding=t2a]
+ %definefontsynonym [cmssbi10] [wcmssbi10] [encoding=t2a]
+ \definefontsynonym [cmssbx10] [wcmssbx10] [encoding=t2a]
+ \definefontsynonym [cmssdc10] [wcmssdc10] [encoding=t2a]
+ \definefontsynonym [cmssi10] [wcmssi10] [encoding=t2a]
+ \definefontsynonym [cmssi12] [wcmssi12] [encoding=t2a]
+ \definefontsynonym [cmssi17] [wcmssi17] [encoding=t2a]
+ \definefontsynonym [cmssi8] [wcmssi8] [encoding=t2a]
+ \definefontsynonym [cmssi9] [wcmssi9] [encoding=t2a]
+ \definefontsynonym [cmssq8] [wcmssq8] [encoding=t2a]
+ \definefontsynonym [cmssqi8] [wcmssqi8] [encoding=t2a]
\stoptypescript
\starttypescript [mono] [computer-modern] [cyr]
- \definefontsynonym [cmitt10] [wcmitt10] [encoding=t2a]
- \definefontsynonym [cmsltt10] [wcmsltt10] [encoding=t2a]
- \definefontsynonym [cmtt10] [wcmtt10] [encoding=t2a]
- \definefontsynonym [cmtt12] [wcmtt12] [encoding=t2a]
- \definefontsynonym [cmtt8] [wcmtt8] [encoding=t2a]
- \definefontsynonym [cmtt9] [wcmtt9] [encoding=t2a]
- %definefontsynonym [cmvtt10] [wcmvtt10] [encoding=t2a]
+ \definefontsynonym [cmitt10] [wcmitt10] [encoding=t2a]
+ \definefontsynonym [cmsltt10] [wcmsltt10] [encoding=t2a]
+ \definefontsynonym [cmtt10] [wcmtt10] [encoding=t2a]
+ \definefontsynonym [cmtt12] [wcmtt12] [encoding=t2a]
+ \definefontsynonym [cmtt8] [wcmtt8] [encoding=t2a]
+ \definefontsynonym [cmtt9] [wcmtt9] [encoding=t2a]
+ %definefontsynonym [cmvtt10] [wcmvtt10] [encoding=t2a]
\stoptypescript
\definetypescriptprefix [c:t2a] [la]
@@ -262,155 +262,155 @@
\stoptypescript
\starttypescript [serif] [computer-modern] [t2a,t2b,t2c,x2]
- \definefontsynonym [cmb10] [\typescriptprefix{c:\typescriptthree}rb1000] [encoding=\typescriptthree]
- \definefontsynonym [cmbx10] [\typescriptprefix{c:\typescriptthree}bx1000] [encoding=\typescriptthree]
- \definefontsynonym [cmbx12] [\typescriptprefix{c:\typescriptthree}bx1200] [encoding=\typescriptthree]
- \definefontsynonym [cmbx5] [\typescriptprefix{c:\typescriptthree}bx0500] [encoding=\typescriptthree]
- \definefontsynonym [cmbx6] [\typescriptprefix{c:\typescriptthree}bx0600] [encoding=\typescriptthree]
- \definefontsynonym [cmbx7] [\typescriptprefix{c:\typescriptthree}bx0700] [encoding=\typescriptthree]
- \definefontsynonym [cmbx8] [\typescriptprefix{c:\typescriptthree}bx0800] [encoding=\typescriptthree]
- \definefontsynonym [cmbx9] [\typescriptprefix{c:\typescriptthree}bx0900] [encoding=\typescriptthree]
- \definefontsynonym [cmbxsl10] [\typescriptprefix{c:\typescriptthree}bl1000] [encoding=\typescriptthree]
- \definefontsynonym [cmbxti10] [\typescriptprefix{c:\typescriptthree}bi1000] [encoding=\typescriptthree]
- \definefontsynonym [cmcsc10] [\typescriptprefix{c:\typescriptthree}cc1000] [encoding=\typescriptthree]
- \definefontsynonym [cmdunh10] [\typescriptprefix{c:\typescriptthree}dh1000] [encoding=\typescriptthree]
- \definefontsynonym [cmff10] [\typescriptprefix{c:\typescriptthree}ff1000] [encoding=\typescriptthree]
- \definefontsynonym [cmfi10] [\typescriptprefix{c:\typescriptthree}fi1000] [encoding=\typescriptthree]
- \definefontsynonym [cmfib8] [\typescriptprefix{c:\typescriptthree}fb0800] [encoding=\typescriptthree]
- %\definefontsynonym [cminch] [\typescriptprefix{c:\typescriptthree}inch00] [encoding=\typescriptthree]
- \definefontsynonym [cmr10] [\typescriptprefix{c:\typescriptthree}rm1000] [encoding=\typescriptthree]
- \definefontsynonym [cmr12] [\typescriptprefix{c:\typescriptthree}rm1200] [encoding=\typescriptthree]
- \definefontsynonym [cmr17] [\typescriptprefix{c:\typescriptthree}rm1700] [encoding=\typescriptthree]
- \definefontsynonym [cmr5] [\typescriptprefix{c:\typescriptthree}rm0500] [encoding=\typescriptthree]
- \definefontsynonym [cmr6] [\typescriptprefix{c:\typescriptthree}rm0600] [encoding=\typescriptthree]
- \definefontsynonym [cmr7] [\typescriptprefix{c:\typescriptthree}rm0700] [encoding=\typescriptthree]
- \definefontsynonym [cmr8] [\typescriptprefix{c:\typescriptthree}rm0800] [encoding=\typescriptthree]
- \definefontsynonym [cmr9] [\typescriptprefix{c:\typescriptthree}rm0900] [encoding=\typescriptthree]
- \definefontsynonym [cmsl10] [\typescriptprefix{c:\typescriptthree}sl1000] [encoding=\typescriptthree]
- \definefontsynonym [cmsl12] [\typescriptprefix{c:\typescriptthree}sl1200] [encoding=\typescriptthree]
- \definefontsynonym [cmsl8] [\typescriptprefix{c:\typescriptthree}sl0800] [encoding=\typescriptthree]
- \definefontsynonym [cmsl9] [\typescriptprefix{c:\typescriptthree}sl0900] [encoding=\typescriptthree]
- \definefontsynonym [cmtcsc10] [\typescriptprefix{c:\typescriptthree}tc1000] [encoding=\typescriptthree]
- \definefontsynonym [cmti10] [\typescriptprefix{c:\typescriptthree}ti1000] [encoding=\typescriptthree]
- \definefontsynonym [cmti12] [\typescriptprefix{c:\typescriptthree}ti1200] [encoding=\typescriptthree]
- \definefontsynonym [cmti7] [\typescriptprefix{c:\typescriptthree}ti0700] [encoding=\typescriptthree]
- \definefontsynonym [cmti8] [\typescriptprefix{c:\typescriptthree}ti0800] [encoding=\typescriptthree]
- \definefontsynonym [cmti9] [\typescriptprefix{c:\typescriptthree}ti0900] [encoding=\typescriptthree]
- \definefontsynonym [cmu10] [\typescriptprefix{c:\typescriptthree}ui1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmb10] [\typescriptprefix{c:\typescriptthree}rb1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmbx10] [\typescriptprefix{c:\typescriptthree}bx1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmbx12] [\typescriptprefix{c:\typescriptthree}bx1200] [encoding=\typescriptthree]
+ \definefontsynonym [cmbx5] [\typescriptprefix{c:\typescriptthree}bx0500] [encoding=\typescriptthree]
+ \definefontsynonym [cmbx6] [\typescriptprefix{c:\typescriptthree}bx0600] [encoding=\typescriptthree]
+ \definefontsynonym [cmbx7] [\typescriptprefix{c:\typescriptthree}bx0700] [encoding=\typescriptthree]
+ \definefontsynonym [cmbx8] [\typescriptprefix{c:\typescriptthree}bx0800] [encoding=\typescriptthree]
+ \definefontsynonym [cmbx9] [\typescriptprefix{c:\typescriptthree}bx0900] [encoding=\typescriptthree]
+ \definefontsynonym [cmbxsl10] [\typescriptprefix{c:\typescriptthree}bl1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmbxti10] [\typescriptprefix{c:\typescriptthree}bi1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmcsc10] [\typescriptprefix{c:\typescriptthree}cc1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmdunh10] [\typescriptprefix{c:\typescriptthree}dh1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmff10] [\typescriptprefix{c:\typescriptthree}ff1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmfi10] [\typescriptprefix{c:\typescriptthree}fi1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmfib8] [\typescriptprefix{c:\typescriptthree}fb0800] [encoding=\typescriptthree]
+ %\definefontsynonym [cminch] [\typescriptprefix{c:\typescriptthree}inch00] [encoding=\typescriptthree]
+ \definefontsynonym [cmr10] [\typescriptprefix{c:\typescriptthree}rm1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmr12] [\typescriptprefix{c:\typescriptthree}rm1200] [encoding=\typescriptthree]
+ \definefontsynonym [cmr17] [\typescriptprefix{c:\typescriptthree}rm1700] [encoding=\typescriptthree]
+ \definefontsynonym [cmr5] [\typescriptprefix{c:\typescriptthree}rm0500] [encoding=\typescriptthree]
+ \definefontsynonym [cmr6] [\typescriptprefix{c:\typescriptthree}rm0600] [encoding=\typescriptthree]
+ \definefontsynonym [cmr7] [\typescriptprefix{c:\typescriptthree}rm0700] [encoding=\typescriptthree]
+ \definefontsynonym [cmr8] [\typescriptprefix{c:\typescriptthree}rm0800] [encoding=\typescriptthree]
+ \definefontsynonym [cmr9] [\typescriptprefix{c:\typescriptthree}rm0900] [encoding=\typescriptthree]
+ \definefontsynonym [cmsl10] [\typescriptprefix{c:\typescriptthree}sl1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmsl12] [\typescriptprefix{c:\typescriptthree}sl1200] [encoding=\typescriptthree]
+ \definefontsynonym [cmsl8] [\typescriptprefix{c:\typescriptthree}sl0800] [encoding=\typescriptthree]
+ \definefontsynonym [cmsl9] [\typescriptprefix{c:\typescriptthree}sl0900] [encoding=\typescriptthree]
+ \definefontsynonym [cmtcsc10] [\typescriptprefix{c:\typescriptthree}tc1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmti10] [\typescriptprefix{c:\typescriptthree}ti1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmti12] [\typescriptprefix{c:\typescriptthree}ti1200] [encoding=\typescriptthree]
+ \definefontsynonym [cmti7] [\typescriptprefix{c:\typescriptthree}ti0700] [encoding=\typescriptthree]
+ \definefontsynonym [cmti8] [\typescriptprefix{c:\typescriptthree}ti0800] [encoding=\typescriptthree]
+ \definefontsynonym [cmti9] [\typescriptprefix{c:\typescriptthree}ti0900] [encoding=\typescriptthree]
+ \definefontsynonym [cmu10] [\typescriptprefix{c:\typescriptthree}ui1000] [encoding=\typescriptthree]
\stoptypescript
\starttypescript [sans] [computer-modern] [t2a,t2b,t2c,x2]
- \definefontsynonym [cmss10] [\typescriptprefix{c:\typescriptthree}ss1000] [encoding=\typescriptthree]
- \definefontsynonym [cmss12] [\typescriptprefix{c:\typescriptthree}ss1200] [encoding=\typescriptthree]
- \definefontsynonym [cmss17] [\typescriptprefix{c:\typescriptthree}ss1700] [encoding=\typescriptthree]
- \definefontsynonym [cmss8] [\typescriptprefix{c:\typescriptthree}ss0800] [encoding=\typescriptthree]
- \definefontsynonym [cmss9] [\typescriptprefix{c:\typescriptthree}ss0900] [encoding=\typescriptthree]
- \definefontsynonym [cmssbx10] [\typescriptprefix{c:\typescriptthree}sx1000] [encoding=\typescriptthree]
- %\definefontsynonym [cmssdc10] [\typescriptprefix{c:\typescriptthree}ssdc1000] [encoding=\typescriptthree]
- \definefontsynonym [cmssi10] [\typescriptprefix{c:\typescriptthree}si1000] [encoding=\typescriptthree]
- \definefontsynonym [cmssi12] [\typescriptprefix{c:\typescriptthree}si1200] [encoding=\typescriptthree]
- \definefontsynonym [cmssi17] [\typescriptprefix{c:\typescriptthree}si1700] [encoding=\typescriptthree]
- \definefontsynonym [cmssi8] [\typescriptprefix{c:\typescriptthree}si0800] [encoding=\typescriptthree]
- \definefontsynonym [cmssi9] [\typescriptprefix{c:\typescriptthree}si0900] [encoding=\typescriptthree]
- \definefontsynonym [cmssq8] [\typescriptprefix{c:\typescriptthree}ss0800] [encoding=\typescriptthree]
- \definefontsynonym [cmssqi8] [\typescriptprefix{c:\typescriptthree}si0800] [encoding=\typescriptthree]
+ \definefontsynonym [cmss10] [\typescriptprefix{c:\typescriptthree}ss1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmss12] [\typescriptprefix{c:\typescriptthree}ss1200] [encoding=\typescriptthree]
+ \definefontsynonym [cmss17] [\typescriptprefix{c:\typescriptthree}ss1700] [encoding=\typescriptthree]
+ \definefontsynonym [cmss8] [\typescriptprefix{c:\typescriptthree}ss0800] [encoding=\typescriptthree]
+ \definefontsynonym [cmss9] [\typescriptprefix{c:\typescriptthree}ss0900] [encoding=\typescriptthree]
+ \definefontsynonym [cmssbx10] [\typescriptprefix{c:\typescriptthree}sx1000] [encoding=\typescriptthree]
+ %\definefontsynonym [cmssdc10] [\typescriptprefix{c:\typescriptthree}ssdc1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmssi10] [\typescriptprefix{c:\typescriptthree}si1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmssi12] [\typescriptprefix{c:\typescriptthree}si1200] [encoding=\typescriptthree]
+ \definefontsynonym [cmssi17] [\typescriptprefix{c:\typescriptthree}si1700] [encoding=\typescriptthree]
+ \definefontsynonym [cmssi8] [\typescriptprefix{c:\typescriptthree}si0800] [encoding=\typescriptthree]
+ \definefontsynonym [cmssi9] [\typescriptprefix{c:\typescriptthree}si0900] [encoding=\typescriptthree]
+ \definefontsynonym [cmssq8] [\typescriptprefix{c:\typescriptthree}ss0800] [encoding=\typescriptthree]
+ \definefontsynonym [cmssqi8] [\typescriptprefix{c:\typescriptthree}si0800] [encoding=\typescriptthree]
\stoptypescript
\starttypescript [mono] [computer-modern] [t2a,t2b,t2c,x2]
- \definefontsynonym [cmitt10] [\typescriptprefix{c:\typescriptthree}it1000] [encoding=\typescriptthree]
- \definefontsynonym [cmsltt10] [\typescriptprefix{c:\typescriptthree}st1000] [encoding=\typescriptthree]
- \definefontsynonym [cmtt10] [\typescriptprefix{c:\typescriptthree}tt1000] [encoding=\typescriptthree]
- \definefontsynonym [cmtt12] [\typescriptprefix{c:\typescriptthree}tt1200] [encoding=\typescriptthree]
- \definefontsynonym [cmtt8] [\typescriptprefix{c:\typescriptthree}tt0800] [encoding=\typescriptthree]
- \definefontsynonym [cmtt9] [\typescriptprefix{c:\typescriptthree}tt0900] [encoding=\typescriptthree]
- \definefontsynonym [cmvtt10] [\typescriptprefix{c:\typescriptthree}vt1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmitt10] [\typescriptprefix{c:\typescriptthree}it1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmsltt10] [\typescriptprefix{c:\typescriptthree}st1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmtt10] [\typescriptprefix{c:\typescriptthree}tt1000] [encoding=\typescriptthree]
+ \definefontsynonym [cmtt12] [\typescriptprefix{c:\typescriptthree}tt1200] [encoding=\typescriptthree]
+ \definefontsynonym [cmtt8] [\typescriptprefix{c:\typescriptthree}tt0800] [encoding=\typescriptthree]
+ \definefontsynonym [cmtt9] [\typescriptprefix{c:\typescriptthree}tt0900] [encoding=\typescriptthree]
+ \definefontsynonym [cmvtt10] [\typescriptprefix{c:\typescriptthree}vt1000] [encoding=\typescriptthree]
\stoptypescript
\starttypescript [serif] [computer-modern] [lcy]
- \definefontsynonym [cmb10] [lhb10] [encoding=lcy]
- \definefontsynonym [cmbx10] [lhbx10] [encoding=lcy]
- \definefontsynonym [cmbx12] [lhbx12] [encoding=lcy]
- \definefontsynonym [cmbx5] [lhbx5] [encoding=lcy]
- \definefontsynonym [cmbx6] [lhbx6] [encoding=lcy]
- \definefontsynonym [cmbx7] [lhbx7] [encoding=lcy]
- \definefontsynonym [cmbx8] [lhbx8] [encoding=lcy]
- \definefontsynonym [cmbx9] [lhbx9] [encoding=lcy]
- \definefontsynonym [cmbxsl10] [lhbxsl10] [encoding=lcy]
- \definefontsynonym [cmbxti10] [lhbxti10] [encoding=lcy]
- \definefontsynonym [cmcsc10] [lhcsc10] [encoding=lcy]
- \definefontsynonym [cmdunh10] [lhdunh10] [encoding=lcy]
- \definefontsynonym [cmff10] [lhff10] [encoding=lcy]
- \definefontsynonym [cmfi10] [lhfi10] [encoding=lcy]
- \definefontsynonym [cmfib8] [lhfib8] [encoding=lcy]
- \definefontsynonym [cminch] [lhinch] [encoding=lcy]
- \definefontsynonym [cmr10] [lhr10] [encoding=lcy]
- \definefontsynonym [cmr12] [lhr12] [encoding=lcy]
- \definefontsynonym [cmr17] [lhr17] [encoding=lcy]
- \definefontsynonym [cmr5] [lhr5] [encoding=lcy]
- \definefontsynonym [cmr6] [lhr6] [encoding=lcy]
- \definefontsynonym [cmr7] [lhr7] [encoding=lcy]
- \definefontsynonym [cmr8] [lhr8] [encoding=lcy]
- \definefontsynonym [cmr9] [lhr9] [encoding=lcy]
- \definefontsynonym [cmsl10] [lhsl10] [encoding=lcy]
- \definefontsynonym [cmsl12] [lhsl12] [encoding=lcy]
- \definefontsynonym [cmsl8] [lhsl8] [encoding=lcy]
- \definefontsynonym [cmsl9] [lhsl9] [encoding=lcy]
- \definefontsynonym [cmtcsc10] [lhtcsc10] [encoding=lcy]
- \definefontsynonym [cmtex10] [lhtex10] [encoding=lcy]
- \definefontsynonym [cmtex8] [lhtex8] [encoding=lcy]
- \definefontsynonym [cmtex9] [lhtex9] [encoding=lcy]
- \definefontsynonym [cmti10] [lhti10] [encoding=lcy]
- \definefontsynonym [cmti12] [lhti12] [encoding=lcy]
- \definefontsynonym [cmti7] [lhti7] [encoding=lcy]
- \definefontsynonym [cmti8] [lhti8] [encoding=lcy]
- \definefontsynonym [cmti9] [lhti9] [encoding=lcy]
- \definefontsynonym [cmu10] [lhu10] [encoding=lcy]
+ \definefontsynonym [cmb10] [lhb10] [encoding=lcy]
+ \definefontsynonym [cmbx10] [lhbx10] [encoding=lcy]
+ \definefontsynonym [cmbx12] [lhbx12] [encoding=lcy]
+ \definefontsynonym [cmbx5] [lhbx5] [encoding=lcy]
+ \definefontsynonym [cmbx6] [lhbx6] [encoding=lcy]
+ \definefontsynonym [cmbx7] [lhbx7] [encoding=lcy]
+ \definefontsynonym [cmbx8] [lhbx8] [encoding=lcy]
+ \definefontsynonym [cmbx9] [lhbx9] [encoding=lcy]
+ \definefontsynonym [cmbxsl10] [lhbxsl10] [encoding=lcy]
+ \definefontsynonym [cmbxti10] [lhbxti10] [encoding=lcy]
+ \definefontsynonym [cmcsc10] [lhcsc10] [encoding=lcy]
+ \definefontsynonym [cmdunh10] [lhdunh10] [encoding=lcy]
+ \definefontsynonym [cmff10] [lhff10] [encoding=lcy]
+ \definefontsynonym [cmfi10] [lhfi10] [encoding=lcy]
+ \definefontsynonym [cmfib8] [lhfib8] [encoding=lcy]
+ \definefontsynonym [cminch] [lhinch] [encoding=lcy]
+ \definefontsynonym [cmr10] [lhr10] [encoding=lcy]
+ \definefontsynonym [cmr12] [lhr12] [encoding=lcy]
+ \definefontsynonym [cmr17] [lhr17] [encoding=lcy]
+ \definefontsynonym [cmr5] [lhr5] [encoding=lcy]
+ \definefontsynonym [cmr6] [lhr6] [encoding=lcy]
+ \definefontsynonym [cmr7] [lhr7] [encoding=lcy]
+ \definefontsynonym [cmr8] [lhr8] [encoding=lcy]
+ \definefontsynonym [cmr9] [lhr9] [encoding=lcy]
+ \definefontsynonym [cmsl10] [lhsl10] [encoding=lcy]
+ \definefontsynonym [cmsl12] [lhsl12] [encoding=lcy]
+ \definefontsynonym [cmsl8] [lhsl8] [encoding=lcy]
+ \definefontsynonym [cmsl9] [lhsl9] [encoding=lcy]
+ \definefontsynonym [cmtcsc10] [lhtcsc10] [encoding=lcy]
+ \definefontsynonym [cmtex10] [lhtex10] [encoding=lcy]
+ \definefontsynonym [cmtex8] [lhtex8] [encoding=lcy]
+ \definefontsynonym [cmtex9] [lhtex9] [encoding=lcy]
+ \definefontsynonym [cmti10] [lhti10] [encoding=lcy]
+ \definefontsynonym [cmti12] [lhti12] [encoding=lcy]
+ \definefontsynonym [cmti7] [lhti7] [encoding=lcy]
+ \definefontsynonym [cmti8] [lhti8] [encoding=lcy]
+ \definefontsynonym [cmti9] [lhti9] [encoding=lcy]
+ \definefontsynonym [cmu10] [lhu10] [encoding=lcy]
\stoptypescript
\starttypescript [sans] [computer-modern] [lcy]
- \definefontsynonym [cmss10] [lhss10] [encoding=lcy]
- \definefontsynonym [cmss12] [lhss12] [encoding=lcy]
- \definefontsynonym [cmss17] [lhss17] [encoding=lcy]
- \definefontsynonym [cmss8] [lhss8] [encoding=lcy]
- \definefontsynonym [cmss9] [lhss9] [encoding=lcy]
- \definefontsynonym [cmssbi10] [lhssbi10] [encoding=lcy]
- \definefontsynonym [cmssbx10] [lhssbx10] [encoding=lcy]
- \definefontsynonym [cmssdc10] [lhssdc10] [encoding=lcy]
- \definefontsynonym [cmssi10] [lhssi10] [encoding=lcy]
- \definefontsynonym [cmssi12] [lhssi12] [encoding=lcy]
- \definefontsynonym [cmssi17] [lhssi17] [encoding=lcy]
- \definefontsynonym [cmssi8] [lhssi8] [encoding=lcy]
- \definefontsynonym [cmssi9] [lhssi9] [encoding=lcy]
- \definefontsynonym [cmssq8] [lhssq8] [encoding=lcy]
- \definefontsynonym [cmssqi8] [lhssqi8] [encoding=lcy]
+ \definefontsynonym [cmss10] [lhss10] [encoding=lcy]
+ \definefontsynonym [cmss12] [lhss12] [encoding=lcy]
+ \definefontsynonym [cmss17] [lhss17] [encoding=lcy]
+ \definefontsynonym [cmss8] [lhss8] [encoding=lcy]
+ \definefontsynonym [cmss9] [lhss9] [encoding=lcy]
+ \definefontsynonym [cmssbi10] [lhssbi10] [encoding=lcy]
+ \definefontsynonym [cmssbx10] [lhssbx10] [encoding=lcy]
+ \definefontsynonym [cmssdc10] [lhssdc10] [encoding=lcy]
+ \definefontsynonym [cmssi10] [lhssi10] [encoding=lcy]
+ \definefontsynonym [cmssi12] [lhssi12] [encoding=lcy]
+ \definefontsynonym [cmssi17] [lhssi17] [encoding=lcy]
+ \definefontsynonym [cmssi8] [lhssi8] [encoding=lcy]
+ \definefontsynonym [cmssi9] [lhssi9] [encoding=lcy]
+ \definefontsynonym [cmssq8] [lhssq8] [encoding=lcy]
+ \definefontsynonym [cmssqi8] [lhssqi8] [encoding=lcy]
\stoptypescript
\starttypescript [mono] [computer-modern] [lcy]
- \definefontsynonym [cmitt10] [lhitt10] [encoding=lcy]
- \definefontsynonym [cmsltt10] [lhsltt10] [encoding=lcy]
- \definefontsynonym [cmtt10] [lhtt10] [encoding=lcy]
- \definefontsynonym [cmtt12] [lhtt12] [encoding=lcy]
- \definefontsynonym [cmtt8] [lhtt8] [encoding=lcy]
- \definefontsynonym [cmtt9] [lhtt9] [encoding=lcy]
- \definefontsynonym [cmvtt10] [lhvtt10] [encoding=lcy]
+ \definefontsynonym [cmitt10] [lhitt10] [encoding=lcy]
+ \definefontsynonym [cmsltt10] [lhsltt10] [encoding=lcy]
+ \definefontsynonym [cmtt10] [lhtt10] [encoding=lcy]
+ \definefontsynonym [cmtt12] [lhtt12] [encoding=lcy]
+ \definefontsynonym [cmtt8] [lhtt8] [encoding=lcy]
+ \definefontsynonym [cmtt9] [lhtt9] [encoding=lcy]
+ \definefontsynonym [cmvtt10] [lhvtt10] [encoding=lcy]
\stoptypescript
%
\starttypescript [math] [modern,computer-modern,latin-modern] % [default]
- % watch the space, it prevents remapping
- \definefontsynonym [ComputerModernMath-Roman] [rm-lmr10]% [lmr10 ]
- \definefontsynonym [ComputerModernMath-Extension] [lmex10]
- \definefontsynonym [ComputerModernMath-Italic] [lmmi10]
- \definefontsynonym [ComputerModernMath-Symbol] [lmsy10]
+ % watch the space, it prevents remapping
+ \definefontsynonym [ComputerModernMath-Roman] [rm-lmr10]% [lmr10 ]
+ \definefontsynonym [ComputerModernMath-Extension] [lmex10]
+ \definefontsynonym [ComputerModernMath-Italic] [lmmi10]
+ \definefontsynonym [ComputerModernMath-Symbol] [lmsy10]
\stoptypescript
\starttypescript [boldmath,bfmath] [modern,computer-modern,latin-modern] % [default]
- % watch the space, it prevents remapping
- \definefontsynonym [ComputerModernMath-Roman-Bold] [rm-lmb10] % [lmb10 ]
- \definefontsynonym [ComputerModernMath-Extension] [lmex10]
- \definefontsynonym [ComputerModernMath-Italic-Bold] [lmmib10]
- \definefontsynonym [ComputerModernMath-Symbol-Bold] [lmbsy10]
+ % watch the space, it prevents remapping
+ \definefontsynonym [ComputerModernMath-Roman-Bold] [rm-lmb10] % [lmb10 ]
+ \definefontsynonym [ComputerModernMath-Extension] [lmex10]
+ \definefontsynonym [ComputerModernMath-Italic-Bold] [lmmib10]
+ \definefontsynonym [ComputerModernMath-Symbol-Bold] [lmbsy10]
\stoptypescript
% Till we have cyrilic in lm:
@@ -419,48 +419,48 @@
% \setupbodyfont[modern,10pt]
\starttypescript [serif] [computer-modern] [t2a,t2b,t2c,x2]
- \definefontsynonym [Serif] [\typescriptprefix{c:\typescriptthree}rm1000] [encoding=\typescriptthree]
- \definefontsynonym [SerifItalic] [\typescriptprefix{c:\typescriptthree}ti1000] [encoding=\typescriptthree]
- \definefontsynonym [SerifSlanted] [\typescriptprefix{c:\typescriptthree}sl1000] [encoding=\typescriptthree]
- \definefontsynonym [SerifBold] [\typescriptprefix{c:\typescriptthree}bx1000] [encoding=\typescriptthree]
- \definefontsynonym [SerifBoldItalic] [\typescriptprefix{c:\typescriptthree}bi1000] [encoding=\typescriptthree]
- \definefontsynonym [SerifBoldSlanted] [\typescriptprefix{c:\typescriptthree}bl1000] [encoding=\typescriptthree]
- \definefontsynonym [SerifCaps] [\typescriptprefix{c:\typescriptthree}cc1000] [encoding=\typescriptthree]
- \definefontsynonym [SerifCapsSlanted] [\typescriptprefix{c:\typescriptthree}sc1000] [encoding=\typescriptthree]
+ \definefontsynonym [Serif] [\typescriptprefix{c:\typescriptthree}rm1000] [encoding=\typescriptthree]
+ \definefontsynonym [SerifItalic] [\typescriptprefix{c:\typescriptthree}ti1000] [encoding=\typescriptthree]
+ \definefontsynonym [SerifSlanted] [\typescriptprefix{c:\typescriptthree}sl1000] [encoding=\typescriptthree]
+ \definefontsynonym [SerifBold] [\typescriptprefix{c:\typescriptthree}bx1000] [encoding=\typescriptthree]
+ \definefontsynonym [SerifBoldItalic] [\typescriptprefix{c:\typescriptthree}bi1000] [encoding=\typescriptthree]
+ \definefontsynonym [SerifBoldSlanted] [\typescriptprefix{c:\typescriptthree}bl1000] [encoding=\typescriptthree]
+ \definefontsynonym [SerifCaps] [\typescriptprefix{c:\typescriptthree}cc1000] [encoding=\typescriptthree]
+ \definefontsynonym [SerifCapsSlanted] [\typescriptprefix{c:\typescriptthree}sc1000] [encoding=\typescriptthree]
\stoptypescript
\starttypescript [sans] [computer-modern] [t2a,t2b,t2c,x2]
- \definefontsynonym [Sans] [\typescriptprefix{c:\typescriptthree}ss1000] [encoding=\typescriptthree]
- \definefontsynonym [SansItalic] [\typescriptprefix{c:\typescriptthree}si1000] [encoding=\typescriptthree]
- \definefontsynonym [SansSlanted] [\typescriptprefix{c:\typescriptthree}si1000] [encoding=\typescriptthree]
- \definefontsynonym [SansBold] [\typescriptprefix{c:\typescriptthree}sx1000] [encoding=\typescriptthree]
- \definefontsynonym [SansBoldItalic] [\typescriptprefix{c:\typescriptthree}so1000] [encoding=\typescriptthree]
- \definefontsynonym [SansBoldSlanted] [\typescriptprefix{c:\typescriptthree}so1000] [encoding=\typescriptthree]
- \definefontsynonym [SansCaps] [\typescriptprefix{c:\typescriptthree}ss1000] [encoding=\typescriptthree]
- \definefontsynonym [SansCapsSlanted] [\typescriptprefix{c:\typescriptthree}si1000] [encoding=\typescriptthree]
+ \definefontsynonym [Sans] [\typescriptprefix{c:\typescriptthree}ss1000] [encoding=\typescriptthree]
+ \definefontsynonym [SansItalic] [\typescriptprefix{c:\typescriptthree}si1000] [encoding=\typescriptthree]
+ \definefontsynonym [SansSlanted] [\typescriptprefix{c:\typescriptthree}si1000] [encoding=\typescriptthree]
+ \definefontsynonym [SansBold] [\typescriptprefix{c:\typescriptthree}sx1000] [encoding=\typescriptthree]
+ \definefontsynonym [SansBoldItalic] [\typescriptprefix{c:\typescriptthree}so1000] [encoding=\typescriptthree]
+ \definefontsynonym [SansBoldSlanted] [\typescriptprefix{c:\typescriptthree}so1000] [encoding=\typescriptthree]
+ \definefontsynonym [SansCaps] [\typescriptprefix{c:\typescriptthree}ss1000] [encoding=\typescriptthree]
+ \definefontsynonym [SansCapsSlanted] [\typescriptprefix{c:\typescriptthree}si1000] [encoding=\typescriptthree]
\stoptypescript
\starttypescript [mono] [computer-modern] [t2a,t2b,t2c,x2]
- \definefontsynonym [Mono] [\typescriptprefix{c:\typescriptthree}tt1000] [encoding=\typescriptthree]
- \definefontsynonym [MonoItalic] [\typescriptprefix{c:\typescriptthree}it1000] [encoding=\typescriptthree]
- \definefontsynonym [MonoSlanted] [\typescriptprefix{c:\typescriptthree}st1000] [encoding=\typescriptthree]
- \definefontsynonym [MonoBold] [\typescriptprefix{c:\typescriptthree}tt1000] [encoding=\typescriptthree]
- \definefontsynonym [MonoBoldItalic] [\typescriptprefix{c:\typescriptthree}it1000] [encoding=\typescriptthree]
- \definefontsynonym [MonoBoldSlanted] [\typescriptprefix{c:\typescriptthree}st1000] [encoding=\typescriptthree]
- \definefontsynonym [MonoCaps] [\typescriptprefix{c:\typescriptthree}tc1000] [encoding=\typescriptthree]
- \definefontsynonym [MonoCapsSlanted] [\typescriptprefix{c:\typescriptthree}tc1000] [encoding=\typescriptthree]
+ \definefontsynonym [Mono] [\typescriptprefix{c:\typescriptthree}tt1000] [encoding=\typescriptthree]
+ \definefontsynonym [MonoItalic] [\typescriptprefix{c:\typescriptthree}it1000] [encoding=\typescriptthree]
+ \definefontsynonym [MonoSlanted] [\typescriptprefix{c:\typescriptthree}st1000] [encoding=\typescriptthree]
+ \definefontsynonym [MonoBold] [\typescriptprefix{c:\typescriptthree}tt1000] [encoding=\typescriptthree]
+ \definefontsynonym [MonoBoldItalic] [\typescriptprefix{c:\typescriptthree}it1000] [encoding=\typescriptthree]
+ \definefontsynonym [MonoBoldSlanted] [\typescriptprefix{c:\typescriptthree}st1000] [encoding=\typescriptthree]
+ \definefontsynonym [MonoCaps] [\typescriptprefix{c:\typescriptthree}tc1000] [encoding=\typescriptthree]
+ \definefontsynonym [MonoCapsSlanted] [\typescriptprefix{c:\typescriptthree}tc1000] [encoding=\typescriptthree]
\stoptypescript
% Computer Concrete (AMS)
\starttypescript [serif] [concrete] [default]
- \definefontsynonym [ComputerConcrete] [ccr10]
- \definefontsynonym [ComputerConcrete-Italic] [ccti10]
- \definefontsynonym [ComputerConcrete-Slanted] [ccsl10]
- \definefontsynonym [ComputerConcrete-Bold] [ComputerConcrete]
- \definefontsynonym [ComputerConcrete-BoldItalic] [ComputerConcrete-Italic]
- \definefontsynonym [ComputerConcrete-BoldSlanted] [ComputerConcrete-Slanted]
- \definefontsynonym [ComputerConcrete-Caps] [cccsc10]
+ \definefontsynonym [ComputerConcrete] [ccr10]
+ \definefontsynonym [ComputerConcrete-Italic] [ccti10]
+ \definefontsynonym [ComputerConcrete-Slanted] [ccsl10]
+ \definefontsynonym [ComputerConcrete-Bold] [ComputerConcrete]
+ \definefontsynonym [ComputerConcrete-BoldItalic] [ComputerConcrete-Italic]
+ \definefontsynonym [ComputerConcrete-BoldSlanted] [ComputerConcrete-Slanted]
+ \definefontsynonym [ComputerConcrete-Caps] [cccsc10]
\stoptypescript
\starttypescript [serif] [modern,computer-modern,latin-modern] [name]
@@ -2553,13 +2553,13 @@
% so we keep using that as default
% \starttypescript [mono] [lucida] [name]
- % \definefontsynonym [Mono] [LucidaTypewriter]
- % \definefontsynonym [MonoBold] [LucidaTypewriterBold]
- % \definefontsynonym [MonoItalic] [LucidaTypewriterOblique]
- % \definefontsynonym [MonoBoldItalic] [LucidaTypewriterBoldOblique]
- % \definefontsynonym [MonoSlanted] [LucidaTypewriterOblique]
- % \definefontsynonym [MonoBoldSlanted] [LucidaTypewriterBoldOblique]
- % \definefontsynonym [MonoCaps] [LucidaTypewriter]
+ % \definefontsynonym [Mono] [LucidaTypewriter]
+ % \definefontsynonym [MonoBold] [LucidaTypewriterBold]
+ % \definefontsynonym [MonoItalic] [LucidaTypewriterOblique]
+ % \definefontsynonym [MonoBoldItalic] [LucidaTypewriterBoldOblique]
+ % \definefontsynonym [MonoSlanted] [LucidaTypewriterOblique]
+ % \definefontsynonym [MonoBoldSlanted] [LucidaTypewriterBoldOblique]
+ % \definefontsynonym [MonoCaps] [LucidaTypewriter]
% \stoptypescript
% Lucida Bright Sans Typewriter
@@ -2790,14 +2790,14 @@
\loadmapfile[dejavu-truetype.map]
\stoptypescript
- \starttypescript [mono] [dejavu,dejavu-condensed] [ec,qx,t2a]
- \definefontsynonym [DejaVuSansMono] [DejaVuSansMono-tlf-\typescriptprefix{e:\typescriptthree}] [encoding=\typescriptthree]
- \definefontsynonym [DejaVuSansMono-Italic] [DejaVuSansMono-Italic-tlf-\typescriptprefix{e:\typescriptthree}] [encoding=\typescriptthree]
- \definefontsynonym [DejaVuSansMono-Bold] [DejaVuSansMono-Bold-tlf-\typescriptprefix{e:\typescriptthree}] [encoding=\typescriptthree]
- \definefontsynonym [DejaVuSansMono-BoldItalic] [DejaVuSansMono-BoldItalic-tlf-\typescriptprefix{e:\typescriptthree}] [encoding=\typescriptthree]
+ \starttypescript [mono] [dejavu,dejavu-condensed] [ec,qx,t2a]
+ \definefontsynonym [DejaVuSansMono] [DejaVuSansMono-tlf-\typescriptprefix{e:\typescriptthree}] [encoding=\typescriptthree]
+ \definefontsynonym [DejaVuSansMono-Italic] [DejaVuSansMono-Italic-tlf-\typescriptprefix{e:\typescriptthree}] [encoding=\typescriptthree]
+ \definefontsynonym [DejaVuSansMono-Bold] [DejaVuSansMono-Bold-tlf-\typescriptprefix{e:\typescriptthree}] [encoding=\typescriptthree]
+ \definefontsynonym [DejaVuSansMono-BoldItalic] [DejaVuSansMono-BoldItalic-tlf-\typescriptprefix{e:\typescriptthree}] [encoding=\typescriptthree]
- \loadmapfile[dejavu-truetype.map]
- \stoptypescript
+ \loadmapfile[dejavu-truetype.map]
+ \stoptypescript
\starttypescript [serif] [dejavu] [name]
\definefontsynonym [Serif] [DejaVuSerif]
@@ -2843,16 +2843,16 @@
\definefontsynonym [SansCaps] [Sans]
\stoptypescript
- \starttypescript [mono] [dejavu,dejavu-condensed] [name]
- \definefontsynonym [Mono] [DejaVuSansMono]
- \definefontsynonym [MonoItalic] [DejaVuSansMono-Italic]
- \definefontsynonym [MonoBold] [DejaVuSansMono-Bold]
- \definefontsynonym [MonoBoldItalic] [DejaVuSansMono-BoldItalic]
+ \starttypescript [mono] [dejavu,dejavu-condensed] [name]
+ \definefontsynonym [Mono] [DejaVuSansMono]
+ \definefontsynonym [MonoItalic] [DejaVuSansMono-Italic]
+ \definefontsynonym [MonoBold] [DejaVuSansMono-Bold]
+ \definefontsynonym [MonoBoldItalic] [DejaVuSansMono-BoldItalic]
- \definefontsynonym [MonoSlanted] [MonoItalic]
- \definefontsynonym [MonoBoldSlanted] [MonoBoldItalic]
- \definefontsynonym [MonoCaps] [Mono]
- \stoptypescript
+ \definefontsynonym [MonoSlanted] [MonoItalic]
+ \definefontsynonym [MonoBoldSlanted] [MonoBoldItalic]
+ \definefontsynonym [MonoCaps] [Mono]
+ \stoptypescript
\starttypescript [dejavu] [ec,qx,t2a]
\definetypeface [dejavu] [rm] [serif] [dejavu] [default] [encoding=\typescripttwo]
@@ -2872,4 +2872,46 @@
\stoptypescriptcollection
+\starttypescriptcollection[gentium]
+
+ \starttypescript [serif] [gentium] [ec,texnansi,qx,t5,l7x]
+ \definefontsynonym [Gentium-Roman] [\typescriptthree-gentiumplus-regular] [encoding=\typescriptthree]
+ \definefontsynonym [Gentium-Italic] [\typescriptthree-gentiumplus-italic] [encoding=\typescriptthree]
+ \definefontsynonym [Gentium-Bold] [\typescriptthree-gentiumbasic-bold] [encoding=\typescriptthree]
+ \definefontsynonym [Gentium-BoldItalic] [\typescriptthree-gentiumbasic-bolditalic] [encoding=\typescriptthree]
+ \definefontsynonym [Gentium-RomanCaps] [\typescriptthree-gentiumplus-regular-sc] [encoding=\typescriptthree]
+ \definefontsynonym [Gentium-Slanted] [Gentium-Italic]
+ \definefontsynonym [Gentium-BoldSlanted] [Gentium-BoldItalic]
+ \loadmapfile[gentium-\typescriptthree.map]
+ \stoptypescript
+
+ \starttypescript [serif] [gentium] [agr,t2a]
+ \definefontsynonym [Gentium-Roman] [\typescriptthree-gentiumplus-regular] [encoding=\typescriptthree]
+ \definefontsynonym [Gentium-Italic] [\typescriptthree-gentiumplus-italic] [encoding=\typescriptthree]
+ \definefontsynonym [Gentium-RomanCaps] [\typescriptthree-gentiumplus-regular-sc] [encoding=\typescriptthree]
+ \definefontsynonym [Gentium-Bold] [Gentium-Roman]
+ \definefontsynonym [Gentium-BoldItalic] [Gentium-Italic]
+ \definefontsynonym [Gentium-Slanted] [Gentium-Italic]
+ \definefontsynonym [Gentium-BoldSlanted] [Gentium-Italic]
+ \loadmapfile[gentium-\typescriptthree.map]
+ \stoptypescript
+
+ \starttypescript [serif] [gentium] [name]
+ \usetypescript[serif][fallback]
+ \definefontsynonym [Serif] [Gentium-Roman]
+ \definefontsynonym [SerifItalic] [Gentium-Italic]
+ \definefontsynonym [SerifBold] [Gentium-Bold]
+ \definefontsynonym [SerifBoldItalic] [Gentium-BoldItalic]
+ \definefontsynonym [SerifSlanted] [Gentium-Slanted]
+ \definefontsynonym [SerifBoldSlanted] [Gentium-BoldSlanted]
+ \definefontsynonym [SerifCaps] [Gentium-RomanCaps]
+ \definefontsynonym [OldStyle] [Serif]
+ \stoptypescript
+
+ \starttypescript [gentium] [ec,texnansi,qx,t5,t2a,agr,l7x]
+ \definetypeface [gentium] [rm] [serif] [gentium] [default] [encoding=\typescripttwo]
+ \stoptypescript
+
+\stoptypescriptcollection
+
\endinput
diff --git a/Master/texmf-dist/tex/context/base/type-otf.mkii b/Master/texmf-dist/tex/context/base/mkii/type-otf.mkii
index d15994f6aed..d15994f6aed 100644
--- a/Master/texmf-dist/tex/context/base/type-otf.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/type-otf.mkii
diff --git a/Master/texmf-dist/tex/context/base/type-run.mkii b/Master/texmf-dist/tex/context/base/mkii/type-run.mkii
index 51a9f2a885d..51a9f2a885d 100644
--- a/Master/texmf-dist/tex/context/base/type-run.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/type-run.mkii
diff --git a/Master/texmf-dist/tex/context/base/type-set.mkii b/Master/texmf-dist/tex/context/base/mkii/type-set.mkii
index 7f34deadaad..7f34deadaad 100644
--- a/Master/texmf-dist/tex/context/base/type-set.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/type-set.mkii
diff --git a/Master/texmf-dist/tex/context/base/type-siz.mkii b/Master/texmf-dist/tex/context/base/mkii/type-siz.mkii
index 4c3cfb28b0e..4c3cfb28b0e 100644
--- a/Master/texmf-dist/tex/context/base/type-siz.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/type-siz.mkii
diff --git a/Master/texmf-dist/tex/context/base/type-tmf.mkii b/Master/texmf-dist/tex/context/base/mkii/type-tmf.mkii
index 829b6baec99..829b6baec99 100644
--- a/Master/texmf-dist/tex/context/base/type-tmf.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/type-tmf.mkii
diff --git a/Master/texmf-dist/tex/context/base/typo-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/typo-ini.mkii
index 6e19fb9b670..6e19fb9b670 100644
--- a/Master/texmf-dist/tex/context/base/typo-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/typo-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/unic-000.mkii b/Master/texmf-dist/tex/context/base/mkii/unic-000.mkii
index 4ef57044520..4ef57044520 100644
--- a/Master/texmf-dist/tex/context/base/unic-000.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/unic-000.mkii
diff --git a/Master/texmf-dist/tex/context/base/unic-001.mkii b/Master/texmf-dist/tex/context/base/mkii/unic-001.mkii
index 198a8d98d1b..198a8d98d1b 100644
--- a/Master/texmf-dist/tex/context/base/unic-001.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/unic-001.mkii
diff --git a/Master/texmf-dist/tex/context/base/unic-002.mkii b/Master/texmf-dist/tex/context/base/mkii/unic-002.mkii
index 906975f8691..906975f8691 100644
--- a/Master/texmf-dist/tex/context/base/unic-002.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/unic-002.mkii
diff --git a/Master/texmf-dist/tex/context/base/unic-003.mkii b/Master/texmf-dist/tex/context/base/mkii/unic-003.mkii
index ad7d6df6a8f..ad7d6df6a8f 100644
--- a/Master/texmf-dist/tex/context/base/unic-003.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/unic-003.mkii
diff --git a/Master/texmf-dist/tex/context/base/unic-004.mkii b/Master/texmf-dist/tex/context/base/mkii/unic-004.mkii
index 7b413cdb91f..7b413cdb91f 100644
--- a/Master/texmf-dist/tex/context/base/unic-004.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/unic-004.mkii
diff --git a/Master/texmf-dist/tex/context/base/unic-005.mkii b/Master/texmf-dist/tex/context/base/mkii/unic-005.mkii
index e21edb20584..e21edb20584 100644
--- a/Master/texmf-dist/tex/context/base/unic-005.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/unic-005.mkii
diff --git a/Master/texmf-dist/tex/context/base/unic-030.mkii b/Master/texmf-dist/tex/context/base/mkii/unic-030.mkii
index 0065a738a3b..0065a738a3b 100644
--- a/Master/texmf-dist/tex/context/base/unic-030.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/unic-030.mkii
diff --git a/Master/texmf-dist/tex/context/base/unic-031.mkii b/Master/texmf-dist/tex/context/base/mkii/unic-031.mkii
index 68d1633249b..68d1633249b 100644
--- a/Master/texmf-dist/tex/context/base/unic-031.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/unic-031.mkii
diff --git a/Master/texmf-dist/tex/context/base/unic-032.mkii b/Master/texmf-dist/tex/context/base/mkii/unic-032.mkii
index 6bd176c8071..6bd176c8071 100644
--- a/Master/texmf-dist/tex/context/base/unic-032.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/unic-032.mkii
diff --git a/Master/texmf-dist/tex/context/base/unic-033.mkii b/Master/texmf-dist/tex/context/base/mkii/unic-033.mkii
index ad7a3b11ff0..ad7a3b11ff0 100644
--- a/Master/texmf-dist/tex/context/base/unic-033.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/unic-033.mkii
diff --git a/Master/texmf-dist/tex/context/base/unic-034.mkii b/Master/texmf-dist/tex/context/base/mkii/unic-034.mkii
index f998c517070..f998c517070 100644
--- a/Master/texmf-dist/tex/context/base/unic-034.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/unic-034.mkii
diff --git a/Master/texmf-dist/tex/context/base/unic-035.mkii b/Master/texmf-dist/tex/context/base/mkii/unic-035.mkii
index 0c949017468..0c949017468 100644
--- a/Master/texmf-dist/tex/context/base/unic-035.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/unic-035.mkii
diff --git a/Master/texmf-dist/tex/context/base/unic-037.mkii b/Master/texmf-dist/tex/context/base/mkii/unic-037.mkii
index 646a4afb299..646a4afb299 100644
--- a/Master/texmf-dist/tex/context/base/unic-037.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/unic-037.mkii
diff --git a/Master/texmf-dist/tex/context/base/unic-039.mkii b/Master/texmf-dist/tex/context/base/mkii/unic-039.mkii
index 02d5d3af24f..02d5d3af24f 100644
--- a/Master/texmf-dist/tex/context/base/unic-039.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/unic-039.mkii
diff --git a/Master/texmf-dist/tex/context/base/unic-251.mkii b/Master/texmf-dist/tex/context/base/mkii/unic-251.mkii
index 909cf5e9473..909cf5e9473 100644
--- a/Master/texmf-dist/tex/context/base/unic-251.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/unic-251.mkii
diff --git a/Master/texmf-dist/tex/context/base/unic-cjk.mkii b/Master/texmf-dist/tex/context/base/mkii/unic-cjk.mkii
index dc06e912ceb..dc06e912ceb 100644
--- a/Master/texmf-dist/tex/context/base/unic-cjk.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/unic-cjk.mkii
diff --git a/Master/texmf-dist/tex/context/base/unic-exp.mkii b/Master/texmf-dist/tex/context/base/mkii/unic-exp.mkii
index 4bdda3f6fe8..4bdda3f6fe8 100644
--- a/Master/texmf-dist/tex/context/base/unic-exp.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/unic-exp.mkii
diff --git a/Master/texmf-dist/tex/context/base/unic-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/unic-ini.mkii
index 96aed77bcd8..96aed77bcd8 100644
--- a/Master/texmf-dist/tex/context/base/unic-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/unic-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/unic-run.mkii b/Master/texmf-dist/tex/context/base/mkii/unic-run.mkii
index 96348d8a792..96348d8a792 100644
--- a/Master/texmf-dist/tex/context/base/unic-run.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/unic-run.mkii
diff --git a/Master/texmf-dist/tex/context/base/verb-c.mkii b/Master/texmf-dist/tex/context/base/mkii/verb-c.mkii
index 930977ca4f6..930977ca4f6 100644
--- a/Master/texmf-dist/tex/context/base/verb-c.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/verb-c.mkii
diff --git a/Master/texmf-dist/tex/context/base/verb-eif.mkii b/Master/texmf-dist/tex/context/base/mkii/verb-eif.mkii
index 68c84d4bef4..68c84d4bef4 100644
--- a/Master/texmf-dist/tex/context/base/verb-eif.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/verb-eif.mkii
diff --git a/Master/texmf-dist/tex/context/base/verb-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/verb-ini.mkii
index 5a817b4bb91..5a817b4bb91 100644
--- a/Master/texmf-dist/tex/context/base/verb-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/verb-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/verb-js.mkii b/Master/texmf-dist/tex/context/base/mkii/verb-js.mkii
index c249bd9bb2c..c249bd9bb2c 100644
--- a/Master/texmf-dist/tex/context/base/verb-js.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/verb-js.mkii
diff --git a/Master/texmf-dist/tex/context/base/verb-jv.mkii b/Master/texmf-dist/tex/context/base/mkii/verb-jv.mkii
index 2149c3a4abc..2149c3a4abc 100644
--- a/Master/texmf-dist/tex/context/base/verb-jv.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/verb-jv.mkii
diff --git a/Master/texmf-dist/tex/context/base/verb-mp.mkii b/Master/texmf-dist/tex/context/base/mkii/verb-mp.mkii
index aef52217d8c..aef52217d8c 100644
--- a/Master/texmf-dist/tex/context/base/verb-mp.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/verb-mp.mkii
diff --git a/Master/texmf-dist/tex/context/base/verb-pas.mkii b/Master/texmf-dist/tex/context/base/mkii/verb-pas.mkii
index 71c0b5a1252..71c0b5a1252 100644
--- a/Master/texmf-dist/tex/context/base/verb-pas.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/verb-pas.mkii
diff --git a/Master/texmf-dist/tex/context/base/verb-pl.mkii b/Master/texmf-dist/tex/context/base/mkii/verb-pl.mkii
index 634a0a3142a..634a0a3142a 100644
--- a/Master/texmf-dist/tex/context/base/verb-pl.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/verb-pl.mkii
diff --git a/Master/texmf-dist/tex/context/base/verb-raw.mkii b/Master/texmf-dist/tex/context/base/mkii/verb-raw.mkii
index 43a0891a039..43a0891a039 100644
--- a/Master/texmf-dist/tex/context/base/verb-raw.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/verb-raw.mkii
diff --git a/Master/texmf-dist/tex/context/base/verb-sql.mkii b/Master/texmf-dist/tex/context/base/mkii/verb-sql.mkii
index f145607f819..f145607f819 100644
--- a/Master/texmf-dist/tex/context/base/verb-sql.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/verb-sql.mkii
diff --git a/Master/texmf-dist/tex/context/base/verb-tex.mkii b/Master/texmf-dist/tex/context/base/mkii/verb-tex.mkii
index 98655cc2d8a..98655cc2d8a 100644
--- a/Master/texmf-dist/tex/context/base/verb-tex.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/verb-tex.mkii
diff --git a/Master/texmf-dist/tex/context/base/verb-xml.mkii b/Master/texmf-dist/tex/context/base/mkii/verb-xml.mkii
index dbf6635f655..dbf6635f655 100644
--- a/Master/texmf-dist/tex/context/base/verb-xml.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/verb-xml.mkii
diff --git a/Master/texmf-dist/tex/context/base/xetx-chr.mkii b/Master/texmf-dist/tex/context/base/mkii/xetx-chr.mkii
index 31f15a0cbac..ca9c4aaa440 100644
--- a/Master/texmf-dist/tex/context/base/xetx-chr.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xetx-chr.mkii
@@ -1,4 +1,4 @@
-% filename : xetx-chr.tex
+% filename : xetx-chr.mkii
% comment : generated by mtxrun --script chars --xtx
% author : Hans Hagen, PRAGMA-ADE, Hasselt NL
% copyright: PRAGMA ADE / ConTeXt Development Team
@@ -15,7 +15,6 @@
\def\textbar {\char"0007C } % VERTICAL LINE: |
\def\textbraceright {\char"0007D } % RIGHT CURLY BRACKET: }
\def\textasciitilde {\char"0007E } % TILDE: ~
-\def\nobreakspace {\char"000A0 } % NO-BREAK SPACE:  
\def\exclamdown {\char"000A1 } % INVERTED EXCLAMATION MARK: ¡
\def\textcent {\char"000A2 } % CENT SIGN: ¢
\def\textsterling {\char"000A3 } % POUND SIGN: £
@@ -1068,16 +1067,8 @@
\def\greekOmegaiotasub {\char"01FFC } % GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI: ῼ
\def\greekoxia {\char"01FFD } % GREEK OXIA: ´
\def\greekdasia {\char"01FFE } % GREEK DASIA: ῾
-\def\enspace {\char"02002 } % EN SPACE:  
-\def\emspace {\char"02003 } % EM SPACE:  
-\def\threeperemspace {\char"02004 } % THREE-PER-EM SPACE:  
-\def\fourperemspace {\char"02005 } % FOUR-PER-EM SPACE:  
-\def\sixperemspace {\char"02006 } % SIX-PER-EM SPACE:  
-\def\figurespace {\char"02007 } % FIGURE SPACE:  
-\def\punctuationspace {\char"02008 } % PUNCTUATION SPACE:  
-\def\thinspace {\char"02009 } % THIN SPACE:  
-\def\figurespace {\char"0200A } % HAIR SPACE:  
-\def\zerowidthspace {\char"0200B } % ZERO WIDTH SPACE: ​
+\def\zwnj {\char"0200C } % ZERO WIDTH NON-JOINER: ‌
+\def\zwj {\char"0200D } % ZERO WIDTH JOINER: â€
\def\textminus {\char"02012 } % FIGURE DASH: ‒
\def\endash {\char"02013 } % EN DASH: –
\def\emdash {\char"02014 } % EM DASH: —
@@ -1092,12 +1083,10 @@
\def\textddag {\char"02021 } % DOUBLE DAGGER: ‡
\def\textbullet {\char"02022 } % BULLET: •
\def\textellipsis {\char"02026 } % HORIZONTAL ELLIPSIS: …
-\def\narrownobreakspace {\char"0202F } % NARROW NO-BREAK SPACE:  
\def\perthousand {\char"02030 } % PER MILLE SIGN: ‰
\def\guilsingleleft {\char"02039 } % SINGLE LEFT-POINTING ANGLE QUOTATION MARK: ‹
\def\guilsingleright {\char"0203A } % SINGLE RIGHT-POINTING ANGLE QUOTATION MARK: ›
\def\textfraction {\char"02044 } % FRACTION SLASH: â„
-\def\medspace {\char"0205F } % MEDIUM MATHEMATICAL SPACE: âŸ
\def\textdong {\char"020AB } % DONG SIGN: â‚«
\def\texteuro {\char"020AC } % EURO SIGN: €
\def\textcelsius {\char"02103 } % DEGREE CELSIUS: ℃
@@ -1154,14 +1143,11 @@
\def\romand {\char"0217E } % SMALL ROMAN NUMERAL FIVE HUNDRED: â…¾
\def\romanm {\char"0217F } % SMALL ROMAN NUMERAL ONE THOUSAND: â…¿
\def\carriagereturn {\char"021B5 } % DOWNWARDS ARROW WITH CORNER LEFTWARDS: ↵
-\def\ideographicspace {\char"03000 } % IDEOGRAPHIC SPACE:  
-\def\ideographichalffillspace {\char"0303F } % IDEOGRAPHIC HALF FILL SPACE: 〿
\def\ffligature {\char"0FB00 } % LATIN SMALL LIGATURE FF: ff
\def\filigature {\char"0FB01 } % LATIN SMALL LIGATURE FI: ï¬
\def\flligature {\char"0FB02 } % LATIN SMALL LIGATURE FL: fl
\def\ffiligature {\char"0FB03 } % LATIN SMALL LIGATURE FFI: ffi
\def\fflligature {\char"0FB04 } % LATIN SMALL LIGATURE FFL: ffl
\def\stligature {\char"0FB06 } % LATIN SMALL LIGATURE ST: st
-\def\zerowidthnobreakspace {\char"0FEFF } % ZERO WIDTH NO-BREAK SPACE: 
\endinput
diff --git a/Master/texmf-dist/tex/context/base/xetx-cls.mkii b/Master/texmf-dist/tex/context/base/mkii/xetx-cls.mkii
index 6ce696f716a..9142f39e5c7 100644
--- a/Master/texmf-dist/tex/context/base/xetx-cls.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xetx-cls.mkii
@@ -1,4 +1,4 @@
-% filename : xetx-cls.tex
+% filename : xetx-cls.mkii
% comment : generated by mtxrun --script chars --xtx
% author : Hans Hagen, PRAGMA-ADE, Hasselt NL
% copyright: PRAGMA ADE / ConTeXt Development Team
@@ -7,29 +7,29 @@
% some character classes for xetex; seems to be rather hard coded, these numbers
% and also a mix of several classes; here we do linebreaks
-\defineXTXcharinjectionclass[lb:cl]
-\defineXTXcharinjectionclass[lb:ex]
-\defineXTXcharinjectionclass[lb:ns]
\defineXTXcharinjectionclass[lb:id]
-\defineXTXcharinjectionclass[lb:op]
+\defineXTXcharinjectionclass[lb:cl]
\defineXTXcharinjectionclass[lb:cm]
\defineXTXcharinjectionclass[lb:is]
+\defineXTXcharinjectionclass[lb:ex]
+\defineXTXcharinjectionclass[lb:op]
+\defineXTXcharinjectionclass[lb:ns]
\dofastrecurse{"00000}{"00008}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"0000E}{"0001F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dosetXTXcharacterclass{"00021}{lb:ex}
\dosetXTXcharacterclass{"00028}{lb:op}
-\dosetXTXcharacterclass{"00029}{lb:cl}
\dosetXTXcharacterclass{"0002C}{lb:is}
\dosetXTXcharacterclass{"0002E}{lb:is}
\dofastrecurse{"0003A}{"0003B}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:is}}
\dosetXTXcharacterclass{"0003F}{lb:ex}
\dosetXTXcharacterclass{"0005B}{lb:op}
-\dosetXTXcharacterclass{"0005D}{lb:cl}
\dosetXTXcharacterclass{"0007B}{lb:op}
\dosetXTXcharacterclass{"0007D}{lb:cl}
\dofastrecurse{"0007F}{"00084}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"00086}{"0009F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dosetXTXcharacterclass{"000A1}{lb:op}
+\dosetXTXcharacterclass{"000BF}{lb:op}
\dofastrecurse{"00300}{"0034E}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"00350}{"0035B}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"00363}{"0036F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
@@ -42,16 +42,16 @@
\dofastrecurse{"005C4}{"005C5}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dosetXTXcharacterclass{"005C6}{lb:ex}
\dosetXTXcharacterclass{"005C7}{lb:cm}
-\dosetXTXcharacterclass{"0060C}{lb:ex}
-\dosetXTXcharacterclass{"0060D}{lb:is}
-\dofastrecurse{"00610}{"00615}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
-\dofastrecurse{"0061B}{"0061F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ex}}
-\dofastrecurse{"0064B}{"0065E}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
-\dosetXTXcharacterclass{"0066A}{lb:ex}
+\dofastrecurse{"0060C}{"0060D}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:is}}
+\dofastrecurse{"00610}{"0061A}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dosetXTXcharacterclass{"0061B}{lb:ex}
+\dosetXTXcharacterclass{"0061C}{lb:cm}
+\dofastrecurse{"0061E}{"0061F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ex}}
+\dofastrecurse{"0064B}{"0065F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dosetXTXcharacterclass{"00670}{lb:cm}
\dosetXTXcharacterclass{"006D4}{lb:ex}
\dofastrecurse{"006D6}{"006DC}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
-\dofastrecurse{"006DE}{"006E4}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"006DF}{"006E4}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"006E7}{"006E8}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"006EA}{"006ED}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dosetXTXcharacterclass{"00711}{lb:cm}
@@ -60,10 +60,15 @@
\dofastrecurse{"007EB}{"007F3}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dosetXTXcharacterclass{"007F8}{lb:is}
\dosetXTXcharacterclass{"007F9}{lb:ex}
-\dofastrecurse{"00901}{"00903}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
-\dosetXTXcharacterclass{"0093C}{lb:cm}
-\dofastrecurse{"0093E}{"0094D}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
-\dofastrecurse{"00951}{"00954}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"00816}{"00819}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"0081B}{"00823}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"00825}{"00827}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"00829}{"0082D}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"00859}{"0085B}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"008E3}{"00903}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"0093A}{"0093C}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"0093E}{"0094F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"00951}{"00957}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"00962}{"00963}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"00981}{"00983}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dosetXTXcharacterclass{"009BC}{lb:cm}
@@ -71,27 +76,33 @@
\dosetXTXcharacterclass{"009D7}{lb:cm}
\dofastrecurse{"009E2}{"009E3}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"00A01}{"00A03}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
-\dofastrecurse{"00A3C}{"00A4D}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"00A3C}{"00A51}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"00A70}{"00A71}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
-\dofastrecurse{"00A81}{"00A83}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"00A75}{"00A83}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dosetXTXcharacterclass{"00ABC}{lb:cm}
\dofastrecurse{"00ABE}{"00ACD}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"00AE2}{"00AE3}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"00B01}{"00B03}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dosetXTXcharacterclass{"00B3C}{lb:cm}
\dofastrecurse{"00B3E}{"00B57}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"00B62}{"00B63}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dosetXTXcharacterclass{"00B82}{lb:cm}
-\dofastrecurse{"00BBE}{"00BD7}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
-\dofastrecurse{"00C01}{"00C03}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"00BBE}{"00BCD}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dosetXTXcharacterclass{"00BD7}{lb:cm}
+\dofastrecurse{"00C00}{"00C03}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"00C3E}{"00C56}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
-\dofastrecurse{"00C82}{"00C83}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"00C62}{"00C63}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"00C81}{"00C83}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dosetXTXcharacterclass{"00CBC}{lb:cm}
\dofastrecurse{"00CBE}{"00CD6}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"00CE2}{"00CE3}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
-\dofastrecurse{"00D02}{"00D03}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
-\dofastrecurse{"00D3E}{"00D57}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"00D01}{"00D03}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"00D3E}{"00D4D}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dosetXTXcharacterclass{"00D57}{lb:cm}
+\dofastrecurse{"00D62}{"00D63}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"00D82}{"00D83}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
-\dofastrecurse{"00DCA}{"00DF3}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"00DCA}{"00DDF}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"00DF2}{"00DF3}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"00F0D}{"00F11}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ex}}
\dosetXTXcharacterclass{"00F14}{lb:ex}
\dofastrecurse{"00F18}{"00F19}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
@@ -106,9 +117,9 @@
\dofastrecurse{"00F71}{"00F7E}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"00F80}{"00F84}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"00F86}{"00F87}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
-\dofastrecurse{"00F90}{"00FBC}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"00F8D}{"00FBC}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dosetXTXcharacterclass{"00FC6}{lb:cm}
-\dosetXTXcharacterclass{"0135F}{lb:cm}
+\dofastrecurse{"0135D}{"0135F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dosetXTXcharacterclass{"0169B}{lb:op}
\dosetXTXcharacterclass{"0169C}{lb:cl}
\dofastrecurse{"01712}{"01714}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
@@ -116,14 +127,26 @@
\dofastrecurse{"01752}{"01753}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"01772}{"01773}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dosetXTXcharacterclass{"017D6}{lb:ns}
+\dofastrecurse{"01802}{"01803}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ex}}
+\dofastrecurse{"01808}{"01809}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ex}}
\dofastrecurse{"0180B}{"0180D}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dosetXTXcharacterclass{"018A9}{lb:cm}
\dofastrecurse{"01920}{"0193B}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"01944}{"01945}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ex}}
\dofastrecurse{"01A17}{"01A1B}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
-\dofastrecurse{"01B00}{"01B04}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dosetXTXcharacterclass{"01A7F}{lb:cm}
+\dofastrecurse{"01AB0}{"01B04}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"01B34}{"01B44}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"01B6B}{"01B73}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"01B80}{"01B82}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"01BA1}{"01BAD}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"01BE6}{"01BF3}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"01C24}{"01C37}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"01CD0}{"01CD2}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"01CD4}{"01CE8}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dosetXTXcharacterclass{"01CED}{lb:cm}
+\dofastrecurse{"01CF2}{"01CF4}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"01CF8}{"01CF9}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"01DC0}{"01DFF}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"0200C}{"0200F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dosetXTXcharacterclass{"0201A}{lb:op}
@@ -134,14 +157,39 @@
\dosetXTXcharacterclass{"02045}{lb:op}
\dosetXTXcharacterclass{"02046}{lb:cl}
\dofastrecurse{"02047}{"02049}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ns}}
-\dofastrecurse{"0206A}{"0206F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"02066}{"0206F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dosetXTXcharacterclass{"0207D}{lb:op}
\dosetXTXcharacterclass{"0207E}{lb:cl}
\dosetXTXcharacterclass{"0208D}{lb:op}
\dosetXTXcharacterclass{"0208E}{lb:cl}
-\dofastrecurse{"020D0}{"020EF}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"020D0}{"020F0}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dosetXTXcharacterclass{"02308}{lb:op}
+\dosetXTXcharacterclass{"02309}{lb:cl}
+\dosetXTXcharacterclass{"0230A}{lb:op}
+\dosetXTXcharacterclass{"0230B}{lb:cl}
+\dofastrecurse{"0231A}{"0231B}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
\dosetXTXcharacterclass{"02329}{lb:op}
\dosetXTXcharacterclass{"0232A}{lb:cl}
+\dofastrecurse{"023F0}{"023F3}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"02600}{"02603}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"02614}{"02615}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dosetXTXcharacterclass{"02618}{lb:id}
+\dofastrecurse{"0261A}{"0261F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"02639}{"0263B}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dosetXTXcharacterclass{"02668}{lb:id}
+\dosetXTXcharacterclass{"0267F}{lb:id}
+\dofastrecurse{"026BD}{"026C8}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dosetXTXcharacterclass{"026CD}{lb:id}
+\dofastrecurse{"026CF}{"026D1}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"026D3}{"026D4}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"026D8}{"026D9}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dosetXTXcharacterclass{"026DC}{lb:id}
+\dofastrecurse{"026DF}{"026E1}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dosetXTXcharacterclass{"026EA}{lb:id}
+\dofastrecurse{"026F1}{"026F5}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"026F7}{"026FA}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"026FD}{"02704}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"02708}{"0270D}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
\dofastrecurse{"02762}{"02763}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ex}}
\dosetXTXcharacterclass{"02768}{lb:op}
\dosetXTXcharacterclass{"02769}{lb:cl}
@@ -165,6 +213,10 @@
\dosetXTXcharacterclass{"027E9}{lb:cl}
\dosetXTXcharacterclass{"027EA}{lb:op}
\dosetXTXcharacterclass{"027EB}{lb:cl}
+\dosetXTXcharacterclass{"027EC}{lb:op}
+\dosetXTXcharacterclass{"027ED}{lb:cl}
+\dosetXTXcharacterclass{"027EE}{lb:op}
+\dosetXTXcharacterclass{"027EF}{lb:cl}
\dosetXTXcharacterclass{"02983}{lb:op}
\dosetXTXcharacterclass{"02984}{lb:cl}
\dosetXTXcharacterclass{"02985}{lb:op}
@@ -193,7 +245,23 @@
\dosetXTXcharacterclass{"029DB}{lb:cl}
\dosetXTXcharacterclass{"029FC}{lb:op}
\dosetXTXcharacterclass{"029FD}{lb:cl}
-\dofastrecurse{"02E80}{"03000}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"02CEF}{"02CF1}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dosetXTXcharacterclass{"02CF9}{lb:ex}
+\dosetXTXcharacterclass{"02CFE}{lb:ex}
+\dosetXTXcharacterclass{"02D7F}{lb:cm}
+\dofastrecurse{"02DE0}{"02DFF}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dosetXTXcharacterclass{"02E18}{lb:op}
+\dosetXTXcharacterclass{"02E22}{lb:op}
+\dosetXTXcharacterclass{"02E23}{lb:cl}
+\dosetXTXcharacterclass{"02E24}{lb:op}
+\dosetXTXcharacterclass{"02E25}{lb:cl}
+\dosetXTXcharacterclass{"02E26}{lb:op}
+\dosetXTXcharacterclass{"02E27}{lb:cl}
+\dosetXTXcharacterclass{"02E28}{lb:op}
+\dosetXTXcharacterclass{"02E29}{lb:cl}
+\dosetXTXcharacterclass{"02E2E}{lb:ex}
+\dosetXTXcharacterclass{"02E42}{lb:op}
+\dofastrecurse{"02E80}{"02FFB}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
\dofastrecurse{"03001}{"03002}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cl}}
\dofastrecurse{"03003}{"03004}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
\dosetXTXcharacterclass{"03005}{lb:ns}
@@ -222,71 +290,72 @@
\dofastrecurse{"0301E}{"0301F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cl}}
\dofastrecurse{"03020}{"03029}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
\dofastrecurse{"0302A}{"0302F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
-\dofastrecurse{"03030}{"0303A}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"03030}{"03034}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dosetXTXcharacterclass{"03035}{lb:cm}
+\dofastrecurse{"03036}{"0303A}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
\dofastrecurse{"0303B}{"0303C}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ns}}
\dofastrecurse{"0303D}{"0303F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
-\dosetXTXcharacterclass{"03041}{lb:ns}
\dosetXTXcharacterclass{"03042}{lb:id}
-\dosetXTXcharacterclass{"03043}{lb:ns}
\dosetXTXcharacterclass{"03044}{lb:id}
-\dosetXTXcharacterclass{"03045}{lb:ns}
\dosetXTXcharacterclass{"03046}{lb:id}
-\dosetXTXcharacterclass{"03047}{lb:ns}
\dosetXTXcharacterclass{"03048}{lb:id}
-\dosetXTXcharacterclass{"03049}{lb:ns}
\dofastrecurse{"0304A}{"03062}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
-\dosetXTXcharacterclass{"03063}{lb:ns}
\dofastrecurse{"03064}{"03082}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
-\dosetXTXcharacterclass{"03083}{lb:ns}
\dosetXTXcharacterclass{"03084}{lb:id}
-\dosetXTXcharacterclass{"03085}{lb:ns}
\dosetXTXcharacterclass{"03086}{lb:id}
-\dosetXTXcharacterclass{"03087}{lb:ns}
\dofastrecurse{"03088}{"0308D}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
-\dosetXTXcharacterclass{"0308E}{lb:ns}
\dofastrecurse{"0308F}{"03094}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
-\dofastrecurse{"03095}{"03096}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ns}}
\dofastrecurse{"03099}{"0309A}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"0309B}{"0309E}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ns}}
\dosetXTXcharacterclass{"0309F}{lb:id}
-\dofastrecurse{"030A0}{"030A1}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ns}}
+\dosetXTXcharacterclass{"030A0}{lb:ns}
\dosetXTXcharacterclass{"030A2}{lb:id}
-\dosetXTXcharacterclass{"030A3}{lb:ns}
\dosetXTXcharacterclass{"030A4}{lb:id}
-\dosetXTXcharacterclass{"030A5}{lb:ns}
\dosetXTXcharacterclass{"030A6}{lb:id}
-\dosetXTXcharacterclass{"030A7}{lb:ns}
\dosetXTXcharacterclass{"030A8}{lb:id}
-\dosetXTXcharacterclass{"030A9}{lb:ns}
\dofastrecurse{"030AA}{"030C2}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
-\dosetXTXcharacterclass{"030C3}{lb:ns}
\dofastrecurse{"030C4}{"030E2}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
-\dosetXTXcharacterclass{"030E3}{lb:ns}
\dosetXTXcharacterclass{"030E4}{lb:id}
-\dosetXTXcharacterclass{"030E5}{lb:ns}
\dosetXTXcharacterclass{"030E6}{lb:id}
-\dosetXTXcharacterclass{"030E7}{lb:ns}
\dofastrecurse{"030E8}{"030ED}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
-\dosetXTXcharacterclass{"030EE}{lb:ns}
\dofastrecurse{"030EF}{"030F4}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
-\dofastrecurse{"030F5}{"030F6}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ns}}
\dofastrecurse{"030F7}{"030FA}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
-\dofastrecurse{"030FB}{"030FE}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ns}}
-\dofastrecurse{"030FF}{"031CF}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
-\dofastrecurse{"031F0}{"031FF}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ns}}
-\dofastrecurse{"03200}{"03400}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
-\dofastrecurse{"04E00}{"0A014}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dosetXTXcharacterclass{"030FB}{lb:ns}
+\dofastrecurse{"030FD}{"030FE}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ns}}
+\dofastrecurse{"030FF}{"031E3}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"03200}{"03247}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"03250}{"033FF}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"0A000}{"0A014}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
\dosetXTXcharacterclass{"0A015}{lb:ns}
\dofastrecurse{"0A016}{"0A4C6}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dosetXTXcharacterclass{"0A60E}{lb:ex}
+\dofastrecurse{"0A66F}{"0A672}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"0A674}{"0A67D}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"0A69E}{"0A69F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"0A6F0}{"0A6F1}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dosetXTXcharacterclass{"0A802}{lb:cm}
\dosetXTXcharacterclass{"0A806}{lb:cm}
\dosetXTXcharacterclass{"0A80B}{lb:cm}
\dofastrecurse{"0A823}{"0A827}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"0A876}{"0A877}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ex}}
+\dofastrecurse{"0A880}{"0A881}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"0A8B4}{"0A8C4}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"0A8E0}{"0A8F1}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"0A926}{"0A92D}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"0A947}{"0A953}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"0A980}{"0A983}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"0A9B3}{"0A9C0}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"0AA29}{"0AA36}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dosetXTXcharacterclass{"0AA43}{lb:cm}
+\dofastrecurse{"0AA4C}{"0AA4D}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"0AAEB}{"0AAEF}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"0AAF5}{"0AAF6}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"0ABE3}{"0ABEA}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"0ABEC}{"0ABED}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"0F900}{"0FAD9}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
\dosetXTXcharacterclass{"0FB1E}{lb:cm}
-\dosetXTXcharacterclass{"0FD3E}{lb:op}
-\dosetXTXcharacterclass{"0FD3F}{lb:cl}
+\dosetXTXcharacterclass{"0FD3E}{lb:cl}
+\dosetXTXcharacterclass{"0FD3F}{lb:op}
\dofastrecurse{"0FE00}{"0FE0F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dosetXTXcharacterclass{"0FE10}{lb:is}
\dofastrecurse{"0FE11}{"0FE12}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cl}}
@@ -294,7 +363,7 @@
\dofastrecurse{"0FE15}{"0FE16}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ex}}
\dosetXTXcharacterclass{"0FE17}{lb:op}
\dosetXTXcharacterclass{"0FE18}{lb:cl}
-\dofastrecurse{"0FE20}{"0FE23}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"0FE20}{"0FE2F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"0FE30}{"0FE34}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
\dosetXTXcharacterclass{"0FE35}{lb:op}
\dosetXTXcharacterclass{"0FE36}{lb:cl}
@@ -357,22 +426,86 @@
\dosetXTXcharacterclass{"0FF62}{lb:op}
\dofastrecurse{"0FF63}{"0FF64}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cl}}
\dosetXTXcharacterclass{"0FF65}{lb:ns}
-\dofastrecurse{"0FF67}{"0FF70}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ns}}
\dofastrecurse{"0FF9E}{"0FF9F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ns}}
\dofastrecurse{"0FFE2}{"0FFE4}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
\dofastrecurse{"0FFF9}{"0FFFB}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dosetXTXcharacterclass{"101FD}{lb:cm}
+\dosetXTXcharacterclass{"102E0}{lb:cm}
+\dofastrecurse{"10376}{"1037A}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"10A01}{"10A0F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"10A38}{"10A3F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"10AE5}{"10AE6}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"11000}{"11002}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"11038}{"11046}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"1107F}{"11082}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"110B0}{"110BA}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"11100}{"11102}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"11127}{"11134}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dosetXTXcharacterclass{"11173}{lb:cm}
+\dofastrecurse{"11180}{"11182}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"111B3}{"111C0}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"111CA}{"111CC}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"1122C}{"11237}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"112DF}{"112EA}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"11300}{"11303}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dosetXTXcharacterclass{"1133C}{lb:cm}
+\dofastrecurse{"1133E}{"1134D}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dosetXTXcharacterclass{"11357}{lb:cm}
+\dofastrecurse{"11362}{"11374}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"114B0}{"114C3}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"115AF}{"115C0}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"115C4}{"115C5}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ex}}
+\dofastrecurse{"115DC}{"115DD}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"11630}{"11640}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"116AB}{"116B7}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"13258}{"1325A}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:op}}
+\dofastrecurse{"1325B}{"1325D}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cl}}
+\dosetXTXcharacterclass{"13282}{lb:cl}
+\dosetXTXcharacterclass{"13286}{lb:op}
+\dosetXTXcharacterclass{"13287}{lb:cl}
+\dosetXTXcharacterclass{"13288}{lb:op}
+\dosetXTXcharacterclass{"13289}{lb:cl}
+\dosetXTXcharacterclass{"13379}{lb:op}
+\dofastrecurse{"1337A}{"1337B}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cl}}
+\dosetXTXcharacterclass{"145CE}{lb:op}
+\dosetXTXcharacterclass{"145CF}{lb:cl}
+\dofastrecurse{"16AF0}{"16AF4}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"16B30}{"16B36}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"16F51}{"16F92}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"1B000}{"1B001}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"1BC9D}{"1BC9E}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"1BCA0}{"1BCA3}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"1D165}{"1D169}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"1D16D}{"1D182}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"1D185}{"1D18B}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"1D1AA}{"1D1AD}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
\dofastrecurse{"1D242}{"1D244}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
-\dofastrecurse{"20000}{"2FA1D}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"1DA00}{"1DA36}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"1DA3B}{"1DA6C}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dosetXTXcharacterclass{"1DA75}{lb:cm}
+\dosetXTXcharacterclass{"1DA84}{lb:cm}
+\dofastrecurse{"1DA9B}{"1DAAF}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"1E8D0}{"1E8D6}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
+\dofastrecurse{"1F000}{"1F0F5}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"1F200}{"1F39B}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"1F39E}{"1F3B4}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"1F3B7}{"1F3BB}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"1F3BD}{"1F3FA}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"1F400}{"1F49F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dosetXTXcharacterclass{"1F4A1}{lb:id}
+\dosetXTXcharacterclass{"1F4A3}{lb:id}
+\dofastrecurse{"1F4A5}{"1F4AE}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dosetXTXcharacterclass{"1F4B0}{lb:id}
+\dofastrecurse{"1F4B3}{"1F4FF}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"1F507}{"1F516}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"1F525}{"1F531}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"1F54A}{"1F5D3}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"1F5DC}{"1F5F3}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"1F5FA}{"1F64F}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"1F679}{"1F67B}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:ns}}
+\dofastrecurse{"1F680}{"1F6F3}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
+\dofastrecurse{"1F910}{"2FA1D}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
\dofastrecurse{"E0001}{"E01EF}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:cm}}
-\dofastrecurse{"03400}{"04DB5}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
-\dofastrecurse{"04E00}{"09FBB}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
-\dofastrecurse{"20000}{"2A6D6}{1}{\dosetXTXcharacterclass\fastrecursecounter{lb:id}}
\endinput
diff --git a/Master/texmf-dist/tex/context/base/xetx-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/xetx-ini.mkii
index 55155fa1af2..55155fa1af2 100644
--- a/Master/texmf-dist/tex/context/base/xetx-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xetx-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/xetx-utf.mkii b/Master/texmf-dist/tex/context/base/mkii/xetx-utf.mkii
index a337c9e7601..a157a2d11e4 100644
--- a/Master/texmf-dist/tex/context/base/xetx-utf.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xetx-utf.mkii
@@ -1,4 +1,4 @@
-% filename : xetx-utf.tex
+% filename : xetx-utf.mkii
% comment : generated by mtxrun --script chars --xtx
% author : Hans Hagen, PRAGMA-ADE, Hasselt NL
% copyright: PRAGMA ADE / ConTeXt Development Team
@@ -549,9 +549,16 @@
\setXTXcharcodes "002AD "002AD "002AD % LATIN LETTER BIDENTAL PERCUSSIVE
\setXTXcharcodes "002AE "002AE "002AE % LATIN SMALL LETTER TURNED H WITH FISHHOOK
\setXTXcharcodes "002AF "002AF "002AF % LATIN SMALL LETTER TURNED H WITH FISHHOOK AND TAIL
+\setXTXcharcodes "00370 "00370 "00370 % GREEK CAPITAL LETTER HETA
+\setXTXcharcodes "00371 "00371 "00371 % GREEK SMALL LETTER HETA
+\setXTXcharcodes "00372 "00372 "00372 % GREEK CAPITAL LETTER ARCHAIC SAMPI
+\setXTXcharcodes "00373 "00373 "00373 % GREEK SMALL LETTER ARCHAIC SAMPI
+\setXTXcharcodes "00376 "00376 "00376 % GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA
+\setXTXcharcodes "00377 "00377 "00377 % GREEK SMALL LETTER PAMPHYLIAN DIGAMMA
\setXTXcharcodes "0037B "0037B "003FD % GREEK SMALL REVERSED LUNATE SIGMA SYMBOL
\setXTXcharcodes "0037C "0037C "003FE % GREEK SMALL DOTTED LUNATE SIGMA SYMBOL
\setXTXcharcodes "0037D "0037D "003FF % GREEK SMALL REVERSED DOTTED LUNATE SIGMA SYMBOL
+\setXTXcharcodes "0037F "0037F "0037F % GREEK CAPITAL LETTER YOT
\setXTXcharcodes "00386 "003AC "00386 % GREEK CAPITAL LETTER ALPHA WITH TONOS
\setXTXcharcodes "00388 "003AD "00388 % GREEK CAPITAL LETTER EPSILON WITH TONOS
\setXTXcharcodes "00389 "003AE "00389 % GREEK CAPITAL LETTER ETA WITH TONOS
@@ -621,6 +628,7 @@
\setXTXcharcodes "003CC "003CC "0038C % GREEK SMALL LETTER OMICRON WITH TONOS
\setXTXcharcodes "003CD "003CD "0038E % GREEK SMALL LETTER UPSILON WITH TONOS
\setXTXcharcodes "003CE "003CE "0038F % GREEK SMALL LETTER OMEGA WITH TONOS
+\setXTXcharcodes "003CF "003CF "003CF % GREEK CAPITAL KAI SYMBOL
\setXTXcharcodes "003D0 "003D0 "00392 % GREEK BETA SYMBOL
\setXTXcharcodes "003D1 "003D1 "00398 % GREEK THETA SYMBOL
\setXTXcharcodes "003D2 "003D2 "003D2 % GREEK UPSILON WITH HOOK SYMBOL
@@ -936,6 +944,34 @@
\setXTXcharcodes "00511 "00511 "00510 % CYRILLIC SMALL LETTER REVERSED ZE
\setXTXcharcodes "00512 "00513 "00512 % CYRILLIC CAPITAL LETTER EL WITH HOOK
\setXTXcharcodes "00513 "00513 "00512 % CYRILLIC SMALL LETTER EL WITH HOOK
+\setXTXcharcodes "00514 "00514 "00514 % CYRILLIC CAPITAL LETTER LHA
+\setXTXcharcodes "00515 "00515 "00515 % CYRILLIC SMALL LETTER LHA
+\setXTXcharcodes "00516 "00516 "00516 % CYRILLIC CAPITAL LETTER RHA
+\setXTXcharcodes "00517 "00517 "00517 % CYRILLIC SMALL LETTER RHA
+\setXTXcharcodes "00518 "00518 "00518 % CYRILLIC CAPITAL LETTER YAE
+\setXTXcharcodes "00519 "00519 "00519 % CYRILLIC SMALL LETTER YAE
+\setXTXcharcodes "0051A "0051A "0051A % CYRILLIC CAPITAL LETTER QA
+\setXTXcharcodes "0051B "0051B "0051B % CYRILLIC SMALL LETTER QA
+\setXTXcharcodes "0051C "0051C "0051C % CYRILLIC CAPITAL LETTER WE
+\setXTXcharcodes "0051D "0051D "0051D % CYRILLIC SMALL LETTER WE
+\setXTXcharcodes "0051E "0051E "0051E % CYRILLIC CAPITAL LETTER ALEUT KA
+\setXTXcharcodes "0051F "0051F "0051F % CYRILLIC SMALL LETTER ALEUT KA
+\setXTXcharcodes "00520 "00520 "00520 % CYRILLIC CAPITAL LETTER EL WITH MIDDLE HOOK
+\setXTXcharcodes "00521 "00521 "00521 % CYRILLIC SMALL LETTER EL WITH MIDDLE HOOK
+\setXTXcharcodes "00522 "00522 "00522 % CYRILLIC CAPITAL LETTER EN WITH MIDDLE HOOK
+\setXTXcharcodes "00523 "00523 "00523 % CYRILLIC SMALL LETTER EN WITH MIDDLE HOOK
+\setXTXcharcodes "00524 "00524 "00524 % CYRILLIC CAPITAL LETTER PE WITH DESCENDER
+\setXTXcharcodes "00525 "00525 "00525 % CYRILLIC SMALL LETTER PE WITH DESCENDER
+\setXTXcharcodes "00526 "00526 "00526 % CYRILLIC CAPITAL LETTER SHHA WITH DESCENDER
+\setXTXcharcodes "00527 "00527 "00527 % CYRILLIC SMALL LETTER SHHA WITH DESCENDER
+\setXTXcharcodes "00528 "00528 "00528 % CYRILLIC CAPITAL LETTER EN WITH LEFT HOOK
+\setXTXcharcodes "00529 "00529 "00529 % CYRILLIC SMALL LETTER EN WITH LEFT HOOK
+\setXTXcharcodes "0052A "0052A "0052A % CYRILLIC CAPITAL LETTER DZZHE
+\setXTXcharcodes "0052B "0052B "0052B % CYRILLIC SMALL LETTER DZZHE
+\setXTXcharcodes "0052C "0052C "0052C % CYRILLIC CAPITAL LETTER DCHE
+\setXTXcharcodes "0052D "0052D "0052D % CYRILLIC SMALL LETTER DCHE
+\setXTXcharcodes "0052E "0052E "0052E % CYRILLIC CAPITAL LETTER EL WITH DESCENDER
+\setXTXcharcodes "0052F "0052F "0052F % CYRILLIC SMALL LETTER EL WITH DESCENDER
\setXTXcharcodes "00531 "00561 "00531 % ARMENIAN CAPITAL LETTER AYB
\setXTXcharcodes "00532 "00562 "00532 % ARMENIAN CAPITAL LETTER BEN
\setXTXcharcodes "00533 "00563 "00533 % ARMENIAN CAPITAL LETTER GIM
@@ -1051,6 +1087,15 @@
\setXTXcharcodes "010C3 "02D23 "010C3 % GEORGIAN CAPITAL LETTER WE
\setXTXcharcodes "010C4 "02D24 "010C4 % GEORGIAN CAPITAL LETTER HAR
\setXTXcharcodes "010C5 "02D25 "010C5 % GEORGIAN CAPITAL LETTER HOE
+\setXTXcharcodes "010C7 "010C7 "010C7 % GEORGIAN CAPITAL LETTER YN
+\setXTXcharcodes "010CD "010CD "010CD % GEORGIAN CAPITAL LETTER AEN
+\setXTXcharcodes "013F5 "013F5 "013F5 % CHEROKEE LETTER MV
+\setXTXcharcodes "013F8 "013F8 "013F8 % CHEROKEE SMALL LETTER YE
+\setXTXcharcodes "013F9 "013F9 "013F9 % CHEROKEE SMALL LETTER YI
+\setXTXcharcodes "013FA "013FA "013FA % CHEROKEE SMALL LETTER YO
+\setXTXcharcodes "013FB "013FB "013FB % CHEROKEE SMALL LETTER YU
+\setXTXcharcodes "013FC "013FC "013FC % CHEROKEE SMALL LETTER YV
+\setXTXcharcodes "013FD "013FD "013FD % CHEROKEE SMALL LETTER MV
\setXTXcharcodes "01D00 "01D00 "01D00 % LATIN LETTER SMALL CAPITAL A
\setXTXcharcodes "01D01 "01D01 "01D01 % LATIN LETTER SMALL CAPITAL AE
\setXTXcharcodes "01D02 "01D02 "01D02 % LATIN SMALL LETTER TURNED AE
@@ -1307,6 +1352,10 @@
\setXTXcharcodes "01E99 "01E99 "01E99 % LATIN SMALL LETTER Y WITH RING ABOVE
\setXTXcharcodes "01E9A "01E9A "01E9A % LATIN SMALL LETTER A WITH RIGHT HALF RING
\setXTXcharcodes "01E9B "01E9B "01E60 % LATIN SMALL LETTER LONG S WITH DOT ABOVE
+\setXTXcharcodes "01E9C "01E9C "01E9C % LATIN SMALL LETTER LONG S WITH DIAGONAL STROKE
+\setXTXcharcodes "01E9D "01E9D "01E9D % LATIN SMALL LETTER LONG S WITH HIGH STROKE
+\setXTXcharcodes "01E9E "01E9E "01E9E % LATIN CAPITAL LETTER SHARP S
+\setXTXcharcodes "01E9F "01E9F "01E9F % LATIN SMALL LETTER DELTA
\setXTXcharcodes "01EA0 "01EA1 "01EA0 % LATIN CAPITAL LETTER A WITH DOT BELOW
\setXTXcharcodes "01EA1 "01EA1 "01EA0 % LATIN SMALL LETTER A WITH DOT BELOW
\setXTXcharcodes "01EA2 "01EA3 "01EA2 % LATIN CAPITAL LETTER A WITH HOOK ABOVE
@@ -1397,6 +1446,12 @@
\setXTXcharcodes "01EF7 "01EF7 "01EF6 % LATIN SMALL LETTER Y WITH HOOK ABOVE
\setXTXcharcodes "01EF8 "01EF9 "01EF8 % LATIN CAPITAL LETTER Y WITH TILDE
\setXTXcharcodes "01EF9 "01EF9 "01EF8 % LATIN SMALL LETTER Y WITH TILDE
+\setXTXcharcodes "01EFA "01EFA "01EFA % LATIN CAPITAL LETTER MIDDLE-WELSH LL
+\setXTXcharcodes "01EFB "01EFB "01EFB % LATIN SMALL LETTER MIDDLE-WELSH LL
+\setXTXcharcodes "01EFC "01EFC "01EFC % LATIN CAPITAL LETTER MIDDLE-WELSH V
+\setXTXcharcodes "01EFD "01EFD "01EFD % LATIN SMALL LETTER MIDDLE-WELSH V
+\setXTXcharcodes "01EFE "01EFE "01EFE % LATIN CAPITAL LETTER Y WITH LOOP
+\setXTXcharcodes "01EFF "01EFF "01EFF % LATIN SMALL LETTER Y WITH LOOP
\setXTXcharcodes "01F00 "01F00 "01F08 % GREEK SMALL LETTER ALPHA WITH PSILI
\setXTXcharcodes "01F01 "01F01 "01F09 % GREEK SMALL LETTER ALPHA WITH DASIA
\setXTXcharcodes "01F02 "01F02 "01F0A % GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA
@@ -1768,10 +1823,24 @@
\setXTXcharcodes "02C6A "02C6A "02C69 % LATIN SMALL LETTER K WITH DESCENDER
\setXTXcharcodes "02C6B "02C6C "02C6B % LATIN CAPITAL LETTER Z WITH DESCENDER
\setXTXcharcodes "02C6C "02C6C "02C6B % LATIN SMALL LETTER Z WITH DESCENDER
+\setXTXcharcodes "02C6D "02C6D "02C6D % LATIN CAPITAL LETTER ALPHA
+\setXTXcharcodes "02C6E "02C6E "02C6E % LATIN CAPITAL LETTER M WITH HOOK
+\setXTXcharcodes "02C6F "02C6F "02C6F % LATIN CAPITAL LETTER TURNED A
+\setXTXcharcodes "02C70 "02C70 "02C70 % LATIN CAPITAL LETTER TURNED ALPHA
+\setXTXcharcodes "02C71 "02C71 "02C71 % LATIN SMALL LETTER V WITH RIGHT HOOK
+\setXTXcharcodes "02C72 "02C72 "02C72 % LATIN CAPITAL LETTER W WITH HOOK
+\setXTXcharcodes "02C73 "02C73 "02C73 % LATIN SMALL LETTER W WITH HOOK
\setXTXcharcodes "02C74 "02C74 "02C74 % LATIN SMALL LETTER V WITH CURL
\setXTXcharcodes "02C75 "02C76 "02C75 % LATIN CAPITAL LETTER HALF H
\setXTXcharcodes "02C76 "02C76 "02C75 % LATIN SMALL LETTER HALF H
\setXTXcharcodes "02C77 "02C77 "02C77 % LATIN SMALL LETTER TAILLESS PHI
+\setXTXcharcodes "02C78 "02C78 "02C78 % LATIN SMALL LETTER E WITH NOTCH
+\setXTXcharcodes "02C79 "02C79 "02C79 % LATIN SMALL LETTER TURNED R WITH TAIL
+\setXTXcharcodes "02C7A "02C7A "02C7A % LATIN SMALL LETTER O WITH LOW RING INSIDE
+\setXTXcharcodes "02C7B "02C7B "02C7B % LATIN LETTER SMALL CAPITAL TURNED E
+\setXTXcharcodes "02C7C "02C7C "02C7C % LATIN SUBSCRIPT SMALL LETTER J
+\setXTXcharcodes "02C7E "02C7E "02C7E % LATIN CAPITAL LETTER S WITH SWASH TAIL
+\setXTXcharcodes "02C7F "02C7F "02C7F % LATIN CAPITAL LETTER Z WITH SWASH TAIL
\setXTXcharcodes "02C80 "02C81 "02C80 % COPTIC CAPITAL LETTER ALFA
\setXTXcharcodes "02C81 "02C81 "02C80 % COPTIC SMALL LETTER ALFA
\setXTXcharcodes "02C82 "02C83 "02C82 % COPTIC CAPITAL LETTER VIDA
@@ -1873,6 +1942,12 @@
\setXTXcharcodes "02CE2 "02CE3 "02CE2 % COPTIC CAPITAL LETTER OLD NUBIAN WAU
\setXTXcharcodes "02CE3 "02CE3 "02CE2 % COPTIC SMALL LETTER OLD NUBIAN WAU
\setXTXcharcodes "02CE4 "02CE4 "02CE4 % COPTIC SYMBOL KAI
+\setXTXcharcodes "02CEB "02CEB "02CEB % COPTIC CAPITAL LETTER CRYPTOGRAMMIC SHEI
+\setXTXcharcodes "02CEC "02CEC "02CEC % COPTIC SMALL LETTER CRYPTOGRAMMIC SHEI
+\setXTXcharcodes "02CED "02CED "02CED % COPTIC CAPITAL LETTER CRYPTOGRAMMIC GANGIA
+\setXTXcharcodes "02CEE "02CEE "02CEE % COPTIC SMALL LETTER CRYPTOGRAMMIC GANGIA
+\setXTXcharcodes "02CF2 "02CF2 "02CF2 % COPTIC CAPITAL LETTER BOHAIRIC KHEI
+\setXTXcharcodes "02CF3 "02CF3 "02CF3 % COPTIC SMALL LETTER BOHAIRIC KHEI
\setXTXcharcodes "02D00 "02D00 "010A0 % GEORGIAN SMALL LETTER AN
\setXTXcharcodes "02D01 "02D01 "010A1 % GEORGIAN SMALL LETTER BAN
\setXTXcharcodes "02D02 "02D02 "010A2 % GEORGIAN SMALL LETTER GAN
@@ -1911,6 +1986,355 @@
\setXTXcharcodes "02D23 "02D23 "010C3 % GEORGIAN SMALL LETTER WE
\setXTXcharcodes "02D24 "02D24 "010C4 % GEORGIAN SMALL LETTER HAR
\setXTXcharcodes "02D25 "02D25 "010C5 % GEORGIAN SMALL LETTER HOE
+\setXTXcharcodes "02D27 "02D27 "02D27 % GEORGIAN SMALL LETTER YN
+\setXTXcharcodes "02D2D "02D2D "02D2D % GEORGIAN SMALL LETTER AEN
+\setXTXcharcodes "0A640 "0A640 "0A640 % CYRILLIC CAPITAL LETTER ZEMLYA
+\setXTXcharcodes "0A641 "0A641 "0A641 % CYRILLIC SMALL LETTER ZEMLYA
+\setXTXcharcodes "0A642 "0A642 "0A642 % CYRILLIC CAPITAL LETTER DZELO
+\setXTXcharcodes "0A643 "0A643 "0A643 % CYRILLIC SMALL LETTER DZELO
+\setXTXcharcodes "0A644 "0A644 "0A644 % CYRILLIC CAPITAL LETTER REVERSED DZE
+\setXTXcharcodes "0A645 "0A645 "0A645 % CYRILLIC SMALL LETTER REVERSED DZE
+\setXTXcharcodes "0A646 "0A646 "0A646 % CYRILLIC CAPITAL LETTER IOTA
+\setXTXcharcodes "0A647 "0A647 "0A647 % CYRILLIC SMALL LETTER IOTA
+\setXTXcharcodes "0A648 "0A648 "0A648 % CYRILLIC CAPITAL LETTER DJERV
+\setXTXcharcodes "0A649 "0A649 "0A649 % CYRILLIC SMALL LETTER DJERV
+\setXTXcharcodes "0A64A "0A64A "0A64A % CYRILLIC CAPITAL LETTER MONOGRAPH UK
+\setXTXcharcodes "0A64B "0A64B "0A64B % CYRILLIC SMALL LETTER MONOGRAPH UK
+\setXTXcharcodes "0A64C "0A64C "0A64C % CYRILLIC CAPITAL LETTER BROAD OMEGA
+\setXTXcharcodes "0A64D "0A64D "0A64D % CYRILLIC SMALL LETTER BROAD OMEGA
+\setXTXcharcodes "0A64E "0A64E "0A64E % CYRILLIC CAPITAL LETTER NEUTRAL YER
+\setXTXcharcodes "0A64F "0A64F "0A64F % CYRILLIC SMALL LETTER NEUTRAL YER
+\setXTXcharcodes "0A650 "0A650 "0A650 % CYRILLIC CAPITAL LETTER YERU WITH BACK YER
+\setXTXcharcodes "0A651 "0A651 "0A651 % CYRILLIC SMALL LETTER YERU WITH BACK YER
+\setXTXcharcodes "0A652 "0A652 "0A652 % CYRILLIC CAPITAL LETTER IOTIFIED YAT
+\setXTXcharcodes "0A653 "0A653 "0A653 % CYRILLIC SMALL LETTER IOTIFIED YAT
+\setXTXcharcodes "0A654 "0A654 "0A654 % CYRILLIC CAPITAL LETTER REVERSED YU
+\setXTXcharcodes "0A655 "0A655 "0A655 % CYRILLIC SMALL LETTER REVERSED YU
+\setXTXcharcodes "0A656 "0A656 "0A656 % CYRILLIC CAPITAL LETTER IOTIFIED A
+\setXTXcharcodes "0A657 "0A657 "0A657 % CYRILLIC SMALL LETTER IOTIFIED A
+\setXTXcharcodes "0A658 "0A658 "0A658 % CYRILLIC CAPITAL LETTER CLOSED LITTLE YUS
+\setXTXcharcodes "0A659 "0A659 "0A659 % CYRILLIC SMALL LETTER CLOSED LITTLE YUS
+\setXTXcharcodes "0A65A "0A65A "0A65A % CYRILLIC CAPITAL LETTER BLENDED YUS
+\setXTXcharcodes "0A65B "0A65B "0A65B % CYRILLIC SMALL LETTER BLENDED YUS
+\setXTXcharcodes "0A65C "0A65C "0A65C % CYRILLIC CAPITAL LETTER IOTIFIED CLOSED LITTLE YUS
+\setXTXcharcodes "0A65D "0A65D "0A65D % CYRILLIC SMALL LETTER IOTIFIED CLOSED LITTLE YUS
+\setXTXcharcodes "0A65E "0A65E "0A65E % CYRILLIC CAPITAL LETTER YN
+\setXTXcharcodes "0A65F "0A65F "0A65F % CYRILLIC SMALL LETTER YN
+\setXTXcharcodes "0A660 "0A660 "0A660 % CYRILLIC CAPITAL LETTER REVERSED TSE
+\setXTXcharcodes "0A661 "0A661 "0A661 % CYRILLIC SMALL LETTER REVERSED TSE
+\setXTXcharcodes "0A662 "0A662 "0A662 % CYRILLIC CAPITAL LETTER SOFT DE
+\setXTXcharcodes "0A663 "0A663 "0A663 % CYRILLIC SMALL LETTER SOFT DE
+\setXTXcharcodes "0A664 "0A664 "0A664 % CYRILLIC CAPITAL LETTER SOFT EL
+\setXTXcharcodes "0A665 "0A665 "0A665 % CYRILLIC SMALL LETTER SOFT EL
+\setXTXcharcodes "0A666 "0A666 "0A666 % CYRILLIC CAPITAL LETTER SOFT EM
+\setXTXcharcodes "0A667 "0A667 "0A667 % CYRILLIC SMALL LETTER SOFT EM
+\setXTXcharcodes "0A668 "0A668 "0A668 % CYRILLIC CAPITAL LETTER MONOCULAR O
+\setXTXcharcodes "0A669 "0A669 "0A669 % CYRILLIC SMALL LETTER MONOCULAR O
+\setXTXcharcodes "0A66A "0A66A "0A66A % CYRILLIC CAPITAL LETTER BINOCULAR O
+\setXTXcharcodes "0A66B "0A66B "0A66B % CYRILLIC SMALL LETTER BINOCULAR O
+\setXTXcharcodes "0A66C "0A66C "0A66C % CYRILLIC CAPITAL LETTER DOUBLE MONOCULAR O
+\setXTXcharcodes "0A66D "0A66D "0A66D % CYRILLIC SMALL LETTER DOUBLE MONOCULAR O
+\setXTXcharcodes "0A680 "0A680 "0A680 % CYRILLIC CAPITAL LETTER DWE
+\setXTXcharcodes "0A681 "0A681 "0A681 % CYRILLIC SMALL LETTER DWE
+\setXTXcharcodes "0A682 "0A682 "0A682 % CYRILLIC CAPITAL LETTER DZWE
+\setXTXcharcodes "0A683 "0A683 "0A683 % CYRILLIC SMALL LETTER DZWE
+\setXTXcharcodes "0A684 "0A684 "0A684 % CYRILLIC CAPITAL LETTER ZHWE
+\setXTXcharcodes "0A685 "0A685 "0A685 % CYRILLIC SMALL LETTER ZHWE
+\setXTXcharcodes "0A686 "0A686 "0A686 % CYRILLIC CAPITAL LETTER CCHE
+\setXTXcharcodes "0A687 "0A687 "0A687 % CYRILLIC SMALL LETTER CCHE
+\setXTXcharcodes "0A688 "0A688 "0A688 % CYRILLIC CAPITAL LETTER DZZE
+\setXTXcharcodes "0A689 "0A689 "0A689 % CYRILLIC SMALL LETTER DZZE
+\setXTXcharcodes "0A68A "0A68A "0A68A % CYRILLIC CAPITAL LETTER TE WITH MIDDLE HOOK
+\setXTXcharcodes "0A68B "0A68B "0A68B % CYRILLIC SMALL LETTER TE WITH MIDDLE HOOK
+\setXTXcharcodes "0A68C "0A68C "0A68C % CYRILLIC CAPITAL LETTER TWE
+\setXTXcharcodes "0A68D "0A68D "0A68D % CYRILLIC SMALL LETTER TWE
+\setXTXcharcodes "0A68E "0A68E "0A68E % CYRILLIC CAPITAL LETTER TSWE
+\setXTXcharcodes "0A68F "0A68F "0A68F % CYRILLIC SMALL LETTER TSWE
+\setXTXcharcodes "0A690 "0A690 "0A690 % CYRILLIC CAPITAL LETTER TSSE
+\setXTXcharcodes "0A691 "0A691 "0A691 % CYRILLIC SMALL LETTER TSSE
+\setXTXcharcodes "0A692 "0A692 "0A692 % CYRILLIC CAPITAL LETTER TCHE
+\setXTXcharcodes "0A693 "0A693 "0A693 % CYRILLIC SMALL LETTER TCHE
+\setXTXcharcodes "0A694 "0A694 "0A694 % CYRILLIC CAPITAL LETTER HWE
+\setXTXcharcodes "0A695 "0A695 "0A695 % CYRILLIC SMALL LETTER HWE
+\setXTXcharcodes "0A696 "0A696 "0A696 % CYRILLIC CAPITAL LETTER SHWE
+\setXTXcharcodes "0A697 "0A697 "0A697 % CYRILLIC SMALL LETTER SHWE
+\setXTXcharcodes "0A698 "0A698 "0A698 % CYRILLIC CAPITAL LETTER DOUBLE O
+\setXTXcharcodes "0A699 "0A699 "0A699 % CYRILLIC SMALL LETTER DOUBLE O
+\setXTXcharcodes "0A69A "0A69A "0A69A % CYRILLIC CAPITAL LETTER CROSSED O
+\setXTXcharcodes "0A69B "0A69B "0A69B % CYRILLIC SMALL LETTER CROSSED O
+\setXTXcharcodes "0A722 "0A722 "0A722 % LATIN CAPITAL LETTER EGYPTOLOGICAL ALEF
+\setXTXcharcodes "0A723 "0A723 "0A723 % LATIN SMALL LETTER EGYPTOLOGICAL ALEF
+\setXTXcharcodes "0A724 "0A724 "0A724 % LATIN CAPITAL LETTER EGYPTOLOGICAL AIN
+\setXTXcharcodes "0A725 "0A725 "0A725 % LATIN SMALL LETTER EGYPTOLOGICAL AIN
+\setXTXcharcodes "0A726 "0A726 "0A726 % LATIN CAPITAL LETTER HENG
+\setXTXcharcodes "0A727 "0A727 "0A727 % LATIN SMALL LETTER HENG
+\setXTXcharcodes "0A728 "0A728 "0A728 % LATIN CAPITAL LETTER TZ
+\setXTXcharcodes "0A729 "0A729 "0A729 % LATIN SMALL LETTER TZ
+\setXTXcharcodes "0A72A "0A72A "0A72A % LATIN CAPITAL LETTER TRESILLO
+\setXTXcharcodes "0A72B "0A72B "0A72B % LATIN SMALL LETTER TRESILLO
+\setXTXcharcodes "0A72C "0A72C "0A72C % LATIN CAPITAL LETTER CUATRILLO
+\setXTXcharcodes "0A72D "0A72D "0A72D % LATIN SMALL LETTER CUATRILLO
+\setXTXcharcodes "0A72E "0A72E "0A72E % LATIN CAPITAL LETTER CUATRILLO WITH COMMA
+\setXTXcharcodes "0A72F "0A72F "0A72F % LATIN SMALL LETTER CUATRILLO WITH COMMA
+\setXTXcharcodes "0A730 "0A730 "0A730 % LATIN LETTER SMALL CAPITAL F
+\setXTXcharcodes "0A731 "0A731 "0A731 % LATIN LETTER SMALL CAPITAL S
+\setXTXcharcodes "0A732 "0A732 "0A732 % LATIN CAPITAL LETTER AA
+\setXTXcharcodes "0A733 "0A733 "0A733 % LATIN SMALL LETTER AA
+\setXTXcharcodes "0A734 "0A734 "0A734 % LATIN CAPITAL LETTER AO
+\setXTXcharcodes "0A735 "0A735 "0A735 % LATIN SMALL LETTER AO
+\setXTXcharcodes "0A736 "0A736 "0A736 % LATIN CAPITAL LETTER AU
+\setXTXcharcodes "0A737 "0A737 "0A737 % LATIN SMALL LETTER AU
+\setXTXcharcodes "0A738 "0A738 "0A738 % LATIN CAPITAL LETTER AV
+\setXTXcharcodes "0A739 "0A739 "0A739 % LATIN SMALL LETTER AV
+\setXTXcharcodes "0A73A "0A73A "0A73A % LATIN CAPITAL LETTER AV WITH HORIZONTAL BAR
+\setXTXcharcodes "0A73B "0A73B "0A73B % LATIN SMALL LETTER AV WITH HORIZONTAL BAR
+\setXTXcharcodes "0A73C "0A73C "0A73C % LATIN CAPITAL LETTER AY
+\setXTXcharcodes "0A73D "0A73D "0A73D % LATIN SMALL LETTER AY
+\setXTXcharcodes "0A73E "0A73E "0A73E % LATIN CAPITAL LETTER REVERSED C WITH DOT
+\setXTXcharcodes "0A73F "0A73F "0A73F % LATIN SMALL LETTER REVERSED C WITH DOT
+\setXTXcharcodes "0A740 "0A740 "0A740 % LATIN CAPITAL LETTER K WITH STROKE
+\setXTXcharcodes "0A741 "0A741 "0A741 % LATIN SMALL LETTER K WITH STROKE
+\setXTXcharcodes "0A742 "0A742 "0A742 % LATIN CAPITAL LETTER K WITH DIAGONAL STROKE
+\setXTXcharcodes "0A743 "0A743 "0A743 % LATIN SMALL LETTER K WITH DIAGONAL STROKE
+\setXTXcharcodes "0A744 "0A744 "0A744 % LATIN CAPITAL LETTER K WITH STROKE AND DIAGONAL STROKE
+\setXTXcharcodes "0A745 "0A745 "0A745 % LATIN SMALL LETTER K WITH STROKE AND DIAGONAL STROKE
+\setXTXcharcodes "0A746 "0A746 "0A746 % LATIN CAPITAL LETTER BROKEN L
+\setXTXcharcodes "0A747 "0A747 "0A747 % LATIN SMALL LETTER BROKEN L
+\setXTXcharcodes "0A748 "0A748 "0A748 % LATIN CAPITAL LETTER L WITH HIGH STROKE
+\setXTXcharcodes "0A749 "0A749 "0A749 % LATIN SMALL LETTER L WITH HIGH STROKE
+\setXTXcharcodes "0A74A "0A74A "0A74A % LATIN CAPITAL LETTER O WITH LONG STROKE OVERLAY
+\setXTXcharcodes "0A74B "0A74B "0A74B % LATIN SMALL LETTER O WITH LONG STROKE OVERLAY
+\setXTXcharcodes "0A74C "0A74C "0A74C % LATIN CAPITAL LETTER O WITH LOOP
+\setXTXcharcodes "0A74D "0A74D "0A74D % LATIN SMALL LETTER O WITH LOOP
+\setXTXcharcodes "0A74E "0A74E "0A74E % LATIN CAPITAL LETTER OO
+\setXTXcharcodes "0A74F "0A74F "0A74F % LATIN SMALL LETTER OO
+\setXTXcharcodes "0A750 "0A750 "0A750 % LATIN CAPITAL LETTER P WITH STROKE THROUGH DESCENDER
+\setXTXcharcodes "0A751 "0A751 "0A751 % LATIN SMALL LETTER P WITH STROKE THROUGH DESCENDER
+\setXTXcharcodes "0A752 "0A752 "0A752 % LATIN CAPITAL LETTER P WITH FLOURISH
+\setXTXcharcodes "0A753 "0A753 "0A753 % LATIN SMALL LETTER P WITH FLOURISH
+\setXTXcharcodes "0A754 "0A754 "0A754 % LATIN CAPITAL LETTER P WITH SQUIRREL TAIL
+\setXTXcharcodes "0A755 "0A755 "0A755 % LATIN SMALL LETTER P WITH SQUIRREL TAIL
+\setXTXcharcodes "0A756 "0A756 "0A756 % LATIN CAPITAL LETTER Q WITH STROKE THROUGH DESCENDER
+\setXTXcharcodes "0A757 "0A757 "0A757 % LATIN SMALL LETTER Q WITH STROKE THROUGH DESCENDER
+\setXTXcharcodes "0A758 "0A758 "0A758 % LATIN CAPITAL LETTER Q WITH DIAGONAL STROKE
+\setXTXcharcodes "0A759 "0A759 "0A759 % LATIN SMALL LETTER Q WITH DIAGONAL STROKE
+\setXTXcharcodes "0A75A "0A75A "0A75A % LATIN CAPITAL LETTER R ROTUNDA
+\setXTXcharcodes "0A75B "0A75B "0A75B % LATIN SMALL LETTER R ROTUNDA
+\setXTXcharcodes "0A75C "0A75C "0A75C % LATIN CAPITAL LETTER RUM ROTUNDA
+\setXTXcharcodes "0A75D "0A75D "0A75D % LATIN SMALL LETTER RUM ROTUNDA
+\setXTXcharcodes "0A75E "0A75E "0A75E % LATIN CAPITAL LETTER V WITH DIAGONAL STROKE
+\setXTXcharcodes "0A75F "0A75F "0A75F % LATIN SMALL LETTER V WITH DIAGONAL STROKE
+\setXTXcharcodes "0A760 "0A760 "0A760 % LATIN CAPITAL LETTER VY
+\setXTXcharcodes "0A761 "0A761 "0A761 % LATIN SMALL LETTER VY
+\setXTXcharcodes "0A762 "0A762 "0A762 % LATIN CAPITAL LETTER VISIGOTHIC Z
+\setXTXcharcodes "0A763 "0A763 "0A763 % LATIN SMALL LETTER VISIGOTHIC Z
+\setXTXcharcodes "0A764 "0A764 "0A764 % LATIN CAPITAL LETTER THORN WITH STROKE
+\setXTXcharcodes "0A765 "0A765 "0A765 % LATIN SMALL LETTER THORN WITH STROKE
+\setXTXcharcodes "0A766 "0A766 "0A766 % LATIN CAPITAL LETTER THORN WITH STROKE THROUGH DESCENDER
+\setXTXcharcodes "0A767 "0A767 "0A767 % LATIN SMALL LETTER THORN WITH STROKE THROUGH DESCENDER
+\setXTXcharcodes "0A768 "0A768 "0A768 % LATIN CAPITAL LETTER VEND
+\setXTXcharcodes "0A769 "0A769 "0A769 % LATIN SMALL LETTER VEND
+\setXTXcharcodes "0A76A "0A76A "0A76A % LATIN CAPITAL LETTER ET
+\setXTXcharcodes "0A76B "0A76B "0A76B % LATIN SMALL LETTER ET
+\setXTXcharcodes "0A76C "0A76C "0A76C % LATIN CAPITAL LETTER IS
+\setXTXcharcodes "0A76D "0A76D "0A76D % LATIN SMALL LETTER IS
+\setXTXcharcodes "0A76E "0A76E "0A76E % LATIN CAPITAL LETTER CON
+\setXTXcharcodes "0A76F "0A76F "0A76F % LATIN SMALL LETTER CON
+\setXTXcharcodes "0A771 "0A771 "0A771 % LATIN SMALL LETTER DUM
+\setXTXcharcodes "0A772 "0A772 "0A772 % LATIN SMALL LETTER LUM
+\setXTXcharcodes "0A773 "0A773 "0A773 % LATIN SMALL LETTER MUM
+\setXTXcharcodes "0A774 "0A774 "0A774 % LATIN SMALL LETTER NUM
+\setXTXcharcodes "0A775 "0A775 "0A775 % LATIN SMALL LETTER RUM
+\setXTXcharcodes "0A776 "0A776 "0A776 % LATIN LETTER SMALL CAPITAL RUM
+\setXTXcharcodes "0A777 "0A777 "0A777 % LATIN SMALL LETTER TUM
+\setXTXcharcodes "0A778 "0A778 "0A778 % LATIN SMALL LETTER UM
+\setXTXcharcodes "0A779 "0A779 "0A779 % LATIN CAPITAL LETTER INSULAR D
+\setXTXcharcodes "0A77A "0A77A "0A77A % LATIN SMALL LETTER INSULAR D
+\setXTXcharcodes "0A77B "0A77B "0A77B % LATIN CAPITAL LETTER INSULAR F
+\setXTXcharcodes "0A77C "0A77C "0A77C % LATIN SMALL LETTER INSULAR F
+\setXTXcharcodes "0A77D "0A77D "0A77D % LATIN CAPITAL LETTER INSULAR G
+\setXTXcharcodes "0A77E "0A77E "0A77E % LATIN CAPITAL LETTER TURNED INSULAR G
+\setXTXcharcodes "0A77F "0A77F "0A77F % LATIN SMALL LETTER TURNED INSULAR G
+\setXTXcharcodes "0A780 "0A780 "0A780 % LATIN CAPITAL LETTER TURNED L
+\setXTXcharcodes "0A781 "0A781 "0A781 % LATIN SMALL LETTER TURNED L
+\setXTXcharcodes "0A782 "0A782 "0A782 % LATIN CAPITAL LETTER INSULAR R
+\setXTXcharcodes "0A783 "0A783 "0A783 % LATIN SMALL LETTER INSULAR R
+\setXTXcharcodes "0A784 "0A784 "0A784 % LATIN CAPITAL LETTER INSULAR S
+\setXTXcharcodes "0A785 "0A785 "0A785 % LATIN SMALL LETTER INSULAR S
+\setXTXcharcodes "0A786 "0A786 "0A786 % LATIN CAPITAL LETTER INSULAR T
+\setXTXcharcodes "0A787 "0A787 "0A787 % LATIN SMALL LETTER INSULAR T
+\setXTXcharcodes "0A78B "0A78B "0A78B % LATIN CAPITAL LETTER SALTILLO
+\setXTXcharcodes "0A78C "0A78C "0A78C % LATIN SMALL LETTER SALTILLO
+\setXTXcharcodes "0A78D "0A78D "0A78D % LATIN CAPITAL LETTER TURNED H
+\setXTXcharcodes "0A78E "0A78E "0A78E % LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT
+\setXTXcharcodes "0A790 "0A790 "0A790 % LATIN CAPITAL LETTER N WITH DESCENDER
+\setXTXcharcodes "0A791 "0A791 "0A791 % LATIN SMALL LETTER N WITH DESCENDER
+\setXTXcharcodes "0A792 "0A792 "0A792 % LATIN CAPITAL LETTER C WITH BAR
+\setXTXcharcodes "0A793 "0A793 "0A793 % LATIN SMALL LETTER C WITH BAR
+\setXTXcharcodes "0A794 "0A794 "0A794 % LATIN SMALL LETTER C WITH PALATAL HOOK
+\setXTXcharcodes "0A795 "0A795 "0A795 % LATIN SMALL LETTER H WITH PALATAL HOOK
+\setXTXcharcodes "0A796 "0A796 "0A796 % LATIN CAPITAL LETTER B WITH FLOURISH
+\setXTXcharcodes "0A797 "0A797 "0A797 % LATIN SMALL LETTER B WITH FLOURISH
+\setXTXcharcodes "0A798 "0A798 "0A798 % LATIN CAPITAL LETTER F WITH STROKE
+\setXTXcharcodes "0A799 "0A799 "0A799 % LATIN SMALL LETTER F WITH STROKE
+\setXTXcharcodes "0A79A "0A79A "0A79A % LATIN CAPITAL LETTER VOLAPUK AE
+\setXTXcharcodes "0A79B "0A79B "0A79B % LATIN SMALL LETTER VOLAPUK AE
+\setXTXcharcodes "0A79C "0A79C "0A79C % LATIN CAPITAL LETTER VOLAPUK OE
+\setXTXcharcodes "0A79D "0A79D "0A79D % LATIN SMALL LETTER VOLAPUK OE
+\setXTXcharcodes "0A79E "0A79E "0A79E % LATIN CAPITAL LETTER VOLAPUK UE
+\setXTXcharcodes "0A79F "0A79F "0A79F % LATIN SMALL LETTER VOLAPUK UE
+\setXTXcharcodes "0A7A0 "0A7A0 "0A7A0 % LATIN CAPITAL LETTER G WITH OBLIQUE STROKE
+\setXTXcharcodes "0A7A1 "0A7A1 "0A7A1 % LATIN SMALL LETTER G WITH OBLIQUE STROKE
+\setXTXcharcodes "0A7A2 "0A7A2 "0A7A2 % LATIN CAPITAL LETTER K WITH OBLIQUE STROKE
+\setXTXcharcodes "0A7A3 "0A7A3 "0A7A3 % LATIN SMALL LETTER K WITH OBLIQUE STROKE
+\setXTXcharcodes "0A7A4 "0A7A4 "0A7A4 % LATIN CAPITAL LETTER N WITH OBLIQUE STROKE
+\setXTXcharcodes "0A7A5 "0A7A5 "0A7A5 % LATIN SMALL LETTER N WITH OBLIQUE STROKE
+\setXTXcharcodes "0A7A6 "0A7A6 "0A7A6 % LATIN CAPITAL LETTER R WITH OBLIQUE STROKE
+\setXTXcharcodes "0A7A7 "0A7A7 "0A7A7 % LATIN SMALL LETTER R WITH OBLIQUE STROKE
+\setXTXcharcodes "0A7A8 "0A7A8 "0A7A8 % LATIN CAPITAL LETTER S WITH OBLIQUE STROKE
+\setXTXcharcodes "0A7A9 "0A7A9 "0A7A9 % LATIN SMALL LETTER S WITH OBLIQUE STROKE
+\setXTXcharcodes "0A7AA "0A7AA "0A7AA % LATIN CAPITAL LETTER H WITH HOOK
+\setXTXcharcodes "0A7AB "0A7AB "0A7AB % LATIN CAPITAL LETTER REVERSED OPEN E
+\setXTXcharcodes "0A7AC "0A7AC "0A7AC % LATIN CAPITAL LETTER SCRIPT G
+\setXTXcharcodes "0A7AD "0A7AD "0A7AD % LATIN CAPITAL LETTER L WITH BELT
+\setXTXcharcodes "0A7B0 "0A7B0 "0A7B0 % LATIN CAPITAL LETTER TURNED K
+\setXTXcharcodes "0A7B1 "0A7B1 "0A7B1 % LATIN CAPITAL LETTER TURNED T
+\setXTXcharcodes "0A7B2 "0A7B2 "0A7B2 % LATIN CAPITAL LETTER J WITH CROSSED-TAIL
+\setXTXcharcodes "0A7B3 "0A7B3 "0A7B3 % LATIN CAPITAL LETTER CHI
+\setXTXcharcodes "0A7B4 "0A7B4 "0A7B4 % LATIN CAPITAL LETTER BETA
+\setXTXcharcodes "0A7B5 "0A7B5 "0A7B5 % LATIN SMALL LETTER BETA
+\setXTXcharcodes "0A7B6 "0A7B6 "0A7B6 % LATIN CAPITAL LETTER OMEGA
+\setXTXcharcodes "0A7B7 "0A7B7 "0A7B7 % LATIN SMALL LETTER OMEGA
+\setXTXcharcodes "0A7FA "0A7FA "0A7FA % LATIN LETTER SMALL CAPITAL TURNED M
+\setXTXcharcodes "0AB30 "0AB30 "0AB30 % LATIN SMALL LETTER BARRED ALPHA
+\setXTXcharcodes "0AB31 "0AB31 "0AB31 % LATIN SMALL LETTER A REVERSED-SCHWA
+\setXTXcharcodes "0AB32 "0AB32 "0AB32 % LATIN SMALL LETTER BLACKLETTER E
+\setXTXcharcodes "0AB33 "0AB33 "0AB33 % LATIN SMALL LETTER BARRED E
+\setXTXcharcodes "0AB34 "0AB34 "0AB34 % LATIN SMALL LETTER E WITH FLOURISH
+\setXTXcharcodes "0AB35 "0AB35 "0AB35 % LATIN SMALL LETTER LENIS F
+\setXTXcharcodes "0AB36 "0AB36 "0AB36 % LATIN SMALL LETTER SCRIPT G WITH CROSSED-TAIL
+\setXTXcharcodes "0AB37 "0AB37 "0AB37 % LATIN SMALL LETTER L WITH INVERTED LAZY S
+\setXTXcharcodes "0AB38 "0AB38 "0AB38 % LATIN SMALL LETTER L WITH DOUBLE MIDDLE TILDE
+\setXTXcharcodes "0AB39 "0AB39 "0AB39 % LATIN SMALL LETTER L WITH MIDDLE RING
+\setXTXcharcodes "0AB3A "0AB3A "0AB3A % LATIN SMALL LETTER M WITH CROSSED-TAIL
+\setXTXcharcodes "0AB3B "0AB3B "0AB3B % LATIN SMALL LETTER N WITH CROSSED-TAIL
+\setXTXcharcodes "0AB3C "0AB3C "0AB3C % LATIN SMALL LETTER ENG WITH CROSSED-TAIL
+\setXTXcharcodes "0AB3D "0AB3D "0AB3D % LATIN SMALL LETTER BLACKLETTER O
+\setXTXcharcodes "0AB3E "0AB3E "0AB3E % LATIN SMALL LETTER BLACKLETTER O WITH STROKE
+\setXTXcharcodes "0AB3F "0AB3F "0AB3F % LATIN SMALL LETTER OPEN O WITH STROKE
+\setXTXcharcodes "0AB40 "0AB40 "0AB40 % LATIN SMALL LETTER INVERTED OE
+\setXTXcharcodes "0AB41 "0AB41 "0AB41 % LATIN SMALL LETTER TURNED OE WITH STROKE
+\setXTXcharcodes "0AB42 "0AB42 "0AB42 % LATIN SMALL LETTER TURNED OE WITH HORIZONTAL STROKE
+\setXTXcharcodes "0AB43 "0AB43 "0AB43 % LATIN SMALL LETTER TURNED O OPEN-O
+\setXTXcharcodes "0AB44 "0AB44 "0AB44 % LATIN SMALL LETTER TURNED O OPEN-O WITH STROKE
+\setXTXcharcodes "0AB45 "0AB45 "0AB45 % LATIN SMALL LETTER STIRRUP R
+\setXTXcharcodes "0AB46 "0AB46 "0AB46 % LATIN LETTER SMALL CAPITAL R WITH RIGHT LEG
+\setXTXcharcodes "0AB47 "0AB47 "0AB47 % LATIN SMALL LETTER R WITHOUT HANDLE
+\setXTXcharcodes "0AB48 "0AB48 "0AB48 % LATIN SMALL LETTER DOUBLE R
+\setXTXcharcodes "0AB49 "0AB49 "0AB49 % LATIN SMALL LETTER R WITH CROSSED-TAIL
+\setXTXcharcodes "0AB4A "0AB4A "0AB4A % LATIN SMALL LETTER DOUBLE R WITH CROSSED-TAIL
+\setXTXcharcodes "0AB4B "0AB4B "0AB4B % LATIN SMALL LETTER SCRIPT R
+\setXTXcharcodes "0AB4C "0AB4C "0AB4C % LATIN SMALL LETTER SCRIPT R WITH RING
+\setXTXcharcodes "0AB4D "0AB4D "0AB4D % LATIN SMALL LETTER BASELINE ESH
+\setXTXcharcodes "0AB4E "0AB4E "0AB4E % LATIN SMALL LETTER U WITH SHORT RIGHT LEG
+\setXTXcharcodes "0AB4F "0AB4F "0AB4F % LATIN SMALL LETTER U BAR WITH SHORT RIGHT LEG
+\setXTXcharcodes "0AB50 "0AB50 "0AB50 % LATIN SMALL LETTER UI
+\setXTXcharcodes "0AB51 "0AB51 "0AB51 % LATIN SMALL LETTER TURNED UI
+\setXTXcharcodes "0AB52 "0AB52 "0AB52 % LATIN SMALL LETTER U WITH LEFT HOOK
+\setXTXcharcodes "0AB53 "0AB53 "0AB53 % LATIN SMALL LETTER CHI
+\setXTXcharcodes "0AB54 "0AB54 "0AB54 % LATIN SMALL LETTER CHI WITH LOW RIGHT RING
+\setXTXcharcodes "0AB55 "0AB55 "0AB55 % LATIN SMALL LETTER CHI WITH LOW LEFT SERIF
+\setXTXcharcodes "0AB56 "0AB56 "0AB56 % LATIN SMALL LETTER X WITH LOW RIGHT RING
+\setXTXcharcodes "0AB57 "0AB57 "0AB57 % LATIN SMALL LETTER X WITH LONG LEFT LEG
+\setXTXcharcodes "0AB58 "0AB58 "0AB58 % LATIN SMALL LETTER X WITH LONG LEFT LEG AND LOW RIGHT RING
+\setXTXcharcodes "0AB59 "0AB59 "0AB59 % LATIN SMALL LETTER X WITH LONG LEFT LEG WITH SERIF
+\setXTXcharcodes "0AB5A "0AB5A "0AB5A % LATIN SMALL LETTER Y WITH SHORT RIGHT LEG
+\setXTXcharcodes "0AB60 "0AB60 "0AB60 % LATIN SMALL LETTER SAKHA YAT
+\setXTXcharcodes "0AB61 "0AB61 "0AB61 % LATIN SMALL LETTER IOTIFIED E
+\setXTXcharcodes "0AB62 "0AB62 "0AB62 % LATIN SMALL LETTER OPEN OE
+\setXTXcharcodes "0AB63 "0AB63 "0AB63 % LATIN SMALL LETTER UO
+\setXTXcharcodes "0AB64 "0AB64 "0AB64 % LATIN SMALL LETTER INVERTED ALPHA
+\setXTXcharcodes "0AB65 "0AB65 "0AB65 % GREEK LETTER SMALL CAPITAL OMEGA
+\setXTXcharcodes "0AB70 "0AB70 "0AB70 % CHEROKEE SMALL LETTER A
+\setXTXcharcodes "0AB71 "0AB71 "0AB71 % CHEROKEE SMALL LETTER E
+\setXTXcharcodes "0AB72 "0AB72 "0AB72 % CHEROKEE SMALL LETTER I
+\setXTXcharcodes "0AB73 "0AB73 "0AB73 % CHEROKEE SMALL LETTER O
+\setXTXcharcodes "0AB74 "0AB74 "0AB74 % CHEROKEE SMALL LETTER U
+\setXTXcharcodes "0AB75 "0AB75 "0AB75 % CHEROKEE SMALL LETTER V
+\setXTXcharcodes "0AB76 "0AB76 "0AB76 % CHEROKEE SMALL LETTER GA
+\setXTXcharcodes "0AB77 "0AB77 "0AB77 % CHEROKEE SMALL LETTER KA
+\setXTXcharcodes "0AB78 "0AB78 "0AB78 % CHEROKEE SMALL LETTER GE
+\setXTXcharcodes "0AB79 "0AB79 "0AB79 % CHEROKEE SMALL LETTER GI
+\setXTXcharcodes "0AB7A "0AB7A "0AB7A % CHEROKEE SMALL LETTER GO
+\setXTXcharcodes "0AB7B "0AB7B "0AB7B % CHEROKEE SMALL LETTER GU
+\setXTXcharcodes "0AB7C "0AB7C "0AB7C % CHEROKEE SMALL LETTER GV
+\setXTXcharcodes "0AB7D "0AB7D "0AB7D % CHEROKEE SMALL LETTER HA
+\setXTXcharcodes "0AB7E "0AB7E "0AB7E % CHEROKEE SMALL LETTER HE
+\setXTXcharcodes "0AB7F "0AB7F "0AB7F % CHEROKEE SMALL LETTER HI
+\setXTXcharcodes "0AB80 "0AB80 "0AB80 % CHEROKEE SMALL LETTER HO
+\setXTXcharcodes "0AB81 "0AB81 "0AB81 % CHEROKEE SMALL LETTER HU
+\setXTXcharcodes "0AB82 "0AB82 "0AB82 % CHEROKEE SMALL LETTER HV
+\setXTXcharcodes "0AB83 "0AB83 "0AB83 % CHEROKEE SMALL LETTER LA
+\setXTXcharcodes "0AB84 "0AB84 "0AB84 % CHEROKEE SMALL LETTER LE
+\setXTXcharcodes "0AB85 "0AB85 "0AB85 % CHEROKEE SMALL LETTER LI
+\setXTXcharcodes "0AB86 "0AB86 "0AB86 % CHEROKEE SMALL LETTER LO
+\setXTXcharcodes "0AB87 "0AB87 "0AB87 % CHEROKEE SMALL LETTER LU
+\setXTXcharcodes "0AB88 "0AB88 "0AB88 % CHEROKEE SMALL LETTER LV
+\setXTXcharcodes "0AB89 "0AB89 "0AB89 % CHEROKEE SMALL LETTER MA
+\setXTXcharcodes "0AB8A "0AB8A "0AB8A % CHEROKEE SMALL LETTER ME
+\setXTXcharcodes "0AB8B "0AB8B "0AB8B % CHEROKEE SMALL LETTER MI
+\setXTXcharcodes "0AB8C "0AB8C "0AB8C % CHEROKEE SMALL LETTER MO
+\setXTXcharcodes "0AB8D "0AB8D "0AB8D % CHEROKEE SMALL LETTER MU
+\setXTXcharcodes "0AB8E "0AB8E "0AB8E % CHEROKEE SMALL LETTER NA
+\setXTXcharcodes "0AB8F "0AB8F "0AB8F % CHEROKEE SMALL LETTER HNA
+\setXTXcharcodes "0AB90 "0AB90 "0AB90 % CHEROKEE SMALL LETTER NAH
+\setXTXcharcodes "0AB91 "0AB91 "0AB91 % CHEROKEE SMALL LETTER NE
+\setXTXcharcodes "0AB92 "0AB92 "0AB92 % CHEROKEE SMALL LETTER NI
+\setXTXcharcodes "0AB93 "0AB93 "0AB93 % CHEROKEE SMALL LETTER NO
+\setXTXcharcodes "0AB94 "0AB94 "0AB94 % CHEROKEE SMALL LETTER NU
+\setXTXcharcodes "0AB95 "0AB95 "0AB95 % CHEROKEE SMALL LETTER NV
+\setXTXcharcodes "0AB96 "0AB96 "0AB96 % CHEROKEE SMALL LETTER QUA
+\setXTXcharcodes "0AB97 "0AB97 "0AB97 % CHEROKEE SMALL LETTER QUE
+\setXTXcharcodes "0AB98 "0AB98 "0AB98 % CHEROKEE SMALL LETTER QUI
+\setXTXcharcodes "0AB99 "0AB99 "0AB99 % CHEROKEE SMALL LETTER QUO
+\setXTXcharcodes "0AB9A "0AB9A "0AB9A % CHEROKEE SMALL LETTER QUU
+\setXTXcharcodes "0AB9B "0AB9B "0AB9B % CHEROKEE SMALL LETTER QUV
+\setXTXcharcodes "0AB9C "0AB9C "0AB9C % CHEROKEE SMALL LETTER SA
+\setXTXcharcodes "0AB9D "0AB9D "0AB9D % CHEROKEE SMALL LETTER S
+\setXTXcharcodes "0AB9E "0AB9E "0AB9E % CHEROKEE SMALL LETTER SE
+\setXTXcharcodes "0AB9F "0AB9F "0AB9F % CHEROKEE SMALL LETTER SI
+\setXTXcharcodes "0ABA0 "0ABA0 "0ABA0 % CHEROKEE SMALL LETTER SO
+\setXTXcharcodes "0ABA1 "0ABA1 "0ABA1 % CHEROKEE SMALL LETTER SU
+\setXTXcharcodes "0ABA2 "0ABA2 "0ABA2 % CHEROKEE SMALL LETTER SV
+\setXTXcharcodes "0ABA3 "0ABA3 "0ABA3 % CHEROKEE SMALL LETTER DA
+\setXTXcharcodes "0ABA4 "0ABA4 "0ABA4 % CHEROKEE SMALL LETTER TA
+\setXTXcharcodes "0ABA5 "0ABA5 "0ABA5 % CHEROKEE SMALL LETTER DE
+\setXTXcharcodes "0ABA6 "0ABA6 "0ABA6 % CHEROKEE SMALL LETTER TE
+\setXTXcharcodes "0ABA7 "0ABA7 "0ABA7 % CHEROKEE SMALL LETTER DI
+\setXTXcharcodes "0ABA8 "0ABA8 "0ABA8 % CHEROKEE SMALL LETTER TI
+\setXTXcharcodes "0ABA9 "0ABA9 "0ABA9 % CHEROKEE SMALL LETTER DO
+\setXTXcharcodes "0ABAA "0ABAA "0ABAA % CHEROKEE SMALL LETTER DU
+\setXTXcharcodes "0ABAB "0ABAB "0ABAB % CHEROKEE SMALL LETTER DV
+\setXTXcharcodes "0ABAC "0ABAC "0ABAC % CHEROKEE SMALL LETTER DLA
+\setXTXcharcodes "0ABAD "0ABAD "0ABAD % CHEROKEE SMALL LETTER TLA
+\setXTXcharcodes "0ABAE "0ABAE "0ABAE % CHEROKEE SMALL LETTER TLE
+\setXTXcharcodes "0ABAF "0ABAF "0ABAF % CHEROKEE SMALL LETTER TLI
+\setXTXcharcodes "0ABB0 "0ABB0 "0ABB0 % CHEROKEE SMALL LETTER TLO
+\setXTXcharcodes "0ABB1 "0ABB1 "0ABB1 % CHEROKEE SMALL LETTER TLU
+\setXTXcharcodes "0ABB2 "0ABB2 "0ABB2 % CHEROKEE SMALL LETTER TLV
+\setXTXcharcodes "0ABB3 "0ABB3 "0ABB3 % CHEROKEE SMALL LETTER TSA
+\setXTXcharcodes "0ABB4 "0ABB4 "0ABB4 % CHEROKEE SMALL LETTER TSE
+\setXTXcharcodes "0ABB5 "0ABB5 "0ABB5 % CHEROKEE SMALL LETTER TSI
+\setXTXcharcodes "0ABB6 "0ABB6 "0ABB6 % CHEROKEE SMALL LETTER TSO
+\setXTXcharcodes "0ABB7 "0ABB7 "0ABB7 % CHEROKEE SMALL LETTER TSU
+\setXTXcharcodes "0ABB8 "0ABB8 "0ABB8 % CHEROKEE SMALL LETTER TSV
+\setXTXcharcodes "0ABB9 "0ABB9 "0ABB9 % CHEROKEE SMALL LETTER WA
+\setXTXcharcodes "0ABBA "0ABBA "0ABBA % CHEROKEE SMALL LETTER WE
+\setXTXcharcodes "0ABBB "0ABBB "0ABBB % CHEROKEE SMALL LETTER WI
+\setXTXcharcodes "0ABBC "0ABBC "0ABBC % CHEROKEE SMALL LETTER WO
+\setXTXcharcodes "0ABBD "0ABBD "0ABBD % CHEROKEE SMALL LETTER WU
+\setXTXcharcodes "0ABBE "0ABBE "0ABBE % CHEROKEE SMALL LETTER WV
+\setXTXcharcodes "0ABBF "0ABBF "0ABBF % CHEROKEE SMALL LETTER YA
\setXTXcharcodes "0FB00 "0FB00 "0FB00 % LATIN SMALL LIGATURE FF
\setXTXcharcodes "0FB01 "0FB01 "0FB01 % LATIN SMALL LIGATURE FI
\setXTXcharcodes "0FB02 "0FB02 "0FB02 % LATIN SMALL LIGATURE FL
@@ -1976,10 +2400,6 @@
\setXTXcharcodes "0FF59 "0FF59 "0FF39 % FULLWIDTH LATIN SMALL LETTER Y
\setXTXcharcodes "0FF5A "0FF5A "0FF3A % FULLWIDTH LATIN SMALL LETTER Z
-\dofastrecurse{"03400}{"04DB5}{1}{\dosetXTXcharcodes\recurselevel\recurselevel\recurselevel}
-\dofastrecurse{"04E00}{"09FBB}{1}{\dosetXTXcharcodes\recurselevel\recurselevel\recurselevel}
-\dofastrecurse{"0AC00}{"0D7A3}{1}{\dosetXTXcharcodes\recurselevel\recurselevel\recurselevel}
-\dofastrecurse{"20000}{"2A6D6}{1}{\dosetXTXcharcodes\recurselevel\recurselevel\recurselevel}
% patch needed for turkish
@@ -1988,7 +2408,7 @@
% patch needed for french
-% \setXTXcharcodes "0027 "0027 "0027
\setXTXcharcodes "2019 "2019 "2019
+
\endinput
diff --git a/Master/texmf-dist/tex/context/base/xtag-cml.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-cml.mkii
index 6da7fd26f87..6da7fd26f87 100644
--- a/Master/texmf-dist/tex/context/base/xtag-cml.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-cml.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-ent.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-ent.mkii
index 09051d0b435..09051d0b435 100644
--- a/Master/texmf-dist/tex/context/base/xtag-ent.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-ent.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-exp.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-exp.mkii
index 9ecfcc5b124..9ecfcc5b124 100644
--- a/Master/texmf-dist/tex/context/base/xtag-exp.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-exp.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-ext.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-ext.mkii
index 60615b1c241..60615b1c241 100644
--- a/Master/texmf-dist/tex/context/base/xtag-ext.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-ext.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-hyp.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-hyp.mkii
index 105f1a1e373..105f1a1e373 100644
--- a/Master/texmf-dist/tex/context/base/xtag-hyp.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-hyp.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-ini.mkii
index ce3cbacd0b1..ce3cbacd0b1 100644
--- a/Master/texmf-dist/tex/context/base/xtag-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-ini.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-map.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-map.mkii
index 4f639bf0183..4f639bf0183 100644
--- a/Master/texmf-dist/tex/context/base/xtag-map.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-map.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-mea.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-mea.mkii
index d56d6c54ba9..d56d6c54ba9 100644
--- a/Master/texmf-dist/tex/context/base/xtag-mea.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-mea.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-meb.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-meb.mkii
index ba370cadf94..ba370cadf94 100644
--- a/Master/texmf-dist/tex/context/base/xtag-meb.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-meb.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-mec.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-mec.mkii
index 9e941897c61..9e941897c61 100644
--- a/Master/texmf-dist/tex/context/base/xtag-mec.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-mec.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-meh.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-meh.mkii
index 1636f2a2b9d..1636f2a2b9d 100644
--- a/Master/texmf-dist/tex/context/base/xtag-meh.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-meh.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-men.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-men.mkii
index d548c83940e..d548c83940e 100644
--- a/Master/texmf-dist/tex/context/base/xtag-men.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-men.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-meo.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-meo.mkii
index f19f80fbe30..f19f80fbe30 100644
--- a/Master/texmf-dist/tex/context/base/xtag-meo.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-meo.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-mer.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-mer.mkii
index becff584a9c..becff584a9c 100644
--- a/Master/texmf-dist/tex/context/base/xtag-mer.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-mer.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-mmc.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-mmc.mkii
index 9da7fef8411..9da7fef8411 100644
--- a/Master/texmf-dist/tex/context/base/xtag-mmc.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-mmc.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-mml.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-mml.mkii
index f948128fa5e..f948128fa5e 100644
--- a/Master/texmf-dist/tex/context/base/xtag-mml.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-mml.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-mmp.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-mmp.mkii
index 93f0a1504db..93f0a1504db 100644
--- a/Master/texmf-dist/tex/context/base/xtag-mmp.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-mmp.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-mxa.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-mxa.mkii
index 5e83367df79..5e83367df79 100644
--- a/Master/texmf-dist/tex/context/base/xtag-mxa.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-mxa.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-mxb.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-mxb.mkii
index c325a9e4493..c325a9e4493 100644
--- a/Master/texmf-dist/tex/context/base/xtag-mxb.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-mxb.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-mxc.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-mxc.mkii
index e692f2a249b..e692f2a249b 100644
--- a/Master/texmf-dist/tex/context/base/xtag-mxc.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-mxc.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-mxh.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-mxh.mkii
index 3cf0103c804..3cf0103c804 100644
--- a/Master/texmf-dist/tex/context/base/xtag-mxh.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-mxh.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-mxn.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-mxn.mkii
index 35eeade9a1a..35eeade9a1a 100644
--- a/Master/texmf-dist/tex/context/base/xtag-mxn.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-mxn.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-mxo.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-mxo.mkii
index 045b4f40696..045b4f40696 100644
--- a/Master/texmf-dist/tex/context/base/xtag-mxo.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-mxo.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-mxr.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-mxr.mkii
index ed1498f8137..ed1498f8137 100644
--- a/Master/texmf-dist/tex/context/base/xtag-mxr.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-mxr.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-pml.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-pml.mkii
index a0930b63428..a0930b63428 100644
--- a/Master/texmf-dist/tex/context/base/xtag-pml.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-pml.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-pmu.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-pmu.mkii
index 5c7c9a8f61a..5c7c9a8f61a 100644
--- a/Master/texmf-dist/tex/context/base/xtag-pmu.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-pmu.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-pre.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-pre.mkii
index 5e75197b76b..5e75197b76b 100644
--- a/Master/texmf-dist/tex/context/base/xtag-pre.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-pre.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-prs.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-prs.mkii
index 8728d992a47..8728d992a47 100644
--- a/Master/texmf-dist/tex/context/base/xtag-prs.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-prs.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-raw.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-raw.mkii
index aab294c5adb..aab294c5adb 100644
--- a/Master/texmf-dist/tex/context/base/xtag-raw.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-raw.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-rng.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-rng.mkii
index 4b9dcfaf156..4b9dcfaf156 100644
--- a/Master/texmf-dist/tex/context/base/xtag-rng.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-rng.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-run.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-run.mkii
index 65424650c0f..65424650c0f 100644
--- a/Master/texmf-dist/tex/context/base/xtag-run.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-run.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-stk.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-stk.mkii
index d454a63ca8d..d454a63ca8d 100644
--- a/Master/texmf-dist/tex/context/base/xtag-stk.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-stk.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-utf.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-utf.mkii
index b58fbbe88b6..b58fbbe88b6 100644
--- a/Master/texmf-dist/tex/context/base/xtag-utf.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-utf.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-xsd.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-xsd.mkii
index c1f4b91b649..c1f4b91b649 100644
--- a/Master/texmf-dist/tex/context/base/xtag-xsd.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-xsd.mkii
diff --git a/Master/texmf-dist/tex/context/base/xtag-xsl.mkii b/Master/texmf-dist/tex/context/base/mkii/xtag-xsl.mkii
index 49767e30c79..49767e30c79 100644
--- a/Master/texmf-dist/tex/context/base/xtag-xsl.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/xtag-xsl.mkii
diff --git a/Master/texmf-dist/tex/context/base/anch-bar.mkiv b/Master/texmf-dist/tex/context/base/mkiv/anch-bar.mkiv
index b5df21a0797..b5df21a0797 100644
--- a/Master/texmf-dist/tex/context/base/anch-bar.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/anch-bar.mkiv
diff --git a/Master/texmf-dist/tex/context/base/anch-bck.mkvi b/Master/texmf-dist/tex/context/base/mkiv/anch-bck.mkvi
index 273cf015968..ee392f11474 100644
--- a/Master/texmf-dist/tex/context/base/anch-bck.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/anch-bck.mkvi
@@ -256,7 +256,6 @@
%
\usetextbackgroundstyleandcolor\c!style\c!color
\nowhitespace
- \nobreak % new per 23/04/2006 (else potential break when whitespace)
\seteffectivehsize
\doinhibitblank % \blank[\v!disable]% new
\par}
diff --git a/Master/texmf-dist/tex/context/base/anch-pgr.lua b/Master/texmf-dist/tex/context/base/mkiv/anch-pgr.lua
index b5c2ae6280a..b5c2ae6280a 100644
--- a/Master/texmf-dist/tex/context/base/anch-pgr.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/anch-pgr.lua
diff --git a/Master/texmf-dist/tex/context/base/anch-pgr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/anch-pgr.mkiv
index 56ff656d96d..a7ad26dff7f 100644
--- a/Master/texmf-dist/tex/context/base/anch-pgr.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/anch-pgr.mkiv
@@ -256,14 +256,15 @@
\def\MPoverlayanchor#1{\MPpos\MPanchorid}
\def\anch_positions_overlay_compose
- {\vbox to \d_overlay_height
+ {\vpack to \d_overlay_height
{%\writestatus{!!!}{\currentpositionoverlay/\MPanchoridentifier/\MPanchornumber}%
\edef\MPanchorid{\currentpositionoverlay::\MPanchoridentifier:\MPanchornumber}% realpageno
% \edef\MPanchor##1{\MPpos\MPanchorid}%
\let\MPanchor\MPoverlayanchor % no need to fetch it already, seldom used
\the\everyinsertpositionaction
\copyposition{\currentpositionoverlay::\MPanchoridentifier}\MPanchorid
- \setbox\scratchbox\hbox to \d_overlay_width{\dopositionaction{\currentpositionoverlay::\MPanchoridentifier}\hss}%
+ \setbox\scratchbox\hbox to \d_overlay_width
+ {\dopositionaction{\currentpositionoverlay::\MPanchoridentifier}\hss}%
\ht\scratchbox\d_overlay_height
\dp\scratchbox\zeropoint
\anch_mark_tagged_box\scratchbox\MPanchorid % needs an hbox
@@ -289,12 +290,13 @@
\endgroup}
\def\anch_positions_region_overlay_compose
- {\vbox to \d_overlay_height
+ {\vpack to \d_overlay_height
{\let\MPanchorid\currentpositionregion
\let\MPanchor\MPoverlayanchor % no need to fetch it already, seldom used
\the\everyinsertpositionaction
\copyposition{\currentpositionoverlay::\MPanchoridentifier}\MPanchorid
- \setbox\scratchbox\hbox to \d_overlay_width{\dopositionaction{\currentpositionoverlay::\MPanchoridentifier}\hss}%
+ \setbox\scratchbox\hbox to \d_overlay_width
+ {\dopositionaction{\currentpositionoverlay::\MPanchoridentifier}\hss}%
\ht\scratchbox\d_overlay_height
\dp\scratchbox\zeropoint
\box\scratchbox
@@ -411,7 +413,8 @@
\anch_positions_meta_graphic_prepare
\obeyMPboxorigin % do we also set the size ? when needed this must be done in mp ... might change
\def\anch_positions_meta_graphic_direct{\anch_positions_meta_graphic_nested{#3}}% takes two extra arguments
- \setbox\b_anch_positions_graphic\hbox{\ignorespaces\csname#1#2\endcsname\removelastspace}%
+ \setbox\b_anch_positions_graphic\hbox
+ {\ignorespaces\csname#1#2\endcsname\removelastspace}%
\smashbox\b_anch_positions_graphic
\box\b_anch_positions_graphic
\endgroup}
@@ -421,7 +424,7 @@
\setupMPvariables[#2][#1,#3]%
\edef\currentmpvariableclass{#2}%
\anch_positions_meta_graphic_prepare
- \getvalue{\??positiongraphic#2}%
+ \csname\??positiongraphic#2\endcsname
\endgroup}%
\def\startMPpositionmethod#1#2\stopMPpositionmethod
diff --git a/Master/texmf-dist/tex/context/base/anch-pos.lua b/Master/texmf-dist/tex/context/base/mkiv/anch-pos.lua
index 77e36e85ece..c01e9017976 100644
--- a/Master/texmf-dist/tex/context/base/anch-pos.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/anch-pos.lua
@@ -55,7 +55,9 @@ local nuts = nodes.nuts
local getfield = nuts.getfield
local setfield = nuts.setfield
+local setlink = nuts.setlink
local getlist = nuts.getlist
+local setlist = nuts.setlist
local getbox = nuts.getbox
local getskip = nuts.getskip
@@ -444,15 +446,12 @@ local function markregionbox(n,tag,correct)
local head = getlist(box)
if head then
local tail = find_tail(head)
- setfield(head,"prev",push)
- setfield(push,"next",head)
- setfield(pop,"prev",tail)
- setfield(tail,"next",pop)
+ setlink(push,head)
+ setlink(tail,pop)
else -- we can have a simple push/pop
- setfield(push,"next",pop)
- setfield(pop,"prev",push)
+ setlink(push,pop)
end
- setfield(box,"list",push)
+ setlist(box,push)
end
jobpositions.markregionbox = markregionbox
diff --git a/Master/texmf-dist/tex/context/base/anch-pos.mkiv b/Master/texmf-dist/tex/context/base/mkiv/anch-pos.mkiv
index 5d9c2fd3478..5d9c2fd3478 100644
--- a/Master/texmf-dist/tex/context/base/anch-pos.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/anch-pos.mkiv
diff --git a/Master/texmf-dist/tex/context/base/anch-snc.mkiv b/Master/texmf-dist/tex/context/base/mkiv/anch-snc.mkiv
index 27769fbf935..d0d3a58d1f3 100644
--- a/Master/texmf-dist/tex/context/base/anch-snc.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/anch-snc.mkiv
@@ -60,7 +60,7 @@
\global\advance\csname\s!num:\s!syncpos:#1\endcsname\plusone
\setsyncpositions{#1}%
% option: geen w/h, alleen p 0 0 0 data
- \setpositionplus{\s!syncpos:#1:\the\csname\s!num:\s!syncpos:#1\endcsname}{#2}\hbox{\strut}%
+ \setpositionplus{\s!syncpos:#1:\the\csname\s!num:\s!syncpos:#1\endcsname}{#2}\hpack{\strut}%
\else
\strut
\fi}
diff --git a/Master/texmf-dist/tex/context/base/anch-tab.mkiv b/Master/texmf-dist/tex/context/base/mkiv/anch-tab.mkiv
index da735b49de5..7e0116cbff6 100644
--- a/Master/texmf-dist/tex/context/base/anch-tab.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/anch-tab.mkiv
@@ -184,7 +184,7 @@
\def\tabulateEQpos
{\setbox\scratchbox\hbox{\tabulateEQ}%
- \hbox to \wd\scratchbox{\hss\kern\zeropoint\tabulatepos\hss}%
+ \hbox to \wd\scratchbox{\hss\kern\zeropoint\tabulatepos\hss}% hpack
\kern-\wd\scratchbox
\box\scratchbox}
@@ -371,11 +371,11 @@
\dodoubleempty\anch_framed_indeed}
\def\anch_framed_indeed[#1][#2]%
- {\setbox\scratchbox\hbox
+ {\setbox\scratchbox\hpack
{\scratchwidth \dimexpr\MPx{e:#1}-\MPx{b:#1}\relax
\scratchdepth \dimexpr\MPy{b:#1}-\MPy{e:#1}+\MPd{e:#1}\relax
\scratchheight\dimexpr\scratchdepth+\MPh{b:#1}\relax
- \lower\scratchdepth\hbox
+ \lower\scratchdepth\hpack
{\framed[\c!width=\scratchwidth,\c!height=\scratchheight,\c!offset=\v!overlay,#2]{}}}%
\smashedbox\scratchbox
\egroup}
diff --git a/Master/texmf-dist/tex/context/base/attr-col.lua b/Master/texmf-dist/tex/context/base/mkiv/attr-col.lua
index b5fac9c2d1b..6b11333a7b9 100644
--- a/Master/texmf-dist/tex/context/base/attr-col.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/attr-col.lua
@@ -583,5 +583,5 @@ implement { name = "enabletransparency", onlyonce = true, actions = transparenci
implement { name = "enablecolorintents", onlyonce = true, actions = colorintents.enable }
--------- { name = "registercolor", actions = { colors .register, context }, arguments = "string" }
---------- { name = "registertransparency", actions = { transparencies.register, context }, arguments = { ... } }
-implement { name = "registercolorintent", actions = { colorintents .register, context }, arguments = { ... } }
+--------- { name = "registertransparency", actions = { transparencies.register, context }, arguments = "string" }
+implement { name = "registercolorintent", actions = { colorintents .register, context }, arguments = "string" }
diff --git a/Master/texmf-dist/tex/context/base/attr-col.mkiv b/Master/texmf-dist/tex/context/base/mkiv/attr-col.mkiv
index 6231755e914..6231755e914 100644
--- a/Master/texmf-dist/tex/context/base/attr-col.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/attr-col.mkiv
diff --git a/Master/texmf-dist/tex/context/base/attr-eff.lua b/Master/texmf-dist/tex/context/base/mkiv/attr-eff.lua
index ff41e12de70..ff41e12de70 100644
--- a/Master/texmf-dist/tex/context/base/attr-eff.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/attr-eff.lua
diff --git a/Master/texmf-dist/tex/context/base/attr-eff.mkiv b/Master/texmf-dist/tex/context/base/mkiv/attr-eff.mkiv
index bec8687ead5..859814ebc23 100644
--- a/Master/texmf-dist/tex/context/base/attr-eff.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/attr-eff.mkiv
@@ -29,7 +29,7 @@
\appendtoks
\edef\p_method{\effectparameter\c!method}%
- \ifx\p_method\v!method
+ \ifx\p_method\v!command
\setuxvalue{\e!start\currenteffect}{\starteffect[#1]}%
\setuxvalue{\e!stop \currenteffect}{\stopeffect}%
\fi
diff --git a/Master/texmf-dist/tex/context/base/attr-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/attr-ini.lua
index df7404d11b0..df7404d11b0 100644
--- a/Master/texmf-dist/tex/context/base/attr-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/attr-ini.lua
diff --git a/Master/texmf-dist/tex/context/base/attr-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/attr-ini.mkiv
index c6b798d18e3..3f0b7fb27e7 100644
--- a/Master/texmf-dist/tex/context/base/attr-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/attr-ini.mkiv
@@ -52,19 +52,21 @@
\def\attr_basics_define_system{\attr_basics_define_indeed\s!private}
\def\attr_basics_define_indeed#1[#2][#3]%
- {\scratchcounter\clf_defineattribute{#2}{#1}\relax
- %\writestatus\m!system{defining #1 attribute #2 with number \number\scratchcounter}%
- \expandafter\attributedef\csname\??attributecount#2\endcsname\scratchcounter
- \expandafter\newconstant \csname\??attributeid#2\endcsname
- \csname\??attributeid#2\endcsname\scratchcounter
- % some attributes are always global
- \doifnotinset\s!global{#3}{\appendetoks\csname\??attributecount#2\endcsname\attributeunsetvalue\to\attributesresetlist}%
- % here public means 'visible' so it's not to be confused with 'public' at the lua end
- \doifinset \s!public{#3}{\expandafter\let\csname#2\s!attribute\expandafter\endcsname\csname\??attributeid#2\endcsname}}
+ {\ifcsname\??attributecount#2\endcsname\else
+ \scratchcounter\clf_defineattribute{#2}{#1}\relax
+ %\writestatus\m!system{defining #1 attribute #2 with number \number\scratchcounter}%
+ \expandafter\attributedef\csname\??attributecount#2\endcsname\scratchcounter
+ \expandafter\newconstant \csname\??attributeid#2\endcsname
+ \csname\??attributeid#2\endcsname\scratchcounter
+ % some attributes are always global
+ \doifnotinset\s!global{#3}{\appendetoks\csname\??attributecount#2\endcsname\attributeunsetvalue\to\attributesresetlist}%
+ % here public means 'visible' so it's not to be confused with 'public' at the lua end
+ \doifinset \s!public{#3}{\expandafter\let\csname#2\s!attribute\expandafter\endcsname\csname\??attributeid#2\endcsname}%
+ \fi}
\unexpanded\def\newattribute#1%
- {\attr_basics_define_indeed\s!public[\strippedcsname#1][]%
- \expandafter\let\expandafter#1\csname\??attributeid\strippedcsname#1\endcsname}
+ {\attr_basics_define_indeed\s!public[\csstring#1][]%
+ \expandafter\let\expandafter#1\csname\??attributeid\csstring#1\endcsname}
% expandable so we can \edef them for speed
@@ -108,3 +110,19 @@
\unexpanded\def\showattributes{\clf_showattributes}
\protect \endinput
+
+% for the luatex list:
+%
+% \attributedef\zeroattribute=0
+% \attributedef\someatriubute=999
+%
+% \directlua {
+% local createtoken = newtoken.create
+% function attributenumber(name)
+% local n = createtoken(name).mode - createtoken("zeroattribute").mode
+% return n >= 0 and n or false
+% end
+% }
+%
+% \directlua{print(attributenumber("noneattribute"))}
+% \directlua{print(attributenumber("someattribute"))}
diff --git a/Master/texmf-dist/tex/context/base/attr-lay.lua b/Master/texmf-dist/tex/context/base/mkiv/attr-lay.lua
index 0d43979c813..0d43979c813 100644
--- a/Master/texmf-dist/tex/context/base/attr-lay.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/attr-lay.lua
diff --git a/Master/texmf-dist/tex/context/base/attr-lay.mkiv b/Master/texmf-dist/tex/context/base/mkiv/attr-lay.mkiv
index 14ef4a6d40f..14ef4a6d40f 100644
--- a/Master/texmf-dist/tex/context/base/attr-lay.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/attr-lay.mkiv
diff --git a/Master/texmf-dist/tex/context/base/attr-mkr.lua b/Master/texmf-dist/tex/context/base/mkiv/attr-mkr.lua
index 976598fa013..976598fa013 100644
--- a/Master/texmf-dist/tex/context/base/attr-mkr.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/attr-mkr.lua
diff --git a/Master/texmf-dist/tex/context/base/attr-mkr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/attr-mkr.mkiv
index c8818ebae7e..c8818ebae7e 100644
--- a/Master/texmf-dist/tex/context/base/attr-mkr.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/attr-mkr.mkiv
diff --git a/Master/texmf-dist/tex/context/base/attr-neg.lua b/Master/texmf-dist/tex/context/base/mkiv/attr-neg.lua
index 1347c3d1ad8..1347c3d1ad8 100644
--- a/Master/texmf-dist/tex/context/base/attr-neg.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/attr-neg.lua
diff --git a/Master/texmf-dist/tex/context/base/attr-neg.mkiv b/Master/texmf-dist/tex/context/base/mkiv/attr-neg.mkiv
index ff1f52a96b4..ff1f52a96b4 100644
--- a/Master/texmf-dist/tex/context/base/attr-neg.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/attr-neg.mkiv
diff --git a/Master/texmf-dist/tex/context/base/back-exp.lua b/Master/texmf-dist/tex/context/base/mkiv/back-exp.lua
index 33b6aa1e8ea..681996d4802 100644
--- a/Master/texmf-dist/tex/context/base/back-exp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/back-exp.lua
@@ -19,7 +19,6 @@ if not modules then modules = { } end modules ['back-exp'] = {
-- tocs/registers -> maybe add a stripper (i.e. just don't flush entries in final tree)
-- footnotes -> css 3
-- bodyfont -> in styles.css
--- delimited -> left/right string (needs marking)
-- Because we need to look ahead we now always build a tree (this was optional in
-- the beginning). The extra overhead in the frontend is neglectable.
@@ -35,11 +34,11 @@ if not modules then modules = { } end modules ['back-exp'] = {
-- check setting __i__
local next, type, tonumber = next, type, tonumber
-local concat, sub, gsub = table.concat, string.sub, string.gsub
+local sub, gsub = string.sub, string.gsub
local validstring = string.valid
local lpegmatch = lpeg.match
local utfchar, utfvalues = utf.char, utf.values
-local insert, remove = table.insert, table.remove
+local concat, insert, remove, merge = table.concat, table.insert, table.remove, table.merge
local sortedhash = table.sortedhash
local formatters = string.formatters
local todimen = number.todimen
@@ -82,7 +81,6 @@ local languagenames = languages.numbers
local nodecodes = nodes.nodecodes
local skipcodes = nodes.skipcodes
-local whatsitcodes = nodes.whatsitcodes
local listcodes = nodes.listcodes
local hlist_code = nodecodes.hlist
@@ -92,9 +90,6 @@ local glue_code = nodecodes.glue
local kern_code = nodecodes.kern
local disc_code = nodecodes.disc
local insert_code = nodecodes.insert
-local whatsit_code = nodecodes.whatsit
-local refximage_code = whatsitcodes.pdfrefximage
-local localpar_code = whatsitcodes.localpar
local userskip_code = skipcodes.userskip
local rightskip_code = skipcodes.rightskip
@@ -121,13 +116,13 @@ local tonut = nuts.tonut
local getnext = nuts.getnext
local getsubtype = nuts.getsubtype
local getfont = nuts.getfont
-local getchar = nuts.getchar
+local getdisc = nuts.getdisc
local getlist = nuts.getlist
local getid = nuts.getid
local getfield = nuts.getfield
local getattr = nuts.getattr
-
local setattr = nuts.setattr
+local isglyph = nuts.isglyph
local traverse_id = nuts.traverse_id
local traverse_nodes = nuts.traverse
@@ -139,6 +134,8 @@ local specifications = structurestags.specifications
local properties = structurestags.properties
local locatedtag = structurestags.locatedtag
+structurestags.usewithcare = { }
+
local starttiming = statistics.starttiming
local stoptiming = statistics.stoptiming
@@ -311,8 +308,8 @@ function wrapups.hashlistdata()
local tag = ci.references.tag
if tag then
local m = ci.metadata
--- listdata[m.kind .. ":" .. m.name .. "-" .. tag] = ci
- listdata[m.kind .. ">" .. tag] = ci
+ local t = m.kind .. ">" .. tag -- todo: use internal (see strc-lst.lua where it's set)
+ listdata[t] = ci
end
end
end
@@ -628,6 +625,44 @@ end
do
+ local symbols = { }
+
+ function structurestags.settagdelimitedsymbol(symbol)
+ symbols[locatedtag("delimitedsymbol")] = {
+ symbol = symbol,
+ }
+ end
+
+ function extras.delimitedsymbol(di,element,n,fulltag)
+ local hash = symbols[fulltag]
+ if hash then
+ setattribute(di,"symbol",hash.symbol or nil)
+ end
+ end
+
+end
+
+do
+
+ local symbols = { }
+
+ function structurestags.settagsubsentencesymbol(symbol)
+ symbols[locatedtag("subsentencesymbol")] = {
+ symbol = symbol,
+ }
+ end
+
+ function extras.subsentencesymbol(di,element,n,fulltag)
+ local hash = symbols[fulltag]
+ if hash then
+ setattribute(di,"symbol",hash.symbol or nil)
+ end
+ end
+
+end
+
+do
+
local itemgroups = { }
function structurestags.setitemgroup(packed,level,symbol)
@@ -712,13 +747,13 @@ end
do
- -- is this referencing still needed?
-
local descriptions = { }
local symbols = { }
local linked = { }
- function structurestags.setdescription(tag,n) -- needs checking (is tag needed)
+ -- we could move the notation itself to the first reference (can be an option)
+
+ function structurestags.setnotation(tag,n) -- needs checking (is tag needed)
-- we can also use the internals hash or list
local nd = structures.notes.get(tag,n)
if nd then
@@ -727,7 +762,7 @@ do
end
end
- function structurestags.setdescriptionsymbol(tag,n) -- needs checking (is tag needed)
+ function structurestags.setnotationsymbol(tag,n) -- needs checking (is tag needed)
local nd = structures.notes.get(tag,n) -- todo: use listdata instead
if nd then
local references = nd.references
@@ -771,12 +806,13 @@ end
do
- local image = { }
- usedimages.image = image
+ local f_id = formatters["%s-%s"]
+ local image = { }
+ usedimages.image = image
- local f_id = formatters["%s-%s"]
+ structurestags.usewithcare.images = image
- function structurestags.setfigure(name,used,page,width,height)
+ function structurestags.setfigure(name,used,page,width,height,label)
local fulltag = locatedtag("image")
local spec = specifications[fulltag]
local page = tonumber(page)
@@ -787,6 +823,7 @@ do
page = page and page > 1 and page or nil,
width = todimen(width, "cm","%0.3F%s"),
height = todimen(height,"cm","%0.3F%s"),
+ label = label,
}
end
@@ -798,6 +835,7 @@ do
setattribute(di,"id",data.id)
setattribute(di,"width",data.width)
setattribute(di,"height",data.height)
+ setattribute(di,"label",data.height)
end
end
@@ -1670,9 +1708,11 @@ do
function extras.registerlocation(di,element,n,fulltag)
local data = referencehash[fulltag]
- if data then
+ if type(data) == "table" then
extras.addinternal(di,data.references)
return true
+ else
+ -- needs checking, probably bookmarks
end
end
@@ -2492,13 +2532,11 @@ local function finishexport()
end
end
--- whatsit_code localpar_code
-
local function collectresults(head,list,pat,pap) -- is last used (we also have currentattribute)
local p
for n in traverse_nodes(head) do
- local id = getid(n) -- 14: image, 8: literal (mp)
- if id == glyph_code then
+ local c, id = isglyph(n) -- 14: image, 8: literal (mp)
+ if c then
local at = getattr(n,a_tagged) or pat
if not at then
-- we need to tag the pagebody stuff as being valid skippable
@@ -2507,7 +2545,6 @@ local function collectresults(head,list,pat,pap) -- is last used (we also have c
else
-- we could add tonunicodes for ligatures (todo)
local components = getfield(n,"components")
- local c = getchar(n)
if components and (not characterdata[c] or overloads[c]) then -- we loose data
collectresults(components,nil,at) -- this assumes that components have the same attribute as the glyph ... we should be more tolerant (see math)
else
@@ -2602,14 +2639,13 @@ local function collectresults(head,list,pat,pap) -- is last used (we also have c
end
end
elseif id == disc_code then -- probably too late
+ local pre, post, replace = getdisc(n)
if keephyphens then
- local pre = getfield(n,"pre")
- if pre and not getnext(pre) and getid(pre) == glyph_code and getchar(pre) == hyphencode then
+ if pre and not getnext(pre) and isglyph(pre) == hyphencode then
nofcurrentcontent = nofcurrentcontent + 1
currentcontent[nofcurrentcontent] = hyphen
end
end
- local replace = getfield(n,"replace")
if replace then
collectresults(replace,nil)
end
@@ -2658,8 +2694,7 @@ local function collectresults(head,list,pat,pap) -- is last used (we also have c
else
local subtype = getsubtype(n)
if subtype == userskip_code then
- local spec = getfield(n,"spec")
- if getfield(spec,"width") > threshold then
+ if getfield(n,"width") > threshold then
if last and not somespace[currentcontent[nofcurrentcontent]] then
local a = getattr(n,a_tagged) or pat
if a == last then
@@ -3190,13 +3225,16 @@ local htmltemplate = [[
at.href = nil
at.detail = nil
at.chain = nil
+ elseif tg == "metavariable" then
+ at.detail = "metaname-" .. at.name
+ class = makeclass(tg,at)
else
class = makeclass(tg,at)
end
- local id = at.id
- local href = at.href
+ local id = at.id
+ local href = at.href
if id then
- id = lpegmatch(p_cleanid, id) or id
+ id = lpegmatch(p_cleanid, id) or id
if href then
href = lpegmatch(p_cleanhref,href) or href
c.at = {
@@ -3509,7 +3547,7 @@ local htmltemplate = [[
local enableaction = nodes.tasks.enableaction
function structurestags.setupexport(t)
- table.merge(finetuning,t)
+ merge(finetuning,t)
keephyphens = finetuning.hyphen == v_yes
exportproperties = finetuning.properties
if exportproperties == v_no then
@@ -3590,6 +3628,18 @@ implement {
}
implement {
+ name = "settagdelimitedsymbol",
+ actions = structurestags.settagdelimitedsymbol,
+ arguments = "string"
+}
+
+implement {
+ name = "settagsubsentencesymbol",
+ actions = structurestags.settagsubsentencesymbol,
+ arguments = "string"
+}
+
+implement {
name = "settagsynonym",
actions = structurestags.setsynonym,
arguments = "string"
@@ -3602,14 +3652,14 @@ implement {
}
implement {
- name = "settagdescription",
- actions = structurestags.setdescription,
+ name = "settagnotation",
+ actions = structurestags.setnotation,
arguments = { "string", "integer" }
}
implement {
- name = "settagdescriptionsymbol",
- actions = structurestags.setdescriptionsymbol,
+ name = "settagnotationsymbol",
+ actions = structurestags.setnotationsymbol,
arguments = { "string", "integer" }
}
@@ -3622,7 +3672,7 @@ implement {
implement {
name = "settagfigure",
actions = structurestags.setfigure,
- arguments = { "string", "string", "string", "dimen", "dimen" }
+ arguments = { "string", "string", "string", "dimen", "dimen", "string" }
}
implement {
diff --git a/Master/texmf-dist/tex/context/base/back-exp.mkiv b/Master/texmf-dist/tex/context/base/mkiv/back-exp.mkiv
index a4ebe38aafa..48f4d3c4871 100644
--- a/Master/texmf-dist/tex/context/base/back-exp.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/back-exp.mkiv
@@ -89,14 +89,14 @@
\fi}%
% brrr, we need to tag empty cells (unless we start numbering)
\unexpanded\def\dotagTABLEsignal
- {\char\zerocount}%
+ {\signalcharacter}%
\to \everyenableelements
\appendtoks
\unexpanded\def\dotagtabulatecell
{\iftrialtypesetting\else\clf_settagtabulatecell\c_tabl_tabulate_align\fi}%
\unexpanded\def\dotagtabulatesignal
- {\dontleavehmode\char\zerocount\ignorespaces}%
+ {\dontleavehmode\signalcharacter\ignorespaces}%
\to \everyenableelements
\appendtoks
@@ -125,6 +125,7 @@
{\figurefilepage}%
\dimexpr\figurewidth\relax
\dimexpr\figureheight\relax
+ {\figurelabel}%
\fi}%
\to \everyenableelements
@@ -158,17 +159,24 @@
\fi}%
\to \everyenableelements
+% \appendtoks
+% \unexpanded\def\dotagsetdescription
+% {\iftrialtypesetting\else
+% \clf_settagdescription{\currentdescription}\currentdescriptionnumberentry\relax
+% \fi}%
+% \to \everyenableelements
+
\appendtoks
- \unexpanded\def\dotagsetdescription
+ \unexpanded\def\dotagsetnotation
{\iftrialtypesetting\else
- \clf_settagdescription{\currentdescription}\currentdescriptionnumberentry\relax
+ \clf_settagnotation{\currentnote}\currentnotenumber\relax
\fi}%
\to \everyenableelements
\appendtoks
\unexpanded\def\dotagsetnotesymbol
{\iftrialtypesetting\else
- \clf_settagdescriptionsymbol{\currentnote}\currentnotenumber\relax
+ \clf_settagnotationsymbol{\currentnote}\currentnotenumber\relax
\fi}%
\to \everyenableelements
@@ -187,6 +195,20 @@
\to \everyenableelements
\appendtoks
+ \unexpanded\def\dotagsetdelimitedsymbol#1%
+ {\iftrialtypesetting\else
+ \clf_settagdelimitedsymbol{#1}\relax
+ \fi}%
+\to \everyenableelements
+
+\appendtoks
+ \unexpanded\def\dotagsetsubsentencesymbol#1%
+ {\iftrialtypesetting\else
+ \clf_settagsubsentencesymbol{#1}\relax
+ \fi}%
+\to \everyenableelements
+
+\appendtoks
\let\specialfixedspace \explicitfixedspace
\let\specialobeyedspace \explicitobeyedspace
\let\specialstretchedspace\explicitstretchedspace
diff --git a/Master/texmf-dist/tex/context/base/back-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/back-ini.lua
index e8af4d9d9c2..e8af4d9d9c2 100644
--- a/Master/texmf-dist/tex/context/base/back-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/back-ini.lua
diff --git a/Master/texmf-dist/tex/context/base/back-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/back-ini.mkiv
index 2b0f054eea4..9859f026a1f 100644
--- a/Master/texmf-dist/tex/context/base/back-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/back-ini.mkiv
@@ -42,14 +42,8 @@
%D versions might support more backends again, but this has a low
%D priority.
%D
-%D The big question is: what is to be considered a backend issue and
-%D what not. For the moment we treat image inclusion, object reuse,
-%D position tracking and color as frontend issues, if only because we
-%D deal with them via \LUA\ code and as such we don't depend too much
-%D on macro calls that need to inject code for the backend.
-%D
%D Not everything here makes sense and the content of this file will
-%D definitely change.
+%D definitely change (or even go away).
\let \dostartrotation \gobbleoneargument
\let \dostoprotation \donothing
@@ -91,45 +85,6 @@
\let \dostopclipping \donothing
%D \macros
-%D {dostartobject,
-%D dostopobject,
-%D doresetobjects,
-%D doinsertobject}
-%D
-%D Reuse of object can reduce the output filesize
-%D considerably. Reusable objects are implemented with:
-%D
-%D \starttyping
-%D \dostartobject{class}{name}{width}{height}{depth}
-%D some typeset material
-%D \dostopobject
-%D \stoptyping
-%D
-%D \starttyping
-%D \doinsertobject{class}{name}
-%D \stoptyping
-%D
-%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 \starttyping
-%D \doresetobjects
-%D \stoptyping
-
-\let \dostartobject \gobblefourarguments
-\let \dostopobject \donothing
-\let \doinsertobject \gobbletwoarguments
-\let \doresetobjects \donothing
-
-%D From now on, mapfile loading is also a special; we assume the
-%D more or less standard dvips syntax.
-
-%let \doresetmapfilelist \donothing
-%let \doloadmapfile \gobbletwoarguments % + - = | filename
-%let \doloadmapline \gobbletwoarguments % + - = | fileline
-
-%D \macros
%D {jobsuffix}
%D
%D By default, \TEX\ produces \DVI\ files which can be
diff --git a/Master/texmf-dist/tex/context/base/back-pdf.lua b/Master/texmf-dist/tex/context/base/mkiv/back-pdf.lua
index 7f0b1acc740..0821abb2895 100644
--- a/Master/texmf-dist/tex/context/base/back-pdf.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/back-pdf.lua
@@ -23,6 +23,7 @@ local scaninteger = scanners.integer
local scankeyword = scanners.keyword
local scanners = interfaces.scanners
+local implement = interfaces.implement
local outputfilename
@@ -57,7 +58,7 @@ local pdfsetmatrix = nodes.pool.pdfsetmatrix
local stack = { }
local restore = true -- false
-scanners.pdfstartrotation = function() -- a
+scanners.pdfstartrotation = function()
local a = scannumber()
if a == 0 then
insert(stack,false)
@@ -69,53 +70,56 @@ scanners.pdfstartrotation = function() -- a
end
end
-scanners.pdfstartscaling = function() -- sx sy
- local sx, sy = 0, 0
+scanners.pdfstartscaling = function() -- at the tex end we use sx and sy instead of rx and ry
+ local rx, ry = 1, 1
while true do
- if scankeyword("sx") then
- sx = scannumber()
- elseif scankeyword("sy") then
- sy = scannumber()
+ if scankeyword("rx") then
+ rx = scannumber()
+ elseif scankeyword("ry") then
+ ry = scannumber()
+ -- elseif scankeyword("revert") then
+ -- local top = stack[#stack]
+ -- if top then
+ -- rx = top[1]
+ -- ry = top[4]
+ -- else
+ -- rx = 1
+ -- ry = 1
+ -- end
else
break
end
end
- if sx == 1 and sy == 1 then
+ if rx == 1 and ry == 1 then
insert(stack,false)
else
- if sx == 0 then
- sx = 0.0001
+ if rx == 0 then
+ rx = 0.0001
end
- if sy == 0 then
- sy = 0.0001
+ if ry == 0 then
+ ry = 0.0001
end
context(pdfsave())
- context(pdfsetmatrix(sx,0,0,sy))
- insert(stack,restore and { 1/sx, 0, 0, 1/sy } or true)
+ context(pdfsetmatrix(rx,0,0,ry))
+ insert(stack,restore and { 1/rx, 0, 0, 1/ry } or true)
end
end
-scanners.pdfstartmatrix = function() -- sx rx ry sy -- tx, ty
- local sx, rx, ry, sy = 0, 0, 0, 0
+scanners.pdfstartmatrix = function() -- rx sx sy ry -- tx, ty
+ local rx, sx, sy, ry = 1, 0, 0, 1
while true do
- if scankeyword("sx") then
- sx = scannumber()
- elseif scankeyword("sy") then
- sy = scannumber()
- elseif scankeyword("rx") then
- rx = scannumber()
- elseif scankeyword("ry") then
- ry = scannumber()
- else
- break
- end
+ if scankeyword("rx") then rx = scannumber()
+ elseif scankeyword("ry") then ry = scannumber()
+ elseif scankeyword("sx") then sx = scannumber()
+ elseif scankeyword("sy") then sy = scannumber()
+ else break end
end
- if sx == 1 and rx == 0 and ry == 0 and sy == 1 then
+ if rx == 1 and sx == 0 and sy == 0 and ry == 1 then
insert(stack,false)
else
context(pdfsave())
- context(pdfsetmatrix(sx,rx,ry,sy))
- insert(stack,store and { -sx, -rx, -ry, -sy } or true)
+ context(pdfsetmatrix(rx,sx,sy,ry))
+ insert(stack,store and { -rx, -sx, -sy, -ry } or true)
end
end
@@ -126,7 +130,7 @@ local function pdfstopsomething()
elseif top == true then
context(pdfrestore())
elseif top then
- context(pdfsetmatrix(unpack(top)))
+ context(pdfsetmatrix(unpack(top))) -- not really needed anymore
context(pdfrestore())
else
-- nesting error
@@ -143,8 +147,25 @@ end
scanners.pdfstopmirroring = scanners.pdfstartmirroring
-scanners.registerbackendsymbol = function()
- backends.codeinjections.registersymbol(scanstring(),scaninteger())
-end
+-- todo, change the above to implement too --
+
+implement {
+ name = "setmapfile",
+ arguments = "string",
+ actions = pdf.mapfile
+}
--- todo : clipping
+implement {
+ name = "setmapline",
+ arguments = "string",
+ actions = pdf.mapline
+}
+
+implement {
+ name = "setpdfcompression",
+ arguments = { "integer", "integer" },
+ actions = function(c,o)
+ pdf.setcompresslevel(c)
+ pdf.setobjcompresslevel(o)
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/back-pdf.mkiv b/Master/texmf-dist/tex/context/base/mkiv/back-pdf.mkiv
index 38de4bbfd48..ab9e4160cb9 100644
--- a/Master/texmf-dist/tex/context/base/back-pdf.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/back-pdf.mkiv
@@ -19,6 +19,7 @@
\registerctxluafile{lpdf-col}{1.000}
\registerctxluafile{lpdf-xmp}{1.001}
\registerctxluafile{lpdf-ano}{1.001}
+\registerctxluafile{lpdf-res}{1.001}
\registerctxluafile{lpdf-mis}{1.001}
\registerctxluafile{lpdf-ren}{1.001}
\registerctxluafile{lpdf-grp}{1.001}
@@ -41,31 +42,126 @@
%D
%D Here we initialize some internal quantities. We also protect them.
-\pdfoutput \plusone \let\pdfoutput \undefined \newcount\pdfoutput \pdfoutput \plusone
-
-%D These are already set:
-
-\pdfhorigin 1 true in \let\pdfhorigin\undefined \newdimen\pdfhorigin \pdfhorigin 1 true in
-\pdfvorigin \pdfhorigin \let\pdfvorigin\undefined \newdimen\pdfvorigin \pdfvorigin \pdfhorigin
-
-%D These too and most of them will be protected as well:
-
-\pdfminorversion \plusseven
-\pdfgentounicode \plusone \let\pdfgentounicode \undefined \newcount\pdfgentounicode
-\pdfinclusioncopyfonts \plusone \let\pdfinclusioncopyfonts \undefined \newcount\pdfinclusioncopyfonts
-\pdfinclusionerrorlevel \zerocount \let\pdfinclusionerrorlevel\undefined \newcount\pdfinclusionerrorlevel
-\pdfdecimaldigits \plusten \let\pdfdecimaldigits \undefined \newcount\pdfdecimaldigits
-\pdfimageresolution 300
-\pdfpkresolution 600
-
-%D Let's block these (we could share a dummy:
-
-\let\pdfcatalog \relax \newtoks\pdfcatalog
-\let\pdfinfo \relax \newtoks\pdfinfo
-\let\pdfnames \relax \newtoks\pdfnames
-\let\pdfpageresources\relax \newtoks\pdfpageresources
-\let\pdfpageattr \relax \newtoks\pdfpageattr
-\let\pdfpagesattr \relax \newtoks\pdfpagesattr
+\outputmode \plusone \let\modeoutput \undefined \newcount\outputmode \outputmode \plusone
+
+%D Because we do a lot in \LUA\ and don't want interferences, we nil most of the
+%D \PDFTEX\ primitives. Of course one can always use the \type {\pdfvariable},
+%D \type {\pdfextension} and \type {\pdffeedback} primitives but it will probably
+%D have bad side effects.
+
+%D These are no-ops and don't even intercept what comes next. Maybe some day
+%D I'll write a parser that maps onto \CONTEXT.
+
+\let\pdfcolorstack \relax
+\let\pdfcolorstackinit \relax
+\let\pdfannot \relax
+\let\pdfstartlink \relax
+\let\pdfendlink \relax
+\let\pdfoutline \relax
+\let\pdfdest \relax
+\let\pdfthread \relax
+\let\pdfstartthread \relax
+\let\pdfendthread \relax
+\let\pdffontattr \relax
+\let\pdfglyphtounicode \relax
+
+%D Here we do intercept (silently) what gets passed. One should use the
+%D \CONTEXT\ interfaces instead.
+
+\let\pdfcatalog \relax \newtoks \pdfcatalog
+\let\pdfinfo \relax \newtoks \pdfinfo
+\let\pdfnames \relax \newtoks \pdfnames
+\let\pdftrailer \relax \newtoks \pdftrailer
+\let\pdfpageresources \relax \newtoks \pdfpageresources
+\let\pdfpageattr \relax \newtoks \pdfpageattr
+\let\pdfpagesattr \relax \newtoks \pdfpagesattr
+\let\pdfxformattr \relax \newtoks \pdfxformattr
+\let\pdfxformresources \relax \newtoks \pdfxformresources
+
+%D We use the \LUA\ interface (which then permits more control over
+%D possible pdf/x extensions).
+
+\let\pdfcompresslevel \relax \newcount\pdfcompresslevel
+\let\pdfobjcompresslevel\relax \newcount\pdfobjcompresslevel
+
+%D But we still provide:
+
+\unexpanded\def\nopdfcompression {\clf_setpdfcompression\zerocount\zerocount}
+\unexpanded\def\maximumpdfcompression{\clf_setpdfcompression\plusnine \plusnine }
+\unexpanded\def\normalpdfcompression {\clf_setpdfcompression\plusthree\plusthree}
+
+%D These might even become no-ops as we don't need them in \CONTEXT:
+
+\unexpanded\def\pdfmapfile#1{\clf_setmapfile{#1}}
+\unexpanded\def\pdfmapline#1{\clf_setmapline{#1}}
+
+%D We don't support these directives, at least not this way. If they are needed
+%D by third party modules we can provide some interface.
+
+\let\pdfcreationdate \relax \newtoks \pdfcreationdate
+\let\pdfdecimaldigits \relax \newcount\pdfdecimaldigits
+\let\pdfdestmargin \relax \newcount\pdfdestmargin
+\let\pdffontname \relax \newcount\pdffontname
+\let\pdffontobjnum \relax \newcount\pdffontobjnum
+\let\pdffontsize \relax \newcount\pdffontsize
+\let\pdfgamma \relax \newcount\pdfgamma
+\let\pdfgentounicode \relax \newcount\pdfgentounicode
+\let\pdfhorigin \relax \newcount\pdfhorigin
+\let\pdfignoreunknownimages \relax \newcount\pdfignoreunknownimages
+\let\pdfimageaddfilename \relax \newcount\pdfimageaddfilename
+\let\pdfimageapplygamma \relax \newcount\pdfimageapplygamma
+\let\pdfimagegamma \relax \newcount\pdfimagegamma
+\let\pdfimagehicolor \relax \newcount\pdfimagehicolor
+\let\pdfimageresolution \relax \newcount\pdfimageresolution
+\let\pdfincludechars \relax \newtoks \pdffontsize
+\let\pdfinclusioncopyfonts \relax \newcount\pdfinclusioncopyfonts
+\let\pdfinclusionerrorlevel \relax \newcount\pdfinclusionerrorlevel
+\let\pdfinfoomitdate \relax \newcount\pdfinfoomitdate
+\let\pdflastannot \relax \newcount\pdflastannot
+\let\pdflastlink \relax \newcount\pdflastlink
+\let\pdflinkmargin \relax \newcount\pdflinkmargin
+\let\pdfminorversion \relax \newcount\pdfminorversion
+\let\pdfpagebox \relax \newcount\pdfpagebox
+\let\pdfpageref \relax \newcount\pdfpageref
+\let\pdfpkfixeddpi \relax \newcount\pdfpkfixeddpi
+\let\pdfpkmode \relax \newtoks \pdfpkmode
+\let\pdfpkresolution \relax \newcount\pdfpkresolution
+\let\pdfretval \relax \newcount\pdfretval
+\let\pdfsuppressoptionalinfo \relax \newcount\pdfsuppressoptionalinfo
+\let\pdfsuppressptexinfo \relax \newcount\pdfsuppressptexinfo
+\let\pdftexrevision \relax \newcount\pdftexrevision
+\let\pdftexversion \relax \newcount\pdftexversion
+\let\pdfthreadmargin \relax \newcount\pdfthreadmargin
+\let\pdftrailerid \relax \newtoks \pdftrailerid
+\let\pdfuniqueresname \relax \newcount\pdfuniqueresname
+\let\pdfvorigin \relax \newcount\pdfvorigin
+\let\pdfxformmargin \relax \newcount\pdfxformmargin
+\let\pdfxformname \relax \newcount\pdfxformname
+
+%D These are still accepted but are normally not needed.
+
+\let\pdflastxform \lastsavedboxresourceindex
+\let\pdflastximage \lastsavedimageresourceindex
+\let\pdflastximagepages \lastsavedimageresourcepages
+\let\pdflastxpos \lastxpos
+\let\pdflastypos \lastypos
+\let\pdfrefxform \useboxresource
+\let\pdfrefximage \useimageresource
+\let\pdfsavepos \savepos
+\let\pdfxform \saveboxresource
+\let\pdfximage \saveimageresource
+
+%D For the moment we keep these as they are but they will become \LUA\
+%D calls eventually, after which we will nil the three \type {\pdf}
+%D interface primitives.
+
+\normalprotected\def\pdfliteral {\pdfextension literal }
+\normalprotected\def\pdfobj {\pdfextension obj }
+ \def\pdflastobj {\numexpr\pdffeedback lastobj\relax}
+\normalprotected\def\pdfrefobj {\pdfextension refobj }
+\normalprotected\def\pdfrestore {\pdfextension restore\relax}
+\normalprotected\def\pdfsave {\pdfextension save\relax}
+\normalprotected\def\pdfsetmatrix{\pdfextension setmatrix }
%D This one can be consulted by users although the suffix is also
%D a system mode.
@@ -97,7 +193,7 @@
%D For the moment we keep these.
-\newtoks \pdfbackendeveryximage
+%newtoks \pdfbackendeveryximage
\newtoks \pdfbackendeveryxform
%D These are the only official methods to add stuff to the resources.
@@ -119,68 +215,29 @@
\def\pdfcolor #1{\clf_lpdf_color\numexpr\thecolorattribute{#1}\relax}
\let\PDFcolor\pdfcolor
-%D An example of usage is:
-
-\appendtoks % this will be moved to lua
- \pdfbackendsetinfo{ConTeXt.Version}{\contextversion}%
- \pdfbackendsetinfo{ConTeXt.Time} {\number\normalyear.\twodigits\normalmonth.\twodigits\normalday\space \twodigits\currenthour:\twodigits\currentminute}%
- \pdfbackendsetinfo{ConTeXt.Jobname}{\jobname}%
- \pdfbackendsetinfo{ConTeXt.Url} {www.pragma-ade.com}%
- \pdfbackendsetinfo{ConTeXt.Support}{contextgarden.net}%
-\to \everylastbackendshipout
-
-%D Transformations. Some day we will use primitives (once they're fixed).
-
-% todo: inject at the lua end cq. deal with #5 and #6 too
-
-% % % rotation % % %
+%D Transformations
-% \unexpanded\def\dostartrotation#1% grouped
-% {\forcecolorhack
-% \pdfsave
-% \pdfsetmatrix{\clf_pdfrotation#1}}
-
-% \unexpanded\def\dostoprotation
-% {\pdfrestore
-% \forcecolorhack}
+% rotation
\unexpanded\def\dostartrotation#1%
{\forcecolorhack
- \clf_pdfstartrotation#1\relax}
+ \clf_pdfstartrotation#1\relax} % todo: implement without Q q
\unexpanded\def\dostoprotation
- {\clf_pdfstoprotation}
-
-% % % scaling % % %
-
-% \unexpanded\def\dostartscaling#1#2% the test is needed because acrobat is bugged!
-% {\forcecolorhack % maybe use signal instead
-% \pdfsave
-% \pdfsetmatrix
-% {\ifdim#1\points=\zeropoint.0001\else#1\fi\space 0 0
-% \ifdim#2\points=\zeropoint.0001\else#2\fi\space}}% 0 0
+ {\clf_pdfstoprotation
+ \forcecolorhack}
-% \unexpanded\def\dostopscaling
-% {\pdfrestore
-% \forcecolorhack}
+% scaling
\unexpanded\def\dostartscaling#1#2%
{\forcecolorhack
- \clf_pdfstartscaling sx #1 sy #2\relax}
+ \clf_pdfstartscaling rx #1 ry #2\relax}
\unexpanded\def\dostopscaling
- {\clf_pdfstopscaling}
-
-% % % mirroring % % %
-
-% \unexpanded\def\dostartmirroring
-% {\forcecolorhack
-% \pdfsave
-% \pdfsetmatrix{-1 0 0 1}} % 0 0
+ {\clf_pdfstopscaling
+ \forcecolorhack}
-% \unexpanded\def\dostopmirroring
-% {\pdfrestore
-% \forcecolorhack}
+% mirroring
\unexpanded\def\dostartmirroring
{\clf_pdfstartmirroring}
@@ -188,43 +245,17 @@
\unexpanded\def\dostopmirroring
{\clf_pdfstopmirroring}
-% % % transform % % %
+% transform
-% \unexpanded\def\dotransformnextbox#1#2#3#4#5#6% sx rx ry sy tx ty (will change) / basepoints !
-% {\dowithnextbox{\dodotransformnextbox{#5}{#6}{#1 #2 #3 #4}}}
-
-% \unexpanded\def\dodotransformnextbox#1#2#3%
-% {\hbox
-% {\kern#1\onebasepoint
-% \raise#2\onebasepoint\hbox
-% {\pdfsave
-% \pdfsetmatrix{#3}% 0 0 (no #5 #6 yet)
-% \box\nextbox
-% \pdfrestore
-% }}}
-
-% \unexpanded\def\dotransformnextbox#1#2#3#4#5#6% sx rx ry sy tx ty (will change) / basepoints !
-% {% fixing ht/dp/wd should happen elsewhere
-% \dowithnextbox{\dodotransformnextbox{#1}{#2}{#3}{#4}{#5}{#6}}}
-
-% \unexpanded\def\dodotransformnextbox#1#2#3#4#5#6%
-% {\hbox
-% {\kern #5\onebasepoint
-% \raise#6\onebasepoint
-% \hbox
-% {\clf_pdfstartmatrix sx #1 rx #2 ry #3 sy #4\relax
-% \box\nextbox
-% \clf_pdfstopmatrix}}}
-
-\unexpanded\def\dotransformnextbox#1#2#3#4#5#6% sx rx ry sy tx ty (will change) / basepoints !
+\unexpanded\def\dotransformnextbox#1#2#3#4#5#6%
{\dowithnextbox{\dodotransformnextbox{#1}{#2}{#3}{#4}{#5}{#6}}}
\unexpanded\def\dodotransformnextbox#1#2#3#4#5#6%
- {\hbox
+ {\hpack
{\kern #5\onebasepoint
\raise#6\onebasepoint
- \hbox
- {\clf_pdfstartmatrix sx #1 rx #2 ry #3 sy #4\relax
+ \hpack
+ {\clf_pdfstartmatrix rx #1 sx #2 sy #3 ry #4\relax
\box\nextbox
\clf_pdfstopmatrix}}}
@@ -235,8 +266,8 @@
% \box\nextbox}
%
% \startluacode
-% function commands.pdftransformbox(box,sx,rx,ry,sy,tx,ty)
-% if sx == 1 and rx == 0 and ry == 0 and sy == 1 then
+% function commands.pdftransformbox(box,rx,sx,sy,ry,tx,ty)
+% if rx == 1 and sx == 0 and sy == 0 and ry == 1 then
% if tx == 0 and ty == 0 then
% local b = nodes.hpack(nodes.concat {
% nodes.pool.kern(tx),
@@ -251,9 +282,9 @@
% local b = nodes.hpack(nodes.concat {
% nodes.pool.kern(tx),
% nodes.pool.pdfsave(),
-% nodes.pool.pdfsetmatrix(sx,rx,ry,sy),
+% nodes.pool.pdfsetmatrix(rx,sx,sy,ry),
% nodes.takebox(box),
-% nodes.pool.pdfsetmatrix(-sx,-rx,-ry,-sy),
+% nodes.pool.pdfsetmatrix(-rx,-sx,-sy,-ry),
% nodes.pool.pdfrestore(),
% })
% b.shift = -ty
@@ -262,7 +293,7 @@
% end
% \stopluacode
-% % % clipping % % %
+% clipping
\unexpanded\def\dostartclipping#1#2#3% we can move this to lua and only set a box here
{\PointsToBigPoints{#2}\width
@@ -278,63 +309,24 @@
\unexpanded\def\dostopclipping
{\pdfliteral{Q}}
-%D The following will move to the backend \LUA\ code:
-
-%appendtoks \ctxlua{backends.codeinjections.finalizepage ()}\to \everybackendshipout % is immediate
-%appendtoks \ctxlua{backends.codeinjections.finalizedocument()}\to \everylastbackendshipout % is immediate
-
%D Temporary hack, will be removed or improved or default.
-%def\TransparencyHack{\ctxlua{backends.codeinjections.addtransparencygroup()}}
-\def\TransparencyHack{\setupcolors[\c!pagecolormodel=\v!auto]}
-
-%D \macros
-%D {dostartobject,dostopobject,doinsertobject}
-
-%D This will change:
-
-\newbox\objectbox
-
-\unexpanded\def\dostartobject#1#2#3#4#5% needs to be \unexpanded
- {\bgroup
- \setbox\objectbox\vbox\bgroup
- \def\back_object_stop{\egroup\back_object_register{#1}{#2}}}
-
-\unexpanded\def\dostopobject % needs to be \unexpanded
- {\back_object_stop
- \egroup}
-
-\let\back_object_stop\relax
-
% attr {/Group << /S /Transparency /I false /K true >>}
-\def\back_object_register#1#2%
- {\the\pdfbackendeveryxform
- \finalizeobjectbox\objectbox
- \immediate\pdfxform resources {\pdfbackendcurrentresources}\objectbox
- \dosetobjectreference{#1}{#2}\pdflastxform}
-
-\let\m_back_object_reference\empty
-
-\unexpanded\def\doinsertobject#1#2%
- {\begingroup
- \doifelseobjectreferencefound{#1}{#2}
- {\dogetobjectreference{#1}{#2}\m_back_object_reference
- \pdfrefxform\m_back_object_reference}%
- \donothing
- \endgroup}
-
-\let\lastpredefinedsymbol\empty % some day we can do more at the lua end
+%def\TransparencyHack{\ctxlua{backends.codeinjections.addtransparencygroup()}}
+\def\TransparencyHack{\setupcolors[\c!pagecolormodel=\v!auto]}
-\unexpanded\def\predefinesymbol[#1]%
- {\begingroup
- \xdef\lastpredefinedsymbol{#1}%
- \settightobject{SYM}{#1}\hbox{\symbol[#1]}% to be checked ... maybe only fitting
- \dogetobjectreference{SYM}{#1}\m_back_object_reference
- \clf_registerbackendsymbol{#1}\m_back_object_reference\relax
- \endgroup}
+% \let\lastpredefinedsymbol\empty % some day we can do more at the lua end
+%
+% \unexpanded\def\predefinesymbol[#1]%
+% {\begingroup
+% \xdef\lastpredefinedsymbol{#1}%
+% \settightobject{SYM}{#1}\hbox{\symbol[#1]}% to be checked ... maybe only fitting
+% \dogetobjectreference{SYM}{#1}\m_back_object_reference
+% \clf_registerbackendsymbol{#1}\m_back_object_reference\relax
+% \endgroup}
-% for the moment here
+% Still here:
%D \macros
%D {back_ovalbox}
@@ -384,7 +376,7 @@
\edef\dofill{\number#7}%
\edef\mode{\number#8}%
% no \ifcase, else \relax in pdfcode
- \setbox\scratchbox\hbox
+ \setbox\scratchbox\naturalhpack
{\ifnum\dostroke\dofill>\zerocount
\pdfliteral
{q
diff --git a/Master/texmf-dist/tex/context/base/back-swf.mkiv b/Master/texmf-dist/tex/context/base/mkiv/back-swf.mkiv
index 09745e0f93f..09745e0f93f 100644
--- a/Master/texmf-dist/tex/context/base/back-swf.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/back-swf.mkiv
diff --git a/Master/texmf-dist/tex/context/base/back-u3d.mkiv b/Master/texmf-dist/tex/context/base/mkiv/back-u3d.mkiv
index 297dd554579..297dd554579 100644
--- a/Master/texmf-dist/tex/context/base/back-u3d.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/back-u3d.mkiv
diff --git a/Master/texmf-dist/tex/context/base/bibl-bib.lua b/Master/texmf-dist/tex/context/base/mkiv/bibl-bib.lua
index baeb3d2f9af..baeb3d2f9af 100644
--- a/Master/texmf-dist/tex/context/base/bibl-bib.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/bibl-bib.lua
diff --git a/Master/texmf-dist/tex/context/base/bibl-bib.mkiv b/Master/texmf-dist/tex/context/base/mkiv/bibl-bib.mkiv
index 80d04099bd2..80d04099bd2 100644
--- a/Master/texmf-dist/tex/context/base/bibl-bib.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/bibl-bib.mkiv
diff --git a/Master/texmf-dist/tex/context/base/bibl-tra.lua b/Master/texmf-dist/tex/context/base/mkiv/bibl-tra.lua
index 223554b4daa..223554b4daa 100644
--- a/Master/texmf-dist/tex/context/base/bibl-tra.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/bibl-tra.lua
diff --git a/Master/texmf-dist/tex/context/base/bibl-tra.mkiv b/Master/texmf-dist/tex/context/base/mkiv/bibl-tra.mkiv
index 4c9e83fdf9d..4c9e83fdf9d 100644
--- a/Master/texmf-dist/tex/context/base/bibl-tra.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/bibl-tra.mkiv
diff --git a/Master/texmf-dist/tex/context/base/bibl-tst.lua b/Master/texmf-dist/tex/context/base/mkiv/bibl-tst.lua
index 5ff8f45709f..5ff8f45709f 100644
--- a/Master/texmf-dist/tex/context/base/bibl-tst.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/bibl-tst.lua
diff --git a/Master/texmf-dist/tex/context/base/blob-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/blob-ini.lua
index b837250ce70..106c10f4f32 100644
--- a/Master/texmf-dist/tex/context/base/blob-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/blob-ini.lua
@@ -6,16 +6,10 @@ if not modules then modules = { } end modules ['blob-ini'] = {
license = "see context related readme files"
}
--- Experimental ... names and functionality will change ... just a
--- place to collect code, so:
---
--- DON'T USE THESE FUNCTIONS AS THEY WILL CHANGE!
---
--- This module is just a playground. Occasionally we need to typeset
--- at the lua and and this is one method. In principle we can construct
--- pages this way too which sometimes makes sense in dumb cases. Actually,
--- if one only needs this, one does not really need tex, okay maybe the
--- parbuilder but that one can be simplified as well then.
+-- This module is just a playground. Occasionally we need to typeset at the lua and and
+-- this is one method. In principle we can construct pages this way too which sometimes
+-- makes sense in dumb cases. Actually, if one only needs this, one does not really need
+-- tex, okay maybe the parbuilder but that one can be simplified as well then.
-- set fonts, attributes
-- rest already done in packers etc
@@ -41,21 +35,18 @@ local write_node = node.write
local typesetters = nodes.typesetters
local tonodes = typesetters.tonodes
local tohpack = typesetters.tohpack
-local tohpackfast = typesetters.tohpackfast
local tovpack = typesetters.tovpack
-local tovpackfast = typesetters.tovpackfast
local implement = interfaces.implement
-blobs = blobs or { }
-
-- provide copies here (nicer for manuals)
+blobs = blobs or { }
+local blobs = blobs
+
blobs.tonodes = tonodes
blobs.tohpack = tohpack
-blobs.tohpackfast = tohpackfast
blobs.tovpack = tovpack
-blobs.tovpackfast = tovpackfast
-- end of helpers
@@ -146,21 +137,21 @@ end
-- blob.paragraph
-- blob.page
---~ local lineblob = {
---~ type = "line",
---~ head = false,
---~ tail = false,
---~ pack = false,
---~ properties = { },
---~ end
-
---~ local parblob = {
---~ type = "line",
---~ head = false,
---~ tail = false,
---~ pack = false,
---~ properties = { },
---~ end
+-- local lineblob = {
+-- type = "line",
+-- head = false,
+-- tail = false,
+-- pack = false,
+-- properties = { },
+-- end
+
+-- local parblob = {
+-- type = "line",
+-- head = false,
+-- tail = false,
+-- pack = false,
+-- properties = { },
+-- end
-- for the moment here:
diff --git a/Master/texmf-dist/tex/context/base/blob-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/blob-ini.mkiv
index 64582c0db59..64582c0db59 100644
--- a/Master/texmf-dist/tex/context/base/blob-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/blob-ini.mkiv
diff --git a/Master/texmf-dist/tex/context/base/buff-imp-default.lua b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-default.lua
index 79f01c47d31..79f01c47d31 100644
--- a/Master/texmf-dist/tex/context/base/buff-imp-default.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-default.lua
diff --git a/Master/texmf-dist/tex/context/base/buff-imp-default.mkiv b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-default.mkiv
index 5cff34c7006..5cff34c7006 100644
--- a/Master/texmf-dist/tex/context/base/buff-imp-default.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-default.mkiv
diff --git a/Master/texmf-dist/tex/context/base/buff-imp-escaped.lua b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-escaped.lua
index 159921e2a85..159921e2a85 100644
--- a/Master/texmf-dist/tex/context/base/buff-imp-escaped.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-escaped.lua
diff --git a/Master/texmf-dist/tex/context/base/buff-imp-escaped.mkiv b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-escaped.mkiv
index 13850475a82..13850475a82 100644
--- a/Master/texmf-dist/tex/context/base/buff-imp-escaped.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-escaped.mkiv
diff --git a/Master/texmf-dist/tex/context/base/buff-imp-lua.lua b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-lua.lua
index e873a34d182..e873a34d182 100644
--- a/Master/texmf-dist/tex/context/base/buff-imp-lua.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-lua.lua
diff --git a/Master/texmf-dist/tex/context/base/buff-imp-lua.mkiv b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-lua.mkiv
index dc601bd7b8e..dc601bd7b8e 100644
--- a/Master/texmf-dist/tex/context/base/buff-imp-lua.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-lua.mkiv
diff --git a/Master/texmf-dist/tex/context/base/buff-imp-mp.lua b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-mp.lua
index bcd18dd47a0..bcd18dd47a0 100644
--- a/Master/texmf-dist/tex/context/base/buff-imp-mp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-mp.lua
diff --git a/Master/texmf-dist/tex/context/base/buff-imp-mp.mkiv b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-mp.mkiv
index a40eb6c303f..a40eb6c303f 100644
--- a/Master/texmf-dist/tex/context/base/buff-imp-mp.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-mp.mkiv
diff --git a/Master/texmf-dist/tex/context/base/buff-imp-nested.lua b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-nested.lua
index 019cd996d6e..019cd996d6e 100644
--- a/Master/texmf-dist/tex/context/base/buff-imp-nested.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-nested.lua
diff --git a/Master/texmf-dist/tex/context/base/buff-imp-nested.mkiv b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-nested.mkiv
index 7815086dbfa..7815086dbfa 100644
--- a/Master/texmf-dist/tex/context/base/buff-imp-nested.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-nested.mkiv
diff --git a/Master/texmf-dist/tex/context/base/buff-imp-parsed-xml.lua b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-parsed-xml.lua
index 22611ac8ab7..22611ac8ab7 100644
--- a/Master/texmf-dist/tex/context/base/buff-imp-parsed-xml.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-parsed-xml.lua
diff --git a/Master/texmf-dist/tex/context/base/buff-imp-parsed-xml.mkiv b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-parsed-xml.mkiv
index bd348a67dd8..bd348a67dd8 100644
--- a/Master/texmf-dist/tex/context/base/buff-imp-parsed-xml.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-parsed-xml.mkiv
diff --git a/Master/texmf-dist/tex/context/base/buff-imp-tex.lua b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-tex.lua
index 097dff21246..097dff21246 100644
--- a/Master/texmf-dist/tex/context/base/buff-imp-tex.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-tex.lua
diff --git a/Master/texmf-dist/tex/context/base/buff-imp-tex.mkiv b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-tex.mkiv
index c582523d53b..c582523d53b 100644
--- a/Master/texmf-dist/tex/context/base/buff-imp-tex.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-tex.mkiv
diff --git a/Master/texmf-dist/tex/context/base/buff-imp-xml.lua b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-xml.lua
index 0c48ed3b090..0c48ed3b090 100644
--- a/Master/texmf-dist/tex/context/base/buff-imp-xml.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-xml.lua
diff --git a/Master/texmf-dist/tex/context/base/buff-imp-xml.mkiv b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-xml.mkiv
index f880ab88225..f880ab88225 100644
--- a/Master/texmf-dist/tex/context/base/buff-imp-xml.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-xml.mkiv
diff --git a/Master/texmf-dist/tex/context/base/buff-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/buff-ini.lua
index dafe2ad0e75..c41c516073b 100644
--- a/Master/texmf-dist/tex/context/base/buff-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-ini.lua
@@ -50,7 +50,12 @@ local registertempfile = luatex.registertempfile
local v_yes = variables.yes
-local p_whitespace = patterns.whitespace
+local eol = patterns.eol
+local space = patterns.space
+local whitespace = patterns.whitespace
+local blackspace = whitespace - eol
+local whatever = (1-eol)^1 * eol^0
+local emptyline = space^0 * eol
local catcodenumbers = catcodes.numbers
@@ -264,25 +269,24 @@ local continue = false
-- how about tabs
-local getmargin = (Cs(P(" ")^1)*P(-1)+1)^1 -- 1 or utf8character
-local eol = patterns.eol
-local whatever = (P(1)-eol)^0 * eol^1
+local strippers = { }
+local nofspaces = 0
-local strippers = { }
+local normalline = space^0 / function(s) local n = #s if n < nofspaces then nofspaces = n end end
+ * whatever
+
+local getmargin = (emptyline + normalline)^1
local function undent(str) -- new version, needs testing: todo: not always needed, like in xtables
+ nofspaces = #str
local margin = lpegmatch(getmargin,str)
- if type(margin) ~= "string" then
- return str
- end
- local indent = #margin
- if indent == 0 then
+ if nofspaces == #str or nofspaces ==0 then
return str
end
- local stripper = strippers[indent]
+ local stripper = strippers[nofspaces]
if not stripper then
- stripper = Cs((P(margin)/"" * whatever + eol^1)^1)
- strippers[indent] = stripper
+ stripper = Cs(((space^-nofspaces)/"" * whatever + emptyline)^1)
+ strippers[nofspaces] = stripper
end
return lpegmatch(stripper,str) or str
end
@@ -334,54 +338,61 @@ buffers.undent = undent
-- end
function tokens.pickup(start,stop)
- local stoplist = totable(stop)
- local stoplength = #stoplist
- local stoplast = stoplist[stoplength]
- local startlist = totable(start)
- local startlength = #startlist
- local startlast = startlist[startlength]
- local list = { }
- local size = 0
- local depth = 0
+ local stoplist = totable(stop)
+ local stoplength = #stoplist
+ local stoplast = stoplist[stoplength]
+ local startlist = totable(start)
+ local startlength = #startlist
+ local startlast = startlist[startlength]
+ local list = { }
+ local size = 0
+ local depth = 0
+-- local done = 32
while true do -- or use depth
local char = scancode()
if char then
- char = utfchar(char)
- size = size + 1
- list[size] = char
- if char == stoplast and size >= stoplength then
- local done = true
- local last = size
- for i=stoplength,1,-1 do
- if stoplist[i] ~= list[last] then
- done = false
- break
+-- if char < done then
+-- -- we skip leading control characters so that we can use them to
+-- -- obey spaces (a dirty trick)
+-- else
+-- done = 0
+ char = utfchar(char)
+ size = size + 1
+ list[size] = char
+ if char == stoplast and size >= stoplength then
+ local done = true
+ local last = size
+ for i=stoplength,1,-1 do
+ if stoplist[i] ~= list[last] then
+ done = false
+ break
+ end
+ last = last - 1
end
- last = last - 1
- end
- if done then
- if depth > 0 then
- depth = depth - 1
- else
- break
+ if done then
+ if depth > 0 then
+ depth = depth - 1
+ else
+ break
+ end
+ char = false -- trick: let's skip the next (start) test
end
- char = false -- trick: let's skip the next (start) test
end
- end
- if char == startlast and size >= startlength then
- local done = true
- local last = size
- for i=startlength,1,-1 do
- if startlist[i] ~= list[last] then
- done = false
- break
+ if char == startlast and size >= startlength then
+ local done = true
+ local last = size
+ for i=startlength,1,-1 do
+ if startlist[i] ~= list[last] then
+ done = false
+ break
+ end
+ last = last - 1
+ end
+ if done then
+ depth = depth + 1
end
- last = last - 1
- end
- if done then
- depth = depth + 1
end
- end
+-- end
else
-- local t = scantoken()
local t = gettoken()
@@ -394,15 +405,21 @@ function tokens.pickup(start,stop)
end
local start = 1
local stop = size-stoplength-1
+ -- not good enough: only empty lines, but even then we miss the leading
+ -- for verbatim
for i=start,stop do
- if lpegmatch(p_whitespace,list[i]) then
+ local li = list[i]
+ if lpegmatch(blackspace,li) then
+ -- keep going
+ elseif lpegmatch(eol,li) then
+ -- okay
start = i + 1
else
break
end
end
for i=stop,start,-1 do
- if lpegmatch(p_whitespace,list[i]) then
+ if lpegmatch(whitespace,list[i]) then
stop = i - 1
else
break
@@ -435,7 +452,7 @@ scanners.pickupbuffer = function()
local doundent = scanboolean()
local data = tokens.pickup(start,stop)
if doundent or (autoundent and doundent == nil) then
- data = buffers.undent(data)
+ data = undent(data)
end
buffers.assign(name,data,catcodes)
-- context[finish]()
@@ -572,3 +589,19 @@ implement {
actions = { collectcontent, context.printlines },
arguments = "string"
}
+
+local startbuffer = context.startbuffer
+local stopbuffer = context.stopbuffer
+
+local startcollecting = context.startcollecting
+local stopcollecting = context.stopcollecting
+
+function context.startbuffer(...)
+ startcollecting()
+ startbuffer(...)
+end
+
+function context.stopbuffer()
+ stopbuffer()
+ stopcollecting()
+end
diff --git a/Master/texmf-dist/tex/context/base/buff-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/buff-ini.mkiv
index c1068008546..7cc6cdbd4f2 100644
--- a/Master/texmf-dist/tex/context/base/buff-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-ini.mkiv
@@ -118,11 +118,11 @@
\scratchcounter
\ifnum#6=\plusone\s!true\else\s!false\fi
% \relax}
- \expandafter\relax\string}
+ \expandafter\relax\string} % maybe \normalexpanded{\relax\utfchar{7}}} signal
\unexpanded\def\buff_stop#1%
{\endgroup % (3 & 4 & 5 & 6)
- \getvalue{#1}}
+ \csname#1\endcsname}
% \installctxfunction\dopickupbuffer{commands.dopickupbuffer}
diff --git a/Master/texmf-dist/tex/context/base/buff-par.lua b/Master/texmf-dist/tex/context/base/mkiv/buff-par.lua
index 58ea9ab9d06..58ea9ab9d06 100644
--- a/Master/texmf-dist/tex/context/base/buff-par.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-par.lua
diff --git a/Master/texmf-dist/tex/context/base/buff-par.mkvi b/Master/texmf-dist/tex/context/base/mkiv/buff-par.mkvi
index 5af04ba7c6b..b17edb1736c 100644
--- a/Master/texmf-dist/tex/context/base/buff-par.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-par.mkvi
@@ -93,7 +93,7 @@
\unexpanded\def\buff_parallel_save#instance% defined moet ook aan de lua kant kunnen
{\clf_saveparallel
{\currentparallel}%
- {#instance},
+ {#instance}%
{\thedefinedbuffer{#instance}}%
\relax}
diff --git a/Master/texmf-dist/tex/context/base/buff-ver.lua b/Master/texmf-dist/tex/context/base/mkiv/buff-ver.lua
index 0168c551d2c..448d1a60cf7 100644
--- a/Master/texmf-dist/tex/context/base/buff-ver.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-ver.lua
@@ -627,6 +627,17 @@ local function getstrip(lines,first,last)
return first, last, last - first + 1
end
+-- we look for text (todo):
+--
+-- "foo" : start after line with "foo"
+-- "=" : ignore first blob
+-- "=foo" : start at "foo"
+-- "!foo" : maybe a not "foo"
+
+-- % - # lines start a comment
+
+local comment = "^[%%%-#]"
+
local function getrange(lines,first,last,range) -- 1,3 1,+3 fromhere,tothere
local noflines = #lines
local first = first or 1
@@ -634,7 +645,7 @@ local function getrange(lines,first,last,range) -- 1,3 1,+3 fromhere,tothere
if last < 0 then
last = noflines + last
end
- local what = settings_to_array(range)
+ local what = settings_to_array(range) -- maybe also n:m
local r_first = what[1]
local r_last = what[2]
local f = tonumber(r_first)
@@ -644,11 +655,26 @@ local function getrange(lines,first,last,range) -- 1,3 1,+3 fromhere,tothere
if f > first then
first = f
end
- else
+ elseif r_first == "=" then
for i=first,last do
- if find(lines[i],r_first) then
+ if find(lines[i],comment) then
first = i + 1
+ else
+ break
+ end
+ end
+ elseif r_first ~= "" then
+ local exact, r_first = match(r_first,"^([=]?)(.*)")
+ for i=first,last do
+ if find(lines[i],r_first) then
+ if exact == "=" then
+ first = i
+ else
+ first = i + 1
+ end
break
+ else
+ first = i
end
end
end
@@ -664,11 +690,24 @@ local function getrange(lines,first,last,range) -- 1,3 1,+3 fromhere,tothere
if l < last then
last = l
end
- else
+ elseif r_first == "=" then
+ for i=first,last do
+ if find(lines[i],comment) then
+ break
+ else
+ last = i
+ end
+ end
+ elseif r_last ~= "" then
+ local exact, r_last = match(r_last,"^([=]?)(.*)")
for i=first,last do
if find(lines[i],r_last) then
- last = i - 1
+ if exact == "=" then
+ last = i
+ end
break
+ else
+ last = i
end
end
end
diff --git a/Master/texmf-dist/tex/context/base/buff-ver.mkiv b/Master/texmf-dist/tex/context/base/mkiv/buff-ver.mkiv
index 67f861ba048..5b3ed6f2a74 100644
--- a/Master/texmf-dist/tex/context/base/buff-ver.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-ver.mkiv
@@ -90,13 +90,9 @@
\let\obeyedspace\specialobeyedspace
\let\controlspace\specialcontrolspace
\edef\p_buff_lines{\typeparameter\c!lines}%
- \ifcsname\??typinglines\p_buff_lines\endcsname
- \csname\??typinglines\p_buff_lines\endcsname
- \fi
+ \begincsname\??typinglines\p_buff_lines\endcsname
\edef\p_buff_space{\typeparameter\c!space}%
- \ifcsname\??typingspace\p_buff_space\endcsname
- \csname\??typingspace\p_buff_space\endcsname
- \fi
+ \begincsname\??typingspace\p_buff_space\endcsname
\relax\the\everyinitializeverbatim\relax}
\unexpanded\def\doinitializeverbatim % for use elsewhere .. temp hack (see lxml-ini)
@@ -136,13 +132,9 @@
\let\obeyedspace\specialobeyedspace
\let\controlspace\specialcontrolspace
\edef\p_buff_lines{\typingparameter\c!lines}%
- \ifcsname\??typinglines\p_buff_lines\endcsname
- \csname\??typinglines\p_buff_lines\endcsname
- \fi
+ \begincsname\??typinglines\p_buff_lines\endcsname
\edef\p_buff_space{\typingparameter\c!space}%
- \ifcsname\??typingspace\p_buff_space\endcsname
- \csname\??typingspace\p_buff_space\endcsname
- \fi
+ \begincsname\??typingspace\p_buff_space\endcsname
\relax\the\everyinitializeverbatim\relax}
%D \macros
@@ -465,7 +457,8 @@
\let\normaltextdis\dis
\unexpanded\def\astype
- {\bgroup\usetypestyleandcolor\c!style\c!color\let\nexttoken}
+ {\dontleavehmode
+ \bgroup\usetypestyleandcolor\c!style\c!color\let\nexttoken}
\unexpanded\def\asciistr#1% used in some old styles
{\dontleavehmode\begingroup
@@ -514,7 +507,7 @@
\startpacked[\v!blank]
\doifelseassignment{#1}
{\setupcurrenttyping[#1]}
- {\doifinset\v!continue{#1}{\lettypingparameter\c!continue\v!yes}}%
+ {\doif\v!continue{#1}{\lettypingparameter\c!continue\v!yes}}%
\buff_verbatim_setup_line_numbering
\buff_verbatim_initialize_typing_one
\buff_verbatim_setup_keep_together
@@ -606,6 +599,10 @@
\unexpanded\def\typefile
{\dodoubleempty\buff_verbatim_type_file}
+\appendtoks
+ \setuevalue{\e!type\currenttyping\v!file}{\typefile[\currenttyping]}%
+\to \everydefinetyping
+
\def\buff_verbatim_type_file[#1][#2]#3%
{\begingroup
\ifsecondargument
@@ -776,8 +773,13 @@
% [name] [settings] | [name] | [settings]
+% \unexpanded\def\typebuffer
+% {\dodoubleempty\buff_verbatim_type_buffer}
+
\unexpanded\def\typebuffer
- {\dodoubleempty\buff_verbatim_type_buffer}
+ {\begingroup
+ \let\currenttyping\v!buffer
+ \dodoubleempty\buff_verbatim_type_buffer}
\unexpanded\def\buff_verbatim_type_defined_buffer
{\dotripleempty\buff_verbatim_type_defined_buffer_indeed}
@@ -789,22 +791,45 @@
\setuevalue{\e!type\currentbuffer}{\buff_verbatim_type_defined_buffer[\v!buffer][\currentdefinedbuffer]}%
\to \everydefinebuffer
+\appendtoks % \e!buffer
+ \setuevalue{\e!type\currenttyping\v!buffer}{\buff_verbatim_type_buffer_class{\currenttyping}}%
+\to \everydefinetyping
+
+% \unexpanded\def\buff_verbatim_type_buffer[#1][#2]%
+% {\begingroup
+% \ifsecondargument
+% \setuptyping[\v!buffer][#2]%
+% \processcommalist[#1]{\buff_verbatim_type_buffer_indeed\v!buffer}% [name] [settings]
+% \else\iffirstargument
+% \doifelseassignment{#1}
+% {\setuptyping[\v!buffer][#1]%
+% \buff_verbatim_type_buffer_indeed\v!buffer\empty}% [settings]
+% {\processcommalist[#1]{\buff_verbatim_type_buffer_indeed\v!buffer}}% [name]
+% \else
+% \buff_verbatim_type_buffer_indeed\v!buffer\empty% []
+% \fi\fi
+% \endgroup}
+
\unexpanded\def\buff_verbatim_type_buffer[#1][#2]%
- {\begingroup
- \ifsecondargument
- \setuptyping[\v!buffer][#2]%
- \processcommalist[#1]{\buff_verbatim_type_buffer_indeed\v!buffer}% [name] [settings]
+ {\ifsecondargument
+ \setupcurrenttyping[#2]%
+ \processcommalist[#1]{\buff_verbatim_type_buffer_indeed\currenttyping}% [name] [settings]
\else\iffirstargument
\doifelseassignment{#1}
- {\setuptyping[\v!buffer][#1]%
- \buff_verbatim_type_buffer_indeed\v!buffer\empty}% [settings]
- {\processcommalist[#1]{\buff_verbatim_type_buffer_indeed\v!buffer}}% [name]
+ {\setupcurrenttyping[#1]%
+ \buff_verbatim_type_buffer_indeed\currenttyping\empty}% [settings]
+ {\processcommalist[#1]{\buff_verbatim_type_buffer_indeed\currenttyping}}% [name]
\else
- \buff_verbatim_type_buffer_indeed\v!buffer\empty% []
+ \buff_verbatim_type_buffer_indeed\currenttyping\empty% []
\fi\fi
\endgroup}
-\def\buff_verbatim_type_defined_buffer_indeed[#1][#2][#3]% category name settings
+\unexpanded\def\buff_verbatim_type_buffer_class#1%
+ {\begingroup
+ \edef\currenttyping{#1}%
+ \dodoubleempty\buff_verbatim_type_buffer}
+
+\unexpanded\def\buff_verbatim_type_defined_buffer_indeed[#1][#2][#3]% category name settings
{\begingroup
\ifthirdargument
\setuptyping[#1][#3]%
@@ -812,7 +837,7 @@
\buff_verbatim_type_buffer_indeed{#1}{#2}%
\endgroup}
-\def\buff_verbatim_type_buffer_indeed#1#2% category name
+\unexpanded\def\buff_verbatim_type_buffer_indeed#1#2% category name
{\edef\currenttyping{#1}%
\typingparameter\c!before
\startpacked[\v!blank]
@@ -969,7 +994,8 @@
% \let\next}
\appendtoks
- \def\type#1{\letterbackslash\checkedstrippedcsname#1}% or maybe detokenize
+ %def\type#1{\letterbackslash\checkedstrippedcsname#1}% or maybe detokenize
+ \def\type#1{\detokenize\expandafter{\csstring#1}}% or maybe detokenize
\def\tex #1{\letterbackslash#1}%
\to \everysimplifycommands
diff --git a/Master/texmf-dist/tex/context/base/bxml-apa.mkiv b/Master/texmf-dist/tex/context/base/mkiv/bxml-apa.mkiv
index 6513a71c2df..6513a71c2df 100644
--- a/Master/texmf-dist/tex/context/base/bxml-apa.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/bxml-apa.mkiv
diff --git a/Master/texmf-dist/tex/context/base/catc-act.mkiv b/Master/texmf-dist/tex/context/base/mkiv/catc-act.mkiv
index 8c7935d4d57..bd1ffd38d7d 100644
--- a/Master/texmf-dist/tex/context/base/catc-act.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/catc-act.mkiv
@@ -16,6 +16,8 @@
\unprotect
+% todo: \letcharcode<number>=\something
+
%D \macros
%D {installactivecharacter}
diff --git a/Master/texmf-dist/tex/context/base/catc-ctx.mkiv b/Master/texmf-dist/tex/context/base/mkiv/catc-ctx.mkiv
index 5af8a50356f..5af8a50356f 100644
--- a/Master/texmf-dist/tex/context/base/catc-ctx.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/catc-ctx.mkiv
diff --git a/Master/texmf-dist/tex/context/base/catc-def.mkiv b/Master/texmf-dist/tex/context/base/mkiv/catc-def.mkiv
index bf794f045dc..bf794f045dc 100644
--- a/Master/texmf-dist/tex/context/base/catc-def.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/catc-def.mkiv
diff --git a/Master/texmf-dist/tex/context/base/catc-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/catc-ini.lua
index 9241f5a1b16..9241f5a1b16 100644
--- a/Master/texmf-dist/tex/context/base/catc-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/catc-ini.lua
diff --git a/Master/texmf-dist/tex/context/base/catc-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/catc-ini.mkiv
index bb1e47faabd..440d53efed2 100644
--- a/Master/texmf-dist/tex/context/base/catc-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/catc-ini.mkiv
@@ -18,10 +18,10 @@
\unprotect
-%D A long standing wish has been the availability of catcode
-%D arrays. Because traditional \TEX\ does not provide this we
-%D implement a fake method in the \MKII\ file. There is some
-%D overlap in code with \MKII\ but we take that for granted.
+%D A long standing wish has been the availability of catcode arrays. Because
+%D traditional \TEX\ does not provide this we implement a fake method in the
+%D \MKII\ file. There is some overlap in code with \MKII\ but we take that
+%D for granted. Also, in \MKIV\ less active characters are used.
\setnewconstant\escapecatcode 0
\setnewconstant\begingroupcatcode 1
@@ -82,7 +82,7 @@
% rather special and used in writing to file: \let\par\outputnewlinechar
-\def\initializenewlinechar % operating system dependent
+\normalprotected\def\initializenewlinechar % operating system dependent
{\begingroup
\newlinechar\newlineasciicode
\xdef\outputnewlinechar{^^J}%
@@ -163,16 +163,15 @@
% \catcodetable\scratchcounter
% \egroup}
-%D The next command can be defined in a cleaner way in the
-%D Mk IV file but we want to have a fast one with a minimal
-%D chance for interference. Do we still need this complex
-%D mechanism? Future versions of \MKIV\ might only use
+%D The next command can be defined in a cleaner way in the MkIV way but we want
+%D to have a fast one with a minimal chance for interference. Do we still need
+%D this complex mechanism? Probably not. Future versions of \MKIV\ might only use
%D active characters for very special cases.
\setnewconstant\c_syst_catcodes_hack\tildeasciicode
-%D Once a catcode is assigned, the next assignments will happen
-%D faster.
+%D Once a catcode is assigned, the next assignments will happen faster. However,
+%D redefinitions probably happen seldom so it's sort of overkill.
\def\letcatcodecommand{\afterassignment\syst_catcodes_let_a\c_syst_catcodes_a}
\def\defcatcodecommand{\afterassignment\syst_catcodes_def_a\c_syst_catcodes_a}
@@ -184,21 +183,21 @@
\def\syst_catcodes_let_b % each time
{\ifcsname\??catcodelet\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname
- \csname\??catcodelet\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\expandafter\endcsname
+ \expandafter\lastnamedcs
\else
\expandafter\syst_catcodes_let_c
\fi}
\def\syst_catcodes_def_b % each time
{\ifcsname\??catcodedef\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname
- \csname\??catcodedef\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\expandafter\endcsname
+ \expandafter\lastnamedcs
\else
\expandafter\syst_catcodes_def_c
\fi}
\def\syst_catcodes_ued_b % each time
{\ifcsname\??catcodeued\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname
- \csname\??catcodeued\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\expandafter\endcsname
+ \expandafter\lastnamedcs
\else
\expandafter\syst_catcodes_ued_c
\fi}
@@ -209,7 +208,6 @@
\syst_catcodes_reinstate_unexpanded
\csname\??catcodelet\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname}
-
\def\syst_catcodes_def_c % only first time (we could use \normalexpanded here)
{\expandafter\gdef\csname\??catcodedef\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\expandafter\endcsname
\expandafter##\expandafter1\expandafter
@@ -227,19 +225,36 @@
\def\reinstatecatcodecommand{\afterassignment\syst_catcodes_reinstate_normal\c_syst_catcodes_b}
\def\syst_catcodes_reinstate_normal % can be used when a direct definition has been done
- {\begingroup % and the selector has been lost
+ {\begingroup % and the selector has been lost
\uccode\c_syst_catcodes_hack\c_syst_catcodes_b
\catcode\uccode\c_syst_catcodes_hack\activecatcode
\uppercase{\xdef~{\noexpand\catcodecommand{\number\c_syst_catcodes_b}}}%
\endgroup}
\def\syst_catcodes_reinstate_unexpanded % can be used when a direct definition has been done
- {\begingroup % and the selector has been lost
+ {\begingroup % and the selector has been lost
\uccode\c_syst_catcodes_hack\c_syst_catcodes_b
\catcode\uccode\c_syst_catcodes_hack\activecatcode
\uppercase{\normalprotected\xdef~{\noexpand\catcodecommand{\number\c_syst_catcodes_b}}}%
\endgroup}
+%D This can be used when a direct definition has been done and the selector has been
+%D lost.
+
+% problem: \next needs to be unique (as it gets bound)
+%
+% \def\syst_catcodes_reinstate_normal
+% {\begingroup
+% \edef\next{\noexpand\catcodecommand{\number\c_syst_catcodes_b}}%
+% \global\letcharcode\c_syst_catcodes_b\next
+% \endgroup}
+%
+% \def\syst_catcodes_reinstate_unexpanded
+% {\begingroup
+% \normalprotected\edef\next{\noexpand\catcodecommand{\number\c_syst_catcodes_b}}%
+% \global\letcharcode\c_syst_catcodes_b\next
+% \endgroup}
+
\newconstant\defaultcatcodetable
\def\catcodecommand#1%
@@ -252,15 +267,14 @@
%D \macros
%D {restorecatcodes,pushcatcodetable,popcatcodetable}
%D
-%D We're not finished dealing \CATCODES\ yet. In \CONTEXT\ we
-%D use only one auxiliary file, which deals with tables of
-%D contents, registers, two pass tracking, references etc. This
-%D file, as well as files concerning graphics, is processed when
-%D needed, which can be in the mid of typesetting verbatim.
-%D However, when reading in data in verbatim mode, we should
-%D temporary restore the normal \CATCODES, and that's exactly
-%D what the next macros do. Saving the catcodes can be
-%D disabled by saying \type{\localcatcodestrue}.
+%D We're not finished dealing \CATCODES\ yet. In \CONTEXT\ we use only one auxiliary
+%D file, which deals with tables of contents, registers, two pass tracking, references
+%D etc. This file, as well as files concerning graphics, is processed when needed,
+%D which can be in the mid of typesetting verbatim. However, when reading in data in
+%D verbatim mode, we should temporary restore the normal \CATCODES, and that's exactly
+%D what the next macros do. Saving the catcodes can be disabled by saying \type
+%D {\localcatcodestrue}. In \MKIV\ instead we can push and pop catcode tables and as
+%D we keep track of used tables users seldom need to deal with this themselves.
\newcount\c_syst_catcodes_level
@@ -279,9 +293,9 @@
\fi}
\normalprotected\def\syst_catcodes_trace_nesting_error
- {\immediate\write16{}%
- \immediate\write16{Fatal error: catcode push/pop mismatch. Fix this! (restore level: \number\c_syst_catcodes_level)}\wait\end
- \immediate\write16{}}
+ {\immediate\write\statuswrite{}%
+ \immediate\write\statuswrite{Fatal error: catcode push/pop mismatch. Fix this! (restore level: \number\c_syst_catcodes_level)}\wait\end
+ \immediate\write\statuswrite{}}
\normalprotected\def\restorecatcodes % takes previous level
{\ifnum\c_syst_catcodes_level>\plusone
@@ -302,11 +316,11 @@
%D \stoptyping
\normalprotected\def\tracecatcodetables
- {\def\syst_catcodes_trace_set {\syst_catcodes_trace{set \catcodetablename\space at \number\c_syst_catcodes_level}}%
+ {\def\syst_catcodes_trace_set {\syst_catcodes_trace{set \catcodetablename\space at \number\c_syst_catcodes_level}}%
\def\syst_catcodes_trace_push{\syst_catcodes_trace{push \catcodetablename\space from \syst_catcodes_prev\space at \number\c_syst_catcodes_level}}%
\def\syst_catcodes_trace_pop {\syst_catcodes_trace{pop \catcodetablename\space to \syst_catcodes_prev\space at \number\c_syst_catcodes_level}}}
-\def\syst_catcodes_trace#1{\immediate\write16{[#1]}}
+\def\syst_catcodes_trace#1{\immediate\write\statuswrite{[#1]}}
\def\syst_catcodes_prev
{\ifnum\numexpr\c_syst_catcodes_level-1\relax>\zerocount
diff --git a/Master/texmf-dist/tex/context/base/catc-sym.mkiv b/Master/texmf-dist/tex/context/base/mkiv/catc-sym.mkiv
index 71e02f31dc1..ae12532720d 100644
--- a/Master/texmf-dist/tex/context/base/catc-sym.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/catc-sym.mkiv
@@ -11,12 +11,9 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-% we now have loaded syst-* so we have all @@catcode constants
-
-%D We want to have access to the raw alternatives of the
-%D special characters. We use a \type {\xdef} instead of
-%D \type {\let} because we need an expandable token in a
-%D \type {\write}.
+%D We want to have access to the raw alternatives of the special characters. We
+%D use a \type {\xdef} instead of \type {\let} because we need an expandable token
+%D in a \type {\write}.
\bgroup
@@ -24,32 +21,37 @@
\catcode`E=\endgroupcatcode
\catcode`.=\escapecatcode
-.catcode `.{ 12 .xdef .letteropenbrace B.string{E
-.catcode `.} 12 .xdef .letterclosebrace B.string}E
-.catcode `.& 12 .xdef .letterampersand B.string&E
-.catcode `.< 12 .xdef .letterless B.string<E
-.catcode `.> 12 .xdef .lettermore B.string>E
-.catcode `.# 12 .xdef .letterhash B.string#E
-.catcode `." 12 .xdef .letterdoublequote B.string"E
-.catcode `.' 12 .xdef .lettersinglequote B.string'E
-.catcode `.$ 12 .xdef .letterdollar B.string$E
-.catcode `.% 12 .xdef .letterpercent B.string%E
-.catcode `.^ 12 .xdef .letterhat B.string^E
-.catcode `._ 12 .xdef .letterunderscore B.string_E
-.catcode `.| 12 .xdef .letterbar B.string|E
-.catcode `.~ 12 .xdef .lettertilde B.string~E
-.catcode `.\ 12 .xdef .letterbackslash B.string\E
-.catcode `./ 12 .xdef .letterslash B.string/E
-.catcode `.? 12 .xdef .letterquestionmark B.string?E
-.catcode `.! 12 .xdef .letterexclamationmark B.string!E
-.catcode `.@ 12 .xdef .letterat B.string@E
-.catcode `.: 12 .xdef .lettercolon B.string:E
+.catcode `.{ 12 .xdef .letterleftbrace B.string{E
+.catcode `.} 12 .xdef .letterrightbrace B.string}E
+.catcode `.& 12 .xdef .letterampersand B.string&E
+.catcode `.< 12 .xdef .letterless B.string<E
+.catcode `.> 12 .xdef .lettermore B.string>E
+.catcode `.# 12 .xdef .letterhash B.string#E
+.catcode `." 12 .xdef .letterdoublequote B.string"E
+.catcode `.' 12 .xdef .lettersinglequote B.string'E
+.catcode `.$ 12 .xdef .letterdollar B.string$E
+.catcode `.% 12 .xdef .letterpercent B.string%E
+.catcode `.^ 12 .xdef .letterhat B.string^E
+.catcode `._ 12 .xdef .letterunderscore B.string_E
+.catcode `.| 12 .xdef .letterbar B.string|E
+.catcode `.~ 12 .xdef .lettertilde B.string~E
+.catcode `.\ 12 .xdef .letterbackslash B.string\E
+.catcode `./ 12 .xdef .letterslash B.string/E
+.catcode `.? 12 .xdef .letterquestionmark B.string?E
+.catcode `.! 12 .xdef .letterexclamationmark B.string!E
+.catcode `.@ 12 .xdef .letterat B.string@E
+.catcode `.: 12 .xdef .lettercolon B.string:E
+
+.catcode `.( 12 .xdef .letterleftparenthesis B.string(E
+.catcode `.) 12 .xdef .letterrightparenthesis B.string)E
+.catcode `.[ 12 .xdef .letterleftbracket B.string[E
+.catcode `.] 12 .xdef .letterrightbracket B.string]E
.global .let .letterescape .letterbackslash
- .global .let .letterbgroup .letteropenbrace
- .global .let .letteregroup .letterclosebrace
- .global .let .letterleftbrace .letteropenbrace
- .global .let .letterrightbrace .letterclosebrace
+ .global .let .letterbgroup .letterleftbrace
+ .global .let .letteregroup .letterrightbrace
+ .global .let .letteropenbrace .letterleftbrace
+ .global .let .letterclosebrace .letterrightbrace
.egroup
diff --git a/Master/texmf-dist/tex/context/base/catc-xml.mkiv b/Master/texmf-dist/tex/context/base/mkiv/catc-xml.mkiv
index a23a2fe0a26..a23a2fe0a26 100644
--- a/Master/texmf-dist/tex/context/base/catc-xml.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/catc-xml.mkiv
diff --git a/Master/texmf-dist/tex/context/base/char-act.mkiv b/Master/texmf-dist/tex/context/base/mkiv/char-act.mkiv
index 7d7268c8ba6..7d7268c8ba6 100644
--- a/Master/texmf-dist/tex/context/base/char-act.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/char-act.mkiv
diff --git a/Master/texmf-dist/tex/context/base/mkiv/char-cjk.lua b/Master/texmf-dist/tex/context/base/mkiv/char-cjk.lua
new file mode 100644
index 00000000000..9d6b28a603a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/char-cjk.lua
@@ -0,0 +1,1293 @@
+if not modules then modules = { } end modules ['char-cjk'] = {
+ version = 1.001,
+ comment = "companion to char-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local setmetatable, next = setmetatable, next
+local insert = table.insert
+local floor = math.floor
+local formatters = string.formatters
+local utfchar = utf.char
+
+local setmetatableindex = table.setmetatableindex
+
+characters = characters or { }
+local ranges = characters.ranges
+local allocate = utilities.storage.allocate
+
+-- Hangul Syllable
+
+-- The following conversion is taken from unicode.org/reports/tr15/tr15-23.html#Hangul
+-- but adapted to our needs.
+
+-- local SBase = 0xAC00
+--
+-- local LBase, LCount = 0x1100, 19
+-- local VBase, VCount = 0x1161, 21
+-- local TBase, TCount = 0x11A7, 28
+--
+-- local NCount = VCount * TCount
+-- local SCount = LCount * NCount
+--
+-- local function decomposed(unicode)
+-- local SIndex = unicode - SBase
+-- if SIndex >= 0 and SIndex < SCount then
+-- local lead_consonant = LBase + floor( SIndex / NCount)
+-- local medial_vowel = VBase + floor((SIndex % NCount) / TCount)
+-- local tail_consonant = TBase + SIndex % TCount
+-- if tail_consonant ~= TBase then
+-- return lead_consonant, medial_vowel, tail_consonant
+-- else
+-- return lead_consonant, medial_vowel
+-- end
+-- end
+-- end
+--
+-- Lua will optimize the inline constants so the next variant is
+-- 10% faster. In practice this will go unnoticed, but it's also less
+-- code, so let's do it. Pushing the constant section into the
+-- function body saves 5%.
+
+local function decomposed(unicode)
+ local index = unicode - 0xAC00
+ if index >= 0 and index < 19 * 21 * 28 then
+ local lead_consonant = 0x1100 + floor( index / (21 * 28))
+ local medial_vowel = 0x1161 + floor((index % (21 * 28)) / 28)
+ local tail_consonant = 0x11A7 + index % 28
+ if tail_consonant ~= 0x11A7 then
+ return lead_consonant, medial_vowel, tail_consonant
+ else
+ return lead_consonant, medial_vowel
+ end
+ end
+end
+
+local lead_consonants = { [0] =
+ "G", "GG", "N", "D", "DD", "R", "M", "B", "BB",
+ "S", "SS", "", "J", "JJ", "C", "K", "T", "P", "H"
+}
+
+local medial_vowels = { [0] =
+ "A", "AE", "YA", "YAE", "EO", "E", "YEO", "YE", "O",
+ "WA", "WAE", "OE", "YO", "U", "WEO", "WE", "WI",
+ "YU", "EU", "YI", "I"
+}
+
+local tail_consonants = { [0] =
+ "", "G", "GG", "GS", "N", "NJ", "NH", "D", "L", "LG", "LM",
+ "LB", "LS", "LT", "LP", "LH", "M", "B", "BS",
+ "S", "SS", "NG", "J", "C", "K", "T", "P", "H"
+}
+
+-- local function description(unicode)
+-- local index = unicode - 0xAC00
+-- if index >= 0 and index < 19 * 21 * 28 then
+-- local lead_consonant = floor( index / NCount)
+-- local medial_vowel = floor((index % NCount) / TCount)
+-- local tail_consonant = index % TCount
+-- return formatters["HANGUL SYLLABLE %s%s%s"](
+-- lead_consonants[lead_consonant],
+-- medial_vowels [medial_vowel ],
+-- tail_consonants[tail_consonant]
+-- )
+-- end
+-- end
+
+local function description(unicode)
+ local index = unicode - 0xAC00
+ if index >= 0 and index < 19 * 21 * 28 then
+ local lead_consonant = floor( index / (21 * 28))
+ local medial_vowel = floor((index % (21 * 28)) / 28)
+ local tail_consonant = index % 28
+ return formatters["HANGUL SYLLABLE %s%s%s"](
+ lead_consonants[lead_consonant],
+ medial_vowels [medial_vowel ],
+ tail_consonants[tail_consonant]
+ )
+ end
+end
+
+-- so far
+
+-- We have a [lead consonant,medial vowel,tail consonant] where the last one
+-- is optional. For sort ranges we need the first one but some are collapsed.
+-- Beware, we map to modern so the font should support it.
+
+local function leadconsonant(unicode)
+ return
+ -- unicode < 0xAC00 and nil -- original
+ -- unicode > 0xD7AF and nil or -- original
+ unicode >= 0xD558 and 0x314E or -- 하 => ㅎ
+ unicode >= 0xD30C and 0x314D or -- 파 => ã…
+ unicode >= 0xD0C0 and 0x314C or -- 타 => ㅌ
+ unicode >= 0xCE74 and 0x314B or -- ì¹´ => ã…‹
+ unicode >= 0xCC28 and 0x314A or -- ì°¨ => ã…Š
+ unicode >= 0xC790 and 0x3148 or -- ìž => ã…ˆ
+ unicode >= 0xC544 and 0x3147 or -- ì•„ => ã…‡
+ unicode >= 0xC0AC and 0x3145 or -- 사 => ㅅ
+ unicode >= 0xBC14 and 0x3142 or -- ë°” => ã…‚
+ unicode >= 0xB9C8 and 0x3141 or -- 마 => ã…
+ unicode >= 0xB77C and 0x3139 or -- ë¼ => ㄹ
+ unicode >= 0xB2E4 and 0x3137 or -- 다 => ㄷ
+ unicode >= 0xB098 and 0x3134 or -- 나 => ㄴ
+ unicode >= 0xAC00 and 0x3131 or -- 가 => ㄱ
+ nil -- can't happen
+end
+
+local remapped = { -- this might be merged into char-def.lua
+ [0x1100] = 0x3131, -- G
+ [0x1101] = 0x3132, -- GG
+ [0x1102] = 0x3134, -- N
+ [0x1103] = 0x3137, -- D
+ [0x1104] = 0x3138, -- DD
+ [0x1105] = 0x3139, -- R
+ -- [0X111A] = 0x3140, -- LH used for last sound
+ [0x1106] = 0x3141, -- M
+ [0x1107] = 0x3142, -- B
+ [0x1108] = 0x3143, -- BB
+ -- [0x1121] = 0x3144, -- BS used for last sound
+ [0x1109] = 0x3145, -- S
+ [0x110A] = 0x3146, -- SS
+ [0x110B] = 0x3147, -- (IEUNG) no sound but has form
+ [0x110C] = 0x3148, -- J
+ [0x110D] = 0x3149, -- JJ
+ [0x110E] = 0x314A, -- C
+ [0x110F] = 0x314B, -- K
+ [0x1110] = 0x314C, -- T
+ [0x1111] = 0x314D, -- P
+ [0x1112] = 0x314E, -- H
+
+ [0x1161] = 0x314F, -- A
+ [0x1162] = 0x3150, -- AE
+ [0x1163] = 0x3151, -- YA
+ [0x1164] = 0x3152, -- YAE
+ [0x1165] = 0x3153, -- EO
+ [0x1166] = 0x3154, -- E
+ [0x1167] = 0x3155, -- YEO
+ [0x1168] = 0x3156, -- YE
+ [0x1169] = 0x3157, -- O
+ [0x116A] = 0x3158, -- WA
+ [0x116B] = 0x3159, -- WAE
+ [0x116C] = 0x315A, -- OE
+ [0x116D] = 0x315B, -- YO
+ [0x116E] = 0x315C, -- U
+ [0x116F] = 0x315D, -- WEO
+ [0x1170] = 0x315E, -- WE
+ [0x1171] = 0x315F, -- WI
+ [0x1172] = 0x3160, -- YU
+ [0x1173] = 0x3161, -- EU
+ [0x1174] = 0x3162, -- YI
+ [0x1175] = 0x3163, -- I
+
+ [0x11A8] = 0x3131, -- G
+ [0x11A9] = 0x3132, -- GG
+ [0x11AA] = 0x3133, -- GS
+ [0x11AB] = 0x3134, -- N
+ [0x11AC] = 0x3135, -- NJ
+ [0x11AD] = 0x3136, -- NH
+ [0x11AE] = 0x3137, -- D
+ [0x11AF] = 0x3139, -- L
+ [0x11B0] = 0x313A, -- LG
+ [0x11B1] = 0x313B, -- LM
+ [0x11B2] = 0x313C, -- LB
+ [0x11B3] = 0x313D, -- LS
+ [0x11B4] = 0x313E, -- LT
+ [0x11B5] = 0x313F, -- LP
+ [0x11B6] = 0x3140, -- LH
+ [0x11B7] = 0x3141, -- M
+ [0x11B8] = 0x3142, -- B
+ [0x11B9] = 0x3144, -- BS
+ [0x11BA] = 0x3145, -- S
+ [0x11BB] = 0x3146, -- SS
+ [0x11BC] = 0x3147, -- NG
+ [0x11BD] = 0x3148, -- J
+ [0x11BE] = 0x314A, -- C
+ [0x11BF] = 0x314B, -- K
+ [0x11C0] = 0x314C, -- T
+ [0x11C1] = 0x314D, -- P
+ [0x11C2] = 0x314E, -- H
+}
+
+characters.hangul = allocate {
+ decomposed = decomposed,
+ description = description,
+ leadconsonant = leadconsonant,
+ remapped = remapped,
+}
+
+-- so far
+
+local hangul_syllable_basetable = {
+ category = "lo",
+ cjkwd = "w",
+ description = "<Hangul Syllable>",
+ direction = "l",
+ linebreak = "h2",
+}
+
+local hangul_syllable_metatable = {
+ __index = function(t,k)
+ local u = t.unicodeslot
+ if k == "fscode" or k == "leadconsonant" then
+ return leadconsonant(u)
+ elseif k == "decomposed" then
+ return { decomposed(u) }
+ elseif k == "specials" then
+ return { "char", decomposed(u) }
+ elseif k == "description" then
+ return description(u)
+ else
+ return hangul_syllable_basetable[k]
+ end
+ end
+}
+
+function characters.remap_hangul_syllabe(t)
+ local tt = type(t)
+ if tt == "number" then
+ return remapped[t] or t
+ elseif tt == "table" then
+ local r = { }
+ for i=1,#t do
+ local ti = t[i]
+ r[i] = remapped[ti] or ti
+ end
+ return r
+ else
+ return t
+ end
+end
+
+local hangul_syllable_extender = function(k)
+ local t = {
+ unicodeslot = k,
+ }
+ setmetatable(t,hangul_syllable_metatable)
+ return t
+end
+
+local hangul_syllable_range = {
+ name = "hangul",
+ first = 0xAC00,
+ last = 0xD7A3,
+ extender = hangul_syllable_extender,
+}
+
+setmetatable(hangul_syllable_range, hangul_syllable_metatable)
+
+-- CJK Ideograph
+
+local knownvariants = {
+ [0x0349E] = { [0x0FE00] = 0x2F80C },
+ [0x034B9] = { [0x0FE00] = 0x2F813 },
+ [0x034BB] = { [0x0FE00] = 0x2F9CA },
+ [0x034DF] = { [0x0FE00] = 0x2F81F },
+ [0x03515] = { [0x0FE00] = 0x2F824 },
+ [0x036EE] = { [0x0FE00] = 0x2F867 },
+ [0x036FC] = { [0x0FE00] = 0x2F868 },
+ [0x03781] = { [0x0FE00] = 0x2F876 },
+ [0x0382F] = { [0x0FE00] = 0x2F883 },
+ [0x03862] = { [0x0FE00] = 0x2F888 },
+ [0x0387C] = { [0x0FE00] = 0x2F88A },
+ [0x038C7] = { [0x0FE00] = 0x2F896 },
+ [0x038E3] = { [0x0FE00] = 0x2F89B },
+ [0x0391C] = { [0x0FE00] = 0x2F8A2 },
+ [0x0393A] = { [0x0FE00] = 0x2F8A1 },
+ [0x03A2E] = { [0x0FE00] = 0x2F8C2 },
+ [0x03A6C] = { [0x0FE00] = 0x2F8C7 },
+ [0x03AE4] = { [0x0FE00] = 0x2F8D1 },
+ [0x03B08] = { [0x0FE00] = 0x2F8D0 },
+ [0x03B19] = { [0x0FE00] = 0x2F8CE },
+ [0x03B49] = { [0x0FE00] = 0x2F8DE },
+ [0x03B9D] = { [0x0FE00] = 0x0FAD2, [0x0FE01] = 0x2F8E7 },
+ [0x03C18] = { [0x0FE00] = 0x2F8EE },
+ [0x03C4E] = { [0x0FE00] = 0x2F8F2 },
+ [0x03D33] = { [0x0FE00] = 0x2F90A },
+ [0x03D96] = { [0x0FE00] = 0x2F916 },
+ [0x03EAC] = { [0x0FE00] = 0x2F92A },
+ [0x03EB8] = { [0x0FE00] = 0x2F92C, [0x0FE01] = 0x2F92D },
+ [0x03F1B] = { [0x0FE00] = 0x2F933 },
+ [0x03FFC] = { [0x0FE00] = 0x2F93E },
+ [0x04008] = { [0x0FE00] = 0x2F93F },
+ [0x04018] = { [0x0FE00] = 0x0FAD3 },
+ [0x04039] = { [0x0FE00] = 0x0FAD4, [0x0FE01] = 0x2F949 },
+ [0x04046] = { [0x0FE00] = 0x2F94B },
+ [0x04096] = { [0x0FE00] = 0x2F94C },
+ [0x040E3] = { [0x0FE00] = 0x2F951 },
+ [0x0412F] = { [0x0FE00] = 0x2F958 },
+ [0x04202] = { [0x0FE00] = 0x2F960 },
+ [0x04227] = { [0x0FE00] = 0x2F964 },
+ [0x042A0] = { [0x0FE00] = 0x2F967 },
+ [0x04301] = { [0x0FE00] = 0x2F96D },
+ [0x04334] = { [0x0FE00] = 0x2F971 },
+ [0x04359] = { [0x0FE00] = 0x2F974 },
+ [0x043D5] = { [0x0FE00] = 0x2F981 },
+ [0x043D9] = { [0x0FE00] = 0x2F8D7 },
+ [0x0440B] = { [0x0FE00] = 0x2F984 },
+ [0x0446B] = { [0x0FE00] = 0x2F98E },
+ [0x0452B] = { [0x0FE00] = 0x2F9A7 },
+ [0x0455D] = { [0x0FE00] = 0x2F9AE },
+ [0x04561] = { [0x0FE00] = 0x2F9AF },
+ [0x0456B] = { [0x0FE00] = 0x2F9B2 },
+ [0x045D7] = { [0x0FE00] = 0x2F9BF },
+ [0x045F9] = { [0x0FE00] = 0x2F9C2 },
+ [0x04635] = { [0x0FE00] = 0x2F9C8 },
+ [0x046BE] = { [0x0FE00] = 0x2F9CD },
+ [0x046C7] = { [0x0FE00] = 0x2F9CE },
+ [0x04995] = { [0x0FE00] = 0x2F9EF },
+ [0x049E6] = { [0x0FE00] = 0x2F9F2 },
+ [0x04A6E] = { [0x0FE00] = 0x2F9F8 },
+ [0x04A76] = { [0x0FE00] = 0x2F9F9 },
+ [0x04AB2] = { [0x0FE00] = 0x2F9FC },
+ [0x04B33] = { [0x0FE00] = 0x2FA03 },
+ [0x04BCE] = { [0x0FE00] = 0x2FA08 },
+ [0x04CCE] = { [0x0FE00] = 0x2FA0D },
+ [0x04CED] = { [0x0FE00] = 0x2FA0E },
+ [0x04CF8] = { [0x0FE00] = 0x2FA11 },
+ [0x04D56] = { [0x0FE00] = 0x2FA16 },
+ [0x04E0D] = { [0x0FE00] = 0x0F967 },
+ [0x04E26] = { [0x0FE00] = 0x0FA70 },
+ [0x04E32] = { [0x0FE00] = 0x0F905 },
+ [0x04E38] = { [0x0FE00] = 0x2F801 },
+ [0x04E39] = { [0x0FE00] = 0x0F95E },
+ [0x04E3D] = { [0x0FE00] = 0x2F800 },
+ [0x04E41] = { [0x0FE00] = 0x2F802 },
+ [0x04E82] = { [0x0FE00] = 0x0F91B },
+ [0x04E86] = { [0x0FE00] = 0x0F9BA },
+ [0x04EAE] = { [0x0FE00] = 0x0F977 },
+ [0x04EC0] = { [0x0FE00] = 0x0F9FD },
+ [0x04ECC] = { [0x0FE00] = 0x2F819 },
+ [0x04EE4] = { [0x0FE00] = 0x0F9A8 },
+ [0x04F60] = { [0x0FE00] = 0x2F804 },
+ [0x04F80] = { [0x0FE00] = 0x0FA73 },
+ [0x04F86] = { [0x0FE00] = 0x0F92D },
+ [0x04F8B] = { [0x0FE00] = 0x0F9B5 },
+ [0x04FAE] = { [0x0FE00] = 0x0FA30, [0x0FE01] = 0x2F805 },
+ [0x04FBB] = { [0x0FE00] = 0x2F806 },
+ [0x04FBF] = { [0x0FE00] = 0x0F965 },
+ [0x05002] = { [0x0FE00] = 0x2F807 },
+ [0x0502B] = { [0x0FE00] = 0x0F9D4 },
+ [0x0507A] = { [0x0FE00] = 0x2F808 },
+ [0x05099] = { [0x0FE00] = 0x2F809 },
+ [0x050CF] = { [0x0FE00] = 0x2F80B },
+ [0x050DA] = { [0x0FE00] = 0x0F9BB },
+ [0x050E7] = { [0x0FE00] = 0x0FA31, [0x0FE01] = 0x2F80A },
+ [0x05140] = { [0x0FE00] = 0x0FA0C },
+ [0x05145] = { [0x0FE00] = 0x0FA74 },
+ [0x0514D] = { [0x0FE00] = 0x0FA32, [0x0FE01] = 0x2F80E },
+ [0x05154] = { [0x0FE00] = 0x2F80F },
+ [0x05164] = { [0x0FE00] = 0x2F810 },
+ [0x05167] = { [0x0FE00] = 0x2F814 },
+ [0x05168] = { [0x0FE00] = 0x0FA72 },
+ [0x05169] = { [0x0FE00] = 0x0F978 },
+ [0x0516D] = { [0x0FE00] = 0x0F9D1 },
+ [0x05177] = { [0x0FE00] = 0x2F811 },
+ [0x05180] = { [0x0FE00] = 0x0FA75 },
+ [0x0518D] = { [0x0FE00] = 0x2F815 },
+ [0x05192] = { [0x0FE00] = 0x2F8D2 },
+ [0x05195] = { [0x0FE00] = 0x2F8D3 },
+ [0x05197] = { [0x0FE00] = 0x2F817 },
+ [0x051A4] = { [0x0FE00] = 0x2F818 },
+ [0x051AC] = { [0x0FE00] = 0x2F81A },
+ [0x051B5] = { [0x0FE00] = 0x0FA71, [0x0FE01] = 0x2F81B },
+ [0x051B7] = { [0x0FE00] = 0x0F92E },
+ [0x051C9] = { [0x0FE00] = 0x0F979 },
+ [0x051CC] = { [0x0FE00] = 0x0F955 },
+ [0x051DC] = { [0x0FE00] = 0x0F954 },
+ [0x051DE] = { [0x0FE00] = 0x0FA15 },
+ [0x051F5] = { [0x0FE00] = 0x2F81D },
+ [0x05203] = { [0x0FE00] = 0x2F81E },
+ [0x05207] = { [0x0FE00] = 0x0FA00, [0x0FE01] = 0x2F850 },
+ [0x05217] = { [0x0FE00] = 0x0F99C },
+ [0x05229] = { [0x0FE00] = 0x0F9DD },
+ [0x0523A] = { [0x0FE00] = 0x0F9FF },
+ [0x0523B] = { [0x0FE00] = 0x2F820 },
+ [0x05246] = { [0x0FE00] = 0x2F821 },
+ [0x05272] = { [0x0FE00] = 0x2F822 },
+ [0x05277] = { [0x0FE00] = 0x2F823 },
+ [0x05289] = { [0x0FE00] = 0x0F9C7 },
+ [0x0529B] = { [0x0FE00] = 0x0F98A },
+ [0x052A3] = { [0x0FE00] = 0x0F99D },
+ [0x052B3] = { [0x0FE00] = 0x2F992 },
+ [0x052C7] = { [0x0FE00] = 0x0FA76, [0x0FE01] = 0x2F825 },
+ [0x052C9] = { [0x0FE00] = 0x0FA33, [0x0FE01] = 0x2F826 },
+ [0x052D2] = { [0x0FE00] = 0x0F952 },
+ [0x052DE] = { [0x0FE00] = 0x0F92F },
+ [0x052E4] = { [0x0FE00] = 0x0FA34, [0x0FE01] = 0x2F827 },
+ [0x052F5] = { [0x0FE00] = 0x0F97F },
+ [0x052FA] = { [0x0FE00] = 0x0FA77, [0x0FE01] = 0x2F828 },
+ [0x05305] = { [0x0FE00] = 0x2F829 },
+ [0x05306] = { [0x0FE00] = 0x2F82A },
+ [0x05317] = { [0x0FE00] = 0x0F963, [0x0FE01] = 0x2F82B },
+ [0x0533F] = { [0x0FE00] = 0x0F9EB },
+ [0x05349] = { [0x0FE00] = 0x2F82C },
+ [0x05351] = { [0x0FE00] = 0x0FA35, [0x0FE01] = 0x2F82D },
+ [0x0535A] = { [0x0FE00] = 0x2F82E },
+ [0x05373] = { [0x0FE00] = 0x2F82F },
+ [0x05375] = { [0x0FE00] = 0x0F91C },
+ [0x0537D] = { [0x0FE00] = 0x2F830 },
+ [0x0537F] = { [0x0FE00] = 0x2F831, [0x0FE01] = 0x2F832, [0x0FE02] = 0x2F833 },
+ [0x053C3] = { [0x0FE00] = 0x0F96B },
+ [0x053CA] = { [0x0FE00] = 0x2F836 },
+ [0x053DF] = { [0x0FE00] = 0x2F837 },
+ [0x053E5] = { [0x0FE00] = 0x0F906 },
+ [0x053EB] = { [0x0FE00] = 0x2F839 },
+ [0x053F1] = { [0x0FE00] = 0x2F83A },
+ [0x05406] = { [0x0FE00] = 0x2F83B },
+ [0x0540F] = { [0x0FE00] = 0x0F9DE },
+ [0x0541D] = { [0x0FE00] = 0x0F9ED },
+ [0x05438] = { [0x0FE00] = 0x2F83D },
+ [0x05442] = { [0x0FE00] = 0x0F980 },
+ [0x05448] = { [0x0FE00] = 0x2F83E },
+ [0x05468] = { [0x0FE00] = 0x2F83F },
+ [0x0549E] = { [0x0FE00] = 0x2F83C },
+ [0x054A2] = { [0x0FE00] = 0x2F840 },
+ [0x054BD] = { [0x0FE00] = 0x0F99E },
+ [0x054F6] = { [0x0FE00] = 0x2F841 },
+ [0x05510] = { [0x0FE00] = 0x2F842 },
+ [0x05553] = { [0x0FE00] = 0x2F843 },
+ [0x05555] = { [0x0FE00] = 0x0FA79 },
+ [0x05563] = { [0x0FE00] = 0x2F844 },
+ [0x05584] = { [0x0FE00] = 0x2F845, [0x0FE01] = 0x2F846 },
+ [0x05587] = { [0x0FE00] = 0x0F90B },
+ [0x05599] = { [0x0FE00] = 0x0FA7A, [0x0FE01] = 0x2F847 },
+ [0x0559D] = { [0x0FE00] = 0x0FA36, [0x0FE01] = 0x0FA78 },
+ [0x055AB] = { [0x0FE00] = 0x2F848 },
+ [0x055B3] = { [0x0FE00] = 0x2F849 },
+ [0x055C0] = { [0x0FE00] = 0x0FA0D },
+ [0x055C2] = { [0x0FE00] = 0x2F84A },
+ [0x055E2] = { [0x0FE00] = 0x0FA7B },
+ [0x05606] = { [0x0FE00] = 0x0FA37, [0x0FE01] = 0x2F84C },
+ [0x05651] = { [0x0FE00] = 0x2F84E },
+ [0x05668] = { [0x0FE00] = 0x0FA38 },
+ [0x05674] = { [0x0FE00] = 0x2F84F },
+ [0x056F9] = { [0x0FE00] = 0x0F9A9 },
+ [0x05716] = { [0x0FE00] = 0x2F84B },
+ [0x05717] = { [0x0FE00] = 0x2F84D },
+ [0x0578B] = { [0x0FE00] = 0x2F855 },
+ [0x057CE] = { [0x0FE00] = 0x2F852 },
+ [0x057F4] = { [0x0FE00] = 0x2F853 },
+ [0x0580D] = { [0x0FE00] = 0x2F854 },
+ [0x05831] = { [0x0FE00] = 0x2F857 },
+ [0x05832] = { [0x0FE00] = 0x2F856 },
+ [0x05840] = { [0x0FE00] = 0x0FA39 },
+ [0x0585A] = { [0x0FE00] = 0x0FA10, [0x0FE01] = 0x0FA7C },
+ [0x0585E] = { [0x0FE00] = 0x0F96C },
+ [0x058A8] = { [0x0FE00] = 0x0FA3A },
+ [0x058AC] = { [0x0FE00] = 0x2F858 },
+ [0x058B3] = { [0x0FE00] = 0x0FA7D },
+ [0x058D8] = { [0x0FE00] = 0x0F94A },
+ [0x058DF] = { [0x0FE00] = 0x0F942 },
+ [0x058EE] = { [0x0FE00] = 0x2F851 },
+ [0x058F2] = { [0x0FE00] = 0x2F85A },
+ [0x058F7] = { [0x0FE00] = 0x2F85B },
+ [0x05906] = { [0x0FE00] = 0x2F85C },
+ [0x0591A] = { [0x0FE00] = 0x2F85D },
+ [0x05922] = { [0x0FE00] = 0x2F85E },
+ [0x05944] = { [0x0FE00] = 0x0FA7E },
+ [0x05948] = { [0x0FE00] = 0x0F90C },
+ [0x05951] = { [0x0FE00] = 0x0F909 },
+ [0x05954] = { [0x0FE00] = 0x0FA7F },
+ [0x05962] = { [0x0FE00] = 0x2F85F },
+ [0x05973] = { [0x0FE00] = 0x0F981 },
+ [0x059D8] = { [0x0FE00] = 0x2F865 },
+ [0x059EC] = { [0x0FE00] = 0x2F862 },
+ [0x05A1B] = { [0x0FE00] = 0x2F863 },
+ [0x05A27] = { [0x0FE00] = 0x2F864 },
+ [0x05A62] = { [0x0FE00] = 0x0FA80 },
+ [0x05A66] = { [0x0FE00] = 0x2F866 },
+ [0x05AB5] = { [0x0FE00] = 0x2F986 },
+ [0x05B08] = { [0x0FE00] = 0x2F869 },
+ [0x05B28] = { [0x0FE00] = 0x0FA81 },
+ [0x05B3E] = { [0x0FE00] = 0x2F86A, [0x0FE01] = 0x2F86B },
+ [0x05B85] = { [0x0FE00] = 0x0FA04 },
+ [0x05BC3] = { [0x0FE00] = 0x2F86D },
+ [0x05BD8] = { [0x0FE00] = 0x2F86E },
+ [0x05BE7] = { [0x0FE00] = 0x0F95F, [0x0FE01] = 0x0F9AA, [0x0FE02] = 0x2F86F },
+ [0x05BEE] = { [0x0FE00] = 0x0F9BC },
+ [0x05BF3] = { [0x0FE00] = 0x2F870 },
+ [0x05BFF] = { [0x0FE00] = 0x2F872 },
+ [0x05C06] = { [0x0FE00] = 0x2F873 },
+ [0x05C22] = { [0x0FE00] = 0x2F875 },
+ [0x05C3F] = { [0x0FE00] = 0x0F9BD },
+ [0x05C60] = { [0x0FE00] = 0x2F877 },
+ [0x05C62] = { [0x0FE00] = 0x0F94B },
+ [0x05C64] = { [0x0FE00] = 0x0FA3B },
+ [0x05C65] = { [0x0FE00] = 0x0F9DF },
+ [0x05C6E] = { [0x0FE00] = 0x0FA3C, [0x0FE01] = 0x2F878 },
+ [0x05C8D] = { [0x0FE00] = 0x2F87A },
+ [0x05CC0] = { [0x0FE00] = 0x2F879 },
+ [0x05D19] = { [0x0FE00] = 0x0F9D5 },
+ [0x05D43] = { [0x0FE00] = 0x2F87C },
+ [0x05D50] = { [0x0FE00] = 0x0F921 },
+ [0x05D6B] = { [0x0FE00] = 0x2F87F },
+ [0x05D6E] = { [0x0FE00] = 0x2F87E },
+ [0x05D7C] = { [0x0FE00] = 0x2F880 },
+ [0x05DB2] = { [0x0FE00] = 0x2F9F4 },
+ [0x05DBA] = { [0x0FE00] = 0x0F9AB },
+ [0x05DE1] = { [0x0FE00] = 0x2F881 },
+ [0x05DE2] = { [0x0FE00] = 0x2F882 },
+ [0x05DFD] = { [0x0FE00] = 0x2F884 },
+ [0x05E28] = { [0x0FE00] = 0x2F885 },
+ [0x05E3D] = { [0x0FE00] = 0x2F886 },
+ [0x05E69] = { [0x0FE00] = 0x2F887 },
+ [0x05E74] = { [0x0FE00] = 0x0F98E },
+ [0x05EA6] = { [0x0FE00] = 0x0FA01 },
+ [0x05EB0] = { [0x0FE00] = 0x2F88B },
+ [0x05EB3] = { [0x0FE00] = 0x2F88C },
+ [0x05EB6] = { [0x0FE00] = 0x2F88D },
+ [0x05EC9] = { [0x0FE00] = 0x0F9A2 },
+ [0x05ECA] = { [0x0FE00] = 0x0F928, [0x0FE01] = 0x2F88E },
+ [0x05ED2] = { [0x0FE00] = 0x0FA82 },
+ [0x05ED3] = { [0x0FE00] = 0x0FA0B },
+ [0x05ED9] = { [0x0FE00] = 0x0FA83 },
+ [0x05EEC] = { [0x0FE00] = 0x0F982 },
+ [0x05EFE] = { [0x0FE00] = 0x2F890 },
+ [0x05F04] = { [0x0FE00] = 0x0F943 },
+ [0x05F22] = { [0x0FE00] = 0x2F894, [0x0FE01] = 0x2F895 },
+ [0x05F53] = { [0x0FE00] = 0x2F874 },
+ [0x05F62] = { [0x0FE00] = 0x2F899 },
+ [0x05F69] = { [0x0FE00] = 0x0FA84 },
+ [0x05F6B] = { [0x0FE00] = 0x2F89A },
+ [0x05F8B] = { [0x0FE00] = 0x0F9D8 },
+ [0x05F9A] = { [0x0FE00] = 0x2F89C },
+ [0x05FA9] = { [0x0FE00] = 0x0F966 },
+ [0x05FAD] = { [0x0FE00] = 0x0FA85 },
+ [0x05FCD] = { [0x0FE00] = 0x2F89D },
+ [0x05FD7] = { [0x0FE00] = 0x2F89E },
+ [0x05FF5] = { [0x0FE00] = 0x0F9A3 },
+ [0x05FF9] = { [0x0FE00] = 0x2F89F },
+ [0x06012] = { [0x0FE00] = 0x0F960 },
+ [0x0601C] = { [0x0FE00] = 0x0F9AC },
+ [0x06075] = { [0x0FE00] = 0x0FA6B },
+ [0x06081] = { [0x0FE00] = 0x2F8A0 },
+ [0x06094] = { [0x0FE00] = 0x0FA3D, [0x0FE01] = 0x2F8A3 },
+ [0x060C7] = { [0x0FE00] = 0x2F8A5 },
+ [0x060D8] = { [0x0FE00] = 0x0FA86 },
+ [0x060E1] = { [0x0FE00] = 0x0F9B9 },
+ [0x06108] = { [0x0FE00] = 0x0FA88 },
+ [0x06144] = { [0x0FE00] = 0x0F9D9 },
+ [0x06148] = { [0x0FE00] = 0x2F8A6 },
+ [0x0614C] = { [0x0FE00] = 0x2F8A7, [0x0FE01] = 0x2F8A9 },
+ [0x0614E] = { [0x0FE00] = 0x0FA87, [0x0FE01] = 0x2F8A8 },
+ [0x06160] = { [0x0FE00] = 0x0FA8A },
+ [0x06168] = { [0x0FE00] = 0x0FA3E },
+ [0x0617A] = { [0x0FE00] = 0x2F8AA },
+ [0x0618E] = { [0x0FE00] = 0x0FA3F, [0x0FE01] = 0x0FA89, [0x0FE02] = 0x2F8AB },
+ [0x06190] = { [0x0FE00] = 0x0F98F },
+ [0x061A4] = { [0x0FE00] = 0x2F8AD },
+ [0x061AF] = { [0x0FE00] = 0x2F8AE },
+ [0x061B2] = { [0x0FE00] = 0x2F8AC },
+ [0x061DE] = { [0x0FE00] = 0x2F8AF },
+ [0x061F2] = { [0x0FE00] = 0x0FA40, [0x0FE01] = 0x0FA8B, [0x0FE02] = 0x2F8B0 },
+ [0x061F6] = { [0x0FE00] = 0x0F90D, [0x0FE01] = 0x2F8B1 },
+ [0x06200] = { [0x0FE00] = 0x0F990 },
+ [0x06210] = { [0x0FE00] = 0x2F8B2 },
+ [0x0621B] = { [0x0FE00] = 0x2F8B3 },
+ [0x0622E] = { [0x0FE00] = 0x0F9D2 },
+ [0x06234] = { [0x0FE00] = 0x0FA8C },
+ [0x0625D] = { [0x0FE00] = 0x2F8B4 },
+ [0x062B1] = { [0x0FE00] = 0x2F8B5 },
+ [0x062C9] = { [0x0FE00] = 0x0F925 },
+ [0x062CF] = { [0x0FE00] = 0x0F95B },
+ [0x062D3] = { [0x0FE00] = 0x0FA02 },
+ [0x062D4] = { [0x0FE00] = 0x2F8B6 },
+ [0x062FC] = { [0x0FE00] = 0x2F8BA },
+ [0x062FE] = { [0x0FE00] = 0x0F973 },
+ [0x0633D] = { [0x0FE00] = 0x2F8B9 },
+ [0x06350] = { [0x0FE00] = 0x2F8B7 },
+ [0x06368] = { [0x0FE00] = 0x2F8BB },
+ [0x0637B] = { [0x0FE00] = 0x0F9A4 },
+ [0x06383] = { [0x0FE00] = 0x2F8BC },
+ [0x063A0] = { [0x0FE00] = 0x0F975 },
+ [0x063A9] = { [0x0FE00] = 0x2F8C1 },
+ [0x063C4] = { [0x0FE00] = 0x0FA8D },
+ [0x063C5] = { [0x0FE00] = 0x2F8C0 },
+ [0x063E4] = { [0x0FE00] = 0x2F8BD },
+ [0x0641C] = { [0x0FE00] = 0x0FA8E },
+ [0x06422] = { [0x0FE00] = 0x2F8BF },
+ [0x06452] = { [0x0FE00] = 0x0FA8F },
+ [0x06469] = { [0x0FE00] = 0x2F8C3 },
+ [0x06477] = { [0x0FE00] = 0x2F8C6 },
+ [0x0647E] = { [0x0FE00] = 0x2F8C4 },
+ [0x0649A] = { [0x0FE00] = 0x0F991 },
+ [0x0649D] = { [0x0FE00] = 0x2F8C5 },
+ [0x064C4] = { [0x0FE00] = 0x0F930 },
+ [0x0654F] = { [0x0FE00] = 0x0FA41, [0x0FE01] = 0x2F8C8 },
+ [0x06556] = { [0x0FE00] = 0x0FA90 },
+ [0x0656C] = { [0x0FE00] = 0x2F8C9 },
+ [0x06578] = { [0x0FE00] = 0x0F969 },
+ [0x06599] = { [0x0FE00] = 0x0F9BE },
+ [0x065C5] = { [0x0FE00] = 0x0F983 },
+ [0x065E2] = { [0x0FE00] = 0x0FA42 },
+ [0x065E3] = { [0x0FE00] = 0x2F8CB },
+ [0x06613] = { [0x0FE00] = 0x0F9E0 },
+ [0x06649] = { [0x0FE00] = 0x2F8CD },
+ [0x06674] = { [0x0FE00] = 0x0FA12, [0x0FE01] = 0x0FA91 },
+ [0x06688] = { [0x0FE00] = 0x0F9C5 },
+ [0x06691] = { [0x0FE00] = 0x0FA43, [0x0FE01] = 0x2F8CF },
+ [0x0669C] = { [0x0FE00] = 0x2F8D5 },
+ [0x066B4] = { [0x0FE00] = 0x0FA06 },
+ [0x066C6] = { [0x0FE00] = 0x0F98B },
+ [0x066F4] = { [0x0FE00] = 0x0F901 },
+ [0x066F8] = { [0x0FE00] = 0x2F8CC },
+ [0x06700] = { [0x0FE00] = 0x2F8D4 },
+ [0x06717] = { [0x0FE00] = 0x0F929, [0x0FE01] = 0x0FA92, [0x0FE02] = 0x2F8D8 },
+ [0x0671B] = { [0x0FE00] = 0x0FA93, [0x0FE01] = 0x2F8D9 },
+ [0x06721] = { [0x0FE00] = 0x2F8DA },
+ [0x0674E] = { [0x0FE00] = 0x0F9E1 },
+ [0x06753] = { [0x0FE00] = 0x2F8DC },
+ [0x06756] = { [0x0FE00] = 0x0FA94 },
+ [0x0675E] = { [0x0FE00] = 0x2F8DB },
+ [0x0677B] = { [0x0FE00] = 0x0F9C8 },
+ [0x06785] = { [0x0FE00] = 0x2F8E0 },
+ [0x06797] = { [0x0FE00] = 0x0F9F4 },
+ [0x067F3] = { [0x0FE00] = 0x0F9C9 },
+ [0x067FA] = { [0x0FE00] = 0x2F8DF },
+ [0x06817] = { [0x0FE00] = 0x0F9DA },
+ [0x0681F] = { [0x0FE00] = 0x2F8E5 },
+ [0x06852] = { [0x0FE00] = 0x2F8E1 },
+ [0x06881] = { [0x0FE00] = 0x0F97A },
+ [0x06885] = { [0x0FE00] = 0x0FA44, [0x0FE01] = 0x2F8E2 },
+ [0x0688E] = { [0x0FE00] = 0x2F8E4 },
+ [0x068A8] = { [0x0FE00] = 0x0F9E2 },
+ [0x06914] = { [0x0FE00] = 0x2F8E6 },
+ [0x06942] = { [0x0FE00] = 0x2F8E8 },
+ [0x069A3] = { [0x0FE00] = 0x2F8E9 },
+ [0x069EA] = { [0x0FE00] = 0x2F8EA },
+ [0x06A02] = { [0x0FE00] = 0x0F914, [0x0FE01] = 0x0F95C, [0x0FE02] = 0x0F9BF },
+ [0x06A13] = { [0x0FE00] = 0x0F94C },
+ [0x06AA8] = { [0x0FE00] = 0x2F8EB },
+ [0x06AD3] = { [0x0FE00] = 0x0F931 },
+ [0x06ADB] = { [0x0FE00] = 0x2F8ED },
+ [0x06B04] = { [0x0FE00] = 0x0F91D },
+ [0x06B21] = { [0x0FE00] = 0x2F8EF },
+ [0x06B54] = { [0x0FE00] = 0x2F8F1 },
+ [0x06B72] = { [0x0FE00] = 0x2F8F3 },
+ [0x06B77] = { [0x0FE00] = 0x0F98C },
+ [0x06B79] = { [0x0FE00] = 0x0FA95 },
+ [0x06B9F] = { [0x0FE00] = 0x2F8F4 },
+ [0x06BAE] = { [0x0FE00] = 0x0F9A5 },
+ [0x06BBA] = { [0x0FE00] = 0x0F970, [0x0FE01] = 0x0FA96, [0x0FE02] = 0x2F8F5 },
+ [0x06BBB] = { [0x0FE00] = 0x2F8F6 },
+ [0x06C4E] = { [0x0FE00] = 0x2F8FA },
+ [0x06C67] = { [0x0FE00] = 0x2F8FE },
+ [0x06C88] = { [0x0FE00] = 0x0F972 },
+ [0x06CBF] = { [0x0FE00] = 0x2F8FC },
+ [0x06CCC] = { [0x0FE00] = 0x0F968 },
+ [0x06CCD] = { [0x0FE00] = 0x2F8FD },
+ [0x06CE5] = { [0x0FE00] = 0x0F9E3 },
+ [0x06D16] = { [0x0FE00] = 0x2F8FF },
+ [0x06D1B] = { [0x0FE00] = 0x0F915 },
+ [0x06D1E] = { [0x0FE00] = 0x0FA05 },
+ [0x06D34] = { [0x0FE00] = 0x2F907 },
+ [0x06D3E] = { [0x0FE00] = 0x2F900 },
+ [0x06D41] = { [0x0FE00] = 0x0F9CA, [0x0FE01] = 0x0FA97, [0x0FE02] = 0x2F902 },
+ [0x06D69] = { [0x0FE00] = 0x2F903 },
+ [0x06D6A] = { [0x0FE00] = 0x0F92A },
+ [0x06D77] = { [0x0FE00] = 0x0FA45, [0x0FE01] = 0x2F901 },
+ [0x06D78] = { [0x0FE00] = 0x2F904 },
+ [0x06D85] = { [0x0FE00] = 0x2F905 },
+ [0x06DCB] = { [0x0FE00] = 0x0F9F5 },
+ [0x06DDA] = { [0x0FE00] = 0x0F94D },
+ [0x06DEA] = { [0x0FE00] = 0x0F9D6 },
+ [0x06DF9] = { [0x0FE00] = 0x2F90E },
+ [0x06E1A] = { [0x0FE00] = 0x0FA46 },
+ [0x06E2F] = { [0x0FE00] = 0x2F908 },
+ [0x06E6E] = { [0x0FE00] = 0x2F909 },
+ [0x06E9C] = { [0x0FE00] = 0x0F9CB },
+ [0x06EBA] = { [0x0FE00] = 0x0F9EC },
+ [0x06EC7] = { [0x0FE00] = 0x2F90C },
+ [0x06ECB] = { [0x0FE00] = 0x0FA99, [0x0FE01] = 0x2F90B },
+ [0x06ED1] = { [0x0FE00] = 0x0F904 },
+ [0x06EDB] = { [0x0FE00] = 0x0FA98 },
+ [0x06F0F] = { [0x0FE00] = 0x0F94E },
+ [0x06F22] = { [0x0FE00] = 0x0FA47, [0x0FE01] = 0x0FA9A },
+ [0x06F23] = { [0x0FE00] = 0x0F992 },
+ [0x06F6E] = { [0x0FE00] = 0x2F90F },
+ [0x06FC6] = { [0x0FE00] = 0x2F912 },
+ [0x06FEB] = { [0x0FE00] = 0x0F922 },
+ [0x06FFE] = { [0x0FE00] = 0x0F984 },
+ [0x0701B] = { [0x0FE00] = 0x2F915 },
+ [0x0701E] = { [0x0FE00] = 0x0FA9B, [0x0FE01] = 0x2F914 },
+ [0x07039] = { [0x0FE00] = 0x2F913 },
+ [0x0704A] = { [0x0FE00] = 0x2F917 },
+ [0x07070] = { [0x0FE00] = 0x2F835 },
+ [0x07077] = { [0x0FE00] = 0x2F919 },
+ [0x0707D] = { [0x0FE00] = 0x2F918 },
+ [0x07099] = { [0x0FE00] = 0x0F9FB },
+ [0x070AD] = { [0x0FE00] = 0x2F91A },
+ [0x070C8] = { [0x0FE00] = 0x0F99F },
+ [0x070D9] = { [0x0FE00] = 0x0F916 },
+ [0x07145] = { [0x0FE00] = 0x2F91C },
+ [0x07149] = { [0x0FE00] = 0x0F993 },
+ [0x0716E] = { [0x0FE00] = 0x0FA48, [0x0FE01] = 0x0FA9C },
+ [0x0719C] = { [0x0FE00] = 0x2F91E },
+ [0x071CE] = { [0x0FE00] = 0x0F9C0 },
+ [0x071D0] = { [0x0FE00] = 0x0F9EE },
+ [0x07210] = { [0x0FE00] = 0x0F932 },
+ [0x0721B] = { [0x0FE00] = 0x0F91E },
+ [0x07228] = { [0x0FE00] = 0x2F920 },
+ [0x0722B] = { [0x0FE00] = 0x0FA49 },
+ [0x07235] = { [0x0FE00] = 0x0FA9E, [0x0FE01] = 0x2F921 },
+ [0x07250] = { [0x0FE00] = 0x2F922 },
+ [0x07262] = { [0x0FE00] = 0x0F946 },
+ [0x07280] = { [0x0FE00] = 0x2F924 },
+ [0x07295] = { [0x0FE00] = 0x2F925 },
+ [0x072AF] = { [0x0FE00] = 0x0FA9F },
+ [0x072C0] = { [0x0FE00] = 0x0F9FA },
+ [0x072FC] = { [0x0FE00] = 0x0F92B },
+ [0x0732A] = { [0x0FE00] = 0x0FA16, [0x0FE01] = 0x0FAA0 },
+ [0x07375] = { [0x0FE00] = 0x0F9A7 },
+ [0x0737A] = { [0x0FE00] = 0x2F928 },
+ [0x07387] = { [0x0FE00] = 0x0F961, [0x0FE01] = 0x0F9DB },
+ [0x0738B] = { [0x0FE00] = 0x2F929 },
+ [0x073A5] = { [0x0FE00] = 0x2F92B },
+ [0x073B2] = { [0x0FE00] = 0x0F9AD },
+ [0x073DE] = { [0x0FE00] = 0x0F917 },
+ [0x07406] = { [0x0FE00] = 0x0F9E4 },
+ [0x07409] = { [0x0FE00] = 0x0F9CC },
+ [0x07422] = { [0x0FE00] = 0x0FA4A },
+ [0x07447] = { [0x0FE00] = 0x2F92E },
+ [0x0745C] = { [0x0FE00] = 0x2F92F },
+ [0x07469] = { [0x0FE00] = 0x0F9AE },
+ [0x07471] = { [0x0FE00] = 0x0FAA1, [0x0FE01] = 0x2F930 },
+ [0x07485] = { [0x0FE00] = 0x2F931 },
+ [0x07489] = { [0x0FE00] = 0x0F994 },
+ [0x07498] = { [0x0FE00] = 0x0F9EF },
+ [0x074CA] = { [0x0FE00] = 0x2F932 },
+ [0x07506] = { [0x0FE00] = 0x0FAA2 },
+ [0x07524] = { [0x0FE00] = 0x2F934 },
+ [0x0753B] = { [0x0FE00] = 0x0FAA3 },
+ [0x0753E] = { [0x0FE00] = 0x2F936 },
+ [0x07559] = { [0x0FE00] = 0x0F9CD },
+ [0x07565] = { [0x0FE00] = 0x0F976 },
+ [0x07570] = { [0x0FE00] = 0x0F962, [0x0FE01] = 0x2F938 },
+ [0x075E2] = { [0x0FE00] = 0x0F9E5 },
+ [0x07610] = { [0x0FE00] = 0x2F93A },
+ [0x0761D] = { [0x0FE00] = 0x0FAA4 },
+ [0x0761F] = { [0x0FE00] = 0x0FAA5 },
+ [0x07642] = { [0x0FE00] = 0x0F9C1 },
+ [0x07669] = { [0x0FE00] = 0x0F90E },
+ [0x076CA] = { [0x0FE00] = 0x0FA17, [0x0FE01] = 0x0FAA6 },
+ [0x076DB] = { [0x0FE00] = 0x0FAA7 },
+ [0x076E7] = { [0x0FE00] = 0x0F933 },
+ [0x076F4] = { [0x0FE00] = 0x0FAA8, [0x0FE01] = 0x2F940 },
+ [0x07701] = { [0x0FE00] = 0x0F96D },
+ [0x0771E] = { [0x0FE00] = 0x2F945 },
+ [0x0771F] = { [0x0FE00] = 0x2F946, [0x0FE01] = 0x2F947 },
+ [0x07740] = { [0x0FE00] = 0x0FAAA },
+ [0x0774A] = { [0x0FE00] = 0x0FAA9, [0x0FE01] = 0x2F948 },
+ [0x0778B] = { [0x0FE00] = 0x2F94A },
+ [0x077A7] = { [0x0FE00] = 0x0FA9D },
+ [0x0784E] = { [0x0FE00] = 0x2F94E },
+ [0x0786B] = { [0x0FE00] = 0x0F9CE },
+ [0x0788C] = { [0x0FE00] = 0x0F93B, [0x0FE01] = 0x2F94F },
+ [0x07891] = { [0x0FE00] = 0x0FA4B },
+ [0x078CA] = { [0x0FE00] = 0x0F947 },
+ [0x078CC] = { [0x0FE00] = 0x0FAAB, [0x0FE01] = 0x2F950 },
+ [0x078FB] = { [0x0FE00] = 0x0F964 },
+ [0x0792A] = { [0x0FE00] = 0x0F985 },
+ [0x0793C] = { [0x0FE00] = 0x0FA18 },
+ [0x0793E] = { [0x0FE00] = 0x0FA4C },
+ [0x07948] = { [0x0FE00] = 0x0FA4E },
+ [0x07949] = { [0x0FE00] = 0x0FA4D },
+ [0x07950] = { [0x0FE00] = 0x0FA4F },
+ [0x07956] = { [0x0FE00] = 0x0FA50, [0x0FE01] = 0x2F953 },
+ [0x0795D] = { [0x0FE00] = 0x0FA51 },
+ [0x0795E] = { [0x0FE00] = 0x0FA19 },
+ [0x07965] = { [0x0FE00] = 0x0FA1A },
+ [0x0797F] = { [0x0FE00] = 0x0F93C },
+ [0x0798D] = { [0x0FE00] = 0x0FA52 },
+ [0x0798E] = { [0x0FE00] = 0x0FA53 },
+ [0x0798F] = { [0x0FE00] = 0x0FA1B, [0x0FE01] = 0x2F956 },
+ [0x079AE] = { [0x0FE00] = 0x0F9B6 },
+ [0x079CA] = { [0x0FE00] = 0x0F995 },
+ [0x079EB] = { [0x0FE00] = 0x2F957 },
+ [0x07A1C] = { [0x0FE00] = 0x0F956 },
+ [0x07A40] = { [0x0FE00] = 0x0FA54, [0x0FE01] = 0x2F959 },
+ [0x07A4A] = { [0x0FE00] = 0x2F95A },
+ [0x07A4F] = { [0x0FE00] = 0x2F95B },
+ [0x07A81] = { [0x0FE00] = 0x0FA55 },
+ [0x07AB1] = { [0x0FE00] = 0x0FAAC },
+ [0x07ACB] = { [0x0FE00] = 0x0F9F7 },
+ [0x07AEE] = { [0x0FE00] = 0x2F95F },
+ [0x07B20] = { [0x0FE00] = 0x0F9F8 },
+ [0x07BC0] = { [0x0FE00] = 0x0FA56, [0x0FE01] = 0x0FAAD },
+ [0x07BC6] = { [0x0FE00] = 0x2F962 },
+ [0x07BC9] = { [0x0FE00] = 0x2F963 },
+ [0x07C3E] = { [0x0FE00] = 0x0F9A6 },
+ [0x07C60] = { [0x0FE00] = 0x0F944 },
+ [0x07C7B] = { [0x0FE00] = 0x0FAAE },
+ [0x07C92] = { [0x0FE00] = 0x0F9F9 },
+ [0x07CBE] = { [0x0FE00] = 0x0FA1D },
+ [0x07CD2] = { [0x0FE00] = 0x2F966 },
+ [0x07CD6] = { [0x0FE00] = 0x0FA03 },
+ [0x07CE3] = { [0x0FE00] = 0x2F969 },
+ [0x07CE7] = { [0x0FE00] = 0x0F97B },
+ [0x07CE8] = { [0x0FE00] = 0x2F968 },
+ [0x07D00] = { [0x0FE00] = 0x2F96A },
+ [0x07D10] = { [0x0FE00] = 0x0F9CF },
+ [0x07D22] = { [0x0FE00] = 0x0F96A },
+ [0x07D2F] = { [0x0FE00] = 0x0F94F },
+ [0x07D5B] = { [0x0FE00] = 0x0FAAF },
+ [0x07D63] = { [0x0FE00] = 0x2F96C },
+ [0x07DA0] = { [0x0FE00] = 0x0F93D },
+ [0x07DBE] = { [0x0FE00] = 0x0F957 },
+ [0x07DC7] = { [0x0FE00] = 0x2F96E },
+ [0x07DF4] = { [0x0FE00] = 0x0F996, [0x0FE01] = 0x0FA57, [0x0FE02] = 0x0FAB0 },
+ [0x07E02] = { [0x0FE00] = 0x2F96F },
+ [0x07E09] = { [0x0FE00] = 0x0FA58 },
+ [0x07E37] = { [0x0FE00] = 0x0F950 },
+ [0x07E41] = { [0x0FE00] = 0x0FA59 },
+ [0x07E45] = { [0x0FE00] = 0x2F970 },
+ [0x07F3E] = { [0x0FE00] = 0x0FAB1 },
+ [0x07F72] = { [0x0FE00] = 0x0FA5A },
+ [0x07F79] = { [0x0FE00] = 0x0F9E6 },
+ [0x07F7A] = { [0x0FE00] = 0x2F976 },
+ [0x07F85] = { [0x0FE00] = 0x0F90F },
+ [0x07F95] = { [0x0FE00] = 0x2F978 },
+ [0x07F9A] = { [0x0FE00] = 0x0F9AF },
+ [0x07FBD] = { [0x0FE00] = 0x0FA1E },
+ [0x07FFA] = { [0x0FE00] = 0x2F979 },
+ [0x08001] = { [0x0FE00] = 0x0F934 },
+ [0x08005] = { [0x0FE00] = 0x0FA5B, [0x0FE01] = 0x0FAB2, [0x0FE02] = 0x2F97A },
+ [0x08046] = { [0x0FE00] = 0x0F9B0 },
+ [0x08060] = { [0x0FE00] = 0x2F97D },
+ [0x0806F] = { [0x0FE00] = 0x0F997 },
+ [0x08070] = { [0x0FE00] = 0x2F97F },
+ [0x0807E] = { [0x0FE00] = 0x0F945 },
+ [0x0808B] = { [0x0FE00] = 0x0F953 },
+ [0x080AD] = { [0x0FE00] = 0x2F8D6 },
+ [0x080B2] = { [0x0FE00] = 0x2F982 },
+ [0x08103] = { [0x0FE00] = 0x2F983 },
+ [0x0813E] = { [0x0FE00] = 0x2F985 },
+ [0x081D8] = { [0x0FE00] = 0x0F926 },
+ [0x081E8] = { [0x0FE00] = 0x0F9F6 },
+ [0x081ED] = { [0x0FE00] = 0x0FA5C },
+ [0x08201] = { [0x0FE00] = 0x2F893, [0x0FE01] = 0x2F98B },
+ [0x08204] = { [0x0FE00] = 0x2F98C },
+ [0x08218] = { [0x0FE00] = 0x0FA6D },
+ [0x0826F] = { [0x0FE00] = 0x0F97C },
+ [0x08279] = { [0x0FE00] = 0x0FA5D, [0x0FE01] = 0x0FA5E },
+ [0x0828B] = { [0x0FE00] = 0x2F990 },
+ [0x08291] = { [0x0FE00] = 0x2F98F },
+ [0x0829D] = { [0x0FE00] = 0x2F991 },
+ [0x082B1] = { [0x0FE00] = 0x2F993 },
+ [0x082B3] = { [0x0FE00] = 0x2F994 },
+ [0x082BD] = { [0x0FE00] = 0x2F995 },
+ [0x082E5] = { [0x0FE00] = 0x0F974, [0x0FE01] = 0x2F998 },
+ [0x082E6] = { [0x0FE00] = 0x2F996 },
+ [0x0831D] = { [0x0FE00] = 0x2F999 },
+ [0x08323] = { [0x0FE00] = 0x2F99C },
+ [0x08336] = { [0x0FE00] = 0x0F9FE },
+ [0x08352] = { [0x0FE00] = 0x0FAB3 },
+ [0x08353] = { [0x0FE00] = 0x2F9A0 },
+ [0x08363] = { [0x0FE00] = 0x2F99A },
+ [0x083AD] = { [0x0FE00] = 0x2F99B },
+ [0x083BD] = { [0x0FE00] = 0x2F99D },
+ [0x083C9] = { [0x0FE00] = 0x0F93E },
+ [0x083CA] = { [0x0FE00] = 0x2F9A1 },
+ [0x083CC] = { [0x0FE00] = 0x2F9A2 },
+ [0x083DC] = { [0x0FE00] = 0x2F9A3 },
+ [0x083E7] = { [0x0FE00] = 0x2F99E },
+ [0x083EF] = { [0x0FE00] = 0x0FAB4 },
+ [0x083F1] = { [0x0FE00] = 0x0F958 },
+ [0x0843D] = { [0x0FE00] = 0x0F918 },
+ [0x08449] = { [0x0FE00] = 0x0F96E },
+ [0x08457] = { [0x0FE00] = 0x0FA5F, [0x0FE01] = 0x2F99F },
+ [0x084EE] = { [0x0FE00] = 0x0F999 },
+ [0x084F1] = { [0x0FE00] = 0x2F9A8 },
+ [0x084F3] = { [0x0FE00] = 0x2F9A9 },
+ [0x084FC] = { [0x0FE00] = 0x0F9C2 },
+ [0x08516] = { [0x0FE00] = 0x2F9AA },
+ [0x08564] = { [0x0FE00] = 0x2F9AC },
+ [0x085CD] = { [0x0FE00] = 0x0F923 },
+ [0x085FA] = { [0x0FE00] = 0x0F9F0 },
+ [0x08606] = { [0x0FE00] = 0x0F935 },
+ [0x08612] = { [0x0FE00] = 0x0FA20 },
+ [0x0862D] = { [0x0FE00] = 0x0F91F },
+ [0x0863F] = { [0x0FE00] = 0x0F910 },
+ [0x08650] = { [0x0FE00] = 0x2F9B3 },
+ [0x0865C] = { [0x0FE00] = 0x0F936, [0x0FE01] = 0x2F9B4 },
+ [0x08667] = { [0x0FE00] = 0x2F9B5 },
+ [0x08669] = { [0x0FE00] = 0x2F9B6 },
+ [0x08688] = { [0x0FE00] = 0x2F9B8 },
+ [0x086A9] = { [0x0FE00] = 0x2F9B7 },
+ [0x086E2] = { [0x0FE00] = 0x2F9BA },
+ [0x0870E] = { [0x0FE00] = 0x2F9B9 },
+ [0x08728] = { [0x0FE00] = 0x2F9BC },
+ [0x0876B] = { [0x0FE00] = 0x2F9BD },
+ [0x08779] = { [0x0FE00] = 0x0FAB5, [0x0FE01] = 0x2F9BB },
+ [0x08786] = { [0x0FE00] = 0x2F9BE },
+ [0x087BA] = { [0x0FE00] = 0x0F911 },
+ [0x087E1] = { [0x0FE00] = 0x2F9C0 },
+ [0x08801] = { [0x0FE00] = 0x2F9C1 },
+ [0x0881F] = { [0x0FE00] = 0x0F927 },
+ [0x0884C] = { [0x0FE00] = 0x0FA08 },
+ [0x08860] = { [0x0FE00] = 0x2F9C3 },
+ [0x08863] = { [0x0FE00] = 0x2F9C4 },
+ [0x088C2] = { [0x0FE00] = 0x0F9A0 },
+ [0x088CF] = { [0x0FE00] = 0x0F9E7 },
+ [0x088D7] = { [0x0FE00] = 0x2F9C6 },
+ [0x088DE] = { [0x0FE00] = 0x2F9C7 },
+ [0x088E1] = { [0x0FE00] = 0x0F9E8 },
+ [0x088F8] = { [0x0FE00] = 0x0F912 },
+ [0x088FA] = { [0x0FE00] = 0x2F9C9 },
+ [0x08910] = { [0x0FE00] = 0x0FA60 },
+ [0x08941] = { [0x0FE00] = 0x0FAB6 },
+ [0x08964] = { [0x0FE00] = 0x0F924 },
+ [0x08986] = { [0x0FE00] = 0x0FAB7 },
+ [0x0898B] = { [0x0FE00] = 0x0FA0A },
+ [0x08996] = { [0x0FE00] = 0x0FA61, [0x0FE01] = 0x0FAB8 },
+ [0x08AA0] = { [0x0FE00] = 0x2F9CF },
+ [0x08AAA] = { [0x0FE00] = 0x0F96F, [0x0FE01] = 0x0F9A1 },
+ [0x08ABF] = { [0x0FE00] = 0x0FAB9 },
+ [0x08ACB] = { [0x0FE00] = 0x0FABB },
+ [0x08AD2] = { [0x0FE00] = 0x0F97D },
+ [0x08AD6] = { [0x0FE00] = 0x0F941 },
+ [0x08AED] = { [0x0FE00] = 0x0FABE, [0x0FE01] = 0x2F9D0 },
+ [0x08AF8] = { [0x0FE00] = 0x0FA22, [0x0FE01] = 0x0FABA },
+ [0x08AFE] = { [0x0FE00] = 0x0F95D, [0x0FE01] = 0x0FABD },
+ [0x08B01] = { [0x0FE00] = 0x0FA62, [0x0FE01] = 0x0FABC },
+ [0x08B39] = { [0x0FE00] = 0x0FA63, [0x0FE01] = 0x0FABF },
+ [0x08B58] = { [0x0FE00] = 0x0F9FC },
+ [0x08B80] = { [0x0FE00] = 0x0F95A },
+ [0x08B8A] = { [0x0FE00] = 0x0FAC0, [0x0FE01] = 0x2F9D1 },
+ [0x08C48] = { [0x0FE00] = 0x0F900 },
+ [0x08C55] = { [0x0FE00] = 0x2F9D2 },
+ [0x08CAB] = { [0x0FE00] = 0x2F9D4 },
+ [0x08CC1] = { [0x0FE00] = 0x2F9D5 },
+ [0x08CC2] = { [0x0FE00] = 0x0F948 },
+ [0x08CC8] = { [0x0FE00] = 0x0F903 },
+ [0x08CD3] = { [0x0FE00] = 0x0FA64 },
+ [0x08D08] = { [0x0FE00] = 0x0FA65, [0x0FE01] = 0x0FAC1 },
+ [0x08D1B] = { [0x0FE00] = 0x2F9D6 },
+ [0x08D77] = { [0x0FE00] = 0x2F9D7 },
+ [0x08DBC] = { [0x0FE00] = 0x2F9DB },
+ [0x08DCB] = { [0x0FE00] = 0x2F9DA },
+ [0x08DEF] = { [0x0FE00] = 0x0F937 },
+ [0x08DF0] = { [0x0FE00] = 0x2F9DC },
+ [0x08ECA] = { [0x0FE00] = 0x0F902 },
+ [0x08ED4] = { [0x0FE00] = 0x2F9DE },
+ [0x08F26] = { [0x0FE00] = 0x0F998 },
+ [0x08F2A] = { [0x0FE00] = 0x0F9D7 },
+ [0x08F38] = { [0x0FE00] = 0x0FAC2, [0x0FE01] = 0x2F9DF },
+ [0x08F3B] = { [0x0FE00] = 0x0FA07 },
+ [0x08F62] = { [0x0FE00] = 0x0F98D },
+ [0x08F9E] = { [0x0FE00] = 0x2F98D },
+ [0x08FB0] = { [0x0FE00] = 0x0F971 },
+ [0x08FB6] = { [0x0FE00] = 0x0FA66 },
+ [0x09023] = { [0x0FE00] = 0x0F99A },
+ [0x09038] = { [0x0FE00] = 0x0FA25, [0x0FE01] = 0x0FA67 },
+ [0x09072] = { [0x0FE00] = 0x0FAC3 },
+ [0x0907C] = { [0x0FE00] = 0x0F9C3 },
+ [0x0908F] = { [0x0FE00] = 0x0F913 },
+ [0x09094] = { [0x0FE00] = 0x2F9E2 },
+ [0x090CE] = { [0x0FE00] = 0x0F92C },
+ [0x090DE] = { [0x0FE00] = 0x0FA2E },
+ [0x090F1] = { [0x0FE00] = 0x2F9E3 },
+ [0x090FD] = { [0x0FE00] = 0x0FA26 },
+ [0x09111] = { [0x0FE00] = 0x2F9E4 },
+ [0x0911B] = { [0x0FE00] = 0x2F9E6 },
+ [0x0916A] = { [0x0FE00] = 0x0F919 },
+ [0x09199] = { [0x0FE00] = 0x0FAC4 },
+ [0x091B4] = { [0x0FE00] = 0x0F9B7 },
+ [0x091CC] = { [0x0FE00] = 0x0F9E9 },
+ [0x091CF] = { [0x0FE00] = 0x0F97E },
+ [0x091D1] = { [0x0FE00] = 0x0F90A },
+ [0x09234] = { [0x0FE00] = 0x0F9B1 },
+ [0x09238] = { [0x0FE00] = 0x2F9E7 },
+ [0x09276] = { [0x0FE00] = 0x0FAC5 },
+ [0x0927C] = { [0x0FE00] = 0x2F9EA },
+ [0x092D7] = { [0x0FE00] = 0x2F9E8 },
+ [0x092D8] = { [0x0FE00] = 0x2F9E9 },
+ [0x09304] = { [0x0FE00] = 0x0F93F },
+ [0x0934A] = { [0x0FE00] = 0x0F99B },
+ [0x093F9] = { [0x0FE00] = 0x2F9EB },
+ [0x09415] = { [0x0FE00] = 0x2F9EC },
+ [0x0958B] = { [0x0FE00] = 0x2F9EE },
+ [0x095AD] = { [0x0FE00] = 0x0F986 },
+ [0x095B7] = { [0x0FE00] = 0x2F9F0 },
+ [0x0962E] = { [0x0FE00] = 0x0F9C6 },
+ [0x0964B] = { [0x0FE00] = 0x0F951 },
+ [0x0964D] = { [0x0FE00] = 0x0FA09 },
+ [0x09675] = { [0x0FE00] = 0x0F959 },
+ [0x09678] = { [0x0FE00] = 0x0F9D3 },
+ [0x0967C] = { [0x0FE00] = 0x0FAC6 },
+ [0x09686] = { [0x0FE00] = 0x0F9DC },
+ [0x096A3] = { [0x0FE00] = 0x0F9F1 },
+ [0x096B7] = { [0x0FE00] = 0x0FA2F },
+ [0x096B8] = { [0x0FE00] = 0x0F9B8 },
+ [0x096C3] = { [0x0FE00] = 0x2F9F3 },
+ [0x096E2] = { [0x0FE00] = 0x0F9EA },
+ [0x096E3] = { [0x0FE00] = 0x0FA68, [0x0FE01] = 0x0FAC7 },
+ [0x096F6] = { [0x0FE00] = 0x0F9B2 },
+ [0x096F7] = { [0x0FE00] = 0x0F949 },
+ [0x09723] = { [0x0FE00] = 0x2F9F5 },
+ [0x09732] = { [0x0FE00] = 0x0F938 },
+ [0x09748] = { [0x0FE00] = 0x0F9B3 },
+ [0x09756] = { [0x0FE00] = 0x0FA1C, [0x0FE01] = 0x0FAC8 },
+ [0x097DB] = { [0x0FE00] = 0x0FAC9 },
+ [0x097E0] = { [0x0FE00] = 0x2F9FA },
+ [0x097FF] = { [0x0FE00] = 0x0FA69, [0x0FE01] = 0x0FACA },
+ [0x0980B] = { [0x0FE00] = 0x0FACB, [0x0FE01] = 0x2F9FE, [0x0FE02] = 0x2F9FF },
+ [0x09818] = { [0x0FE00] = 0x0F9B4 },
+ [0x09829] = { [0x0FE00] = 0x2FA00 },
+ [0x0983B] = { [0x0FE00] = 0x0FA6A, [0x0FE01] = 0x0FACC },
+ [0x0985E] = { [0x0FE00] = 0x0F9D0 },
+ [0x098E2] = { [0x0FE00] = 0x2FA02 },
+ [0x098EF] = { [0x0FE00] = 0x0FA2A },
+ [0x098FC] = { [0x0FE00] = 0x0FA2B },
+ [0x09928] = { [0x0FE00] = 0x0FA2C },
+ [0x09929] = { [0x0FE00] = 0x2FA04 },
+ [0x099A7] = { [0x0FE00] = 0x2FA05 },
+ [0x099C2] = { [0x0FE00] = 0x2FA06 },
+ [0x099F1] = { [0x0FE00] = 0x0F91A },
+ [0x099FE] = { [0x0FE00] = 0x2FA07 },
+ [0x09A6A] = { [0x0FE00] = 0x0F987 },
+ [0x09B12] = { [0x0FE00] = 0x0FACD, [0x0FE01] = 0x2FA0A },
+ [0x09B6F] = { [0x0FE00] = 0x0F939 },
+ [0x09C40] = { [0x0FE00] = 0x2FA0B },
+ [0x09C57] = { [0x0FE00] = 0x0F9F2 },
+ [0x09CFD] = { [0x0FE00] = 0x2FA0C },
+ [0x09D67] = { [0x0FE00] = 0x2FA0F },
+ [0x09DB4] = { [0x0FE00] = 0x0FA2D },
+ [0x09DFA] = { [0x0FE00] = 0x0F93A },
+ [0x09E1E] = { [0x0FE00] = 0x0F920 },
+ [0x09E7F] = { [0x0FE00] = 0x0F940 },
+ [0x09E97] = { [0x0FE00] = 0x0F988 },
+ [0x09E9F] = { [0x0FE00] = 0x0F9F3 },
+ [0x09EBB] = { [0x0FE00] = 0x2FA15 },
+ [0x09ECE] = { [0x0FE00] = 0x0F989 },
+ [0x09EF9] = { [0x0FE00] = 0x2FA17 },
+ [0x09EFE] = { [0x0FE00] = 0x2FA18 },
+ [0x09F05] = { [0x0FE00] = 0x2FA19 },
+ [0x09F0F] = { [0x0FE00] = 0x2FA1A },
+ [0x09F16] = { [0x0FE00] = 0x2FA1B },
+ [0x09F3B] = { [0x0FE00] = 0x2FA1C },
+ [0x09F43] = { [0x0FE00] = 0x0FAD8 },
+ [0x09F8D] = { [0x0FE00] = 0x0F9C4 },
+ [0x09F8E] = { [0x0FE00] = 0x0FAD9 },
+ [0x09F9C] = { [0x0FE00] = 0x0F907, [0x0FE01] = 0x0F908, [0x0FE02] = 0x0FACE },
+ [0x20122] = { [0x0FE00] = 0x2F803 },
+ [0x2051C] = { [0x0FE00] = 0x2F812 },
+ [0x20525] = { [0x0FE00] = 0x2F91B },
+ [0x2054B] = { [0x0FE00] = 0x2F816 },
+ [0x2063A] = { [0x0FE00] = 0x2F80D },
+ [0x20804] = { [0x0FE00] = 0x2F9D9 },
+ [0x208DE] = { [0x0FE00] = 0x2F9DD },
+ [0x20A2C] = { [0x0FE00] = 0x2F834 },
+ [0x20B63] = { [0x0FE00] = 0x2F838 },
+ [0x214E4] = { [0x0FE00] = 0x2F859 },
+ [0x216A8] = { [0x0FE00] = 0x2F860 },
+ [0x216EA] = { [0x0FE00] = 0x2F861 },
+ [0x219C8] = { [0x0FE00] = 0x2F86C },
+ [0x21B18] = { [0x0FE00] = 0x2F871 },
+ [0x21D0B] = { [0x0FE00] = 0x2F8F8 },
+ [0x21DE4] = { [0x0FE00] = 0x2F87B },
+ [0x21DE6] = { [0x0FE00] = 0x2F87D },
+ [0x22183] = { [0x0FE00] = 0x2F889 },
+ [0x2219F] = { [0x0FE00] = 0x2F939 },
+ [0x22331] = { [0x0FE00] = 0x2F891, [0x0FE01] = 0x2F892 },
+ [0x226D4] = { [0x0FE00] = 0x2F8A4 },
+ [0x22844] = { [0x0FE00] = 0x0FAD0 },
+ [0x2284A] = { [0x0FE00] = 0x0FACF },
+ [0x22B0C] = { [0x0FE00] = 0x2F8B8 },
+ [0x22BF1] = { [0x0FE00] = 0x2F8BE },
+ [0x2300A] = { [0x0FE00] = 0x2F8CA },
+ [0x232B8] = { [0x0FE00] = 0x2F897 },
+ [0x2335F] = { [0x0FE00] = 0x2F980 },
+ [0x23393] = { [0x0FE00] = 0x2F989 },
+ [0x2339C] = { [0x0FE00] = 0x2F98A },
+ [0x233C3] = { [0x0FE00] = 0x2F8DD },
+ [0x233D5] = { [0x0FE00] = 0x0FAD1 },
+ [0x2346D] = { [0x0FE00] = 0x2F8E3 },
+ [0x236A3] = { [0x0FE00] = 0x2F8EC },
+ [0x238A7] = { [0x0FE00] = 0x2F8F0 },
+ [0x23A8D] = { [0x0FE00] = 0x2F8F7 },
+ [0x23AFA] = { [0x0FE00] = 0x2F8F9 },
+ [0x23CBC] = { [0x0FE00] = 0x2F8FB },
+ [0x23D1E] = { [0x0FE00] = 0x2F906 },
+ [0x23ED1] = { [0x0FE00] = 0x2F90D },
+ [0x23F5E] = { [0x0FE00] = 0x2F910 },
+ [0x23F8E] = { [0x0FE00] = 0x2F911 },
+ [0x24263] = { [0x0FE00] = 0x2F91D },
+ [0x242EE] = { [0x0FE00] = 0x0FA6C },
+ [0x243AB] = { [0x0FE00] = 0x2F91F },
+ [0x24608] = { [0x0FE00] = 0x2F923 },
+ [0x24735] = { [0x0FE00] = 0x2F926 },
+ [0x24814] = { [0x0FE00] = 0x2F927 },
+ [0x24C36] = { [0x0FE00] = 0x2F935 },
+ [0x24C92] = { [0x0FE00] = 0x2F937 },
+ [0x24FA1] = { [0x0FE00] = 0x2F93B },
+ [0x24FB8] = { [0x0FE00] = 0x2F93C },
+ [0x25044] = { [0x0FE00] = 0x2F93D },
+ [0x250F2] = { [0x0FE00] = 0x2F942 },
+ [0x250F3] = { [0x0FE00] = 0x2F941 },
+ [0x25119] = { [0x0FE00] = 0x2F943 },
+ [0x25133] = { [0x0FE00] = 0x2F944 },
+ [0x25249] = { [0x0FE00] = 0x0FAD5 },
+ [0x2541D] = { [0x0FE00] = 0x2F94D },
+ [0x25626] = { [0x0FE00] = 0x2F952 },
+ [0x2569A] = { [0x0FE00] = 0x2F954 },
+ [0x256C5] = { [0x0FE00] = 0x2F955 },
+ [0x2597C] = { [0x0FE00] = 0x2F95C },
+ [0x25AA7] = { [0x0FE00] = 0x2F95D, [0x0FE01] = 0x2F95E },
+ [0x25BAB] = { [0x0FE00] = 0x2F961 },
+ [0x25C80] = { [0x0FE00] = 0x2F965 },
+ [0x25CD0] = { [0x0FE00] = 0x0FAD6 },
+ [0x25F86] = { [0x0FE00] = 0x2F96B },
+ [0x261DA] = { [0x0FE00] = 0x2F898 },
+ [0x26228] = { [0x0FE00] = 0x2F972 },
+ [0x26247] = { [0x0FE00] = 0x2F973 },
+ [0x262D9] = { [0x0FE00] = 0x2F975 },
+ [0x2633E] = { [0x0FE00] = 0x2F977 },
+ [0x264DA] = { [0x0FE00] = 0x2F97B },
+ [0x26523] = { [0x0FE00] = 0x2F97C },
+ [0x265A8] = { [0x0FE00] = 0x2F97E },
+ [0x267A7] = { [0x0FE00] = 0x2F987 },
+ [0x267B5] = { [0x0FE00] = 0x2F988 },
+ [0x26B3C] = { [0x0FE00] = 0x2F997 },
+ [0x26C36] = { [0x0FE00] = 0x2F9A4 },
+ [0x26CD5] = { [0x0FE00] = 0x2F9A6 },
+ [0x26D6B] = { [0x0FE00] = 0x2F9A5 },
+ [0x26F2C] = { [0x0FE00] = 0x2F9AD },
+ [0x26FB1] = { [0x0FE00] = 0x2F9B0 },
+ [0x270D2] = { [0x0FE00] = 0x2F9B1 },
+ [0x273CA] = { [0x0FE00] = 0x2F9AB },
+ [0x27667] = { [0x0FE00] = 0x2F9C5 },
+ [0x278AE] = { [0x0FE00] = 0x2F9CB },
+ [0x27966] = { [0x0FE00] = 0x2F9CC },
+ [0x27CA8] = { [0x0FE00] = 0x2F9D3 },
+ [0x27ED3] = { [0x0FE00] = 0x0FAD7 },
+ [0x27F2F] = { [0x0FE00] = 0x2F9D8 },
+ [0x285D2] = { [0x0FE00] = 0x2F9E0 },
+ [0x285ED] = { [0x0FE00] = 0x2F9E1 },
+ [0x2872E] = { [0x0FE00] = 0x2F9E5 },
+ [0x28BFA] = { [0x0FE00] = 0x2F9ED },
+ [0x28D77] = { [0x0FE00] = 0x2F9F1 },
+ [0x29145] = { [0x0FE00] = 0x2F9F6 },
+ [0x291DF] = { [0x0FE00] = 0x2F81C },
+ [0x2921A] = { [0x0FE00] = 0x2F9F7 },
+ [0x2940A] = { [0x0FE00] = 0x2F9FB },
+ [0x29496] = { [0x0FE00] = 0x2F9FD },
+ [0x295B6] = { [0x0FE00] = 0x2FA01 },
+ [0x29B30] = { [0x0FE00] = 0x2FA09 },
+ [0x2A0CE] = { [0x0FE00] = 0x2FA10 },
+ [0x2A105] = { [0x0FE00] = 0x2FA12 },
+ [0x2A20E] = { [0x0FE00] = 0x2FA13 },
+ [0x2A291] = { [0x0FE00] = 0x2FA14 },
+ [0x2A392] = { [0x0FE00] = 0x2F88F },
+ [0x2A600] = { [0x0FE00] = 0x2FA1D },
+}
+
+local cjk_ideograph_metatable = {
+ __index = {
+ category = "lo",
+ cjkwd = "w",
+ description = "<CJK Ideograph>",
+ direction = "l",
+ linebreak = "id",
+ }
+}
+
+local f_variant_name = formatters["CJK COMPATIBILITY IDEOGRAPH-%X"]
+
+local variants = setmetatableindex(function(t,k)
+ local kv = knownvariants[k]
+ if kv then
+ for k, v in next, kv do
+ kv[k] = f_variant_name(v)
+ end
+ end
+ knownvariants[k] = nil
+ return kv
+end)
+
+local cjk_ideograph_extender = function(k)
+ local t = {
+ -- shcode = shcode,
+ unicodeslot = k,
+ variants = variants[k],
+ }
+ setmetatable(t,cjk_ideograph_metatable)
+ return t
+end
+
+local cjk_ideograph_range = {
+ name = "cjk ideograph",
+ first = 0x4E00,
+ last = 0x9FBB,
+ extender = cjk_ideograph_extender,
+}
+
+-- CJK Ideograph Extension A
+
+local cjk_ideograph_extension_a_metatable = {
+ __index = {
+ category = "lo",
+ cjkwd = "w",
+ description = "<CJK Ideograph Extension A>",
+ direction = "l",
+ linebreak = "id",
+ }
+}
+
+local cjk_ideograph_extension_a_extender = function(k)
+ local t = {
+ -- shcode = shcode,
+ unicodeslot = k,
+ variants = variants[k],
+ }
+ setmetatable(t,cjk_ideograph_extension_a_metatable)
+ return t
+end
+
+local cjk_ideograph_extension_a_range = {
+ name = "cjk ideograph extension a",
+ first = 0x3400,
+ last = 0x4DB5,
+ extender = cjk_ideograph_extension_a_extender,
+}
+
+-- CJK Ideograph Extension B
+
+local cjk_ideograph_extension_b_metatable = {
+ __index = {
+ category = "lo",
+ cjkwd = "w",
+ description = "<CJK Ideograph Extension B>",
+ direction = "l",
+ linebreak = "id",
+ }
+}
+
+local cjk_ideograph_extension_b_extender = function(k)
+ local t = {
+ -- shcode = shcode,
+ unicodeslot = k,
+ variants = variants[k],
+ }
+ setmetatable(t,cjk_ideograph_extension_b_metatable)
+ return t
+end
+
+local cjk_ideograph_extension_b_range = {
+ name = "cjk ideograph extension b",
+ first = 0x20000,
+ last = 0x2A6D6,
+ extender = cjk_ideograph_extension_b_extender,
+}
+
+-- Ranges
+
+insert(ranges, hangul_syllable_range)
+insert(ranges, cjk_ideograph_range)
+insert(ranges, cjk_ideograph_extension_a_range)
+insert(ranges, cjk_ideograph_extension_b_range)
+
+-- Japanese
diff --git a/Master/texmf-dist/tex/context/base/char-def.lua b/Master/texmf-dist/tex/context/base/mkiv/char-def.lua
index 90ac4609d2c..bf21be70c37 100644
--- a/Master/texmf-dist/tex/context/base/char-def.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/char-def.lua
@@ -620,11 +620,12 @@ characters.data={
adobename="colon",
category="po",
cjkwd="na",
- comment="mathclass=punctuation,mathname=colon",
+ comment="mathclass=punctuation,mathname=colon,mathsymbol=0x2236",
description="COLON",
direction="cs",
linebreak="is",
mathclass="relation",
+--mathsymbol=0x2236,
unicodeslot=0x3A,
},
{
@@ -1764,6 +1765,10 @@ characters.data={
direction="on",
linebreak="al",
unicodeslot=0xA9,
+ variants={
+ [0xFE0E]="text style",
+ [0xFE0F]="emoji style",
+ },
},
{
adobename="ordfeminine",
@@ -1826,6 +1831,10 @@ characters.data={
direction="on",
linebreak="al",
unicodeslot=0xAE,
+ variants={
+ [0xFE0E]="text style",
+ [0xFE0F]="emoji style",
+ },
},
{
adobename="macron",
@@ -2395,6 +2404,7 @@ characters.data={
adobename="germandbls",
category="ll",
cjkwd="a",
+ comment="uppercase can be 0x1E9E",
contextname="ssharp",
description="LATIN SMALL LETTER SHARP S",
direction="l",
@@ -19709,7 +19719,7 @@ characters.data={
unicodeslot=0x846,
},
[0x847]={
- arabic="d",
+ arabic="r",
category="lo",
description="MANDAIC LETTER IT",
direction="r",
@@ -19773,7 +19783,7 @@ characters.data={
unicodeslot=0x84E,
},
[0x84F]={
- arabic="r",
+ arabic="d",
category="lo",
description="MANDAIC LETTER IN",
direction="r",
@@ -20035,6 +20045,30 @@ characters.data={
linebreak="al",
unicodeslot=0x8B2,
},
+ [0x8B3]={
+ arabic="d",
+ category="lo",
+ description="ARABIC LETTER AIN WITH THREE DOTS BELOW",
+ direction="al",
+ linebreak="al",
+ unicodeslot=0x8B3,
+ },
+ [0x8B4]={
+ arabic="d",
+ category="lo",
+ description="ARABIC LETTER KAF WITH DOT BELOW",
+ direction="al",
+ linebreak="al",
+ unicodeslot=0x8B4,
+ },
+ [0x8E3]={
+ category="mn",
+ combining=0xDC,
+ description="ARABIC TURNED DAMMA BELOW",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x8E3,
+ },
[0x8E4]={
category="mn",
combining=0xE6,
@@ -23327,6 +23361,13 @@ characters.data={
linebreak="pr",
unicodeslot=0xAF1,
},
+ [0xAF9]={
+ category="lo",
+ description="GUJARATI LETTER ZHA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAF9,
+ },
[0xB01]={
category="mn",
description="ORIYA SIGN CANDRABINDU",
@@ -24988,6 +25029,13 @@ characters.data={
linebreak="al",
unicodeslot=0xC59,
},
+ [0xC5A]={
+ category="lo",
+ description="TELUGU LETTER RRRA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xC5A,
+ },
[0xC60]={
category="lo",
description="TELUGU LETTER VOCALIC RR",
@@ -26266,6 +26314,13 @@ characters.data={
linebreak="cm",
unicodeslot=0xD57,
},
+ [0xD5F]={
+ category="lo",
+ description="MALAYALAM LETTER ARCHAIC II",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xD5F,
+ },
[0xD60]={
category="lo",
description="MALAYALAM LETTER VOCALIC RR",
@@ -36746,6 +36801,55 @@ characters.data={
linebreak="al",
unicodeslot=0x13F4,
},
+ [0x13F5]={
+ category="lu",
+ description="CHEROKEE LETTER MV",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x13F5,
+ },
+ [0x13F8]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER YE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x13F8,
+ },
+ [0x13F9]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER YI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x13F9,
+ },
+ [0x13FA]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER YO",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x13FA,
+ },
+ [0x13FB]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER YU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x13FB,
+ },
+ [0x13FC]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER YV",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x13FC,
+ },
+ [0x13FD]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER MV",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x13FD,
+ },
[0x1400]={
category="pd",
description="CANADIAN SYLLABICS HYPHEN",
@@ -54653,6 +54757,8 @@ characters.data={
direction="l",
linebreak="al",
unicodeslot=0x1E9E,
+ lccode=0xDF,
+ shcode={ 0x53, 0x53 },
},
[0x1E9F]={
category="ll",
@@ -59202,7 +59308,6 @@ characters.data={
[0x2061]={
category="cf",
comment="maybe: nulloperator",
- contextname="relax",
description="FUNCTION APPLICATION",
direction="bn",
linebreak="al",
@@ -59220,6 +59325,8 @@ characters.data={
description="INVISIBLE SEPARATOR",
direction="bn",
linebreak="al",
+ mathclass="binary",
+ mathname="invisibletimes",
unicodeslot=0x2063,
},
[0x2064]={
@@ -59905,6 +60012,13 @@ characters.data={
linebreak="pr",
unicodeslot=0x20BD,
},
+ [0x20BE]={
+ category="sc",
+ description="LARI SIGN",
+ direction="et",
+ linebreak="po",
+ unicodeslot=0x20BE,
+ },
[0x20D0]={
category="mn",
combining=0xE6,
@@ -60509,6 +60623,10 @@ characters.data={
linebreak="ai",
specials={ "super", 0x54, 0x4D },
unicodeslot=0x2122,
+ variants={
+ [0xFE0E]="text style",
+ [0xFE0F]="emoji style",
+ },
},
[0x2123]={
category="so",
@@ -61507,6 +61625,20 @@ characters.data={
specials={ "fraction", 0x30, 0x2044, 0x33 },
unicodeslot=0x2189,
},
+ [0x218A]={
+ category="so",
+ description="TURNED DIGIT TWO",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x218A,
+ },
+ [0x218B]={
+ category="so",
+ description="TURNED DIGIT THREE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x218B,
+ },
[0x2190]={
adobename="arrowleft",
category="sm",
@@ -63743,6 +63875,7 @@ characters.data={
linebreak="al",
mathclass="relation",
mathname="colonequals",
+ mathpair={ 0x3A, 0x3D },
mirror=0x2255,
unicodeslot=0x2254,
},
@@ -63753,6 +63886,7 @@ characters.data={
linebreak="al",
mathclass="relation",
mathname="equalscolon",
+ mathpair={ 0x3D, 0x3A },
mirror=0x2254,
unicodeslot=0x2255,
},
@@ -63905,6 +64039,7 @@ characters.data={
description="LESS-THAN OR EQUAL TO",
direction="on",
linebreak="ai",
+ mathpair={ 0x3C, 0x3D },
mathspec={
{
class="relation",
@@ -63925,6 +64060,7 @@ characters.data={
description="GREATER-THAN OR EQUAL TO",
direction="on",
linebreak="ai",
+ mathpair={ 0x3E, 0x3D },
mathspec={
{
class="relation",
@@ -65406,7 +65542,7 @@ characters.data={
category="sm",
description="MIDLINE HORIZONTAL ELLIPSIS",
direction="on",
- linebreak="al",
+ linebreak="in",
mathclass="inner",
mathname="cdots",
unicodeslot=0x22EF,
@@ -65613,16 +65749,8 @@ characters.data={
description="LEFT CEILING",
direction="on",
linebreak="op",
- mathspec={
- {
- class="open",
- name="lceil",
- },
- {
- class="open",
- name="lceiling",
- },
- },
+ mathclass="open",
+ mathname="lceil",
mirror=0x2309,
unicodeslot=0x2308,
},
@@ -65631,16 +65759,8 @@ characters.data={
description="RIGHT CEILING",
direction="on",
linebreak="cl",
- mathspec={
- {
- class="close",
- name="rceil",
- },
- {
- class="close",
- name="rceiling",
- },
- },
+ mathclass="close",
+ mathname="rceil",
mirror=0x2308,
unicodeslot=0x2309,
},
@@ -82744,6 +82864,34 @@ characters.data={
linebreak="al",
unicodeslot=0x2BD1,
},
+ [0x2BEC]={
+ category="so",
+ description="LEFTWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x2BEC,
+ },
+ [0x2BED]={
+ category="so",
+ description="UPWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x2BED,
+ },
+ [0x2BEE]={
+ category="so",
+ description="RIGHTWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x2BEE,
+ },
+ [0x2BEF]={
+ category="so",
+ description="DOWNWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x2BEF,
+ },
[0x2C00]={
category="lu",
description="GLAGOLITIC CAPITAL LETTER AZU",
@@ -90146,6 +90294,10 @@ characters.data={
direction="on",
linebreak="id",
unicodeslot=0x3030,
+ variants={
+ [0xFE0E]="text style",
+ [0xFE0F]="emoji style",
+ },
},
[0x3031]={
category="lm",
@@ -112827,6 +112979,14 @@ characters.data={
specials={ "super", 0x44C },
unicodeslot=0xA69D,
},
+ [0xA69E]={
+ category="mn",
+ combining=0xE6,
+ description="COMBINING CYRILLIC LETTER EF",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0xA69E,
+ },
[0xA69F]={
category="mn",
combining=0xE6,
@@ -114455,6 +114615,13 @@ characters.data={
linebreak="al",
unicodeslot=0xA78E,
},
+ [0xA78F]={
+ category="lo",
+ description="LATIN LETTER SINOLOGICAL DOT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xA78F,
+ },
[0xA790]={
category="lu",
description="LATIN CAPITAL LETTER N WITH DESCENDER",
@@ -114679,6 +114846,48 @@ characters.data={
linebreak="al",
unicodeslot=0xA7B1,
},
+ [0xA7B2]={
+ category="lu",
+ description="LATIN CAPITAL LETTER J WITH CROSSED-TAIL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xA7B2,
+ },
+ [0xA7B3]={
+ category="lu",
+ description="LATIN CAPITAL LETTER CHI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xA7B3,
+ },
+ [0xA7B4]={
+ category="lu",
+ description="LATIN CAPITAL LETTER BETA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xA7B4,
+ },
+ [0xA7B5]={
+ category="ll",
+ description="LATIN SMALL LETTER BETA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xA7B5,
+ },
+ [0xA7B6]={
+ category="lu",
+ description="LATIN CAPITAL LETTER OMEGA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xA7B6,
+ },
+ [0xA7B7]={
+ category="ll",
+ description="LATIN SMALL LETTER OMEGA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xA7B7,
+ },
[0xA7F7]={
category="lo",
description="LATIN EPIGRAPHIC LETTER SIDEWAYS I",
@@ -116367,6 +116576,20 @@ characters.data={
linebreak="al",
unicodeslot=0xA8FB,
},
+ [0xA8FC]={
+ category="po",
+ description="DEVANAGARI SIGN SIDDHAM",
+ direction="l",
+ linebreak="bb",
+ unicodeslot=0xA8FC,
+ },
+ [0xA8FD]={
+ category="lo",
+ description="DEVANAGARI JAIN OM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xA8FD,
+ },
[0xA900]={
category="nd",
description="KAYAH LI DIGIT ZERO",
@@ -120098,6 +120321,34 @@ characters.data={
specials={ "super", 0xAB52 },
unicodeslot=0xAB5F,
},
+ [0xAB60]={
+ category="ll",
+ description="LATIN SMALL LETTER SAKHA YAT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB60,
+ },
+ [0xAB61]={
+ category="ll",
+ description="LATIN SMALL LETTER IOTIFIED E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB61,
+ },
+ [0xAB62]={
+ category="ll",
+ description="LATIN SMALL LETTER OPEN OE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB62,
+ },
+ [0xAB63]={
+ category="ll",
+ description="LATIN SMALL LETTER UO",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB63,
+ },
[0xAB64]={
category="ll",
description="LATIN SMALL LETTER INVERTED ALPHA",
@@ -120112,6 +120363,566 @@ characters.data={
linebreak="al",
unicodeslot=0xAB65,
},
+ [0xAB70]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB70,
+ },
+ [0xAB71]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB71,
+ },
+ [0xAB72]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER I",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB72,
+ },
+ [0xAB73]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER O",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB73,
+ },
+ [0xAB74]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER U",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB74,
+ },
+ [0xAB75]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER V",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB75,
+ },
+ [0xAB76]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER GA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB76,
+ },
+ [0xAB77]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER KA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB77,
+ },
+ [0xAB78]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER GE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB78,
+ },
+ [0xAB79]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER GI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB79,
+ },
+ [0xAB7A]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER GO",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB7A,
+ },
+ [0xAB7B]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER GU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB7B,
+ },
+ [0xAB7C]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER GV",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB7C,
+ },
+ [0xAB7D]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER HA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB7D,
+ },
+ [0xAB7E]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER HE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB7E,
+ },
+ [0xAB7F]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER HI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB7F,
+ },
+ [0xAB80]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER HO",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB80,
+ },
+ [0xAB81]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER HU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB81,
+ },
+ [0xAB82]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER HV",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB82,
+ },
+ [0xAB83]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER LA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB83,
+ },
+ [0xAB84]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER LE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB84,
+ },
+ [0xAB85]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER LI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB85,
+ },
+ [0xAB86]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER LO",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB86,
+ },
+ [0xAB87]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER LU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB87,
+ },
+ [0xAB88]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER LV",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB88,
+ },
+ [0xAB89]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER MA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB89,
+ },
+ [0xAB8A]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER ME",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB8A,
+ },
+ [0xAB8B]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER MI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB8B,
+ },
+ [0xAB8C]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER MO",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB8C,
+ },
+ [0xAB8D]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER MU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB8D,
+ },
+ [0xAB8E]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER NA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB8E,
+ },
+ [0xAB8F]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER HNA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB8F,
+ },
+ [0xAB90]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER NAH",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB90,
+ },
+ [0xAB91]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER NE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB91,
+ },
+ [0xAB92]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER NI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB92,
+ },
+ [0xAB93]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER NO",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB93,
+ },
+ [0xAB94]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER NU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB94,
+ },
+ [0xAB95]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER NV",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB95,
+ },
+ [0xAB96]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER QUA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB96,
+ },
+ [0xAB97]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER QUE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB97,
+ },
+ [0xAB98]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER QUI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB98,
+ },
+ [0xAB99]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER QUO",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB99,
+ },
+ [0xAB9A]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER QUU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB9A,
+ },
+ [0xAB9B]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER QUV",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB9B,
+ },
+ [0xAB9C]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER SA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB9C,
+ },
+ [0xAB9D]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER S",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB9D,
+ },
+ [0xAB9E]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER SE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB9E,
+ },
+ [0xAB9F]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER SI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB9F,
+ },
+ [0xABA0]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER SO",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABA0,
+ },
+ [0xABA1]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER SU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABA1,
+ },
+ [0xABA2]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER SV",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABA2,
+ },
+ [0xABA3]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER DA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABA3,
+ },
+ [0xABA4]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER TA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABA4,
+ },
+ [0xABA5]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER DE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABA5,
+ },
+ [0xABA6]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER TE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABA6,
+ },
+ [0xABA7]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER DI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABA7,
+ },
+ [0xABA8]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER TI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABA8,
+ },
+ [0xABA9]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER DO",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABA9,
+ },
+ [0xABAA]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER DU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABAA,
+ },
+ [0xABAB]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER DV",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABAB,
+ },
+ [0xABAC]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER DLA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABAC,
+ },
+ [0xABAD]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER TLA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABAD,
+ },
+ [0xABAE]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER TLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABAE,
+ },
+ [0xABAF]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER TLI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABAF,
+ },
+ [0xABB0]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER TLO",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABB0,
+ },
+ [0xABB1]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER TLU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABB1,
+ },
+ [0xABB2]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER TLV",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABB2,
+ },
+ [0xABB3]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER TSA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABB3,
+ },
+ [0xABB4]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER TSE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABB4,
+ },
+ [0xABB5]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER TSI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABB5,
+ },
+ [0xABB6]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER TSO",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABB6,
+ },
+ [0xABB7]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER TSU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABB7,
+ },
+ [0xABB8]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER TSV",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABB8,
+ },
+ [0xABB9]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER WA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABB9,
+ },
+ [0xABBA]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER WE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABBA,
+ },
+ [0xABBB]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER WI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABBB,
+ },
+ [0xABBC]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER WO",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABBC,
+ },
+ [0xABBD]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER WU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABBD,
+ },
+ [0xABBE]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER WV",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABBE,
+ },
+ [0xABBF]={
+ category="ll",
+ description="CHEROKEE SMALL LETTER YA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xABBF,
+ },
[0xABC0]={
category="lo",
description="MEETEI MAYEK LETTER KOK",
@@ -130779,134 +131590,6 @@ characters.data={
linebreak="al",
unicodeslot=0xFDFD,
},
- [0xFE00]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0001",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xFE00,
- },
- [0xFE01]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0002",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xFE01,
- },
- [0xFE02]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0003",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xFE02,
- },
- [0xFE03]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0004",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xFE03,
- },
- [0xFE04]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0005",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xFE04,
- },
- [0xFE05]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0006",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xFE05,
- },
- [0xFE06]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0007",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xFE06,
- },
- [0xFE07]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0008",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xFE07,
- },
- [0xFE08]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0009",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xFE08,
- },
- [0xFE09]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x000A",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xFE09,
- },
- [0xFE0A]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x000B",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xFE0A,
- },
- [0xFE0B]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x000C",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xFE0B,
- },
- [0xFE0C]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x000D",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xFE0C,
- },
- [0xFE0D]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x000E",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xFE0D,
- },
- [0xFE0E]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x000F",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xFE0E,
- },
- [0xFE0F]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0010",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xFE0F,
- },
[0xFE10]={
category="po",
cjkwd="w",
@@ -131110,6 +131793,22 @@ characters.data={
linebreak="cm",
unicodeslot=0xFE2D,
},
+ [0xFE2E]={
+ category="mn",
+ combining=0xE6,
+ description="COMBINING CYRILLIC TITLO LEFT HALF",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0xFE2E,
+ },
+ [0xFE2F]={
+ category="mn",
+ combining=0xE6,
+ description="COMBINING CYRILLIC TITLO RIGHT HALF",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0xFE2F,
+ },
[0xFE30]={
adobename="twodotleadervertical",
category="po",
@@ -145565,6 +146264,188 @@ characters.data={
linebreak="al",
unicodeslot=0x108AF,
},
+ [0x108E0]={
+ category="lo",
+ description="HATRAN LETTER ALEPH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108E0,
+ },
+ [0x108E1]={
+ category="lo",
+ description="HATRAN LETTER BETH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108E1,
+ },
+ [0x108E2]={
+ category="lo",
+ description="HATRAN LETTER GIMEL",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108E2,
+ },
+ [0x108E3]={
+ category="lo",
+ description="HATRAN LETTER DALETH-RESH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108E3,
+ },
+ [0x108E4]={
+ category="lo",
+ description="HATRAN LETTER HE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108E4,
+ },
+ [0x108E5]={
+ category="lo",
+ description="HATRAN LETTER WAW",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108E5,
+ },
+ [0x108E6]={
+ category="lo",
+ description="HATRAN LETTER ZAYN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108E6,
+ },
+ [0x108E7]={
+ category="lo",
+ description="HATRAN LETTER HETH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108E7,
+ },
+ [0x108E8]={
+ category="lo",
+ description="HATRAN LETTER TETH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108E8,
+ },
+ [0x108E9]={
+ category="lo",
+ description="HATRAN LETTER YODH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108E9,
+ },
+ [0x108EA]={
+ category="lo",
+ description="HATRAN LETTER KAPH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108EA,
+ },
+ [0x108EB]={
+ category="lo",
+ description="HATRAN LETTER LAMEDH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108EB,
+ },
+ [0x108EC]={
+ category="lo",
+ description="HATRAN LETTER MEM",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108EC,
+ },
+ [0x108ED]={
+ category="lo",
+ description="HATRAN LETTER NUN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108ED,
+ },
+ [0x108EE]={
+ category="lo",
+ description="HATRAN LETTER SAMEKH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108EE,
+ },
+ [0x108EF]={
+ category="lo",
+ description="HATRAN LETTER AYN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108EF,
+ },
+ [0x108F0]={
+ category="lo",
+ description="HATRAN LETTER PE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108F0,
+ },
+ [0x108F1]={
+ category="lo",
+ description="HATRAN LETTER SADHE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108F1,
+ },
+ [0x108F2]={
+ category="lo",
+ description="HATRAN LETTER QOPH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108F2,
+ },
+ [0x108F4]={
+ category="lo",
+ description="HATRAN LETTER SHIN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108F4,
+ },
+ [0x108F5]={
+ category="lo",
+ description="HATRAN LETTER TAW",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108F5,
+ },
+ [0x108FB]={
+ category="no",
+ description="HATRAN NUMBER ONE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108FB,
+ },
+ [0x108FC]={
+ category="no",
+ description="HATRAN NUMBER FIVE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108FC,
+ },
+ [0x108FD]={
+ category="no",
+ description="HATRAN NUMBER TEN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108FD,
+ },
+ [0x108FE]={
+ category="no",
+ description="HATRAN NUMBER TWENTY",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108FE,
+ },
+ [0x108FF]={
+ category="no",
+ description="HATRAN NUMBER ONE HUNDRED",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x108FF,
+ },
[0x10900]={
category="lo",
description="PHOENICIAN LETTER ALF",
@@ -146349,6 +147230,20 @@ characters.data={
linebreak="al",
unicodeslot=0x109B7,
},
+ [0x109BC]={
+ category="no",
+ description="MEROITIC CURSIVE FRACTION ELEVEN TWELFTHS",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109BC,
+ },
+ [0x109BD]={
+ category="no",
+ description="MEROITIC CURSIVE FRACTION ONE HALF",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109BD,
+ },
[0x109BE]={
category="lo",
description="MEROITIC CURSIVE LOGOGRAM RMT",
@@ -146363,6 +147258,440 @@ characters.data={
linebreak="al",
unicodeslot=0x109BF,
},
+ [0x109C0]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER ONE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109C0,
+ },
+ [0x109C1]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER TWO",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109C1,
+ },
+ [0x109C2]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER THREE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109C2,
+ },
+ [0x109C3]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER FOUR",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109C3,
+ },
+ [0x109C4]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER FIVE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109C4,
+ },
+ [0x109C5]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER SIX",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109C5,
+ },
+ [0x109C6]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER SEVEN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109C6,
+ },
+ [0x109C7]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER EIGHT",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109C7,
+ },
+ [0x109C8]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER NINE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109C8,
+ },
+ [0x109C9]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER TEN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109C9,
+ },
+ [0x109CA]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER TWENTY",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109CA,
+ },
+ [0x109CB]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER THIRTY",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109CB,
+ },
+ [0x109CC]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER FORTY",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109CC,
+ },
+ [0x109CD]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER FIFTY",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109CD,
+ },
+ [0x109CE]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER SIXTY",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109CE,
+ },
+ [0x109CF]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER SEVENTY",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109CF,
+ },
+ [0x109D2]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER ONE HUNDRED",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109D2,
+ },
+ [0x109D3]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER TWO HUNDRED",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109D3,
+ },
+ [0x109D4]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER THREE HUNDRED",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109D4,
+ },
+ [0x109D5]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER FOUR HUNDRED",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109D5,
+ },
+ [0x109D6]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER FIVE HUNDRED",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109D6,
+ },
+ [0x109D7]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER SIX HUNDRED",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109D7,
+ },
+ [0x109D8]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER SEVEN HUNDRED",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109D8,
+ },
+ [0x109D9]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER EIGHT HUNDRED",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109D9,
+ },
+ [0x109DA]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER NINE HUNDRED",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109DA,
+ },
+ [0x109DB]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER ONE THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109DB,
+ },
+ [0x109DC]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER TWO THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109DC,
+ },
+ [0x109DD]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER THREE THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109DD,
+ },
+ [0x109DE]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER FOUR THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109DE,
+ },
+ [0x109DF]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER FIVE THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109DF,
+ },
+ [0x109E0]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER SIX THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109E0,
+ },
+ [0x109E1]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER SEVEN THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109E1,
+ },
+ [0x109E2]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER EIGHT THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109E2,
+ },
+ [0x109E3]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER NINE THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109E3,
+ },
+ [0x109E4]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER TEN THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109E4,
+ },
+ [0x109E5]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER TWENTY THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109E5,
+ },
+ [0x109E6]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER THIRTY THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109E6,
+ },
+ [0x109E7]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER FORTY THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109E7,
+ },
+ [0x109E8]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER FIFTY THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109E8,
+ },
+ [0x109E9]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER SIXTY THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109E9,
+ },
+ [0x109EA]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER SEVENTY THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109EA,
+ },
+ [0x109EB]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER EIGHTY THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109EB,
+ },
+ [0x109EC]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER NINETY THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109EC,
+ },
+ [0x109ED]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER ONE HUNDRED THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109ED,
+ },
+ [0x109EE]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER TWO HUNDRED THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109EE,
+ },
+ [0x109EF]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER THREE HUNDRED THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109EF,
+ },
+ [0x109F0]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER FOUR HUNDRED THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109F0,
+ },
+ [0x109F1]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER FIVE HUNDRED THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109F1,
+ },
+ [0x109F2]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER SIX HUNDRED THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109F2,
+ },
+ [0x109F3]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER SEVEN HUNDRED THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109F3,
+ },
+ [0x109F4]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER EIGHT HUNDRED THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109F4,
+ },
+ [0x109F5]={
+ category="no",
+ description="MEROITIC CURSIVE NUMBER NINE HUNDRED THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109F5,
+ },
+ [0x109F6]={
+ category="no",
+ description="MEROITIC CURSIVE FRACTION ONE TWELFTH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109F6,
+ },
+ [0x109F7]={
+ category="no",
+ description="MEROITIC CURSIVE FRACTION TWO TWELFTHS",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109F7,
+ },
+ [0x109F8]={
+ category="no",
+ description="MEROITIC CURSIVE FRACTION THREE TWELFTHS",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109F8,
+ },
+ [0x109F9]={
+ category="no",
+ description="MEROITIC CURSIVE FRACTION FOUR TWELFTHS",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109F9,
+ },
+ [0x109FA]={
+ category="no",
+ description="MEROITIC CURSIVE FRACTION FIVE TWELFTHS",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109FA,
+ },
+ [0x109FB]={
+ category="no",
+ description="MEROITIC CURSIVE FRACTION SIX TWELFTHS",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109FB,
+ },
+ [0x109FC]={
+ category="no",
+ description="MEROITIC CURSIVE FRACTION SEVEN TWELFTHS",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109FC,
+ },
+ [0x109FD]={
+ category="no",
+ description="MEROITIC CURSIVE FRACTION EIGHT TWELFTHS",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109FD,
+ },
+ [0x109FE]={
+ category="no",
+ description="MEROITIC CURSIVE FRACTION NINE TWELFTHS",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109FE,
+ },
+ [0x109FF]={
+ category="no",
+ description="MEROITIC CURSIVE FRACTION TEN TWELFTHS",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x109FF,
+ },
[0x10A00]={
category="lo",
description="KHAROSHTHI LETTER A",
@@ -147319,6 +148648,9 @@ characters.data={
direction="r",
linebreak="al",
unicodeslot=0x10AC5,
+ variants={
+ [0xFE00]="alternate form",
+ },
},
[0x10AC6]={
arabic="u",
@@ -147327,6 +148659,9 @@ characters.data={
direction="r",
linebreak="al",
unicodeslot=0x10AC6,
+ variants={
+ [0xFE00]="alternate form",
+ },
},
[0x10AC7]={
arabic="r",
@@ -147455,6 +148790,9 @@ characters.data={
direction="r",
linebreak="al",
unicodeslot=0x10AD6,
+ variants={
+ [0xFE00]="alternate form",
+ },
},
[0x10AD7]={
arabic="l",
@@ -147463,6 +148801,9 @@ characters.data={
direction="r",
linebreak="al",
unicodeslot=0x10AD7,
+ variants={
+ [0xFE00]="alternate form",
+ },
},
[0x10AD8]={
arabic="d",
@@ -147543,6 +148884,9 @@ characters.data={
direction="r",
linebreak="al",
unicodeslot=0x10AE1,
+ variants={
+ [0xFE00]="alternate form",
+ },
},
[0x10AE2]={
arabic="u",
@@ -149238,6 +150582,762 @@ characters.data={
linebreak="al",
unicodeslot=0x10C48,
},
+ [0x10C80]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER A",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C80,
+ },
+ [0x10C81]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER AA",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C81,
+ },
+ [0x10C82]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER EB",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C82,
+ },
+ [0x10C83]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER AMB",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C83,
+ },
+ [0x10C84]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER EC",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C84,
+ },
+ [0x10C85]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER ENC",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C85,
+ },
+ [0x10C86]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER ECS",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C86,
+ },
+ [0x10C87]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER ED",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C87,
+ },
+ [0x10C88]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER AND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C88,
+ },
+ [0x10C89]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER E",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C89,
+ },
+ [0x10C8A]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER CLOSE E",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C8A,
+ },
+ [0x10C8B]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER EE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C8B,
+ },
+ [0x10C8C]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER EF",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C8C,
+ },
+ [0x10C8D]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER EG",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C8D,
+ },
+ [0x10C8E]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER EGY",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C8E,
+ },
+ [0x10C8F]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER EH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C8F,
+ },
+ [0x10C90]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER I",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C90,
+ },
+ [0x10C91]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER II",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C91,
+ },
+ [0x10C92]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER EJ",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C92,
+ },
+ [0x10C93]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER EK",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C93,
+ },
+ [0x10C94]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER AK",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C94,
+ },
+ [0x10C95]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER UNK",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C95,
+ },
+ [0x10C96]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER EL",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C96,
+ },
+ [0x10C97]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER ELY",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C97,
+ },
+ [0x10C98]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER EM",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C98,
+ },
+ [0x10C99]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER EN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C99,
+ },
+ [0x10C9A]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER ENY",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C9A,
+ },
+ [0x10C9B]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER O",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C9B,
+ },
+ [0x10C9C]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER OO",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C9C,
+ },
+ [0x10C9D]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG OE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C9D,
+ },
+ [0x10C9E]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER RUDIMENTA OE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C9E,
+ },
+ [0x10C9F]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER OEE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10C9F,
+ },
+ [0x10CA0]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER EP",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CA0,
+ },
+ [0x10CA1]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER EMP",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CA1,
+ },
+ [0x10CA2]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER ER",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CA2,
+ },
+ [0x10CA3]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER SHORT ER",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CA3,
+ },
+ [0x10CA4]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER ES",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CA4,
+ },
+ [0x10CA5]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER ESZ",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CA5,
+ },
+ [0x10CA6]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER ET",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CA6,
+ },
+ [0x10CA7]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER ENT",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CA7,
+ },
+ [0x10CA8]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER ETY",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CA8,
+ },
+ [0x10CA9]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER ECH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CA9,
+ },
+ [0x10CAA]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER U",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CAA,
+ },
+ [0x10CAB]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER UU",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CAB,
+ },
+ [0x10CAC]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG UE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CAC,
+ },
+ [0x10CAD]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER RUDIMENTA UE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CAD,
+ },
+ [0x10CAE]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER EV",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CAE,
+ },
+ [0x10CAF]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER EZ",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CAF,
+ },
+ [0x10CB0]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER EZS",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CB0,
+ },
+ [0x10CB1]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER ENT-SHAPED SIGN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CB1,
+ },
+ [0x10CB2]={
+ category="lu",
+ description="OLD HUNGARIAN CAPITAL LETTER US",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CB2,
+ },
+ [0x10CC0]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER A",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CC0,
+ },
+ [0x10CC1]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER AA",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CC1,
+ },
+ [0x10CC2]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER EB",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CC2,
+ },
+ [0x10CC3]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER AMB",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CC3,
+ },
+ [0x10CC4]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER EC",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CC4,
+ },
+ [0x10CC5]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER ENC",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CC5,
+ },
+ [0x10CC6]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER ECS",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CC6,
+ },
+ [0x10CC7]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER ED",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CC7,
+ },
+ [0x10CC8]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER AND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CC8,
+ },
+ [0x10CC9]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER E",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CC9,
+ },
+ [0x10CCA]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER CLOSE E",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CCA,
+ },
+ [0x10CCB]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER EE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CCB,
+ },
+ [0x10CCC]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER EF",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CCC,
+ },
+ [0x10CCD]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER EG",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CCD,
+ },
+ [0x10CCE]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER EGY",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CCE,
+ },
+ [0x10CCF]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER EH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CCF,
+ },
+ [0x10CD0]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER I",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CD0,
+ },
+ [0x10CD1]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER II",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CD1,
+ },
+ [0x10CD2]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER EJ",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CD2,
+ },
+ [0x10CD3]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER EK",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CD3,
+ },
+ [0x10CD4]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER AK",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CD4,
+ },
+ [0x10CD5]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER UNK",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CD5,
+ },
+ [0x10CD6]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER EL",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CD6,
+ },
+ [0x10CD7]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER ELY",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CD7,
+ },
+ [0x10CD8]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER EM",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CD8,
+ },
+ [0x10CD9]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER EN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CD9,
+ },
+ [0x10CDA]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER ENY",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CDA,
+ },
+ [0x10CDB]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER O",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CDB,
+ },
+ [0x10CDC]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER OO",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CDC,
+ },
+ [0x10CDD]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER NIKOLSBURG OE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CDD,
+ },
+ [0x10CDE]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER RUDIMENTA OE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CDE,
+ },
+ [0x10CDF]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER OEE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CDF,
+ },
+ [0x10CE0]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER EP",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CE0,
+ },
+ [0x10CE1]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER EMP",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CE1,
+ },
+ [0x10CE2]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER ER",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CE2,
+ },
+ [0x10CE3]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER SHORT ER",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CE3,
+ },
+ [0x10CE4]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER ES",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CE4,
+ },
+ [0x10CE5]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER ESZ",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CE5,
+ },
+ [0x10CE6]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER ET",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CE6,
+ },
+ [0x10CE7]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER ENT",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CE7,
+ },
+ [0x10CE8]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER ETY",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CE8,
+ },
+ [0x10CE9]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER ECH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CE9,
+ },
+ [0x10CEA]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER U",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CEA,
+ },
+ [0x10CEB]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER UU",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CEB,
+ },
+ [0x10CEC]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER NIKOLSBURG UE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CEC,
+ },
+ [0x10CED]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER RUDIMENTA UE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CED,
+ },
+ [0x10CEE]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER EV",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CEE,
+ },
+ [0x10CEF]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER EZ",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CEF,
+ },
+ [0x10CF0]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER EZS",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CF0,
+ },
+ [0x10CF1]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER ENT-SHAPED SIGN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CF1,
+ },
+ [0x10CF2]={
+ category="ll",
+ description="OLD HUNGARIAN SMALL LETTER US",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CF2,
+ },
+ [0x10CFA]={
+ category="no",
+ description="OLD HUNGARIAN NUMBER ONE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CFA,
+ },
+ [0x10CFB]={
+ category="no",
+ description="OLD HUNGARIAN NUMBER FIVE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CFB,
+ },
+ [0x10CFC]={
+ category="no",
+ description="OLD HUNGARIAN NUMBER TEN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CFC,
+ },
+ [0x10CFD]={
+ category="no",
+ description="OLD HUNGARIAN NUMBER FIFTY",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CFD,
+ },
+ [0x10CFE]={
+ category="no",
+ description="OLD HUNGARIAN NUMBER ONE HUNDRED",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CFE,
+ },
+ [0x10CFF]={
+ category="no",
+ description="OLD HUNGARIAN NUMBER ONE THOUSAND",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10CFF,
+ },
[0x10E60]={
category="no",
description="RUMI DIGIT ONE",
@@ -152194,6 +154294,35 @@ characters.data={
linebreak="ba",
unicodeslot=0x111C8,
},
+ [0x111C9]={
+ category="po",
+ description="SHARADA SANDHI MARK",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x111C9,
+ },
+ [0x111CA]={
+ category="mn",
+ combining=0x7,
+ description="SHARADA SIGN NUKTA",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x111CA,
+ },
+ [0x111CB]={
+ category="mn",
+ description="SHARADA VOWEL MODIFIER MARK",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x111CB,
+ },
+ [0x111CC]={
+ category="mn",
+ description="SHARADA EXTRA SHORT VOWEL MARK",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x111CC,
+ },
[0x111CD]={
category="po",
description="SHARADA SUTRA MARK",
@@ -152278,6 +154407,41 @@ characters.data={
linebreak="al",
unicodeslot=0x111DA,
},
+ [0x111DB]={
+ category="po",
+ description="SHARADA SIGN SIDDHAM",
+ direction="l",
+ linebreak="bb",
+ unicodeslot=0x111DB,
+ },
+ [0x111DC]={
+ category="lo",
+ description="SHARADA HEADSTROKE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x111DC,
+ },
+ [0x111DD]={
+ category="po",
+ description="SHARADA CONTINUATION SIGN",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x111DD,
+ },
+ [0x111DE]={
+ category="po",
+ description="SHARADA SECTION MARK-1",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x111DE,
+ },
+ [0x111DF]={
+ category="po",
+ description="SHARADA SECTION MARK-2",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x111DF,
+ },
[0x111E1]={
category="no",
description="SINHALA ARCHAIC DIGIT ONE",
@@ -152847,6 +155011,272 @@ characters.data={
linebreak="al",
unicodeslot=0x1123D,
},
+ [0x11280]={
+ category="lo",
+ description="MULTANI LETTER A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11280,
+ },
+ [0x11281]={
+ category="lo",
+ description="MULTANI LETTER I",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11281,
+ },
+ [0x11282]={
+ category="lo",
+ description="MULTANI LETTER U",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11282,
+ },
+ [0x11283]={
+ category="lo",
+ description="MULTANI LETTER E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11283,
+ },
+ [0x11284]={
+ category="lo",
+ description="MULTANI LETTER KA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11284,
+ },
+ [0x11285]={
+ category="lo",
+ description="MULTANI LETTER KHA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11285,
+ },
+ [0x11286]={
+ category="lo",
+ description="MULTANI LETTER GA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11286,
+ },
+ [0x11288]={
+ category="lo",
+ description="MULTANI LETTER GHA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11288,
+ },
+ [0x1128A]={
+ category="lo",
+ description="MULTANI LETTER CA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1128A,
+ },
+ [0x1128B]={
+ category="lo",
+ description="MULTANI LETTER CHA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1128B,
+ },
+ [0x1128C]={
+ category="lo",
+ description="MULTANI LETTER JA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1128C,
+ },
+ [0x1128D]={
+ category="lo",
+ description="MULTANI LETTER JJA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1128D,
+ },
+ [0x1128F]={
+ category="lo",
+ description="MULTANI LETTER NYA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1128F,
+ },
+ [0x11290]={
+ category="lo",
+ description="MULTANI LETTER TTA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11290,
+ },
+ [0x11291]={
+ category="lo",
+ description="MULTANI LETTER TTHA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11291,
+ },
+ [0x11292]={
+ category="lo",
+ description="MULTANI LETTER DDA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11292,
+ },
+ [0x11293]={
+ category="lo",
+ description="MULTANI LETTER DDDA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11293,
+ },
+ [0x11294]={
+ category="lo",
+ description="MULTANI LETTER DDHA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11294,
+ },
+ [0x11295]={
+ category="lo",
+ description="MULTANI LETTER NNA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11295,
+ },
+ [0x11296]={
+ category="lo",
+ description="MULTANI LETTER TA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11296,
+ },
+ [0x11297]={
+ category="lo",
+ description="MULTANI LETTER THA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11297,
+ },
+ [0x11298]={
+ category="lo",
+ description="MULTANI LETTER DA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11298,
+ },
+ [0x11299]={
+ category="lo",
+ description="MULTANI LETTER DHA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11299,
+ },
+ [0x1129A]={
+ category="lo",
+ description="MULTANI LETTER NA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1129A,
+ },
+ [0x1129B]={
+ category="lo",
+ description="MULTANI LETTER PA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1129B,
+ },
+ [0x1129C]={
+ category="lo",
+ description="MULTANI LETTER PHA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1129C,
+ },
+ [0x1129D]={
+ category="lo",
+ description="MULTANI LETTER BA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1129D,
+ },
+ [0x1129F]={
+ category="lo",
+ description="MULTANI LETTER BHA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1129F,
+ },
+ [0x112A0]={
+ category="lo",
+ description="MULTANI LETTER MA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x112A0,
+ },
+ [0x112A1]={
+ category="lo",
+ description="MULTANI LETTER YA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x112A1,
+ },
+ [0x112A2]={
+ category="lo",
+ description="MULTANI LETTER RA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x112A2,
+ },
+ [0x112A3]={
+ category="lo",
+ description="MULTANI LETTER LA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x112A3,
+ },
+ [0x112A4]={
+ category="lo",
+ description="MULTANI LETTER VA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x112A4,
+ },
+ [0x112A5]={
+ category="lo",
+ description="MULTANI LETTER SA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x112A5,
+ },
+ [0x112A6]={
+ category="lo",
+ description="MULTANI LETTER HA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x112A6,
+ },
+ [0x112A7]={
+ category="lo",
+ description="MULTANI LETTER RRA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x112A7,
+ },
+ [0x112A8]={
+ category="lo",
+ description="MULTANI LETTER RHA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x112A8,
+ },
+ [0x112A9]={
+ category="po",
+ description="MULTANI SECTION MARK",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x112A9,
+ },
[0x112B0]={
category="lo",
description="KHUDAWADI LETTER A",
@@ -153332,6 +155762,13 @@ characters.data={
linebreak="nu",
unicodeslot=0x112F9,
},
+ [0x11300]={
+ category="mn",
+ description="GRANTHA SIGN COMBINING ANUSVARA ABOVE",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x11300,
+ },
[0x11301]={
category="mn",
description="GRANTHA SIGN CANDRABINDU",
@@ -153777,6 +156214,13 @@ characters.data={
linebreak="cm",
unicodeslot=0x1134D,
},
+ [0x11350]={
+ category="lo",
+ description="GRANTHA OM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11350,
+ },
[0x11357]={
category="mc",
description="GRANTHA AU LENGTH MARK",
@@ -155016,6 +157460,146 @@ characters.data={
linebreak="ba",
unicodeslot=0x115C9,
},
+ [0x115CA]={
+ category="po",
+ description="SIDDHAM SECTION MARK WITH TRIDENT AND U-SHAPED ORNAMENTS",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x115CA,
+ },
+ [0x115CB]={
+ category="po",
+ description="SIDDHAM SECTION MARK WITH TRIDENT AND DOTTED CRESCENTS",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x115CB,
+ },
+ [0x115CC]={
+ category="po",
+ description="SIDDHAM SECTION MARK WITH RAYS AND DOTTED CRESCENTS",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x115CC,
+ },
+ [0x115CD]={
+ category="po",
+ description="SIDDHAM SECTION MARK WITH RAYS AND DOTTED DOUBLE CRESCENTS",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x115CD,
+ },
+ [0x115CE]={
+ category="po",
+ description="SIDDHAM SECTION MARK WITH RAYS AND DOTTED TRIPLE CRESCENTS",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x115CE,
+ },
+ [0x115CF]={
+ category="po",
+ description="SIDDHAM SECTION MARK DOUBLE RING",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x115CF,
+ },
+ [0x115D0]={
+ category="po",
+ description="SIDDHAM SECTION MARK DOUBLE RING WITH RAYS",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x115D0,
+ },
+ [0x115D1]={
+ category="po",
+ description="SIDDHAM SECTION MARK WITH DOUBLE CRESCENTS",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x115D1,
+ },
+ [0x115D2]={
+ category="po",
+ description="SIDDHAM SECTION MARK WITH TRIPLE CRESCENTS",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x115D2,
+ },
+ [0x115D3]={
+ category="po",
+ description="SIDDHAM SECTION MARK WITH QUADRUPLE CRESCENTS",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x115D3,
+ },
+ [0x115D4]={
+ category="po",
+ description="SIDDHAM SECTION MARK WITH SEPTUPLE CRESCENTS",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x115D4,
+ },
+ [0x115D5]={
+ category="po",
+ description="SIDDHAM SECTION MARK WITH CIRCLES AND RAYS",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x115D5,
+ },
+ [0x115D6]={
+ category="po",
+ description="SIDDHAM SECTION MARK WITH CIRCLES AND TWO ENCLOSURES",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x115D6,
+ },
+ [0x115D7]={
+ category="po",
+ description="SIDDHAM SECTION MARK WITH CIRCLES AND FOUR ENCLOSURES",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x115D7,
+ },
+ [0x115D8]={
+ category="lo",
+ description="SIDDHAM LETTER THREE-CIRCLE ALTERNATE I",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x115D8,
+ },
+ [0x115D9]={
+ category="lo",
+ description="SIDDHAM LETTER TWO-CIRCLE ALTERNATE I",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x115D9,
+ },
+ [0x115DA]={
+ category="lo",
+ description="SIDDHAM LETTER TWO-CIRCLE ALTERNATE II",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x115DA,
+ },
+ [0x115DB]={
+ category="lo",
+ description="SIDDHAM LETTER ALTERNATE U",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x115DB,
+ },
+ [0x115DC]={
+ category="mn",
+ description="SIDDHAM VOWEL SIGN ALTERNATE U",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x115DC,
+ },
+ [0x115DD]={
+ category="mn",
+ description="SIDDHAM VOWEL SIGN ALTERNATE UU",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x115DD,
+ },
[0x11600]={
category="lo",
description="MODI LETTER A",
@@ -156034,6 +158618,406 @@ characters.data={
linebreak="nu",
unicodeslot=0x116C9,
},
+ [0x11700]={
+ category="lo",
+ description="AHOM LETTER KA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11700,
+ },
+ [0x11701]={
+ category="lo",
+ description="AHOM LETTER KHA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11701,
+ },
+ [0x11702]={
+ category="lo",
+ description="AHOM LETTER NGA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11702,
+ },
+ [0x11703]={
+ category="lo",
+ description="AHOM LETTER NA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11703,
+ },
+ [0x11704]={
+ category="lo",
+ description="AHOM LETTER TA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11704,
+ },
+ [0x11705]={
+ category="lo",
+ description="AHOM LETTER ALTERNATE TA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11705,
+ },
+ [0x11706]={
+ category="lo",
+ description="AHOM LETTER PA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11706,
+ },
+ [0x11707]={
+ category="lo",
+ description="AHOM LETTER PHA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11707,
+ },
+ [0x11708]={
+ category="lo",
+ description="AHOM LETTER BA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11708,
+ },
+ [0x11709]={
+ category="lo",
+ description="AHOM LETTER MA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11709,
+ },
+ [0x1170A]={
+ category="lo",
+ description="AHOM LETTER JA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x1170A,
+ },
+ [0x1170B]={
+ category="lo",
+ description="AHOM LETTER CHA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x1170B,
+ },
+ [0x1170C]={
+ category="lo",
+ description="AHOM LETTER THA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x1170C,
+ },
+ [0x1170D]={
+ category="lo",
+ description="AHOM LETTER RA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x1170D,
+ },
+ [0x1170E]={
+ category="lo",
+ description="AHOM LETTER LA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x1170E,
+ },
+ [0x1170F]={
+ category="lo",
+ description="AHOM LETTER SA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x1170F,
+ },
+ [0x11710]={
+ category="lo",
+ description="AHOM LETTER NYA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11710,
+ },
+ [0x11711]={
+ category="lo",
+ description="AHOM LETTER HA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11711,
+ },
+ [0x11712]={
+ category="lo",
+ description="AHOM LETTER A",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11712,
+ },
+ [0x11713]={
+ category="lo",
+ description="AHOM LETTER DA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11713,
+ },
+ [0x11714]={
+ category="lo",
+ description="AHOM LETTER DHA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11714,
+ },
+ [0x11715]={
+ category="lo",
+ description="AHOM LETTER GA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11715,
+ },
+ [0x11716]={
+ category="lo",
+ description="AHOM LETTER ALTERNATE GA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11716,
+ },
+ [0x11717]={
+ category="lo",
+ description="AHOM LETTER GHA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11717,
+ },
+ [0x11718]={
+ category="lo",
+ description="AHOM LETTER BHA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11718,
+ },
+ [0x11719]={
+ category="lo",
+ description="AHOM LETTER JHA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11719,
+ },
+ [0x1171D]={
+ category="mn",
+ description="AHOM CONSONANT SIGN MEDIAL LA",
+ direction="nsm",
+ linebreak="sa",
+ unicodeslot=0x1171D,
+ },
+ [0x1171E]={
+ category="mn",
+ description="AHOM CONSONANT SIGN MEDIAL RA",
+ direction="nsm",
+ linebreak="sa",
+ unicodeslot=0x1171E,
+ },
+ [0x1171F]={
+ category="mn",
+ description="AHOM CONSONANT SIGN MEDIAL LIGATING RA",
+ direction="nsm",
+ linebreak="sa",
+ unicodeslot=0x1171F,
+ },
+ [0x11720]={
+ category="mc",
+ description="AHOM VOWEL SIGN A",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11720,
+ },
+ [0x11721]={
+ category="mc",
+ description="AHOM VOWEL SIGN AA",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11721,
+ },
+ [0x11722]={
+ category="mn",
+ description="AHOM VOWEL SIGN I",
+ direction="nsm",
+ linebreak="sa",
+ unicodeslot=0x11722,
+ },
+ [0x11723]={
+ category="mn",
+ description="AHOM VOWEL SIGN II",
+ direction="nsm",
+ linebreak="sa",
+ unicodeslot=0x11723,
+ },
+ [0x11724]={
+ category="mn",
+ description="AHOM VOWEL SIGN U",
+ direction="nsm",
+ linebreak="sa",
+ unicodeslot=0x11724,
+ },
+ [0x11725]={
+ category="mn",
+ description="AHOM VOWEL SIGN UU",
+ direction="nsm",
+ linebreak="sa",
+ unicodeslot=0x11725,
+ },
+ [0x11726]={
+ category="mc",
+ description="AHOM VOWEL SIGN E",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x11726,
+ },
+ [0x11727]={
+ category="mn",
+ description="AHOM VOWEL SIGN AW",
+ direction="nsm",
+ linebreak="sa",
+ unicodeslot=0x11727,
+ },
+ [0x11728]={
+ category="mn",
+ description="AHOM VOWEL SIGN O",
+ direction="nsm",
+ linebreak="sa",
+ unicodeslot=0x11728,
+ },
+ [0x11729]={
+ category="mn",
+ description="AHOM VOWEL SIGN AI",
+ direction="nsm",
+ linebreak="sa",
+ unicodeslot=0x11729,
+ },
+ [0x1172A]={
+ category="mn",
+ description="AHOM VOWEL SIGN AM",
+ direction="nsm",
+ linebreak="sa",
+ unicodeslot=0x1172A,
+ },
+ [0x1172B]={
+ category="mn",
+ combining=0x9,
+ description="AHOM SIGN KILLER",
+ direction="nsm",
+ linebreak="sa",
+ unicodeslot=0x1172B,
+ },
+ [0x11730]={
+ category="nd",
+ description="AHOM DIGIT ZERO",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11730,
+ },
+ [0x11731]={
+ category="nd",
+ description="AHOM DIGIT ONE",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11731,
+ },
+ [0x11732]={
+ category="nd",
+ description="AHOM DIGIT TWO",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11732,
+ },
+ [0x11733]={
+ category="nd",
+ description="AHOM DIGIT THREE",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11733,
+ },
+ [0x11734]={
+ category="nd",
+ description="AHOM DIGIT FOUR",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11734,
+ },
+ [0x11735]={
+ category="nd",
+ description="AHOM DIGIT FIVE",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11735,
+ },
+ [0x11736]={
+ category="nd",
+ description="AHOM DIGIT SIX",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11736,
+ },
+ [0x11737]={
+ category="nd",
+ description="AHOM DIGIT SEVEN",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11737,
+ },
+ [0x11738]={
+ category="nd",
+ description="AHOM DIGIT EIGHT",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11738,
+ },
+ [0x11739]={
+ category="nd",
+ description="AHOM DIGIT NINE",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11739,
+ },
+ [0x1173A]={
+ category="no",
+ description="AHOM NUMBER TEN",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x1173A,
+ },
+ [0x1173B]={
+ category="no",
+ description="AHOM NUMBER TWENTY",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x1173B,
+ },
+ [0x1173C]={
+ category="po",
+ description="AHOM SIGN SMALL SECTION",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x1173C,
+ },
+ [0x1173D]={
+ category="po",
+ description="AHOM SIGN SECTION",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x1173D,
+ },
+ [0x1173E]={
+ category="po",
+ description="AHOM SIGN RULAI",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x1173E,
+ },
+ [0x1173F]={
+ category="so",
+ description="AHOM SYMBOL VI",
+ direction="l",
+ linebreak="sa",
+ unicodeslot=0x1173F,
+ },
[0x118A0]={
category="lu",
description="WARANG CITI CAPITAL LETTER NGAA",
@@ -163470,6 +166454,13 @@ characters.data={
linebreak="al",
unicodeslot=0x12398,
},
+ [0x12399]={
+ category="lo",
+ description="CUNEIFORM SIGN U U",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12399,
+ },
[0x12400]={
category="nl",
description="CUNEIFORM NUMERIC SIGN TWO ASH",
@@ -164282,6 +167273,1378 @@ characters.data={
linebreak="ba",
unicodeslot=0x12474,
},
+ [0x12480]={
+ category="lo",
+ description="CUNEIFORM SIGN AB TIMES NUN TENU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12480,
+ },
+ [0x12481]={
+ category="lo",
+ description="CUNEIFORM SIGN AB TIMES SHU2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12481,
+ },
+ [0x12482]={
+ category="lo",
+ description="CUNEIFORM SIGN AD TIMES ESH2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12482,
+ },
+ [0x12483]={
+ category="lo",
+ description="CUNEIFORM SIGN BAD TIMES DISH TENU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12483,
+ },
+ [0x12484]={
+ category="lo",
+ description="CUNEIFORM SIGN BAHAR2 TIMES AB2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12484,
+ },
+ [0x12485]={
+ category="lo",
+ description="CUNEIFORM SIGN BAHAR2 TIMES NI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12485,
+ },
+ [0x12486]={
+ category="lo",
+ description="CUNEIFORM SIGN BAHAR2 TIMES ZA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12486,
+ },
+ [0x12487]={
+ category="lo",
+ description="CUNEIFORM SIGN BU OVER BU TIMES NA2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12487,
+ },
+ [0x12488]={
+ category="lo",
+ description="CUNEIFORM SIGN DA TIMES TAK4",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12488,
+ },
+ [0x12489]={
+ category="lo",
+ description="CUNEIFORM SIGN DAG TIMES KUR",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12489,
+ },
+ [0x1248A]={
+ category="lo",
+ description="CUNEIFORM SIGN DIM TIMES IGI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1248A,
+ },
+ [0x1248B]={
+ category="lo",
+ description="CUNEIFORM SIGN DIM TIMES U U U",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1248B,
+ },
+ [0x1248C]={
+ category="lo",
+ description="CUNEIFORM SIGN DIM2 TIMES UD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1248C,
+ },
+ [0x1248D]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES ANSHE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1248D,
+ },
+ [0x1248E]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES ASH",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1248E,
+ },
+ [0x1248F]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES ASH AT LEFT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1248F,
+ },
+ [0x12490]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES DIN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12490,
+ },
+ [0x12491]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES DUN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12491,
+ },
+ [0x12492]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES ERIN2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12492,
+ },
+ [0x12493]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES GA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12493,
+ },
+ [0x12494]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES GI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12494,
+ },
+ [0x12495]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES GIR2 GUNU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12495,
+ },
+ [0x12496]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES GISH",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12496,
+ },
+ [0x12497]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES HA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12497,
+ },
+ [0x12498]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES HI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12498,
+ },
+ [0x12499]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES IGI GUNU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12499,
+ },
+ [0x1249A]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES KASKAL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1249A,
+ },
+ [0x1249B]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES KUR",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1249B,
+ },
+ [0x1249C]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES KUSHU2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1249C,
+ },
+ [0x1249D]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES KUSHU2 PLUS KASKAL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1249D,
+ },
+ [0x1249E]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES LAK-020",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1249E,
+ },
+ [0x1249F]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES LAM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1249F,
+ },
+ [0x124A0]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES LAM TIMES KUR",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124A0,
+ },
+ [0x124A1]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES LUH PLUS GISH",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124A1,
+ },
+ [0x124A2]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES MASH",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124A2,
+ },
+ [0x124A3]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES MES",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124A3,
+ },
+ [0x124A4]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES MI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124A4,
+ },
+ [0x124A5]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES NI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124A5,
+ },
+ [0x124A6]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES PI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124A6,
+ },
+ [0x124A7]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES SHE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124A7,
+ },
+ [0x124A8]={
+ category="lo",
+ description="CUNEIFORM SIGN DUG TIMES SI GUNU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124A8,
+ },
+ [0x124A9]={
+ category="lo",
+ description="CUNEIFORM SIGN E2 TIMES KUR",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124A9,
+ },
+ [0x124AA]={
+ category="lo",
+ description="CUNEIFORM SIGN E2 TIMES PAP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124AA,
+ },
+ [0x124AB]={
+ category="lo",
+ description="CUNEIFORM SIGN ERIN2 X",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124AB,
+ },
+ [0x124AC]={
+ category="lo",
+ description="CUNEIFORM SIGN ESH2 CROSSING ESH2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124AC,
+ },
+ [0x124AD]={
+ category="lo",
+ description="CUNEIFORM SIGN EZEN SHESHIG TIMES ASH",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124AD,
+ },
+ [0x124AE]={
+ category="lo",
+ description="CUNEIFORM SIGN EZEN SHESHIG TIMES HI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124AE,
+ },
+ [0x124AF]={
+ category="lo",
+ description="CUNEIFORM SIGN EZEN SHESHIG TIMES IGI GUNU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124AF,
+ },
+ [0x124B0]={
+ category="lo",
+ description="CUNEIFORM SIGN EZEN SHESHIG TIMES LA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124B0,
+ },
+ [0x124B1]={
+ category="lo",
+ description="CUNEIFORM SIGN EZEN SHESHIG TIMES LAL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124B1,
+ },
+ [0x124B2]={
+ category="lo",
+ description="CUNEIFORM SIGN EZEN SHESHIG TIMES ME",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124B2,
+ },
+ [0x124B3]={
+ category="lo",
+ description="CUNEIFORM SIGN EZEN SHESHIG TIMES MES",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124B3,
+ },
+ [0x124B4]={
+ category="lo",
+ description="CUNEIFORM SIGN EZEN SHESHIG TIMES SU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124B4,
+ },
+ [0x124B5]={
+ category="lo",
+ description="CUNEIFORM SIGN EZEN TIMES SU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124B5,
+ },
+ [0x124B6]={
+ category="lo",
+ description="CUNEIFORM SIGN GA2 TIMES BAHAR2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124B6,
+ },
+ [0x124B7]={
+ category="lo",
+ description="CUNEIFORM SIGN GA2 TIMES DIM GUNU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124B7,
+ },
+ [0x124B8]={
+ category="lo",
+ description="CUNEIFORM SIGN GA2 TIMES DUG TIMES IGI GUNU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124B8,
+ },
+ [0x124B9]={
+ category="lo",
+ description="CUNEIFORM SIGN GA2 TIMES DUG TIMES KASKAL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124B9,
+ },
+ [0x124BA]={
+ category="lo",
+ description="CUNEIFORM SIGN GA2 TIMES EREN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124BA,
+ },
+ [0x124BB]={
+ category="lo",
+ description="CUNEIFORM SIGN GA2 TIMES GA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124BB,
+ },
+ [0x124BC]={
+ category="lo",
+ description="CUNEIFORM SIGN GA2 TIMES GAR PLUS DI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124BC,
+ },
+ [0x124BD]={
+ category="lo",
+ description="CUNEIFORM SIGN GA2 TIMES GAR PLUS NE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124BD,
+ },
+ [0x124BE]={
+ category="lo",
+ description="CUNEIFORM SIGN GA2 TIMES HA PLUS A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124BE,
+ },
+ [0x124BF]={
+ category="lo",
+ description="CUNEIFORM SIGN GA2 TIMES KUSHU2 PLUS KASKAL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124BF,
+ },
+ [0x124C0]={
+ category="lo",
+ description="CUNEIFORM SIGN GA2 TIMES LAM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124C0,
+ },
+ [0x124C1]={
+ category="lo",
+ description="CUNEIFORM SIGN GA2 TIMES LAM TIMES KUR",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124C1,
+ },
+ [0x124C2]={
+ category="lo",
+ description="CUNEIFORM SIGN GA2 TIMES LUH",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124C2,
+ },
+ [0x124C3]={
+ category="lo",
+ description="CUNEIFORM SIGN GA2 TIMES MUSH",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124C3,
+ },
+ [0x124C4]={
+ category="lo",
+ description="CUNEIFORM SIGN GA2 TIMES NE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124C4,
+ },
+ [0x124C5]={
+ category="lo",
+ description="CUNEIFORM SIGN GA2 TIMES NE PLUS E2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124C5,
+ },
+ [0x124C6]={
+ category="lo",
+ description="CUNEIFORM SIGN GA2 TIMES NE PLUS GI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124C6,
+ },
+ [0x124C7]={
+ category="lo",
+ description="CUNEIFORM SIGN GA2 TIMES SHIM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124C7,
+ },
+ [0x124C8]={
+ category="lo",
+ description="CUNEIFORM SIGN GA2 TIMES ZIZ2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124C8,
+ },
+ [0x124C9]={
+ category="lo",
+ description="CUNEIFORM SIGN GABA ROTATED NINETY DEGREES",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124C9,
+ },
+ [0x124CA]={
+ category="lo",
+ description="CUNEIFORM SIGN GESHTIN TIMES U",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124CA,
+ },
+ [0x124CB]={
+ category="lo",
+ description="CUNEIFORM SIGN GISH TIMES GISH CROSSING GISH",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124CB,
+ },
+ [0x124CC]={
+ category="lo",
+ description="CUNEIFORM SIGN GU2 TIMES IGI GUNU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124CC,
+ },
+ [0x124CD]={
+ category="lo",
+ description="CUNEIFORM SIGN GUD PLUS GISH TIMES TAK4",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124CD,
+ },
+ [0x124CE]={
+ category="lo",
+ description="CUNEIFORM SIGN HA TENU GUNU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124CE,
+ },
+ [0x124CF]={
+ category="lo",
+ description="CUNEIFORM SIGN HI TIMES ASH OVER HI TIMES ASH",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124CF,
+ },
+ [0x124D0]={
+ category="lo",
+ description="CUNEIFORM SIGN KA TIMES BU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124D0,
+ },
+ [0x124D1]={
+ category="lo",
+ description="CUNEIFORM SIGN KA TIMES KA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124D1,
+ },
+ [0x124D2]={
+ category="lo",
+ description="CUNEIFORM SIGN KA TIMES U U U",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124D2,
+ },
+ [0x124D3]={
+ category="lo",
+ description="CUNEIFORM SIGN KA TIMES UR",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124D3,
+ },
+ [0x124D4]={
+ category="lo",
+ description="CUNEIFORM SIGN LAGAB TIMES ZU OVER ZU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124D4,
+ },
+ [0x124D5]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-003",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124D5,
+ },
+ [0x124D6]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-021",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124D6,
+ },
+ [0x124D7]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-025",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124D7,
+ },
+ [0x124D8]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-030",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124D8,
+ },
+ [0x124D9]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-050",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124D9,
+ },
+ [0x124DA]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-051",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124DA,
+ },
+ [0x124DB]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-062",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124DB,
+ },
+ [0x124DC]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-079 OVER LAK-079 GUNU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124DC,
+ },
+ [0x124DD]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-080",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124DD,
+ },
+ [0x124DE]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-081 OVER LAK-081",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124DE,
+ },
+ [0x124DF]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-092",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124DF,
+ },
+ [0x124E0]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-130",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124E0,
+ },
+ [0x124E1]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-142",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124E1,
+ },
+ [0x124E2]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-210",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124E2,
+ },
+ [0x124E3]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-219",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124E3,
+ },
+ [0x124E4]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-220",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124E4,
+ },
+ [0x124E5]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-225",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124E5,
+ },
+ [0x124E6]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-228",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124E6,
+ },
+ [0x124E7]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-238",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124E7,
+ },
+ [0x124E8]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-265",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124E8,
+ },
+ [0x124E9]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-266",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124E9,
+ },
+ [0x124EA]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-343",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124EA,
+ },
+ [0x124EB]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-347",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124EB,
+ },
+ [0x124EC]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-348",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124EC,
+ },
+ [0x124ED]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-383",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124ED,
+ },
+ [0x124EE]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-384",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124EE,
+ },
+ [0x124EF]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-390",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124EF,
+ },
+ [0x124F0]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-441",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124F0,
+ },
+ [0x124F1]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-449",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124F1,
+ },
+ [0x124F2]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-449 TIMES GU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124F2,
+ },
+ [0x124F3]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-449 TIMES IGI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124F3,
+ },
+ [0x124F4]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-449 TIMES PAP PLUS LU3",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124F4,
+ },
+ [0x124F5]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-449 TIMES PAP PLUS PAP PLUS LU3",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124F5,
+ },
+ [0x124F6]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-449 TIMES U2 PLUS BA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124F6,
+ },
+ [0x124F7]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-450",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124F7,
+ },
+ [0x124F8]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-457",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124F8,
+ },
+ [0x124F9]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-470",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124F9,
+ },
+ [0x124FA]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-483",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124FA,
+ },
+ [0x124FB]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-490",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124FB,
+ },
+ [0x124FC]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-492",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124FC,
+ },
+ [0x124FD]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-493",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124FD,
+ },
+ [0x124FE]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-495",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124FE,
+ },
+ [0x124FF]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-550",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x124FF,
+ },
+ [0x12500]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-608",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12500,
+ },
+ [0x12501]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-617",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12501,
+ },
+ [0x12502]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-617 TIMES ASH",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12502,
+ },
+ [0x12503]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-617 TIMES BAD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12503,
+ },
+ [0x12504]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-617 TIMES DUN3 GUNU GUNU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12504,
+ },
+ [0x12505]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-617 TIMES KU3",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12505,
+ },
+ [0x12506]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-617 TIMES LA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12506,
+ },
+ [0x12507]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-617 TIMES TAR",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12507,
+ },
+ [0x12508]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-617 TIMES TE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12508,
+ },
+ [0x12509]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-617 TIMES U2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12509,
+ },
+ [0x1250A]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-617 TIMES UD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1250A,
+ },
+ [0x1250B]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-617 TIMES URUDA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1250B,
+ },
+ [0x1250C]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-636",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1250C,
+ },
+ [0x1250D]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-648",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1250D,
+ },
+ [0x1250E]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-648 TIMES DUB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1250E,
+ },
+ [0x1250F]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-648 TIMES GA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1250F,
+ },
+ [0x12510]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-648 TIMES IGI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12510,
+ },
+ [0x12511]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-648 TIMES IGI GUNU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12511,
+ },
+ [0x12512]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-648 TIMES NI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12512,
+ },
+ [0x12513]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-648 TIMES PAP PLUS PAP PLUS LU3",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12513,
+ },
+ [0x12514]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-648 TIMES SHESH PLUS KI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12514,
+ },
+ [0x12515]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-648 TIMES UD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12515,
+ },
+ [0x12516]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-648 TIMES URUDA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12516,
+ },
+ [0x12517]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-724",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12517,
+ },
+ [0x12518]={
+ category="lo",
+ description="CUNEIFORM SIGN LAK-749",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12518,
+ },
+ [0x12519]={
+ category="lo",
+ description="CUNEIFORM SIGN LU2 GUNU TIMES ASH",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12519,
+ },
+ [0x1251A]={
+ category="lo",
+ description="CUNEIFORM SIGN LU2 TIMES DISH",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1251A,
+ },
+ [0x1251B]={
+ category="lo",
+ description="CUNEIFORM SIGN LU2 TIMES HAL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1251B,
+ },
+ [0x1251C]={
+ category="lo",
+ description="CUNEIFORM SIGN LU2 TIMES PAP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1251C,
+ },
+ [0x1251D]={
+ category="lo",
+ description="CUNEIFORM SIGN LU2 TIMES PAP PLUS PAP PLUS LU3",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1251D,
+ },
+ [0x1251E]={
+ category="lo",
+ description="CUNEIFORM SIGN LU2 TIMES TAK4",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1251E,
+ },
+ [0x1251F]={
+ category="lo",
+ description="CUNEIFORM SIGN MI PLUS ZA7",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1251F,
+ },
+ [0x12520]={
+ category="lo",
+ description="CUNEIFORM SIGN MUSH OVER MUSH TIMES GA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12520,
+ },
+ [0x12521]={
+ category="lo",
+ description="CUNEIFORM SIGN MUSH OVER MUSH TIMES KAK",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12521,
+ },
+ [0x12522]={
+ category="lo",
+ description="CUNEIFORM SIGN NINDA2 TIMES DIM GUNU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12522,
+ },
+ [0x12523]={
+ category="lo",
+ description="CUNEIFORM SIGN NINDA2 TIMES GISH",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12523,
+ },
+ [0x12524]={
+ category="lo",
+ description="CUNEIFORM SIGN NINDA2 TIMES GUL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12524,
+ },
+ [0x12525]={
+ category="lo",
+ description="CUNEIFORM SIGN NINDA2 TIMES HI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12525,
+ },
+ [0x12526]={
+ category="lo",
+ description="CUNEIFORM SIGN NINDA2 TIMES KESH2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12526,
+ },
+ [0x12527]={
+ category="lo",
+ description="CUNEIFORM SIGN NINDA2 TIMES LAK-050",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12527,
+ },
+ [0x12528]={
+ category="lo",
+ description="CUNEIFORM SIGN NINDA2 TIMES MASH",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12528,
+ },
+ [0x12529]={
+ category="lo",
+ description="CUNEIFORM SIGN NINDA2 TIMES PAP PLUS PAP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12529,
+ },
+ [0x1252A]={
+ category="lo",
+ description="CUNEIFORM SIGN NINDA2 TIMES U",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1252A,
+ },
+ [0x1252B]={
+ category="lo",
+ description="CUNEIFORM SIGN NINDA2 TIMES U PLUS U",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1252B,
+ },
+ [0x1252C]={
+ category="lo",
+ description="CUNEIFORM SIGN NINDA2 TIMES URUDA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1252C,
+ },
+ [0x1252D]={
+ category="lo",
+ description="CUNEIFORM SIGN SAG GUNU TIMES HA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1252D,
+ },
+ [0x1252E]={
+ category="lo",
+ description="CUNEIFORM SIGN SAG TIMES EN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1252E,
+ },
+ [0x1252F]={
+ category="lo",
+ description="CUNEIFORM SIGN SAG TIMES SHE AT LEFT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1252F,
+ },
+ [0x12530]={
+ category="lo",
+ description="CUNEIFORM SIGN SAG TIMES TAK4",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12530,
+ },
+ [0x12531]={
+ category="lo",
+ description="CUNEIFORM SIGN SHA6 TENU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12531,
+ },
+ [0x12532]={
+ category="lo",
+ description="CUNEIFORM SIGN SHE OVER SHE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12532,
+ },
+ [0x12533]={
+ category="lo",
+ description="CUNEIFORM SIGN SHE PLUS HUB2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12533,
+ },
+ [0x12534]={
+ category="lo",
+ description="CUNEIFORM SIGN SHE PLUS NAM2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12534,
+ },
+ [0x12535]={
+ category="lo",
+ description="CUNEIFORM SIGN SHE PLUS SAR",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12535,
+ },
+ [0x12536]={
+ category="lo",
+ description="CUNEIFORM SIGN SHU2 PLUS DUG TIMES NI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12536,
+ },
+ [0x12537]={
+ category="lo",
+ description="CUNEIFORM SIGN SHU2 PLUS E2 TIMES AN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12537,
+ },
+ [0x12538]={
+ category="lo",
+ description="CUNEIFORM SIGN SI TIMES TAK4",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12538,
+ },
+ [0x12539]={
+ category="lo",
+ description="CUNEIFORM SIGN TAK4 PLUS SAG",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12539,
+ },
+ [0x1253A]={
+ category="lo",
+ description="CUNEIFORM SIGN TUM TIMES GAN2 TENU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1253A,
+ },
+ [0x1253B]={
+ category="lo",
+ description="CUNEIFORM SIGN TUM TIMES THREE DISH",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1253B,
+ },
+ [0x1253C]={
+ category="lo",
+ description="CUNEIFORM SIGN UR2 INVERTED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1253C,
+ },
+ [0x1253D]={
+ category="lo",
+ description="CUNEIFORM SIGN UR2 TIMES UD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1253D,
+ },
+ [0x1253E]={
+ category="lo",
+ description="CUNEIFORM SIGN URU TIMES DARA3",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1253E,
+ },
+ [0x1253F]={
+ category="lo",
+ description="CUNEIFORM SIGN URU TIMES LAK-668",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1253F,
+ },
+ [0x12540]={
+ category="lo",
+ description="CUNEIFORM SIGN URU TIMES LU3",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12540,
+ },
+ [0x12541]={
+ category="lo",
+ description="CUNEIFORM SIGN ZA7",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12541,
+ },
+ [0x12542]={
+ category="lo",
+ description="CUNEIFORM SIGN ZU OVER ZU PLUS SAR",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12542,
+ },
+ [0x12543]={
+ category="lo",
+ description="CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x12543,
+ },
[0x13000]={
category="lo",
description="EGYPTIAN HIEROGLYPH A001",
@@ -171779,6 +176142,4087 @@ characters.data={
linebreak="al",
unicodeslot=0x1342E,
},
+ [0x14400]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A001",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14400,
+ },
+ [0x14401]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A002",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14401,
+ },
+ [0x14402]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A003",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14402,
+ },
+ [0x14403]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A004",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14403,
+ },
+ [0x14404]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A005",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14404,
+ },
+ [0x14405]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A006",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14405,
+ },
+ [0x14406]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A007",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14406,
+ },
+ [0x14407]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A008",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14407,
+ },
+ [0x14408]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A009",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14408,
+ },
+ [0x14409]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A010",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14409,
+ },
+ [0x1440A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A010A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1440A,
+ },
+ [0x1440B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A011",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1440B,
+ },
+ [0x1440C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A012",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1440C,
+ },
+ [0x1440D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A013",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1440D,
+ },
+ [0x1440E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A014",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1440E,
+ },
+ [0x1440F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A015",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1440F,
+ },
+ [0x14410]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A016",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14410,
+ },
+ [0x14411]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A017",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14411,
+ },
+ [0x14412]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A018",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14412,
+ },
+ [0x14413]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A019",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14413,
+ },
+ [0x14414]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A020",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14414,
+ },
+ [0x14415]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A021",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14415,
+ },
+ [0x14416]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A022",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14416,
+ },
+ [0x14417]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A023",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14417,
+ },
+ [0x14418]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A024",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14418,
+ },
+ [0x14419]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A025",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14419,
+ },
+ [0x1441A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A026",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1441A,
+ },
+ [0x1441B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A026A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1441B,
+ },
+ [0x1441C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A027",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1441C,
+ },
+ [0x1441D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A028",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1441D,
+ },
+ [0x1441E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A029",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1441E,
+ },
+ [0x1441F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A030",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1441F,
+ },
+ [0x14420]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A031",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14420,
+ },
+ [0x14421]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A032",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14421,
+ },
+ [0x14422]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A033",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14422,
+ },
+ [0x14423]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A034",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14423,
+ },
+ [0x14424]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A035",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14424,
+ },
+ [0x14425]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A036",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14425,
+ },
+ [0x14426]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A037",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14426,
+ },
+ [0x14427]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A038",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14427,
+ },
+ [0x14428]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A039",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14428,
+ },
+ [0x14429]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A039A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14429,
+ },
+ [0x1442A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A040",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1442A,
+ },
+ [0x1442B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A041",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1442B,
+ },
+ [0x1442C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A041A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1442C,
+ },
+ [0x1442D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A042",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1442D,
+ },
+ [0x1442E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A043",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1442E,
+ },
+ [0x1442F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A044",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1442F,
+ },
+ [0x14430]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A045",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14430,
+ },
+ [0x14431]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A045A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14431,
+ },
+ [0x14432]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A046",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14432,
+ },
+ [0x14433]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A046A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14433,
+ },
+ [0x14434]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A046B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14434,
+ },
+ [0x14435]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A047",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14435,
+ },
+ [0x14436]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A048",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14436,
+ },
+ [0x14437]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A049",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14437,
+ },
+ [0x14438]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A050",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14438,
+ },
+ [0x14439]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A051",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14439,
+ },
+ [0x1443A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A052",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1443A,
+ },
+ [0x1443B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A053",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1443B,
+ },
+ [0x1443C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A054",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1443C,
+ },
+ [0x1443D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A055",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1443D,
+ },
+ [0x1443E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A056",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1443E,
+ },
+ [0x1443F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A057",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1443F,
+ },
+ [0x14440]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A058",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14440,
+ },
+ [0x14441]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A059",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14441,
+ },
+ [0x14442]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A060",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14442,
+ },
+ [0x14443]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A061",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14443,
+ },
+ [0x14444]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A062",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14444,
+ },
+ [0x14445]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A063",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14445,
+ },
+ [0x14446]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A064",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14446,
+ },
+ [0x14447]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A065",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14447,
+ },
+ [0x14448]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A066",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14448,
+ },
+ [0x14449]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A066A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14449,
+ },
+ [0x1444A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A066B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1444A,
+ },
+ [0x1444B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A066C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1444B,
+ },
+ [0x1444C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A067",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1444C,
+ },
+ [0x1444D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A068",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1444D,
+ },
+ [0x1444E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A069",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1444E,
+ },
+ [0x1444F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A070",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1444F,
+ },
+ [0x14450]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A071",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14450,
+ },
+ [0x14451]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A072",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14451,
+ },
+ [0x14452]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A073",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14452,
+ },
+ [0x14453]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A074",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14453,
+ },
+ [0x14454]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A075",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14454,
+ },
+ [0x14455]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A076",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14455,
+ },
+ [0x14456]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A077",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14456,
+ },
+ [0x14457]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A078",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14457,
+ },
+ [0x14458]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A079",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14458,
+ },
+ [0x14459]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A080",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14459,
+ },
+ [0x1445A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A081",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1445A,
+ },
+ [0x1445B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A082",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1445B,
+ },
+ [0x1445C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A083",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1445C,
+ },
+ [0x1445D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A084",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1445D,
+ },
+ [0x1445E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A085",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1445E,
+ },
+ [0x1445F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A086",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1445F,
+ },
+ [0x14460]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A087",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14460,
+ },
+ [0x14461]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A088",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14461,
+ },
+ [0x14462]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A089",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14462,
+ },
+ [0x14463]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A090",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14463,
+ },
+ [0x14464]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A091",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14464,
+ },
+ [0x14465]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A092",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14465,
+ },
+ [0x14466]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A093",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14466,
+ },
+ [0x14467]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A094",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14467,
+ },
+ [0x14468]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A095",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14468,
+ },
+ [0x14469]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A096",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14469,
+ },
+ [0x1446A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A097",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1446A,
+ },
+ [0x1446B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A097A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1446B,
+ },
+ [0x1446C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A098",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1446C,
+ },
+ [0x1446D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A098A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1446D,
+ },
+ [0x1446E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A099",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1446E,
+ },
+ [0x1446F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A100",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1446F,
+ },
+ [0x14470]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A100A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14470,
+ },
+ [0x14471]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A101",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14471,
+ },
+ [0x14472]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A101A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14472,
+ },
+ [0x14473]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A102",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14473,
+ },
+ [0x14474]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A102A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14474,
+ },
+ [0x14475]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A103",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14475,
+ },
+ [0x14476]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A104",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14476,
+ },
+ [0x14477]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A104A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14477,
+ },
+ [0x14478]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A104B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14478,
+ },
+ [0x14479]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A104C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14479,
+ },
+ [0x1447A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A105",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1447A,
+ },
+ [0x1447B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A105A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1447B,
+ },
+ [0x1447C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A105B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1447C,
+ },
+ [0x1447D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A106",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1447D,
+ },
+ [0x1447E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A107",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1447E,
+ },
+ [0x1447F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A107A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1447F,
+ },
+ [0x14480]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A107B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14480,
+ },
+ [0x14481]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A107C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14481,
+ },
+ [0x14482]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A108",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14482,
+ },
+ [0x14483]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A109",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14483,
+ },
+ [0x14484]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A110",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14484,
+ },
+ [0x14485]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A110A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14485,
+ },
+ [0x14486]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A110B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14486,
+ },
+ [0x14487]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A111",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14487,
+ },
+ [0x14488]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A112",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14488,
+ },
+ [0x14489]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A113",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14489,
+ },
+ [0x1448A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A114",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1448A,
+ },
+ [0x1448B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A115",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1448B,
+ },
+ [0x1448C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A115A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1448C,
+ },
+ [0x1448D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A116",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1448D,
+ },
+ [0x1448E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A117",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1448E,
+ },
+ [0x1448F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A118",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1448F,
+ },
+ [0x14490]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A119",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14490,
+ },
+ [0x14491]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A120",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14491,
+ },
+ [0x14492]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A121",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14492,
+ },
+ [0x14493]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A122",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14493,
+ },
+ [0x14494]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A123",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14494,
+ },
+ [0x14495]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A124",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14495,
+ },
+ [0x14496]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A125",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14496,
+ },
+ [0x14497]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A125A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14497,
+ },
+ [0x14498]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A126",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14498,
+ },
+ [0x14499]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A127",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14499,
+ },
+ [0x1449A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A128",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1449A,
+ },
+ [0x1449B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A129",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1449B,
+ },
+ [0x1449C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A130",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1449C,
+ },
+ [0x1449D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A131",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1449D,
+ },
+ [0x1449E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A132",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1449E,
+ },
+ [0x1449F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A133",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1449F,
+ },
+ [0x144A0]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A134",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144A0,
+ },
+ [0x144A1]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A135",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144A1,
+ },
+ [0x144A2]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A135A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144A2,
+ },
+ [0x144A3]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A136",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144A3,
+ },
+ [0x144A4]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A137",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144A4,
+ },
+ [0x144A5]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A138",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144A5,
+ },
+ [0x144A6]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A139",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144A6,
+ },
+ [0x144A7]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A140",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144A7,
+ },
+ [0x144A8]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A141",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144A8,
+ },
+ [0x144A9]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A142",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144A9,
+ },
+ [0x144AA]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A143",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144AA,
+ },
+ [0x144AB]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A144",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144AB,
+ },
+ [0x144AC]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A145",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144AC,
+ },
+ [0x144AD]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A146",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144AD,
+ },
+ [0x144AE]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A147",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144AE,
+ },
+ [0x144AF]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A148",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144AF,
+ },
+ [0x144B0]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A149",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144B0,
+ },
+ [0x144B1]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A150",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144B1,
+ },
+ [0x144B2]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A151",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144B2,
+ },
+ [0x144B3]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A152",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144B3,
+ },
+ [0x144B4]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A153",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144B4,
+ },
+ [0x144B5]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A154",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144B5,
+ },
+ [0x144B6]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A155",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144B6,
+ },
+ [0x144B7]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A156",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144B7,
+ },
+ [0x144B8]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A157",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144B8,
+ },
+ [0x144B9]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A158",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144B9,
+ },
+ [0x144BA]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A159",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144BA,
+ },
+ [0x144BB]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A160",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144BB,
+ },
+ [0x144BC]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A161",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144BC,
+ },
+ [0x144BD]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A162",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144BD,
+ },
+ [0x144BE]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A163",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144BE,
+ },
+ [0x144BF]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A164",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144BF,
+ },
+ [0x144C0]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A165",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144C0,
+ },
+ [0x144C1]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A166",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144C1,
+ },
+ [0x144C2]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A167",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144C2,
+ },
+ [0x144C3]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A168",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144C3,
+ },
+ [0x144C4]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A169",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144C4,
+ },
+ [0x144C5]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A170",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144C5,
+ },
+ [0x144C6]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A171",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144C6,
+ },
+ [0x144C7]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A172",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144C7,
+ },
+ [0x144C8]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A173",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144C8,
+ },
+ [0x144C9]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A174",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144C9,
+ },
+ [0x144CA]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A175",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144CA,
+ },
+ [0x144CB]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A176",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144CB,
+ },
+ [0x144CC]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A177",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144CC,
+ },
+ [0x144CD]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A178",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144CD,
+ },
+ [0x144CE]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A179",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144CE,
+ },
+ [0x144CF]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A180",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144CF,
+ },
+ [0x144D0]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A181",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144D0,
+ },
+ [0x144D1]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A182",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144D1,
+ },
+ [0x144D2]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A183",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144D2,
+ },
+ [0x144D3]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A184",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144D3,
+ },
+ [0x144D4]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A185",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144D4,
+ },
+ [0x144D5]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A186",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144D5,
+ },
+ [0x144D6]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A187",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144D6,
+ },
+ [0x144D7]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A188",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144D7,
+ },
+ [0x144D8]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A189",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144D8,
+ },
+ [0x144D9]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A190",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144D9,
+ },
+ [0x144DA]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A191",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144DA,
+ },
+ [0x144DB]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A192",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144DB,
+ },
+ [0x144DC]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A193",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144DC,
+ },
+ [0x144DD]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A194",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144DD,
+ },
+ [0x144DE]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A195",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144DE,
+ },
+ [0x144DF]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A196",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144DF,
+ },
+ [0x144E0]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A197",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144E0,
+ },
+ [0x144E1]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A198",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144E1,
+ },
+ [0x144E2]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A199",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144E2,
+ },
+ [0x144E3]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A200",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144E3,
+ },
+ [0x144E4]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A201",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144E4,
+ },
+ [0x144E5]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A202",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144E5,
+ },
+ [0x144E6]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A202A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144E6,
+ },
+ [0x144E7]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A202B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144E7,
+ },
+ [0x144E8]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A203",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144E8,
+ },
+ [0x144E9]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A204",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144E9,
+ },
+ [0x144EA]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A205",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144EA,
+ },
+ [0x144EB]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A206",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144EB,
+ },
+ [0x144EC]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A207",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144EC,
+ },
+ [0x144ED]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A207A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144ED,
+ },
+ [0x144EE]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A208",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144EE,
+ },
+ [0x144EF]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A209",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144EF,
+ },
+ [0x144F0]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A209A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144F0,
+ },
+ [0x144F1]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A210",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144F1,
+ },
+ [0x144F2]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A211",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144F2,
+ },
+ [0x144F3]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A212",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144F3,
+ },
+ [0x144F4]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A213",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144F4,
+ },
+ [0x144F5]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A214",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144F5,
+ },
+ [0x144F6]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A215",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144F6,
+ },
+ [0x144F7]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A215A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144F7,
+ },
+ [0x144F8]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A216",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144F8,
+ },
+ [0x144F9]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A216A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144F9,
+ },
+ [0x144FA]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A217",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144FA,
+ },
+ [0x144FB]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A218",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144FB,
+ },
+ [0x144FC]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A219",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144FC,
+ },
+ [0x144FD]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A220",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144FD,
+ },
+ [0x144FE]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A221",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144FE,
+ },
+ [0x144FF]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A222",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x144FF,
+ },
+ [0x14500]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A223",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14500,
+ },
+ [0x14501]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A224",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14501,
+ },
+ [0x14502]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A225",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14502,
+ },
+ [0x14503]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A226",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14503,
+ },
+ [0x14504]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A227",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14504,
+ },
+ [0x14505]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A227A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14505,
+ },
+ [0x14506]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A228",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14506,
+ },
+ [0x14507]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A229",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14507,
+ },
+ [0x14508]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A230",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14508,
+ },
+ [0x14509]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A231",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14509,
+ },
+ [0x1450A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A232",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1450A,
+ },
+ [0x1450B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A233",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1450B,
+ },
+ [0x1450C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A234",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1450C,
+ },
+ [0x1450D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A235",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1450D,
+ },
+ [0x1450E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A236",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1450E,
+ },
+ [0x1450F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A237",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1450F,
+ },
+ [0x14510]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A238",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14510,
+ },
+ [0x14511]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A239",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14511,
+ },
+ [0x14512]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A240",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14512,
+ },
+ [0x14513]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A241",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14513,
+ },
+ [0x14514]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A242",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14514,
+ },
+ [0x14515]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A243",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14515,
+ },
+ [0x14516]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A244",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14516,
+ },
+ [0x14517]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A245",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14517,
+ },
+ [0x14518]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A246",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14518,
+ },
+ [0x14519]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A247",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14519,
+ },
+ [0x1451A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A248",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1451A,
+ },
+ [0x1451B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A249",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1451B,
+ },
+ [0x1451C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A250",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1451C,
+ },
+ [0x1451D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A251",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1451D,
+ },
+ [0x1451E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A252",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1451E,
+ },
+ [0x1451F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A253",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1451F,
+ },
+ [0x14520]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A254",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14520,
+ },
+ [0x14521]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A255",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14521,
+ },
+ [0x14522]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A256",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14522,
+ },
+ [0x14523]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A257",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14523,
+ },
+ [0x14524]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A258",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14524,
+ },
+ [0x14525]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A259",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14525,
+ },
+ [0x14526]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A260",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14526,
+ },
+ [0x14527]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A261",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14527,
+ },
+ [0x14528]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A262",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14528,
+ },
+ [0x14529]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A263",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14529,
+ },
+ [0x1452A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A264",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1452A,
+ },
+ [0x1452B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A265",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1452B,
+ },
+ [0x1452C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A266",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1452C,
+ },
+ [0x1452D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A267",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1452D,
+ },
+ [0x1452E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A267A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1452E,
+ },
+ [0x1452F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A268",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1452F,
+ },
+ [0x14530]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A269",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14530,
+ },
+ [0x14531]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A270",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14531,
+ },
+ [0x14532]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A271",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14532,
+ },
+ [0x14533]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A272",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14533,
+ },
+ [0x14534]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A273",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14534,
+ },
+ [0x14535]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A274",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14535,
+ },
+ [0x14536]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A275",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14536,
+ },
+ [0x14537]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A276",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14537,
+ },
+ [0x14538]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A277",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14538,
+ },
+ [0x14539]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A278",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14539,
+ },
+ [0x1453A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A279",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1453A,
+ },
+ [0x1453B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A280",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1453B,
+ },
+ [0x1453C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A281",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1453C,
+ },
+ [0x1453D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A282",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1453D,
+ },
+ [0x1453E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A283",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1453E,
+ },
+ [0x1453F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A284",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1453F,
+ },
+ [0x14540]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A285",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14540,
+ },
+ [0x14541]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A286",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14541,
+ },
+ [0x14542]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A287",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14542,
+ },
+ [0x14543]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A288",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14543,
+ },
+ [0x14544]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A289",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14544,
+ },
+ [0x14545]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A289A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14545,
+ },
+ [0x14546]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A290",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14546,
+ },
+ [0x14547]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A291",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14547,
+ },
+ [0x14548]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A292",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14548,
+ },
+ [0x14549]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A293",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14549,
+ },
+ [0x1454A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A294",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1454A,
+ },
+ [0x1454B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A294A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1454B,
+ },
+ [0x1454C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A295",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1454C,
+ },
+ [0x1454D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A296",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1454D,
+ },
+ [0x1454E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A297",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1454E,
+ },
+ [0x1454F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A298",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1454F,
+ },
+ [0x14550]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A299",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14550,
+ },
+ [0x14551]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A299A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14551,
+ },
+ [0x14552]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A300",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14552,
+ },
+ [0x14553]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A301",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14553,
+ },
+ [0x14554]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A302",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14554,
+ },
+ [0x14555]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A303",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14555,
+ },
+ [0x14556]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A304",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14556,
+ },
+ [0x14557]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A305",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14557,
+ },
+ [0x14558]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A306",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14558,
+ },
+ [0x14559]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A307",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14559,
+ },
+ [0x1455A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A308",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1455A,
+ },
+ [0x1455B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A309",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1455B,
+ },
+ [0x1455C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A309A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1455C,
+ },
+ [0x1455D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A310",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1455D,
+ },
+ [0x1455E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A311",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1455E,
+ },
+ [0x1455F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A312",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1455F,
+ },
+ [0x14560]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A313",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14560,
+ },
+ [0x14561]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A314",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14561,
+ },
+ [0x14562]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A315",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14562,
+ },
+ [0x14563]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A316",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14563,
+ },
+ [0x14564]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A317",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14564,
+ },
+ [0x14565]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A318",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14565,
+ },
+ [0x14566]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A319",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14566,
+ },
+ [0x14567]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A320",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14567,
+ },
+ [0x14568]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A321",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14568,
+ },
+ [0x14569]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A322",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14569,
+ },
+ [0x1456A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A323",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1456A,
+ },
+ [0x1456B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A324",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1456B,
+ },
+ [0x1456C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A325",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1456C,
+ },
+ [0x1456D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A326",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1456D,
+ },
+ [0x1456E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A327",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1456E,
+ },
+ [0x1456F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A328",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1456F,
+ },
+ [0x14570]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A329",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14570,
+ },
+ [0x14571]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A329A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14571,
+ },
+ [0x14572]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A330",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14572,
+ },
+ [0x14573]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A331",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14573,
+ },
+ [0x14574]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A332A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14574,
+ },
+ [0x14575]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A332B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14575,
+ },
+ [0x14576]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A332C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14576,
+ },
+ [0x14577]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A333",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14577,
+ },
+ [0x14578]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A334",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14578,
+ },
+ [0x14579]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A335",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14579,
+ },
+ [0x1457A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A336",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1457A,
+ },
+ [0x1457B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A336A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1457B,
+ },
+ [0x1457C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A336B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1457C,
+ },
+ [0x1457D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A336C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1457D,
+ },
+ [0x1457E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A337",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1457E,
+ },
+ [0x1457F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A338",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1457F,
+ },
+ [0x14580]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A339",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14580,
+ },
+ [0x14581]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A340",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14581,
+ },
+ [0x14582]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A341",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14582,
+ },
+ [0x14583]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A342",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14583,
+ },
+ [0x14584]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A343",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14584,
+ },
+ [0x14585]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A344",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14585,
+ },
+ [0x14586]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A345",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14586,
+ },
+ [0x14587]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A346",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14587,
+ },
+ [0x14588]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A347",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14588,
+ },
+ [0x14589]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A348",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14589,
+ },
+ [0x1458A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A349",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1458A,
+ },
+ [0x1458B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A350",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1458B,
+ },
+ [0x1458C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A351",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1458C,
+ },
+ [0x1458D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A352",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1458D,
+ },
+ [0x1458E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A353",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1458E,
+ },
+ [0x1458F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A354",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1458F,
+ },
+ [0x14590]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A355",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14590,
+ },
+ [0x14591]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A356",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14591,
+ },
+ [0x14592]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A357",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14592,
+ },
+ [0x14593]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A358",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14593,
+ },
+ [0x14594]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A359",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14594,
+ },
+ [0x14595]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A359A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14595,
+ },
+ [0x14596]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A360",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14596,
+ },
+ [0x14597]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A361",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14597,
+ },
+ [0x14598]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A362",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14598,
+ },
+ [0x14599]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A363",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14599,
+ },
+ [0x1459A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A364",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1459A,
+ },
+ [0x1459B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A364A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1459B,
+ },
+ [0x1459C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A365",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1459C,
+ },
+ [0x1459D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A366",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1459D,
+ },
+ [0x1459E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A367",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1459E,
+ },
+ [0x1459F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A368",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1459F,
+ },
+ [0x145A0]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A368A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145A0,
+ },
+ [0x145A1]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A369",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145A1,
+ },
+ [0x145A2]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A370",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145A2,
+ },
+ [0x145A3]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A371",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145A3,
+ },
+ [0x145A4]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A371A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145A4,
+ },
+ [0x145A5]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A372",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145A5,
+ },
+ [0x145A6]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A373",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145A6,
+ },
+ [0x145A7]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A374",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145A7,
+ },
+ [0x145A8]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A375",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145A8,
+ },
+ [0x145A9]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A376",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145A9,
+ },
+ [0x145AA]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A377",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145AA,
+ },
+ [0x145AB]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A378",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145AB,
+ },
+ [0x145AC]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A379",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145AC,
+ },
+ [0x145AD]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A380",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145AD,
+ },
+ [0x145AE]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A381",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145AE,
+ },
+ [0x145AF]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A381A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145AF,
+ },
+ [0x145B0]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A382",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145B0,
+ },
+ [0x145B1]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A383 RA OR RI",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145B1,
+ },
+ [0x145B2]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A383A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145B2,
+ },
+ [0x145B3]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A384",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145B3,
+ },
+ [0x145B4]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A385",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145B4,
+ },
+ [0x145B5]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A386",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145B5,
+ },
+ [0x145B6]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A386A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145B6,
+ },
+ [0x145B7]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A387",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145B7,
+ },
+ [0x145B8]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A388",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145B8,
+ },
+ [0x145B9]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A389",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145B9,
+ },
+ [0x145BA]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A390",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145BA,
+ },
+ [0x145BB]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A391",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145BB,
+ },
+ [0x145BC]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A392",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145BC,
+ },
+ [0x145BD]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A393 EIGHT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145BD,
+ },
+ [0x145BE]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A394",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145BE,
+ },
+ [0x145BF]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A395",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145BF,
+ },
+ [0x145C0]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A396",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145C0,
+ },
+ [0x145C1]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A397",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145C1,
+ },
+ [0x145C2]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A398",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145C2,
+ },
+ [0x145C3]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A399",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145C3,
+ },
+ [0x145C4]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A400",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145C4,
+ },
+ [0x145C5]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A401",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145C5,
+ },
+ [0x145C6]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A402",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145C6,
+ },
+ [0x145C7]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A403",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145C7,
+ },
+ [0x145C8]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A404",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145C8,
+ },
+ [0x145C9]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A405",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145C9,
+ },
+ [0x145CA]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A406",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145CA,
+ },
+ [0x145CB]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A407",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145CB,
+ },
+ [0x145CC]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A408",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145CC,
+ },
+ [0x145CD]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A409",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145CD,
+ },
+ [0x145CE]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A410 BEGIN LOGOGRAM MARK",
+ direction="l",
+ linebreak="op",
+ unicodeslot=0x145CE,
+ },
+ [0x145CF]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A410A END LOGOGRAM MARK",
+ direction="l",
+ linebreak="cl",
+ unicodeslot=0x145CF,
+ },
+ [0x145D0]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A411",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145D0,
+ },
+ [0x145D1]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A412",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145D1,
+ },
+ [0x145D2]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A413",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145D2,
+ },
+ [0x145D3]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A414",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145D3,
+ },
+ [0x145D4]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A415",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145D4,
+ },
+ [0x145D5]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A416",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145D5,
+ },
+ [0x145D6]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A417",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145D6,
+ },
+ [0x145D7]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A418",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145D7,
+ },
+ [0x145D8]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A419",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145D8,
+ },
+ [0x145D9]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A420",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145D9,
+ },
+ [0x145DA]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A421",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145DA,
+ },
+ [0x145DB]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A422",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145DB,
+ },
+ [0x145DC]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A423",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145DC,
+ },
+ [0x145DD]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A424",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145DD,
+ },
+ [0x145DE]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A425",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145DE,
+ },
+ [0x145DF]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A426",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145DF,
+ },
+ [0x145E0]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A427",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145E0,
+ },
+ [0x145E1]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A428",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145E1,
+ },
+ [0x145E2]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A429",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145E2,
+ },
+ [0x145E3]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A430",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145E3,
+ },
+ [0x145E4]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A431",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145E4,
+ },
+ [0x145E5]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A432",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145E5,
+ },
+ [0x145E6]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A433",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145E6,
+ },
+ [0x145E7]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A434",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145E7,
+ },
+ [0x145E8]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A435",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145E8,
+ },
+ [0x145E9]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A436",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145E9,
+ },
+ [0x145EA]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A437",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145EA,
+ },
+ [0x145EB]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A438",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145EB,
+ },
+ [0x145EC]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A439",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145EC,
+ },
+ [0x145ED]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A440",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145ED,
+ },
+ [0x145EE]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A441",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145EE,
+ },
+ [0x145EF]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A442",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145EF,
+ },
+ [0x145F0]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A443",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145F0,
+ },
+ [0x145F1]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A444",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145F1,
+ },
+ [0x145F2]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A445",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145F2,
+ },
+ [0x145F3]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A446",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145F3,
+ },
+ [0x145F4]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A447",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145F4,
+ },
+ [0x145F5]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A448",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145F5,
+ },
+ [0x145F6]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A449",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145F6,
+ },
+ [0x145F7]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A450",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145F7,
+ },
+ [0x145F8]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A450A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145F8,
+ },
+ [0x145F9]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A451",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145F9,
+ },
+ [0x145FA]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A452",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145FA,
+ },
+ [0x145FB]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A453",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145FB,
+ },
+ [0x145FC]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A454",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145FC,
+ },
+ [0x145FD]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A455",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145FD,
+ },
+ [0x145FE]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A456",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145FE,
+ },
+ [0x145FF]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A457",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x145FF,
+ },
+ [0x14600]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A457A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14600,
+ },
+ [0x14601]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A458",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14601,
+ },
+ [0x14602]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A459",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14602,
+ },
+ [0x14603]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A460",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14603,
+ },
+ [0x14604]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A461",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14604,
+ },
+ [0x14605]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A462",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14605,
+ },
+ [0x14606]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A463",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14606,
+ },
+ [0x14607]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A464",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14607,
+ },
+ [0x14608]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A465",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14608,
+ },
+ [0x14609]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A466",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14609,
+ },
+ [0x1460A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A467",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1460A,
+ },
+ [0x1460B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A468",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1460B,
+ },
+ [0x1460C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A469",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1460C,
+ },
+ [0x1460D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A470",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1460D,
+ },
+ [0x1460E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A471",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1460E,
+ },
+ [0x1460F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A472",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1460F,
+ },
+ [0x14610]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A473",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14610,
+ },
+ [0x14611]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A474",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14611,
+ },
+ [0x14612]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A475",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14612,
+ },
+ [0x14613]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A476",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14613,
+ },
+ [0x14614]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A477",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14614,
+ },
+ [0x14615]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A478",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14615,
+ },
+ [0x14616]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A479",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14616,
+ },
+ [0x14617]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A480",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14617,
+ },
+ [0x14618]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A481",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14618,
+ },
+ [0x14619]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A482",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14619,
+ },
+ [0x1461A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A483",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1461A,
+ },
+ [0x1461B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A484",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1461B,
+ },
+ [0x1461C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A485",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1461C,
+ },
+ [0x1461D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A486",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1461D,
+ },
+ [0x1461E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A487",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1461E,
+ },
+ [0x1461F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A488",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1461F,
+ },
+ [0x14620]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A489",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14620,
+ },
+ [0x14621]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A490",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14621,
+ },
+ [0x14622]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A491",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14622,
+ },
+ [0x14623]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A492",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14623,
+ },
+ [0x14624]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A493",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14624,
+ },
+ [0x14625]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A494",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14625,
+ },
+ [0x14626]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A495",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14626,
+ },
+ [0x14627]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A496",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14627,
+ },
+ [0x14628]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A497",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14628,
+ },
+ [0x14629]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A501",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14629,
+ },
+ [0x1462A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A502",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1462A,
+ },
+ [0x1462B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A503",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1462B,
+ },
+ [0x1462C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A504",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1462C,
+ },
+ [0x1462D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A505",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1462D,
+ },
+ [0x1462E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A506",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1462E,
+ },
+ [0x1462F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A507",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1462F,
+ },
+ [0x14630]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A508",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14630,
+ },
+ [0x14631]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A509",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14631,
+ },
+ [0x14632]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A510",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14632,
+ },
+ [0x14633]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A511",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14633,
+ },
+ [0x14634]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A512",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14634,
+ },
+ [0x14635]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A513",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14635,
+ },
+ [0x14636]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A514",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14636,
+ },
+ [0x14637]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A515",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14637,
+ },
+ [0x14638]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A516",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14638,
+ },
+ [0x14639]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A517",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14639,
+ },
+ [0x1463A]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A518",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1463A,
+ },
+ [0x1463B]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A519",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1463B,
+ },
+ [0x1463C]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A520",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1463C,
+ },
+ [0x1463D]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A521",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1463D,
+ },
+ [0x1463E]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A522",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1463E,
+ },
+ [0x1463F]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A523",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1463F,
+ },
+ [0x14640]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A524",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14640,
+ },
+ [0x14641]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A525",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14641,
+ },
+ [0x14642]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A526",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14642,
+ },
+ [0x14643]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A527",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14643,
+ },
+ [0x14644]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A528",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14644,
+ },
+ [0x14645]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A529",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14645,
+ },
+ [0x14646]={
+ category="lo",
+ description="ANATOLIAN HIEROGLYPH A530",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x14646,
+ },
[0x16800]={
category="lo",
description="BAMUM LETTER PHASE-A NGKUE MFON",
@@ -182498,6 +190942,83 @@ characters.data={
linebreak="al",
unicodeslot=0x1D1DD,
},
+ [0x1D1DE]={
+ category="so",
+ description="MUSICAL SYMBOL KIEVAN C CLEF",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D1DE,
+ },
+ [0x1D1DF]={
+ category="so",
+ description="MUSICAL SYMBOL KIEVAN END OF PIECE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D1DF,
+ },
+ [0x1D1E0]={
+ category="so",
+ description="MUSICAL SYMBOL KIEVAN FINAL NOTE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D1E0,
+ },
+ [0x1D1E1]={
+ category="so",
+ description="MUSICAL SYMBOL KIEVAN RECITATIVE MARK",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D1E1,
+ },
+ [0x1D1E2]={
+ category="so",
+ description="MUSICAL SYMBOL KIEVAN WHOLE NOTE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D1E2,
+ },
+ [0x1D1E3]={
+ category="so",
+ description="MUSICAL SYMBOL KIEVAN HALF NOTE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D1E3,
+ },
+ [0x1D1E4]={
+ category="so",
+ description="MUSICAL SYMBOL KIEVAN QUARTER NOTE STEM DOWN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D1E4,
+ },
+ [0x1D1E5]={
+ category="so",
+ description="MUSICAL SYMBOL KIEVAN QUARTER NOTE STEM UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D1E5,
+ },
+ [0x1D1E6]={
+ category="so",
+ description="MUSICAL SYMBOL KIEVAN EIGHTH NOTE STEM DOWN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D1E6,
+ },
+ [0x1D1E7]={
+ category="so",
+ description="MUSICAL SYMBOL KIEVAN EIGHTH NOTE STEM UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D1E7,
+ },
+ [0x1D1E8]={
+ category="so",
+ description="MUSICAL SYMBOL KIEVAN FLAT SIGN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D1E8,
+ },
[0x1D200]={
category="so",
description="GREEK VOCAL NOTATION SYMBOL-0x0001",
@@ -192434,6 +200955,4710 @@ characters.data={
specials={ "font", 0x39 },
unicodeslot=0x1D7FF,
},
+ [0x1D800]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D800,
+ },
+ [0x1D801]={
+ category="so",
+ description="SIGNWRITING HAND-CIRCLE INDEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D801,
+ },
+ [0x1D802]={
+ category="so",
+ description="SIGNWRITING HAND-CUP INDEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D802,
+ },
+ [0x1D803]={
+ category="so",
+ description="SIGNWRITING HAND-OVAL INDEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D803,
+ },
+ [0x1D804]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE INDEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D804,
+ },
+ [0x1D805]={
+ category="so",
+ description="SIGNWRITING HAND-ANGLE INDEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D805,
+ },
+ [0x1D806]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D806,
+ },
+ [0x1D807]={
+ category="so",
+ description="SIGNWRITING HAND-CIRCLE INDEX BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D807,
+ },
+ [0x1D808]={
+ category="so",
+ description="SIGNWRITING HAND-FIST THUMB UNDER INDEX BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D808,
+ },
+ [0x1D809]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX RAISED KNUCKLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D809,
+ },
+ [0x1D80A]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX CUPPED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D80A,
+ },
+ [0x1D80B]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX HINGED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D80B,
+ },
+ [0x1D80C]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX HINGED LOW",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D80C,
+ },
+ [0x1D80D]={
+ category="so",
+ description="SIGNWRITING HAND-CIRCLE INDEX HINGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D80D,
+ },
+ [0x1D80E]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D80E,
+ },
+ [0x1D80F]={
+ category="so",
+ description="SIGNWRITING HAND-CIRCLE INDEX MIDDLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D80F,
+ },
+ [0x1D810]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D810,
+ },
+ [0x1D811]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE RAISED KNUCKLES",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D811,
+ },
+ [0x1D812]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE HINGED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D812,
+ },
+ [0x1D813]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX UP MIDDLE HINGED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D813,
+ },
+ [0x1D814]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX HINGED MIDDLE UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D814,
+ },
+ [0x1D815]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D815,
+ },
+ [0x1D816]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED INDEX BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D816,
+ },
+ [0x1D817]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED MIDDLE BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D817,
+ },
+ [0x1D818]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED CUPPED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D818,
+ },
+ [0x1D819]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED HINGED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D819,
+ },
+ [0x1D81A]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE CROSSED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D81A,
+ },
+ [0x1D81B]={
+ category="so",
+ description="SIGNWRITING HAND-CIRCLE INDEX MIDDLE CROSSED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D81B,
+ },
+ [0x1D81C]={
+ category="so",
+ description="SIGNWRITING HAND-FIST MIDDLE BENT OVER INDEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D81C,
+ },
+ [0x1D81D]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX BENT OVER MIDDLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D81D,
+ },
+ [0x1D81E]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D81E,
+ },
+ [0x1D81F]={
+ category="so",
+ description="SIGNWRITING HAND-CIRCLE INDEX MIDDLE THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D81F,
+ },
+ [0x1D820]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE STRAIGHT THUMB BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D820,
+ },
+ [0x1D821]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE BENT THUMB STRAIGHT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D821,
+ },
+ [0x1D822]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE THUMB BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D822,
+ },
+ [0x1D823]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE HINGED SPREAD THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D823,
+ },
+ [0x1D824]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX UP MIDDLE HINGED THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D824,
+ },
+ [0x1D825]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX UP MIDDLE HINGED THUMB CONJOINED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D825,
+ },
+ [0x1D826]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX HINGED MIDDLE UP THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D826,
+ },
+ [0x1D827]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE UP SPREAD THUMB FORWARD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D827,
+ },
+ [0x1D828]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE THUMB CUPPED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D828,
+ },
+ [0x1D829]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE THUMB CIRCLED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D829,
+ },
+ [0x1D82A]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE THUMB HOOKED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D82A,
+ },
+ [0x1D82B]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE THUMB HINGED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D82B,
+ },
+ [0x1D82C]={
+ category="so",
+ description="SIGNWRITING HAND-FIST THUMB BETWEEN INDEX MIDDLE STRAIGHT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D82C,
+ },
+ [0x1D82D]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D82D,
+ },
+ [0x1D82E]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED THUMB SIDE CONJOINED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D82E,
+ },
+ [0x1D82F]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED THUMB SIDE BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D82F,
+ },
+ [0x1D830]={
+ category="so",
+ description="SIGNWRITING HAND-FIST MIDDLE THUMB HOOKED INDEX UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D830,
+ },
+ [0x1D831]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB HOOKED MIDDLE UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D831,
+ },
+ [0x1D832]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED HINGED THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D832,
+ },
+ [0x1D833]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE CROSSED THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D833,
+ },
+ [0x1D834]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED THUMB FORWARD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D834,
+ },
+ [0x1D835]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED CUPPED THUMB FORWARD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D835,
+ },
+ [0x1D836]={
+ category="so",
+ description="SIGNWRITING HAND-FIST MIDDLE THUMB CUPPED INDEX UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D836,
+ },
+ [0x1D837]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB CUPPED MIDDLE UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D837,
+ },
+ [0x1D838]={
+ category="so",
+ description="SIGNWRITING HAND-FIST MIDDLE THUMB CIRCLED INDEX UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D838,
+ },
+ [0x1D839]={
+ category="so",
+ description="SIGNWRITING HAND-FIST MIDDLE THUMB CIRCLED INDEX HINGED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D839,
+ },
+ [0x1D83A]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB ANGLED OUT MIDDLE UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D83A,
+ },
+ [0x1D83B]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB ANGLED IN MIDDLE UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D83B,
+ },
+ [0x1D83C]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB CIRCLED MIDDLE UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D83C,
+ },
+ [0x1D83D]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE THUMB CONJOINED HINGED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D83D,
+ },
+ [0x1D83E]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE THUMB ANGLED OUT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D83E,
+ },
+ [0x1D83F]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE THUMB ANGLED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D83F,
+ },
+ [0x1D840]={
+ category="so",
+ description="SIGNWRITING HAND-FIST MIDDLE THUMB ANGLED OUT INDEX UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D840,
+ },
+ [0x1D841]={
+ category="so",
+ description="SIGNWRITING HAND-FIST MIDDLE THUMB ANGLED OUT INDEX CROSSED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D841,
+ },
+ [0x1D842]={
+ category="so",
+ description="SIGNWRITING HAND-FIST MIDDLE THUMB ANGLED INDEX UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D842,
+ },
+ [0x1D843]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB HOOKED MIDDLE HINGED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D843,
+ },
+ [0x1D844]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT FOUR FINGERS",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D844,
+ },
+ [0x1D845]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT FOUR FINGERS BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D845,
+ },
+ [0x1D846]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT FOUR FINGERS HINGED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D846,
+ },
+ [0x1D847]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT FOUR FINGERS CONJOINED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D847,
+ },
+ [0x1D848]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT FOUR FINGERS CONJOINED SPLIT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D848,
+ },
+ [0x1D849]={
+ category="so",
+ description="SIGNWRITING HAND-CLAW FOUR FINGERS CONJOINED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D849,
+ },
+ [0x1D84A]={
+ category="so",
+ description="SIGNWRITING HAND-FIST FOUR FINGERS CONJOINED BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D84A,
+ },
+ [0x1D84B]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE FOUR FINGERS CONJOINED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D84B,
+ },
+ [0x1D84C]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D84C,
+ },
+ [0x1D84D]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT HEEL FIVE FINGERS SPREAD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D84D,
+ },
+ [0x1D84E]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD FOUR BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D84E,
+ },
+ [0x1D84F]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT HEEL FIVE FINGERS SPREAD FOUR BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D84F,
+ },
+ [0x1D850]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D850,
+ },
+ [0x1D851]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT HEEL FIVE FINGERS SPREAD BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D851,
+ },
+ [0x1D852]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD THUMB FORWARD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D852,
+ },
+ [0x1D853]={
+ category="so",
+ description="SIGNWRITING HAND-CUP FIVE FINGERS SPREAD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D853,
+ },
+ [0x1D854]={
+ category="so",
+ description="SIGNWRITING HAND-CUP FIVE FINGERS SPREAD OPEN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D854,
+ },
+ [0x1D855]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE FIVE FINGERS SPREAD OPEN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D855,
+ },
+ [0x1D856]={
+ category="so",
+ description="SIGNWRITING HAND-OVAL FIVE FINGERS SPREAD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D856,
+ },
+ [0x1D857]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD HINGED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D857,
+ },
+ [0x1D858]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD HINGED THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D858,
+ },
+ [0x1D859]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD HINGED NO THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D859,
+ },
+ [0x1D85A]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D85A,
+ },
+ [0x1D85B]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT BETWEEN PALM FACINGS",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D85B,
+ },
+ [0x1D85C]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT HEEL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D85C,
+ },
+ [0x1D85D]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D85D,
+ },
+ [0x1D85E]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT HEEL THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D85E,
+ },
+ [0x1D85F]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT THUMB BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D85F,
+ },
+ [0x1D860]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT THUMB FORWARD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D860,
+ },
+ [0x1D861]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT SPLIT INDEX THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D861,
+ },
+ [0x1D862]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT SPLIT CENTRE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D862,
+ },
+ [0x1D863]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT SPLIT CENTRE THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D863,
+ },
+ [0x1D864]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT SPLIT CENTRE THUMB SIDE BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D864,
+ },
+ [0x1D865]={
+ category="so",
+ description="SIGNWRITING HAND-FLAT SPLIT LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D865,
+ },
+ [0x1D866]={
+ category="so",
+ description="SIGNWRITING HAND-CLAW",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D866,
+ },
+ [0x1D867]={
+ category="so",
+ description="SIGNWRITING HAND-CLAW THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D867,
+ },
+ [0x1D868]={
+ category="so",
+ description="SIGNWRITING HAND-CLAW NO THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D868,
+ },
+ [0x1D869]={
+ category="so",
+ description="SIGNWRITING HAND-CLAW THUMB FORWARD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D869,
+ },
+ [0x1D86A]={
+ category="so",
+ description="SIGNWRITING HAND-HOOK CURLICUE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D86A,
+ },
+ [0x1D86B]={
+ category="so",
+ description="SIGNWRITING HAND-HOOK",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D86B,
+ },
+ [0x1D86C]={
+ category="so",
+ description="SIGNWRITING HAND-CUP OPEN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D86C,
+ },
+ [0x1D86D]={
+ category="so",
+ description="SIGNWRITING HAND-CUP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D86D,
+ },
+ [0x1D86E]={
+ category="so",
+ description="SIGNWRITING HAND-CUP OPEN THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D86E,
+ },
+ [0x1D86F]={
+ category="so",
+ description="SIGNWRITING HAND-CUP THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D86F,
+ },
+ [0x1D870]={
+ category="so",
+ description="SIGNWRITING HAND-CUP OPEN NO THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D870,
+ },
+ [0x1D871]={
+ category="so",
+ description="SIGNWRITING HAND-CUP NO THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D871,
+ },
+ [0x1D872]={
+ category="so",
+ description="SIGNWRITING HAND-CUP OPEN THUMB FORWARD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D872,
+ },
+ [0x1D873]={
+ category="so",
+ description="SIGNWRITING HAND-CUP THUMB FORWARD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D873,
+ },
+ [0x1D874]={
+ category="so",
+ description="SIGNWRITING HAND-CURLICUE OPEN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D874,
+ },
+ [0x1D875]={
+ category="so",
+ description="SIGNWRITING HAND-CURLICUE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D875,
+ },
+ [0x1D876]={
+ category="so",
+ description="SIGNWRITING HAND-CIRCLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D876,
+ },
+ [0x1D877]={
+ category="so",
+ description="SIGNWRITING HAND-OVAL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D877,
+ },
+ [0x1D878]={
+ category="so",
+ description="SIGNWRITING HAND-OVAL THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D878,
+ },
+ [0x1D879]={
+ category="so",
+ description="SIGNWRITING HAND-OVAL NO THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D879,
+ },
+ [0x1D87A]={
+ category="so",
+ description="SIGNWRITING HAND-OVAL THUMB FORWARD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D87A,
+ },
+ [0x1D87B]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE OPEN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D87B,
+ },
+ [0x1D87C]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE OPEN THUMB FORWARD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D87C,
+ },
+ [0x1D87D]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D87D,
+ },
+ [0x1D87E]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D87E,
+ },
+ [0x1D87F]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE OPEN THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D87F,
+ },
+ [0x1D880]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D880,
+ },
+ [0x1D881]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE OPEN NO THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D881,
+ },
+ [0x1D882]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE NO THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D882,
+ },
+ [0x1D883]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE THUMB SIDE TOUCHING INDEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D883,
+ },
+ [0x1D884]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE THUMB BETWEEN MIDDLE RING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D884,
+ },
+ [0x1D885]={
+ category="so",
+ description="SIGNWRITING HAND-ANGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D885,
+ },
+ [0x1D886]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE RING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D886,
+ },
+ [0x1D887]={
+ category="so",
+ description="SIGNWRITING HAND-CIRCLE INDEX MIDDLE RING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D887,
+ },
+ [0x1D888]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE INDEX MIDDLE RING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D888,
+ },
+ [0x1D889]={
+ category="so",
+ description="SIGNWRITING HAND-ANGLE INDEX MIDDLE RING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D889,
+ },
+ [0x1D88A]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D88A,
+ },
+ [0x1D88B]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE RING BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D88B,
+ },
+ [0x1D88C]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE RING CONJOINED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D88C,
+ },
+ [0x1D88D]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE INDEX MIDDLE RING CONJOINED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D88D,
+ },
+ [0x1D88E]={
+ category="so",
+ description="SIGNWRITING HAND-FIST LITTLE DOWN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D88E,
+ },
+ [0x1D88F]={
+ category="so",
+ description="SIGNWRITING HAND-FIST LITTLE DOWN RIPPLE STRAIGHT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D88F,
+ },
+ [0x1D890]={
+ category="so",
+ description="SIGNWRITING HAND-FIST LITTLE DOWN RIPPLE CURVED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D890,
+ },
+ [0x1D891]={
+ category="so",
+ description="SIGNWRITING HAND-FIST LITTLE DOWN OTHERS CIRCLED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D891,
+ },
+ [0x1D892]={
+ category="so",
+ description="SIGNWRITING HAND-FIST LITTLE UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D892,
+ },
+ [0x1D893]={
+ category="so",
+ description="SIGNWRITING HAND-FIST THUMB UNDER LITTLE UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D893,
+ },
+ [0x1D894]={
+ category="so",
+ description="SIGNWRITING HAND-CIRCLE LITTLE UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D894,
+ },
+ [0x1D895]={
+ category="so",
+ description="SIGNWRITING HAND-OVAL LITTLE UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D895,
+ },
+ [0x1D896]={
+ category="so",
+ description="SIGNWRITING HAND-ANGLE LITTLE UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D896,
+ },
+ [0x1D897]={
+ category="so",
+ description="SIGNWRITING HAND-FIST LITTLE RAISED KNUCKLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D897,
+ },
+ [0x1D898]={
+ category="so",
+ description="SIGNWRITING HAND-FIST LITTLE BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D898,
+ },
+ [0x1D899]={
+ category="so",
+ description="SIGNWRITING HAND-FIST LITTLE TOUCHES THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D899,
+ },
+ [0x1D89A]={
+ category="so",
+ description="SIGNWRITING HAND-FIST LITTLE THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D89A,
+ },
+ [0x1D89B]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE LITTLE THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D89B,
+ },
+ [0x1D89C]={
+ category="so",
+ description="SIGNWRITING HAND-FIST LITTLE INDEX THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D89C,
+ },
+ [0x1D89D]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE LITTLE INDEX THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D89D,
+ },
+ [0x1D89E]={
+ category="so",
+ description="SIGNWRITING HAND-ANGLE LITTLE INDEX THUMB INDEX THUMB OUT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D89E,
+ },
+ [0x1D89F]={
+ category="so",
+ description="SIGNWRITING HAND-ANGLE LITTLE INDEX THUMB INDEX THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D89F,
+ },
+ [0x1D8A0]={
+ category="so",
+ description="SIGNWRITING HAND-FIST LITTLE INDEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8A0,
+ },
+ [0x1D8A1]={
+ category="so",
+ description="SIGNWRITING HAND-CIRCLE LITTLE INDEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8A1,
+ },
+ [0x1D8A2]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE LITTLE INDEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8A2,
+ },
+ [0x1D8A3]={
+ category="so",
+ description="SIGNWRITING HAND-ANGLE LITTLE INDEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8A3,
+ },
+ [0x1D8A4]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8A4,
+ },
+ [0x1D8A5]={
+ category="so",
+ description="SIGNWRITING HAND-CIRCLE INDEX MIDDLE LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8A5,
+ },
+ [0x1D8A6]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE INDEX MIDDLE LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8A6,
+ },
+ [0x1D8A7]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE RING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8A7,
+ },
+ [0x1D8A8]={
+ category="so",
+ description="SIGNWRITING HAND-ANGLE INDEX MIDDLE LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8A8,
+ },
+ [0x1D8A9]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX MIDDLE CROSS LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8A9,
+ },
+ [0x1D8AA]={
+ category="so",
+ description="SIGNWRITING HAND-CIRCLE INDEX MIDDLE CROSS LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8AA,
+ },
+ [0x1D8AB]={
+ category="so",
+ description="SIGNWRITING HAND-FIST RING DOWN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8AB,
+ },
+ [0x1D8AC]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE RING DOWN INDEX THUMB HOOK MIDDLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8AC,
+ },
+ [0x1D8AD]={
+ category="so",
+ description="SIGNWRITING HAND-ANGLE RING DOWN MIDDLE THUMB INDEX CROSS",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8AD,
+ },
+ [0x1D8AE]={
+ category="so",
+ description="SIGNWRITING HAND-FIST RING UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8AE,
+ },
+ [0x1D8AF]={
+ category="so",
+ description="SIGNWRITING HAND-FIST RING RAISED KNUCKLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8AF,
+ },
+ [0x1D8B0]={
+ category="so",
+ description="SIGNWRITING HAND-FIST RING LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8B0,
+ },
+ [0x1D8B1]={
+ category="so",
+ description="SIGNWRITING HAND-CIRCLE RING LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8B1,
+ },
+ [0x1D8B2]={
+ category="so",
+ description="SIGNWRITING HAND-OVAL RING LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8B2,
+ },
+ [0x1D8B3]={
+ category="so",
+ description="SIGNWRITING HAND-ANGLE RING LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8B3,
+ },
+ [0x1D8B4]={
+ category="so",
+ description="SIGNWRITING HAND-FIST RING MIDDLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8B4,
+ },
+ [0x1D8B5]={
+ category="so",
+ description="SIGNWRITING HAND-FIST RING MIDDLE CONJOINED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8B5,
+ },
+ [0x1D8B6]={
+ category="so",
+ description="SIGNWRITING HAND-FIST RING MIDDLE RAISED KNUCKLES",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8B6,
+ },
+ [0x1D8B7]={
+ category="so",
+ description="SIGNWRITING HAND-FIST RING INDEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8B7,
+ },
+ [0x1D8B8]={
+ category="so",
+ description="SIGNWRITING HAND-FIST RING THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8B8,
+ },
+ [0x1D8B9]={
+ category="so",
+ description="SIGNWRITING HAND-HOOK RING THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8B9,
+ },
+ [0x1D8BA]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX RING LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8BA,
+ },
+ [0x1D8BB]={
+ category="so",
+ description="SIGNWRITING HAND-CIRCLE INDEX RING LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8BB,
+ },
+ [0x1D8BC]={
+ category="so",
+ description="SIGNWRITING HAND-CURLICUE INDEX RING LITTLE ON",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8BC,
+ },
+ [0x1D8BD]={
+ category="so",
+ description="SIGNWRITING HAND-HOOK INDEX RING LITTLE OUT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8BD,
+ },
+ [0x1D8BE]={
+ category="so",
+ description="SIGNWRITING HAND-HOOK INDEX RING LITTLE IN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8BE,
+ },
+ [0x1D8BF]={
+ category="so",
+ description="SIGNWRITING HAND-HOOK INDEX RING LITTLE UNDER",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8BF,
+ },
+ [0x1D8C0]={
+ category="so",
+ description="SIGNWRITING HAND-CUP INDEX RING LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8C0,
+ },
+ [0x1D8C1]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE INDEX RING LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8C1,
+ },
+ [0x1D8C2]={
+ category="so",
+ description="SIGNWRITING HAND-ANGLE INDEX RING LITTLE OUT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8C2,
+ },
+ [0x1D8C3]={
+ category="so",
+ description="SIGNWRITING HAND-ANGLE INDEX RING LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8C3,
+ },
+ [0x1D8C4]={
+ category="so",
+ description="SIGNWRITING HAND-FIST MIDDLE DOWN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8C4,
+ },
+ [0x1D8C5]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE MIDDLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8C5,
+ },
+ [0x1D8C6]={
+ category="so",
+ description="SIGNWRITING HAND-FIST MIDDLE UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8C6,
+ },
+ [0x1D8C7]={
+ category="so",
+ description="SIGNWRITING HAND-CIRCLE MIDDLE UP",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8C7,
+ },
+ [0x1D8C8]={
+ category="so",
+ description="SIGNWRITING HAND-FIST MIDDLE RAISED KNUCKLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8C8,
+ },
+ [0x1D8C9]={
+ category="so",
+ description="SIGNWRITING HAND-FIST MIDDLE UP THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8C9,
+ },
+ [0x1D8CA]={
+ category="so",
+ description="SIGNWRITING HAND-HOOK MIDDLE THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8CA,
+ },
+ [0x1D8CB]={
+ category="so",
+ description="SIGNWRITING HAND-FIST MIDDLE THUMB LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8CB,
+ },
+ [0x1D8CC]={
+ category="so",
+ description="SIGNWRITING HAND-FIST MIDDLE LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8CC,
+ },
+ [0x1D8CD]={
+ category="so",
+ description="SIGNWRITING HAND-FIST MIDDLE RING LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8CD,
+ },
+ [0x1D8CE]={
+ category="so",
+ description="SIGNWRITING HAND-CIRCLE MIDDLE RING LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8CE,
+ },
+ [0x1D8CF]={
+ category="so",
+ description="SIGNWRITING HAND-CURLICUE MIDDLE RING LITTLE ON",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8CF,
+ },
+ [0x1D8D0]={
+ category="so",
+ description="SIGNWRITING HAND-CUP MIDDLE RING LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8D0,
+ },
+ [0x1D8D1]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE MIDDLE RING LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8D1,
+ },
+ [0x1D8D2]={
+ category="so",
+ description="SIGNWRITING HAND-ANGLE MIDDLE RING LITTLE OUT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8D2,
+ },
+ [0x1D8D3]={
+ category="so",
+ description="SIGNWRITING HAND-ANGLE MIDDLE RING LITTLE IN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8D3,
+ },
+ [0x1D8D4]={
+ category="so",
+ description="SIGNWRITING HAND-ANGLE MIDDLE RING LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8D4,
+ },
+ [0x1D8D5]={
+ category="so",
+ description="SIGNWRITING HAND-CIRCLE MIDDLE RING LITTLE BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8D5,
+ },
+ [0x1D8D6]={
+ category="so",
+ description="SIGNWRITING HAND-CLAW MIDDLE RING LITTLE CONJOINED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8D6,
+ },
+ [0x1D8D7]={
+ category="so",
+ description="SIGNWRITING HAND-CLAW MIDDLE RING LITTLE CONJOINED SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8D7,
+ },
+ [0x1D8D8]={
+ category="so",
+ description="SIGNWRITING HAND-HOOK MIDDLE RING LITTLE CONJOINED OUT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8D8,
+ },
+ [0x1D8D9]={
+ category="so",
+ description="SIGNWRITING HAND-HOOK MIDDLE RING LITTLE CONJOINED IN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8D9,
+ },
+ [0x1D8DA]={
+ category="so",
+ description="SIGNWRITING HAND-HOOK MIDDLE RING LITTLE CONJOINED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8DA,
+ },
+ [0x1D8DB]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE INDEX HINGED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8DB,
+ },
+ [0x1D8DC]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8DC,
+ },
+ [0x1D8DD]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE INDEX THUMB SIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8DD,
+ },
+ [0x1D8DE]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB SIDE THUMB DIAGONAL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8DE,
+ },
+ [0x1D8DF]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB SIDE THUMB CONJOINED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8DF,
+ },
+ [0x1D8E0]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB SIDE THUMB BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8E0,
+ },
+ [0x1D8E1]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB SIDE INDEX BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8E1,
+ },
+ [0x1D8E2]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB SIDE BOTH BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8E2,
+ },
+ [0x1D8E3]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB SIDE INDEX HINGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8E3,
+ },
+ [0x1D8E4]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB FORWARD INDEX STRAIGHT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8E4,
+ },
+ [0x1D8E5]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB FORWARD INDEX BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8E5,
+ },
+ [0x1D8E6]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB HOOK",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8E6,
+ },
+ [0x1D8E7]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB CURLICUE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8E7,
+ },
+ [0x1D8E8]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB CURVE THUMB INSIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8E8,
+ },
+ [0x1D8E9]={
+ category="so",
+ description="SIGNWRITING HAND-CLAW INDEX THUMB CURVE THUMB INSIDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8E9,
+ },
+ [0x1D8EA]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB CURVE THUMB UNDER",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8EA,
+ },
+ [0x1D8EB]={
+ category="so",
+ description="SIGNWRITING HAND-FIST INDEX THUMB CIRCLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8EB,
+ },
+ [0x1D8EC]={
+ category="so",
+ description="SIGNWRITING HAND-CUP INDEX THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8EC,
+ },
+ [0x1D8ED]={
+ category="so",
+ description="SIGNWRITING HAND-CUP INDEX THUMB OPEN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8ED,
+ },
+ [0x1D8EE]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE INDEX THUMB OPEN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8EE,
+ },
+ [0x1D8EF]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE INDEX THUMB LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8EF,
+ },
+ [0x1D8F0]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE INDEX THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8F0,
+ },
+ [0x1D8F1]={
+ category="so",
+ description="SIGNWRITING HAND-HINGE INDEX THUMB SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8F1,
+ },
+ [0x1D8F2]={
+ category="so",
+ description="SIGNWRITING HAND-ANGLE INDEX THUMB OUT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8F2,
+ },
+ [0x1D8F3]={
+ category="so",
+ description="SIGNWRITING HAND-ANGLE INDEX THUMB IN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8F3,
+ },
+ [0x1D8F4]={
+ category="so",
+ description="SIGNWRITING HAND-ANGLE INDEX THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8F4,
+ },
+ [0x1D8F5]={
+ category="so",
+ description="SIGNWRITING HAND-FIST THUMB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8F5,
+ },
+ [0x1D8F6]={
+ category="so",
+ description="SIGNWRITING HAND-FIST THUMB HEEL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8F6,
+ },
+ [0x1D8F7]={
+ category="so",
+ description="SIGNWRITING HAND-FIST THUMB SIDE DIAGONAL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8F7,
+ },
+ [0x1D8F8]={
+ category="so",
+ description="SIGNWRITING HAND-FIST THUMB SIDE CONJOINED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8F8,
+ },
+ [0x1D8F9]={
+ category="so",
+ description="SIGNWRITING HAND-FIST THUMB SIDE BENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8F9,
+ },
+ [0x1D8FA]={
+ category="so",
+ description="SIGNWRITING HAND-FIST THUMB FORWARD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8FA,
+ },
+ [0x1D8FB]={
+ category="so",
+ description="SIGNWRITING HAND-FIST THUMB BETWEEN INDEX MIDDLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8FB,
+ },
+ [0x1D8FC]={
+ category="so",
+ description="SIGNWRITING HAND-FIST THUMB BETWEEN MIDDLE RING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8FC,
+ },
+ [0x1D8FD]={
+ category="so",
+ description="SIGNWRITING HAND-FIST THUMB BETWEEN RING LITTLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8FD,
+ },
+ [0x1D8FE]={
+ category="so",
+ description="SIGNWRITING HAND-FIST THUMB UNDER TWO FINGERS",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8FE,
+ },
+ [0x1D8FF]={
+ category="so",
+ description="SIGNWRITING HAND-FIST THUMB OVER TWO FINGERS",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D8FF,
+ },
+ [0x1D900]={
+ category="so",
+ description="SIGNWRITING HAND-FIST THUMB UNDER THREE FINGERS",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D900,
+ },
+ [0x1D901]={
+ category="so",
+ description="SIGNWRITING HAND-FIST THUMB UNDER FOUR FINGERS",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D901,
+ },
+ [0x1D902]={
+ category="so",
+ description="SIGNWRITING HAND-FIST THUMB OVER FOUR RAISED KNUCKLES",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D902,
+ },
+ [0x1D903]={
+ category="so",
+ description="SIGNWRITING HAND-FIST",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D903,
+ },
+ [0x1D904]={
+ category="so",
+ description="SIGNWRITING HAND-FIST HEEL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D904,
+ },
+ [0x1D905]={
+ category="so",
+ description="SIGNWRITING TOUCH SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D905,
+ },
+ [0x1D906]={
+ category="so",
+ description="SIGNWRITING TOUCH MULTIPLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D906,
+ },
+ [0x1D907]={
+ category="so",
+ description="SIGNWRITING TOUCH BETWEEN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D907,
+ },
+ [0x1D908]={
+ category="so",
+ description="SIGNWRITING GRASP SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D908,
+ },
+ [0x1D909]={
+ category="so",
+ description="SIGNWRITING GRASP MULTIPLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D909,
+ },
+ [0x1D90A]={
+ category="so",
+ description="SIGNWRITING GRASP BETWEEN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D90A,
+ },
+ [0x1D90B]={
+ category="so",
+ description="SIGNWRITING STRIKE SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D90B,
+ },
+ [0x1D90C]={
+ category="so",
+ description="SIGNWRITING STRIKE MULTIPLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D90C,
+ },
+ [0x1D90D]={
+ category="so",
+ description="SIGNWRITING STRIKE BETWEEN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D90D,
+ },
+ [0x1D90E]={
+ category="so",
+ description="SIGNWRITING BRUSH SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D90E,
+ },
+ [0x1D90F]={
+ category="so",
+ description="SIGNWRITING BRUSH MULTIPLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D90F,
+ },
+ [0x1D910]={
+ category="so",
+ description="SIGNWRITING BRUSH BETWEEN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D910,
+ },
+ [0x1D911]={
+ category="so",
+ description="SIGNWRITING RUB SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D911,
+ },
+ [0x1D912]={
+ category="so",
+ description="SIGNWRITING RUB MULTIPLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D912,
+ },
+ [0x1D913]={
+ category="so",
+ description="SIGNWRITING RUB BETWEEN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D913,
+ },
+ [0x1D914]={
+ category="so",
+ description="SIGNWRITING SURFACE SYMBOLS",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D914,
+ },
+ [0x1D915]={
+ category="so",
+ description="SIGNWRITING SURFACE BETWEEN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D915,
+ },
+ [0x1D916]={
+ category="so",
+ description="SIGNWRITING SQUEEZE LARGE SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D916,
+ },
+ [0x1D917]={
+ category="so",
+ description="SIGNWRITING SQUEEZE SMALL SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D917,
+ },
+ [0x1D918]={
+ category="so",
+ description="SIGNWRITING SQUEEZE LARGE MULTIPLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D918,
+ },
+ [0x1D919]={
+ category="so",
+ description="SIGNWRITING SQUEEZE SMALL MULTIPLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D919,
+ },
+ [0x1D91A]={
+ category="so",
+ description="SIGNWRITING SQUEEZE SEQUENTIAL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D91A,
+ },
+ [0x1D91B]={
+ category="so",
+ description="SIGNWRITING FLICK LARGE SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D91B,
+ },
+ [0x1D91C]={
+ category="so",
+ description="SIGNWRITING FLICK SMALL SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D91C,
+ },
+ [0x1D91D]={
+ category="so",
+ description="SIGNWRITING FLICK LARGE MULTIPLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D91D,
+ },
+ [0x1D91E]={
+ category="so",
+ description="SIGNWRITING FLICK SMALL MULTIPLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D91E,
+ },
+ [0x1D91F]={
+ category="so",
+ description="SIGNWRITING FLICK SEQUENTIAL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D91F,
+ },
+ [0x1D920]={
+ category="so",
+ description="SIGNWRITING SQUEEZE FLICK ALTERNATING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D920,
+ },
+ [0x1D921]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-HINGE UP DOWN LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D921,
+ },
+ [0x1D922]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-HINGE UP DOWN SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D922,
+ },
+ [0x1D923]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-HINGE UP SEQUENTIAL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D923,
+ },
+ [0x1D924]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-HINGE DOWN SEQUENTIAL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D924,
+ },
+ [0x1D925]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-HINGE UP DOWN ALTERNATING LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D925,
+ },
+ [0x1D926]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-HINGE UP DOWN ALTERNATING SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D926,
+ },
+ [0x1D927]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-HINGE SIDE TO SIDE SCISSORS",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D927,
+ },
+ [0x1D928]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE FINGER CONTACT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D928,
+ },
+ [0x1D929]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE FINGER CONTACT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D929,
+ },
+ [0x1D92A]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE SINGLE STRAIGHT SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D92A,
+ },
+ [0x1D92B]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE SINGLE STRAIGHT MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D92B,
+ },
+ [0x1D92C]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE SINGLE STRAIGHT LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D92C,
+ },
+ [0x1D92D]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE SINGLE STRAIGHT LARGEST",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D92D,
+ },
+ [0x1D92E]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE SINGLE WRIST FLEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D92E,
+ },
+ [0x1D92F]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE DOUBLE STRAIGHT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D92F,
+ },
+ [0x1D930]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE DOUBLE WRIST FLEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D930,
+ },
+ [0x1D931]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE DOUBLE ALTERNATING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D931,
+ },
+ [0x1D932]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE DOUBLE ALTERNATING WRIST FLEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D932,
+ },
+ [0x1D933]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CROSS",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D933,
+ },
+ [0x1D934]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE TRIPLE STRAIGHT MOVEMENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D934,
+ },
+ [0x1D935]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE TRIPLE WRIST FLEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D935,
+ },
+ [0x1D936]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE TRIPLE ALTERNATING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D936,
+ },
+ [0x1D937]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE TRIPLE ALTERNATING WRIST FLEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D937,
+ },
+ [0x1D938]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE BEND SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D938,
+ },
+ [0x1D939]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE BEND MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D939,
+ },
+ [0x1D93A]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE BEND LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D93A,
+ },
+ [0x1D93B]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CORNER SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D93B,
+ },
+ [0x1D93C]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CORNER MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D93C,
+ },
+ [0x1D93D]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CORNER LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D93D,
+ },
+ [0x1D93E]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CORNER ROTATION",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D93E,
+ },
+ [0x1D93F]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CHECK SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D93F,
+ },
+ [0x1D940]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CHECK MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D940,
+ },
+ [0x1D941]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CHECK LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D941,
+ },
+ [0x1D942]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE BOX SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D942,
+ },
+ [0x1D943]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE BOX MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D943,
+ },
+ [0x1D944]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE BOX LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D944,
+ },
+ [0x1D945]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE ZIGZAG SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D945,
+ },
+ [0x1D946]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE ZIGZAG MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D946,
+ },
+ [0x1D947]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE ZIGZAG LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D947,
+ },
+ [0x1D948]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE PEAKS SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D948,
+ },
+ [0x1D949]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE PEAKS MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D949,
+ },
+ [0x1D94A]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE PEAKS LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D94A,
+ },
+ [0x1D94B]={
+ category="so",
+ description="SIGNWRITING TRAVEL-WALLPLANE ROTATION-WALLPLANE SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D94B,
+ },
+ [0x1D94C]={
+ category="so",
+ description="SIGNWRITING TRAVEL-WALLPLANE ROTATION-WALLPLANE DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D94C,
+ },
+ [0x1D94D]={
+ category="so",
+ description="SIGNWRITING TRAVEL-WALLPLANE ROTATION-WALLPLANE ALTERNATING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D94D,
+ },
+ [0x1D94E]={
+ category="so",
+ description="SIGNWRITING TRAVEL-WALLPLANE ROTATION-FLOORPLANE SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D94E,
+ },
+ [0x1D94F]={
+ category="so",
+ description="SIGNWRITING TRAVEL-WALLPLANE ROTATION-FLOORPLANE DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D94F,
+ },
+ [0x1D950]={
+ category="so",
+ description="SIGNWRITING TRAVEL-WALLPLANE ROTATION-FLOORPLANE ALTERNATING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D950,
+ },
+ [0x1D951]={
+ category="so",
+ description="SIGNWRITING TRAVEL-WALLPLANE SHAKING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D951,
+ },
+ [0x1D952]={
+ category="so",
+ description="SIGNWRITING TRAVEL-WALLPLANE ARM SPIRAL SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D952,
+ },
+ [0x1D953]={
+ category="so",
+ description="SIGNWRITING TRAVEL-WALLPLANE ARM SPIRAL DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D953,
+ },
+ [0x1D954]={
+ category="so",
+ description="SIGNWRITING TRAVEL-WALLPLANE ARM SPIRAL TRIPLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D954,
+ },
+ [0x1D955]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-DIAGONAL AWAY SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D955,
+ },
+ [0x1D956]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-DIAGONAL AWAY MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D956,
+ },
+ [0x1D957]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-DIAGONAL AWAY LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D957,
+ },
+ [0x1D958]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-DIAGONAL AWAY LARGEST",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D958,
+ },
+ [0x1D959]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-DIAGONAL TOWARDS SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D959,
+ },
+ [0x1D95A]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-DIAGONAL TOWARDS MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D95A,
+ },
+ [0x1D95B]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-DIAGONAL TOWARDS LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D95B,
+ },
+ [0x1D95C]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-DIAGONAL TOWARDS LARGEST",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D95C,
+ },
+ [0x1D95D]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-DIAGONAL BETWEEN AWAY SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D95D,
+ },
+ [0x1D95E]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-DIAGONAL BETWEEN AWAY MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D95E,
+ },
+ [0x1D95F]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-DIAGONAL BETWEEN AWAY LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D95F,
+ },
+ [0x1D960]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-DIAGONAL BETWEEN AWAY LARGEST",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D960,
+ },
+ [0x1D961]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-DIAGONAL BETWEEN TOWARDS SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D961,
+ },
+ [0x1D962]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-DIAGONAL BETWEEN TOWARDS MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D962,
+ },
+ [0x1D963]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-DIAGONAL BETWEEN TOWARDS LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D963,
+ },
+ [0x1D964]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-DIAGONAL BETWEEN TOWARDS LARGEST",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D964,
+ },
+ [0x1D965]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE SINGLE STRAIGHT SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D965,
+ },
+ [0x1D966]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE SINGLE STRAIGHT MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D966,
+ },
+ [0x1D967]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE SINGLE STRAIGHT LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D967,
+ },
+ [0x1D968]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE SINGLE STRAIGHT LARGEST",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D968,
+ },
+ [0x1D969]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE SINGLE WRIST FLEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D969,
+ },
+ [0x1D96A]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE DOUBLE STRAIGHT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D96A,
+ },
+ [0x1D96B]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE DOUBLE WRIST FLEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D96B,
+ },
+ [0x1D96C]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE DOUBLE ALTERNATING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D96C,
+ },
+ [0x1D96D]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE DOUBLE ALTERNATING WRIST FLEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D96D,
+ },
+ [0x1D96E]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE CROSS",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D96E,
+ },
+ [0x1D96F]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE TRIPLE STRAIGHT MOVEMENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D96F,
+ },
+ [0x1D970]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE TRIPLE WRIST FLEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D970,
+ },
+ [0x1D971]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE TRIPLE ALTERNATING MOVEMENT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D971,
+ },
+ [0x1D972]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE TRIPLE ALTERNATING WRIST FLEX",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D972,
+ },
+ [0x1D973]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE BEND",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D973,
+ },
+ [0x1D974]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE CORNER SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D974,
+ },
+ [0x1D975]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE CORNER MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D975,
+ },
+ [0x1D976]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE CORNER LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D976,
+ },
+ [0x1D977]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE CHECK",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D977,
+ },
+ [0x1D978]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE BOX SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D978,
+ },
+ [0x1D979]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE BOX MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D979,
+ },
+ [0x1D97A]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE BOX LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D97A,
+ },
+ [0x1D97B]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE ZIGZAG SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D97B,
+ },
+ [0x1D97C]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE ZIGZAG MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D97C,
+ },
+ [0x1D97D]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE ZIGZAG LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D97D,
+ },
+ [0x1D97E]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE PEAKS SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D97E,
+ },
+ [0x1D97F]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE PEAKS MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D97F,
+ },
+ [0x1D980]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE PEAKS LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D980,
+ },
+ [0x1D981]={
+ category="so",
+ description="SIGNWRITING TRAVEL-FLOORPLANE ROTATION-FLOORPLANE SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D981,
+ },
+ [0x1D982]={
+ category="so",
+ description="SIGNWRITING TRAVEL-FLOORPLANE ROTATION-FLOORPLANE DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D982,
+ },
+ [0x1D983]={
+ category="so",
+ description="SIGNWRITING TRAVEL-FLOORPLANE ROTATION-FLOORPLANE ALTERNATING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D983,
+ },
+ [0x1D984]={
+ category="so",
+ description="SIGNWRITING TRAVEL-FLOORPLANE ROTATION-WALLPLANE SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D984,
+ },
+ [0x1D985]={
+ category="so",
+ description="SIGNWRITING TRAVEL-FLOORPLANE ROTATION-WALLPLANE DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D985,
+ },
+ [0x1D986]={
+ category="so",
+ description="SIGNWRITING TRAVEL-FLOORPLANE ROTATION-WALLPLANE ALTERNATING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D986,
+ },
+ [0x1D987]={
+ category="so",
+ description="SIGNWRITING TRAVEL-FLOORPLANE SHAKING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D987,
+ },
+ [0x1D988]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CURVE QUARTER SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D988,
+ },
+ [0x1D989]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CURVE QUARTER MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D989,
+ },
+ [0x1D98A]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CURVE QUARTER LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D98A,
+ },
+ [0x1D98B]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CURVE QUARTER LARGEST",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D98B,
+ },
+ [0x1D98C]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CURVE HALF-CIRCLE SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D98C,
+ },
+ [0x1D98D]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CURVE HALF-CIRCLE MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D98D,
+ },
+ [0x1D98E]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CURVE HALF-CIRCLE LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D98E,
+ },
+ [0x1D98F]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CURVE HALF-CIRCLE LARGEST",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D98F,
+ },
+ [0x1D990]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CURVE THREE-QUARTER CIRCLE SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D990,
+ },
+ [0x1D991]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CURVE THREE-QUARTER CIRCLE MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D991,
+ },
+ [0x1D992]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE HUMP SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D992,
+ },
+ [0x1D993]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE HUMP MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D993,
+ },
+ [0x1D994]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE HUMP LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D994,
+ },
+ [0x1D995]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE LOOP SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D995,
+ },
+ [0x1D996]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE LOOP MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D996,
+ },
+ [0x1D997]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE LOOP LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D997,
+ },
+ [0x1D998]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE LOOP SMALL DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D998,
+ },
+ [0x1D999]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE DOUBLE SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D999,
+ },
+ [0x1D99A]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE DOUBLE MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D99A,
+ },
+ [0x1D99B]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE DOUBLE LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D99B,
+ },
+ [0x1D99C]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE TRIPLE SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D99C,
+ },
+ [0x1D99D]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE TRIPLE MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D99D,
+ },
+ [0x1D99E]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE TRIPLE LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D99E,
+ },
+ [0x1D99F]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CURVE THEN STRAIGHT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D99F,
+ },
+ [0x1D9A0]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CURVED CROSS SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9A0,
+ },
+ [0x1D9A1]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CURVED CROSS MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9A1,
+ },
+ [0x1D9A2]={
+ category="so",
+ description="SIGNWRITING ROTATION-WALLPLANE SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9A2,
+ },
+ [0x1D9A3]={
+ category="so",
+ description="SIGNWRITING ROTATION-WALLPLANE DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9A3,
+ },
+ [0x1D9A4]={
+ category="so",
+ description="SIGNWRITING ROTATION-WALLPLANE ALTERNATE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9A4,
+ },
+ [0x1D9A5]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE SHAKING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9A5,
+ },
+ [0x1D9A6]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CURVE HITTING FRONT WALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9A6,
+ },
+ [0x1D9A7]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE HUMP HITTING FRONT WALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9A7,
+ },
+ [0x1D9A8]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE LOOP HITTING FRONT WALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9A8,
+ },
+ [0x1D9A9]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE WAVE HITTING FRONT WALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9A9,
+ },
+ [0x1D9AA]={
+ category="so",
+ description="SIGNWRITING ROTATION-WALLPLANE SINGLE HITTING FRONT WALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9AA,
+ },
+ [0x1D9AB]={
+ category="so",
+ description="SIGNWRITING ROTATION-WALLPLANE DOUBLE HITTING FRONT WALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9AB,
+ },
+ [0x1D9AC]={
+ category="so",
+ description="SIGNWRITING ROTATION-WALLPLANE ALTERNATING HITTING FRONT WALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9AC,
+ },
+ [0x1D9AD]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE CURVE HITTING CHEST",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9AD,
+ },
+ [0x1D9AE]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE HUMP HITTING CHEST",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9AE,
+ },
+ [0x1D9AF]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE LOOP HITTING CHEST",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9AF,
+ },
+ [0x1D9B0]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE WAVE HITTING CHEST",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9B0,
+ },
+ [0x1D9B1]={
+ category="so",
+ description="SIGNWRITING ROTATION-WALLPLANE SINGLE HITTING CHEST",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9B1,
+ },
+ [0x1D9B2]={
+ category="so",
+ description="SIGNWRITING ROTATION-WALLPLANE DOUBLE HITTING CHEST",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9B2,
+ },
+ [0x1D9B3]={
+ category="so",
+ description="SIGNWRITING ROTATION-WALLPLANE ALTERNATING HITTING CHEST",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9B3,
+ },
+ [0x1D9B4]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE WAVE DIAGONAL PATH SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9B4,
+ },
+ [0x1D9B5]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE WAVE DIAGONAL PATH MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9B5,
+ },
+ [0x1D9B6]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE WAVE DIAGONAL PATH LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9B6,
+ },
+ [0x1D9B7]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE CURVE HITTING CEILING SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9B7,
+ },
+ [0x1D9B8]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE CURVE HITTING CEILING LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9B8,
+ },
+ [0x1D9B9]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING CEILING SMALL DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9B9,
+ },
+ [0x1D9BA]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING CEILING LARGE DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9BA,
+ },
+ [0x1D9BB]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING CEILING SMALL TRIPLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9BB,
+ },
+ [0x1D9BC]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING CEILING LARGE TRIPLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9BC,
+ },
+ [0x1D9BD]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING CEILING SMALL SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9BD,
+ },
+ [0x1D9BE]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING CEILING LARGE SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9BE,
+ },
+ [0x1D9BF]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING CEILING SMALL DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9BF,
+ },
+ [0x1D9C0]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING CEILING LARGE DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9C0,
+ },
+ [0x1D9C1]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE WAVE HITTING CEILING SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9C1,
+ },
+ [0x1D9C2]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE WAVE HITTING CEILING LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9C2,
+ },
+ [0x1D9C3]={
+ category="so",
+ description="SIGNWRITING ROTATION-FLOORPLANE SINGLE HITTING CEILING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9C3,
+ },
+ [0x1D9C4]={
+ category="so",
+ description="SIGNWRITING ROTATION-FLOORPLANE DOUBLE HITTING CEILING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9C4,
+ },
+ [0x1D9C5]={
+ category="so",
+ description="SIGNWRITING ROTATION-FLOORPLANE ALTERNATING HITTING CEILING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9C5,
+ },
+ [0x1D9C6]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE CURVE HITTING FLOOR SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9C6,
+ },
+ [0x1D9C7]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE CURVE HITTING FLOOR LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9C7,
+ },
+ [0x1D9C8]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING FLOOR SMALL DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9C8,
+ },
+ [0x1D9C9]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING FLOOR LARGE DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9C9,
+ },
+ [0x1D9CA]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING FLOOR TRIPLE SMALL TRIPLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9CA,
+ },
+ [0x1D9CB]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING FLOOR TRIPLE LARGE TRIPLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9CB,
+ },
+ [0x1D9CC]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING FLOOR SMALL SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9CC,
+ },
+ [0x1D9CD]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING FLOOR LARGE SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9CD,
+ },
+ [0x1D9CE]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING FLOOR SMALL DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9CE,
+ },
+ [0x1D9CF]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING FLOOR LARGE DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9CF,
+ },
+ [0x1D9D0]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE WAVE HITTING FLOOR SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9D0,
+ },
+ [0x1D9D1]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE WAVE HITTING FLOOR LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9D1,
+ },
+ [0x1D9D2]={
+ category="so",
+ description="SIGNWRITING ROTATION-FLOORPLANE SINGLE HITTING FLOOR",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9D2,
+ },
+ [0x1D9D3]={
+ category="so",
+ description="SIGNWRITING ROTATION-FLOORPLANE DOUBLE HITTING FLOOR",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9D3,
+ },
+ [0x1D9D4]={
+ category="so",
+ description="SIGNWRITING ROTATION-FLOORPLANE ALTERNATING HITTING FLOOR",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9D4,
+ },
+ [0x1D9D5]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE CURVE SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9D5,
+ },
+ [0x1D9D6]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE CURVE MEDIUM",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9D6,
+ },
+ [0x1D9D7]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE CURVE LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9D7,
+ },
+ [0x1D9D8]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE CURVE LARGEST",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9D8,
+ },
+ [0x1D9D9]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE CURVE COMBINED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9D9,
+ },
+ [0x1D9DA]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE HUMP SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9DA,
+ },
+ [0x1D9DB]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE LOOP SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9DB,
+ },
+ [0x1D9DC]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE WAVE SNAKE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9DC,
+ },
+ [0x1D9DD]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE WAVE SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9DD,
+ },
+ [0x1D9DE]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE WAVE LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9DE,
+ },
+ [0x1D9DF]={
+ category="so",
+ description="SIGNWRITING ROTATION-FLOORPLANE SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9DF,
+ },
+ [0x1D9E0]={
+ category="so",
+ description="SIGNWRITING ROTATION-FLOORPLANE DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9E0,
+ },
+ [0x1D9E1]={
+ category="so",
+ description="SIGNWRITING ROTATION-FLOORPLANE ALTERNATING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9E1,
+ },
+ [0x1D9E2]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE SHAKING PARALLEL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9E2,
+ },
+ [0x1D9E3]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE ARM CIRCLE SMALL SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9E3,
+ },
+ [0x1D9E4]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE ARM CIRCLE MEDIUM SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9E4,
+ },
+ [0x1D9E5]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE ARM CIRCLE SMALL DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9E5,
+ },
+ [0x1D9E6]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE ARM CIRCLE MEDIUM DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9E6,
+ },
+ [0x1D9E7]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL SMALL SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9E7,
+ },
+ [0x1D9E8]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL MEDIUM SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9E8,
+ },
+ [0x1D9E9]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL LARGE SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9E9,
+ },
+ [0x1D9EA]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL SMALL DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9EA,
+ },
+ [0x1D9EB]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL MEDIUM DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9EB,
+ },
+ [0x1D9EC]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL LARGE DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9EC,
+ },
+ [0x1D9ED]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE WRIST CIRCLE FRONT SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9ED,
+ },
+ [0x1D9EE]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE WRIST CIRCLE FRONT DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9EE,
+ },
+ [0x1D9EF]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE WRIST CIRCLE HITTING WALL SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9EF,
+ },
+ [0x1D9F0]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE WRIST CIRCLE HITTING WALL DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9F0,
+ },
+ [0x1D9F1]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE FINGER CIRCLES SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9F1,
+ },
+ [0x1D9F2]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-WALLPLANE FINGER CIRCLES DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9F2,
+ },
+ [0x1D9F3]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE FINGER CIRCLES HITTING WALL SINGLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9F3,
+ },
+ [0x1D9F4]={
+ category="so",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE FINGER CIRCLES HITTING WALL DOUBLE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9F4,
+ },
+ [0x1D9F5]={
+ category="so",
+ description="SIGNWRITING DYNAMIC ARROWHEAD SMALL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9F5,
+ },
+ [0x1D9F6]={
+ category="so",
+ description="SIGNWRITING DYNAMIC ARROWHEAD LARGE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9F6,
+ },
+ [0x1D9F7]={
+ category="so",
+ description="SIGNWRITING DYNAMIC FAST",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9F7,
+ },
+ [0x1D9F8]={
+ category="so",
+ description="SIGNWRITING DYNAMIC SLOW",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9F8,
+ },
+ [0x1D9F9]={
+ category="so",
+ description="SIGNWRITING DYNAMIC TENSE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9F9,
+ },
+ [0x1D9FA]={
+ category="so",
+ description="SIGNWRITING DYNAMIC RELAXED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9FA,
+ },
+ [0x1D9FB]={
+ category="so",
+ description="SIGNWRITING DYNAMIC SIMULTANEOUS",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9FB,
+ },
+ [0x1D9FC]={
+ category="so",
+ description="SIGNWRITING DYNAMIC SIMULTANEOUS ALTERNATING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9FC,
+ },
+ [0x1D9FD]={
+ category="so",
+ description="SIGNWRITING DYNAMIC EVERY OTHER TIME",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9FD,
+ },
+ [0x1D9FE]={
+ category="so",
+ description="SIGNWRITING DYNAMIC GRADUAL",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9FE,
+ },
+ [0x1D9FF]={
+ category="so",
+ description="SIGNWRITING HEAD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1D9FF,
+ },
+ [0x1DA00]={
+ category="mn",
+ description="SIGNWRITING HEAD RIM",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA00,
+ },
+ [0x1DA01]={
+ category="mn",
+ description="SIGNWRITING HEAD MOVEMENT-WALLPLANE STRAIGHT",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA01,
+ },
+ [0x1DA02]={
+ category="mn",
+ description="SIGNWRITING HEAD MOVEMENT-WALLPLANE TILT",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA02,
+ },
+ [0x1DA03]={
+ category="mn",
+ description="SIGNWRITING HEAD MOVEMENT-FLOORPLANE STRAIGHT",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA03,
+ },
+ [0x1DA04]={
+ category="mn",
+ description="SIGNWRITING HEAD MOVEMENT-WALLPLANE CURVE",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA04,
+ },
+ [0x1DA05]={
+ category="mn",
+ description="SIGNWRITING HEAD MOVEMENT-FLOORPLANE CURVE",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA05,
+ },
+ [0x1DA06]={
+ category="mn",
+ description="SIGNWRITING HEAD MOVEMENT CIRCLE",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA06,
+ },
+ [0x1DA07]={
+ category="mn",
+ description="SIGNWRITING FACE DIRECTION POSITION NOSE FORWARD TILTING",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA07,
+ },
+ [0x1DA08]={
+ category="mn",
+ description="SIGNWRITING FACE DIRECTION POSITION NOSE UP OR DOWN",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA08,
+ },
+ [0x1DA09]={
+ category="mn",
+ description="SIGNWRITING FACE DIRECTION POSITION NOSE UP OR DOWN TILTING",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA09,
+ },
+ [0x1DA0A]={
+ category="mn",
+ description="SIGNWRITING EYEBROWS STRAIGHT UP",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA0A,
+ },
+ [0x1DA0B]={
+ category="mn",
+ description="SIGNWRITING EYEBROWS STRAIGHT NEUTRAL",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA0B,
+ },
+ [0x1DA0C]={
+ category="mn",
+ description="SIGNWRITING EYEBROWS STRAIGHT DOWN",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA0C,
+ },
+ [0x1DA0D]={
+ category="mn",
+ description="SIGNWRITING DREAMY EYEBROWS NEUTRAL DOWN",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA0D,
+ },
+ [0x1DA0E]={
+ category="mn",
+ description="SIGNWRITING DREAMY EYEBROWS DOWN NEUTRAL",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA0E,
+ },
+ [0x1DA0F]={
+ category="mn",
+ description="SIGNWRITING DREAMY EYEBROWS UP NEUTRAL",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA0F,
+ },
+ [0x1DA10]={
+ category="mn",
+ description="SIGNWRITING DREAMY EYEBROWS NEUTRAL UP",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA10,
+ },
+ [0x1DA11]={
+ category="mn",
+ description="SIGNWRITING FOREHEAD NEUTRAL",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA11,
+ },
+ [0x1DA12]={
+ category="mn",
+ description="SIGNWRITING FOREHEAD CONTACT",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA12,
+ },
+ [0x1DA13]={
+ category="mn",
+ description="SIGNWRITING FOREHEAD WRINKLED",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA13,
+ },
+ [0x1DA14]={
+ category="mn",
+ description="SIGNWRITING EYES OPEN",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA14,
+ },
+ [0x1DA15]={
+ category="mn",
+ description="SIGNWRITING EYES SQUEEZED",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA15,
+ },
+ [0x1DA16]={
+ category="mn",
+ description="SIGNWRITING EYES CLOSED",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA16,
+ },
+ [0x1DA17]={
+ category="mn",
+ description="SIGNWRITING EYE BLINK SINGLE",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA17,
+ },
+ [0x1DA18]={
+ category="mn",
+ description="SIGNWRITING EYE BLINK MULTIPLE",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA18,
+ },
+ [0x1DA19]={
+ category="mn",
+ description="SIGNWRITING EYES HALF OPEN",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA19,
+ },
+ [0x1DA1A]={
+ category="mn",
+ description="SIGNWRITING EYES WIDE OPEN",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA1A,
+ },
+ [0x1DA1B]={
+ category="mn",
+ description="SIGNWRITING EYES HALF CLOSED",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA1B,
+ },
+ [0x1DA1C]={
+ category="mn",
+ description="SIGNWRITING EYES WIDENING MOVEMENT",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA1C,
+ },
+ [0x1DA1D]={
+ category="mn",
+ description="SIGNWRITING EYE WINK",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA1D,
+ },
+ [0x1DA1E]={
+ category="mn",
+ description="SIGNWRITING EYELASHES UP",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA1E,
+ },
+ [0x1DA1F]={
+ category="mn",
+ description="SIGNWRITING EYELASHES DOWN",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA1F,
+ },
+ [0x1DA20]={
+ category="mn",
+ description="SIGNWRITING EYELASHES FLUTTERING",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA20,
+ },
+ [0x1DA21]={
+ category="mn",
+ description="SIGNWRITING EYEGAZE-WALLPLANE STRAIGHT",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA21,
+ },
+ [0x1DA22]={
+ category="mn",
+ description="SIGNWRITING EYEGAZE-WALLPLANE STRAIGHT DOUBLE",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA22,
+ },
+ [0x1DA23]={
+ category="mn",
+ description="SIGNWRITING EYEGAZE-WALLPLANE STRAIGHT ALTERNATING",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA23,
+ },
+ [0x1DA24]={
+ category="mn",
+ description="SIGNWRITING EYEGAZE-FLOORPLANE STRAIGHT",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA24,
+ },
+ [0x1DA25]={
+ category="mn",
+ description="SIGNWRITING EYEGAZE-FLOORPLANE STRAIGHT DOUBLE",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA25,
+ },
+ [0x1DA26]={
+ category="mn",
+ description="SIGNWRITING EYEGAZE-FLOORPLANE STRAIGHT ALTERNATING",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA26,
+ },
+ [0x1DA27]={
+ category="mn",
+ description="SIGNWRITING EYEGAZE-WALLPLANE CURVED",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA27,
+ },
+ [0x1DA28]={
+ category="mn",
+ description="SIGNWRITING EYEGAZE-FLOORPLANE CURVED",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA28,
+ },
+ [0x1DA29]={
+ category="mn",
+ description="SIGNWRITING EYEGAZE-WALLPLANE CIRCLING",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA29,
+ },
+ [0x1DA2A]={
+ category="mn",
+ description="SIGNWRITING CHEEKS PUFFED",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA2A,
+ },
+ [0x1DA2B]={
+ category="mn",
+ description="SIGNWRITING CHEEKS NEUTRAL",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA2B,
+ },
+ [0x1DA2C]={
+ category="mn",
+ description="SIGNWRITING CHEEKS SUCKED",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA2C,
+ },
+ [0x1DA2D]={
+ category="mn",
+ description="SIGNWRITING TENSE CHEEKS HIGH",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA2D,
+ },
+ [0x1DA2E]={
+ category="mn",
+ description="SIGNWRITING TENSE CHEEKS MIDDLE",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA2E,
+ },
+ [0x1DA2F]={
+ category="mn",
+ description="SIGNWRITING TENSE CHEEKS LOW",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA2F,
+ },
+ [0x1DA30]={
+ category="mn",
+ description="SIGNWRITING EARS",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA30,
+ },
+ [0x1DA31]={
+ category="mn",
+ description="SIGNWRITING NOSE NEUTRAL",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA31,
+ },
+ [0x1DA32]={
+ category="mn",
+ description="SIGNWRITING NOSE CONTACT",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA32,
+ },
+ [0x1DA33]={
+ category="mn",
+ description="SIGNWRITING NOSE WRINKLES",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA33,
+ },
+ [0x1DA34]={
+ category="mn",
+ description="SIGNWRITING NOSE WIGGLES",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA34,
+ },
+ [0x1DA35]={
+ category="mn",
+ description="SIGNWRITING AIR BLOWING OUT",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA35,
+ },
+ [0x1DA36]={
+ category="mn",
+ description="SIGNWRITING AIR SUCKING IN",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA36,
+ },
+ [0x1DA37]={
+ category="so",
+ description="SIGNWRITING AIR BLOW SMALL ROTATIONS",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA37,
+ },
+ [0x1DA38]={
+ category="so",
+ description="SIGNWRITING AIR SUCK SMALL ROTATIONS",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA38,
+ },
+ [0x1DA39]={
+ category="so",
+ description="SIGNWRITING BREATH INHALE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA39,
+ },
+ [0x1DA3A]={
+ category="so",
+ description="SIGNWRITING BREATH EXHALE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA3A,
+ },
+ [0x1DA3B]={
+ category="mn",
+ description="SIGNWRITING MOUTH CLOSED NEUTRAL",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA3B,
+ },
+ [0x1DA3C]={
+ category="mn",
+ description="SIGNWRITING MOUTH CLOSED FORWARD",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA3C,
+ },
+ [0x1DA3D]={
+ category="mn",
+ description="SIGNWRITING MOUTH CLOSED CONTACT",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA3D,
+ },
+ [0x1DA3E]={
+ category="mn",
+ description="SIGNWRITING MOUTH SMILE",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA3E,
+ },
+ [0x1DA3F]={
+ category="mn",
+ description="SIGNWRITING MOUTH SMILE WRINKLED",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA3F,
+ },
+ [0x1DA40]={
+ category="mn",
+ description="SIGNWRITING MOUTH SMILE OPEN",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA40,
+ },
+ [0x1DA41]={
+ category="mn",
+ description="SIGNWRITING MOUTH FROWN",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA41,
+ },
+ [0x1DA42]={
+ category="mn",
+ description="SIGNWRITING MOUTH FROWN WRINKLED",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA42,
+ },
+ [0x1DA43]={
+ category="mn",
+ description="SIGNWRITING MOUTH FROWN OPEN",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA43,
+ },
+ [0x1DA44]={
+ category="mn",
+ description="SIGNWRITING MOUTH OPEN CIRCLE",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA44,
+ },
+ [0x1DA45]={
+ category="mn",
+ description="SIGNWRITING MOUTH OPEN FORWARD",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA45,
+ },
+ [0x1DA46]={
+ category="mn",
+ description="SIGNWRITING MOUTH OPEN WRINKLED",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA46,
+ },
+ [0x1DA47]={
+ category="mn",
+ description="SIGNWRITING MOUTH OPEN OVAL",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA47,
+ },
+ [0x1DA48]={
+ category="mn",
+ description="SIGNWRITING MOUTH OPEN OVAL WRINKLED",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA48,
+ },
+ [0x1DA49]={
+ category="mn",
+ description="SIGNWRITING MOUTH OPEN OVAL YAWN",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA49,
+ },
+ [0x1DA4A]={
+ category="mn",
+ description="SIGNWRITING MOUTH OPEN RECTANGLE",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA4A,
+ },
+ [0x1DA4B]={
+ category="mn",
+ description="SIGNWRITING MOUTH OPEN RECTANGLE WRINKLED",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA4B,
+ },
+ [0x1DA4C]={
+ category="mn",
+ description="SIGNWRITING MOUTH OPEN RECTANGLE YAWN",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA4C,
+ },
+ [0x1DA4D]={
+ category="mn",
+ description="SIGNWRITING MOUTH KISS",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA4D,
+ },
+ [0x1DA4E]={
+ category="mn",
+ description="SIGNWRITING MOUTH KISS FORWARD",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA4E,
+ },
+ [0x1DA4F]={
+ category="mn",
+ description="SIGNWRITING MOUTH KISS WRINKLED",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA4F,
+ },
+ [0x1DA50]={
+ category="mn",
+ description="SIGNWRITING MOUTH TENSE",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA50,
+ },
+ [0x1DA51]={
+ category="mn",
+ description="SIGNWRITING MOUTH TENSE FORWARD",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA51,
+ },
+ [0x1DA52]={
+ category="mn",
+ description="SIGNWRITING MOUTH TENSE SUCKED",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA52,
+ },
+ [0x1DA53]={
+ category="mn",
+ description="SIGNWRITING LIPS PRESSED TOGETHER",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA53,
+ },
+ [0x1DA54]={
+ category="mn",
+ description="SIGNWRITING LIP LOWER OVER UPPER",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA54,
+ },
+ [0x1DA55]={
+ category="mn",
+ description="SIGNWRITING LIP UPPER OVER LOWER",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA55,
+ },
+ [0x1DA56]={
+ category="mn",
+ description="SIGNWRITING MOUTH CORNERS",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA56,
+ },
+ [0x1DA57]={
+ category="mn",
+ description="SIGNWRITING MOUTH WRINKLES SINGLE",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA57,
+ },
+ [0x1DA58]={
+ category="mn",
+ description="SIGNWRITING MOUTH WRINKLES DOUBLE",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA58,
+ },
+ [0x1DA59]={
+ category="mn",
+ description="SIGNWRITING TONGUE STICKING OUT FAR",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA59,
+ },
+ [0x1DA5A]={
+ category="mn",
+ description="SIGNWRITING TONGUE LICKING LIPS",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA5A,
+ },
+ [0x1DA5B]={
+ category="mn",
+ description="SIGNWRITING TONGUE TIP BETWEEN LIPS",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA5B,
+ },
+ [0x1DA5C]={
+ category="mn",
+ description="SIGNWRITING TONGUE TIP TOUCHING INSIDE MOUTH",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA5C,
+ },
+ [0x1DA5D]={
+ category="mn",
+ description="SIGNWRITING TONGUE INSIDE MOUTH RELAXED",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA5D,
+ },
+ [0x1DA5E]={
+ category="mn",
+ description="SIGNWRITING TONGUE MOVES AGAINST CHEEK",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA5E,
+ },
+ [0x1DA5F]={
+ category="mn",
+ description="SIGNWRITING TONGUE CENTRE STICKING OUT",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA5F,
+ },
+ [0x1DA60]={
+ category="mn",
+ description="SIGNWRITING TONGUE CENTRE INSIDE MOUTH",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA60,
+ },
+ [0x1DA61]={
+ category="mn",
+ description="SIGNWRITING TEETH",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA61,
+ },
+ [0x1DA62]={
+ category="mn",
+ description="SIGNWRITING TEETH MOVEMENT",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA62,
+ },
+ [0x1DA63]={
+ category="mn",
+ description="SIGNWRITING TEETH ON TONGUE",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA63,
+ },
+ [0x1DA64]={
+ category="mn",
+ description="SIGNWRITING TEETH ON TONGUE MOVEMENT",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA64,
+ },
+ [0x1DA65]={
+ category="mn",
+ description="SIGNWRITING TEETH ON LIPS",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA65,
+ },
+ [0x1DA66]={
+ category="mn",
+ description="SIGNWRITING TEETH ON LIPS MOVEMENT",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA66,
+ },
+ [0x1DA67]={
+ category="mn",
+ description="SIGNWRITING TEETH BITE LIPS",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA67,
+ },
+ [0x1DA68]={
+ category="mn",
+ description="SIGNWRITING MOVEMENT-WALLPLANE JAW",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA68,
+ },
+ [0x1DA69]={
+ category="mn",
+ description="SIGNWRITING MOVEMENT-FLOORPLANE JAW",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA69,
+ },
+ [0x1DA6A]={
+ category="mn",
+ description="SIGNWRITING NECK",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA6A,
+ },
+ [0x1DA6B]={
+ category="mn",
+ description="SIGNWRITING HAIR",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA6B,
+ },
+ [0x1DA6C]={
+ category="mn",
+ description="SIGNWRITING EXCITEMENT",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA6C,
+ },
+ [0x1DA6D]={
+ category="so",
+ description="SIGNWRITING SHOULDER HIP SPINE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA6D,
+ },
+ [0x1DA6E]={
+ category="so",
+ description="SIGNWRITING SHOULDER HIP POSITIONS",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA6E,
+ },
+ [0x1DA6F]={
+ category="so",
+ description="SIGNWRITING WALLPLANE SHOULDER HIP MOVE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA6F,
+ },
+ [0x1DA70]={
+ category="so",
+ description="SIGNWRITING FLOORPLANE SHOULDER HIP MOVE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA70,
+ },
+ [0x1DA71]={
+ category="so",
+ description="SIGNWRITING SHOULDER TILTING FROM WAIST",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA71,
+ },
+ [0x1DA72]={
+ category="so",
+ description="SIGNWRITING TORSO-WALLPLANE STRAIGHT STRETCH",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA72,
+ },
+ [0x1DA73]={
+ category="so",
+ description="SIGNWRITING TORSO-WALLPLANE CURVED BEND",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA73,
+ },
+ [0x1DA74]={
+ category="so",
+ description="SIGNWRITING TORSO-FLOORPLANE TWISTING",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA74,
+ },
+ [0x1DA75]={
+ category="mn",
+ description="SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA75,
+ },
+ [0x1DA76]={
+ category="so",
+ description="SIGNWRITING LIMB COMBINATION",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA76,
+ },
+ [0x1DA77]={
+ category="so",
+ description="SIGNWRITING LIMB LENGTH-1",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA77,
+ },
+ [0x1DA78]={
+ category="so",
+ description="SIGNWRITING LIMB LENGTH-2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA78,
+ },
+ [0x1DA79]={
+ category="so",
+ description="SIGNWRITING LIMB LENGTH-3",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA79,
+ },
+ [0x1DA7A]={
+ category="so",
+ description="SIGNWRITING LIMB LENGTH-4",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA7A,
+ },
+ [0x1DA7B]={
+ category="so",
+ description="SIGNWRITING LIMB LENGTH-5",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA7B,
+ },
+ [0x1DA7C]={
+ category="so",
+ description="SIGNWRITING LIMB LENGTH-6",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA7C,
+ },
+ [0x1DA7D]={
+ category="so",
+ description="SIGNWRITING LIMB LENGTH-7",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA7D,
+ },
+ [0x1DA7E]={
+ category="so",
+ description="SIGNWRITING FINGER",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA7E,
+ },
+ [0x1DA7F]={
+ category="so",
+ description="SIGNWRITING LOCATION-WALLPLANE SPACE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA7F,
+ },
+ [0x1DA80]={
+ category="so",
+ description="SIGNWRITING LOCATION-FLOORPLANE SPACE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA80,
+ },
+ [0x1DA81]={
+ category="so",
+ description="SIGNWRITING LOCATION HEIGHT",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA81,
+ },
+ [0x1DA82]={
+ category="so",
+ description="SIGNWRITING LOCATION WIDTH",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA82,
+ },
+ [0x1DA83]={
+ category="so",
+ description="SIGNWRITING LOCATION DEPTH",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA83,
+ },
+ [0x1DA84]={
+ category="mn",
+ description="SIGNWRITING LOCATION HEAD NECK",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA84,
+ },
+ [0x1DA85]={
+ category="so",
+ description="SIGNWRITING LOCATION TORSO",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA85,
+ },
+ [0x1DA86]={
+ category="so",
+ description="SIGNWRITING LOCATION LIMBS DIGITS",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA86,
+ },
+ [0x1DA87]={
+ category="po",
+ description="SIGNWRITING COMMA",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x1DA87,
+ },
+ [0x1DA88]={
+ category="po",
+ description="SIGNWRITING FULL STOP",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x1DA88,
+ },
+ [0x1DA89]={
+ category="po",
+ description="SIGNWRITING SEMICOLON",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x1DA89,
+ },
+ [0x1DA8A]={
+ category="po",
+ description="SIGNWRITING COLON",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x1DA8A,
+ },
+ [0x1DA8B]={
+ category="po",
+ description="SIGNWRITING PARENTHESIS",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1DA8B,
+ },
+ [0x1DA9B]={
+ category="mn",
+ description="SIGNWRITING FILL MODIFIER-2",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA9B,
+ },
+ [0x1DA9C]={
+ category="mn",
+ description="SIGNWRITING FILL MODIFIER-3",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA9C,
+ },
+ [0x1DA9D]={
+ category="mn",
+ description="SIGNWRITING FILL MODIFIER-4",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA9D,
+ },
+ [0x1DA9E]={
+ category="mn",
+ description="SIGNWRITING FILL MODIFIER-5",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA9E,
+ },
+ [0x1DA9F]={
+ category="mn",
+ description="SIGNWRITING FILL MODIFIER-6",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DA9F,
+ },
+ [0x1DAA1]={
+ category="mn",
+ description="SIGNWRITING ROTATION MODIFIER-2",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DAA1,
+ },
+ [0x1DAA2]={
+ category="mn",
+ description="SIGNWRITING ROTATION MODIFIER-3",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DAA2,
+ },
+ [0x1DAA3]={
+ category="mn",
+ description="SIGNWRITING ROTATION MODIFIER-4",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DAA3,
+ },
+ [0x1DAA4]={
+ category="mn",
+ description="SIGNWRITING ROTATION MODIFIER-5",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DAA4,
+ },
+ [0x1DAA5]={
+ category="mn",
+ description="SIGNWRITING ROTATION MODIFIER-6",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DAA5,
+ },
+ [0x1DAA6]={
+ category="mn",
+ description="SIGNWRITING ROTATION MODIFIER-7",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DAA6,
+ },
+ [0x1DAA7]={
+ category="mn",
+ description="SIGNWRITING ROTATION MODIFIER-8",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DAA7,
+ },
+ [0x1DAA8]={
+ category="mn",
+ description="SIGNWRITING ROTATION MODIFIER-9",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DAA8,
+ },
+ [0x1DAA9]={
+ category="mn",
+ description="SIGNWRITING ROTATION MODIFIER-10",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DAA9,
+ },
+ [0x1DAAA]={
+ category="mn",
+ description="SIGNWRITING ROTATION MODIFIER-11",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DAAA,
+ },
+ [0x1DAAB]={
+ category="mn",
+ description="SIGNWRITING ROTATION MODIFIER-12",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DAAB,
+ },
+ [0x1DAAC]={
+ category="mn",
+ description="SIGNWRITING ROTATION MODIFIER-13",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DAAC,
+ },
+ [0x1DAAD]={
+ category="mn",
+ description="SIGNWRITING ROTATION MODIFIER-14",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DAAD,
+ },
+ [0x1DAAE]={
+ category="mn",
+ description="SIGNWRITING ROTATION MODIFIER-15",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DAAE,
+ },
+ [0x1DAAF]={
+ category="mn",
+ description="SIGNWRITING ROTATION MODIFIER-16",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1DAAF,
+ },
[0x1E800]={
category="lo",
description="MENDE KIKAKUI SYLLABLE M001 KI",
@@ -197713,6 +210938,10 @@ characters.data={
direction="l",
linebreak="ai",
unicodeslot=0x1F170,
+ variants={
+ [0xFE0E]="text style",
+ [0xFE0F]="emoji style",
+ },
},
[0x1F171]={
category="so",
@@ -197721,6 +210950,10 @@ characters.data={
direction="l",
linebreak="ai",
unicodeslot=0x1F171,
+ variants={
+ [0xFE0E]="text style",
+ [0xFE0F]="emoji style",
+ },
},
[0x1F172]={
category="so",
@@ -197825,6 +211058,10 @@ characters.data={
direction="l",
linebreak="ai",
unicodeslot=0x1F17E,
+ variants={
+ [0xFE0E]="text style",
+ [0xFE0F]="emoji style",
+ },
},
[0x1F17F]={
category="so",
@@ -198263,6 +211500,10 @@ characters.data={
linebreak="id",
specials={ "square", 0x30B5 },
unicodeslot=0x1F202,
+ variants={
+ [0xFE0E]="text style",
+ [0xFE0F]="emoji style",
+ },
},
[0x1F210]={
category="so",
@@ -198631,6 +211872,10 @@ characters.data={
linebreak="id",
specials={ "square", 0x6708 },
unicodeslot=0x1F237,
+ variants={
+ [0xFE0E]="text style",
+ [0xFE0F]="emoji style",
+ },
},
[0x1F238]={
category="so",
@@ -199073,6 +212318,27 @@ characters.data={
linebreak="id",
unicodeslot=0x1F32C,
},
+ [0x1F32D]={
+ category="so",
+ description="HOT DOG",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F32D,
+ },
+ [0x1F32E]={
+ category="so",
+ description="TACO",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F32E,
+ },
+ [0x1F32F]={
+ category="so",
+ description="BURRITO",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F32F,
+ },
[0x1F330]={
category="so",
description="CHESTNUT",
@@ -199619,6 +212885,20 @@ characters.data={
linebreak="id",
unicodeslot=0x1F37D,
},
+ [0x1F37E]={
+ category="so",
+ description="BOTTLE WITH POPPING CORK",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F37E,
+ },
+ [0x1F37F]={
+ category="so",
+ description="POPCORN",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F37F,
+ },
[0x1F380]={
category="so",
description="RIBBON",
@@ -200172,6 +213452,41 @@ characters.data={
linebreak="id",
unicodeslot=0x1F3CE,
},
+ [0x1F3CF]={
+ category="so",
+ description="CRICKET BAT AND BALL",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F3CF,
+ },
+ [0x1F3D0]={
+ category="so",
+ description="VOLLEYBALL",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F3D0,
+ },
+ [0x1F3D1]={
+ category="so",
+ description="FIELD HOCKEY STICK AND BALL",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F3D1,
+ },
+ [0x1F3D2]={
+ category="so",
+ description="ICE HOCKEY STICK AND PUCK",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F3D2,
+ },
+ [0x1F3D3]={
+ category="so",
+ description="TABLE TENNIS PADDLE AND BALL",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F3D3,
+ },
[0x1F3D4]={
category="so",
description="SNOW CAPPED MOUNTAIN",
@@ -200424,6 +213739,62 @@ characters.data={
linebreak="id",
unicodeslot=0x1F3F7,
},
+ [0x1F3F8]={
+ category="so",
+ description="BADMINTON RACQUET AND SHUTTLECOCK",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F3F8,
+ },
+ [0x1F3F9]={
+ category="so",
+ description="BOW AND ARROW",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F3F9,
+ },
+ [0x1F3FA]={
+ category="so",
+ description="AMPHORA",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F3FA,
+ },
+ [0x1F3FB]={
+ category="sk",
+ description="EMOJI MODIFIER FITZPATRICK TYPE-1-2",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1F3FB,
+ },
+ [0x1F3FC]={
+ category="sk",
+ description="EMOJI MODIFIER FITZPATRICK TYPE-3",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1F3FC,
+ },
+ [0x1F3FD]={
+ category="sk",
+ description="EMOJI MODIFIER FITZPATRICK TYPE-4",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1F3FD,
+ },
+ [0x1F3FE]={
+ category="sk",
+ description="EMOJI MODIFIER FITZPATRICK TYPE-5",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1F3FE,
+ },
+ [0x1F3FF]={
+ category="sk",
+ description="EMOJI MODIFIER FITZPATRICK TYPE-6",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1F3FF,
+ },
[0x1F400]={
category="so",
description="RAT",
@@ -202209,6 +215580,13 @@ characters.data={
linebreak="id",
unicodeslot=0x1F4FE,
},
+ [0x1F4FF]={
+ category="so",
+ description="PRAYER BEADS",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F4FF,
+ },
[0x1F500]={
category="so",
description="TWISTED RIGHTWARDS ARROWS",
@@ -202734,6 +216112,41 @@ characters.data={
linebreak="id",
unicodeslot=0x1F54A,
},
+ [0x1F54B]={
+ category="so",
+ description="KAABA",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F54B,
+ },
+ [0x1F54C]={
+ category="so",
+ description="MOSQUE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F54C,
+ },
+ [0x1F54D]={
+ category="so",
+ description="SYNAGOGUE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F54D,
+ },
+ [0x1F54E]={
+ category="so",
+ description="MENORAH WITH NINE BRANCHES",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F54E,
+ },
+ [0x1F54F]={
+ category="so",
+ description="BOWL OF HYGIEIA",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F54F,
+ },
[0x1F550]={
category="so",
description="CLOCK FACE ONE OCLOCK",
@@ -204421,6 +217834,20 @@ characters.data={
linebreak="id",
unicodeslot=0x1F642,
},
+ [0x1F643]={
+ category="so",
+ description="UPSIDE-DOWN FACE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F643,
+ },
+ [0x1F644]={
+ category="so",
+ description="FACE WITH ROLLING EYES",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F644,
+ },
[0x1F645]={
category="so",
description="FACE WITH NO GOOD GESTURE",
@@ -205394,6 +218821,13 @@ characters.data={
linebreak="id",
unicodeslot=0x1F6CF,
},
+ [0x1F6D0]={
+ category="so",
+ description="PLACE OF WORSHIP",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F6D0,
+ },
[0x1F6E0]={
category="so",
description="HAMMER AND WRENCH",
@@ -207956,6 +221390,111 @@ characters.data={
linebreak="al",
unicodeslot=0x1F8AD,
},
+ [0x1F910]={
+ category="so",
+ description="ZIPPER-MOUTH FACE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F910,
+ },
+ [0x1F911]={
+ category="so",
+ description="MONEY-MOUTH FACE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F911,
+ },
+ [0x1F912]={
+ category="so",
+ description="FACE WITH THERMOMETER",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F912,
+ },
+ [0x1F913]={
+ category="so",
+ description="NERD FACE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F913,
+ },
+ [0x1F914]={
+ category="so",
+ description="THINKING FACE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F914,
+ },
+ [0x1F915]={
+ category="so",
+ description="FACE WITH HEAD-BANDAGE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F915,
+ },
+ [0x1F916]={
+ category="so",
+ description="ROBOT FACE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F916,
+ },
+ [0x1F917]={
+ category="so",
+ description="HUGGING FACE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F917,
+ },
+ [0x1F918]={
+ category="so",
+ description="SIGN OF THE HORNS",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F918,
+ },
+ [0x1F980]={
+ category="so",
+ description="CRAB",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F980,
+ },
+ [0x1F981]={
+ category="so",
+ description="LION FACE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F981,
+ },
+ [0x1F982]={
+ category="so",
+ description="SCORPION",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F982,
+ },
+ [0x1F983]={
+ category="so",
+ description="TURKEY",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F983,
+ },
+ [0x1F984]={
+ category="so",
+ description="UNICORN FACE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F984,
+ },
+ [0x1F9C0]={
+ category="so",
+ description="CHEESE WEDGE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F9C0,
+ },
[0x2F800]={
category="lo",
cjkwd="w",
@@ -213513,1924 +227052,4 @@ characters.data={
linebreak="cm",
unicodeslot=0xE007F,
},
- [0xE0100]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0011",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0100,
- },
- [0xE0101]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0012",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0101,
- },
- [0xE0102]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0013",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0102,
- },
- [0xE0103]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0014",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0103,
- },
- [0xE0104]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0015",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0104,
- },
- [0xE0105]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0016",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0105,
- },
- [0xE0106]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0017",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0106,
- },
- [0xE0107]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0018",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0107,
- },
- [0xE0108]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0019",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0108,
- },
- [0xE0109]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x001A",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0109,
- },
- [0xE010A]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x001B",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE010A,
- },
- [0xE010B]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x001C",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE010B,
- },
- [0xE010C]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x001D",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE010C,
- },
- [0xE010D]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x001E",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE010D,
- },
- [0xE010E]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x001F",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE010E,
- },
- [0xE010F]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0020",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE010F,
- },
- [0xE0110]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0021",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0110,
- },
- [0xE0111]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0022",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0111,
- },
- [0xE0112]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0023",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0112,
- },
- [0xE0113]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0024",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0113,
- },
- [0xE0114]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0025",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0114,
- },
- [0xE0115]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0026",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0115,
- },
- [0xE0116]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0027",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0116,
- },
- [0xE0117]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0028",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0117,
- },
- [0xE0118]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0029",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0118,
- },
- [0xE0119]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x002A",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0119,
- },
- [0xE011A]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x002B",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE011A,
- },
- [0xE011B]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x002C",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE011B,
- },
- [0xE011C]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x002D",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE011C,
- },
- [0xE011D]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x002E",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE011D,
- },
- [0xE011E]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x002F",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE011E,
- },
- [0xE011F]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0030",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE011F,
- },
- [0xE0120]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0031",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0120,
- },
- [0xE0121]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0032",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0121,
- },
- [0xE0122]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0033",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0122,
- },
- [0xE0123]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0034",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0123,
- },
- [0xE0124]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0035",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0124,
- },
- [0xE0125]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0036",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0125,
- },
- [0xE0126]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0037",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0126,
- },
- [0xE0127]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0038",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0127,
- },
- [0xE0128]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0039",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0128,
- },
- [0xE0129]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x003A",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0129,
- },
- [0xE012A]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x003B",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE012A,
- },
- [0xE012B]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x003C",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE012B,
- },
- [0xE012C]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x003D",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE012C,
- },
- [0xE012D]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x003E",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE012D,
- },
- [0xE012E]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x003F",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE012E,
- },
- [0xE012F]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0040",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE012F,
- },
- [0xE0130]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0041",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0130,
- },
- [0xE0131]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0042",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0131,
- },
- [0xE0132]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0043",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0132,
- },
- [0xE0133]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0044",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0133,
- },
- [0xE0134]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0045",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0134,
- },
- [0xE0135]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0046",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0135,
- },
- [0xE0136]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0047",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0136,
- },
- [0xE0137]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0048",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0137,
- },
- [0xE0138]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0049",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0138,
- },
- [0xE0139]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x004A",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0139,
- },
- [0xE013A]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x004B",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE013A,
- },
- [0xE013B]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x004C",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE013B,
- },
- [0xE013C]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x004D",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE013C,
- },
- [0xE013D]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x004E",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE013D,
- },
- [0xE013E]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x004F",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE013E,
- },
- [0xE013F]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0050",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE013F,
- },
- [0xE0140]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0051",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0140,
- },
- [0xE0141]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0052",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0141,
- },
- [0xE0142]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0053",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0142,
- },
- [0xE0143]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0054",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0143,
- },
- [0xE0144]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0055",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0144,
- },
- [0xE0145]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0056",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0145,
- },
- [0xE0146]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0057",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0146,
- },
- [0xE0147]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0058",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0147,
- },
- [0xE0148]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0059",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0148,
- },
- [0xE0149]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x005A",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0149,
- },
- [0xE014A]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x005B",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE014A,
- },
- [0xE014B]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x005C",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE014B,
- },
- [0xE014C]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x005D",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE014C,
- },
- [0xE014D]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x005E",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE014D,
- },
- [0xE014E]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x005F",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE014E,
- },
- [0xE014F]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0060",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE014F,
- },
- [0xE0150]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0061",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0150,
- },
- [0xE0151]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0062",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0151,
- },
- [0xE0152]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0063",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0152,
- },
- [0xE0153]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0064",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0153,
- },
- [0xE0154]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0065",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0154,
- },
- [0xE0155]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0066",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0155,
- },
- [0xE0156]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0067",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0156,
- },
- [0xE0157]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0068",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0157,
- },
- [0xE0158]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0069",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0158,
- },
- [0xE0159]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x006A",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0159,
- },
- [0xE015A]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x006B",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE015A,
- },
- [0xE015B]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x006C",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE015B,
- },
- [0xE015C]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x006D",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE015C,
- },
- [0xE015D]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x006E",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE015D,
- },
- [0xE015E]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x006F",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE015E,
- },
- [0xE015F]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0070",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE015F,
- },
- [0xE0160]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0071",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0160,
- },
- [0xE0161]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0072",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0161,
- },
- [0xE0162]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0073",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0162,
- },
- [0xE0163]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0074",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0163,
- },
- [0xE0164]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0075",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0164,
- },
- [0xE0165]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0076",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0165,
- },
- [0xE0166]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0077",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0166,
- },
- [0xE0167]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0078",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0167,
- },
- [0xE0168]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0079",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0168,
- },
- [0xE0169]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x007A",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0169,
- },
- [0xE016A]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x007B",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE016A,
- },
- [0xE016B]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x007C",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE016B,
- },
- [0xE016C]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x007D",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE016C,
- },
- [0xE016D]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x007E",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE016D,
- },
- [0xE016E]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x007F",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE016E,
- },
- [0xE016F]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0080",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE016F,
- },
- [0xE0170]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0081",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0170,
- },
- [0xE0171]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0082",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0171,
- },
- [0xE0172]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0083",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0172,
- },
- [0xE0173]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0084",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0173,
- },
- [0xE0174]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0085",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0174,
- },
- [0xE0175]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0086",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0175,
- },
- [0xE0176]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0087",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0176,
- },
- [0xE0177]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0088",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0177,
- },
- [0xE0178]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0089",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0178,
- },
- [0xE0179]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x008A",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0179,
- },
- [0xE017A]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x008B",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE017A,
- },
- [0xE017B]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x008C",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE017B,
- },
- [0xE017C]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x008D",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE017C,
- },
- [0xE017D]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x008E",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE017D,
- },
- [0xE017E]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x008F",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE017E,
- },
- [0xE017F]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0090",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE017F,
- },
- [0xE0180]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0091",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0180,
- },
- [0xE0181]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0092",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0181,
- },
- [0xE0182]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0093",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0182,
- },
- [0xE0183]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0094",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0183,
- },
- [0xE0184]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0095",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0184,
- },
- [0xE0185]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0096",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0185,
- },
- [0xE0186]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0097",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0186,
- },
- [0xE0187]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0098",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0187,
- },
- [0xE0188]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0099",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0188,
- },
- [0xE0189]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x009A",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0189,
- },
- [0xE018A]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x009B",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE018A,
- },
- [0xE018B]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x009C",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE018B,
- },
- [0xE018C]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x009D",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE018C,
- },
- [0xE018D]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x009E",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE018D,
- },
- [0xE018E]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x009F",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE018E,
- },
- [0xE018F]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00A0",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE018F,
- },
- [0xE0190]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00A1",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0190,
- },
- [0xE0191]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00A2",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0191,
- },
- [0xE0192]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00A3",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0192,
- },
- [0xE0193]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00A4",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0193,
- },
- [0xE0194]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00A5",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0194,
- },
- [0xE0195]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00A6",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0195,
- },
- [0xE0196]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00A7",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0196,
- },
- [0xE0197]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00A8",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0197,
- },
- [0xE0198]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00A9",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0198,
- },
- [0xE0199]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00AA",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE0199,
- },
- [0xE019A]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00AB",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE019A,
- },
- [0xE019B]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00AC",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE019B,
- },
- [0xE019C]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00AD",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE019C,
- },
- [0xE019D]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00AE",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE019D,
- },
- [0xE019E]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00AF",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE019E,
- },
- [0xE019F]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00B0",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE019F,
- },
- [0xE01A0]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00B1",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01A0,
- },
- [0xE01A1]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00B2",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01A1,
- },
- [0xE01A2]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00B3",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01A2,
- },
- [0xE01A3]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00B4",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01A3,
- },
- [0xE01A4]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00B5",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01A4,
- },
- [0xE01A5]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00B6",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01A5,
- },
- [0xE01A6]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00B7",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01A6,
- },
- [0xE01A7]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00B8",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01A7,
- },
- [0xE01A8]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00B9",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01A8,
- },
- [0xE01A9]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00BA",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01A9,
- },
- [0xE01AA]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00BB",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01AA,
- },
- [0xE01AB]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00BC",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01AB,
- },
- [0xE01AC]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00BD",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01AC,
- },
- [0xE01AD]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00BE",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01AD,
- },
- [0xE01AE]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00BF",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01AE,
- },
- [0xE01AF]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00C0",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01AF,
- },
- [0xE01B0]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00C1",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01B0,
- },
- [0xE01B1]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00C2",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01B1,
- },
- [0xE01B2]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00C3",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01B2,
- },
- [0xE01B3]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00C4",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01B3,
- },
- [0xE01B4]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00C5",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01B4,
- },
- [0xE01B5]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00C6",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01B5,
- },
- [0xE01B6]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00C7",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01B6,
- },
- [0xE01B7]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00C8",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01B7,
- },
- [0xE01B8]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00C9",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01B8,
- },
- [0xE01B9]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00CA",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01B9,
- },
- [0xE01BA]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00CB",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01BA,
- },
- [0xE01BB]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00CC",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01BB,
- },
- [0xE01BC]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00CD",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01BC,
- },
- [0xE01BD]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00CE",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01BD,
- },
- [0xE01BE]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00CF",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01BE,
- },
- [0xE01BF]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00D0",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01BF,
- },
- [0xE01C0]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00D1",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01C0,
- },
- [0xE01C1]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00D2",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01C1,
- },
- [0xE01C2]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00D3",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01C2,
- },
- [0xE01C3]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00D4",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01C3,
- },
- [0xE01C4]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00D5",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01C4,
- },
- [0xE01C5]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00D6",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01C5,
- },
- [0xE01C6]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00D7",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01C6,
- },
- [0xE01C7]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00D8",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01C7,
- },
- [0xE01C8]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00D9",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01C8,
- },
- [0xE01C9]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00DA",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01C9,
- },
- [0xE01CA]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00DB",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01CA,
- },
- [0xE01CB]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00DC",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01CB,
- },
- [0xE01CC]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00DD",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01CC,
- },
- [0xE01CD]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00DE",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01CD,
- },
- [0xE01CE]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00DF",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01CE,
- },
- [0xE01CF]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00E0",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01CF,
- },
- [0xE01D0]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00E1",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01D0,
- },
- [0xE01D1]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00E2",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01D1,
- },
- [0xE01D2]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00E3",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01D2,
- },
- [0xE01D3]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00E4",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01D3,
- },
- [0xE01D4]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00E5",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01D4,
- },
- [0xE01D5]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00E6",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01D5,
- },
- [0xE01D6]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00E7",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01D6,
- },
- [0xE01D7]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00E8",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01D7,
- },
- [0xE01D8]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00E9",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01D8,
- },
- [0xE01D9]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00EA",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01D9,
- },
- [0xE01DA]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00EB",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01DA,
- },
- [0xE01DB]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00EC",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01DB,
- },
- [0xE01DC]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00ED",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01DC,
- },
- [0xE01DD]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00EE",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01DD,
- },
- [0xE01DE]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00EF",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01DE,
- },
- [0xE01DF]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00F0",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01DF,
- },
- [0xE01E0]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00F1",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01E0,
- },
- [0xE01E1]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00F2",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01E1,
- },
- [0xE01E2]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00F3",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01E2,
- },
- [0xE01E3]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00F4",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01E3,
- },
- [0xE01E4]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00F5",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01E4,
- },
- [0xE01E5]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00F6",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01E5,
- },
- [0xE01E6]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00F7",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01E6,
- },
- [0xE01E7]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00F8",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01E7,
- },
- [0xE01E8]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00F9",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01E8,
- },
- [0xE01E9]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00FA",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01E9,
- },
- [0xE01EA]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00FB",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01EA,
- },
- [0xE01EB]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00FC",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01EB,
- },
- [0xE01EC]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00FD",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01EC,
- },
- [0xE01ED]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00FE",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01ED,
- },
- [0xE01EE]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x00FF",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01EE,
- },
- [0xE01EF]={
- category="mn",
- cjkwd="a",
- description="VARIATION SELECTOR-0x0100",
- direction="nsm",
- linebreak="cm",
- unicodeslot=0xE01EF,
- },
}
diff --git a/Master/texmf-dist/tex/context/base/char-enc.lua b/Master/texmf-dist/tex/context/base/mkiv/char-enc.lua
index c2061891ad4..c2061891ad4 100644
--- a/Master/texmf-dist/tex/context/base/char-enc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/char-enc.lua
diff --git a/Master/texmf-dist/tex/context/base/char-enc.mkiv b/Master/texmf-dist/tex/context/base/mkiv/char-enc.mkiv
index 86ab2591a41..86ab2591a41 100644
--- a/Master/texmf-dist/tex/context/base/char-enc.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/char-enc.mkiv
diff --git a/Master/texmf-dist/tex/context/base/char-ent.lua b/Master/texmf-dist/tex/context/base/mkiv/char-ent.lua
index e48856a8440..e48856a8440 100644
--- a/Master/texmf-dist/tex/context/base/char-ent.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/char-ent.lua
diff --git a/Master/texmf-dist/tex/context/base/char-fio.lua b/Master/texmf-dist/tex/context/base/mkiv/char-fio.lua
index ab255593575..ab255593575 100644
--- a/Master/texmf-dist/tex/context/base/char-fio.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/char-fio.lua
diff --git a/Master/texmf-dist/tex/context/base/char-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/char-ini.lua
index 4559fa28c49..ad53cae8f34 100644
--- a/Master/texmf-dist/tex/context/base/char-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/char-ini.lua
@@ -12,7 +12,7 @@ if not modules then modules = { } end modules ['char-ini'] = {
-- we can remove the tag range starting at 0xE0000 (special applications)
local utfchar, utfbyte, utfvalues, ustring, utotable = utf.char, utf.byte, utf.values, utf.ustring, utf.totable
-local concat, unpack, tohash = table.concat, table.unpack, table.tohash
+local concat, unpack, tohash, insert = table.concat, table.unpack, table.tohash, table.insert
local next, tonumber, type, rawget, rawset = next, tonumber, type, rawget, rawset
local format, lower, gsub = string.format, string.lower, string.gsub
local P, R, S, Cs = lpeg.P, lpeg.R, lpeg.S, lpeg.Cs
@@ -128,7 +128,7 @@ setmetatableindex(data, function(t,k)
if k >= rr.first and k <= rr.last then
local extender = rr.extender
if extender then
- local v = extender(k,v)
+ local v = extender(k)
t[k] = v
return v
end
@@ -138,10 +138,51 @@ setmetatableindex(data, function(t,k)
return private -- handy for when we loop over characters in fonts and check for a property
end)
+local variant_selector_metatable = {
+ category = "mn",
+ cjkwd = "a",
+ direction = "nsm",
+ linebreak = "cm",
+}
+
+-- This saves a bit of memory and also serves as example.
+
+local f_variant = string.formatters["VARIATION SELECTOR-0x%04X"]
+
+insert(characters.ranges,{
+ first = 0xFE00,
+ last = 0xFE0F,
+ name = "variant selector",
+ extender = function(k)
+ local t = {
+ description = f_variant(k - 0xFE00 + 0x0001),
+ unicodeslot = k,
+ }
+ setmetatable(t,variant_selector_metatable)
+ return t
+ end,
+})
+
+insert(characters.ranges,{
+ first = 0xE0100,
+ last = 0xE01EF,
+ name = "variant selector extension",
+ extender = function(k)
+ local t = {
+ description = f_variant(k - 0xE0100 + 0x0011),
+ unicodeslot = k,
+ }
+ setmetatable(t,variant_selector_metatable)
+ return t
+ end,
+})
+
local blocks = allocate {
["aegeannumbers"] = { first = 0x10100, last = 0x1013F, description = "Aegean Numbers" },
+ ["ahom"] = { first = 0x11700, last = 0x1173F, description = "Ahom" },
["alchemicalsymbols"] = { first = 0x1F700, last = 0x1F77F, description = "Alchemical Symbols" },
["alphabeticpresentationforms"] = { first = 0x0FB00, last = 0x0FB4F, otf="latn", description = "Alphabetic Presentation Forms" },
+ ["anatolianhieroglyphs"] = { first = 0x14400, last = 0x1467F, description = "Anatolian Hieroglyphs" },
["ancientgreekmusicalnotation"] = { first = 0x1D200, last = 0x1D24F, otf="grek", description = "Ancient Greek Musical Notation" },
["ancientgreeknumbers"] = { first = 0x10140, last = 0x1018F, otf="grek", description = "Ancient Greek Numbers" },
["ancientsymbols"] = { first = 0x10190, last = 0x101CF, otf="grek", description = "Ancient Symbols" },
@@ -175,6 +216,7 @@ local blocks = allocate {
["chakma"] = { first = 0x11100, last = 0x1114F, description = "Chakma" },
["cham"] = { first = 0x0AA00, last = 0x0AA5F, description = "Cham" },
["cherokee"] = { first = 0x013A0, last = 0x013FF, otf="cher", description = "Cherokee" },
+ ["cherokeesupplement"] = { first = 0x0AB70, last = 0x0ABBF, description = "Cherokee Supplement" },
["cjkcompatibility"] = { first = 0x03300, last = 0x033FF, otf="hang", description = "CJK Compatibility" },
["cjkcompatibilityforms"] = { first = 0x0FE30, last = 0x0FE4F, otf="hang", description = "CJK Compatibility Forms" },
["cjkcompatibilityideographs"] = { first = 0x0F900, last = 0x0FAFF, otf="hang", description = "CJK Compatibility Ideographs" },
@@ -187,6 +229,7 @@ local blocks = allocate {
["cjkunifiedideographsextensionb"] = { first = 0x20000, last = 0x2A6DF, otf="hang", description = "CJK Unified Ideographs Extension B" },
["cjkunifiedideographsextensionc"] = { first = 0x2A700, last = 0x2B73F, description = "CJK Unified Ideographs Extension C" },
["cjkunifiedideographsextensiond"] = { first = 0x2B740, last = 0x2B81F, description = "CJK Unified Ideographs Extension D" },
+ ["cjkunifiedideographsextensione"] = { first = 0x2B820, last = 0x2CEAF, description = "CJK Unified Ideographs Extension E" },
["combiningdiacriticalmarks"] = { first = 0x00300, last = 0x0036F, description = "Combining Diacritical Marks" },
["combiningdiacriticalmarksextended"] = { first = 0x01AB0, last = 0x01AFF, description = "Combining Diacritical Marks Extended" },
["combiningdiacriticalmarksforsymbols"] = { first = 0x020D0, last = 0x020FF, description = "Combining Diacritical Marks for Symbols" },
@@ -236,6 +279,7 @@ local blocks = allocate {
["dingbats"] = { first = 0x02700, last = 0x027BF, description = "Dingbats" },
["dominotiles"] = { first = 0x1F030, last = 0x1F09F, description = "Domino Tiles" },
["duployan"] = { first = 0x1BC00, last = 0x1BC9F, description = "Duployan" },
+ ["earlydynasticcuneiform"] = { first = 0x12480, last = 0x1254F, description = "Early Dynastic Cuneiform" },
["egyptianhieroglyphs"] = { first = 0x13000, last = 0x1342F, description = "Egyptian Hieroglyphs" },
["elbasan"] = { first = 0x10500, last = 0x1052F, description = "Elbasan" },
["emoticons"] = { first = 0x1F600, last = 0x1F64F, description = "Emoticons" },
@@ -248,8 +292,7 @@ local blocks = allocate {
["ethiopicextendeda"] = { first = 0x0AB00, last = 0x0AB2F, description = "Ethiopic Extended-A" },
["ethiopicsupplement"] = { first = 0x01380, last = 0x0139F, otf="ethi", description = "Ethiopic Supplement" },
["generalpunctuation"] = { first = 0x02000, last = 0x0206F, description = "General Punctuation" },
- ["geometricshapes"] = { first = 0x025A0, last = 0x025FF, description = "Geometric Shapes" },
- ["geometricshapes"] = { first = 0x025A0, last = 0x025FF, math = true },
+ ["geometricshapes"] = { first = 0x025A0, last = 0x025FF, math = true, description = "Geometric Shapes" },
["geometricshapesextended"] = { first = 0x1F780, last = 0x1F7FF, description = "Geometric Shapes Extended" },
["georgian"] = { first = 0x010A0, last = 0x010FF, otf="geor", description = "Georgian" },
["georgiansupplement"] = { first = 0x02D00, last = 0x02D2F, otf="geor", description = "Georgian Supplement" },
@@ -267,6 +310,7 @@ local blocks = allocate {
["hanguljamoextendedb"] = { first = 0x0D7B0, last = 0x0D7FF, description = "Hangul Jamo Extended-B" },
["hangulsyllables"] = { first = 0x0AC00, last = 0x0D7AF, otf="hang", description = "Hangul Syllables" },
["hanunoo"] = { first = 0x01720, last = 0x0173F, otf="hano", description = "Hanunoo" },
+ ["hatran"] = { first = 0x108E0, last = 0x108FF, description = "Hatran" },
["hebrew"] = { first = 0x00590, last = 0x005FF, otf="hebr", description = "Hebrew" },
["highprivateusesurrogates"] = { first = 0x0DB80, last = 0x0DBFF, description = "High Private Use Surrogates" },
["highsurrogates"] = { first = 0x0D800, last = 0x0DB7F, description = "High Surrogates" },
@@ -299,8 +343,7 @@ local blocks = allocate {
["latinextendede"] = { first = 0x0AB30, last = 0x0AB6F, description = "Latin Extended-E" },
["latinsupplement"] = { first = 0x00080, last = 0x000FF, otf="latn", description = "Latin-1 Supplement" },
["lepcha"] = { first = 0x01C00, last = 0x01C4F, description = "Lepcha" },
- ["letterlikesymbols"] = { first = 0x02100, last = 0x0214F, description = "Letterlike Symbols" },
- ["letterlikesymbols"] = { first = 0x02100, last = 0x0214F, math = true },
+ ["letterlikesymbols"] = { first = 0x02100, last = 0x0214F, math = true, description = "Letterlike Symbols" },
["limbu"] = { first = 0x01900, last = 0x0194F, otf="limb", description = "Limbu" },
["lineara"] = { first = 0x10600, last = 0x1077F, description = "Linear A" },
["linearbideograms"] = { first = 0x10080, last = 0x100FF, otf="linb", description = "Linear B Ideograms" },
@@ -352,6 +395,7 @@ local blocks = allocate {
["modifiertoneletters"] = { first = 0x0A700, last = 0x0A71F, description = "Modifier Tone Letters" },
["mongolian"] = { first = 0x01800, last = 0x018AF, otf="mong", description = "Mongolian" },
["mro"] = { first = 0x16A40, last = 0x16A6F, description = "Mro" },
+ ["multani"] = { first = 0x11280, last = 0x112AF, description = "Multani" },
["musicalsymbols"] = { first = 0x1D100, last = 0x1D1FF, otf="musc", description = "Musical Symbols" },
["myanmar"] = { first = 0x01000, last = 0x0109F, otf="mymr", description = "Myanmar" },
["myanmarextendeda"] = { first = 0x0AA60, last = 0x0AA7F, description = "Myanmar Extended-A" },
@@ -362,6 +406,7 @@ local blocks = allocate {
["numberforms"] = { first = 0x02150, last = 0x0218F, description = "Number Forms" },
["ogham"] = { first = 0x01680, last = 0x0169F, otf="ogam", description = "Ogham" },
["olchiki"] = { first = 0x01C50, last = 0x01C7F, description = "Ol Chiki" },
+ ["oldhungarian"] = { first = 0x10C80, last = 0x10CFF, description = "Old Hungarian" },
["olditalic"] = { first = 0x10300, last = 0x1032F, otf="ital", description = "Old Italic" },
["oldnortharabian"] = { first = 0x10A80, last = 0x10A9F, description = "Old North Arabian" },
["oldpermic"] = { first = 0x10350, last = 0x1037F, description = "Old Permic" },
@@ -406,8 +451,10 @@ local blocks = allocate {
["supplementalarrowsc"] = { first = 0x1F800, last = 0x1F8FF, math = true, description = "Supplemental Arrows-C" },
["supplementalmathematicaloperators"] = { first = 0x02A00, last = 0x02AFF, math = true, description = "Supplemental Mathematical Operators" },
["supplementalpunctuation"] = { first = 0x02E00, last = 0x02E7F, description = "Supplemental Punctuation" },
+ ["supplementalsymbolsandpictographs"] = { first = 0x1F900, last = 0x1F9FF, description = "Supplemental Symbols and Pictographs" },
["supplementaryprivateuseareaa"] = { first = 0xF0000, last = 0xFFFFF, description = "Supplementary Private Use Area-A" },
["supplementaryprivateuseareab"] = { first = 0x100000,last = 0x10FFFF, description = "Supplementary Private Use Area-B" },
+ ["suttonsignwriting"] = { first = 0x1D800, last = 0x1DAAF, description = "Sutton SignWriting" },
["sylotinagri"] = { first = 0x0A800, last = 0x0A82F, otf="sylo", description = "Syloti Nagri" },
["syriac"] = { first = 0x00700, last = 0x0074F, otf="syrc", description = "Syriac" },
["tagalog"] = { first = 0x01700, last = 0x0171F, otf="tglg", description = "Tagalog" },
@@ -715,20 +762,27 @@ table we derive a few more.</p>
if not characters.fallbacks then
- characters.fallbacks = { } -- not than many
-
- local fallbacks = characters.fallbacks
+ characters.fallbacks = {
+ [0x0308] = 0x00A8, [0x00A8] = 0x0308, -- dieresiscmb dieresis
+ [0x0304] = 0x00AF, [0x00AF] = 0x0304, -- macroncmb macron
+ [0x0301] = 0x00B4, [0x00B4] = 0x0301, -- acutecomb acute
+ [0x0327] = 0x00B8, [0x00B8] = 0x0327, -- cedillacmb cedilla
+ [0x0302] = 0x02C6, [0x02C6] = 0x0302, -- circumflexcmb circumflex
+ [0x030C] = 0x02C7, [0x02C7] = 0x030C, -- caroncmb caron
+ [0x0306] = 0x02D8, [0x02D8] = 0x0306, -- brevecmb breve
+ [0x0307] = 0x02D9, [0x02D9] = 0x0307, -- dotaccentcmb dotaccent
+ [0x030A] = 0x02DA, [0x02DA] = 0x030A, -- ringcmb ring
+ [0x0328] = 0x02DB, [0x02DB] = 0x0328, -- ogonekcmb ogonek
+ [0x0303] = 0x02DC, [0x02DC] = 0x0303, -- tildecomb tilde
+ [0x030B] = 0x02DD, [0x02DD] = 0x030B, -- hungarumlautcmb hungarumlaut
+ [0x0305] = 0x203E, [0x203E] = 0x0305, -- overlinecmb overline
+ [0x0300] = 0x0060, [0x0060] = 0x0333, -- gravecomb grave
+ }
- for k, d in next, data do
- local specials = d.specials
- if specials and specials[1] == "compat" and specials[2] == 0x0020 then
- local s = specials[3]
- if s then
- fallbacks[k] = s
- fallbacks[s] = k
- end
- end
- end
+ -- not done (would mess up mapping):
+ --
+ -- 0X0301/0X0384 0X0314/0X1FFE 0X0313/0X1FBD 0X0313/0X1FBF 0X0342/0X1FC0
+ -- 0X3099/0X309B 0X309A/0X309C 0X0333/0X2017 0X0345/0X037A
end
@@ -1286,22 +1340,11 @@ if not characters.superscripts then
if storage then
storage.register("characters/superscripts", superscripts, "characters.superscripts")
storage.register("characters/subscripts", subscripts, "characters.subscripts")
- storage.register("characters/fractions", fractions, "characters.fractions")
+ storage.register("characters/fractions", fractions, "characters.fractions")
end
end
--- for the moment only a few
-
-local tracedchars = utilities.strings.tracers
-
-tracedchars[0x00] = "[signal]"
-tracedchars[0x0A] = "[linefeed]"
-tracedchars[0x0B] = "[tab]"
-tracedchars[0x0C] = "[formfeed]"
-tracedchars[0x0D] = "[return]"
-tracedchars[0x20] = "[space]"
-
function characters.showstring(str)
local list = utotable(str)
for i=1,#list do
diff --git a/Master/texmf-dist/tex/context/base/char-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/char-ini.mkiv
index 95ff7af5a43..8f5a8da8fc8 100644
--- a/Master/texmf-dist/tex/context/base/char-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/char-ini.mkiv
@@ -45,6 +45,11 @@
\def\utfchar #1{\clf_utfchar \numexpr#1\relax}
\def\safechar#1{\clf_safechar\numexpr#1\relax}
+\unexpanded\def\Ux #1{\Uchar\numexpr"#1\relax} % used in xml
+ \def\eUx#1{\Uchar\numexpr"#1\relax} % used in xml
+
+\unexpanded\def\expandUx{\let\Ux\eUx}
+
\def\checkedchar {\relax\ifmmode\expandafter\checkedmathchar\else\expandafter\checkedtextchar\fi} % #1#2
\def\checkedmathchar#1#2{#2}
%def\checkedtextchar #1{\iffontchar\font#1 \expandafter\firstoftwoarguments\else\expandafter\secondoftwoarguments\fi{\char#1}}
@@ -58,7 +63,7 @@
\else\iffontchar\font#1\relax
\char#1\relax
\else
- $\char#1$%
+ \normalstartimath\char#1\normalstopimath
\fi\fi}
%D The codes are stored in the format, so we don't need to reinitialize
@@ -90,4 +95,13 @@
\def\chardescription#1{\clf_chardescription#1\relax}
+% experiment (watch out: this is global and very font dependent when used with
+% casing mechanisms)
+%
+% \overloaduppercase{0xDF}{0x1E9E}}
+% \overloaduppercase{0xDF}{0x53,0x53}
+
+\unexpanded\def\overloaduppercase{\clf_overloaduppercase}
+\unexpanded\def\overloadlowercase{\clf_overloadlowercase}
+
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/char-map.lua b/Master/texmf-dist/tex/context/base/mkiv/char-map.lua
index 749da5289bd..749da5289bd 100644
--- a/Master/texmf-dist/tex/context/base/char-map.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/char-map.lua
diff --git a/Master/texmf-dist/tex/context/base/char-tex.lua b/Master/texmf-dist/tex/context/base/mkiv/char-tex.lua
index 2093c6d6c68..60f324be2b2 100644
--- a/Master/texmf-dist/tex/context/base/char-tex.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/char-tex.lua
@@ -23,7 +23,6 @@ local mark = utilities.storage.mark
local context = context
local commands = commands
-local implement = interfaces.implement
local characters = characters
local texcharacters = { }
@@ -281,7 +280,7 @@ local commandmapping = allocate {
["l"] = "Å‚", ["L"] = "Å",
["o"] = "ø", ["O"] = "Ø",
["oe"] = "Å“", ["OE"] = "Å’",
- ["sz"] = "ß", ["SZ"] = "SZ", ["ss"] = "ß", ["SS"] = "ß",
+ ["sz"] = "ß", ["SZ"] = "SZ", ["ss"] = "ß", ["SS"] = "ß", -- uppercase: ẞ
}
texcharacters.commandmapping = commandmapping
@@ -419,6 +418,10 @@ end
-- all kind of initializations
+if not interfaces then return end
+
+local implement = interfaces.implement
+
local tex = tex
local texsetlccode = tex.setlccode
local texsetuccode = tex.setuccode
@@ -774,3 +777,46 @@ end
implement { name = "setlettercatcodes", scope = "private", actions = characters.setlettercatcodes, arguments = "integer" }
implement { name = "setactivecatcodes", scope = "private", actions = characters.setactivecatcodes, arguments = "integer" }
--------- { name = "setcharactercodes", scope = "private", actions = characters.setcodes }
+
+-- experiment (some can move to char-ini.lua)
+
+local function overload(c,u,code,codes)
+ local c = tonumber(c)
+ if not c then
+ return
+ end
+ local u = utilities.parsers.settings_to_array(u)
+ local n = #u
+ if n == 0 then
+ return
+ end
+ local t = nil
+ if n == 1 then
+ t = tonumber(u[1])
+ else
+ t = { }
+ for i=1,n do
+ t[#t+1] = tonumber(u[i])
+ end
+ end
+ if t then
+ data[c][code] = t
+ characters[codes][c] = nil
+ end
+end
+
+interfaces.implement {
+ name = "overloaduppercase",
+ arguments = { "string", "string" },
+ actions = function(c,u)
+ overload(c,u,"uccode","uccodes")
+ end
+}
+
+interfaces.implement {
+ name = "overloadlowercase",
+ arguments = { "string", "string" },
+ actions = function(c,u)
+ overload(c,u,"lccode","lccodes")
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/char-utf.lua b/Master/texmf-dist/tex/context/base/mkiv/char-utf.lua
index 381602ededb..327529c32b6 100644
--- a/Master/texmf-dist/tex/context/base/char-utf.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/char-utf.lua
@@ -166,7 +166,7 @@ characters.decomposed = decomposed
-- characters.initialize = function() end -- when used outside tex
-- end
-local function initialize()
+local function initialize() -- maybe in tex mode store in format !
local data = characters.data
local function backtrack(v,last,target)
local vs = v.specials
@@ -177,6 +177,22 @@ local function initialize()
backtrack(data[one],second,target)
end
end
+ local function setpair(one,two,unicode,first,second,combination)
+ local mps = mathpairs[one]
+ if not mps then
+ mps = { [two] = unicode }
+ mathpairs[one] = mps
+ else
+ mps[two] = unicode
+ end
+ local mps = mathpairs[first]
+ if not mps then
+ mps = { [second] = combination }
+ mathpairs[first] = mps
+ else
+ mps[second] = combination
+ end
+ end
for unicode, v in next, data do
local vs = v.specials
if vs and #vs == 3 and vs[1] == "char" then
@@ -196,22 +212,15 @@ local function initialize()
end
--
if v.mathclass or v.mathspec then
- local mps = mathpairs[two]
- if not mps then
- mps = { [one] = unicode }
- mathpairs[two] = mps
- else
- mps[one] = unicode -- here unicode
- end
- local mps = mathpairs[second]
- if not mps then
- mps = { [first] = combination }
- mathpairs[second] = mps
- else
- mps[first] = combination
- end
+ setpair(two,one,unicode,second,first,combination) -- watch order
end
end
+ local mp = v.mathpair
+ if mp then
+ local one, two = mp[1], mp[2]
+ local first, second, combination = utfchar(one), utfchar(two), utfchar(unicode)
+ setpair(one,two,unicode,first,second,combination)
+ end
end
initialize = false
characters.initialize = function() end
diff --git a/Master/texmf-dist/tex/context/base/char-utf.mkiv b/Master/texmf-dist/tex/context/base/mkiv/char-utf.mkiv
index fe9f402ef23..fe9f402ef23 100644
--- a/Master/texmf-dist/tex/context/base/char-utf.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/char-utf.mkiv
diff --git a/Master/texmf-dist/tex/context/base/chem-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/chem-ini.lua
index f7d10ffa272..f7d10ffa272 100644
--- a/Master/texmf-dist/tex/context/base/chem-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/chem-ini.lua
diff --git a/Master/texmf-dist/tex/context/base/chem-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/chem-ini.mkiv
index 9a44b4f1aee..d18ba47a10a 100644
--- a/Master/texmf-dist/tex/context/base/chem-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/chem-ini.mkiv
@@ -10,12 +10,16 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% todo: \mathscriptsmode
+
\writestatus{loading}{ConTeXt Chemistry Macros / Initialization} % might become Inline
\registerctxluafile{chem-ini}{1.001}
\unprotect
+% todo: use \mathscriptsmode if needed
+
%D \macros
%D {molecule}
%D
diff --git a/Master/texmf-dist/tex/context/base/chem-str.lua b/Master/texmf-dist/tex/context/base/mkiv/chem-str.lua
index d724394bb1d..e90464ad2ed 100644
--- a/Master/texmf-dist/tex/context/base/chem-str.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/chem-str.lua
@@ -234,6 +234,7 @@ local syntax = {
space = { direct = 'chem_symbol("\\chemicalsymbol[space]");' },
plus = { direct = 'chem_symbol("\\chemicalsymbol[plus]");' },
minus = { direct = 'chem_symbol("\\chemicalsymbol[minus]");' },
+ equals = { direct = 'chem_symbol("\\chemicalsymbol[equals]");' },
gives = { direct = formatters['chem_symbol("\\chemicalsymbol[gives]{%s}{%s}");'], arguments = 2 },
equilibrium = { direct = formatters['chem_symbol("\\chemicalsymbol[equilibrium]{%s}{%s}");'], arguments = 2 },
mesomeric = { direct = formatters['chem_symbol("\\chemicalsymbol[mesomeric]{%s}{%s}");'], arguments = 2 },
@@ -846,17 +847,22 @@ implement {
}
-- todo: top / bottom
--- maybe add "=" for double and "≡" for triple?
+-- note that "<->" here differs from ppchtex
local inline = {
- ["single"] = "\\chemicalsinglebond", ["-"] = "\\chemicalsinglebond",
- ["double"] = "\\chemicaldoublebond", ["--"] = "\\chemicaldoublebond",
- ["triple"] = "\\chemicaltriplebond", ["---"] = "\\chemicaltriplebond",
- ["gives"] = "\\chemicalgives", ["->"] = "\\chemicalgives",
- ["equilibrium"] = "\\chemicalequilibrium", ["<->"] = "\\chemicalequilibrium",
- ["mesomeric"] = "\\chemicalmesomeric", ["<>"] = "\\chemicalmesomeric",
- ["plus"] = "\\chemicalplus", ["+"] = "\\chemicalplus",
+ ["single"] = "\\chemicalsinglebond", ["-"] = "\\chemicalsinglebond",
+ ["double"] = "\\chemicaldoublebond", ["--"] = "\\chemicaldoublebond",
+ ["="] = "\\chemicaldoublebond",
+ ["triple"] = "\\chemicaltriplebond", ["---"] = "\\chemicaltriplebond",
+ ["≡"] = "\\chemicaltriplebond",
+ ["gives"] = "\\chemicalgives", ["->"] = "\\chemicalgives",
+ ["equilibrium"] = "\\chemicalequilibrium", ["<-->"] = "\\chemicalequilibrium",
+ ["<=>"] = "\\chemicalequilibrium",
+ ["mesomeric"] = "\\chemicalmesomeric", ["<>"] = "\\chemicalmesomeric",
+ ["<->"] = "\\chemicalmesomeric",
+ ["plus"] = "\\chemicalplus", ["+"] = "\\chemicalplus",
["minus"] = "\\chemicalminus",
+ ["equals"] = "\\chemicalequals",
["space"] = "\\chemicalspace",
}
diff --git a/Master/texmf-dist/tex/context/base/chem-str.mkiv b/Master/texmf-dist/tex/context/base/mkiv/chem-str.mkiv
index f18b422f266..a0b0a932734 100644
--- a/Master/texmf-dist/tex/context/base/chem-str.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/chem-str.mkiv
@@ -54,9 +54,11 @@
\installcorenamespace{chemicalframed}
\installcorenamespace{chemicalsize}
-\installsimplecommandhandler \??chemical {chemical} \??chemical % no \define...
+% \installsimplecommandhandler \??chemical {chemical} \??chemical % no \define...
+\installcommandhandler \??chemical {chemical} \??chemical % no \define...
-\let\setupchemicals\setupchemical
+\let\setupchemicals \setupchemical
+\let\definechemicals\definechemical
%D We use a dedicated framed macro instead of inheriting one. This is both
%D a historical and practical reason (like shared keys with different meaning
@@ -142,7 +144,7 @@
{\dodoubleempty\chem_start}
\def\chem_start[#1][#2]%
- {\ifmmode\vcenter\else\vbox\fi
+ {\ifmmode\vcenter\else\vbox\fi % vpack ?
\bgroup
\synchronizestrut{\chemicalparameter\c!strut}%
\dontcomplain
@@ -159,7 +161,7 @@
{\edef\currentchemical{#1}}%
\fi\fi
\the\everystructurechemical
- \setbox\b_chem_result\hbox\bgroup
+ \setbox\b_chem_result\hpack\bgroup
\clf_startchemical
width {\chemicalparameter\c!width}%
height {\chemicalparameter\c!height}%
@@ -196,12 +198,12 @@
[\c!frame=\chemicalparameter\c!frame,
\c!rulethickness=\chemicalparameter\c!rulethickness,
\c!framecolor=\chemicalparameter\c!framecolor]%
- {\vbox{\box\b_chem_result\vss}}} % remove depth
+ {\vpack{\box\b_chem_result\vss}}} % remove depth
\unexpanded\def\chem_framed_nop
{\directlocalframed
[\??chemicalframed]%
- {\vbox{\box\b_chem_result\vss}}} % remove depth
+ {\vpack{\box\b_chem_result\vss}}} % remove depth
\let\startstructurechemical\startchemical
\let\stopstructurechemical \stopchemical
@@ -240,7 +242,7 @@
\ignorespaces}
\appendtoks
- \setbox\b_chem_result\hbox{\raise\MPlly\box\b_chem_result}%
+ \setbox\b_chem_result\hpack{\raise\MPlly\box\b_chem_result}%
\d_chem_width \wd\b_chem_result
\d_chem_height\ht\b_chem_result
\d_chem_depth \dp\b_chem_result
@@ -269,17 +271,17 @@
\to \everystructurechemical
\def\chem_add_texts
- {\setbox2\hbox to \d_chem_width{\strut\hss\hbox{\strut\m_chem_mid_text}\hss}%
- \setbox4\hbox to \d_chem_width{\strut\hss\hbox{\strut\m_chem_top_text}\hss}%
- \setbox6\hbox to \d_chem_width{\strut\hss\hbox{\strut\m_chem_bot_text}\hss}%
- \setbox\b_chem_result\hbox \bgroup
+ {\setbox2\hpack to \d_chem_width{\strut\hss\hbox{\strut\m_chem_mid_text}\hss}%
+ \setbox4\hpack to \d_chem_width{\strut\hss\hbox{\strut\m_chem_top_text}\hss}%
+ \setbox6\hpack to \d_chem_width{\strut\hss\hbox{\strut\m_chem_bot_text}\hss}%
+ \setbox\b_chem_result\hpack \bgroup
\box\b_chem_result
\hskip-\d_chem_width
- \raise\d_chem_height\hbox{\lower\ht4\box4}%
+ \raise\d_chem_height\hpack{\lower\ht4\box4}%
\hskip-\d_chem_width
\lower.5\dimexpr\ht2-\dp2\relax\box2%
\hskip-\d_chem_width
- \lower\d_chem_depth \hbox{\raise\dp6\box6}%
+ \lower\d_chem_depth \hpack{\raise\dp6\box6}%
\hss
\egroup} % text on top of chemicals
@@ -331,7 +333,7 @@
{\let\chem_box_visual_yes\hbox \let\chem_box_visual_nop\relax }
\def\chem_top_construct#1#2#3#4%
- {\hbox\bgroup
+ {\hpack\bgroup
\setstrut
\setbox\scratchboxone\chem_box_visual_yes{\strut#3}%
\setbox\scratchboxtwo\chem_box_visual_yes{\strut\molecule{#4}}%
@@ -342,7 +344,7 @@
\egroup}
\def\chem_bottom_construct#1#2#3#4%
- {\hbox\bgroup
+ {\hpack\bgroup
\setstrut
\setbox\scratchboxone\chem_box_visual_yes{\strut#3}%
\setbox\scratchboxtwo\chem_box_visual_yes{\strut\molecule{#4}}%
@@ -353,14 +355,14 @@
\egroup}
\unexpanded\def\chemicalleft#1#2% redundant boxes thanks to visual
- {\hbox\bgroup
+ {\hbox\bgroup % hpack ?
\setstrut
\llap{\chem_box_visual_nop{\strut#1}}%
\chem_box_visual_nop{\strut#2}%
\egroup}
\unexpanded\def\chemicalright#1#2% redundant boxes thanks to visual
- {\hbox\bgroup
+ {\hbox\bgroup % hpack ?
\setstrut
\chem_box_visual_yes{\strut#2}%
\rlap{\chem_box_visual_nop{\strut#1}}%
@@ -440,7 +442,7 @@
\unexpanded\def\chemicaloxidationseven{\chemicaloxidation\relax7}
\unexpanded\def\chemicalbar
- {\hbox \s!spread .5\emwidth \bgroup
+ {\hpack \s!spread .5\emwidth \bgroup
\hss
\vrule \s!height .9\strutht \s!depth .65\strutdp \s!width .1\exheight
\hss
@@ -538,17 +540,18 @@
\hbox{\usechemicalstyleandcolor\c!style\c!color\clf_inlinechemical{#1}}}
\unexpanded\def\chemicalbondrule
- {\hbox{\vrule\s!height.75\exheight\s!depth-\dimexpr.75\exheight-\linewidth\relax\s!width\emwidth\relax}}
+ {\hpack{\vrule\s!height.75\exheight\s!depth-\dimexpr.75\exheight-\linewidth\relax\s!width\emwidth\relax}}
\definechemicalsymbol[i:space] [\enspace\quad\enspace]
\definechemicalsymbol[i:plus] [\enspace\mathematics{+}\enspace]
\definechemicalsymbol[i:minus] [\enspace\mathematics{-}\enspace]
+\definechemicalsymbol[i:equals] [\enspace\mathematics{=}\enspace]
\definechemicalsymbol[i:gives] [\enspace\mathematics{\xrightarrow{}{}}\enspace]
\definechemicalsymbol[i:equilibrium] [\enspace\mathematics{\xrightoverleftarrow{}{}}\enspace]
\definechemicalsymbol[i:mesomeric] [\enspace\mathematics{\xleftrightarrow{}{}}\enspace]
\definechemicalsymbol[i:single] [\chemicalbondrule]
-\definechemicalsymbol[i:double] [\hbox{\lower.5ex\chemicalbondrule\hskip-1em\raise.5ex\chemicalbondrule}]
-\definechemicalsymbol[i:triple] [\hbox{\chemicalbondrule\hskip-1em\lower.5ex\chemicalbondrule\hskip-1em\raise.5ex\chemicalbondrule}]
+\definechemicalsymbol[i:double] [\hpack{\lower.5ex\chemicalbondrule\hskip-1em\raise.5ex\chemicalbondrule}]
+\definechemicalsymbol[i:triple] [\hpack{\chemicalbondrule\hskip-1em\lower.5ex\chemicalbondrule\hskip-1em\raise.5ex\chemicalbondrule}]
\unexpanded\def\chemicalsinglebond {\chemicalsymbol[i:single]}
\unexpanded\def\chemicaldoublebond {\chemicalsymbol[i:double]}
@@ -558,6 +561,7 @@
\unexpanded\def\chemicalequilibrium{\chemicalsymbol[i:equilibrium]}
\unexpanded\def\chemicalplus {\chemicalsymbol[i:plus]}
\unexpanded\def\chemicalminus {\chemicalsymbol[i:minus]}
+\unexpanded\def\chemicalequals {\chemicalsymbol[i:equals]}
\unexpanded\def\chemicalspace {\chemicalsymbol[i:space]}
\unexpanded\def\chemicalinline #1{#1}
@@ -608,18 +612,20 @@
\definechemicalsymbol[d:space] [\enspace\quad\enspace]
\definechemicalsymbol[d:plus] [\enspace+\enspace]
\definechemicalsymbol[d:minus] [\enspace-\enspace]
+\definechemicalsymbol[d:equals] [\enspace=\enspace]
\definechemicalsymbol[d:gives] [\rightarrowfill] % \chem_arrow_construct\xrightarrow
\definechemicalsymbol[d:equilibrium] [\rightoverleftarrowfill] % \chem_arrow_construct\xrightoverleftarrow
\definechemicalsymbol[d:mesomeric] [\leftarrowfill] % \chem_arrow_construct\xleftrightarrow
\definechemicalsymbol[d:single] [\chemicalbondrule]
-\definechemicalsymbol[d:double] [\hbox{\lower.5ex\chemicalbondrule\hskip-1em\raise.5ex\chemicalbondrule}]
-\definechemicalsymbol[d:triple] [\hbox{\chemicalbondrule\hskip-1em\lower.5ex\chemicalbondrule\hskip-1em\raise.5ex\chemicalbondrule}]
+\definechemicalsymbol[d:double] [\hpack{\lower.5ex\chemicalbondrule\hskip-1em\raise.5ex\chemicalbondrule}]
+\definechemicalsymbol[d:triple] [\hpack{\chemicalbondrule\hskip-1em\lower.5ex\chemicalbondrule\hskip-1em\raise.5ex\chemicalbondrule}]
\definechemicalsymbol[d:opencomplex] [\mathematics{\Bigg[}] % not yet ok
\definechemicalsymbol[d:closecomplex][\mathematics{\Bigg]}] % not yet ok
\definechemicalsymbol[d:SPACE] [{\chemicalsymbol[d:space]}]
\definechemicalsymbol[d:PLUS] [{\chemicalsymbol[d:plus]}]
\definechemicalsymbol[d:MINUS] [{\chemicalsymbol[d:minus]}]
+\definechemicalsymbol[d:EQUALS] [{\chemicalsymbol[d:equals]}]
\definechemicalsymbol[d:GIVES] [{\chemicalsymbol[d:gives]}]
\definechemicalsymbol[d:EQUILIBRIUM] [{\chemicalsymbol[d:equilibrium]}]
\definechemicalsymbol[d:MESOMERIC] [{\chemicalsymbol[d:mesomeric]}]
diff --git a/Master/texmf-dist/tex/context/base/cldf-bas.lua b/Master/texmf-dist/tex/context/base/mkiv/cldf-bas.lua
index 1067a17d57e..1067a17d57e 100644
--- a/Master/texmf-dist/tex/context/base/cldf-bas.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-bas.lua
diff --git a/Master/texmf-dist/tex/context/base/cldf-bas.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cldf-bas.mkiv
index f8b5b5d6a3c..f8b5b5d6a3c 100644
--- a/Master/texmf-dist/tex/context/base/cldf-bas.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-bas.mkiv
diff --git a/Master/texmf-dist/tex/context/base/cldf-com.lua b/Master/texmf-dist/tex/context/base/mkiv/cldf-com.lua
index bd357b712b2..bd357b712b2 100644
--- a/Master/texmf-dist/tex/context/base/cldf-com.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-com.lua
diff --git a/Master/texmf-dist/tex/context/base/cldf-com.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cldf-com.mkiv
index 49190988893..49190988893 100644
--- a/Master/texmf-dist/tex/context/base/cldf-com.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-com.mkiv
diff --git a/Master/texmf-dist/tex/context/base/cldf-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.lua
index da284ba5ead..0c39f72f55d 100644
--- a/Master/texmf-dist/tex/context/base/cldf-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.lua
@@ -6,6 +6,15 @@ if not modules then modules = { } end modules ['cldf-ini'] = {
license = "see context related readme files"
}
+-- also see cldf-tod.* !
+-- old code moved to cldf-old.lua
+
+-- maybe:
+--
+-- 0.528 local foo = tex.ctxcatcodes
+-- 0.651 local foo = getcount("ctxcatcodes")
+-- 0.408 local foo = getcount(ctxcatcodes) -- local ctxcatcodes = tex.iscount("ctxcatcodes")
+
-- This started as an experiment: generating context code at the lua end. After all
-- it is surprisingly simple to implement due to metatables. I was wondering if
-- there was a more natural way to deal with commands at the lua end. Of course it's
@@ -32,7 +41,7 @@ if not modules then modules = { } end modules ['cldf-ini'] = {
-- context(string.formatters["%!tex!"]("${}"))
-- context("%!tex!","${}")
-local format, validstring, stripstring = string.format, string.valid, string.strip
+local format, stripstring = string.format, string.strip
local next, type, tostring, tonumber, setmetatable, unpack, select, rawset = next, type, tostring, tonumber, setmetatable, unpack, select, rawset
local insert, remove, concat = table.insert, table.remove, table.concat
local lpegmatch, lpegC, lpegS, lpegP, lpegV, lpegCc, lpegCs, patterns = lpeg.match, lpeg.C, lpeg.S, lpeg.P, lpeg.V, lpeg.Cc, lpeg.Cs, lpeg.patterns
@@ -49,12 +58,15 @@ local interfaces = interfaces
local loaddata = io.loaddata
local tex = tex
-local texsprint = tex.sprint
-local texprint = tex.print
-local texwrite = tex.write
+local texsprint = tex.sprint -- just appended (no space,eol treatment)
+local texprint = tex.print -- each arg a separate line (not last in directlua)
+----- texwrite = tex.write -- all 'space' and 'character'
local texgetcount = tex.getcount
-local isnode = node.is_node -- after 0.65 just node.type
+-- local function texsprint(...) print("sprint",...) tex.sprint(...) end
+-- local function texprint (...) print("print", ...) tex.print (...) end
+
+local isnode = node.is_node
local writenode = node.write
local copynodelist = node.copy_list
@@ -67,9 +79,9 @@ local txtcatcodes = catcodenumbers.txtcatcodes
local vrbcatcodes = catcodenumbers.vrbcatcodes
local xmlcatcodes = catcodenumbers.xmlcatcodes
-local flush = texsprint
-local flushdirect = texprint
-local flushraw = texwrite
+local flush = texsprint -- snippets
+local flushdirect = texprint -- lines
+----- flushraw = texwrite
local report_context = logs.reporter("cld","tex")
local report_cld = logs.reporter("cld","stack")
@@ -181,7 +193,7 @@ local registerfunction, unregisterfunction, reservefunction, knownfunctions, cal
local f_resolve = nil
local p_resolve = ((1-lpegP("."))^1 / function(s) f_resolve = f_resolve[s] end * lpegP(".")^0)^1
- function resolvestoredfunction(str)
+ local function resolvestoredfunction(str)
f_resolve = global
lpegmatch(p_resolve,str)
return f_resolve
@@ -207,6 +219,7 @@ local registerfunction, unregisterfunction, reservefunction, knownfunctions, cal
local slot = slots[i]
local data = storedfunctions[slot]
luafunctions[slot] = function(...)
+ -- print(data) -- could be trace
return expose(slot,data,...)
end
end
@@ -311,7 +324,6 @@ local registerfunction, unregisterfunction, reservefunction, knownfunctions, cal
interfaces.storedscanners = interfaces.storedscanners or { }
local storedscanners = interfaces.storedscanners
-
storage.register("interfaces/storedscanners", storedscanners, "interfaces.storedscanners")
local interfacescanners = table.setmetatablenewindex(function(t,k,v)
@@ -474,17 +486,37 @@ local catcodes = {
xml = xmlcatcodes, xmlcatcodes = xmlcatcodes,
}
+-- maybe just increment / decrement
+
+-- local function pushcatcodes(c)
+-- insert(catcodestack,currentcatcodes)
+-- currentcatcodes = (c and catcodes[c] or tonumber(c)) or currentcatcodes
+-- contentcatcodes = currentcatcodes
+-- end
+--
+-- local function popcatcodes()
+-- currentcatcodes = remove(catcodestack) or currentcatcodes
+-- contentcatcodes = currentcatcodes
+-- end
+
+local catcodelevel = 0
+
local function pushcatcodes(c)
- insert(catcodestack,currentcatcodes)
+ catcodelevel = catcodelevel + 1
+ catcodestack[catcodelevel] = currentcatcodes
currentcatcodes = (c and catcodes[c] or tonumber(c)) or currentcatcodes
contentcatcodes = currentcatcodes
end
local function popcatcodes()
- currentcatcodes = remove(catcodestack) or currentcatcodes
+ if catcodelevel > 0 then
+ currentcatcodes = catcodestack[catcodelevel] or currentcatcodes
+ catcodelevel = catcodelevel - 1
+ end
contentcatcodes = currentcatcodes
end
+context.catcodes = catcodes
context.pushcatcodes = pushcatcodes
context.popcatcodes = popcatcodes
@@ -669,36 +701,25 @@ function context.printlines(str,raw) -- todo: see if via file is useable
end
end
--- This is the most reliable way to deal with nested buffers and other
--- catcode sensitive data.
-
-local methodhandler = resolvers.methodhandler
-
-function context.viafile(data,tag)
- if data and data ~= "" then
- local filename = resolvers.savers.byscheme("virtual",validstring(tag,"viafile"),data)
- -- context.startregime { "utf" }
- context.input(filename)
- -- context.stopregime()
- end
-end
-
-- -- -- "{" .. ti .. "}" is somewhat slower in a cld-mkiv run than "{",ti,"}"
local containseol = patterns.containseol
-local writer
+local writer = nil
+local prtwriter = nil
-if luafunctions then
+-- if luafunctions then
- writer = function (parent,command,first,...) -- already optimized before call
- local t = { first, ... }
+ writer = function (parent,command,...) -- already optimized before call
flush(currentcatcodes,command) -- todo: ctx|prt|texcatcodes
local direct = false
- for i=1,#t do
- local ti = t[i]
- local typ = type(ti)
+ -- local t = { ... }
+ -- for i=1,#t do
+ -- local ti = t[i]
+ for i=1,select("#",...) do
+ local ti = (select(i,...))
if direct then
+ local typ = type(ti)
if typ == "string" or typ == "number" then
flush(currentcatcodes,ti)
else -- node.write
@@ -709,208 +730,279 @@ if luafunctions then
-- nothing
elseif ti == "" then
flush(currentcatcodes,"{}")
- elseif typ == "string" then
- -- is processelines seen ?
- if processlines and lpegmatch(containseol,ti) then
- flush(currentcatcodes,"{")
- local flushlines = parent.__flushlines or flushlines
- flushlines(ti)
- flush(currentcatcodes,"}")
- elseif currentcatcodes == contentcatcodes then
+ else
+ local typ = type(ti)
+ if typ == "string" then
+ -- is processlines seen ?
+ if processlines and lpegmatch(containseol,ti) then
+ flush(currentcatcodes,"{")
+ local flushlines = parent.__flushlines or flushlines
+ flushlines(ti)
+ flush(currentcatcodes,"}")
+ elseif currentcatcodes == contentcatcodes then
+ flush(currentcatcodes,"{",ti,"}")
+ else
+ flush(currentcatcodes,"{")
+ flush(contentcatcodes,ti)
+ flush(currentcatcodes,"}")
+ end
+ elseif typ == "number" then
+ -- numbers never have funny catcodes
flush(currentcatcodes,"{",ti,"}")
- else
- flush(currentcatcodes,"{")
- flush(contentcatcodes,ti)
- flush(currentcatcodes,"}")
- end
- elseif typ == "number" then
- -- numbers never have funny catcodes
- flush(currentcatcodes,"{",ti,"}")
- elseif typ == "table" then
- local tn = #ti
- if tn == 0 then
- local done = false
- for k, v in next, ti do
- if done then
- if v == "" then
- flush(currentcatcodes,",",k,'=')
+ elseif typ == "table" then
+ local tn = #ti
+ if tn == 0 then
+ local done = false
+ for k, v in next, ti do
+ if done then
+ if v == "" then
+ flush(currentcatcodes,",",k,'=')
+ else
+ flush(currentcatcodes,",",k,"={",v,"}")
+ end
else
- flush(currentcatcodes,",",k,"={",v,"}")
+ if v == "" then
+ flush(currentcatcodes,"[",k,"=")
+ else
+ flush(currentcatcodes,"[",k,"={",v,"}")
+ end
+ done = true
end
+ end
+ if done then
+ flush(currentcatcodes,"]")
else
- if v == "" then
- flush(currentcatcodes,"[",k,"=")
- else
- flush(currentcatcodes,"[",k,"={",v,"}")
- end
- done = true
+ flush(currentcatcodes,"[]")
end
- end
- if done then
- flush(currentcatcodes,"]")
- else
- flush(currentcatcodes,"[]")
- end
- elseif tn == 1 then -- some 20% faster than the next loop
- local tj = ti[1]
- if type(tj) == "function" then
- flush(currentcatcodes,"[\\cldl",storefunction(tj),"]")
- else
- flush(currentcatcodes,"[",tj,"]")
- end
- else -- is concat really faster than flushes here? probably needed anyway (print artifacts)
- flush(currentcatcodes,"[")
- for j=1,tn do
- local tj = ti[j]
+ elseif tn == 1 then -- some 20% faster than the next loop
+ local tj = ti[1]
if type(tj) == "function" then
- if j == tn then
- flush(currentcatcodes,"\\cldl",storefunction(tj),"]")
- else
- flush(currentcatcodes,"\\cldl",storefunction(tj),",")
- end
+ flush(currentcatcodes,"[\\cldl",storefunction(tj),"]")
+ -- flush(currentcatcodes,"[",storefunction(tj),"]")
else
- if j == tn then
- flush(currentcatcodes,tj,"]")
+ flush(currentcatcodes,"[",tj,"]")
+ end
+ else -- is concat really faster than flushes here? probably needed anyway (print artifacts)
+ flush(currentcatcodes,"[")
+ for j=1,tn do
+ local tj = ti[j]
+ if type(tj) == "function" then
+ if j == tn then
+ flush(currentcatcodes,"\\cldl",storefunction(tj),"]")
+ -- flush(currentcatcodes,"",storefunction(tj),"]")
+ else
+ flush(currentcatcodes,"\\cldl",storefunction(tj),",")
+ -- flush(currentcatcodes,"",storefunction(tj),",")
+ end
else
- flush(currentcatcodes,tj,",")
+ if j == tn then
+ flush(currentcatcodes,tj,"]")
+ else
+ flush(currentcatcodes,tj,",")
+ end
end
end
end
- end
- elseif typ == "function" then
- flush(currentcatcodes,"{\\cldl ",storefunction(ti),"}") -- todo: ctx|prt|texcatcodes
- elseif typ == "boolean" then
- if ti then
- flushdirect(currentcatcodes,"\r")
+ elseif typ == "function" then
+ flush(currentcatcodes,"{\\cldl ",storefunction(ti),"}") -- todo: ctx|prt|texcatcodes
+ -- flush(currentcatcodes,"{",storefunction(ti),"}") -- todo: ctx|prt|texcatcodes
+ elseif typ == "boolean" then
+ if ti then
+ flushdirect(currentcatcodes,"\r")
+ else
+ direct = true
+ end
+ elseif typ == "thread" then
+ report_context("coroutines not supported as we cannot yield across boundaries")
+ elseif isnode(ti) then -- slow
+ flush(currentcatcodes,"{\\cldl",storenode(ti),"}")
+ -- flush(currentcatcodes,"{",storenode(ti),"}")
else
- direct = true
+ report_context("error: %a gets a weird argument %a",command,ti)
end
- elseif typ == "thread" then
- report_context("coroutines not supported as we cannot yield across boundaries")
- elseif isnode(ti) then -- slow
- flush(currentcatcodes,"{\\cldl",storenode(ti),"}")
- else
- report_context("error: %a gets a weird argument %a",command,ti)
end
end
end
-else
+ -- if performance really matters we can consider a compiler but it will never
+ -- pay off
- writer = function (parent,command,first,...) -- already optimized before call
- local t = { first, ... }
- flush(currentcatcodes,command) -- todo: ctx|prt|texcatcodes
- local direct = false
- for i=1,#t do
- local ti = t[i]
- local typ = type(ti)
- if direct then
- if typ == "string" or typ == "number" then
- flush(currentcatcodes,ti)
- else -- node.write
- report_context("error: invalid use of direct in %a, only strings and numbers can be flushed directly, not %a",command,typ)
- end
- direct = false
- elseif ti == nil then
+ prtwriter = function (command,...) -- already optimized before call
+ flush(prtcatcodes,command)
+ for i=1,select("#",...) do
+ local ti = (select(i,...))
+ if ti == nil then
-- nothing
elseif ti == "" then
- flush(currentcatcodes,"{}")
- elseif typ == "string" then
- -- is processelines seen ?
- if processlines and lpegmatch(containseol,ti) then
- flush(currentcatcodes,"{")
- local flushlines = parent.__flushlines or flushlines
- flushlines(ti)
- flush(currentcatcodes,"}")
- elseif currentcatcodes == contentcatcodes then
- flush(currentcatcodes,"{",ti,"}")
- else
- flush(currentcatcodes,"{")
- flush(contentcatcodes,ti)
- flush(currentcatcodes,"}")
- end
- elseif typ == "number" then
- -- numbers never have funny catcodes
- flush(currentcatcodes,"{",ti,"}")
- elseif typ == "table" then
- local tn = #ti
- if tn == 0 then
- local done = false
- for k, v in next, ti do
- if done then
- if v == "" then
- flush(currentcatcodes,",",k,'=')
- else
- flush(currentcatcodes,",",k,"={",v,"}")
- end
- else
- if v == "" then
- flush(currentcatcodes,"[",k,"=")
- else
- flush(currentcatcodes,"[",k,"={",v,"}")
- end
- done = true
- end
- end
- if done then
- flush(currentcatcodes,"]")
- else
- flush(currentcatcodes,"[]")
- end
- elseif tn == 1 then -- some 20% faster than the next loop
- local tj = ti[1]
- if type(tj) == "function" then
- flush(currentcatcodes,"[\\cldf{",storefunction(tj),"}]")
- else
- flush(currentcatcodes,"[",tj,"]")
- end
- else -- is concat really faster than flushes here? probably needed anyway (print artifacts)
- for j=1,tn do
- local tj = ti[j]
- if type(tj) == "function" then
- ti[j] = "\\cldf{" .. storefunction(tj) .. "}"
- end
- end
- flush(currentcatcodes,"[",concat(ti,","),"]")
- end
- elseif typ == "function" then
- flush(currentcatcodes,"{\\cldf{",storefunction(ti),"}}") -- todo: ctx|prt|texcatcodes
- elseif typ == "boolean" then
- if ti then
- flushdirect(currentcatcodes,"\r")
+ flush(prtcatcodes,"{}")
+ else
+ local tp = type(ti)
+ if tp == "string" or tp == "number"then
+ flush(prtcatcodes,"{",ti,"}")
+ elseif tp == "function" then
+ flush(prtcatcodes,"{\\cldl ",storefunction(ti),"}")
+ -- flush(currentcatcodes,"{",storefunction(ti),"}") -- todo: ctx|prt|texcatcodes
+ elseif isnode(ti) then
+ flush(prtcatcodes,"{\\cldl",storenode(ti),"}")
+ -- flush(currentcatcodes,"{",storenode(ti),"}")
else
- direct = true
+ report_context("fatal error: prt %a gets a weird argument %a",command,ti)
end
- elseif typ == "thread" then
- report_context("coroutines not supported as we cannot yield across boundaries")
- elseif isnode(ti) then -- slow
- flush(currentcatcodes,"{\\cldn{",storenode(ti),"}}")
- else
- report_context("error: %a gets a weird argument %a",command,ti)
end
end
end
-end
+-- else
+--
+-- writer = function (parent,command,first,...) -- already optimized before call
+-- local t = { first, ... }
+-- flush(currentcatcodes,command) -- todo: ctx|prt|texcatcodes
+-- local direct = false
+-- for i=1,#t do
+-- local ti = t[i]
+-- local typ = type(ti)
+-- if direct then
+-- if typ == "string" or typ == "number" then
+-- flush(currentcatcodes,ti)
+-- else -- node.write
+-- report_context("error: invalid use of direct in %a, only strings and numbers can be flushed directly, not %a",command,typ)
+-- end
+-- direct = false
+-- elseif ti == nil then
+-- -- nothing
+-- elseif ti == "" then
+-- flush(currentcatcodes,"{}")
+-- elseif typ == "string" then
+-- -- is processelines seen ?
+-- if processlines and lpegmatch(containseol,ti) then
+-- flush(currentcatcodes,"{")
+-- local flushlines = parent.__flushlines or flushlines
+-- flushlines(ti)
+-- flush(currentcatcodes,"}")
+-- elseif currentcatcodes == contentcatcodes then
+-- flush(currentcatcodes,"{",ti,"}")
+-- else
+-- flush(currentcatcodes,"{")
+-- flush(contentcatcodes,ti)
+-- flush(currentcatcodes,"}")
+-- end
+-- elseif typ == "number" then
+-- -- numbers never have funny catcodes
+-- flush(currentcatcodes,"{",ti,"}")
+-- elseif typ == "table" then
+-- local tn = #ti
+-- if tn == 0 then
+-- local done = false
+-- for k, v in next, ti do
+-- if done then
+-- if v == "" then
+-- flush(currentcatcodes,",",k,'=')
+-- else
+-- flush(currentcatcodes,",",k,"={",v,"}")
+-- end
+-- else
+-- if v == "" then
+-- flush(currentcatcodes,"[",k,"=")
+-- else
+-- flush(currentcatcodes,"[",k,"={",v,"}")
+-- end
+-- done = true
+-- end
+-- end
+-- if done then
+-- flush(currentcatcodes,"]")
+-- else
+-- flush(currentcatcodes,"[]")
+-- end
+-- elseif tn == 1 then -- some 20% faster than the next loop
+-- local tj = ti[1]
+-- if type(tj) == "function" then
+-- flush(currentcatcodes,"[\\cldf{",storefunction(tj),"}]")
+-- else
+-- flush(currentcatcodes,"[",tj,"]")
+-- end
+-- else -- is concat really faster than flushes here? probably needed anyway (print artifacts)
+-- for j=1,tn do
+-- local tj = ti[j]
+-- if type(tj) == "function" then
+-- ti[j] = "\\cldf{" .. storefunction(tj) .. "}"
+-- end
+-- end
+-- flush(currentcatcodes,"[",concat(ti,","),"]")
+-- end
+-- elseif typ == "function" then
+-- flush(currentcatcodes,"{\\cldf{",storefunction(ti),"}}") -- todo: ctx|prt|texcatcodes
+-- elseif typ == "boolean" then
+-- if ti then
+-- flushdirect(currentcatcodes,"\r")
+-- else
+-- direct = true
+-- end
+-- elseif typ == "thread" then
+-- report_context("coroutines not supported as we cannot yield across boundaries")
+-- elseif isnode(ti) then -- slow
+-- flush(currentcatcodes,"{\\cldn{",storenode(ti),"}}")
+-- else
+-- report_context("error: %a gets a weird argument %a",command,ti)
+-- end
+-- end
+-- end
+--
+-- end
-local generics = { } context.generics = generics
+local generics = { } context.generics = generics
+local indexer = nil
+local prtindexer = nil
-local function indexer(parent,k)
- if type(k) == "string" then
- local c = "\\" .. tostring(generics[k] or k)
- local f = function(first,...)
- if first == nil then
- flush(currentcatcodes,c)
- else
- return writer(parent,c,first,...)
+-- if environment.initex then
+
+ indexer = function(parent,k)
+ if type(k) == "string" then
+ local c = "\\" .. tostring(generics[k] or k)
+ local f = function(first,...)
+ if first == nil then
+ flush(currentcatcodes,c)
+ else
+ return writer(parent,c,first,...)
+ end
end
+ parent[k] = f
+ return f
+ else
+ return context -- catch
end
- parent[k] = f
- return f
- else
- return context -- catch
end
-end
+
+-- else
+--
+-- local create = token.create
+-- local twrite = token.write
+-- local setmacro = token.set_macro
+--
+-- indexer = function(parent,k)
+-- if type(k) == "string" then
+-- local s = tostring(generics[k] or k)
+-- local t = create(s)
+-- if t.cmdname == "undefined_cs" then
+-- report_cld("macro \\%s is not yet defined",s)
+-- token.set_macro(s,"")
+-- t = create(s)
+-- end
+-- local i = t.id
+-- local f = function(first,...)
+-- twrite(t.tok) --= we need to keep t uncollected
+-- if first ~= nil then
+-- return writer(parent,first,...)
+-- end
+-- end
+-- parent[k] = f
+-- return f
+-- else
+-- return context -- catch
+-- end
+-- end
+--
+-- end
-- Potential optimization: after the first call we know if there will be an
-- argument. Of course there is the side effect that for instance abuse like
@@ -945,33 +1037,54 @@ end
-- only for internal usage:
-function context.constructcsonly(k) -- not much faster than the next but more mem efficient
- local c = "\\" .. tostring(generics[k] or k)
- local v = function()
- flush(prtcatcodes,c)
- end
- rawset(context,k,v)
- return v
-end
+do
-function context.constructcs(k)
- local c = "\\" .. tostring(generics[k] or k)
- local v = function(first,...)
- if first == nil then
+ function context.constructcsonly(k) -- not much faster than the next but more mem efficient
+ local c = "\\" .. tostring(generics[k] or k)
+ local v = function()
flush(prtcatcodes,c)
- else
- return writer(context,c,first,...)
end
+ rawset(context,k,v) -- context namespace
+ return v
+ end
+
+ function context.constructcs(k)
+ local c = "\\" .. tostring(generics[k] or k)
+ local v = function(first,...)
+ if first == nil then
+ flush(prtcatcodes,c)
+ else
+ return prtwriter(c,first,...)
+ end
+ end
+ rawset(context,k,v) -- context namespace
+ return v
+ end
+
+ local function prtindexer(t,k)
+ local c = "\\" .. tostring(generics[k] or k)
+ local v = function(first,...)
+ if first == nil then
+ flush(prtcatcodes,c)
+ else
+ return prtwriter(c,first,...)
+ end
+ end
+ rawset(t,k,v) -- protected namespace
+ return v
end
- rawset(context,k,v)
- return v
+
+ context.protected = { } -- we could check for _ in the context namespace
+
+ setmetatable(context.protected, { __index = prtindexer, __call = prtwriter } )
+
end
-- local splitformatters = utilities.strings.formatters.new(true) -- not faster (yet)
local caller
-if luafunctions then
+-- if luafunctions then
caller = function(parent,f,a,...)
if not parent then
@@ -1002,6 +1115,7 @@ if luafunctions then
elseif typ == "function" then
-- ignored: a ...
flush(currentcatcodes,"{\\cldl",storefunction(f),"}") -- todo: ctx|prt|texcatcodes
+ -- flush(currentcatcodes,"{",storefunction(f),"}") -- todo: ctx|prt|texcatcodes
elseif typ == "boolean" then
if f then
if a ~= nil then
@@ -1023,6 +1137,7 @@ if luafunctions then
elseif isnode(f) then -- slow
-- writenode(f)
flush(currentcatcodes,"\\cldl",storenode(f)," ")
+ -- flush(currentcatcodes,"",storenode(f)," ")
else
report_context("error: %a gets a weird argument %a","context",f)
end
@@ -1031,71 +1146,72 @@ if luafunctions then
function context.flushnode(n)
flush(currentcatcodes,"\\cldl",storenode(n)," ")
+ -- flush(currentcatcodes,"",storenode(n)," ")
end
-else
-
- caller = function(parent,f,a,...)
- if not parent then
- -- so we don't need to test in the calling (slower but often no issue)
- elseif f ~= nil then
- local typ = type(f)
- if typ == "string" then
- if f == "" then
- -- new, can save a bit sometimes
- -- if trace_context then
- -- report_context("empty argument to context()")
- -- end
- elseif a then
- flush(contentcatcodes,formatters[f](a,...)) -- was currentcatcodes
- -- flush(contentcatcodes,splitformatters[f](a,...)) -- was currentcatcodes
- elseif processlines and lpegmatch(containseol,f) then
- local flushlines = parent.__flushlines or flushlines
- flushlines(f)
- else
- flush(contentcatcodes,f)
- end
- elseif typ == "number" then
- if a then
- flush(currentcatcodes,f,a,...)
- else
- flush(currentcatcodes,f)
- end
- elseif typ == "function" then
- -- ignored: a ...
- flush(currentcatcodes,"{\\cldf{",storefunction(f),"}}") -- todo: ctx|prt|texcatcodes
- elseif typ == "boolean" then
- if f then
- if a ~= nil then
- local flushlines = parent.__flushlines or flushlines
- flushlines(a)
- else
- flushdirect(currentcatcodes,"\n") -- no \r, else issues with \startlines ... use context.par() otherwise
- end
- else
- if a ~= nil then
- -- no command, same as context(a,...)
- writer(parent,"",a,...)
- else
- -- ignored
- end
- end
- elseif typ == "thread" then
- report_context("coroutines not supported as we cannot yield across boundaries")
- elseif isnode(f) then -- slow
- -- writenode(f)
- flush(currentcatcodes,"\\cldn{",storenode(f),"}")
- else
- report_context("error: %a gets a weird argument %a","context",f)
- end
- end
- end
-
- function context.flushnode(n)
- flush(currentcatcodes,"\\cldn{",storenode(n),"}")
- end
-
-end
+-- else
+--
+-- caller = function(parent,f,a,...)
+-- if not parent then
+-- -- so we don't need to test in the calling (slower but often no issue)
+-- elseif f ~= nil then
+-- local typ = type(f)
+-- if typ == "string" then
+-- if f == "" then
+-- -- new, can save a bit sometimes
+-- -- if trace_context then
+-- -- report_context("empty argument to context()")
+-- -- end
+-- elseif a then
+-- flush(contentcatcodes,formatters[f](a,...)) -- was currentcatcodes
+-- -- flush(contentcatcodes,splitformatters[f](a,...)) -- was currentcatcodes
+-- elseif processlines and lpegmatch(containseol,f) then
+-- local flushlines = parent.__flushlines or flushlines
+-- flushlines(f)
+-- else
+-- flush(contentcatcodes,f)
+-- end
+-- elseif typ == "number" then
+-- if a then
+-- flush(currentcatcodes,f,a,...)
+-- else
+-- flush(currentcatcodes,f)
+-- end
+-- elseif typ == "function" then
+-- -- ignored: a ...
+-- flush(currentcatcodes,"{\\cldf{",storefunction(f),"}}") -- todo: ctx|prt|texcatcodes
+-- elseif typ == "boolean" then
+-- if f then
+-- if a ~= nil then
+-- local flushlines = parent.__flushlines or flushlines
+-- flushlines(a)
+-- else
+-- flushdirect(currentcatcodes,"\n") -- no \r, else issues with \startlines ... use context.par() otherwise
+-- end
+-- else
+-- if a ~= nil then
+-- -- no command, same as context(a,...)
+-- writer(parent,"",a,...)
+-- else
+-- -- ignored
+-- end
+-- end
+-- elseif typ == "thread" then
+-- report_context("coroutines not supported as we cannot yield across boundaries")
+-- elseif isnode(f) then -- slow
+-- -- writenode(f)
+-- flush(currentcatcodes,"\\cldn{",storenode(f),"}")
+-- else
+-- report_context("error: %a gets a weird argument %a","context",f)
+-- end
+-- end
+-- end
+--
+-- function context.flushnode(n)
+-- flush(currentcatcodes,"\\cldn{",storenode(n),"}")
+-- end
+--
+-- end
local defaultcaller = caller
@@ -1154,12 +1270,14 @@ local trace_stack = { }
local normalflush = flush
local normalflushdirect = flushdirect
-local normalflushraw = flushraw
+----- normalflushraw = flushraw
local normalwriter = writer
local currenttrace = nil
local nofwriters = 0
local nofflushes = 0
+local tracingpermitted = true
+
local visualizer = lpeg.replacer {
{ "\n","<<newline>>" },
{ "\r","<<par>>" },
@@ -1180,15 +1298,24 @@ local tracedwriter = function(parent,...) -- also catcodes ?
local savedflush = flush
local savedflushdirect = flushdirect -- unlikely to be used here
local t, n = { "w : - : " }, 1
- local traced = function(normal,catcodes,...) -- todo: check for catcodes
+ local traced = function(catcodes,...) -- todo: check for catcodes
local s = concat({...})
s = lpegmatch(visualizer,s)
n = n + 1
t[n] = s
- normal(catcodes,...)
end
- flush = function(...) traced(normalflush, ...) end
- flushdirect = function(...) traced(normalflushdirect,...) end
+ flush = function(...)
+ normalflush(...)
+ if tracingpermitted then
+ traced(...)
+ end
+ end
+ flushdirect = function(...)
+ normalflushdirect(...)
+ if tracingpermitted then
+ traced(...)
+ end
+ end
normalwriter(parent,...)
flush = savedflush
flushdirect = savedflushdirect
@@ -1197,11 +1324,9 @@ end
-- we could reuse collapsed
-local traced = function(normal,one,two,...)
- nofflushes = nofflushes + 1
- if two then
+local traced = function(one,two,...)
+ if two ~= nil then
-- only catcodes if 'one' is number
- normal(one,two,...)
local catcodes = type(one) == "number" and one
local arguments = catcodes and { two, ... } or { one, two, ... }
local collapsed, c = { formatters["f : %s : "](catcodes or '-') }, 1
@@ -1218,9 +1343,8 @@ local traced = function(normal,one,two,...)
end
end
currenttrace(concat(collapsed))
- else
+ elseif one ~= nil then
-- no catcodes
- normal(one)
local argtype = type(one)
if argtype == "string" then
currenttrace(formatters["f : - : %s"](lpegmatch(visualizer,one)))
@@ -1232,8 +1356,29 @@ local traced = function(normal,one,two,...)
end
end
-local tracedflush = function(...) traced(normalflush, ...) end
-local tracedflushdirect = function(...) traced(normalflushdirect,...) end
+local tracedflush = function(one,two,...)
+ nofflushes = nofflushes + 1
+ if two ~= nil then
+ normalflush(one,two,...)
+ else
+ normalflush(one)
+ end
+ if tracingpermitted then
+ traced(one,two,...)
+ end
+end
+
+local tracedflushdirect = function(one,two,...)
+ nofflushes = nofflushes + 1
+ if two ~= nil then
+ normalflushdirect(one,two,...)
+ else
+ normalflushdirect(one)
+ end
+ if tracingpermitted then
+ traced(one,two,...)
+ end
+end
local function pushlogger(trace)
trace = trace or report_context
@@ -1307,6 +1452,94 @@ end
local trace_cld = false trackers.register("context.files", function(v) trace_cld = v end)
+do
+
+ -- This is the most reliable way to deal with nested buffers and other
+ -- catcode sensitive data.
+
+ local resolve = resolvers.savers.byscheme
+ local validstring = string.valid
+ local input = context.input
+
+ local function viafile(data,tag)
+ if data and data ~= "" then
+ local filename = resolve("virtual",validstring(tag,"viafile"),data)
+ -- context.startregime { "utf" }
+ input(filename)
+ -- context.stopregime()
+ end
+ end
+
+ context.viafile = viafile
+
+ -- experiment for xtables, don't use it elsewhere yet
+
+ local collected = nil
+ local nofcollected = 0
+ local sentinel = string.char(26) -- ASCII SUB character : endoffileasciicode : ignorecatcode
+ local level = 0
+
+ local function collect(c,...) -- can be optimized
+ -- snippets
+ for i=1,select("#",...) do
+ nofcollected = nofcollected + 1
+ collected[nofcollected] = (select(i,...))
+ end
+ end
+
+ -- local function collectdirect(c,...) -- can be optimized
+ -- -- lines
+ -- for i=1,select("#",...) do
+ -- n = n + 1
+ -- t[n] = (select(i,...))
+ -- n = n + 1
+ -- t[n] = "\r"
+ -- end
+ -- end
+
+ local collectdirect = collect
+ local permitted = true
+
+ -- doesn't work well with tracing do we need to avoid that when
+ -- collecting stuff
+
+ function context.startcollecting()
+ if level == 0 then
+ collected = { }
+ nofcollected = 0
+ --
+ flush = collect
+ flushdirect = collectdirect
+ permitted = tracingpermitted
+ --
+ context.__flush = flush
+ context.__flushdirect = flushdirect
+ end
+ level = level + 1
+ end
+
+ function context.stopcollecting()
+ level = level - 1
+ if level < 1 then
+ flush = normalflush
+ flushdirect = normalflushdirect
+ tracingpermitted = permitted
+ --
+ context.__flush = flush
+ context.__flushdirect = flushdirect
+ --
+ viafile(concat(collected,sentinel))
+ --
+ collected = nil
+ nofcollected = 0
+ level = 0
+ end
+ end
+
+end
+
+--
+
function context.runfile(filename)
local foundname = resolvers.findtexfile(file.addsuffix(filename,"cld")) or ""
if foundname ~= "" then
@@ -1407,7 +1640,7 @@ setmetatable(delayed, { __index = indexer, __call = caller } )
local nested = { } context.nested = nested -- creates strings
-local function indexer(parent,k)
+local function indexer(parent,k) -- not ok when traced
local f = function(...)
local t, savedflush, n = { }, flush, 0
flush = function(c,f,s,...) -- catcodes are ignored
@@ -1547,8 +1780,8 @@ local function caller(parent,f,a,...)
end
elseif typ == "function" then
-- ignored: a ...
--- flush(currentcatcodes,mpdrawing,"{\\cldf{",store_(f),"}}")
flush(currentcatcodes,mpdrawing,"{\\cldl",store_(f),"}")
+ -- flush(currentcatcodes,mpdrawing,"{",store_(f),"}")
elseif typ == "boolean" then
-- ignored: a ...
if f then
@@ -1608,6 +1841,12 @@ function context.concat(...)
context(concat(...))
end
+local p_texescape = patterns.texescape
+
+function context.escaped(s)
+ return lpegmatch(p_texescape,s) or s
+end
+
-- templates
local single = lpegP("%")
diff --git a/Master/texmf-dist/tex/context/base/cldf-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.mkiv
index 12ada138318..a985f204ed6 100644
--- a/Master/texmf-dist/tex/context/base/cldf-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.mkiv
@@ -33,15 +33,17 @@
% \zerocount removes as it's the default
-\def\cldf#1{\directlua{_cldf_(#1)}} % global (functions)
-\def\cldn#1{\directlua{_cldn_(#1)}} % global (nodes)
-
-\ifx\luafunction\undefined
- \def\luafunction#1{\directlua{_cldl_(#1)}}
-\fi
+% \def\cldf#1{\directlua{_cldf_(#1)}} % global (functions)
+% \def\cldn#1{\directlua{_cldn_(#1)}} % global (nodes)
+%
+% \ifx\luafunction\undefined
+% \def\luafunction#1{\directlua{_cldl_(#1)}}
+% \fi
\let\cldl\luafunction
+% \catcode`=\activecatcode \let\luafunction % saves 10% on the call
+
% \catcodetable\ctxcatcodes \catcode`^=\superscriptcatcode\catcode1=\activecatcode \global\let^^A=\cldf
% \catcodetable\ctxcatcodes \catcode`^=\superscriptcatcode\catcode2=\activecatcode \global\let^^B=\cldn
diff --git a/Master/texmf-dist/tex/context/base/cldf-int.lua b/Master/texmf-dist/tex/context/base/mkiv/cldf-int.lua
index 2743e49243b..2743e49243b 100644
--- a/Master/texmf-dist/tex/context/base/cldf-int.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-int.lua
diff --git a/Master/texmf-dist/tex/context/base/cldf-int.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cldf-int.mkiv
index da684694aee..da684694aee 100644
--- a/Master/texmf-dist/tex/context/base/cldf-int.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-int.mkiv
diff --git a/Master/texmf-dist/tex/context/base/cldf-prs.lua b/Master/texmf-dist/tex/context/base/mkiv/cldf-prs.lua
index 3c3836a3ee8..3c3836a3ee8 100644
--- a/Master/texmf-dist/tex/context/base/cldf-prs.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-prs.lua
diff --git a/Master/texmf-dist/tex/context/base/cldf-scn.lua b/Master/texmf-dist/tex/context/base/mkiv/cldf-scn.lua
index 5f7e0c74bbd..755d7fed7b3 100644
--- a/Master/texmf-dist/tex/context/base/cldf-scn.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-scn.lua
@@ -149,6 +149,8 @@ end
-- it's convenient to have copies here:
+interfaces.defined = tokens.defined
+
interfaces.setmacro = tokens.setters.macro
interfaces.setcount = tokens.setters.count
interfaces.setdimen = tokens.setters.dimen
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cldf-stp.lua b/Master/texmf-dist/tex/context/base/mkiv/cldf-stp.lua
new file mode 100644
index 00000000000..7b5225dd353
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-stp.lua
@@ -0,0 +1,69 @@
+if not modules then modules = { } end modules ['cldf-stp'] = {
+ version = 1.001,
+ comment = "companion to cldf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- limitation: input levels
+
+-- context.stepwise (function()
+-- ...
+-- context.step(nil|...)
+-- ...
+-- context.step(nil|...)
+-- ...
+-- context.stepwise (function()
+-- ...
+-- context.step(nil|...)
+-- ...
+-- context.step(nil|...)
+-- ...
+-- end)
+-- ...
+-- context.step(nil|...)
+-- ...
+-- context.step(nil|...)
+-- ...
+-- end)
+
+local create = coroutine.create
+local yield = coroutine.yield
+local resume = coroutine.resume
+local status = coroutine.status
+
+local stepper = nil
+local stack = { } -- will never be deep so no gc needed
+local depth = 0
+
+local nextstep = function()
+ if status(stepper) == "dead" then
+ stepper = stack[depth]
+ depth = depth - 1
+ stack[depth] = false
+ end
+ resume(stepper)
+end
+
+interfaces.implement {
+ name = "step",
+ actions = nextstep,
+}
+
+local cldresume = context.constructcsonly("clf_step")
+
+function context.step(first,...)
+ if first ~= nil then
+ context(first,...)
+ end
+ cldresume()
+ yield()
+end
+
+function context.stepwise(f)
+ depth = depth + 1
+ stack[depth] = stepper
+ stepper = create(f)
+ resume(stepper)
+end
diff --git a/Master/texmf-dist/tex/context/base/cldf-ver.lua b/Master/texmf-dist/tex/context/base/mkiv/cldf-ver.lua
index 66432eb1c8c..66432eb1c8c 100644
--- a/Master/texmf-dist/tex/context/base/cldf-ver.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-ver.lua
diff --git a/Master/texmf-dist/tex/context/base/cldf-ver.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cldf-ver.mkiv
index 8e009035d2d..8e009035d2d 100644
--- a/Master/texmf-dist/tex/context/base/cldf-ver.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-ver.mkiv
diff --git a/Master/texmf-dist/tex/context/base/colo-ext.mkiv b/Master/texmf-dist/tex/context/base/mkiv/colo-ext.mkiv
index c076fda9e5a..74ce2d3e5d4 100644
--- a/Master/texmf-dist/tex/context/base/colo-ext.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/colo-ext.mkiv
@@ -30,7 +30,7 @@
%D will negate the colors in box zero.
\unexpanded\def\negatecolorbox#1% or just set attr of #1
- {\setbox#1\hbox to \wd#1%
+ {\setbox#1\hpack to \wd#1%
{\scratchdimen\wd#1\relax
\startnegative % might change
\blackrule[\c!color=\s!white,\c!height=\ht#1,\c!depth=\dp#1,\c!width=\scratchdimen]%
diff --git a/Master/texmf-dist/tex/context/base/colo-grp.mkiv b/Master/texmf-dist/tex/context/base/mkiv/colo-grp.mkiv
index e296bbc33d9..e296bbc33d9 100644
--- a/Master/texmf-dist/tex/context/base/colo-grp.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/colo-grp.mkiv
diff --git a/Master/texmf-dist/tex/context/base/colo-icc.lua b/Master/texmf-dist/tex/context/base/mkiv/colo-icc.lua
index f7ed561c1bf..f7ed561c1bf 100644
--- a/Master/texmf-dist/tex/context/base/colo-icc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/colo-icc.lua
diff --git a/Master/texmf-dist/tex/context/base/mkiv/colo-imp-crayola.mkiv b/Master/texmf-dist/tex/context/base/mkiv/colo-imp-crayola.mkiv
new file mode 100644
index 00000000000..dbae02d5a2a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/colo-imp-crayola.mkiv
@@ -0,0 +1,254 @@
+%D \module
+%D [ file=colo-imp-crayola
+%D version=2016.03.21,
+%D title=\CONTEXT\ Color Macros,
+%D subtitle=Crayola,
+%D author=Alan Braslau]
+%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 Crayola (Binney & Smith) crayon colors.
+
+\startprotectedcolors
+
+\definecolor [Red] [h=ED0A3F] % produced 1903–present
+\definecolor [Maroon] [h=C32148] % produced 1949–present, known as "dark red", 1949–1958.
+\definecolor [Scarlet] [h=FD0E35] % produced 1998–present, known as "torch red", 1998.
+\definecolor [BrickRed] [h=C62D42] % produced 1958–present
+\definecolor [EnglishVermilion] [h=CC474B] % also spelled "vermillion", produced 1903–1935.
+\definecolor [MadderLake] [h=CC3336] % produced 1903–1935
+\definecolor [PermanentGeraniumLake] [h=E12C2C] % produced 1903–circa 1910
+\definecolor [MaximumRed] [h=D92121] % part of the munsell line, 1926–1944
+\definecolor [IndianRed] [h=B94E48] % produced 1903–present, known as "chestnut" since 1999.
+\definecolor [OrangeRed] [h=FF5349] % produced 1958–1990
+\definecolor [SunsetOrange] [h=FE4C40] % produced 1997–present
+\definecolor [Bittersweet] [h=FE6F5E] % produced 1958–present
+\definecolor [DarkVenetianRed] [h=B33B24] % "venetian red, dark" on labels, produced 1903–circa 1910.
+\definecolor [VenetianRed] [h=CC553D] % produced 1903–1944
+\definecolor [LightVenetianRed] [h=E6735C] % "venetian red, light" on labels, produced 1903–circa 1910.
+\definecolor [VividTangerine] [h=FF9980] % produced 1990–present
+\definecolor [MiddleRed] [h=E58E73] % part of the munsell line, 1926–1944.
+\definecolor [BurntOrange] [h=FF7F49] % produced 1958–present
+\definecolor [RedOrange] [h=FF681F] % produced 1930–present
+\definecolor [Orange] [h=FF8833] % produced 1903–present
+\definecolor [MacaroniandCheese] [h=FFB97B] % produced 1993–present, also found as "macaroni & cheese" and "macaroni-n-cheese".
+\definecolor [MiddleYellowRed] [h=ECB176] % part of the munsell line, 1926–1944, same color as "medium orange" (1949–1958).
+\definecolor [MangoTango] [h=E77200] % produced 2003–present
+\definecolor [YellowOrange] [h=FFAE42] % produced 1930–present
+\definecolor [MaximumYellowRed] [h=F2BA49] % part of the munsell line, 1926–1944.
+\definecolor [BananaMania] [h=FBE7B2] % produced 1998–present
+\definecolor [Maize] [h=F2C649] % produced 1903–1990, known as "gold ochre", 1903–1958, "golden ochre" on some labels.
+\definecolor [OrangeYellow] [h=F8D568] % produced 1958–1990.
+\definecolor [Goldenrod] [h=FCD667] % produced 1903–present, known as "medium chrome yellow" (1903–?) and "medium yellow" (1903–1958).
+\definecolor [Dandelion] [h=FED85D] % produced 1990–present
+\definecolor [Yellow] [h=FBE870] % produced 1903–present
+\definecolor [GreenYellow] [h=F1E788] % produced 1958–present
+\definecolor [MiddleYellow] [h=FFEB00] % part of the munsell line, 1926–1944.
+\definecolor [OliveGreen] [h=B5B35C] % produced 1903–present
+\definecolor [SpringGreen] [h=ECEBBD] % produced 1958–present
+\definecolor [MaximumYellow] [h=FAFA37] % part of the munsell line, 1926–1944.
+\definecolor [Canary] [h=FFFF99] % produced 1998–present
+\definecolor [LemonYellow] [h=FFFF9F] % produced 1903–1990, also known as "light chrome yellow" (on labels "chrome yellow, light") or "light yellow", 1903–1958, on labels "chrome yellow, light."
+\definecolor [MaximumGreenYellow] [h=D9E650] % part of the munsell line, 1926–1944.
+\definecolor [MiddleGreenYellow] [h=ACBF60] % part of the munsell line, 1926–1944.
+\definecolor [Inchworm] [h=AFE313] % produced 1993–present
+\definecolor [LightChromeGreen] [h=BEE64B] % "chrome green, light" on labels, produced 1903–1935, same color as "light green" (1903–1935).
+\definecolor [YellowGreen] [h=C5E17A] % produced 1930–present
+\definecolor [MaximumGreen] [h=5E8C31] % part of the munsell line, 1926–1944.
+\definecolor [Asparagus] [h=7BA05B] % produced 1993–present
+\definecolor [GrannySmithApple] [h=9DE093] % produced 1993–present
+\definecolor [Fern] [h=63B76C] % produced 1998–present
+\definecolor [MiddleGreen] [h=4D8C57] % part of the munsell line, 1926–1944.
+\definecolor [Green] [h=3AA655] % produced 1903–present
+\definecolor [MediumChromeGreen] [h=6CA67C] % "chrome green, medium" on labels, produced 1903–1939, same color as "medium green" (1903–1939).
+\definecolor [ForestGreen] [h=5FA777] % produced 1949–present, known as "dark green", 1949–1958.
+\definecolor [SeaGreen] [h=93DFB8] % produced 1949–present, known as "light green", 1949–1958.
+\definecolor [Shamrock] [h=33CC99] % produced 1993–present
+\definecolor [MountainMeadow] [h=1AB385] % produced 1998–present
+\definecolor [JungleGreen] [h=29AB87] % produced 1990–present
+\definecolor [CaribbeanGreen] [h=00CC99] % produced 1997–present
+\definecolor [TropicalRainForest] [h=00755E] % produced 1993–present
+\definecolor [MiddleBlueGreen] [h=8DD9CC] % part of the munsell line, 1926–1944.
+\definecolor [PineGreen] [h=01786F] % produced 1903–1949, 1958–present, known as "dark chrome green" ("chrome green, dark" on labels) or "dark green", 1903–1949.
+\definecolor [MaximumBlueGreen] [h=30BFBF] % part of the munsell line, 1926–1944.
+\definecolor [RobinsEggBlue] [h=00CCCC] % produced 1993–present
+\definecolor [TealBlue] [h=008080] % produced 1990–2003.
+\definecolor [LightBlue] [h=8FD8D8] % produced only in 1958.
+\definecolor [Aquamarine] [h=95E0E8] % produced 1949–present, known as "light turquoise blue", 1949–1958.
+\definecolor [TurquoiseBlue] [h=6CDAE7] % produced 1935–present, available only in bulk, 1935–1949.
+\definecolor [OuterSpace] [h=2D383A] % produced 1998–present
+\definecolor [SkyBlue] [h=76D7EA] % produced 1958–present
+\definecolor [MiddleBlue] [h=7ED4E6] % part of the munsell line, 1926–1944.
+\definecolor [BlueGreen] [h=0095B7] % produced 1949–present, known as "middle blue-green", 1949–1958.
+\definecolor [PacificBlue] [h=009DC4] % produced 1993–present
+\definecolor [Cerulean] [h=02A4D3] % produced 1990–present
+\definecolor [MaximumBlue] [h=47ABCC] % produced 1926–1958, part of the munsell line, 1926–1944, also known as "blue-green", 1930–1958.
+\definecolor [BlueI] [h=4997D0] % produced 1903–1958, known as "celestial blue", 1935–1949, and "azure blue", 1949–1958.
+\definecolor [CeruleanBlue] [h=339ACC] % produced 1949–1958.
+\definecolor [Cornflower] [h=93CCEA] % produced 1958–present
+\definecolor [GreenBlue] [h=2887C8] % produced 1958–1990.
+\definecolor [MidnightBlue] [h=00468C] % produced 1903–present, known as "prussian blue", 1903–1958.
+\definecolor [NavyBlue] [h=0066CC] % produced 1958–present
+\definecolor [Denim] [h=1560BD] % produced 1993–present
+\definecolor [BlueIII] [h=0066FF] % produced 1949–present
+\definecolor [CadetBlue] [h=A9B2C3] % produced 1958–present
+\definecolor [Periwinkle] [h=C3CDE6] % produced 1958–present
+\definecolor [BlueII] [h=4570E6] % produced 1935–1958, known as "medium blue", 1949–1958.
+\definecolor [WildBlueYonder] [h=7A89B8] % produced 2003–present
+\definecolor [Indigo] [h=4F69C6] % produced 1999–present
+\definecolor [Manatee] [h=8D90A1] % produced 1998–present
+\definecolor [CobaltBlue] [h=8C90C8] % produced 1903–1958.
+\definecolor [CelestialBlue] [h=7070CC] % produced 1903–circa 1910.
+\definecolor [BlueBell] [h=9999CC] % produced 1998–present
+\definecolor [MaximumBluePurple] [h=ACACE6] % part of the munsell line, 1926–1944.
+\definecolor [VioletBlue] [h=766EC8] % produced 1930–1990, known as blue-violet, 1930–1958.
+\definecolor [BlueViolet] [h=6456B7] % produced 1949–present, known as "violet" 1949–1958.
+\definecolor [UltramarineBlue] [h=3F26BF] % produced 1903–1944.
+\definecolor [MiddleBluePurple] [h=8B72BE] % part of the munsell line, 1926–1944.
+\definecolor [PurpleHeart] [h=652DC1] % produced 1998–present
+\definecolor [RoyalPurple] [h=6B3FA0] % produced 1990–present
+\definecolor [VioletII] [h=8359A3] % produced 1930–1949, 1958–present, on labels "violet (purple)".
+\definecolor [MediumViolet] [h=8F47B3] % produced 1949–1958.
+\definecolor [Wisteria] [h=C9A0DC] % produced 1993–present
+\definecolor [LavenderI] [h=BF8FCC] % produced 1949–1958.
+\definecolor [VividViolet] [h=803790] % produced 1997–present
+\definecolor [MaximumPurple] [h=733380] % part of the munsell line, 1926–1944.
+\definecolor [PurpleMountainsMajesty] [h=D6AEDD] % produced 1993–present, also found as "purple mountain majesty" and "purple mountain's majesty."
+\definecolor [Fuchsia] [h=C154C1] % produced 1990–present
+\definecolor [PinkFlamingo] [h=FC74FD] % produced 1997–present
+\definecolor [VioletI] [h=732E6C] % produced 1903–1930, also known as "purple" (1903–circa 1914).
+\definecolor [BrilliantRose] [h=E667CE] % produced 1949–1958.
+\definecolor [Orchid] [h=E29CD2] % produced 1949–present, known as "medium red-violet", 1949–1958.
+\definecolor [Plum] [h=8E3179] % produced 1958–present
+\definecolor [MediumRose] [h=D96CBE] % produced 1949–1958.
+\definecolor [Thistle] [h=EBB0D7] % produced 1949–1999, known as "light magenta", 1949–1958.
+\definecolor [Mulberry] [h=C8509B] % produced 1958–2003.
+\definecolor [RedViolet] [h=BB3385] % produced 1930–present
+\definecolor [MiddlePurple] [h=D982B5] % part of the munsell line, 1926–1944.
+\definecolor [MaximumRedPurple] [h=A63A79] % part of the munsell line, 1926–1944.
+\definecolor [JazzberryJam] [h=A50B5E] % produced 2003–present
+\definecolor [Eggplant] [h=614051] % produced 1998–present
+\definecolor [Magenta] [h=F653A6] % produced 1903–present, same color as "permanent magenta" (1903–?).
+\definecolor [Cerise] [h=DA3287] % produced 1993–present
+\definecolor [WildStrawberry] [h=FF3399] % produced 1990–present
+\definecolor [LavenderII] [h=FBAED2] % produced 1958–present
+\definecolor [CottonCandy] [h=FFB7D5] % produced 1998–present
+\definecolor [CarnationPink] [h=FFA6C9] % produced 1903–present, known as "rose pink" (1903–1958) and "pink" (1903–1917).
+\definecolor [VioletRed] [h=F7468A] % produced 1958–present
+\definecolor [Razzmatazz] [h=E30B5C] % produced 1993–present
+\definecolor [PigPink] [h=FDD7E4] % produced 1998–present, also called "piggy pink."
+\definecolor [Carmine] [h=E62E6B] % produced 1935–1958, known as "carmine red", 1949–1958.
+\definecolor [Blush] [h=DB5079] % produced 1998–present, known as "cranberry", 1998–2005.
+\definecolor [TickleMePink] [h=FC80A5] % produced 1993–present
+\definecolor [Mauvelous] [h=F091A9] % produced 1993–present
+\definecolor [Salmon] [h=FF91A4] % produced 1949–present
+\definecolor [MiddleRedPurple] [h=A55353] % part of the munsell line, 1926–1944.
+\definecolor [Mahogany] [h=CA3435] % produced 1949–present
+\definecolor [Melon] [h=FEBAAD] % produced 1958–present
+\definecolor [PinkSherbert] [h=F7A38E] % produced 1998–present, known as "brink pink", 1998–2005.
+\definecolor [BurntSienna] [h=E97451] % produced 1903–present
+\definecolor [Brown] [h=AF593E] % produced 1935–present
+\definecolor [Sepia] [h=9E5B40] % produced 1935–1944, 1958–present, available only in bulk, 1935–1939.
+\definecolor [FuzzyWuzzy] [h=87421F] % produced 1998–present, known as "fuzzy wuzzy brown", 1998–2005.
+\definecolor [Beaver] [h=926F5B] % produced 1998–present
+\definecolor [Tumbleweed] [h=DEA681] % produced 1993–present
+\definecolor [RawSienna] [h=D27D46] % produced 1958–present
+\definecolor [VanDykeBrown] [h=664228] % produced 1903–1935, same color as "brown" (1903–1935)
+\definecolor [Tan] [h=D99A6C] % produced 1958–present
+\definecolor [DesertSand] [h=EDC9AF] % produced 1998–present
+\definecolor [Peach] [h=FFCBA4] % produced 1903–present, known as "flesh tint" (1903–1949), "flesh" (1949–1956, 1958–1962), and "pink beige" (1956–1958)
+\definecolor [BurntUmber] [h=805533] % produced 1903–1944
+\definecolor [Apricot] [h=FDD5B1] % produced 1958–present
+\definecolor [Almond] [h=EED9C4] % produced 1998–present
+\definecolor [RawUmber] [h=665233] % produced 1903–1990
+\definecolor [Shadow] [h=837050] % produced 1998–present
+\definecolor [RawSiennaI] [h=E6BC5C] % produced 1903–circa 1910
+\definecolor [Timberwolf] [h=D9D6CF] % produced 1993–present
+\definecolor [GoldI] [h=92926E] % metallic, swatch represents nominal hue only, produced 1903–1944, available only in bulk after 1915
+\definecolor [GoldII] [h=E6BE8A] % metallic, swatch represents nominal hue only, produced 1953–present, available only in bulk, 1953–1956
+\definecolor [Silver] [h=C9C0BB] % metallic, swatch represents nominal hue only, produced 1903–present, available only in bulk, 1915–1944
+\definecolor [Copper] [h=DA8A67] % metallic, swatch represents nominal hue only, produced 1903–1915, 1958–present
+\definecolor [AntiqueBrass] [h=C88A65] % metallic, swatch represents nominal hue only, produced 1998–present
+\definecolor [Black] [h=000000] % produced 1903–present
+\definecolor [CharcoalGray] [h=736A62] % produced 1903–1910
+\definecolor [Gray] [h=8B8680] % as "middle grey", part of the munsell line, 1926–1944, spelled "grey" on labels, but "gray" on boxes, also called "neutral grey", 1930–1956
+\definecolor [BlueGray] [h=C8C8CD] % produced 1958–1990
+\definecolor [White] [h=FFFFFF] % produced 1903–present
+\definecolor [RadicalRed] [h=FF355E] % introduced in 1990
+\definecolor [WildWatermelon] [h=FD5B78] % same color as "ultra red" (1972–1990)
+\definecolor [OutrageousOrange] [h=FF6037] % same color as "ultra orange" (1972–1990)
+\definecolor [AtomicTangerine] [h=FF9966] % same color as "ultra yellow" (1972–1990)
+\definecolor [NeonCarrot] [h=FF9933] % introduced in 1990
+\definecolor [Sunglow] [h=FFCC33] % introduced in 1990
+\definecolor [LaserLemon] [h=FFFF66] % same color as "chartreuse" (1972–1990)
+\definecolor [UnmellowYellow] [h=FFFF66] % introduced in 1990
+\definecolor [ElectricLime] [h=CCFF00] % introduced in 1990
+\definecolor [ScreaminGreen] [h=66FF66] % same color as "ultra green" (1972–1990)
+\definecolor [MagicMint] [h=AAF0D1] % produced 1990–2003
+\definecolor [BlizzardBlue] [h=50BFE6] % same color as "ultra blue" (1972–1990), discontinued in 2003
+\definecolor [ShockingPink] [h=FF6EFF] % same color as "ultra pink" (1972–1990)
+\definecolor [RazzleDazzleRose] [h=EE34D2] % same color as "hot magenta" (1972–1990)
+\definecolor [HotMagenta] [h=FF00CC] % introduced in 1990
+\definecolor [PurplePizzazz] [h=FF00CC] % introduced in 1990
+\definecolor [AztecGold] [h=C39953]
+\definecolor [BurnishedBrown] [h=A17A74]
+\definecolor [CeruleanFrost] [h=6D9BC3]
+\definecolor [CinnamonSatin] [h=CD607E]
+\definecolor [CopperPenny] [h=AD6F69]
+\definecolor [CosmicCobalt] [h=2E2D88]
+\definecolor [GlossyGrape] [h=AB92B3]
+\definecolor [GraniteGray] [h=676767]
+\definecolor [GreenSheen] [h=6EAEA1]
+\definecolor [LilacLuster] [h=AE98AA]
+\definecolor [MistyMoss] [h=BBB477]
+\definecolor [MysticMaroon] [h=AD4379]
+\definecolor [PearlyPurple] [h=B768A2]
+\definecolor [PewterBlue] [h=8BA8B7]
+\definecolor [PolishedPine] [h=5DA493]
+\definecolor [QuickSilver] [h=A6A6A6]
+\definecolor [RoseDust] [h=9E5E6F]
+\definecolor [RustyRed] [h=DA2C43]
+\definecolor [ShadowBlue] [h=778BA5]
+\definecolor [ShinyShamrock] [h=5FA778]
+\definecolor [SteelTeal] [h=5F8A8B]
+\definecolor [SugarPlum] [h=914E75]
+\definecolor [TwilightLavender] [h=8A496B]
+\definecolor [WintergreenDream] [h=56887D]
+\definecolor [Amethyst] [h=64609A]
+\definecolor [Citrine] [h=933709]
+\definecolor [Emerald] [h=14A989]
+\definecolor [Jade] [h=469A84]
+\definecolor [Jasper] [h=D05340]
+\definecolor [LapisLazuli] [h=436CB9]
+\definecolor [Malachite] [h=469496]
+\definecolor [Moonstone] [h=3AA8C1]
+\definecolor [Onyx] [h=353839]
+\definecolor [Peridot] [h=ABAD48]
+\definecolor [PinkPearl] [h=B07080]
+\definecolor [RoseQuartz] [h=BD559C]
+\definecolor [Ruby] [h=AA4069]
+\definecolor [Sapphire] [h=2D5DA1]
+\definecolor [SmokeyTopaz] [h=832A0D]
+\definecolor [TigersEye] [h=B56917]
+\definecolor [AquaPearl] [h=5FBED7]
+\definecolor [BlackCoralPearl] [h=54626F]
+\definecolor [CaribbeanGreenPearl] [h=6ADA8E]
+\definecolor [CulturedPearl] [h=F5F5F5]
+\definecolor [KeyLimePearl] [h=E8F48C]
+\definecolor [MandarinPearl] [h=F37A48]
+\definecolor [MidnightPearl] [h=702670]
+\definecolor [MysticPearl] [h=D65282]
+\definecolor [OceanBluePearl] [h=4F42B5]
+\definecolor [OceanGreenPearl] [h=48BF91]
+\definecolor [OrchidPearl] [h=7B4259]
+\definecolor [RosePearl] [h=F03865]
+\definecolor [SalmonPearl] [h=F1444A]
+\definecolor [SunnyPearl] [h=F2F27A]
+\definecolor [SunsetPearl] [h=F1CC79]
+\definecolor [TurquoisePearl] [h=3BBCD0]
+
+\stopprotectedcolors
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/colo-imp-dem.mkiv b/Master/texmf-dist/tex/context/base/mkiv/colo-imp-dem.mkiv
index 5b794c5517b..7744a216ef9 100644
--- a/Master/texmf-dist/tex/context/base/colo-imp-dem.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/colo-imp-dem.mkiv
@@ -11,8 +11,9 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-%D Like colors, we first define the english colorgroups. These
-%D colorgroups are tuned for distinctive gray scale printing.
+%D Like colors, we first define the english colorgroups. These colorgroups are
+%D tuned for distinctive gray scale printing. The yellow range is not really
+%D all yellow but is at least visible.
\definecolorgroup
[gray]
@@ -200,6 +201,20 @@
\definecolorgroup [giallo*] [yellow*]
\stopinterface
+\startinterface french
+ \definecolorgroup [gris] [gray]
+ \definecolorgroup [rouge] [red]
+ \definecolorgroup [vert] [green]
+ \definecolorgroup [bleu] [blue]
+ \definecolorgroup [cyan] [cyan]
+ \definecolorgroup [magenta] [magenta]
+ \definecolorgroup [jaune] [yellow]
+ \definecolorgroup [rouge*] [red*]
+ \definecolorgroup [vert*] [green*]
+ \definecolorgroup [bleu*] [blue*]
+ \definecolorgroup [jaune*] [yellow*]
+\stopinterface
+
%D The next set of color palets is quite language independant.
%D These palets are meant as examples.
diff --git a/Master/texmf-dist/tex/context/base/colo-imp-ema.mkiv b/Master/texmf-dist/tex/context/base/mkiv/colo-imp-ema.mkiv
index 11d76f34209..ff1db60fb55 100644
--- a/Master/texmf-dist/tex/context/base/colo-imp-ema.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/colo-imp-ema.mkiv
@@ -8,7 +8,7 @@
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
% author : Peter Rolf <peter.rolf@arcor.de>
@@ -17,28 +17,30 @@
%
% USAGE:
%
-% - select emacs menu: Edit -> Text Properties -> Display
+% - select emacs menu: Edit -> Text Properties -> Display
% Colors, if you don't know what I'm talking about
-% - copy this file to your /texmf/tex/context/user directory
+% - copy this file to your /texmf/tex/context/user directory
% and add "\input colo-emacs" to your tex-file
%
% IMPORTANT NOTES:
%
-% - all color names are written as ONE word in lowercase
-% letters (no redundancy as in rgb.txt) so if you want to
-% use the color "Light Sky Blue"/"light sky blue" it's new
+% - all color names are written as ONE word in lowercase
+% letters (no redundancy as in rgb.txt) so if you want to
+% use the color "Light Sky Blue"/"light sky blue" it's new
% name is lightskyblue
% - the grayX values [X=0..100] can only be used with \color
% [grayX]
% - use it at your own risk :)
%
% HINT:
-%
-% I only include this file (\showcolor [ema]) until I've
-% found the colors I want. Copy and paste the color
-% definitions to a seperate file, to decrease compilation
-% time (540 color definitions).
-
+%
+% I only include this file (\showcolor [ema]) until I've
+% found the colors I want. Copy and paste the color
+% definitions to a seperate file, to decrease compilation
+% time (540 color definitions).
+
+\startprotectedcolors
+
\definecolor [snow] [r=1,g=.980392,b=.980392]
\definecolor [ghostwhite] [r=.972549,g=.972549,b=1]
\definecolor [whitesmoke] [s=.960784]
@@ -481,110 +483,18 @@
\definecolor [thistle2] [r=.933333,g=.823529,b=.933333]
\definecolor [thistle3] [r=.803922,g=.709804,b=.803922]
\definecolor [thistle4] [r=.545098,g=.482353,b=.545098]
-\definecolor [gray0] [black]
-\definecolor [gray1] [s=.01]
-\definecolor [gray2] [s=.02]
-\definecolor [gray3] [s=.03]
-\definecolor [gray4] [s=.04]
-\definecolor [gray5] [s=.05]
-\definecolor [gray6] [s=.06]
-\definecolor [gray7] [s=.07]
-\definecolor [gray8] [s=.08]
-\definecolor [gray9] [s=.09]
-\definecolor [gray10] [s=.1]
-\definecolor [gray11] [s=.11]
-\definecolor [gray12] [s=.12]
-\definecolor [gray13] [s=.13]
-\definecolor [gray14] [s=.14]
-\definecolor [gray15] [s=.15]
-\definecolor [gray16] [s=.16]
-\definecolor [gray17] [s=.17]
-\definecolor [gray18] [s=.18]
-\definecolor [gray19] [s=.19]
-\definecolor [gray20] [s=.2]
-\definecolor [gray21] [s=.21]
-\definecolor [gray22] [s=.22]
-\definecolor [gray23] [s=.23]
-\definecolor [gray24] [s=.24]
-\definecolor [gray25] [s=.25]
-\definecolor [gray26] [s=.26]
-\definecolor [gray27] [s=.27]
-\definecolor [gray28] [s=.28]
-\definecolor [gray29] [s=.29]
-\definecolor [gray30] [s=.3]
-\definecolor [gray31] [s=.31]
-\definecolor [gray32] [s=.32]
-\definecolor [gray33] [s=.33]
-\definecolor [gray34] [s=.34]
-\definecolor [gray35] [s=.35]
-\definecolor [gray36] [s=.36]
-\definecolor [gray37] [s=.37]
-\definecolor [gray38] [s=.38]
-\definecolor [gray39] [s=.39]
-\definecolor [gray40] [s=.4]
-\definecolor [gray41] [s=.41]
-\definecolor [gray42] [s=.42]
-\definecolor [gray43] [s=.43]
-\definecolor [gray44] [s=.44]
-\definecolor [gray45] [s=.45]
-\definecolor [gray46] [s=.46]
-\definecolor [gray47] [s=.47]
-\definecolor [gray48] [s=.48]
-\definecolor [gray49] [s=.49]
-\definecolor [gray50] [s=.5]
-\definecolor [gray51] [s=.51]
-\definecolor [gray52] [s=.52]
-\definecolor [gray53] [s=.53]
-\definecolor [gray54] [s=.54]
-\definecolor [gray55] [s=.55]
-\definecolor [gray56] [s=.56]
-\definecolor [gray57] [s=.57]
-\definecolor [gray58] [s=.58]
-\definecolor [gray59] [s=.59]
-\definecolor [gray60] [s=.6]
-\definecolor [gray61] [s=.61]
-\definecolor [gray62] [s=.62]
-\definecolor [gray63] [s=.63]
-\definecolor [gray64] [s=.64]
-\definecolor [gray65] [s=.65]
-\definecolor [gray66] [s=.66]
-\definecolor [gray67] [s=.67]
-\definecolor [gray68] [s=.68]
-\definecolor [gray69] [s=.69]
-\definecolor [gray70] [s=.7]
-\definecolor [gray71] [s=.71]
-\definecolor [gray72] [s=.72]
-\definecolor [gray73] [s=.73]
-\definecolor [gray74] [s=.74]
-\definecolor [gray75] [s=.75]
-\definecolor [gray76] [s=.76]
-\definecolor [gray77] [s=.77]
-\definecolor [gray78] [s=.78]
-\definecolor [gray79] [s=.79]
-\definecolor [gray80] [s=.8]
-\definecolor [gray81] [s=.81]
-\definecolor [gray82] [s=.82]
-\definecolor [gray83] [s=.83]
-\definecolor [gray84] [s=.84]
-\definecolor [gray85] [s=.85]
-\definecolor [gray86] [s=.86]
-\definecolor [gray87] [s=.87]
-\definecolor [gray88] [s=.88]
-\definecolor [gray89] [s=.89]
-\definecolor [gray90] [s=.9]
-\definecolor [gray91] [s=.91]
-\definecolor [gray92] [s=.92]
-\definecolor [gray93] [s=.93]
-\definecolor [gray94] [s=.94]
-\definecolor [gray95] [s=.95]
-\definecolor [gray96] [s=.96]
-\definecolor [gray97] [s=.97]
-\definecolor [gray98] [s=.98]
-\definecolor [gray99] [s=.99]
-\definecolor [gray100] [white]
+
+\dorecurse{100}{
+ \definecolor [gray#1] [s=\cldcontext{#1/100}]
+}
+
\definecolor [darkgray] [s=.662745]
\definecolor [darkblue] [b=.545098]
\definecolor [darkcyan] [g=.545098,b=.545098]
\definecolor [darkmagenta] [r=.545098,b=.545098]
\definecolor [darkred] [r=.545098]
\definecolor [lightgreen] [r=.564706,g=.933333,b=.564706]
+
+\stopprotectedcolors
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/colo-imp-ral.mkiv b/Master/texmf-dist/tex/context/base/mkiv/colo-imp-ral.mkiv
new file mode 100644
index 00000000000..e7b1a2408f4
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/colo-imp-ral.mkiv
@@ -0,0 +1,239 @@
+%D \module
+%D [ file=colo-imp-ral,
+%D version=2009.11.13,
+%D title=\CONTEXT\ Color Macros,
+%D subtitle=RAL,
+%D author=Alan Braslau]
+%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 RAL color system (Deutsches Institut für Gütesicherung und Kennzeichnung)
+%D approximate RGB colors (from \goto {ralcolor.com} [url(http://www.ralcolor.com)];
+%D see also \goto {ralcolors.com} [url(http://www.ralcolors.com)]). These could be
+%D good candidates for use as spot colors.
+
+\startprotectedcolors
+
+ % Deutsch English Français Español Italiano Nederlands
+
+\definecolor [RAL1000] [h=BEBD7F] % Grünbeige Green beige Beige vert Beige verdoso Beige verdastro Groenbeige
+\definecolor [RAL1001] [h=C2B078] % Beige Beige Beige Beige Beige Beige
+\definecolor [RAL1002] [h=C6A664] % Sandgelb Sand yellow Jaune sable Amarillo arena Giallo sabbia Zandgeel
+\definecolor [RAL1003] [h=E5BE01] % Signalgelb Signal yellow Jaune de sécurité Amarillo señales Giallo segnale Signaalgeel
+\definecolor [RAL1004] [h=CDA434] % Goldgelb Golden yellow Jaune or Amarillo oro Giallo oro Goudgeel
+\definecolor [RAL1005] [h=A98307] % Honiggelb Honey yellow Jaune miel Amarillo miel Giallo miele Honinggeel
+\definecolor [RAL1006] [h=E4A010] % Maisgelb Maize yellow Jaune maïs Amarillo maiz Giallo polenta Maisgeel
+\definecolor [RAL1007] [h=DC9D00] % Narzissengelb Daffodil yellow Jaune narcisse Amarillo narciso Giallo narciso Narcissengeel
+\definecolor [RAL1011] [h=8A6642] % Braunbeige Brown beige Beige brun Beige pardo Beige marrone Bruinbeige
+\definecolor [RAL1012] [h=C7B446] % Zitronengelb Lemon yellow Jaune citron Amarillo limón Giallo limone Citroengeel
+\definecolor [RAL1013] [h=EAE6CA] % Perlweiß Oyster white Blanc perlé Blanco perla Bianco perla Parelwit
+\definecolor [RAL1014] [h=E1CC4F] % Elfenbein Ivory Ivoire Marfil Avorio Ivoorkleurig
+\definecolor [RAL1015] [h=E6D690] % Hellelfenbein Light ivory Ivoire clair Marfil claro Avorio chiaro Licht ivoorkleurig
+\definecolor [RAL1016] [h=EDFF21] % Schwefelgelb Sulfur yellow Jaune soufre Amarillo azufre Giallo zolfo Zwavelgeel
+\definecolor [RAL1017] [h=F5D033] % Safrangelb Saffron yellow Jaune safran Amarillo azafrán Giallo zafferano Saffraangeel
+\definecolor [RAL1018] [h=F8F32B] % Zinkgelb Zinc yellow Jaune zinc Amarillo de zinc Giallo zinco Zinkgeel
+\definecolor [RAL1019] [h=9E9764] % Graubeige Grey beige Beige gris Beige agrisado Beige grigiastro Grijsbeige
+\definecolor [RAL1020] [h=999950] % Olivgelb Olive yellow Jaune olive Amarillo oliva Giallo olivastro Olijfgeel
+\definecolor [RAL1021] [h=F3DA0B] % Rapsgelb Rape yellow Jaune colza Amarillo colza Giallo navone Koolzaadgeel
+\definecolor [RAL1023] [h=FAD201] % Verkehrsgelb Traffic yellow Jaune signalisation Amarillo tráfico Giallo traffico Verkeersgeel
+\definecolor [RAL1024] [h=AEA04B] % Ockergelb Ochre yellow Jaune ocre Amarillo ocre Giallo ocra Okergeel
+\definecolor [RAL1026] [h=FFFF00] % Leuchtgelb Luminous yellow Jaune brillant Amarillo brillante Giallo brillante Briljantgeel
+\definecolor [RAL1027] [h=9D9101] % Currygelb Curry Jaune curry Amarillo curry Giallo curry Kerriegeel
+\definecolor [RAL1028] [h=F4A900] % Melonengelb Melon yellow Jaune melon Amarillo melón Giallo melone Meloengeel
+\definecolor [RAL1032] [h=D6AE01] % Ginstergelb Broom yellow Jaune genêt Amarillo retama Giallo scopa Bremgeel
+\definecolor [RAL1033] [h=F3A505] % Dahliengelb Dahlia yellow Jaune dahlia Amarillo dalia Giallo dahlien Dahliageel
+\definecolor [RAL1034] [h=EFA94A] % Pastellgelb Pastel yellow Jaune pastel Amarillo pastel Giallo pastello Pastelgeel
+\definecolor [RAL1035] [h=6A5D4D] % Perlbeige Pearl beige Beige nacré Beige perlado Beige perlato Parelmoergrijs
+\definecolor [RAL1036] [h=705335] % Perlgold Pearl gold Or nacré Oro perlado Oro perlato Parelmoergoud
+\definecolor [RAL1037] [h=F39F18] % Sonnengelb Sun yellow Jaune soleil Amarillo sol Giallo sole Zonnegeel
+\definecolor [RAL2000] [h=ED760E] % Gelborange Yellow orange Orangé jaune Amarillo naranja Arancio giallastro Geeloranje
+\definecolor [RAL2001] [h=C93C20] % Rotorange Red orange Orangé rouge Rojo anaranjado Arancio rossastro Roodoranje
+\definecolor [RAL2002] [h=CB2821] % Blutorange Vermilion Orangé sang Naranja sanguineo Arancio sanguigno Vermiljoen
+\definecolor [RAL2003] [h=FF7514] % Pastellorange Pastel orange Orangé pastel Naranja pálido Arancio pastello Pasteloranje
+\definecolor [RAL2004] [h=F44611] % Reinorange Pure orange Orangé pur Naranja puro Arancio puro Zuiver oranje
+\definecolor [RAL2005] [h=FF2301] % Leuchtorange Luminous orange Orangé brillant Naranja brillante Arancio brillante Briljant oranje
+\definecolor [RAL2007] [h=FFA420] % Leuchthellorange Luminous bright orange Orangé clair rillant Naranja claro brillante Arancio chiaro brillante Briljant lichtoranje
+\definecolor [RAL2008] [h=F75E25] % Hellrotorange Bright red orange Orangé rouge clair Rojo claro anaranjado Rosso arancio chiaro Licht roodoranje
+\definecolor [RAL2009] [h=F54021] % Verkehrsorange Traffic orange Orangé signalisation Naranja tráfico Arancio traffico Verkeersoranje
+\definecolor [RAL2010] [h=D84B20] % Signalorange Signal orange Orangé de sécurité Naranja señales Arancio segnale Signaaloranje
+\definecolor [RAL2011] [h=EC7C26] % Tieforange Deep orange Orangé foncé Naranja intenso Arancio profondo Dieporanje
+\definecolor [RAL2012] [h=E55137] % Lachsorange Salmon range Orangé saumon Naranja salmón Arancio salmone Zalmoranje
+\definecolor [RAL2013] [h=C35831] % Perlorange Pearl orange Orangé nacré Naranja perlado Arancio perlato Parelmoeroranje
+\definecolor [RAL3000] [h=AF2B1E] % Feuerrot Flame red Rouge feu Rojo vivo Rosso fuoco Vuurrood
+\definecolor [RAL3001] [h=A52019] % Signalrot Signal red Rouge de sécurité Rojo señales Rosso segnale Signaalrood
+\definecolor [RAL3002] [h=A2231D] % Karminrot Carmine red Rouge carmin Rojo carmin Rosso carminio Karmijnrood
+\definecolor [RAL3003] [h=9B111E] % Rubinrot Ruby red Rouge rubis Rojo rubí Rosso rubino Robijnrood
+\definecolor [RAL3004] [h=75151E] % Purpurrot Purple red Rouge pourpre Rojo purpura Rosso porpora Purperrood
+\definecolor [RAL3005] [h=5E2129] % Weinrot Wine red Rouge vin Rojo vino Rosso vino Wijnrood
+\definecolor [RAL3007] [h=412227] % Schwarzrot Black red Rouge noir Rojo negruzco Rosso nerastro Zwartrood
+\definecolor [RAL3009] [h=642424] % Oxidrot Oxide red Rouge oxyde Rojo óxido Rosso ossido Oxyderood
+\definecolor [RAL3011] [h=781F19] % Braunrot Brown red Rouge brun Rojo pardo Rosso marrone Bruinrood
+\definecolor [RAL3012] [h=C1876B] % Beigerot Beige red Rouge beige Rojo beige Rosso beige Beigerood
+\definecolor [RAL3013] [h=A12312] % Tomatenrot Tomato red Rouge tomate Rojo tomate Rosso pomodoro Tomaatrood
+\definecolor [RAL3014] [h=D36E70] % Altrosa Antique pink Vieux rose Rojo viejo Rosa antico Oudroze
+\definecolor [RAL3015] [h=EA899A] % Hellrosa Light pink Rose clair Rosa claro Rosa chiaro Lichtroze
+\definecolor [RAL3016] [h=B32821] % Korallenrot Coral red Rouge corail Rojo coral Rosso corallo Koraalrood
+\definecolor [RAL3017] [h=E63244] % Rosé Rose Rosé Rosa Rosato Bleekrood
+\definecolor [RAL3018] [h=D53032] % Erdbeerrot Strawberry red Rouge fraise Rojo fresa Rosso fragola Aardbeirood
+\definecolor [RAL3020] [h=CC0605] % Verkehrsrot Traffic red Rouge signalisation Rojo tráfico Rosso traffico Verkeersrood
+\definecolor [RAL3022] [h=D95030] % Lachsrot Salmon pink Rouge saumon Rojo salmón Rosso salmone Zalmrood
+\definecolor [RAL3024] [h=F80000] % Leuchtrot Luminous red Rouge brillant Rojo brillante Rosso brillante Briljantrood
+\definecolor [RAL3026] [h=FE0000] % Leuchthellrot Luminous bright red Rouge clair brillant Rojo claro brillante Rosso chiaro brillante
+\definecolor [RAL3027] [h=C51D34] % Himbeerrot Raspberry red Rouge framboise Rojo frambuesa Rosso lampone Framboosrood
+\definecolor [RAL3028] [h=CB3234] % Reinrot Pure red Rouge puro Rojo puro Rosso puro Zuiverrood
+\definecolor [RAL3031] [h=B32428] % Orientrot Orient red Rouge oriental Rojo oriente Rosso oriente Oriëntrood
+\definecolor [RAL3032] [h=721422] % Perlrubinrot Pearl ruby red Rouge rubis nacré Rojo rubí perlado Rosso rubino perlato Parelmoer donkerrood
+\definecolor [RAL3033] [h=B44C43] % Perlrosa Pearl pink Rose nacré Rosa perlado Rosa perlato Parelmoer lichtrood
+\definecolor [RAL4001] [h=6D3F5B] % Rotlila Red lilac Lilas rouge Rojo lila Lilla rossastro Roodlila
+\definecolor [RAL4002] [h=922B3E] % Rotviolett Red violet Violet rouge Rojo violeta Viola rossastro Roodpaars
+\definecolor [RAL4003] [h=DE4C8A] % Erikaviolett Heather violet Violet bruyère Violeta érica Viola erica Heidepaars
+\definecolor [RAL4004] [h=641C34] % Bordeauxviolett Claret violet Violet bordeaux Burdeos Viola bordeaux Bordeauxpaars
+\definecolor [RAL4005] [h=6C4675] % Blaulila Blue lilac Lilas bleu Lila azulado Lilla bluastro Blauwlila
+\definecolor [RAL4006] [h=A03472] % Verkehrspurpur Traffic purple Pourpre signalisation Púrpurá tráfico Porpora traffico Verkeerspurper
+\definecolor [RAL4007] [h=4A192C] % Purpurviolett Purple violet Violet pourpre Violeta púrpura Porpora violetto Purperviolet
+\definecolor [RAL4008] [h=924E7D] % Signalviolett Signal violet Violet de sécurité Violeta señales Violetto segnale Signaalviolet
+\definecolor [RAL4009] [h=A18594] % Pastellviolett Pastel violet Violet pastel Violeta pastel Violetto pastello Pastelviolet
+\definecolor [RAL4010] [h=CF3476] % Telemagenta Telemagenta Telemagenta Magenta tele Tele Magenta Telemagenta
+\definecolor [RAL4011] [h=8673A1] % Perlviolett Pearl violet Violet nacré Violeta perlado Violetto perlato Parelmoer donkerviolet
+\definecolor [RAL4012] [h=6C6874] % Perlbrombeer Pearl black berry Mûre nacré Morado perlado Mora perlato Parelmoer lichtviolet
+\definecolor [RAL5000] [h=354D73] % Violettblau Violet blue Bleu violet Azul violeta Blu violaceo Paarsblauw
+\definecolor [RAL5001] [h=1F3438] % Grünblau Green blue Bleu vert Azul verdoso Blu verdastro Groenblauw
+\definecolor [RAL5002] [h=20214F] % Ultramarinblau Ultramarine blue Bleu outremer Azul ultramar Blu oltremare Ultramarijnblauw
+\definecolor [RAL5003] [h=1D1E33] % Saphirblau Saphire blue Bleu saphir Azul zafiro Blu zaffiro Saffierblauw
+\definecolor [RAL5004] [h=18171C] % Schwarzblau Black blue Bleu noir Azul negruzco Blu nerastro Zwartblauw
+\definecolor [RAL5005] [h=1E2460] % Signalblau Signal blue Bleu de sécurité Azul señales Blu segnale Signaalblauw
+\definecolor [RAL5007] [h=3E5F8A] % Brillantblau Brillant blue Bleu brillant Azul brillante Blu brillante Briljantblauw
+\definecolor [RAL5008] [h=26252D] % Graublau Grey blue Bleu gris Azul grisáceo Blu grigiastro Grijsblauw
+\definecolor [RAL5009] [h=025669] % Azurblau Azure blue Bleu azur Azul azur Blu azzurro Azuurblauw
+\definecolor [RAL5010] [h=0E294B] % Enzianblau Gentian blue Bleu gentiane Azul genciana Blu genziana Gentiaanblauw
+\definecolor [RAL5011] [h=231A24] % Stahlblau Steel blue Bleu acier Azul acero Blu acciaio Staalblauw
+\definecolor [RAL5012] [h=3B83BD] % Lichtblau Light blue Bleu clair Azul luminoso Blu luce Lichtblauw
+\definecolor [RAL5013] [h=1E213D] % Kobaltblau Cobalt blue Bleu cobalt Azul cobalto Blu cobalto Kobaltblauw
+\definecolor [RAL5014] [h=606E8C] % Taubenblau Pigeon blue Bleu pigeon Azul olombino Blu colomba Duifblauw
+\definecolor [RAL5015] [h=2271B3] % Himmelblau Sky blue Bleu ciel Azul celeste Blu cielo Hemelsblauw
+\definecolor [RAL5017] [h=063971] % Verkehrsblau Traffic blue Bleu signalisation Azul tráfico Blu traffico Verkeersblauw
+\definecolor [RAL5018] [h=3F888F] % Türkisblau Turquoise blue Bleu turquoise Azul turquesa Blu turchese Turkooisblauw
+\definecolor [RAL5019] [h=1B5583] % Capriblau Capri blue Bleu capri Azul capri Blu capri Capriblauw
+\definecolor [RAL5020] [h=1D334A] % Ozeanblau Ocean blue Bleu océan Azul oceano Blu oceano Oceaanblauw
+\definecolor [RAL5021] [h=256D7B] % Wasserblau Water blue Bleu d’eau Azul agua Blu acqua Waterblauw
+\definecolor [RAL5022] [h=252850] % Nachtblau Night blue Bleu nocturne Azul noche Blu notte Nachtblauw
+\definecolor [RAL5023] [h=49678D] % Fernblau Distant blue Bleu distant Azul lejanía Blu distante Verblauw
+\definecolor [RAL5024] [h=5D9B9B] % Pastellblau Pastel blue Bleu pastel Azul pastel Blu pastello Pastelblauw
+\definecolor [RAL5025] [h=2A6478] % Perlenzian Pearl gentian blue Gentiane nacré Gencian perlado Blu genziana perlato Parelmoerblauw
+\definecolor [RAL5026] [h=102C54] % Perlnachtblau Pearl night blue Bleu nuit nacré Azul noche perlado Blu notte perlato Parelmoer nachtblauw
+\definecolor [RAL6000] [h=316650] % Patinagrün Patina green Vert patine Verde patina Verde patina Patinagroen
+\definecolor [RAL6001] [h=287233] % Smaragdgrün Emerald green Vert émeraude Verde esmeralda Verde smeraldo Smaragdgroen
+\definecolor [RAL6002] [h=2D572C] % Laubgrün Leaf green Vert feuillage Verde hoja Verde foglia Loofgroen
+\definecolor [RAL6003] [h=424632] % Olivgrün Olive green Vert olive Verde oliva Verde oliva Olijfgroen
+\definecolor [RAL6004] [h=1F3A3D] % Blaugrün Blue green Vert bleu Verde azulado Verde bluastro Blauwgroen
+\definecolor [RAL6005] [h=2F4538] % Moosgrün Moss green Vert mousse Verde musgo Verde muschio Mosgroen
+\definecolor [RAL6006] [h=3E3B32] % Grauoliv Grey olive Olive gris Oliva grisáceo Oliva grigiastro Grijs olijfgroen
+\definecolor [RAL6007] [h=343B29] % Flaschengrün Bottle green Vert bouteille Verde botella Verde bottiglia Flessegroen
+\definecolor [RAL6008] [h=39352A] % Braungrün Brown green Vert brun Verde parduzco Verde brunastro Bruingroen
+\definecolor [RAL6009] [h=31372B] % Tannengrün Fir green Vert sapin Verde abeto Verde abete Dennegroen
+\definecolor [RAL6010] [h=35682D] % Grasgrün Grass green Vert herbe Verde hierba Verde erba Grasgroen
+\definecolor [RAL6011] [h=587246] % Resedagrün Reseda green Vert réséda Verde reseda Verde reseda Resedagroen
+\definecolor [RAL6012] [h=343E40] % Schwarzgrün Black green Vert noir Verde negruzco Verde nerastro Zwartgroen
+\definecolor [RAL6013] [h=6C7156] % Schilfgrün Reed green Vert jonc Verde caña Verde canna Rietgroen
+\definecolor [RAL6014] [h=47402E] % Gelboliv Yellow olive Olive jaune Amarillo oliva Oliva giallastro Geel olijfgroen
+\definecolor [RAL6015] [h=3B3C36] % Schwarzoliv Black olive Olive noir Oliva negruzco Oliva nerastro Zwart olijfgroen
+\definecolor [RAL6016] [h=1E5945] % Türkisgrün Turquoise green Vert turquoise Verde turquesa Verde turchese Turkooisgroen
+\definecolor [RAL6017] [h=4C9141] % Maigrün May green Vert mai Verde mayo Verde maggio Meigroen
+\definecolor [RAL6018] [h=57A639] % Gelbgrün Yellow green Vert jaune Verde amarillento Verde giallastro Geelgroen
+\definecolor [RAL6019] [h=BDECB6] % Weißgrün Pastel green Vert blanc Verde lanquecino Verde biancastro Witgroen
+\definecolor [RAL6020] [h=2E3A23] % Chromoxidgrün Chrome green Vert oxyde chromique Verde cromo Verde cromo Chroomoxyde groen
+\definecolor [RAL6021] [h=89AC76] % Blassgrün Pale green Vert pâle Verde pálido Verde pallido Bleekgroen
+\definecolor [RAL6022] [h=25221B] % Braunoliv Olive drab Olive brun Oliva parduzco Oliva brunastro Bruin olijfgroen
+\definecolor [RAL6024] [h=308446] % Verkehrsgrün Traffic green Vert signalisation Verde tráfico Verde traffico Verkeersgroen
+\definecolor [RAL6025] [h=3D642D] % Farngrün Fern green Vert fougère Verde helecho Verde felce Varengroen
+\definecolor [RAL6026] [h=015D52] % Opalgrün Opal green Vert opale Verde opalo Verde opale Opaalgroen
+\definecolor [RAL6027] [h=84C3BE] % Lichtgrün Light green Vert clair Verde luminoso Verde chiaro Lichtgroen
+\definecolor [RAL6028] [h=2C5545] % Kieferngrün Pine green Vert pin Verde pino Verde pino Pijnboomgroen
+\definecolor [RAL6029] [h=20603D] % Minzgrün Mint green Vert menthe Verde menta Verde menta Mintgroen
+\definecolor [RAL6032] [h=317F43] % Signalgrün Signal green Vert de sécurité Verde señales Verde segnale Signaalgroen
+\definecolor [RAL6033] [h=497E76] % Minttürkis Mint turquoise Turquoise menthe Turquesa menta Turchese menta Mintturquoise
+\definecolor [RAL6034] [h=7FB5B5] % Pastelltürkis Pastel turquoise Turquoise pastel Turquesa pastel Turchese pastello Pastelturquoise
+\definecolor [RAL6035] [h=1C542D] % Perlgrün Pearl green Vert nacré Verde perlado Verde perlato Parelmoer donkergroen
+\definecolor [RAL6036] [h=193737] % Perlopalgrün Pearl opal green Vert opal nacré Verde ópalo perlado Verde opalo perlato Parelmoer lichtgroen
+\definecolor [RAL6037] [h=008F39] % Reingrün Pure green Vert pur Verde puro Verde puro Zuivergroen
+\definecolor [RAL6038] [h=00BB2D] % Leuchtgrün Luminous green Vert brillant Verde brillante Verde brillante Briljantgroen
+\definecolor [RAL7000] [h=78858B] % Fehgrau Squirrel grey Gris petit-gris Gris ardilla Grigio vaio Pelsgrijs
+\definecolor [RAL7001] [h=8A9597] % Silbergrau Silver grey Gris argent Gris plata Grigio argento Zilvergrijs
+\definecolor [RAL7002] [h=7E7B52] % Olivgrau Olive grey Gris olive Gris oliva Grigio olivastro Olijfgrijs
+\definecolor [RAL7003] [h=6C7059] % Moosgrau Moss grey Gris mousse Gris musgo Grigio muschio Mosgrijs
+\definecolor [RAL7004] [h=969992] % Signalgrau Signal grey Gris de sécurité Gris señales Grigio segnale Signaalgrijs
+\definecolor [RAL7005] [h=646B63] % Mausgrau Mouse grey Gris souris Gris ratón Grigio topo Muisgrijs
+\definecolor [RAL7006] [h=6D6552] % Beigegrau Beige grey Gris beige Gris beige Grigio beige Beigegrijs
+\definecolor [RAL7008] [h=6A5F31] % Khakigrau Khaki grey Gris kaki Gris caqui Grigio kaki Kakigrijs
+\definecolor [RAL7009] [h=4D5645] % Grüngrau Green grey Gris vert Gris verdoso Grigio verdastro Groengrijs
+\definecolor [RAL7010] [h=4C514A] % Zeltgrau Tarpaulin grey Gris tente Gris lona Grigio tenda Zeildoekgrijs
+\definecolor [RAL7011] [h=434B4D] % Eisengrau Iron grey Gris fer Gris hierro Grigio ferro IJzergrijs
+\definecolor [RAL7012] [h=4E5754] % Basaltgrau Basalt grey Gris basalte Gris basalto Grigio basalto Bazaltgrijs
+\definecolor [RAL7013] [h=464531] % Braungrau Brown grey Gris brun Gris parduzco Grigio brunastro Bruingrijs
+\definecolor [RAL7015] [h=434750] % Schiefergrau Slate grey Gris ardoise Gris pizarra Grigio ardesia Leigrijs
+\definecolor [RAL7016] [h=293133] % Anthrazitgrau Anthracite grey Gris anthracite Gris antracita Grigio antracite Antracietgrijs
+\definecolor [RAL7021] [h=23282B] % Schwarzgrau Black grey Gris noir Gris negruzco Grigio nerastro Zwartgrijs
+\definecolor [RAL7022] [h=332F2C] % Umbragrau Umbra grey Gris terre d’ombre Gris sombra Grigio ombra Ombergrijs
+\definecolor [RAL7023] [h=686C5E] % Betongrau Concrete grey Gris béton Gris hormigón Grigio calcestruzzo Betongrijs
+\definecolor [RAL7024] [h=474A51] % Graphitgrau Graphite grey Gris graphite Gris grafita Grigio grafite Grafietgrijs
+\definecolor [RAL7026] [h=2F353B] % Granitgrau Granite grey Gris granit Gris granito Grigio granito Granietgrijs
+\definecolor [RAL7030] [h=8B8C7A] % Steingrau Stone grey Gris pierre Gris piedra Grigio pietra Steengrijs
+\definecolor [RAL7031] [h=474B4E] % Blaugrau Blue grey Gris bleu Gris azulado Grigio bluastro Blauwgrijs
+\definecolor [RAL7032] [h=B8B799] % Kieselgrau Pebble grey Gris silex Gris guijarro Grigio ghiaia Kiezelgrijs
+\definecolor [RAL7033] [h=7D8471] % Zementgrau Cement grey Gris ciment Gris cemento Grigio cemento Cementgrijs
+\definecolor [RAL7034] [h=8F8B66] % Gelbgrau Yellow grey Gris jaune Gris amarillento Grigio giallastro Geelgrijs
+\definecolor [RAL7035] [h=D7D7D7] % Lichtgrau Light grey Gris clair Gris luminoso Grigio luce Lichtgrijs
+\definecolor [RAL7036] [h=7F7679] % Platingrau Platinum grey Gris platine Gris platino Grigio platino Platinagrijs
+\definecolor [RAL7037] [h=7D7F7D] % Staubgrau Dusty grey Gris poussière Gris polvo Grigio polvere Stofgrijs
+\definecolor [RAL7038] [h=B5B8B1] % Achatgrau Agate grey Gris agate Gris ágata Grigio agata Agaatgrijs
+\definecolor [RAL7039] [h=6C6960] % Quarzgrau Quartz grey Gris quartz Gris cuarzo Grigio quarzo Kwartsgrijs
+\definecolor [RAL7040] [h=9DA1AA] % Fenstergrau Window grey Gris fenêtre Gris ventana Grigio finestra Venstergrijs
+\definecolor [RAL7042] [h=8D948D] % Verkehrsgrau A Traffic grey A Gris signalisation A Gris tráfico A Grigio traffico A Verkeesgrijs A
+\definecolor [RAL7043] [h=4E5452] % Verkehrsgrau B Traffic grey B Gris signalisation B Gris tráfico B Grigio traffico B Verkeersgrijs B
+\definecolor [RAL7044] [h=CAC4B0] % Seidengrau Silk grey Gris soie Gris seda Grigio seta Zijdegrijs
+\definecolor [RAL7045] [h=909090] % Telegrau 1 Telegrey 1 Telegris 1 Gris tele 1 Tele grigio 1 Telegrijs 1
+\definecolor [RAL7046] [h=82898F] % Telegrau 2 Telegrey 2 Telegris 2 Gris tele 2 Tele grigio 2 Telegrijs 2
+\definecolor [RAL7047] [h=D0D0D0] % Telegrau 4 Telegrey 4 Telegris 4 Gris tele 4 Tele grigio 4 Telegrijs 4
+\definecolor [RAL7048] [h=898176] % Perlmausgrau Pearl mouse grey Gris souris nacré Gris musgo perlado Grigio topo perlato Parelmoer-muisgrijs
+\definecolor [RAL8000] [h=826C34] % Grünbraun Green brown Brun vert Pardo verdoso Marrone verdastro Groenbruin
+\definecolor [RAL8001] [h=955F20] % Ockerbraun Ochre brown Brun terre de Sienne Pardo ocre Marrone ocra Okerbruin
+\definecolor [RAL8002] [h=6C3B2A] % Signalbraun Signal brown Brun de sécurité Marrón señales Marrone segnale Signaalbruin
+\definecolor [RAL8003] [h=734222] % Lehmbraun Clay brown Brun argile Pardo arcilla Marrone fango Leembruin
+\definecolor [RAL8004] [h=8E402A] % Kupferbraun Copper brown Brun cuivré Pardo cobre Marrone rame Koperbruin
+\definecolor [RAL8007] [h=59351F] % Rehbraun Fawn brown Brun fauve Pardo corzo Marrone capriolo Reebruin
+\definecolor [RAL8008] [h=6F4F28] % Olivbraun Olive brown Brun olive Pardo oliva Marrone oliva Olijfbruin
+\definecolor [RAL8011] [h=5B3A29] % Nussbraun Nut brown Brun noisette Pardo nuez Marrone noce Notebruin
+\definecolor [RAL8012] [h=592321] % Rotbraun Red brown Brun rouge Pardo rojo Marrone rossiccio Roodbruin
+\definecolor [RAL8014] [h=382C1E] % Sepiabraun Sepia brown Brun sépia Sepia Marrone seppia Sepiabruin
+\definecolor [RAL8015] [h=633A34] % Kastanienbraun Chestnut brown Marron Castaño Marrone castagna Kastanjebruin
+\definecolor [RAL8016] [h=4C2F27] % Mahagonibraun Mahogany brown Brun acajou Caoba Marrone mogano Mahoniebruin
+\definecolor [RAL8017] [h=45322E] % Schokoladenbraun Chocolate brown Brun chocolat Chocolate Marrone cioccolata Chocoladebruin
+\definecolor [RAL8019] [h=403A3A] % Graubraun Grey brown Brun gris Pardo grisáceo Marrone grigiastro Grijsbruin
+\definecolor [RAL8022] [h=212121] % Schwarzbraun Black brown Brun noir Pardo negruzco Marrone nerastro Zwartbruin
+\definecolor [RAL8023] [h=A65E2E] % Orangebraun Orange brown Brun orangé Pardo anaranjado Marrone arancio Oranjebruin
+\definecolor [RAL8024] [h=79553D] % Beigebraun Beige brown Brun beige Pardo beige Marrone beige Beigebruin
+\definecolor [RAL8025] [h=755C48] % Blassbraun Pale brown Brun pâle Pardo pálido Marrone pallido Bleekbruin
+\definecolor [RAL8028] [h=4E3B31] % Terrabraun Terra brown Brun terre Marrón tierra Marrone terra Terrabruin
+\definecolor [RAL8029] [h=763C28] % Perlkupfer Pearl copper Cuivre nacré Cobre perlado Rame perlato Parelmoerkoper
+\definecolor [RAL9001] [h=FDF4E3] % Cremeweiß Cream Blanc crème Blanco crema Bianco crema Crèmewit
+\definecolor [RAL9002] [h=E7EBDA] % Grauweiß Grey white Blanc gris Blanco grisáceo Bianco grigiastro Grijswit
+\definecolor [RAL9003] [h=F4F4F4] % Signalweiß Signal white Blanc de sécurité Blanco señales Bianco segnale Signaalwit
+\definecolor [RAL9004] [h=282828] % Signalschwarz Signal black Noir de sécurité Negro señales Nero segnale Signaalzwart
+\definecolor [RAL9005] [h=0A0A0A] % Tiefschwarz Jet black Noir foncé Negro intenso Nero intenso Gitzwart
+\definecolor [RAL9006] [h=A5A5A5] % Weißaluminium White aluminium Aluminium blanc Aluminio blanco Aluminio brillante Blank aluminiumkleurig
+\definecolor [RAL9007] [h=8F8F8F] % Graualuminium Grey aluminium Aluminium gris Aluminio gris Aluminio grigiastro Grijs aluminiumkleurig
+\definecolor [RAL9010] [h=FFFFFF] % Reinweiß Pure white Blanc pur Blanco puro Bianco puro Zuiverwit
+\definecolor [RAL9011] [h=1C1C1C] % Graphitschwarz Graphite black Noir graphite Negro grafito Nero grafite Grafietzwart
+\definecolor [RAL9016] [h=F6F6F6] % Verkehrsweiß Traffic white Blanc signalisation Blanco tráfico Bianco traffico Verkeerswit
+\definecolor [RAL9017] [h=1E1E1E] % Verkehrsschwarz Traffic black Noir signalisation Negro tráfico Nero traffico Verkeerszwart
+\definecolor [RAL9018] [h=D7D7D7] % Papyrusweiß Papyrus white Blanc papyrus Blanco papiro Bianco papiro Papyruswit
+\definecolor [RAL9022] [h=9C9C9C] % Perlhellgrau Pearl light grey Gris clair nacré Gris claro perlado Grigio chiaro perlato Parelmoer lichtgrijs
+\definecolor [RAL9023] [h=828282] % Perldunkelgrau Pearl dark grey Gris fonçé nacré Gris oscuro perlado Grigio scuro perlato Parelmoer donkergrijs
+
+\stopprotectedcolors
+
+\endinput
+
+
diff --git a/Master/texmf-dist/tex/context/base/colo-imp-rgb.mkiv b/Master/texmf-dist/tex/context/base/mkiv/colo-imp-rgb.mkiv
index d7b691fccb2..58b2ca42c2a 100644
--- a/Master/texmf-dist/tex/context/base/colo-imp-rgb.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/colo-imp-rgb.mkiv
@@ -38,6 +38,9 @@
\definecolor [lightred] [r=1, g=0, b=0]
\definecolor [lightgreen] [r=0, g=1, b=0]
\definecolor [lightblue] [r=0, g=0, b=1]
+\definecolor [lightcyan] [r=0, g=1, b=1]
+\definecolor [lightmagenta] [r=1, g=0, b=1]
+\definecolor [lightyellow] [r=1, g=1, b=0]
\definecolor [middlered] [r=.8, g=0, b=0]
\definecolor [middlegreen] [r=0, g=.8, b=0]
@@ -87,12 +90,15 @@
\definecolor [donkercyaan] [darkcyan]
\definecolor [middelcyaan] [middlecyan]
+ \definecolor [lichtcyaan] [lightcyan]
\definecolor [donkermagenta] [darkmagenta]
\definecolor [middelmagenta] [middlemagenta]
+ \definecolor [lichtmagenta] [lightmagenta]
\definecolor [donkergeel] [darkyellow]
\definecolor [middelgeel] [middleyellow]
+ \definecolor [lichtgeel] [lightyellow]
\definecolor [donkergrijs] [darkgray]
\definecolor [middengrijs] [middlegray]
@@ -128,12 +134,15 @@
\definecolor [dunkelcyan] [darkcyan]
\definecolor [mittelcyan] [middlecyan]
+ \definecolor [hellcyan] [lightcyan]
\definecolor [dunkelmagenta] [darkmagenta]
\definecolor [mittelmagenta] [middlemagenta]
+ \definecolor [hellmagenta] [lightmagenta]
\definecolor [dunkelgelb] [darkyellow]
\definecolor [mittelgelb] [middleyellow]
+ \definecolor [hellgelb] [lightyellow]
\definecolor [dunkelgrau] [darkgray]
\definecolor [mittelgrau] [middlegray]
@@ -168,12 +177,15 @@
\definecolor [tmaveazurova] [darkcyan]
\definecolor [stredneazurova] [middlecyan]
+ \definecolor [svelteazurova] [lightcyan]
\definecolor [tmavefialova] [darkmagenta]
\definecolor [strednefialova] [middlemagenta]
+ \definecolor [sveltefialova] [lightmagenta]
\definecolor [tmavezluta] [darkyellow]
\definecolor [strednezluta] [middleyellow]
+ \definecolor [sveltezluta] [lightyellow]
\definecolor [tmaveseda] [darkgray]
\definecolor [stredneseda] [middlegray]
@@ -210,14 +222,16 @@
\definecolor [bluchiaro] [lightblue]
\definecolor [azzurroscuro] [darkcyan]
- \definecolor [azzurrochiaro] [middlecyan]
+ \definecolor [azzurromedio] [middlecyan]
+ \definecolor [azzurrochiaro] [lightcyan]
\definecolor [cremisiscuro] [darkmagenta]
- \definecolor [cremisichiaro] [middlemagenta]
-
+ \definecolor [cremisimedio] [middlemagenta]
+ \definecolor [cremisichiaro] [lightmagenta]
\definecolor [gialloscuro] [darkyellow]
\definecolor [giallomedio] [middleyellow]
+ \definecolor [giallochiaro] [lightyellow]
\definecolor [grigioscuro] [darkgray]
\definecolor [grigiomedio] [middlegray]
@@ -225,6 +239,50 @@
\stopinterface
+\startinterface french
+
+ \definecolor [rouge] [red]
+ \definecolor [vert] [green]
+ \definecolor [bleu] [blue]
+
+ \definecolor [cyan] [cyan]
+ \definecolor [magenta] [magenta]
+ \definecolor [jaune] [yellow]
+
+ \definecolor [blanche] [white]
+ \definecolor [gris] [gray]
+ \definecolor [noir] [black]
+
+ \definecolor [rougefoncé] [darkred]
+ \definecolor [rougemoyen] [middlered]
+ \definecolor [rougeclair] [lightred]
+
+ \definecolor [vertfoncé] [darkgreen]
+ \definecolor [vertmoyen] [middlegreen]
+ \definecolor [vertclair] [lightgreen]
+
+ \definecolor [bleufoncé] [darkblue]
+ \definecolor [bleumoyen] [middleblue]
+ \definecolor [bleuclair] [lightblue]
+
+ \definecolor [cyanfoncé] [darkcyan]
+ \definecolor [cyanmoyen] [middlecyan]
+ \definecolor [cyanclair] [lightcyan]
+
+ \definecolor [magentafoncé] [darkmagenta]
+ \definecolor [magentamoyen] [middlemagenta]
+ \definecolor [magentaclair] [lightmagenta]
+
+ \definecolor [jaunefoncé] [darkyellow]
+ \definecolor [jaunemoyen] [middleyellow]
+ \definecolor [jauneclair] [lightyellow]
+
+ \definecolor [grisfoncé] [darkgray]
+ \definecolor [grismoyen] [middlegray]
+ \definecolor [grisclair] [lightgray]
+
+\stopinterface
+
\startinterface romanian
\definecolor [rosu] [red]
@@ -253,12 +311,15 @@
\definecolor [cianinchis] [darkcyan]
\definecolor [cianmediu] [middlecyan]
+ \definecolor [ciandeschis] [lightcyan]
\definecolor [magentainchis] [darkmagenta]
\definecolor [magentamediu] [middlemagenta]
+ \definecolor [magentadeschis] [lightmagenta]
\definecolor [galbeninchis] [darkyellow]
\definecolor [galbenmediu] [middleyellow]
+ \definecolor [galbendeschis] [lightyellow]
\definecolor [griinchis] [darkgray]
\definecolor [grimediu] [middlegray]
@@ -269,6 +330,7 @@
%D Bonus (needed for FO test):
\definecolor [orange] [r=1, g=.5]
+\definecolor [lightorange] [r=1, g=.5]
\definecolor [middleorange] [r=.6,g=.3]
\definecolor [darkorange] [r=.4,g=.2]
diff --git a/Master/texmf-dist/tex/context/base/colo-imp-x11.mkiv b/Master/texmf-dist/tex/context/base/mkiv/colo-imp-x11.mkiv
index 45d3aac6248..98a71354d2f 100644
--- a/Master/texmf-dist/tex/context/base/colo-imp-x11.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/colo-imp-x11.mkiv
@@ -1,5 +1,5 @@
%D \module
-%D [ file=colo-x11,
+%D [ file=colo-imp-x11,
%D version=2009.11.13,
%D title=\CONTEXT\ Color Macros,
%D subtitle=X11,
@@ -9,11 +9,10 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-%D Standard X11 rgb colors (from \type {/usr/share/X11/rgb.txt}):
+%D Standard X11 rgb colors (from, e.g. \type {/usr/share/X11/rgb.txt}).
+%D Note that we have dropped the \quote{grey} spelling variants.
-\doifnotmode{mkiv} {
- \input colo-hex.mkii
-}
+\startprotectedcolors
\definecolor [snow] [h=fffafa]
\definecolor [ghostwhite] [h=f8f8ff]
@@ -43,20 +42,14 @@
\definecolor [white] [s=1]
\definecolor [black] [s=0]
\definecolor [darkslategray] [h=2f4f4f]
-\definecolor [darkslategrey] [darkslategray]
\definecolor [dimgray] [s=0.41]
-\definecolor [dimgrey] [dimgray]
\definecolor [slategray] [h=708090]
-\definecolor [slategrey] [slategray]
\definecolor [lightslategray] [h=778899]
-\definecolor [lightslategrey] [lightslategray]
\definecolor [gray] [s=0.75]
-\definecolor [grey] [gray]
-\definecolor [lightgrey] [s=0.83]
-\definecolor [lightgray] [lightgrey]
+\definecolor [lightgray] [s=0.83]
\definecolor [midnightblue] [h=191970]
\definecolor [navy] [h=000080]
-\definecolor [navyblue] [navy]
+\definecolor [navyblue] [h=000080]
\definecolor [cornflowerblue] [h=6495ed]
\definecolor [darkslateblue] [h=483d8b]
\definecolor [slateblue] [h=6a5acd]
@@ -464,214 +457,22 @@
\definecolor [thistle2] [h=eed2ee]
\definecolor [thistle3] [h=cdb5cd]
\definecolor [thistle4] [h=8b7b8b]
-\definecolor [gray0] [s=0.00]
-\definecolor [grey0] [gray0]
-\definecolor [gray1] [s=0.01]
-\definecolor [grey1] [gray1]
-\definecolor [gray2] [s=0.02]
-\definecolor [grey2] [gray2]
-\definecolor [gray3] [s=0.03]
-\definecolor [grey3] [gray3]
-\definecolor [gray4] [s=0.04]
-\definecolor [grey4] [gray4]
-\definecolor [gray5] [s=0.05]
-\definecolor [grey5] [gray5]
-\definecolor [gray6] [s=0.06]
-\definecolor [grey6] [gray6]
-\definecolor [gray7] [s=0.07]
-\definecolor [grey7] [gray7]
-\definecolor [gray8] [s=0.08]
-\definecolor [grey8] [gray8]
-\definecolor [gray9] [s=0.09]
-\definecolor [grey9] [gray9]
-\definecolor [gray10] [s=0.10]
-\definecolor [grey10] [gray10]
-\definecolor [gray11] [s=0.11]
-\definecolor [grey11] [gray11]
-\definecolor [gray12] [s=0.12]
-\definecolor [grey12] [gray12]
-\definecolor [gray13] [s=0.13]
-\definecolor [grey13] [gray13]
-\definecolor [gray14] [s=0.14]
-\definecolor [grey14] [gray14]
-\definecolor [gray15] [s=0.15]
-\definecolor [grey15] [gray15]
-\definecolor [gray16] [s=0.16]
-\definecolor [grey16] [gray16]
-\definecolor [gray17] [s=0.17]
-\definecolor [grey17] [gray17]
-\definecolor [gray18] [s=0.18]
-\definecolor [grey18] [gray18]
-\definecolor [gray19] [s=0.19]
-\definecolor [grey19] [gray19]
-\definecolor [gray20] [s=0.20]
-\definecolor [grey20] [gray20]
-\definecolor [gray21] [s=0.21]
-\definecolor [grey21] [gray21]
-\definecolor [gray22] [s=0.22]
-\definecolor [grey22] [gray22]
-\definecolor [gray23] [s=0.23]
-\definecolor [grey23] [gray23]
-\definecolor [gray24] [s=0.24]
-\definecolor [grey24] [gray24]
-\definecolor [gray25] [s=0.25]
-\definecolor [grey25] [gray25]
-\definecolor [gray26] [s=0.26]
-\definecolor [grey26] [gray26]
-\definecolor [gray27] [s=0.27]
-\definecolor [grey27] [gray27]
-\definecolor [gray28] [s=0.28]
-\definecolor [grey28] [gray28]
-\definecolor [gray29] [s=0.29]
-\definecolor [grey29] [gray29]
-\definecolor [gray30] [s=0.30]
-\definecolor [grey30] [gray30]
-\definecolor [gray31] [s=0.31]
-\definecolor [grey31] [gray31]
-\definecolor [gray32] [s=0.32]
-\definecolor [grey32] [gray32]
-\definecolor [gray33] [s=0.33]
-\definecolor [grey33] [gray33]
-\definecolor [gray34] [s=0.34]
-\definecolor [grey34] [gray34]
-\definecolor [gray35] [s=0.35]
-\definecolor [grey35] [gray35]
-\definecolor [gray36] [s=0.36]
-\definecolor [grey36] [gray36]
-\definecolor [gray37] [s=0.37]
-\definecolor [grey37] [gray37]
-\definecolor [gray38] [s=0.38]
-\definecolor [grey38] [gray38]
-\definecolor [gray39] [s=0.39]
-\definecolor [grey39] [gray39]
-\definecolor [gray40] [s=0.40]
-\definecolor [grey40] [gray40]
-\definecolor [gray41] [s=0.41]
-\definecolor [grey41] [gray41]
-\definecolor [gray42] [s=0.42]
-\definecolor [grey42] [gray42]
-\definecolor [gray43] [s=0.43]
-\definecolor [grey43] [gray43]
-\definecolor [gray44] [s=0.44]
-\definecolor [grey44] [gray44]
-\definecolor [gray45] [s=0.45]
-\definecolor [grey45] [gray45]
-\definecolor [gray46] [s=0.46]
-\definecolor [grey46] [gray46]
-\definecolor [gray47] [s=0.47]
-\definecolor [grey47] [gray47]
-\definecolor [gray48] [s=0.48]
-\definecolor [grey48] [gray48]
-\definecolor [gray49] [s=0.49]
-\definecolor [grey49] [gray49]
-\definecolor [gray50] [s=0.50]
-\definecolor [grey50] [gray50]
-\definecolor [gray51] [s=0.51]
-\definecolor [grey51] [gray51]
-\definecolor [gray52] [s=0.52]
-\definecolor [grey52] [gray52]
-\definecolor [gray53] [s=0.53]
-\definecolor [grey53] [gray53]
-\definecolor [gray54] [s=0.54]
-\definecolor [grey54] [gray54]
-\definecolor [gray55] [s=0.55]
-\definecolor [grey55] [gray55]
-\definecolor [gray56] [s=0.56]
-\definecolor [grey56] [gray56]
-\definecolor [gray57] [s=0.57]
-\definecolor [grey57] [gray57]
-\definecolor [gray58] [s=0.58]
-\definecolor [grey58] [gray58]
-\definecolor [gray59] [s=0.59]
-\definecolor [grey59] [gray59]
-\definecolor [gray60] [s=0.60]
-\definecolor [grey60] [gray60]
-\definecolor [gray61] [s=0.61]
-\definecolor [grey61] [gray61]
-\definecolor [gray62] [s=0.62]
-\definecolor [grey62] [gray62]
-\definecolor [gray63] [s=0.63]
-\definecolor [grey63] [gray63]
-\definecolor [gray64] [s=0.64]
-\definecolor [grey64] [gray64]
-\definecolor [gray65] [s=0.65]
-\definecolor [grey65] [gray65]
-\definecolor [gray66] [s=0.66]
-\definecolor [grey66] [gray66]
-\definecolor [gray67] [s=0.67]
-\definecolor [grey67] [gray67]
-\definecolor [gray68] [s=0.68]
-\definecolor [grey68] [gray68]
-\definecolor [gray69] [s=0.69]
-\definecolor [grey69] [gray69]
-\definecolor [gray70] [s=0.70]
-\definecolor [grey70] [gray70]
-\definecolor [gray71] [s=0.71]
-\definecolor [grey71] [gray71]
-\definecolor [gray72] [s=0.72]
-\definecolor [grey72] [gray72]
-\definecolor [gray73] [s=0.73]
-\definecolor [grey73] [gray73]
-\definecolor [gray74] [s=0.74]
-\definecolor [grey74] [gray74]
-\definecolor [gray75] [s=0.75]
-\definecolor [grey75] [gray75]
-\definecolor [gray76] [s=0.76]
-\definecolor [grey76] [gray76]
-\definecolor [gray77] [s=0.77]
-\definecolor [grey77] [gray77]
-\definecolor [gray78] [s=0.78]
-\definecolor [grey78] [gray78]
-\definecolor [gray79] [s=0.79]
-\definecolor [grey79] [gray79]
-\definecolor [gray80] [s=0.80]
-\definecolor [grey80] [gray80]
-\definecolor [gray81] [s=0.81]
-\definecolor [grey81] [gray81]
-\definecolor [gray82] [s=0.82]
-\definecolor [grey82] [gray82]
-\definecolor [gray83] [s=0.83]
-\definecolor [grey83] [gray83]
-\definecolor [gray84] [s=0.84]
-\definecolor [grey84] [gray84]
-\definecolor [gray85] [s=0.85]
-\definecolor [grey85] [gray85]
-\definecolor [gray86] [s=0.86]
-\definecolor [grey86] [gray86]
-\definecolor [gray87] [s=0.87]
-\definecolor [grey87] [gray87]
-\definecolor [gray88] [s=0.88]
-\definecolor [grey88] [gray88]
-\definecolor [gray89] [s=0.89]
-\definecolor [grey89] [gray89]
-\definecolor [gray90] [s=0.90]
-\definecolor [grey90] [gray90]
-\definecolor [gray91] [s=0.91]
-\definecolor [grey91] [gray91]
-\definecolor [gray92] [s=0.92]
-\definecolor [grey92] [gray92]
-\definecolor [gray93] [s=0.93]
-\definecolor [grey93] [gray93]
-\definecolor [gray94] [s=0.94]
-\definecolor [grey94] [gray94]
-\definecolor [gray95] [s=0.95]
-\definecolor [grey95] [gray95]
-\definecolor [gray96] [s=0.96]
-\definecolor [grey96] [gray96]
-\definecolor [gray97] [s=0.97]
-\definecolor [grey97] [gray97]
-\definecolor [gray98] [s=0.98]
-\definecolor [grey98] [gray98]
-\definecolor [gray99] [s=0.99]
-\definecolor [grey99] [gray99]
-\definecolor [gray100] [s=1.00]
-\definecolor [grey100] [gray100]
-\definecolor [darkgrey] [s=0.66]
-\definecolor [darkgray] [darkgrey]
+
+% A lot of useless grays (since one can always specify \color[s=.XX]:
+
+\dostepwiserecurse{0}{100}{1}{
+ \definecolor [gray#1] [s=\cldcontext{#1/100}]
+}
+
+% These were missing in the original specification, but were added later:
+
+\definecolor [darkgray] [s=0.66]
\definecolor [darkblue] [h=00008b]
\definecolor [darkcyan] [h=008b8b]
\definecolor [darkmagenta] [h=8b008b]
\definecolor [darkred] [h=8b0000]
\definecolor [lightgreen] [h=90ee90]
+\stopprotectedcolors
+
\endinput
diff --git a/Master/texmf-dist/tex/context/base/colo-imp-xwi.mkiv b/Master/texmf-dist/tex/context/base/mkiv/colo-imp-xwi.mkiv
index 557e9c57c54..57fe7965b7e 100644
--- a/Master/texmf-dist/tex/context/base/colo-imp-xwi.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/colo-imp-xwi.mkiv
@@ -8,11 +8,13 @@
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%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 I've forgotten where I got these definitions from, but maybe
-%D they can be of use.
+%D they can be of use.
+
+\startprotectedcolors
\definecolor [aliceblue] [r=0.94,g=0.97,b=1.00]
\definecolor [antiquewhite] [r=0.98,g=0.92,b=0.84]
@@ -127,7 +129,7 @@
\definecolor [snow] [r=1.00,g=0.98,b=0.98]
\definecolor [springgreen] [r=0.00,g=1.00,b=0.50]
\definecolor [steelblue] [r=0.27,g=0.51,b=0.71]
-\definecolor [tan ] [r=0.82,g=0.71,b=0.55]
+\definecolor [x11tan] [r=0.82,g=0.71,b=0.55]
\definecolor [thistle] [r=0.85,g=0.75,b=0.85]
\definecolor [tomato] [r=1.00,g=0.39,b=0.28]
\definecolor [turquoise] [r=0.25,g=0.88,b=0.82]
@@ -139,4 +141,6 @@
\definecolor [yellow] [r=1.00,g=1.00,b=0.00]
\definecolor [yellowgreen] [r=0.60,g=0.80,b=0.20]
+\stopprotectedcolors
+
\endinput
diff --git a/Master/texmf-dist/tex/context/base/colo-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/colo-ini.lua
index 81adfa68091..1a055242b18 100644
--- a/Master/texmf-dist/tex/context/base/colo-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/colo-ini.lua
@@ -362,7 +362,7 @@ local function defineprocesscolor(name,str,global,freeze) -- still inconsistent
definecolor(name, register_color(name,'rgb', tonumber(r) or 0, tonumber(g) or 0, tonumber(b) or 0), global)
else
local c, m, y, k = settings.c, settings.m, settings.y, settings.k
- if c or m or y or b then
+ if c or m or y or k then
definecolor(name, register_color(name,'cmyk',tonumber(c) or 0, tonumber(m) or 0, tonumber(y) or 0, tonumber(k) or 0), global)
else
local h, s, v = settings.h, settings.s, settings.v
@@ -576,10 +576,13 @@ local function mpcolor(model,ca,ta,default)
return formatters["(%s,%s,%s)"](cv[3],cv[4],cv[5])
end
end
- else
- default = default or 0 -- rgb !
- return formatters["(%s,%s,%s)"](default,default,default)
end
+ local tv = transparencyvalues[ta]
+ if tv then
+ return formatters["(%s,%s)"](tv[1],tv[2])
+ end
+ default = default or 0 -- rgb !
+ return formatters["(%s,%s,%s)"](default,default,default)
end
local function mpnamedcolor(name)
diff --git a/Master/texmf-dist/tex/context/base/colo-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/colo-ini.mkiv
index 1eb3d8d7e6e..26208edd448 100644
--- a/Master/texmf-dist/tex/context/base/colo-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/colo-ini.mkiv
@@ -16,6 +16,8 @@
\writestatus{loading}{ConTeXt Color Macros / Initialization}
+%D Todo: move color space in color attribute (last two bits)
+
%D This module implements color. Since \MKII\ and \MKIV\ use a completely
%D different approach, this module only implements a few generic mechanisms.
@@ -166,7 +168,7 @@
\unexpanded\def\startcolorpage {\startcolor[\ifx\maintextcolor\empty\defaulttextcolor\else\maintextcolor\fi]}
\unexpanded\def\stopcolorpage {\stopcolor}
-\def\getcolorattributevalue#1#2% obsolete, use \thecolorattribute instead ...
+\unexpanded\def\getcolorattributevalue#1#2% obsolete, use \thecolorattribute instead ...
{\begingroup
\colo_helpers_activate{#1}%
\normalexpanded{\endgroup\edef\noexpand#2%
@@ -248,7 +250,7 @@
\fi
%
\setfalse\c_colo_convert_gray
- \getvalue{\??colorconversions\directcolorsparameter\c!conversion}% could be a nice \ifcsname
+ \begincsname\??colorconversions\directcolorsparameter\c!conversion\endcsname
% too often:
\ifconditional\c_colo_rgb_supported \colo_helpers_show_message\m!colors{10}\v!rgb \fi
\ifconditional\c_colo_cmyk_supported\colo_helpers_show_message\m!colors{10}\v!cmyk\fi
@@ -361,25 +363,73 @@
%D This saves us some typing in for instance the modules that
%D deal with pretty verbatim typesetting.
-\let\m_colo_palets_tmp\empty
+\installcorenamespace{paletlist}
+\installcorenamespace{paletsize}
+
+\let\m_colo_palet\relax
+\let\c_colo_palet\relax
+
+\def\colo_palet_allocate#1%
+ {\expandafter\let \csname\??paletlist#1\endcsname\empty
+ \expandafter\newcount\csname\??paletsize#1\endcsname}
+
+\def\colo_palet_prepare#1%
+ {\edef\colo_palet_name{#1}%
+ \ifcsname\??paletlist\colo_palet_name\endcsname\else
+ \colo_palet_allocate\colo_palet_name
+ \fi
+ \edef\m_colo_palet{\begincsname\??paletlist\colo_palet_name\endcsname}%
+ \expandafter\let\expandafter\c_colo_palet\csname\??paletsize\colo_palet_name\endcsname}
+
+\def\colo_palet_extend#1%
+ {\addtocommalist{#1}\m_colo_palet
+ \expandafter\let\csname\??paletlist\colo_palet_name\endcsname\m_colo_palet
+ \advance\c_colo_palet\plusone}
+
+\unexpanded\def\doifelsecolorpalet#1%
+ {\ifcsname\??paletlist#1\endcsname
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\let\paletlist\empty
+\let\paletsize\!!zerocount
+
+\unexpanded\def\getpaletlist[#1]%
+ {\edef\paletlist{\begincsname\??paletlist#1\endcsname}}
+
+\unexpanded\def\getpaletsize[#1]%
+ {\ifcsname\??paletsize#1\endcsname
+ \edef\paletsize{\the\lastnamedcs}%
+ \else
+ \let\paletsize\!!zerocount
+ \fi}
\unexpanded\def\definepalet
- {\dodoubleargument\colo_palets_define}
-
-\unexpanded\def\colo_palets_define[#1][#2]% todo
- {\doifelseassignment{#2}
- {%\colo_helpers_show_message\m!colors6{#1}%
- \let\m_colo_palets_tmp\empty
- \setevalue{\??colorpaletspecification#1}{#2}%
- \processcommalist[#2]{\colo_palets_define_one{#1}}%
- \letvalue{\??colorpalet#1}\m_colo_palets_tmp
- \let\m_colo_palets_tmp\empty}
+ {\dotripleempty\colo_palets_define}
+
+\def\colo_palets_define
+ {\ifthirdargument
+ \expandafter\colo_palets_define_b
+ \else
+ \expandafter\colo_palets_define_a
+ \fi}
+
+\unexpanded\def\colo_palets_define_a[#1][#2][#3]%
+ {\colo_palet_prepare{#1}%
+ \doifelseassignment{#2}
+ {\setevalue{\??colorpaletspecification#1}{#2}%
+ \processcommalist[#2]{\colo_palets_define_one{#1}}}
{\ifcsname\??colorpaletspecification#2\endcsname
- \normalexpanded{\colo_palets_define[#1][\csname\??colorpaletspecification#2\endcsname]}%
+ \normalexpanded{\colo_palets_define[#1][\lastnamedcs]}%
\fi}}
-% \def\colo_palets_define_one#1#2% get rid of { } in #2
-% {\colo_palets_define_two{#1}[#2]}%
+\unexpanded\def\colo_palets_define_b[#1][#2][#3]%
+ {\colo_palet_prepare{#1}%
+ \setevalue{\??colorpaletspecification#1}{#2}%
+ \colo_palet_extend{#2}%
+ \colo_palets_define_assign{#1}{#2}{#3}}
\def\colo_palets_define_one#1#2% get rid of { }
{\doifelseassignment{#2} % catch empty entries
@@ -387,20 +437,14 @@
{\colo_palets_define_three{#1}{#2}}}
\def\colo_palets_define_two#1[#2=#3]%
- {\edef\m_colo_palets_tmp{\ifx\m_colo_palets_tmp\empty\else\m_colo_palets_tmp,\fi#2}%
+ {\colo_palet_extend{#2}%
\colo_palets_define_set{#1}{#2}{#3}}%
\def\colo_palets_define_three#1#2%
{\ifcsname\??colorpaletspecification#2\endcsname
- \processcommacommand[\csname\??colorpaletspecification#2\endcsname]{\colo_palets_define_one{#1}}%
+ \processcommacommand[\lastnamedcs]{\colo_palets_define_one{#1}}%
\fi}
-\let\paletsize\!!zerocount
-
-\unexpanded\def\getpaletsize[#1]% only works for valid k=v definitions
- {\getcommacommandsize[\csname\??colorpaletspecification#1\endcsname]%
- \edef\paletsize{\number\commalistsize}}
-
%D Instead of refering to colors, one can also directly specify
%D a color:
%D
@@ -427,7 +471,7 @@
\ifx\currentcolorpalet\empty
% seems to be a reset
\let\currentcolorprefix\empty
- \else\ifcsname\??colorpalet\currentcolorpalet\endcsname
+ \else\ifcsname\??paletlist\currentcolorpalet\endcsname
\edef\currentcolorprefix{#1:}%
\else
\colo_helpers_show_message\m!colors7\currentcolorpalet
@@ -506,13 +550,11 @@
%D
%D These speak for themselves. See \type {colo-ext} for usage.
-\def\negatecolorcomponent#1% #1 = \macro
+\unexpanded\def\negatecolorcomponent#1% #1 = \macro
{\scratchdimen\onepoint\advance\scratchdimen-#1\onepoint
\ifdim\scratchdimen<\zeropoint\scratchdimen\zeropoint\fi
\edef#1{\withoutpt\the\scratchdimen}}
-\let\negatedcolorcomponent\firstofoneargument
-
\def\negatedcolorcomponent#1%
{\ifdim\dimexpr\onepoint-#1\onepoint\relax<\zeropoint
\!!zerocount
@@ -520,7 +562,7 @@
\expandafter\withoutpt\the\dimexpr\onepoint-#1\onepoint\relax
\fi}
-\def\negatecolorcomponent#1% #1 = \macro
+\unexpanded\def\negatecolorcomponent#1% #1 = \macro
{\edef#1{\negatedcolorcomponent{#1}}}
%D \macros
@@ -619,16 +661,16 @@
\def\colo_helpers_fast_activate_yes#1%
{\ifcsname\??colorsetter\currentcolorprefix#1\endcsname
- \csname\??colorsetter\currentcolorprefix#1\endcsname
+ \lastnamedcs
\csname\??transparencysetter\currentcolorprefix#1\endcsname
\else\ifcsname\??colorsetter#1\endcsname
- \csname\??colorsetter#1\endcsname
+ \lastnamedcs
\csname\??transparencysetter#1\endcsname
\fi\fi}
\def\colo_helpers_fast_activate_nop#1%
{\ifcsname\??colorsetter#1\endcsname
- \csname\??colorsetter#1\endcsname
+ \lastnamedcs
\csname\??transparencysetter#1\endcsname
\fi}
@@ -646,17 +688,17 @@
\def\colo_helpers_activate_yes#1%
{\edef\currentcolorname{#1}%
\ifcsname\??colorsetter\currentcolorprefix\currentcolorname\endcsname
- \csname\??colorsetter\currentcolorprefix\currentcolorname\endcsname
+ \lastnamedcs
\csname\??transparencysetter\currentcolorprefix\currentcolorname\endcsname
\else\ifcsname\??colorsetter\currentcolorname\endcsname
- \csname\??colorsetter\currentcolorname\endcsname
+ \lastnamedcs
\csname\??transparencysetter\currentcolorname\endcsname
\fi\fi}
\def\colo_helpers_activate_nop#1%
{\edef\currentcolorname{#1}%
\ifcsname\??colorsetter\currentcolorname\endcsname
- \csname\??colorsetter\currentcolorname\endcsname
+ \lastnamedcs
\csname\??transparencysetter\currentcolorname\endcsname
\fi}
@@ -674,10 +716,10 @@
\unexpanded\def\dousecurrentcolorparameter
{\let\currentcolorname\currentcolorparameter % maybe only when success
\ifcsname\??colorsetter\currentcolorprefix\currentcolorparameter\endcsname
- \csname\??colorsetter\currentcolorprefix\currentcolorparameter\endcsname
+ \lastnamedcs
\csname\??transparencysetter\currentcolorprefix\currentcolorparameter\endcsname
\else\ifcsname\??colorsetter\currentcolorparameter\endcsname
- \csname\??colorsetter\currentcolorparameter\endcsname
+ \lastnamedcs
\csname\??transparencysetter\currentcolorparameter\endcsname
\fi\fi}
@@ -972,15 +1014,28 @@
\appendtoks \colo_helpers_initialize_maintextcolor \to \everyjob
\appendtoks \colo_helpers_initialize_maintextcolor \to \everysetupcolors
-\def\colo_helpers_inherited_direct_cs#1{\csname\??colorsetter \ifcsname\??colorsetter #1\endcsname#1\fi\endcsname}
-\def\colo_helpers_inherited_direct_ca#1{\csname\??colorattribute \ifcsname\??colorattribute #1\endcsname#1\fi\endcsname}
-\def\colo_helpers_inherited_direct_ts#1{\csname\??transparencysetter \ifcsname\??transparencysetter #1\endcsname#1\fi\endcsname}
-\def\colo_helpers_inherited_direct_ta#1{\csname\??transparencyattribute\ifcsname\??transparencyattribute#1\endcsname#1\fi\endcsname}
+\letvalue{\??colorsetter }\empty \letvalue{\??colorattribute }\!!zerocount
+\letvalue{\??transparencysetter}\empty \letvalue{\??transparencyattribute}\!!zerocount
+
+%def\colo_helpers_inherited_direct_cs#1{\csname\??colorsetter \ifcsname\??colorsetter #1\endcsname#1\fi\endcsname}
+%def\colo_helpers_inherited_direct_ca#1{\csname\??colorattribute \ifcsname\??colorattribute #1\endcsname#1\fi\endcsname}
+%def\colo_helpers_inherited_direct_ts#1{\csname\??transparencysetter \ifcsname\??transparencysetter #1\endcsname#1\fi\endcsname}
+%def\colo_helpers_inherited_direct_ta#1{\csname\??transparencyattribute\ifcsname\??transparencyattribute#1\endcsname#1\fi\endcsname}
-\def\colo_helpers_inherited_palet_ca#1#2{\csname\??colorattribute \ifcsname\??colorattribute \??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
-\def\colo_helpers_inherited_palet_cs#1#2{\csname\??colorsetter \ifcsname\??colorsetter \??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
-\def\colo_helpers_inherited_palet_ta#1#2{\csname\??transparencyattribute\ifcsname\??transparencyattribute\??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
-\def\colo_helpers_inherited_palet_ts#1#2{\csname\??transparencysetter \ifcsname\??transparencysetter \??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
+\def\colo_helpers_inherited_direct_cs#1{\ifcsname\??colorsetter #1\endcsname\lastnamedcs\fi}
+\def\colo_helpers_inherited_direct_ca#1{\ifcsname\??colorattribute #1\endcsname\lastnamedcs\else\!!zerocount\fi}
+\def\colo_helpers_inherited_direct_ts#1{\ifcsname\??transparencysetter #1\endcsname\lastnamedcs\fi}
+\def\colo_helpers_inherited_direct_ta#1{\ifcsname\??transparencyattribute#1\endcsname\lastnamedcs\else\!!zerocount\fi}
+
+% %def\colo_helpers_inherited_palet_cs#1#2{\csname\??colorsetter \ifcsname\??colorsetter \??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
+% %def\colo_helpers_inherited_palet_ca#1#2{\csname\??colorattribute \ifcsname\??colorattribute \??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
+% %def\colo_helpers_inherited_palet_ts#1#2{\csname\??transparencysetter \ifcsname\??transparencysetter \??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
+% %def\colo_helpers_inherited_palet_ta#1#2{\csname\??transparencyattribute\ifcsname\??transparencyattribute\??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
+%
+% \def\colo_helpers_inherited_palet_cs#1#2{\ifcsname\??colorsetter \??colorpalet#1:#2\endcsname\lastnamedcs\fi}
+% \def\colo_helpers_inherited_palet_ca#1#2{\ifcsname\??colorattribute \??colorpalet#1:#2\endcsname\lastnamedcs\else\!!zerocount\fi}
+% \def\colo_helpers_inherited_palet_ts#1#2{\ifcsname\??transparencysetter \??colorpalet#1:#2\endcsname\lastnamedcs}
+% \def\colo_helpers_inherited_palet_ta#1#2{\ifcsname\??transparencyattribute\??colorpalet#1:#2\endcsname\lastnamedcs\else\!!zerocount\fi}
\let\colo_helpers_set_value\setvalue
@@ -992,36 +1047,69 @@
\fi
\to \everysetupcolors
+% \def\colo_palets_define_set#1#2#3%
+% {\doifelseassignment{#3}% \definepalet[test][xx={y=.4}]
+% {\definecolor[\??colorpalet#1:#2][#3]%
+% \colo_helpers_set_value{\??colorsetter #1:#2}{\colo_helpers_inherited_palet_ca{#1}{#2}}%
+% \colo_helpers_set_value{\??colorattribute #1:#2}{\colo_helpers_inherited_palet_cs{#1}{#2}}%
+% \colo_helpers_set_value{\??transparencysetter #1:#2}{\colo_helpers_inherited_palet_ta{#1}{#2}}%
+% \colo_helpers_set_value{\??transparencyattribute#1:#2}{\colo_helpers_inherited_palet_ts{#1}{#2}}}
+% {\ifcsname\??colorsetter#3\endcsname % \definepalet[test][xx=green]
+% \colo_helpers_set_value{\??colorsetter #1:#2}{\colo_helpers_inherited_direct_cs{#3}}%
+% \colo_helpers_set_value{\??colorattribute #1:#2}{\colo_helpers_inherited_direct_ca{#3}}%
+% \colo_helpers_set_value{\??transparencysetter #1:#2}{\colo_helpers_inherited_direct_ts{#3}}%
+% \colo_helpers_set_value{\??transparencyattribute#1:#2}{\colo_helpers_inherited_direct_ta{#3}}%
+% \else
+% % not entered when making format
+% \localundefine{\??colorsetter #1:#2}%
+% \localundefine{\??colorattribute #1:#2}%
+% \localundefine{\??transparencysetter #1:#2}%
+% \localundefine{\??transparencyattribute#1:#2}%
+% \fi}}
+
\def\colo_palets_define_set#1#2#3%
{\doifelseassignment{#3}% \definepalet[test][xx={y=.4}]
- {\definecolor[\??colorpalet#1:#2][#3]%
- \colo_helpers_set_value{\??colorsetter #1:#2}{\colo_helpers_inherited_palet_ca{#1}{#2}}%
- \colo_helpers_set_value{\??colorattribute #1:#2}{\colo_helpers_inherited_palet_cs{#1}{#2}}%
- \colo_helpers_set_value{\??transparencysetter #1:#2}{\colo_helpers_inherited_palet_ta{#1}{#2}}%
- \colo_helpers_set_value{\??transparencyattribute#1:#2}{\colo_helpers_inherited_palet_ts{#1}{#2}}}
- {\ifcsname\??colorsetter#3\endcsname % \definepalet[test][xx=green]
- \colo_helpers_set_value{\??colorsetter #1:#2}{\colo_helpers_inherited_direct_cs{#3}}%
- \colo_helpers_set_value{\??colorattribute #1:#2}{\colo_helpers_inherited_direct_ca{#3}}%
- \colo_helpers_set_value{\??transparencysetter #1:#2}{\colo_helpers_inherited_direct_ts{#3}}%
- \colo_helpers_set_value{\??transparencyattribute#1:#2}{\colo_helpers_inherited_direct_ta{#3}}%
+ {\colo_palets_define_assign}%
+ {\ifcsname\??colorsetter#3\endcsname
+ % \definepalet[test][xx=green]
+ \expandafter\colo_palets_define_inherit
\else
% not entered when making format
- \localundefine{\??colorsetter #1:#2}%
- \localundefine{\??colorattribute #1:#2}%
- \localundefine{\??transparencysetter #1:#2}%
- \localundefine{\??transparencyattribute#1:#2}%
- \fi}}
-
-\letvalue{\??colorsetter }\empty \letvalue{\??colorattribute }\!!zerocount
-\letvalue{\??transparencysetter}\empty \letvalue{\??transparencyattribute}\!!zerocount
+ \expandafter\colo_palets_define_undefine
+ \fi}%
+ {#1}{#2}{#3}}
+
+\def\colo_palets_define_inherit#1#2#3%
+ {\colo_helpers_set_value{\??colorsetter #1:#2}{\colo_helpers_inherited_direct_cs{#3}}%
+ \colo_helpers_set_value{\??colorattribute #1:#2}{\colo_helpers_inherited_direct_ca{#3}}%
+ \colo_helpers_set_value{\??transparencysetter #1:#2}{\colo_helpers_inherited_direct_ts{#3}}%
+ \colo_helpers_set_value{\??transparencyattribute#1:#2}{\colo_helpers_inherited_direct_ta{#3}}}
+
+\def\colo_palets_define_undefine#1#2#3%
+ {\localundefine{\??colorsetter #1:#2}%
+ \localundefine{\??colorattribute #1:#2}%
+ \localundefine{\??transparencysetter #1:#2}%
+ \localundefine{\??transparencyattribute#1:#2}}
+
+\def\colo_palets_define_assign#1#2#3%
+ {\definecolor[\??colorpalet#1:#2][#3]%
+ \colo_helpers_set_value{\??colorsetter #1:#2}{\colo_helpers_inherited_direct_cs{\??colorpalet#1:#2}}%
+ \colo_helpers_set_value{\??colorattribute #1:#2}{\colo_helpers_inherited_direct_ca{\??colorpalet#1:#2}}%
+ \colo_helpers_set_value{\??transparencysetter #1:#2}{\colo_helpers_inherited_direct_ts{\??colorpalet#1:#2}}%
+ \colo_helpers_set_value{\??transparencyattribute#1:#2}{\colo_helpers_inherited_direct_ta{\??colorpalet#1:#2}}}
\setvalue{\??colorattribute currentcolor}{\the\attribute\colorattribute} % for mpcolor
\setvalue{\??transparencyattribute currentcolor}{\the\attribute\transparencyattribute} % for mpcolor
-\def\colo_helpers_inherited_current_ca#1{\csname\??colorattribute \ifcsname\??colorattribute \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorattribute #1\endcsname#1\fi\fi\endcsname}
-\def\colo_helpers_inherited_current_cs#1{\csname\??colorsetter \ifcsname\??colorsetter \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorsetter #1\endcsname#1\fi\fi\endcsname}
-\def\colo_helpers_inherited_current_ta#1{\csname\??transparencyattribute\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencyattribute#1\endcsname#1\fi\fi\endcsname}
-\def\colo_helpers_inherited_current_ts#1{\csname\??transparencysetter \ifcsname\??transparencysetter \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencysetter #1\endcsname#1\fi\fi\endcsname}
+%def\colo_helpers_inherited_current_ca#1{\csname\??colorattribute \ifcsname\??colorattribute \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorattribute #1\endcsname#1\fi\fi\endcsname}
+%def\colo_helpers_inherited_current_cs#1{\csname\??colorsetter \ifcsname\??colorsetter \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorsetter #1\endcsname#1\fi\fi\endcsname}
+%def\colo_helpers_inherited_current_ta#1{\csname\??transparencyattribute\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencyattribute#1\endcsname#1\fi\fi\endcsname}
+%def\colo_helpers_inherited_current_ts#1{\csname\??transparencysetter \ifcsname\??transparencysetter \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencysetter #1\endcsname#1\fi\fi\endcsname}
+
+\def\colo_helpers_inherited_current_ca#1{\ifcsname\??colorattribute \currentcolorprefix#1\endcsname\lastnamedcs\else\ifcsname\??colorattribute #1\endcsname\lastnamedcs\else\!!zerocount\fi\fi}
+\def\colo_helpers_inherited_current_cs#1{\ifcsname\??colorsetter \currentcolorprefix#1\endcsname\lastnamedcs\else\ifcsname\??colorsetter #1\endcsname\lastnamedcs\else\fi\fi}
+\def\colo_helpers_inherited_current_ta#1{\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\lastnamedcs\else\ifcsname\??transparencyattribute#1\endcsname\lastnamedcs\else\!!zerocount\fi\fi}
+\def\colo_helpers_inherited_current_ts#1{\ifcsname\??transparencysetter \currentcolorprefix#1\endcsname\lastnamedcs\else\ifcsname\??transparencysetter #1\endcsname\lastnamedcs\else\fi\fi}
%D Low level defs:
@@ -1070,6 +1158,17 @@
\colo_helpers_inherited_current_ca{#1} %
\colo_helpers_inherited_current_ta{#1} }
+\def\MPcoloronly#1%
+ {\clf_mpcolor
+ \attribute\colormodelattribute
+ \colo_helpers_inherited_current_ca{#1} %
+ \zerocount}
+
+\def\MPtransparency#1%
+ {\clf_mpcolor
+ \zerocount
+ \zerocount
+ \colo_helpers_inherited_current_ta{#1} }
\def\MPoptions#1%
{\clf_mpoptions
@@ -1078,10 +1177,13 @@
\colo_helpers_inherited_current_ta{#1} }
-\def\thecolorattribute #1{\number\csname\??colorattribute \ifcsname\??colorattribute \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorattribute #1\endcsname#1\fi\fi\endcsname}
-\def\thetransparencyattribute#1{\number\csname\??transparencyattribute\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencyattribute#1\endcsname#1\fi\fi\endcsname}
\def\thecolormodelattribute {\the\attribute\colormodelattribute}
+%def\thecolorattribute #1{\number\csname\??colorattribute \ifcsname\??colorattribute \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorattribute #1\endcsname#1\fi\fi\endcsname}
+%def\thetransparencyattribute#1{\number\csname\??transparencyattribute\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencyattribute#1\endcsname#1\fi\fi\endcsname}
+
+\def\thecolorattribute #1{\number\ifcsname\??colorattribute \currentcolorprefix#1\endcsname\lastnamedcs\else\ifcsname\??colorattribute #1\endcsname\lastnamedcs\else\zerocount\fi\fi}
+\def\thetransparencyattribute#1{\number\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\lastnamedcs\else\ifcsname\??transparencyattribute#1\endcsname\lastnamedcs\else\zerocount\fi\fi}
\def\internalspotcolorname #1{\clf_spotcolorname \thecolorattribute{#1} }
\def\internalspotcolorparent #1{\clf_spotcolorparent\thecolorattribute{#1} }
\def\internalspotcolorsize #1{\clf_spotcolorvalue \thecolorattribute{#1} }
diff --git a/Master/texmf-dist/tex/context/base/colo-run.lua b/Master/texmf-dist/tex/context/base/mkiv/colo-run.lua
index 27f7c6b12ea..6368b330716 100644
--- a/Master/texmf-dist/tex/context/base/colo-run.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/colo-run.lua
@@ -11,27 +11,31 @@ if not modules then modules = { } end modules ['colo-run'] = {
local colors, commands, context, utilities = colors, commands, context, utilities
-local colors= attributes.colors
+local colors = attributes.colors
+
+local private = table.tohash { "d_u_m_m_y", "maintextcolor", "themaintextcolor" }
function commands.showcolorset(name)
local set = colors.setlist(name)
context.starttabulate { "|l|l|l|l|l|l|l|" }
for i=1,#set do
local s = set[i]
- local r = { width = "4em", height = "max", depth = "max", color = s }
- context.NC()
- context.setcolormodel { "gray" }
- context.blackrule(r)
- context.NC()
- context.blackrule(r)
- context.NC()
- context.grayvalue(s)
- context.NC()
- context.colorvalue(s)
- context.NC()
- context(s)
- context.NC()
- context.NR()
+ if not private[s] then
+ local r = { width = "4em", height = "max", depth = "max", color = s }
+ context.NC()
+ context.setcolormodel { "gray" }
+ context.blackrule(r)
+ context.NC()
+ context.blackrule(r)
+ context.NC()
+ context.grayvalue(s)
+ context.NC()
+ context.colorvalue(s)
+ context.NC()
+ context(s)
+ context.NC()
+ context.NR()
+ end
end
context.stoptabulate()
end
@@ -52,16 +56,18 @@ function commands.showcolorcomponents(list)
context.TB()
for i=1,#set do
local s = set[i]
- context.NC()
- context.showcolorbar { s }
- context.NC()
- context(s)
- context.NC()
- context.transparencycomponents(s)
- context.NC()
- context.colorcomponents(s)
- context.NC()
- context.NR()
+ if not private[s] then
+ context.NC()
+ context.showcolorbar { s }
+ context.NC()
+ context(s)
+ context.NC()
+ context.transparencycomponents(s)
+ context.NC()
+ context.colorcomponents(s)
+ context.NC()
+ context.NR()
+ end
end
context.stoptabulate()
end
diff --git a/Master/texmf-dist/tex/context/base/colo-run.mkiv b/Master/texmf-dist/tex/context/base/mkiv/colo-run.mkiv
index 16f54c3b5fb..37a9de19017 100644
--- a/Master/texmf-dist/tex/context/base/colo-run.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/colo-run.mkiv
@@ -45,29 +45,33 @@
{\dodoubleargument\colo_show_palet}
\gdef\colo_show_palet[#1][#2]%
- {\ifcsname\??colorpalet#1\endcsname
- \doifelseinset\v!vertical{#2} \colo_palets_show_vertical \colo_palets_show_horizontal [#1][#2]%
- \fi}
-
-\gdef\colo_palets_show_vertical[#1][#2]%
- {\vbox
- {\forgetall
- \setlocalhsize
- \hsize\localhsize
- \offinterlineskip
- \setuppalet[#1]
- \tabskip\zeropoint
- \def\colo_palets_show_palet##1%
- {\doifelseinset\v!number{#2}{##1\hskip.5em}{}&
- \color[##1]{\vrule\s!width3em\s!height\strutht\s!depth\strutdp}%
- \graycolor[##1]{\vrule\s!width3em\s!height\strutht\s!depth\strutdp}&
- \doifinset\v!value{#2}{\hskip.5em\colorvalue{##1}}\crcr}
- \halign
- {\hss##&\hss##\hss&##\cr
- &\doifinset\v!name{#2}{\strut#1}&\cr%
- \colo_palets_process[#1]\colo_palets_show_palet\crcr}}}
-
-\gdef\colo_palets_show_horizontal[#1][#2]% todo: bTABLE etc
+ {\doifelsecolorpalet{#1}
+ {\doifelseinset\v!vertical{#2} \colo_palets_show_vertical \colo_palets_show_horizontal {#1}{#2}}%
+ {}}
+
+\gdef\colo_palets_show_vertical#1#2%
+ {\begingroup
+ \forgetall
+ \setlocalhsize
+ \hsize\localhsize
+ \offinterlineskip
+ \setuppalet[#1]
+ \tabskip\zeropoint
+ \def\colo_palets_show_palet##1%
+ {\doifelseinset\v!number{#2}{##1\hskip.5\emwidth}{}%
+ \aligntab
+ \color [##1]{\vrule\s!width3\emwidth\s!height\strutht\s!depth\strutdp}%
+ \graycolor[##1]{\vrule\s!width3\emwidth\s!height\strutht\s!depth\strutdp}%
+ \aligntab
+ \doifinset\v!value{#2}{\hskip.5\emwidth\colorvalue{##1}}%
+ \crcr}
+ \halign
+ {\hss\alignmark\alignmark\aligntab\hss\alignmark\alignmark\hss\aligntab\alignmark\alignmark\cr
+ \aligntab\doifinset\v!name{#2}{\strut#1}\aligntab\cr
+ \colo_palets_process[#1]\colo_palets_show_palet\crcr}%
+ \endgroup}
+
+\gdef\colo_palets_show_horizontal#1#2% todo: bTABLE etc
{\vbox
{\forgetall
\setlocalhsize
@@ -75,34 +79,36 @@
\offinterlineskip
\setuppalet[#1]
\tabskip\zeropoint
- \!!widtha\zeropoint
+ \scratchwidth\zeropoint
\doifinset\v!number{#2}
{\def\colo_palets_show_palet##1%
- {\setbox0\hbox{##1}%
- \ifdim\!!widtha<\wd0\!!widtha\wd0\fi}%
+ {\setbox\scratchbox\hbox{##1}%
+ \ifdim\scratchwidth<\wd\scratchbox
+ \scratchwidth\wd\scratchbox
+ \fi}%
\colo_palets_process[#1]\colo_palets_show_palet}%
- \advance\!!widtha 1em
- \ifdim\!!widtha<5em
- \!!widtha5em
+ \advance\scratchwidth\emwidth
+ \ifdim\scratchwidth<5\emwidth
+ \scratchwidth5\emwidth
\fi
\halign
- {##&&\hbox to \!!widtha{\hss##\hss}\cr
+ {\alignmark\alignmark\aligntab\aligntab\hbox to \scratchwidth{\hss\alignmark\alignmark\hss}\cr
\doifinset\v!number{#2}
- {\def\colo_palets_show_palet##1{&\strut##1}%
+ {\def\colo_palets_show_palet##1{\aligntab\strut##1}%
\colo_palets_process[#1]\colo_palets_show_palet}\cr
- \doifinset\v!name{#2}{#1\hskip.5em}%
+ \doifinset\v!name{#2}{#1\hskip.5\emwidth}%
\def\colo_palets_show_palet##1%
- {&\strut\color[##1]{\vrule\s!width\!!widtha\s!height\strutht\s!depth\zeropoint}}%
+ {\aligntab\strut\color[##1]{\vrule\s!width\scratchwidth\s!height\strutht\s!depth\zeropoint}}%
\colo_palets_process[#1]\colo_palets_show_palet\crcr
\noalign{\vskip-\strutdepth}%
\def\colo_palets_show_palet##1%
- {&\graycolor[##1]{\vrule\s!width\!!widtha\s!height\zeropoint\s!depth\strutdp}}%
+ {\aligntab\graycolor[##1]{\vrule\s!width\scratchwidth\s!height\zeropoint\s!depth\strutdp}}%
\colo_palets_process[#1]\colo_palets_show_palet\crcr
\doifinset\v!value{#2}
{\def\colo_palets_show_palet##1%
- {&\vbox
- {\hsize\!!widtha
- \vskip.25ex
+ {\aligntab\vbox
+ {\hsize\scratchwidth
+ \vskip.25\exheight
\everypar{\strut}
\veryraggedcenter
\let\colorformatseparator\endgraf
@@ -111,29 +117,31 @@
\crcr}}}
\gdef\colo_palets_process[#1]%
- {\expanded{\globalprocesscommalist[\getvalue{\??colorpalet#1}]}}
+ {\getpaletlist[#1]%
+ \normalexpanded{\globalprocesscommalist[\paletlist]}}
\unexpanded\gdef\comparepalet
{\dosingleargument\colo_palets_compare}
\gdef\colo_palets_compare[#1]%
- {\ifcsname\??colorpalet#1\endcsname
- \hbox
- {\colo_palets_compare_indeed\color[#1]%
- \quad
- \colo_palets_compare_indeed\graycolor[#1]}%
- \fi}
-
-\gdef\colo_palets_compare_indeed#1[#2]%
+ {\doifelsecolorpalet{#1}%
+ {\hbox
+ {\colo_palets_compare_indeed\color{#1}%
+ \quad
+ \colo_palets_compare_indeed\graycolor{#1}}}%
+ {}}
+
+\gdef\colo_palets_compare_indeed#1#2%
{\vbox
{\forgetall
\setlocalhsize
\hsize\localhsize
\offinterlineskip
\setuppalet[#2]
- \getcommacommandsize[\getvalue{\??colorpalet#2}]
- \!!widtha2em\relax
- \hsize\commalistsize\!!widtha
+ \getpaletsize[#2]%
+ \getpaletlist[#2]%
+ \scratchwidth2\emwidth\relax
+ \hsize\paletsize\scratchwidth
\def\colo_palets_compare##1%
{\hbox
{\setbox0\hbox
@@ -142,11 +150,11 @@
\box0
\hbox to \hsize
{\def\colo_palets_compare####1%
- {\hbox to \!!widtha
- {\hss#1[####1]{\vrule\s!width.5\!!widtha\s!height2.25ex\s!depth-.75ex}\hss}}%
- \processcommacommand[\getvalue{\??colorpalet#2}]\colo_palets_compare}}
+ {\hbox to \scratchwidth
+ {\hss#1[####1]{\vrule\s!width.5\scratchwidth\s!height2.25\exheight\s!depth-.75\exheight}\hss}}%
+ \processcommacommand[\paletlist]\colo_palets_compare}}
\endgraf}
- \processcommacommand[\getvalue{\??colorpalet#2}]\colo_palets_compare}}
+ \processcommacommand[\paletlist]\colo_palets_compare}}
%D Groups
@@ -155,7 +163,10 @@
\gdef\colo_groups_show[#1][#2]%
{\doifcolor{#1:1}
- {\doifelseinset\v!vertical{#2} \colo_groups_show_vertical \colo_groups_show_horizontal [#1][#2]}}
+ {\doifelseinset\v!vertical{#2}
+ \colo_groups_show_vertical
+ \colo_groups_show_horizontal
+ [#1][#2]}}
\gdef\colo_groups_show_horizontal[#1][#2]%
{\vbox
@@ -169,18 +180,18 @@
\def\colo_groups_show_group##1%
{\doifcolor{#1:##1}{\vbox
{\halign
- {\hss####\hss\cr
+ {\hss\alignmark\alignmark\alignmark\alignmark\hss\cr
\doifinset\v!number{#2}{\strut##1}\cr
- \color[#1:##1]{\vrule\s!width4em\s!height\strutht\s!depth\zeropoint}\cr
- \graycolor[#1:##1]{\vrule\s!width4em\s!height\zeropoint\s!depth\strutdp}\cr
+ \color [#1:##1]{\vrule\s!width4\emwidth\s!height\strutht \s!depth\zeropoint}\cr
+ \graycolor[#1:##1]{\vrule\s!width4\emwidth\s!height\zeropoint\s!depth\strutdp }\cr
\doifinset\v!value{#2}{\colorvalue{#1:##1}\strut}\crcr}}}}%
\hbox
{\doifinset\v!name{#2}
{\strut
\doifelseinset\v!value{#2}
- {\raise3\lineheight\hbox{#1\hskip.5em}}
+ {\raise3\lineheight\hbox{#1\hskip.5\emwidth}}
{#1}%
- \hskip.5em}%
+ \hskip.5\emwidth}%
\colo_groups_show_group1\colo_groups_show_group2\colo_groups_show_group3\colo_groups_show_group4%
\colo_groups_show_group5\colo_groups_show_group6\colo_groups_show_group7\colo_groups_show_group8}}}
@@ -194,13 +205,17 @@
\tabskip\zeropoint
\def\colo_groups_show_group##1%
{\doifcolor{#1:##1}
- {\doifinset\v!number{#2}{##1\hskip.5em}&
- \color[#1:##1]{\vrule\s!width2.5em\s!height\strutht\s!depth\strutdp}%
- \graycolor[#1:##1]{\vrule\s!width2.5em\s!height\strutht\s!depth\strutdp}&
- \doifinset\v!value{#2}{\hskip.5em\colorvalue{#1:##1}}\crcr}}%
+ {\doifinset\v!number{#2}
+ {##1\hskip.5\emwidth}%
+ \aligntab
+ \color [#1:##1]{\vrule\s!width2.5\emwidth\s!height\strutht\s!depth\strutdp}%
+ \graycolor[#1:##1]{\vrule\s!width2.5\emwidth\s!height\strutht\s!depth\strutdp}
+ \aligntab
+ \doifinset\v!value{#2}{\hskip.5\emwidth\colorvalue{#1:##1}}%
+ \crcr}}%
\halign
- {\hss##&\hss##\hss&##\hss\cr
- &\doifinset\v!name{#2}{\strut#1}&\crcr
+ {\hss\alignmark\alignmark\aligntab\hss\alignmark\alignmark\hss\aligntab\alignmark\alignmark\hss\cr
+ \aligntab\doifinset\v!name{#2}{\strut#1}\aligntab\crcr
\colo_groups_show_group1\colo_groups_show_group2\colo_groups_show_group3\colo_groups_show_group4%
\colo_groups_show_group5\colo_groups_show_group6\colo_groups_show_group7\colo_groups_show_group8}}}
@@ -210,8 +225,7 @@
\gdef\colo_groups_compare[#1]%
{\doifcolor{#1:1}
{\hbox
- {\colo_groups_compare_indeed\color[#1]%
- \quad
+ {\colo_groups_compare_indeed\color [#1]\quad
\colo_groups_compare_indeed\graycolor[#1]}}}
\gdef\colo_groups_compare_indeed#1[#2]%
@@ -219,20 +233,23 @@
{\forgetall
\setlocalhsize
\hsize\localhsize
- \!!counta\zerocount
- \dorecurse{15}{\doifcolor{#2:\recurselevel}{\advance\!!counta\plusone}}
- \!!widtha2em\relax
- \hsize\!!counta\!!widtha
- \dorecurse\!!counta{\colo_groups_compare_step{#1}{#2}\recurselevel}}}
+ \scratchcounter\zerocount
+ \dorecurse{15}{\doifcolor{#2:\recurselevel}{\advance\scratchcounter\plusone}}
+ \scratchwidth2\emwidth\relax
+ \hsize\scratchcounter\scratchwidth
+ \dorecurse\scratchcounter{\colo_groups_compare_step{#1}{#2}\recurselevel}}}
\def\colo_groups_compare_step#1#2#3%
{\hbox to \hsize
- {\setbox0\hbox
- {#1[#2:#3]{\vrule\s!width\hsize\s!height3ex}}%
- \wd0\zeropoint
- \box0
+ {\setbox\scratchbox\hbox
+ {#1[#2:#3]{\vrule\s!width\hsize\s!height3\exheight}}%
+ \wd\scratchbox\zeropoint
+ \box\scratchbox
\hbox to \hsize
- {\hss\dorecurse\!!counta{#1[#2:\recurselevel]{\vrule\s!width.5\!!widtha\s!height2.25ex\s!depth-.75ex}\hss}}}
+ {\hss
+ \dorecurse\scratchcounter
+ {#1[#2:\recurselevel]{\vrule\s!width.5\scratchwidth\s!height2.25\exheight\s!depth-.75\exheight}%
+ \hss}}}
\endgraf}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/cont-cs.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-cs.mkiv
index 75e30fe6985..75e30fe6985 100644
--- a/Master/texmf-dist/tex/context/base/cont-cs.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-cs.mkiv
diff --git a/Master/texmf-dist/tex/context/base/cont-de.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-de.mkiv
index 998f76466da..998f76466da 100644
--- a/Master/texmf-dist/tex/context/base/cont-de.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-de.mkiv
diff --git a/Master/texmf-dist/tex/context/base/cont-en.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-en.mkiv
index f25ab69cbd1..f25ab69cbd1 100644
--- a/Master/texmf-dist/tex/context/base/cont-en.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-en.mkiv
diff --git a/Master/texmf-dist/tex/context/base/cont-fil.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-fil.mkiv
index a1159b7f54f..19c1c93ac06 100644
--- a/Master/texmf-dist/tex/context/base/cont-fil.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-fil.mkiv
@@ -118,4 +118,9 @@
\definefilesynonym [fnt-23] [fonts-shapes]
\definefilesynonym [syn-01] [syntax]
+\definefilesynonym [set-11] [setups-basics]
+\definefilesynonym [set-12] [setups-overview]
+%definefilesynonym [set-13] [setups-proofing]
+%definefilesynonym [set-15] [setups-generate]
+
\endinput
diff --git a/Master/texmf-dist/tex/context/base/cont-fr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-fr.mkiv
index f45ec88c3f7..f45ec88c3f7 100644
--- a/Master/texmf-dist/tex/context/base/cont-fr.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-fr.mkiv
diff --git a/Master/texmf-dist/tex/context/base/cont-gb.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-gb.mkiv
index f6dd4ba9ebc..f6dd4ba9ebc 100644
--- a/Master/texmf-dist/tex/context/base/cont-gb.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-gb.mkiv
diff --git a/Master/texmf-dist/tex/context/base/cont-it.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-it.mkiv
index 483eb858955..483eb858955 100644
--- a/Master/texmf-dist/tex/context/base/cont-it.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-it.mkiv
diff --git a/Master/texmf-dist/tex/context/base/cont-log.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-log.mkiv
index 598140d3268..b8eb0679f3b 100644
--- a/Master/texmf-dist/tex/context/base/cont-log.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-log.mkiv
@@ -30,7 +30,17 @@
X%
\endgroup}
-\unexpanded\def\ConTeXt{Con\TeX t}
+\unexpanded\def\ConTeXt
+ {\dontleavehmode
+ \begingroup
+ Con%
+ \setbox\scratchboxone\hbox{T\kern\zeropoint e}%
+ \setbox\scratchboxtwo\hbox{Te}%
+ \discretionary{-}{}{\kern\dimexpr\wd\scratchboxtwo-\wd\scratchboxone\relax}%
+ \TeX
+ t%
+ \endgroup}
+
\unexpanded\def\PPCHTeX{ppch\TeX}
\unexpanded\def\PRAGMA {Pragma ADE}
@@ -59,7 +69,9 @@
\kern-.11\emwidth\TeX}
\def\syst_logos_ams_script#1%
- {$\cal\ifdim\bodyfontsize>1.1\emwidth\scriptstyle\fi#1$}
+ {\normalstartimath
+ \cal\ifdim\bodyfontsize>1.1\emwidth\scriptstyle\fi#1%
+ \normalstopimath}
\unexpanded\def\AmSTeX
{\dontleavehmode
@@ -93,9 +105,24 @@
\unexpanded\def\Context % wrong usage of \getscaledglyph
{\dontleavehmode
\begingroup
- C\kern -.0667\emwidth\getscaledglyph{.8}\empty{O\kern -.0667\emwidth N\kern
- -.0549\emwidth T\doifelseitalic{\kern-.1\emwidth}{\kern-.1667\emwidth}\lower.5\exheight\hbox
- {E}\doifelseitalic\empty{\kern-.11em}X\kern-.055\emwidth T}%
+ C%
+ \kern -.0667\emwidth
+ \getscaledglyph{.8}\empty{%
+ O\kern-.0667\emwidth
+ N%
+ \discretionary{-}{}{\kern-.0549\emwidth}%
+ T%
+ \doifelseitalic
+ {\kern-.1\emwidth}%
+ {\kern-.1667\emwidth}%
+ \lower.5\exheight\hbox{E}%
+ \doifelseitalic
+ \empty
+ {\kern-.11em}%
+ X%
+ \kern-.055\emwidth
+ T%
+ }%
\endgroup}
%D The \METAFONT\ and \METAPOST\ logos adapt themselves to the current fontsize, an
diff --git a/Master/texmf-dist/tex/context/base/cont-new.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv
index 3f2e4199c10..caa9c31df7d 100644
--- a/Master/texmf-dist/tex/context/base/cont-new.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv
@@ -11,11 +11,14 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2015.05.18 12:26}
+\newcontextversion{2016.04.21 19:35}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
+% \usemodule[newotf]
+% \usemodule[oldotf]
+
\unprotect
% \writestatus\m!system{beware: some patches loaded from cont-new.mkiv}
diff --git a/Master/texmf-dist/tex/context/base/cont-nl.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-nl.mkiv
index 890ad8ca594..890ad8ca594 100644
--- a/Master/texmf-dist/tex/context/base/cont-nl.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-nl.mkiv
diff --git a/Master/texmf-dist/tex/context/base/cont-nop.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-nop.mkiv
index c8188503e85..c8188503e85 100644
--- a/Master/texmf-dist/tex/context/base/cont-nop.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-nop.mkiv
diff --git a/Master/texmf-dist/tex/context/base/cont-pe.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-pe.mkiv
index 4f7efe959d5..4f7efe959d5 100644
--- a/Master/texmf-dist/tex/context/base/cont-pe.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-pe.mkiv
diff --git a/Master/texmf-dist/tex/context/base/cont-ro.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-ro.mkiv
index ac6f159f539..ac6f159f539 100644
--- a/Master/texmf-dist/tex/context/base/cont-ro.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-ro.mkiv
diff --git a/Master/texmf-dist/tex/context/base/cont-run.lua b/Master/texmf-dist/tex/context/base/mkiv/cont-run.lua
index 08bbe5c3c25..0420ed01c7b 100644
--- a/Master/texmf-dist/tex/context/base/cont-run.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-run.lua
@@ -192,7 +192,7 @@ local function processjob()
report("processing as xml: %s",filename)
context.starttext()
- context.xmlprocess("main",filename,"")
+ context.xmlprocess("main",filename,"")
context.stoptext()
elseif suffix == "cld" or arguments.forcecld then
@@ -209,7 +209,7 @@ local function processjob()
report("processing as lua: %s",filename)
context.starttext()
- context.ctxlua(string.format('dofile("%s")',filename))
+ context.ctxlua(string.format('dofile("%s")',filename))
context.stoptext()
elseif suffix == "mp" or arguments.forcemp then
diff --git a/Master/texmf-dist/tex/context/base/cont-run.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-run.mkiv
index fcca7b58133..fcca7b58133 100644
--- a/Master/texmf-dist/tex/context/base/cont-run.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-run.mkiv
diff --git a/Master/texmf-dist/tex/context/base/cont-yes.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv
index 0b7f3231baf..0b7f3231baf 100644
--- a/Master/texmf-dist/tex/context/base/cont-yes.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv
diff --git a/Master/texmf-dist/tex/context/base/context-base.lmx b/Master/texmf-dist/tex/context/base/mkiv/context-base.lmx
index 482d43e8866..482d43e8866 100644
--- a/Master/texmf-dist/tex/context/base/context-base.lmx
+++ b/Master/texmf-dist/tex/context/base/mkiv/context-base.lmx
diff --git a/Master/texmf-dist/tex/context/base/context-characters.lmx b/Master/texmf-dist/tex/context/base/mkiv/context-characters.lmx
index f018e412ba9..f018e412ba9 100644
--- a/Master/texmf-dist/tex/context/base/context-characters.lmx
+++ b/Master/texmf-dist/tex/context/base/mkiv/context-characters.lmx
diff --git a/Master/texmf-dist/tex/context/base/context-debug.lmx b/Master/texmf-dist/tex/context/base/mkiv/context-debug.lmx
index 51b18c83729..51b18c83729 100644
--- a/Master/texmf-dist/tex/context/base/context-debug.lmx
+++ b/Master/texmf-dist/tex/context/base/mkiv/context-debug.lmx
diff --git a/Master/texmf-dist/tex/context/base/context-error.lmx b/Master/texmf-dist/tex/context/base/mkiv/context-error.lmx
index b82b552f88f..b82b552f88f 100644
--- a/Master/texmf-dist/tex/context/base/context-error.lmx
+++ b/Master/texmf-dist/tex/context/base/mkiv/context-error.lmx
diff --git a/Master/texmf-dist/tex/context/base/context-fonttest.lmx b/Master/texmf-dist/tex/context/base/mkiv/context-fonttest.lmx
index fddb8196b38..fddb8196b38 100644
--- a/Master/texmf-dist/tex/context/base/context-fonttest.lmx
+++ b/Master/texmf-dist/tex/context/base/mkiv/context-fonttest.lmx
diff --git a/Master/texmf-dist/tex/context/base/context-help.lmx b/Master/texmf-dist/tex/context/base/mkiv/context-help.lmx
index cf4f73a6120..7c8f5006d17 100644
--- a/Master/texmf-dist/tex/context/base/context-help.lmx
+++ b/Master/texmf-dist/tex/context/base/mkiv/context-help.lmx
@@ -60,28 +60,70 @@
padding: 1em ;
}
</style>
+ <style type="text/css">
+ #main-left {
+ background-color: #C0C0C0 ;
+ color: black;
+ }
+ a.setupmenuurl {
+ color: #FFFFFF ;
+ text-decoration: none ;
+ font-weight: bold ;
+ }
+ a.setupmenucmd {
+ color: #FFFFFF ;
+ text-decoration: underline ;
+ font-weight: bold ;
+ }
+ a.setuplisturl {
+ color: #000000 ;
+ text-decoration: none ;
+ font-weight: bold ;
+ }
+ .setupmenugroup {
+ text-decoration: none ;
+ }
+ .setupinstances {
+ margin-top: 3ex ;
+ }
+ .setupmenucategory {
+ font-weight: bold ;
+ font-size: 2.5ex ;
+ margin-bottom: 1ex ;
+ }
+ <?lua
+ if utilities and utilities.scite and utilities.scite.css then
+p(utilities.scite.css())
+ end
+ ?>
+ </style>
</head>
<body>
<div id="top"><div id="top-one"><div id="top-two">
- <?lua pv('title') ?>
+<?lua pv('title') ?>
</div></div></div>
<div id="left"><div id="left-one"><div id="left-two">
- <!-- empty -->
+<!-- empty -->
</div></div></div>
<div id="right"><div id="right-safari"><div id="right-one"><div id="right-two"><div id="right-three"><div id="right-four"><div id="right-five">
- <?lua pv('interfaces') ?>
+<?lua pv('interfaces') ?>
</div></div></div></div></div></div></div>
<div id="main"><div id='main-settings'>
<div id="main-left"><div id="main-common-settings">
- <h1><?lua pv('maintitle') ?></h1>
- <?lua pv('maintext') ?>
+<h1><?lua pv('maintitle') ?></h1>
+<?lua pv('maintext') ?>
</div></div>
<div id="main-right"><div id="main-common-settings">
- <?lua pv('names') ?>
+<?lua pv('names') ?>
+<script type='text/javascript'>
+ <!--
+ document.getElementById("#current").scrollIntoView();
+ -->
+</script>
</div></div>
</div></div>
<div id="bottom"><div id="bottom-one"><div id="bottom-two">
- <?lua pv('extra') ?>
+<?lua pv('extra') ?>
</div></div></div>
</body>
</html>
diff --git a/Master/texmf-dist/tex/context/base/mkiv/context-performance.tex b/Master/texmf-dist/tex/context/base/mkiv/context-performance.tex
new file mode 100644
index 00000000000..dd376866496
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/context-performance.tex
@@ -0,0 +1,66 @@
+% language=uk
+
+\usemodule[art-01,abr-01]
+
+\starttext
+
+\subject {About performance}
+
+If you use \PDFTEX, \XETEX\ and \LUATEX\ you will notice a difference in speed.
+Don't draw conclusions too easily from simple tests like:
+
+\starttyping
+\dorecurse{1000}{test\page}
+\stoptyping
+
+or (also tests the file system):
+
+\starttyping
+\dorecurse{1000}{\input tufte\blank}
+\stoptyping
+
+The wide engines \XETEX\ and \LUATEX\ have more work to do than \PDFTEX, because
+the input is \UTF\ and \UNICODE\ fonts are used. Of course running \PDFTEX\ on
+extensive \UTF\ input will compensate it a bit.
+
+Comparing \XETEX\ and \PDFTEX\ (using \MKII) and \LUATEX\ (using \MKIV) is kind
+of useless anyway because the \LUATEX\ with \MKIV\ combination is not only doing
+more advanced things, which costs time, but at the other hand has more efficient
+alternatives, like for instance using \MPLIB, which gains a lot.
+
+So, it's best to compare speeds with a mixed content document: multiple fonts,
+text and math, images, \METAPOST\ graphics, structural components, tables, etc.
+
+On the average \PDFTEX\ is the fastest, but offering less functionality, while
+\LUATEX\ with \MKIV\ is often faster than \XETEX\ with \MKII. On complex products
+like the \METAFUN\ manual or when processing complex \XML\ files a \LUATEX\ is
+much faster than a \PDFTEX\ run.
+
+There is some startup time involved which is normally not that much, and initial
+font loading is also not really a burden, but of course for a few page document
+it brings down the number of pages processed per second. Normalizing the input
+takes a bit but applying \OPENTYPE\ font features takes much more. If you find
+unacceptable bottlenecks just let me know (but better first check performance in
+the other engines). Of course inefficient coding of styles (massive font switches
+where a simple one could do) are no reason for a complaint. Keep in mind:
+flexibility comes at a price.
+
+A lot of time went into making sure that \CONTEXT\ runs efficiently on \LUATEX\
+and we keep improving the performance. This is not so much an engine issue but
+more one of the macro package. Of course what is true for \CONTEXT\ \MKIV\ can be
+different for other macro packages but comparing with them makes no sense because
+the differences in functionality.
+
+There are many features in \CONTEXT\ \MKIV\ that demand analysis of the text
+stream and when a spot is found where that feature has to be applied some actions
+takes place. Most such features don't have an impact on overall performance (due
+to the analysis) unless they are used. Of course font processing has the largest
+impact, but they are also the most flexible and extensible feature, especially
+when you use dynamic features. And font processing is always enabled. Speed has
+been improved over time and we're currently at a point that further speedup makes
+not much sense and would only make the code more complex. This is not to say that
+we cannot improve performance in the future.
+
+Hans Hagen \crlf Hasselt NL
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/context-timing.lmx b/Master/texmf-dist/tex/context/base/mkiv/context-timing.lmx
index 57b5879bad8..57b5879bad8 100644
--- a/Master/texmf-dist/tex/context/base/context-timing.lmx
+++ b/Master/texmf-dist/tex/context/base/mkiv/context-timing.lmx
diff --git a/Master/texmf-dist/tex/context/base/mkiv/context-todo.tex b/Master/texmf-dist/tex/context/base/mkiv/context-todo.tex
new file mode 100644
index 00000000000..b9591e8e06e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/context-todo.tex
@@ -0,0 +1,57 @@
+% language=uk
+
+\usemodule[art-01,abr-01]
+
+\starttext
+
+\subject {On the agenda}
+
+\subsubject{\LUATEX}
+
+\startitemize
+ \startitem
+ head||tail cleanup in disc nodes (get rid of temp i.e.\ delay till linebreak)
+ \stopitem
+ \startitem
+ optimize some callback resolution (more direct)
+ \stopitem
+ \startitem
+ add \type {--output-filename} for \PDF\ filename
+ \stopitem
+\stopitemize
+
+\subsubject{\CONTEXT}
+
+\startitemize
+ \startitem
+ play with par callback and properties
+ \stopitem
+ \startitem
+ play with box attributes
+ \stopitem
+ \startitem
+ redo some of the spacing (adapt to improvements in engine)
+ \stopitem
+ \startitem
+ use \type {\matheqnogapstep}, \type {\Ustack}, \type {\mathscriptsmode}
+ and other new math primitives
+ \stopitem
+\stopitemize
+
+\vfill {\em Feel free to suggest additions.}
+
+\stoptext
+
+% new:
+
+<cd:command name="showgrid" file="page-grd.mkiv">
+ ...
+ <cd:constant type="columns" default="yes"/>
+ ...
+</cd:command>
+
+<cd:command name="itemtag" variant="itemgroup" file="strc-itm.mkvi">
+ <cd:arguments>
+ <cd:resolve name="keyword-reference-list-optional"/>
+ </cd:arguments>
+</cd:command>
diff --git a/Master/texmf-dist/tex/context/base/context.css b/Master/texmf-dist/tex/context/base/mkiv/context.css
index be1dad79610..be1dad79610 100644
--- a/Master/texmf-dist/tex/context/base/context.css
+++ b/Master/texmf-dist/tex/context/base/mkiv/context.css
diff --git a/Master/texmf-dist/tex/context/base/context.lus b/Master/texmf-dist/tex/context/base/mkiv/context.lus
index 960e96adf7c..960e96adf7c 100644
--- a/Master/texmf-dist/tex/context/base/context.lus
+++ b/Master/texmf-dist/tex/context/base/mkiv/context.lus
diff --git a/Master/texmf-dist/tex/context/base/context.mkiv b/Master/texmf-dist/tex/context/base/mkiv/context.mkiv
index 9b542115e9f..9f4ef2327a1 100644
--- a/Master/texmf-dist/tex/context/base/context.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/context.mkiv
@@ -39,8 +39,8 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2015.05.18 12:26}
-\edef\contextkind {current}
+\edef\contextversion{2016.04.21 19:35}
+\edef\contextkind {beta}
%D For those who want to use this:
@@ -189,7 +189,13 @@
%loadmarkfile{spac-cha} % obsolete
%loadmarkfile{supp-num} % obsolete
+\loadmarkfile{core-uti}
+\loadmkvifile{file-job}
+
+\loadmarkfile{anch-pos}
+
\loadmarkfile{typo-ini}
+\loadmarkfile{typo-lin}
\loadmarkfile{typo-bld} % par builders
\loadmarkfile{typo-inj}
@@ -206,12 +212,12 @@
\loadmarkfile{hand-ini}
\loadmarkfile{lang-ini}
-\loadmarkfile{lang-hyp}
+\loadmarkfile{lang-hyp} % also loads dis
\loadmarkfile{lang-lab}
\loadmarkfile{unic-ini}
-\loadmarkfile{core-uti}
+% \loadmarkfile{core-uti}
\loadmarkfile{core-two}
\loadmarkfile{core-dat}
@@ -227,7 +233,7 @@
\loadmarkfile{lang-url}
\loadmarkfile{lang-def}
-\loadmkvifile{file-job} % why so late?
+% \loadmkvifile{file-job} % why so late?
\loadmarkfile{symb-ini} % brrr depends on fonts
@@ -244,7 +250,7 @@
\loadmkvifile{typo-prc}
-\loadmarkfile{anch-pos}
+% \loadmarkfile{anch-pos}
\loadmkvifile{strc-ini}
\loadmarkfile{strc-tag}
@@ -262,8 +268,8 @@
%loadmarkfile{strc-reg}
\loadmkvifile{strc-lev} % experiment
-\loadmarkfile{spac-ali}
\loadmarkfile{spac-hor}
+\loadmarkfile{spac-ali}
\loadmarkfile{spac-flr}
\loadmarkfile{spac-ver}
\loadmarkfile{spac-lin}
@@ -271,11 +277,7 @@
\loadmarkfile{spac-par}
%loadmarkfile{spac-adj} % no longer needed
\loadmarkfile{spac-def}
-
-\doiffileelse{spac-prf.mkvi}
- {\loadmkvifile{spac-prf}}
- {\loadmkivfile{spac-prf}}
-
+\loadmkvifile{spac-prf}
\loadmarkfile{spac-grd}
%loadmarkfile{anch-pos}
@@ -368,7 +370,7 @@
\loadmarkfile{char-enc} % will move up
-\loadmkvifile{font-lib} % way too late
+\loadmkvifile{font-lib} % way too late but after language
\loadmkvifile{font-fil}
\loadmkvifile{font-var}
\loadmkvifile{font-fea}
@@ -506,6 +508,7 @@
\loadmarkfile{grph-inc}
\loadmarkfile{grph-fig}
\loadmarkfile{grph-raw}
+\loadmarkfile{grph-rul}
\loadmarkfile{pack-box}
\loadmarkfile{pack-bar}
@@ -547,14 +550,14 @@
% now we hook in backend code (needs checking)
+\loadmarkfile{back-exp}
+
\loadmarkfile{back-pdf} % actually, this one should load the next three using document.arguments.backend
\loadmarkfile{mlib-pdf}
\loadmarkfile{mlib-pps}
\loadmarkfile{meta-pdf}
\loadmarkfile{grph-epd}
-\loadmarkfile{back-exp}
-
\loadmarkfile{cont-run} % the main runner (used in cont-yes.mkiv)
\setupcurrentlanguage[\defaultlanguagetag]
diff --git a/Master/texmf-dist/tex/context/base/core-con.lua b/Master/texmf-dist/tex/context/base/mkiv/core-con.lua
index 37942ae7169..bfe5357a6ec 100644
--- a/Master/texmf-dist/tex/context/base/core-con.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-con.lua
@@ -17,7 +17,7 @@ slower but look nicer this way.</p>
--ldx]]--
local floor, date, time, concat = math.floor, os.date, os.time, table.concat
-local lower, rep, match = string.lower, string.rep, string.match
+local lower, upper, rep, match, gsub = string.lower, string.upper, string.rep, string.match, string.gsub
local utfchar, utfbyte = utf.char, utf.byte
local tonumber, tostring = tonumber, tostring
local P, C, Cs, lpegmatch = lpeg.P, lpeg.C, lpeg.Cs, lpeg.match
@@ -28,8 +28,10 @@ local implement = interfaces.implement
local settings_to_array = utilities.parsers.settings_to_array
local allocate = utilities.storage.allocate
+local setmetatableindex = table.setmetatableindex
local formatters = string.formatters
local variables = interfaces.variables
+local constants = interfaces.constants
converters = converters or { }
local converters = converters
@@ -122,7 +124,7 @@ local counters = allocate {
0x3142, 0x3145, 0x3147, 0x3148, 0x314A,
0x314B, 0x314C, 0x314D, 0x314E
},
- ['korean-parent'] = { -- parenthesed
+ ['korean-parenthesis'] = { --
0x3200, 0x3201, 0x3202, 0x3203, 0x3204,
0x3205, 0x3206, 0x3207, 0x3208, 0x3209,
0x320A, 0x320B, 0x320C, 0x320D
@@ -136,30 +138,43 @@ local counters = allocate {
languages.counters = counters
-counters['ar'] = counters['arabic']
-counters['gr'] = counters['greek']
-counters['g'] = counters['greek']
-counters['sl'] = counters['slovenian']
-counters['es'] = counters['spanish']
-counters['kr'] = counters['korean']
-counters['kr-p'] = counters['korean-parent']
-counters['kr-c'] = counters['korean-circle']
-
-counters['thainumerals'] = counters['thai']
-counters['devanagarinumerals'] = counters['devanagari']
-counters['gurmurkhinumerals'] = counters['gurmurkhi']
-counters['gujaratinumerals'] = counters['gujarati']
-counters['tibetannumerals'] = counters['tibetan']
-counters['greeknumerals'] = counters['greek']
-counters['arabicnumerals'] = counters['arabic']
-counters['persiannumerals'] = counters['persian']
-counters['arabicexnumerals'] = counters['persian']
-counters['koreannumerals'] = counters['korean']
-counters['koreanparentnumerals'] = counters['korean-parent']
-counters['koreancirclenumerals'] = counters['korean-circle']
-
-counters['sloveniannumerals'] = counters['slovenian']
-counters['spanishnumerals'] = counters['spanish']
+counters['ar'] = counters['arabic']
+counters['gr'] = counters['greek']
+counters['g'] = counters['greek']
+counters['sl'] = counters['slovenian']
+counters['es'] = counters['spanish']
+counters['kr'] = counters['korean']
+counters['kr-p'] = counters['korean-parenthesis']
+counters['kr-c'] = counters['korean-circle']
+
+counters['thainumerals'] = counters['thai']
+counters['devanagarinumerals'] = counters['devanagari']
+counters['gurmurkhinumerals'] = counters['gurmurkhi']
+counters['gujaratinumerals'] = counters['gujarati']
+counters['tibetannumerals'] = counters['tibetan']
+counters['greeknumerals'] = counters['greek']
+counters['arabicnumerals'] = counters['arabic']
+counters['persiannumerals'] = counters['persian']
+counters['arabicexnumerals'] = counters['persian']
+counters['koreannumerals'] = counters['korean']
+counters['koreanparenthesisnumerals'] = counters['korean-parenthesis']
+counters['koreancirclenumerals'] = counters['korean-circle']
+
+counters['sloveniannumerals'] = counters['slovenian']
+counters['spanishnumerals'] = counters['spanish']
+
+local decimals = allocate {
+ ['arabic'] = {
+ ["0"] = "Ù ", ["1"] = "Ù¡", ["2"] = "Ù¢", ["3"] = "Ù£", ["4"] = "Ù¤",
+ ["5"] = "Ù¥", ["6"] = "Ù¦", ["7"] = "Ù§", ["8"] = "Ù¨", ["9"] = "Ù©",
+ },
+ ['persian'] = {
+ ["0"] = "Û°", ["1"] = "Û±", ["2"] = "Û²", ["3"] = "Û³", ["4"] = "Û´",
+ ["5"] = "Ûµ", ["6"] = "Û¶", ["7"] = "Û·", ["8"] = "Û¸", ["9"] = "Û¹",
+ }
+}
+
+languages.decimals = decimals
local fallback = utfbyte('0')
@@ -233,6 +248,16 @@ end
converters.alphabetic = alphabetic
converters.Alphabetic = Alphabetic
+-- we could make a replacer
+
+local function todecimals(n,name)
+ local stream = tostring(n)
+ local mapping = decimals[name]
+ return mapping and gsub(stream,".",mapping) or stream
+end
+
+converters.decimals = todecimals
+
local lower_offset = 96
local upper_offset = 64
@@ -241,11 +266,6 @@ function converters.Character (n) return chr (n,upper_offset) end
function converters.characters(n) return chrs(n,lower_offset) end
function converters.Characters(n) return chrs(n,upper_offset) end
-converters['a'] = converters.characters
-converters['A'] = converters.Characters
-converters['AK'] = converters.Characters
-converters['KA'] = converters.Characters
-
implement { name = "alphabetic", actions = { alphabetic, context }, arguments = { "integer", "string" } }
implement { name = "Alphabetic", actions = { Alphabetic, context }, arguments = { "integer", "string" } }
@@ -254,6 +274,8 @@ implement { name = "Character", actions = { chr, context }, arguments = { "int
implement { name = "characters", actions = { chrs, context }, arguments = { "integer", lower_offset } }
implement { name = "Characters", actions = { chrs, context }, arguments = { "integer", upper_offset } }
+implement { name = "decimals", actions = { todecimals, context }, arguments = { "integer", "string" } }
+
local weekday = os.weekday -- moved to l-os
local isleapyear = os.isleapyear -- moved to l-os
local nofdays = os.nofdays -- moved to l-os
@@ -552,16 +574,30 @@ implement {
-- this is a temporary solution: we need a better solution when we have
-- more languages
+converters['a'] = converters.characters
+converters['A'] = converters.Characters
+converters['AK'] = converters.Characters -- obsolete
+converters['KA'] = converters.Characters -- obsolete
+
function converters.spanishnumerals(n) return alphabetic(n,"es") end
function converters.Spanishnumerals(n) return Alphabetic(n,"es") end
function converters.sloviannumerals(n) return alphabetic(n,"sl") end
function converters.Sloviannumerals(n) return Alphabetic(n,"sl") end
-converters['characters:es'] = converters.spanishnumerals
-converters['characters:sl'] = converters.sloveniannumerals
+converters['alphabetic:es'] = converters.spanishnumerals
+converters['alphabetic:sl'] = converters.sloveniannumerals
+
+converters['Alphabetic:es'] = converters.Spanishnumerals
+converters['Alphabetic:sl'] = converters.Sloveniannumerals
+
+-- bonus
-converters['Characters:es'] = converters.Spanishnumerals
-converters['Characters:sl'] = converters.Sloveniannumerals
+converters['a:es'] = converters.spanishnumerals
+converters['a:sl'] = converters.sloveniannumerals
+converters['A:es'] = converters.Spanishnumerals
+converters['A:sl'] = converters.Sloveniannumerals
+
+-- end of bonus
converters.sequences = converters.sequences or { }
local sequences = converters.sequences
@@ -575,12 +611,23 @@ function converters.define(name,set) -- ,language)
sequences[name] = settings_to_array(set)
end
+function converters.max(name)
+ local s = sequences[name]
+ return s and #s or 0
+end
+
implement {
name = "defineconversion",
actions = converters.define,
arguments = { "string", "string" }
}
+implement {
+ name = "nofconversions",
+ actions = { converters.max, context },
+ arguments = "string",
+}
+
local function convert(method,n,language)
local converter = language and converters[method..":"..language] or converters[method]
if converter then
@@ -1098,9 +1145,12 @@ local v_weekday = variables.weekday
local v_referral = variables.referral
local v_space = variables.space
+local v_MONTH = upper(v_month)
+local v_WEEKDAY = upper(v_weekday)
+
local convert = converters.convert
-local days = { -- not variables.sunday
+local days = { -- not variables
"sunday",
"monday",
"tuesday",
@@ -1110,7 +1160,7 @@ local days = { -- not variables.sunday
"saturday",
}
-local months = { -- not variables.january
+local months = { -- not variables
"january",
"february",
"march",
@@ -1125,21 +1175,28 @@ local months = { -- not variables.january
"december",
}
+local monthmnems = { -- not variables
+ -- virtual table
+}
+
+setmetatableindex(months, function(t,k) return "unknown" end)
+setmetatableindex(days, function(t,k) return "unknown" end)
+setmetatableindex(monthmnems, function(t,k) return months[k] .. ":mnem" end)
+
local function dayname(n)
- return days[n] or "unknown"
+ return days[n]
end
local function weekdayname(day,month,year)
- return days[weekday(day,month,year)] or "unknown"
+ return days[weekday(day,month,year)]
end
local function monthname(n)
- return months[n] or "unknown"
+ return months[n]
end
local function monthmnem(n)
- local m = months[n]
- return m and (m ..":mnem") or "unknown"
+ return monthmnems[n]
end
implement {
@@ -1171,42 +1228,63 @@ implement {
-- day:ord month:mmem
-- j and jj obsolete
+local spaced = {
+ [v_year] = true,
+ [v_month] = true,
+ [v_MONTH] = true,
+ [v_day] = true,
+ [v_weekday] = true,
+ [v_WEEKDAY] = true,
+ [v_day] = true,
+}
+
local function currentdate(str,currentlanguage) -- second argument false : no label
- local list = utilities.parsers.settings_to_array(str)
+ local list = utilities.parsers.settings_to_array(str)
local splitlabel = languages.labels.split or string.itself -- we need to get the loading order right
- local year, month, day = tex.year, tex.month, tex.day
- local auto = true
+ local year = tex.year
+ local month = tex.month
+ local day = tex.day
+ local auto = true
if currentlanguage == "" then
currentlanguage = false
end
for i=1,#list do
local entry = list[i]
local tag, plus = splitlabel(entry)
- local ordinal, mnemonic, whatordinal = false, false, nil
+ local ordinal, mnemonic, whatordinal, highordinal = false, false, nil, false
if not tag then
tag = entry
elseif plus == "+" or plus == "ord" then
ordinal = true
+ elseif plus == "++" or plus == "highord" then
+ ordinal = true
+ highordinal = true
elseif plus == "mnem" then
mnemonic = true
end
- if not auto and (tag == v_year or tag == v_month or tag == v_day or tag == v_weekday) then
+ if not auto and spaced[tag] then
context.space()
end
auto = false
- if tag == v_year or tag == "y" then
+ if tag == v_year or tag == "y" or tag == "Y" then
context(year)
- elseif tag == "yy" then
+ elseif tag == "yy" or tag == "YY" then
context("%02i",year % 100)
- elseif tag == "Y" then
- context(year)
elseif tag == v_month or tag == "m" then
if currentlanguage == false then
- context(months[month] or "unknown")
+ context(months[month])
+ elseif mnemonic then
+ context.labeltext(variables[monthmnems[month]])
+ else
+ context.labeltext(variables[months[month]])
+ end
+ elseif tag == v_MONTH then
+ if currentlanguage == false then
+ context.WORD(variables[months[month]])
elseif mnemonic then
- context.labeltext(monthmnem(month))
+ context.LABELTEXT(variables[monthmnems[month]])
else
- context.labeltext(monthname(month))
+ context.LABELTEXT(variables[months[month]])
end
elseif tag == "mm" then
context("%02i",month)
@@ -1214,7 +1292,7 @@ local function currentdate(str,currentlanguage) -- second argument false : no la
context(month)
elseif tag == v_day or tag == "d" then
if currentlanguage == false then
- context(days[day] or "unknown")
+ context(days[day])
else
context.convertnumber(v_day,day) -- why not direct
end
@@ -1228,9 +1306,16 @@ local function currentdate(str,currentlanguage) -- second argument false : no la
elseif tag == v_weekday or tag == "w" then
local wd = weekday(day,month,year)
if currentlanguage == false then
- context(days[wd] or "unknown")
+ context(days[wd])
+ else
+ context.labeltext(variables[days[wd]])
+ end
+ elseif tag == v_WEEKDAY then
+ local wd = weekday(day,month,year)
+ if currentlanguage == false then
+ context.WORD(days[wd])
else
- context.labeltext(days[wd] or "unknown")
+ context.LABELTEXT(variables[days[wd]])
end
elseif tag == "W" then
context(weekday(day,month,year))
@@ -1247,7 +1332,7 @@ local function currentdate(str,currentlanguage) -- second argument false : no la
if currentlanguage == false then
-- ignore
else
- context(converters.ordinal(whatordinal,currentlanguage)) -- no "%s" needed
+ context[highordinal and "highordinalstr" or "ordinalstr"](converters.ordinal(whatordinal,currentlanguage))
end
end
end
diff --git a/Master/texmf-dist/tex/context/base/core-con.mkiv b/Master/texmf-dist/tex/context/base/mkiv/core-con.mkiv
index f7d718f4482..1f6dc54d5e6 100644
--- a/Master/texmf-dist/tex/context/base/core-con.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-con.mkiv
@@ -91,15 +91,18 @@
\def\Greeknumerals #1{\clf_Alphabetic\numexpr#1\relax{greek}}
\def\arabicnumerals #1{\clf_alphabetic\numexpr#1\relax{arabic}}
\def\persiannumerals #1{\clf_alphabetic\numexpr#1\relax{persian}}
+\def\arabicdecimals #1{\clf_decimals \numexpr#1\relax{arabic}}
+\def\persiandecimals #1{\clf_decimals \numexpr#1\relax{persian}}
\let\arabicexnumerals \persiannumerals
\def\koreannumerals #1{\clf_alphabetic\numexpr#1\relax{korean}}
-\def\koreannumeralsp #1{\clf_alphabetic\numexpr#1\relax{korean-parent}}
+\def\koreannumeralsp #1{\clf_alphabetic\numexpr#1\relax{korean-parenthesis}}
\def\koreannumeralsc #1{\clf_alphabetic\numexpr#1\relax{korean-circle}}
-\let\koreanparentnumerals\koreannumeralsp
-\let\koreancirclenumerals\koreannumeralsc
+\let\koreanparentnumerals \koreannumeralsp
+\let\koreanparenthesisnumerals\koreannumeralsp
+\let\koreancirclenumerals \koreannumeralsc
\def\chinesenumerals #1{\clf_chinesenumerals\numexpr#1\relax{normal}}
\def\chinesecapnumerals#1{\clf_chinesenumerals\numexpr#1\relax{cap}}
@@ -239,8 +242,8 @@
%D \showsetup{weekday}
%D \showsetup{WEEKDAY}
-\unexpanded\def\weekday#1{\clf_day\numexpr#1\relax}
-\unexpanded\def\WEEKDAY#1{\WORD{\clf_day\numexpr#1\relax}}
+\unexpanded\def\weekday#1{\clf_dayname\numexpr#1\relax}
+\unexpanded\def\WEEKDAY#1{\WORD{\clf_dayname\numexpr#1\relax}}
%D \macros
%D {getdayoftheweek, dayoftheweek}
@@ -293,7 +296,7 @@
%D
%D The number of days is available in the macro \type {\numberofdays}.
-\def\doifelseleapyear#1%
+\def\doifelseleapyear#1% expandable check
{\clf_doifelseleapyear\numexpr#1\relax}
\let\doifleapyearelse\doifelseleapyear
@@ -322,8 +325,8 @@
%D This macro takes care of proper spacing and delivers for instance:
%D
%D \startbuffer
-%D \currentdate[weekday,day,month,year] % still dutch example
-%D \currentdate[WEEKDAY,day,MONTH,year] % still dutch example
+%D \currentdate[weekday,day,month,year]
+%D \currentdate[WEEKDAY,day,MONTH,year]
%D \stopbuffer
%D
%D \startlines
@@ -464,7 +467,6 @@
\unexpanded\def\syst_converters_current_time_nop
{\normalexpanded{\syst_converters_current_time_yes[\currenttimespecification]}}
-
%D Because we're dealing with dates, we also introduce a few day loops:
%D
%D \starttyping
@@ -569,7 +571,7 @@
% if we have definitions that are not matched at the lua end .. eventually we might do
% that when more shows up
-\def\doifelseconversiondefined#1%
+\def\doifelseconversiondefined#1% expandable
{\ifcsname\??conversion\currentlanguage#1\endcsname
\expandafter\firstoftwoarguments
\else\ifcsname\??conversion#1\endcsname
@@ -578,11 +580,11 @@
\doubleexpandafter\secondoftwoarguments
\fi\fi}
-\def\doifelseconversionnumber#1#2%
- {\ifcsname\??conversion#1#2\endcsname
- \expandafter\firstoftwoarguments
- \else
+\def\doifelseconversionnumber#1#2% expandable
+ {\ifnum#2>\numexpr\clf_nofconversions{#1}\relax
\expandafter\secondoftwoarguments
+ \else
+ \expandafter\firstoftwoarguments
\fi}
\let\doifconversiondefinedelse\doifelseconversiondefined
@@ -596,21 +598,23 @@
\setvalue{\??conversionwords\v!four }{4}
\setvalue{\??conversionwords\v!five }{5}
-\def\wordtonumber#1#2{\ifcsname\??conversionwords#1\endcsname\csname\??conversionwords#1\endcsname\else#2\fi}
+%def\wordtonumber#1#2{\ifcsname\??conversionwords#1\endcsname\csname\??conversionwords#1\endcsname\else#2\fi}
+\def\wordtonumber#1#2{\ifcsname\??conversionwords#1\endcsname\lastnamedcs\else#2\fi}
% \defineconversion[ctx][c,o,n,t,e,x,t]
%
% \doloop{\doifelseconversionnumber{ctx}{\recurselevel}{[\recurselevel]}{\exitloop}}
%D \macros
-%D {ordinaldaynumber, highordinalstr, ordinalstr}
+%D {ordinalnumber, highordinalstr, ordinalstr}
%D
%D Efficient general ordinal number converters are sometimes difficult to
%D implement. Fortunately dates never exceed the number~31.
\def\highordinalstr #1{\high{\notsmallcapped{#1}}}
\def\ordinalstr #1{\notsmallcapped{#1}}
-\def\ordinaldaynumber #1{\clf_ordinal\numexpr#1\relax{\currentlanguage}}
+\def\ordinalnumber #1{\clf_ordinal\numexpr#1\relax{\currentlanguage}}
+\def\Ordinalnumber #1{\Words{\clf_ordinal\numexpr#1\relax{\currentlanguage}}}
\def\verbosenumber #1{\clf_verbose\numexpr#1\relax{\currentlanguage}}
\def\VerboseNumber #1{\Words{\clf_verbose\numexpr#1\relax{\currentlanguage}}}
@@ -637,8 +641,8 @@
\defineconversion [\v!characters] [\characters]
\defineconversion [\v!Characters] [\Characters]
-\defineconversion [a] [\characters]
-\defineconversion [A] [\Characters]
+\defineconversion [a] [\alphabeticnumerals]
+\defineconversion [A] [\Alphabeticnumerals]
\defineconversion [AK] [\smallcappedcharacters]
\defineconversion [KA] [\smallcappedcharacters]
@@ -656,6 +660,9 @@
\defineconversion [\v!Word] [\VerboseNumber]
\defineconversion [\v!Words] [\VerboseNumber]
+\defineconversion[\v!ordinal] [\ordinalnumber]
+\defineconversion[\v!Ordinal] [\Ordinalnumber]
+
\defineconversion [n] [\numbers]
\defineconversion [N] [\Numbers]
\defineconversion [m] [\mediaeval]
@@ -684,8 +691,8 @@
%defineconversion [Ñ] [\Spanishnumerals]
\defineconversion [abjadnumerals] [\abjadnumerals]
-\defineconversion [abjadnodotnumerals] [\adjadnodotnumerals]
-\defineconversion [abjadnaivenumerals] [\adjadnaivenumerals]
+\defineconversion [abjadnodotnumerals] [\abjadnodotnumerals]
+\defineconversion [abjadnaivenumerals] [\abjadnaivenumerals]
\defineconversion [thainumerals] [\thainumerals]
\defineconversion [devanagarinumerals] [\devanagarinumerals]
@@ -697,9 +704,13 @@
\defineconversion [arabicnumerals] [\arabicnumerals]
\defineconversion [persiannumerals] [\persiannumerals]
\defineconversion [arabicexnumerals] [\arabicexnumerals]
+\defineconversion [arabicdecimals] [\arabicdecimals]
+\defineconversion [persiandecimals] [\persiandecimals]
\defineconversion [koreannumerals] [\koreannumerals]
-\defineconversion [koreanparentnumerals] [\koreanparentnumerals]
+\defineconversion [koreanparennumerals] [\koreanparenthesisnumerals] % for old times sake (for a while)
+\defineconversion [koreanparenthesisnumerals]
+ [\koreanparenthesisnumerals]
\defineconversion [koreancirclenumerals] [\koreancirclenumerals]
\defineconversion [kr] [\koreannumerals]
@@ -728,20 +739,26 @@
\def\spanishnumerals #1{\clf_alphabetic\numexpr#1\relax{es}}
\def\spanishNumerals #1{\clf_Alphabetic\numexpr#1\relax{es}}
-\defineconversion [\s!sl] [character] [\sloveniannumerals]
-\defineconversion [\s!sl] [Character] [\slovenianNumerals]
-\defineconversion [\s!sl] [characters] [\sloveniannumerals]
-\defineconversion [\s!sl] [Characters] [\slovenianNumerals]
+%defineconversion [\s!sl] [character] [\sloveniannumerals]
+%defineconversion [\s!sl] [Character] [\slovenianNumerals]
+%defineconversion [\s!sl] [characters] [\sloveniannumerals]
+%defineconversion [\s!sl] [Characters] [\slovenianNumerals]
+
+\defineconversion [\s!sl] [alphabetic] [\sloveniannumerals]
+\defineconversion [\s!sl] [Alphabetic] [\slovenianNumerals]
\defineconversion [\s!sl] [a] [\sloveniannumerals]
\defineconversion [\s!sl] [A] [\slovenianNumerals]
\defineconversion [\s!sl] [AK] [\smallcapped\sloveniannumerals]
\defineconversion [\s!sl] [KA] [\smallcapped\sloveniannumerals]
-\defineconversion [\s!es] [character] [\spanishnumerals]
-\defineconversion [\s!es] [Character] [\spanishNumerals]
-\defineconversion [\s!es] [characters] [\spanishnumerals]
-\defineconversion [\s!es] [Characters] [\spanishNumerals]
+%defineconversion [\s!es] [character] [\spanishnumerals]
+%defineconversion [\s!es] [Character] [\spanishNumerals]
+%defineconversion [\s!es] [characters] [\spanishnumerals]
+%defineconversion [\s!es] [Characters] [\spanishNumerals]
+
+\defineconversion [\s!es] [alphabetic] [\spanishnumerals]
+\defineconversion [\s!es] [Alphabetic] [\spanishNumerals]
\defineconversion [\s!es] [a] [\spanishnumerals]
\defineconversion [\s!es] [A] [\spanishNumerals]
diff --git a/Master/texmf-dist/tex/context/base/core-ctx.ctx b/Master/texmf-dist/tex/context/base/mkiv/core-ctx.ctx
index 5126ad2d2bb..5126ad2d2bb 100644
--- a/Master/texmf-dist/tex/context/base/core-ctx.ctx
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-ctx.ctx
diff --git a/Master/texmf-dist/tex/context/base/core-ctx.lua b/Master/texmf-dist/tex/context/base/mkiv/core-ctx.lua
index c20691cd7be..c20691cd7be 100644
--- a/Master/texmf-dist/tex/context/base/core-ctx.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-ctx.lua
diff --git a/Master/texmf-dist/tex/context/base/core-ctx.mkiv b/Master/texmf-dist/tex/context/base/mkiv/core-ctx.mkiv
index e6372d0996a..e6372d0996a 100644
--- a/Master/texmf-dist/tex/context/base/core-ctx.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-ctx.mkiv
diff --git a/Master/texmf-dist/tex/context/base/core-dat.lua b/Master/texmf-dist/tex/context/base/mkiv/core-dat.lua
index ca6ec43730c..c3b00a7c098 100644
--- a/Master/texmf-dist/tex/context/base/core-dat.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-dat.lua
@@ -79,7 +79,7 @@ local function setdata(settings)
data = settings_to_hash(data)
end
if type(data) ~= "table" then
- data = { data = settings.data }
+ data = { data = data }
end
if not tag then
tag = #list + 1
diff --git a/Master/texmf-dist/tex/context/base/core-dat.mkiv b/Master/texmf-dist/tex/context/base/mkiv/core-dat.mkiv
index 26b1f14b5c0..26b1f14b5c0 100644
--- a/Master/texmf-dist/tex/context/base/core-dat.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-dat.mkiv
diff --git a/Master/texmf-dist/tex/context/base/core-def.mkiv b/Master/texmf-dist/tex/context/base/mkiv/core-def.mkiv
index acd411faccb..acd411faccb 100644
--- a/Master/texmf-dist/tex/context/base/core-def.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-def.mkiv
diff --git a/Master/texmf-dist/tex/context/base/mkiv/core-env.lua b/Master/texmf-dist/tex/context/base/mkiv/core-env.lua
new file mode 100644
index 00000000000..06c9708d6eb
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-env.lua
@@ -0,0 +1,274 @@
+if not modules then modules = { } end modules ['core-env'] = {
+ version = 1.001,
+ comment = "companion to core-env.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- maybe this will move to the context name space although the
+-- plurals are unlikely to clash with future tex primitives
+--
+-- if tex.modes['xxxx'] then .... else .... end
+
+local P, C, S, Cc, lpegmatch, patterns = lpeg.P, lpeg.C, lpeg.S, lpeg.Cc, lpeg.match, lpeg.patterns
+
+local context = context
+
+local texgetcount = tex.getcount
+local texsetcount = tex.setcount
+
+local allocate = utilities.storage.allocate
+local setmetatableindex = table.setmetatableindex
+local setmetatablecall = table.setmetatablecall
+
+local createtoken = token.create
+
+tex.modes = allocate { }
+tex.systemmodes = allocate { }
+tex.constants = allocate { }
+tex.conditionals = allocate { }
+tex.ifs = allocate { }
+tex.isdefined = allocate { }
+
+local modes = { }
+local systemmodes = { }
+
+-- we could use the built-in tex.is[count|dimen|skip|toks] here but caching
+-- at the lua en dis not that bad (and we need more anyway)
+
+-- undefined: mode == 0 or cmdname = "undefined_cs"
+
+
+local cache = table.setmetatableindex(function(t,k)
+ local v = createtoken(k)
+ t[k] = v
+ return v
+end)
+
+-- we can have a modes cache too
+
+local iftrue = cache["iftrue"].mode
+local undefined = cache["*undefined*crap*"].mode -- is this ok?
+
+setmetatableindex(tex.modes, function(t,k)
+ local m = modes[k]
+ if m then
+ return m()
+ else
+ local n = "mode>" .. k
+ if cache[n].mode == 0 then
+ return false
+ else
+ modes[k] = function() return texgetcount(n) == 1 end
+ return texgetcount(n) == 1 -- 2 is prevented
+ end
+ end
+end)
+
+setmetatableindex(tex.systemmodes, function(t,k)
+ local m = systemmodes[k]
+ if m then
+ return m()
+ else
+ local n = "mode>*" .. k
+ if cache[n].mode == 0 then
+ return false
+ else
+ systemmodes[k] = function() return texgetcount(n) == 1 end
+ return texgetcount(n) == 1 -- 2 is prevented
+ end
+ end
+end)
+
+setmetatableindex(tex.constants, function(t,k)
+ return cache[k].mode ~= 0 and texgetcount(k) or 0
+end)
+
+setmetatableindex(tex.conditionals, function(t,k) -- 0 == true
+ return cache[k].mode ~= 0 and texgetcount(k) == 0
+end)
+
+table.setmetatableindex(tex.ifs, function(t,k)
+ -- local mode = cache[k].mode
+ -- if mode == 0 then
+ -- return nil
+ -- else
+ -- return mode == iftrue
+ -- end
+ return cache[k].mode == iftrue
+end)
+
+setmetatableindex(tex.isdefined, function(t,k)
+ return k and cache[k].mode ~= 0
+end)
+
+setmetatablecall(tex.isdefined, function(t,k)
+ return k and cache[k].mode ~= 0
+end)
+
+local dimencode = cache["scratchdimen"] .command
+local countcode = cache["scratchcounter"] .command
+local tokencode = cache["scratchtoken"] .command
+local skipcode = cache["scratchskip"] .command
+local muskipcode = cache["scratchmuskip"] .command
+---- attributecode = cache["scratchattribute"].command
+
+local types = {
+ [dimencode] = "dimen",
+ [countcode] = "count",
+ [tokencode] = "token",
+ [skipcode] = "skip",
+ [muskipcode] = "muskip",
+ -- [attributecode] = "attribute",
+}
+
+function tex.isdimen(name)
+ local hit = cache[name]
+ return hit.command == dimencode and hit.index or true
+end
+
+function tex.iscount(name)
+ local hit = cache[name]
+ return hit.command == countcode and hit.index or true
+end
+
+function tex.istoken(name)
+ local hit = cache[name]
+ return hit.command == tokencode and hit.index or true
+end
+
+function tex.isskip(name)
+ local hit = cache[name]
+ return hit.command == skipcode and hit.index or true
+end
+
+function tex.ismuskip(name)
+ local hit = cache[name]
+ return hit.command == muskipcode and hit.index or true
+end
+
+function tex.type(name)
+ return types[cache[name].command] or "macro"
+end
+
+-- -- old token code
+--
+-- local csname_id = token.csname_id
+-- local create = token.create
+--
+-- local undefined = csname_id("*undefined*crap*")
+-- local iftrue = create("iftrue")[2] -- inefficient hack
+--
+-- setmetatableindex(tex.modes, function(t,k)
+-- local m = modes[k]
+-- if m then
+-- return m()
+-- else
+-- local n = "mode>" .. k
+-- if csname_id(n) == undefined then
+-- return false
+-- else
+-- modes[k] = function() return texgetcount(n) == 1 end
+-- return texgetcount(n) == 1 -- 2 is prevented
+-- end
+-- end
+-- end)
+--
+-- setmetatableindex(tex.systemmodes, function(t,k)
+-- local m = systemmodes[k]
+-- if m then
+-- return m()
+-- else
+-- local n = "mode>*" .. k
+-- if csname_id(n) == undefined then
+-- return false
+-- else
+-- systemmodes[k] = function() return texgetcount(n) == 1 end
+-- return texgetcount(n) == 1 -- 2 is prevented
+-- end
+-- end
+-- end)
+--
+-- setmetatableindex(tex.constants, function(t,k)
+-- return csname_id(k) ~= undefined and texgetcount(k) or 0
+-- end)
+--
+-- setmetatableindex(tex.conditionals, function(t,k) -- 0 == true
+-- return csname_id(k) ~= undefined and texgetcount(k) == 0
+-- end)
+--
+-- setmetatableindex(tex.ifs, function(t,k)
+-- -- k = "if" .. k -- better not
+-- return csname_id(k) ~= undefined and create(k)[2] == iftrue -- inefficient, this create, we need a helper
+-- end)
+--
+-- setmetatableindex(tex.isdefined, function(t,k)
+-- return k and csname_id(k) ~= undefined
+-- end)
+-- setmetatablecall(tex.isdefined, function(t,k)
+-- return k and csname_id(k) ~= undefined
+-- end)
+--
+-- local lookuptoken = token.lookup
+--
+-- local dimencode = lookuptoken("scratchdimen" )[1]
+-- local countcode = lookuptoken("scratchcounter")[1]
+-- local tokencode = lookuptoken("scratchtoken" )[1]
+-- local skipcode = lookuptoken("scratchskip" )[1]
+--
+-- local types = {
+-- [dimencode] = "dimen",
+-- [countcode] = "count",
+-- [tokencode] = "token",
+-- [skipcode ] = "skip",
+-- }
+--
+-- function tex.isdimen(name)
+-- return lookuptoken(name)[1] == dimencode
+-- end
+--
+-- function tex.iscount(name)
+-- return lookuptoken(name)[1] == countcode
+-- end
+--
+-- function tex.istoken(name)
+-- return lookuptoken(name)[1] == tokencode
+-- end
+--
+-- function tex.isskip(name)
+-- return lookuptoken(name)[1] == skipcode
+-- end
+--
+-- function tex.type(name)
+-- return types[lookuptoken(name)[1]] or "macro"
+-- end
+
+function context.setconditional(name,value)
+ if value then
+ context.settruevalue(name)
+ else
+ context.setfalsevalue(name)
+ end
+end
+
+---- arg = P("{") * C(patterns.nested) * P("}") + Cc("")
+
+local sep = S("), ")
+local str = C((1-sep)^1)
+local tag = P("(") * C((1-S(")" ))^1) * P(")")
+local arg = P("(") * C((1-S("){"))^1) * P("{") * C((1-P("}"))^0) * P("}") * P(")")
+
+local pattern = (
+ P("lua") * tag / context.luasetup
+ + P("xml") * arg / context.setupwithargument -- or xmlw as xmlsetup has swapped arguments
+ + (P("tex") * tag + str) / context.texsetup
+ + sep^1
+)^1
+
+interfaces.implement {
+ name = "autosetups",
+ actions = function(str) lpegmatch(pattern,str) end,
+ arguments = "string"
+}
+
diff --git a/Master/texmf-dist/tex/context/base/core-env.mkiv b/Master/texmf-dist/tex/context/base/mkiv/core-env.mkiv
index bebc1bef08c..e876dc80d94 100644
--- a/Master/texmf-dist/tex/context/base/core-env.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-env.mkiv
@@ -62,22 +62,22 @@
\unexpanded\def\setmode#1%
{\ifcsname\??mode#1\endcsname\else\syst_modes_new{#1}\fi
- \csname\??mode#1\endcsname\enabledmode}
+ \lastnamedcs\enabledmode}
\unexpanded\def\resetmode#1%
{\ifcsname\??mode#1\endcsname\else\syst_modes_new{#1}\fi
- \csname\??mode#1\endcsname\disabledmode}
+ \lastnamedcs\disabledmode}
\unexpanded\def\newsystemmode#1%
{\ifcsname\??mode\systemmodeprefix#1\endcsname\else\syst_modes_new{\systemmodeprefix#1}\fi}
\unexpanded\def\setsystemmode#1%
{\ifcsname\??mode\systemmodeprefix#1\endcsname\else\syst_modes_new{\systemmodeprefix#1}\fi
- \csname\??mode\systemmodeprefix#1\endcsname\enabledmode}
+ \lastnamedcs\enabledmode}
\unexpanded\def\resetsystemmode#1%
{\ifcsname\??mode\systemmodeprefix#1\endcsname\else\syst_modes_new{\systemmodeprefix#1}\fi
- \csname\??mode\systemmodeprefix#1\endcsname\disabledmode}
+ \lastnamedcs\disabledmode}
% \def\dosetsystemmode#1%
% {\csname\??mode\systemmodeprefix#1\endcsname\enabledmode}
@@ -117,18 +117,18 @@
\def\syst_modes_prevent_indeed#1%
{\ifcsname\??mode#1\endcsname\else\syst_modes_new{#1}\fi
- \syst_mode_prefix\csname\??mode#1\endcsname\preventedmode}
+ \syst_mode_prefix\lastnamedcs\preventedmode}
\def\syst_modes_enable_indeed#1% we can speed it up by moving the new outside
{\ifcsname\??mode#1\endcsname\else\syst_modes_new{#1}\fi
\ifnum\csname\??mode#1\endcsname=\preventedmode \else
- \syst_mode_prefix\csname\??mode#1\endcsname\enabledmode
+ \syst_mode_prefix\lastnamedcs\enabledmode
\fi}
\def\syst_modes_disable_indeed#1%
{\ifcsname\??mode#1\endcsname\else\syst_modes_new{#1}\fi
\ifnum\csname\??mode#1\endcsname=\preventedmode \else
- \syst_mode_prefix\csname\??mode#1\endcsname\disabledmode
+ \syst_mode_prefix\lastnamedcs\disabledmode
\fi}
%D If you do a lot of mode testing, it makes sense to define modes (or disable them
@@ -162,7 +162,7 @@
\def\booleanmodevalue#1%
{\ifcsname\??mode#1\endcsname
- \ifcase\csname\??mode#1\endcsname
+ \ifcase\lastnamedcs
\s!false
\or
\s!true
@@ -175,36 +175,13 @@
% check macros
-% For some reason the older version had an unprotect for grabbing the
-% mode list (only) which does not really make sense any more so that
-% has been removed. One should (un)protect at the outer level instead.
-
\newconditional\c_checked_mode
% one
-% \def\syst_modes_check_indeed#1%
-% {\ifcsname\??mode#1\endcsname
-% \ifcase\csname\??mode#1\endcsname\else
-% \let\syst_modes_check_step\gobbleoneargument
-% \fi
-% \fi}
-%
-% \def\syst_modes_check#1#2#3%
-% {\let\syst_modes_check_step\syst_modes_check_indeed
-% \rawprocesscommacommand[#3]\syst_modes_check_step
-% \ifx\syst_modes_check_step\gobbleoneargument
-% \expandafter#1%
-% \else
-% \expandafter#2%
-% \fi}
-
-% modes .. twice as fast on defined modes .. we could use definers and make it even faster
-% if needed
-
\def\syst_modes_check_indeed#1%
{\ifcsname\??mode#1\endcsname
- \ifcase\csname\??mode#1\endcsname\else
+ \ifcase\lastnamedcs\else
\let\syst_modes_check_step\gobbleoneargument
\fi
\fi}
@@ -219,7 +196,7 @@
\fi}
\def\syst_modes_check_yes#1#2#3%
- {\ifcase\csname\??mode#3\endcsname
+ {\ifcase\lastnamedcs
\expandafter#2%
\or
\expandafter#1%
@@ -227,7 +204,14 @@
\expandafter#2%
\fi}
-\def\syst_modes_check#1#2#3%
+\def\syst_modes_check_lr#1#2#3%
+ {\ifcsname\??mode#3\endcsname
+ \expandafter\syst_modes_check_yes
+ \else
+ \expandafter\syst_modes_check_nop
+ \fi#1#2{#3}}
+
+\def\syst_modes_check_ss#1#2[#3]%
{\ifcsname\??mode#3\endcsname
\expandafter\syst_modes_check_yes
\else
@@ -238,7 +222,7 @@
\def\syst_modes_check_all_indeed#1%
{\ifcsname\??mode#1\endcsname
- \ifcase\csname\??mode#1\endcsname
+ \ifcase\lastnamedcs
\let\syst_modes_check_all_step\gobbleoneargument
\or
% enabled
@@ -249,7 +233,7 @@
\let\syst_modes_check_all_step\gobbleoneargument
\fi}
-\def\syst_modes_check_all#1#2#3%
+\def\syst_modes_check_all_lr#1#2#3%
{\let\syst_modes_check_all_step\syst_modes_check_all_indeed
\rawprocesscommacommand[#3]\syst_modes_check_all_step
\ifx\syst_modes_check_all_step\gobbleoneargument
@@ -258,16 +242,25 @@
\expandafter#1%
\fi}
-\unexpanded\def\doifelsemode {\syst_modes_check\firstoftwoarguments\secondoftwoarguments}
-\unexpanded\def\doifmode {\syst_modes_check\firstofoneargument\gobbleoneargument}
-\unexpanded\def\doifnotmode {\syst_modes_check\gobbleoneargument\firstofoneargument}
-\unexpanded\def\startmode [#1]{\syst_modes_check\donothing\syst_modes_stop_yes{#1}}
-\unexpanded\def\startnotmode [#1]{\syst_modes_check\syst_modes_stop_nop\donothing{#1}}
-\unexpanded\def\doifelseallmodes {\syst_modes_check_all\firstoftwoarguments\secondoftwoarguments}
-\unexpanded\def\doifallmodes {\syst_modes_check_all\firstofoneargument\gobbleoneargument}
-\unexpanded\def\doifnotallmodes {\syst_modes_check_all\gobbleoneargument\firstofoneargument}
-\unexpanded\def\startallmodes [#1]{\syst_modes_check_all\donothing\syst_modes_stop_all_yes{#1}}
-\unexpanded\def\startnotallmodes[#1]{\syst_modes_check_all\syst_modes_stop_all_nop\donothing{#1}}
+\def\syst_modes_check_all_ss#1#2[#3]%
+ {\let\syst_modes_check_all_step\syst_modes_check_all_indeed
+ \rawprocesscommacommand[#3]\syst_modes_check_all_step
+ \ifx\syst_modes_check_all_step\gobbleoneargument
+ \expandafter#2%
+ \else
+ \expandafter#1%
+ \fi}
+
+\unexpanded\def\doifelsemode {\syst_modes_check_lr\firstoftwoarguments\secondoftwoarguments}
+\unexpanded\def\doifmode {\syst_modes_check_lr\firstofoneargument\gobbleoneargument}
+\unexpanded\def\doifnotmode {\syst_modes_check_lr\gobbleoneargument\firstofoneargument}
+\unexpanded\def\startmode {\syst_modes_check_ss\donothing\syst_modes_stop_yes}
+\unexpanded\def\startnotmode {\syst_modes_check_ss\syst_modes_stop_nop\donothing}
+\unexpanded\def\doifelseallmodes{\syst_modes_check_all_lr\firstoftwoarguments\secondoftwoarguments}
+\unexpanded\def\doifallmodes {\syst_modes_check_all_lr\firstofoneargument\gobbleoneargument}
+\unexpanded\def\doifnotallmodes {\syst_modes_check_all_lr\gobbleoneargument\firstofoneargument}
+\unexpanded\def\startallmodes {\syst_modes_check_all_ss\donothing\syst_modes_stop_all_yes}
+\unexpanded\def\startnotallmodes{\syst_modes_check_all_ss\syst_modes_stop_all_nop\donothing}
\let\doifmodeelse \doifelsemode
\let\doifallmodeselse \doifelseallmodes
@@ -284,25 +277,47 @@
%D Pushing/popping:
+% \unexpanded\def\pushmode[#1]%
+% {\ifcsname\??mode#1\endcsname\else\syst_modes_new{#1}\fi
+% \expandafter\edef\csname\??modestack#1\endcsname{\number\csname\??mode#1\endcsname}%
+% \expandafter\pushmacro\csname\??modestack#1\endcsname}
+%
+% \unexpanded\def\popmode[#1]%
+% {\ifcsname\??modestack#1\endcsname
+% \expandafter\popmacro\csname\??modestack#1\endcsname
+% \csname\??mode#1\endcsname\csname\??modestack#1\endcsname\relax
+% \fi}
+%
+% \def\pushsystemmode#1%
+% {\ifcsname\??mode\systemmodeprefix#1\endcsname\else\syst_modes_new{\systemmodeprefix#1}\fi
+% \expandafter\edef\csname\??modestack\systemmodeprefix#1\endcsname{\number\csname\??mode\systemmodeprefix#1\endcsname}%
+% \expandafter\pushmacro\csname\??modestack\systemmodeprefix#1\endcsname}
+%
+% \def\popsystemmode#1%
+% {\ifcsname\??modestack\systemmodeprefix#1\endcsname
+% \expandafter\popmacro\csname\??modestack\systemmodeprefix#1\endcsname
+% \csname\??mode\systemmodeprefix#1\endcsname\csname\??modestack\systemmodeprefix#1\endcsname\relax
+% \fi}
+
\unexpanded\def\pushmode[#1]%
{\ifcsname\??mode#1\endcsname\else\syst_modes_new{#1}\fi
- \expandafter\edef\csname\??modestack#1\endcsname{\number\csname\??mode#1\endcsname}%
- \expandafter\pushmacro\csname\??modestack#1\endcsname}
+ \expandafter\edef\csname\??modestack#1\expandafter\endcsname\expandafter{\number\lastnamedcs}%
+ \expandafter\pushmacro\lastnamedcs}
\unexpanded\def\popmode[#1]%
{\ifcsname\??modestack#1\endcsname
- \expandafter\popmacro\csname\??modestack#1\endcsname
+ \expandafter\popmacro\lastnamedcs
\csname\??mode#1\endcsname\csname\??modestack#1\endcsname\relax
\fi}
\def\pushsystemmode#1%
{\ifcsname\??mode\systemmodeprefix#1\endcsname\else\syst_modes_new{\systemmodeprefix#1}\fi
- \expandafter\edef\csname\??modestack\systemmodeprefix#1\endcsname{\number\csname\??mode\systemmodeprefix#1\endcsname}%
- \expandafter\pushmacro\csname\??modestack\systemmodeprefix#1\endcsname}
+ \expandafter\edef\csname\??modestack\systemmodeprefix#1\expandafter\endcsname\expandafter{\number\lastnamedcs}%
+ \expandafter\pushmacro\lastnamedcs}
\def\popsystemmode#1%
{\ifcsname\??modestack\systemmodeprefix#1\endcsname
- \expandafter\popmacro\csname\??modestack\systemmodeprefix#1\endcsname
+ \expandafter\popmacro\lastnamedcs
\csname\??mode\systemmodeprefix#1\endcsname\csname\??modestack\systemmodeprefix#1\endcsname\relax
\fi}
@@ -367,7 +382,7 @@
\fi}
\def\syst_modes_set_check
- {\syst_modes_check\syst_modes_set_yes\syst_modes_set_nop\m_mode_case}
+ {\syst_modes_check_lr\syst_modes_set_yes\syst_modes_set_nop\m_mode_case}
\def\syst_modes_set_yes#1%
{\settrue\c_syst_modes_set_done
@@ -408,73 +423,22 @@
\def\syst_setups_b[#1]{\processcommacommand[#1]\syst_setups} % [..]
\def\syst_setups_c[#1]{\syst_setups{#1}} % [..]
-\letvalue{\??setup:\letterpercent}\gobbleoneargument
-
-% \def\syst_setups#1% the grid option will be extended to other main modes
-% {\csname\??setup
-% \ifgridsnapping
-% \ifcsname\??setup\v!grid:#1\endcsname\v!grid:#1\else\ifcsname\??setup:#1\endcsname:#1\else:\letterpercent\fi\fi
-% \else
-% \ifcsname\??setup:#1\endcsname:#1\else:\letterpercent\fi
-% \fi
-% \endcsname\empty} % takes one argument
+\letvalue{\??setup:\??empty}\gobbleoneargument
\def\syst_setups#1% the grid option will be extended to other main modes
{\csname\??setup
\ifgridsnapping
- \ifcsname\??setup\v!grid:#1\endcsname\v!grid:#1\else:\ifcsname\??setup:#1\endcsname#1\else\letterpercent\fi\fi
+ \ifcsname\??setup\v!grid:#1\endcsname\v!grid:#1\else:\ifcsname\??setup:#1\endcsname#1\else\??empty\fi\fi
\else
- :\ifcsname\??setup:#1\endcsname#1\else\letterpercent\fi
+ :\ifcsname\??setup:#1\endcsname#1\else\??empty\fi
\fi
\endcsname\empty} % takes one argument
-% not faster but less tracing sometimes:
-%
-% \def\syst_setups% the grid option will be extended to other main modes
-% {\csname\??setup\ifgridsnapping\expandafter\syst_setups_grid\else\expandafter\syst_setups_normal\fi}
-%
-% \def\syst_setups_grid#1%
-% {\ifcsname\??setup\v!grid:#1\endcsname\v!grid:#1\else\ifcsname\??setup:#1\endcsname:#1\else:\letterpercent\fi\fi\endcsname\empty} % takes one argument
-%
-% \def\syst_setups_normal#1%
-% {:\ifcsname\??setup:#1\endcsname#1\else\letterpercent\fi\endcsname\empty} % takes one argument
-%
-% only makes sense with many setups
-%
-% \def\syst_setups% the grid option will be extended to other main modes
-% {\ifgridsnapping
-% \expandafter\syst_setups_grid
-% \else
-% \expandafter\syst_setups_normal
-% \fi}
-%
-% \def\syst_setups_normal#1% the grid option will be extended to other main modes
-% {\csname\??setup
-% :\ifcsname\??setup:#1\endcsname#1\else\letterpercent\fi
-% \endcsname\empty} % takes one argument
-%
-% \def\syst_setups_grid#1% the grid option will be extended to other main modes
-% {\csname\??setup
-% \ifcsname\??setup\v!grid:#1\endcsname\v!grid:#1\else:\ifcsname\??setup:#1\endcsname#1\else\letterpercent\fi\fi
-% \endcsname\empty} % takes one argument
-%
-% \let\directsetup\syst_setups
-% \let\texsetup \syst_setups % nicer than \directsetup and more en par with xmlsetup and luasetup
-
-% We can consider:
-%
-% \setvalue{\??setup->\v!auto}#1{\ctxcommand{autosetup("#1")}}
-%
-% ":\letterpercent" => "->\v!auto" with "\endcsname{#1}"
-%
-% but it won't work out well with multiple setups (intercepted at the
-% lua end) that then get only one argument.
-
% no checking and we assume it being defined:
\def\fastsetup #1{\csname\??setup:#1\endcsname\empty}
-\def\fastsetupwithargument #1#2{\csname\??setup:#2\endcsname{#1}}
-\def\fastsetupwithargumentswapped #1{\csname\??setup:#1\endcsname}
+\def\fastsetupwithargument #1{\csname\??setup:#1\endcsname} % swapped per 2015-08-30
+\def\fastsetupwithargumentswapped#1#2{\csname\??setup:#2\endcsname{#1}}% swapped per 2015-09-05
% the next one is meant for \c!setups situations, hence the check for
% a shortcut
@@ -509,10 +473,10 @@
{\clf_autosetups{#1}}
\edef\setupwithargument#1% saves a few expansions
- {\noexpand\csname\??setup:\noexpand\ifcsname\??setup:#1\endcsname#1\noexpand\else\letterpercent\noexpand\fi\endcsname}
+ {\noexpand\csname\??setup:\noexpand\ifcsname\??setup:#1\endcsname#1\noexpand\else\??empty\noexpand\fi\endcsname}
\edef\setupwithargumentswapped#1#2% saves a few expansions (can be \let)
- {\noexpand\csname\??setup:\noexpand\ifcsname\??setup:#2\endcsname#2\noexpand\else\letterpercent\noexpand\fi\endcsname{#1}}
+ {\noexpand\csname\??setup:\noexpand\ifcsname\??setup:#2\endcsname#2\noexpand\else\??empty\noexpand\fi\endcsname{#1}}
\let\directsetup\syst_setups
\let\texsetup \syst_setups % nicer than \directsetup and more en par with xmlsetup and luasetup
@@ -540,6 +504,24 @@
\expandafter\firstofoneargument
\fi}
+% maybe some day:
+%
+% \unexpanded\def\fastsetupfallback#1#2%
+% {\ifcsname\??setup:#1\endcsname
+% \expandafter\lastnamedcs
+% \else
+% \csname\??setup:#2\expandafter\endcsname
+% \fi}
+%
+% or
+%
+% \unexpanded\def\fastsetupfallback#1#2#3% prefix preferred fallback
+% {\ifcsname\??setup:#1#2\endcsname
+% \expandafter\lastnamedcs
+% \else
+% \csname\??setup:#1#3\expandafter\endcsname
+% \fi}
+
% \startluasetups oeps
% context("DONE")
% a = 1
@@ -650,9 +632,9 @@
\unexpanded\def\resetsetups[#1]% see x-fo for usage
{\ifcsname\??setup\ifgridsnapping\v!grid\fi:#1\endcsname
- \dodoglobal\letbeundefined{\??setup\ifgridsnapping\v!grid\fi:#1}%
+ \dodoglobal\undefinevalue{\??setup\ifgridsnapping\v!grid\fi:#1}%
\else
- \dodoglobal\letbeundefined{\??setup:#1}%
+ \dodoglobal\undefinevalue{\??setup:#1}%
\fi}
\unexpanded\def\showsetupsdefinition[#1]%
@@ -697,13 +679,16 @@
\unexpanded\def\setgvariable#1#2#3{\expandafter\gdef\csname\??variables#1:#2\endcsname{#3}}
\unexpanded\def\setxvariable#1#2#3{\expandafter\xdef\csname\??variables#1:#2\endcsname{#3}}
+% \def\getvariable#1#2%
+% {\csname
+% \ifcsname\??variables#1:#2\endcsname\??variables#1:#2\else\s!empty\fi
+% \endcsname}
+
\def\getvariable#1#2%
- {\csname
- \ifcsname\??variables#1:#2\endcsname\??variables#1:#2\else\s!empty\fi
- \endcsname}
+ {\begincsname\??variables#1:#2\endcsname}
\def\showvariable#1#2%
- {\showvalue{\ifcsname\??variables#1:#2\endcsname\??variables#1:#2\else\s!empty\fi}}
+ {\showvalue{\begincsname\??variables#1:#2\endcsname}}
\let\currentvariableclass\empty
@@ -722,7 +707,8 @@
\def\syst_variables_check_value#1#2#3%
{\ifcsname\??variables#1:#2\endcsname
- \edef\m_syst_variables_temp{\csname\??variables#1:#2\endcsname}%
+ %\edef\m_syst_variables_temp{\csname\??variables#1:#2\endcsname}%
+ \edef\m_syst_variables_temp{\lastnamedcs}%
\ifx\m_syst_variables_temp\empty
\expandafter\def\csname\??variables#1:#2\endcsname{#3}%
\fi
@@ -764,7 +750,8 @@
\letvalue{\??variables:}\empty
\unexpanded\def\doifelseemptyvariable#1#2%
- {\edef\m_syst_string_one{\csname\??variables\ifcsname\??variables#1:#2\endcsname#1:#2\else:\fi\endcsname}%
+ %{\edef\m_syst_string_one{\csname\??variables\ifcsname\??variables#1:#2\endcsname#1:#2\else:\fi\endcsname}%
+ {\edef\m_syst_string_one{\begincsname\??variables#1:#2\endcsname}%
\ifx\m_syst_string_one\empty
\expandafter\firstoffourarguments
\else
@@ -774,7 +761,8 @@
\let\doifemptyvariableelse\doifelseemptyvariable
\unexpanded\def\doifemptyvariable#1#2%
- {\edef\m_syst_string_one{\csname\??variables\ifcsname\??variables#1:#2\endcsname#1:#2\else:\fi\endcsname}%
+ %{\edef\m_syst_string_one{\csname\??variables\ifcsname\??variables#1:#2\endcsname#1:#2\else:\fi\endcsname}%
+ {\edef\m_syst_string_one{\begincsname\??variables#1:#2\endcsname}%
\ifx\m_syst_string_one\empty
\expandafter\firstofoneargument
\else
@@ -782,16 +770,21 @@
\fi}
\unexpanded\def\doifnotemptyvariable#1#2%
- {\edef\m_syst_string_one{\csname\??variables\ifcsname\??variables#1:#2\endcsname#1:#2\else:\fi\endcsname}%
+ %{\edef\m_syst_string_one{\csname\??variables\ifcsname\??variables#1:#2\endcsname#1:#2\else:\fi\endcsname}%
+ {\edef\m_syst_string_one{\begincsname\??variables#1:#2\endcsname}%
\ifx\m_syst_string_one\empty
\expandafter\gobbleoneargument
\else
\expandafter\firstofoneargument
\fi}
-
-\def\getvariabledefault#1#2% #3% can be command, so no ifcsname here
- {\executeifdefined{\??variables#1:#2}}% {#3}
+\def\getvariabledefault#1#2% #3% can be command
+ %{\executeifdefined{\??variables#1:#2}}% {#3}
+ {\ifcsname\??variables#1:#2\endcsname
+ \expandafter\expandafter\expandafter\lastnamedcs\expandafter\gobbleoneargument
+ \else
+ \expandafter\firstofoneargument
+ \fi}
\unexpanded\def\setupenv
{\dotripleargument\syst_variables_set[\getrawparameters][\s!environment]}
diff --git a/Master/texmf-dist/tex/context/base/core-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/core-ini.mkiv
index c338f6f814e..0407409a39d 100644
--- a/Master/texmf-dist/tex/context/base/core-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-ini.mkiv
@@ -115,8 +115,8 @@
\newtoks \everyglobalbodyfont
\newtoks \everydefinedfont
-\newevery \everybodyfont \EveryBodyFont
-\newevery \everyfontswitch \EveryFontSwitch
+\newtoks \everybodyfont
+\newtoks \everyfontswitch
\newtoks \everysetupbodyfont
\newtoks \everyswitchtobodyfont
diff --git a/Master/texmf-dist/tex/context/base/core-sys.lua b/Master/texmf-dist/tex/context/base/mkiv/core-sys.lua
index cf74d68f461..3e39fa9da92 100644
--- a/Master/texmf-dist/tex/context/base/core-sys.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-sys.lua
@@ -71,8 +71,11 @@ implement { name = "outputfilename", actions = function() context(environme
statistics.register("result saved in file", function()
-- suffix will be fetched from backend
local outputfilename = environment.outputfilename or environment.jobname or tex.jobname or "<unset>"
- if tex.pdfoutput > 0 then
- return format("%s.%s, compresslevel %s, objectcompresslevel %s",outputfilename,"pdf",tex.pdfcompresslevel, tex.pdfobjcompresslevel)
+ if (tex.pdfoutput or tex.outputmode) > 0 then
+ return format("%s.%s, compresslevel %s, objectcompresslevel %s",outputfilename,"pdf",
+ pdf.getcompresslevel(),
+ pdf.getobjcompresslevel()
+ )
else
return format("%s.%s",outputfilename,"dvi") -- hard to imagine
end
diff --git a/Master/texmf-dist/tex/context/base/core-sys.mkiv b/Master/texmf-dist/tex/context/base/mkiv/core-sys.mkiv
index 1358f4cce80..cc9dafdd2f8 100644
--- a/Master/texmf-dist/tex/context/base/core-sys.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-sys.mkiv
@@ -417,7 +417,8 @@
%D This is a checked variant of \type {\getvalue}.
\unexpanded\def\macroname#1% brrr
- {\csname\ifcsname#1\endcsname#1\else\s!empty\fi\endcsname}
+% {\csname\ifcsname#1\endcsname#1\else\s!empty\fi\endcsname}
+ {\begincsname#1\endcsname}
% %D A weird one that I probably needed once, so it might as well become
% %D obsolete.
diff --git a/Master/texmf-dist/tex/context/base/core-two.lua b/Master/texmf-dist/tex/context/base/mkiv/core-two.lua
index bb1afa7db2f..bb1afa7db2f 100644
--- a/Master/texmf-dist/tex/context/base/core-two.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-two.lua
diff --git a/Master/texmf-dist/tex/context/base/core-two.mkiv b/Master/texmf-dist/tex/context/base/mkiv/core-two.mkiv
index 5a791dea2f7..5a791dea2f7 100644
--- a/Master/texmf-dist/tex/context/base/core-two.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-two.mkiv
diff --git a/Master/texmf-dist/tex/context/base/core-uti.lua b/Master/texmf-dist/tex/context/base/mkiv/core-uti.lua
index a4b74768053..23057872ffe 100644
--- a/Master/texmf-dist/tex/context/base/core-uti.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-uti.lua
@@ -17,6 +17,7 @@ utility file under different setups, we now load a table once. This
saves much runtime but at the cost of more memory usage.</p>
--ldx]]--
+local math = math
local format, match = string.format, string.match
local next, type, tostring = next, type, tostring
local concat = table.concat
@@ -82,7 +83,7 @@ function job.initialize(loadname,savename)
if not savename or savename == "" then
savename = tex.jobname .. ".tua"
end
- job.load(loadname) -- has to come after structure is defined !
+ job.load(loadname) -- has to come after structure is defined !
luatex.registerstopactions(function()
if enabled and not status.lasterrorstring or status.lasterrorstring == "" then
-- if kept then
@@ -121,12 +122,14 @@ end
job.register('job.variables.checksums', 'job.variables.checksums', initializer)
local rmethod, rvalue
+local collectedmacros, tobesavedmacros
local ctx_setxvalue = context.setxvalue
local function initializer()
tobesaved = jobvariables.tobesaved
collected = jobvariables.collected
+ --
rvalue = collected.randomseed
if not rvalue then
rvalue = math.random()
@@ -137,19 +140,33 @@ local function initializer()
rmethod = "resumed"
end
tobesaved.randomseed = rvalue
- for cs, value in next, collected do
- ctx_setxvalue(cs,value)
+ --
+ collectedmacros = collected.macros
+ tobesavedmacros = tobesaved.macros
+ if not collectedmacros then
+ collectedmacros = { }
+ collected.macros = collectedmacros
+ end
+ if not tobesavedmacros then
+ tobesavedmacros = { }
+ tobesaved.macros = tobesavedmacros
+ end
+ -- will become collected.macros
+ for cs, value in next, collectedmacros do
+ if type(value) == "string" then -- safeguard
+ ctx_setxvalue(cs,value)
+ end
end
end
job.register('job.variables.collected', tobesaved, initializer)
function jobvariables.save(cs,value)
- tobesaved[cs] = value
+ tobesavedmacros[cs] = value
end
function jobvariables.restore(cs)
- return collected[cs] or tobesaved[cs]
+ return collectedmacros[cs] or tobesavedmacros[cs]
end
-- checksums
@@ -181,7 +198,15 @@ local packlist = {
-- "references", -- we need to rename of them as only one packs (not structures.lists.references)
}
-local jobpacker = packers.new(packlist,job.packversion) -- jump number when changs in hash
+local skiplist = {
+ "datasets",
+ "userdata",
+}
+
+-- not ok as we can have arbitrary keys in userdata and dataset so some day we
+-- might need a bit more granularity, like skippers
+
+local jobpacker = packers.new(packlist,job.packversion,skiplist) -- jump number when changs in hash
job.pack = true
-- job.pack = false
diff --git a/Master/texmf-dist/tex/context/base/core-uti.mkiv b/Master/texmf-dist/tex/context/base/mkiv/core-uti.mkiv
index cdd8958ff62..de9a893ee8e 100644
--- a/Master/texmf-dist/tex/context/base/core-uti.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-uti.mkiv
@@ -18,7 +18,7 @@
\registerctxluafile{core-uti}{1.001}
\def\savecurrentvalue#1#2% immediate, so not \unexpanded
- {\clf_savevariable{\strippedcsname#1}{#2}}
+ {\clf_savevariable{\csstring#1}{#2}}
\appendtoks
\clf_setjobcomment
diff --git a/Master/texmf-dist/tex/context/base/data-aux.lua b/Master/texmf-dist/tex/context/base/mkiv/data-aux.lua
index dae96ce6200..dae96ce6200 100644
--- a/Master/texmf-dist/tex/context/base/data-aux.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-aux.lua
diff --git a/Master/texmf-dist/tex/context/base/data-bin.lua b/Master/texmf-dist/tex/context/base/mkiv/data-bin.lua
index 1d1e8b74959..1d1e8b74959 100644
--- a/Master/texmf-dist/tex/context/base/data-bin.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-bin.lua
diff --git a/Master/texmf-dist/tex/context/base/data-con.lua b/Master/texmf-dist/tex/context/base/mkiv/data-con.lua
index 240538df2db..240538df2db 100644
--- a/Master/texmf-dist/tex/context/base/data-con.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-con.lua
diff --git a/Master/texmf-dist/tex/context/base/data-crl.lua b/Master/texmf-dist/tex/context/base/mkiv/data-crl.lua
index fba5a62305b..fba5a62305b 100644
--- a/Master/texmf-dist/tex/context/base/data-crl.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-crl.lua
diff --git a/Master/texmf-dist/tex/context/base/data-ctx.lua b/Master/texmf-dist/tex/context/base/mkiv/data-ctx.lua
index 345e9c7411a..345e9c7411a 100644
--- a/Master/texmf-dist/tex/context/base/data-ctx.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-ctx.lua
diff --git a/Master/texmf-dist/tex/context/base/data-env.lua b/Master/texmf-dist/tex/context/base/mkiv/data-env.lua
index 1d7728c22c9..8bb25036de1 100644
--- a/Master/texmf-dist/tex/context/base/data-env.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-env.lua
@@ -139,6 +139,11 @@ local relations = allocate { -- todo: handlers also here
names = { 'fontconfig', 'fontconfig file', 'fontconfig files' },
variable = 'FONTCONFIG_PATH',
},
+ pk = {
+ names = { "pk" },
+ variable = 'PKFONTS',
+ suffixes = { 'pk' },
+ },
},
obsolete = {
enc = {
diff --git a/Master/texmf-dist/tex/context/base/data-exp.lua b/Master/texmf-dist/tex/context/base/mkiv/data-exp.lua
index 0a739617101..19ceb90c342 100644
--- a/Master/texmf-dist/tex/context/base/data-exp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-exp.lua
@@ -8,6 +8,7 @@ if not modules then modules = { } end modules ['data-exp'] = {
local format, find, gmatch, lower, char, sub = string.format, string.find, string.gmatch, string.lower, string.char, string.sub
local concat, sort = table.concat, table.sort
+local sortedkeys = table.sortedkeys
local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
local Ct, Cs, Cc, Carg, P, C, S = lpeg.Ct, lpeg.Cs, lpeg.Cc, lpeg.Carg, lpeg.P, lpeg.C, lpeg.S
local type, next = type, next
@@ -501,17 +502,41 @@ end
local nothing = function() end
+-- function resolvers.filtered_from_content(content,pattern)
+-- if content and type(pattern) == "string" then
+-- local pattern = lower(pattern)
+-- local files = content.files
+-- local remap = content.remap
+-- if files and remap then
+-- local n = next(files)
+-- local function iterator()
+-- while n do
+-- local k = n
+-- n = next(files,k)
+-- if find(k,pattern) then
+-- return files[k], remap and remap[k] or k
+-- end
+-- end
+-- end
+-- return iterator
+-- end
+-- end
+-- return nothing
+-- end
+
function resolvers.filtered_from_content(content,pattern)
if content and type(pattern) == "string" then
local pattern = lower(pattern)
- local files = content.files
+ local files = content.files -- we could store the sorted list
local remap = content.remap
if files and remap then
- local n = next(files)
+ local f = sortedkeys(files)
+ local n = #f
+ local i = 0
local function iterator()
- while n do
- local k = n
- n = next(files,k)
+ while i < n do
+ i = i + 1
+ local k = f[i]
if find(k,pattern) then
return files[k], remap and remap[k] or k
end
@@ -523,6 +548,5 @@ function resolvers.filtered_from_content(content,pattern)
return nothing
end
-
-- inspect(resolvers.simplescanfiles("e:/temporary/mb-mp"))
-- inspect(resolvers.scanfiles("e:/temporary/mb-mp"))
diff --git a/Master/texmf-dist/tex/context/base/data-fil.lua b/Master/texmf-dist/tex/context/base/mkiv/data-fil.lua
index b699fc9e38f..b699fc9e38f 100644
--- a/Master/texmf-dist/tex/context/base/data-fil.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-fil.lua
diff --git a/Master/texmf-dist/tex/context/base/data-gen.lua b/Master/texmf-dist/tex/context/base/mkiv/data-gen.lua
index 5a07558315b..5a07558315b 100644
--- a/Master/texmf-dist/tex/context/base/data-gen.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-gen.lua
diff --git a/Master/texmf-dist/tex/context/base/data-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/data-ini.lua
index c74ff2e04b2..c74ff2e04b2 100644
--- a/Master/texmf-dist/tex/context/base/data-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-ini.lua
diff --git a/Master/texmf-dist/tex/context/base/data-inp.lua b/Master/texmf-dist/tex/context/base/mkiv/data-inp.lua
index 97fb8904b91..97fb8904b91 100644
--- a/Master/texmf-dist/tex/context/base/data-inp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-inp.lua
diff --git a/Master/texmf-dist/tex/context/base/data-lst.lua b/Master/texmf-dist/tex/context/base/mkiv/data-lst.lua
index e4621a6e16d..e4621a6e16d 100644
--- a/Master/texmf-dist/tex/context/base/data-lst.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-lst.lua
diff --git a/Master/texmf-dist/tex/context/base/data-lua.lua b/Master/texmf-dist/tex/context/base/mkiv/data-lua.lua
index 7c12a5940f5..7c12a5940f5 100644
--- a/Master/texmf-dist/tex/context/base/data-lua.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-lua.lua
diff --git a/Master/texmf-dist/tex/context/base/data-met.lua b/Master/texmf-dist/tex/context/base/mkiv/data-met.lua
index 4e8a48f50e1..4e8a48f50e1 100644
--- a/Master/texmf-dist/tex/context/base/data-met.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-met.lua
diff --git a/Master/texmf-dist/tex/context/base/data-out.lua b/Master/texmf-dist/tex/context/base/mkiv/data-out.lua
index 11304c2ced3..11304c2ced3 100644
--- a/Master/texmf-dist/tex/context/base/data-out.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-out.lua
diff --git a/Master/texmf-dist/tex/context/base/data-pre.lua b/Master/texmf-dist/tex/context/base/mkiv/data-pre.lua
index 1c5016f8644..1c5016f8644 100644
--- a/Master/texmf-dist/tex/context/base/data-pre.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-pre.lua
diff --git a/Master/texmf-dist/tex/context/base/data-res.lua b/Master/texmf-dist/tex/context/base/mkiv/data-res.lua
index cbda21ce212..831ad881c2b 100644
--- a/Master/texmf-dist/tex/context/base/data-res.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-res.lua
@@ -1558,11 +1558,21 @@ local function findfiles(filename,filetype,allresults)
end
function resolvers.findfiles(filename,filetype)
- return findfiles(filename,filetype,true)
+ if not filename or filename == "" then
+ -- weird ... why called then
+ return ""
+ else
+ return findfiles(filename,filetype,true)
+ end
end
function resolvers.findfile(filename,filetype)
- return findfiles(filename,filetype,false)[1] or ""
+ if not filename or filename == "" then
+ -- weird ... why called then
+ return ""
+ else
+ return findfiles(filename,filetype,false)[1] or ""
+ end
end
function resolvers.findpath(filename,filetype)
diff --git a/Master/texmf-dist/tex/context/base/data-sch.lua b/Master/texmf-dist/tex/context/base/mkiv/data-sch.lua
index d79e0c7ef59..d79e0c7ef59 100644
--- a/Master/texmf-dist/tex/context/base/data-sch.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-sch.lua
diff --git a/Master/texmf-dist/tex/context/base/data-tex.lua b/Master/texmf-dist/tex/context/base/mkiv/data-tex.lua
index b6b97a0a989..b6b97a0a989 100644
--- a/Master/texmf-dist/tex/context/base/data-tex.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-tex.lua
diff --git a/Master/texmf-dist/tex/context/base/data-tmf.lua b/Master/texmf-dist/tex/context/base/mkiv/data-tmf.lua
index e0ccac257a1..e0ccac257a1 100644
--- a/Master/texmf-dist/tex/context/base/data-tmf.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-tmf.lua
diff --git a/Master/texmf-dist/tex/context/base/data-tmp.lua b/Master/texmf-dist/tex/context/base/mkiv/data-tmp.lua
index 9e1515a2650..9e1515a2650 100644
--- a/Master/texmf-dist/tex/context/base/data-tmp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-tmp.lua
diff --git a/Master/texmf-dist/tex/context/base/data-tre.lua b/Master/texmf-dist/tex/context/base/mkiv/data-tre.lua
index 4388731f98c..4388731f98c 100644
--- a/Master/texmf-dist/tex/context/base/data-tre.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-tre.lua
diff --git a/Master/texmf-dist/tex/context/base/data-use.lua b/Master/texmf-dist/tex/context/base/mkiv/data-use.lua
index 7598506e459..7598506e459 100644
--- a/Master/texmf-dist/tex/context/base/data-use.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-use.lua
diff --git a/Master/texmf-dist/tex/context/base/data-vir.lua b/Master/texmf-dist/tex/context/base/mkiv/data-vir.lua
index 7e25c822d07..7e25c822d07 100644
--- a/Master/texmf-dist/tex/context/base/data-vir.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-vir.lua
diff --git a/Master/texmf-dist/tex/context/base/data-zip.lua b/Master/texmf-dist/tex/context/base/mkiv/data-zip.lua
index 2be88e0fc1c..2be88e0fc1c 100644
--- a/Master/texmf-dist/tex/context/base/data-zip.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-zip.lua
diff --git a/Master/texmf-dist/tex/context/base/enco-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/enco-ini.mkiv
index ef0ebef4ebb..835ee61f575 100644
--- a/Master/texmf-dist/tex/context/base/enco-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/enco-ini.mkiv
@@ -111,10 +111,36 @@
% \relax#2%
% \endgroup}
+% \unexpanded\def\buildtextaccent#1#2% we could do all at the lua end
+% {\begingroup % but that's no fun (yet)
+% \setbox\b_enco_accent\hbox{#1}%
+% \clf_buildtextaccent\b_enco_accent#2%
+% \endgroup}
+%
+% This one can handle font collections too. The accent command is a scanner
+% and the same font and otherwise discards the character (imo it could
+% better drop the accent).
+
\unexpanded\def\buildtextaccent#1#2% we could do all at the lua end
- {\begingroup % but that's no fun (yet)
- \setbox\b_enco_accent\hbox{#1}%
- \clf_buildtextaccent\b_enco_accent#2%
+ {\dontleavehmode\begingroup % but that's no fun (yet)
+ \setbox\scratchboxone\hbox{#1}% accent
+ \setbox\scratchboxtwo\hbox{#2}% character
+ \scratchheight\dimexpr\ht\scratchboxtwo-\ht\scratchboxone\relax
+ \scratchdepth \dimexpr\dp\scratchboxtwo-\dp\scratchboxone\relax
+ \scratchwidth \wd\scratchboxtwo
+ \hbox to \wd\ifdim\wd\scratchboxone>\wd\scratchboxtwo\scratchboxone\else\scratchboxtwo\fi\bgroup
+ \hss\box\scratchboxtwo\hss
+ \hskip-\scratchwidth
+ \hss
+ \ifdim\ht\scratchboxone>\exheight
+ % top accent
+ \raise\dimexpr\scratchheight+\exheight/3\relax
+ \else
+ \lower-\dimexpr\scratchdepth+\exheight/3\relax
+ \fi
+ \box\scratchboxone
+ \hss
+ \egroup
\endgroup}
\unexpanded\def\bottomaccent#1#2#3#4#5% down right slantcorrection accent char
@@ -132,7 +158,7 @@
\hidewidth
\hskip#2\wd0
\hskip-#3\slantperpoint % in plain 1ex * dimenless value
- \vbox to .2\exheight{\box0\vss}\hidewidth
+ \vpack to .2\exheight{\box0\vss}\hidewidth
\crcr}}}
\unexpanded\def\buildtextmacron {\bottomaccent{.25ex}{0}{15}{\textmacron}}
@@ -255,6 +281,10 @@
% some more
+\ifdefined\softhyphen \else
+ \let\softhyphen\-
+\fi
+
\def\hyphen {\softhyphen}
\def\compoundwordmark {\hyphen}
\def\cwm {\hyphen}
diff --git a/Master/texmf-dist/tex/context/base/export-example.css b/Master/texmf-dist/tex/context/base/mkiv/export-example.css
index f4475589211..8c7ae3bfc67 100644
--- a/Master/texmf-dist/tex/context/base/export-example.css
+++ b/Master/texmf-dist/tex/context/base/mkiv/export-example.css
@@ -560,9 +560,13 @@ listpage, context|div.listpage {
display : none ;
}
-/* delimitedblock : display */
-/* delimited : inline */
-/* subsentence : inline */
+/* delimitedblock : display */
+/* delimited : inline */
+/* delimitedsymbol : inline */
+/* delimitedcontent : inline */
+/* subsentence : inline */
+/* subsentencesymbol : inline */
+/* subsentencecontent : inline */
/* :lang(en) */
@@ -594,6 +598,14 @@ delimited, context|div.delimited {
display : inline
}
+delimitedcontent, context|div.delimitedcontent {
+ display : inline
+}
+
+delimitedsymbol, context|div.delimitedsymbol {
+ display : inline
+}
+
delimitedblock, context|div.delimitedblock {
display : block
}
@@ -606,6 +618,14 @@ subsentence, context|div.subsentence {
display : inline
}
+subsentencecontent, context|div.subsentencecontent {
+ display : inline
+}
+
+subsentencesymbol, context|div.subsentencesymbol {
+ display : inline
+}
+
/* label : mixed */
/* number : mixed */
diff --git a/Master/texmf-dist/tex/context/base/export-example.rng b/Master/texmf-dist/tex/context/base/mkiv/export-example.rng
index 93b21ba50bb..93b21ba50bb 100644
--- a/Master/texmf-dist/tex/context/base/export-example.rng
+++ b/Master/texmf-dist/tex/context/base/mkiv/export-example.rng
diff --git a/Master/texmf-dist/tex/context/base/export-example.tex b/Master/texmf-dist/tex/context/base/mkiv/export-example.tex
index 32cb79c5ea2..32cb79c5ea2 100644
--- a/Master/texmf-dist/tex/context/base/export-example.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/export-example.tex
diff --git a/Master/texmf-dist/tex/context/base/file-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/file-ini.lua
index 2a0271a9d80..2a0271a9d80 100644
--- a/Master/texmf-dist/tex/context/base/file-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/file-ini.lua
diff --git a/Master/texmf-dist/tex/context/base/file-ini.mkvi b/Master/texmf-dist/tex/context/base/mkiv/file-ini.mkvi
index cb9f18cf962..9f12e9a3ba2 100644
--- a/Master/texmf-dist/tex/context/base/file-ini.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/file-ini.mkvi
@@ -234,6 +234,6 @@
\fi}
\unexpanded\def\forgetdoingonce#whatever%
- {\global\letbeundefined{\??fileonce#whatever}}
+ {\global\undefinevalue{\??fileonce#whatever}}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/file-job.lua b/Master/texmf-dist/tex/context/base/mkiv/file-job.lua
index 3a034f0a33e..602c41a118c 100644
--- a/Master/texmf-dist/tex/context/base/file-job.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/file-job.lua
@@ -9,6 +9,7 @@ if not modules then modules = { } end modules ['file-job'] = {
-- in retrospect dealing it's not that bad to deal with the nesting
-- and push/poppign at the tex end
+local rawget = rawget
local gsub, match, find = string.gsub, string.match, string.find
local insert, remove, concat = table.insert, table.remove, table.concat
local validstring, formatters = string.valid, string.formatters
@@ -25,6 +26,7 @@ local implement = interfaces.implement
local trace_jobfiles = false trackers.register("system.jobfiles", function(v) trace_jobfiles = v end)
local report_jobfiles = logs.reporter("system","jobfiles")
+local report_functions = logs.reporter("system","functions")
local texsetcount = tex.setcount
local elements = interfaces.elements
@@ -64,7 +66,7 @@ local v_project = variables.project
local v_environment = variables.environment
local v_product = variables.product
local v_component = variables.component
-local c_prefix = variables.prefix
+local v_yes = variables.yes
-- main code .. there is some overlap .. here we have loc://
@@ -849,6 +851,13 @@ document = document or {
modes = allocate(),
},
},
+ functions = table.setmetatablenewindex(function(t,k,v)
+ if rawget(t,k) then
+ report_functions("overloading document function %a",k)
+ end
+ rawset(t,k,v)
+ return v
+ end),
}
function document.setargument(key,value)
@@ -955,6 +964,10 @@ function document.setcommandline() -- has to happen at the tex end in order to e
context.usepath { arguments.path }
end
+ if arguments.export then
+ context.setupbackend { export = v_yes }
+ end
+
local inputfile = validstring(arguments.input)
if inputfile and dirname(inputfile) == "." and lfs.isfile(inputfile) then
diff --git a/Master/texmf-dist/tex/context/base/file-job.mkvi b/Master/texmf-dist/tex/context/base/mkiv/file-job.mkvi
index 7814aba3f62..7814aba3f62 100644
--- a/Master/texmf-dist/tex/context/base/file-job.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/file-job.mkvi
diff --git a/Master/texmf-dist/tex/context/base/file-lib.lua b/Master/texmf-dist/tex/context/base/mkiv/file-lib.lua
index 361608ea3cf..361608ea3cf 100644
--- a/Master/texmf-dist/tex/context/base/file-lib.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/file-lib.lua
diff --git a/Master/texmf-dist/tex/context/base/file-lib.mkvi b/Master/texmf-dist/tex/context/base/mkiv/file-lib.mkvi
index 76137ce15b9..76137ce15b9 100644
--- a/Master/texmf-dist/tex/context/base/file-lib.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/file-lib.mkvi
diff --git a/Master/texmf-dist/tex/context/base/file-mod.lua b/Master/texmf-dist/tex/context/base/mkiv/file-mod.lua
index 7f3763c5ded..7f3763c5ded 100644
--- a/Master/texmf-dist/tex/context/base/file-mod.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/file-mod.lua
diff --git a/Master/texmf-dist/tex/context/base/file-mod.mkvi b/Master/texmf-dist/tex/context/base/mkiv/file-mod.mkvi
index f043a68e875..ebd741d42af 100644
--- a/Master/texmf-dist/tex/context/base/file-mod.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/file-mod.mkvi
@@ -20,16 +20,14 @@
%D \macros
%D {usemodule}
%D
-%D Most of \CONTEXT is preloaded in the format file. Some very
-%D domain specific typesetting topics are however dealt with in
-%D separate modules, e.g. typesetting of chemical structure
-%D formulas. These modules are loaded by:
+%D Most of \CONTEXT is preloaded in the format file. Some very domain specific
+%D typesetting topics are however dealt with in separate modules, e.g. typesetting
+%D of chemical structure formulas. These modules are loaded by:
%D
%D \showsetup{usemodule}
%D
-%D More information on the specific modules can be found in
-%D their dedicated manuals. We use \type {\next} so that we
-%D can \type {\end} in modules.
+%D More information on the specific modules can be found in their dedicated manuals.
+%D We use \type {\next} so that we can \type {\end} in modules.
\unexpanded\def\usemodules
{\dotripleempty\strc_modules_use}
@@ -64,7 +62,11 @@
\popmacro\currentmodule}
\def\strc_modules_use_indeed#category#name%
- {\clf_usemodules{#category}{#name}}
+ {\ifx\currentmoduleparameters\empty\else
+ \scratchtoks\expandafter{\currentmoduleparameters}%
+ \normalexpanded{\getparameters[\??module#name:][\the\scratchtoks]}%
+ \fi
+ \clf_usemodules{#category}{#name}}
\installcorenamespace{module}
@@ -91,15 +93,34 @@
\unexpanded\def\setupmodule
{\dodoubleempty\syst_modules_setup}
-\def\syst_modules_setup[#name][#parameters]%
+\def\syst_modules_setup
+ {\ifx\currentmoduleparameters\empty
+ \expandafter\syst_modules_setup_nop
+ \else
+ \expandafter\syst_modules_setup_yes
+ \fi}
+
+\def\syst_modules_setup_nop[#name][#parameters]%
+ {\ifsecondargument
+ \getparameters[\??module#name:][#parameters]% internal (defaults)
+ \else\iffirstargument
+ \doifassignmentelse{#name}{\getparameters[\??module\currentmodule:][#name]}\donothing
+ \fi\fi
+ \the\everysetupmodule}
+
+\def\syst_modules_setup_yes[#name][#parameters]%
{\scratchtoks\expandafter{\currentmoduleparameters}%
\ifsecondargument
\getparameters[\??module#name:][#parameters]% internal (defaults)
\normalexpanded{\getparameters[\??module#name:][\the\scratchtoks]}% loadtime (user)
+ \else\iffirstargument
+ \doifassignmentelse{#name}
+ {\getparameters[\??module\currentmodule:][#name]% internal (defaults)
+ \normalexpanded{\getparameters[\??module\currentmodule:][\the\scratchtoks]}}% loadtime (user)
+ {\normalexpanded{\getparameters[\??module#1:][\the\scratchtoks]}}% loadtime (user)
\else
- \getparameters[\??module\currentmodule:][#name]% internal (defaults)
- \normalexpanded{\getparameters[\??module\currentmodule:][\the\scratchtoks]}% loadtime (user)
- \fi
+ \normalexpanded{\getparameters[\??module\currentmodule:][\the\scratchtoks]}%
+ \fi\fi
\let\currentmoduleparameters\empty
\the\everysetupmodule}
@@ -116,9 +137,7 @@
% \let\currentmoduleparameters\empty}
\def\moduleparameter#name#parameter% should have been \namedmoduleparameter
- {\csname\??module
- \ifcsname\??module#name:#parameter\endcsname#name:#parameter\fi
- \endcsname}
+ {\begincsname\??module#name:#parameter\endcsname}
\letvalue\??module\empty % so we default to empty as with all parameters
diff --git a/Master/texmf-dist/tex/context/base/file-res.lua b/Master/texmf-dist/tex/context/base/mkiv/file-res.lua
index 08a3e22af8f..08a3e22af8f 100644
--- a/Master/texmf-dist/tex/context/base/file-res.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/file-res.lua
diff --git a/Master/texmf-dist/tex/context/base/file-res.mkvi b/Master/texmf-dist/tex/context/base/mkiv/file-res.mkvi
index 17f4cf44c5c..17f4cf44c5c 100644
--- a/Master/texmf-dist/tex/context/base/file-res.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/file-res.mkvi
diff --git a/Master/texmf-dist/tex/context/base/file-syn.lua b/Master/texmf-dist/tex/context/base/mkiv/file-syn.lua
index b6ad27c8325..b6ad27c8325 100644
--- a/Master/texmf-dist/tex/context/base/file-syn.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/file-syn.lua
diff --git a/Master/texmf-dist/tex/context/base/file-syn.mkvi b/Master/texmf-dist/tex/context/base/mkiv/file-syn.mkvi
index 52ecd0d71e3..52ecd0d71e3 100644
--- a/Master/texmf-dist/tex/context/base/file-syn.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/file-syn.mkvi
diff --git a/Master/texmf-dist/tex/context/base/font-afk.lua b/Master/texmf-dist/tex/context/base/mkiv/font-afk.lua
index 8b65b063184..8b65b063184 100644
--- a/Master/texmf-dist/tex/context/base/font-afk.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-afk.lua
diff --git a/Master/texmf-dist/tex/context/base/font-afm.lua b/Master/texmf-dist/tex/context/base/mkiv/font-afm.lua
index a96c6686e30..3dedf12e1da 100644
--- a/Master/texmf-dist/tex/context/base/font-afm.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-afm.lua
@@ -28,9 +28,11 @@ don't have this issue.</p>
local fonts, logs, trackers, containers, resolvers = fonts, logs, trackers, containers, resolvers
local next, type, tonumber = next, type, tonumber
-local format, match, gmatch, lower, gsub, strip = string.format, string.match, string.gmatch, string.lower, string.gsub, string.strip
-local abs = math.abs
-local P, S, C, R, lpegmatch, patterns = lpeg.P, lpeg.S, lpeg.C, lpeg.R, lpeg.match, lpeg.patterns
+local match, gmatch, lower, gsub, strip, find = string.match, string.gmatch, string.lower, string.gsub, string.strip, string.find
+local char, byte, sub = string.char, string.byte, string.sub
+local abs, mod = math.abs, math.mod
+local bxor, rshift = bit32.bxor, bit32.rshift
+local P, S, R, Cmt, C, Ct, Cs, lpegmatch, patterns = lpeg.P, lpeg.S, lpeg.R, lpeg.Cmt, lpeg.C, lpeg.Ct, lpeg.Cs, lpeg.match, lpeg.patterns
local derivetable = table.derive
local trace_features = false trackers.register("afm.features", function(v) trace_features = v end)
@@ -48,11 +50,6 @@ local definers = fonts.definers
local readers = fonts.readers
local constructors = fonts.constructors
-local fontloader = fontloader
-local font_to_table = fontloader.to_table
-local open_font = fontloader.open
-local close_font = fontloader.close
-
local afm = constructors.newhandler("afm")
local pfb = constructors.newhandler("pfb")
@@ -152,14 +149,14 @@ end
local keys = { }
-function keys.FontName (data,line) data.metadata.fontname = strip (line) -- get rid of spaces
- data.metadata.fullname = strip (line) end
-function keys.ItalicAngle (data,line) data.metadata.italicangle = tonumber (line) end
-function keys.IsFixedPitch(data,line) data.metadata.isfixedpitch = toboolean(line,true) end
-function keys.CharWidth (data,line) data.metadata.charwidth = tonumber (line) end
-function keys.XHeight (data,line) data.metadata.xheight = tonumber (line) end
-function keys.Descender (data,line) data.metadata.descender = tonumber (line) end
-function keys.Ascender (data,line) data.metadata.ascender = tonumber (line) end
+function keys.FontName (data,line) data.metadata.fontname = strip (line) -- get rid of spaces
+ data.metadata.fullname = strip (line) end
+function keys.ItalicAngle (data,line) data.metadata.italicangle = tonumber (line) end
+function keys.IsFixedPitch(data,line) data.metadata.monospaced = toboolean(line,true) end
+function keys.CharWidth (data,line) data.metadata.charwidth = tonumber (line) end
+function keys.XHeight (data,line) data.metadata.xheight = tonumber (line) end
+function keys.Descender (data,line) data.metadata.descender = tonumber (line) end
+function keys.Ascender (data,line) data.metadata.ascender = tonumber (line) end
function keys.Comment (data,line)
-- Comment DesignSize 12 (pts)
-- Comment TFM designsize: 12 (in points)
@@ -171,7 +168,7 @@ end
local function get_charmetrics(data,charmetrics,vector)
local characters = data.characters
local chr, ind = { }, 0
- for k,v in gmatch(charmetrics,"([%a]+) +(.-) *;") do
+ for k, v in gmatch(charmetrics,"([%a]+) +(.-) *;") do
if k == 'C' then
v = tonumber(v)
if v < 0 then
@@ -225,41 +222,193 @@ local function get_variables(data,fontmetrics)
end
end
-local function get_indexes(data,pfbname)
- data.resources.filename = resolvers.unresolve(pfbname) -- no shortcut
- local pfbblob = open_font(pfbname)
- if pfbblob then
- local characters = data.characters
- local pfbdata = font_to_table(pfbblob)
- if pfbdata then
- local glyphs = pfbdata.glyphs
- if glyphs then
- if trace_loading then
- report_afm("getting index data from %a",pfbname)
- end
- for index, glyph in next, glyphs do
- -- for index, glyph in table.sortedhash(glyphs) do
- local name = glyph.name
- if name then
- local char = characters[name]
- if char then
- if trace_indexing then
- report_afm("glyph %a has index %a",name,index)
+local get_indexes
+
+do
+
+ -- old font loader
+
+ local fontloader = fontloader
+
+ if fontloader then
+
+ local font_to_table = fontloader.to_table
+ local open_font = fontloader.open
+ local close_font = fontloader.close
+
+ local function get_indexes_old(data,pfbname)
+ local pfbblob = open_font(pfbname)
+ if pfbblob then
+ local characters = data.characters
+ local pfbdata = font_to_table(pfbblob)
+ if pfbdata then
+ local glyphs = pfbdata.glyphs
+ if glyphs then
+ if trace_loading then
+ report_afm("getting index data from %a",pfbname)
+ end
+ for index, glyph in next, glyphs do
+ local name = glyph.name
+ if name then
+ local char = characters[name]
+ if char then
+ if trace_indexing then
+ report_afm("glyph %a has index %a",name,index)
+ end
+ char.index = index
+ end
end
- char.index = index
end
+ elseif trace_loading then
+ report_afm("no glyph data in pfb file %a",pfbname)
end
+ elseif trace_loading then
+ report_afm("no data in pfb file %a",pfbname)
end
+ close_font(pfbblob)
elseif trace_loading then
- report_afm("no glyph data in pfb file %a",pfbname)
+ report_afm("invalid pfb file %a",pfbname)
end
- elseif trace_loading then
- report_afm("no data in pfb file %a",pfbname)
end
- close_font(pfbblob)
- elseif trace_loading then
- report_afm("invalid pfb file %a",pfbname)
+
end
+
+ -- new (unfinished) font loader but i see no differences between
+ -- old and new (one bad vector with old)
+
+ local n, m
+
+ local progress = function(str,position,name,size)
+ local forward = position + tonumber(size) + 3 + 2
+ n = n + 1
+ if n >= m then
+ return #str, name
+ elseif forward < #str then
+ return forward, name
+ else
+ return #str, name
+ end
+ end
+
+ local initialize = function(str,position,size)
+ n = 0
+ m = tonumber(size)
+ return position + 1
+ end
+
+ local charstrings = P("/CharStrings")
+ local name = P("/") * C((R("az")+R("AZ")+R("09")+S("-_."))^1)
+ local size = C(R("09")^1)
+ local spaces = P(" ")^1
+
+ local p_filternames = Ct (
+ (1-charstrings)^0 * charstrings * spaces * Cmt(size,initialize)
+ * (Cmt(name * P(" ")^1 * C(R("09")^1), progress) + P(1))^1
+ )
+
+ -- if one of first 4 not 0-9A-F then binary else hex
+
+ local decrypt
+
+ do
+
+ local r, c1, c2, n = 0, 0, 0, 0
+
+ local function step(c)
+ local cipher = byte(c)
+ local plain = bxor(cipher,rshift(r,8))
+ r = mod((cipher + r) * c1 + c2,65536)
+ return char(plain)
+ end
+
+ decrypt = function(binary)
+ r, c1, c2, n = 55665, 52845, 22719, 4
+ binary = gsub(binary,".",step)
+ return sub(binary,n+1)
+ end
+
+ -- local pattern = Cs((P(1) / step)^1)
+ --
+ -- decrypt = function(binary)
+ -- r, c1, c2, n = 55665, 52845, 22719, 4
+ -- binary = lpegmatch(pattern,binary)
+ -- return sub(binary,n+1)
+ -- end
+
+ end
+
+ local function loadpfbvector(filename)
+ -- for the moment limited to encoding only
+
+ local data = io.loaddata(resolvers.findfile(filename))
+
+ if not find(data,"!PS%-AdobeFont%-") then
+ print("no font",filename)
+ return
+ end
+
+ if not data then
+ print("no data",filename)
+ return
+ end
+
+ local ascii, binary = match(data,"(.*)eexec%s+......(.*)")
+
+ if not binary then
+ print("no binary",filename)
+ return
+ end
+
+ binary = decrypt(binary,4)
+
+ local vector = lpegmatch(p_filternames,binary)
+
+ vector[0] = table.remove(vector,1)
+
+ if not vector then
+ print("no vector",filename)
+ return
+ end
+
+ return vector
+
+ end
+
+ get_indexes = function(data,pfbname)
+ local vector = loadpfbvector(pfbname)
+ if vector then
+ local characters = data.characters
+ if trace_loading then
+ report_afm("getting index data from %a",pfbname)
+ end
+ for index=1,#vector do
+ local name = vector[index]
+ local char = characters[name]
+ if char then
+ if trace_indexing then
+ report_afm("glyph %a has index %a",name,index)
+ end
+ char.index = index
+ end
+ end
+ end
+ end
+
+ if fontloader then
+
+ afm.use_new_indexer = true
+ get_indexes_new = get_indexes
+
+ get_indexes = function(data,pfbname)
+ if afm.use_new_indexer then
+ return get_indexes_new(data,pfbname)
+ else
+ return get_indexes_old(data,pfbname)
+ end
+ end
+
+ end
+
end
local function readafm(filename)
@@ -351,8 +500,9 @@ function afm.load(filename)
data = readafm(filename)
if data then
if pfbname ~= "" then
+ data.resources.filename = resolvers.unresolve(pfbname)
get_indexes(data,pfbname)
- elseif trace_loading then
+ elseif trace_loading then
report_afm("no pfb file for %a",filename)
-- data.resources.filename = "unset" -- better than loading the afm file
end
@@ -640,7 +790,7 @@ local function copytotfm(data)
local spacer = "space"
local spaceunits = 500
--
- local monospaced = metadata.isfixedpitch
+ local monospaced = metadata.monospaced
local charwidth = metadata.charwidth
local italicangle = metadata.italicangle
local charxheight = metadata.xheight and metadata.xheight > 0 and metadata.xheight
diff --git a/Master/texmf-dist/tex/context/base/font-age.lua b/Master/texmf-dist/tex/context/base/mkiv/font-age.lua
index bb6883a7470..bb6883a7470 100644
--- a/Master/texmf-dist/tex/context/base/font-age.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-age.lua
diff --git a/Master/texmf-dist/tex/context/base/font-agl.lua b/Master/texmf-dist/tex/context/base/mkiv/font-agl.lua
index 122d1adc2d1..dd349052335 100644
--- a/Master/texmf-dist/tex/context/base/font-agl.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-agl.lua
@@ -6,14 +6,15 @@ if not modules then modules = { } end modules ['font-agl'] = {
original = "Adobe Glyph List, version 2.0, September 20, 2002",
}
-local allocate = utilities.storage.allocate
+local allocate = utilities.storage.allocate
-local names = allocate {
- -- filled from char-def.lua
-}
-local unicodes = allocate {
- -- filled from char-def.lua
-}
+fonts = fonts or { }
+local encodings = fonts.encodings or { }
+fonts.encodings = encodings
+local agl = fonts.encodings.agl or { }
+fonts.encodings.agl = agl
+
+table.setmetatableindex(agl,nil) -- prevent recursive lookups otherwise when autoloaded
local synonyms = {
Acyrillic = 0x0410,
@@ -632,42 +633,60 @@ local extras = allocate { -- private extensions
twodotenleader = 0x2025,
}
-for u, c in next, characters.data do
- local a = c.adobename
- if a then
- unicodes[a] = u
- names [u] = a
+-- We load this table only when needed. We could use a loading mechanism
+-- return the table but there are no more vectors like this so why bother.
+--
+-- Well, we currently have this table preloaded anyway.
+
+local names = agl.names
+local unicodes = agl.unicodes
+local ctxcodes = agl.ctxcodes
+
+if not names then
+
+ names = allocate { } -- filled from char-def.lua
+ unicodes = allocate { }
+ ctxcodes = allocate { }
+
+ for u, c in next, characters.data do
+ local a = c.adobename
+ if a then
+ unicodes[a] = u
+ names [u] = a
+ end
+ local n = c.contextname
+ if n then
+ ctxcodes[n] = u
+ -- names [u] = a
+ end
end
-end
-for a, u in next, extras do
- unicodes[a] = u
- if not names[u] then
- names[u] = a
+ for a, u in next, extras do
+ unicodes[a] = u
+ if not names[u] then
+ names[u] = a
+ end
end
-end
-for s, u in next, synonyms do
- unicodes[s] = u
- if not names[u] then
- names[u] = s
+ for s, u in next, synonyms do
+ unicodes[s] = u
+ if not names[u] then
+ names[u] = s
+ end
end
-end
--- We load this table only when needed. We could use a loading mechanism
--- return the table but there are no more vectors like this so why bother.
---
--- Well, we currently hav ethis table preloaded anyway.
+ if storage then
+ storage.register("encodings/names", names, "fonts.encodings.names")
+ storage.register("encodings/unicodes", unicodes, "fonts.encodings.unicodes")
+ storage.register("encodings/ctxcodes", ctxcodes, "fonts.encodings.ctxcodes")
+ end
-local agl = {
- names = names, -- unicode -> name
- unicodes = unicodes, -- name -> unicode
- synonyms = synonyms, -- merged into the other two
- extras = extras, -- merged into the other two
-}
+end
-fonts = fonts or { }
-fonts.encodings = fonts.encodings or { }
-fonts.encodings.agl = agl
+agl.names = names -- unicode -> name
+agl.unicodes = unicodes -- name -> unicode
+agl.ctxcodes = ctxcodes -- name -> unicode
+agl.synonyms = synonyms -- merged into the other two
+agl.extras = extras -- merged into the other two
return agl
diff --git a/Master/texmf-dist/tex/context/base/font-aux.lua b/Master/texmf-dist/tex/context/base/mkiv/font-aux.lua
index 2a605d224c9..fc6c90bc177 100644
--- a/Master/texmf-dist/tex/context/base/font-aux.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-aux.lua
@@ -11,6 +11,11 @@ local tonumber, type = tonumber, type
local fonts, font = fonts, font
+local fonts = fonts
+local handlers = fonts.handlers
+local otf = handlers.otf -- brrr
+local afm = handlers.afm -- brrr
+
local iterators = { }
fonts.iterators = iterators
@@ -163,3 +168,74 @@ function iterators.glyphs(data)
return dummy
end
end
+
+-- for the moment here, it might move to some other file later
+
+function afm.getkern(tfmdata,left,right)
+ local c = tfmdata.characters[left]
+ if c then
+ local kerns = c.kerns
+ if kerns then
+ return kerns[right] -- already scaled
+ end
+ end
+ return 0
+end
+
+local getters = { -- maybe better getters[format][...]
+ kern = {
+ ["type1"] = afm.getkern,
+ ["opentype"] = otf.getkern,
+ },
+ substitution = {
+ ["opentype"] = otf.getsubstitution,
+ },
+ alternate = {
+ ["opentype"] = otf.getalternate,
+ },
+ multiple = {
+ ["opentype"] = otf.getmultiple,
+ }
+}
+
+fonts.getters = getters
+
+function fonts.getkern(tfmdata,left,right)
+ local format = tfmdata.properties.format
+ local getter = getters.kern[format]
+ if getter then
+ return getter(tfmdata,left,right)
+ else
+ return 0
+ end
+end
+
+function fonts.getsubstitution(tfmdata,k,kind)
+ local format = tfmdata.properties.format
+ local getter = getters.substitution[format]
+ if getter then
+ return getter(tfmdata,k,kind,value)
+ else
+ return 0
+ end
+end
+
+function fonts.getalternate(tfmdata,k,kind,value)
+ local format = tfmdata.properties.format
+ local getter = getters.substitution[format]
+ if getter then
+ return getter(tfmdata,k,kind,value)
+ else
+ return 0
+ end
+end
+
+function fonts.getmultiple(tfmdata,k,kind)
+ local format = tfmdata.properties.format
+ local getter = getters.substitution[format]
+ if getter then
+ return getter(tfmdata,k,kind,value)
+ else
+ return 0
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/font-aux.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-aux.mkvi
index bd655e41c60..bd655e41c60 100644
--- a/Master/texmf-dist/tex/context/base/font-aux.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-aux.mkvi
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-cff.lua b/Master/texmf-dist/tex/context/base/mkiv/font-cff.lua
new file mode 100644
index 00000000000..8c57b473ef8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-cff.lua
@@ -0,0 +1,1698 @@
+if not modules then modules = { } end modules ['font-cff'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- todo: option.outlines
+-- todo: option.boundingbox
+-- per charstring (less memory)
+
+-- This is a heavy one as it is a rather packed format. We don't need al the information
+-- now but we might need it later (who know what magic we can do with metapost). So at
+-- some point this might become a module. We just follow Adobe Technical Notes #5176 and
+-- #5177. In case of doubt I looked in the fontforge code that comes with LuaTeX.
+
+-- For now we save the segments in a list of segments with the operator last in an entry
+-- because that reflects the original. But it might make more sense to use a single array
+-- per segment. For pdf a simple concat works ok, but for other purposes a operator first
+-- flush is nicer.
+
+local next, type, tonumber = next, type, tonumber
+local byte = string.byte
+local concat, remove = table.concat, table.remove
+local floor, abs, round, ceil = math.floor, math.abs, math.round, math.ceil
+local P, C, R, S, C, Cs, Ct = lpeg.P, lpeg.C, lpeg.R, lpeg.S, lpeg.C, lpeg.Cs, lpeg.Ct
+local lpegmatch = lpeg.match
+
+local readers = fonts.handlers.otf.readers
+local streamreader = readers.streamreader
+
+local readbytes = streamreader.readbytes
+local readstring = streamreader.readstring
+local readbyte = streamreader.readcardinal1 -- 8-bit unsigned integer
+local readushort = streamreader.readcardinal2 -- 16-bit unsigned integer
+local readuint = streamreader.readcardinal3 -- 24-bit unsigned integer
+local readulong = streamreader.readcardinal4 -- 24-bit unsigned integer
+local setposition = streamreader.setposition
+local getposition = streamreader.getposition
+
+local setmetatableindex = table.setmetatableindex
+
+local trace_charstrings = false trackers.register("fonts.cff.charstrings",function(v) trace_charstrings = v end)
+local report = logs.reporter("otf reader","cff")
+
+local parsedictionaries
+local parsecharstring
+local parsecharstrings
+local resetcharstrings
+local parseprivates
+
+local defaultstrings = { [0] = -- taken from ff
+ ".notdef", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent",
+ "ampersand", "quoteright", "parenleft", "parenright", "asterisk", "plus",
+ "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four",
+ "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less",
+ "equal", "greater", "question", "at", "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", "bracketleft", "backslash", "bracketright", "asciicircum",
+ "underscore", "quoteleft", "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", "braceleft", "bar", "braceright", "asciitilde", "exclamdown", "cent",
+ "sterling", "fraction", "yen", "florin", "section", "currency",
+ "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft",
+ "guilsinglright", "fi", "fl", "endash", "dagger", "daggerdbl",
+ "periodcentered", "paragraph", "bullet", "quotesinglbase", "quotedblbase",
+ "quotedblright", "guillemotright", "ellipsis", "perthousand", "questiondown",
+ "grave", "acute", "circumflex", "tilde", "macron", "breve", "dotaccent",
+ "dieresis", "ring", "cedilla", "hungarumlaut", "ogonek", "caron", "emdash",
+ "AE", "ordfeminine", "Lslash", "Oslash", "OE", "ordmasculine", "ae",
+ "dotlessi", "lslash", "oslash", "oe", "germandbls", "onesuperior",
+ "logicalnot", "mu", "trademark", "Eth", "onehalf", "plusminus", "Thorn",
+ "onequarter", "divide", "brokenbar", "degree", "thorn", "threequarters",
+ "twosuperior", "registered", "minus", "eth", "multiply", "threesuperior",
+ "copyright", "Aacute", "Acircumflex", "Adieresis", "Agrave", "Aring",
+ "Atilde", "Ccedilla", "Eacute", "Ecircumflex", "Edieresis", "Egrave",
+ "Iacute", "Icircumflex", "Idieresis", "Igrave", "Ntilde", "Oacute",
+ "Ocircumflex", "Odieresis", "Ograve", "Otilde", "Scaron", "Uacute",
+ "Ucircumflex", "Udieresis", "Ugrave", "Yacute", "Ydieresis", "Zcaron",
+ "aacute", "acircumflex", "adieresis", "agrave", "aring", "atilde",
+ "ccedilla", "eacute", "ecircumflex", "edieresis", "egrave", "iacute",
+ "icircumflex", "idieresis", "igrave", "ntilde", "oacute", "ocircumflex",
+ "odieresis", "ograve", "otilde", "scaron", "uacute", "ucircumflex",
+ "udieresis", "ugrave", "yacute", "ydieresis", "zcaron", "exclamsmall",
+ "Hungarumlautsmall", "dollaroldstyle", "dollarsuperior", "ampersandsmall",
+ "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader",
+ "onedotenleader", "zerooldstyle", "oneoldstyle", "twooldstyle",
+ "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle",
+ "sevenoldstyle", "eightoldstyle", "nineoldstyle", "commasuperior",
+ "threequartersemdash", "periodsuperior", "questionsmall", "asuperior",
+ "bsuperior", "centsuperior", "dsuperior", "esuperior", "isuperior",
+ "lsuperior", "msuperior", "nsuperior", "osuperior", "rsuperior", "ssuperior",
+ "tsuperior", "ff", "ffi", "ffl", "parenleftinferior", "parenrightinferior",
+ "Circumflexsmall", "hyphensuperior", "Gravesmall", "Asmall", "Bsmall",
+ "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall",
+ "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall",
+ "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall",
+ "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah",
+ "Tildesmall", "exclamdownsmall", "centoldstyle", "Lslashsmall",
+ "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall",
+ "Dotaccentsmall", "Macronsmall", "figuredash", "hypheninferior",
+ "Ogoneksmall", "Ringsmall", "Cedillasmall", "questiondownsmall", "oneeighth",
+ "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds",
+ "zerosuperior", "foursuperior", "fivesuperior", "sixsuperior",
+ "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior",
+ "oneinferior", "twoinferior", "threeinferior", "fourinferior",
+ "fiveinferior", "sixinferior", "seveninferior", "eightinferior",
+ "nineinferior", "centinferior", "dollarinferior", "periodinferior",
+ "commainferior", "Agravesmall", "Aacutesmall", "Acircumflexsmall",
+ "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall",
+ "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall",
+ "Igravesmall", "Iacutesmall", "Icircumflexsmall", "Idieresissmall",
+ "Ethsmall", "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall",
+ "Otildesmall", "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall",
+ "Uacutesmall", "Ucircumflexsmall", "Udieresissmall", "Yacutesmall",
+ "Thornsmall", "Ydieresissmall", "001.000", "001.001", "001.002", "001.003",
+ "Black", "Bold", "Book", "Light", "Medium", "Regular", "Roman", "Semibold",
+}
+
+local cffreaders = {
+ readbyte,
+ readushort,
+ readuint,
+ readulong,
+}
+
+-- The header contains information about its own size.
+
+local function readheader(f)
+ local offset = getposition(f)
+ local header = {
+ offset = offset,
+ major = readbyte(f),
+ minor = readbyte(f),
+ size = readbyte(f), -- headersize
+ osize = readbyte(f), -- for offsets to start
+ }
+ setposition(f,offset+header.size)
+ return header
+end
+
+-- The indexes all look the same, so we share a loader. We could pass a handler
+-- and run over the array but why bother, we only have a few uses.
+
+local function readlengths(f)
+ local count = readushort(f)
+ if count == 0 then
+ return { }
+ end
+ local osize = readbyte(f)
+ local read = cffreaders[osize]
+ if not read then
+ report("bad offset size: %i",osize)
+ return { }
+ end
+ local lengths = { }
+ local previous = read(f)
+ for i=1,count do
+ local offset = read(f)
+ lengths[i] = offset - previous
+ previous = offset
+ end
+ return lengths
+end
+
+-- There can be subfonts so names is an array. However, in our case it's always
+-- one font. The same is true for the top dictionaries. Watch how we only load
+-- the dictionary string as for interpretation we need to have the strings loaded
+-- as well.
+
+local function readfontnames(f)
+ local names = readlengths(f)
+ for i=1,#names do
+ names[i] = readstring(f,names[i])
+ end
+ return names
+end
+
+local function readtopdictionaries(f)
+ local dictionaries = readlengths(f)
+ for i=1,#dictionaries do
+ dictionaries[i] = readstring(f,dictionaries[i])
+ end
+ return dictionaries
+end
+
+-- Strings are added to a list of standard strings so we start the font specific
+-- one with an offset. Strings are shared so we have one table.
+
+local function readstrings(f)
+ local lengths = readlengths(f)
+ local strings = setmetatableindex({ }, defaultstrings)
+ local index = #defaultstrings
+ for i=1,#lengths do
+ index = index + 1
+ strings[index] = readstring(f,lengths[i])
+ end
+ return strings
+end
+
+-- Parsing the dictionaries is delayed till we have the strings loaded. The parser
+-- is stack based so the operands come before the operator (like in postscript).
+
+-- local function delta(t)
+-- local n = #t
+-- if n > 1 then
+-- local p = t[1]
+-- for i=2,n do
+-- local c = t[i]
+-- t[i] = c + p
+-- p = c
+-- end
+-- end
+-- end
+
+do
+
+ -- We use a closure so that we don't need to pass too much around.
+
+ local stack = { }
+ local top = 0
+ local result = { }
+ local strings = { }
+
+ local p_single =
+ P("\00") / function()
+ result.version = strings[stack[top]] or "unset"
+ top = 0
+ end
+ + P("\01") / function()
+ result.notice = strings[stack[top]] or "unset"
+ top = 0
+ end
+ + P("\02") / function()
+ result.fullname = strings[stack[top]] or "unset"
+ top = 0
+ end
+ + P("\03") / function()
+ result.familyname = strings[stack[top]] or "unset"
+ top = 0
+ end
+ + P("\04") / function()
+ result.weight = strings[stack[top]] or "unset"
+ top = 0
+ end
+ + P("\05") / function()
+ result.fontbbox = { unpack(stack,1,4) }
+ top = 0
+ end
+ -- + P("\06") / function() end -- bluevalues
+ -- + P("\07") / function() end -- otherblues
+ -- + P("\08") / function() end -- familyblues
+ -- + P("\09") / function() end -- familyotherblues
+ -- + P("\10") / function() end -- strhw
+ -- + P("\11") / function() end -- stdvw
+ + P("\13") / function()
+ result.uniqueid = stack[top]
+ top = 0
+ end
+ + P("\14") / function()
+ result.xuid = concat(stack,"",1,top)
+ top = 0
+ end
+ + P("\15") / function()
+ result.charset = stack[top]
+ top = 0
+ end
+ + P("\16") / function()
+ result.encoding = stack[top]
+ top = 0
+ end
+ + P("\17") / function()
+ result.charstrings = stack[top]
+ top = 0
+ end
+ + P("\18") / function()
+ result.private = {
+ size = stack[top-1],
+ offset = stack[top],
+ }
+ top = 0
+ end
+ + P("\19") / function()
+ result.subroutines = stack[top]
+ end
+ + P("\20") / function()
+ result.defaultwidthx = stack[top]
+ end
+ + P("\21") / function()
+ result.nominalwidthx = stack[top]
+ end
+ -- + P("\22") / function() end -- reserved
+ -- + P("\23") / function() end -- reserved
+ -- + P("\24") / function() end -- reserved
+ -- + P("\25") / function() end -- reserved
+ -- + P("\26") / function() end -- reserved
+ -- + P("\27") / function() end -- reserved
+
+ local p_double = P("\12") * (
+ P("\00") / function()
+ result.copyright = stack[top]
+ top = 0
+ end
+ + P("\01") / function()
+ result.monospaced = stack[top] == 1 and true or false -- isfixedpitch
+ top = 0
+ end
+ + P("\02") / function()
+ result.italicangle = stack[top]
+ top = 0
+ end
+ + P("\03") / function()
+ result.underlineposition = stack[top]
+ top = 0
+ end
+ + P("\04") / function()
+ result.underlinethickness = stack[top]
+ top = 0
+ end
+ + P("\05") / function()
+ result.painttype = stack[top]
+ top = 0
+ end
+ + P("\06") / function()
+ result.charstringtype = stack[top]
+ top = 0
+ end
+ + P("\07") / function()
+ result.fontmatrix = { unpack(stack,1,6) }
+ top = 0
+ end
+ + P("\08") / function()
+ result.strokewidth = stack[top]
+ top = 0
+ end
+ + P("\20") / function()
+ result.syntheticbase = stack[top]
+ top = 0
+ end
+ + P("\21") / function()
+ result.postscript = strings[stack[top]] or "unset"
+ top = 0
+ end
+ + P("\22") / function()
+ result.basefontname = strings[stack[top]] or "unset"
+ top = 0
+ end
+ + P("\21") / function()
+ result.basefontblend = stack[top]
+ top = 0
+ end
+ + P("\30") / function()
+ result.cid.registry = strings[stack[top-2]] or "unset"
+ result.cid.ordering = strings[stack[top-1]] or "unset"
+ result.cid.supplement = stack[top]
+ top = 0
+ end
+ + P("\31") / function()
+ result.cid.fontversion = stack[top]
+ top = 0
+ end
+ + P("\32") / function()
+ result.cid.fontrevision= stack[top]
+ top = 0
+ end
+ + P("\33") / function()
+ result.cid.fonttype = stack[top]
+ top = 0
+ end
+ + P("\34") / function()
+ result.cid.count = stack[top]
+ top = 0
+ end
+ + P("\35") / function()
+ result.cid.uidbase = stack[top]
+ top = 0
+ end
+ + P("\36") / function()
+ result.cid.fdarray = stack[top]
+ top = 0
+ end
+ + P("\37") / function()
+ result.cid.fdselect = stack[top]
+ top = 0
+ end
+ + P("\38") / function()
+ result.cid.fontname = strings[stack[top]] or "unset"
+ top = 0
+ end
+ )
+
+ -- Some lpeg fun ... a first variant split the byte and made a new string but
+ -- the second variant is much faster. Not that it matters much as we don't see
+ -- such numbers often.
+
+ local p_last = P("\x0F") / "0" + P("\x1F") / "1" + P("\x2F") / "2" + P("\x3F") / "3"
+ + P("\x4F") / "4" + P("\x5F") / "5" + P("\x6F") / "6" + P("\x7F") / "7"
+ + P("\x8F") / "8" + P("\x9F") / "9" + P("\xAF") / "" + P("\xBF") / ""
+ + P("\xCF") / "" + P("\xDF") / "" + P("\xEF") / "" + R("\xF0\xFF") / ""
+
+ -- local remap = { [0] =
+ -- "00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0.", "0E", "0E-", "0", "0-", "0",
+ -- "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "0.", "0E", "0E-", "0", "0-", "0",
+ -- "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "0.", "0E", "0E-", "0", "0-", "0",
+ -- "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "0.", "0E", "0E-", "0", "0-", "0",
+ -- "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "0.", "0E", "0E-", "0", "0-", "0",
+ -- "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "0.", "0E", "0E-", "0", "0-", "0",
+ -- "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "0.", "0E", "0E-", "0", "0-", "0",
+ -- "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "0.", "0E", "0E-", "0", "0-", "0",
+ -- "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "0.", "0E", "0E-", "0", "0-", "0",
+ -- "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "0.", "0E", "0E-", "0", "0-", "0",
+ -- ".0", ".1", ".2", ".3", ".4", ".5", ".6", ".7", ".8", ".9", "..", ".E", ".E-", ".", ".-", ".",
+ -- "E0", "E1", "E2", "E3", "E4", "E5", "E6", "E7", "E8", "E9", "E.", "EE", "EE-", "E", "E-", "E",
+ -- "E-0", "E-1", "E-2", "E-3", "E-4", "E-5", "E-6", "E-7", "E-8", "E-9", "E-.", "E-E", "E-E-", "E-", "E--", "E-",
+ -- "-0", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-.", "-E", "-E-", "-", "--", "-",
+ -- }
+
+ -- local p_nibbles = Cs(((1-p_last)/byte/remap)^0+p_last)
+
+ -- local p = P("\30") * p_nibbles / function(t)
+ -- print(tonumber(t))
+ -- end
+
+ local remap = {
+ ["\x00"] = "00", ["\x01"] = "01", ["\x02"] = "02", ["\x03"] = "03", ["\x04"] = "04", ["\x05"] = "05", ["\x06"] = "06", ["\x07"] = "07", ["\x08"] = "08", ["\x09"] = "09", ["\x0A"] = "0.", ["\x0B"] = "0E", ["\x0C"] = "0E-", ["\x0D"] = "0", ["\x0E"] = "0-", ["\x0F"] = "0",
+ ["\x10"] = "10", ["\x11"] = "11", ["\x12"] = "12", ["\x13"] = "13", ["\x14"] = "14", ["\x15"] = "15", ["\x16"] = "16", ["\x17"] = "17", ["\x18"] = "18", ["\x19"] = "19", ["\x1A"] = "0.", ["\x1B"] = "0E", ["\x1C"] = "0E-", ["\x1D"] = "0", ["\x1E"] = "0-", ["\x1F"] = "0",
+ ["\x20"] = "20", ["\x21"] = "21", ["\x22"] = "22", ["\x23"] = "23", ["\x24"] = "24", ["\x25"] = "25", ["\x26"] = "26", ["\x27"] = "27", ["\x28"] = "28", ["\x29"] = "29", ["\x2A"] = "0.", ["\x2B"] = "0E", ["\x2C"] = "0E-", ["\x2D"] = "0", ["\x2E"] = "0-", ["\x2F"] = "0",
+ ["\x30"] = "30", ["\x31"] = "31", ["\x32"] = "32", ["\x33"] = "33", ["\x34"] = "34", ["\x35"] = "35", ["\x36"] = "36", ["\x37"] = "37", ["\x38"] = "38", ["\x39"] = "39", ["\x3A"] = "0.", ["\x3B"] = "0E", ["\x3C"] = "0E-", ["\x3D"] = "0", ["\x3E"] = "0-", ["\x3F"] = "0",
+ ["\x40"] = "40", ["\x41"] = "41", ["\x42"] = "42", ["\x43"] = "43", ["\x44"] = "44", ["\x45"] = "45", ["\x46"] = "46", ["\x47"] = "47", ["\x48"] = "48", ["\x49"] = "49", ["\x4A"] = "0.", ["\x4B"] = "0E", ["\x4C"] = "0E-", ["\x4D"] = "0", ["\x4E"] = "0-", ["\x4F"] = "0",
+ ["\x50"] = "50", ["\x51"] = "51", ["\x52"] = "52", ["\x53"] = "53", ["\x54"] = "54", ["\x55"] = "55", ["\x56"] = "56", ["\x57"] = "57", ["\x58"] = "58", ["\x59"] = "59", ["\x5A"] = "0.", ["\x5B"] = "0E", ["\x5C"] = "0E-", ["\x5D"] = "0", ["\x5E"] = "0-", ["\x5F"] = "0",
+ ["\x60"] = "60", ["\x61"] = "61", ["\x62"] = "62", ["\x63"] = "63", ["\x64"] = "64", ["\x65"] = "65", ["\x66"] = "66", ["\x67"] = "67", ["\x68"] = "68", ["\x69"] = "69", ["\x6A"] = "0.", ["\x6B"] = "0E", ["\x6C"] = "0E-", ["\x6D"] = "0", ["\x6E"] = "0-", ["\x6F"] = "0",
+ ["\x70"] = "70", ["\x71"] = "71", ["\x72"] = "72", ["\x73"] = "73", ["\x74"] = "74", ["\x75"] = "75", ["\x76"] = "76", ["\x77"] = "77", ["\x78"] = "78", ["\x79"] = "79", ["\x7A"] = "0.", ["\x7B"] = "0E", ["\x7C"] = "0E-", ["\x7D"] = "0", ["\x7E"] = "0-", ["\x7F"] = "0",
+ ["\x80"] = "80", ["\x81"] = "81", ["\x82"] = "82", ["\x83"] = "83", ["\x84"] = "84", ["\x85"] = "85", ["\x86"] = "86", ["\x87"] = "87", ["\x88"] = "88", ["\x89"] = "89", ["\x8A"] = "0.", ["\x8B"] = "0E", ["\x8C"] = "0E-", ["\x8D"] = "0", ["\x8E"] = "0-", ["\x8F"] = "0",
+ ["\x90"] = "90", ["\x91"] = "91", ["\x92"] = "92", ["\x93"] = "93", ["\x94"] = "94", ["\x95"] = "95", ["\x96"] = "96", ["\x97"] = "97", ["\x98"] = "98", ["\x99"] = "99", ["\x9A"] = "0.", ["\x9B"] = "0E", ["\x9C"] = "0E-", ["\x9D"] = "0", ["\x9E"] = "0-", ["\x9F"] = "0",
+ ["\xA0"] = ".0", ["\xA1"] = ".1", ["\xA2"] = ".2", ["\xA3"] = ".3", ["\xA4"] = ".4", ["\xA5"] = ".5", ["\xA6"] = ".6", ["\xA7"] = ".7", ["\xA8"] = ".8", ["\xA9"] = ".9", ["\xAA"] = "..", ["\xAB"] = ".E", ["\xAC"] = ".E-", ["\xAD"] = ".", ["\xAE"] = ".-", ["\xAF"] = ".",
+ ["\xB0"] = "E0", ["\xB1"] = "E1", ["\xB2"] = "E2", ["\xB3"] = "E3", ["\xB4"] = "E4", ["\xB5"] = "E5", ["\xB6"] = "E6", ["\xB7"] = "E7", ["\xB8"] = "E8", ["\xB9"] = "E9", ["\xBA"] = "E.", ["\xBB"] = "EE", ["\xBC"] = "EE-", ["\xBD"] = "E", ["\xBE"] = "E-", ["\xBF"] = "E",
+ ["\xC0"] = "E-0", ["\xC1"] = "E-1", ["\xC2"] = "E-2", ["\xC3"] = "E-3", ["\xC4"] = "E-4", ["\xC5"] = "E-5", ["\xC6"] = "E-6", ["\xC7"] = "E-7", ["\xC8"] = "E-8", ["\xC9"] = "E-9", ["\xCA"] = "E-.", ["\xCB"] = "E-E", ["\xCC"] = "E-E-", ["\xCD"] = "E-", ["\xCE"] = "E--", ["\xCF"] = "E-",
+ ["\xD0"] = "-0", ["\xD1"] = "-1", ["\xD2"] = "-2", ["\xD3"] = "-3", ["\xD4"] = "-4", ["\xD5"] = "-5", ["\xD6"] = "-6", ["\xD7"] = "-7", ["\xD8"] = "-8", ["\xD9"] = "-9", ["\xDA"] = "-.", ["\xDB"] = "-E", ["\xDC"] = "-E-", ["\xDD"] = "-", ["\xDE"] = "--", ["\xDF"] = "-",
+ }
+
+ local p_nibbles = P("\30") * Cs(((1-p_last)/remap)^0+p_last) / function(n)
+ -- 0-9=digit a=. b=E c=E- d=reserved e=- f=finish
+ top = top + 1
+ stack[top] = tonumber(n) or 0
+ end
+
+ local p_byte = C(R("\32\246")) / function(b0)
+ -- -107 .. +107
+ top = top + 1
+ stack[top] = byte(b0) - 139
+ end
+
+ local p_positive = C(R("\247\250")) * C(1) / function(b0,b1)
+ -- +108 .. +1131
+ top = top + 1
+ stack[top] = (byte(b0)-247)*256 + byte(b1) + 108
+ end
+
+ local p_negative = C(R("\251\254")) * C(1) / function(b0,b1)
+ -- -1131 .. -108
+ top = top + 1
+ stack[top] = -(byte(b0)-251)*256 - byte(b1) - 108
+ end
+
+ local p_short = P("\28") * C(1) * C(1) / function(b1,b2)
+ -- -32768 .. +32767 : b1<<8 | b2
+ top = top + 1
+ local n = 0x100 * byte(b1) + byte(b2)
+ if n >= 0x8000 then
+ stack[top] = n - 0xFFFF - 1
+ else
+ stack[top] = n
+ end
+ end
+
+ local p_long = P("\29") * C(1) * C(1) * C(1) * C(1) / function(b1,b2,b3,b4)
+ -- -2^31 .. +2^31-1 : b1<<24 | b2<<16 | b3<<8 | b4
+ top = top + 1
+ local n = 0x1000000 * byte(b1) + 0x10000 * byte(b2) + 0x100 * byte(b3) + byte(b4)
+ if n >= 0x8000000 then
+ stack[top] = n - 0xFFFFFFFF - 1
+ else
+ stack[top] = n
+ end
+ end
+
+ local p_unsupported = P(1) / function(detail)
+ top = 0
+ end
+
+ local p_dictionary = (
+ p_byte
+ + p_positive
+ + p_negative
+ + p_short
+ + p_long
+ + p_nibbles
+ + p_single
+ + p_double
+ + p_unsupported
+ )^1
+
+ parsedictionaries = function(data,dictionaries)
+ stack = { }
+ strings = data.strings
+ for i=1,#dictionaries do
+ top = 0
+ result = {
+ monospaced = false,
+ italicangle = 0,
+ underlineposition = -100,
+ underlinethickness = 50,
+ painttype = 0,
+ charstringtype = 2,
+ fontmatrix = { 0.001, 0, 0, 0.001, 0, 0 },
+ fontbbox = { 0, 0, 0, 0 },
+ strokewidth = 0,
+ charset = 0,
+ encoding = 0,
+ cid = {
+ fontversion = 0,
+ fontrevision = 0,
+ fonttype = 0,
+ count = 8720,
+ }
+ }
+ lpegmatch(p_dictionary,dictionaries[i])
+ dictionaries[i] = result
+ end
+ --
+ result = { }
+ top = 0
+ stack = { }
+ end
+
+ parseprivates = function(data,dictionaries)
+ stack = { }
+ strings = data.strings
+ for i=1,#dictionaries do
+ local private = dictionaries[i].private
+ if private and private.data then
+ top = 0
+ result = {
+ forcebold = false,
+ languagegroup = 0,
+ expansionfactor = 0.06,
+ initialrandomseed = 0,
+ subroutines = 0,
+ defaultwidthx = 0,
+ nominalwidthx = 0,
+ cid = {
+ -- actually an error
+ },
+ }
+ lpegmatch(p_dictionary,private.data)
+ private.data = result
+ end
+ end
+ result = { }
+ top = 0
+ stack = { }
+ end
+
+ -- All bezier curves have 6 points with successive pairs relative to
+ -- the previous pair. Some can be left out and are then copied or zero
+ -- (optimization).
+ --
+ -- We are not really interested in all the details of a glyph because we
+ -- only need to calculate the boundingbox. So, todo: a quick no result but
+ -- calculate only variant.
+ --
+ -- The conversion is straightforward and the specification os clear once
+ -- you understand that the x and y needs to be updates each step. It's also
+ -- quite easy to test because in mp a shape will look bad when a few variables
+ -- are swapped. But still there might be bugs down here because not all
+ -- variants are seen in a font so far. We are less compact that the ff code
+ -- because there quite some variants are done in one helper with a lot of
+ -- testing for states.
+
+ local x = 0
+ local y = 0
+ local width = false
+ local r = 0
+ local stems = 0
+ local globalbias = 0
+ local localbias = 0
+ local globals = false
+ local locals = false
+ local depth = 1
+ local xmin = 0
+ local xmax = 0
+ local ymin = 0
+ local ymax = 0
+ local checked = false
+ local keepcurve = false
+
+ local function showstate(where)
+ report("%w%-10s : [%s] n=%i",depth*2,where,concat(stack," ",1,top),top)
+ end
+
+ local function showvalue(where,value,showstack)
+ if showstack then
+ report("%w%-10s : %s : [%s] n=%i",depth*2,where,tostring(value),concat(stack," ",1,top),top)
+ else
+ report("%w%-10s : %s",depth*2,where,tostring(value))
+ end
+ end
+
+ -- All these indirect calls make this run slower but it's cleaner this way
+ -- and we cache the result. As we moved the boundingbox code inline we gain
+ -- some back.
+
+ local function moveto(x,y)
+ if keepcurve then
+ r = r + 1
+ result[r] = { x, y, "m" }
+ end
+ if checked then
+ if x < xmin then xmin = x elseif x > xmax then xmax = x end
+ if y < ymin then ymin = y elseif y > ymax then ymax = y end
+ else
+ xmin = x
+ ymin = y
+ xmax = x
+ ymax = y
+ checked = true
+ end
+ end
+
+ local function lineto(x,y)
+ if keepcurve then
+ r = r + 1
+ result[r] = { x, y, "l" }
+ end
+ if checked then
+ if x < xmin then xmin = x elseif x > xmax then xmax = x end
+ if y < ymin then ymin = y elseif y > ymax then ymax = y end
+ else
+ xmin = x
+ ymin = y
+ xmax = x
+ ymax = y
+ checked = true
+ end
+ end
+
+ local function curveto(x1,y1,x2,y2,x3,y3)
+ if keepcurve then
+ r = r + 1
+ result[r] = { x1, y1, x2, y2, x3, y3, "c" }
+ end
+ if checked then
+ if x1 < xmin then xmin = x1 elseif x1 > xmax then xmax = x1 end
+ if y1 < ymin then ymin = y1 elseif y1 > ymax then ymax = y1 end
+ else
+ xmin = x1
+ ymin = y1
+ xmax = x1
+ ymax = y1
+ checked = true
+ end
+ if x2 < xmin then xmin = x2 elseif x2 > xmax then xmax = x2 end
+ if y2 < ymin then ymin = y2 elseif y2 > ymax then ymax = y2 end
+ if x3 < xmin then xmin = x3 elseif x3 > xmax then xmax = x3 end
+ if y3 < ymin then ymin = y3 elseif y3 > ymax then ymax = y3 end
+ end
+
+ local function rmoveto()
+ if top > 2 then
+ if not width then
+ width = stack[1]
+ if trace_charstrings then
+ showvalue("width",width)
+ end
+ end
+ elseif not width then
+ width = true
+ end
+ if trace_charstrings then
+ showstate("rmoveto")
+ end
+ x = x + stack[top-1] -- dx1
+ y = y + stack[top] -- dy1
+ top = 0
+ moveto(x,y)
+ end
+
+ local function hmoveto()
+ if top > 1 then
+ if not width then
+ width = stack[1]
+ if trace_charstrings then
+ showvalue("width",width)
+ end
+ end
+ elseif not width then
+ width = true
+ end
+ if trace_charstrings then
+ showstate("hmoveto")
+ end
+ x = x + stack[top] -- dx1
+ top = 0
+ moveto(x,y)
+ end
+
+ local function vmoveto()
+ if top > 1 then
+ if not width then
+ width = stack[1]
+ if trace_charstrings then
+ showvalue("width",width)
+ end
+ end
+ elseif not width then
+ width = true
+ end
+ if trace_charstrings then
+ showstate("vmoveto")
+ end
+ y = y + stack[top] -- dy1
+ top = 0
+ moveto(x,y)
+ end
+
+ local function rlineto()
+ if trace_charstrings then
+ showstate("rlineto")
+ end
+ for i=1,top,2 do
+ x = x + stack[i] -- dxa
+ y = y + stack[i+1] -- dya
+ lineto(x,y)
+ end
+ top = 0
+ end
+
+ local function xlineto(swap) -- x (y,x)+ | (x,y)+
+ for i=1,top do
+ if swap then
+ x = x + stack[i]
+ swap = false
+ else
+ y = y + stack[i]
+ swap = true
+ end
+ lineto(x,y)
+ end
+ top = 0
+ end
+
+ local function hlineto() -- x (y,x)+ | (x,y)+
+ if trace_charstrings then
+ showstate("hlineto")
+ end
+ xlineto(true)
+ end
+
+ local function vlineto() -- y (x,y)+ | (y,x)+
+ if trace_charstrings then
+ showstate("vlineto")
+ end
+ xlineto(false)
+ end
+
+ local function rrcurveto()
+ if trace_charstrings then
+ showstate("rrcurveto")
+ end
+ for i=1,top,6 do
+ local ax = x + stack[i] -- dxa
+ local ay = y + stack[i+1] -- dya
+ local bx = ax + stack[i+2] -- dxb
+ local by = ay + stack[i+3] -- dyb
+ x = bx + stack[i+4] -- dxc
+ y = by + stack[i+5] -- dyc
+ curveto(ax,ay,bx,by,x,y)
+ end
+ top = 0
+ end
+
+ local function hhcurveto()
+ if trace_charstrings then
+ showstate("hhcurveto")
+ end
+ local s = 1
+ if top % 2 ~= 0 then
+ y = y + stack[1] -- dy1
+ s = 2
+ end
+ for i=s,top,4 do
+ local ax = x + stack[i] -- dxa
+ local ay = y
+ local bx = ax + stack[i+1] -- dxb
+ local by = ay + stack[i+2] -- dyb
+ x = bx + stack[i+3] -- dxc
+ y = by
+ curveto(ax,ay,bx,by,x,y)
+ end
+ top = 0
+ end
+
+ local function vvcurveto()
+ if trace_charstrings then
+ showstate("vvcurveto")
+ end
+ local s = 1
+ local d = 0
+ if top % 2 ~= 0 then
+ d = stack[1] -- dx1
+ s = 2
+ end
+ for i=s,top,4 do
+ local ax = x + d
+ local ay = y + stack[i] -- dya
+ local bx = ax + stack[i+1] -- dxb
+ local by = ay + stack[i+2] -- dyb
+ x = bx
+ y = by + stack[i+3] -- dyc
+ curveto(ax,ay,bx,by,x,y)
+ d = 0
+ end
+ top = 0
+ end
+
+ local function xxcurveto(swap)
+ local last = top % 4 ~= 0 and stack[top]
+ if last then
+ top = top - 1
+ end
+ local sw = swap
+ for i=1,top,4 do
+ local ax, ay, bx, by
+ if swap then
+ ax = x + stack[i]
+ ay = y
+ bx = ax + stack[i+1]
+ by = ay + stack[i+2]
+ y = by + stack[i+3]
+ if last and i+3 == top then
+ x = bx + last
+ else
+ x = bx
+ end
+ swap = false
+ else
+ ax = x
+ ay = y + stack[i]
+ bx = ax + stack[i+1]
+ by = ay + stack[i+2]
+ x = bx + stack[i+3]
+ if last and i+3 == top then
+ y = by + last
+ else
+ y = by
+ end
+ swap = true
+ end
+ curveto(ax,ay,bx,by,x,y)
+ end
+ top = 0
+ end
+
+ local function hvcurveto()
+ if trace_charstrings then
+ showstate("hvcurveto")
+ end
+ xxcurveto(true)
+ end
+
+ local function vhcurveto()
+ if trace_charstrings then
+ showstate("vhcurveto")
+ end
+ xxcurveto(false)
+ end
+
+ local function rcurveline()
+ if trace_charstrings then
+ showstate("rcurveline")
+ end
+ for i=1,top-2,6 do
+ local ax = x + stack[i] -- dxa
+ local ay = y + stack[i+1] -- dya
+ local bx = ax + stack[i+2] -- dxb
+ local by = ay + stack[i+3] -- dyb
+ x = bx + stack[i+4] -- dxc
+ y = by + stack[i+5] -- dyc
+ curveto(ax,ay,bx,by,x,y)
+ end
+ x = x + stack[top-1] -- dxc
+ y = y + stack[top] -- dyc
+ lineto(x,y)
+ top = 0
+ end
+
+ local function rlinecurve()
+ if trace_charstrings then
+ showstate("rlinecurve")
+ end
+ if top > 6 then
+ for i=1,top-6,2 do
+ x = x + stack[i]
+ y = y + stack[i+1]
+ lineto(x,y)
+ end
+ end
+ local ax = x + stack[top-5]
+ local ay = y + stack[top-4]
+ local bx = ax + stack[top-3]
+ local by = ay + stack[top-2]
+ x = bx + stack[top-1]
+ y = by + stack[top]
+ curveto(ax,ay,bx,by,x,y)
+ top = 0
+ end
+
+ -- flex is not yet tested! no loop
+
+ local function flex() -- fd not used
+ if trace_charstrings then
+ showstate("flex")
+ end
+ local ax = x + stack[1] -- dx1
+ local ay = y + stack[2] -- dy1
+ local bx = ax + stack[3] -- dx2
+ local by = ay + stack[4] -- dy2
+ local cx = bx + stack[5] -- dx3
+ local cy = by + stack[6] -- dy3
+ curveto(ax,ay,bx,by,cx,cy)
+ local dx = cx + stack[7] -- dx4
+ local dy = cy + stack[8] -- dy4
+ local ex = dx + stack[9] -- dx5
+ local ey = dy + stack[10] -- dy5
+ x = ex + stack[11] -- dx6
+ y = ey + stack[12] -- dy6
+ curveto(dx,dy,ex,ey,x,y)
+ top = 0
+ end
+
+ local function hflex()
+ if trace_charstrings then
+ showstate("hflex")
+ end
+ local ax = x + stack[1] -- dx1
+ local ay = y
+ local bx = ax + stack[2] -- dx2
+ local by = ay + stack[3] -- dy2
+ local cx = bx + stack[4] -- dx3
+ local cy = by
+ curveto(ax,ay,bx,by,cx,cy)
+ local dx = cx + stack[5] -- dx4
+ local dy = by
+ local ex = dx + stack[6] -- dx5
+ local ey = y
+ x = ex + stack[7] -- dx6
+ curveto(dx,dy,ex,ey,x,y)
+ top = 0
+ end
+
+ local function hflex1()
+ if trace_charstrings then
+ showstate("hflex1")
+ end
+ local ax = x + stack[1] -- dx1
+ local ay = y + stack[2] -- dy1
+ local bx = ax + stack[3] -- dx2
+ local by = ay + stack[4] -- dy2
+ local cx = bx + stack[5] -- dx3
+ local cy = by
+ curveto(ax,ay,bx,by,cx,cy)
+ local dx = cx + stack[6] -- dx4
+ local dy = by
+ local ex = dx + stack[7] -- dx5
+ local ey = dy + stack[8] -- dy5
+ x = ex + stack[9] -- dx6
+ curveto(dx,dy,ex,ey,x,y)
+ top = 0
+ end
+
+ local function flex1()
+ if trace_charstrings then
+ showstate("flex1")
+ end
+ local ax = x + stack[1] --dx1
+ local ay = y + stack[2] --dy1
+ local bx = ax + stack[3] --dx2
+ local by = ay + stack[4] --dy2
+ local cx = bx + stack[5] --dx3
+ local cy = by + stack[6] --dy3
+ curveto(ax,ay,bx,by,cx,cy)
+ local dx = cx + stack[7] --dx4
+ local dy = cy + stack[8] --dy4
+ local ex = dx + stack[9] --dx5
+ local ey = dy + stack[10] --dy5
+ if abs(ex - x) > abs(ey - y) then -- spec: abs(dx) > abs(dy)
+ x = ex + stack[11]
+ else
+ y = ey + stack[11]
+ end
+ curveto(dx,dy,ex,ey,x,y)
+ top = 0
+ end
+
+ local function getstem()
+ if top == 0 then
+ -- bad
+ elseif top % 2 ~= 0 then
+ if width then
+ remove(stack,1)
+ else
+ width = remove(stack,1)
+ if trace_charstrings then
+ showvalue("width",width)
+ end
+ end
+ top = top - 1
+ end
+ if trace_charstrings then
+ showstate("stem")
+ end
+ stems = stems + top/2
+ top = 0
+ end
+
+ local function getmask()
+ if top == 0 then
+ -- bad
+ elseif top % 2 ~= 0 then
+ if width then
+ remove(stack,1)
+ else
+ width = remove(stack,1)
+ if trace_charstrings then
+ showvalue("width",width)
+ end
+ end
+ top = top - 1
+ end
+ if trace_charstrings then
+ showstate(operator == 19 and "hintmark" or "cntrmask")
+ end
+ stems = stems + top/2
+ top = 0
+ if stems == 0 then
+ -- forget about it
+ elseif stems <= 8 then
+ return 1
+ else
+ return floor((stems+7)/8)
+ end
+ end
+
+ local function unsupported()
+ if trace_charstrings then
+ showstate("unsupported")
+ end
+ top = 0
+ end
+
+ -- Bah, we cannot use a fast lpeg because a hint has an unknown size and a
+ -- runtime capture cannot handle that well.
+
+ local actions = { [0] =
+ unsupported, -- 0
+ getstem, -- 1 -- hstem
+ unsupported, -- 2
+ getstem, -- 3 -- vstem
+ vmoveto, -- 4
+ rlineto, -- 5
+ hlineto, -- 6
+ vlineto, -- 7
+ rrcurveto, -- 8
+ unsupported, -- 9 -- closepath
+ unsupported, -- 10 -- calllocal,
+ unsupported, -- 11 -- callreturn,
+ unsupported, -- 12 -- elsewhere
+ unsupported, -- 13 -- hsbw
+ unsupported, -- 14 -- endchar,
+ unsupported, -- 15
+ unsupported, -- 16
+ unsupported, -- 17
+ getstem, -- 18 -- hstemhm
+ getmask, -- 19 -- hintmask
+ getmask, -- 20 -- cntrmask
+ rmoveto, -- 21
+ hmoveto, -- 22
+ getstem, -- 23 -- vstemhm
+ rcurveline, -- 24
+ rlinecurve, -- 25
+ vvcurveto, -- 26
+ hhcurveto, -- 27
+ unsupported, -- 28 -- elsewhere
+ unsupported, -- 29 -- elsewhere
+ vhcurveto, -- 30
+ hvcurveto, -- 31
+ }
+
+ local subactions = {
+ [034] = hflex,
+ [035] = flex,
+ [036] = hflex1,
+ [037] = flex1,
+ }
+
+ local p_bytes = Ct((P(1)/byte)^0)
+
+ local function call(scope,list,bias,process)
+ local index = stack[top] + bias
+ top = top - 1
+ if trace_charstrings then
+ showvalue(scope,index,true)
+ end
+ local str = list[index]
+ if str then
+ if type(str) == "string" then
+ str = lpegmatch(p_bytes,str)
+ list[index] = str
+ end
+ depth = depth + 1
+ process(str)
+ depth = depth - 1
+ else
+ report("unknown %s %i",scope,index)
+ end
+ end
+
+ local function process(tab)
+ local i = 1
+ local n = #tab
+ while i <= n do
+ local t = tab[i]
+ if t >= 32 and t<=246 then
+ -- -107 .. +107
+ top = top + 1
+ stack[top] = t - 139
+ i = i + 1
+ elseif t >= 247 and t <= 250 then
+ -- +108 .. +1131
+ top = top + 1
+ stack[top] = (t-247)*256 + tab[i+1] + 108
+ i = i + 2
+ elseif t >= 251 and t <= 254 then
+ -- -1131 .. -108
+ top = top + 1
+ stack[top] = -(t-251)*256 - tab[i+1] - 108
+ i = i + 2
+ elseif t == 28 then
+ -- -32768 .. +32767 : b1<<8 | b2
+ top = top + 1
+ local n = 0x100 * tab[i+1] + tab[i+2]
+ if n >= 0x8000 then
+ stack[top] = n - 0xFFFF - 1
+ else
+ stack[top] = n
+ end
+ i = i + 3
+ elseif t == 255 then
+ local n = 0x100 * tab[i+1] + tab[i+2]
+ top = top + 1
+ if n >= 0x8000 then
+ stack[top] = n - 0xFFFF - 1 + (0x100 * tab[i+3] + tab[i+4])/0xFFFF
+ else
+ stack[top] = n + (0x100 * tab[i+3] + tab[i+4])/0xFFFF
+ end
+ i = i + 5
+ elseif t == 11 then
+ if trace_charstrings then
+ showstate("return")
+ end
+ return
+ elseif t == 10 then
+ call("local",locals,localbias,process)
+ i = i + 1
+ elseif t == 14 then -- endchar
+ if width then
+ -- okay
+ elseif top > 0 then
+ width = stack[1]
+ if trace_charstrings then
+ showvalue("width",width)
+ end
+ else
+ width = true
+ end
+ if trace_charstrings then
+ showstate("endchar")
+ end
+ return
+ elseif t == 29 then
+ call("global",globals,globalbias,process)
+ i = i + 1
+ elseif t == 12 then
+ i = i + 1
+ local t = tab[i]
+ local a = subactions[t]
+ if a then
+ a()
+ else
+ if trace_charstrings then
+ showvalue("<subaction>",t)
+ end
+ top = 0
+ end
+ i = i + 1
+ else
+ local a = actions[t]
+ if a then
+ local s = a()
+ if s then
+ i = i + s
+ end
+ else
+ if trace_charstrings then
+ showvalue("<action>",t)
+ end
+ top = 0
+ end
+ i = i + 1
+ end
+ end
+ end
+
+ -- local function calculatebounds(segments,x,y)
+ -- local nofsegments = #segments
+ -- if nofsegments == 0 then
+ -- return { x, y, x, y }
+ -- else
+ -- local xmin = 10000
+ -- local xmax = -10000
+ -- local ymin = 10000
+ -- local ymax = -10000
+ -- if x < xmin then xmin = x end
+ -- if x > xmax then xmax = x end
+ -- if y < ymin then ymin = y end
+ -- if y > ymax then ymax = y end
+ -- -- we now have a reasonable start so we could
+ -- -- simplyfy the next checks
+ -- for i=1,nofsegments do
+ -- local s = segments[i]
+ -- local x = s[1]
+ -- local y = s[2]
+ -- if x < xmin then xmin = x end
+ -- if x > xmax then xmax = x end
+ -- if y < ymin then ymin = y end
+ -- if y > ymax then ymax = y end
+ -- if s[#s] == "c" then -- "curveto"
+ -- local x = s[3]
+ -- local y = s[4]
+ -- if x < xmin then xmin = x elseif x > xmax then xmax = x end
+ -- if y < ymin then ymin = y elseif y > ymax then ymax = y end
+ -- local x = s[5]
+ -- local y = s[6]
+ -- if x < xmin then xmin = x elseif x > xmax then xmax = x end
+ -- if y < ymin then ymin = y elseif y > ymax then ymax = y end
+ -- end
+ -- end
+ -- return { round(xmin), round(ymin), round(xmax), round(ymax) } -- doesn't make ceil more sense
+ -- end
+ -- end
+
+ parsecharstrings = function(data,glyphs,doshapes)
+ -- for all charstrings
+ local dictionary = data.dictionaries[1]
+ local charstrings = dictionary.charstrings
+ local charset = dictionary.charset
+ keepcurve = doshapes
+ stack = { }
+ glyphs = glyphs or { }
+ strings = data.strings
+ locals = dictionary.subroutines
+ globals = data.routines
+ globalbias = #globals
+ localbias = #locals
+ globalbias = ((globalbias < 1240 and 107) or (globalbias < 33900 and 1131) or 32768) + 1
+ localbias = ((localbias < 1240 and 107) or (localbias < 33900 and 1131) or 32768) + 1
+ local nominalwidth = dictionary.private.data.nominalwidthx or 0
+ local defaultwidth = dictionary.private.data.defaultwidthx or 0
+
+ for i=1,#charstrings do
+ local str = charstrings[i]
+ local tab = lpegmatch(p_bytes,str)
+ local index = i - 1
+ x = 0
+ y = 0
+ width = false
+ r = 0
+ top = 0
+ stems = 0
+ result = { }
+ --
+ xmin = 0
+ xmax = 0
+ ymin = 0
+ ymax = 0
+ checked = false
+ --
+ if trace_charstrings then
+ report("glyph: %i",index)
+ report("data: % t",tab)
+ end
+ --
+ process(tab)
+ --
+ local boundingbox = { round(xmin), round(ymin), round(xmax), round(ymax) }
+ --
+ if width == true or width == false then
+ width = defaultwidth
+ else
+ width = nominalwidth + width
+ end
+ --
+ -- trace_charstrings = index == 3078 -- todo: make tracker
+ local glyph = glyphs[index] -- can be autodefined in otr
+ if not glyph then
+ glyphs[index] = {
+ segments = doshapes ~= false and result or nil, -- optional
+ boundingbox = boundingbox,
+ width = width,
+ name = charset[index],
+ -- sidebearing = 0,
+ }
+ else
+ glyph.segments = doshapes ~= false and result or nil
+ glyph.boundingbox = boundingbox
+ if not glyph.width then
+ glyph.width = width
+ end
+ if charset and not glyph.name then
+ glyph.name = charset[index]
+ end
+ -- glyph.sidebearing = 0 -- todo
+ end
+ if trace_charstrings then
+ report("width: %s",tostring(width))
+ report("boundingbox: % t",boundingbox)
+ end
+ charstrings[i] = nil -- free memory
+ end
+ return glyphs
+ end
+
+ parsecharstring = function(data,dictionary,charstring,glyphs,index,doshapes)
+ local private = dictionary.private
+ keepcurve = doshapes
+ strings = data.strings -- or in dict?
+ locals = dictionary.subroutines or { }
+ globals = data.routines or { }
+ globalbias = #globals
+ localbias = #locals
+ globalbias = ((globalbias < 1240 and 107) or (globalbias < 33900 and 1131) or 32768) + 1
+ localbias = ((localbias < 1240 and 107) or (localbias < 33900 and 1131) or 32768) + 1
+ local nominalwidth = private and private.data.nominalwidthx or 0
+ local defaultwidth = private and private.data.defaultwidthx or 0
+ --
+ local tab = lpegmatch(p_bytes,charstring)
+ x = 0
+ y = 0
+ width = false
+ r = 0
+ top = 0
+ stems = 0
+ result = { }
+ --
+ xmin = 0
+ xmax = 0
+ ymin = 0
+ ymax = 0
+ checked = false
+ --
+ if trace_charstrings then
+ report("glyph: %i",index)
+ report("data: % t",tab)
+ end
+ --
+ process(tab)
+ --
+ local boundingbox = { xmin, ymin, xmax, ymax }
+ --
+ if width == true or width == false then
+ width = defaultwidth
+ else
+ width = nominalwidth + width
+ end
+ --
+index = index - 1
+ local glyph = glyphs[index] -- can be autodefined in otr
+ if not glyph then
+ glyphs[index] = {
+ segments = doshapes ~= false and result or nil, -- optional
+ boundingbox = boundingbox,
+ width = width,
+ name = charset[index],
+ -- sidebearing = 0,
+ }
+ else
+ glyph.segments = doshapes ~= false and result or nil
+ glyph.boundingbox = boundingbox
+ if not glyph.width then
+ glyph.width = width
+ end
+ if charset and not glyph.name then
+ glyph.name = charset[index]
+ end
+ -- glyph.sidebearing = 0 -- todo
+ end
+ --
+ if trace_charstrings then
+ report("width: %s",tostring(width))
+ report("boundingbox: % t",boundingbox)
+ end
+ --
+ return charstring
+ end
+
+ resetcharstrings = function()
+ result = { }
+ top = 0
+ stack = { }
+ end
+
+end
+
+local function readglobals(f,data)
+ local routines = readlengths(f)
+ for i=1,#routines do
+ routines[i] = readstring(f,routines[i])
+ end
+ data.routines = routines
+end
+
+local function readencodings(f,data)
+ data.encodings = { }
+end
+
+local function readcharsets(f,data,dictionary)
+ local header = data.header
+ local strings = data.strings
+ local nofglyphs = data.nofglyphs
+ local charsetoffset = dictionary.charset
+
+ if charsetoffset ~= 0 then
+ setposition(f,header.offset+charsetoffset)
+ local format = readbyte(f)
+ local charset = { [0] = ".notdef" }
+ dictionary.charset = charset
+ if format == 0 then
+ for i=1,nofglyphs do
+ charset[i] = strings[readushort(f)]
+ end
+ elseif format == 1 or format == 2 then
+ local readcount = format == 1 and readbyte or readushort
+ local i = 1
+ while i <= nofglyphs do
+ local sid = readushort(f)
+ local n = readcount(f)
+ for s=sid,sid+n do
+ charset[i] = strings[s]
+ i = i + 1
+ if i > nofglyphs then
+ break
+ end
+ end
+ end
+ else
+ report("cff parser: unsupported charset format %a",format)
+ end
+ end
+end
+
+local function readprivates(f,data)
+ local header = data.header
+ local dictionaries = data.dictionaries
+ local private = dictionaries[1].private
+ if private then
+ setposition(f,header.offset+private.offset)
+ private.data = readstring(f,private.size)
+ end
+end
+
+local function readlocals(f,data,dictionary)
+ local header = data.header
+ local private = dictionary.private
+ if private then
+ local subroutineoffset = private.data.subroutines
+ if subroutineoffset ~= 0 then
+ setposition(f,header.offset+private.offset+subroutineoffset)
+ local subroutines = readlengths(f)
+ for i=1,#subroutines do
+ subroutines[i] = readstring(f,subroutines[i])
+ end
+ dictionary.subroutines = subroutines
+ private.data.subroutines = nil
+ else
+ dictionary.subroutines = { }
+ end
+ else
+ dictionary.subroutines = { }
+ end
+end
+
+-- These charstrings are little programs and described in: Technical Note #5177. A truetype
+-- font has only one dictionary.
+
+local function readcharstrings(f,data)
+ local header = data.header
+ local dictionaries = data.dictionaries
+ local dictionary = dictionaries[1]
+ local type = dictionary.charstringtype
+ local offset = dictionary.charstrings
+ if type == 2 then
+ setposition(f,header.offset+offset)
+ -- could be a metatable .. delayed loading
+ local charstrings = readlengths(f)
+ local nofglyphs = #charstrings
+ for i=1,nofglyphs do
+ charstrings[i] = readstring(f,charstrings[i])
+ end
+ data.nofglyphs = nofglyphs
+ dictionary.charstrings = charstrings
+ else
+ report("unsupported charstr type %i",type)
+ data.nofglyphs = 0
+ dictionary.charstrings = { }
+ end
+end
+
+-- cid (maybe do this stepwise so less mem) -- share with above
+
+local function readcidprivates(f,data)
+ local header = data.header
+ local dictionaries = data.dictionaries[1].cid.dictionaries
+ for i=1,#dictionaries do
+ local dictionary = dictionaries[i]
+ local private = dictionary.private
+ if private then
+ setposition(f,header.offset+private.offset)
+ private.data = readstring(f,private.size)
+ end
+ end
+ parseprivates(data,dictionaries)
+end
+
+local function readnoselect(f,data,glyphs,doshapes)
+ local dictionaries = data.dictionaries
+ local dictionary = dictionaries[1]
+ readglobals(f,data)
+ readcharstrings(f,data)
+ readencodings(f,data)
+ readcharsets(f,data,dictionary)
+ readprivates(f,data)
+ parseprivates(data,data.dictionaries)
+ readlocals(f,data,dictionary)
+ parsecharstrings(data,glyphs,doshapes)
+ resetcharstrings()
+end
+
+local function readfdselect(f,data,glyphs,doshapes)
+ local header = data.header
+ local dictionaries = data.dictionaries
+ local dictionary = dictionaries[1]
+ local cid = dictionary.cid
+ local cidselect = cid and cid.fdselect
+ readglobals(f,data)
+ readcharstrings(f,data)
+ readencodings(f,data)
+ local charstrings = dictionary.charstrings
+ local fdindex = { }
+ local nofglyphs = data.nofglyphs
+ local maxindex = -1
+ setposition(f,header.offset+cidselect)
+ local format = readbyte(f)
+ if format == 1 then
+ for i=0,nofglyphs do -- notdef included (needs checking)
+ local index = readbyte(i)
+ fdindex[i] = index
+ if index > maxindex then
+ maxindex = index
+ end
+ end
+ elseif format == 3 then
+ local nofranges = readushort(f)
+ local first = readushort(f)
+ local index = readbyte(f)
+ while true do
+ local last = readushort(f)
+ if index > maxindex then
+ maxindex = index
+ end
+ for i=first,last do
+ fdindex[i] = index
+ end
+ if last >= nofglyphs then
+ break
+ else
+ first = last + 1
+ index = readbyte(f)
+ end
+ end
+ else
+ -- unsupported format
+ end
+ if maxindex >= 0 then
+ local cidarray = cid.fdarray
+ setposition(f,header.offset+cidarray)
+ local dictionaries = readlengths(f)
+ for i=1,#dictionaries do
+ dictionaries[i] = readstring(f,dictionaries[i])
+ end
+ parsedictionaries(data,dictionaries)
+ cid.dictionaries = dictionaries
+ readcidprivates(f,data)
+ for i=1,#dictionaries do
+ readlocals(f,data,dictionaries[i])
+ end
+ for i=1,#charstrings do
+ parsecharstring(data,dictionaries[fdindex[i]+1],charstrings[i],glyphs,i,doshapes)
+ end
+ resetcharstrings()
+ end
+end
+
+function readers.cff(f,fontdata,specification)
+-- if specification.glyphs then
+ if specification.details then
+ local datatable = fontdata.tables.cff
+ if datatable then
+ local offset = datatable.offset
+ local glyphs = fontdata.glyphs
+ if not f then
+ report("invalid filehandle")
+ return
+ end
+ if offset then
+ setposition(f,offset)
+ end
+ local header = readheader(f)
+ if header.major > 1 then
+ report("version mismatch")
+ return
+ end
+ local names = readfontnames(f)
+ local dictionaries = readtopdictionaries(f)
+ local strings = readstrings(f)
+ local data = {
+ header = header,
+ names = names,
+ dictionaries = dictionaries,
+ strings = strings,
+ nofglyphs = fontdata.nofglyphs,
+ }
+ --
+ parsedictionaries(data,data.dictionaries)
+ --
+ local d = dictionaries[1]
+ local c = d.cid
+ fontdata.cffinfo = {
+ familynamename = d.familyname,
+ fullname = d.fullname,
+ boundingbox = d.boundingbox,
+ weight = d.weight,
+ italicangle = d.italicangle,
+ underlineposition = d.underlineposition,
+ underlinethickness = d.underlinethickness,
+ monospaced = d.monospaced,
+ }
+ fontdata.cidinfo = c and {
+ registry = c.registry,
+ ordering = c.ordering,
+ supplement = c.supplement,
+ }
+ --
+ if not specification.glyphs then
+ -- we only want some metadata
+ else
+ local cid = d.cid
+ if cid and cid.fdselect then
+ readfdselect(f,data,glyphs,specification.shapes or false)
+ else
+ readnoselect(f,data,glyphs,specification.shapes or false)
+ end
+ end
+ --
+ -- cleanup (probably more can go)
+ --
+ -- for i=1,#dictionaries do
+ -- local d = dictionaries[i]
+ -- d.subroutines = nil
+ -- end
+ -- data.strings = nil
+ -- if data then
+ -- data.charstrings = nil
+ -- data.routines = nil
+ -- end
+ end
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/font-chk.lua b/Master/texmf-dist/tex/context/base/mkiv/font-chk.lua
index 41205ce5ed7..5b1ad992070 100644
--- a/Master/texmf-dist/tex/context/base/font-chk.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-chk.lua
@@ -56,7 +56,9 @@ local tonode = nuts.tonode
local getfont = nuts.getfont
local getchar = nuts.getchar
+
local setfield = nuts.setfield
+local setchar = nuts.setchar
local traverse_id = nuts.traverse_id
local remove_node = nuts.remove
@@ -287,7 +289,7 @@ function checkers.missing(head)
insert_node_after(head,node,tonut(char))
head = remove_node(head,node,true)
elseif kind == "char" then
- setfield(node,"char",char)
+ setchar(node,char)
else
-- error
end
diff --git a/Master/texmf-dist/tex/context/base/font-chk.mkiv b/Master/texmf-dist/tex/context/base/mkiv/font-chk.mkiv
index 4c8967532e8..4c8967532e8 100644
--- a/Master/texmf-dist/tex/context/base/font-chk.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-chk.mkiv
diff --git a/Master/texmf-dist/tex/context/base/font-cid.lua b/Master/texmf-dist/tex/context/base/mkiv/font-cid.lua
index 0eaacdfbd54..0eaacdfbd54 100644
--- a/Master/texmf-dist/tex/context/base/font-cid.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-cid.lua
diff --git a/Master/texmf-dist/tex/context/base/font-col.lua b/Master/texmf-dist/tex/context/base/mkiv/font-col.lua
index cbc1953f45f..cf1b60bb93e 100644
--- a/Master/texmf-dist/tex/context/base/font-col.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-col.lua
@@ -19,14 +19,19 @@ local fastcopy = table.fastcopy
local nuts = nodes.nuts
local tonut = nuts.tonut
+
local getfont = nuts.getfont
local getchar = nuts.getchar
+
local setfield = nuts.setfield
+local setchar = nuts.setchar
+
local traverse_id = nuts.traverse_id
+local traverse_char = nuts.traverse_char
local settings_to_hash = utilities.parsers.settings_to_hash
-local trace_collecting = false trackers.register("fonts.collecting", function(v) trace_collecting = v end)
+local trace_collecting = false trackers.register("fonts.collecting", function(v) trace_collecting = v end)
local report_fonts = logs.reporter("fonts","collections")
@@ -252,24 +257,34 @@ end
function collections.process(head) -- this way we keep feature processing
local done = false
- for n in traverse_id(glyph_code,tonut(head)) do
- local v = vectors[getfont(n)]
- if v then
- local id = v[getchar(n)]
- if id then
- if type(id) == "table" then
- local newid, newchar = id[1], id[2]
- if trace_collecting then
- report_fonts("remapping character %C in font %a to character %C in font %a",getchar(n),getfont(n),newchar,newid)
- end
- setfield(n,"font",newid)
- setfield(n,"char",newchar)
- else
- if trace_collecting then
- report_fonts("remapping font %a to %a for character %C",getfont(n),id,getchar(n))
- end
- setfield(n,"font",id)
+ -- for n in traverse_id(glyph_code,tonut(head)) do
+ for n in traverse_char(tonut(head)) do
+ local font = getfont(n)
+ local vector = vectors[font]
+ if vector then
+ local char = getchar(n)
+ local vect = vector[char]
+ if not vect then
+ -- keep it
+ elseif type(vect) == "table" then
+ local newfont = vect[1]
+ local newchar = vect[2]
+ if trace_collecting then
+ report_fonts("remapping character %C in font %a to character %C in font %a%s",
+ char,font,newchar,newfont,not chardata[newfont][newchar] and " (missing)" or ""
+ )
+ end
+ setfield(n,"font",newfont)
+ setchar(n,newchar)
+ done = true
+ else
+ if trace_collecting then
+ report_fonts("remapping font %a to %a for character %C%s",
+ font,vect,char,not chardata[vect][char] and " (missing)" or ""
+ )
end
+ setfield(n,"font",vect)
+ done = true
end
end
end
diff --git a/Master/texmf-dist/tex/context/base/font-col.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-col.mkvi
index bc8e8151ed1..bc8e8151ed1 100644
--- a/Master/texmf-dist/tex/context/base/font-col.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-col.mkvi
diff --git a/Master/texmf-dist/tex/context/base/font-con.lua b/Master/texmf-dist/tex/context/base/mkiv/font-con.lua
index 72fbb5c0dcc..b11853533b4 100644
--- a/Master/texmf-dist/tex/context/base/font-con.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-con.lua
@@ -63,8 +63,7 @@ constructors.keys = {
properties = {
encodingbytes = "number",
embedding = "number",
- cidinfo = {
- },
+ cidinfo = { },
format = "string",
fontname = "string",
fullname = "string",
@@ -170,8 +169,8 @@ constructors.setfactor()
function constructors.scaled(scaledpoints, designsize) -- handles designsize in sp as well
if scaledpoints < 0 then
+ local factor = constructors.factor
if designsize then
- local factor = constructors.factor
if designsize > factor then -- or just 1000 / when? mp?
return (- scaledpoints/1000) * designsize -- sp's
else
@@ -191,10 +190,9 @@ in the process; numbers are of course copies. Here 65536 equals 1pt. (Due to
excessive memory usage in CJK fonts, we no longer pass the boundingbox.)</p>
--ldx]]--
--- The scaler is only used for otf and afm and virtual fonts. If
--- a virtual font has italic correction make sure to set the
--- hasitalics flag. Some more flags will be added in
--- the future.
+-- The scaler is only used for otf and afm and virtual fonts. If a virtual font has italic
+-- correction make sure to set the hasitalics flag. Some more flags will be added in the
+-- future.
--[[ldx--
<p>The reason why the scaler was originally split, is that for a while we experimented
@@ -426,6 +424,7 @@ function constructors.scale(tfmdata,specification)
local vdelta = delta
--
target.designsize = parameters.designsize -- not really needed so it might become obsolete
+ target.units = units
target.units_per_em = units -- just a trigger for the backend
--
local direction = properties.direction or tfmdata.direction or 0 -- pointless, as we don't use omf fonts at all
@@ -562,26 +561,27 @@ function constructors.scale(tfmdata,specification)
target.mathparameters = nil -- nop
end
--
- local italickey = "italic"
- local useitalics = true -- something context
- --
- -- some context specific trickery (this will move to a plugin)
+ -- Here we support some context specific trickery (this might move to a plugin). During the
+ -- transition to opentype the engine had troubles with italics so we had some additional code
+ -- for fixing that. In node mode (text) we don't care much if italics gets passed because
+ -- the engine does nothign with them then.
--
if hasmath then
- -- the latest luatex can deal with it itself so we now disable this
- -- mechanism here
- --
- -- if properties.mathitalics then
- -- italickey = "italic_correction"
- -- if trace_defining then
- -- report_defining("math italics disabled for font %a, fullname %a, filename %a",name,fullname,filename)
- -- end
- -- end
- autoitalicamount = false -- new
- elseif properties.textitalics then
- italickey = "italic_correction"
- useitalics = false
- if properties.delaytextitalics then
+ local mathitalics = properties.mathitalics
+ if mathitalics == false then
+ if trace_defining then
+ report_defining("%s italics %s for font %a, fullname %a, filename %a","math",hasitalics and "ignored" or "disabled",name,fullname,filename)
+ end
+ hasitalics = false
+ autoitalicamount = false
+ end
+ else
+ local textitalics = properties.textitalics
+ if textitalics == false then
+ if trace_defining then
+ report_defining("%s italics %s for font %a, fullname %a, filename %a","text",hasitalics and "ignored" or "disabled",name,fullname,filename)
+ end
+ hasitalics = false
autoitalicamount = false
end
end
@@ -590,8 +590,7 @@ function constructors.scale(tfmdata,specification)
--
if trace_defining then
report_defining("defining tfm, name %a, fullname %a, filename %a, hscale %a, vscale %a, math %a, italics %a",
- name,fullname,filename,hdelta,vdelta,
- hasmath and "enabled" or "disabled",useitalics and "enabled" or "disabled")
+ name,fullname,filename,hdelta,vdelta,hasmath and "enabled" or "disabled",hasitalics and "enabled" or "disabled")
end
--
constructors.beforecopyingcharacters(target,tfmdata)
@@ -606,15 +605,15 @@ function constructors.scale(tfmdata,specification)
local c = changed[unicode]
if c then
description = descriptions[c] or descriptions[unicode] or character
- character = characters[c] or character
- index = description.index or c
+ character = characters[c] or character
+ index = description.index or c
else
description = descriptions[unicode] or character
- index = description.index or unicode
+ index = description.index or unicode
end
else
description = descriptions[unicode] or character
- index = description.index or unicode
+ index = description.index or unicode
end
local width = description.width
local height = description.height
@@ -682,6 +681,8 @@ function constructors.scale(tfmdata,specification)
if isunicode then
chr.unicode = isunicode
chr.tounicode = tounicode(isunicode)
+ -- in luatex > 0.85 we can do this:
+ -- chr.tounicode = isunicode
end
if hasquality then
-- we could move these calculations elsewhere (saves calculations)
@@ -699,24 +700,8 @@ function constructors.scale(tfmdata,specification)
end
end
--
- if autoitalicamount then
- local vi = description.italic
- if not vi then
- local vi = description.boundingbox[3] - description.width + autoitalicamount
- if vi > 0 then -- < 0 indicates no overshoot or a very small auto italic
- chr[italickey] = vi*hdelta
- end
- elseif vi ~= 0 then
- chr[italickey] = vi*hdelta
- end
- elseif hasitalics then
- local vi = description.italic
- if vi and vi ~= 0 then
- chr[italickey] = vi*hdelta
- end
- end
- -- to be tested
if hasmath then
+ --
-- todo, just operate on descriptions.math
local vn = character.next
if vn then
@@ -753,8 +738,13 @@ function constructors.scale(tfmdata,specification)
chr.horiz_variants = t
end
end
+ -- todo also check mathitalics (or that one can go away)
+ end
+ local vi = character.vert_italic
+ if vi and vi ~= 0 then
+ chr.vert_italic = vi*hdelta
end
- local va = character.top_accent
+ local va = character.accent
if va then
chr.top_accent = vdelta*va
end
@@ -777,6 +767,32 @@ function constructors.scale(tfmdata,specification)
chr.mathkern = kerns -- singular -> should be patched in luatex !
end
end
+ if hasitalics then
+ local vi = character.italic
+ if vi and vi ~= 0 then
+ chr.italic = vi*hdelta
+ end
+ end
+ elseif autoitalicamount then -- itlc feature
+ local vi = description.italic
+ if not vi then
+ local bb = description.boundingbox
+ if bb then
+ local vi = bb[3] - description.width + autoitalicamount
+ if vi > 0 then -- < 0 indicates no overshoot or a very small auto italic
+ chr.italic = vi*hdelta
+ end
+ else
+ -- report_defining("no boundingbox for character %C in font %a, fullname %a, filename %a",unicode,name,fullname,filename)
+ end
+ elseif vi ~= 0 then
+ chr.italic = vi*hdelta
+ end
+ elseif hasitalics then -- unlikely
+ local vi = character.italic
+ if vi and vi ~= 0 then
+ chr.italic = vi*hdelta
+ end
end
if haskerns then
local vk = character.kerns
@@ -843,6 +859,8 @@ function constructors.scale(tfmdata,specification)
targetcharacters[unicode] = chr
end
--
+ properties.setitalics = hasitalics -- for postprocessing
+ --
constructors.aftercopyingcharacters(target,tfmdata)
--
constructors.trytosharefont(target,tfmdata)
@@ -895,12 +913,21 @@ function constructors.finalize(tfmdata)
parameters.slantfactor = tfmdata.slant or 0
end
--
- if not parameters.designsize then
- parameters.designsize = tfmdata.designsize or (factors.pt * 10)
+ local designsize = parameters.designsize
+ if designsize then
+ parameters.minsize = tfmdata.minsize or designsize
+ parameters.maxsize = tfmdata.maxsize or designsize
+ else
+ designsize = factors.pt * 10
+ parameters.designsize = designsize
+ parameters.minsize = designsize
+ parameters.maxsize = designsize
end
+ parameters.minsize = tfmdata.minsize or parameters.designsize
+ parameters.maxsize = tfmdata.maxsize or parameters.designsize
--
if not parameters.units then
- parameters.units = tfmdata.units_per_em or 1000
+ parameters.units = tfmdata.units or tfmdata.units_per_em or 1000
end
--
if not tfmdata.descriptions then
@@ -976,6 +1003,7 @@ function constructors.finalize(tfmdata)
tfmdata.auto_protrude = nil
tfmdata.extend = nil
tfmdata.slant = nil
+ tfmdata.units = nil
tfmdata.units_per_em = nil
--
tfmdata.cache = nil
diff --git a/Master/texmf-dist/tex/context/base/font-ctx.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua
index 81db3165254..be233e5702d 100644
--- a/Master/texmf-dist/tex/context/base/font-ctx.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua
@@ -50,6 +50,8 @@ local implement = interfaces.implement
local fonts = fonts
local handlers = fonts.handlers
local otf = handlers.otf -- brrr
+local afm = handlers.afm -- brrr
+local tfm = handlers.tfm -- brrr
local names = fonts.names
local definers = fonts.definers
local specifiers = fonts.specifiers
@@ -59,6 +61,7 @@ local fontgoodies = fonts.goodies
local helpers = fonts.helpers
local hashes = fonts.hashes
local currentfont = font.current
+local definefont = font.define
local encodings = fonts.encodings
----- aglunicodes = encodings.agl.unicodes
@@ -74,6 +77,7 @@ local setattr = nuts.setattr
local getprop = nuts.getprop
local setprop = nuts.setprop
local getfont = nuts.getfont
+local setsubtype = nuts.setsubtype
local texgetattribute = tex.getattribute
local texsetattribute = tex.setattribute
@@ -297,17 +301,19 @@ local privatefeatures = {
}
local function checkedscript(tfmdata,resources,features)
- local latn = false
+ local latn = false
local script = false
- for g, list in next, resources.features do
- for f, scripts in next, list do
- if privatefeatures[f] then
- -- skip
- elseif scripts.dflt then
- script = "dflt"
- break
- elseif scripts.latn then
- latn = true
+ if resources.features then
+ for g, list in next, resources.features do
+ for f, scripts in next, list do
+ if privatefeatures[f] then
+ -- skip
+ elseif scripts.dflt then
+ script = "dflt"
+ break
+ elseif scripts.latn then
+ latn = true
+ end
end
end
end
@@ -735,13 +741,14 @@ local function registercontextfeature(mergedname,extraname,how)
for k, v in next, extra do
mergedfeatures[k] = v
end
- local number = #numbers + 1
+ local number = #numbers + 1 -- we somehow end up with steps of 2
mergedfeatures.number = number
numbers[number] = mergedname
merged[number] = how == "=" and 1 or 2 -- 1=replace, 2=combine
setups[mergedname] = mergedfeatures
return number -- contextnumber(mergedname)
else
+ report_features("unknown feature %a cannot be merged into %a using method %a",extraname,mergedname,how)
return 0
end
end
@@ -908,9 +915,9 @@ definers.registersplit('*',starred,"featureset")
-- sort of xetex mode, but without [] and / as we have file: and name: etc
local space = P(" ")
+local spaces = space^0
local separator = S(";,")
local equal = P("=")
-local spaces = space^0
local sometext = C((1-equal-space-separator)^1)
local truevalue = P("+") * spaces * sometext * Cc(true)
local falsevalue = P("-") * spaces * sometext * Cc(false)
@@ -927,8 +934,8 @@ definers.registersplit(":",colonized,"direct")
-- define (two steps)
-local space = P(" ")
-local spaces = space^0
+----- space = P(" ")
+----- spaces = space^0
local leftparent = (P"(")
local rightparent = (P")")
local value = C((leftparent * (1-rightparent)^0 * rightparent + (1-space))^1)
@@ -1189,7 +1196,7 @@ do -- else too many locals
-- characters[0x2008] = { width = characters[0x002E] and characters[0x002E].width or parameters.space } -- period
--
constructors.checkvirtualids(tfmdata) -- experiment, will become obsolete when slots can selfreference
- local id = font.define(tfmdata)
+ local id = definefont(tfmdata)
csnames[id] = specification.cs
tfmdata.properties.id = id
definers.register(tfmdata,id) -- to be sure, normally already done
@@ -1277,7 +1284,7 @@ do -- else too many locals
return tfmdata, fontdata[tfmdata]
else
constructors.checkvirtualids(tfmdata) -- experiment, will become obsolete when slots can selfreference
- local id = font.define(tfmdata)
+ local id = definefont(tfmdata)
tfmdata.properties.id = id
definers.register(tfmdata,id)
if cs then
@@ -1362,13 +1369,14 @@ function constructors.calculatescale(tfmdata,scaledpoints,relativeid,specificati
if special then
-- we also have available specification.textsize
local parameters = tfmdata.parameters
- local designsize = parameters.designsize
+ -- local designsize = parameters.designsize
if special == "ht" then
- local height = parameters.ascender * designsize / parameters.units
- scaledpoints = (scaledpoints/height) * designsize
+ local height = parameters.ascender / parameters.units
+ scaledpoints = scaledpoints / height
elseif special == "cp" then
- local height = (tfmdata.descriptions[utf.byte("X")].height or parameters.ascender) * designsize / parameters.units
- scaledpoints = (scaledpoints/height) * designsize
+ local glyph = tfmdata.descriptions[utfbyte("X")]
+ local height = (glyph and glyph.height or parameters.ascender) / parameters.units
+ scaledpoints = scaledpoints / height
end
end
end
@@ -1732,14 +1740,24 @@ end
luatex.registerstopactions(loggers.reportusedfeatures)
-statistics.register("fonts load time", function()
+-- maybe move this to font-log.lua:
+
+statistics.register("font engine", function()
local elapsed = statistics.elapsedseconds(fonts)
local nofshared = constructors.nofsharedfonts or 0
+ local nofloaded = constructors.noffontsloaded or 0
if nofshared > 0 then
- return format("%sfor %s fonts, %s shared in backend, %s common vectors, %s common hashes",
- elapsed,constructors.noffontsloaded,nofshared,constructors.nofsharedvectors,constructors.nofsharedhashes)
+ return format("otf %0.3f, afm %0.3f, tfm %0.3f, %s instances, %s shared in backend, %s common vectors, %s common hashes, load time %s",
+ otf.version,afm.version,tfm.version,nofloaded,
+ nofshared,constructors.nofsharedvectors,constructors.nofsharedhashes,
+ elapsed)
+ elseif nofloaded > 0 and elapsed then
+ return format("otf %0.3f, afm %0.3f, tfm %0.3f, %s instances, load time %s",
+ otf.version,afm.version,tfm.version,nofloaded,
+ elapsed)
else
- return elapsed
+ return format("otf %0.3f, afm %0.3f, tfm %0.3f",
+ otf.version,afm.version,tfm.version)
end
end)
@@ -1944,9 +1962,11 @@ dimenfactors.pct = nil
to scale virtual characters.</p>
--ldx]]--
+-- in versions > 0.82 0 is supported as equivalent of self
+
function constructors.checkvirtualids(tfmdata)
-- begin of experiment: we can use { "slot", 0, number } in virtual fonts
- local fonts = tfmdata.fonts
+ local fonts = tfmdata.fonts
local selfid = font.nextid()
if fonts and #fonts > 0 then
for i=1,#fonts do
@@ -2024,7 +2044,7 @@ do
implement {
name = "doifelsecurrentfonthasfeature",
- actions = { currentfonthasfeature, commands.doifelse },
+ actions = { constructors.currentfonthasfeature, commands.doifelse },
arguments = "string"
}
@@ -2190,32 +2210,79 @@ end
-- a fontkern plug:
-local copy_node = nuts.copy
-local kern = nuts.pool.register(nuts.pool.kern())
+do
-setattr(kern,attributes.private('fontkern'),1) -- we can have several, attributes are shared
+ local kerncodes = nodes.kerncodes
+ local copy_node = nuts.copy
+ local kern = nuts.pool.register(nuts.pool.kern())
-nodes.injections.installnewkern(function(k)
- local c = copy_node(kern)
- setfield(c,"kern",k)
- return c
-end)
+ setattr(kern,attributes.private('fontkern'),1)
+
+ nodes.injections.installnewkern(function(k)
+ local c = copy_node(kern)
+ setfield(c,"kern",k)
+ return c
+ end)
+
+ directives.register("fonts.injections.fontkern", function(v)
+ setsubtype(kern,v and kerncodes.fontkern or kerncodes.userkern)
+ end)
+
+end
+
+do
-directives.register("nodes.injections.fontkern", function(v) setfield(kern,"subtype",v and 0 or 1) end)
+ local report = logs.reporter("otf","variants")
+
+ local function replace(tfmdata,feature,value)
+ local characters = tfmdata.characters
+ local variants = tfmdata.resources.variants
+ if variants then
+ local t = { }
+ for k, v in sortedhash(variants) do
+ t[#t+1] = formatters["0x%X (%i)"](k,k)
+ end
+ value = tonumber(value) or 0xFE00 -- 917762
+ report("fontname : %s",tfmdata.properties.fontname)
+ report("available: % t",t)
+ local v = variants[value]
+ if v then
+ report("using : %X (%i)",value,value)
+ for k, v in next, v do
+ local c = characters[v]
+ if c then
+ characters[k] = c
+ end
+ end
+ else
+ report("unknown : %X (%i)",value,value)
+ end
+ end
+ end
+
+ registerotffeature {
+ name = 'variant',
+ description = 'unicode variant',
+ manipulators = {
+ base = replace,
+ node = replace,
+ }
+ }
+
+end
-- here (todo: closure)
-local trace_analyzing = false trackers.register("otf.analyzing", function(v) trace_analyzing = v end)
+-- make a closure (200 limit):
------ otffeatures = constructors.newfeatures("otf")
-local registerotffeature = otffeatures.register
+local trace_analyzing = false trackers.register("otf.analyzing", function(v) trace_analyzing = v end)
local analyzers = fonts.analyzers
local methods = analyzers.methods
local unsetvalue = attributes.unsetvalue
-local traverse_by_id = nuts.traverse_id
+local traverse_id = nuts.traverse_id
local a_color = attributes.private('color')
local a_colormodel = attributes.private('colormodel')
@@ -2244,7 +2311,7 @@ local function markstates(head)
if head then
head = tonut(head)
local model = getattr(head,a_colormodel) or 1
- for glyph in traverse_by_id(glyph_code,head) do
+ for glyph in traverse_id(glyph_code,head) do
local a = getprop(glyph,a_state)
if a then
local name = colornames[a]
@@ -2294,7 +2361,7 @@ registerotffeature { -- adapts
}
function methods.nocolor(head,font,attr)
- for n in traverse_by_id(glyph_code,head) do
+ for n in traverse_id(glyph_code,head) do
if not font or getfont(n) == font then
setattr(n,a_color,unsetvalue)
end
diff --git a/Master/texmf-dist/tex/context/base/font-def.lua b/Master/texmf-dist/tex/context/base/mkiv/font-def.lua
index fdded3c369c..add42ee3828 100644
--- a/Master/texmf-dist/tex/context/base/font-def.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-def.lua
@@ -183,10 +183,11 @@ end
function resolvers.name(specification)
local resolve = fonts.names.resolve
if resolve then
- local resolved, sub = resolve(specification.name,specification.sub,specification) -- we pass specification for overloaded versions
+ local resolved, sub, subindex = resolve(specification.name,specification.sub,specification) -- we pass specification for overloaded versions
if resolved then
specification.resolved = resolved
specification.sub = sub
+ specification.subindex = subindex
local suffix = lower(suffixonly(resolved))
if fonts.formats[suffix] then
specification.forced = suffix
@@ -204,10 +205,11 @@ end
function resolvers.spec(specification)
local resolvespec = fonts.names.resolvespec
if resolvespec then
- local resolved, sub = resolvespec(specification.name,specification.sub,specification) -- we pass specification for overloaded versions
+ local resolved, sub, subindex = resolvespec(specification.name,specification.sub,specification) -- we pass specification for overloaded versions
if resolved then
specification.resolved = resolved
specification.sub = sub
+ specification.subindex = subindex
specification.forced = lower(suffixonly(resolved))
specification.forcedname = resolved
specification.name = removesuffix(resolved)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-dsp.lua b/Master/texmf-dist/tex/context/base/mkiv/font-dsp.lua
new file mode 100644
index 00000000000..14e816d5e4d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-dsp.lua
@@ -0,0 +1,2200 @@
+if not modules then modules = { } end modules ['font-dsp'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- many 0,0 entry/exit
+
+-- This loader went through a few iterations. First I made a ff compatible one so
+-- that we could do some basic checking. Also some verbosity was added (named
+-- glyphs). Eventually all that was dropped for a context friendly format, simply
+-- because keeping the different table models in sync too to much time. I have the
+-- old file somewhere. A positive side effect is that we get an (upto) much smaller
+-- smaller tma/tmc file. In the end the loader will be not much slower than the
+-- c based ff one.
+
+-- Being binary encoded, an opentype is rather compact. When expanded into a Lua table
+-- quite some memory can be used. This is very noticeable in the ff loader, which for
+-- a good reason uses a verbose format. However, when we use that data we create a couple
+-- of hashes. In the Lua loader we create these hashes directly, which save quite some
+-- memory.
+--
+-- We convert a font file only once and then cache it. Before creating the cached instance
+-- packing takes place: common tables get shared. After (re)loading and unpacking we then
+-- get a rather efficient internal representation of the font. In the new loader there is a
+-- pitfall. Because we use some common coverage magic we put a bit more information in
+-- the mark and cursive coverage tables than strickly needed: a reference to the coverage
+-- itself. This permits a fast lookup of the second glyph involved. In the marks we
+-- expand the class indicator to a class hash, in the cursive we use a placeholder that gets
+-- a self reference. This means that we cannot pack these subtables unless we add a unique
+-- id per entry (the same one per coverage) and that makes the tables larger. Because only a
+-- few fonts benefit from this, I decided to not do this. Experiments demonstrated that it
+-- only gives a few percent gain (on for instance husayni we can go from 845K to 828K
+-- bytecode). Better stay conceptually clean than messy compact.
+
+-- When we can reduce all basic lookups to one step we might safe a bit in the processing
+-- so then only chains are multiple.
+
+-- I used to flatten kerns here but that has been moved elsewhere because it polutes the code
+-- here and can be done fast afterwards. One can even wonder if it makes sense to do it as we
+-- pack anyway. In a similar fashion the unique placeholders in anchors in marks have been
+-- removed because packing doesn't save much there anyway.
+
+-- Although we have a bit more efficient tables in the cached files, the internals are still
+-- pretty similar. And although we have a slightly more direct coverage access the processing
+-- of node lists is not noticeable faster for latin texts, but for arabic we gain some 10%
+-- (and could probably gain a bit more).
+
+local next, type = next, type
+local bittest = bit32.btest
+local rshift = bit32.rshift
+local concat = table.concat
+local lower = string.lower
+local sub = string.sub
+local strip = string.strip
+local tohash = table.tohash
+local reversed = table.reversed
+
+local setmetatableindex = table.setmetatableindex
+local formatters = string.formatters
+local sortedkeys = table.sortedkeys
+local sortedhash = table.sortedhash
+
+local report = logs.reporter("otf reader")
+
+local readers = fonts.handlers.otf.readers
+local streamreader = readers.streamreader
+
+local setposition = streamreader.setposition
+local skipbytes = streamreader.skip
+local skipshort = streamreader.skipshort
+local readushort = streamreader.readcardinal2 -- 16-bit unsigned integer
+local readulong = streamreader.readcardinal4 -- 24-bit unsigned integer
+local readshort = streamreader.readinteger2 -- 16-bit signed integer
+local readfword = readshort
+local readstring = streamreader.readstring
+local readtag = streamreader.readtag
+
+local gsubhandlers = { }
+local gposhandlers = { }
+
+local lookupidoffset = -1 -- will become 1 when we migrate (only -1 for comparign with old)
+
+local classes = {
+ "base",
+ "ligature",
+ "mark",
+ "component",
+}
+
+local gsubtypes = {
+ "single",
+ "multiple",
+ "alternate",
+ "ligature",
+ "context",
+ "chainedcontext",
+ "extension",
+ "reversechainedcontextsingle",
+}
+
+local gpostypes = {
+ "single",
+ "pair",
+ "cursive",
+ "marktobase",
+ "marktoligature",
+ "marktomark",
+ "context",
+ "chainedcontext",
+ "extension",
+}
+
+local chaindirections = {
+ context = 0,
+ chainedcontext = 1,
+ reversechainedcontextsingle = -1,
+}
+
+-- Traditionally we use these unique names (so that we can flatten the lookup list
+-- (we create subsets runtime) but I will adapt the old code to newer names.
+
+-- chainsub
+-- reversesub
+
+local lookupnames = {
+ gsub = {
+ single = "gsub_single",
+ multiple = "gsub_multiple",
+ alternate = "gsub_alternate",
+ ligature = "gsub_ligature",
+ context = "gsub_context",
+ chainedcontext = "gsub_contextchain",
+ reversechainedcontextsingle = "gsub_reversecontextchain", -- reversesub
+ },
+ gpos = {
+ single = "gpos_single",
+ pair = "gpos_pair",
+ cursive = "gpos_cursive",
+ marktobase = "gpos_mark2base",
+ marktoligature = "gpos_mark2ligature",
+ marktomark = "gpos_mark2mark",
+ context = "gpos_context",
+ chainedcontext = "gpos_contextchain",
+ }
+}
+
+-- keep this as reference:
+--
+-- local lookupbits = {
+-- [0x0001] = "righttoleft",
+-- [0x0002] = "ignorebaseglyphs",
+-- [0x0004] = "ignoreligatures",
+-- [0x0008] = "ignoremarks",
+-- [0x0010] = "usemarkfilteringset",
+-- [0x00E0] = "reserved",
+-- [0xFF00] = "markattachmenttype",
+-- }
+--
+-- local lookupstate = setmetatableindex(function(t,k)
+-- local v = { }
+-- for kk, vv in next, lookupbits do
+-- if bittest(k,kk) then
+-- v[vv] = true
+-- end
+-- end
+-- t[k] = v
+-- return v
+-- end)
+
+local lookupflags = setmetatableindex(function(t,k)
+ local v = {
+ bittest(k,0x0008) and true or false, -- ignoremarks
+ bittest(k,0x0004) and true or false, -- ignoreligatures
+ bittest(k,0x0002) and true or false, -- ignorebaseglyphs
+ bittest(k,0x0001) and true or false, -- r2l
+ }
+ t[k] = v
+ return v
+end)
+
+-- Beware: only use the simple variant if we don't set keys/values (otherwise too many entries). We
+-- could also have a variant that applies a function but there is no real benefit in this.
+
+local function readcoverage(f,offset,simple)
+ setposition(f,offset)
+ local coverageformat = readushort(f)
+ local coverage = { }
+ if coverageformat == 1 then
+ local nofcoverage = readushort(f)
+ if simple then
+ for i=1,nofcoverage do
+ coverage[i] = readushort(f)
+ end
+ else
+ for i=0,nofcoverage-1 do
+ coverage[readushort(f)] = i -- index in record
+ end
+ end
+ elseif coverageformat == 2 then
+ local nofranges = readushort(f)
+ local n = simple and 1 or 0 -- needs checking
+ for i=1,nofranges do
+ local firstindex = readushort(f)
+ local lastindex = readushort(f)
+ local coverindex = readushort(f)
+ if simple then
+ for i=firstindex,lastindex do
+ coverage[n] = i
+ n = n + 1
+ end
+ else
+ for i=firstindex,lastindex do
+ coverage[i] = n
+ n = n + 1
+ end
+ end
+ end
+ else
+ report("unknown coverage format %a ",coverageformat)
+ end
+ return coverage
+end
+
+local function readclassdef(f,offset)
+ setposition(f,offset)
+ local classdefformat = readushort(f)
+ local classdef = { }
+ if classdefformat == 1 then
+ local index = readushort(f)
+ local nofclassdef = readushort(f)
+ for i=1,nofclassdef do
+ classdef[index] = readushort(f) + 1
+ index = index + 1
+ end
+ elseif classdefformat == 2 then
+ local nofranges = readushort(f)
+ local n = 0
+ for i=1,nofranges do
+ local firstindex = readushort(f)
+ local lastindex = readushort(f)
+ local class = readushort(f) + 1
+ for i=firstindex,lastindex do
+ classdef[i] = class
+ end
+ end
+ else
+ report("unknown classdef format %a ",classdefformat)
+ end
+ return classdef
+end
+
+local function classtocoverage(defs)
+ if defs then
+ local list = { }
+ for index, class in next, defs do
+ local c = list[class]
+ if c then
+ c[#c+1] = index
+ else
+ list[class] = { index }
+ end
+ end
+ return list
+ end
+end
+
+-- extra readers
+
+local function readposition(f,format)
+ if format == 0 then
+ return nil
+ end
+ -- maybe fast test on 0x0001 + 0x0002 + 0x0004 + 0x0008 (profile first)
+ local x = bittest(format,0x0001) and readshort(f) or 0 -- placement
+ local y = bittest(format,0x0002) and readshort(f) or 0 -- placement
+ local h = bittest(format,0x0004) and readshort(f) or 0 -- advance
+ local v = bittest(format,0x0008) and readshort(f) or 0 -- advance
+ if x == 0 and y == 0 and h == 0 and v == 0 then
+ return nil
+ else
+ return { x, y, h, v }
+ end
+end
+
+local function readanchor(f,offset)
+ if not offset or offset == 0 then
+ return nil -- false
+ end
+ setposition(f,offset)
+ local format = readshort(f)
+ if format == 0 then
+ report("invalid anchor format %i @ position %i",format,offset)
+ return false
+ elseif format > 3 then
+ report("unsupported anchor format %i @ position %i",format,offset)
+ return false
+ end
+ return { readshort(f), readshort(f) }
+end
+
+-- common handlers: inlining can be faster but we cache anyway
+-- so we don't bother too much about speed here
+
+local function readfirst(f,offset)
+ if offset then
+ setposition(f,offset)
+ end
+ return { readushort(f) }
+end
+
+local function readarray(f,offset,first)
+ if offset then
+ setposition(f,offset)
+ end
+ local n = readushort(f)
+ if first then
+ local t = { first }
+ for i=2,n do
+ t[i] = readushort(f)
+ end
+ return t, n
+ elseif n > 0 then
+ local t = { }
+ for i=1,n do
+ t[i] = readushort(f)
+ end
+ return t, n
+ end
+end
+
+local function readcoveragearray(f,offset,t,simple)
+ if not t then
+ return nil
+ end
+ local n = #t
+ if n == 0 then
+ return nil
+ end
+ for i=1,n do
+ t[i] = readcoverage(f,offset+t[i],simple)
+ end
+ return t
+end
+
+local function covered(subset,all)
+ local used, u
+ for i=1,#subset do
+ local s = subset[i]
+ if all[s] then
+ if used then
+ u = u + 1
+ used[u] = s
+ else
+ u = 1
+ used = { s }
+ end
+ end
+ end
+ return used
+end
+
+-- We generalize the chained lookups so that we can do with only one handler
+-- when processing them.
+
+local function unchainedcontext(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs,what)
+ local tableoffset = lookupoffset + offset
+ setposition(f,tableoffset)
+ local subtype = readushort(f)
+ if subtype == 1 then
+ local coverage = readushort(f)
+ local subclasssets = readarray(f)
+ local rules = { }
+ if subclasssets then
+ coverage = readcoverage(f,tableoffset+coverage,true)
+ for i=1,#subclasssets do
+ local offset = subclasssets[i]
+ if offset > 0 then
+ local firstcoverage = coverage[i]
+ local rulesoffset = tableoffset + offset
+ local subclassrules = readarray(f,rulesoffset)
+ for rule=1,#subclassrules do
+ setposition(f,rulesoffset + subclassrules[rule])
+ local nofcurrent = readushort(f)
+ local noflookups = readushort(f)
+ local current = { { firstcoverage } }
+ for i=2,nofcurrent do
+ current[i] = { readushort(f) }
+ end
+ local lookups = { }
+ for i=1,noflookups do
+ lookups[readushort(f)+1] = readushort(f) + 1
+ end
+ rules[#rules+1] = {
+ current = current,
+ lookups = lookups
+ }
+ end
+ end
+ end
+ else
+ report("empty subclassset in %a subtype %i","unchainedcontext",subtype)
+ end
+ return {
+ format = "glyphs",
+ rules = rules,
+ }
+ elseif subtype == 2 then
+ -- We expand the classes as later on we do a pack over the whole table so then we get
+ -- back efficiency. This way we can also apply the coverage to the first current.
+ local coverage = readushort(f)
+ local currentclassdef = readushort(f)
+ local subclasssets = readarray(f)
+ local rules = { }
+ if subclasssets then
+ coverage = readcoverage(f,tableoffset + coverage)
+ currentclassdef = readclassdef(f,tableoffset + currentclassdef)
+ local currentclasses = classtocoverage(currentclassdef,fontdata.glyphs)
+ for class=1,#subclasssets do
+ local offset = subclasssets[class]
+ if offset > 0 then
+ local firstcoverage = currentclasses[class]
+ if firstcoverage then
+ firstcoverage = covered(firstcoverage,coverage) -- bonus
+ if firstcoverage then
+ local rulesoffset = tableoffset + offset
+ local subclassrules = readarray(f,rulesoffset)
+ for rule=1,#subclassrules do
+ setposition(f,rulesoffset + subclassrules[rule])
+ local nofcurrent = readushort(f)
+ local noflookups = readushort(f)
+ local current = { firstcoverage }
+ for i=2,nofcurrent do
+ current[i] = currentclasses[readushort(f) + 1]
+ end
+ local lookups = { }
+ for i=1,noflookups do
+ lookups[readushort(f)+1] = readushort(f) + 1
+ end
+ rules[#rules+1] = {
+ current = current,
+ lookups = lookups
+ }
+ end
+ else
+ report("no coverage")
+ end
+ else
+ report("no coverage class")
+ end
+ end
+ end
+ else
+ report("empty subclassset in %a subtype %i","unchainedcontext",subtype)
+ end
+ return {
+ format = "class",
+ rules = rules,
+ }
+ elseif subtype == 3 then
+ local current = readarray(f)
+ local noflookups = readushort(f)
+ local lookups = { }
+ for i=1,noflookups do
+ lookups[readushort(f)+1] = readushort(f) + 1
+ end
+ current = readcoveragearray(f,tableoffset,current,true)
+ return {
+ format = "coverage",
+ rules = {
+ {
+ current = current,
+ lookups = lookups,
+ }
+ }
+ }
+ else
+ report("unsupported subtype %a in %a %s",subtype,"unchainedcontext",what)
+ end
+end
+
+-- todo: optimize for n=1 ?
+
+-- class index needs checking, probably no need for +1
+
+local function chainedcontext(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs,what)
+ local tableoffset = lookupoffset + offset
+ setposition(f,tableoffset)
+ local subtype = readushort(f)
+ if subtype == 1 then
+ local coverage = readushort(f)
+ local subclasssets = readarray(f)
+ local rules = { }
+ if subclasssets then
+ coverage = readcoverage(f,tableoffset+coverage,true)
+ for i=1,#subclasssets do
+ local offset = subclasssets[i]
+ if offset > 0 then
+ local firstcoverage = coverage[i]
+ local rulesoffset = tableoffset + offset
+ local subclassrules = readarray(f,rulesoffset)
+ for rule=1,#subclassrules do
+ setposition(f,rulesoffset + subclassrules[rule])
+ local nofbefore = readushort(f)
+ local before
+ if nofbefore > 0 then
+ before = { }
+ for i=1,nofbefore do
+ before[i] = { readushort(f) }
+ end
+ end
+ local nofcurrent = readushort(f)
+ local current = { { firstcoverage } }
+ for i=2,nofcurrent do
+ current[i] = { readushort(f) }
+ end
+ local nofafter = readushort(f)
+ local after
+ if nofafter > 0 then
+ after = { }
+ for i=1,nofafter do
+ after[i] = { readushort(f) }
+ end
+ end
+ local noflookups = readushort(f)
+ local lookups = { }
+ for i=1,noflookups do
+ lookups[readushort(f)+1] = readushort(f) + 1
+ end
+ rules[#rules+1] = {
+ before = before,
+ current = current,
+ after = after,
+ lookups = lookups,
+ }
+ end
+ end
+ end
+ else
+ report("empty subclassset in %a subtype %i","chainedcontext",subtype)
+ end
+ return {
+ format = "glyphs",
+ rules = rules,
+ }
+ elseif subtype == 2 then
+ local coverage = readushort(f)
+ local beforeclassdef = readushort(f)
+ local currentclassdef = readushort(f)
+ local afterclassdef = readushort(f)
+ local subclasssets = readarray(f)
+ local rules = { }
+ if subclasssets then
+ local coverage = readcoverage(f,tableoffset + coverage)
+ local beforeclassdef = readclassdef(f,tableoffset + beforeclassdef)
+ local currentclassdef = readclassdef(f,tableoffset + currentclassdef)
+ local afterclassdef = readclassdef(f,tableoffset + afterclassdef)
+ local beforeclasses = classtocoverage(beforeclassdef,fontdata.glyphs)
+ local currentclasses = classtocoverage(currentclassdef,fontdata.glyphs)
+ local afterclasses = classtocoverage(afterclassdef,fontdata.glyphs)
+ for class=1,#subclasssets do
+ local offset = subclasssets[class]
+ if offset > 0 then
+ local firstcoverage = currentclasses[class]
+ if firstcoverage then
+ firstcoverage = covered(firstcoverage,coverage) -- bonus
+ if firstcoverage then
+ local rulesoffset = tableoffset + offset
+ local subclassrules = readarray(f,rulesoffset)
+ for rule=1,#subclassrules do
+ -- watch out, in context we first get the counts and then the arrays while
+ -- here we get them mixed
+ setposition(f,rulesoffset + subclassrules[rule])
+ local nofbefore = readushort(f)
+ local before
+ if nofbefore > 0 then
+ before = { }
+ for i=1,nofbefore do
+ before[i] = beforeclasses[readushort(f) + 1]
+ end
+ end
+ local nofcurrent = readushort(f)
+ local current = { firstcoverage }
+ for i=2,nofcurrent do
+ current[i] = currentclasses[readushort(f)+ 1]
+ end
+ local nofafter = readushort(f)
+ local after
+ if nofafter > 0 then
+ after = { }
+ for i=1,nofafter do
+ after[i] = afterclasses[readushort(f) + 1]
+ end
+ end
+ -- no sequence index here (so why in context as it saves nothing)
+ local noflookups = readushort(f)
+ local lookups = { }
+ for i=1,noflookups do
+ lookups[readushort(f)+1] = readushort(f) + 1
+ end
+ rules[#rules+1] = {
+ before = before,
+ current = current,
+ after = after,
+ lookups = lookups,
+ }
+ end
+ else
+ report("no coverage")
+ end
+ else
+ report("class is not covered")
+ end
+ end
+ end
+ else
+ report("empty subclassset in %a subtype %i","chainedcontext",subtype)
+ end
+ return {
+ format = "class",
+ rules = rules,
+ }
+ elseif subtype == 3 then
+ local before = readarray(f)
+ local current = readarray(f)
+ local after = readarray(f)
+ local noflookups = readushort(f)
+ local lookups = { }
+ for i=1,noflookups do
+ lookups[readushort(f)+1] = readushort(f) + 1
+ end
+ before = readcoveragearray(f,tableoffset,before,true)
+ current = readcoveragearray(f,tableoffset,current,true)
+ after = readcoveragearray(f,tableoffset,after,true)
+ return {
+ format = "coverage",
+ rules = {
+ {
+ before = before,
+ current = current,
+ after = after,
+ lookups = lookups,
+ }
+ }
+ }
+ else
+ report("unsupported subtype %a in %a %s",subtype,"chainedcontext",what)
+ end
+end
+
+local function extension(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs,types,handlers,what)
+ local tableoffset = lookupoffset + offset
+ setposition(f,tableoffset)
+ local subtype = readushort(f)
+ if subtype == 1 then
+ local lookuptype = types[readushort(f)]
+ local faroffset = readulong(f)
+ local handler = handlers[lookuptype]
+ if handler then
+ -- maybe we can just pass one offset (or tableoffset first)
+ return handler(f,fontdata,lookupid,tableoffset + faroffset,0,glyphs,nofglyphs), lookuptype
+ else
+ report("no handler for lookuptype %a subtype %a in %s %s",lookuptype,subtype,what,"extension")
+ end
+ else
+ report("unsupported subtype %a in %s %s",subtype,what,"extension")
+ end
+end
+
+-- gsub handlers
+
+function gsubhandlers.single(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
+ local tableoffset = lookupoffset + offset
+ setposition(f,tableoffset)
+ local subtype = readushort(f)
+ if subtype == 1 then
+ local coverage = readushort(f)
+ local delta = readshort(f) -- can be negative
+ local coverage = readcoverage(f,tableoffset+coverage) -- not simple as we need to set key/value anyway
+ for index in next, coverage do
+ local newindex = index + delta
+ if index > nofglyphs or newindex > nofglyphs then
+ report("invalid index in %s format %i: %i -> %i (max %i)","single",subtype,index,newindex,nofglyphs)
+ coverage[index] = nil
+ else
+ coverage[index] = newindex
+ end
+ end
+ return {
+ coverage = coverage
+ }
+ elseif subtype == 2 then -- in streamreader a seek and fetch is faster than a temp table
+ local coverage = readushort(f)
+ local nofreplacements = readushort(f)
+ local replacements = { }
+ for i=1,nofreplacements do
+ replacements[i] = readushort(f)
+ end
+ local coverage = readcoverage(f,tableoffset + coverage) -- not simple as we need to set key/value anyway
+ for index, newindex in next, coverage do
+ newindex = newindex + 1
+ if index > nofglyphs or newindex > nofglyphs then
+ report("invalid index in %s format %i: %i -> %i (max %i)","single",subtype,index,newindex,nofglyphs)
+ coverage[index] = nil
+ else
+ coverage[index] = replacements[newindex]
+ end
+ end
+ return {
+ coverage = coverage
+ }
+ else
+ report("unsupported subtype %a in %a substitution",subtype,"single")
+ end
+end
+
+local function sethandler(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs,what)
+ local tableoffset = lookupoffset + offset
+ setposition(f,tableoffset)
+ local subtype = readushort(f)
+ if subtype == 1 then
+ local coverage = readushort(f)
+ local nofsequence = readushort(f)
+ local sequences = { }
+ for i=1,nofsequence do
+ sequences[i] = readushort(f)
+ end
+ for i=1,nofsequence do
+ setposition(f,tableoffset + sequences[i])
+ local n = readushort(f)
+ local s = { }
+ for i=1,n do
+ s[i] = readushort(f)
+ end
+ sequences[i] = s
+ end
+ local coverage = readcoverage(f,tableoffset + coverage)
+ for index, newindex in next, coverage do
+ newindex = newindex + 1
+ if index > nofglyphs or newindex > nofglyphs then
+ report("invalid index in %s format %i: %i -> %i (max %i)",what,subtype,index,newindex,nofglyphs)
+ coverage[index] = nil
+ else
+ coverage[index] = sequences[newindex]
+ end
+ end
+ return {
+ coverage = coverage
+ }
+ else
+ report("unsupported subtype %a in %a substitution",subtype,what)
+ end
+end
+
+function gsubhandlers.multiple(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
+ return sethandler(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs,"multiple")
+end
+
+function gsubhandlers.alternate(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
+ return sethandler(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs,"alternate")
+end
+
+function gsubhandlers.ligature(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
+ local tableoffset = lookupoffset + offset
+ setposition(f,tableoffset)
+ local subtype = readushort(f)
+ if subtype == 1 then
+ local coverage = readushort(f)
+ local nofsets = readushort(f)
+ local ligatures = { }
+ for i=1,nofsets do
+ ligatures[i] = readushort(f)
+ end
+ for i=1,nofsets do
+ local offset = lookupoffset + offset + ligatures[i]
+ setposition(f,offset)
+ local n = readushort(f)
+ local l = { }
+ for i=1,n do
+ l[i] = offset + readushort(f)
+ end
+ ligatures[i] = l
+ end
+ local coverage = readcoverage(f,tableoffset + coverage)
+ for index, newindex in next, coverage do
+ local hash = { }
+ local ligatures = ligatures[newindex+1]
+ for i=1,#ligatures do
+ local offset = ligatures[i]
+ setposition(f,offset)
+ local lig = readushort(f)
+ local cnt = readushort(f)
+ local hsh = hash
+ for i=2,cnt do
+ local c = readushort(f)
+ local h = hsh[c]
+ if not h then
+ h = { }
+ hsh[c] = h
+ end
+ hsh = h
+ end
+ hsh.ligature = lig
+ end
+ coverage[index] = hash
+ end
+ return {
+ coverage = coverage
+ }
+ else
+ report("unsupported subtype %a in %a substitution",subtype,"ligature")
+ end
+end
+
+function gsubhandlers.context(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
+ return unchainedcontext(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs,"substitution"), "context"
+end
+
+function gsubhandlers.chainedcontext(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
+ return chainedcontext(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs,"substitution"), "chainedcontext"
+end
+
+function gsubhandlers.extension(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
+ return extension(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs,gsubtypes,gsubhandlers,"substitution")
+end
+
+function gsubhandlers.reversechainedcontextsingle(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
+ local tableoffset = lookupoffset + offset
+ setposition(f,tableoffset)
+ local subtype = readushort(f)
+ if subtype == 1 then -- NEEDS CHECKING
+ local current = readfirst(f)
+ local before = readarray(f)
+ local after = readarray(f)
+ local replacements = readarray(f)
+ current = readcoveragearray(f,tableoffset,current,true)
+ before = readcoveragearray(f,tableoffset,before,true)
+ after = readcoveragearray(f,tableoffset,after,true)
+ return {
+ coverage = {
+ format = "reversecoverage", -- reversesub
+ before = before,
+ current = current,
+ after = after,
+ replacements = replacements,
+ }
+ }, "reversechainedcontextsingle"
+ else
+ report("unsupported subtype %a in %a substitution",subtype,"reversechainedcontextsingle")
+ end
+end
+
+-- gpos handlers
+
+local function readpairsets(f,tableoffset,sets,format1,format2)
+ local done = { }
+ for i=1,#sets do
+ local offset = sets[i]
+ local reused = done[offset]
+ if not reused then
+ setposition(f,tableoffset + offset)
+ local n = readushort(f)
+ reused = { }
+ for i=1,n do
+ reused[i] = {
+ readushort(f), -- second glyph id
+ readposition(f,format1),
+ readposition(f,format2)
+ }
+ end
+ done[offset] = reused
+ end
+ sets[i] = reused
+ end
+ return sets
+end
+
+local function readpairclasssets(f,nofclasses1,nofclasses2,format1,format2)
+ local classlist1 = { }
+ for i=1,nofclasses1 do
+ local classlist2 = { }
+ classlist1[i] = classlist2
+ for j=1,nofclasses2 do
+ local one = readposition(f,format1)
+ local two = readposition(f,format2)
+ if one or two then
+ classlist2[j] = { one, two }
+ else
+ classlist2[j] = false
+ end
+ end
+ end
+ return classlist1
+end
+
+-- no real gain in kerns as we pack
+
+function gposhandlers.single(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
+ local tableoffset = lookupoffset + offset
+ setposition(f,tableoffset)
+ local subtype = readushort(f)
+ if subtype == 1 then
+ local coverage = readushort(f)
+ local format = readushort(f)
+ local value = readposition(f,format)
+ local coverage = readcoverage(f,tableoffset+coverage)
+ for index, newindex in next, coverage do
+ coverage[index] = value
+ end
+ return {
+ format = "pair",
+ coverage = coverage
+ }
+ elseif subtype == 2 then
+ local coverage = readushort(f)
+ local format = readushort(f)
+ local values = { }
+ local nofvalues = readushort(f)
+ for i=1,nofvalues do
+ values[i] = readposition(f,format)
+ end
+ local coverage = readcoverage(f,tableoffset+coverage)
+ for index, newindex in next, coverage do
+ coverage[index] = values[newindex+1]
+ end
+ return {
+ format = "pair",
+ coverage = coverage
+ }
+ else
+ report("unsupported subtype %a in %a positioning",subtype,"single")
+ end
+end
+
+-- this needs checking! if no second pair then another advance over the list
+
+-- ValueFormat1 applies to the ValueRecord of the first glyph in each pair. ValueRecords for all first glyphs must use ValueFormat1. If ValueFormat1 is set to zero (0), the corresponding glyph has no ValueRecord and, therefore, should not be repositioned.
+-- ValueFormat2 applies to the ValueRecord of the second glyph in each pair. ValueRecords for all second glyphs must use ValueFormat2. If ValueFormat2 is set to null, then the second glyph of the pair is the “next†glyph for which a lookup should be performed.
+
+-- !!!!! this needs checking: when both false, we have no hit so then we might need to fall through
+
+function gposhandlers.pair(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
+ local tableoffset = lookupoffset + offset
+ setposition(f,tableoffset)
+ local subtype = readushort(f)
+ if subtype == 1 then
+ local coverage = readushort(f)
+ local format1 = readushort(f)
+ local format2 = readushort(f)
+ local sets = readarray(f)
+ sets = readpairsets(f,tableoffset,sets,format1,format2)
+ coverage = readcoverage(f,tableoffset + coverage)
+ for index, newindex in next, coverage do
+ local set = sets[newindex+1]
+ local hash = { }
+ for i=1,#set do
+ local value = set[i]
+ if value then
+ local other = value[1]
+ local first = value[2]
+ local second = value[3]
+ if first or second then
+ hash[other] = { first, second } -- needs checking
+ else
+ hash[other] = nil
+ end
+ end
+ end
+ coverage[index] = hash
+ end
+ return {
+ format = "pair",
+ coverage = coverage
+ }
+ elseif subtype == 2 then
+ local coverage = readushort(f)
+ local format1 = readushort(f)
+ local format2 = readushort(f)
+ local classdef1 = readushort(f)
+ local classdef2 = readushort(f)
+ local nofclasses1 = readushort(f) -- incl class 0
+ local nofclasses2 = readushort(f) -- incl class 0
+ local classlist = readpairclasssets(f,nofclasses1,nofclasses2,format1,format2)
+ coverage = readcoverage(f,tableoffset+coverage)
+ classdef1 = readclassdef(f,tableoffset+classdef1)
+ classdef2 = readclassdef(f,tableoffset+classdef2)
+ local usedcoverage = { }
+ for g1, c1 in next, classdef1 do
+ if coverage[g1] then
+ local l1 = classlist[c1]
+ if l1 then
+ local hash = { }
+ for paired, class in next, classdef2 do
+ local offsets = l1[class]
+ if offsets then
+ local first = offsets[1]
+ local second = offsets[2]
+ if first or second then
+ hash[paired] = { first, second }
+ else
+ -- upto the next lookup for this combination
+ end
+ end
+ end
+ usedcoverage[g1] = hash
+ end
+ end
+ end
+ return {
+ format = "pair",
+ coverage = usedcoverage
+ }
+ elseif subtype == 3 then
+ report("yet unsupported subtype %a in %a positioning",subtype,"pair")
+ else
+ report("unsupported subtype %a in %a positioning",subtype,"pair")
+ end
+end
+
+function gposhandlers.cursive(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
+ local tableoffset = lookupoffset + offset
+ setposition(f,tableoffset)
+ local subtype = readushort(f)
+ if subtype == 1 then
+ local coverage = tableoffset + readushort(f)
+ local nofrecords = readushort(f)
+ local records = { }
+ for i=1,nofrecords do
+ local entry = readushort(f)
+ local exit = readushort(f)
+ records[i] = {
+ entry = entry ~= 0 and (tableoffset + entry) or false,
+ exit = exit ~= 0 and (tableoffset + exit ) or false,
+ }
+ end
+ coverage = readcoverage(f,coverage)
+ for i=1,nofrecords do
+ local r = records[i]
+ records[i] = {
+ 1, -- will become hash after loading (must be unique per lookup when packed)
+ readanchor(f,r.entry) or nil,
+ readanchor(f,r.exit ) or nil,
+ }
+ end
+ for index, newindex in next, coverage do
+ coverage[index] = records[newindex+1]
+ end
+ return {
+ coverage = coverage
+ }
+ else
+ report("unsupported subtype %a in %a positioning",subtype,"cursive")
+ end
+end
+
+local function handlemark(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs,ligature)
+ local tableoffset = lookupoffset + offset
+ setposition(f,tableoffset)
+ local subtype = readushort(f)
+ if subtype == 1 then
+ -- we are one based, not zero
+ local markcoverage = tableoffset + readushort(f)
+ local basecoverage = tableoffset + readushort(f)
+ local nofclasses = readushort(f)
+ local markoffset = tableoffset + readushort(f)
+ local baseoffset = tableoffset + readushort(f)
+ --
+ local markcoverage = readcoverage(f,markcoverage)
+ local basecoverage = readcoverage(f,basecoverage,true) -- TO BE CHECKED: true
+ --
+ setposition(f,markoffset)
+ local markclasses = { }
+ local nofmarkclasses = readushort(f)
+ --
+ local lastanchor = fontdata.lastanchor or 0
+ local usedanchors = { }
+ --
+-- local placeholder = (fontdata.markcount or 0) + 1
+-- fontdata.markcount = placeholder
+-- placeholder = "m" .. placeholder
+ --
+ for i=1,nofmarkclasses do
+ local class = readushort(f) + 1
+ local offset = readushort(f)
+ if offset == 0 then
+ markclasses[i] = false
+ else
+-- markclasses[i] = { placeholder, class, markoffset + offset }
+ markclasses[i] = { class, markoffset + offset }
+ end
+ usedanchors[class] = true
+ end
+ for i=1,nofmarkclasses do
+ local mc = markclasses[i]
+ if mc then
+-- mc[3] = readanchor(f,mc[3])
+ mc[2] = readanchor(f,mc[2])
+ end
+ end
+ --
+ setposition(f,baseoffset)
+ local nofbaserecords = readushort(f)
+ local baserecords = { }
+ --
+ if ligature then
+ -- 3 components
+ -- 1 : class .. nofclasses -- NULL when empty
+ -- 2 : class .. nofclasses -- NULL when empty
+ -- 3 : class .. nofclasses -- NULL when empty
+ for i=1,nofbaserecords do -- here i is the class
+ local offset = readushort(f)
+ if offset == 0 then
+ baserecords[i] = false
+ else
+ baserecords[i] = baseoffset + offset
+ end
+ end
+ for i=1,nofbaserecords do
+ local recordoffset = baserecords[i]
+ if recordoffset then
+ setposition(f,recordoffset)
+ local nofcomponents = readushort(f)
+ local components = { }
+ for i=1,nofcomponents do
+ local classes = { }
+ for i=1,nofclasses do
+ local offset = readushort(f)
+ if offset ~= 0 then
+ classes[i] = recordoffset + offset
+ else
+ classes[i] = false
+ end
+ end
+ components[i] = classes
+ end
+ baserecords[i] = components
+ end
+ end
+ local baseclasses = { } -- setmetatableindex("table")
+ for i=1,nofclasses do
+ baseclasses[i] = { }
+ end
+ for i=1,nofbaserecords do
+ local components = baserecords[i]
+ local b = basecoverage[i]
+ if components then
+ for c=1,#components do
+ local classes = components[c]
+ if classes then
+ for i=1,nofclasses do
+ local anchor = readanchor(f,classes[i])
+ local bclass = baseclasses[i]
+ local bentry = bclass[b]
+ if bentry then
+ bentry[c] = anchor
+ else
+ bclass[b]= { [c] = anchor }
+ end
+ end
+ end
+ components[i] = classes
+ end
+ end
+ end
+ for index, newindex in next, markcoverage do
+ markcoverage[index] = markclasses[newindex+1] or nil
+ end
+ return {
+ format = "ligature",
+ baseclasses = baseclasses,
+ coverage = markcoverage,
+ }
+ else
+ for i=1,nofbaserecords do
+ local r = { }
+ for j=1,nofclasses do
+ local offset = readushort(f)
+ if offset == 0 then
+ r[j] = false
+ else
+ r[j] = baseoffset + offset
+ end
+ end
+ baserecords[i] = r
+ end
+ local baseclasses = { } -- setmetatableindex("table")
+ for i=1,nofclasses do
+ baseclasses[i] = { }
+ end
+ for i=1,nofbaserecords do
+ local r = baserecords[i]
+ local b = basecoverage[i]
+ for j=1,nofclasses do
+ baseclasses[j][b] = readanchor(f,r[j])
+ end
+ end
+ for index, newindex in next, markcoverage do
+ markcoverage[index] = markclasses[newindex+1] or nil
+ end
+ -- we could actually already calculate the displacement if we want
+ return {
+ format = "base",
+ baseclasses = baseclasses,
+ coverage = markcoverage,
+ }
+ end
+ else
+ report("unsupported subtype %a in",subtype)
+ end
+
+end
+
+function gposhandlers.marktobase(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
+ return handlemark(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
+end
+
+function gposhandlers.marktoligature(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
+ return handlemark(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs,true)
+end
+
+function gposhandlers.marktomark(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
+ return handlemark(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
+end
+
+function gposhandlers.context(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
+ return unchainedcontext(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs,"positioning"), "context"
+end
+
+function gposhandlers.chainedcontext(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
+ return chainedcontext(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs,"positioning"), "chainedcontext"
+end
+
+function gposhandlers.extension(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
+ return extension(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs,gpostypes,gposhandlers,"positioning")
+end
+
+-- main loader
+
+do
+
+ local plugins = { }
+
+ function plugins.size(f,fontdata,tableoffset,parameters)
+ if not fontdata.designsize then
+ setposition(f,tableoffset+parameters)
+ local designsize = readushort(f)
+ if designsize > 0 then
+ fontdata.designsize = designsize
+ skipshort(f,2)
+ fontdata.minsize = readushort(f)
+ fontdata.maxsize = readushort(f)
+ end
+ end
+ end
+
+ -- feature order needs checking ... as we loop over a hash
+
+ local function reorderfeatures(fontdata,scripts,features)
+ local scriptlangs = { }
+ local featurehash = { }
+ local featureorder = { }
+ for script, languages in next, scripts do
+ for language, record in next, languages do
+ local hash = { }
+ local list = record.featureindices
+ for k=1,#list do
+ local index = list[k]
+ local feature = features[index]
+ local lookups = feature.lookups
+ local tag = feature.tag
+ if tag then
+ hash[tag] = true
+ end
+ if lookups then
+ for i=1,#lookups do
+ local lookup = lookups[i]
+ local o = featureorder[lookup]
+ if o then
+ local okay = true
+ for i=1,#o do
+ if o[i] == tag then
+ okay = false
+ break
+ end
+ end
+ if okay then
+ o[#o+1] = tag
+ end
+ else
+ featureorder[lookup] = { tag }
+ end
+ local f = featurehash[lookup]
+ if f then
+ local h = f[tag]
+ if h then
+ local s = h[script]
+ if s then
+ s[language] = true
+ else
+ h[script] = { [language] = true }
+ end
+ else
+ f[tag] = { [script] = { [language] = true } }
+ end
+ else
+ featurehash[lookup] = { [tag] = { [script] = { [language] = true } } }
+ end
+ --
+ local h = scriptlangs[tag]
+ if h then
+ local s = h[script]
+ if s then
+ s[language] = true
+ else
+ h[script] = { [language] = true }
+ end
+ else
+ scriptlangs[tag] = { [script] = { [language] = true } }
+ end
+ end
+ end
+ end
+ end
+ end
+ return scriptlangs, featurehash, featureorder
+ end
+
+ local function readscriplan(f,fontdata,scriptoffset)
+ setposition(f,scriptoffset)
+ local nofscripts = readushort(f)
+ local scripts = { }
+ for i=1,nofscripts do
+ scripts[readtag(f)] = scriptoffset + readushort(f)
+ end
+ -- script list -> language system info
+ local languagesystems = setmetatableindex("table")
+ for script, offset in next, scripts do
+ setposition(f,offset)
+ local defaultoffset = readushort(f)
+ local noflanguages = readushort(f)
+ local languages = { }
+ if defaultoffset > 0 then
+ languages.dflt = languagesystems[offset + defaultoffset]
+ end
+ for i=1,noflanguages do
+ local language = readtag(f)
+ local offset = offset + readushort(f)
+ languages[language] = languagesystems[offset]
+ end
+ scripts[script] = languages
+ end
+ -- script list -> language system info -> feature list
+ for offset, usedfeatures in next, languagesystems do
+ if offset > 0 then
+ setposition(f,offset)
+ local featureindices = { }
+ usedfeatures.featureindices = featureindices
+ usedfeatures.lookuporder = readushort(f) -- reserved, not used (yet)
+ usedfeatures.requiredindex = readushort(f) -- relates to required (can be 0xFFFF)
+ local noffeatures = readushort(f)
+ for i=1,noffeatures do
+ featureindices[i] = readushort(f) + 1
+ end
+ end
+ end
+ return scripts
+ end
+
+ local function readfeatures(f,fontdata,featureoffset)
+ setposition(f,featureoffset)
+ local features = { }
+ local noffeatures = readushort(f)
+ for i=1,noffeatures do
+ -- also shared?
+ features[i] = {
+ tag = readtag(f),
+ offset = readushort(f)
+ }
+ end
+ --
+ for i=1,noffeatures do
+ local feature = features[i]
+ local offset = featureoffset+feature.offset
+ setposition(f,offset)
+ local parameters = readushort(f) -- feature.parameters
+ local noflookups = readushort(f)
+ if noflookups > 0 then
+ local lookups = { }
+ feature.lookups = lookups
+ for j=1,noflookups do
+ lookups[j] = readushort(f) + 1
+ end
+ end
+ if parameters > 0 then
+ feature.parameters = parameters
+ local plugin = plugins[feature.tag]
+ if plugin then
+ plugin(f,fontdata,offset,parameters)
+ end
+ end
+ end
+ return features
+ end
+
+ local function readlookups(f,lookupoffset,lookuptypes,featurehash,featureorder)
+ setposition(f,lookupoffset)
+ local lookups = { }
+ local noflookups = readushort(f)
+ for i=1,noflookups do
+ lookups[i] = readushort(f)
+ end
+ for lookupid=1,noflookups do
+ local index = lookups[lookupid]
+ setposition(f,lookupoffset+index)
+ local subtables = { }
+ local typebits = readushort(f)
+ local flagbits = readushort(f)
+ local lookuptype = lookuptypes[typebits]
+ local lookupflags = lookupflags[flagbits]
+ local nofsubtables = readushort(f)
+ for j=1,nofsubtables do
+ local offset = readushort(f)
+ subtables[j] = offset + index -- we can probably put lookupoffset here
+ end
+ -- which one wins?
+ local markclass = bittest(flagbits,0x0010) -- usemarkfilteringset
+ if markclass then
+ markclass = readushort(f) -- + 1
+ end
+ local markset = rshift(flagbits,8)
+ if markset > 0 then
+ markclass = markset -- + 1
+ end
+ lookups[lookupid] = {
+ type = lookuptype,
+ -- chain = chaindirections[lookuptype] or nil,
+ flags = lookupflags,
+ name = lookupid,
+ subtables = subtables,
+ markclass = markclass,
+ features = featurehash[lookupid], -- not if extension
+ order = featureorder[lookupid],
+ }
+ end
+ return lookups
+ end
+
+ local function readscriptoffsets(f,fontdata,tableoffset)
+ if not tableoffset then
+ return
+ end
+ setposition(f,tableoffset)
+ local version = readulong(f)
+ if version ~= 0x00010000 then
+ report("table version %a of %a is not supported (yet), maybe font %s is bad",version,what,fontdata.filename)
+ return
+ end
+ --
+ return tableoffset + readushort(f), tableoffset + readushort(f), tableoffset + readushort(f)
+ end
+
+ local f_lookupname = formatters["%s_%s_%s"]
+
+ local function resolvelookups(f,lookupoffset,fontdata,lookups,lookuptypes,lookuphandlers,what)
+
+ local sequences = fontdata.sequences or { }
+ local sublookuplist = fontdata.sublookups or { }
+ fontdata.sequences = sequences
+ fontdata.sublookups = sublookuplist
+ local nofsublookups = #sublookuplist
+ local nofsequences = #sequences -- 0
+ local lastsublookup = nofsublookups
+ local lastsequence = nofsequences
+ local lookupnames = lookupnames[what]
+ local sublookuphash = { }
+ local sublookupcheck = { }
+ local glyphs = fontdata.glyphs
+ local nofglyphs = fontdata.nofglyphs or #glyphs
+ local noflookups = #lookups
+ local lookupprefix = sub(what,2,2) -- g[s|p][ub|os]
+ --
+ for lookupid=1,noflookups do
+ local lookup = lookups[lookupid]
+ local lookuptype = lookup.type
+ local subtables = lookup.subtables
+ local features = lookup.features
+ local handler = lookuphandlers[lookuptype]
+ if handler then
+ local nofsubtables = #subtables
+ local order = lookup.order
+ local flags = lookup.flags
+ -- this is expected in th efont handler (faster checking)
+ if flags[1] then flags[1] = "mark" end
+ if flags[2] then flags[2] = "ligature" end
+ if flags[3] then flags[3] = "base" end
+ --
+ local markclass = lookup.markclass
+ -- local chain = lookup.chain
+ if nofsubtables > 0 then
+ local steps = { }
+ local nofsteps = 0
+ local oldtype = nil
+ for s=1,nofsubtables do
+ local step, lt = handler(f,fontdata,lookupid,lookupoffset,subtables[s],glyphs,nofglyphs)
+ if lt then
+ lookuptype = lt
+ if oldtype and lt ~= oldtype then
+ report("messy %s lookup type %a and %a",what,lookuptype,oldtype)
+ end
+ oldtype = lookuptype
+ end
+ if not step then
+ report("unsupported %s lookup type %a",what,lookuptype)
+ else
+ nofsteps = nofsteps + 1
+ steps[nofsteps] = step
+ local rules = step.rules
+ if rules then
+ for i=1,#rules do
+ local rule = rules[i]
+ local before = rule.before
+ local current = rule.current
+ local after = rule.after
+ if before then
+ for i=1,#before do
+ before[i] = tohash(before[i])
+ end
+ -- as with original ctx ff loader
+ rule.before = reversed(before)
+ end
+ if current then
+ for i=1,#current do
+ current[i] = tohash(current[i])
+ end
+ end
+ if after then
+ for i=1,#after do
+ after[i] = tohash(after[i])
+ end
+ end
+ end
+ end
+ end
+ end
+ if nofsteps ~= nofsubtables then
+ report("bogus subtables removed in %s lookup type %a",what,lookuptype)
+ end
+ lookuptype = lookupnames[lookuptype] or lookuptype
+ if features then
+ nofsequences = nofsequences + 1
+ -- report("registering %i as sequence step %i",lookupid,nofsequences)
+ local l = {
+ index = nofsequences,
+ name = f_lookupname(lookupprefix,"s",lookupid+lookupidoffset),
+ steps = steps,
+ nofsteps = nofsteps,
+ type = lookuptype,
+ markclass = markclass or nil,
+ flags = flags,
+ -- chain = chain,
+ order = order,
+ features = features,
+ }
+ sequences[nofsequences] = l
+ lookup.done = l
+ else
+ nofsublookups = nofsublookups + 1
+ -- report("registering %i as sublookup %i",lookupid,nofsublookups)
+ local l = {
+ index = nofsublookups,
+ name = f_lookupname(lookupprefix,"l",lookupid+lookupidoffset),
+ steps = steps,
+ nofsteps = nofsteps,
+ type = lookuptype,
+ markclass = markclass or nil,
+ flags = flags,
+ -- chain = chain,
+ }
+ sublookuplist[nofsublookups] = l
+ sublookuphash[lookupid] = nofsublookups
+ sublookupcheck[lookupid] = 0
+ lookup.done = l
+ end
+ else
+ report("no subtables for lookup %a",lookupid)
+ end
+ else
+ report("no handler for lookup %a with type %a",lookupid,lookuptype)
+ end
+ end
+
+ -- When we have a context, we have sublookups that resolve into lookups for which we need to
+ -- know the type. We split the main lookuptable in two parts: sequences (the main lookups)
+ -- and subtable lookups (simple specs with no features). We could keep them merged and might do
+ -- that once we only use this loader. Then we can also move the simple specs into the sequence.
+ -- After all, we pack afterwards.
+
+ local reported = { }
+
+ for i=lastsequence+1,nofsequences do
+ local sequence = sequences[i]
+ local steps = sequence.steps
+ for i=1,#steps do
+ local step = steps[i]
+ local rules = step.rules
+ if rules then
+ for i=1,#rules do
+ local rule = rules[i]
+ local rlookups = rule.lookups
+ if not rlookups then
+ local name = sequence.name
+ if not reported[name] then
+ report("rule %i in %s lookup %a has %s lookups",i,what,name,"no")
+ reported[name] = true
+ end
+ elseif not next(rlookups) then
+ local name = sequence.name
+ if not reported[name] then
+ -- can be ok as it aborts a chain sequence
+ report("rule %i in %s lookup %a has %s lookups",i,what,name,"empty")
+ reported[name] = true
+ end
+ rule.lookups = nil
+ else
+ for index, lookupid in sortedhash(rlookups) do -- nicer
+ local h = sublookuphash[lookupid]
+ if not h then
+ -- here we have a lookup that is used independent as well
+ -- as in another one
+ nofsublookups = nofsublookups + 1
+ -- report("registering %i as sublookup %i",lookupid,nofsublookups)
+ local d = lookups[lookupid].done
+ h = {
+ index = nofsublookups, -- handy for tracing
+ name = f_lookupname(lookupprefix,"d",lookupid+lookupidoffset),
+ derived = true, -- handy for tracing
+ steps = d.steps,
+ nofsteps = d.nofsteps,
+ type = d.lookuptype,
+ markclass = d.markclass or nil,
+ flags = d.flags,
+ -- chain = d.chain,
+ }
+ sublookuplist[nofsublookups] = h
+ sublookuphash[lookupid] = nofsublookups
+ sublookupcheck[lookupid] = 1
+ else
+ sublookupcheck[lookupid] = sublookupcheck[lookupid] + 1
+ end
+ rlookups[index] = h
+ end
+ end
+ end
+ end
+ end
+ end
+
+ for i, n in sortedhash(sublookupcheck) do
+ local l = lookups[i]
+ local t = l.type
+ if n == 0 and t ~= "extension" then
+ local d = l.done
+ report("%s lookup %s of type %a is not used",what,d and d.name or l.name,t)
+ -- inspect(l)
+ end
+ end
+
+ end
+
+ local function readscripts(f,fontdata,what,lookuptypes,lookuphandlers,lookupstoo)
+ local datatable = fontdata.tables[what]
+ if not datatable then
+ return
+ end
+ local tableoffset = datatable.offset
+ if not tableoffset then
+ return
+ end
+ local scriptoffset, featureoffset, lookupoffset = readscriptoffsets(f,fontdata,tableoffset)
+ if not scriptoffset then
+ return
+ end
+ --
+ local scripts = readscriplan(f,fontdata,scriptoffset)
+ local features = readfeatures(f,fontdata,featureoffset)
+ --
+ local scriptlangs, featurehash, featureorder = reorderfeatures(fontdata,scripts,features)
+ --
+ if fontdata.features then
+ fontdata.features[what] = scriptlangs
+ else
+ fontdata.features = { [what] = scriptlangs }
+ end
+ --
+ if not lookupstoo then
+ return
+ end
+ --
+ local lookups = readlookups(f,lookupoffset,lookuptypes,featurehash,featureorder)
+ --
+ if lookups then
+ resolvelookups(f,lookupoffset,fontdata,lookups,lookuptypes,lookuphandlers,what)
+ end
+ end
+
+ local function checkkerns(f,fontdata,specification)
+ local datatable = fontdata.tables.kern
+ if not datatable then
+ return -- no kerns
+ end
+ local features = fontdata.features
+ local gposfeatures = features and features.gpos
+ local name
+ if not gposfeatures or not gposfeatures.kern then
+ name = "kern"
+ elseif specification.globalkerns then
+ name = "globalkern"
+ else
+ report("ignoring global kern table using gpos kern feature")
+ return
+ end
+ report("adding global kern table as gpos feature %a",name)
+ setposition(f,datatable.offset)
+ local version = readushort(f)
+ local noftables = readushort(f)
+ local kerns = setmetatableindex("table")
+ for i=1,noftables do
+ local version = readushort(f)
+ local length = readushort(f)
+ local coverage = readushort(f)
+ -- bit 8-15 of coverage: format 0 or 2
+ local format = bit32.rshift(coverage,8) -- is this ok?
+ if format == 0 then
+ local nofpairs = readushort(f)
+ local searchrange = readushort(f)
+ local entryselector = readushort(f)
+ local rangeshift = readushort(f)
+ for i=1,nofpairs do
+ kerns[readushort(f)][readushort(f)] = readfword(f)
+ end
+ elseif format == 2 then
+ -- apple specific so let's ignore it
+ else
+ -- not supported by ms
+ end
+ end
+ local feature = { dflt = { dflt = true } }
+ if not features then
+ fontdata.features = { gpos = { [name] = feature } }
+ elseif not gposfeatures then
+ fontdata.features.gpos = { [name] = feature }
+ else
+ gposfeatures[name] = feature
+ end
+ local sequences = fontdata.sequences
+ if not sequences then
+ sequences = { }
+ fontdata.sequences = sequences
+ end
+ local nofsequences = #sequences + 1
+ sequences[nofsequences] = {
+ index = nofsequences,
+ name = name,
+ steps = {
+ {
+ coverage = kerns,
+ format = "kern",
+ },
+ },
+ nofsteps = 1,
+ type = "gpos_pair",
+ -- type = "gpos_single", -- maybe better
+ flags = { false, false, false, false },
+ order = { name },
+ features = { [name] = feature },
+ }
+ end
+
+ function readers.gsub(f,fontdata,specification)
+ if specification.details then
+ readscripts(f,fontdata,"gsub",gsubtypes,gsubhandlers,specification.lookups)
+ end
+ end
+
+ function readers.gpos(f,fontdata,specification)
+ if specification.details then
+ readscripts(f,fontdata,"gpos",gpostypes,gposhandlers,specification.lookups)
+ if specification.lookups then
+ checkkerns(f,fontdata,specification)
+ end
+ end
+ end
+
+end
+
+function readers.gdef(f,fontdata,specification)
+ if specification.glyphs then
+ local datatable = fontdata.tables.gdef
+ if datatable then
+ local tableoffset = datatable.offset
+ setposition(f,tableoffset)
+ local version = readulong(f)
+ local classoffset = tableoffset + readushort(f)
+ local attachmentoffset = tableoffset + readushort(f) -- used for bitmaps
+ local ligaturecarets = tableoffset + readushort(f) -- used in editors (maybe nice for tracing)
+ local markclassoffset = tableoffset + readushort(f)
+ local marksetsoffset = version == 0x00010002 and (tableoffset + readushort(f))
+ local glyphs = fontdata.glyphs
+ local marks = { }
+ local markclasses = setmetatableindex("table")
+ local marksets = setmetatableindex("table")
+ fontdata.marks = marks
+ fontdata.markclasses = markclasses
+ fontdata.marksets = marksets
+ -- class definitions
+ setposition(f,classoffset)
+ local classformat = readushort(f)
+ if classformat == 1 then
+ local firstindex = readushort(f)
+ local lastindex = firstindex + readushort(f) - 1
+ for index=firstindex,lastindex do
+ local class = classes[readushort(f)]
+ if class == "mark" then
+ marks[index] = true
+ end
+ glyphs[index].class = class
+ end
+ elseif classformat == 2 then
+ local nofranges = readushort(f)
+ for i=1,nofranges do
+ local firstindex = readushort(f)
+ local lastindex = readushort(f)
+ local class = classes[readushort(f)]
+ if class then
+ for index=firstindex,lastindex do
+ glyphs[index].class = class
+ if class == "mark" then
+ marks[index] = true
+ end
+ end
+ end
+ end
+ end
+ -- mark classes
+ setposition(f,markclassoffset)
+ local classformat = readushort(f)
+ if classformat == 1 then
+ local firstindex = readushort(f)
+ local lastindex = firstindex + readushort(f) - 1
+ for index=firstindex,lastindex do
+ markclasses[readushort(f)][index] = true
+ end
+ elseif classformat == 2 then
+ local nofranges = readushort(f)
+ for i=1,nofranges do
+ local firstindex = readushort(f)
+ local lastindex = readushort(f)
+ local class = markclasses[readushort(f)]
+ for index=firstindex,lastindex do
+ class[index] = true
+ end
+ end
+ end
+ -- mark sets : todo: just make the same as class sets above
+ if marksetsoffset then
+ setposition(f,marksetsoffset)
+ local format = readushort(f)
+ if format == 1 then
+ local nofsets = readushort(f)
+ local sets = { }
+ for i=1,nofsets do
+ sets[i] = readulong(f)
+ end
+ -- somehow this fails on e.g. notosansethiopic-bold.ttf
+ for i=1,nofsets do
+ local offset = sets[i]
+ if offset ~= 0 then
+ marksets[i] = readcoverage(f,marksetsoffset+offset)
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
+-- We keep this code here instead of font-otm.lua because we need coverage
+-- helpers. Okay, these helpers could go to the main reader file some day.
+
+local function readmathvalue(f)
+ local v = readshort(f)
+ skipshort(f,1) -- offset to device table
+ return v
+end
+
+local function readmathconstants(f,fontdata,offset)
+ setposition(f,offset)
+ fontdata.mathconstants = {
+ ScriptPercentScaleDown = readshort(f),
+ ScriptScriptPercentScaleDown = readshort(f),
+ DelimitedSubFormulaMinHeight = readushort(f),
+ DisplayOperatorMinHeight = readushort(f),
+ MathLeading = readmathvalue(f),
+ AxisHeight = readmathvalue(f),
+ AccentBaseHeight = readmathvalue(f),
+ FlattenedAccentBaseHeight = readmathvalue(f),
+ SubscriptShiftDown = readmathvalue(f),
+ SubscriptTopMax = readmathvalue(f),
+ SubscriptBaselineDropMin = readmathvalue(f),
+ SuperscriptShiftUp = readmathvalue(f),
+ SuperscriptShiftUpCramped = readmathvalue(f),
+ SuperscriptBottomMin = readmathvalue(f),
+ SuperscriptBaselineDropMax = readmathvalue(f),
+ SubSuperscriptGapMin = readmathvalue(f),
+ SuperscriptBottomMaxWithSubscript = readmathvalue(f),
+ SpaceAfterScript = readmathvalue(f),
+ UpperLimitGapMin = readmathvalue(f),
+ UpperLimitBaselineRiseMin = readmathvalue(f),
+ LowerLimitGapMin = readmathvalue(f),
+ LowerLimitBaselineDropMin = readmathvalue(f),
+ StackTopShiftUp = readmathvalue(f),
+ StackTopDisplayStyleShiftUp = readmathvalue(f),
+ StackBottomShiftDown = readmathvalue(f),
+ StackBottomDisplayStyleShiftDown = readmathvalue(f),
+ StackGapMin = readmathvalue(f),
+ StackDisplayStyleGapMin = readmathvalue(f),
+ StretchStackTopShiftUp = readmathvalue(f),
+ StretchStackBottomShiftDown = readmathvalue(f),
+ StretchStackGapAboveMin = readmathvalue(f),
+ StretchStackGapBelowMin = readmathvalue(f),
+ FractionNumeratorShiftUp = readmathvalue(f),
+ FractionNumeratorDisplayStyleShiftUp = readmathvalue(f),
+ FractionDenominatorShiftDown = readmathvalue(f),
+ FractionDenominatorDisplayStyleShiftDown = readmathvalue(f),
+ FractionNumeratorGapMin = readmathvalue(f),
+ FractionNumeratorDisplayStyleGapMin = readmathvalue(f),
+ FractionRuleThickness = readmathvalue(f),
+ FractionDenominatorGapMin = readmathvalue(f),
+ FractionDenominatorDisplayStyleGapMin = readmathvalue(f),
+ SkewedFractionHorizontalGap = readmathvalue(f),
+ SkewedFractionVerticalGap = readmathvalue(f),
+ OverbarVerticalGap = readmathvalue(f),
+ OverbarRuleThickness = readmathvalue(f),
+ OverbarExtraAscender = readmathvalue(f),
+ UnderbarVerticalGap = readmathvalue(f),
+ UnderbarRuleThickness = readmathvalue(f),
+ UnderbarExtraDescender = readmathvalue(f),
+ RadicalVerticalGap = readmathvalue(f),
+ RadicalDisplayStyleVerticalGap = readmathvalue(f),
+ RadicalRuleThickness = readmathvalue(f),
+ RadicalExtraAscender = readmathvalue(f),
+ RadicalKernBeforeDegree = readmathvalue(f),
+ RadicalKernAfterDegree = readmathvalue(f),
+ RadicalDegreeBottomRaisePercent = readshort(f),
+ }
+end
+
+local function readmathglyphinfo(f,fontdata,offset)
+ setposition(f,offset)
+ local italics = readushort(f)
+ local accents = readushort(f)
+ local extensions = readushort(f)
+ local kerns = readushort(f)
+ local glyphs = fontdata.glyphs
+ if italics ~= 0 then
+ setposition(f,offset+italics)
+ local coverage = readushort(f)
+ local nofglyphs = readushort(f)
+ coverage = readcoverage(f,offset+italics+coverage,true)
+ setposition(f,offset+italics+4)
+ for i=1,nofglyphs do
+ local italic = readmathvalue(f)
+ if italic ~= 0 then
+ local glyph = glyphs[coverage[i]]
+ local math = glyph.math
+ if not math then
+ glyph.math = { italic = italic }
+ else
+ math.italic = italic
+ end
+ end
+ end
+ fontdata.hasitalics = true
+ end
+ if accents ~= 0 then
+ setposition(f,offset+accents)
+ local coverage = readushort(f)
+ local nofglyphs = readushort(f)
+ coverage = readcoverage(f,offset+accents+coverage,true)
+ setposition(f,offset+accents+4)
+ for i=1,nofglyphs do
+ local accent = readmathvalue(f)
+ if accent ~= 0 then
+ local glyph = glyphs[coverage[i]]
+ local math = glyph.math
+ if not math then
+ glyph.math = { accent = accent }
+ else
+ math.accent = accent
+ end
+ end
+ end
+ end
+ if extensions ~= 0 then
+ setposition(f,offset+extensions)
+ end
+ if kerns ~= 0 then
+ local kernoffset = offset + kerns
+ setposition(f,kernoffset)
+ local coverage = readushort(f)
+ local nofglyphs = readushort(f)
+ if nofglyphs > 0 then
+ local function get(offset)
+ setposition(f,kernoffset+offset)
+ local n = readushort(f)
+ if n > 0 then
+ local l = { }
+ -- for i=1,n do
+ -- l[i] = { readushort(f), 0 } -- height, kern
+ -- skipshort(f)
+ -- end
+ -- for i=1,n do
+ -- l[i][2] = readushort(f)
+ -- skipshort(f)
+ -- end
+ for i=1,n do
+ l[i] = { height = readmathvalue(f) }
+ end
+ for i=1,n do
+ l[i].kern = readmathvalue(f)
+ end
+ l[n+1] = { kern = readmathvalue(f) }
+ return l
+ end
+ end
+ local kernsets = { }
+ for i=1,nofglyphs do
+ local topright = readushort(f)
+ local topleft = readushort(f)
+ local bottomright = readushort(f)
+ local bottomleft = readushort(f)
+ kernsets[i] = {
+ topright = topright ~= 0 and topright or nil,
+ topleft = topleft ~= 0 and topleft or nil,
+ bottomright = bottomright ~= 0 and bottomright or nil,
+ bottomleft = bottomleft ~= 0 and bottomleft or nil,
+ }
+ end
+ coverage = readcoverage(f,kernoffset+coverage,true)
+ for i=1,nofglyphs do
+ local kernset = kernsets[i]
+ if next(kernset) then
+ local k = kernset.topright if k then kernset.topright = get(k) end
+ local k = kernset.topleft if k then kernset.topleft = get(k) end
+ local k = kernset.bottomright if k then kernset.bottomright = get(k) end
+ local k = kernset.bottomleft if k then kernset.bottomleft = get(k) end
+ if next(kernset) then
+ local glyph = glyphs[coverage[i]]
+ local math = glyph.math
+ if not math then
+ glyph.math = { kerns = kernset }
+ else
+ math.kerns = kernset
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
+local function readmathvariants(f,fontdata,offset)
+ setposition(f,offset)
+ local glyphs = fontdata.glyphs
+ local minoverlap = readushort(f)
+ local vcoverage = readushort(f)
+ local hcoverage = readushort(f)
+ local vnofglyphs = readushort(f)
+ local hnofglyphs = readushort(f)
+ local vconstruction = { }
+ local hconstruction = { }
+ for i=1,vnofglyphs do
+ vconstruction[i] = readushort(f)
+ end
+ for i=1,hnofglyphs do
+ hconstruction[i] = readushort(f)
+ end
+
+ fontdata.mathconstants.MinConnectorOverlap = minoverlap
+
+ -- variants[i] = {
+ -- glyph = readushort(f),
+ -- advance = readushort(f),
+ -- }
+
+ local function get(offset,coverage,nofglyphs,construction,kvariants,kparts,kitalic)
+ if coverage ~= 0 and nofglyphs > 0 then
+ local coverage = readcoverage(f,offset+coverage,true)
+ for i=1,nofglyphs do
+ local c = construction[i]
+ if c ~= 0 then
+ local index = coverage[i]
+ local glyph = glyphs[index]
+ local math = glyph.math
+ setposition(f,offset+c)
+ local assembly = readushort(f)
+ local nofvariants = readushort(f)
+ if nofvariants > 0 then
+ local variants, v = nil, 0
+ for i=1,nofvariants do
+ local variant = readushort(f)
+ if variant == index then
+ -- ignore
+ elseif variants then
+ v = v + 1
+ variants[v] = variant
+ else
+ v = 1
+ variants = { variant }
+ end
+ skipshort(f)
+ end
+ if not variants then
+ -- only self
+ elseif not math then
+ math = { [kvariants] = variants }
+ glyph.math = math
+ else
+ math[kvariants] = variants
+ end
+ end
+ if assembly ~= 0 then
+ setposition(f,offset + c + assembly)
+ local italic = readmathvalue(f)
+ local nofparts = readushort(f)
+ local parts = { }
+ for i=1,nofparts do
+ local p = {
+ glyph = readushort(f),
+ start = readushort(f),
+ ["end"] = readushort(f),
+ advance = readushort(f),
+ }
+ local flags = readushort(f)
+ if bittest(flags,0x0001) then
+ p.extender = 1 -- true
+ end
+ parts[i] = p
+ end
+ if not math then
+ math = {
+ [kparts] = parts
+ }
+ glyph.math = math
+ else
+ math[kparts] = parts
+ end
+ if italic and italic ~= 0 then
+ math[kitalic] = italic
+ end
+ end
+ end
+ end
+ end
+ end
+
+ get(offset,vcoverage,vnofglyphs,vconstruction,"vvariants","vparts","vitalic")
+ get(offset,hcoverage,hnofglyphs,hconstruction,"hvariants","hparts","hitalic")
+end
+
+function readers.math(f,fontdata,specification)
+ if specification.glyphs then
+ local datatable = fontdata.tables.math
+ if datatable then
+ local tableoffset = datatable.offset
+ setposition(f,tableoffset)
+ local version = readulong(f)
+ if version ~= 0x00010000 then
+ report("table version %a of %a is not supported (yet), maybe font %s is bad",version,what,fontdata.filename)
+ return
+ end
+ local constants = readushort(f)
+ local glyphinfo = readushort(f)
+ local variants = readushort(f)
+ if constants == 0 then
+ report("the math table of %a has no constants",fontdata.filename)
+ else
+ readmathconstants(f,fontdata,tableoffset+constants)
+ end
+ if glyphinfo ~= 0 then
+ readmathglyphinfo(f,fontdata,tableoffset+glyphinfo)
+ end
+ if variants ~= 0 then
+ readmathvariants(f,fontdata,tableoffset+variants)
+ end
+ end
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/font-emp.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-emp.mkvi
index 34a1ea9cc19..8f87ff7a199 100644
--- a/Master/texmf-dist/tex/context/base/font-emp.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-emp.mkvi
@@ -43,7 +43,7 @@
\let\m_font_emphasized_typeface\empty
\def\font_emphasis_checked_typeface#slanted#italic%
- {\edef\m_font_emphasized_typeface{\bodyfontvariable\s!em}%
+ {\edef\m_font_emphasized_typeface{\font_bodyfontvariable\s!em}%
\ifx\m_font_emphasized_typeface\v!slanted
#slanted%
\else\ifx\m_font_emphasized_typeface\v!italic
diff --git a/Master/texmf-dist/tex/context/base/font-enc.lua b/Master/texmf-dist/tex/context/base/mkiv/font-enc.lua
index 2e8b722de39..2e8b722de39 100644
--- a/Master/texmf-dist/tex/context/base/font-enc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-enc.lua
diff --git a/Master/texmf-dist/tex/context/base/font-enh.lua b/Master/texmf-dist/tex/context/base/mkiv/font-enh.lua
index 3439a434ab4..3439a434ab4 100644
--- a/Master/texmf-dist/tex/context/base/font-enh.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-enh.lua
diff --git a/Master/texmf-dist/tex/context/base/font-ext.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ext.lua
index b7817c140b0..79144aa70e3 100644
--- a/Master/texmf-dist/tex/context/base/font-ext.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-ext.lua
@@ -7,6 +7,7 @@ if not modules then modules = { } end modules ['font-ext'] = {
}
local next, type, byte = next, type, string.byte
+local utfbyte = utf.byte
local context = context
local fonts = fonts
@@ -534,8 +535,8 @@ local function initializeitlc(tfmdata,value) -- hm, always value
end
registerotffeature {
- name = "itlc",
- description = "italic correction",
+ name = "itlc",
+ description = "italic correction",
initializers = {
base = initializeitlc,
node = initializeitlc,
@@ -543,8 +544,8 @@ registerotffeature {
}
registerafmfeature {
- name = "itlc",
- description = "italic correction",
+ name = "itlc",
+ description = "italic correction",
initializers = {
base = initializeitlc,
node = initializeitlc,
@@ -552,14 +553,12 @@ registerafmfeature {
}
local function initializetextitalics(tfmdata,value) -- yes no delay
- local delay = value == "delay"
- tfmdata.properties.textitalics = delay and true or value
- tfmdata.properties.delaytextitalics = delay
+ tfmdata.properties.textitalics = toboolean(value)
end
registerotffeature {
- name = "textitalics",
- description = "use alternative text italic correction",
+ name = "textitalics",
+ description = "use alternative text italic correction",
initializers = {
base = initializetextitalics,
node = initializetextitalics,
@@ -567,14 +566,36 @@ registerotffeature {
}
registerafmfeature {
- name = "textitalics",
- description = "use alternative text italic correction",
+ name = "textitalics",
+ description = "use alternative text italic correction",
initializers = {
base = initializetextitalics,
node = initializetextitalics,
}
}
+local function initializemathitalics(tfmdata,value) -- yes no delay
+ tfmdata.properties.mathitalics = toboolean(value)
+end
+
+registerotffeature {
+ name = "mathitalics",
+ description = "use alternative math italic correction",
+ initializers = {
+ base = initializemathitalics,
+ node = initializemathitalics,
+ }
+}
+
+registerafmfeature {
+ name = "mathitalics",
+ description = "use alternative math italic correction",
+ initializers = {
+ base = initializemathitalics,
+ node = initializemathitalics,
+ }
+}
+
-- slanting
local function initializeslant(tfmdata,value)
@@ -835,6 +856,47 @@ registerotffeature {
}
}
+-- -- for notosans but not general
+--
+-- do
+--
+-- local v_local = interfaces and interfaces.variables and interfaces.variables["local"] or "local"
+--
+-- local function initialize(tfmdata,key,value)
+-- local characters = tfmdata.characters
+-- local parameters = tfmdata.parameters
+-- local oldchar = 32
+-- local newchar = 32
+-- if value == "locl" or value == v_local then
+-- newchar = fonts.handlers.otf.getsubstitution(tfmdata,oldchar,"locl",true) or oldchar
+-- elseif value == true then
+-- -- use normal space
+-- elseif value then
+-- newchar = utfbyte(value)
+-- else
+-- return
+-- end
+-- local newchar = newchar and characters[newchar]
+-- local newspace = newchar and newchar.width
+-- if newspace > 0 then
+-- parameters.space = newspace
+-- parameters.space_stretch = newspace/2
+-- parameters.space_shrink = newspace/3
+-- parameters.extra_space = parameters.space_shrink
+-- end
+-- end
+--
+-- registerotffeature {
+-- name = 'space', -- true|false|locl|character
+-- description = 'space settings',
+-- manipulators = {
+-- base = initialize,
+-- node = initialize,
+-- }
+-- }
+--
+-- end
+
-- -- historic stuff, move from font-ota (handled differently, typo-rep)
--
-- local delete_node = nodes.delete
diff --git a/Master/texmf-dist/tex/context/base/font-fbk.lua b/Master/texmf-dist/tex/context/base/mkiv/font-fbk.lua
index 22644f04674..9ef0706d235 100644
--- a/Master/texmf-dist/tex/context/base/font-fbk.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-fbk.lua
@@ -46,6 +46,9 @@ local force_composed = false
local cache = { } -- we could make these weak
local fraction = 0.15 -- 30 units for lucida
+-- todo: we also need to update the feature hashes ... i'll do that when i'm in the mood
+-- and/or when i need it
+
local function composecharacters(tfmdata)
-- this assumes that slot 1 is self, there will be a proper self some day
local characters = tfmdata.characters
@@ -89,21 +92,22 @@ local function composecharacters(tfmdata)
end
end
local charsacc = characters[acc]
- --~ local ca = charsacc.category
- --~ if ca == "mn" then
- --~ -- mark nonspacing
- --~ elseif ca == "ms" then
- --~ -- mark spacing combining
- --~ elseif ca == "me" then
- --~ -- mark enclosing
- --~ else
+ -- local ca = charsacc.category
+ -- if ca == "mn" then
+ -- -- mark nonspacing
+ -- elseif ca == "ms" then
+ -- -- mark spacing combining
+ -- elseif ca == "me" then
+ -- -- mark enclosing
+ -- else
if not charsacc then -- fallback accents
acc = unicodefallbacks[acc]
charsacc = acc and characters[acc]
end
local chr_t = cache[chr]
if not chr_t then
- chr_t = {"slot", 1, chr}
+ chr_t = { "slot", 1, chr }
+ -- will be: chr_t = { "slot", 0, chr }
cache[chr] = chr_t
end
if charsacc then
@@ -112,7 +116,8 @@ local function composecharacters(tfmdata)
end
local acc_t = cache[acc]
if not acc_t then
- acc_t = {"slot", 1, acc}
+ acc_t = { "slot", 1, acc }
+ -- will be: acc_t = { "slot", 0, acc }
cache[acc] = acc_t
end
local cb = descriptions[chr].boundingbox
@@ -224,7 +229,7 @@ local function composecharacters(tfmdata)
end
else
if trace_combining_define then
- report_combining("%C becomes simplfied %C",i,chr)
+ report_combining("%C becomes simplified %C",i,chr)
end
t.commands = { chr_t } -- else index mess
end
diff --git a/Master/texmf-dist/tex/context/base/font-fea.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-fea.mkvi
index 5f6f1b5d5ad..dade7049488 100644
--- a/Master/texmf-dist/tex/context/base/font-fea.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-fea.mkvi
@@ -248,8 +248,11 @@
\installcorenamespace{featureyes}
\installcorenamespace{featurenop}
-\unexpanded\def\font_feature_yes[#method]{\csname\??featureyes\ifcsname\??featureyes#1\endcsname#1\else\s!unknown\fi\endcsname}
-\unexpanded\def\font_feature_nop #method{\csname\??featurenop\ifcsname\??featurenop#1\endcsname#1\else\s!unknown\fi\endcsname}
+%\unexpanded\def\font_feature_yes[#method]{\csname\??featureyes\ifcsname\??featureyes#method\endcsname#method\else\s!unknown\fi\endcsname}
+%\unexpanded\def\font_feature_nop #method{\csname\??featurenop\ifcsname\??featurenop#method\endcsname#method\else\s!unknown\fi\endcsname}
+
+\unexpanded\def\font_feature_yes[#method]{\begincsname\??featureyes#method\endcsname}
+\unexpanded\def\font_feature_nop #method{\begincsname\??featurenop#method\endcsname}
\letvalue{\??featureyes +}\addfeature
\letvalue{\??featurenop +}\addfeature
@@ -334,10 +337,20 @@
% also new
-\unexpanded\def\useaddfontfeatureparameter#1% faster local variant
- {\edef\m_font_feature_asked{#1\c!features}%
+\unexpanded\def\useaddfontfeatureparameter#namespace% faster local variant
+ {\edef\m_font_feature_asked{#namespace\c!features}%
\ifx\m_font_feature_asked\empty\else
\font_feature_add
\fi}
+% let's put this here:
+
+\unexpanded\def\slashedzero
+ {\dontleavehmode
+ \begingroup
+ %\addff{zero}
+ \font_feature_add_nop{zero}%
+ 0%
+ \endgroup}
+
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/font-fil.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-fil.mkvi
index 1a20d1cd84a..0bfc07b6c74 100644
--- a/Master/texmf-dist/tex/context/base/font-fil.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-fil.mkvi
@@ -191,21 +191,27 @@
\def\font_helpers_true_fontname#name*#first#rest*#crap\relax
{\ifcsname\??fontfile\fontclass#name\endcsname
\ifx#first\empty
- \expandafter\truefontname\csname\??fontfile\fontclass#name\endcsname
+ %\expandafter\truefontname\csname\??fontfile\fontclass#name\endcsname
+ \expandafter\truefontname\lastnamedcs
\else
- \expandafter\font_helpers_true_fontname_check\csname\??fontfile\fontclass#name\endcsname*#first#rest%
+ %\expandafter\font_helpers_true_fontname_check\csname\??fontfile\fontclass#name\endcsname*#first#rest%
+ \expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest%
\fi
\else\ifcsname\??fontfile\defaultfontclass#name\endcsname
\ifx#first\empty
- \expandafter\truefontname\csname\??fontfile\defaultfontclass#name\endcsname
+ %\expandafter\truefontname\csname\??fontfile\defaultfontclass#name\endcsname
+ \expandafter\truefontname\lastnamedcs
\else
- \expandafter\font_helpers_true_fontname_check\csname\??fontfile\defaultfontclass#name\endcsname*#first#rest%
+ %\expandafter\font_helpers_true_fontname_check\csname\??fontfile\defaultfontclass#name\endcsname*#first#rest%
+ \expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest%
\fi
\else\ifcsname\??fontfile#name\endcsname
\ifx#first\empty
- \expandafter\truefontname\csname\??fontfile#name\endcsname
+ %\expandafter\truefontname\csname\??fontfile#name\endcsname
+ \expandafter\truefontname\lastnamedcs
\else
- \expandafter\font_helpers_true_fontname_check\csname\??fontfile#name\endcsname*#first#rest%
+ %\expandafter\font_helpers_true_fontname_check\csname\??fontfile#name\endcsname*#first#rest%
+ \expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest%
\fi
\else
#name\ifx#first\empty\else*#first#rest\fi
@@ -216,20 +222,25 @@
\def\font_helpers_true_fontname_check_indeed#name*#crap\relax
{\ifcsname\??fontfile\fontclass#name\endcsname
- \expandafter\font_helpers_true_fontname_check\csname\??fontfile\fontclass#name\endcsname
+ %\expandafter\font_helpers_true_fontname_check\csname\??fontfile\fontclass#name\endcsname
+ \expandafter\font_helpers_true_fontname_check\lastnamedcs
\else\ifcsname\??fontfile\defaultfontclass#name\endcsname
- \expandafter\font_helpers_true_fontname_check\csname\??fontfile\defaultfontclass#name\endcsname
+ %\expandafter\font_helpers_true_fontname_check\csname\??fontfile\defaultfontclass#name\endcsname
+ \expandafter\font_helpers_true_fontname_check\lastnamedcs
\else\ifcsname\??fontfile#name\endcsname
- \expandafter\font_helpers_true_fontname_check\csname\??fontfile#name\endcsname
+ %\expandafter\font_helpers_true_fontname_check\csname\??fontfile#name\endcsname
+ \expandafter\font_helpers_true_fontname_check\lastnamedcs
\else
#name%
\fi\fi\fi}
\def\expandfontsynonym#command#name% one level expansion
{\ifcsname\??fontfile\fontclass#name\endcsname
- \expandafter\normaldef\expandafter#command\expandafter{\csname\??fontfile\fontclass#name\endcsname}%
+ %\expandafter\normaldef\expandafter#command\expandafter{\csname\??fontfile\fontclass#name\endcsname}%
+ \expandafter\normaldef\expandafter#command\expandafter{\lastnamedcs}%
\else\ifcsname\??fontfile\defaultfontclass#2\endcsname
- \expandafter\normaldef\expandafter#command\expandafter{\csname\??fontfile\defaultfontclass#name\endcsname}%
+ %\expandafter\normaldef\expandafter#command\expandafter{\csname\??fontfile\defaultfontclass#name\endcsname}%
+ \expandafter\normaldef\expandafter#command\expandafter{\lastnamedcs}%
\fi\fi}
\def\doifelsefontsynonym#name%
@@ -250,9 +261,11 @@
\def\tracedfontname#name%
{#name\ifcsname\??fontfile\fontclass#name\endcsname
- \expandafter\tracedfontname\csname\??fontfile\fontclass#name\endcsname
+ %\expandafter\tracedfontname\csname\??fontfile\fontclass#name\endcsname
+ \expandafter\tracedfontname\lastnamedcs
\else\ifcsname\??fontfile#name\endcsname
- \expandafter\tracedfontname\csname\??fontfile#name\endcsname
+ %\expandafter\tracedfontname\csname\??fontfile#name\endcsname
+ \expandafter\tracedfontname\lastnamedcs
\fi\fi}
%D \macros
@@ -266,7 +279,7 @@
\let\fontclass \empty
\let\defaultfontclass\empty
-\def\fontclassname#class#name%
+\def\fontclassname#class#name% tricky ... no lastnamedcs here due to nesting
{\ifcsname\??fontfile#class#name\endcsname
\fontclassname{#class}{\csname\??fontfile#class#name\endcsname}%
\else\ifcsname\??fontfile#name\endcsname
@@ -283,84 +296,132 @@
% without pre-expansion.
\def\font_helpers_update_font_class_parameters
- {\edef\m_font_class_direction {\ifcsname\??fontclass\fontclass\fontstyle\s!direction \endcsname\csname\??fontclass\fontclass\fontstyle\s!direction \endcsname\fi}%
- \edef\m_font_class_features {\ifcsname\??fontclass\fontclass\fontstyle\s!features \endcsname\csname\??fontclass\fontclass\fontstyle\s!features \endcsname\fi}%
- \edef\m_font_class_fallbacks {\ifcsname\??fontclass\fontclass\fontstyle\s!fallbacks \endcsname\csname\??fontclass\fontclass\fontstyle\s!fallbacks \endcsname\fi}%
- \edef\m_font_class_goodies {\ifcsname\??fontclass\fontclass\fontstyle\s!goodies \endcsname\csname\??fontclass\fontclass\fontstyle\s!goodies \endcsname\fi}%
- \edef\m_font_class_designsize{\ifcsname\??fontclass\fontclass\fontstyle\s!designsize\endcsname\csname\??fontclass\fontclass\fontstyle\s!designsize\endcsname\fi}}
+ {\edef\m_font_class_direction {\begincsname\??fontclass\fontclass\fontstyle\s!direction \endcsname}%
+ \edef\m_font_class_features {\begincsname\??fontclass\fontclass\fontstyle\s!features \endcsname}%
+ \edef\m_font_class_fallbacks {\begincsname\??fontclass\fontclass\fontstyle\s!fallbacks \endcsname}%
+ \edef\m_font_class_goodies {\begincsname\??fontclass\fontclass\fontstyle\s!goodies \endcsname}%
+ \edef\m_font_class_designsize{\begincsname\??fontclass\fontclass\fontstyle\s!designsize\endcsname}}
% resolve
+% \def\font_helpers_set_features_yes#name%
+% {\ifcsname\??fontfile\fontclass#name\s!features \endcsname \edef\m_font_features % class + symbolic_name
+% {\csname\??fontfile\fontclass#name\s!features \endcsname}\else
+% \ifcsname\??fontfile #name\s!features \endcsname \edef\m_font_features % symbolic_name
+% {\csname\??fontfile #name\s!features \endcsname}\else
+% \ifcsname\??fontfile\fontclass #name\endcsname\expandafter\font_helpers_set_features_yes % class + parent_name
+% \csname\??fontfile\fontclass #name\endcsname \else
+% \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_features_yes % parent_name
+% \csname\??fontfile #name\endcsname \else
+% \let\m_font_features\empty\fi\fi\fi\fi}
+%
+% \def\font_helpers_set_fallbacks_yes#name%
+% {\ifcsname\??fontfile\fontclass#name\s!fallbacks\endcsname \edef\m_font_fallbacks
+% {\csname\??fontfile\fontclass#name\s!fallbacks\endcsname}\else
+% \ifcsname\??fontfile #name\s!fallbacks\endcsname \edef\m_font_fallbacks
+% {\csname\??fontfile #name\s!fallbacks\endcsname}\else
+% \ifcsname\??fontfile\fontclass #name\endcsname \expandafter\font_helpers_set_fallbacks_yes
+% \csname\??fontfile\fontclass #name\endcsname \else
+% \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_fallbacks_yes
+% \csname\??fontfile #name\endcsname \else
+% \let\m_font_fallbacks\empty\fi\fi\fi\fi}
+%
+% \def\font_helpers_set_goodies_yes#name%
+% {\ifcsname\??fontfile\fontclass#name\s!goodies \endcsname \edef\m_font_goodies
+% {\csname\??fontfile\fontclass#name\s!goodies \endcsname}\else
+% \ifcsname\??fontfile #name\s!goodies \endcsname \edef\m_font_goodies
+% {\csname\??fontfile #name\s!goodies \endcsname}\else
+% \ifcsname\??fontfile\fontclass #name\endcsname \expandafter\font_helpers_set_goodies_yes
+% \csname\??fontfile\fontclass #name\endcsname \else
+% \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_goodies_yes
+% \csname\??fontfile #name\endcsname \else
+% \let\m_font_goodies\empty\fi\fi\fi\fi}
+%
+% \def\font_helpers_set_designsize_yes#name%
+% {\ifcsname\??fontfile\fontclass#name\s!designsize\endcsname \edef\m_font_designsize
+% {\csname\??fontfile\fontclass#name\s!designsize\endcsname}\else
+% \ifcsname\??fontfile #name\s!designsize\endcsname \edef\m_font_designsize
+% {\csname\??fontfile #name\s!designsize\endcsname}\else
+% \ifcsname\??fontfile\fontclass #name\endcsname \expandafter\font_helpers_set_designsize_yes
+% \csname\??fontfile\fontclass #name\endcsname \else
+% \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_designsize_yes
+% \csname\??fontfile #name\endcsname \else
+% \let\m_font_designsize\empty\fi\fi\fi\fi}
+%
+% \def\font_helpers_set_features_nop#name%
+% {\ifcsname\??fontfile#name\s!features \endcsname \edef\m_font_features
+% {\csname\??fontfile#name\s!features \endcsname}\else
+% \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_features_nop
+% \csname\??fontfile #name\endcsname \else
+% \let\m_font_features\empty\fi\fi}
+%
+% \def\font_helpers_set_fallbacks_nop#name%
+% {\ifcsname\??fontfile#name\s!fallbacks\endcsname \edef\m_font_fallbacks
+% {\csname\??fontfile#name\s!fallbacks\endcsname}\else
+% \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_fallbacks_nop
+% \csname\??fontfile #name\endcsname \else
+% \let\m_font_fallbacks\empty\fi\fi}
+%
+% \def\font_helpers_set_goodies_nop#name%
+% {\ifcsname\??fontfile#name\s!goodies \endcsname \edef\m_font_goodies
+% {\csname\??fontfile#name\s!goodies \endcsname}\else
+% \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_goodies_nop
+% \csname\??fontfile #name\endcsname \else
+% \let\m_font_goodies\empty\fi\fi}
+%
+% \def\font_helpers_set_designsize_nop#name%
+% {\ifcsname\??fontfile#name\s!designsize\endcsname \edef\m_font_designsize
+% {\csname\??fontfile#name\s!designsize\endcsname}\else
+% \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_designsize_nop
+% \csname\??fontfile #name\endcsname \else
+% \let\m_font_designsize\empty\fi\fi}
+
\def\font_helpers_set_features_yes#name%
- {\ifcsname\??fontfile\fontclass#name\s!features \endcsname \edef\m_font_features % class + symbolic_name
- {\csname\??fontfile\fontclass#name\s!features \endcsname}\else
- \ifcsname\??fontfile #name\s!features \endcsname \edef\m_font_features % symbolic_name
- {\csname\??fontfile #name\s!features \endcsname}\else
- \ifcsname\??fontfile\fontclass #name\endcsname\expandafter\font_helpers_set_features_yes % class + parent_name
- \csname\??fontfile\fontclass #name\endcsname \else
- \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_features_yes % parent_name
- \csname\??fontfile #name\endcsname \else
+ {\ifcsname\??fontfile\fontclass#name\s!features\endcsname \edef\m_font_features{\lastnamedcs}\else % class + symbolic_name
+ \ifcsname\??fontfile #name\s!features\endcsname \edef\m_font_features{\lastnamedcs}\else % symbolic_name
+ \ifcsname\??fontfile\fontclass#name\endcsname \expandafter\font_helpers_set_features_yes\lastnamedcs \else % class + parent_name
+ \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_features_yes\lastnamedcs \else % parent_name
\let\m_font_features\empty\fi\fi\fi\fi}
\def\font_helpers_set_fallbacks_yes#name%
- {\ifcsname\??fontfile\fontclass#name\s!fallbacks\endcsname \edef\m_font_fallbacks
- {\csname\??fontfile\fontclass#name\s!fallbacks\endcsname}\else
- \ifcsname\??fontfile #name\s!fallbacks\endcsname \edef\m_font_fallbacks
- {\csname\??fontfile #name\s!fallbacks\endcsname}\else
- \ifcsname\??fontfile\fontclass #name\endcsname \expandafter\font_helpers_set_fallbacks_yes
- \csname\??fontfile\fontclass #name\endcsname \else
- \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_fallbacks_yes
- \csname\??fontfile #name\endcsname \else
+ {\ifcsname\??fontfile\fontclass#name\s!fallbacks\endcsname \edef\m_font_fallbacks{\lastnamedcs}\else
+ \ifcsname\??fontfile #name\s!fallbacks\endcsname \edef\m_font_fallbacks{\lastnamedcs}\else
+ \ifcsname\??fontfile\fontclass#name\endcsname \expandafter\font_helpers_set_fallbacks_yes\lastnamedcs \else
+ \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_fallbacks_yes\lastnamedcs \else
\let\m_font_fallbacks\empty\fi\fi\fi\fi}
\def\font_helpers_set_goodies_yes#name%
- {\ifcsname\??fontfile\fontclass#name\s!goodies \endcsname \edef\m_font_goodies
- {\csname\??fontfile\fontclass#name\s!goodies \endcsname}\else
- \ifcsname\??fontfile #name\s!goodies \endcsname \edef\m_font_goodies
- {\csname\??fontfile #name\s!goodies \endcsname}\else
- \ifcsname\??fontfile\fontclass #name\endcsname \expandafter\font_helpers_set_goodies_yes
- \csname\??fontfile\fontclass #name\endcsname \else
- \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_goodies_yes
- \csname\??fontfile #name\endcsname \else
+ {\ifcsname\??fontfile\fontclass#name\s!goodies \endcsname \edef\m_font_goodies{\lastnamedcs}\else
+ \ifcsname\??fontfile #name\s!goodies \endcsname \edef\m_font_goodies{\lastnamedcs}\else
+ \ifcsname\??fontfile\fontclass#name\endcsname \expandafter\font_helpers_set_goodies_yes\lastnamedcs \else
+ \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_goodies_yes\lastnamedcs \else
\let\m_font_goodies\empty\fi\fi\fi\fi}
\def\font_helpers_set_designsize_yes#name%
- {\ifcsname\??fontfile\fontclass#name\s!designsize\endcsname \edef\m_font_designsize
- {\csname\??fontfile\fontclass#name\s!designsize\endcsname}\else
- \ifcsname\??fontfile #name\s!designsize\endcsname \edef\m_font_designsize
- {\csname\??fontfile #name\s!designsize\endcsname}\else
- \ifcsname\??fontfile\fontclass #name\endcsname \expandafter\font_helpers_set_designsize_yes
- \csname\??fontfile\fontclass #name\endcsname \else
- \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_designsize_yes
- \csname\??fontfile #name\endcsname \else
+ {\ifcsname\??fontfile\fontclass#name\s!designsize\endcsname \edef\m_font_designsize{\lastnamedcs}\else
+ \ifcsname\??fontfile #name\s!designsize\endcsname \edef\m_font_designsize{\lastnamedcs}\else
+ \ifcsname\??fontfile\fontclass#name\endcsname \expandafter\font_helpers_set_designsize_yes\lastnamedcs \else
+ \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_designsize_yes\lastnamedcs \else
\let\m_font_designsize\empty\fi\fi\fi\fi}
\def\font_helpers_set_features_nop#name%
- {\ifcsname\??fontfile#name\s!features \endcsname \edef\m_font_features
- {\csname\??fontfile#name\s!features \endcsname}\else
- \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_features_nop
- \csname\??fontfile #name\endcsname \else
+ {\ifcsname\??fontfile#name\s!features\endcsname \edef\m_font_features{\lastnamedcs}\else
+ \ifcsname\??fontfile#name\endcsname \expandafter\font_helpers_set_features_nop\lastnamedcs \else
\let\m_font_features\empty\fi\fi}
\def\font_helpers_set_fallbacks_nop#name%
- {\ifcsname\??fontfile#name\s!fallbacks\endcsname \edef\m_font_fallbacks
- {\csname\??fontfile#name\s!fallbacks\endcsname}\else
- \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_fallbacks_nop
- \csname\??fontfile #name\endcsname \else
+ {\ifcsname\??fontfile#name\s!fallbacks\endcsname \edef\m_font_fallbacks{\lastnamedcs}\else
+ \ifcsname\??fontfile#name\endcsname \expandafter\font_helpers_set_fallbacks_nop\lastnamedcs \else
\let\m_font_fallbacks\empty\fi\fi}
\def\font_helpers_set_goodies_nop#name%
- {\ifcsname\??fontfile#name\s!goodies \endcsname \edef\m_font_goodies
- {\csname\??fontfile#name\s!goodies \endcsname}\else
- \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_goodies_nop
- \csname\??fontfile #name\endcsname \else
+ {\ifcsname\??fontfile#name\s!goodies\endcsname \edef\m_font_goodies{\lastnamedcs}\else
+ \ifcsname\??fontfile#name\endcsname \expandafter\font_helpers_set_goodies_nop\lastnamedcs \else
\let\m_font_goodies\empty\fi\fi}
\def\font_helpers_set_designsize_nop#name%
- {\ifcsname\??fontfile#name\s!designsize\endcsname \edef\m_font_designsize
- {\csname\??fontfile#name\s!designsize\endcsname}\else
- \ifcsname\??fontfile #name\endcsname \expandafter\font_helpers_set_designsize_nop
- \csname\??fontfile #name\endcsname \else
+ {\ifcsname\??fontfile#name\s!designsize\endcsname \edef\m_font_designsize{\lastnamedcs}\else
+ \ifcsname\??fontfile#name\endcsname \expandafter\font_helpers_set_designsize_nop\lastnamedcs \else
\let\m_font_designsize\empty\fi\fi}
\def\font_helpers_update_font_parameters_yes
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-gbn.lua b/Master/texmf-dist/tex/context/base/mkiv/font-gbn.lua
new file mode 100644
index 00000000000..daa072b4bc2
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-gbn.lua
@@ -0,0 +1,255 @@
+if not modules then modules = { } end modules ['font-gbn'] = {
+ version = 1.001,
+ comment = "companion to luatex-*.tex",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- generic [base|node] mode handler
+
+if context then
+ texio.write_nl("fatal error: this module is not for context")
+ os.exit()
+end
+
+local fonts = fonts
+local nodes = nodes
+
+local nuts = nodes.nuts -- context abstraction of direct nodes
+
+local traverse_id = nuts.traverse_id
+local remove_node = nuts.remove
+local free_node = nuts.free
+
+local glyph_code = nodes.nodecodes.glyph
+local disc_code = nodes.nodecodes.disc
+
+local tonode = nuts.tonode
+local tonut = nuts.tonut
+
+local getfont = nuts.getfont
+local getchar = nuts.getchar
+local getid = nuts.getid
+local getboth = nuts.getboth
+local getprev = nuts.getprev
+local getnext = nuts.getnext
+local getdisc = nuts.getdisc
+local setchar = nuts.setchar
+local setlink = nuts.setlink
+local setprev = nuts.setprev
+
+-- from now on we apply ligaturing and kerning here because it might interfere with complex
+-- opentype discretionary handling where the base ligature pass expect some weird extra
+-- pointers (which then confuse the tail slider that has some checking built in)
+
+local n_ligaturing = node.ligaturing
+local n_kerning = node.kerning
+
+local ligaturing = nuts.ligaturing
+local kerning = nuts.kerning
+
+local basemodepass = true
+
+local function l_warning() texio.write_nl("warning: node.ligaturing called directly") l_warning = nil end
+local function k_warning() texio.write_nl("warning: node.kerning called directly") k_warning = nil end
+
+function node.ligaturing(...)
+ if basemodepass and l_warning then
+ l_warning()
+ end
+ return n_ligaturing(...)
+end
+
+function node.kerning(...)
+ if basemodepass and k_warning then
+ k_warning()
+ end
+ return n_kerning(...)
+end
+
+function nodes.handlers.setbasemodepass(v)
+ basemodepass = v
+end
+
+function nodes.handlers.nodepass(head)
+ local fontdata = fonts.hashes.identifiers
+ if fontdata then
+ local nuthead = tonut(head)
+ local usedfonts = { }
+ local basefonts = { }
+ local prevfont = nil
+ local basefont = nil
+ local variants = nil
+ local redundant = nil
+ for n in traverse_id(glyph_code,nuthead) do
+ local font = getfont(n)
+ if font ~= prevfont then
+ if basefont then
+ basefont[2] = getprev(n)
+ end
+ prevfont = font
+ local used = usedfonts[font]
+ if not used then
+ local tfmdata = fontdata[font] --
+ if tfmdata then
+ local shared = tfmdata.shared -- we need to check shared, only when same features
+ if shared then
+ local processors = shared.processes
+ if processors and #processors > 0 then
+ usedfonts[font] = processors
+ elseif basemodepass then
+ basefont = { n, nil }
+ basefonts[#basefonts+1] = basefont
+ end
+ end
+ local resources = tfmdata.resources
+ variants = resources and resources.variants
+ variants = variants and next(variants) and variants or false
+ end
+ else
+ local tfmdata = fontdata[prevfont]
+ if tfmdata then
+ local resources = tfmdata.resources
+ variants = resources and resources.variants
+ variants = variants and next(variants) and variants or false
+ end
+ end
+ end
+ if variants then
+ local char = getchar(n)
+ if char >= 0xFE00 and (char <= 0xFE0F or (char >= 0xE0100 and char <= 0xE01EF)) then
+ local hash = variants[char]
+ if hash then
+ local p = getprev(n)
+ if p and getid(p) == glyph_code then
+ local variant = hash[getchar(p)]
+ if variant then
+ setchar(p,variant)
+ if not redundant then
+ redundant = { n }
+ else
+ redundant[#redundant+1] = n
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ if redundant then
+ for i=1,#redundant do
+ local r = redundant[i]
+ local p, n = getboth(r)
+ if r == nuthead then
+ nuthead = n
+ setprev(n)
+ else
+ setlink(p,n)
+ end
+ if b > 0 then
+ for i=1,b do
+ local bi = basefonts[i]
+ if r == bi[1] then
+ bi[1] = n
+ end
+ if r == bi[2] then
+ bi[2] = n
+ end
+ end
+ end
+ free_node(r)
+ end
+ end
+ for d in traverse_id(disc_code,nuthead) do
+ local _, _, r = getdisc(d)
+ if r then
+ for n in traverse_id(glyph_code,r) do
+ local font = getfont(n)
+ if font ~= prevfont then
+ prevfont = font
+ local used = usedfonts[font]
+ if not used then
+ local tfmdata = fontdata[font] --
+ if tfmdata then
+ local shared = tfmdata.shared -- we need to check shared, only when same features
+ if shared then
+ local processors = shared.processes
+ if processors and #processors > 0 then
+ usedfonts[font] = processors
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ if next(usedfonts) then
+ for font, processors in next, usedfonts do
+ for i=1,#processors do
+ head = processors[i](head,font,0) or head
+ end
+ end
+ end
+ if basemodepass and #basefonts > 0 then
+ for i=1,#basefonts do
+ local range = basefonts[i]
+ local start = range[1]
+ local stop = range[2]
+ if start then
+ local front = nuthead == start
+ local prev, next
+ if stop then
+ next = getnext(stop)
+ start, stop = ligaturing(start,stop)
+ start, stop = kerning(start,stop)
+ else
+ prev = getprev(start)
+ start = ligaturing(start)
+ start = kerning(start)
+ end
+ if prev then
+ setlink(prev,start)
+ end
+ if next then
+ setlink(stop,next)
+ end
+ if front and nuthead ~= start then
+ head = tonode(start)
+ end
+ end
+ end
+ end
+ return head, true
+ else
+ return head, false
+ end
+end
+
+function nodes.handlers.basepass(head)
+ if not basemodepass then
+ head = n_ligaturing(head)
+ head = n_kerning(head)
+ end
+ return head, true
+end
+
+local nodepass = nodes.handlers.nodepass
+local basepass = nodes.handlers.basepass
+local injectpass = nodes.injections.handler
+local protectpass = nodes.handlers.protectglyphs
+
+function nodes.simple_font_handler(head)
+ if head then
+ head = nodepass(head)
+ head = injectpass(head)
+ if not basemodepass then
+ head = basepass(head)
+ end
+ protectpass(head)
+ return head, true
+ else
+ return head, false
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/font-gds.lua b/Master/texmf-dist/tex/context/base/mkiv/font-gds.lua
index 073d9ed57d1..23bbad42f63 100644
--- a/Master/texmf-dist/tex/context/base/font-gds.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-gds.lua
@@ -91,6 +91,9 @@ local function loadgoodies(filename) -- maybe a merge is better
end
goodies.name = goodies.name or "no name"
for name, fnc in next, list do
+ if trace_goodies then
+ report_goodies("handling goodie %a",name)
+ end
fnc(goodies)
end
goodies.initialized = true
@@ -444,6 +447,24 @@ local function setextrafeatures(tfmdata)
end
end
+local function setextensions(tfmdata)
+ local goodies = tfmdata.goodies
+ if goodies then
+ for i=1,#goodies do
+ local g = goodies[i]
+ local e = g.extensions
+ if e then
+ local goodie = g.name or "unknown"
+ for i=1,#e do
+ local name = "extension-" .. i
+ -- report_goodies("adding extension %s from %s",name,goodie)
+ otf.enhancers.addfeature(tfmdata.shared.rawdata,name,e[i])
+ end
+ end
+ end
+ end
+end
+
-- installation (collected to keep the overview) -- also for type 1
registerotffeature {
@@ -468,6 +489,17 @@ registerotffeature {
}
registerotffeature {
+ name = "extensions",
+ description = "extensions to features",
+ default = true,
+ initializers = {
+ position = 2,
+ base = setextensions,
+ node = setextensions,
+ }
+}
+
+registerotffeature {
name = "featureset",
description = "goodie feature set",
initializers = {
@@ -563,8 +595,8 @@ fontgoodies.register("mathematics", initialize)
-- },
-- }
--- math italics
-
+-- math italics (not rteally needed)
+--
-- it would be nice to have a \noitalics\font option
local function initialize(tfmdata)
@@ -576,56 +608,44 @@ local function initialize(tfmdata)
local mathitalics = mathgoodies and mathgoodies.italics
if mathitalics then
local properties = tfmdata.properties
- mathitalics = mathitalics[file.nameonly(properties.name)] or mathitalics
- if mathitalics then
- if trace_goodies then
- report_goodies("loading mathitalics for font %a",properties.name)
- end
- local corrections = mathitalics.corrections
- local defaultfactor = mathitalics.defaultfactor
- local disableengine = mathitalics.disableengine
- properties.hasitalics = true
- properties.mathitalic_defaultfactor = defaultfactor -- we inherit outer one anyway (name will change)
- if properties.mathitalics == nil then
- properties.mathitalics = disableengine
- end
- if corrections then
- -- As we want to set italic_correction (the context one) we need a
- -- postprocessor instead of messing with the (unscaled) descriptions.
- fontgoodies.registerpostprocessor(tfmdata, function(tfmdata) -- this is another tfmdata (a copy)
- -- better make a helper so that we have less code being defined
- local properties = tfmdata.properties
- local parameters = tfmdata.parameters
- local characters = tfmdata.characters
- properties.hasitalics = true
- properties.mathitalic_defaultfactor = defaultfactor
- properties.mathitalic_defaultvalue = defaultfactor * parameters.quad
- if properties.mathitalics == nil then
- properties.mathitalics = disableengine
- end
- if trace_goodies then
- report_goodies("assigning mathitalics for font %a",properties.name)
- end
- local mathitalics = properties.mathitalics
- local quad = parameters.quad
- local hfactor = parameters.hfactor
- for k, v in next, corrections do
- local c = characters[k]
- if v > -1 and v < 1 then
- v = v * quad
- else
- v = v * hfactor
+ if properties.setitalics then
+ mathitalics = mathitalics[file.nameonly(properties.name)] or mathitalics
+ if mathitalics then
+ if trace_goodies then
+ report_goodies("loading mathitalics for font %a",properties.name)
+ end
+ local corrections = mathitalics.corrections
+ local defaultfactor = mathitalics.defaultfactor
+ -- properties.mathitalic_defaultfactor = defaultfactor -- we inherit outer one anyway (name will change)
+ if corrections then
+ fontgoodies.registerpostprocessor(tfmdata, function(tfmdata) -- this is another tfmdata (a copy)
+ -- better make a helper so that we have less code being defined
+ local properties = tfmdata.properties
+ local parameters = tfmdata.parameters
+ local characters = tfmdata.characters
+ properties.mathitalic_defaultfactor = defaultfactor
+ properties.mathitalic_defaultvalue = defaultfactor * parameters.quad
+ if trace_goodies then
+ report_goodies("assigning mathitalics for font %a",properties.name)
end
- c.italic_correction = v -- for context
- if mathitalics then
- c.italic = v -- for tex
- else
- c.italic = nil
+ local quad = parameters.quad
+ local hfactor = parameters.hfactor
+ for k, v in next, corrections do
+ local c = characters[k]
+ if c then
+ if v > -1 and v < 1 then
+ c.italic = v * quad
+ else
+ c.italic = v * hfactor
+ end
+ else
+ report_goodies("invalid mathitalics entry %U for font %a",k,properties.name)
+ end
end
- end
- end)
+ end)
+ end
+ return -- maybe not as these can accumulate
end
- return -- maybe not as these can accumulate
end
end
end
@@ -793,23 +813,21 @@ function fontgoodies.designsizes.register(name,size,specification)
end
function fontgoodies.designsizes.filename(name,spec,size) -- returns nil of no match
- if spec and spec ~= "" then
- local data = designdata[lower(name)]
- if data then
- if spec == "default" then
- return data.default
- elseif spec == "auto" then
- local ranges = data.ranges
- if ranges then
- for i=1,#ranges do
- local r = ranges[i]
- if r[1] >= size then -- todo: rounding so maybe size - 100
- return r[2]
- end
+ local data = designdata[lower(name)]
+ if data then
+ if not spec or spec == "" or spec == "default" then
+ return data.default
+ elseif spec == "auto" then
+ local ranges = data.ranges
+ if ranges then
+ for i=1,#ranges do
+ local r = ranges[i]
+ if r[1] >= size then -- todo: rounding so maybe size - 100
+ return r[2]
end
end
- return data.default or (ranges and ranges[#ranges][2])
end
+ return data.default or (ranges and ranges[#ranges][2])
end
end
end
@@ -829,13 +847,15 @@ end
implement {
name = "loadfontgoodies",
actions = fontgoodies.load,
- arguments = "string"
+ arguments = "string",
+ overload = true, -- for now, permits new font loader
}
implement {
name = "enablefontcolorschemes",
onlyonce = true,
- actions = colorschemes.enable
+ actions = colorschemes.enable,
+ overload = true, -- for now, permits new font loader
}
-- weird place ... depends on math
diff --git a/Master/texmf-dist/tex/context/base/font-gds.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-gds.mkvi
index e9c34e807af..e9c34e807af 100644
--- a/Master/texmf-dist/tex/context/base/font-gds.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-gds.mkvi
diff --git a/Master/texmf-dist/tex/context/base/font-hsh.lua b/Master/texmf-dist/tex/context/base/mkiv/font-hsh.lua
index 07acf2138c7..efd042fe162 100644
--- a/Master/texmf-dist/tex/context/base/font-hsh.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-hsh.lua
@@ -37,6 +37,7 @@ local dynamics = hashes.dynamics or allocate()
local unicodes = hashes.unicodes or allocate()
local originals = hashes.originals or allocate()
local modes = hashes.modes or allocate()
+local variants = hashes.variants or allocate()
hashes.characters = characters
hashes.descriptions = descriptions
@@ -56,6 +57,7 @@ hashes.dynamics = dynamics
hashes.unicodes = unicodes
hashes.originals = originals
hashes.modes = modes
+hashes.variants = variants
local nodepool = nodes.pool
local dummyglyph = nodepool.register(nodepool.glyph())
@@ -94,6 +96,26 @@ setmetatableindex(identifiers, function(t,k)
return k == true and identifiers[currentfont()] or nulldata
end)
+do
+
+ -- to be used
+
+ local define = font.define
+ local setfont = font.setfont
+ local frozen = font.frozen
+
+ function fonts.reserveid(fontdata)
+ return define(fontdata or nulldata)
+ end
+
+ function fonts.enhanceid(id,fontdata)
+ if not frozen(id) then
+ setfont(id,fontdata)
+ end
+ end
+
+end
+
setmetatableindex(characters, function(t,k)
if k == true then
return characters[currentfont()]
@@ -303,6 +325,25 @@ setmetatableindex(modes, function(t,k)
end
end)
+setmetatableindex(variants, function(t,k)
+ if k == true then
+ return variants[currentfont()]
+ else
+ local resources = resources[k]
+ if resources then
+ local variants = resources.variants
+ if variants and next(variants) then
+ t[k] = variants
+ return variants
+ end
+ end
+ t[k] = false
+ return false
+ end
+end)
+
function font.getfont(id)
return identifiers[id]
end
+
+font.setfont = currentfont -- bah, no native 'setfont' as name
diff --git a/Master/texmf-dist/tex/context/base/font-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ini.lua
index c547f89acf9..c547f89acf9 100644
--- a/Master/texmf-dist/tex/context/base/font-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-ini.lua
diff --git a/Master/texmf-dist/tex/context/base/font-ini.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-ini.mkvi
index c04952a9e89..7e5851b2601 100644
--- a/Master/texmf-dist/tex/context/base/font-ini.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-ini.mkvi
@@ -382,27 +382,18 @@
\unexpanded\def\stopfont {\endgroup}
%D \macros
-%D {everybodyfont,Everybodyfont,everyglobalbodyfont}
+%D {everybodyfont,everyglobalbodyfont}
%D
%D Every change in bodyfont size has conseqences for the baseline
%D distance and skips between paragraphs. These are initialized
%D in other modules. Here we only provide the hooks that
%D garantees their handling.
-
+%D
%D At the system level one can initialize thing like:
%D
%D \starttyping
%D \appendtoks \setupspacing \to \everybodyfont
%D \stoptyping
-%D
-%D While users can add their own non standard commands like:
-%D
-%D \starttyping
-%D \EveryBodyFont{\message{changing to bodyfont \the\bodyfontsize}}
-%D \stoptyping
-%D
-%D Personnaly I never felt the need for such extensions, but
-%D at least its possible.
%D \macros
%D {globalbodyfontsize,localbodyfontsize,bodyfontsize}
@@ -495,7 +486,7 @@
\def\font_basics_set_mapped_fontsize#from%
{\ifcsname\??mappedfontsize\the\dimexpr#from\relax\endcsname
- \csname\??mappedfontsize\the\dimexpr#from\relax\endcsname\else#from%
+ \lastnamedcs\else#from%
\fi}
\installcorenamespace{fontbodyknown}
@@ -519,9 +510,9 @@
\def\font_helpers_check_relative_font_size#style%
{\edef\p_font_rscale
{\ifcsname\??fontclass\fontclass#style\s!rscale\endcsname
- \csname\??fontclass\fontclass#style\s!rscale\endcsname
+ \lastnamedcs
\else\ifcsname\??fontclass\defaultfontclass#style\s!rscale\endcsname % brr
- \csname\??fontclass\defaultfontclass#style\s!rscale\endcsname
+ \lastnamedcs
\else
\v_font_rscale_default
\fi\fi}%
@@ -535,14 +526,14 @@
\def\font_rscale_xx#style%
{\ifcsname\??fontclass\fontclass#style\s!rscale\endcsname
- \csname\??fontclass\fontclass#style\s!rscale\endcsname
+ \lastnamedcs
\else
\v_font_rscale_default
\fi}
\def\font_rscale_mm
{\ifcsname\??fontclass\fontclass\s!mm\s!rscale\endcsname
- \csname\??fontclass\fontclass\s!mm\s!rscale\endcsname
+ \lastnamedcs
\else
\v_font_rscale_default
\fi}
@@ -592,8 +583,8 @@
\def\font_basics_define_fontstyle[#commands][#style]% style: rm ss tt ...
{\ifcsname\??fontstyleknown#style\endcsname \else % can be delayed till used (cg, hw)
\font_helpers_register_style{#style}%
- \t_font_style_commands\expandafter{\the\t_font_style_commands
- \m_font_style_command{#style}}%
+ % todo: apptoks
+ \t_font_style_commands\expandafter{\the\t_font_style_commands\m_font_style_command{#style}}%
\fi
\processcommalist[#commands]{\font_basics_define_fontstyle_indeed{#style}}}
@@ -612,6 +603,7 @@
\unexpanded\def\definefontalternative[#alternative]%
{\ifcsname\??fontalternativeknown#alternative\endcsname \else
\font_helpers_register_alternative{#alternative}%
+ % todo: apptoks
\t_font_alternative_commands\expandafter{\the\t_font_alternative_commands
\m_font_alternative_command{#alternative}}%
\fi
@@ -830,22 +822,46 @@
\fi
\c_font_feature_inheritance_mode\c_font_feature_inheritance_default}
+% \def\font_helpers_check_body_scale#fontsize% gets character (x xx a etc)
+% {\ifcsname\??fontenvironments\fontclass\fontbody #fontsize\endcsname \setfalse\c_font_body_scale \expandafter\let\expandafter\f_font_body_scale
+% \csname\??fontenvironments\fontclass\fontbody #fontsize\endcsname \else
+% \ifcsname\??fontenvironments\fontclass\s!default#fontsize\endcsname \settrue \c_font_body_scale \expandafter\let\expandafter\f_font_body_scale
+% \csname\??fontenvironments\fontclass\s!default#fontsize\endcsname \else
+% \ifcsname\??fontenvironments \fontbody #fontsize\endcsname \setfalse\c_font_body_scale \expandafter\let\expandafter\f_font_body_scale
+% \csname\??fontenvironments \fontbody #fontsize\endcsname \else
+% \ifcsname\??fontenvironments \s!default#fontsize\endcsname \settrue \c_font_body_scale \expandafter\let\expandafter\f_font_body_scale
+% \csname\??fontenvironments \s!default#fontsize\endcsname \else
+% \ifcsname\??fontenvironments\fontclass\s!default\s!text \endcsname \settrue \c_font_body_scale \expandafter\let\expandafter\f_font_body_scale
+% \csname\??fontenvironments\fontclass\s!default\s!text \endcsname \else
+% \ifcsname\??fontenvironments \s!default\s!text \endcsname \settrue \c_font_body_scale \expandafter\let\expandafter\f_font_body_scale
+% \csname\??fontenvironments \s!default\s!text \endcsname
+% \else
+% \settrue \c_font_body_scale
+% \let\f_font_body_scale\plusone
+% \fi\fi\fi\fi\fi\fi}
+
\def\font_helpers_check_body_scale#fontsize% gets character (x xx a etc)
- {\ifcsname\??fontenvironments\fontclass\fontbody #fontsize\endcsname \setfalse\c_font_body_scale \expandafter\let\expandafter\f_font_body_scale
- \csname\??fontenvironments\fontclass\fontbody #fontsize\endcsname \else
- \ifcsname\??fontenvironments\fontclass\s!default#fontsize\endcsname \settrue \c_font_body_scale \expandafter\let\expandafter\f_font_body_scale
- \csname\??fontenvironments\fontclass\s!default#fontsize\endcsname \else
- \ifcsname\??fontenvironments \fontbody #fontsize\endcsname \setfalse\c_font_body_scale \expandafter\let\expandafter\f_font_body_scale
- \csname\??fontenvironments \fontbody #fontsize\endcsname \else
- \ifcsname\??fontenvironments \s!default#fontsize\endcsname \settrue \c_font_body_scale \expandafter\let\expandafter\f_font_body_scale
- \csname\??fontenvironments \s!default#fontsize\endcsname \else
- \ifcsname\??fontenvironments\fontclass\s!default\s!text \endcsname \settrue \c_font_body_scale \expandafter\let\expandafter\f_font_body_scale
- \csname\??fontenvironments\fontclass\s!default\s!text \endcsname \else
- \ifcsname\??fontenvironments \s!default\s!text \endcsname \settrue \c_font_body_scale \expandafter\let\expandafter\f_font_body_scale
- \csname\??fontenvironments \s!default\s!text \endcsname
+ {\ifcsname\??fontenvironments\fontclass\fontbody#fontsize\endcsname
+ \expandafter\let\expandafter\f_font_body_scale\lastnamedcs
+ \setfalse\c_font_body_scale % !
+ \else\ifcsname\??fontenvironments\fontclass\s!default#fontsize\endcsname
+ \expandafter\let\expandafter\f_font_body_scale\lastnamedcs
+ \settrue\c_font_body_scale
+ \else\ifcsname\??fontenvironments\fontbody#fontsize\endcsname
+ \expandafter\let\expandafter\f_font_body_scale\lastnamedcs
+ \setfalse\c_font_body_scale % !
+ \else\ifcsname\??fontenvironments\s!default#fontsize\endcsname
+ \expandafter\let\expandafter\f_font_body_scale\lastnamedcs
+ \settrue\c_font_body_scale
+ \else\ifcsname\??fontenvironments\fontclass\s!default\s!text\endcsname
+ \expandafter\let\expandafter\f_font_body_scale\lastnamedcs
+ \settrue\c_font_body_scale
+ \else\ifcsname\??fontenvironments\s!default\s!text\endcsname
+ \expandafter\let\expandafter\f_font_body_scale\lastnamedcs
+ \settrue\c_font_body_scale
\else
- \settrue \c_font_body_scale
\let\f_font_body_scale\plusone
+ \settrue\c_font_body_scale
\fi\fi\fi\fi\fi\fi}
%D The following macros are used at the \LUA\ end. Watch the \type {\normal}
@@ -1023,11 +1039,20 @@
% \ifcsname\??fontenvironments\s!default\s!text \endcsname \s!text \fi\fi
% \endcsname}
+% \def\currentfontbodysize % gets number (the normal sa 1 etc)
+% {\ifcsname\??fontenvironments\fontclass\s!default\somefontsize\endcsname
+% \csname\??fontenvironments\fontclass\s!default\somefontsize\endcsname
+% \else\ifcsname\??fontenvironments\s!default\somefontsize\endcsname
+% \csname\??fontenvironments\s!default\somefontsize\endcsname
+% \else
+% \somefontsize
+% \fi\fi}
+
\def\currentfontbodysize % gets number (the normal sa 1 etc)
{\ifcsname\??fontenvironments\fontclass\s!default\somefontsize\endcsname
- \csname\??fontenvironments\fontclass\s!default\somefontsize\endcsname
+ \lastnamedcs
\else\ifcsname\??fontenvironments\s!default\somefontsize\endcsname
- \csname\??fontenvironments\s!default\somefontsize\endcsname
+ \lastnamedcs
\else
\somefontsize
\fi\fi}
@@ -1041,6 +1066,13 @@
\s!default \fi\fi\fi\fi
\endcsname}
+\def\font_currentfontbodyscale % gets character (x xx a etc)
+ {\ifcsname\??fontenvironments\fontclass\s!default\fontsize\endcsname\lastnamedcs\else
+ \ifcsname\??fontenvironments \s!default\fontsize\endcsname\lastnamedcs\else
+ \ifcsname\??fontenvironments\fontclass\s!default\s!text \endcsname\lastnamedcs\else
+ \ifcsname\??fontenvironments \s!default\s!text \endcsname\lastnamedcs\else
+ \csname\??fontenvironments \s!default \endcsname \fi\fi\fi\fi}
+
\def\currentfontscale % used in default definition
{\csname\??fontenvironments
\ifcsname\??fontenvironments\fontclass\s!default\xfontsize\endcsname\fontclass\s!default\fontsize\else
@@ -1050,6 +1082,13 @@
\s!default \fi\fi\fi\fi
\endcsname}
+\def\font_currentfontscale % used in default definition
+ {\ifcsname\??fontenvironments\fontclass\s!default\xfontsize\endcsname\lastnamedcs\else
+ \ifcsname\??fontenvironments \s!default\xfontsize\endcsname\lastnamedcs\else
+ \ifcsname\??fontenvironments\fontclass\s!default\s!text \endcsname\lastnamedcs\else
+ \ifcsname\??fontenvironments \s!default\s!text \endcsname\lastnamedcs\else
+ \csname\??fontenvironments \s!default \endcsname \fi\fi\fi\fi}
+
\setvalue{\??fontenvironments\s!default}{1}
%D In the following macros we use \type{\currentxfontsize} to
@@ -1159,6 +1198,12 @@
\ifcsname\??fontenvironments\s!default #parameter\endcsname\s!default #parameter\fi\fi\fi\fi
\endcsname}
+\def\font_bodyfontvariable#parameter%
+ {\ifcsname\??fontenvironments\fontclass\normalizedbodyfontsize#parameter\endcsname\lastnamedcs\else
+ \ifcsname\??fontenvironments\fontclass #parameter\endcsname\lastnamedcs\else
+ \ifcsname\??fontenvironments \normalizedbodyfontsize#parameter\endcsname\lastnamedcs\else
+ \ifcsname\??fontenvironments\s!default #parameter\endcsname\lastnamedcs\fi\fi\fi\fi}
+
\def\bodyfontsizevariable#size#parameter%
{\csname\??fontenvironments
\ifcsname\??fontenvironments\fontclass#size#parameter\endcsname\fontclass#size#parameter\else
@@ -1167,17 +1212,31 @@
\ifcsname\??fontenvironments\s!default #parameter\endcsname\s!default #parameter\fi\fi\fi\fi
\endcsname}
+\def\font_bodyfontsizevariable#size#parameter%
+ {\ifcsname\??fontenvironments\fontclass#size#parameter\endcsname\lastnamedcs\else
+ \ifcsname\??fontenvironments\fontclass #parameter\endcsname\lastnamedcs\else
+ \ifcsname\??fontenvironments #size#parameter\endcsname\lastnamedcs\else
+ \ifcsname\??fontenvironments\s!default #parameter\endcsname\lastnamedcs\fi\fi\fi\fi}
+
\def\bodyfontinterlinespace{\bodyfontvariable\c!interlinespace} % used elsewhere
+% \def\bodyfontdimension#class#size#parameter#body%
+% {\the\dimexpr
+% \ifcsname\??fontenvironments #class#size#parameter\endcsname
+% \csname\??fontenvironments #class#size#parameter\endcsname \else
+% \ifcsname\??fontenvironments#class\s!default#parameter\endcsname
+% \csname\??fontenvironments#class\s!default#parameter\endcsname\dimexpr#body\relax\else % factor
+% \ifcsname\??fontenvironments #size#parameter\endcsname
+% \csname\??fontenvironments #size#parameter\endcsname \else
+% \csname\??fontenvironments \s!default#parameter\endcsname\dimexpr#body\relax\fi\fi\fi % factor
+% \relax}
+
\def\bodyfontdimension#class#size#parameter#body%
{\the\dimexpr
- \ifcsname\??fontenvironments #class#size#parameter\endcsname
- \csname\??fontenvironments #class#size#parameter\endcsname \else
- \ifcsname\??fontenvironments#class\s!default#parameter\endcsname
- \csname\??fontenvironments#class\s!default#parameter\endcsname\dimexpr#body\relax\else % factor
- \ifcsname\??fontenvironments #size#parameter\endcsname
- \csname\??fontenvironments #size#parameter\endcsname \else
- \csname\??fontenvironments \s!default#parameter\endcsname\dimexpr#body\relax\fi\fi\fi % factor
+ \ifcsname\??fontenvironments #class#size#parameter\endcsname \lastnamedcs \else
+ \ifcsname\??fontenvironments#class\s!default#parameter\endcsname \lastnamedcs\dimexpr#body\relax\else % factor
+ \ifcsname\??fontenvironments #size#parameter\endcsname \lastnamedcs \else
+ \lastnamedcs\dimexpr#body\relax\fi\fi\fi % factor
\relax}
\unexpanded\def\definebodyfontenvironment
@@ -1187,10 +1246,6 @@
\installcorenamespace{fontenvironmentknown}
-% \let\bodyfontenvironmentlist\empty % used in font-run (might change)
-
-\newtoks\bodyfontenvironmentlist
-
\def\font_helpers_register_environment#class#body%
{\expandafter\let\csname\??fontenvironmentknown#class#body\endcsname\empty}
@@ -1224,7 +1279,6 @@
\else
\normalizebodyfontsize\m_font_body_normalized\m_font_body
\font_basics_define_body_font_environment_size[#class][\m_font_body_normalized][#settings]%
- %\addtocommalist\m_font_body_normalized\bodyfontenvironmentlist
\clf_registerbodyfontsize{\m_font_body_normalized}%
\fi}
@@ -1402,7 +1456,7 @@
{\font_basics_define_body_font_a[#whatever][\s!rm][#specification]}
\unexpanded\def\font_basics_define_body_font_c[#whatever][#dummya][#dummyb]% body|identifier
- {\font_basics_define_body_font_a[bwhatever][\s!rm][]}
+ {\font_basics_define_body_font_a[#whatever][\s!rm][]}
\unexpanded\def\font_basics_define_body_font_a[#whatever]%
{\doifelsenumber{#whatever}%
@@ -1596,6 +1650,13 @@
\fi
\fi}
+% \def\font_helpers_define_unknown_check_sizes#body#relativesize%
+% {\ifcsname\??fontenvironments\s!default#relativesize\endcsname % fontclass ?
+% % how \lastnamedcs here
+% \expandafter\normalizebodyfontsize\csname\??fontenvironments#body#relativesize\endcsname{\csname\??fontenvironments\s!default#relativesize\endcsname\dimexpr#body\relax}%
+% \settrue\c_font_defining_state
+% \fi}
+
\def\font_helpers_define_unknown_check_sizes#body#relativesize%
{\ifcsname\??fontenvironments\s!default#relativesize\endcsname % fontclass ?
\expandafter\normalizebodyfontsize\csname\??fontenvironments#body#relativesize\endcsname{\csname\??fontenvironments\s!default#relativesize\endcsname\dimexpr#body\relax}%
@@ -1606,10 +1667,17 @@
{\ifcsname\??fontdefinitions\s!default:#style\endcsname
\edef\m_font_asked_body{#body}%
\edef\m_font_asked_style{#style}%
- \csname\??fontdefinitions\s!default:#style\endcsname % {#body}{#style}%
+ \lastnamedcs
\settrue\c_font_defining_state
\fi}
+% \def\font_helpers_define_unknown_check_relatives#body#relativesize%
+% {\ifcsname\??fontbodyknown\csname\??fontenvironments#body#relativesize\endcsname\endcsname \else
+% % how \lastnamedcs here
+% \expandafter\font_helpers_define_unknown_font\csname\??fontenvironments#body#relativesize\endcsname
+% \settrue\c_font_defining_state
+% \fi}
+
\def\font_helpers_define_unknown_check_relatives#body#relativesize%
{\ifcsname\??fontbodyknown\csname\??fontenvironments#body#relativesize\endcsname\endcsname \else
\expandafter\font_helpers_define_unknown_font\csname\??fontenvironments#body#relativesize\endcsname
@@ -1627,6 +1695,20 @@
%D These macros show that quite some definitions take place. Fonts are not loaded
%D yet! This means that at format generation time, no font files are present.
+% \unexpanded\def\font_basics_switch_points#body%
+% {\ifcsname\??fontbodyknown#body\endcsname \else
+% % we need to check the relative sizes for this body
+% \font_helpers_define_unknown_font{#body}%
+% \fi%
+% \ifcsname\??fontbodyknown#body\endcsname % always true now
+% \font_basics_complete_switch{#body}%
+% \localbodyfontsize#body\relax
+% \normalizebodyfontsize\normalizedbodyfontsize\localbodyfontsize
+% \font_helpers_check_bodyfont_environment\normalizedbodyfontsize\normalizedbodyfontsize % !!
+% \else
+% \showmessage\m!fonts4{#body}%
+% \fi}
+
\unexpanded\def\font_basics_switch_points#body%
{\ifcsname\??fontbodyknown#body\endcsname \else
% we need to check the relative sizes for this body
@@ -1643,7 +1725,7 @@
\unexpanded\def\font_basics_switch_style#style%
{\ifcsname\??fontstyle#style\endcsname
- \csname\??fontstyle#style\endcsname
+ \lastnamedcs
\edef\fontstyle{#style}%
\ifmmode\mr\fi % in order to be compatible with \rm in math mode
% \the\everybodyfont % cleaner, in setting size as well as style
@@ -1694,7 +1776,7 @@
\unexpanded\def\font_helpers_set_font_set_font_option_keyword#method#keyword#message%
{\edef\m_font_keyword{#keyword}%
\ifcsname\??fontenvironments\normalizedbodyfontsize\m_font_keyword\endcsname
- \edef\m_font_step{\bodyfontvariable\m_font_keyword}%
+ \edef\m_font_step{\font_bodyfontvariable\m_font_keyword}%
\normalexpanded{\font_helpers_set_font_set_font_option_body{#method}{\m_font_step}{#message}}%
\else\ifx\m_font_keyword\v!reset
\let\fontstyle\empty % new 31/7/2006
@@ -1835,7 +1917,7 @@
\def\font_helpers_check_strategy_class_a % --- --- --- --- % pt tt bf a
{\ifcsname\??fontinstanceready\fontclass-\fontbody-\fontstyle-\fontalternative-\fontsize-\fontface\endcsname
\setfalse\c_font_auto_size
- \csname\??fontinstanceready\fontclass-\fontbody-\fontstyle-\fontalternative-\fontsize-\fontface\endcsname
+ \lastnamedcs
\else
\expandafter\font_helpers_check_strategy_class_b
\fi}
@@ -1843,7 +1925,7 @@
\def\font_helpers_check_strategy_class_b % --- --- --- def % pt tt bf
{\ifcsname\??fontinstanceready\fontclass-\fontbody-\fontstyle-\fontalternative-\defaultfontsize-\fontface\endcsname
\settrue\c_font_auto_size
- \csname\??fontinstanceready\fontclass-\fontbody-\fontstyle-\fontalternative-\defaultfontsize-\fontface\endcsname
+ \lastnamedcs
\else
\expandafter\font_helpers_check_strategy_class_c
\fi}
@@ -1851,7 +1933,7 @@
\def\font_helpers_check_strategy_class_c % --- --- def --- % pt tt tf a
{\ifcsname\??fontinstanceready\fontclass-\fontbody-\fontstyle-\defaultfontalternative-\fontsize-\fontface\endcsname
\settrue\c_font_auto_size
- \csname\??fontinstanceready\fontclass-\fontbody-\fontstyle-\defaultfontalternative-\fontsize-\fontface\endcsname
+ \lastnamedcs
\else
\expandafter\font_helpers_check_strategy_class_d
\fi}
@@ -1859,7 +1941,7 @@
\def\font_helpers_check_strategy_class_d % --- --- def def % pt tt tf
{\ifcsname\??fontinstanceready\fontclass-\fontbody-\fontstyle-\defaultfontalternative-\defaultfontsize-\fontface\endcsname
\settrue\c_font_auto_size
- \csname\??fontinstanceready\fontclass-\fontbody-\fontstyle-\defaultfontalternative-\defaultfontsize-\fontface\endcsname
+ \lastnamedcs
\else
\expandafter\font_helpers_check_strategy_class_e
\fi}
@@ -1867,16 +1949,15 @@
\def\font_helpers_check_strategy_class_e % --- def def def % pt rm tf
{\ifcsname\??fontinstanceready\fontclass-\fontbody-\defaultfontstyle-\defaultfontalternative-\defaultfontsize-\fontface\endcsname
\setfalse\c_font_auto_size
- \csname\??fontinstanceready\fontclass-\fontbody-\defaultfontstyle-\defaultfontalternative-\defaultfontsize-\fontface\endcsname
+ \lastnamedcs
\else
\expandafter\font_helpers_check_strategy_class_f
- % \expandafter\font_helpers_check_strategy_a
\fi}
\def\font_helpers_check_strategy_class_f % def def def def % rm tf
{\ifcsname\??fontinstanceready\fontclass-\defaultfontbody-\defaultfontstyle-\defaultfontalternative-\defaultfontsize-\fontface\endcsname
\settrue\c_font_auto_size
- \csname\??fontinstanceready\fontclass-\defaultfontbody-\defaultfontstyle-\defaultfontalternative-\defaultfontsize-\fontface\endcsname
+ \lastnamedcs
\else
\expandafter\font_helpers_check_strategy_a
\fi}
@@ -1886,7 +1967,7 @@
\def\font_helpers_check_strategy_a % --- --- --- --- % pt tt bf a
{\ifcsname\??fontinstanceready\fontbody-\fontstyle-\fontalternative-\fontsize-\fontface\endcsname
\setfalse\c_font_auto_size
- \csname\??fontinstanceready\fontbody-\fontstyle-\fontalternative-\fontsize-\fontface\endcsname
+ \lastnamedcs
\else
\expandafter\font_helpers_check_strategy_b
\fi}
@@ -1894,7 +1975,7 @@
\def\font_helpers_check_strategy_b % --- --- --- --- % pt tt bf a
{\ifcsname\??fontinstanceready\fontbody-\fontstyle-\fontalternative-\defaultfontsize-\fontface\endcsname
\settrue\c_font_auto_size
- \csname\??fontinstanceready\fontbody-\fontstyle-\fontalternative-\defaultfontsize-\fontface\endcsname
+ \lastnamedcs
\else
\expandafter\font_helpers_check_strategy_c
\fi}
@@ -1902,7 +1983,7 @@
\def\font_helpers_check_strategy_c % --- --- --- --- % pt tt bf a
{\ifcsname\??fontinstanceready\fontbody-\fontstyle-\defaultfontalternative-\fontsize-\fontface\endcsname
\settrue\c_font_auto_size
- \csname\??fontinstanceready\fontbody-\fontstyle-\defaultfontalternative-\fontsize-\fontface\endcsname
+ \lastnamedcs
\else
\expandafter\font_helpers_check_strategy_d
\fi}
@@ -1910,7 +1991,7 @@
\def\font_helpers_check_strategy_d % --- --- --- --- % pt tt bf a
{\ifcsname\??fontinstanceready\fontbody-\fontstyle-\defaultfontalternative-\defaultfontsize-\fontface\endcsname
\settrue\c_font_auto_size
- \csname\??fontinstanceready\fontbody-\fontstyle-\defaultfontalternative-\defaultfontsize-\fontface\endcsname
+ \lastnamedcs
\else
\expandafter\font_helpers_check_strategy_e
\fi}
@@ -1918,7 +1999,7 @@
\def\font_helpers_check_strategy_e % --- --- --- --- % pt tt bf a
{\ifcsname\??fontinstanceready\fontbody-\defaultfontstyle-\defaultfontalternative-\defaultfontsize-\fontface\endcsname
\setfalse\c_font_auto_size
- \csname\??fontinstanceready\fontbody-\defaultfontstyle-\defaultfontalternative-\defaultfontsize-\fontface\endcsname
+ \lastnamedcs
\else
\expandafter\font_helpers_check_strategy_f
\fi}
@@ -1926,7 +2007,7 @@
\def\font_helpers_check_strategy_f % --- --- --- --- % pt tt bf a
{\ifcsname\??fontinstanceready\defaultfontbody-\defaultfontstyle-\defaultfontalternative-\defaultfontsize-\fontface\endcsname
\settrue\c_font_auto_size
- \csname\??fontinstanceready\defaultfontbody-\defaultfontstyle-\defaultfontalternative-\defaultfontsize-\fontface\endcsname
+ \lastnamedcs
\fi}
\let\applyfontstrategies \font_helpers_check_strategy_a
@@ -2095,17 +2176,32 @@
}%
\global\expandafter\let\csname\??fontbodyfaces\fontbody\endcsname\font_basics_set_faces}
-\def\currentbodyfontdimension#parameter%
+% \def\currentbodyfontdimension#parameter%
+% {\the\dimexpr
+% \ifcsname\??fontenvironments\fontclass\normalizedbodyfontsize#parameter\endcsname
+% \csname\??fontenvironments\fontclass\normalizedbodyfontsize#parameter\endcsname \else
+% \ifcsname\??fontenvironments\fontclass\s!default #parameter\endcsname
+% \csname\??fontenvironments\fontclass\s!default #parameter\endcsname
+% \dimexpr\normalizedbodyfontsize\relax \else % factor
+% \ifcsname\??fontenvironments \normalizedbodyfontsize#parameter\endcsname
+% \csname\??fontenvironments \normalizedbodyfontsize#parameter\endcsname \else
+% \csname\??fontenvironments \s!default #parameter\endcsname
+% \dimexpr\normalizedbodyfontsize\relax \fi\fi\fi % factor
+% \relax}
+
+\def\currentbodyfontdimension#parameter% there can be factors here
{\the\dimexpr
\ifcsname\??fontenvironments\fontclass\normalizedbodyfontsize#parameter\endcsname
- \csname\??fontenvironments\fontclass\normalizedbodyfontsize#parameter\endcsname \else
- \ifcsname\??fontenvironments\fontclass\s!default #parameter\endcsname
- \csname\??fontenvironments\fontclass\s!default #parameter\endcsname
- \dimexpr\normalizedbodyfontsize\relax \else % factor
- \ifcsname\??fontenvironments \normalizedbodyfontsize#parameter\endcsname
- \csname\??fontenvironments \normalizedbodyfontsize#parameter\endcsname \else
- \csname\??fontenvironments \s!default #parameter\endcsname
- \dimexpr\normalizedbodyfontsize\relax \fi\fi\fi % factor
+ \lastnamedcs
+ \else\ifcsname\??fontenvironments\fontclass\s!default#parameter\endcsname
+ \lastnamedcs
+ \dimexpr\normalizedbodyfontsize\relax
+ \else\ifcsname\??fontenvironments\normalizedbodyfontsize#parameter\endcsname
+ \lastnamedcs
+ \else
+ \csname\??fontenvironments\s!default#parameter\endcsname
+ \dimexpr\normalizedbodyfontsize\relax
+ \fi\fi\fi
\relax}
%D \macros
@@ -2161,7 +2257,7 @@
\the\everysetupbodyfont}}
\unexpanded\def\font_basics_switchtobodyfont#specification%
- {\edef\m_font_step{\bodyfontvariable{#specification}}%
+ {\edef\m_font_step{\font_bodyfontvariable{#specification}}%
\ifx\m_font_step\empty
\font_helpers_set_font\zerocount{#specification}%
\else
@@ -2189,7 +2285,8 @@
\unexpanded\def\fastswitchtobodyfont#name%
{\ifcsname\??fontenvironments\normalizedbodyfontsize#name\endcsname
- \edef\futurebodyfontsize{\csname\??fontenvironments\normalizedbodyfontsize#name\endcsname}%
+ %\edef\futurebodyfontsize{\csname\??fontenvironments\normalizedbodyfontsize#name\endcsname}%
+ \edef\futurebodyfontsize{\lastnamedcs}%
\ifcsname\??fontbodyknown\futurebodyfontsize\endcsname
\font_basics_complete_switch\futurebodyfontsize
\localbodyfontsize\futurebodyfontsize\relax
@@ -2312,7 +2409,7 @@
\newmacro\m_font_step
\def\font_helpers_set_bodyfont_step#step%
- {\edef\m_font_step{\bodyfontvariable{#step}}% not always \cs
+ {\edef\m_font_step{\font_bodyfontvariable{#step}}% not always \cs
\font_basics_switch_points\m_font_step
\font_basics_switch_style \fontstyle}
@@ -2405,7 +2502,7 @@
\unexpanded\def\predefinedfont[#1]% global !
{\ifcsname\??predefinedfont#1\endcsname
- \csname\??predefinedfont#1\endcsname
+ \lastnamedcs
\else
\font_basics_predefined{#1}%
\fi}
diff --git a/Master/texmf-dist/tex/context/base/font-inj.lua b/Master/texmf-dist/tex/context/base/mkiv/font-inj.lua
index 332e92033fd..89370210d41 100644
--- a/Master/texmf-dist/tex/context/base/font-inj.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-inj.lua
@@ -8,7 +8,16 @@ if not modules then modules = { } end modules ['font-inj'] = {
-- This property based variant is not faster but looks nicer than the attribute one. We
-- need to use rawget (which is apbout 4 times slower than a direct access but we cannot
--- get/set that one for our purpose!
+-- get/set that one for our purpose! This version does a bit more with discretionaries
+-- (and Kai has tested it with his collection of weird fonts.)
+
+-- There is some duplicate code here (especially in the the pre/post/replace branches) but
+-- we go for speed. We could store a list of glyph and mark nodes when registering but it's
+-- cleaner to have an identification pass here. Also, I need to keep tracing in mind so
+-- being too clever here is dangerous.
+
+-- The subtype test is not needed as there will be no (new) properties set, given that we
+-- reset the properties.
if not nodes.properties then return end
@@ -65,7 +74,6 @@ local nofregisteredkerns = 0
local nofregisteredpairs = 0
local nofregisteredmarks = 0
local nofregisteredcursives = 0
------ markanchors = { } -- one base can have more marks
local keepregisteredcounts = false
function injections.keepcounts()
@@ -80,13 +88,43 @@ function injections.resetcounts()
keepregisteredcounts = false
end
--- We need to make sure that a possible metatable will not kick in
--- unexpectedly.
+-- We need to make sure that a possible metatable will not kick in unexpectedly.
+
+-- function injections.reset(n)
+-- local p = rawget(properties,n)
+-- if p and rawget(p,"injections") then
+-- p.injections = nil
+-- end
+-- end
+
+-- function injections.copy(target,source)
+-- local sp = rawget(properties,source)
+-- if sp then
+-- local tp = rawget(properties,target)
+-- local si = rawget(sp,"injections")
+-- if si then
+-- si = fastcopy(si)
+-- if tp then
+-- tp.injections = si
+-- else
+-- propertydata[target] = {
+-- injections = si,
+-- }
+-- end
+-- else
+-- if tp then
+-- tp.injections = nil
+-- end
+-- end
+-- end
+-- end
function injections.reset(n)
local p = rawget(properties,n)
- if p and rawget(p,"injections") then
- p.injections = nil
+ if p then
+ p.injections = false -- { }
+ else
+ properties[n] = false -- { injections = { } }
end
end
@@ -104,10 +142,17 @@ function injections.copy(target,source)
injections = si,
}
end
+ elseif tp then
+ tp.injections = false -- { }
else
- if tp then
- tp.injections = nil
- end
+ properties[target] = { injections = { } }
+ end
+ else
+ local tp = rawget(properties,target)
+ if tp then
+ tp.injections = false -- { }
+ else
+ properties[target] = false -- { injections = { } }
end
end
end
@@ -146,7 +191,8 @@ end
function injections.setcursive(start,nxt,factor,rlmode,exit,entry,tfmstart,tfmnext) -- hm: nuts or nodes
local dx = factor*(exit[1]-entry[1])
local dy = -factor*(exit[2]-entry[2])
- local ws, wn = tfmstart.width, tfmnext.width
+ local ws = tfmstart.width
+ local wn = tfmnext.width
nofregisteredcursives = nofregisteredcursives + 1
if rlmode < 0 then
dx = -(dx + wn)
@@ -195,7 +241,10 @@ function injections.setcursive(start,nxt,factor,rlmode,exit,entry,tfmstart,tfmne
end
function injections.setpair(current,factor,rlmode,r2lflag,spec,injection) -- r2lflag & tfmchr not used
- local x, y, w, h = factor*spec[1], factor*spec[2], factor*spec[3], factor*spec[4]
+ local x = factor*spec[1]
+ local y = factor*spec[2]
+ local w = factor*spec[3]
+ local h = factor*spec[4]
if x ~= 0 or w ~= 0 or y ~= 0 or h ~= 0 then -- okay?
local yoffset = y - h
local leftkern = x -- both kerns are set in a pair kern compared
@@ -205,9 +254,12 @@ function injections.setpair(current,factor,rlmode,r2lflag,spec,injection) -- r2l
if rlmode and rlmode < 0 then
leftkern, rightkern = rightkern, leftkern
end
+ if not injection then
+ injection = "injections"
+ end
local p = rawget(properties,current)
if p then
- local i = rawget(p,"injections")
+ local i = rawget(p,injection)
if i then
if leftkern ~= 0 then
i.leftkern = (i.leftkern or 0) + leftkern
@@ -219,19 +271,19 @@ function injections.setpair(current,factor,rlmode,r2lflag,spec,injection) -- r2l
i.yoffset = (i.yoffset or 0) + yoffset
end
elseif leftkern ~= 0 or rightkern ~= 0 then
- p.injections = {
+ p[injection] = {
leftkern = leftkern,
rightkern = rightkern,
yoffset = yoffset,
}
else
- p.injections = {
+ p[injection] = {
yoffset = yoffset,
}
end
elseif leftkern ~= 0 or rightkern ~= 0 then
properties[current] = {
- injections = {
+ [injection] = {
leftkern = leftkern,
rightkern = rightkern,
yoffset = yoffset,
@@ -239,7 +291,7 @@ function injections.setpair(current,factor,rlmode,r2lflag,spec,injection) -- r2l
}
else
properties[current] = {
- injections = {
+ [injection] = {
yoffset = yoffset,
},
}
@@ -250,10 +302,9 @@ function injections.setpair(current,factor,rlmode,r2lflag,spec,injection) -- r2l
return x, y, w, h -- no bound
end
--- this needs checking for rl < 0 but it is unlikely that a r2l script
--- uses kernclasses between glyphs so we're probably safe (KE has a
--- problematic font where marks interfere with rl < 0 in the previous
--- case)
+-- This needs checking for rl < 0 but it is unlikely that a r2l script uses kernclasses between
+-- glyphs so we're probably safe (KE has a problematic font where marks interfere with rl < 0 in
+-- the previous case)
function injections.setkern(current,factor,rlmode,x,injection)
local dx = factor * x
@@ -285,7 +336,7 @@ function injections.setkern(current,factor,rlmode,x,injection)
end
end
-function injections.setmark(start,base,factor,rlmode,ba,ma,tfmbase) -- ba=baseanchor, ma=markanchor
+function injections.setmark(start,base,factor,rlmode,ba,ma,tfmbase,mkmk) -- ba=baseanchor, ma=markanchor
local dx, dy = factor*(ba[1]-ma[1]), factor*(ba[2]-ma[2])
nofregisteredmarks = nofregisteredmarks + 1
-- markanchors[nofregisteredmarks] = base
@@ -293,14 +344,20 @@ function injections.setmark(start,base,factor,rlmode,ba,ma,tfmbase) -- ba=basean
dx = tfmbase.width - dx -- see later commented ox
end
local p = rawget(properties,start)
+ -- hm, dejavu serif does a sloppy mark2mark before mark2base
if p then
local i = rawget(p,"injections")
if i then
- i.markx = dx
- i.marky = dy
- i.markdir = rlmode or 0
- i.markbase = nofregisteredmarks
- i.markbasenode = base
+ if i.markmark then
+ -- out of order mkmk: yes or no or option
+ else
+ i.markx = dx
+ i.marky = dy
+ i.markdir = rlmode or 0
+ i.markbase = nofregisteredmarks
+ i.markbasenode = base
+ i.markmark = mkmk
+ end
else
p.injections = {
markx = dx,
@@ -308,6 +365,7 @@ function injections.setmark(start,base,factor,rlmode,ba,ma,tfmbase) -- ba=basean
markdir = rlmode or 0,
markbase = nofregisteredmarks,
markbasenode = base,
+ markmark = mkmk,
}
end
else
@@ -318,6 +376,7 @@ function injections.setmark(start,base,factor,rlmode,ba,ma,tfmbase) -- ba=basean
markdir = rlmode or 0,
markbase = nofregisteredmarks,
markbasenode = base,
+ markmark = mkmk,
},
}
end
@@ -345,10 +404,11 @@ local function show(n,what,nested,symbol)
local markx = i.markx or 0
local marky = i.marky or 0
local markdir = i.markdir or 0
- local markbase = i.markbase or 0 -- will be markbasenode
+ local markbase = i.markbase or 0
local cursivex = i.cursivex or 0
local cursivey = i.cursivey or 0
local ligaindex = i.ligaindex or 0
+ local cursbase = i.cursiveanchor
local margin = nested and 4 or 2
--
if rightkern ~= 0 or yoffset ~= 0 then
@@ -360,7 +420,13 @@ local function show(n,what,nested,symbol)
report_injections("%w%s mark: dx %p, dy %p, dir %s, base %s",margin,symbol,markx,marky,markdir,markbase ~= 0 and "yes" or "no")
end
if cursivex ~= 0 or cursivey ~= 0 then
- report_injections("%w%s curs: dx %p, dy %p",margin,symbol,cursivex,cursivey)
+ if cursbase then
+ report_injections("%w%s curs: base dx %p, dy %p",margin,symbol,cursivex,cursivey)
+ else
+ report_injections("%w%s curs: dx %p, dy %p",margin,symbol,cursivex,cursivey)
+ end
+ elseif cursbase then
+ report_injections("%w%s curs: base",margin,symbol)
end
if ligaindex ~= 0 then
report_injections("%w%s liga: index %i",margin,symbol,ligaindex)
@@ -430,30 +496,36 @@ local function show_result(head)
end
end
--- we could also check for marks here but maybe not all are registered (needs checking)
-
-local function collect_glyphs_1(head)
- local glyphs, nofglyphs = { }, 0
- local marks, nofmarks = { }, 0
+local function collect_glyphs(head,offsets)
+ local glyphs, glyphi, nofglyphs = { }, { }, 0
+ local marks, marki, nofmarks = { }, { }, 0
local nf, tm = nil, nil
- for n in traverse_id(glyph_code,head) do -- only needed for relevant fonts
- if getsubtype(n) < 256 then
- local f = getfont(n)
- if f ~= nf then
- nf = f
- tm = fontdata[nf].resources.marks -- other hash in ctx
- end
- if tm and tm[getchar(n)] then
- nofmarks = nofmarks + 1
- marks[nofmarks] = n
- else
- nofglyphs = nofglyphs + 1
- glyphs[nofglyphs] = n
+ local n = head
+
+ local function identify(n,what)
+ local f = getfont(n)
+ if f ~= nf then
+ nf = f
+ -- other hash in ctx:
+ tm = fontdata[nf].resources
+ if tm then
+ tm = tm.marks
end
+ end
+ if tm and tm[getchar(n)] then
+ nofmarks = nofmarks + 1
+ marks[nofmarks] = n
+ marki[nofmarks] = "injections"
+ else
+ nofglyphs = nofglyphs + 1
+ glyphs[nofglyphs] = n
+ glyphi[nofglyphs] = what
+ end
+ if offsets then
-- yoffsets can influence curs steps
local p = rawget(properties,n)
if p then
- local i = rawget(p,"injections")
+ local i = rawget(p,what)
if i then
local yoffset = i.yoffset
if yoffset and yoffset ~= 0 then
@@ -463,38 +535,50 @@ local function collect_glyphs_1(head)
end
end
end
- return glyphs, nofglyphs, marks, nofmarks
-end
-local function collect_glyphs_2(head)
- local glyphs, nofglyphs = { }, 0
- local marks, nofmarks = { }, 0
- local nf, tm = nil, nil
- for n in traverse_id(glyph_code,head) do
- if getsubtype(n) < 256 then
- local f = getfont(n)
- if f ~= nf then
- nf = f
- tm = fontdata[nf].resources.marks -- other hash in ctx
- end
- if tm and tm[getchar(n)] then
- nofmarks = nofmarks + 1
- marks[nofmarks] = n
- else
- nofglyphs = nofglyphs + 1
- glyphs[nofglyphs] = n
- end
+ while n do -- only needed for relevant fonts
+ local id = getid(n)
+ if id == glyph_code then
+ identify(n,"injections")
+ elseif id == disc_code then
+ local d = getfield(n,"pre")
+ if d then
+ for n in traverse_id(glyph_code,d) do
+ if getsubtype(n) < 256 then
+ identify(n,"preinjections")
+ end
+ end
+ end
+ local d = getfield(n,"post")
+ if d then
+ for n in traverse_id(glyph_code,d) do
+ if getsubtype(n) < 256 then
+ identify(n,"postinjections")
+ end
+ end
+ end
+ local d = getfield(n,"replace")
+ if d then
+ for n in traverse_id(glyph_code,d) do
+ if getsubtype(n) < 256 then
+ identify(n,"replaceinjections")
+ end
+ end
+ end
end
+ n = getnext(n)
end
- return glyphs, nofglyphs, marks, nofmarks
+
+ return glyphs, glyphi, nofglyphs, marks, marki, nofmarks
end
-local function inject_marks(marks,nofmarks)
+local function inject_marks(marks,marki,nofmarks)
for i=1,nofmarks do
- local n = marks[i]
+ local n = marks[i]
local pn = rawget(properties,n)
if pn then
- pn = rawget(pn,"injections")
+ local ni = marki[i]
+ local pn = rawget(pn,ni)
if pn then
local p = pn.markbasenode
if p then
@@ -503,7 +587,7 @@ local function inject_marks(marks,nofmarks)
local rightkern = nil
local pp = rawget(properties,p)
if pp then
- pp = rawget(pp,"injections")
+ pp = rawget(pp,ni)
if pp then
rightkern = pp.rightkern
end
@@ -516,13 +600,22 @@ local function inject_marks(marks,nofmarks)
else
-- kern(x) glyph(p) kern(w-x) mark(n)
-- ox = px - getfield(p,"width") + pn.markx - pp.leftkern
- local leftkern = pp.leftkern
- if leftkern then
- ox = px - pn.markx
+ --
+ -- According to Kai we don't need to handle leftkern here but I'm
+ -- pretty sure I've run into a case where it was needed so maybe
+ -- some day we need something more clever here.
+ --
+ if false then
+ -- a mark with kerning
+ local leftkern = pp.leftkern
+ if leftkern then
+ ox = px - pn.markx - leftkern
+ else
+ ox = px - pn.markx
+ end
else
- ox = px - pn.markx - leftkern
+ ox = px - pn.markx
end
--- report_injections("l2r case 1: %p",ox)
end
else
-- we need to deal with fonts that have marks with width
@@ -548,12 +641,13 @@ local function inject_marks(marks,nofmarks)
setfield(n,"xoffset",ox)
--
local py = getfield(p,"yoffset")
- local oy = 0
- if marks[p] then
- oy = py + pn.marky
- else
- oy = getfield(n,"yoffset") + py + pn.marky
- end
+-- local oy = 0
+-- if marks[p] then
+-- oy = py + pn.marky
+-- else
+-- oy = getfield(n,"yoffset") + py + pn.marky
+-- end
+ local oy = getfield(n,"yoffset") + py + pn.marky
setfield(n,"yoffset",oy)
else
-- normally this can't happen (only when in trace mode which is a special case anyway)
@@ -564,14 +658,14 @@ local function inject_marks(marks,nofmarks)
end
end
-local function inject_cursives(glyphs,nofglyphs)
+local function inject_cursives(glyphs,glyphi,nofglyphs)
local cursiveanchor, lastanchor = nil, nil
local minc, maxc, last = 0, 0, nil
for i=1,nofglyphs do
- local n = glyphs[i]
+ local n = glyphs[i]
local pn = rawget(properties,n)
if pn then
- pn = rawget(pn,"injections")
+ pn = rawget(pn,glyphi[i])
end
if pn then
local cursivex = pn.cursivex
@@ -630,7 +724,7 @@ local function inject_cursives(glyphs,nofglyphs)
-- if maxc > 0 and not cursiveanchor then
-- local ny = getfield(n,"yoffset")
-- for i=maxc,minc,-1 do
- -- local ti = glyphs[i]
+ -- local ti = glyphs[i][1]
-- ny = ny + properties[ti].cursivedy
-- setfield(ti,"yoffset",ny) -- why not add ?
-- end
@@ -647,23 +741,67 @@ local function inject_cursives(glyphs,nofglyphs)
end
end
-local function inject_kerns(head,list,length)
- -- todo: pre/post/replace
+-- G +D-pre G
+-- D-post+
+-- +D-replace+
+--
+-- G +D-pre +D-pre
+-- D-post +D-post
+-- +D-replace +D-replace
+
+local function inject_kerns(head,glist,ilist,length) -- not complete ! compare with inject_kerns_only (but unlikely disc here)
for i=1,length do
- local n = list[i]
+ local n = glist[i]
local pn = rawget(properties,n)
if pn then
- local i = rawget(pn,"injections")
- if i then
- local leftkern = i.leftkern
- if leftkern and leftkern ~= 0 then
- insert_node_before(head,n,newkern(leftkern)) -- type 0/2
- end
- local rightkern = i.rightkern
- if rightkern and rightkern ~= 0 then
- insert_node_after(head,n,newkern(rightkern)) -- type 0/2
- end
- end
+ local dp = nil
+ local dr = nil
+ local ni = ilist[i]
+ local p = nil
+ if ni == "injections" then
+ p = getprev(n)
+ if p then
+ local id = getid(p)
+ if id == disc_code then
+ dp = getfield(p,"post")
+ dr = getfield(p,"replace")
+ end
+ end
+ end
+ if dp then
+ local i = rawget(pn,"postinjections")
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ local t = find_tail(dp)
+ insert_node_after(dp,t,newkern(leftkern))
+ setfield(p,"post",dp) -- currently we need to force a tail refresh
+ end
+ end
+ end
+ if dr then
+ local i = rawget(pn,"replaceinjections")
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ local t = find_tail(dr)
+ insert_node_after(dr,t,newkern(leftkern))
+ setfield(p,"replace",dr) -- currently we need to force a tail refresh
+ end
+ end
+ else
+ local i = rawget(pn,ni)
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ insert_node_before(head,n,newkern(leftkern)) -- type 0/2
+ end
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ insert_node_after(head,n,newkern(rightkern)) -- type 0/2
+ end
+ end
+ end
end
end
end
@@ -673,23 +811,18 @@ local function inject_everything(head,where)
if trace_injections then
trace(head,"everything")
end
- local glyphs, nofglyphs, marks, nofmarks
- if nofregisteredpairs > 0 then
- glyphs, nofglyphs, marks, nofmarks = collect_glyphs_1(head)
- else
- glyphs, nofglyphs, marks, nofmarks = collect_glyphs_2(head)
- end
+ local glyphs, glyphi, nofglyphs, marks, marki, nofmarks = collect_glyphs(head,nofregisteredpairs > 0)
if nofglyphs > 0 then
if nofregisteredcursives > 0 then
- inject_cursives(glyphs,nofglyphs)
+ inject_cursives(glyphs,glyphi,nofglyphs)
end
if nofregisteredmarks > 0 then -- and nofmarks > 0
- inject_marks(marks,nofmarks)
+ inject_marks(marks,marki,nofmarks)
end
- inject_kerns(head,glyphs,nofglyphs)
+ inject_kerns(head,glyphs,glyphi,nofglyphs)
end
if nofmarks > 0 then
- inject_kerns(head,marks,nofmarks)
+ inject_kerns(head,marks,marki,nofmarks)
end
if keepregisteredcounts then
keepregisteredcounts = false
@@ -702,13 +835,21 @@ local function inject_everything(head,where)
return tonode(head), true
end
+-- G +D-pre G
+-- D-post+
+-- +D-replace+
+--
+-- G +D-pre +D-pre
+-- D-post +D-post
+-- +D-replace +D-replace
+
local function inject_kerns_only(head,where)
head = tonut(head)
if trace_injections then
trace(head,"kerns")
end
local n = head
- local p = nil
+ local p = nil -- disc node when non-nil
while n do
local id = getid(n)
if id == glyph_code then
@@ -724,6 +865,7 @@ local function inject_kerns_only(head,where)
if leftkern and leftkern ~= 0 then
local t = find_tail(d)
insert_node_after(d,t,newkern(leftkern))
+ setfield(p,"post",d) -- currently we need to force a tail refresh
end
end
end
@@ -735,6 +877,7 @@ local function inject_kerns_only(head,where)
if leftkern and leftkern ~= 0 then
local t = find_tail(d)
insert_node_after(d,t,newkern(leftkern))
+ setfield(p,"replace",d) -- currently we need to force a tail refresh
end
end
else
@@ -747,6 +890,7 @@ local function inject_kerns_only(head,where)
end
end
else
+ -- this is the most common case
local i = rawget(pn,"injections")
if i then
local leftkern = i.leftkern
@@ -756,8 +900,6 @@ local function inject_kerns_only(head,where)
end
end
end
- else
- break
end
p = nil
elseif id == disc_code then
@@ -812,7 +954,7 @@ local function inject_kerns_only(head,where)
local h = d
for n in traverse_id(glyph_code,d) do
if getsubtype(n) < 256 then
- local pn = rawget(properties,n) -- why can it be empty { }
+ local pn = rawget(properties,n)
if pn then
local i = rawget(pn,"replaceinjections")
if i then
@@ -850,9 +992,8 @@ local function inject_pairs_only(head,where)
if trace_injections then
trace(head,"pairs")
end
- --
local n = head
- local p = nil
+ local p = nil -- disc node when non-nil
while n do
local id = getid(n)
if id == glyph_code then
@@ -868,6 +1009,7 @@ local function inject_pairs_only(head,where)
if leftkern and leftkern ~= 0 then
local t = find_tail(d)
insert_node_after(d,t,newkern(leftkern))
+ setfield(p,"post",d) -- currently we need to force a tail refresh
end
-- local rightkern = i.rightkern
-- if rightkern and rightkern ~= 0 then
@@ -884,6 +1026,7 @@ local function inject_pairs_only(head,where)
if leftkern and leftkern ~= 0 then
local t = find_tail(d)
insert_node_after(d,t,newkern(leftkern))
+ setfield(p,"replace",d) -- currently we need to force a tail refresh
end
-- local rightkern = i.rightkern
-- if rightkern and rightkern ~= 0 then
@@ -909,24 +1052,22 @@ local function inject_pairs_only(head,where)
-- this is the most common case
local i = rawget(pn,"injections")
if i then
- local yoffset = i.yoffset
- if yoffset and yoffset ~= 0 then
- setfield(n,"yoffset",yoffset)
- end
local leftkern = i.leftkern
if leftkern and leftkern ~= 0 then
- insert_node_before(head,n,newkern(leftkern))
+ head = insert_node_before(head,n,newkern(leftkern))
end
local rightkern = i.rightkern
if rightkern and rightkern ~= 0 then
insert_node_after(head,n,newkern(rightkern))
n = getnext(n) -- to be checked
end
+ local yoffset = i.yoffset
+ if yoffset and yoffset ~= 0 then
+ setfield(n,"yoffset",yoffset)
+ end
end
end
end
- else
- break
end
p = nil
elseif id == disc_code then
@@ -935,16 +1076,12 @@ local function inject_pairs_only(head,where)
local h = d
for n in traverse_id(glyph_code,d) do
if getsubtype(n) < 256 then
- local p = rawget(properties,n)
- if p then
- local i = rawget(p,"preinjections")
+ local pn = rawget(properties,n)
+ if pn then
+ local i = rawget(pn,"preinjections")
if i then
- local yoffset = i.yoffset
- if yoffset and yoffset ~= 0 then
- setfield(n,"yoffset",yoffset)
- end
local leftkern = i.leftkern
- if leftkern ~= 0 then
+ if leftkern and leftkern ~= 0 then
h = insert_node_before(h,n,newkern(leftkern))
end
local rightkern = i.rightkern
@@ -952,6 +1089,10 @@ local function inject_pairs_only(head,where)
insert_node_after(head,n,newkern(rightkern))
n = getnext(n) -- to be checked
end
+ local yoffset = i.yoffset
+ if yoffset and yoffset ~= 0 then
+ setfield(n,"yoffset",yoffset)
+ end
end
end
else
@@ -967,14 +1108,10 @@ local function inject_pairs_only(head,where)
local h = d
for n in traverse_id(glyph_code,d) do
if getsubtype(n) < 256 then
- local p = rawget(properties,n)
- if p then
- local i = rawget(p,"postinjections")
+ local pn = rawget(properties,n)
+ if pn then
+ local i = rawget(pn,"postinjections")
if i then
- local yoffset = i.yoffset
- if yoffset and yoffset ~= 0 then
- setfield(n,"yoffset",yoffset)
- end
local leftkern = i.leftkern
if leftkern and leftkern ~= 0 then
h = insert_node_before(h,n,newkern(leftkern))
@@ -984,6 +1121,10 @@ local function inject_pairs_only(head,where)
insert_node_after(head,n,newkern(rightkern))
n = getnext(n) -- to be checked
end
+ local yoffset = i.yoffset
+ if yoffset and yoffset ~= 0 then
+ setfield(n,"yoffset",yoffset)
+ end
end
end
else
@@ -999,14 +1140,10 @@ local function inject_pairs_only(head,where)
local h = d
for n in traverse_id(glyph_code,d) do
if getsubtype(n) < 256 then
- local p = rawget(properties,n)
- if p then
- local i = rawget(p,"replaceinjections")
+ local pn = rawget(properties,n)
+ if pn then
+ local i = rawget(pn,"replaceinjections")
if i then
- local yoffset = i.yoffset
- if yoffset and yoffset ~= 0 then
- setfield(n,"yoffset",yoffset)
- end
local leftkern = i.leftkern
if leftkern and leftkern ~= 0 then
h = insert_node_before(h,n,newkern(leftkern))
@@ -1016,6 +1153,10 @@ local function inject_pairs_only(head,where)
insert_node_after(head,n,newkern(rightkern))
n = getnext(n) -- to be checked
end
+ local yoffset = i.yoffset
+ if yoffset and yoffset ~= 0 then
+ setfield(n,"yoffset",yoffset)
+ end
end
end
else
@@ -1042,7 +1183,7 @@ local function inject_pairs_only(head,where)
return tonode(head), true
end
-function injections.handler(head,where) -- optimize for n=1 ?
+function injections.handler(head,where)
if nofregisteredmarks > 0 or nofregisteredcursives > 0 then
return inject_everything(head,where)
elseif nofregisteredpairs > 0 then
diff --git a/Master/texmf-dist/tex/context/base/font-ldr.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ldr.lua
index 175b4d0cc50..175b4d0cc50 100644
--- a/Master/texmf-dist/tex/context/base/font-ldr.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-ldr.lua
diff --git a/Master/texmf-dist/tex/context/base/font-lib.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-lib.mkvi
index 9cc14e02f23..7bb042a5943 100644
--- a/Master/texmf-dist/tex/context/base/font-lib.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-lib.mkvi
@@ -22,6 +22,16 @@
\registerctxluafile{font-agl}{1.001} % if needed we can comment this and delay loading
\registerctxluafile{font-cid}{1.001} % cid maps
\registerctxluafile{font-map}{1.001}
+
+% the otf font loader:
+
+\registerctxluafile{font-otr}{1.001} % opentype fontloader
+\registerctxluafile{font-cff}{1.001} % quadratic outlines
+\registerctxluafile{font-ttf}{1.001} % cubic outlines
+%registerctxluafile{font-tmp}{1.001} % temporary placeholder
+\registerctxluafile{font-dsp}{1.001} % ... for this one
+\registerctxluafile{font-off}{1.001} % the old loader
+
\registerctxluafile{font-syn}{1.001}
\registerctxluafile{font-tfm}{1.001}
@@ -36,28 +46,26 @@
\registerctxluafile{font-oti}{1.001} % otf initialization
\registerctxluafile{font-ott}{1.001} % otf tables (first)
-\registerctxluafile{font-otf}{1.001} % otf main
-\registerctxluafile{font-otb}{1.001} % otf main base
-% \doiffileelse{font-inj.lua}
-% {\registerctxluafile{font-inj}{1.001}} % new method (for the moment only local)
-% {\registerctxluafile{node-inj}{1.001}} % old method
+\registerctxluafile{font-otl}{1.001}
+\registerctxluafile{font-oto}{1.001}
+\registerctxluafile{font-otj}{1.001}
+\registerctxluafile{font-oup}{1.001}
+\registerctxluafile{font-ota}{1.001}
+\registerctxluafile{font-ots}{1.001}
+\registerctxluafile{font-otd}{1.001}
+\registerctxluafile{font-otc}{1.001}
+\registerctxluafile{font-oth}{1.001}
+\registerctxluafile{font-osd}{1.001}
-\registerctxluafile{font-inj}{1.001} % the old method (lacks some features)
-
-\registerctxluafile{font-ota}{1.001} % otf analyzers
-\registerctxluafile{font-otn}{1.001} % otf main node
-\registerctxluafile{font-otd}{1.001} % otf dynamics (does an overload)
-\registerctxluafile{font-otp}{1.001} % otf pack
-\registerctxluafile{font-otc}{1.001} % otf context
-\registerctxluafile{font-oth}{1.001} % otf helpers
-
-\registerctxluafile{font-odv}{1.001} % otf devanagari (experimental)
+% so far
\registerctxluafile{font-pat}{1.001} % patchers
\registerctxluafile{node-fnt}{1.001} % here
+\registerctxluafile{font-mps}{1.001} % outline fun
+
\registerctxluafile{font-lua}{1.001}
\registerctxluafile{font-vf} {1.001}
diff --git a/Master/texmf-dist/tex/context/base/font-log.lua b/Master/texmf-dist/tex/context/base/mkiv/font-log.lua
index 41da75378f9..092b5a62ea9 100644
--- a/Master/texmf-dist/tex/context/base/font-log.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-log.lua
@@ -64,6 +64,8 @@ function loggers.format(name) -- should be avoided
return usedfonts[name] or "unknown"
end
+-- maybe move this to font-ctx.lua
+
statistics.register("loaded fonts", function()
if next(usedfonts) then
local t, n = { }, 0
diff --git a/Master/texmf-dist/tex/context/base/font-lua.lua b/Master/texmf-dist/tex/context/base/mkiv/font-lua.lua
index 6fbbcf17e4e..6fbbcf17e4e 100644
--- a/Master/texmf-dist/tex/context/base/font-lua.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-lua.lua
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-map.lua b/Master/texmf-dist/tex/context/base/mkiv/font-map.lua
new file mode 100644
index 00000000000..509e7510710
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-map.lua
@@ -0,0 +1,517 @@
+if not modules then modules = { } end modules ['font-map'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local tonumber, next, type = tonumber, next, type
+
+local match, format, find, concat, gsub, lower = string.match, string.format, string.find, table.concat, string.gsub, string.lower
+local P, R, S, C, Ct, Cc, lpegmatch = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Ct, lpeg.Cc, lpeg.match
+local utfbyte = utf.byte
+local floor = math.floor
+local formatters = string.formatters
+
+local trace_loading = false trackers.register("fonts.loading", function(v) trace_loading = v end)
+local trace_mapping = false trackers.register("fonts.mapping", function(v) trace_unimapping = v end)
+
+local report_fonts = logs.reporter("fonts","loading") -- not otf only
+
+local force_ligatures = false directives.register("fonts.mapping.forceligatures",function(v) force_ligatures = v end)
+
+local fonts = fonts or { }
+local mappings = fonts.mappings or { }
+fonts.mappings = mappings
+
+local allocate = utilities.storage.allocate
+
+--[[ldx--
+<p>Eventually this code will disappear because map files are kind
+of obsolete. Some code may move to runtime or auxiliary modules.</p>
+<p>The name to unciode related code will stay of course.</p>
+--ldx]]--
+
+-- local function loadlumtable(filename) -- will move to font goodies
+-- local lumname = file.replacesuffix(file.basename(filename),"lum")
+-- local lumfile = resolvers.findfile(lumname,"map") or ""
+-- if lumfile ~= "" and lfs.isfile(lumfile) then
+-- if trace_loading or trace_mapping then
+-- report_fonts("loading map table %a",lumfile)
+-- end
+-- lumunic = dofile(lumfile)
+-- return lumunic, lumfile
+-- end
+-- end
+
+local hex = R("AF","09")
+----- hexfour = (hex*hex*hex*hex) / function(s) return tonumber(s,16) end
+----- hexsix = (hex*hex*hex*hex*hex*hex) / function(s) return tonumber(s,16) end
+local hexfour = (hex*hex*hex^-2) / function(s) return tonumber(s,16) end
+local hexsix = (hex*hex*hex^-4) / function(s) return tonumber(s,16) end
+local dec = (R("09")^1) / tonumber
+local period = P(".")
+local unicode = (P("uni") + P("UNI")) * (hexfour * (period + P(-1)) * Cc(false) + Ct(hexfour^1) * Cc(true)) -- base planes
+local ucode = (P("u") + P("U") ) * (hexsix * (period + P(-1)) * Cc(false) + Ct(hexsix ^1) * Cc(true)) -- extended
+local index = P("index") * dec * Cc(false)
+
+local parser = unicode + ucode + index
+
+local parsers = { }
+
+local function makenameparser(str)
+ if not str or str == "" then
+ return parser
+ else
+ local p = parsers[str]
+ if not p then
+ p = P(str) * period * dec * Cc(false)
+ parsers[str] = p
+ end
+ return p
+ end
+end
+
+local f_single = formatters["%04X"]
+local f_double = formatters["%04X%04X"]
+
+-- 0.684 0.661 0,672 0.650 : cache at lua end (more mem)
+-- 0.682 0,672 0.698 0.657 : no cache (moderate mem i.e. lua strings)
+-- 0.644 0.647 0.655 0.645 : convert in c (less mem in theory)
+
+-- local tounicodes = table.setmetatableindex(function(t,unicode)
+-- local s
+-- if unicode < 0xD7FF or (unicode > 0xDFFF and unicode <= 0xFFFF) then
+-- s = f_single(unicode)
+-- else
+-- unicode = unicode - 0x10000
+-- s = f_double(floor(unicode/1024)+0xD800,unicode%1024+0xDC00)
+-- end
+-- t[unicode] = s
+-- return s
+-- end)
+--
+-- local function tounicode16(unicode,name)
+-- local s = tounicodes[unicode]
+-- if s then
+-- return s
+-- else
+-- report_fonts("can't convert %a in %a into tounicode",unicode,name)
+-- end
+-- end
+--
+-- local function tounicode16sequence(unicodes,name)
+-- local t = { }
+-- for l=1,#unicodes do
+-- local u = unicodes[l]
+-- local s = tounicodes[u]
+-- if s then
+-- t[l] = s
+-- else
+-- report_fonts ("can't convert %a in %a into tounicode",u,name)
+-- return
+-- end
+-- end
+-- return concat(t)
+-- end
+--
+-- local function tounicode(unicode,name)
+-- if type(unicode) == "table" then
+-- local t = { }
+-- for l=1,#unicode do
+-- local u = unicode[l]
+-- local s = tounicodes[u]
+-- if s then
+-- t[l] = s
+-- else
+-- report_fonts ("can't convert %a in %a into tounicode",u,name)
+-- return
+-- end
+-- end
+-- return concat(t)
+-- else
+-- local s = tounicodes[unicode]
+-- if s then
+-- return s
+-- else
+-- report_fonts("can't convert %a in %a into tounicode",unicode,name)
+-- end
+-- end
+-- end
+
+local function tounicode16(unicode,name)
+ if unicode < 0xD7FF or (unicode > 0xDFFF and unicode <= 0xFFFF) then
+ return f_single(unicode)
+ else
+ unicode = unicode - 0x10000
+ return f_double(floor(unicode/1024)+0xD800,unicode%1024+0xDC00)
+ end
+end
+
+local function tounicode16sequence(unicodes,name)
+ local t = { }
+ for l=1,#unicodes do
+ local u = unicodes[l]
+ if u < 0xD7FF or (u > 0xDFFF and u <= 0xFFFF) then
+ t[l] = f_single(u)
+ else
+ u = u - 0x10000
+ t[l] = f_double(floor(u/1024)+0xD800,u%1024+0xDC00)
+ end
+ end
+ return concat(t)
+end
+
+local function tounicode(unicode,name)
+ if type(unicode) == "table" then
+ local t = { }
+ for l=1,#unicode do
+ local u = unicode[l]
+ if u < 0xD7FF or (u > 0xDFFF and u <= 0xFFFF) then
+ t[l] = f_single(u)
+ else
+ u = u - 0x10000
+ t[l] = f_double(floor(u/1024)+0xD800,u%1024+0xDC00)
+ end
+ end
+ return concat(t)
+ else
+ if unicode < 0xD7FF or (unicode > 0xDFFF and unicode <= 0xFFFF) then
+ return f_single(unicode)
+ else
+ unicode = unicode - 0x10000
+ return f_double(floor(unicode/1024)+0xD800,unicode%1024+0xDC00)
+ end
+ end
+end
+
+local function fromunicode16(str)
+ if #str == 4 then
+ return tonumber(str,16)
+ else
+ local l, r = match(str,"(....)(....)")
+ -- return (tonumber(l,16))*0x400 + tonumber(r,16) - 0xDC00
+ return 0x10000 + (tonumber(l,16)-0xD800)*0x400 + tonumber(r,16) - 0xDC00
+ end
+end
+
+-- Slightly slower:
+--
+-- local p = C(4) * (C(4)^-1) / function(l,r)
+-- if r then
+-- return (tonumber(l,16))*0x400 + tonumber(r,16) - 0xDC00
+-- else
+-- return tonumber(l,16)
+-- end
+-- end
+--
+-- local function fromunicode16(str)
+-- return lpegmatch(p,str)
+-- end
+
+mappings.makenameparser = makenameparser
+mappings.tounicode = tounicode
+mappings.tounicode16 = tounicode16
+mappings.tounicode16sequence = tounicode16sequence
+mappings.fromunicode16 = fromunicode16
+
+local ligseparator = P("_")
+local varseparator = P(".")
+local namesplitter = Ct(C((1 - ligseparator - varseparator)^1) * (ligseparator * C((1 - ligseparator - varseparator)^1))^0)
+
+-- maybe: ff fi fl ffi ffl => f_f f_i f_l f_f_i f_f_l
+
+-- local function test(name)
+-- local split = lpegmatch(namesplitter,name)
+-- print(string.formatters["%s: [% t]"](name,split))
+-- end
+
+-- test("i.f_")
+-- test("this")
+-- test("this.that")
+-- test("japan1.123")
+-- test("such_so_more")
+-- test("such_so_more.that")
+
+-- to be completed .. for fonts that use unicodes for ligatures which
+-- is a actually a bad thing and should be avoided in the first place
+
+local overloads = allocate {
+ IJ = { name = "I_J", unicode = { 0x49, 0x4A }, mess = 0x0132 },
+ ij = { name = "i_j", unicode = { 0x69, 0x6A }, mess = 0x0133 },
+ ff = { name = "f_f", unicode = { 0x66, 0x66 }, mess = 0xFB00 },
+ fi = { name = "f_i", unicode = { 0x66, 0x69 }, mess = 0xFB01 },
+ fl = { name = "f_l", unicode = { 0x66, 0x6C }, mess = 0xFB02 },
+ ffi = { name = "f_f_i", unicode = { 0x66, 0x66, 0x69 }, mess = 0xFB03 },
+ ffl = { name = "f_f_l", unicode = { 0x66, 0x66, 0x6C }, mess = 0xFB04 },
+ fj = { name = "f_j", unicode = { 0x66, 0x6A } },
+ fk = { name = "f_k", unicode = { 0x66, 0x6B } },
+}
+
+for k, v in next, overloads do
+ local name = v.name
+ local mess = v.mess
+ if name then
+ overloads[name] = v
+ end
+ if mess then
+ overloads[mess] = v
+ end
+end
+
+mappings.overloads = overloads
+
+function mappings.addtounicode(data,filename,checklookups)
+ local resources = data.resources
+ local unicodes = resources.unicodes
+ if not unicodes then
+ return
+ end
+ local properties = data.properties
+ local descriptions = data.descriptions
+ -- we need to move this code
+ unicodes['space'] = unicodes['space'] or 32
+ unicodes['hyphen'] = unicodes['hyphen'] or 45
+ unicodes['zwj'] = unicodes['zwj'] or 0x200D
+ unicodes['zwnj'] = unicodes['zwnj'] or 0x200C
+ --
+ local private = fonts.constructors and fonts.constructors.privateoffset or 0xF0000 -- 0x10FFFF
+ local unicodevector = fonts.encodings.agl.unicodes or { } -- loaded runtime in context
+ local contextvector = fonts.encodings.agl.ctxcodes or { } -- loaded runtime in context
+ local missing = { }
+ local nofmissing = 0
+ local oparser = nil
+ local cidnames = nil
+ local cidcodes = nil
+ local cidinfo = properties.cidinfo
+ local usedmap = cidinfo and fonts.cid.getmap(cidinfo)
+ local uparser = makenameparser() -- hm, every time?
+ if usedmap then
+ oparser = usedmap and makenameparser(cidinfo.ordering)
+ cidnames = usedmap.names
+ cidcodes = usedmap.unicodes
+ end
+ local ns = 0
+ local nl = 0
+ --
+ for unic, glyph in next, descriptions do
+ local name = glyph.name
+ if name then
+ local index = glyph.index
+ local r = overloads[name]
+ if r then
+ -- get rid of weird ligatures
+ -- glyph.name = r.name
+ glyph.unicode = r.unicode
+ elseif not unic or unic == -1 or unic >= private or (unic >= 0xE000 and unic <= 0xF8FF) or unic == 0xFFFE or unic == 0xFFFF then
+ local unicode = unicodevector[name] or contextvector[name]
+ if unicode then
+ glyph.unicode = unicode
+ ns = ns + 1
+ end
+ -- cidmap heuristics, beware, there is no guarantee for a match unless
+ -- the chain resolves
+ if (not unicode) and usedmap then
+ local foundindex = lpegmatch(oparser,name)
+ if foundindex then
+ unicode = cidcodes[foundindex] -- name to number
+ if unicode then
+ glyph.unicode = unicode
+ ns = ns + 1
+ else
+ local reference = cidnames[foundindex] -- number to name
+ if reference then
+ local foundindex = lpegmatch(oparser,reference)
+ if foundindex then
+ unicode = cidcodes[foundindex]
+ if unicode then
+ glyph.unicode = unicode
+ ns = ns + 1
+ end
+ end
+ if not unicode or unicode == "" then
+ local foundcodes, multiple = lpegmatch(uparser,reference)
+ if foundcodes then
+ glyph.unicode = foundcodes
+ if multiple then
+ nl = nl + 1
+ unicode = true
+ else
+ ns = ns + 1
+ unicode = foundcodes
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ -- a.whatever or a_b_c.whatever or a_b_c (no numbers) a.b_
+ --
+ -- It is not trivial to find a solution that suits all fonts. We tried several alternatives
+ -- and this one seems to work reasonable also with fonts that use less standardized naming
+ -- schemes. The extra private test is tested by KE and seems to work okay with non-typical
+ -- fonts as well.
+ --
+ if not unicode or unicode == "" then
+ local split = lpegmatch(namesplitter,name)
+ local nsplit = split and #split or 0 -- add if
+ if nsplit == 0 then
+ -- skip
+ elseif nsplit == 1 then
+ local base = split[1]
+ local u = unicodes[base] or unicodevector[base] or contextvector[name]
+ if not u then
+ -- skip
+ elseif type(u) == "table" then
+ -- unlikely
+ if u[1] < private then
+ unicode = u
+ glyph.unicode = unicode
+ end
+ elseif u < private then
+ unicode = u
+ glyph.unicode = unicode
+ end
+ else
+ local t, n = { }, 0
+ for l=1,nsplit do
+ local base = split[l]
+ local u = unicodes[base] or unicodevector[base] or contextvector[name]
+ if not u then
+ break
+ elseif type(u) == "table" then
+ if u[1] >= private then
+ break
+ end
+ n = n + 1
+ t[n] = u[1]
+ else
+ if u >= private then
+ break
+ end
+ n = n + 1
+ t[n] = u
+ end
+ end
+ if n > 0 then
+ if n == 1 then
+ unicode = t[1]
+ else
+ unicode = t
+ end
+ glyph.unicode = unicode
+ end
+ end
+ nl = nl + 1
+ end
+ -- last resort (we might need to catch private here as well)
+ if not unicode or unicode == "" then
+ local foundcodes, multiple = lpegmatch(uparser,name)
+ if foundcodes then
+ glyph.unicode = foundcodes
+ if multiple then
+ nl = nl + 1
+ unicode = true
+ else
+ ns = ns + 1
+ unicode = foundcodes
+ end
+ end
+ end
+ -- check using substitutes and alternates
+ local r = overloads[unicode]
+ if r then
+ unicode = r.unicode
+ glyph.unicode = unicode
+ end
+ --
+ if not unicode then
+ missing[unic] = true
+ nofmissing = nofmissing + 1
+ end
+ end
+ else
+ -- no name
+ end
+ end
+ if type(checklookups) == "function" then
+ checklookups(data,missing,nofmissing)
+ end
+
+ -- todo: go lowercase
+
+ local collected = false
+ local unicoded = 0
+ for unicode, glyph in next, descriptions do
+ if glyph.class == "ligature" and (force_ligatures or not glyph.unicode) then
+ if not collected then
+ collected = fonts.handlers.otf.readers.getcomponents(data)
+ if not collected then
+ break
+ end
+ end
+ local u = collected[unicode] -- always tables
+ if u then
+ local n = #u
+ for i=1,n do
+ if u[i] > private then
+ n = 0
+ break
+ end
+ end
+ if n > 0 then
+ if n > 1 then
+ glyph.unicode = u
+ else
+ glyph.unicode = u[1]
+ end
+ unicoded = unicoded + 1
+ end
+ end
+ end
+ end
+ if trace_mapping and unicoded > 0 then
+ report_fonts("%n ligature tounicode mappings deduced from gsub ligature features",unicoded)
+ end
+
+ if trace_mapping then
+ for unic, glyph in table.sortedhash(descriptions) do
+ local name = glyph.name
+ local index = glyph.index
+ local unicode = glyph.unicode
+ if unicode then
+ if type(unicode) == "table" then
+ local unicodes = { }
+ for i=1,#unicode do
+ unicodes[i] = formatters("%U",unicode[i])
+ end
+ report_fonts("internal slot %U, name %a, unicode %U, tounicode % t",index,name,unic,unicodes)
+ else
+ report_fonts("internal slot %U, name %a, unicode %U, tounicode %U",index,name,unic,unicode)
+ end
+ else
+ report_fonts("internal slot %U, name %a, unicode %U",index,name,unic)
+ end
+ end
+ end
+ if trace_loading and (ns > 0 or nl > 0) then
+ report_fonts("%s tounicode entries added, ligatures %s",nl+ns,ns)
+ end
+end
+
+-- local parser = makenameparser("Japan1")
+-- local parser = makenameparser()
+-- local function test(str)
+-- local b, a = lpegmatch(parser,str)
+-- print((a and table.serialize(b)) or b)
+-- end
+-- test("a.sc")
+-- test("a")
+-- test("uni1234")
+-- test("uni1234.xx")
+-- test("uni12349876")
+-- test("u123400987600")
+-- test("index1234")
+-- test("Japan1.123")
diff --git a/Master/texmf-dist/tex/context/base/font-mat.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-mat.mkvi
index c8ee2630b5b..2e7c2080d67 100644
--- a/Master/texmf-dist/tex/context/base/font-mat.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-mat.mkvi
@@ -79,27 +79,51 @@
% can be some interference here, which is why we use a different method
% for bold.
+% \def\font_helpers_set_math_family_a
+% {\ifcsname\??fontinstanceready\fontclass -\fontbody-\s!mm-\fontfamily-\fontsize\endcsname \setfalse\c_font_auto_size
+% \csname\??fontinstanceready\fontclass -\fontbody-\s!mm-\fontfamily-\fontsize\endcsname \else
+% \ifcsname\??fontinstanceready\fontclass -\fontbody-\s!mm-\fontfamily \endcsname \settrue \c_font_auto_size
+% \csname\??fontinstanceready\fontclass -\fontbody-\s!mm-\fontfamily \endcsname \else
+% \font_helpers_set_math_family_b
+% \fi\fi}
+
+% \def\font_helpers_set_math_family_b
+% {\ifcsname\??fontinstanceready\defaultfontclass-\fontbody-\s!mm-\fontfamily-\fontsize\endcsname \setfalse\c_font_auto_size
+% \csname\??fontinstanceready\defaultfontclass-\fontbody-\s!mm-\fontfamily-\fontsize\endcsname \else
+% \ifcsname\??fontinstanceready\defaultfontclass-\fontbody-\s!mm-\fontfamily \endcsname \settrue \c_font_auto_size
+% \csname\??fontinstanceready\defaultfontclass-\fontbody-\s!mm-\fontfamily \endcsname \else
+% \font_helpers_set_math_family_c
+% \fi\fi}
+
+% \def\font_helpers_set_math_family_c
+% {\ifcsname\??fontinstanceready \fontbody-\s!mm-\fontfamily-\fontsize\endcsname \setfalse\c_font_auto_size
+% \csname\??fontinstanceready \fontbody-\s!mm-\fontfamily-\fontsize\endcsname \else
+% \ifcsname\??fontinstanceready \fontbody-\s!mm-\fontfamily \endcsname \settrue \c_font_auto_size
+% \csname\??fontinstanceready \fontbody-\s!mm-\fontfamily \endcsname \else
+% \settrue \c_font_auto_size
+% \fi\fi}
+
\def\font_helpers_set_math_family_a
{\ifcsname\??fontinstanceready\fontclass -\fontbody-\s!mm-\fontfamily-\fontsize\endcsname \setfalse\c_font_auto_size
- \csname\??fontinstanceready\fontclass -\fontbody-\s!mm-\fontfamily-\fontsize\endcsname \else
+ \lastnamedcs \else
\ifcsname\??fontinstanceready\fontclass -\fontbody-\s!mm-\fontfamily \endcsname \settrue \c_font_auto_size
- \csname\??fontinstanceready\fontclass -\fontbody-\s!mm-\fontfamily \endcsname \else
+ \lastnamedcs \else
\font_helpers_set_math_family_b
\fi\fi}
\def\font_helpers_set_math_family_b
{\ifcsname\??fontinstanceready\defaultfontclass-\fontbody-\s!mm-\fontfamily-\fontsize\endcsname \setfalse\c_font_auto_size
- \csname\??fontinstanceready\defaultfontclass-\fontbody-\s!mm-\fontfamily-\fontsize\endcsname \else
+ \lastnamedcs \else
\ifcsname\??fontinstanceready\defaultfontclass-\fontbody-\s!mm-\fontfamily \endcsname \settrue \c_font_auto_size
- \csname\??fontinstanceready\defaultfontclass-\fontbody-\s!mm-\fontfamily \endcsname \else
+ \lastnamedcs \else
\font_helpers_set_math_family_c
\fi\fi}
\def\font_helpers_set_math_family_c
{\ifcsname\??fontinstanceready \fontbody-\s!mm-\fontfamily-\fontsize\endcsname \setfalse\c_font_auto_size
- \csname\??fontinstanceready \fontbody-\s!mm-\fontfamily-\fontsize\endcsname \else
+ \lastnamedcs \else
\ifcsname\??fontinstanceready \fontbody-\s!mm-\fontfamily \endcsname \settrue \c_font_auto_size
- \csname\??fontinstanceready \fontbody-\s!mm-\fontfamily \endcsname \else
+ \lastnamedcs \else
\settrue \c_font_auto_size
\fi\fi}
@@ -114,11 +138,19 @@
\let\fontbody\savedfontbody
\setfalse\c_font_auto_size}
+% \def\font_helpers_set_math_family_bold_a#font#mbfam#mrfam%
+% {\ifcsname\??fontinstanceready\fontclass-\fontbody-\s!mm-\fontfamily-\fontsize\endcsname \setfalse\c_font_auto_size
+% \csname\??fontinstanceready\fontclass-\fontbody-\s!mm-\fontfamily-\fontsize\endcsname #font#mbfam\font \else
+% \ifcsname\??fontinstanceready\fontclass-\fontbody-\s!mm-\fontfamily \endcsname \settrue \c_font_auto_size
+% \csname\??fontinstanceready\fontclass-\fontbody-\s!mm-\fontfamily \endcsname #font#mbfam\font \else
+% #font#mbfam#font#mrfam%
+% \fi\fi}
+
\def\font_helpers_set_math_family_bold_a#font#mbfam#mrfam%
{\ifcsname\??fontinstanceready\fontclass-\fontbody-\s!mm-\fontfamily-\fontsize\endcsname \setfalse\c_font_auto_size
- \csname\??fontinstanceready\fontclass-\fontbody-\s!mm-\fontfamily-\fontsize\endcsname #font#mbfam\font \else
+ \lastnamedcs #font#mbfam\font \else
\ifcsname\??fontinstanceready\fontclass-\fontbody-\s!mm-\fontfamily \endcsname \settrue \c_font_auto_size
- \csname\??fontinstanceready\fontclass-\fontbody-\s!mm-\fontfamily \endcsname #font#mbfam\font \else
+ \lastnamedcs #font#mbfam\font \else
#font#mbfam#font#mrfam%
\fi\fi}
@@ -221,7 +253,8 @@
\appendtoks % can be analyzed once
% why here ..
- \edef\m_font_class_direction{\ifcsname\??fontclass\fontclass\s!mm\s!direction\endcsname\csname\??fontclass\fontclass\s!mm\s!direction\endcsname\fi}%
+ %\edef\m_font_class_direction{\ifcsname\??fontclass\fontclass\s!mm\s!direction\endcsname\csname\??fontclass\fontclass\s!mm\s!direction\endcsname\fi}%
+ \edef\m_font_class_direction{\begincsname\??fontclass\fontclass\s!mm\s!direction\endcsname}%
% ...
\ifx\m_font_class_direction\v!both
\settrue\c_font_bidirectional_mathstrategy
@@ -362,8 +395,15 @@
\letvalue{\??fontmathsynchronizer\s!bi }\font_helpers_synchronize_math_family_mb
\letvalue{\??fontmathsynchronizer\empty}\font_helpers_synchronize_math_family_mr
+% \def\font_helpers_synchronize_math_family
+% {\csname\??fontmathsynchronizer\ifcsname\??fontmathsynchronizer\fontalternative\endcsname\fontalternative\fi\endcsname}
+
\def\font_helpers_synchronize_math_family
- {\csname\??fontmathsynchronizer\ifcsname\??fontmathsynchronizer\fontalternative\endcsname\fontalternative\fi\endcsname}
+ {\ifcsname\??fontmathsynchronizer\fontalternative\endcsname
+ \lastnamedcs
+ \else
+ \font_helpers_synchronize_math_family_mr
+ \fi}
\ifdefined \fontid % we need to keep this test for a while
\appendtoks
@@ -385,7 +425,8 @@
\to \t_font_math_strategies
\fi
-\def\font_helpers_synchronize_math_bold_strategy{\csname\??fontmathstoredstrategy\fontclass\endcsname}
+%def\font_helpers_synchronize_math_bold_strategy{\csname\??fontmathstoredstrategy\fontclass\endcsname}
+\def\font_helpers_synchronize_math_bold_strategy{\begincsname\??fontmathstoredstrategy\fontclass\endcsname}
\newconditional\c_font_pseudo_bold_math_state
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-mis.lua b/Master/texmf-dist/tex/context/base/mkiv/font-mis.lua
new file mode 100644
index 00000000000..06bf2204928
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-mis.lua
@@ -0,0 +1,51 @@
+if not modules then modules = { } end modules ['font-mis'] = {
+ version = 1.001,
+ comment = "companion to mtx-fonts",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+fonts = fonts or { }
+
+fonts.helpers = fonts.helpers or { }
+local helpers = fonts.helpers
+
+fonts.handlers = fonts.handlers or { }
+local handlers = fonts.handlers
+
+handlers.otf = handlers.otf or { }
+local otf = handlers.otf
+
+local readers = otf.readers
+
+if readers then
+
+ otf.version = otf.version or 3.018
+ otf.cache = otf.cache or containers.define("fonts", "otl", otf.version, true)
+
+ function fonts.helpers.getfeatures(name,save)
+ local filename = resolvers.findfile(name) or ""
+ if filename ~= "" then
+ local name = file.removesuffix(file.basename(filename))
+ local cleanname = containers.cleanname(name)
+ local data = containers.read(otf.cache,cleanname)
+ if data then
+ readers.unpack(data)
+ else
+ data = readers.loadfont(filename)
+ if data and save then
+ containers.write(otf.cache,cleanname,data)
+ end
+ end
+ return data and data.resources and data.resources.features
+ end
+ end
+
+else
+
+ function fonts.helpers.getfeatures(name)
+ -- not supported
+ end
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-mps.lua b/Master/texmf-dist/tex/context/base/mkiv/font-mps.lua
new file mode 100644
index 00000000000..7b7c859df77
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-mps.lua
@@ -0,0 +1,450 @@
+if not modules then modules = { } end modules ['font-mps'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local concat = table.concat
+local formatters = string.formatters
+
+-- QP0 [QP1] QP2 => CP0 [CP1 CP2] CP3
+
+-- CP0 = QP0
+-- CP3 = QP2
+--
+-- CP1 = QP0 + 2/3 *(QP1-QP0)
+-- CP2 = QP2 + 2/3 *(QP1-QP2)
+
+fonts = fonts or { }
+local metapost = fonts.metapost or { }
+fonts.metapost = metapost
+
+local trace_skips = false trackers.register("metapost.outlines.skips",function(v) trace_skips = v end)
+
+local f_moveto = formatters["(%.4F,%.4F)"]
+local f_lineto = formatters["--(%.4F,%.4F)"]
+local f_curveto = formatters["..controls(%.4F,%.4F)and(%.4F,%.4F)..(%.4F,%.4F)"]
+local s_cycle = "--cycle"
+
+local f_nofill = formatters["nofill %s;"]
+local f_dofill = formatters["fill %s;"]
+
+local f_draw_trace = formatters["drawpathonly %s;"]
+local f_draw = formatters["draw %s;"]
+
+local f_boundingbox = formatters["((%.4F,%.4F)--(%.4F,%.4F)--(%.4F,%.4F)--(%.4F,%.4F)--cycle)"]
+local f_vertical = formatters["((%.4F,%.4F)--(%.4F,%.4F))"]
+
+function metapost.boundingbox(d,factor)
+ local bounds = d.boundingbox
+ local factor = factor or 1
+ local llx = factor*bounds[1]
+ local lly = factor*bounds[2]
+ local urx = factor*bounds[3]
+ local ury = factor*bounds[4]
+ return f_boundingbox(llx,lly,urx,lly,urx,ury,llx,ury)
+end
+
+function metapost.widthline(d,factor)
+ local bounds = d.boundingbox
+ local factor = factor or 1
+ local lly = factor*bounds[2]
+ local ury = factor*bounds[4]
+ local width = factor*d.width
+ return f_vertical(width,lly,width,ury)
+end
+
+function metapost.zeroline(d,factor)
+ local bounds = d.boundingbox
+ local factor = factor or 1
+ local lly = factor*bounds[2]
+ local ury = factor*bounds[4]
+ return f_vertical(0,lly,0,ury)
+end
+
+function metapost.paths(d,xfactor,yfactor)
+ local sequence = d.sequence
+ local segments = d.segments
+ local list = { }
+ local path = { } -- recycled
+ local size = 0
+ local xfactor = xfactor or 1
+ local yfactor = yfactor or xfactor
+ if sequence then
+ local i = 1
+ local n = #sequence
+ while i < n do
+ local operator = sequence[i]
+ if operator == "m" then -- "moveto"
+ if size > 0 then
+ size = size + 1
+ path[size] = s_cycle
+ list[#list+1] = concat(path,"",1,size)
+ size = 1
+ else
+ size = size + 1
+ end
+ path[size] = f_moveto(xfactor*sequence[i+1],yfactor*sequence[i+2])
+ i = i + 3
+ elseif operator == "l" then -- "lineto"
+ size = size + 1
+ path[size] = f_lineto(xfactor*sequence[i+1],yfactor*sequence[i+2])
+ i = i + 3
+ elseif operator == "c" then -- "curveto"
+ size = size + 1
+ path[size] = f_curveto(xfactor*sequence[i+1],yfactor*sequence[i+2],xfactor*sequence[i+3],yfactor*sequence[i+4],xfactor*sequence[i+5],yfactor*sequence[i+6])
+ i = i + 7
+ elseif operator =="q" then -- "quadraticto"
+ size = size + 1
+ -- first is always a moveto
+ local l_x, l_y = xfactor*sequence[i-2], yfactor*sequence[i-1]
+ local m_x, m_y = xfactor*sequence[i+1], yfactor*sequence[i+2]
+ local r_x, r_y = xfactor*sequence[i+3], yfactor*sequence[i+4]
+ path[size] = f_curveto (
+ l_x + 2/3 * (m_x-l_x),
+ l_y + 2/3 * (m_y-l_y),
+ r_x + 2/3 * (m_x-r_x),
+ r_y + 2/3 * (m_y-r_y),
+ r_x, r_y
+ )
+ i = i + 5
+ else
+ -- weird
+ i = i + 1
+ end
+ end
+ elseif segments then
+ for i=1,#segments do
+ local segment = segments[i]
+ local operator = segment[#segment]
+ if operator == "m" then -- "moveto"
+ if size > 0 then
+ size = size + 1
+ path[size] = s_cycle
+ list[#list+1] = concat(path,"",1,size)
+ size = 1
+ else
+ size = size + 1
+ end
+ path[size] = f_moveto(xfactor*segment[1],yfactor*segment[2])
+ elseif operator == "l" then -- "lineto"
+ size = size + 1
+ path[size] = f_lineto(xfactor*segment[1],yfactor*segment[2])
+ elseif operator == "c" then -- "curveto"
+ size = size + 1
+ path[size] = f_curveto(xfactor*segment[1],yfactor*segment[2],xfactor*segment[3],yfactor*segment[4],xfactor*segment[5],yfactor*segment[6])
+ elseif operator =="q" then -- "quadraticto"
+ size = size + 1
+ -- first is always a moveto
+ local prev = segments[i-1]
+ local l_x, l_y = xfactor*prev[#prev-2], yfactor*prev[#prev-1]
+ local m_x, m_y = xfactor*segment[1], yfactor*segment[2]
+ local r_x, r_y = xfactor*segment[3], yfactor*segment[4]
+ path[size] = f_curveto (
+ l_x + 2/3 * (m_x-l_x),
+ l_y + 2/3 * (m_y-l_y),
+ r_x + 2/3 * (m_x-r_x),
+ r_y + 2/3 * (m_y-r_y),
+ r_x, r_y
+ )
+ else
+ -- weird
+ end
+ end
+ else
+ return
+ end
+ if size > 0 then
+ size = size + 1
+ path[size] = s_cycle
+ list[#list+1] = concat(path,"",1,size)
+ end
+ return list
+end
+
+function metapost.fill(paths)
+ local r = { }
+ local n = #paths
+ for i=1,n do
+ if i < n then
+ r[i] = f_nofill(paths[i])
+ else
+ r[i] = f_dofill(paths[i])
+ end
+ end
+ return concat(r)
+end
+
+function metapost.draw(paths,trace)
+ local r = { }
+ local n = #paths
+ for i=1,n do
+ if trace then
+ r[i] = f_draw_trace(paths[i])
+ else
+ r[i] = f_draw(paths[i])
+ end
+ end
+ return concat(r)
+end
+
+function metapost.maxbounds(data,index,factor)
+ local maxbounds = data.maxbounds
+ local factor = factor or 1
+ local glyphs = data.glyphs
+ local glyph = glyphs[index]
+ local boundingbox = glyph.boundingbox
+ local xmin, ymin, xmax, ymax
+ if not maxbounds then
+ xmin, ymin, xmax, ymax = 0, 0, 0, 0
+ for i=1,#glyphs do
+ local d = glyphs[i]
+ if d then
+ local b = d.boundingbox
+ if b then
+ if b[1] < xmin then xmin = b[1] end
+ if b[2] < ymin then ymin = b[2] end
+ if b[3] > xmax then xmax = b[3] end
+ if b[4] > ymax then ymax = b[4] end
+ end
+ end
+ end
+ maxbounds = { xmin, ymin, xmax, ymax }
+ data.maxbounds = maxbounds
+ else
+ xmin = maxbounds[1]
+ ymin = maxbounds[2]
+ xmax = maxbounds[3]
+ ymax = maxbounds[4]
+ end
+ local llx = boundingbox[1]
+ local lly = boundingbox[2]
+ local urx = boundingbox[3]
+ local ury = boundingbox[4]
+ local width = glyph.width
+ if llx > 0 then
+ llx = 0
+ end
+ if width > urx then
+ urx = width
+ end
+ return f_boundingbox(
+ factor*llx,factor*ymin,
+ factor*urx,factor*ymin,
+ factor*urx,factor*ymax,
+ factor*llx,factor*ymax
+ )
+end
+
+----- formatters = string.formatters
+----- concat = table.concat
+
+local nodecodes = nodes.nodecodes -- no nuts yet
+
+local glyph_code = nodecodes.glyph
+local disc_code = nodecodes.disc
+local kern_code = nodecodes.kern
+local glue_code = nodecodes.glue
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local rule_code = nodecodes.rule
+local penalty_code = nodecodes.penalty
+
+local find_tail = nodes.tail
+
+----- metapost = fonts.glyphs.metapost
+
+local characters = fonts.hashes.characters
+local quaddata = fonts.hashes.emwidths
+local shapes = fonts.hashes.shapes
+local topaths = metapost.paths
+
+local f_code = formatters["mfun_do_outline_text_flush(%q,%i,%.4F,%.4F)(%,t);"]
+local s_nothing = "(origin scaled 10)"
+local f_trace_rule = formatters["draw rule(%6F,%6F,%6F) shifted (%6F,%6F) withcolor .5white;"]
+local f_strut = formatters["strut(%6F,%6F);"]
+local f_hrule = formatters["draw rule(%6F,%6F,%6F);"]
+local f_vrule = formatters["draw rule(%6F,%6F,%6F) shifted (%6F,%6F);"]
+local f_bounds = formatters["checkbounds(%6F,%6F,%6F,%6F);"]
+
+local sc = 10
+local fc = number.dimenfactors.bp * sc / 10
+
+-- todo: make the next more efficient:
+
+function metapost.output(kind,font,char,advance,shift,ex)
+ local character = characters[font][char]
+ if character then
+ local index = character.index
+ if index then
+ local shapedata = shapes[font]
+ local glyphs = shapedata.glyphs -- todo: subfonts fonts.shapes.indexed(font,sub)
+ if glyphs then
+ local glyf = glyphs[index]
+ if glyf then
+ local units = shapedata.units or 1000
+ local yfactor = sc/units
+ local xfactor = yfactor
+ local shift = shift or 0
+ local advance = advance or 0
+ local exfactor = ex or 0
+ local wfactor = 1
+ if exfactor ~= 0 then
+ wfactor = (1+(ex/units)/1000)
+ xfactor = xfactor * wfactor
+ end
+ local paths = topaths(glyf,xfactor,yfactor)
+ local code = f_code(kind,#paths,advance,shift,paths)
+ return code, character.width * fc * wfactor
+ end
+ end
+ end
+ end
+ return s_nothing, 10 * sc/1000
+end
+
+-- not ok yet: leftoffset in framed not handled well
+
+local signal = -0x3FFFFFFF - 1
+
+function fonts.metapost.boxtomp(n,kind)
+
+ local result = { }
+ local advance = 0 -- in bp
+ local distance = 0
+
+ local llx, lly, urx, ury = 0, 0, 0, 0
+
+ local boxtomp
+
+ local function horizontal(current,shift,glue_sign,glue_set,glue_order,ht,dp)
+ shift = shift or 0
+ while current do
+ local id = current.id
+ if id == glyph_code then
+ local code, width = metapost.output(kind,current.font,current.char,advance,-shift*fc,current.expansion_factor)
+ result[#result+1] = code
+ advance = advance + width
+ elseif id == disc_code then
+ local replace = current.replace
+ if replace then
+ horizontal(replace,shift,glue_sign,glue_set,glue_order,ht,dp)
+ end
+ elseif id == kern_code then
+ local kern = current.kern * fc
+ if trace_skips then
+ result[#result+1] = f_trace_rule(kern,0.8*ht*fc,0.8*dp*fc,advance,-shift*fc)
+ end
+ advance = advance + kern
+ elseif id == glue_code then
+ local width = current.width
+ if glue_sign == 1 then
+ if current.stretch_order == glue_order then
+ width = (width + current.stretch * glue_set) * fc
+ else
+ width = width * fc
+ end
+ elseif glue_sign == 2 then
+ if current.shrink_order == glue_order then
+ width = (width - current.shrink * glue_set) * fc
+ else
+ width = width * fc
+ end
+ else
+ width = width * fc
+ end
+ if trace_skips then
+ result[#result+1] = f_trace_rule(width,0.1*ht*fc,0.1*dp*fc,advance,-shift*fc)
+ end
+ advance = advance + width
+ elseif id == hlist_code then
+ local a = advance
+ boxtomp(current,shift+current.shift,current.glue_sign,current.glue_set,current.glue_order)
+ advance = a + current.width * fc
+ elseif id == vlist_code then
+ boxtomp(current) -- ,distance + shift,current.glue_set*current.glue_sign)
+ advance = advance + current.width * fc
+ elseif id == rule_code then
+ local wd = current.width
+ local ht = current.height
+ local dp = current.depth
+ if not (ht == signal or dp == signal or wd == signal) then
+ ht = ht - shift
+ dp = dp - shift
+ if wd == 0 then
+ result[#result+1] = f_strut(ht*fc,-dp*fc)
+ else
+ result[#result+1] = f_hrule(wd*fc,ht*fc,-dp*fc)
+ end
+ end
+ if wd ~= signal then
+ advance = advance + wd * fc
+ end
+ end
+ current = current.next
+ end
+ end
+
+ local function vertical(current,shift)
+ shift = shift or 0
+ current = find_tail(current) -- otherwise bad bbox
+ while current do
+ local id = current.id
+ if id == hlist_code then
+ distance = distance - current.depth
+ boxtomp(current,distance + shift,current.glue_set*current.glue_sign)
+ distance = distance - current.height
+ elseif id == vlist_code then
+ print("vertical >>>")
+ vertical(current.list,0)
+ elseif id == kern_code then
+ distance = distance - current.kern
+ advance = 0
+ elseif id == glue_code then
+ distance = distance - current.width
+ advance = 0
+ elseif id == rule_code then
+ local wd = current.width
+ local ht = current.height
+ local dp = current.depth
+ if not (ht == signal or dp == signal or wd == signal) then
+ distance = distance - dp
+ if wd == 0 then
+ result[#result+1] = f_strut(ht*fc,-dp*fc)
+ else
+ result[#result+1] = f_vrule(wd*fc,ht*fc,-dp*fc,0,distance+shift)
+ end
+ distance = distance - ht
+ end
+ end
+ current = current.prev
+ end
+ end
+
+ boxtomp = function(list,shift)
+ local current = list.list
+ if current then
+ if list.id == hlist_code then
+ horizontal(current,shift,list.glue_sign,list.glue_set,list.glue_order,list.height,list.depth)
+ else
+ vertical(current,shift)
+ end
+ end
+ end
+
+ local box = tex.box[n]
+
+ boxtomp(box,box.shift,box.glue_sign,box.glue_set,box.glue_order)
+
+ local wd = box.width
+ local ht = box.height
+ local dp = box.depth
+ local sh = box.shift
+
+ result[#result+1] = f_bounds(0,-dp*fc,wd*fc,ht*fc)
+
+ return concat(result)
+
+end
diff --git a/Master/texmf-dist/tex/context/base/font-nod.lua b/Master/texmf-dist/tex/context/base/mkiv/font-nod.lua
index e2000be7ebd..7f30b6d5cbd 100644
--- a/Master/texmf-dist/tex/context/base/font-nod.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-nod.lua
@@ -42,7 +42,6 @@ local step_tracers = tracers.steppers or { }
tracers.steppers = step_tracers
local nodecodes = nodes.nodecodes
-local whatcodes = nodes.whatcodes
local glyph_code = nodecodes.glyph
local hlist_code = nodecodes.hlist
@@ -51,17 +50,14 @@ local disc_code = nodecodes.disc
local glue_code = nodecodes.glue
local kern_code = nodecodes.kern
local rule_code = nodecodes.rule
-local whatsit_code = nodecodes.whatsit
-
-local localpar_code = whatcodes.localpar
-local dir_code = whatcodes.dir
+local dir_code = nodecodes.dir
+local localpar_code = nodecodes.localpar
local nuts = nodes.nuts
local tonut = nuts.tonut
local tonode = nuts.tonode
local getfield = nuts.getfield
-local setfield = nuts.setfield
local getnext = nuts.getnext
local getprev = nuts.getprev
local getid = nuts.getid
@@ -69,7 +65,13 @@ local getfont = nuts.getfont
local getsubtype = nuts.getsubtype
local getchar = nuts.getchar
local getlist = nuts.getlist
+local getdisc = nuts.getdisc
+local isglyph = nuts.isglyph
+
+local setfield = nuts.setfield
local setbox = nuts.setbox
+local setchar = nuts.setchar
+local setsubtype = nuts.setsubtype
local copy_node_list = nuts.copy_list
local hpack_node_list = nuts.hpack
@@ -116,14 +118,12 @@ function char_tracers.collect(head,list,tag,n)
n = n or 0
local ok, fn = false, nil
while head do
- local id = getid(head)
- if id == glyph_code then
+ local c, id = isglyph(head)
+ if c then
local f = getfont(head)
if f ~= fn then
ok, fn = false, f
end
- local c = getchar(head)
- -- local i = fontidentifiers[f].indices[c] or 0 -- zero anyway as indices is nilled
if not ok then
ok = true
n = n + 1
@@ -135,19 +135,17 @@ function char_tracers.collect(head,list,tag,n)
l[#l+1] = { c, f }
elseif id == disc_code then
-- skip
--- local replace = getfield(head,"replace")
+-- local pre, post, replace = getdisc(head)
-- if replace then
-- for n in traverse_id(glyph_code,replace) do
-- l[#l+1] = { c, f }
-- end
-- end
--- local pre = getfield(head,"pre")
-- if pre then
-- for n in traverse_id(glyph_code,pre) do
-- l[#l+1] = { c, f }
-- end
-- end
--- local post = getfield(head,"post")
-- if post then
-- for n in traverse_id(glyph_code,post) do
-- l[#l+1] = { c, f }
@@ -184,6 +182,7 @@ function char_tracers.string(t)
end
local f_unicode = formatters["%U"]
+local f_badcode = formatters["{%i}"]
function char_tracers.unicodes(t,decimal)
local tt = { }
@@ -325,10 +324,8 @@ function step_tracers.features()
end
function tracers.fontchar(font,char)
- local n = new_glyph()
- setfield(n,"font",font)
- setfield(n,"char",char)
- setfield(n,"subtype",256)
+ local n = new_glyph(font,char)
+ setsubtype(n,256)
context(tonode(n))
end
@@ -362,13 +359,14 @@ function step_tracers.codes(i,command,space)
local c = collection[i]
local function showchar(c)
+ local f = getfont(c)
+ local c = getchar(c)
if command then
- local f, c = getfont(c), getchar(c)
local d = fontdescriptions[f]
local d = d and d[c]
context[command](f,c,d and d.class or "")
else
- context("[%s:U+%04X]",getfont(c),getchar(c))
+ context("[%s:U+%05X]",f,c)
end
end
@@ -393,12 +391,10 @@ function step_tracers.codes(i,command,space)
local id = getid(c)
if id == glyph_code then
showchar(c)
- elseif id == whatsit_code and (getsubtype(c) == localpar_code or getsubtype(c) == dir_code) then
+ elseif id == dir_code or id == localpar_code then
context("[%s]",getfield(c,"dir"))
elseif id == disc_code then
- local pre = getfield(c,"pre")
- local post = getfield(c,"post")
- local replace = getfield(c,"replace")
+ local pre, post, replace = getdisc(c)
if pre or post or replace then
context("[")
context[space]()
@@ -482,13 +478,12 @@ local threshold = 65536
local function toutf(list,result,nofresult,stopcriterium)
if list then
for n in traverse_nodes(tonut(list)) do
- local id = getid(n)
- if id == glyph_code then
+ local c, id = isglyph(n)
+ if c then
local components = getfield(n,"components")
if components then
result, nofresult = toutf(components,result,nofresult)
- else
- local c = getchar(n)
+ elseif c > 0 then
local fc = fontcharacters[getfont(n)]
if fc then
local fcc = fc[c]
@@ -514,6 +509,9 @@ local function toutf(list,result,nofresult,stopcriterium)
nofresult = nofresult + 1
result[nofresult] = f_unicode(c)
end
+ else
+ nofresult = nofresult + 1
+ result[nofresult] = f_badcode(c)
end
elseif id == disc_code then
result, nofresult = toutf(getfield(n,"replace"),result,nofresult) -- needed?
diff --git a/Master/texmf-dist/tex/context/base/font-odk.lua b/Master/texmf-dist/tex/context/base/mkiv/font-odk.lua
index c34efc1203e..c34efc1203e 100644
--- a/Master/texmf-dist/tex/context/base/font-odk.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-odk.lua
diff --git a/Master/texmf-dist/tex/context/base/font-odv.lua b/Master/texmf-dist/tex/context/base/mkiv/font-odv.lua
index 2ef1aabe7ea..6b9a5a9e42a 100644
--- a/Master/texmf-dist/tex/context/base/font-odv.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-odv.lua
@@ -113,13 +113,14 @@ local tonode = nuts.tonode
local tonut = nuts.tonut
local getnext = nuts.getnext
+local setnext = nuts.setnext
local getprev = nuts.getprev
+local setprev = nuts.setprev
local getid = nuts.getid
local getchar = nuts.getchar
+local setchar = nuts.setchar
local getfont = nuts.getfont
local getsubtype = nuts.getsubtype
-local getfield = nuts.getfield
-local setfield = nuts.setfield
local getprop = nuts.getprop
local setprop = nuts.setprop
@@ -638,8 +639,7 @@ local function deva_initialize(font,attr)
-- deva
vattu = true
-- dev2
- -- local subtables = sequence.subtables -- dataset[5].subtables
- local subtables = dataset[5].subtables
+ local subtables = dataset[3].subtables
for i=1,#subtables do
local lookupname = subtables[i]
local lookupcache = lookuphash[lookupname]
@@ -717,8 +717,8 @@ local function deva_reorder(head,start,stop,font,attr,nbspaces)
copyinjection(tempcurrent,next)
local nextcurrent = copy_node(current)
copyinjection(nextcurrent,current) -- KE: necessary? HH: probably not as positioning comes later and we rawget/set
- setfield(tempcurrent,"next",nextcurrent)
- setfield(nextcurrent,"prev",tempcurrent)
+ setnext(tempcurrent,nextcurrent)
+ setprev(nextcurrent,tempcurrent)
setprop(tempcurrent,a_state,s_blwf)
tempcurrent = processcharacters(tempcurrent,font)
setprop(tempcurrent,a_state,unsetvalue)
@@ -726,14 +726,14 @@ local function deva_reorder(head,start,stop,font,attr,nbspaces)
flush_list(tempcurrent)
local n = copy_node(current)
copyinjection(n,current) -- KE: necessary? HH: probably not as positioning comes later and we rawget/set
- setfield(current,"char",dotted_circle)
+ setchar(current,dotted_circle)
head = insert_node_after(head, current, n)
else
- setfield(current,"char",getchar(tempcurrent)) -- we assumes that the result of blwf consists of one node
+ setchar(current,getchar(tempcurrent)) -- we assumes that the result of blwf consists of one node
local freenode = getnext(current)
- setfield(current,"next",tmp)
+ setnext(current,tmp)
if tmp then
- setfield(tmp,"prev",current)
+ setprev(tmp,current)
end
free_node(freenode)
flush_list(tempcurrent)
@@ -787,14 +787,14 @@ local function deva_reorder(head,start,stop,font,attr,nbspaces)
-- local np = getprev(n)
local nn = getnext(n)
local ln = getnext(lastcons) -- what if lastcons is nn ?
- setfield(np,"next",nn)
- setfield(nn,"prev",np)
- setfield(lastcons,"next",n)
+ setnext(np,nn)
+ setprev(nn,np)
+ setnext(lastcons,n)
if ln then
- setfield(ln,"prev",n)
+ setprev(ln,n)
end
- setfield(n,"next",ln)
- setfield(n,"prev",lastcons)
+ setnext(n,ln)
+ setprev(n,lastcons)
if lastcons == stop then
stop = n
end
@@ -818,14 +818,14 @@ local function deva_reorder(head,start,stop,font,attr,nbspaces)
local nn = getnext(n)
local mn = getnext(matra)
if sp then
- setfield(sp,"next",nn)
+ setnext(sp,nn)
end
- setfield(nn,"prev",sp)
- setfield(matra,"next",start)
- setfield(start,"prev",matra)
- setfield(n,"next",mn)
+ setprev(nn,sp)
+ setnext(matra,start)
+ setprev(start,matra)
+ setnext(n,mn)
if mn then
- setfield(mn,"prev",n)
+ setprev(mn,n)
end
if head == start then
head = nn
@@ -900,20 +900,20 @@ local function deva_reorder(head,start,stop,font,attr,nbspaces)
-- move pre-base matras...
if pre_mark[getchar(cn)] then
if bp then
- setfield(bp,"next",cn)
+ setnext(bp,cn)
end
local next = getnext(cn)
local prev = getprev(cn)
if next then
- setfield(next,"prev",prev)
+ setprev(next,prev)
end
- setfield(prev,"next",next)
+ setnext(prev,next)
if cn == stop then
stop = prev
end
- setfield(cn,"prev",bp)
- setfield(cn,"next",firstcons)
- setfield(firstcons,"prev",cn)
+ setprev(cn,bp)
+ setnext(cn,firstcons)
+ setprev(firstcons,cn)
if firstcons == start then
if head == start then
head = cn
@@ -959,34 +959,34 @@ local function deva_reorder(head,start,stop,font,attr,nbspaces)
end
local prev = getprev(current)
if prev then
- setfield(prev,"next",n)
+ setnext(prev,n)
end
if n then
- setfield(n,"prev",prev)
+ setprev(n,prev)
end
local next = getnext(b)
- setfield(c,"next",next)
+ setnext(c,next)
if next then
- setfield(next,"prev",c)
+ setprev(next,c)
end
- setfield(c,"next",next)
- setfield(b,"next",current)
- setfield(current,"prev",b)
+ setnext(c,next)
+ setnext(b,current)
+ setprev(current,b)
end
elseif cns and getnext(cns) ~= current then -- todo: optimize next
-- position below-base Ra (vattu) following the consonants on which it is placed (either the base consonant or one of the pre-base consonants)
local cp, cnsn = getprev(current), getnext(cns)
if cp then
- setfield(cp,"next",n)
+ setnext(cp,n)
end
if n then
- setfield(n,"prev",cp)
+ setprev(n,cp)
end
- setfield(cns,"next",current)
- setfield(current,"prev",cns)
- setfield(c,"next",cnsn)
+ setnext(cns,current)
+ setprev(current,cns)
+ setnext(c,cnsn)
if cnsn then
- setfield(cnsn,"prev",c)
+ setprev(cnsn,c)
end
if c == stop then
stop = cp
@@ -1048,11 +1048,11 @@ function handlers.devanagari_reorder_matras(head,start,kind,lookupname,replaceme
head = remove_node(head,start)
local next = getnext(current)
if next then
- setfield(next,"prev",start)
+ setprev(next,start)
end
- setfield(start,"next",next)
- setfield(current,"next",start)
- setfield(start,"prev",current)
+ setnext(start,next)
+ setnext(current,start)
+ setprev(start,current)
start = startnext
break
end
@@ -1103,11 +1103,11 @@ function handlers.devanagari_reorder_reph(head,start,kind,lookupname,replacement
head = remove_node(head,start)
local next = getnext(current)
if next then
- setfield(next,"prev",start)
+ setprev(next,start)
end
- setfield(start,"next",next)
- setfield(current,"next",start)
- setfield(start,"prev",current)
+ setnext(start,next)
+ setnext(current,start)
+ setprev(start,current)
start = startnext
startattr = getprop(start,a_syllabe)
break
@@ -1121,10 +1121,10 @@ function handlers.devanagari_reorder_reph(head,start,kind,lookupname,replacement
startnext = getnext(start)
head = remove_node(head,start)
local prev = getprev(current)
- setfield(start,"prev",prev)
- setfield(prev,"next",start)
- setfield(start,"next",current)
- setfield(current,"prev",start)
+ setprev(start,prev)
+ setnext(prev,start)
+ setnext(start,current)
+ setprev(current,start)
start = startnext
startattr = getprop(start,a_syllabe)
break
@@ -1153,10 +1153,10 @@ function handlers.devanagari_reorder_reph(head,start,kind,lookupname,replacement
startnext = getnext(start)
head = remove_node(head,start)
local prev = getprev(c)
- setfield(start,"prev",prev)
- setfield(prev,"next",start)
- setfield(start,"next",c)
- setfield(c,"prev",start)
+ setprev(start,prev)
+ setnext(prev,start)
+ setnext(start,c)
+ setprev(c,start)
-- end
start = startnext
startattr = getprop(start,a_syllabe)
@@ -1175,11 +1175,11 @@ function handlers.devanagari_reorder_reph(head,start,kind,lookupname,replacement
head = remove_node(head,start)
local next = getnext(current)
if next then
- setfield(next,"prev",start)
+ setprev(next,start)
end
- setfield(start,"next",next)
- setfield(current,"next",start)
- setfield(start,"prev",current)
+ setnext(star,next)
+ setnext(current,start)
+ setprev(start,current)
start = startnext
end
end
@@ -1218,11 +1218,11 @@ function handlers.devanagari_reorder_pre_base_reordering_consonants(head,start,k
removenode(start,start)
local next = getnext(current)
if next then
- setfield(next,"prev",start)
+ setprev(next,start)
end
- setfield(start,"next",next)
- setfield(current,"next",start)
- setfield(start,"prev",current)
+ setnext(start,next)
+ setnext(current,start)
+ setprev(start,current)
start = startnext
break
end
@@ -1236,10 +1236,10 @@ function handlers.devanagari_reorder_pre_base_reordering_consonants(head,start,k
startnext = getnext(start)
removenode(start,start)
local prev = getprev(current)
- setfield(start,"prev",prev)
- setfield(prev,"next",start)
- setfield(start,"next",current)
- setfield(current,"prev",start)
+ setprev(start,prev)
+ setnext(prev,start)
+ setnext(start,current)
+ setprev(current,start)
start = startnext
break
end
@@ -1261,12 +1261,12 @@ function handlers.devanagari_remove_joiners(head,start,kind,lookupname,replaceme
end
end
if stop then
- setfield(getfield(stop,"prev"),"next",nil)
- setfield(stop,"prev",getprev(start))
+ setnext(getprev(stop),nil)
+ setprev(stop,getprev(start))
end
local prev = getprev(start)
if prev then
- setfield(prev,"next",stop)
+ setnext(prev,stop)
end
if head == start then
head = stop
@@ -1317,8 +1317,7 @@ local function dev2_initialize(font,attr)
local kind = dataset[4]
if kind and valid[kind] then
-- could become a function call
- -- local subtables = sequence.subtables
- local subtables = dataset[5].subtables
+ local subtables = dataset[3].subtables
for i=1,#subtables do
local lookupname = subtables[i]
local lookupcache = lookuphash[lookupname]
@@ -1568,7 +1567,7 @@ local function dev2_reorder(head,start,stop,font,attr,nbspaces) -- maybe do a pa
next = getnext(current)
local tmp = getnext(next)
local changestop = next == stop
- setfield(next,"next",nil)
+ setnext(next,nil)
setprop(current,a_state,s_pref)
current = processcharacters(current,font)
setprop(current,a_state,s_blwf)
@@ -1577,13 +1576,13 @@ local function dev2_reorder(head,start,stop,font,attr,nbspaces) -- maybe do a pa
current = processcharacters(current,font)
setprop(current,a_state,unsetvalue)
if halant[getchar(current)] then
- setfield(getnext(current),"next",tmp)
+ setnext(getnext(current),tmp)
local nc = copy_node(current)
copyinjection(nc,current)
- setfield(current,"char",dotted_circle)
+ setchar(current,dotted_circle)
head = insert_node_after(head,current,nc)
else
- setfield(current,"next",tmp) -- assumes that result of pref, blwf, or pstf consists of one node
+ setnext(current,tmp) -- assumes that result of pref, blwf, or pstf consists of one node
if changestop then
stop = current
end
@@ -1649,8 +1648,8 @@ if tpm then
local extra = copy_node(current)
copyinjection(extra,current)
char = tpm[1]
- setfield(current,"char",char)
- setfield(extra,"char",tpm[2])
+ setchar(current,char)
+ setchar(extra,tpm[2])
head = insert_node_after(head,current,extra)
end
--
@@ -1660,10 +1659,10 @@ end
local prev = getprev(current)
local next = getnext(current)
if prev then
- setfield(prev,"next",next)
+ setnext(prev,next)
end
if next then
- setfield(next,"prev",prev)
+ setprev(next,prev)
end
if current == stop then
stop = getprev(current)
@@ -1676,11 +1675,11 @@ end
end
local prev = getprev(halfpos)
if prev then
- setfield(prev,"next",current)
+ setnext(prev,current)
end
- setfield(current,"prev",prev)
- setfield(halfpos,"prev",current)
- setfield(current,"next",halfpos)
+ setprev(current,prev)
+ setprev(halfpos,current)
+ setnext(current,halfpos)
halfpos = current
elseif above_mark[char] then -- After main consonant
target = basepos
@@ -1706,21 +1705,21 @@ end
if prev ~= target then
local next = getnext(current)
if prev then -- not needed, already tested with target
- setfield(prev,"next",next)
+ setnext(prev,next)
end
if next then
- setfield(next,"prev",prev)
+ setprev(next,prev)
end
if current == stop then
stop = prev
end
local next = getnext(target)
if next then
- setfield(next,"prev",current)
+ setprev(next,current)
end
- setfield(current,"next",next)
- setfield(target,"next",current)
- setfield(current,"prev",target)
+ setnext(current,next)
+ setnext(target,current)
+ setprev(current,target)
end
end
end
@@ -1749,17 +1748,17 @@ end
end
local prev = getprev(c)
if prev then
- setfield(prev,"next",next)
+ setnext(prev,next)
end
- setfield(next,"prev",prev)
+ setprev(next,prev)
local nextnext = getnext(next)
- setfield(current,"next",nextnext)
+ setnext(current,nextnext)
local nextnextnext = getnext(nextnext)
if nextnextnext then
- setfield(nextnextnext,"prev",current)
+ setprev(nextnextnext,current)
end
- setfield(c,"prev",nextnext)
- setfield(nextnext,"next",c)
+ setprev(c,nextnext)
+ setnext(nextnext,c)
end
if stop == current then break end
current = getnext(current)
@@ -2084,9 +2083,9 @@ local function inject_syntax_error(head,current,mark)
local signal = copy_node(current)
copyinjection(signal,current)
if mark == pre_mark then
- setfield(signal,"char",dotted_circle)
+ setchar(signal,dotted_circle)
else
- setfield(current,"char",dotted_circle)
+ setchar(current,dotted_circle)
end
return insert_node_after(head,current,signal)
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-off.lua b/Master/texmf-dist/tex/context/base/mkiv/font-off.lua
new file mode 100644
index 00000000000..82426552ec0
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-off.lua
@@ -0,0 +1,229 @@
+if not modules then modules = { } end modules ['font-off'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local lower = string.lower
+local round = math.round
+local setmetatableindex = table.setmetatableindex
+
+local fontloader = fontloader
+local font_to_table = fontloader.to_table
+local open_font = fontloader.open
+local get_font_info = fontloader.info
+local close_font = fontloader.close
+local font_fields = fontloader.fields
+
+-- table={
+-- ["familyname"]="TeXGyrePagella",
+-- ["fontname"]="TeXGyrePagella-Regular",
+-- ["fullname"]="TeXGyrePagella-Regular",
+-- ["italicangle"]=0,
+-- ["names"]={
+-- {
+-- ["lang"]="English (US)",
+-- ["names"]={
+-- ["copyright"]="Copyright 2006, 2009 for TeX Gyre extensions by B. Jackowski and J.M. Nowacki (on behalf of TeX users groups). This work is released under the GUST Font License -- see http://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt for details.",
+-- ["family"]="TeXGyrePagella",
+-- ["fullname"]="TeXGyrePagella-Regular",
+-- ["postscriptname"]="TeXGyrePagella-Regular",
+-- ["preffamilyname"]="TeX Gyre Pagella",
+-- ["subfamily"]="Regular",
+-- ["trademark"]="Please refer to the Copyright section for the font trademark attribution notices.",
+-- ["uniqueid"]="2.004;UKWN;TeXGyrePagella-Regular",
+-- ["version"]="Version 2.004;PS 2.004;hotconv 1.0.49;makeotf.lib2.0.14853",
+-- },
+-- },
+-- },
+-- ["pfminfo"]={
+-- ["avgwidth"]=528,
+-- ["codepages"]={ 536871315, 0 },
+-- ["firstchar"]=32,
+-- ["fstype"]=12,
+-- ["hhead_ascent"]=1098,
+-- ["hhead_descent"]=-283,
+-- ["hheadascent_add"]=0,
+-- ["hheaddescent_add"]=0,
+-- ["hheadset"]=1,
+-- ["lastchar"]=64260,
+-- ["linegap"]=0,
+-- ["os2_breakchar"]=32,
+-- ["os2_capheight"]=692,
+-- ["os2_defaultchar"]=0,
+-- ["os2_family_class"]=0,
+-- ["os2_strikeypos"]=269,
+-- ["os2_strikeysize"]=50,
+-- ["os2_subxoff"]=0,
+-- ["os2_subxsize"]=650,
+-- ["os2_subyoff"]=75,
+-- ["os2_subysize"]=600,
+-- ["os2_supxoff"]=0,
+-- ["os2_supxsize"]=650,
+-- ["os2_supyoff"]=350,
+-- ["os2_supysize"]=600,
+-- ["os2_typoascent"]=726,
+-- ["os2_typodescent"]=-274,
+-- ["os2_typolinegap"]=200,
+-- ["os2_vendor"]="UKWN",
+-- ["os2_winascent"]=1098,
+-- ["os2_windescent"]=283,
+-- ["os2_xheight"]=449,
+-- ["panose"]={
+-- ["armstyle"]="Any",
+-- ["contrast"]="Any",
+-- ["familytype"]="Any",
+-- ["letterform"]="Any",
+-- ["midline"]="Any",
+-- ["proportion"]="Any",
+-- ["serifstyle"]="Any",
+-- ["strokevariation"]="Any",
+-- ["weight"]="Book",
+-- ["xheight"]="Any",
+-- },
+-- ["panose_set"]=1,
+-- ["pfmfamily"]=81,
+-- ["pfmset"]=1,
+-- ["subsuper_set"]=1,
+-- ["typoascent_add"]=0,
+-- ["typodescent_add"]=0,
+-- ["unicoderanges"]={ 536871047, 0, 0, 0 },
+-- ["vheadset"]=0,
+-- ["vlinegap"]=0,
+-- ["weight"]=400,
+-- ["width"]=5,
+-- ["winascent_add"]=0,
+-- ["windescent_add"]=0,
+-- },
+-- ["units_per_em"]=1000,
+-- ["version"]="2.004;PS 2.004;hotconv 1.0.49;makeotf.lib2.0.14853",
+-- ["weight"]="Book",
+-- }
+
+-- We had this as temporary solution because we needed a bit more info but in the
+-- meantime it got an interesting side effect: currently luatex delays loading of e.g.
+-- glyphs so here we first load and then discard which is a waste. In the past it did
+-- free memory because a full load was done. One of these things that goes unnoticed.
+--
+-- local function get_full_info(...) -- check with taco what we get / could get
+-- local ff = open_font(...)
+-- if ff then
+-- local d = ff -- and font_to_table(ff)
+-- d.glyphs, d.subfonts, d.gpos, d.gsub, d.lookups = nil, nil, nil, nil, nil
+-- close_font(ff)
+-- return d
+-- else
+-- return nil, "error in loading font"
+-- end
+-- end
+
+-- Phillip suggested this faster variant but it's still a hack as fontloader.info should
+-- return these keys/values (and maybe some more) but at least we close the loader which
+-- might save some memory in the end.
+
+-- local function get_full_info(name)
+-- local ff = open_font(name)
+-- if ff then
+-- local fields = table.tohash(font_fields(ff),true) -- isn't that one stable
+-- local d = {
+-- names = fields.names and ff.names,
+-- familyname = fields.familyname and ff.familyname,
+-- fullname = fields.fullname and ff.fullname,
+-- fontname = fields.fontname and ff.fontname,
+-- weight = fields.weight and ff.weight,
+-- italicangle = fields.italicangle and ff.italicangle,
+-- units = fields.units_per_em and ff.units_per_em,
+-- designsize = fields.design_size and ff.design_size,
+-- minsize = fields.design_range_bottom and ff.design_range_bottom,
+-- maxsize = fields.design_range_top and ff.design_range_top,
+-- italicangle = fields.italicangle and ff.italicangle,
+-- pfmweight = pfminfo and pfminfo.weight or 400,
+-- pfmwidth = pfminfo and pfminfo.width or 5,
+-- }
+-- -- setmetatableindex(d,function(t,k)
+-- -- report_names("warning, trying to access field %a in font table of %a",k,name)
+-- -- end)
+-- close_font(ff)
+-- return d
+-- else
+-- return nil, "error in loading font"
+-- end
+-- end
+
+-- more efficient:
+
+local fields = nil
+
+local function check_names(names)
+ if names then
+ for i=1,#names do
+ local name = names[i]
+ if lower(name.lang) == "english (us)" then -- lower added
+ return name.names
+ end
+ end
+ end
+end
+
+local function get_full_info(name)
+ local ff = open_font(name)
+ if ff then
+ -- unfortunately luatex aborts when a field is not available but we just make
+ -- sure that we only access a few known ones
+ local pfminfo = ff.pfminfo or { }
+ local names = check_names(ff.names) or { }
+ local weight = names.weight or ff.weight
+ local width = names.width -- no: ff.width
+ local d = {
+ fontname = ff.fontname,
+ fullname = names.fullname or ff.fullname,
+ family = names.family,
+ subfamily = names.subfamily,
+ familyname = names.preffamilyname or names.family or ff.familyname,
+ subfamilyname = names.prefmodifiers or names.subfamily,
+ weight = weight and lower(weight),
+ width = width and lower(width),
+ italicangle = round(1000*(tonumber(ff.italicangle) or 0))/1000 or 0,
+ units = ff.units_per_em,
+ designsize = ff.design_size,
+ minsize = ff.design_range_bottom,
+ maxsize = ff.design_range_top,
+ pfmweight = pfminfo.weight or 400,
+ pfmwidth = pfminfo.width or 5,
+ monospaced = pfminfo.panose and pfminfo.panose.proportion == "Monospaced",
+ }
+ close_font(ff)
+ return d
+ else
+ return nil, "error in loading font"
+ end
+end
+
+-- As we have lazy loading anyway, this one still is full and with less code than
+-- the previous one. But this depends on the garbage collector to kick in and in the
+-- current version that somehow happens not that often (on my machine I end up with
+-- some 3 GB extra before that happens).
+
+-- local function get_full_info(...)
+-- local ff = open_font(...)
+-- if ff then
+-- local d = { } -- ff is userdata so [1] or # fails on it
+-- setmetatableindex(d,ff)
+-- return d -- garbage collection will do the close_font(ff)
+-- else
+-- return nil, "error in loading font"
+-- end
+-- end
+
+fonts = fonts or { }
+local handlers = fonts.handlers or { }
+fonts.handlers = handlers
+local otf = handlers.otf or { }
+handlers.otf = otf
+local readers = otf.readers or { }
+otf.readers = readers
+
+fontloader.fullinfo = get_full_info
+readers.getinfo = readers.getinfo or get_full_info
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-osd.lua b/Master/texmf-dist/tex/context/base/mkiv/font-osd.lua
new file mode 100644
index 00000000000..6ff2e38b65d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-osd.lua
@@ -0,0 +1,2414 @@
+if not modules then modules = { } end modules ['font-osd'] = { -- script devanagari
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Kai Eigner, TAT Zetwerk / Hans Hagen, PRAGMA ADE",
+ copyright = "TAT Zetwerk / PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- I'll optimize this one with ischar (much faster) when I see a reason (read: I need a
+-- proper test case first).
+
+-- This is a version of font-odv.lua adapted to the new font loader and more
+-- direct hashing. The initialization code has been adapted (more efficient). One day
+-- I'll speed this up ... char swapping and properties.
+
+-- A few remarks:
+--
+-- This code is a partial rewrite of the code that deals with devanagari. The data and logic
+-- is by Kai Eigner and based based on Microsoft's OpenType specifications for specific
+-- scripts, but with a few improvements. More information can be found at:
+--
+-- deva: http://www.microsoft.com/typography/OpenType%20Dev/devanagari/introO.mspx
+-- dev2: http://www.microsoft.com/typography/OpenType%20Dev/devanagari/intro.mspx
+--
+-- Rajeesh Nambiar provided patches for the malayalam variant. Thanks to feedback from
+-- the mailing list some aspects could be improved.
+--
+-- As I touched nearly all code, reshuffled it, optimized a lot, etc. etc. (imagine how
+-- much can get messed up in over a week work) it could be that I introduced bugs. There
+-- is more to gain (esp in the functions applied to a range) but I'll do that when
+-- everything works as expected. Kai's original code is kept in font-odk.lua as a reference
+-- so blame me (HH) for bugs.
+--
+-- Interesting is that Kai managed to write this on top of the existing otf handler. Only a
+-- few extensions were needed, like a few more analyzing states and dealing with changed
+-- head nodes in the core scanner as that only happens here. There's a lot going on here
+-- and it's only because I touched nearly all code that I got a bit of a picture of what
+-- happens. For in-depth knowledge one needs to consult Kai.
+--
+-- The rewrite mostly deals with efficiency, both in terms of speed and code. We also made
+-- sure that it suits generic use as well as use in ConTeXt. I removed some buglets but can
+-- as well have messed up the logic by doing this. For this we keep the original around
+-- as that serves as reference. Due to the lots of reshuffling glyphs quite some leaks
+-- occur(red) but once I'm satisfied with the rewrite I'll weed them. I also integrated
+-- initialization etc into the regular mechanisms.
+--
+-- In the meantime, we're down from 25.5-3.5=22 seconds to 17.7-3.5=14.2 seconds for a 100
+-- page sample (mid 2012) with both variants so it's worth the effort. Some more speedup is
+-- to be expected. Due to the method chosen it will never be real fast. If I ever become a
+-- power user I'll have a go at some further speed up. I will rename some functions (and
+-- features) once we don't need to check the original code. We now use a special subset
+-- sequence for use inside the analyzer (after all we could can store this in the dataset
+-- and save redundant analysis).
+--
+-- I might go for an array approach with respect to attributes (and reshuffling). Easier.
+--
+-- Some data will move to char-def.lua (some day).
+--
+-- By now we have yet another incremental improved version. In the end I might rewrite the
+-- code.
+
+-- Hans Hagen, PRAGMA-ADE, Hasselt NL
+--
+-- We could have c_nukta, c_halant, c_ra is we know that they are never used mixed within
+-- one script .. yes or no?
+--
+-- Matras: according to Microsoft typography specifications "up to one of each type:
+-- pre-, above-, below- or post- base", but that does not seem to be right. It could
+-- become an option.
+
+local insert, imerge, copy = table.insert, table.imerge, table.copy
+local next, type = next, type
+
+local report_devanagari = logs.reporter("otf","devanagari")
+
+fonts = fonts or { }
+fonts.analyzers = fonts.analyzers or { }
+fonts.analyzers.methods = fonts.analyzers.methods or { node = { otf = { } } }
+
+local otf = fonts.handlers.otf
+
+local nodecodes = nodes.nodecodes
+local glyph_code = nodecodes.glyph
+
+local handlers = otf.handlers
+local methods = fonts.analyzers.methods
+
+local otffeatures = fonts.constructors.newfeatures("otf")
+local registerotffeature = otffeatures.register
+
+local nuts = nodes.nuts
+local tonode = nuts.tonode
+local tonut = nuts.tonut
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getboth = nuts.getboth
+local getid = nuts.getid
+local getchar = nuts.getchar
+local getfont = nuts.getfont
+local getsubtype = nuts.getsubtype
+local setlink = nuts.setlink
+local setnext = nuts.setnext
+local setprev = nuts.setprev
+local setchar = nuts.setchar
+local getprop = nuts.getprop
+local setprop = nuts.setprop
+
+local ischar = nuts.is_char
+
+local insert_node_after = nuts.insert_after
+local copy_node = nuts.copy
+local free_node = nuts.free
+local remove_node = nuts.remove
+local flush_list = nuts.flush_list
+
+local copyinjection = nodes.injections.copy -- KE: is this necessary? HH: probably not as positioning comes later and we rawget/set
+
+local unsetvalue = attributes.unsetvalue
+
+local fontdata = fonts.hashes.identifiers
+
+local a_state = attributes.private('state')
+local a_syllabe = attributes.private('syllabe')
+
+local dotted_circle = 0x25CC
+
+local states = fonts.analyzers.states -- not features
+
+local s_rphf = states.rphf
+local s_half = states.half
+local s_pref = states.pref
+local s_blwf = states.blwf
+local s_pstf = states.pstf
+
+local replace_all_nbsp = nil
+
+replace_all_nbsp = function(head) -- delayed definition
+ replace_all_nbsp = typesetters and typesetters.characters and typesetters.characters.replacenbspaces or function(head)
+ return head
+ end
+ return replace_all_nbsp(head)
+end
+
+local xprocesscharacters = nil
+
+if context then
+ xprocesscharacters = function(head,font)
+ xprocesscharacters = nodes.handlers.characters
+ return xprocesscharacters(head,font)
+ end
+else
+ xprocesscharacters = function(head,font)
+ xprocesscharacters = nodes.handlers.nodepass -- generic
+ return xprocesscharacters(head,font)
+ end
+end
+
+local function processcharacters(head,font)
+ return tonut(xprocesscharacters(tonode(head))) -- can be more efficient in context, just direct call
+end
+
+-- local fontprocesses = fonts.hashes.processes
+--
+-- function processcharacters(head,font)
+-- local processors = fontprocesses[font]
+-- for i=1,#processors do
+-- head = processors[i](head,font,0)
+-- end
+-- return head, true
+-- end
+
+-- In due time there will be entries here for scripts like Bengali, Gujarati,
+-- Gurmukhi, Kannada, Malayalam, Oriya, Tamil, Telugu. Feel free to provide the
+-- code points.
+
+-- We can assume that script are not mixed in the source but if that is the case
+-- we might need to have consonants etc per script and initialize a local table
+-- pointing to the right one.
+
+-- new, to be checked:
+--
+-- U+00978 : DEVANAGARI LETTER MARWARI DDA
+-- U+00980 : BENGALI ANJI
+-- U+00C00 : TELUGU SIGN COMBINING CANDRABINDU ABOVE
+-- U+00C34 : TELUGU LETTER LLLA
+-- U+00C81 : KANNADA SIGN CANDRABINDU
+-- U+00D01 : MALAYALAM SIGN CANDRABINDU
+-- U+00DE6 : SINHALA LITH DIGIT ZERO
+-- U+00DE7 : SINHALA LITH DIGIT ONE
+-- U+00DE8 : SINHALA LITH DIGIT TWO
+-- U+00DE9 : SINHALA LITH DIGIT THREE
+-- U+00DEA : SINHALA LITH DIGIT FOUR
+-- U+00DEB : SINHALA LITH DIGIT FIVE
+-- U+00DEC : SINHALA LITH DIGIT SIX
+-- U+00DED : SINHALA LITH DIGIT SEVEN
+-- U+00DEE : SINHALA LITH DIGIT EIGHT
+-- U+00DEF : SINHALA LITH DIGIT NINE
+
+local consonant = {
+ -- devanagari
+ [0x0915] = true, [0x0916] = true, [0x0917] = true, [0x0918] = true,
+ [0x0919] = true, [0x091A] = true, [0x091B] = true, [0x091C] = true,
+ [0x091D] = true, [0x091E] = true, [0x091F] = true, [0x0920] = true,
+ [0x0921] = true, [0x0922] = true, [0x0923] = true, [0x0924] = true,
+ [0x0925] = true, [0x0926] = true, [0x0927] = true, [0x0928] = true,
+ [0x0929] = true, [0x092A] = true, [0x092B] = true, [0x092C] = true,
+ [0x092D] = true, [0x092E] = true, [0x092F] = true, [0x0930] = true,
+ [0x0931] = true, [0x0932] = true, [0x0933] = true, [0x0934] = true,
+ [0x0935] = true, [0x0936] = true, [0x0937] = true, [0x0938] = true,
+ [0x0939] = true, [0x0958] = true, [0x0959] = true, [0x095A] = true,
+ [0x095B] = true, [0x095C] = true, [0x095D] = true, [0x095E] = true,
+ [0x095F] = true, [0x0979] = true, [0x097A] = true,
+ -- kannada
+ [0x0C95] = true, [0x0C96] = true, [0x0C97] = true, [0x0C98] = true,
+ [0x0C99] = true, [0x0C9A] = true, [0x0C9B] = true, [0x0C9C] = true,
+ [0x0C9D] = true, [0x0C9E] = true, [0x0C9F] = true, [0x0CA0] = true,
+ [0x0CA1] = true, [0x0CA2] = true, [0x0CA3] = true, [0x0CA4] = true,
+ [0x0CA5] = true, [0x0CA6] = true, [0x0CA7] = true, [0x0CA8] = true,
+ [0x0CA9] = true, [0x0CAA] = true, [0x0CAB] = true, [0x0CAC] = true,
+ [0x0CAD] = true, [0x0CAE] = true, [0x0CAF] = true, [0x0CB0] = true,
+ [0x0CB1] = true, [0x0CB2] = true, [0x0CB3] = true, [0x0CB4] = true,
+ [0x0CB5] = true, [0x0CB6] = true, [0x0CB7] = true, [0x0CB8] = true,
+ [0x0CB9] = true,
+ [0x0CDE] = true, -- obsolete
+ -- malayalam
+ [0x0D15] = true, [0x0D16] = true, [0x0D17] = true, [0x0D18] = true,
+ [0x0D19] = true, [0x0D1A] = true, [0x0D1B] = true, [0x0D1C] = true,
+ [0x0D1D] = true, [0x0D1E] = true, [0x0D1F] = true, [0x0D20] = true,
+ [0x0D21] = true, [0x0D22] = true, [0x0D23] = true, [0x0D24] = true,
+ [0x0D25] = true, [0x0D26] = true, [0x0D27] = true, [0x0D28] = true,
+ [0x0D29] = true, [0x0D2A] = true, [0x0D2B] = true, [0x0D2C] = true,
+ [0x0D2D] = true, [0x0D2E] = true, [0x0D2F] = true, [0x0D30] = true,
+ [0x0D31] = true, [0x0D32] = true, [0x0D33] = true, [0x0D34] = true,
+ [0x0D35] = true, [0x0D36] = true, [0x0D37] = true, [0x0D38] = true,
+ [0x0D39] = true, [0x0D3A] = true,
+}
+
+local independent_vowel = {
+ -- devanagari
+ [0x0904] = true, [0x0905] = true, [0x0906] = true, [0x0907] = true,
+ [0x0908] = true, [0x0909] = true, [0x090A] = true, [0x090B] = true,
+ [0x090C] = true, [0x090D] = true, [0x090E] = true, [0x090F] = true,
+ [0x0910] = true, [0x0911] = true, [0x0912] = true, [0x0913] = true,
+ [0x0914] = true, [0x0960] = true, [0x0961] = true, [0x0972] = true,
+ [0x0973] = true, [0x0974] = true, [0x0975] = true, [0x0976] = true,
+ [0x0977] = true,
+ -- kannada
+ [0x0C85] = true, [0x0C86] = true, [0x0C87] = true, [0x0C88] = true,
+ [0x0C89] = true, [0x0C8A] = true, [0x0C8B] = true, [0x0C8C] = true,
+ [0x0C8D] = true, [0x0C8E] = true, [0x0C8F] = true, [0x0C90] = true,
+ [0x0C91] = true, [0x0C92] = true, [0x0C93] = true, [0x0C94] = true,
+ -- malayalam
+ [0x0D05] = true, [0x0D06] = true, [0x0D07] = true, [0x0D08] = true,
+ [0x0D09] = true, [0x0D0A] = true, [0x0D0B] = true, [0x0D0C] = true,
+ [0x0D0E] = true, [0x0D0F] = true, [0x0D10] = true, [0x0D12] = true,
+ [0x0D13] = true, [0x0D14] = true,
+}
+
+local dependent_vowel = { -- matra
+ -- devanagari
+ [0x093A] = true, [0x093B] = true, [0x093E] = true, [0x093F] = true,
+ [0x0940] = true, [0x0941] = true, [0x0942] = true, [0x0943] = true,
+ [0x0944] = true, [0x0945] = true, [0x0946] = true, [0x0947] = true,
+ [0x0948] = true, [0x0949] = true, [0x094A] = true, [0x094B] = true,
+ [0x094C] = true, [0x094E] = true, [0x094F] = true, [0x0955] = true,
+ [0x0956] = true, [0x0957] = true, [0x0962] = true, [0x0963] = true,
+ -- kannada
+ [0x0CBE] = true, [0x0CBF] = true, [0x0CC0] = true, [0x0CC1] = true,
+ [0x0CC2] = true, [0x0CC3] = true, [0x0CC4] = true, [0x0CC5] = true,
+ [0x0CC6] = true, [0x0CC7] = true, [0x0CC8] = true, [0x0CC9] = true,
+ [0x0CCA] = true, [0x0CCB] = true, [0x0CCC] = true,
+ -- malayalam
+ [0x0D3E] = true, [0x0D3F] = true, [0x0D40] = true, [0x0D41] = true,
+ [0x0D42] = true, [0x0D43] = true, [0x0D44] = true, [0x0D46] = true,
+ [0x0D47] = true, [0x0D48] = true, [0x0D4A] = true, [0x0D4B] = true,
+ [0x0D4C] = true, [0x0D57] = true,
+}
+
+local vowel_modifier = {
+ -- devanagari
+ [0x0900] = true, [0x0901] = true, [0x0902] = true, [0x0903] = true,
+ -- A8E0 - A8F1 are cantillation marks for the Samaveda and may not belong here.
+ [0xA8E0] = true, [0xA8E1] = true, [0xA8E2] = true, [0xA8E3] = true,
+ [0xA8E4] = true, [0xA8E5] = true, [0xA8E6] = true, [0xA8E7] = true,
+ [0xA8E8] = true, [0xA8E9] = true, [0xA8EA] = true, [0xA8EB] = true,
+ [0xA8EC] = true, [0xA8ED] = true, [0xA8EE] = true, [0xA8EF] = true,
+ [0xA8F0] = true, [0xA8F1] = true,
+ -- malayalam
+ [0x0D02] = true, [0x0D03] = true,
+}
+
+local stress_tone_mark = {
+ [0x0951] = true, [0x0952] = true, [0x0953] = true, [0x0954] = true,
+ -- kannada
+ [0x0CCD] = true,
+ -- malayalam
+ [0x0D4D] = true,
+}
+
+local nukta = {
+ -- devanagari
+ [0x093C] = true,
+ -- kannada:
+ [0x0CBC] = true,
+}
+
+local halant = {
+ -- devanagari
+ [0x094D] = true,
+ -- kannada
+ [0x0CCD] = true,
+ -- malayalam
+ [0x0D4D] = true,
+}
+
+local ra = {
+ -- devanagari
+ [0x0930] = true,
+ -- kannada
+ [0x0CB0] = true,
+ -- malayalam
+ [0x0D30] = true,
+}
+
+local c_anudatta = 0x0952 -- used to be tables
+local c_nbsp = 0x00A0 -- used to be tables
+local c_zwnj = 0x200C -- used to be tables
+local c_zwj = 0x200D -- used to be tables
+
+local zw_char = { -- could also be inlined
+ [0x200C] = true,
+ [0x200D] = true,
+}
+
+-- 0C82 anusvara
+-- 0C83 visarga
+-- 0CBD avagraha
+-- 0CD5 length mark
+-- 0CD6 ai length mark
+-- 0CE0 letter ll
+-- 0CE1 letter rr
+-- 0CE2 vowel sign l
+-- 0CE2 vowel sign ll
+-- 0CF1 sign
+-- 0CF2 sign
+-- OCE6 - OCEF digits
+
+local pre_mark = {
+ [0x093F] = true, [0x094E] = true,
+ -- malayalam
+ [0x0D46] = true, [0x0D47] = true, [0x0D48] = true,
+}
+
+local above_mark = {
+ [0x0900] = true, [0x0901] = true, [0x0902] = true, [0x093A] = true,
+ [0x0945] = true, [0x0946] = true, [0x0947] = true, [0x0948] = true,
+ [0x0951] = true, [0x0953] = true, [0x0954] = true, [0x0955] = true,
+ [0xA8E0] = true, [0xA8E1] = true, [0xA8E2] = true, [0xA8E3] = true,
+ [0xA8E4] = true, [0xA8E5] = true, [0xA8E6] = true, [0xA8E7] = true,
+ [0xA8E8] = true, [0xA8E9] = true, [0xA8EA] = true, [0xA8EB] = true,
+ [0xA8EC] = true, [0xA8ED] = true, [0xA8EE] = true, [0xA8EF] = true,
+ [0xA8F0] = true, [0xA8F1] = true,
+ -- malayalam
+ [0x0D4E] = true,
+}
+
+local below_mark = {
+ [0x093C] = true, [0x0941] = true, [0x0942] = true, [0x0943] = true,
+ [0x0944] = true, [0x094D] = true, [0x0952] = true, [0x0956] = true,
+ [0x0957] = true, [0x0962] = true, [0x0963] = true,
+}
+
+local post_mark = {
+ [0x0903] = true, [0x093B] = true, [0x093E] = true, [0x0940] = true,
+ [0x0949] = true, [0x094A] = true, [0x094B] = true, [0x094C] = true,
+ [0x094F] = true,
+}
+
+local twopart_mark = {
+ -- malayalam
+ [0x0D4A] = { 0x0D46, 0x0D3E, }, -- ൊ
+ [0x0D4B] = { 0x0D47, 0x0D3E, }, -- ോ
+ [0x0D4C] = { 0x0D46, 0x0D57, }, -- ൌ
+}
+
+local mark_four = { } -- As we access these frequently an extra hash is used.
+
+for k, v in next, pre_mark do mark_four[k] = pre_mark end
+for k, v in next, above_mark do mark_four[k] = above_mark end
+for k, v in next, below_mark do mark_four[k] = below_mark end
+for k, v in next, post_mark do mark_four[k] = post_mark end
+
+local mark_above_below_post = { }
+
+for k, v in next, above_mark do mark_above_below_post[k] = above_mark end
+for k, v in next, below_mark do mark_above_below_post[k] = below_mark end
+for k, v in next, post_mark do mark_above_below_post[k] = post_mark end
+
+-- Again, this table can be extended for other scripts than devanagari. Actually,
+-- for ConTeXt this kind of data is kept elsewhere so eventually we might move
+-- tables to someplace else.
+
+local reorder_class = {
+ -- devanagari
+ [0x0930] = "before postscript",
+ [0x093F] = "before half",
+ [0x0940] = "after subscript",
+ [0x0941] = "after subscript",
+ [0x0942] = "after subscript",
+ [0x0943] = "after subscript",
+ [0x0944] = "after subscript",
+ [0x0945] = "after subscript",
+ [0x0946] = "after subscript",
+ [0x0947] = "after subscript",
+ [0x0948] = "after subscript",
+ [0x0949] = "after subscript",
+ [0x094A] = "after subscript",
+ [0x094B] = "after subscript",
+ [0x094C] = "after subscript",
+ [0x0962] = "after subscript",
+ [0x0963] = "after subscript",
+ [0x093E] = "after subscript",
+ -- kannada:
+ [0x0CB0] = "after postscript", -- todo in code below
+ [0x0CBF] = "before subscript", -- todo in code below
+ [0x0CC6] = "before subscript", -- todo in code below
+ [0x0CCC] = "before subscript", -- todo in code below
+ [0x0CBE] = "before subscript", -- todo in code below
+ [0x0CE2] = "before subscript", -- todo in code below
+ [0x0CE3] = "before subscript", -- todo in code below
+ [0x0CC1] = "before subscript", -- todo in code below
+ [0x0CC2] = "before subscript", -- todo in code below
+ [0x0CC3] = "after subscript",
+ [0x0CC4] = "after subscript",
+ [0x0CD5] = "after subscript",
+ [0x0CD6] = "after subscript",
+ -- malayalam
+}
+
+-- We use some pseudo features as we need to manipulate the nodelist based
+-- on information in the font as well as already applied features.
+
+local dflt_true = {
+ dflt = true
+}
+
+local dev2_defaults = {
+ dev2 = dflt_true,
+}
+
+local deva_defaults = {
+ dev2 = dflt_true,
+ deva = dflt_true,
+}
+
+local false_flags = { false, false, false, false }
+
+local both_joiners_true = {
+ [0x200C] = true,
+ [0x200D] = true,
+}
+
+local sequence_reorder_matras = {
+ features = { dv01 = dev2_defaults },
+ flags = false_flags,
+ name = "dv01_reorder_matras",
+ order = { "dv01" },
+ type = "devanagari_reorder_matras",
+ nofsteps = 1,
+ steps = {
+ {
+ osdstep = true,
+ coverage = pre_mark,
+ }
+ }
+}
+
+local sequence_reorder_reph = {
+ features = { dv02 = dev2_defaults },
+ flags = false_flags,
+ name = "dv02_reorder_reph",
+ order = { "dv02" },
+ type = "devanagari_reorder_reph",
+ nofsteps = 1,
+ steps = {
+ {
+ osdstep = true,
+ coverage = { },
+ }
+ }
+}
+
+local sequence_reorder_pre_base_reordering_consonants = {
+ features = { dv03 = dev2_defaults },
+ flags = false_flags,
+ name = "dv03_reorder_pre_base_reordering_consonants",
+ order = { "dv03" },
+ type = "devanagari_reorder_pre_base_reordering_consonants",
+ nofsteps = 1,
+ steps = {
+ {
+ osdstep = true,
+ coverage = { },
+ }
+ }
+}
+
+local sequence_remove_joiners = {
+ features = { dv04 = deva_defaults },
+ flags = false_flags,
+ name = "dv04_remove_joiners",
+ order = { "dv04" },
+ type = "devanagari_remove_joiners",
+ nofsteps = 1,
+ steps = {
+ { osdstep = true,
+ coverage = both_joiners_true,
+ },
+ }
+}
+
+-- Looping over feature twice as efficient as looping over basic forms (some
+-- 350 checks instead of 750 for one font). This is something to keep an eye on
+-- as it might depends on the font. Not that it's a bottleneck.
+
+local basic_shaping_forms = {
+ nukt = true,
+ akhn = true,
+ rphf = true,
+ pref = true,
+ rkrf = true,
+ blwf = true,
+ half = true,
+ pstf = true,
+ vatu = true,
+ cjct = true,
+}
+
+local valid = {
+ akhn = true, -- malayalam
+ rphf = true,
+ pref = true,
+ half = true,
+ blwf = true,
+ pstf = true,
+ pres = true, -- malayalam
+ blws = true, -- malayalam
+ psts = true, -- malayalam
+}
+
+local function initializedevanagi(tfmdata)
+ local script, language = otf.scriptandlanguage(tfmdata,attr) -- todo: take fast variant
+ if script == "deva" or script == "dev2" or script =="mlym" or script == "mlm2" then
+ local resources = tfmdata.resources
+ local devanagari = resources.devanagari
+ if not devanagari then
+ --
+ report_devanagari("adding devanagari features to font")
+ --
+ local gsubfeatures = resources.features.gsub
+ local sequences = resources.sequences
+ local sharedfeatures = tfmdata.shared.features
+ --
+ local lastmatch = 0
+ for s=1,#sequences do -- classify chars
+ local features = sequences[s].features
+ if features then
+ for k, v in next, features do
+ if basic_shaping_forms[k] then
+ lastmatch = s
+ end
+ end
+ end
+ end
+ local insertindex = lastmatch + 1
+ --
+ gsubfeatures["dv01"] = dev2_defaults -- reorder matras
+ gsubfeatures["dv02"] = dev2_defaults -- reorder reph
+ gsubfeatures["dv03"] = dev2_defaults -- reorder pre base reordering consonants
+ gsubfeatures["dv04"] = deva_defaults -- remove joiners
+ --
+ local reorder_pre_base_reordering_consonants = copy(sequence_reorder_pre_base_reordering_consonants)
+ local reorder_reph = copy(sequence_reorder_reph)
+ local reorder_matras = copy(sequence_reorder_matras)
+ local remove_joiners = copy(sequence_remove_joiners)
+ --
+ insert(sequences,insertindex,reorder_pre_base_reordering_consonants)
+ insert(sequences,insertindex,reorder_reph)
+ insert(sequences,insertindex,reorder_matras)
+ insert(sequences,insertindex,remove_joiners)
+ --
+ local blwfcache = { }
+ local seqsubset = { }
+ local rephstep = {
+ coverage = { } -- will be adapted each work
+ }
+ local devanagari = {
+ reph = false,
+ vattu = false,
+ blwfcache = blwfcache,
+ seqsubset = seqsubset,
+ reorderreph = rephstep,
+
+ }
+ --
+ reorder_reph.steps = { rephstep }
+ --
+ local pre_base_reordering_consonants = { }
+ reorder_pre_base_reordering_consonants.steps[1].coverage = pre_base_reordering_consonants
+ --
+ resources.devanagari = devanagari
+ --
+ for s=1,#sequences do
+ local sequence = sequences[s]
+ local steps = sequence.steps
+ local nofsteps = sequence.nofsteps
+ local features = sequence.features
+ if features["rphf"] then
+ -- deva
+ devanagari.reph = true
+ elseif features["blwf"] then
+ -- deva
+ devanagari.vattu = true
+ -- dev2
+ for i=1,nofsteps do
+ local step = steps[i]
+ local coverage = step.coverage
+ if coverage then
+ for k, v in next, coverage do
+ if not blwfcache[k] then
+ blwfcache[k] = v
+ end
+ end
+ end
+ end
+ end
+ if valid[kind] then
+ for i=1,nofsteps do
+ local step = steps[i]
+ local coverage = step.coverage
+ if coverage then
+ local reph = false
+ if step.osdstep then
+ -- rphf acts on consonant + halant
+ for k, v in next, ra do
+ local r = coverage[k]
+ if r then
+ local h = false
+ for k, v in next, halant do
+ local h = r[k]
+ if h then
+ reph = h.ligature or false
+ break
+ end
+ end
+ if reph then
+ break
+ end
+ end
+ end
+ else
+ -- rphf might be result of other handler/chainproc
+ end
+ seqsubset[#seqsubset+1] = { kind, coverage, reph }
+ end
+ end
+ end
+ if kind == "pref" then
+ local sequence = dataset[3] -- was [5]
+ local steps = sequence.steps
+ local nofsteps = sequence.nofsteps
+ for i=1,nofsteps do
+ local step = steps[i]
+ local coverage = step.coverage
+ if coverage then
+ for k, v in next, halant do
+ local h = coverage[k]
+ if h then
+ local found = false
+ for k, v in next, h do
+ found = v and v.ligature
+ if found then
+ pre_base_reordering_consonants[k] = found
+ break
+ end
+ end
+ if found then
+ break
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ --
+ if script == "deva" then
+ sharedfeatures["dv04"] = true -- dv04_remove_joiners
+ elseif script == "dev2" then
+ sharedfeatures["dv01"] = true -- dv01_reorder_matras
+ sharedfeatures["dv02"] = true -- dv02_reorder_reph
+ sharedfeatures["dv03"] = true -- dv03_reorder_pre_base_reordering_consonants
+ sharedfeatures["dv04"] = true -- dv04_remove_joiners
+ elseif script == "mlym" then
+ sharedfeatures["pstf"] = true
+ elseif script == "mlm2" then
+ sharedfeatures["pstf"] = true
+ sharedfeatures["pref"] = true
+ sharedfeatures["dv03"] = true -- dv03_reorder_pre_base_reordering_consonants
+ gsubfeatures ["dv03"] = dev2_defaults -- reorder pre base reordering consonants
+ insert(sequences,insertindex,sequence_reorder_pre_base_reordering_consonants)
+ end
+ end
+ end
+end
+
+registerotffeature {
+ name = "devanagari",
+ description = "inject additional features",
+ default = true,
+ initializers = {
+ node = initializedevanagi,
+ },
+}
+
+-- hm, this is applied to one character:
+
+local function deva_initialize(font,attr) -- we need a proper hook into the dataset initializer
+
+ local tfmdata = fontdata[font]
+ local datasets = otf.dataset(tfmdata,font,attr) -- don't we know this one?
+ local devanagaridata = datasets.devanagari
+
+ if not devanagaridata then
+
+ devanagaridata = {
+ reph = false,
+ vattu = false,
+ blwfcache = { },
+ }
+ datasets.devanagari = devanagaridata
+ local resources = tfmdata.resources
+ local devanagari = resources.devanagari
+
+ for s=1,#datasets do
+ local dataset = datasets[s]
+ if dataset and dataset[1] then -- value
+ local kind = dataset[4]
+ if kind == "rphf" then
+ -- deva
+ devanagaridata.reph = true
+ elseif kind == "blwf" then
+ -- deva
+ devanagaridata.vattu = true
+ -- dev2
+ devanagaridata.blwfcache = devanagari.blwfcache
+ end
+ end
+ end
+
+ end
+
+ return devanagaridata.reph, devanagaridata.vattu, devanagaridata.blwfcache
+
+end
+
+local function deva_reorder(head,start,stop,font,attr,nbspaces)
+
+ local reph, vattu, blwfcache = deva_initialize(font,attr) -- todo: a hash[font]
+
+ local current = start
+ local n = getnext(start)
+ local base = nil
+ local firstcons = nil
+ local lastcons = nil
+ local basefound = false
+
+ if reph and ra[getchar(start)] and halant[getchar(n)] then
+ -- if syllable starts with Ra + H and script has 'Reph' then exclude Reph
+ -- from candidates for base consonants
+ if n == stop then
+ return head, stop, nbspaces
+ end
+ if getchar(getnext(n)) == c_zwj then
+ current = start
+ else
+ current = getnext(n)
+ setprop(start,a_state,s_rphf)
+ end
+ end
+
+ if getchar(current) == c_nbsp then
+ -- Stand Alone cluster
+ if current == stop then
+ stop = getprev(stop)
+ head = remove_node(head,current)
+ free_node(current)
+ return head, stop, nbspaces
+ else
+ nbspaces = nbspaces + 1
+ base = current
+ firstcons = current
+ lastcons = current
+ current = getnext(current)
+ if current ~= stop then
+ if nukta[getchar(current)] then
+ current = getnext(current)
+ end
+ if getchar(current) == c_zwj then
+ if current ~= stop then
+ local next = getnext(current)
+ if next ~= stop and halant[getchar(next)] then
+ current = next
+ next = getnext(current)
+ local tmp = next and getnext(next) or nil -- needs checking
+ local changestop = next == stop
+ local tempcurrent = copy_node(next)
+ copyinjection(tempcurrent,next)
+ local nextcurrent = copy_node(current)
+ copyinjection(nextcurrent,current) -- KE: necessary? HH: probably not as positioning comes later and we rawget/set
+ setlink(tempcurrent,nextcurrent)
+ setprop(tempcurrent,a_state,s_blwf)
+ tempcurrent = processcharacters(tempcurrent,font)
+ setprop(tempcurrent,a_state,unsetvalue)
+ if getchar(next) == getchar(tempcurrent) then
+ flush_list(tempcurrent)
+ local n = copy_node(current)
+ copyinjection(n,current) -- KE: necessary? HH: probably not as positioning comes later and we rawget/set
+ setchar(current,dotted_circle)
+ head = insert_node_after(head, current, n)
+ else
+ setchar(current,getchar(tempcurrent)) -- we assumes that the result of blwf consists of one node
+ local freenode = getnext(current)
+ setlink(current,tmp)
+ free_node(freenode)
+ flush_list(tempcurrent)
+ if changestop then
+ stop = current
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+
+ while not basefound do
+ -- find base consonant
+ local char = getchar(current)
+ if consonant[char] then
+ setprop(current,a_state,s_half)
+ if not firstcons then
+ firstcons = current
+ end
+ lastcons = current
+ if not base then
+ base = current
+ elseif blwfcache[char] then
+ -- consonant has below-base (or post-base) form
+ setprop(current,a_state,s_blwf)
+ else
+ base = current
+ end
+ end
+ basefound = current == stop
+ current = getnext(current)
+ end
+
+ if base ~= lastcons then
+ -- if base consonant is not last one then move halant from base consonant to last one
+ local np = base
+ local n = getnext(base)
+ local ch = getchar(n)
+ if nukta[ch] then
+ np = n
+ n = getnext(n)
+ ch = getchar(n)
+ end
+ if halant[ch] then
+ if lastcons ~= stop then
+ local ln = getnext(lastcons)
+ if nukta[getchar(ln)] then
+ lastcons = ln
+ end
+ end
+ -- local np = getprev(n)
+ local nn = getnext(n)
+ local ln = getnext(lastcons) -- what if lastcons is nn ?
+ setlink(np,nn)
+ setnext(lastcons,n)
+ if ln then
+ setprev(ln,n)
+ end
+ setnext(n,ln)
+ setprev(n,lastcons)
+ if lastcons == stop then
+ stop = n
+ end
+ end
+ end
+
+ n = getnext(start)
+ if n ~= stop and ra[getchar(start)] and halant[getchar(n)] and not zw_char[getchar(getnext(n))] then
+ -- if syllable starts with Ra + H then move this combination so that it follows either:
+ -- the post-base 'matra' (if any) or the base consonant
+ local matra = base
+ if base ~= stop then
+ local next = getnext(base)
+ if dependent_vowel[getchar(next)] then
+ matra = next
+ end
+ end
+ -- [sp][start][n][nn] [matra|base][?]
+ -- [matra|base][start] [n][?] [sp][nn]
+ local sp = getprev(start)
+ local nn = getnext(n)
+ local mn = getnext(matra)
+ setlink(sp,nn)
+ setlink(matra,start)
+ setlink(n,mn)
+ if head == start then
+ head = nn
+ end
+ start = nn
+ if matra == stop then
+ stop = n
+ end
+ end
+
+ local current = start
+ while current ~= stop do
+ local next = getnext(current)
+ if next ~= stop and halant[getchar(next)] and getchar(getnext(next)) == c_zwnj then
+ setprop(current,a_state,unsetvalue)
+ end
+ current = next
+ end
+
+ if base ~= stop and getprop(base,a_state) then
+ local next = getnext(base)
+ if halant[getchar(next)] and not (next ~= stop and getchar(getnext(next)) == c_zwj) then
+ setprop(base,a_state,unsetvalue)
+ end
+ end
+
+ -- ToDo: split two- or three-part matras into their parts. Then, move the left 'matra' part to the beginning of the syllable.
+ -- Not necessary for Devanagari. However it is necessay for other scripts, such as Tamil (e.g. TAMIL VOWEL SIGN O - 0BCA)
+
+ -- classify consonants and 'matra' parts as pre-base, above-base (Reph), below-base or post-base, and group elements of the syllable (consonants and 'matras') according to this classification
+
+ local current, allreordered, moved = start, false, { [base] = true }
+ local a, b, p, bn = base, base, base, getnext(base)
+ if base ~= stop and nukta[getchar(bn)] then
+ a, b, p = bn, bn, bn
+ end
+ while not allreordered do
+ -- current is always consonant
+ local c = current
+ local n = getnext(current)
+ local l = nil -- used ?
+ if c ~= stop then
+ local ch = getchar(n)
+ if nukta[ch] then
+ c = n
+ n = getnext(n)
+ ch = getchar(n)
+ end
+ if c ~= stop then
+ if halant[ch] then
+ c = n
+ n = getnext(n)
+ ch = getchar(n)
+ end
+ while c ~= stop and dependent_vowel[ch] do
+ c = n
+ n = getnext(n)
+ ch = getchar(n)
+ end
+ if c ~= stop then
+ if vowel_modifier[ch] then
+ c = n
+ n = getnext(n)
+ ch = getchar(n)
+ end
+ if c ~= stop and stress_tone_mark[ch] then
+ c = n
+ n = getnext(n)
+ end
+ end
+ end
+ end
+ local bp = getprev(firstcons)
+ local cn = getnext(current)
+ local last = getnext(c)
+ while cn ~= last do
+ -- move pre-base matras...
+ if pre_mark[getchar(cn)] then
+ if bp then
+ setnext(bp,cn)
+ end
+ local prev, next = getboth(cn)
+ if next then
+ setprev(next,prev)
+ end
+ setnext(prev,next)
+ if cn == stop then
+ stop = prev
+ end
+ setprev(cn,bp)
+ setlink(cn,firstcons)
+ if firstcons == start then
+ if head == start then
+ head = cn
+ end
+ start = cn
+ end
+ break
+ end
+ cn = getnext(cn)
+ end
+ allreordered = c == stop
+ current = getnext(c)
+ end
+
+ if reph or vattu then
+ local current, cns = start, nil
+ while current ~= stop do
+ local c = current
+ local n = getnext(current)
+ if ra[getchar(current)] and halant[getchar(n)] then
+ c = n
+ n = getnext(n)
+ local b, bn = base, base
+ while bn ~= stop do
+ local next = getnext(bn)
+ if dependent_vowel[getchar(next)] then
+ b = next
+ end
+ bn = next
+ end
+ if getprop(current,a_state) == s_rphf then
+ -- position Reph (Ra + H) after post-base 'matra' (if any) since these
+ -- become marks on the 'matra', not on the base glyph
+ if b ~= current then
+ if current == start then
+ if head == start then
+ head = n
+ end
+ start = n
+ end
+ if b == stop then
+ stop = c
+ end
+ local prev = getprev(current)
+ setlink(prev,n)
+ local next = getnext(b)
+ setlink(c,next)
+ setlink(b,current)
+ end
+ elseif cns and getnext(cns) ~= current then -- todo: optimize next
+ -- position below-base Ra (vattu) following the consonants on which it is placed (either the base consonant or one of the pre-base consonants)
+ local cp = getprev(current)
+ local cnsn = getnext(cns)
+ setlink(cp,n)
+ setlink(cns,current)
+ setlink(c,cnsn)
+ if c == stop then
+ stop = cp
+ break
+ end
+ current = getprev(n)
+ end
+ else
+ local char = getchar(current)
+ if consonant[char] then
+ cns = current
+ local next = getnext(cns)
+ if halant[getchar(next)] then
+ cns = next
+ end
+ elseif char == c_nbsp then
+ nbspaces = nbspaces + 1
+ cns = current
+ local next = getnext(cns)
+ if halant[getchar(next)] then
+ cns = next
+ end
+ end
+ end
+ current = getnext(current)
+ end
+ end
+
+ if getchar(base) == c_nbsp then
+ nbspaces = nbspaces - 1
+ head = remove_node(head,base)
+ free_node(base)
+ end
+
+ return head, stop, nbspaces
+end
+
+-- If a pre-base matra character had been reordered before applying basic features,
+-- the glyph can be moved closer to the main consonant based on whether half-forms had been formed.
+-- Actual position for the matra is defined as “after last standalone halant glyph,
+-- after initial matra position and before the main consonantâ€.
+-- If ZWJ or ZWNJ follow this halant, position is moved after it.
+
+-- so we break out ... this is only done for the first 'word' (if we feed words we can as
+-- well test for non glyph.
+
+function handlers.devanagari_reorder_matras(head,start) -- no leak
+ local current = start -- we could cache attributes here
+ local startfont = getfont(start)
+ local startattr = getprop(start,a_syllabe)
+ while current do
+ local char = ischar(current,startfont)
+ local next = getnext(current)
+ if char and getprop(current,a_syllabe) == startattr then
+ if halant[char] and not getprop(current,a_state) then
+ if next then
+ local char = ischar(next,startfont)
+ if char and zw_char[char] and getprop(next,a_syllabe) == startattr then
+ current = next
+ next = getnext(current)
+ end
+ end
+ -- can be optimzied
+ local startnext = getnext(start)
+ head = remove_node(head,start)
+ setlink(start,next)
+ setlink(current,start)
+ start = startnext
+ break
+ end
+ end
+ current = next
+ end
+ return head, start, true
+end
+
+-- todo: way more caching of attributes and font
+
+-- Reph’s original position is always at the beginning of the syllable, (i.e. it is not reordered at the character reordering stage).
+-- However, it will be reordered according to the basic-forms shaping results.
+-- Possible positions for reph, depending on the script, are; after main, before post-base consonant forms,
+-- and after post-base consonant forms.
+
+-- 1 If reph should be positioned after post-base consonant forms, proceed to step 5.
+-- 2 If the reph repositioning class is not after post-base: target position is after the first explicit halant glyph between
+-- the first post-reph consonant and last main consonant. If ZWJ or ZWNJ are following this halant, position is moved after it.
+-- If such position is found, this is the target position. Otherwise, proceed to the next step.
+-- Note: in old-implementation fonts, where classifications were fixed in shaping engine,
+-- there was no case where reph position will be found on this step.
+-- 3 If reph should be repositioned after the main consonant: from the first consonant not ligated with main,
+-- or find the first consonant that is not a potential pre-base reordering Ra.
+-- 4 If reph should be positioned before post-base consonant, find first post-base classified consonant not ligated with main.
+-- If no consonant is found, the target position should be before the first matra, syllable modifier sign or vedic sign.
+-- 5 If no consonant is found in steps 3 or 4, move reph to a position immediately before the first post-base matra,
+-- syllable modifier sign or vedic sign that has a reordering class after the intended reph position.
+-- For example, if the reordering position for reph is post-main, it will skip above-base matras that also have a post-main position.
+-- 6 Otherwise, reorder reph to the end of the syllable.
+
+-- hm, this only looks at the start of a nodelist ... is this supposed to be line based?
+
+function handlers.devanagari_reorder_reph(head,start)
+ -- since in Devanagari reph has reordering position 'before postscript' dev2 only follows step 2, 4, and 6,
+ -- the other steps are still ToDo (required for scripts other than dev2)
+ local current = getnext(start)
+ local startnext = nil
+ local startprev = nil
+ local startfont = getfont(start)
+ local startattr = getprop(start,a_syllabe)
+ while current do
+ local char = ischar(current,font)
+ if char and getprop(current,a_syllabe) == startattr then -- step 2
+ if halant[char] and not getprop(current,a_state) then
+ local next = getnext(current)
+ if next then
+ local nextchar = ischar(next,font)
+ if nextchar and zw_char[nextchar] and getprop(next,a_syllabe) == startattr then
+ current = next
+ next = getnext(current)
+ end
+ end
+ startnext = getnext(start)
+ head = remove_node(head,start)
+ setlink(start,next)
+ setlink(current,start)
+ start = startnext
+ startattr = getprop(start,a_syllabe)
+ break
+ end
+ current = getnext(current)
+ else
+ break
+ end
+ end
+ if not startnext then
+ current = getnext(start)
+ while current do
+ local char = ischar(current,font)
+ if char and getprop(current,a_syllabe) == startattr then -- step 4
+ if getprop(current,a_state) == s_pstf then -- post-base
+ startnext = getnext(start)
+ head = remove_node(head,start)
+ local prev = getprev(current)
+ setlink(prev,start)
+ setlink(start,current)
+ start = startnext
+ startattr = getprop(start,a_syllabe)
+ break
+ end
+ current = getnext(current)
+ else
+ break
+ end
+ end
+ end
+ -- todo: determine position for reph with reordering position other than 'before postscript'
+ -- (required for scripts other than dev2)
+ -- leaks
+ if not startnext then
+ current = getnext(start)
+ local c = nil
+ while current do
+ local char = ischar(current,font)
+ if char and getprop(current,a_syllabe) == startattr then -- step 5
+ if not c and mark_above_below_post[char] and reorder_class[char] ~= "after subscript" then
+ c = current
+ end
+ current = getnext(current)
+ else
+ break
+ end
+ end
+ -- here we can loose the old start node: maybe best split cases
+ if c then
+ startnext = getnext(start)
+ head = remove_node(head,start)
+ local prev = getprev(c)
+ setlink(prev,start)
+ setlink(start,c)
+ -- end
+ start = startnext
+ startattr = getprop(start,a_syllabe)
+ end
+ end
+ -- leaks
+ if not startnext then
+ current = start
+ local next = getnext(current)
+ while next do
+ local nextchar = ischar(next,font)
+ if nextchar and getprop(next,a_syllabe) == startattr then --step 6
+ current = next
+ next = getnext(current)
+ else
+ break
+ end
+ end
+ if start ~= current then
+ startnext = getnext(start)
+ head = remove_node(head,start)
+ local next = getnext(current)
+ setlink(start,next)
+ setlink(current,"next",start)
+ start = startnext
+ end
+ end
+ --
+ return head, start, true
+end
+
+-- we can cache some checking (v)
+
+-- If a pre-base reordering consonant is found, reorder it according to the following rules:
+--
+-- 1 Only reorder a glyph produced by substitution during application of the feature.
+-- (Note that a font may shape a Ra consonant with the feature generally but block it in certain contexts.)
+-- 2 Try to find a target position the same way as for pre-base matra. If it is found, reorder pre-base consonant glyph.
+-- 3 If position is not found, reorder immediately before main consonant.
+
+-- UNTESTED: NOT CALLED IN EXAMPLE
+
+function handlers.devanagari_reorder_pre_base_reordering_consonants(head,start)
+ local current = start
+ local startnext = nil
+ local startprev = nil
+ local startfont = getfont(start)
+ local startattr = getprop(start,a_syllabe)
+ -- can be fast for loop + caching state
+ while current do
+ local char = ischar(current,font)
+ if char and getprop(current,a_syllabe) == startattr then
+ local next = getnext(current)
+ if halant[char] and not getprop(current,a_state) then
+ if next then
+ local nextchar = ischar(next,font)
+ if nextchar and getprop(next,a_syllabe) == startattr then
+ if nextchar == c_zwnj or nextchar == c_zwj then
+ current = next
+ next = getnext(current)
+ end
+ end
+ end
+ startnext = getnext(start)
+ removenode(start,start)
+ setlink(start,next)
+ setlink(current,start)
+ start = startnext
+ break
+ end
+ current = next
+ else
+ break
+ end
+ end
+ if not startnext then
+ current = getnext(start)
+ startattr = getprop(start,a_syllabe)
+ while current do
+ local char = ischar(current,font)
+ if char and getprop(current,a_syllabe) == startattr then
+ if not consonant[char] and getprop(current,a_state) then -- main
+ startnext = getnext(start)
+ removenode(start,start)
+ local prev = getprev(current)
+ setlink(start,prev)
+ setlink(start,current)
+ start = startnext
+ break
+ end
+ current = getnext(current)
+ else
+ break
+ end
+ end
+ end
+ return head, start, true
+end
+
+-- function handlers.devanagari_remove_joiners(head,start,kind,lookupname,replacement)
+-- local stop = getnext(start)
+-- local font = getfont(start)
+-- while stop do
+-- local char = ischar(stop)
+-- if char and (char == c_zwnj or char == c_zwj) then
+-- stop = getnext(stop)
+-- else
+-- break
+-- end
+-- end
+-- if stop then
+-- setnext(getprev(stop))
+-- setprev(stop,getprev(start))
+-- end
+-- local prev = getprev(start)
+-- if prev then
+-- setnext(prev,stop)
+-- end
+-- if head == start then
+-- head = stop
+-- end
+-- flush_list(start)
+-- return head, stop, true
+-- end
+
+function handlers.devanagari_remove_joiners(head,start,kind,lookupname,replacement)
+ local stop = getnext(start)
+ local font = getfont(start)
+ local last = start
+ while stop do
+ local char = ischar(stop,font)
+ if char and (char == c_zwnj or char == c_zwj) then
+ last = stop
+ stop = getnext(stop)
+ else
+ break
+ end
+ end
+ local prev = getprev(start)
+ if stop then
+ setnext(last)
+ setlink(prev,stop)
+ elseif prev then
+ setnext(prev)
+ end
+ if head == start then
+ head = stop
+ end
+ flush_list(start)
+ return head, stop, true
+end
+
+local function dev2_initialize(font,attr)
+
+ local devanagari = fontdata[font].resources.devanagari
+
+ if devanagari then
+ return devanagari.seqsubset or { }, devanagari.reorderreph or { }
+ else
+ return { }, { }
+ end
+
+end
+
+-- this one will be merged into the caller: it saves a call, but we will then make function
+-- of the actions
+
+local function dev2_reorder(head,start,stop,font,attr,nbspaces) -- maybe do a pass over (determine stop in sweep)
+
+ local seqsubset, reorderreph = dev2_initialize(font,attr)
+
+ local reph = false -- was nil ... probably went unnoticed because never assigned
+ local halfpos = nil
+ local basepos = nil
+ local subpos = nil
+ local postpos = nil
+ local locl = { }
+
+ for i=1,#seqsubset do
+
+ -- maybe quit if start == stop
+
+ local subset = seqsubset[i]
+ local kind = subset[1]
+ local lookupcache = subset[2]
+ if kind == "rphf" then
+ for k, v in next, ra do
+ local r = lookupcache[k]
+ if r then
+ for k, v in next, halant do
+ local h = r[k]
+ if h then
+ reph = h.ligature or false
+ break
+ end
+ end
+ if reph then
+ break
+ end
+ end
+ end
+ local current = start
+ local last = getnext(stop)
+ while current ~= last do
+ if current ~= stop then
+ local c = locl[current] or getchar(current)
+ local found = lookupcache[c]
+ if found then
+ local next = getnext(current)
+ local n = locl[next] or getchar(next)
+ if found[n] then --above-base: rphf Consonant + Halant
+ local afternext = next ~= stop and getnext(next)
+ if afternext and zw_char[getchar(afternext)] then -- ZWJ and ZWNJ prevent creation of reph
+ current = next
+ current = getnext(current)
+ elseif current == start then
+ setprop(current,a_state,s_rphf)
+ current = next
+ else
+ current = next
+ end
+ end
+ end
+ end
+ current = getnext(current)
+ end
+ elseif kind == "pref" then
+ local current = start
+ local last = getnext(stop)
+ while current ~= last do
+ if current ~= stop then
+ local c = locl[current] or getchar(current)
+ local found = lookupcache[c]
+ if found then
+ local next = getnext(current)
+ local n = locl[next] or getchar(next)
+ if found[n] then
+ setprop(current,a_state,s_pref)
+ setprop(next,a_state,s_pref)
+ current = next
+ end
+ end
+ end
+ current = getnext(current)
+ end
+ elseif kind == "half" then -- half forms: half / Consonant + Halant
+ local current = start
+ local last = getnext(stop)
+ while current ~= last do
+ if current ~= stop then
+ local c = locl[current] or getchar(current)
+ local found = lookupcache[c]
+ if found then
+ local next = getnext(current)
+ local n = locl[next] or getchar(next)
+ if found[n] then
+ if next ~= stop and getchar(getnext(next)) == c_zwnj then -- zwnj prevent creation of half
+ current = next
+ else
+ setprop(current,a_state,s_half)
+ if not halfpos then
+ halfpos = current
+ end
+ end
+ current = getnext(current)
+ end
+ end
+ end
+ current = getnext(current)
+ end
+ elseif kind == "blwf" then -- below-base: blwf / Halant + Consonant
+ local current = start
+ local last = getnext(stop)
+ while current ~= last do
+ if current ~= stop then
+ local c = locl[current] or getchar(current)
+ local found = lookupcache[c]
+ if found then
+ local next = getnext(current)
+ local n = locl[next] or getchar(next)
+ if found[n] then
+ setprop(current,a_state,s_blwf)
+ setprop(next,a_state,s_blwf)
+ current = next
+ subpos = current
+ end
+ end
+ end
+ current = getnext(current)
+ end
+ elseif kind == "pstf" then -- post-base: pstf / Halant + Consonant
+ local current = start
+ local last = getnext(stop)
+ while current ~= last do
+ if current ~= stop then
+ local c = locl[current] or getchar(current)
+ local found = lookupcache[c]
+ if found then
+ local next = getnext(current)
+ local n = locl[next] or getchar(next)
+ if found[n] then
+ setprop(current,a_state,s_pstf)
+ setprop(next,a_state,s_pstf)
+ current = next
+ postpos = current
+ end
+ end
+ end
+ current = getnext(current)
+ end
+ end
+ end
+
+ -- this one changes per word ...
+
+ reorderreph.coverage = { [reph] = true } -- neat
+
+ -- end of weird
+
+ local current, base, firstcons = start, nil, nil
+
+ if getprop(start,a_state) == s_rphf then
+ -- if syllable starts with Ra + H and script has 'Reph' then exclude Reph from candidates for base consonants
+ current = getnext(getnext(start))
+ end
+
+ if current ~= getnext(stop) and getchar(current) == c_nbsp then
+ -- Stand Alone cluster
+ if current == stop then
+ stop = getprev(stop)
+ head = remove_node(head,current)
+ free_node(current)
+ return head, stop, nbspaces
+ else
+ nbspaces = nbspaces + 1
+ base = current
+ current = getnext(current)
+ if current ~= stop then
+ local char = getchar(current)
+ if nukta[char] then
+ current = getnext(current)
+ char = getchar(current)
+ end
+ if char == c_zwj then
+ local next = getnext(current)
+ if current ~= stop and next ~= stop and halant[getchar(next)] then
+ current = next
+ next = getnext(current)
+ local tmp = getnext(next)
+ local changestop = next == stop
+ setnext(next,nil)
+ setprop(current,a_state,s_pref)
+ current = processcharacters(current,font)
+ setprop(current,a_state,s_blwf)
+ current = processcharacters(current,font)
+ setprop(current,a_state,s_pstf)
+ current = processcharacters(current,font)
+ setprop(current,a_state,unsetvalue)
+ if halant[getchar(current)] then
+ setnext(getnext(current),tmp)
+ local nc = copy_node(current)
+ copyinjection(nc,current)
+ setchar(current,dotted_circle)
+ head = insert_node_after(head,current,nc)
+ else
+ setnext(current,tmp) -- assumes that result of pref, blwf, or pstf consists of one node
+ if changestop then
+ stop = current
+ end
+ end
+ end
+ end
+ end
+ end
+ else -- not Stand Alone cluster
+ local last = getnext(stop)
+ while current ~= last do -- find base consonant
+ local next = getnext(current)
+ if consonant[getchar(current)] then
+ if not (current ~= stop and next ~= stop and halant[getchar(next)] and getchar(getnext(next)) == c_zwj) then
+ if not firstcons then
+ firstcons = current
+ end
+ -- check whether consonant has below-base or post-base form or is pre-base reordering Ra
+ local a = getprop(current,a_state)
+ if not (a == s_pref or a == s_blwf or a == s_pstf) then
+ base = current
+ end
+ end
+ end
+ current = next
+ end
+ if not base then
+ base = firstcons
+ end
+ end
+
+ if not base then
+ if getprop(start,a_state) == s_rphf then
+ setprop(start,a_state,unsetvalue)
+ end
+ return head, stop, nbspaces
+ else
+ if getprop(base,a_state) then
+ setprop(base,a_state,unsetvalue)
+ end
+ basepos = base
+ end
+ if not halfpos then
+ halfpos = base
+ end
+ if not subpos then
+ subpos = base
+ end
+ if not postpos then
+ postpos = subpos or base
+ end
+
+ -- Matra characters are classified and reordered by which consonant in a conjunct they have affinity for
+
+ local moved = { }
+ local current = start
+ local last = getnext(stop)
+ while current ~= last do
+ local char, target, cn = locl[current] or getchar(current), nil, getnext(current)
+ -- not so efficient (needed for malayalam)
+ local tpm = twopart_mark[char]
+ if tpm then
+ local extra = copy_node(current)
+ copyinjection(extra,current)
+ char = tpm[1]
+ setchar(current,char)
+ setchar(extra,tpm[2])
+ head = insert_node_after(head,current,extra)
+ end
+ --
+ if not moved[current] and dependent_vowel[char] then
+ if pre_mark[char] then -- Before first half form in the syllable
+ moved[current] = true
+ -- can be helper to remove one node
+ local prev, next = getboth(current)
+ setlink(prev,next)
+ if current == stop then
+ stop = getprev(current)
+ end
+ if halfpos == start then
+ if head == start then
+ head = current
+ end
+ start = current
+ end
+ local prev = getprev(halfpos)
+ setlink(prev,current)
+ setlink(current,halfpos)
+ halfpos = current
+ elseif above_mark[char] then -- After main consonant
+ target = basepos
+ if subpos == basepos then
+ subpos = current
+ end
+ if postpos == basepos then
+ postpos = current
+ end
+ basepos = current
+ elseif below_mark[char] then -- After subjoined consonants
+ target = subpos
+ if postpos == subpos then
+ postpos = current
+ end
+ subpos = current
+ elseif post_mark[char] then -- After post-form consonant
+ target = postpos
+ postpos = current
+ end
+ if mark_above_below_post[char] then
+ local prev = getprev(current)
+ if prev ~= target then
+ local next = getnext(current)
+ setlink(next,prev)
+ if current == stop then
+ stop = prev
+ end
+ local next = getnext(target)
+ setlink(current,next)
+ setlink(target,current)
+ end
+ end
+ end
+ current = cn
+ end
+
+ -- Reorder marks to canonical order: Adjacent nukta and halant or nukta and vedic sign are always repositioned if necessary, so that the nukta is first.
+
+ local current, c = start, nil
+ while current ~= stop do
+ local char = getchar(current)
+ if halant[char] or stress_tone_mark[char] then
+ if not c then
+ c = current
+ end
+ else
+ c = nil
+ end
+ local next = getnext(current)
+ if c and nukta[getchar(next)] then
+ if head == c then
+ head = next
+ end
+ if stop == next then
+ stop = current
+ end
+ local prev = getprev(c)
+ setlink(next,prev)
+ local nextnext = getnext(next)
+ setnext(current,nextnext)
+ local nextnextnext = getnext(nextnext)
+ if nextnextnext then
+ setprev(nextnextnext,current)
+ end
+ setlink(nextnext,c)
+ end
+ if stop == current then break end
+ current = getnext(current)
+ end
+
+ if getchar(base) == c_nbsp then
+ nbspaces = nbspaces - 1
+ head = remove_node(head, base)
+ free_node(base)
+ end
+
+ return head, stop, nbspaces
+end
+
+-- cleaned up and optimized ... needs checking (local, check order, fixes, extra hash, etc)
+
+local separator = { }
+
+imerge(separator,consonant)
+imerge(separator,independent_vowel)
+imerge(separator,dependent_vowel)
+imerge(separator,vowel_modifier)
+imerge(separator,stress_tone_mark)
+
+for k, v in next, nukta do separator[k] = true end
+for k, v in next, halant do separator[k] = true end
+
+local function analyze_next_chars_one(c,font,variant) -- skip one dependent vowel
+ -- why two variants ... the comment suggests that it's the same ruleset
+ local n = getnext(c)
+ if not n then
+ return c
+ end
+ if variant == 1 then
+ local v = ischar(n,font)
+ if v and nukta[v] then
+ n = getnext(n)
+ if n then
+ v = ischar(n,font)
+ end
+ end
+ if n and v then
+ local nn = getnext(n)
+ if nn then
+ local vv = ischar(nn,font)
+ if vv then
+ local nnn = getnext(nn)
+ if nnn then
+ local vvv = ischar(nnn,font)
+ if vvv then
+ if vv == c_zwj and consonant[vvv] then
+ c = nnn
+ elseif (vv == c_zwnj or vv == c_zwj) and halant[vvv] then
+ local nnnn = getnext(nnn)
+ if nnnn then
+ local vvvv = ischar(nnnn)
+ if vvvv and consonant[vvvv] then
+ c = nnnn
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ elseif variant == 2 then
+ local v = ischar(n,font)
+ if v and nukta[v] then
+ c = n
+ end
+ n = getnext(c)
+ if n then
+ v = ischar(n,font)
+ if v then
+ local nn = getnext(n)
+ if nn then
+ local vv = ischar(nn,font)
+ if vv and zw_char[vv] then
+ n = nn
+ v = vv
+ nn = getnext(nn)
+ vv = nn and ischar(nn,font)
+ end
+ if vv and halant[v] and consonant[vv] then
+ c = nn
+ end
+ end
+ end
+ end
+ end
+ -- c = ms_matra(c)
+ local n = getnext(c)
+ if not n then
+ return c
+ end
+ local v = ischar(n,font)
+ if not v then
+ return c
+ end
+ if dependent_vowel[v] then
+ c = getnext(c)
+ n = getnext(c)
+ if not n then
+ return c
+ end
+ v = ischar(n,font)
+ if not v then
+ return c
+ end
+ end
+ if nukta[v] then
+ c = getnext(c)
+ n = getnext(c)
+ if not n then
+ return c
+ end
+ v = ischar(n,font)
+ if not v then
+ return c
+ end
+ end
+ if halant[v] then
+ c = getnext(c)
+ n = getnext(c)
+ if not n then
+ return c
+ end
+ v = ischar(n,font)
+ if not v then
+ return c
+ end
+ end
+ if vowel_modifier[v] then
+ c = getnext(c)
+ n = getnext(c)
+ if not n then
+ return c
+ end
+ v = ischar(n,font)
+ if not v then
+ return c
+ end
+ end
+ if stress_tone_mark[v] then
+ c = getnext(c)
+ n = getnext(c)
+ if not n then
+ return c
+ end
+ v = ischar(n,font)
+ if not v then
+ return c
+ end
+ end
+ if stress_tone_mark[v] then
+ return n
+ else
+ return c
+ end
+end
+
+local function analyze_next_chars_two(c,font)
+ local n = getnext(c)
+ if not n then
+ return c
+ end
+ local v = ischar(n,font)
+ if v and nukta[v] then
+ c = n
+ end
+ n = c
+ while true do
+ local nn = getnext(n)
+ if nn then
+ local vv = ischar(nn,font)
+ if vv then
+ if halant[vv] then
+ n = nn
+ local nnn = getnext(nn)
+ if nnn then
+ local vvv = ischar(nnn,font)
+ if vvv and zw_char[vvv] then
+ n = nnn
+ end
+ end
+ elseif vv == c_zwnj or vv == c_zwj then
+ -- n = nn -- not here (?)
+ local nnn = getnext(nn)
+ if nnn then
+ local vvv = ischar(nnn,font)
+ if vvv and halant[vvv] then
+ n = nnn
+ end
+ end
+ else
+ break
+ end
+ local nn = getnext(n)
+ if nn then
+ local vv = ischar(nn,font)
+ if vv and consonant[vv] then
+ n = nn
+ local nnn = getnext(nn)
+ if nnn then
+ local vvv = ischar(nnn,font)
+ if vvv and nukta[vvv] then
+ n = nnn
+ end
+ end
+ c = n
+ else
+ break
+ end
+ else
+ break
+ end
+ else
+ break
+ end
+ else
+ break
+ end
+ end
+ --
+ if not c then
+ -- This shouldn't happen I guess.
+ return
+ end
+ local n = getnext(c)
+ if not n then
+ return c
+ end
+ local v = ischar(n,font)
+ if not v then
+ return c
+ end
+ if v == c_anudatta then
+ c = n
+ n = getnext(c)
+ if not n then
+ return c
+ end
+ v = ischar(n,font)
+ if not v then
+ return c
+ end
+ end
+ if halant[v] then
+ c = n
+ n = getnext(c)
+ if not n then
+ return c
+ end
+ v = ischar(n,font)
+ if not v then
+ return c
+ end
+ if v == c_zwnj or v == c_zwj then
+ c = n
+ n = getnext(c)
+ if not n then
+ return c
+ end
+ v = ischar(n,font)
+ if not v then
+ return c
+ end
+ end
+ else
+ -- c = ms_matra(c)
+ -- same as one
+ if dependent_vowel[v] then
+ c = n
+ n = getnext(c)
+ if not n then
+ return c
+ end
+ v = ischar(n,font)
+ if not v then
+ return c
+ end
+ end
+ if nukta[v] then
+ c = n
+ n = getnext(c)
+ if not n then
+ return c
+ end
+ v = ischar(n,font)
+ if not v then
+ return c
+ end
+ end
+ if halant[v] then
+ c = n
+ n = getnext(c)
+ if not n then
+ return c
+ end
+ v = ischar(n,font)
+ if not v then
+ return c
+ end
+ end
+ end
+ -- same as one
+ if vowel_modifier[v] then
+ c = n
+ n = getnext(c)
+ if not n then
+ return c
+ end
+ v = ischar(n,font)
+ if not v then
+ return c
+ end
+ end
+ if stress_tone_mark[v] then
+ c = n
+ n = getnext(c)
+ if not n then
+ return c
+ end
+ v = ischar(n,font)
+ if not v then
+ return c
+ end
+ end
+ if stress_tone_mark[v] then
+ return n
+ else
+ return c
+ end
+end
+
+local function inject_syntax_error(head,current,mark)
+ local signal = copy_node(current)
+ copyinjection(signal,current)
+ if mark == pre_mark then -- THIS IS WRONG: pre_mark is a table
+ setchar(signal,dotted_circle)
+ else
+ setchar(current,dotted_circle)
+ end
+ return insert_node_after(head,current,signal)
+end
+
+-- It looks like these two analyzers were written independently but they share
+-- a lot. Common code has been synced.
+
+function methods.deva(head,font,attr)
+ head = tonut(head)
+ local current = head
+ local start = true
+ local done = false
+ local nbspaces = 0
+ while current do
+ local char = ischar(current,font)
+ if char then
+ done = true
+ local syllablestart = current
+ local syllableend = nil
+ local c = current
+ local n = getnext(c)
+ local first = char
+ if n and ra[first] then
+ local second = ischar(n,font)
+ if second and halant[second] then
+ local n = getnext(n)
+ if n then
+ local third = ischar(n,font)
+ if third then
+ c = n
+ first = third
+ end
+ end
+ end
+ end
+ local standalone = first == c_nbsp
+ if standalone then
+ local prev = getprev(current)
+ if prev then
+ local prevchar = ischar(prev,font)
+ if not prevchar then
+ -- different font or language so quite certainly a different word
+ elseif not separator[prevchar] then
+ -- something that separates words
+ else
+ standalone = false
+ end
+ else
+ -- begin of paragraph or box
+ end
+ end
+ if standalone then
+ -- stand alone cluster (at the start of the word only): #[Ra+H]+NBSP+[N]+[<[<ZWJ|ZWNJ>]+H+C>]+[{M}+[N]+[H]]+[SM]+[(VD)]
+ local syllableend = analyze_next_chars_one(c,font,2)
+ current = getnext(syllableend)
+ if syllablestart ~= syllableend then
+ head, current, nbspaces = deva_reorder(head,syllablestart,syllableend,font,attr,nbspaces)
+ current = getnext(current)
+ end
+ else
+ -- we can delay the getsubtype(n) and getfont(n) and test for say halant first
+ -- as an table access is faster than two function calls (subtype and font are
+ -- pseudo fields) but the code becomes messy (unless we make it a function)
+ if consonant[char] then
+ -- syllable containing consonant
+ local prevc = true
+ while prevc do
+ prevc = false
+ local n = getnext(current)
+ if not n then
+ break
+ end
+ local v = ischar(n,font)
+ if not v then
+ break
+ end
+ if nukta[v] then
+ n = getnext(n)
+ if not n then
+ break
+ end
+ v = ischar(n,font)
+ if not v then
+ break
+ end
+ end
+ if halant[v] then
+ n = getnext(n)
+ if not n then
+ break
+ end
+ v = ischar(n,font)
+ if not v then
+ break
+ end
+ if v == c_zwnj or v == c_zwj then
+ n = getnext(n)
+ if not n then
+ break
+ end
+ v = ischar(n,font)
+ if not v then
+ break
+ end
+ end
+ if consonant[v] then
+ prevc = true
+ current = n
+ end
+ end
+ end
+ local n = getnext(current)
+ if n then
+ local v = ischar(n,font)
+ if v and nukta[v] then
+ -- nukta (not specified in Microsft Devanagari OpenType specification)
+ current = n
+ n = getnext(current)
+ end
+ end
+ syllableend = current
+ current = n
+ if current then
+ local v = ischar(current,font)
+ if not v then
+ -- skip
+ elseif halant[v] then
+ -- syllable containing consonant without vowels: {C + [Nukta] + H} + C + H
+ local n = getnext(current)
+ if n then
+ local v = ischar(n,font)
+ if v and zw_char[v] then
+ -- code collapsed, probably needs checking with intention
+ syllableend = n
+ current = getnext(n)
+ else
+ syllableend = current
+ current = n
+ end
+ else
+ syllableend = current
+ current = n
+ end
+ else
+ -- syllable containing consonant with vowels: {C + [Nukta] + H} + C + [M] + [VM] + [SM]
+ if dependent_vowel[v] then
+ syllableend = current
+ current = getnext(current)
+ v = ischar(current,font)
+ end
+ if v and vowel_modifier[v] then
+ syllableend = current
+ current = getnext(current)
+ v = ischar(current,font)
+ end
+ if v and stress_tone_mark[v] then
+ syllableend = current
+ current = getnext(current)
+ end
+ end
+ end
+ if syllablestart ~= syllableend then
+ head, current, nbspaces = deva_reorder(head,syllablestart,syllableend,font,attr,nbspaces)
+ current = getnext(current)
+ end
+ elseif independent_vowel[char] then
+ -- syllable without consonants: VO + [VM] + [SM]
+ syllableend = current
+ current = getnext(current)
+ if current then
+ local v = ischar(current,font)
+ if v then
+ if vowel_modifier[v] then
+ syllableend = current
+ current = getnext(current)
+ v = ischar(current,font)
+ end
+ if v and stress_tone_mark[v] then
+ syllableend = current
+ current = getnext(current)
+ end
+ end
+ end
+ else
+ local mark = mark_four[char]
+ if mark then
+ head, current = inject_syntax_error(head,current,mark)
+ end
+ current = getnext(current)
+ end
+ end
+ else
+ current = getnext(current)
+ end
+ start = false
+ end
+
+ if nbspaces > 0 then
+ head = replace_all_nbsp(head)
+ end
+
+ head = tonode(head)
+
+ return head, done
+end
+
+-- there is a good change that when we run into one with subtype < 256 that the rest is also done
+-- so maybe we can omit this check (it's pretty hard to get glyphs in the stream out of the blue)
+
+function methods.dev2(head,font,attr)
+ head = tonut(head)
+ local current = head
+ local start = true
+ local done = false
+ local syllabe = 0
+ local nbspaces = 0
+ while current do
+ local syllablestart = nil
+ local syllableend = nil
+ local char = ischar(current,font)
+ if char then
+ done = true
+ syllablestart = current
+ local c = current
+ local n = getnext(current)
+ if n and ra[char] then
+ local nextchar = ischar(n,font)
+ if nextchar and halant[nextchar] then
+ local n = getnext(n)
+ if n then
+ local nextnextchar = ischar(n,font)
+ if nextnextchar then
+ c = n
+ char = nextnextchar
+ end
+ end
+ end
+ end
+ if independent_vowel[char] then
+ -- vowel-based syllable: [Ra+H]+V+[N]+[<[<ZWJ|ZWNJ>]+H+C|ZWJ+C>]+[{M}+[N]+[H]]+[SM]+[(VD)]
+ current = analyze_next_chars_one(c,font,1)
+ syllableend = current
+ else
+ local standalone = char == c_nbsp
+ if standalone then
+ nbspaces = nbspaces + 1
+ local p = getprev(current)
+ if not p then
+ -- begin of paragraph or box
+ elseif ischar(p,font) then
+ -- different font or language so quite certainly a different word
+ elseif not separator[getchar(p)] then
+ -- something that separates words
+ else
+ standalone = false
+ end
+ end
+ if standalone then
+ -- Stand Alone cluster (at the start of the word only): #[Ra+H]+NBSP+[N]+[<[<ZWJ|ZWNJ>]+H+C>]+[{M}+[N]+[H]]+[SM]+[(VD)]
+ current = analyze_next_chars_one(c,font,2)
+ syllableend = current
+ elseif consonant[getchar(current)] then
+ -- WHY current INSTEAD OF c ?
+
+ -- Consonant syllable: {C+[N]+<H+[<ZWNJ|ZWJ>]|<ZWNJ|ZWJ>+H>} + C+[N]+[A] + [< H+[<ZWNJ|ZWJ>] | {M}+[N]+[H]>]+[SM]+[(VD)]
+ current = analyze_next_chars_two(current,font) -- not c !
+ syllableend = current
+ end
+ end
+ end
+ if syllableend then
+ syllabe = syllabe + 1
+ local c = syllablestart
+ local n = getnext(syllableend)
+ while c ~= n do
+ setprop(c,a_syllabe,syllabe)
+ c = getnext(c)
+ end
+ end
+ if syllableend and syllablestart ~= syllableend then
+ head, current, nbspaces = dev2_reorder(head,syllablestart,syllableend,font,attr,nbspaces)
+ end
+ if not syllableend then
+ local char = ischar(current,font)
+ if char and not getprop(current,a_state) then
+ local mark = mark_four[char]
+ if mark then
+ head, current = inject_syntax_error(head,current,mark)
+ end
+ end
+ end
+ start = false
+ current = getnext(current)
+ end
+
+ if nbspaces > 0 then
+ head = replace_all_nbsp(head)
+ end
+
+ head = tonode(head)
+
+ return head, done
+end
+
+methods.mlym = methods.deva
+methods.mlm2 = methods.dev2
diff --git a/Master/texmf-dist/tex/context/base/font-ota.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ota.lua
index 1f1534870a8..6a3804a7425 100644
--- a/Master/texmf-dist/tex/context/base/font-ota.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-ota.lua
@@ -1,4 +1,4 @@
-if not modules then modules = { } end modules ['font-otx'] = {
+if not modules then modules = { } end modules ['font-ota'] = {
version = 1.001,
comment = "companion to font-otf.lua (analysing)",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
@@ -26,7 +26,6 @@ local methods = allocate()
analyzers.initializers = initializers
analyzers.methods = methods
----------.useunicodemarks = false
local a_state = attributes.private('state')
@@ -36,19 +35,20 @@ local tonut = nuts.tonut
local getfield = nuts.getfield
local getnext = nuts.getnext
local getprev = nuts.getprev
-local getid = nuts.getid
+local getprev = nuts.getprev
local getprop = nuts.getprop
local setprop = nuts.setprop
local getfont = nuts.getfont
local getsubtype = nuts.getsubtype
local getchar = nuts.getchar
+local ischar = nuts.is_char
local traverse_id = nuts.traverse_id
local traverse_node_list = nuts.traverse
local end_of_math = nuts.end_of_math
local nodecodes = nodes.nodecodes
-local glyph_code = nodecodes.glyph
+----- glyph_code = nodecodes.glyph
local disc_code = nodecodes.disc
local math_code = nodecodes.math
@@ -76,7 +76,10 @@ local s_rest = 6
local states = {
init = s_init,
medi = s_medi,
+ med2 = s_medi,
fina = s_fina,
+ fin2 = s_fina,
+ fin3 = s_fina,
isol = s_isol,
mark = s_mark,
rest = s_rest,
@@ -90,7 +93,10 @@ local states = {
local features = {
init = s_init,
medi = s_medi,
+ med2 = s_medi,
fina = s_fina,
+ fin2 = s_fina,
+ fin3 = s_fina,
isol = s_isol,
-- mark = s_mark,
-- rest = s_rest,
@@ -108,17 +114,16 @@ analyzers.useunicodemarks = false
-- todo: analyzers per script/lang, cross font, so we need an font id hash -> script
-- e.g. latin -> hyphenate, arab -> 1/2/3 analyze -- its own namespace
-function analyzers.setstate(head,font) -- we can skip math
+function analyzers.setstate(head,font)
local useunicodemarks = analyzers.useunicodemarks
local tfmdata = fontdata[font]
local descriptions = tfmdata.descriptions
local first, last, current, n, done = nil, nil, head, 0, false -- maybe make n boolean
current = tonut(current)
while current do
- local id = getid(current)
- if id == glyph_code and getfont(current) == font then
+ local char, id = ischar(current,font)
+ if char and not getprop(current,a_state) then
done = true
- local char = getchar(current)
local d = descriptions[char]
if d then
if d.class == "mark" then
@@ -142,6 +147,17 @@ function analyzers.setstate(head,font) -- we can skip math
end
first, last, n = nil, nil, 0
end
+ elseif char == false then
+ -- other font
+ if first and first == last then
+ setprop(last,a_state,s_isol)
+ elseif last then
+ setprop(last,a_state,s_fina)
+ end
+ first, last, n = nil, nil, 0
+ if id == math_code then
+ current = end_of_math(current)
+ end
elseif id == disc_code then
-- always in the middle .. it doesn't make much sense to assign a property
-- here ... we might at some point decide to flag the components when present
@@ -241,38 +257,43 @@ local mappers = {
u = s_isol, -- nonjoiner
}
-local classifiers = { } -- we can also use this trick for devanagari
-
-local first_arabic, last_arabic = characters.blockrange("arabic")
-local first_syriac, last_syriac = characters.blockrange("syriac")
-local first_mandiac, last_mandiac = characters.blockrange("mandiac")
-local first_nko, last_nko = characters.blockrange("nko")
-
-table.setmetatableindex(classifiers,function(t,k)
- local c = chardata[k]
- local v = false
- if c then
- local arabic = c.arabic
- if arabic then
- v = mappers[arabic]
- if not v then
- log.report("analyze","error in mapping arabic %C",k)
- -- error
- v = false
- end
- elseif k >= first_arabic and k <= last_arabic or k >= first_syriac and k <= last_syriac or
- k >= first_mandiac and k <= last_mandiac or k >= first_nko and k <= last_nko then
- if categories[k] == "mn" then
- v = s_mark
- else
- v = s_rest
+-- we can also use this trick for devanagari
+
+local classifiers = characters.classifiers
+
+if not classifiers then
+
+ local first_arabic, last_arabic = characters.blockrange("arabic")
+ local first_syriac, last_syriac = characters.blockrange("syriac")
+ local first_mandiac, last_mandiac = characters.blockrange("mandiac")
+ local first_nko, last_nko = characters.blockrange("nko")
+
+ classifiers = table.setmetatableindex(function(t,k)
+ local c = chardata[k]
+ local v = false
+ if c then
+ local arabic = c.arabic
+ if arabic then
+ v = mappers[arabic]
+ if not v then
+ log.report("analyze","error in mapping arabic %C",k)
+ -- error
+ v = false
+ end
+ elseif k >= first_arabic and k <= last_arabic or k >= first_syriac and k <= last_syriac or
+ k >= first_mandiac and k <= last_mandiac or k >= first_nko and k <= last_nko then
+ if categories[k] == "mn" then
+ v = s_mark
+ else
+ v = s_rest
+ end
end
- else
end
- end
- t[k] = v
- return v
-end)
+ t[k] = v
+ return v
+ end)
+
+end
function methods.arab(head,font,attr)
local first, last = nil, nil
@@ -280,10 +301,9 @@ function methods.arab(head,font,attr)
local current, done = head, false
current = tonut(current)
while current do
- local id = getid(current)
- if id == glyph_code and getfont(current) == font and getsubtype(current)<256 and not getprop(current,a_state) then
+ local char, id = ischar(current,font)
+ if char and not getprop(current,a_state) then
done = true
- local char = getchar(current)
local classifier = classifiers[char]
if not classifier then
if last then
diff --git a/Master/texmf-dist/tex/context/base/font-otb.lua b/Master/texmf-dist/tex/context/base/mkiv/font-otb.lua
index 4e955a19774..c9f5d4aca9b 100644
--- a/Master/texmf-dist/tex/context/base/font-otb.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-otb.lua
@@ -321,14 +321,14 @@ local function preparesubstitutions(tfmdata,feature,value,validlookups,lookuplis
for unicode, character in next, characters do
local description = descriptions[unicode]
- local lookups = description.slookups
+ local lookups = description.slookups
if lookups then
for l=1,#lookuplist do
local lookupname = lookuplist[l]
local lookupdata = lookups[lookupname]
if lookupdata then
local lookuptype = lookuptypes[lookupname]
- local action = actions[lookuptype]
+ local action = actions[lookuptype]
if action then
action(lookupdata,lookuptags,lookupname,description,unicode)
end
@@ -342,7 +342,7 @@ local function preparesubstitutions(tfmdata,feature,value,validlookups,lookuplis
local lookuplist = lookups[lookupname]
if lookuplist then
local lookuptype = lookuptypes[lookupname]
- local action = actions[lookuptype]
+ local action = actions[lookuptype]
if action then
for i=1,#lookuplist do
action(lookuplist[i],lookuptags,lookupname,description,unicode)
@@ -614,8 +614,8 @@ local function featuresinitializer(tfmdata,value)
local collectlookups = otf.collectlookups
local rawdata = tfmdata.shared.rawdata
local properties = tfmdata.properties
- local script = properties.script
- local language = properties.language
+ local script = properties.script -- or "dflt" -- can be nil
+ local language = properties.language -- or "dflt" -- can be nil
local basesubstitutions = rawdata.resources.features.gsub
local basepositionings = rawdata.resources.features.gpos
--
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-otc.lua b/Master/texmf-dist/tex/context/base/mkiv/font-otc.lua
new file mode 100644
index 00000000000..d4c98d6fcc5
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-otc.lua
@@ -0,0 +1,747 @@
+if not modules then modules = { } end modules ['font-otc'] = {
+ version = 1.001,
+ comment = "companion to font-otf.lua (context)",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local format, insert, sortedkeys, tohash = string.format, table.insert, table.sortedkeys, table.tohash
+local type, next = type, next
+local lpegmatch = lpeg.match
+local utfbyte = utf.byte
+
+-- we assume that the other otf stuff is loaded already
+
+local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end)
+local report_otf = logs.reporter("fonts","otf loading")
+
+local fonts = fonts
+local otf = fonts.handlers.otf
+local registerotffeature = otf.features.register
+local setmetatableindex = table.setmetatableindex
+
+local normalized = {
+ substitution = "substitution",
+ single = "substitution",
+ ligature = "ligature",
+ alternate = "alternate",
+ multiple = "multiple",
+ kern = "kern",
+ pair = "pair",
+ chainsubstitution = "chainsubstitution",
+ chainposition = "chainposition",
+}
+
+local types = {
+ substitution = "gsub_single",
+ ligature = "gsub_ligature",
+ alternate = "gsub_alternate",
+ multiple = "gsub_multiple",
+ kern = "gpos_pair",
+ pair = "gpos_pair",
+ chainsubstitution = "gsub_contextchain",
+ chainposition = "gpos_contextchain",
+}
+
+setmetatableindex(types, function(t,k) t[k] = k return k end) -- "key"
+
+local everywhere = { ["*"] = { ["*"] = true } } -- or: { ["*"] = { "*" } }
+local noflags = { false, false, false, false }
+
+-- beware: shared, maybe we should copy the sequence
+
+local function addfeature(data,feature,specifications)
+ local descriptions = data.descriptions
+ local resources = data.resources
+ local features = resources.features
+ local sequences = resources.sequences
+ if not features or not sequences then
+ return
+ end
+ -- feature has to be unique but the name entry wins eventually
+
+ -- todo alse gpos
+
+ local fontfeatures = resources.features or everywhere
+ local unicodes = resources.unicodes
+ local splitter = lpeg.splitter(" ",unicodes)
+ local done = 0
+ local skip = 0
+ if not specifications[1] then
+ -- so we accept a one entry specification
+ specifications = { specifications }
+ end
+
+ local function tounicode(code)
+ if not code then
+ return
+ elseif type(code) == "number" then
+ return code
+ else
+ return unicodes[code] or utfbyte(code)
+ end
+ end
+
+ local coverup = otf.coverup
+ local coveractions = coverup.actions
+ local stepkey = coverup.stepkey
+ local register = coverup.register
+
+ local function prepare_substitution(list,featuretype)
+ local coverage = { }
+ local cover = coveractions[featuretype]
+ for code, replacement in next, list do
+ local unicode = tounicode(code)
+ local description = descriptions[unicode]
+ if description then
+ if type(replacement) == "table" then
+ replacement = replacement[1]
+ end
+ replacement = tounicode(replacement)
+ if replacement and descriptions[replacement] then
+ cover(coverage,unicode,replacement)
+ done = done + 1
+ else
+ skip = skip + 1
+ end
+ else
+ skip = skip + 1
+ end
+ end
+ return coverage
+ end
+
+ local function prepare_alternate(list,featuretype)
+ local coverage = { }
+ local cover = coveractions[featuretype]
+ for code, replacement in next, list do
+ local unicode = tounicode(code)
+ local description = descriptions[unicode]
+ if not description then
+ skip = skip + 1
+ elseif type(replacement) == "table" then
+ local r = { }
+ for i=1,#replacement do
+ local u = tounicode(replacement[i])
+ r[i] = descriptions[u] and u or unicode
+ end
+ cover(coverage,unicode,r)
+ done = done + 1
+ else
+ local u = tounicode(replacement)
+ if u then
+ cover(coverage,unicode,{ u })
+ done = done + 1
+ else
+ skip = skip + 1
+ end
+ end
+ end
+ return coverage
+ end
+
+ local function prepare_multiple(list,featuretype)
+ local coverage = { }
+ local cover = coveractions[featuretype]
+ for code, replacement in next, list do
+ local unicode = tounicode(code)
+ local description = descriptions[unicode]
+ if not description then
+ skip = skip + 1
+ elseif type(replacement) == "table" then
+ local r, n = { }, 0
+ for i=1,#replacement do
+ local u = tounicode(replacement[i])
+ if descriptions[u] then
+ n = n + 1
+ r[n] = u
+ end
+ end
+ if n > 0 then
+ cover(coverage,unicode,r)
+ done = done + 1
+ else
+ skip = skip + 1
+ end
+ else
+ local u = tounicode(replacement)
+ if u then
+ cover(coverage,unicode,{ u })
+ done = done + 1
+ else
+ skip = skip + 1
+ end
+ end
+ end
+ return coverage
+ end
+
+ local function prepare_ligature(list,featuretype)
+ local coverage = { }
+ local cover = coveractions[featuretype]
+ for code, ligature in next, list do
+ local unicode = tounicode(code)
+ local description = descriptions[unicode]
+ if description then
+ if type(ligature) == "string" then
+ ligature = { lpegmatch(splitter,ligature) }
+ end
+ local present = true
+ for i=1,#ligature do
+ local l = ligature[i]
+ local u = tounicode(l)
+ if descriptions[u] then
+ ligature[i] = u
+ else
+ present = false
+ break
+ end
+ end
+ if present then
+ cover(coverage,unicode,ligature)
+ done = done + 1
+ else
+ skip = skip + 1
+ end
+ else
+ skip = skip + 1
+ end
+ end
+ return coverage
+ end
+
+ local function prepare_kern(list,featuretype)
+ local coverage = { }
+ local cover = coveractions[featuretype]
+ for code, replacement in next, list do
+ local unicode = tounicode(code)
+ local description = descriptions[unicode]
+ if description and type(replacement) == "table" then
+ local r = { }
+ for k, v in next, replacement do
+ local u = tounicode(k)
+ if u then
+ r[u] = v
+ end
+ end
+ if next(r) then
+ cover(coverage,unicode,r)
+ done = done + 1
+ else
+ skip = skip + 1
+ end
+ else
+ skip = skip + 1
+ end
+ end
+ return coverage
+ end
+
+ local function prepare_pair(list,featuretype)
+ local coverage = { }
+ local cover = coveractions[featuretype]
+ for code, replacement in next, list do
+ local unicode = tounicode(code)
+ local description = descriptions[unicode]
+ if description and type(replacement) == "table" then
+ local r = { }
+ for k, v in next, replacement do
+ local u = tounicode(k)
+ if u then
+ r[u] = v
+ end
+ end
+ if next(r) then
+ cover(coverage,unicode,r)
+ done = done + 1
+ else
+ skip = skip + 1
+ end
+ else
+ skip = skip + 1
+ end
+ end
+ return coverage
+ end
+
+ local function prepare_chain(list,featuretype,sublookups)
+ -- todo: coveractions
+ local rules = list.rules
+ local coverage = { }
+ if rules then
+ local rulehash = { }
+ local rulesize = 0
+ local sequence = { }
+ local nofsequences = 0
+ local lookuptype = types[featuretype]
+ for nofrules=1,#rules do
+ local rule = rules[nofrules]
+ local current = rule.current
+ local before = rule.before
+ local after = rule.after
+ local replacements = rule.replacements or false
+ local sequence = { }
+ local nofsequences = 0
+ if before then
+ for n=1,#before do
+ nofsequences = nofsequences + 1
+ sequence[nofsequences] = before[n]
+ end
+ end
+ local start = nofsequences + 1
+ for n=1,#current do
+ nofsequences = nofsequences + 1
+ sequence[nofsequences] = current[n]
+ end
+ local stop = nofsequences
+ if after then
+ for n=1,#after do
+ nofsequences = nofsequences + 1
+ sequence[nofsequences] = after[n]
+ end
+ end
+ local lookups = rule.lookups or false
+ local subtype = nil
+ if lookups and sublookups then
+ for k, v in next, lookups do
+ local lookup = sublookups[v]
+ if lookup then
+ lookups[k] = lookup
+ if not subtype then
+ subtype = lookup.type
+ end
+ else
+ -- already expanded
+ end
+ end
+ end
+ if nofsequences > 0 then -- we merge coverage into one
+ -- we copy as we can have different fonts
+ local hashed = { }
+ for i=1,nofsequences do
+ local t = { }
+ local s = sequence[i]
+ for i=1,#s do
+ local u = tounicode(s[i])
+ if u then
+ t[u] = true
+ end
+ end
+ hashed[i] = t
+ end
+ sequence = hashed
+ -- now we create the rule
+ rulesize = rulesize + 1
+ rulehash[rulesize] = {
+ nofrules, -- 1
+ lookuptype, -- 2
+ sequence, -- 3
+ start, -- 4
+ stop, -- 5
+ lookups, -- 6 (6/7 also signal of what to do)
+ replacements, -- 7
+ subtype, -- 8
+ }
+ for unic in next, sequence[start] do
+ local cu = coverage[unic]
+ if not cu then
+ coverage[unic] = rulehash -- can now be done cleaner i think
+ end
+ end
+ end
+ end
+ end
+ return coverage
+ end
+
+ for s=1,#specifications do
+ local specification = specifications[s]
+ local valid = specification.valid
+ local feature = specification.name or feature
+ if not valid or valid(data,specification,feature) then
+ local initialize = specification.initialize
+ if initialize then
+ -- when false is returned we initialize only once
+ specification.initialize = initialize(specification,data) and initialize or nil
+ end
+ local askedfeatures = specification.features or everywhere
+ local askedsteps = specification.steps or specification.subtables or { specification.data } or { }
+ local featuretype = normalized[specification.type or "substitution"] or "substitution"
+ local featureflags = specification.flags or noflags
+ local featureorder = specification.order or { feature }
+ local featurechain = (featuretype == "chainsubstitution" or featuretype == "chainposition") and 1 or 0
+ local nofsteps = 0
+ local steps = { }
+ local sublookups = specification.lookups
+ local category = nil
+ if sublookups then
+ local s = { }
+ for i=1,#sublookups do
+ local specification = sublookups[i]
+ local askedsteps = specification.steps or specification.subtables or { specification.data } or { }
+ local featuretype = normalized[specification.type or "substitution"] or "substitution"
+ local featureflags = specification.flags or noflags
+ local nofsteps = 0
+ local steps = { }
+ for i=1,#askedsteps do
+ local list = askedsteps[i]
+ local coverage = nil
+ local format = nil
+ if featuretype == "substitution" then
+ coverage = prepare_substitution(list,featuretype)
+ elseif featuretype == "ligature" then
+ coverage = prepare_ligature(list,featuretype)
+ elseif featuretype == "alternate" then
+ coverage = prepare_alternate(list,featuretype)
+ elseif featuretype == "multiple" then
+ coverage = prepare_multiple(list,featuretype)
+ elseif featuretype == "kern" then
+ format = "kern"
+ coverage = prepare_kern(list,featuretype)
+ elseif featuretype == "pair" then
+ format = "pair"
+ coverage = prepare_pair(list,featuretype)
+ end
+ if coverage and next(coverage) then
+ nofsteps = nofsteps + 1
+ steps[nofsteps] = register(coverage,featuretype,format,feature,nofsteps,descriptions,resources)
+ end
+ end
+ s[i] = {
+ [stepkey] = steps,
+ nofsteps = nofsteps,
+ type = types[featuretype],
+ }
+ end
+ sublookups = s
+ end
+ for i=1,#askedsteps do
+ local list = askedsteps[i]
+ local coverage = nil
+ local format = nil
+ if featuretype == "substitution" then
+ category = "gsub"
+ coverage = prepare_substitution(list,featuretype)
+ elseif featuretype == "ligature" then
+ category = "gsub"
+ coverage = prepare_ligature(list,featuretype)
+ elseif featuretype == "alternate" then
+ category = "gsub"
+ coverage = prepare_alternate(list,featuretype)
+ elseif featuretype == "multiple" then
+ category = "gsub"
+ coverage = prepare_multiple(list,featuretype)
+ elseif featuretype == "kern" then
+ category = "gpos"
+ format = kern
+ coverage = prepare_kern(list,featuretype)
+ elseif featuretype == "pair" then
+ category = "gpos"
+ format = "pair"
+ coverage = prepare_pair(list,featuretype)
+ elseif featuretype == "chainsubstitution" then
+ category = "gsub"
+ coverage = prepare_chain(list,featuretype,sublookups)
+ elseif featuretype == "chainposition" then
+ category = "gpos"
+ coverage = prepare_chain(list,featuretype,sublookups)
+ else
+ report_otf("not registering feature %a, unknown category",feature)
+ return
+ end
+ if coverage and next(coverage) then
+ nofsteps = nofsteps + 1
+ steps[nofsteps] = register(coverage,featuretype,format,feature,nofsteps,descriptions,resources)
+ end
+ end
+ if nofsteps > 0 then
+ -- script = { lang1, lang2, lang3 } or script = { lang1 = true, ... }
+ for k, v in next, askedfeatures do
+ if v[1] then
+ askedfeatures[k] = tohash(v)
+ end
+ end
+ if featureflags[1] then featureflags[1] = "mark" end
+ if featureflags[2] then featureflags[2] = "ligature" end
+ if featureflags[3] then featureflags[3] = "base" end
+ local sequence = {
+ chain = featurechain,
+ features = { [feature] = askedfeatures },
+ flags = featureflags,
+ name = feature, -- redundant
+ order = featureorder,
+ [stepkey] = steps,
+ nofsteps = nofsteps,
+ type = types[featuretype],
+ }
+ -- todo : before|after|index
+ if specification.prepend then
+ insert(sequences,1,sequence)
+ else
+ insert(sequences,sequence)
+ end
+ -- register in metadata (merge as there can be a few)
+ local features = fontfeatures[category]
+ if not features then
+ features = { }
+ fontfeatures[category] = features
+ end
+ local k = features[feature]
+ if not k then
+ k = { }
+ features[feature] = k
+ end
+ --
+ for script, languages in next, askedfeatures do
+ local kk = k[script]
+ if not kk then
+ kk = { }
+ k[script] = kk
+ end
+ for language, value in next, languages do
+ kk[language] = value
+ end
+ end
+ end
+ end
+ end
+ if trace_loading then
+ report_otf("registering feature %a, affected glyphs %a, skipped glyphs %a",feature,done,skip)
+ end
+end
+
+otf.enhancers.addfeature = addfeature
+
+local extrafeatures = { }
+
+function otf.addfeature(name,specification)
+ if type(name) == "table" then
+ specification = name
+ name = specification.name
+ end
+ if type(name) == "string" then
+ extrafeatures[name] = specification
+ end
+end
+
+local function enhance(data,filename,raw)
+ for feature, specification in next, extrafeatures do
+ addfeature(data,feature,specification)
+ end
+end
+
+otf.enhancers.register("check extra features",enhance)
+
+-- tlig --
+
+local tlig = { -- we need numbers for some fonts so ...
+ -- endash = "hyphen hyphen",
+ -- emdash = "hyphen hyphen hyphen",
+ [0x2013] = { 0x002D, 0x002D },
+ [0x2014] = { 0x002D, 0x002D, 0x002D },
+ -- quotedblleft = "quoteleft quoteleft",
+ -- quotedblright = "quoteright quoteright",
+ -- quotedblleft = "grave grave",
+ -- quotedblright = "quotesingle quotesingle",
+ -- quotedblbase = "comma comma",
+}
+
+local tlig_specification = {
+ type = "ligature",
+ features = everywhere,
+ data = tlig,
+ order = { "tlig" },
+ flags = noflags,
+ prepend = true,
+}
+
+otf.addfeature("tlig",tlig_specification)
+
+registerotffeature {
+ name = 'tlig',
+ description = 'tex ligatures',
+}
+
+-- trep
+
+local trep = {
+ -- [0x0022] = 0x201D,
+ [0x0027] = 0x2019,
+ -- [0x0060] = 0x2018,
+}
+
+local trep_specification = {
+ type = "substitution",
+ features = everywhere,
+ data = trep,
+ order = { "trep" },
+ flags = noflags,
+ prepend = true,
+}
+
+otf.addfeature("trep",trep_specification)
+
+registerotffeature {
+ name = 'trep',
+ description = 'tex replacements',
+}
+
+-- tcom
+
+if characters.combined then
+
+ local tcom = { }
+
+ local function initialize()
+ characters.initialize()
+ for first, seconds in next, characters.combined do
+ for second, combination in next, seconds do
+ tcom[combination] = { first, second }
+ end
+ end
+ -- return false
+ end
+
+ local tcom_specification = {
+ type = "ligature",
+ features = everywhere,
+ data = tcom,
+ order = { "tcom" },
+ flags = noflags,
+ initialize = initialize,
+ }
+
+ otf.addfeature("tcom",tcom_specification)
+
+ registerotffeature {
+ name = 'tcom',
+ description = 'tex combinations',
+ }
+
+end
+
+-- anum
+
+local anum_arabic = {
+ [0x0030] = 0x0660,
+ [0x0031] = 0x0661,
+ [0x0032] = 0x0662,
+ [0x0033] = 0x0663,
+ [0x0034] = 0x0664,
+ [0x0035] = 0x0665,
+ [0x0036] = 0x0666,
+ [0x0037] = 0x0667,
+ [0x0038] = 0x0668,
+ [0x0039] = 0x0669,
+}
+
+local anum_persian = {
+ [0x0030] = 0x06F0,
+ [0x0031] = 0x06F1,
+ [0x0032] = 0x06F2,
+ [0x0033] = 0x06F3,
+ [0x0034] = 0x06F4,
+ [0x0035] = 0x06F5,
+ [0x0036] = 0x06F6,
+ [0x0037] = 0x06F7,
+ [0x0038] = 0x06F8,
+ [0x0039] = 0x06F9,
+}
+
+local function valid(data)
+ local features = data.resources.features
+ if features then
+ for k, v in next, features do
+ for k, v in next, v do
+ if v.arab then
+ return true
+ end
+ end
+ end
+ end
+end
+
+local anum_specification = {
+ {
+ type = "substitution",
+ features = { arab = { urd = true, dflt = true } },
+ order = { "anum" },
+ data = anum_arabic,
+ flags = noflags, -- { },
+ valid = valid,
+ },
+ {
+ type = "substitution",
+ features = { arab = { urd = true } },
+ order = { "anum" },
+ data = anum_persian,
+ flags = noflags, -- { },
+ valid = valid,
+ },
+}
+
+otf.addfeature("anum",anum_specification) -- todo: only when there is already an arab script feature
+
+registerotffeature {
+ name = 'anum',
+ description = 'arabic digits',
+}
+
+-- maybe:
+
+-- fonts.handlers.otf.addfeature("hangulfix",{
+-- type = "substitution",
+-- features = { ["hang"] = { ["*"] = true } },
+-- data = {
+-- [0x1160] = 0x119E,
+-- },
+-- order = { "hangulfix" },
+-- flags = { },
+-- prepend = true,
+-- })
+
+-- fonts.handlers.otf.features.register {
+-- name = 'hangulfix',
+-- description = 'fixes for hangul',
+-- }
+
+-- fonts.handlers.otf.addfeature {
+-- name = "stest",
+-- type = "substitution",
+-- data = {
+-- a = "X",
+-- b = "P",
+-- }
+-- }
+-- fonts.handlers.otf.addfeature {
+-- name = "atest",
+-- type = "alternate",
+-- data = {
+-- a = { "X", "Y" },
+-- b = { "P", "Q" },
+-- }
+-- }
+-- fonts.handlers.otf.addfeature {
+-- name = "mtest",
+-- type = "multiple",
+-- data = {
+-- a = { "X", "Y" },
+-- b = { "P", "Q" },
+-- }
+-- }
+-- fonts.handlers.otf.addfeature {
+-- name = "ltest",
+-- type = "ligature",
+-- data = {
+-- X = { "a", "b" },
+-- Y = { "d", "a" },
+-- }
+-- }
+-- fonts.handlers.otf.addfeature {
+-- name = "ktest",
+-- type = "kern",
+-- data = {
+-- a = { b = -500 },
+-- }
+-- }
diff --git a/Master/texmf-dist/tex/context/base/font-otd.lua b/Master/texmf-dist/tex/context/base/mkiv/font-otd.lua
index 2dd23b74148..2257caa8ca5 100644
--- a/Master/texmf-dist/tex/context/base/font-otd.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-otd.lua
@@ -63,11 +63,13 @@ function otf.setdynamics(font,attribute)
script = definers.checkedscript(fontidentifiers[font],fontresources[font],features)
end
local ds = dynamics[script] -- can be metatable magic (less testing)
+-- or dynamics.dflt
if not ds then
ds = { }
dynamics[script] = ds
end
local dsl = ds[language]
+-- or ds.dflt
if not dsl then
dsl = { }
ds[language] = dsl
@@ -121,19 +123,24 @@ end
-- we reimplement the dataset resolver
-local autofeatures = fonts.analyzers.features -- was: constants
+local autofeatures = fonts.analyzers.features
+local featuretypes = otf.tables.featuretypes
+local defaultscript = otf.features.checkeddefaultscript
+local defaultlanguage = otf.features.checkeddefaultlanguage
-local resolved = { } -- we only resolve a font,script,language,attribute pair once
-local wildcard = "*"
-local default = "dflt"
+local resolved = { } -- we only resolve a font,script,language,attribute pair once
+local wildcard = "*"
-- what about analyze in local and not in font
-local function initialize(sequence,script,language,s_enabled,a_enabled,font,attr,dynamic,ra)
+-- needs checking: some added features can pass twice
+
+local function initialize(sequence,script,language,s_enabled,a_enabled,font,attr,dynamic,ra,autoscript,autolanguage)
local features = sequence.features
if features then
local order = sequence.order
if order then
+ local featuretype = featuretypes[sequence.type or "unknown"]
for i=1,#order do --
local kind = order[i] --
local e_e
@@ -146,49 +153,33 @@ local function initialize(sequence,script,language,s_enabled,a_enabled,font,attr
if e_e then
local scripts = features[kind] --
local languages = scripts[script] or scripts[wildcard]
+ if not languages and autoscript then
+ langages = defaultscript(featuretype,autoscript,scripts)
+ end
if languages then
- -- local valid, what = false
- local valid = false
- -- not languages[language] or languages[default] or languages[wildcard] because we want tracing
+ -- we need detailed control over default becase we want to trace
-- only first attribute match check, so we assume simple fina's
- -- default can become a font feature itself
+ local valid = false
if languages[language] then
- valid = e_e -- was true
- -- what = language
- -- elseif languages[default] then
- -- valid = true
- -- what = default
+ valid = e_e
elseif languages[wildcard] then
- valid = e_e -- was true
- -- what = wildcard
+ valid = e_e
+ elseif autolanguage and defaultlanguage(featuretype,autolanguage,languages) then
+ valid = e_e
end
if valid then
local attribute = autofeatures[kind] or false
- -- if a_e and dynamic < 0 then
- -- valid = false
- -- end
- -- if trace_applied then
- -- local typ, action = match(sequence.type,"(.*)_(.*)") -- brrr
- -- report_process(
- -- "%s font: %03i, dynamic: %03i, kind: %s, script: %-4s, language: %-4s (%-4s), type: %s, action: %s, name: %s",
- -- (valid and "+") or "-",font,attr or 0,kind,script,language,what,typ,action,sequence.name)
- -- end
if trace_applied then
report_process(
"font %s, dynamic %a (%a), feature %a, script %a, language %a, lookup %a, value %a",
font,attr or 0,dynamic,kind,script,language,sequence.name,valid)
end
- ra[#ra+1] = { valid, attribute, sequence.chain or 0, kind, sequence }
+ ra[#ra+1] = { valid, attribute, sequence, kind }
end
end
end
end
- -- { valid, attribute, chain, "generic", sequence } -- false anyway, could be flag instead of table
- else
- -- can't happen
end
- else
- -- { false, false, chain, false, sequence } -- indirect lookup, part of chain (todo: make this a separate table)
end
end
@@ -249,23 +240,13 @@ function otf.dataset(tfmdata,font,attr) -- attr only when explicit (as in specia
}
rl[attr] = ra
local sequences = tfmdata.resources.sequences
- -- setmetatableindex(ra, function(t,k)
- -- if type(k) == "number" then
- -- local v = initialize(sequences[k],script,language,s_enabled,a_enabled,font,attr,dynamic)
- -- t[k] = v or false
- -- return v
- -- end
- -- end)
--- for s=1,#sequences do
--- local v = initialize(sequences[s],script,language,s_enabled,a_enabled,font,attr,dynamic)
--- if v then
--- ra[#ra+1] = v
--- end
--- end
- for s=1,#sequences do
- initialize(sequences[s],script,language,s_enabled,a_enabled,font,attr,dynamic,ra)
+ if sequences then
+ local autoscript = (s_enabled and s_enabled.autoscript ) or (a_enabled and a_enabled.autoscript )
+ local autolanguage = (s_enabled and s_enabled.autolanguage) or (a_enabled and a_enabled.autolanguage)
+ for s=1,#sequences do
+ initialize(sequences[s],script,language,s_enabled,a_enabled,font,attr,dynamic,ra,autoscript,autolanguage)
+ end
end
--- table.save((jit and "tmc-" or "tma-")..font..".log",ra) -- bug in jit
end
return ra
diff --git a/Master/texmf-dist/tex/context/base/font-otf.lua b/Master/texmf-dist/tex/context/base/mkiv/font-otf.lua
index 308ec4568e6..cbdc79678bb 100644
--- a/Master/texmf-dist/tex/context/base/font-otf.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-otf.lua
@@ -12,17 +12,21 @@ if not modules then modules = { } end modules ['font-otf'] = {
-- to_table -> totable
-- ascent descent
+-- to be checked: combinations like:
+--
+-- current="ABCD" with [A]=nothing, [BC]=ligature, [D]=single (applied to result of BC so funny index)
+--
+-- unlikely but possible
+
-- more checking against low level calls of functions
local utfbyte = utf.byte
-local format, gmatch, gsub, find, match, lower, strip = string.format, string.gmatch, string.gsub, string.find, string.match, string.lower, string.strip
+local gmatch, gsub, find, match, lower, strip = string.gmatch, string.gsub, string.find, string.match, string.lower, string.strip
local type, next, tonumber, tostring = type, next, tonumber, tostring
local abs = math.abs
-local insert = table.insert
-local lpegmatch = lpeg.match
-local reversed, concat, remove, sortedkeys = table.reversed, table.concat, table.remove, table.sortedkeys
+local reversed, concat, insert, remove, sortedkeys = table.reversed, table.concat, table.insert, table.remove, table.sortedkeys
local ioflush = io.flush
-local fastcopy, tohash, derivetable = table.fastcopy, table.tohash, table.derive
+local fastcopy, tohash, derivetable, copy = table.fastcopy, table.tohash, table.derive, table.copy
local formatters = string.formatters
local P, R, S, C, Ct, lpegmatch = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Ct, lpeg.match
@@ -36,6 +40,7 @@ local elapsedtime = statistics.elapsedtime
local findbinfile = resolvers.findbinfile
local trace_private = false registertracker("otf.private", function(v) trace_private = v end)
+local trace_subfonts = false registertracker("otf.subfonts", function(v) trace_subfonts = v end)
local trace_loading = false registertracker("otf.loading", function(v) trace_loading = v end)
local trace_features = false registertracker("otf.features", function(v) trace_features = v end)
local trace_dynamics = false registertracker("otf.dynamics", function(v) trace_dynamics = v end)
@@ -53,7 +58,7 @@ local otf = fonts.handlers.otf
otf.glists = { "gsub", "gpos" }
-otf.version = 2.803 -- beware: also sync font-mis.lua
+otf.version = 2.824 -- beware: also sync font-mis.lua and in mtx-fonts
otf.cache = containers.define("fonts", "otf", otf.version, true)
local hashes = fonts.hashes
@@ -227,6 +232,7 @@ local valid_fields = table.tohash {
-- "lookups",
"macstyle",
-- "modificationtime",
+ "notdef_loc",
"onlybitmaps",
"origname",
"os2_version",
@@ -254,6 +260,7 @@ local valid_fields = table.tohash {
"weight",
"weight_width_slope_only",
-- "xuid",
+ -- "truetype", -- maybe as check
}
local ordered_enhancers = {
@@ -282,13 +289,16 @@ local ordered_enhancers = {
"check glyphs",
"check metadata",
- "check extra features", -- after metadata
"prepare tounicode",
"check encoding", -- moved
"add duplicates",
+ "expand lookups", -- a temp hack awaiting the lua loader
+
+ "check extra features", -- after metadata and duplicates
+
"cleanup tables",
"compact lookups",
@@ -385,6 +395,7 @@ function otf.load(filename,sub,featurefile) -- second argument (format) is gone
if featurefile then
name = name .. "@" .. file.removesuffix(file.basename(featurefile))
end
+ -- or: sub = tonumber(sub)
if sub == "" then
sub = false
end
@@ -441,6 +452,7 @@ function otf.load(filename,sub,featurefile) -- second argument (format) is gone
end
end
if reload then
+ starttiming("fontloader")
report_otf("loading %a, hash %a",filename,hash)
local fontdata, messages
if sub then
@@ -475,6 +487,7 @@ function otf.load(filename,sub,featurefile) -- second argument (format) is gone
data = {
size = size,
time = time,
+ subfont = sub,
format = otf_format(filename),
featuredata = featurefiles,
resources = {
@@ -511,7 +524,6 @@ function otf.load(filename,sub,featurefile) -- second argument (format) is gone
tounicodetable = Ct(splitter),
},
}
- starttiming(data)
report_otf("file size: %s", size)
enhancers.apply(data,filename,fontdata)
local packtime = { }
@@ -528,10 +540,10 @@ function otf.load(filename,sub,featurefile) -- second argument (format) is gone
if cleanup > 1 then
collectgarbage("collect")
end
- stoptiming(data)
+ stoptiming("fontloader")
if elapsedtime then -- not in generic
- report_otf("preprocessing and caching time %s, packtime %s",
- elapsedtime(data),packdata and elapsedtime(packtime) or 0)
+ report_otf("loading, optimizing, packing and caching time %s, pack time %s",
+ elapsedtime("fontloader"),packdata and elapsedtime(packtime) or 0)
end
close_font(fontdata) -- free memory
if cleanup > 3 then
@@ -542,6 +554,7 @@ function otf.load(filename,sub,featurefile) -- second argument (format) is gone
collectgarbage("collect")
end
else
+ stoptiming("fontloader")
data = nil
report_otf("loading failed due to read error")
end
@@ -634,9 +647,6 @@ actions["add dimensions"] = function(data,filename)
report_otf("mark %a with width %b found in %a",d.name or "<noname>",wd,basename)
-- d.width = -wd
end
- -- if forcenotdef and not d.name then
- -- d.name = ".notdef"
- -- end
if bb then
local ht = bb[4]
local dp = -bb[2]
@@ -696,7 +706,7 @@ local function somecopy(old) -- fast one
end
end
--- not setting hasitalics and class (when nil) during table cronstruction can save some mem
+-- not setting hasitalics and class (when nil) during table construction can save some mem
actions["prepare glyphs"] = function(data,filename,raw)
local rawglyphs = raw.glyphs
@@ -712,6 +722,7 @@ actions["prepare glyphs"] = function(data,filename,raw)
local indices = resources.indices -- index to unicode
local duplicates = resources.duplicates
local variants = resources.variants
+ local notdefindex = -1
if rawsubfonts then
@@ -721,85 +732,135 @@ actions["prepare glyphs"] = function(data,filename,raw)
if rawcidinfo.registry then
local cidmap = fonts.cid.getmap(rawcidinfo)
if cidmap then
--- local map = raw.map.map -- else created each time
--- local backmap = raw.map.backmap -- else created each time
rawcidinfo.usedname = cidmap.usedname
- local nofnames, nofunicodes = 0, 0
- local cidunicodes, cidnames = cidmap.unicodes, cidmap.names
+ local nofnames = 0
+ local nofunicodes = 0
+ local cidunicodes = cidmap.unicodes
+ local cidnames = cidmap.names
+ local cidtotal = 0
+ local unique = trace_subfonts and { }
for cidindex=1,#rawsubfonts do
local subfont = rawsubfonts[cidindex]
local cidglyphs = subfont.glyphs
if includesubfonts then
metadata.subfonts[cidindex] = somecopy(subfont)
end
- -- we have delayed loading so we cannot use next
- for index=0,subfont.glyphcnt-1 do -- we could take the previous glyphcnt instead of 0
- local glyph = cidglyphs[index]
- if glyph then
- local unicode = glyph.unicode
--- local unicode = backmap[index] or -1
- if unicode >= 0x00E000 and unicode <= 0x00F8FF then
- unicode = -1
- elseif unicode >= 0x0F0000 and unicode <= 0x0FFFFD then
- unicode = -1
- elseif unicode >= 0x100000 and unicode <= 0x10FFFD then
- unicode = -1
- end
- local name = glyph.name or cidnames[index]
--- print(index,unicode,glyph.name,raw.map.map[unicode],raw.map.backmap[index])
- if not unicode or unicode == -1 then -- or unicode >= criterium then
- unicode = cidunicodes[index]
- end
- if unicode and descriptions[unicode] then
- if trace_private then
- report_otf("preventing glyph %a at index %H to overload unicode %U",name or "noname",index,unicode)
+ local cidcnt = subfont.glyphcnt
+ local cidmin = subfont.glyphmin
+ local cidmax = subfont.glyphmax
+ local notdef = (tonumber(raw.table_version) or 0) > 0.4 and subfont.notdef_loc or -1
+ if notdeffound == -1 and notdef >= 0 then
+ notdeffound = notdef
+ end
+ if trace_subfonts then
+ local cidtot = cidmax - cidmin + 1
+ cidtotal = cidtotal + cidtot
+ report_otf("subfont: %i, min: %i, max: %i, cnt: %i, n: %i",cidindex,cidmin,cidmax,cidtot,cidcnt)
+ end
+ if cidcnt > 0 then
+ for index=cidmin,cidmax do
+ local glyph = cidglyphs[index]
+ if glyph then
+ if trace_subfonts then
+ unique[index] = true
end
- unicode = -1
- end
- if not unicode or unicode == -1 then -- or unicode >= criterium then
- if not name then
- name = format("u%06X.ctx",private)
+ local unicode = glyph.unicode
+ if unicode >= 0x00E000 and unicode <= 0x00F8FF then
+ unicode = -1
+ elseif unicode >= 0x0F0000 and unicode <= 0x0FFFFD then
+ unicode = -1
+ elseif unicode >= 0x100000 and unicode <= 0x10FFFD then
+ unicode = -1
end
- unicode = private
- unicodes[name] = private
- if trace_private then
- report_otf("glyph %a at index %H is moved to private unicode slot %U",name,index,private)
+ local name = glyph.name or cidnames[index]
+ if not unicode or unicode == -1 then -- or unicode >= criterium then
+ unicode = cidunicodes[index]
end
- private = private + 1
- nofnames = nofnames + 1
- else
- -- if unicode > criterium then
- -- local taken = descriptions[unicode]
- -- if taken then
- -- private = private + 1
- -- descriptions[private] = taken
- -- unicodes[taken.name] = private
- -- indices[taken.index] = private
- -- if trace_private then
- -- report_otf("slot %U is moved to %U due to private in font",unicode)
- -- end
- -- end
- -- end
- if not name then
- name = format("u%06X.ctx",unicode)
+ if unicode and descriptions[unicode] then
+ if trace_private then
+ report_otf("preventing glyph %a at index %H to overload unicode %U",name or "noname",index,unicode)
+ end
+ unicode = -1
+ end
+ if not unicode or unicode == -1 then -- or unicode >= criterium then
+ if not name then
+ name = formatters["u%06X.ctx"](private)
+ end
+ unicode = private
+ unicodes[name] = private
+ if trace_private then
+ report_otf("glyph %a at index %H is moved to private unicode slot %U",name,index,private)
+ end
+ private = private + 1
+ nofnames = nofnames + 1
+ else
+ -- if unicode > criterium then
+ -- local taken = descriptions[unicode]
+ -- if taken then
+ -- private = private + 1
+ -- descriptions[private] = taken
+ -- unicodes[taken.name] = private
+ -- indices[taken.index] = private
+ -- if trace_private then
+ -- report_otf("slot %U is moved to %U due to private in font",unicode)
+ -- end
+ -- end
+ -- end
+ if not name then
+ name = formatters["u%06X.ctx"](unicode)
+ end
+ unicodes[name] = unicode
+ nofunicodes = nofunicodes + 1
+ end
+ indices[index] = unicode -- each index is unique (at least now)
+ local description = {
+ -- width = glyph.width,
+ boundingbox = glyph.boundingbox,
+ -- name = glyph.name or name or "unknown", -- uniXXXX
+ name = name or "unknown", -- uniXXXX
+ -- cidindex = cidindex,
+ index = index,
+ glyph = glyph,
+ }
+ descriptions[unicode] = description
+ local altuni = glyph.altuni
+ if altuni then
+ -- local d
+ for i=1,#altuni do
+ local a = altuni[i]
+ local u = a.unicode
+ if u ~= unicode then
+ local v = a.variant
+ if v then
+ -- tricky: no addition to d? needs checking but in practice such dups are either very simple
+ -- shapes or e.g cjk with not that many features
+ local vv = variants[v]
+ if vv then
+ vv[u] = unicode
+ else -- xits-math has some:
+ vv = { [u] = unicode }
+ variants[v] = vv
+ end
+ -- elseif d then
+ -- d[#d+1] = u
+ -- else
+ -- d = { u }
+ end
+ end
+ end
+ -- if d then
+ -- duplicates[unicode] = d -- is this needed ?
+ -- end
end
- unicodes[name] = unicode
- nofunicodes = nofunicodes + 1
end
- indices[index] = unicode -- each index is unique (at least now)
- local description = {
- -- width = glyph.width,
- boundingbox = glyph.boundingbox,
- -- name = glyph.name or name or "unknown", -- uniXXXX
- name = name or "unknown", -- uniXXXX
- cidindex = cidindex,
- index = index,
- glyph = glyph,
- }
- descriptions[unicode] = description
end
+ else
+ report_otf("potential problem: no glyphs found in subfont %i",cidindex)
end
end
+ if trace_subfonts then
+ report_otf("nofglyphs: %i, unique: %i",cidtotal,table.count(unique))
+ end
if trace_loading then
report_otf("cid font remapped, %s unicode points, %s symbolic names, %s glyphs",nofunicodes, nofnames, nofunicodes+nofnames)
end
@@ -812,91 +873,108 @@ actions["prepare glyphs"] = function(data,filename,raw)
else
- for index=0,raw.glyphcnt-1 do -- not raw.glyphmax-1 (as that will crash)
- local glyph = rawglyphs[index]
- if glyph then
- local unicode = glyph.unicode
- local name = glyph.name
- if not unicode or unicode == -1 then -- or unicode >= criterium then
- unicode = private
- unicodes[name] = private
- if trace_private then
- report_otf("glyph %a at index %H is moved to private unicode slot %U",name,index,private)
- end
- private = private + 1
- else
- -- We have a font that uses and exposes the private area. As this is rather unreliable it's
- -- advised no to trust slots here (better use glyphnames). Anyway, we need a double check:
- -- we need to move already moved entries and we also need to bump the next private to after
- -- the (currently) last slot. This could leave us with a hole but we have holes anyway.
- if unicode > criterium then
- -- \definedfont[file:HANBatang-LVT.ttf] \fontchar{uF0135} \char"F0135
- local taken = descriptions[unicode]
- if taken then
- if unicode >= private then
- private = unicode + 1 -- restart private (so we can have mixed now)
+ local cnt = raw.glyphcnt or 0
+ local min = raw.glyphmin or 0
+ local max = raw.glyphmax or (raw.glyphcnt - 1)
+ notdeffound = (tonumber(raw.table_version) or 0) > 0.4 and raw.notdef_loc or -1
+ if cnt > 0 then
+ for index=min,max do
+ local glyph = rawglyphs[index]
+ if glyph then
+ local unicode = glyph.unicode
+ local name = glyph.name
+ if not unicode or unicode == -1 then -- or unicode >= criterium then
+ unicode = private
+ unicodes[name] = private
+ if trace_private then
+ report_otf("glyph %a at index %H is moved to private unicode slot %U",name,index,private)
+ end
+ private = private + 1
+ else
+ -- We have a font that uses and exposes the private area. As this is rather unreliable it's
+ -- advised no to trust slots here (better use glyphnames). Anyway, we need a double check:
+ -- we need to move already moved entries and we also need to bump the next private to after
+ -- the (currently) last slot. This could leave us with a hole but we have holes anyway.
+ if unicode > criterium then
+ -- \definedfont[file:HANBatang-LVT.ttf] \fontchar{uF0135} \char"F0135
+ local taken = descriptions[unicode]
+ if taken then
+ if unicode >= private then
+ private = unicode + 1 -- restart private (so we can have mixed now)
+ else
+ private = private + 1 -- move on
+ end
+ descriptions[private] = taken
+ unicodes[taken.name] = private
+ indices[taken.index] = private
+ if trace_private then
+ report_otf("slot %U is moved to %U due to private in font",unicode)
+ end
else
- private = private + 1 -- move on
- end
- descriptions[private] = taken
- unicodes[taken.name] = private
- indices[taken.index] = private
- if trace_private then
- report_otf("slot %U is moved to %U due to private in font",unicode)
- end
- else
- if unicode >= private then
- private = unicode + 1 -- restart (so we can have mixed now)
+ if unicode >= private then
+ private = unicode + 1 -- restart (so we can have mixed now)
+ end
end
end
+ unicodes[name] = unicode
end
- unicodes[name] = unicode
- end
- indices[index] = unicode
- -- if not name then
- -- name = format("u%06X",unicode) -- u%06X.ctx
- -- end
- descriptions[unicode] = {
- -- width = glyph.width,
- boundingbox = glyph.boundingbox,
- name = name,
- index = index,
- glyph = glyph,
- }
- local altuni = glyph.altuni
- if altuni then
- -- local d
- for i=1,#altuni do
- local a = altuni[i]
- local u = a.unicode
- local v = a.variant
- if v then
- -- tricky: no addition to d? needs checking but in practice such dups are either very simple
- -- shapes or e.g cjk with not that many features
- local vv = variants[v]
- if vv then
- vv[u] = unicode
- else -- xits-math has some:
- vv = { [u] = unicode }
- variants[v] = vv
+ indices[index] = unicode
+ -- if not name then
+ -- name = formatters["u%06X"](unicode) -- u%06X.ctx
+ -- end
+ descriptions[unicode] = {
+ -- width = glyph.width,
+ boundingbox = glyph.boundingbox,
+ name = name,
+ index = index,
+ glyph = glyph,
+ }
+ local altuni = glyph.altuni
+ if altuni then
+ -- local d
+ for i=1,#altuni do
+ local a = altuni[i]
+ local u = a.unicode
+ if u ~= unicode then
+ local v = a.variant
+ if v then
+ -- tricky: no addition to d? needs checking but in practice such dups are either very simple
+ -- shapes or e.g cjk with not that many features
+ local vv = variants[v]
+ if vv then
+ vv[u] = unicode
+ else -- xits-math has some:
+ vv = { [u] = unicode }
+ variants[v] = vv
+ end
+ -- elseif d then
+ -- d[#d+1] = u
+ -- else
+ -- d = { u }
+ end
end
- -- elseif d then
- -- d[#d+1] = u
- -- else
- -- d = { u }
end
+ -- if d then
+ -- duplicates[unicode] = d -- is this needed ?
+ -- end
end
- -- if d then
- -- duplicates[unicode] = d -- is this needed ?
- -- end
+ else
+ report_otf("potential problem: glyph %U is used but empty",index)
end
- else
- report_otf("potential problem: glyph %U is used but empty",index)
end
+ else
+ report_otf("potential problem: no glyphs found")
end
end
+ if notdeffound == -1 then
+ report_otf("warning: no .notdef found in %a",filename)
+ elseif notdeffound ~= 0 then
+ report_otf("warning: .notdef found at position %a in %a",notdeffound,filename)
+ end
+ metadata.notdef = notdeffound
+
resources.private = private
end
@@ -994,7 +1072,8 @@ actions["add duplicates"] = function(data,filename,raw)
local unicodes = resources.unicodes -- name to unicode
local indices = resources.indices -- index to unicodes
local duplicates = resources.duplicates
- for unicode, d in next, duplicates do
+ -- for unicode, d in next, duplicates do
+ for unicode, d in table.sortedhash(duplicates) do -- nicer for log
local nofduplicates = #d
if nofduplicates > 4 then
if trace_loading then
@@ -1021,12 +1100,12 @@ actions["add duplicates"] = function(data,filename,raw)
-- todo: lookups etc
end
if u > 0 then -- and
- local duplicate = table.copy(description) -- else packing problem
- duplicate.comment = format("copy of U+%05X", unicode)
+ local duplicate = copy(description) -- else packing problem
+ duplicate.comment = formatters["copy of %U"](unicode)
descriptions[u] = duplicate
-- validduplicates[#validduplicates+1] = u
if trace_loading then
- report_otf("duplicating %U to %U with index %H (%s kerns)",unicode,u,description.index,n)
+ report_otf("duplicating %06U to %06U with index %H (%s kerns)",unicode,u,description.index,n)
end
end
end
@@ -1040,16 +1119,16 @@ end
-- boundingbox: split into ht/dp takes more memory (larger tables and less sharing)
actions["analyze glyphs"] = function(data,filename,raw) -- maybe integrate this in the previous
- local descriptions = data.descriptions
- local resources = data.resources
- local metadata = data.metadata
- local properties = data.properties
- local hasitalics = false
- local widths = { }
- local marks = { } -- always present (saves checking)
+ local descriptions = data.descriptions
+ local resources = data.resources
+ local metadata = data.metadata
+ local properties = data.properties
+ local hasitalics = false
+ local widths = { }
+ local marks = { } -- always present (saves checking)
for unicode, description in next, descriptions do
- local glyph = description.glyph
- local italic = glyph.italic_correction
+ local glyph = description.glyph
+ local italic = glyph.italic_correction -- only in a math font (we also have vert/horiz)
if not italic then
-- skip
elseif italic == 0 then
@@ -1118,7 +1197,8 @@ end
actions["reorganize features"] = function(data,filename,raw) -- combine with other
local features = { }
data.resources.features = features
- for k, what in next, otf.glists do
+ for k=1,#otf.glists do
+ local what = otf.glists[k]
local dw = raw[what]
if dw then
local f = { }
@@ -1187,6 +1267,140 @@ actions["reorganize anchor classes"] = function(data,filename,raw)
end
end
+-- local function checklookups(data,missing,nofmissing)
+-- local resources = data.resources
+-- local unicodes = resources.unicodes
+-- local lookuptypes = resources.lookuptypes
+-- if not unicodes or not lookuptypes then
+-- return
+-- elseif nofmissing <= 0 then
+-- return
+-- end
+-- local descriptions = data.descriptions
+-- local private = fonts.constructors and fonts.constructors.privateoffset or 0xF0000 -- 0x10FFFF
+-- --
+-- local ns, nl = 0, 0
+
+-- local guess = { }
+-- -- helper
+-- local function check(gname,code,unicode)
+-- local description = descriptions[code]
+-- -- no need to add a self reference
+-- local variant = description.name
+-- if variant == gname then
+-- return
+-- end
+-- -- the variant already has a unicode (normally that results in a default tounicode to self)
+-- local unic = unicodes[variant]
+-- if unic == -1 or unic >= private or (unic >= 0xE000 and unic <= 0xF8FF) or unic == 0xFFFE or unic == 0xFFFF then
+-- -- no default mapping and therefore maybe no tounicode yet
+-- else
+-- return
+-- end
+-- -- the variant already has a tounicode
+-- if descriptions[code].unicode then
+-- return
+-- end
+-- -- add to the list
+-- local g = guess[variant]
+-- -- local r = overloads[unicode]
+-- -- if r then
+-- -- unicode = r.unicode
+-- -- end
+-- if g then
+-- g[gname] = unicode
+-- else
+-- guess[variant] = { [gname] = unicode }
+-- end
+-- end
+-- --
+-- for unicode, description in next, descriptions do
+-- local slookups = description.slookups
+-- if slookups then
+-- local gname = description.name
+-- for tag, data in next, slookups do
+-- local lookuptype = lookuptypes[tag]
+-- if lookuptype == "alternate" then
+-- for i=1,#data do
+-- check(gname,data[i],unicode)
+-- end
+-- elseif lookuptype == "substitution" then
+-- check(gname,data,unicode)
+-- end
+-- end
+-- end
+-- local mlookups = description.mlookups
+-- if mlookups then
+-- local gname = description.name
+-- for tag, list in next, mlookups do
+-- local lookuptype = lookuptypes[tag]
+-- if lookuptype == "alternate" then
+-- for i=1,#list do
+-- local data = list[i]
+-- for i=1,#data do
+-- check(gname,data[i],unicode)
+-- end
+-- end
+-- elseif lookuptype == "substitution" then
+-- for i=1,#list do
+-- check(gname,list[i],unicode)
+-- end
+-- end
+-- end
+-- end
+-- end
+-- -- resolve references
+-- local done = true
+-- while done do
+-- done = false
+-- for k, v in next, guess do
+-- if type(v) ~= "number" then
+-- for kk, vv in next, v do
+-- if vv == -1 or vv >= private or (vv >= 0xE000 and vv <= 0xF8FF) or vv == 0xFFFE or vv == 0xFFFF then
+-- local uu = guess[kk]
+-- if type(uu) == "number" then
+-- guess[k] = uu
+-- done = true
+-- end
+-- else
+-- guess[k] = vv
+-- done = true
+-- end
+-- end
+-- end
+-- end
+-- end
+-- -- wrap up
+-- local orphans = 0
+-- local guessed = 0
+-- for k, v in next, guess do
+-- if type(v) == "number" then
+-- descriptions[unicodes[k]].unicode = descriptions[v].unicode or v -- can also be a table
+-- guessed = guessed + 1
+-- else
+-- local t = nil
+-- local l = lower(k)
+-- local u = unicodes[l]
+-- if not u then
+-- orphans = orphans + 1
+-- elseif u == -1 or u >= private or (u >= 0xE000 and u <= 0xF8FF) or u == 0xFFFE or u == 0xFFFF then
+-- local unicode = descriptions[u].unicode
+-- if unicode then
+-- descriptions[unicodes[k]].unicode = unicode
+-- guessed = guessed + 1
+-- else
+-- orphans = orphans + 1
+-- end
+-- else
+-- orphans = orphans + 1
+-- end
+-- end
+-- end
+-- if trace_loading and orphans > 0 or guessed > 0 then
+-- report_otf("%s glyphs with no related unicode, %s guessed, %s orphans",guessed+orphans,guessed,orphans)
+-- end
+-- end
+
actions["prepare tounicode"] = function(data,filename,raw)
fonts.mappings.addtounicode(data,filename)
end
@@ -1221,8 +1435,9 @@ actions["reorganize subtables"] = function(data,filename,raw)
local lookups = { }
local chainedfeatures = { }
resources.sequences = sequences
- resources.lookups = lookups
- for _, what in next, otf.glists do
+ resources.lookups = lookups -- we also have lookups in data itself
+ for k=1,#otf.glists do
+ local what = otf.glists[k]
local dw = raw[what]
if dw then
for k=1,#dw do
@@ -1308,12 +1523,6 @@ actions["reorganize subtables"] = function(data,filename,raw)
end
end
--- test this:
---
--- for _, what in next, otf.glists do
--- raw[what] = nil
--- end
-
actions["prepare lookups"] = function(data,filename,raw)
local lookups = raw.lookups
if lookups then
@@ -1427,12 +1636,16 @@ end
actions["reorganize lookups"] = function(data,filename,raw) -- we could check for "" and n == 0
-- we prefer the before lookups in a normal order
if data.lookups then
- local splitter = data.helpers.tounicodetable
- local t_u_cache = { }
- local s_u_cache = t_u_cache -- string keys
- local t_h_cache = { }
- local s_h_cache = t_h_cache -- table keys (so we could use one cache)
- local r_u_cache = { } -- maybe shared
+ local helpers = data.helpers
+ local duplicates = data.resources.duplicates
+ local splitter = helpers.tounicodetable
+ local t_u_cache = { }
+ local s_u_cache = t_u_cache -- string keys
+ local t_h_cache = { }
+ local s_h_cache = t_h_cache -- table keys (so we could use one cache)
+ local r_u_cache = { } -- maybe shared
+ helpers.matchcache = t_h_cache -- so that we can add duplicates
+ --
for _, lookup in next, data.lookups do
local rules = lookup.rules
if rules then
@@ -1586,6 +1799,50 @@ actions["reorganize lookups"] = function(data,filename,raw) -- we could check fo
end
end
+actions["expand lookups"] = function(data,filename,raw) -- we could check for "" and n == 0
+ if data.lookups then
+ local cache = data.helpers.matchcache
+ if cache then
+ local duplicates = data.resources.duplicates
+ for key, hash in next, cache do
+ local done = nil
+ for key in next, hash do
+ local unicode = duplicates[key]
+ if not unicode then
+ -- no duplicate
+ elseif type(unicode) == "table" then
+ -- multiple duplicates
+ for i=1,#unicode do
+ local u = unicode[i]
+ if hash[u] then
+ -- already in set
+ elseif done then
+ done[u] = key
+ else
+ done = { [u] = key }
+ end
+ end
+ else
+ -- one duplicate
+ if hash[unicode] then
+ -- already in set
+ elseif done then
+ done[unicode] = key
+ else
+ done = { [unicode] = key }
+ end
+ end
+ end
+ if done then
+ for u in next, done do
+ hash[u] = true
+ end
+ end
+ end
+ end
+ end
+end
+
local function check_variants(unicode,the_variants,splitter,unicodes)
local variants = the_variants.variants
if variants then -- use splitter
@@ -1626,11 +1883,11 @@ local function check_variants(unicode,the_variants,splitter,unicodes)
parts = nil
end
end
- local italic_correction = the_variants.italic_correction
- if italic_correction and italic_correction == 0 then
- italic_correction = nil
+ local italic = the_variants.italic
+ if italic and italic == 0 then
+ italic = nil
end
- return variants, parts, italic_correction
+ return variants, parts, italic
end
actions["analyze math"] = function(data,filename,raw)
@@ -1639,15 +1896,16 @@ actions["analyze math"] = function(data,filename,raw)
local unicodes = data.resources.unicodes
local splitter = data.helpers.tounicodetable
for unicode, description in next, data.descriptions do
- local glyph = description.glyph
- local mathkerns = glyph.mathkern -- singular
- local horiz_variants = glyph.horiz_variants
- local vert_variants = glyph.vert_variants
- local top_accent = glyph.top_accent
- if mathkerns or horiz_variants or vert_variants or top_accent then
+ local glyph = description.glyph
+ local mathkerns = glyph.mathkern -- singular
+ local hvariants = glyph.horiz_variants
+ local vvariants = glyph.vert_variants
+ local accent = glyph.top_accent
+ local italic = glyph.italic_correction
+ if mathkerns or hvariants or vvariants or accent or italic then
local math = { }
- if top_accent then
- math.top_accent = top_accent
+ if accent then
+ math.accent = accent
end
if mathkerns then
for k, v in next, mathkerns do
@@ -1663,15 +1921,14 @@ actions["analyze math"] = function(data,filename,raw)
end
math.kerns = mathkerns
end
- if horiz_variants then
- math.horiz_variants, math.horiz_parts, math.horiz_italic_correction = check_variants(unicode,horiz_variants,splitter,unicodes)
+ if hvariants then
+ math.hvariants, math.hparts, math.hitalic = check_variants(unicode,hvariants,splitter,unicodes)
end
- if vert_variants then
- math.vert_variants, math.vert_parts, math.vert_italic_correction = check_variants(unicode,vert_variants,splitter,unicodes)
+ if vvariants then
+ math.vvariants, math.vparts, math.vitalic = check_variants(unicode,vvariants,splitter,unicodes)
end
- local italic_correction = description.italic
- if italic_correction and italic_correction ~= 0 then
- math.italic_correction = italic_correction
+ if italic and italic ~= 0 then
+ math.italic = italic
end
description.math = math
end
@@ -1742,9 +1999,10 @@ actions["merge kern classes"] = function(data,filename,raw)
local kernclass = subtable.kernclass -- name is inconsistent with anchor_classes
local lookup = subtable.lookup or subtable.name
if kernclass then -- the next one is quite slow
+ -- as fas as i can see the kernclass is a table with one entry and offsets
+ -- have no [1] so we could remov eon elevel (kernclass) and start offsets
+ -- at 1 but we're too far down the road now to fix that
if #kernclass > 0 then
- -- it's a table with one entry .. a future luatex can just
- -- omit that level
kernclass = kernclass[1]
lookup = type(kernclass.lookup) == "string" and kernclass.lookup or lookup
report_otf("fixing kernclass table of lookup %a",lookup)
@@ -1771,15 +2029,17 @@ actions["merge kern classes"] = function(data,filename,raw)
if splt then
local extrakerns = { }
local baseoffset = (fk-1) * maxseconds
- for sk=2,maxseconds do -- will become 1 based in future luatex
- local sv = seconds[sk]
-- for sk, sv in next, seconds do
- local splt = split[sv]
- if splt then -- redundant test
- local offset = offsets[baseoffset + sk]
- if offset then
- for i=1,#splt do
- extrakerns[splt[i]] = offset
+ for sk=2,maxseconds do
+ local sv = seconds[sk]
+ if sv then
+ local splt = split[sv]
+ if splt then -- redundant test
+ local offset = offsets[baseoffset + sk]
+ if offset then
+ for i=1,#splt do
+ extrakerns[splt[i]] = offset
+ end
end
end
end
@@ -1836,7 +2096,7 @@ actions["merge kern classes"] = function(data,filename,raw)
report_otf("%s kern overloads ignored",ignored)
end
if blocked > 0 then
- report_otf("%s succesive kerns blocked",blocked)
+ report_otf("%s successive kerns blocked",blocked)
end
end
end
@@ -1873,18 +2133,22 @@ actions["check metadata"] = function(data,filename,raw)
end
end
--
- if metadata.validation_state and table.contains(metadata.validation_state,"bad_ps_fontname") then
+ local state = metadata.validation_state
+ local names = raw.names
+ --
+ if state and table.contains(state,"bad_ps_fontname") then
-- the ff library does a bit too much (and wrong) checking ... so we need to catch this
-- at least for now
local function valid(what)
- local names = raw.names
- for i=1,#names do
- local list = names[i]
- local names = list.names
- if names then
- local name = names[what]
- if name and valid_ps_name(name) then
- return name
+ if names then
+ for i=1,#names do
+ local list = names[i]
+ local names = list.names
+ if names then
+ local name = names[what]
+ if name and valid_ps_name(name) then
+ return name
+ end
end
end
end
@@ -1908,6 +2172,36 @@ actions["check metadata"] = function(data,filename,raw)
check("fullname")
end
--
+ if names then
+ local psname = metadata.psname
+ if not psname or psname == "" then
+ for i=1,#names do
+ local name = names[i]
+ -- Currently we use the same restricted search as in the new context (specific) font loader
+ -- but we might add more lang checks (it worked ok in the new loaded so now we're in sync)
+ -- This check here is also because there are (esp) cjk fonts out there with psnames different
+ -- from fontnames (gives a bad lookup in backend).
+ if lower(name.lang) == "english (us)" then
+ local specification = name.names
+ if specification then
+ local postscriptname = specification.postscriptname
+ if postscriptname then
+ psname = postscriptname
+ end
+ end
+ end
+ break
+ end
+ end
+ if psname ~= metadata.fontname then
+ report_otf("fontname %a, fullname %a, psname %a",metadata.fontname,metadata.fullname,psname)
+ end
+ metadata.psname = psname
+ end
+ --
+ if state and table.contains(state,"bad_cmap_table") then
+ report_otf("fontfile %a has bad cmap tables",filename)
+ end
end
actions["cleanup tables"] = function(data,filename,raw)
@@ -1933,7 +2227,9 @@ end
-- we can share { } as it is never set
---- ligatures have an extra specification.char entry that we don't use
+-- ligatures have an extra specification.char entry that we don't use
+
+-- mlookups only with pairs and ligatures
actions["reorganize glyph lookups"] = function(data,filename,raw)
local resources = data.resources
@@ -2014,14 +2310,14 @@ actions["reorganize glyph lookups"] = function(data,filename,raw)
if mlookups then
description.mlookups = mlookups
end
+ -- description.lookups = nil
end
end
-
end
local zero = { 0, 0 }
-actions["reorganize glyph anchors"] = function(data,filename,raw) -- when we replace inplace we safe entries
+actions["reorganize glyph anchors"] = function(data,filename,raw)
local descriptions = data.descriptions
for unicode, description in next, descriptions do
local anchors = description.glyph.anchors
@@ -2244,7 +2540,7 @@ end
-- we cannot share descriptions as virtual fonts might extend them (ok,
-- we could use a cache with a hash
--
--- we already assing an empty tabel to characters as we can add for
+-- we already assign an empty tabel to characters as we can add for
-- instance protruding info and loop over characters; one is not supposed
-- to change descriptions and if one does so one should make a copy!
@@ -2267,10 +2563,14 @@ local function copytotfm(data,cache_id)
local spaceunits = 500
local spacer = "space"
local designsize = metadata.designsize or metadata.design_size or 100
+ local minsize = metadata.minsize or metadata.design_range_bottom or designsize
+ local maxsize = metadata.maxsize or metadata.design_range_top or designsize
local mathspecs = metadata.math
--
if designsize == 0 then
designsize = 100
+ minsize = 100
+ maxsize = 100
end
if mathspecs then
for name, value in next, mathspecs do
@@ -2288,8 +2588,12 @@ local function copytotfm(data,cache_id)
local m = d.math
if m then
-- watch out: luatex uses horiz_variants for the parts
- local variants = m.horiz_variants
- local parts = m.horiz_parts
+ --
+ local italic = m.italic
+ local vitalic = m.vitalic
+ --
+ local variants = m.hvariants
+ local parts = m.hparts
-- local done = { [unicode] = true }
if variants then
local c = character
@@ -2306,9 +2610,11 @@ local function copytotfm(data,cache_id)
c.horiz_variants = parts
elseif parts then
character.horiz_variants = parts
+ italic = m.hitalic
end
- local variants = m.vert_variants
- local parts = m.vert_parts
+ --
+ local variants = m.vvariants
+ local parts = m.vparts
-- local done = { [unicode] = true }
if variants then
local c = character
@@ -2326,14 +2632,19 @@ local function copytotfm(data,cache_id)
elseif parts then
character.vert_variants = parts
end
- local italic_correction = m.vert_italic_correction
- if italic_correction then
- character.vert_italic_correction = italic_correction -- was c.
+ --
+ if italic and italic ~= 0 then
+ character.italic = italic -- overload
+ end
+ if vitalic and vitalic ~= 0 then
+ character.vert_italic = vitalic
end
- local top_accent = m.top_accent
- if top_accent then
- character.top_accent = top_accent
+ --
+ local accent = m.accent
+ if accent then
+ character.accent = accent
end
+ --
local kerns = m.kerns
if kerns then
character.mathkerns = kerns
@@ -2346,16 +2657,16 @@ local function copytotfm(data,cache_id)
local filename = constructors.checkedfilename(resources)
local fontname = metadata.fontname
local fullname = metadata.fullname or fontname
- local psname = fontname or fullname
- local units = metadata.units_per_em or 1000
+ local psname = metadata.psname or fontname or fullname
+ local units = metadata.units or metadata.units_per_em or 1000
--
if units == 0 then -- catch bugs in fonts
units = 1000 -- maybe 2000 when ttf
- metadata.units_per_em = 1000
+ metadata.units = 1000
report_otf("changing %a units to %a",0,units)
end
--
- local monospaced = metadata.isfixedpitch or (pfminfo.panose and pfminfo.panose.proportion == "Monospaced")
+ local monospaced = metadata.monospaced or metadata.isfixedpitch or (pfminfo.panose and pfminfo.panose.proportion == "Monospaced")
local charwidth = pfminfo.avgwidth -- or unset
local charxheight = pfminfo.os2_xheight and pfminfo.os2_xheight > 0 and pfminfo.os2_xheight
-- charwidth = charwidth * units/1000
@@ -2425,17 +2736,16 @@ local function copytotfm(data,cache_id)
end
end
--
- parameters.designsize = (designsize/10)*65536
- parameters.ascender = abs(metadata.ascent or 0)
- parameters.descender = abs(metadata.descent or 0)
- parameters.units = units
+ parameters.designsize = (designsize/10)*65536
+ parameters.minsize = (minsize /10)*65536
+ parameters.maxsize = (maxsize /10)*65536
+ parameters.ascender = abs(metadata.ascender or metadata.ascent or 0)
+ parameters.descender = abs(metadata.descender or metadata.descent or 0)
+ parameters.units = units
--
properties.space = spacer
properties.encodingbytes = 2
properties.format = data.format or otf_format(filename) or formats.otf
--- if units ~= 1000 and format ~= "truetype" then
--- properties.format = "truetype"
--- end
properties.noglyphnames = true
properties.filename = filename
properties.fontname = fontname
@@ -2636,3 +2946,112 @@ function otf.scriptandlanguage(tfmdata,attr)
local properties = tfmdata.properties
return properties.script or "dflt", properties.language or "dflt"
end
+
+-- a little bit of abstraction
+
+local function justset(coverage,unicode,replacement)
+ coverage[unicode] = replacement
+end
+
+otf.coverup = {
+ stepkey = "subtables",
+ actions = {
+ substitution = justset,
+ alternate = justset,
+ multiple = justset,
+ ligature = justset,
+ kern = justset,
+ chainsubstitution = justset,
+ chainposition = justset,
+ },
+ register = function(coverage,lookuptype,format,feature,n,descriptions,resources)
+ local name = formatters["ctx_%s_%s_%s"](feature,lookuptype,n) -- we can have a mix of types
+ if lookuptype == "kern" then
+ resources.lookuptypes[name] = "position"
+ else
+ resources.lookuptypes[name] = lookuptype
+ end
+ for u, c in next, coverage do
+ local description = descriptions[u]
+ local slookups = description.slookups
+ if slookups then
+ slookups[name] = c
+ else
+ description.slookups = { [name] = c }
+ end
+ end
+ return name
+ end
+}
+
+-- moved from font-oth.lua
+
+local function getgsub(tfmdata,k,kind)
+ local description = tfmdata.descriptions[k]
+ if description then
+ local slookups = description.slookups -- we assume only slookups (we can always extend)
+ if slookups then
+ local shared = tfmdata.shared
+ local rawdata = shared and shared.rawdata
+ if rawdata then
+ local lookuptypes = rawdata.resources.lookuptypes
+ if lookuptypes then
+ local properties = tfmdata.properties
+ -- we could cache these
+ local validlookups, lookuplist = otf.collectlookups(rawdata,kind,properties.script,properties.language)
+ if validlookups then
+ for l=1,#lookuplist do
+ local lookup = lookuplist[l]
+ local found = slookups[lookup]
+ if found then
+ return found, lookuptypes[lookup]
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
+otf.getgsub = getgsub -- returns value, gsub_kind
+
+function otf.getsubstitution(tfmdata,k,kind,value)
+ local found, kind = getgsub(tfmdata,k,kind)
+ if not found then
+ --
+ elseif kind == "substitution" then
+ return found
+ elseif kind == "alternate" then
+ local choice = tonumber(value) or 1 -- no random here (yet)
+ return found[choice] or found[1] or k
+ end
+ return k
+end
+
+otf.getalternate = otf.getsubstitution
+
+function otf.getmultiple(tfmdata,k,kind)
+ local found, kind = getgsub(tfmdata,k,kind)
+ if found and kind == "multiple" then
+ return found
+ end
+ return { k }
+end
+
+function otf.getkern(tfmdata,left,right,kind)
+ local kerns = getgsub(tfmdata,left,kind or "kern",true) -- for now we use getsub
+ if kerns then
+ local found = kerns[right]
+ local kind = type(found)
+ if kind == "table" then
+ found = found[1][3] -- can be more clever
+ elseif kind ~= "number" then
+ found = false
+ end
+ if found then
+ return found * tfmdata.parameters.factor
+ end
+ end
+ return 0
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-oth.lua b/Master/texmf-dist/tex/context/base/mkiv/font-oth.lua
new file mode 100644
index 00000000000..28c543494fc
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-oth.lua
@@ -0,0 +1,9 @@
+if not modules then modules = { } end modules ['font-oth'] = {
+ version = 1.001,
+ comment = "companion to font-oth.lua (helpers)",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- otf.getalternate is moved elsewhere (for now) but move back here some day
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-oti.lua b/Master/texmf-dist/tex/context/base/mkiv/font-oti.lua
new file mode 100644
index 00000000000..bacd001a5e8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-oti.lua
@@ -0,0 +1,158 @@
+if not modules then modules = { } end modules ['font-oti'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local lower = string.lower
+
+local fonts = fonts
+local constructors = fonts.constructors
+
+local otf = constructors.newhandler("otf")
+local otffeatures = constructors.newfeatures("otf")
+local registerotffeature = otffeatures.register
+
+local otftables = otf.tables or { }
+otf.tables = otftables
+
+local allocate = utilities.storage.allocate
+
+registerotffeature {
+ name = "features",
+ description = "initialization of feature handler",
+ default = true,
+}
+
+-- these are later hooked into node and base initializaters
+
+local function setmode(tfmdata,value)
+ if value then
+ tfmdata.properties.mode = lower(value)
+ end
+end
+
+local function setlanguage(tfmdata,value)
+ if value then
+ local cleanvalue = lower(value)
+ local languages = otftables and otftables.languages
+ local properties = tfmdata.properties
+ if not languages then
+ properties.language = cleanvalue
+ elseif languages[value] then
+ properties.language = cleanvalue
+ else
+ properties.language = "dflt"
+ end
+ end
+end
+
+local function setscript(tfmdata,value)
+ if value then
+ local cleanvalue = lower(value)
+ local scripts = otftables and otftables.scripts
+ local properties = tfmdata.properties
+ if not scripts then
+ properties.script = cleanvalue
+ elseif scripts[value] then
+ properties.script = cleanvalue
+ else
+ properties.script = "dflt"
+ end
+ end
+end
+
+registerotffeature {
+ name = "mode",
+ description = "mode",
+ initializers = {
+ base = setmode,
+ node = setmode,
+ }
+}
+
+registerotffeature {
+ name = "language",
+ description = "language",
+ initializers = {
+ base = setlanguage,
+ node = setlanguage,
+ }
+}
+
+registerotffeature {
+ name = "script",
+ description = "script",
+ initializers = {
+ base = setscript,
+ node = setscript,
+ }
+}
+
+-- here (as also in generic
+
+otftables.featuretypes = allocate {
+ gpos_single = "position",
+ gpos_pair = "position",
+ gpos_cursive = "position",
+ gpos_mark2base = "position",
+ gpos_mark2ligature = "position",
+ gpos_mark2mark = "position",
+ gpos_context = "position",
+ gpos_contextchain = "position",
+ gsub_single = "substitution",
+ gsub_multiple = "substitution",
+ gsub_alternate = "substitution",
+ gsub_ligature = "substitution",
+ gsub_context = "substitution",
+ gsub_contextchain = "substitution",
+ gsub_reversecontextchain = "substitution",
+ gsub_reversesub = "substitution",
+}
+
+function otffeatures.checkeddefaultscript(featuretype,autoscript,scripts)
+ if featuretype == "position" then
+ local default = scripts.dflt
+ if default then
+ if autoscript == "position" or autoscript == true then
+ return default
+ else
+ report_otf("script feature %s not applied, enable default positioning")
+ end
+ else
+ -- no positioning at all
+ end
+ elseif featuretype == "substitution" then
+ local default = scripts.dflt
+ if default then
+ if autoscript == "substitution" or autoscript == true then
+ return default
+ end
+ end
+ end
+end
+
+function otffeatures.checkeddefaultlanguage(featuretype,autolanguage,languages)
+ if featuretype == "position" then
+ local default = languages.dflt
+ if default then
+ if autolanguage == "position" or autolanguage == true then
+ return default
+ else
+ report_otf("language feature %s not applied, enable default positioning")
+ end
+ else
+ -- no positioning at all
+ end
+ elseif featuretype == "substitution" then
+ local default = languages.dflt
+ if default then
+ if autolanguage == "substitution" or autolanguage == true then
+ return default
+ end
+ end
+ end
+end
+
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-otj.lua b/Master/texmf-dist/tex/context/base/mkiv/font-otj.lua
new file mode 100644
index 00000000000..aae70d1f345
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-otj.lua
@@ -0,0 +1,1532 @@
+if not modules then modules = { } end modules ['font-otj'] = {
+ version = 1.001,
+ comment = "companion to font-lib.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+-- This property based variant is not faster but looks nicer than the attribute one. We
+-- need to use rawget (which is apbout 4 times slower than a direct access but we cannot
+-- get/set that one for our purpose! This version does a bit more with discretionaries
+-- (and Kai has tested it with his collection of weird fonts.)
+
+-- There is some duplicate code here (especially in the the pre/post/replace branches) but
+-- we go for speed. We could store a list of glyph and mark nodes when registering but it's
+-- cleaner to have an identification pass here. Also, I need to keep tracing in mind so
+-- being too clever here is dangerous.
+
+-- The subtype test is not needed as there will be no (new) properties set, given that we
+-- reset the properties.
+
+-- As we have a rawget on properties we don't need one on injections.
+
+-- The use_advance code is just a test and is meant for testing and manuals. There is no
+-- performance (or whatever) gain and using kerns is somewhat cleaner (at least for now).
+
+if not nodes.properties then return end
+
+local next, rawget = next, rawget
+local utfchar = utf.char
+local fastcopy = table.fastcopy
+
+local registertracker = trackers.register
+
+local trace_injections = false registertracker("fonts.injections", function(v) trace_injections = v end)
+local trace_marks = false registertracker("fonts.injections.marks", function(v) trace_marks = v end)
+local trace_cursive = false registertracker("fonts.injections.cursive", function(v) trace_cursive = v end)
+local trace_spaces = false registertracker("otf.spaces", function(v) trace_spaces = v end)
+
+-- use_advance is just an experiment: it makes copying glyphs (instead of new_glyph) dangerous
+
+local use_advance = false directives.register("fonts.injections.advance", function(v) use_advance = v end)
+
+local report_injections = logs.reporter("fonts","injections")
+local report_spaces = logs.reporter("fonts","spaces")
+
+local attributes, nodes, node = attributes, nodes, node
+
+fonts = fonts
+local hashes = fonts.hashes
+local fontdata = hashes.identifiers
+local parameters = fonts.hashes.parameters
+local resources = fonts.hashes.resources
+
+nodes.injections = nodes.injections or { }
+local injections = nodes.injections
+
+local tracers = nodes.tracers
+local setcolor = tracers and tracers.colors.set
+local resetcolor = tracers and tracers.colors.reset
+
+local nodecodes = nodes.nodecodes
+local glyph_code = nodecodes.glyph
+local disc_code = nodecodes.disc
+local kern_code = nodecodes.kern
+local glue_code = nodecodes.glue
+
+local nuts = nodes.nuts
+local nodepool = nuts.pool
+
+local newkern = nodepool.kern
+
+local tonode = nuts.tonode
+local tonut = nuts.tonut
+
+local getfield = nuts.getfield
+local setfield = nuts.setfield
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getid = nuts.getid
+local getfont = nuts.getfont
+local getsubtype = nuts.getsubtype
+local getchar = nuts.getchar
+local getboth = nuts.getboth
+
+local ischar = nuts.is_char
+
+local getdisc = nuts.getdisc
+local setdisc = nuts.setdisc
+
+local traverse_id = nuts.traverse_id
+local traverse_char = nuts.traverse_char
+local insert_node_before = nuts.insert_before
+local insert_node_after = nuts.insert_after
+local find_tail = nuts.tail
+
+local properties = nodes.properties.data
+
+function injections.installnewkern(nk)
+ newkern = nk or newkern
+end
+
+local nofregisteredkerns = 0
+local nofregisteredpairs = 0
+local nofregisteredmarks = 0
+local nofregisteredcursives = 0
+local keepregisteredcounts = false
+
+function injections.keepcounts()
+ keepregisteredcounts = true
+end
+
+function injections.resetcounts()
+ nofregisteredkerns = 0
+ nofregisteredpairs = 0
+ nofregisteredmarks = 0
+ nofregisteredcursives = 0
+ keepregisteredcounts = false
+end
+
+-- We need to make sure that a possible metatable will not kick in unexpectedly.
+
+-- function injections.reset(n)
+-- local p = rawget(properties,n)
+-- if p and rawget(p,"injections") then
+-- p.injections = nil
+-- end
+-- end
+
+-- function injections.copy(target,source)
+-- local sp = rawget(properties,source)
+-- if sp then
+-- local tp = rawget(properties,target)
+-- local si = rawget(sp,"injections")
+-- if si then
+-- si = fastcopy(si)
+-- if tp then
+-- tp.injections = si
+-- else
+-- propertydata[target] = {
+-- injections = si,
+-- }
+-- end
+-- else
+-- if tp then
+-- tp.injections = nil
+-- end
+-- end
+-- end
+-- end
+
+function injections.reset(n)
+ local p = rawget(properties,n)
+ if p then
+ p.injections = false -- { }
+ else
+ properties[n] = false -- { injections = { } }
+ end
+end
+
+function injections.copy(target,source)
+ local sp = rawget(properties,source)
+ if sp then
+ local tp = rawget(properties,target)
+ -- local si = rawget(sp,"injections")
+ local si = sp.injections
+ if si then
+ si = fastcopy(si)
+ if tp then
+ tp.injections = si
+ else
+ propertydata[target] = {
+ injections = si,
+ }
+ end
+ elseif tp then
+ tp.injections = false -- { }
+ else
+ properties[target] = { injections = { } }
+ end
+ else
+ local tp = rawget(properties,target)
+ if tp then
+ tp.injections = false -- { }
+ else
+ properties[target] = false -- { injections = { } }
+ end
+ end
+end
+
+function injections.setligaindex(n,index)
+ local p = rawget(properties,n)
+ if p then
+ -- local i = rawget(p,"injections")
+ local i = p.injections
+ if i then
+ i.ligaindex = index
+ else
+ p.injections = {
+ ligaindex = index
+ }
+ end
+ else
+ properties[n] = {
+ injections = {
+ ligaindex = index
+ }
+ }
+ end
+end
+
+function injections.getligaindex(n,default)
+ local p = rawget(properties,n)
+ if p then
+ -- local i = rawget(p,"injections")
+ local i = p.injections
+ if i then
+ return i.ligaindex or default
+ end
+ end
+ return default
+end
+
+function injections.setcursive(start,nxt,factor,rlmode,exit,entry,tfmstart,tfmnext) -- hm: nuts or nodes
+ local dx = factor*(exit[1]-entry[1])
+ local dy = -factor*(exit[2]-entry[2])
+ local ws = tfmstart.width
+ local wn = tfmnext.width
+ nofregisteredcursives = nofregisteredcursives + 1
+ if rlmode < 0 then
+ dx = -(dx + wn)
+ else
+ dx = dx - ws
+ end
+ if dx == 0 then
+ -- get rid of funny -0
+ dx = 0
+ end
+ --
+ local p = rawget(properties,start)
+ if p then
+ -- local i = rawget(p,"injections")
+ local i = p.injections
+ if i then
+ i.cursiveanchor = true
+ else
+ p.injections = {
+ cursiveanchor = true,
+ }
+ end
+ else
+ properties[start] = {
+ injections = {
+ cursiveanchor = true,
+ },
+ }
+ end
+ local p = rawget(properties,nxt)
+ if p then
+ -- local i = rawget(p,"injections")
+ local i = p.injections
+ if i then
+ i.cursivex = dx
+ i.cursivey = dy
+ else
+ p.injections = {
+ cursivex = dx,
+ cursivey = dy,
+ }
+ end
+ else
+ properties[nxt] = {
+ injections = {
+ cursivex = dx,
+ cursivey = dy,
+ },
+ }
+ end
+ return dx, dy, nofregisteredcursives
+end
+
+function injections.setpair(current,factor,rlmode,r2lflag,spec,injection) -- r2lflag & tfmchr not used
+ local x = factor*spec[1]
+ local y = factor*spec[2]
+ local w = factor*spec[3]
+ local h = factor*spec[4]
+ if x ~= 0 or w ~= 0 or y ~= 0 or h ~= 0 then -- okay?
+ local yoffset = y - h
+ local leftkern = x -- both kerns are set in a pair kern compared
+ local rightkern = w - x -- to normal kerns where we set only leftkern
+ if leftkern ~= 0 or rightkern ~= 0 or yoffset ~= 0 then
+ nofregisteredpairs = nofregisteredpairs + 1
+ if rlmode and rlmode < 0 then
+ leftkern, rightkern = rightkern, leftkern
+ end
+ if not injection then
+ injection = "injections"
+ end
+ local p = rawget(properties,current)
+ if p then
+ -- local i = p[injection]
+ local i = rawget(p,injection)
+ if i then
+ if leftkern ~= 0 then
+ i.leftkern = (i.leftkern or 0) + leftkern
+ end
+ if rightkern ~= 0 then
+ i.rightkern = (i.rightkern or 0) + rightkern
+ end
+ if yoffset ~= 0 then
+ i.yoffset = (i.yoffset or 0) + yoffset
+ end
+ elseif leftkern ~= 0 or rightkern ~= 0 then
+ p[injection] = {
+ leftkern = leftkern,
+ rightkern = rightkern,
+ yoffset = yoffset,
+ }
+ else
+ p[injection] = {
+ yoffset = yoffset,
+ }
+ end
+ elseif leftkern ~= 0 or rightkern ~= 0 then
+ properties[current] = {
+ [injection] = {
+ leftkern = leftkern,
+ rightkern = rightkern,
+ yoffset = yoffset,
+ },
+ }
+ else
+ properties[current] = {
+ [injection] = {
+ yoffset = yoffset,
+ },
+ }
+ end
+ return x, y, w, h, nofregisteredpairs
+ end
+ end
+ return x, y, w, h -- no bound
+end
+
+-- This needs checking for rl < 0 but it is unlikely that a r2l script uses kernclasses between
+-- glyphs so we're probably safe (KE has a problematic font where marks interfere with rl < 0 in
+-- the previous case)
+
+function injections.setkern(current,factor,rlmode,x,injection)
+ local dx = factor * x
+ if dx ~= 0 then
+ nofregisteredkerns = nofregisteredkerns + 1
+ local p = rawget(properties,current)
+ if not injection then
+ injection = "injections"
+ end
+ if p then
+ -- local i = rawget(p,injection)
+ local i = rawget(p,injection)
+ if i then
+ i.leftkern = dx + (i.leftkern or 0)
+ else
+ p[injection] = {
+ leftkern = dx,
+ }
+ end
+ else
+ properties[current] = {
+ [injection] = {
+ leftkern = dx,
+ },
+ }
+ end
+ return dx, nofregisteredkerns
+ else
+ return 0, 0
+ end
+end
+
+function injections.setmark(start,base,factor,rlmode,ba,ma,tfmbase,mkmk) -- ba=baseanchor, ma=markanchor
+ local dx, dy = factor*(ba[1]-ma[1]), factor*(ba[2]-ma[2])
+ nofregisteredmarks = nofregisteredmarks + 1
+ if rlmode >= 0 then
+ dx = tfmbase.width - dx -- see later commented ox
+ end
+ local p = rawget(properties,start)
+ -- hm, dejavu serif does a sloppy mark2mark before mark2base
+ if p then
+ -- local i = rawget(p,"injections")
+ local i = p.injections
+ if i then
+ if i.markmark then
+ -- out of order mkmk: yes or no or option
+ else
+ i.markx = dx
+ i.marky = dy
+ i.markdir = rlmode or 0
+ i.markbase = nofregisteredmarks
+ i.markbasenode = base
+ i.markmark = mkmk
+ end
+ else
+ p.injections = {
+ markx = dx,
+ marky = dy,
+ markdir = rlmode or 0,
+ markbase = nofregisteredmarks,
+ markbasenode = base,
+ markmark = mkmk,
+ }
+ end
+ else
+ properties[start] = {
+ injections = {
+ markx = dx,
+ marky = dy,
+ markdir = rlmode or 0,
+ markbase = nofregisteredmarks,
+ markbasenode = base,
+ markmark = mkmk,
+ },
+ }
+ end
+ return dx, dy, nofregisteredmarks
+end
+
+local function dir(n)
+ return (n and n<0 and "r-to-l") or (n and n>0 and "l-to-r") or "unset"
+end
+
+local function showchar(n,nested)
+ local char = getchar(n)
+ report_injections("%wfont %s, char %U, glyph %c",nested and 2 or 0,getfont(n),char,char)
+end
+
+local function show(n,what,nested,symbol)
+ if n then
+ local p = rawget(properties,n)
+ if p then
+ local i = rawget(p,what)
+ if i then
+ local leftkern = i.leftkern or 0
+ local rightkern = i.rightkern or 0
+ local yoffset = i.yoffset or 0
+ local markx = i.markx or 0
+ local marky = i.marky or 0
+ local markdir = i.markdir or 0
+ local markbase = i.markbase or 0
+ local cursivex = i.cursivex or 0
+ local cursivey = i.cursivey or 0
+ local ligaindex = i.ligaindex or 0
+ local cursbase = i.cursiveanchor
+ local margin = nested and 4 or 2
+ --
+ if rightkern ~= 0 or yoffset ~= 0 then
+ report_injections("%w%s pair: lx %p, rx %p, dy %p",margin,symbol,leftkern,rightkern,yoffset)
+ elseif leftkern ~= 0 then
+ report_injections("%w%s kern: dx %p",margin,symbol,leftkern)
+ end
+ if markx ~= 0 or marky ~= 0 or markbase ~= 0 then
+ report_injections("%w%s mark: dx %p, dy %p, dir %s, base %s",margin,symbol,markx,marky,markdir,markbase ~= 0 and "yes" or "no")
+ end
+ if cursivex ~= 0 or cursivey ~= 0 then
+ if cursbase then
+ report_injections("%w%s curs: base dx %p, dy %p",margin,symbol,cursivex,cursivey)
+ else
+ report_injections("%w%s curs: dx %p, dy %p",margin,symbol,cursivex,cursivey)
+ end
+ elseif cursbase then
+ report_injections("%w%s curs: base",margin,symbol)
+ end
+ if ligaindex ~= 0 then
+ report_injections("%w%s liga: index %i",margin,symbol,ligaindex)
+ end
+ end
+ end
+ end
+end
+
+local function showsub(n,what,where)
+ report_injections("begin subrun: %s",where)
+ for n in traverse_id(glyph_code,n) do
+ showchar(n,where)
+ show(n,what,where," ")
+ end
+ report_injections("end subrun")
+end
+
+local function trace(head,where)
+ report_injections("begin run %s: %s kerns, %s pairs, %s marks and %s cursives registered",
+ where or "",nofregisteredkerns,nofregisteredpairs,nofregisteredmarks,nofregisteredcursives)
+ local n = head
+ while n do
+ local id = getid(n)
+ if id == glyph_code then
+ showchar(n)
+ show(n,"injections",false," ")
+ show(n,"preinjections",false,"<")
+ show(n,"postinjections",false,">")
+ show(n,"replaceinjections",false,"=")
+ show(n,"emptyinjections",false,"*")
+ elseif id == disc_code then
+ local pre, post, replace = getdisc(n)
+ if pre then
+ showsub(pre,"preinjections","pre")
+ end
+ if post then
+ showsub(post,"postinjections","post")
+ end
+ if replace then
+ showsub(replace,"replaceinjections","replace")
+ end
+ show(n,"emptyinjections",false,"*")
+ end
+ n = getnext(n)
+ end
+ report_injections("end run")
+end
+
+local function show_result(head)
+ local current = head
+ local skipping = false
+ while current do
+ local id = getid(current)
+ if id == glyph_code then
+ report_injections("char: %C, width %p, xoffset %p, yoffset %p",
+ getchar(current),getfield(current,"width"),getfield(current,"xoffset"),getfield(current,"yoffset"))
+ skipping = false
+ elseif id == kern_code then
+ report_injections("kern: %p",getfield(current,"kern"))
+ skipping = false
+ elseif not skipping then
+ report_injections()
+ skipping = true
+ end
+ current = getnext(current)
+ end
+end
+
+-- G +D-pre G
+-- D-post+
+-- +D-replace+
+--
+-- G +D-pre +D-pre
+-- D-post +D-post
+-- +D-replace +D-replace
+
+local function inject_kerns_only(head,where)
+ head = tonut(head)
+ if trace_injections then
+ trace(head,"kerns")
+ end
+ local current = head
+ local prev = nil
+ local next = nil
+ local prevdisc = nil
+ local prevglyph = nil
+ local pre = nil -- saves a lookup
+ local post = nil -- saves a lookup
+ local replace = nil -- saves a lookup
+ local pretail = nil -- saves a lookup
+ local posttail = nil -- saves a lookup
+ local replacetail = nil -- saves a lookup
+ while current do
+ local id = getid(current)
+ local next = getnext(current)
+ if id == glyph_code then
+ if getsubtype(current) < 256 then
+ local p = rawget(properties,current)
+ if p then
+ -- local i = rawget(p,"injections")
+ local i = p.injections
+ if i then
+ -- left|glyph|right
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ if use_advance then
+ setfield(current,"xoffset",leftkern)
+ setfield(current,"xadvance",leftkern)
+ else
+ insert_node_before(head,current,newkern(leftkern))
+ end
+ end
+ end
+ if prevdisc then
+ local done = false
+ if post then
+ -- local i = rawget(p,"postinjections")
+ local i = p.postinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ if use_advance then
+ setfield(post,"xadvance",leftkern)
+ else
+ insert_node_after(post,posttail,newkern(leftkern))
+ done = true
+ end
+ end
+ end
+ end
+ if replace then
+ -- local i = rawget(p,"replaceinjections")
+ local i = p.replaceinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ if use_advance then
+ setfield(replace,"xadvance",leftkern)
+ else
+ insert_node_after(replace,replacetail,newkern(leftkern))
+ done = true
+ end
+ end
+ end
+ else
+ -- local i = rawget(p,"emptyinjections")
+ local i = p.emptyinjections
+ if i then
+ -- glyph|disc|glyph (special case)
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ setfield(prev,"replace",newkern(leftkern)) -- maybe also leftkern
+ end
+ end
+ end
+ if done then
+ setdisc(prevdisc,pre,post,replace)
+ end
+ end
+ end
+ end
+ prevdisc = nil
+ prevglyph = current
+ elseif id == disc_code then
+ pre, post, replace, pretail, posttail, replacetail = getdisc(current,true)
+ local done = false
+ if pre then
+ -- left|pre glyphs|right
+ for n in traverse_char(pre) do
+ local p = rawget(properties,n)
+ if p then
+ -- local i = rawget(p,"injections") or rawget(p,"preinjections")
+ local i = p.injections or p.preinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ if use_advance then
+ setfield(pre,"xoffset",leftkern)
+ setfield(pre,"xadvance",leftkern)
+ else
+ pre = insert_node_before(pre,n,newkern(leftkern))
+ done = true
+ end
+ end
+ end
+ end
+ end
+ end
+ if post then
+ -- left|post glyphs|right
+ for n in traverse_char(post) do
+ local p = rawget(properties,n)
+ if p then
+ -- local i = rawget(p,"injections") or rawget(p,"postinjections")
+ local i = p.injections or p.postinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ if use_advance then
+ setfield(post,"xoffset",leftkern)
+ setfield(post,"xadvance",leftkern)
+ else
+ post = insert_node_before(post,n,newkern(leftkern))
+ done = true
+ end
+ end
+ end
+ end
+ end
+ end
+ if replace then
+ -- left|replace glyphs|right
+ for n in traverse_char(replace) do
+ local p = rawget(properties,n)
+ if p then
+ -- local i = rawget(p,"injections") or rawget(p,"replaceinjections")
+ local i = p.injections or p.replaceinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ if use_advance then
+ setfield(replace,"xoffset",leftkern)
+ setfield(replace,"xadvance",leftkern)
+ else
+ replace = insert_node_before(replace,n,newkern(leftkern))
+ done = true
+ end
+ end
+ end
+ end
+ end
+ end
+ if done then
+ setdisc(current,pre,post,replace)
+ end
+ prevglyph = nil
+ prevdisc = current
+ else
+ prevglyph = nil
+ prevdisc = nil
+ end
+ prev = current
+ current = next
+ end
+ --
+ if keepregisteredcounts then
+ keepregisteredcounts = false
+ else
+ nofregisteredkerns = 0
+ end
+ return tonode(head), true
+end
+
+local function inject_pairs_only(head,where)
+ head = tonut(head)
+ if trace_injections then
+ trace(head,"pairs")
+ end
+ local current = head
+ local prev = nil
+ local next = nil
+ local prevdisc = nil
+ local prevglyph = nil
+ local pre = nil -- saves a lookup
+ local post = nil -- saves a lookup
+ local replace = nil -- saves a lookup
+ local pretail = nil -- saves a lookup
+ local posttail = nil -- saves a lookup
+ local replacetail = nil -- saves a lookup
+ while current do
+ local id = getid(current)
+ local next = getnext(current)
+ if id == glyph_code then
+ if getsubtype(current) < 256 then
+ local p = rawget(properties,current)
+ if p then
+ -- local i = rawget(p,"injections")
+ local i = p.injections
+ if i then
+ -- left|glyph|right
+ local yoffset = i.yoffset
+ if yoffset and yoffset ~= 0 then
+ setfield(current,"yoffset",yoffset)
+ end
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ insert_node_before(head,current,newkern(leftkern))
+ end
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ insert_node_after(head,current,newkern(rightkern))
+ end
+ else
+ -- local i = rawget(p,"emptyinjections")
+ local i = p.emptyinjections
+ if i then
+ -- glyph|disc|glyph (special case)
+-- is this okay?
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ if next and getid(next) == disc_code then
+ if replace then
+ -- error, we expect an empty one
+ else
+ setfield(next,"replace",newkern(rightkern)) -- maybe also leftkern
+ end
+ end
+ end
+ end
+ end
+ if prevdisc then
+ local done = false
+ if post then
+ -- local i = rawget(p,"postinjections")
+ local i = p.postinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ insert_node_after(post,posttail,newkern(leftkern))
+ done = true
+ end
+ end
+ end
+ if replace then
+ -- local i = rawget(p,"replaceinjections")
+ local i = p.replaceinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ insert_node_after(replace,replacetail,newkern(leftkern))
+ done = true
+ end
+ end
+ else
+ local i = p.emptyinjections
+ if i then
+-- new .. okay?
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ setfield(prev,"replace",newkern(leftkern)) -- maybe also leftkern
+ end
+ end
+ end
+ if done then
+ setdisc(prevdisc,pre,post,replace)
+ end
+ end
+ end
+ end
+ prevdisc = nil
+ prevglyph = current
+ elseif id == disc_code then
+ pre, post, replace, pretail, posttail, replacetail = getdisc(current,true)
+ local done = false
+ if pre then
+ -- left|pre glyphs|right
+ for n in traverse_char(pre) do
+ local p = rawget(properties,n)
+ if p then
+ -- local i = rawget(p,"injections") or rawget(p,"preinjections")
+ local i = p.injections or p.preinjections
+ if i then
+ local yoffset = i.yoffset
+ if yoffset and yoffset ~= 0 then
+ setfield(n,"yoffset",yoffset)
+ end
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ pre = insert_node_before(pre,n,newkern(leftkern))
+ done = true
+ end
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ insert_node_after(pre,n,newkern(rightkern))
+ done = true
+ end
+ end
+ end
+ end
+ end
+ if post then
+ -- left|post glyphs|right
+ for n in traverse_char(post) do
+ local p = rawget(properties,n)
+ if p then
+ -- local i = rawget(p,"injections") or rawget(p,"postinjections")
+ local i = p.injections or p.postinjections
+ if i then
+ local yoffset = i.yoffset
+ if yoffset and yoffset ~= 0 then
+ setfield(n,"yoffset",yoffset)
+ end
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ post = insert_node_before(post,n,newkern(leftkern))
+ done = true
+ end
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ insert_node_after(post,n,newkern(rightkern))
+ done = true
+ end
+ end
+ end
+ end
+ end
+ if replace then
+ -- left|replace glyphs|right
+ for n in traverse_char(replace) do
+ local p = rawget(properties,n)
+ if p then
+ -- local i = rawget(p,"injections") or rawget(p,"replaceinjections")
+ local i = p.injections or p.replaceinjections
+ if i then
+ local yoffset = i.yoffset
+ if yoffset and yoffset ~= 0 then
+ setfield(n,"yoffset",yoffset)
+ end
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ replace = insert_node_before(replace,n,newkern(leftkern))
+ done = true
+ end
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ insert_node_after(replace,n,newkern(rightkern))
+ done = true
+ end
+ end
+ end
+ end
+ end
+ if prevglyph then
+ if pre then
+ local p = rawget(properties,prevglyph)
+ if p then
+ -- local i = rawget(p,"preinjections")
+ local i = p.preinjections
+ if i then
+ -- glyph|pre glyphs
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ pre = insert_node_before(pre,pre,newkern(rightkern))
+ done = true
+ end
+ end
+ end
+ end
+ if replace then
+ local p = rawget(properties,prevglyph)
+ if p then
+ -- local i = rawget(p,"replaceinjections")
+ local i = p.replaceinjections
+ if i then
+ -- glyph|replace glyphs
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ replace = insert_node_before(replace,replace,newkern(rightkern))
+ done = true
+ end
+ end
+ end
+ end
+ end
+ if done then
+ setdisc(current,pre,post,replace)
+ end
+ prevglyph = nil
+ prevdisc = current
+ else
+ prevglyph = nil
+ prevdisc = nil
+ end
+ prev = current
+ current = next
+ end
+ --
+ if keepregisteredcounts then
+ keepregisteredcounts = false
+ else
+ nofregisteredkerns = 0
+ end
+ return tonode(head), true
+end
+
+-- local function showoffset(n,flag)
+-- local ox = getfield(n,"xoffset")
+-- local oy = getfield(n,"yoffset")
+-- if flag then
+-- if ox == 0 then
+-- setcolor(n,oy == 0 and "darkgray" or "darkgreen")
+-- else
+-- setcolor(n,oy == 0 and "darkblue" or "darkred")
+-- end
+-- else
+-- if ox == 0 then
+-- setcolor(n,oy == 0 and "gray" or "green")
+-- else
+-- setcolor(n,oy == 0 and "blue" or "red")
+-- end
+-- end
+-- end
+
+local function showoffset(n,flag)
+ local o = getfield(n,"xoffset")
+ if o == 0 then
+ o = getfield(n,"yoffset")
+ end
+ if o ~= 0 then
+ setcolor(n,flag and "darkred" or "darkgreen")
+ else
+ resetcolor(n)
+ end
+end
+
+local function inject_everything(head,where)
+ head = tonut(head)
+ if trace_injections then
+ trace(head,"everything")
+ end
+ local hascursives = nofregisteredcursives > 0
+ local hasmarks = nofregisteredmarks > 0
+ --
+ local current = head
+ local last = nil
+ local font = font
+ local markdata = nil
+ local prev = nil
+ local next = nil
+ local prevdisc = nil
+ local prevglyph = nil
+ local pre = nil -- saves a lookup
+ local post = nil -- saves a lookup
+ local replace = nil -- saves a lookup
+ local pretail = nil -- saves a lookup
+ local posttail = nil -- saves a lookup
+ local replacetail = nil -- saves a lookup
+ --
+ local cursiveanchor = nil
+ local minc = 0
+ local maxc = 0
+ local glyphs = { }
+ local marks = { }
+ local nofmarks = 0
+ --
+ -- move out
+ --
+ local function processmark(p,n,pn) -- p = basenode
+ local px = getfield(p,"xoffset")
+ local ox = 0
+ local rightkern = nil
+ local pp = rawget(properties,p)
+ if pp then
+ -- pp = rawget(pp,"injections")
+ pp = pp.injections
+ if pp then
+ rightkern = pp.rightkern
+ end
+ end
+ if rightkern then -- x and w ~= 0
+ if pn.markdir < 0 then
+ -- kern(w-x) glyph(p) kern(x) mark(n)
+ ox = px - pn.markx - rightkern
+ -- report_injections("r2l case 1: %p",ox)
+ else
+ -- kern(x) glyph(p) kern(w-x) mark(n)
+ -- ox = px - getfield(p,"width") + pn.markx - pp.leftkern
+ --
+ -- According to Kai we don't need to handle leftkern here but I'm
+ -- pretty sure I've run into a case where it was needed so maybe
+ -- some day we need something more clever here.
+ --
+ if false then
+ -- a mark with kerning
+ local leftkern = pp.leftkern
+ if leftkern then
+ ox = px - pn.markx - leftkern
+ else
+ ox = px - pn.markx
+ end
+ else
+ ox = px - pn.markx
+ end
+ end
+ else
+ -- if pn.markdir < 0 then
+ -- ox = px - pn.markx
+ -- -- report_injections("r2l case 3: %p",ox)
+ -- else
+ -- -- ox = px - getfield(p,"width") + pn.markx
+ ox = px - pn.markx
+ -- report_injections("l2r case 3: %p",ox)
+ -- end
+ local wn = getfield(n,"width") -- in arial marks have widths
+ if wn ~= 0 then
+ -- bad: we should center
+ pn.leftkern = -wn/2
+ pn.rightkern = -wn/2
+ end
+ end
+ local oy = getfield(n,"yoffset") + getfield(p,"yoffset") + pn.marky
+ setfield(n,"xoffset",ox)
+ setfield(n,"yoffset",oy)
+ if trace_marks then
+ showoffset(n,true)
+ end
+ end
+ -- todo: marks in disc
+ while current do
+ local id = getid(current)
+ local next = getnext(current)
+ if id == glyph_code then
+ if getsubtype(current) < 256 then
+ local p = rawget(properties,current)
+ if p then
+ -- local i = rawget(p,"injections")
+ local i = p.injections
+ if i then
+ local pm = i.markbasenode
+ if pm then
+ nofmarks = nofmarks + 1
+ marks[nofmarks] = current
+ else
+ if hascursives then
+ local cursivex = i.cursivex
+ if cursivex then
+ if cursiveanchor then
+ if cursivex ~= 0 then
+ i.leftkern = (i.leftkern or 0) + cursivex
+ end
+ if maxc == 0 then
+ minc = 1
+ maxc = 1
+ glyphs[1] = cursiveanchor
+ else
+ maxc = maxc + 1
+ glyphs[maxc] = cursiveanchor
+ end
+ properties[cursiveanchor].cursivedy = i.cursivey -- cursiveprops
+ last = current
+ else
+ maxc = 0
+ end
+ elseif maxc > 0 then
+ local ny = getfield(current,"yoffset")
+ for i=maxc,minc,-1 do
+ local ti = glyphs[i]
+ ny = ny + properties[ti].cursivedy
+ setfield(ti,"yoffset",ny) -- why not add ?
+ if trace_cursive then
+ showoffset(ti)
+ end
+ end
+ maxc = 0
+ cursiveanchor = nil
+ end
+ if i.cursiveanchor then
+ cursiveanchor = current -- no need for both now
+ else
+ if maxc > 0 then
+ local ny = getfield(current,"yoffset")
+ for i=maxc,minc,-1 do
+ local ti = glyphs[i]
+ ny = ny + properties[ti].cursivedy
+ setfield(ti,"yoffset",ny) -- why not add ?
+ if trace_cursive then
+ showoffset(ti)
+ end
+ end
+ maxc = 0
+ end
+ cursiveanchor = nil
+ end
+ end
+ -- left|glyph|right
+ local yoffset = i.yoffset
+ if yoffset and yoffset ~= 0 then
+ setfield(current,"yoffset",yoffset)
+ end
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ insert_node_before(head,current,newkern(leftkern))
+ end
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ insert_node_after(head,current,newkern(rightkern))
+ end
+ end
+ else
+ -- local i = rawget(p,"emptyinjections")
+ local i = p.emptyinjections
+ if i then
+ -- glyph|disc|glyph (special case)
+-- okay?
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ if next and getid(next) == disc_code then
+ if replace then
+ -- error, we expect an empty one
+ else
+ setfield(next,"replace",newkern(rightkern)) -- maybe also leftkern
+ end
+ end
+ end
+ end
+ end
+ if prevdisc then
+ if p then
+ local done = false
+ if post then
+ -- local i = rawget(p,"postinjections")
+ local i = p.postinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ insert_node_after(post,posttail,newkern(leftkern))
+ done = true
+ end
+ end
+ end
+ if replace then
+ -- local i = rawget(p,"replaceinjections")
+ local i = p.replaceinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ insert_node_after(replace,replacetail,newkern(leftkern))
+ done = true
+ end
+ end
+ else
+ -- local i = rawget(p,"emptyinjections")
+ local i = p.emptyinjections
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ setfield(prev,"replace",newkern(leftkern)) -- maybe also leftkern
+ end
+ end
+ if done then
+ setdisc(prevdisc,pre,post,replace)
+ end
+ end
+ end
+ else
+ -- cursive
+ if hascursives and maxc > 0 then
+ local ny = getfield(current,"yoffset")
+ for i=maxc,minc,-1 do
+ local ti = glyphs[i]
+ ny = ny + properties[ti].cursivedy
+ setfield(ti,"yoffset",getfield(ti,"yoffset") + ny) -- can be mark
+ end
+ maxc = 0
+ cursiveanchor = nil
+ end
+ end
+ end
+ prevdisc = nil
+ prevglyph = current
+ elseif id == disc_code then
+ pre, post, replace, pretail, posttail, replacetail = getdisc(current,true)
+ local done = false
+ if pre then
+ -- left|pre glyphs|right
+ for n in traverse_char(pre) do
+ local p = rawget(properties,n)
+ if p then
+ -- local i = rawget(p,"injections") or rawget(p,"preinjections")
+ local i = p.injections or p.preinjections
+ if i then
+ local yoffset = i.yoffset
+ if yoffset and yoffset ~= 0 then
+ setfield(n,"yoffset",yoffset)
+ end
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ pre = insert_node_before(pre,n,newkern(leftkern))
+ done = true
+ end
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ insert_node_after(pre,n,newkern(rightkern))
+ done = true
+ end
+ end
+ if hasmarks then
+ local pm = i.markbasenode
+ if pm then
+ processmark(pm,current,i)
+ end
+ end
+ end
+ end
+ end
+ if post then
+ -- left|post glyphs|right
+ for n in traverse_char(post) do
+ local p = rawget(properties,n)
+ if p then
+ -- local i = rawget(p,"injections") or rawget(p,"postinjections")
+ local i = p.injections or p.postinjections
+ if i then
+ local yoffset = i.yoffset
+ if yoffset and yoffset ~= 0 then
+ setfield(n,"yoffset",yoffset)
+ end
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ post = insert_node_before(post,n,newkern(leftkern))
+ done = true
+ end
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ insert_node_after(post,n,newkern(rightkern))
+ done = true
+ end
+ end
+ if hasmarks then
+ local pm = i.markbasenode
+ if pm then
+ processmark(pm,current,i)
+ end
+ end
+ end
+ end
+ end
+ if replace then
+ -- left|replace glyphs|right
+ for n in traverse_char(replace) do
+ local p = rawget(properties,n)
+ if p then
+ -- local i = rawget(p,"injections") or rawget(p,"replaceinjections")
+ local i = p.injections or p.replaceinjections
+ if i then
+ local yoffset = i.yoffset
+ if yoffset and yoffset ~= 0 then
+ setfield(n,"yoffset",yoffset)
+ end
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ replace = insert_node_before(replace,n,newkern(leftkern))
+ done = true
+ end
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ insert_node_after(replace,n,newkern(rightkern))
+ done = true
+ end
+ end
+ if hasmarks then
+ local pm = i.markbasenode
+ if pm then
+ processmark(pm,current,i)
+ end
+ end
+ end
+ end
+ end
+ if prevglyph then
+ if pre then
+ local p = rawget(properties,prevglyph)
+ if p then
+ -- local i = rawget(p,"preinjections")
+ local i = p.preinjections
+ if i then
+ -- glyph|pre glyphs
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ pre = insert_node_before(pre,pre,newkern(rightkern))
+ done = true
+ end
+ end
+ end
+ end
+ if replace then
+ local p = rawget(properties,prevglyph)
+ if p then
+ -- local i = rawget(p,"replaceinjections")
+ local i = p.replaceinjections
+ if i then
+ -- glyph|replace glyphs
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ replace = insert_node_before(replace,replace,newkern(rightkern))
+ done = true
+ end
+ end
+ end
+ end
+ end
+ if done then
+ setdisc(current,pre,post,replace)
+ end
+ prevglyph = nil
+ prevdisc = current
+ else
+ prevglyph = nil
+ prevdisc = nil
+ end
+ prev = current
+ current = next
+ end
+ -- cursive
+ if hascursives and maxc > 0 then
+ local ny = getfield(last,"yoffset")
+ for i=maxc,minc,-1 do
+ local ti = glyphs[i]
+ ny = ny + properties[ti].cursivedy
+ setfield(ti,"yoffset",ny) -- why not add ?
+ if trace_cursive then
+ showoffset(ti)
+ end
+ end
+ end
+ --
+ if nofmarks > 0 then
+ for i=1,nofmarks do
+ local m = marks[i]
+ local p = rawget(properties,m)
+ -- local i = rawget(p,"injections")
+ local i = p.injections
+ local b = i.markbasenode
+ processmark(b,m,i)
+ end
+ elseif hasmarks then
+ -- sometyhing bad happened
+ end
+ --
+ if keepregisteredcounts then
+ keepregisteredcounts = false
+ else
+ nofregisteredkerns = 0
+ nofregisteredpairs = 0
+ nofregisteredmarks = 0
+ nofregisteredcursives = 0
+ end
+ return tonode(head), true
+end
+
+-- space triggers
+
+local triggers = false
+
+function nodes.injections.setspacekerns(font,sequence)
+ if triggers then
+ triggers[font] = sequence
+ else
+ triggers = { [font] = sequence }
+ end
+end
+
+local function injectspaces(head)
+
+ if not triggers then
+ return head, false
+ end
+
+ local lastfont = nil
+ local spacekerns = nil
+ local leftkerns = nil
+ local rightkerns = nil
+ local factor = 0
+ local threshold = 0
+ local leftkern = false
+ local rightkern = false
+
+ local function updatefont(font,trig)
+ -- local resources = resources[font]
+ -- local spacekerns = resources.spacekerns
+ -- if spacekerns then
+ -- leftkerns = spacekerns.left
+ -- rightkerns = spacekerns.right
+ -- end
+ leftkerns = trig.left
+ rightkerns = trig.right
+ local par = parameters[font]
+ factor = par.factor
+ threshold = par.spacing.width - 1 -- get rid of rounding errors
+ lastfont = font
+ end
+
+ for n in traverse_id(glue_code,tonut(head)) do
+ local prev, next = getboth(n)
+ local prevchar = ischar(prev)
+ local nextchar = ischar(next)
+ if nextchar then
+ local font = getfont(next)
+ local trig = triggers[font]
+ if trig then
+ if lastfont ~= font then
+ updatefont(font,trig)
+ end
+ if rightkerns then
+ rightkern = rightkerns[nextchar]
+ end
+ end
+ end
+ if prevchar then
+ local font = getfont(next)
+ local trig = triggers[font]
+ if trig then
+ if lastfont ~= font then
+ updatefont(font,trig)
+ end
+ if leftkerns then
+ leftkern = leftkerns[prevchar]
+ end
+ end
+ end
+ if leftkern then
+ local old = getfield(n,"width")
+ if old >= threshold then
+ if rightkern then
+ local new = old + (leftkern + rightkern) * factor
+ if trace_spaces then
+ report_spaces("%C [%p -> %p] %C",prevchar,old,new,nextchar)
+ end
+ setfield(n,"width",new)
+ leftkern = false
+ else
+ local new = old + leftkern * factor
+ if trace_spaces then
+ report_spaces("%C [%p -> %p]",prevchar,old,new)
+ end
+ setfield(n,"width",new)
+ end
+ end
+ leftkern = false
+ elseif rightkern then
+ local old = getfield(n,"width")
+ if old >= threshold then
+ local new = old + rightkern * factor
+ if trace_spaces then
+ report_spaces("[%p -> %p] %C",nextchar,old,new)
+ end
+ setfield(n,"width",new)
+ end
+ rightkern = false
+ end
+ end
+
+ triggers = false
+ return head, true
+end
+
+--
+
+function injections.handler(head,where)
+ if triggers then
+ head = injectspaces(head)
+ end
+ if nofregisteredmarks > 0 or nofregisteredcursives > 0 then
+ return inject_everything(head,where)
+ elseif nofregisteredpairs > 0 then
+ return inject_pairs_only(head,where)
+ elseif nofregisteredkerns > 0 then
+ return inject_kerns_only(head,where)
+ else
+ return head, false
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-otl.lua b/Master/texmf-dist/tex/context/base/mkiv/font-otl.lua
new file mode 100644
index 00000000000..bcea2752015
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-otl.lua
@@ -0,0 +1,839 @@
+if not modules then modules = { } end modules ['font-otl'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+-- After some experimenting with an alternative loader (one that is needed for
+-- getting outlines in mp) I decided not to be compatible with the old (built-in)
+-- one. The approach used in font-otn is as follows: we load the font in a compact
+-- format but still very compatible with the ff data structures. From there we
+-- create hashes to access the data efficiently. The implementation of feature
+-- processing is mostly based on looking at the data as organized in the glyphs and
+-- lookups as well as the specification. Keeping the lookup data in the glyphs is
+-- very instructive and handy for tracing. On the other hand hashing is what brings
+-- speed. So, the in the new approach (the old one will stay around too) we no
+-- longer keep data in the glyphs which saves us a (what in retrospect looks a bit
+-- like) a reconstruction step. It also means that the data format of the cached
+-- files changes. What method is used depends on that format. There is no fundamental
+-- change in processing, and not even in data organation. Most has to do with
+-- loading and storage.
+
+-- todo: less tounicodes
+
+local gmatch, find, match, lower, strip = string.gmatch, string.find, string.match, string.lower, string.strip
+local type, next, tonumber, tostring, unpack = type, next, tonumber, tostring, unpack
+local abs = math.abs
+local ioflush = io.flush
+local derivetable = table.derive
+local formatters = string.formatters
+
+local setmetatableindex = table.setmetatableindex
+local allocate = utilities.storage.allocate
+local registertracker = trackers.register
+local registerdirective = directives.register
+local starttiming = statistics.starttiming
+local stoptiming = statistics.stoptiming
+local elapsedtime = statistics.elapsedtime
+local findbinfile = resolvers.findbinfile
+
+----- trace_private = false registertracker("otf.private", function(v) trace_private = v end)
+----- trace_subfonts = false registertracker("otf.subfonts", function(v) trace_subfonts = v end)
+local trace_loading = false registertracker("otf.loading", function(v) trace_loading = v end)
+local trace_features = false registertracker("otf.features", function(v) trace_features = v end)
+----- trace_dynamics = false registertracker("otf.dynamics", function(v) trace_dynamics = v end)
+----- trace_sequences = false registertracker("otf.sequences", function(v) trace_sequences = v end)
+----- trace_markwidth = false registertracker("otf.markwidth", function(v) trace_markwidth = v end)
+local trace_defining = false registertracker("fonts.defining", function(v) trace_defining = v end)
+
+local report_otf = logs.reporter("fonts","otf loading")
+
+local fonts = fonts
+local otf = fonts.handlers.otf
+
+otf.version = 3.018 -- beware: also sync font-mis.lua and in mtx-fonts
+otf.cache = containers.define("fonts", "otl", otf.version, true)
+
+local otfreaders = otf.readers
+
+local hashes = fonts.hashes
+local definers = fonts.definers
+local readers = fonts.readers
+local constructors = fonts.constructors
+
+local otffeatures = constructors.newfeatures("otf")
+local registerotffeature = otffeatures.register
+
+local enhancers = allocate()
+otf.enhancers = enhancers
+local patches = { }
+enhancers.patches = patches
+
+local forceload = false
+local cleanup = 0 -- mk: 0=885M 1=765M 2=735M (regular run 730M)
+local syncspace = true
+local forcenotdef = false
+
+local applyruntimefixes = fonts.treatments and fonts.treatments.applyfixes
+
+local wildcard = "*"
+local default = "dflt"
+
+local formats = fonts.formats
+
+formats.otf = "opentype"
+formats.ttf = "truetype"
+formats.ttc = "truetype"
+
+registerdirective("fonts.otf.loader.cleanup", function(v) cleanup = tonumber(v) or (v and 1) or 0 end)
+registerdirective("fonts.otf.loader.force", function(v) forceload = v end)
+registerdirective("fonts.otf.loader.syncspace", function(v) syncspace = v end)
+registerdirective("fonts.otf.loader.forcenotdef", function(v) forcenotdef = v end)
+
+-- local function load_featurefile(raw,featurefile)
+-- if featurefile and featurefile ~= "" then
+-- if trace_loading then
+-- report_otf("using featurefile %a", featurefile)
+-- end
+-- -- TODO: apply_featurefile(raw, featurefile)
+-- end
+-- end
+
+local ordered_enhancers = {
+ "check extra features",
+}
+
+local actions = allocate()
+local before = allocate()
+local after = allocate()
+
+patches.before = before
+patches.after = after
+
+local function enhance(name,data,filename,raw)
+ local enhancer = actions[name]
+ if enhancer then
+ if trace_loading then
+ report_otf("apply enhancement %a to file %a",name,filename)
+ ioflush()
+ end
+ enhancer(data,filename,raw)
+ else
+ -- no message as we can have private ones
+ end
+end
+
+function enhancers.apply(data,filename,raw)
+ local basename = file.basename(lower(filename))
+ if trace_loading then
+ report_otf("%s enhancing file %a","start",filename)
+ end
+ ioflush() -- we want instant messages
+ for e=1,#ordered_enhancers do
+ local enhancer = ordered_enhancers[e]
+ local b = before[enhancer]
+ if b then
+ for pattern, action in next, b do
+ if find(basename,pattern) then
+ action(data,filename,raw)
+ end
+ end
+ end
+ enhance(enhancer,data,filename,raw)
+ local a = after[enhancer]
+ if a then
+ for pattern, action in next, a do
+ if find(basename,pattern) then
+ action(data,filename,raw)
+ end
+ end
+ end
+ ioflush() -- we want instant messages
+ end
+ if trace_loading then
+ report_otf("%s enhancing file %a","stop",filename)
+ end
+ ioflush() -- we want instant messages
+end
+
+-- patches.register("before","migrate metadata","cambria",function() end)
+
+function patches.register(what,where,pattern,action)
+ local pw = patches[what]
+ if pw then
+ local ww = pw[where]
+ if ww then
+ ww[pattern] = action
+ else
+ pw[where] = { [pattern] = action}
+ end
+ end
+end
+
+function patches.report(fmt,...)
+ if trace_loading then
+ report_otf("patching: %s",formatters[fmt](...))
+ end
+end
+
+function enhancers.register(what,action) -- only already registered can be overloaded
+ actions[what] = action
+end
+
+function otf.load(filename,sub,featurefile) -- second argument (format) is gone !
+ --
+ local featurefile = nil -- not supported (yet)
+ --
+ local base = file.basename(file.removesuffix(filename))
+ local name = file.removesuffix(base)
+ local attr = lfs.attributes(filename)
+ local size = attr and attr.size or 0
+ local time = attr and attr.modification or 0
+ if featurefile then
+ name = name .. "@" .. file.removesuffix(file.basename(featurefile))
+ end
+ -- sub can be number of string
+ if sub == "" then
+ sub = false
+ end
+ local hash = name
+ if sub then
+ hash = hash .. "-" .. sub
+ end
+ hash = containers.cleanname(hash)
+ local featurefiles
+ if featurefile then
+ featurefiles = { }
+ for s in gmatch(featurefile,"[^,]+") do
+ local name = resolvers.findfile(file.addsuffix(s,'fea'),'fea') or ""
+ if name == "" then
+ report_otf("loading error, no featurefile %a",s)
+ else
+ local attr = lfs.attributes(name)
+ featurefiles[#featurefiles+1] = {
+ name = name,
+ size = attr and attr.size or 0,
+ time = attr and attr.modification or 0,
+ }
+ end
+ end
+ if #featurefiles == 0 then
+ featurefiles = nil
+ end
+ end
+ local data = containers.read(otf.cache,hash)
+ local reload = not data or data.size ~= size or data.time ~= time or data.tableversion ~= otfreaders.tableversion
+ if forceload then
+ report_otf("forced reload of %a due to hard coded flag",filename)
+ reload = true
+ end
+ -- if not reload then
+ -- local featuredata = data.featuredata
+ -- if featurefiles then
+ -- if not featuredata or #featuredata ~= #featurefiles then
+ -- reload = true
+ -- else
+ -- for i=1,#featurefiles do
+ -- local fi, fd = featurefiles[i], featuredata[i]
+ -- if fi.name ~= fd.name or fi.size ~= fd.size or fi.time ~= fd.time then
+ -- reload = true
+ -- break
+ -- end
+ -- end
+ -- end
+ -- elseif featuredata then
+ -- reload = true
+ -- end
+ -- if reload then
+ -- report_otf("loading: forced reload due to changed featurefile specification %a",featurefile)
+ -- end
+ -- end
+ if reload then
+ report_otf("loading %a, hash %a",filename,hash)
+ --
+ starttiming(otfreaders)
+ data = otfreaders.loadfont(filename,sub or 1) -- we can pass the number instead (if it comes from a name search)
+ --
+ -- if featurefiles then
+ -- for i=1,#featurefiles do
+ -- load_featurefile(data,featurefiles[i].name)
+ -- end
+ -- end
+ --
+ --
+ if data then
+ otfreaders.compact(data)
+ otfreaders.rehash(data,"unicodes")
+ otfreaders.addunicodetable(data)
+ otfreaders.extend(data)
+ otfreaders.pack(data)
+ report_otf("loading done")
+ report_otf("saving %a in cache",filename)
+ data = containers.write(otf.cache, hash, data)
+ if cleanup > 1 then
+ collectgarbage("collect")
+ end
+ stoptiming(otfreaders)
+ if elapsedtime then -- not in generic
+ report_otf("loading, optimizing, packing and caching time %s", elapsedtime(otfreaders))
+ end
+ if cleanup > 3 then
+ collectgarbage("collect")
+ end
+ data = containers.read(otf.cache,hash) -- this frees the old table and load the sparse one
+ if cleanup > 2 then
+ collectgarbage("collect")
+ end
+ else
+ data = nil
+ report_otf("loading failed due to read error")
+ end
+ end
+ if data then
+ if trace_defining then
+ report_otf("loading from cache using hash %a",hash)
+ end
+ --
+ otfreaders.unpack(data)
+ otfreaders.expand(data) -- inline tables
+ otfreaders.addunicodetable(data) -- only when not done yet
+ --
+ enhancers.apply(data,filename,data)
+ --
+ constructors.addcoreunicodes(unicodes)
+ --
+ if applyruntimefixes then
+ applyruntimefixes(filename,data)
+ end
+ --
+ data.metadata.math = data.resources.mathconstants
+ end
+
+
+ return data
+end
+
+-- modes: node, base, none
+
+function otf.setfeatures(tfmdata,features)
+ local okay = constructors.initializefeatures("otf",tfmdata,features,trace_features,report_otf)
+ if okay then
+ return constructors.collectprocessors("otf",tfmdata,features,trace_features,report_otf)
+ else
+ return { } -- will become false
+ end
+end
+
+-- the first version made a top/mid/not extensible table, now we just
+-- pass on the variants data and deal with it in the tfm scaler (there
+-- is no longer an extensible table anyway)
+--
+-- we cannot share descriptions as virtual fonts might extend them (ok,
+-- we could use a cache with a hash
+--
+-- we already assign an empty table to characters as we can add for
+-- instance protruding info and loop over characters; one is not supposed
+-- to change descriptions and if one does so one should make a copy!
+
+local function copytotfm(data,cache_id)
+ if data then
+ local metadata = data.metadata
+ local resources = data.resources
+ local properties = derivetable(data.properties)
+ local descriptions = derivetable(data.descriptions)
+ local goodies = derivetable(data.goodies)
+ local characters = { }
+ local parameters = { }
+ local mathparameters = { }
+ --
+ local resources = data.resources
+ local unicodes = resources.unicodes
+ local spaceunits = 500
+ local spacer = "space"
+ local designsize = metadata.designsize or 100
+ local minsize = metadata.minsize or designsize
+ local maxsize = metadata.maxsize or designsize
+ local mathspecs = metadata.math
+ --
+ if designsize == 0 then
+ designsize = 100
+ minsize = 100
+ maxsize = 100
+ end
+ if mathspecs then
+ for name, value in next, mathspecs do
+ mathparameters[name] = value
+ end
+ end
+ for unicode in next, data.descriptions do -- use parent table
+ characters[unicode] = { }
+ end
+ if mathspecs then
+ for unicode, character in next, characters do
+ local d = descriptions[unicode]
+ local m = d.math
+ if m then
+ -- watch out: luatex uses horiz_variants for the parts
+ --
+ local italic = m.italic
+ local vitalic = m.vitalic
+ --
+ local variants = m.hvariants
+ local parts = m.hparts
+ if variants then
+ local c = character
+ for i=1,#variants do
+ -- local un = variants[i].glyph
+ local un = variants[i]
+ c.next = un
+ c = characters[un]
+ end -- c is now last in chain
+ c.horiz_variants = parts
+ elseif parts then
+ character.horiz_variants = parts
+ italic = m.hitalic
+ end
+ --
+ local variants = m.vvariants
+ local parts = m.vparts
+ if variants then
+ local c = character
+ for i=1,#variants do
+ -- local un = variants[i].glyph
+ local un = variants[i]
+ c.next = un
+ c = characters[un]
+ end -- c is now last in chain
+ c.vert_variants = parts
+ elseif parts then
+ character.vert_variants = parts
+ end
+ --
+ if italic and italic ~= 0 then
+ character.italic = italic
+ end
+ --
+ if vitalic and vitalic ~= 0 then
+ character.vert_italic = vitalic
+ end
+ --
+ local accent = m.accent -- taccent?
+ if accent then
+ character.accent = accent
+ end
+ --
+ local kerns = m.kerns
+ if kerns then
+ character.mathkerns = kerns
+ end
+ end
+ end
+ end
+ -- we need a runtime lookup because of running from cdrom or zip, brrr (shouldn't
+ -- we use the basename then?)
+ local filename = constructors.checkedfilename(resources)
+ local fontname = metadata.fontname
+ local fullname = metadata.fullname or fontname
+ local psname = fontname or fullname
+ local units = metadata.units or 1000
+ --
+ if units == 0 then -- catch bugs in fonts
+ units = 1000 -- maybe 2000 when ttf
+ metadata.units = 1000
+ report_otf("changing %a units to %a",0,units)
+ end
+ --
+ local monospaced = metadata.monospaced
+ local charwidth = metadata.averagewidth -- or unset
+ local charxheight = metadata.xheight -- or unset
+ local italicangle = metadata.italicangle
+ local hasitalics = metadata.hasitalics
+ properties.monospaced = monospaced
+ properties.hasitalics = hasitalics
+ parameters.italicangle = italicangle
+ parameters.charwidth = charwidth
+ parameters.charxheight = charxheight
+ --
+ local space = 0x0020
+ local emdash = 0x2014
+ if monospaced then
+ if descriptions[space] then
+ spaceunits, spacer = descriptions[space].width, "space"
+ end
+ if not spaceunits and descriptions[emdash] then
+ spaceunits, spacer = descriptions[emdash].width, "emdash"
+ end
+ if not spaceunits and charwidth then
+ spaceunits, spacer = charwidth, "charwidth"
+ end
+ else
+ if descriptions[space] then
+ spaceunits, spacer = descriptions[space].width, "space"
+ end
+ if not spaceunits and descriptions[emdash] then
+ spaceunits, spacer = descriptions[emdash].width/2, "emdash/2"
+ end
+ if not spaceunits and charwidth then
+ spaceunits, spacer = charwidth, "charwidth"
+ end
+ end
+ spaceunits = tonumber(spaceunits) or 500 -- brrr
+ --
+ parameters.slant = 0
+ parameters.space = spaceunits -- 3.333 (cmr10)
+ parameters.space_stretch = 1*units/2 -- 500 -- 1.666 (cmr10)
+ parameters.space_shrink = 1*units/3 -- 333 -- 1.111 (cmr10)
+ parameters.x_height = 2*units/5 -- 400
+ parameters.quad = units -- 1000
+ if spaceunits < 2*units/5 then
+ -- todo: warning
+ end
+ if italicangle and italicangle ~= 0 then
+ parameters.italicangle = italicangle
+ parameters.italicfactor = math.cos(math.rad(90+italicangle))
+ parameters.slant = - math.tan(italicangle*math.pi/180)
+ end
+ if monospaced then
+ parameters.space_stretch = 0
+ parameters.space_shrink = 0
+ elseif syncspace then --
+ parameters.space_stretch = spaceunits/2
+ parameters.space_shrink = spaceunits/3
+ end
+ parameters.extra_space = parameters.space_shrink -- 1.111 (cmr10)
+ if charxheight then
+ parameters.x_height = charxheight
+ else
+ local x = 0x0078
+ if x then
+ local x = descriptions[x]
+ if x then
+ parameters.x_height = x.height
+ end
+ end
+ end
+ --
+ parameters.designsize = (designsize/10)*65536
+ parameters.minsize = (minsize /10)*65536
+ parameters.maxsize = (maxsize /10)*65536
+ parameters.ascender = abs(metadata.ascender or 0)
+ parameters.descender = abs(metadata.descender or 0)
+ parameters.units = units
+ --
+ properties.space = spacer
+ properties.encodingbytes = 2
+ properties.format = data.format or formats.otf
+ properties.noglyphnames = true
+ properties.filename = filename
+ properties.fontname = fontname
+ properties.fullname = fullname
+ properties.psname = psname
+ properties.name = filename or fullname
+ --
+ -- properties.name = specification.name
+ -- properties.sub = specification.sub
+ --
+ return {
+ characters = characters,
+ descriptions = descriptions,
+ parameters = parameters,
+ mathparameters = mathparameters,
+ resources = resources,
+ properties = properties,
+ goodies = goodies,
+ }
+ end
+end
+
+local function otftotfm(specification)
+ local cache_id = specification.hash
+ local tfmdata = containers.read(constructors.cache,cache_id)
+ if not tfmdata then
+ local name = specification.name
+ local sub = specification.sub
+ local subindex = specification.subindex
+ local filename = specification.filename
+ local features = specification.features.normal
+ local rawdata = otf.load(filename,sub,features and features.featurefile)
+ if rawdata and next(rawdata) then
+ local descriptions = rawdata.descriptions
+ rawdata.lookuphash = { } -- to be done
+ tfmdata = copytotfm(rawdata,cache_id)
+ if tfmdata and next(tfmdata) then
+ -- at this moment no characters are assigned yet, only empty slots
+ local features = constructors.checkedfeatures("otf",features)
+ local shared = tfmdata.shared
+ if not shared then
+ shared = { }
+ tfmdata.shared = shared
+ end
+ shared.rawdata = rawdata
+ -- shared.features = features -- default
+ shared.dynamics = { }
+ -- shared.processes = { }
+ tfmdata.changed = { }
+ shared.features = features
+ shared.processes = otf.setfeatures(tfmdata,features)
+ end
+ end
+ containers.write(constructors.cache,cache_id,tfmdata)
+ end
+ return tfmdata
+end
+
+local function read_from_otf(specification)
+ local tfmdata = otftotfm(specification)
+ if tfmdata then
+ -- this late ? .. needs checking
+ tfmdata.properties.name = specification.name
+ tfmdata.properties.sub = specification.sub
+ --
+ tfmdata = constructors.scale(tfmdata,specification)
+ local allfeatures = tfmdata.shared.features or specification.features.normal
+ constructors.applymanipulators("otf",tfmdata,allfeatures,trace_features,report_otf)
+ constructors.setname(tfmdata,specification) -- only otf?
+ fonts.loggers.register(tfmdata,file.suffix(specification.filename),specification)
+ end
+ return tfmdata
+end
+
+local function checkmathsize(tfmdata,mathsize)
+ local mathdata = tfmdata.shared.rawdata.metadata.math
+ local mathsize = tonumber(mathsize)
+ if mathdata then -- we cannot use mathparameters as luatex will complain
+ local parameters = tfmdata.parameters
+ parameters.scriptpercentage = mathdata.ScriptPercentScaleDown
+ parameters.scriptscriptpercentage = mathdata.ScriptScriptPercentScaleDown
+ parameters.mathsize = mathsize
+ end
+end
+
+registerotffeature {
+ name = "mathsize",
+ description = "apply mathsize specified in the font",
+ initializers = {
+ base = checkmathsize,
+ node = checkmathsize,
+ }
+}
+
+-- readers
+
+function otf.collectlookups(rawdata,kind,script,language)
+ if not kind then
+ return
+ end
+ if not script then
+ script = default
+ end
+ if not language then
+ language = default
+ end
+ local lookupcache = rawdata.lookupcache
+ if not lookupcache then
+ lookupcache = { }
+ rawdata.lookupcache = lookupcache
+ end
+ local kindlookup = lookupcache[kind]
+ if not kindlookup then
+ kindlookup = { }
+ lookupcache[kind] = kindlookup
+ end
+ local scriptlookup = kindlookup[script]
+ if not scriptlookup then
+ scriptlookup = { }
+ kindlookup[script] = scriptlookup
+ end
+ local languagelookup = scriptlookup[language]
+ if not languagelookup then
+ local sequences = rawdata.resources.sequences
+ local featuremap = { }
+ local featurelist = { }
+ if sequences then
+ for s=1,#sequences do
+ local sequence = sequences[s]
+ local features = sequence.features
+ if features then
+ features = features[kind]
+ if features then
+ -- features = features[script] or features[default] or features[wildcard]
+ features = features[script] or features[wildcard]
+ if features then
+ -- features = features[language] or features[default] or features[wildcard]
+ features = features[language] or features[wildcard]
+ if features then
+ if not featuremap[sequence] then
+ featuremap[sequence] = true
+ featurelist[#featurelist+1] = sequence
+ end
+ end
+ end
+ end
+ end
+ end
+ if #featurelist == 0 then
+ featuremap, featurelist = false, false
+ end
+ else
+ featuremap, featurelist = false, false
+ end
+ languagelookup = { featuremap, featurelist }
+ scriptlookup[language] = languagelookup
+ end
+ return unpack(languagelookup)
+end
+
+-- moved from font-oth.lua, todo: also afm
+
+local function getgsub(tfmdata,k,kind,value)
+ local shared = tfmdata.shared
+ local rawdata = shared and shared.rawdata
+ if rawdata then
+ local sequences = rawdata.resources.sequences
+ if sequences then
+ local properties = tfmdata.properties
+ local validlookups, lookuplist = otf.collectlookups(rawdata,kind,properties.script,properties.language)
+ if validlookups then
+ local choice = tonumber(value) or 1 -- no random here (yet)
+ for i=1,#lookuplist do
+ local lookup = lookuplist[i]
+ local steps = lookup.steps
+ local nofsteps = lookup.nofsteps
+ for i=1,nofsteps do
+ local coverage = steps[i].coverage
+ if coverage then
+ local found = coverage[k]
+ if found then
+ return found, lookup.type
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
+otf.getgsub = getgsub -- returns value, gsub_kind
+
+function otf.getsubstitution(tfmdata,k,kind,value)
+ local found, kind = getgsub(tfmdata,k,kind)
+ if not found then
+ --
+ elseif kind == "gsub_single" then
+ return found
+ elseif kind == "gsub_alternate" then
+ local choice = tonumber(value) or 1 -- no random here (yet)
+ return found[choice] or found[1] or k
+ end
+ return k
+end
+
+otf.getalternate = otf.getsubstitution
+
+function otf.getmultiple(tfmdata,k,kind)
+ local found, kind = getgsub(tfmdata,k,kind)
+ if found and kind == "gsub_multiple" then
+ return found
+ end
+ return { k }
+end
+
+function otf.getkern(tfmdata,left,right,kind)
+ local kerns = getgsub(tfmdata,left,kind or "kern",true) -- for now we use getsub
+ if kerns then
+ local found = kerns[right]
+ local kind = type(found)
+ if kind == "table" then
+ found = found[1][3] -- can be more clever
+ elseif kind ~= "number" then
+ found = false
+ end
+ if found then
+ return found * tfmdata.parameters.factor
+ end
+ end
+ return 0
+end
+
+local function check_otf(forced,specification,suffix)
+ local name = specification.name
+ if forced then
+ name = specification.forcedname -- messy
+ end
+ local fullname = findbinfile(name,suffix) or ""
+ if fullname == "" then
+ fullname = fonts.names.getfilename(name,suffix) or ""
+ end
+ if fullname ~= "" and not fonts.names.ignoredfile(fullname) then
+ specification.filename = fullname
+ return read_from_otf(specification)
+ end
+end
+
+local function opentypereader(specification,suffix)
+ local forced = specification.forced or ""
+ if formats[forced] then
+ return check_otf(true,specification,forced)
+ else
+ return check_otf(false,specification,suffix)
+ end
+end
+
+readers.opentype = opentypereader -- kind of useless and obsolete
+
+function readers.otf (specification) return opentypereader(specification,"otf") end
+function readers.ttf (specification) return opentypereader(specification,"ttf") end
+function readers.ttc (specification) return opentypereader(specification,"ttf") end
+
+-- this will be overloaded
+
+function otf.scriptandlanguage(tfmdata,attr)
+ local properties = tfmdata.properties
+ return properties.script or "dflt", properties.language or "dflt"
+end
+
+-- a little bit of abstraction
+
+local function justset(coverage,unicode,replacement)
+ coverage[unicode] = replacement
+end
+
+otf.coverup = {
+ stepkey = "steps",
+ actions = {
+ chainsubstitution = justset,
+ chainposition = justset,
+ substitution = justset,
+ alternate = justset,
+ multiple = justset,
+ kern = justset,
+ pair = justset,
+ ligature = function(coverage,unicode,ligature)
+ local first = ligature[1]
+ local tree = coverage[first]
+ if not tree then
+ tree = { }
+ coverage[first] = tree
+ end
+ for i=2,#ligature do
+ local l = ligature[i]
+ local t = tree[l]
+ if not t then
+ t = { }
+ tree[l] = t
+ end
+ tree = t
+ end
+ tree.ligature = unicode
+ end,
+ },
+ register = function(coverage,featuretype,format)
+ return {
+ format = format,
+ coverage = coverage,
+ }
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/font-otn.lua b/Master/texmf-dist/tex/context/base/mkiv/font-otn.lua
index b1bd4530478..1c17e889de0 100644
--- a/Master/texmf-dist/tex/context/base/font-otn.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-otn.lua
@@ -6,12 +6,16 @@ if not modules then modules = { } end modules ['font-otn'] = {
license = "see context related readme files",
}
--- todo: looks like we have a leak somewhere (probably in ligatures)
--- todo: copy attributes to disc
-
-- this is a context version which can contain experimental code, but when we
-- have serious patches we also need to change the other two font-otn files
+-- at some point i might decide to convert the whole list into a table and then
+-- run over that instead (but it has some drawbacks as we also need to deal with
+-- attributes and such so we need to keep a lot of track - which is why i rejected
+-- that method - although it has become a bit easier in the meantime so it might
+-- become an alternative (by that time i probably have gone completely lua) .. the
+-- usual chicken-egg issues ... maybe mkix as it's no real tex any more then
+
-- preprocessors = { "nodes" }
-- anchor class : mark, mkmk, curs, mklg (todo)
@@ -76,9 +80,12 @@ is currently acceptable. Not all functions are implemented yet, often because I
lack the fonts for testing. Many scripts are not yet supported either, but I will
look into them as soon as <l n='context'/> users ask for it.</p>
-<p>Because there are different interpretations possible, I will extend the code
-with more (configureable) variants. I can also add hooks for users so that they can
-write their own extensions.</p>
+<p>The specification leaves room for interpretation. In case of doubt the microsoft
+implementation is the reference as it is the most complete one. As they deal with
+lots of scripts and fonts, Kai and Ivo did a lot of testing of the generic code and
+their suggestions help improve the code. I'm aware that not all border cases can be
+taken care of, unless we accept excessive runtime, and even then the interference
+with other mechanisms (like hyphenation) are not trivial.</p>
<p>Glyphs are indexed not by unicode but in their own way. This is because there is no
relationship with unicode at all, apart from the fact that a font might cover certain
@@ -105,12 +112,12 @@ when there's a fix in the <l n='fontforge'/> library or <l n='lua'/> code that
results in different tables.</p>
--ldx]]--
--- action handler chainproc chainmore comment
+-- action handler chainproc
--
--- gsub_single ok ok ok
--- gsub_multiple ok ok not implemented yet
--- gsub_alternate ok ok not implemented yet
--- gsub_ligature ok ok ok
+-- gsub_single ok ok
+-- gsub_multiple ok ok
+-- gsub_alternate ok ok
+-- gsub_ligature ok ok
-- gsub_context ok --
-- gsub_contextchain ok --
-- gsub_reversecontextchain ok --
@@ -125,7 +132,7 @@ results in different tables.</p>
-- gpos_context ok --
-- gpos_contextchain ok --
--
--- todo: contextpos and contextsub and class stuff
+-- todo: contextpos
--
-- actions:
--
@@ -175,13 +182,11 @@ local trace_discruns = false registertracker("otf.discruns", function(v
local trace_compruns = false registertracker("otf.compruns", function(v) trace_compruns = v end)
local quit_on_no_replacement = true -- maybe per font
-local check_discretionaries = true -- "trace"
local zwnjruns = true
registerdirective("otf.zwnjruns", function(v) zwnjruns = v end)
registerdirective("otf.chain.quitonnoreplacement",function(value) quit_on_no_replacement = value end)
-
local report_direct = logs.reporter("fonts","otf direct")
local report_subchain = logs.reporter("fonts","otf subchain")
local report_chain = logs.reporter("fonts","otf chain")
@@ -207,7 +212,9 @@ local tonut = nuts.tonut
local getfield = nuts.getfield
local setfield = nuts.setfield
local getnext = nuts.getnext
+local setnext = nuts.setnext
local getprev = nuts.getprev
+local setprev = nuts.setprev
local getid = nuts.getid
local getattr = nuts.getattr
local setattr = nuts.setattr
@@ -215,7 +222,9 @@ local getprop = nuts.getprop
local setprop = nuts.setprop
local getfont = nuts.getfont
local getsubtype = nuts.getsubtype
+local setsubtype = nuts.setsubtype
local getchar = nuts.getchar
+local setchar = nuts.setchar
local insert_node_before = nuts.insert_before
local insert_node_after = nuts.insert_after
@@ -238,23 +247,17 @@ local wildcard = "*"
local default = "dflt"
local nodecodes = nodes.nodecodes
-local whatcodes = nodes.whatcodes
local glyphcodes = nodes.glyphcodes
local disccodes = nodes.disccodes
local glyph_code = nodecodes.glyph
local glue_code = nodecodes.glue
local disc_code = nodecodes.disc
-local whatsit_code = nodecodes.whatsit
local math_code = nodecodes.math
-
-local dir_code = whatcodes.dir
-local localpar_code = whatcodes.localpar
+local dir_code = nodecodes.dir
+local localpar_code = nodecodes.localpar
local discretionary_code = disccodes.discretionary
-local regular_code = disccodes.regular
-local automatic_code = disccodes.automatic
-
local ligature_code = glyphcodes.ligature
local privateattribute = attributes.private
@@ -306,7 +309,14 @@ local handlers = { }
local rlmode = 0
local featurevalue = false
--- head is always a whatsit so we can safely assume that head is not changed
+local sweephead = { }
+local sweepnode = nil
+local sweepprev = nil
+local sweepnext = nil
+
+local notmatchpre = { }
+local notmatchpost = { }
+local notmatchreplace = { }
-- we use this for special testing and documentation
@@ -396,50 +406,64 @@ local function copy_glyph(g) -- next and prev are untouched !
end
end
--- temp here (context)
-
-local function collapse_disc(start,next)
- local replace1 = getfield(start,"replace")
- local replace2 = getfield(next,"replace")
- if replace1 and replace2 then
- local pre2 = getfield(next,"pre")
- local post2 = getfield(next,"post")
- setfield(replace1,"prev",nil)
- if pre2 then
- local pre1 = getfield(start,"pre")
- if pre1 then
- flush_node_list(pre1)
+local function flattendisk(head,disc)
+ local replace = getfield(disc,"replace")
+ setfield(disc,"replace",nil)
+ free_node(disc)
+ if head == disc then
+ local next = getnext(disc)
+ if replace then
+ if next then
+ local tail = find_node_tail(replace)
+ setnext(tail,next)
+ setprev(next,tail)
end
- local pre1 = copy_node_list(replace1)
- local tail1 = find_node_tail(pre1)
- setfield(tail1,"next",pre2)
- setfield(pre2,"prev",tail1)
- setfield(start,"pre",pre1)
- setfield(next,"pre",nil)
+ return replace, replace
+ elseif next then
+ return next, next
else
- setfield(start,"pre",nil)
+ return -- maybe warning
end
- if post2 then
- local post1 = getfield(start,"post")
- if post1 then
- flush_node_list(post1)
+ else
+ local next = getnext(disc)
+ local prev = getprev(disc)
+ if replace then
+ local tail = find_node_tail(replace)
+ if next then
+ setnext(tail,next)
+ setprev(next,tail)
end
- setfield(start,"post",post2)
+ setnext(prev,replace)
+ setprev(replace,prev)
+ return head, replace
else
- setfield(start,"post",nil)
- end
- local tail1 = find_node_tail(replace1)
- setfield(tail1,"next",replace2)
- setfield(replace2,"prev",tail1)
- setfield(start,"replace",replace1)
- setfield(next,"replace",nil)
- --
- local nextnext = getnext(next)
- setfield(nextnext,"prev",start)
- setfield(start,"next",nextnext)
- free_node(next)
+ if next then
+ setprev(next,prev)
+ end
+ setnext(prev,next)
+ return head, next
+ end
+ end
+end
+
+local function appenddisc(disc,list)
+ local post = getfield(disc,"post")
+ local replace = getfield(disc,"replace")
+ local phead = list
+ local rhead = copy_node_list(list)
+ local ptail = find_node_tail(post)
+ local rtail = find_node_tail(replace)
+ if post then
+ setnext(ptail,phead)
+ setprev(phead,ptail)
else
- -- maybe remove it
+ setfield(disc,"post",phead)
+ end
+ if replace then
+ setnext(rtail,rhead)
+ setprev(rhead,rtail)
+ else
+ setfield(disc,"replace",rhead)
end
end
@@ -451,24 +475,24 @@ local function markstoligature(kind,lookupname,head,start,stop,char)
else
local prev = getprev(start)
local next = getnext(stop)
- setfield(start,"prev",nil)
- setfield(stop,"next",nil)
+ setprev(start,nil)
+ setnext(stop,nil)
local base = copy_glyph(start)
if head == start then
head = base
end
resetinjection(base)
- setfield(base,"char",char)
- setfield(base,"subtype",ligature_code)
+ setchar(base,char)
+ setsubtype(base,ligature_code)
setfield(base,"components",start)
if prev then
- setfield(prev,"next",base)
+ setnext(prev,base)
end
if next then
- setfield(next,"prev",base)
+ setprev(next,base)
end
- setfield(base,"next",next)
- setfield(base,"prev",prev)
+ setnext(base,next)
+ setprev(base,prev)
return head, base
end
end
@@ -480,8 +504,8 @@ end
-- iteration this becomes a KAF-LAM-ALEF with a SHADDA on the second and a FATHA on the
-- third component.
-local function getcomponentindex(start)
- if getid(start) ~= glyph_code then
+local function getcomponentindex(start) -- we could store this offset in the glyph (nofcomponents)
+ if getid(start) ~= glyph_code then -- and then get rid of all components
return 0
elseif getsubtype(start) == ligature_code then
local i = 0
@@ -498,69 +522,7 @@ local function getcomponentindex(start)
end
end
-local a_noligature = attributes.private("noligature")
-local prehyphenchar = languages and languages.prehyphenchar
-local posthyphenchar = languages and languages.posthyphenchar
------ preexhyphenchar = languages and languages.preexhyphenchar
------ postexhyphenchar = languages and languages.postexhyphenchar
-
-if prehyphenchar then
-
- -- okay
-
-elseif context then
-
- report_warning("no language support") os.exit()
-
-else
-
- local newlang = lang.new
- local getpre = lang.prehyphenchar
- local getpost = lang.posthyphenchar
- -- local getpreex = lang.preexhyphenchar
- -- local getpostex = lang.postexhyphenchar
-
- prehyphenchar = function(l) local l = newlang(l) return l and getpre (l) or -1 end
- posthyphenchar = function(l) local l = newlang(l) return l and getpost (l) or -1 end
- -- preexhyphenchar = function(l) local l = newlang(l) return l and getpreex (l) or -1 end
- -- postexhyphenchar = function(l) local l = newlang(l) return l and getpostex(l) or -1 end
-
-end
-
-local function addhyphens(template,pre,post)
- -- inserted by hyphenation algorithm
- local l = getfield(template,"lang")
- local p = prehyphenchar(l)
- if p and p > 0 then
- local c = copy_node(template)
- setfield(c,"char",p)
- if pre then
- local t = find_node_tail(pre)
- setfield(t,"next",c)
- setfield(c,"prev",t)
- else
- pre = c
- end
- end
- local p = posthyphenchar(l)
- if p and p > 0 then
- local c = copy_node(template)
- setfield(c,"char",p)
- if post then
- -- post has a prev nesting node .. alternatively we could
- local prev = getprev(post)
- setfield(c,"next",post)
- setfield(post,"prev",c)
- if prev then
- setfield(prev,"next",c)
- setfield(c,"prev",prev)
- end
- else
- post = c
- end
- end
- return pre, post
-end
+local a_noligature = attributes.private("noligature")
local function toligature(kind,lookupname,head,start,stop,char,markflag,discfound) -- brr head
if getattr(start,a_noligature) == 1 then
@@ -569,36 +531,37 @@ local function toligature(kind,lookupname,head,start,stop,char,markflag,discfoun
end
if start == stop and getchar(start) == char then
resetinjection(start)
- setfield(start,"char",char)
+ setchar(start,char)
return head, start
end
-- needs testing (side effects):
- local components = getfield(base,"components")
+ local components = getfield(start,"components")
if components then
- flush_node_list(components)
+ -- we get a double free .. needs checking
+ -- flush_node_list(components)
end
--
local prev = getprev(start)
local next = getnext(stop)
local comp = start
- setfield(start,"prev",nil)
- setfield(stop,"next",nil)
+ setprev(start,nil)
+ setnext(stop,nil)
local base = copy_glyph(start)
if start == head then
head = base
end
resetinjection(base)
- setfield(base,"char",char)
- setfield(base,"subtype",ligature_code)
- setfield(base,"components",comp) -- start can have components .. do we need to flush?
+ setchar(base,char)
+ setsubtype(base,ligature_code)
+ setfield(base,"components",comp) -- start can have components ... do we need to flush?
if prev then
- setfield(prev,"next",base)
+ setnext(prev,base)
end
if next then
- setfield(next,"prev",base)
+ setprev(next,base)
end
- setfield(base,"next",next)
- setfield(base,"prev",prev)
+ setprev(base,prev)
+ setnext(base,next)
if not discfound then
local deletemarks = markflag ~= "mark"
local components = start
@@ -642,79 +605,83 @@ local function toligature(kind,lookupname,head,start,stop,char,markflag,discfoun
end
else
-- discfound ... forget about marks .. probably no scripts that hyphenate and have marks
- local discprev = getfield(discfound,"prev")
- local discnext = getfield(discfound,"next")
+ local discprev = getprev(discfound)
+ local discnext = getnext(discfound)
if discprev and discnext then
- local subtype = getsubtype(discfound)
- if subtype == discretionary_code then
- local pre = getfield(discfound,"pre")
- local post = getfield(discfound,"post")
- local replace = getfield(discfound,"replace")
- if not replace then -- todo: signal simple hyphen
- local prev = getfield(base,"prev")
- local copied = copy_node_list(comp)
- setfield(discnext,"prev",nil) -- also blocks funny assignments
- setfield(discprev,"next",nil) -- also blocks funny assignments
- if pre then
- setfield(comp,"next",pre)
- setfield(pre,"prev",comp)
- end
- pre = comp
- if post then
- local tail = find_node_tail(post)
- setfield(tail,"next",discnext)
- setfield(discnext,"prev",tail)
- setfield(post,"prev",nil)
- else
- post = discnext
- end
- setfield(prev,"next",discfound)
- setfield(next,"prev",discfound)
- setfield(discfound,"next",next)
- setfield(discfound,"prev",prev)
- setfield(base,"next",nil)
- setfield(base,"prev",nil)
- setfield(base,"components",copied)
- setfield(discfound,"pre",pre)
- setfield(discfound,"post",post)
- setfield(discfound,"replace",base)
- setfield(discfound,"subtype",discretionary_code)
- base = prev -- restart
- end
- elseif discretionary_code == regular_code then
- -- local prev = getfield(base,"prev")
- -- local next = getfield(base,"next")
+ -- we assume normalization in context, and don't care about generic ... especially
+ -- \- can give problems as there we can have a negative char but that won't match
+ -- anyway
+ local pre = getfield(discfound,"pre")
+ local post = getfield(discfound,"post")
+ local replace = getfield(discfound,"replace")
+ if not replace then -- todo: signal simple hyphen
+ local prev = getprev(base)
local copied = copy_node_list(comp)
- setfield(discnext,"prev",nil) -- also blocks funny assignments
- setfield(discprev,"next",nil) -- also blocks funny assignments
- local pre, post = addhyphens(comp,comp,discnext,subtype) -- takes from components
- setfield(prev,"next",discfound)
- setfield(next,"prev",discfound)
- setfield(discfound,"next",next)
- setfield(discfound,"prev",prev)
- setfield(base,"next",nil)
- setfield(base,"prev",nil)
+ setprev(discnext,nil) -- also blocks funny assignments
+ setnext(discprev,nil) -- also blocks funny assignments
+ if pre then
+ setnext(discprev,pre)
+ setprev(pre,discprev)
+ end
+ pre = comp
+ if post then
+ local tail = find_node_tail(post)
+ setnext(tail,discnext)
+ setprev(discnext,tail)
+ setprev(post,nil)
+ else
+ post = discnext
+ end
+ setnext(prev,discfound)
+ setprev(discfound,prev)
+ setnext(discfound,next)
+ setprev(next,discfound)
+ setnext(base,nil)
+ setprev(base,nil)
setfield(base,"components",copied)
setfield(discfound,"pre",pre)
setfield(discfound,"post",post)
setfield(discfound,"replace",base)
- setfield(discfound,"subtype",discretionary_code)
- base = next -- or restart
- else
- -- forget about it in generic usage
+ setsubtype(discfound,discretionary_code)
+ base = prev -- restart
end
end
end
return head, base
end
-function handlers.gsub_single(head,start,kind,lookupname,replacement)
- if trace_singles then
- logprocess("%s: replacing %s by single %s",pref(kind,lookupname),gref(getchar(start)),gref(replacement))
+local function multiple_glyphs(head,start,multiple,ignoremarks)
+ local nofmultiples = #multiple
+ if nofmultiples > 0 then
+ resetinjection(start)
+ setchar(start,multiple[1])
+ if nofmultiples > 1 then
+ local sn = getnext(start)
+ for k=2,nofmultiples do -- todo: use insert_node
+-- untested:
+--
+-- while ignoremarks and marks[getchar(sn)] then
+-- local sn = getnext(sn)
+-- end
+ local n = copy_node(start) -- ignore components
+ resetinjection(n)
+ setchar(n,multiple[k])
+ setprev(n,start)
+ setnext(n,sn)
+ if sn then
+ setprev(sn,n)
+ end
+ setnext(start,n)
+ start = n
+ end
+ end
+ return head, start, true
+ else
+ if trace_multiples then
+ logprocess("no multiple for %s",gref(getchar(start)))
+ end
+ return head, start, false
end
- resetinjection(start)
- setfield(start,"char",replacement)
- return head, start, true
end
local function get_alternative_glyph(start,alternatives,value,trace_alternatives)
@@ -749,38 +716,15 @@ local function get_alternative_glyph(start,alternatives,value,trace_alternatives
end
end
-local function multiple_glyphs(head,start,multiple,ignoremarks)
- local nofmultiples = #multiple
- if nofmultiples > 0 then
- resetinjection(start)
- setfield(start,"char",multiple[1])
- if nofmultiples > 1 then
- local sn = getnext(start)
- for k=2,nofmultiples do -- todo: use insert_node
--- untested:
---
--- while ignoremarks and marks[getchar(sn)] then
--- local sn = getnext(sn)
--- end
- local n = copy_node(start) -- ignore components
- resetinjection(n)
- setfield(n,"char",multiple[k])
- setfield(n,"next",sn)
- setfield(n,"prev",start)
- if sn then
- setfield(sn,"prev",n)
- end
- setfield(start,"next",n)
- start = n
- end
- end
- return head, start, true
- else
- if trace_multiples then
- logprocess("no multiple for %s",gref(getchar(start)))
- end
- return head, start, false
+-- handlers
+
+function handlers.gsub_single(head,start,kind,lookupname,replacement)
+ if trace_singles then
+ logprocess("%s: replacing %s by single %s",pref(kind,lookupname),gref(getchar(start)),gref(replacement))
end
+ resetinjection(start)
+ setchar(start,replacement)
+ return head, start, true
end
function handlers.gsub_alternate(head,start,kind,lookupname,alternative,sequence)
@@ -791,7 +735,7 @@ function handlers.gsub_alternate(head,start,kind,lookupname,alternative,sequence
logprocess("%s: replacing %s by alternative %a to %s, %s",pref(kind,lookupname),gref(getchar(start)),choice,gref(choice),comment)
end
resetinjection(start)
- setfield(start,"char",choice)
+ setchar(start,choice)
else
if trace_alternatives then
logwarning("%s: no variant %a for %s, %s",pref(kind,lookupname),value,gref(getchar(start)),comment)
@@ -889,7 +833,7 @@ function handlers.gsub_ligature(head,start,kind,lookupname,ligature,sequence)
else
-- weird but happens (in some arabic font)
resetinjection(start)
- setfield(start,"char",lig)
+ setchar(start,lig)
if trace_ligatures then
logprocess("%s: replacing %s by (no real) ligature %s case 3",pref(kind,lookupname),gref(startchar),gref(lig))
end
@@ -902,19 +846,79 @@ function handlers.gsub_ligature(head,start,kind,lookupname,ligature,sequence)
return head, start, false, discfound
end
--- function is_gsub_ligature(start,ligature) -- limited case: in disc nodes, only latin, always glyphs
--- local s = getnext(start)
--- while s do
--- local lg = ligature[getchar(s)]
--- if lg then
--- ligature = lg
--- s = getnext(s)
--- else
--- return
--- end
--- end
--- return ligature and ligature.ligature
--- end
+function handlers.gpos_single(head,start,kind,lookupname,kerns,sequence,lookuphash,i,injection)
+ local startchar = getchar(start)
+ local dx, dy, w, h = setpair(start,tfmdata.parameters.factor,rlmode,sequence.flags[4],kerns,injection) -- ,characters[startchar])
+ if trace_kerns then
+ logprocess("%s: shifting single %s by (%p,%p) and correction (%p,%p)",pref(kind,lookupname),gref(startchar),dx,dy,w,h)
+ end
+ return head, start, false
+end
+
+function handlers.gpos_pair(head,start,kind,lookupname,kerns,sequence,lookuphash,i,injection)
+ -- todo: kerns in disc nodes: pre, post, replace -> loop over disc too
+ -- todo: kerns in components of ligatures
+ local snext = getnext(start)
+ if not snext then
+ return head, start, false
+ else
+ local prev = start
+ local done = false
+ local factor = tfmdata.parameters.factor
+ local lookuptype = lookuptypes[lookupname]
+ while snext and getid(snext) == glyph_code and getfont(snext) == currentfont and getsubtype(snext)<256 do
+ local nextchar = getchar(snext)
+ local krn = kerns[nextchar]
+ if not krn and marks[nextchar] then
+ prev = snext
+ snext = getnext(snext)
+ else
+ if not krn then
+ -- skip
+ elseif type(krn) == "table" then
+ if lookuptype == "pair" then -- probably not needed
+ local a, b = krn[2], krn[3]
+ if a and #a > 0 then
+ local x, y, w, h = setpair(start,factor,rlmode,sequence.flags[4],a,injection) -- characters[startchar])
+ if trace_kerns then
+ local startchar = getchar(start)
+ logprocess("%s: shifting first of pair %s and %s by (%p,%p) and correction (%p,%p)",pref(kind,lookupname),gref(startchar),gref(nextchar),x,y,w,h)
+ end
+ end
+ if b and #b > 0 then
+ local x, y, w, h = setpair(snext,factor,rlmode,sequence.flags[4],b,injection) -- characters[nextchar])
+ if trace_kerns then
+ local startchar = getchar(start)
+ logprocess("%s: shifting second of pair %s and %s by (%p,%p) and correction (%p,%p)",pref(kind,lookupname),gref(startchar),gref(nextchar),x,y,w,h)
+ end
+ end
+ else -- wrong ... position has different entries
+ report_process("%s: check this out (old kern stuff)",pref(kind,lookupname))
+ -- local a, b = krn[2], krn[6]
+ -- if a and a ~= 0 then
+ -- local k = setkern(snext,factor,rlmode,a)
+ -- if trace_kerns then
+ -- logprocess("%s: inserting first kern %s between %s and %s",pref(kind,lookupname),k,gref(getchar(prev)),gref(nextchar))
+ -- end
+ -- end
+ -- if b and b ~= 0 then
+ -- logwarning("%s: ignoring second kern xoff %s",pref(kind,lookupname),b*factor)
+ -- end
+ end
+ done = true
+ elseif krn ~= 0 then
+ local k = setkern(snext,factor,rlmode,krn,injection)
+ if trace_kerns then
+ logprocess("%s: inserting kern %s between %s and %s",pref(kind,lookupname),k,gref(getchar(prev)),gref(nextchar)) -- prev?
+ end
+ done = true
+ end
+ break
+ end
+ end
+ return head, start, done
+ end
+end
--[[ldx--
<p>We get hits on a mark, but we're not sure if the it has to be applied so
@@ -1078,7 +1082,7 @@ function handlers.gpos_mark2mark(head,start,kind,lookupname,markanchors,sequence
if al[anchor] then
local ma = markanchors[anchor]
if ma then
- local dx, dy, bound = setmark(start,base,tfmdata.parameters.factor,rlmode,ba,ma,characters[basechar])
+ local dx, dy, bound = setmark(start,base,tfmdata.parameters.factor,rlmode,ba,ma,characters[basechar],true)
if trace_marks then
logprocess("%s, anchor %s, bound %s: anchoring mark %s to basemark %s => (%p,%p)",
pref(kind,lookupname),anchor,bound,gref(markchar),gref(basechar),dx,dy)
@@ -1161,85 +1165,11 @@ function handlers.gpos_cursive(head,start,kind,lookupname,exitanchors,sequence)
end
end
-function handlers.gpos_single(head,start,kind,lookupname,kerns,sequence,injection)
- local startchar = getchar(start)
- local dx, dy, w, h = setpair(start,tfmdata.parameters.factor,rlmode,sequence.flags[4],kerns,injection) -- ,characters[startchar])
- if trace_kerns then
- logprocess("%s: shifting single %s by (%p,%p) and correction (%p,%p)",pref(kind,lookupname),gref(startchar),dx,dy,w,h)
- end
- return head, start, false
-end
-
-function handlers.gpos_pair(head,start,kind,lookupname,kerns,sequence,lookuphash,i,injection)
- -- todo: kerns in disc nodes: pre, post, replace -> loop over disc too
- -- todo: kerns in components of ligatures
- local snext = getnext(start)
- if not snext then
- return head, start, false
- else
- local prev, done = start, false
- local factor = tfmdata.parameters.factor
- local lookuptype = lookuptypes[lookupname]
- while snext and getid(snext) == glyph_code and getfont(snext) == currentfont and getsubtype(snext)<256 do
- local nextchar = getchar(snext)
- local krn = kerns[nextchar]
- if not krn and marks[nextchar] then
- prev = snext
- snext = getnext(snext)
- else
- if not krn then
- -- skip
- elseif type(krn) == "table" then
- if lookuptype == "pair" then -- probably not needed
- local a, b = krn[2], krn[3]
- if a and #a > 0 then
- local startchar = getchar(start)
- local x, y, w, h = setpair(start,factor,rlmode,sequence.flags[4],a,injection) -- characters[startchar])
- if trace_kerns then
- logprocess("%s: shifting first of pair %s and %s by (%p,%p) and correction (%p,%p)",pref(kind,lookupname),gref(startchar),gref(nextchar),x,y,w,h)
- end
- end
- if b and #b > 0 then
- local startchar = getchar(start)
- local x, y, w, h = setpair(snext,factor,rlmode,sequence.flags[4],b,injection) -- characters[nextchar])
- if trace_kerns then
- logprocess("%s: shifting second of pair %s and %s by (%p,%p) and correction (%p,%p)",pref(kind,lookupname),gref(startchar),gref(nextchar),x,y,w,h)
- end
- end
- else -- wrong ... position has different entries
- report_process("%s: check this out (old kern stuff)",pref(kind,lookupname))
- -- local a, b = krn[2], krn[6]
- -- if a and a ~= 0 then
- -- local k = setkern(snext,factor,rlmode,a)
- -- if trace_kerns then
- -- logprocess("%s: inserting first kern %s between %s and %s",pref(kind,lookupname),k,gref(getchar(prev)),gref(nextchar))
- -- end
- -- end
- -- if b and b ~= 0 then
- -- logwarning("%s: ignoring second kern xoff %s",pref(kind,lookupname),b*factor)
- -- end
- end
- done = true
- elseif krn ~= 0 then
- local k = setkern(snext,factor,rlmode,krn,injection)
- if trace_kerns then
- logprocess("%s: inserting kern %s between %s and %s",pref(kind,lookupname),k,gref(getchar(prev)),gref(nextchar))
- end
- done = true
- end
- break
- end
- end
- return head, start, done
- end
-end
-
--[[ldx--
<p>I will implement multiple chain replacements once I run into a font that uses
it. It's not that complex to handle.</p>
--ldx]]--
-local chainmores = { }
local chainprocs = { }
local function logprocess(...)
@@ -1268,11 +1198,6 @@ function chainprocs.chainsub(head,start,stop,kind,chainname,currentcontext,looku
return head, start, false
end
-function chainmores.chainsub(head,start,stop,kind,chainname,currentcontext,lookuphash,lookuplist,chainlookupname,n)
- logprocess("%s: a direct call to chainsub cannot happen",cref(kind,chainname,chainlookupname))
- return head, start, false
-end
-
-- The reversesub is a special case, which is why we need to store the replacements
-- in a bit weird way. There is no lookup and the replacement comes from the lookup
-- itself. It is meant mostly for dealing with Urdu.
@@ -1285,7 +1210,7 @@ function chainprocs.reversesub(head,start,stop,kind,chainname,currentcontext,loo
logprocess("%s: single reverse replacement of %s by %s",cref(kind,chainname),gref(char),gref(replacement))
end
resetinjection(start)
- setfield(start,"char",replacement)
+ setchar(start,replacement)
return head, start, true
else
return head, start, false
@@ -1316,7 +1241,7 @@ as less as needed but that would also make the code even more messy.</p>
-- repeat -- start x x m x x stop => start m
-- local next = getnext(start)
-- if not marks[getchar(next)] then
--- local components = getfield(next,"components")
+-- local components = getnext(next,"components")
-- if components then -- probably not needed
-- flush_node_list(components)
-- end
@@ -1369,83 +1294,7 @@ function chainprocs.gsub_single(head,start,stop,kind,chainname,currentcontext,lo
logprocess("%s: replacing single %s by %s",cref(kind,chainname,chainlookupname,lookupname,chainindex),gref(currentchar),gref(replacement))
end
resetinjection(current)
- if check_discretionaries then
- -- some fonts use a chain lookup to replace e.g. an f in a fi ligature
- -- and there can be a disc node in between ... the next code tries to catch
- -- this
- local next = getnext(current)
- local prev = getprev(current) -- todo: just remember it above
- local done = false
- if next then
- if getid(next) == disc_code then
- local subtype = getsubtype(next)
- if subtype == discretionary_code then
- setfield(next,"prev",prev)
- setfield(prev,"next",next)
- setfield(current,"prev",nil)
- setfield(current,"next",nil)
- local replace = getfield(next,"replace")
- local pre = getfield(next,"pre")
- local new = copy_node(current)
- setfield(new,"char",replacement)
- if replace then
- setfield(new,"next",replace)
- setfield(replace,"prev",new)
- end
- if pre then
- setfield(current,"next",pre)
- setfield(pre,"prev",current)
- end
- setfield(next,"replace",new) -- also updates tail
- setfield(next,"pre",current) -- also updates tail
- end
- start = next
- done = true
- local next = getnext(start)
- if next and getid(next) == disc_code then
- collapse_disc(start,next)
- end
- end
- end
- if not done and prev then
- if getid(prev) == disc_code then
- local subtype = getsubtype(prev)
- if subtype == discretionary_code then
- setfield(next,"prev",prev)
- setfield(prev,"next",next)
- setfield(current,"prev",nil)
- setfield(current,"next",nil)
- local replace = getfield(prev,"replace")
- local post = getfield(prev,"post")
- local new = copy_node(current)
- setfield(new,"char",replacement)
- if replace then
- local tail = find_node_tail(replace)
- setfield(tail,"next",new)
- setfield(new,"prev",tail)
- else
- replace = new
- end
- if post then
- local tail = find_node_tail(post)
- setfield(tail,"next",current)
- setfield(current,"prev",tail)
- else
- post = current
- end
- setfield(prev,"replace",replace) -- also updates tail
- setfield(prev,"post",post) -- also updates tail
- start = prev
- done = true
- end
- end
- end
- if not done then
- setfield(current,"char",replacement)
- end
- else
- setfield(current,"char",replacement)
- end
+ setchar(current,replacement)
end
end
return head, start, true
@@ -1458,8 +1307,6 @@ function chainprocs.gsub_single(head,start,stop,kind,chainname,currentcontext,lo
return head, start, false
end
-chainmores.gsub_single = chainprocs.gsub_single
-
--[[ldx--
<p>Here we replace start by a sequence of new glyphs.</p>
--ldx]]--
@@ -1490,8 +1337,6 @@ function chainprocs.gsub_multiple(head,start,stop,kind,chainname,currentcontext,
return head, start, false
end
-chainmores.gsub_multiple = chainprocs.gsub_multiple
-
--[[ldx--
<p>Here we replace start by new glyph. First we delete the rest of the match.</p>
--ldx]]--
@@ -1526,7 +1371,7 @@ function chainprocs.gsub_alternate(head,start,stop,kind,chainname,currentcontext
logprocess("%s: replacing %s by alternative %a to %s, %s",cref(kind,chainname,chainlookupname,lookupname),gref(char),choice,gref(choice),comment)
end
resetinjection(start)
- setfield(start,"char",choice)
+ setchar(start,choice)
else
if trace_alternatives then
logwarning("%s: no variant %a for %s, %s",cref(kind,chainname,chainlookupname,lookupname),value,gref(char),comment)
@@ -1546,8 +1391,6 @@ function chainprocs.gsub_alternate(head,start,stop,kind,chainname,currentcontext
return head, start, false
end
-chainmores.gsub_alternate = chainprocs.gsub_alternate
-
--[[ldx--
<p>When we replace ligatures we use a helper that handles the marks. I might change
this function (move code inline and handle the marks by a separate function). We
@@ -1573,7 +1416,7 @@ function chainprocs.gsub_ligature(head,start,stop,kind,chainname,currentcontext,
local s = getnext(start)
local discfound = false
local last = stop
- local nofreplacements = 0
+ local nofreplacements = 1
local skipmark = currentlookup.flags[1]
while s do
local id = getid(s)
@@ -1589,11 +1432,7 @@ function chainprocs.gsub_ligature(head,start,stop,kind,chainname,currentcontext,
else
local schar = getchar(s)
if skipmark and marks[schar] then -- marks
--- if s == stop then -- maybe add this
--- break
--- else
s = getnext(s)
--- end
else
local lg = ligatures[schar]
if lg then
@@ -1635,7 +1474,93 @@ function chainprocs.gsub_ligature(head,start,stop,kind,chainname,currentcontext,
return head, start, false, 0, false
end
-chainmores.gsub_ligature = chainprocs.gsub_ligature
+function chainprocs.gpos_single(head,start,stop,kind,chainname,currentcontext,lookuphash,currentlookup,chainlookupname,chainindex,sequence)
+ -- untested .. needs checking for the new model
+ local startchar = getchar(start)
+ local subtables = currentlookup.subtables
+ local lookupname = subtables[1]
+ local kerns = lookuphash[lookupname]
+ if kerns then
+ kerns = kerns[startchar] -- needed ?
+ if kerns then
+ local dx, dy, w, h = setpair(start,tfmdata.parameters.factor,rlmode,sequence.flags[4],kerns) -- ,characters[startchar])
+ if trace_kerns then
+ logprocess("%s: shifting single %s by (%p,%p) and correction (%p,%p)",cref(kind,chainname,chainlookupname),gref(startchar),dx,dy,w,h)
+ end
+ end
+ end
+ return head, start, false
+end
+
+function chainprocs.gpos_pair(head,start,stop,kind,chainname,currentcontext,lookuphash,currentlookup,chainlookupname,chainindex,sequence)
+ local snext = getnext(start)
+ if snext then
+ local startchar = getchar(start)
+ local subtables = currentlookup.subtables
+ local lookupname = subtables[1]
+ local kerns = lookuphash[lookupname]
+ if kerns then
+ kerns = kerns[startchar]
+ if kerns then
+ local lookuptype = lookuptypes[lookupname]
+ local prev, done = start, false
+ local factor = tfmdata.parameters.factor
+ while snext and getid(snext) == glyph_code and getfont(snext) == currentfont and getsubtype(snext)<256 do
+ local nextchar = getchar(snext)
+ local krn = kerns[nextchar]
+ if not krn and marks[nextchar] then
+ prev = snext
+ snext = getnext(snext)
+ else
+ if not krn then
+ -- skip
+ elseif type(krn) == "table" then
+ if lookuptype == "pair" then
+ local a, b = krn[2], krn[3]
+ if a and #a > 0 then
+ local startchar = getchar(start)
+ local x, y, w, h = setpair(start,factor,rlmode,sequence.flags[4],a) -- ,characters[startchar])
+ if trace_kerns then
+ logprocess("%s: shifting first of pair %s and %s by (%p,%p) and correction (%p,%p)",cref(kind,chainname,chainlookupname),gref(startchar),gref(nextchar),x,y,w,h)
+ end
+ end
+ if b and #b > 0 then
+ local startchar = getchar(start)
+ local x, y, w, h = setpair(snext,factor,rlmode,sequence.flags[4],b) -- ,characters[nextchar])
+ if trace_kerns then
+ logprocess("%s: shifting second of pair %s and %s by (%p,%p) and correction (%p,%p)",cref(kind,chainname,chainlookupname),gref(startchar),gref(nextchar),x,y,w,h)
+ end
+ end
+ else
+ report_process("%s: check this out (old kern stuff)",cref(kind,chainname,chainlookupname))
+ -- local a, b = krn[2], krn[6]
+ -- if a and a ~= 0 then
+ -- local k = setkern(snext,factor,rlmode,a)
+ -- if trace_kerns then
+ -- logprocess("%s: inserting first kern %s between %s and %s",cref(kind,chainname,chainlookupname),k,gref(getchar(prev)),gref(nextchar))
+ -- end
+ -- end
+ -- if b and b ~= 0 then
+ -- logwarning("%s: ignoring second kern xoff %s",cref(kind,chainname,chainlookupname),b*factor)
+ -- end
+ end
+ done = true
+ elseif krn ~= 0 then
+ local k = setkern(snext,factor,rlmode,krn)
+ if trace_kerns then
+ logprocess("%s: inserting kern %s between %s and %s",cref(kind,chainname,chainlookupname),k,gref(getchar(prev)),gref(nextchar))
+ end
+ done = true
+ end
+ break
+ end
+ end
+ return head, start, done
+ end
+ end
+ end
+ return head, start, false
+end
function chainprocs.gpos_mark2base(head,start,stop,kind,chainname,currentcontext,lookuphash,currentlookup,chainlookupname)
local markchar = getchar(start)
@@ -1804,7 +1729,7 @@ function chainprocs.gpos_mark2mark(head,start,stop,kind,chainname,currentcontext
if al[anchor] then
local ma = markanchors[anchor]
if ma then
- local dx, dy, bound = setmark(start,base,tfmdata.parameters.factor,rlmode,ba,ma,characters[basechar])
+ local dx, dy, bound = setmark(start,base,tfmdata.parameters.factor,rlmode,ba,ma,characters[basechar],true)
if trace_marks then
logprocess("%s, anchor %s, bound %s: anchoring mark %s to basemark %s => (%p,%p)",
cref(kind,chainname,chainlookupname,lookupname),anchor,bound,gref(markchar),gref(basechar),dx,dy)
@@ -1895,127 +1820,348 @@ function chainprocs.gpos_cursive(head,start,stop,kind,chainname,currentcontext,l
return head, start, false
end
-function chainprocs.gpos_single(head,start,stop,kind,chainname,currentcontext,lookuphash,currentlookup,chainlookupname,chainindex,sequence)
- -- untested .. needs checking for the new model
- local startchar = getchar(start)
- local subtables = currentlookup.subtables
- local lookupname = subtables[1]
- local kerns = lookuphash[lookupname]
- if kerns then
- kerns = kerns[startchar] -- needed ?
- if kerns then
- local dx, dy, w, h = setpair(start,tfmdata.parameters.factor,rlmode,sequence.flags[4],kerns) -- ,characters[startchar])
- if trace_kerns then
- logprocess("%s: shifting single %s by (%p,%p) and correction (%p,%p)",cref(kind,chainname,chainlookupname),gref(startchar),dx,dy,w,h)
+-- what pointer to return, spec says stop
+-- to be discussed ... is bidi changer a space?
+-- elseif char == zwnj and sequence[n][32] then -- brrr
+
+-- somehow l or f is global
+-- we don't need to pass the currentcontext, saves a bit
+-- make a slow variant then can be activated but with more tracing
+
+local function show_skip(kind,chainname,char,ck,class)
+ if ck[9] then
+ logwarning("%s: skipping char %s, class %a, rule %a, lookuptype %a, %a => %a",cref(kind,chainname),gref(char),class,ck[1],ck[2],ck[9],ck[10])
+ else
+ logwarning("%s: skipping char %s, class %a, rule %a, lookuptype %a",cref(kind,chainname),gref(char),class,ck[1],ck[2])
+ end
+end
+
+-- A previous version had disc collapsing code in the (single sub) handler plus some
+-- checking in the main loop, but that left the pre/post sequences undone. The best
+-- solution is to add some checking there and backtrack when a replace/post matches
+-- but it takes a bit of work to figure out an efficient way (this is what the sweep*
+-- names refer to). I might look into that variant one day again as it can replace
+-- some other code too. In that approach we can have a special version for gub and pos
+-- which gains some speed. This method does the test and passes info to the handlers
+-- (sweepnode, sweepmode, sweepprev, sweepnext, etc). Here collapsing is handled in the
+-- main loop which also makes code elsewhere simpler (i.e. no need for the other special
+-- runners and disc code in ligature building). I also experimented with pushing preceding
+-- glyphs sequences in the replace/pre fields beforehand which saves checking afterwards
+-- but at the cost of duplicate glyphs (memory) but it's too much overhead (runtime).
+--
+-- In the meantime Kai had moved the code from the single chain into a more general handler
+-- and this one (renamed to chaindisk) is used now. I optimized the code a bit and brought
+-- it in sycn with the other code. Hopefully I didn't introduce errors. Note: this somewhat
+-- complex approach is meant for fonts that implement (for instance) ligatures by character
+-- replacement which to some extend is not that suitable for hyphenation. I also use some
+-- helpers. This method passes some states but reparses the list. There is room for a bit of
+-- speed up but that will be done in the context version. (In fact a partial rewrite of all
+-- code can bring some more efficientry.)
+--
+-- I didn't test it with extremes but successive disc nodes still can give issues but in
+-- order to handle that we need more complex code which also slows down even more. The main
+-- loop variant could deal with that: test, collapse, backtrack.
+
+local function chaindisk(head,start,last,kind,chainname,ck,lookuphash,chainlookup,chainlookupname,chainindex,sequence,chainproc)
+
+ if not start then
+ return head, start, false
+ end
+
+ local startishead = start == head
+ local seq = ck[3]
+ local f = ck[4]
+ local l = ck[5]
+ local s = #seq
+ local done = false
+ local sweepnode = sweepnode
+ local sweeptype = sweeptype
+ local sweepoverflow = false
+ local checkdisc = getprev(head) -- hm bad name head
+ local keepdisc = not sweepnode
+ local lookaheaddisc = nil
+ local backtrackdisc = nil
+ local current = start
+ local last = start
+ local prev = getprev(start)
+
+ -- fishy: so we can overflow and then go on in the sweep?
+
+ local i = f
+ while i <= l do
+ local id = getid(current)
+ if id == glyph_code then
+ i = i + 1
+ last = current
+ current = getnext(current)
+ elseif id == disc_code then
+ if keepdisc then
+ keepdisc = false
+ if notmatchpre[current] ~= notmatchreplace[current] then
+ lookaheaddisc = current
+ end
+ local replace = getfield(current,"replace")
+ while replace and i <= l do
+ if getid(replace) == glyph_code then
+ i = i + 1
+ end
+ replace = getnext(replace)
+ end
+ last = current
+ current = getnext(c)
+ else
+ head, current = flattendisk(head,current)
+ end
+ else
+ last = current
+ current = getnext(current)
+ end
+ if current then
+ -- go on
+ elseif sweepoverflow then
+ -- we already are folling up on sweepnode
+ break
+ elseif sweeptype == "post" or sweeptype == "replace" then
+ current = getnext(sweepnode)
+ if current then
+ sweeptype = nil
+ sweepoverflow = true
+ else
+ break
end
+ else
+ break -- added
end
end
- return head, start, false
-end
-chainmores.gpos_single = chainprocs.gpos_single -- okay?
+ if sweepoverflow then
+ local prev = current and getprev(current)
+ if not current or prev ~= sweepnode then
+ local head = getnext(sweepnode)
+ local tail = nil
+ if prev then
+ tail = prev
+ setprev(current,sweepnode)
+ else
+ tail = find_node_tail(head)
+ end
+ setnext(sweepnode,current)
+ setprev(head,nil)
+ setnext(tail,nil)
+ appenddisc(sweepnode,head)
+ end
+ end
--- when machines become faster i will make a shared function
+ if l < s then
+ local i = l
+ local t = sweeptype == "post" or sweeptype == "replace"
+ while current and i < s do
+ local id = getid(current)
+ if id == glyph_code then
+ i = i + 1
+ current = getnext(current)
+ elseif id == disc_code then
+ if keepdisc then
+ keepdisc = false
+ if notmatchpre[current] ~= notmatchreplace[current] then
+ lookaheaddisc = current
+ end
+ local replace = getfield(c,"replace")
+ while replace and i < s do
+ if getid(replace) == glyph_code then
+ i = i + 1
+ end
+ replace = getnext(replace)
+ end
+ current = getnext(current)
+ elseif notmatchpre[current] ~= notmatchreplace[current] then
+ head, current = flattendisk(head,current)
+ else
+ current = getnext(current) -- HH
+ end
+ else
+ current = getnext(current)
+ end
+ if not current and t then
+ current = getnext(sweepnode)
+ if current then
+ sweeptype = nil
+ end
+ end
+ end
+ end
-function chainprocs.gpos_pair(head,start,stop,kind,chainname,currentcontext,lookuphash,currentlookup,chainlookupname,chainindex,sequence)
- local snext = getnext(start)
- if snext then
- local startchar = getchar(start)
- local subtables = currentlookup.subtables
- local lookupname = subtables[1]
- local kerns = lookuphash[lookupname]
- if kerns then
- kerns = kerns[startchar]
- if kerns then
- local lookuptype = lookuptypes[lookupname]
- local prev, done = start, false
- local factor = tfmdata.parameters.factor
- while snext and getid(snext) == glyph_code and getfont(snext) == currentfont and getsubtype(snext)<256 do
- local nextchar = getchar(snext)
- local krn = kerns[nextchar]
- if not krn and marks[nextchar] then
- prev = snext
- snext = getnext(snext)
- else
- if not krn then
- -- skip
- elseif type(krn) == "table" then
- if lookuptype == "pair" then
- local a, b = krn[2], krn[3]
- if a and #a > 0 then
- local startchar = getchar(start)
- local x, y, w, h = setpair(start,factor,rlmode,sequence.flags[4],a) -- ,characters[startchar])
- if trace_kerns then
- logprocess("%s: shifting first of pair %s and %s by (%p,%p) and correction (%p,%p)",cref(kind,chainname,chainlookupname),gref(startchar),gref(nextchar),x,y,w,h)
- end
- end
- if b and #b > 0 then
- local startchar = getchar(start)
- local x, y, w, h = setpair(snext,factor,rlmode,sequence.flags[4],b) -- ,characters[nextchar])
- if trace_kerns then
- logprocess("%s: shifting second of pair %s and %s by (%p,%p) and correction (%p,%p)",cref(kind,chainname,chainlookupname),gref(startchar),gref(nextchar),x,y,w,h)
- end
- end
- else
- report_process("%s: check this out (old kern stuff)",cref(kind,chainname,chainlookupname))
- local a, b = krn[2], krn[6]
- if a and a ~= 0 then
- local k = setkern(snext,factor,rlmode,a)
- if trace_kerns then
- logprocess("%s: inserting first kern %s between %s and %s",cref(kind,chainname,chainlookupname),k,gref(getchar(prev)),gref(nextchar))
- end
- end
- if b and b ~= 0 then
- logwarning("%s: ignoring second kern xoff %s",cref(kind,chainname,chainlookupname),b*factor)
- end
- end
- done = true
- elseif krn ~= 0 then
- local k = setkern(snext,factor,rlmode,krn)
- if trace_kerns then
- logprocess("%s: inserting kern %s between %s and %s",cref(kind,chainname,chainlookupname),k,gref(getchar(prev)),gref(nextchar))
- end
- done = true
+ if f > 1 then
+ local current = prev
+ local i = f
+ local t = sweeptype == "pre" or sweeptype == "replace"
+ if not current and t and current == checkdisk then
+ current = getprev(sweepnode)
+ end
+ while current and i > 1 do -- missing getprev added / moved outside
+ local id = getid(current)
+ if id == glyph_code then
+ i = i - 1
+ elseif id == disc_code then
+ if keepdisc then
+ keepdisc = false
+ if notmatchpost[current] ~= notmatchreplace[current] then
+ backtrackdisc = current
+ end
+ local replace = getfield(current,"replace")
+ while replace and i > 1 do
+ if getid(replace) == glyph_code then
+ i = i - 1
end
- break
+ replace = getnext(replace)
end
+ elseif notmatchpost[current] ~= notmatchreplace[current] then
+ head, current = flattendisk(head,current)
end
- return head, start, done
+ end
+ current = getprev(current)
+ if t and current == checkdisk then
+ current = getprev(sweepnode)
end
end
end
- return head, start, false
-end
-chainmores.gpos_pair = chainprocs.gpos_pair -- okay?
+ local ok = false
+ if lookaheaddisc then
--- what pointer to return, spec says stop
--- to be discussed ... is bidi changer a space?
--- elseif char == zwnj and sequence[n][32] then -- brrr
+ local cf = start
+ local cl = getprev(lookaheaddisc)
+ local cprev = getprev(start)
+ local insertedmarks = 0
--- somehow l or f is global
--- we don't need to pass the currentcontext, saves a bit
--- make a slow variant then can be activated but with more tracing
+ while cprev and getid(cf) == glyph_code and getfont(cf) == currentfont and getsubtype(cf) < 256 and marks[getchar(cf)] do
+ insertedmarks = insertedmarks + 1
+ cf = cprev
+ startishead = cf == head
+ cprev = getprev(cprev)
+ end
+
+ setprev(lookaheaddisc,cprev)
+ if cprev then
+ setnext(cprev,lookaheaddisc)
+ end
+ setprev(cf,nil)
+ setnext(cl,nil)
+ if startishead then
+ head = lookaheaddisc
+ end
+
+ local replace = getfield(lookaheaddisc,"replace")
+ local pre = getfield(lookaheaddisc,"pre")
+ local new = copy_node_list(cf)
+ local cnew = new
+ for i=1,insertedmarks do
+ cnew = getnext(cnew)
+ end
+ local clast = cnew
+ for i=f,l do
+ clast = getnext(clast)
+ end
+ if not notmatchpre[lookaheaddisc] then
+ cf, start, ok = chainproc(cf,start,last,kind,chainname,ck,lookuphash,chainlookup,chainlookupname,nil,sequence)
+ end
+ if not notmatchreplace[lookaheaddisc] then
+ new, cnew, ok = chainproc(new,cnew,clast,kind,chainname,ck,lookuphash,chainlookup,chainlookupname,nil,sequence)
+ end
+ if pre then
+ setnext(cl,pre)
+ setprev(pre,cl)
+ end
+ if replace then
+ local tail = find_node_tail(new)
+ setnext(tail,replace)
+ setprev(replace,tail)
+ end
+ setfield(lookaheaddisc,"pre",cf) -- also updates tail
+ setfield(lookaheaddisc,"replace",new) -- also updates tail
+
+ start = getprev(lookaheaddisc)
+ sweephead[cf] = getnext(clast)
+ sweephead[new] = getnext(last)
+
+ elseif backtrackdisc then
+
+ local cf = getnext(backtrackdisc)
+ local cl = start
+ local cnext = getnext(start)
+ local insertedmarks = 0
+
+ while cnext and getid(cnext) == glyph_code and getfont(cnext) == currentfont and getsubtype(cnext) < 256 and marks[getchar(cnext)] do
+ insertedmarks = insertedmarks + 1
+ cl = cnext
+ cnext = getnext(cnext)
+ end
+ if cnext then
+ setprev(cnext,backtrackdisc)
+ end
+ setnext(backtrackdisc,cnext)
+ setprev(cf,nil)
+ setnext(cl,nil)
+ local replace = getfield(backtrackdisc,"replace")
+ local post = getfield(backtrackdisc,"post")
+ local new = copy_node_list(cf)
+ local cnew = find_node_tail(new)
+ for i=1,insertedmarks do
+ cnew = getprev(cnew)
+ end
+ local clast = cnew
+ for i=f,l do
+ clast = getnext(clast)
+ end
+ if not notmatchpost[backtrackdisc] then
+ cf, start, ok = chainproc(cf,start,last,kind,chainname,ck,lookuphash,chainlookup,chainlookupname,nil,sequence)
+ end
+ if not notmatchreplace[backtrackdisc] then
+ new, cnew, ok = chainproc(new,cnew,clast,kind,chainname,ck,lookuphash,chainlookup,chainlookupname,nil,sequence)
+ end
+ if post then
+ local tail = find_node_tail(post)
+ setnext(tail,cf)
+ setprev(cf,tail)
+ else
+ post = cf
+ end
+ if replace then
+ local tail = find_node_tail(replace)
+ setnext(tail,new)
+ setprev(new,tail)
+ else
+ replace = new
+ end
+ setfield(backtrackdisc,"post",post) -- also updates tail
+ setfield(backtrackdisc,"replace",replace) -- also updates tail
+ start = getprev(backtrackdisc)
+ sweephead[post] = getnext(clast)
+ sweephead[replace] = getnext(last)
-local function show_skip(kind,chainname,char,ck,class)
- if ck[9] then
- logwarning("%s: skipping char %s, class %a, rule %a, lookuptype %a, %a => %a",cref(kind,chainname),gref(char),class,ck[1],ck[2],ck[9],ck[10])
else
- logwarning("%s: skipping char %s, class %a, rule %a, lookuptype %a",cref(kind,chainname),gref(char),class,ck[1],ck[2])
+
+ head, start, ok = chainproc(head,start,last,kind,chainname,ck,lookuphash,chainlookup,chainlookupname,nil,sequence)
+
end
+
+ return head, start, ok
end
local function normal_handle_contextchain(head,start,kind,chainname,contexts,sequence,lookuphash)
- -- local rule, lookuptype, sequence, f, l, lookups = ck[1], ck[2] ,ck[3], ck[4], ck[5], ck[6]
+ local sweepnode = sweepnode
+ local sweeptype = sweeptype
+ local diskseen = false
+ local checkdisc = getprev(head)
local flags = sequence.flags
local done = false
local skipmark = flags[1]
local skipligature = flags[2]
local skipbase = flags[3]
- local someskip = skipmark or skipligature or skipbase -- could be stored in flags for a fast test (hm, flags could be false !)
- local markclass = sequence.markclass -- todo, first we need a proper test
+ local markclass = sequence.markclass
local skipped = false
- for k=1,#contexts do
+
+ for k=1,#contexts do -- i've only seen ccmp having > 1 (e.g. dejavu)
local match = true
local current = start
local last = start
@@ -2029,7 +2175,8 @@ local function normal_handle_contextchain(head,start,kind,chainname,contexts,seq
else
-- maybe we need a better space check (maybe check for glue or category or combination)
-- we cannot optimize for n=2 because there can be disc nodes
- local f, l = ck[4], ck[5]
+ local f = ck[4]
+ local l = ck[5]
-- current match
if f == 1 and f == l then -- current only
-- already a hit
@@ -2039,9 +2186,14 @@ local function normal_handle_contextchain(head,start,kind,chainname,contexts,seq
if f == l then -- new, else last out of sync (f is > 1)
-- match = true
else
+ local discfound = nil
local n = f + 1
last = getnext(last)
while n <= l do
+ if not last and (sweeptype == "post" or sweeptype == "replace") then
+ last = getnext(sweepnode)
+ sweeptype = nil
+ end
if last then
local id = getid(last)
if id == glyph_code then
@@ -2049,7 +2201,7 @@ local function normal_handle_contextchain(head,start,kind,chainname,contexts,seq
local char = getchar(last)
local ccd = descriptions[char]
if ccd then
- local class = ccd.class
+ local class = ccd.class or "base"
if class == skipmark or class == skipligature or class == skipbase or (markclass and class == "mark" and not markclass[char]) then
skipped = true
if trace_skips then
@@ -2062,48 +2214,78 @@ local function normal_handle_contextchain(head,start,kind,chainname,contexts,seq
end
n = n + 1
else
- match = false
+ if discfound then
+ notmatchreplace[discfound] = true
+ match = not notmatchpre[discfound]
+ else
+ match = false
+ end
break
end
else
- match = false
+ if discfound then
+ notmatchreplace[discfound] = true
+ match = not notmatchpre[discfound]
+ else
+ match = false
+ end
break
end
else
- match = false
+ if discfound then
+ notmatchreplace[discfound] = true
+ match = not notmatchpre[discfound]
+ else
+ match = false
+ end
break
end
elseif id == disc_code then
- if check_discretionaries then
- local replace = getfield(last,"replace")
- if replace then
- -- so far we never entered this branch
- while replace do
- if seq[n][getchar(replace)] then
- n = n + 1
- replace = getnext(replace)
- if not replace then
- break
- elseif n > l then
- -- match = false
- break
- end
- else
- match = false
+ diskseen = true
+ discfound = last
+ notmatchpre[last] = nil
+ notmatchpost[last] = true
+ notmatchreplace[last] = nil
+ local pre = getfield(last,"pre")
+ local replace = getfield(last,"replace")
+ if pre then
+ local n = n
+ while pre do
+ if seq[n][getchar(pre)] then
+ n = n + 1
+ pre = getnext(pre)
+ if n > l then
break
end
- end
- if not match then
+ else
+ notmatchpre[last] = true
break
- elseif check_discretionaries == "trace" then
- report_chain("check disc action in current")
end
- else
- last = getnext(last) -- no skipping here
+ end
+ if n <= l then
+ notmatchpre[last] = true
end
else
- last = getnext(last) -- no skipping here
+ notmatchpre[last] = true
end
+ if replace then
+ -- so far we never entered this branch
+ while replace do
+ if seq[n][getchar(replace)] then
+ n = n + 1
+ replace = getnext(replace)
+ if n > l then
+ break
+ end
+ else
+ notmatchreplace[last] = true
+ match = not notmatchpre[last]
+ break
+ end
+ end
+ match = not notmatchpre[last]
+ end
+ last = getnext(last)
else
match = false
break
@@ -2119,82 +2301,137 @@ local function normal_handle_contextchain(head,start,kind,chainname,contexts,seq
if match and f > 1 then
local prev = getprev(start)
if prev then
- local n = f-1
- while n >= 1 do
- if prev then
- local id = getid(prev)
- if id == glyph_code then
- if getfont(prev) == currentfont and getsubtype(prev)<256 then -- normal char
- local char = getchar(prev)
- local ccd = descriptions[char]
- if ccd then
- local class = ccd.class
- if class == skipmark or class == skipligature or class == skipbase or (markclass and class == "mark" and not markclass[char]) then
- skipped = true
- if trace_skips then
- show_skip(kind,chainname,char,ck,class)
+ if prev == checkdisc and (sweeptype == "pre" or sweeptype == "replace") then
+ prev = getprev(sweepnode)
+ -- sweeptype = nil
+ end
+ if prev then
+ local discfound = nil
+ local n = f - 1
+ while n >= 1 do
+ if prev then
+ local id = getid(prev)
+ if id == glyph_code then
+ if getfont(prev) == currentfont and getsubtype(prev)<256 then -- normal char
+ local char = getchar(prev)
+ local ccd = descriptions[char]
+ if ccd then
+ local class = ccd.class
+ if class == skipmark or class == skipligature or class == skipbase or (markclass and class == "mark" and not markclass[char]) then
+ skipped = true
+ if trace_skips then
+ show_skip(kind,chainname,char,ck,class)
+ end
+ elseif seq[n][char] then
+ n = n -1
+ else
+ if discfound then
+ notmatchreplace[discfound] = true
+ match = not notmatchpost[discfound]
+ else
+ match = false
+ end
+ break
end
- elseif seq[n][char] then
- n = n -1
else
- match = false
+ if discfound then
+ notmatchreplace[discfound] = true
+ match = not notmatchpost[discfound]
+ else
+ match = false
+ end
break
end
else
- match = false
+ if discfound then
+ notmatchreplace[discfound] = true
+ match = not notmatchpost[discfound]
+ else
+ match = false
+ end
break
end
- else
- match = false
- break
- end
- elseif id == disc_code then
- -- the special case: f i where i becomes dottless i ..
- if check_discretionaries then
+ elseif id == disc_code then
+ -- the special case: f i where i becomes dottless i ..
+ diskseen = true
+ discfound = prev
+ notmatchpre[prev] = true
+ notmatchpost[prev] = nil
+ notmatchreplace[prev] = nil
+ local pre = getfield(prev,"pre")
+ local post = getfield(prev,"post")
local replace = getfield(prev,"replace")
- if replace then
- -- we seldom enter this branch (e.g. on brill efficient)
- replace = find_node_tail(replace)
- local finish = getprev(replace)
- while replace do
- if seq[n][getchar(replace)] then
- n = n - 1
- replace = getprev(replace)
- if not replace or replace == finish then
+ if pre ~= start and post ~= start and replace ~= start then
+ if post then
+ local n = n
+ local posttail = find_node_tail(post)
+ while posttail do
+ if seq[n][getchar(posttail)] then
+ n = n - 1
+ if posttail == post then
+ break
+ else
+ posttail = getprev(posttail)
+ if n < 1 then
+ break
+ end
+ end
+ else
+ notmatchpost[prev] = true
break
- elseif n < 1 then
- -- match = false
+ end
+ end
+ if n >= 1 then
+ notmatchpost[prev] = true
+ end
+ else
+ notmatchpost[prev] = true
+ end
+ if replace then
+ -- we seldom enter this branch (e.g. on brill efficient)
+ local replacetail = find_node_tail(replace)
+ while replacetail do
+ if seq[n][getchar(replacetail)] then
+ n = n - 1
+ if replacetail == replace then
+ break
+ else
+ replacetail = getprev(replacetail)
+ if n < 1 then
+ break
+ end
+ end
+ else
+ notmatchreplace[prev] = true
+ match = not notmatchpost[prev]
break
end
- else
- match = false
+ end
+ if not match then
break
end
- end
- if not match then
- break
- elseif check_discretionaries == "trace" then
- report_chain("check disc action in before")
+ else
+ -- skip 'm
end
else
-- skip 'm
end
+ elseif seq[n][32] then
+ n = n -1
else
- -- skip 'm
+ match = false
+ break
end
- elseif seq[n][32] then
- n = n -1
+ prev = getprev(prev)
+ elseif seq[n][32] then -- somewhat special, as zapfino can have many preceding spaces
+ n = n - 1
else
match = false
break
end
- prev = getprev(prev)
- elseif seq[n][32] then -- somewhat special, as zapfino can have many preceding spaces
- n = n - 1
- else
- match = false
- break
end
+ else
+ match = false
end
else
match = false
@@ -2203,7 +2440,14 @@ local function normal_handle_contextchain(head,start,kind,chainname,contexts,seq
-- after
if match and s > l then
local current = last and getnext(last)
+ if not current then
+ if sweeptype == "post" or sweeptype == "replace" then
+ current = getnext(sweepnode)
+ -- sweeptype = nil
+ end
+ end
if current then
+ local discfound = nil
-- removed optimization for s-l == 1, we have to deal with marks anyway
local n = l + 1
while n <= s do
@@ -2223,43 +2467,77 @@ local function normal_handle_contextchain(head,start,kind,chainname,contexts,seq
elseif seq[n][char] then
n = n + 1
else
- match = false
+ if discfound then
+ notmatchreplace[discfound] = true
+ match = not notmatchpre[discfound]
+ else
+ match = false
+ end
break
end
else
- match = false
+ if discfound then
+ notmatchreplace[discfound] = true
+ match = not notmatchpre[discfound]
+ else
+ match = false
+ end
break
end
else
- match = false
+ if discfound then
+ notmatchreplace[discfound] = true
+ match = not notmatchpre[discfound]
+ else
+ match = false
+ end
break
end
elseif id == disc_code then
- if check_discretionaries then
- local replace = getfield(current,"replace")
- if replace then
- -- so far we never entered this branch
- while replace do
- if seq[n][getchar(replace)] then
- n = n + 1
- replace = getnext(replace)
- if not replace then
- break
- elseif n > s then
- break
- end
- else
- match = false
+ diskseen = true
+ discfound = current
+ notmatchpre[current] = nil
+ notmatchpost[current] = true
+ notmatchreplace[current] = nil
+ local pre = getfield(current,"pre")
+ local replace = getfield(current,"replace")
+ if pre then
+ local n = n
+ while pre do
+ if seq[n][getchar(pre)] then
+ n = n + 1
+ pre = getnext(pre)
+ if n > s then
break
end
+ else
+ notmatchpre[current] = true
+ break
end
- if not match then
+ end
+ if n <= s then
+ notmatchpre[current] = true
+ end
+ else
+ notmatchpre[current] = true
+ end
+ if replace then
+ -- so far we never entered this branch
+ while replace do
+ if seq[n][getchar(replace)] then
+ n = n + 1
+ replace = getnext(replace)
+ if n > s then
+ break
+ end
+ else
+ notmatchreplace[current] = true
+ match = notmatchpre[current]
break
- elseif check_discretionaries == "trace" then
- report_chain("check disc action in after")
end
- else
- -- skip 'm
+ end
+ if not match then
+ break
end
else
-- skip 'm
@@ -2284,7 +2562,8 @@ local function normal_handle_contextchain(head,start,kind,chainname,contexts,seq
end
end
if match then
- -- ck == currentcontext
+ -- can lookups be of a different type ?
+ local diskchain = diskseen or sweepnode
if trace_contexts then
local rule, lookuptype, f, l = ck[1], ck[2], ck[4], ck[5]
local char = getchar(start)
@@ -2304,10 +2583,14 @@ local function normal_handle_contextchain(head,start,kind,chainname,contexts,seq
local chainlookupname = chainlookups[1]
local chainlookup = lookuptable[chainlookupname]
if chainlookup then
- local cp = chainprocs[chainlookup.type]
- if cp then
+ local chainproc = chainprocs[chainlookup.type]
+ if chainproc then
local ok
- head, start, ok = cp(head,start,last,kind,chainname,ck,lookuphash,chainlookup,chainlookupname,nil,sequence)
+ if diskchain then
+ head, start, ok = chaindisk(head,start,last,kind,chainname,ck,lookuphash,chainlookup,chainlookupname,nil,sequence,chainproc)
+ else
+ head, start, ok = chainproc(head,start,last,kind,chainname,ck,lookuphash,chainlookup,chainlookupname,nil,sequence)
+ end
if ok then
done = true
end
@@ -2319,13 +2602,13 @@ local function normal_handle_contextchain(head,start,kind,chainname,contexts,seq
end
else
local i = 1
- while true do
+ while start and true do
if skipped then
- while true do
+ while true do -- todo: use properties
local char = getchar(start)
local ccd = descriptions[char]
if ccd then
- local class = ccd.class
+ local class = ccd.class or "base"
if class == skipmark or class == skipligature or class == skipbase or (markclass and class == "mark" and not markclass[char]) then
start = getnext(start)
else
@@ -2336,36 +2619,51 @@ local function normal_handle_contextchain(head,start,kind,chainname,contexts,seq
end
end
end
+ -- see remark in ms standard under : LookupType 5: Contextual Substitution Subtable
local chainlookupname = chainlookups[i]
local chainlookup = lookuptable[chainlookupname]
if not chainlookup then
- -- okay, n matches, < n replacements
+ -- we just advance
i = i + 1
else
- local cp = chainmores[chainlookup.type]
- if not cp then
+ local chainproc = chainprocs[chainlookup.type]
+ if not chainproc then
-- actually an error
logprocess("%s: %s is not yet supported",cref(kind,chainname,chainlookupname),chainlookup.type)
i = i + 1
else
local ok, n
- head, start, ok, n = cp(head,start,last,kind,chainname,ck,lookuphash,chainlookup,chainlookupname,i,sequence)
+ if diskchain then
+ head, start, ok = chaindisk(head,start,last,kind,chainname,ck,lookuphash,chainlookup,chainlookupname,nil,sequence,chainproc)
+ else
+ head, start, ok, n = chainproc(head,start,last,kind,chainname,ck,lookuphash,chainlookup,chainlookupname,i,sequence)
+ end
-- messy since last can be changed !
if ok then
done = true
- -- skip next one(s) if ligature
- i = i + (n or 1)
- else
- i = i + 1
+ if n and n > 1 then
+ -- we have a ligature (cf the spec we advance one but we really need to test it
+ -- as there are fonts out there that are fuzzy and have too many lookups:
+ --
+ -- U+1105 U+119E U+1105 U+119E : sourcehansansklight: script=hang ccmp=yes
+ --
+ if i + n > nofchainlookups then
+ -- if trace_contexts then
+ -- logprocess("%s: quitting lookups",cref(kind,chainname))
+ -- end
+ break
+ else
+ -- we need to carry one
+ end
+ end
end
+ i = i + 1
end
end
- if i > nofchainlookups then
+ if i > nofchainlookups or not start then
break
elseif start then
start = getnext(start)
- else
- -- weird
end
end
end
@@ -2380,8 +2678,16 @@ local function normal_handle_contextchain(head,start,kind,chainname,contexts,seq
end
end
end
+ if done then
+ break -- out of contexts (new, needs checking)
+ end
end
end
+ if diskseen then -- maybe move up so that we can turn checking on/off
+ notmatchpre = { }
+ notmatchpost = { }
+ notmatchreplace = { }
+ end
return head, start, done
end
@@ -2399,26 +2705,49 @@ otf.chainhandlers = {
verbose = verbose_handle_contextchain,
}
+local handle_contextchain = nil
+
+-- normal_handle_contextchain(head,start,kind,chainname,contexts,sequence,lookuphash)
+
+local function chained_contextchain(head,start,stop,...)
+ local steps = currentlookup.steps
+ local nofsteps = currentlookup.nofsteps
+ if nofsteps > 1 then
+ reportmoresteps(dataset,sequence)
+ end
+ return handle_contextchain(head,start,...)
+end
+
function otf.setcontextchain(method)
if not method or method == "normal" or not otf.chainhandlers[method] then
- if handlers.contextchain then -- no need for a message while making the format
+ if handle_contextchain then -- no need for a message while making the format
logwarning("installing normal contextchain handler")
end
- handlers.contextchain = normal_handle_contextchain
+ handle_contextchain = normal_handle_contextchain
else
logwarning("installing contextchain handler %a",method)
local handler = otf.chainhandlers[method]
- handlers.contextchain = function(...)
+ handle_contextchain = function(...)
return handler(currentfont,...) -- hm, get rid of ...
end
end
- handlers.gsub_context = handlers.contextchain
- handlers.gsub_contextchain = handlers.contextchain
- handlers.gsub_reversecontextchain = handlers.contextchain
- handlers.gpos_contextchain = handlers.contextchain
- handlers.gpos_context = handlers.contextchain
+
+ handlers.gsub_context = handle_contextchain
+ handlers.gsub_contextchain = handle_contextchain
+ handlers.gsub_reversecontextchain = handle_contextchain
+ handlers.gpos_contextchain = handle_contextchain
+ handlers.gpos_context = handle_contextchain
+
+ handlers.contextchain = handle_contextchain
+
end
+chainprocs.gsub_context = chained_contextchain
+chainprocs.gsub_contextchain = chained_contextchain
+chainprocs.gsub_reversecontextchain = chained_contextchain
+chainprocs.gpos_contextchain = chained_contextchain
+chainprocs.gpos_context = chained_contextchain
+
otf.setcontextchain()
local missing = { } -- we only report once
@@ -2458,21 +2787,34 @@ end)
-- fonts.hashes.lookups = lookuphashes
-local autofeatures = fonts.analyzers.features -- was: constants
+local autofeatures = fonts.analyzers.features
+local featuretypes = otf.tables.featuretypes
+local defaultscript = otf.features.checkeddefaultscript
+local defaultlanguage = otf.features.checkeddefaultlanguage
-local function initialize(sequence,script,language,enabled)
+local function initialize(sequence,script,language,enabled,autoscript,autolanguage)
local features = sequence.features
if features then
local order = sequence.order
if order then
- for i=1,#order do --
- local kind = order[i] --
+ local featuretype = featuretypes[sequence.type or "unknown"]
+ for i=1,#order do
+ local kind = order[i]
local valid = enabled[kind]
if valid then
- local scripts = features[kind] --
- local languages = scripts[script] or scripts[wildcard]
- if languages and (languages[language] or languages[wildcard]) then
- return { valid, autofeatures[kind] or false, sequence.chain or 0, kind, sequence }
+ local scripts = features[kind]
+ local languages = scripts and (
+ scripts[script] or
+ scripts[wildcard] or
+ (autoscript and defaultscript(featuretype,autoscript,scripts))
+ )
+ local enabled = languages and (
+ languages[language] or
+ languages[wildcard] or
+ (autolanguage and defaultlanguage(featuretype,autolanguage,languages))
+ )
+ if enabled then
+ return { valid, autofeatures[kind] or false, sequence, kind }
end
end
end
@@ -2484,11 +2826,13 @@ local function initialize(sequence,script,language,enabled)
end
function otf.dataset(tfmdata,font) -- generic variant, overloaded in context
- local shared = tfmdata.shared
- local properties = tfmdata.properties
- local language = properties.language or "dflt"
- local script = properties.script or "dflt"
- local enabled = shared.features
+ local shared = tfmdata.shared
+ local properties = tfmdata.properties
+ local language = properties.language or "dflt"
+ local script = properties.script or "dflt"
+ local enabled = shared.features
+ local autoscript = enabled and enabled.autoscript
+ local autolanguage = enabled and enabled.autolanguage
local res = resolved[font]
if not res then
res = { }
@@ -2507,7 +2851,7 @@ function otf.dataset(tfmdata,font) -- generic variant, overloaded in context
rs[language] = rl
local sequences = tfmdata.resources.sequences
for s=1,#sequences do
- local v = enabled and initialize(sequences[s],script,language,enabled)
+ local v = enabled and initialize(sequences[s],script,language,enabled,autoscript,autolanguage)
if v then
rl[#rl+1] = v
end
@@ -2516,104 +2860,100 @@ function otf.dataset(tfmdata,font) -- generic variant, overloaded in context
return rl
end
--- elseif id == glue_code then
--- if p[5] then -- chain
--- local pc = pp[32]
--- if pc then
--- start, ok = start, false -- p[1](start,kind,p[2],pc,p[3],p[4])
--- if ok then
--- done = true
--- end
--- if start then start = getnext(start) end
--- else
--- start = getnext(start)
--- end
--- else
--- start = getnext(start)
--- end
-
--- there will be a new direction parser (pre-parsed etc)
-
--- less bytecode: 290 -> 254
---
--- attr = attr or false
---
--- local a = getattr(start,0)
--- if (a == attr and (not attribute or getprop(start,a_state) == attribute)) or (not attribute or getprop(start,a_state) == attribute) then
--- -- the action
--- end
-
-- assumptions:
--
-- * languages that use complex disc nodes
--- optimization comes later ...
-
-local function kernrun(disc,run) -- we can assume that prev and next are glyphs
+local function kernrun(disc,run)
+ --
+ -- we catch <font 1><disc font 2>
+ --
if trace_kernruns then
report_run("kern") -- will be more detailed
end
- --
- local prev = getprev(disc) -- todo, keep these in the main loop
- local next = getnext(disc) -- todo, keep these in the main loop
--
- local pre = getfield(disc,"pre")
+ local prev = getprev(disc) -- todo, keep these in the main loop
+ local next = getnext(disc) -- todo, keep these in the main loop
+ --
+ local pre = getfield(disc,"pre")
+ local post = getfield(disc,"post")
+ local replace = getfield(disc,"replace")
+ --
+ local prevmarks = prev
+ --
+ -- can be optional, because why on earth do we get a disc after a mark (okay, maybe when a ccmp
+ -- has happened but then it should be in the disc so basically this test indicates an error)
+ --
+ while prevmarks and getid(prevmarks) == glyph_code and marks[getchar(prevmarks)] and getfont(prevmarks) == currentfont and getsubtype(prevmarks) < 256 do
+ prevmarks = getprev(prevmarks)
+ end
+ --
+ if prev and (pre or replace) and not (getid(prev) == glyph_code and getfont(prev) == currentfont and getsubtype(prev)<256) then
+ prev = false
+ end
+ if next and (post or replace) and not (getid(next) == glyph_code and getfont(next) == currentfont and getsubtype(next)<256) then
+ next = false
+ end
+ --
if not pre then
-- go on
elseif prev then
local nest = getprev(pre)
- setfield(pre,"prev",prev)
- setfield(prev,"next",pre)
- run(prev,"preinjections")
- setfield(pre,"prev",nest)
- setfield(prev,"next",disc)
+ setprev(pre,prev)
+ setnext(prev,pre)
+ run(prevmarks,"preinjections")
+ setprev(pre,nest)
+ setnext(prev,disc)
else
run(pre,"preinjections")
end
--
- local post = getfield(disc,"post")
if not post then
-- go on
elseif next then
local tail = find_node_tail(post)
- setfield(tail,"next",next)
- setfield(next,"prev",tail)
- run(post,"postinjections",tail)
- setfield(tail,"next",nil)
- setfield(next,"prev",disc)
+ setnext(tail,next)
+ setprev(next,tail)
+ run(post,"postinjections",next)
+ setnext(tail,nil)
+ setprev(next,disc)
else
run(post,"postinjections")
end
--
- local replace = getfield(disc,"replace")
- if not replace then
+ if not replace and prev and next then
-- this should be already done by discfound
+ setnext(prev,next)
+ setprev(next,prev)
+ run(prevmarks,"injections",next)
+ setnext(prev,disc)
+ setprev(next,disc)
elseif prev and next then
local tail = find_node_tail(replace)
local nest = getprev(replace)
- setfield(replace,"prev",prev)
- setfield(prev,"next",replace)
- setfield(tail,"next",next)
- setfield(next,"prev",tail)
- run(prev,"replaceinjections",tail)
- setfield(replace,"prev",nest)
- setfield(prev,"next",disc)
- setfield(tail,"next",nil)
- setfield(next,"prev",disc)
+ setprev(replace,prev)
+ setnext(prev,replace)
+ setnext(tail,next)
+ setprev(next,tail)
+ run(prevmarks,"replaceinjections",next)
+ setprev(replace,nest)
+ setnext(prev,disc)
+ setnext(tail,nil)
+ setprev(next,disc)
elseif prev then
local nest = getprev(replace)
- setfield(replace,"prev",prev)
- setfield(prev,"next",replace)
- run(prev,"replaceinjections")
- setfield(replace,"prev",nest)
- setfield(prev,"next",disc)
+ setprev(replace,prev)
+ setnext(prev,replace)
+ run(prevmarks,"replaceinjections")
+ setprev(replace,nest)
+ setnext(prev,disc)
elseif next then
local tail = find_node_tail(replace)
- setfield(tail,"next",next)
- setfield(next,"prev",tail)
- run(replace,"replaceinjections",tail)
- setfield(tail,"next",nil)
- setfield(next,"prev",disc)
+ setnext(tail,next)
+ setprev(next,tail)
+ run(replace,"replaceinjections",next)
+ setnext(tail,nil)
+ setprev(next,disc)
else
run(replace,"replaceinjections")
end
@@ -2629,6 +2969,8 @@ local function comprun(disc,run)
--
local pre = getfield(disc,"pre")
if pre then
+ sweepnode = disc
+ sweeptype = "pre" -- in alternative code preinjections is used (also used then for proeprties, saves a variable)
local new, done = run(pre)
if done then
setfield(disc,"pre",new)
@@ -2637,6 +2979,8 @@ local function comprun(disc,run)
--
local post = getfield(disc,"post")
if post then
+ sweepnode = disc
+ sweeptype = "post"
local new, done = run(post)
if done then
setfield(disc,"post",new)
@@ -2645,14 +2989,18 @@ local function comprun(disc,run)
--
local replace = getfield(disc,"replace")
if replace then
+ sweepnode = disc
+ sweeptype = "replace"
local new, done = run(replace)
if done then
setfield(disc,"replace",new)
end
end
+ sweepnode = nil
+ sweeptype = nil
end
-local function testrun(disc,trun,crun)
+local function testrun(disc,trun,crun) -- use helper
local next = getnext(disc)
if next then
local replace = getfield(disc,"replace")
@@ -2662,21 +3010,21 @@ local function testrun(disc,trun,crun)
-- only look ahead
local tail = find_node_tail(replace)
-- local nest = getprev(replace)
- setfield(tail,"next",next)
- setfield(next,"prev",tail)
+ setnext(tail,next)
+ setprev(next,tail)
if trun(replace,next) then
setfield(disc,"replace",nil) -- beware, side effects of nest so first
- setfield(prev,"next",replace)
- setfield(replace,"prev",prev)
- setfield(next,"prev",tail)
- setfield(tail,"next",next)
- setfield(disc,"prev",nil)
- setfield(disc,"next",nil)
+ setnext(prev,replace)
+ setprev(replace,prev)
+ setprev(next,tail)
+ setnext(tail,next)
+ setprev(disc,nil)
+ setnext(disc,nil)
flush_node_list(disc)
return replace -- restart
else
- setfield(tail,"next",nil)
- setfield(next,"prev",disc)
+ setnext(tail,nil)
+ setprev(next,disc)
end
else
-- weird case
@@ -2698,11 +3046,11 @@ local function discrun(disc,drun,krun)
report_run("disc") -- will be more detailed
end
if next and prev then
- setfield(prev,"next",next)
- -- setfield(next,"prev",prev)
+ setnext(prev,next)
+ -- setprev(next,prev)
drun(prev)
- setfield(prev,"next",disc)
- -- setfield(next,"prev",disc)
+ setnext(prev,disc)
+ -- setprev(next,disc)
end
--
local pre = getfield(disc,"pre")
@@ -2710,11 +3058,11 @@ local function discrun(disc,drun,krun)
-- go on
elseif prev then
local nest = getprev(pre)
- setfield(pre,"prev",prev)
- setfield(prev,"next",pre)
+ setprev(pre,prev)
+ setnext(prev,pre)
krun(prev,"preinjections")
- setfield(pre,"prev",nest)
- setfield(prev,"next",disc)
+ setprev(pre,nest)
+ setnext(prev,disc)
else
krun(pre,"preinjections")
end
@@ -2750,6 +3098,7 @@ local function featuresprocessor(head,font,attr)
currentfont = font
rlmode = 0
+ sweephead = { }
local sequences = resources.sequences
local done = false
@@ -2765,8 +3114,6 @@ local function featuresprocessor(head,font,attr)
-- Keeping track of the headnode is needed for devanagari (I generalized it a bit
-- so that multiple cases are also covered.)
- -- todo: retain prev
-
-- We don't goto the next node of a disc node is created so that we can then treat
-- the pre, post and replace. It's abit of a hack but works out ok for most cases.
@@ -2776,18 +3123,17 @@ local function featuresprocessor(head,font,attr)
local dataset = datasets[s]
featurevalue = dataset[1] -- todo: pass to function instead of using a global
local attribute = dataset[2]
- local chain = dataset[3] -- sequence.chain or 0
+ local sequence = dataset[3] -- sequences[s] -- also dataset[5]
local kind = dataset[4]
- local sequence = dataset[5] -- sequences[s] -- also dataset[5]
+ ----- chain = dataset[5] -- sequence.chain or 0
local rlparmode = 0
local topstack = 0
local success = false
local typ = sequence.type
- local gpossing = typ == "gpos_single" or typ == "gpos_pair"
+ local gpossing = typ == "gpos_single" or typ == "gpos_pair" -- maybe all of them
local subtables = sequence.subtables
local handler = handlers[typ]
-
- if chain < 0 then
+ if typ == "gsub_reversecontextchain" then -- chain < 0
-- this is a limited case, no special treatments like 'init' etc
-- we need to get rid of this slide! probably no longer needed in latest luatex
local start = find_node_tail(head) -- slow (we can store tail because there's always a skip at the end): todo
@@ -2807,8 +3153,7 @@ local function featuresprocessor(head,font,attr)
local lookupname = subtables[i]
local lookupcache = lookuphash[lookupname]
if lookupcache then
- -- local lookupmatch = lookupcache[getchar(start)]
- local lookupmatch = lookupcache[start]
+ local lookupmatch = lookupcache[char]
if lookupmatch then
-- todo: disc?
head, start, success = handler(head,start,kind,lookupname,lookupmatch,sequence,lookuphash,i)
@@ -2836,15 +3181,20 @@ local function featuresprocessor(head,font,attr)
local start = head -- local ?
rlmode = 0 -- to be checked ?
if ns == 1 then -- happens often
- local lookupname = subtables[1]
+ local lookupname = subtables[1]
local lookupcache = lookuphash[lookupname]
if not lookupcache then -- also check for empty cache
report_missing_cache(typ,lookupname)
else
- local function c_run(start) -- no need to check for 256 and attr probably also the same
- local head = start
- local done = false
+ local function c_run(head) -- no need to check for 256 and attr probably also the same
+ local done = false
+ local start = sweephead[head]
+ if start then
+ sweephead[head] = nil
+ else
+ start = head
+ end
while start do
local id = getid(start)
if id ~= glyph_code then
@@ -2931,7 +3281,7 @@ local function featuresprocessor(head,font,attr)
-- sequence kan weg
local h, d, ok = handler(head,prev,kind,lookupname,lookupmatch,sequence,lookuphash,1)
if ok then
- done = true
+ done = true
success = true
end
end
@@ -2957,7 +3307,7 @@ local function featuresprocessor(head,font,attr)
if lookupmatch then
local h, d, ok = handler(sub,n,kind,lookupname,lookupmatch,sequence,lookuphash,1,injection)
if ok then
- done = true
+ done = true
success = true
end
end
@@ -3001,63 +3351,52 @@ local function featuresprocessor(head,font,attr)
start = getnext(start)
end
elseif id == disc_code then
- local discretionary = getsubtype(start) == discretionary_code
- if gpossing then
- if discretionary then
- kernrun(start,k_run)
- else
- discrun(start,d_run,k_run)
- end
- start = getnext(start)
- elseif discretionary then
- if typ == "gsub_ligature" then
- start = testrun(start,t_run,c_run)
- else
- comprun(start,c_run)
- start = getnext(start)
- end
- else
+ if gpossing then
+ kernrun(start,k_run)
+ start = getnext(start)
+ elseif typ == "gsub_ligature" then
+ start = testrun(start,t_run,c_run)
+ else
+ comprun(start,c_run)
start = getnext(start)
- end
- elseif id == whatsit_code then -- will be function
- local subtype = getsubtype(start)
- if subtype == dir_code then
- local dir = getfield(start,"dir")
- if dir == "+TRT" or dir == "+TLT" then
- topstack = topstack + 1
- dirstack[topstack] = dir
- elseif dir == "-TRT" or dir == "-TLT" then
- topstack = topstack - 1
- end
- local newdir = dirstack[topstack]
- if newdir == "+TRT" then
- rlmode = -1
- elseif newdir == "+TLT" then
- rlmode = 1
- else
- rlmode = rlparmode
- end
- if trace_directions then
- report_process("directions after txtdir %a: parmode %a, txtmode %a, # stack %a, new dir %a",dir,rlparmode,rlmode,topstack,newdir)
- end
- elseif subtype == localpar_code then
- local dir = getfield(start,"dir")
- if dir == "TRT" then
- rlparmode = -1
- elseif dir == "TLT" then
- rlparmode = 1
- else
- rlparmode = 0
- end
- -- one might wonder if the par dir should be looked at, so we might as well drop the next line
- rlmode = rlparmode
- if trace_directions then
- report_process("directions after pardir %a: parmode %a, txtmode %a",dir,rlparmode,rlmode)
- end
end
- start = getnext(start)
elseif id == math_code then
start = getnext(end_of_math(start))
+ elseif id == dir_code then
+ local dir = getfield(start,"dir")
+ if dir == "+TLT" then
+ topstack = topstack + 1
+ dirstack[topstack] = dir
+ rlmode = 1
+ elseif dir == "+TRT" then
+ topstack = topstack + 1
+ dirstack[topstack] = dir
+ rlmode = -1
+ elseif dir == "-TLT" or dir == "-TRT" then
+ topstack = topstack - 1
+ rlmode = dirstack[topstack] == "+TRT" and -1 or 1
+ else
+ rlmode = rlparmode
+ end
+ if trace_directions then
+ report_process("directions after txtdir %a: parmode %a, txtmode %a, # stack %a, new dir %a",dir,rlparmode,rlmode,topstack,newdir)
+ end
+ start = getnext(start)
+ elseif id == localpar_code then
+ local dir = getfield(start,"dir")
+ if dir == "TRT" then
+ rlparmode = -1
+ elseif dir == "TLT" then
+ rlparmode = 1
+ else
+ rlparmode = 0
+ end
+ -- one might wonder if the par dir should be looked at, so we might as well drop the next line
+ rlmode = rlparmode
+ if trace_directions then
+ report_process("directions after pardir %a: parmode %a, txtmode %a",dir,rlparmode,rlmode)
+ end
+ start = getnext(start)
else
start = getnext(start)
end
@@ -3066,9 +3405,14 @@ local function featuresprocessor(head,font,attr)
else
- local function c_run(start)
- local head = start
- local done = false
+ local function c_run(head)
+ local done = false
+ local start = sweephead[head]
+ if start then
+ sweephead[head] = nil
+ else
+ start = head
+ end
while start do
local id = getid(start)
if id ~= glyph_code then
@@ -3087,7 +3431,6 @@ local function featuresprocessor(head,font,attr)
local lookupname = subtables[i]
local lookupcache = lookuphash[lookupname]
if lookupcache then
- -- local lookupmatch = lookupcache[getchar(start)]
local lookupmatch = lookupcache[char]
if lookupmatch then
-- we could move all code inline but that makes things even more unreadable
@@ -3130,7 +3473,7 @@ local function featuresprocessor(head,font,attr)
-- brr prev can be disc
local char = getchar(prev)
for i=1,ns do
- local lookupname = subtables[i]
+ local lookupname = subtables[i]
local lookupcache = lookuphash[lookupname]
if lookupcache then
local lookupmatch = lookupcache[char]
@@ -3165,7 +3508,7 @@ local function featuresprocessor(head,font,attr)
if id == glyph_code then
local char = getchar(n)
for i=1,ns do
- local lookupname = subtables[i]
+ local lookupname = subtables[i]
local lookupcache = lookuphash[lookupname]
if lookupcache then
local lookupmatch = lookupcache[char]
@@ -3200,7 +3543,7 @@ local function featuresprocessor(head,font,attr)
if a then
local char = getchar(start)
for i=1,ns do
- local lookupname = subtables[i]
+ local lookupname = subtables[i]
local lookupcache = lookuphash[lookupname]
if lookupcache then
local lookupmatch = lookupcache[char]
@@ -3245,7 +3588,7 @@ local function featuresprocessor(head,font,attr)
end
if a then
for i=1,ns do
- local lookupname = subtables[i]
+ local lookupname = subtables[i]
local lookupcache = lookuphash[lookupname]
if lookupcache then
local char = getchar(start)
@@ -3278,62 +3621,51 @@ local function featuresprocessor(head,font,attr)
start = getnext(start)
end
elseif id == disc_code then
- local discretionary = getsubtype(start) == discretionary_code
if gpossing then
- if discretionary then
- kernrun(start,k_run)
- else
- discrun(start,d_run,k_run)
- end
+ kernrun(start,k_run)
start = getnext(start)
- elseif discretionary then
- if typ == "gsub_ligature" then
- start = testrun(start,t_run,c_run)
- else
- comprun(start,c_run)
- start = getnext(start)
- end
+ elseif typ == "gsub_ligature" then
+ start = testrun(start,t_run,c_run)
else
+ comprun(start,c_run)
start = getnext(start)
end
- elseif id == whatsit_code then
- local subtype = getsubtype(start)
- if subtype == dir_code then
- local dir = getfield(start,"dir")
- if dir == "+TRT" or dir == "+TLT" then
- topstack = topstack + 1
- dirstack[topstack] = dir
- elseif dir == "-TRT" or dir == "-TLT" then
- topstack = topstack - 1
- end
- local newdir = dirstack[topstack]
- if newdir == "+TRT" then
- rlmode = -1
- elseif newdir == "+TLT" then
- rlmode = 1
- else
- rlmode = rlparmode
- end
- if trace_directions then
- report_process("directions after txtdir %a: parmode %a, txtmode %a, # stack %a, new dir %a",dir,rlparmode,rlmode,topstack,newdir)
- end
- elseif subtype == localpar_code then
- local dir = getfield(start,"dir")
- if dir == "TRT" then
- rlparmode = -1
- elseif dir == "TLT" then
- rlparmode = 1
- else
- rlparmode = 0
- end
+ elseif id == math_code then
+ start = getnext(end_of_math(start))
+ elseif id == dir_code then
+ local dir = getfield(start,"dir")
+ if dir == "+TLT" then
+ topstack = topstack + 1
+ dirstack[topstack] = dir
+ rlmode = 1
+ elseif dir == "+TRT" then
+ topstack = topstack + 1
+ dirstack[topstack] = dir
+ rlmode = -1
+ elseif dir == "-TLT" or dir == "-TRT" then
+ topstack = topstack - 1
+ rlmode = dirstack[topstack] == "+TRT" and -1 or 1
+ else
rlmode = rlparmode
- if trace_directions then
- report_process("directions after pardir %a: parmode %a, txtmode %a",dir,rlparmode,rlmode)
- end
+ end
+ if trace_directions then
+ report_process("directions after txtdir %a: parmode %a, txtmode %a, # stack %a, new dir %a",dir,rlparmode,rlmode,topstack,newdir)
+ end
+ start = getnext(start)
+ elseif id == localpar_code then
+ local dir = getfield(start,"dir")
+ if dir == "TRT" then
+ rlparmode = -1
+ elseif dir == "TLT" then
+ rlparmode = 1
+ else
+ rlparmode = 0
+ end
+ rlmode = rlparmode
+ if trace_directions then
+ report_process("directions after pardir %a: parmode %a, txtmode %a",dir,rlparmode,rlmode)
end
start = getnext(start)
- elseif id == math_code then
- start = getnext(end_of_math(start))
else
start = getnext(start)
end
@@ -3354,6 +3686,8 @@ local function featuresprocessor(head,font,attr)
return head, done
end
+-- this might move to the loader
+
local function generic(lookupdata,lookupname,unicode,lookuphash)
local target = lookuphash[lookupname]
if target then
@@ -3363,47 +3697,48 @@ local function generic(lookupdata,lookupname,unicode,lookuphash)
end
end
-local action = {
+local function ligature(lookupdata,lookupname,unicode,lookuphash)
+ local target = lookuphash[lookupname]
+ if not target then
+ target = { }
+ lookuphash[lookupname] = target
+ end
+ for i=1,#lookupdata do
+ local li = lookupdata[i]
+ local tu = target[li]
+ if not tu then
+ tu = { }
+ target[li] = tu
+ end
+ target = tu
+ end
+ target.ligature = unicode
+end
+local function pair(lookupdata,lookupname,unicode,lookuphash)
+ local target = lookuphash[lookupname]
+ if not target then
+ target = { }
+ lookuphash[lookupname] = target
+ end
+ local others = target[unicode]
+ local paired = lookupdata[1]
+ if others then
+ others[paired] = lookupdata
+ else
+ others = { [paired] = lookupdata }
+ target[unicode] = others
+ end
+end
+
+local action = {
substitution = generic,
multiple = generic,
alternate = generic,
position = generic,
-
- ligature = function(lookupdata,lookupname,unicode,lookuphash)
- local target = lookuphash[lookupname]
- if not target then
- target = { }
- lookuphash[lookupname] = target
- end
- for i=1,#lookupdata do
- local li = lookupdata[i]
- local tu = target[li]
- if not tu then
- tu = { }
- target[li] = tu
- end
- target = tu
- end
- target.ligature = unicode
- end,
-
- pair = function(lookupdata,lookupname,unicode,lookuphash)
- local target = lookuphash[lookupname]
- if not target then
- target = { }
- lookuphash[lookupname] = target
- end
- local others = target[unicode]
- local paired = lookupdata[1]
- if others then
- others[paired] = lookupdata
- else
- others = { [paired] = lookupdata }
- target[unicode] = others
- end
- end,
-
+ ligature = ligature,
+ pair = pair,
+ kern = pair,
}
local function prepare_lookups(tfmdata)
@@ -3416,12 +3751,17 @@ local function prepare_lookups(tfmdata)
local lookuptypes = resources.lookuptypes
local characters = tfmdata.characters
local descriptions = tfmdata.descriptions
+ local duplicates = resources.duplicates
-- we cannot free the entries in the descriptions as sometimes we access
-- then directly (for instance anchors) ... selectively freeing does save
-- much memory as it's only a reference to a table and the slot in the
-- description hash is not freed anyway
+ -- we can delay this using metatables so that we don't make the hashes for
+ -- features we don't use but then we need to loop over the characters
+ -- many times so we gain nothing
+
for unicode, character in next, characters do -- we cannot loop over descriptions !
local description = descriptions[unicode]
@@ -3431,7 +3771,7 @@ local function prepare_lookups(tfmdata)
local lookups = description.slookups
if lookups then
for lookupname, lookupdata in next, lookups do
- action[lookuptypes[lookupname]](lookupdata,lookupname,unicode,lookuphash)
+ action[lookuptypes[lookupname]](lookupdata,lookupname,unicode,lookuphash,duplicates)
end
end
@@ -3441,7 +3781,7 @@ local function prepare_lookups(tfmdata)
local lookuptype = lookuptypes[lookupname]
for l=1,#lookuplist do
local lookupdata = lookuplist[l]
- action[lookuptype](lookupdata,lookupname,unicode,lookuphash)
+ action[lookuptype](lookupdata,lookupname,unicode,lookuphash,duplicates)
end
end
end
@@ -3465,7 +3805,7 @@ local function prepare_lookups(tfmdata)
for name, anchor in next, anchors do
local lookups = anchor_to_lookup[name]
if lookups then
- for lookup, _ in next, lookups do
+ for lookup in next, lookups do
local target = lookuphash[lookup]
if target then
target[unicode] = anchors
@@ -3485,6 +3825,8 @@ local function prepare_lookups(tfmdata)
end
+-- so far
+
local function split(replacement,original)
local result = { }
for i=1,#replacement do
@@ -3493,10 +3835,10 @@ local function split(replacement,original)
return result
end
-local valid = {
- coverage = { chainsub = true, chainpos = true, contextsub = true },
+local valid = { -- does contextpos work?
+ coverage = { chainsub = true, chainpos = true, contextsub = true, contextpos = true },
reversecoverage = { reversesub = true },
- glyphs = { chainsub = true, chainpos = true },
+ glyphs = { chainsub = true, chainpos = true, contextsub = true, contextpos = true },
}
local function prepare_contextchains(tfmdata)
@@ -3560,7 +3902,7 @@ local function prepare_contextchains(tfmdata)
-- use sequence[start] instead but it's somewhat ugly.
nt = nt + 1
t[nt] = { nofrules, lookuptype, sequence, start, stop, rule.lookups, replacements }
- for unic, _ in next, sequence[start] do
+ for unic in next, sequence[start] do
local cu = contexts[unic]
if not cu then
contexts[unic] = t
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-oto.lua b/Master/texmf-dist/tex/context/base/mkiv/font-oto.lua
new file mode 100644
index 00000000000..b7ee717c949
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-oto.lua
@@ -0,0 +1,452 @@
+if not modules then modules = { } end modules ['font-oto'] = { -- original tex
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is a version of font-otb adapted to the new fontloader code. We used to have two
+-- base initialization methods but now we have only one. This means that instead of the
+-- old default (independent) we now use the one more similar to node node (shared).
+
+local concat, unpack = table.concat, table.unpack
+local insert, remove = table.insert, table.remove
+local format, gmatch, gsub, find, match, lower, strip = string.format, string.gmatch, string.gsub, string.find, string.match, string.lower, string.strip
+local type, next, tonumber, tostring, rawget = type, next, tonumber, tostring, rawget
+local lpegmatch = lpeg.match
+local utfchar = utf.char
+
+local trace_baseinit = false trackers.register("otf.baseinit", function(v) trace_baseinit = v end)
+local trace_singles = false trackers.register("otf.singles", function(v) trace_singles = v end)
+local trace_multiples = false trackers.register("otf.multiples", function(v) trace_multiples = v end)
+local trace_alternatives = false trackers.register("otf.alternatives", function(v) trace_alternatives = v end)
+local trace_ligatures = false trackers.register("otf.ligatures", function(v) trace_ligatures = v end)
+----- trace_ligatures_detail = false trackers.register("otf.ligatures.detail", function(v) trace_ligatures_detail = v end)
+local trace_kerns = false trackers.register("otf.kerns", function(v) trace_kerns = v end)
+local trace_preparing = false trackers.register("otf.preparing", function(v) trace_preparing = v end)
+
+local report_prepare = logs.reporter("fonts","otf prepare")
+
+local fonts = fonts
+local otf = fonts.handlers.otf
+
+local otffeatures = otf.features
+local registerotffeature = otffeatures.register
+
+otf.defaultbasealternate = "none" -- first last
+
+local wildcard = "*"
+local default = "dflt"
+
+local formatters = string.formatters
+local f_unicode = formatters["%U"]
+local f_uniname = formatters["%U (%s)"]
+local f_unilist = formatters["% t (% t)"]
+
+local function gref(descriptions,n)
+ if type(n) == "number" then
+ local name = descriptions[n].name
+ if name then
+ return f_uniname(n,name)
+ else
+ return f_unicode(n)
+ end
+ elseif n then
+ local num, nam, j = { }, { }, 0
+ for i=1,#n do
+ local ni = n[i]
+ if tonumber(ni) then -- first is likely a key
+ j = j + 1
+ local di = descriptions[ni]
+ num[j] = f_unicode(ni)
+ nam[j] = di and di.name or "-"
+ end
+ end
+ return f_unilist(num,nam)
+ else
+ return "<error in base mode tracing>"
+ end
+end
+
+local function cref(feature,sequence)
+ return formatters["feature %a, type %a, chain lookup %a"](feature,sequence.type,sequence.name)
+end
+
+
+local function report_alternate(feature,sequence,descriptions,unicode,replacement,value,comment)
+ report_prepare("%s: base alternate %s => %s (%S => %S)",
+ cref(feature,sequence),
+ gref(descriptions,unicode),
+ replacement and gref(descriptions,replacement),
+ value,
+ comment)
+end
+
+local function report_substitution(feature,sequence,descriptions,unicode,substitution)
+ report_prepare("%s: base substitution %s => %S",
+ cref(feature,sequence),
+ gref(descriptions,unicode),
+ gref(descriptions,substitution))
+end
+
+local function report_ligature(feature,sequence,descriptions,unicode,ligature)
+ report_prepare("%s: base ligature %s => %S",
+ cref(feature,sequence),
+ gref(descriptions,ligature),
+ gref(descriptions,unicode))
+end
+
+local function report_kern(feature,sequence,descriptions,unicode,otherunicode,value)
+ report_prepare("%s: base kern %s + %s => %S",
+ cref(feature,sequence),
+ gref(descriptions,unicode),
+ gref(descriptions,otherunicode),
+ value)
+end
+
+-- We need to make sure that luatex sees the difference between base fonts that have
+-- different glyphs in the same slots in fonts that have the same fullname (or filename).
+-- LuaTeX will merge fonts eventually (and subset later on). If needed we can use a more
+-- verbose name as long as we don't use <()<>[]{}/%> and the length is < 128.
+
+local basehash, basehashes, applied = { }, 1, { }
+
+local function registerbasehash(tfmdata)
+ local properties = tfmdata.properties
+ local hash = concat(applied," ")
+ local base = basehash[hash]
+ if not base then
+ basehashes = basehashes + 1
+ base = basehashes
+ basehash[hash] = base
+ end
+ properties.basehash = base
+ properties.fullname = properties.fullname .. "-" .. base
+ -- report_prepare("fullname base hash '%a, featureset %a",tfmdata.properties.fullname,hash)
+ applied = { }
+end
+
+local function registerbasefeature(feature,value)
+ applied[#applied+1] = feature .. "=" .. tostring(value)
+end
+
+-- The original basemode ligature builder used the names of components and did some expression
+-- juggling to get the chain right. The current variant starts with unicodes but still uses
+-- names to make the chain. This is needed because we have to create intermediates when needed
+-- but use predefined snippets when available. To some extend the current builder is more stupid
+-- but I don't worry that much about it as ligatures are rather predicatable.
+--
+-- Personally I think that an ff + i == ffi rule as used in for instance latin modern is pretty
+-- weird as no sane person will key that in and expect a glyph for that ligature plus the following
+-- character. Anyhow, as we need to deal with this, we do, but no guarantes are given.
+--
+-- latin modern dejavu
+--
+-- f+f 102 102 102 102
+-- f+i 102 105 102 105
+-- f+l 102 108 102 108
+-- f+f+i 102 102 105
+-- f+f+l 102 102 108 102 102 108
+-- ff+i 64256 105 64256 105
+-- ff+l 64256 108
+--
+-- As you can see here, latin modern is less complete than dejavu but
+-- in practice one will not notice it.
+--
+-- The while loop is needed because we need to resolve for instance pseudo names like
+-- hyphen_hyphen to endash so in practice we end up with a bit too many definitions but the
+-- overhead is neglectable. We can have changed[first] or changed[second] but it quickly becomes
+-- messy if we need to take that into account.
+
+local function makefake(tfmdata,name,present)
+ local resources = tfmdata.resources
+ local private = resources.private
+ local character = { intermediate = true, ligatures = { } }
+ resources.unicodes[name] = private
+ tfmdata.characters[private] = character
+ tfmdata.descriptions[private] = { name = name }
+ resources.private = private + 1
+ present[name] = private
+ return character
+end
+
+local function make_1(present,tree,name)
+ for k, v in next, tree do
+ if k == "ligature" then
+ present[name] = v
+ else
+ make_1(present,v,name .. "_" .. k)
+ end
+ end
+end
+
+local function make_2(present,tfmdata,characters,tree,name,preceding,unicode,done)
+ for k, v in next, tree do
+ if k == "ligature" then
+ local character = characters[preceding]
+ if not character then
+ if trace_baseinit then
+ report_prepare("weird ligature in lookup %a, current %C, preceding %C",sequence.name,v,preceding)
+ end
+ character = makefake(tfmdata,name,present)
+ end
+ local ligatures = character.ligatures
+ if ligatures then
+ ligatures[unicode] = { char = v }
+ else
+ character.ligatures = { [unicode] = { char = v } }
+ end
+ if done then
+ local d = done[name]
+ if not d then
+ done[name] = { "dummy", v }
+ else
+ d[#d+1] = v
+ end
+ end
+ else
+ local code = present[name] or unicode
+ local name = name .. "_" .. k
+ make_2(present,tfmdata,characters,v,name,code,k,done)
+ end
+ end
+end
+
+local function preparesubstitutions(tfmdata,feature,value,validlookups,lookuplist)
+ local characters = tfmdata.characters
+ local descriptions = tfmdata.descriptions
+ local resources = tfmdata.resources
+ local changed = tfmdata.changed
+
+ local ligatures = { }
+ local alternate = tonumber(value) or true and 1
+ local defaultalt = otf.defaultbasealternate
+
+ local trace_singles = trace_baseinit and trace_singles
+ local trace_alternatives = trace_baseinit and trace_alternatives
+ local trace_ligatures = trace_baseinit and trace_ligatures
+
+ for i=1,#lookuplist do
+ local sequence = lookuplist[i]
+ local steps = sequence.steps
+ local kind = sequence.type
+ if kind == "gsub_single" then
+ for i=1,#steps do
+ for unicode, data in next, steps[i].coverage do
+ if not changed[unicode] then
+ if trace_singles then
+ report_substitution(feature,sequence,descriptions,unicode,data)
+ end
+ changed[unicode] = data
+ end
+ end
+ end
+ elseif kind == "gsub_alternate" then
+ for i=1,#steps do
+ for unicode, data in next, steps[i].coverage do
+ if not changed[unicode] then
+ local replacement = data[alternate]
+ if replacement then
+ changed[unicode] = replacement
+ if trace_alternatives then
+ report_alternate(feature,sequence,descriptions,unicode,replacement,value,"normal")
+ end
+ elseif defaultalt == "first" then
+ replacement = data[1]
+ changed[unicode] = replacement
+ if trace_alternatives then
+ report_alternate(feature,sequence,descriptions,unicode,replacement,value,defaultalt)
+ end
+ elseif defaultalt == "last" then
+ replacement = data[#data]
+ if trace_alternatives then
+ report_alternate(feature,sequence,descriptions,unicode,replacement,value,defaultalt)
+ end
+ else
+ if trace_alternatives then
+ report_alternate(feature,sequence,descriptions,unicode,replacement,value,"unknown")
+ end
+ end
+ end
+ end
+ end
+ elseif kind == "gsub_ligature" then
+ for i=1,#steps do
+ for unicode, data in next, steps[i].coverage do
+ ligatures[#ligatures+1] = { unicode, data, "" } -- lookupname }
+ if trace_ligatures then
+ report_ligature(feature,sequence,descriptions,unicode,data)
+ end
+ end
+ end
+ end
+ end
+
+ local nofligatures = #ligatures
+
+ if nofligatures > 0 then
+
+ local characters = tfmdata.characters
+ local present = { }
+ local done = trace_baseinit and trace_ligatures and { }
+
+ for i=1,nofligatures do
+ local ligature = ligatures[i]
+ local unicode, tree = ligature[1], ligature[2]
+ make_1(present,tree,"ctx_"..unicode)
+ end
+
+ for i=1,nofligatures do
+ local ligature = ligatures[i]
+ local unicode, tree, lookupname = ligature[1], ligature[2], ligature[3]
+ make_2(present,tfmdata,characters,tree,"ctx_"..unicode,unicode,unicode,done,sequence)
+ end
+
+ end
+
+end
+
+local function preparepositionings(tfmdata,feature,value,validlookups,lookuplist)
+ local characters = tfmdata.characters
+ local descriptions = tfmdata.descriptions
+ local resources = tfmdata.resources
+ local properties = tfmdata.properties
+ local traceindeed = trace_baseinit and trace_kerns
+ -- check out this sharedkerns trickery
+ for i=1,#lookuplist do
+ local sequence = lookuplist[i]
+ local steps = sequence.steps
+ local kind = sequence.type
+ local format = sequence.format
+ if kind == "gpos_pair" then
+ for i=1,#steps do
+ local step = steps[i]
+ if step.format == "kern" then
+ for unicode, data in next, steps[i].coverage do
+ local character = characters[unicode]
+ local kerns = character.kerns
+ if not kerns then
+ kerns = { }
+ character.kerns = kerns
+ end
+ if traceindeed then
+ for otherunicode, kern in next, data do
+ if not kerns[otherunicode] and kern ~= 0 then
+ kerns[otherunicode] = kern
+ report_kern(feature,sequence,descriptions,unicode,otherunicode,kern)
+ end
+ end
+ else
+ for otherunicode, kern in next, data do
+ if not kerns[otherunicode] and kern ~= 0 then
+ kerns[otherunicode] = kern
+ end
+ end
+ end
+ end
+ else
+ for unicode, data in next, steps[i].coverage do
+ local character = characters[unicode]
+ local kerns = character.kerns
+ for otherunicode, kern in next, data do
+ if not kern[2] and not (kerns and kerns[otherunicode]) then
+ local kern = kern[1]
+ if kern[1] ~= 0 or kern[2] ~= 0 or kern[4] ~= 0 then
+ -- a complex pair not suitable for basemode
+ else
+ kern = kern[3]
+ if kern ~= 0 then
+ if kerns then
+ kerns[otherunicode] = kern
+ else
+ kerns = { [otherunicode] = kern }
+ character.kerns = kerns
+ end
+ if traceindeed then
+ report_kern(feature,sequence,descriptions,unicode,otherunicode,kern)
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+
+end
+
+local function initializehashes(tfmdata)
+ -- already done
+end
+
+local function featuresinitializer(tfmdata,value)
+ if true then -- value then
+ local starttime = trace_preparing and os.clock()
+ local features = tfmdata.shared.features
+ local fullname = tfmdata.properties.fullname or "?"
+ if features then
+ initializehashes(tfmdata)
+ local collectlookups = otf.collectlookups
+ local rawdata = tfmdata.shared.rawdata
+ local properties = tfmdata.properties
+ local script = properties.script
+ local language = properties.language
+ local rawfeatures = rawdata.resources.features
+ local basesubstitutions = rawfeatures and rawfeatures.gsub
+ local basepositionings = rawfeatures and rawfeatures.gpos
+ --
+ if basesubstitutions or basepositionings then
+ local sequences = tfmdata.resources.sequences
+ for s=1,#sequences do
+ local sequence = sequences[s]
+ local sfeatures = sequence.features
+ if sfeatures then
+ local order = sequence.order
+ if order then
+ for i=1,#order do --
+ local feature = order[i]
+ local value = features[feature]
+ if value then
+ local validlookups, lookuplist = collectlookups(rawdata,feature,script,language)
+ if not validlookups then
+ -- skip
+ elseif basesubstitutions and basesubstitutions[feature] then
+ if trace_preparing then
+ report_prepare("filtering base %s feature %a for %a with value %a","sub",feature,fullname,value)
+ end
+ preparesubstitutions(tfmdata,feature,value,validlookups,lookuplist)
+ registerbasefeature(feature,value)
+ elseif basepositionings and basepositionings[feature] then
+ if trace_preparing then
+ report_prepare("filtering base %a feature %a for %a with value %a","pos",feature,fullname,value)
+ end
+ preparepositionings(tfmdata,feature,value,validlookups,lookuplist)
+ registerbasefeature(feature,value)
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ --
+ registerbasehash(tfmdata)
+ end
+ if trace_preparing then
+ report_prepare("preparation time is %0.3f seconds for %a",os.clock()-starttime,fullname)
+ end
+ end
+end
+
+registerotffeature {
+ name = "features",
+ description = "features",
+ default = true,
+ initializers = {
+ -- position = 1, -- after setscript (temp hack ... we need to force script / language to 1
+ base = featuresinitializer,
+ }
+}
diff --git a/Master/texmf-dist/tex/context/base/font-otp.lua b/Master/texmf-dist/tex/context/base/mkiv/font-otp.lua
index ebf36ed45d0..91bd05b322f 100644
--- a/Master/texmf-dist/tex/context/base/font-otp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-otp.lua
@@ -12,9 +12,8 @@ if not modules then modules = { } end modules ['font-otp'] = {
--
-- unless we sort all hashes we can get a different pack order (no big deal but size can differ)
-local next, type = next, type
+local next, type, tostring = next, type, tostring
local sort, concat = table.sort, table.concat
-local sortedhash = table.sortedhash
local trace_packing = false trackers.register("otf.packing", function(v) trace_packing = v end)
local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end)
@@ -148,6 +147,7 @@ end
-- we then need to sort more thanks to random hashing
local function packdata(data)
+
if data then
-- stripdata(data)
local h, t, c = { }, { }, { }
@@ -537,6 +537,7 @@ local unpacked_mt = {
}
local function unpackdata(data)
+
if data then
local tables = data.tables
if tables then
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-otr.lua b/Master/texmf-dist/tex/context/base/mkiv/font-otr.lua
new file mode 100644
index 00000000000..a9ad73906c5
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-otr.lua
@@ -0,0 +1,2335 @@
+if not modules then modules = { } end modules ['font-otr'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- When looking into a cid font relates issue in the ff library I wondered if
+-- it made sense to use Lua to filter the information from the otf and ttf
+-- files. Quite some ff code relates to special fonts and in practice we only
+-- use rather normal opentype fonts.
+--
+-- The code here is based on the documentation (and examples) at the microsoft
+-- website. The code will be extended and improved stepwise. After some experiments
+-- I decided to convert to a format more suitable for the context font handler
+-- because it makes no sense to rehash all those lookups again.
+--
+-- Currently we can use this code for getting basic info about the font, loading
+-- shapes and loading the extensive table. I'm not sure if I will provide a ff
+-- compatible output as well (We're not that far from it as currently I can load
+-- all data reasonable fast.)
+
+-- We can omit redundant glyphs names i.e. ones that match the agl or
+-- are just a unicode string but it doesn't save that much. It will be an option
+-- some day.
+
+-- Optimizing the widths wil be done anyway as it save quite some on a cjk font
+-- and the existing (old) code if okay.
+
+-- todo: more messages (only if really needed)
+--
+-- considered, in math:
+--
+-- start -> first (so we can skip the first same-size one)
+-- end -> last
+--
+-- Widths and weights are kind of messy: for instance lmmonolt has a pfmweight of
+-- 400 while it should be 300. So, for now we mostly stick to the old compromis.
+
+-- We don't really need all those language tables so they might be dropped some
+-- day.
+
+-- The new reader is faster on some aspects and slower on other. The memory footprint
+-- is lower. The string reader is a bit faster than the file reader. The new reader
+-- gives more efficient tables and has bit more analysis. In practice these times are
+-- not that relevant because we cache. The otf files take a it more time because we
+-- need to calculate the boundingboxes. In theory the processing of text should be
+-- somewhat faster especially for complex fonts with many lookups.
+--
+-- old new str reader
+-- lmroman12-regular.otf 0.103 0.203 0.195
+-- latinmodern-math.otf 0.454 0.768 0.712
+-- husayni.ttf 1.142 1.526 1.259
+--
+-- If there is demand I will consider making a ff compatible table dumper but it's
+-- probably more fun to provide a way to show features applied.
+
+-- I experimented a bit with f:readbyte(n) and f:readshort() and so and it is indeed
+-- faster but it might not be the real bottleneck as we still need to juggle data. It
+-- is probably more memory efficient as no intermediate strings are involved.
+
+-- if not characters then
+-- require("char-def")
+-- require("char-ini")
+-- end
+
+local next, type, unpack = next, type, unpack
+local byte, lower, char, strip, gsub = string.byte, string.lower, string.char, string.strip, string.gsub
+local bittest = bit32.btest
+local concat, remove, unpack, fastcopy = table.concat, table.remov, table.unpack, table.fastcopy
+local floor, mod, abs, sqrt, round = math.floor, math.mod, math.abs, math.sqrt, math.round
+local P, R, S, C, Cs, Cc, Ct, Carg, Cmt = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Cs, lpeg.Cc, lpeg.Ct, lpeg.Carg, lpeg.Cmt
+local lpegmatch = lpeg.match
+
+local setmetatableindex = table.setmetatableindex
+local formatters = string.formatters
+local sortedkeys = table.sortedkeys
+local sortedhash = table.sortedhash
+local stripstring = string.strip
+local utf16_to_utf8_be = utf.utf16_to_utf8_be
+
+local report = logs.reporter("otf reader")
+
+local trace_cmap = false -- only for checking issues
+
+fonts = fonts or { }
+local handlers = fonts.handlers or { }
+fonts.handlers = handlers
+local otf = handlers.otf or { }
+handlers.otf = otf
+local readers = otf.readers or { }
+otf.readers = readers
+
+----- streamreader = utilities.streams -- faster on big files
+local streamreader = utilities.files -- faster on identify
+
+readers.streamreader = streamreader
+
+local openfile = streamreader.open
+local closefile = streamreader.close
+local skipbytes = streamreader.skip
+local setposition = streamreader.setposition
+local skipshort = streamreader.skipshort
+local readbytes = streamreader.readbytes
+local readstring = streamreader.readstring
+local readbyte = streamreader.readcardinal1 -- 8-bit unsigned integer
+local readushort = streamreader.readcardinal2 -- 16-bit unsigned integer
+local readuint = streamreader.readcardinal3 -- 24-bit unsigned integer
+local readulong = streamreader.readcardinal4 -- 24-bit unsigned integer
+local readchar = streamreader.readinteger1 -- 8-bit signed integer
+local readshort = streamreader.readinteger2 -- 16-bit signed integer
+local readlong = streamreader.readinteger4 -- 24-bit unsigned integer
+local readfixed = streamreader.readfixed4
+local readfword = readshort -- 16-bit signed integer that describes a quantity in FUnits
+local readufword = readushort -- 16-bit unsigned integer that describes a quantity in FUnits
+local readoffset = readushort
+local read2dot14 = streamreader.read2dot14 -- 16-bit signed fixed number with the low 14 bits of fraction (2.14) (F2DOT14)
+
+function streamreader.readtag(f)
+ return lower(strip(readstring(f,4)))
+end
+
+-- date represented in number of seconds since 12:00 midnight, January 1, 1904. The value is represented as a
+-- signed 64-bit integer
+
+local function readlongdatetime(f)
+ local a, b, c, d, e, f, g, h = readbytes(f,8)
+ return 0x100000000 * d + 0x1000000 * e + 0x10000 * f + 0x100 * g + h
+end
+
+local tableversion = 0.004
+local privateoffset = fonts.constructors and fonts.constructors.privateoffset or 0xF0000 -- 0x10FFFF
+
+readers.tableversion = tableversion
+
+local reportedskipped = { }
+
+local function reportskippedtable(tag)
+ if not reportedskipped[tag] then
+ report("loading of table %a skipped (reported once only)",tag)
+ reportedskipped[tag] = true
+ end
+end
+
+-- We have quite some data tables. We are somewhat ff compatible with names but as I used
+-- the information from the microsoft site there can be differences. Eventually I might end
+-- up with a different ordering and naming.
+
+local reservednames = { [0] =
+ "copyright",
+ "family",
+ "subfamily",
+ "uniqueid",
+ "fullname",
+ "version",
+ "postscriptname",
+ "trademark",
+ "manufacturer",
+ "designer",
+ "description", -- descriptor in ff
+ "vendorurl",
+ "designerurl",
+ "license",
+ "licenseurl",
+ "reserved",
+ "typographicfamily", -- preffamilyname
+ "typographicsubfamily", -- prefmodifiers
+ "compatiblefullname", -- for mac
+ "sampletext",
+ "cidfindfontname",
+ "wwsfamily",
+ "wwssubfamily",
+ "lightbackgroundpalette",
+ "darkbackgroundpalette",
+}
+
+-- more at: https://www.microsoft.com/typography/otspec/name.htm
+
+-- setmetatableindex(reservednames,function(t,k)
+-- local v = "name_" .. k
+-- t[k] = v
+-- return v
+-- end)
+
+local platforms = { [0] =
+ "unicode",
+ "macintosh",
+ "iso",
+ "windows",
+ "custom",
+}
+
+local encodings = {
+ -- these stay:
+ unicode = { [0] =
+ "unicode 1.0 semantics",
+ "unicode 1.1 semantics",
+ "iso/iec 10646",
+ "unicode 2.0 bmp", -- cmap subtable formats 0, 4, 6
+ "unicode 2.0 full", -- cmap subtable formats 0, 4, 6, 10, 12
+ "unicode variation sequences", -- cmap subtable format 14).
+ "unicode full repertoire", -- cmap subtable formats 0, 4, 6, 10, 12, 13
+ },
+ -- these can go:
+ macintosh = { [0] =
+ "roman", "japanese", "chinese (traditional)", "korean", "arabic", "hebrew", "greek", "russian",
+ "rsymbol", "devanagari", "gurmukhi", "gujarati", "oriya", "bengali", "tamil", "telugu", "kannada",
+ "malayalam", "sinhalese", "burmese", "khmer", "thai", "laotian", "georgian", "armenian",
+ "chinese (simplified)", "tibetan", "mongolian", "geez", "slavic", "vietnamese", "sindhi",
+ "uninterpreted",
+ },
+ -- these stay:
+ iso = { [0] =
+ "7-bit ascii",
+ "iso 10646",
+ "iso 8859-1",
+ },
+ -- these stay:
+ windows = { [0] =
+ "symbol",
+ "unicode bmp", -- this is utf16
+ "shiftjis",
+ "prc",
+ "big5",
+ "wansung",
+ "johab",
+ "reserved 7",
+ "reserved 8",
+ "reserved 9",
+ "unicode ucs-4",
+ },
+ custom = {
+ --custom: 0-255 : otf windows nt compatibility mapping
+ }
+}
+
+local decoders = {
+ unicode = { },
+ macintosh = { },
+ iso = { },
+ windows = {
+ -- maybe always utf16
+ ["unicode semantics"] = utf16_to_utf8_be,
+ ["unicode bmp"] = utf16_to_utf8_be,
+ ["unicode full"] = utf16_to_utf8_be,
+ ["unicode 1.0 semantics"] = utf16_to_utf8_be,
+ ["unicode 1.1 semantics"] = utf16_to_utf8_be,
+ ["unicode 2.0 bmp"] = utf16_to_utf8_be,
+ ["unicode 2.0 full"] = utf16_to_utf8_be,
+ ["unicode variation sequences"] = utf16_to_utf8_be,
+ ["unicode full repertoire"] = utf16_to_utf8_be,
+ },
+ custom = { },
+}
+
+-- This is bit over the top as we can just look for either windows, unicode or macintosh
+-- names (in that order). A font with no english name is probably a weird one anyway.
+
+local languages = {
+ -- these stay:
+ unicode = {
+ [ 0] = "english",
+ },
+ -- english can stay:
+ macintosh = {
+ [ 0] = "english",
+ -- [ 1] = "french",
+ -- [ 2] = "german",
+ -- [ 3] = "italian",
+ -- [ 4] = "dutch",
+ -- [ 5] = "swedish",
+ -- [ 6] = "spanish",
+ -- [ 7] = "danish",
+ -- [ 8] = "portuguese",
+ -- [ 9] = "norwegian",
+ -- [ 10] = "hebrew",
+ -- [ 11] = "japanese",
+ -- [ 12] = "arabic",
+ -- [ 13] = "finnish",
+ -- [ 14] = "greek",
+ -- [ 15] = "icelandic",
+ -- [ 16] = "maltese",
+ -- [ 17] = "turkish",
+ -- [ 18] = "croatian",
+ -- [ 19] = "chinese (traditional)",
+ -- [ 20] = "urdu",
+ -- [ 21] = "hindi",
+ -- [ 22] = "thai",
+ -- [ 23] = "korean",
+ -- [ 24] = "lithuanian",
+ -- [ 25] = "polish",
+ -- [ 26] = "hungarian",
+ -- [ 27] = "estonian",
+ -- [ 28] = "latvian",
+ -- [ 29] = "sami",
+ -- [ 30] = "faroese",
+ -- [ 31] = "farsi/persian",
+ -- [ 32] = "russian",
+ -- [ 33] = "chinese (simplified)",
+ -- [ 34] = "flemish",
+ -- [ 35] = "irish gaelic",
+ -- [ 36] = "albanian",
+ -- [ 37] = "romanian",
+ -- [ 38] = "czech",
+ -- [ 39] = "slovak",
+ -- [ 40] = "slovenian",
+ -- [ 41] = "yiddish",
+ -- [ 42] = "serbian",
+ -- [ 43] = "macedonian",
+ -- [ 44] = "bulgarian",
+ -- [ 45] = "ukrainian",
+ -- [ 46] = "byelorussian",
+ -- [ 47] = "uzbek",
+ -- [ 48] = "kazakh",
+ -- [ 49] = "azerbaijani (cyrillic script)",
+ -- [ 50] = "azerbaijani (arabic script)",
+ -- [ 51] = "armenian",
+ -- [ 52] = "georgian",
+ -- [ 53] = "moldavian",
+ -- [ 54] = "kirghiz",
+ -- [ 55] = "tajiki",
+ -- [ 56] = "turkmen",
+ -- [ 57] = "mongolian (mongolian script)",
+ -- [ 58] = "mongolian (cyrillic script)",
+ -- [ 59] = "pashto",
+ -- [ 60] = "kurdish",
+ -- [ 61] = "kashmiri",
+ -- [ 62] = "sindhi",
+ -- [ 63] = "tibetan",
+ -- [ 64] = "nepali",
+ -- [ 65] = "sanskrit",
+ -- [ 66] = "marathi",
+ -- [ 67] = "bengali",
+ -- [ 68] = "assamese",
+ -- [ 69] = "gujarati",
+ -- [ 70] = "punjabi",
+ -- [ 71] = "oriya",
+ -- [ 72] = "malayalam",
+ -- [ 73] = "kannada",
+ -- [ 74] = "tamil",
+ -- [ 75] = "telugu",
+ -- [ 76] = "sinhalese",
+ -- [ 77] = "burmese",
+ -- [ 78] = "khmer",
+ -- [ 79] = "lao",
+ -- [ 80] = "vietnamese",
+ -- [ 81] = "indonesian",
+ -- [ 82] = "tagalong",
+ -- [ 83] = "malay (roman script)",
+ -- [ 84] = "malay (arabic script)",
+ -- [ 85] = "amharic",
+ -- [ 86] = "tigrinya",
+ -- [ 87] = "galla",
+ -- [ 88] = "somali",
+ -- [ 89] = "swahili",
+ -- [ 90] = "kinyarwanda/ruanda",
+ -- [ 91] = "rundi",
+ -- [ 92] = "nyanja/chewa",
+ -- [ 93] = "malagasy",
+ -- [ 94] = "esperanto",
+ -- [128] = "welsh",
+ -- [129] = "basque",
+ -- [130] = "catalan",
+ -- [131] = "latin",
+ -- [132] = "quenchua",
+ -- [133] = "guarani",
+ -- [134] = "aymara",
+ -- [135] = "tatar",
+ -- [136] = "uighur",
+ -- [137] = "dzongkha",
+ -- [138] = "javanese (roman script)",
+ -- [139] = "sundanese (roman script)",
+ -- [140] = "galician",
+ -- [141] = "afrikaans",
+ -- [142] = "breton",
+ -- [143] = "inuktitut",
+ -- [144] = "scottish gaelic",
+ -- [145] = "manx gaelic",
+ -- [146] = "irish gaelic (with dot above)",
+ -- [147] = "tongan",
+ -- [148] = "greek (polytonic)",
+ -- [149] = "greenlandic",
+ -- [150] = "azerbaijani (roman script)",
+ },
+ -- these can stay:
+ iso = {
+ },
+ -- english can stay:
+ windows = {
+ -- [0x0436] = "afrikaans - south africa",
+ -- [0x041c] = "albanian - albania",
+ -- [0x0484] = "alsatian - france",
+ -- [0x045e] = "amharic - ethiopia",
+ -- [0x1401] = "arabic - algeria",
+ -- [0x3c01] = "arabic - bahrain",
+ -- [0x0c01] = "arabic - egypt",
+ -- [0x0801] = "arabic - iraq",
+ -- [0x2c01] = "arabic - jordan",
+ -- [0x3401] = "arabic - kuwait",
+ -- [0x3001] = "arabic - lebanon",
+ -- [0x1001] = "arabic - libya",
+ -- [0x1801] = "arabic - morocco",
+ -- [0x2001] = "arabic - oman",
+ -- [0x4001] = "arabic - qatar",
+ -- [0x0401] = "arabic - saudi arabia",
+ -- [0x2801] = "arabic - syria",
+ -- [0x1c01] = "arabic - tunisia",
+ -- [0x3801] = "arabic - u.a.e.",
+ -- [0x2401] = "arabic - yemen",
+ -- [0x042b] = "armenian - armenia",
+ -- [0x044d] = "assamese - india",
+ -- [0x082c] = "azeri (cyrillic) - azerbaijan",
+ -- [0x042c] = "azeri (latin) - azerbaijan",
+ -- [0x046d] = "bashkir - russia",
+ -- [0x042d] = "basque - basque",
+ -- [0x0423] = "belarusian - belarus",
+ -- [0x0845] = "bengali - bangladesh",
+ -- [0x0445] = "bengali - india",
+ -- [0x201a] = "bosnian (cyrillic) - bosnia and herzegovina",
+ -- [0x141a] = "bosnian (latin) - bosnia and herzegovina",
+ -- [0x047e] = "breton - france",
+ -- [0x0402] = "bulgarian - bulgaria",
+ -- [0x0403] = "catalan - catalan",
+ -- [0x0c04] = "chinese - hong kong s.a.r.",
+ -- [0x1404] = "chinese - macao s.a.r.",
+ -- [0x0804] = "chinese - people's republic of china",
+ -- [0x1004] = "chinese - singapore",
+ -- [0x0404] = "chinese - taiwan",
+ -- [0x0483] = "corsican - france",
+ -- [0x041a] = "croatian - croatia",
+ -- [0x101a] = "croatian (latin) - bosnia and herzegovina",
+ -- [0x0405] = "czech - czech republic",
+ -- [0x0406] = "danish - denmark",
+ -- [0x048c] = "dari - afghanistan",
+ -- [0x0465] = "divehi - maldives",
+ -- [0x0813] = "dutch - belgium",
+ -- [0x0413] = "dutch - netherlands",
+ -- [0x0c09] = "english - australia",
+ -- [0x2809] = "english - belize",
+ -- [0x1009] = "english - canada",
+ -- [0x2409] = "english - caribbean",
+ -- [0x4009] = "english - india",
+ -- [0x1809] = "english - ireland",
+ -- [0x2009] = "english - jamaica",
+ -- [0x4409] = "english - malaysia",
+ -- [0x1409] = "english - new zealand",
+ -- [0x3409] = "english - republic of the philippines",
+ -- [0x4809] = "english - singapore",
+ -- [0x1c09] = "english - south africa",
+ -- [0x2c09] = "english - trinidad and tobago",
+ -- [0x0809] = "english - united kingdom",
+ [0x0409] = "english - united states",
+ -- [0x3009] = "english - zimbabwe",
+ -- [0x0425] = "estonian - estonia",
+ -- [0x0438] = "faroese - faroe islands",
+ -- [0x0464] = "filipino - philippines",
+ -- [0x040b] = "finnish - finland",
+ -- [0x080c] = "french - belgium",
+ -- [0x0c0c] = "french - canada",
+ -- [0x040c] = "french - france",
+ -- [0x140c] = "french - luxembourg",
+ -- [0x180c] = "french - principality of monoco",
+ -- [0x100c] = "french - switzerland",
+ -- [0x0462] = "frisian - netherlands",
+ -- [0x0456] = "galician - galician",
+ -- [0x0437] = "georgian -georgia",
+ -- [0x0c07] = "german - austria",
+ -- [0x0407] = "german - germany",
+ -- [0x1407] = "german - liechtenstein",
+ -- [0x1007] = "german - luxembourg",
+ -- [0x0807] = "german - switzerland",
+ -- [0x0408] = "greek - greece",
+ -- [0x046f] = "greenlandic - greenland",
+ -- [0x0447] = "gujarati - india",
+ -- [0x0468] = "hausa (latin) - nigeria",
+ -- [0x040d] = "hebrew - israel",
+ -- [0x0439] = "hindi - india",
+ -- [0x040e] = "hungarian - hungary",
+ -- [0x040f] = "icelandic - iceland",
+ -- [0x0470] = "igbo - nigeria",
+ -- [0x0421] = "indonesian - indonesia",
+ -- [0x045d] = "inuktitut - canada",
+ -- [0x085d] = "inuktitut (latin) - canada",
+ -- [0x083c] = "irish - ireland",
+ -- [0x0434] = "isixhosa - south africa",
+ -- [0x0435] = "isizulu - south africa",
+ -- [0x0410] = "italian - italy",
+ -- [0x0810] = "italian - switzerland",
+ -- [0x0411] = "japanese - japan",
+ -- [0x044b] = "kannada - india",
+ -- [0x043f] = "kazakh - kazakhstan",
+ -- [0x0453] = "khmer - cambodia",
+ -- [0x0486] = "k'iche - guatemala",
+ -- [0x0487] = "kinyarwanda - rwanda",
+ -- [0x0441] = "kiswahili - kenya",
+ -- [0x0457] = "konkani - india",
+ -- [0x0412] = "korean - korea",
+ -- [0x0440] = "kyrgyz - kyrgyzstan",
+ -- [0x0454] = "lao - lao p.d.r.",
+ -- [0x0426] = "latvian - latvia",
+ -- [0x0427] = "lithuanian - lithuania",
+ -- [0x082e] = "lower sorbian - germany",
+ -- [0x046e] = "luxembourgish - luxembourg",
+ -- [0x042f] = "macedonian (fyrom) - former yugoslav republic of macedonia",
+ -- [0x083e] = "malay - brunei darussalam",
+ -- [0x043e] = "malay - malaysia",
+ -- [0x044c] = "malayalam - india",
+ -- [0x043a] = "maltese - malta",
+ -- [0x0481] = "maori - new zealand",
+ -- [0x047a] = "mapudungun - chile",
+ -- [0x044e] = "marathi - india",
+ -- [0x047c] = "mohawk - mohawk",
+ -- [0x0450] = "mongolian (cyrillic) - mongolia",
+ -- [0x0850] = "mongolian (traditional) - people's republic of china",
+ -- [0x0461] = "nepali - nepal",
+ -- [0x0414] = "norwegian (bokmal) - norway",
+ -- [0x0814] = "norwegian (nynorsk) - norway",
+ -- [0x0482] = "occitan - france",
+ -- [0x0448] = "odia (formerly oriya) - india",
+ -- [0x0463] = "pashto - afghanistan",
+ -- [0x0415] = "polish - poland",
+ -- [0x0416] = "portuguese - brazil",
+ -- [0x0816] = "portuguese - portugal",
+ -- [0x0446] = "punjabi - india",
+ -- [0x046b] = "quechua - bolivia",
+ -- [0x086b] = "quechua - ecuador",
+ -- [0x0c6b] = "quechua - peru",
+ -- [0x0418] = "romanian - romania",
+ -- [0x0417] = "romansh - switzerland",
+ -- [0x0419] = "russian - russia",
+ -- [0x243b] = "sami (inari) - finland",
+ -- [0x103b] = "sami (lule) - norway",
+ -- [0x143b] = "sami (lule) - sweden",
+ -- [0x0c3b] = "sami (northern) - finland",
+ -- [0x043b] = "sami (northern) - norway",
+ -- [0x083b] = "sami (northern) - sweden",
+ -- [0x203b] = "sami (skolt) - finland",
+ -- [0x183b] = "sami (southern) - norway",
+ -- [0x1c3b] = "sami (southern) - sweden",
+ -- [0x044f] = "sanskrit - india",
+ -- [0x1c1a] = "serbian (cyrillic) - bosnia and herzegovina",
+ -- [0x0c1a] = "serbian (cyrillic) - serbia",
+ -- [0x181a] = "serbian (latin) - bosnia and herzegovina",
+ -- [0x081a] = "serbian (latin) - serbia",
+ -- [0x046c] = "sesotho sa leboa - south africa",
+ -- [0x0432] = "setswana - south africa",
+ -- [0x045b] = "sinhala - sri lanka",
+ -- [0x041b] = "slovak - slovakia",
+ -- [0x0424] = "slovenian - slovenia",
+ -- [0x2c0a] = "spanish - argentina",
+ -- [0x400a] = "spanish - bolivia",
+ -- [0x340a] = "spanish - chile",
+ -- [0x240a] = "spanish - colombia",
+ -- [0x140a] = "spanish - costa rica",
+ -- [0x1c0a] = "spanish - dominican republic",
+ -- [0x300a] = "spanish - ecuador",
+ -- [0x440a] = "spanish - el salvador",
+ -- [0x100a] = "spanish - guatemala",
+ -- [0x480a] = "spanish - honduras",
+ -- [0x080a] = "spanish - mexico",
+ -- [0x4c0a] = "spanish - nicaragua",
+ -- [0x180a] = "spanish - panama",
+ -- [0x3c0a] = "spanish - paraguay",
+ -- [0x280a] = "spanish - peru",
+ -- [0x500a] = "spanish - puerto rico",
+ -- [0x0c0a] = "spanish (modern sort) - spain",
+ -- [0x040a] = "spanish (traditional sort) - spain",
+ -- [0x540a] = "spanish - united states",
+ -- [0x380a] = "spanish - uruguay",
+ -- [0x200a] = "spanish - venezuela",
+ -- [0x081d] = "sweden - finland",
+ -- [0x041d] = "swedish - sweden",
+ -- [0x045a] = "syriac - syria",
+ -- [0x0428] = "tajik (cyrillic) - tajikistan",
+ -- [0x085f] = "tamazight (latin) - algeria",
+ -- [0x0449] = "tamil - india",
+ -- [0x0444] = "tatar - russia",
+ -- [0x044a] = "telugu - india",
+ -- [0x041e] = "thai - thailand",
+ -- [0x0451] = "tibetan - prc",
+ -- [0x041f] = "turkish - turkey",
+ -- [0x0442] = "turkmen - turkmenistan",
+ -- [0x0480] = "uighur - prc",
+ -- [0x0422] = "ukrainian - ukraine",
+ -- [0x042e] = "upper sorbian - germany",
+ -- [0x0420] = "urdu - islamic republic of pakistan",
+ -- [0x0843] = "uzbek (cyrillic) - uzbekistan",
+ -- [0x0443] = "uzbek (latin) - uzbekistan",
+ -- [0x042a] = "vietnamese - vietnam",
+ -- [0x0452] = "welsh - united kingdom",
+ -- [0x0488] = "wolof - senegal",
+ -- [0x0485] = "yakut - russia",
+ -- [0x0478] = "yi - prc",
+ -- [0x046a] = "yoruba - nigeria",
+ },
+ custom = {
+ },
+}
+
+local standardromanencoding = { [0] = -- taken from wikipedia
+ "notdef", ".null", "nonmarkingreturn", "space", "exclam", "quotedbl",
+ "numbersign", "dollar", "percent", "ampersand", "quotesingle", "parenleft",
+ "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash",
+ "zero", "one", "two", "three", "four", "five", "six", "seven", "eight",
+ "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at",
+ "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", "bracketleft",
+ "backslash", "bracketright", "asciicircum", "underscore", "grave", "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", "braceleft", "bar",
+ "braceright", "asciitilde", "Adieresis", "Aring", "Ccedilla", "Eacute",
+ "Ntilde", "Odieresis", "Udieresis", "aacute", "agrave", "acircumflex",
+ "adieresis", "atilde", "aring", "ccedilla", "eacute", "egrave",
+ "ecircumflex", "edieresis", "iacute", "igrave", "icircumflex", "idieresis",
+ "ntilde", "oacute", "ograve", "ocircumflex", "odieresis", "otilde", "uacute",
+ "ugrave", "ucircumflex", "udieresis", "dagger", "degree", "cent", "sterling",
+ "section", "bullet", "paragraph", "germandbls", "registered", "copyright",
+ "trademark", "acute", "dieresis", "notequal", "AE", "Oslash", "infinity",
+ "plusminus", "lessequal", "greaterequal", "yen", "mu", "partialdiff",
+ "summation", "product", "pi", "integral", "ordfeminine", "ordmasculine",
+ "Omega", "ae", "oslash", "questiondown", "exclamdown", "logicalnot",
+ "radical", "florin", "approxequal", "Delta", "guillemotleft",
+ "guillemotright", "ellipsis", "nonbreakingspace", "Agrave", "Atilde",
+ "Otilde", "OE", "oe", "endash", "emdash", "quotedblleft", "quotedblright",
+ "quoteleft", "quoteright", "divide", "lozenge", "ydieresis", "Ydieresis",
+ "fraction", "currency", "guilsinglleft", "guilsinglright", "fi", "fl",
+ "daggerdbl", "periodcentered", "quotesinglbase", "quotedblbase",
+ "perthousand", "Acircumflex", "Ecircumflex", "Aacute", "Edieresis", "Egrave",
+ "Iacute", "Icircumflex", "Idieresis", "Igrave", "Oacute", "Ocircumflex",
+ "apple", "Ograve", "Uacute", "Ucircumflex", "Ugrave", "dotlessi",
+ "circumflex", "tilde", "macron", "breve", "dotaccent", "ring", "cedilla",
+ "hungarumlaut", "ogonek", "caron", "Lslash", "lslash", "Scaron", "scaron",
+ "Zcaron", "zcaron", "brokenbar", "Eth", "eth", "Yacute", "yacute", "Thorn",
+ "thorn", "minus", "multiply", "onesuperior", "twosuperior", "threesuperior",
+ "onehalf", "onequarter", "threequarters", "franc", "Gbreve", "gbreve",
+ "Idotaccent", "Scedilla", "scedilla", "Cacute", "cacute", "Ccaron", "ccaron",
+ "dcroat",
+}
+
+local weights = {
+ [100] = "thin",
+ [200] = "extralight",
+ [300] = "light",
+ [400] = "normal",
+ [500] = "medium",
+ [600] = "semibold",
+ [700] = "bold",
+ [800] = "extrabold",
+ [900] = "black",
+}
+
+local widths = {
+ [1] = "ultracondensed",
+ [2] = "extracondensed",
+ [3] = "condensed",
+ [4] = "semicondensed",
+ [5] = "normal",
+ [6] = "semiexpanded",
+ [7] = "expanded",
+ [8] = "extraexpanded",
+ [9] = "ultraexpanded",
+}
+
+setmetatableindex(weights, function(t,k)
+ local r = floor((k + 50) / 100) * 100
+ local v = (r > 900 and "black") or rawget(t,r) or "normal"
+-- print("weight:",k,r,v)
+ return v
+end)
+
+setmetatableindex(widths,function(t,k)
+-- print("width:",k)
+ return "normal"
+end)
+
+local panoseweights = {
+ [ 0] = "normal",
+ [ 1] = "normal",
+ [ 2] = "verylight",
+ [ 3] = "light",
+ [ 4] = "thin",
+ [ 5] = "book",
+ [ 6] = "medium",
+ [ 7] = "demi",
+ [ 8] = "bold",
+ [ 9] = "heavy",
+ [10] = "black",
+}
+
+local panosewidths = {
+ [ 0] = "normal",
+ [ 1] = "normal",
+ [ 2] = "normal",
+ [ 3] = "normal",
+ [ 4] = "normal",
+ [ 5] = "expanded",
+ [ 6] = "condensed",
+ [ 7] = "veryexpanded",
+ [ 8] = "verycondensed",
+ [ 9] = "monospaced",
+}
+
+-- We implement a reader per table.
+
+-- The name table is probably the first one to load. After all this one provides
+-- useful information about what we deal with. The complication is that we need
+-- to filter the best one available.
+
+local platformnames = {
+ postscriptname = true,
+ fullname = true,
+ family = true,
+ subfamily = true,
+ typographicfamily = true,
+ typographicsubfamily = true,
+ compatiblefullname = true,
+}
+
+function readers.name(f,fontdata,specification)
+ local datatable = fontdata.tables.name
+ if datatable then
+ setposition(f,datatable.offset)
+ local format = readushort(f)
+ local nofnames = readushort(f)
+ local offset = readushort(f)
+ -- we can also provide a raw list as extra, todo as option
+ local start = datatable.offset + offset
+ local namelists = {
+ unicode = { },
+ windows = { },
+ macintosh = { },
+ -- iso = { },
+ -- windows = { },
+ }
+ for i=1,nofnames do
+ local platform = platforms[readushort(f)]
+ if platform then
+ local namelist = namelists[platform]
+ if namelist then
+ local encoding = readushort(f)
+ local language = readushort(f)
+ local encodings = encodings[platform]
+ local languages = languages[platform]
+ if encodings and languages then
+ local encoding = encodings[encoding]
+ local language = languages[language]
+ if encoding and language then
+ local name = reservednames[readushort(f)]
+ if name then
+ namelist[#namelist+1] = {
+ platform = platform,
+ encoding = encoding,
+ language = language,
+ name = name,
+ length = readushort(f),
+ offset = start + readushort(f),
+ }
+ else
+ skipshort(f,2)
+ end
+ else
+ skipshort(f,3)
+ end
+ else
+ skipshort(f,3)
+ end
+ else
+ skipshort(f,5)
+ end
+ else
+ skipshort(f,5)
+ end
+ end
+ -- if format == 1 then
+ -- local noftags = readushort(f)
+ -- for i=1,noftags do
+ -- local length = readushort(f)
+ -- local offset = readushort(f)
+ -- end
+ -- end
+ --
+ -- we need to choose one we like, for instance an unicode one
+ --
+ local names = { }
+ local done = { }
+ --
+ -- there is quite some logic in ff ... hard to follow so we start simple
+ -- and extend when we run into it (todo: proper reverse hash) .. we're only
+ -- interested in english anyway
+ --
+ local function filter(platform,e,l)
+ local namelist = namelists[platform]
+ for i=1,#namelist do
+ local name = namelist[i]
+ local nametag = name.name
+ if not done[nametag] then
+ local encoding = name.encoding
+ local language = name.language
+ if (not e or encoding == e) and (not l or language == l) then
+ setposition(f,name.offset)
+ local content = readstring(f,name.length)
+ local decoder = decoders[platform]
+ if decoder then
+ decoder = decoder[encoding]
+ end
+ if decoder then
+ content = decoder(content)
+ end
+ names[nametag] = {
+ content = content,
+ platform = platform,
+ encoding = encoding,
+ language = language,
+ }
+ done[nametag] = true
+ end
+ end
+ end
+ end
+ --
+ filter("windows","unicode bmp","english - united states")
+ -- filter("unicode") -- which one ?
+ filter("macintosh","roman","english")
+ filter("windows")
+ filter("macintosh")
+ filter("unicode")
+ --
+ fontdata.names = names
+ --
+ if specification.platformnames then
+ local collected = { }
+ for platform, namelist in next, namelists do
+ local filtered = false
+ for i=1,#namelist do
+ local entry = namelist[i]
+ local name = entry.name
+ if platformnames[name] then
+ setposition(f,entry.offset)
+ local content = readstring(f,entry.length)
+ local encoding = entry.encoding
+ local decoder = decoders[platform]
+ if decoder then
+ decoder = decoder[encoding]
+ end
+ if decoder then
+ content = decoder(content)
+ end
+ if filtered then
+ filtered[name] = content
+ else
+ filtered = { [name] = content }
+ end
+ end
+ end
+ if filtered then
+ collected[platform] = filtered
+ end
+ end
+ fontdata.platformnames = collected
+ end
+ else
+ fontdata.names = { }
+ end
+end
+
+----- validutf = lpeg.patterns.utf8character^0 * P(-1)
+local validutf = lpeg.patterns.validutf8
+
+local function getname(fontdata,key)
+ local names = fontdata.names
+ if names then
+ local value = names[key]
+ if value then
+ local content = value.content
+ return lpegmatch(validutf,content) and content or nil
+ end
+ end
+end
+
+-- This table is an original windows (with its precursor os/2) table. In ff this one is
+-- part of the pfminfo table but here we keep it separate (for now). We will create a
+-- properties table afterwards.
+
+readers["os/2"] = function(f,fontdata)
+ local datatable = fontdata.tables["os/2"]
+ if datatable then
+ setposition(f,datatable.offset)
+ local version = readushort(f)
+ local windowsmetrics = {
+ version = version,
+ averagewidth = readshort(f),
+ weightclass = readushort(f),
+ widthclass = readushort(f),
+ fstype = readushort(f),
+ subscriptxsize = readshort(f),
+ subscriptysize = readshort(f),
+ subscriptxoffset = readshort(f),
+ subscriptyoffset = readshort(f),
+ superscriptxsize = readshort(f),
+ superscriptysize = readshort(f),
+ superscriptxoffset = readshort(f),
+ superscriptyoffset = readshort(f),
+ strikeoutsize = readshort(f),
+ strikeoutpos = readshort(f),
+ familyclass = readshort(f),
+ panose = { readbytes(f,10) },
+ unicoderanges = { readulong(f), readulong(f), readulong(f), readulong(f) },
+ vendor = readstring(f,4),
+ fsselection = readushort(f),
+ firstcharindex = readushort(f),
+ lastcharindex = readushort(f),
+ typoascender = readshort(f),
+ typodescender = readshort(f),
+ typolinegap = readshort(f),
+ winascent = readushort(f),
+ windescent = readushort(f),
+ }
+ if version >= 1 then
+ windowsmetrics.codepageranges = { readulong(f), readulong(f) }
+ end
+ if version >= 3 then
+ windowsmetrics.xheight = readshort(f)
+ windowsmetrics.capheight = readshort(f)
+ windowsmetrics.defaultchar = readushort(f)
+ windowsmetrics.breakchar = readushort(f)
+ -- windowsmetrics.maxcontexts = readushort(f)
+ -- windowsmetrics.loweropticalpointsize = readushort(f)
+ -- windowsmetrics.upperopticalpointsize = readushort(f)
+ end
+ --
+ -- todo: unicoderanges
+ --
+ windowsmetrics.weight = windowsmetrics.weightclass and weights[windowsmetrics.weightclass]
+ windowsmetrics.width = windowsmetrics.widthclass and widths [windowsmetrics.widthclass]
+ --
+ windowsmetrics.panoseweight = panoseweights[windowsmetrics.panose[3]]
+ windowsmetrics.panosewidth = panosewidths [windowsmetrics.panose[4]]
+ --
+ fontdata.windowsmetrics = windowsmetrics
+ else
+ fontdata.windowsmetrics = { }
+ end
+end
+
+readers.head = function(f,fontdata)
+ local datatable = fontdata.tables.head
+ if datatable then
+ setposition(f,datatable.offset)
+ local fontheader = {
+ version = readfixed(f),
+ revision = readfixed(f),
+ checksum = readulong(f),
+ magic = readulong(f),
+ flags = readushort(f),
+ units = readushort(f),
+ created = readlongdatetime(f),
+ modified = readlongdatetime(f),
+ xmin = readshort(f),
+ ymin = readshort(f),
+ xmax = readshort(f),
+ ymax = readshort(f),
+ macstyle = readushort(f),
+ smallpixels = readushort(f),
+ directionhint = readshort(f),
+ indextolocformat = readshort(f),
+ glyphformat = readshort(f),
+ }
+ fontdata.fontheader = fontheader
+ else
+ fontdata.fontheader = { }
+ end
+ fontdata.nofglyphs = 0
+end
+
+-- This table is a rather simple one. No treatment of values is needed here. Most
+-- variables are not used but nofhmetrics is quite important.
+
+readers.hhea = function(f,fontdata,specification)
+ if specification.details then
+ local datatable = fontdata.tables.hhea
+ if datatable then
+ setposition(f,datatable.offset)
+ fontdata.horizontalheader = {
+ version = readfixed(f),
+ ascender = readfword(f),
+ descender = readfword(f),
+ linegap = readfword(f),
+ maxadvancewidth = readufword(f),
+ minleftsidebearing = readfword(f),
+ minrightsidebearing = readfword(f),
+ maxextent = readfword(f),
+ caretsloperise = readshort(f),
+ caretsloperun = readshort(f),
+ caretoffset = readshort(f),
+ reserved_1 = readshort(f),
+ reserved_2 = readshort(f),
+ reserved_3 = readshort(f),
+ reserved_4 = readshort(f),
+ metricdataformat = readshort(f),
+ nofhmetrics = readushort(f),
+ }
+ else
+ fontdata.horizontalheader = {
+ nofhmetrics = 0,
+ }
+ end
+ end
+end
+
+-- We probably never need all these variables, but we do need the nofglyphs when loading other
+-- tables. Again we use the microsoft names but see no reason to have "max" in each name.
+
+-- fontdata.maximumprofile can be bad
+
+readers.maxp = function(f,fontdata,specification)
+ if specification.details then
+ local datatable = fontdata.tables.maxp
+ if datatable then
+ setposition(f,datatable.offset)
+ local version = readfixed(f)
+ local nofglyphs = readushort(f)
+ fontdata.nofglyphs = nofglyphs
+ if version == 0.5 then
+ fontdata.maximumprofile = {
+ version = version,
+ nofglyphs = nofglyphs,
+ }
+ return
+ elseif version == 1.0 then
+ fontdata.maximumprofile = {
+ version = version,
+ nofglyphs = nofglyphs,
+ points = readushort(f),
+ contours = readushort(f),
+ compositepoints = readushort(f),
+ compositecontours = readushort(f),
+ zones = readushort(f),
+ twilightpoints = readushort(f),
+ storage = readushort(f),
+ functiondefs = readushort(f),
+ instructiondefs = readushort(f),
+ stackelements = readushort(f),
+ sizeofinstructions = readushort(f),
+ componentelements = readushort(f),
+ componentdepth = readushort(f),
+ }
+ return
+ end
+ end
+ fontdata.maximumprofile = {
+ version = version,
+ nofglyphs = 0,
+ }
+ end
+end
+
+-- Here we filter the (advance) widths (that can be different from the boundingbox width of
+-- course).
+
+readers.hmtx = function(f,fontdata,specification)
+ if specification.glyphs then
+ local datatable = fontdata.tables.hmtx
+ if datatable then
+ setposition(f,datatable.offset)
+ local nofmetrics = fontdata.horizontalheader.nofhmetrics
+ local glyphs = fontdata.glyphs
+ local nofglyphs = fontdata.nofglyphs
+ local width = 0 -- advance
+ local leftsidebearing = 0
+ for i=0,nofmetrics-1 do
+ local glyph = glyphs[i]
+ width = readshort(f)
+ leftsidebearing = readshort(f)
+ if width ~= 0 then
+ glyph.width = width
+ end
+ -- if leftsidebearing ~= 0 then
+ -- glyph.lsb = leftsidebearing
+ -- end
+ end
+ -- The next can happen in for instance a monospace font or in a cjk font
+ -- with fixed widths.
+ for i=nofmetrics,nofglyphs-1 do
+ local glyph = glyphs[i]
+ if width ~= 0 then
+ glyph.width = width
+ end
+ -- if leftsidebearing ~= 0 then
+ -- glyph.lsb = leftsidebearing
+ -- end
+ end
+ end
+ end
+end
+
+-- The post table relates to postscript (printing) but has some relevant properties for other
+-- usage as well. We just use the names from the microsoft specification. The version 2.0
+-- description is somewhat fuzzy but it is a hybrid with overloads.
+
+readers.post = function(f,fontdata,specification)
+ local datatable = fontdata.tables.post
+ if datatable then
+ setposition(f,datatable.offset)
+ local version = readfixed(f)
+ fontdata.postscript = {
+ version = version,
+ italicangle = round(1000*readfixed(f))/1000,
+ underlineposition = readfword(f),
+ underlinethickness = readfword(f),
+ monospaced = readulong(f),
+ minmemtype42 = readulong(f),
+ maxmemtype42 = readulong(f),
+ minmemtype1 = readulong(f),
+ maxmemtype1 = readulong(f),
+ }
+ if not specification.glyphs then
+ -- enough done
+ elseif version == 1.0 then
+ -- mac encoding (258 glyphs)
+ for index=0,#standardromanencoding do
+ glyphs[index].name = standardromanencoding[index]
+ end
+ elseif version == 2.0 then
+ local glyphs = fontdata.glyphs
+ local nofglyphs = readushort(f)
+ local indices = { }
+ local names = { }
+ local maxnames = 0
+ for i=0,nofglyphs-1 do
+ local nameindex = readushort(f)
+ if nameindex >= 258 then
+ maxnames = maxnames + 1
+ nameindex = nameindex - 257
+ indices[nameindex] = i
+ else
+ glyphs[i].name = standardromanencoding[nameindex]
+ end
+ end
+ for i=1,maxnames do
+ local mapping = indices[i]
+ if not mapping then
+ report("quit post name fetching at %a of %a: %s",i,maxnames,"no index")
+ break
+ else
+ local length = readbyte(f)
+ if length > 0 then
+ glyphs[mapping].name = readstring(f,length)
+ else
+ report("quit post name fetching at %a of %a: %s",i,maxnames,"overflow")
+ break
+ end
+ end
+ end
+ elseif version == 2.5 then
+ -- depricated, will be done when needed
+ elseif version == 3.0 then
+ -- no ps name information
+ end
+ else
+ fontdata.postscript = { }
+ end
+end
+
+readers.cff = function(f,fontdata,specification)
+ if specification.glyphs then
+ reportskippedtable("cff")
+ end
+end
+
+-- Not all cmaps make sense .. e.g. dfont is obsolete and probably more are not relevant. Let's see
+-- what we run into. There is some weird calculation going on here because we offset in a table
+-- being a blob of memory or file. Anyway, I can't stand lunatic formats like this esp when there
+-- is no real gain.
+
+local formatreaders = { }
+local duplicatestoo = true
+
+local sequence = {
+ { 3, 1, 4 },
+ { 3, 10, 12 },
+ { 0, 3, 4 },
+ { 0, 1, 4 },
+ -- { 0, 4, 12 },
+ { 0, 0, 6 },
+ { 3, 0, 6 },
+ -- variants
+ { 0, 5, 14 },
+ -- last resort ranges
+ { 3, 10, 13 },
+}
+
+-- local sequence = {
+-- { 0, 1, 4 },
+-- { 0, 4, 12 },
+-- { 0, 3, 4 },
+-- { 3, 1, 4 },
+-- { 3, 10, 12 },
+-- { 0, 0, 6 },
+-- { 3, 0, 6 },
+-- -- variants
+-- { 0, 5, 14 },
+-- }
+
+local supported = { }
+
+for i=1,#sequence do
+ local sp, se, sf = unpack(sequence[i])
+ local p = supported[sp]
+ if not p then
+ p = { }
+ supported[sp] = p
+ end
+ local e = p[se]
+ if not e then
+ e = { }
+ p[se] = e
+ end
+ e[sf] = true
+end
+
+formatreaders[4] = function(f,fontdata,offset)
+ setposition(f,offset+2) -- skip format
+ --
+ local length = readushort(f) -- in bytes of subtable
+ local language = readushort(f)
+ local nofsegments = readushort(f) / 2
+ --
+ skipshort(f,3) -- searchrange entryselector rangeshift
+ --
+ local endchars = { }
+ local startchars = { }
+ local deltas = { }
+ local offsets = { }
+ local indices = { }
+ local mapping = fontdata.mapping
+ local glyphs = fontdata.glyphs
+ local duplicates = fontdata.duplicates
+ local nofdone = 0
+ --
+ for i=1,nofsegments do
+ endchars[i] = readushort(f)
+ end
+ local reserved = readushort(f) -- 0
+ for i=1,nofsegments do
+ startchars[i] = readushort(f)
+ end
+ for i=1,nofsegments do
+ deltas[i] = readshort(f)
+ end
+ for i=1,nofsegments do
+ offsets[i] = readushort(f)
+ end
+ -- format length language nofsegments searchrange entryselector rangeshift 4-tables
+ local size = (length - 2 * 2 - 5 * 2 - 4 * nofsegments * 2) / 2
+ for i=1,size-1 do
+ indices[i] = readushort(f)
+ end
+ --
+ for segment=1,nofsegments do
+ local startchar = startchars[segment]
+ local endchar = endchars[segment]
+ local offset = offsets[segment]
+ local delta = deltas[segment]
+ if startchar == 0xFFFF and endchar == 0xFFFF then
+ -- break
+ elseif startchar == 0xFFFF and offset == 0 then
+ -- break
+ elseif offset == 0xFFFF then
+ -- bad encoding
+ elseif offset == 0 then
+ if trace_cmap then
+ report("format 4.%i segment %2i from %C upto %C at index %H",1,segment,startchar,endchar,mod(startchar + delta,65536))
+ end
+ for unicode=startchar,endchar do
+ local index = mod(unicode + delta,65536)
+ if index and index > 0 then
+ local glyph = glyphs[index]
+ if glyph then
+ local gu = glyph.unicode
+ if not gu then
+ glyph.unicode = unicode
+ nofdone = nofdone + 1
+ elseif gu ~= unicode then
+ if duplicatestoo then
+ local d = duplicates[gu]
+ if d then
+ d[unicode] = true
+ else
+ duplicates[gu] = { [unicode] = true }
+ end
+ else
+ -- no duplicates ... weird side effects in lm
+ report("duplicate case 1: %C %04i %s",unicode,index,glyphs[index].name)
+ end
+ end
+ if not mapping[index] then
+ mapping[index] = unicode
+ end
+ end
+ end
+ end
+ else
+ local shift = (segment-nofsegments+offset/2) - startchar
+ if trace_cmap then
+ report("format 4.%i segment %2i from %C upto %C at index %H",0,segment,startchar,endchar,mod(startchar + delta,65536))
+ end
+ for unicode=startchar,endchar do
+ local slot = shift + unicode
+ local index = indices[slot]
+ if index and index > 0 then
+ index = mod(index + delta,65536)
+ local glyph = glyphs[index]
+ if glyph then
+ local gu = glyph.unicode
+ if not gu then
+ glyph.unicode = unicode
+ nofdone = nofdone + 1
+ elseif gu ~= unicode then
+ if duplicatestoo then
+ local d = duplicates[gu]
+ if d then
+ d[unicode] = true
+ else
+ duplicates[gu] = { [unicode] = true }
+ end
+ else
+ -- no duplicates ... weird side effects in lm
+ report("duplicate case 2: %C %04i %s",unicode,index,glyphs[index].name)
+ end
+ end
+ if not mapping[index] then
+ mapping[index] = unicode
+ end
+ end
+ end
+ end
+ end
+ end
+ return nofdone
+end
+
+formatreaders[6] = function(f,fontdata,offset)
+ setposition(f,offset) -- + 2 + 2 + 2 -- skip format length language
+ local format = readushort(f)
+ local length = readushort(f)
+ local language = readushort(f)
+ local mapping = fontdata.mapping
+ local glyphs = fontdata.glyphs
+ local duplicates = fontdata.duplicates
+ local start = readushort(f)
+ local count = readushort(f)
+ local stop = start+count-1
+ local nofdone = 0
+ if trace_cmap then
+ report("format 6 from %C to %C",2,start,stop)
+ end
+ for unicode=start,stop do
+ local index = readushort(f)
+ if index > 0 then
+ local glyph = glyphs[index]
+ if glyph then
+ local gu = glyph.unicode
+ if not gu then
+ glyph.unicode = unicode
+ nofdone = nofdone + 1
+ elseif gu ~= unicode then
+ -- report("format 6 overloading %C to %C",gu,unicode)
+ -- glyph.unicode = unicode
+ -- no duplicates ... weird side effects in lm
+ end
+ if not mapping[index] then
+ mapping[index] = unicode
+ end
+ end
+ end
+ end
+ return nofdone
+end
+
+formatreaders[12] = function(f,fontdata,offset)
+ setposition(f,offset+2+2+4+4) -- skip format reserved length language
+ local mapping = fontdata.mapping
+ local glyphs = fontdata.glyphs
+ local duplicates = fontdata.duplicates
+ local nofgroups = readulong(f)
+ local nofdone = 0
+ for i=1,nofgroups do
+ local first = readulong(f)
+ local last = readulong(f)
+ local index = readulong(f)
+ if trace_cmap then
+ report("format 12 from %C to %C starts at index %i",first,last,index)
+ end
+ for unicode=first,last do
+ local glyph = glyphs[index]
+ if glyph then
+ local gu = glyph.unicode
+ if not gu then
+ glyph.unicode = unicode
+ nofdone = nofdone + 1
+ elseif gu ~= unicode then
+ -- e.g. sourcehan fonts need this
+ local d = duplicates[gu]
+ if d then
+ d[unicode] = true
+ else
+ duplicates[gu] = { [unicode] = true }
+ end
+ end
+ if not mapping[index] then
+ mapping[index] = unicode
+ end
+ end
+ index = index + 1
+ end
+ end
+ return nofdone
+end
+
+formatreaders[13] = function(f,fontdata,offset)
+ --
+ -- this fector is only used for simple fallback fonts
+ --
+ setposition(f,offset+2+2+4+4) -- skip format reserved length language
+ local mapping = fontdata.mapping
+ local glyphs = fontdata.glyphs
+ local duplicates = fontdata.duplicates
+ local nofgroups = readulong(f)
+ local nofdone = 0
+ for i=1,nofgroups do
+ local first = readulong(f)
+ local last = readulong(f)
+ local index = readulong(f)
+ if first < privateoffset then
+ if trace_cmap then
+ report("format 13 from %C to %C get index %i",first,last,index)
+ end
+ local glyph = glyphs[index]
+ local unicode = glyph.unicode
+ if not unicode then
+ unicode = first
+ glyph.unicode = unicode
+ first = first + 1
+ end
+ local list = duplicates[unicode]
+ mapping[index] = unicode
+ if not list then
+ list = { }
+ duplicates[unicode] = list
+ end
+ if last >= privateoffset then
+ local limit = privateoffset - 1
+ report("format 13 from %C to %C pruned to %C",first,last,limit)
+ last = limit
+ end
+ for unicode=first,last do
+ list[unicode] = true
+ end
+ nofdone = nofdone + last - first + 1
+ else
+ report("format 13 from %C to %C ignored",first,last)
+ end
+ end
+ return nofdone
+end
+
+formatreaders[14] = function(f,fontdata,offset)
+ if offset and offset ~= 0 then
+ setposition(f,offset)
+ local format = readushort(f)
+ local length = readulong(f)
+ local nofrecords = readulong(f)
+ local records = { }
+ local variants = { }
+ local nofdone = 0
+ fontdata.variants = variants
+ for i=1,nofrecords do
+ records[i] = {
+ selector = readuint(f),
+ default = readulong(f), -- default offset
+ other = readulong(f), -- non-default offset
+ }
+ end
+ for i=1,nofrecords do
+ local record = records[i]
+ local selector = record.selector
+ local default = record.default
+ local other = record.other
+ --
+ -- there is no need to map the defaults to themselves
+ --
+ -- if default ~= 0 then
+ -- setposition(f,offset+default)
+ -- local nofranges = readulong(f)
+ -- for i=1,nofranges do
+ -- local start = readuint(f)
+ -- local extra = readbyte(f)
+ -- for i=start,start+extra do
+ -- mapping[i] = i
+ -- end
+ -- end
+ -- end
+ local other = record.other
+ if other ~= 0 then
+ setposition(f,offset+other)
+ local mapping = { }
+ local count = readulong(f)
+ for i=1,count do
+ mapping[readuint(f)] = readushort(f)
+ end
+ nofdone = nofdone + count
+ variants[selector] = mapping
+ end
+ end
+ return nofdone
+ else
+ return 0
+ end
+end
+
+local function checkcmap(f,fontdata,records,platform,encoding,format)
+ local data = records[platform]
+ if not data then
+ return 0
+ end
+ data = data[encoding]
+ if not data then
+ return 0
+ end
+ data = data[format]
+ if not data then
+ return 0
+ end
+ local reader = formatreaders[format]
+ if not reader then
+ return 0
+ end
+ local p = platforms[platform]
+ local e = encodings[p]
+ local n = reader(f,fontdata,data) or 0
+ report("cmap checked: platform %i (%s), encoding %i (%s), format %i, new unicodes %i",platform,p,encoding,e and e[encoding] or "?",format,n)
+ return n
+end
+
+function readers.cmap(f,fontdata,specification)
+ if specification.glyphs then
+ local datatable = fontdata.tables.cmap
+ if datatable then
+ local tableoffset = datatable.offset
+ setposition(f,tableoffset)
+ local version = readushort(f)
+ local noftables = readushort(f)
+ local records = { }
+ local unicodecid = false
+ local variantcid = false
+ local variants = { }
+ local duplicates = fontdata.duplicates or { }
+ fontdata.duplicates = duplicates
+ for i=1,noftables do
+ local platform = readushort(f)
+ local encoding = readushort(f)
+ local offset = readulong(f)
+ local record = records[platform]
+ if not record then
+ records[platform] = {
+ [encoding] = {
+ offsets = { offset },
+ formats = { },
+ }
+ }
+ else
+ local subtables = record[encoding]
+ if not subtables then
+ record[encoding] = {
+ offsets = { offset },
+ formats = { },
+ }
+ else
+ local offsets = subtables.offsets
+ offsets[#offsets+1] = offset
+ end
+ end
+ end
+ report("found cmaps:")
+ for platform, record in sortedhash(records) do
+ local p = platforms[platform]
+ local e = encodings[p]
+ local sp = supported[platform]
+ local ps = p or "?"
+ if sp then
+ report(" platform %i: %s",platform,ps)
+ else
+ report(" platform %i: %s (unsupported)",platform,ps)
+ end
+ for encoding, subtables in sortedhash(record) do
+ local se = sp and sp[encoding]
+ local es = e and e[encoding] or "?"
+ if se then
+ report(" encoding %i: %s",encoding,es)
+ else
+ report(" encoding %i: %s (unsupported)",encoding,es)
+ end
+ local offsets = subtables.offsets
+ local formats = subtables.formats
+ for i=1,#offsets do
+ local offset = tableoffset + offsets[i]
+ setposition(f,offset)
+ formats[readushort(f)] = offset
+ end
+ record[encoding] = formats
+ local list = sortedkeys(formats)
+ for i=1,#list do
+ if not (se and se[list[i]]) then
+ list[i] = list[i] .. " (unsupported)"
+ end
+ end
+ report(" formats: % t",list)
+ end
+ end
+ --
+ local ok = false
+ for i=1,#sequence do
+ local sp, se, sf = unpack(sequence[i])
+ if checkcmap(f,fontdata,records,sp,se,sf) > 0 then
+ ok = true
+ end
+ end
+ if not ok then
+ report("no useable unicode cmap found")
+ end
+ --
+ fontdata.cidmaps = {
+ version = version,
+ noftables = noftables,
+ records = records,
+ }
+ else
+ fontdata.cidmaps = { }
+ end
+ end
+end
+
+-- The glyf table depends on the loca table. We have one entry to much in the locations table (the
+-- last one is a dummy) because we need to calculate the size of a glyph blob from the delta,
+-- although we not need it in our usage (yet). We can remove the locations table when we're done.
+
+function readers.loca(f,fontdata,specification)
+ if specification.glyphs then
+ reportskippedtable("loca")
+ end
+end
+
+function readers.glyf(f,fontdata,specification) -- part goes to cff module
+ if specification.glyphs then
+ reportskippedtable("glyf")
+ end
+end
+
+-- Here we have a table that we really need for later processing although a more advanced gpos table
+-- can also be available. Todo: we need a 'fake' lookup for this (analogue to ff).
+
+function readers.kern(f,fontdata,specification)
+ if specification.kerns then
+ local datatable = fontdata.tables.kern
+ if datatable then
+ setposition(f,datatable.offset)
+ local version = readushort(f)
+ local noftables = readushort(f)
+ for i=1,noftables do
+ local version = readushort(f)
+ local length = readushort(f)
+ local coverage = readushort(f)
+ -- bit 8-15 of coverage: format 0 or 2
+ local format = bit32.rshift(coverage,8) -- is this ok?
+ if format == 0 then
+ local nofpairs = readushort(f)
+ local searchrange = readushort(f)
+ local entryselector = readushort(f)
+ local rangeshift = readushort(f)
+ local kerns = { }
+ local glyphs = fontdata.glyphs
+ for i=1,nofpairs do
+ local left = readushort(f)
+ local right = readushort(f)
+ local kern = readfword(f)
+ local glyph = glyphs[left]
+ local kerns = glyph.kerns
+ if kerns then
+ kerns[right] = kern
+ else
+ glyph.kerns = { [right] = kern }
+ end
+ end
+ elseif format == 2 then
+ report("todo: kern classes")
+ else
+ report("todo: kerns")
+ end
+ end
+ end
+ end
+end
+
+function readers.gdef(f,fontdata,specification)
+ if specification.details then
+ reportskippedtable("gdef")
+ end
+end
+
+function readers.gsub(f,fontdata,specification)
+ if specification.details then
+ reportskippedtable("gsub")
+ end
+end
+
+function readers.gpos(f,fontdata,specification)
+ if specification.details then
+ reportskippedtable("gpos")
+ end
+end
+
+function readers.math(f,fontdata,specification)
+ if specification.glyphs then
+ reportskippedtable("math")
+ end
+end
+
+-- Goodie. A sequence instead of segments costs a bit more memory, some 300K on a
+-- dejavu serif and about the same on a pagella regular.
+
+local function packoutlines(data,makesequence)
+ local subfonts = data.subfonts
+ if subfonts then
+ for i=1,#subfonts do
+ packoutlines(subfonts[i],makesequence)
+ end
+ return
+ end
+ local common = data.segments
+ if common then
+ return
+ end
+ local glyphs = data.glyphs
+ if not glyphs then
+ return
+ end
+ if makesequence then
+ for index=1,#glyphs do
+ local glyph = glyphs[index]
+ local segments = glyph.segments
+ if segments then
+ local sequence = { }
+ local nofsequence = 0
+ for i=1,#segments do
+ local segment = segments[i]
+ local nofsegment = #segment
+ nofsequence = nofsequence + 1
+ sequence[nofsequence] = segment[nofsegment]
+ for i=1,nofsegment-1 do
+ nofsequence = nofsequence + 1
+ sequence[nofsequence] = segment[i]
+ end
+ end
+ glyph.sequence = sequence
+ glyph.segments = nil
+ end
+ end
+ else
+ local hash = { }
+ local common = { }
+ local reverse = { }
+ local last = 0
+ for index=1,#glyphs do
+ local segments = glyphs[index].segments
+ if segments then
+ for i=1,#segments do
+ local h = concat(segments[i]," ")
+ hash[h] = (hash[h] or 0) + 1
+ end
+ end
+ end
+ for index=1,#glyphs do
+ local segments = glyphs[index].segments
+ if segments then
+ for i=1,#segments do
+ local segment = segments[i]
+ local h = concat(segment," ")
+ if hash[h] > 1 then -- minimal one shared in order to hash
+ local idx = reverse[h]
+ if not idx then
+ last = last + 1
+ reverse[h] = last
+ common[last] = segment
+ idx = last
+ end
+ segments[i] = idx
+ end
+ end
+ end
+ end
+ if last > 0 then
+ data.segments = common
+ end
+ end
+end
+
+local function unpackoutlines(data)
+ local subfonts = data.subfonts
+ if subfonts then
+ for i=1,#subfonts do
+ unpackoutlines(subfonts[i])
+ end
+ return
+ end
+ local common = data.segments
+ if not common then
+ return
+ end
+ local glyphs = data.glyphs
+ if not glyphs then
+ return
+ end
+ for index=1,#glyphs do
+ local segments = glyphs[index].segments
+ if segments then
+ for i=1,#segments do
+ local c = common[segments[i]]
+ if c then
+ segments[i] = c
+ end
+ end
+ end
+ end
+ data.segments = nil
+end
+
+otf.packoutlines = packoutlines
+otf.unpackoutlines = unpackoutlines
+
+-- Now comes the loader. The order of reading these matters as we need to know
+-- some properties in order to read following tables. When details is true we also
+-- initialize the glyphs data.
+
+local function getinfo(maindata,sub,platformnames,rawfamilynames)
+ local fontdata = sub and maindata.subfonts and maindata.subfonts[sub] or maindata
+ local names = fontdata.names
+ local info = nil
+ if names then
+ local metrics = fontdata.windowsmetrics or { }
+ local postscript = fontdata.postscript or { }
+ local fontheader = fontdata.fontheader or { }
+ local cffinfo = fontdata.cffinfo or { }
+ local filename = fontdata.filename
+ local weight = getname(fontdata,"weight") or cffinfo.weight or metrics.weight
+ local width = getname(fontdata,"width") or cffinfo.width or metrics.width
+ local fontname = getname(fontdata,"postscriptname")
+ local fullname = getname(fontdata,"fullname")
+ local family = getname(fontdata,"family")
+ local subfamily = getname(fontdata,"subfamily")
+ local familyname = getname(fontdata,"typographicfamily")
+ local subfamilyname = getname(fontdata,"typographicsubfamily")
+ local compatiblename = getname(fontdata,"compatiblefullname") -- kind of useless
+ if rawfamilynames then
+ -- for PG (for now, as i need to check / adapt context to catch a no-fallback case)
+ else
+ if not familyname then familyname = family end
+ if not subfamilyname then subfamilyname = subfamily end
+ end
+ info = { -- we inherit some inconsistencies/choices from ff
+ subfontindex = fontdata.subfontindex or sub or 0,
+ -- filename = filename,
+ version = getname(fontdata,"version"),
+ -- format = fontdata.format,
+ fontname = fontname,
+ fullname = fullname,
+ family = family,
+ subfamily = subfamily,
+ familyname = familyname,
+ subfamilyname = subfamilyname,
+ compatiblename = compatiblename,
+ weight = weight and lower(weight),
+ width = width and lower(width),
+ pfmweight = metrics.weightclass or 400, -- will become weightclass
+ pfmwidth = metrics.widthclass or 5, -- will become widthclass
+ panosewidth = metrics.panosewidth,
+ panoseweight = metrics.panoseweight,
+ italicangle = postscript.italicangle or 0,
+ units = fontheader.units or 0,
+ designsize = fontdata.designsize,
+ minsize = fontdata.minsize,
+ maxsize = fontdata.maxsize,
+ monospaced = (tonumber(postscript.monospaced or 0) > 0) or metrics.panosewidth == "monospaced",
+ averagewidth = metrics.averagewidth,
+ xheight = metrics.xheight,
+ capheight = metrics.capheight, -- not always present and probably crap
+ ascender = metrics.typoascender,
+ descender = metrics.typodescender,
+ platformnames = platformnames and fontdata.platformnames or nil,
+ }
+ elseif n then
+ info = {
+ filename = fontdata.filename,
+ comment = "there is no info for subfont " .. n,
+ }
+ else
+ info = {
+ filename = fontdata.filename,
+ comment = "there is no info",
+ }
+ end
+ -- inspect(info)
+ return info
+end
+
+local function loadtables(f,specification,offset)
+ if offset then
+ setposition(f,offset)
+ end
+ local tables = { }
+ local basename = file.basename(specification.filename)
+ local filesize = specification.filesize
+ local filetime = specification.filetime
+ local fontdata = { -- some can/will go
+ filename = basename,
+ filesize = filesize,
+ filetime = filetime,
+ version = readstring(f,4),
+ noftables = readushort(f),
+ searchrange = readushort(f), -- not needed
+ entryselector = readushort(f), -- not needed
+ rangeshift = readushort(f), -- not needed
+ tables = tables,
+ }
+ for i=1,fontdata.noftables do
+ local tag = lower(stripstring(readstring(f,4)))
+ local checksum = readulong(f) -- not used
+ local offset = readulong(f)
+ local length = readulong(f)
+ if offset + length > filesize then
+ report("bad %a table in file %a",tag,basename)
+ end
+ tables[tag] = {
+ checksum = checksum,
+ offset = offset,
+ length = length,
+ }
+ end
+ if tables.cff then
+ fontdata.format = "opentype"
+ else
+ fontdata.format = "truetype"
+ end
+ return fontdata
+end
+
+local function prepareglyps(fontdata)
+ local glyphs = setmetatableindex(function(t,k)
+ local v = {
+ -- maybe more defaults
+ index = k,
+ }
+ t[k] = v
+ return v
+ end)
+ fontdata.glyphs = glyphs
+ fontdata.mapping = { }
+end
+
+local function readdata(f,offset,specification)
+ local fontdata = loadtables(f,specification,offset)
+ if specification.glyphs then
+ prepareglyps(fontdata)
+ end
+ --
+ readers["name"](f,fontdata,specification)
+ --
+ local askedname = specification.askedname
+ if askedname then
+ local fullname = getname(fontdata,"fullname") or ""
+ local cleanname = gsub(askedname,"[^a-zA-Z0-9]","")
+ local foundname = gsub(fullname,"[^a-zA-Z0-9]","")
+ if lower(cleanname) ~= lower(foundname) then
+ return -- keep searching
+ end
+ end
+ --
+ --
+ readers["os/2"](f,fontdata,specification)
+ readers["head"](f,fontdata,specification)
+ readers["maxp"](f,fontdata,specification)
+ readers["hhea"](f,fontdata,specification)
+ readers["hmtx"](f,fontdata,specification)
+ readers["post"](f,fontdata,specification)
+ readers["cff" ](f,fontdata,specification)
+ readers["cmap"](f,fontdata,specification)
+ readers["loca"](f,fontdata,specification)
+ readers["glyf"](f,fontdata,specification)
+ readers["kern"](f,fontdata,specification)
+ readers["gdef"](f,fontdata,specification)
+ readers["gsub"](f,fontdata,specification)
+ readers["gpos"](f,fontdata,specification)
+ readers["math"](f,fontdata,specification)
+ --
+ fontdata.locations = nil
+ fontdata.tables = nil
+ fontdata.cidmaps = nil
+ fontdata.dictionaries = nil
+ -- fontdata.cff = nil
+ return fontdata
+end
+
+local function loadfontdata(specification)
+ local filename = specification.filename
+ local fileattr = lfs.attributes(filename)
+ local filesize = fileattr and fileattr.size or 0
+ local filetime = fileattr and fileattr.modification or 0
+ local f = openfile(filename,true) -- zero based
+ if not f then
+ report("unable to open %a",filename)
+ elseif filesize == 0 then
+ report("empty file %a",filename)
+ closefile(f)
+ else
+ specification.filesize = filesize
+ specification.filetime = filetime
+ local version = readstring(f,4)
+ local fontdata = nil
+ if version == "OTTO" or version == "true" or version == "\0\1\0\0" then
+ fontdata = readdata(f,0,specification)
+ elseif version == "ttcf" then
+ local subfont = tonumber(specification.subfont)
+ local offsets = { }
+ local ttcversion = readulong(f)
+ local nofsubfonts = readulong(f)
+ for i=1,nofsubfonts do
+ offsets[i] = readulong(f)
+ end
+ if subfont then -- a number of not
+ if subfont >= 1 and subfont <= nofsubfonts then
+ fontdata = readdata(f,offsets[subfont],specification)
+ else
+ report("no subfont %a in file %a",subfont,filename)
+ end
+ else
+ subfont = specification.subfont
+ if type(subfont) == "string" and subfont ~= "" then
+ specification.askedname = subfont
+ for i=1,nofsubfonts do
+ fontdata = readdata(f,offsets[i],specification)
+ if fontdata then
+ fontdata.subfontindex = i
+ report("subfont named %a has index %a",subfont,i)
+ break
+ end
+ end
+ if not fontdata then
+ report("no subfont named %a",subfont)
+ end
+ else
+ local subfonts = { }
+ fontdata = {
+ filename = filename,
+ filesize = filesize,
+ filetime = filetime,
+ version = version,
+ subfonts = subfonts,
+ ttcversion = ttcversion,
+ nofsubfonts = nofsubfonts,
+ }
+ for i=1,nofsubfonts do
+ subfonts[i] = readdata(f,offsets[i],specification)
+ end
+ end
+ end
+ else
+ report("unknown version %a in file %a",version,filename)
+ end
+ closefile(f)
+ return fontdata or { }
+ end
+end
+
+local function loadfont(specification,n)
+ if type(specification) == "string" then
+ specification = {
+ filename = specification,
+ info = true, -- always true (for now)
+ details = true,
+ glyphs = true,
+ shapes = true,
+ kerns = true,
+ globalkerns = true,
+ lookups = true,
+ -- true or number:
+ subfont = n or true,
+ tounicode = false,
+ }
+ end
+ -- if shapes only then
+ if specification.shapes or specification.lookups or specification.kerns then
+ specification.glyphs = true
+ end
+ if specification.glyphs then
+ specification.details = true
+ end
+ if specification.details then
+ specification.info = true -- not really used any more
+ end
+ if specification.platformnames then
+ specification.platformnames = true -- not really used any more
+ end
+ local function message(str)
+ report("fatal error in file %a: %s\n%s",specification.filename,str,debug.traceback())
+ end
+ local ok, result = xpcall(loadfontdata,message,specification)
+ if ok then
+ return result
+ end
+end
+
+-- we need even less, but we can have a 'detail' variant
+
+function readers.loadshapes(filename,n)
+ local fontdata = loadfont {
+ filename = filename,
+ shapes = true,
+ subfont = n,
+ }
+ return fontdata and {
+ -- version = 0.123 -- todo
+ filename = filename,
+ format = fontdata.format,
+ glyphs = fontdata.glyphs,
+ units = fontdata.fontheader.units,
+ } or {
+ filename = filename,
+ format = "unknown",
+ glyphs = { },
+ units = 0,
+ }
+end
+
+function readers.loadfont(filename,n)
+ local fontdata = loadfont {
+ filename = filename,
+ glyphs = true,
+ shapes = false,
+ lookups = true,
+ -- kerns = true,
+ -- globalkerns = true, -- only for testing, e.g. cambria has different gpos and kern
+ subfont = n,
+ }
+ if fontdata then
+ --
+ return {
+ tableversion = tableversion,
+ creator = "context mkiv",
+ size = fontdata.filesize,
+ time = fontdata.filetime,
+ glyphs = fontdata.glyphs,
+ descriptions = fontdata.descriptions,
+ format = fontdata.format,
+ goodies = { },
+ metadata = getinfo(fontdata,n), -- no platformnames here !
+ properties = {
+ hasitalics = fontdata.hasitalics or false,
+ },
+ resources = {
+ -- filename = fontdata.filename,
+ filename = filename,
+ private = privateoffset,
+ duplicates = fontdata.duplicates or { },
+ features = fontdata.features or { }, -- we need to add these in the loader
+ sublookups = fontdata.sublookups or { }, -- we need to add these in the loader
+ marks = fontdata.marks or { }, -- we need to add these in the loader
+ markclasses = fontdata.markclasses or { }, -- we need to add these in the loader
+ marksets = fontdata.marksets or { }, -- we need to add these in the loader
+ sequences = fontdata.sequences or { }, -- we need to add these in the loader
+ variants = fontdata.variants, -- variant -> unicode -> glyph
+ version = getname(fontdata,"version"),
+ cidinfo = fontdata.cidinfo,
+ mathconstants = fontdata.mathconstants,
+ },
+ }
+ end
+end
+
+function readers.getinfo(filename,specification) -- string, nil|number|table
+ -- platformnames is optional and not used by context (a too unpredictable mess
+ -- that only add to the confusion) .. so it's only for checking things
+ local subfont = nil
+ local platformnames = false
+ local rawfamilynames = false
+ if type(specification) == "table" then
+ subfont = tonumber(specification.subfont)
+ platformnames = specification.platformnames
+ rawfamilynames = specification.rawfamilynames
+ else
+ subfont = tonumber(specification)
+ end
+ local fontdata = loadfont {
+ filename = filename,
+ details = true,
+ platformnames = platformnames,
+ -- rawfamilynames = rawfamilynames,
+ }
+ if fontdata then
+ local subfonts = fontdata.subfonts
+ if not subfonts then
+ return getinfo(fontdata,nil,platformnames,rawfamilynames)
+ elseif not subfont then
+ local info = { }
+ for i=1,#subfonts do
+ info[i] = getinfo(fontdata,i,platformnames,rawfamilynames)
+ end
+ return info
+ elseif subfont >= 1 and subfont <= #subfonts then
+ return getinfo(fontdata,subfont,platformnames,rawfamilynames)
+ else
+ return {
+ filename = filename,
+ comment = "there is no subfont " .. subfont .. " in this file"
+ }
+ end
+ else
+ return {
+ filename = filename,
+ comment = "the file cannot be opened for reading",
+ }
+ end
+end
+
+function readers.rehash(fontdata,hashmethod)
+ report("the %a helper is not yet implemented","rehash")
+end
+
+function readers.checkhash(fontdata)
+ report("the %a helper is not yet implemented","checkhash")
+end
+
+function readers.pack(fontdata,hashmethod)
+ report("the %a helper is not yet implemented","pack")
+end
+
+function readers.unpack(fontdata)
+ report("the %a helper is not yet implemented","unpack")
+end
+
+function readers.expand(fontdata)
+ report("the %a helper is not yet implemented","unpack")
+end
+
+function readers.compact(fontdata)
+ report("the %a helper is not yet implemented","compact")
+end
+
+-- plug in
+
+local extenders = { }
+
+function readers.registerextender(extender)
+ extenders[#extenders+1] = extender
+end
+
+function readers.extend(fontdata)
+ for i=1,#extenders do
+ local extender = extenders[i]
+ local name = extender.name or "unknown"
+ local action = extender.action
+ if action then
+ action(fontdata)
+ end
+ end
+end
+
+-- for now .. this will move to a context specific file
+
+if fonts.hashes then
+
+ local identifiers = fonts.hashes.identifiers
+ local loadshapes = readers.loadshapes
+
+ readers.version = 0.006
+ readers.cache = containers.define("fonts", "shapes", readers.version, true)
+
+ -- todo: loaders per format
+
+ local function load(filename,sub)
+ local base = file.basename(filename)
+ local name = file.removesuffix(base)
+ local kind = file.suffix(filename)
+ local attr = lfs.attributes(filename)
+ local size = attr and attr.size or 0
+ local time = attr and attr.modification or 0
+ local sub = tonumber(sub)
+ if size > 0 and (kind == "otf" or kind == "ttf" or kind == "tcc") then
+ local hash = containers.cleanname(base) -- including suffix
+ if sub then
+ hash = hash .. "-" .. sub
+ end
+ data = containers.read(readers.cache,hash)
+ if not data or data.time ~= time or data.size ~= size then
+ data = loadshapes(filename,sub)
+ if data then
+ data.size = size
+ data.format = data.format or (kind == "otf" and "opentype") or "truetype"
+ data.time = time
+ packoutlines(data)
+ containers.write(readers.cache,hash,data)
+ data = containers.read(readers.cache,hash) -- frees old mem
+ end
+ end
+ unpackoutlines(data)
+ else
+ data = {
+ filename = filename,
+ size = 0,
+ time = time,
+ format = "unknown",
+ units = 1000,
+ glyphs = { }
+ }
+ end
+ return data
+ end
+
+ fonts.hashes.shapes = table.setmetatableindex(function(t,k)
+ local d = identifiers[k]
+ local v = load(d.properties.filename,d.subindex)
+ t[k] = v
+ return v
+ end)
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ots.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ots.lua
new file mode 100644
index 00000000000..69118725842
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-ots.lua
@@ -0,0 +1,3765 @@
+if not modules then modules = { } end modules ['font-ots'] = { -- sequences
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+-- to be checked: discrun doesn't seem to do something useful now (except run the
+-- check again) so if we need it again we'll do a zwnjrun or so
+
+-- beware, on my development machine we test a slightly a more optimized version
+
+-- assumptions:
+--
+-- cursives don't cross discretionaries
+-- marks precede bases
+--
+-- pitfalls:
+--
+-- when we append to a dics field we need to set the field in order to update tail
+--
+-- This is a version of font-otn.lua adapted to the new font loader code. It
+-- is a context version which can contain experimental code, but when we
+-- have serious patches we will backport to the font-otn files. The plain
+-- loader that ships with context also uses this now.
+--
+-- todo: looks like we have a leak somewhere (probably in ligatures)
+-- todo: copy attributes to disc
+-- todo: get rid of components, better use the tounicode entry if needed (at all)
+--
+-- we do some disc juggling where we need to keep in mind that the
+-- pre, post and replace fields can have prev pointers to a nesting
+-- node ... i wonder if that is still needed
+--
+-- not possible:
+--
+-- \discretionary {alpha-} {betagammadelta}
+-- {\discretionary {alphabeta-} {gammadelta}
+-- {\discretionary {alphabetagamma-} {delta}
+-- {alphabetagammadelta}}}
+
+--[[ldx--
+<p>This module is a bit more split up that I'd like but since we also want to test
+with plain <l n='tex'/> it has to be so. This module is part of <l n='context'/>
+and discussion about improvements and functionality mostly happens on the
+<l n='context'/> mailing list.</p>
+
+<p>The specification of OpenType is kind of vague. Apart from a lack of a proper
+free specifications there's also the problem that Microsoft and Adobe
+may have their own interpretation of how and in what order to apply features.
+In general the Microsoft website has more detailed specifications and is a
+better reference. There is also some information in the FontForge help files.</p>
+
+<p>Because there is so much possible, fonts might contain bugs and/or be made to
+work with certain rederers. These may evolve over time which may have the side
+effect that suddenly fonts behave differently.</p>
+
+<p>After a lot of experiments (mostly by Taco, me and Idris) we're now at yet another
+implementation. Of course all errors are mine and of course the code can be
+improved. There are quite some optimizations going on here and processing speed
+is currently acceptable. Not all functions are implemented yet, often because I
+lack the fonts for testing. Many scripts are not yet supported either, but I will
+look into them as soon as <l n='context'/> users ask for it.</p>
+
+<p>The specification leaves room for interpretation. In case of doubt the microsoft
+implementation is the reference as it is the most complete one. As they deal with
+lots of scripts and fonts, Kai and Ivo did a lot of testing of the generic code and
+their suggestions help improve the code. I'm aware that not all border cases can be
+taken care of, unless we accept excessive runtime, and even then the interference
+with other mechanisms (like hyphenation) are not trivial.</p>
+
+<p>Glyphs are indexed not by unicode but in their own way. This is because there is no
+relationship with unicode at all, apart from the fact that a font might cover certain
+ranges of characters. One character can have multiple shapes. However, at the
+<l n='tex'/> end we use unicode so and all extra glyphs are mapped into a private
+space. This is needed because we need to access them and <l n='tex'/> has to include
+then in the output eventually.</p>
+
+<p>The initial data table is rather close to the open type specification and also not
+that different from the one produced by <l n='fontforge'/> but we uses hashes instead.
+In <l n='context'/> that table is packed (similar tables are shared) and cached on disk
+so that successive runs can use the optimized table (after loading the table is
+unpacked). The flattening code used later is a prelude to an even more compact table
+format (and as such it keeps evolving).</p>
+
+<p>This module is sparsely documented because it is a moving target. The table format
+of the reader changes and we experiment a lot with different methods for supporting
+features.</p>
+
+<p>As with the <l n='afm'/> code, we may decide to store more information in the
+<l n='otf'/> table.</p>
+
+<p>Incrementing the version number will force a re-cache. We jump the number by one
+when there's a fix in the <l n='fontforge'/> library or <l n='lua'/> code that
+results in different tables.</p>
+--ldx]]--
+
+local type, next, tonumber = type, next, tonumber
+local random = math.random
+local formatters = string.formatters
+local insert = table.insert
+
+local logs, trackers, nodes, attributes = logs, trackers, nodes, attributes
+
+local registertracker = trackers.register
+local registerdirective = directives.register
+
+local fonts = fonts
+local otf = fonts.handlers.otf
+
+local trace_lookups = false registertracker("otf.lookups", function(v) trace_lookups = v end)
+local trace_singles = false registertracker("otf.singles", function(v) trace_singles = v end)
+local trace_multiples = false registertracker("otf.multiples", function(v) trace_multiples = v end)
+local trace_alternatives = false registertracker("otf.alternatives", function(v) trace_alternatives = v end)
+local trace_ligatures = false registertracker("otf.ligatures", function(v) trace_ligatures = v end)
+local trace_contexts = false registertracker("otf.contexts", function(v) trace_contexts = v end)
+local trace_marks = false registertracker("otf.marks", function(v) trace_marks = v end)
+local trace_kerns = false registertracker("otf.kerns", function(v) trace_kerns = v end)
+local trace_cursive = false registertracker("otf.cursive", function(v) trace_cursive = v end)
+local trace_preparing = false registertracker("otf.preparing", function(v) trace_preparing = v end)
+local trace_bugs = false registertracker("otf.bugs", function(v) trace_bugs = v end)
+local trace_details = false registertracker("otf.details", function(v) trace_details = v end)
+local trace_applied = false registertracker("otf.applied", function(v) trace_applied = v end)
+local trace_steps = false registertracker("otf.steps", function(v) trace_steps = v end)
+local trace_skips = false registertracker("otf.skips", function(v) trace_skips = v end)
+local trace_directions = false registertracker("otf.directions", function(v) trace_directions = v end)
+
+local trace_kernruns = false registertracker("otf.kernruns", function(v) trace_kernruns = v end)
+local trace_discruns = false registertracker("otf.discruns", function(v) trace_discruns = v end)
+local trace_compruns = false registertracker("otf.compruns", function(v) trace_compruns = v end)
+local trace_testruns = false registertracker("otf.testruns", function(v) trace_testruns = v end)
+
+local quit_on_no_replacement = true -- maybe per font
+local zwnjruns = true
+local optimizekerns = true
+
+registerdirective("otf.zwnjruns", function(v) zwnjruns = v end)
+registerdirective("otf.chain.quitonnoreplacement",function(value) quit_on_no_replacement = value end)
+
+local report_direct = logs.reporter("fonts","otf direct")
+local report_subchain = logs.reporter("fonts","otf subchain")
+local report_chain = logs.reporter("fonts","otf chain")
+local report_process = logs.reporter("fonts","otf process")
+----- report_prepare = logs.reporter("fonts","otf prepare")
+local report_warning = logs.reporter("fonts","otf warning")
+local report_run = logs.reporter("fonts","otf run")
+local report_check = logs.reporter("fonts","otf check")
+
+registertracker("otf.replacements", "otf.singles,otf.multiples,otf.alternatives,otf.ligatures")
+registertracker("otf.positions","otf.marks,otf.kerns,otf.cursive")
+registertracker("otf.actions","otf.replacements,otf.positions")
+registertracker("otf.injections","nodes.injections")
+
+registertracker("*otf.sample","otf.steps,otf.actions,otf.analyzing")
+
+local nuts = nodes.nuts
+local tonode = nuts.tonode
+local tonut = nuts.tonut
+
+local getfield = nuts.getfield
+local setfield = nuts.setfield
+local getnext = nuts.getnext
+local setnext = nuts.setnext
+local getprev = nuts.getprev
+local setprev = nuts.setprev
+local getboth = nuts.getboth
+local setboth = nuts.setboth
+local getid = nuts.getid
+local getattr = nuts.getattr
+local setattr = nuts.setattr
+local getprop = nuts.getprop
+local setprop = nuts.setprop
+local getfont = nuts.getfont
+local getsubtype = nuts.getsubtype
+local setsubtype = nuts.setsubtype
+local getchar = nuts.getchar
+local setchar = nuts.setchar
+local getdisc = nuts.getdisc
+local setdisc = nuts.setdisc
+local setlink = nuts.setlink
+
+local ischar = nuts.is_char
+
+local insert_node_before = nuts.insert_before
+local insert_node_after = nuts.insert_after
+local delete_node = nuts.delete
+local remove_node = nuts.remove
+local copy_node = nuts.copy
+local copy_node_list = nuts.copy_list
+local find_node_tail = nuts.tail
+local flush_node_list = nuts.flush_list
+local free_node = nuts.free
+local end_of_math = nuts.end_of_math
+local traverse_nodes = nuts.traverse
+local traverse_id = nuts.traverse_id
+
+local setmetatableindex = table.setmetatableindex
+
+local zwnj = 0x200C
+local zwj = 0x200D
+local wildcard = "*"
+local default = "dflt"
+
+local nodecodes = nodes.nodecodes
+local glyphcodes = nodes.glyphcodes
+local disccodes = nodes.disccodes
+
+local glyph_code = nodecodes.glyph
+local glue_code = nodecodes.glue
+local disc_code = nodecodes.disc
+local math_code = nodecodes.math
+local dir_code = nodecodes.dir
+local localpar_code = nodecodes.localpar
+
+local discretionary_code = disccodes.discretionary
+local ligature_code = glyphcodes.ligature
+
+local privateattribute = attributes.private
+
+-- Something is messed up: we have two mark / ligature indices, one at the injection
+-- end and one here ... this is based on KE's patches but there is something fishy
+-- there as I'm pretty sure that for husayni we need some connection (as it's much
+-- more complex than an average font) but I need proper examples of all cases, not
+-- of only some.
+
+local a_state = privateattribute('state')
+
+local injections = nodes.injections
+local setmark = injections.setmark
+local setcursive = injections.setcursive
+local setkern = injections.setkern
+local setpair = injections.setpair
+local resetinjection = injections.reset
+local copyinjection = injections.copy
+local setligaindex = injections.setligaindex
+local getligaindex = injections.getligaindex
+
+local cursonce = true
+
+local fonthashes = fonts.hashes
+local fontdata = fonthashes.identifiers
+
+local otffeatures = fonts.constructors.newfeatures("otf")
+local registerotffeature = otffeatures.register
+
+local onetimemessage = fonts.loggers.onetimemessage or function() end
+
+otf.defaultnodealternate = "none" -- first last
+
+-- We use a few global variables. The handler can be called nested but this assumes that the
+-- same font is used. Nested calls are normally not needed (only for devanagari).
+
+local tfmdata = false
+local characters = false
+local descriptions = false
+local marks = false
+local currentfont = false
+local factor = 0
+local threshold = 0
+
+local sweepnode = nil
+local sweepprev = nil
+local sweepnext = nil
+local sweephead = { }
+
+local notmatchpre = { }
+local notmatchpost = { }
+local notmatchreplace = { }
+
+local handlers = { }
+
+-- helper
+
+local function isspace(n)
+ if getid(n) == glue_code then
+ local w = getfield(n,"width")
+ if w >= threshold then
+ return 32
+ end
+ end
+end
+
+-- we use this for special testing and documentation
+
+local checkstep = (nodes and nodes.tracers and nodes.tracers.steppers.check) or function() end
+local registerstep = (nodes and nodes.tracers and nodes.tracers.steppers.register) or function() end
+local registermessage = (nodes and nodes.tracers and nodes.tracers.steppers.message) or function() end
+
+local function logprocess(...)
+ if trace_steps then
+ registermessage(...)
+ end
+ report_direct(...)
+end
+
+local function logwarning(...)
+ report_direct(...)
+end
+
+local f_unicode = formatters["%U"]
+local f_uniname = formatters["%U (%s)"]
+local f_unilist = formatters["% t (% t)"]
+
+local function gref(n) -- currently the same as in font-otb
+ if type(n) == "number" then
+ local description = descriptions[n]
+ local name = description and description.name
+ if name then
+ return f_uniname(n,name)
+ else
+ return f_unicode(n)
+ end
+ elseif n then
+ local num, nam = { }, { }
+ for i=1,#n do
+ local ni = n[i]
+ if tonumber(ni) then -- later we will start at 2
+ local di = descriptions[ni]
+ num[i] = f_unicode(ni)
+ nam[i] = di and di.name or "-"
+ end
+ end
+ return f_unilist(num,nam)
+ else
+ return "<error in node mode tracing>"
+ end
+end
+
+local function cref(dataset,sequence,index)
+ if not dataset then
+ return "no valid dataset"
+ elseif index then
+ return formatters["feature %a, type %a, chain lookup %a, index %a"](dataset[4],sequence.type,sequence.name,index)
+ else
+ return formatters["feature %a, type %a, chain lookup %a"](dataset[4],sequence.type,sequence.name)
+ end
+end
+
+local function pref(dataset,sequence)
+ return formatters["feature %a, type %a, lookup %a"](dataset[4],sequence.type,sequence.name)
+end
+
+local function mref(rlmode)
+ if not rlmode or rlmode == 0 then
+ return "---"
+ elseif rlmode == -1 or rlmode == "+TRT" then
+ return "r2l"
+ else
+ return "l2r"
+ end
+end
+
+-- We can assume that languages that use marks are not hyphenated. We can also assume
+-- that at most one discretionary is present.
+
+-- We do need components in funny kerning mode but maybe I can better reconstruct then
+-- as we do have the font components info available; removing components makes the
+-- previous code much simpler. Also, later on copying and freeing becomes easier.
+-- However, for arabic we need to keep them around for the sake of mark placement
+-- and indices.
+
+local function copy_glyph(g) -- next and prev are untouched !
+ local components = getfield(g,"components")
+ if components then
+ setfield(g,"components",nil)
+ local n = copy_node(g)
+ copyinjection(n,g) -- we need to preserve the lig indices
+ setfield(g,"components",components)
+ return n
+ else
+ local n = copy_node(g)
+ copyinjection(n,g) -- we need to preserve the lig indices
+ return n
+ end
+end
+
+local function flattendisk(head,disc)
+ local _, _, replace, _, _, replacetail = getdisc(disc,true)
+ setfield(disc,"replace",nil)
+ free_node(disc)
+ if head == disc then
+ local next = getnext(disc)
+ if replace then
+ if next then
+ setlink(replacetail,next)
+ end
+ return replace, replace
+ elseif next then
+ return next, next
+ else
+ return -- maybe warning
+ end
+ else
+ local prev, next = getboth(disc)
+ if replace then
+ if next then
+ setlink(replacetail,next)
+ end
+ setlink(prev,replace)
+ return head, replace
+ else
+ setlink(prev,next) -- checks for next anyway
+ return head, next
+ end
+ end
+end
+
+local function appenddisc(disc,list)
+ local pre, post, replace, pretail, posttail, replacetail = getdisc(disc,true)
+ local posthead = list
+ local replacehead = copy_node_list(list)
+ if post then
+ setlink(posttail,posthead)
+ else
+ post = phead
+ end
+ if replace then
+ setlink(replacetail,replacehead)
+ else
+ replace = rhead
+ end
+ setdisc(disc,pre,post,replace)
+end
+
+-- start is a mark and we need to keep that one
+
+local function markstoligature(head,start,stop,char)
+ if start == stop and getchar(start) == char then
+ return head, start
+ else
+ local prev = getprev(start)
+ local next = getnext(stop)
+ setprev(start,nil)
+ setnext(stop,nil)
+ local base = copy_glyph(start)
+ if head == start then
+ head = base
+ end
+ resetinjection(base)
+ setchar(base,char)
+ setsubtype(base,ligature_code)
+ setfield(base,"components",start)
+ setlink(prev,base)
+ setlink(base,next)
+ return head, base
+ end
+end
+
+-- The next code is somewhat complicated by the fact that some fonts can have ligatures made
+-- from ligatures that themselves have marks. This was identified by Kai in for instance
+-- arabtype: KAF LAM SHADDA ALEF FATHA (0x0643 0x0644 0x0651 0x0627 0x064E). This becomes
+-- KAF LAM-ALEF with a SHADDA on the first and a FATHA op de second component. In a next
+-- iteration this becomes a KAF-LAM-ALEF with a SHADDA on the second and a FATHA on the
+-- third component.
+
+local function getcomponentindex(start) -- we could store this offset in the glyph (nofcomponents)
+ if getid(start) ~= glyph_code then -- and then get rid of all components
+ return 0
+ elseif getsubtype(start) == ligature_code then
+ local i = 0
+ local components = getfield(start,"components")
+ while components do
+ i = i + getcomponentindex(components)
+ components = getnext(components)
+ end
+ return i
+ elseif not marks[getchar(start)] then
+ return 1
+ else
+ return 0
+ end
+end
+
+local a_noligature = attributes.private("noligature")
+
+local function toligature(head,start,stop,char,dataset,sequence,markflag,discfound) -- brr head
+ if getattr(start,a_noligature) == 1 then
+ -- so we can do: e\noligature{ff}e e\noligature{f}fie (we only look at the first)
+ return head, start
+ end
+ if start == stop and getchar(start) == char then
+ resetinjection(start)
+ setchar(start,char)
+ return head, start
+ end
+ -- needs testing (side effects):
+ local components = getfield(start,"components")
+ if components then
+ -- we get a double free .. needs checking
+ -- flush_node_list(components)
+ end
+ --
+ local prev = getprev(start)
+ local next = getnext(stop)
+ local comp = start
+ setprev(start,nil)
+ setnext(stop,nil)
+ local base = copy_glyph(start)
+ if start == head then
+ head = base
+ end
+ resetinjection(base)
+ setchar(base,char)
+ setsubtype(base,ligature_code)
+ setfield(base,"components",comp) -- start can have components ... do we need to flush?
+ if prev then
+ setnext(prev,base)
+ end
+ if next then
+ setprev(next,base)
+ end
+ setboth(base,prev,next)
+ if not discfound then
+ local deletemarks = markflag ~= "mark"
+ local components = start
+ local baseindex = 0
+ local componentindex = 0
+ local head = base
+ local current = base
+ -- first we loop over the glyphs in start .. stop
+ while start do
+ local char = getchar(start)
+ if not marks[char] then
+ baseindex = baseindex + componentindex
+ componentindex = getcomponentindex(start)
+ elseif not deletemarks then -- quite fishy
+ setligaindex(start,baseindex + getligaindex(start,componentindex))
+ if trace_marks then
+ logwarning("%s: keep mark %s, gets index %s",pref(dataset,sequence),gref(char),getligaindex(start))
+ end
+ local n = copy_node(start)
+ copyinjection(n,start)
+ head, current = insert_node_after(head,current,n) -- unlikely that mark has components
+ elseif trace_marks then
+ logwarning("%s: delete mark %s",pref(dataset,sequence),gref(char))
+ end
+ start = getnext(start)
+ end
+ -- we can have one accent as part of a lookup and another following
+ -- local start = components -- was wrong (component scanning was introduced when more complex ligs in devanagari was added)
+ local start = getnext(current)
+ while start do
+ local char = ischar(start)
+ if char then
+ if marks[char] then
+ setligaindex(start,baseindex + getligaindex(start,componentindex))
+ if trace_marks then
+ logwarning("%s: set mark %s, gets index %s",pref(dataset,sequence),gref(char),getligaindex(start))
+ end
+ start = getnext(start)
+ else
+ break
+ end
+ else
+ break
+ end
+ end
+ else
+ -- discfound ... forget about marks .. probably no scripts that hyphenate and have marks
+ local discprev, discnext = getboth(discfound)
+ if discprev and discnext then
+ -- we assume normalization in context, and don't care about generic ... especially
+ -- \- can give problems as there we can have a negative char but that won't match
+ -- anyway
+ local pre, post, replace, pretail, posttail, replacetail = getdisc(discfound,true)
+ if not replace then -- todo: signal simple hyphen
+ local prev = getprev(base)
+ local copied = copy_node_list(comp)
+ setprev(discnext,nil) -- also blocks funny assignments
+ setnext(discprev,nil) -- also blocks funny assignments
+ if pre then
+ setlink(discprev,pre)
+ end
+ pre = comp
+ if post then
+ setlink(posttail,discnext)
+ setprev(post,nil)
+ else
+ post = discnext
+ end
+ setlink(prev,discfound)
+ setlink(discfound,next)
+ setboth(base,nil,nil)
+ setfield(base,"components",copied)
+ setdisc(discfound,pre,post,base,discretionary_code)
+ base = prev -- restart
+ end
+ end
+ end
+ return head, base
+end
+
+local function multiple_glyphs(head,start,multiple,ignoremarks)
+ local nofmultiples = #multiple
+ if nofmultiples > 0 then
+ resetinjection(start)
+ setchar(start,multiple[1])
+ if nofmultiples > 1 then
+ local sn = getnext(start)
+ for k=2,nofmultiples do
+-- untested:
+--
+-- while ignoremarks and marks[getchar(sn)] then
+-- local sn = getnext(sn)
+-- end
+ local n = copy_node(start) -- ignore components
+ resetinjection(n)
+ setchar(n,multiple[k])
+ insert_node_after(head,start,n)
+ start = n
+ end
+ end
+ return head, start, true
+ else
+ if trace_multiples then
+ logprocess("no multiple for %s",gref(getchar(start)))
+ end
+ return head, start, false
+ end
+end
+
+local function get_alternative_glyph(start,alternatives,value)
+ local n = #alternatives
+ if value == "random" then
+ local r = random(1,n)
+ return alternatives[r], trace_alternatives and formatters["value %a, taking %a"](value,r)
+ elseif value == "first" then
+ return alternatives[1], trace_alternatives and formatters["value %a, taking %a"](value,1)
+ elseif value == "last" then
+ return alternatives[n], trace_alternatives and formatters["value %a, taking %a"](value,n)
+ end
+ value = value == true and 1 or tonumber(value)
+ if type(value) ~= "number" then
+ return alternatives[1], trace_alternatives and formatters["invalid value %s, taking %a"](value,1)
+ end
+ -- local a = alternatives[value]
+ -- if a then
+ -- -- some kind of hash
+ -- return a, trace_alternatives and formatters["value %a, taking %a"](value,a)
+ -- end
+ if value > n then
+ local defaultalt = otf.defaultnodealternate
+ if defaultalt == "first" then
+ return alternatives[n], trace_alternatives and formatters["invalid value %s, taking %a"](value,1)
+ elseif defaultalt == "last" then
+ return alternatives[1], trace_alternatives and formatters["invalid value %s, taking %a"](value,n)
+ else
+ return false, trace_alternatives and formatters["invalid value %a, %s"](value,"out of range")
+ end
+ elseif value == 0 then
+ return getchar(start), trace_alternatives and formatters["invalid value %a, %s"](value,"no change")
+ elseif value < 1 then
+ return alternatives[1], trace_alternatives and formatters["invalid value %a, taking %a"](value,1)
+ else
+ return alternatives[value], trace_alternatives and formatters["value %a, taking %a"](value,value)
+ end
+end
+
+-- handlers
+
+function handlers.gsub_single(head,start,dataset,sequence,replacement)
+ if trace_singles then
+ logprocess("%s: replacing %s by single %s",pref(dataset,sequence),gref(getchar(start)),gref(replacement))
+ end
+ resetinjection(start)
+ setchar(start,replacement)
+ return head, start, true
+end
+
+function handlers.gsub_alternate(head,start,dataset,sequence,alternative)
+ local kind = dataset[4]
+ local what = dataset[1]
+ local value = what == true and tfmdata.shared.features[kind] or what
+ local choice, comment = get_alternative_glyph(start,alternative,value)
+ if choice then
+ if trace_alternatives then
+ logprocess("%s: replacing %s by alternative %a to %s, %s",pref(dataset,sequence),gref(getchar(start)),gref(choice),comment)
+ end
+ resetinjection(start)
+ setchar(start,choice)
+ else
+ if trace_alternatives then
+ logwarning("%s: no variant %a for %s, %s",pref(dataset,sequence),value,gref(getchar(start)),comment)
+ end
+ end
+ return head, start, true
+end
+
+function handlers.gsub_multiple(head,start,dataset,sequence,multiple)
+ if trace_multiples then
+ logprocess("%s: replacing %s by multiple %s",pref(dataset,sequence),gref(getchar(start)),gref(multiple))
+ end
+ return multiple_glyphs(head,start,multiple,sequence.flags[1])
+end
+
+function handlers.gsub_ligature(head,start,dataset,sequence,ligature)
+ local current = getnext(start)
+ if not current then
+ return head, start, false, nil
+ end
+ local stop = nil
+ local startchar = getchar(start)
+ if marks[startchar] then
+ while current do
+ local char = ischar(current,currentfont)
+ if char then
+ local lg = ligature[char]
+ if lg then
+ stop = current
+ ligature = lg
+ current = getnext(current)
+ else
+ break
+ end
+ else
+ break
+ end
+ end
+ if stop then
+ local lig = ligature.ligature
+ if lig then
+ if trace_ligatures then
+ local stopchar = getchar(stop)
+ head, start = markstoligature(head,start,stop,lig)
+ logprocess("%s: replacing %s upto %s by ligature %s case 1",pref(dataset,sequence),gref(startchar),gref(stopchar),gref(getchar(start)))
+ else
+ head, start = markstoligature(head,start,stop,lig)
+ end
+ return head, start, true, false
+ else
+ -- ok, goto next lookup
+ end
+ end
+ else
+ local skipmark = sequence.flags[1]
+ local discfound = false
+ local lastdisc = nil
+ while current do
+ local char, id = ischar(current,currentfont)
+ if char then
+ if skipmark and marks[char] then
+ current = getnext(current)
+ else -- ligature is a tree
+ local lg = ligature[char] -- can there be multiple in a row? maybe in a bad font
+ if lg then
+ if not discfound and lastdisc then
+ discfound = lastdisc
+ lastdisc = nil
+ end
+ stop = current -- needed for fake so outside then
+ ligature = lg
+ current = getnext(current)
+ else
+ break
+ end
+ end
+ elseif char == false then
+ -- kind of weird
+ break
+ elseif id == disc_code then
+ -- tricky .. we also need to do pre here
+ local replace = getfield(current,"replace")
+ if replace then
+ -- of{f-}{}{f}e o{f-}{}{f}fe o{-}{}{ff}e (oe and ff ligature)
+ -- we can end up here when we have a start run .. testruns start at a disc but
+ -- so here we have the other case: char + disc
+ while replace do
+ local char, id = ischar(replace,currentfont)
+ if char then
+ local lg = ligature[char] -- can there be multiple in a row? maybe in a bad font
+ if lg then
+ ligature = lg
+ replace = getnext(replace)
+ else
+ return head, start, false, false
+ end
+ else
+ return head, start, false, false
+ end
+ end
+ stop = current
+ end
+ lastdisc = current
+ current = getnext(current)
+ else
+ break
+ end
+ end
+ local lig = ligature.ligature
+ if lig then
+ if stop then
+ if trace_ligatures then
+ local stopchar = getchar(stop)
+ head, start = toligature(head,start,stop,lig,dataset,sequence,skipmark,discfound)
+ logprocess("%s: replacing %s upto %s by ligature %s case 2",pref(dataset,sequence),gref(startchar),gref(stopchar),gref(lig))
+ else
+ head, start = toligature(head,start,stop,lig,dataset,sequence,skipmark,discfound)
+ end
+ else
+ -- weird but happens (in some arabic font)
+ resetinjection(start)
+ setchar(start,lig)
+ if trace_ligatures then
+ logprocess("%s: replacing %s by (no real) ligature %s case 3",pref(dataset,sequence),gref(startchar),gref(lig))
+ end
+ end
+ return head, start, true, discfound
+ else
+ -- weird but happens, pseudo ligatures ... just the components
+ end
+ end
+ return head, start, false, discfound
+end
+
+function handlers.gpos_single(head,start,dataset,sequence,kerns,rlmode,step,i,injection)
+ local startchar = getchar(start)
+ if step.format == "pair" then
+ local dx, dy, w, h = setpair(start,factor,rlmode,sequence.flags[4],kerns,injection)
+ if trace_kerns then
+ logprocess("%s: shifting single %s by (%p,%p) and correction (%p,%p)",pref(dataset,sequence),gref(startchar),dx,dy,w,h)
+ end
+ else
+ -- needs checking .. maybe no kerns format for single
+ local k = setkern(start,factor,rlmode,kerns,injection)
+ if trace_kerns then
+ logprocess("%s: shifting single %s by %p",pref(dataset,sequence),gref(startchar),k)
+ end
+ end
+ return head, start, false
+end
+
+function handlers.gpos_pair(head,start,dataset,sequence,kerns,rlmode,step,i,injection)
+ local snext = getnext(start)
+ if not snext then
+ return head, start, false
+ else
+ local prev = start
+ local done = false
+ while snext do
+ local nextchar = ischar(snext,currentfont)
+ if nextchar then
+ local krn = kerns[nextchar]
+ if not krn and marks[nextchar] then
+ prev = snext
+ snext = getnext(snext)
+ elseif not krn then
+ break
+ elseif step.format == "pair" then
+ local a, b = krn[1], krn[2]
+ if optimizekerns then
+ -- this permits a mixed table, but we could also decide to optimize this
+ -- in the loader and use format 'kern'
+ if not b and a[1] == 0 and a[2] == 0 and a[4] == 0 then
+ local k = setkern(snext,factor,rlmode,a[3],injection)
+ if trace_kerns then
+ logprocess("%s: shifting single %s by %p",pref(dataset,sequence),gref(nextchar),k)
+ end
+ done = true
+ break
+ end
+ end
+ if a and #a > 0 then
+ local x, y, w, h = setpair(start,factor,rlmode,sequence.flags[4],a,injection)
+ if trace_kerns then
+ local startchar = getchar(start)
+ logprocess("%s: shifting first of pair %s and %s by (%p,%p) and correction (%p,%p) as %s",pref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h,injection or "injections")
+ end
+ end
+ if b and #b > 0 then
+ local x, y, w, h = setpair(snext,factor,rlmode,sequence.flags[4],b,injection)
+ if trace_kerns then
+ local startchar = getchar(snext)
+ logprocess("%s: shifting second of pair %s and %s by (%p,%p) and correction (%p,%p) as %s",pref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h,injection or "injections")
+ end
+ end
+ done = true
+ break
+ elseif krn ~= 0 then
+ local k = setkern(snext,factor,rlmode,krn,injection)
+ if trace_kerns then
+ logprocess("%s: inserting kern %p between %s and %s as %s",pref(dataset,sequence),k,gref(getchar(prev)),gref(nextchar),injection or "injections")
+ end
+ done = true
+ break
+ else -- can't happen
+ break
+ end
+ else
+ break
+ end
+ end
+ return head, start, done
+ end
+end
+
+--[[ldx--
+<p>We get hits on a mark, but we're not sure if the it has to be applied so
+we need to explicitly test for basechar, baselig and basemark entries.</p>
+--ldx]]--
+
+function handlers.gpos_mark2base(head,start,dataset,sequence,markanchors,rlmode)
+ local markchar = getchar(start)
+ if marks[markchar] then
+ local base = getprev(start) -- [glyph] [start=mark]
+ if base then
+ local basechar = ischar(base,currentfont)
+ if basechar then
+ if marks[basechar] then
+ while base do
+ base = getprev(base)
+ if base then
+ basechar = ischar(base,currentfont)
+ if basechar then
+ if not marks[basechar] then
+ break
+ end
+ else
+ if trace_bugs then
+ logwarning("%s: no base for mark %s, case %i",pref(dataset,sequence),gref(markchar),1)
+ end
+ return head, start, false
+ end
+ else
+ if trace_bugs then
+ logwarning("%s: no base for mark %s, case %i",pref(dataset,sequence),gref(markchar),2)
+ end
+ return head, start, false
+ end
+ end
+ end
+ local ba = markanchors[1][basechar]
+ if ba then
+ local ma = markanchors[2]
+ local dx, dy, bound = setmark(start,base,factor,rlmode,ba,ma,characters[basechar])
+ if trace_marks then
+ logprocess("%s, anchor %s, bound %s: anchoring mark %s to basechar %s => (%p,%p)",
+ pref(dataset,sequence),anchor,bound,gref(markchar),gref(basechar),dx,dy)
+ end
+ return head, start, true
+ end
+ elseif trace_bugs then
+ logwarning("%s: nothing preceding, case %i",pref(dataset,sequence),1)
+ end
+ elseif trace_bugs then
+ logwarning("%s: nothing preceding, case %i",pref(dataset,sequence),2)
+ end
+ elseif trace_bugs then
+ logwarning("%s: mark %s is no mark",pref(dataset,sequence),gref(markchar))
+ end
+ return head, start, false
+end
+
+function handlers.gpos_mark2ligature(head,start,dataset,sequence,markanchors,rlmode)
+ local markchar = getchar(start)
+ if marks[markchar] then
+ local base = getprev(start) -- [glyph] [optional marks] [start=mark]
+ if base then
+ local basechar = ischar(base,currentfont)
+ if basechar then
+ if marks[basechar] then
+ while base do
+ base = getprev(base)
+ if base then
+ basechar = ischar(base,currentfont)
+ if basechar then
+ if not marks[basechar] then
+ break
+ end
+ else
+ if trace_bugs then
+ logwarning("%s: no base for mark %s, case %i",pref(dataset,sequence),gref(markchar),1)
+ end
+ return head, start, false
+ end
+ else
+ if trace_bugs then
+ logwarning("%s: no base for mark %s, case %i",pref(dataset,sequence),gref(markchar),2)
+ end
+ return head, start, false
+ end
+ end
+ end
+ local ba = markanchors[1][basechar]
+ if ba then
+ local ma = markanchors[2]
+ if ma then
+ local index = getligaindex(start)
+ ba = ba[index]
+ if ba then
+ local dx, dy, bound = setmark(start,base,factor,rlmode,ba,ma,characters[basechar]) -- index
+ if trace_marks then
+ logprocess("%s, anchor %s, index %s, bound %s: anchoring mark %s to baselig %s at index %s => (%p,%p)",
+ pref(dataset,sequence),anchor,index,bound,gref(markchar),gref(basechar),index,dx,dy)
+ end
+ return head, start, true
+ else
+ if trace_bugs then
+ logwarning("%s: no matching anchors for mark %s and baselig %s with index %a",pref(dataset,sequence),gref(markchar),gref(basechar),index)
+ end
+ end
+ end
+ elseif trace_bugs then
+ -- logwarning("%s: char %s is missing in font",pref(dataset,sequence),gref(basechar))
+ onetimemessage(currentfont,basechar,"no base anchors",report_fonts)
+ end
+ elseif trace_bugs then
+ logwarning("%s: prev node is no char, case %i",pref(dataset,sequence),1)
+ end
+ elseif trace_bugs then
+ logwarning("%s: prev node is no char, case %i",pref(dataset,sequence),2)
+ end
+ elseif trace_bugs then
+ logwarning("%s: mark %s is no mark",pref(dataset,sequence),gref(markchar))
+ end
+ return head, start, false
+end
+
+function handlers.gpos_mark2mark(head,start,dataset,sequence,markanchors,rlmode)
+ local markchar = getchar(start)
+ if marks[markchar] then
+ local base = getprev(start) -- [glyph] [basemark] [start=mark]
+ local slc = getligaindex(start)
+ if slc then -- a rather messy loop ... needs checking with husayni
+ while base do
+ local blc = getligaindex(base)
+ if blc and blc ~= slc then
+ base = getprev(base)
+ else
+ break
+ end
+ end
+ end
+ if base then
+ local basechar = ischar(base,currentfont)
+ if basechar then -- subtype test can go
+ local ba = markanchors[1][basechar] -- slot 1 has been made copy of the class hash
+ if ba then
+ local ma = markanchors[2]
+ local dx, dy, bound = setmark(start,base,factor,rlmode,ba,ma,characters[basechar],true)
+ if trace_marks then
+ logprocess("%s, anchor %s, bound %s: anchoring mark %s to basemark %s => (%p,%p)",
+ pref(dataset,sequence),anchor,bound,gref(markchar),gref(basechar),dx,dy)
+ end
+ return head, start, true
+ end
+ end
+ end
+ elseif trace_bugs then
+ logwarning("%s: mark %s is no mark",pref(dataset,sequence),gref(markchar))
+ end
+ return head, start, false
+end
+
+function handlers.gpos_cursive(head,start,dataset,sequence,exitanchors,rlmode,step,i) -- to be checked
+ local done = false
+ local startchar = getchar(start)
+ if marks[startchar] then
+ if trace_cursive then
+ logprocess("%s: ignoring cursive for mark %s",pref(dataset,sequence),gref(startchar))
+ end
+ else
+ local nxt = getnext(start)
+ while not done and nxt do
+ local nextchar = ischar(nxt,currentfont)
+ if not nextchar then
+ break
+ elseif marks[nextchar] then
+ -- should not happen (maybe warning)
+ nxt = getnext(nxt)
+ else
+ local exit = exitanchors[3]
+ if exit then
+ local entry = exitanchors[1][nextchar]
+ if entry then
+ entry = entry[2]
+ if entry then
+ local dx, dy, bound = setcursive(start,nxt,factor,rlmode,exit,entry,characters[startchar],characters[nextchar])
+ if trace_cursive then
+ logprocess("%s: moving %s to %s cursive (%p,%p) using anchor %s and bound %s in %s mode",pref(dataset,sequence),gref(startchar),gref(nextchar),dx,dy,anchor,bound,mref(rlmode))
+ end
+ done = true
+ end
+ end
+ end
+ break
+ end
+ end
+ end
+ return head, start, done
+end
+
+--[[ldx--
+<p>I will implement multiple chain replacements once I run into a font that uses
+it. It's not that complex to handle.</p>
+--ldx]]--
+
+local chainprocs = { }
+
+local function logprocess(...)
+ if trace_steps then
+ registermessage(...)
+ end
+ report_subchain(...)
+end
+
+local logwarning = report_subchain
+
+local function logprocess(...)
+ if trace_steps then
+ registermessage(...)
+ end
+ report_chain(...)
+end
+
+local logwarning = report_chain
+
+-- We could share functions but that would lead to extra function calls with many
+-- arguments, redundant tests and confusing messages.
+
+-- The reversesub is a special case, which is why we need to store the replacements
+-- in a bit weird way. There is no lookup and the replacement comes from the lookup
+-- itself. It is meant mostly for dealing with Urdu.
+
+local function reversesub(head,start,stop,dataset,sequence,replacements,rlmode)
+ local char = getchar(start)
+ local replacement = replacements[char]
+ if replacement then
+ if trace_singles then
+ logprocess("%s: single reverse replacement of %s by %s",cref(dataset,sequence),gref(char),gref(replacement))
+ end
+ resetinjection(start)
+ setchar(start,replacement)
+ return head, start, true
+ else
+ return head, start, false
+ end
+end
+
+
+chainprocs.reversesub = reversesub
+
+--[[ldx--
+<p>This chain stuff is somewhat tricky since we can have a sequence of actions to be
+applied: single, alternate, multiple or ligature where ligature can be an invalid
+one in the sense that it will replace multiple by one but not neccessary one that
+looks like the combination (i.e. it is the counterpart of multiple then). For
+example, the following is valid:</p>
+
+<typing>
+<line>xxxabcdexxx [single a->A][multiple b->BCD][ligature cde->E] xxxABCDExxx</line>
+</typing>
+
+<p>Therefore we we don't really do the replacement here already unless we have the
+single lookup case. The efficiency of the replacements can be improved by deleting
+as less as needed but that would also make the code even more messy.</p>
+--ldx]]--
+
+--[[ldx--
+<p>Here we replace start by a single variant.</p>
+--ldx]]--
+
+-- To be done (example needed): what if > 1 steps
+
+-- this is messy: do we need this disc checking also in alternaties?
+
+local function reportmoresteps(dataset,sequence)
+ logwarning("%s: more than 1 step",cref(dataset,sequence))
+end
+
+function chainprocs.gsub_single(head,start,stop,dataset,sequence,currentlookup,chainindex)
+ local steps = currentlookup.steps
+ local nofsteps = currentlookup.nofsteps
+ if nofsteps > 1 then
+ reportmoresteps(dataset,sequence)
+ end
+ local current = start
+ while current do
+ local currentchar = ischar(current)
+ if currentchar then
+ local replacement = steps[1].coverage[currentchar]
+ if not replacement or replacement == "" then
+ if trace_bugs then
+ logwarning("%s: no single for %s",cref(dataset,sequence,chainindex),gref(currentchar))
+ end
+ else
+ if trace_singles then
+ logprocess("%s: replacing single %s by %s",cref(dataset,sequence,chainindex),gref(currentchar),gref(replacement))
+ end
+ resetinjection(current)
+ setchar(current,replacement)
+ end
+ return head, start, true
+ elseif currentchar == false then
+ -- can't happen
+ break
+ elseif current == stop then
+ break
+ else
+ current = getnext(current)
+ end
+ end
+ return head, start, false
+end
+
+--[[ldx--
+<p>Here we replace start by a sequence of new glyphs.</p>
+--ldx]]--
+
+function chainprocs.gsub_multiple(head,start,stop,dataset,sequence,currentlookup)
+ local steps = currentlookup.steps
+ local nofsteps = currentlookup.nofsteps
+ if nofsteps > 1 then
+ reportmoresteps(dataset,sequence)
+ end
+ local startchar = getchar(start)
+ local replacement = steps[1].coverage[startchar]
+ if not replacement or replacement == "" then
+ if trace_bugs then
+ logwarning("%s: no multiple for %s",cref(dataset,sequence),gref(startchar))
+ end
+ else
+ if trace_multiples then
+ logprocess("%s: replacing %s by multiple characters %s",cref(dataset,sequence),gref(startchar),gref(replacement))
+ end
+ return multiple_glyphs(head,start,replacement,currentlookup.flags[1]) -- not sequence.flags?
+ end
+ return head, start, false
+end
+
+--[[ldx--
+<p>Here we replace start by new glyph. First we delete the rest of the match.</p>
+--ldx]]--
+
+-- char_1 mark_1 -> char_x mark_1 (ignore marks)
+-- char_1 mark_1 -> char_x
+
+-- to be checked: do we always have just one glyph?
+-- we can also have alternates for marks
+-- marks come last anyway
+-- are there cases where we need to delete the mark
+
+function chainprocs.gsub_alternate(head,start,stop,dataset,sequence,currentlookup)
+ local steps = currentlookup.steps
+ local nofsteps = currentlookup.nofsteps
+ if nofsteps > 1 then
+ reportmoresteps(dataset,sequence)
+ end
+ local kind = dataset[4]
+ local what = dataset[1]
+ local value = what == true and tfmdata.shared.features[kind] or what
+ local current = start
+ while current do
+ local currentchar = ischar(current)
+ if currentchar then
+ local alternatives = steps[1].coverage[currentchar]
+ if alternatives then
+ local choice, comment = get_alternative_glyph(current,alternatives,value)
+ if choice then
+ if trace_alternatives then
+ logprocess("%s: replacing %s by alternative %a to %s, %s",cref(dataset,sequence),gref(char),choice,gref(choice),comment)
+ end
+ resetinjection(start)
+ setchar(start,choice)
+ else
+ if trace_alternatives then
+ logwarning("%s: no variant %a for %s, %s",cref(dataset,sequence),value,gref(char),comment)
+ end
+ end
+ end
+ return head, start, true
+ elseif currentchar == false then
+ -- can't happen
+ break
+ elseif current == stop then
+ break
+ else
+ current = getnext(current)
+ end
+ end
+ return head, start, false
+end
+
+--[[ldx--
+<p>When we replace ligatures we use a helper that handles the marks. I might change
+this function (move code inline and handle the marks by a separate function). We
+assume rather stupid ligatures (no complex disc nodes).</p>
+--ldx]]--
+
+function chainprocs.gsub_ligature(head,start,stop,dataset,sequence,currentlookup,chainindex)
+ local steps = currentlookup.steps
+ local nofsteps = currentlookup.nofsteps
+ if nofsteps > 1 then
+ reportmoresteps(dataset,sequence)
+ end
+ local startchar = getchar(start)
+ local ligatures = steps[1].coverage[startchar]
+ if not ligatures then
+ if trace_bugs then
+ logwarning("%s: no ligatures starting with %s",cref(dataset,sequence,chainindex),gref(startchar))
+ end
+ else
+ local current = getnext(start)
+ local discfound = false
+ local last = stop
+ local nofreplacements = 1
+ local skipmark = currentlookup.flags[1] -- sequence.flags?
+ while current do
+ -- todo: ischar ... can there really be disc nodes here?
+ local id = getid(current)
+ if id == disc_code then
+ if not discfound then
+ discfound = current
+ end
+ if current == stop then
+ break -- okay? or before the disc
+ else
+ current = getnext(current)
+ end
+ else
+ local schar = getchar(current)
+ if skipmark and marks[schar] then -- marks
+ -- if current == stop then -- maybe add this
+ -- break
+ -- else
+ current = getnext(current)
+ -- end
+ else
+ local lg = ligatures[schar]
+ if lg then
+ ligatures = lg
+ last = current
+ nofreplacements = nofreplacements + 1
+ if current == stop then
+ break
+ else
+ current = getnext(current)
+ end
+ else
+ break
+ end
+ end
+ end
+ end
+ local ligature = ligatures.ligature
+ if ligature then
+ if chainindex then
+ stop = last
+ end
+ if trace_ligatures then
+ if start == stop then
+ logprocess("%s: replacing character %s by ligature %s case 3",cref(dataset,sequence,chainindex),gref(startchar),gref(ligature))
+ else
+ logprocess("%s: replacing character %s upto %s by ligature %s case 4",cref(dataset,sequence,chainindex),gref(startchar),gref(getchar(stop)),gref(ligature))
+ end
+ end
+ head, start = toligature(head,start,stop,ligature,dataset,sequence,skipmark,discfound)
+ return head, start, true, nofreplacements, discfound
+ elseif trace_bugs then
+ if start == stop then
+ logwarning("%s: replacing character %s by ligature fails",cref(dataset,sequence,chainindex),gref(startchar))
+ else
+ logwarning("%s: replacing character %s upto %s by ligature fails",cref(dataset,sequence,chainindex),gref(startchar),gref(getchar(stop)))
+ end
+ end
+ end
+ return head, start, false, 0, false
+end
+
+function chainprocs.gpos_single(head,start,stop,dataset,sequence,currentlookup,rlmode,chainindex)
+ local steps = currentlookup.steps
+ local nofsteps = currentlookup.nofsteps
+ if nofsteps > 1 then
+ reportmoresteps(dataset,sequence)
+ end
+ local startchar = getchar(start)
+ local step = steps[1]
+ local kerns = step.coverage[startchar]
+ if not kerns then
+ -- skip
+ elseif step.format == "pair" then
+ local dx, dy, w, h = setpair(start,factor,rlmode,sequence.flags[4],kerns) -- currentlookup.flags ?
+ if trace_kerns then
+ logprocess("%s: shifting single %s by (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),dx,dy,w,h)
+ end
+ else -- needs checking .. maybe no kerns format for single
+ local k = setkern(start,factor,rlmode,kerns,injection)
+ if trace_kerns then
+ logprocess("%s: shifting single %s by %p",cref(dataset,sequence),gref(startchar),k)
+ end
+ end
+ return head, start, false
+end
+
+function chainprocs.gpos_pair(head,start,stop,dataset,sequence,currentlookup,rlmode,chainindex) -- todo: injections ?
+ local steps = currentlookup.steps
+ local nofsteps = currentlookup.nofsteps
+ if nofsteps > 1 then
+ reportmoresteps(dataset,sequence)
+ end
+ local snext = getnext(start)
+ if snext then
+ local startchar = getchar(start)
+ local step = steps[1]
+ local kerns = step.coverage[startchar] -- always 1 step
+ if kerns then
+ local prev = start
+ local done = false
+ while snext do
+ local nextchar = ischar(snext,currentfont)
+ if not nextchar then
+ break
+ end
+ local krn = kerns[nextchar]
+ if not krn and marks[nextchar] then
+ prev = snext
+ snext = getnext(snext)
+ elseif not krn then
+ break
+ elseif step.format == "pair" then
+ local a, b = krn[1], krn[2]
+ if optimizekerns then
+ -- this permits a mixed table, but we could also decide to optimize this
+ -- in the loader and use format 'kern'
+ if not b and a[1] == 0 and a[2] == 0 and a[4] == 0 then
+ local k = setkern(snext,factor,rlmode,a[3],"injections")
+ if trace_kerns then
+ logprocess("%s: shifting single %s by %p",cref(dataset,sequence),gref(startchar),k)
+ end
+ done = true
+ break
+ end
+ end
+ if a and #a > 0 then
+ local startchar = getchar(start)
+ local x, y, w, h = setpair(start,factor,rlmode,sequence.flags[4],a,"injections") -- currentlookups flags?
+ if trace_kerns then
+ logprocess("%s: shifting first of pair %s and %s by (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h)
+ end
+ end
+ if b and #b > 0 then
+ local startchar = getchar(start)
+ local x, y, w, h = setpair(snext,factor,rlmode,sequence.flags[4],b,"injections")
+ if trace_kerns then
+ logprocess("%s: shifting second of pair %s and %s by (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h)
+ end
+ end
+ done = true
+ break
+ elseif krn ~= 0 then
+ local k = setkern(snext,factor,rlmode,krn)
+ if trace_kerns then
+ logprocess("%s: inserting kern %s between %s and %s",cref(dataset,sequence),k,gref(getchar(prev)),gref(nextchar))
+ end
+ done = true
+ break
+ else
+ break
+ end
+ end
+ return head, start, done
+ end
+ end
+ return head, start, false
+end
+
+function chainprocs.gpos_mark2base(head,start,stop,dataset,sequence,currentlookup,rlmode)
+ local steps = currentlookup.steps
+ local nofsteps = currentlookup.nofsteps
+ if nofsteps > 1 then
+ reportmoresteps(dataset,sequence)
+ end
+ local markchar = getchar(start)
+ if marks[markchar] then
+ local markanchors = steps[1].coverage[markchar] -- always 1 step
+ if markanchors then
+ local base = getprev(start) -- [glyph] [start=mark]
+ if base then
+ local basechar = ischar(base,currentfont)
+ if basechar then
+ if marks[basechar] then
+ while base do
+ base = getprev(base)
+ if base then
+ local basechar = ischar(base,currentfont)
+ if basechar then
+ if not marks[basechar] then
+ break
+ end
+ else
+ if trace_bugs then
+ logwarning("%s: no base for mark %s, case %i",pref(dataset,sequence),gref(markchar),1)
+ end
+ return head, start, false
+ end
+ else
+ if trace_bugs then
+ logwarning("%s: no base for mark %s, case %i",pref(dataset,sequence),gref(markchar),2)
+ end
+ return head, start, false
+ end
+ end
+ end
+ local ba = markanchors[1][basechar]
+ if ba then
+ local ma = markanchors[2]
+ if ma then
+ local dx, dy, bound = setmark(start,base,factor,rlmode,ba,ma,characters[basechar])
+ if trace_marks then
+ logprocess("%s, anchor %s, bound %s: anchoring mark %s to basechar %s => (%p,%p)",
+ cref(dataset,sequence),anchor,bound,gref(markchar),gref(basechar),dx,dy)
+ end
+ return head, start, true
+ end
+ end
+ elseif trace_bugs then
+ logwarning("%s: prev node is no char, case %i",cref(dataset,sequence),1)
+ end
+ elseif trace_bugs then
+ logwarning("%s: prev node is no char, case %i",cref(dataset,sequence),2)
+ end
+ elseif trace_bugs then
+ logwarning("%s: mark %s has no anchors",cref(dataset,sequence),gref(markchar))
+ end
+ elseif trace_bugs then
+ logwarning("%s: mark %s is no mark",cref(dataset,sequence),gref(markchar))
+ end
+ return head, start, false
+end
+
+function chainprocs.gpos_mark2ligature(head,start,stop,dataset,sequence,currentlookup,rlmode)
+ local steps = currentlookup.steps
+ local nofsteps = currentlookup.nofsteps
+ if nofsteps > 1 then
+ reportmoresteps(dataset,sequence)
+ end
+ local markchar = getchar(start)
+ if marks[markchar] then
+ local markanchors = steps[1].coverage[markchar] -- always 1 step
+ if markanchors then
+ local base = getprev(start) -- [glyph] [optional marks] [start=mark]
+ if base then
+ local basechar = ischar(base,currentfont)
+ if basechar then
+ if marks[basechar] then
+ while base do
+ base = getprev(base)
+ if base then
+ local basechar = ischar(base,currentfont)
+ if basechar then
+ if not marks[basechar] then
+ break
+ end
+ else
+ if trace_bugs then
+ logwarning("%s: no base for mark %s, case %i",cref(dataset,sequence),markchar,1)
+ end
+ return head, start, false
+ end
+ else
+ if trace_bugs then
+ logwarning("%s: no base for mark %s, case %i",cref(dataset,sequence),markchar,2)
+ end
+ return head, start, false
+ end
+ end
+ end
+ local ba = markanchors[1][basechar]
+ if ba then
+ local ma = markanchors[2]
+ if ma then
+ local index = getligaindex(start)
+ ba = ba[index]
+ if ba then
+ local dx, dy, bound = setmark(start,base,factor,rlmode,ba,ma,characters[basechar])
+ if trace_marks then
+ logprocess("%s, anchor %s, bound %s: anchoring mark %s to baselig %s at index %s => (%p,%p)",
+ cref(dataset,sequence),anchor,a or bound,gref(markchar),gref(basechar),index,dx,dy)
+ end
+ return head, start, true
+ end
+ end
+ end
+ elseif trace_bugs then
+ logwarning("%s, prev node is no char, case %i",cref(dataset,sequence),1)
+ end
+ elseif trace_bugs then
+ logwarning("%s, prev node is no char, case %i",cref(dataset,sequence),2)
+ end
+ elseif trace_bugs then
+ logwarning("%s, mark %s has no anchors",cref(dataset,sequence),gref(markchar))
+ end
+ elseif trace_bugs then
+ logwarning("%s, mark %s is no mark",cref(dataset,sequence),gref(markchar))
+ end
+ return head, start, false
+end
+
+function chainprocs.gpos_mark2mark(head,start,stop,dataset,sequence,currentlookup,rlmode)
+ local steps = currentlookup.steps
+ local nofsteps = currentlookup.nofsteps
+ if nofsteps > 1 then
+ reportmoresteps(dataset,sequence)
+ end
+ local markchar = getchar(start)
+ if marks[markchar] then
+ local markanchors = steps[1].coverage[markchar] -- always 1 step
+ if markanchors then
+ local base = getprev(start) -- [glyph] [basemark] [start=mark]
+ local slc = getligaindex(start)
+ if slc then -- a rather messy loop ... needs checking with husayni
+ while base do
+ local blc = getligaindex(base)
+ if blc and blc ~= slc then
+ base = getprev(base)
+ else
+ break
+ end
+ end
+ end
+ if base then -- subtype test can go
+ local basechar = ischar(base,currentfont)
+ if basechar then
+ local ba = markanchors[1][basechar]
+ if ba then
+ local ma = markanchors[2]
+ if ma then
+ local dx, dy, bound = setmark(start,base,factor,rlmode,ba,ma,characters[basechar],true)
+ if trace_marks then
+ logprocess("%s, anchor %s, bound %s: anchoring mark %s to basemark %s => (%p,%p)",
+ cref(dataset,sequence),anchor,bound,gref(markchar),gref(basechar),dx,dy)
+ end
+ return head, start, true
+ end
+ end
+ elseif trace_bugs then
+ logwarning("%s: prev node is no mark, case %i",cref(dataset,sequence),1)
+ end
+ elseif trace_bugs then
+ logwarning("%s: prev node is no mark, case %i",cref(dataset,sequence),2)
+ end
+ elseif trace_bugs then
+ logwarning("%s: mark %s has no anchors",cref(dataset,sequence),gref(markchar))
+ end
+ elseif trace_bugs then
+ logwarning("%s: mark %s is no mark",cref(dataset,sequence),gref(markchar))
+ end
+ return head, start, false
+end
+
+function chainprocs.gpos_cursive(head,start,stop,dataset,sequence,currentlookup,rlmode)
+ local steps = currentlookup.steps
+ local nofsteps = currentlookup.nofsteps
+ if nofsteps > 1 then
+ reportmoresteps(dataset,sequence)
+ end
+ local startchar = getchar(start)
+ local exitanchors = steps[1].coverage[startchar] -- always 1 step
+ if exitanchors then
+ local done = false
+ if marks[startchar] then
+ if trace_cursive then
+ logprocess("%s: ignoring cursive for mark %s",pref(dataset,sequence),gref(startchar))
+ end
+ else
+ local nxt = getnext(start)
+ while not done and nxt do
+ local nextchar = ischar(nxt,currentfont)
+ if not nextchar then
+ break
+ elseif marks[nextchar] then
+ -- should not happen (maybe warning)
+ nxt = getnext(nxt)
+ else
+ local exit = exitanchors[3]
+ if exit then
+ local entry = exitanchors[1][nextchar]
+ if entry then
+ entry = entry[2]
+ if entry then
+ local dx, dy, bound = setcursive(start,nxt,factor,rlmode,exit,entry,characters[startchar],characters[nextchar])
+ if trace_cursive then
+ logprocess("%s: moving %s to %s cursive (%p,%p) using anchor %s and bound %s in %s mode",pref(dataset,sequence),gref(startchar),gref(nextchar),dx,dy,anchor,bound,mref(rlmode))
+ end
+ done = true
+ break
+ end
+ end
+ elseif trace_bugs then
+ onetimemessage(currentfont,startchar,"no entry anchors",report_fonts)
+ end
+ break
+ end
+ end
+ end
+ return head, start, done
+ else
+ if trace_cursive and trace_details then
+ logprocess("%s, cursive %s is already done",pref(dataset,sequence),gref(getchar(start)),alreadydone)
+ end
+ return head, start, false
+ end
+end
+
+-- what pointer to return, spec says stop
+-- to be discussed ... is bidi changer a space?
+-- elseif char == zwnj and sequence[n][32] then -- brrr
+
+local function show_skip(dataset,sequence,char,ck,class)
+ logwarning("%s: skipping char %s, class %a, rule %a, lookuptype %a",cref(dataset,sequence),gref(char),class,ck[1],ck[8] or ck[2])
+end
+
+-- A previous version had disc collapsing code in the (single sub) handler plus some
+-- checking in the main loop, but that left the pre/post sequences undone. The best
+-- solution is to add some checking there and backtrack when a replace/post matches
+-- but it takes a bit of work to figure out an efficient way (this is what the sweep*
+-- names refer to). I might look into that variant one day again as it can replace
+-- some other code too. In that approach we can have a special version for gub and pos
+-- which gains some speed. This method does the test and passes info to the handlers
+-- (sweepnode, sweepmode, sweepprev, sweepnext, etc). Here collapsing is handled in the
+-- main loop which also makes code elsewhere simpler (i.e. no need for the other special
+-- runners and disc code in ligature building). I also experimented with pushing preceding
+-- glyphs sequences in the replace/pre fields beforehand which saves checking afterwards
+-- but at the cost of duplicate glyphs (memory) but it's too much overhead (runtime).
+--
+-- In the meantime Kai had moved the code from the single chain into a more general handler
+-- and this one (renamed to chaindisk) is used now. I optimized the code a bit and brought
+-- it in sycn with the other code. Hopefully I didn't introduce errors. Note: this somewhat
+-- complex approach is meant for fonts that implement (for instance) ligatures by character
+-- replacement which to some extend is not that suitable for hyphenation. I also use some
+-- helpers. This method passes some states but reparses the list. There is room for a bit of
+-- speed up but that will be done in the context version. (In fact a partial rewrite of all
+-- code can bring some more efficientry.)
+--
+-- I didn't test it with extremes but successive disc nodes still can give issues but in
+-- order to handle that we need more complex code which also slows down even more. The main
+-- loop variant could deal with that: test, collapse, backtrack.
+
+local function chaindisk(head,start,last,dataset,sequence,chainlookup,rlmode,k,ck,chainproc)
+
+ if not start then
+ return head, start, false
+ end
+
+ local startishead = start == head
+ local seq = ck[3]
+ local f = ck[4]
+ local l = ck[5]
+ local s = #seq
+ local done = false
+ local sweepnode = sweepnode
+ local sweeptype = sweeptype
+ local sweepoverflow = false
+ local checkdisc = getprev(head) -- hm bad name head
+ local keepdisc = not sweepnode
+ local lookaheaddisc = nil
+ local backtrackdisc = nil
+ local current = start
+ local last = start
+ local prev = getprev(start)
+
+ -- fishy: so we can overflow and then go on in the sweep?
+
+ local i = f
+ while i <= l do
+ local id = getid(current)
+ if id == glyph_code then
+ i = i + 1
+ last = current
+ current = getnext(current)
+ elseif id == disc_code then
+ if keepdisc then
+ keepdisc = false
+ if notmatchpre[current] ~= notmatchreplace[current] then
+ lookaheaddisc = current
+ end
+ local replace = getfield(current,"replace")
+ while replace and i <= l do
+ if getid(replace) == glyph_code then
+ i = i + 1
+ end
+ replace = getnext(replace)
+ end
+ last = current
+ current = getnext(c)
+ else
+ head, current = flattendisk(head,current)
+ end
+ else
+ last = current
+ current = getnext(current)
+ end
+ if current then
+ -- go on
+ elseif sweepoverflow then
+ -- we already are folling up on sweepnode
+ break
+ elseif sweeptype == "post" or sweeptype == "replace" then
+ current = getnext(sweepnode)
+ if current then
+ sweeptype = nil
+ sweepoverflow = true
+ else
+ break
+ end
+ else
+ break -- added
+ end
+ end
+
+ if sweepoverflow then
+ local prev = current and getprev(current)
+ if not current or prev ~= sweepnode then
+ local head = getnext(sweepnode)
+ local tail = nil
+ if prev then
+ tail = prev
+ setprev(current,sweepnode)
+ else
+ tail = find_node_tail(head)
+ end
+ setnext(sweepnode,current)
+ setprev(head,nil)
+ setnext(tail,nil)
+ appenddisc(sweepnode,head)
+ end
+ end
+
+ if l < s then
+ local i = l
+ local t = sweeptype == "post" or sweeptype == "replace"
+ while current and i < s do
+ local id = getid(current)
+ if id == glyph_code then
+ i = i + 1
+ current = getnext(current)
+ elseif id == disc_code then
+ if keepdisc then
+ keepdisc = false
+ if notmatchpre[current] ~= notmatchreplace[current] then
+ lookaheaddisc = current
+ end
+ local replace = getfield(c,"replace")
+ while replace and i < s do
+ if getid(replace) == glyph_code then
+ i = i + 1
+ end
+ replace = getnext(replace)
+ end
+ current = getnext(current)
+ elseif notmatchpre[current] ~= notmatchreplace[current] then
+ head, current = flattendisk(head,current)
+ else
+ current = getnext(current) -- HH
+ end
+ else
+ current = getnext(current)
+ end
+ if not current and t then
+ current = getnext(sweepnode)
+ if current then
+ sweeptype = nil
+ end
+ end
+ end
+ end
+
+ if f > 1 then
+ local current = prev
+ local i = f
+ local t = sweeptype == "pre" or sweeptype == "replace"
+ if not current and t and current == checkdisk then
+ current = getprev(sweepnode)
+ end
+ while current and i > 1 do -- missing getprev added / moved outside
+ local id = getid(current)
+ if id == glyph_code then
+ i = i - 1
+ elseif id == disc_code then
+ if keepdisc then
+ keepdisc = false
+ if notmatchpost[current] ~= notmatchreplace[current] then
+ backtrackdisc = current
+ end
+ local replace = getfield(current,"replace")
+ while replace and i > 1 do
+ if getid(replace) == glyph_code then
+ i = i - 1
+ end
+ replace = getnext(replace)
+ end
+ elseif notmatchpost[current] ~= notmatchreplace[current] then
+ head, current = flattendisk(head,current)
+ end
+ end
+ current = getprev(current)
+ if t and current == checkdisk then
+ current = getprev(sweepnode)
+ end
+ end
+ end
+
+ local ok = false
+ if lookaheaddisc then
+
+ local cf = start
+ local cl = getprev(lookaheaddisc)
+ local cprev = getprev(start)
+ local insertedmarks = 0
+
+ while cprev do
+ local char = ischar(cf,currentfont)
+ if char and marks[char] then
+ insertedmarks = insertedmarks + 1
+ cf = cprev
+ startishead = cf == head
+ cprev = getprev(cprev)
+ else
+ break
+ end
+ end
+
+ setprev(lookaheaddisc,cprev)
+ if cprev then
+ setnext(cprev,lookaheaddisc)
+ end
+ setprev(cf,nil)
+ setnext(cl,nil)
+ if startishead then
+ head = lookaheaddisc
+ end
+ local pre, post, replace = getdisc(lookaheaddisc)
+ local new = copy_node_list(cf)
+ local cnew = new
+ for i=1,insertedmarks do
+ cnew = getnext(cnew)
+ end
+ local clast = cnew
+ for i=f,l do
+ clast = getnext(clast)
+ end
+ if not notmatchpre[lookaheaddisc] then
+ cf, start, ok = chainproc(cf,start,last,dataset,sequence,chainlookup,rlmode,k)
+ end
+ if not notmatchreplace[lookaheaddisc] then
+ new, cnew, ok = chainproc(new,cnew,clast,dataset,sequence,chainlookup,rlmode,k)
+ end
+ if pre then
+ setlink(cl,pre)
+ end
+ if replace then
+ local tail = find_node_tail(new)
+ setlink(tail,replace)
+ end
+ setdisc(lookaheaddisc,cf,post,new)
+ start = getprev(lookaheaddisc)
+ sweephead[cf] = getnext(clast)
+ sweephead[new] = getnext(last)
+
+ elseif backtrackdisc then
+
+ local cf = getnext(backtrackdisc)
+ local cl = start
+ local cnext = getnext(start)
+ local insertedmarks = 0
+
+ while cnext do
+ local char = ischar(cnext,currentfont)
+ if char and marks[char] then
+ insertedmarks = insertedmarks + 1
+ cl = cnext
+ cnext = getnext(cnext)
+ else
+ break
+ end
+ end
+ if cnext then
+ setprev(cnext,backtrackdisc)
+ end
+ setnext(backtrackdisc,cnext)
+ setprev(cf,nil)
+ setnext(cl,nil)
+ local pre, post, replace, pretail, posttail, replacetail = getdisc(backtrackdisc,true)
+ local new = copy_node_list(cf)
+ local cnew = find_node_tail(new)
+ for i=1,insertedmarks do
+ cnew = getprev(cnew)
+ end
+ local clast = cnew
+ for i=f,l do
+ clast = getnext(clast)
+ end
+ if not notmatchpost[backtrackdisc] then
+ cf, start, ok = chainproc(cf,start,last,dataset,sequence,chainlookup,rlmode,k)
+ end
+ if not notmatchreplace[backtrackdisc] then
+ new, cnew, ok = chainproc(new,cnew,clast,dataset,sequence,chainlookup,rlmode,k)
+ end
+ if post then
+ setlink(posttail,cf)
+ else
+ post = cf
+ end
+ if replace then
+ setlink(replacetail,new)
+ else
+ replace = new
+ end
+ setdisc(backtrackdisc,pre,post,replace)
+ start = getprev(backtrackdisc)
+ sweephead[post] = getnext(clast)
+ sweephead[replace] = getnext(last)
+
+ else
+
+ head, start, ok = chainproc(head,start,last,dataset,sequence,chainlookup,rlmode,k)
+
+ end
+
+ return head, start, ok
+end
+
+-- helpers from elsewhere
+
+-- local function currentmatch(current,n,l)
+-- while current do
+-- if getid(current) ~= glyph_code then
+-- return false
+-- elseif seq[n][getchar(current)] then
+-- n = n + 1
+-- current = getnext(current)
+-- if not current then
+-- return true, n, current
+-- elseif n > l then
+-- -- match = false
+-- return true, n, current
+-- end
+-- else
+-- return false
+-- end
+-- end
+-- end
+--
+-- local function aftermatch(current,n,l)
+-- while current do
+-- if getid(current) ~= glyph_code then
+-- return false
+-- elseif seq[n][getchar(current)] then
+-- n = n + 1
+-- current = getnext(current)
+-- if not current then
+-- return true, n, current
+-- elseif n > l then
+-- -- match = false
+-- return true, n, current
+-- end
+-- else
+-- return false
+-- end
+-- end
+-- end
+--
+-- local function beforematch(current,n)
+-- local finish = getprev(current)
+-- local current = find_node_tail(current)
+-- while current do
+-- if getid(current) ~= glyph_code then
+-- return false
+-- elseif seq[n][getchar(current)] then
+-- n = n - 1
+-- current = getprev(current)
+-- if not current or current == finish then
+-- return true, n, current
+-- elseif n < 1 then
+-- -- match = false
+-- return true, n, current
+-- end
+-- else
+-- return false
+-- end
+-- end
+-- end
+
+local noflags = { false, false, false, false }
+
+local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode)
+ local sweepnode = sweepnode
+ local sweeptype = sweeptype
+ local currentfont = currentfont
+ local diskseen = false
+ local checkdisc = getprev(head)
+ local flags = sequence.flags or noflags
+ local done = false
+ local skipmark = flags[1]
+ local skipligature = flags[2]
+ local skipbase = flags[3]
+ local markclass = sequence.markclass
+ local skipped = false
+ for k=1,#contexts do -- i've only seen ccmp having > 1 (e.g. dejavu)
+ local match = true
+ local current = start
+ local last = start
+ local ck = contexts[k]
+ local seq = ck[3]
+ local s = #seq
+ -- f..l = mid string
+ if s == 1 then
+ -- never happens
+ local char = ischar(current,currentfont)
+ if char then
+ match = seq[1][char]
+ end
+ else
+ -- maybe we need a better space check (maybe check for glue or category or combination)
+ -- we cannot optimize for n=2 because there can be disc nodes
+ local f = ck[4]
+ local l = ck[5]
+ -- current match
+ if f == 1 and f == l then -- current only
+ -- already a hit
+ -- match = true
+ else -- before/current/after | before/current | current/after
+ -- no need to test first hit (to be optimized)
+ if f == l then -- new, else last out of sync (f is > 1)
+ -- match = true
+ else
+ local discfound = nil
+ local n = f + 1
+ last = getnext(last)
+ while n <= l do
+ if not last and (sweeptype == "post" or sweeptype == "replace") then
+ last = getnext(sweepnode)
+ sweeptype = nil
+ end
+ if last then
+ local char, id = ischar(last,currentfont)
+ if char then
+ local ccd = descriptions[char]
+ if ccd then
+ local class = ccd.class or "base"
+ if class == skipmark or class == skipligature or class == skipbase or (markclass and class == "mark" and not markclass[char]) then
+ skipped = true
+ if trace_skips then
+ show_skip(dataset,sequence,char,ck,class)
+ end
+ last = getnext(last)
+ elseif seq[n][char] then
+ if n < l then
+ last = getnext(last)
+ end
+ n = n + 1
+ else
+ if discfound then
+ notmatchreplace[discfound] = true
+ match = not notmatchpre[discfound]
+ else
+ match = false
+ end
+ break
+ end
+ else
+ if discfound then
+ notmatchreplace[discfound] = true
+ match = not notmatchpre[discfound]
+ else
+ match = false
+ end
+ break
+ end
+ last = getnext(last)
+ elseif char == false then
+ if discfound then
+ notmatchreplace[discfound] = true
+ match = not notmatchpre[discfound]
+ else
+ match = false
+ end
+ break
+ elseif id == disc_code then
+ diskseen = true
+ discfound = last
+ notmatchpre[last] = nil
+ notmatchpost[last] = true
+ notmatchreplace[last] = nil
+ local pre, post, replace = getdisc(last)
+ if pre then
+ local n = n
+ while pre do
+ if seq[n][getchar(pre)] then
+ n = n + 1
+ pre = getnext(pre)
+ if n > l then
+ break
+ end
+ else
+ notmatchpre[last] = true
+ break
+ end
+ end
+ if n <= l then
+ notmatchpre[last] = true
+ end
+ else
+ notmatchpre[last] = true
+ end
+ if replace then
+ -- so far we never entered this branch
+ while replace do
+ if seq[n][getchar(replace)] then
+ n = n + 1
+ replace = getnext(replace)
+ if n > l then
+ break
+ end
+ else
+ notmatchreplace[last] = true
+ match = not notmatchpre[last]
+ break
+ end
+ end
+ match = not notmatchpre[last]
+ end
+ last = getnext(last)
+ else
+ match = false
+ break
+ end
+ else
+ match = false
+ break
+ end
+ end
+ end
+ end
+ -- before
+ if match and f > 1 then
+ local prev = getprev(start)
+ if prev then
+ if prev == checkdisc and (sweeptype == "pre" or sweeptype == "replace") then
+ prev = getprev(sweepnode)
+ -- sweeptype = nil
+ end
+ if prev then
+ local discfound = nil
+ local n = f - 1
+ while n >= 1 do
+ if prev then
+ local char, id = ischar(prev,currentfont)
+ if char then
+ local ccd = descriptions[char]
+ if ccd then
+ local class = ccd.class
+ if class == skipmark or class == skipligature or class == skipbase or (markclass and class == "mark" and not markclass[char]) then
+ skipped = true
+ if trace_skips then
+ show_skip(dataset,sequence,char,ck,class)
+ end
+ elseif seq[n][char] then
+ n = n -1
+ else
+ if discfound then
+ notmatchreplace[discfound] = true
+ match = not notmatchpost[discfound]
+ else
+ match = false
+ end
+ break
+ end
+ else
+ if discfound then
+ notmatchreplace[discfound] = true
+ match = not notmatchpost[discfound]
+ else
+ match = false
+ end
+ break
+ end
+ prev = getprev(prev)
+ elseif char == false then
+ if discfound then
+ notmatchreplace[discfound] = true
+ match = not notmatchpost[discfound]
+ else
+ match = false
+ end
+ break
+ elseif id == disc_code then
+ -- the special case: f i where i becomes dottless i ..
+ diskseen = true
+ discfound = prev
+ notmatchpre[prev] = true
+ notmatchpost[prev] = nil
+ notmatchreplace[prev] = nil
+ local pre, post, replace, pretail, posttail, replacetail = getdisc(prev,true)
+ if pre ~= start and post ~= start and replace ~= start then
+ if post then
+ local n = n
+ while posttail do
+ if seq[n][getchar(posttail)] then
+ n = n - 1
+ if posttail == post then
+ break
+ else
+ posttail = getprev(posttail)
+ if n < 1 then
+ break
+ end
+ end
+ else
+ notmatchpost[prev] = true
+ break
+ end
+ end
+ if n >= 1 then
+ notmatchpost[prev] = true
+ end
+ else
+ notmatchpost[prev] = true
+ end
+ if replace then
+ -- we seldom enter this branch (e.g. on brill efficient)
+ while replacetail do
+ if seq[n][getchar(replacetail)] then
+ n = n - 1
+ if replacetail == replace then
+ break
+ else
+ replacetail = getprev(replacetail)
+ if n < 1 then
+ break
+ end
+ end
+ else
+ notmatchreplace[prev] = true
+ match = not notmatchpost[prev]
+ break
+ end
+ end
+ if not match then
+ break
+ end
+ else
+ -- skip 'm
+ end
+ else
+ -- skip 'm
+ end
+ elseif seq[n][32] then
+ n = n - 1
+ else
+ match = false
+ break
+ end
+ prev = getprev(prev)
+ elseif seq[n][32] then -- somewhat special, as zapfino can have many preceding spaces
+ n = n - 1
+ else
+ match = false
+ break
+ end
+ end
+ else
+ match = false
+ end
+ else
+ match = false
+ end
+ end
+ -- after
+ if match and s > l then
+ local current = last and getnext(last)
+ if not current then
+ if sweeptype == "post" or sweeptype == "replace" then
+ current = getnext(sweepnode)
+ -- sweeptype = nil
+ end
+ end
+ if current then
+ local discfound = nil
+ -- removed optimization for s-l == 1, we have to deal with marks anyway
+ local n = l + 1
+ while n <= s do
+ if current then
+ local char, id = ischar(current,currentfont)
+ if char then
+ local ccd = descriptions[char]
+ if ccd then
+ local class = ccd.class
+ if class == skipmark or class == skipligature or class == skipbase or (markclass and class == "mark" and not markclass[char]) then
+ skipped = true
+ if trace_skips then
+ show_skip(dataset,sequence,char,ck,class)
+ end
+ elseif seq[n][char] then
+ n = n + 1
+ else
+ if discfound then
+ notmatchreplace[discfound] = true
+ match = not notmatchpre[discfound]
+ else
+ match = false
+ end
+ break
+ end
+ else
+ if discfound then
+ notmatchreplace[discfound] = true
+ match = not notmatchpre[discfound]
+ else
+ match = false
+ end
+ break
+ end
+ elseif char == false then
+ if discfound then
+ notmatchreplace[discfound] = true
+ match = not notmatchpre[discfound]
+ else
+ match = false
+ end
+ break
+ elseif id == disc_code then
+ diskseen = true
+ discfound = current
+ notmatchpre[current] = nil
+ notmatchpost[current] = true
+ notmatchreplace[current] = nil
+ local pre, post, replace = getdisc(current)
+ if pre then
+ local n = n
+ while pre do
+ if seq[n][getchar(pre)] then
+ n = n + 1
+ pre = getnext(pre)
+ if n > s then
+ break
+ end
+ else
+ notmatchpre[current] = true
+ break
+ end
+ end
+ if n <= s then
+ notmatchpre[current] = true
+ end
+ else
+ notmatchpre[current] = true
+ end
+ if replace then
+ -- so far we never entered this branch
+ while replace do
+ if seq[n][getchar(replace)] then
+ n = n + 1
+ replace = getnext(replace)
+ if n > s then
+ break
+ end
+ else
+ notmatchreplace[current] = true
+ match = notmatchpre[current]
+ break
+ end
+ end
+ if not match then
+ break
+ end
+ else
+ -- skip 'm
+ end
+ elseif seq[n][32] then -- brrr
+ n = n + 1
+ else
+ match = false
+ break
+ end
+ current = getnext(current)
+ elseif seq[n][32] then
+ n = n + 1
+current = getnext(current)
+ else
+ match = false
+ break
+ end
+ end
+ else
+ match = false
+ end
+ end
+ end
+ if match then
+ -- can lookups be of a different type ?
+ local diskchain = diskseen or sweepnode
+ if trace_contexts then
+ local rule = ck[1]
+ local lookuptype = ck[8] or ck[2]
+ local first = ck[4]
+ local last = ck[5]
+ local char = getchar(start)
+ logwarning("%s: rule %s matches at char %s for (%s,%s,%s) chars, lookuptype %a",
+ cref(dataset,sequence),rule,gref(char),first-1,last-first+1,s-last,lookuptype)
+ end
+ local chainlookups = ck[6]
+ if chainlookups then
+ local nofchainlookups = #chainlookups
+ -- we can speed this up if needed
+ if nofchainlookups == 1 then
+ local chainlookup = chainlookups[1]
+ local chainkind = chainlookup.type
+ local chainproc = chainprocs[chainkind]
+ if chainproc then
+ local ok
+ if diskchain then
+ head, start, ok = chaindisk(head,start,last,dataset,sequence,chainlookup,rlmode,1,ck,chainproc)
+ else
+ head, start, ok = chainproc(head,start,last,dataset,sequence,chainlookup,rlmode,1)
+ end
+ if ok then
+ done = true
+ end
+ else
+ logprocess("%s: %s is not yet supported (1)",cref(dataset,sequence),chainkind)
+ end
+ else
+ local i = 1
+ while start and true do
+ if skipped then
+ while start do -- todo: use properties
+ local char = getchar(start)
+ local ccd = descriptions[char]
+ if ccd then
+ local class = ccd.class or "base"
+ if class == skipmark or class == skipligature or class == skipbase or (markclass and class == "mark" and not markclass[char]) then
+ start = getnext(start)
+ else
+ break
+ end
+ else
+ break
+ end
+ end
+ end
+ -- see remark in ms standard under : LookupType 5: Contextual Substitution Subtable
+ local chainlookup = chainlookups[1] -- should be i when they can be different
+ if not chainlookup then
+ -- we just advance
+ i = i + 1 -- shouldn't that be #current
+ else
+ local chainkind = chainlookup.type
+ local chainproc = chainprocs[chainkind]
+ if chainproc then
+ local ok, n
+ if diskchain then
+ head, start, ok = chaindisk(head,start,last,dataset,sequence,chainlookup,rlmode,i,ck,chainproc)
+ else
+ head, start, ok, n = chainproc(head,start,last,dataset,sequence,chainlookup,rlmode,i)
+ end
+ -- messy since last can be changed !
+ if ok then
+ done = true
+ if n and n > 1 then
+ -- we have a ligature (cf the spec we advance one but we really need to test it
+ -- as there are fonts out there that are fuzzy and have too many lookups:
+ --
+ -- U+1105 U+119E U+1105 U+119E : sourcehansansklight: script=hang ccmp=yes
+ --
+ if i + n > nofchainlookups then
+ -- if trace_contexts then
+ -- logprocess("%s: quitting lookups",cref(dataset,sequence))
+ -- end
+ break
+ else
+ -- we need to carry one
+ end
+ end
+ end
+ else
+ -- actually an error
+ logprocess("%s: %s is not yet supported (2)",cref(dataset,sequence),chainkind)
+ end
+ i = i + 1
+ end
+ if i > nofchainlookups or not start then
+ break
+ elseif start then
+ start = getnext(start)
+ end
+ end
+ end
+ else
+ local replacements = ck[7]
+ if replacements then
+ head, start, done = reversesub(head,start,last,dataset,sequence,replacements,rlmode)
+ else
+ done = quit_on_no_replacement -- can be meant to be skipped / quite inconsistent in fonts
+ if trace_contexts then
+ logprocess("%s: skipping match",cref(dataset,sequence))
+ end
+ end
+ end
+ if done then
+ break -- out of contexts (new, needs checking)
+ end
+ end
+ end
+ if diskseen then
+ notmatchpre = { }
+ notmatchpost = { }
+ notmatchreplace = { }
+ end
+ return head, start, done
+end
+
+handlers.gsub_context = handle_contextchain
+handlers.gsub_contextchain = handle_contextchain
+handlers.gsub_reversecontextchain = handle_contextchain
+handlers.gpos_contextchain = handle_contextchain
+handlers.gpos_context = handle_contextchain
+
+-- this needs testing
+
+local function chained_contextchain(head,start,stop,dataset,sequence,currentlookup,rlmode)
+ local steps = currentlookup.steps
+ local nofsteps = currentlookup.nofsteps
+ if nofsteps > 1 then
+ reportmoresteps(dataset,sequence)
+ end
+ return handle_contextchain(head,start,dataset,sequence,currentlookup,rlmode)
+end
+
+chainprocs.gsub_context = chained_contextchain
+chainprocs.gsub_contextchain = chained_contextchain
+chainprocs.gsub_reversecontextchain = chained_contextchain
+chainprocs.gpos_contextchain = chained_contextchain
+chainprocs.gpos_context = chained_contextchain
+
+local missing = setmetatableindex("table")
+
+local function logprocess(...)
+ if trace_steps then
+ registermessage(...)
+ end
+ report_process(...)
+end
+
+local logwarning = report_process
+
+local function report_missing_coverage(dataset,sequence)
+ local t = missing[currentfont]
+ if not t[sequence] then
+ t[sequence] = true
+ logwarning("missing coverage for feature %a, lookup %a, type %a, font %a, name %a",
+ dataset[4],sequence.name,sequence.type,currentfont,tfmdata.properties.fullname)
+ end
+end
+
+local resolved = { } -- we only resolve a font,script,language pair once
+
+-- todo: pass all these 'locals' in a table
+
+local sequencelists = setmetatableindex(function(t,font)
+ local sequences = fontdata[font].resources.sequences
+ if not sequences or not next(sequences) then
+ sequences = false
+ end
+ t[font] = sequences
+ return sequences
+end)
+
+-- fonts.hashes.sequences = sequencelists
+
+local autofeatures = fonts.analyzers.features
+local featuretypes = otf.tables.featuretypes
+local defaultscript = otf.features.checkeddefaultscript
+local defaultlanguage = otf.features.checkeddefaultlanguage
+
+local function initialize(sequence,script,language,enabled,autoscript,autolanguage)
+ local features = sequence.features
+ if features then
+ local order = sequence.order
+ if order then
+ local featuretype = featuretypes[sequence.type or "unknown"]
+ for i=1,#order do
+ local kind = order[i]
+ local valid = enabled[kind]
+ if valid then
+ local scripts = features[kind]
+ local languages = scripts and (
+ scripts[script] or
+ scripts[wildcard] or
+ (autoscript and defaultscript(featuretype,autoscript,scripts))
+ )
+ local enabled = languages and (
+ languages[language] or
+ languages[wildcard] or
+ (autolanguage and defaultlanguage(featuretype,autolanguage,languages))
+ )
+ if enabled then
+ return { valid, autofeatures[kind] or false, sequence, kind }
+ end
+ end
+ end
+ else
+ -- can't happen
+ end
+ end
+ return false
+end
+
+function otf.dataset(tfmdata,font) -- generic variant, overloaded in context
+ local shared = tfmdata.shared
+ local properties = tfmdata.properties
+ local language = properties.language or "dflt"
+ local script = properties.script or "dflt"
+ local enabled = shared.features
+ local autoscript = enabled and enabled.autoscript
+ local autolanguage = enabled and enabled.autolanguage
+ local res = resolved[font]
+ if not res then
+ res = { }
+ resolved[font] = res
+ end
+ local rs = res[script]
+ if not rs then
+ rs = { }
+ res[script] = rs
+ end
+ local rl = rs[language]
+ if not rl then
+ rl = {
+ -- indexed but we can also add specific data by key
+ }
+ rs[language] = rl
+ local sequences = tfmdata.resources.sequences
+ for s=1,#sequences do
+ local v = enabled and initialize(sequences[s],script,language,enabled,autoscript,autolanguage)
+ if v then
+ rl[#rl+1] = v
+ end
+ end
+ end
+ return rl
+end
+
+local function report_disc(what,n)
+ report_run("%s: %s > %s",what,n,languages.serializediscretionary(n))
+end
+
+local function kernrun(disc,k_run,font,attr,...)
+ --
+ -- we catch <font 1><disc font 2>
+ --
+ if trace_kernruns then
+ report_disc("kern",disc)
+ end
+ --
+ local prev, next = getboth(disc)
+ --
+ local nextstart = next
+ local done = false
+ --
+ local pre, post, replace, pretail, posttail, replacetail = getdisc(disc,true)
+ --
+ local prevmarks = prev
+ --
+ -- can be optional, because why on earth do we get a disc after a mark (okay, maybe when a ccmp
+ -- has happened but then it should be in the disc so basically this test indicates an error)
+ --
+ while prevmarks do
+ local char = ischar(prevmarks,font)
+ if char and marks[char] then
+ prevmarks = getprev(prevmarks)
+ else
+ break
+ end
+ end
+ --
+ if prev and (pre or replace) and not ischar(prev,font) then
+ prev = false
+ end
+ if next and (post or replace) and not ischar(next,font) then
+ next = false
+ end
+ --
+ -- we need to get rid of this nest mess some day .. has to be done otherwise
+ --
+ if pre then
+ if k_run(pre,"injections",nil,font,attr,...) then
+ done = true
+ end
+ if prev then
+ local nest = getprev(pre)
+ setlink(prev,pre)
+ if k_run(prevmarks,"preinjections",pre,font,attr,...) then -- or prev?
+ done = true
+ end
+ setprev(pre,nest)
+ setnext(prev,disc)
+ end
+ end
+ --
+ if post then
+ if k_run(post,"injections",nil,font,attr,...) then
+ done = true
+ end
+ if next then
+ setlink(posttail,next)
+ if k_run(posttail,"postinjections",next,font,attr,...) then
+ done = true
+ end
+ setnext(posttail,nil)
+ setprev(next,disc)
+ end
+ end
+ --
+ if replace then
+ if k_run(replace,"injections",nil,font,attr,...) then
+ done = true
+ end
+ if prev then
+ local nest = getprev(replace)
+ setlink(prev,replace)
+ if k_run(prevmarks,"replaceinjections",replace,font,attr,...) then -- getnext(replace))
+ done = true
+ end
+ setprev(replace,nest)
+ setnext(prev,disc)
+ end
+ if next then
+ setlink(replacetail,next)
+ if k_run(replacetail,"replaceinjections",next,font,attr,...) then
+ done = true
+ end
+ setnext(replacetail,nil)
+ setprev(next,disc)
+ end
+ elseif prev and next then
+ setlink(prev,next)
+ if k_run(prevmarks,"emptyinjections",next,font,attr,...) then
+ done = true
+ end
+ setlink(prev,disc)
+ setlink(disc,next)
+ end
+ return nextstart, done
+end
+
+local function comprun(disc,c_run,...)
+ if trace_compruns then
+ report_disc("comp",disc)
+ end
+ --
+ local pre, post, replace = getdisc(disc)
+ local renewed = false
+ --
+ if pre then
+ sweepnode = disc
+ sweeptype = "pre" -- in alternative code preinjections is uc_c_sed (also used then for proeprties, saves a variable)
+ local new, done = c_run(pre,...)
+ if done then
+ pre = new
+ renewed = true
+ end
+ end
+ --
+ if post then
+ sweepnode = disc
+ sweeptype = "post"
+ local new, done = c_run(post,...)
+ if done then
+ post = new
+ renewed = true
+ end
+ end
+ --
+ if replace then
+ sweepnode = disc
+ sweeptype = "replace"
+ local new, done = c_run(replace,...)
+ if done then
+ replace = new
+ renewed = true
+ end
+ end
+ --
+ sweepnode = nil
+ sweeptype = nil
+ if renewed then
+ setdisc(disc,pre,post,replace)
+ end
+ --
+ return getnext(disc), renewed
+end
+
+local function testrun(disc,t_run,c_run,...)
+ if trace_testruns then
+ report_disc("test",disc)
+ end
+ local prev, next = getboth(disc)
+ if not next then
+ -- weird discretionary
+ return
+ end
+ local pre, post, replace, pretail, posttail, replacetail = getdisc(disc,true)
+ local done = false
+ if replace and prev then
+ -- this is a bit strange as we only do replace here and not post
+ -- anyway, we only look ahead ... the idea is that we discard a
+ -- disc when there is a ligature crossing the replace boundary
+ setlink(replacetail,next)
+ local ok, overflow = t_run(replace,next,...)
+ if ok and overflow then
+ -- so, we can have crossed the boundary
+ setfield(disc,"replace",nil)
+ setlink(prev,replace)
+ -- setlink(replacetail,next)
+ setboth(disc)
+ flush_node_list(disc)
+ return replace, true -- restart .. tricky !
+ else
+ -- we stay inside the disc
+ setnext(replacetail)
+ setprev(next,disc)
+ end
+ -- pre, post, replace, pretail, posttail, replacetail = getdisc(disc,true)
+ end
+ --
+ -- like comprun
+ --
+ local renewed = false
+ --
+ if pre then
+ sweepnode = disc
+ sweeptype = "pre"
+ local new, ok = c_run(pre,...)
+ if ok then
+ pre = new
+ renewed = true
+ end
+ end
+ --
+ if post then
+ sweepnode = disc
+ sweeptype = "post"
+ local new, ok = c_run(post,...)
+ if ok then
+ post = new
+ renewed = true
+ end
+ end
+ --
+ if replace then
+ sweepnode = disc
+ sweeptype = "replace"
+ local new, ok = c_run(replace,...)
+ if ok then
+ replace = new
+ renewed = true
+ end
+ end
+ --
+ sweepnode = nil
+ sweeptype = nil
+ if renewed then
+ setdisc(disc,pre,post,replace)
+ return next, true
+ else
+ return next, done
+ end
+end
+
+-- A discrun happens when we have a zwnj. We're gpossing so it is unlikely that
+-- there has been a match changing the character. Now, as we check again here
+-- the question is: why do we do this ... needs checking as drun seems useless
+-- ... maybe that code can go away
+
+-- local function discrun(disc,drun,krun)
+-- local prev, next = getboth(disc)
+-- if trace_discruns then
+-- report_disc("disc",disc)
+-- end
+-- if next and prev then
+-- setnext(prev,next)
+-- -- setprev(next,prev)
+-- drun(prev)
+-- setnext(prev,disc)
+-- -- setprev(next,disc)
+-- end
+-- --
+-- if krun then -- currently always false
+-- local pre = getfield(disc,"pre")
+-- if not pre then
+-- -- go on
+-- elseif prev then
+-- local nest = getprev(pre)
+-- setlink(prev,pre)
+-- krun(prev,"preinjections")
+-- setprev(pre,nest)
+-- setnext(prev,disc)
+-- else
+-- krun(pre,"preinjections")
+-- end
+-- end
+-- return next
+-- end
+
+-- We can make some assumptions with respect to discretionaries. First of all it is very
+-- unlikely that some of the analysis related attributes applies. Then we can also assume
+-- that the ConTeXt specific dynamic attribute is different, although we do use explicit
+-- discretionaries (maybe we need to tag those some day). So, at least for now, we don't
+-- have the following test in the sub runs:
+--
+-- -- local a = getattr(start,0)
+-- -- if a then
+-- -- a = (a == attr) and (not attribute or getprop(start,a_state) == attribute)
+-- -- else
+-- -- a = not attribute or getprop(start,a_state) == attribute
+-- -- end
+-- -- if a then
+--
+-- but use this instead:
+--
+-- -- local a = getattr(start,0)
+-- -- if not a or (a == attr) then
+--
+-- and even that one is probably not needed.
+
+local nesting = 0
+
+local function c_run_single(head,font,attr,lookupcache,step,dataset,sequence,rlmode,handler)
+ local done = false
+ local sweep = sweephead[head]
+ if sweep then
+ start = sweep
+ sweephead[head] = nil
+ else
+ start = head
+ end
+ while start do
+ local char = ischar(start,font)
+ if char then
+ local a = getattr(start,0)
+ if not a or (a == attr) then
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then
+ local ok
+ head, start, ok = handler(head,start,dataset,sequence,lookupmatch,rlmode,step,1)
+ if ok then
+ done = true
+ end
+ end
+ if start then
+ start = getnext(start)
+ end
+ else
+ start = getnext(start)
+ end
+ elseif char == false then
+ return head, done
+ elseif sweep then
+ -- else we loose the rest
+ return head, done
+ else
+ -- in disc component
+ start = getnext(start)
+ end
+ end
+ return head, done
+end
+
+local function t_run_single(start,stop,font,attr,lookupcache)
+ while start ~= stop do
+ local char = ischar(start,font)
+ if char then
+ local a = getattr(start,0)
+ if not a or (a == attr) then
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then -- hm, hyphens can match (tlig) so we need to really check
+ -- if we need more than ligatures we can outline the code and use functions
+ local s = getnext(start)
+ local l = nil
+ local d = 0
+ while s do
+ if s == stop then
+ d = 1
+ elseif d > 0 then
+ d = d + 1
+ end
+ local lg = lookupmatch[getchar(s)]
+ if lg then
+ l = lg
+ s = getnext(s)
+ else
+ break
+ end
+ end
+ if l and l.ligature then
+ return true, d > 1
+ end
+ end
+ end
+ start = getnext(start)
+ else
+ break
+ end
+ end
+end
+
+-- local function d_run_single(prev,font,attr,lookupcache,step,dataset,sequence,rlmode,handler)
+-- local a = getattr(prev,0)
+-- if not a or (a == attr) then
+-- local char = ischar(prev) -- can be disc
+-- if char then
+-- local lookupmatch = lookupcache[char]
+-- if lookupmatch then
+-- local h, d, ok = handler(head,start,dataset,sequence,lookupmatch,rlmode,step,1)
+-- if ok then
+-- done = true
+-- success = true
+-- end
+-- end
+-- end
+-- end
+-- end
+
+local function k_run_single(sub,injection,last,font,attr,lookupcache,step,dataset,sequence,rlmode,handler)
+ local a = getattr(sub,0)
+ if not a or (a == attr) then
+ for n in traverse_nodes(sub) do -- only gpos
+ if n == last then
+ break
+ end
+ local char = ischar(n)
+ if char then
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then
+ local h, d, ok = handler(sub,n,dataset,sequence,lookupmatch,rlmode,step,1,injection)
+ if ok then
+ return true
+ end
+ end
+ end
+ end
+ end
+end
+
+local function c_run_multiple(head,font,attr,steps,nofsteps,dataset,sequence,rlmode,handler)
+ local done = false
+ local sweep = sweephead[head]
+ if sweep then
+ start = sweep
+ sweephead[head] = nil
+ else
+ start = head
+ end
+ while start do
+ local char = ischar(start,font)
+ if char then
+ local a = getattr(start,0)
+ if not a or (a == attr) then
+ for i=1,nofsteps do
+ local step = steps[i]
+ local lookupcache = step.coverage
+ if lookupcache then
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then
+ -- we could move all code inline but that makes things even more unreadable
+ local ok
+ head, start, ok = handler(head,start,dataset,sequence,lookupmatch,rlmode,step,i)
+ if ok then
+ done = true
+ break
+ elseif not start then
+ -- don't ask why ... shouldn't happen
+ break
+ end
+ end
+ else
+ report_missing_coverage(dataset,sequence)
+ end
+ end
+ if start then
+ start = getnext(start)
+ end
+ else
+ start = getnext(start)
+ end
+ elseif char == false then
+ -- whatever glyph
+ return head, done
+ elseif sweep then
+ -- else we loose the rest
+ return head, done
+ else
+ -- in disc component
+ start = getnext(start)
+ end
+ end
+ return head, done
+end
+
+local function t_run_multiple(start,stop,font,attr,steps,nofsteps)
+ while start ~= stop do
+ local char = ischar(start,font)
+ if char then
+ local a = getattr(start,0)
+ if not a or (a == attr) then
+ for i=1,nofsteps do
+ local step = steps[i]
+ local lookupcache = step.coverage
+ if lookupcache then
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then
+ -- if we need more than ligatures we can outline the code and use functions
+ local s = getnext(start)
+ local l = nil
+ local d = 0
+ while s do
+ if s == stop then
+ d = 1
+ elseif d > 0 then
+ d = d + 1
+ end
+ local lg = lookupmatch[getchar(s)]
+ if lg then
+ l = lg
+ s = getnext(s)
+ else
+ break
+ end
+ end
+ if l and l.ligature then
+ return true, d > 1
+ end
+ end
+ else
+ report_missing_coverage(dataset,sequence)
+ end
+ end
+ end
+ start = getnext(start)
+ else
+ break
+ end
+ end
+end
+
+-- local function d_run_multiple(prev,attr,steps,nofsteps,dataset,sequence,rlmode,handler)
+-- local a = getattr(prev,0)
+-- if not a or (a == attr) then
+-- local char = ischar(prev) -- can be disc
+-- if char then
+-- for i=1,nofsteps do
+-- local step = steps[i]
+-- local lookupcache = step.coverage
+-- if lookupcache then
+-- local lookupmatch = lookupcache[char]
+-- if lookupmatch then
+-- -- we could move all code inline but that makes things even more unreadable
+-- local h, d, ok = handler(head,prev,dataset,sequence,lookupmatch,rlmode,step,i)
+-- if ok then
+-- done = true
+-- break
+-- end
+-- end
+-- else
+-- report_missing_coverage(dataset,sequence)
+-- end
+-- end
+-- end
+-- end
+-- end
+
+local function k_run_multiple(sub,injection,last,font,attr,steps,nofsteps,dataset,sequence,rlmode,handler)
+ local a = getattr(sub,0)
+ if not a or (a == attr) then
+ for n in traverse_nodes(sub) do -- only gpos
+ if n == last then
+ break
+ end
+ local char = ischar(n)
+ if char then
+ for i=1,nofsteps do
+ local step = steps[i]
+ local lookupcache = step.coverage
+ if lookupcache then
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then
+ local h, d, ok = handler(head,n,dataset,sequence,lookupmatch,step,rlmode,i,injection)
+ if ok then
+ return true
+ end
+ end
+ else
+ report_missing_coverage(dataset,sequence)
+ end
+ end
+ end
+ end
+ end
+end
+
+-- to be checkedL nowadays we probably can assume properly matched directions
+-- so maybe we no longer need a stack
+
+local function txtdirstate(start,stack,top,rlparmode)
+ local dir = getfield(start,"dir")
+ local new = 1
+ if dir == "+TRT" then
+ top = top + 1
+ stack[top] = dir
+ new = -1
+ elseif dir == "+TLT" then
+ top = top + 1
+ stack[top] = dir
+ elseif dir == "-TRT" or dir == "-TLT" then
+ top = top - 1
+ if stack[top] == "+TRT" then
+ new = -1
+ end
+ else
+ new = rlparmode
+ end
+ if trace_directions then
+ report_process("directions after txtdir %a: parmode %a, txtmode %a, level %a",dir,mref(rlparmode),mref(new),topstack)
+ end
+ return getnext(start), top, new
+end
+
+local function pardirstate(start)
+ local dir = getfield(start,"dir")
+ local new = 0
+ if dir == "TLT" then
+ new = 1
+ elseif dir == "TRT" then
+ new = -1
+ end
+ if trace_directions then
+ report_process("directions after pardir %a: parmode %a",dir,mref(new))
+ end
+ return getnext(start), new, new
+end
+
+local function featuresprocessor(head,font,attr)
+
+ local sequences = sequencelists[font] -- temp hack
+
+ if not sequencelists then
+ return head, false
+ end
+
+ nesting = nesting + 1
+
+ if nesting == 1 then
+
+ currentfont = font
+ tfmdata = fontdata[font]
+ descriptions = tfmdata.descriptions
+ characters = tfmdata.characters
+ marks = tfmdata.resources.marks
+ factor = tfmdata.parameters.factor
+ threshold = tfmdata.parameters.spacing.width or 65536*10
+
+ elseif currentfont ~= font then
+
+ report_warning("nested call with a different font, level %s, quitting",nesting)
+ nesting = nesting - 1
+ return head, false
+
+ end
+
+ head = tonut(head)
+
+ if trace_steps then
+ checkstep(head)
+ end
+
+ local rlmode = 0
+
+ local done = false
+ local datasets = otf.dataset(tfmdata,font,attr)
+
+ local dirstack = { } -- could move outside function btu we can have local runss
+
+ sweephead = { }
+
+ -- We could work on sub start-stop ranges instead but I wonder if there is that
+ -- much speed gain (experiments showed that it made not much sense) and we need
+ -- to keep track of directions anyway. Also at some point I want to play with
+ -- font interactions and then we do need the full sweeps.
+
+ -- Keeping track of the headnode is needed for devanagari (I generalized it a bit
+ -- so that multiple cases are also covered.)
+
+ -- We don't goto the next node of a disc node is created so that we can then treat
+ -- the pre, post and replace. It's a bit of a hack but works out ok for most cases.
+
+ for s=1,#datasets do
+ local dataset = datasets[s]
+ ----- featurevalue = dataset[1] -- todo: pass to function instead of using a global
+ local attribute = dataset[2]
+ local sequence = dataset[3] -- sequences[s] -- also dataset[5]
+ local rlparmode = 0
+ local topstack = 0
+ local success = false
+ local typ = sequence.type
+ local gpossing = typ == "gpos_single" or typ == "gpos_pair" -- store in dataset
+ local handler = handlers[typ]
+ local steps = sequence.steps
+ local nofsteps = sequence.nofsteps
+ if not steps then
+ -- this permits injection, watch the different arguments
+ local h, d, ok = handler(head,start,dataset,sequence,nil,nil,nil,0,font,attr)
+ if ok then
+ success = true
+ if h then
+ head = h
+ end
+ if d then
+ start = d
+ end
+ end
+ elseif typ == "gsub_reversecontextchain" then
+ -- this is a limited case, no special treatments like 'init' etc
+ local start = find_node_tail(head)
+ while start do
+ local char = ischar(start,font)
+ if char then
+ local a = getattr(start,0)
+ if not a or (a == attr) then
+ for i=1,nofsteps do
+ local step = steps[i]
+ local lookupcache = step.coverage
+ if lookupcache then
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then
+ -- todo: disc?
+ local ok
+ head, start, ok = handler(head,start,dataset,sequence,lookupmatch,rlmode,step,i)
+ if ok then
+ success = true
+ break
+ end
+ end
+ else
+ report_missing_coverage(dataset,sequence)
+ end
+ end
+ if start then
+ start = getprev(start)
+ end
+ else
+ start = getprev(start)
+ end
+ else
+ start = getprev(start)
+ end
+ end
+ else
+ local start = head -- local ?
+ rlmode = 0 -- to be checked ?
+ if nofsteps == 1 then -- happens often
+
+ local step = steps[1]
+ local lookupcache = step.coverage
+ if not lookupcache then
+ -- can't happen, no check in loop either
+ report_missing_coverage(dataset,sequence)
+ else
+
+ while start do
+ local char, id = ischar(start,font)
+ if char then
+ local a = getattr(start,0)
+ if a then
+ a = (a == attr) and (not attribute or getprop(start,a_state) == attribute)
+ else
+ a = not attribute or getprop(start,a_state) == attribute
+ end
+ if a then
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then
+ local ok
+ head, start, ok = handler(head,start,dataset,sequence,lookupmatch,rlmode,step,1)
+ if ok then
+ success = true
+ -- elseif gpossing and zwnjruns and char == zwnj then
+ -- discrun(start,d_run,font,attr,lookupcache)
+ end
+ -- elseif gpossing and zwnjruns and char == zwnj then
+ -- discrun(start,d_run,font,attr,lookupcache)
+ end
+ if start then
+ start = getnext(start)
+ end
+ else
+ start = getnext(start)
+ end
+ elseif char == false then
+ -- whatever glyph
+ start = getnext(start)
+ elseif id == disc_code then
+ local ok
+ if gpossing then
+ start, ok = kernrun(start,k_run_single, font,attr,lookupcache,step,dataset,sequence,rlmode,handler)
+ elseif typ == "gsub_ligature" then
+ start, ok = testrun(start,t_run_single,c_run_single,font,attr,lookupcache,step,dataset,sequence,rlmode,handler)
+ else
+ start, ok = comprun(start,c_run_single, font,attr,lookupcache,step,dataset,sequence,rlmode,handler)
+ end
+ if ok then
+ success = true
+ end
+ elseif id == math_code then
+ start = getnext(end_of_math(start))
+ elseif id == dir_code then
+ start, topstack, rlmode = txtdirstate(start,dirstack,topstack,rlparmode)
+ elseif id == localpar_code then
+ start, rlparmode, rlmode = pardirstate(start)
+ else
+ start = getnext(start)
+ end
+ end
+ end
+
+ else
+
+ while start do
+ local char, id = ischar(start,font)
+ if char then
+ local a = getattr(start,0)
+ if a then
+ a = (a == attr) and (not attribute or getprop(start,a_state) == attribute)
+ else
+ a = not attribute or getprop(start,a_state) == attribute
+ end
+ if a then
+ for i=1,nofsteps do
+ local step = steps[i]
+ local lookupcache = step.coverage
+ if lookupcache then
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then
+ -- we could move all code inline but that makes things even more unreadable
+ local ok
+ head, start, ok = handler(head,start,dataset,sequence,lookupmatch,rlmode,step,i)
+ if ok then
+ success = true
+ break
+ elseif not start then
+ -- don't ask why ... shouldn't happen
+ break
+ -- elseif gpossing and zwnjruns and char == zwnj then
+ -- discrun(start,d_run,font,attr,steps,nofsteps)
+ end
+ -- elseif gpossing and zwnjruns and char == zwnj then
+ -- discrun(start,d_run,font,attr,steps,nofsteps)
+ end
+ else
+ report_missing_coverage(dataset,sequence)
+ end
+ end
+ if start then
+ start = getnext(start)
+ end
+ else
+ start = getnext(start)
+ end
+ elseif char == false then
+ start = getnext(start)
+ elseif id == disc_code then
+ local ok
+ if gpossing then
+ start, ok = kernrun(start,k_run_multiple, font,attr,steps,nofsteps,dataset,sequence,rlmode,handler)
+ elseif typ == "gsub_ligature" then
+ start, ok = testrun(start,t_run_multiple,c_run_multiple,font,attr,steps,nofsteps,dataset,sequence,rlmode,handler)
+ else
+ start, ok = comprun(start,c_run_multiple, font,attr,steps,nofsteps,dataset,sequence,rlmode,handler)
+ end
+ if ok then
+ success = true
+ end
+ elseif id == math_code then
+ start = getnext(end_of_math(start))
+ elseif id == dir_code then
+ start, topstack, rlmode = txtdirstate(start,dirstack,topstack,rlparmode)
+ elseif id == localpar_code then
+ start, rlparmode, rlmode = pardirstate(start)
+ else
+ start = getnext(start)
+ end
+ end
+ end
+ end
+
+ if success then
+ done = true
+ end
+ if trace_steps then -- ?
+ registerstep(head)
+ end
+
+ end
+
+ nesting = nesting - 1
+ head = tonode(head)
+
+ return head, done
+end
+
+-- so far
+
+local function featuresinitializer(tfmdata,value)
+ -- nothing done here any more
+end
+
+registerotffeature {
+ name = "features",
+ description = "features",
+ default = true,
+ initializers = {
+ position = 1,
+ node = featuresinitializer,
+ },
+ processors = {
+ node = featuresprocessor,
+ }
+}
+
+-- This can be used for extra handlers, but should be used with care!
+
+otf.handlers = handlers -- used in devanagari
+
+-- We implement one here:
+
+local setspacekerns = nodes.injections.setspacekerns if not setspacekerns then os.exit() end
+
+function otf.handlers.trigger_space_kerns(head,start,dataset,sequence,_,_,_,_,font,attr)
+ -- if not setspacekerns then
+ -- setspacekerns = nodes.injections.setspacekerns
+ -- end
+ setspacekerns(font,sequence)
+ return head, start, true
+end
+
+local function hasspacekerns(data)
+ local sequences = data.resources.sequences
+ for i=1,#sequences do
+ local sequence = sequences[i]
+ local steps = sequence.steps
+ if steps and sequence.features.kern then
+ for i=1,#steps do
+ local coverage = steps[i].coverage
+ if not coverage then
+ -- maybe an issue
+ elseif coverage[32] then
+ return true
+ else
+ for k, v in next, coverage do
+ if v[32] then
+ return true
+ end
+ end
+ end
+ end
+ end
+ end
+ return false
+end
+
+otf.readers.registerextender {
+ name = "spacekerns",
+ action = function(data)
+ data.properties.hasspacekerns = hasspacekerns(data)
+ end
+}
+
+local function spaceinitializer(tfmdata,value) -- attr
+ local resources = tfmdata.resources
+ local spacekerns = resources and resources.spacekerns
+ if spacekerns == nil then
+ local properties = tfmdata.properties
+ if properties and properties.hasspacekerns then
+ local sequences = resources.sequences
+ local left = { }
+ local right = { }
+ local last = 0
+ local feat = nil
+ for i=1,#sequences do
+ local sequence = sequences[i]
+ local steps = sequence.steps
+ if steps then
+ local kern = sequence.features.kern
+ if kern then
+ feat = feat or kern -- or maybe merge
+ for i=1,#steps do
+ local step = steps[i]
+ local coverage = step.coverage
+ if coverage then
+ local kerns = coverage[32]
+ if kerns then
+ for k, v in next, kerns do
+ if type(v) == "table" then
+ right[k] = v[3] -- needs checking
+ else
+ right[k] = v
+ end
+ end
+ end
+ for k, v in next, coverage do
+ local kern = v[32]
+ if kern then
+ if type(kern) == "table" then
+ left[k] = kern[3] -- needs checking
+ else
+ left[k] = kern
+ end
+ end
+ end
+ end
+ end
+ last = i
+ end
+ else
+ -- no steps ... needed for old one ... we could use the basekerns
+ -- instead
+ end
+ end
+ left = next(left) and left or false
+ right = next(right) and right or false
+ if left or right then
+ spacekerns = {
+ left = left,
+ right = right,
+ }
+ if last > 0 then
+ local triggersequence = {
+ features = { kern = feat or { dflt = { dflt = true, } } },
+ flags = noflags,
+ name = "trigger_space_kerns",
+ order = { "kern" },
+ type = "trigger_space_kerns",
+ left = left,
+ right = right,
+ }
+ insert(sequences,last,triggersequence)
+ end
+ else
+ spacekerns = false
+ end
+ else
+ spacekerns = false
+ end
+ resources.spacekerns = spacekerns
+ end
+ return spacekerns
+end
+
+registerotffeature {
+ name = "spacekern",
+ description = "space kern injection",
+ default = true,
+ initializers = {
+ node = spaceinitializer,
+ },
+}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ott.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ott.lua
new file mode 100644
index 00000000000..f8d74a317d0
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-ott.lua
@@ -0,0 +1,1130 @@
+if not modules then modules = { } end modules ['font-ott'] = {
+ version = 1.001,
+ comment = "companion to font-otf.lua (tables)",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+ -- dataonly = true,
+}
+
+local type, next, tonumber, tostring, rawget, rawset = type, next, tonumber, tostring, rawget, rawset
+local gsub, lower, format, match = string.gsub, string.lower, string.format, string.match
+local is_boolean = string.is_boolean
+
+local setmetatableindex = table.setmetatableindex
+local setmetatablenewindex = table.setmetatablenewindex
+local allocate = utilities.storage.allocate
+
+local fonts = fonts
+local otf = fonts.handlers.otf
+local otffeatures = otf.features
+local registerotffeature = otffeatures.register
+
+local tables = otf.tables or { }
+otf.tables = tables
+
+local statistics = otf.statistics or { }
+otf.statistics = statistics
+
+local scripts = allocate {
+ ['arab'] = 'arabic',
+ ['armi'] = 'imperial aramaic',
+ ['armn'] = 'armenian',
+ ['avst'] = 'avestan',
+ ['bali'] = 'balinese',
+ ['bamu'] = 'bamum',
+ ['batk'] = 'batak',
+ ['beng'] = 'bengali',
+ ['bng2'] = 'bengali variant 2',
+ ['bopo'] = 'bopomofo',
+ ['brah'] = 'brahmi',
+ ['brai'] = 'braille',
+ ['bugi'] = 'buginese',
+ ['buhd'] = 'buhid',
+ ['byzm'] = 'byzantine music',
+ ['cakm'] = 'chakma',
+ ['cans'] = 'canadian syllabics',
+ ['cari'] = 'carian',
+ ['cham'] = 'cham',
+ ['cher'] = 'cherokee',
+ ['copt'] = 'coptic',
+ ['cprt'] = 'cypriot syllabary',
+ ['cyrl'] = 'cyrillic',
+ ['deva'] = 'devanagari',
+ ['dev2'] = 'devanagari variant 2',
+ ['dsrt'] = 'deseret',
+ ['egyp'] = 'egyptian heiroglyphs',
+ ['ethi'] = 'ethiopic',
+ ['geor'] = 'georgian',
+ ['glag'] = 'glagolitic',
+ ['goth'] = 'gothic',
+ ['grek'] = 'greek',
+ ['gujr'] = 'gujarati',
+ ['gjr2'] = 'gujarati variant 2',
+ ['guru'] = 'gurmukhi',
+ ['gur2'] = 'gurmukhi variant 2',
+ ['hang'] = 'hangul',
+ ['hani'] = 'cjk ideographic',
+ ['hano'] = 'hanunoo',
+ ['hebr'] = 'hebrew',
+ ['ital'] = 'old italic',
+ ['jamo'] = 'hangul jamo',
+ ['java'] = 'javanese',
+ ['kali'] = 'kayah li',
+ ['kana'] = 'hiragana and katakana',
+ ['khar'] = 'kharosthi',
+ ['khmr'] = 'khmer',
+ ['knda'] = 'kannada',
+ ['knd2'] = 'kannada variant 2',
+ ['kthi'] = 'kaithi',
+ ['lana'] = 'tai tham',
+ ['lao' ] = 'lao',
+ ['latn'] = 'latin',
+ ['lepc'] = 'lepcha',
+ ['limb'] = 'limbu',
+ ['linb'] = 'linear b',
+ ['lisu'] = 'lisu',
+ ['lyci'] = 'lycian',
+ ['lydi'] = 'lydian',
+ ['mand'] = 'mandaic and mandaean',
+ ['math'] = 'mathematical alphanumeric symbols',
+ ['merc'] = 'meroitic cursive',
+ ['mero'] = 'meroitic hieroglyphs',
+ ['mlym'] = 'malayalam',
+ ['mlm2'] = 'malayalam variant 2',
+ ['mong'] = 'mongolian',
+ ['mtei'] = 'meitei Mayek',
+ ['musc'] = 'musical symbols',
+ ['mym2'] = 'myanmar variant 2',
+ ['mymr'] = 'myanmar',
+ ['nko' ] = "n'ko",
+ ['ogam'] = 'ogham',
+ ['olck'] = 'ol chiki',
+ ['orkh'] = 'old turkic and orkhon runic',
+ ['orya'] = 'oriya',
+ ['ory2'] = 'odia variant 2',
+ ['osma'] = 'osmanya',
+ ['phag'] = 'phags-pa',
+ ['phli'] = 'inscriptional pahlavi',
+ ['phnx'] = 'phoenician',
+ ['prti'] = 'inscriptional parthian',
+ ['rjng'] = 'rejang',
+ ['runr'] = 'runic',
+ ['samr'] = 'samaritan',
+ ['sarb'] = 'old south arabian',
+ ['saur'] = 'saurashtra',
+ ['shaw'] = 'shavian',
+ ['shrd'] = 'sharada',
+ ['sinh'] = 'sinhala',
+ ['sora'] = 'sora sompeng',
+ ['sund'] = 'sundanese',
+ ['sylo'] = 'syloti nagri',
+ ['syrc'] = 'syriac',
+ ['tagb'] = 'tagbanwa',
+ ['takr'] = 'takri',
+ ['tale'] = 'tai le',
+ ['talu'] = 'tai lu',
+ ['taml'] = 'tamil',
+ ['tavt'] = 'tai viet',
+ ['telu'] = 'telugu',
+ ['tel2'] = 'telugu variant 2',
+ ['tfng'] = 'tifinagh',
+ ['tglg'] = 'tagalog',
+ ['thaa'] = 'thaana',
+ ['thai'] = 'thai',
+ ['tibt'] = 'tibetan',
+ ['tml2'] = 'tamil variant 2',
+ ['ugar'] = 'ugaritic cuneiform',
+ ['vai' ] = 'vai',
+ ['xpeo'] = 'old persian cuneiform',
+ ['xsux'] = 'sumero-akkadian cuneiform',
+ ['yi' ] = 'yi',
+}
+
+local languages = allocate {
+ ["aba" ] = "abaza",
+ ["abk" ] = "abkhazian",
+ ["ach" ] = "acholi",
+ ["acr" ] = "achi",
+ ["ady" ] = "adyghe",
+ ["afk" ] = "afrikaans",
+ ["afr" ] = "afar",
+ ["agw" ] = "agaw",
+ ["aio" ] = "aiton",
+ ["aka" ] = "akan",
+ ["als" ] = "alsatian",
+ ["alt" ] = "altai",
+ ["amh" ] = "amharic",
+ ["ang" ] = "anglo-saxon",
+ ["apph"] = "phonetic transcription—americanist conventions",
+ ["ara" ] = "arabic",
+ ["arg" ] = "aragonese",
+ ["ari" ] = "aari",
+ ["ark" ] = "rakhine",
+ ["asm" ] = "assamese",
+ ["ast" ] = "asturian",
+ ["ath" ] = "athapaskan",
+ ["avr" ] = "avar",
+ ["awa" ] = "awadhi",
+ ["aym" ] = "aymara",
+ ["azb" ] = "torki",
+ ["aze" ] = "azerbaijani",
+ ["bad" ] = "badaga",
+ ["bad0"] = "banda",
+ ["bag" ] = "baghelkhandi",
+ ["bal" ] = "balkar",
+ ["ban" ] = "balinese",
+ ["bar" ] = "bavarian",
+ ["bau" ] = "baulé",
+ ["bbc" ] = "batak toba",
+ ["bbr" ] = "berber",
+ ["bch" ] = "bench",
+ ["bcr" ] = "bible cree",
+ ["bdy" ] = "bandjalang",
+ ["bel" ] = "belarussian",
+ ["bem" ] = "bemba",
+ ["ben" ] = "bengali",
+ ["bgc" ] = "haryanvi",
+ ["bgq" ] = "bagri",
+ ["bgr" ] = "bulgarian",
+ ["bhi" ] = "bhili",
+ ["bho" ] = "bhojpuri",
+ ["bik" ] = "bikol",
+ ["bil" ] = "bilen",
+ ["bis" ] = "bislama",
+ ["bjj" ] = "kanauji",
+ ["bkf" ] = "blackfoot",
+ ["bli" ] = "baluchi",
+ ["blk" ] = "pa'o karen",
+ ["bln" ] = "balante",
+ ["blt" ] = "balti",
+ ["bmb" ] = "bambara (bamanankan)",
+ ["bml" ] = "bamileke",
+ ["bos" ] = "bosnian",
+ ["bpy" ] = "bishnupriya manipuri",
+ ["bre" ] = "breton",
+ ["brh" ] = "brahui",
+ ["bri" ] = "braj bhasha",
+ ["brm" ] = "burmese",
+ ["brx" ] = "bodo",
+ ["bsh" ] = "bashkir",
+ ["bti" ] = "beti",
+ ["bts" ] = "batak simalungun",
+ ["bug" ] = "bugis",
+ ["cak" ] = "kaqchikel",
+ ["cat" ] = "catalan",
+ ["cbk" ] = "zamboanga chavacano",
+ ["ceb" ] = "cebuano",
+ ["cgg" ] = "chiga",
+ ["cha" ] = "chamorro",
+ ["che" ] = "chechen",
+ ["chg" ] = "chaha gurage",
+ ["chh" ] = "chattisgarhi",
+ ["chi" ] = "chichewa (chewa, nyanja)",
+ ["chk" ] = "chukchi",
+ ["chk0"] = "chuukese",
+ ["cho" ] = "choctaw",
+ ["chp" ] = "chipewyan",
+ ["chr" ] = "cherokee",
+ ["chu" ] = "chuvash",
+ ["chy" ] = "cheyenne",
+ ["cmr" ] = "comorian",
+ ["cop" ] = "coptic",
+ ["cor" ] = "cornish",
+ ["cos" ] = "corsican",
+ ["cpp" ] = "creoles",
+ ["cre" ] = "cree",
+ ["crr" ] = "carrier",
+ ["crt" ] = "crimean tatar",
+ ["csb" ] = "kashubian",
+ ["csl" ] = "church slavonic",
+ ["csy" ] = "czech",
+ ["ctg" ] = "chittagonian",
+ ["cuk" ] = "san blas kuna",
+ ["dan" ] = "danish",
+ ["dar" ] = "dargwa",
+ ["dax" ] = "dayi",
+ ["dcr" ] = "woods cree",
+ ["deu" ] = "german",
+ ["dgo" ] = "dogri",
+ ["dgr" ] = "dogri",
+ ["dhg" ] = "dhangu",
+ ["dhv" ] = "divehi (dhivehi, maldivian)",
+ ["diq" ] = "dimli",
+ ["div" ] = "divehi (dhivehi, maldivian)",
+ ["djr" ] = "zarma",
+ ["djr0"] = "djambarrpuyngu",
+ ["dng" ] = "dangme",
+ ["dnj" ] = "dan",
+ ["dnk" ] = "dinka",
+ ["dri" ] = "dari",
+ ["duj" ] = "dhuwal",
+ ["dun" ] = "dungan",
+ ["dzn" ] = "dzongkha",
+ ["ebi" ] = "ebira",
+ ["ecr" ] = "eastern cree",
+ ["edo" ] = "edo",
+ ["efi" ] = "efik",
+ ["ell" ] = "greek",
+ ["emk" ] = "eastern maninkakan",
+ ["eng" ] = "english",
+ ["erz" ] = "erzya",
+ ["esp" ] = "spanish",
+ ["esu" ] = "central yupik",
+ ["eti" ] = "estonian",
+ ["euq" ] = "basque",
+ ["evk" ] = "evenki",
+ ["evn" ] = "even",
+ ["ewe" ] = "ewe",
+ ["fan" ] = "french antillean",
+ ["fan0"] = " fang",
+ ["far" ] = "persian",
+ ["fat" ] = "fanti",
+ ["fin" ] = "finnish",
+ ["fji" ] = "fijian",
+ ["fle" ] = "dutch (flemish)",
+ ["fne" ] = "forest nenets",
+ ["fon" ] = "fon",
+ ["fos" ] = "faroese",
+ ["fra" ] = "french",
+ ["frc" ] = "cajun french",
+ ["fri" ] = "frisian",
+ ["frl" ] = "friulian",
+ ["frp" ] = "arpitan",
+ ["fta" ] = "futa",
+ ["ful" ] = "fulah",
+ ["fuv" ] = "nigerian fulfulde",
+ ["gad" ] = "ga",
+ ["gae" ] = "scottish gaelic (gaelic)",
+ ["gag" ] = "gagauz",
+ ["gal" ] = "galician",
+ ["gar" ] = "garshuni",
+ ["gaw" ] = "garhwali",
+ ["gez" ] = "ge'ez",
+ ["gih" ] = "githabul",
+ ["gil" ] = "gilyak",
+ ["gil0"] = " kiribati (gilbertese)",
+ ["gkp" ] = "kpelle (guinea)",
+ ["glk" ] = "gilaki",
+ ["gmz" ] = "gumuz",
+ ["gnn" ] = "gumatj",
+ ["gog" ] = "gogo",
+ ["gon" ] = "gondi",
+ ["grn" ] = "greenlandic",
+ ["gro" ] = "garo",
+ ["gua" ] = "guarani",
+ ["guc" ] = "wayuu",
+ ["guf" ] = "gupapuyngu",
+ ["guj" ] = "gujarati",
+ ["guz" ] = "gusii",
+ ["hai" ] = "haitian (haitian creole)",
+ ["hal" ] = "halam",
+ ["har" ] = "harauti",
+ ["hau" ] = "hausa",
+ ["haw" ] = "hawaiian",
+ ["hay" ] = "haya",
+ ["haz" ] = "hazaragi",
+ ["hbn" ] = "hammer-banna",
+ ["her" ] = "herero",
+ ["hil" ] = "hiligaynon",
+ ["hin" ] = "hindi",
+ ["hma" ] = "high mari",
+ ["hmn" ] = "hmong",
+ ["hmo" ] = "hiri motu",
+ ["hnd" ] = "hindko",
+ ["ho" ] = "ho",
+ ["hri" ] = "harari",
+ ["hrv" ] = "croatian",
+ ["hun" ] = "hungarian",
+ ["hye" ] = "armenian",
+ ["hye0"] = "armenian east",
+ ["iba" ] = "iban",
+ ["ibb" ] = "ibibio",
+ ["ibo" ] = "igbo",
+ ["ido" ] = "ido",
+ ["ijo" ] = "ijo languages",
+ ["ile" ] = "interlingue",
+ ["ilo" ] = "ilokano",
+ ["ina" ] = "interlingua",
+ ["ind" ] = "indonesian",
+ ["ing" ] = "ingush",
+ ["inu" ] = "inuktitut",
+ ["ipk" ] = "inupiat",
+ ["ipph"] = "phonetic transcription—ipa conventions",
+ ["iri" ] = "irish",
+ ["irt" ] = "irish traditional",
+ ["isl" ] = "icelandic",
+ ["ism" ] = "inari sami",
+ ["ita" ] = "italian",
+ ["iwr" ] = "hebrew",
+ ["jam" ] = "jamaican creole",
+ ["jan" ] = "japanese",
+ ["jav" ] = "javanese",
+ ["jbo" ] = "lojban",
+ ["jii" ] = "yiddish",
+ ["jud" ] = "ladino",
+ ["jul" ] = "jula",
+ ["kab" ] = "kabardian",
+ ["kab0"] = "kabyle",
+ ["kac" ] = "kachchi",
+ ["kal" ] = "kalenjin",
+ ["kan" ] = "kannada",
+ ["kar" ] = "karachay",
+ ["kat" ] = "georgian",
+ ["kaz" ] = "kazakh",
+ ["kde" ] = "makonde",
+ ["kea" ] = "kabuverdianu (crioulo)",
+ ["keb" ] = "kebena",
+ ["kek" ] = "kekchi",
+ ["kge" ] = "khutsuri georgian",
+ ["kha" ] = "khakass",
+ ["khk" ] = "khanty-kazim",
+ ["khm" ] = "khmer",
+ ["khs" ] = "khanty-shurishkar",
+ ["kht" ] = "khamti shan",
+ ["khv" ] = "khanty-vakhi",
+ ["khw" ] = "khowar",
+ ["kik" ] = "kikuyu (gikuyu)",
+ ["kir" ] = "kirghiz (kyrgyz)",
+ ["kis" ] = "kisii",
+ ["kiu" ] = "kirmanjki",
+ ["kjd" ] = "southern kiwai",
+ ["kjp" ] = "eastern pwo karen",
+ ["kkn" ] = "kokni",
+ ["klm" ] = "kalmyk",
+ ["kmb" ] = "kamba",
+ ["kmn" ] = "kumaoni",
+ ["kmo" ] = "komo",
+ ["kms" ] = "komso",
+ ["knr" ] = "kanuri",
+ ["kod" ] = "kodagu",
+ ["koh" ] = "korean old hangul",
+ ["kok" ] = "konkani",
+ ["kom" ] = "komi",
+ ["kon" ] = "kikongo",
+ ["kon0"] = "kongo",
+ ["kop" ] = "komi-permyak",
+ ["kor" ] = "korean",
+ ["kos" ] = "kosraean",
+ ["koz" ] = "komi-zyrian",
+ ["kpl" ] = "kpelle",
+ ["kri" ] = "krio",
+ ["krk" ] = "karakalpak",
+ ["krl" ] = "karelian",
+ ["krm" ] = "karaim",
+ ["krn" ] = "karen",
+ ["krt" ] = "koorete",
+ ["ksh" ] = "kashmiri",
+ ["ksh0"] = "ripuarian",
+ ["ksi" ] = "khasi",
+ ["ksm" ] = "kildin sami",
+ ["ksw" ] = "s’gaw karen",
+ ["kua" ] = "kuanyama",
+ ["kui" ] = "kui",
+ ["kul" ] = "kulvi",
+ ["kum" ] = "kumyk",
+ ["kur" ] = "kurdish",
+ ["kuu" ] = "kurukh",
+ ["kuy" ] = "kuy",
+ ["kyk" ] = "koryak",
+ ["kyu" ] = "western kayah",
+ ["lad" ] = "ladin",
+ ["lah" ] = "lahuli",
+ ["lak" ] = "lak",
+ ["lam" ] = "lambani",
+ ["lao" ] = "lao",
+ ["lat" ] = "latin",
+ ["laz" ] = "laz",
+ ["lcr" ] = "l-cree",
+ ["ldk" ] = "ladakhi",
+ ["lez" ] = "lezgi",
+ ["lij" ] = "ligurian",
+ ["lim" ] = "limburgish",
+ ["lin" ] = "lingala",
+ ["lis" ] = "lisu",
+ ["ljp" ] = "lampung",
+ ["lki" ] = "laki",
+ ["lma" ] = "low mari",
+ ["lmb" ] = "limbu",
+ ["lmo" ] = "lombard",
+ ["lmw" ] = "lomwe",
+ ["lom" ] = "loma",
+ ["lrc" ] = "luri",
+ ["lsb" ] = "lower sorbian",
+ ["lsm" ] = "lule sami",
+ ["lth" ] = "lithuanian",
+ ["ltz" ] = "luxembourgish",
+ ["lua" ] = "luba-lulua",
+ ["lub" ] = "luba-katanga",
+ ["lug" ] = "ganda",
+ ["luh" ] = "luyia",
+ ["luo" ] = "luo",
+ ["lvi" ] = "latvian",
+ ["mad" ] = "madura",
+ ["mag" ] = "magahi",
+ ["mah" ] = "marshallese",
+ ["maj" ] = "majang",
+ ["mak" ] = "makhuwa",
+ ["mal" ] = "malayalam reformed",
+ ["mam" ] = "mam",
+ ["man" ] = "mansi",
+ ["map" ] = "mapudungun",
+ ["mar" ] = "marathi",
+ ["maw" ] = "marwari",
+ ["mbn" ] = "mbundu",
+ ["mch" ] = "manchu",
+ ["mcr" ] = "moose cree",
+ ["mde" ] = "mende",
+ ["mdr" ] = "mandar",
+ ["men" ] = "me'en",
+ ["mer" ] = "meru",
+ ["mfe" ] = "morisyen",
+ ["min" ] = "minangkabau",
+ ["miz" ] = "mizo",
+ ["mkd" ] = "macedonian",
+ ["mkr" ] = "makasar",
+ ["mkw" ] = "kituba",
+ ["mle" ] = "male",
+ ["mlg" ] = "malagasy",
+ ["mln" ] = "malinke",
+ ["mly" ] = "malay",
+ ["mnd" ] = "mandinka",
+ ["mng" ] = "mongolian",
+ ["mni" ] = "manipuri",
+ ["mnk" ] = "maninka",
+ ["mnx" ] = "manx",
+ ["moh" ] = "mohawk",
+ ["mok" ] = "moksha",
+ ["mol" ] = "moldavian",
+ ["mon" ] = "mon",
+ ["mor" ] = "moroccan",
+ ["mos" ] = "mossi",
+ ["mri" ] = "maori",
+ ["mth" ] = "maithili",
+ ["mts" ] = "maltese",
+ ["mun" ] = "mundari",
+ ["mus" ] = "muscogee",
+ ["mwl" ] = "mirandese",
+ ["mww" ] = "hmong daw",
+ ["myn" ] = "mayan",
+ ["mzn" ] = "mazanderani",
+ ["nag" ] = "naga-assamese",
+ ["nah" ] = "nahuatl",
+ ["nan" ] = "nanai",
+ ["nap" ] = "neapolitan",
+ ["nas" ] = "naskapi",
+ ["nau" ] = "nauruan",
+ ["nav" ] = "navajo",
+ ["ncr" ] = "n-cree",
+ ["ndb" ] = "ndebele",
+ ["ndc" ] = "ndau",
+ ["ndg" ] = "ndonga",
+ ["nds" ] = "low saxon",
+ ["nep" ] = "nepali",
+ ["new" ] = "newari",
+ ["nga" ] = "ngbaka",
+ ["ngr" ] = "nagari",
+ ["nhc" ] = "norway house cree",
+ ["nis" ] = "nisi",
+ ["niu" ] = "niuean",
+ ["nkl" ] = "nyankole",
+ ["nko" ] = "n'ko",
+ ["nld" ] = "dutch",
+ ["noe" ] = "nimadi",
+ ["nog" ] = "nogai",
+ ["nor" ] = "norwegian",
+ ["nov" ] = "novial",
+ ["nsm" ] = "northern sami",
+ ["nso" ] = "sotho, northern",
+ ["nta" ] = "northern tai",
+ ["nto" ] = "esperanto",
+ ["nym" ] = "nyamwezi",
+ ["nyn" ] = "norwegian nynorsk",
+ ["oci" ] = "occitan",
+ ["ocr" ] = "oji-cree",
+ ["ojb" ] = "ojibway",
+ ["ori" ] = "odia",
+ ["oro" ] = "oromo",
+ ["oss" ] = "ossetian",
+ ["paa" ] = "palestinian aramaic",
+ ["pag" ] = "pangasinan",
+ ["pal" ] = "pali",
+ ["pam" ] = "pampangan",
+ ["pan" ] = "punjabi",
+ ["pap" ] = "palpa",
+ ["pap0"] = "papiamentu",
+ ["pas" ] = "pashto",
+ ["pau" ] = "palauan",
+ ["pcc" ] = "bouyei",
+ ["pcd" ] = "picard",
+ ["pdc" ] = "pennsylvania german",
+ ["pgr" ] = "polytonic greek",
+ ["phk" ] = "phake",
+ ["pih" ] = "norfolk",
+ ["pil" ] = "filipino",
+ ["plg" ] = "palaung",
+ ["plk" ] = "polish",
+ ["pms" ] = "piemontese",
+ ["pnb" ] = "western panjabi",
+ ["poh" ] = "pocomchi",
+ ["pon" ] = "pohnpeian",
+ ["pro" ] = "provencal",
+ ["ptg" ] = "portuguese",
+ ["pwo" ] = "western pwo karen",
+ ["qin" ] = "chin",
+ ["quc" ] = "k’iche’",
+ ["quh" ] = "quechua (bolivia)",
+ ["quz" ] = "quechua",
+ ["qvi" ] = "quechua (ecuador)",
+ ["qwh" ] = "quechua (peru)",
+ ["raj" ] = "rajasthani",
+ ["rar" ] = "rarotongan",
+ ["rbu" ] = "russian buriat",
+ ["rcr" ] = "r-cree",
+ ["rej" ] = "rejang",
+ ["ria" ] = "riang",
+ ["rif" ] = "tarifit",
+ ["rit" ] = "ritarungo",
+ ["rkw" ] = "arakwal",
+ ["rms" ] = "romansh",
+ ["rmy" ] = "vlax romani",
+ ["rom" ] = "romanian",
+ ["roy" ] = "romany",
+ ["rsy" ] = "rusyn",
+ ["rtm" ] = "rotuman",
+ ["rua" ] = "kinyarwanda",
+ ["run" ] = "rundi",
+ ["rup" ] = "aromanian",
+ ["rus" ] = "russian",
+ ["sad" ] = "sadri",
+ ["san" ] = "sanskrit",
+ ["sas" ] = "sasak",
+ ["sat" ] = "santali",
+ ["say" ] = "sayisi",
+ ["scn" ] = "sicilian",
+ ["sco" ] = "scots",
+ ["sek" ] = "sekota",
+ ["sel" ] = "selkup",
+ ["sga" ] = "old irish",
+ ["sgo" ] = "sango",
+ ["sgs" ] = "samogitian",
+ ["shi" ] = "tachelhit",
+ ["shn" ] = "shan",
+ ["sib" ] = "sibe",
+ ["sid" ] = "sidamo",
+ ["sig" ] = "silte gurage",
+ ["sks" ] = "skolt sami",
+ ["sky" ] = "slovak",
+ ["sla" ] = "slavey",
+ ["slv" ] = "slovenian",
+ ["sml" ] = "somali",
+ ["smo" ] = "samoan",
+ ["sna" ] = "sena",
+ ["sna0"] = "shona",
+ ["snd" ] = "sindhi",
+ ["snh" ] = "sinhala (sinhalese)",
+ ["snk" ] = "soninke",
+ ["sog" ] = "sodo gurage",
+ ["sop" ] = "songe",
+ ["sot" ] = "sotho, southern",
+ ["sqi" ] = "albanian",
+ ["srb" ] = "serbian",
+ ["srd" ] = "sardinian",
+ ["srk" ] = "saraiki",
+ ["srr" ] = "serer",
+ ["ssl" ] = "south slavey",
+ ["ssm" ] = "southern sami",
+ ["stq" ] = "saterland frisian",
+ ["suk" ] = "sukuma",
+ ["sun" ] = "sundanese",
+ ["sur" ] = "suri",
+ ["sva" ] = "svan",
+ ["sve" ] = "swedish",
+ ["swa" ] = "swadaya aramaic",
+ ["swk" ] = "swahili",
+ ["swz" ] = "swati",
+ ["sxt" ] = "sutu",
+ ["sxu" ] = "upper saxon",
+ ["syl" ] = "sylheti",
+ ["syr" ] = "syriac",
+ ["szl" ] = "silesian",
+ ["tab" ] = "tabasaran",
+ ["taj" ] = "tajiki",
+ ["tam" ] = "tamil",
+ ["tat" ] = "tatar",
+ ["tcr" ] = "th-cree",
+ ["tdd" ] = "dehong dai",
+ ["tel" ] = "telugu",
+ ["tet" ] = "tetum",
+ ["tgl" ] = "tagalog",
+ ["tgn" ] = "tongan",
+ ["tgr" ] = "tigre",
+ ["tgy" ] = "tigrinya",
+ ["tha" ] = "thai",
+ ["tht" ] = "tahitian",
+ ["tib" ] = "tibetan",
+ ["tiv" ] = "tiv",
+ ["tkm" ] = "turkmen",
+ ["tmh" ] = "tamashek",
+ ["tmn" ] = "temne",
+ ["tna" ] = "tswana",
+ ["tne" ] = "tundra nenets",
+ ["tng" ] = "tonga",
+ ["tod" ] = "todo",
+ ["tod0"] = "toma",
+ ["tpi" ] = "tok pisin",
+ ["trk" ] = "turkish",
+ ["tsg" ] = "tsonga",
+ ["tua" ] = "turoyo aramaic",
+ ["tul" ] = "tulu",
+ ["tuv" ] = "tuvin",
+ ["tvl" ] = "tuvalu",
+ ["twi" ] = "twi",
+ ["tyz" ] = "tày",
+ ["tzm" ] = "tamazight",
+ ["tzo" ] = "tzotzil",
+ ["udm" ] = "udmurt",
+ ["ukr" ] = "ukrainian",
+ ["umb" ] = "umbundu",
+ ["urd" ] = "urdu",
+ ["usb" ] = "upper sorbian",
+ ["uyg" ] = "uyghur",
+ ["uzb" ] = "uzbek",
+ ["vec" ] = "venetian",
+ ["ven" ] = "venda",
+ ["vit" ] = "vietnamese",
+ ["vol" ] = "volapük",
+ ["vro" ] = "võro",
+ ["wa" ] = "wa",
+ ["wag" ] = "wagdi",
+ ["war" ] = "waray-waray",
+ ["wcr" ] = "west-cree",
+ ["wel" ] = "welsh",
+ ["wlf" ] = "wolof",
+ ["wln" ] = "walloon",
+ ["xbd" ] = "lü",
+ ["xhs" ] = "xhosa",
+ ["xjb" ] = "minjangbal",
+ ["xog" ] = "soga",
+ ["xpe" ] = "kpelle (liberia)",
+ ["yak" ] = "sakha",
+ ["yao" ] = "yao",
+ ["yap" ] = "yapese",
+ ["yba" ] = "yoruba",
+ ["ycr" ] = "y-cree",
+ ["yic" ] = "yi classic",
+ ["yim" ] = "yi modern",
+ ["zea" ] = "zealandic",
+ ["zgh" ] = "standard morrocan tamazigh",
+ ["zha" ] = "zhuang",
+ ["zhh" ] = "chinese, hong kong sar",
+ ["zhp" ] = "chinese phonetic",
+ ["zhs" ] = "chinese simplified",
+ ["zht" ] = "chinese traditional",
+ ["znd" ] = "zande",
+ ["zul" ] = "zulu",
+ ["zza" ] = "zazaki",
+}
+
+local features = allocate {
+ ['aalt'] = 'access all alternates',
+ ['abvf'] = 'above-base forms',
+ ['abvm'] = 'above-base mark positioning',
+ ['abvs'] = 'above-base substitutions',
+ ['afrc'] = 'alternative fractions',
+ ['akhn'] = 'akhands',
+ ['blwf'] = 'below-base forms',
+ ['blwm'] = 'below-base mark positioning',
+ ['blws'] = 'below-base substitutions',
+ ['c2pc'] = 'petite capitals from capitals',
+ ['c2sc'] = 'small capitals from capitals',
+ ['calt'] = 'contextual alternates',
+ ['case'] = 'case-sensitive forms',
+ ['ccmp'] = 'glyph composition/decomposition',
+ ['cfar'] = 'conjunct form after ro',
+ ['cjct'] = 'conjunct forms',
+ ['clig'] = 'contextual ligatures',
+ ['cpct'] = 'centered cjk punctuation',
+ ['cpsp'] = 'capital spacing',
+ ['cswh'] = 'contextual swash',
+ ['curs'] = 'cursive positioning',
+ ['dflt'] = 'default processing',
+ ['dist'] = 'distances',
+ ['dlig'] = 'discretionary ligatures',
+ ['dnom'] = 'denominators',
+ ['dtls'] = 'dotless forms', -- math
+ ['expt'] = 'expert forms',
+ ['falt'] = 'final glyph alternates',
+ ['fin2'] = 'terminal forms #2',
+ ['fin3'] = 'terminal forms #3',
+ ['fina'] = 'terminal forms',
+ ['flac'] = 'flattened accents over capitals', -- math
+ ['frac'] = 'fractions',
+ ['fwid'] = 'full width',
+ ['half'] = 'half forms',
+ ['haln'] = 'halant forms',
+ ['halt'] = 'alternate half width',
+ ['hist'] = 'historical forms',
+ ['hkna'] = 'horizontal kana alternates',
+ ['hlig'] = 'historical ligatures',
+ ['hngl'] = 'hangul',
+ ['hojo'] = 'hojo kanji forms',
+ ['hwid'] = 'half width',
+ ['init'] = 'initial forms',
+ ['isol'] = 'isolated forms',
+ ['ital'] = 'italics',
+ ['jalt'] = 'justification alternatives',
+ ['jp04'] = 'jis2004 forms',
+ ['jp78'] = 'jis78 forms',
+ ['jp83'] = 'jis83 forms',
+ ['jp90'] = 'jis90 forms',
+ ['kern'] = 'kerning',
+ ['lfbd'] = 'left bounds',
+ ['liga'] = 'standard ligatures',
+ ['ljmo'] = 'leading jamo forms',
+ ['lnum'] = 'lining figures',
+ ['locl'] = 'localized forms',
+ ['ltra'] = 'left-to-right alternates',
+ ['ltrm'] = 'left-to-right mirrored forms',
+ ['mark'] = 'mark positioning',
+ ['med2'] = 'medial forms #2',
+ ['medi'] = 'medial forms',
+ ['mgrk'] = 'mathematical greek',
+ ['mkmk'] = 'mark to mark positioning',
+ ['mset'] = 'mark positioning via substitution',
+ ['nalt'] = 'alternate annotation forms',
+ ['nlck'] = 'nlc kanji forms',
+ ['nukt'] = 'nukta forms',
+ ['numr'] = 'numerators',
+ ['onum'] = 'old style figures',
+ ['opbd'] = 'optical bounds',
+ ['ordn'] = 'ordinals',
+ ['ornm'] = 'ornaments',
+ ['palt'] = 'proportional alternate width',
+ ['pcap'] = 'petite capitals',
+ ['pkna'] = 'proportional kana',
+ ['pnum'] = 'proportional figures',
+ ['pref'] = 'pre-base forms',
+ ['pres'] = 'pre-base substitutions',
+ ['pstf'] = 'post-base forms',
+ ['psts'] = 'post-base substitutions',
+ ['pwid'] = 'proportional widths',
+ ['qwid'] = 'quarter widths',
+ ['rand'] = 'randomize',
+ ['rclt'] = 'required contextual alternates',
+ ['rkrf'] = 'rakar forms',
+ ['rlig'] = 'required ligatures',
+ ['rphf'] = 'reph form',
+ ['rtbd'] = 'right bounds',
+ ['rtla'] = 'right-to-left alternates',
+ ['rtlm'] = 'right to left math', -- math
+ ['ruby'] = 'ruby notation forms',
+ ['salt'] = 'stylistic alternates',
+ ['sinf'] = 'scientific inferiors',
+ ['size'] = 'optical size',
+ ['smcp'] = 'small capitals',
+ ['smpl'] = 'simplified forms',
+ -- ['ss01'] = 'stylistic set 1',
+ -- ['ss02'] = 'stylistic set 2',
+ -- ['ss03'] = 'stylistic set 3',
+ -- ['ss04'] = 'stylistic set 4',
+ -- ['ss05'] = 'stylistic set 5',
+ -- ['ss06'] = 'stylistic set 6',
+ -- ['ss07'] = 'stylistic set 7',
+ -- ['ss08'] = 'stylistic set 8',
+ -- ['ss09'] = 'stylistic set 9',
+ -- ['ss10'] = 'stylistic set 10',
+ -- ['ss11'] = 'stylistic set 11',
+ -- ['ss12'] = 'stylistic set 12',
+ -- ['ss13'] = 'stylistic set 13',
+ -- ['ss14'] = 'stylistic set 14',
+ -- ['ss15'] = 'stylistic set 15',
+ -- ['ss16'] = 'stylistic set 16',
+ -- ['ss17'] = 'stylistic set 17',
+ -- ['ss18'] = 'stylistic set 18',
+ -- ['ss19'] = 'stylistic set 19',
+ -- ['ss20'] = 'stylistic set 20',
+ ['ssty'] = 'script style', -- math
+ ['stch'] = 'stretching glyph decomposition',
+ ['subs'] = 'subscript',
+ ['sups'] = 'superscript',
+ ['swsh'] = 'swash',
+ ['titl'] = 'titling',
+ ['tjmo'] = 'trailing jamo forms',
+ ['tnam'] = 'traditional name forms',
+ ['tnum'] = 'tabular figures',
+ ['trad'] = 'traditional forms',
+ ['twid'] = 'third widths',
+ ['unic'] = 'unicase',
+ ['valt'] = 'alternate vertical metrics',
+ ['vatu'] = 'vattu variants',
+ ['vert'] = 'vertical writing',
+ ['vhal'] = 'alternate vertical half metrics',
+ ['vjmo'] = 'vowel jamo forms',
+ ['vkna'] = 'vertical kana alternates',
+ ['vkrn'] = 'vertical kerning',
+ ['vpal'] = 'proportional alternate vertical metrics',
+ ['vrt2'] = 'vertical rotation',
+ ['zero'] = 'slashed zero',
+
+ ['trep'] = 'traditional tex replacements',
+ ['tlig'] = 'traditional tex ligatures',
+
+ ['ss..'] = 'stylistic set ..',
+ ['cv..'] = 'character variant ..',
+ ['js..'] = 'justification ..',
+
+ ["dv.."] = "devanagari ..",
+ ["ml.."] = "malayalam ..",
+}
+
+local baselines = allocate {
+ ['hang'] = 'hanging baseline',
+ ['icfb'] = 'ideographic character face bottom edge baseline',
+ ['icft'] = 'ideographic character face tope edige baseline',
+ ['ideo'] = 'ideographic em-box bottom edge baseline',
+ ['idtp'] = 'ideographic em-box top edge baseline',
+ ['math'] = 'mathematical centered baseline',
+ ['romn'] = 'roman baseline'
+}
+
+tables.scripts = scripts
+tables.languages = languages
+tables.features = features
+tables.baselines = baselines
+
+local acceptscripts = true directives.register("otf.acceptscripts", function(v) acceptscripts = v end)
+local acceptlanguages = true directives.register("otf.acceptlanguages", function(v) acceptlanguages = v end)
+
+local report_checks = logs.reporter("fonts","checks")
+
+-- hm, we overload the metatables
+
+if otffeatures.features then
+ for k, v in next, otffeatures.features do
+ features[k] = v
+ end
+ otffeatures.features = features
+end
+
+local function swapped(h)
+ local r = { }
+ for k, v in next, h do
+ r[gsub(v,"[^a-z0-9]","")] = k -- is already lower
+ end
+ return r
+end
+
+local verbosescripts = allocate(swapped(scripts ))
+local verboselanguages = allocate(swapped(languages))
+local verbosefeatures = allocate(swapped(features ))
+local verbosebaselines = allocate(swapped(baselines))
+
+-- lets forget about trailing spaces
+
+local function resolve(t,k)
+ if k then
+ k = gsub(lower(k),"[^a-z0-9]","")
+ local v = rawget(t,k)
+ if v then
+ return v
+ end
+ end
+end
+
+setmetatableindex(verbosescripts, resolve)
+setmetatableindex(verboselanguages, resolve)
+setmetatableindex(verbosefeatures, resolve)
+setmetatableindex(verbosebaselines, resolve)
+
+-- We could optimize the next lookups by using an extra metatable and storing
+-- already found values but in practice there are not that many lookups so
+-- it's never a bottleneck.
+
+setmetatableindex(scripts, function(t,k)
+ if k then
+ k = lower(k)
+ if k == "dflt" then
+ return k
+ end
+ local v = rawget(t,k)
+ if v then
+ return v
+ end
+ k = gsub(k," ","")
+ v = rawget(t,v)
+ if v then
+ return v
+ elseif acceptscripts then
+ report_checks("registering extra script %a",k)
+ rawset(t,k,k)
+ return k
+ end
+ end
+ return "dflt"
+end)
+
+setmetatableindex(languages, function(t,k)
+ if k then
+ k = lower(k)
+ if k == "dflt" then
+ return k
+ end
+ local v = rawget(t,k)
+ if v then
+ return v
+ end
+ k = gsub(k," ","")
+ v = rawget(t,v)
+ if v then
+ return v
+ elseif acceptlanguages then
+ report_checks("registering extra language %a",k)
+ rawset(t,k,k)
+ return k
+ end
+ end
+ return "dflt"
+end)
+
+setmetatablenewindex(languages, "ignore")
+setmetatablenewindex(baselines, "ignore")
+setmetatablenewindex(baselines, "ignore")
+
+local function resolve(t,k)
+ if k then
+ k = lower(k)
+ local v = rawget(t,k)
+ if v then
+ return v
+ end
+ k = gsub(k," ","")
+ local v = rawget(t,k)
+ if v then
+ return v
+ end
+ local tag, dd = match(k,"(..)(%d+)")
+ if tag and dd then
+ local v = rawget(t,tag)
+ if v then
+ return v -- return format(v,tonumber(dd)) -- old way
+ else
+ local v = rawget(t,tag.."..") -- nicer in overview
+ if v then
+ return (gsub(v,"%.%.",tonumber(dd))) -- new way
+ end
+ end
+ end
+ end
+ return k -- "dflt"
+end
+
+setmetatableindex(features, resolve)
+
+local function assign(t,k,v)
+ if k and v then
+ v = lower(v)
+ rawset(t,k,v) -- rawset ?
+ -- rawset(features,gsub(v,"[^a-z0-9]",""),k) -- why ? old code
+ end
+end
+
+setmetatablenewindex(features, assign)
+
+local checkers = {
+ rand = function(v)
+ return v == true and "random" or v
+ end
+}
+
+-- Keep this:
+--
+-- function otf.features.normalize(features)
+-- if features then
+-- local h = { }
+-- for k, v in next, features do
+-- k = lower(k)
+-- if k == "language" then
+-- v = gsub(lower(v),"[^a-z0-9]","")
+-- h.language = rawget(verboselanguages,v) or (languages[v] and v) or "dflt" -- auto adds
+-- elseif k == "script" then
+-- v = gsub(lower(v),"[^a-z0-9]","")
+-- h.script = rawget(verbosescripts,v) or (scripts[v] and v) or "dflt" -- auto adds
+-- else
+-- if type(v) == "string" then
+-- local b = is_boolean(v)
+-- if type(b) == "nil" then
+-- v = tonumber(v) or lower(v)
+-- else
+-- v = b
+-- end
+-- end
+-- if not rawget(features,k) then
+-- k = rawget(verbosefeatures,k) or k
+-- end
+-- local c = checkers[k]
+-- h[k] = c and c(v) or v
+-- end
+-- end
+-- return h
+-- end
+-- end
+
+-- inspect(fonts.handlers.otf.statistics.usedfeatures)
+
+if not storage then
+ return
+end
+
+local usedfeatures = statistics.usedfeatures or { }
+statistics.usedfeatures = usedfeatures
+
+table.setmetatableindex(usedfeatures, function(t,k) if k then local v = { } t[k] = v return v end end) -- table.autotable
+
+storage.register("fonts/otf/usedfeatures", usedfeatures, "fonts.handlers.otf.statistics.usedfeatures" )
+
+function otffeatures.normalize(features)
+ if features then
+ local h = { }
+ for key, value in next, features do
+ local k = lower(key)
+ if k == "language" then
+ local v = gsub(lower(value),"[^a-z0-9]","")
+ h.language = rawget(verboselanguages,v) or (languages[v] and v) or "dflt" -- auto adds
+ elseif k == "script" then
+ local v = gsub(lower(value),"[^a-z0-9]","")
+ h.script = rawget(verbosescripts,v) or (scripts[v] and v) or "dflt" -- auto adds
+ else
+ local uk = usedfeatures[key]
+ local uv = uk[value]
+ if uv then
+ -- report_checks("feature value %a first seen at %a",value,key)
+ else
+ uv = tonumber(value) -- before boolean as there we also handle 0/1
+ if uv then
+ -- we're okay
+ elseif type(value) == "string" then
+ local b = is_boolean(value)
+ if type(b) == "nil" then
+ uv = lower(value)
+ else
+ uv = b
+ end
+ else
+ uv = value
+ end
+ if not rawget(features,k) then
+ k = rawget(verbosefeatures,k) or k
+ end
+ local c = checkers[k]
+ if c then
+ uv = c(uv) or vc
+ end
+ uk[value] = uv
+ end
+ h[k] = uv
+ end
+ end
+ return h
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-oup.lua b/Master/texmf-dist/tex/context/base/mkiv/font-oup.lua
new file mode 100644
index 00000000000..3b6d8ea53c7
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-oup.lua
@@ -0,0 +1,2157 @@
+if not modules then modules = { } end modules ['font-oup'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local next, type = next, type
+local P, R, S = lpeg.P, lpeg.R, lpeg.S
+local lpegmatch = lpeg.match
+local insert, remove, copy, unpack = table.insert, table.remove, table.copy, table.unpack
+
+local formatters = string.formatters
+local sortedkeys = table.sortedkeys
+local sortedhash = table.sortedhash
+local tohash = table.tohash
+
+local report = logs.reporter("otf reader")
+
+local trace_markwidth = false trackers.register("otf.markwidth",function(v) trace_markwidth = v end)
+
+local readers = fonts.handlers.otf.readers
+local privateoffset = fonts.constructors and fonts.constructors.privateoffset or 0xF0000 -- 0x10FFFF
+
+local f_private = formatters["P%05X"]
+local f_unicode = formatters["U%05X"]
+local f_index = formatters["I%05X"]
+local f_character_y = formatters["%C"]
+local f_character_n = formatters["[ %C ]"]
+
+local doduplicates = true -- can become an option (pseudo feature)
+
+local function replaced(list,index,replacement)
+ if type(list) == "number" then
+ return replacement
+ elseif type(replacement) == "table" then
+ local t = { }
+ local n = index-1
+ for i=1,n do
+ t[i] = list[i]
+ end
+ for i=1,#replacement do
+ n = n + 1
+ t[n] = replacement[i]
+ end
+ for i=index+1,#list do
+ n = n + 1
+ t[n] = list[i]
+ end
+ else
+ list[index] = replacement
+ return list
+ end
+end
+
+local function unifyresources(fontdata,indices)
+ local descriptions = fontdata.descriptions
+ local resources = fontdata.resources
+ if not descriptions or not resources then
+ return
+ end
+ --
+ local variants = fontdata.resources.variants
+ if variants then
+ for selector, unicodes in next, variants do
+ for unicode, index in next, unicodes do
+ unicodes[unicode] = indices[index]
+ end
+ end
+ end
+ --
+ local function remark(marks)
+ if marks then
+ local newmarks = { }
+ for k, v in next, marks do
+ local u = indices[k]
+ if u then
+ newmarks[u] = v
+ else
+ report("discarding mark %i",k)
+ end
+ end
+ return newmarks
+ end
+ end
+ --
+ local marks = resources.marks
+ if marks then
+ resources.marks = remark(marks)
+ end
+ --
+ local markclasses = resources.markclasses
+ if markclasses then
+ for class, marks in next, markclasses do
+ markclasses[class] = remark(marks)
+ end
+ end
+ --
+ local marksets = resources.marksets
+ if marksets then
+ for class, marks in next, marksets do
+ marksets[class] = remark(marks)
+ end
+ end
+ --
+ local done = { } -- we need to deal with shared !
+ --
+ local duplicates = doduplicates and resources.duplicates
+ if duplicates and not next(duplicates) then
+ duplicates = false
+ end
+ --
+ local function recover(cover) -- can be packed
+ for i=1,#cover do
+ local c = cover[i]
+ if not done[c] then
+ local t = { }
+ for k, v in next, c do
+ t[indices[k]] = v
+ end
+ cover[i] = t
+ done[c] = d
+ end
+ end
+ end
+ --
+ local function recursed(c) -- ligs are not packed
+ local t = { }
+ for g, d in next, c do
+ if type(d) == "table" then
+ t[indices[g]] = recursed(d)
+ else
+ t[g] = indices[d] -- ligature
+ end
+ end
+ return t
+ end
+ --
+ -- the duplicates need checking (probably only in cjk fonts): currently we only check
+ -- gsub_single, gsub_alternate, gsub_multiple, gpos_single and gpos_cursive
+ --
+ local function unifythem(sequences)
+ if not sequences then
+ return
+ end
+ for i=1,#sequences do
+ local sequence = sequences[i]
+ local kind = sequence.type
+ local steps = sequence.steps
+ local features = sequence.features
+ if steps then
+ for i=1,#steps do
+ local step = steps[i]
+ if kind == "gsub_single" then
+ local c = step.coverage
+ if c then
+ local t1 = done[c]
+ if not t1 then
+ t1 = { }
+ if duplicates then
+ for g1, d1 in next, c do
+ local ug1 = indices[g1]
+ local ud1 = indices[d1]
+ t1[ug1] = ud1
+ --
+ local dg1 = duplicates[ug1]
+ if dg1 then
+ for u in next, dg1 do
+ t1[u] = ud1
+ end
+ end
+ end
+ else
+ for g1, d1 in next, c do
+ t1[indices[g1]] = indices[d1]
+ end
+ end
+ done[c] = t1
+ end
+ step.coverage = t1
+ end
+ elseif kind == "gpos_pair" then
+ local c = step.coverage
+ if c then
+ local t1 = done[c]
+ if not t1 then
+ t1 = { }
+ for g1, d1 in next, c do
+ local t2 = done[d1]
+ if not t2 then
+ t2 = { }
+ for g2, d2 in next, d1 do
+ t2[indices[g2]] = d2
+ end
+ done[d1] = t2
+ end
+ t1[indices[g1]] = t2
+ end
+ done[c] = t1
+ end
+ step.coverage = t1
+ end
+ elseif kind == "gsub_ligature" then
+ local c = step.coverage
+ if c then
+ step.coverage = recursed(c)
+ end
+ elseif kind == "gsub_alternate" or kind == "gsub_multiple" then
+ local c = step.coverage
+ if c then
+ local t1 = done[c]
+ if not t1 then
+ t1 = { }
+ if duplicates then
+ for g1, d1 in next, c do
+ for i=1,#d1 do
+ d1[i] = indices[d1[i]]
+ end
+ local ug1 = indices[g1]
+ t1[ug1] = d1
+ --
+ local dg1 = duplicates[ug1]
+ if dg1 then
+ for u in next, dg1 do
+ t1[u] = copy(d1)
+ end
+ end
+ end
+ else
+ for g1, d1 in next, c do
+ for i=1,#d1 do
+ d1[i] = indices[d1[i]]
+ end
+ t1[indices[g1]] = d1
+ end
+ end
+ done[c] = t1
+ end
+ step.coverage = t1
+ end
+ elseif kind == "gpos_mark2base" or kind == "gpos_mark2mark" or kind == "gpos_mark2ligature" then
+ local c = step.coverage
+ if c then
+ local t1 = done[c]
+ if not t1 then
+ t1 = { }
+ for g1, d1 in next, c do
+ t1[indices[g1]] = d1
+ end
+ done[c] = t1
+ end
+ step.coverage = t1
+ end
+ local c = step.baseclasses
+ if c then
+ local t1 = done[c]
+ if not t1 then
+ for g1, d1 in next, c do
+ local t2 = done[d1]
+ if not t2 then
+ t2 = { }
+ for g2, d2 in next, d1 do
+ t2[indices[g2]] = d2
+ end
+ done[d1] = t2
+ end
+ c[g1] = t2
+ end
+ done[c] = c
+ end
+ end
+ elseif kind == "gpos_single" then
+ local c = step.coverage
+ if c then
+ local t1 = done[c]
+ if not t1 then
+ t1 = { }
+ if duplicates then
+ for g1, d1 in next, c do
+ local ug1 = indices[g1]
+ t1[ug1] = d1
+ --
+ local dg1 = duplicates[ug1]
+ if dg1 then
+ for u in next, dg1 do
+ t1[u] = d1
+ end
+ end
+ end
+ else
+ for g1, d1 in next, c do
+ t1[indices[g1]] = d1
+ end
+ end
+ done[c] = t1
+ end
+ step.coverage = t1
+ end
+ elseif kind == "gpos_cursive" then
+ local c = step.coverage
+ if c then
+ local t1 = done[c]
+ if not t1 then
+ t1 = { }
+ if duplicates then
+ for g1, d1 in next, c do
+ local ug1 = indices[g1]
+ t1[ug1] = d1
+ --
+ local dg1 = duplicates[ug1]
+ if dg1 then
+ -- probably needs a bit more
+ for u in next, dg1 do
+ t1[u] = copy(d1)
+ end
+ end
+ end
+ else
+ for g1, d1 in next, c do
+ t1[indices[g1]] = d1
+ end
+ end
+ done[c] = t1
+ end
+ step.coverage = t1
+ end
+ end
+ --
+ local rules = step.rules
+ if rules then
+ for i=1,#rules do
+ local rule = rules[i]
+ --
+ local before = rule.before if before then recover(before) end
+ local after = rule.after if after then recover(after) end
+ local current = rule.current if current then recover(current) end
+ --
+ local replacements = rule.replacements
+ if replacements then
+ if not done[replacements] then
+ local r = { }
+ for k, v in next, replacements do
+ r[indices[k]] = indices[v]
+ end
+ rule.replacements = r
+ done[replacements] = r
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ --
+ unifythem(resources.sequences)
+ unifythem(resources.sublookups)
+end
+
+local function copyduplicates(fontdata)
+ if doduplicates then
+ local descriptions = fontdata.descriptions
+ local resources = fontdata.resources
+ local duplicates = resources.duplicates
+ if duplicates then
+ for u, d in next, duplicates do
+ local du = descriptions[u]
+ if du then
+ local t = { f_character_y(u), "@", f_index(du.index), "->" }
+ local n = 0
+ local m = 25
+ for u in next, d do
+ if descriptions[u] then
+ if n < m then
+ t[n+4] = f_character_n(u)
+ end
+ else
+ local c = copy(du)
+ c.unicode = u -- better this way
+ descriptions[u] = c
+ if n < m then
+ t[n+4] = f_character_y(u)
+ end
+ end
+ n = n + 1
+ end
+ if n <= m then
+ report("duplicates: %i : % t",n,t)
+ else
+ report("duplicates: %i : % t ...",n,t)
+ end
+ else
+ -- what a mess
+ end
+ end
+ end
+ end
+end
+
+local ignore = { -- should we fix them?
+ ["notdef"] = true,
+ [".notdef"] = true,
+ ["null"] = true,
+ [".null"] = true,
+ ["nonmarkingreturn"] = true,
+}
+
+
+local function checklookups(fontdata,missing,nofmissing)
+ local descriptions = fontdata.descriptions
+ local resources = fontdata.resources
+ if missing and nofmissing and nofmissing <= 0 then
+ return
+ end
+ --
+ local singles = { }
+ local alternates = { }
+ local ligatures = { }
+
+ if not missing then
+ missing = { }
+ nofmissing = 0
+ for u, d in next, descriptions do
+ if not d.unicode then
+ nofmissing = nofmissing + 1
+ missing[u] = true
+ end
+ end
+ end
+
+ local function collectthem(sequences)
+ if not sequences then
+ return
+ end
+ for i=1,#sequences do
+ local sequence = sequences[i]
+ local kind = sequence.type
+ local steps = sequence.steps
+ if steps then
+ for i=1,#steps do
+ local step = steps[i]
+ if kind == "gsub_single" then
+ local c = step.coverage
+ if c then
+ singles[#singles+1] = c
+ end
+ elseif kind == "gsub_alternate" then
+ local c = step.coverage
+ if c then
+ alternates[#alternates+1] = c
+ end
+ elseif kind == "gsub_ligature" then
+ local c = step.coverage
+ if c then
+ ligatures[#ligatures+1] = c
+ end
+ end
+ end
+ end
+ end
+ end
+
+ collectthem(resources.sequences)
+ collectthem(resources.sublookups)
+
+ local loops = 0
+ while true do
+ loops = loops + 1
+ local old = nofmissing
+ for i=1,#singles do
+ local c = singles[i]
+ for g1, g2 in next, c do
+ if missing[g1] then
+ local u2 = descriptions[g2].unicode
+ if u2 then
+ missing[g1] = false
+ descriptions[g1].unicode = u2
+ nofmissing = nofmissing - 1
+ end
+ end
+ if missing[g2] then
+ local u1 = descriptions[g1].unicode
+ if u1 then
+ missing[g2] = false
+ descriptions[g2].unicode = u1
+ nofmissing = nofmissing - 1
+ end
+ end
+ end
+ end
+ for i=1,#alternates do
+ local c = alternates[i]
+ -- maybe first a g1 loop and then a g2
+ for g1, d1 in next, c do
+ if missing[g1] then
+ for i=1,#d1 do
+ local g2 = d1[i]
+ local u2 = descriptions[g2].unicode
+ if u2 then
+ missing[g1] = false
+ descriptions[g1].unicode = u2
+ nofmissing = nofmissing - 1
+ end
+ end
+ end
+ if not missing[g1] then
+ for i=1,#d1 do
+ local g2 = d1[i]
+ if missing[g2] then
+ local u1 = descriptions[g1].unicode
+ if u1 then
+ missing[g2] = false
+ descriptions[g2].unicode = u1
+ nofmissing = nofmissing - 1
+ end
+ end
+ end
+ end
+ end
+ end
+ if nofmissing <= 0 then
+ report("all done in %s loops",loops)
+ return
+ elseif old == nofmissing then
+ break
+ end
+ end
+
+ local t, n -- no need to insert/remove and allocate many times
+
+ local function recursed(c)
+ for g, d in next, c do
+ if g ~= "ligature" then
+ local u = descriptions[g].unicode
+ if u then
+ n = n + 1
+ t[n] = u
+ recursed(d)
+ n = n - 1
+ end
+ elseif missing[d] then
+ local l = { }
+ local m = 0
+ for i=1,n do
+ local u = t[i]
+ if type(u) == "table" then
+ for i=1,#u do
+ m = m + 1
+ l[m] = u[i]
+ end
+ else
+ m = m + 1
+ l[m] = u
+ end
+ end
+ missing[d] = false
+ descriptions[d].unicode = l
+ nofmissing = nofmissing - 1
+ end
+ end
+ end
+
+ if nofmissing > 0 then
+ t = { }
+ n = 0
+ local loops = 0
+ while true do
+ loops = loops + 1
+ local old = nofmissing
+ for i=1,#ligatures do
+ recursed(ligatures[i])
+ end
+ if nofmissing <= 0 then
+ report("all done in %s loops",loops)
+ return
+ elseif old == nofmissing then
+ break
+ end
+ end
+ t = nil
+ n = 0
+ end
+
+ if nofmissing > 0 then
+ local done = { }
+ for i, r in next, missing do
+ if r then
+ local name = descriptions[i].name or f_index(i)
+ if not ignore[name] then
+ done[name] = true
+ end
+ end
+ end
+ if next(done) then
+ report("not unicoded: % t",table.sortedkeys(done))
+ end
+ end
+end
+
+local function unifymissing(fontdata)
+ if not fonts.mappings then
+ require("font-map")
+ require("font-agl")
+ end
+ local unicodes = { }
+ local private = fontdata.private
+ local resources = fontdata.resources
+ resources.unicodes = unicodes
+ for unicode, d in next, fontdata.descriptions do
+ if unicode < privateoffset then
+ local name = d.name
+ if name then
+ unicodes[name] = unicode
+ end
+ end
+ end
+ fonts.mappings.addtounicode(fontdata,fontdata.filename,checklookups)
+ resources.unicodes = nil
+end
+
+local function unifyglyphs(fontdata,usenames)
+ local private = fontdata.private or privateoffset
+ local glyphs = fontdata.glyphs
+ local indices = { }
+ local descriptions = { }
+ local names = usenames and { }
+ local resources = fontdata.resources
+ local zero = glyphs[0]
+ local zerocode = zero.unicode
+ if not zerocode then
+ zerocode = private
+ zero.unicode = zerocode
+ private = private + 1
+ end
+ descriptions[zerocode] = zero
+ if names then
+ local name = glyphs[0].name or f_private(zerocode)
+ indices[0] = name
+ names[name] = zerocode
+ else
+ indices[0] = zerocode
+ end
+ --
+ for index=1,#glyphs do
+ local glyph = glyphs[index]
+ local unicode = glyph.unicode -- this is the primary one
+ if not unicode then
+ -- report("assigning private unicode %U to glyph indexed %05X (%s)",private,index,"unset")
+ unicode = private
+ -- glyph.unicode = -1
+ if names then
+ local name = glyph.name or f_private(unicode)
+ indices[index] = name
+ names[name] = unicode
+ else
+ indices[index] = unicode
+ end
+ private = private + 1
+ elseif descriptions[unicode] then
+ -- real weird
+ report("assigning private unicode %U to glyph indexed %05X (%C)",private,index,unicode)
+ unicode = private
+ -- glyph.unicode = -1
+ if names then
+ local name = glyph.name or f_private(unicode)
+ indices[index] = name
+ names[name] = unicode
+ else
+ indices[index] = unicode
+ end
+ private = private + 1
+ else
+ if names then
+ local name = glyph.name or f_unicode(unicode)
+ indices[index] = name
+ names[name] = unicode
+ else
+ indices[index] = unicode
+ end
+ end
+ descriptions[unicode] = glyph
+ end
+ --
+ for index=1,#glyphs do
+ local math = glyphs[index].math
+ if math then
+ local list = math.vparts
+ if list then
+ for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end
+ end
+ local list = math.hparts
+ if list then
+ for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end
+ end
+ local list = math.vvariants
+ if list then
+ -- for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end
+ for i=1,#list do list[i] = indices[list[i]] end
+ end
+ local list = math.hvariants
+ if list then
+ -- for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end
+ for i=1,#list do list[i] = indices[list[i]] end
+ end
+ end
+ end
+ --
+ fontdata.private = private
+ fontdata.glyphs = nil
+ fontdata.names = names
+ fontdata.descriptions = descriptions
+ fontdata.hashmethod = hashmethod
+ --
+ return indices, names
+end
+
+local p_bogusname = (
+ (P("uni") + P("UNI") + P("Uni") + P("U") + P("u")) * S("Xx")^0 * R("09","AF")^1
+ + (P("identity") + P("Identity") + P("IDENTITY")) * R("09","AF")^1
+ + (P("index") + P("Index") + P("INDEX")) * R("09")^1
+) * P(-1)
+
+local function stripredundant(fontdata)
+ local descriptions = fontdata.descriptions
+ if descriptions then
+ local n = 0
+ local c = 0
+ for unicode, d in next, descriptions do
+ local name = d.name
+ if name and lpegmatch(p_bogusname,name) then
+ d.name = nil
+ n = n + 1
+ end
+ if d.class == "base" then
+ d.class = nil
+ c = c + 1
+ end
+ end
+ if n > 0 then
+ report("%s bogus names removed (verbose unicode)",n)
+ end
+ if c > 0 then
+ report("%s base class tags removed (default is base)",c)
+ end
+ end
+end
+
+function readers.getcomponents(fontdata) -- handy for resolving ligatures when names are missing
+ local resources = fontdata.resources
+ if resources then
+ local sequences = resources.sequences
+ if sequences then
+ local collected = { }
+ for i=1,#sequences do
+ local sequence = sequences[i]
+ if sequence.type == "gsub_ligature" then
+ local steps = sequence.steps
+ if steps then
+ local l = { }
+ local function traverse(p,k,v)
+ if k == "ligature" then
+ collected[v] = { unpack(l) }
+ else
+ insert(l,k)
+ for k, vv in next, v do
+ traverse(p,k,vv)
+ end
+ remove(l)
+ end
+ end
+ for i=1,#steps do
+ -- we actually had/have this in base mode
+ local coverage = steps[i].coverage
+ if coverage then
+ for k, v in next, coverage do
+ traverse(k,k,v)
+ end
+ end
+ end
+ end
+ end
+ end
+ if next(collected) then
+ -- remove self referring
+ -- for k, v in next, collected do
+ -- for i=1,#v do
+ -- local vi = v[i]
+ -- if vi == k then
+ -- -- report("removing self referring ligature @ slot %5X from collected (1)",k)
+ -- collected[k] = nil
+ -- end
+ -- end
+ -- end
+ while true do
+ local done = false
+ for k, v in next, collected do
+ for i=1,#v do
+ local vi = v[i]
+ if vi == k then
+ -- report("removing self referring ligature @ slot %5X from collected (2)",k)
+ collected[k] = nil
+ break
+ else
+ local c = collected[vi]
+ if c then
+ done = true
+ local t = { }
+ local n = i - 1
+ for j=1,n do
+ t[j] = v[j]
+ end
+ for j=1,#c do
+ n = n + 1
+ t[n] = c[j]
+ end
+ for j=i+1,#v do
+ n = n + 1
+ t[n] = v[j]
+ end
+ collected[k] = t
+ break
+ end
+ end
+ end
+ end
+ if not done then
+ break
+ end
+ end
+ return collected
+ end
+ end
+ end
+end
+
+function readers.rehash(fontdata,hashmethod) -- TODO: combine loops in one
+ if not (fontdata and fontdata.glyphs) then
+ return
+ end
+ if hashmethod == "indices" then
+ fontdata.hashmethod = "indices"
+ elseif hashmethod == "names" then
+ fontdata.hashmethod = "names"
+ local indices = unifyglyphs(fontdata,true)
+ unifyresources(fontdata,indices)
+ copyduplicates(fontdata)
+ unifymissing(fontdata)
+ -- stripredundant(fontdata)
+ else
+ fontdata.hashmethod = "unicode"
+ local indices = unifyglyphs(fontdata)
+ unifyresources(fontdata,indices)
+ copyduplicates(fontdata)
+ unifymissing(fontdata)
+ stripredundant(fontdata)
+ end
+ -- maybe here components
+end
+
+function readers.checkhash(fontdata)
+ local hashmethod = fontdata.hashmethod
+ if hashmethod == "unicodes" then
+ fontdata.names = nil -- just to be sure
+ elseif hashmethod == "names" and fontdata.names then
+ unifyresources(fontdata,fontdata.names)
+ copyduplicates(fontdata)
+ fontdata.hashmethod = "unicode"
+ fontdata.names = nil -- no need for it
+ else
+ readers.rehash(fontdata,"unicode")
+ end
+end
+
+function readers.addunicodetable(fontdata)
+ local resources = fontdata.resources
+ local unicodes = resources.unicodes
+ if not unicodes then
+ local descriptions = fontdata.descriptions
+ if descriptions then
+ unicodes = { }
+ resources.unicodes = unicodes
+ for u, d in next, descriptions do
+ local n = d.name
+ if n then
+ unicodes[n] = u
+ end
+ end
+ end
+ end
+end
+
+-- for the moment here:
+
+local concat, sort = table.concat, table.sort
+local next, type, tostring = next, type, tostring
+
+local criterium = 1
+local threshold = 0
+
+local trace_packing = false trackers.register("otf.packing", function(v) trace_packing = v end)
+local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end)
+
+local report_otf = logs.reporter("fonts","otf loading")
+
+local function tabstr_normal(t)
+ local s = { }
+ local n = 0
+ for k, v in next, t do
+ n = n + 1
+ if type(v) == "table" then
+ s[n] = k .. ">" .. tabstr_normal(v)
+ elseif v == true then
+ s[n] = k .. "+" -- "=true"
+ elseif v then
+ s[n] = k .. "=" .. v
+ else
+ s[n] = k .. "-" -- "=false"
+ end
+ end
+ if n == 0 then
+ return ""
+ elseif n == 1 then
+ return s[1]
+ else
+ sort(s) -- costly but needed (occasional wrong hit otherwise)
+ return concat(s,",")
+ end
+end
+
+local function tabstr_flat(t)
+ local s = { }
+ local n = 0
+ for k, v in next, t do
+ n = n + 1
+ s[n] = k .. "=" .. v
+ end
+ if n == 0 then
+ return ""
+ elseif n == 1 then
+ return s[1]
+ else
+ sort(s) -- costly but needed (occasional wrong hit otherwise)
+ return concat(s,",")
+ end
+end
+
+local function tabstr_mixed(t) -- indexed
+ local s = { }
+ local n = #t
+ if n == 0 then
+ return ""
+ elseif n == 1 then
+ local k = t[1]
+ if k == true then
+ return "++" -- we need to distinguish from "true"
+ elseif k == false then
+ return "--" -- we need to distinguish from "false"
+ else
+ return tostring(k) -- number or string
+ end
+ else
+ for i=1,n do
+ local k = t[i]
+ if k == true then
+ s[i] = "++" -- we need to distinguish from "true"
+ elseif k == false then
+ s[i] = "--" -- we need to distinguish from "false"
+ else
+ s[i] = k -- number or string
+ end
+ end
+ return concat(s,",")
+ end
+end
+
+local function tabstr_boolean(t)
+ local s = { }
+ local n = 0
+ for k, v in next, t do
+ n = n + 1
+ if v then
+ s[n] = k .. "+"
+ else
+ s[n] = k .. "-"
+ end
+ end
+ if n == 0 then
+ return ""
+ elseif n == 1 then
+ return s[1]
+ else
+ sort(s) -- costly but needed (occasional wrong hit otherwise)
+ return concat(s,",")
+ end
+end
+
+-- beware: we cannot unpack and repack the same table because then sharing
+-- interferes (we could catch this if needed) .. so for now: save, reload
+-- and repack in such cases (never needed anyway) .. a tricky aspect is that
+-- we then need to sort more thanks to random hashing
+
+function readers.pack(data)
+
+ if data then
+
+ local h, t, c = { }, { }, { }
+ local hh, tt, cc = { }, { }, { }
+ local nt, ntt = 0, 0
+
+ local function pack_normal(v)
+ local tag = tabstr_normal(v)
+ local ht = h[tag]
+ if ht then
+ c[ht] = c[ht] + 1
+ return ht
+ else
+ nt = nt + 1
+ t[nt] = v
+ h[tag] = nt
+ c[nt] = 1
+ return nt
+ end
+ end
+
+ local function pack_flat(v)
+ local tag = tabstr_flat(v)
+ local ht = h[tag]
+ if ht then
+ c[ht] = c[ht] + 1
+ return ht
+ else
+ nt = nt + 1
+ t[nt] = v
+ h[tag] = nt
+ c[nt] = 1
+ return nt
+ end
+ end
+
+ local function pack_boolean(v)
+ local tag = tabstr_boolean(v)
+ local ht = h[tag]
+ if ht then
+ c[ht] = c[ht] + 1
+ return ht
+ else
+ nt = nt + 1
+ t[nt] = v
+ h[tag] = nt
+ c[nt] = 1
+ return nt
+ end
+ end
+
+ local function pack_indexed(v)
+ local tag = concat(v," ")
+ local ht = h[tag]
+ if ht then
+ c[ht] = c[ht] + 1
+ return ht
+ else
+ nt = nt + 1
+ t[nt] = v
+ h[tag] = nt
+ c[nt] = 1
+ return nt
+ end
+ end
+
+ local function pack_mixed(v)
+ local tag = tabstr_mixed(v)
+ local ht = h[tag]
+ if ht then
+ c[ht] = c[ht] + 1
+ return ht
+ else
+ nt = nt + 1
+ t[nt] = v
+ h[tag] = nt
+ c[nt] = 1
+ return nt
+ end
+ end
+
+ local function pack_final(v)
+ -- v == number
+ if c[v] <= criterium then
+ return t[v]
+ else
+ -- compact hash
+ local hv = hh[v]
+ if hv then
+ return hv
+ else
+ ntt = ntt + 1
+ tt[ntt] = t[v]
+ hh[v] = ntt
+ cc[ntt] = c[v]
+ return ntt
+ end
+ end
+ end
+
+ local function success(stage,pass)
+ if nt == 0 then
+ if trace_loading or trace_packing then
+ report_otf("pack quality: nothing to pack")
+ end
+ return false
+ elseif nt >= threshold then
+ local one, two, rest = 0, 0, 0
+ if pass == 1 then
+ for k,v in next, c do
+ if v == 1 then
+ one = one + 1
+ elseif v == 2 then
+ two = two + 1
+ else
+ rest = rest + 1
+ end
+ end
+ else
+ for k,v in next, cc do
+ if v > 20 then
+ rest = rest + 1
+ elseif v > 10 then
+ two = two + 1
+ else
+ one = one + 1
+ end
+ end
+ data.tables = tt
+ end
+ if trace_loading or trace_packing then
+ report_otf("pack quality: stage %s, pass %s, %s packed, 1-10:%s, 11-20:%s, rest:%s (criterium: %s)",
+ stage, pass, one+two+rest, one, two, rest, criterium)
+ end
+ return true
+ else
+ if trace_loading or trace_packing then
+ report_otf("pack quality: stage %s, pass %s, %s packed, aborting pack (threshold: %s)",
+ stage, pass, nt, threshold)
+ end
+ return false
+ end
+ end
+
+ local function packers(pass)
+ if pass == 1 then
+ return pack_normal, pack_indexed, pack_flat, pack_boolean, pack_mixed
+ else
+ return pack_final, pack_final, pack_final, pack_final, pack_final
+ end
+ end
+
+ local resources = data.resources
+ local sequences = resources.sequences
+ local sublookups = resources.sublookups
+ local features = resources.features
+
+ local chardata = characters and characters.data
+ local descriptions = data.descriptions or data.glyphs
+
+ if not descriptions then
+ return
+ end
+
+ --
+
+ for pass=1,2 do
+
+ if trace_packing then
+ report_otf("start packing: stage 1, pass %s",pass)
+ end
+
+ local pack_normal, pack_indexed, pack_flat, pack_boolean, pack_mixed = packers(pass)
+
+ for unicode, description in next, descriptions do
+ local boundingbox = description.boundingbox
+ if boundingbox then
+ description.boundingbox = pack_indexed(boundingbox)
+ end
+ local math = description.math
+ if math then
+ local kerns = math.kerns
+ if kerns then
+ for tag, kern in next, kerns do
+ kerns[tag] = pack_normal(kern)
+ end
+ end
+ end
+ end
+
+ local function packthem(sequences)
+ for i=1,#sequences do
+ local sequence = sequences[i]
+ local kind = sequence.type
+ local steps = sequence.steps
+ local order = sequence.order
+ local features = sequence.features
+ local flags = sequence.flags
+ if steps then
+ for i=1,#steps do
+ local step = steps[i]
+ if kind == "gpos_pair" then
+ local c = step.coverage
+ if c then
+ if step.format == "kern" then
+ for g1, d1 in next, c do
+ c[g1] = pack_normal(d1)
+ end
+ else
+ for g1, d1 in next, c do
+ for g2, d2 in next, d1 do
+ local f = d2[1] if f then d2[1] = pack_indexed(f) end
+ local s = d2[2] if s then d2[2] = pack_indexed(s) end
+ end
+ end
+ end
+ end
+ elseif kind == "gpos_single" then
+ local c = step.coverage
+ if c then
+ if step.format == "kern" then
+ step.coverage = pack_normal(c)
+ else
+ for g1, d1 in next, c do
+ c[g1] = pack_indexed(d1)
+ end
+ end
+ end
+ elseif kind == "gpos_cursive" then
+ local c = step.coverage
+ if c then
+ for g1, d1 in next, c do
+ local f = d1[2] if f then d1[2] = pack_indexed(f) end
+ local s = d1[3] if s then d1[3] = pack_indexed(s) end
+ end
+ end
+ elseif kind == "gpos_mark2base" or kind == "gpos_mark2mark" then
+ local c = step.baseclasses
+ if c then
+ for g1, d1 in next, c do
+ for g2, d2 in next, d1 do
+ d1[g2] = pack_indexed(d2)
+ end
+ end
+ end
+ local c = step.coverage
+ if c then
+ for g1, d1 in next, c do
+ d1[2] = pack_indexed(d1[2])
+ end
+ end
+ elseif kind == "gpos_mark2ligature" then
+ local c = step.baseclasses
+ if c then
+ for g1, d1 in next, c do
+ for g2, d2 in next, d1 do
+ for g3, d3 in next, d2 do
+ d2[g3] = pack_indexed(d3)
+ end
+ end
+ end
+ end
+ local c = step.coverage
+ if c then
+ for g1, d1 in next, c do
+ d1[2] = pack_indexed(d1[2])
+ end
+ end
+ end
+ -- if ... chain ...
+ local rules = step.rules
+ if rules then
+ for i=1,#rules do
+ local rule = rules[i]
+ local r = rule.before if r then for i=1,#r do r[i] = pack_boolean(r[i]) end end
+ local r = rule.after if r then for i=1,#r do r[i] = pack_boolean(r[i]) end end
+ local r = rule.current if r then for i=1,#r do r[i] = pack_boolean(r[i]) end end
+ local r = rule.replacements if r then rule.replacements = pack_flat (r) end -- can have holes
+ end
+ end
+ end
+ end
+ if order then
+ sequence.order = pack_indexed(order)
+ end
+ if features then
+ for script, feature in next, features do
+ features[script] = pack_normal(feature)
+ end
+ end
+ if flags then
+ sequence.flags = pack_normal(flags)
+ end
+ end
+ end
+
+ if sequences then
+ packthem(sequences)
+ end
+
+ if sublookups then
+ packthem(sublookups)
+ end
+
+ if features then
+ for k, list in next, features do
+ for feature, spec in next, list do
+ list[feature] = pack_normal(spec)
+ end
+ end
+ end
+
+ if not success(1,pass) then
+ return
+ end
+
+ end
+
+ if nt > 0 then
+
+ for pass=1,2 do
+
+ if trace_packing then
+ report_otf("start packing: stage 2, pass %s",pass)
+ end
+
+ local pack_normal, pack_indexed, pack_flat, pack_boolean, pack_mixed = packers(pass)
+
+ for unicode, description in next, descriptions do
+ local math = description.math
+ if math then
+ local kerns = math.kerns
+ if kerns then
+ math.kerns = pack_normal(kerns)
+ end
+ end
+ end
+
+ local function packthem(sequences)
+ for i=1,#sequences do
+ local sequence = sequences[i]
+ local kind = sequence.type
+ local steps = sequence.steps
+ local features = sequence.features
+ if steps then
+ for i=1,#steps do
+ local step = steps[i]
+ if kind == "gpos_pair" then
+ local c = step.coverage
+ if c then
+ if step.format == "kern" then
+ -- todo !
+ else
+ for g1, d1 in next, c do
+ for g2, d2 in next, d1 do
+ d1[g2] = pack_normal(d2)
+ end
+ end
+ end
+ end
+-- elseif kind == "gpos_mark2base" or kind == "gpos_mark2mark" or kind == "gpos_mark2ligature" then
+-- local c = step.baseclasses
+-- for k, v in next, c do
+-- c[k] = pack_normal(v)
+-- end
+ end
+ local rules = step.rules
+ if rules then
+ for i=1,#rules do
+ local rule = rules[i]
+ local r = rule.before if r then rule.before = pack_normal(r) end
+ local r = rule.after if r then rule.after = pack_normal(r) end
+ local r = rule.current if r then rule.current = pack_normal(r) end
+ end
+ end
+ end
+ end
+ if features then
+ sequence.features = pack_normal(features)
+ end
+ end
+ end
+ if sequences then
+ packthem(sequences)
+ end
+ if sublookups then
+ packthem(sublookups)
+ end
+ -- features
+ if not success(2,pass) then
+ -- return
+ end
+ end
+
+ for pass=1,2 do
+ if trace_packing then
+ report_otf("start packing: stage 3, pass %s",pass)
+ end
+
+ local pack_normal, pack_indexed, pack_flat, pack_boolean, pack_mixed = packers(pass)
+
+ local function packthem(sequences)
+ for i=1,#sequences do
+ local sequence = sequences[i]
+ local kind = sequence.type
+ local steps = sequence.steps
+ local features = sequence.features
+ if steps then
+ for i=1,#steps do
+ local step = steps[i]
+ if kind == "gpos_pair" then
+ local c = step.coverage
+ if c then
+ if step.format == "kern" then
+ -- todo !
+ else
+ for g1, d1 in next, c do
+ c[g1] = pack_normal(d1)
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+
+ if sequences then
+ packthem(sequences)
+ end
+ if sublookups then
+ packthem(sublookups)
+ end
+
+ end
+
+ end
+
+ end
+end
+
+local unpacked_mt = {
+ __index =
+ function(t,k)
+ t[k] = false
+ return k -- next time true
+ end
+}
+
+function readers.unpack(data)
+
+ if data then
+ local tables = data.tables
+ if tables then
+ local resources = data.resources
+ local descriptions = data.descriptions or data.glyphs
+ local sequences = resources.sequences
+ local sublookups = resources.sublookups
+ local features = resources.features
+ local unpacked = { }
+ setmetatable(unpacked,unpacked_mt)
+ for unicode, description in next, descriptions do
+ local tv = tables[description.boundingbox]
+ if tv then
+ description.boundingbox = tv
+ end
+ local math = description.math
+ if math then
+ local kerns = math.kerns
+ if kerns then
+ local tm = tables[kerns]
+ if tm then
+ math.kerns = tm
+ kerns = unpacked[tm]
+ end
+ if kerns then
+ for k, kern in next, kerns do
+ local tv = tables[kern]
+ if tv then
+ kerns[k] = tv
+ end
+ end
+ end
+ end
+ end
+ end
+
+ local function unpackthem(sequences)
+ for i=1,#sequences do
+ local sequence = sequences[i]
+ local kind = sequence.type
+ local steps = sequence.steps
+ local order = sequence.order
+ local features = sequence.features
+ local flags = sequence.flags
+ local markclass = sequence.markclass
+ if steps then
+ for i=1,#steps do
+ local step = steps[i]
+ if kind == "gpos_pair" then
+ local c = step.coverage
+ if c then
+ if step.format == "kern" then
+ for g1, d1 in next, c do
+ local tv = tables[d1]
+ if tv then
+ c[g1] = tv
+ end
+ end
+ else
+ for g1, d1 in next, c do
+ local tv = tables[d1]
+ if tv then
+ c[g1] = tv
+ d1 = tv
+ end
+ for g2, d2 in next, d1 do
+ local tv = tables[d2]
+ if tv then
+ d1[g2] = tv
+ d2 = tv
+ end
+ local f = tables[d2[1]] if f then d2[1] = f end
+ local s = tables[d2[2]] if s then d2[2] = s end
+ end
+ end
+ end
+ end
+ elseif kind == "gpos_single" then
+ local c = step.coverage
+ if c then
+ if step.format == "kern" then
+ local tv = tables[c]
+ if tv then
+ step.coverage = tv
+ end
+ else
+ for g1, d1 in next, c do
+ local tv = tables[d1]
+ if tv then
+ c[g1] = tv
+ end
+ end
+ end
+ end
+ elseif kind == "gpos_cursive" then
+ local c = step.coverage
+ if c then
+ for g1, d1 in next, c do
+ local f = tables[d1[2]] if f then d1[2] = f end
+ local s = tables[d1[3]] if s then d1[3] = s end
+ end
+ end
+ elseif kind == "gpos_mark2base" or kind == "gpos_mark2mark" then
+ local c = step.baseclasses
+ if c then
+-- for k, v in next, c do
+-- local tv = tables[v]
+-- if tv then
+-- c[k] = tv
+-- end
+-- end
+ for g1, d1 in next, c do
+ for g2, d2 in next, d1 do
+ local tv = tables[d2]
+ if tv then
+ d1[g2] = tv
+ end
+ end
+ end
+ end
+ local c = step.coverage
+ if c then
+ for g1, d1 in next, c do
+ local tv = tables[d1[2]]
+ if tv then
+ d1[2] = tv
+ end
+ end
+ end
+ elseif kind == "gpos_mark2ligature" then
+ local c = step.baseclasses
+ if c then
+-- for k, v in next, c do
+-- local tv = tables[v]
+-- if tv then
+-- c[k] = tv
+-- end
+-- end
+ for g1, d1 in next, c do
+ for g2, d2 in next, d1 do
+ for g3, d3 in next, d2 do
+ local tv = tables[d2[g3]]
+ if tv then
+ d2[g3] = tv
+ end
+ end
+ end
+ end
+ end
+ local c = step.coverage
+ if c then
+ for g1, d1 in next, c do
+ local tv = tables[d1[2]]
+ if tv then
+ d1[2] = tv
+ end
+ end
+ end
+ end
+ local rules = step.rules
+ if rules then
+ for i=1,#rules do
+ local rule = rules[i]
+ local before = rule.before
+ if before then
+ local tv = tables[before]
+ if tv then
+ rule.before = tv
+ before = tv
+ end
+ for i=1,#before do
+ local tv = tables[before[i]]
+ if tv then
+ before[i] = tv
+ end
+ end
+ end
+ local after = rule.after
+ if after then
+ local tv = tables[after]
+ if tv then
+ rule.after = tv
+ after = tv
+ end
+ for i=1,#after do
+ local tv = tables[after[i]]
+ if tv then
+ after[i] = tv
+ end
+ end
+ end
+ local current = rule.current
+ if current then
+ local tv = tables[current]
+ if tv then
+ rule.current = tv
+ current = tv
+ end
+ for i=1,#current do
+ local tv = tables[current[i]]
+ if tv then
+ current[i] = tv
+ end
+ end
+ end
+ local replacements = rule.replacements
+ if replacements then
+ local tv = tables[replace]
+ if tv then
+ rule.replacements = tv
+ end
+ end
+ end
+ end
+ end
+ end
+ if features then
+ local tv = tables[features]
+ if tv then
+ sequence.features = tv
+ features = tv
+ end
+ for script, feature in next, features do
+ local tv = tables[feature]
+ if tv then
+ features[script] = tv
+ end
+ end
+ end
+ if order then
+ local tv = tables[order]
+ if tv then
+ sequence.order = tv
+ end
+ end
+ if flags then
+ local tv = tables[flags]
+ if tv then
+ sequence.flags = tv
+ end
+ end
+ end
+ end
+
+ if sequences then
+ unpackthem(sequences)
+ end
+
+ if sublookups then
+ unpackthem(sublookups)
+ end
+
+ if features then
+ for k, list in next, features do
+ for feature, spec in next, list do
+ local tv = tables[spec]
+ if tv then
+ list[feature] = tv
+ end
+ end
+ end
+ end
+
+ data.tables = nil
+ end
+ end
+end
+
+local mt = {
+ __index = function(t,k) -- maybe set it
+ if k == "height" then
+ local ht = t.boundingbox[4]
+ return ht < 0 and 0 or ht
+ elseif k == "depth" then
+ local dp = -t.boundingbox[2]
+ return dp < 0 and 0 or dp
+ elseif k == "width" then
+ return 0
+ elseif k == "name" then -- or maybe uni*
+ return forcenotdef and ".notdef"
+ end
+ end
+}
+
+local function sameformat(sequence,steps,first,nofsteps,kind)
+ return true
+end
+
+local function mergesteps_1(lookup,strict)
+ local steps = lookup.steps
+ local nofsteps = lookup.nofsteps
+ local first = steps[1]
+ if strict then
+ local f = first.format
+ for i=2,nofsteps do
+ if steps[i].format ~= f then
+ report("not merging %a steps of %a lookup %a, different formats",nofsteps,lookup.type,lookup.name)
+ return 0
+ end
+ end
+ end
+ report("merging %a steps of %a lookup %a",nofsteps,lookup.type,lookup.name)
+ local target = first.coverage
+ for i=2,nofsteps do
+ for k, v in next, steps[i].coverage do
+ if not target[k] then
+ target[k] = v
+ end
+ end
+ end
+ lookup.nofsteps = 1
+ lookup.merged = true
+ lookup.steps = { first }
+ return nofsteps - 1
+end
+
+
+local function mergesteps_2(lookup,strict) -- pairs
+ local steps = lookup.steps
+ local nofsteps = lookup.nofsteps
+ local first = steps[1]
+ if strict then
+ local f = first.format
+ for i=2,nofsteps do
+ if steps[i].format ~= f then
+ report("not merging %a steps of %a lookup %a, different formats",nofsteps,lookup.type,lookup.name)
+ return 0
+ end
+ end
+ end
+ report("merging %a steps of %a lookup %a",nofsteps,lookup.type,lookup.name)
+ local target = first.coverage
+ for i=2,nofsteps do
+ for k, v in next, steps[i].coverage do
+ local tk = target[k]
+ if tk then
+ for k, v in next, v do
+ if not tk[k] then
+ tk[k] = v
+ end
+ end
+ else
+ target[k] = v
+ end
+ end
+ end
+ lookup.nofsteps = 1
+ lookup.steps = { first }
+ return nofsteps - 1
+end
+
+
+local function mergesteps_3(lookup,strict) -- marks
+ local steps = lookup.steps
+ local nofsteps = lookup.nofsteps
+ local first = steps[1]
+ report("merging %a steps of %a lookup %a",nofsteps,lookup.type,lookup.name)
+ local baseclasses = { }
+ local coverage = { }
+ local used = { }
+ for i=1,nofsteps do
+ local offset = i*10
+ local step = steps[i]
+ for k, v in sortedhash(step.baseclasses) do
+ baseclasses[offset+k] = v
+ end
+ for k, v in next, step.coverage do
+ local tk = coverage[k]
+ if tk then
+ for k, v in next, v do
+ if not tk[k] then
+ tk[k] = v
+ local c = offset + v[1]
+ v[1] = c
+ if not used[c] then
+ used[c] = true
+ end
+ end
+ end
+ else
+ coverage[k] = v
+ local c = offset + v[1]
+ v[1] = c
+ if not used[c] then
+ used[c] = true
+ end
+ end
+ end
+ end
+ for k, v in next, baseclasses do
+ if not used[k] then
+ baseclasses[k] = nil
+ report("discarding not used baseclass %i",k)
+ end
+ end
+ first.baseclasses = baseclasses
+ first.coverage = coverage
+ lookup.nofsteps = 1
+ lookup.steps = { first }
+ return nofsteps - 1
+end
+
+local function nested(old,new)
+ for k, v in next, old do
+ if k == "ligature" then
+ if not new.ligature then
+ new.ligature = v
+ end
+ else
+ local n = new[k]
+ if n then
+ nested(v,n)
+ else
+ new[k] = v
+ end
+ end
+ end
+end
+
+local function mergesteps_4(lookup) -- ligatures
+ local steps = lookup.steps
+ local nofsteps = lookup.nofsteps
+ local first = steps[1]
+ report("merging %a steps of %a lookup %a",nofsteps,lookup.type,lookup.name)
+ local target = first.coverage
+ for i=2,nofsteps do
+ for k, v in next, steps[i].coverage do
+ local tk = target[k]
+ if tk then
+ nested(v,tk)
+ else
+ target[k] = v
+ end
+ end
+ end
+ lookup.nofsteps = 1
+ lookup.steps = { first }
+ return nofsteps - 1
+end
+
+local function checkkerns(lookup)
+ local steps = lookup.steps
+ local nofsteps = lookup.nofsteps
+ for i=1,nofsteps do
+ local step = steps[i]
+ if step.format == "pair" then
+ local coverage = step.coverage
+ local kerns = true
+ for g1, d1 in next, coverage do
+ if d1[1] ~= 0 or d1[2] ~= 0 or d1[4] ~= 0 then
+ kerns = false
+ break
+ end
+ end
+ if kerns then
+ report("turning pairs of step %a of %a lookup %a into kerns",i,lookup.type,lookup.name)
+ for g1, d1 in next, coverage do
+ coverage[g1] = d1[3]
+ end
+ step.format = "kern"
+ end
+ end
+ end
+end
+
+local function checkpairs(lookup)
+ local steps = lookup.steps
+ local nofsteps = lookup.nofsteps
+ local kerned = 0
+ for i=1,nofsteps do
+ local step = steps[i]
+ if step.format == "pair" then
+ local coverage = step.coverage
+ local kerns = true
+ for g1, d1 in next, coverage do
+ for g2, d2 in next, d1 do
+ if d2[2] then
+ kerns = false
+ break
+ else
+ local v = d2[1]
+ if v[1] ~= 0 or v[2] ~= 0 or v[4] ~= 0 then
+ kerns = false
+ break
+ end
+ end
+ end
+ end
+ if kerns then
+ report("turning pairs of step %a of %a lookup %a into kerns",i,lookup.type,lookup.name)
+ for g1, d1 in next, coverage do
+ for g2, d2 in next, d1 do
+ d1[g2] = d2[1][3]
+ end
+ end
+ step.format = "kern"
+ kerned = kerned + 1
+ end
+ end
+ end
+ return kerned
+end
+
+function readers.compact(data)
+ if not data or data.compacted then
+ return
+ else
+ data.compacted = true
+ end
+ local resources = data.resources
+ local merged = 0
+ local kerned = 0
+ local allsteps = 0
+ local function compact(what)
+ local lookups = resources[what]
+ if lookups then
+ for i=1,#lookups do
+ local lookup = lookups[i]
+ local nofsteps = lookup.nofsteps
+ allsteps = allsteps + nofsteps
+ if nofsteps > 1 then
+ local kind = lookup.type
+ if kind == "gsub_single" or kind == "gsub_alternate" or kind == "gsub_multiple" then
+ merged = merged + mergesteps_1(lookup)
+ elseif kind == "gsub_ligature" then
+ merged = merged + mergesteps_4(lookup)
+ elseif kind == "gpos_single" then
+ merged = merged + mergesteps_1(lookup,true)
+ checkkerns(lookup)
+ elseif kind == "gpos_pair" then
+ merged = merged + mergesteps_2(lookup,true)
+ kerned = kerned + checkpairs(lookup)
+ elseif kind == "gpos_cursive" then
+ merged = merged + mergesteps_2(lookup)
+ elseif kind == "gpos_mark2mark" or kind == "gpos_mark2base" or kind == "gpos_mark2ligature" then
+ merged = merged + mergesteps_3(lookup)
+ end
+ end
+ end
+ else
+ report("no lookups in %a",what)
+ end
+ end
+ compact("sequences")
+ compact("sublookups")
+ if merged > 0 then
+ report("%i steps of %i removed due to merging",merged,allsteps)
+ end
+ if kerned > 0 then
+ report("%i steps of %i steps turned from pairs into kerns",kerned,allsteps)
+ end
+end
+
+function readers.expand(data)
+ if not data or data.expanded then
+ return
+ else
+ data.expanded = true
+ end
+ local resources = data.resources
+ local sublookups = resources.sublookups
+ local sequences = resources.sequences -- were one level up
+ local markclasses = resources.markclasses
+ local descriptions = data.descriptions
+ if descriptions then
+ local defaultwidth = resources.defaultwidth or 0
+ local defaultheight = resources.defaultheight or 0
+ local defaultdepth = resources.defaultdepth or 0
+ local basename = trace_markwidth and file.basename(resources.filename)
+ for u, d in next, descriptions do
+ local bb = d.boundingbox
+ local wd = d.width
+ if not wd then
+ -- or bb?
+ d.width = defaultwidth
+ elseif trace_markwidth and wd ~= 0 and d.class == "mark" then
+ report("mark %a with width %b found in %a",d.name or "<noname>",wd,basename)
+ end
+ if bb then
+ local ht = bb[4]
+ local dp = -bb[2]
+ if ht == 0 or ht < 0 then
+ -- not set
+ else
+ d.height = ht
+ end
+ if dp == 0 or dp < 0 then
+ -- not set
+ else
+ d.depth = dp
+ end
+ end
+ end
+ end
+ local function expandlookups(sequences)
+ if sequences then
+ -- we also need to do sublookups
+ for i=1,#sequences do
+ local sequence = sequences[i]
+ local steps = sequence.steps
+ if steps then
+ local kind = sequence.type
+ local markclass = sequence.markclass
+ if markclass then
+ if not markclasses then
+ report_warning("missing markclasses")
+ sequence.markclass = false
+ else
+ sequence.markclass = markclasses[markclass]
+ end
+ end
+ for i=1,sequence.nofsteps do
+ local step = steps[i]
+ local baseclasses = step.baseclasses
+ if baseclasses then
+ local coverage = step.coverage
+ for k, v in next, coverage do
+ v[1] = baseclasses[v[1]] -- slot 1 is a placeholder
+ end
+ elseif kind == "gpos_cursive" then
+ local coverage = step.coverage
+ for k, v in next, coverage do
+ v[1] = coverage -- slot 1 is a placeholder
+ end
+ end
+ local rules = step.rules
+ if rules then
+ local rulehash = { }
+ local rulesize = 0
+ local coverage = { }
+ local lookuptype = sequence.type
+ step.coverage = coverage -- combined hits
+ for nofrules=1,#rules do
+ local rule = rules[nofrules]
+ local current = rule.current
+ local before = rule.before
+ local after = rule.after
+ local replacements = rule.replacements or false
+ local sequence = { }
+ local nofsequences = 0
+ if before then
+ for n=1,#before do
+ nofsequences = nofsequences + 1
+ sequence[nofsequences] = before[n]
+ end
+ end
+ local start = nofsequences + 1
+ for n=1,#current do
+ nofsequences = nofsequences + 1
+ sequence[nofsequences] = current[n]
+ end
+ local stop = nofsequences
+ if after then
+ for n=1,#after do
+ nofsequences = nofsequences + 1
+ sequence[nofsequences] = after[n]
+ end
+ end
+ local lookups = rule.lookups or false
+ local subtype = nil
+ if lookups then
+ for k, v in next, lookups do
+ local lookup = sublookups[v]
+ if lookup then
+ lookups[k] = lookup
+ if not subtype then
+ subtype = lookup.type
+ end
+ else
+ -- already expanded
+ end
+ end
+ end
+ if sequence[1] then -- we merge coverage into one
+ rulesize = rulesize + 1
+ rulehash[rulesize] = {
+ nofrules, -- 1
+ lookuptype, -- 2
+ sequence, -- 3
+ start, -- 4
+ stop, -- 5
+ lookups, -- 6 (6/7 also signal of what to do)
+ replacements, -- 7
+ subtype, -- 8
+ }
+ for unic in next, sequence[start] do
+ local cu = coverage[unic]
+ if not cu then
+ coverage[unic] = rulehash -- can now be done cleaner i think
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ expandlookups(sequences)
+ expandlookups(sublookups)
+end
diff --git a/Master/texmf-dist/tex/context/base/font-pat.lua b/Master/texmf-dist/tex/context/base/mkiv/font-pat.lua
index 04985379677..357b12ea0a0 100644
--- a/Master/texmf-dist/tex/context/base/font-pat.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-pat.lua
@@ -11,29 +11,12 @@ if not modules then modules = { } end modules ['font-pat'] = {
local match, lower = string.match, string.lower
--- Older versions of latin modern didn't have the designsize set so for them we
--- get it from the name reporter moved to elsewhere.
-
local fonts = fonts
local otf = fonts.handlers.otf
local patches = otf.enhancers.patches
local register = patches.register
local report = patches.report
--- local function patch(data,filename)
--- if not metadata.design_size or metadata.design_size == 0 then
--- local ds = match(file.basename(lower(filename)),"(%d+)")
--- if ds then
--- report("font %a has design size %a",filename,ds)
--- metadata.design_size = tonumber(ds) * 10
--- end
--- end
--- end
---
--- register("after","migrate metadata","^lmroman", patch)
--- register("after","migrate metadata","^lmsans", patch)
--- register("after","migrate metadata","^lmtypewriter",patch)
-
-- For some reason (either it's a bug in the font, or it's a problem in the
-- library) the palatino arabic fonts don't have the mkmk features properly
-- set up.
diff --git a/Master/texmf-dist/tex/context/base/font-pre.mkiv b/Master/texmf-dist/tex/context/base/mkiv/font-pre.mkiv
index 157b4585a3f..3b3a76d9c0e 100644
--- a/Master/texmf-dist/tex/context/base/font-pre.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-pre.mkiv
@@ -25,6 +25,8 @@
[always]
[mode=node, % we had 'auto', but let's try 'node' for a while and see what the impact is
script=auto, % on speed; 'base' just doesn't play well with dynamics; some day we can even
+ autoscript=position,
+ autolanguage=position,
kern=yes, % consider skipping the base passes when no base mode is used
mark=yes,
mkmk=yes,
@@ -54,18 +56,22 @@
\definefontfeature
[inlinenumbers]
- [lnum=yes,
+ [pnum=yes,
tnum=no]
\definefontfeature
[tabularnumbers]
[tnum=yes,
- lnum=no]
+ pnum=no]
\definefontfeature
[oldstylenumbers]
[onum=yes]
+\definefontfeature
+ [zero]
+ [zero=yes]
+
% \definefontfeature
% [newstyle]
% [onum=no]
@@ -102,6 +108,7 @@
\definefontfeature
[semitic-complete]
[mode=node,analyze=yes,language=dflt,ccmp=yes,
+ autoscript=position,autolanguage=position,
init=yes,medi=yes,fina=yes,isol=yes,
mark=yes,mkmk=yes,kern=yes,curs=yes,
liga=yes,dlig=yes,rlig=yes,clig=yes,calt=yes]
@@ -109,6 +116,7 @@
\definefontfeature
[semitic-simple]
[mode=node,analyze=yes,language=dflt,ccmp=yes,
+ autoscript=position,autolanguage=position,
init=yes,medi=yes,fina=yes,isol=yes,
mark=yes,mkmk=yes,kern=yes,curs=yes,
rlig=yes,calt=yes]
@@ -237,9 +245,8 @@
tlig=yes,
trep=yes,
mathalternates=yes,
- mathitalics=yes,
+ mathitalics=yes, % we pass them
% mathgaps=yes,
- % nomathitalics=yes, % don't pass to tex, might become default
language=dflt,
script=math]
@@ -248,11 +255,18 @@
[mathematics]
[]
+% \definefontfeature
+% [mathematics-r2l]
+% [mathematics]
+% [language=ara,
+% rtlm=yes,
+% locl=yes]
+
\definefontfeature
[mathematics-r2l]
[mathematics]
- [language=ara,
- rtlm=yes,
+ [rtlm=yes,
+ %dtls=yes,
locl=yes]
\definefontfeature[virtualmath] [mathematics] % downward compatibility
@@ -378,7 +392,7 @@
\s!b=1.440,
\s!c=1.728,
\s!d=2.074,
- *=\currentfontscale, % wildcard
+ *=\font_currentfontscale, % wildcard
\s!x=0.8,
\s!xx=0.6,
\v!big=1.2,
@@ -527,6 +541,7 @@
\definefontstyle [\v!teletype,\v!type,\v!mono] [\s!tt]
\definefontstyle [\v!handwritten] [\s!hw]
\definefontstyle [\v!calligraphic] [\s!cg]
+\definefontstyle [\v!math,\v!mathematics] [\s!mm]
\definefontalternative[\s!tf]
\definefontalternative[\s!bf]
@@ -544,7 +559,6 @@
\definealternativestyle [\v!bold] [\bf] []
\definealternativestyle [\v!type] [\tt] []
\definealternativestyle [\v!mono] [\tt] []
-\definealternativestyle [\v!monobold] [\tt\bf] []
\definealternativestyle [\v!slanted] [\sl] []
\definealternativestyle [\v!italic] [\it] []
\definealternativestyle [\v!boldslanted,\v!slantedbold] [\bs] []
@@ -553,7 +567,7 @@
\definealternativestyle [\v!small,\v!smallnormal] [\setsmallbodyfont\tf] []
\definealternativestyle [\v!smallbold] [\setsmallbodyfont\bf] []
\definealternativestyle [\v!smalltype] [\setsmallbodyfont\tt] []
-\definealternativestyle [\v!smallslanted] [\setsmallbodyfont\sl] []
+\definealternativestyle [\v!smallitalic,\v!smallslanted] [\setsmallbodyfont\sl] []
\definealternativestyle [\v!smallboldslanted,\v!smallslantedbold] [\setsmallbodyfont\bs] []
\definealternativestyle [\v!smallbolditalic,\v!smallitalicbold] [\setsmallbodyfont\bi] []
@@ -572,6 +586,13 @@
\definealternativestyle [\v!mononormal] [\tt\tf] []
\definealternativestyle [\v!monobold] [\tt\bf] []
+% For Alan:
+
+\definealternativestyle
+ [\v!camel]
+ [{\setcharactercasing[\v!camel]}]
+ [{\setcharactercasing[\v!camel]}]
+
% % maybe we need interface neutral as well (for use in cld):
%
% \letcscsname\mediaeval \csname\v!mediaeval \endcsname
@@ -665,9 +686,11 @@
%D don't want huge switches to the main bodyfont and style, so
%D here too we use a direct method.
-\let\infofont\relax % satisfy dep checker
+\let\infofont \relax % satisfy dep checker
+\let\infofontbold\relax % satisfy dep checker
-\definefont[infofont][dejavusansmono at 6pt] % todo \the\everybodyfont
+\definefont[infofont] [dejavusansmono at 6pt] % todo \the\everybodyfont
+\definefont[infofontbold][dejavusansmonobold at 6pt] % todo \the\everybodyfont
%D Optimization (later we overload in math):
diff --git a/Master/texmf-dist/tex/context/base/font-run.mkiv b/Master/texmf-dist/tex/context/base/mkiv/font-run.mkiv
index 1b8843b94c5..e9a6f9ddb7b 100644
--- a/Master/texmf-dist/tex/context/base/font-run.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-run.mkiv
@@ -13,14 +13,14 @@
%C details.
%D [This code is hooked into the core macros and saves some format
-%D space. It needs a cleanup.]
+%D space. It needs a cleanup as it's real old derioved \MKII\ code]
\unprotect
-\gdef\@@onlyenglish#1%
+\gdef\font_show_only_english#1%
{\blank{\tttf \type {#1} is only available in the english interface}\blank}
-\gdef\dosetshowfonttitle#1%
+\gdef\font_show_title#1%
{\tabskip\zeropoint
\parindent\zeropoint
\setlocalhsize
@@ -32,12 +32,12 @@
{\edef\title{[\fontclass]\space\title}}}}
\unexpanded\gdef\showbodyfont
- {\dosingleempty\doshowbodyfont}
+ {\dosingleempty\font_show_bodyfont}
-\gdef\doshowbodyfont[#1]%
+\gdef\font_show_bodyfont[#1]%
{\ifinsidefloat\else\startbaselinecorrection\fi
\vbox
- {\dosetshowfonttitle{#1}%
+ {\font_show_title{#1}%
\def\bigstrut##1##2%
{\hbox{\vrule
\s!height##1\strutht
@@ -61,7 +61,7 @@
\tabskip=\zeropoint\cr
\noalign{\hrule}
&\multispan{29}{\vrule\hfil\tttf\strut\title\hfil
- \llap{\string\mr\hbox to 1em{\hss:\hss}$\mr \languageparameter\c!text$\quad}\vrule}\cr
+ \llap{\string\mr\hpack to \emwidth{\hss:\hss}\normalstartimath\mr\languageparameter\c!text\normalstopimath\quad}\vrule}\cr
\noalign{\hrule}\next{}{\tt\string}{}
\noalign{\hrule}\next{\tt\string\rm}\rm{\languageparameter\c!text}
\noalign{\hrule}\next{\tt\string\ss}\ss{\languageparameter\c!text}
@@ -70,12 +70,12 @@
\ifinsidefloat\else\stopbaselinecorrection\fi}
\unexpanded\gdef\showbodyfontenvironment
- {\dosingleempty\doshowbodyfontenvironment}
+ {\dosingleempty\font_show_bodyfont_environment}
-\gdef\doshowbodyfontenvironment[#1]%
+\gdef\font_show_bodyfont_environment[#1]%
{\ifinsidefloat\else\startbaselinecorrection\fi
\vbox
- {\dosetshowfonttitle{#1}%
+ {\font_show_title{#1}%
\def\next##1%
{&&\bodyfontsizevariable{##1}\s!text
&&\bodyfontsizevariable{##1}\s!script
@@ -105,133 +105,151 @@
\ifinsidefloat\else\stopbaselinecorrection\fi}
\unexpanded\gdef\showfont
- {\dodoubleempty\doshowfont}
+ {\dodoubleempty\font_show_font}
-\gdef\doshowfont[#1][#2]%
+\gdef\font_show_font[#1][#2]% doing this in lua is much faster
{\bgroup
\iffirstargument
\definefont[\s!dummy][#1]\dummy
\fi
\doifelsenothing{#2}
- {\dodoshowfont{#1}{0}}
+ {\font_show_font_indeed{#1}\zerocount}
{\doifelse{#2}\v!all
- {\dostepwiserecurse{0}{255}{1}
- {\donefalse
- \let\charplane\recurselevel
- \dostepwiserecurse{0}{255}{1}
- {\iffontchar\font\numexpr\charplane*256+\recurselevel\relax
- \donetrue
+ {\dostepwiserecurse\zerocount{255}\plusone
+ {\scratchcounterone \recurselevel
+ \scratchcountertwo \numexpr\scratchcounterone*256\relax
+ \scratchcounterthree\numexpr\scratchcountertwo+255\relax
+ \doloop
+ {\iffontchar\font\scratchcountertwo
+ \font_show_font_indeed{#1}\scratchcounterone
\exitloop
- \fi}%
- \ifdone
- \dodoshowfont{#1}\charplane
- \fi}}
- {\processcommalist[#2]{\dodoshowfont{#1}}}}%
+ \else\ifnum\scratchcountertwo=\scratchcounterthree
+ \exitloop
+ \else
+ \advance\scratchcountertwo\plusone
+ \fi\fi}}}
+ {\processcommalist[#2]{\font_show_font_indeed{#1}}}}%
\egroup}
-\gdef\dodoshowfont#1#2%
+\gdef\font_show_font_indeed#1#2% made some 50% faster but still slow
{\bgroup
- \edef\charplane{\number#2}%
\iffirstargument
-% \definefont[\s!dummy][#1]\dummy
- \else\ifdim2.5em>.05\hsize \tx
- \ifdim2.5em>.05\hsize \txx
+ % \definefont[\s!dummy][#1]\dummy
+ \else\ifdim2.5\emwidth>.05\hsize \tx
+ \ifdim2.5\emwidth>.05\hsize \txx
\fi\fi\fi
\ifinsidefloat\else\startbaselinecorrection\fi
\vbox\bgroup
+ \scratchdimenone 2.5\emwidth
+ \scratchdimentwo 2.4\emwidth
+ \scratchdimenthree2.3\emwidth
+ \edef\charplane{\number#2}%
\forgetall
\startoverlay % easier in cld
{\vbox
- {\tf \setstrut \dummy
+ {\tf
+ \setstrut
+ \dummy
\offinterlineskip
- \dostepwiserecurse{0}{15}{1}
- {\let\row\recurselevel
- \hbox
- {\red
- \dostepwiserecurse{0}{15}{1}
- {\let\col\recurselevel
- \@EA\scratchcounter\string"\hexnumber\row\hexnumber\col\relax
- \edef\rowcol{\the\scratchcounter}%
- \iffontchar\font\scratchcounter
- \setbox\scratchbox\ruledhbox{\black\char\numexpr\charplane*256+\scratchcounter\relax}%
- \ifdim\wd\scratchbox>\zeropoint
- \donetrue \else \donefalse
- \fi
+ \unexpanded\def\wrapbox##1%
+ {\vpack to \scratchdimenone
+ {\vss
+ \hpack to \scratchdimenone
+ {\dummy
+ \ifdim\interwordspace=\zeropoint
+ \setbox##1\hpack
+ {\raise.5\dp##1\hpack
+ {\lower.5\ht##1\copy##1}}%
+ \ht##1\zeropoint
+ \dp##1\zeropoint
\else
- \setbox\scratchbox\hbox{\gray\vrule\s!width1ex\s!height.5ex\s!depth.5ex}%
+ \ht##1\strutht
+ \dp##1\strutdp
+ \strut
\fi
- \startoverlay
- {\tf\vbox to 2.5em
- {\vss
- \hbox to 2.5em
- {\dummy\ifdim\interwordspace=\zeropoint
- \setbox\scratchbox\hbox
- {\raise.5\dp\scratchbox\hbox
- {\lower.5\ht\scratchbox\copy\scratchbox}}%
- \ht\scratchbox\zeropoint
- \dp\scratchbox\zeropoint
- \else
- \ht\scratchbox\strutht
- \dp\scratchbox\strutdp
- \strut
- \fi
- \hss\copy\scratchbox\hss}
- \vss}}
- {\tf\vbox to 2.3em
- {\ifdone
- \hsize2.4em
- \blue
- \tinyfont
- \hfill\number\rowcol
- \vfill
- \octnumber\rowcol\hfill\lchexnumbers\rowcol
- \par
- \fi}}
- \stopoverlay}}}
+ \hss\copy##1\hss}
+ \vss}}%
+ \unexpanded\def\textbox##1%
+ {\vpack to \scratchdimentwo
+ {\hsize\scratchdimenthree
+ ##1%
+ \par}}%
+ \unexpanded\def\scratchnum
+ {\blue
+ \tinyfont
+ \hfill
+ \number\scratchcounter
+ \vfill
+ \octnumber\scratchcounter
+ \hfill
+ \lchexnumbers\scratchcounter}%
+ \setbox\scratchboxone\hpack{\tf\textbox{}}%
+ \setbox\scratchboxtwo\hpack{\tf\gray\vrule\s!width\exheight\s!height.5\exheight\s!depth.5\exheight}%
+ \setbox\scratchboxtwo\wrapbox\scratchboxtwo
+ \setbox\scratchboxthree\hpack
+ {\startoverlay
+ {\box\scratchboxtwo}
+ {\box\scratchboxone}
+ \stopoverlay}%
+ \dostepwiserecurse\zerocount{15}\plusone
+ {\scratchcounterone\recurselevel
+ \hpack
+ {\dostepwiserecurse\zerocount{15}\plusone
+ {\scratchcountertwo \recurselevel
+ \scratchcounter \numexpr\scratchcounterone*16+\scratchcountertwo\relax
+ \scratchcounterthree\numexpr\charplane*256+\scratchcounter\relax
+ \iffontchar\font\scratchcounterthree
+ \setbox\scratchbox\ruledhpack{\char\scratchcounterthree}%
+ \tf
+ \startoverlay
+ {\wrapbox\scratchbox}
+ {\textbox\scratchnum}
+ \stopoverlay
+ \else
+ \copy\scratchboxthree
+ \fi}}}%
\par}}
{\tf\basegrid[\c!nx=16,\c!ny=16,\c!dx=2.5,\c!dy=2.5,\c!unit=em]}
\stopoverlay
\nointerlineskip
- \vskip2pt
+ \vskip2\points
% the \noexpand before \blank is needed for non etex
- \edef\ascii{name: {\noexpand\black\fontname\font}}
- \def\do##1##2{\ifx##1\undefined\else\ifx##1\empty\else##2\fi\fi}%
\edef\theshowfontspecs{name: {\noexpand\black\fontname\font}\quad plane: \charplane\enspace"\hexnumber\charplane}%
\tf % also sets em
- \hbox to 40em{\blue\hfill\tinyfont\setstrut\strut\theshowfontspecs}
+ \hbox to 40\emwidth{\blue\hfill\tinyfont\setstrut\strut\theshowfontspecs}
\egroup
\ifinsidefloat\else\stopbaselinecorrection\fi
\egroup}
% \showfontstyle[modern][rm][tf][all] % #2, #3 and #4 can be 'all'
-\unexpanded\gdef\showfontstyle {\dodoubleempty \dodoshowfontstyle}
-\unexpanded\gdef\redoshowfontstyle {\dotripleempty \dododoshowfontstyle}
-\unexpanded\gdef\redodoshowfontstyle{\doquadrupleempty\dodododoshowfontstyle}
+\unexpanded\gdef\showfontstyle {\dodoubleempty \font_show_style}
+\unexpanded\gdef\font_show_style_a{\dotripleempty \font_show_style_b}
+\unexpanded\gdef\font_show_style_c{\doquadrupleempty\font_show_style_d}
% no lists any more, so no 'all' any longer
-\gdef\dodoshowfontstyle[#1][#2]%
+\gdef\font_show_style[#1][#2]%
{\doifelsenothing{#2}
- {\redoshowfontstyle[#1][\s!rm,\s!ss,\s!tt,\s!mm]}
- {\redoshowfontstyle[#1][#2]}}
+ {\font_show_style_a[#1][\s!rm,\s!ss,\s!tt,\s!mm]}
+ {\font_show_style_a[#1][#2]}}
-\gdef\dododoshowfontstyle[#1][#2][#3]%
+\gdef\font_show_style_b[#1][#2][#3]%
{\doifelsenothing{#3}
- {\redodoshowfontstyle[#1][#2][\s!tf,\s!bf,\s!it,\s!sl,\s!bs,\s!bi]}
- {\redodoshowfontstyle[#1][#2][#3]}}
+ {\font_show_style_c[#1][#2][\s!tf,\s!bf,\s!it,\s!sl,\s!bs,\s!bi]}
+ {\font_show_style_c[#1][#2][#3]}}
-\gdef\dodododoshowfontstyle[#1][#2][#3][#4]%
- {\doshowfontstyleindeed[#1][#2][#3][#4]}
+\gdef\font_show_style_d[#1][#2][#3][#4]%
+ {\font_show_style_e[#1][#2][#3][#4]}
% so far
-\gdef\doshowfontstyleindeed[#1][#2][#3][#4]%
+\gdef\font_show_style_e[#1][#2][#3][#4]%
{\bgroup
\raggedright
\switchtobodyfont[#1]
\def\dododocommand##1%
- {\dostepwiserecurse{0}{255}{1}
+ {\dostepwiserecurse\zerocount{255}\plusone
{\scratchcounter\numexpr##1*256+\recurselevel\relax
\iffontchar\font\scratchcounter\relax
\char\scratchcounter
@@ -241,9 +259,9 @@
{\starttextrule{\tttf #1 ##1 ##2}
\nobreak\getvalue{##2}%
\doifelsenothing{#4}
- {\dododocommand{0}}
+ {\dododocommand\zerocount}
{\doifelse{#4}\v!all
- {\dostepwiserecurse{0}{255}{1}{\expanded{\dododocommand{\recurselevel}}}}
+ {\dostepwiserecurse\zerocount{255}\plusone{\expanded{\dododocommand{\recurselevel}}}}
{\processcommalist[#4]{\dododocommand}}}%
\par \nobreak
\stoptextrule}
@@ -256,89 +274,105 @@
\unexpanded\gdef\showligature#1%
{\hbox{\type{#1}\enspace\red\ruledhbox{\black#1}}}
-\unexpanded\gdef\showligatures[#1]%
+\unexpanded\gdef\showligatures[#1]% we keep it around for compatibility reasons
{\ifx\starttabulate\undefined
- \@@onlyenglish\showligatures
+ \font_show_only_english\showligatures
\else
\bgroup
- \def\show##1{\hbox{\red\ruledhbox{\black##1}}}%
- \definefont[\s!dummy][#1]\dummy
- \starttabulate[|*{9}{c|}]
- \NC\type{ff}\NC\type{fi}\NC\type{fl}\NC\type{ffi}\NC\type{ffl}\NC
- \type{``}\NC\type{''}\NC\type{--}\NC\type{---}\NC\NR
- \NC\show{ff}\NC\show{fi}\NC\show{fl}\NC\show{ffi}\NC\show{ffl}\NC
- \show{``}\NC\show{''}\NC\show{--}\NC\show{---}\NC\NR
+ \def\font_show_ligature##1{\hbox{\red\ruledhbox{\black##1}}}%
+ \definedfont[#1*default]%
+ %starttabulate[|*{9}{c|}]
+ \starttabulate[|*{7}{c|}]
+ \NC\type{ff}
+ \NC\type{fi}
+ \NC\type{fl}
+ \NC\type{ffi}
+ \NC\type{ffl}
+ %NC\type{``}
+ %NC\type{''}
+ \NC\type{--}
+ \NC\type{---}
+ \NC\NR
+ \NC\font_show_ligature{ff}
+ \NC\font_show_ligature{fi}
+ \NC\font_show_ligature{fl}
+ \NC\font_show_ligature{ffi}
+ \NC\font_show_ligature{ffl}
+ %NC\font_show_ligature{``}
+ %NC\font_show_ligature{''}
+ \NC\font_show_ligature{--}
+ \NC\font_show_ligature{---}
+ \NC\NR
\stoptabulate
\egroup
\fi}
\unexpanded\gdef\showfontstrip
- {\dosingleempty\doshowfontstrip}
+ {\dosingleempty\font_show_strip}
-\gdef\doshowfontstrip[#1]%
+\gdef\font_show_strip[#1]%
{\ifx\starttabulate\undefined
- \@@onlyenglish\showfontstrip
+ \font_show_only_english\showfontstrip
\else
\bgroup
- \def\dofontstripa##1##2%
+ \def\font_show_strip_a##1##2%
{\tttf\string##1}
- \def\dofontstripb##1##2%
+ \def\font_show_strip_b##1##2%
{\ruledhbox{\switchtobodyfont[#1]##1{##2}}}
- \def\dofontstripc##1##2%
+ \def\font_show_strip_c##1##2%
{\setbox\scratchbox\hbox{\switchtobodyfont[#1]##1{##2}}%
\tt\tfx\the\ht\scratchbox}%
- \def\dofontstripd##1##2%
+ \def\font_show_strip_d##1##2%
{\setbox\scratchbox\hbox{\switchtobodyfont[#1]##1{##2}}%
\tt\tfx\the\wd\scratchbox}%
- \def\fontstrip##1##2##3%
+ \def\font_show_strip_indeed##1##2##3%
{\NC##2\rm{##3}\NC
##2\ss{##3}\NC
##2\tt{##3}\NC
##2\mathematics{##3}\NC
\tttf##1\NR}
\starttabulate[|c|c|c|c|c|]
- \fontstrip\relax\dofontstripa\empty
+ \font_show_strip_indeed\relax\font_show_strip_a\empty
\TB
- \fontstrip\relax\dofontstripb{xxxx}
- \fontstrip\relax\dofontstripb{12345}
- \fontstrip\relax\dofontstripb{(Agw)}
+ \font_show_strip_indeed\relax\font_show_strip_b{xxxx}
+ \font_show_strip_indeed\relax\font_show_strip_b{12345}
+ \font_show_strip_indeed\relax\font_show_strip_b{(Agw)}
\TB
- \fontstrip{(x height)}\dofontstripc{x}
- \fontstrip{(m width)}\dofontstripd{m}
+ \font_show_strip_indeed{(x height)}\font_show_strip_c{x}
+ \font_show_strip_indeed{(m width)}\font_show_strip_d{m}
\stoptabulate
\egroup
\fi}
\ifdefined\databox \else \newbox\databox \fi
-\unexpanded\gdef\testminimalbaseline#1% to be used in a tabulate
+\unexpanded\gdef\testminimalbaseline#1% to be used in a 10 column tabulate
{\setbox\databox\ruledhbox{#1}%
- \scratchdimen\ht\databox
- \advance\scratchdimen\dp\databox
- \scratchtoks{#1}%
- \expanded
- {\NC \ruledhbox{\the\scratchtoks}
- \noexpand \NC ->
- \noexpand \NC \the\scratchdimen
- \noexpand \NC =
- \noexpand \NC \the\ht\databox
- \noexpand \NC +
- \noexpand \NC \the\dp\databox
- \noexpand \NC \ifdim\scratchdimen<\baselineskip <
- \else\ifdim\scratchdimen=\baselineskip =
- \else > \fi\fi
- \noexpand \NC \the\baselineskip
- \noexpand \NC (\ifdim\scratchdimen>\baselineskip not \fi ok)
- \noexpand \NC \noexpand \NR }}
+ \scratchdimen\htdp\databox
+ \normalexpanded {
+ \NC \ruledhbox{#1}%
+ \NC ->
+ \NC \the\htdp\databox
+ \NC =
+ \NC \the\ht\databox
+ \NC +
+ \NC \the\dp\databox
+ \NC \ifdim\scratchdimen<\baselineskip <
+ \else\ifdim\scratchdimen=\baselineskip =
+ \else > \fi\fi
+ \NC \the\baselineskip
+ \NC (\ifdim\scratchdimen>\baselineskip not \fi ok)
+ \NC \NR}
+ }
\unexpanded\gdef\showminimalbaseline
{\ifx\starttabulate\undefined
- \@@onlyenglish\showminimalbaseline
+ \font_show_only_english\showminimalbaseline
\else
- \starttabulate[||T|T|T|T|T|T|T|T|T|]
- \testminimalbaseline{\hbox to 1em{\hss\showstruts\strut\hss}}%
- \testminimalbaseline{(/)}%
- \testminimalbaseline{$\frac{1}{2}x\normalsuperscript2\normalsubscript3$}
+ \starttabulate[|l|T|T|T|T|T|T|T|T|T|]
+ \testminimalbaseline{\hbox to \emwidth{\hss\showstruts\strut\hss}}%
+ \testminimalbaseline{(/)}%
+ \testminimalbaseline{\normalstartimath\frac{1}{2}x\normalsuperscript2\normalsubscript3\normalstopimath}
\stoptabulate
\fi}
diff --git a/Master/texmf-dist/tex/context/base/font-sel.lua b/Master/texmf-dist/tex/context/base/mkiv/font-sel.lua
index c3431a213ca..c3431a213ca 100644
--- a/Master/texmf-dist/tex/context/base/font-sel.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-sel.lua
diff --git a/Master/texmf-dist/tex/context/base/font-sel.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-sel.mkvi
index 820d211eb69..eb45ea03386 100644
--- a/Master/texmf-dist/tex/context/base/font-sel.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-sel.mkvi
@@ -108,7 +108,7 @@
\def\selectfont_preset_process#name%
{\ifcsname\??selectfontpreset#name\endcsname
- \csname\??selectfontpreset#name\endcsname
+ \lastnamedcs
\else
% unknown preset
\fi}
diff --git a/Master/texmf-dist/tex/context/base/font-set.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-set.mkvi
index b29545ace3f..b29545ace3f 100644
--- a/Master/texmf-dist/tex/context/base/font-set.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-set.mkvi
diff --git a/Master/texmf-dist/tex/context/base/font-sol.lua b/Master/texmf-dist/tex/context/base/mkiv/font-sol.lua
index 0761724f1f2..8d45552a5e9 100644
--- a/Master/texmf-dist/tex/context/base/font-sol.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-sol.lua
@@ -57,17 +57,20 @@ local tonut = nuts.tonut
local tonode = nuts.tonode
local getfield = nuts.getfield
-local setfield = nuts.setfield
local getnext = nuts.getnext
local getprev = nuts.getprev
local getid = nuts.getid
local getattr = nuts.getattr
-local setattr = nuts.setattr
local getfont = nuts.getfont
local getsubtype = nuts.getsubtype
-local getchar = nuts.getchar
local getlist = nuts.getlist
+local setfield = nuts.setfield
+local setattr = nuts.setattr
+local setlink = nuts.setlink
+local setnext = nuts.setnext
+local setlist = nuts.setlist
+
local find_node_tail = nuts.tail
local free_node = nuts.free
local free_nodelist = nuts.flush_list
@@ -95,12 +98,13 @@ local glyph_code = nodecodes.glyph
local disc_code = nodecodes.disc
local kern_code = nodecodes.kern
local hlist_code = nodecodes.hlist
+local dir_code = nodecodes.dir
+local localpar_code = nodecodes.localpar
+
local whatsit_code = nodecodes.whatsit
local fontkern_code = kerncodes.fontkern
-local localpar_code = whatsitcodes.localpar
-local dir_code = whatsitcodes.dir
local userdefined_code = whatsitcodes.userdefined
local nodepool = nuts.pool
@@ -366,8 +370,7 @@ function splitters.split(head)
end
if rlmode == "TRT" or rlmode == "+TRT" then
local dirnode = new_textdir("+TRT")
- setfield(list,"prev",dirnode)
- setfield(dirnode,"next",list)
+ setlink(dirnode,list)
list = dirnode
end
local c = {
@@ -414,14 +417,11 @@ function splitters.split(head)
else
start, stop = nil, nil
end
- elseif id == whatsit_code then
+ elseif id == dir_code or id == localpar_code then
if start then
flush()
end
- local subtype = getsubtype(current)
- if subtype == dir_code or subtype == localpar_code then
- rlmode = getfield(current,"dir")
- end
+ rlmode = getfield(current,"dir")
else
if start then
flush()
@@ -614,11 +614,9 @@ first = tonut(first)
-- replace [u]h->t by [u]first->last
local prev = getprev(h)
local next = getnext(t)
- setfield(prev,"next",first)
- setfield(first,"prev",prev)
+ setlink(prev,first)
if next then
- setfield(last,"next",next)
- setfield(next,"prev",last)
+ setlink(last,next)
end
-- check new pack
local temp, b = repack_hlist(list,width,'exactly',listdir)
@@ -627,22 +625,20 @@ first = tonut(first)
report_optimizers("line %a, badness before %a, after %a, criterium %a, verdict %a",line,badness,b,criterium,"quit")
end
-- remove last insert
- setfield(prev,"next",h)
- setfield(h,"prev",prev)
+ setlink(prev,h)
if next then
- setfield(t,"next",next)
- setfield(next,"prev",t)
+ setlink(t,next)
else
- setfield(t,"next",nil)
+ setnext(t)
end
- setfield(last,"next",nil)
+ setnext(last)
free_nodelist(first)
else
if trace_optimize then
report_optimizers("line %a, badness before: %a, after %a, criterium %a, verdict %a",line,badness,b,criterium,"continue")
end
-- free old h->t
- setfield(t,"next",nil)
+ setnext(t)
free_nodelist(h) -- somhow fails
if not encapsulate then
word[2] = first
@@ -763,7 +759,7 @@ function splitters.optimize(head)
-- nasty .. we always assume a prev being there .. future luatex will always have a leftskip set
-- is this assignment ok ? .. needs checking
list = insert_node_before(list,list,new_leftskip(0)) -- new_glue(0)
- setfield(current,"list",list)
+ setlist(current,list)
end
local temp, badness = repack_hlist(list,width,'exactly',dir) -- it would be nice if the badness was stored in the node
if badness > 0 then
@@ -823,7 +819,7 @@ function splitters.optimize(head)
local words = collect_words(list)
for best=lastbest or 1,max do
local temp, done, changes, b = optimize(words,list,best,width,badness,line,set,dir)
- setfield(current,"list",temp)
+ setlist(current,temp)
if trace_optimize then
report_optimizers("line %a, alternative %a, changes %a, badness %a",line,best,changes,b)
end
@@ -842,7 +838,7 @@ function splitters.optimize(head)
end
-- we pack inside the outer hpack and that way keep the original wd/ht/dp as bonus
local list = hpack_nodes(getlist(current),width,'exactly',listdir)
- setfield(current,"list",list)
+ setlist(current,list)
end
for i=1,nc do
local ci = cache[i]
diff --git a/Master/texmf-dist/tex/context/base/font-sol.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-sol.mkvi
index d065b78ea55..d065b78ea55 100644
--- a/Master/texmf-dist/tex/context/base/font-sol.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-sol.mkvi
diff --git a/Master/texmf-dist/tex/context/base/font-sty.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-sty.mkvi
index 5924a30338c..6b2c072e5ff 100644
--- a/Master/texmf-dist/tex/context/base/font-sty.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-sty.mkvi
@@ -77,7 +77,7 @@
\fi}
\def\applyalternativestyle#name% public
- {\ifcsname\??alternativestyles#name\endcsname\csname\??alternativestyles#name\expandafter\endcsname\fi}
+ {\begincsname\??alternativestyles#name\endcsname}
%D Maybe too geneneric, but probably ok is the following. (Maybe one
%D day we will use a dedicated grouped command for styles.)
@@ -150,9 +150,9 @@
\def\font_helpers_do_convert_font
{\edef\m_current_convert_font_dt{\detokenize\expandafter{\m_current_convert_font}}%
\ifcsname\??alternativestyles\m_current_convert_font_dt\endcsname
- \csname\??alternativestyles\m_current_convert_font_dt\expandafter\endcsname
+ \expandafter\lastnamedcs
\else\ifcsname\m_current_convert_font_dt\endcsname
- \csname\m_current_convert_font_dt\expandafter\endcsname
+ \doubleexpandafter\lastnamedcs
\else
\doubleexpandafter\m_current_convert_font
\fi\fi}
@@ -182,16 +182,16 @@
\unexpanded\def\dousestylehashparameter#hash#parameter%
{\ifcsname#hash#parameter\endcsname
- \expandafter\dousestyleparameter\csname#hash#parameter\endcsname
+ \expandafter\dousestyleparameter\lastnamedcs
\fi}
\unexpanded\def\dousecurrentstyleparameter % empty check outside here
{\edef\detokenizedstyleparameter{\detokenize\expandafter{\currentstyleparameter}}%
\settrue\fontattributeisset % reset is done elsewhere
\ifcsname\??alternativestyles\detokenizedstyleparameter\endcsname
- \csname\??alternativestyles\detokenizedstyleparameter\endcsname
+ \lastnamedcs
\else\ifcsname\detokenizedstyleparameter\endcsname
- \csname\detokenizedstyleparameter\endcsname
+ \lastnamedcs
\else
\currentstyleparameter
\fi\fi}
@@ -337,7 +337,7 @@
{\iffirstargument
\setuvalue{#name}{\styleinstance[#name]}%
\def\font_styles_define_style_collection_a#style%
- {\def\font_styles_define_style_collection_b#alternative{\letbeundefined{\??stylecollection#name:#style:#alternative}}%
+ {\def\font_styles_define_style_collection_b#alternative{\undefinevalue{\??stylecollection#name:#style:#alternative}}%
\font_helpers_process_alternative_list\font_styles_define_style_collection_b
\font_styles_define_style_collection_b\s!default}%
\font_helpers_process_style_list\font_styles_define_style_collection_a
@@ -369,7 +369,7 @@
% {\executeifdefined{\??stylecollection#instance::\fontalternative}
% {\getvalue {\??stylecollection#instance::\s!default}}}}}
-\unexpanded\def\styleinstance[#instance]%
+\unexpanded\def\styleinstance[#instance]% maybe \lastnamedcs here too
{\csname\??stylecollection#instance:%
\ifcsname\??stylecollection#instance:\fontstyle:\fontalternative\endcsname
\fontstyle:\fontalternative
diff --git a/Master/texmf-dist/tex/context/base/font-sym.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-sym.mkvi
index a21bea0ba62..c1ffd6361ae 100644
--- a/Master/texmf-dist/tex/context/base/font-sym.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-sym.mkvi
@@ -135,7 +135,7 @@
\def\setscaledstyledsymbolicfont#1#2#3% quite a slowdown, glyphfontfile
{\edef\askedsymbolfont{\truefontname{\glyphfontfile{#3}} at \the\dimexpr#2\dimexpr\currentfontbodyscale\dimexpr#1}%
\ifcsname\??symbolfont\askedsymbolfont\endcsname
- \csname\??symbolfont\askedsymbolfont\endcsname
+ \lastnamedcs
\else
\font_basics_define_symbolic_font
\fi}
@@ -143,7 +143,7 @@
\def\setscaleddirectsymbolicfont#1#2#3% quite a slowdown, glyphfontfile
{\edef\askedsymbolfont{\truefontname{#3} at \the\dimexpr#2\dimexpr\currentfontbodyscale\dimexpr#1}%
\ifcsname\??symbolfont\askedsymbolfont\endcsname
- \csname\??symbolfont\askedsymbolfont\endcsname
+ \lastnamedcs
\else
\font_basics_define_symbolic_font
\fi}
@@ -151,7 +151,7 @@
\def\setstyledsymbolicfont#fontname% quite a slowdown, glyphfontfile
{\edef\askedsymbolfont{\truefontname{\glyphfontfile{#fontname}} at \the\dimexpr\currentfontbodyscale\dimexpr\fontbody}%
\ifcsname\??symbolfont\askedsymbolfont\endcsname
- \csname\??symbolfont\askedsymbolfont\endcsname
+ \lastnamedcs
\else
\font_basics_define_symbolic_font
\fi}
@@ -159,7 +159,7 @@
\def\setdirectsymbolicfont#fontname%
{\edef\askedsymbolfont{\truefontname{#fontname} at \the\dimexpr\currentfontbodyscale\dimexpr\fontbody}%
\ifcsname\??symbolfont\askedsymbolfont\endcsname
- \csname\??symbolfont\askedsymbolfont\endcsname
+ \lastnamedcs
\else
\font_basics_define_symbolic_font
\fi}
diff --git a/Master/texmf-dist/tex/context/base/font-syn.lua b/Master/texmf-dist/tex/context/base/mkiv/font-syn.lua
index bf46c85730f..f27995212bb 100644
--- a/Master/texmf-dist/tex/context/base/font-syn.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-syn.lua
@@ -7,15 +7,23 @@ if not modules then modules = { } end modules ['font-syn'] = {
}
-- todo: subs in lookups requests
+-- todo: see if the (experimental) lua reader (on my machine) be used (it's a bit slower so maybe wait till lua 5.3)
+
+-- identifying ttf/otf/ttc/afm : 2200 fonts:
+--
+-- old ff loader: 140 sec
+-- new lua loader: 5 sec
local next, tonumber, type, tostring = next, tonumber, type, tostring
-local sub, gsub, lower, match, find, lower, upper = string.sub, string.gsub, string.lower, string.match, string.find, string.lower, string.upper
-local find, gmatch = string.find, string.gmatch
-local concat, sort, format = table.concat, table.sort, string.format
+local sub, gsub, match, find, lower, upper = string.sub, string.gsub, string.match, string.find, string.lower, string.upper
+local concat, sort = table.concat, table.sort
local serialize, sortedhash = table.serialize, table.sortedhash
local lpegmatch = lpeg.match
local unpack = unpack or table.unpack
local formatters, topattern = string.formatters, string.topattern
+local round = math.round
+local P, R, S, C, Cc, Ct, Cs = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Cc, lpeg.Ct, lpeg.Cs
+local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
local allocate = utilities.storage.allocate
local sparse = utilities.storage.sparse
@@ -35,18 +43,15 @@ local findfile = resolvers.findfile
local cleanpath = resolvers.cleanpath
local resolveprefix = resolvers.resolve
-local fontloader = fontloader
-local font_to_table = fontloader.to_table
-local open_font = fontloader.open
-local get_font_info = fontloader.info
-local close_font = fontloader.close
-local font_fields = fontloader.fields
+----- fontloader = fontloader -- still needed for pfb (now)
+----- get_font_info = fontloader.info
local settings_to_hash = utilities.parsers.settings_to_hash_tolerant
local trace_names = false trackers.register("fonts.names", function(v) trace_names = v end)
local trace_warnings = false trackers.register("fonts.warnings", function(v) trace_warnings = v end)
local trace_specifications = false trackers.register("fonts.specifications", function(v) trace_specifications = v end)
+local trace_rejections = false trackers.register("fonts.rejections", function(v) trace_rejections = v end)
local report_names = logs.reporter("fonts","names")
@@ -68,7 +73,7 @@ fonts.treatments = treatments
names.data = names.data or allocate { }
-names.version = 1.123
+names.version = 1.131
names.basename = "names"
names.saved = false
names.loaded = false
@@ -86,8 +91,6 @@ directives.register("fonts.usesystemfonts", function(v) usesystemfonts = toboole
<p>A few helpers.</p>
--ldx]]--
-local P, C, Cc, Cs = lpeg.P, lpeg.C, lpeg.Cc, lpeg.Cs
-
-- -- what to do with these -- --
--
-- thin -> thin
@@ -305,119 +308,53 @@ end
but to keep the overview, we define them here.</p>
--ldx]]--
-filters.otf = get_font_info
-filters.ttf = get_font_info
-filters.ttc = get_font_info
-filters.dfont = get_font_info
-
--- We had this as temporary solution because we needed a bit more info but in the
--- meantime it got an interesting side effect: currently luatex delays loading of e.g.
--- glyphs so here we first load and then discard which is a waste. In the past it did
--- free memory because a full load was done. One of these things that goes unnoticed.
---
--- missing: names, units_per_em, design_range_bottom, design_range_top, design_size,
--- pfminfo, top_side_bearing
-
--- local function get_full_info(...) -- check with taco what we get / could get
--- local ff = open_font(...)
--- if ff then
--- local d = ff -- and font_to_table(ff)
--- d.glyphs, d.subfonts, d.gpos, d.gsub, d.lookups = nil, nil, nil, nil, nil
--- close_font(ff)
--- return d
--- else
--- return nil, "error in loading font"
--- end
--- end
-
--- Phillip suggested this faster variant but it's still a hack as fontloader.info should
--- return these keys/values (and maybe some more) but at least we close the loader which
--- might save some memory in the end.
-
--- local function get_full_info(name)
--- local ff = open_font(name)
--- if ff then
--- local fields = table.tohash(font_fields(ff),true) -- isn't that one stable
--- local d = {
--- names = fields.names and ff.names,
--- familyname = fields.familyname and ff.familyname,
--- fullname = fields.fullname and ff.fullname,
--- fontname = fields.fontname and ff.fontname,
--- weight = fields.weight and ff.weight,
--- italicangle = fields.italicangle and ff.italicangle,
--- units_per_em = fields.units_per_em and ff.units_per_em,
--- design_range_bottom = fields.design_range_bottom and ff.design_range_bottom,
--- design_range_top = fields.design_range_top and ff.design_range_top,
--- design_size = fields.design_size and ff.design_size,
--- italicangle = fields.italicangle and ff.italicangle,
--- pfminfo = fields.pfminfo and ff.pfminfo,
--- top_side_bearing = fields.top_side_bearing and ff.top_side_bearing,
--- }
--- setmetatableindex(d,function(t,k)
--- report_names("warning, trying to access field %a in font table of %a",k,name)
--- end)
--- close_font(ff)
--- return d
--- else
--- return nil, "error in loading font"
--- end
--- end
+filters.otf = fonts.handlers.otf.readers.getinfo
+filters.ttf = filters.otf
+filters.ttc = filters.otf
+-------.ttx = filters.otf
--- more efficient:
-
-local fields = nil
-
-local function get_full_info(name)
- local ff = open_font(name)
- if ff then
- if not fields then
- fields = table.tohash(font_fields(ff),true)
- end
- -- unfortunately luatex aborts when a field is not available
- local d = {
- names = fields.names and ff.names,
- familyname = fields.familyname and ff.familyname,
- fullname = fields.fullname and ff.fullname,
- fontname = fields.fontname and ff.fontname,
- weight = fields.weight and ff.weight,
- italicangle = fields.italicangle and ff.italicangle,
- units_per_em = fields.units_per_em and ff.units_per_em,
- design_range_bottom = fields.design_range_bottom and ff.design_range_bottom,
- design_range_top = fields.design_range_top and ff.design_range_top,
- design_size = fields.design_size and ff.design_size,
- italicangle = fields.italicangle and ff.italicangle,
- pfminfo = fields.pfminfo and ff.pfminfo,
- top_side_bearing = fields.top_side_bearing and ff.top_side_bearing, -- not there
- }
- setmetatableindex(d,function(t,k)
- report_names("warning, trying to access field %a in font table of %a",k,name)
- end)
- close_font(ff)
- return d
+local function normalize(t) -- only for afm parsing
+ local boundingbox = t.fontbbox
+ if boundingbox then
+ for i=1,#boundingbox do
+ boundingbox[i] = tonumber(boundingbox[i])
+ end
else
- return nil, "error in loading font"
- end
+ boundingbox = { 0, 0, 0, 0 }
+ end
+ return {
+ copyright = t.copyright,
+ fontname = t.fontname,
+ fullname = t.fullname,
+ familyname = t.familyname,
+ weight = t.weight,
+ widtht = t.width,
+ italicangle = tonumber(t.italicangle) or 0,
+ monospaced = toboolean(t.isfixedpitch) or false,
+ boundingbox = boundingbox,
+ version = t.version, -- not used
+ capheight = tonumber(t.capheight),
+ xheight = tonumber(t.xheight),
+ ascender = tonumber(t.ascender),
+ descender = tonumber(t.descender),
+ }
end
--- As we have lazy loading anyway, this one still is full and with less code than
--- the previous one. But this depends on the garbage collector to kick in and in the
--- current version that somehow happens not that often (on my machine I end up with
--- soem 3 GB extra before that happens).
+local p_spaces = lpegpatterns.whitespace
+local p_number = (R("09")+S(".-+"))^1 / tonumber
+local p_boolean = P("false") * Cc(false)
+ + P("false") * Cc(false)
+local p_string = P("(") * C((lpegpatterns.nestedparents + 1 - P(")"))^1) * P(")")
+local p_array = P("[") * Ct((p_number + p_boolean + p_string + p_spaces^1)^1) * P("]")
+ + P("{") * Ct((p_number + p_boolean + p_string + p_spaces^1)^1) * P("}")
--- local function get_full_info(...)
--- local ff = open_font(...)
--- if ff then
--- local d = { } -- ff is userdata so [1] or # fails on it
--- setmetatableindex(d,ff)
--- return d -- garbage collection will do the close_font(ff)
--- else
--- return nil, "error in loading font"
--- end
--- end
+local p_key = P("/") * C(R("AZ","az")^1)
+local p_value = p_string
+ + p_number
+ + p_boolean
+ + p_array
-fontloader.fullinfo = get_full_info
-filters .otf = get_full_info
-filters .ttf = get_full_info
+local p_entry = p_key * p_spaces^0 * p_value
function filters.afm(name)
-- we could parse the afm file as well, and then report an error but
@@ -430,24 +367,46 @@ function filters.afm(name)
local f = io.open(name)
if f then
local hash = { }
- for line in f:lines() do -- slow
- local key, value = match(line,"^(.+)%s+(.+)%s*$")
- if key and #key > 0 then
- hash[lower(key)] = value
- end
+ local okay = false
+ for line in f:lines() do -- slow but only a few lines at the beginning
if find(line,"StartCharMetrics",1,true) then
break
+ else
+ local key, value = match(line,"^(.+)%s+(.+)%s*$")
+ if key and #key > 0 then
+ hash[lower(key)] = value
+ end
end
end
f:close()
- return hash
+ return normalize(hash)
end
end
return nil, "no matching pfb file"
end
function filters.pfb(name)
- return get_font_info(name)
+ local f = io.open(name)
+ if f then
+ local hash = { }
+ local okay = false
+ for line in f:lines() do -- slow but only a few lines at the beginning
+ if find(line,"dict begin") then
+ okay = true
+ elseif not okay then
+ -- go on
+ elseif find(line,"currentdict end") then
+ break
+ else
+ local key, value = lpegmatch(p_entry,line)
+ if key and value then
+ hash[lower(key)] = value
+ end
+ end
+ end
+ f:close()
+ return normalize(hash)
+ end
end
--[[ldx--
@@ -457,10 +416,11 @@ for combination with the weight of a font.</p>
--ldx]]--
filters.list = {
- "otf", "ttf", "ttc", "dfont", "afm",
- -- "ttc", "otf", "ttf", "dfont", "afm",
+ "otf", "ttf", "ttc", "afm", -- no longer dfont support (for now)
}
+-- to be considered: loop over paths per list entry (so first all otf ttf etc)
+
names.fontconfigfile = "fonts.conf" -- a bit weird format, bonus feature
names.osfontdirvariable = "OSFONTDIR" -- the official way, in minimals etc
@@ -532,6 +492,7 @@ function names.getpaths(trace)
end
end
end
+ sort(result)
function names.getpaths()
return result
end
@@ -554,20 +515,25 @@ local function cleanfilename(fullname,defaultsuffix)
end
end
+local sorter = function(a,b)
+ return a > b -- to be checked
+end
+
names.cleanname = cleanname
names.cleanfilename = cleanfilename
-local function check_names(result)
- local names = result.names
- if names then
- for i=1,#names do
- local name = names[i]
- if name.lang == "English (US)" then
- return name.names
- end
- end
- end
-end
+-- local function check_names(result)
+-- local names = result.names
+-- if names then
+-- for i=1,#names do
+-- local name = names[i]
+-- if name.lang == "English (US)" then
+-- return name.names
+-- end
+-- end
+-- end
+-- return result
+-- end
local function walk_tree(pathlist,suffix,identify)
if pathlist then
@@ -590,35 +556,39 @@ end
local function check_name(data,result,filename,modification,suffix,subfont)
-- shortcuts
local specifications = data.specifications
- -- prepare
- local names = check_names(result)
-- fetch
- local familyname = names and names.preffamilyname or result.familyname
- local fullname = names and names.fullname or result.fullname
- local fontname = result.fontname
- local subfamily = names and names.subfamily
- local modifiers = names and names.prefmodifiers
- local weight = names and names.weight or result.weight
- local italicangle = tonumber(result.italicangle)
- local subfont = subfont or nil
- local rawname = fullname or fontname or familyname
- local filebase = removesuffix(basename(filename))
- local cleanfilename = cleanname(filebase) -- for WS
+ local fullname = result.fullname
+ local fontname = result.fontname
+ local family = result.family
+ local subfamily = result.subfamily
+ local familyname = result.familyname
+ local subfamilyname = result.subfamilyname
+ -- local compatiblename = result.compatiblename
+ local weight = result.weight
+ local italicangle = tonumber(result.italicangle)
+ local subfont = subfont
+ local rawname = fullname or fontname or familyname
+ local filebase = removesuffix(basename(filename))
+ local cleanfilename = cleanname(filebase) -- for WS
-- normalize
- familyname = familyname and cleanname(familyname)
- fullname = fullname and cleanname(fullname)
- fontname = fontname and cleanname(fontname)
- subfamily = subfamily and cleanname(subfamily)
- modifiers = modifiers and cleanname(modifiers)
- weight = weight and cleanname(weight)
- italicangle = italicangle == 0 and nil
+ fullname = fullname and cleanname(fullname)
+ fontname = fontname and cleanname(fontname)
+ family = family and cleanname(family)
+ subfamily = subfamily and cleanname(subfamily)
+ familyname = familyname and cleanname(familyname)
+ subfamilyname = subfamilyname and cleanname(subfamilyname)
+ -- compatiblename = compatiblename and cleanname(compatiblename)
+ weight = weight and cleanname(weight)
+ italicangle = italicangle == 0 and nil
-- analyze
local a_name, a_weight, a_style, a_width, a_variant = analyzespec(fullname or fontname or familyname)
-- check
- local width = a_width
+ local width = a_width
local variant = a_variant
- local style = modifiers and gsub(modifiers,"[^%a]","")
- if not style and italicangle then
+ local style = subfamilyname or subfamily -- can re really trust subfamilyname?
+ if style then
+ style = gsub(style,"[^%a]","")
+ elseif italicangle then
style = "italic"
end
if not variant or variant == "" then
@@ -636,43 +606,42 @@ local function check_name(data,result,filename,modification,suffix,subfont)
fontname = fontname or fullname or familyname or filebase -- maybe cleanfilename
fullname = fullname or fontname
familyname = familyname or fontname
- -- we do these sparse
- local units = result.units_per_em or 1000 -- can be zero too
- local minsize = result.design_range_bottom or 0
- local maxsize = result.design_range_top or 0
- local designsize = result.design_size or 0
+ -- we do these sparse -- todo: check table type or change names in ff loader
+ local units = result.units or 1000 -- can be zero too
+ local designsize = result.designsize or 0
+ local minsize = result.minsize or 0
+ local maxsize = result.maxsize or 0
local angle = result.italicangle or 0
- local pfminfo = result.pfminfo
- local pfmwidth = pfminfo and pfminfo.width or 0
- local pfmweight = pfminfo and pfminfo.weight or 0
+ local pfmwidth = result.pfmwidth or 0
+ local pfmweight = result.pfmweight or 0
--
specifications[#specifications + 1] = {
- filename = filename, -- unresolved
- cleanfilename = cleanfilename,
- format = lower(suffix),
- subfont = subfont,
- rawname = rawname,
- familyname = familyname,
- fullname = fullname,
- fontname = fontname,
- subfamily = subfamily,
- modifiers = modifiers,
- weight = weight,
- style = style,
- width = width,
- variant = variant,
- units = units ~= 1000 and units or nil,
- pfmwidth = pfmwidth ~= 0 and pfmwidth or nil,
- pfmweight = pfmweight ~= 0 and pfmweight or nil,
- angle = angle ~= 0 and angle or nil,
- minsize = minsize ~= 0 and minsize or nil,
- maxsize = maxsize ~= 0 and maxsize or nil,
- designsize = designsize ~= 0 and designsize or nil,
- modification = modification ~= 0 and modification or nil,
+ filename = filename, -- unresolved
+ cleanfilename = cleanfilename,
+ -- subfontindex = subfont,
+ format = lower(suffix),
+ subfont = subfont,
+ rawname = rawname,
+ fullname = fullname,
+ fontname = fontname,
+ family = family,
+ subfamily = subfamily,
+ familyname = familyname,
+ subfamilyname = subfamilyname,
+ -- compatiblename = compatiblename, -- nor used / needed
+ weight = weight,
+ style = style,
+ width = width,
+ variant = variant,
+ units = units ~= 1000 and units or nil,
+ pfmwidth = pfmwidth ~= 0 and pfmwidth or nil,
+ pfmweight = pfmweight ~= 0 and pfmweight or nil,
+ angle = angle ~= 0 and angle or nil,
+ minsize = minsize ~= 0 and minsize or nil,
+ maxsize = maxsize ~= 0 and maxsize or nil,
+ designsize = designsize ~= 0 and designsize or nil,
+ modification = modification ~= 0 and modification or nil,
}
--- inspect(filename)
--- inspect(result)
--- inspect(specifications[#specifications])
end
local function cleanupkeywords()
@@ -708,14 +677,18 @@ local function cleanupkeywords()
end
s.weight, s.style, s.width, s.variant = weight, style, width, variant
end
- local stats = data.statistics
- stats.used_weights, stats.used_styles, stats.used_widths, stats.used_variants = weights, styles, widths, variants
+ local statistics = data.statistics
+ statistics.used_weights = weights
+ statistics.used_styles = styles
+ statistics.used_widths = widths
+ statistics.used_variants = variants
end
end
-local function collectstatistics()
+local function collectstatistics(runtime)
local data = names.data
local specifications = data.specifications
+ local statistics = data.statistics
if specifications then
local f_w = formatters["%i"]
local f_a = formatters["%0.2f"]
@@ -753,20 +726,21 @@ local function collectstatistics()
twidths[pfmwidth] = (twidths [pfmwidth] or 0) + 1
end
--
- local stats = data.statistics
- stats.weights = weights
- stats.styles = styles
- stats.widths = widths
- stats.variants = variants
- stats.angles = angles
- stats.pfmweights = pfmweights
- stats.pfmwidths = pfmwidths
- stats.fonts = #specifications
+ statistics.weights = weights
+ statistics.styles = styles
+ statistics.widths = widths
+ statistics.variants = variants
+ statistics.angles = angles
+ statistics.pfmweights = pfmweights
+ statistics.pfmwidths = pfmwidths
+ statistics.fonts = #specifications
--
setmetatableindex(pfmweights,nil)
setmetatableindex(pfmwidths, nil)
--
report_names("")
+ report_names("statistics: ")
+ report_names("")
report_names("weights")
report_names("")
report_names(formatters[" %T"](weights))
@@ -799,6 +773,13 @@ local function collectstatistics()
report_names(formatters[" %-10s: %T"](k,v))
end
report_names("")
+ report_names("registered fonts : %i", statistics.fonts)
+ report_names("read files : %i", statistics.readfiles)
+ report_names("skipped files : %i", statistics.skippedfiles)
+ report_names("duplicate files : %i", statistics.duplicatefiles)
+ if runtime then
+ report_names("total scan time : %0.3f seconds",runtime)
+ end
end
end
@@ -812,29 +793,50 @@ local function collecthashes()
if specifications then
-- maybe multiple passes
for index=1,#specifications do
- local s = specifications[index]
- local format, fullname, fontname, familyname, weight, subfamily = s.format, s.fullname, s.fontname, s.familyname, s.weight, s.subfamily
- local mf, ff = mappings[format], fallbacks[format]
- if fullname and not mf[fullname] then
- mf[fullname], nofmappings = index, nofmappings + 1
- end
- if fontname and not mf[fontname] then
- mf[fontname], nofmappings = index, nofmappings + 1
- end
- if familyname and weight and weight ~= sub(familyname,#familyname-#weight+1,#familyname) then
- local madename = familyname .. weight
- if not mf[madename] and not ff[madename] then
- ff[madename], noffallbacks = index, noffallbacks + 1
- end
+ local specification = specifications[index]
+ local format = specification.format
+ local fullname = specification.fullname
+ local fontname = specification.fontname
+ local familyname = specification.familyname or specification.family
+ local subfamilyname = specification.subfamilyname
+ local subfamily = specification.subfamily
+ local weight = specification.weight
+ local mapping = mappings[format]
+ local fallback = fallbacks[format]
+ if fullname and not mapping[fullname] then
+ mapping[fullname] = index
+ nofmappings = nofmappings + 1
+ end
+ if fontname and not mapping[fontname] then
+ mapping[fontname] = index
+ nofmappings = nofmappings + 1
end
- if familyname and subfamily and subfamily ~= sub(familyname,#familyname-#subfamily+1,#familyname) then
- local extraname = familyname .. subfamily
- if not mf[extraname] and not ff[extraname] then
- ff[extraname], noffallbacks = index, noffallbacks + 1
+ if familyname then
+ if weight and weight ~= sub(familyname,#familyname-#weight+1,#familyname) then
+ local madename = familyname .. weight
+ if not mapping[madename] and not fallback[madename] then
+ fallback[madename] = index
+ noffallbacks = noffallbacks + 1
+ end
+ end
+ if subfamily and subfamily ~= sub(familyname,#familyname-#subfamily+1,#familyname) then
+ local extraname = familyname .. subfamily
+ if not mapping[extraname] and not fallback[extraname] then
+ fallback[extraname] = index
+ noffallbacks = noffallbacks + 1
+ end
+ end
+ if subfamilyname and subfamilyname ~= sub(familyname,#familyname-#subfamilyname+1,#familyname) then
+ local extraname = familyname .. subfamilyname
+ if not mapping[extraname] and not fallback[extraname] then
+ fallback[extraname] = index
+ noffallbacks = noffallbacks + 1
+ end
+ end
+ if not mapping[familyname] and not fallback[familyname] then
+ fallback[familyname] = index
+ noffallbacks = noffallbacks + 1
end
- end
- if familyname and not mf[familyname] and not ff[familyname] then
- ff[familyname], noffallbacks = index, noffallbacks + 1
end
end
end
@@ -907,10 +909,6 @@ local function checkduplicates()
checkduplicate("fallbacks")
end
-local sorter = function(a,b)
- return a > b -- to be checked
-end
-
local function sorthashes()
local data = names.data
local list = filters.list
@@ -935,23 +933,23 @@ local function unpackreferences()
local data = names.data
local specifications = data.specifications
if specifications then
- for k, v in next, data.families do
+ for k, v in sortedhash(data.families) do
for i=1,#v do
v[i] = specifications[v[i]]
end
end
local mappings = data.mappings
if mappings then
- for _, m in next, mappings do
- for k, v in next, m do
+ for _, m in sortedhash(mappings) do
+ for k, v in sortedhash(m) do
m[k] = specifications[v]
end
end
end
local fallbacks = data.fallbacks
if fallbacks then
- for _, f in next, fallbacks do
- for k, v in next, f do
+ for _, f in sortedhash(fallbacks) do
+ for k, v in sortedhash(f) do
f[k] = specifications[v]
end
end
@@ -978,31 +976,34 @@ local function analyzefiles(olddata)
local oldspecifications = olddata and olddata.specifications or { }
local oldrejected = olddata and olddata.rejected or { }
local treatmentdata = treatments.data or { } -- when used outside context
+
local function identify(completename,name,suffix,storedname)
local pathpart, basepart = splitbase(completename)
nofread = nofread + 1
local treatment = treatmentdata[completename] or treatmentdata[basepart]
if treatment and treatment.ignored then
- if trace_names then
+ if trace_names or trace_rejections then
report_names("%s font %a is ignored, reason %a",suffix,completename,treatment.comment or "unknown")
end
nofskipped = nofskipped + 1
elseif done[name] then
- -- already done (avoid otf afm clash)
- if trace_names then
- report_names("%s font %a already done",suffix,completename)
+ if lower(completename) ~= lower(done[name]) then
+ -- already done (avoid otf afm clash)
+ if trace_names or trace_rejections then
+ report_names("%s font %a already done as %a",suffix,completename,done[name])
+ end
+ nofduplicates = nofduplicates + 1
+ nofskipped = nofskipped + 1
end
- nofduplicates = nofduplicates + 1
- nofskipped = nofskipped + 1
elseif not exists(completename) then
-- weird error
- if trace_names then
+ if trace_names or trace_rejections then
report_names("%s font %a does not really exist",suffix,completename)
end
nofskipped = nofskipped + 1
elseif not is_qualified_path(completename) and findfile(completename,suffix) == "" then
-- not locatable by backend anyway
- if trace_names then
+ if trace_names or trace_rejections then
report_names("%s font %a cannot be found by backend",suffix,completename)
end
nofskipped = nofskipped + 1
@@ -1010,7 +1011,7 @@ local function analyzefiles(olddata)
if #skip_paths > 0 then
for i=1,#skip_paths do
if find(pathpart,skip_paths[i]) then
- if trace_names then
+ if trace_names or trace_rejections then
report_names("rejecting path of %s font %a",suffix,completename)
end
nofskipped = nofskipped + 1
@@ -1022,7 +1023,7 @@ local function analyzefiles(olddata)
for i=1,#skip_paths do
if find(basepart,skip_names[i]) then
done[name] = true
- if trace_names then
+ if trace_names or trace_rejections then
report_names("rejecting name of %s font %a",suffix,completename)
end
nofskipped = nofskipped + 1
@@ -1033,6 +1034,7 @@ local function analyzefiles(olddata)
if trace_names then
report_names("identifying %s font %a",suffix,completename)
end
+ -- needs checking with ttc / ttx : date not updated ?
local result = nil
local modification = lfs.attributes(completename,"modification")
if olddata and modification and modification > 0 then
@@ -1045,8 +1047,10 @@ local function analyzefiles(olddata)
result = oldspecification
specifications[#specifications + 1] = result
else
+ -- ??
end
else
+ -- ??
end
elseif oldrejected[storedname] == modification then
result = false
@@ -1058,7 +1062,7 @@ local function analyzefiles(olddata)
if result then
if #result > 0 then
for r=1,#result do
- local ok = check_name(data,result[r],storedname,modification,suffix,r-1) -- subfonts start at zero
+ local ok = check_name(data,result[r],storedname,modification,suffix,r) -- subfonts start at zero
-- if not ok then
-- nofskipped = nofskipped + 1
-- end
@@ -1077,7 +1081,7 @@ local function analyzefiles(olddata)
report_names("error when identifying %s font %a, %s",suffix,completename,message or "unknown")
end
end
- done[name] = true
+ done[name] = completename
end
logs.flush() -- a bit overkill for each font, maybe not needed here
end
@@ -1214,14 +1218,12 @@ function names.identify(force)
analyzefiles(not force and names.readdata(names.basename))
rejectclashes()
collectfamilies()
- -- collectstatistics()
cleanupkeywords()
collecthashes()
checkduplicates()
addfilenames()
-- sorthashes() -- will be resorted when saved
- collectstatistics()
- report_names("total scan time %0.3f seconds",os.gettimeofday()-starttime)
+ collectstatistics(os.gettimeofday()-starttime)
end
function names.is_permitted(name)
@@ -1420,7 +1422,7 @@ end
function names.resolve(askedname,sub)
local found = names.resolvedspecification(askedname,sub)
if found then
- return found.filename, found.subfont and found.rawname
+ return found.filename, found.subfont and found.rawname, found.subfont
end
end
@@ -1880,7 +1882,7 @@ local lastlookups, lastpattern = { }, ""
-- end
local function look_them_up(lookups,specification)
- for key, value in next, specification do
+ for key, value in sortedhash(specification) do
local t, n = { }, 0
if find(value,"*",1,true) then
value = topattern(value)
@@ -2002,7 +2004,7 @@ function names.register(files)
local list, commonname = files.list, files.name
if list then
local n, m = 0, 0
- for filename, filespec in next, list do
+ for filename, filespec in sortedhash(list) do
local name = lower(filespec.name or commonname)
if name and name ~= "" then
local style = normalized_styles [lower(filespec.style or "normal")]
@@ -2069,48 +2071,20 @@ function names.resolvespec(askedname,sub) -- overloads previous definition
end
end
--- We could generate typescripts with designsize info from the name database but
--- it's not worth the trouble as font names remain a mess: for instance how do we
--- idenfity a font? Names, families, subfamilies or whatever snippet can contain
--- a number related to the design size and so we end up with fuzzy logic again. So,
--- instead it's easier to make a few goody files.
---
--- local hash = { }
---
--- for i=1,#specifications do
--- local s = specifications[i]
--- local min = s.minsize or 0
--- local max = s.maxsize or 0
--- if min ~= 0 or max ~= 0 then
--- -- the usual name mess:
--- -- antykwa has modifiers so we need to take these into account, otherwise we get weird combinations
--- -- ebgaramond has modifiers with the size encoded, so we need to strip this in order to recognized similar styles
--- -- lm has 'slanted appended in some names so how to choose that one
--- --
--- local modifier = string.gsub(s.modifiers or "normal","%d","")
--- -- print funny modifier
--- local instance = string.formatters["%s-%s-%s-%s-%s-%s"](s.familyname,s.width,s.style,s.weight,s.variant,modifier)
--- local h = hash[instance]
--- if not h then
--- h = { }
--- hash[instance] = h
--- end
--- size = string.formatters["%0.1fpt"]((min)/10)
--- h[size] = s.filename
--- end
--- end
+function fonts.names.ignoredfile(filename) -- only supported in mkiv
+ return false -- will be overloaded
+end
+
+-- example made for luatex list (unlikely to be used):
--
--- local newhash = { }
+-- local command = [[reg QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts"]]
+-- local pattern = ".-[\n\r]+%s+(.-)%s%(([^%)]+)%)%s+REG_SZ%s+(%S+)%s+"
--
--- for k, v in next, hash do
--- if next(v,next(v)) then
--- -- local instance = string.match(k,"(.+)%-.+%-.+%-.+$")
--- local instance = string.match(k,"(.+)%-.+%-.+$")
--- local instance = string.gsub(instance,"%-normal$","")
--- if not newhash[instance] then
--- newhash[instance] = v
--- end
+-- local function getnamesfromregistry()
+-- local data = os.resultof(command)
+-- local list = { }
+-- for name, format, filename in string.gmatch(data,pattern) do
+-- list[name] = filename
-- end
+-- return list
-- end
---
--- inspect(newhash)
diff --git a/Master/texmf-dist/tex/context/base/font-tfm.lua b/Master/texmf-dist/tex/context/base/mkiv/font-tfm.lua
index ab03788516a..8e92c4808a6 100644
--- a/Master/texmf-dist/tex/context/base/font-tfm.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-tfm.lua
@@ -24,6 +24,9 @@ local constructors = fonts.constructors
local encodings = fonts.encodings
local tfm = constructors.newhandler("tfm")
+tfm.version = 1.000
+tfm.maxnestingdepth = 5
+tfm.maxnestingsize = 65536*1024
local tfmfeatures = constructors.newfeatures("tfm")
local registertfmfeature = tfmfeatures.register
@@ -31,6 +34,7 @@ local registertfmfeature = tfmfeatures.register
constructors.resolvevirtualtoo = false -- wil be set in font-ctx.lua
fonts.formats.tfm = "type1" -- we need to have at least a value here
+fonts.formats.ofm = "type1" -- we need to have at least a value here
--[[ldx--
<p>The next function encapsulates the standard <l n='tfm'/> loader as
@@ -44,6 +48,18 @@ supplied by <l n='luatex'/>.</p>
-- ofm directive blocks local path search unless set; btw, in context we
-- don't support ofm files anyway as this format is obsolete
+-- we need to deal with nested virtual fonts, but because we load in the
+-- frontend we also need to make sure we don't nest too deep (esp when sizes
+-- get large)
+--
+-- (VTITLE Example of a recursion)
+-- (MAPFONT D 0 (FONTNAME recurse)(FONTAT D 2))
+-- (CHARACTER C A (CHARWD D 1)(CHARHT D 1)(MAP (SETRULE D 1 D 1)))
+-- (CHARACTER C B (CHARWD D 2)(CHARHT D 2)(MAP (SETCHAR C A)))
+-- (CHARACTER C C (CHARWD D 4)(CHARHT D 4)(MAP (SETCHAR C B)))
+--
+-- we added the same checks as below to the luatex engine
+
function tfm.setfeatures(tfmdata,features)
local okay = constructors.initializefeatures("tfm",tfmdata,features,trace_features,report_tfm)
if okay then
@@ -53,9 +69,12 @@ function tfm.setfeatures(tfmdata,features)
end
end
+local depth = { } -- table.setmetatableindex("number")
+
local function read_from_tfm(specification)
- local filename = specification.filename
- local size = specification.size
+ local filename = specification.filename
+ local size = specification.size
+ depth[filename] = (depth[filename] or 0) + 1
if trace_defining then
report_defining("loading tfm file %a at size %s",filename,size)
end
@@ -103,6 +122,25 @@ local function read_from_tfm(specification)
end
properties.virtualized = true
tfmdata.fonts = vfdata.fonts
+ tfmdata.type = "virtual" -- else nested calls with cummulative scaling
+ local fontlist = vfdata.fonts
+ local name = file.nameonly(filename)
+ for i=1,#fontlist do
+ local n = fontlist[i].name
+ local s = fontlist[i].size
+ local d = depth[filename]
+ s = constructors.scaled(s,vfdata.designsize)
+ if d > tfm.maxnestingdepth then
+ report_defining("too deeply nested virtual font %a with size %a, max nesting depth %s",n,s,tfm.maxnestingdepth)
+ fontlist[i] = { id = 0 }
+ elseif (d > 1) and (s > tfm.maxnestingsize) then
+ report_defining("virtual font %a exceeds size %s",n,s)
+ fontlist[i] = { id = 0 }
+ else
+ local t, id = fonts.constructors.readanddefine(n,s)
+ fontlist[i] = { id = id }
+ end
+ end
end
end
end
@@ -117,11 +155,14 @@ local function read_from_tfm(specification)
end
-- let's play safe:
properties.haskerns = true
- properties.haslogatures = true
+ properties.hasligatures = true
resources.unicodes = { }
resources.lookuptags = { }
--
+ depth[filename] = depth[filename] - 1
return tfmdata
+ else
+ depth[filename] = depth[filename] - 1
end
end
@@ -156,3 +197,5 @@ function readers.tfm(specification)
end
return check_tfm(specification,fullname)
end
+
+readers.ofm = readers.tfm
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-tmp.lua b/Master/texmf-dist/tex/context/base/mkiv/font-tmp.lua
new file mode 100644
index 00000000000..8db5cff1436
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-tmp.lua
@@ -0,0 +1,118 @@
+if not modules then modules = { } end modules ['font-tmp'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- There is a complete feature loader but it needs a bit of testing, first so this
+-- one does design size only (as needed for identifying).
+
+local next, type = next, type
+
+local report = logs.reporter("otf reader")
+
+local readers = fonts.handlers.otf.readers
+local streamreader = readers.streamreader
+
+local readushort = streamreader.readcardinal2 -- 16-bit unsigned integer
+local readulong = streamreader.readcardinal4 -- 24-bit unsigned integer
+local readshort = streamreader.readinteger2 -- 16-bit signed integer
+local readtag = streamreader.readtag
+local skipshort = streamreader.skipshort
+local setposition = streamreader.setposition
+
+local plugins = { }
+
+function plugins.size(f,fontdata,tableoffset,parameters)
+ if not fontdata.designsize then
+ setposition(f,tableoffset+parameters)
+ local designsize = readushort(f)
+ if designsize > 0 then
+ fontdata.designsize = designsize
+ skipshort(f,2)
+ fontdata.minsize = readushort(f)
+ fontdata.maxsize = readushort(f)
+ end
+ end
+end
+
+local function readscripts(f,fontdata,what)
+ local datatable = fontdata.tables[what]
+ if not datatable then
+ return
+ end
+ local tableoffset = datatable.offset
+ setposition(f,tableoffset)
+ local version = readulong(f)
+ if version ~= 0x00010000 then
+ report("table version %a of %a is not supported (yet), maybe font %s is bad",version,what,fontdata.filename)
+ return
+ end
+ --
+ local scriptoffset = tableoffset + readushort(f)
+ local featureoffset = tableoffset + readushort(f)
+ local lookupoffset = tableoffset + readushort(f)
+ --
+ setposition(f,scriptoffset)
+ local nofscripts = readushort(f)
+ local scripts = { }
+ for i=1,nofscripts do
+ scripts[readtag(f)] = scriptoffset + readushort(f)
+ end
+ local languagesystems = table.setmetatableindex("table") -- we share when possible
+ for script, offset in next, scripts do
+ setposition(f,offset)
+ local defaultoffset = readushort(f)
+ local noflanguages = readushort(f)
+ local languages = { }
+ if defaultoffset > 0 then
+ languages.dflt = languagesystems[offset + defaultoffset]
+ end
+ for i=1,noflanguages do
+ local language = readtag(f)
+ local offset = offset + readushort(f)
+ languages[language] = languagesystems[offset]
+ end
+ scripts[script] = languages
+ end
+ --
+ setposition(f,featureoffset)
+ local features = { }
+ local noffeatures = readushort(f)
+ for i=1,noffeatures do
+ features[i] = {
+ tag = readtag(f),
+ offset = readushort(f)
+ }
+ end
+ --
+ for i=1,noffeatures do
+ local feature = features[i]
+ local offset = featureoffset + feature.offset
+ setposition(f,offset)
+ local parameters = readushort(f) -- feature.parameters
+ local noflookups = readushort(f)
+ skipshort(f,noflookups+1)
+ if parameters > 0 then
+ feature.parameters = parameters
+ local plugin = plugins[feature.tag]
+ if plugin then
+ plugin(f,fontdata,offset,parameters)
+ end
+ end
+ end
+end
+
+function readers.gsub(f,fontdata,specification)
+ if specification.details then
+ readscripts(f,fontdata,"gsub")
+ end
+end
+
+function readers.gpos(f,fontdata,specification)
+ if specification.details then
+ readscripts(f,fontdata,"gpos")
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/font-tra.mkiv b/Master/texmf-dist/tex/context/base/mkiv/font-tra.mkiv
index 3d6811a6428..f5290d61463 100644
--- a/Master/texmf-dist/tex/context/base/font-tra.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-tra.mkiv
@@ -15,6 +15,8 @@
\writestatus{loading}{ConTeXt Font Macros / Tracing}
+%D just use fontid
+
%D \macros
%D {showbodyfont}
%D
@@ -122,7 +124,7 @@
\unexpanded\def\otfstepcharcommand#1#2#3% font char class
{\otfstepspace
- \doif{#3}{mark}{\underbar}{U+\hexnumber{#2}}:\ruledhbox{\ctxlua{nodes.tracers.fontchar(#1,#2)}}%
+ \doif{#3}{mark}{\underbar}{U+\hexnumber{#2}}:\ruledhbox{\ctxlua{nodes.tracers.fontchar(#1,#2)}}%
\otfstepspace}
\unexpanded\def\otfstepfontcommand#1#2#3% id font size
diff --git a/Master/texmf-dist/tex/context/base/font-trt.lua b/Master/texmf-dist/tex/context/base/mkiv/font-trt.lua
index abc92ba5265..abc92ba5265 100644
--- a/Master/texmf-dist/tex/context/base/font-trt.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-trt.lua
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ttf.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ttf.lua
new file mode 100644
index 00000000000..6df339214b2
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-ttf.lua
@@ -0,0 +1,480 @@
+if not modules then modules = { } end modules ['font-ttf'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local next, type, unpack = next, type, unpack
+local bittest = bit32.btest
+local sqrt = math.sqrt
+
+local report = logs.reporter("otf reader","ttf")
+
+local readers = fonts.handlers.otf.readers
+local streamreader = readers.streamreader
+
+local setposition = streamreader.setposition
+local getposition = streamreader.getposition
+local skipbytes = streamreader.skip
+local readbyte = streamreader.readcardinal1 -- 8-bit unsigned integer
+local readushort = streamreader.readcardinal2 -- 16-bit unsigned integer
+local readulong = streamreader.readcardinal4 -- 24-bit unsigned integer
+local readchar = streamreader.readinteger1 -- 8-bit signed integer
+local readshort = streamreader.readinteger2 -- 16-bit signed integer
+local read2dot14 = streamreader.read2dot14 -- 16-bit signed fixed number with the low 14 bits of fraction (2.14) (F2DOT14)
+
+local function mergecomposites(glyphs,shapes)
+
+ local function merge(index,shape,components)
+ local contours = { }
+ local nofcontours = 0
+ for i=1,#components do
+ local component = components[i]
+ local subindex = component.index
+ local subshape = shapes[subindex]
+ local subcontours = subshape.contours
+ if not subcontours then
+ local subcomponents = subshape.components
+ if subcomponents then
+ subcontours = merge(subindex,subshape,subcomponents)
+ end
+ end
+ if subcontours then
+ local matrix = component.matrix
+ local xscale = matrix[1]
+ local xrotate = matrix[2]
+ local yrotate = matrix[3]
+ local yscale = matrix[4]
+ local xoffset = matrix[5]
+ local yoffset = matrix[6]
+ for i=1,#subcontours do
+ local points = subcontours[i]
+ local result = { }
+ for i=1,#points do
+ local p = points[i]
+ local x = p[1]
+ local y = p[2]
+ result[i] = {
+ xscale * x + xrotate * y + xoffset,
+ yscale * y + yrotate * x + yoffset,
+ p[3]
+ }
+ end
+ nofcontours = nofcontours + 1
+ contours[nofcontours] = result
+ end
+ else
+ report("missing contours composite %s, component %s of %s, glyph %s",index,i,#components,subindex)
+ end
+ end
+ shape.contours = contours
+ shape.components = nil
+ return contours
+ end
+
+ for index=1,#glyphs do
+ local shape = shapes[index]
+ local components = shape.components
+ if components then
+ merge(index,shape,components)
+ end
+ end
+
+end
+
+local function readnothing(f,nofcontours)
+ return {
+ type = "nothing",
+ }
+end
+
+-- begin of converter
+
+-- make paths: the ff code is quite complex but it looks like we need to deal
+-- with all kind of on curve border cases
+
+local function curveto(m_x,m_y,l_x,l_y,r_x,r_y) -- todo: inline this
+ return {
+ l_x + 2/3 *(m_x-l_x), l_y + 2/3 *(m_y-l_y),
+ r_x + 2/3 *(m_x-r_x), r_y + 2/3 *(m_y-r_y),
+ r_x, r_y, "c" -- "curveto"
+ }
+end
+
+-- We could omit the operator which saves some 10%:
+--
+-- #2=lineto #4=quadratic #6=cubic #3=moveto (with "m")
+--
+-- For the moment we keep the original outlines but that default might change
+-- in the future. In any case, a backend should support both.
+--
+-- The code is a bit messy. I looked at the ff code but it's messy too. It has
+-- to do with the fact that we need to look at points on the curve and control
+-- points in between. This also means that we start at point 2 and have to look at
+-- point 1 when we're at the end. We still use a ps like storage with the operator
+-- last in an entry. It's typical code that evolves stepwise till a point of no
+-- comprehension.
+
+local function contours2outlines(glyphs,shapes)
+ local quadratic = true
+ -- local quadratic = false
+ for index=1,#glyphs do
+ local glyph = glyphs[index]
+ local shape = shapes[index]
+ local contours = shape.contours
+ if contours then
+ local nofcontours = #contours
+ local segments = { }
+ local nofsegments = 0
+ glyph.segments = segments
+ if nofcontours > 0 then
+ for i=1,nofcontours do
+ local contour = contours[i]
+ local nofcontour = #contour
+ if nofcontour > 0 then
+ local first_pt = contour[1]
+ local first_on = first_pt[3]
+ -- todo no new tables but reuse lineto and quadratic
+ if nofcontour == 1 then
+ -- this can influence the boundingbox
+ first_pt[3] = "m" -- "moveto"
+ nofsegments = nofsegments + 1
+ segments[nofsegments] = first_pt
+ else -- maybe also treat n == 2 special
+ local first_on = first_pt[3]
+ local last_pt = contour[nofcontour]
+ local last_on = last_pt[3]
+ local start = 1
+ local control_pt = false
+ if first_on then
+ start = 2
+ else
+ if last_on then
+ first_pt = last_pt
+ else
+ first_pt = { (first_pt[1]+last_pt[1])/2, (first_pt[2]+last_pt[2])/2, false }
+ end
+ control_pt = first_pt
+ end
+ nofsegments = nofsegments + 1
+ segments[nofsegments] = { first_pt[1], first_pt[2], "m" } -- "moveto"
+ local previous_pt = first_pt
+ for i=start,nofcontour do
+ local current_pt = contour[i]
+ local current_on = current_pt[3]
+ local previous_on = previous_pt[3]
+ if previous_on then
+ if current_on then
+ -- both normal points
+ nofsegments = nofsegments + 1
+ segments[nofsegments] = { current_pt[1], current_pt[2], "l" } -- "lineto"
+ else
+ control_pt = current_pt
+ end
+ elseif current_on then
+ local ps = segments[nofsegments]
+ nofsegments = nofsegments + 1
+ if quadratic then
+ segments[nofsegments] = { control_pt[1], control_pt[2], current_pt[1], current_pt[2], "q" } -- "quadraticto"
+ else
+ local p = segments[nofsegments-1] local n = #p
+ segments[nofsegments] = curveto(control_pt[1],control_pt[2],p[n-2],p[n-1],current_pt[1],current_pt[2])
+ end
+ control_pt = false
+ else
+ nofsegments = nofsegments + 1
+ local halfway_x = (previous_pt[1]+current_pt[1])/2
+ local halfway_y = (previous_pt[2]+current_pt[2])/2
+ if quadratic then
+ segments[nofsegments] = { control_pt[1], control_pt[2], halfway_x, halfway_y, "q" } -- "quadraticto"
+ else
+ local p = segments[nofsegments-1] local n = #p
+ segments[nofsegments] = curveto(control_pt[1],control_pt[2],p[n-2],p[n-1],halfway_x,halfway_y)
+ end
+ control_pt = current_pt
+ end
+ previous_pt = current_pt
+ end
+ if first_pt == last_pt then
+ -- we're already done, probably a simple curve
+ else
+ nofsegments = nofsegments + 1
+ if not control_pt then
+ segments[nofsegments] = { first_pt[1], first_pt[2], "l" } -- "lineto"
+ elseif quadratic then
+ segments[nofsegments] = { control_pt[1], control_pt[2], first_pt[1], first_pt[2], "q" } -- "quadraticto"
+ else
+ local p = last_pt local n = #p
+ segments[nofsegments] = curveto(control_pt[1],control_pt[2],p[n-2],p[n-1],first_pt[1],first_pt[2])
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
+-- end of converter
+
+local function readglyph(f,nofcontours)
+ local points = { }
+ local endpoints = { }
+ local instructions = { }
+ local flags = { }
+ for i=1,nofcontours do
+ endpoints[i] = readshort(f) + 1
+ end
+ local nofpoints = endpoints[nofcontours]
+ local nofinstructions = readushort(f)
+-- f:seek("set",f:seek()+nofinstructions)
+ skipbytes(f,nofinstructions)
+ -- because flags can repeat we don't know the amount ... in fact this is
+ -- not that efficient (small files but more mem)
+ local i = 1
+ while i <= nofpoints do
+ local flag = readbyte(f)
+ flags[i] = flag
+ if bittest(flag,0x0008) then
+ for j=1,readbyte(f) do
+ i = i + 1
+ flags[i] = flag
+ end
+ end
+ i = i + 1
+ end
+ -- first come the x coordinates, and next the y coordinates and they
+ -- can be repeated
+ local x = 0
+ for i=1,nofpoints do
+ local flag = flags[i]
+ local short = bittest(flag,0x0002)
+ local same = bittest(flag,0x0010)
+ if short then
+ if same then
+ x = x + readbyte(f)
+ else
+ x = x - readbyte(f)
+ end
+ elseif same then
+ -- copy
+ else
+ x = x + readshort(f)
+ end
+ points[i] = { x, y, bittest(flag,0x0001) }
+ end
+ local y = 0
+ for i=1,nofpoints do
+ local flag = flags[i]
+ local short = bittest(flag,0x0004)
+ local same = bittest(flag,0x0020)
+ if short then
+ if same then
+ y = y + readbyte(f)
+ else
+ y = y - readbyte(f)
+ end
+ elseif same then
+ -- copy
+ else
+ y = y + readshort(f)
+ end
+ points[i][2] = y
+ end
+ -- we could integrate this if needed
+ local first = 1
+ for i=1,#endpoints do
+ local last = endpoints[i]
+ endpoints[i] = { unpack(points,first,last) }
+ first = last + 1
+ end
+ return {
+ type = "glyph",
+ -- points = points,
+ contours = endpoints,
+ }
+end
+
+local function readcomposite(f)
+ local components = { }
+ local nofcomponents = 0
+ local instructions = false
+ while true do
+ local flags = readushort(f)
+ local index = readushort(f)
+ ----- f_words = bittest(flags,0x0001)
+ local f_xyarg = bittest(flags,0x0002)
+ ----- f_round = bittest(flags,0x0004+0x0002)
+ ----- f_scale = bittest(flags,0x0008)
+ ----- f_reserved = bittest(flags,0x0010)
+ ----- f_more = bittest(flags,0x0020)
+ ----- f_xyscale = bittest(flags,0x0040)
+ ----- f_matrix = bittest(flags,0x0080)
+ ----- f_instruct = bittest(flags,0x0100)
+ ----- f_usemine = bittest(flags,0x0200)
+ ----- f_overlap = bittest(flags,0x0400)
+ local f_offset = bittest(flags,0x0800)
+ ----- f_uoffset = bittest(flags,0x1000)
+ local xscale = 1
+ local xrotate = 0
+ local yrotate = 0
+ local yscale = 1
+ local xoffset = 0
+ local yoffset = 0
+ local base = false
+ local reference = false
+ if f_xyarg then
+ if bittest(flags,0x0001) then -- f_words
+ xoffset = readshort(f)
+ yoffset = readshort(f)
+ else
+ xoffset = readchar(f) -- signed byte, stupid name
+ yoffset = readchar(f) -- signed byte, stupid name
+ end
+ else
+ if bittest(flags,0x0001) then -- f_words
+ base = readshort(f)
+ reference = readshort(f)
+ else
+ base = readchar(f) -- signed byte, stupid name
+ reference = readchar(f) -- signed byte, stupid name
+ end
+ end
+ if bittest(flags,0x0008) then -- f_scale
+ xscale = read2dot14(f)
+ yscale = xscale
+ if f_xyarg and f_offset then
+ xoffset = xoffset * xscale
+ yoffset = yoffset * yscale
+ end
+ elseif bittest(flags,0x0040) then -- f_xyscale
+ xscale = read2dot14(f)
+ yscale = read2dot14(f)
+ if f_xyarg and f_offset then
+ xoffset = xoffset * xscale
+ yoffset = yoffset * yscale
+ end
+ elseif bittest(flags,0x0080) then -- f_matrix
+ xscale = read2dot14(f)
+ xrotate = read2dot14(f)
+ yrotate = read2dot14(f)
+ yscale = read2dot14(f)
+ if f_xyarg and f_offset then
+ xoffset = xoffset * sqrt(xscale ^2 + xrotate^2)
+ yoffset = yoffset * sqrt(yrotate^2 + yscale ^2)
+ end
+ end
+ nofcomponents = nofcomponents + 1
+ components[nofcomponents] = {
+ index = index,
+ usemine = bittest(flags,0x0200), -- f_usemine
+ round = bittest(flags,0x0006), -- f_round,
+ base = base,
+ reference = reference,
+ matrix = { xscale, xrotate, yrotate, yscale, xoffset, yoffset },
+ }
+ if bittest(flags,0x0100) then
+ instructions = true
+ end
+ if not bittest(flags,0x0020) then -- f_more
+ break
+ end
+ end
+ return {
+ type = "composite",
+ components = components,
+ }
+end
+
+-- function readers.cff(f,offset,glyphs,doshapes) -- false == no shapes (nil or true otherwise)
+
+-- The glyf table depends on the loca table. We have one entry to much
+-- in the locations table (the last one is a dummy) because we need to
+-- calculate the size of a glyph blob from the delta, although we not
+-- need it in our usage (yet). We can remove the locations table when
+-- we're done (todo: cleanup finalizer).
+
+function readers.loca(f,fontdata,specification)
+ if specification.glyphs then
+ local datatable = fontdata.tables.loca
+ if datatable then
+ -- locations are relative to the glypdata table (glyf)
+ local offset = fontdata.tables.glyf.offset
+ local format = fontdata.fontheader.indextolocformat
+ local locations = { }
+ setposition(f,datatable.offset)
+ if format == 1 then
+ local nofglyphs = datatable.length/4 - 1
+ -1
+ for i=0,nofglyphs do
+ locations[i] = offset + readulong(f)
+ end
+ fontdata.nofglyphs = nofglyphs
+ else
+ local nofglyphs = datatable.length/2 - 1
+ -1
+ for i=0,nofglyphs do
+ locations[i] = offset + readushort(f) * 2
+ end
+ fontdata.nofglyphs = nofglyphs
+ end
+ fontdata.locations = locations
+ end
+ end
+end
+
+function readers.glyf(f,fontdata,specification) -- part goes to cff module
+ if specification.glyphs then
+ local datatable = fontdata.tables.glyf
+ if datatable then
+ local locations = fontdata.locations
+ if locations then
+ local glyphs = fontdata.glyphs
+ local nofglyphs = fontdata.nofglyphs
+ local filesize = fontdata.filesize
+ local nothing = { 0, 0, 0, 0 }
+ local shapes = { }
+ local loadshapes = specification.shapes
+ for index=0,nofglyphs do
+ local location = locations[index]
+ if location >= filesize then
+ report("discarding %s glyphs due to glyph location bug",nofglyphs-index+1)
+ fontdata.nofglyphs = index - 1
+ fontdata.badfont = true
+ break
+ elseif location > 0 then
+ setposition(f,location)
+ local nofcontours = readshort(f)
+ glyphs[index].boundingbox = {
+ readshort(f), -- xmin
+ readshort(f), -- ymin
+ readshort(f), -- xmax
+ readshort(f), -- ymax
+ }
+ if not loadshapes then
+ -- save space
+ elseif nofcontours == 0 then
+ shapes[index] = readnothing(f,nofcontours)
+ elseif nofcontours > 0 then
+ shapes[index] = readglyph(f,nofcontours)
+ else
+ shapes[index] = readcomposite(f,nofcontours)
+ end
+ else
+ if loadshapes then
+ shapes[index] = { }
+ end
+ glyphs[index].boundingbox = nothing
+ end
+ end
+ if loadshapes then
+ mergecomposites(glyphs,shapes)
+ contours2outlines(glyphs,shapes)
+ end
+ end
+ end
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/font-uni.mkiv b/Master/texmf-dist/tex/context/base/mkiv/font-uni.mkiv
index 91a488ff205..91a488ff205 100644
--- a/Master/texmf-dist/tex/context/base/font-uni.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-uni.mkiv
diff --git a/Master/texmf-dist/tex/context/base/font-unk.mkiv b/Master/texmf-dist/tex/context/base/mkiv/font-unk.mkiv
index 988e5df3d3c..988e5df3d3c 100644
--- a/Master/texmf-dist/tex/context/base/font-unk.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-unk.mkiv
diff --git a/Master/texmf-dist/tex/context/base/font-var.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-var.mkvi
index fb60b711cef..fb60b711cef 100644
--- a/Master/texmf-dist/tex/context/base/font-var.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-var.mkvi
diff --git a/Master/texmf-dist/tex/context/base/font-vf.lua b/Master/texmf-dist/tex/context/base/mkiv/font-vf.lua
index 1fe6dd71c1d..7037c6c8be6 100644
--- a/Master/texmf-dist/tex/context/base/font-vf.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-vf.lua
@@ -23,37 +23,38 @@ local fastcopy = table.fastcopy
local fonts = fonts
local constructors = fonts.constructors
local vf = constructors.newhandler("vf")
-
--- general code
-
-function vf.find(name)
- name = file.removesuffix(file.basename(name))
- if constructors.resolvevirtualtoo then
- local format = fonts.loggers.format(name)
- if format == 'tfm' or format == 'ofm' then
- if trace_defining then
- report_defining("locating vf for %a",name)
- end
- return findbinfile(name,"ovf")
- else
- if trace_defining then
- report_defining("vf for %a is already taken care of",name)
- end
- return nil -- ""
- end
- else
- if trace_defining then
- report_defining("locating vf for %a",name)
- end
- return findbinfile(name,"ovf")
- end
-end
+vf.version = 1.000 -- same as tfm
--[[ldx--
<p>We overload the <l n='vf'/> reader.</p>
--ldx]]--
-callbacks.register('find_vf_file', vf.find, "locating virtual fonts, insofar needed") -- not that relevant any more
+-- general code / already frozen
+--
+-- function vf.find(name)
+-- name = file.removesuffix(file.basename(name))
+-- if constructors.resolvevirtualtoo then
+-- local format = fonts.loggers.format(name)
+-- if format == 'tfm' or format == 'ofm' then
+-- if trace_defining then
+-- report_defining("locating vf for %a",name)
+-- end
+-- return findbinfile(name,"ovf") or ""
+-- else
+-- if trace_defining then
+-- report_defining("vf for %a is already taken care of",name)
+-- end
+-- return ""
+-- end
+-- else
+-- if trace_defining then
+-- report_defining("locating vf for %a",name)
+-- end
+-- return findbinfile(name,"ovf") or ""
+-- end
+-- end
+--
+-- callbacks.register('find_vf_file', vf.find, "locating virtual fonts, insofar needed") -- not that relevant any more
-- specific code (will move to other module)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-xtx.lua b/Master/texmf-dist/tex/context/base/mkiv/font-xtx.lua
new file mode 100644
index 00000000000..494ac00a928
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-xtx.lua
@@ -0,0 +1,97 @@
+if not modules then modules = { } end modules ['luatex-fonts-def'] = {
+ version = 1.001,
+ comment = "companion to luatex-*.tex",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+if context then
+ texio.write_nl("fatal error: this module is not for context")
+ os.exit()
+end
+
+local fonts = fonts
+
+-- A bit of tuning for definitions.
+
+fonts.constructors.namemode = "specification" -- somehow latex needs this (changed name!) => will change into an overload
+
+-- tricky: we sort of bypass the parser and directly feed all into
+-- the sub parser
+
+function fonts.definers.getspecification(str)
+ return "", str, "", ":", str
+end
+
+-- the generic name parser (different from context!)
+
+local list = { }
+
+local function issome () list.lookup = 'name' end -- xetex mode prefers name (not in context!)
+local function isfile () list.lookup = 'file' end
+local function isname () list.lookup = 'name' end
+local function thename(s) list.name = s end
+local function issub (v) list.sub = v end
+local function iscrap (s) list.crap = string.lower(s) end
+local function iskey (k,v) list[k] = v end
+local function istrue (s) list[s] = true end
+local function isfalse(s) list[s] = false end
+
+local P, S, R, C = lpeg.P, lpeg.S, lpeg.R, lpeg.C
+
+local spaces = P(" ")^0
+local namespec = (1-S("/:("))^0 -- was: (1-S("/: ("))^0
+local crapspec = spaces * P("/") * (((1-P(":"))^0)/iscrap) * spaces
+local filename_1 = P("file:")/isfile * (namespec/thename)
+local filename_2 = P("[") * P(true)/isname * (((1-P("]"))^0)/thename) * P("]")
+local fontname_1 = P("name:")/isname * (namespec/thename)
+local fontname_2 = P(true)/issome * (namespec/thename)
+local sometext = (R("az","AZ","09") + S("+-.{}"))^1
+local truevalue = P("+") * spaces * (sometext/istrue)
+local falsevalue = P("-") * spaces * (sometext/isfalse)
+local keyvalue = (C(sometext) * spaces * P("=") * spaces * C(sometext))/iskey
+local somevalue = sometext/istrue
+local subvalue = P("(") * (C(P(1-S("()"))^1)/issub) * P(")") -- for Kim
+local option = spaces * (keyvalue + falsevalue + truevalue + somevalue) * spaces
+local options = P(":") * spaces * (P(";")^0 * option)^0
+
+local pattern = (filename_1 + filename_2 + fontname_1 + fontname_2) * subvalue^0 * crapspec^0 * options^0
+
+local function colonized(specification) -- xetex mode
+ list = { }
+ lpeg.match(pattern,specification.specification)
+ list.crap = nil -- style not supported, maybe some day
+ if list.name then
+ specification.name = list.name
+ list.name = nil
+ end
+ if list.lookup then
+ specification.lookup = list.lookup
+ list.lookup = nil
+ end
+ if list.sub then
+ specification.sub = list.sub
+ list.sub = nil
+ end
+ specification.features.normal = fonts.handlers.otf.features.normalize(list)
+ return specification
+end
+
+fonts.definers.registersplit(":",colonized,"cryptic")
+fonts.definers.registersplit("", colonized,"more cryptic") -- catches \font\text=[names]
+
+function fonts.definers.applypostprocessors(tfmdata)
+ local postprocessors = tfmdata.postprocessors
+ if postprocessors then
+ for i=1,#postprocessors do
+ local extrahash = postprocessors[i](tfmdata) -- after scaling etc
+ if type(extrahash) == "string" and extrahash ~= "" then
+ -- e.g. a reencoding needs this
+ extrahash = string.gsub(lower(extrahash),"[^a-z]","-")
+ tfmdata.properties.fullname = format("%s-%s",tfmdata.properties.fullname,extrahash)
+ end
+ end
+ end
+ return tfmdata
+end
diff --git a/Master/texmf-dist/tex/context/base/grph-epd.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-epd.lua
index 17f04d593da..17f04d593da 100644
--- a/Master/texmf-dist/tex/context/base/grph-epd.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-epd.lua
diff --git a/Master/texmf-dist/tex/context/base/grph-epd.mkiv b/Master/texmf-dist/tex/context/base/mkiv/grph-epd.mkiv
index 2df195589b4..8152772aa48 100644
--- a/Master/texmf-dist/tex/context/base/grph-epd.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-epd.mkiv
@@ -33,7 +33,7 @@
\c!background={\v!foreground,system:graphics:epdf}]
\unexpanded\def\grph_epdf_add_overlay
- {\global\setbox\foundexternalfigure\vbox\bgroup
+ {\global\setbox\foundexternalfigure\vbox\bgroup % vpack ?
\system_graphics_epdf{\box\foundexternalfigure}%
\egroup}
diff --git a/Master/texmf-dist/tex/context/base/grph-fig.mkiv b/Master/texmf-dist/tex/context/base/mkiv/grph-fig.mkiv
index f5152874d0d..80b094d83fa 100644
--- a/Master/texmf-dist/tex/context/base/grph-fig.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-fig.mkiv
@@ -85,7 +85,7 @@
\def\grph_typesetting_process[#1][#2][#3]% <name> filename settings-b | filename options settings
{\ifcsname\??typesettingfile#1\endcsname
- \csname\??typesettingfile#1\endcsname{#2}{#3}%
+ \lastnamedcs{#2}{#3}%
\else\ifthirdargument % filename options settings
\grph_typesetting_process_indeed{#2}{#3}{#1}{}%
\else\ifsecondargument % filename settings
@@ -112,8 +112,8 @@
\let\placestopfigure\relax
\unexpanded\def\placestartfigure[#1][#2][#3]#4\placestopfigure[#5]%
- {\hbox
- {\setbox\scratchbox\hbox
+ {\hpack
+ {\setbox\scratchbox\hpack
{\useexternalfigure[\s!dummy][#2][#3,#5]%
\externalfigure[\s!dummy]}%
\grph_steps_calculate
@@ -161,10 +161,10 @@
\unexpanded\def\grph_steps_two_colorbar#1[#2]
{\begingroup
- \global\setbox\b_grph_steps_colorbar\vbox
+ \global\setbox\b_grph_steps_colorbar\vpack % \vbox ?
{\forgetall
\processcommalist[#2]\grph_colorbar_make_step}%
- \global\setbox\b_grph_steps_colorbar\vbox
+ \global\setbox\b_grph_steps_colorbar\vpack
{\hskip2\emwidth\box\b_grph_steps_colorbar}%
\global\wd\b_grph_steps_colorbar\zeropoint
\endgroup}
@@ -193,7 +193,7 @@
\unexpanded\def\teststartfigure[#1][#2][#3]#4\teststopfigure
{\begingroup
- \setbox\scratchbox\hbox
+ \setbox\scratchbox\hpack
{\useexternalfigure[\s!dummy][#2][\c!wfactor=\v!max]%
\externalfigure[\s!dummy]}%
\let\referring\grph_steps_three_referring
@@ -201,7 +201,7 @@
\let\remark \grph_steps_three_remark
\let\colorbar \grph_steps_three_colorbar
\c_grph_steps_reference\zerocount
- \setbox0\vbox
+ \setbox0\vpack
{\hsize240\points
\startpositioning
\grph_steps_calculate
@@ -232,7 +232,7 @@
\let\marking \grph_steps_four_marking
\let\remark \grph_steps_four_remark
\let\colorbar \grph_steps_four_colorbar
- \setbox2\vbox
+ \setbox2\vbox % \vpack ?
{{\tfa\doifelsenothing{#1}{#2}{#1}}
\blank
\tfxx#4
@@ -242,10 +242,10 @@
\else
\ht0\ht2
\fi
- \hbox
+ \hpack
{\hskip3\emwidth
- \vtop{\vskip12\points\box0\vskip6\points}%
- \vtop{\vskip12\points\box2\vskip6\points}}%
+ \tpack{\vskip12\points\box0\vskip6\points}%
+ \tpack{\vskip12\points\box2\vskip6\points}}%
\endgroup}
\unexpanded\def\grph_steps_three_referring(#1,#2)#3(#4,#5)#6[#7]%
@@ -263,10 +263,10 @@
\let\grph_steps_three_colorbar\grph_steps_one_colorbar
\unexpanded\def\grph_steps_four_referring
- {\grph_steps_text{$\rightarrow$}}
+ {\grph_steps_text{\normalstartimath\rightarrow\normalstopimath}}
\unexpanded\def\grph_steps_four_marking
- {\grph_steps_text{$\leftarrow$}}
+ {\grph_steps_text{\normalstartimath\leftarrow\normalstopimath}}
\let\grph_steps_four_remark \grph_steps_one_remark
\let\grph_steps_four_colorbar\grph_steps_one_colorbar
@@ -307,11 +307,11 @@
% {\position(0,0){\getvalue{#1}}}
\def\grph_steps_goto(#1,#2)#3[#4]% (h,b)kader[ref]
- {\gotobox{\vbox{\grph_steps_area(#1,#2)#3{}}}[#4]}
+ {\gotobox{\vpack{\grph_steps_area(#1,#2)#3{}}}[#4]}
\def\grph_steps_text#1(#2,#3)#4(#5,#6)#7[#8]%
{\advance\c_grph_steps_reference\plusone
- \hbox
+ \hbox % \hpack ?
{\quad
\thisissomeinternal\s!vwb
{#8}%
diff --git a/Master/texmf-dist/tex/context/base/grph-fil.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-fil.lua
index c1532ce25e3..e774d097e6e 100644
--- a/Master/texmf-dist/tex/context/base/grph-fil.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-fil.lua
@@ -11,6 +11,11 @@ local type = type
local trace_run = false trackers.register("graphic.runfile",function(v) trace_run = v end)
local report_run = logs.reporter("graphics","run")
+local isfile = lfs.isfile
+local replacesuffix = file.replacesuffix
+local addsuffix = file.addsuffix
+local checksum = file.checksum
+
-- Historically running files is part of graphics processing, so this is why it
-- sits here but is part of the job namespace.
@@ -27,6 +32,9 @@ local jobfiles = {
job.files = jobfiles
+local inputsuffix = "tex"
+local resultsuffix = "pdf"
+
local function initializer()
tobesaved = jobfiles.tobesaved
collected = jobfiles.collected
@@ -35,9 +43,11 @@ end
job.register('job.files.collected', tobesaved, initializer)
function jobfiles.run(name,action)
- local oldchecksum = collected[name]
- local newchecksum = file.checksum(name)
- if jobfiles.forcerun or not oldchecksum or oldchecksum ~= newchecksum then
+ local usedname = addsuffix(name,inputsuffix) -- we assume tex if not set
+ local oldchecksum = collected[usedname]
+ local newchecksum = checksum(usedname)
+ local resultfile = replacesuffix(usedname,resultsuffix)
+ if jobfiles.forcerun or not oldchecksum or oldchecksum ~= newchecksum or not isfile(resultfile) then
if trace_run then
report_run("processing file, changes in %a, processing forced",name)
end
@@ -57,6 +67,8 @@ end
--
+local done = { }
+
function jobfiles.context(name,options)
if type(name) == "table" then
local result = { }
@@ -65,8 +77,12 @@ function jobfiles.context(name,options)
end
return result
else
- jobfiles.run(name,"context ".. (options or "") .. " " .. name)
- return file.replacesuffix(name,"pdf")
+ local result = replacesuffix(name,resultsuffix)
+ if not done[result] then
+ jobfiles.run(name,"context ".. (options or "") .. " " .. name)
+ done[result] = true
+ end
+ return result
end
end
diff --git a/Master/texmf-dist/tex/context/base/grph-inc.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-inc.lua
index 8a064c8e9c8..cf4a702697f 100644
--- a/Master/texmf-dist/tex/context/base/grph-inc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-inc.lua
@@ -132,7 +132,7 @@ function images.check(figure)
report_inclusion("limiting natural dimensions of %a, old %p * %p, new %p * %p",
figure.filename,width,height,figure.width,figure.height)
end
- if width >=maxdimen or height >= maxdimen then
+ if width >= maxdimen or height >= maxdimen then
report_inclusion("image %a is too large (%p,%p), discarding",
figure.filename,width,height)
return false, "dimensions too large"
@@ -408,7 +408,7 @@ function figures.registerresource(t)
return n
end
-local function register(tag,target,what)
+local function register(tag,what,target)
local data = figures_formats[target] -- resolver etc
if not data then
data = { }
@@ -426,8 +426,8 @@ local function register(tag,target,what)
setlookups()
end
-function figures.registersuffix (suffix, target) register('list', target,suffix ) end
-function figures.registerpattern(pattern,target) register('pattern',target,pattern) end
+function figures.registersuffix (suffix, target) register('list',suffix,target) end
+function figures.registerpattern(pattern,target) register('pattern',pattern,target) end
implement { name = "registerfiguresuffix", actions = register, arguments = { "'list'", "string", "string" } }
implement { name = "registerfigurepattern", actions = register, arguments = { "'pattern'", "string", "string" } }
@@ -582,7 +582,23 @@ local function get(category,tag,default)
end
end
+local function setdimensions(box)
+ local status = lastfiguredata and lastfiguredata.status
+ local used = lastfiguredata and lastfiguredata.used
+ if status and used then
+ local b = texgetbox(box)
+ local w = b.width
+ local h = b.height + b.depth
+ status.width = w
+ status.height = h
+ used.width = w
+ used.height = h
+ status.status = 10
+ end
+end
+
figures.get = get
+figures.set = setdimensions
implement { name = "figurestatus", actions = { get, context }, arguments = { "'status'", "string", "string" } }
implement { name = "figurerequest", actions = { get, context }, arguments = { "'request'", "string", "string" } }
@@ -592,6 +608,8 @@ implement { name = "figurefilepath", actions = { get, file.dirname, context },
implement { name = "figurefilename", actions = { get, file.nameonly, context }, arguments = { "'used'", "'fullname'" } }
implement { name = "figurefiletype", actions = { get, file.extname, context }, arguments = { "'used'", "'fullname'" } }
+implement { name = "figuresetdimensions", actions = setdimensions, arguments = { "integer" } }
+
-- todo: local path or cache path
local function forbiddenname(filename)
@@ -1345,13 +1363,13 @@ local function checkers_nongeneric(data,command) -- todo: macros and context.*
local hash = name
if dr.object then
-- hm, bugged ... waiting for an xform interface
- if not job.objects.get("FIG::"..hash) then
+ if not objects.data["FIG"][hash] then
if type(command) == "function" then
command()
end
- context.dosetfigureobject(hash)
+ context.dosetfigureobject("FIG",hash)
end
- context.doboxfigureobject(hash)
+ context.doboxfigureobject("FIG",hash)
elseif type(command) == "function" then
command()
end
@@ -1464,11 +1482,11 @@ includers.buffers = includers.nongeneric
function existers.auto(askedname)
local name = gsub(askedname, ".auto$", "")
local format = figures.guess(name)
- if format then
- report_inclusion("format guess %a for %a",format,name)
- else
- report_inclusion("format guess for %a is not possible",name)
- end
+ -- if format then
+ -- report_inclusion("format guess %a for %a",format,name)
+ -- else
+ -- report_inclusion("format guess for %a is not possible",name)
+ -- end
return format and name, true, format
end
@@ -1602,7 +1620,7 @@ directives.register("graphics.conversion.eps.cleanup.ai",function(v) cleanups.ai
cleaners.ai = function(name)
local tmpname = name .. ".tmp"
- io.savedata(tmpname,lpegmatch(pattern,io.loaddata(name)))
+ io.savedata(tmpname,lpegmatch(pattern,io.loaddata(name) or ""))
return tmpname
end
@@ -1611,6 +1629,9 @@ function epsconverter.pdf(oldname,newname,resolution,colorspace) -- the resoluti
local presets = epstopdf.resolutions[resolution or "high"] or epstopdf.resolutions.high
local level = codeinjections.getformatoption("pdf_level") or "1.3"
local tmpname = oldname
+ if not tmpname or tmpname == "" or not lfs.isfile(tmpname) then
+ return
+ end
if cleanups.ai then
tmpname = cleaners.ai(oldname)
end
@@ -2084,3 +2105,15 @@ implement {
figures.defaultheight = height
end
}
+
+-- require("util-lib-imp-gm")
+--
+-- figures.converters.tif.pdf = function(oldname,newname,resolution)
+-- logs.report("graphics","using gm library to convert %a",oldname)
+-- utilities.graphicmagick.convert {
+-- inputname = oldname,
+-- outputname = newname,
+-- }
+-- end
+--
+-- \externalfigure[t:/sources/hakker1b.tiff]
diff --git a/Master/texmf-dist/tex/context/base/grph-inc.mkiv b/Master/texmf-dist/tex/context/base/mkiv/grph-inc.mkiv
index 6b7f2bd6359..deba82c583d 100644
--- a/Master/texmf-dist/tex/context/base/grph-inc.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-inc.mkiv
@@ -370,7 +370,7 @@
\let\dowithfigure\relax % name might change (into a proper hook)
\unexpanded\def\doscalefigure % used at lua end
- {\global\setbox\foundexternalfigure\vbox{\scale[\v!figure]{\dowithfigure{\box\foundexternalfigure}}}}
+ {\global\setbox\foundexternalfigure\vpack{\scale[\v!figure]{\dowithfigure{\box\foundexternalfigure}}}}
\definescale % some day we will inherit
[\v!figure]
@@ -543,24 +543,24 @@
%D Internal graphics are handled at the \TEX\ end:
\def\grph_include_process_tex#1%
- {\global\setbox\foundexternalfigure\vbox\framed
+ {\framed
[\c!strut=\v!no,\c!align=\v!normal,\c!frame=\v!off,
\c!offset=\v!overlay,\c!width=\v!fit,\c!height=\v!fit]
{\blank[\v!disable]#1\endgraf\removelastskip}} % disable should stay here!
% used al lua end:
-\unexpanded\def\docheckfigurebuffer #1{\grph_include_process_tex{\getbuffer[#1]}}
-\unexpanded\def\docheckfiguretex #1{\grph_include_process_tex{\input{#1}}}
-\unexpanded\def\docheckfigurecld #1{\global\setbox\foundexternalfigure\vbox{\cldprocessfile{#1}}}
-\unexpanded\def\docheckfiguremps #1{\global\setbox\foundexternalfigure\vbox{\convertMPtoPDF{#1}11}}
-\unexpanded\def\docheckfiguremprun #1#2{\global\setbox\foundexternalfigure\vbox{\useMPrun{#1}{#2}}}
+\unexpanded\def\docheckfigurebuffer #1{\global\setbox\foundexternalfigure\vpack{\grph_include_process_tex{\getbuffer[#1]}}}
+\unexpanded\def\docheckfiguretex #1{\global\setbox\foundexternalfigure\vpack{\grph_include_process_tex{\input{#1}}}}
+\unexpanded\def\docheckfigurecld #1{\global\setbox\foundexternalfigure\vbox {\cldprocessfile{#1}}}
+\unexpanded\def\docheckfiguremps #1{\global\setbox\foundexternalfigure\vpack{\convertMPtoPDF{#1}11}}
+\unexpanded\def\docheckfiguremprun #1#2{\global\setbox\foundexternalfigure\vpack{\useMPrun{#1}{#2}}}
\unexpanded\def\relocateexternalfigure % easier here than in lua
- {\global\setbox\foundexternalfigure\vbox to \ht\foundexternalfigure\bgroup
+ {\global\setbox\foundexternalfigure\vpack to \ht\foundexternalfigure\bgroup
\vss
\ht\foundexternalfigure\zeropoint
- \hbox to \wd\foundexternalfigure\bgroup
+ \hpack to \wd\foundexternalfigure\bgroup
\box\foundexternalfigure
\hss
\egroup
@@ -664,13 +664,14 @@
\externalfigure[#1][#2,\c!display=,\c!mask=,\c!object=\v!no]%
\stopnointerference}
-% Helpers (will be replaced when xforms are accessible at the lua end)
+% Helpers will be replaced when xforms are accessible at the lua end but then
+% we need to do the object offset there too.
-\unexpanded\def\dosetfigureobject#1%
- {\setobject{FIG}{#1}\vbox{\box\foundexternalfigure}}
+\unexpanded\def\dosetfigureobject#1#2%
+ {\setobject{#1}{#2}\vpack{\box\foundexternalfigure}}
-\unexpanded\def\doboxfigureobject#1%
- {\global\setbox\foundexternalfigure\vbox{\getobject{FIG}{#1}}} % probably one vbox too many
+\unexpanded\def\doboxfigureobject#1#2%
+ {\global\setbox\foundexternalfigure\vpack{\getobject{#1}{#2}}} % probably one vbox too many
% Figure bases
@@ -781,8 +782,16 @@
% Bonus:
\useexternalfigure
- [buffer]
+ [\v!buffer]
[\jobname.buffer]
[\c!object=\v!no]
+% Another one:
+
+\defineexternalfigure
+ [\v!inline]
+ [\c!height=\lineheight]
+
+\unexpanded\def\inlinefigure[#1]{\dontleavehmode\sbox{\externalfigure[#1][\v!inline]}}
+
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/grph-raw.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-raw.lua
index 62e96fcc9d7..62e96fcc9d7 100644
--- a/Master/texmf-dist/tex/context/base/grph-raw.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-raw.lua
diff --git a/Master/texmf-dist/tex/context/base/grph-raw.mkiv b/Master/texmf-dist/tex/context/base/mkiv/grph-raw.mkiv
index 8978ba2671b..8978ba2671b 100644
--- a/Master/texmf-dist/tex/context/base/grph-raw.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-raw.mkiv
diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-rul.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-rul.lua
new file mode 100644
index 00000000000..5d3cb8ad5d1
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-rul.lua
@@ -0,0 +1,185 @@
+if not modules then modules = { } end modules ['grph-rul'] = {
+ version = 1.001,
+ comment = "companion to grph-rul.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local attributes = attributes
+local nodes = nodes
+local context = context
+
+local ruleactions = nodes.rules.ruleactions
+local userrule = nodes.rules.userrule
+local bpfactor = number.dimenfactors.bp
+local pdfprint = pdf.print
+
+local getattribute = tex.getattribute
+
+local a_color = attributes.private('color')
+local a_transparency = attributes.private('transparency')
+local a_colorspace = attributes.private('colormodel')
+
+local mpcolor = attributes.colors.mpcolor
+
+local floor = math.floor
+local random = math.random
+
+do
+
+ local simplemetapost = metapost.simple
+ local cachesize = 0
+ local maxcachesize = 256*1024
+ local cachethreshold = 1024
+
+ -- local maxcachesize = 8*1024
+ -- local cachethreshold = 1024/2
+
+ local cache = table.setmetatableindex(function(t,k)
+ local v = simplemetapost("rulefun",k) -- w, h, d
+ cachesize = cachesize + #v
+ if cachesize > maxcachesize then
+ -- print("old",cachesize)
+ for k, v in next, t do
+ local n = #v
+ if n > cachethreshold then
+ t[k] = nil
+ cachesize = cachesize - n
+ end
+ end
+ -- print("new",cachesize)
+ end
+ -- print(cachesize,maxcachesize,cachethreshold,#v)
+ t[k] = v
+ return v
+ end)
+
+ local replacer = utilities.templates.replacer
+
+ local predefined = {
+ ["fake:word"] = replacer [[
+FakeWord(%width%,%height%,%depth%,%line%,%color%);
+ ]],
+ ["fake:rule"] = replacer[[
+FakeRule(%width%,%height%,%depth%,%line%,%color%);
+ ]],
+ ["fake:rest"] = replacer [[
+RuleWidth := %width% ;
+RuleHeight := %height% ;
+RuleDepth := %depth% ;
+RuleThickness := %line% ;
+RuleFactor := %factor% ;
+RuleOffset := %offset% ;
+def RuleColor = %color% enddef ;
+%data%;
+ ]]
+ }
+
+ ruleactions.mp = function(p,h,v,i,n)
+ local name = p.name or "fake:rest"
+ local code = (predefined[name] or predefined["fake:rest"]) {
+ data = p.data or "",
+ width = p.width * bpfactor,
+ height = p.height * bpfactor,
+ depth = p.depth * bpfactor,
+ factor = (p.factor or 0) * bpfactor, -- needs checking
+ offset = p.offset or 0,
+ line = (p.line or 65536) * bpfactor,
+ color = mpcolor(p.ma,p.ca,p.ta),
+ }
+ local m = cache[code]
+ if m and m ~= "" then
+ pdfprint("direct",m)
+ end
+ end
+
+end
+
+do
+
+ local f_rectangle = string.formatters["%F w %F %F %F %F re %s"]
+ local f_radtangle = string.formatters[ [[
+ %F w %F %F m
+ %F %F l %F %F %F %F y
+ %F %F l %F %F %F %F y
+ %F %F l %F %F %F %F y
+ %F %F l %F %F %F %F y
+ h %s
+ ]] ]
+
+ ruleactions.fill = function(p,h,v,i,n)
+ local l = (p.line or 65536)*bpfactor
+ local r = p and (p.radius or 0)*bpfactor or 0
+ local w = h * bpfactor
+ local h = v * bpfactor
+ local m = nil
+ local t = i == "fill" and "f" or "s"
+ local o = l / 2
+ if r > 0 then
+ w = w - o
+ h = h - o
+ m = f_radtangle(l, r,o, w-r,o, w,o,w,r, w,h-r, w,h,w-r,h, r,h, o,h,o,h-r, o,r, o,o,r,o, t)
+ else
+ w = w - l
+ h = h - l
+ m = f_rectangle(l,o,o,w,h,t)
+ end
+ pdfprint("direct",m)
+ end
+
+ ruleactions.draw = ruleactions.fill
+ ruleactions.stroke = ruleactions.fill
+
+end
+
+interfaces.implement {
+ name = "frule",
+ arguments = { {
+ { "width", "dimension" },
+ { "height", "dimension" },
+ { "depth", "dimension" },
+ { "radius", "dimension" },
+ { "line", "dimension" },
+ { "type", "string" },
+ { "data", "string" },
+ { "name", "string" },
+ } } ,
+ actions = function(t)
+ if t.type == "mp" then
+ t.ma = getattribute(a_colorspace) or 1
+ t.ca = getattribute(a_color)
+ t.ta = getattribute(a_transparency)
+ end
+ local r = userrule(t)
+ context(r)
+ end
+}
+
+interfaces.implement {
+ name = "fakeword",
+ arguments = { {
+ { "factor", "dimension" },
+ { "name", "string" }, -- can be type
+ { "min", "dimension" },
+ { "max", "dimension" },
+ { "n", "integer" },
+ } } ,
+ actions = function(t)
+ local factor = t.factor or 0
+ local rule = userrule {
+ height = 1.25*factor,
+ depth = 0.25*factor,
+ width = floor(random(t.min,t.max)/10000) * 10000,
+ line = 0.10*factor,
+ ma = getattribute(a_colorspace) or 1,
+ ca = getattribute(a_color),
+ ta = getattribute(a_transparency),
+ type = "mp",
+ name = t.name,
+ }
+ context(rule)
+ end
+}
+
+
diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-rul.mkiv b/Master/texmf-dist/tex/context/base/mkiv/grph-rul.mkiv
new file mode 100644
index 00000000000..98aab36506e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-rul.mkiv
@@ -0,0 +1,89 @@
+%D \module
+%D [ file=grph-rul,
+%D version=2016.02.05, % from experiments
+%D title=\CONTEXT\ Graphic Macros,
+%D subtitle=Rule Trickery,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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 Graphic Macros / Rule Trickery}
+
+\registerctxluafile{grph-rul}{1.001}
+
+\unprotect
+
+\unexpanded\def\frule{\relax\clf_frule} % kind of low level
+
+% just for fun:
+
+% \defineoverlay[normalframe]
+% [\frule
+% width \overlaywidth
+% height\overlayheight
+% line \overlaylinewidth
+% \relax]
+
+% \defineoverlay[ovalframe]
+% [\frule
+% width \overlaywidth
+% height \overlayheight
+% line \overlaylinewidth
+% radius \overlayradius
+% \relax]
+
+\protect \endinput
+
+% \starttext
+%
+% \testfeatureonce{25}{\dontleavehmode
+% \ruledhbox\bgroup
+% \red \frule width 2cm height 2cm depth 1cm radius 2mm line 2pt type fill\relax
+% \hskip-2cm
+% \green \frule width 2cm height 2cm depth 1cm radius 2mm line 2pt\relax
+% \egroup
+% \space}
+%
+% \blank
+%
+% \startuseMPgraphic{demoshape:back}
+% fill
+% unitcircle xysized (RuleWidth,RuleHeight+RuleDepth)
+% withcolor RuleColor ;
+% \stopuseMPgraphic
+%
+% \startuseMPgraphic{demoshape:fore}
+% draw
+% unitcircle xysized (RuleWidth,RuleHeight+RuleDepth)
+% withcolor RuleColor
+% withpen pencircle scaled RuleThickness ;
+% \stopuseMPgraphic
+%
+% \testfeatureonce{100}{\dontleavehmode
+% \ruledhbox\bgroup
+% \red \frule width 1cm height 3mm depth 1mm type mp line 2pt data {\includeMPgraphic{demoshape:back}}\relax
+% \hskip-1cm
+% \green \frule width 1cm height 3mm depth 1mm type mp line 2pt data {\includeMPgraphic{demoshape:fore}}\relax
+% \egroup
+% \space}
+%
+% \blank
+%
+% \dontleavehmode
+% \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed {test}}}
+% \framed {test}
+% \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[background=normalframe,frame=off]{test}}}
+% \framed[background=normalframe,frame=off]{test}
+% \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[corner=round] {test}}}
+% \framed[corner=round] {test}
+% \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[background=ovalframe,frame=off] {test}}}
+% \framed[background=ovalframe,frame=off] {test}
+% \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[background=ovalframe,frame=on] {test}}}
+% \framed[background=ovalframe,frame=on] {test}
+%
+% \stoptext
+
diff --git a/Master/texmf-dist/tex/context/base/grph-swf.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-swf.lua
index 8c28b76afae..8c28b76afae 100644
--- a/Master/texmf-dist/tex/context/base/grph-swf.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-swf.lua
diff --git a/Master/texmf-dist/tex/context/base/grph-trf.mkiv b/Master/texmf-dist/tex/context/base/mkiv/grph-trf.mkiv
index fca5c7cf6ef..099efa1140f 100644
--- a/Master/texmf-dist/tex/context/base/grph-trf.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-trf.mkiv
@@ -140,7 +140,7 @@
%
\d_grph_scale_dp\dp\nextbox
\ifx\p_depth\v!no \ifzeropt\d_grph_scale_dp \else
- \setbox\nextbox\hbox{\raise\d_grph_scale_dp\box\nextbox}% new
+ \setbox\nextbox\hpack{\raise\d_grph_scale_dp\box\nextbox}% new
\d_grph_scale_dp\dp\nextbox
\fi \fi
\d_grph_scale_wd\wd\nextbox
@@ -169,7 +169,7 @@
{\d_grph_scale_wd\finalscaleboxxscale\d_grph_scale_wd
\d_grph_scale_ht\finalscaleboxyscale\d_grph_scale_ht
\d_grph_scale_dp\finalscaleboxyscale\d_grph_scale_dp
- \setbox\nextbox\hbox
+ \setbox\nextbox\hpack
{\dostartscaling \finalscaleboxxscale \finalscaleboxyscale
\smashedbox\nextbox
\dostopscaling}%
@@ -300,7 +300,7 @@
{\ifx\p_maxwidth \empty\else \edef\p_maxwidth {\the\dimexpr\p_maxwidth }\fi
\ifx\p_maxheight\empty\else \edef\p_maxheight{\the\dimexpr\p_maxheight }\fi
\ifx\p_lines \empty\else \edef\p_height {\the\dimexpr\p_lines\lineheight}\fi
- \getvalue{\??scalegrid\scaleparameter\c!grid}}
+ \csname\??scalegrid\scaleparameter\c!grid\endcsname}
\def\grph_scale_by_nature % where ! ! ! ! !
{\ifx\p_width \empty\else \global\d_grph_scale_used_x_size\p_width \fi
@@ -676,13 +676,13 @@
{\ifx\p_equalwidth\empty \else
\scratchdimen\p_equalwidth\relax
\ifdim\d_grph_scale_wd<\scratchdimen
- \setbox\nextbox\hbox to \scratchdimen{\hss\box\nextbox\hss}%
+ \setbox\nextbox\hpack to \scratchdimen{\hss\box\nextbox\hss}%
\fi
\fi
\ifx\p_equalheight\empty \else
\scratchdimen\p_equalheight\relax
\ifdim\d_grph_scale_ht<\scratchdimen
- \setbox\nextbox\vbox to \scratchdimen{\vss\box\nextbox\vss}%
+ \setbox\nextbox\vpack to \scratchdimen{\vss\box\nextbox\vss}%
\fi
\fi}
@@ -839,7 +839,7 @@
\scratchheight\clippingparameter\c!sy\scratchheight
\advance\scratchyoffset \ht\nextbox
\fi
- \setbox\nextbox\hbox
+ \setbox\nextbox\hpack
{\advance\scratchxoffset -\clippingparameter\c!leftoffset \relax
\advance\scratchyoffset -\clippingparameter\c!bottomoffset\relax
\hskip-\scratchxoffset
@@ -848,13 +848,13 @@
\wd\nextbox\zeropoint
\ht\nextbox\zeropoint
\dp\nextbox\zeropoint
- \setbox\nextbox\hbox
+ \setbox\nextbox\hpack
{\advance\scratchwidth \dimexpr\clippingparameter\c!leftoffset +\clippingparameter\c!rightoffset\relax
\advance\scratchheight\dimexpr\clippingparameter\c!bottomoffset+\clippingparameter\c!topoffset \relax
\dostartclipping{\clippingparameter\c!mp}\scratchwidth\scratchheight
\box\nextbox
\dostopclipping}%
- \setbox\nextbox\hbox
+ \setbox\nextbox\hpack
{\hskip-\clippingparameter\c!leftoffset
\lower \clippingparameter\c!bottomoffset
\box\nextbox}%
@@ -912,7 +912,7 @@
{\scratchdimen\wd\nextbox
% better use an hbox (if no \forgetall, leftskip etc may creep in)
%\setbox\nextbox\vbox{\forgetall\dostartmirroring\hskip-\wd\nextbox\box\nextbox\dostopmirroring}%
- \setbox\nextbox\hbox{\dostartmirroring\hskip-\wd\nextbox\box\nextbox\dostopmirroring}%
+ \setbox\nextbox\hpack{\dostartmirroring\hskip-\wd\nextbox\box\nextbox\dostopmirroring}%
\wd\nextbox\scratchdimen
\box\nextbox
\egroup}
@@ -1100,19 +1100,19 @@
{\csname\??rotatepreset
\ifcsname\??rotatepreset\p_rotation_rotation\endcsname\p_rotation_rotation\else\v!default\fi
\endcsname
- \setbox\nextbox\vbox{\box\nextbox}% not really needed
+ \setbox\nextbox\vpack{\box\nextbox}% not really needed
\dontcomplain
\ifconditional\c_grph_rotate_center
\d_grph_rotate_saved_width \wd\nextbox
\d_grph_rotate_saved_height\ht\nextbox
\d_grph_rotate_saved_depth \dp\nextbox
- \setbox\nextbox\vbox{\vskip.5\ht\nextbox\hskip-.5\wd\nextbox\box\nextbox}%
+ \setbox\nextbox\vpack{\vskip.5\ht\nextbox\hskip-.5\wd\nextbox\box\nextbox}%
\smashbox\nextbox
\fi
\d_grph_rotate_width \wd\nextbox
\d_grph_rotate_height\ht\nextbox
\d_grph_rotate_depth \dp\nextbox
- \setbox\nextbox\vbox{\hbox{\raise\dp\nextbox\box\nextbox}}%
+ \setbox\nextbox\vpack{\hpack{\raise\dp\nextbox\box\nextbox}}%
\d_grph_rotate_used_height \ht\nextbox
% much of the next happens in lua (all the sin and cos) so we can do that in
% one go if needed
@@ -1143,7 +1143,7 @@
\fi\fi
\fi
\ifconditional\c_grph_rotate_center
- \setbox\nextbox\vbox{\vskip-.5\d_grph_rotate_saved_height\hskip.5\d_grph_rotate_saved_height\box\nextbox}%
+ \setbox\nextbox\vpack{\vskip-.5\d_grph_rotate_saved_height\hskip.5\d_grph_rotate_saved_height\box\nextbox}%
\wd\nextbox\d_grph_rotate_saved_width
\ht\nextbox\d_grph_rotate_saved_height
\dp\nextbox\d_grph_rotate_saved_depth
@@ -1209,9 +1209,9 @@
\fi}
\def\grph_rotate_apply
- {\setbox\nextbox\vbox to \d_grph_rotate_y_size
+ {\setbox\nextbox\vpack to \d_grph_rotate_y_size
{\vfill
- \hbox to \d_grph_rotate_x_size
+ \hpack to \d_grph_rotate_x_size
{\dostartrotation\p_rotation_rotation
\wd\nextbox\zeropoint
\ht\nextbox\zeropoint
@@ -1219,7 +1219,7 @@
\dostoprotation
\hfill}%
\kern\d_grph_rotate_y_position}%
- \setbox\nextbox\hbox
+ \setbox\nextbox\hpack
{\kern\dimexpr\d_grph_rotate_x_position+\d_grph_rotate_x_offset\relax
\lower\d_grph_rotate_y_offset\box\nextbox}}
diff --git a/Master/texmf-dist/tex/context/base/grph-u3d.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-u3d.lua
index 6961c55037b..6961c55037b 100644
--- a/Master/texmf-dist/tex/context/base/grph-u3d.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-u3d.lua
diff --git a/Master/texmf-dist/tex/context/base/grph-wnd.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-wnd.lua
index ebb9b11691c..ebb9b11691c 100644
--- a/Master/texmf-dist/tex/context/base/grph-wnd.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-wnd.lua
diff --git a/Master/texmf-dist/tex/context/base/hand-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/hand-ini.mkiv
index fd18e3221d0..d4bffdb14a6 100644
--- a/Master/texmf-dist/tex/context/base/hand-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/hand-ini.mkiv
@@ -48,13 +48,22 @@
% \setupfontprotrusion[quality-upright][vector=quality]
% \setupfontprotrusion[quality-slanted][vector=quality,right=1.5]
-\let\pdfadjustspacing\relax \newcount\pdfadjustspacing % a little bit protection
-\let\pdfprotrudechars\relax \newcount\pdfprotrudechars % a little bit protection
+\let\adjustspacing\relax \newcount\adjustspacing % a little bit protection
+\let\protrudechars\relax \newcount\protrudechars % a little bit protection
-\def\font_expansion_enable {\normalpdfadjustspacing\plustwo } % these will become normal primitives
-\def\font_expansion_disable {\normalpdfadjustspacing\zerocount} % these will become normal primitives
-\def\font_protruding_enable {\normalpdfprotrudechars\plustwo } % these will become normal primitives
-\def\font_protruding_disable{\normalpdfprotrudechars\zerocount} % these will become normal primitives
+% at some point we can introduce extreme expansion, i.e. \normaladjustspacing\plustwo
+
+% 0 = disabled
+% 1 = notused (thesis)
+% 2 = glyph + kern
+% 3 = glyph only
+
+\def\font_expansion_enable {\normaladjustspacing\plusthree}
+\def\font_expansion_enable_k{\normaladjustspacing\plustwo}
+\def\font_expansion_disable {\normaladjustspacing\zerocount}
+
+\def\font_protruding_enable {\normalprotrudechars\plustwo }
+\def\font_protruding_disable{\normalprotrudechars\zerocount}
\appendtoks \font_expansion_disable \to \everyforgetall % Here or not here?
\appendtoks \font_protruding_disable \to \everyforgetall % Here or not here?
diff --git a/Master/texmf-dist/tex/context/base/java-imp-exa.mkiv b/Master/texmf-dist/tex/context/base/mkiv/java-imp-exa.mkiv
index 584ee13512d..584ee13512d 100644
--- a/Master/texmf-dist/tex/context/base/java-imp-exa.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/java-imp-exa.mkiv
diff --git a/Master/texmf-dist/tex/context/base/java-imp-fil.mkiv b/Master/texmf-dist/tex/context/base/mkiv/java-imp-fil.mkiv
index 808950f2807..808950f2807 100644
--- a/Master/texmf-dist/tex/context/base/java-imp-fil.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/java-imp-fil.mkiv
diff --git a/Master/texmf-dist/tex/context/base/java-imp-fld.mkiv b/Master/texmf-dist/tex/context/base/mkiv/java-imp-fld.mkiv
index cbd53fffb4a..cbd53fffb4a 100644
--- a/Master/texmf-dist/tex/context/base/java-imp-fld.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/java-imp-fld.mkiv
diff --git a/Master/texmf-dist/tex/context/base/java-imp-rhh.mkiv b/Master/texmf-dist/tex/context/base/mkiv/java-imp-rhh.mkiv
index 5f057f55070..5f057f55070 100644
--- a/Master/texmf-dist/tex/context/base/java-imp-rhh.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/java-imp-rhh.mkiv
diff --git a/Master/texmf-dist/tex/context/base/java-imp-stp.mkiv b/Master/texmf-dist/tex/context/base/mkiv/java-imp-stp.mkiv
index 8ac5d58b8b4..8ac5d58b8b4 100644
--- a/Master/texmf-dist/tex/context/base/java-imp-stp.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/java-imp-stp.mkiv
diff --git a/Master/texmf-dist/tex/context/base/java-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/java-ini.lua
index 069eb5ab610..069eb5ab610 100644
--- a/Master/texmf-dist/tex/context/base/java-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/java-ini.lua
diff --git a/Master/texmf-dist/tex/context/base/java-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/java-ini.mkiv
index d6fe4dd8a05..d6fe4dd8a05 100644
--- a/Master/texmf-dist/tex/context/base/java-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/java-ini.mkiv
diff --git a/Master/texmf-dist/tex/context/base/l-boolean.lua b/Master/texmf-dist/tex/context/base/mkiv/l-boolean.lua
index 8f18d4c003d..8f18d4c003d 100644
--- a/Master/texmf-dist/tex/context/base/l-boolean.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-boolean.lua
diff --git a/Master/texmf-dist/tex/context/base/l-dir.lua b/Master/texmf-dist/tex/context/base/mkiv/l-dir.lua
index 81ac65e506d..81ac65e506d 100644
--- a/Master/texmf-dist/tex/context/base/l-dir.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-dir.lua
diff --git a/Master/texmf-dist/tex/context/base/l-file.lua b/Master/texmf-dist/tex/context/base/mkiv/l-file.lua
index 7ed6370f260..7ed6370f260 100644
--- a/Master/texmf-dist/tex/context/base/l-file.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-file.lua
diff --git a/Master/texmf-dist/tex/context/base/l-function.lua b/Master/texmf-dist/tex/context/base/mkiv/l-function.lua
index 7ded8ceecd5..7ded8ceecd5 100644
--- a/Master/texmf-dist/tex/context/base/l-function.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-function.lua
diff --git a/Master/texmf-dist/tex/context/base/l-gzip.lua b/Master/texmf-dist/tex/context/base/mkiv/l-gzip.lua
index 5100e47222c..5100e47222c 100644
--- a/Master/texmf-dist/tex/context/base/l-gzip.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-gzip.lua
diff --git a/Master/texmf-dist/tex/context/base/l-io.lua b/Master/texmf-dist/tex/context/base/mkiv/l-io.lua
index a91d44d8776..a91d44d8776 100644
--- a/Master/texmf-dist/tex/context/base/l-io.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-io.lua
diff --git a/Master/texmf-dist/tex/context/base/l-lpeg.lua b/Master/texmf-dist/tex/context/base/mkiv/l-lpeg.lua
index 55a0d892988..959ca553eb8 100644
--- a/Master/texmf-dist/tex/context/base/l-lpeg.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-lpeg.lua
@@ -82,7 +82,7 @@ local lpegtype, lpegmatch, lpegprint = lpeg.type, lpeg.match, lpeg.print
-- let's start with an inspector:
if setinspector then
- setinspector(function(v) if lpegtype(v) then lpegprint(v) return true end end)
+ setinspector("lpeg",function(v) if lpegtype(v) then lpegprint(v) return true end end)
end
-- Beware, we predefine a bunch of patterns here and one reason for doing so
@@ -110,7 +110,7 @@ local underscore = P("_")
local hexdigit = digit + lowercase + uppercase
local cr, lf, crlf = P("\r"), P("\n"), P("\r\n")
----- newline = crlf + S("\r\n") -- cr + lf
-local newline = P("\r") * (P("\n") + P(true)) + P("\n")
+local newline = P("\r") * (P("\n") + P(true)) + P("\n") -- P("\r")^-1 * P("\n")^-1
local escaped = P("\\") * anything
local squote = P("'")
local dquote = P('"')
diff --git a/Master/texmf-dist/tex/context/base/l-lua.lua b/Master/texmf-dist/tex/context/base/mkiv/l-lua.lua
index 1a2a9872364..b90f37e3db3 100644
--- a/Master/texmf-dist/tex/context/base/l-lua.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-lua.lua
@@ -19,12 +19,20 @@ if not modules then modules = { } end modules ['l-lua'] = {
-- compatibility hacksand helpers
-local major, minor = string.match(_VERSION,"^[^%d]+(%d+)%.(%d+).*$")
+_MAJORVERSION, _MINORVERSION = string.match(_VERSION,"^[^%d]+(%d+)%.(%d+).*$")
-_MAJORVERSION = tonumber(major) or 5
-_MINORVERSION = tonumber(minor) or 1
+_MAJORVERSION = tonumber(_MAJORVERSION) or 5
+_MINORVERSION = tonumber(_MINORVERSION) or 1
_LUAVERSION = _MAJORVERSION + _MINORVERSION/10
+if _LUAVERSION < 5.2 and jit then
+ --
+ -- we want loadstring cum suis to behave like 5.2
+ --
+ _MINORVERSION = 2
+ _LUAVERSION = 5.2
+end
+
-- lpeg
if not lpeg then
@@ -129,22 +137,36 @@ local print, select, tostring = print, select, tostring
local inspectors = { }
-function setinspector(inspector) -- global function
- inspectors[#inspectors+1] = inspector
+function setinspector(kind,inspector) -- global function
+ inspectors[kind] = inspector
end
function inspect(...) -- global function
for s=1,select("#",...) do
local value = select(s,...)
- local done = false
- for i=1,#inspectors do
- done = inspectors[i](value)
- if done then
- break
+ if value == nil then
+ print("nil")
+ else
+ local done = false
+ -- type driven (table)
+ local kind = type(value)
+ local inspector = inspectors[kind]
+ if inspector then
+ done = inspector(value)
+ if done then
+ break
+ end
+ end
+ -- whatever driven (token, node, ...)
+ for kind, inspector in next, inspectors do
+ done = inspector(value)
+ if done then
+ break
+ end
+ end
+ if not done then
+ print(tostring(value))
end
- end
- if not done then
- print(tostring(value))
end
end
end
diff --git a/Master/texmf-dist/tex/context/base/l-math.lua b/Master/texmf-dist/tex/context/base/mkiv/l-math.lua
index ec62919b46a..ec62919b46a 100644
--- a/Master/texmf-dist/tex/context/base/l-math.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-math.lua
diff --git a/Master/texmf-dist/tex/context/base/l-md5.lua b/Master/texmf-dist/tex/context/base/mkiv/l-md5.lua
index 00272c873f1..00272c873f1 100644
--- a/Master/texmf-dist/tex/context/base/l-md5.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-md5.lua
diff --git a/Master/texmf-dist/tex/context/base/l-number.lua b/Master/texmf-dist/tex/context/base/mkiv/l-number.lua
index 001ca31f773..001ca31f773 100644
--- a/Master/texmf-dist/tex/context/base/l-number.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-number.lua
diff --git a/Master/texmf-dist/tex/context/base/l-os.lua b/Master/texmf-dist/tex/context/base/mkiv/l-os.lua
index 0a86ea6d697..0a86ea6d697 100644
--- a/Master/texmf-dist/tex/context/base/l-os.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-os.lua
diff --git a/Master/texmf-dist/tex/context/base/l-package.lua b/Master/texmf-dist/tex/context/base/mkiv/l-package.lua
index 075fcde25ae..075fcde25ae 100644
--- a/Master/texmf-dist/tex/context/base/l-package.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-package.lua
diff --git a/Master/texmf-dist/tex/context/base/l-pdfview.lua b/Master/texmf-dist/tex/context/base/mkiv/l-pdfview.lua
index 6302fd6f6ac..6302fd6f6ac 100644
--- a/Master/texmf-dist/tex/context/base/l-pdfview.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-pdfview.lua
diff --git a/Master/texmf-dist/tex/context/base/l-sandbox.lua b/Master/texmf-dist/tex/context/base/mkiv/l-sandbox.lua
index f7901379cd7..f7901379cd7 100644
--- a/Master/texmf-dist/tex/context/base/l-sandbox.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-sandbox.lua
diff --git a/Master/texmf-dist/tex/context/base/l-set.lua b/Master/texmf-dist/tex/context/base/mkiv/l-set.lua
index 2370f0139ff..2370f0139ff 100644
--- a/Master/texmf-dist/tex/context/base/l-set.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-set.lua
diff --git a/Master/texmf-dist/tex/context/base/l-string.lua b/Master/texmf-dist/tex/context/base/mkiv/l-string.lua
index 70c66f66169..e9dc2bbbcff 100644
--- a/Master/texmf-dist/tex/context/base/l-string.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-string.lua
@@ -192,10 +192,11 @@ string.itself = function(s) return s end
-- also handy (see utf variant)
-local pattern = Ct(C(1)^0) -- string and not utf !
+local pattern_c = Ct( C(1) ^0) -- string and not utf !
+local pattern_b = Ct((C(1)/byte)^0)
-function string.totable(str)
- return lpegmatch(pattern,str)
+function string.totable(str,bytes)
+ return lpegmatch(bytes and pattern_b or pattern_c,str)
end
-- handy from within tex:
diff --git a/Master/texmf-dist/tex/context/base/l-table.lua b/Master/texmf-dist/tex/context/base/mkiv/l-table.lua
index b02f210cb94..552097e1c10 100644
--- a/Master/texmf-dist/tex/context/base/l-table.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-table.lua
@@ -1144,7 +1144,7 @@ function table.print(t,...)
end
if setinspector then
- setinspector(function(v) if type(v) == "table" then serialize(print,v,"table") return true end end)
+ setinspector("table",function(v) if type(v) == "table" then serialize(print,v,"table") return true end end)
end
-- -- -- obsolete but we keep them for a while and might comment them later -- -- --
diff --git a/Master/texmf-dist/tex/context/base/l-unicode.lua b/Master/texmf-dist/tex/context/base/mkiv/l-unicode.lua
index 70b60324ac2..3dec8001345 100644
--- a/Master/texmf-dist/tex/context/base/l-unicode.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-unicode.lua
@@ -528,9 +528,10 @@ end
-- end, pattern
-- end
-function utf.remapper(mapping,option) -- static also returns a pattern
+function utf.remapper(mapping,option,action) -- static also returns a pattern
local variant = type(mapping)
if variant == "table" then
+ action = action or mapping
if option == "dynamic" then
local pattern = false
table.setmetatablenewindex(mapping,function(t,k,v) rawset(t,k,v) pattern = false end)
@@ -539,16 +540,16 @@ function utf.remapper(mapping,option) -- static also returns a pattern
return ""
else
if not pattern then
- pattern = Cs((tabletopattern(mapping)/mapping + p_utf8char)^0)
+ pattern = Cs((tabletopattern(mapping)/action + p_utf8char)^0)
end
return lpegmatch(pattern,str)
end
end
elseif option == "pattern" then
- return Cs((tabletopattern(mapping)/mapping + p_utf8char)^0)
+ return Cs((tabletopattern(mapping)/action + p_utf8char)^0)
-- elseif option == "static" then
else
- local pattern = Cs((tabletopattern(mapping)/mapping + p_utf8char)^0)
+ local pattern = Cs((tabletopattern(mapping)/action + p_utf8char)^0)
return function(str)
if not str or str == "" then
return ""
diff --git a/Master/texmf-dist/tex/context/base/l-url.lua b/Master/texmf-dist/tex/context/base/mkiv/l-url.lua
index b189ec5bba8..b189ec5bba8 100644
--- a/Master/texmf-dist/tex/context/base/l-url.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-url.lua
diff --git a/Master/texmf-dist/tex/context/base/l-xml.lua b/Master/texmf-dist/tex/context/base/mkiv/l-xml.lua
index 14e97337b25..14e97337b25 100644
--- a/Master/texmf-dist/tex/context/base/l-xml.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-xml.lua
diff --git a/Master/texmf-dist/tex/context/base/lang-def.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-def.lua
index c0c3981f7df..c0c3981f7df 100644
--- a/Master/texmf-dist/tex/context/base/lang-def.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-def.lua
diff --git a/Master/texmf-dist/tex/context/base/lang-def.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-def.mkiv
index c2fb9640cd6..e4906096e0e 100644
--- a/Master/texmf-dist/tex/context/base/lang-def.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-def.mkiv
@@ -171,7 +171,12 @@
[\c!default=\s!en,
\s!patterns=\s!gb,
\s!lefthyphenmin=3,
- \s!righthyphenmin=3]
+ \s!righthyphenmin=3,
+ % the reverse of american (or maybe the american did it the reverse)
+ \c!leftquote=\upperleftdoublesixquote,
+ \c!rightquote=\upperrightdoubleninequote,
+ \c!leftquotation=\upperleftsinglesixquote,
+ \c!rightquotation=\upperrightsingleninequote]
\installlanguage
[en-us]
@@ -591,6 +596,10 @@
\c!rightquotation=\upperrightdoubleninequote,
\c!date={\v!day,\space,\v!month,\space,\v!year}]
+\installlanguage % ancient latin
+ [\s!ala]
+ [\c!default=\s!la]
+
\installlanguage
[\s!pt]
[\c!spacing=\v!packed,
@@ -631,8 +640,6 @@
\installlanguage [\s!portuguese] [\s!pt]
\installlanguage [\s!romanian] [\s!ro]
-\defineconversion [\s!fr] [\v!day:mnem] [\frordinaldaynumber]
-
% Vietnamese Language
\installlanguage
diff --git a/Master/texmf-dist/tex/context/base/lang-dis.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-dis.lua
index db19a0fc5b8..84d9b2d5ba8 100644
--- a/Master/texmf-dist/tex/context/base/lang-dis.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-dis.lua
@@ -25,7 +25,11 @@ local getid = nuts.getid
local getfont = nuts.getfont
local getattr = nuts.getattr
local getsubtype = nuts.getsubtype
+local setsubtype = nuts.setsubtype
local getchar = nuts.getchar
+local getdisc = nuts.getdisc
+local setdisc = nuts.setdisc
+local isglyph = nuts.isglyph
local copy_node = nuts.copy
local free_node = nuts.free
@@ -45,6 +49,8 @@ local setattribute = tex.setattribute
local getlanguagedata = languages.getdata
+local check_regular = true
+
local expanders = {
[disccodes.discretionary] = function(d,template)
-- \discretionary
@@ -52,15 +58,25 @@ local expanders = {
end,
[disccodes.explicit] = function(d,template)
-- \-
- local pre = getfield(d,"pre")
- if pre and getid(pre) == glyph_code and getchar(pre) <= 0 then
- setfield(d,"pre",nil)
+ local pre, post, replace = getdisc(d)
+ local done = false
+ if pre then
+ local char = isglyph(pre)
+ if char and char <= 0 then
+ done = true
+ pre = nil
+ end
+ end
+ if post then
+ local char = isglyph(post)
+ if char and char <= 0 then
+ done = true
+ post = nil
+ end
end
- local post = getfield(d,"post")
- if post and getid(post) == glyph_code and getchar(post) <= 0 then
- setfield(d,"post",nil)
+ if done then
+ setdisc(d,pre,post,replace,discretionary_code,tex.exhyphenpenalty)
end
--- setfield(d,"subtype",discretionary_code) -- to be checked
return template
end,
[disccodes.automatic] = function(d,template)
@@ -68,7 +84,8 @@ local expanders = {
-- so we have pre=preex and post=postex .. however, the previous
-- hyphen is already injected ... downside: the font handler sees this
-- so this is another argument for doing a hyphenation pass in context
- if getfield(d,"pre") then
+ local pre, post, replace = getdisc(d)
+ if pre then
-- we have a preex characters and want that one to replace the
-- character in front which is the trigger
if not template then
@@ -86,51 +103,63 @@ local expanders = {
if pseudohead then
while template ~= d do
pseudohead, template, removed = remove_node(pseudohead,template)
- setfield(d,"replace",removed)
+ -- free old replace ?
+ replace = removed
-- break ?
end
else
-- can't happen
end
- setfield(d,"subtype",discretionary_code)
+ setdisc(d,pre,post,replace,discretionary_code,tex.hyphenpenalty)
else
-- print("lone regular discretionary ignored")
end
+ else
+ setdisc(d,pre,post,replace,discretionary_code,tex.hyphenpenalty)
end
return template
end,
[disccodes.regular] = function(d,template)
- -- simple
- if not template then
- -- can there be font kerns already?
- template = getprev(d)
- if template and getid(template) ~= glyph_code then
- template = getnext(d)
+ if check_regular then
+ -- simple
+ if not template then
+ -- can there be font kerns already?
+ template = getprev(d)
if template and getid(template) ~= glyph_code then
- template = nil
+ template = getnext(d)
+ if template and getid(template) ~= glyph_code then
+ template = nil
+ end
end
end
- end
- if template then
- local language = template and getfield(template,"lang")
- local data = getlanguagedata(language)
- local prechar = data.prehyphenchar
- local postchar = data.posthyphenchar
- if prechar and prechar > 0 then
- local c = copy_node(template)
- setfield(c,"char",prechar)
- setfield(d,"pre",c)
- end
- if postchar and postchar > 0 then
- local c = copy_node(template)
- setfield(c,"char",postchar)
- setfield(d,"post",c)
+ if template then
+ local language = template and getfield(template,"lang")
+ local data = getlanguagedata(language)
+ local prechar = data.prehyphenchar
+ local postchar = data.posthyphenchar
+ local pre, post, replace = getdisc(d) -- pre can be set
+ local done = false
+ if prechar and prechar > 0 then
+ done = true
+ pre = copy_node(template)
+ setchar(pre,prechar)
+ end
+ if postchar and postchar > 0 then
+ done = true
+ post = copy_node(template)
+ setchar(post,postchar)
+ end
+ if done then
+ setdisc(d,pre,post,replace,discretionary_code,tex.hyphenpenalty)
+ end
+ else
+ -- print("lone regular discretionary ignored")
end
- setfield(d,"subtype",discretionary_code)
+ return template
else
- -- print("lone regular discretionary ignored")
+ -- maybe also set penalty here
+ setsubtype(d,discretionary_code)
end
- return template
end,
[disccodes.first] = function()
-- forget about them
@@ -156,9 +185,7 @@ local setlistcolor = nodes.tracers.colors.setlist
function languages.visualizediscretionaries(head)
for d in traverse_id(disc_code,tonut(head)) do
if getattr(d,a_visualize) then
- local pre = getfield(d,"pre")
- local post = getfield(d,"post")
- local replace = getfield(d,"replace")
+ local pre, post, replace = getdisc(d)
if pre then
setlistcolor(pre,"darkred")
end
@@ -194,10 +221,11 @@ interfaces.implement {
local toutf = nodes.listtoutf
function languages.serializediscretionary(d) -- will move to tracer
+ local pre, post, replace = getdisc(d)
return string.formatters["{%s}{%s}{%s}"](
- toutf(getfield(d,"pre")) or "",
- toutf(getfield(d,"post")) or "",
- toutf(getfield(d,"replace")) or ""
+ pre and toutf(pre) or "",
+ post and toutf(post) or "",
+ replace and toutf(replace) or ""
)
end
diff --git a/Master/texmf-dist/tex/context/base/lang-frd.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-frd.mkiv
index 352e5016dec..352e5016dec 100644
--- a/Master/texmf-dist/tex/context/base/lang-frd.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-frd.mkiv
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-frq-de.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-frq-de.lua
new file mode 100644
index 00000000000..5f5794258fb
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-frq-de.lua
@@ -0,0 +1,12 @@
+return {
+ language = "de",
+ source = "http://www.blankenburg.de/gat/pages/fach/info/analyse2.htm",
+ frequencies = {
+ [0x61] = 6.47, [0x62] = 1.93, [0x63] = 2.68, [0x64] = 4.83, [0x65] = 17.48,
+ [0x66] = 1.65, [0x67] = 3.06, [0x68] = 4.23, [0x69] = 7.73, [0x6A] = 0.27,
+ [0x6B] = 1.46, [0x6C] = 3.49, [0x6D] = 2.58, [0x6E] = 9.84, [0x6F] = 2.98,
+ [0x70] = 0.96, [0x71] = 0.02, [0x72] = 7.54, [0x73] = 6.83, [0x74] = 6.13,
+ [0x75] = 4.17, [0x76] = 0.94, [0x77] = 1.48, [0x78] = 0.04, [0x79] = 0.08,
+ [0x7A] = 1.14,
+ }
+}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-frq-en.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-frq-en.lua
new file mode 100644
index 00000000000..5d2cfed4f9d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-frq-en.lua
@@ -0,0 +1,26 @@
+-- return {
+-- language = "en",
+-- source = "http://caislab.icu.ac.kr/course/2001/spring/ice605/down/010306.pdf",
+-- frequencies = {
+-- [0x61] = 8.2, [0x62] = 1.5, [0x63] = 2.8, [0x64] = 4.3, [0x65] = 12.7,
+-- [0x66] = 2.2, [0x67] = 2.0, [0x68] = 6.1, [0x69] = 7.0, [0x6A] = 0.2,
+-- [0x6B] = 0.8, [0x6C] = 4.0, [0x6D] = 2.4, [0x6E] = 6.7, [0x6F] = 7.5,
+-- [0x70] = 1.9, [0x71] = 0.1, [0x72] = 6.0, [0x73] = 6.3, [0x74] = 9.1,
+-- [0x75] = 2.8, [0x76] = 1.0, [0x77] = 2.3, [0x78] = 0.1, [0x79] = 2.0,
+-- [0x7A] = 0.1,
+-- }
+-- }
+
+return {
+ language = "en",
+ source = "http://www.blankenburg.de/gat/pages/fach/info/analyse2.htm",
+ frequencies = {
+ [0x61] = 8.04, [0x62] = 1.54, [0x63] = 3.06, [0x64] = 3.99, [0x65] = 12.51,
+ [0x66] = 2.30, [0x67] = 1.96, [0x68] = 5.49, [0x69] = 7.26, [0x6A] = 0.16,
+ [0x6B] = 0.67, [0x6C] = 4.14, [0x6D] = 2.53, [0x6E] = 7.09, [0x6F] = 7.60,
+ [0x70] = 2.00, [0x71] = 0.11, [0x72] = 6.12, [0x73] = 6.54, [0x74] = 9.25,
+ [0x75] = 2.71, [0x76] = 0.99, [0x77] = 1.92, [0x78] = 0.19, [0x79] = 1.73,
+ [0x7A] = 0.09,
+ }
+}
+
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-frq-nl.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-frq-nl.lua
new file mode 100644
index 00000000000..a7ba75376eb
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-frq-nl.lua
@@ -0,0 +1,12 @@
+return {
+ language = "nl",
+ source = "http://www.onzetaal.nl/advies/letterfreq.html",
+ frequencies = {
+ [0x61] = 7.47, [0x62] = 1.58, [0x63] = 1.24, [0x64] = 5.93, [0x65] = 18.91,
+ [0x66] = 0.81, [0x67] = 3.40, [0x68] = 2.38, [0x69] = 6.50, [0x6A] = 1.46,
+ [0x6B] = 2.25, [0x6C] = 3.57, [0x6D] = 2.21, [0x6E] = 10.03, [0x6F] = 6.06,
+ [0x70] = 1.57, [0x71] = 0.009, [0x72] = 6.41, [0x73] = 3.73, [0x74] = 6.79,
+ [0x75] = 1.99, [0x76] = 2.85, [0x77] = 1.52, [0x78] = 0.04, [0x79] = 0.035,
+ [0x7A] = 1.39,
+ }
+}
diff --git a/Master/texmf-dist/tex/context/base/lang-frq.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-frq.mkiv
index eaa93281a92..eaa93281a92 100644
--- a/Master/texmf-dist/tex/context/base/lang-frq.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-frq.mkiv
diff --git a/Master/texmf-dist/tex/context/base/lang-hyp.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-hyp.lua
index 496cfd19b43..146aea4a85c 100644
--- a/Master/texmf-dist/tex/context/base/lang-hyp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-hyp.lua
@@ -7,6 +7,9 @@ if not modules then modules = { } end modules ['lang-hyp'] = {
}
-- todo: hyphenate over range if needed
+-- todo: check boundary nodes
+
+-- setattr: helper for full attr
-- to be considered: reset dictionary.hyphenated when a pattern is added
-- or maybe an explicit reset of the cache
@@ -224,7 +227,7 @@ local function show_log()
local w = #steps[1][1]
for i=1,#steps do
local s = steps[i]
- report("%s%w%S %S",s[1],w - #s[1] + 3,s[2],s[3])
+ report("%s%w%S %S",s[1],w - #s[1] + 3,s[2],s[3] or "")
end
report()
end
@@ -328,9 +331,11 @@ local function hyphenate(dictionary,word,n) -- odd is okay
end
local l = 1
local w = { "." }
+ -- local d = dictionary.codehash or lcchars[c]
for i=1,n do
local c = word[i]
l = l + 1
+ -- w[l] = d[c] or c -- needs testing
w[l] = lcchars[c] or c
end
l = l + 1
@@ -359,8 +364,8 @@ local function hyphenate(dictionary,word,n) -- odd is okay
show_1(w)
end
--
- local specials = dictionary.specials
- local patterns = dictionary.patterns
+ local specials = dictionary.specials
+ local patterns = dictionary.patterns
--
-- inspect(specials)
local spec
@@ -608,17 +613,22 @@ if context then
local new_disc = nodepool.disc
local new_glyph = nodepool.glyph
+ local new_penalty = nodepool.penalty
- local setfield = nuts.setfield
local getfield = nuts.getfield
local getfont = nuts.getfont
- local getchar = nuts.getchar
local getid = nuts.getid
local getattr = nuts.getattr
local getnext = nuts.getnext
local getprev = nuts.getprev
local getsubtype = nuts.getsubtype
local getlist = nuts.getlist
+ local isglyph = nuts.isglyph
+
+ local setfield = nuts.setfield
+ local setchar = nuts.setchar
+ local setdisc = nuts.setdisc
+
local insert_before = nuts.insert_before
local insert_after = nuts.insert_after
local copy_node = nuts.copy
@@ -632,6 +642,7 @@ if context then
local variables = interfaces.variables
local v_reset = variables.reset
local v_yes = variables.yes
+ local v_word = variables.word
local v_all = variables.all
local settings_to_array = utilities.parsers.settings_to_array
@@ -644,10 +655,10 @@ if context then
local preexhyphenchar = lang.preexhyphenchar
local postexhyphenchar = lang.postexhyphenchar
- local lccodes = characters.lccodes
-
local a_hyphenation = attributes.private("hyphenation")
+ local interwordpenalty = 5000
+
function traditional.loadpatterns(language)
return dictionaries[language]
end
@@ -818,15 +829,16 @@ if context then
local joinerchars = featureset.joiners
local alternative = featureset.alternative
local rightwordmin = tonumber(featureset.rightwordmin)
- local charmin = tonumber(featureset.charmin)
+ local charmin = tonumber(featureset.charmin) -- luatex now also has hyphenationmin
local leftcharmin = tonumber(featureset.leftcharmin)
local rightcharmin = tonumber(featureset.rightcharmin)
local rightedge = featureset.rightedge
local leftchar = somehyphenchar(featureset.leftchar)
local rightchar = somehyphenchar(featureset.rightchar)
- --
- joinerchars = joinerchars == v_yes and defaultjoiners or joinerchars
- hyphenchars = hyphenchars == v_yes and defaulthyphens or hyphenchars
+ local rightchars = featureset.rightchars
+ rightchars = rightchars == v_word and true or tonumber(rightchars)
+ joinerchars = joinerchars == v_yes and defaultjoiners or joinerchars
+ hyphenchars = hyphenchars == v_yes and defaulthyphens or hyphenchars
-- not yet ok: extrachars have to be ignored so it cannot be all)
featureset.extrachars = makeset(joinerchars or "",extrachars or "")
featureset.hyphenchars = makeset(hyphenchars or "")
@@ -835,6 +847,7 @@ if context then
featureset.charmin = charmin and charmin > 0 and charmin or nil
featureset.leftcharmin = leftcharmin and leftcharmin > 0 and leftcharmin or nil
featureset.rightcharmin = rightcharmin and rightcharmin > 0 and rightcharmin or nil
+ featureset.rightchars = rightchars
featureset.leftchar = leftchar
featureset.rightchar = rightchar
featureset.strict = rightedge == 'tex'
@@ -879,6 +892,7 @@ if context then
{ "characters" },
{ "hyphens" },
{ "joiners" },
+ { "rightchars" },
{ "rightwordmin", "integer" },
{ "charmin", "integer" },
{ "leftcharmin", "integer" },
@@ -949,39 +963,41 @@ if context then
function traditional.hyphenate(head)
- local first = tonut(head)
- local tail = nil
- local last = nil
- local current = first
- local dictionary = nil
- local instance = nil
- local characters = nil
- local unicodes = nil
- local exhyphenchar = tex.exhyphenchar
- local extrachars = nil
- local hyphenchars = nil
- local language = nil
- local start = nil
- local stop = nil
- local word = { } -- we reuse this table
- local size = 0
- local leftchar = false
- local rightchar = false -- utfbyte("-")
- local leftexchar = false
- local rightexchar = false -- utfbyte("-")
- local leftmin = 0
- local rightmin = 0
- local charmin = 1
- local leftcharmin = nil
- local rightcharmin = nil
- ----- leftwordmin = nil
- local rightwordmin = nil
- local leftchar = nil
- local rightchar = nil
- local attr = nil
- local lastwordlast = nil
- local hyphenated = hyphenate
- local strict = nil
+ local first = tonut(head)
+ local tail = nil
+ local last = nil
+ local current = first
+ local dictionary = nil
+ local instance = nil
+ local characters = nil
+ local unicodes = nil
+ local exhyphenchar = tex.exhyphenchar
+ local extrachars = nil
+ local hyphenchars = nil
+ local language = nil
+ local start = nil
+ local stop = nil
+ local word = { } -- we reuse this table
+ local size = 0
+ local leftchar = false
+ local rightchar = false -- utfbyte("-")
+ local leftexchar = false
+ local rightexchar = false -- utfbyte("-")
+ local leftmin = 0
+ local rightmin = 0
+ local charmin = 1
+ local leftcharmin = nil
+ local rightcharmin = nil
+ ----- leftwordmin = nil
+ local rightwordmin = nil
+ local rightchars = nil
+ local leftchar = nil
+ local rightchar = nil
+ local attr = nil
+ local lastwordlast = nil
+ local hyphenated = hyphenate
+ local strict = nil
+ local hyphenpenalty = tex.hyphenpenalty
-- We cannot use an 'enabled' boolean (false when no characters or extras) because we
-- can have plugins that set a characters metatable and so) ... it doesn't save much
@@ -995,6 +1011,16 @@ if context then
starttiming(traditional)
+ local function insertpenalty()
+ local p = new_penalty(interwordpenalty)
+ setfield(p,"attr",getfield(last,"attr"))
+ if trace_visualize then
+ nuts.setvisual(p,"penalty")
+ end
+ last = getprev(last)
+ first, last = insert_after(first,last,p)
+ end
+
local function synchronizefeatureset(a)
local f = a and featuresets[a]
if f then
@@ -1008,6 +1034,7 @@ if context then
leftchar = f.leftchar
rightchar = f.rightchar
strict = f.strict and strictids
+ rightchars = f.rightchars
if rightwordmin and rightwordmin > 0 and lastwordlast ~= rightwordmin then
-- so we can change mid paragraph but it's kind of unpredictable then
if not tail then
@@ -1015,16 +1042,25 @@ if context then
end
last = tail
local inword = false
+ local count = 0
while last and rightwordmin > 0 do
local id = getid(last)
if id == glyph_code then
+ count = count + 1
inword = true
if trace_visualize then
- setcolor(last,"darkred")
+ setcolor(last,"darkgreen")
end
elseif inword then
inword = false
rightwordmin = rightwordmin - 1
+ if rightchars == true then
+ if rightwordmin > 0 then
+ insertpenalty()
+ end
+ elseif rightchars and count <= rightchars then
+ insertpenalty()
+ end
end
last = getprev(last)
end
@@ -1122,7 +1158,7 @@ if context then
return
elseif replacement == true then
local glyph = copy_node(stop)
- setfield(glyph,"char",leftchar or rightchar)
+ setchar(glyph,leftchar or rightchar)
return glyph
end
local head = nil
@@ -1130,12 +1166,12 @@ if context then
if leftchar then
head = copy_node(stop)
current = head
- setfield(head,"char",leftchar)
+ setchar(head,leftchar)
end
local rsize = #replacement
if rsize == 1 then
local glyph = copy_node(stop)
- setfield(glyph,"char",characters[replacement])
+ setchar(glyph,characters[replacement])
if head then
insert_after(current,current,glyph)
else
@@ -1146,7 +1182,7 @@ if context then
local list = lpegmatch(p_split,replacement) -- this is an utf split (could be cached)
for i=1,#list do
local glyph = copy_node(stop)
- setfield(glyph,"char",characters[list[i]])
+ setchar(glyph,characters[list[i]])
if head then
insert_after(current,current,glyph)
else
@@ -1158,7 +1194,7 @@ if context then
if rightchar then
local glyph = copy_node(stop)
insert_after(current,current,glyph)
- setfield(glyph,"char",rightchar)
+ setchar(glyph,rightchar)
end
return head
end
@@ -1171,12 +1207,15 @@ if context then
local r = result[i]
if r == true then
local disc = new_disc()
+ local pre = nil
+ local post = nil
if rightchar then
- setfield(disc,"pre",serialize(true,rightchar))
+ pre = serialize(true,rightchar)
end
if leftchar then
- setfield(disc,"post",serialize(true,leftchar))
+ post = serialize(true,leftchar)
end
+ setdisc(disc,pre,post,nil,discretionary_code,hyphenpenalty)
if attributes then
setfield(disc,"attr",attributes)
end
@@ -1189,21 +1228,34 @@ if context then
local replace = r[3]
local right = r[4] ~= false and rightchar
local left = r[5] ~= false and leftchar
- if pre and pre ~= "" then
- setfield(disc,"pre",serialize(pre,false,right))
+ if pre then
+ if pre ~= "" then
+ pre = serialize(pre,false,right)
+ else
+ pre = nil
+ end
end
- if post and post ~= "" then
- setfield(disc,"post",serialize(post,left,false))
+ if post then
+ if post ~= "" then
+ post = serialize(post,left,false)
+ else
+ post = nil
+ end
end
- if replace and replace ~= "" then
- setfield(disc,"replace",serialize(replace))
+ if replace then
+ if replace ~= "" then
+ replace = serialize(replace)
+ else
+ replace = nil
+ end
end
+ setdisc(disc,pre,post,replace,discretionary_code,hyphenpenalty)
if attributes then
setfield(disc,"attr",attributes)
end
insert_before(first,current,disc)
else
- setfield(current,"char",characters[r])
+ setchar(current,characters[r])
if i < rsize then
current = getnext(current)
end
@@ -1228,20 +1280,21 @@ if context then
setcolor(glyph,"darkred") -- these get checked
setcolor(disc,"darkgreen") -- in the colorizer
end
- setfield(disc,"replace",glyph)
+ local pre = mil
+ local post = nil
+ local replace = glyph
if not leftchar then
leftchar = code
end
if rightchar then
- local glyph = copy_node(glyph)
- setfield(glyph,"char",rightchar)
- setfield(disc,"pre",glyph)
+ pre = copy_node(glyph)
+ setchar(pre,rightchar)
end
if leftchar then
- local glyph = copy_node(glyph)
- setfield(glyph,"char",leftchar)
- setfield(disc,"post",glyph)
+ post = copy_node(glyph)
+ setchar(post,leftchar)
end
+ setdisc(disc,pre,post,replace,discretionary_code,hyphenpenalty)
if attributes then
setfield(disc,"attr",attributes)
end
@@ -1261,9 +1314,8 @@ if context then
-- for extensions.
while current and current ~= last do -- and current
- local id = getid(current)
- if id == glyph_code then
- local code = getchar(current)
+ local code, id = isglyph(current)
+ if code then
local lang = getfield(current,"lang")
if lang ~= language then
if dictionary and size > charmin and leftmin + rightmin <= size then
diff --git a/Master/texmf-dist/tex/context/base/lang-hyp.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-hyp.mkiv
index 927f5a0576f..ca911338623 100644
--- a/Master/texmf-dist/tex/context/base/lang-hyp.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-hyp.mkiv
@@ -107,6 +107,7 @@
\letdummyparameter\s!righthyphenchar\zerocount
\letdummyparameter\c!alternative\empty
\letdummyparameter\c!rightedge\empty
+ \letdummyparameter\c!rightchars\empty
\getdummyparameters[#2]%
\clf_definehyphenationfeatures
{#1}%
@@ -115,6 +116,7 @@
hyphens {\dummyparameter\c!hyphens}%
joiners {\dummyparameter\c!joiners}%
rightwordmin \numexpr\dummyparameter\c!rightwords\relax
+ rightchars {\dummyparameter\c!rightchars}%
charmin \numexpr\dummyparameter\s!hyphenmin\relax
leftcharmin \numexpr\dummyparameter\s!lefthyphenmin\relax
rightcharmin \numexpr\dummyparameter\s!righthyphenmin\relax
@@ -129,6 +131,11 @@
\unexpanded\def\sethyphenationfeatures[#1]%
{\clf_sethyphenationfeatures{#1}}
+\unexpanded\def\resethyphenationfeatures
+ {\hyphenationattribute\attributeunsetvalue}
+
+\resethyphenationfeatures
+
% todo: \start ... \stop too
\unexpanded\def\registerhyphenationpattern
@@ -162,10 +169,10 @@
\unexpanded\def\atleastoneword#1%
{\begingroup
- \starthyphenation[\c!method=traditional]% this might become default or a faster switch
+ \starthyphenation[traditional]% this might become default or a faster switch
\sethyphenationfeatures[words]%
#1\par
- \stopthyphenation
+ \stophyphenation
\endgroup}
%D For me:
diff --git a/Master/texmf-dist/tex/context/base/lang-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-ini.lua
index d75a665e2be..eb7e32b89f3 100644
--- a/Master/texmf-dist/tex/context/base/lang-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-ini.lua
@@ -16,10 +16,13 @@ if not modules then modules = { } end modules ['lang-ini'] = {
--~ lang:hyphenation(string) string = lang:hyphenation() lang:clear_hyphenation()
+-- todo: no foo:bar but foo(bar,...)
+
local type, tonumber = type, tonumber
local utfbyte = utf.byte
local format, gsub = string.format, string.gsub
local concat, sortedkeys, sortedpairs = table.concat, table.sortedkeys, table.sortedpairs
+local utfbytes, strip = string.utfvalues, string.strip
local context = context
local commands = commands
@@ -31,33 +34,37 @@ local trace_patterns = false trackers.register("languages.patterns", function(v
local report_initialization = logs.reporter("languages","initialization")
+local lang = lang
+
local prehyphenchar = lang.prehyphenchar -- global per language
local posthyphenchar = lang.posthyphenchar -- global per language
local preexhyphenchar = lang.preexhyphenchar -- global per language
local postexhyphenchar = lang.postexhyphenchar -- global per language
local lefthyphenmin = lang.lefthyphenmin
local righthyphenmin = lang.righthyphenmin
+local sethjcode = lang.sethjcode
+
+local uccodes = characters.uccodes
-local lang = lang
-lang.exceptions = lang.hyphenation
-local new_langage = lang.new
+lang.exceptions = lang.hyphenation
+local new_langage = lang.new
-languages = languages or {}
-local languages = languages
+languages = languages or {}
+local languages = languages
-languages.version = 1.010
+languages.version = 1.010
-languages.registered = languages.registered or { }
-local registered = languages.registered
+languages.registered = languages.registered or { }
+local registered = languages.registered
-languages.associated = languages.associated or { }
-local associated = languages.associated
+languages.associated = languages.associated or { }
+local associated = languages.associated
-languages.numbers = languages.numbers or { }
-local numbers = languages.numbers
+languages.numbers = languages.numbers or { }
+local numbers = languages.numbers
-languages.data = languages.data or { }
-local data = languages.data
+languages.data = languages.data or { }
+local data = languages.data
storage.register("languages/registered",registered,"languages.registered")
storage.register("languages/associated",associated,"languages.associated")
@@ -107,7 +114,8 @@ end
-- patterns=en
-- patterns=en,de
-local function validdata(dataset,what,tag)
+local function validdata(loaded,what,tag)
+ local dataset = loaded[what]
if dataset then
local data = dataset.data
if not data or data == "" then
@@ -124,6 +132,31 @@ local function validdata(dataset,what,tag)
end
end
+local function sethjcodes(instance,loaded,what)
+ local l = loaded[what]
+ local c = l and l.characters
+ if c then
+ local h = l.codehash
+ if not h then
+ h = { }
+ l.codehash = h
+ end
+ local s = tex.savinghyphcodes
+ tex.savinghyphcodes = 0
+ for l in utfbytes(c) do
+ local u = uccodes[l]
+ sethjcode(instance,l,l)
+ h[l] = l
+ if type(u) == "number" then
+ -- we don't want ß -> SS
+ sethjcode(instance,u,l)
+ h[u] = l
+ end
+ end
+ tex.savinghyphcodes = s
+ end
+end
+
local function loaddefinitions(tag,specification)
statistics.starttiming(languages)
local data, instance = resolve(tag)
@@ -160,12 +193,11 @@ local function loaddefinitions(tag,specification)
local loaded = table.load(fullname,gzipped and gzip.load)
if loaded then -- todo: version test
ok, nofloaded = true, nofloaded + 1
- -- instance:patterns (loaded.patterns and resources.patterns .data or "")
- -- instance:hyphenation(loaded.exceptions and resources.exceptions.data or "")
- instance:patterns (validdata(loaded.patterns, "patterns", tag) or "")
- instance:hyphenation(validdata(loaded.exceptions,"exceptions",tag) or "")
+ sethjcodes(instance,loaded,"patterns")
+ sethjcodes(instance,loaded,"exceptions")
+ instance:patterns (validdata(loaded,"patterns", tag) or "")
+ instance:hyphenation(validdata(loaded,"exceptions",tag) or "")
resources[#resources+1] = loaded -- so we can use them otherwise
-
else
report_initialization("invalid definition %a for language %a in %a",definition,tag,filename)
end
@@ -333,7 +365,7 @@ end
function languages.setexceptions(tag,str)
local data, instance = resolve(tag)
if data then
- instance:hyphenation(string.strip(str)) -- we need to strip leading spaces
+ instance:hyphenation(strip(str)) -- we need to strip leading spaces
end
end
diff --git a/Master/texmf-dist/tex/context/base/lang-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-ini.mkiv
index 335d6d1c9d0..8ff41b28792 100644
--- a/Master/texmf-dist/tex/context/base/lang-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-ini.mkiv
@@ -86,51 +86,87 @@
\installcorenamespace{language}
\installcorenamespace{languagelinked}
+\def\currentusedlanguage{\currentlanguage}
+
\def\defaultlanguage#1%
{\ifcsname\??language#1\s!default\endcsname
- \expandafter\defaultlanguage\csname\??language#1\s!default\endcsname
+ \expandafter\defaultlanguage\lastnamedcs
\else
#1%
\fi}
+% \def\languageparameter#1%
+% {\ifcsname\??language\currentlanguage#1\endcsname
+% \csname\??language\currentlanguage#1\endcsname
+% \else\ifcsname\??language\currentlanguage\s!default\endcsname
+% \expandafter\specificlanguageparameter\csname\??language\currentlanguage\s!default\endcsname{#1}%
+% \else\ifcsname\??language\s!default#1\endcsname
+% \csname\??language\s!default#1\endcsname
+% \fi\fi\fi}
+%
+% \def\specificlanguageparameter#1#2%
+% {\ifcsname\??language#1#2\endcsname
+% \csname\??language#1#2\endcsname
+% \else\ifcsname\??language#1\s!default\endcsname
+% \expandafter\specificlanguageparameter\csname\??language#1\s!default\endcsname{#2}%
+% \else\ifcsname\??language\s!default#2\endcsname
+% \csname\??language\s!default#2\endcsname
+% \fi\fi\fi}
+%
+% \def\mainlanguageparameter#1%
+% {\ifcsname\??language\currentmainlanguage#1\endcsname
+% \csname\??language\currentmainlanguage#1\endcsname
+% \else\ifcsname\??language\currentmainlanguage\s!default\endcsname
+% \expandafter\specificlanguageparameter\csname\??language\currentmainlanguage\s!default\endcsname{#1}%
+% \else\ifcsname\??language\s!default#1\endcsname
+% \csname\??language\s!default#1\endcsname
+% \fi\fi\fi}
+
\def\languageparameter#1%
{\ifcsname\??language\currentlanguage#1\endcsname
- \csname\??language\currentlanguage#1\endcsname
+ \lastnamedcs
\else\ifcsname\??language\currentlanguage\s!default\endcsname
- \expandafter\specificlanguageparameter\csname\??language\currentlanguage\s!default\endcsname{#1}%
+ \expandafter\specificlanguageparameter\lastnamedcs{#1}%
\else\ifcsname\??language\s!default#1\endcsname
- \csname\??language\s!default#1\endcsname
+ \lastnamedcs
\fi\fi\fi}
\def\specificlanguageparameter#1#2%
{\ifcsname\??language#1#2\endcsname
- \csname\??language#1#2\endcsname
+ \lastnamedcs
\else\ifcsname\??language#1\s!default\endcsname
- \expandafter\specificlanguageparameter\csname\??language#1\s!default\endcsname{#2}%
+ \expandafter\specificlanguageparameter\lastnamedcs{#2}%
\else\ifcsname\??language\s!default#2\endcsname
- \csname\??language\s!default#2\endcsname
+ \lastnamedcs
\fi\fi\fi}
\def\mainlanguageparameter#1%
{\ifcsname\??language\currentmainlanguage#1\endcsname
- \csname\??language\currentmainlanguage#1\endcsname
+ \lastnamedcs
\else\ifcsname\??language\currentmainlanguage\s!default\endcsname
- \expandafter\specificlanguageparameter\csname\??language\currentmainlanguage\s!default\endcsname{#1}%
+ \expandafter\specificlanguageparameter\lastnamedcs{#1}%
\else\ifcsname\??language\s!default#1\endcsname
- \csname\??language\s!default#1\endcsname
+ \lastnamedcs
\fi\fi\fi}
-\def\currentusedlanguage{\currentlanguage}
-
\let\usedlanguageparameter\languageparameter
+% \def\askedlanguageparameter#1% assumes \currentusedlanguage being set
+% {\ifcsname\??language\currentusedlanguage#1\endcsname
+% \csname\??language\currentusedlanguage#1\endcsname
+% \else\ifcsname\??language\currentusedlanguage\s!default\endcsname
+% \expandafter\specificlanguageparameter\csname\??language\currentusedlanguage\s!default\endcsname{#1}%
+% \else\ifcsname\??language\s!default#1\endcsname
+% \csname\??language\s!default#1\endcsname
+% \fi\fi\fi}
+
\def\askedlanguageparameter#1% assumes \currentusedlanguage being set
{\ifcsname\??language\currentusedlanguage#1\endcsname
- \csname\??language\currentusedlanguage#1\endcsname
+ \lastnamedcs
\else\ifcsname\??language\currentusedlanguage\s!default\endcsname
- \expandafter\specificlanguageparameter\csname\??language\currentusedlanguage\s!default\endcsname{#1}%
+ \expandafter\specificlanguageparameter\lastnamedcs{#1}%
\else\ifcsname\??language\s!default#1\endcsname
- \csname\??language\s!default#1\endcsname
+ \lastnamedcs
\fi\fi\fi}
\unexpanded\def\setlanguageparameter#1%
@@ -223,7 +259,8 @@
\let\doiflanguageelse\doifelselanguage
\def\reallanguagetag#1%
- {\ifcsname\??languagelinked#1\endcsname\csname\??languagelinked#1\endcsname\else#1\fi}
+ %{\ifcsname\??languagelinked#1\endcsname\csname\??languagelinked#1\endcsname\else#1\fi}
+ {\ifcsname\??languagelinked#1\endcsname\lastnamedcs\else#1\fi}
% \language[#1] gave unwanted side effect of loading language specifics
@@ -485,6 +522,7 @@
{% these values are stored along with glyph nodes
\lefthyphenmin \numexpr0\languageparameter\s!lefthyphenmin +\hyphenminoffset\relax
\righthyphenmin\numexpr0\languageparameter\s!righthyphenmin+\hyphenminoffset\relax
+ \hyphenationmin\numexpr0\languageparameter\s!hyphenmin\relax
% these values are stored with the language (global!)
\prehyphenchar \languageparameter\s!righthyphenchar\relax
\posthyphenchar\languageparameter\s!lefthyphenchar \relax}
@@ -534,7 +572,7 @@
\appendtoks
\edef\p_language_font{\languageparameter\s!font}%
\ifx\p_language_font\v!auto
- \feature\currentlanguage
+ \doaddfeature\currentlanguage
\fi
\to \everylanguage
@@ -545,10 +583,22 @@
%D Fast switcher
+% \def\lang_basics_switch_asked
+% {\ifx\askedlanguage\empty \else
+% \ifcsname\??languagelinked\askedlanguage\endcsname
+% \edef\askedlanguage{\csname\??languagelinked\askedlanguage\endcsname}%
+% \ifx\currentlanguage\askedlanguage \else
+% \setcurrentlanguage\currentmainlanguage\askedlanguage
+% \lang_basics_synchronize
+% \fi
+% \fi
+% \fi}
+
\def\lang_basics_switch_asked
{\ifx\askedlanguage\empty \else
\ifcsname\??languagelinked\askedlanguage\endcsname
- \edef\askedlanguage{\csname\??languagelinked\askedlanguage\endcsname}%
+ %\edef\askedlanguage{\csname\??languagelinked\askedlanguage\endcsname}%
+ \edef\askedlanguage{\lastnamedcs}%
\ifx\currentlanguage\askedlanguage \else
\setcurrentlanguage\currentmainlanguage\askedlanguage
\lang_basics_synchronize
@@ -573,11 +623,30 @@
\newcount\mainlanguagenumber
+% \unexpanded\def\mainlanguage[#1]%
+% {\edef\askedlanguage{#1}%
+% \ifx\askedlanguage\empty \else
+% \ifcsname\??languagelinked\askedlanguage\endcsname
+% \edef\askedlanguage{\csname\??languagelinked\askedlanguage\endcsname}%
+% \ifx\currentlanguage\askedlanguage
+% \ifx\currentmainlanguage\askedlanguage \else
+% \setcurrentlanguage\askedlanguage\askedlanguage
+% \lang_basics_synchronize
+% \fi
+% \else
+% \setcurrentlanguage\askedlanguage\askedlanguage
+% \lang_basics_synchronize
+% \fi
+% \fi
+% \fi
+% \mainlanguagenumber\normallanguage}
+
\unexpanded\def\mainlanguage[#1]%
{\edef\askedlanguage{#1}%
\ifx\askedlanguage\empty \else
\ifcsname\??languagelinked\askedlanguage\endcsname
- \edef\askedlanguage{\csname\??languagelinked\askedlanguage\endcsname}%
+ %\edef\askedlanguage{\csname\??languagelinked\askedlanguage\endcsname}%
+ \edef\askedlanguage{\lastnamedcs}%
\ifx\currentlanguage\askedlanguage
\ifx\currentmainlanguage\askedlanguage \else
\setcurrentlanguage\askedlanguage\askedlanguage
diff --git a/Master/texmf-dist/tex/context/base/lang-lab.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-lab.lua
index e90bee017cf..f5ae6de5ead 100644
--- a/Master/texmf-dist/tex/context/base/lang-lab.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-lab.lua
@@ -164,8 +164,8 @@ implement {
{
{ "text" },
{ "separators" },
- { "first" },
- { "second" },
+ { "separator" },
+ { "last" },
}
}
}
diff --git a/Master/texmf-dist/tex/context/base/lang-lab.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-lab.mkiv
index fbe3346dcff..26c10086f22 100644
--- a/Master/texmf-dist/tex/context/base/lang-lab.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-lab.mkiv
@@ -88,25 +88,26 @@
\setuvalue{start#1text}{\protecttextprefixes1\def\currenttextprefixclass{#1}\dotripleempty\lang_labels_text_prefix_start[#1]}%
\letvalue{stop#1text}\relax
\def#4{\reallanguagetag{\defaultlanguage\currentmainlanguage}}%
- \ifnum#2=\plustwo
+ \ifnum#2=\plustwo % used for math and tags
\def#3{#5#4}%
\def#5##1##2% ##1=language
{\ifcsname\??label\currentlabelcategory#1:##1:##2\endcsname
- \csname\??label\currentlabelcategory#1:##1:##2\endcsname
+ \lastnamedcs
\else\ifcsname\??label#1:##1:##2\endcsname
- \csname\??label#1:##1:##2\endcsname
-% \else\ifcsname\??language#4\s!default\endcsname
-% \expandafter#5\csname\??language#4\s!default\endcsname{##2}%
+ \lastnamedcs
+ % \else\ifcsname\??language#4\s!default\endcsname
+ % \expandafter#5\csname\??language#4\s!default\endcsname{##2}%
\else\ifcsname\??language##1\s!default\endcsname
- \expandafter#5\csname\??language##1\s!default\endcsname{##2}%
+ %\expandafter#5\csname\??language##1\s!default\endcsname{##2}%
+ \expandafter#5\lastnamedcs{##2}%
\else\ifcsname\??label\currentlabelcategory#1:##2\endcsname
- \csname\??label\currentlabelcategory#1:##2\endcsname
+ \lastnamedcs
\else\ifcsname\??label#1:##2\endcsname
- \csname\??label#1:##2\endcsname
+ \lastnamedcs
\else\ifcsname\??label\currentlabelcategory#1:\s!en:##2\endcsname
- \csname\??label\currentlabelcategory#1:\s!en:##2\endcsname
+ \lastnamedcs
\else\ifcsname\??label#1:\s!en:##2\endcsname
- \csname\??label#1:\s!en:##2\endcsname
+ \lastnamedcs
\else
##2%
\fi\fi\fi\fi\fi\fi\fi}%
@@ -118,13 +119,17 @@
\unexpanded\def#3{#5#4}%
\unexpanded\def#5##1##2%
{\ifcsname\??label#1:##1:##2\endcsname
- \expandafter\let\expandafter\thetextprefix\csname\??label#1:##1:##2\endcsname
+ %\expandafter\let\expandafter\thetextprefix\csname\??label#1:##1:##2\endcsname
+ \expandafter\let\expandafter\thetextprefix\lastnamedcs
\else\ifcsname\??language#4\s!default\endcsname
- \expandafter#5\csname\??language#4\s!default\endcsname{##2}%
+ %\expandafter#5\csname\??language#4\s!default\endcsname{##2}%
+ \expandafter#5\lastnamedcs{##2}%
\else\ifcsname\??label#1:##2\endcsname
- \expandafter\let\expandafter\thetextprefix\csname\??label#1:##2\endcsname
+ %\expandafter\let\expandafter\thetextprefix\csname\??label#1:##2\endcsname
+ \expandafter\let\expandafter\thetextprefix\lastnamedcs
\else\ifcsname\??label#1:\s!en:##2\endcsname
- \expandafter\let\expandafter\thetextprefix\csname\??label#1:\s!en:##2\endcsname
+ %\expandafter\let\expandafter\thetextprefix\csname\??label#1:\s!en:##2\endcsname
+ \expandafter\let\expandafter\thetextprefix\lastnamedcs
\else
\let\thetextprefix\dummytextprefix
\fi\fi\fi\fi}%
@@ -146,17 +151,13 @@
\def\dummytextprefix {\empty\empty}
%D \macros
-%D {headtext,
-%D labeltext, leftlabeltext, rightlabeltext, labeltexts,
-%D LABELTEXT, LEFTLABELTEXT, RIGHTLABELTEXT, LABELTEXTS}
+%D {headtext, labeltext, leftlabeltext, rightlabeltext, labeltexts}
%D
%D Once defined, head and label texts can be called upon using:
%D
%D \showsetup{headtext}
%D \showsetup{labeltext}
%D
-%D The latter one has an upcased alternative \type{\LABELTEXT}.
-%D
%D \macros
%D {presetheadtext,presetlabeltext}
%D
@@ -218,18 +219,34 @@
\let\m_lang_labels_left \empty
\let\m_lang_labels_right\empty
+% \def\lang_labels_text_prefix_assign_yes#1[#2,#3,#4]%
+% {\def\m_lang_labels_left {#2}% no longer an edef ... else \Word undefined expansion issues
+% \def\m_lang_labels_right{#3}% no longer an edef ... else \Word undefined expansion issues
+% \ifx\m_lang_labels_right\empty
+% \ifx\m_lang_labels_left\empty
+% \expandafter\def\csname\??label\currenttextprefixclass:\currenttextprefixtag:#1\endcsname{\empty\empty}%
+% \else
+% \expandafter\def\csname\??label\currenttextprefixclass:\currenttextprefixtag:#1\endcsname{{#2}\empty}%
+% \fi
+% \else
+% \expandafter\def\csname\??label\currenttextprefixclass:\currenttextprefixtag:#1\endcsname{{#2}{#3}}%
+% \fi}
+%
+% how we love obscure efficicency ...
+
\def\lang_labels_text_prefix_assign_yes#1[#2,#3,#4]%
{\def\m_lang_labels_left {#2}% no longer an edef ... else \Word undefined expansion issues
\def\m_lang_labels_right{#3}% no longer an edef ... else \Word undefined expansion issues
- \ifx\m_lang_labels_right\empty
- \ifx\m_lang_labels_left\empty
- \expandafter\def\csname\??label\currenttextprefixclass:\currenttextprefixtag:#1\endcsname{\empty\empty}%
+ \expandafter\def\csname\??label\currenttextprefixclass:\currenttextprefixtag:#1%
+ \ifx\m_lang_labels_right\empty
+ \ifx\m_lang_labels_left\empty
+ \endcsname{\empty\empty}%
+ \else
+ \endcsname{{#2}\empty}%
+ \fi
\else
- \expandafter\def\csname\??label\currenttextprefixclass:\currenttextprefixtag:#1\endcsname{{#2}\empty}%
- \fi
- \else
- \expandafter\def\csname\??label\currenttextprefixclass:\currenttextprefixtag:#1\endcsname{{#2}{#3}}%
- \fi}
+ \endcsname{{#2}{#3}}%
+ \fi}
\def\lang_labels_text_prefix_assign_nop#1[#2]%
{}
@@ -297,9 +314,9 @@
\def\lang_translate[#1]%
{\getparameters[\??translation][#1]%
\ifcsname\??translation\currentlanguage\endcsname
- \csname\??translation\currentlanguage\endcsname
+ \lastnamedcs
\else\ifcsname\??translation\s!en\endcsname
- \csname\??translation\s!en\endcsname
+ \lastnamedcs
\else
[translation #1]%
\fi\fi}
@@ -352,8 +369,8 @@
{\clf_concatcommalist
text {#1}%
separators {#2}%
- first {\detokenize\expandafter{\normalexpanded{\labeltext{and-1}}}}%
- second {\detokenize\expandafter{\normalexpanded{\labeltext{and-2}}}}%
+ separator {\detokenize\expandafter{\normalexpanded{\labeltext{and-1}}}}%
+ last {\detokenize\expandafter{\normalexpanded{\labeltext{and-2}}}}%
\relax}
\setuplabeltext [\s!nl] [and-1={{, }}, and-2={{ en }}] % 1, 2 en 3
@@ -361,4 +378,8 @@
\setuplabeltext [\s!de] [and-1={{, }}, and-2={{ und }}] % 1, 2 und 3
\setuplabeltext [\s!hr] [and-1={{, }}, and-2={{ i }}] % 1, 2 i 3
+%D Goodie (handy at \LUA\ end):
+
+\unexpanded\def\LABELTEXT#1{\WORD{\labeltext{#1}}} % only for simple cases!
+
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/lang-mis.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-mis.mkiv
index 2b886b3cec1..ada8f81ea6c 100644
--- a/Master/texmf-dist/tex/context/base/lang-mis.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-mis.mkiv
@@ -186,6 +186,7 @@
\installcorenamespace{discretionarytext}
\installcorenamespace{discretionarymath}
\installcorenamespace{discretionaryboth}
+\installcorenamespace{discretionarymode}
\unexpanded\def\installdiscretionary#1#2%
{\setevalue{\??discretionarymath\detokenize{#1}}{\detokenize{#1}}% ?
@@ -194,8 +195,8 @@
\scratchcounter\expandafter`\detokenize{#1}%
\expandafter\uedcatcodecommand\expandafter\ctxcatcodes\expandafter\scratchcounter\csname\??discretionaryboth\detokenize{#1}\endcsname}
-\unexpanded\def\handlemathmodediscretionary#1{\executeifdefined{\??discretionarymath\detokenize{#1}}\donothing}
-\unexpanded\def\handletextmodediscretionary#1{\executeifdefined{\??discretionarytext\detokenize{#1}}\donothing}
+\unexpanded\def\handlemathmodediscretionary#1{\ifcsname\??discretionarymath\detokenize{#1}\endcsname\lastnamedcs}
+\unexpanded\def\handletextmodediscretionary#1{\ifcsname\??discretionarytext\detokenize{#1}\endcsname\lastnamedcs}
\unexpanded\def\installdiscretionaries#1#2{\writestatus\m!system{use \string \installdiscretionary}} % obsolete
@@ -206,17 +207,18 @@
\def\lang_discretionaries_command
{% if direct if, we need \relax for lookahead in math mode
- \csname
+ \csname\??discretionarymode
\ifcase\discretionarymode
- \strippedcsname\lang_discretionaries_process_none
+ n% \csstring\lang_discretionaries_process_none
\else\ifmmode
- \strippedcsname\lang_discretionaries_process_math
+ m% \csstring\lang_discretionaries_process_math
\else
- \strippedcsname\lang_discretionaries_process_text
+ t% \csstring\lang_discretionaries_process_text
\fi\fi
\endcsname}
-\def\lang_discretionaries_process_none#1%
+% \def\lang_discretionaries_process_none#1%
+\setvalue{\??discretionarymode n}#1%
{\detokenize{#1}}
%D The macro \type{\lang_discretionaries_check_before} takes care of loners like
@@ -252,9 +254,11 @@
\ifx :\nextnext \settrue \punctafterdiscretionary \else
\ifx ;\nextnext \settrue \punctafterdiscretionary \fi\fi\fi\fi\fi\fi}
-\let\lang_discretionaries_process_math\handlemathmodediscretionary
+%let\lang_discretionaries_process_math\handlemathmodediscretionary
+\letvalue{\??discretionarymode m}\handlemathmodediscretionary
-\def\lang_discretionaries_process_text#1% grouped !
+% \def\lang_discretionaries_process_text#1% grouped !
+\setvalue{\??discretionarymode t}#1%
{\bgroup
\let\nextnextnext\egroup
\def\next##1#1%
@@ -269,7 +273,7 @@
\ifx\discretionarytoken\empty
\ifx#1\nextnext % takes care of ||| and +++ and ......
\ifcsname\??discretionaryaction\string#1\endcsname
- \csname\??discretionaryaction\string#1\endcsname
+ \lastnamedcs
\else\ifconditional\spaceafterdiscretionary
\prewordbreak\hbox{\string#1}\relax
\else\ifconditional\punctafterdiscretionary
@@ -284,7 +288,7 @@
% \prewordbreak\hbox{\textmodediscretionary\nextnext}\allowbreak\postwordbreak
% but an hbox blocks a possible \discretionary
\ifcsname\??discretionaryaction\endcsname
- \csname\??discretionaryaction\endcsname
+ \lastnamedcs
\else\ifconditional\spaceafterdiscretionary
\prewordbreak\textmodediscretionary\relax
\else\ifconditional\punctafterdiscretionary
@@ -295,7 +299,7 @@
% \prewordbreak\textmodediscretionary\nextnext\allowbreak\postwordbreak
\fi
\else\ifcsname\??discretionaryaction\discretionarytoken\endcsname
- \csname\??discretionaryaction\discretionarytoken\endcsname
+ \lastnamedcs
\else
\lang_discretionaries_check_before
\ifconditional\spaceafterdiscretionary
@@ -315,29 +319,36 @@
%D use the more direct approach:
\unexpanded\def\directdiscretionary
- {\csname
+ {\csname\??discretionarymode
\ifcase\discretionarymode
- \strippedcsname\lang_discretionaries_process_none
+ n% \csstring\lang_discretionaries_process_none
\else
- \strippedcsname\lang_discretionaries_process_direct
+ d% \csstring\lang_discretionaries_process_direct
\fi
\endcsname}
\unexpanded\def\indirectdiscretionary
- {\csname
+ {\csname\??discretionarymode
\ifcase\discretionarymode
- \strippedcsname\lang_discretionaries_process_none
+ n% \csstring\lang_discretionaries_process_none
\else
- \strippedcsname\lang_discretionaries_process_indirect
+ i% \csstring\lang_discretionaries_process_indirect
\fi
\endcsname}
-\unexpanded\def\lang_discretionaries_process_direct#1%
+% \unexpanded\def\lang_discretionaries_process_direct#1%
+\setuvalue{\??discretionarymode d}#1%
{\edef\discretionarytoken{\detokenize{#1}}%
\let\textmodediscretionary\compoundhyphen
- \executeifdefined{\??discretionaryaction\discretionarytoken}{\indirectdiscretionary{#1}}}
+ %\executeifdefined{\??discretionaryaction\discretionarytoken}{\indirectdiscretionary{#1}}}
+ \ifcsname\??discretionaryaction\discretionarytoken\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\indirectdiscretionary
+ \fi{#1}}
-\unexpanded\unexpanded\def\lang_discretionaries_process_indirect#1%
+% \unexpanded\unexpanded\def\lang_discretionaries_process_indirect#1%
+\setuvalue{\??discretionarymode i}#1%
{\prewordbreak\discretionary{\hbox{#1}}{}{\hbox{#1}}\allowbreak\postwordbreak}
\unexpanded\def\definetextmodediscretionary #1
@@ -395,7 +406,7 @@
{\prewordbreak\discretionary{-}{}{'}\postwordbreak}
\definetextmodediscretionary ^
- {\prewordbreak\discretionary{\hbox{$|$}}{}{\hbox{$|$}}%
+ {\prewordbreak\discretionary{\hbox{\normalstartimath|\normalstopimath}}{}{\hbox{\normalstartimath|\normalstopimath}}%
\allowbreak\postwordbreak} % bugged
\definetextmodediscretionary <
@@ -468,161 +479,175 @@
\discretionary{-}{}{}%
\fi\fi\fi}
-%D \macros
-%D {installcompoundcharacter}
-%D
-%D When Tobias Burnus started translating the dutch manual of \PPCHTEX\ into german,
-%D he suggested to let \CONTEXT\ support the \type{german.sty} method of handling
-%D compound characters, especially the umlaut. This package is meant for use with
-%D \PLAIN\ \TEX\ as well as \LATEX.
-%D
-%D I decided to implement compound character support as versatile as possible. As a
-%D result one can define his own compound character support, like:
-%D
-%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 \stoptyping
-%D
-%D or even
-%D
-%D \starttyping
-%D \installcompoundcharacter "ck {\discretionary {k-}{k}{ck}}
-%D \installcompoundcharacter "ff {\discretionary{ff-}{f}{ff}}
-%D \stoptyping
-%D
-%D The support is not limited to alphabetic characters, so the next definition is
-%D also valid.
-%D
-%D \starttyping
-%D \installcompoundcharacter ". {.\doifnextcharelse{\spacetoken}{}{\kern.125em}}
-%D \stoptyping
-%D
-%D The implementation looks familiar and uses the same tricks as mentioned earlier
-%D in this module. We take care of two arguments, which complicates things a bit.
-
-\installcorenamespace{compoundnormal}
-\installcorenamespace{compoundsingle}
-\installcorenamespace{compoundmultiple}
-\installcorenamespace{compounddefinition}
-
-%D When I started working on \MKIV\ code, we needed a different approach for
-%D defining the active character itself. In \MKII\ as well as in \MKIV\ we now use
-%D the catcode vectors.
-
-\setnewconstant\compoundcharactermode\plusone
-
-\newcount\c_lang_compounds_character
-
-\def\installcompoundcharacter #1#2#3 #4% {#4} no grouping
- {\ifcase\compoundcharactermode
- % ignore mode
- \else
- \chardef\c_lang_compounds_character`#1%
- \expandafter\chardef\csname\??compoundnormal\string#1\endcsname\c_lang_compounds_character
- \def\!!stringa{#3}%
- \expandafter\def\csname\ifx\!!stringa\empty\??compoundsingle\else\??compoundmultiple\fi\detokenize{#1#2#3}\endcsname{#4}%
- \setevalue{\??compounddefinition\detokenize{#1}}{\noexpand\lang_compounds_handle_character{\detokenize{#1}}}% beter nr's
- \expandafter\letcatcodecommand\expandafter\ctxcatcodes\expandafter\c_lang_compounds_character\csname\??compounddefinition\detokenize{#1}\endcsname
- \fi}
-
-%D We can also ignore definitions (needed in for instance \XML). Beware, this macro
-%D is supposed to be used grouped!
-
-\def\ignorecompoundcharacter
- {\compoundcharactermode\zerocount}
-
-%D In handling the compound characters we have to take care of \type {\bgroup} and
-%D \type {\egroup} tokens, so we end up with a multi||step interpretation macro. We
-%D look ahead for a \type {\bgroup}, \type {\egroup} or \type {\blankspace}. Being
-%D no user of this mechanism, the credits for testing them goes to Tobias Burnus,
-%D the first german user of \CONTEXT.
-%D
-%D We need to look into the future with \type{\futurelet} to prevent spaces from
-%D disappearing.
-
-\def\lang_compounds_handle_character#1%
- {\def\lang_compounds_handle_character_finish{\lang_compounds_handle_character_finish_indeed{#1}}%
- \futurelet\nexttoken\xhandlecompoundcharacter}
-
-\def\lang_compounds_handle_character_finish_indeed
- {\ifx\nexttoken\bgroup
- %\expandafter\lang_compounds_handle_character_pickup % handle "{ee} -> \"ee
- %\expandafter\gobbleoneargument % forget "{ee} -> ee
- \expandafter\lang_compounds_handle_character_one % ignore "{ee} -> "ee
- \else\ifx\nexttoken\egroup
- \doubleexpandafter\lang_compounds_handle_character_normal
- \else\ifx\nexttoken\blankspace
- \tripleexpandafter\lang_compounds_handle_character_normal
- \else
- \tripleexpandafter\lang_compounds_handle_character_pickup
- \fi\fi\fi}
-
-\def\lang_compounds_handle_character_normal#1%
- {\csname\??compoundnormal\string#1\endcsname}
-
-\def\lang_compounds_handle_character_pickup#1#2% preserve space
- {\def\lang_compounds_handle_character_finish{\lang_compounds_handle_character_finish_indeed#1#2}%
- \futurelet\nexttoken\lang_compounds_handle_character_finish}
-
-\def\lang_compounds_handle_character_finish_indeed
- {\ifx\nexttoken\bgroup
- \expandafter\lang_compounds_handle_character_one
- \else\ifx\nexttoken\egroup
- \doubleexpandafter\lang_compounds_handle_character_one
- \else\ifx\nexttoken\blankspace
- \tripleexpandafter\lang_compounds_handle_character_one
- \else
- \tripleexpandafter\lang_compounds_handle_character_two
- \fi\fi\fi}
-
-%D Besides taken care of the grouping and space tokens, we have to deal with three
-%D situations. First we look if the next character equals the first one, if so, then
-%D we just insert the original. Next we look if indeed a compound character is
-%D defined. We either execute the compound character or just insert the first. So we
-%D have
-%D
-%D \starttyping
-%D <key><key> <key><known> <key><unknown>
-%D \stoptyping
-%D
-%D In later modules we will see how these commands are used.
-
-\def\lang_compounds_handle_character_one#1#2%
- {\if\string#1\string#2% was: \ifx#1#2%
- \def\next{\csname\??compoundnormal\string#1\endcsname}%
- \else\ifcsname\??compoundsingle\string#1\string#2\endcsname
- \def\next{\csname\??compoundsingle\string#1\string#2\endcsname}%
- \else
- \def\next{\csname\??compoundnormal\string#1\endcsname#2}%
- \fi\fi
- \next}
-
-\def\lang_compounds_handle_character_two#1#2#3%
- {\if\string#1\string#2%
- \def\next{\csname\??compoundnormal\string#1\endcsname#3}%
- \else\ifcsname\??compoundmultiple\string#1\string#2\string#3\endcsname
- \def\next{\csname\??compoundmultiple\string#1\string#2\string#3\endcsname}%
- \else\ifcsname\??compoundsingle\string#1\string#2\endcsname
- \def\next{\csname\??compoundsingle\string#1\string#2\endcsname#3}%
- \else
- \def\next{\csname\??compoundnormal\string#1\endcsname#2#3}%
- \fi\fi\fi
- \next}
-
-%D For very obscure applications (see for an application \type {lang-sla.tex}) we
-%D provide:
-
-\def\simplifiedcompoundcharacter#1#2%
- {\ifcsname\??compoundsingle\string#1\string#2\endcsname
- \doubleexpandafter\firstofoneargument\csname\??compoundsingle\string#1\string#2\endcsname
- \else
- #2%
- \fi}
+% As this is rather mkii-ish we keep the mkiv definition around for educational
+% purposes but consider this feature obsolete in post mkii versions.
+
+% %D \macros
+% %D {installcompoundcharacter}
+% %D
+% %D When Tobias Burnus started translating the dutch manual of \PPCHTEX\ into german,
+% %D he suggested to let \CONTEXT\ support the \type{german.sty} method of handling
+% %D compound characters, especially the umlaut. This package is meant for use with
+% %D \PLAIN\ \TEX\ as well as \LATEX.
+% %D
+% %D I decided to implement compound character support as versatile as possible. As a
+% %D result one can define his own compound character support, like:
+% %D
+% %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 \stoptyping
+% %D
+% %D or even
+% %D
+% %D \starttyping
+% %D \installcompoundcharacter "ck {\discretionary {k-}{k}{ck}}
+% %D \installcompoundcharacter "ff {\discretionary{ff-}{f}{ff}}
+% %D \stoptyping
+% %D
+% %D The support is not limited to alphabetic characters, so the next definition is
+% %D also valid.
+% %D
+% %D \starttyping
+% %D \installcompoundcharacter ". {.\doifnextcharelse{\spacetoken}{}{\kern.125em}}
+% %D \stoptyping
+% %D
+% %D The implementation looks familiar and uses the same tricks as mentioned earlier
+% %D in this module. We take care of two arguments, which complicates things a bit.
+%
+% \installcorenamespace{compoundnormal}
+% \installcorenamespace{compoundsingle}
+% \installcorenamespace{compoundmultiple}
+% \installcorenamespace{compounddefinition}
+%
+% %D When I started working on \MKIV\ code, we needed a different approach for
+% %D defining the active character itself. In \MKII\ as well as in \MKIV\ we now use
+% %D the catcode vectors.
+%
+% \setnewconstant\compoundcharactermode\plusone
+%
+% \newcount\c_lang_compounds_character
+%
+% \def\installcompoundcharacter #1#2#3 #4% {#4} no grouping
+% {\ifcase\compoundcharactermode
+% % ignore mode
+% \else
+% \chardef\c_lang_compounds_character`#1%
+% \expandafter\chardef\csname\??compoundnormal\string#1\endcsname\c_lang_compounds_character
+% \def\!!stringa{#3}%
+% \expandafter\def\csname\ifx\!!stringa\empty\??compoundsingle\else\??compoundmultiple\fi\detokenize{#1#2#3}\endcsname{#4}%
+% \setevalue{\??compounddefinition\detokenize{#1}}{\noexpand\lang_compounds_handle_character{\detokenize{#1}}}% beter nr's
+% \expandafter\letcatcodecommand\expandafter\ctxcatcodes\expandafter\c_lang_compounds_character\csname\??compounddefinition\detokenize{#1}\endcsname
+% \fi}
+%
+% %D We can also ignore definitions (needed in for instance \XML). Beware, this macro
+% %D is supposed to be used grouped!
+%
+% \def\ignorecompoundcharacter
+% {\compoundcharactermode\zerocount}
+
+\let\ignorecompoundcharacter\relax
+
+% %D In handling the compound characters we have to take care of \type {\bgroup} and
+% %D \type {\egroup} tokens, so we end up with a multi||step interpretation macro. We
+% %D look ahead for a \type {\bgroup}, \type {\egroup} or \type {\blankspace}. Being
+% %D no user of this mechanism, the credits for testing them goes to Tobias Burnus,
+% %D the first german user of \CONTEXT.
+% %D
+% %D We need to look into the future with \type{\futurelet} to prevent spaces from
+% %D disappearing.
+%
+% \def\lang_compounds_handle_character#1%
+% {\def\lang_compounds_handle_character_finish{\lang_compounds_handle_character_finish_indeed{#1}}%
+% \futurelet\nexttoken\xhandlecompoundcharacter}
+%
+% \def\lang_compounds_handle_character_finish_indeed
+% {\ifx\nexttoken\bgroup
+% %\expandafter\lang_compounds_handle_character_pickup % handle "{ee} -> \"ee
+% %\expandafter\gobbleoneargument % forget "{ee} -> ee
+% \expandafter\lang_compounds_handle_character_one % ignore "{ee} -> "ee
+% \else\ifx\nexttoken\egroup
+% \doubleexpandafter\lang_compounds_handle_character_normal
+% \else\ifx\nexttoken\blankspace
+% \tripleexpandafter\lang_compounds_handle_character_normal
+% \else
+% \tripleexpandafter\lang_compounds_handle_character_pickup
+% \fi\fi\fi}
+%
+% \def\lang_compounds_handle_character_normal#1%
+% {\csname\??compoundnormal\string#1\endcsname}
+%
+% \def\lang_compounds_handle_character_pickup#1#2% preserve space
+% {\def\lang_compounds_handle_character_finish{\lang_compounds_handle_character_finish_indeed#1#2}%
+% \futurelet\nexttoken\lang_compounds_handle_character_finish}
+%
+% \def\lang_compounds_handle_character_finish_indeed
+% {\ifx\nexttoken\bgroup
+% \expandafter\lang_compounds_handle_character_one
+% \else\ifx\nexttoken\egroup
+% \doubleexpandafter\lang_compounds_handle_character_one
+% \else\ifx\nexttoken\blankspace
+% \tripleexpandafter\lang_compounds_handle_character_one
+% \else
+% \tripleexpandafter\lang_compounds_handle_character_two
+% \fi\fi\fi}
+%
+% %D Besides taken care of the grouping and space tokens, we have to deal with three
+% %D situations. First we look if the next character equals the first one, if so, then
+% %D we just insert the original. Next we look if indeed a compound character is
+% %D defined. We either execute the compound character or just insert the first. So we
+% %D have
+% %D
+% %D \starttyping
+% %D <key><key> <key><known> <key><unknown>
+% %D \stoptyping
+% %D
+% %D In later modules we will see how these commands are used.
+%
+% \def\lang_compounds_handle_character_one#1#2%
+% {\if\string#1\string#2% was: \ifx#1#2%
+% %\expandafter\let\expandafter\next\csname\??compoundnormal\string#1\endcsname
+% \csname\??compoundnormal\string#1\expandafter\endcsname
+% \else\ifcsname\??compoundsingle\string#1\string#2\endcsname
+% %\expandafter\let\expandafter\next\lastnamedcs
+% \expandafter\lastnamedcs
+% \else
+% %\expandafter\let\expandafter\next\lastnamedcs
+% \expandafter\lastnamedcs
+% \fi\fi}
+%
+% \def\lang_compounds_handle_character_two#1#2#3%
+% {\if\string#1\string#2%
+% \def\next{\csname\??compoundnormal\string#1\endcsname#3}%
+% \else\ifcsname\??compoundmultiple\string#1\string#2\string#3\endcsname
+% \expandafter\let\expandafter\next\lastnamedcs
+% \else\ifcsname\??compoundsingle\string#1\string#2\endcsname
+% \expandafter\let\expandafter\next\lastnamedcs
+% \else
+% \expandafter\let\expandafter\next\lastnamedcs
+% \fi\fi\fi
+% \next}
+%
+% %D For very obscure applications (see for an application \type {lang-sla.tex}) we
+% %D provide:
+%
+% % \def\simplifiedcompoundcharacter#1#2%
+% % {\ifcsname\??compoundsingle\string#1\string#2\endcsname
+% % \doubleexpandafter\firstofoneargument\csname\??compoundsingle\string#1\string#2\endcsname
+% % \else
+% % #2%
+% % \fi}
+%
+% \def\simplifiedcompoundcharacter#1#2%
+% {\ifcsname\??compoundsingle\string#1\string#2\endcsname
+% \doubleexpandafter\firstofoneargument\lastnamedcs
+% \else
+% #2%
+% \fi}
%D \macros
%D {disablediscretionaries,disablecompoundcharacter}
@@ -665,7 +690,7 @@
%D Here we hook some code into the clean up mechanism needed for verbatim data.
\appendtoks
- \disablecompoundcharacters
+ %\disablecompoundcharacters
\disablediscretionaries
\to \everycleanupfeatures
diff --git a/Master/texmf-dist/tex/context/base/lang-rep.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-rep.lua
index 95a5e545aac..28f2e5d50cc 100644
--- a/Master/texmf-dist/tex/context/base/lang-rep.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-rep.lua
@@ -17,11 +17,21 @@ if not modules then modules = { } end modules ['lang-rep'] = {
local type, tonumber = type, tonumber
local utfbyte, utfsplit = utf.byte, utf.split
-local P, C, U, Cc, Ct, lpegmatch = lpeg.P, lpeg.C, lpeg.patterns.utf8character, lpeg.Cc, lpeg.Ct, lpeg.match
+local P, C, U, Cc, Ct, Cs, lpegmatch = lpeg.P, lpeg.C, lpeg.patterns.utf8character, lpeg.Cc, lpeg.Ct, lpeg.Cs, lpeg.match
local find = string.find
+local zwnj = 0x200C
local grouped = P("{") * ( Ct((U/utfbyte-P("}"))^1) + Cc(false) ) * P("}")-- grouped
-local splitter = Ct((Ct(Cc("discretionary") * grouped * grouped * grouped) + U/utfbyte)^1)
+local splitter = Ct((
+ #P("{") * (
+ P("{}") / function() return zwnj end
+ + Ct(Cc("discretionary") * grouped * grouped * grouped)
+ + Ct(Cc("noligature") * grouped)
+ )
+ + U/utfbyte
+ )^1)
+
+local stripper = P("{") * Cs((1-P(-2))^0) * P("}") * P(-1)
local trace_replacements = false trackers.register("languages.replacements", function(v) trace_replacements = v end)
local trace_detail = false trackers.register("languages.replacements.detail", function(v) trace_detail = v end)
@@ -34,12 +44,19 @@ local nuts = nodes.nuts
local tonut = nuts.tonut
local tonode = nuts.tonode
-local setfield = nuts.setfield
local getnext = nuts.getnext
local getprev = nuts.getprev
local getattr = nuts.getattr
local getid = nuts.getid
local getchar = nuts.getchar
+local isglyph = nuts.isglyph
+
+local setfield = nuts.setfield
+local setattr = nuts.setattr
+local setlink = nuts.setlink
+local setnext = nuts.setnext
+local setprev = nuts.setprev
+local setchar = nuts.setchar
local insert_node_before = nuts.insert_before
local remove_node = nuts.remove
@@ -62,6 +79,7 @@ local replacements = languages.replacements or { }
languages.replacements = replacements
local a_replacements = attributes.private("replacements")
+local a_noligature = attributes.private("noligature")
local lists = { }
local last = 0
@@ -79,9 +97,10 @@ end)
lists[v_reset].attribute = unsetvalue -- so we discard 0
--- todo: glue kern
+-- todo: glue kern attr
local function add(root,word,replacement)
+ local replacement = lpegmatch(stripper,replacement) or replacement
local list = utfsplit(word,true)
local size = #list
for i=1,size do
@@ -128,23 +147,28 @@ local function hit(a,head)
local current = getnext(head)
local lastrun = false
local lastfinal = false
- while current and getid(current) == glyph_code do
- local newroot = root[getchar(current)]
- if not newroot then
- return lastrun, lastfinal
- else
- local final = newroot.final
- if final then
- if trace_detail then
- report_replacement("hitting word %a, replacement %a",final.word,final.replacement)
- end
- lastrun = current
- lastfinal = final
+ while current do
+ local char = isglyph(current)
+ if char then
+ local newroot = root[char]
+ if not newroot then
+ return lastrun, lastfinal
else
- root = newroot
+ local final = newroot.final
+ if final then
+ if trace_detail then
+ report_replacement("hitting word %a, replacement %a",final.word,final.replacement)
+ end
+ lastrun = current
+ lastfinal = final
+ else
+ root = newroot
+ end
end
+ current = getnext(current)
+ else
+ break
end
- current = getnext(current)
end
if lastrun then
return lastrun, lastfinal
@@ -157,7 +181,7 @@ local function tonodes(list,template)
local head, current
for i=1,#list do
local new = copy_node(template)
- setfield(new,"char",list[i])
+ setchar(new,list[i])
if head then
head, current = insert_after(head,current,new)
else
@@ -190,16 +214,14 @@ function replacements.handler(head)
local prev = getprev(current)
local next = getnext(last)
local list = current
- setfield(last,"next",nil)
- setfield(prev,"next",next)
- if next then
- setfield(next,"prev",prev)
- end
+ setnext(last)
+ setlink(prev,next)
current = prev
if not current then
head = nil
end
- for i=1,newlength do
+ local i = 1
+ while i <= newlength do
local codes = newcodes[i]
local new = nil
if type(codes) == "table" then
@@ -216,32 +238,51 @@ function replacements.handler(head)
if replace then
setfield(new,"replace",tonodes(replace,last))
end
+ head, current = insert_after(head,current,new)
+ elseif method == "noligature" then
+ -- not that efficient to copy but ok for testing
+ local list = codes[2]
+ if list then
+ for i=1,#list do
+ new = copy_node(last)
+ setchar(new,list[i])
+ setattr(new,a_noligature,1)
+ head, current = insert_after(head,current,new)
+ end
+ else
+ new = copy_node(last)
+ setchar(new,zwnj)
+ head, current = insert_after(head,current,new)
+ end
else
-- todo
end
else
new = copy_node(last)
- setfield(new,"char",codes)
- end
- if new then
+ setchar(new,codes)
head, current = insert_after(head,current,new)
end
+ i = i + 1
end
flush_list(list)
elseif oldlength == newlength then -- #old == #new
- for i=1,newlength do
- setfield(current,"char",newcodes[i])
- current = getnext(current)
+ if final.word == final.replacement then
+ -- nothing to do but skip
+ else
+ for i=1,newlength do
+ setchar(current,newcodes[i])
+ current = getnext(current)
+ end
end
elseif oldlength < newlength then -- #old < #new
for i=1,newlength-oldlength do
local n = copy_node(current)
- setfield(n,"char",newcodes[i])
+ setchar(n,newcodes[i])
head, current = insert_node_before(head,current,n)
current = getnext(current)
end
for i=newlength-oldlength+1,newlength do
- setfield(current,"char",newcodes[i])
+ setchar(current,newcodes[i])
current = getnext(current)
end
else -- #old > #new
@@ -249,7 +290,7 @@ function replacements.handler(head)
head, current = remove_node(head,current,true)
end
for i=1,newlength do
- setfield(current,"char",newcodes[i])
+ setchar(current,newcodes[i])
current = getnext(current)
end
end
diff --git a/Master/texmf-dist/tex/context/base/lang-rep.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-rep.mkiv
index a98d51f6c8b..48e1fd44b7b 100644
--- a/Master/texmf-dist/tex/context/base/lang-rep.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-rep.mkiv
@@ -21,7 +21,7 @@
\registerctxluafile{lang-rep}{1.001}
-\definesystemattribute[replacements][public]
+\definesystemattribute[replacements][public,global]
%D \startluacode
%D
diff --git a/Master/texmf-dist/tex/context/base/lang-spa.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-spa.mkiv
index e7cb0025fd6..e7cb0025fd6 100644
--- a/Master/texmf-dist/tex/context/base/lang-spa.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-spa.mkiv
diff --git a/Master/texmf-dist/tex/context/base/lang-txt.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-txt.lua
index 2938550eef3..2938550eef3 100644
--- a/Master/texmf-dist/tex/context/base/lang-txt.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-txt.lua
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-url.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-url.lua
new file mode 100644
index 00000000000..93c3c02a8db
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-url.lua
@@ -0,0 +1,167 @@
+if not modules then modules = { } end modules ['lang-url'] = {
+ version = 1.001,
+ comment = "companion to lang-url.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local utfcharacters, utfvalues, utfbyte, utfchar = utf.characters, utf.values, utf.byte, utf.char
+local min, max = math.min, math.max
+
+local context = context
+
+local implement = interfaces.implement
+local variables = interfaces.variables
+
+local v_before = variables.before
+local v_after = variables.after
+
+local is_letter = characters.is_letter
+
+--[[
+<p>Hyphenating <l n='url'/>'s is somewhat tricky and a matter of taste. I did
+consider using a dedicated hyphenation pattern or dealing with it by node
+parsing, but the following solution suits as well. After all, we're mostly
+dealing with <l n='ascii'/> characters.</p>
+]]--
+
+local urls = { }
+languages.urls = urls
+
+local characters = utilities.storage.allocate {
+ ["!"] = "before",
+ ['"'] = "before",
+ ["#"] = "before",
+ ["$"] = "before",
+ ["%"] = "before",
+ ["&"] = "before",
+ ["("] = "before",
+ ["*"] = "before",
+ ["+"] = "before",
+ [","] = "before",
+ ["-"] = "before",
+ ["."] = "before",
+ ["/"] = "before",
+ [":"] = "before",
+ [";"] = "before",
+ ["<"] = "before",
+ ["="] = "before",
+ [">"] = "before",
+ ["?"] = "before",
+ ["@"] = "before",
+ ["["] = "before",
+ ["\\"] = "before",
+ ["^"] = "before",
+ ["_"] = "before",
+ ["`"] = "before",
+ ["{"] = "before",
+ ["|"] = "before",
+ ["~"] = "before",
+
+ ["'"] = "after",
+ [")"] = "after",
+ ["]"] = "after",
+ ["}"] = "after",
+}
+
+local mapping = utilities.storage.allocate {
+ -- [utfchar(0xA0)] = "~", -- nbsp (catch)
+}
+
+urls.characters = characters
+urls.mapping = mapping
+urls.lefthyphenmin = 2
+urls.righthyphenmin = 3
+urls.discretionary = nil
+urls.packslashes = false
+
+directives.register("hyphenators.urls.packslashes",function(v)
+ urls.packslashes = v
+end)
+
+local ctx_a = context.a
+local ctx_b = context.b
+local ctx_d = context.d
+local ctx_c = context.c
+local ctx_l = context.l
+local ctx_C = context.C
+local ctx_L = context.L
+
+local function action(hyphenatedurl,str,left,right,disc)
+ --
+ left = max( left or urls.lefthyphenmin, 2)
+ right = min(#str-(right or urls.righthyphenmin)+2,#str)
+ disc = disc or urls.discretionary
+ --
+ local word = nil
+ local prev = nil
+ local pack = urls.packslashes
+ local length = 0
+ --
+ for char in utfcharacters(str) do
+ length = length + 1
+ char = mapping[char] or char
+ if prev == char and prev == "/" then
+ ctx_c(utfbyte(char))
+ elseif char == disc then
+ ctx_d()
+ else
+ if prev == "/" then
+ ctx_d()
+ end
+ local how = characters[char]
+ if how == v_before then
+ word = false
+ ctx_b(utfbyte(char))
+ elseif how == v_after then
+ word = false
+ ctx_a(utfbyte(char))
+ else
+ local letter = is_letter[char]
+ if length <= left or length >= right then
+ if word and letter then
+ ctx_L(utfbyte(char))
+ else
+ ctx_C(utfbyte(char))
+ end
+ elseif word and letter then
+ ctx_l(utfbyte(char))
+ else
+ ctx_c(utfbyte(char))
+ end
+ word = letter
+ end
+ end
+ if pack then
+ prev = char
+ end
+ end
+end
+
+-- urls.action = function(_,...) action(...) end -- sort of obsolete
+
+table.setmetatablecall(hyphenatedurl,action) -- watch out: a caller
+
+-- todo, no interface in mkiv yet
+
+function urls.setcharacters(str,value) -- 1, 2 == before, after
+ for s in utfcharacters(str) do
+ characters[s] = value or v_before
+ end
+end
+
+-- .urls.setcharacters("')]}",2)
+
+implement {
+ name = "sethyphenatedurlcharacters",
+ actions = urls.setcharacters,
+ arguments = { "string", "string" }
+}
+
+implement {
+ name = "hyphenatedurl",
+ scope = "private",
+ actions = function(...) action(hyphenatedurl,...) end,
+ arguments = { "string", "integer", "integer", "string" }
+}
diff --git a/Master/texmf-dist/tex/context/base/lang-url.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-url.mkiv
index e7d62ba016c..833a583f9f0 100644
--- a/Master/texmf-dist/tex/context/base/lang-url.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-url.mkiv
@@ -59,6 +59,7 @@
\let\|\letterbar
\let~=\lettertilde
\let|=\letterbar
+ \let\Ux\eUx
\to \everyhyphenatedurl
\let\hyphenatedurlseparator \empty % \periodcentered
@@ -73,7 +74,7 @@
\def\lang_url_a#1{\lang_url_more\char#1\lang_url_show\discretionary{}{\hyphenatedurlseparator}{}}
\def\lang_url_b#1{\lang_url_more\discretionary{\hyphenatedurlseparator}{}{}\lang_url_show\char#1\relax}
-\def\lang_url_d#1{\lang_url_more\discretionary{\lang_url_show}{\lang_url_show}{\lang_url_show}}
+\def\lang_url_d {\lang_url_more\discretionary{\lang_url_show}{\lang_url_show}{\lang_url_show}}
\def\lang_url_l#1{\lang_url_less\char#1\relax}
\def\lang_url_c#1{\lang_url_more\char#1\relax}
\def\lang_url_L#1{\lang_url_less\char#1\relax}
diff --git a/Master/texmf-dist/tex/context/base/lang-wrd.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-wrd.lua
index b564a02aec9..38e6187af5b 100644
--- a/Master/texmf-dist/tex/context/base/lang-wrd.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-wrd.lua
@@ -8,9 +8,9 @@ if not modules then modules = { } end modules ['lang-wrd'] = {
local lower = string.lower
local utfchar = utf.char
-local concat = table.concat
+local concat, setmetatableindex = table.concat, table.setmetatableindex
local lpegmatch = lpeg.match
-local P, S, Cs = lpeg.P, lpeg.S, lpeg.Cs
+local P, S, Cs, Cf, Cg, Cc, C = lpeg.P, lpeg.S, lpeg.Cs, lpeg.Cf, lpeg.Cg, lpeg.Cc, lpeg.C
local report_words = logs.reporter("languages","words")
@@ -38,8 +38,10 @@ local getid = nuts.getid
local getsubtype = nuts.getsubtype
local getchar = nuts.getchar
local setattr = nuts.setattr
+local isglyph = nuts.isglyph
local traverse_nodes = nuts.traverse
+local traverse_ids = nuts.traverse_id
local wordsdata = words.data
local chardata = characters.data
@@ -63,13 +65,41 @@ local colist = attributes.list[a_color]
local is_letter = characters.is_letter -- maybe is_character as variant
local spacing = S(" \n\r\t")
-local markup = S("-=")
-local lbrace = P("{")
-local rbrace = P("}")
-local disc = (lbrace * (1-rbrace)^0 * rbrace)^1 -- or just 3 times, time this
-local word = Cs((markup/"" + disc/"" + (1-spacing))^1)
+local markup = S("-=") / ""
+local lbrace = P("{") / ""
+local rbrace = P("}") / ""
+local snippet = lbrace * (1-rbrace)^0 * rbrace
+local disc = snippet/"" -- pre
+ * snippet/"" -- post
+ * snippet -- replace
+local word = Cs((markup + disc + (1-spacing))^1)
+
+-- lpegmatch((spacing + word/function(s) print(s) end)^0,"foo foo-bar bar{}{}{}foo bar{}{}{foo}")
+
+local loaded = { } -- we share lists
+local loaders = {
+ txt = function(list,fullname)
+ local data = io.loaddata(fullname)
+ if data and data ~= "" then
+ local parser = (spacing + word/function(s) list[s] = true end)^0
+ -- local parser = Cf(Cc(list) * Cg(spacing^0 * word * Cc(true))^1,rawset) -- not better
+ lpegmatch(parser,data)
+ end
+ end,
+ lua = function(list,fullname)
+ local data = dofile(fullname)
+ if data and type(data) == "table" then
+ local words = data.words
+ if words then
+ for k, v in next, words do
+ list[k] = true
+ end
+ end
+ end
+ end,
+}
-local loaded = { } -- we share lists
+loaders.luc = loaders.lua
function words.load(tag,filename)
local fullname = resolvers.findfile(filename,'other text file') or ""
@@ -79,8 +109,9 @@ function words.load(tag,filename)
local list = loaded[fullname]
if not list then
list = wordsdata[tag] or { }
- local parser = (spacing + word/function(s) list[s] = true end)^0
- lpegmatch(parser,io.loaddata(fullname) or "")
+ local suffix = file.suffix(fullname)
+ local loader = loaders[suffix] or loaders.txt
+ loader(list,fullname)
loaded[fullname] = list
end
wordsdata[tag] = list
@@ -125,9 +156,11 @@ local function mark_words(head,whenfound) -- can be optimized and shared
end
n, s = 0, 0
end
+ -- we haven't done the fonts yet so we have characters (otherwise
+ -- we'd have to use the tounicodes)
while current do
- local id = getid(current)
- if id == glyph_code then
+ local code, id = isglyph(current)
+ if code then
local a = getfield(current,"lang")
if a then
if a ~= language then
@@ -140,30 +173,27 @@ local function mark_words(head,whenfound) -- can be optimized and shared
action()
language = a
end
- local components = getfield(current,"components")
- if components then
+ local data = chardata[code]
+ if is_letter[data.category] then
n = n + 1
nds[n] = current
- for g in traverse_nodes(components) do
- s = s + 1
- str[s] = utfchar(getchar(g))
- end
- else
- local code = getchar(current)
- local data = chardata[code]
- if is_letter[data.category] then
- n = n + 1
- nds[n] = current
- s = s + 1
- str[s] = utfchar(code)
- elseif s > 0 then
- action()
- end
+ s = s + 1
+ str[s] = utfchar(code)
+ elseif s > 0 then
+ action()
end
elseif id == disc_code then -- take the replace
if n > 0 then
- n = n + 1
- nds[n] = current
+ local r = getfield(current,"replace")
+ if r then
+ for current in traverse_ids(glyph_code,r) do
+ local code = getchar(current)
+ n = n + 1
+ nds[n] = current
+ s = s + 1
+ str[s] = utfchar(code)
+ end
+ end
end
elseif id == kern_code and getsubtype(current) == kerning_code and s > 0 then
-- ok
@@ -201,7 +231,9 @@ function words.enable(settings)
local method = settings.method
wordmethod = method and tonumber(method) or wordmethod or 1
local e = enablers[wordmethod]
- if e then e(settings) end
+ if e then
+ e(settings)
+ end
tasks.enableaction("processors","languages.words.check")
enabled = true
end
@@ -254,35 +286,29 @@ local dumpthem = false
local listname = "document"
local category = { }
-local categories = { }
-
-setmetatable(categories, {
- __index = function(t,k)
- local languages = { }
- setmetatable(languages, {
- __index = function(t,k)
- local r = registered[k]
- local v = {
- number = language,
- parent = r and r.parent or nil,
- patterns = r and r.patterns or nil,
- tag = r and r.tag or nil,
- list = { },
- total = 0,
- unique = 0,
- }
- t[k] = v
- return v
- end
- } )
+
+local categories = setmetatableindex(function(t,k)
+ local languages = setmetatableindex(function(t,k)
+ local r = registered[k]
local v = {
- languages = languages,
- total = 0,
+ number = language,
+ parent = r and r.parent or nil,
+ patterns = r and r.patterns or nil,
+ tag = r and r.tag or nil,
+ list = { },
+ total = 0,
+ unique = 0,
}
t[k] = v
return v
- end
-} )
+ end)
+ local v = {
+ languages = languages,
+ total = 0,
+ }
+ t[k] = v
+ return v
+end)
local collected = {
total = 0,
@@ -330,7 +356,7 @@ local function dumpusedwords()
end
directives.register("languages.words.dump", function(v)
- dumpname = type(v) == "string" and v ~= "" and v
+ dumpname = (type(v) == "string" and v ~= "" and v) or dumpname
end)
luatex.registerstopactions(dumpusedwords)
diff --git a/Master/texmf-dist/tex/context/base/lang-wrd.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-wrd.mkiv
index 8c544773b3a..8c544773b3a 100644
--- a/Master/texmf-dist/tex/context/base/lang-wrd.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-wrd.mkiv
diff --git a/Master/texmf-dist/tex/context/base/layo-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/layo-ini.lua
index d35d7ef6965..d35d7ef6965 100644
--- a/Master/texmf-dist/tex/context/base/layo-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/layo-ini.lua
diff --git a/Master/texmf-dist/tex/context/base/layo-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/layo-ini.mkiv
index 9097265c9c4..9097265c9c4 100644
--- a/Master/texmf-dist/tex/context/base/layo-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/layo-ini.mkiv
diff --git a/Master/texmf-dist/tex/context/base/lpdf-ano.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-ano.lua
index f5e320a0021..72800bc648c 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-ano.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-ano.lua
@@ -34,6 +34,7 @@ local report_bookmark = logs.reporter("backend","bookmarks")
local variables = interfaces.variables
local v_auto = variables.auto
local v_page = variables.page
+local v_name = variables.name
local factor = number.dimenfactors.bp
@@ -152,10 +153,7 @@ end)
-- the caching is somewhat memory intense on the one hand but
-- it saves many small temporary tables so it might pay off
-local pagedestinations = allocate()
-local pagereferences = allocate() -- annots are cached themselves
-
-setmetatableindex(pagedestinations, function(t,k)
+local pagedestinations = setmetatableindex(function(t,k)
k = tonumber(k)
if not k or k <= 0 then
return pdfnull()
@@ -173,7 +171,7 @@ setmetatableindex(pagedestinations, function(t,k)
return v
end)
-setmetatableindex(pagereferences,function(t,k)
+local pagereferences = setmetatableindex(function(t,k)
k = tonumber(k)
if not k or k <= 0 then
return nil
@@ -190,9 +188,6 @@ setmetatableindex(pagereferences,function(t,k)
return v
end)
-lpdf.pagereferences = pagereferences -- table
-lpdf.pagedestinations = pagedestinations -- table
-
local defaultdestination = pdfarray { 0, pdf_fit }
-- fit is default (see lpdf-nod)
@@ -353,19 +348,41 @@ local v_tight = variables.tight
-- and finger zooming this whole view is rather useless and as with any zooming
-- one looses the overview and keeps zooming.
+-- todo: scaling
+
+-- local destinationactions = {
+-- [v_standard] = function(r,w,h,d) return f_xyz (r,gethpos()*factor,(getvpos()+h)*factor) end, -- local left,top with no zoom
+-- [v_frame] = function(r,w,h,d) return f_fitr (r,pdfrectangle(w,h,d)) end, -- fit rectangle in window
+-- [v_width] = function(r,w,h,d) return f_fith (r,(getvpos()+h)*factor) end, -- top coordinate, fit width of page in window
+-- [v_minwidth] = function(r,w,h,d) return f_fitbh(r,(getvpos()+h)*factor) end, -- top coordinate, fit width of content in window
+-- [v_height] = function(r,w,h,d) return f_fitv (r,gethpos()*factor) end, -- left coordinate, fit height of page in window
+-- [v_minheight] = function(r,w,h,d) return f_fitbv(r,gethpos()*factor) end, -- left coordinate, fit height of content in window [v_fit] = f_fit, -- fit page in window
+-- [v_tight] = f_fitb, -- fit content in window
+-- [v_fit] = f_fit,
+-- }
+
local destinationactions = {
- -- [v_standard] = function(r,w,h,d) return f_xyz (r,pdfrectangle(w,h,d)) end, -- local left,top with zoom (0 in our case)
- [v_standard] = function(r,w,h,d) return f_xyz (r,gethpos()*factor,(getvpos()+h)*factor) end, -- local left,top with no zoom
- [v_frame] = function(r,w,h,d) return f_fitr (r,pdfrectangle(w,h,d)) end, -- fit rectangle in window
- -- [v_width] = function(r,w,h,d) return f_fith (r,gethpos()*factor) end, -- top coordinate, fit width of page in window
- [v_width] = function(r,w,h,d) return f_fith (r,(getvpos()+h)*factor) end, -- top coordinate, fit width of page in window
- -- [v_minwidth] = function(r,w,h,d) return f_fitbh(r,gethpos()*factor) end, -- top coordinate, fit width of content in window
- [v_minwidth] = function(r,w,h,d) return f_fitbh(r,(getvpos()+h)*factor) end, -- top coordinate, fit width of content in window
- -- [v_height] = function(r,w,h,d) return f_fitv (r,(getvpos()+h)*factor) end, -- left coordinate, fit height of page in window
- [v_height] = function(r,w,h,d) return f_fitv (r,gethpos()*factor) end, -- left coordinate, fit height of page in window
- -- [v_minheight] = function(r,w,h,d) return f_fitbv(r,(getvpos()+h)*factor) end, -- left coordinate, fit height of content in window
- [v_minheight] = function(r,w,h,d) return f_fitbv(r,gethpos()*factor) end, -- left coordinate, fit height of content in window [v_fit] = f_fit, -- fit page in window
- [v_tight] = f_fitb, -- fit content in window
+ [v_standard] = function(r,w,h,d,o) -- local left,top with no zoom
+ local tx, ty = getpos()
+ return f_xyz(r,tx*factor,(ty+h+2*o)*factor) -- we can assume margins
+ end,
+ [v_frame] = function(r,w,h,d,o) -- fit rectangle in window
+ return f_fitr(r,pdfrectangle(w,h,d,o))
+ end,
+ [v_width] = function(r,w,h,d,o) -- top coordinate, fit width of page in window
+ return f_fith(r,(getvpos()+h+o)*factor)
+ end,
+ [v_minwidth] = function(r,w,h,d,o) -- top coordinate, fit width of content in window
+ return f_fitbh(r,(getvpos()+h+o)*factor)
+ end,
+ [v_height] = function(r,w,h,d,o) -- left coordinate, fit height of page in window
+ return f_fitv(r,(gethpos())*factor)
+ end,
+ [v_minheight] = function(r,w,h,d,o) -- left coordinate, fit height of content in window
+ return f_fitbv(r,(gethpos())*factor)
+ end,
+ [v_tight] = f_fitb, -- fit content in window
+ [v_fit] = f_fit, -- fit content in window
}
local mapping = {
@@ -381,14 +398,17 @@ local mapping = {
local defaultview = v_fit
local defaultaction = destinationactions[defaultview]
+local offset = 0 -- 65536*5
--- A complication is that we need to use named destinations when we have views so we
--- end up with a mix. A previous versions just output multiple destinations but not
--- that we noved all to here we can be more sparse.
+directives.register("destinations.offset", function(v)
+ offset = string.todimen(v) or 0
+end)
-local pagedestinations = { }
+-- A complication is that we need to use named destinations when we have views so we
+-- end up with a mix. A previous versions just output multiple destinations but now
+-- that we moved all to here we can be more sparse.
-table.setmetatableindex(pagedestinations,function(t,k)
+local pagedestinations = setmetatableindex(function(t,k) -- not the same as the one above!
local v = pdfdelayedobject(f_fit(k))
t[k] = v
return v
@@ -396,11 +416,11 @@ end)
local function flushdestination(width,height,depth,names,view)
local r = pdfpagereference(texgetcount("realpageno"))
- if view == defaultview or not view or view == "" then
+ if (references.innermethod ~= v_name) and (view == defaultview or not view or view == "") then
r = pagedestinations[r]
else
local action = view and destinationactions[view] or defaultaction
- r = pdfdelayedobject(action(r,width,height,depth))
+ r = pdfdelayedobject(action(r,width,height,depth,offset))
end
for n=1,#names do
local name = names[n]
@@ -422,33 +442,64 @@ function nodeinjections.destination(width,height,depth,names,view)
-- we could save some aut's by using a name when given but it doesn't pay off apart
-- from making the code messy and tracing hard .. we only save some destinations
-- which we already share anyway
- for n=1,#names do
- local name = names[n]
- if usedviews[name] then
- -- already done, maybe a warning
- elseif type(name) == "number" then
- if noview then
+ if method == v_page then
+ for n=1,#names do
+ local name = names[n]
+ local used = usedviews[name]
+ if used and used ~= true then
+ -- already done, maybe a warning
+ elseif type(name) == "number" then
+ -- if noview then
+ -- usedviews[name] = view
+ -- names[n] = false
+ -- else
+ usedviews[name] = view
+ names[n] = false
+ -- end
+ else
usedviews[name] = view
- names[n] = false
- elseif method == v_page then
+ end
+ end
+ elseif method == v_name then
+ for n=1,#names do
+ local name = names[n]
+ local used = usedviews[name]
+ if used and used ~= true then
+ -- already done, maybe a warning
+ elseif type(name) == "number" then
+ local used = usedinternals[name]
usedviews[name] = view
- names[n] = false
+ names[n] = autoprefix .. name
+ doview = true
else
- local used = usedinternals[name]
- if used and used ~= defaultview then
+ usedviews[name] = view
+ doview = true
+ end
+ end
+ else
+ for n=1,#names do
+ local name = names[n]
+ if usedviews[name] then
+ -- already done, maybe a warning
+ elseif type(name) == "number" then
+ if noview then
usedviews[name] = view
- names[n] = autoprefix .. name
- doview = true
- else
- -- names[n] = autoprefix .. name
names[n] = false
+ else
+ local used = usedinternals[name]
+ if used and used ~= defaultview then
+ usedviews[name] = view
+ names[n] = autoprefix .. name
+ doview = true
+ else
+ -- names[n] = autoprefix .. name
+ names[n] = false
+ end
end
+ else
+ usedviews[name] = view
+ doview = true
end
- elseif method == v_page then
- usedviews[name] = view
- else
- usedviews[name] = view
- doview = true
end
end
if doview then
@@ -458,43 +509,60 @@ end
-- we could share dictionaries ... todo
-local function somedestination(destination,internal,page) -- no view anyway
- if references.innermethod ~= v_page then
- if type(destination) == "number" then
- if not internal then
- internal = destination
- end
- destination = nil
- end
- if internal then
- flaginternals[internal] = true -- for bookmarks and so
- local used = usedinternals[internal]
- if used == defaultview or used == true then
- return pagereferences[page]
- end
- if type(destination) ~= "string" then
- destination = autoprefix .. internal
+local function pdflinkpage(page)
+ return pagereferences[page]
+end
+
+local function pdflinkinternal(internal,page)
+ local method = references.innermethod
+ if internal then
+ flaginternals[internal] = true -- for bookmarks and so
+ local used = usedinternals[internal]
+ if used == defaultview or used == true then
+ return pagereferences[page]
+ else
+ if type(internal) ~= "string" then
+ internal = autoprefix .. internal
end
return pdfdictionary {
S = pdf_goto,
- D = destination,
+ D = internal,
}
end
- if destination then
- -- hopefully this one is flushed
+ else
+ return pagereferences[page]
+ end
+end
+
+local function pdflinkname(destination,internal,page)
+ local method = references.innermethod
+ if method == v_auto then
+ local used = defaultview
+ if internal then
+ flaginternals[internal] = true -- for bookmarks and so
+ used = usedinternals[internal] or defaultview
+ end
+ if used == defaultview then -- or used == true then
+ return pagereferences[page]
+ else
return pdfdictionary {
S = pdf_goto,
D = destination,
}
end
+ elseif method == v_name then
+ -- flaginternals[internal] = true -- for bookmarks and so
+ return pdfdictionary {
+ S = pdf_goto,
+ D = destination,
+ }
+ else
+ return pagereferences[page]
end
- return pagereferences[page]
end
-- annotations
-local pdflink = somedestination
-
local function pdffilelink(filename,destination,page,actions)
if not filename or filename == "" or file.basename(filename) == tex.jobname then
return false
@@ -625,9 +693,9 @@ local share = true
local f_annot = formatters["<< /Type /Annot %s /Rect [ %0.3F %0.3F %0.3F %0.3F ] >>"]
-directives.register("refences.sharelinks", function(v) share = v end)
+directives.register("references.sharelinks", function(v) share = v end)
-table.setmetatableindex(hashed,function(t,k)
+setmetatableindex(hashed,function(t,k)
local v = pdfdelayedobject(k)
if share then
t[k] = v
@@ -707,36 +775,46 @@ end)
-- runners and specials
+local splitter = lpeg.splitat(",",true)
+
runners["inner"] = function(var,actions)
local internal = false
- local inner = nil
- if references.innermethod == v_auto then
- local vi = var.i
- if vi then
- local vir = vi.references
- if vir then
- -- todo: no need for it when we have a real reference
- local reference = vir.reference
- if reference and reference ~= "" then
- var.inner = reference
- local prefix = var.p
- if prefix and prefix ~= "" then
- var.prefix = prefix
- inner = prefix .. ":" .. reference
- else
- inner = reference
- end
- end
- internal = vir.internal
- if internal then
- flaginternals[internal] = true
+ local name = nil
+ local method = references.innermethod
+ local vi = var.i
+ local page = var.r
+ if vi then
+ local vir = vi.references
+ if vir then
+ -- todo: no need for it when we have a real reference ... although we need
+ -- this mess for prefixes anyway
+ local reference = vir.reference
+ if reference and reference ~= "" then
+ reference = lpegmatch(splitter,reference) or reference
+ var.inner = reference
+ local prefix = var.p
+ if prefix and prefix ~= "" then
+ var.prefix = prefix
+ name = prefix .. ":" .. reference
+ else
+ name = reference
end
end
+ internal = vir.internal
+ if internal then
+ flaginternals[internal] = true
+ end
end
+ end
+ if name then
+ return pdflinkname(name,internal,page)
+ elseif internal then
+ return pdflinkinternal(internal,page)
+ elseif page then
+ return pdflinkpage(page)
else
- var.inner = nil
+ -- real bad
end
- return pdflink(inner,internal,var.r)
end
runners["inner with arguments"] = function(var,actions)
@@ -803,7 +881,7 @@ function specials.internal(var,actions) -- better resolve in strc-ref
report_reference("no internal reference %a",i or "<unset>")
else
flaginternals[i] = true
- return pdflink(nil,i,v.references.realpage)
+ return pdflinkinternal(i,v.references.realpage)
end
end
@@ -827,7 +905,7 @@ function specials.page(var,actions)
p = references.realpageofpage(tonumber(p))
end
end
- return pdflink(nil,nil,p or var.operation)
+ return pdflinkpage(p or var.operation)
end
end
@@ -836,7 +914,7 @@ function specials.realpage(var,actions)
if file then
return pdffilelink(references.checkedfile(file),nil,var.operation,actions)
else
- return pdflink(nil,nil,var.operation)
+ return pdflinkpage(var.operation)
end
end
@@ -855,7 +933,7 @@ function specials.userpage(var,actions)
-- var.r = p
-- end
end
- return pdflink(nil,nil,p or var.operation)
+ return pdflinkpage(p or var.operation)
end
end
@@ -863,7 +941,7 @@ function specials.deltapage(var,actions)
local p = tonumber(var.operation)
if p then
p = references.checkedrealpage(p + texgetcount("realpageno"))
- return pdflink(nil,nil,p)
+ return pdflinkpage(p)
end
end
@@ -1051,9 +1129,10 @@ end
local function build(levels,start,parent,method,nested)
local startlevel = levels[start].level
+ local noflevels = #levels
local i, n = start, 0
local child, entry, m, prev, first, last, f, l
- while i and i <= #levels do
+ while i and i <= noflevels do
local current = levels[i]
if current.usedpage == false then
-- safeguard
@@ -1064,43 +1143,52 @@ local function build(levels,start,parent,method,nested)
local reference = current.reference
local opened = current.opened
local reftype = type(reference)
+ local block = nil
local variant = "unknown"
if reftype == "table" then
-- we're okay
- variant = "list"
+ variant = "list"
+ block = reference.block
elseif reftype == "string" then
local resolved = references.identify("",reference)
local realpage = resolved and structures.references.setreferencerealpage(resolved) or 0
if realpage > 0 then
- variant = "realpage"
- realpage = realpage
+ variant = "realpage"
+ realpage = realpage
+ reference = structures.pages.collected[realpage]
+ block = reference and reference.block
end
elseif reftype == "number" then
if reference > 0 then
- variant = "realpage"
- realpage = reference
+ variant = "realpage"
+ realpage = reference
+ reference = structures.pages.collected[realpage]
+ block = reference and reference.block
end
else
-- error
end
+ current.block = block
if variant == "unknown" then
-- error, ignore
i = i + 1
- elseif level <= startlevel then
- if level < startlevel then
- if nested then -- could be an option but otherwise we quit too soon
- if entry then
- pdfflushobject(child,entry)
- else
- report_bookmark("error 1")
- end
- return i, n, first, last
+ -- elseif (level < startlevel) or (i > 1 and block ~= levels[i-1].reference.block) then
+ elseif (level < startlevel) or (i > 1 and block ~= levels[i-1].block) then
+ if nested then -- could be an option but otherwise we quit too soon
+ if entry then
+ pdfflushobject(child,entry)
else
- report_bookmark("confusing level change at level %a around %a",level,title)
+ report_bookmark("error 1")
end
+ return i, n, first, last
+ else
+ report_bookmark("confusing level change at level %a around %a",level,title)
+ startlevel = level
end
+ end
+ if level == startlevel then
if trace_bookmarks then
- report_bookmark("%3i %w%s %s",reference.realpage,(level-1)*2,(opened and "+") or "-",title)
+ report_bookmark("%3i %w%s %s",realpage,(level-1)*2,(opened and "+") or "-",title)
end
local prev = child
child = pdfreserveobject()
@@ -1110,9 +1198,11 @@ local function build(levels,start,parent,method,nested)
end
local action = nil
if variant == "list" then
- action = somedestination(reference.internal,reference.internal,reference.realpage)
+ action = pdflinkinternal(reference.internal,reference.realpage)
elseif variant == "realpage" then
action = pagereferences[realpage]
+ else
+ -- hm, what to do
end
entry = pdfdictionary {
Title = pdfunicode(title),
@@ -1120,13 +1210,15 @@ local function build(levels,start,parent,method,nested)
Prev = prev and pdfreference(prev),
A = action,
}
- -- entry.Dest = somedestination(reference.internal,reference.internal,reference.realpage)
- if not first then first, last = child, child end
+ -- entry.Dest = pdflinkinternal(reference.internal,reference.realpage)
+ if not first then
+ first, last = child, child
+ end
prev = child
last = prev
n = n + 1
i = i + 1
- elseif i < #levels and level > startlevel then
+ elseif i < noflevels and level > startlevel then
i, m, f, l = build(levels,i,pdfreference(child),method,true)
if entry then
entry.Count = (opened and m) or -m
@@ -1160,6 +1252,7 @@ end
function codeinjections.addbookmarks(levels,method)
if levels and #levels > 0 then
+-- inspect(levels)
local parent = pdfreserveobject()
local _, m, first, last = build(levels,1,pdfreference(parent),method or "internal",false)
local dict = pdfdictionary {
diff --git a/Master/texmf-dist/tex/context/base/lpdf-col.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-col.lua
index 877c01a1c24..877c01a1c24 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-col.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-col.lua
diff --git a/Master/texmf-dist/tex/context/base/lpdf-enc.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-enc.lua
index 090fb15cd5d..090fb15cd5d 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-enc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-enc.lua
diff --git a/Master/texmf-dist/tex/context/base/lpdf-epa.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-epa.lua
index dd5ecc60990..c72e2a424f4 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-epa.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-epa.lua
@@ -12,6 +12,7 @@ if not modules then modules = { } end modules ['lpdf-epa'] = {
local type, tonumber = type, tonumber
local format, gsub, lower = string.format, string.gsub, string.lower
local formatters = string.formatters
+local abs = math.abs
----- lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
@@ -38,6 +39,8 @@ local escapetex = characters.filters.utf.private.escape
local bookmarks = structures.bookmarks
+local maxdimen = 2^30-1
+
local layerspec = { -- predefining saves time
"epdflinks"
}
@@ -152,8 +155,8 @@ function codeinjections.mergereferences(specification)
local size = specification.size or "crop" -- todo
local pagedata = document.pages[pagenumber]
local annotations = pagedata and pagedata.Annots
- local namespace = makenamespace(fullname)
- local reference = namespace .. pagenumber
+ local namespace = makenamespace(fullname)
+ local reference = namespace .. pagenumber
if annotations and annotations.n > 0 then
local mediabox = pagedata.MediaBox
local llx = mediabox[1]
@@ -178,7 +181,11 @@ function codeinjections.mergereferences(specification)
local h = yscale * (a_ury - a_lly)
if subtype == "Link" then
local a = annotation.A
- if a then
+ if not a then
+ report_link("missing link annotation")
+ elseif w > width or h > height or w < 0 or h < 0 or abs(x) > (maxdimen/2) or abs(y) > (maxdimen/2) then
+ report_link("broken link rectangle [%f %f %f %f] (max: %f)",a_llx,a_lly,a_urx,a_ury,maxdimen/2)
+ else
local linktype = a.S
if linktype == "GoTo" then
link_goto(x,y,w,h,document,annotation,pagedata,namespace)
@@ -189,8 +196,6 @@ function codeinjections.mergereferences(specification)
elseif trace_links then
report_link("unsupported link annotation %a",linktype)
end
- else
- report_link("missing link annotation")
end
elseif trace_links then
report_link("unsupported annotation %a",subtype)
diff --git a/Master/texmf-dist/tex/context/base/lpdf-epd.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-epd.lua
index 1dc20bc267d..0f62d6189ae 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-epd.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-epd.lua
@@ -17,9 +17,9 @@ if not modules then modules = { } end modules ['lpdf-epd'] = {
-- we will provide .n as #; maybe in Lua 5.3 or later.
--
-- As there can be references to the parent we cannot expand a tree. I played with some
--- expansion variants but it does not pay off; adding extra checks is nto worth the trouble.
+-- expansion variants but it does not pay off; adding extra checks is not worth the trouble.
--
--- The document stays over. In order to free memory one has to explicitly onload the loaded
+-- The document stays open. In order to free memory one has to explicitly unload the loaded
-- document.
--
-- We have much more checking then needed in the prepare functions because occasionally
@@ -538,7 +538,7 @@ function lpdf_epdf.load(filename)
--
local Catalog = some_dictionary(__xref__:getCatalog():getDict(),document)
local Info = some_dictionary(__xref__:getDocInfo():getDict(),document)
- --
+ --
document.Catalog = Catalog
document.Info = Info
-- a few handy helper tables
diff --git a/Master/texmf-dist/tex/context/base/lpdf-fld.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-fld.lua
index f0aad36237c..75d0ba98e03 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-fld.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-fld.lua
@@ -105,6 +105,7 @@ local submitoutputformat = 0 -- 0=unknown 1=HTML 2=FDF 3=XML => not yet
local pdf_widget = pdfconstant("Widget")
local pdf_tx = pdfconstant("Tx")
+local pdf_sig = pdfconstant("Sig")
local pdf_ch = pdfconstant("Ch")
local pdf_btn = pdfconstant("Btn")
----- pdf_yes = pdfconstant("Yes")
@@ -693,6 +694,12 @@ function codeinjections.setfieldcalculationset(tag)
calculationset = tag
end
+interfaces.implement {
+ name = "setfieldcalculationset",
+ actions = codeinjections.setfieldcalculationset,
+ arguments = "string",
+}
+
local function predefinesymbols(specification)
local values = specification.values
if values then
@@ -1036,6 +1043,71 @@ function methods.text(name,specification)
return makelinechild(name,enhance(specification,"MultiLine"))
end
+-- copy of line ... probably also needs a /Lock
+
+local function makesignatureparent(field,specification)
+ local text = pdfunicode(field.default)
+ local length = tonumber(specification.length or 0) or 0
+ local d = pdfdictionary {
+ Subtype = pdf_widget,
+ T = pdfunicode(specification.title),
+ F = fieldplus(specification),
+ Ff = fieldflag(specification),
+ OC = fieldlayer(specification),
+ DA = fieldsurrounding(specification),
+ AA = fieldactions(specification),
+ FT = pdf_sig,
+ Q = fieldalignment(specification),
+ MaxLen = length == 0 and 1000 or length,
+ DV = text,
+ V = text,
+ }
+ save_parent(field,specification,d)
+end
+
+local function makesignaturechild(name,specification)
+ local field, parent = clones[name], nil
+ if field then
+ parent = fields[field.parent]
+ if not parent.pobj then
+ if trace_fields then
+ report_fields("forcing parent signature %a",parent.name)
+ end
+ makesignatureparent(parent,specification)
+ end
+ else
+ parent = fields[name]
+ field = parent
+ if not parent.pobj then
+ if trace_fields then
+ report_fields("using parent text %a",name)
+ end
+ makesignatureparent(parent,specification)
+ end
+ end
+ if trace_fields then
+ report_fields("using child text %a",name)
+ end
+ -- we could save a little by not setting some key/value when it's the
+ -- same as parent but it would cost more memory to keep track of it
+ local d = pdfdictionary {
+ Subtype = pdf_widget,
+ Parent = pdfreference(parent.pobj),
+ F = fieldplus(specification),
+ OC = fieldlayer(specification),
+ DA = fieldsurrounding(specification),
+ AA = fieldactions(specification),
+ MK = fieldrendering(specification),
+ Q = fieldalignment(specification),
+ }
+ return save_kid(parent,specification,d)
+end
+
+function methods.signature(name,specification)
+ return makesignaturechild(name,specification)
+end
+--
+
local function makechoiceparent(field,specification)
local d = pdfdictionary {
Subtype = pdf_widget,
diff --git a/Master/texmf-dist/tex/context/base/lpdf-fmt.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-fmt.lua
index 862c011b8a0..b1d9a4b0ca4 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-fmt.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-fmt.lua
@@ -36,8 +36,6 @@ local pdfstring = lpdf.string
local pdfverbose = lpdf.verbose
local pdfflushstreamfileobject = lpdf.flushstreamfileobject
-local texset = tex.set
-
local addtoinfo = lpdf.addtoinfo
local injectxmpinfo = lpdf.injectxmpinfo
local insertxmpinfo = lpdf.insertxmpinfo
@@ -204,7 +202,7 @@ local formats = utilities.storage.allocate {
inject_metadata = function()
injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfxid='http://www.npes.org/pdfx/ns/id/'><pdfxid:GTS_PDFXVersion>PDF/X-4</pdfxid:GTS_PDFXVersion></rdf:Description>",false)
insertxmpinfo("xml://rdf:Description/xmpMM:InstanceID","<xmpMM:VersionID>1</xmpMM:VersionID>",false)
- insertxmpinfo("xml://rdf:Description/xmpMM:InstanceID","<xmpMM:RenditionClass>default</xmpMM:RenditonClass>",false)
+ insertxmpinfo("xml://rdf:Description/xmpMM:InstanceID","<xmpMM:RenditionClass>default</xmpMM:RenditionClass>",false)
end
},
["pdf/x-4p"] = {
@@ -229,7 +227,7 @@ local formats = utilities.storage.allocate {
inject_metadata = function()
injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfxid='http://www.npes.org/pdfx/ns/id/'><pdfxid:GTS_PDFXVersion>PDF/X-4p</pdfxid:GTS_PDFXVersion></rdf:Description>",false)
insertxmpinfo("xml://rdf:Description/xmpMM:InstanceID","<xmpMM:VersionID>1</xmpMM:VersionID>",false)
- insertxmpinfo("xml://rdf:Description/xmpMM:InstanceID","<xmpMM:RenditionClass>default</xmpMM:RenditonClass>",false)
+ insertxmpinfo("xml://rdf:Description/xmpMM:InstanceID","<xmpMM:RenditionClass>default</xmpMM:RenditionClass>",false)
end
},
["pdf/x-5g"] = {
@@ -339,6 +337,75 @@ local formats = utilities.storage.allocate {
injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'><pdfaid:part>1</pdfaid:part><pdfaid:conformance>B</pdfaid:conformance></rdf:Description>",false)
end
},
+ ["pdf/a-2a"] = { -- untested; only PDF/A Attachments are allowed
+ pdf_version = 1.7,
+ format_name = "pdf/a-2a",
+ xmp_file = "lpdf-pda.xml",
+ gts_flag = "GTS_PDFA2",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ spot_colors = true,
+ calibrated_rgb_colors = true, -- unknown
+ cielab_colors = true, -- unknown
+ include_intents = true,
+ forms = true,
+ tagging = true,
+ internal_icc_profiles = true,
+ transparency = true, -- NEW
+ jbig2_compression = true,
+ jpeg2000_compression = true, -- NEW
+ object_compression = true,
+ inject_metadata = function()
+ injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'><pdfaid:part>2</pdfaid:part><pdfaid:conformance>A</pdfaid:conformance></rdf:Description>",false)
+ end
+ },
+ ["pdf/a-3a"] = { -- untested; NEW: any type of attachment is allowed
+ pdf_version = 1.7,
+ format_name = "pdf/a-3a",
+ xmp_file = "lpdf-pda.xml",
+ gts_flag = "GTS_PDFA3",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ spot_colors = true,
+ calibrated_rgb_colors = true, -- unknown
+ cielab_colors = true, -- unknown
+ include_intents = true,
+ forms = true,
+ tagging = true,
+ internal_icc_profiles = true,
+ transparency = true,
+ jbig2_compression = true,
+ jpeg2000_compression = true,
+ object_compression = true,
+ inject_metadata = function()
+ injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'><pdfaid:part>3</pdfaid:part><pdfaid:conformance>A</pdfaid:conformance></rdf:Description>",false)
+ end
+ },
+ ["pdf/ua-1"] = { -- based on PDF/A-3a, but no 'gts_flag'
+ pdf_version = 1.7,
+ format_name = "pdf/ua-1",
+ xmp_file = "lpdf-pua.xml",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ spot_colors = true,
+ calibrated_rgb_colors = true, -- unknown
+ cielab_colors = true, -- unknown
+ include_intents = true,
+ forms = true,
+ tagging = true,
+ internal_icc_profiles = true,
+ transparency = true,
+ jbig2_compression = true,
+ jpeg2000_compression = true,
+ object_compression = true,
+ inject_metadata = function()
+ injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'><pdfaid:part>3</pdfaid:part><pdfaid:conformance>A</pdfaid:conformance></rdf:Description>",false)
+ injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfuaid='http://www.aiim.org/pdfua/ns/id/'><pdfuaid:part>1</pdfuaid:part></rdf:Description>",false)
+ end
+ },
}
lpdf.formats = formats -- it does not hurt to have this one visible
@@ -653,12 +720,12 @@ function codeinjections.setformat(s)
local majorversion = math.div(pdf_version,10)
local minorversion = math.mod(pdf_version,10)
local objectcompression = spec.object_compression and pdf_version >= 15
- local compresslevel = level or tex.pdfcompresslevel -- keep default
- local objectcompresslevel = (objectcompression and (level or tex.pdfobjcompresslevel)) or 0
- texset("global","pdfcompresslevel",compresslevel)
- texset("global","pdfobjcompresslevel",objectcompresslevel)
- texset("global","pdfmajorversion",majorversion)
- texset("global","pdfminorversion",minorversion)
+ local compresslevel = level or pdf.getcompresslevel() -- keep default
+ local objectcompresslevel = (objectcompression and (level or pdf.getobjcompresslevel())) or 0
+ pdf.setcompresslevel (compresslevel)
+ pdf.setobjcompresslevel(objectcompresslevel)
+ pdf.setmajorversion (majorversion)
+ pdf.setminorversion (minorversion)
if objectcompression then
report_backend("forcing pdf version %s.%s, compression level %s, object compression level %s",
majorversion,minorversion,compresslevel,objectcompresslevel)
@@ -718,8 +785,8 @@ function codeinjections.setformat(s)
report_backend("error, format %a is not supported",format)
end
elseif level then
- texset("global","pdfcompresslevel",level)
- texset("global","pdfobjcompresslevel",level)
+ pdf.setcompresslevel(level)
+ pdf.setobjcompresslevel(level)
else
-- we ignore this as we hook it in \everysetupbackend
end
diff --git a/Master/texmf-dist/tex/context/base/lpdf-grp.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-grp.lua
index 36c3507bed2..0eac52dfb3a 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-grp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-grp.lua
@@ -6,6 +6,7 @@ if not modules then modules = { } end modules ['lpdf-grp'] = {
license = "see context related readme files"
}
+local type = type
local formatters, gsub = string.formatters, string.gsub
local concat = table.concat
local round = math.round
@@ -35,7 +36,11 @@ local pdfflushobject = lpdf.flushobject
-- 22 : << /Bounds [ ] /Domain [ 0.0 1.0 ] /Encode [ 0.0 1.0 ] /FunctionType 3 /Functions [ 31 0 R ] >>
-- 31 : << /C0 [ 1.0 0.0 ] /C1 [ 0.0 1.0 ] /Domain [ 0.0 1.0 ] /FunctionType 2 /N 1.0 >>
-local function shade(stype,name,domain,color_a,color_b,n,colorspace,coordinates,separation)
+local function shade(stype,name,domain,color_a,color_b,n,colorspace,coordinates,separation,steps)
+ if steps then
+ color_a = color_a[1]
+ color_b = color_b[1]
+ end
local f = pdfdictionary {
FunctionType = 2,
Domain = pdfarray(domain), -- domain is actually a string
@@ -55,12 +60,58 @@ local function shade(stype,name,domain,color_a,color_b,n,colorspace,coordinates,
lpdf.adddocumentshade(name,pdfreference(pdfflushobject(s)))
end
-function lpdf.circularshade(name,domain,color_a,color_b,n,colorspace,coordinates,separation)
- shade(3,name,domain,color_a,color_b,n,colorspace,coordinates,separation)
+local function shade(stype,name,domain,color_a,color_b,n,colorspace,coordinates,separation,steps,fractions)
+ local func = nil
+ if steps then
+ local list = pdfarray()
+ local bounds = pdfarray()
+ local encode = pdfarray()
+ for i=1,steps do
+ bounds[i] = fractions[i] or 1
+ encode[2*i-1] = 0
+ encode[2*i] = 1
+ list [i] = pdfdictionary {
+ FunctionType = 2,
+ Domain = pdfarray(domain), -- domain is actually a string
+ C0 = pdfarray(color_a[i]),
+ C1 = pdfarray(color_b[i]),
+ N = tonumber(n),
+ }
+ end
+ func = pdfdictionary {
+ FunctionType = 3,
+ Bounds = bounds,
+ Encode = encode,
+ Functions = list,
+ Domain = pdfarray(domain), -- domain is actually a string
+ }
+ else
+ func = pdfdictionary {
+ FunctionType = 2,
+ Domain = pdfarray(domain), -- domain is actually a string
+ C0 = pdfarray(color_a),
+ C1 = pdfarray(color_b),
+ N = tonumber(n),
+ }
+ end
+ separation = separation and registrations.getspotcolorreference(separation)
+ local s = pdfdictionary {
+ ShadingType = stype,
+ ColorSpace = separation and pdfreference(separation) or pdfconstant(colorspace),
+ Function = pdfreference(pdfflushobject(func)),
+ Coords = pdfarray(coordinates),
+ Extend = pdfarray { true, true },
+ AntiAlias = pdfboolean(true),
+ }
+ lpdf.adddocumentshade(name,pdfreference(pdfflushobject(s)))
+end
+
+function lpdf.circularshade(name,domain,color_a,color_b,n,colorspace,coordinates,separation,steps,fractions)
+ shade(3,name,domain,color_a,color_b,n,colorspace,coordinates,separation,steps,fractions)
end
-function lpdf.linearshade(name,domain,color_a,color_b,n,colorspace,coordinates,separation)
- shade(2,name,domain,color_a,color_b,n,colorspace,coordinates,separation)
+function lpdf.linearshade(name,domain,color_a,color_b,n,colorspace,coordinates,separation,steps,fractions)
+ shade(2,name,domain,color_a,color_b,n,colorspace,coordinates,separation,steps,fractions)
end
-- inline bitmaps but xform'd
@@ -100,9 +151,9 @@ function nodeinjections.injectbitmap(t)
CS = colorspace,
BPC = 8,
F = pdfconstant("AHx"),
---~ CS = nil,
---~ BPC = 1,
---~ IM = true,
+ -- CS = nil,
+ -- BPC = 1,
+ -- IM = true,
}
-- for some reasons it only works well if we take a 1bp boundingbox
local urx, ury = 1/basepoints, 1/basepoints
diff --git a/Master/texmf-dist/tex/context/base/lpdf-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-ini.lua
index 834f845c59a..2149f4729a4 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-ini.lua
@@ -12,6 +12,7 @@ local setmetatable, getmetatable, type, next, tostring, tonumber, rawset = setme
local char, byte, format, gsub, concat, match, sub, gmatch = string.char, string.byte, string.format, string.gsub, table.concat, string.match, string.sub, string.gmatch
local utfchar, utfbyte, utfvalues = utf.char, utf.byte, utf.values
local sind, cosd, floor, max, min = math.sind, math.cosd, math.floor, math.max, math.min
+local sort = table.sort
local lpegmatch, P, C, R, S, Cc, Cs = lpeg.match, lpeg.P, lpeg.C, lpeg.R, lpeg.S, lpeg.Cc, lpeg.Cs
local formatters = string.formatters
local isboolean = string.is_boolean
@@ -65,32 +66,14 @@ local two_strings = interfaces.strings[2]
local pdf = pdf
local factor = number.dimenfactors.bp
-if pdf.setinfo then
- -- table.setmetatablenewindex(pdf,function(t,k,v)
- -- report_blocked("'pdf.%s' is not supported",k)
- -- end)
- -- the getters are harmless
-end
+do
-if not pdf.setinfo then
- function pdf.setinfo (s) pdf.info = s end
- function pdf.setcatalog(s) pdf.catalog = s end
- function pdf.setnames (s) pdf.names = s end
- function pdf.settrailer(s) pdf.trailer = s end
-end
+ local texget = tex.get
+ local texset = tex.set
-if not pdf.getpos then
- function pdf.getpos () return pdf.h, pdf.v end
- function pdf.gethpos () return pdf.h end
- function pdf.getvpos () return pdf.v end
- function pdf.hasmatrix() return false end
- function pdf.getmatrix() return 1, 0, 0, 1, 0, 0 end
-end
+ function pdf.setmajorversion (n) texset("global","pdfmajorversion", n) end
+ function pdf.getmajorversion ( ) return texget("pdfmajorversion") end
-if not pdf.setpageresources then
- function pdf.setpageresources (s) pdf.pageresources = s end
- function pdf.setpageattributes (s) pdf.pageattributes = s end
- function pdf.setpagesattributes(s) pdf.pagesattributes = s end
end
local pdfsetinfo = pdf.setinfo
@@ -113,15 +96,6 @@ local pdfimmediateobject = pdf.immediateobj
local pdfdeferredobject = pdf.obj
local pdfreferenceobject = pdf.refobj
--- function pdf.setinfo () report_blocked("'pdf.%s' is not supported","setinfo") end -- use lpdf.addtoinfo etc
--- function pdf.setcatalog () report_blocked("'pdf.%s' is not supported","setcatalog") end
--- function pdf.setnames () report_blocked("'pdf.%s' is not supported","setnames") end
--- function pdf.settrailer () report_blocked("'pdf.%s' is not supported","settrailer") end
--- function pdf.setpageresources () report_blocked("'pdf.%s' is not supported","setpageresources") end
--- function pdf.setpageattributes () report_blocked("'pdf.%s' is not supported","setpageattributes") end
--- function pdf.setpagesattributes() report_blocked("'pdf.%s' is not supported","setpagesattributes") end
--- function pdf.registerannot () report_blocked("'pdf.%s' is not supported","registerannot") end
-
local function pdfdisablecommand(command)
pdf[command] = function() report_blocked("'pdf.%s' is not supported",command) end
end
@@ -161,44 +135,57 @@ codeinjections.getvpos = pdfgetvpos lpdf.getvpos = pdfgetvpos
codeinjections.hasmatrix = pdfhasmatrix lpdf.hasmatrix = pdfhasmatrix
codeinjections.getmatrix = pdfgetmatrix lpdf.getmatrix = pdfgetmatrix
-function lpdf.transform(llx,lly,urx,ury)
+-- local function transform(llx,lly,urx,ury,rx,sx,sy,ry)
+-- local x1 = llx * rx + lly * sy
+-- local y1 = llx * sx + lly * ry
+-- local x2 = llx * rx + ury * sy
+-- local y2 = llx * sx + ury * ry
+-- local x3 = urx * rx + lly * sy
+-- local y3 = urx * sx + lly * ry
+-- local x4 = urx * rx + ury * sy
+-- local y4 = urx * sx + ury * ry
+-- llx = min(x1,x2,x3,x4);
+-- lly = min(y1,y2,y3,y4);
+-- urx = max(x1,x2,x3,x4);
+-- ury = max(y1,y2,y3,y4);
+-- return llx, lly, urx, ury
+-- end
+
+function lpdf.transform(llx,lly,urx,ury) -- not yet used so unchecked
if pdfhasmatrix() then
local sx, rx, ry, sy = pdfgetmatrix()
local w, h = urx - llx, ury - lly
return llx, lly, llx + sy*w - ry*h, lly + sx*h - rx*w
+ -- return transform(llx,lly,urx,ury,sx,rx,ry,sy)
else
return llx, lly, urx, ury
end
end
--- function lpdf.rectangle(width,height,depth)
--- local h, v = pdfgetpos()
--- local llx, lly, urx, ury
--- if pdfhasmatrix() then
--- local sx, rx, ry, sy = pdfgetmatrix()
--- llx = 0
--- lly = -depth
--- -- llx = ry * depth
--- -- lly = -sx * depth
--- urx = sy * width - ry * height
--- ury = sx * height - rx * width
--- else
--- llx = 0
--- lly = -depth
--- urx = width
--- ury = height
--- return (h+llx)*factor, (v+lly)*factor, (h+urx)*factor, (v+ury)*factor
--- end
--- end
+-- funny values for tx and ty
-function lpdf.rectangle(width,height,depth)
- local h, v = pdfgetpos()
+function lpdf.rectangle(width,height,depth,offset)
+ local tx, ty = pdfgetpos()
+ if offset then
+ tx = tx - offset
+ ty = ty + offset
+ width = width + 2*offset
+ height = height + offset
+ depth = depth + offset
+ end
if pdfhasmatrix() then
- local sx, rx, ry, sy = pdfgetmatrix()
- -- return (h+ry*depth)*factor, (v-sx*depth)*factor, (h+sy*width-ry*height)*factor, (v+sx*height-rx*width)*factor
- return h *factor, (v- depth)*factor, (h+sy*width-ry*height)*factor, (v+sx*height-rx*width)*factor
+ local rx, sx, sy, ry = pdfgetmatrix()
+ return
+ factor * tx,
+ factor * (ty - ry*depth + sx*width),
+ factor * (tx + rx*width - sy*height),
+ factor * (ty + ry*height - sx*width)
else
- return h *factor, (v- depth)*factor, (h+ width )*factor, (v+ height )*factor
+ return
+ factor * tx,
+ factor * (ty - depth),
+ factor * (tx + width),
+ factor * (ty + height)
end
end
@@ -333,34 +320,85 @@ local f_tonumber = formatters["%F"]
local tostring_a, tostring_d
+-- tostring_d = function(t,contentonly,key)
+-- if next(t) then
+-- local r, rn = { }, 0
+-- for k, v in next, t do
+-- -- for k, v in sortedhash(t) do -- can be an option
+-- rn = rn + 1
+-- local tv = type(v)
+-- if tv == "string" then
+-- r[rn] = f_key_value(k,toeight(v))
+-- elseif tv == "number" then
+-- r[rn] = f_key_number(k,v)
+-- -- elseif tv == "unicode" then -- can't happen
+-- -- r[rn] = f_key_value(k,tosixteen(v))
+-- elseif tv == "table" then
+-- local mv = getmetatable(v)
+-- if mv and mv.__lpdftype then
+-- -- if v == t then
+-- -- report_objects("ignoring circular reference in dirctionary")
+-- -- r[rn] = f_key_null(k)
+-- -- else
+-- r[rn] = f_key_value(k,tostring(v))
+-- -- end
+-- elseif v[1] then
+-- r[rn] = f_key_value(k,tostring_a(v))
+-- else
+-- r[rn] = f_key_value(k,tostring_d(v))
+-- end
+-- else
+-- r[rn] = f_key_value(k,tostring(v))
+-- end
+-- end
+-- if contentonly then
+-- return concat(r," ")
+-- elseif key then
+-- return f_key_dictionary(key,r)
+-- else
+-- return f_dictionary(r)
+-- end
+-- elseif contentonly then
+-- return ""
+-- else
+-- return "<< >>"
+-- end
+-- end
+
tostring_d = function(t,contentonly,key)
if next(t) then
- local r, rn = { }, 0
- for k, v in next, t do
- rn = rn + 1
+ local r, n = { }, 0
+ for k in next, t do
+ n = n + 1
+ r[n] = k
+ end
+ sort(r)
+ for i=1,n do
+ local k = r[i]
+ local v = t[k]
local tv = type(v)
if tv == "string" then
- r[rn] = f_key_value(k,toeight(v))
+ r[i] = f_key_value(k,toeight(v))
elseif tv == "number" then
- r[rn] = f_key_number(k,v)
+ r[i] = f_key_number(k,v)
-- elseif tv == "unicode" then -- can't happen
- -- r[rn] = f_key_value(k,tosixteen(v))
+ -- r[i] = f_key_value(k,tosixteen(v))
elseif tv == "table" then
local mv = getmetatable(v)
if mv and mv.__lpdftype then
-- if v == t then
-- report_objects("ignoring circular reference in dirctionary")
- -- r[rn] = f_key_null(k)
+ -- r[i] = f_key_null(k)
-- else
- r[rn] = f_key_value(k,tostring(v))
+ r[i] = f_key_value(k,tostring(v))
-- end
elseif v[1] then
- r[rn] = f_key_value(k,tostring_a(v))
+ r[i] = f_key_value(k,tostring_a(v))
else
- r[rn] = f_key_value(k,tostring_d(v))
+ r[i] = f_key_value(k,tostring_d(v))
end
else
- r[rn] = f_key_value(k,tostring(v))
+ r[i] = f_key_value(k,tostring(v))
end
end
if contentonly then
@@ -542,47 +580,58 @@ local function pdfconstant(str,default)
return c
end
-local p_null = { } setmetatable(p_null, mt_z)
-local p_true = { } setmetatable(p_true, mt_t)
-local p_false = { } setmetatable(p_false,mt_f)
+local escaped = Cs((S(forbidden)/replacements + P(1))^0)
+----- escaped = Cs((1-forbidden)^0 * S(forbidden)/replacements * ((S(forbidden)/replacements + P(1))^0)
-local function pdfnull()
- return p_null
+function lpdf.escaped(str)
+ return lpegmatch(escaped,str) or str
end
---~ print(pdfboolean(false),pdfboolean(false,false),pdfboolean(false,true))
---~ print(pdfboolean(true),pdfboolean(true,false),pdfboolean(true,true))
---~ print(pdfboolean(nil,true),pdfboolean(nil,false))
+do
-local function pdfboolean(b,default)
- if type(b) == "boolean" then
- return b and p_true or p_false
- else
- return default and p_true or p_false
+ local p_null = { } setmetatable(p_null, mt_z)
+ local p_true = { } setmetatable(p_true, mt_t)
+ local p_false = { } setmetatable(p_false,mt_f)
+
+ pdfnull = function()
+ return p_null
+ end
+
+ pdfboolean = function(b,default)
+ if type(b) == "boolean" then
+ return b and p_true or p_false
+ else
+ return default and p_true or p_false
+ end
end
-end
-local r_zero = setmetatable({ 0 },mt_r)
+ -- print(pdfboolean(false),pdfboolean(false,false),pdfboolean(false,true))
+ -- print(pdfboolean(true),pdfboolean(true,false),pdfboolean(true,true))
+ -- print(pdfboolean(nil,true),pdfboolean(nil,false))
-local function pdfreference(r) -- maybe make a weak table
- if r and r ~= 0 then
- return setmetatable({ r },mt_r)
- else
- return r_zero
+ local r_zero = setmetatable({ 0 },mt_r)
+
+ pdfreference = function(r) -- maybe make a weak table
+ if r and r ~= 0 then
+ return setmetatable({ r },mt_r)
+ else
+ return r_zero
+ end
end
-end
-local v_zero = setmetatable({ 0 },mt_v)
-local v_empty = setmetatable({ "" },mt_v)
+ local v_zero = setmetatable({ 0 },mt_v)
+ local v_empty = setmetatable({ "" },mt_v)
-local function pdfverbose(t) -- maybe check for type
- if t == 0 then
- return v_zero
- elseif t == "" then
- return v_empty
- else
- return setmetatable({ t },mt_v)
+ pdfverbose = function(t) -- maybe check for type
+ if t == 0 then
+ return v_zero
+ elseif t == "" then
+ return v_empty
+ else
+ return setmetatable({ t },mt_v)
+ end
end
+
end
lpdf.stream = pdfstream -- THIS WILL PROBABLY CHANGE
@@ -1093,12 +1142,6 @@ function lpdf.limited(n,min,max,default)
end
end
--- lpdf.addtoinfo("ConTeXt.Version", environment.version)
--- lpdf.addtoinfo("ConTeXt.Time", os.date("%Y.%m.%d %H:%M")) -- :%S
--- lpdf.addtoinfo("ConTeXt.Jobname", environment.jobname)
--- lpdf.addtoinfo("ConTeXt.Url", "www.pragma-ade.com")
--- lpdf.addtoinfo("ConTeXt.Support", "contextgarden.net")
-
-- if not pdfreferenceobject then
--
-- local delayed = { }
@@ -1163,12 +1206,17 @@ end
do
- local f_actual_text_one = formatters["BT /Span << /ActualText <feff%04x> >> BDC [<feff>] TJ %s EMC ET"]
- local f_actual_text_two = formatters["BT /Span << /ActualText <feff%04x%04x> >> BDC [<feff>] TJ %s EMC ET"]
- local f_actual_text = formatters["/Span <</ActualText %s >> BDC"]
+ local f_actual_text_one = formatters["BT /Span << /ActualText <feff%04x> >> BDC [<feff>] TJ %s EMC ET"]
+ local f_actual_text_one_b = formatters["BT /Span << /ActualText <feff%04x> >> BDC [<feff>] TJ "]
+ local f_actual_text_two = formatters["BT /Span << /ActualText <feff%04x%04x> >> BDC [<feff>] TJ %s EMC ET"]
+ local f_actual_text_two_b = formatters["BT /Span << /ActualText <feff%04x%04x> >> BDC [<feff>] TJ "]
+ local s_actual_text_e = " EMC ET"
+ local f_actual_text = formatters["/Span <</ActualText %s >> BDC"]
- local context = context
- local pdfdirect = nodes.pool.pdfdirect
+ local context = context
+ local pdfdirect = nodes.pool.pdfdirect
+
+ -- todo: use tounicode from the font mapper
function codeinjections.unicodetoactualtext(unicode,pdfcode)
if unicode < 0x10000 then
@@ -1178,6 +1226,18 @@ do
end
end
+ function codeinjections.startunicodetoactualtext(unicode)
+ if unicode < 0x10000 then
+ return f_actual_text_one_b(unicode)
+ else
+ return f_actual_text_two_b(unicode/1024+0xD800,unicode%1024+0xDC00)
+ end
+ end
+
+ function codeinjections.stopunicodetoactualtext()
+ return s_actual_text_e
+ end
+
implement {
name = "startactualtext",
arguments = "string",
@@ -1197,17 +1257,15 @@ end
-- interface
-local lpdfverbose = lpdf.verbose
-
implement { name = "lpdf_collectedresources", actions = { lpdf.collectedresources, context } }
implement { name = "lpdf_addtocatalog", arguments = two_strings, actions = lpdf.addtocatalog }
-implement { name = "lpdf_addtoinfo", arguments = two_strings, actions = lpdf.addtoinfo }
+implement { name = "lpdf_addtoinfo", arguments = two_strings, actions = function(a,b,c) lpdf.addtoinfo(a,b,c) end } -- gets adapted
implement { name = "lpdf_addtonames", arguments = two_strings, actions = lpdf.addtonames }
-implement { name = "lpdf_addpageattributes", arguments = two_strings, actions = lpdf.addtopageattributes }
-implement { name = "lpdf_addpagesattributes", arguments = two_strings, actions = lpdf.addtopagesattributes }
-implement { name = "lpdf_addpageresources", arguments = two_strings, actions = lpdf.addtopageresources }
-implement { name = "lpdf_adddocumentextgstate", arguments = two_strings, actions = function(a,b) lpdf.adddocumentextgstate (a,lpdfverbose(b)) end }
-implement { name = "lpdf_adddocumentcolorspace", arguments = two_strings, actions = function(a,b) lpdf.adddocumentcolorspace(a,lpdfverbose(b)) end }
-implement { name = "lpdf_adddocumentpattern", arguments = two_strings, actions = function(a,b) lpdf.adddocumentpattern (a,lpdfverbose(b)) end }
-implement { name = "lpdf_adddocumentshade", arguments = two_strings, actions = function(a,b) lpdf.adddocumentshade (a,lpdfverbose(b)) end }
+implement { name = "lpdf_addtopageattributes", arguments = two_strings, actions = lpdf.addtopageattributes }
+implement { name = "lpdf_addtopagesattributes", arguments = two_strings, actions = lpdf.addtopagesattributes }
+implement { name = "lpdf_addtopageresources", arguments = two_strings, actions = lpdf.addtopageresources }
+implement { name = "lpdf_adddocumentextgstate", arguments = two_strings, actions = function(a,b) lpdf.adddocumentextgstate (a,pdfverbose(b)) end }
+implement { name = "lpdf_adddocumentcolorspace", arguments = two_strings, actions = function(a,b) lpdf.adddocumentcolorspace(a,pdfverbose(b)) end }
+implement { name = "lpdf_adddocumentpattern", arguments = two_strings, actions = function(a,b) lpdf.adddocumentpattern (a,pdfverbose(b)) end }
+implement { name = "lpdf_adddocumentshade", arguments = two_strings, actions = function(a,b) lpdf.adddocumentshade (a,pdfverbose(b)) end }
diff --git a/Master/texmf-dist/tex/context/base/lpdf-mis.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-mis.lua
index a1b12d8c0bb..62713727d8e 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-mis.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-mis.lua
@@ -17,7 +17,7 @@ if not modules then modules = { } end modules ['lpdf-mis'] = {
local next, tostring = next, tostring
local format, gsub, formatters = string.format, string.gsub, string.formatters
-local texset = tex.set
+local texset, texget = tex.set, tex.get
local backends, lpdf, nodes = backends, lpdf, nodes
@@ -206,6 +206,13 @@ local function setupidentity()
end
local id = lpdf.id()
addtoinfo("ID", pdfstring(id), id) -- needed for pdf/x
+ --
+ addtoinfo("ConTeXt.Version", environment.version)
+ addtoinfo("ConTeXt.Time", os.date("%Y-%m-%d %H:%M"))
+ addtoinfo("ConTeXt.Jobname", environment.jobname or tex.jobname)
+ addtoinfo("ConTeXt.Url", "www.pragma-ade.com")
+ addtoinfo("ConTeXt.Support", "contextgarden.net")
+ --
done = true
else
-- no need for a message
@@ -253,31 +260,33 @@ local pagespecs = {
[variables.fixed] = { mode = "UseNone", layout = "auto", fit = false, fixed = true, duplex = false }, -- noscale
[variables.landscape] = { mode = "UseNone", layout = "auto", fit = false, fixed = true, duplex = "DuplexFlipShortEdge" },
[variables.portrait] = { mode = "UseNone", layout = "auto", fit = false, fixed = true, duplex = "DuplexFlipLongEdge" },
-
+ [variables.page] = { mode = "UseNone", layout = "auto", fit = false, fixed = true, duplex = "Simplex" },
}
local pagespec, topoffset, leftoffset, height, width, doublesided = "default", 0, 0, 0, 0, false
-
-local pdfpaperheight = tex.pdfpageheight
-local pdfpaperwidth = tex.pdfpagewidth
+local cropoffset, bleedoffset, trimoffset, artoffset = 0, 0, 0, 0
function codeinjections.setupcanvas(specification)
local paperheight = specification.paperheight
local paperwidth = specification.paperwidth
local paperdouble = specification.doublesided
if paperheight then
- texset('global','pdfpageheight',paperheight)
- pdfpaperheight = paperheight
+ texset('global','pageheight',paperheight)
end
if paperwidth then
- texset('global','pdfpagewidth',paperwidth)
- pdfpaperwidth = paperwidth
+ texset('global','pagewidth',paperwidth)
end
- pagespec = specification.mode or pagespec
- topoffset = specification.topoffset or 0
- leftoffset = specification.leftoffset or 0
- height = specification.height or pdfpaperheight
- width = specification.width or pdfpaperwidth
+ pagespec = specification.mode or pagespec
+ topoffset = specification.topoffset or 0
+ leftoffset = specification.leftoffset or 0
+ height = specification.height or texget("pageheight")
+ width = specification.width or texget("pagewidth")
+ --
+ cropoffset = specification.cropoffset or 0
+ trimoffset = cropoffset - (specification.trimoffset or 0)
+ bleedoffset = trimoffset - (specification.bleedoffset or 0)
+ artoffset = bleedoffset - (specification.artoffset or 0)
+ --
if paperdouble ~= nil then
doublesided = paperdouble
end
@@ -327,29 +336,38 @@ local function documentspecification()
})
end
addtoinfo ("Trapped", pdfconstant("False")) -- '/Trapped' in /Info, 'Trapped' in XMP
- addtocatalog("Version", pdfconstant(format("1.%s",tex.pdfminorversion)))
+ addtocatalog("Version", pdfconstant(format("1.%s",pdf.getminorversion())))
end
-- temp hack: the mediabox is not under our control and has a precision of 4 digits
-local factor = number.dimenfactors.bp
+local factor = number.dimenfactors.bp
+local f_value = formatters["%0.4F"]
local function boxvalue(n) -- we could share them
- return pdfverbose(formatters["%0.4F"](factor * n))
+ return pdfverbose(f_value(factor * n))
end
local function pagespecification()
- local pageheight = pdfpaperheight
- local box = pdfarray { -- can be cached
- boxvalue(leftoffset),
- boxvalue(pageheight+topoffset-height),
- boxvalue(width-leftoffset),
- boxvalue(pageheight-topoffset),
- }
- addtopageattributes("CropBox",box) -- mandate for rendering
- addtopageattributes("TrimBox",box) -- mandate for pdf/x
- -- addtopageattributes("BleedBox",box)
- -- addtopageattributes("ArtBox",box)
+ local llx = leftoffset
+ local lly = texget("pageheight") + topoffset - height
+ local urx = width - leftoffset
+ local ury = texget("pageheight") - topoffset
+ -- boxes can be cached
+ local function extrabox(WhatBox,offset,always)
+ if offset ~= 0 or always then
+ addtopageattributes(WhatBox, pdfarray {
+ boxvalue(llx + offset),
+ boxvalue(lly + offset),
+ boxvalue(urx - offset),
+ boxvalue(ury - offset),
+ })
+ end
+ end
+ extrabox("CropBox",cropoffset,true) -- mandate for rendering
+ extrabox("TrimBox",trimoffset,true) -- mandate for pdf/x
+ extrabox("BleedBox",bleedoffset) -- optional
+ -- extrabox("ArtBox",artoffset) -- optional .. unclear what this is meant to do
end
lpdf.registerpagefinalizer(pagespecification,"page specification")
diff --git a/Master/texmf-dist/tex/context/base/lpdf-mov.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-mov.lua
index 87375e4ce74..87375e4ce74 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-mov.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-mov.lua
diff --git a/Master/texmf-dist/tex/context/base/lpdf-nod.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-nod.lua
index 6295947d008..3dd5a664807 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-nod.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-nod.lua
@@ -28,8 +28,8 @@ local pdfliteral = register(new_node("whatsit", whatsitcodes.pdfliteral))
local pdfsave = register(new_node("whatsit", whatsitcodes.pdfsave))
local pdfrestore = register(new_node("whatsit", whatsitcodes.pdfrestore))
local pdfsetmatrix = register(new_node("whatsit", whatsitcodes.pdfsetmatrix))
-local pdfdest = register(new_node("whatsit", whatsitcodes.pdfdest)) setfield(pdfdest,"named_id",1) -- xyz_zoom untouched
-local pdfannot = register(new_node("whatsit", whatsitcodes.pdfannot))
+----- pdfdest = register(new_node("whatsit", whatsitcodes.pdfdest)) setfield(pdfdest,"named_id",1) -- xyz_zoom untouched
+----- pdfannot = register(new_node("whatsit", whatsitcodes.pdfannot))
local variables = interfaces.variables
@@ -108,23 +108,23 @@ nodeinjections.transform = nodepool.pdfsetmatrix
function nodepool.pdfannotation(w,h,d,data,n)
report("don't use node based annotations!")
os.exit()
--- local t = copy_node(pdfannot)
--- if w and w ~= 0 then
--- setfield(t,"width",w)
--- end
--- if h and h ~= 0 then
--- setfield(t,"height",h)
--- end
--- if d and d ~= 0 then
--- setfield(t,"depth",d)
--- end
--- if n then
--- setfield(t,"objnum",n)
--- end
--- if data and data ~= "" then
--- setfield(t,"data",data)
--- end
--- return t
+ -- local t = copy_node(pdfannot)
+ -- if w and w ~= 0 then
+ -- setfield(t,"width",w)
+ -- end
+ -- if h and h ~= 0 then
+ -- setfield(t,"height",h)
+ -- end
+ -- if d and d ~= 0 then
+ -- setfield(t,"depth",d)
+ -- end
+ -- if n then
+ -- setfield(t,"objnum",n)
+ -- end
+ -- if data and data ~= "" then
+ -- setfield(t,"data",data)
+ -- end
+ -- return t
end
-- (!) The next code in pdfdest.w is wrong:
@@ -143,41 +143,41 @@ end
function nodepool.pdfdestination(w,h,d,name,view,n)
report("don't use node based destinations!")
os.exit()
--- local t = copy_node(pdfdest)
--- local hasdimensions = false
--- if w and w ~= 0 then
--- setfield(t,"width",w)
--- hasdimensions = true
--- end
--- if h and h ~= 0 then
--- setfield(t,"height",h)
--- hasdimensions = true
--- end
--- if d and d ~= 0 then
--- setfield(t,"depth",d)
--- hasdimensions = true
--- end
--- if n then
--- setfield(t,"objnum",n)
--- end
--- view = views[view] or view or 1 -- fit is default
--- setfield(t,"dest_id",name)
--- setfield(t,"dest_type",view)
--- if hasdimensions and view == 0 then -- xyz
--- -- see (!) s -> m -> t -> r
--- -- linked
--- local s = copy_node(pdfsave)
--- local m = copy_node(pdfsetmatrix)
--- local r = copy_node(pdfrestore)
--- setfield(m,"data","1 0 0 1")
--- setfield(s,"next",m)
--- setfield(m,"next",t)
--- setfield(t,"next",r)
--- setfield(m,"prev",s)
--- setfield(t,"prev",m)
--- setfield(r,"prev",t)
--- return s -- a list
--- else
--- return t
--- end
+ -- local t = copy_node(pdfdest)
+ -- local hasdimensions = false
+ -- if w and w ~= 0 then
+ -- setfield(t,"width",w)
+ -- hasdimensions = true
+ -- end
+ -- if h and h ~= 0 then
+ -- setfield(t,"height",h)
+ -- hasdimensions = true
+ -- end
+ -- if d and d ~= 0 then
+ -- setfield(t,"depth",d)
+ -- hasdimensions = true
+ -- end
+ -- if n then
+ -- setfield(t,"objnum",n)
+ -- end
+ -- view = views[view] or view or 1 -- fit is default
+ -- setfield(t,"dest_id",name)
+ -- setfield(t,"dest_type",view)
+ -- if hasdimensions and view == 0 then -- xyz
+ -- -- see (!) s -> m -> t -> r
+ -- -- linked
+ -- local s = copy_node(pdfsave)
+ -- local m = copy_node(pdfsetmatrix)
+ -- local r = copy_node(pdfrestore)
+ -- setfield(m,"data","1 0 0 1")
+ -- setfield(s,"next",m)
+ -- setfield(m,"next",t)
+ -- setfield(t,"next",r)
+ -- setfield(m,"prev",s)
+ -- setfield(t,"prev",m)
+ -- setfield(r,"prev",t)
+ -- return s -- a list
+ -- else
+ -- return t
+ -- end
end
diff --git a/Master/texmf-dist/tex/context/base/lpdf-pda.xml b/Master/texmf-dist/tex/context/base/mkiv/lpdf-pda.xml
index 3f6b969c01d..3f6b969c01d 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-pda.xml
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-pda.xml
diff --git a/Master/texmf-dist/tex/context/base/lpdf-pdx.xml b/Master/texmf-dist/tex/context/base/mkiv/lpdf-pdx.xml
index d55e1fdf303..d55e1fdf303 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-pdx.xml
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-pdx.xml
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-pua.xml b/Master/texmf-dist/tex/context/base/mkiv/lpdf-pua.xml
new file mode 100644
index 00000000000..c50e1f05be4
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-pua.xml
@@ -0,0 +1,202 @@
+<?xml version="1.0"?>
+
+<!-- lpdf-pua.xml -->
+
+<x:xmpmeta xmlns:x="adobe:ns:meta/">
+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <dc:format>application/pdf</dc:format>
+ <dc:creator>
+ <rdf:Seq>
+ <rdf:li xml:lang="x-default"/>
+ </rdf:Seq>
+ </dc:creator>
+ <dc:description>
+ <rdf:Alt>
+ <rdf:li xml:lang="x-default"/>
+ </rdf:Alt>
+ </dc:description>
+ <dc:title>
+ <rdf:Alt>
+ <rdf:li xml:lang="x-default"/>
+ </rdf:Alt>
+ </dc:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="" xmlns:pdfx="http://ns.adobe.com/pdfx/1.3/">
+ <pdfx:ConTeXt.Jobname/>
+ <pdfx:ConTeXt.Time/>
+ <pdfx:ConTeXt.Url/>
+ <pdfx:ConTeXt.Version/>
+ <pdfx:ID/>
+ <pdfx:PTEX.Fullbanner/>
+ </rdf:Description>
+ <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/">
+ <xmp:CreateDate/>
+ <xmp:CreatorTool/>
+ <xmp:ModifyDate/>
+ <xmp:MetadataDate/>
+ </rdf:Description>
+ <rdf:Description rdf:about="" xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
+ <pdf:Keywords/>
+ <pdf:Producer/>
+ <pdf:Trapped>False</pdf:Trapped>
+ </rdf:Description>
+ <rdf:Description rdf:about="" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">
+ <xmpMM:DocumentID/>
+ <xmpMM:InstanceID/>
+ </rdf:Description>
+ <rdf:Description rdf:about=""
+ xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"
+ xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"
+ xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#">
+ <pdfaExtension:schemas>
+ <rdf:Bag>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaSchema:namespaceURI>http://ns.adobe.com/pdf/1.3/</pdfaSchema:namespaceURI>
+ <pdfaSchema:prefix>pdf</pdfaSchema:prefix>
+ <pdfaSchema:schema>Adobe PDF Schema</pdfaSchema:schema>
+ <pdfaSchema:property>
+ <rdf:Seq>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>A name object indicating whether the document has been modified to include trapping information</pdfaProperty:description>
+ <pdfaProperty:name>Trapped</pdfaProperty:name>
+ <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+ </rdf:li>
+ </rdf:Seq>
+ </pdfaSchema:property>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaSchema:namespaceURI>http://purl.org/dc/elements/1.1/</pdfaSchema:namespaceURI>
+ <pdfaSchema:prefix>pdf</pdfaSchema:prefix>
+ <pdfaSchema:schema>Dubline Core Schema</pdfaSchema:schema>
+ <pdfaSchema:property>
+ <rdf:Seq>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Subject in Document Properties</pdfaProperty:description>
+ <pdfaProperty:name>description</pdfaProperty:name>
+ <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+ </rdf:li>
+ </rdf:Seq>
+ </pdfaSchema:property>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaSchema:namespaceURI>http://ns.adobe.com/pdfx/1.3/</pdfaSchema:namespaceURI>
+ <pdfaSchema:prefix>pdfx</pdfaSchema:prefix>
+ <pdfaSchema:schema>PDF/X ID Schema</pdfaSchema:schema>
+ <pdfaSchema:property>
+ <rdf:Seq>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:category>external</pdfaProperty:category>
+ <pdfaProperty:description>Name of the ConTeXt job</pdfaProperty:description>
+ <pdfaProperty:name>ConTeXt.Jobname</pdfaProperty:name>
+ <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:category>external</pdfaProperty:category>
+ <pdfaProperty:description>Time stamp of ConTeXt version</pdfaProperty:description>
+ <pdfaProperty:name>ConTeXt.Time</pdfaProperty:name>
+ <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:category>external</pdfaProperty:category>
+ <pdfaProperty:description>ConTeXt website</pdfaProperty:description>
+ <pdfaProperty:name>ConTeXt.Url</pdfaProperty:name>
+ <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:category>external</pdfaProperty:category>
+ <pdfaProperty:description>ConTeXt version</pdfaProperty:description>
+ <pdfaProperty:name>ConTeXt.Version</pdfaProperty:name>
+ <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:category>external</pdfaProperty:category>
+ <pdfaProperty:description>Banner of pdftex or one of its successors</pdfaProperty:description>
+ <pdfaProperty:name>PTEX.Fullbanner</pdfaProperty:name>
+ <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:category>external</pdfaProperty:category>
+ <pdfaProperty:description>Document identifier</pdfaProperty:description>
+ <pdfaProperty:name>ID</pdfaProperty:name>
+ <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+ </rdf:li>
+ </rdf:Seq>
+ </pdfaSchema:property>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaSchema:namespaceURI>http://ns.adobe.com/xap/1.0/mm/</pdfaSchema:namespaceURI>
+ <pdfaSchema:prefix>xmpMM</pdfaSchema:prefix>
+ <pdfaSchema:schema>XMP Media Management Schema</pdfaSchema:schema>
+ <pdfaSchema:property>
+ <rdf:Seq>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>UUID based identifier for specific incarnation of a document</pdfaProperty:description>
+ <pdfaProperty:name>InstanceID</pdfaProperty:name>
+ <pdfaProperty:valueType>URI</pdfaProperty:valueType>
+ </rdf:li>
+ </rdf:Seq>
+ </pdfaSchema:property>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaSchema:namespaceURI>http://www.aiim.org/pdfa/ns/id/</pdfaSchema:namespaceURI>
+ <pdfaSchema:prefix>pdfaid</pdfaSchema:prefix>
+ <pdfaSchema:schema>PDF/A ID Schema</pdfaSchema:schema>
+ <pdfaSchema:property>
+ <rdf:Seq>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Part of PDF/A standard</pdfaProperty:description>
+ <pdfaProperty:name>part</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Amendment of PDF/A standard</pdfaProperty:description>
+ <pdfaProperty:name>amd</pdfaProperty:name>
+ <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Conformance level of PDF/A standard</pdfaProperty:description>
+ <pdfaProperty:name>conformance</pdfaProperty:name>
+ <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+ </rdf:li>
+ </rdf:Seq>
+ </pdfaSchema:property>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaSchema:namespaceURI>http://www.aiim.org/pdfua/ns/id/</pdfaSchema:namespaceURI>
+ <pdfaSchema:prefix>pdfuaid</pdfaSchema:prefix>
+ <pdfaSchema:schema>PDF/UA identification schema</pdfaSchema:schema>
+ <pdfaSchema:property>
+ <rdf:Seq>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>PDF/UA version identifier</pdfaProperty:description>
+ <pdfaProperty:name>part</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>PDF/UA amendment identifier</pdfaProperty:description>
+ <pdfaProperty:name>amd</pdfaProperty:name>
+ <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>PDF/UA corrigenda identifier</pdfaProperty:description>
+ <pdfaProperty:name>corr</pdfaProperty:name>
+ <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+ </rdf:li>
+ </rdf:Seq>
+ </pdfaSchema:property>
+ </rdf:li>
+ </rdf:Bag>
+ </pdfaExtension:schemas>
+ </rdf:Description>
+ </rdf:RDF>
+</x:xmpmeta>
diff --git a/Master/texmf-dist/tex/context/base/lpdf-ren.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-ren.lua
index 61676d5a81a..81b9e9f2024 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-ren.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-ren.lua
@@ -46,6 +46,8 @@ local addtopageattributes = lpdf.addtopageattributes
local addtopageresources = lpdf.addtopageresources
local addtocatalog = lpdf.addtocatalog
+local escaped = lpdf.escaped
+
local nodepool = nodes.pool
local register = nodepool.register
local pdfliteral = nodepool.pdfliteral
@@ -87,6 +89,12 @@ local textlayers, hidelayers, videlayers = pdfarray(), pdfarray(), pdfarray()
local pagelayers, pagelayersreference, cache = nil, nil, { }
local alphabetic = { }
+local escapednames = table.setmetatableindex(function(t,k)
+ local v = escaped(k)
+ t[k] = v
+ return v
+end)
+
local specifications = { }
local initialized = { }
@@ -139,7 +147,7 @@ local function useviewerlayer(name) -- move up so that we can use it as local
else
hidelayers[#hidelayers+1] = nr
end
- pagelayers[tag] = dr -- check
+ pagelayers[escapednames[tag]] = dr -- check
else
-- todo: message
end
@@ -183,14 +191,13 @@ local function flushtextlayers()
ON = videlayers,
OFF = hidelayers,
BaseState = pdf_on,
-
-AS = pdfarray {
- pdfdictionary {
- Category = pdfarray { pdfconstant("Print") },
- Event = pdfconstant("Print"),
- OCGs = (viewerlayers.hasorder and sortedlayers) or nil,
- }
-},
+ AS = pdfarray {
+ pdfdictionary {
+ Category = pdfarray { pdfconstant("Print") },
+ Event = pdfconstant("Print"),
+ OCGs = (viewerlayers.hasorder and sortedlayers) or nil,
+ }
+ },
},
}
addtocatalog("OCProperties",d)
@@ -235,7 +242,7 @@ function codeinjections.startlayer(name) -- used in mp
name = "unknown"
end
useviewerlayer(name)
- return format("/OC /%s BDC",name)
+ return format("/OC /%s BDC",escapednames[name])
end
function codeinjections.stoplayer(name) -- used in mp
@@ -248,7 +255,7 @@ function nodeinjections.startlayer(name)
local c = cache[name]
if not c then
useviewerlayer(name)
- c = register(pdfliteral(format("/OC /%s BDC",name)))
+ c = register(pdfliteral(format("/OC /%s BDC",escapednames[name])))
cache[name] = c
end
return copy_node(c)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-res.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-res.lua
new file mode 100644
index 00000000000..ca092c772bf
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-res.lua
@@ -0,0 +1,40 @@
+if not modules then modules = { } end modules ['lpdf-res'] = {
+ version = 1.001,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local codeinjections = backends.codeinjections
+local implement = interfaces.implement
+
+local nuts = nodes.nuts
+local tonut = nodes.tonut
+
+local setfield = nuts.setfield
+local setlist = nuts.setlist
+
+local new_hlist = nuts.pool.hlist
+
+local saveboxresource = tex.saveboxresource
+local useboxresource = tex.useboxresource
+local getboxresource = tex.getboxresourcedimensions
+
+function codeinjections.registerboxresource(n)
+ return saveboxresource(n,nil,lpdf.collectedresources(),true) -- direct, todo: accept functions as attr/resources
+end
+
+function codeinjections.restoreboxresource(index)
+ local hbox = new_hlist()
+ local list, wd, ht, dp = useboxresource(index)
+ setlist(hbox,tonut(list))
+ setfield(hbox,"width", wd)
+ setfield(hbox,"height", ht)
+ setfield(hbox,"depth", dp)
+ return hbox -- so we return a nut !
+end
+
+function codeinjections.boxresourcedimensions(index)
+ return getboxresource(index)
+end
diff --git a/Master/texmf-dist/tex/context/base/lpdf-swf.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-swf.lua
index 88cdcc4ec51..88cdcc4ec51 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-swf.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-swf.lua
diff --git a/Master/texmf-dist/tex/context/base/lpdf-tag.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-tag.lua
index 79ccfe07596..79b8ac36877 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-tag.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-tag.lua
@@ -63,11 +63,13 @@ local getattr = nuts.getattr
local getprev = nuts.getprev
local getnext = nuts.getnext
local getlist = nuts.getlist
+
local setfield = nuts.setfield
+local setlink = nuts.setlink
+local setlist = nuts.setlist
local traverse_nodes = nuts.traverse
local tosequence = nuts.tosequence
-local copy_node = nuts.copy
local slide_nodelist = nuts.slide
local insert_before = nuts.insert_before
local insert_after = nuts.insert_after
@@ -87,6 +89,7 @@ local specifications = structurestags.specifications
local usedlabels = structurestags.labels
local properties = structurestags.properties
local lasttaginchain = structurestags.lastinchain
+local usewithcare = structurestags.usewithcare
local usedmapping = { }
@@ -273,16 +276,19 @@ end
local f_BDC = formatters["/%s <</MCID %s>> BDC"]
-local function makecontent(parent,id)
+local function makecontent(parent,id,specification)
local tag = parent.tag
local kids = parent.kids
local last = index
if id == "image" then
+ local list = specification.taglist
+ local data = usewithcare.images[list[#list]]
+ local label = data and data.label
local d = pdfdictionary {
Type = pdf_mcr,
Pg = pageref,
MCID = last,
- Alt = "image",
+ Alt = pdfunicode(label ~= "" and label or "image"),
}
kids[#kids+1] = d
elseif pagenum == parent.pnum then
@@ -303,6 +309,10 @@ local function makecontent(parent,id)
return f_BDC(tag,last)
end
+local function makeignore(specification)
+ return "/Artifact BMC"
+end
+
-- no need to adapt head, as we always operate on lists
function nodeinjections.addtags(head)
@@ -388,14 +398,17 @@ function nodeinjections.addtags(head)
end
end
- local prev = common > 0 and elements[taglist[common]] or root
+ local prev = common > 0 and elements[taglist[common]] or root
+ local ignore = false
+ local literal = nil
for j=common+1,noftags do
local tag = taglist[j]
local prv = elements[tag] or makeelement(tag,prev)
if prv == false then
-- ignore this one
- prev = false
+ prev = false
+ ignore = true
break
elseif prv == true then
-- skip this one
@@ -405,27 +418,26 @@ function nodeinjections.addtags(head)
end
if prev then
- -- use insert instead:
- local literal = pdfliteral(makecontent(prev,id))
- local prev = getprev(start)
+ literal = pdfliteral(makecontent(prev,id,specification))
+ elseif ignore then
+ literal = pdfliteral(makeignore(specification))
+ end
+ if literal then
+ local prev = getprev(start)
if prev then
- setfield(prev,"next",literal)
- setfield(literal,"prev",prev)
+ setlink(prev,literal)
end
- setfield(start,"prev",literal)
- setfield(literal,"next",start)
+ setlink(literal,start)
if list and getlist(list) == start then
- setfield(list,"list",literal)
+ setlist(list,literal)
end
-- use insert instead:
local literal = pdfliteral("EMC")
local next = getnext(stop)
if next then
- setfield(next,"prev",literal)
- setfield(literal,"next",next)
+ setlink(literal,next)
end
- setfield(stop,"next",literal)
- setfield(literal,"prev",stop)
+ setlink(stop,literal)
end
top = taglist
noftop = noftags
@@ -556,13 +568,11 @@ end
-- local literal = pdfliteral(result)
-- local prev = getprev(start)
-- if prev then
--- setfield(prev,"next",literal)
--- setfield(literal,"prev",prev)
+-- setlink(prev,literal)
-- end
--- setfield(start,"prev",literal)
--- setfield(literal,"next",start)
+-- setlink(literal,start)
-- if list and getlist(list) == start then
--- setfield(list,"list",literal)
+-- setlist(list,literal)
-- end
-- end
--
@@ -581,11 +591,9 @@ end
-- -- use insert instead:
-- local next = getnext(last)
-- if next then
--- setfield(next,"prev",literal)
--- setfield(literal,"next",next)
+-- setlink(literal,next)
-- end
--- setfield(last,"next",literal)
--- setfield(literal,"prev",last)
+-- setlink(last,literal)
-- end
--
-- finishpage()
diff --git a/Master/texmf-dist/tex/context/base/lpdf-u3d.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-u3d.lua
index c9f4a03691e..c9f4a03691e 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-u3d.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-u3d.lua
diff --git a/Master/texmf-dist/tex/context/base/lpdf-wid.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-wid.lua
index 22971c2b710..73a56caa327 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-wid.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-wid.lua
@@ -177,6 +177,7 @@ local function analyzetransparency(transparencyvalue)
end
-- Attachments
+
local nofattachments = 0
local attachments = { }
local filestreams = { }
diff --git a/Master/texmf-dist/tex/context/base/lpdf-xmp.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-xmp.lua
index b1a795c4b77..b8170319c11 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-xmp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-xmp.lua
@@ -7,7 +7,7 @@ if not modules then modules = { } end modules ['lpdf-xmp'] = {
comment = "with help from Peter Rolf",
}
-local tostring = tostring
+local tostring, type = tostring, type
local format, random, char, gsub, concat = string.format, math.random, string.char, string.gsub, table.concat
local xmlfillin = xml.fillin
@@ -37,47 +37,105 @@ local xpacket = [[
local mapping = {
-- user defined keys (pdfx:)
- ["ConTeXt.Jobname"] = "rdf:Description/pdfx:ConTeXt.Jobname",
- ["ConTeXt.Time"] = "rdf:Description/pdfx:ConTeXt.Time",
- ["ConTeXt.Url"] = "rdf:Description/pdfx:ConTeXt.Url",
- ["ConTeXt.Version"] = "rdf:Description/pdfx:ConTeXt.Version",
- ["ID"] = "rdf:Description/pdfx:ID",
- ["PTEX.Fullbanner"] = "rdf:Description/pdfx:PTEX.Fullbanner",
+ ["ConTeXt.Jobname"] = { "context", "rdf:Description/pdfx:ConTeXt.Jobname" },
+ ["ConTeXt.Time"] = { "date", "rdf:Description/pdfx:ConTeXt.Time" },
+ ["ConTeXt.Url"] = { "context", "rdf:Description/pdfx:ConTeXt.Url" },
+ ["ConTeXt.Version"] = { "context", "rdf:Description/pdfx:ConTeXt.Version" },
+ ["ID"] = { "date", "rdf:Description/pdfx:ID" }, -- has date
+ ["PTEX.Fullbanner"] = { "metadata","rdf:Description/pdfx:PTEX.Fullbanner" },
-- Adobe PDF schema
- ["Keywords"] = "rdf:Description/pdf:Keywords",
- ["Producer"] = "rdf:Description/pdf:Producer",
- -- ["Trapped"] = "rdf:Description/pdf:Trapped", -- '/False' in /Info, but 'False' in XMP
+ ["Keywords"] = { "metadata","rdf:Description/pdf:Keywords" },
+ ["Producer"] = { "metadata","rdf:Description/pdf:Producer" },
+ -- ["Trapped"] = { "pdf", "rdf:Description/pdf:Trapped" }, -- '/False' in /Info, but 'False' in XMP
-- Dublin Core schema
- ["Author"] = "rdf:Description/dc:creator/rdf:Seq/rdf:li",
- ["Format"] = "rdf:Description/dc:format", -- optional, but nice to have
- ["Subject"] = "rdf:Description/dc:description/rdf:Alt/rdf:li",
- ["Title"] = "rdf:Description/dc:title/rdf:Alt/rdf:li",
+ ["Author"] = { "metadata","rdf:Description/dc:creator/rdf:Seq/rdf:li" },
+ ["Format"] = { "metadata","rdf:Description/dc:format" }, -- optional, but nice to have
+ ["Subject"] = { "metadata","rdf:Description/dc:description/rdf:Alt/rdf:li" },
+ ["Title"] = { "metadata","rdf:Description/dc:title/rdf:Alt/rdf:li" },
-- XMP Basic schema
- ["CreateDate"] = "rdf:Description/xmp:CreateDate",
- ["Creator"] = "rdf:Description/xmp:CreatorTool",
- ["MetadataDate"] = "rdf:Description/xmp:MetadataDate",
- ["ModifyDate"] = "rdf:Description/xmp:ModifyDate",
+ ["CreateDate"] = { "date", "rdf:Description/xmp:CreateDate" },
+ ["CreationDate"] = { "date", "rdf:Description/xmp:CreationDate" }, -- dummy
+ ["Creator"] = { "metadata","rdf:Description/xmp:CreatorTool" },
+ ["MetadataDate"] = { "date", "rdf:Description/xmp:MetadataDate" },
+ ["ModDate"] = { "date", "rdf:Description/xmp:ModDate" }, -- dummy
+ ["ModifyDate"] = { "date", "rdf:Description/xmp:ModifyDate" },
-- XMP Media Management schema
- ["DocumentID"] = "rdf:Description/xmpMM:DocumentID",
- ["InstanceID"] = "rdf:Description/xmpMM:InstanceID",
- ["RenditionClass"] = "rdf:Description/xmpMM:RenditionClass", -- PDF/X-4
- ["VersionID"] = "rdf:Description/xmpMM:VersionID", -- PDF/X-4
+ ["DocumentID"] = { "date", "rdf:Description/xmpMM:DocumentID" }, -- uuid
+ ["InstanceID"] = { "date", "rdf:Description/xmpMM:InstanceID" }, -- uuid
+ ["RenditionClass"] = { "pdf", "rdf:Description/xmpMM:RenditionClass" }, -- PDF/X-4
+ ["VersionID"] = { "pdf", "rdf:Description/xmpMM:VersionID" }, -- PDF/X-4
-- additional entries
-- PDF/X
- ["GTS_PDFXVersion"] = "rdf:Description/pdfxid:GTS_PDFXVersion",
+ ["GTS_PDFXVersion"] = { "pdf", "rdf:Description/pdfxid:GTS_PDFXVersion" },
-- optional entries
-- all what is visible in the 'document properties --> additional metadata' window
-- XMP Rights Management schema (optional)
- ["Marked"] = "rdf:Description/xmpRights:Marked",
- -- ["Owner"] = "rdf:Description/xmpRights:Owner/rdf:Bag/rdf:li", -- maybe useful (not visible)
- -- ["UsageTerms"] = "rdf:Description/xmpRights:UsageTerms", -- maybe useful (not visible)
- ["WebStatement"] = "rdf:Description/xmpRights:WebStatement",
+ ["Marked"] = { "pdf", "rdf:Description/xmpRights:Marked" },
+ -- ["Owner"] = { "metadata", "rdf:Description/xmpRights:Owner/rdf:Bag/rdf:li" }, -- maybe useful (not visible)
+ -- ["UsageTerms"] = { "metadata", "rdf:Description/xmpRights:UsageTerms" }, -- maybe useful (not visible)
+ ["WebStatement"] = { "metadata", "rdf:Description/xmpRights:WebStatement" },
-- Photoshop PDF schema (optional)
- ["AuthorsPosition"] = "rdf:Description/photoshop:AuthorsPosition",
- ["Copyright"] = "rdf:Description/photoshop:Copyright",
- ["CaptionWriter"] = "rdf:Description/photoshop:CaptionWriter",
+ ["AuthorsPosition"] = { "metadata", "rdf:Description/photoshop:AuthorsPosition" },
+ ["Copyright"] = { "metadata", "rdf:Description/photoshop:Copyright" },
+ ["CaptionWriter"] = { "metadata", "rdf:Description/photoshop:CaptionWriter" },
}
+pdf.setsuppressoptionalinfo(
+ 0 --
+ + 1 -- pdfnofullbanner
+ + 2 -- pdfnofilename
+ + 4 -- pdfnopagenumber
+ + 8 -- pdfnoinfodict
+ + 16 -- pdfnocreator
+ + 32 -- pdfnocreationdate
+ + 64 -- pdfnomoddate
+ + 128 -- pdfnoproducer
+ + 256 -- pdfnotrapped
+ -- + 512 -- pdfnoid
+)
+
+local included = table.setmetatableindex( {
+ context = true,
+ id = true,
+ metadata = true,
+ date = true,
+ id = true,
+ pdf = true,
+}, function(t,k)
+ return true
+end)
+
+directives.register("backend.nodates", function(v)
+ included.date = not v
+ if v then
+ report_info("no date/time information will be added to the PDF file")
+ end
+end)
+
+directives.register("backend.trailerid", function(v)
+ if v then
+ if toboolean(v) or v == "" then
+ v = "This file is processed by ConTeXt and LuaTeX."
+ else
+ v = tostring(v)
+ end
+ local h = md5.HEX(v)
+ report_info("using hashed trailer id %a (%a)",v,h)
+ pdf.settrailerid(format("[<%s> <%s>]",h,h))
+ end
+end)
+
+local function permitdetail(what)
+ local m = mapping[what]
+ if m then
+ return included[m[1]] and m[2]
+ else
+ return included[what]
+ end
+end
+
+lpdf.permitdetail = permitdetail
+
-- maybe some day we will load the xmp file at runtime
local xmp, xmpfile, xmpname = nil, nil, "lpdf-pdx.xml"
@@ -117,8 +175,8 @@ local function valid_xmp()
end
function lpdf.addxmpinfo(tag,value,check)
- local pattern = mapping[tag]
- if pattern then
+ local pattern = permitdetail(tag)
+ if type(pattern) == "string" then
xmlfillin(xmp or valid_xmp(),pattern,value,check)
end
end
@@ -129,14 +187,21 @@ local pdfaddtoinfo = lpdf.addtoinfo
local pdfaddxmpinfo = lpdf.addxmpinfo
function lpdf.addtoinfo(tag,pdfvalue,strvalue)
- pdfaddtoinfo(tag,pdfvalue)
- local value = strvalue or gsub(tostring(pdfvalue),"^%((.*)%)$","%1") -- hack
- if trace_info then
- report_info("set %a to %a",tag,value)
+ local pattern = permitdetail(tag)
+ if pattern then
+ pdfaddtoinfo(tag,pdfvalue)
+ end
+ if type(pattern) == "string" then
+ local value = strvalue or gsub(tostring(pdfvalue),"^%((.*)%)$","%1") -- hack
+ if trace_info then
+ report_info("set %a to %a",tag,value)
+ end
+ xmlfillin(xmp or valid_xmp(),pattern,value,check)
end
- pdfaddxmpinfo(tag,value)
end
+local pdfaddtoinfo = lpdf.addtoinfo -- used later
+
-- for the do-it-yourselvers
function lpdf.insertxmpinfo(pattern,whatever,prepend)
@@ -160,7 +225,7 @@ local function flushxmpinfo()
local documentid = format("uuid:%s",os.uuid())
local instanceid = format("uuid:%s",os.uuid())
- local producer = format("LuaTeX-%0.2f.%s",tex.luatexversion/100,tex.luatexrevision)
+ local producer = format("LuaTeX-%0.2f.%s",status.luatex_version/100,status.luatex_revision)
local creator = "LuaTeX + ConTeXt MkIV"
local time = lpdf.timestamp()
local fullbanner = status.banner
@@ -196,7 +261,7 @@ local function flushxmpinfo()
logs.poptarget()
end
blob = format(xpacket,packetid,blob)
- if not verbose and tex.pdfcompresslevel > 0 then
+ if not verbose and pdf.getcompresslevel() > 0 then
blob = gsub(blob,">%s+<","><")
end
local r = pdfflushstreamobject(blob,md,false) -- uncompressed
diff --git a/Master/texmf-dist/tex/context/base/luat-bas.mkiv b/Master/texmf-dist/tex/context/base/mkiv/luat-bas.mkiv
index cb00d8f55e7..cb00d8f55e7 100644
--- a/Master/texmf-dist/tex/context/base/luat-bas.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-bas.mkiv
diff --git a/Master/texmf-dist/tex/context/base/luat-bwc.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-bwc.lua
index 993de7bf3f4..993de7bf3f4 100644
--- a/Master/texmf-dist/tex/context/base/luat-bwc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-bwc.lua
diff --git a/Master/texmf-dist/tex/context/base/luat-cbk.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-cbk.lua
index 8c224ad2cbc..2c3bede72c5 100644
--- a/Master/texmf-dist/tex/context/base/luat-cbk.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-cbk.lua
@@ -6,15 +6,11 @@ if not modules then modules = { } end modules ['luat-cbk'] = {
license = "see context related readme files"
}
-local insert, remove, find, format = table.insert, table.remove, string.find, string.format
+local insert, remove, concat = table.insert, table.remove, table.concat
+local find, format = string.find, string.format
local collectgarbage, type, next = collectgarbage, type, next
local round = math.round
-local sortedhash, tohash = table.sortedhash, table.tohash
-
-local trace_checking = false trackers.register("memory.checking", function(v) trace_checking = v end)
-
-local report_callbacks = logs.reporter("system","callbacks")
-local report_memory = logs.reporter("system","memory")
+local sortedhash, sortedkeys, tohash = table.sortedhash, table.sortedkeys, table.tohash
--[[ldx--
<p>Callbacks are the real asset of <l n='luatex'/>. They permit you to hook
@@ -28,23 +24,61 @@ local callbacks = callbacks
--[[ldx--
<p>When you (temporarily) want to install a callback function, and after a
while wants to revert to the original one, you can use the following two
-functions.</p>
+functions. This only works for non-frozen ones.</p>
--ldx]]--
-local trace_callbacks = false trackers.register("system.callbacks", function(v) trace_callbacks = v end)
-local trace_calls = false -- only used when analyzing performance and initializations
+local trace_callbacks = false trackers.register("system.callbacks", function(v) trace_callbacks = v end)
+local trace_calls = false -- only used when analyzing performance and initializations
+local trace_checking = false trackers.register("memory.checking", function(v) trace_checking = v end)
+
+local report_system = logs.reporter("system")
+local report_callbacks = logs.reporter("system","callbacks")
+local report_memory = logs.reporter("system","memory")
local register_callback = callback.register
local find_callback = callback.find
local list_callbacks = callback.list
+local register_usercall = false
+local original_register = register_callback
+
+local frozen = { }
+local stack = { }
+local list = callbacks.list
+local permit_overloads = false
+local block_overloads = false
+
+--[[ldx--
+<p>By now most callbacks are frozen and most provide a way to plug in your own code. For instance
+all node list handlers provide before/after namespaces and the file handling code can be extended
+by adding schemes and if needed I can add more hooks. So there is no real need to overload a core
+callback function. It might be ok for quick and dirty testing but anyway you're on your own if
+you permanently overload callback functions.</p>
+--ldx]]--
+
+-- This might become a configuration file only option when it gets abused too much.
+
+directives.register("system.callbacks.permitoverloads", function(v)
+ if block_overloads or permit_overloads then
+ -- once bad news, always bad news
+ elseif v then
+ permit_overloads = { }
+ report_system()
+ report_system("The callback system has been brought in an unprotected state. As a result of directly")
+ report_system("setting of callbacks subsystems of ConTeXt can stop working. There is no support for")
+ report_system("bugs resulting from this state. It's better to use the official extension mechanisms.")
+ report_system()
+ end
+end)
-local frozen, stack, list = { }, { }, callbacks.list
+sandbox.initializer(function()
+ block_overloads = true
+end)
if not list then -- otherwise counters get reset
list = utilities.storage.allocate(list_callbacks())
- for k, _ in next, list do
+ for k in next, list do
list[k] = 0
end
@@ -56,11 +90,9 @@ local delayed = tohash {
"buildpage_filter",
}
-
if trace_calls then
local functions = { }
- local original = register_callback
register_callback = function(name,func)
if type(func) == "function" then
@@ -73,21 +105,41 @@ if trace_calls then
list[name] = list[name] + 1
return functions[name](...)
end
- return original(name,cnuf)
+ return original_register(name,cnuf)
end
else
- return original(name,func)
+ return original_register(name,func)
end
end
end
-local function frozen_message(what,name)
- report_callbacks("not %s frozen %a to %a",what,name,frozen[name])
+local reported = { }
+
+local function register_usercall(what,name,func)
+ if list[name] then
+ if trace_callbacks or not reported[name] then
+ report_system()
+ report_system("disabling core code by %s user function into callback '%s' (reported only once)",what,name)
+ report_system()
+ reported[name] = true
+ end
+ permit_overloads[name] = true
+ return original_register(name,function(...)
+ if trace_callbacks then
+ report_callbacks("calling user function from '%s'",name)
+ end
+ return func(...)
+ end)
+ else
+ report_callbacks("not %s function into invalid callback '%s'",name)
+ return nil, format("unknown callback '%s'",name)
+ end
end
local function frozen_callback(name)
- return nil, format("callback '%s' is frozen to '%s'",name,frozen[name]) -- no formatter yet
+ report_callbacks("not %s frozen %a","registering",name)
+ return nil, format("callback '%s' is frozen",name) -- no formatter yet
end
local function state(name)
@@ -117,25 +169,28 @@ function callbacks.report()
end
function callbacks.freeze(name,freeze)
- freeze = type(freeze) == "string" and freeze
- if find(name,"*",1,true) then
- local pattern = name
- for name, _ in next, list do
- if find(name,pattern) then
- frozen[name] = freeze or frozen[name] or "frozen"
+ if not permit_overloads then
+ freeze = type(freeze) == "string" and freeze
+ if find(name,"*",1,true) then
+ local pattern = name
+ for name, _ in next, list do
+ if find(name,pattern) then
+ frozen[name] = freeze or frozen[name] or "frozen"
+ end
end
+ else
+ frozen[name] = freeze or frozen[name] or "frozen"
end
- else
- frozen[name] = freeze or frozen[name] or "frozen"
end
end
function callbacks.register(name,func,freeze)
if frozen[name] then
- if trace_callbacks then
- frozen_message("registering",name)
+ if permit_overloads then
+ return register_usercall("registering",name,func)
+ else
+ return frozen_callback(name)
end
- return frozen_callback(name)
elseif freeze then
frozen[name] = type(freeze) == "string" and freeze or "registered"
end
@@ -148,36 +203,41 @@ end
function callback.register(name,func) -- original
if not frozen[name] then
return register_callback(name,func)
- elseif trace_callbacks then
- frozen_message("registering",name)
+ elseif permit_overloads then
+ return register_usercall("registering",name,func)
+ else
+ return frozen_callback(name)
end
- return frozen_callback(name)
end
function callbacks.push(name,func)
- if not frozen[name] then
+ if not frozen[name] or permit_overloads then
local sn = stack[name]
if not sn then
sn = { }
stack[name] = sn
end
insert(sn,find_callback(name))
- register_callback(name, func)
- elseif trace_callbacks then
- frozen_message("pushing",name)
+ if permit_overloads then
+ register_usercall("pushing",name,func)
+ else
+ register_callback(name,func)
+ end
+ else
+ report_callbacks("not %s frozen %a","pushing",name)
end
end
function callbacks.pop(name)
- if not frozen[name] then
+ if not frozen[name] or permit_overloads then
local sn = stack[name]
if not sn or #sn == 0 then
-- some error
- register_callback(name, nil) -- ! really needed
+ register_callback(name,nil) -- ! really needed
else
-- this fails: register_callback(name, remove(stack[name]))
local func = remove(sn)
- register_callback(name, func)
+ register_callback(name,func)
end
end
end
@@ -190,10 +250,16 @@ if trace_calls then
t[#t+1] = format("%s -> %s",name,n)
end
end
- return t
+ return concat(t," ")
end)
end
+statistics.register("callbacks overloaded by user", function()
+ if permit_overloads then
+ return concat(sortedkeys(permit_overloads)," ")
+ end
+end)
+
-- -- somehow crashes later on
--
-- callbacks.freeze("find_.*_file","finding file")
diff --git a/Master/texmf-dist/tex/context/base/luat-cnf.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-cnf.lua
index 0f6b8598f37..83622ef5399 100644
--- a/Master/texmf-dist/tex/context/base/luat-cnf.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-cnf.lua
@@ -19,21 +19,17 @@ texconfig.shell_escape = 't'
luatex = luatex or { }
local luatex = luatex
-texconfig.max_print_line = 100000 -- frozen
-texconfig.max_in_open = 127 -- frozen
texconfig.error_line = 79 -- frozen
+texconfig.expand_depth = 10000
texconfig.half_error_line = 50 -- frozen
-
-texconfig.expand_depth = 10000 -- 10000
-texconfig.hash_extra = 100000 -- 0
-texconfig.nest_size = 1000 -- 50
-texconfig.max_in_open = 500 -- 15 -- in fact it's limited to 127
-texconfig.max_print_line = 10000 -- 79
-texconfig.max_strings = 500000 -- 15000
-texconfig.param_size = 25000 -- 60
-texconfig.save_size = 50000 -- 4000
-texconfig.save_size = 100000 -- 4000
-texconfig.stack_size = 10000 -- 300
+texconfig.hash_extra = 100000
+texconfig.max_in_open = 1000 -- frozen
+texconfig.max_print_line = 100000 -- frozen
+texconfig.max_strings = 500000
+texconfig.nest_size = 1000
+texconfig.param_size = 25000
+texconfig.save_size = 100000
+texconfig.stack_size = 10000
local stub = [[
@@ -64,7 +60,7 @@ function texconfig.init()
"string", "table", "coroutine", "debug", "file", "io", "lpeg", "math", "os", "package", "bit32",
},
basictex = { -- noad
- "callback", "font", "img", "lang", "lua", "node", "pdf", "status", "tex", "texconfig", "texio", "token", "newtoken"
+ "callback", "font", "img", "lang", "lua", "node", "pdf", "status", "tex", "texconfig", "texio", "token",
},
extralua = {
"gzip", "zip", "zlib", "lfs", "ltn12", "mime", "socket", "md5", "profiler", "unicode", "utf",
diff --git a/Master/texmf-dist/tex/context/base/luat-cod.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua
index c436ee6d7a6..f62396a8e10 100644
--- a/Master/texmf-dist/tex/context/base/luat-cod.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua
@@ -16,7 +16,7 @@ local texconfig, lua = texconfig, lua
texconfig.kpse_init = false
texconfig.shell_escape = 't'
texconfig.max_print_line = 100000
-texconfig.max_in_open = 127
+texconfig.max_in_open = 1000
-- registering bytecode chunks
@@ -105,7 +105,7 @@ if not environment.luafilechunk then
filename = sourcepath .. "/" .. filename
end
local data = loadfile(filename)
- texio.write("<",data and "+ " or "- ",filename,">")
+ texio.write("term and log","<",data and "+ " or "- ",filename,">")
if data then
data()
end
diff --git a/Master/texmf-dist/tex/context/base/luat-cod.mkiv b/Master/texmf-dist/tex/context/base/mkiv/luat-cod.mkiv
index 9ce6161c32c..9ce6161c32c 100644
--- a/Master/texmf-dist/tex/context/base/luat-cod.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-cod.mkiv
diff --git a/Master/texmf-dist/tex/context/base/luat-env.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-env.lua
index 5f2a0d281a0..5f2a0d281a0 100644
--- a/Master/texmf-dist/tex/context/base/luat-env.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-env.lua
diff --git a/Master/texmf-dist/tex/context/base/luat-exe.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-exe.lua
index d8d954a307b..d8d954a307b 100644
--- a/Master/texmf-dist/tex/context/base/luat-exe.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-exe.lua
diff --git a/Master/texmf-dist/tex/context/base/luat-fio.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-fio.lua
index dcc183167d8..2b083b58285 100644
--- a/Master/texmf-dist/tex/context/base/luat-fio.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-fio.lua
@@ -12,8 +12,8 @@ local sequenced = table.sequenced
texconfig.kpse_init = false
texconfig.shell_escape = 't'
-texconfig.max_in_open = 127
texconfig.max_print_line = 100000
+texconfig.max_in_open = 1000
if not resolvers.instance then
@@ -33,44 +33,81 @@ if not resolvers.instance then
if callback then
- local register = callbacks.register
+ local register = callbacks.register
+
+ local addsuffix = file.addsuffix
+ local join = file.join
+
+ local function findpk(font,dpi)
+ local dpi = dpi or 600 -- could take from resolution
+ -- <font>.pk
+ local name = addsuffix(font,"pk")
+ -- <dpi>/name.pk
+ local temp = join(dpi,name)
+ local okay = findbinfile(temp,"pk")
+ -- print(temp,okay)
+ if okay and okay ~= "" then
+ return okay
+ end
+ -- <dpi>.dpi/name.pk
+ local temp = join(dpi..".dpi",name)
+ local okay = findbinfile(temp,"pk")
+ -- print(temp,okay)
+ if okay and okay ~= "" then
+ return okay
+ end
+ -- <font>.<dpi>pk
+ local name = addsuffix(font,dpi.."pk")
+ -- name.<dpi>pk
+ local temp = name
+ local okay = findbinfile(temp,"pk")
+ -- print(temp,okay)
+ if okay and okay ~= "" then
+ return okay
+ end
+ -- <dpi>.dpi/name.<dpi>pk
+ local temp = join(dpi..".dpi",name)
+ local okay = findbinfile(temp,"pk")
+ -- print(temp,okay)
+ return okay or ""
+ end
-- register('process_jobname' , function(name) return name end, true)
- register('find_read_file' , function(id,name) return findtexfile(name) end, true)
- register('open_read_file' , function( name) return opentexfile(name) end, true)
+ register('find_read_file' , function(id,name) return findtexfile(name) end, true)
+ register('open_read_file' , function( name) return opentexfile(name) end, true)
register('find_data_file' , function(name) return findbinfile(name,"tex") end, true)
register('find_enc_file' , function(name) return findbinfile(name,"enc") end, true)
register('find_font_file' , function(name) return findbinfile(name,"tfm") end, true)
- register('find_format_file' , function(name) return findbinfile(name,"fmt") end, true)
+ -- register('find_format_file' , function(name) return findbinfile(name,"fmt") end, true)
register('find_image_file' , function(name) return findbinfile(name,"tex") end, true)
register('find_map_file' , function(name) return findbinfile(name,"map") end, true)
register('find_opentype_file' , function(name) return findbinfile(name,"otf") end, true)
register('find_output_file' , function(name) return name end, true)
- register('find_pk_file' , function(name) return findbinfile(name,"pk") end, true)
+ register('find_pk_file' , findpk, true)
register('find_sfd_file' , function(name) return findbinfile(name,"sfd") end, true)
register('find_truetype_file' , function(name) return findbinfile(name,"ttf") end, true)
register('find_type1_file' , function(name) return findbinfile(name,"pfb") end, true)
register('find_vf_file' , function(name) return findbinfile(name,"vf") end, true)
register('find_cidmap_file' , function(name) return findbinfile(name,"cidmap") end, true)
- register('read_data_file' , function(file) return loadbinfile(file,"tex") end, true)
- register('read_enc_file' , function(file) return loadbinfile(file,"enc") end, true)
- register('read_font_file' , function(file) return loadbinfile(file,"tfm") end, true)
+ register('read_data_file' , function(file) return loadbinfile(file,"tex") end, true)
+ register('read_enc_file' , function(file) return loadbinfile(file,"enc") end, true)
+ register('read_font_file' , function(file) return loadbinfile(file,"tfm") end, true)
-- format
-- image
- register('read_map_file' , function(file) return loadbinfile(file,"map") end, true)
+ register('read_map_file' , function(file) return loadbinfile(file,"map") end, true)
-- output
- register('read_pk_file' , function(file) return loadbinfile(file,"pk") end, true) -- 600dpi/manfnt.720pk
- register('read_sfd_file' , function(file) return loadbinfile(file,"sfd") end, true)
- register('read_vf_file' , function(file) return loadbinfile(file,"vf" ) end, true)
+ register('read_pk_file' , function(file) return loadbinfile(file,"pk") end, true) -- 600dpi/manfnt.720pk
+ register('read_sfd_file' , function(file) return loadbinfile(file,"sfd") end, true)
+ register('read_vf_file' , function(file) return loadbinfile(file,"vf" ) end, true)
- register('find_font_file' , function(name) return findbinfile(name,"ofm") end, true)
- register('find_vf_file' , function(name) return findbinfile(name,"ovf") end, true)
+ -- register('find_font_file' , function(name) return findbinfile(name,"ofm") end, true)
+ -- register('find_vf_file' , function(name) return findbinfile(name,"ovf") end, true)
- register('read_font_file' , function(file) return loadbinfile(file,"ofm") end, true)
- register('read_vf_file' , function(file) return loadbinfile(file,"ovf") end, true)
+ -- register('read_font_file' , function(file) return loadbinfile(file,"ofm") end, true)
+ -- register('read_vf_file' , function(file) return loadbinfile(file,"ovf") end, true)
-- register('read_opentype_file' , function(file) return loadbinfile(file,"otf") end, true)
-- register('read_truetype_file' , function(file) return loadbinfile(file,"ttf") end, true)
diff --git a/Master/texmf-dist/tex/context/base/luat-fmt.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-fmt.lua
index 92c1dd6c45d..9a86ef50e87 100644
--- a/Master/texmf-dist/tex/context/base/luat-fmt.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-fmt.lua
@@ -29,7 +29,10 @@ local function primaryflags() -- not yet ok
return concat(flags," ")
end
-function environment.make_format(name)
+-- The silent option is Taco. It's a bit of a hack because we cannot yet mess
+-- with directives. In fact, I could probably clean up the maker a bit by now.
+
+function environment.make_format(name,silent)
local engine = environment.ownmain or "luatex"
-- change to format path (early as we need expanded paths)
local olddir = dir.current()
@@ -93,9 +96,23 @@ function environment.make_format(name)
return
end
-- generate format
- local command = format("%s --ini %s --lua=%s %s %sdump",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),os.platform == "unix" and "\\\\" or "\\")
- report_format("running command: %s\n",command)
- os.execute(command)
+ local dump = os.platform=="unix" and "\\\\dump" or "\\dump"
+ if silent then
+ statistics.starttiming()
+ local command = format("%s --ini --interaction=batchmode %s --lua=%s %s %s > temp.log",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),dump)
+ local result = os.execute(command)
+ local runtime = statistics.stoptiming()
+ if result ~= 0 then
+ print(format("%s silent make > fatal error when making format %q",engine,name)) -- we use a basic print
+ else
+ print(format("%s silent make > format %q made in %.3f seconds",engine,name,runtime)) -- we use a basic print
+ end
+ os.remove("temp.log")
+ else
+ local command = format("%s --ini %s --lua=%s %s %sdump",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),dump)
+ report_format("running command: %s\n",command)
+ os.execute(command)
+ end
-- remove related mem files
local pattern = file.removesuffix(file.basename(usedluastub)).."-*.mem"
-- report_format("removing related mplib format with pattern %a", pattern)
diff --git a/Master/texmf-dist/tex/context/base/luat-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-ini.lua
index 34e83e7bb38..cd1f45692a3 100644
--- a/Master/texmf-dist/tex/context/base/luat-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-ini.lua
@@ -24,3 +24,5 @@ table.setmetatableindex(thirddata, table.autokey)
if not global then
global = _G
end
+
+LUATEXVERSION = status.luatex_version/100 + tonumber(status.luatex_revision)/1000
diff --git a/Master/texmf-dist/tex/context/base/luat-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/luat-ini.mkiv
index b455a415821..e19b72d14ea 100644
--- a/Master/texmf-dist/tex/context/base/luat-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-ini.mkiv
@@ -259,24 +259,24 @@
% This is a forward definition:
-\def\checkedstrippedcsname#1% this permits \strippedcsname{\xxx} and \strippedcsname{xxx}
- {\expandafter\syst_helpers_checked_stripped_csname\string#1}
-
-\def\syst_helpers_checked_stripped_csname#1%
- {\if\noexpand#1\letterbackslash\else#1\fi}
+% \def\checkedstrippedcsname#1% this permits \strippedcsname{\xxx} and \strippedcsname{xxx}
+% {\expandafter\syst_helpers_checked_stripped_csname\string#1}
+%
+% \def\syst_helpers_checked_stripped_csname#1%
+% {\if\noexpand#1\letterbackslash\else#1\fi}
\normalprotected\def\installctxfunction#1#2%
- {\edef\m_syst_name{\checkedstrippedcsname#1}%
+ {\edef\m_syst_name{\csstring#1}%
\global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax
\expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunction\csname\??luafunction\m_syst_name\endcsname}}
\normalprotected\def\installctxscanner#1#2%
- {\edef\m_syst_name{\checkedstrippedcsname#1}%
+ {\edef\m_syst_name{\csstring#1}%
\global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax
\expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunction\csname\??luafunction\m_syst_name\endcsname}}
\normalprotected\def\resetctxscanner#1%
- {\edef\m_syst_name{\checkedstrippedcsname#1}%
+ {\edef\m_syst_name{\csstring#1}%
\global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\zerocount
\global\expandafter\let\csname\m_syst_name\endcsname\relax}
diff --git a/Master/texmf-dist/tex/context/base/luat-iop.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-iop.lua
index e1772af4e90..e1772af4e90 100644
--- a/Master/texmf-dist/tex/context/base/luat-iop.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-iop.lua
diff --git a/Master/texmf-dist/tex/context/base/luat-lib.mkiv b/Master/texmf-dist/tex/context/base/mkiv/luat-lib.mkiv
index 24f9da41513..cbe15c8a1cb 100644
--- a/Master/texmf-dist/tex/context/base/luat-lib.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-lib.mkiv
@@ -15,6 +15,8 @@
\registerctxluafile{util-str}{1.001}
\registerctxluafile{util-tab}{1.001}
+\registerctxluafile{util-fil}{1.001}
+\registerctxluafile{util-sac}{1.001}
\registerctxluafile{util-sto}{1.001} % could also be done in trac-deb.mkiv
\registerctxluafile{util-pck}{1.001}
\registerctxluafile{util-seq}{1.001}
diff --git a/Master/texmf-dist/tex/context/base/luat-lua.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-lua.lua
index 972004e887d..972004e887d 100644
--- a/Master/texmf-dist/tex/context/base/luat-lua.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-lua.lua
diff --git a/Master/texmf-dist/tex/context/base/luat-mac.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-mac.lua
index 6214e591e5b..4274fe9f9e1 100644
--- a/Master/texmf-dist/tex/context/base/luat-mac.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-mac.lua
@@ -41,7 +41,7 @@ local function set(s)
h = rep("#",2^(ns-1))
hashes[ns] = h
end
- m = h .. n
+ local m = h .. n
top[s] = m
return m
end
diff --git a/Master/texmf-dist/tex/context/base/luat-run.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-run.lua
index 65cf0f33866..7e81350f0f2 100644
--- a/Master/texmf-dist/tex/context/base/luat-run.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-run.lua
@@ -25,9 +25,11 @@ local luatex = luatex
local startactions = { }
local stopactions = { }
+local dumpactions = { }
function luatex.registerstartactions(...) insert(startactions, ...) end
function luatex.registerstopactions (...) insert(stopactions, ...) end
+function luatex.registerdumpactions (...) insert(dumpactions, ...) end
local function start_run()
if logs.start_run then
@@ -76,6 +78,9 @@ end
-- end
local function pre_dump_actions()
+ for i=1,#dumpactions do
+ dumpactions[i]()
+ end
lua.finalize(trace_lua_dump and report_lua or nil)
-- statistics.savefmtstatus("\jobname","\contextversion","context.tex")
end
@@ -136,7 +141,7 @@ local synctex = 0
directives.register("system.synctex", function(v)
synctex = tonumber(v) or (toboolean(v,true) and 1) or (v == "zipped" and 1) or (v == "unzipped" and -1) or 0
if synctex ~= 0 then
- report_system("synctex functionality is enabled (%s)!",tostring(synctex))
+ report_system("synctex functionality is enabled (%s), expect runtime overhead!",tostring(synctex))
else
report_system("synctex functionality is disabled!")
end
diff --git a/Master/texmf-dist/tex/context/base/luat-soc.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-soc.lua
index 9342a4b3375..9342a4b3375 100644
--- a/Master/texmf-dist/tex/context/base/luat-soc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-soc.lua
diff --git a/Master/texmf-dist/tex/context/base/luat-sta.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-sta.lua
index 8b58774d357..8b58774d357 100644
--- a/Master/texmf-dist/tex/context/base/luat-sta.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-sta.lua
diff --git a/Master/texmf-dist/tex/context/base/luat-sto.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-sto.lua
index b04d655c29d..b04d655c29d 100644
--- a/Master/texmf-dist/tex/context/base/luat-sto.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-sto.lua
diff --git a/Master/texmf-dist/tex/context/base/luat-usr.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-usr.lua
index 071e3bf5bb9..071e3bf5bb9 100644
--- a/Master/texmf-dist/tex/context/base/luat-usr.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-usr.lua
diff --git a/Master/texmf-dist/tex/context/base/luat-usr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/luat-usr.mkiv
index 92d40010c0f..92d40010c0f 100644
--- a/Master/texmf-dist/tex/context/base/luat-usr.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-usr.mkiv
diff --git a/Master/texmf-dist/tex/context/base/lxml-aux.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua
index 8eedade392c..4112db1e5fa 100644
--- a/Master/texmf-dist/tex/context/base/lxml-aux.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua
@@ -370,6 +370,8 @@ xml.insertbefore = function(r,p,e) insert_element(r,p,e,true) end
xml.injectafter = inject_element
xml.injectbefore = function(r,p,e) inject_element(r,p,e,true) end
+-- loaddata can restrict loading
+
local function include(xmldata,pattern,attribute,recursive,loaddata,level)
-- attribute = attribute or 'href'
pattern = pattern or 'include'
@@ -383,56 +385,64 @@ local function include(xmldata,pattern,attribute,recursive,loaddata,level)
local ek = collected[c]
local name = nil
local ekdt = ek.dt
- local ekat = ek.at
- local ekrt = ek.__p__
- local epdt = ekrt.dt
- if not attribute or attribute == "" then
- name = (type(ekdt) == "table" and ekdt[1]) or ekdt -- check, probably always tab or str
- end
- if not name then
- for a in gmatch(attribute or "href","([^|]+)") do
- name = ekat[a]
- if name then
- break
+ if ekdt then
+ local ekat = ek.at
+ local ekrt = ek.__p__
+ if ekrt then
+ local epdt = ekrt.dt
+ if not attribute or attribute == "" then
+ name = (type(ekdt) == "table" and ekdt[1]) or ekdt -- check, probably always tab or str
end
- end
- end
- local data = nil
- if name and name ~= "" then
- data = loaddata(name) or ""
- if trace_inclusions then
- report_xml("including %s bytes from %a at level %s by pattern %a and attribute %a (%srecursing)",#data,name,level,pattern,attribute or "",recursive and "" or "not ")
- end
- end
- if not data or data == "" then
- epdt[ek.ni] = "" -- xml.empty(d,k)
- elseif ekat["parse"] == "text" then
- -- for the moment hard coded
- epdt[ek.ni] = xml.escaped(data) -- d[k] = xml.escaped(data)
- else
- local xi = xmlinheritedconvert(data,xmldata)
- if not xi then
- epdt[ek.ni] = "" -- xml.empty(d,k)
- else
- if recursive then
- include(xi,pattern,attribute,recursive,loaddata,level+1)
+ if not name then
+ for a in gmatch(attribute or "href","([^|]+)") do
+ name = ekat[a]
+ if name then
+ break
+ end
+ end
end
- local child = xml.body(xi) -- xml.assign(d,k,xi)
- child.__p__ = ekrt
- child.__f__ = name -- handy for tracing
- epdt[ek.ni] = child
- local inclusions = xmldata.settings.inclusions
- if inclusions then
- inclusions[#inclusions+1] = name
- else
- xmldata.settings.inclusions = { name }
+ local data = nil
+ if name and name ~= "" then
+ data = loaddata(name) or ""
+ if trace_inclusions then
+ report_xml("including %s bytes from %a at level %s by pattern %a and attribute %a (%srecursing)",#data,name,level,pattern,attribute or "",recursive and "" or "not ")
+ end
end
- if child.er then
- local badinclusions = xmldata.settings.badinclusions
- if badinclusions then
- badinclusions[#badinclusions+1] = name
+ if not data or data == "" then
+ epdt[ek.ni] = "" -- xml.empty(d,k)
+ elseif ekat["parse"] == "text" then
+ -- for the moment hard coded
+ epdt[ek.ni] = xml.escaped(data) -- d[k] = xml.escaped(data)
+ else
+ local xi = xmlinheritedconvert(data,xmldata)
+ if not xi then
+ epdt[ek.ni] = "" -- xml.empty(d,k)
else
- xmldata.settings.badinclusions = { name }
+ if recursive then
+ include(xi,pattern,attribute,recursive,loaddata,level+1)
+ end
+ local child = xml.body(xi) -- xml.assign(d,k,xi)
+ child.__p__ = ekrt
+ child.__f__ = name -- handy for tracing
+ epdt[ek.ni] = child
+ local settings = xmldata.settings
+ local inclusions = settings and settings.inclusions
+ if inclusions then
+ inclusions[#inclusions+1] = name
+ elseif settings then
+ settings.inclusions = { name }
+ else
+ settings = { inclusions = { name } }
+ xmldata.settings = settings
+ end
+ if child.er then
+ local badinclusions = settings.badinclusions
+ if badinclusions then
+ badinclusions[#badinclusions+1] = name
+ else
+ settings.badinclusions = { name }
+ end
+ end
end
end
end
@@ -998,4 +1008,3 @@ function xml.totable(x,strip,flat)
return convert(x,strip,flat)
end
end
-
diff --git a/Master/texmf-dist/tex/context/base/lxml-css.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-css.lua
index fa921b24f48..fa921b24f48 100644
--- a/Master/texmf-dist/tex/context/base/lxml-css.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-css.lua
diff --git a/Master/texmf-dist/tex/context/base/lxml-css.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lxml-css.mkiv
index 79de85c088c..79de85c088c 100644
--- a/Master/texmf-dist/tex/context/base/lxml-css.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-css.mkiv
diff --git a/Master/texmf-dist/tex/context/base/lxml-ctx.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.lua
index 1191d6796a9..677fd6a0154 100644
--- a/Master/texmf-dist/tex/context/base/lxml-ctx.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.lua
@@ -6,9 +6,9 @@ if not modules then modules = { } end modules ['lxml-ctx'] = {
license = "see context related readme files"
}
--- is this still used?
+-- will be cleaned up
-local format, find = string.format, string.find
+local format, find, gsub = string.format, string.find, string.gsub
local xml = xml
xml.ctx = { }
@@ -36,6 +36,11 @@ local nodesettostring = xml.nodesettostring
-- maybe use detokenize instead of \type
+local function cleaned(str)
+ str = gsub(str,"|","\\textbar ")
+ return str
+end
+
function xml.ctx.tshow(specification)
local pattern = specification.pattern
local xmlroot = specification.xmlroot
@@ -48,9 +53,9 @@ function xml.ctx.tshow(specification)
local parsed = xml.lpath(xmlpattern)
local titlecommand = specification.title or "type"
if parsed.state then
- context[titlecommand]("pattern: " .. pattern .. " (".. parsed.state .. ")")
+ context[titlecommand]("pattern: " .. cleaned(pattern) .. " (".. parsed.state .. ")")
else
- context[titlecommand]("pattern: " .. pattern)
+ context[titlecommand]("pattern: " .. cleaned(pattern))
end
context.starttabulate({ "|Tr|Tl|Tp|" } )
if specification.warning then
@@ -75,15 +80,15 @@ function xml.ctx.tshow(specification)
context(kind)
context.NC()
if kind == "axis" then
- context(pp.axis)
+ context(cleaned(pp.axis))
elseif kind == "nodes" then
- context(nodesettostring(pp.nodes,pp.nodetest))
+ context(cleaned(nodesettostring(pp.nodes,pp.nodetest)))
elseif kind == "expression" then
---~ context("%s => %s",pp.expression,pp.converted)
- context(pp.expression)
+-- -- context("%s => %s",pp.expression,pp.converted)
+ context(cleaned(pp.expression))
elseif kind == "finalizer" then
context("%s(%s)",pp.name,pp.arguments)
- elseif kind == "error" and pp.error then
+ elseif kind == "error" and pp.eqrror then
context(pp.error)
end
context.NC()
diff --git a/Master/texmf-dist/tex/context/base/lxml-ctx.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.mkiv
index 58807339dd7..6691e36bbe7 100644
--- a/Master/texmf-dist/tex/context/base/lxml-ctx.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.mkiv
@@ -1,5 +1,5 @@
%D \module
-%D [ file=lxml-ini,
+%D [ file=lxml-ctx,
%D version=2007.08.17,
%D title=\CONTEXT\ \XML\ Support,
%D subtitle=Initialization,
diff --git a/Master/texmf-dist/tex/context/base/lxml-dir.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-dir.lua
index 48c0ac41e73..48c0ac41e73 100644
--- a/Master/texmf-dist/tex/context/base/lxml-dir.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-dir.lua
diff --git a/Master/texmf-dist/tex/context/base/lxml-ent.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-ent.lua
index a5c5bc389a6..c392713f0a3 100644
--- a/Master/texmf-dist/tex/context/base/lxml-ent.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-ent.lua
@@ -10,6 +10,7 @@ local type, next, tonumber = type, next, tonumber
local byte, format = string.byte, string.format
local utfchar = utf.char
local lpegmatch = lpeg.match
+local setmetatableindex = table.setmetatableindex
--[[ldx--
<p>We provide (at least here) two entity handlers. The more extensive
@@ -41,17 +42,25 @@ end
if characters and characters.entities then
+ -- the big entity table also has amp, quot, apos, lt, gt in them
+
+ local loaded = false
+
function characters.registerentities(forcecopy)
+ if loaded then
+ return
+ end
if forcecopy then
- table.setmetatableindex(entities,nil)
+ setmetatableindex(entities,nil)
for name, value in next, characters.entities do
if not entities[name] then
entities[name] = value
end
end
else
- table.setmetatableindex(entities,characters.entities)
+ setmetatableindex(entities,characters.entities)
end
+ loaded = true
end
end
diff --git a/Master/texmf-dist/tex/context/base/lxml-inf.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-inf.lua
index 8f1157c7d4c..8f1157c7d4c 100644
--- a/Master/texmf-dist/tex/context/base/lxml-inf.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-inf.lua
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lxml-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-ini.lua
new file mode 100644
index 00000000000..6026b1090bc
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-ini.lua
@@ -0,0 +1,143 @@
+ if not modules then modules = { } end modules ['lxml-ini'] = {
+ version = 1.001,
+ comment = "this module is the basis for the lxml-* ones",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local xml = xml
+local lxml = lxml
+
+-- this defines an extra scanner lxmlid:
+
+local scanners = tokens.scanners
+local scanstring = scanners.string
+local getid = lxml.id
+
+scanners.lxmlid = function() return getid(scanstring()) end
+
+local implement = interfaces.implement
+
+-- lxml.id
+
+implement { name = "lxmlid", actions = lxml.getid, arguments = "string" }
+
+implement { name = "xmldoif", actions = lxml.doif, arguments = { "string", "string" } }
+implement { name = "xmldoifnot", actions = lxml.doifnot, arguments = { "string", "string" } }
+implement { name = "xmldoifelse", actions = lxml.doifelse, arguments = { "string", "string" } }
+implement { name = "xmldoiftext", actions = lxml.doiftext, arguments = { "string", "string" } }
+implement { name = "xmldoifnottext", actions = lxml.doifnottext, arguments = { "string", "string" } }
+implement { name = "xmldoifelsetext", actions = lxml.doifelsetext, arguments = { "string", "string" } }
+
+implement { name = "xmldoifempty", actions = lxml.doifempty, arguments = { "string", "string" } }
+implement { name = "xmldoifnotempty", actions = lxml.doifnotempty, arguments = { "string", "string" } }
+implement { name = "xmldoifelseempty", actions = lxml.doifelseempty, arguments = { "string", "string" } }
+implement { name = "xmldoifselfempty", actions = lxml.doifempty, arguments = "string" } -- second arg is not passed (used)
+implement { name = "xmldoifnotselfempty", actions = lxml.doifnotempty, arguments = "string" } -- second arg is not passed (used)
+implement { name = "xmldoifelseselfempty", actions = lxml.doifelseempty, arguments = "string" } -- second arg is not passed (used)
+
+--------- { name = "xmlcontent", actions = lxml.content, arguments = "string" }
+--------- { name = "xmlflushstripped", actions = lxml.strip, arguments = { "string", true } }
+implement { name = "xmlall", actions = lxml.all, arguments = { "string", "string" } }
+implement { name = "xmllastmatch", actions = lxml.lastmatch }
+implement { name = "xmlatt", actions = lxml.att, arguments = { "string", "string" } }
+implement { name = "xmllastatt", actions = lxml.lastatt }
+implement { name = "xmlattdef", actions = lxml.att, arguments = { "string", "string", "string" } }
+implement { name = "xmlattribute", actions = lxml.attribute, arguments = { "string", "string", "string" } }
+implement { name = "xmlattributedef", actions = lxml.attribute, arguments = { "string", "string", "string", "string" } }
+implement { name = "xmlpath", actions = lxml.path, arguments = { "string", "'/'" } }
+implement { name = "xmlchainatt", actions = lxml.chainattribute, arguments = { "string", "'/'", "string" } }
+implement { name = "xmlchainattdef", actions = lxml.chainattribute, arguments = { "string", "'/'", "string", "string" } }
+implement { name = "xmlrefatt", actions = lxml.refatt, arguments = { "string", "string" } }
+implement { name = "xmlchecknamespace", actions = xml.checknamespace, arguments = { "lxmlid", "string", "string" } }
+implement { name = "xmlcommand", actions = lxml.command, arguments = { "string", "string", "string" } }
+implement { name = "xmlconcat", actions = lxml.concat, arguments = { "string", "string", "string" } } -- \detokenize{#3}
+implement { name = "xmlconcatrange", actions = lxml.concatrange, arguments = { "string", "string", "string", "string", "string" } } -- \detokenize{#5}
+implement { name = "xmlcontext", actions = lxml.context, arguments = { "string", "string" } }
+implement { name = "xmlcount", actions = lxml.count, arguments = { "string", "string" } }
+implement { name = "xmldelete", actions = lxml.delete, arguments = { "string", "string" } }
+implement { name = "xmldirect", actions = lxml.direct, arguments = "string" }
+implement { name = "xmldirectives", actions = lxml.directives.setup, arguments = "string" }
+implement { name = "xmldirectivesafter", actions = lxml.directives.after, arguments = "string" }
+implement { name = "xmldirectivesbefore", actions = lxml.directives.before, arguments = "string" }
+implement { name = "xmldisplayverbatim", actions = lxml.displayverbatim, arguments = "string" }
+implement { name = "xmlelement", actions = lxml.element, arguments = { "string", "string" } } -- could be integer but now we can alias
+implement { name = "xmlfilter", actions = lxml.filter, arguments = { "string", "string" } }
+implement { name = "xmlfilterlist", actions = lxml.filterlist, arguments = { "string", "string" } }
+implement { name = "xmlfirst", actions = lxml.first, arguments = { "string", "string" } }
+implement { name = "xmlflush", actions = lxml.flush, arguments = "string" }
+implement { name = "xmlflushcontext", actions = lxml.context, arguments = "string" }
+implement { name = "xmlflushlinewise", actions = lxml.flushlinewise, arguments = "string" }
+implement { name = "xmlflushspacewise", actions = lxml.flushspacewise, arguments = "string" }
+implement { name = "xmlfunction", actions = lxml.applyfunction, arguments = { "string", "string" } }
+implement { name = "xmlinclude", actions = lxml.include, arguments = { "string", "string", "string", true } }
+implement { name = "xmlincludeoptions", actions = lxml.include, arguments = { "string", "string", "string", "string" } }
+implement { name = "xmlinclusion", actions = lxml.inclusion, arguments = "string" }
+implement { name = "xmlinclusions", actions = lxml.inclusions, arguments = "string" }
+implement { name = "xmlbadinclusions", actions = lxml.badinclusions, arguments = "string" }
+implement { name = "xmlindex", actions = lxml.index, arguments = { "string", "string", "string" } } -- can be integer but now we can alias
+implement { name = "xmlinlineverbatim", actions = lxml.inlineverbatim, arguments = "string" }
+implement { name = "xmllast", actions = lxml.last, arguments = { "string", "string" } }
+implement { name = "xmlload", actions = lxml.load, arguments = { "string", "string", "string" } }
+implement { name = "xmlloadbuffer", actions = lxml.loadbuffer, arguments = { "string", "string", "string" } }
+implement { name = "xmlloaddata", actions = lxml.loaddata, arguments = { "string", "string", "string" } }
+implement { name = "xmlloaddirectives", actions = lxml.directives.load, arguments = "string" }
+implement { name = "xmlmain", actions = lxml.main, arguments = "string" }
+implement { name = "xmlmatch", actions = lxml.match, arguments = "string" }
+implement { name = "xmlname", actions = lxml.name, arguments = "string" }
+implement { name = "xmlnamespace", actions = lxml.namespace, arguments = "string" }
+implement { name = "xmlnonspace", actions = lxml.nonspace, arguments = { "string", "string" } }
+implement { name = "xmlpos", actions = lxml.pos, arguments = "string" }
+implement { name = "xmlraw", actions = lxml.raw, arguments = { "string", "string" } }
+implement { name = "xmlrawtex", actions = lxml.rawtex, arguments = { "string", "string" } }
+implement { name = "xmlregisterns", actions = xml.registerns, arguments = { "string", "string" } }
+implement { name = "xmlremapname", actions = xml.remapname, arguments = { "lxmlid", "string","string","string" } }
+implement { name = "xmlremapnamespace", actions = xml.renamespace, arguments = { "lxmlid", "string", "string" } }
+implement { name = "xmlsave", actions = lxml.save, arguments = { "string", "string" } }
+implement { name = "xmlsetsetup", actions = lxml.setsetup, arguments = { "string", "string", "string" } }
+implement { name = "xmlsnippet", actions = lxml.snippet, arguments = { "string", "string" } }
+implement { name = "xmlstrip", actions = lxml.strip, arguments = { "string", "string" } }
+implement { name = "xmlstripanywhere", actions = lxml.strip, arguments = { "string", "string", true, true } }
+implement { name = "xmlstripnolines", actions = lxml.strip, arguments = { "string", "string", true } }
+implement { name = "xmlstripped", actions = lxml.stripped, arguments = { "string", "string" } }
+implement { name = "xmlstrippednolines", actions = lxml.stripped, arguments = { "string", "string", true } }
+implement { name = "xmltag", actions = lxml.tag, arguments = "string" }
+implement { name = "xmltext", actions = lxml.text, arguments = { "string", "string" } }
+implement { name = "xmlpure", actions = lxml.pure, arguments = { "string", "string" } }
+implement { name = "xmlflushtext", actions = lxml.text, arguments = "string" }
+implement { name = "xmlflushpure", actions = lxml.pure, arguments = "string" }
+implement { name = "xmltobuffer", actions = lxml.tobuffer, arguments = { "string", "string", "string" } }
+implement { name = "xmltobufferverbose", actions = lxml.tobuffer, arguments = { "string", "string", "string", true } }
+implement { name = "xmltofile", actions = lxml.tofile, arguments = { "string", "string", "string" } }
+implement { name = "xmltoparameters", actions = lxml.toparameters, arguments = "string" }
+implement { name = "xmlverbatim", actions = lxml.verbatim, arguments = "string" }
+
+implement { name = "xmlstartraw", actions = lxml.startraw }
+implement { name = "xmlstopraw", actions = lxml.stopraw }
+
+implement { name = "xmlprependsetup", actions = lxml.installsetup, arguments = { 1, "string", "string" } } -- 2:*
+implement { name = "xmlappendsetup", actions = lxml.installsetup, arguments = { 2, "string", "string" } } -- 2:*
+implement { name = "xmlbeforesetup", actions = lxml.installsetup, arguments = { 3, "string", "string", "string" } } -- 2:*
+implement { name = "xmlaftersetup", actions = lxml.installsetup, arguments = { 4, "string", "string", "string" } } -- 2:*
+implement { name = "xmlremovesetup", actions = lxml.removesetup, arguments = { "string", "string" } } -- 1:*
+implement { name = "xmlflushsetups", actions = lxml.flushsetups, arguments = { "string", "string", "string" } } -- 2:*
+implement { name = "xmlresetsetups", actions = lxml.resetsetups, arguments = "string" }
+
+implement { name = "xmlgetindex", actions = lxml.getindex, arguments = { "string", "string" } }
+implement { name = "xmlwithindex", actions = lxml.withindex, arguments = { "string", "string", "string" } }
+
+implement { name = "xmlsetentity", actions = xml.registerentity, arguments = { "string", "string" } }
+implement { name = "xmltexentity", actions = lxml.registerentity, arguments = { "string", "string" } }
+
+implement { name = "xmlsetcommandtotext", actions = lxml.setcommandtotext, arguments = "string" }
+implement { name = "xmlsetcommandtonone", actions = lxml.setcommandtonone, arguments = "string" }
+
+implement { name = "xmlstarttiming", actions = function() statistics.starttiming(lxml) end }
+implement { name = "xmlstoptiming", actions = function() statistics.stoptiming (lxml) end }
+
+implement { name = "xmlloadentities", actions = characters.registerentities, onceonly = true }
+
+-- kind of special (3rd argument is a function)
+
+commands.xmlsetfunction = lxml.setaction
diff --git a/Master/texmf-dist/tex/context/base/lxml-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lxml-ini.mkiv
index fab644fdb27..6fa14ddfc8b 100644
--- a/Master/texmf-dist/tex/context/base/lxml-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-ini.mkiv
@@ -26,84 +26,24 @@
\registerctxluafile{lxml-dir}{1.001} % ctx hacks
\registerctxluafile{lxml-ini}{1.001} % interface
-\unprotect % todo \!!bs \!!es where handy (slower)
+\unprotect
-% todo: { } mandate
-% avoid #
+% todo: { } mandate so that we can alias
+
+% undocumented:
\def\ctxlxml #1{\ctxlua{lxml.#1}}
-%def\xmlall #1#2{\clf_xmlall {#1}{#2}}
-%def\xmlatt #1#2{\clf_xmlatt {#1}{#2}}
-%def\xmlattdef #1#2#3{\clf_xmlattdef {#1}{#2}{#3}}
-%def\xmlattribute #1#2#3{\clf_xmlattribute {#1}{#2}{#3}}
-%def\xmlattributedef #1#2#3#4{\clf_xmlattributedef {#1}{#2}{#3}{#4}}
-%def\xmlchainatt #1#2{\clf_xmlchainatt {#1}{#2}}
-%def\xmlchainattdef #1#2#3{\clf_xmlchainattdef {#1}{#2}{#3}}
-%def\xmlrefatt #1#2{\clf_xmlrefatt {#1}{#2}}
-%def\xmlchecknamespace #1#2#3{\clf_xmlchecknamespace {#1}{#2}{#3}} % element
-%def\xmlcommand #1#2#3{\clf_xmlcommand {#1}{#2}{#3}}
+% for now indirect
+
\def\xmlconcat #1#2#3{\clf_xmlconcat {#1}{#2}{\detokenize{#3}}}
\def\xmlconcatrange #1#2#3#4#5{\clf_xmlconcatrange {#1}{#2}{#3}{#4}{\detokenize{#5}}}
-%def\xmlcontext #1#2{\clf_xmlcontext {#1}{#2}}
-%def\xmlcount #1#2{\clf_xmlcount {#1}{#2}}
-%def\xmldelete #1#2{\clf_xmldelete {#1}{#2}}
-%def\xmldirect #1{\clf_xmldirect {#1}} % in loops, not dt but root
-%def\xmldirectives #1{\clf_xmldirectives {#1}}
-%def\xmldirectivesafter #1{\clf_xmldirectivesafter {#1}}
-%def\xmldirectivesbefore #1{\clf_xmldirectivesbefore {#1}}
-%def\xmldisplayverbatim #1{\clf_xmldisplayverbatim {#1}}
-%def\xmlelement #1#2{\clf_xmlelement {#1}{#2}}
-%def\xmlfilter #1#2{\clf_xmlfilter {#1}{#2}}
-%def\xmlfilterlist #1#2{\clf_xmlfilterlist {#1}{#2}}
-%def\xmlfirst #1#2{\clf_xmlfirst {#1}{#2}}
-%def\xmlflush #1{\clf_xmlflush {#1}}
-%def\xmlflushcontext #1{\clf_xmlflushcontext {#1}}
-%def\xmlflushlinewise #1{\clf_xmlflushlinewise {#1}}
-%def\xmlflushspacewise #1{\clf_xmlflushspacewise {#1}}
-%def\xmlfunction #1#2{\clf_xmlfunction {#1}{#2}}
-%def\xmlinclude #1#2#3{\clf_xmlinclude {#1}{#2}{#3}}
-%def\xmlincludeoptions#1#2#3#4{\clf_xmlincludeoptions {#1}{#2}{#3}{#4}}
-%def\xmlinclusion #1{\clf_xmlinclusion {#1}}
-%def\xmlinclusions #1{\clf_xmlinclusions {#1}}
-%def\xmlbadinclusions #1{\clf_xmlbadinclusions {#1}}
-%def\xmlindex #1#2#3{\clf_xmlindex {#1}{#2}{#3}}
-%let\xmlposition \xmlindex
-%def\xmlinlineverbatim #1{\clf_xmlinlineverbatim {#1}}
-%def\xmllast #1#2{\clf_xmllast {#1}{#2}}
-\def\xmlload #1#2{\clf_xmlload {#1}{#2}{\directxmlparameter\c!entities}{\directxmlparameter\c!compress}}
-\def\xmlloadbuffer #1#2{\clf_xmlloadbuffer {#1}{#2}{\directxmlparameter\c!entities}{\directxmlparameter\c!compress}}
-\def\xmlloaddata #1#2{\clf_xmlloaddata {#1}{#2}{\directxmlparameter\c!entities}{\directxmlparameter\c!compress}}
-%def\xmlloaddirectives #1{\clf_xmlloaddirectives {#1}}
-\def\xmlloadregistered #1#2{\clf_xmlloadregistered {#1}{\directxmlparameter\c!entities}{\directxmlparameter\c!compress}}
-%def\xmlmain #1{\clf_xmlmain {#1}}
-%def\xmlmatch #1{\clf_xmlmatch {#1}}
-%def\xmlname #1{\clf_xmlname {#1}}
-%def\xmlnamespace #1{\clf_xmlnamespace {#1}}
-%def\xmlnonspace #1#2{\clf_xmlnonspace {#1}{#2}}
-%def\xmlpos #1{\clf_xmlpos {#1}}
-%def\xmlraw #1#2{\clf_xmlraw {#1}{#2}}
-%def\xmlregisterns #1#2{\clf_xmlregisterns {#1}{#2}} % document
-%def\xmlremapname #1#2#3#4{\clf_xmlremapname {#1}{#2}{#3}{#4}} % element
-%def\xmlremapnamespace #1#2#3{\clf_xmlremapnamespace {#1}{#2}{#3}} % document
-%def\xmlsave #1#2{\clf_xmlsave {#1}{#2}}
-%def\xmlsetfunction #1#2#3{\clf_xmlsetfunction {#1}{#2}{#3}}
-%def\xmlsetsetup #1#2#3{\clf_xmlsetsetup {#1}{#2}{#3}}
-%def\xmlsnippet #1#2{\clf_xmlsnippet {#1}{#2}}
-%def\xmlstrip #1#2{\clf_xmlstrip {#1}{#2}}
-%def\xmlstripanywhere #1#2{\clf_xmlstripanywhere {#1}{#2}}
-%def\xmlstripnolines #1#2{\clf_xmlstripnolines {#1}{#2}}
-%def\xmlstripped #1#2{\clf_xmlstripped {#1}{#2}}
-%def\xmlstrippednolines #1#2{\clf_xmlstrippednolines {#1}{#2}}
-%def\xmltag #1{\clf_xmltag {#1}}
-%def\xmltext #1#2{\clf_xmltext {#1}{#2}}
-%def\xmltobuffer #1#2#3{\clf_xmltobuffer {#1}{#2}{#3}} % id pattern name
-%def\xmltobufferverbose #1#2#3{\clf_xmltobufferverbose {#1}{#2}{#3}} % id pattern name
-%def\xmltofile #1#2#3{\clf_xmltofile {#1}{#2}{#3}} % id pattern filename
-%def\xmltoparameters #1{\clf_xmltoparameters {#1}}
-%def\xmlverbatim #1{\clf_xmlverbatim {#1}}
-
-% experiment:
+\def\xmlload #1#2{\clf_xmlload {#1}{#2}{\directxmlparameter\c!compress}}
+\def\xmlloadbuffer #1#2{\clf_xmlloadbuffer {#1}{#2}{\directxmlparameter\c!compress}}
+\def\xmlloaddata #1#2{\clf_xmlloaddata {#1}{#2}{\directxmlparameter\c!compress}}
+
+% aliased
+
\let\xmlall \clf_xmlall
\let\xmlatt \clf_xmlatt
\let\xmlattdef \clf_xmlattdef
@@ -111,11 +51,8 @@
\let\xmlattributedef \clf_xmlattributedef
\let\xmlchainatt \clf_xmlchainatt
\let\xmlchainattdef \clf_xmlchainattdef
-\let\xmlrefatt \clf_xmlrefatt
\let\xmlchecknamespace \clf_xmlchecknamespace
\let\xmlcommand \clf_xmlcommand
-% \xmlconcat
-% \xmlconcatrange
\let\xmlcontext \clf_xmlcontext
\let\xmlcount \clf_xmlcount
\let\xmldelete \clf_xmldelete
@@ -131,7 +68,9 @@
\let\xmlflush \clf_xmlflush
\let\xmlflushcontext \clf_xmlflushcontext
\let\xmlflushlinewise \clf_xmlflushlinewise
+\let\xmlflushpure \clf_xmlflushpure
\let\xmlflushspacewise \clf_xmlflushspacewise
+\let\xmlflushtext \clf_xmlflushtext
\let\xmlfunction \clf_xmlfunction
\let\xmlinclude \clf_xmlinclude
\let\xmlincludeoptions \clf_xmlincludeoptions
@@ -139,26 +78,26 @@
\let\xmlinclusions \clf_xmlinclusions
\let\xmlbadinclusions \clf_xmlbadinclusions
\let\xmlindex \clf_xmlindex
-\let\xmlposition \clf_xmlindex
\let\xmlinlineverbatim \clf_xmlinlineverbatim
\let\xmllast \clf_xmllast
-% \xmlload
-% \xmlloadbuffer
-% \xmlloaddata
+\let\xmllastatt \clf_xmllastatt
+\let\xmllastmatch \clf_xmllastmatch
\let\xmlloaddirectives \clf_xmlloaddirectives
-% \xmlloadregistered
\let\xmlmain \clf_xmlmain
\let\xmlmatch \clf_xmlmatch
\let\xmlname \clf_xmlname
\let\xmlnamespace \clf_xmlnamespace
\let\xmlnonspace \clf_xmlnonspace
+\let\xmlpath \clf_xmlpath
\let\xmlpos \clf_xmlpos
+\let\xmlposition \clf_xmlindex
+\let\xmlpure \clf_xmlpure
\let\xmlraw \clf_xmlraw
+\let\xmlrefatt \clf_xmlrefatt
\let\xmlregisterns \clf_xmlregisterns % document
\let\xmlremapname \clf_xmlremapname % element
\let\xmlremapnamespace \clf_xmlremapnamespace % document
\let\xmlsave \clf_xmlsave
-%let\xmlsetfunction \clf_xmlsetfunction
\let\xmlsetsetup \clf_xmlsetsetup
\let\xmlsnippet \clf_xmlsnippet
\let\xmlstrip \clf_xmlstrip
@@ -174,12 +113,17 @@
\let\xmltoparameters \clf_xmltoparameters
\let\xmlverbatim \clf_xmlverbatim
-\def\xmlinfo #1{\hbox{\ttxx[\clf_xmlinfo{#1}]}}
-\def\xmlshow #1{\startpacked\ttx\xmlverbatim{#1}\stoppacked}
+\unexpanded\def\xmlinfo #1{\hbox{\ttxx[\clf_xmlname{#1}]}}
+\unexpanded\def\xmlshow #1{\startpacked\ttx\xmlverbatim{#1}\stoppacked}
+
+% the next one is handy for mode runs because it enforces a consistent
+% #1 indexing (needed when using \xmltext{main:123}{...} like calls
+
+\let\xmladdindex \clf_xmladdindex
% we need to pass the last argument as function, so
-\def\xmlsetfunction#1#2#3{\ctxcommand{xmlsetfunction("#1",\!!bs#2\!!es,#3)}}
+\unexpanded\def\xmlsetfunction#1#2#3{\ctxcommand{xmlsetfunction("#1",\!!bs#2\!!es,#3)}}
% goodie:
@@ -193,12 +137,12 @@
% kind of special:
-%def\xmlstartraw{\clf_xmlstartraw}
-%def\xmlstopraw {\clf_xmlstopraw}
-
\let\xmlstartraw\clf_xmlstartraw
\let\xmlstopraw \clf_xmlstopraw
+\let\startxmlraw\clf_xmlstartraw
+\let\stopxmlraw \clf_xmlstopraw
+
% these are expandable! todo: \xmldoifelseattribute
\let\xmldoif \clf_xmldoif
@@ -225,34 +169,30 @@
%
% \xmlprependsetup{xml:include}
-\let\xmlgrab\xmlsetsetup % obsolete
-\let\xmlself\s!unknown % obsolete
+% \let\xmlgrab\xmlsetsetup % obsolete
+% \let\xmlself\s!unknown % obsolete
-%\ef\xmlsetup#1#2{\setupwithargument{#2}{#1}}
\let\xmlsetup\setupwithargumentswapped
-
-\let\xmls\setupwithargumentswapped % hardly any faster
-\let\xmlw\setupwithargument % hardly any faster
-
-\newtoks \registeredxmlsetups
+\let\xmls \setupwithargumentswapped % hardly any faster
+\let\xmlw \setupwithargument % hardly any faster
% todo: 1:xml:whatever always before 3:xml:something
-\unexpanded\def\xmlprependsetup #1{\clf_xmlprependsetup {*}{#1}}
-\unexpanded\def\xmlappendsetup #1{\clf_xmlappendsetup {*}{#1}}
-\unexpanded\def\xmlbeforesetup #1#2{\clf_xmlbeforesetup {*}{#1}{#2}}
-\unexpanded\def\xmlaftersetup #1#2{\clf_xmlaftersetup {*}{#1}{#2}}
-
-\unexpanded\def\xmlprependdocumentsetup #1#2{\clf_xmlprependdocumentsetup{#1}{#2}}
-\unexpanded\def\xmlappenddocumentsetup #1#2{\clf_xmlappenddocumentsetup {#1}{#2}}
-\unexpanded\def\xmlbeforedocumentsetup #1#2#3{\clf_xmlbeforedocumentsetup {#1}{#2}{#3}}
-\unexpanded\def\xmlafterdocumentsetup #1#2#3{\clf_xmlafterdocumentsetup {#1}{#2}{#3}}
+\unexpanded\def\xmlprependsetup #1{\clf_xmlprependsetup{*}{#1}}
+\unexpanded\def\xmlappendsetup #1{\clf_xmlappendsetup {*}{#1}}
+\unexpanded\def\xmlbeforesetup #1#2{\clf_xmlbeforesetup {*}{#1}{#2}}
+\unexpanded\def\xmlaftersetup #1#2{\clf_xmlaftersetup {*}{#1}{#2}}
+\unexpanded\def\xmlremovesetup #1{\clf_xmlremovesetup {*}{#1}}
+\unexpanded\def\xmlresetsetups {\clf_xmlresetsetups {*}}
-\unexpanded\def\xmlremovesetup #1{\clf_xmlremovesetup {*}{#1}}
-\unexpanded\def\xmlremovedocumentsetup #1#2{\clf_xmlremovedocumentsetup {#1}{#2}}
+\unexpanded\def\xmlprependdocumentsetup #1#2{\clf_xmlprependsetup{#1}{#2}}
+\unexpanded\def\xmlappenddocumentsetup #1#2{\clf_xmlappendsetup {#1}{#2}}
+\unexpanded\def\xmlbeforedocumentsetup #1#2#3{\clf_xmlbeforesetup {#1}{#2}{#3}}
+\unexpanded\def\xmlafterdocumentsetup #1#2#3{\clf_xmlaftersetup {#1}{#2}{#3}}
+\unexpanded\def\xmlremovedocumentsetup #1#2{\clf_xmlremovesetup {#1}{#2}}
+\unexpanded\def\xmlresetdocumentsetups #1{\clf_xmlresetsetups {#1}}
-\unexpanded\def\xmlflushdocumentsetups #1#2{\clf_xmlflushdocumentsetups {#1}{*}{#2}} % #1 == id where to apply * and #2
-\unexpanded\def\xmlresetdocumentsetups #1{\clf_xmlresetdocumentsetups {#1}}
+\unexpanded\def\xmlflushdocumentsetups #1#2{\clf_xmlflushsetups {#1}{*}{#2}} % #1 == id where to apply * and #2
\let\xmlregistersetup \xmlappendsetup
\let\xmlregisterdocumentsetup\xmlappenddocumentsetup
@@ -272,8 +212,8 @@
\xmldefaulttotext{#1}% after include
\xmlstoptiming}
-\unexpanded\def\xmlstarttiming{\clf_xmlstarttiming}
-\unexpanded\def\xmlstoptiming {\clf_xmlstoptiming}
+\unexpanded\def\xmlstarttiming{\clf_xmlstarttiming} % undocumented
+\unexpanded\def\xmlstoptiming {\clf_xmlstoptiming} % undocumented
\def\lxml_process#1#2#3#4#5% flag \loader id name what initializersetup
{\begingroup
@@ -290,7 +230,6 @@
\unexpanded\def\xmlprocessfile {\lxml_process\plusone \xmlload}
\unexpanded\def\xmlprocessdata {\lxml_process\zerocount\xmlloaddata}
\unexpanded\def\xmlprocessbuffer {\lxml_process\zerocount\xmlloadbuffer}
-\unexpanded\def\xmlprocessregistered{\lxml_process\zerocount\xmlloadregistered}
\let\xmlprocess \xmlprocessfile
\startxmlsetups xml:flush
@@ -306,24 +245,22 @@
{\xmlload{#1}{#2}%
\xmlregistereddocumentsetups{#1}{#3}}
-% beware: \xmlmain takes the real root, so also processing
-% instructions preceding the root element; well, in some
-% sense that is the root
-
-\unexpanded\def\xmlconnect#1#2#3% inefficient
- {\scratchcounter\xmlcount{#1}{#2}\relax
- \ifcase\scratchcounter \or
- \xmlall{#1}{#2}%
- \else
- \dorecurse \scratchcounter
- {\ifnum\recurselevel>\plusone#3\fi
- \xmlidx{#1}{#2}\recurselevel}%
- \fi}
+% replaced by concat
+%
+% \unexpanded\def\xmlconnect#1#2#3% inefficient
+% {\scratchcounter\xmlcount{#1}{#2}\relax
+% \ifcase\scratchcounter \or
+% \xmlall{#1}{#2}%
+% \else
+% \dorecurse \scratchcounter
+% {\ifnum\recurselevel>\plusone#3\fi
+% \xmlidx{#1}{#2}\recurselevel}%
+% \fi}
\unexpanded\def\xmlcdataobeyedline {\obeyedline}
\unexpanded\def\xmlcdataobeyedspace{\strut\obeyedspace}
-\unexpanded\def\xmlcdatabefore {\bgroup\tt}
-\unexpanded\def\xmlcdataafter {\egroup}
+\unexpanded\def\xmlcdatabefore {\begingroup\tt}
+\unexpanded\def\xmlcdataafter {\endgroup}
% verbatim (dodo:pre/post whitespace, maybe splot verbatim and
% cdata commands), experimental:
@@ -337,41 +274,41 @@
%
% this is experimental!
-\unexpanded\def\startxmldisplayverbatim[#1]%
- {\startpacked % \begingroup
- \edef\currenttyping{xml:#1}%
+\unexpanded\def\startxmldisplayverbatim
+ {\dosingleempty\lxml_start_display_verbatim}
+
+\def\lxml_start_display_verbatim[#1]%
+ {\startpacked
+ \edef\currenttyping{#1}%
+ \ifx\currenttyping\empty
+ \let\currenttyping\v!typing
+ \else % maybe test for existence
+ \edef\currenttyping{xml:\currenttyping}%
+ \fi
\unexpanded\def\stopxmldisplayverbatim
{\endofverbatimlines
- \stoppacked} % \endgroup
+ \stoppacked}
\doinitializeverbatim
\beginofverbatimlines}
-\unexpanded\def\startxmlinlineverbatim[#1]%
+\unexpanded\def\startxmlinlineverbatim
+ {\dosingleempty\lxml_start_inline_verbatim}
+
+\unexpanded\def\lxml_start_inline_verbatim[#1]%
{\begingroup
- \edef\currenttype{xml:#1}%
+ \edef\currenttype{#1}%
+ \ifx\currenttype\empty
+ \let\currenttype\v!type
+ \else % maybe test for existence
+ \edef\currenttype{xml:\currenttype}%
+ \fi
\let\stopxmlinlineverbatim\endgroup
\doinitializeverbatim}
-% will move but is developed for xml
-
-\newtoks \collectingtoks
-
-\unexpanded\def\startcollect#1\stopcollect
- {\collectingtoks\@EA{\the\collectingtoks#1}}
-
-\unexpanded\def\startexpandedcollect#1\stopexpandedcollect
- {\normalexpanded{\collectingtoks{\the\collectingtoks#1}}}
-
-\unexpanded\def\startcollecting{\collectingtoks\emptytoks}
-\unexpanded\def\stopcollecting {\the\collectingtoks}
-
-\def\inlinemessage #1{\dontleavehmode{\tttf#1}}
-\def\displaymessage#1{\blank\inlinemessage{#1}\blank}
-
% processing instructions
\unexpanded\def\xmlinstalldirective#1#2%
- {\clf_xmlinstalldirective{#1}{\checkedstrippedcsname#2}}
+ {\clf_xmlinstalldirective{#1}{\csstring#2}}
% \def\xmlcontextdirective#1% kind class key value
% {\executeifdefined{xml#1directive}\gobblethreearguments}
@@ -399,13 +336,13 @@
\unexpanded\def\xmldefaulttotext
{\ifcase\xmlprocessingmode
- \expandafter\gobbleoneargument % unset
+ \expandafter\gobbleoneargument % 0 (none)
\or
- \expandafter\clf_xmlsetcommandtotext % 1
+ \expandafter\clf_xmlsetcommandtotext % 1 (normal)
\or
- \expandafter\clf_xmlsetcommandtonone % 2
+ \expandafter\clf_xmlsetcommandtonone % 2 (hidden)
\else
- \expandafter\gobbleoneargument % unset
+ \expandafter\gobbleoneargument % (none)
\fi}
\appendtoks
@@ -415,13 +352,29 @@
\setupxml
[\c!default=, % flush all
\c!compress=\v!no, % strip comment
- \c!entities=\v!yes] % replace entities
+ \c!entities=\v!no] % load big entity file
+
+\appendtoks
+ \doif{\directxmlparameter\c!entities}\clf_xmlloadentities
+\to \everysetupxml
\def\xmlmapvalue #1#2#3{\setvalue{\??xmlmapvalue#1:#2}{#3}} % keep #3 to grab spaces
-\def\xmlvalue #1#2#3{\executeifdefined{\??xmlmapvalue#1:#2}{#3}}
-%def\xmlvalue #1#2{\ifcsname\??xmlmapvalue#1:#2\endcsname\csname\??xmlmapvalue#1:#2\expandafter\expandafter\gobbleoneargument\expandafter\endcsname\else\expandafter\firstofoneargument\fi}
\def\xmldoifelsevalue #1#2{\ifcsname\??xmlmapvalue#1:#2\endcsname\expandafter\firstoftwoarguments\else\expandafter\secondoftwoarguments\fi}
+\def\xmlvalue#1#2% #3
+ {\ifcsname\??xmlmapvalue#1:#2\endcsname
+ \expandafter\expandafter\expandafter\lastnamedcs\expandafter\gobbleoneargument
+ \else
+ \expandafter\firstofoneargument
+ \fi}
+
+\def\xmlmappedvalue#1#2#3%
+ {\ifcsname\??xmlmapvalue#1:#2\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \csname\??xmlmapvalue#1:#3\expandafter\endcsname
+ \fi}
+
\let\xmldoifvalueelse\xmldoifelsevalue
\let\xmlmapval\xmlmapvalue
@@ -433,14 +386,18 @@
\def\xmlwithindex #1#2{\clf_xmlwithindex{\xmldocument}{#1}{#2}}
\def\xmlreference #1#2{\string\xmlwithindex{#1}{#2}}
-%D Entities (might change):
-
-\setnewconstant\xmlautoentities\plusone % 0=off, 1=upper, 2=upper,lower
+%D Entities:
+%D
+%D \starttyping
+%D \xmlsetentity{tex}{\TEX{}} % {} needed
+%D \stoptyping
\unexpanded\def\xmlsetentity#1#2{\clf_xmlsetentity{#1}{\detokenize{#2}}}
\unexpanded\def\xmltexentity#1#2{\clf_xmltexentity{#1}{\detokenize{#2}}}
-% \xmlsetentity{tex}{\TEX{}} % {} needed
+%D The following might change (or even disappear) so we keep it undocumented.
+
+\setnewconstant\xmlautoentities\plusone % 0=off, 1=upper, 2=upper,lower
\unexpanded\def\xmle
{\ifcase\xmlautoentities
@@ -472,7 +429,24 @@
#1%
\fi\fi}
-% handy helpers (analogue to MP and LUA and TEX and also MkII)
+% \def\lxml_e_upper#1#2% can be abbreviation
+% {\ifcsname\detokenize{#2}\endcsname
+% \lastnamedcs
+% \else
+% \detokenize{#1}%
+% \fi}
+
+% \def\lxml_e_upperlower#1#2% can be anything, so unsafe
+% {\ifcsname\detokenize{#2}\endcsname
+% \expandafter\lastnamedcs
+% \else\ifcsname\detokenize{#1}\endcsname
+% \doubleexpandafter\lastnamedcs
+% \else
+% \detokenize{#1}%
+% \fi\fi}
+
+%D We keep these around as there are also MP, LUA and TEX variants but
+%D they are not the same as in \MKII.
\unexpanded\def\processXMLbuffer
{\dosingleempty\lxml_process_buffer}
@@ -496,10 +470,30 @@
\unexpanded\def\xmlresetinjectors
{\clf_xmlresetinjectors{}}
-\def\xmlinjector#1{\executeifdefined{#1}\donothing}
+% \def\xmlinjector#1{\executeifdefined{#1}\donothing}
+
+\def\xmlinjector#1{\fastsetup{xml:directive:injector:#1}}
+
+\startsetups xml:directive:injector:page
+ \page
+\stopsetups
+
+\startsetups xml:directive:injector:column
+ \column
+\stopsetups
+
+\startsetups xml:directive:injector:blank
+ \blank
+\stopsetups
+
+\startsetups xml:directive:injector:noline
+ \vskip-\lineheight
+\stopsetups
\let\xmlapplyselectors\clf_xmlapplyselectors
+% \let\xmlcatcodes\notcatcodes
+
\protect \endinput
% \newcount\charactersactiveoffset \charactersactiveoffset="10000
diff --git a/Master/texmf-dist/tex/context/base/lxml-lpt.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-lpt.lua
index decb6567bf5..b722fc318bc 100644
--- a/Master/texmf-dist/tex/context/base/lxml-lpt.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-lpt.lua
@@ -43,11 +43,24 @@ a/b/c/text() a/b/c/text(1) a/b/c/text(-1) a/b/c/text(n)
</typing>
--ldx]]--
-local trace_lpath = false if trackers then trackers.register("xml.path", function(v) trace_lpath = v end) end
-local trace_lparse = false if trackers then trackers.register("xml.parse", function(v) trace_lparse = v end) end
-local trace_lprofile = false if trackers then trackers.register("xml.profile", function(v) trace_lpath = v trace_lparse = v trace_lprofile = v end) end
-
-local report_lpath = logs.reporter("xml","lpath")
+local trace_lpath = false
+local trace_lparse = false
+local trace_lprofile = false
+local report_lpath = logs.reporter("xml","lpath")
+
+if trackers then
+ trackers.register("xml.path", function(v)
+ trace_lpath = v
+ end)
+ trackers.register("xml.parse", function(v)
+ trace_lparse = v
+ end)
+ trackers.register("xml.profile", function(v)
+ trace_lpath = v
+ trace_lparse = v
+ trace_lprofile = v
+ end)
+end
--[[ldx--
<p>We've now arrived at an interesting part: accessing the tree using a subset
@@ -518,27 +531,49 @@ local lp_doequal = P("=") / "=="
local lp_or = P("|") / " or "
local lp_and = P("&") / " and "
-local lp_builtin = P (
- P("text") / "(ll.dt[1] or '')" + -- fragile
- P("content") / "ll.dt" +
- -- P("name") / "(ll.ns~='' and ll.ns..':'..ll.tg)" +
- P("name") / "((ll.ns~='' and ll.ns..':'..ll.tg) or ll.tg)" +
- P("tag") / "ll.tg" +
- P("position") / "l" + -- is element in finalizer
- P("firstindex") / "1" +
- P("lastindex") / "(#ll.__p__.dt or 1)" +
- P("firstelement") / "1" +
- P("lastelement") / "(ll.__p__.en or 1)" +
- P("first") / "1" +
- P("last") / "#list" +
- P("rootposition") / "order" +
- P("order") / "order" +
- P("element") / "(ll.ei or 1)" +
- P("index") / "(ll.ni or 1)" +
- P("match") / "(ll.mi or 1)" +
- -- P("namespace") / "ll.ns" +
- P("ns") / "ll.ns"
- ) * ((spaces * P("(") * spaces * P(")"))/"")
+-- local lp_builtin = (
+-- P("text") / "(ll.dt[1] or '')" + -- fragile
+-- P("content") / "ll.dt" +
+-- P("name") / "((ll.ns~='' and ll.ns..':'..ll.tg) or ll.tg)" +
+-- P("tag") / "ll.tg" +
+-- P("position") / "l" + -- is element in finalizer
+-- P("firstindex") / "1" +
+-- P("lastindex") / "(#ll.__p__.dt or 1)" +
+-- P("firstelement") / "1" +
+-- P("lastelement") / "(ll.__p__.en or 1)" +
+-- P("first") / "1" +
+-- P("last") / "#list" +
+-- P("rootposition") / "order" +
+-- P("order") / "order" +
+-- P("element") / "(ll.ei or 1)" +
+-- P("index") / "(ll.ni or 1)" +
+-- P("match") / "(ll.mi or 1)" +
+-- P("namespace") / "ll.ns" +
+-- P("ns") / "ll.ns"
+-- ) * ((spaces * P("(") * spaces * P(")"))/"")
+
+local builtin = {
+ text = "(ll.dt[1] or '')", -- fragile
+ content = "ll.dt",
+ name = "((ll.ns~='' and ll.ns..':'..ll.tg) or ll.tg)",
+ tag = "ll.tg",
+ position = "l", -- is element in finalizer
+ firstindex = "1",
+ firstelement = "1",
+ first = "1",
+ lastindex = "(#ll.__p__.dt or 1)",
+ lastelement = "(ll.__p__.en or 1)",
+ last = "#list",
+ rootposition = "order",
+ order = "order",
+ element = "(ll.ei or 1)",
+ index = "(ll.ni or 1)",
+ match = "(ll.mi or 1)",
+ namespace = "ll.ns",
+ ns = "ll.ns",
+}
+
+local lp_builtin = lpeg.utfchartabletopattern(builtin)/builtin * ((spaces * P("(") * spaces * P(")"))/"")
-- for the moment we keep namespaces with attributes
@@ -637,6 +672,7 @@ local template_f_n = [[
--
+local register_last_match = { kind = "axis", axis = "last-match" } -- , apply = apply_axis["self"] }
local register_self = { kind = "axis", axis = "self" } -- , apply = apply_axis["self"] }
local register_parent = { kind = "axis", axis = "parent" } -- , apply = apply_axis["parent"] }
local register_descendant = { kind = "axis", axis = "descendant" } -- , apply = apply_axis["descendant"] }
@@ -737,21 +773,41 @@ local pathparser = Ct { "patterns", -- can be made a bit faster by moving some p
protocol = Cg(V("letters"),"protocol") * P("://") + Cg(Cc(nil),"protocol"),
-- the / is needed for // as descendant or self is somewhat special
+ --
-- step = (V("shortcuts") + V("axis") * spaces * V("nodes")^0 + V("error")) * spaces * V("expressions")^0 * spaces * V("finalizer")^0,
step = ((V("shortcuts") + P("/") + V("axis")) * spaces * V("nodes")^0 + V("error")) * spaces * V("expressions")^0 * spaces * V("finalizer")^0,
- axis = V("descendant") + V("child") + V("parent") + V("self") + V("root") + V("ancestor") +
- V("descendant_or_self") + V("following_sibling") + V("following") +
- V("reverse_sibling") + V("preceding_sibling") + V("preceding") + V("ancestor_or_self") +
- #(1-P(-1)) * Cc(register_auto_child),
-
- special = special_1 + special_2 + special_3,
+ axis = V("last_match")
+ + V("descendant")
+ + V("child")
+ + V("parent")
+ + V("self")
+ + V("root")
+ + V("ancestor")
+ + V("descendant_or_self")
+ + V("following_sibling")
+ + V("following")
+ + V("reverse_sibling")
+ + V("preceding_sibling")
+ + V("preceding")
+ + V("ancestor_or_self")
+ + #(1-P(-1)) * Cc(register_auto_child),
+
+ special = special_1
+ + special_2
+ + special_3,
initial = (P("/") * spaces * Cc(register_initial_child))^-1,
error = (P(1)^1) / register_error,
- shortcuts_a = V("s_descendant_or_self") + V("s_descendant") + V("s_child") + V("s_parent") + V("s_self") + V("s_root") + V("s_ancestor"),
+ shortcuts_a = V("s_descendant_or_self")
+ + V("s_descendant")
+ + V("s_child")
+ + V("s_parent")
+ + V("s_self")
+ + V("s_root")
+ + V("s_ancestor"),
shortcuts = V("shortcuts_a") * (spaces * "/" * spaces * V("shortcuts_a"))^0,
@@ -763,6 +819,8 @@ local pathparser = Ct { "patterns", -- can be made a bit faster by moving some p
s_root = P("^^") * Cc(register_root ),
s_ancestor = P("^") * Cc(register_ancestor ),
+ -- we can speed this up when needed but we cache anyway so ...
+
descendant = P("descendant::") * Cc(register_descendant ),
child = P("child::") * Cc(register_child ),
parent = P("parent::") * Cc(register_parent ),
@@ -778,6 +836,7 @@ local pathparser = Ct { "patterns", -- can be made a bit faster by moving some p
preceding = P('preceding::') * Cc(register_preceding ),
preceding_sibling = P('preceding-sibling::') * Cc(register_preceding_sibling ),
reverse_sibling = P('reverse-sibling::') * Cc(register_reverse_sibling ),
+ last_match = P('last-match::') * Cc(register_last_match ),
nodes = (V("nodefunction") * spaces * P("(") * V("nodeset") * P(")") + V("nodetest") * V("nodeset")) / register_nodes,
@@ -837,14 +896,12 @@ xml.nodesettostring = nodesettostring
local lpath -- we have a harmless kind of circular reference
-local lshowoptions = { functions = false }
-
local function lshow(parsed)
if type(parsed) == "string" then
parsed = lpath(parsed)
end
report_lpath("%s://%s => %s",parsed.protocol or xml.defaultprotocol,parsed.pattern,
- table.serialize(parsed,false,lshowoptions))
+ table.serialize(parsed,false))
end
xml.lshow = lshow
@@ -933,146 +990,194 @@ xml.lpath = lpath
-- can be cases that a finalizer returns (or does) something in case
-- there is no match; an example of this is count()
-local profiled = { } xml.profiled = profiled
+do
-local function profiled_apply(list,parsed,nofparsed,order)
- local p = profiled[parsed.pattern]
- if p then
- p.tested = p.tested + 1
- else
- p = { tested = 1, matched = 0, finalized = 0 }
- profiled[parsed.pattern] = p
+ local profiled = { }
+ xml.profiled = profiled
+ local lastmatch = nil -- we remember the last one .. drawback: no collection till new collect
+ local keepmatch = nil -- we remember the last one .. drawback: no collection till new collect
+
+ if directives then
+ directives.register("xml.path.keeplastmatch",function(v)
+ keepmatch = v
+ lastmatch = nil
+ end)
end
- local collected = list
- for i=1,nofparsed do
- local pi = parsed[i]
- local kind = pi.kind
- if kind == "axis" then
- collected = apply_axis[pi.axis](collected)
- elseif kind == "nodes" then
- collected = apply_nodes(collected,pi.nodetest,pi.nodes)
- elseif kind == "expression" then
- collected = apply_expression(collected,pi.evaluator,order)
- elseif kind == "finalizer" then
- collected = pi.finalizer(collected) -- no check on # here
- p.matched = p.matched + 1
- p.finalized = p.finalized + 1
- return collected
+
+ apply_axis["last-match"] = function()
+ return lastmatch or { }
+ end
+
+ local function profiled_apply(list,parsed,nofparsed,order)
+ local p = profiled[parsed.pattern]
+ if p then
+ p.tested = p.tested + 1
+ else
+ p = { tested = 1, matched = 0, finalized = 0 }
+ profiled[parsed.pattern] = p
end
- if not collected or #collected == 0 then
- local pn = i < nofparsed and parsed[nofparsed]
- if pn and pn.kind == "finalizer" then
- collected = pn.finalizer(collected)
+ local collected = list
+ for i=1,nofparsed do
+ local pi = parsed[i]
+ local kind = pi.kind
+ if kind == "axis" then
+ collected = apply_axis[pi.axis](collected)
+ elseif kind == "nodes" then
+ collected = apply_nodes(collected,pi.nodetest,pi.nodes)
+ elseif kind == "expression" then
+ collected = apply_expression(collected,pi.evaluator,order)
+ elseif kind == "finalizer" then
+ collected = pi.finalizer(collected) -- no check on # here
+ p.matched = p.matched + 1
p.finalized = p.finalized + 1
return collected
end
- return nil
+ if not collected or #collected == 0 then
+ local pn = i < nofparsed and parsed[nofparsed]
+ if pn and pn.kind == "finalizer" then
+ collected = pn.finalizer(collected) -- collected can be nil
+ p.finalized = p.finalized + 1
+ return collected
+ end
+ return nil
+ end
end
+ if collected then
+ p.matched = p.matched + 1
+ end
+ return collected
end
- if collected then
- p.matched = p.matched + 1
- end
- return collected
-end
-local function traced_apply(list,parsed,nofparsed,order)
- if trace_lparse then
- lshow(parsed)
- end
- report_lpath("collecting: %s",parsed.pattern)
- report_lpath("root tags : %s",tagstostring(list))
- report_lpath("order : %s",order or "unset")
- local collected = list
- for i=1,nofparsed do
- local pi = parsed[i]
- local kind = pi.kind
- if kind == "axis" then
- collected = apply_axis[pi.axis](collected)
- report_lpath("% 10i : ax : %s",(collected and #collected) or 0,pi.axis)
- elseif kind == "nodes" then
- collected = apply_nodes(collected,pi.nodetest,pi.nodes)
- report_lpath("% 10i : ns : %s",(collected and #collected) or 0,nodesettostring(pi.nodes,pi.nodetest))
- elseif kind == "expression" then
- collected = apply_expression(collected,pi.evaluator,order)
- report_lpath("% 10i : ex : %s -> %s",(collected and #collected) or 0,pi.expression,pi.converted)
- elseif kind == "finalizer" then
- collected = pi.finalizer(collected)
- report_lpath("% 10i : fi : %s : %s(%s)",(type(collected) == "table" and #collected) or 0,parsed.protocol or xml.defaultprotocol,pi.name,pi.arguments or "")
- return collected
+ local function traced_apply(list,parsed,nofparsed,order)
+ if trace_lparse then
+ lshow(parsed)
end
- if not collected or #collected == 0 then
- local pn = i < nofparsed and parsed[nofparsed]
- if pn and pn.kind == "finalizer" then
- collected = pn.finalizer(collected)
- report_lpath("% 10i : fi : %s : %s(%s)",(type(collected) == "table" and #collected) or 0,parsed.protocol or xml.defaultprotocol,pn.name,pn.arguments or "")
+ report_lpath("collecting: %s",parsed.pattern)
+ report_lpath("root tags : %s",tagstostring(list))
+ report_lpath("order : %s",order or "unset")
+ local collected = list
+ for i=1,nofparsed do
+ local pi = parsed[i]
+ local kind = pi.kind
+ if kind == "axis" then
+ collected = apply_axis[pi.axis](collected)
+ report_lpath("% 10i : ax : %s",(collected and #collected) or 0,pi.axis)
+ elseif kind == "nodes" then
+ collected = apply_nodes(collected,pi.nodetest,pi.nodes)
+ report_lpath("% 10i : ns : %s",(collected and #collected) or 0,nodesettostring(pi.nodes,pi.nodetest))
+ elseif kind == "expression" then
+ collected = apply_expression(collected,pi.evaluator,order)
+ report_lpath("% 10i : ex : %s -> %s",(collected and #collected) or 0,pi.expression,pi.converted)
+ elseif kind == "finalizer" then
+ collected = pi.finalizer(collected)
+ report_lpath("% 10i : fi : %s : %s(%s)",(type(collected) == "table" and #collected) or 0,parsed.protocol or xml.defaultprotocol,pi.name,pi.arguments or "")
return collected
end
- return nil
+ if not collected or #collected == 0 then
+ local pn = i < nofparsed and parsed[nofparsed]
+ if pn and pn.kind == "finalizer" then
+ collected = pn.finalizer(collected)
+ report_lpath("% 10i : fi : %s : %s(%s)",(type(collected) == "table" and #collected) or 0,parsed.protocol or xml.defaultprotocol,pn.name,pn.arguments or "")
+ return collected
+ end
+ return nil
+ end
end
+ return collected
end
- return collected
-end
-local function normal_apply(list,parsed,nofparsed,order)
- local collected = list
- for i=1,nofparsed do
- local pi = parsed[i]
- local kind = pi.kind
- if kind == "axis" then
- local axis = pi.axis
- if axis ~= "self" then
- collected = apply_axis[axis](collected)
+ local function normal_apply(list,parsed,nofparsed,order)
+ local collected = list
+ for i=1,nofparsed do
+ local pi = parsed[i]
+ local kind = pi.kind
+ if kind == "axis" then
+ local axis = pi.axis
+ if axis ~= "self" then
+ collected = apply_axis[axis](collected)
+ end
+ elseif kind == "nodes" then
+ collected = apply_nodes(collected,pi.nodetest,pi.nodes)
+ elseif kind == "expression" then
+ collected = apply_expression(collected,pi.evaluator,order)
+ elseif kind == "finalizer" then
+ return pi.finalizer(collected)
end
- elseif kind == "nodes" then
- collected = apply_nodes(collected,pi.nodetest,pi.nodes)
- elseif kind == "expression" then
- collected = apply_expression(collected,pi.evaluator,order)
- elseif kind == "finalizer" then
- return pi.finalizer(collected)
- end
- if not collected or #collected == 0 then
- local pf = i < nofparsed and parsed[nofparsed].finalizer
- if pf then
- return pf(collected) -- can be anything
+ if not collected or #collected == 0 then
+ local pf = i < nofparsed and parsed[nofparsed].finalizer
+ if pf then
+ return pf(collected) -- can be anything
+ end
+ return nil
end
- return nil
end
+ return collected
end
- return collected
-end
-local function applylpath(list,pattern)
- if not list then
- return
- end
- local parsed = cache[pattern]
- if parsed then
- lpathcalls = lpathcalls + 1
- lpathcached = lpathcached + 1
- elseif type(pattern) == "table" then
- lpathcalls = lpathcalls + 1
- parsed = pattern
- else
- parsed = lpath(pattern) or pattern
- end
- if not parsed then
- return
+ local apply = normal_apply
+
+ if trackers then
+ -- local function check()
+ -- if trace_lprofile or then
+ -- apply = profiled_apply
+ -- elseif trace_lpath then
+ -- apply = traced_apply
+ -- else
+ -- apply = normal_apply
+ -- end
+ -- end
+ -- trackers.register("xml.path", check) -- can be "xml.path,xml.parse,xml.profile
+ -- trackers.register("xml.parse", check)
+ -- trackers.register("xml.profile",check)
+
+ trackers.register("xml.path,xml.parse,xml.profile",function()
+ if trace_lprofile then
+ apply = profiled_apply
+ elseif trace_lpath then
+ apply = traced_apply
+ else
+ apply = normal_apply
+ end
+ end)
end
- local nofparsed = #parsed
- if nofparsed == 0 then
- return -- something is wrong
+
+
+ function xml.applylpath(list,pattern)
+ if not list then
+ lastmatch = nil
+ return
+ end
+ local parsed = cache[pattern]
+ if parsed then
+ lpathcalls = lpathcalls + 1
+ lpathcached = lpathcached + 1
+ elseif type(pattern) == "table" then
+ lpathcalls = lpathcalls + 1
+ parsed = pattern
+ else
+ parsed = lpath(pattern) or pattern
+ end
+ if not parsed then
+ lastmatch = nil
+ return
+ end
+ local nofparsed = #parsed
+ if nofparsed == 0 then
+ lastmatch = nil
+ return -- something is wrong
+ end
+ local collected = apply({ list },parsed,nofparsed,list.mi)
+ lastmatch = keepmatch and collected or nil
+ return collected
end
- if not trace_lpath then
- return normal_apply ({ list },parsed,nofparsed,list.mi)
- elseif trace_lprofile then
- return profiled_apply({ list },parsed,nofparsed,list.mi)
- else
- return traced_apply ({ list },parsed,nofparsed,list.mi)
+
+ function xml.lastmatch()
+ return lastmatch
end
-end
-xml.applylpath = applylpath -- takes a table as first argment, which is what xml.filter will do
+end
+local applylpath = xml.applylpath
--[[ldx--
<p>This is the main filter function. It returns whatever is asked for.</p>
--ldx]]--
@@ -1448,3 +1553,34 @@ function xml.finalizers.paragraphs(c)
end
return c
end
+
+-- local lpegmatch = lpeg.match
+-- local w = lpeg.patterns.whitespace
+-- local p = w^0 * lpeg.Cf(lpeg.Ct("") * lpeg.Cg(lpeg.C((1-w)^1) * lpeg.Cc(true) * w^0)^1,rawset)
+
+-- function xml.functions.classes(e) -- cache
+-- local class = e.at.class
+-- if class then
+-- return lpegmatch(p,class)
+-- else
+-- return { }
+-- end
+-- end
+
+-- local gmatch = string.gmatch
+
+-- function xml.functions.hasclass(e,c,class)
+-- class = class and e.at[class] or e.at.class
+-- if class and class ~= "" then
+-- if class == c then
+-- return true
+-- else
+-- for s in gmatch(class,"%S+") do
+-- if s == c then
+-- return true
+-- end
+-- end
+-- end
+-- end
+-- return false
+-- end
diff --git a/Master/texmf-dist/tex/context/base/lxml-mis.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-mis.lua
index 94a26b97414..94a26b97414 100644
--- a/Master/texmf-dist/tex/context/base/lxml-mis.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-mis.lua
diff --git a/Master/texmf-dist/tex/context/base/lxml-sor.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-sor.lua
index aba1c3b8d3f..aba1c3b8d3f 100644
--- a/Master/texmf-dist/tex/context/base/lxml-sor.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-sor.lua
diff --git a/Master/texmf-dist/tex/context/base/lxml-sor.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lxml-sor.mkiv
index 0d8eb6ba174..0d8eb6ba174 100644
--- a/Master/texmf-dist/tex/context/base/lxml-sor.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-sor.mkiv
diff --git a/Master/texmf-dist/tex/context/base/lxml-tab.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-tab.lua
index 510ba1bd44c..60d6262c7dd 100644
--- a/Master/texmf-dist/tex/context/base/lxml-tab.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-tab.lua
@@ -14,7 +14,7 @@ if not modules then modules = { } end modules ['lxml-tab'] = {
-- maybe when letter -> utf, else name .. then we need an option to the serializer .. a bit
-- of work so we delay this till we cleanup
-local trace_entities = false trackers.register("xml.entities", function(v) trace_entities = v end)
+local trace_entities = false trackers .register("xml.entities", function(v) trace_entities = v end)
local report_xml = logs and logs.reporter("xml","core") or function(...) print(string.format(...)) end
@@ -24,14 +24,6 @@ handles comment and processing instructions, has a different structure, provides
parent access; a first version used different trickery but was less optimized to we
went this route. First we had a find based parser, now we have an <l n='lpeg'/> based one.
The find based parser can be found in l-xml-edu.lua along with other older code.</p>
-
-<p>Beware, the interface may change. For instance at, ns, tg, dt may get more
-verbose names. Once the code is stable we will also remove some tracing and
-optimize the code.</p>
-
-<p>I might even decide to reimplement the parser using the latest <l n='lpeg'/> trickery
-as the current variant was written when <l n='lpeg'/> showed up and it's easier now to
-build tables in one go.</p>
--ldx]]--
if lpeg.setmaxstack then lpeg.setmaxstack(1000) end -- deeply nested xml files
@@ -44,6 +36,7 @@ local xml = xml
local concat, remove, insert = table.concat, table.remove, table.insert
local type, next, setmetatable, getmetatable, tonumber, rawset = type, next, setmetatable, getmetatable, tonumber, rawset
local lower, find, match, gsub = string.lower, string.find, string.match, string.gsub
+local sort = table.sort
local utfchar = utf.char
local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
local P, S, R, C, V, C, Cs = lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.V, lpeg.C, lpeg.Cs
@@ -57,10 +50,9 @@ find based solution where we loop over an array of patterns. Less code and
much cleaner.</p>
--ldx]]--
-xml.xmlns = xml.xmlns or { }
+do -- begin of namespace closure (we ran out of locals)
-local check = P(false)
-local parse = check
+xml.xmlns = xml.xmlns or { }
--[[ldx--
<p>The next function associates a namespace prefix with an <l n='url'/>. This
@@ -71,6 +63,9 @@ xml.registerns("mml","mathml")
</typing>
--ldx]]--
+local check = P(false)
+local parse = check
+
function xml.registerns(namespace, pattern) -- pattern can be an lpeg
check = check + C(P(lower(pattern))) / namespace
parse = P { P(check) + 1 * V(1) }
@@ -113,6 +108,8 @@ end
one efficiently by using the <t>xml.xmlns</t> table.</p>
--ldx]]--
+end -- end of namespace closure
+
--[[ldx--
<p>This version uses <l n='lpeg'/>. We follow the same approach as before, stack and top and
such. This version is about twice as fast which is mostly due to the fact that
@@ -158,24 +155,67 @@ element.</p>
local nsremap, resolvens = xml.xmlns, xml.resolvens
-local stack = { }
-local top = { }
-local dt = { }
-local at = { }
-local xmlns = { }
-local errorstr = nil
-local entities = { }
-local strip = false
-local cleanup = false
-local utfize = false
-local resolve_predefined = false
-local unify_predefined = false
-
-local dcache = { }
-local hcache = { }
-local acache = { }
-
-local mt = { }
+local stack, level, top, at, xmlnms, errorstr
+local entities, parameters
+local strip, utfize, resolve, cleanup, resolve_predefined, unify_predefined
+local dcache, hcache, acache
+local mt, dt, nt
+
+local function preparexmlstate(settings)
+ if settings then
+ stack = { }
+ level = 0
+ top = { }
+ at = { }
+ mt = { }
+ dt = { }
+ nt = 0 -- some 5% faster than #dt on cont-en.xml
+ xmlns = { }
+ errorstr = nil
+ strip = settings.strip_cm_and_dt
+ utfize = settings.utfize_entities
+ resolve = settings.resolve_entities -- enable this in order to apply the dtd
+ resolve_predefined = settings.resolve_predefined_entities -- in case we have escaped entities
+ unify_predefined = settings.unify_predefined_entities -- &#038; -> &amp;
+ cleanup = settings.text_cleanup
+ entities = settings.entities or { }
+ parameters = { }
+ reported_at_errors = { }
+ dcache = { }
+ hcache = { }
+ acache = { }
+ if utfize == nil then
+ settings.utfize_entities = true
+ utfize = true
+ end
+ if resolve_predefined == nil then
+ settings.resolve_predefined_entities = true
+ resolve_predefined = true
+ end
+ else
+ stack = nil
+ level = nil
+ top = nil
+ at = nil
+ mt = nil
+ dt = nil
+ nt = nil
+ xmlns = nil
+ errorstr = nil
+ strip = nil
+ utfize = nil
+ resolve = nil
+ resolve_predefined = nil
+ unify_predefined = nil
+ cleanup = nil
+ entities = nil
+ parameters = nil
+ reported_at_errors = nil
+ dcache = nil
+ hcache = nil
+ acache = nil
+ end
+end
local function initialize_mt(root)
mt = { __index = root } -- will be redefined later
@@ -189,8 +229,10 @@ function xml.checkerror(top,toclose)
return "" -- can be set
end
+local checkns = xml.checkns
+
local function add_attribute(namespace,tag,value)
- if cleanup and #value > 0 then
+ if cleanup and value ~= "" then
value = cleanup(value) -- new
end
if tag == "xmlns" then
@@ -199,7 +241,7 @@ local function add_attribute(namespace,tag,value)
elseif namespace == "" then
at[tag] = value
elseif namespace == "xmlns" then
- xml.checkns(tag,value)
+ checkns(tag,value)
at["xmlns:" .. tag] = value
else
-- for the moment this way:
@@ -208,14 +250,23 @@ local function add_attribute(namespace,tag,value)
end
local function add_empty(spacing, namespace, tag)
- if #spacing > 0 then
- dt[#dt+1] = spacing
+ if spacing ~= "" then
+ nt = nt + 1
+ dt[nt] = spacing
end
local resolved = namespace == "" and xmlns[#xmlns] or nsremap[namespace] or namespace
- top = stack[#stack]
+ top = stack[level]
dt = top.dt
- local t = { ns=namespace or "", rn=resolved, tg=tag, at=at, dt={}, __p__ = top }
- dt[#dt+1] = t
+ nt = #dt + 1
+ local t = {
+ ns = namespace or "",
+ rn = resolved,
+ tg = tag,
+ at = at,
+ dt = { },
+ __p__ = top
+ }
+ dt[nt] = t
setmetatable(t, mt)
if at.xmlns then
remove(xmlns)
@@ -224,24 +275,36 @@ local function add_empty(spacing, namespace, tag)
end
local function add_begin(spacing, namespace, tag)
- if #spacing > 0 then
- dt[#dt+1] = spacing
+ if spacing ~= "" then
+ nt = nt + 1
+ dt[nt] = spacing
end
local resolved = namespace == "" and xmlns[#xmlns] or nsremap[namespace] or namespace
- top = { ns=namespace or "", rn=resolved, tg=tag, at=at, dt={}, __p__ = stack[#stack] }
+ top = {
+ ns = namespace or "",
+ rn = resolved,
+ tg = tag,
+ at = at,
+ dt = {},
+ __p__ = stack[level]
+ }
setmetatable(top, mt)
dt = top.dt
- stack[#stack+1] = top
+ nt = #dt
+ level = level + 1
+ stack[level] = top
at = { }
end
local function add_end(spacing, namespace, tag)
- if #spacing > 0 then
- dt[#dt+1] = spacing
+ if spacing ~= "" then
+ nt = nt + 1
+ dt[nt] = spacing
end
- local toclose = remove(stack)
- top = stack[#stack]
- if #stack < 1 then
+ local toclose = stack[level]
+ level = level - 1
+ top = stack[level]
+ if level < 1 then
errorstr = formatters["unable to close %s %s"](tag,xml.checkerror(top,toclose) or "")
report_xml(errorstr)
elseif toclose.tg ~= tag then -- no namespace check
@@ -249,65 +312,65 @@ local function add_end(spacing, namespace, tag)
report_xml(errorstr)
end
dt = top.dt
- dt[#dt+1] = toclose
+ nt = #dt + 1
+ dt[nt] = toclose
-- dt[0] = top -- nasty circular reference when serializing table
if toclose.at.xmlns then
remove(xmlns)
end
end
--- local function add_text(text)
--- if cleanup and #text > 0 then
--- dt[#dt+1] = cleanup(text)
--- else
--- dt[#dt+1] = text
--- end
--- end
-
-local spaceonly = lpegpatterns.whitespace^0 * P(-1)
-
-local function add_text(text)
- local n = #dt
+-- local spaceonly = lpegpatterns.whitespace^0 * P(-1)
--
-- will be an option: dataonly
--
-- if #text == 0 or lpegmatch(spaceonly,text) then
-- return
-- end
---
- if cleanup and #text > 0 then
- if n > 0 then
- local s = dt[n]
+
+local function add_text(text)
+ if text == "" then
+ return
+ end
+ if cleanup then
+ if nt > 0 then
+ local s = dt[nt]
if type(s) == "string" then
- dt[n] = s .. cleanup(text)
+ dt[nt] = s .. cleanup(text)
else
- dt[n+1] = cleanup(text)
+ nt = nt + 1
+ dt[nt] = cleanup(text)
end
else
+ nt = 1
dt[1] = cleanup(text)
end
else
- if n > 0 then
- local s = dt[n]
+ if nt > 0 then
+ local s = dt[nt]
if type(s) == "string" then
- dt[n] = s .. text
+ dt[nt] = s .. text
else
- dt[n+1] = text
+ nt = nt + 1
+ dt[nt] = text
end
else
+ nt = 1
dt[1] = text
end
end
end
local function add_special(what, spacing, text)
- if #spacing > 0 then
- dt[#dt+1] = spacing
+ if spacing ~= "" then
+ nt = nt + 1
+ dt[nt] = spacing
end
if strip and (what == "@cm@" or what == "@dt@") then
-- forget it
else
- dt[#dt+1] = { special=true, ns="", tg=what, dt={ text } }
+ nt = nt + 1
+ dt[nt] = { special=true, ns="", tg=what, dt={ text } }
end
end
@@ -315,220 +378,219 @@ local function set_message(txt)
errorstr = "garbage at the end of the file: " .. gsub(txt,"([ \n\r\t]*)","")
end
-local reported_attribute_errors = { }
-
local function attribute_value_error(str)
- if not reported_attribute_errors[str] then
+ if not reported_at_errors[str] then
report_xml("invalid attribute value %a",str)
- reported_attribute_errors[str] = true
+ reported_at_errors[str] = true
at._error_ = str
end
return str
end
local function attribute_specification_error(str)
- if not reported_attribute_errors[str] then
+ if not reported_at_errors[str] then
report_xml("invalid attribute specification %a",str)
- reported_attribute_errors[str] = true
+ reported_at_errors[str] = true
at._error_ = str
end
return str
end
-local badentity = "&error;"
-local badentity = "&"
+-- these will be set later
-xml.placeholders = {
- unknown_dec_entity = function(str) return str == "" and badentity or formatters["&%s;"](str) end,
- unknown_hex_entity = function(str) return formatters["&#x%s;"](str) end,
- unknown_any_entity = function(str) return formatters["&#x%s;"](str) end,
-}
+local grammar_parsed_text_one
+local grammar_parsed_text_two
-local placeholders = xml.placeholders
+local handle_hex_entity
+local handle_dec_entity
+local handle_any_entity_dtd
+local handle_any_entity_text
-local function fromhex(s)
- local n = tonumber(s,16)
- if n then
- return utfchar(n)
- else
- return formatters["h:%s"](s), true
+-- in order to overcome lua limitations we wrap entity stuff in a
+-- closure
+
+do
+
+ local badentity = "&" -- was "&error;"
+
+ xml.placeholders = {
+ unknown_dec_entity = function(str) return str == "" and badentity or formatters["&%s;"](str) end,
+ unknown_hex_entity = function(str) return formatters["&#x%s;"](str) end,
+ unknown_any_entity = function(str) return formatters["&#x%s;"](str) end,
+ }
+
+ local function fromhex(s)
+ local n = tonumber(s,16)
+ if n then
+ return utfchar(n)
+ else
+ return formatters["h:%s"](s), true
+ end
end
-end
-local function fromdec(s)
- local n = tonumber(s)
- if n then
- return utfchar(n)
- else
- return formatters["d:%s"](s), true
+ local function fromdec(s)
+ local n = tonumber(s)
+ if n then
+ return utfchar(n)
+ else
+ return formatters["d:%s"](s), true
+ end
end
-end
--- one level expansion (simple case), no checking done
+ local p_rest = (1-P(";"))^0
+ local p_many = P(1)^0
+ local p_char = lpegpatterns.utf8character
-local p_rest = (1-P(";"))^0
-local p_many = P(1)^0
-local p_char = lpegpatterns.utf8character
+ local parsedentity =
+ P("&#") * (P("x")*(p_rest/fromhex) + (p_rest/fromdec)) * P(";") * P(-1) +
+ P ("#") * (P("x")*(p_many/fromhex) + (p_many/fromdec))
-local parsedentity =
- P("&") * (P("#x")*(p_rest/fromhex) + P("#")*(p_rest/fromdec)) * P(";") * P(-1) +
- (P("#x")*(p_many/fromhex) + P("#")*(p_many/fromdec))
+ xml.parsedentitylpeg = parsedentity
--- parsing in the xml file
+ -- parsing in the xml file
-local predefined_unified = {
- [38] = "&amp;",
- [42] = "&quot;",
- [47] = "&apos;",
- [74] = "&lt;",
- [76] = "&gt;",
-}
+ local predefined_unified = {
+ [38] = "&amp;",
+ [42] = "&quot;",
+ [47] = "&apos;",
+ [74] = "&lt;",
+ [76] = "&gt;",
+ }
-local predefined_simplified = {
- [38] = "&", amp = "&",
- [42] = '"', quot = '"',
- [47] = "'", apos = "'",
- [74] = "<", lt = "<",
- [76] = ">", gt = ">",
-}
+ local predefined_simplified = {
+ [38] = "&", amp = "&",
+ [42] = '"', quot = '"',
+ [47] = "'", apos = "'",
+ [74] = "<", lt = "<",
+ [76] = ">", gt = ">",
+ }
-local nofprivates = 0xF0000 -- shared but seldom used
+ local nofprivates = 0xF0000 -- shared but seldom used
-local privates_u = { -- unescaped
- [ [[&]] ] = "&amp;",
- [ [["]] ] = "&quot;",
- [ [[']] ] = "&apos;",
- [ [[<]] ] = "&lt;",
- [ [[>]] ] = "&gt;",
-}
+ local privates_u = { -- unescaped
+ [ [[&]] ] = "&amp;",
+ [ [["]] ] = "&quot;",
+ [ [[']] ] = "&apos;",
+ [ [[<]] ] = "&lt;",
+ [ [[>]] ] = "&gt;",
+ }
-local privates_p = {
-}
+ local privates_p = { -- needed for roundtrip as well as serialize to tex
+ }
-local privates_n = {
- -- keeps track of defined ones
-}
+ local privates_s = { -- for tex
+ [ [["]] ] = "&U+22;",
+ [ [[#]] ] = "&U+23;",
+ [ [[$]] ] = "&U+24;",
+ [ [[%]] ] = "&U+25;",
+ [ [[&]] ] = "&U+26;",
+ [ [[']] ] = "&U+27;",
+ [ [[<]] ] = "&U+3C;",
+ [ [[>]] ] = "&U+3E;",
+ [ [[\]] ] = "&U+5C;",
+ [ [[{]] ] = "&U+7B;",
+ [ [[|]] ] = "&U+7C;",
+ [ [[}]] ] = "&U+7D;",
+ [ [[~]] ] = "&U+7E;",
+ }
--- -- local escaped = utf.remapper(privates_u) -- can't be used as it freezes
--- -- local unprivatized = utf.remapper(privates_p) -- can't be used as it freezes
---
--- local p_privates_u = false
--- local p_privates_p = false
---
--- table.setmetatablenewindex(privates_u,function(t,k,v) rawset(t,k,v) p_privates_u = false end)
--- table.setmetatablenewindex(privates_p,function(t,k,v) rawset(t,k,v) p_privates_p = false end)
---
--- local function escaped(str)
--- if not str or str == "" then
--- return ""
--- else
--- if not p_privates_u then
--- p_privates_u = Cs((lpeg.utfchartabletopattern(privates_u)/privates_u + p_char)^0)
--- end
--- return lpegmatch(p_privates_u,str)
--- end
--- end
---
--- local function unprivatized(str)
--- if not str or str == "" then
--- return ""
--- else
--- if not p_privates_p then
--- p_privates_p = Cs((lpeg.utfchartabletopattern(privates_p)/privates_p + p_char)^0)
--- end
--- return lpegmatch(p_privates_p,str)
--- end
--- end
+ local privates_n = { -- keeps track of defined ones
+ }
-local escaped = utf.remapper(privates_u,"dynamic")
-local unprivatized = utf.remapper(privates_p,"dynamic")
+ local escaped = utf.remapper(privates_u,"dynamic")
+ local unprivatized = utf.remapper(privates_p,"dynamic")
+ local unspecialized = utf.remapper(privates_s,"dynamic")
+
+ xml.unprivatized = unprivatized
+ xml.unspecialized = unspecialized
+ xml.escaped = escaped
+
+ local function unescaped(s)
+ local p = privates_n[s]
+ if not p then
+ nofprivates = nofprivates + 1
+ p = utfchar(nofprivates)
+ privates_n[s] = p
+ s = "&" .. s .. ";" -- todo: use char-ent to map to hex
+ privates_u[p] = s
+ privates_p[p] = s
+ privates_s[p] = s
+ end
+ return p
+ end
-xml.unprivatized = unprivatized
+ xml.privatetoken = unescaped
+ xml.privatecodes = privates_n
+ xml.specialcodes = privates_s
-local function unescaped(s)
- local p = privates_n[s]
- if not p then
- nofprivates = nofprivates + 1
- p = utfchar(nofprivates)
- privates_n[s] = p
- s = "&" .. s .. ";" -- todo: use char-ent to map to hex
- privates_u[p] = s
- privates_p[p] = s
+ function xml.addspecialcode(key,value)
+ privates_s[key] = value or "&" .. s .. ";"
end
- return p
-end
-
-xml.privatetoken = unescaped
-xml.privatecodes = privates_n
-local function handle_hex_entity(str)
- local h = hcache[str]
- if not h then
- local n = tonumber(str,16)
- h = unify_predefined and predefined_unified[n]
- if h then
- if trace_entities then
- report_xml("utfize, converting hex entity &#x%s; into %a",str,h)
- end
- elseif utfize then
- h = (n and utfchar(n)) or xml.unknown_hex_entity(str) or ""
- if not n then
- report_xml("utfize, ignoring hex entity &#x%s;",str)
- elseif trace_entities then
- report_xml("utfize, converting hex entity &#x%s; into %a",str,h)
- end
- else
- if trace_entities then
- report_xml("found entity &#x%s;",str)
+ handle_hex_entity = function(str)
+ local h = hcache[str]
+ if not h then
+ local n = tonumber(str,16)
+ h = unify_predefined and predefined_unified[n]
+ if h then
+ if trace_entities then
+ report_xml("utfize, converting hex entity &#x%s; into %a",str,h)
+ end
+ elseif utfize then
+ h = (n and utfchar(n)) or xml.unknown_hex_entity(str) or ""
+ if not n then
+ report_xml("utfize, ignoring hex entity &#x%s;",str)
+ elseif trace_entities then
+ report_xml("utfize, converting hex entity &#x%s; into %a",str,h)
+ end
+ else
+ if trace_entities then
+ report_xml("found entity &#x%s;",str)
+ end
+ h = "&#x" .. str .. ";"
end
- h = "&#x" .. str .. ";"
+ hcache[str] = h
end
- hcache[str] = h
+ return h
end
- return h
-end
-local function handle_dec_entity(str)
- local d = dcache[str]
- if not d then
- local n = tonumber(str)
- d = unify_predefined and predefined_unified[n]
- if d then
- if trace_entities then
- report_xml("utfize, converting dec entity &#%s; into %a",str,d)
- end
- elseif utfize then
- d = (n and utfchar(n)) or placeholders.unknown_dec_entity(str) or ""
- if not n then
- report_xml("utfize, ignoring dec entity &#%s;",str)
- elseif trace_entities then
- report_xml("utfize, converting dec entity &#%s; into %a",str,d)
- end
- else
- if trace_entities then
- report_xml("found entity &#%s;",str)
+ handle_dec_entity = function(str)
+ local d = dcache[str]
+ if not d then
+ local n = tonumber(str)
+ d = unify_predefined and predefined_unified[n]
+ if d then
+ if trace_entities then
+ report_xml("utfize, converting dec entity &#%s; into %a",str,d)
+ end
+ elseif utfize then
+ d = (n and utfchar(n)) or placeholders.unknown_dec_entity(str) or ""
+ if not n then
+ report_xml("utfize, ignoring dec entity &#%s;",str)
+ elseif trace_entities then
+ report_xml("utfize, converting dec entity &#%s; into %a",str,d)
+ end
+ else
+ if trace_entities then
+ report_xml("found entity &#%s;",str)
+ end
+ d = "&#" .. str .. ";"
end
- d = "&#" .. str .. ";"
+ dcache[str] = d
end
- dcache[str] = d
+ return d
end
- return d
-end
-
-xml.parsedentitylpeg = parsedentity
-local function handle_any_entity(str)
- if resolve then
- local a = acache[str] -- per instance ! todo
- if not a then
- a = resolve_predefined and predefined_simplified[str]
+ handle_any_entity_dtd = function(str)
+ if resolve then
+ local a = resolve_predefined and predefined_simplified[str] -- true by default
if a then
if trace_entities then
report_xml("resolving entity &%s; to predefined %a",str,a)
end
else
if type(resolve) == "function" then
- a = resolve(str) or entities[str]
+ a = resolve(str,entities) or entities[str]
else
a = entities[str]
end
@@ -564,46 +626,226 @@ local function handle_any_entity(str)
end
end
end
- acache[str] = a
- elseif trace_entities then
- if not acache[str] then
- report_xml("converting entity &%s; to %a",str,a)
- acache[str] = a
+ return a
+ else
+ local a = acache[str]
+ if not a then
+ a = resolve_predefined and predefined_simplified[str]
+ if a then
+ -- one of the predefined
+ acache[str] = a
+ if trace_entities then
+ report_xml("entity &%s; becomes %a",str,a)
+ end
+ elseif str == "" then
+ if trace_entities then
+ report_xml("invalid entity &%s;",str)
+ end
+ a = badentity
+ acache[str] = a
+ else
+ if trace_entities then
+ report_xml("entity &%s; is made private",str)
+ end
+ -- a = "&" .. str .. ";"
+ a = unescaped(str)
+ acache[str] = a
+ end
end
+ return a
end
- return a
- else
- local a = acache[str]
- if not a then
- a = resolve_predefined and predefined_simplified[str]
+ end
+
+ handle_any_entity_text = function(str)
+ if resolve then
+ local a = resolve_predefined and predefined_simplified[str]
if a then
- -- one of the predefined
- acache[str] = a
- if trace_entities then
- report_xml("entity &%s; becomes %a",str,a)
- end
- elseif str == "" then
if trace_entities then
- report_xml("invalid entity &%s;",str)
+ report_xml("resolving entity &%s; to predefined %a",str,a)
end
- a = badentity
- acache[str] = a
else
- if trace_entities then
- report_xml("entity &%s; is made private",str)
+ if type(resolve) == "function" then
+ a = resolve(str,entities) or entities[str]
+ else
+ a = entities[str]
+ end
+ if a then
+ if type(a) == "function" then
+ if trace_entities then
+ report_xml("expanding entity &%s; to function call",str)
+ end
+ a = a(str) or ""
+ end
+ a = lpegmatch(grammar_parsed_text_two,a) or a
+ if type(a) == "number" then
+ return ""
+ else
+ a = lpegmatch(parsedentity,a) or a -- for nested
+ if trace_entities then
+ report_xml("resolving entity &%s; to internal %a",str,a)
+ end
+ end
+ if trace_entities then
+ report_xml("resolving entity &%s; to internal %a",str,a)
+ end
+ else
+ local unknown_any_entity = placeholders.unknown_any_entity
+ if unknown_any_entity then
+ a = unknown_any_entity(str) or ""
+ end
+ if a then
+ if trace_entities then
+ report_xml("resolving entity &%s; to external %s",str,a)
+ end
+ else
+ if trace_entities then
+ report_xml("keeping entity &%s;",str)
+ end
+ if str == "" then
+ a = badentity
+ else
+ a = "&" .. str .. ";"
+ end
+ end
end
- -- a = "&" .. str .. ";"
- a = unescaped(str)
- acache[str] = a
end
+ return a
+ else
+ local a = acache[str]
+ if not a then
+ a = resolve_predefined and predefined_simplified[str]
+ if a then
+ -- one of the predefined
+ acache[str] = a
+ if trace_entities then
+ report_xml("entity &%s; becomes %a",str,a)
+ end
+ elseif str == "" then
+ if trace_entities then
+ report_xml("invalid entity &%s;",str)
+ end
+ a = badentity
+ acache[str] = a
+ else
+ if trace_entities then
+ report_xml("entity &%s; is made private",str)
+ end
+ -- a = "&" .. str .. ";"
+ a = unescaped(str)
+ acache[str] = a
+ end
+ end
+ return a
+ end
+ end
+
+ -- for tex
+
+ local p_rest = (1-P(";"))^1
+
+ local spec = {
+ [0x23] = "\\Ux{23}", -- #
+ [0x24] = "\\Ux{24}", -- $
+ [0x25] = "\\Ux{25}", -- %
+ [0x5C] = "\\Ux{5C}", -- \
+ [0x7B] = "\\Ux{7B}", -- {
+ [0x7C] = "\\Ux{7C}", -- |
+ [0x7D] = "\\Ux{7D}", -- }
+ [0x7E] = "\\Ux{7E}", -- ~
+ }
+
+ local hash = table.setmetatableindex(spec,function(t,k)
+ local v = utfchar(k)
+ t[k] = v
+ return v
+ end)
+
+ local function fromuni(s)
+ local n = tonumber(s,16)
+ if n then
+ return hash[n]
+ else
+ return formatters["u:%s"](s), true
+ end
+ end
+
+ local function fromhex(s)
+ local n = tonumber(s,16)
+ if n then
+ return hash[n]
+ else
+ return formatters["h:%s"](s), true
+ end
+ end
+
+ local function fromdec(s)
+ local n = tonumber(s)
+ if n then
+ return hash[n]
+ else
+ return formatters["d:%s"](s), true
+ end
+ end
+
+ local reparsedentity =
+ P("U+") * (p_rest/fromuni)
+ + P("#") * (
+ P("x") * (p_rest/fromhex)
+ + p_rest/fromdec
+ )
+
+ local hash = table.setmetatableindex(function(t,k)
+ local v = utfchar(k)
+ t[k] = v
+ return v
+ end)
+
+ local function fromuni(s)
+ local n = tonumber(s,16)
+ if n then
+ return hash[n]
+ else
+ return formatters["u:%s"](s), true
+ end
+ end
+
+ local function fromhex(s)
+ local n = tonumber(s,16)
+ if n then
+ return hash[n]
+ else
+ return formatters["h:%s"](s), true
+ end
+ end
+
+ local function fromdec(s)
+ local n = tonumber(s)
+ if n then
+ return hash[n]
+ else
+ return formatters["d:%s"](s), true
end
- return a
end
+
+ local unescapedentity =
+ P("U+") * (p_rest/fromuni)
+ + P("#") * (
+ P("x") * (p_rest/fromhex)
+ + p_rest/fromdec
+ )
+
+ xml.reparsedentitylpeg = reparsedentity -- with \Ux{...} for special tex entities
+ xml.unescapedentitylpeg = unescapedentity -- normal characters
+
end
--- local function handle_end_entity(chr)
--- report_xml("error in entity, %a found instead of %a",chr,";")
--- end
+-- we use these later on
+
+local escaped = xml.escaped
+local unescaped = xml.unescaped
+local placeholders = xml.placeholders
+
+--
local function handle_end_entity(str)
report_xml("error in entity, %a found without ending %a",str,";")
@@ -635,18 +877,24 @@ local spacing = C(space^0)
----- entitycontent = (1-open-semicolon)^0
local anyentitycontent = (1-open-semicolon-space-close-ampersand)^0
-local hexentitycontent = R("AF","af","09")^0
-local decentitycontent = R("09")^0
+local hexentitycontent = R("AF","af","09")^1
+local decentitycontent = R("09")^1
local parsedentity = P("#")/"" * (
P("x")/"" * (hexentitycontent/handle_hex_entity) +
(decentitycontent/handle_dec_entity)
- ) + (anyentitycontent/handle_any_entity)
+ ) + (anyentitycontent/handle_any_entity_dtd) -- can be Cc(true)
+local parsedentity_text= P("#")/"" * (
+ P("x")/"" * (hexentitycontent/handle_hex_entity) +
+ (decentitycontent/handle_dec_entity)
+ ) + (anyentitycontent/handle_any_entity_text) -- can be Cc(false)
----- entity = ampersand/"" * parsedentity * ( (semicolon/"") + #(P(1)/handle_end_entity))
-local entity = (ampersand/"") * parsedentity * (semicolon/"")
+local entity = (ampersand/"") * parsedentity * (semicolon/"")
+ + ampersand * (anyentitycontent / handle_end_entity)
+local entity_text = (ampersand/"") * parsedentity_text * (semicolon/"")
+ ampersand * (anyentitycontent / handle_end_entity)
local text_unparsed = C((1-open)^1)
-local text_parsed = Cs(((1-open-ampersand)^1 + entity)^1)
+local text_parsed = (Cs((1-open-ampersand)^1)/add_text + Cs(entity_text)/add_text)^1
local somespace = space^1
local optionalspace = space^0
@@ -668,7 +916,7 @@ local attribute = (somespace * name * optionalspace * equal * optionalspa
local attributes = (attribute + somespace^-1 * (((1-endofattributes)^1)/attribute_specification_error))^0
-local parsedtext = text_parsed / add_text
+local parsedtext = text_parsed -- / add_text
local unparsedtext = text_unparsed / add_text
local balanced = P { "[" * ((1 - S"[]") + V(1))^0 * "]" } -- taken from lpeg manual, () example
@@ -689,9 +937,30 @@ local someinstruction = C((1 - endinstruction)^0)
local somecomment = C((1 - endcomment )^0)
local somecdata = C((1 - endcdata )^0)
-local function normalentity(k,v ) entities[k] = v end
-local function systementity(k,v,n) entities[k] = v end
-local function publicentity(k,v,n) entities[k] = v end
+local function weirdentity(k,v)
+ if trace_entities then
+ report_xml("registering %s entity %a as %a","weird",k,v)
+ end
+ parameters[k] = v
+end
+local function normalentity(k,v)
+ if trace_entities then
+ report_xml("registering %s entity %a as %a","normal",k,v)
+ end
+ entities[k] = v
+end
+local function systementity(k,v,n)
+ if trace_entities then
+ report_xml("registering %s entity %a as %a","system",k,v)
+ end
+ entities[k] = v
+end
+local function publicentity(k,v,n)
+ if trace_entities then
+ report_xml("registering %s entity %a as %a","public",k,v)
+ end
+ entities[k] = v
+end
-- todo: separate dtd parser
@@ -699,19 +968,34 @@ local begindoctype = open * P("!DOCTYPE")
local enddoctype = close
local beginset = P("[")
local endset = P("]")
+local wrdtypename = C((1-somespace-P(";"))^1)
local doctypename = C((1-somespace-close)^0)
local elementdoctype = optionalspace * P("<!ELEMENT") * (1-close)^0 * close
local basiccomment = begincomment * ((1 - endcomment)^0) * endcomment
-local normalentitytype = (doctypename * somespace * value)/normalentity
+local weirdentitytype = P("%") * (somespace * doctypename * somespace * value) / weirdentity
+local normalentitytype = (doctypename * somespace * value) / normalentity
local publicentitytype = (doctypename * somespace * P("PUBLIC") * somespace * value)/publicentity
local systementitytype = (doctypename * somespace * P("SYSTEM") * somespace * value * somespace * P("NDATA") * somespace * doctypename)/systementity
-local entitydoctype = optionalspace * P("<!ENTITY") * somespace * (systementitytype + publicentitytype + normalentitytype) * optionalspace * close
+local entitydoctype = optionalspace * P("<!ENTITY") * somespace * (systementitytype + publicentitytype + normalentitytype + weirdentitytype) * optionalspace * close
+
+local function weirdresolve(s)
+ lpegmatch(entitydoctype,parameters[s])
+end
+
+local function normalresolve(s)
+ lpegmatch(entitydoctype,entities[s])
+end
+
+local entityresolve = P("%") * (wrdtypename/weirdresolve ) * P(";")
+ + P("&") * (wrdtypename/normalresolve) * P(";")
+
+entitydoctype = entitydoctype + entityresolve
-- we accept comments in doctypes
-local doctypeset = beginset * optionalspace * P(elementdoctype + entitydoctype + basiccomment + space)^0 * optionalspace * endset
+local doctypeset = beginset * optionalspace * P(elementdoctype + entitydoctype + entityresolve + basiccomment + space)^0 * optionalspace * endset
local definitiondoctype= doctypename * somespace * doctypeset
local publicdoctype = doctypename * somespace * P("PUBLIC") * somespace * value * somespace * value * somespace * doctypeset
local systemdoctype = doctypename * somespace * P("SYSTEM") * somespace * value * somespace * doctypeset
@@ -723,13 +1007,11 @@ local comment = (spacing * begincomment * somecomment * endcomm
local cdata = (spacing * begincdata * somecdata * endcdata ) / function(...) add_special("@cd@",...) end
local doctype = (spacing * begindoctype * somedoctype * enddoctype ) / function(...) add_special("@dt@",...) end
--- local text_unparsed = C((1-open)^1)
--- local text_parsed = Cs(((1-open-ampersand)^1 + entity)^1)
-
local crap_parsed = 1 - beginelement - endelement - emptyelement - begininstruction - begincomment - begincdata - ampersand
local crap_unparsed = 1 - beginelement - endelement - emptyelement - begininstruction - begincomment - begincdata
-local parsedcrap = Cs((crap_parsed^1 + entity)^1) / handle_crap_error
-local unparsedcrap = Cs((crap_unparsed )^1) / handle_crap_error
+local parsedcrap = Cs((crap_parsed^1 + entity_text)^1) / handle_crap_error
+local parsedcrap = Cs((crap_parsed^1 + entity_text)^1) / handle_crap_error
+local unparsedcrap = Cs((crap_unparsed )^1) / handle_crap_error
-- nicer but slower:
--
@@ -744,8 +1026,18 @@ local trailer = space^0 * (text_unparsed/set_message)^0
-- text + comment + emptyelement + cdata + instruction + V("parent"), -- 5.8
-- text + V("parent") + emptyelement + comment + cdata + instruction, -- 5.5
-local grammar_parsed_text = P { "preamble",
- preamble = utfbom^0 * instruction^0 * (doctype + comment + instruction)^0 * V("parent") * trailer,
+-- local grammar_parsed_text = P { "preamble",
+-- preamble = utfbom^0 * instruction^0 * (doctype + comment + instruction)^0 * V("parent") * trailer,
+-- parent = beginelement * V("children")^0 * endelement,
+-- children = parsedtext + V("parent") + emptyelement + comment + cdata + instruction + parsedcrap,
+-- }
+
+grammar_parsed_text_one = P { "preamble",
+ preamble = utfbom^0 * instruction^0 * (doctype + comment + instruction)^0,
+}
+
+grammar_parsed_text_two = P { "followup",
+ followup = V("parent") * trailer,
parent = beginelement * V("children")^0 * endelement,
children = parsedtext + V("parent") + emptyelement + comment + cdata + instruction + parsedcrap,
}
@@ -759,40 +1051,27 @@ local grammar_unparsed_text = P { "preamble",
-- maybe we will add settings to result as well
local function _xmlconvert_(data, settings)
- settings = settings or { } -- no_root strip_cm_and_dt given_entities parent_root error_handler
- --
- strip = settings.strip_cm_and_dt
- utfize = settings.utfize_entities
- resolve = settings.resolve_entities
- resolve_predefined = settings.resolve_predefined_entities -- in case we have escaped entities
- unify_predefined = settings.unify_predefined_entities -- &#038; -> &amp;
- cleanup = settings.text_cleanup
- entities = settings.entities or { }
- --
- if utfize == nil then
- settings.utfize_entities = true
- utfize = true
- end
- if resolve_predefined == nil then
- settings.resolve_predefined_entities = true
- resolve_predefined = true
- end
- --
- stack, top, at, xmlns, errorstr = { }, { }, { }, { }, nil
- acache, hcache, dcache = { }, { }, { } -- not stored
- reported_attribute_errors = { }
+ settings = settings or { } -- no_root strip_cm_and_dt given_entities parent_root error_handler
+ preparexmlstate(settings)
if settings.parent_root then
mt = getmetatable(settings.parent_root)
else
initialize_mt(top)
end
- stack[#stack+1] = top
+ level = level + 1
+ stack[level] = top
top.dt = { }
dt = top.dt
+ nt = 0
if not data or data == "" then
errorstr = "empty xml file"
elseif utfize or resolve then
- if lpegmatch(grammar_parsed_text,data) then
+ local m = lpegmatch(grammar_parsed_text_one,data)
+ if m then
+ m = lpegmatch(grammar_parsed_text_two,data,m)
+ end
+ -- local m = lpegmatch(grammar_parsed_text,data)
+ if m then
-- errorstr = "" can be set!
else
errorstr = "invalid xml file - parsed text"
@@ -809,8 +1088,8 @@ local function _xmlconvert_(data, settings)
local result
if errorstr and errorstr ~= "" then
result = { dt = { { ns = "", tg = "error", dt = { errorstr }, at={ }, er = true } } }
-setmetatable(result, mt)
-setmetatable(result.dt[1], mt)
+ setmetatable(result, mt)
+ setmetatable(result.dt[1], mt)
setmetatable(stack, mt)
local errorhandler = settings.error_handler
if errorhandler == false then
@@ -850,16 +1129,13 @@ setmetatable(result.dt[1], mt)
result.statistics = {
errormessage = errorstr,
entities = {
- decimals = dcache,
- hexadecimals = hcache,
- names = acache,
+ decimals = dcache,
+ hexadecimals = hcache,
+ names = acache,
+ intermediates = parameters,
}
}
- strip, utfize, resolve, resolve_predefined = nil, nil, nil, nil
- unify_predefined, cleanup, entities = nil, nil, nil
- stack, top, at, xmlns, errorstr = nil, nil, nil, nil, nil
- acache, hcache, dcache = nil, nil, nil
- reported_attribute_errors, mt, errorhandler = nil, nil, nil
+ preparexmlstate() -- resets
return result
end
@@ -964,15 +1240,37 @@ generic table copier. Since we know what we're dealing with we
can speed up things a bit. The second argument is not to be used!</p>
--ldx]]--
-local function copy(old,tables)
+-- local function copy(old,tables)
+-- if old then
+-- if not tables then
+-- tables = { }
+-- end
+-- local new = { }
+-- if not tables[old] then
+-- tables[old] = new
+-- end
+-- for k,v in next, old do
+-- new[k] = (type(v) == "table" and (tables[v] or copy(v, tables))) or v
+-- end
+-- local mt = getmetatable(old)
+-- if mt then
+-- setmetatable(new,mt)
+-- end
+-- return new
+-- else
+-- return { }
+-- end
+-- end
+
+local function copy(old)
if old then
- tables = tables or { }
local new = { }
- if not tables[old] then
- tables[old] = new
- end
for k,v in next, old do
- new[k] = (type(v) == "table" and (tables[v] or copy(v, tables))) or v
+ if type(v) == "table" then
+ new[k] = table.copy(v)
+ else
+ new[k] = v
+ end
end
local mt = getmetatable(old)
if mt then
@@ -1019,29 +1317,44 @@ and then handle the lot.</p>
local f_attribute = formatters['%s=%q']
+-- we could reuse ats
+
local function verbose_element(e,handlers,escape) -- options
local handle = handlers.handle
local serialize = handlers.serialize
local ens, etg, eat, edt, ern = e.ns, e.tg, e.at, e.dt, e.rn
local ats = eat and next(eat) and { }
if ats then
+ -- we now sort attributes
local n = 0
- for k,v in next, eat do
+ for k in next, eat do
n = n + 1
- ats[n] = f_attribute(k,escaped(v))
+ ats[n] = k
+ end
+ if n == 1 then
+ local k = ats[1]
+ ats = f_attribute(k,escaped(eat[k]))
+ else
+ sort(ats)
+ for i=1,n do
+ local k = ats[i]
+ ats[i] = f_attribute(k,escaped(eat[k]))
+ end
+ ats = concat(ats," ")
end
end
if ern and trace_entities and ern ~= ens then
ens = ern
end
+ local n = edt and #edt
if ens ~= "" then
- if edt and #edt > 0 then
+ if n and n > 0 then
if ats then
- handle("<",ens,":",etg," ",concat(ats," "),">")
+ handle("<",ens,":",etg," ",ats,">")
else
handle("<",ens,":",etg,">")
end
- for i=1,#edt do
+ for i=1,n do
local e = edt[i]
if type(e) == "string" then
handle(escaped(e))
@@ -1052,19 +1365,19 @@ local function verbose_element(e,handlers,escape) -- options
handle("</",ens,":",etg,">")
else
if ats then
- handle("<",ens,":",etg," ",concat(ats," "),"/>")
+ handle("<",ens,":",etg," ",ats,"/>")
else
handle("<",ens,":",etg,"/>")
end
end
else
- if edt and #edt > 0 then
+ if n and n > 0 then
if ats then
- handle("<",etg," ",concat(ats," "),">")
+ handle("<",etg," ",ats,">")
else
handle("<",etg,">")
end
- for i=1,#edt do
+ for i=1,n do
local e = edt[i]
if type(e) == "string" then
handle(escaped(e)) -- option: hexify escaped entities
@@ -1075,7 +1388,7 @@ local function verbose_element(e,handlers,escape) -- options
handle("</",etg,">")
else
if ats then
- handle("<",etg," ",concat(ats," "),"/>")
+ handle("<",etg," ",ats,"/>")
else
handle("<",etg,"/>")
end
@@ -1096,7 +1409,7 @@ local function verbose_cdata(e,handlers)
end
local function verbose_doctype(e,handlers)
- handlers.handle("<!DOCTYPE ",e.dt[1],">")
+ handlers.handle("<!DOCTYPE",e.dt[1],">") -- has space at end of string
end
local function verbose_root(e,handlers)
@@ -1146,14 +1459,16 @@ local function serialize(e,handlers,...)
end
local function xserialize(e,handlers)
- local functions = handlers.functions
- local etg = e.tg
- if etg then
- (functions[etg] or functions["@el@"])(e,handlers)
- -- elseif type(e) == "string" then
- -- functions["@tx@"](e,handlers)
- else
- functions["@dc@"](e,handlers)
+ if e then
+ local functions = handlers.functions
+ local etg = e.tg
+ if etg then
+ (functions[etg] or functions["@el@"])(e,handlers)
+ -- elseif type(e) == "string" then
+ -- functions["@tx@"](e,handlers)
+ else
+ functions["@dc@"](e,handlers)
+ end
end
end
diff --git a/Master/texmf-dist/tex/context/base/lxml-tex.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-tex.lua
index 550a06a1855..3a49ea3d2e9 100644
--- a/Master/texmf-dist/tex/context/base/lxml-tex.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-tex.lua
@@ -11,11 +11,13 @@ if not modules then modules = { } end modules ['lxml-tex'] = {
-- be an cldf-xml helper library.
local utfchar = utf.char
-local concat, insert, remove, sortedkeys = table.concat, table.insert, table.remove, table.sortedkeys
+local concat, insert, remove, sortedkeys, reversed = table.concat, table.insert, table.remove, table.sortedkeys, table.reverse
local format, sub, gsub, find, gmatch, match = string.format, string.sub, string.gsub, string.find, string.gmatch, string.match
local type, next, tonumber, tostring, select = type, next, tonumber, tostring, select
local lpegmatch = lpeg.match
-local P, S, C, Cc = lpeg.P, lpeg.S, lpeg.C, lpeg.Cc
+local P, S, C, Cc, Cs = lpeg.P, lpeg.S, lpeg.C, lpeg.Cc, lpeg.Cs
+local patterns = lpeg.patterns
+local setmetatableindex = table.setmetatableindex
local tex, xml = tex, xml
local lowerchars, upperchars, lettered = characters.lower, characters.upper, characters.lettered
@@ -43,14 +45,16 @@ local xmlcollect = xml.collect
local xmltext = xml.text
local xmltostring = xml.tostring
local xmlapplylpath = xml.applylpath
-local xmlunprivatized = xml.unprivatized
+local xmlunspecialized = xml.unspecialized
local xmlprivatetoken = xml.privatetoken
-local xmlprivatecodes = xml.privatecodes
local xmlstripelement = xml.stripelement
local xmlinclusion = xml.inclusion
local xmlinclusions = xml.inclusions
local xmlbadinclusions = xml.badinclusions
local xmlcontent = xml.content
+local xmllastmatch = xml.lastmatch
+
+directives.enable("xml.path.keeplastmatch")
local variables = interfaces and interfaces.variables or { }
@@ -78,21 +82,33 @@ local report_lxml = logs.reporter("lxml","tex")
local report_xml = logs.reporter("xml","tex")
local forceraw = false
-local forceraw = nil
+
+local p_texescape = patterns.texescape
-- tex entities
---
--- todo: unprivatize attributes
lxml.entities = lxml.entities or { }
storage.register("lxml/entities",lxml.entities,"lxml.entities")
--- xml.placeholders.unknown_any_entity = nil -- has to be per xml
+local xmlentities = xml.entities -- these are more or less standard entities
+local texentities = lxml.entities -- these are specific for a tex run
+local reparsedentity = xml.reparsedentitylpeg -- \Ux{...}
+local unescapedentity = xml.unescapedentitylpeg
+local parsedentity = reparsedentity
+local useelement = false -- probably no longer needed / used
+
+function lxml.startunescaped()
+ parsedentity = unescapedentity
+end
+
+function lxml.stopunescaped()
+ parsedentity = reparsedentity
+end
-local xmlentities = xml.entities
-local texentities = lxml.entities
-local parsedentity = xml.parsedentitylpeg
+directives.register("lxml.entities.useelement",function(v)
+ useelement = v
+end)
function lxml.registerentity(key,value)
texentities[key] = value
@@ -103,6 +119,7 @@ end
function lxml.resolvedentity(str)
if forceraw then
+ -- should not happen as we then can as well bypass this function
if trace_entities then
report_xml("passing entity %a as &%s;",str,str)
end
@@ -142,21 +159,35 @@ function lxml.resolvedentity(str)
-- normally this is already solved while loading the file
local chr, err = lpegmatch(parsedentity,str)
if chr then
- if trace_entities then
- report_xml("passing entity %a as %a using %a",str,chr,"ctxcatcodes")
+ if parsedentity == reparsedentity then
+ if trace_entities then
+ report_xml("passing entity %a as %a using %a",str,chr,"ctxcatcodes")
+ end
+ context(chr)
+ else
+ contextsprint(notcatcodes,chr)
+ if trace_entities then
+ report_xml("passing entity %a as %a using %a",str,chr,"notcatcodes")
+ end
end
- context(chr)
elseif err then
if trace_entities then
report_xml("passing faulty entity %a as %a",str,err)
end
context(err)
- else
+ elseif useelement then
local tag = upperchars(str)
if trace_entities then
report_xml("passing entity %a to \\xmle using tag %a",str,tag)
end
- context.xmle(str,tag) -- we need to use our own upper
+ contextsprint(texcatcodes,"\\xmle{")
+ contextsprint(notcatcodes,e)
+ contextsprint(texcatcodes,"}")
+ else
+ if trace_entities then
+ report_xml("passing entity %a as %a using %a",str,str,"notcatcodes")
+ end
+ contextsprint(notcatcodes,str)
end
end
end
@@ -181,37 +212,76 @@ local texfinalizers = finalizers.tex
-- serialization with entity handling
-local ampersand = P("&")
-local semicolon = P(";")
-local entity = ampersand * C((1-semicolon)^1) * semicolon / lxml.resolvedentity -- context.bold
+local ampersand = P("&")
+local semicolon = P(";")
+
+local entity = (ampersand * C((1-semicolon)^1) * semicolon) / lxml.resolvedentity -- context.bold
-local _, xmltextcapture = context.newtexthandler {
+local _, xmltextcapture_yes = context.newtexthandler {
+ catcodes = notcatcodes,
exception = entity,
+}
+local _, xmltextcapture_nop = context.newtexthandler {
catcodes = notcatcodes,
}
-local _, xmlspacecapture = context.newtexthandler {
+local _, xmlspacecapture_yes = context.newtexthandler {
endofline = context.xmlcdataobeyedline,
emptyline = context.xmlcdataobeyedline,
simpleline = context.xmlcdataobeyedline,
space = context.xmlcdataobeyedspace,
+ catcodes = notcatcodes,
exception = entity,
+}
+local _, xmlspacecapture_nop = context.newtexthandler {
+ endofline = context.xmlcdataobeyedline,
+ emptyline = context.xmlcdataobeyedline,
+ simpleline = context.xmlcdataobeyedline,
+ space = context.xmlcdataobeyedspace,
catcodes = notcatcodes,
}
-local _, xmllinecapture = context.newtexthandler {
+local _, xmllinecapture_yes = context.newtexthandler {
endofline = context.xmlcdataobeyedline,
emptyline = context.xmlcdataobeyedline,
simpleline = context.xmlcdataobeyedline,
+ catcodes = notcatcodes,
exception = entity,
+}
+local _, xmllinecapture_nop = context.newtexthandler {
+ endofline = context.xmlcdataobeyedline,
+ emptyline = context.xmlcdataobeyedline,
+ simpleline = context.xmlcdataobeyedline,
catcodes = notcatcodes,
}
-local _, ctxtextcapture = context.newtexthandler {
+local _, ctxtextcapture_yes = context.newtexthandler {
+ catcodes = ctxcatcodes,
exception = entity,
+}
+local _, ctxtextcapture_nop = context.newtexthandler {
catcodes = ctxcatcodes,
}
+local xmltextcapture = xmltextcapture_yes
+local xmlspacecapture = xmlspacecapture_yes
+local xmllinecapture = xmllinecapture_yes
+local ctxtextcapture = ctxtextcapture_yes
+
+directives.register("lxml.entities.escaped",function(v)
+ if v then
+ xmltextcapture = xmltextcapture_yes
+ xmlspacecapture = xmlspacecapture_yes
+ xmllinecapture = xmllinecapture_yes
+ ctxtextcapture = ctxtextcapture_yes
+ else
+ xmltextcapture = xmltextcapture_nop
+ xmlspacecapture = xmlspacecapture_nop
+ xmllinecapture = xmllinecapture_nop
+ ctxtextcapture = ctxtextcapture_nop
+ end
+end)
+
-- cdata
local toverbatim = context.newverbosehandler {
@@ -239,6 +309,14 @@ function lxml.stopraw()
forceraw = false
end
+function lxml.startraw()
+ forceraw = true
+end
+
+function lxml.stopraw()
+ forceraw = false
+end
+
function lxml.rawroot()
return rawroot
end
@@ -354,6 +432,12 @@ end
lxml.addindex = addindex
+implement {
+ name = "xmladdindex",
+ arguments = { "string" },
+ actions = addindex,
+}
+
-- another cache
local function lxmlapplylpath(id,pattern) -- better inline, saves call
@@ -417,38 +501,54 @@ function xml.load(filename,settings)
return xmltable
end
-local function entityconverter(id,str)
- return xmlentities[str] or xmlprivatetoken(str) or "" -- roundtrip handler
+local function entityconverter(id,str,ent) -- todo: disable tex entities when raw
+ -- tex driven entity
+ local t = texentities[str]
+ if t then
+ local p = xmlprivatetoken(str)
+-- only once
+-- context.xmlprivate(p,t)
+ return p
+ end
+ -- dtd determined entity
+ local e = ent and ent[str]
+ if e then
+ return e
+ end
+ -- predefined entity (mathml and so)
+ local x = xmlentities[str]
+ if x then
+ return x
+ end
+ -- keep original somehow
+ return xmlprivatetoken(str)
end
-function lxml.convert(id,data,entities,compress,currentresource)
+local function lxmlconvert(id,data,compress,currentresource)
local settings = { -- we're now roundtrip anyway
- unify_predefined_entities = true,
- utfize_entities = true,
- resolve_predefined_entities = true,
- resolve_entities = function(str) return entityconverter(id,str) end, -- needed for mathml
+ unify_predefined_entities = false, -- is also default
+ utfize_entities = true, -- is also default
+ resolve_predefined_entities = true, -- is also default
+ resolve_entities = function(str,ent) return entityconverter(id,str,ent) end,
currentresource = tostring(currentresource or id),
}
if compress and compress == variables.yes then
settings.strip_cm_and_dt = true
end
- -- if entities and entities == variables.yes then
- -- settings.utfize_entities = true
- -- -- settings.resolve_entities = function (str) return entityconverter(id,str) end
- -- end
return xml.convert(data,settings)
end
-function lxml.load(id,filename,compress,entities)
+lxml.convert = lxmlconvert
+
+function lxml.load(id,filename,compress)
filename = ctxrunner.preparedfile(filename)
if trace_loading then
report_lxml("loading file %a as %a",filename,id)
end
noffiles, nofconverted = noffiles + 1, nofconverted + 1
- -- local xmltable = xml.load(filename)
starttiming(xml)
local ok, data = resolvers.loadbinfile(filename)
- local xmltable = lxml.convert(id,(ok and data) or "",compress,entities,format("id: %s, file: %s",id,filename))
+ local xmltable = lxmlconvert(id,(ok and data) or "",compress,format("id: %s, file: %s",id,filename))
stoptiming(xml)
lxml.store(id,xmltable,filename)
return xmltable, filename
@@ -535,38 +635,34 @@ function lxml.save(id,name)
xml.save(getid(id),name)
end
-function xml.getbuffer(name,compress,entities) -- we need to make sure that commands are processed
+function xml.getbuffer(name,compress) -- we need to make sure that commands are processed
if not name or name == "" then
name = tex.jobname
end
nofconverted = nofconverted + 1
local data = buffers.getcontent(name)
- xmltostring(lxml.convert(name,data,compress,entities,format("buffer: %s",tostring(name or "?")))) -- one buffer
+ xmltostring(lxmlconvert(name,data,compress,format("buffer: %s",tostring(name or "?")))) -- one buffer
end
-function lxml.loadbuffer(id,name,compress,entities)
+function lxml.loadbuffer(id,name,compress)
starttiming(xml)
nofconverted = nofconverted + 1
local data = buffers.collectcontent(name or id) -- name can be list
- local xmltable = lxml.convert(id,data,compress,entities,format("buffer: %s",tostring(name or id or "?")))
+ local xmltable = lxmlconvert(id,data,compress,format("buffer: %s",tostring(name or id or "?")))
lxml.store(id,xmltable)
stoptiming(xml)
return xmltable, name or id
end
-function lxml.loaddata(id,str,compress,entities)
+function lxml.loaddata(id,str,compress)
starttiming(xml)
nofconverted = nofconverted + 1
- local xmltable = lxml.convert(id,str or "",compress,entities,format("id: %s",id))
+ local xmltable = lxmlconvert(id,str or "",compress,format("id: %s",id))
lxml.store(id,xmltable)
stoptiming(xml)
return xmltable, id
end
-function lxml.loadregistered(id)
- return loaded[id], id
-end
-
-- e.command:
--
-- string : setup
@@ -586,6 +682,21 @@ end
local default_element_handler = xml.gethandlers("verbose").functions["@el@"]
+-- local xmlw = setmetatableindex(function(t,k)
+-- local v = setmetatableindex(function(t,kk)
+-- local v
+-- if kk == false then
+-- v = "\\xmlw{" .. k .. "}{"
+-- else
+-- v = "\\xmlw{" .. k .. "}{" .. kk .. "::"
+-- end
+-- t[kk] = v
+-- return v
+-- end)
+-- t[k]= v
+-- return v
+-- end)
+
local function tex_element(e,handlers)
local command = e.command
if command == nil then
@@ -606,9 +717,11 @@ local function tex_element(e,handlers)
end
-- faster than context.xmlw
contextsprint(ctxcatcodes,"\\xmlw{",command,"}{",rootname,"::",ix,"}")
+ -- contextsprint(ctxcatcodes,xmlw[command][rootname],ix,"}")
else
report_lxml("fatal error: no index for %a",command)
contextsprint(ctxcatcodes,"\\xmlw{",command,"}{",ix or 0,"}")
+ -- contextsprint(ctxcatcodes,xmlw[command][false],ix or 0,"}")
end
elseif tc == "function" then
command(e)
@@ -678,11 +791,16 @@ local function tex_cdata(e,handlers)
end
end
+-- we could try to merge the conversion and flusher but we don't gain much and it makes tracing
+-- harder: xunspecialized = utf.remapper(xml.specialcodes,"dynamic",lxml.resolvedentity)
+
local function tex_text(e)
- e = xmlunprivatized(e)
+ e = xmlunspecialized(e)
lpegmatch(xmltextcapture,e)
end
+--
+
local function ctx_text(e) -- can be just context(e) as we split there
lpegmatch(ctxtextcapture,e)
end
@@ -711,7 +829,7 @@ lxml.xmltexhandler = xmltexhandler
-- begin of test
local function tex_space(e)
- e = xmlunprivatized(e)
+ e = xmlunspecialized(e)
lpegmatch(xmlspacecapture,e)
end
@@ -729,7 +847,7 @@ local xmltexspacehandler = xml.newhandlers {
}
local function tex_line(e)
- e = xmlunprivatized(e)
+ e = xmlunspecialized(e)
lpegmatch(xmllinecapture,e)
end
@@ -785,13 +903,13 @@ local function sprint(root) -- check rawroot usage
local tr = type(root)
if tr == "string" then -- can also be result of lpath
-- rawroot = false -- ?
- root = xmlunprivatized(root)
+ root = xmlunspecialized(root)
lpegmatch(xmltextcapture,root)
elseif tr == "table" then
if forceraw then
rawroot = root
-- contextsprint(ctxcatcodes,xmltostring(root)) -- goes wrong with % etc
- root = xmlunprivatized(xmltostring(root))
+ root = xmlunspecialized(xmltostring(root))
lpegmatch(xmltextcapture,root) -- goes to toc
else
xmlserialize(root,xmltexhandler)
@@ -812,7 +930,7 @@ local function tprint(root) -- we can move sprint inline
end
end
elseif tr == "string" then
- root = xmlunprivatized(root)
+ root = xmlunspecialized(root)
lpegmatch(xmltextcapture,root)
end
end
@@ -823,14 +941,14 @@ local function cprint(root) -- content
-- quit
elseif type(root) == 'string' then
-- rawroot = false
- root = xmlunprivatized(root)
+ root = xmlunspecialized(root)
lpegmatch(xmltextcapture,root)
else
local rootdt = root.dt
if forceraw then
rawroot = root
-- contextsprint(ctxcatcodes,xmltostring(rootdt or root))
- root = xmlunprivatized(xmltostring(root))
+ root = xmlunspecialized(xmltostring(root))
lpegmatch(xmltextcapture,root) -- goes to toc
else
xmlserialize(rootdt or root,xmltexhandler)
@@ -1205,6 +1323,9 @@ local function index(collected,n)
contextsprint(ctxcatcodes,0) -- why ctxcatcodes
end
+-- the number of commands is often relative small but there can be many calls
+-- to this finalizer
+
local function command(collected,cmd,otherwise)
local n = collected and #collected
if n and n > 0 then
@@ -1214,7 +1335,7 @@ local function command(collected,cmd,otherwise)
local ix = e.ix
local name = e.name
if name and not ix then
- lxml.addindex(name,false,true)
+ addindex(name,false,true)
ix = e.ix
end
if not ix or not name then
@@ -1230,6 +1351,45 @@ local function command(collected,cmd,otherwise)
end
end
+-- local wildcards = setmetatableindex(function(t,k)
+-- local v = false
+-- if find(k,"%*") then
+-- v = setmetatableindex(function(t,kk)
+-- local v = gsub(k,"%*",kk)
+-- t[k] = v
+-- -- report_lxml("wildcard %a key %a value %a",kk,k,v)
+-- return v
+-- end)
+-- end
+-- t[k] = v
+-- return v
+-- end)
+--
+-- local function command(collected,cmd,otherwise)
+-- local n = collected and #collected
+-- if n and n > 0 then
+-- local wildcard = wildcards[cmd]
+-- for c=1,n do -- maybe optimize for n=1
+-- local e = collected[c]
+-- local ix = e.ix
+-- local name = e.name
+-- if name and not ix then
+-- addindex(name,false,true)
+-- ix = e.ix
+-- end
+-- if not ix or not name then
+-- report_lxml("no valid node index for element %a using command %s",name or "?",cmd)
+-- elseif wildcard then
+-- contextsprint(ctxcatcodes,"\\xmlw{",wildcard[e.tg],"}{",name,"::",ix,"}")
+-- else
+-- contextsprint(ctxcatcodes,"\\xmlw{",cmd,"}{",name,"::",ix,"}")
+-- end
+-- end
+-- elseif otherwise then
+-- contextsprint(ctxcatcodes,"\\xmlw{",otherwise,"}{#1}")
+-- end
+-- end
+
local function attribute(collected,a,default)
if collected and #collected > 0 then
local at = collected[1].at
@@ -1260,6 +1420,35 @@ local function chainattribute(collected,arguments) -- todo: optional levels
end
end
+local function chainpath(collected,nonamespace)
+ if collected and #collected > 0 then
+ local e = collected[1]
+ local t = { }
+ while e do
+ local tg = e.tg
+ local rt = e.__p__
+ local ns = e.ns
+ if tg == "@rt@" then
+ break
+ elseif rt.tg == "@rt@" then
+ if nonamespace or not ns or ns == "" then
+ t[#t+1] = tg
+ else
+ t[#t+1] = ns .. ":" .. tg
+ end
+ else
+ if nonamespace or not ns or ns == "" then
+ t[#t+1] = tg .. "[" .. e.ei .. "]"
+ else
+ t[#t+1] = ns .. ":" .. tg .. "[" .. e.ei .. "]"
+ end
+ end
+ e = rt
+ end
+ contextsprint(notcatcodes,concat(reversed(t),"/"))
+ end
+end
+
local function text(collected)
if collected then
local nc = #collected
@@ -1377,6 +1566,7 @@ texfinalizers.index = index
texfinalizers.concat = concat
texfinalizers.concatrange = concatrange
texfinalizers.chainattribute = chainattribute
+texfinalizers.chainpath = chainpath
texfinalizers.default = all -- !!
local concat = table.concat
@@ -1501,21 +1691,36 @@ end
function lxml.raw(id,pattern) -- the content, untouched by commands
local collected = (pattern and xmlapplylpath(getid(id),pattern)) or getid(id)
if collected and #collected > 0 then
- contextsprint(notcatcodes,xmltostring(collected[1].dt))
+ local s = xmltostring(collected[1].dt)
+ if s ~= "" then
+ contextsprint(notcatcodes,s)
+ end
+ end
+end
+
+-- templates
+
+function lxml.rawtex(id,pattern) -- the content, untouched by commands
+ local collected = (pattern and xmlapplylpath(getid(id),pattern)) or getid(id)
+ if collected and #collected > 0 then
+ local s = xmltostring(collected[1].dt)
+ if s ~= "" then
+ contextsprint(notcatcodes,lpegmatch(p_texescape,s) or s)
+ end
end
end
function lxml.context(id,pattern) -- the content, untouched by commands
if pattern then
- local collected = xmlapplylpath(getid(id),pattern) or getid(id)
+ local collected = xmlapplylpath(getid(id),pattern)
if collected and #collected > 0 then
- contextsprint(ctxcatcodes,collected[1].dt)
+ ctx_text(collected[1].dt[1])
end
else
local collected = getid(id)
if collected then
local dt = collected.dt
- if #dt > 0 then
+ if dt and #dt > 0 then
ctx_text(dt[1])
end
end
@@ -1523,9 +1728,34 @@ function lxml.context(id,pattern) -- the content, untouched by commands
end
function lxml.text(id,pattern)
- local collected = (pattern and xmlapplylpath(getid(id),pattern)) or getid(id)
- if collected and #collected > 0 then
- text(collected)
+ if pattern then
+ local collected = xmlapplylpath(getid(id),pattern)
+ if collected and #collected > 0 then
+ text(collected)
+ end
+ else
+ local e = getid(id)
+ if e then
+ text(e.dt)
+ end
+ end
+end
+
+function lxml.pure(id,pattern)
+ if pattern then
+ local collected = xmlapplylpath(getid(id),pattern)
+ if collected and #collected > 0 then
+ parsedentity = unescapedentity
+ text(collected)
+ parsedentity = reparsedentity
+ end
+ else
+ parsedentity = unescapedentity
+ local e = getid(id)
+ if e then
+ text(e.dt)
+ end
+ parsedentity = reparsedentity
end
end
@@ -1539,6 +1769,10 @@ function lxml.chainattribute(id,pattern,a,default)
chainattribute(xmlapplylpath(getid(id),pattern),a,default)
end
+function lxml.path(id,pattern,nonamespace)
+ chainpath(xmlapplylpath(getid(id),pattern),nonamespace)
+end
+
function lxml.concatrange(id,pattern,start,stop,separator,lastseparator,textonly) -- test this on mml
concatrange(xmlapplylpath(getid(id),pattern),start,stop,separator,lastseparator,textonly)
end
@@ -1573,47 +1807,88 @@ end
--
-- no need for an assignment so:
-function lxml.att(id,a,default)
- local e = getid(id)
- if e then
- local at = e.at
- if at then
- -- normally always true
- local str = at[a]
- if not str then
- if default and default ~= "" then
- contextsprint(notcatcodes,default)
+-- function lxml.att(id,a,default)
+-- local e = getid(id)
+-- if e then
+-- local at = e.at
+-- if at then
+-- -- normally always true
+-- local str = at[a]
+-- if not str then
+-- if default and default ~= "" then
+-- contextsprint(notcatcodes,default)
+-- end
+-- elseif str ~= "" then
+-- contextsprint(notcatcodes,str)
+-- else
+-- -- explicit empty is valid
+-- end
+-- elseif default and default ~= "" then
+-- contextsprint(notcatcodes,default)
+-- end
+-- elseif default and default ~= "" then
+-- contextsprint(notcatcodes,default)
+-- end
+-- end
+
+do
+
+ local att
+
+ function lxml.att(id,a,default)
+ local e = getid(id)
+ if e then
+ local at = e.at
+ if at then
+ -- normally always true
+ att = at[a]
+ if not att then
+ if default and default ~= "" then
+ att = default
+ contextsprint(notcatcodes,default)
+ end
+ elseif att ~= "" then
+ contextsprint(notcatcodes,att)
+ else
+ -- explicit empty is valid
end
- elseif str ~= "" then
- contextsprint(notcatcodes,str)
- else
- -- explicit empty is valid
+ elseif default and default ~= "" then
+ att = default
+ contextsprint(notcatcodes,default)
end
elseif default and default ~= "" then
+ att = default
contextsprint(notcatcodes,default)
+ else
+ att = ""
end
- elseif default and default ~= "" then
- contextsprint(notcatcodes,default)
end
-end
-function lxml.refatt(id,a)
- local e = getid(id)
- if e then
- local at = e.at
- if at then
- local str = at[a]
- if str and str ~= "" then
- str = gsub(str,"^#+","")
- if str ~= "" then
- contextsprint(notcatcodes,str)
+ function lxml.refatt(id,a)
+ local e = getid(id)
+ if e then
+ local at = e.at
+ if at then
+ att = at[a]
+ if att and att ~= "" then
+ att = gsub(att,"^#+","")
+ if att ~= "" then
+ contextsprint(notcatcodes,att)
+ return
+ end
end
end
end
+ att = ""
+ end
+
+ function lxml.lastatt()
+ contextsprint(notcatcodes,att)
end
+
end
-function lxml.name(id) -- or remapped name? -> lxml.info, combine
+function lxml.name(id)
local e = getid(id)
if e then
local ns = e.rn or e.ns
@@ -1625,7 +1900,7 @@ function lxml.name(id) -- or remapped name? -> lxml.info, combine
end
end
-function lxml.match(id) -- or remapped name? -> lxml.info, combine
+function lxml.match(id)
local e = getid(id)
contextsprint(ctxcatcodes,e and e.mi or 0)
end
@@ -1640,7 +1915,7 @@ function lxml.tag(id) -- tag vs name -> also in l-xml tag->name
end
end
-function lxml.namespace(id) -- or remapped name?
+function lxml.namespace(id)
local e = getid(id)
if e then
local ns = e.rn or e.ns
@@ -1660,6 +1935,13 @@ function lxml.flush(id)
end
end
+function lxml.lastmatch()
+ local collected = xmllastmatch()
+ if collected then
+ all(collected)
+ end
+end
+
function lxml.snippet(id,i)
local e = getid(id)
if e then
@@ -1710,10 +1992,6 @@ function lxml.elements(id,pattern,reverse)
return xmlelements(getid(id),pattern,reverse)
end
--- obscure ones
-
-lxml.info = lxml.name
-
-- testers
local found, empty = xml.found, xml.empty
@@ -1736,7 +2014,7 @@ local function checkedempty(id,pattern)
local nt = #dt
return (nt == 0) or (nt == 1 and dt[1] == "")
else
- return isempty(getid(id),pattern)
+ return empty(getid(id),pattern)
end
end
@@ -1921,7 +2199,7 @@ xml.pihandlers["injector"] = function(category,rest,e)
end
end
-local pattern = P("context-") * C((1-lpeg.patterns.whitespace)^1) * C(P(1)^1)
+local pattern = P("context-") * C((1-patterns.whitespace)^1) * C(P(1)^1)
function lxml.applyselectors(id)
local root = getid(id)
@@ -1940,19 +2218,23 @@ function lxml.applyselectors(id)
local categories = options_to_hash(rest)
if categories["begin"] then
local okay = false
- for k, v in next, permitted do
- if categories[k] then
- okay = k
- break
+ if permitted then
+ for k, v in next, permitted do
+ if categories[k] then
+ okay = k
+ break
+ end
end
end
- if not trace_selectors then
- -- skip
- elseif okay then
- report_lxml("accepting selector: %s",okay)
+ if okay then
+ if trace_selectors then
+ report_lxml("accepting selector: %s",okay)
+ end
else
categories.begin = false
- report_lxml("rejecting selector: % t",sortedkeys(categories))
+ if trace_selectors then
+ report_lxml("rejecting selector: % t",sortedkeys(categories))
+ end
end
for j=i,ndt do
local dtj = dt[j]
@@ -1982,19 +2264,23 @@ function lxml.applyselectors(id)
local categories = options_to_hash(rest)
if categories["begin"] then
local okay = false
- for k, v in next, permitted do
- if categories[k] then
- okay = k
- break
+ if permitted then
+ for k, v in next, permitted do
+ if categories[k] then
+ okay = k
+ break
+ end
end
end
- if not trace_selectors then
- -- skip
- elseif okay then
- report_lxml("accepting include: %s",okay)
+ if okay then
+ if trace_selectors then
+ report_lxml("accepting include: %s",okay)
+ end
else
categories.begin = false
- report_lxml("rejecting include: % t",sortedkeys(categories))
+ if trace_selectors then
+ report_lxml("rejecting include: % t",sortedkeys(categories))
+ end
end
if okay then
for j=i,ndt do
diff --git a/Master/texmf-dist/tex/context/base/lxml-xml.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-xml.lua
index d0e25607820..d0e25607820 100644
--- a/Master/texmf-dist/tex/context/base/lxml-xml.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-xml.lua
diff --git a/Master/texmf-dist/tex/context/base/mkiv/m-newcolumnsets.mkiv b/Master/texmf-dist/tex/context/base/mkiv/m-newcolumnsets.mkiv
new file mode 100644
index 00000000000..e0fe60f3f4d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/m-newcolumnsets.mkiv
@@ -0,0 +1,38 @@
+%D \module
+%D [ file=m-newcolumnsets,
+%D version=2016.02.29,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=New Columnsets,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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 will eventually be replaced by \type {m-oldcolumnsets}.
+
+\ifdefined \definepagegrid
+ \expandafter \endinput
+\else
+ \loadmarkfile{page-cst}
+\fi
+
+% \let\definecolumnset \definepagegrid
+% \let\setupcolumnset \setuppagegrid
+% \let\setupcolumnsetlines \setuppagegridlines
+% \let\setupcolumnsetstart \setuppagegridstart
+% \let\startcolumnset \startpagegrid
+% \let\stopcolumnset \stoppagegrid
+% \let\definecolumnsetspan \definepagegridspan
+% \let\setupcolumnsetspan \setuppagegridspan
+% \let\startcolumnsetspan \startpagegridspan
+% \let\stopcolumnsetspan \stoppagegridspan
+% \let\columnsetspanwidth \pagegridspanwidth
+% \let\definecolumnsetarea \definepagegridarea
+% \let\setupcolumnsetarea \setuppagegridarea
+% \let\setupcolumnsetareatext\setuppagegridareatext
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/context/base/m-oldbibtex.mkiv b/Master/texmf-dist/tex/context/base/mkiv/m-oldbibtex.mkiv
index 08c23e7cc87..08c23e7cc87 100644
--- a/Master/texmf-dist/tex/context/base/m-oldbibtex.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/m-oldbibtex.mkiv
diff --git a/Master/texmf-dist/tex/context/base/mkiv/m-oldotf.mkiv b/Master/texmf-dist/tex/context/base/mkiv/m-oldotf.mkiv
new file mode 100644
index 00000000000..c7c468d93ec
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/m-oldotf.mkiv
@@ -0,0 +1,77 @@
+%D \module
+%D [ file=m-oldotf,
+%D version=2015.07.08,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=Traditional OTF Loader,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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
+
+\startluacode
+ local files = {
+ "font-otf",
+ "font-otb",
+ "font-inj",
+-- "font-ota",
+ "font-otn",
+ "font-otd",
+ "font-otp",
+ "font-otc",
+ "font-oth",
+ "font-odv",
+ "font-map",
+ "font-fbk",
+ "font-gds",
+ }
+ local report = logs.reporter("oldotf")
+ local findfile = resolvers.findfile
+ local addsuffix = file.addsuffix
+ report()
+ report("using traditional font loader code")
+ report()
+ for i=1,#files do
+ local foundfile = findfile(addsuffix(files[i],"lua"))
+ if foundfile and foundfile ~= "" then
+ report("loading %a",foundfile)
+ dofile(foundfile)
+ end
+ end
+ report()
+
+ -- needed for testing:
+
+ local nuts = nodes.nuts
+ local copy_node = nuts.copy
+ local kern = nuts.pool.register(nuts.pool.kern())
+ local setfield = nuts.setfield
+
+ nuts.setattr(kern,attributes.private('fontkern'),1) -- we can have several, attributes are shared
+
+ nodes.injections.installnewkern(function(k)
+ local c = copy_node(kern)
+ setfield(c,"kern",k)
+ return c
+ end)
+
+ directives.register("fonts.injections.fontkern", function(v) setfield(kern,"subtype",v and 0 or 1) end)
+
+ local fonts = fonts
+ local handlers = fonts.handlers
+ local otf = handlers.otf -- brrr
+ local afm = handlers.afm -- brrr
+ local getters = fonts.getters
+
+ getters.kern .opentype = otf.getkern
+ getters.substitution.opentype = otf.getsubstitution
+ getters.alternate .opentype = otf.getalternate
+ getters.multiple .opentype = otf.getmultiple
+
+\stopluacode
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/math-acc.mkvi b/Master/texmf-dist/tex/context/base/mkiv/math-acc.mkvi
index 415f2b91f2d..415f2b91f2d 100644
--- a/Master/texmf-dist/tex/context/base/math-acc.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-acc.mkvi
diff --git a/Master/texmf-dist/tex/context/base/math-act.lua b/Master/texmf-dist/tex/context/base/mkiv/math-act.lua
index d0ea789909c..d0ea789909c 100644
--- a/Master/texmf-dist/tex/context/base/math-act.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-act.lua
diff --git a/Master/texmf-dist/tex/context/base/math-ali.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-ali.mkiv
index bba55ba72c4..ebb20e33e31 100644
--- a/Master/texmf-dist/tex/context/base/math-ali.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-ali.mkiv
@@ -83,6 +83,8 @@
% use zeroskipplusfill
+% i really need to redo this eqno mess ... in lua
+
\def\math_prepare_r_eqalign_no
{\c_math_align_a{\strut\math_first_in_eqalign\hfil\math_left_of_equalign\span\math_math_in_eqalign{\alignmark\alignmark}\math_right_of_eqalign\tabskip\zeropoint}%
\c_math_align_b{\aligntab\math_next_in_eqalign\math_left_of_equalign\span\math_math_in_eqalign{\alignmark\alignmark}\math_right_of_eqalign\tabskip\zeropoint}%
@@ -98,7 +100,7 @@
\the\mathdisplayaligntweaks
\tabskip\centering}
-\def\math_prepare_l_eqalign_no
+\def\math_prepare_l_eqalign_no % \checkeddisplaymath
{\c_math_align_a{\strut\math_first_in_eqalign\hfil\math_left_of_equalign\span\math_math_in_eqalign{\alignmark\alignmark}\math_right_of_eqalign\tabskip\zeropoint}%
\c_math_align_b{\aligntab\math_next_in_eqalign\math_left_of_equalign\span\math_math_in_eqalign{\alignmark\alignmark}\math_right_of_eqalign\tabskip\zeropoint}%
% problem: number is handled after rest and so ends up in the margin
@@ -123,7 +125,7 @@
\let\math_finish_eqalign_no\relax
\fi
#1%
- \halign \ifcase\eqalignmode \or to \displaywidth \fi \expandafter {\the\scratchtoks\crcr#2\crcr}%
+ \halign \ifcase\eqalignmode \or to \checkeddisplaywidth \fi \expandafter {\the\scratchtoks\crcr#2\crcr}%
\math_finish_eqalign_no}
\def\math_both_eqalign_no_aligned#1%
@@ -139,7 +141,7 @@
\fi
\fi
#1%
- \halign \ifcase\eqalignmode \or to \displaywidth \fi \expandafter \bgroup\the\scratchtoks\crcr}
+ \halign \ifcase\eqalignmode \or to \checkeddisplaywidth \fi \expandafter \bgroup\the\scratchtoks\crcr}
\def\math_rlap#1%
{\setbox\scratchbox\hbox{#1}%
@@ -195,14 +197,32 @@
\let\NR\math_alignment_NR
\to \everymathalignment
+\let\math_alignment_snap_start\relax
+\let\math_alignment_snap_stop \relax
+
+% experimental
+
+\def\math_alignment_snap_start
+ {\ifgridsnapping
+ \snaptogrid[\v!both]\vbox\bgroup
+ \fi}
+
+\def\math_alignment_snap_stop
+ {\ifgridsnapping
+ \egroup
+ \fi}
+
+% end of experimental
+
\unexpanded\def\math_alignment_start#1%
{\edef\currentmathalignment{#1}%
\dosingleempty\math_alignment_start_indeed}
\def\math_alignment_start_indeed[#1]%
{% \begingroup not permitted ($$...assignments...\halign... )
+ \math_alignment_snap_start
\iffirstargument
- \setupmathalignment[\currentmathalignment][#1]%
+ \setupmathalignment[\currentmathalignment][#1]% bad! ungrouped
\fi
\the\everymathalignment
\c_math_eqalign_column\zerocount
@@ -217,7 +237,8 @@
\def\math_alignment_stop
{\math_finish_eqalign_no
\dostoptagged
- \dostoptagged}
+ \dostoptagged
+ \math_alignment_snap_stop}
\installcorenamespace{mathalignment}
\installcorenamespace{mathalignmentvariant}
@@ -694,10 +715,13 @@
\def\math_matrix_process#1#2%
{\dowithnextbox
{\scratchdimen\dimexpr(\nextboxdp-\nextboxht)/2 \ifcase#2\or+\mathaxisheight\textfont2\fi\relax
- \ifcase#1\relax\or\lower\scratchdimen\or\or\raise\scratchdimen\fi
- \hbox{$\mathmatrixparameter\c!left
- \vcenter{\unvbox\nextbox}%
- \mathmatrixparameter\c!right$}}%
+ \ifcase#1\relax\or\lower\scratchdimen\or\or\raise\scratchdimen\fi\hbox\bgroup
+ \normalstartimath
+ \mathmatrixparameter\c!left
+ \vcenter{\unvbox\nextbox}%
+ \mathmatrixparameter\c!right
+ \normalstopimath
+ \egroup}%
\vbox}
\unexpanded\def\installmathmatrixalignmethod#1#2%
@@ -915,7 +939,7 @@
\crcr}%
\mathsurround\zeropoint
\everycr\emptytoks
- \halign\bgroup\hfil$\scriptstyle\alignmark\alignmark$\hfil\crcr}
+ \halign\bgroup\hfil\normalstartimath\scriptstyle\alignmark\alignmark\normalstopimath\hfil\crcr}
\def\stopsubstack
{\crcr
@@ -977,9 +1001,9 @@
{\thinmuskip 0mu
\medmuskip -1mu
\thickmuskip -1mu
- \setbox\scratchbox\hbox{$#1\mathsurround\zeropoint$}%
+ \setbox\scratchbox\hbox{\normalstartimath#1\mathsurround\zeropoint\normalstopimath}%
\kern-\wd\scratchbox
- ${}#1{}\mathsurround\zeropoint$}%
+ \normalstartimath{}#1{}\mathsurround\zeropoint\normalstopimath}%
\ifdim\wd\scratchbox<\zeropoint
\endgroup
\expandafter\mathbin
@@ -1034,7 +1058,7 @@
\let\math_the_l_eq_no\empty
\unexpanded\def\startmathbox#1%
- {\hsize\displaywidth
+ {\hsize\displaywidth % \checkeddisplaymath
\global\mathnumberstatus\plusone
\mathraggedstatus#1\relax
\let\mathnumbercorrection\!!zeropoint
@@ -1049,7 +1073,7 @@
\let\normaleqno \eqno
% added
\strc_formulas_place_number
- \setbox\scratchbox\math_hbox to \displaywidth\bgroup
+ \setbox\scratchbox\math_hbox to \displaywidth\bgroup % \checkeddisplaymath
\mathinnerstrut
\startforceddisplaymath
\ifcase\mathraggedstatus\or\hfill\or\hfill\fi}
@@ -1078,7 +1102,8 @@
\egroup
\setbox0\hbox{\unhcopy\scratchbox}%
\scratchdimen\wd0
- \ifdim\scratchdimen>\displaywidth
+ % to be tested: \scratchdimen\naturalwd\scratchbox
+ \ifdim\scratchdimen>\displaywidth % \checkeddisplaymath
\donetrue
\else
\donefalse
@@ -1092,14 +1117,14 @@
\box\scratchbox
\else
\ifdone
- \vbox{\box\scratchbox\hbox to \displaywidth{\hss\math_box_llapped_math_no}}%
+ \vpack{\box\scratchbox\hpack to \displaywidth{\hss\math_box_llapped_math_no}}% \checkeddisplaymath
\else
\hss\box\scratchbox\math_box_llapped_math_no % hss makes room for number
\fi
\fi
\else
\ifdone
- \vbox{\hbox to \displaywidth{\math_box_rlapped_math_no\hss}\box\scratchbox}%
+ \vpack{\hpack to \displaywidth{\math_box_rlapped_math_no\hss}\box\scratchbox}% \checkeddisplaymath
\else
\math_box_rlapped_math_no\box\scratchbox\hss % hss makes room for number
\fi
diff --git a/Master/texmf-dist/tex/context/base/math-arr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-arr.mkiv
index 0e3a53f3219..28aad8adadf 100644
--- a/Master/texmf-dist/tex/context/base/math-arr.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-arr.mkiv
@@ -76,16 +76,18 @@
\mathsurround\zeropoint
\muskip0=\muexpr\m_math_arrows_factor\muexpr\thirdoffourarguments #2\onemuskip\relax+\m_math_arrows_extra\onemuskip+\firstoffourarguments #2\onemuskip\relax
\muskip2=\muexpr\m_math_arrows_factor\muexpr\fourthoffourarguments#2\onemuskip\relax+\m_math_arrows_extra\onemuskip+\secondoffourarguments#2\onemuskip\relax
- \setbox0\hbox{$\scriptstyle
- \mkern\muskip0\relax
- #5\relax
- \mkern\muskip2\relax
- $}%
- \setbox2\hbox{$\scriptstyle
- \mkern\muskip0\relax
- #4\relax
- \mkern\muskip2\relax
- $}%
+ \setbox0\hbox{\normalstartimath
+ \scriptstyle
+ \mkern\muskip0\relax
+ #5\relax
+ \mkern\muskip2\relax
+ \normalstopimath}%
+ \setbox2\hbox{\normalstartimath
+ \scriptstyle
+ \mkern\muskip0\relax
+ #4\relax
+ \mkern\muskip2\relax
+ \normalstopimath}%
\setbox4\hbox{#3\displaystyle}%
\dimen0\wd0\relax
\ifdim\wd2>\dimen0
@@ -118,11 +120,11 @@
\def\math_arrows_construct_double#1#2#3#4#5#6#7% opt l r sp rs top bot
{\mathrel
{\scratchdimen.32\exheight\relax % was .22, todo: make configurable
- \setbox0\hbox{$\math_arrows_construct{#1}{#2}{#4}{\phantom{#6}}{#7}$}%
- \setbox2\hbox{$\math_arrows_construct{#1}{#3}{#5}{#6}{\phantom{#7}}$}%
- \raise\scratchdimen\box0
- \kern-\wd2
- \lower\scratchdimen\box2}}
+ \setbox\scratchboxone\hbox{\normalstartimath\math_arrows_construct{#1}{#2}{#4}{\phantom{#6}}{#7}\normalstopimath}%
+ \setbox\scratchboxtwo\hbox{\normalstartimath\math_arrows_construct{#1}{#3}{#5}{#6}{\phantom{#7}}\normalstopimath}%
+ \raise\scratchdimen\box\scratchboxone
+ \kern-\wd\scratchboxtwo
+ \lower\scratchdimen\box\scratchboxtwo}}
%D \macros{definematharrow}
%D
@@ -211,7 +213,7 @@
{\ifcsname#1\endcsname
\pushmacro\math_arrows_do
\def\math_arrows_do[##1][##2]{\setuvalue{#1}{\math_arrows_do[#2][##2]}}%
- \getvalue{#1}%
+ \csname#1\endcsname
\popmacro\math_arrows_do
\fi}
@@ -254,12 +256,14 @@
%D different set of values need to be determined.
\def\mtharrowfill#1#2#3#4#5#6#7#8%
- {$\mathsurround\zeropoint
- \thickmuskip\zeromuskip\medmuskip\thickmuskip\thinmuskip\thickmuskip
- \relax#8#5%
- \mkern-#1\onemuskip
- \cleaders\hbox{$#8\mkern-#2\onemuskip#6\mkern-#3\onemuskip$}\hfill
- \mkern-#4\onemuskip#7$}
+ {\normalstartimath
+ \mathsurround\zeropoint
+ \thickmuskip\zeromuskip\medmuskip\thickmuskip\thinmuskip\thickmuskip
+ \relax#8#5%
+ \mkern-#1\onemuskip
+ \cleaders\hbox{\normalstartimath#8\mkern-#2\onemuskip#6\mkern-#3\onemuskip\normalstopimath}\hfill
+ \mkern-#4\onemuskip#7%
+ \normalstopimath}
\def\defaultmtharrowfill{\mtharrowfill 7227}
@@ -383,10 +387,17 @@
%D for harpoons.
\def\math_arrows_over_handle_indeed#1#2#3#4%
- {\vbox{\ialign{##\crcr
- #2#3\crcr
- \noalign{\kern#1\nointerlineskip}%
- $\mathsurround\zeropoint\hfil#3#4\hfil$\crcr}}}
+ {\vbox{\ialign{%
+ \alignmark\alignmark
+ \crcr
+ #2#3%
+ \crcr
+ \noalign{\kern#1\nointerlineskip}%
+ \normalstartimath
+ \mathsurround\zeropoint\hfil#3#4\hfil
+ \normalstopimath
+ \crcr
+ }}}
%D Now the under arrows
@@ -406,10 +417,15 @@
{\mathpalette{\math_arrows_under_handle_indeed{#1}{#2}}}
\def\math_arrows_under_handle_indeed#1#2#3#4%
- {\vtop{\ialign{##\crcr
- $\mathsurround\zeropoint\hfil#3#4\hfil$\crcr
- \noalign{\nointerlineskip\kern#1}%
- #2#3\crcr}}}
+ {\vtop{\ialign{%
+ \alignmark\alignmark
+ \crcr
+ \normalstartimath\mathsurround\zeropoint\hfil#3#4\hfil\normalstopimath
+ \crcr
+ \noalign{\nointerlineskip\kern#1}%
+ #2#3%
+ \crcr
+ }}}
%D Now we define the arrows
diff --git a/Master/texmf-dist/tex/context/base/math-def.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-def.mkiv
index 8247ac00849..a8af5af5cec 100644
--- a/Master/texmf-dist/tex/context/base/math-def.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-def.mkiv
@@ -75,7 +75,7 @@
\unexpanded\def\setoperatorlimits#1#2% operator limits
{\savenormalmeaning{#1}%
- \expandafter\def\expandafter#1\expandafter{\csname normal\strippedcsname#1\endcsname#2}}
+ \expandafter\def\expandafter#1\expandafter{\csname normal\csstring#1\endcsname#2}}
\setoperatorlimits \int \intlimits
\setoperatorlimits \iint \intlimits
@@ -148,7 +148,7 @@
\definemathcommand [equalscoloncolon] [rel] {=\coloncolon\colonsep}
\definemathcommand [coloncolonapprox] [rel] {\coloncolon\colonsep\approx}
\definemathcommand [approxcoloncolon] [rel] {\approx\coloncolon\colonsep}
-\definemathcommand [colonsim] [rel] {\coloncolon\colonsep\sim}
+\definemathcommand [coloncolonsim] [rel] {\coloncolon\colonsep\sim}
\definemathcommand [simcoloncolon] [rel] {\sim\coloncolon\colonsep}
% \appendtoks
diff --git a/Master/texmf-dist/tex/context/base/math-del.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-del.mkiv
index 1245d31de3e..be78b581f4f 100644
--- a/Master/texmf-dist/tex/context/base/math-del.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-del.mkiv
@@ -41,7 +41,7 @@
\setbox\scratchbox\hbox\bgroup
\let\left \leftfakedelimiter
\let\right\rightfakedelimiter
- $#1\expandafter$\expandafter
+ \normalstartimath#1\expandafter\normalstopimath\expandafter
\egroup
\expandafter\c_math_delimiter_nesting\the\c_math_delimiter_nesting\relax}
@@ -67,4 +67,55 @@
\def\mathopnolimits#1{\mathop{\mathrm#1}\nolimits} % was \rm, which follows text fonts (used in mml parser, check!)
\def\mathopdolimits#1{\mathop{\mathrm#1}} % was \rm, which follows text fonts (used in mml parser, check!)
+% A new experiment:
+
+\installcorenamespace {mathextensible}
+
+\installcommandhandler \??mathextensible {mathextensible} \??mathextensible
+
+\let\setupmathextensibles\setupmathextensible
+
+\setupmathextensibles
+ [\c!symbol=0,
+ \c!command=\v!yes,
+ \c!factor=1.5,
+ \c!height=\exheight,
+ \c!depth=\exheight]
+
+\appendtoks
+ \edef\p_command{\mathextensibleparameter\c!command}%
+ \ifx\p_command\v!yes
+ \setuevalue\currentmathextensible{\math_fenced_extensible[\currentmathextensible]}%
+ \fi
+\to \everydefinemathextensible
+
+\unexpanded\def\math_fenced_extensible
+ {\dodoubleempty\math_fenced_extensible_indeed}
+
+\unexpanded\def\math_fenced_extensible_indeed[#1][#2]%
+ {\mathop{%
+ \edef\currentmathextensible{#1}%
+ \edef\p_factor{\mathextensibleparameter\c!factor}%
+ \ifsecondargument
+ \doifassignmentelse{#2}
+ {\setupcurrentmathextensible[#2]}%
+ {\edef\p_factor{#2}}%
+ \fi
+ \Uvextensible
+ axis % can be an option
+ height \p_factor\dimexpr\mathextensibleparameter\c!height\relax
+ depth \p_factor\dimexpr\mathextensibleparameter\c!depth\relax
+ \Udelimiter\zerocount\zerocount\mathextensibleparameter\c!symbol
+ \relax}%
+ }
+
+\let\mathextensible\math_fenced_extensible
+
+% \startformula
+% \integral[factor=3] \frac{1}{2}
+% \integral[5] \frac{1}{2}
+% \stopformula
+
+\definemathextensible[integral][\c!symbol="222B]
+
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/math-dim.lua b/Master/texmf-dist/tex/context/base/mkiv/math-dim.lua
index f4fc7905e3e..b5241cb5a66 100644
--- a/Master/texmf-dist/tex/context/base/math-dim.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-dim.lua
@@ -39,6 +39,12 @@ local defaults = {
fraction_num_vgap = { default = { "FractionNumeratorGapMin", "default_rule_thickness" },
cramped_display_style = { "FractionNumeratorDisplayStyleGapMin", "3*default_rule_thickness" },
display_style = { "FractionNumeratorDisplayStyleGapMin", "3*default_rule_thickness" }, },
+ skewed_fraction_hgap = { default = { "SkewedFractionHorizontalGap", "math_quad/2" },
+ cramped_display_style = { "SkewedFractionHorizontalGap", "math_quad/2" },
+ display_style = { "SkewedFractionHorizontalGap", "math_quad/2" }, },
+ skewed_fraction_vgap = { default = { "SkewedFractionVerticalGap", "x_height" },
+ cramped_display_style = { "SkewedFractionVerticalGap", "x_height" },
+ display_style = { "SkewedFractionVerticalGap", "x_height" }, },
fraction_rule = { default = { "FractionRuleThickness", "default_rule_thickness" }, },
limit_above_bgap = { default = { "UpperLimitBaselineRiseMin", "big_op_spacing3" }, },
limit_above_vgap = { default = { "UpperLimitGapMin", "big_op_spacing1" }, },
diff --git a/Master/texmf-dist/tex/context/base/math-dir.lua b/Master/texmf-dist/tex/context/base/mkiv/math-dir.lua
index 0f871beede2..c9c2a38dddc 100644
--- a/Master/texmf-dist/tex/context/base/math-dir.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-dir.lua
@@ -31,9 +31,12 @@ local getnext = nuts.getnext
local getchar = nuts.getchar
local getid = nuts.getid
local getlist = nuts.getlist
-local setfield = nuts.setfield
local getattr = nuts.getattr
+local setfield = nuts.setfield
+local setchar = nuts.setchar
+local setlist = nuts.setlist
+
local insert_node_before = nuts.insert_before
local insert_node_after = nuts.insert_after
@@ -94,7 +97,7 @@ local function processmath(head)
if mirror then
local class = charclasses[char]
if class == "open" or class == "close" then
- setfield(current,"char",mirror)
+ setchar(current,mirror)
if trace_directions then
report_directions("mirrored: %C to %C",char,mirror)
end
@@ -107,7 +110,7 @@ local function processmath(head)
-- nothing
if id == hlist_code or id == vlist_code then
local list, d = processmath(getlist(current))
- setfield(current,"list",list)
+ setlist(current,list)
if d then
done = true
end
@@ -120,7 +123,7 @@ end
-- too often: needs checking
if id == hlist_code or id == vlist_code then
local list, d = processmath(getlist(current))
- setfield(current,"list",list)
+ setlist(current,list)
if d then
done = true
end
diff --git a/Master/texmf-dist/tex/context/base/math-dis.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-dis.mkiv
index 5b70970f3cc..5b70970f3cc 100644
--- a/Master/texmf-dist/tex/context/base/math-dis.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-dis.mkiv
diff --git a/Master/texmf-dist/tex/context/base/math-ext.lua b/Master/texmf-dist/tex/context/base/mkiv/math-ext.lua
index b00d6cde273..b00d6cde273 100644
--- a/Master/texmf-dist/tex/context/base/math-ext.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-ext.lua
diff --git a/Master/texmf-dist/tex/context/base/math-fbk.lua b/Master/texmf-dist/tex/context/base/mkiv/math-fbk.lua
index 76dd1ad9b1a..564ece8d7ca 100644
--- a/Master/texmf-dist/tex/context/base/math-fbk.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-fbk.lua
@@ -12,6 +12,7 @@ local report_fallbacks = logs.reporter("math","fallbacks")
local formatters = string.formatters
local fastcopy = table.fastcopy
+local byte = string.byte
local fallbacks = { }
mathematics.fallbacks = fallbacks
@@ -337,7 +338,7 @@ local function accent_to_extensible(target,newchr,original,oldchr,height,depth,s
local addprivate = fonts.helpers.addprivate
if swap then
swap = characters[swap]
- height = swap.depth
+ height = swap.depth or 0
depth = 0
else
height = height or 0
@@ -421,6 +422,53 @@ end
virtualcharacters[0xFE33E] = virtualcharacters[0x203E] -- convenient
virtualcharacters[0xFE33F] = virtualcharacters[0x203E] -- convenient
+-- spacing
+
+local c_zero = byte('0')
+local c_period = byte('.')
+
+local function spacefraction(data,fraction)
+ local width = fraction * data.target.parameters.space
+ return {
+ width = width,
+ commands = { right = width }
+ }
+end
+
+local function charfraction(data,char)
+ local width = data.target.characters[char].width
+ return {
+ width = width,
+ commands = { right = width }
+ }
+end
+
+local function quadfraction(data,fraction)
+ local width = fraction * data.target.parameters.quad
+ return {
+ width = width,
+ commands = { right = width }
+ }
+end
+
+virtualcharacters[0x00A0] = function(data) return spacefraction(data,1) end -- nbsp
+virtualcharacters[0x2000] = function(data) return quadfraction (data,1/2) end -- enquad
+virtualcharacters[0x2001] = function(data) return quadfraction (data,1) end -- emquad
+virtualcharacters[0x2002] = function(data) return quadfraction (data,1/2) end -- enspace
+virtualcharacters[0x2003] = function(data) return quadfraction (data,1) end -- emspace
+virtualcharacters[0x2004] = function(data) return quadfraction (data,1/3) end -- threeperemspace
+virtualcharacters[0x2005] = function(data) return quadfraction (data,1/4) end -- fourperemspace
+virtualcharacters[0x2006] = function(data) return quadfraction (data,1/6) end -- sixperemspace
+virtualcharacters[0x2007] = function(data) return charfraction (data,c_zero) end -- figurespace
+virtualcharacters[0x2008] = function(data) return charfraction (data,c_period) end -- punctuationspace
+virtualcharacters[0x2009] = function(data) return quadfraction (data,1/8) end -- breakablethinspace
+virtualcharacters[0x200A] = function(data) return quadfraction (data,1/8) end -- hairspace
+virtualcharacters[0x200B] = function(data) return quadfraction (data,0) end -- zerowidthspace
+virtualcharacters[0x202F] = function(data) return quadfraction (data,1/8) end -- narrownobreakspace
+virtualcharacters[0x205F] = function(data) return spacefraction(data,1/2) end -- math thinspace
+
+--
+
local function smashed(data,unicode,swap,private)
local target = data.target
local original = data.original
diff --git a/Master/texmf-dist/tex/context/base/math-fen.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-fen.mkiv
index 9570eac83b7..81e39723d3c 100644
--- a/Master/texmf-dist/tex/context/base/math-fen.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-fen.mkiv
@@ -108,7 +108,8 @@
#2%
\math_fenced_right
\stopusemathstyleparameter
- \endgroup}
+ \endgroup
+ \advance\c_math_fenced_nesting\minusone}
\appendtoks
\let\fenced\math_fenced_fenced
@@ -131,7 +132,7 @@
\definemathfence [angle] [\c!left="27E8,\c!right="27E9]
\definemathfence [doubleangle] [\c!left="27EA,\c!right="27EB]
\definemathfence [solidus] [\c!left="2044,\c!right="2044]
-\definemathfence [ceil] [\c!left="2308,\c!right="2309]
+\definemathfence [ceiling] [\c!left="2308,\c!right="2309]
\definemathfence [floor] [\c!left="230A,\c!right="230B]
\definemathfence [moustache] [\c!left="23B0,\c!right="23B1]
\definemathfence [uppercorner] [\c!left="231C,\c!right="231D]
@@ -152,7 +153,7 @@
\definemathfence [mirroredangle] [mirrored] [\c!right="27E8,\c!left="27E9]
\definemathfence [mirroreddoubleangle] [mirrored] [\c!right="27EA,\c!left="27EB]
\definemathfence [mirroredsolidus] [mirrored] [\c!right="2044,\c!left="2044]
-\definemathfence [mirroredceil] [mirrored] [\c!right="2308,\c!left="2309]
+\definemathfence [mirroredceiling] [mirrored] [\c!right="2308,\c!left="2309]
\definemathfence [mirroredfloor] [mirrored] [\c!right="230A,\c!left="230B]
\definemathfence [mirroredmoustache] [mirrored] [\c!right="23B0,\c!left="23B1]
\definemathfence [mirroreduppercorner] [mirrored] [\c!right="231C,\c!left="231D]
@@ -164,7 +165,7 @@
%D A bonus:
-\unexpanded\def\Lparent {\math_fenced_fenced_start{parenthesis}} \unexpanded\def\Rparent {\math_fenced_fenced_stop {parenthesis}}
+\unexpanded\def\Lparenthesis {\math_fenced_fenced_start{parenthesis}} \unexpanded\def\Rparenthesis {\math_fenced_fenced_stop {parenthesis}}
\unexpanded\def\Lbracket {\math_fenced_fenced_start{bracket}} \unexpanded\def\Rbracket {\math_fenced_fenced_stop {bracket}}
\unexpanded\def\Lbrace {\math_fenced_fenced_start{brace}} \unexpanded\def\Rbrace {\math_fenced_fenced_stop {brace}}
\unexpanded\def\Langle {\math_fenced_fenced_start{angle}} \unexpanded\def\Rangle {\math_fenced_fenced_stop {angle}}
@@ -174,7 +175,7 @@
\unexpanded\def\Ltriplebar {\math_fenced_fenced_start{triplebar}} \unexpanded\def\Rtriplebar {\math_fenced_fenced_stop {triplebar}}
\unexpanded\def\Lsolidus {\math_fenced_fenced_start{solidus}} \unexpanded\def\Rsolidus {\math_fenced_fenced_stop {solidus}}
\unexpanded\def\Lfloor {\math_fenced_fenced_start{floor}} \unexpanded\def\Rfloor {\math_fenced_fenced_stop {floor}}
-\unexpanded\def\Lceil {\math_fenced_fenced_start{ceil}} \unexpanded\def\Rceil {\math_fenced_fenced_stop {ceil}}
+\unexpanded\def\Lceiling {\math_fenced_fenced_start{ceiling}} \unexpanded\def\Rceiling {\math_fenced_fenced_stop {ceiling}}
\unexpanded\def\Lmoustache {\math_fenced_fenced_start{moustache}} \unexpanded\def\Rmoustache {\math_fenced_fenced_stop {moustache}}
\unexpanded\def\Luppercorner {\math_fenced_fenced_start{uppercorner}} \unexpanded\def\Ruppercorner {\math_fenced_fenced_stop {uppercorner}}
\unexpanded\def\Llowercorner {\math_fenced_fenced_start{lowercorner}} \unexpanded\def\Rlowercorner {\math_fenced_fenced_stop {lowercorner}}
@@ -182,7 +183,7 @@
\unexpanded\def\Lopenbracket {\math_fenced_fenced_start{openbracket}} \unexpanded\def\Ropenbracket {\math_fenced_fenced_stop {openbracket}}
\unexpanded\def\Lnothing {\math_fenced_fenced_start{nothing}} \unexpanded\def\Rnothing {\math_fenced_fenced_stop {nothing}}
-\unexpanded\def\Lparentmirrored {\math_fenced_fenced_stop {mirroredparenthesis}} \unexpanded\def\Rparentmirrored {\math_fenced_fenced_start{mirroredparenthesis}}
+\unexpanded\def\Lparenthesismirrored {\math_fenced_fenced_stop {mirroredparenthesis}} \unexpanded\def\Rparenthesismirrored {\math_fenced_fenced_start{mirroredparenthesis}}
\unexpanded\def\Lbracketmirrored {\math_fenced_fenced_stop {mirroredbracket}} \unexpanded\def\Rbracketmirrored {\math_fenced_fenced_start{mirroredbracket}}
\unexpanded\def\Lbracemirrored {\math_fenced_fenced_stop {mirroredbrace}} \unexpanded\def\Rbracemirrored {\math_fenced_fenced_start{mirroredbrace}}
\unexpanded\def\Langlemirrored {\math_fenced_fenced_stop {mirroredangle}} \unexpanded\def\Ranglemirrored {\math_fenced_fenced_start{mirroredangle}}
@@ -192,7 +193,7 @@
\unexpanded\def\Ltriplebarmirrored {\math_fenced_fenced_stop {mirroredtriplebar}} \unexpanded\def\Rtriplebarmirrored {\math_fenced_fenced_start{mirroredtriplebar}}
\unexpanded\def\Lsolidusmirrored {\math_fenced_fenced_stop {mirroredsolidus}} \unexpanded\def\Rsolidusmirrored {\math_fenced_fenced_start{mirroredsolidus}}
\unexpanded\def\Lfloormirrored {\math_fenced_fenced_stop {mirroredfloor}} \unexpanded\def\Rfloormirrored {\math_fenced_fenced_start{mirroredfloor}}
-\unexpanded\def\Lceilmirrored {\math_fenced_fenced_stop {mirroredceil}} \unexpanded\def\Rceilmirrored {\math_fenced_fenced_start{mirroredceil}}
+\unexpanded\def\Lceilingmirrored {\math_fenced_fenced_stop {mirroredceiling}} \unexpanded\def\Rceilingmirrored {\math_fenced_fenced_start{mirroredceiling}}
\unexpanded\def\Lmoustachemirrored {\math_fenced_fenced_stop {mirroredmoustache}} \unexpanded\def\Rmoustachemirrored {\math_fenced_fenced_start{mirroredmoustache}}
\unexpanded\def\Luppercornermirrored {\math_fenced_fenced_stop {mirroreduppercorner}} \unexpanded\def\Ruppercornermirrored {\math_fenced_fenced_start{mirroreduppercorner}}
\unexpanded\def\Llowercornermirrored {\math_fenced_fenced_stop {mirroredlowercorner}} \unexpanded\def\Rlowercornermirrored {\math_fenced_fenced_start{mirroredlowercorner}}
@@ -216,48 +217,112 @@
\unexpanded\def\right {\afterassignment\math_right \let\nexttoken}
\unexpanded\def\middle{\afterassignment\math_middle\let\nexttoken}
+\let\leftorright\relax
+
\newconditional\c_math_fenced_done
\newconditional\c_math_fenced_unknown \settrue\c_math_fenced_unknown
-% maybe use \detokenize ...
+% maybe use \detokenize ... todo \lastnamedcs
+
+% \setvalue{\??mathleft \s!unknown}{\setfalse\c_math_fenced_done\ifconditional\c_math_fenced_unknown\normalleft \nexttoken\fi}
+% \setvalue{\??mathright \s!unknown}{\setfalse\c_math_fenced_done\ifconditional\c_math_fenced_unknown\normalright \nexttoken\fi}
+% \setvalue{\??mathmiddle\s!unknown}{\setfalse\c_math_fenced_done\ifconditional\c_math_fenced_unknown\normalmiddle\nexttoken\fi}
+%
+% \def\math_left
+% {\settrue\c_math_fenced_done
+% \edef\m_math_left{\meaning\nexttoken}%
+% \csname\??mathleft\ifcsname\??mathleft\m_math_left\endcsname\m_math_left\else\s!unknown\fi\endcsname}
+%
+% \def\math_right
+% {\settrue\c_math_fenced_done
+% \edef\m_math_right{\meaning\nexttoken}%
+% \csname\??mathright\ifcsname\??mathright\m_math_right\endcsname\m_math_right\else\s!unknown\fi\endcsname}
+%
+% \def\math_middle
+% {\settrue\c_math_fenced_done
+% \edef\m_math_middle{\meaning\nexttoken}%
+% \csname\??mathmiddle\ifcsname\??mathmiddle\m_math_middle\endcsname\m_math_middle\else\s!unknown\fi\endcsname}
+%
+% \unexpanded\def\lfence#1%
+% {\settrue\c_math_fenced_done
+% \let\nexttoken#1%
+% \edef\m_math_left{\meaning#1}%
+% \csname\??mathleft\ifcsname\??mathleft\m_math_left\endcsname\m_math_left\else\s!unknown\fi\endcsname}
+%
+% \unexpanded\def\rfence#1%
+% {\settrue\c_math_fenced_done
+% \let\nexttoken#1%
+% \edef\m_math_right{\meaning#1}%
+% \csname\??mathright\ifcsname\??mathright\m_math_right\endcsname\m_math_right\else\s!unknown\fi\endcsname}
+%
+% \unexpanded\def\mfence#1%
+% {\settrue\c_math_fenced_done
+% \let\nexttoken#1%
+% \edef\m_math_middle{\meaning#1}%
+% \csname\??mathmiddle\ifcsname\??mathmiddle\m_math_middle\endcsname\m_math_middle\else\s!unknown\fi\endcsname}
+
+\unexpanded\def\installmathfencepair#1#2#3#4%
+ {\expandafter\let\csname\??mathleft \meaning#1\endcsname#2%
+ \expandafter\let\csname\??mathright\meaning#3\endcsname#4}
+
+\def\math_unknown_left {\setfalse\c_math_fenced_done\ifconditional\c_math_fenced_unknown\normalleft \nexttoken\fi}
+\def\math_unknown_right {\setfalse\c_math_fenced_done\ifconditional\c_math_fenced_unknown\normalright \nexttoken\fi}
+\def\math_unknown_middle{\setfalse\c_math_fenced_done\ifconditional\c_math_fenced_unknown\normalmiddle\nexttoken\fi}
+
+\letvalue{\??mathleft \s!unknown}\math_unknown_left
+\letvalue{\??mathright \s!unknown}\math_unknown_right
+\letvalue{\??mathmiddle\s!unknown}\math_unknown_middle
\def\math_left
{\settrue\c_math_fenced_done
- \edef\m_math_left{\meaning\nexttoken}%
- \csname\??mathleft\ifcsname\??mathleft\m_math_left\endcsname\m_math_left\else\s!unknown\fi\endcsname}
+ \ifcsname\??mathleft\meaning\nexttoken\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\math_unknown_left
+ \fi}
\def\math_right
{\settrue\c_math_fenced_done
- \edef\m_math_right{\meaning\nexttoken}%
- \csname\??mathright\ifcsname\??mathright\m_math_right\endcsname\m_math_right\else\s!unknown\fi\endcsname}
+ \ifcsname\??mathright\meaning\nexttoken\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\math_unknown_right
+ \fi}
\def\math_middle
{\settrue\c_math_fenced_done
- \edef\m_math_middle{\meaning\nexttoken}%
- \csname\??mathmiddle\ifcsname\??mathmiddle\m_math_middle\endcsname\m_math_middle\else\s!unknown\fi\endcsname}
+ \ifcsname\??mathmiddle\meaning\nexttoken\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\math_unknown_middle
+ \fi}
\unexpanded\def\lfence#1%
{\settrue\c_math_fenced_done
- \edef\m_math_left{\meaning#1}%
- \csname\??mathleft\ifcsname\??mathleft\m_math_left\endcsname\m_math_left\else\s!unknown\fi\endcsname}
+ \let\nexttoken#1%
+ \ifcsname\??mathleft\meaning\nexttoken\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\math_unknown_left
+ \fi}
\unexpanded\def\rfence#1%
{\settrue\c_math_fenced_done
- \edef\m_math_right{\meaning#1}%
- \csname\??mathright\ifcsname\??mathright\m_math_right\endcsname\m_math_right\else\s!unknown\fi\endcsname}
+ \let\nexttoken#1%
+ \ifcsname\??mathright\meaning\nexttoken\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\math_unknown_right
+ \fi}
\unexpanded\def\mfence#1%
{\settrue\c_math_fenced_done
- \edef\m_math_middle{\meaning#1}%
- \csname\??mathmiddle\ifcsname\??mathmiddle\m_math_middle\endcsname\m_math_middle\else\s!unknown\fi\endcsname}
-
-\setvalue{\??mathleft \s!unknown}{\setfalse\c_math_fenced_done\ifconditional\c_math_fenced_unknown\normalleft \nexttoken\fi}
-\setvalue{\??mathright \s!unknown}{\setfalse\c_math_fenced_done\ifconditional\c_math_fenced_unknown\normalright \nexttoken\fi}
-\setvalue{\??mathmiddle\s!unknown}{\setfalse\c_math_fenced_done\ifconditional\c_math_fenced_unknown\normalmiddle\nexttoken\fi}
-
-\unexpanded\def\installmathfencepair#1#2#3#4%
- {\expandafter\let\csname\??mathleft \meaning#1\endcsname#2%
- \expandafter\let\csname\??mathright\meaning#3\endcsname#4}
+ \let\nexttoken#1%
+ \ifcsname\??mathmiddle\meaning\nexttoken\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\math_unknown_middle
+ \fi}
\normalexpanded{\installmathfencepair {|\detokenize {|}} \Ldoublebar {|\detokenize {|}} \Rdoublebar}
\normalexpanded{\installmathfencepair {|\detokenize{||}} \Ltriplebar {|\detokenize{||}} \Rtriplebar}
@@ -265,13 +330,15 @@
\installmathfencepair \bgroup \Lbrace \egroup \Rbrace
\installmathfencepair \egroup \Rbracemirrored \bgroup \Lbracemirrored
+\installmathfencepair \letteropenbrace \Lbrace \letterclosebrace \Rbrace % as we escape in mp textexts
+
\installmathfencepair . \Lnothing . \Rnothing
\installmathfencepair . \Rnothingmirrored . \Lnothingmirrored
\installmathfencepair [ \Lbracket ] \Rbracket
\installmathfencepair ] \Rbracketmirrored [ \Lbracketmirrored
-\installmathfencepair ( \Lparent ) \Rparent
+\installmathfencepair ( \Lparenthesis ) \Rparenthesis
\installmathfencepair ) \Rparentmirrored ( \Lparentmirrored
\installmathfencepair < \Langle > \Rangle
@@ -285,8 +352,8 @@
\installmathfencepair ⌊ \Lfloor ⌋ \Rfloor
\installmathfencepair ⌋ \Rfloormirrored ⌊ \Lfloormirrored
-\installmathfencepair ⌈ \Lceil ⌉ \Rceil
-\installmathfencepair ⌉ \Rceilmirrored ⌈ \Lceilmirrored
+\installmathfencepair ⌈ \Lceiling ⌉ \Rceiling
+\installmathfencepair ⌉ \Rceilingmirrored ⌈ \Lceilingmirrored
\installmathfencepair ⟨ \Langle ⟩ \Rangle
\installmathfencepair ⟩ \Ranglemirrored ⟨ \Langlemirrored
@@ -307,46 +374,72 @@
\ignorediscretionaries % so $\mtext{a|b}$ works, this is ok because it's an \hbox
\to \everymathematics
-% todo paren parent
-
-\let\lbrack\lbracket
-\let\rbrack\rbracket
-
-\installmathfencepair \lbrace \Lbrace \rbrace \Rbrace
-\installmathfencepair \lbracket \Lbracket \rbracket \Rbracket
-\installmathfencepair \lparen \Lparen \rparen \Rparen
-\installmathfencepair \lparent \Lparent \rparent \Rparent
-\installmathfencepair \langle \Langle \rangle \Rangle
-\installmathfencepair \lrangle \Ldoubleangle \rrangle \Rdoubleangle
-\installmathfencepair \lbar \Lbar \rbar \Rbar
-\installmathfencepair \lVert \Ldoublebar \rVert \Rdoublebar
-\installmathfencepair \vert \Lbar \vert \Rbar
-\installmathfencepair \solidus \Lsolidus \solidus \Rsolidus
-\installmathfencepair \lfloor \Lfloor \rfloor \Rfloor
-\installmathfencepair \lceil \Lceil \rceil \Rceil
-
-\installmathfencepair \ulcorner \Luppercorner \ulcorner \Ruppercorner
-\installmathfencepair \llcorner \Llowercorner \llcorner \Rlowercorner
-\installmathfencepair \lmoustache \Lmoustache \lmoustache \Rmoustache
-\installmathfencepair \llbracket \Lopenbracket \llbracket \Ropenbracket
-\installmathfencepair \lgroup \Lgroup \lgroup \Rgroup
+% We unofficial support some synonyms as we need them for some fuzzy web related math.
+
+% The names in char-def.lua (historic mess):
+
+\let\lbrack \lbracket
+\let\rbrack \rbracket
+\let\lceiling \lceil
+\let\rceiling \rceil
+\let\lparenthesis\lparent
+\let\rparenthesis\rparent
+\let\lparen \lparent
+\let\rparen \rparent
+
+% Just defined:
+
+\let\Lceil \Lceiling
+\let\Rceil \Rceiling
+\let\Lparent\Lparenthesis
+\let\Rparent\Rparenthesis
+\let\Lparen \Lparenthesis
+\let\Rparen \Rparenthesis
+
+\installmathfencepair \lbrace \Lbrace \rbrace \Rbrace
+\installmathfencepair \lbracket \Lbracket \rbracket \Rbracket
+\installmathfencepair \lbrack \Lbracket \rbracket \Rbracket
+\installmathfencepair \lparenthesis \Lparenthesis \rparenthesis \Rparenthesis
+\installmathfencepair \lparent \Lparenthesis \rparent \Rparenthesis
+\installmathfencepair \lparen \Lparenthesis \rparen \Rparenthesis
+\installmathfencepair \langle \Langle \rangle \Rangle
+\installmathfencepair \llangle \Ldoubleangle \rrangle \Rdoubleangle
+%installmathfencepair \lbar \Lbar \rbar \Rbar
+\installmathfencepair \lVert \Ldoublebar \rVert \Rdoublebar
+\installmathfencepair \vert \Lbar \vert \Rbar
+\installmathfencepair \solidus \Lsolidus \solidus \Rsolidus
+\installmathfencepair \lfloor \Lfloor \rfloor \Rfloor
+\installmathfencepair \lceiling \Lceiling \rceiling \Rceiling
+\installmathfencepair \lceil \Lceiling \rceil \Rceiling
+
+\installmathfencepair \ulcorner \Luppercorner \urcorner \Ruppercorner
+\installmathfencepair \llcorner \Llowercorner \lrcorner \Rlowercorner
+\installmathfencepair \lmoustache \Lmoustache \rmoustache \Rmoustache
+\installmathfencepair \llbracket \Lopenbracket \rrbracket \Ropenbracket
+\installmathfencepair \lgroup \Lgroup \rgroup \Rgroup
+
+\let\textlbar\lbar \let\mathlbar\Lbar
+\let\textrbar\lbar \let\mathrbar\Rbar
+
+\unexpanded\def\lbar{\mathortext\mathlbar\textlbar}
+\unexpanded\def\rbar{\mathortext\mathrbar\textrbar}
% \setupmathfences[color=darkgreen]
-\unexpanded\def\{{\mathortext\lbrace \letterleftbrace } % or maybe a chardef
-\unexpanded\def\}{\mathortext\rbrace \letterrightbrace } % or maybe a chardef
-\unexpanded\def\[{\mathortext\lbracket\letterleftbracket } % or maybe a chardef
-\unexpanded\def\]{\mathortext\rbracket\letterrightbracket} % or maybe a chardef
-\unexpanded\def\({\mathortext\lparent \letterleftparent } % or maybe a chardef
-\unexpanded\def\){\mathortext\rparent \letterrightparent } % or maybe a chardef
-\unexpanded\def\|{\mathortext\vert \letterbar } % or maybe a chardef
-%unexpanded\def\/{\mathortext\solidus \letterslash } % or maybe a chardef
-
-\installmathfencepair \{ \Lbrace \} \Rbrace
-\installmathfencepair \[ \Lbracket \] \Rbracket
-\installmathfencepair \( \Lparent \) \Rparent
-\installmathfencepair \< \Langle \> \Rangle
-\installmathfencepair \| \Lbar \| \Rbar
+\unexpanded\def\{{\mathortext\lbrace \letterleftbrace } % or maybe a chardef
+\unexpanded\def\}{\mathortext\rbrace \letterrightbrace } % or maybe a chardef
+\unexpanded\def\[{\mathortext\lbracket \letterleftbracket } % or maybe a chardef
+\unexpanded\def\]{\mathortext\rbracket \letterrightbracket } % or maybe a chardef
+\unexpanded\def\({\mathortext\lparenthesis\letterleftparenthesis } % or maybe a chardef
+\unexpanded\def\){\mathortext\rparenthesis\letterrightparenthesis} % or maybe a chardef
+\unexpanded\def\|{\mathortext\vert \letterbar } % or maybe a chardef
+%unexpanded\def\/{\mathortext\solidus \letterslash } % or maybe a chardef
+
+\installmathfencepair \{ \Lbrace \} \Rbrace
+\installmathfencepair \[ \Lbracket \] \Rbracket
+\installmathfencepair \( \Lparenthesis \) \Rparenthesis
+\installmathfencepair \< \Langle \> \Rangle
+\installmathfencepair \| \Lbar \| \Rbar
%D As we have overloaded \type {\left} and \type {\right} we also need a more
%D clever version of the following:
@@ -385,7 +478,7 @@
\attribute\mathsizeattribute\numexpr\bigmathdelimitervariant*\plushundred+#1\relax
\math_fenced_step#2\relax
\else
- \math_fenced_step#2{\vbox to\getvalue{\??mathbig\number#1}\bodyfontsize{}}%
+ \math_fenced_step#2{\vpack to\csname\??mathbig\number#1\endcsname\bodyfontsize{}}%
\fi
\nulldelimiterspace\zeropoint\relax
\mathsurround\zeropoint
@@ -439,6 +532,17 @@
\definemathcommand [Biggm] [rel] [one] {\Bigg}
\definemathcommand [Biggr] [close] [one] {\Bigg}
+% \definemathfence [integral] [\c!left="222B]
+%
+% \unexpanded\def\Lintegral {\math_fenced_fenced_start{integral}}
+% \unexpanded\def\Rintegral {\math_fenced_fenced_stop {integral}}
+%
+% \installmathfencepair \lintegral \Lintegral \rintegral \Rintegral
+%
+% \left\lintegral
+% \vrule height 3cm depth 3cm
+% \right\rintegral
+
%definemathfence [fancybracket] [bracket] [command=yes,color=red]
% experimental accents:
@@ -448,74 +552,165 @@
%D This is needed for mathml (used in mrow, so it gets reset):
-\let\math_fences_saved_left \left
-\let\math_fences_saved_middle\middle
-\let\math_fences_saved_right \right
+% old code:
+
+% \let\math_fences_saved_left \left
+% \let\math_fences_saved_middle\middle
+% \let\math_fences_saved_right \right
+%
+% % \def\math_fences_traced#1{\ruledhbox{\ttx#1\low{\the\c_math_fenced_nesting}}}
+%
+% \unexpanded\def\math_fences_checked_left
+% {%\math_fences_traced L%
+% \math_fences_saved_left}
+%
+% \unexpanded\def\math_fences_checked_middle
+% {%\math_fences_traced M%
+% \ifcase\c_math_fenced_nesting
+% \expandafter\math_fences_saved_middle
+% \else
+% \expandafter\firstofoneargument
+% \fi}
+%
+% \unexpanded\def\math_fences_checked_right
+% {%\math_fences_traced R%
+% \ifcase\c_math_fenced_nesting
+% \expandafter\firstofoneargument
+% \else
+% \expandafter\math_fences_saved_right
+% \fi}
+%
+% \newconditional\c_math_checked_done % only bars
+%
+% \unexpanded\def\math_fences_checked_left_or_right
+% {%\math_fences_traced B%
+% \ifcase\c_math_fenced_nesting
+% \settrue\c_math_checked_done
+% \expandafter\math_fences_saved_left
+% \else\ifconditional\c_math_checked_done
+% \setfalse\c_math_checked_done
+% \doubleexpandafter\math_fences_saved_right
+% \else
+% \doubleexpandafter\math_fences_saved_middle
+% \fi\fi}
+%
+% \unexpanded\def\math_fences_checked_start
+% {\c_math_fenced_nesting\zerocount}
+%
+% \unexpanded\def\math_fences_checked_stop
+% {\ifcase\c_math_fenced_nesting\else
+% \right.\relax % error, todo: nil spacing
+% \expandafter\math_fences_checked_stop
+% \fi}
+%
+% \unexpanded\def\startcheckedfences
+% {\begingroup
+% \let\left \math_fences_checked_left
+% \let\middle\math_fences_checked_middle
+% \let\right \math_fences_checked_right
+% \math_fences_checked_start}
+%
+% \unexpanded\def\stopcheckedfences
+% {\math_fences_checked_stop
+% \endgroup}
+%
+% \let\leftorright\math_fences_checked_left_or_right % for bars
+
+\definesystemattribute[mathautofence][public]
+
+\let\math_fences_normal_left \left
+\let\math_fences_normal_right \right
+\let\math_fences_normal_middle\middle
+\let\math_fences_normal_both \leftorright
+
+\unexpanded\def\math_fences_auto_left #1{\attribute\mathautofenceattribute\plusone #1\attribute\mathautofenceattribute\attributeunsetvalue}
+\unexpanded\def\math_fences_auto_right #1{\attribute\mathautofenceattribute\plustwo #1\attribute\mathautofenceattribute\attributeunsetvalue}
+\unexpanded\def\math_fences_auto_middle#1{\attribute\mathautofenceattribute\plusthree#1\attribute\mathautofenceattribute\attributeunsetvalue}
+\unexpanded\def\math_fences_auto_both #1{\attribute\mathautofenceattribute\plusfour #1\attribute\mathautofenceattribute\attributeunsetvalue}
-% \def\math_fences_traced#1{\ruledhbox{\ttx#1\low{\the\c_math_fenced_nesting}}}
+\let\autofenceopen \math_fences_auto_left % for testing
+\let\autofenceclose \math_fences_auto_right % for testing
+\let\autofenceleft \math_fences_auto_left % for testing
+\let\autofenceright \math_fences_auto_right % for testing
+\let\autofencemiddle\math_fences_auto_middle % for testing
+\let\autofenceboth \math_fences_auto_both % for testing
-\unexpanded\def\math_fences_checked_left
- {%\math_fences_traced L%
- \math_fences_saved_left}
+% fences are used not that often (i.e. no performance issue) so we can use a state
+% instead of \let ... also some state variable can come in handy in the future
-\unexpanded\def\math_fences_checked_middle
- {%\math_fences_traced M%
- \ifcase\c_math_fenced_nesting
- \expandafter\math_fences_saved_middle
+\newconditional\c_math_fences_auto
+
+\unexpanded\def\enableautofences
+ {\clf_enableautofences
+ \glet\clf_enableautofences\relax % onlyonce anyway
+ \unexpanded\gdef\enableautofences{\settrue\c_math_fences_auto}%
+ \enableautofences}
+
+\unexpanded\def\disableautofences
+ {\setfalse\c_math_fences_auto}
+
+\unexpanded\def\math_fences_used_left
+ {\ifconditional\c_math_fences_auto
+ \expandafter\math_fences_auto_left
\else
- \expandafter\firstofoneargument
+ \expandafter\math_fences_normal_left
\fi}
-
-\unexpanded\def\math_fences_checked_right
- {%\math_fences_traced R%
- \ifcase\c_math_fenced_nesting
- \expandafter\firstofoneargument
+\unexpanded\def\math_fences_used_right
+ {\ifconditional\c_math_fences_auto
+ \expandafter\math_fences_auto_right
\else
- \expandafter\math_fences_saved_right
+ \expandafter\math_fences_normal_right
\fi}
-
-\newconditional\c_math_checked_done % only bars
-
-\unexpanded\def\math_fences_checked_left_or_right
- {%\math_fences_traced B%
- \ifcase\c_math_fenced_nesting
- \settrue\c_math_checked_done
- \expandafter\math_fences_saved_left
- \else\ifconditional\c_math_checked_done
- \setfalse\c_math_checked_done
- \doubleexpandafter\math_fences_saved_right
+\unexpanded\def\math_fences_used_middle
+ {\ifconditional\c_math_fences_auto
+ \expandafter\math_fences_auto_middle
+ \else
+ \expandafter\math_fences_normal_middle
+ \fi}
+\unexpanded\def\math_fences_used_both
+ {\ifconditional\c_math_fences_auto
+ \expandafter\math_fences_auto_both
\else
- \doubleexpandafter\math_fences_saved_middle
- \fi\fi}
+ \expandafter\math_fences_normal_both
+ \fi}
-\unexpanded\def\math_fences_checked_start
- {\c_math_fenced_nesting\zerocount}
+\let\left \math_fences_used_left
+\let\right \math_fences_used_right
+\let\middle \math_fences_used_middle
+\let\leftorright\math_fences_used_both
-\unexpanded\def\math_fences_checked_stop
- {\ifcase\c_math_fenced_nesting\else
- \right.\relax % error, todo: nil spacing
- \expandafter\math_fences_checked_stop
- \fi}
+% wrappers
\unexpanded\def\startcheckedfences
{\begingroup
- \let\left \math_fences_checked_left
- \let\middle\math_fences_checked_middle
- \let\right \math_fences_checked_right
- \math_fences_checked_start}
+ \enableautofences}
\unexpanded\def\stopcheckedfences
- {\math_fences_checked_stop
- \endgroup}
+ {\endgroup}
+
+\appendtoks
+ % maybe: safeguard against overloading
+ %
+ % \let\left \math_fences_used_left
+ % \let\right \math_fences_used_right
+ % \let\middle \math_fences_used_middle
+ % \let\leftorright\math_fences_used_both
+\to \everymathematics
+
+\appendtoks
+ \ifx\currentmathfence\empty
+ \doifelse{\mathfenceparameter\c!state}\v!auto\enableautofences\disableautofences
+ \fi
+\to \everysetupmathfence
-\let\leftorright\math_fences_checked_left_or_right % for bars
+% some day default: \setupmathfences[\c!state=\v!auto]
%D The next characters were used for constructing nicer extensibles but
%D nowadays we have real characters.
-\Umathchardef\braceld=0 \defaultmathfamily "FF07A
-\Umathchardef\bracerd=0 \defaultmathfamily "FF07B
-\Umathchardef\bracelu=0 \defaultmathfamily "FF07C
-\Umathchardef\braceru=0 \defaultmathfamily "FF07D
+\Umathchardef\braceld\zerocount \defaultmathfamily "FF07A
+\Umathchardef\bracerd\zerocount \defaultmathfamily "FF07B
+\Umathchardef\bracelu\zerocount \defaultmathfamily "FF07C
+\Umathchardef\braceru\zerocount \defaultmathfamily "FF07D
\protect
diff --git a/Master/texmf-dist/tex/context/base/math-for.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-for.mkiv
index 0c8bd05aeac..0c8bd05aeac 100644
--- a/Master/texmf-dist/tex/context/base/math-for.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-for.mkiv
diff --git a/Master/texmf-dist/tex/context/base/math-frc.lua b/Master/texmf-dist/tex/context/base/mkiv/math-frc.lua
index 639edc94ba3..639edc94ba3 100644
--- a/Master/texmf-dist/tex/context/base/math-frc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-frc.lua
diff --git a/Master/texmf-dist/tex/context/base/math-frc.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-frc.mkiv
index cbe342b6608..16ea6e9e131 100644
--- a/Master/texmf-dist/tex/context/base/math-frc.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-frc.mkiv
@@ -169,6 +169,10 @@
\installcorenamespace{mathfractionstrut}
+\def\math_frac_no_strut
+ {\let\m_fractions_strut_top\relax
+ \let\m_fractions_strut_bot\relax}
+
\setvalue{\??mathfractionstrut\v!yes}%
{\let\m_fractions_strut_top\mathstrut
\let\m_fractions_strut_bot\mathstrut}
@@ -177,16 +181,13 @@
{\let\m_fractions_strut_top\mathstrut
\let\m_fractions_strut_bot\mathstrut}
-\setvalue{\??mathfractionstrut\v!no}%
- {\let\m_fractions_strut_top\relax
- \let\m_fractions_strut_bot\relax}
+\letvalue{\??mathfractionstrut\v!no}\math_frac_no_strut
\setvalue{\??mathfractionstrut\v!tight}%
{\let\m_fractions_strut_top\mathbotstrut % indeed swapped name
\let\m_fractions_strut_bot\mathtopstrut} % indeed swapped name
-\let\m_fractions_strut_top\relax
-\let\m_fractions_strut_bot\relax
+\math_frac_no_strut
\newdimen\d_math_fraction_margin
@@ -199,10 +200,11 @@
\edef\p_math_fractions_color{\mathfractionparameter\c!color}%
%
\edef\p_math_fractions_strut{\mathfractionparameter\c!strut}%
- \csname
- \??mathfractionstrut
- \ifcsname\??mathfractionstrut\p_math_fractions_strut\endcsname\p_math_fractions_strut\else\v!no\fi
- \endcsname
+ \ifcsname\??mathfractionstrut\p_math_fractions_strut\endcsname
+ \lastnamedcs
+ \else
+ \math_frac_no_strut
+ \fi
%
\ifx\p_math_fractions_color\empty
\expandafter\math_frac_normal
@@ -326,14 +328,13 @@
}%
}\endgroup}
-\unexpanded\def\xfrac {\begingroup\let\xfrac\xxfrac\math_frac_alternative\scriptstyle}
-\unexpanded\def\xxfrac{\begingroup \math_frac_alternative\scriptscriptstyle}
-%D The \type {xx} variant looks still ugly, so maybe it's best to say:
+\definemathfraction[xfrac] [\c!alternative=\v!inner,\c!mathstyle=\s!script]
+\definemathfraction[xxfrac][\c!alternative=\v!inner,\c!mathstyle=\s!scriptscript]
-\unexpanded\def\xxfrac#1#2%
- {\begingroup
- \math_frac_alternative\scriptscriptstyle{#1}{\raise.25\exheight\hbox{$\scriptscriptstyle#2$}}}
+\let\normalxfrac\xfrac
+
+\unexpanded\def\xfrac#1#2{\normalxfrac{\let\xfrac\xxfrac#1}{\let\xfrac\xxfrac#2}}
%D Spacing:
@@ -364,7 +365,7 @@
\edef\p_distance{\rootmathfractionparameter\c!distance}%
\ifx\p_distance\empty\else
\ifcsname\??mathfractiondistance\p_distance\endcsname
- \csname\??mathfractiondistance\p_distance\endcsname
+ \lastnamedcs
\fi
\fi
\to \everymathematics
@@ -392,9 +393,6 @@
% $$ {{a}\abovewithdelims()#1pt{b}} $$
% }
-% \unexpanded\def\dfrac #1#2{{\displaystyle {{#1}\normalover {#2}}}}
-% \unexpanded\def\tfrac #1#2{{\textstyle {{#1}\normalover {#2}}}}
-
\definemathfraction[i:frac] [\c!alternative=\v!inner,\c!mathstyle=] % was script and then small but nothing needed
\definemathfraction[i:tfrac][\c!alternative=\v!inner,\c!mathstyle=\s!text] % was script (before luatex fix)
\definemathfraction[i:sfrac][\c!alternative=\v!inner,\c!mathstyle=\s!scriptscript]
@@ -426,6 +424,25 @@
\unexpanded\def\sfrac{\csname\inlineordisplaymath id:sfrac\endcsname}
\unexpanded\def\dfrac{\csname\inlineordisplaymath id:dfrac\endcsname}
+\definemathfraction[ams] [\c!strut=\v!no,\c!alternative=\v!outer]
+\definemathfraction[i:ams:frac][ams][\c!mathstyle={\s!cramped,\s!text}]
+\definemathfraction[d:ams:frac][ams][\c!mathstyle={\s!cramped,\s!display}]
+
+\unexpanded\def\ctxfrac{\csname\inlineordisplaymath id:frac\endcsname}
+\unexpanded\def\amsfrac{\csname\inlineordisplaymath id:ams:frac\endcsname}
+
+% \appendtoks
+% \doifelse{\mathfractionparameter\c!option}{ams}%
+% {\let\frac\amsfrac}%
+% {\let\frac\ctxfrac}%
+% \to \everysetupmathfraction
+
+\appendtoks
+ \doifelse{\mathematicsparameter\c!fractions}{ams}%
+ {\let\frac\amsfrac}%
+ {\let\frac\ctxfrac}%
+\to \everysetupmathematics
+
% \definemathfraction[ddfrac][\c!mathstyle=\s!display]
% \definemathfraction[ttfrac][\c!mathstyle=\s!text]
% \definemathfraction[ssfrac][\c!mathstyle=\s!script]
@@ -562,3 +579,40 @@
% \unexpanded\def\mthfrac#1#2#3{[mthfrac: #1 #2 #3]}
% \unexpanded\def\mthsqrt#1#2#3{[mthsqrt: #1 #2 #3]}
+
+% used for prototypine \Uskewed
+%
+% \unexpanded\def\skewedfractiona#1#2{%
+% \raise
+% \Umathskewedfractionvgap\textstyle
+% \hbox\bgroup
+% $\scriptstyle#1\hskip\dimexpr\Umathskewedfractionhgap\scriptstyle/2\relax$%
+% \egroup
+% \hbox to \zeropoint\bgroup
+% \hss$\textstyle/$\hss
+% \egroup
+% \lower
+% \Umathskewedfractionvgap\textstyle
+% \hbox\bgroup
+% $\hskip\dimexpr\Umathskewedfractionhgap\scriptstyle/2\relax\scriptstyle#2$%
+% \egroup
+% }
+%
+% \unexpanded\def\skewedfractionb#1#2{%
+% \raise
+% \Umathskewedfractionvgap\textstyle
+% \hbox\bgroup
+% $\scriptstyle#1\hskip\dimexpr\Umathskewedfractionhgap\textstyle/2\relax$%
+% \egroup
+% \hbox to \zeropoint\bgroup
+% \hss$\textstyle/$\hss
+% \egroup
+% \lower
+% \Umathskewedfractionvgap\textstyle
+% \hbox\bgroup
+% $\hskip\dimexpr\Umathskewedfractionhgap\textstyle/2\relax\scriptstyle#2$%
+% \egroup
+% }
+%
+% $\skewedfractiona{1}{2}$
+% $\skewedfractionb{1}{2}$
diff --git a/Master/texmf-dist/tex/context/base/math-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/math-ini.lua
index e6a35c39ee7..e6a35c39ee7 100644
--- a/Master/texmf-dist/tex/context/base/math-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-ini.lua
diff --git a/Master/texmf-dist/tex/context/base/math-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-ini.mkiv
index 9627b153fb2..8627436b7bb 100644
--- a/Master/texmf-dist/tex/context/base/math-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-ini.mkiv
@@ -13,6 +13,12 @@
\writestatus{loading}{ConTeXt Math Macros / Initializations}
+% todo: hpack as we skip math anyway
+%
+% todo: 0x2061 : function application
+% todo: 0x2062 : invisible times
+% todo: 0x2063 : invisible comma
+
% Todo in luatex maincontrol.w: also accept a number here:
%
% case set_math_param_cmd:
@@ -72,6 +78,12 @@
\def\Umathbotaccent{\Umathaccent \s!bottom }
\def\Umathaccents {\Umathaccent \s!both }
+\ifdefined\Umathcharclass \else
+ \def\Umathcharclass{\cldcontext{tex.getmathcode(token.scan_int())[1]}}
+ \def\Umathcharfam {\cldcontext{tex.getmathcode(token.scan_int())[2]}}
+ \def\Umathcharslot {\cldcontext{tex.getmathcode(token.scan_int())[3]}}
+\fi
+
%D The attributes that we will use:
\definesystemattribute[mathalphabet] [public]
@@ -84,6 +96,7 @@
\definesystemattribute[mathmode] [public]
\definesystemattribute[mathitalics] [public]
\definesystemattribute[mathbidi] [public]
+\definesystemattribute[mathdomain] [public]
\definesystemattribute[displaymath] [public]
@@ -245,7 +258,8 @@
\normalstopimath
\fi}
-\let\m\mathematics
+\let\m \mathematics
+\let\math\mathematics
% e.g.: \definemathematics[i:mp][setups=i:tight,openup=yes]
@@ -260,7 +274,6 @@
\newcount \defaultrelpenalty \defaultrelpenalty 500
\newcount \defaultbinoppenalty \defaultbinoppenalty 700
-
\startsetups math:spacing:default
\thickmuskip \defaultthickmuskip
\medmuskip \defaultmedmuskip
@@ -328,9 +341,11 @@
\unexpanded\def\math_set_font_style_alternate#1%
{\ifcsname\??mathstylealternate\fontclass:#1\endcsname
- \expandafter\math_set_font_alternate\csname\??mathstylealternate\fontclass:#1\endcsname
+ %\expandafter\math_set_font_alternate\csname\??mathstylealternate\fontclass:#1\endcsname
+ \expandafter\math_set_font_alternate\lastnamedcs
\else\ifcsname\??mathstylealternate#1\endcsname
- \expandafter\math_set_font_alternate\csname\??mathstylealternate#1\endcsname
+ %\expandafter\math_set_font_alternate\csname\??mathstylealternate#1\endcsname
+ \expandafter\math_set_font_alternate\lastnamedcs
\fi\fi}
\unexpanded\def\setupmathrendering % the name might change
@@ -343,7 +358,24 @@
\getparameters[\??mathstylealternate][#1]%
\fi}
-\unexpanded\def\mathaltcal{\math_set_font_alternate{cal}\cal} % ss01 in xits
+% if there were many features we could have a feature pass over math nodes but it makes no
+% sense now so we have commands to deal with it
+
+\unexpanded\def\mathaltcal {\math_set_font_alternate{cal}\cal} % set via goody file
+%unexpanded\def\mathslashedzero {\math_set_font_alternate{zero}0} % set via goody file or automatic
+\unexpanded\def\mathdotless {\math_set_font_alternate{dotless}} % set via goody file or automatic
+\unexpanded\def\mathdotlessi {{\mathdotless i}}
+\unexpanded\def\mathdotlessj {{\mathdotless j}}
+
+%let\textslashedzero\slashedzero \unexpanded\def\autoslashedzero{\mathortext\mathslashedzero\textslashedzero}
+\let\textdotlessi \dotlessi \unexpanded\def\autodotlessi {\mathortext\mathdotlessi \textdotlessi}
+\let\textdotlessj \dotlessj \unexpanded\def\autodotlessj {\mathortext\mathdotlessj \textdotlessj}
+
+\appendtoks
+ %let\slashedzero\autoslashedzero
+ \let\dotlessi \autodotlessi
+ \let\dotlessj \autodotlessj
+\to \everymathematics
\let\setmathattribute \math_set_attribute
\let\setmathalphabet \math_set_alphabet
@@ -351,7 +383,7 @@
\let\setmathfontalternate \math_set_font_alternate
\let\setmathfontstylealternate\math_set_font_style_alternate
-\let\mathalternate \math_set_font_alternate % obsolete
+\let\mathalternate \math_set_font_alternate
\unexpanded\def\mathupright {\math_set_attribute\s!regular\s!tf\math_set_font_style_alternate\s!tf}
\unexpanded\def\mathdefault {\math_set_attribute\s!regular\s!it\math_set_font_style_alternate\s!it}
@@ -596,15 +628,20 @@
%D Todo:
\unexpanded\def\mf
- {\csname\fontalternative\endcsname}
+ {\begincsname\fontalternative\endcsname}
-\let\normalmathop\mathop
+% \let\normalmathop\mathop % already defined
+
+% no longer needed as we no longer switch fonts
+%
+% \unexpanded\def\mathop
+% {\normalmathop
+% \bgroup
+% % no: \let\rm\mf
+% \afterassignment\math_op\let\nexttoken=}
+%
+% \def\math_op{\ifx\nexttoken\bgroup\else\nexttoken\egroup\fi}
-\unexpanded\def\mathop
- {\normalmathop
- \bgroup
- % no: \let\rm\mf
- \let\nexttoken=}
% this one too: \letvalue{\??mathcodecommand op}\mathop ?
@@ -652,12 +689,14 @@
\let\math_tags_mo\firstofoneunexpanded
\let\math_tags_mi\firstofoneunexpanded
-\unexpanded\def\math_tags_mn#1{\begingroup\mathupright#1\endgroup}
-\unexpanded\def\math_tags_ms#1{\begingroup\mathupright#1\endgroup}
+\unexpanded\def\math_tags_mn#1{\begingroup\mathupright\math_set_o_both#1\endgroup}
+\unexpanded\def\math_tags_ms#1{\begingroup\mathupright\math_set_p_both#1\endgroup}
% Once this is stable we can store the number at the tex end which is
% faster. Functions getnumbers >= 1000.
+% \setupmathematics[functionstyle=normal] % will give ligatures and kerning
+
\setupmathematics
[\c!textstyle=, % rm ss etc i.e. known alternatives, otherwise math
\c!textcolor=,
@@ -714,10 +753,10 @@
\let\math_tags_mfunctiontxt\gobbletwoarguments
\let\math_tags_mfunctionlab\gobbletwoarguments
-\unexpanded\def\math_tags_mo_indeed#1{\begingroup \attribute\mathcategoryattribute\plusone #1\endgroup}
-\unexpanded\def\math_tags_mi_indeed#1{\begingroup \attribute\mathcategoryattribute\plustwo #1\endgroup}
-\unexpanded\def\math_tags_mn_indeed#1{\begingroup\mathupright\attribute\mathcategoryattribute\plusthree#1\endgroup}
-\unexpanded\def\math_tags_ms_indeed#1{\begingroup\mathupright\attribute\mathcategoryattribute\plusfour #1\endgroup} % todo: mathoptext
+\unexpanded\def\math_tags_mo_indeed#1{\begingroup \attribute\mathcategoryattribute\plusone #1\endgroup}
+\unexpanded\def\math_tags_mi_indeed#1{\begingroup \attribute\mathcategoryattribute\plustwo #1\endgroup}
+\unexpanded\def\math_tags_mn_indeed#1{\begingroup\mathupright\attribute\mathcategoryattribute\plusthree\math_set_o_both#1\endgroup}
+\unexpanded\def\math_tags_ms_indeed#1{\begingroup\mathupright\attribute\mathcategoryattribute\plusfour \math_set_p_both#1\endgroup} % todo: mathoptext
\newconditional\c_apply_function
@@ -767,6 +806,8 @@
% \let\mfunction \math_function_style_mfunction
% \let\mfunctionlabeltext\math_function_style_mfunctionlabeltext}}
+\def\currentmscaledstyle{rm} % will be plugged into the typeface text=ss option
+
\unexpanded\def\mscaledtext#1%
{\mathchoice
{\hbox{\csname\currentmscaledstyle\endcsname\tf #1}}
@@ -777,21 +818,6 @@
\unexpanded\def\setmathfunctionstyle#1%
{\setupmathematics[\c!functionstyle=#1]} % for old times sake
-%D We can force the way functions are typeset by manipulating the text option:
-%D
-%D \starttyping
-%D \definetypeface[iwona][ss][sans][iwona][default][encoding=texnansi]
-%D \definetypeface[iwona][mm][math][iwona][default][encoding=texnansi,text=ss]
-%D \stoptyping
-%D
-%D This hooks into the math handler with:
-
-% no longer supported this way, has to be done with \setupmathematics
-%
-% \appendtoks
-% \setmathfunctionstyle\currentmathtextstyle
-% \to \everybodyfont
-
%D Usage:
%D
%D \starttyping
@@ -1136,19 +1162,26 @@
\newcount\c_math_bidi
-\setvalue{\??mathbidi\v!no }{\clf_setmathdirection\zerocount\relax\c_math_bidi\attributeunsetvalue}
-\setvalue{\??mathbidi\v!yes}{\clf_setmathdirection\plusone \relax\c_math_bidi\plusone}
+\def\math_bidi_enable {\clf_setmathdirection\plusone \relax\c_math_bidi\plusone}
+\def\math_bidi_disable{\clf_setmathdirection\zerocount\relax\c_math_bidi\attributeunsetvalue}
+
+\letvalue{\??mathbidi\v!yes}\math_bidi_enable
+\letvalue{\??mathbidi\v!no }\math_bidi_disable
+
+% \appendtoks
+% \edef\p_bidi{\mathematicsparameter\c!bidi}%
+% \csname\??mathbidi\ifcsname\??mathbidi\p_bidi\endcsname\p_bidi\else\v!no\fi\endcsname
+% \to \everysetupmathematics
\appendtoks
- \edef\p_bidi{\mathematicsparameter\c!bidi}%
- \csname\??mathbidi\ifcsname\??mathbidi\p_bidi\endcsname\p_bidi\else\v!no\fi\endcsname
+ \edef\p_bidi{\mathematicsparameter\c!bidi}% still needed ?
+ \ifcsname\??mathbidi\p_bidi\endcsname\lastnamedcs\else\math_bidi_disable\fi
\to \everysetupmathematics
\appendtoks
\attribute\mathbidiattribute\ifconditional\c_math_right_to_left\c_math_bidi\else\attributeunsetvalue\fi
\to \everyswitchmathematics
-
%D Delayed: greek.
%D
%D \starttyping
@@ -1171,14 +1204,28 @@
\setvalue{\??mathgreek\v!normal}{2}
\setvalue{\??mathgreek\v!italic}{3}
+% \appendtoks
+% \edef\p_sygreek{\mathematicsparameter\s!sygreek}%
+% \edef\p_lcgreek{\mathematicsparameter\s!lcgreek}%
+% \edef\p_ucgreek{\mathematicsparameter\s!ucgreek}%
+% \c_math_greek_attribute"% hex digits
+% \csname\??mathgreek\ifcsname\??mathgreek\p_sygreek\endcsname\p_sygreek\else\v!none\fi\endcsname
+% \csname\??mathgreek\ifcsname\??mathgreek\p_lcgreek\endcsname\p_lcgreek\else\v!none\fi\endcsname
+% \csname\??mathgreek\ifcsname\??mathgreek\p_ucgreek\endcsname\p_ucgreek\else\v!none\fi\endcsname
+% \relax
+% \ifcase\c_math_greek_attribute
+% \c_math_greek_attribute\attributeunsetvalue
+% \fi
+% \to \everyswitchmathematics
+
\appendtoks
- \edef\p_sygreek{\mathematicsparameter\s!sygreek}%
- \edef\p_lcgreek{\mathematicsparameter\s!lcgreek}%
- \edef\p_ucgreek{\mathematicsparameter\s!ucgreek}%
+ \edef\p_sygreek{\mathematicsparameter\s!sygreek}% still needed ?
+ \edef\p_lcgreek{\mathematicsparameter\s!lcgreek}% still needed ?
+ \edef\p_ucgreek{\mathematicsparameter\s!ucgreek}% still needed ?
\c_math_greek_attribute"% hex digits
- \csname\??mathgreek\ifcsname\??mathgreek\p_sygreek\endcsname\p_sygreek\else\v!none\fi\endcsname
- \csname\??mathgreek\ifcsname\??mathgreek\p_lcgreek\endcsname\p_lcgreek\else\v!none\fi\endcsname
- \csname\??mathgreek\ifcsname\??mathgreek\p_ucgreek\endcsname\p_ucgreek\else\v!none\fi\endcsname
+ \ifcsname\??mathgreek\p_sygreek\endcsname\lastnamedcs\else1\fi
+ \ifcsname\??mathgreek\p_lcgreek\endcsname\lastnamedcs\else1\fi
+ \ifcsname\??mathgreek\p_ucgreek\endcsname\lastnamedcs\else1\fi
\relax
\ifcase\c_math_greek_attribute
\c_math_greek_attribute\attributeunsetvalue
@@ -1205,29 +1252,39 @@
%D Math italics (experiment)
-% we need keys
+%D We need keys but what names to use and because we have hardcoded solution
+%D we can stick to numbers.
\installcorenamespace{mathitalics}
\setnewconstant\c_math_italics_attribute\attributeunsetvalue
-\letvalue{\??mathitalics 1}\plusone % fontitalics
-\letvalue{\??mathitalics 2}\plustwo % fontdata
-\letvalue{\??mathitalics 3}\plusthree % quad based
-\letvalue{\??mathitalics 4}\plusfour % combination of 1 and 3
-\letvalue{\??mathitalics\v!none}\attributeunsetvalue
+\letvalue{\??mathitalics 1}\plusone % fontitalics
+\letvalue{\??mathitalics 2}\plustwo % fontdata
+\letvalue{\??mathitalics 3}\plusthree % quad based
+\letvalue{\??mathitalics 4}\plusfour % combination of 1 and 3
+\letvalue{\??mathitalics\v!none }\attributeunsetvalue
+\letvalue{\??mathitalics\v!reset}\attributeunsetvalue
\def\math_italics_initialize
{\ifnum\c_math_italics_attribute=\attributeunsetvalue \else
- \clf_setmathitalics % one time
+ \clf_initializemathitalics % one time
\global\let\math_italics_initialize\relax
\fi}
+% \appendtoks
+% \edef\p_italics{\mathematicsparameter\s!italics}%
+% \c_math_italics_attribute\csname\??mathitalics
+% \ifcsname\??mathitalics\p_italics\endcsname\p_italics\else\v!none\fi
+% \endcsname\relax
+% % \math_italics_initialize
+% \to \everyswitchmathematics % only in mathematics
+
\appendtoks
\edef\p_italics{\mathematicsparameter\s!italics}%
- \c_math_italics_attribute\csname\??mathitalics
- \ifcsname\??mathitalics\p_italics\endcsname\p_italics\else\v!none\fi
- \endcsname\relax
+ \c_math_italics_attribute
+ \ifcsname\??mathitalics\p_italics\endcsname\lastnamedcs\else\attributeunsetvalue\fi
+ \relax
% \math_italics_initialize
\to \everyswitchmathematics % only in mathematics
@@ -1237,7 +1294,7 @@
\to \everymathematics
\setupmathematics
- [\s!italics=3] % for the moment only this one makes sense .. still experimental
+ [\s!italics=3] % 4 is probably better
% looks nicer but can generate bogus csnames
%
@@ -1274,7 +1331,7 @@
% \setupmathematics
% [\v!autopunctuation=\v!no]
%
-% \def\math_punctuation_next{\ifx\nexttoken\blankspace\char\zerocount\fi}
+% \def\math_punctuation_next{\ifx\nexttoken\blankspace\signalcharacter\fi}
%
% \unexpanded\def\math_punctuation_comma {\textcomma \futurelet\nexttoken\math_punctuation_next}
% \unexpanded\def\math_punctuation_period{\textperiod\futurelet\nexttoken\math_punctuation_next}
@@ -1316,17 +1373,44 @@
% to delegate to \LUA\ when we have more variants and need analysis (experimental
% trickery removed for a while).
-\def\math_punctuation_comma_next {\ifx\nexttoken\blankspace \mathpunct{\textcomma }\else\mathord{\textcomma }\fi}
-\def\math_punctuation_period_next{\ifx\nexttoken\blankspace \mathpunct{\textperiod}\else\mathord{\textperiod}\fi}
+% \def\math_punctuation_comma_next {\ifx\nexttoken\blankspace\mathpunct\else\mathord\fi{\textcomma }}
+% \def\math_punctuation_period_next{\ifx\nexttoken\blankspace\mathpunct\else\mathord\fi{\textperiod}}
+%
+% \unexpanded\def\math_punctuation_nop_comma {\mathpunct{\textcomma}}
+% \unexpanded\def\math_punctuation_nop_period{\mathord{\textperiod}}
+%
+% \unexpanded\def\math_punctuation_all_comma {\futurelet\nexttoken\math_punctuation_comma_next}
+% \unexpanded\def\math_punctuation_all_period{\futurelet\nexttoken\math_punctuation_period_next}
+%
+% \let\math_punctuation_yes_comma \math_punctuation_all_comma
+% \let\math_punctuation_yes_period\math_punctuation_nop_period
+%
+% The next one is more efficient as it produces more flat noad lists for numbers.
-\unexpanded\def\math_punctuation_nop_comma {\mathpunct{\textcomma}}
-\unexpanded\def\math_punctuation_all_comma {\futurelet\nexttoken\math_punctuation_comma_next}
- \let\math_punctuation_yes_comma \math_punctuation_all_comma
+\setnewconstant\c_math_comma "002C
+\setnewconstant\c_math_period "002E
+\setnewconstant\c_math_special"8000
+
+\def\math_set_o_period{\Umathcode\c_math_period\mathordcode \zerocount\c_math_period}
+\def\math_set_p_period{\Umathcode\c_math_period\mathpunctcode\zerocount\c_math_period}
+\def\math_set_o_comma {\Umathcode\c_math_comma \mathordcode \zerocount\c_math_comma }
+\def\math_set_p_comma {\Umathcode\c_math_comma \mathpunctcode\zerocount\c_math_comma }
-\unexpanded\def\math_punctuation_nop_period{\mathord{\textperiod}}
+\edef\math_set_o_both {\math_set_o_period\math_set_o_comma}
+\edef\math_set_p_both {\math_set_p_period\math_set_p_comma}
+
+\unexpanded\def\math_punctuation_nop_comma {\begingroup\math_set_p_comma ,\endgroup}
+\unexpanded\def\math_punctuation_nop_period{\begingroup\math_set_o_period.\endgroup}
+
+\unexpanded\def\math_punctuation_all_comma {\futurelet\nexttoken\math_punctuation_comma_next}
\unexpanded\def\math_punctuation_all_period{\futurelet\nexttoken\math_punctuation_period_next}
+
+ \let\math_punctuation_yes_comma \math_punctuation_all_comma
\let\math_punctuation_yes_period\math_punctuation_nop_period
+\def\math_punctuation_comma_next {\begingroup\Umathcode\c_math_comma \ifx\nexttoken\blankspace\mathordcode\else\mathordcode\fi\zerocount\c_math_comma ,\endgroup}
+\def\math_punctuation_period_next{\begingroup\Umathcode\c_math_period\ifx\nexttoken\blankspace\mathordcode\else\mathordcode\fi\zerocount\c_math_period.\endgroup}
+
\setnewconstant\c_math_comma "002C
\setnewconstant\c_math_period "002E
\setnewconstant\c_math_special"8000
@@ -1342,6 +1426,12 @@
{\let,\math_punctuation_nop_comma
\let.\math_punctuation_nop_period}
+ % more efficient list:
+ %
+ % \setgvalue{\??mathautopunctuation\v!no}%
+ % {\Umathcode\c_math_period\mathordcode \zerocount\c_math_period
+ % \Umathcode\c_math_comma \mathpunctcode\zerocount\c_math_comma }
+
\setgvalue{\??mathautopunctuation\v!yes}%
{\let,\math_punctuation_yes_comma
\let.\math_punctuation_yes_period}
@@ -1430,13 +1520,13 @@
\def\triggermathstyle#1% #1 is number
{\ifcase\numexpr#1\relax
- \displaystyle \or
- \crampeddisplaystyle \or
- \textstyle \or
- \crampedtextstyle \or
- \scriptstyle \or
- \crampedscriptstyle \or
- \scriptscriptstyle \or
+ \displaystyle \or % 0
+ \crampeddisplaystyle \or % 1
+ \textstyle \or % 2
+ \crampedtextstyle \or % 3
+ \scriptstyle \or % 4
+ \crampedscriptstyle \or % 5
+ \scriptscriptstyle \or % 6
\crampedscriptscriptstyle \else
% error
\fi}
@@ -1890,48 +1980,46 @@
\expandafter\let\csname\??mathstyle#1\normalexpanded{\endcsname\math_style_add_to_cache_choice}}
% \def\math_style_set_indeed
-% {\ifcsname\??mathstyle\m_math_style_asked\endcsname
-% \csname\??mathstyle\m_math_style_asked\endcsname
-% \else
-% \math_style_set_indeed_cached
-% \fi}
+% {\csname\??mathstyle
+% \ifcsname\??mathstyle\m_math_style_asked\endcsname
+% \m_math_style_asked
+% \else
+% \??mathstyle
+% \fi
+% \endcsname}
%
-% \def\math_style_set_indeed_cached
-% {\ifcsname\??mathstylecache\m_math_style_asked\endcsname
-% % already in cache
-% \else
-% \math_style_add_to_cache
-% \fi
-% \csname\??mathstylecache\m_math_style_asked\endcsname}
+% \setvalue{\??mathstyle\??mathstyle}%
+% {\csname\??mathstylecache
+% \ifcsname\??mathstylecache\m_math_style_asked\endcsname
+% \m_math_style_asked
+% \else
+% \??mathstylecache
+% \fi
+% \endcsname}
%
-% \def\math_style_add_to_cache
+% \setvalue{\??mathstylecache\??mathstylecache}%
% {\c_math_styles_state_style \zerocount
% \c_math_styles_state_cramped\zerocount
% \c_math_styles_state_size \zerocount
% \rawprocesscommacommand[\m_math_style_asked]\math_style_collect
-% \global\expandafter\let\csname\??mathstylecache\m_math_style_asked\normalexpanded{\endcsname\math_style_add_to_cache_choice}}
-%
-% ugly but more efficient (as called often)
+% \global\expandafter\let\csname\??mathstylecache\m_math_style_asked\normalexpanded{\endcsname\math_style_add_to_cache_choice}%
+% \csname\??mathstylecache\m_math_style_asked\endcsname}
\def\math_style_set_indeed
- {\csname\??mathstyle
- \ifcsname\??mathstyle\m_math_style_asked\endcsname
- \m_math_style_asked
- \else
- \??mathstyle
- \fi
- \endcsname}
+ {\ifcsname\??mathstyle\m_math_style_asked\endcsname
+ \lastnamedcs
+ \else
+ \math_style_set_mathstyle_mathstyle
+ \fi}
-\setvalue{\??mathstyle\??mathstyle}%
- {\csname\??mathstylecache
- \ifcsname\??mathstylecache\m_math_style_asked\endcsname
- \m_math_style_asked
- \else
- \??mathstylecache
- \fi
- \endcsname}
+\def\math_style_set_mathstyle_mathstyle
+ {\ifcsname\??mathstylecache\m_math_style_asked\endcsname
+ \lastnamedcs
+ \else
+ \math_style_set_mathstyle_mathstylecache
+ \fi}
-\setvalue{\??mathstylecache\??mathstylecache}%
+\def\math_style_set_mathstyle_mathstylecache
{\c_math_styles_state_style \zerocount
\c_math_styles_state_cramped\zerocount
\c_math_styles_state_size \zerocount
@@ -1939,6 +2027,9 @@
\global\expandafter\let\csname\??mathstylecache\m_math_style_asked\normalexpanded{\endcsname\math_style_add_to_cache_choice}%
\csname\??mathstylecache\m_math_style_asked\endcsname}
+\letvalue{\??mathstyle \??mathstyle }\math_style_set_mathstyle_mathstyle % still needed?
+\letvalue{\??mathstylecache\??mathstylecache}\math_style_set_mathstyle_mathstylecache % still needed?
+
%D \startbuffer
%D $x\begingroup\setupmathstyle[script]x\endgroup x$
%D $x{\setupmathstyle[script]x}x$
@@ -1975,40 +2066,44 @@
%D version is a variation on the one in the math module (see \type{m-math} and|/|or
%D \type {m-newmat}).
-\unexpanded\def\mathtext
- {\mathortext\math_text_choice\hbox}
+\let\m_math_text_choice_face\relax
-% \def\math_text_choice#1%
-% {\mathchoice
-% {\math_text_choice_indeed\displaystyle\textface {#1}}%
-% {\math_text_choice_indeed\textstyle \textface {#1}}%
-% {\math_text_choice_indeed\textstyle \scriptface {#1}}%
-% {\math_text_choice_indeed\textstyle \scriptscriptface{#1}}}
-%
-% \def\math_text_choice_indeed#1#2#3% no \everymath !
-% {\hbox{\everymath{#1}\switchtobodyfont[#2]#3}} % 15 sec
+% if needed we can get rid of the normalize (predo in font code)
-% \let\m_math_text_choice_style\relax
-%
-% \def\math_text_choice#1%
-% {\edef\m_math_text_choice_style{\normalmathstyle}%
-% \hbox\bgroup
-% % \everymath{\triggermathstyle\m_math_text_choice_style}%
-% \normalizebodyfontsize\m_math_text_choice_style{\mathstylefont\m_math_text_choice_style}%
-% \font_basics_switchtobodyfont\m_math_text_choice_style
-% #1%
-% \egroup}
+\def\math_text_choice_font#1%
+ {\normalizebodyfontsize\m_math_text_choice_face{\mathstyleface\normalmathstyle}%
+ \hbox\bgroup
+ \font_basics_switchtobodyfont\m_math_text_choice_face
+ #1%
+ \let\next}
-\let\m_math_text_choice_face \relax
+\def\math_text_choice_word#1%
+ {\normalizebodyfontsize\m_math_text_choice_face{\mathstyleface\normalmathstyle}%
+ \hbox\bgroup
+ \font_basics_switchtobodyfont\m_math_text_choice_face
+ #1%
+ \nospacing % \normalnospaces\plusone
+ \let\next}
-% \def\math_text_choice#1% if needed we can get rid of the normalize (predo in font code)
-% {\normalizebodyfontsize\m_math_text_choice_face{\mathstyleface\normalmathstyle}%
-% \hbox{\font_basics_switchtobodyfont\m_math_text_choice_face#1}}
+% \ruledhbox{$\mathtext{abc ffi}$}
+% \ruledhbox{$\mathword{abc ffi}$}
-\def\math_text_choice% if needed we can get rid of the normalize (predo in font code)
- {\normalizebodyfontsize\m_math_text_choice_face{\mathstyleface\normalmathstyle}%
- %\showmathstyle
- \hbox\bgroup\font_basics_switchtobodyfont\m_math_text_choice_face\let\next}
+\unexpanded\def\mathtext {\mathortext{\math_text_choice_font\relax}\hbox}
+\unexpanded\def\mathword {\mathortext{\math_text_choice_word\relax}\hbox}
+
+\unexpanded\def\mathtexttf{\mathortext{\math_text_choice_font\tf}\hbox}
+\unexpanded\def\mathtextit{\mathortext{\math_text_choice_font\it}\hbox}
+\unexpanded\def\mathtextsl{\mathortext{\math_text_choice_font\sl}\hbox}
+\unexpanded\def\mathtextbf{\mathortext{\math_text_choice_font\bf}\hbox}
+\unexpanded\def\mathtextbi{\mathortext{\math_text_choice_font\bi}\hbox}
+\unexpanded\def\mathtextbs{\mathortext{\math_text_choice_font\bs}\hbox}
+
+\unexpanded\def\mathwordtf{\mathortext{\math_text_choice_word\tf}\hbox}
+\unexpanded\def\mathwordit{\mathortext{\math_text_choice_word\it}\hbox}
+\unexpanded\def\mathwordsl{\mathortext{\math_text_choice_word\sl}\hbox}
+\unexpanded\def\mathwordbf{\mathortext{\math_text_choice_word\bf}\hbox}
+\unexpanded\def\mathwordbi{\mathortext{\math_text_choice_word\bi}\hbox}
+\unexpanded\def\mathwordbs{\mathortext{\math_text_choice_word\bs}\hbox}
%D Safeguard against redefinitions:
@@ -2111,7 +2206,9 @@
% new:
\unexpanded\def\smallmathsymbol#1%
- {\mathematics{\mathbin{\normalexpanded{\raise.15\exheight\hbox{$\triggermathstyle{\the\numexpr\normalmathstyle+2\relax}#1$}}}}}
+ {\mathematics{\mathbin{\normalexpanded{\raise.15\exheight\hbox{\normalstartimath
+ \triggermathstyle{\the\numexpr\normalmathstyle+2\relax}#1%
+ \normalstopimath}}}}}
% this should be a primitive:
@@ -2257,6 +2354,56 @@
\unexpanded\def\mathplus {+}
\unexpanded\def\mathminus{\ifmmode –\else\iffontchar\font`−−\else –\fi\fi}
+%D The \type {\displaywidth} is only known inside a display formula, so we need to catch
+%D it when still zero.
+
+\def\checkeddisplaywidth % hsize if zero
+ {\dimexpr
+ \ifdim\displaywidth=\zeropoint
+ \hsize
+ \else
+ \displaywidth
+ \fi
+ \relax}
+
+\def\maximizeddisplaywidth % larger than zero but within hsize
+ {\dimexpr
+ \ifdim\displaywidth=\zeropoint
+ \hsize
+ \else\ifdim\displaywidth>\hsize
+ \hsize
+ \else
+ \displaywidth
+ \fi\fi
+ \relax}
+
+%D Experiment: (todo: same switch as italic, using \type {\everyswitchmathematics}).
+
+\newcount\c_math_domain_attribute
+
+\def\math_domain_initialize
+ {\ifnum\c_math_domain_attribute=\attributeunsetvalue \else
+ \clf_initializemathdomain % one time
+ \global\let\math_domain_initialize\relax
+ \fi}
+
+\appendtoks
+ \edef\p_domain{\mathematicsparameter\c!domain}%
+ \ifx\p_domain\empty
+ \c_math_domain_attribute\attributeunsetvalue
+ \else
+ \c_math_domain_attribute\clf_getmathdomain\p_domain\relax
+ \math_domain_initialize
+ \fi
+\to \everyswitchmathematics % only in mathematics
+
+\appendtoks
+ \attribute\mathdomainattribute\c_math_domain_attribute
+\to \everymathematics
+
+\setupmathematics
+ [\s!italics=3] % for the moment only this one makes sense .. still experimental
+
\protect \endinput
% % not used (yet)
diff --git a/Master/texmf-dist/tex/context/base/math-inl.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-inl.mkiv
index 2c7284458a5..2c7284458a5 100644
--- a/Master/texmf-dist/tex/context/base/math-inl.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-inl.mkiv
diff --git a/Master/texmf-dist/tex/context/base/math-int.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-int.mkiv
index 6b65738ff2e..5876eb7bb25 100644
--- a/Master/texmf-dist/tex/context/base/math-int.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-int.mkiv
@@ -48,13 +48,11 @@
\or
\limits
\or
- % auto
- \ifcase\normalmathstyle\displaylimits\or\displaylimits\else\limits\fi
- % \ifnum\attribute\mathmodeattribute=\plusone % we need a proper flag
- % \displaylimits
- % \else
- % \limits
- % \fi
+ \ifnum\attribute\mathmodeattribute=\plusone
+ \limits
+ \else
+ \nolimits
+ \fi
\else
% none
\fi}
diff --git a/Master/texmf-dist/tex/context/base/math-map.lua b/Master/texmf-dist/tex/context/base/mkiv/math-map.lua
index add6afa4c1c..94dde41103c 100644
--- a/Master/texmf-dist/tex/context/base/math-map.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-map.lua
@@ -200,6 +200,15 @@ local regular_it = {
[0x00070]=0x1D45D, [0x00071]=0x1D45E, [0x00072]=0x1D45F, [0x00073]=0x1D460, [0x00074]=0x1D461,
[0x00075]=0x1D462, [0x00076]=0x1D463, [0x00077]=0x1D464, [0x00078]=0x1D465, [0x00079]=0x1D466,
[0x0007A]=0x1D467,
+ -- arabic
+ [0x00627] = 0x1EE00, [0x00628] = 0x1EE21, [0x0062A] = 0x1EE15, [0x0062B] = 0x1EE16,
+ [0x0062C] = 0x1EE22, [0x0062D] = 0x1EE07, [0x0062E] = 0x1EE17, [0x0062F] = 0x1EE03,
+ [0x00630] = 0x1EE18, [0x00631] = 0x1EE13, [0x00632] = 0x1EE06, [0x00633] = 0x1EE0E,
+ [0x00634] = 0x1EE14, [0x00635] = 0x1EE11, [0x00636] = 0x1EE19, [0x00637] = 0x1EE08,
+ [0x00638] = 0x1EE1A, [0x00639] = 0x1EE0F, [0x0063A] = 0x1EE1B, [0x00641] = 0x1EE10,
+ [0x00642] = 0x1EE12, [0x00643] = 0x1EE0A, [0x00644] = 0x1EE0B, [0x00645] = 0x1EE0C,
+ [0x00646] = 0x1EE0D, [0x00647] = 0x1EE24, [0x00648] = 0x1EE05, [0x0064A] = 0x1EE09,
+ [0x0066E] = 0x1EE1C, [0x0066F] = 0x1EE1F, [0x006A1] = 0x1EE1E, [0x006BA] = 0x1EE1D,
},
ucgreek = {
[0x0391]=0x1D6E2, [0x0392]=0x1D6E3, [0x0393]=0x1D6E4, [0x0394]=0x1D6E5, [0x0395]=0x1D6E6,
@@ -389,7 +398,24 @@ local blackboard_tf = {
[0x00055]=0x1D54C, [0x00056]=0x1D54D, [0x00057]=0x1D54E, [0x00058]=0x1D54F, [0x00059]=0x1D550,
[0x0005A]=0x02124,
},
- lcletters = tolower(0x1D552),
+ lcletters = {
+ -- tolower(0x1D552) :
+ [0x00061] = 0x1D552, [0x00062] = 0x1D553, [0x00063] = 0x1D554, [0x00064] = 0x1D555,
+ [0x00065] = 0x1D556, [0x00066] = 0x1D557, [0x00067] = 0x1D558, [0x00068] = 0x1D559,
+ [0x00069] = 0x1D55A, [0x0006A] = 0x1D55B, [0x0006B] = 0x1D55C, [0x0006C] = 0x1D55D,
+ [0x0006D] = 0x1D55E, [0x0006E] = 0x1D55F, [0x0006F] = 0x1D560, [0x00070] = 0x1D561,
+ [0x00071] = 0x1D562, [0x00072] = 0x1D563, [0x00073] = 0x1D564, [0x00074] = 0x1D565,
+ [0x00075] = 0x1D566, [0x00076] = 0x1D567, [0x00077] = 0x1D568, [0x00078] = 0x1D569,
+ [0x00079] = 0x1D56A, [0x0007A] = 0x1D56B,
+ -- arabic
+ [0x00628] = 0x1EEA1, [0x0062A] = 0x1EEB5, [0x0062B] = 0x1EEB6, [0x0062C] = 0x1EEA2,
+ [0x0062D] = 0x1EEA7, [0x0062E] = 0x1EEB7, [0x0062F] = 0x1EEA3, [0x00630] = 0x1EEB8,
+ [0x00631] = 0x1EEB3, [0x00632] = 0x1EEA6, [0x00633] = 0x1EEAE, [0x00634] = 0x1EEB4,
+ [0x00635] = 0x1EEB1, [0x00636] = 0x1EEB9, [0x00637] = 0x1EEA8, [0x00638] = 0x1EEBA,
+ [0x00639] = 0x1EEAF, [0x0063A] = 0x1EEBB, [0x00641] = 0x1EEB0, [0x00642] = 0x1EEB2,
+ [0x00644] = 0x1EEAB, [0x00645] = 0x1EEAC, [0x00646] = 0x1EEAD, [0x00648] = 0x1EEA5,
+ [0x0064A] = 0x1EEA9,
+ },
lcgreek = { -- gamma pi
[0x03B3]=0x0213C, [0x03C0]=0x0213D,
},
diff --git a/Master/texmf-dist/tex/context/base/math-mis.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-mis.mkiv
index 6346da9a02d..6346da9a02d 100644
--- a/Master/texmf-dist/tex/context/base/math-mis.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-mis.mkiv
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-noa.lua b/Master/texmf-dist/tex/context/base/mkiv/math-noa.lua
new file mode 100644
index 00000000000..d3409e01b25
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-noa.lua
@@ -0,0 +1,1763 @@
+if not modules then modules = { } end modules ['math-noa'] = {
+ version = 1.001,
+ comment = "companion to math-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- beware: this is experimental code and there will be a more generic (attribute value
+-- driven) interface too but for the moment this is ok (sometime in 2015-2016 i will
+-- start cleaning up as by then the bigger picture is clear and code has been used for
+-- years; the main handlers will get some extensions)
+--
+-- we will also make dedicated processors (faster)
+--
+-- beware: names will change as we wil make noads.xxx.handler i.e. xxx
+-- subnamespaces
+
+-- 20D6 -> 2190
+-- 20D7 -> 2192
+
+-- todo: most is math_char so we can have simple dedicated loops
+
+-- nota bene: uunderdelimiter uoverdelimiter etc are radicals (we have 5 types)
+
+local utfchar, utfbyte = utf.char, utf.byte
+local formatters = string.formatters
+local sortedhash = table.sortedhash
+local insert, remove = table.insert, table.remove
+local div = math.div
+
+local fonts = fonts
+local nodes = nodes
+local node = node
+local mathematics = mathematics
+local context = context
+
+local otf = fonts.handlers.otf
+local otffeatures = fonts.constructors.newfeatures("otf")
+local registerotffeature = otffeatures.register
+
+local privateattribute = attributes.private
+local registertracker = trackers.register
+local registerdirective = directives.register
+local logreporter = logs.reporter
+
+local trace_remapping = false registertracker("math.remapping", function(v) trace_remapping = v end)
+local trace_processing = false registertracker("math.processing", function(v) trace_processing = v end)
+local trace_analyzing = false registertracker("math.analyzing", function(v) trace_analyzing = v end)
+local trace_normalizing = false registertracker("math.normalizing", function(v) trace_normalizing = v end)
+local trace_collapsing = false registertracker("math.collapsing", function(v) trace_collapsing = v end)
+local trace_patching = false registertracker("math.patching", function(v) trace_patching = v end)
+local trace_goodies = false registertracker("math.goodies", function(v) trace_goodies = v end)
+local trace_variants = false registertracker("math.variants", function(v) trace_variants = v end)
+local trace_alternates = false registertracker("math.alternates", function(v) trace_alternates = v end)
+local trace_italics = false registertracker("math.italics", function(v) trace_italics = v end)
+local trace_domains = false registertracker("math.domains", function(v) trace_domains = v end)
+local trace_families = false registertracker("math.families", function(v) trace_families = v end)
+local trace_fences = false registertracker("math.fences", function(v) trace_fences = v end)
+
+local check_coverage = true registerdirective("math.checkcoverage", function(v) check_coverage = v end)
+
+local report_processing = logreporter("mathematics","processing")
+local report_remapping = logreporter("mathematics","remapping")
+local report_normalizing = logreporter("mathematics","normalizing")
+local report_collapsing = logreporter("mathematics","collapsing")
+local report_patching = logreporter("mathematics","patching")
+local report_goodies = logreporter("mathematics","goodies")
+local report_variants = logreporter("mathematics","variants")
+local report_alternates = logreporter("mathematics","alternates")
+local report_italics = logreporter("mathematics","italics")
+local report_domains = logreporter("mathematics","domains")
+local report_families = logreporter("mathematics","families")
+local report_fences = logreporter("mathematics","fences")
+
+local a_mathrendering = privateattribute("mathrendering")
+local a_exportstatus = privateattribute("exportstatus")
+
+local nuts = nodes.nuts
+local nodepool = nuts.pool
+local tonut = nuts.tonut
+local tonode = nuts.tonode
+local nutstring = nuts.tostring
+
+local setfield = nuts.setfield
+local setlink = nuts.setlink
+local setnext = nuts.setnext
+local setprev = nuts.setprev
+local setchar = nuts.setchar
+local setsubtype = nuts.setsubtype
+local setattr = nuts.setattr
+
+local getfield = nuts.getfield
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getboth = nuts.getboth
+local getid = nuts.getid
+local getsubtype = nuts.getsubtype
+local getchar = nuts.getchar
+local getfont = nuts.getfont
+local getattr = nuts.getattr
+
+local free_node = nuts.free
+local new_node = nuts.new -- todo: pool: math_noad math_sub
+local copy_node = nuts.copy
+local slide_nodes = nuts.slide
+local set_visual = nuts.setvisual
+
+local mlist_to_hlist = nodes.mlist_to_hlist
+
+local font_of_family = node.family_font
+
+local new_kern = nodepool.kern
+local new_rule = nodepool.rule
+
+local fonthashes = fonts.hashes
+local fontdata = fonthashes.identifiers
+local fontcharacters = fonthashes.characters
+local fontproperties = fonthashes.properties
+local fontitalics = fonthashes.italics
+local fontemwidths = fonthashes.emwidths
+local fontexheights = fonthashes.exheights
+
+local variables = interfaces.variables
+local texsetattribute = tex.setattribute
+local texgetattribute = tex.getattribute
+local unsetvalue = attributes.unsetvalue
+local implement = interfaces.implement
+
+local v_reset = variables.reset
+
+local chardata = characters.data
+
+noads = noads or { } -- todo: only here
+local noads = noads
+
+noads.processors = noads.processors or { }
+local processors = noads.processors
+
+noads.handlers = noads.handlers or { }
+local handlers = noads.handlers
+
+local tasks = nodes.tasks
+
+local nodecodes = nodes.nodecodes
+local noadcodes = nodes.noadcodes
+local fencecodes = nodes.fencecodes
+
+local noad_ord = noadcodes.ord
+local noad_rel = noadcodes.rel
+local noad_bin = noadcodes.bin
+local noad_open = noadcodes.open
+local noad_close = noadcodes.close
+local noad_punct = noadcodes.punct
+local noad_opdisplaylimits = noadcodes.opdisplaylimits
+local noad_oplimits = noadcodes.oplimits
+local noad_opnolimits = noadcodes.opnolimits
+local noad_inner = noadcodes.inner
+
+local math_noad = nodecodes.noad -- attr nucleus sub sup
+local math_accent = nodecodes.accent -- attr nucleus sub sup accent
+local math_radical = nodecodes.radical -- attr nucleus sub sup left degree
+local math_fraction = nodecodes.fraction -- attr nucleus sub sup left right
+local math_box = nodecodes.subbox -- attr list
+local math_sub = nodecodes.submlist -- attr list
+local math_char = nodecodes.mathchar -- attr fam char
+local math_textchar = nodecodes.mathtextchar -- attr fam char
+local math_delim = nodecodes.delim -- attr small_fam small_char large_fam large_char
+local math_style = nodecodes.style -- attr style
+local math_choice = nodecodes.choice -- attr display text script scriptscript
+local math_fence = nodecodes.fence -- attr subtype
+
+local left_fence_code = fencecodes.left
+local middle_fence_code = fencecodes.middle
+local right_fence_code = fencecodes.right
+
+-- this initial stuff is tricky as we can have removed and new nodes with the same address
+-- the only way out is a free-per-page list of nodes (not bad anyway)
+
+local function process(start,what,n,parent)
+ if n then
+ n = n + 1
+ else
+ n = 0
+ end
+ --
+ local initial = start
+ --
+ slide_nodes(start) -- we still miss a prev in noads -- fences test code
+ --
+ while start do
+ local id = getid(start)
+ if trace_processing then
+ if id == math_noad then
+ report_processing("%w%S, class %a",n*2,nutstring(start),noadcodes[getsubtype(start)])
+ elseif id == math_char then
+ local char = getchar(start)
+ local font = getfont(start)
+ local fam = getfield(start,"fam")
+ report_processing("%w%S, family %a, font %a, char %a, shape %c",n*2,nutstring(start),fam,font,char,char)
+ else
+ report_processing("%w%S",n*2,nutstring(start))
+ end
+ end
+ local proc = what[id]
+ if proc then
+ -- report_processing("start processing")
+ local done, newstart, newinitial = proc(start,what,n,parent) -- prev is bugged: or getprev(start)
+ if newinitial then
+ initial = newinitial -- temp hack .. we will make all return head
+ if newstart then
+ start = newstart
+ -- report_processing("stop processing (new start)")
+ else
+ -- report_processing("quit processing (done)")
+ break
+ end
+ else
+ if newstart then
+ start = newstart
+ -- report_processing("stop processing (new start)")
+ else
+ -- report_processing("stop processing")
+ end
+ end
+ elseif id == math_noad then
+ -- single characters are like this
+ local noad = getfield(start,"nucleus") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"sup") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"sub") if noad then process(noad,what,n,start) end -- list
+ elseif id == math_char or id == math_textchar or id == math_delim then
+ break
+ elseif id == math_box or id == math_sub then
+ local noad = getfield(start,"list") if noad then process(noad,what,n,start) end -- list (not getlist !)
+ elseif id == math_fraction then
+ local noad = getfield(start,"num") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"denom") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"left") if noad then process(noad,what,n,start) end -- delimiter
+ noad = getfield(start,"right") if noad then process(noad,what,n,start) end -- delimiter
+ elseif id == math_choice then
+ local noad = getfield(start,"display") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"text") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"script") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"scriptscript") if noad then process(noad,what,n,start) end -- list
+ elseif id == math_fence then
+ local noad = getfield(start,"delim") if noad then process(noad,what,n,start) end -- delimiter
+ elseif id == math_radical then
+ local noad = getfield(start,"nucleus") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"sup") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"sub") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"left") if noad then process(noad,what,n,start) end -- delimiter
+ noad = getfield(start,"degree") if noad then process(noad,what,n,start) end -- list
+ elseif id == math_accent then
+ local noad = getfield(start,"nucleus") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"sup") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"sub") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"accent") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"bot_accent") if noad then process(noad,what,n,start) end -- list
+ -- elseif id == math_style then
+ -- -- has a next
+ -- else
+ -- -- glue, penalty, etc
+ end
+ start = getnext(start)
+ end
+ if not parent then
+ return initial, true -- only first level -- for now
+ end
+end
+
+local function processnested(current,what,n)
+ local noad = nil
+ local id = getid(current)
+ if id == math_noad then
+ noad = getfield(current,"nucleus") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"sup") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"sub") if noad then process(noad,what,n,current) end -- list
+ elseif id == math_box or id == math_sub then
+ noad = getfield(current,"list") if noad then process(noad,what,n,current) end -- list (not getlist !)
+ elseif id == math_fraction then
+ noad = getfield(current,"num") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"denom") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"left") if noad then process(noad,what,n,current) end -- delimiter
+ noad = getfield(current,"right") if noad then process(noad,what,n,current) end -- delimiter
+ elseif id == math_choice then
+ noad = getfield(current,"display") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"text") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"script") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"scriptscript") if noad then process(noad,what,n,current) end -- list
+ elseif id == math_fence then
+ noad = getfield(current,"delim") if noad then process(noad,what,n,current) end -- delimiter
+ elseif id == math_radical then
+ noad = getfield(current,"nucleus") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"sup") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"sub") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"left") if noad then process(noad,what,n,current) end -- delimiter
+ noad = getfield(current,"degree") if noad then process(noad,what,n,current) end -- list
+ elseif id == math_accent then
+ noad = getfield(current,"nucleus") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"sup") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"sub") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"accent") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"bot_accent") if noad then process(noad,what,n,current) end -- list
+ end
+end
+
+local function processstep(current,process,n,id)
+ local noad = nil
+ local id = id or getid(current)
+ if id == math_noad then
+ noad = getfield(current,"nucleus") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"sup") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"sub") if noad then process(noad,n,current) end -- list
+ elseif id == math_box or id == math_sub then
+ noad = getfield(current,"list") if noad then process(noad,n,current) end -- list (not getlist !)
+ elseif id == math_fraction then
+ noad = getfield(current,"num") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"denom") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"left") if noad then process(noad,n,current) end -- delimiter
+ noad = getfield(current,"right") if noad then process(noad,n,current) end -- delimiter
+ elseif id == math_choice then
+ noad = getfield(current,"display") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"text") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"script") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"scriptscript") if noad then process(noad,n,current) end -- list
+ elseif id == math_fence then
+ noad = getfield(current,"delim") if noad then process(noad,n,current) end -- delimiter
+ elseif id == math_radical then
+ noad = getfield(current,"nucleus") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"sup") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"sub") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"left") if noad then process(noad,n,current) end -- delimiter
+ noad = getfield(current,"degree") if noad then process(noad,n,current) end -- list
+ elseif id == math_accent then
+ noad = getfield(current,"nucleus") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"sup") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"sub") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"accent") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"bot_accent") if noad then process(noad,n,current) end -- list
+ end
+end
+
+local function processnoads(head,actions,banner)
+ local h, d
+ if trace_processing then
+ report_processing("start %a",banner)
+ h, d = process(tonut(head),actions)
+ report_processing("stop %a",banner)
+ else
+ h, d = process(tonut(head),actions)
+ end
+ return h and tonode(h) or head, d == nil and true or d
+end
+
+noads.process = processnoads
+noads.processnested = processnested
+noads.processouter = process
+
+
+-- experiment (when not present fall back to fam 0) -- needs documentation
+
+local unknowns = { }
+local checked = { } -- simple case
+local tracked = false trackers.register("fonts.missing", function(v) tracked = v end)
+local cached = table.setmetatableindex("table") -- complex case
+
+local function errorchar(font,char)
+ local done = unknowns[char]
+ if done then
+ unknowns[char] = done + 1
+ else
+ unknowns[char] = 1
+ end
+ if tracked then
+ -- slower as we check each font too and we always replace as math has
+ -- more demands than text
+ local fake = cached[font][char]
+ if fake then
+ return fake
+ else
+ local kind, fake = fonts.checkers.placeholder(font,char)
+ if not fake or kind ~= "char" then
+ fake = 0x3F
+ end
+ cached[font][char] = fake
+ return fake
+ end
+ else
+ -- only simple checking, report at the end so one should take
+ -- action anyway ... we can miss a few checks but that is ok
+ -- as there is at least one reported
+ if not checked[char] then
+ if trace_normalizing then
+ report_normalizing("character %C is not available",char)
+ end
+ checked[char] = true
+ end
+ return 0x3F
+ end
+end
+
+-- 0-2 regular
+-- 3-5 bold
+-- 6-8 pseudobold
+
+-- this could best be integrated in the remapper, and if we run into problems, we
+-- might as well do this
+
+do
+
+ local families = { }
+ local a_mathfamily = privateattribute("mathfamily")
+ local boldmap = mathematics.boldmap
+
+ local familymap = { [0] =
+ "regular",
+ "regular",
+ "regular",
+ "bold",
+ "bold",
+ "bold",
+ "pseudobold",
+ "pseudobold",
+ "pseudobold",
+ }
+
+ families[math_char] = function(pointer)
+ if getfield(pointer,"fam") == 0 then
+ local a = getattr(pointer,a_mathfamily)
+ if a and a > 0 then
+ setattr(pointer,a_mathfamily,0)
+ if a > 5 then
+ local char = getchar(pointer)
+ local bold = boldmap[char]
+ local newa = a - 3
+ if not bold then
+ if trace_families then
+ report_families("no bold replacement for %C, family %s with remap %s becomes %s with remap %s",char,a,familymap[a],newa,familymap[newa])
+ end
+ setfield(pointer,"fam",newa)
+ elseif not fontcharacters[font_of_family(newa)][bold] then
+ if trace_families then
+ report_families("no bold character for %C, family %s with remap %s becomes %s with remap %s",char,a,familymap[a],newa,familymap[newa])
+ end
+ if newa > 3 then
+ setfield(pointer,"fam",newa-3)
+ end
+ else
+ setattr(pointer,a_exportstatus,char)
+ setchar(pointer,bold)
+ if trace_families then
+ report_families("replacing %C by bold %C, family %s with remap %s becomes %s with remap %s",char,bold,a,familymap[a],newa,familymap[newa])
+ end
+ setfield(pointer,"fam",newa)
+ end
+ else
+ local char = getchar(pointer)
+ if not fontcharacters[font_of_family(a)][char] then
+ if trace_families then
+ report_families("no bold replacement for %C",char)
+ end
+ else
+ if trace_families then
+ report_families("family of %C becomes %s with remap %s",char,a,familymap[a])
+ end
+ setfield(pointer,"fam",a)
+ end
+ end
+ end
+ end
+ end
+
+ families[math_delim] = function(pointer)
+ if getfield(pointer,"small_fam") == 0 then
+ local a = getattr(pointer,a_mathfamily)
+ if a and a > 0 then
+ setattr(pointer,a_mathfamily,0)
+ if a > 5 then
+ -- no bold delimiters in unicode
+ a = a - 3
+ end
+ local char = getfield(pointer,"small_char")
+ local okay = fontcharacters[font_of_family(a)][char]
+ if okay then
+ setfield(pointer,"small_fam",a)
+ elseif a > 2 then
+ setfield(pointer,"small_fam",a-3)
+ end
+ local char = getfield(pointer,"large_char")
+ local okay = fontcharacters[font_of_family(a)][char]
+ if okay then
+ setfield(pointer,"large_fam",a)
+ elseif a > 2 then
+ setfield(pointer,"large_fam",a-3)
+ end
+ else
+ setfield(pointer,"small_fam",0)
+ setfield(pointer,"large_fam",0)
+ end
+ end
+ end
+
+ families[math_textchar] = families[math_char]
+
+ function handlers.families(head,style,penalties)
+ processnoads(head,families,"families")
+ return true
+ end
+
+end
+
+-- character remapping
+
+do
+
+ local a_mathalphabet = privateattribute("mathalphabet")
+ local a_mathgreek = privateattribute("mathgreek")
+
+ processors.relocate = { }
+
+ local function report_remap(tag,id,old,new,extra)
+ report_remapping("remapping %s in font %s from %C to %C%s",tag,id,old,new,extra)
+ end
+
+ local remapalphabets = mathematics.remapalphabets
+ local fallbackstyleattr = mathematics.fallbackstyleattr
+ local setnodecolor = nodes.tracers.colors.set
+
+ local function checked(pointer)
+ local char = getchar(pointer)
+ local font = getfont(pointer)
+ local data = fontcharacters[font]
+ if not data[char] then
+ local specials = characters.data[char].specials
+ if specials and (specials[1] == "char" or specials[1] == "font") then
+ local newchar = specials[#specials]
+ if trace_remapping then
+ report_remap("fallback",font,char,newchar)
+ end
+ if trace_analyzing then
+ setnodecolor(pointer,"font:isol")
+ end
+ setattr(pointer,a_exportstatus,char) -- testcase: exponentiale
+ setchar(pointer,newchar)
+ return true
+ end
+ end
+ end
+
+ processors.relocate[math_char] = function(pointer)
+ local g = getattr(pointer,a_mathgreek) or 0
+ local a = getattr(pointer,a_mathalphabet) or 0
+ local char = getchar(pointer)
+ local font = getfont(pointer)
+ local characters = fontcharacters[font]
+ if a > 0 or g > 0 then
+ if a > 0 then
+ setattr(pointer,a_mathgreek,0)
+ end
+ if g > 0 then
+ setattr(pointer,a_mathalphabet,0)
+ end
+ local newchar = remapalphabets(char,a,g)
+ if newchar then
+ if characters[newchar] then
+ if trace_remapping then
+ report_remap("char",font,char,newchar)
+ end
+ if trace_analyzing then
+ setnodecolor(pointer,"font:isol")
+ end
+ setchar(pointer,newchar)
+ return true
+ else
+ local fallback = fallbackstyleattr(a)
+ if fallback then
+ local newchar = remapalphabets(char,fallback,g)
+ if newchar then
+ if characters[newchar] then
+ if trace_remapping then
+ report_remap("char",font,char,newchar," (fallback remapping used)")
+ end
+ if trace_analyzing then
+ setnodecolor(pointer,"font:isol")
+ end
+ setchar(pointer,newchar)
+ return true
+ elseif trace_remapping then
+ report_remap("char",font,char,newchar," fails (no fallback character)")
+ end
+ elseif trace_remapping then
+ report_remap("char",font,char,newchar," fails (no fallback remap character)")
+ end
+ elseif trace_remapping then
+ report_remap("char",font,char,newchar," fails (no fallback style)")
+ end
+ end
+ end
+ end
+ if not characters[char] then
+ setchar(pointer,errorchar(font,char))
+ end
+ if trace_analyzing then
+ setnodecolor(pointer,"font:medi")
+ end
+ if check_coverage then
+ return checked(pointer)
+ end
+ end
+
+ processors.relocate[math_textchar] = function(pointer)
+ if trace_analyzing then
+ setnodecolor(pointer,"font:init")
+ end
+ end
+
+ processors.relocate[math_delim] = function(pointer)
+ if trace_analyzing then
+ setnodecolor(pointer,"font:fina")
+ end
+ end
+
+ function handlers.relocate(head,style,penalties)
+ processnoads(head,processors.relocate,"relocate")
+ return true
+ end
+
+end
+
+-- rendering (beware, not exported)
+
+processors.render = { }
+
+local rendersets = mathematics.renderings.numbers or { } -- store
+
+processors.render[math_char] = function(pointer)
+ local attr = getattr(pointer,a_mathrendering)
+ if attr and attr > 0 then
+ local char = getchar(pointer)
+ local renderset = rendersets[attr]
+ if renderset then
+ local newchar = renderset[char]
+ if newchar then
+ local font = getfont(pointer)
+ local characters = fontcharacters[font]
+ if characters and characters[newchar] then
+ setchar(pointer,newchar)
+ setattr(pointer,a_exportstatus,char)
+ end
+ end
+ end
+ end
+end
+
+function handlers.render(head,style,penalties)
+ processnoads(head,processors.render,"render")
+ return true
+end
+
+-- some resize options (this works ok because the content is
+-- empty and no larger next will be forced)
+--
+-- beware: we don't use \delcode but \Udelcode and as such have
+-- no large_fam; also, we need to check for subtype and/or
+-- small_fam not being 0 because \. sits in 0,0 by default
+--
+-- todo: just replace the character by an ord noad
+-- and remove the right delimiter as well
+
+local a_mathsize = privateattribute("mathsize") -- this might move into other fence code
+local resize = { }
+processors.resize = resize
+
+resize[math_fence] = function(pointer)
+ local subtype = getsubtype(pointer)
+ if subtype == left_fence_code or subtype == right_fence_code then
+ local a = getattr(pointer,a_mathsize)
+ if a and a > 0 then
+ local method, size = div(a,100), a % 100
+ setattr(pointer,a_mathsize,0)
+ local delimiter = getfield(pointer,"delim")
+ local chr = getfield(delimiter,"small_char")
+ if chr > 0 then
+ local fam = getfield(delimiter,"small_fam")
+ local id = font_of_family(fam)
+ if id > 0 then
+ setfield(delimiter,"small_char",mathematics.big(fontdata[id],chr,size,method))
+ end
+ end
+ end
+ end
+end
+
+function handlers.resize(head,style,penalties)
+ processnoads(head,resize,"resize")
+ return true
+end
+
+local a_autofence = privateattribute("mathautofence")
+local autofences = { }
+processors.autofences = autofences
+local dummyfencechar = 0x2E
+
+local function makefence(what,char)
+ local d = new_node(math_delim)
+ local f = new_node(math_fence)
+ if char then
+ local sym = getfield(char,"nucleus")
+ local chr = getfield(sym,"char")
+ local fam = getfield(sym,"fam")
+ if chr == dummyfencechar then
+ chr = 0
+ end
+ setfield(d,"small_char",chr)
+ setfield(d,"small_fam", fam)
+ free_node(sym)
+ end
+ setsubtype(f,what)
+ setfield(f,"delim",d)
+ return f
+end
+
+local function makelist(noad,f_o,o_next,c_prev,f_c,middle)
+ local list = new_node(math_sub)
+ setfield(list,"head",f_o)
+ setsubtype(noad,noad_inner)
+ setfield(noad,"nucleus",list)
+ setlink(f_o,o_next)
+ setlink(c_prev,f_c)
+ if middle and next(middle) then
+ local prev = f_o
+ local current = o_next
+ while current ~= f_c do
+ local m = middle[current]
+ if m then
+ local next = getnext(current)
+ local fence = makefence(middle_fence_code,current)
+ setfield(current,"nucleus",nil)
+ free_node(current)
+ middle[current] = nil
+ -- replace_node
+ setlink(prev,fence)
+ setlink(fence,next)
+ prev = fence
+ current = next
+ else
+ prev = current
+ current = getnext(current)
+ end
+ end
+ end
+end
+
+local function convert_both(open,close,middle)
+ local o_prev, o_next = getboth(open)
+ local c_prev, c_next = getboth(close)
+ if o_next == close then
+ return close
+ else
+ local f_o = makefence(left_fence_code,open)
+ local f_c = makefence(right_fence_code,close)
+ makelist(open,f_o,o_next,c_prev,f_c,middle)
+ setfield(close,"nucleus",nil)
+ free_node(close)
+ if c_next then
+ setprev(c_next,open)
+ end
+ setnext(open,c_next)
+ return open
+ end
+end
+
+local function convert_open(open,last,middle)
+ local f_o = makefence(left_fence_code,open)
+ local f_c = makefence(right_fence_code)
+ local o_prev, o_next = getboth(open)
+ local l_prev, l_next = getboth(last)
+ makelist(open,f_o,o_next,last,f_c,middle)
+ if l_next then
+ setprev(l_next,open)
+ end
+ setnext(open,l_next)
+ return open
+end
+
+local function convert_close(close,first,middle)
+ local f_o = makefence(left_fence_code)
+ local f_c = makefence(right_fence_code,close)
+ local c_prev = getprev(close)
+ makelist(close,f_o,first,c_prev,f_c,middle)
+ return close
+end
+
+local stacks = table.setmetatableindex("table")
+
+local function processfences(pointer,n,parent)
+ local current = pointer
+ local last = pointer
+ local start = pointer
+ local done = false
+ local initial = pointer
+ local stack = nil
+ local middle = nil -- todo: use properties
+ while current do
+ local id = getid(current)
+ if id == math_noad then
+ local a = getattr(current,a_autofence)
+ if a and a > 0 then
+ local stack = stacks[n]
+ setattr(current,a_autofence,0)
+ if a == 1 or (a == 4 and (not stack or #stack == 0)) then
+ if trace_fences then
+ report_fences("%2i: pushing open on stack",n)
+ end
+ insert(stack,current)
+ elseif a == 2 or a == 4 then
+ local open = remove(stack)
+ if open then
+ if trace_fences then
+ report_fences("%2i: handling %s, stack depth %i",n,"both",#stack)
+ end
+ current = convert_both(open,current,middle)
+ elseif current == start then
+ -- skip
+ else
+ if trace_fences then
+ report_fences("%2i: handling %s, stack depth %i",n,"close",#stack)
+ end
+ current = convert_close(current,initial,middle)
+ if not parent then
+ initial = current
+ end
+ end
+ elseif a == 3 then
+ if trace_fences then
+ report_fences("%2i: registering middle",n)
+ end
+ if middle then
+ middle[current] = last
+ else
+ middle = { [current] = last }
+ end
+ end
+ done = true
+ else
+ processstep(current,processfences,n+1,id)
+ end
+ else
+ -- next at current level
+ processstep(current,processfences,n,id)
+ end
+ last = current
+ current = getnext(current)
+ end
+ if done then
+ local stack = stacks[n]
+ local s = #stack
+ if s > 0 then
+ if trace_fences then
+ report_fences("%2i: handling %s stack levels",n,s)
+ end
+ for i=1,s do
+ local open = remove(stack)
+ if trace_fences then
+ report_fences("%2i: handling %s, stack depth %i",n,"open",#stack)
+ end
+ last = convert_open(open,last,middle)
+ end
+ end
+ end
+end
+
+-- we can have a first changed node .. an option is to have a leading dummy node in math
+-- lists like the par node as it can save a lot of mess
+
+local enabled = false
+
+implement {
+ name = "enableautofences",
+ onlyonce = true,
+ actions = function()
+ tasks.enableaction("math","noads.handlers.autofences")
+ enabled = true
+ end
+}
+
+function handlers.autofences(head,style,penalties)
+ if enabled then -- tex.modes.c_math_fences_auto
+ -- inspect(nodes.totree(head))
+ processfences(tonut(head),1)
+ -- inspect(nodes.totree(head))
+ end
+end
+
+-- normalize scripts
+
+local unscript = { } noads.processors.unscript = unscript
+local superscripts = characters.superscripts
+local subscripts = characters.subscripts
+local fractions = characters.fractions
+local replaced = { }
+
+local function replace(pointer,what,n,parent)
+ pointer = parent -- we're following the parent list (chars trigger this)
+ local next = getnext(pointer)
+ local start_super, stop_super, start_sub, stop_sub
+ local mode = "unset"
+ while next and getid(next) == math_noad do
+ local nextnucleus = getfield(next,"nucleus")
+ if nextnucleus and getid(nextnucleus) == math_char and not getfield(next,"sub") and not getfield(next,"sup") then
+ local char = getchar(nextnucleus)
+ local s = superscripts[char]
+ if s then
+ if not start_super then
+ start_super = next
+ mode = "super"
+ elseif mode == "sub" then
+ break
+ end
+ stop_super = next
+ next = getnext(next)
+ setchar(nextnucleus,s)
+ replaced[char] = (replaced[char] or 0) + 1
+ if trace_normalizing then
+ report_normalizing("superscript %C becomes %C",char,s)
+ end
+ else
+ local s = subscripts[char]
+ if s then
+ if not start_sub then
+ start_sub = next
+ mode = "sub"
+ elseif mode == "super" then
+ break
+ end
+ stop_sub = next
+ next = getnext(next)
+ setchar(nextnucleus,s)
+ replaced[char] = (replaced[char] or 0) + 1
+ if trace_normalizing then
+ report_normalizing("subscript %C becomes %C",char,s)
+ end
+ else
+ break
+ end
+ end
+ else
+ break
+ end
+ end
+ if start_super then
+ if start_super == stop_super then
+ setfield(pointer,"sup",getfield(start_super,"nucleus"))
+ else
+ local list = new_node(math_sub) -- todo attr
+ setfield(list,"list",start_super)
+ setfield(pointer,"sup",list)
+ end
+ if mode == "super" then
+ setnext(pointer,getnext(stop_super))
+ end
+ setnext(stop_super)
+ end
+ if start_sub then
+ if start_sub == stop_sub then
+ setfield(pointer,"sub",getfield(start_sub,"nucleus"))
+ else
+ local list = new_node(math_sub) -- todo attr
+ setfield(list,"list",start_sub)
+ setfield(pointer,"sub",list)
+ end
+ if mode == "sub" then
+ setnext(pointer,getnext(stop_sub))
+ end
+ setnext(stop_sub)
+ end
+ -- we could return stop
+end
+
+unscript[math_char] = replace -- not noads as we need to recurse
+
+function handlers.unscript(head,style,penalties)
+ processnoads(head,unscript,"unscript")
+-- processnoads(head,checkers,"checkers")
+ return true
+end
+
+local function collected(list)
+ if list and next(list) then
+ local n, t = 0, { }
+ for k, v in sortedhash(list) do
+ n = n + v
+ t[#t+1] = formatters["%C"](k)
+ end
+ return formatters["% t (n=%s)"](t,n)
+ end
+end
+
+statistics.register("math script replacements", function()
+ return collected(replaced)
+end)
+
+statistics.register("unknown math characters", function()
+ return collected(unknowns)
+end)
+
+-- math alternates: (in xits lgf: $ABC$ $\cal ABC$ $\mathalternate{cal}\cal ABC$)
+-- math alternates: (in lucidanova lgf: $ABC \mathalternate{italic} ABC$)
+
+-- todo: set alternate for specific symbols
+-- todo: no need to do this when already loaded
+
+local defaults = {
+ dotless = { feature = 'dtls', value = 1, comment = "Mathematical Dotless Forms" },
+ -- zero = { feature = 'zero', value = 1, comment = "Slashed or Dotted Zero" }, -- in no math font (yet)
+}
+
+local function initializemathalternates(tfmdata)
+ local goodies = tfmdata.goodies
+ local autolist = table.copy(defaults)
+
+ local function setthem(alternates)
+ local resources = tfmdata.resources -- was tfmdata.shared
+ local lastattribute = 0
+ local attributes = { }
+ for k, v in sortedhash(alternates) do
+ lastattribute = lastattribute + 1
+ v.attribute = lastattribute
+ attributes[lastattribute] = v
+ end
+ resources.mathalternates = alternates -- to be checked if shared is ok here
+ resources.mathalternatesattributes = attributes -- to be checked if shared is ok here
+ end
+
+ if goodies then
+ local done = { }
+ for i=1,#goodies do
+ -- first one counts
+ -- we can consider sharing the attributes ... todo (only once scan)
+ local mathgoodies = goodies[i].mathematics
+ local alternates = mathgoodies and mathgoodies.alternates
+ if alternates then
+ if trace_goodies then
+ report_goodies("loading alternates for font %a",tfmdata.properties.name)
+ end
+ for k, v in next, autolist do
+ if not alternates[k] then
+ alternates[k] = v
+ end
+ end
+ setthem(alternates)
+ return
+ end
+ end
+ end
+
+ if trace_goodies then
+ report_goodies("loading default alternates for font %a",tfmdata.properties.name)
+ end
+ setthem(autolist)
+
+end
+
+registerotffeature {
+ name = "mathalternates",
+ description = "additional math alternative shapes",
+ initializers = {
+ base = initializemathalternates,
+ node = initializemathalternates,
+ }
+}
+
+-- local getalternate = otf.getalternate (runtime new method so ...)
+
+-- todo: not shared but copies ... one never knows
+
+local a_mathalternate = privateattribute("mathalternate")
+
+local alternate = { } -- processors.alternate = alternate
+
+function mathematics.setalternate(fam,tag)
+ local id = font_of_family(fam)
+ local tfmdata = fontdata[id]
+ local resources = tfmdata.resources -- was tfmdata.shared
+ if resources then
+ local mathalternates = resources.mathalternates
+ if mathalternates then
+ local m = mathalternates[tag]
+ texsetattribute(a_mathalternate,m and m.attribute or unsetvalue)
+ end
+ end
+end
+
+implement {
+ name = "setmathalternate",
+ actions = mathematics.setalternate,
+ arguments = { "integer", "string" }
+}
+
+alternate[math_char] = function(pointer)
+ local a = getattr(pointer,a_mathalternate)
+ if a and a > 0 then
+ setattr(pointer,a_mathalternate,0)
+ local tfmdata = fontdata[getfont(pointer)]
+ local resources = tfmdata.resources -- was tfmdata.shared
+ if resources then
+ local mathalternatesattributes = resources.mathalternatesattributes
+ if mathalternatesattributes then
+ local what = mathalternatesattributes[a]
+ local char = getchar(pointer)
+ local alt = otf.getalternate(tfmdata,char,what.feature,what.value)
+ if alt ~= char then
+ if trace_alternates then
+ report_alternates("alternate %a, value %a, replacing glyph %U by glyph %U",
+ tostring(what.feature),tostring(what.value),getchar(pointer),alt)
+ end
+ setchar(pointer,alt)
+ end
+ end
+ end
+ end
+end
+
+function handlers.alternates(head,style,penalties)
+ processnoads(head,alternate,"alternate")
+ return true
+end
+
+-- italics: we assume that only characters matter
+--
+-- = we check for correction first because accessing nodes is slower
+-- = the actual glyph is not that important (we can control it with numbers)
+
+-- Italic correction in luatex math is (was) a mess. There are all kind of assumptions based on
+-- old fonts and new fonts. Eventually there should be a flag that can signal to ignore all
+-- those heuristics. We want to deal with it ourselves also in the perspective of mixed math
+-- and text. Also, for a while in context we had to deal with a mix of virtual math fonts and
+-- real ones.
+
+-- in opentype the italic correction of a limop is added to the width and luatex does some juggling
+-- that we want to avoid but we need to do something here (in fact, we could better fix the width of
+-- the character
+
+local a_mathitalics = privateattribute("mathitalics")
+
+local italics = { }
+local default_factor = 1/20
+
+local setcolor = nodes.tracers.colors.set
+local resetcolor = nodes.tracers.colors.reset
+local italic_kern = new_kern
+local c_positive_d = "trace:dg"
+local c_negative_d = "trace:dr"
+
+local function insert_kern(current,kern)
+ local sub = new_node(math_sub) -- todo: pool
+ local noad = new_node(math_noad) -- todo: pool
+ setfield(sub,"list",kern)
+ setnext(kern,noad)
+ setfield(noad,"nucleus",current)
+ return sub
+end
+
+registertracker("math.italics.visualize", function(v)
+ if v then
+ italic_kern = function(k)
+ local n = new_kern(k)
+ set_visual(n,"italic")
+ return n
+ end
+ else
+ italic_kern = new_kern
+ end
+end)
+
+local function getcorrection(method,font,char) -- -- or character.italic -- (this one is for tex)
+
+ local visual = chardata[char].visual
+
+ if method == 1 then
+ -- check on state
+ local italics = fontitalics[font]
+ if italics then
+ local character = fontcharacters[font][char]
+ if character then
+ local correction = character.italic
+ if correction and correction ~= 0 then
+ return correction, visual
+ end
+ end
+ end
+ elseif method == 2 then
+ -- no check
+ local character = fontcharacters[font][char]
+ if character then
+ local correction = character.italic
+ if correction and correction ~= 0 then
+ return correction, visual
+ end
+ end
+ elseif method == 3 then
+ -- check on visual
+ if visual == "it" or visual == "bi" then
+ local character = fontcharacters[font][char]
+ if character then
+ local correction = character.italic
+ if correction and correction ~= 0 then
+ return correction, visual
+ end
+ end
+ end
+ elseif method == 4 then
+ -- combination of 1 and 3
+ local italics = fontitalics[font]
+ if italics and (visual == "it" or visual == "bi") then
+ local character = fontcharacters[font][char]
+ if character then
+ local correction = character.italic
+ if correction and correction ~= 0 then
+ return correction, visual
+ end
+ end
+ end
+ end
+
+end
+
+italics[math_char] = function(pointer,what,n,parent)
+ local method = getattr(pointer,a_mathitalics)
+ if method and method > 0 and method < 100 then
+ local char = getchar(pointer)
+ local font = getfont(pointer)
+ local correction, visual = getcorrection(method,font,char)
+ if correction and correction ~= 0 then
+ local next_noad = getnext(parent)
+ if not next_noad then
+ if n == 1 then -- only at the outer level .. will become an option (always,endonly,none)
+ if trace_italics then
+ report_italics("method %a, flagging italic correction between %C and end math",method,correction,char)
+ end
+ setattr(pointer,a_mathitalics,101)
+ setattr(parent,a_mathitalics,101)
+ end
+ end
+ end
+ end
+end
+
+function handlers.italics(head,style,penalties)
+ processnoads(head,italics,"italics")
+ return true
+end
+
+local enable
+
+enable = function()
+ tasks.enableaction("math", "noads.handlers.italics")
+ if trace_italics then
+ report_italics("enabling math italics")
+ end
+ enable = false
+end
+
+-- best do this only on math mode (less overhead)
+
+function mathematics.setitalics(name)
+ if enable then
+ enable()
+ end
+ texsetattribute(a_mathitalics,name and name ~= v_reset and tonumber(name) or unsetvalue) -- maybe also v_none
+end
+
+function mathematics.getitalics(name)
+ if enable then
+ enable()
+ end
+ context(name and name ~= v_reset and tonumber(name) or unsetvalue)
+end
+
+function mathematics.resetitalics()
+ texsetattribute(a_mathitalics,unsetvalue)
+end
+
+implement {
+ name = "initializemathitalics",
+ actions = enable,
+ onlyonce = true,
+}
+
+implement {
+ name = "setmathitalics",
+ actions = mathematics.setitalics,
+ arguments = "string",
+}
+
+implement {
+ name = "getmathitalics",
+ actions = mathematics.getitalics,
+ arguments = "string",
+}
+
+implement {
+ name = "resetmathitalics",
+ actions = mathematics.resetitalics
+}
+
+-- primes and such
+
+local collapse = { } processors.collapse = collapse
+
+local mathpairs = characters.mathpairs -- next will move to char-def
+
+mathpairs[0x2032] = { [0x2032] = 0x2033, [0x2033] = 0x2034, [0x2034] = 0x2057 } -- (prime,prime) (prime,doubleprime) (prime,tripleprime)
+mathpairs[0x2033] = { [0x2032] = 0x2034, [0x2033] = 0x2057 } -- (doubleprime,prime) (doubleprime,doubleprime)
+mathpairs[0x2034] = { [0x2032] = 0x2057 } -- (tripleprime,prime)
+
+mathpairs[0x2035] = { [0x2035] = 0x2036, [0x2036] = 0x2037 } -- (reversedprime,reversedprime) (reversedprime,doublereversedprime)
+mathpairs[0x2036] = { [0x2035] = 0x2037 } -- (doublereversedprime,reversedprime)
+
+mathpairs[0x222B] = { [0x222B] = 0x222C, [0x222C] = 0x222D }
+mathpairs[0x222C] = { [0x222B] = 0x222D }
+
+mathpairs[0x007C] = { [0x007C] = 0x2016, [0x2016] = 0x2980 } -- bar+bar=double bar+double=triple
+mathpairs[0x2016] = { [0x007C] = 0x2980 } -- double+bar=triple
+
+local movesub = {
+ -- primes
+ [0x2032] = 0xFE932,
+ [0x2033] = 0xFE933,
+ [0x2034] = 0xFE934,
+ [0x2057] = 0xFE957,
+ -- reverse primes
+ [0x2035] = 0xFE935,
+ [0x2036] = 0xFE936,
+ [0x2037] = 0xFE937,
+}
+
+local validpair = {
+ [noad_rel] = true,
+ [noad_ord] = true,
+ [noad_bin] = true, -- new
+ [noad_punct] = true, -- new
+ [noad_opdisplaylimits] = true,
+ [noad_oplimits] = true,
+ [noad_opnolimits] = true,
+}
+
+local function movesubscript(parent,current_nucleus,current_char)
+ local prev = getprev(parent)
+ if prev and getid(prev) == math_noad then
+ if not getfield(prev,"sup") and not getfield(prev,"sub") then
+ -- {f} {'}_n => f_n^'
+ setchar(current_nucleus,movesub[current_char or getchar(current_nucleus)])
+ local nucleus = getfield(parent,"nucleus")
+ local sub = getfield(parent,"sub")
+ local sup = getfield(parent,"sup")
+ setfield(prev,"sup",nucleus)
+ setfield(prev,"sub",sub)
+ local dummy = copy_node(nucleus)
+ setchar(dummy,0)
+ setfield(parent,"nucleus",dummy)
+ setfield(parent,"sub",nil)
+ if trace_collapsing then
+ report_collapsing("fixing subscript")
+ end
+ elseif not getfield(prev,"sup") then
+ -- {f} {'}_n => f_n^'
+ setchar(current_nucleus,movesub[current_char or getchar(current_nucleus)])
+ local nucleus = getfield(parent,"nucleus")
+ local sup = getfield(parent,"sup")
+ setfield(prev,"sup",nucleus)
+ local dummy = copy_node(nucleus)
+ setchar(dummy,0)
+ setfield(parent,"nucleus",dummy)
+ if trace_collapsing then
+ report_collapsing("fixing subscript")
+ end
+ end
+ end
+end
+
+local function collapsepair(pointer,what,n,parent,nested) -- todo: switch to turn in on and off
+ if parent then
+ if validpair[getsubtype(parent)] then
+ local current_nucleus = getfield(parent,"nucleus")
+ if getid(current_nucleus) == math_char then
+ local current_char = getchar(current_nucleus)
+ if not getfield(parent,"sub") and not getfield(parent,"sup") then
+ local mathpair = mathpairs[current_char]
+ if mathpair then
+ local next_noad = getnext(parent)
+ if next_noad and getid(next_noad) == math_noad then
+ if validpair[getsubtype(next_noad)] then
+ local next_nucleus = getfield(next_noad,"nucleus")
+ local next_char = getchar(next_nucleus)
+ if getid(next_nucleus) == math_char then
+ local newchar = mathpair[next_char]
+ if newchar then
+ local id = getfont(current_nucleus)
+ local characters = fontcharacters[id]
+ if characters and characters[newchar] then
+ if trace_collapsing then
+ report_collapsing("%U + %U => %U",current_char,next_char,newchar)
+ end
+ setchar(current_nucleus,newchar)
+ local next_next_noad = getnext(next_noad)
+ if next_next_noad then
+ setlink(parent,next_next_noad)
+ else
+ setnext(parent)
+ end
+ setfield(parent,"sup",getfield(next_noad,"sup"))
+ setfield(parent,"sub",getfield(next_noad,"sub"))
+ setfield(next_noad,"sup",nil)
+ setfield(next_noad,"sub",nil)
+ free_node(next_noad)
+ collapsepair(pointer,what,n,parent,true)
+ -- if not nested and movesub[current_char] then
+ -- movesubscript(parent,current_nucleus,current_char)
+ -- end
+ end
+ elseif not nested and movesub[current_char] then
+ movesubscript(parent,current_nucleus,current_char)
+ end
+ end
+ end
+ elseif not nested and movesub[current_char] then
+ movesubscript(parent,current_nucleus,current_char)
+ end
+ elseif not nested and movesub[current_char] then
+ movesubscript(parent,current_nucleus,current_char)
+ end
+ elseif not nested and movesub[current_char] then
+ movesubscript(parent,current_nucleus,current_char)
+ end
+ end
+ end
+ end
+end
+
+collapse[math_char] = collapsepair
+
+function noads.handlers.collapse(head,style,penalties)
+ processnoads(head,collapse,"collapse")
+ return true
+end
+
+-- variants
+
+local variants = { }
+
+local validvariants = { -- fast check on valid
+ [0x2229] = 0xFE00, [0x222A] = 0xFE00,
+ [0x2268] = 0xFE00, [0x2269] = 0xFE00,
+ [0x2272] = 0xFE00, [0x2273] = 0xFE00,
+ [0x228A] = 0xFE00, [0x228B] = 0xFE00,
+ [0x2293] = 0xFE00, [0x2294] = 0xFE00,
+ [0x2295] = 0xFE00,
+ [0x2297] = 0xFE00,
+ [0x229C] = 0xFE00,
+ [0x22DA] = 0xFE00, [0x22DB] = 0xFE00,
+ [0x2A3C] = 0xFE00, [0x2A3D] = 0xFE00,
+ [0x2A9D] = 0xFE00, [0x2A9E] = 0xFE00,
+ [0x2AAC] = 0xFE00, [0x2AAD] = 0xFE00,
+ [0x2ACB] = 0xFE00, [0x2ACC] = 0xFE00,
+}
+
+variants[math_char] = function(pointer,what,n,parent) -- also set export value
+ local char = getchar(pointer)
+ local selector = validvariants[char]
+ if selector then
+ local next = getnext(parent)
+ if next and getid(next) == math_noad then
+ local nucleus = getfield(next,"nucleus")
+ if nucleus and getid(nucleus) == math_char and getchar(nucleus) == selector then
+ local variant
+ local tfmdata = fontdata[getfont(pointer)]
+ local mathvariants = tfmdata.resources.variants -- and variantdata
+ if mathvariants then
+ mathvariants = mathvariants[selector]
+ if mathvariants then
+ variant = mathvariants[char]
+ end
+ end
+ if variant then
+ setchar(pointer,variant)
+ setattr(pointer,a_exportstatus,char) -- we don't export the variant as it's visual markup
+ if trace_variants then
+ report_variants("variant (%U,%U) replaced by %U",char,selector,variant)
+ end
+ else
+ if trace_variants then
+ report_variants("no variant (%U,%U)",char,selector)
+ end
+ end
+ setprev(next,pointer)
+ setnext(parent,getnext(next))
+ free_node(next)
+ end
+ end
+ end
+end
+
+function handlers.variants(head,style,penalties)
+ processnoads(head,variants,"unicode variant")
+ return true
+end
+
+-- for manuals
+
+local classes = { }
+
+local colors = {
+ [noad_rel] = "trace:dr",
+ [noad_ord] = "trace:db",
+ [noad_bin] = "trace:dg",
+ [noad_open] = "trace:dm",
+ [noad_close] = "trace:dm",
+ [noad_punct] = "trace:dc",
+ -- [noad_opdisplaylimits] = "",
+ -- [noad_oplimits] = "",
+ -- [noad_opnolimits] = "",
+ -- [noad_inner = "",
+ -- [noad_under = "",
+ -- [noad_over = "",
+ -- [noad_vcenter = "",
+}
+
+classes[math_char] = function(pointer,what,n,parent)
+ local color = colors[getsubtype(parent)]
+ if color then
+ setcolor(pointer,color)
+ else
+ resetcolor(pointer)
+ end
+end
+
+function handlers.classes(head,style,penalties)
+ processnoads(head,classes,"classes")
+ return true
+end
+
+registertracker("math.classes",function(v) tasks.setaction("math","noads.handlers.classes",v) end)
+
+-- experimental
+
+do
+
+ -- mathematics.registerdomain {
+ -- name = "foo",
+ -- parents = { "bar" },
+ -- characters = {
+ -- [0x123] = { char = 0x234, class = binary },
+ -- },
+ -- }
+
+ local domains = { }
+ local categories = { }
+ local numbers = { }
+ local mclasses = mathematics.classes
+ local a_mathdomain = privateattribute("mathdomain")
+
+ mathematics.domains = categories
+
+ local permitted = {
+ ordinary = noad_ord,
+ binary = noad_bin,
+ relation = noad_rel,
+ punctuation = noad_punct,
+ inner = noad_inner,
+ }
+
+ function mathematics.registerdomain(data)
+ local name = data.name
+ if not name then
+ return
+ end
+ local attr = #numbers + 1
+ categories[name] = data
+ numbers[attr] = data
+ data.attribute = attr
+ -- we delay hashing
+ return attr
+ end
+
+ local enable
+
+ enable = function()
+ tasks.enableaction("math", "noads.handlers.domains")
+ if trace_domains then
+ report_domains("enabling math domains")
+ end
+ enable = false
+ end
+
+ function mathematics.setdomain(name)
+ if enable then
+ enable()
+ end
+ local data = name and name ~= v_reset and categories[name]
+ texsetattribute(a_mathdomain,data and data.attribute or unsetvalue)
+ end
+
+ function mathematics.getdomain(name)
+ if enable then
+ enable()
+ end
+ local data = name and name ~= v_reset and categories[name]
+ context(data and data.attribute or unsetvalue)
+ end
+
+ implement {
+ name = "initializemathdomain",
+ actions = enable,
+ onlyonce = true,
+ }
+
+ implement {
+ name = "setmathdomain",
+ arguments = "string",
+ actions = mathematics.setdomain,
+ }
+
+ implement {
+ name = "getmathdomain",
+ arguments = "string",
+ actions = mathematics.getdomain,
+ }
+
+ local function makehash(data)
+ local hash = { }
+ local parents = data.parents
+ if parents then
+ local function merge(name)
+ if name then
+ local c = categories[name]
+ if c then
+ local hash = c.hash
+ if not hash then
+ hash = makehash(c)
+ end
+ for k, v in next, hash do
+ hash[k] = v
+ end
+ end
+ end
+ end
+ if type(parents) == "string" then
+ merge(parents)
+ elseif type(parents) == "table" then
+ for i=1,#parents do
+ merge(parents[i])
+ end
+ end
+ end
+ local characters = data.characters
+ if characters then
+ for k, v in next, characters do
+ -- local chr = n.char
+ local cls = v.class
+ if cls then
+ v.code = permitted[cls]
+ else
+ -- invalid class
+ end
+ hash[k] = v
+ end
+ end
+ data.hash = hash
+ return hash
+ end
+
+ domains[math_char] = function(pointer,what,n,parent)
+ local attr = getattr(pointer,a_mathdomain)
+ if attr then
+ local domain = numbers[attr]
+ if domain then
+ local hash = domain.hash
+ if not hash then
+ hash = makehash(domain)
+ end
+ local char = getchar(pointer)
+ local okay = hash[char]
+ if okay then
+ local chr = okay.char
+ local cls = okay.code
+ if chr and chr ~= char then
+ setchar(pointer,chr)
+ end
+ if cls and cls ~= getsubtype(parent) then
+ setsubtype(parent,cls)
+ end
+ end
+ end
+ end
+ end
+
+ function handlers.domains(head,style,penalties)
+ processnoads(head,domains,"domains")
+ return true
+ end
+
+end
+
+
+-- just for me
+
+function handlers.showtree(head,style,penalties)
+ inspect(nodes.totree(head))
+end
+
+registertracker("math.showtree",function(v) tasks.setaction("math","noads.handlers.showtree",v) end)
+
+-- the normal builder
+
+function builders.kernel.mlist_to_hlist(head,style,penalties)
+ return mlist_to_hlist(head,style,penalties), true
+end
+
+-- function builders.kernel.mlist_to_hlist(head,style,penalties)
+-- print("!!!!!!! BEFORE",penalties)
+-- for n in node.traverse(head) do print(n) end
+-- print("!!!!!!!")
+-- head = mlist_to_hlist(head,style,penalties)
+-- print("!!!!!!! AFTER")
+-- for n in node.traverse(head) do print(n) end
+-- print("!!!!!!!")
+-- return head, true
+-- end
+
+tasks.new {
+ name = "math",
+ arguments = 2,
+ processor = utilities.sequencers.nodeprocessor,
+ sequence = {
+ "before",
+ "normalizers",
+ "builders",
+ "after",
+ },
+}
+
+tasks.freezegroup("math", "normalizers") -- experimental
+tasks.freezegroup("math", "builders") -- experimental
+
+local actions = tasks.actions("math") -- head, style, penalties
+
+local starttiming, stoptiming = statistics.starttiming, statistics.stoptiming
+
+function processors.mlist_to_hlist(head,style,penalties)
+ starttiming(noads)
+ local head, done = actions(head,style,penalties)
+ stoptiming(noads)
+ return head, done
+end
+
+callbacks.register('mlist_to_hlist',processors.mlist_to_hlist,"preprocessing math list")
+
+-- tracing
+
+statistics.register("math processing time", function()
+ return statistics.elapsedseconds(noads)
+end)
diff --git a/Master/texmf-dist/tex/context/base/math-pln.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-pln.mkiv
index 5e4c43c81a2..a5ecdd11dda 100644
--- a/Master/texmf-dist/tex/context/base/math-pln.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-pln.mkiv
@@ -24,7 +24,7 @@
% might change
\unexpanded\def\hrulefill{\leaders\hrule\hfill}
-\unexpanded\def\dotfill {\cleaders\hbox{$\mathsurround\zeropoint\mkern1.5mu.\mkern1.5mu$}\hfill}
+\unexpanded\def\dotfill {\cleaders\hbox{\normalstartimath\mathsurround\zeropoint\mkern1.5mu.\mkern1.5mu\normalstopimath}\hfill}
% will move
@@ -33,7 +33,7 @@
\vtop
{\baselineskip\zeroskip
\lineskip.25\exheight
- \ialign{##\crcr#1\crcr}}}
+ \ialign{\alignmark\alignmark\crcr#1\crcr}}}
\def\ooalign % chars over each other
{\lineskiplimit-\maxdimen
@@ -71,17 +71,34 @@
\vcenter
{\normalbaselines
\mathsurround\zeropoint
- \ialign{$##\hfil$&\quad##\hfil\crcr#1\crcr}}%
+ \ialign{%
+ \normalstartimath\alignmark\alignmark\hfil\normalstopimath
+ \aligntab
+ \quad\alignmark\alignmark\hfil
+ \crcr
+ #1%
+ \crcr}}%
\right.}
\unexpanded\def\matrix#1%
{\emptyhbox
\mskip\thinmuskip
\vcenter
- {\normalbaselines\mathsurround\zeropoint
- \ialign{\hfil$##$\hfil&&\quad\hfil$##$\hfil\crcr
- \mathstrut\crcr\noalign{\kern-\baselineskip}
- #1\crcr\mathstrut\crcr\noalign{\kern-\baselineskip}}}%
+ {\normalbaselines
+ \mathsurround\zeropoint
+ \ialign{%
+ \hfil\normalstartimath\alignmark\alignmark\normalstopimath\hfil
+ \aligntab
+ \aligntab
+ \quad\hfil\normalstartimath\alignmark\alignmark\normalstopimath\hfil
+ \crcr
+ \mathstrut
+ \crcr
+ \noalign{\kern-\baselineskip}
+ #1\crcr
+ \mathstrut
+ \crcr
+ \noalign{\kern-\baselineskip}}}%
\mskip\thinmuskip}
\unexpanded\def\pmatrix#1%
@@ -117,7 +134,8 @@
{\the\mathdisplayaligntweaks
\tabskip\zeroskip
\halign
- {\hbox to \displaywidth{$\tabskip\zeroskip\everycr\emptytoks\hfil\displaystyle##\hfil$}\crcr
- #1\crcr}}
+ {\hbox to \displaywidth{%
+ \normalstartimath\tabskip\zeroskip\everycr\emptytoks\hfil\displaystyle\alignmark\alignmark\hfil\normalstopimath}\crcr
+ #1\crcr}}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/math-rad.mkvi b/Master/texmf-dist/tex/context/base/mkiv/math-rad.mkvi
index 23e056c1fd2..113d4af500c 100644
--- a/Master/texmf-dist/tex/context/base/math-rad.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-rad.mkvi
@@ -182,7 +182,7 @@
%
\edef\p_mp{\mathradicalparameter\c!mp}%
%
- \setbox\scratchbox\hbox\bgroup % todo: tag this box as sqrt
+ \setbox\scratchbox\hpack\bgroup % todo: tag this box as sqrt
\uniqueMPgraphic
{\p_mp}%
%{...}%
@@ -190,7 +190,7 @@
\scratchdimen \wd\scratchbox
\scratchtopoffset \dimexpr\scratchoffset+\dp\nextbox\relax
\scratchbottomoffset\dimexpr\scratchoffset+\ht\nextbox/2\relax
- \hbox to \scratchdimen{\hss\box\nextbox\hskip\scratchoffset}%
+ \hpack to \scratchdimen{\hss\box\nextbox\hskip\scratchoffset}%
\hskip-\scratchdimen
\lower\dimexpr\scratchtopoffset\box\scratchbox%
\ifx\currentmathradicaldegree\empty \else
@@ -241,11 +241,11 @@
\edef\overlaylinecolor{\mathornamentparameter\c!color}%
\edef\p_mp{\mathornamentparameter\c!mp}%
% thw width of the graphic determines the width of the final result
- \setbox\scratchbox\hbox{\uniqueMPgraphic{\p_mp}}% todo: add code key + tag
+ \setbox\scratchbox\hpack{\uniqueMPgraphic{\p_mp}}% todo: add code key + tag
\scratchdimen \wd\scratchbox
% \scratchtopoffset \dimexpr\scratchoffset+\dp\nextbox\relax
% \scratchbottomoffset\dimexpr\scratchoffset+\ht\nextbox/2\relax
- \hbox to \scratchdimen{\hss\box\nextbox\hss}%
+ \hpack to \scratchdimen{\hss\box\nextbox\hss}%
\hskip-\scratchdimen
\box\scratchbox
\endgroup}
diff --git a/Master/texmf-dist/tex/context/base/math-ren.lua b/Master/texmf-dist/tex/context/base/mkiv/math-ren.lua
index 4628ffe5587..4628ffe5587 100644
--- a/Master/texmf-dist/tex/context/base/math-ren.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-ren.lua
diff --git a/Master/texmf-dist/tex/context/base/math-scr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-scr.mkiv
index 2decaa81fc5..2decaa81fc5 100644
--- a/Master/texmf-dist/tex/context/base/math-scr.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-scr.mkiv
diff --git a/Master/texmf-dist/tex/context/base/math-stc.mkvi b/Master/texmf-dist/tex/context/base/mkiv/math-stc.mkvi
index a879d157f27..96e1738db07 100644
--- a/Master/texmf-dist/tex/context/base/math-stc.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-stc.mkvi
@@ -642,13 +642,17 @@
\unexpanded\def\mathdouble{\begingroup\dodoubleempty\math_stackers_handle_double}
\def\math_stackers_handle_over[#category]%
- {\math_stackers_direct_double\plusone\zerocount{\iffirstargument#category\else\v!top \fi}} % will be defined later on
+ {\math_stackers_direct_double\plusone\zerocount
+ {\iffirstargument#category\else\v!top \fi}} % will be defined later on
\def\math_stackers_handle_under[#category]%
- {\math_stackers_direct_double\zerocount\plusone{\iffirstargument#category\else\v!bottom\fi}} % will be defined later on
+ {\math_stackers_direct_double\zerocount\plusone
+ {\iffirstargument#category\else\v!bottom\fi}} % will be defined later on
-\def\math_stackers_handle_double[#category]%
- {\math_stackers_direct_double\plusone\plusone {\iffirstargument#category\else\v!bottom\fi}} % will be defined later on
+\def\math_stackers_handle_double[#topcategory][#bottomcategory]%
+ {\math_stackers_direct_double\plusone\plusone
+ {\iffirstargument #topcategory\else\v!top \fi}%
+ {\ifsecondargument#bottomcategory\else\v!bottom\fi}}
\def\math_stackers_direct_double#top#bottom#category#codepoint#text%
{\math_stackers_make_double#top#bottom{#category}{#codepoint}{0}{#text}%
@@ -970,9 +974,6 @@
\let\normalunderrightarrow\underrightarrow
\let\normaloverrightarrow \overrightarrow
-\let\lceil \lceiling
-\let\rceil \rceiling
-
%D Here come the new ones:
\definemathstackers [\v!none] [\v!mathematics] [\c!hoffset=\zeropoint]
@@ -1236,9 +1237,9 @@
%D Extra:
-\unexpanded\edef\singlebond{\mathematics{\mathsurround\zeropoint\char\number"002D}}
-\unexpanded\edef\doublebond{\mathematics{\mathsurround\zeropoint\char\number"003D}}
-\unexpanded\edef\triplebond{\mathematics{\mathsurround\zeropoint\char\number"2261}}
+\unexpanded\edef\singlebond{\mathematics{\mathsurround\zeropoint\char\number"002D\relax}}
+\unexpanded\edef\doublebond{\mathematics{\mathsurround\zeropoint\char\number"003D\relax}}
+\unexpanded\edef\triplebond{\mathematics{\mathsurround\zeropoint\char\number"2261\relax}}
% \mathchardef\singlebond"002D
% \mathchardef\doublebond"003D
@@ -1261,13 +1262,13 @@
\edef\currentmathstackers{#category}%
\edef\p_moffset{\mathstackersparameter\c!moffset}%
\ifx\p_moffset\empty \else
- \mskip\scratchmuskip
+ \mskip\p_moffset\relax
\fi
\ifmmode\math_class_by_parameter\mathstackersparameter\else\dontleavehmode\fi
{\usemathstackerscolorparameter\c!color
\Umathchar\zerocount\defaultmathfamily#codepoint}%
\ifx\p_moffset\empty \else
- \mskip\scratchmuskip
+ \mskip\p_moffset\relax
\fi
\endgroup}
@@ -1284,8 +1285,8 @@
% \limits\normalsuperscript{\box0}\normalsubscript{\box2}}%
% $\Uoverdelimiter \defaultmathfamily "2194 {xxxx}$
-% $\Udelimiterover \defaultmathfamily "2194 {xxxx}$
% $\Uunderdelimiter\defaultmathfamily "2194 {xxxx}$
+% $\Udelimiterover \defaultmathfamily "2194 {xxxx}$
% $\Udelimiterunder\defaultmathfamily "2194 {xxxx}$
% $\Udelimiterover \defaultmathfamily "219A {\Udelimiterunder \defaultmathfamily "219B {xxxx}}$
diff --git a/Master/texmf-dist/tex/context/base/math-tag.lua b/Master/texmf-dist/tex/context/base/mkiv/math-tag.lua
index 0d900b3a1a3..e83b401fb2d 100644
--- a/Master/texmf-dist/tex/context/base/math-tag.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-tag.lua
@@ -7,6 +7,7 @@ if not modules then modules = { } end modules ['math-tag'] = {
}
-- todo: have a local list with local tags that then get appended
+-- todo: use tex.getmathcodes (no table)
-- use lpeg matchers
@@ -22,8 +23,10 @@ local tonut = nuts.tonut
local getnext = nuts.getnext
local getid = nuts.getid
local getchar = nuts.getchar
+local getfont = nuts.getfont
local getlist = nuts.getlist
local getfield = nuts.getfield
+local getdisc = nuts.getdisc
local getsubtype = nuts.getsubtype
local getattr = nuts.getattr
local setattr = nuts.setattr
@@ -88,7 +91,6 @@ local ordinary_code = mathcodes.ordinary
local variable_code = mathcodes.variable
local fromunicode16 = fonts.mappings.fromunicode16
-local font_of_family = node.family_font
local fontcharacters = fonts.hashes.characters
local report_tags = logs.reporter("structure","tags")
@@ -150,7 +152,8 @@ local fencesstack = { }
local function getunicode(n) -- instead of getchar
local char = getchar(n)
- local font = font_of_family(getfield(n,"fam")) -- font_of_family
+ -- local font = font_of_family(getfield(n,"fam")) -- font_of_family
+ local font = getfont(n)
local data = fontcharacters[font][char]
return data.unicode or char
end
@@ -316,9 +319,10 @@ process = function(start) -- we cannot use the processor as we have no finalizer
elseif id == glyph_code then
runner(getfield(n,"components"),depth+1) -- this should not be needed
elseif id == disc_code then
- runner(getfield(n,"pre"),depth+1) -- idem
- runner(getfield(n,"post"),depth+1) -- idem
- runner(getfield(n,"replace"),depth+1) -- idem
+ local pre, post, replace = getdisc(n)
+ runner(pre,depth+1) -- idem
+ runner(post,depth+1) -- idem
+ runner(replace,depth+1) -- idem
end
if mth == 1 then
stop_tagged()
@@ -524,8 +528,7 @@ process = function(start) -- we cannot use the processor as we have no finalizer
processsubsup(start)
end
elseif id == glue_code then
- -- local spec = getfield(start,"spec")
- -- setattr(start,a_tagged,start_tagged("mspace",{ width = getfield(spec,"width") }))
+ -- setattr(start,a_tagged,start_tagged("mspace",{ width = getfield(start,"width") }))
setattr(start,a_tagged,start_tagged("mspace"))
stop_tagged()
else
diff --git a/Master/texmf-dist/tex/context/base/math-ttv.lua b/Master/texmf-dist/tex/context/base/mkiv/math-ttv.lua
index 1f644e78834..1f644e78834 100644
--- a/Master/texmf-dist/tex/context/base/math-ttv.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-ttv.lua
diff --git a/Master/texmf-dist/tex/context/base/math-vfu.lua b/Master/texmf-dist/tex/context/base/mkiv/math-vfu.lua
index a683e02cfdc..a683e02cfdc 100644
--- a/Master/texmf-dist/tex/context/base/math-vfu.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-vfu.lua
diff --git a/Master/texmf-dist/tex/context/base/meta-fig.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-fig.mkiv
index bf37aa7bfa7..bf37aa7bfa7 100644
--- a/Master/texmf-dist/tex/context/base/meta-fig.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-fig.mkiv
diff --git a/Master/texmf-dist/tex/context/base/meta-fnt.lua b/Master/texmf-dist/tex/context/base/mkiv/meta-fnt.lua
index 95bdfa6d966..95bdfa6d966 100644
--- a/Master/texmf-dist/tex/context/base/meta-fnt.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-fnt.lua
diff --git a/Master/texmf-dist/tex/context/base/meta-fnt.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-fnt.mkiv
index e54c0be0a4f..e54c0be0a4f 100644
--- a/Master/texmf-dist/tex/context/base/meta-fnt.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-fnt.mkiv
diff --git a/Master/texmf-dist/tex/context/base/meta-fun.lua b/Master/texmf-dist/tex/context/base/mkiv/meta-fun.lua
index 7aaaf2818ec..7aaaf2818ec 100644
--- a/Master/texmf-dist/tex/context/base/meta-fun.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-fun.lua
diff --git a/Master/texmf-dist/tex/context/base/meta-fun.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-fun.mkiv
index c3a4ce8d417..c3a4ce8d417 100644
--- a/Master/texmf-dist/tex/context/base/meta-fun.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-fun.mkiv
diff --git a/Master/texmf-dist/tex/context/base/meta-grd.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-grd.mkiv
index da410ba689d..da410ba689d 100644
--- a/Master/texmf-dist/tex/context/base/meta-grd.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-grd.mkiv
diff --git a/Master/texmf-dist/tex/context/base/meta-imp-clp.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-clp.mkiv
index 5c9206deee9..89886b38969 100644
--- a/Master/texmf-dist/tex/context/base/meta-imp-clp.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-clp.mkiv
@@ -1,5 +1,5 @@
%D \module
-%D [ file=meta-clp,
+%D [ file=meta-imp-clp,
%D version=2000.07.06,
%D title=\METAPOST\ Graphics,
%D subtitle=Clipping,
diff --git a/Master/texmf-dist/tex/context/base/meta-imp-dum.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-dum.mkiv
index e6ccc234c6d..e6ccc234c6d 100644
--- a/Master/texmf-dist/tex/context/base/meta-imp-dum.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-dum.mkiv
diff --git a/Master/texmf-dist/tex/context/base/meta-imp-fen.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-fen.mkiv
index 307a59b4db6..307a59b4db6 100644
--- a/Master/texmf-dist/tex/context/base/meta-imp-fen.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-fen.mkiv
diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-grid.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-grid.mkiv
new file mode 100644
index 00000000000..9208a3dae14
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-grid.mkiv
@@ -0,0 +1,63 @@
+%D \module
+%D [ file=meta-imp-grid,
+%D version=2016.01.08,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Grid Tracing,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\startMPextensions
+ color mfun_grid_lgc[] ;
+ numeric mfun_grid_lgi ;
+ mfun_grid_lgc[1] := red ;
+ mfun_grid_lgc[2] := green ;
+ mfun_grid_lgc[3] := blue ;
+ mfun_grid_lgi := 1 ;
+\stopMPextensions
+
+\startuseMPgraphic{linegrid}
+ % if unknown mfun_grid_lgi :
+ % color mfun_grid_lgc[] ;
+ % numeric mfun_grid_lgi ;
+ % mfun_grid_lgc[1] := red ;
+ % mfun_grid_lgc[2] := green ;
+ % mfun_grid_lgc[3] := blue ;
+ % mfun_grid_lgi := 1 ;
+ % elseif mfun_grid_lgi = 3 :
+ if mfun_grid_lgi = 3 :
+ mfun_grid_lgi := 1 ;
+ else :
+ mfun_grid_lgi := mfun_grid_lgi + 1 ;
+ fi ;
+ draw image (
+ save f, t ;
+ pair f, t ;
+ f := (0,-2*LineHeight) ;
+ t := (0, 2*LineHeight) ;
+ for i=ypart f - eps step LineHeight/5 until ypart t + eps:
+ draw (-EmWidth,i) -- (0,i) ;
+ endfor ;
+ draw f -- t ;
+ draw (-EmWidth,0) -- (EmWidth,0) ;
+ % ) shifted (-mfun_grid_lgi*EmWidth/3,0) withcolor mfun_grid_lgc[mfun_grid_lgi] ;
+ ) shifted (-EmWidth/2,0) withcolor mfun_grid_lgc[mfun_grid_lgi] ;
+ setbounds currentpicture to origin -- cycle ;
+\stopuseMPgraphic
+
+\unexpanded\def\showlinegrid{\dontleavehmode\smash{\useMPgraphic{linegrid}}}
+
+\continueifinputfile{meta-imp-grid.mkiv}
+
+\starttext
+
+\showlinegrid \input tufte \par
+\showlinegrid \input tufte \par
+\showlinegrid \input ward \par
+\showlinegrid \input ward \par
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/meta-imp-mis.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-mis.mkiv
index e8282c381b8..e8282c381b8 100644
--- a/Master/texmf-dist/tex/context/base/meta-imp-mis.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-mis.mkiv
diff --git a/Master/texmf-dist/tex/context/base/meta-imp-nav.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-nav.mkiv
index 45a31ba5ecf..45a31ba5ecf 100644
--- a/Master/texmf-dist/tex/context/base/meta-imp-nav.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-nav.mkiv
diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-outlines.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-outlines.mkiv
new file mode 100644
index 00000000000..7d74950371f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-outlines.mkiv
@@ -0,0 +1,176 @@
+%D \module
+%D [ file=meta-imp-outlines,
+%D version=2015.06.02,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Outlines,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\startluacode
+
+local concat = table.concat
+local formatters = string.formatters
+local validstring = string.valid
+
+local f_setbounds = formatters["setbounds currentpicture to (%s) enlarged %.4G;"]
+local f_index = formatters['draw anchored.bot(textext("\\tttf\\setstrut\\strut index %i") ysized 2bp ,.5[llcorner currentpicture,lrcorner currentpicture] shifted (0,%.4G));']
+local f_unicode = formatters['draw anchored.bot(textext("\\tttf\\setstrut\\strut unicode %05X") ysized 2bp ,.5[llcorner currentpicture,lrcorner currentpicture] shifted (0,%.4G));']
+
+local f_in_red = formatters["draw %s withpen pencircle scaled .15 withcolor .5red;"]
+local f_in_green = formatters["draw %s withpen pencircle scaled .15 withcolor .5green;"]
+local f_in_blue = formatters["draw %s withpen pencircle scaled .15 withcolor .5blue;"]
+local f_in_gray = formatters["draw image(%s) withcolor .75yellow;"]
+
+local f_glyph = formatters [ [[
+pickup pencircle scaled .15;
+pointlabelfont := "Mono sa .125";
+pointlabelscale := 1bp ;
+drawoptionsfactor := .2bp ;
+originlength := 2bp ;
+%s;
+]] ]
+
+local metapost = fonts.metapost
+
+local variables = interfaces.variables
+
+local v_all = variables.all
+local v_page = variables.page
+local v_text = variables.text
+local v_command = variables.command
+
+function metapost.showglyph(specification)
+ local fontid = font.current()
+ local shapedata = fonts.hashes.shapes[fontid] -- by index
+ local chardata = fonts.hashes.characters[fontid] -- by unicode
+ local shapeglyphs = shapedata.glyphs
+ local character = validstring(specification.character)
+ local index = validstring(specification.index)
+ local alternative = validstring(specification.alternative)
+ local command = validstring(specification.command)
+
+ local function shape(index,what,f_comment)
+ if not index then
+ return
+ end
+ local glyph = shapeglyphs[index]
+ if glyph and (glyph.segments or glyph.sequence) then
+ local units = data.fontheader and data.fontheader.emsize or 1000
+ local factor = 100/units
+ local paths = metapost.paths(glyph,factor)
+ if #paths > 0 then
+ local graphic = f_glyph(concat{
+ f_in_gray(metapost.fill(paths)),
+ metapost.draw(paths,true), -- true triggers trace
+ f_in_red(metapost.boundingbox(glyph,factor)),
+ f_in_green(metapost.widthline(glyph,factor)),
+ f_in_blue(metapost.zeroline(glyph,factor)),
+ f_setbounds(metapost.maxbounds(data,index,factor),offset or 1),
+ f_comment(what,1)
+ })
+ if alternative == v_page then
+ context.startMPpage()
+ context(graphic)
+ context.stopMPpage()
+ elseif alternative == v_command then
+ context[command](graphic)
+ else -- v_text
+ context.startMPcode()
+ context(graphic)
+ context.stopMPcode()
+ end
+ end
+ end
+ end
+
+ if character == v_all then
+ for u, c in table.sortedhash(chardata) do
+ shape(c.index,u,f_unicode)
+ end
+ return
+ end
+ if type(character) == "string" then
+ character = utf.byte(character)
+ end
+ if type(character) == "number" then
+ local c = chardata[character]
+ if c then
+ shape(c.index,c.index,f_index)
+ end
+ return
+ end
+ if type(index) == "number" then
+ shape(index,index,f_index)
+ return
+ end
+ local first, last
+ if type(index) == "string" then
+ first, last = string.match(index,"^(.-):(.*)$")
+ if first and last then
+ first = tonumber(first)
+ last = tonumber(last)
+ else
+ first = tonumber(index)
+ last = first
+ end
+ if not first then
+ first = 1
+ last = #shapeglyphs
+ elseif not last then
+ last = first
+ end
+ else
+ first = 1
+ last = #shapeglyphs
+ end
+ for index=first,last do
+ shape(index,index,f_index)
+ end
+end
+
+\stopluacode
+
+\unprotect
+
+\unexpanded\def\showshape
+ {\dosingleargument\meta_shapes_show}
+
+\def\meta_shapes_show[#1]%
+ {\begingroup
+ \getdummyparameters[\c!alternative=\v!text,#1]%
+ \ctxlua{fonts.metapost.showglyph{
+ character = "\dummyparameter\c!character",
+ index = "\dummyparameter\c!index",
+ alternative = "\dummyparameter\c!alternative",
+ command = "\dummyparameter\c!command",
+ }}%
+ \endgroup}
+
+\protect
+
+\continueifinputfile{meta-imp-outlines.mkiv}
+
+\starttext
+
+% \setupbodyfont[pagella]
+
+% \definedfont[latinmodern-math]\showshape[index=3078,alternative=page]
+
+% \setupbodyfont[pagella]
+% \showshape[character=all,alternative=page]
+
+\setupbodyfont[dejavu]
+\showshape[character=P,alternative=text]
+
+% \definedfont[almfixed]
+% \showshape[character=all,alternative=page]
+
+% \definedfont[file:sourcehansans-bold.otf]
+% \showshape[index=40000:41000,alternative=page]
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/meta-imp-pre.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-pre.mkiv
index 098be030b19..098be030b19 100644
--- a/Master/texmf-dist/tex/context/base/meta-imp-pre.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-pre.mkiv
diff --git a/Master/texmf-dist/tex/context/base/meta-imp-tab.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-tab.mkiv
index a4affbea458..a4affbea458 100644
--- a/Master/texmf-dist/tex/context/base/meta-imp-tab.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-tab.mkiv
diff --git a/Master/texmf-dist/tex/context/base/meta-imp-txt.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-txt.mkiv
index 7069d21a4ea..7069d21a4ea 100644
--- a/Master/texmf-dist/tex/context/base/meta-imp-txt.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-txt.mkiv
diff --git a/Master/texmf-dist/tex/context/base/meta-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/meta-ini.lua
index 8f713126323..8f713126323 100644
--- a/Master/texmf-dist/tex/context/base/meta-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-ini.lua
diff --git a/Master/texmf-dist/tex/context/base/meta-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-ini.mkiv
index 299f37cef04..9f53aea69f6 100644
--- a/Master/texmf-dist/tex/context/base/meta-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-ini.mkiv
@@ -284,7 +284,7 @@
\endgroup}
\def\meta_process_graphic_start
- {\setbox\b_meta_graphic\hbox\bgroup}
+ {\setbox\b_meta_graphic\hpack\bgroup}
\def\meta_process_graphic_stop
{\egroup
@@ -369,7 +369,8 @@
\def\includeMPgraphic#1% gets expanded !
{\ifcsname\??mpgraphic#1\endcsname
- \doubleexpandafter\fourthoffourarguments\csname\??mpgraphic#1\endcsname ; % ; is safeguard
+ %\doubleexpandafter\fourthoffourarguments\csname\??mpgraphic#1\endcsname ; % ; is safeguard
+ \doubleexpandafter\fourthoffourarguments\lastnamedcs ; % ; is safeguard
\fi}
\let\meta_enable_include\relax
@@ -540,10 +541,12 @@
\fi}
\def\MPrawvar#1#2% no checking
- {\csname\??graphicvariable#1:#2\endcsname}
+ %{\csname\??graphicvariable#1:#2\endcsname}
+ {\begincsname\??graphicvariable#1:#2\endcsname}
\def\MPvariable#1% todo: could be a framed chain
- {\csname\??graphicvariable\currentmpvariableclass:#1\endcsname}
+ %{\csname\??graphicvariable\currentmpvariableclass:#1\endcsname}
+ {\begincsname\??graphicvariable\currentmpvariableclass:#1\endcsname}
\unexpanded\def\useMPvariables
{\dodoubleargument\meta_use_variables}
@@ -607,7 +610,7 @@
\doifelsecolor \ascii % with 2\bodyfontsize
{\meta_prepare_variable_color}
{\begingroup
- \setbox\b_meta_variable_box\hbox{\scratchdimen\m_meta_current_variable sp}%
+ \setbox\b_meta_variable_box\hpack{\scratchdimen\m_meta_current_variable sp}%
\ifzeropt\wd\b_meta_variable_box
\endgroup\meta_prepare_variable_number
\else
@@ -665,7 +668,7 @@
% hm, isn't this already done elsewhere?
\unexpanded\def\meta_obey_box_depth
- {\setbox\b_meta_graphic\hbox\bgroup
+ {\setbox\b_meta_graphic\hpack\bgroup
\raise\MPlly\box\b_meta_graphic
\egroup}
@@ -677,7 +680,7 @@
\dp\b_meta_graphic\the\dp\b_meta_graphic}}
\unexpanded\def\meta_obey_box_origin
- {\setbox\b_meta_graphic\hbox\bgroup
+ {\setbox\b_meta_graphic\hpack\bgroup
\kern\MPllx\raise\MPlly\box\b_meta_graphic
\egroup}
@@ -694,7 +697,13 @@
\unexpanded\def\meta_reuse_box#1#2#3#4#5% space delimiting would save some tokens
{\MPllx#2\MPlly#3\MPurx#4\MPury#5%
- \hbox{\forcecolorhack\getobject{MP}{#1}}} % else no proper color intent
+ \hpack{\forcecolorhack\getobject{MP}{#1}}} % else no proper color intent
+
+% \unexpanded\def\meta_use_box
+% {\setobject{MP}}
+
+\unexpanded\def\meta_use_box
+ {\setunreferencedobject{MP}}
\def\meta_handle_unique_graphic#1#2#3% when there are too many, we can store data at the lua end, although,
{\begingroup % when there are that many they're probably not that unique anyway
@@ -703,10 +712,10 @@
\ifcsname\??mpgraphic\overlaystamp:#1\endcsname\else
\meta_enable_include % redundant
\global\advance\c_meta_object_counter\plusone
- \setobject{MP}{\number\c_meta_object_counter}\hbox{\meta_process_graphic{#3}}% was vbox, graphic must end up as hbox
+ \meta_use_box{\number\c_meta_object_counter}\hpack{\meta_process_graphic{#3}}% was vbox, graphic must end up as hbox
\setxvalue{\??mpgraphic\overlaystamp:#1}{\meta_reuse_box{\number\c_meta_object_counter}{\the\MPllx}{\the\MPlly}{\the\MPurx}{\the\MPury}}%
\fi
- \getvalue{\??mpgraphic\overlaystamp:#1}%
+ \csname\??mpgraphic\overlaystamp:#1\endcsname\empty
\endgroup}
\unexpanded\def\startuniqueMPgraphic
@@ -730,7 +739,7 @@
{\meta_begin_graphic_group{#1}%
% \setupMPvariables[\currentMPgraphicname][#2]%
\setupMPvariables[#1][#2]%
- \getvalue{\??mpgraphic#1}\empty
+ \csname\??mpgraphic#1\endcsname\empty
\meta_end_graphic_group}
\def\meta_handle_use_graphic#1#2#3%
@@ -790,9 +799,9 @@
\fi
\meta_enable_include % redundant
\global\advance\c_meta_object_counter\plusone
- \setobject{MP}{\number\c_meta_object_counter}\hbox{\meta_process_graphic{#3}}% was vbox, graphic must end up as hbox
+ \meta_use_box{\number\c_meta_object_counter}\hpack{\meta_process_graphic{#3}}% was vbox, graphic must end up as hbox
\setxvalue{\??mpgraphic#1}{\meta_reuse_box{\number\c_meta_object_counter}{\the\MPllx}{\the\MPlly}{\the\MPurx}{\the\MPury}}%
- \getvalue{\??mpgraphic#1}%
+ \csname\??mpgraphic#1\endcsname\empty
\endgroup}
\unexpanded\def\startreusableMPgraphic
@@ -816,7 +825,7 @@
{\meta_begin_graphic_group{#1}%
% \doifsomething{#2}{\setupMPvariables[\currentMPgraphicname][#2]}%
\doifsomething{#2}{\setupMPvariables[#1][#2]}%
- \getvalue{\??mpgraphic#1}\empty
+ \csname\??mpgraphic#1\endcsname\empty
\meta_end_graphic_group}
\let\reuseMPgraphic \useMPgraphic % we can save a setup here if needed
@@ -866,7 +875,7 @@
\let\overlaystamp\overlaypagestamp
% \setupMPvariables[\m_meta_page_prefix:\currentMPgraphicname][#2]% prefix is new here
\setupMPvariables[\m_meta_page_prefix:#1][#2]% prefix is new here
- \getvalue{\??mpgraphic\m_meta_page_prefix:#1}{}%
+ \csname\??mpgraphic\m_meta_page_prefix:#1\endcsname\empty
\meta_end_graphic_group}
%D One way of defining a stamp is:
@@ -990,7 +999,7 @@
{\clf_mptexreset}
\unexpanded\def\useMPenvironmentbuffer[#1]%
- {\clf_mpsetfrombuffer{#1}}
+ {\clf_mptexsetfrombuffer{#1}}
%D This command takes \type {[reset]} as optional
%D argument.
@@ -1133,9 +1142,9 @@
{\defconvertedargument\ascii{#2}%
\dodoglobal\letvalue{\??mptext#1}\ascii}
-\def\MPtext #1{\executeifdefined{\??mptext#1}\empty}
-\def\MPstring#1{"\executeifdefined{\??mptext#1}\empty"}
-\def\MPbetex #1{btex \executeifdefined{\??mptext#1}\empty\space etex}
+\def\MPtext #1{\begincsname\??mptext#1\endcsname\empty}
+\def\MPstring#1{"\begincsname\??mptext#1\endcsname\empty"}
+\def\MPbetex #1{btex \begincsname\??mptext#1\endcsname\space etex}
%D In order to communicate conveniently with the \TEX\
%D engine, we introduce some typesetting variables.
@@ -1200,7 +1209,7 @@
\appendtoks
\disablediscretionaries
- \disablecompoundcharacters
+ %\disablecompoundcharacters
\to \everyMPgraphic
% \appendtoks % before color, inefficient, replace by low level copy
@@ -1486,7 +1495,7 @@
\unexpanded\def\startMPcalculation
{\begingroup
- \setbox\nextbox\hbox\bgroup
+ \setbox\nextbox\hpack\bgroup
\dosinglegroupempty\meta_start_calculation}
\def\meta_start_calculation
diff --git a/Master/texmf-dist/tex/context/base/meta-pag.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-pag.mkiv
index 6b6abd21135..6b6abd21135 100644
--- a/Master/texmf-dist/tex/context/base/meta-pag.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-pag.mkiv
diff --git a/Master/texmf-dist/tex/context/base/meta-pdf.lua b/Master/texmf-dist/tex/context/base/mkiv/meta-pdf.lua
index 3cbff63b168..3cbff63b168 100644
--- a/Master/texmf-dist/tex/context/base/meta-pdf.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-pdf.lua
diff --git a/Master/texmf-dist/tex/context/base/meta-pdf.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-pdf.mkiv
index 50eb1dd720a..14c97042e3f 100644
--- a/Master/texmf-dist/tex/context/base/meta-pdf.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-pdf.mkiv
@@ -39,13 +39,13 @@
\unexpanded\def\convertMPtoPDF#1#2#3% scaling no longer supported at this level (so #2 & #3 are ignored)
{\dostarttagged\t!mpgraphic\empty
- \naturalvbox attr \imageattribute 1 \bgroup
+ \naturalvpack attr \imageattribute 1 \bgroup
\message{[MP to PDF]}%
\xdef\MPfilename{#1}%
\resetMPboundingbox
\forgetall
\offinterlineskip
- \setbox\MPbox\vbox\bgroup
+ \setbox\MPbox\vpack\bgroup
\clf_convertmpstopdf{\MPfilename}%
\removeunwantedspaces % not that needed
\egroup
diff --git a/Master/texmf-dist/tex/context/base/meta-pdh.lua b/Master/texmf-dist/tex/context/base/mkiv/meta-pdh.lua
index 5040715c4f9..5040715c4f9 100644
--- a/Master/texmf-dist/tex/context/base/meta-pdh.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-pdh.lua
diff --git a/Master/texmf-dist/tex/context/base/meta-pdh.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-pdh.mkiv
index f3db5b38866..3787a56389b 100644
--- a/Master/texmf-dist/tex/context/base/meta-pdh.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-pdh.mkiv
@@ -106,10 +106,10 @@
\def\convertMPtoPDF#1#2#3% watch the transparency reset
{\resetMPvariables{#1}{#2}{#3}%
- \vbox\bgroup
+ \vpack\bgroup
\forgetall
\offinterlineskip
- \setbox\scratchbox\vbox\bgroup
+ \setbox\scratchbox\vpack\bgroup
\setnormalcatcodes % we can be in verbatim or so
\message{[MP to PDF]}%
\startMPresources
@@ -120,12 +120,12 @@
\pdfliteral{\letterpercent\space mps end}%
\stopMPresources
\egroup
- \setbox\scratchbox\hbox\bgroup
+ \setbox\scratchbox\hpack\bgroup
\hskip-\MPllx\onebasepoint
\raise-\MPlly\onebasepoint
\box\scratchbox
\egroup
- \setbox\scratchbox\vbox to \MPheight\bgroup
+ \setbox\scratchbox\vpack to \MPheight\bgroup
\vfill
\hsize\MPwidth
\smashbox\scratchbox
@@ -154,13 +154,13 @@
\or
\scratchdimen\PDFMPformoffset\relax
\ifdim\scratchdimen>\zeropoint % compensate for error
- \setbox#1\vbox spread 2\scratchdimen
- {\forgetall\vss\hbox spread 2\scratchdimen{\hss\box#1\hss}\vss}%
+ \setbox#1\vpack spread 2\scratchdimen
+ {\forgetall\vss\hpack spread 2\scratchdimen{\hss\box#1\hss}\vss}%
\fi
\setMPPDFobject{\currentPDFresources}{#1}%
\ifdim\scratchdimen>\zeropoint % compensate for error
- \vbox to \MPheight
- {\forgetall\vss\hbox to \MPwidth{\hss\getMPPDFobject\hss}\vss}%
+ \vpack to \MPheight
+ {\forgetall\vss\hpack to \MPwidth{\hss\getMPPDFobject\hss}\vss}%
\else
\getMPPDFobject
\fi
@@ -171,8 +171,8 @@
\def\setMPPDFobject#1#2% resources boxnumber
{\ifx\everyPDFxform\undefined\else\the\everyPDFxform\fi
- \immediate\pdfxform resources{#1}#2%
- \edef\getMPPDFobject{\noexpand\pdfrefxform\the\pdflastxform}}
+ \immediate\saveboxresource resources{#1}#2%
+ \edef\getMPPDFobject{\noexpand\useboxresource\the\lastsavedboxresourceindex}}
\let\getMPPDFobject\relax
@@ -669,12 +669,12 @@
\defconvertedcommand\MPtextdata\MPtextdata % no edef
\splitstring\MPtextdata\at::::\to\MPtexttag\and\MPtextnumber
\executeifdefined{handleMPtext\MPtexttag}
- {\setbox\scratchbox\hbox
+ {\setbox\scratchbox\hbox % text
{\font\temp=#1\space at #2\onebasepoint
\let\c\char
\temp
\MPfshowcommand{#3}}%
- \setbox\scratchbox\hbox
+ \setbox\scratchbox\hpack
{\hskip#4\onebasepoint
\raise#5\onebasepoint
\box\scratchbox}%
diff --git a/Master/texmf-dist/tex/context/base/meta-tex.lua b/Master/texmf-dist/tex/context/base/mkiv/meta-tex.lua
index 1008e45c05e..1008e45c05e 100644
--- a/Master/texmf-dist/tex/context/base/meta-tex.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-tex.lua
diff --git a/Master/texmf-dist/tex/context/base/meta-tex.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-tex.mkiv
index 0f5a27ff862..35b5c133b95 100644
--- a/Master/texmf-dist/tex/context/base/meta-tex.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-tex.mkiv
@@ -44,7 +44,7 @@
\def\getTeXtext#1%
{\getvalue{\??graphictextext#1}}
-\setvalue{\??graphictexdepth d}{\setbox\nextbox\hbox{\lower\dp\nextbox\box\nextbox}} % unchecked
+\setvalue{\??graphictexdepth d}{\setbox\nextbox\hpack{\lower\dp\nextbox\box\nextbox}} % unchecked
\letvalue{\??graphictexdepth n}\donothing % unchecked
\setvalue{\??graphictexdepth\s!depth }{\getvalue{\??graphictexdepth d}}
@@ -142,4 +142,12 @@
\unexpanded\def\MPformatted #1#2{\clf_metapostformatted{#1}{#2}}
\unexpanded\def\MPgraphformat#1#2{\clf_metapostgraphformat{#1}{#2}}
+%D Some new fun (but exprimental for a while):
+
+\unexpanded\def\MPLIBoutlinetext#1#2#3% index kind text
+ {\begingroup
+ \setbox\scratchbox\hbox{#3}%
+ \clf_MPLIBconvertoutlinetext\numexpr#1\relax{#2}\scratchbox
+ \endgroup}
+
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/meta-xml.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-xml.mkiv
index bd93bda8c5b..bd93bda8c5b 100644
--- a/Master/texmf-dist/tex/context/base/meta-xml.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-xml.mkiv
diff --git a/Master/texmf-dist/tex/context/base/metatex.lus b/Master/texmf-dist/tex/context/base/mkiv/metatex.lus
index df7bc191425..df7bc191425 100644
--- a/Master/texmf-dist/tex/context/base/metatex.lus
+++ b/Master/texmf-dist/tex/context/base/mkiv/metatex.lus
diff --git a/Master/texmf-dist/tex/context/base/metatex.tex b/Master/texmf-dist/tex/context/base/mkiv/metatex.tex
index b5f54c4eef1..b5f54c4eef1 100644
--- a/Master/texmf-dist/tex/context/base/metatex.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/metatex.tex
diff --git a/Master/texmf-dist/tex/context/base/mlib-ctx.lua b/Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.lua
index b437e1212c7..3fe7118b787 100644
--- a/Master/texmf-dist/tex/context/base/mlib-ctx.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.lua
@@ -341,7 +341,7 @@ function mptex.set(str)
end
function mptex.setfrombuffer(name)
- environments[#environments+1] = buffers.content(name)
+ environments[#environments+1] = buffers.getcontent(name)
end
function mptex.get()
diff --git a/Master/texmf-dist/tex/context/base/mlib-ctx.mkiv b/Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.mkiv
index a7bb612c854..a7bb612c854 100644
--- a/Master/texmf-dist/tex/context/base/mlib-ctx.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.mkiv
diff --git a/Master/texmf-dist/tex/context/base/mlib-int.lua b/Master/texmf-dist/tex/context/base/mkiv/mlib-int.lua
index 6d219fe0490..6d219fe0490 100644
--- a/Master/texmf-dist/tex/context/base/mlib-int.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-int.lua
diff --git a/Master/texmf-dist/tex/context/base/mlib-lua.lua b/Master/texmf-dist/tex/context/base/mkiv/mlib-lua.lua
index 7e05684630d..baf9346c472 100644
--- a/Master/texmf-dist/tex/context/base/mlib-lua.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-lua.lua
@@ -19,12 +19,13 @@ local lpegmatch = lpeg.match
local P, S, Ct = lpeg.P, lpeg.S, lpeg.Ct
-local report_luarun = logs.reporter("metapost","lua")
+local report_luarun = logs.reporter("metapost","lua")
+local report_message = logs.reporter("metapost")
-local trace_luarun = false trackers.register("metapost.lua",function(v) trace_luarun = v end)
-local trace_enabled = true
+local trace_luarun = false trackers.register("metapost.lua",function(v) trace_luarun = v end)
+local trace_enabled = true
-local be_tolerant = true directives.register("metapost.lua.tolerant",function(v) be_tolerant = v end)
+local be_tolerant = true directives.register("metapost.lua.tolerant",function(v) be_tolerant = v end)
mp = mp or { } -- system namespace
MP = MP or { } -- user namespace
@@ -187,8 +188,10 @@ function mp.quoted(fmt,s,...)
fmt = lpegmatch(replacer,fmt)
end
buffer[n] = '"' .. formatters[fmt](s,...) .. '"'
- else
+ elseif fmt then
buffer[n] = '"' .. fmt .. '"'
+ else
+ -- something is wrong
end
end
@@ -293,16 +296,14 @@ function metapost.runscript(code)
if result then
local t = type(result)
if t == "number" then
- t = f_numeric(result)
- elseif t == "string" then
- t = result
- else
- t = tostring(result)
+ result = f_numeric(result)
+ elseif t ~= "string" then
+ result = tostring(result)
end
if trace then
- report_luarun("result: %s",code)
+ report_luarun("result: %s",result)
end
- return t
+ return result
elseif trace then
report_luarun("no result")
end
@@ -381,3 +382,11 @@ function mp.tt_dimensions(n)
mptriplet(0,0,0)
end
end
+
+function mp.report(a,b)
+ if b then
+ report_message("%s : %s",a,b)
+ elseif a then
+ report_message("%s : %s","message",a)
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/mlib-pdf.lua b/Master/texmf-dist/tex/context/base/mkiv/mlib-pdf.lua
index 8de09f42a60..a2d4638a904 100644
--- a/Master/texmf-dist/tex/context/base/mlib-pdf.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-pdf.lua
@@ -428,11 +428,19 @@ function metapost.flush(result,flusher,askedfig)
result[#result+1] = "q"
if objects then
resetplugins(result) -- we should move the colorinitializer here
+ local savedpath = nil
+ local savedhtap = nil
for o=1,#objects do
local object = objects[o]
local objecttype = object.type
- if objecttype == "start_bounds" or objecttype == "stop_bounds" then
- -- skip
+ if objecttype == "text" then
+ result[#result+1] = "q"
+ local ot = object.transform -- 3,4,5,6,1,2
+ result[#result+1] = f_cm(ot[3],ot[4],ot[5],ot[6],ot[1],ot[2]) -- TH: formatters["%F %F m %F %F %F %F 0 0 cm"](unpack(ot))
+ flushfigure(result) -- flush accumulated literals
+ result = { }
+ textfigure(object.font,object.dsize,object.text,object.width,object.height,object.depth)
+ result[#result+1] = "Q"
elseif objecttype == "special" then
if processspecial then
processspecial(object.prescript)
@@ -445,14 +453,8 @@ function metapost.flush(result,flusher,askedfig)
elseif objecttype == "stop_clip" then
result[#result+1] = "Q"
miterlimit, linecap, linejoin, dashed = -1, -1, -1, "" -- was false
- elseif objecttype == "text" then
- result[#result+1] = "q"
- local ot = object.transform -- 3,4,5,6,1,2
- result[#result+1] = f_cm(ot[3],ot[4],ot[5],ot[6],ot[1],ot[2]) -- TH: formatters["%F %F m %F %F %F %F 0 0 cm"](unpack(ot))
- flushfigure(result) -- flush accumulated literals
- result = { }
- textfigure(object.font,object.dsize,object.text,object.width,object.height,object.depth)
- result[#result+1] = "Q"
+ elseif objecttype == "start_bounds" or objecttype == "stop_bounds" then
+ -- skip
else
-- we use an indirect table as we want to overload
-- entries but this is not possible in userdata
@@ -466,95 +468,153 @@ function metapost.flush(result,flusher,askedfig)
})
-- first we analyze
local before, after = processplugins(object)
- local objecttype = object.type -- can have changed
- if before then
- result = pluginactions(before,result,flushfigure)
- end
- local ml = object.miterlimit
- if ml and ml ~= miterlimit then
- miterlimit = ml
- result[#result+1] = f_M(ml)
- end
- local lj = object.linejoin
- if lj and lj ~= linejoin then
- linejoin = lj
- result[#result+1] = f_j(lj)
- end
- local lc = object.linecap
- if lc and lc ~= linecap then
- linecap = lc
- result[#result+1] = f_J(lc)
- end
- local dl = object.dash
- if dl then
- local d = f_d(concat(dl.dashes or {}," "),dl.offset)
- if d ~= dashed then
- dashed = d
- result[#result+1] = d
+ local evenodd, collect, both = false, false, false
+ local postscript = object.postscript
+ if not object.istext then
+ if postscript == "evenodd" then
+ evenodd = true
+ elseif postscript == "collect" then
+ collect = true
+ elseif postscript == "both" then
+ both = true
+ elseif postscript == "eoboth" then
+ evenodd = true
+ both = true
end
- elseif dashed ~= false then -- was just dashed test
- result[#result+1] = "[] 0 d"
- dashed = false
end
- local path = object.path -- newpath
- local transformed, penwidth = false, 1
- local open = path and path[1].left_type and path[#path].right_type -- at this moment only "end_point"
- local pen = object.pen
- if pen then
- if pen.type == 'elliptical' then
- transformed, penwidth = pen_characteristics(original) -- boolean, value
- result[#result+1] = f_w(penwidth) -- todo: only if changed
- if objecttype == 'fill' then
- objecttype = 'both'
+ --
+ if collect then
+ if not savedpath then
+ savedpath = { object.path or false }
+ savedhtap = { object.htap or false }
+ else
+ savedpath[#savedpath+1] = object.path or false
+ savedhtap[#savedhtap+1] = object.htap or false
+ end
+ else
+ local objecttype = object.type -- can have changed
+ if before then
+ result = pluginactions(before,result,flushfigure)
+ end
+ local ml = object.miterlimit
+ if ml and ml ~= miterlimit then
+ miterlimit = ml
+ result[#result+1] = f_M(ml)
+ end
+ local lj = object.linejoin
+ if lj and lj ~= linejoin then
+ linejoin = lj
+ result[#result+1] = f_j(lj)
+ end
+ local lc = object.linecap
+ if lc and lc ~= linecap then
+ linecap = lc
+ result[#result+1] = f_J(lc)
+ end
+ if both then
+ if dashed ~= false then -- was just dashed test
+ result[#result+1] = "[] 0 d"
+ dashed = false
end
- else -- calculated by mplib itself
- objecttype = 'fill'
- end
- end
- if transformed then
- result[#result+1] = "q"
- end
- local evenodd = not object.istext and object.postscript == "evenodd"
- if path then
- if transformed then
- flushconcatpath(path,result,open)
else
- flushnormalpath(path,result,open)
+ local dl = object.dash
+ if dl then
+ local d = f_d(concat(dl.dashes or {}," "),dl.offset)
+ if d ~= dashed then
+ dashed = d
+ result[#result+1] = d
+ end
+ elseif dashed ~= false then -- was just dashed test
+ result[#result+1] = "[] 0 d"
+ dashed = false
+ end
end
- if objecttype == "fill" then
- result[#result+1] = evenodd and "h f*" or "h f" -- f* = eo
- elseif objecttype == "outline" then
- result[#result+1] = open and "S" or "h S"
- elseif objecttype == "both" then
- result[#result+1] = evenodd and "h B*" or "h B"-- B* = eo -- b includes closepath
+ local path = object.path -- newpath
+ local transformed, penwidth = false, 1
+ local open = path and path[1].left_type and path[#path].right_type -- at this moment only "end_point"
+ local pen = object.pen
+ if pen then
+ if pen.type == 'elliptical' then
+ transformed, penwidth = pen_characteristics(original) -- boolean, value
+ result[#result+1] = f_w(penwidth) -- todo: only if changed
+ if objecttype == 'fill' then
+ objecttype = 'both'
+ end
+ else -- calculated by mplib itself
+ objecttype = 'fill'
+ end
end
- end
- if transformed then
- result[#result+1] = "Q"
- end
- local path = object.htap
- if path then
if transformed then
result[#result+1] = "q"
end
- if transformed then
- flushconcatpath(path,result,open)
- else
- flushnormalpath(path,result,open)
- end
- if objecttype == "fill" then
- result[#result+1] = evenodd and "h f*" or "h f" -- f* = eo
- elseif objecttype == "outline" then
- result[#result+1] = open and "S" or "h S"
- elseif objecttype == "both" then
- result[#result+1] = evenodd and "h B*" or "h B"-- B* = eo -- b includes closepath
+ if path then
+ if savedpath then
+ for i=1,#savedpath do
+ local path = savedpath[i]
+ if transformed then
+ flushconcatpath(path,result,open)
+ else
+ flushnormalpath(path,result,open)
+ end
+ end
+ savedpath = nil
+ end
+ if transformed then
+ flushconcatpath(path,result,open)
+ else
+ flushnormalpath(path,result,open)
+ end
+ if objecttype == "fill" then
+ result[#result+1] = evenodd and "h f*" or "h f" -- f* = eo
+ elseif objecttype == "outline" then
+ if both then
+ result[#result+1] = evenodd and "h B*" or "h B" -- f* = eo
+ else
+ result[#result+1] = open and "S" or "h S"
+ end
+ elseif objecttype == "both" then
+ result[#result+1] = evenodd and "h B*" or "h B"-- B* = eo -- b includes closepath
+ end
end
if transformed then
result[#result+1] = "Q"
end
- end
- if after then
- result = pluginactions(after,result,flushfigure)
+ local path = object.htap
+ if path then
+ if transformed then
+ result[#result+1] = "q"
+ end
+ if savedhtap then
+ for i=1,#savedhtap do
+ local path = savedhtap[i]
+ if transformed then
+ flushconcatpath(path,result,open)
+ else
+ flushnormalpath(path,result,open)
+ end
+ end
+ savedhtap = nil
+ evenodd = true
+ end
+ if transformed then
+ flushconcatpath(path,result,open)
+ else
+ flushnormalpath(path,result,open)
+ end
+ if objecttype == "fill" then
+ result[#result+1] = evenodd and "h f*" or "h f" -- f* = eo
+ elseif objecttype == "outline" then
+ result[#result+1] = open and "S" or "h S"
+ elseif objecttype == "both" then
+ result[#result+1] = evenodd and "h B*" or "h B"-- B* = eo -- b includes closepath
+ end
+ if transformed then
+ result[#result+1] = "Q"
+ end
+ end
+ if after then
+ result = pluginactions(after,result,flushfigure)
+ end
end
if object.grouped then
-- can be qQ'd so changes can end up in groups
diff --git a/Master/texmf-dist/tex/context/base/mlib-pdf.mkiv b/Master/texmf-dist/tex/context/base/mkiv/mlib-pdf.mkiv
index 92bf86ea9f1..78dab716df6 100644
--- a/Master/texmf-dist/tex/context/base/mlib-pdf.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-pdf.mkiv
@@ -48,7 +48,7 @@
\global\MPury \zeropoint}
\def\repositionMPboxindeed
- {\setbox\MPbox\hbox\bgroup
+ {\setbox\MPbox\hpack\bgroup
\kern-\MPllx
\raise-\MPlly
\box\MPbox
@@ -67,7 +67,7 @@
\def\finalizeMPbox
{\repositionMPbox
- \setbox\MPbox\vbox to \MPheight\bgroup
+ \setbox\MPbox\vpack to \MPheight\bgroup
\vfill
\hsize\MPwidth
\smashbox\MPbox
@@ -78,7 +78,7 @@
\def\MPtextext#1#2#3#4#5% beware: we use a different method now (see mlib-pps)
{\begingroup
- \setbox\MPbox\hbox{\font\temp=#1\space at #2\onebasepoint \let\c\char \temp #3}%
+ \setbox\MPbox\hbox{\font\temp=#1\space at #2\onebasepoint \let\c\char \temp #3}% text
\MPllx-#4\onebasepoint
\MPlly-#5\onebasepoint
\repositionMPbox
@@ -96,7 +96,7 @@
\naturalhbox attr \imageattribute 1 \bgroup
\dousecolorparameter\s!black\forcecolorhack
\setMPboundingbox{#1}{#2}{#3}{#4}%
- \setbox\MPbox\vbox\bgroup
+ \setbox\MPbox\vpack\bgroup
% \forgetall % already done elsewhere
\noindent} % forces the proper cm in the backend
diff --git a/Master/texmf-dist/tex/context/base/mlib-pps.lua b/Master/texmf-dist/tex/context/base/mkiv/mlib-pps.lua
index ab56699b9f9..c016e0f3615 100644
--- a/Master/texmf-dist/tex/context/base/mlib-pps.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-pps.lua
@@ -170,7 +170,7 @@ local function checkandconvertspot(n_a,f_a,c_a,v_a,n_b,f_b,c_b,v_b)
end
end
-local function checkandconvert(ca,cb)
+local function checkandconvert(ca,cb,model)
local name = f_shade(nofshades)
if not ca or not cb or type(ca) == "string" then
return { 0 }, { 1 }, "DeviceGray", name
@@ -180,7 +180,9 @@ local function checkandconvert(ca,cb)
elseif #ca < #cb then
normalize(cb,ca)
end
- local model = colors.model
+ if not model then
+ model = colors.model
+ end
if model == "all" then
model= (#ca == 4 and "cmyk") or (#ca == 3 and "rgb") or "gray"
end
@@ -193,7 +195,7 @@ local function checkandconvert(ca,cb)
ca = { a, a, a }
cb = { b, b, b }
end
- return ca, cb, "DeviceRGB", name
+ return ca, cb, "DeviceRGB", name, model
elseif model == "cmyk" then
if #ca == 3 then
ca = { rgbtocmyk(ca[1],ca[2],ca[3]) }
@@ -202,7 +204,7 @@ local function checkandconvert(ca,cb)
ca = { 0, 0, 0, ca[1] }
cb = { 0, 0, 0, ca[1] }
end
- return ca, cb, "DeviceCMYK", name
+ return ca, cb, "DeviceCMYK", name, model
else
if #ca == 4 then
ca = { cmyktogray(ca[1],ca[2],ca[3],ca[4]) }
@@ -212,7 +214,7 @@ local function checkandconvert(ca,cb)
cb = { rgbtogray(cb[1],cb[2],cb[3]) }
end
-- backend specific (will be renamed)
- return ca, cb, "DeviceGray", name
+ return ca, cb, "DeviceGray", name, model
end
end
end
@@ -278,6 +280,9 @@ end
local function settext(box,slot)
if top then
+ -- if trace_textexts then
+ -- report_textexts("getting text %s from box %s",slot,box)
+ -- end
top.textexts[slot] = copy_list(texgetbox(box))
texsetbox(box,nil)
-- this can become
@@ -290,9 +295,9 @@ end
local function gettext(box,slot)
if top then
texsetbox(box,copy_list(top.textexts[slot]))
- if trace_textexts then
- report_textexts("putting text %s in box %s",slot,box)
- end
+ -- if trace_textexts then
+ -- report_textexts("putting text %s in box %s",slot,box)
+ -- end
-- top.textexts[slot] = nil -- no, pictures can be placed several times
else
-- weird error
@@ -736,9 +741,9 @@ function metapost.graphic_base_pass(specification) -- name will change (see mlib
context(stopjob)
end
-function metapost.process(...)
- startjob(false)
- processmetapost(...)
+function metapost.process(mpx, data, trialrun, flusher, multipass, isextrapass, askedfig, plugmode) -- overloads
+ startjob(plugmode)
+ processmetapost(mpx, data, trialrun, flusher, multipass, isextrapass, askedfig)
stopjob()
end
@@ -882,7 +887,7 @@ function metapost.analyzeplugins(object) -- each object (first pass)
if top.plugmode then
local prescript = object.prescript -- specifications
if prescript and #prescript > 0 then
- analyzer(object,splitprescript(prescript))
+ analyzer(object,splitprescript(prescript) or {})
return top.multipass
end
end
@@ -895,7 +900,7 @@ function metapost.processplugins(object) -- each object (second pass)
if prescript and #prescript > 0 then
local before = { }
local after = { }
- processor(object,splitprescript(prescript),before,after)
+ processor(object,splitprescript(prescript) or {},before,after)
return #before > 0 and before, #after > 0 and after
else
local c = object.color
@@ -955,7 +960,11 @@ local ctx_MPLIBsetNtext = context.MPLIBsetNtext
local ctx_MPLIBsetCtext = context.MPLIBsetCtext
local ctx_MPLIBsettext = context.MPLIBsettext
-local function tx_analyze(object,prescript) -- todo: hash content and reuse them
+-- we reuse content when possible
+-- we always create at least one instance (for dimensions)
+-- we make sure we don't do that when we use one (else counter issues with e.g. \definelabel)
+
+local function tx_analyze(object,prescript)
local data = top.texdata[metapost.properties.number]
local tx_stage = prescript.tx_stage
if tx_stage == "trial" then
@@ -974,7 +983,17 @@ local function tx_analyze(object,prescript) -- todo: hash content and reuse them
local t = tonumber(prescript.tr_transparency)
local h = fmt(tx_number,a or "-",t or "-",c or "-")
local n = data.texhash[h] -- todo: hashed variant with s (nicer for similar labels)
- if not n then
+ if n then
+ data.texslots[tx_trial] = n
+ if trace_textexts then
+ report_textexts("stage %a, usage %a, number %a, %s %a, hash %a, text %a",tx_stage,tx_trial,tx_number,"old",n,h,s)
+ end
+ elseif prescript.tx_global == "yes" and data.texorder[tx_number] then
+ -- we already have one flush and don't want it redone .. this needs checking
+ if trace_textexts then
+ report_textexts("stage %a, usage %a, number %a, %s %a, hash %a, text %a",tx_stage,tx_trial,tx_number,"ignored",tx_last,h,s)
+ end
+ else
local tx_last = top.texlast + 1
top.texlast = tx_last
-- report_textexts("tex string: %s",s)
@@ -1003,15 +1022,11 @@ local function tx_analyze(object,prescript) -- todo: hash content and reuse them
end
top.multipass = true
data.texhash [h] = tx_last
+ -- data.texhash [tx_number] = tx_last
data.texslots[tx_trial] = tx_last
data.texorder[tx_number] = tx_last
if trace_textexts then
- report_textexts("stage %a, usage %a, number %a, new %a, hash %a, text %a",tx_stage,tx_trial,tx_number,tx_last,h,s)
- end
- else
- data.texslots[tx_trial] = n
- if trace_textexts then
- report_textexts("stage %a, usage %a, number %a, old %a, hash %a, text %a",tx_stage,tx_trial,tx_number,n,h,s)
+ report_textexts("stage %a, usage %a, number %a, %s %a, hash %a, text %a",tx_stage,tx_trial,tx_number,"new",tx_last,h,s)
end
end
elseif tx_stage == "extra" then
@@ -1107,13 +1122,13 @@ local function sh_process(object,prescript,before,after)
local sh_type = prescript.sh_type
if sh_type then
nofshades = nofshades + 1
- local domain = lpegmatch(domainsplitter,prescript.sh_domain or "0 1")
- local centera = lpegmatch(centersplitter,prescript.sh_center_a or "0 0")
- local centerb = lpegmatch(centersplitter,prescript.sh_center_b or "0 0")
- --
- local sh_color_a = prescript.sh_color_a or "1"
- local sh_color_b = prescript.sh_color_b or "1"
- local ca, cb, colorspace, name, separation
+ local domain = lpegmatch(domainsplitter,prescript.sh_domain or "0 1")
+ local centera = lpegmatch(centersplitter,prescript.sh_center_a or "0 0")
+ local centerb = lpegmatch(centersplitter,prescript.sh_center_b or "0 0")
+ local steps = tonumber(prescript.sh_step) or 1
+ local sh_color_a = prescript.sh_color_a_1 or prescript.sh_color_a or "1"
+ local sh_color_b = prescript.sh_color_b_1 or prescript.sh_color_b or "1" -- sh_color_b_<sh_steps>
+ local ca, cb, colorspace, name, model, separation, fractions
if prescript.sh_color == "into" and prescript.sp_name then
-- some spotcolor
local value_a, components_a, fractions_a, name_a
@@ -1149,27 +1164,41 @@ local function sh_process(object,prescript,before,after)
else
local colora = lpegmatch(colorsplitter,sh_color_a)
local colorb = lpegmatch(colorsplitter,sh_color_b)
- ca, cb, colorspace, name = checkandconvert(colora,colorb)
+ ca, cb, colorspace, name, model = checkandconvert(colora,colorb)
+ -- test:
+ if steps > 1 then
+ ca = { ca }
+ cb = { cb }
+ fractions = { tonumber(prescript[formatters["sh_fraction_%i"](1)]) or 0 }
+ for i=2,steps do
+ local colora = lpegmatch(colorsplitter,prescript[formatters["sh_color_a_%i"](i)])
+ local colorb = lpegmatch(colorsplitter,prescript[formatters["sh_color_b_%i"](i)])
+ ca[i], cb[i] = checkandconvert(colora,colorb,model)
+ fractions[i] = tonumber(prescript[formatters["sh_fraction_%i"](i)]) or (i/steps)
+ end
+ end
end
if not ca or not cb then
ca, cb, colorspace, name = checkandconvert()
+ steps = 1
end
if sh_type == "linear" then
local coordinates = { centera[1], centera[2], centerb[1], centerb[2] }
- lpdf.linearshade(name,domain,ca,cb,1,colorspace,coordinates,separation) -- backend specific (will be renamed)
+ lpdf.linearshade(name,domain,ca,cb,1,colorspace,coordinates,separation,steps>1 and steps,fractions) -- backend specific (will be renamed)
elseif sh_type == "circular" then
local factor = tonumber(prescript.sh_factor) or 1
local radiusa = factor * tonumber(prescript.sh_radius_a)
local radiusb = factor * tonumber(prescript.sh_radius_b)
local coordinates = { centera[1], centera[2], radiusa, centerb[1], centerb[2], radiusb }
- lpdf.circularshade(name,domain,ca,cb,1,colorspace,coordinates,separation) -- backend specific (will be renamed)
+ lpdf.circularshade(name,domain,ca,cb,1,colorspace,coordinates,separation,steps>1 and steps,fractions) -- backend specific (will be renamed)
else
-- fatal error
end
- before[#before+1], after[#after+1] = "q /Pattern cs", formatters["W n /%s sh Q"](name)
+ before[#before+1] = "q /Pattern cs"
+ after [#after+1] = formatters["W n /%s sh Q"](name)
-- false, not nil, else mt triggered
object.colored = false -- hm, not object.color ?
- object.type = false
+ object.type = false
object.grouped = true
end
end
@@ -1386,13 +1415,56 @@ local function gr_process(object,prescript,before,after)
end
end
+-- outlines
+
+local outlinetexts = { }
+
+local function ot_reset()
+ outlinetexts = { }
+end
+
+local function ot_analyze(object,prescript)
+ local ot_stage = prescript.ot_stage
+ local ot_index = tonumber(prescript.ot_index)
+ if ot_index and ot_stage == "trial" and not outlinetexts[ot_index] then
+ local ot_kind = prescript.ot_kind or ""
+ top.intermediate = true
+ top.multipass = true
+ context.MPLIBoutlinetext(ot_index,ot_kind,object.postscript)
+ end
+end
+
+local function ot_process(object,prescript,before,after)
+end
+
+implement {
+ name = "MPLIBconvertoutlinetext",
+ arguments = { "integer", "string", "integer" },
+ actions = function(index,kind,box)
+ local boxtomp = fonts.metapost.boxtomp
+ if boxtomp then
+ outlinetexts[index] = boxtomp(box,kind)
+ else
+ outlinetexts[index] = ""
+ end
+ end
+}
+
+function mp.get_outline_text(index) -- maybe we need a more private namespace
+ mp.print(outlinetexts[index] or "draw origin;")
+end
+
+
-- definitions
+appendaction(resetteractions, "system",ot_reset)
appendaction(resetteractions, "system",cl_reset)
appendaction(resetteractions, "system",tx_reset)
+appendaction(processoractions,"system",ot_process)
appendaction(processoractions,"system",gr_process)
+appendaction(analyzeractions, "system",ot_analyze)
appendaction(analyzeractions, "system",tx_analyze)
appendaction(analyzeractions, "system",gt_analyze)
@@ -1406,6 +1478,18 @@ appendaction(processoractions,"system",tr_process) -- last, as color can be rese
appendaction(processoractions,"system",la_process)
+-- function metapost.installplugin(reset,analyze,process)
+-- if reset then
+-- appendaction(resetteractions,"system",reset)
+-- end
+-- if analyze then
+-- appendaction(analyzeractions,"system",analyze)
+-- end
+-- if process then
+-- appendaction(processoractions,"system",process)
+-- end
+-- end
+
-- we're nice and set them already
resetter = resetteractions .runner
diff --git a/Master/texmf-dist/tex/context/base/mlib-pps.mkiv b/Master/texmf-dist/tex/context/base/mkiv/mlib-pps.mkiv
index 07ac84b8d32..cdccfc379a9 100644
--- a/Master/texmf-dist/tex/context/base/mlib-pps.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-pps.mkiv
@@ -42,14 +42,14 @@
\unexpanded\def\MPLIBsetNtext#1% #2% box text
{\MPLIBflushenvironment
- \dowithnextbox{\clf_mpsettext\nextbox #1}\hbox\bgroup
+ \dowithnextbox{\clf_mpsettext\nextbox #1}\hbox\bgroup % text
\meta_set_current_color
\let\MPLIBflushenvironment\doMPLIBflushenvironment
\let\next} % gobble open brace
\unexpanded\def\MPLIBsetCtext#1#2% #3% box colorspec text
{\MPLIBflushenvironment
- \dowithnextbox{\clf_mpsettext\nextbox #1}\hbox\bgroup
+ \dowithnextbox{\clf_mpsettext\nextbox #1}\hbox\bgroup % text
\directcolored[#2]%
\meta_set_current_color % so, textcolor wins !
\let\MPLIBflushenvironment\doMPLIBflushenvironment
@@ -59,22 +59,22 @@
\unexpanded\def\MPLIBgettextscaled#1#2#3% why a copy .. can be used more often
{\clf_mpgettext\MPtextbox #1%
- \vbox to \zeropoint{\vss\hbox to \zeropoint{\scale[\c!sx=#2,\c!sy=#3]{\raise\dp\MPtextbox\box\MPtextbox}\forcecolorhack\hss}}}
+ \vpack to \zeropoint{\vss\hpack to \zeropoint{\scale[\c!sx=#2,\c!sy=#3]{\raise\dp\MPtextbox\box\MPtextbox}\forcecolorhack\hss}}}
\unexpanded\def\MPLIBfigure#1#2%
- {\setbox\scratchbox\hbox{\externalfigure[#1][\c!mask=#2]}%
+ {\setbox\scratchbox\hpack{\externalfigure[#1][\c!mask=#2]}%
\clf_mpsetsxsy\wd\scratchbox\ht\scratchbox\zeropoint
- \vbox to \zeropoint{\vss\hbox to \zeropoint{\scale[\c!sx=\sx,\c!sy=\sy]{\box\scratchbox}\hss}}}
+ \vpack to \zeropoint{\vss\hpack to \zeropoint{\scale[\c!sx=\sx,\c!sy=\sy]{\box\scratchbox}\hss}}}
% horrible (we could inline scale and matrix code):
\unexpanded\def\MPLIBgettextscaledcm#1#2#3#4#5#6#7#8#9% 2-7: sx,rx,ry,sy,tx,ty
{\clf_mpgettext\MPtextbox #1%
- \setbox\MPbox\hbox\bgroup
+ \setbox\MPbox\hpack\bgroup
\dotransformnextbox{#2}{#3}{#4}{#5}{#6}{#7}% does push pop ... will be changed to proper lua call (avoid small numbers)
- \vbox to \zeropoint\bgroup
+ \vpack to \zeropoint\bgroup
\vss
- \hbox to \zeropoint \bgroup
+ \hpack to \zeropoint \bgroup
% \scale[\c!sx=#8,\c!sy=#9]{\raise\dp\MPtextbox\box\MPtextbox}%
% \scale[\c!sx=#8,\c!sy=#9,\c!depth=\v!no]{\box\MPtextbox}%
\fastsxsy{#8}{#9}{\raise\dp\MPtextbox\box\MPtextbox}%
@@ -130,16 +130,16 @@
\def\doMPLIBstopgroup#1#2#3#4#5#6% some day this might happen elsewhere
{\egroup
- \setbox\scratchbox\hbox{\kern\onebasepoint\box\scratchbox}% weird correction
+ \setbox\scratchbox\hpack{\kern\onebasepoint\box\scratchbox}% weird correction
\wd\scratchbox \dimexpr#5\onebasepoint-#3\onebasepoint+2\onebasepoint\relax
\ht\scratchbox #6\onebasepoint
\dp\scratchbox-#4\onebasepoint
- \pdfxform
+ \saveboxresource
attr {/Group << /S /Transparency /I \ifnum#1=1 true \else false \fi /K \ifnum#1=1 true \else false \fi >>}
resources {\pdfbackendcurrentresources}
\scratchbox
- \setbox\scratchbox\hbox\bgroup\kern-\onebasepoint\pdfrefxform\pdflastxform\egroup
- \setbox\scratchbox\hbox\bgroup\kern-\onebasepoint\pdfrefxform\pdflastxform\egroup
+ % \setbox\scratchbox\hbox\bgroup\kern-\onebasepoint\useboxresource\lastsavedboxresourceindex\egroup % why twice?
+ \setbox\scratchbox\hpack\bgroup\kern-\onebasepoint\useboxresource\lastsavedboxresourceindex\egroup
\wd\scratchbox\zeropoint
\ht\scratchbox\zeropoint
\dp\scratchbox\zeropoint
@@ -148,7 +148,7 @@
\unexpanded\def\MPLIBstartgroup#1#2#3#4#5#6% isolated 0/1, knockout 0/1 llx lly urx ury
{\begingroup
- \setbox\scratchbox\hbox\bgroup
+ \setbox\scratchbox\hpack\bgroup
\unexpanded\def\MPLIBstopgroup{\doMPLIBstopgroup{#1}{#2}{#3}{#4}{#5}{#6}}}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mlib-run.lua b/Master/texmf-dist/tex/context/base/mkiv/mlib-run.lua
index 121c32ae95a..8109cff2d21 100644
--- a/Master/texmf-dist/tex/context/base/mlib-run.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-run.lua
@@ -128,7 +128,9 @@ do
local function i_finder(name,mode,ftype) -- fake message for mpost.map and metafun.mpvi
local specification = url.hashed(name)
local finder = finders[specification.scheme] or finders.file
- return finder(specification,name,mode,validftype(ftype))
+ local found = finder(specification,name,mode,validftype(ftype))
+ -- print(found)
+ return found
end
local function o_finder(name,mode,ftype)
@@ -523,7 +525,7 @@ end
-- goodie
-function metapost.quickanddirty(mpxformat,data)
+function metapost.quickanddirty(mpxformat,data,plugmode)
if not data then
mpxformat = "metafun"
data = mpxformat
@@ -543,7 +545,7 @@ function metapost.quickanddirty(mpxformat,data)
end
}
local data = formatters["; beginfig(1) ;\n %s\n ; endfig ;"](data)
- metapost.process(mpxformat, { data }, false, flusher, false, false, "all")
+ metapost.process(mpxformat, { data }, false, flusher, false, false, "all", plugmode)
if code then
return {
bbox = bbox or { 0, 0, 0, 0 },
@@ -571,3 +573,45 @@ function metapost.getstatistics(memonly)
return t
end
end
+
+do
+
+ local result = { }
+ local width = 0
+ local height = 0
+ local depth = 0
+ local mpx = false
+
+ local flusher = {
+ startfigure = function(n,llx,lly,urx,ury)
+ result = { }
+ width = urx - llx
+ height = ury
+ depth = -lly
+ end,
+ flushfigure = function(t)
+ for i=1,#t do
+ result[#result+1] = t[i]
+ end
+ end,
+ stopfigure = function()
+ end
+ }
+
+ function metapost.simple(format,code) -- even less than metapost.quickcanddirty
+ local mpx = metapost.format(format or "metafun","metafun")
+ -- metapost.setoutercolor(2)
+ metapost.process(mpx,
+ { "beginfig(1);", code, "endfig;" },
+ false, flusher, false, false, 1, true -- last true is plugmode !
+ )
+ if result then
+ local stream = concat(result," ")
+ result = nil -- cleanup
+ return stream, width, height, depth
+ else
+ return "", 0, 0, 0
+ end
+ end
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mtx-context-arrange.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-arrange.tex
index fb53406d800..a3e6e9db3d1 100644
--- a/Master/texmf-dist/tex/context/base/mtx-context-arrange.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-arrange.tex
@@ -31,7 +31,6 @@
%
% end help
-
\input mtx-context-common.tex
\doifdocumentargument {paperoffset} {
diff --git a/Master/texmf-dist/tex/context/base/mtx-context-combine.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-combine.tex
index 05e31d80087..05e31d80087 100644
--- a/Master/texmf-dist/tex/context/base/mtx-context-combine.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-combine.tex
diff --git a/Master/texmf-dist/tex/context/base/mtx-context-common.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-common.tex
index 2db0a5be2ae..2db0a5be2ae 100644
--- a/Master/texmf-dist/tex/context/base/mtx-context-common.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-common.tex
diff --git a/Master/texmf-dist/tex/context/base/mtx-context-copy.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-copy.tex
index b798b3f8d16..b798b3f8d16 100644
--- a/Master/texmf-dist/tex/context/base/mtx-context-copy.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-copy.tex
diff --git a/Master/texmf-dist/tex/context/base/mtx-context-ideas.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-ideas.tex
index d10eefc7684..d10eefc7684 100644
--- a/Master/texmf-dist/tex/context/base/mtx-context-ideas.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-ideas.tex
diff --git a/Master/texmf-dist/tex/context/base/mtx-context-listing.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-listing.tex
index 583aa2b8f95..2deffd7958e 100644
--- a/Master/texmf-dist/tex/context/base/mtx-context-listing.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-listing.tex
@@ -24,7 +24,8 @@
% --scite : pretty print comform suffix using scite lexer
% --bodyfont=list : additional bodyfont settings
% --paperformat=spec : paper*print or paperxprint
-% --compact : small margins, small font
+% --compact : small margins, 8pt font
+% --verycompact : small margins, 7pt font
%
% end help
@@ -36,6 +37,12 @@
\setdocumentargument{bodyfont} {8pt}
}
+\doifdocumentargument {verycompact} {
+ \setdocumentargument{topspace} {5mm}
+ \setdocumentargument{backspace}{5mm}
+ \setdocumentargument{bodyfont} {7pt}
+}
+
\setupbodyfont
[dejavu,11pt,tt,\getdocumentargument{bodyfont}] % dejavu is more complete
diff --git a/Master/texmf-dist/tex/context/base/mtx-context-markdown.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-markdown.tex
index 1bd57945f21..1bd57945f21 100644
--- a/Master/texmf-dist/tex/context/base/mtx-context-markdown.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-markdown.tex
diff --git a/Master/texmf-dist/tex/context/base/mtx-context-precache.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-precache.tex
index 9cbb46cf2c5..9cbb46cf2c5 100644
--- a/Master/texmf-dist/tex/context/base/mtx-context-precache.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-precache.tex
diff --git a/Master/texmf-dist/tex/context/base/mtx-context-select.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-select.tex
index 2f63f595513..2f63f595513 100644
--- a/Master/texmf-dist/tex/context/base/mtx-context-select.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-select.tex
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-setups.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-setups.tex
new file mode 100644
index 00000000000..be99211ba1b
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-setups.tex
@@ -0,0 +1,78 @@
+%D \module
+%D [ file=mtx-context-setups,
+%D version=2016.04.05,
+%D title=\CONTEXT\ Command Overvews,
+%D subtitle=Combine Files,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% begin help
+%
+% usage: context --extra=setups [options] [categories]
+%
+% --interface : user interface (en, nl, etc)
+% --overview [--save] : use collection of files
+% --list : show know collections
+%
+% end help
+
+\input mtx-context-common.tex
+
+\starttext
+
+\startluacode
+ local report_setups = logs.reporter("setups")
+
+ context.starttext()
+
+ if document.arguments.list then
+ local okay = resolvers.findfile("context.mkiv") or "" -- will become an i file
+ if okay ~= "" then
+ okay = file.collapsepath(okay,true)
+ okay = string.gsub(okay,"/base/","/interface/")
+ okay = string.gsub(okay,"/sources/","/interface/")
+ local path = file.pathpart(okay)
+ local pattern = file.join(path,"i-*.xml")
+ local files = dir.glob(pattern)
+ local valid = { }
+ table.sort(files)
+ for i=1,#files do
+ local name = file.nameonly(files[i])
+ local base = string.match(name,"^i%-([a-z]+)$")
+ if base then
+ valid[#valid+1] = base
+ end
+ end
+ if #valid > 0 then
+ report_setups("% t",valid)
+ end
+ context.bold("available setup groups: ")
+ context("%, t.",valid)
+ end
+ elseif document.arguments.overview then
+ if document.arguments.save then
+ context.enablemode { "setups:save" }
+ end
+ context.input("x-setups-overview.mkiv")
+ elseif #document.files > 0 then
+ context.usemodule { "x-setups-basics" }
+ for i=1,#document.files do
+ local filename = "i-" .. document.files[i]
+ report_setups("processing %a",filename)
+ context.loadsetups { filename }
+ end
+ context.input("x-setups-proofing.mkiv")
+ else
+ context("no setups")
+ end
+
+ context.stoptext()
+\stopluacode
+
+\stoptext
+
diff --git a/Master/texmf-dist/tex/context/base/mtx-context-sql.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-sql.tex
index 16613c2453a..16613c2453a 100644
--- a/Master/texmf-dist/tex/context/base/mtx-context-sql.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-sql.tex
diff --git a/Master/texmf-dist/tex/context/base/mtx-context-timing.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-timing.tex
index c545c768f97..c545c768f97 100644
--- a/Master/texmf-dist/tex/context/base/mtx-context-timing.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-timing.tex
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-trim.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-trim.tex
new file mode 100644
index 00000000000..46d0c31886b
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-trim.tex
@@ -0,0 +1,72 @@
+%D \module
+%D [ file=mtx-context-trim,
+%D version=2016.03.04,
+%D title=\CONTEXT\ Extra Trickry,
+%D subtitle=Trimming Files,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is a very old module based feature that has been moved to \MKIV.
+
+% begin help
+%
+% usage: context --extra=trim [options] filename
+%
+% --paperwidth : target paperwidth
+% --paperheight : target paperheight
+% --file : processed file
+% --x : page x offset
+% --y : page y offset
+% --hoffset : horizontal clip offset
+% --voffset : vertical clip offset
+% --width : clip width
+% --height : clip height
+%
+% example: context --extra=trim --file=trimtest --hoffset=3.50cm --voffset=3.50cm --width=15cm --height=21cm
+%
+% end help
+
+\input mtx-context-common.tex
+
+\setdocumentargumentdefault {paperwidth} {21cm}
+\setdocumentargumentdefault {paperheight} {29.7cm}
+\setdocumentargumentdefault {file} {\getdocumentfilename{1}}
+\setdocumentargumentdefault {hoffset} {0cm}
+\setdocumentargumentdefault {voffset} {0cm}
+\setdocumentargumentdefault {width} {17cm}
+\setdocumentargumentdefault {height} {24cm}
+\setdocumentargumentdefault {x} {0cm}
+\setdocumentargumentdefault {y} {0cm}
+
+\doifnothing{\getdocumentargument{file}} {\starttext missing filename \stoptext}
+\doif {\getdocumentargument{file}}{\inputfilename.tex}{\starttext missing filename \stoptext}
+
+\definepapersize
+ [fuzzy]
+ [width=\getdocumentargument{paperwidth},
+ height=\getdocumentargument{paperheight}]
+
+\setuppapersize
+ [fuzzy]
+ [fuzzy]
+
+\setuplayout
+ [page]
+
+\starttext
+
+ \trimpages
+ [file=\getdocumentargument{file},
+ hoffset=\getdocumentargument{hoffset},
+ voffset=\getdocumentargument{voffset},
+ width=\getdocumentargument{width},
+ height=\getdocumentargument{height},
+ x=\getdocumentargument{x},
+ y=\getdocumentargument{y}]
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/mtx-context-xml.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-xml.tex
index eeaca321340..eeaca321340 100644
--- a/Master/texmf-dist/tex/context/base/mtx-context-xml.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-xml.tex
diff --git a/Master/texmf-dist/tex/context/base/mult-aux.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-aux.lua
index 353b5e69c3a..353b5e69c3a 100644
--- a/Master/texmf-dist/tex/context/base/mult-aux.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-aux.lua
diff --git a/Master/texmf-dist/tex/context/base/mult-aux.mkiv b/Master/texmf-dist/tex/context/base/mkiv/mult-aux.mkiv
index b69d7f37068..d44c0242ee4 100644
--- a/Master/texmf-dist/tex/context/base/mult-aux.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-aux.mkiv
@@ -29,6 +29,8 @@
\unprotect
+\edef\??empty{\Uchar25} \letvalue{\Uchar25}\empty % cancel: dec:24 hex:18
+
%D \starttyping
%D \unprotect
%D \def\????aa{@@@@aa}
@@ -215,13 +217,15 @@
%\def#3##1{\csname#4{#1#2}{##1}\endcsname}%
\def#3##1{\csname\ifcsname#1#2:##1\endcsname#1#2:##1\else\expandafter#5\csname#1#2:\s!parent\endcsname{##1}\fi\endcsname}%
\def#4##1##2{\ifcsname##1:##2\endcsname##1:##2\else\expandafter#5\csname##1:\s!parent\endcsname{##2}\fi}%
- \def#5##1##2{\ifx##1\relax\s!empty\else#4{##1}{##2}\fi}% is {} needed around ##1 ?
+ %\def#5##1##2{\ifx##1\relax\s!empty\else#4{##1}{##2}\fi}% is {} needed around ##1 ?
+ \def#5##1##2{\ifx##1\relax\??empty\else#4{##1}{##2}\fi}% is {} needed around ##1 ?
\def#6##1##2{\csname\ifcsname#1##1:##2\endcsname#1##1:##2\else\expandafter#5\csname#1##1:\s!parent\endcsname{##2}\fi\endcsname}%
\def#7##1{\detokenize\expandafter\expandafter\expandafter{\csname#1#2:##1\endcsname}}% always root, no backtrack
% \def#7##1{\mult_interfaces_detokenize{\csname#4{#1#2}{##1}\endcsname}}% compact version
% \def#7##1{\mult_interfaces_detokenize{\csname\ifcsname#1#2:##1\endcsname#1#2:##1\else\expandafter#5\csname#1#2:\s!parent\endcsname{##1}\fi\endcsname}}%
- \def#8##1{\csname\ifcsname#1#2:##1\endcsname#1#2:##1\else\s!empty\fi\endcsname}%
- \def#9##1{\csname#1#2:##1\endcsname}}
+%% \def#8##1{\csname\ifcsname#1#2:##1\endcsname#1#2:##1\else\s!empty\fi\endcsname}%
+ \def#8##1{\begincsname#1#2:##1\endcsname}%
+ \def#9##1{\csname#1#2:##1\endcsname}} % can go when we use \begincsname
% pre-expansion can be a bit faster but handly any effect on a normal run so let's go for
% saving some memory
@@ -254,7 +258,9 @@
\unexpanded\def\mult_interfaces_install_root_parameter_handler#1#2#3%
{\def#2##1{\detokenize\expandafter\expandafter\expandafter{\csname#1:##1\endcsname}}% always root
- \def#3##1{\csname\ifcsname#1:##1\endcsname#1:##1\else\s!empty\fi\endcsname}}
+ %\def#3##1{\csname\ifcsname#1:##1\endcsname#1:##1\else\s!empty\fi\endcsname}}
+ %\def#3##1{\csname\ifcsname#1:##1\endcsname#1:##1\else\??empty\fi\endcsname}}
+ \def#3##1{\begincsname#1:##1\endcsname}}
\unexpanded\def\installrootparameterhandler#1#2%
{\normalexpanded
@@ -355,10 +361,13 @@
\expandafter\edef\csname#1#4:\s!parent\endcsname{#2}%
\fi \fi}
-\def\mult_interfaces_chain#1#2{\ifcsname#1#2:\s!chain\endcsname\csname#1#2:\s!chain\endcsname\space\fi}
-\def\getparentchain #1#2{\ifcsname#1#2:\s!chain\endcsname\csname#1#2:\s!chain\endcsname\fi}
-\def\getcurrentparentchain#1#2{\csname#1#2:\s!chain\endcsname} % for the moment test:
-\def\getcurrentparentchain#1#2{\ifcsname#1#2:\s!chain\endcsname\csname#1#2:\s!chain\endcsname\fi}
+%def\mult_interfaces_chain#1#2{\ifcsname#1#2:\s!chain\endcsname\csname#1#2:\s!chain\endcsname\space\fi}
+%def\getparentchain #1#2{\ifcsname#1#2:\s!chain\endcsname\csname#1#2:\s!chain\endcsname\fi}
+%def\getcurrentparentchain#1#2{\ifcsname#1#2:\s!chain\endcsname\csname#1#2:\s!chain\endcsname\fi}
+
+\def\mult_interfaces_chain#1#2{\ifcsname#1#2:\s!chain\endcsname\lastnamedcs\space\fi}
+\def\getparentchain #1#2{\begincsname#1#2:\s!chain\endcsname}
+\def\getcurrentparentchain#1#2{\begincsname#1#2:\s!chain\endcsname}
\unexpanded\def\mult_interfaces_install_define_handler#1#2#3#4#5#6#7#8#9% why is \expanded still needed in clones
{\ifx#4\relax\let#4\empty\fi % see \defineregister
@@ -610,7 +619,8 @@
%D We don't need colons for such simple cases.
\unexpanded\def\mult_interfaces_install_direct_parameter_handler#1#2#3#4#5%
- {\def#3##1{\csname\ifcsname#1##1\endcsname#1##1\else\s!empty\fi\endcsname}%
+%%{\def#3##1{\csname\ifcsname#1##1\endcsname#1##1\else\s!empty\fi\endcsname}%
+ {\def#3##1{\begincsname#1##1\endcsname}%
\def#4##1{\detokenize\expandafter\expandafter\expandafter{\csname#1##1\endcsname}}%
% \def#4##1{\mult_interfaces_detokenize{\csname\ifcsname#1#2:##1\endcsname#1#2:##1\else\expandafter#5\csname#1#2:\s!parent\endcsname{##1}\fi\endcsname}}%
\def#5##1{\csname#1##1\endcsname}}
@@ -703,6 +713,9 @@
\unexpanded\def\relateparameterhandlers#1#2#3#4% {from} {instance} {to} {instance}
{\expandafter\edef\csname\csname#1namespace\endcsname#2:\s!parent\endcsname{\csname#3namespace\endcsname#4}}
+\unexpanded\def\relateparameterhandlersbyns#1#2#3#4% {from} {instance} {to} {instance}
+ {\expandafter\edef\csname#1#2:\s!parent\endcsname{#3#4}}
+
%D Here is another experiment:
\unexpanded\def\installactionhandler#1%
@@ -802,7 +815,8 @@
\letvalue\??dummy\empty
- \def\dummyparameter #1{\csname\??dummy\ifcsname\??dummy#1\endcsname#1\fi\endcsname}
+%% \def\dummyparameter #1{\csname\??dummy\ifcsname\??dummy#1\endcsname#1\fi\endcsname}
+ \def\dummyparameter #1{\begincsname\??dummy#1\endcsname}
\def\directdummyparameter#1{\csname\??dummy#1\endcsname}
\unexpanded\def\setdummyparameter #1{\expandafter\def\csname\??dummy#1\endcsname}
\unexpanded\def\letdummyparameter #1{\expandafter\let\csname\??dummy#1\endcsname}
@@ -883,10 +897,17 @@
\unexpanded\def\showparentchain#1#2%
{\writestatus\m!system{chain: [ \mult_interfaces_show_parent_chain{#1#2}]}}
+% \def\mult_interfaces_show_parent_chain#1%
+% {#1 => %
+% \ifcsname#1:\s!parent\endcsname
+% \expandafter\mult_interfaces_show_parent_chain\csname#1:\s!parent\endcsname
+% \fi}
+
\def\mult_interfaces_show_parent_chain#1%
{#1 => %
\ifcsname#1:\s!parent\endcsname
- \expandafter\mult_interfaces_show_parent_chain\csname#1:\s!parent\endcsname
+ %\expandafter\mult_interfaces_show_parent_chain\csname#1:\s!parent\endcsname
+ \expandafter\mult_interfaces_show_parent_chain\lastnamedcs
\fi}
%D Another helper (needs to be applied):
@@ -991,7 +1012,7 @@
\unexpanded\def#5{\mult_interfaces_get_parameters{#1#3:}}% no every ! don't change it
\newtoks#4%
\newtoks#7%
- \edef\m_mult_interface_setup{\strippedcsname#2_}%
+ \edef\m_mult_interface_setup{\csstring#2_}%
\unexpanded\edef#2{\syst_helpers_double_empty
\csname\m_mult_interface_setup\s!simple\endcsname
\csname\m_mult_interface_setup\s!single\endcsname
@@ -1081,7 +1102,7 @@
{\ifx#3\relax\let#3\empty\fi
\unexpanded\def#5{\mult_interfaces_get_parameters{#1#3:}}%
\newtoks#4%
- \edef\m_mult_interface_setup{\strippedcsname#2_}%
+ \edef\m_mult_interface_setup{\csstring#2_}%
\unexpanded\edef#2{\syst_helpers_triple_empty
\csname\m_mult_interface_setup\s!simple\endcsname
\csname\m_mult_interface_setup\s!single\endcsname
diff --git a/Master/texmf-dist/tex/context/base/mult-chk.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-chk.lua
index 44a9f739f9e..44a9f739f9e 100644
--- a/Master/texmf-dist/tex/context/base/mult-chk.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-chk.lua
diff --git a/Master/texmf-dist/tex/context/base/mult-chk.mkiv b/Master/texmf-dist/tex/context/base/mkiv/mult-chk.mkiv
index 9208a73e1e5..9208a73e1e5 100644
--- a/Master/texmf-dist/tex/context/base/mult-chk.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-chk.mkiv
diff --git a/Master/texmf-dist/tex/context/base/mult-def.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-def.lua
index c0831de2d95..0d0c30c3054 100644
--- a/Master/texmf-dist/tex/context/base/mult-def.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-def.lua
@@ -7,6 +7,8 @@ if not modules then modules = { } end modules ['mult-def'] = {
dataonly = true,
}
+-- we can remove some commands, like inleftmargin and so (see typo-mar.mkiv)
+
return {
["commands"]={
["CAPPED"]={
@@ -39,16 +41,6 @@ return {
["pe"]="Characters",
["ro"]="Litere",
},
---~ ["LABELTEXT"]={
---~ ["cs"]="TEXTPOPISKU",
---~ ["de"]="LABELTEXT",
---~ ["en"]="LABELTEXT",
---~ ["fr"]="LABELTEXTE",
---~ ["it"]="TESTOETICHETTA",
---~ ["nl"]="LABELTEKST",
---~ ["pe"]="LABELTEXT",
---~ ["ro"]="TEXTETICHETA",
---~ },
["MONTH"]={
["cs"]="MESIC",
["de"]="MONAT",
@@ -169,8 +161,7 @@ return {
["pe"]="تنظیم‌طرح‌بندی",
["ro"]="adapteazaaspect",
},
- ["adding"]={
- },
+ ["adding"]={},
["arg"]={
["cs"]="arg",
["de"]="arg",
@@ -1275,10 +1266,6 @@ return {
["pe"]="تعریÙ‌مترادÙها",
["ro"]="definestesinonim",
},
- ["placelistofsynonyms"]={
- ["en"]="placelistofsynonyms",
- ["nl"]="plaatslijstmetsynoniemen",
- },
["definetabletemplate"]={
["cs"]="definujsablonutabulky",
["de"]="definieretabellenvorlage",
@@ -1309,6 +1296,10 @@ return {
["pe"]="تعریÙ‌متن",
["ro"]="definestetext",
},
+ ["definetextbackground"]={
+ ["en"]="definetextbackground",
+ ["nl"]="definieertekstachtergrond",
+ },
["definetextposition"]={
["cs"]="definetextposition",
["de"]="definetextposition",
@@ -2909,16 +2900,6 @@ return {
["pe"]="نقطه‌ها",
["ro"]="puncte",
},
- ["placerawlist"]={
- ["cs"]="placerawlist",
- ["de"]="placerawlist",
- ["en"]="placerawlist",
- ["fr"]="placerawlist",
- ["it"]="placerawlist",
- ["nl"]="plaatsruwelijst",
- ["pe"]="درج‌لیست‌خام",
- ["ro"]="placerawlist",
- },
["placebookmarks"]={
["cs"]="umistizalozky",
["de"]="platzierebookmarks",
@@ -3009,6 +2990,10 @@ return {
["pe"]="درج‌لیست",
["ro"]="punelista",
},
+ ["placelistofsynonyms"]={
+ ["en"]="placelistofsynonyms",
+ ["nl"]="plaatslijstmetsynoniemen",
+ },
["placelocalfootnotes"]={
["cs"]="umistilokalnipoznamkypodcarou",
["de"]="platzierelokalefussnoten",
@@ -3059,7 +3044,17 @@ return {
["pe"]="درج‌شماره‌صÙحه",
["ro"]="punenumarpagina",
},
- ["placereferencelist"]={ -- not in mkiv
+ ["placerawlist"]={
+ ["cs"]="placerawlist",
+ ["de"]="placerawlist",
+ ["en"]="placerawlist",
+ ["fr"]="placerawlist",
+ ["it"]="placerawlist",
+ ["nl"]="plaatsruwelijst",
+ ["pe"]="درج‌لیست‌خام",
+ ["ro"]="placerawlist",
+ },
+ ["placereferencelist"]={
["cs"]="placereferencelist",
["de"]="placereferencelist",
["en"]="placereferencelist",
@@ -4683,6 +4678,10 @@ return {
["pe"]="بارگذاری‌متن",
["ro"]="seteazatext",
},
+ ["setuptextbackground"]={
+ ["en"]="setuptextbackground",
+ ["nl"]="steltekstachtergrondin",
+ },
["setuptextposition"]={
["cs"]="setuptextposition",
["de"]="setuptextposition",
@@ -5033,30 +5032,6 @@ return {
["pe"]="شروع‌تنظیم",
["ro"]="startaliniere",
},
- ["starttextbackground"]={
- ["en"]="starttextbackground",
- ["nl"]="starttekstachtergrond",
- },
- ["stoptextbackground"]={
- ["en"]="stoptextbackground",
- ["nl"]="stoptekstachtergrond",
- },
- ["setuptextbackground"]={
- ["en"]="setuptextbackground",
- ["nl"]="steltekstachtergrondin",
- },
- ["definetextbackground"]={
- ["en"]="definetextbackground",
- ["nl"]="definieertekstachtergrond",
- },
- ["startframed"]={
- ["en"]="startframed",
- ["nl"]="startomlijnd",
- },
- ["stopframed"]={
- ["en"]="stopframed",
- ["nl"]="stopomlijnd",
- },
["startbackground"]={
["cs"]="startpozadi",
["de"]="starthintergrund",
@@ -5167,6 +5142,10 @@ return {
["pe"]="شروع‌شکل",
["ro"]="startfigura",
},
+ ["startframed"]={
+ ["en"]="startframed",
+ ["nl"]="startomlijnd",
+ },
["startglobal"]={
["cs"]="startglobalni",
["de"]="startglobal",
@@ -5427,6 +5406,10 @@ return {
["pe"]="شروع‌متن",
["ro"]="starttext",
},
+ ["starttextbackground"]={
+ ["en"]="starttextbackground",
+ ["nl"]="starttekstachtergrond",
+ },
["starttextrule"]={
["cs"]="starttextovalinka",
["de"]="starttextlinie",
@@ -5567,6 +5550,10 @@ return {
["pe"]="پایان‌محیط",
["ro"]="stopmediu",
},
+ ["stopframed"]={
+ ["en"]="stopframed",
+ ["nl"]="stopomlijnd",
+ },
["stopglobal"]={
["cs"]="stopglobalni",
["de"]="stopglobal",
@@ -5817,6 +5804,10 @@ return {
["pe"]="پایان‌متن",
["ro"]="stoptext",
},
+ ["stoptextbackground"]={
+ ["en"]="stoptextbackground",
+ ["nl"]="stoptekstachtergrond",
+ },
["stoptextrule"]={
["cs"]="stoptextovalinka",
["de"]="stoptextlinie",
@@ -5907,10 +5898,6 @@ return {
["pe"]="نم",
["ro"]="sim",
},
- ["symoffset"]={
- ["en"]="symoffset",
- ["nl"]="symoffset",
- },
["symbol"]={
["cs"]="symbol",
["de"]="symbol",
@@ -5921,6 +5908,10 @@ return {
["pe"]="نماد",
["ro"]="simbol",
},
+ ["symoffset"]={
+ ["en"]="symoffset",
+ ["nl"]="symoffset",
+ },
["synchronizationbar"]={
["cs"]="synchronizacnilista",
["de"]="synchronisationsbalken",
@@ -6472,241 +6463,9 @@ return {
},
},
["constants"]={
- ["setups"]={
- ["comment"]="no translations",
- ["en"]="setups",
- },
- -- select/simplefonts
- ["regularfont"] ={ ["en"]="regularfont" },
- ["boldfont"] ={ ["en"]="boldfont" },
- ["italicfont"] ={ ["en"]="italicfont" },
- ["slantedfont"] ={ ["en"]="slantedfont" },
- ["bolditalicfont"] ={ ["en"]="bolditalicfont" },
- ["boldslantedfont"] ={ ["en"]="boldslantedfont" },
- ["smallcapsfont"] ={ ["en"]="smallcapsfont" },
- ["features"] ={ ["en"]="features" },
- ["regularfeatures"] ={ ["en"]="regularfeatures" },
- ["boldfeatures"] ={ ["en"]="boldfeatures" },
- ["italicfeatures"] ={ ["en"]="italicfeatures" },
- ["slantedfeatures"] ={ ["en"]="slantedfeatures" },
- ["bolditalicfeatures"] ={ ["en"]="bolditalicfeatures" },
- ["boldslantedfeatures"]={ ["en"]="boldslantedfeatures" },
- ["smallcapsfeatures"] ={ ["en"]="smallcapsfeatures" },
- ["opticalsize"] ={ ["en"]="opticalsize" },
- ["goodies"] ={ ["en"]="goodies" },
- ["check"] ={ ["en"]="check" },
- --
- ["separatorcolor"]={
- ["en"]="separatorcolor",
- ["nl"]="scheiderkleur",
- },
- ["separatorstyle"]={
- ["en"]="separatorstyle",
- ["nl"]="scheiderletter",
- },
- ["less"]={
- ["en"]="less",
- ["nl"]="minder",
- },
- ["more"]={
- ["en"]="more",
- ["nl"]="meer",
- },
- ["solution"]={
- ["en"]="solution",
- ["nl"]="oplossing",
- },
- ["anchor"]={
- ["en"]="anchor",
- ["nl"]="anker",
- },
- ["buffer"]={
- ["en"]="buffer",
- },
- ["dash"]={
- ["en"]="dash",
- ["nl"]="streep",
- },
- ["export"] = {
- ["en"]="export",
- },
- ["cssfile"] = {
- ["en"]="cssfile",
- },
- ["xhtml"] = {
- ["en"]="xhtml",
- },
- ["entities"]={
- ["en"]="entities",
- ["nl"]="entities",
- },
- ["labeloffset"]={
- ["en"]="labeloffset",
- },
- ["exitoffset"]={
- ["en"]="exitoffset",
- },
- ["commentoffset"]={
- ["en"]="commentoffset",
- },
- ["hcompact"]={
- ["en"]="hcompact",
- ["nl"]="hcomprimeer",
- },
- ["vcompact"]={
- ["en"]="vcompact",
- ["nl"]="vcomprimeer",
- },
- ["keys"]={
- ["en"]="keys",
- ["nl"]="sleutels", -- brrr
- },
- ["entries"]={
- ["en"]="entries",
- ["nl"]="ingangen",
- },
- ["strip"]={
- ["en"]="strip",
- },
- ["order"]={
- ["en"]="order",
- ["nl"]="volgorde",
- },
- ["compact"]={
- ["en"]="compact",
- ["nl"]="compact",
- },
- ["headalign"]={
- ["en"]="headalign",
- ["nl"]="kopuitlijnen",
- },
- ["numberalign"]={
- ["en"]="numberalign",
- ["nl"]="nummeruitlijnen",
- },
- ["alignsymbol"]={
- ["en"]="alignsymbol",
- },
- ["export"]={
- ["en"]="export",
- ["nl"]="exporteer",
- },
- ["database"]={
- ["en"]="database",
- },
- ["artauthor"]={
- ["en"]="artauthor",
- },
- ["editor"]={
- ["en"]="editor",
- },
- ["authoretallimit"]={
- ["en"]="authoretallimit",
- },
- ["artauthoretallimit"]={
- ["en"]="artauthoretallimit",
- },
- ["editoretallimit"]={
- ["en"]="editoretallimit",
- },
- ["authoretaldisplay"]={
- ["en"]="authoretaldisplay",
- },
- ["artauthoretaldisplay"]={
- ["en"]="artauthoretaldisplay",
- },
- ["editoretaldisplay"]={
- ["en"]="editoretaldisplay",
- },
- ["authoretaltext"]={
- ["en"]="authoretaltext",
- },
- ["artauthoretaltext"]={
- ["en"]="artauthoretaltext",
- },
- ["editoretaltext"]={
- ["en"]="editoretaltext",
- },
- ["otherstext"]={
- ["en"]="otherstext",
- },
- ["andtext"]={
- ["en"]="andtext",
- },
- ["totalnumber"]={
- ["en"]="totalnumber",
- },
- ["firstnamesep"]={
- ["en"]="firstnamesep",
- },
- ["surnamefirstnamesep"]={
- ["en"]="surnamefirstnamesep",
- },
- ["vonsep"]={
- ["en"]="vonsep",
- },
- ["juniorsep"]={
- ["en"]="juniorsep",
- },
- ["surnamesep"]={
- ["en"]="surnamesep",
- },
- ["initialsep"]={
- ["en"]="initialsep",
- },
- ["surnameinitialsep"]={
- ["en"]="surnameinitialsep",
- },
- ["lastnamesep"]={
- ["en"]="lastnamesep",
- },
- ["finalnamesep"]={
- ["en"]="finalnamesep",
- },
- ["namesep"]={
- ["en"]="namesep",
- },
- ["pubsep"]={
- ["en"]="pubsep",
- },
- ["lastpubsep"]={
- ["en"]="lastpubsep",
- },
- ["finalpubsep"]={
- ["en"]="finalpubsep",
- },
- ["refcommand"]={
- ["en"]="refcommand",
- },
- ["samplesize"]={
- ["en"]="samplesize",
- },
- ["maybeyear"]={
- ["en"]="maybeyear",
- },
---["group"]={
--- ["en"]="group",
--- ["nl"]="groep",
---},
- ["values"]={
- ["en"]="values",
- ["nl"]="waarden",
- },
- ["layout"]={
- ["en"]="layout",
- ["nl"]="layout",
- },
- ["topcommand"]={
- ["en"]="topcommand",
- ["nl"]="bovencommando",
- },
- ["middlecommand"]={
- ["en"]="middlecommand",
- ["nl"]="middencommando",
- },
- ["bottomcommand"]={
- ["en"]="bottomcommand",
- ["nl"]="ondercommando",
+ ["fractions"]={
+ ["en"]="fractions",
+ ["nl"]="breuken",
},
["action"]={
["cs"]="akce",
@@ -6748,10 +6507,6 @@ return {
["pe"]="بعدازسر",
["ro"]="dupatitlu",
},
- ["aftersection"]={
- ["en"]="aftersection",
- ["nl"]="nasectie",
- },
["afterkey"]={
["cs"]="klavesapo",
["de"]="nachtaste",
@@ -6762,6 +6517,10 @@ return {
["pe"]="بعدازکلید",
["ro"]="dupatasta",
},
+ ["aftersection"]={
+ ["en"]="aftersection",
+ ["nl"]="nasectie",
+ },
["align"]={
["cs"]="zarovnani",
["de"]="ausrichtung",
@@ -6792,6 +6551,9 @@ return {
["pe"]="حرÙ‌تنظیم‌کردن",
["ro"]="alierecaracter",
},
+ ["alignsymbol"]={
+ ["en"]="alignsymbol",
+ },
["aligntitle"]={
["cs"]="zarovnejtitul",
["de"]="titelausrichten",
@@ -6812,6 +6574,13 @@ return {
["pe"]="جایگزین",
["ro"]="alternativ",
},
+ ["anchor"]={
+ ["en"]="anchor",
+ ["nl"]="anker",
+ },
+ ["andtext"]={
+ ["en"]="andtext",
+ },
["apa"]={
["cs"]="apa",
["de"]="apa",
@@ -6832,6 +6601,21 @@ return {
["pe"]="پیکان",
["ro"]="sageata",
},
+ ["artauthor"]={
+ ["en"]="artauthor",
+ },
+ ["artauthoretaldisplay"]={
+ ["en"]="artauthoretaldisplay",
+ },
+ ["artauthoretallimit"]={
+ ["en"]="artauthoretallimit",
+ },
+ ["artauthoretaltext"]={
+ ["en"]="artauthoretaltext",
+ },
+ ["artoffset"]={
+ ["en"]="artoffset",
+ },
["at"]={
["cs"]="u",
["de"]="bei",
@@ -6852,6 +6636,18 @@ return {
["pe"]="نویسنده",
["ro"]="autor",
},
+ ["authorconversion"]={
+ ["en"]="authorconversion",
+ },
+ ["authoretaldisplay"]={
+ ["en"]="authoretaldisplay",
+ },
+ ["authoretallimit"]={
+ ["en"]="authoretallimit",
+ },
+ ["authoretaltext"]={
+ ["en"]="authoretaltext",
+ },
["auto"]={
["cs"]="auto",
["de"]="auto",
@@ -6916,6 +6712,14 @@ return {
["pe"]="عرض‌خودکار",
["ro"]="autolatime",
},
+ ["availableheight"]={
+ ["en"]="availableheight",
+ ["nl"]="beschikbarehoogte",
+ },
+ ["availablewidth"]={
+ ["en"]="availablewidth",
+ ["nl"]="beschikbarebreedte",
+ },
["axis"]={
["cs"]="osa",
["de"]="achsen",
@@ -6996,6 +6800,10 @@ return {
["pe"]="پرده‌پس‌زمینه",
["ro"]="ecranfundal",
},
+ ["backreference"]={
+ ["en"]="backreference",
+ ["nl"]="terugreferentie",
+ },
["backspace"]={
["cs"]="zpetnamezera",
["de"]="rumpfspatium",
@@ -7006,10 +6814,6 @@ return {
["pe"]="Ùضای‌پس",
["ro"]="spatiuspate",
},
- ["backreference"]={
- ["en"]="backreference",
- ["nl"]="terugreferentie",
- },
["balance"]={
["cs"]="rovnovaha",
["de"]="ausgleichen",
@@ -7030,14 +6834,6 @@ return {
["pe"]="قبل‌از",
["ro"]="inainte",
},
- ["beforesection"]={
- ["en"]="beforesection",
- ["nl"]="voorsectie",
- },
- ["insidesection"]={
- ["en"]="insidesection",
- ["nl"]="binnensectie",
- },
["beforehead"]={
["cs"]="predhlavickou",
["de"]="vorkopf",
@@ -7048,9 +6844,9 @@ return {
["pe"]="قبل‌ازسر",
["ro"]="inaintetitlu",
},
- ["concerns"]={
- ["en"]="concerns",
- ["nl"]="betreft",
+ ["beforesection"]={
+ ["en"]="beforesection",
+ ["nl"]="voorsectie",
},
["bet"]={
["cs"]="bet",
@@ -7085,6 +6881,9 @@ return {
["pe"]="خالی",
["ro"]="blanc",
},
+ ["bleedoffset"]={
+ ["en"]="bleedoffset",
+ },
["blockway"]={
["cs"]="dobloku",
["de"]="blockauf",
@@ -7105,6 +6904,27 @@ return {
["pe"]="قلم‌بدنه",
["ro"]="fonttext",
},
+ ["boffset"]={
+ ["en"]="boffset",
+ },
+ ["boldfeatures"]={
+ ["en"]="boldfeatures",
+ },
+ ["boldfont"]={
+ ["en"]="boldfont",
+ },
+ ["bolditalicfeatures"]={
+ ["en"]="bolditalicfeatures",
+ },
+ ["bolditalicfont"]={
+ ["en"]="bolditalicfont",
+ },
+ ["boldslantedfeatures"]={
+ ["en"]="boldslantedfeatures",
+ },
+ ["boldslantedfont"]={
+ ["en"]="boldslantedfont",
+ },
["bookmark"]={
["cs"]="zalozka",
["de"]="bookmark",
@@ -7131,6 +6951,10 @@ return {
["bottombefore"]={
["en"]="bottombefore",
},
+ ["bottomcommand"]={
+ ["en"]="bottomcommand",
+ ["nl"]="ondercommando",
+ },
["bottomdistance"]={
["cs"]="vzdalenostspodku",
["de"]="abstandunten",
@@ -7219,6 +7043,15 @@ return {
["pe"]="Ùرمان",
["ro"]="comandac",
},
+ ["character"]={
+ ["en"]="character",
+ },
+ ["characters"]={
+ ["en"]="characters",
+ },
+ ["check"]={
+ ["en"]="check",
+ },
["click"]={
["cs"]="klik",
["de"]="klick",
@@ -7279,6 +7112,10 @@ return {
["pe"]="بستن‌Ùرمان",
["ro"]="closecommand",
},
+ ["closepage"]={
+ ["en"]="closepage",
+ ["nl"]="sluitpagina",
+ },
["closepageaction"]={
["cs"]="akcezavrenistranky",
["de"]="closepageaction",
@@ -7289,10 +7126,6 @@ return {
["pe"]="بستن‌عمل‌صÙحه",
["ro"]="actiuneinchiderepagina",
},
- ["closepage"]={
- ["en"]="closepage",
- ["nl"]="sluitpagina",
- },
["closesymbol"]={
["cs"]="closesymbol",
["de"]="closesymbol",
@@ -7313,9 +7146,6 @@ return {
["pe"]="رنگ",
["ro"]="culoare",
},
- ["intent"]={
- ["en"]="intent",
- },
["column"]={
["cs"]="sloupec",
["de"]="spalte",
@@ -7346,6 +7176,9 @@ return {
["pe"]="ستونها",
["ro"]="coloane",
},
+ ["comma"]={
+ ["en"]="comma",
+ },
["command"]={
["cs"]="prikaz",
["de"]="befehl",
@@ -7386,6 +7219,19 @@ return {
["pe"]="Ùرمانها",
["ro"]="comenzi",
},
+ ["comment"]={
+ ["en"]="comment",
+ },
+ ["commentchar"]={
+ ["en"]="commentchar",
+ },
+ ["commentoffset"]={
+ ["en"]="commentoffset",
+ },
+ ["compact"]={
+ ["en"]="compact",
+ ["nl"]="compact",
+ },
["component"]={
["cs"]="component",
["de"]="component",
@@ -7416,6 +7262,13 @@ return {
["pe"]="Ùشردن",
["ro"]="compress",
},
+ ["compressseparator"]={
+ ["en"]="compressseparator",
+ },
+ ["concerns"]={
+ ["en"]="concerns",
+ ["nl"]="betreft",
+ },
["connector"]={
["en"]="connector",
},
@@ -7509,6 +7362,12 @@ return {
["pe"]="criterium",
["ro"]="criteriu",
},
+ ["cropoffset"]={
+ ["en"]="cropoffset",
+ },
+ ["cssfile"]={
+ ["en"]="cssfile",
+ },
["current"]={
["cs"]="aktualni",
["de"]="aktuell",
@@ -7549,6 +7408,12 @@ return {
["pe"]="dat",
["ro"]="dat",
},
+ ["database"]={
+ ["en"]="database",
+ },
+ ["dataset"]={
+ ["en"]="dataset",
+ },
["date"]={
["cs"]="datum",
["de"]="datum",
@@ -7649,10 +7514,6 @@ return {
["pe"]="نمایش",
["ro"]="display",
},
- ["mask"]={
- ["en"]="mask",
- ["nl"]="masker",
- },
["distance"]={
["cs"]="vzdalenost",
["de"]="abstand",
@@ -7663,6 +7524,9 @@ return {
["pe"]="Ùاصله",
["ro"]="distanta",
},
+ ["domain"]={
+ ["en"]="domain",
+ },
["dot"]={
["cs"]="tecka",
["de"]="punkt",
@@ -7683,6 +7547,9 @@ return {
["pe"]="دورو",
["ro"]="douafete",
},
+ ["down"]={
+ ["en"]="down",
+ },
["dummy"]={
["cs"]="dummy",
["de"]="dummy",
@@ -7733,6 +7600,18 @@ return {
["pe"]="Ùاصله‌لبه",
["ro"]="distantabordura",
},
+ ["editor"]={
+ ["en"]="editor",
+ },
+ ["editoretaldisplay"]={
+ ["en"]="editoretaldisplay",
+ },
+ ["editoretallimit"]={
+ ["en"]="editoretallimit",
+ },
+ ["editoretaltext"]={
+ ["en"]="editoretaltext",
+ },
["empty"]={
["cs"]="prazdne",
["de"]="leer",
@@ -7743,6 +7622,14 @@ return {
["pe"]="تهی",
["ro"]="gol",
},
+ ["entities"]={
+ ["en"]="entities",
+ ["nl"]="entities",
+ },
+ ["entries"]={
+ ["en"]="entries",
+ ["nl"]="ingangen",
+ },
["equalheight"]={
["cs"]="equalheight",
["de"]="equalheight",
@@ -7773,6 +7660,18 @@ return {
["pe"]="Ùرار",
["ro"]="escape",
},
+ ["etaldisplay"]={
+ ["en"]="etaldisplay",
+ },
+ ["etallimit"]={
+ ["en"]="etallimit",
+ },
+ ["etaloption"]={
+ ["en"]="etaloption",
+ },
+ ["etaltext"]={
+ ["en"]="etaltext",
+ },
["evenmargin"]={
["cs"]="sudamarginalie",
["de"]="geraderand",
@@ -7783,6 +7682,9 @@ return {
["pe"]="حاشیه‌زوج",
["ro"]="marginepara",
},
+ ["exitoffset"]={
+ ["en"]="exitoffset",
+ },
["expansion"]={
["cs"]="expanzen",
["de"]="expansion",
@@ -7793,6 +7695,10 @@ return {
["pe"]="گسترش",
["ro"]="expansiune",
},
+ ["export"]={
+ ["en"]="export",
+ ["nl"]="exporteer",
+ },
["extras"]={
["cs"]="extras",
["de"]="extras",
@@ -7833,6 +7739,15 @@ return {
["pe"]="خانواده",
["ro"]="familie",
},
+ ["features"]={
+ ["en"]="features",
+ },
+ ["fences"]={
+ ["en"]="fences",
+ },
+ ["field"]={
+ ["en"]="field",
+ },
["fieldbackgroundcolor"]={
["cs"]="barvapozadipole",
["de"]="feldhintergrundfarbe",
@@ -7883,26 +7798,26 @@ return {
["pe"]="پرونده",
["ro"]="fisier",
},
+ ["filler"]={
+ ["en"]="filler",
+ },
["filtercommand"]={
["en"]="filtercommand",
},
- ["availablewidth"]={
- ["en"]="availablewidth",
- ["nl"]="beschikbarebreedte",
+ ["finalnamesep"]={
+ ["en"]="finalnamesep",
},
- ["availableheight"]={
- ["en"]="availableheight",
- ["nl"]="beschikbarehoogte",
+ ["finalpagesep"]={
+ ["en"]="finalpagesep",
},
- ["focus"]={
- ["cs"]="zaostreni",
- ["de"]="focus",
- ["en"]="focus",
- ["fr"]="focus",
- ["it"]="focus",
- ["nl"]="focus",
- ["pe"]="تمرکز",
- ["ro"]="focus",
+ ["finalpubsep"]={
+ ["en"]="finalpubsep",
+ },
+ ["first"]={
+ ["en"]="first",
+ },
+ ["firstnamesep"]={
+ ["en"]="firstnamesep",
},
["firstpage"]={
["cs"]="prvnistranka",
@@ -7914,6 +7829,16 @@ return {
["pe"]="صÙحه‌اول",
["ro"]="primapagina",
},
+ ["focus"]={
+ ["cs"]="zaostreni",
+ ["de"]="focus",
+ ["en"]="focus",
+ ["fr"]="focus",
+ ["it"]="focus",
+ ["nl"]="focus",
+ ["pe"]="تمرکز",
+ ["ro"]="focus",
+ },
["focusin"]={
["cs"]="focusin",
["de"]="focusin",
@@ -7934,6 +7859,10 @@ return {
["pe"]="تمرکزبیرون",
["ro"]="focusout",
},
+ ["focusoffset"]={
+ ["en"]="focusoffset",
+ ["nl"]="focusoffset",
+ },
["footer"]={
["cs"]="upati",
["de"]="fusszeile",
@@ -7964,16 +7893,6 @@ return {
["pe"]="وضعیت‌ته‌برگ",
["ro"]="staresubsol",
},
- ["foregroundcolor"]={
- ["cs"]="foregroundcolor",
- ["de"]="foregroundcolor",
- ["en"]="foregroundcolor",
- ["fr"]="couleurpremierplan",
- ["it"]="coloreprimopiano",
- ["nl"]="voorgrondkleur",
- ["pe"]="رنگ‌پیش‌زمینه",
- ["ro"]="foregroundcolor",
- },
["force"]={
["cs"]="sila",
["de"]="zwinge",
@@ -7984,6 +7903,16 @@ return {
["pe"]="اجبار",
["ro"]="fortat",
},
+ ["foregroundcolor"]={
+ ["cs"]="foregroundcolor",
+ ["de"]="foregroundcolor",
+ ["en"]="foregroundcolor",
+ ["fr"]="couleurpremierplan",
+ ["it"]="coloreprimopiano",
+ ["nl"]="voorgrondkleur",
+ ["pe"]="رنگ‌پیش‌زمینه",
+ ["ro"]="foregroundcolor",
+ },
["foregroundstyle"]={
["cs"]="foregroundstyle",
["de"]="foregroundstyle",
@@ -8084,6 +8013,12 @@ return {
["pe"]="از",
["ro"]="dela",
},
+ ["functioncolor"]={
+ ["en"]="functioncolor",
+ },
+ ["functionstyle"]={
+ ["en"]="functionstyle",
+ },
["get"]={
["cs"]="ziskat",
["de"]="hole",
@@ -8104,6 +8039,9 @@ return {
["pe"]="سراسری",
["ro"]="global",
},
+ ["goodies"]={
+ ["en"]="goodies",
+ },
["grid"]={
["cs"]="mrizka",
["de"]="gritter",
@@ -8114,6 +8052,12 @@ return {
["pe"]="توری",
["ro"]="grid",
},
+ ["group"]={
+ ["en"]="group",
+ },
+ ["groupsuffix"]={
+ ["en"]="groupsuffix",
+ },
["hang"]={
["cs"]="zaveseni",
["de"]="haengend",
@@ -8124,6 +8068,14 @@ return {
["pe"]="بیاویز",
["ro"]="suspenda",
},
+ ["hcompact"]={
+ ["en"]="hcompact",
+ ["nl"]="hcomprimeer",
+ },
+ ["headalign"]={
+ ["en"]="headalign",
+ ["nl"]="kopuitlijnen",
+ },
["headcolor"]={
["cs"]="barvahlavicky",
["de"]="kopffarbe",
@@ -8277,6 +8229,9 @@ return {
["pe"]="شکستن",
["ro"]="hyphen",
},
+ ["hyphens"]={
+ ["en"]="hyphens",
+ },
["icommand"]={
["cs"]="iprikaz",
["de"]="ibefehl",
@@ -8287,6 +8242,9 @@ return {
["pe"]="icommand",
["ro"]="comandai",
},
+ ["ignore"]={
+ ["en"]="ignore",
+ },
["in"]={
["cs"]="v",
["de"]="in",
@@ -8347,6 +8305,9 @@ return {
["pe"]="متن‌تورÙته",
["ro"]="aliniaturmator",
},
+ ["index"]={
+ ["en"]="index",
+ },
["indicator"]={
["cs"]="indikator",
["de"]="indikator",
@@ -8357,6 +8318,9 @@ return {
["pe"]="اندیکاتور",
["ro"]="indicator",
},
+ ["initialsep"]={
+ ["en"]="initialsep",
+ },
["inner"]={
["cs"]="vnitrni",
["de"]="innen",
@@ -8387,6 +8351,16 @@ return {
["pe"]="پرونده‌ورودی",
["ro"]="inputfile",
},
+ ["insidesection"]={
+ ["en"]="insidesection",
+ ["nl"]="binnensectie",
+ },
+ ["instance"]={
+ ["en"]="instance",
+ },
+ ["intent"]={
+ ["en"]="intent",
+ },
["interaction"]={
["cs"]="interakce",
["de"]="interaktion",
@@ -8408,8 +8382,14 @@ return {
["ro"]="spatiereinterliniara",
},
["internalgrid"]={
- ["nl"]="interngrid",
["en"]="internalgrid",
+ ["nl"]="interngrid",
+ },
+ ["italicfeatures"]={
+ ["en"]="italicfeatures",
+ },
+ ["italicfont"]={
+ ["en"]="italicfont",
},
["itemalign"]={
["cs"]="itemalign",
@@ -8431,9 +8411,17 @@ return {
["pe"]="آیتمها",
["ro"]="elemente",
},
- ["mark"]={
- ["en"]="mark",
- ["nl"]="kernmerk",
+ ["joiners"]={
+ ["en"]="joiners",
+ },
+ ["journalconversion"]={
+ ["en"]="journalconversion",
+ },
+ ["juniorsep"]={
+ ["en"]="juniorsep",
+ },
+ ["keeptogether"]={
+ ["en"]="keeptogether",
},
["ken"]={
["cs"]="ken",
@@ -8455,6 +8443,10 @@ return {
["pe"]="گسترش‌کلید",
["ro"]="keyexpansion",
},
+ ["keys"]={
+ ["en"]="keys",
+ ["nl"]="sleutels",
+ },
["keyword"]={
["cs"]="keyword",
["de"]="keyword",
@@ -8475,6 +8467,18 @@ return {
["pe"]="برچسب",
["ro"]="eticheta",
},
+ ["labeloffset"]={
+ ["en"]="labeloffset",
+ },
+ ["language"]={
+ ["en"]="language",
+ },
+ ["last"]={
+ ["en"]="last",
+ },
+ ["lastnamesep"]={
+ ["en"]="lastnamesep",
+ },
["lastpage"]={
["cs"]="poslednistrana",
["de"]="letzteseite",
@@ -8485,6 +8489,16 @@ return {
["pe"]="صÙحه‌آخر",
["ro"]="ultimapagina",
},
+ ["lastpagesep"]={
+ ["en"]="lastpagesep",
+ },
+ ["lastpubsep"]={
+ ["en"]="lastpubsep",
+ },
+ ["layout"]={
+ ["en"]="layout",
+ ["nl"]="layout",
+ },
["left"]={
["cs"]="vlevo",
["de"]="links",
@@ -8665,6 +8679,13 @@ return {
["pe"]="عرض‌خط",
["ro"]="latimestanga",
},
+ ["leftwords"]={
+ ["en"]="leftwords",
+ },
+ ["less"]={
+ ["en"]="less",
+ ["nl"]="minder",
+ },
["level"]={
["cs"]="uroven",
["de"]="niveau",
@@ -8765,6 +8786,9 @@ return {
["pe"]="مکان",
["ro"]="locatie",
},
+ ["loffset"]={
+ ["en"]="loffset",
+ },
["logo"]={
["cs"]="logo",
["de"]="logo",
@@ -8845,6 +8869,10 @@ return {
["pe"]="متن‌حاشیه",
["ro"]="textmargine",
},
+ ["mark"]={
+ ["en"]="mark",
+ ["nl"]="kernmerk",
+ },
["marking"]={
["cs"]="znaceni",
["de"]="beschriftung",
@@ -8865,6 +8893,19 @@ return {
["pe"]="سبک‌حاش",
["ro"]="stilmarcaj",
},
+ ["mask"]={
+ ["en"]="mask",
+ ["nl"]="masker",
+ },
+ ["mathclass"]={
+ ["en"]="mathclass",
+ },
+ ["mathlimits"]={
+ ["en"]="mathlimits",
+ },
+ ["mathstyle"]={
+ ["en"]="mathstyle",
+ },
["max"]={
["cs"]="max",
["de"]="max",
@@ -8875,6 +8916,9 @@ return {
["pe"]="بیشترین",
["ro"]="max",
},
+ ["maxdepth"]={
+ ["en"]="maxdepth",
+ },
["maxheight"]={
["cs"]="maxvyska",
["de"]="maxhoehe",
@@ -8885,9 +8929,6 @@ return {
["pe"]="بیشترین‌ارتÙاع",
["ro"]="inaltimemaxima",
},
- ["maxdepth"]={
- ["en"]="maxdepth",
- },
["maxwidth"]={
["cs"]="maxsirka",
["de"]="maxbreite",
@@ -8898,6 +8939,9 @@ return {
["pe"]="بیشترین‌عرض",
["ro"]="latimemaxima",
},
+ ["maybeyear"]={
+ ["en"]="maybeyear",
+ },
["menu"]={
["cs"]="menu",
["de"]="menue",
@@ -8928,6 +8972,10 @@ return {
["pe"]="میان",
["ro"]="mijloc",
},
+ ["middlecommand"]={
+ ["en"]="middlecommand",
+ ["nl"]="middencommando",
+ },
["middlespeech"]={
["cs"]="middlespeech",
["de"]="middlespeech",
@@ -9008,25 +9056,29 @@ return {
["pe"]="moffset",
["ro"]="moffset",
},
- ["mpwidth"]={
- ["en"]="mpwidth",
- ["nl"]="mpbreedte",
+ ["monthconversion"]={
+ ["en"]="monthconversion",
+ ["nl"]="maandconversie",
},
- ["mpheight"]={
- ["en"]="mpheight",
- ["nl"]="mphoogte",
+ ["more"]={
+ ["en"]="more",
+ ["nl"]="meer",
},
["mpdepth"]={
["en"]="mpdepth",
["nl"]="mpdiepte",
},
+ ["mpheight"]={
+ ["en"]="mpheight",
+ ["nl"]="mphoogte",
+ },
["mpoffset"]={
["en"]="mpoffset",
["nl"]="mpoffset",
},
- ["monthconversion"]={
- ["en"]="monthconversion",
- ["nl"]="maandconversie",
+ ["mpwidth"]={
+ ["en"]="mpwidth",
+ ["nl"]="mpbreedte",
},
["n"]={
["cs"]="n",
@@ -9048,6 +9100,9 @@ return {
["pe"]="نام",
["ro"]="nume",
},
+ ["namesep"]={
+ ["en"]="namesep",
+ },
["nbottom"]={
["cs"]="nspodek",
["de"]="nunten",
@@ -9078,6 +9133,18 @@ return {
["pe"]="بعدی",
["ro"]="urmatorul",
},
+ ["nextleft"]={
+ ["en"]="nextleft",
+ },
+ ["nextleftquotation"]={
+ ["en"]="nextleftquotation",
+ },
+ ["nextright"]={
+ ["en"]="nextright",
+ },
+ ["nextrightquotation"]={
+ ["en"]="nextrightquotation",
+ },
["nl"]={
["cs"]="nl",
["de"]="nl",
@@ -9118,6 +9185,9 @@ return {
["pe"]="norm",
["ro"]="norm",
},
+ ["note"]={
+ ["en"]="note",
+ },
["nr"]={
["cs"]="nr",
["de"]="nr",
@@ -9158,6 +9228,10 @@ return {
["pe"]="شماره",
["ro"]="numar",
},
+ ["numberalign"]={
+ ["en"]="numberalign",
+ ["nl"]="nummeruitlijnen",
+ },
["numbercolor"]={
["cs"]="barvacisla",
["de"]="nummernfarbe",
@@ -9229,12 +9303,12 @@ return {
["numberset"]={
["en"]="numberset",
},
- ["numberstopper"]={
- ["en"]="numberstopper",
- },
["numberstarter"]={
["en"]="numberstarter",
},
+ ["numberstopper"]={
+ ["en"]="numberstopper",
+ },
["numberstyle"]={
["cs"]="stylcisla",
["de"]="nummernstil",
@@ -9315,18 +9389,6 @@ return {
["pe"]="Ø¢Ùست",
["ro"]="offset",
},
- ["loffset"]={
- ["en"]="loffset",
- },
- ["roffset"]={
- ["en"]="roffset",
- },
- ["toffset"]={
- ["en"]="toffset",
- },
- ["boffset"]={
- ["en"]="boffset",
- },
["openaction"]={
["cs"]="otevriakci",
["de"]="oeffenaktion",
@@ -9337,6 +9399,10 @@ return {
["pe"]="عمل‌باز",
["ro"]="actiunedeschidere",
},
+ ["openpage"]={
+ ["en"]="openpage",
+ ["nl"]="openpagina",
+ },
["openpageaction"]={
["cs"]="akceotevrenistranky",
["de"]="openpageaction",
@@ -9347,9 +9413,11 @@ return {
["pe"]="عمل‌صÙحه‌باز",
["ro"]="actiunedeschiderepagina",
},
- ["openpage"]={
- ["en"]="openpage",
- ["nl"]="openpagina",
+ ["openup"]={
+ ["en"]="openup",
+ },
+ ["opticalsize"]={
+ ["en"]="opticalsize",
},
["option"]={
["cs"]="volba",
@@ -9361,6 +9429,10 @@ return {
["pe"]="گزینه",
["ro"]="optiune",
},
+ ["order"]={
+ ["en"]="order",
+ ["nl"]="volgorde",
+ },
["orientation"]={
["cs"]="orientation",
["de"]="orientation",
@@ -9371,6 +9443,9 @@ return {
["pe"]="جهت‌دهی",
["ro"]="orientation",
},
+ ["otherstext"]={
+ ["en"]="otherstext",
+ },
["outermargin"]={
["cs"]="outermargin",
["de"]="outermargin",
@@ -9445,12 +9520,18 @@ return {
["pe"]="Ùرمان‌صÙحه",
["ro"]="comandapagina",
},
+ ["pageconnector"]={
+ ["en"]="pageconnector",
+ },
["pageconversion"]={
["en"]="pageconversion",
},
["pageconversionset"]={
["en"]="pageconversionset",
},
+ ["pageleft"]={
+ ["en"]="pageleft",
+ },
["pagenumber"]={
["cs"]="cislostranky",
["de"]="seitennummer",
@@ -9482,21 +9563,30 @@ return {
["pageprefixset"]={
["en"]="pageprefixset",
},
+ ["pageprefixstarter"]={
+ ["en"]="pageprefixstarter",
+ },
["pageprefixstopper"]={
["en"]="pageprefixstopper",
},
- ["pageprefixstarter"]={
- ["en"]="pageprefixstarter",
+ ["pageright"]={
+ ["en"]="pageright",
},
["pagesegments"]={
["en"]="pagesegments",
},
+ ["pagesep"]={
+ ["en"]="pagesep",
+ },
["pageseparatorset"]={
["en"]="pageseparatorset",
},
["pageset"]={
["en"]="pageset",
},
+ ["pagestarter"]={
+ ["en"]="pagestarter",
+ },
["pagestate"]={
["cs"]="pagestate",
["de"]="pagestate",
@@ -9510,9 +9600,6 @@ return {
["pagestopper"]={
["en"]="pagestopper",
},
- ["pagestarter"]={
- ["en"]="pagestarter",
- },
["pagestyle"]={
["cs"]="stylstranky",
["de"]="seitenstil",
@@ -9553,6 +9640,9 @@ return {
["pe"]="پاراگراÙ",
["ro"]="paragraf",
},
+ ["period"]={
+ ["en"]="period",
+ },
["place"]={
["cs"]="umistit",
["de"]="platziere",
@@ -9621,12 +9711,12 @@ return {
["prefixset"]={
["en"]="prefixset",
},
- ["prefixstopper"]={
- ["en"]="prefixstopper",
- },
["prefixstarter"]={
["en"]="prefixstarter",
},
+ ["prefixstopper"]={
+ ["en"]="prefixstopper",
+ },
["preset"]={
["cs"]="prednastaveni",
["de"]="voreinstellung",
@@ -9673,7 +9763,7 @@ return {
["en"]="printable",
["fr"]="editable",
["it"]="stampabile",
- ["nl"]="printbaar", -- afdrukbaar
+ ["nl"]="printbaar",
["pe"]="قابل‌چاپ",
["ro"]="tiparibil",
},
@@ -9690,6 +9780,15 @@ return {
["profile"]={
["en"]="profile",
},
+ ["properties"]={
+ ["en"]="properties",
+ },
+ ["pubsep"]={
+ ["en"]="pubsep",
+ },
+ ["quotechar"]={
+ ["en"]="quotechar",
+ },
["radius"]={
["cs"]="polomer",
["de"]="radius",
@@ -9734,6 +9833,9 @@ return {
["pe"]="رج",
["ro"]="ref",
},
+ ["refcommand"]={
+ ["en"]="refcommand",
+ },
["reference"]={
["cs"]="odkaz",
["de"]="referenz",
@@ -9744,6 +9846,9 @@ return {
["pe"]="مرجع",
["ro"]="referinta",
},
+ ["referencemethod"]={
+ ["en"]="referencemethod",
+ },
["referenceprefix"]={
["en"]="referenceprefix",
},
@@ -9781,6 +9886,18 @@ return {
["pe"]="ناحیه‌بیرون",
["ro"]="regiuneiesire",
},
+ ["register"]={
+ ["en"]="register",
+ },
+ ["regularfeatures"]={
+ ["en"]="regularfeatures",
+ },
+ ["regularfont"]={
+ ["en"]="regularfont",
+ },
+ ["renderingsetup"]={
+ ["en"]="renderingsetup",
+ },
["repeat"]={
["cs"]="opakovat",
["de"]="wiederholen",
@@ -9821,6 +9938,19 @@ return {
["pe"]="Ú©ÛŒÙیت",
["ro"]="rezolutie",
},
+ ["resources"]={
+ ["en"]="resources",
+ },
+ ["reverse"]={
+ ["cs"]="reverse",
+ ["de"]="reverse",
+ ["en"]="reverse",
+ ["fr"]="inverse",
+ ["it"]="invertito",
+ ["nl"]="omgekeerd",
+ ["pe"]="برعکس",
+ ["ro"]="reverse",
+ },
["right"]={
["cs"]="vpravo",
["de"]="rechts",
@@ -10001,6 +10131,15 @@ return {
["pe"]="عرض‌راست",
["ro"]="marginedreapta",
},
+ ["rightwords"]={
+ ["en"]="rightwords",
+ },
+ ["rightchars"]={
+ ["en"]="rightchars",
+ },
+ ["roffset"]={
+ ["en"]="roffset",
+ },
["rotation"]={
["cs"]="rotace",
["de"]="rotation",
@@ -10021,10 +10160,6 @@ return {
["pe"]="خط",
["ro"]="rigla",
},
- ["rulecommand"]={
- ["en"]="rulecommand",
- ["nl"]="lijncommando",
- },
["rulecolor"]={
["cs"]="barvalinky",
["de"]="linienfarbe",
@@ -10035,6 +10170,10 @@ return {
["pe"]="رنگ‌خط",
["ro"]="culoarerigla",
},
+ ["rulecommand"]={
+ ["en"]="rulecommand",
+ ["nl"]="lijncommando",
+ },
["rulethickness"]={
["cs"]="tloustkalinky",
["de"]="liniendicke",
@@ -10065,6 +10204,9 @@ return {
["pe"]="نمونه",
["ro"]="exemplu",
},
+ ["samplesize"]={
+ ["en"]="samplesize",
+ },
["saveinlist"]={
["en"]="saveinlist",
},
@@ -10108,6 +10250,9 @@ return {
["pe"]="بخش",
["ro"]="sectiune",
},
+ ["sectionblock"]={
+ ["en"]="sectionblock",
+ },
["sectionconversion"]={
["en"]="sectionconversion",
},
@@ -10136,12 +10281,12 @@ return {
["sectionset"]={
["en"]="sectionset",
},
- ["sectionstopper"]={
- ["en"]="sectionstopper",
- },
["sectionstarter"]={
["en"]="sectionstarter",
},
+ ["sectionstopper"]={
+ ["en"]="sectionstopper",
+ },
["separator"]={
["cs"]="oddelovac",
["de"]="seperator",
@@ -10152,6 +10297,14 @@ return {
["pe"]="جداکننده",
["ro"]="separator",
},
+ ["separatorcolor"]={
+ ["en"]="separatorcolor",
+ ["nl"]="scheiderkleur",
+ },
+ ["separatorstyle"]={
+ ["en"]="separatorstyle",
+ ["nl"]="scheiderletter",
+ },
["set"]={
["cs"]="set",
["de"]="set",
@@ -10162,6 +10315,10 @@ return {
["pe"]="قراربده",
["ro"]="set",
},
+ ["setups"]={
+ ["comment"]="no translations",
+ ["en"]="setups",
+ },
["shrink"]={
["en"]="shrink",
["nl"]="krimp",
@@ -10236,6 +10393,12 @@ return {
["pe"]="اندازه",
["ro"]="dimensiune",
},
+ ["slantedfeatures"]={
+ ["en"]="slantedfeatures",
+ },
+ ["slantedfont"]={
+ ["en"]="slantedfont",
+ },
["small"]={
["cs"]="male",
["de"]="klein",
@@ -10246,6 +10409,16 @@ return {
["pe"]="Ú©ÙˆÚ†Ú©",
["ro"]="mic",
},
+ ["smallcapsfeatures"]={
+ ["en"]="smallcapsfeatures",
+ },
+ ["smallcapsfont"]={
+ ["en"]="smallcapsfont",
+ },
+ ["solution"]={
+ ["en"]="solution",
+ ["nl"]="oplossing",
+ },
["sort"]={
["en"]="sort",
},
@@ -10319,6 +10492,9 @@ return {
["pe"]="Ùضاگذاری",
["ro"]="spatiere",
},
+ ["specification"]={
+ ["en"]="specification",
+ },
["split"]={
["cs"]="split",
["de"]="split",
@@ -10389,6 +10565,10 @@ return {
["pe"]="شروع",
["ro"]="start",
},
+ ["starter"]={
+ ["en"]="starter",
+ ["nl"]="opener",
+ },
["state"]={
["cs"]="status",
["de"]="status",
@@ -10429,10 +10609,6 @@ return {
["pe"]="ایست",
["ro"]="stopper",
},
- ["starter"]={
- ["en"]="starter",
- ["nl"]="opener",
- },
["stretch"]={
["cs"]="natahnout",
["de"]="strecken",
@@ -10443,6 +10619,9 @@ return {
["pe"]="کشیدن",
["ro"]="dilatat",
},
+ ["strip"]={
+ ["en"]="strip",
+ },
["strut"]={
["cs"]="strut",
["de"]="strut",
@@ -10453,15 +10632,6 @@ return {
["pe"]="بست",
["ro"]="strut",
},
- ["mathclass"]={
- ["en"]="mathclass",
- },
- ["mathstyle"]={
- ["en"]="mathstyle",
- },
- ["mathlimits"]={
- ["en"]="mathlimits",
- },
["style"]={
["cs"]="pismeno",
["de"]="stil",
@@ -10510,6 +10680,18 @@ return {
["en"]="suffixstopper",
["nl"]="suffixafsluiter",
},
+ ["surnamefirstnamesep"]={
+ ["en"]="surnamefirstnamesep",
+ },
+ ["surnameinitialsep"]={
+ ["en"]="surnameinitialsep",
+ },
+ ["surnamesep"]={
+ ["en"]="surnamesep",
+ },
+ ["svgstyle"]={
+ ["en"]="svgstyle",
+ },
["sx"]={
["cs"]="sx",
["de"]="sx",
@@ -10550,6 +10732,9 @@ return {
["pe"]="نماد",
["ro"]="simbol",
},
+ ["symbolcommand"]={
+ ["en"]="symbolcommand",
+ },
["symbolset"]={
["cs"]="sadasymbolu",
["de"]="symbolset",
@@ -10640,6 +10825,9 @@ return {
["pe"]="متن",
["ro"]="text",
},
+ ["textalign"]={
+ ["en"]="textalign",
+ },
["textcolor"]={
["cs"]="barvatextu",
["de"]="textfarbe",
@@ -10670,6 +10858,16 @@ return {
["pe"]="Ùاصله‌متن",
["ro"]="textdistance",
},
+ ["textheight"]={
+ ["cs"]="vyskatextu",
+ ["de"]="texthoehe",
+ ["en"]="textheight",
+ ["fr"]="hauteurtexte",
+ ["it"]="altezzatesto",
+ ["nl"]="teksthoogte",
+ ["pe"]="ارتÙاع‌متن",
+ ["ro"]="inaltimetext",
+ },
["textlayer"]={
["cs"]="textlayer",
["de"]="textlayer",
@@ -10740,16 +10938,6 @@ return {
["pe"]="سبک‌متن",
["ro"]="stiltext",
},
- ["textheight"]={
- ["cs"]="vyskatextu",
- ["de"]="texthoehe",
- ["en"]="textheight",
- ["fr"]="hauteurtexte",
- ["it"]="altezzatesto",
- ["nl"]="teksthoogte",
- ["pe"]="ارتÙاع‌متن",
- ["ro"]="inaltimetext",
- },
["textwidth"]={
["cs"]="sirkatextu",
["de"]="textbreite",
@@ -10761,7 +10949,7 @@ return {
["ro"]="latimetext",
},
["threshold"]={
- ["en"]="threshold", -- rather international term
+ ["en"]="threshold",
},
["title"]={
["cs"]="titul",
@@ -10843,6 +11031,9 @@ return {
["pe"]="به",
["ro"]="catre",
},
+ ["toffset"]={
+ ["en"]="toffset",
+ },
["tolerance"]={
["cs"]="tolerance",
["de"]="toleranz",
@@ -10863,6 +11054,10 @@ return {
["pe"]="بالا",
["ro"]="sus",
},
+ ["topcommand"]={
+ ["en"]="topcommand",
+ ["nl"]="bovencommando",
+ },
["topdistance"]={
["cs"]="vzdalenostvrsku",
["de"]="obenabstand",
@@ -10913,6 +11108,15 @@ return {
["pe"]="وضعیت‌بالا",
["ro"]="staresus",
},
+ ["totalnumber"]={
+ ["en"]="totalnumber",
+ },
+ ["translate"]={
+ ["en"]="translate",
+ },
+ ["trimoffset"]={
+ ["en"]="trimoffset",
+ },
["type"]={
["cs"]="typ",
["de"]="typ",
@@ -10943,6 +11147,9 @@ return {
["pe"]="مرجع‌ناشناس",
["ro"]="referintanecunoscuta",
},
+ ["up"]={
+ ["en"]="up",
+ },
["urlalternative"]={
["cs"]="urlalternativa",
["de"]="urlalternative",
@@ -10973,6 +11180,10 @@ return {
["pe"]="تاییداعتبار",
["ro"]="verifica",
},
+ ["values"]={
+ ["en"]="values",
+ ["nl"]="waarden",
+ },
["vcommand"]={
["cs"]="vprikaz",
["de"]="vbefehl",
@@ -10983,6 +11194,10 @@ return {
["pe"]="vcommand",
["ro"]="comandav",
},
+ ["vcompact"]={
+ ["en"]="vcompact",
+ ["nl"]="vcomprimeer",
+ },
["vector"]={
["en"]="vector",
["nl"]="vector",
@@ -11007,6 +11222,9 @@ return {
["pe"]="vfil",
["ro"]="vfil",
},
+ ["viewerprefix"]={
+ ["en"]="viewerprefix",
+ },
["voffset"]={
["cs"]="voffset",
["de"]="voffset",
@@ -11017,6 +11235,9 @@ return {
["pe"]="Ø¢Ùست‌ع",
["ro"]="voffset",
},
+ ["vonsep"]={
+ ["en"]="vonsep",
+ },
["way"]={
["cs"]="zpusob",
["de"]="art",
@@ -11057,6 +11278,9 @@ return {
["pe"]="عرض",
["ro"]="latime",
},
+ ["words"]={
+ ["en"]="words",
+ },
["xfactor"]={
["cs"]="xfaktor",
["de"]="xfaktor",
@@ -11067,6 +11291,9 @@ return {
["pe"]="Ùاکتورایکس",
["ro"]="xfactor",
},
+ ["xhtml"]={
+ ["en"]="xhtml",
+ },
["xmax"]={
["cs"]="xmax",
["de"]="xmax",
@@ -11077,6 +11304,9 @@ return {
["pe"]="xmax",
["ro"]="xmax",
},
+ ["xmlsetup"]={
+ ["en"]="xmlsetup",
+ },
["xoffset"]={
["cs"]="xoffset",
["de"]="xoffset",
@@ -11421,182 +11651,14 @@ return {
},
},
["variables"]={
- ["setups"]={
- ["comment"]="no translations",
- ["en"]="setups",
- },
- ["followingpage"]={
- ["en"]="followingpage",
- ["nl"]="opvolgendepagina",
- },
- ["precedingpage"]={
- ["en"]="followingpage",
- ["nl"]="voorafgaandepagina",
- },
- ["math"]={
- ["en"]="math",
- },
- ["selectfont"]={
- ["en"]="selectfont",
- },
- ["simplefonts"]={
- ["en"]="simplefonts",
- },
- ["more"]={
- ["en"]="more",
- ["nl"]="meer",
- },
- ["less"]={
- ["en"]="less",
- ["nl"]="minder",
- },
- ["embed"]={
- ["en"]="embed",
- ["nl"]="sluitin",
- },
- ["end"]={
- ["en"]="end",
- ["nl"]="eind",
- },
- ["export"] = {
- ["en"]="export",
- },
- ["begin"]={
- ["en"]="begin",
- ["nl"]="begin",
- },
- ["down"]={
- ["en"]="down",
- ["nl"]="omlaag",
- },
- ["up"]={
- ["en"]="up",
- ["nl"]="omhoog",
- },
- ["smaller"]={
- ["en"]="smaller",
- ["nl"]="kleiner",
- },
- ["bigger"]={
- ["en"]="bigger",
- ["nl"]="groter",
- },
- ["underbar"]={
- ["cs"]="podtrzeno",
- ["de"]="unterstrichen",
- ["en"]="underbar",
- ["fr"]="souslignetout",
- ["it"]="sottolinea",
- ["nl"]="onderstreep",
- ["pe"]="میله‌زیر",
- ["ro"]="sublinie",
- },
- ["underbars"]={
- ["cs"]="podtrzeni",
- ["de"]="unterstreichen",
- ["en"]="underbars",
- ["fr"]="sousligne",
- ["it"]="sottolinee",
- ["nl"]="onderstrepen",
- ["pe"]="میله‌‌های‌زیر",
- ["ro"]="sublinii",
- },
- ["overbar"]={
- ["cs"]="nadtrzeno",
- ["de"]="ueberstrichen",
- ["en"]="overbar",
- ["fr"]="overbar",
- ["it"]="sopralinea",
- ["nl"]="overstreep",
- ["pe"]="میله‌رو",
- ["ro"]="barasus",
+ ["aside"]={
+ ["en"]="aside",
},
- ["overbars"]={
- ["cs"]="nadtrzeni",
- ["de"]="ueberstreichen",
- ["en"]="overbars",
- ["fr"]="overbars",
- ["it"]="sopralinee",
- ["nl"]="overstrepen",
- ["pe"]="میله‌ها‌رو",
- ["ro"]="supralinie",
- },
- ["understrike"]={
- ["en"]="understrike",
+ ["ordinal"]={
+ ["en"]="ordinal",
},
- ["understrikes"]={
- ["en"]="understrikes",
- },
- ["overstrike"]={
- ["cs"]="preskrtnuto",
- ["de"]="durchgestrichen",
- ["en"]="overstrike",
- ["fr"]="surlignetout",
- ["it"]="sbarrato",
- ["nl"]="doorstreep",
- ["pe"]="خط‌زدن",
- ["ro"]="liniepeste",
- },
- ["overstrikes"]={
- ["cs"]="preskrtnuti",
- ["de"]="durchstreichen",
- ["en"]="overstrikes",
- ["fr"]="surligne",
- ["it"]="sbarrati",
- ["nl"]="doorstrepen",
- ["pe"]="خط‌زدنها",
- ["ro"]="liniipeste",
- },
- ["maxheight"]={
- ["en"]="maxheight",
- ["nl"]="maxhoogte",
- },
- ["maxdepth"]={
- ["en"]="maxdepth",
- ["nl"]="maxdiepte",
- },
- ["maxwidth"]={
- ["en"]="maxwidth",
- ["nl"]="maxbreedte",
- },
- ["minheight"]={
- ["en"]="minheight",
- ["nl"]="minhoogte",
- },
- ["mindepth"]={
- ["en"]="mindepth",
- ["nl"]="mindiepte",
- },
- ["minwidth"]={
- ["en"]="minwidth",
- ["nl"]="minbreedte",
- },
- ["short"]={
- ["nl"]="kort",
- ["en"]="short",
- ["de"]="kurz",
- ["cs"]="short",
- ["it"]="short",
- ["ro"]="short",
- ["fr"]="short",
- },
- ["cite"]={
- ["en"]="cite",
- },
- ["bbl"]={
- ["en"]="bbl",
- },
- ["bib"]={
- ["en"]="bib",
- },
- ["author"]={
- ["nl"]="auteur",
- ["en"]="author",
- ["de"]="autor",
- ["cs"]="autor",
- ["it"]="autore",
- ["ro"]="autor",
- ["fr"]="auteur",
+ ["Ordinal"]={
+ ["en"]="Ordinal",
},
["Addition"]={
["cs"]="Pridavek",
@@ -11608,6 +11670,9 @@ return {
["pe"]="جمع",
["ro"]="Adaugare",
},
+ ["Alphabetic"]={
+ ["en"]="Alphabetic",
+ },
["Balloon"]={
["cs"]="Bublinka",
["de"]="Ballon",
@@ -11618,6 +11683,26 @@ return {
["pe"]="بادکنک",
["ro"]="Balon",
},
+ ["Cap"]={
+ ["cs"]="Kap",
+ ["de"]="Kap",
+ ["en"]="Cap",
+ ["fr"]="Cap",
+ ["it"]="Cap",
+ ["nl"]="Kap",
+ ["pe"]="Cap",
+ ["ro"]="Cap",
+ },
+ ["Capital"]={
+ ["cs"]="Kapitalky",
+ ["de"]="Versalien",
+ ["en"]="Capital",
+ ["fr"]="Capitale",
+ ["it"]="Maiuscolo",
+ ["nl"]="Kapitaal",
+ ["pe"]="Capital",
+ ["ro"]="Majuscula",
+ },
["Character"]={
["cs"]="Pismeno",
["de"]="Buchstabe",
@@ -12198,16 +12283,6 @@ return {
["pe"]="WORDS",
["ro"]="CUVINTE",
},
- ["word"]={
- ["cs"]="slovo",
- ["de"]="wort",
- ["en"]="word",
- ["fr"]="mot",
- ["it"]="parola",
- ["nl"]="woord",
- ["pe"]="word",
- ["ro"]="cuvant",
- },
["Word"]={
["cs"]="Slovo",
["de"]="Wort",
@@ -12288,6 +12363,9 @@ return {
["pe"]="همه",
["ro"]="tot",
},
+ ["alphabetic"]={
+ ["en"]="alphabetic",
+ },
["always"]={
["cs"]="vzdy",
["de"]="immer",
@@ -12299,14 +12377,9 @@ return {
["ro"]="totdeauna",
},
["and"]={
- --["cs"]="",
["de"]="und",
["en"]="and",
- --["fr"]="",
- --["it"]="",
["nl"]="en",
- --["pe"]="",
- --["ro"]="",
},
["answerarea"]={
["cs"]="answerarea",
@@ -12348,9 +12421,15 @@ return {
["pe"]="آوریل",
["ro"]="aprilie",
},
- ["attachment"]={
- ["en"]="attachment",
- ["nl"]="aanhangsel",
+ ["atleftmargin"]={
+ ["cs"]="atleftmargin",
+ ["de"]="atleftmargin",
+ ["en"]="atleftmargin",
+ ["fr"]="atleftmargin",
+ ["it"]="atleftmargin",
+ ["nl"]="oplinkermarge",
+ ["pe"]="درحاشیه‌چپ",
+ ["ro"]="atleftmargin",
},
["atmargin"]={
["cs"]="naokraji",
@@ -12372,6 +12451,20 @@ return {
["pe"]="درصÙحه",
["ro"]="lapagina",
},
+ ["atrightmargin"]={
+ ["cs"]="atrightmargin",
+ ["de"]="atrightmargin",
+ ["en"]="atrightmargin",
+ ["fr"]="atrightmargin",
+ ["it"]="atrightmargin",
+ ["nl"]="oprechtermarge",
+ ["pe"]="درحاشیه‌راست",
+ ["ro"]="atrightmargin",
+ },
+ ["attachment"]={
+ ["en"]="attachment",
+ ["nl"]="aanhangsel",
+ },
["august"]={
["cs"]="srpen",
["de"]="august",
@@ -12382,6 +12475,15 @@ return {
["pe"]="آگوست",
["ro"]="august",
},
+ ["author"]={
+ ["cs"]="autor",
+ ["de"]="autor",
+ ["en"]="author",
+ ["fr"]="auteur",
+ ["it"]="autore",
+ ["nl"]="auteur",
+ ["ro"]="autor",
+ },
["auto"]={
["cs"]="auto",
["de"]="auto",
@@ -12402,6 +12504,9 @@ return {
["pe"]="پیشگÙتارخودکار",
["ro"]="autointro",
},
+ ["autopunctuation"]={
+ ["en"]="autopunctuation",
+ },
["back"]={
["cs"]="zpet",
["de"]="zurueck",
@@ -12462,6 +12567,9 @@ return {
["pe"]="عقب‌گرد",
["ro"]="inapoi",
},
+ ["bbl"]={
+ ["en"]="bbl",
+ },
["before"]={
["cs"]="pred",
["de"]="vor",
@@ -12472,6 +12580,13 @@ return {
["pe"]="قبل‌از",
["ro"]="inainte",
},
+ ["begin"]={
+ ["en"]="begin",
+ ["nl"]="begin",
+ },
+ ["bib"]={
+ ["en"]="bib",
+ },
["big"]={
["cs"]="velke",
["de"]="gross",
@@ -12492,6 +12607,10 @@ return {
["pe"]="قلم‌بدنه‌بزرگ",
["ro"]="bigbodyfont",
},
+ ["bigger"]={
+ ["en"]="bigger",
+ ["nl"]="groter",
+ },
["bigpreference"]={
["cs"]="vysokapriorita",
["de"]="grosszuegig",
@@ -12512,6 +12631,9 @@ return {
["pe"]="خالی",
["ro"]="blank",
},
+ ["block"]={
+ ["en"]="block",
+ },
["blockquote"]={
["cs"]="blockquote",
["de"]="blockquote",
@@ -12592,6 +12714,9 @@ return {
["pe"]="هردو",
["ro"]="ambele",
},
+ ["bothtext"]={
+ ["en"]="bothtext",
+ },
["bottom"]={
["cs"]="spodek",
["de"]="unten",
@@ -12602,6 +12727,9 @@ return {
["pe"]="پایین",
["ro"]="subsol",
},
+ ["box"]={
+ ["en"]="box",
+ },
["brief"]={
["cs"]="brief",
["de"]="brief",
@@ -12652,6 +12780,9 @@ return {
["pe"]="خوشنویسی",
["ro"]="caligrafic",
},
+ ["camel"]={
+ ["en"]="camel",
+ },
["cap"]={
["cs"]="kap",
["de"]="kap",
@@ -12662,16 +12793,6 @@ return {
["pe"]="cap",
["ro"]="cap",
},
- ["Cap"]={
- ["cs"]="Kap",
- ["de"]="Kap",
- ["en"]="Cap",
- ["fr"]="Cap",
- ["it"]="Cap",
- ["nl"]="Kap",
- ["pe"]="Cap",
- ["ro"]="Cap",
- },
["capital"]={
["cs"]="kapitalky",
["de"]="versalien",
@@ -12682,16 +12803,6 @@ return {
["pe"]="capital",
["ro"]="majuscula",
},
- ["Capital"]={
- ["cs"]="Kapitalky",
- ["de"]="Versalien",
- ["en"]="Capital",
- ["fr"]="Capitale",
- ["it"]="Maiuscolo",
- ["nl"]="Kapitaal",
- ["pe"]="Capital",
- ["ro"]="Majuscula",
- },
["center"]={
["cs"]="center",
["de"]="center",
@@ -12702,6 +12813,9 @@ return {
["pe"]="مرکز",
["ro"]="center",
},
+ ["centerlast"]={
+ ["en"]="centerlast",
+ },
["chapter"]={
["cs"]="kapitola",
["de"]="kapitel",
@@ -12732,10 +12846,19 @@ return {
["pe"]="حرÙها",
["ro"]="caractere",
},
+ ["chemical"]={
+ ["en"]="chemical",
+ },
+ ["chemicals"]={
+ ["en"]="chemicals",
+ },
["chemistry"]={
["en"]="chemistry",
["nl"]="chemie",
},
+ ["cite"]={
+ ["en"]="cite",
+ },
["color"]={
["cs"]="barevne",
["de"]="farbe",
@@ -12766,6 +12889,9 @@ return {
["pe"]="ستونها",
["ro"]="coloane",
},
+ ["combination"]={
+ ["en"]="combination",
+ },
["command"]={
["cs"]="prikaz",
["de"]="befehl",
@@ -12806,6 +12932,9 @@ return {
["pe"]="مولÙÙ‡",
["ro"]="componenta",
},
+ ["compressseparator"]={
+ ["en"]="compressseparator",
+ },
["concept"]={
["cs"]="koncept",
["de"]="konzept",
@@ -12816,6 +12945,9 @@ return {
["pe"]="Ù…Ùهوم",
["ro"]="concept",
},
+ ["construction"]={
+ ["en"]="construction",
+ },
["content"]={
["cs"]="obsah",
["de"]="inhalt",
@@ -12890,6 +13022,9 @@ return {
["pe"]="Ùضای‌برش",
["ro"]="cutspace",
},
+ ["dataset"]={
+ ["en"]="dataset",
+ },
["date"]={
["cs"]="datum",
["de"]="datum",
@@ -12990,6 +13125,10 @@ return {
["pe"]="دورو",
["ro"]="douafete",
},
+ ["down"]={
+ ["en"]="down",
+ ["nl"]="omlaag",
+ },
["each"]={
["cs"]="kazdy",
["de"]="jede",
@@ -13010,6 +13149,10 @@ return {
["pe"]="لبه",
["ro"]="bordura",
},
+ ["embed"]={
+ ["en"]="embed",
+ ["nl"]="sluitin",
+ },
["empty"]={
["cs"]="prazdne",
["de"]="leer",
@@ -13020,6 +13163,10 @@ return {
["pe"]="تهی",
["ro"]="gol",
},
+ ["end"]={
+ ["en"]="end",
+ ["nl"]="eind",
+ },
["endnote"]={
["cs"]="endnote",
["de"]="endnote",
@@ -13060,6 +13207,9 @@ return {
["pe"]="زوج",
["ro"]="par",
},
+ ["export"]={
+ ["en"]="export",
+ },
["external"]={
["cs"]="externi",
["de"]="extern",
@@ -13070,6 +13220,9 @@ return {
["pe"]="خارجی",
["ro"]="extern",
},
+ ["extremestretch"]={
+ ["en"]="extremestretch",
+ },
["fact"]={
["cs"]="fakt",
["de"]="gegeben",
@@ -13190,6 +13343,46 @@ return {
["pe"]="پنج",
["ro"]="cinci",
},
+ ["six"]={
+ ["cs"]="six",
+ ["de"]="sechs",
+ ["en"]="six",
+ ["fr"]="six",
+ ["it"]="six",
+ ["nl"]="zes",
+ ["pe"]="six",
+ ["ro"]="six",
+ },
+ ["seven"]={
+ ["cs"]="seven",
+ ["de"]="sieben",
+ ["en"]="seven",
+ ["fr"]="seven",
+ ["it"]="seven",
+ ["nl"]="zeven",
+ ["pe"]="seven",
+ ["ro"]="seven",
+ },
+ ["eight"]={
+ ["cs"]="eight",
+ ["de"]="acht",
+ ["en"]="eight",
+ ["fr"]="eight",
+ ["it"]="eight",
+ ["nl"]="acht",
+ ["pe"]="eight",
+ ["ro"]="eight",
+ },
+ ["nine"]={
+ ["cs"]="nine",
+ ["de"]="neun",
+ ["en"]="nine",
+ ["fr"]="nine",
+ ["it"]="nine",
+ ["nl"]="negen",
+ ["pe"]="nine",
+ ["ro"]="nine",
+ },
["fix"]={
["cs"]="fixuj",
["de"]="stellewiederher",
@@ -13270,6 +13463,10 @@ return {
["pe"]="پمپ‌راست",
["ro"]="flushright",
},
+ ["followingpage"]={
+ ["en"]="followingpage",
+ ["nl"]="opvolgendepagina",
+ },
["footer"]={
["cs"]="upati",
["de"]="fusszeile",
@@ -13410,6 +13607,16 @@ return {
["pe"]="پیش‌قسمت",
["ro"]="prolog",
},
+ ["fullhz"]={
+ ["cs"]="fullhz",
+ ["de"]="fullhz",
+ ["en"]="fullhz",
+ ["fr"]="fullhz",
+ ["it"]="fullhz",
+ ["nl"]="fullenhz",
+ ["pe"]="fullhz",
+ ["ro"]="fullhz",
+ },
["global"]={
["cs"]="globalne",
["de"]="global",
@@ -13480,10 +13687,6 @@ return {
["pe"]="نیم‌خط",
["ro"]="jumatatelinie",
},
- ["quarterline"]={
- ["en"]="quarterline",
- ["nl"]="kwartregel",
- },
["handwritten"]={
["cs"]="rukopisne",
["de"]="handschrift",
@@ -13694,8 +13897,24 @@ return {
["pe"]="ارث‌بردن",
["ro"]="inherit",
},
+ ["ininner"]={
+ ["cs"]="ininner",
+ ["de"]="ininner",
+ ["en"]="ininner",
+ ["fr"]="ininner",
+ ["it"]="ininner",
+ ["nl"]="inbinnen",
+ ["pe"]="درداخلی",
+ ["ro"]="ininner",
+ },
+ ["ininneredge"]={
+ ["en"]="ininneredge",
+ },
+ ["ininnermargin"]={
+ ["en"]="ininnermargin",
+ },
["inleft"]={
- ["cs"]="vlevo",
+ ["cs"]="ivlevo",
["de"]="imlinken",
["en"]="inleft",
["fr"]="dansgauche",
@@ -13704,6 +13923,29 @@ return {
["pe"]="درون‌چپ",
["ro"]="instanga",
},
+ ["inleftedge"]={
+ ["cs"]="nalevo",
+ ["de"]="imlinkenrand",
+ ["en"]="inleftedge",
+ ["fr"]="dansbordgauche",
+ ["it"]="inlatosinistro",
+ ["nl"]="inlinkerrand",
+ ["pe"]="درلبه‌چپ",
+ ["ro"]="inparteastanga",
+ },
+ ["inleftmargin"]={
+ ["cs"]="nalevyokraj",
+ ["de"]="inlinkermarginale",
+ ["en"]="inleftmargin",
+ ["fr"]="dansmargegauche",
+ ["it"]="inmarginesinistro",
+ ["nl"]="inlinkermarge",
+ ["pe"]="درحاشیه‌چپ",
+ ["ro"]="inmargineastanga",
+ },
+ ["inline"]={
+ ["en"]="inline",
+ },
["inmargin"]={
["cs"]="naokraji",
["de"]="imrand",
@@ -13744,8 +13986,34 @@ return {
["pe"]="حاشیه‌داخلی",
["ro"]="innermargin",
},
+ ["inother"]={
+ ["cs"]="inother",
+ ["de"]="inother",
+ ["en"]="inother",
+ ["fr"]="inother",
+ ["it"]="inother",
+ ["nl"]="inandere",
+ ["pe"]="inother",
+ ["ro"]="inother",
+ },
+ ["inouter"]={
+ ["cs"]="inouter",
+ ["de"]="inouter",
+ ["en"]="inouter",
+ ["fr"]="inouter",
+ ["it"]="inouter",
+ ["nl"]="inbuiten",
+ ["pe"]="درخارجی",
+ ["ro"]="inouter",
+ },
+ ["inouteredge"]={
+ ["en"]="inouteredge",
+ },
+ ["inoutermargin"]={
+ ["en"]="inoutermargin",
+ },
["inright"]={
- ["cs"]="vpravo",
+ ["cs"]="ivpravo",
["de"]="imrechten",
["en"]="inright",
["fr"]="dansdroit",
@@ -13754,6 +14022,29 @@ return {
["pe"]="درون‌راست",
["ro"]="indreapta",
},
+ ["inrightedge"]={
+ ["cs"]="napravo",
+ ["de"]="imrechtenrand",
+ ["en"]="inrightedge",
+ ["fr"]="dansborddroit",
+ ["it"]="inlatodestro",
+ ["nl"]="inrechterrand",
+ ["pe"]="درلبه‌راست",
+ ["ro"]="inparteadreapta",
+ },
+ ["inrightmargin"]={
+ ["cs"]="napravyokraj",
+ ["de"]="inrechtermarginale",
+ ["en"]="inrightmargin",
+ ["fr"]="dansmargedroite",
+ ["it"]="inmarginedestro",
+ ["nl"]="inrechtermarge",
+ ["pe"]="درحاشیه‌راست",
+ ["ro"]="inmargineadreapta",
+ },
+ ["integral"]={
+ ["en"]="integral",
+ },
["interaction"]={
["cs"]="interakce",
["de"]="interaktion",
@@ -13774,6 +14065,9 @@ return {
["pe"]="منوی‌پانل",
["ro"]="meniuinteractiune",
},
+ ["interactive"]={
+ ["en"]="interactive",
+ },
["intermezzi"]={
["cs"]="intermezzi",
["de"]="intermezzi",
@@ -13914,6 +14208,9 @@ return {
["pe"]="نگهدار",
["ro"]="mentine",
},
+ ["kerncharacters"]={
+ ["en"]="kerncharacters",
+ },
["knockout"]={
["cs"]="knockout",
["de"]="knockout",
@@ -14074,6 +14371,10 @@ return {
["pe"]="راهنما",
["ro"]="legenda",
},
+ ["less"]={
+ ["en"]="less",
+ ["nl"]="minder",
+ },
["lesshyphenation"]={
["cs"]="lesshyphenation",
["de"]="lesshyphenation",
@@ -14084,6 +14385,9 @@ return {
["pe"]="شکست‌کلمات‌کمتر",
["ro"]="lesshyphenation",
},
+ ["letterspacing"]={
+ ["en"]="letterspacing",
+ },
["line"]={
["cs"]="radek",
["de"]="zeile",
@@ -14174,6 +14478,9 @@ return {
["pe"]="پابا",
["ro"]="lohi",
},
+ ["long"]={
+ ["en"]="long",
+ },
["loose"]={
["cs"]="uvolnene",
["de"]="lose",
@@ -14254,6 +14561,16 @@ return {
["pe"]="لبه‌حاشیه",
["ro"]="marginebordura",
},
+ ["margintext"]={
+ ["cs"]="marginalnitext",
+ ["de"]="marginaltext",
+ ["en"]="margintext",
+ ["fr"]="textemarge",
+ ["it"]="testoinmargine",
+ ["nl"]="margetekst",
+ ["pe"]="متن‌حاشیه",
+ ["ro"]="textmarginal",
+ },
["margintitle"]={
["cs"]="titulmarginalie",
["de"]="marginaltitel",
@@ -14274,15 +14591,8 @@ return {
["pe"]="نشانه‌گذاری",
["ro"]="marcaje",
},
- ["mathematics"]={
- ["cs"]="mathematika",
- ["de"]="mathematik",
- ["en"]="mathematics",
- ["fr"]="mathematique",
- ["it"]="matematica",
- ["nl"]="wiskunde",
- ["pe"]="ریاضی",
- ["ro"]="matematica",
+ ["math"]={
+ ["en"]="math",
},
["mathalignment"]={
["cs"]="mathalignment",
@@ -14304,6 +14614,16 @@ return {
["pe"]="حالتهای‌ریاضی",
["ro"]="mathcases",
},
+ ["mathematics"]={
+ ["cs"]="mathematika",
+ ["de"]="mathematik",
+ ["en"]="mathematics",
+ ["fr"]="mathematique",
+ ["it"]="matematica",
+ ["nl"]="wiskunde",
+ ["pe"]="ریاضی",
+ ["ro"]="matematica",
+ },
["mathmatrix"]={
["cs"]="mathmatrix",
["de"]="mathmatrix",
@@ -14324,6 +14644,18 @@ return {
["pe"]="بیشترین",
["ro"]="max",
},
+ ["maxdepth"]={
+ ["en"]="maxdepth",
+ ["nl"]="maxdiepte",
+ },
+ ["maxheight"]={
+ ["en"]="maxheight",
+ ["nl"]="maxhoogte",
+ },
+ ["maxwidth"]={
+ ["en"]="maxwidth",
+ ["nl"]="maxbreedte",
+ },
["may"]={
["cs"]="kveten",
["de"]="mai",
@@ -14374,6 +14706,10 @@ return {
["pe"]="کمترین",
["ro"]="min",
},
+ ["mindepth"]={
+ ["en"]="mindepth",
+ ["nl"]="mindiepte",
+ },
["minheight"]={
["cs"]="minvyska",
["de"]="minhoehe",
@@ -14404,6 +14740,9 @@ return {
["pe"]="منعکس",
["ro"]="oglindit",
},
+ ["mixed"]={
+ ["en"]="mixed",
+ },
["monday"]={
["cs"]="pondeli",
["de"]="montag",
@@ -14434,6 +14773,9 @@ return {
["pe"]="monobold",
["ro"]="monoaldin",
},
+ ["mononormal"]={
+ ["en"]="mononormal",
+ },
["month"]={
["cs"]="mesic",
["de"]="monat",
@@ -14444,6 +14786,10 @@ return {
["pe"]="ماه",
["ro"]="luna",
},
+ ["more"]={
+ ["en"]="more",
+ ["nl"]="meer",
+ },
["morehyphenation"]={
["cs"]="morehyphenation",
["de"]="morehyphenation",
@@ -14574,6 +14920,9 @@ return {
["pe"]="بدون‌بررسی",
["ro"]="nocheck",
},
+ ["nodepth"]={
+ ["en"]="nodepth",
+ },
["nofit"]={
["cs"]="nofit",
["de"]="nofit",
@@ -14594,6 +14943,9 @@ return {
["pe"]="بدون‌توری",
["ro"]="nogrid",
},
+ ["noheight"]={
+ ["en"]="noheight",
+ },
["nohz"]={
["cs"]="nohz",
["de"]="nohz",
@@ -14604,6 +14956,9 @@ return {
["pe"]="nohz",
["ro"]="nohz",
},
+ ["noline"]={
+ ["en"]="noline",
+ },
["nomarking"]={
["cs"]="zadneznaceni",
["de"]="keinebeschriftung",
@@ -14634,6 +14989,9 @@ return {
["pe"]="بدون‌شماره",
["ro"]="nonumber",
},
+ ["norepeat"]={
+ ["en"]="norepeat",
+ },
["normal"]={
["cs"]="normalni",
["de"]="normal",
@@ -14664,6 +15022,9 @@ return {
["pe"]="بدون",
["ro"]="nu",
},
+ ["notation"]={
+ ["en"]="notation",
+ },
["note"]={
["en"]="note",
},
@@ -14787,6 +15148,9 @@ return {
["pe"]="قدیمی",
["ro"]="old",
},
+ ["oldstyle"]={
+ ["en"]="oldstyle",
+ },
["on"]={
["cs"]="zap",
["de"]="an",
@@ -14847,6 +15211,26 @@ return {
["pe"]="حاشیه‌خارجی",
["ro"]="outermargin",
},
+ ["overbar"]={
+ ["cs"]="nadtrzeno",
+ ["de"]="ueberstrichen",
+ ["en"]="overbar",
+ ["fr"]="overbar",
+ ["it"]="sopralinea",
+ ["nl"]="overstreep",
+ ["pe"]="میله‌رو",
+ ["ro"]="barasus",
+ },
+ ["overbars"]={
+ ["cs"]="nadtrzeni",
+ ["de"]="ueberstreichen",
+ ["en"]="overbars",
+ ["fr"]="overbars",
+ ["it"]="sopralinee",
+ ["nl"]="overstrepen",
+ ["pe"]="میله‌ها‌رو",
+ ["ro"]="supralinie",
+ },
["overlay"]={
["cs"]="prekryv",
["de"]="overlay",
@@ -14867,6 +15251,26 @@ return {
["pe"]="overprint",
["ro"]="overprint",
},
+ ["overstrike"]={
+ ["cs"]="preskrtnuto",
+ ["de"]="durchgestrichen",
+ ["en"]="overstrike",
+ ["fr"]="surlignetout",
+ ["it"]="sbarrato",
+ ["nl"]="doorstreep",
+ ["pe"]="خط‌زدن",
+ ["ro"]="liniepeste",
+ },
+ ["overstrikes"]={
+ ["cs"]="preskrtnuti",
+ ["de"]="durchstreichen",
+ ["en"]="overstrikes",
+ ["fr"]="surligne",
+ ["it"]="sbarrati",
+ ["nl"]="doorstrepen",
+ ["pe"]="خط‌زدنها",
+ ["ro"]="liniipeste",
+ },
["packed"]={
["cs"]="zhustene",
["de"]="gepackt",
@@ -14967,6 +15371,10 @@ return {
["pe"]="پست‌اسکریپت",
["ro"]="postscript",
},
+ ["precedingpage"]={
+ ["en"]="followingpage",
+ ["nl"]="voorafgaandepagina",
+ },
["preference"]={
["cs"]="nastaveni",
["de"]="einstellung",
@@ -15039,7 +15447,7 @@ return {
},
["print"]={
["en"]="print",
- ["nl"]="print", -- afdruk
+ ["nl"]="print",
},
["printable"]={
["cs"]="tisknutelne",
@@ -15047,7 +15455,7 @@ return {
["en"]="printable",
["fr"]="editable",
["it"]="stampabile",
- ["nl"]="printbaar", -- afdrukbaar
+ ["nl"]="printbaar",
["pe"]="قابل‌چاپ",
["ro"]="tiparibil",
},
@@ -15111,6 +15519,10 @@ return {
["pe"]="quadruple",
["ro"]="cvadrupul",
},
+ ["quarterline"]={
+ ["en"]="quarterline",
+ ["nl"]="kwartregel",
+ },
["quotation"]={
["cs"]="citace",
["de"]="zitat",
@@ -15171,16 +15583,6 @@ return {
["pe"]="چهارگوشه",
["ro"]="rectangular",
},
- ["referral"]={
- ["cs"]="znacka",
- ["de"]="merkmal",
- ["en"]="referral",
- ["fr"]="referral",
- ["it"]="referral",
- ["nl"]="kenmerk",
- ["pe"]="مراجعه",
- ["ro"]="referinta",
- },
["reference"]={
["cs"]="odkaz",
["de"]="referenz",
@@ -15191,6 +15593,16 @@ return {
["pe"]="مرجع",
["ro"]="referinta",
},
+ ["referral"]={
+ ["cs"]="znacka",
+ ["de"]="merkmal",
+ ["en"]="referral",
+ ["fr"]="referral",
+ ["it"]="referral",
+ ["nl"]="kenmerk",
+ ["pe"]="مراجعه",
+ ["ro"]="referinta",
+ },
["register"]={
["cs"]="rejstrik",
["de"]="register",
@@ -15431,6 +15843,9 @@ return {
["pe"]="مشکی‌سانز",
["ro"]="sansaldin",
},
+ ["sansnormal"]={
+ ["en"]="sansnormal",
+ },
["sansserif"]={
["cs"]="bezserifu",
["de"]="grotesk",
@@ -15501,6 +15916,9 @@ return {
["pe"]="ببینید",
["ro"]="vezi",
},
+ ["selectfont"]={
+ ["en"]="selectfont",
+ },
["september"]={
["cs"]="zari",
["de"]="september",
@@ -15521,6 +15939,12 @@ return {
["pe"]="سریÙ",
["ro"]="serif",
},
+ ["serifbold"]={
+ ["en"]="serifbold",
+ },
+ ["serifnormal"]={
+ ["en"]="serifnormal",
+ },
["serried"]={
["cs"]="semknuto",
["de"]="kleinerabstand",
@@ -15531,6 +15955,10 @@ return {
["pe"]="تنگ‌هم",
["ro"]="serried",
},
+ ["setups"]={
+ ["comment"]="no translations",
+ ["en"]="setups",
+ },
["sheet"]={
["cs"]="sheet",
["de"]="sheet",
@@ -15541,6 +15969,27 @@ return {
["pe"]="ورقه",
["ro"]="sheet",
},
+ ["shiftdown"]={
+ ["en"]="shiftdown",
+ },
+ ["shiftup"]={
+ ["en"]="shiftup",
+ },
+ ["short"]={
+ ["cs"]="short",
+ ["de"]="kurz",
+ ["en"]="short",
+ ["fr"]="short",
+ ["it"]="short",
+ ["nl"]="kort",
+ ["ro"]="short",
+ },
+ ["simplefonts"]={
+ ["en"]="simplefonts",
+ },
+ ["simplelist"]={
+ ["en"]="simplelist",
+ },
["singlesided"]={
["cs"]="jednostranne",
["de"]="einzelseitig",
@@ -15631,6 +16080,10 @@ return {
["pe"]="smallcaps",
["ro"]="majusculemici",
},
+ ["smaller"]={
+ ["en"]="smaller",
+ ["nl"]="kleiner",
+ },
["smallitalic"]={
["cs"]="malekurzivni",
["de"]="kleinitalic",
@@ -15711,6 +16164,9 @@ return {
["pe"]="مرتب",
["ro"]="sortat",
},
+ ["sorting"]={
+ ["en"]="sorting",
+ },
["space"]={
["cs"]="mezera",
["de"]="spatium",
@@ -15781,6 +16237,10 @@ return {
["pe"]="شروع",
["ro"]="start",
},
+ ["starter"]={
+ ["en"]="starter",
+ ["nl"]="opener",
+ },
["sticker"]={
["cs"]="sticker",
["de"]="sticker",
@@ -15811,10 +16271,6 @@ return {
["pe"]="ایست",
["ro"]="stopper",
},
- ["starter"]={
- ["en"]="starter",
- ["nl"]="opener",
- },
["stretch"]={
["cs"]="natahnout",
["de"]="strecken",
@@ -15825,6 +16281,9 @@ return {
["pe"]="بکش",
["ro"]="dilatat",
},
+ ["stretched"]={
+ ["en"]="stretched",
+ },
["strict"]={
["cs"]="striktni",
["de"]="streng",
@@ -16148,6 +16607,9 @@ return {
["pe"]="تطابق",
["ro"]="synchronize",
},
+ ["synonym"]={
+ ["en"]="synonym",
+ },
["system"]={
["cs"]="system",
["de"]="systeme",
@@ -16402,6 +16864,35 @@ return {
["pe"]="غیرموجود",
["ro"]="nedisponibil",
},
+ ["underbar"]={
+ ["cs"]="podtrzeno",
+ ["de"]="unterstrichen",
+ ["en"]="underbar",
+ ["fr"]="souslignetout",
+ ["it"]="sottolinea",
+ ["nl"]="onderstreep",
+ ["pe"]="میله‌زیر",
+ ["ro"]="sublinie",
+ },
+ ["underbars"]={
+ ["cs"]="podtrzeni",
+ ["de"]="unterstreichen",
+ ["en"]="underbars",
+ ["fr"]="sousligne",
+ ["it"]="sottolinee",
+ ["nl"]="onderstrepen",
+ ["pe"]="میله‌‌های‌زیر",
+ ["ro"]="sublinii",
+ },
+ ["understrike"]={
+ ["en"]="understrike",
+ },
+ ["understrikes"]={
+ ["en"]="understrikes",
+ },
+ ["unframed"]={
+ ["en"]="unframed",
+ },
["unit"]={
["cs"]="jednotka",
["de"]="einheit",
@@ -16442,6 +16933,10 @@ return {
["pe"]="غیرÙشرده",
["ro"]="despachetat",
},
+ ["up"]={
+ ["en"]="up",
+ ["nl"]="omhoog",
+ },
["url"]={
["cs"]="url",
["de"]="url",
@@ -16512,6 +17007,12 @@ return {
["pe"]="خیلی‌بردبار",
["ro"]="foartetolerant",
},
+ ["vfenced"]={
+ ["en"]="vfenced",
+ },
+ ["vulgarfraction"]={
+ ["en"]="vulgarfraction",
+ },
["weak"]={
["cs"]="weak",
["de"]="weak",
@@ -16582,6 +17083,19 @@ return {
["pe"]="عرض",
["ro"]="latime",
},
+ ["word"]={
+ ["cs"]="slovo",
+ ["de"]="wort",
+ ["en"]="word",
+ ["fr"]="mot",
+ ["it"]="parola",
+ ["nl"]="woord",
+ ["pe"]="word",
+ ["ro"]="cuvant",
+ },
+ ["words"]={
+ ["en"]="words",
+ },
["xml"]={
["cs"]="xml",
["de"]="xml",
@@ -16613,4 +17127,599 @@ return {
["ro"]="da",
},
},
+ ["setupstrings"]={
+ ["cd:buffer"]={
+ ["cs"]="buffer",
+ ["de"]="buffer",
+ ["en"]="buffer",
+ ["fr"]="buffer",
+ ["it"]="buffer",
+ ["nl"]="buffer",
+ ["ro"]="buffer",
+ },
+ ["cd:category"]={
+ ["cs"]="category",
+ ["de"]="category",
+ ["en"]="category",
+ ["fr"]="category",
+ ["it"]="category",
+ ["nl"]="category",
+ ["ro"]="category",
+ },
+ ["cd:character"]={
+ ["cs"]="character",
+ ["de"]="character",
+ ["en"]="character",
+ ["fr"]="character",
+ ["it"]="character",
+ ["nl"]="karakter",
+ ["ro"]="character",
+ },
+ ["cd:color"]={
+ ["cs"]="color",
+ ["de"]="color",
+ ["en"]="color",
+ ["fr"]="color",
+ ["it"]="color",
+ ["nl"]="kleur",
+ ["ro"]="color",
+ },
+ ["cd:column"]={
+ ["cs"]="column",
+ ["de"]="column",
+ ["en"]="column",
+ ["fr"]="column",
+ ["it"]="column",
+ ["nl"]="kolom",
+ ["ro"]="column",
+ },
+ ["cd:command"]={
+ ["cs"]="Befehl",
+ ["de"]="Befehl",
+ ["en"]="command",
+ ["fr"]="Befehl",
+ ["it"]="Befehl",
+ ["nl"]="commando",
+ ["ro"]="Befehl",
+ },
+ ["cd:content"]={
+ ["cs"]="content",
+ ["de"]="content",
+ ["en"]="content",
+ ["fr"]="content",
+ ["it"]="content",
+ ["nl"]="inhoud",
+ ["ro"]="content",
+ },
+ ["cd:csname"]={
+ ["cs"]="csname",
+ ["de"]="csname",
+ ["en"]="csname",
+ ["fr"]="csname",
+ ["it"]="csname",
+ ["nl"]="naam",
+ ["ro"]="csname",
+ },
+ ["cd:delimiter"]={
+ ["cs"]="delimiter",
+ ["de"]="delimiter",
+ ["en"]="delimiter",
+ ["fr"]="delimiter",
+ ["it"]="delimiter",
+ ["nl"]="delimiter",
+ ["ro"]="delimiter",
+ },
+ ["cd:destination"]={
+ ["cs"]="destination",
+ ["de"]="destination",
+ ["en"]="destination",
+ ["fr"]="destination",
+ ["it"]="destination",
+ ["nl"]="bestemming",
+ ["ro"]="destination",
+ },
+ ["cd:dimension"]={
+ ["cs"]="Dimension",
+ ["de"]="Dimension",
+ ["en"]="dimension",
+ ["fr"]="Dimension",
+ ["it"]="Dimension",
+ ["nl"]="maat",
+ ["ro"]="Dimension",
+ },
+ ["cd:displaymath"]={
+ ["cs"]="formula",
+ ["de"]="formula",
+ ["en"]="formula",
+ ["fr"]="formula",
+ ["it"]="formula",
+ ["nl"]="formule",
+ ["ro"]="formula",
+ },
+ ["cd:false"]={
+ ["cs"]="false",
+ ["de"]="false",
+ ["en"]="false",
+ ["fr"]="false",
+ ["it"]="false",
+ ["nl"]="false",
+ ["ro"]="false",
+ },
+ ["cd:file"]={
+ ["cs"]="file",
+ ["de"]="file",
+ ["en"]="file",
+ ["fr"]="file",
+ ["it"]="file",
+ ["nl"]="file",
+ ["ro"]="file",
+ },
+ ["cd:path"]={
+ ["cs"]="path",
+ ["de"]="path",
+ ["en"]="path",
+ ["fr"]="path",
+ ["it"]="path",
+ ["nl"]="path",
+ ["ro"]="path",
+ },
+ ["cd:first"]={
+ ["cs"]="first",
+ ["de"]="first",
+ ["en"]="first",
+ ["fr"]="first",
+ ["it"]="first",
+ ["nl"]="eerste",
+ ["ro"]="first",
+ },
+ ["cd:font"]={
+ ["cs"]="font",
+ ["de"]="font",
+ ["en"]="font",
+ ["fr"]="font",
+ ["it"]="font",
+ ["nl"]="font",
+ ["ro"]="font",
+ },
+ ["cd:formula"]={
+ ["cs"]="Formel",
+ ["de"]="Formel",
+ ["en"]="formula",
+ ["fr"]="Formel",
+ ["it"]="Formel",
+ ["nl"]="formule",
+ ["ro"]="Formel",
+ },
+ ["cd:identifier"]={
+ ["cs"]="Name",
+ ["de"]="Name",
+ ["en"]="identifier",
+ ["fr"]="Name",
+ ["it"]="Name",
+ ["nl"]="naam",
+ ["ro"]="Name",
+ },
+ ["cd:index"]={
+ ["cs"]="entry",
+ ["de"]="entry",
+ ["en"]="entry",
+ ["fr"]="entry",
+ ["it"]="entry",
+ ["nl"]="ingang",
+ ["ro"]="entry",
+ },
+ ["cd:inherits"]={
+ ["cs"]="inherits",
+ ["de"]="inherits",
+ ["en"]="inherits",
+ ["fr"]="inherits",
+ ["it"]="inherits",
+ ["nl"]="erft",
+ ["ro"]="inherits",
+ },
+ ["cd:key"]={
+ ["cs"]="key",
+ ["de"]="key",
+ ["en"]="key",
+ ["fr"]="key",
+ ["it"]="key",
+ ["nl"]="parameter",
+ ["ro"]="key",
+ },
+ ["cd:language"]={
+ ["cs"]="sprache",
+ ["de"]="sprache",
+ ["en"]="language",
+ ["fr"]="sprache",
+ ["it"]="sprache",
+ ["nl"]="taal",
+ ["ro"]="sprache",
+ },
+ ["cd:last"]={
+ ["cs"]="last",
+ ["de"]="last",
+ ["en"]="last",
+ ["fr"]="last",
+ ["it"]="last",
+ ["nl"]="laatste",
+ ["ro"]="last",
+ },
+ ["cd:list"]={
+ ["cs"]="Liste",
+ ["de"]="Liste",
+ ["en"]="list",
+ ["fr"]="Liste",
+ ["it"]="Liste",
+ ["nl"]="lijst",
+ ["ro"]="Liste",
+ },
+ ["cd:lpath"]={
+ ["cs"]="lpath",
+ ["de"]="lpath",
+ ["en"]="lpath",
+ ["fr"]="lpath",
+ ["it"]="lpath",
+ ["nl"]="lpath",
+ ["ro"]="lpath",
+ },
+ ["cd:luafunction"]={
+ ["cs"]="luafunction",
+ ["de"]="luafunction",
+ ["en"]="luafunction",
+ ["fr"]="luafunction",
+ ["it"]="luafunction",
+ ["nl"]="luafunction",
+ ["ro"]="luafunction",
+ },
+ ["cd:mark"]={
+ ["cs"]="Beschriftung",
+ ["de"]="Beschriftung",
+ ["en"]="mark",
+ ["fr"]="Beschriftung",
+ ["it"]="Beschriftung",
+ ["nl"]="markering",
+ ["ro"]="Beschriftung",
+ },
+ ["cd:marking"]={
+ ["cs"]="marking",
+ ["de"]="marking",
+ ["en"]="marking",
+ ["fr"]="marking",
+ ["it"]="marking",
+ ["nl"]="markering",
+ ["ro"]="marking",
+ },
+ ["cd:math"]={
+ ["cs"]="formula",
+ ["de"]="formula",
+ ["en"]="formula",
+ ["fr"]="formula",
+ ["it"]="formula",
+ ["nl"]="formule",
+ ["ro"]="formula",
+ },
+ ["cd:matrix"]={
+ ["cs"]="n*m",
+ ["de"]="n*m",
+ ["en"]="n*m",
+ ["fr"]="n*m",
+ ["it"]="n*m",
+ ["nl"]="n*m",
+ ["ro"]="n*m",
+ },
+ ["cd:name"]={
+ ["cs"]="Name",
+ ["de"]="Name",
+ ["en"]="name",
+ ["fr"]="Name",
+ ["it"]="Name",
+ ["nl"]="naam",
+ ["ro"]="Name",
+ },
+ ["cd:node"]={
+ ["cs"]="node",
+ ["de"]="node",
+ ["en"]="node",
+ ["fr"]="node",
+ ["it"]="node",
+ ["nl"]="node",
+ ["ro"]="node",
+ },
+ ["cd:nothing"]={
+ ["cs"]="empty",
+ ["de"]="empty",
+ ["en"]="empty",
+ ["fr"]="empty",
+ ["it"]="empty",
+ ["nl"]="leeg",
+ ["ro"]="empty",
+ },
+ ["cd:number"]={
+ ["cs"]="Nummer",
+ ["de"]="Nummer",
+ ["en"]="number",
+ ["fr"]="Nummer",
+ ["it"]="Nummer",
+ ["nl"]="getal",
+ ["ro"]="Nummer",
+ },
+ ["cd:optional"]={
+ ["cs"]="opt",
+ ["de"]="opt",
+ ["en"]="opt",
+ ["fr"]="opt",
+ ["it"]="opt",
+ ["nl"]="opt",
+ ["ro"]="opt",
+ },
+ ["cd:plural"]={
+ ["cs"]="plural",
+ ["de"]="plural",
+ ["en"]="plural",
+ ["fr"]="plural",
+ ["it"]="plural",
+ ["nl"]="naam",
+ ["ro"]="plural",
+ },
+ ["cd:position"]={
+ ["cs"]="position",
+ ["de"]="position",
+ ["en"]="position",
+ ["fr"]="position",
+ ["it"]="position",
+ ["nl"]="positie",
+ ["ro"]="position",
+ },
+ ["cd:processor"]={
+ ["cs"]="processor",
+ ["de"]="processor",
+ ["en"]="processor",
+ ["fr"]="processor",
+ ["it"]="processor",
+ ["nl"]="verwerker",
+ ["ro"]="processor",
+ },
+ ["cd:reference"]={
+ ["cs"]="reference",
+ ["de"]="reference",
+ ["en"]="reference",
+ ["fr"]="reference",
+ ["it"]="reference",
+ ["nl"]="verwijzing",
+ ["ro"]="reference",
+ },
+ ["cd:row"]={
+ ["cs"]="row",
+ ["de"]="row",
+ ["en"]="row",
+ ["fr"]="row",
+ ["it"]="row",
+ ["nl"]="rij",
+ ["ro"]="row",
+ },
+ ["cd:section"]={
+ ["cs"]="Abschnitt",
+ ["de"]="Abschnitt",
+ ["en"]="section",
+ ["fr"]="Abschnitt",
+ ["it"]="Abschnitt",
+ ["nl"]="sectie",
+ ["ro"]="Abschnitt",
+ },
+ ["cd:sectionblock"]={
+ ["cs"]="sectionblock",
+ ["de"]="sectionblock",
+ ["en"]="sectionblock",
+ ["fr"]="sectionblock",
+ ["it"]="sectionblock",
+ ["nl"]="sectieblok",
+ ["ro"]="sectionblock",
+ },
+ ["cd:see"]={
+ ["cs"]="siehe",
+ ["de"]="siehe",
+ ["en"]="see",
+ ["fr"]="siehe",
+ ["it"]="siehe",
+ ["nl"]="zie",
+ ["ro"]="siehe",
+ },
+ ["cd:setup"]={
+ ["cs"]="setup",
+ ["de"]="setup",
+ ["en"]="setup",
+ ["fr"]="setup",
+ ["it"]="setup",
+ ["nl"]="setup",
+ ["ro"]="setup",
+ },
+ ["cd:singular"]={
+ ["cs"]="singular",
+ ["de"]="singular",
+ ["en"]="singular",
+ ["fr"]="singular",
+ ["it"]="singular",
+ ["nl"]="naam",
+ ["ro"]="singular",
+ },
+ ["cd:style"]={
+ ["cs"]="style",
+ ["de"]="style",
+ ["en"]="style",
+ ["fr"]="style",
+ ["it"]="style",
+ ["nl"]="letter",
+ ["ro"]="style",
+ },
+ ["cd:template"]={
+ ["cs"]="template",
+ ["de"]="template",
+ ["en"]="template",
+ ["fr"]="template",
+ ["it"]="template",
+ ["nl"]="sjabloon",
+ ["ro"]="template",
+ },
+ ["cd:text"]={
+ ["cs"]="Text",
+ ["de"]="Text",
+ ["en"]="text",
+ ["fr"]="Text",
+ ["it"]="Text",
+ ["nl"]="tekst",
+ ["ro"]="Text",
+ },
+ ["cd:title"]={
+ ["cs"]="Setup",
+ ["de"]="Setup",
+ ["en"]="setup",
+ ["fr"]="Setup",
+ ["it"]="Setup",
+ ["nl"]="setup",
+ ["ro"]="Setup",
+ },
+ ["cd:triplet"]={
+ ["cs"]="triplet",
+ ["de"]="triplet",
+ ["en"]="triplet",
+ ["fr"]="triplet",
+ ["it"]="triplet",
+ ["nl"]="triplet",
+ ["ro"]="triplet",
+ },
+ ["cd:true"]={
+ ["cs"]="true",
+ ["de"]="true",
+ ["en"]="true",
+ ["fr"]="true",
+ ["it"]="true",
+ ["nl"]="true",
+ ["ro"]="true",
+ },
+ ["cd:url"]={
+ ["cs"]="url",
+ ["de"]="url",
+ ["en"]="url",
+ ["fr"]="url",
+ ["it"]="url",
+ ["nl"]="url",
+ ["ro"]="url",
+ },
+ ["cd:userdata"]={
+ ["cs"]="userdata",
+ ["de"]="userdata",
+ ["en"]="userdata",
+ ["fr"]="userdata",
+ ["it"]="userdata",
+ ["nl"]="gebruikersdata",
+ ["ro"]="userdata",
+ },
+ ["cd:value"]={
+ ["cs"]="value",
+ ["de"]="value",
+ ["en"]="value",
+ ["fr"]="value",
+ ["it"]="value",
+ ["nl"]="waarde",
+ ["ro"]="value",
+ },
+ ["cd:word"]={
+ ["cs"]="word",
+ ["de"]="word",
+ ["en"]="word",
+ ["fr"]="word",
+ ["it"]="word",
+ ["nl"]="woord",
+ ["ro"]="word",
+ },
+ ["cd:xmlsetup"]={
+ ["cs"]="xmlsetup",
+ ["de"]="xmlsetup",
+ ["en"]="xmlsetup",
+ ["fr"]="xmlsetup",
+ ["it"]="xmlsetup",
+ ["nl"]="xmlsetup",
+ ["ro"]="xmlsetup",
+ },
+ ["cd:sign-s"] = { en = "[-+]" },
+ ["cd:sign-l"] = { en = "[-+]" },
+ ["cd:csname-s"] = { en = "\\..." },
+ ["cd:csname-l"] = { en = "\\..." },
+ ["cd:noargument-s"] = { en = "\\..." },
+ ["cd:noargument-l"] = { en = "\\..." },
+ ["cd:oneargument-s"] = { en = "\\...#1" },
+ ["cd:oneargument-l"] = { en = "\\...#1" },
+ ["cd:twoarguments-s"] = { en = "\\...#1#2" },
+ ["cd:twoarguments-l"] = { en = "\\...#1#2" },
+ ["cd:threearguments-s"] = { en = "\\...#1#2#3" },
+ ["cd:threearguments-l"] = { en = "\\...#1#2#3" },
+ ["cd:braces-s"] = { en = "{...}", lua = '"..."' },
+ ["cd:braces-l"] = { en = "{...,...}", lua = '".. ... .."' },
+ ["cd:brackets-s"] = { en = "[...]", lua = "{ ... }" },
+ ["cd:brackets-l"] = { en = "[...,...]", lua = "{..., ...}" },
+ ["cd:index-s"] = { en = "[...]" },
+ ["cd:index-l"] = { en = "[..+...+..]" },
+ ["cd:math-s"] = { en = "$...$" },
+ ["cd:math-l"] = { en = "$...$" },
+ ["cd:inlinemath-s"] = { en = "$...$" },
+ ["cd:inlinemath-l"] = { en = "$...$" },
+ ["cd:displaymath-s"] = { en = "$$...$$" },
+ ["cd:displaymath-l"] = { en = "$$...$$" },
+ ["cd:template-s"] = { en = "[|...|]" },
+ ["cd:template-l"] = { en = "[|...|...|]" },
+ ["cd:twowords-s"] = { en = "[..+..]" },
+ ["cd:twowords-l"] = { en = "[..+..]" },
+ ["cd:threewords-s"] = { en = "[..+..+..]" },
+ ["cd:threewords-l"] = { en = "[..+..+..]" },
+ ["cd:angle-s"] = { en = "<<...>>" },
+ ["cd:angle-l"] = { en = "<<...>>" },
+ ["cd:reference-s"] = { en = "[...]", lua = "{ ... }" },
+ ["cd:reference-l"] = { en = "[...,...]", lua = "{..., ...}" },
+ ["cd:position-s"] = { en = "(...)" },
+ ["cd:position-l"] = { en = "(...,...)" },
+ ["cd:triplet-s"] = { en = "[x:y:z]" },
+ ["cd:triplet-l"] = { en = "[x:y:z,..]" },
+ ["cd:word-s"] = { en = "{...}", lua = '"..."' },
+ ["cd:word-l"] = { en = "{.. ... ..}", lua = '".. ... .."' },
+ ["cd:content-s"] = { en = "{...}", lua = '"..."' },
+ ["cd:content-l"] = { en = "{.. ... ..}", lua = '".. ... .."' },
+ ["cd:textual-s"] = { en = "..." },
+ ["cd:textual-l"] = { en = ".. ... .." },
+ ["cd:none-s"] = { en = "..." },
+ ["cd:none-l"] = { en = ".. ... .." },
+ ["cd:macro-s"] = { en = "\\... " },
+ ["cd:macro-l"] = { en = "\\... " },
+ ["cd:to-s"] = { en = "\\to " },
+ ["cd:to-l"] = { en = "\\to " },
+ ["cd:destination-s"] = { en = "[{..[ref]}]" },
+ ["cd:destination-l"] = { en = "[..,{..[ref,..]},..]" },
+ ["cd:nothing-s"] = { en = "..." },
+ ["cd:nothing-l"] = { en = "..." },
+ ["cd:file-s"] = { en = " ... " },
+ ["cd:file-l"] = { en = " ... " },
+ ["cd:assignment-s"] = { en = "[..=..]", lua = "{ ..=.. } " },
+ ["cd:assignment-l"] = { en = "[..,..=..,..]", lua = "{ ..,..=..,.. } " },
+ ["cd:assignmentbraces-s"] = { en = "{..=..}" },
+ ["cd:assignmentbraces-l"] = { en = "{..,..=..,..}" },
+ ["cd:assignmentbrackets-s"] = { en = "[..=..]", lua = "{ ..=.. } " },
+ ["cd:assignmentbrackets-l"] = { en = "[..,..=..,..]", lua = "{ ..,..=..,.. } " },
+ ["cd:assignmentparentheses-s"] = { en = "(..=..)" },
+ ["cd:assignmentparentheses-l"] = { en = "(..,..=..,..)" },
+ ["cd:apply-s"] = { en = "[..=>..]" },
+ ["cd:apply-l"] = { en = "[..,..=>..,..]" },
+ ["cd:if-s"] = { en = "\\if... " },
+ ["cd:if-l"] = { en = "\\if... " },
+ ["cd:case-s"] = { en = "\\case " },
+ ["cd:case-l"] = { en = "\\case " },
+ ["cd:else-s"] = { en = "\\else " },
+ ["cd:else-l"] = { en = "\\else " },
+ ["cd:or-s"] = { en = "\\or " },
+ ["cd:or-l"] = { en = "\\or " },
+ ["cd:fi-s"] = { en = "\\fi " },
+ ["cd:fi-l"] = { en = "\\fi " },
+ ["cd:par-s"] = { en = "\\par " },
+ ["cd:par-l"] = { en = "\\par " },
+ ["cd:sep-s"] = { en = "\\" },
+ ["cd:sep-l"] = { en = "\\" },
+ }
}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-def.mkiv b/Master/texmf-dist/tex/context/base/mkiv/mult-def.mkiv
new file mode 100644
index 00000000000..d9404bc1625
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-def.mkiv
@@ -0,0 +1,46 @@
+%D \module
+%D [ file=mult-def,
+%D version=2008.10.22,
+%D title=\CONTEXT\ Multilingual Macros,
+%D subtitle=Definitions,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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
+
+\installcorenamespace{multilingual}
+
+\setvalue{\??multilingual czech}{cs}
+\setvalue{\??multilingual german}{de}
+\setvalue{\??multilingual english}{en}
+\setvalue{\??multilingual french}{fr}
+\setvalue{\??multilingual italian}{it}
+\setvalue{\??multilingual dutch}{nl}
+\setvalue{\??multilingual persian}{pe}
+\setvalue{\??multilingual romanian}{ro}
+
+% \def\userinterfacetag{\ifcsname\??multilingual\currentinterface\endcsname\csname\??multilingual\currentinterface\endcsname\else en\fi}
+% \def\userresponsestag{\ifcsname\??multilingual\currentresponses\endcsname\csname\??multilingual\currentresponses\endcsname\else en\fi}
+
+\def\userinterfacetag{\ifcsname\??multilingual\currentinterface\endcsname\lastnamedcs\else en\fi}
+\def\userresponsestag{\ifcsname\??multilingual\currentresponses\endcsname\lastnamedcs\else en\fi}
+
+% \input mult-\userinterfacetag \relax
+% \input mult-m\userresponsestag \relax
+
+\clf_setuserinterface{\userinterfacetag}{\userresponsestag}
+
+% some left-overs
+
+\def\c!HL {HL}
+\def\c!VL {VL}
+\def\c!NL {NL}
+
+% stop todo
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mult-dim.mkvi b/Master/texmf-dist/tex/context/base/mkiv/mult-dim.mkvi
index ffc04b523f8..0224e3dbb16 100644
--- a/Master/texmf-dist/tex/context/base/mult-dim.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-dim.mkvi
@@ -13,6 +13,8 @@
\writestatus{loading}{ConTeXt Core Macros / General}
+% we could write a proper parser now in lua
+
\unprotect
%D \macros
@@ -34,6 +36,8 @@
\installcorenamespace{dimensionnormal}
+\def\assign_dimension_direct#value#dimension#small#medium#big{#dimension=#value\relax}
+
\setvalue{\??dimensionnormal \v!none }#value#dimension#small#medium#big{#dimension\zeropoint}
\setvalue{\??dimensionnormal \empty }#value#dimension#small#medium#big{#dimension\zeropoint}
\setvalue{\??dimensionnormal \v!small }#value#dimension#small#medium#big{#dimension=#small\relax}
@@ -42,10 +46,17 @@
\setvalue{\??dimensionnormal-\v!small }#value#dimension#small#medium#big{#dimension=-#small\relax}
\setvalue{\??dimensionnormal-\v!medium}#value#dimension#small#medium#big{#dimension=-#medium\relax}
\setvalue{\??dimensionnormal-\v!big }#value#dimension#small#medium#big{#dimension=-#big\relax}
-\setvalue{\??dimensionnormal\s!unknown}#value#dimension#small#medium#big{#dimension=#value\relax}
+\letvalue{\??dimensionnormal\s!unknown}\assign_dimension_direct
+
+% \unexpanded\def\assigndimension#value%
+% {\csname\??dimensionnormal\ifcsname\??dimensionnormal#value\endcsname#value\else\s!unknown\fi\endcsname{#value}}
\unexpanded\def\assigndimension#value%
- {\csname\??dimensionnormal\ifcsname\??dimensionnormal#value\endcsname#value\else\s!unknown\fi\endcsname{#value}}
+ {\ifcsname\??dimensionnormal#value\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\assign_dimension_direct
+ \fi{#value}}
%D The next variant assigns to a macro instead of a dimension.
%D
@@ -62,14 +73,24 @@
\installcorenamespace{dimensionalfa}
+\def\assign_alpha_dimension_direct#value#macro#small#medium#big{\edef#macro{#value}}
+
\setvalue{\??dimensionalfa\v!none }#value#macro#small#medium#big{\let #macro\!!zerocount}
\setvalue{\??dimensionalfa\v!small }#value#macro#small#medium#big{\edef#macro{#small}}
\setvalue{\??dimensionalfa\v!medium }#value#macro#small#medium#big{\edef#macro{#medium}}
\setvalue{\??dimensionalfa\v!big }#value#macro#small#medium#big{\edef#macro{#big}}
-\setvalue{\??dimensionalfa\s!unknown}#value#macro#small#medium#big{\edef#macro{#value}}
+\letvalue{\??dimensionalfa\s!unknown}\assign_alpha_dimension_direct
+
+% \unexpanded\def\assignalfadimension#value%
+% {\csname\??dimensionalfa\ifcsname\??dimensionalfa#value\endcsname#value\else\s!unknown\fi\endcsname{#value}}
\unexpanded\def\assignalfadimension#value%
- {\csname\??dimensionalfa\ifcsname\??dimensionalfa#value\endcsname#value\else\s!unknown\fi\endcsname{#value}}
+ {\ifcsname\??dimensionalfa#value\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\assign_alpha_dimension_direct
+ \fi
+ {#value}}
%D \macros
%D {assignvalue}
@@ -87,13 +108,22 @@
\installcorenamespace{dimensionvalue}
+\def\assign_value_direct#value#macro#small#medium#big{\edef#macro{#value}}
+
\setvalue{\??dimensionvalue\v!small }#value#macro#small#medium#big{\edef#macro{#small}}
\setvalue{\??dimensionvalue\v!medium }#value#macro#small#medium#big{\edef#macro{#medium}}
\setvalue{\??dimensionvalue\v!big }#value#macro#small#medium#big{\edef#macro{#big}}
-\setvalue{\??dimensionvalue\s!unknown}#value#macro#small#medium#big{\edef#macro{#value}}
+\letvalue{\??dimensionvalue\s!unknown}\assign_value_direct
+
+% \unexpanded\def\assignvalue#value%
+% {\csname\??dimensionvalue\ifcsname\??dimensionvalue#value\endcsname#value\else\s!unknown\fi\endcsname{#value}}
\unexpanded\def\assignvalue#value%
- {\csname\??dimensionvalue\ifcsname\??dimensionvalue#value\endcsname#value\else\s!unknown\fi\endcsname{#value}}
+ {\ifcsname\??dimensionvalue#value\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\assign_value_direct
+ \fi{#value}}
%D \macros
%D {assignwidth}
@@ -113,15 +143,28 @@
\newbox\b_assign_width
+\def\assign_width_direct#value#dimension#content#extra{#dimension=#value\relax}
+
+% line is like fit but can be used later as signal for ...
+
\setvalue{\??dimensionwidth }#value#dimension#content#extra{\setbox\b_assign_width\hbox{#content}#dimension\wd\b_assign_width
\setbox\b_assign_width\emptybox}
\setvalue{\??dimensionwidth\v!fit }#value#dimension#content#extra{\setbox\b_assign_width\hbox{#content}#dimension\wd\b_assign_width
\setbox\b_assign_width\emptybox}
\setvalue{\??dimensionwidth\v!broad }#value#dimension#content#extra{\setbox\b_assign_width\hbox{#content}#dimension\dimexpr\wd\b_assign_width+#extra\relax
\setbox\b_assign_width\emptybox}
-\setvalue{\??dimensionwidth\s!unknown}#value#dimension#content#extra{#dimension=#value\relax}
+\setvalue{\??dimensionwidth\v!line }#value#dimension#content#extra{\setbox\b_assign_width\hbox{#content}#dimension\wd\b_assign_width
+ \setbox\b_assign_width\emptybox}
+\letvalue{\??dimensionwidth\s!unknown}\assign_width_direct
+
+% \unexpanded\def\assignwidth#value%
+% {\csname\??dimensionwidth\ifcsname\??dimensionwidth#value\endcsname#value\else\s!unknown\fi\endcsname{#value}}
\unexpanded\def\assignwidth#value%
- {\csname\??dimensionwidth\ifcsname\??dimensionwidth#value\endcsname#value\else\s!unknown\fi\endcsname{#value}}
+ {\ifcsname\??dimensionwidth#value\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\assign_width_direct
+ \fi{#value}}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mult-fun.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-fun.lua
index 27aa3205510..76a2ab915ad 100644
--- a/Master/texmf-dist/tex/context/base/mult-fun.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-fun.lua
@@ -11,8 +11,10 @@ return {
-- "originlength", "tickstep ", "ticklength",
-- "autoarrows", "ahfactor",
-- "angleoffset", anglelength", anglemethod",
+ "ahvariant", "ahdimple", "ahfactor",
"metapostversion",
"maxdimensions",
+ "drawoptionsfactor",
},
commands = {
"transparency",
@@ -43,13 +45,15 @@ return {
"withshade", "withcircularshade", "withlinearshade", -- old but kept
"defineshade", "shaded",
-- "withshading", "withlinearshading", "withcircularshading", "withfromshadecolor", "withtoshadecolor",
- "shadedinto", "withshadecolors", "withshadedomain", "withshademethod", "withshadefactor", "withshadevector", "withshadecenter",
+ "shadedinto", "withshadecolors", "withshadedomain", "withshademethod", "withshadefactor", "withshadevector",
+ "withshadecenter", "withshadedirection", "withshadestep", "withshadefraction",
"cmyk", "spotcolor", "multitonecolor", "namedcolor",
"drawfill", "undrawfill",
"inverted", "uncolored", "softened", "grayed", "greyed",
"onlayer",
"along",
- "graphictext", "loadfigure", "externalfigure", "figure", "register",
+ "graphictext", "loadfigure", "externalfigure", "figure", "register", "outlinetext", -- "lua",
+ "checkedbounds", "checkbounds", "strut", "rule",
"withmask", "bitmapimage",
"colordecimals", "ddecimal", "dddecimal", "ddddecimal",
"textext", "thetextext", "rawtextext", "textextoffset",
@@ -105,9 +109,9 @@ return {
"colortype", "whitecolor", "blackcolor", "basiccolors",
--
-- "swappointlabels",
- "normalfill", "normaldraw", "visualizepaths", "naturalizepaths",
- "drawboundary", "drawwholepath",
- "visualizeddraw", "visualizedfill",
+ "normalfill", "normaldraw", "visualizepaths", "detailpaths", "naturalizepaths",
+ "drawboundary", "drawwholepath", "drawpathonly",
+ "visualizeddraw", "visualizedfill", "detaileddraw",
"draworigin", "drawboundingbox",
"drawpath",
"drawpoint", "drawpoints", "drawcontrolpoints", "drawcontrollines",
@@ -122,7 +126,11 @@ return {
"passvariable", "passarrayvariable", "tostring", "format", "formatted",
"startpassingvariable", "stoppassingvariable",
--
- "eofill", "eoclip",
+ "eofill", "eoclip", "nofill", "fillup", "eofillup",
"area",
+ --
+ "addbackground",
+ --
+ "shadedup", "shadeddown", "shadedleft", "shadedright",
},
}
diff --git a/Master/texmf-dist/tex/context/base/mult-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-ini.lua
index bd3b1d38b37..409c735b7a6 100644
--- a/Master/texmf-dist/tex/context/base/mult-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-ini.lua
@@ -6,9 +6,10 @@ if not modules then modules = { } end modules ['mult-ini'] = {
license = "see context related readme files"
}
-local format, gmatch, match = string.format, string.gmatch, string.match
+local format, gmatch, match, find, sub = string.format, string.gmatch, string.match, string.find, string.sub
local lpegmatch = lpeg.match
-local serialize = table.serialize
+local serialize, concat = table.serialize, table.concat
+local rawget, type = rawget, type
local context = context
local commands = commands
@@ -17,6 +18,7 @@ local implement = interfaces.implement
local allocate = utilities.storage.allocate
local mark = utilities.storage.mark
local prtcatcodes = catcodes.numbers.prtcatcodes
+local vrbcatcodes = catcodes.numbers.vrbcatcodes
local contextsprint = context.sprint
local setmetatableindex = table.setmetatableindex
local formatters = string.formatters
@@ -29,6 +31,7 @@ interfaces.variables = mark(interfaces.variables or { })
interfaces.elements = mark(interfaces.elements or { })
interfaces.formats = mark(interfaces.formats or { })
interfaces.translations = mark(interfaces.translations or { })
+interfaces.setupstrings = mark(interfaces.setupstrings or { })
interfaces.corenamespaces = mark(interfaces.corenamespaces or { })
local registerstorage = storage.register
@@ -39,6 +42,7 @@ local variables = interfaces.variables
local elements = interfaces.elements
local formats = interfaces.formats
local translations = interfaces.translations
+local setupstrings = interfaces.setupstrings
local corenamespaces = interfaces.corenamespaces
local reporters = { } -- just an optimization
@@ -47,6 +51,7 @@ registerstorage("interfaces/variables", variables, "interfaces.variabl
registerstorage("interfaces/elements", elements, "interfaces.elements")
registerstorage("interfaces/formats", formats, "interfaces.formats")
registerstorage("interfaces/translations", translations, "interfaces.translations")
+registerstorage("interfaces/setupstrings", setupstrings, "interfaces.setupstrings")
registerstorage("interfaces/corenamespaces", corenamespaces, "interfaces.corenamespaces")
interfaces.interfaces = {
@@ -59,6 +64,9 @@ sharedstorage.currentresponse = sharedstorage.currentresponse or "en"
local currentinterface = sharedstorage.currentinterface
local currentresponse = sharedstorage.currentresponse
+interfaces.currentinterface = currentinterface
+interfaces.currentresponse = currentresponse
+
local complete = allocate()
interfaces.complete = complete
@@ -83,6 +91,7 @@ setmetatableindex(constants, valueiskey)
setmetatableindex(elements, valueiskey)
setmetatableindex(formats, valueiskey)
setmetatableindex(translations, valueiskey)
+setmetatableindex(setupstrings, valueiskey)
function interfaces.registernamespace(n,namespace)
corenamespaces[n] = namespace
@@ -129,6 +138,12 @@ function interfaces.setformat(tag,values)
add(formats,tag,values)
end
+local function getsetupstring(tag)
+ return setupstrings[tag] or tag
+end
+
+interfaces.getsetupstring = getsetupstring
+
-- the old method:
local replacer = lpeg.replacer { { "--", "%%a" } }
@@ -156,7 +171,7 @@ function interfaces.getmessage(category,tag,default)
end
function interfaces.doifelsemessage(category,tag)
- return formats[fulltag(category,tag)]
+ return rawget(formats,fulltag(category,tag))
end
local splitter = lpeg.splitat(",")
@@ -194,56 +209,130 @@ end
logs.setmessenger(context.verbatim.ctxreport)
--- initialization
+-- todo: use setmacro
function interfaces.setuserinterface(interface,response)
sharedstorage.currentinterface, currentinterface = interface, interface
- sharedstorage.currentresponse, currentresponse = response, response
+ sharedstorage.currentresponse, currentresponse = response, response
if environment.initex then
- local nofconstants = 0
- for given, constant in next, complete.constants do
- constant = constant[interface] or constant.en or given
- constants[constant] = given -- breedte -> width
- contextsprint(prtcatcodes,"\\ui_c{",given,"}{",constant,"}") -- user interface constant
- nofconstants = nofconstants + 1
+ local setmacro = false
+ -- local setmacro = interfaces.setmacro -- cleaner (but we need to test first)
+ local nofconstants = 0
+ local nofvariables = 0
+ local nofelements = 0
+ local nofcommands = 0
+ local nofformats = 0
+ local noftranslations = 0
+ local nofsetupstrings = 0
+ --
+ if setmacro then
+ for given, constant in next, complete.constants do
+ constant = constant[interface] or constant.en or given
+ constants[constant] = given -- breedte -> width
+ nofconstants = nofconstants + 1
+ setmacro("c!"..given,given)
+ if currentinterface ~= "en" then
+ setmacro("k!"..constant,given)
+ end
+ end
+ else
+ local t, f, s = { }, formatters["\\ui_c{%s}{%s}"], formatters["\\ui_s{%s}"]
+ for given, constant in next, complete.constants do
+ constant = constant[interface] or constant.en or given
+ constants[constant] = given -- breedte -> width
+ nofconstants = nofconstants + 1
+ if given == constant then
+ t[nofconstants] = s(given)
+ else
+ t[nofconstants] = f(given,constant)
+ end
+ end
+ contextsprint(prtcatcodes,concat(t))
end
- local nofvariables = 0
- for given, variable in next, complete.variables do
- variable = variable[interface] or variable.en or given
- variables[given] = variable -- ja -> yes
- contextsprint(prtcatcodes,"\\ui_v{",given,"}{",variable,"}") -- user interface variable
- nofvariables = nofvariables + 1
+ --
+ if setmacro then
+ for given, variable in next, complete.variables do
+ variable = variable[interface] or variable.en or given
+ variables[given] = variable -- ja -> yes
+ nofvariables = nofvariables + 1
+ setmacro("v!"..given,variable)
+ end
+ else
+ local t, f = { }, formatters["\\ui_v{%s}{%s}"]
+ for given, variable in next, complete.variables do
+ variable = variable[interface] or variable.en or given
+ variables[given] = variable -- ja -> yes
+ nofvariables = nofvariables + 1
+ t[nofvariables] = f(given,variable)
+ end
+ contextsprint(prtcatcodes,concat(t))
end
- local nofelements = 0
- for given, element in next, complete.elements do
- element = element[interface] or element.en or given
- elements[element] = given
- contextsprint(prtcatcodes,"\\ui_e{",given,"}{",element,"}") -- user interface element
- nofelements = nofelements + 1
+ --
+ if setmacro then
+ for given, element in next, complete.elements do
+ element = element[interface] or element.en or given
+ elements[element] = given
+ nofelements = nofelements + 1
+ setmacro("e!"..given,element)
+ end
+ else
+ local t, f = { }, formatters["\\ui_e{%s}{%s}"]
+ for given, element in next, complete.elements do
+ element = element[interface] or element.en or given
+ elements[element] = given
+ nofelements = nofelements + 1
+ t[nofelements] = f(given,element)
+ end
+ contextsprint(prtcatcodes,concat(t))
end
- local nofcommands = 0
- for given, command in next, complete.commands do
- command = command[interface] or command.en or given
- if command ~= given then
- contextsprint(prtcatcodes,"\\ui_m{",given,"}{",command,"}") -- user interface macro
+ --
+ if setmacro then
+ -- this can only work ok when we already have defined the command
+ luatex.registerdumpactions(function()
+ for given, command in next, complete.commands do
+ command = command[interface] or command.en or given
+ if command ~= given then
+ setmacro(prtcatcodes,given,"\\"..command)
+ end
+ nofcommands = nofcommands + 1
+ end
+ end)
+ else
+ local t, n, f = { }, 0, formatters["\\ui_m{%s}{%s}"]
+ for given, command in next, complete.commands do
+ command = command[interface] or command.en or given
+ if command ~= given then
+ n = n + 1
+ t[n] = f(given,command)
+ end
+ nofcommands = nofcommands + 1
end
- nofcommands = nofcommands + 1
+ contextsprint(prtcatcodes,concat(t))
end
- local nofformats = 0
+ --
for given, format in next, complete.messages.formats do
formats[given] = format[interface] or format.en or given
nofformats = nofformats + 1
end
- local noftranslations = 0
+ --
for given, translation in next, complete.messages.translations do
translations[given] = translation[interface] or translation.en or given
noftranslations = noftranslations + 1
end
- report_interface("definitions: %a constants, %a variables, %a elements, %a commands, %a formats, %a translations",
- nofconstants,nofvariables,nofelements,nofcommands,nofformats,noftranslations)
+ --
+ for given, setupstring in next, complete.setupstrings do
+ setupstring = setupstring[interface] or setupstring.en or given
+ setupstrings[given] = setupstring
+ nofsetupstrings = nofsetupstrings + 1
+ end
+ --
+ report_interface("definitions: %a constants, %a variables, %a elements, %a commands, %a formats, %a translations, %a setupstrings",
+ nofconstants,nofvariables,nofelements,nofcommands,nofformats,noftranslations,nofsetupstrings)
else
report_interface("the language(s) can only be set when making the format")
end
+ interfaces.currentinterface = currentinterface
+ interfaces.currentresponse = currentresponse
end
interfaces.implement {
@@ -274,16 +363,6 @@ function interfaces.cachesetup(t)
end
end
--- if token.lookup then
--- interfaces.is_command = token.lookup
--- else
-
- function interfaces.is_command(str)
- return (str and str ~= "" and token.csname_name(token.create(str)) ~= "") or false -- there will be a proper function for this
- end
-
--- end
-
function interfaces.interfacedcommand(name)
local command = complete.commands[name]
return command and command[currentinterface] or name
@@ -295,6 +374,10 @@ function interfaces.writestatus(category,message)
reporters[category](message) -- could also be a setmetatablecall
end
+function interfaces.message(str)
+ texio.write(str) -- overloaded
+end
+
implement { name = "registernamespace", actions = interfaces.registernamespace, arguments = { "integer", "string" } }
implement { name = "setinterfaceconstant", actions = interfaces.setconstant, arguments = { "string", "string" } }
implement { name = "setinterfacevariable", actions = interfaces.setvariable, arguments = { "string", "string" } }
@@ -322,6 +405,21 @@ implement {
arguments = { "string", "string" },
}
+implement {
+ name = "message",
+ overload = true,
+ actions = interfaces.message,
+ arguments = "string",
+}
+
+implement {
+ name = "getsetupstring",
+ actions = function(s)
+ contextsprint(vrbcatcodes,getsetupstring(s))
+ end,
+ arguments = "string",
+}
+
local function showassignerror(namespace,key,line)
local ns, instance = match(namespace,"^(%d+)[^%a]+(%a*)")
if ns then
diff --git a/Master/texmf-dist/tex/context/base/mult-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/mult-ini.mkiv
index 1dd5a696a94..8ed147c63e4 100644
--- a/Master/texmf-dist/tex/context/base/mult-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-ini.mkiv
@@ -385,9 +385,15 @@
\unexpanded\def\doifelsemessage #1#2{\clf_doifelsemessage{#1}{#2}}
\unexpanded\def\showmessage #1#2#3{\clf_showmessage{#1}{#2}{#3}}
\unexpanded\def\writestatus #1#2{\clf_writestatus{#1}{#2}}
+\unexpanded\def\message {\clf_message}
\let\doifmessageelse\doifelsemessage
+\unexpanded\def\inlinemessage #1{\dontleavehmode{\tttf#1}}
+\unexpanded\def\displaymessage#1{\blank\inlinemessage{#1}\blank}
+
+\let\getsetupstring\clf_getsetupstring
+
%D \macros
%D {ifshowwarnings, ifshowmessages}
%D
@@ -798,7 +804,9 @@
% \stopinterface
\def\ui_c#1#2{\expandafter\gdef\csname\c!prefix!#1\endcsname{#1}%
- \expandafter\gdef\csname\k!prefix!#2\endcsname{#1}} % backmapping from non english
+ \expandafter\gdef\csname\k!prefix!#2\endcsname{#1}} % backmapping from non english
+\def\ui_s #1{\expandafter\gdef\csname\c!prefix!#1\endcsname{#1}%
+ \expandafter\gdef\csname\k!prefix!#1\endcsname{#1}} % backmapping from non english
\def\ui_v#1#2{\expandafter\gdef\csname\v!prefix!#1\endcsname{#2}}
\def\ui_e#1#2{\expandafter\gdef\csname\e!prefix!#1\endcsname{#2}}
\def\ui_m#1#2{\expandafter\gdef\csname#2\expandafter\endcsname\expandafter{\csname#1\endcsname}}
@@ -806,6 +814,7 @@
\startinterface english
\def\ui_c#1#2{\expandafter\gdef\csname\c!prefix!#1\endcsname{#1}}
+ \def\ui_s #1{\expandafter\gdef\csname\c!prefix!#1\endcsname{#1}}
\stopinterface
@@ -836,7 +845,7 @@
\def\contextversionnumber{0}
\else
%\def\contextversionnumber#1.#2.#3 #4:#5\relax{#1\ifnum#2<10 0\fi#2\ifnum#3<10 0\fi#3 #4:#5}
- \def\contextversionnumber#1.#2.#3 #4:#5\relax{#1\ifnum#2<10 0\fi\purenumber{#2}\ifnum#3<10 0\fi\purenumber{#3} #4:#5}
+ \def\contextversionnumber#1.#2.#3 #4:#5\relax{#1\ifnum#2<10 0\fi\purenumber{#2}\ifnum#3<10 0\fi\purenumber{#3} #4:#5}
\edef\contextversionnumber{\expandafter\contextversionnumber\contextversion\relax\space\contextmark}
\fi
diff --git a/Master/texmf-dist/tex/context/base/mult-low.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-low.lua
index 5396ec723ea..c9a13c1e8b7 100644
--- a/Master/texmf-dist/tex/context/base/mult-low.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-low.lua
@@ -12,7 +12,7 @@ return {
["constants"] = {
--
"zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive",
- "plussix", "plusseven", "pluseight", "plusnine", "plusten", "plussixteen", "plushundred",
+ "plussix", "plusseven", "pluseight", "plusnine", "plusten", "plussixteen", "plushundred", "plustwohundred",
"plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone",
"zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxdimen", "scaledpoint", "thousandpoint",
"points", "halfpoint",
@@ -131,6 +131,8 @@ return {
"figurespace", "punctuationspace", "hairspace",
"zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj",
"optionalspace", "asciispacechar",
+ --
+ "Ux", "eUx", "Umathaccents",
},
["helpers"] = {
--
@@ -172,10 +174,12 @@ return {
--
"donothing", "dontcomplain", "forgetall",
--
- "donetrue", "donefalse",
+ "donetrue", "donefalse", "foundtrue", "foundfalse",
--
"inlineordisplaymath","indisplaymath","forcedisplaymath","startforceddisplaymath","stopforceddisplaymath","reqno",
--
+ "mathortext",
+ --
"htdp",
"unvoidbox",
"hfilll", "vfilll",
@@ -192,6 +196,7 @@ return {
"ruledhss", "ruledhfil", "ruledhfill", "ruledhfilneg", "ruledhfillneg", "normalhfillneg",
"ruledvss", "ruledvfil", "ruledvfill", "ruledvfilneg", "ruledvfillneg", "normalvfillneg",
"ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox",
+ "ruledhpack", "ruledvpack", "ruledtpack",
"ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern",
"ruledhglue", "ruledvglue", "normalhglue", "normalvglue",
"ruledpenalty",
@@ -209,7 +214,7 @@ return {
--
"availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction",
--
- "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs",
+ "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox",
--
"scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance",
"scratchhsize", "scratchvsize",
@@ -217,14 +222,15 @@ return {
"scratchxposition", "scratchyposition",
"scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset",
--
- "scratchcounterone", "scratchcountertwo", "scratchcounterthree",
- "scratchdimenone", "scratchdimentwo", "scratchdimenthree",
- "scratchskipone", "scratchskiptwo", "scratchskipthree",
- "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree",
- "scratchtoksone", "scratchtokstwo", "scratchtoksthree",
- "scratchboxone", "scratchboxtwo", "scratchboxthree",
+ "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchcounterfour", "scratchcounterfive", "scratchcountersix",
+ "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchdimenfour", "scratchdimenfive", "scratchdimensix",
+ "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchskipfour", "scratchskipfive", "scratchskipsix",
+ "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchmuskipfour", "scratchmuskipfive", "scratchmuskipsix",
+ "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchtoksfour", "scratchtoksfive", "scratchtokssix",
+ "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchboxfour", "scratchboxfive", "scratchboxsix",
"scratchnx", "scratchny", "scratchmx", "scratchmy",
"scratchunicode",
+ "scratchmin", "scratchmax",
--
"scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip",
--
@@ -332,6 +338,7 @@ return {
"offinterlineskip", "oninterlineskip", "nointerlineskip",
--
"strut", "halfstrut", "quarterstrut", "depthstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "begstrut", "endstrut", "lineheight",
+ "leftboundary", "rightboundary", "signalcharacter",
--
"ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing",
"ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing",
@@ -361,6 +368,7 @@ return {
--
"startimath", "stopimath", "normalstartimath", "normalstopimath",
"startdmath", "stopdmath", "normalstartdmath", "normalstopdmath",
+ "normalsuperscript", "normalsubscript",
--
"uncramped", "cramped", "triggermathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette",
"mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox",
@@ -388,6 +396,7 @@ return {
"startluacode", "stopluacode", "startlua", "stoplua",
"startctxfunction","stopctxfunction","ctxfunction",
"startctxfunctiondefinition","stopctxfunctiondefinition", "installctxfunction",
+ "cldprocessfile", "cldloadfile", "cldcontext", "cldcommand",
--
"carryoverpar",
--
@@ -398,12 +407,19 @@ return {
"righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop",
"rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop",
"autodirhbox", "autodirvbox", "autodirvtop",
+ "leftorrighthbox", "leftorrightvbox", "leftorrightvtop",
"lefttoright", "righttoleft","synchronizelayoutdirection","synchronizedisplaydirection","synchronizeinlinedirection",
--
"lesshyphens", "morehyphens", "nohyphens", "dohyphens",
--
"Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath",
--
- "nobreak", "allowbreak", "goodbreak",
+ "break", "nobreak", "allowbreak", "goodbreak",
+ --
+ "nospace", "nospacing", "dospacing",
+ --
+ "naturalhbox", "naturalvbox", "naturalhpack", "naturalvpack",
+ --
+ "frule",
}
}
diff --git a/Master/texmf-dist/tex/context/base/mult-mes.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-mes.lua
index 64184f8b0f0..979831726eb 100644
--- a/Master/texmf-dist/tex/context/base/mult-mes.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-mes.lua
@@ -490,6 +490,9 @@ return {
no = "there is nothing to split",
ro = "there is nothing to split",
},
+ ["floatblocks:1"] = {
+ en = "%a is empty",
+ },
["floatblocks:2"] = {
cs = "%a ulozeno",
de = "%a gespeichert",
diff --git a/Master/texmf-dist/tex/context/base/mult-mps.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-mps.lua
index a6bebc26613..a6bebc26613 100644
--- a/Master/texmf-dist/tex/context/base/mult-mps.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-mps.lua
diff --git a/Master/texmf-dist/tex/context/base/mult-prm.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-prm.lua
index 9d6fc7810e8..d9c432f7c66 100644
--- a/Master/texmf-dist/tex/context/base/mult-prm.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-prm.lua
@@ -84,6 +84,8 @@ return {
"Udelimiter",
"Udelimiterover",
"Udelimiterunder",
+ "Uhextensible",
+ "Uleft",
"Umathaccent",
--"Umathaccents",
"Umathaxis",
@@ -97,8 +99,12 @@ return {
"Umathbinrelspacing",
--"Umathbotaccent",
"Umathchar",
+ "Umathcharclass",
"Umathchardef",
+ "Umathcharfam",
"Umathcharnum",
+ "Umathcharnumdef",
+ "Umathcharslot",
"Umathclosebinspacing",
"Umathcloseclosespacing",
"Umathcloseinnerspacing",
@@ -109,6 +115,7 @@ return {
"Umathcloserelspacing",
"Umathcode",
"Umathcodenum",
+ "Umathcodenumdef",
"Umathconnectoroverlapmin",
"Umathfractiondelsize",
"Umathfractiondenomdown",
@@ -183,6 +190,8 @@ return {
"Umathrelordspacing",
"Umathrelpunctspacing",
"Umathrelrelspacing",
+ "Umathskewedfractionhgap",
+ "Umathskewedfractionvgap",
"Umathspaceafterscript",
"Umathstackdenomdown",
"Umathstacknumup",
@@ -201,9 +210,13 @@ return {
"Umathunderbarvgap",
"Umathunderdelimiterbgap",
"Umathunderdelimitervgap",
+ "Umiddle",
"Uoverdelimiter",
"Uradical",
+ "Uright",
"Uroot",
+ "Uskewed",
+ "Uskewedwithdelims",
"Ustack",
"Ustartdisplaymath",
"Ustartmath",
@@ -212,50 +225,129 @@ return {
"Usubscript",
"Usuperscript",
"Uunderdelimiter",
+ "Uvextensible",
+ "adjustspacing",
"alignmark",
"aligntab",
"attribute",
"attributedef",
+ "bodydir",
+ "boundary",
+ "boxdir",
"catcodetable",
"clearmarks",
+ "copyfont",
"crampeddisplaystyle",
"crampedscriptscriptstyle",
"crampedscriptstyle",
"crampedtextstyle",
+ "draftmode",
+ "dviextension",
+ "dvifeedback",
+ "dvivariable",
+ "efcode",
+ "hjcode",
+ "firstvalidlanguage",
"fontid",
"formatname",
"gleaders",
+ "hyphenationmin",
"ifabsdim",
"ifabsnum",
"ifprimitive",
+ "ignoreligaturesinfont",
"initcatcodetable",
+ "insertht",
+ "lastsavedboxresourceindex",
+ "lastsavedimageresourceindex",
+ "lastsavedimageresourcepages",
+ "lastxpos",
+ "lastypos",
"latelua",
+ "leftghost",
+ "leftmarginkern",
+ "letcharcode",
+ "letterspacefont",
+ "localbrokenpenalty",
+ "localinterlinepenalty",
+ "localleftbox",
+ "localrightbox",
+ "lpcode",
"luaescapestring",
- "luastartup",
"luatexbanner",
"luatexrevision",
"luatexversion",
"luafunction",
+ "mathdir",
+ "mathdisplayskipmode",
+ "matheqnogapstep",
+ "mathoption",
+ "mathscriptsmode",
"mathstyle",
+ "mathsurroundskip",
+ "noboundary",
"nokerns",
+ "nohrule",
"noligs",
+ "nospaces",
+ "novrule",
+ "normaldeviate",
"outputbox",
+ "outputmode",
+ "pagedir",
+ "pageheight",
+ "pagebottomoffset",
"pageleftoffset",
+ "pagerightoffset",
"pagetopoffset",
+ "pagewidth",
+ "pardir",
+ "pdfextension",
+ "pdffeedback",
+ "pdfvariable",
"postexhyphenchar",
"posthyphenchar",
"preexhyphenchar",
"prehyphenchar",
"primitive",
+ "protrudechars",
+ "protrusionboundary",
+ "pxdimen",
+ "randomseed",
+ "rightghost",
+ "rightmarginkern",
+ "rpcode",
+ "saveboxresource",
"savecatcodetable",
+ "saveimageresource",
+ "savepos",
"scantextokens",
+ "setfontid",
+ "setrandomseed",
"suppressfontnotfounderror",
"suppressifcsnameerror",
"suppresslongerror",
"suppressoutererror",
"suppressmathparerror",
- "matheqnogapstep",
"synctex",
+ "tagcode",
+ "textdir",
+ "tracingfonts",
+ "uniformdeviate",
+ "useboxresource",
+ "useimageresource",
+ "wordboundary",
+ --
+ "vpack",
+ "hpack",
+ "tpack",
+ "csstring",
+ "begincsname",
+ "lastnamedcs",
+ "toksapp",
+ "tokspre",
+ "etoksapp",
+ "etokspre",
},
["omega"]={
"OmegaVersion",
@@ -306,8 +398,8 @@ return {
"pdfdest",
"pdfdestmargin",
"pdfdraftmode",
- "pdfeachlinedepth",
"pdfeachlineheight",
+ "pdfeachlinedepth",
"pdfendlink",
"pdfendthread",
"pdffirstlineheight",
@@ -316,6 +408,7 @@ return {
"pdffontname",
"pdffontobjnum",
"pdffontsize",
+ "pdfxformmargin",
"pdfgamma",
"pdfgentounicode",
"pdfglyphtounicode",
@@ -327,8 +420,12 @@ return {
"pdfimageresolution",
"pdfincludechars",
"pdfinclusioncopyfonts",
+ "pdfignoreunknownimages",
"pdfinclusionerrorlevel",
+ "pdfignoreunknownimages",
"pdfinfo",
+ "pdfinfoomitdate",
+ "pdftrailerid",
"pdfinsertht",
"pdflastannot",
"pdflastlinedepth",
@@ -336,7 +433,6 @@ return {
"pdflastobj",
"pdflastxform",
"pdflastximage",
- "pdflastximagecolordepth",
"pdflastximagepages",
"pdflastxpos",
"pdflastypos",
@@ -350,7 +446,6 @@ return {
"pdfnormaldeviate",
"pdfobj",
"pdfobjcompresslevel",
- "pdfoptionpdfminorversion",
"pdfoutline",
"pdfoutput",
"pdfpageattr",
@@ -362,6 +457,7 @@ return {
"pdfpagewidth",
"pdfpkmode",
"pdfpkresolution",
+ "pdfpkfixeddpi",
"pdfprimitive",
"pdfprotrudechars",
"pdfpxdimen",
@@ -381,6 +477,8 @@ return {
"pdftexbanner",
"pdftexrevision",
"pdftexversion",
+ "pdfsuppressptexinfo",
+ "pdfsuppressoptionalinfo",
"pdfthread",
"pdfthreadmargin",
"pdftracingfonts",
@@ -393,7 +491,6 @@ return {
"pdfxformname",
"pdfxformresources",
"pdfximage",
- "pdfximagebbox",
"quitvmode",
"rightmarginkern",
"rpcode",
@@ -415,6 +512,8 @@ return {
"Udelimiter",
"Udelimiterover",
"Udelimiterunder",
+ "Uhextensible",
+ "Uleft",
"Umathaccent",
--"Umathaccents",
"Umathaxis",
@@ -428,8 +527,12 @@ return {
"Umathbinrelspacing",
--"Umathbotaccent",
"Umathchar",
+ "Umathcharclass",
"Umathchardef",
+ "Umathcharfam",
"Umathcharnum",
+ "Umathcharnumdef",
+ "Umathcharslot",
"Umathclosebinspacing",
"Umathcloseclosespacing",
"Umathcloseinnerspacing",
@@ -440,6 +543,7 @@ return {
"Umathcloserelspacing",
"Umathcode",
"Umathcodenum",
+ "Umathcodenumdef",
"Umathconnectoroverlapmin",
"Umathfractiondelsize",
"Umathfractiondenomdown",
@@ -514,6 +618,8 @@ return {
"Umathrelordspacing",
"Umathrelpunctspacing",
"Umathrelrelspacing",
+ "Umathskewedfractionhgap",
+ "Umathskewedfractionvgap",
"Umathspaceafterscript",
"Umathstackdenomdown",
"Umathstacknumup",
@@ -532,9 +638,13 @@ return {
"Umathunderbarvgap",
"Umathunderdelimiterbgap",
"Umathunderdelimitervgap",
+ "Umiddle",
"Uoverdelimiter",
"Uradical",
+ "Uright",
"Uroot",
+ "Uskewed",
+ "Uskewedwithdelims",
"Ustack",
"Ustartdisplaymath",
"Ustartmath",
@@ -543,6 +653,7 @@ return {
"Usubscript",
"Usuperscript",
"Uunderdelimiter",
+ "Uvextensible",
"above",
"abovedisplayshortskip",
"abovedisplayskip",
@@ -568,6 +679,7 @@ return {
"bodydir",
"botmark",
"botmarks",
+ "boundary",
"box",
"boxdir",
"boxmaxdepth",
@@ -587,6 +699,7 @@ return {
"clubpenalties",
"clubpenalty",
"copy",
+ "copyfont",
"count",
"countdef",
"cr",
@@ -626,12 +739,16 @@ return {
"doublehyphendemerits",
"dp",
"dump",
+ "dviextension",
+ "dvifeedback",
+ "dvivariable",
"eTeXVersion",
"eTeXminorversion",
"eTeXrevision",
"eTeXversion",
"edef",
"efcode",
+ "hjcode",
"else",
"emergencystretch",
"end",
@@ -657,6 +774,7 @@ return {
"exhyphenpenalty",
"expandafter",
"expanded",
+ "expandglyphsinfont",
"fam",
"fi",
"finalhyphendemerits",
@@ -669,6 +787,7 @@ return {
"fontcharic",
"fontcharwd",
"fontdimen",
+ "firstvalidlanguage",
"fontid",
"fontname",
"formatname",
@@ -729,6 +848,7 @@ return {
"ifvmode",
"ifvoid",
"ifx",
+ "ignoreligaturesinfont",
"ignorespaces",
"immediate",
"indent",
@@ -748,7 +868,12 @@ return {
"lastlinefit",
"lastnodetype",
"lastpenalty",
+ "lastsavedboxresourceindex",
+ "lastsavedimageresourceindex",
+ "lastsavedimageresourcepages",
"lastskip",
+ "lastxpos",
+ "lastypos",
"latelua",
"lccode",
"leaders",
@@ -759,6 +884,7 @@ return {
"leftskip",
"leqno",
"let",
+ "letcharcode",
"letterspacefont",
"limits",
"linepenalty",
@@ -774,7 +900,6 @@ return {
"lowercase",
"lpcode",
"luaescapestring",
- "luastartup",
"luatexbanner",
"luatexrevision",
"luatexversion",
@@ -789,13 +914,18 @@ return {
"mathclose",
"mathcode",
"mathdir",
+ "mathdisplayskipmode",
+ "matheqnogapstep",
"mathinner",
"mathop",
"mathopen",
+ "mathoption",
"mathord",
"mathpunct",
"mathrel",
+ "mathscriptsmode",
"mathstyle",
+ "mathsurroundskip",
"mathsurround",
"maxdeadcycles",
"maxdepth",
@@ -819,12 +949,16 @@ return {
"noexpand",
"noindent",
"nokerns",
+ "nohrule",
"noligs",
+ "nospaces",
+ "novrule",
"nolimits",
"nolocaldirs",
"nolocalwhatsits",
"nonscript",
"nonstopmode",
+ "normaldeviate",
"nulldelimiterspace",
"nullfont",
"number",
@@ -887,21 +1021,25 @@ return {
"pdfdest",
"pdfdestmargin",
"pdfdraftmode",
- "pdfeachlinedepth",
"pdfeachlineheight",
+ "pdfeachlinedepth",
"pdfendlink",
"pdfendthread",
+ "pdfextension",
+ "pdfvariable",
"pdffirstlineheight",
"pdffontattr",
"pdffontexpand",
"pdffontname",
"pdffontobjnum",
"pdffontsize",
+ "pdfxformmargin",
"pdfgamma",
"pdfgentounicode",
"pdfglyphtounicode",
"pdfhorigin",
"pdfignoreddimen",
+ "pdfimageaddfilename",
"pdfimageapplygamma",
"pdfimagegamma",
"pdfimagehicolor",
@@ -909,7 +1047,10 @@ return {
"pdfincludechars",
"pdfinclusioncopyfonts",
"pdfinclusionerrorlevel",
+ "pdfignoreunknownimages",
"pdfinfo",
+ "pdfinfoomitdate",
+ "pdftrailerid",
"pdfinsertht",
"pdflastannot",
"pdflastlinedepth",
@@ -917,7 +1058,6 @@ return {
"pdflastobj",
"pdflastxform",
"pdflastximage",
- "pdflastximagecolordepth",
"pdflastximagepages",
"pdflastxpos",
"pdflastypos",
@@ -931,7 +1071,6 @@ return {
"pdfnormaldeviate",
"pdfobj",
"pdfobjcompresslevel",
- "pdfoptionpdfminorversion",
"pdfoutline",
"pdfoutput",
"pdfpageattr",
@@ -943,6 +1082,7 @@ return {
"pdfpagewidth",
"pdfpkmode",
"pdfpkresolution",
+ "pdfpkfixeddpi",
"pdfprimitive",
"pdfprotrudechars",
"pdfpxdimen",
@@ -962,6 +1102,8 @@ return {
"pdftexbanner",
"pdftexrevision",
"pdftexversion",
+ "pdfsuppressptexinfo",
+ "pdfsuppressoptionalinfo",
"pdfthread",
"pdfthreadmargin",
"pdftracingfonts",
@@ -974,7 +1116,6 @@ return {
"pdfxformname",
"pdfxformresources",
"pdfximage",
- "pdfximagebbox",
"penalty",
"postdisplaypenalty",
"postexhyphenchar",
@@ -989,9 +1130,13 @@ return {
"prevgraf",
"primitive",
"protected",
+ "protrudechars",
+ "protrusionboundary",
+ "pxdimen",
"quitvmode",
"radical",
"raise",
+ "randomseed",
"read",
"readline",
"relax",
@@ -1003,6 +1148,9 @@ return {
"rightskip",
"romannumeral",
"rpcode",
+ "saveboxresource",
+ "saveimageresource",
+ "savepos",
"savecatcodetable",
"savinghyphcodes",
"savingvdiscards",
@@ -1015,7 +1163,9 @@ return {
"scriptstyle",
"scrollmode",
"setbox",
+ "setfontid",
"setlanguage",
+ "setrandomseed",
"sfcode",
"shipout",
"show",
@@ -1065,6 +1215,7 @@ return {
"topskip",
"tracingassigns",
"tracingcommands",
+ "tracingfonts",
"tracinggroups",
"tracingifs",
"tracinglostchars",
@@ -1083,6 +1234,7 @@ return {
"unexpanded",
"unhbox",
"unhcopy",
+ "uniformdeviate",
"unkern",
"unless",
"unpenalty",
@@ -1090,6 +1242,8 @@ return {
"unvbox",
"unvcopy",
"uppercase",
+ "useboxresource",
+ "useimageresource",
"vadjust",
"valign",
"vbadness",
@@ -1109,11 +1263,23 @@ return {
"wd",
"widowpenalties",
"widowpenalty",
+ "wordboundary",
"write",
"xdef",
"xleaders",
"xspaceskip",
"year",
+ --
+ "vpack",
+ "hpack",
+ "tpack",
+ "csstring",
+ "begincsname",
+ "lastnamedcs",
+ "toksapp",
+ "tokspre",
+ "etoksapp",
+ "etokspre",
},
["xetex"]={
"XeTeXversion",
diff --git a/Master/texmf-dist/tex/context/base/mult-prm.mkiv b/Master/texmf-dist/tex/context/base/mkiv/mult-prm.mkiv
index e385341c2c6..e385341c2c6 100644
--- a/Master/texmf-dist/tex/context/base/mult-prm.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-prm.mkiv
diff --git a/Master/texmf-dist/tex/context/base/mult-sys.mkiv b/Master/texmf-dist/tex/context/base/mkiv/mult-sys.mkiv
index b1475f2dcfc..01a1674dced 100644
--- a/Master/texmf-dist/tex/context/base/mult-sys.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-sys.mkiv
@@ -38,51 +38,52 @@
%D First we define some system constants used for both the multi||lingual
%D interface and multi||linguag typesetting.
-\definesystemconstant {afrikaans} \definesystemconstant {af}
-\definesystemconstant {arabic} \definesystemconstant {ar}
-\definesystemconstant {catalan} \definesystemconstant {ca}
-\definesystemconstant {chinese} \definesystemconstant {cn}
-\definesystemconstant {croatian} \definesystemconstant {hr}
-\definesystemconstant {czech} \definesystemconstant {cs}
- \definesystemconstant {cz}
-\definesystemconstant {danish} \definesystemconstant {da}
-\definesystemconstant {dutch} \definesystemconstant {nl}
-\definesystemconstant {english} \definesystemconstant {en}
-\definesystemconstant {finish} \definesystemconstant {fi}
-\definesystemconstant {french} \definesystemconstant {fr}
-\definesystemconstant {german} \definesystemconstant {de}
-\definesystemconstant {hungarian} \definesystemconstant {hu}
-\definesystemconstant {italian} \definesystemconstant {it}
-\definesystemconstant {latin} \definesystemconstant {la}
-\definesystemconstant {lithuanian} \definesystemconstant {lt}
-\definesystemconstant {bokmal} \definesystemconstant {nb}
-\definesystemconstant {malayalam} \definesystemconstant {ml}
-\definesystemconstant {norwegian} \definesystemconstant {no}
-\definesystemconstant {nynorsk} \definesystemconstant {nn}
-\definesystemconstant {polish} \definesystemconstant {pl}
-\definesystemconstant {persian} \definesystemconstant {pe}
-\definesystemconstant {portuguese} \definesystemconstant {pt}
-\definesystemconstant {romanian} \definesystemconstant {ro}
-\definesystemconstant {russian} \definesystemconstant {ru}
-\definesystemconstant {slovak} \definesystemconstant {sk}
-\definesystemconstant {slovenian} \definesystemconstant {sl}
-\definesystemconstant {slovene} % obsolete
-\definesystemconstant {spanish} \definesystemconstant {es}
-\definesystemconstant {swedish} \definesystemconstant {sv}
-\definesystemconstant {turkish} \definesystemconstant {tr}
-\definesystemconstant {turkmen} \definesystemconstant {tk}
-\definesystemconstant {gbenglish} \definesystemconstant {gb}
-\definesystemconstant {ukenglish} \definesystemconstant {uk}
-\definesystemconstant {usenglish} \definesystemconstant {us}
-\definesystemconstant {ukrainian} \definesystemconstant {ua}
-\definesystemconstant {greek} \definesystemconstant {gr}
-\definesystemconstant {ancientgreek} \definesystemconstant {agr}
-\definesystemconstant {vietnamese} \definesystemconstant {vi}
- \definesystemconstant {vn}
-\definesystemconstant {chinese} \definesystemconstant {cn}
-\definesystemconstant {japanese} \definesystemconstant {ja}
-\definesystemconstant {korean} \definesystemconstant {kr}
-\definesystemconstant {thai} \definesystemconstant {th} % mojca mentioned it at BT2013 but we need more info
+\definesystemconstant {afrikaans} \definesystemconstant {af}
+\definesystemconstant {arabic} \definesystemconstant {ar}
+\definesystemconstant {catalan} \definesystemconstant {ca}
+\definesystemconstant {chinese} \definesystemconstant {cn}
+\definesystemconstant {croatian} \definesystemconstant {hr}
+\definesystemconstant {czech} \definesystemconstant {cs}
+ \definesystemconstant {cz}
+\definesystemconstant {danish} \definesystemconstant {da}
+\definesystemconstant {dutch} \definesystemconstant {nl}
+\definesystemconstant {english} \definesystemconstant {en}
+\definesystemconstant {finish} \definesystemconstant {fi}
+\definesystemconstant {french} \definesystemconstant {fr}
+\definesystemconstant {german} \definesystemconstant {de}
+\definesystemconstant {hungarian} \definesystemconstant {hu}
+\definesystemconstant {italian} \definesystemconstant {it}
+\definesystemconstant {latin} \definesystemconstant {la}
+\definesystemconstant {ancientlatin} \definesystemconstant {ala}
+\definesystemconstant {lithuanian} \definesystemconstant {lt}
+\definesystemconstant {bokmal} \definesystemconstant {nb}
+\definesystemconstant {malayalam} \definesystemconstant {ml}
+\definesystemconstant {norwegian} \definesystemconstant {no}
+\definesystemconstant {nynorsk} \definesystemconstant {nn}
+\definesystemconstant {polish} \definesystemconstant {pl}
+\definesystemconstant {persian} \definesystemconstant {pe}
+\definesystemconstant {portuguese} \definesystemconstant {pt}
+\definesystemconstant {romanian} \definesystemconstant {ro}
+\definesystemconstant {russian} \definesystemconstant {ru}
+\definesystemconstant {slovak} \definesystemconstant {sk}
+\definesystemconstant {slovenian} \definesystemconstant {sl}
+\definesystemconstant {slovene} % obsolete
+\definesystemconstant {spanish} \definesystemconstant {es}
+\definesystemconstant {swedish} \definesystemconstant {sv}
+\definesystemconstant {turkish} \definesystemconstant {tr}
+\definesystemconstant {turkmen} \definesystemconstant {tk}
+\definesystemconstant {gbenglish} \definesystemconstant {gb}
+\definesystemconstant {ukenglish} \definesystemconstant {uk}
+\definesystemconstant {usenglish} \definesystemconstant {us}
+\definesystemconstant {ukrainian} \definesystemconstant {ua}
+\definesystemconstant {greek} \definesystemconstant {gr}
+\definesystemconstant {ancientgreek} \definesystemconstant {agr}
+\definesystemconstant {vietnamese} \definesystemconstant {vi}
+ \definesystemconstant {vn}
+\definesystemconstant {chinese} \definesystemconstant {cn}
+\definesystemconstant {japanese} \definesystemconstant {ja}
+\definesystemconstant {korean} \definesystemconstant {kr}
+\definesystemconstant {thai} \definesystemconstant {th} % mojca mentioned it at BT2013 but we need more info
%D For proper \UNICODE\ support we need a few font related constants.
@@ -440,6 +441,11 @@
\definesystemconstant {nd}
\definesystemconstant {nc}
+\definesystemconstant {traditional}
+\definesystemconstant {left}
+\definesystemconstant {middle}
+\definesystemconstant {right}
+
%D As the name of their define command states, the next set of constants is used in
%D the message macro's.
diff --git a/Master/texmf-dist/tex/context/base/node-acc.lua b/Master/texmf-dist/tex/context/base/mkiv/node-acc.lua
index e684aeb7b88..ed34dbec939 100644
--- a/Master/texmf-dist/tex/context/base/node-acc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-acc.lua
@@ -24,6 +24,9 @@ local getnext = nuts.getnext
local setfield = nuts.setfield
local setattr = nuts.setattr
+local setlink = nuts.setlink
+local setchar = nuts.setchar
+local setsubtype = nuts.setsubtype
local traverse_nodes = nuts.traverse
local traverse_id = nuts.traverse_id
@@ -31,8 +34,6 @@ local copy_node = nuts.copy
local free_nodelist = nuts.flush_list
local insert_after = nuts.insert_after
-local new_gluespec = nuts.pool.gluespec -- temp hack
-
local glue_code = nodecodes.glue
local kern_code = nodecodes.kern
local glyph_code = nodecodes.glyph
@@ -55,34 +56,25 @@ local function injectspaces(head)
while n do
local id = getid(n)
if id == glue_code then -- todo: check for subtype related to spacing (13/14 but most seems to be 0)
- -- if getfield(getfield(n,"spec"),"width") > 0 then -- threshold
--- if p and p_id == glyph_code then
+ -- if getfield(n,."width") > 0 then -- threshold
+ -- if p and p_id == glyph_code then
if p and getid(p) == glyph_code then
local g = copy_node(p)
local c = getfield(g,"components")
if c then -- it happens that we copied a ligature
free_nodelist(c)
setfield(g,"components",nil)
- setfield(g,"subtype",256)
+ setsubtype(g,256)
end
local a = getattr(n,a_characters)
- -- local s = copy_node(getfield(n,"spec"))
- -- this will be fixed in luatex but for now a temp hack (zero test)
- local s = getfield(n,"spec")
- s = s == 0 and new_gluespec(0) or copy_node(s)
- --
- setfield(g,"char",32)
- setfield(n,"spec",s)
- -- insert_after(p,p,g)
- setfield(p,"next",g)
- setfield(g,"prev",p)
- setfield(g,"next",n)
- setfield(n,"prev",g)
- setfield(s,"width",getfield(s,"width") - getfield(g,"width"))
+ setchar(g,32)
+ setlink(p,g)
+ setlink(g,n)
+-- we could cache as we now create many nodes
+ setfield(n,"width",getfield(n,"width") - getfield(g,"width"))
if a then
setattr(g,a_characters,a)
end
- setattr(s,a_characters,0)
setattr(n,a_characters,0)
nofreplaced = nofreplaced + 1
end
diff --git a/Master/texmf-dist/tex/context/base/node-aux.lua b/Master/texmf-dist/tex/context/base/mkiv/node-aux.lua
index 12da8ea8ab3..ebe113fc67a 100644
--- a/Master/texmf-dist/tex/context/base/node-aux.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-aux.lua
@@ -35,8 +35,14 @@ local getlist = nuts.getlist
local getfont = nuts.getfont
local getchar = nuts.getchar
local getattr = nuts.getattr
+local getfield = nuts.getfield
+
local setfield = nuts.setfield
local setattr = nuts.setattr
+local setlink = nuts.setlink
+local setlist = nuts.setlist
+local setnext = nuts.setnext
+local setprev = nuts.setprev
local traverse_nodes = nuts.traverse
local traverse_id = nuts.traverse_id
@@ -89,8 +95,10 @@ local function takebox(id)
if box then
local copy = copy_node(box)
local list = getlist(box)
- setfield(copy,"list",list)
- setfield(box,"list",nil)
+ if list then
+ setlist(copy,list)
+ setlist(box,nil)
+ end
texsetbox(id,nil)
return copy
end
@@ -103,6 +111,24 @@ function nodes.takebox(id)
end
end
+local splitbox = tex.splitbox
+nodes.splitbox = splitbox
+
+function nuts.splitbox(id,height)
+ return tonut(splitbox(id,height))
+end
+
+-- function nodes.takelist(n)
+-- -- when we need it
+-- end
+
+function nuts.takelist(n)
+ local l = getlist(n)
+ setlist(n)
+ free_node(n)
+ return l
+end
+
nuts.takebox = takebox
tex.takebox = nodes.takebox -- sometimes more clear
@@ -111,7 +137,7 @@ tex.takebox = nodes.takebox -- sometimes more clear
local function repackhlist(list,...)
local temp, b = hpack_nodes(list,...)
list = getlist(temp)
- setfield(temp,"list",nil)
+ setlist(temp)
free_node(temp)
return list, b
end
@@ -169,22 +195,6 @@ nuts.unsetattributes = unset_attributes nodes.unsetattribut
-- history:
--
--- function nodes.is_skipable(a,id) -- skipable nodes at the margins during character protrusion
--- return (
--- id ~= glyph_node
--- or id == ins_node
--- or id == mark_node
--- or id == adjust_node
--- or id == penalty_node
--- or (id == glue_node and a.spec.writable)
--- or (id == disc_node and getfield(a,"pre") == nil and getfield(a,"post") == nil and getfield(a,"replace") == nil)
--- or (id == math_node and getfield(a,"surround") == 0)
--- or (id == kern_node and (getfield(a,"kern") == 0 or getsubtype(subtype) == NORMAL))
--- or (id == hlist_node and getfield(a,"width") == 0 and getfield(a,"height") == 0 and getfield(a,"depth") == 0 and getlist(a) == nil)
--- or (id == whatsit_node and getsubtype(a) ~= pdf_refximage_node and getsubtype(a) ~= pdf_refxform_node)
--- )
--- end
---
-- local function glyph_width(a)
-- local ch = chardata[getfont(a)][getchar(a)]
-- return (ch and ch.width) or 0
@@ -311,7 +321,7 @@ local function firstcharinbox(n)
end
nuts .firstcharinbox = firstcharinbox
-nodes.firstcharinbox = firstcharinbox
+nodes.firstcharinbox = firstcharinbox -- hm, ok ?
nodes.firstcharacter = vianuts(firstcharacter)
interfaces.implement {
@@ -465,8 +475,8 @@ local function link(list,currentfont,currentattr,head,tail) -- an oldie, might b
elseif not head then
head, tail = h, t
else
- setfield(tail,"next",h)
- setfield(h,"prev",t)
+ setnext(tail,h)
+ setprev(h,t)
tail = t
end
end
@@ -489,8 +499,7 @@ local function link(list,currentfont,currentattr,head,tail) -- an oldie, might b
end
os.exit()
else
- setfield(tail,"next",n)
- setfield(n,"prev",tail)
+ setlink(tail,n)
if getnext(n) then
tail = find_tail(n)
else
@@ -529,7 +538,7 @@ end
nuts.locate = locate
-nodes.locate = function(start,wantedid,wantedsubtype)
+function nodes.locate(start,wantedid,wantedsubtype)
local found = locate(tonut(start),wantedid,wantedsubtype)
return found and tonode(found)
end
@@ -552,5 +561,3 @@ end
-- return 0
-- end
-- end
-
-
diff --git a/Master/texmf-dist/tex/context/base/node-bck.lua b/Master/texmf-dist/tex/context/base/mkiv/node-bck.lua
index 99992de0903..a095ac4c4d5 100644
--- a/Master/texmf-dist/tex/context/base/node-bck.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-bck.lua
@@ -28,19 +28,21 @@ local tonode = nuts.tonode
local tonut = nuts.tonut
local getfield = nuts.getfield
-local setfield = nuts.setfield
local getnext = nuts.getnext
local getprev = nuts.getprev
local getid = nuts.getid
local getlist = nuts.getlist
local getattr = nuts.getattr
-local setattr = nuts.setattr
local getsubtype = nuts.getsubtype
+local setfield = nuts.setfield
+local setattr = nuts.setattr
+local setlink = nuts.setlink
+local setlist = nuts.setlist
+
local traverse = nuts.traverse
local traverse_id = nuts.traverse_id
-
local new_rule = nodepool.rule
local new_glue = nodepool.glue
@@ -59,7 +61,7 @@ local function add_backgrounds(head) -- rather old code .. to be redone
if list then
local head = add_backgrounds(list)
if head then
- setfield(current,"list",head)
+ setlist(current,head)
list = head
end
end
@@ -85,13 +87,11 @@ local function add_backgrounds(head) -- rather old code .. to be redone
if transparency then
setattr(rule,a_transparency,transparency)
end
- setfield(rule,"next",glue)
- setfield(glue,"prev",rule)
+ setlink(rule,glue)
if list then
- setfield(glue,"next",list)
- setfield(list,"prev",glue)
+ setlink(glue,list)
end
- setfield(current,"list",rule)
+ setlist(current,rule)
end
end
end
@@ -146,13 +146,11 @@ local function add_alignbackgrounds(head)
if transparency then
setattr(rule,a_transparency,transparency)
end
- setfield(rule,"next",glue)
- setfield(glue,"prev",rule)
+ setlink(rule,glue)
if list then
- setfield(glue,"next",list)
- setfield(list,"prev",glue)
+ setlink(glue,list)
end
- setfield(current,"list",rule)
+ setlist(current,rule)
end
end
end
diff --git a/Master/texmf-dist/tex/context/base/node-bck.mkiv b/Master/texmf-dist/tex/context/base/mkiv/node-bck.mkiv
index ff0de6a5d0c..58edab6685c 100644
--- a/Master/texmf-dist/tex/context/base/node-bck.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-bck.mkiv
@@ -16,6 +16,8 @@
%D This is first attempt to replacing backgrounds in a few tables
%D mechanisms. When used more frequently, we can store the color
%D spec in the attribute.
+%D
+%D Maybe move some to the bar handler.
\unprotect
@@ -28,11 +30,16 @@
\def\colorattr#1%
{\ifcsname\??colorattribute\currentcolorprefix#1\endcsname
- \thecolorattr{\currentcolorprefix#1}%
+ \node_backgrounds_thecolorattr{\currentcolorprefix#1}%
\else\ifcsname\??colorattribute#1\endcsname
- \thecolorattr{#1}%
+ \node_backgrounds_thecolorattr{#1}%
\fi\fi}
+\def\node_backgrounds_thecolorattr#1%
+ {attr \colormodelattribute \attribute\colormodelattribute
+ attr \colorattribute \lastnamedcs
+ attr \transparencyattribute \thetransparencyattribute{#1} } % can be optimized
+
\def\thecolorattr#1%
{attr \colormodelattribute \attribute\colormodelattribute
attr \colorattribute \csname\??colorattribute#1\endcsname
@@ -40,9 +47,9 @@
\def\backgroundcolorattr#1%
{\ifcsname\??colorattribute\currentcolorprefix#1\endcsname
- \thebackgroundcolorattr{\currentcolorprefix#1}%
+ \node_backgrounds_thebackgroundcolorattr{\currentcolorprefix#1}%
\else\ifcsname\??colorattribute#1\endcsname
- \thebackgroundcolorattr{#1}%
+ \node_backgrounds_thebackgroundcolorattr{#1}%
\fi\fi}
\def\thebackgroundcolorattr#1%
@@ -51,6 +58,12 @@
attr \colorattribute \csname\??colorattribute#1\endcsname
attr \transparencyattribute \thetransparencyattribute{#1} } % can be optimized
+\def\node_backgrounds_thebackgroundcolorattr#1%
+ {attr \backgroundattribute \plusone
+ attr \colormodelattribute \attribute\colormodelattribute
+ attr \colorattribute \lastnamedcs
+ attr \transparencyattribute \thetransparencyattribute{#1} } % can be optimized
+
\def\thealignbackgroundcolorattr#1%
{attr \alignbackgroundattribute \plusone
attr \colormodelattribute \attribute\colormodelattribute
diff --git a/Master/texmf-dist/tex/context/base/node-dir.lua b/Master/texmf-dist/tex/context/base/mkiv/node-dir.lua
index 6ee5cd4b860..6ee5cd4b860 100644
--- a/Master/texmf-dist/tex/context/base/node-dir.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-dir.lua
diff --git a/Master/texmf-dist/tex/context/base/node-ext.lua b/Master/texmf-dist/tex/context/base/mkiv/node-ext.lua
index 82ec04ee592..82ec04ee592 100644
--- a/Master/texmf-dist/tex/context/base/node-ext.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-ext.lua
diff --git a/Master/texmf-dist/tex/context/base/node-fin.lua b/Master/texmf-dist/tex/context/base/mkiv/node-fin.lua
index 84c5b9a2f93..a2d63d38d45 100644
--- a/Master/texmf-dist/tex/context/base/node-fin.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-fin.lua
@@ -20,7 +20,6 @@ local tonode = nuts.tonode
local tonut = nuts.tonut
local getfield = nuts.getfield
-local setfield = nuts.setfield
local getnext = nuts.getnext
local getprev = nuts.getprev
local getid = nuts.getid
@@ -28,12 +27,16 @@ local getlist = nuts.getlist
local getleader = nuts.getleader
local getattr = nuts.getattr
+local setlist = nuts.setlist
+local setleader = nuts.setleader
+
local copy_node = nuts.copy
local insert_node_before = nuts.insert_before
local insert_node_after = nuts.insert_after
local nodecodes = nodes.nodecodes
local whatcodes = nodes.whatcodes
+local rulecodes = nodes.rulecodes
local glyph_code = nodecodes.glyph
local disc_code = nodecodes.disc
@@ -43,7 +46,7 @@ local whatsit_code = nodecodes.whatsit
local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
-local pdfliteral_code = whatcodes.pdfliteral
+local normal_rule = rulecodes.normal
local states = attributes.states
local numbers = attributes.numbers
@@ -160,10 +163,12 @@ function states.finalize(namespace,attribute,head) -- is this one ok?
head = tonut(head)
local id = getid(head)
if id == hlist_code or id == vlist_code then
- local list = getlist(head)
- if list then
- list = insert_node_before(list,list,copied(nsnone)) -- two return values
- setfield(head,"list",list)
+ local content = getlist(head)
+ if content then
+ local list = insert_node_before(content,content,copied(nsnone)) -- two return values
+ if list ~= content then
+ setlist(head,list)
+ end
end
else
head = insert_node_before(head,head,copied(nsnone))
@@ -185,8 +190,8 @@ local function process(namespace,attribute,head,inheritance,default) -- one attr
local id = getid(stack)
if id == glyph_code then
check = true
- -- elseif id == disc_code then
- -- check = true -- no longer needed as we flatten replace
+ elseif id == disc_code then
+ check = true -- no longer needed as we flatten replace
elseif id == glue_code then
leader = getleader(stack)
if leader then
@@ -200,22 +205,30 @@ local function process(namespace,attribute,head,inheritance,default) -- one attr
local outer = getattr(stack,attribute)
if outer ~= inheritance then
local list, ok = process(namespace,attribute,content,inheritance,outer)
- setfield(stack,"list",list)
+ if content ~= list then
+ setlist(stack,list)
+ end
done = done or ok
else
local list, ok = process(namespace,attribute,content,inheritance,default)
- setfield(stack,"list",list)
+ if content ~= list then
+ setlist(stack,list)
+ end
done = done or ok
end
else
local list, ok = process(namespace,attribute,content,inheritance,default)
- setfield(stack,"list",list)
+ if content ~= list then
+ setlist(stack,list)
+ end
done = done or ok
end
-- end nested --
end
elseif id == rule_code then
+-- if subtype(stack) == normal_rule then
check = getfield(stack,"width") ~= 0
+-- end
end
-- much faster this way than using a check() and nested() function
if check then
@@ -246,16 +259,22 @@ local function process(namespace,attribute,head,inheritance,default) -- one attr
local outer = getattr(stack,attribute)
if outer ~= inheritance then
local list, ok = process(namespace,attribute,leader,inheritance,outer)
- setfield(stack,"leader",list)
+ if leader ~= list then
+ setleader(stack,list)
+ end
done = done or ok
else
local list, ok = process(namespace,attribute,leader,inheritance,default)
- setfield(stack,"leader",list)
+ if leader ~= list then
+ setleader(stack,list)
+ end
done = done or ok
end
else
local list, ok = process(namespace,attribute,leader,inheritance,default)
- setfield(stack,"leader",list)
+ if leader ~= list then
+ setleader(stack,list)
+ end
done = done or ok
end
-- end nested --
@@ -300,8 +319,8 @@ local function selective(namespace,attribute,head,inheritance,default) -- two at
local id = getid(stack)
if id == glyph_code then
check = true
- -- elseif id == disc_code then
- -- check = true -- no longer needed as we flatten replace
+ elseif id == disc_code then
+ check = true -- notneeded when we flatten replace
elseif id == glue_code then
leader = getleader(stack)
if leader then
@@ -315,22 +334,30 @@ local function selective(namespace,attribute,head,inheritance,default) -- two at
local outer = getattr(stack,attribute)
if outer ~= inheritance then
local list, ok = selective(namespace,attribute,content,inheritance,outer)
- setfield(stack,"list",list)
+ if content ~= list then
+ setlist(stack,list)
+ end
done = done or ok
else
local list, ok = selective(namespace,attribute,content,inheritance,default)
- setfield(stack,"list",list)
+ if content ~= list then
+ setlist(stack,list)
+ end
done = done or ok
end
else
local list, ok = selective(namespace,attribute,content,inheritance,default)
- setfield(stack,"list",list)
+ if content ~= list then
+ setlist(stack,list)
+ end
done = done or ok
end
-- end nested
end
elseif id == rule_code then
+-- if subtype(stack) == normal_rule then
check = getfield(stack,"width") ~= 0
+-- end
end
if check then
@@ -359,16 +386,22 @@ local function selective(namespace,attribute,head,inheritance,default) -- two at
local outer = getatribute(stack,attribute)
if outer ~= inheritance then
local list, ok = selective(namespace,attribute,leader,inheritance,outer)
- setfield(stack,"leader",list)
+ if leader ~= list then
+ setleader(stack,list)
+ end
done = done or ok
else
local list, ok = selective(namespace,attribute,leader,inheritance,default)
- setfield(stack,"leader",list)
+ if leader ~= list then
+ setleader(stack,list)
+ end
done = done or ok
end
else
local list, ok = selective(namespace,attribute,leader,inheritance,default)
- setfield(stack,"leader",list)
+ if leader ~= list then
+ setleader(stack,list)
+ end
done = done or ok
end
-- end nested
@@ -433,23 +466,31 @@ local function stacked(namespace,attribute,head,default) -- no triggering, no in
current = a
head = insert_node_before(head,stack,copied(nsdata[a]))
local list = stacked(namespace,attribute,content,current) -- two return values
- setfield(stack,"list",list)
+ if content ~= list then
+ setlist(stack,list)
+ end
done = true
head, stack = insert_node_after(head,stack,copied(nsnone))
current = p
else
local list, ok = stacked(namespace,attribute,content,current)
- setfield(stack,"list",list) -- only if ok
+ if content ~= list then
+ setlist(stack,list) -- only if ok
+ end
done = done or ok
end
else
local list, ok = stacked(namespace,attribute,content,current)
- setfield(stack,"list",list) -- only if ok
+ if content ~= list then
+ setlist(stack,list) -- only if ok
+ end
done = done or ok
end
end
elseif id == rule_code then
+-- if subtype(stack) == normal_rule then
check = getfield(stack,"width") ~= 0
+-- end
end
if check then
@@ -462,7 +503,9 @@ local function stacked(namespace,attribute,head,default) -- no triggering, no in
end
if leader then
local list, ok = stacked(namespace,attribute,content,current)
- setfield(stack,"leader",list) -- only if ok
+ if leader ~= list then
+ setleader(stack,list) -- only if ok
+ end
done = done or ok
leader = false
end
@@ -521,21 +564,29 @@ local function stacker(namespace,attribute,head,default) -- no triggering, no in
if a and attrib ~= a and nslistwise[a] then -- viewerlayer
head = insert_node_before(head,current,copied(nsdata[a]))
local list = stacker(namespace,attribute,content,a)
- setfield(current,"list",list)
+ if list ~= content then
+ setlist(current,list)
+ end
done = true
head, current = insert_node_after(head,current,copied(nsnone))
else
local list, ok = stacker(namespace,attribute,content,attrib)
- setfield(current,"list",list)
+ if content ~= list then
+ setlist(current,list)
+ end
done = done or ok
end
else
local list, ok = stacker(namespace,attribute,content,default)
- setfield(current,"list",list)
+ if list ~= content then
+ setlist(current,list)
+ end
done = done or ok
end
elseif id == rule_code then
+-- if subtype(stack) == normal_rule then
check = getfield(current,"width") ~= 0
+-- end
end
if check then
diff --git a/Master/texmf-dist/tex/context/base/node-fin.mkiv b/Master/texmf-dist/tex/context/base/mkiv/node-fin.mkiv
index 7c95699dd12..413a00722d3 100644
--- a/Master/texmf-dist/tex/context/base/node-fin.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-fin.mkiv
@@ -45,18 +45,18 @@
\def\dodoattributedcopy
{\startinheritattributes
\ifvbox\attributeboxcount
- \vbox{\unvcopy\attributeboxcount}%
+ \vpack{\unvcopy\attributeboxcount}%
\else
- \hbox{\unhcopy\attributeboxcount}%
+ \hpack{\unhcopy\attributeboxcount}%
\fi
\stopinheritattributes}
\def\dodoattributedbox
{\startinheritattributes
\ifvbox\attributeboxcount
- \vbox{\unvbox\attributeboxcount}%
+ \vpack{\unvbox\attributeboxcount}%
\else
- \hbox{\unhbox\attributeboxcount}%
+ \hpack{\unhbox\attributeboxcount}%
\fi
\stopinheritattributes}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-fnt.lua b/Master/texmf-dist/tex/context/base/mkiv/node-fnt.lua
new file mode 100644
index 00000000000..7f0d239979a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-fnt.lua
@@ -0,0 +1,514 @@
+if not modules then modules = { } end modules ['node-fnt'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+if not context then os.exit() end -- generic function in node-dum
+
+local next, type = next, type
+local concat, keys = table.concat, table.keys
+
+local nodes, node, fonts = nodes, node, fonts
+
+local trace_characters = false trackers.register("nodes.characters", function(v) trace_characters = v end)
+local trace_fontrun = false trackers.register("nodes.fontrun", function(v) trace_fontrun = v end)
+local trace_variants = false trackers.register("nodes.variants", function(v) trace_variants = v end)
+
+local force_discrun = true directives.register("nodes.discrun", function(v) force_discrun = v end)
+local force_boundaryrun = true directives.register("nodes.boundaryrun", function(v) force_boundaryrun = v end)
+local force_basepass = true directives.register("nodes.basepass", function(v) force_basepass = v end)
+
+local report_fonts = logs.reporter("fonts","processing")
+
+local fonthashes = fonts.hashes
+local fontdata = fonthashes.identifiers
+local fontvariants = fonthashes.variants
+local fontmodes = fonthashes.modes
+
+local otf = fonts.handlers.otf
+
+local starttiming = statistics.starttiming
+local stoptiming = statistics.stoptiming
+
+local nodecodes = nodes.nodecodes
+local handlers = nodes.handlers
+
+local nuts = nodes.nuts
+local tonut = nuts.tonut
+local tonode = nuts.tonode
+
+local getattr = nuts.getattr
+local getid = nuts.getid
+local getfont = nuts.getfont
+local getsubtype = nuts.getsubtype
+local getchar = nuts.getchar
+local getdisc = nuts.getdisc
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getboth = nuts.getboth
+local getfield = nuts.getfield
+----- getdisc = nuts.getdisc
+local setchar = nuts.setchar
+local setlink = nuts.setlink
+local setfield = nuts.setfield
+local setprev = nuts.setprev
+
+local isglyph = nuts.isglyph -- unchecked
+local ischar = nuts.ischar -- checked
+
+local traverse_id = nuts.traverse_id
+local traverse_char = nuts.traverse_char
+local remove_node = nuts.remove
+local protect_glyph = nuts.protect_glyph
+local free_node = nuts.free
+
+local glyph_code = nodecodes.glyph
+local disc_code = nodecodes.disc
+local boundary_code = nodecodes.boundary
+local word_boundary = nodes.boundarycodes.word
+
+local setmetatableindex = table.setmetatableindex
+
+-- some tests with using an array of dynamics[id] and processes[id] demonstrated
+-- that there was nothing to gain (unless we also optimize other parts)
+--
+-- maybe getting rid of the intermediate shared can save some time
+
+-- potential speedup: check for subtype < 256 so that we can remove that test
+-- elsewhere, danger: injected nodes will not be dealt with but that does not
+-- happen often; we could consider processing sublists but that might need more
+-- checking later on; the current approach also permits variants
+
+local run = 0
+
+local setfontdynamics = { }
+local fontprocesses = { }
+
+-- setmetatableindex(setfontdynamics, function(t,font)
+-- local tfmdata = fontdata[font]
+-- local shared = tfmdata.shared
+-- local v = shared and shared.dynamics and otf.setdynamics or false
+-- t[font] = v
+-- return v
+-- end)
+
+setmetatableindex(setfontdynamics, function(t,font)
+ local tfmdata = fontdata[font]
+ local shared = tfmdata.shared
+ local f = shared and shared.dynamics and otf.setdynamics or false
+ if f then
+ local v = { }
+ t[font] = v
+ setmetatableindex(v,function(t,k)
+ local v = f(font,k)
+ t[k] = v
+ return v
+ end)
+ return v
+ else
+ t[font] = false
+ return false
+ end
+end)
+
+setmetatableindex(fontprocesses, function(t,font)
+ local tfmdata = fontdata[font]
+ local shared = tfmdata.shared -- we need to check shared, only when same features
+ local processes = shared and shared.processes
+ if processes and #processes > 0 then
+ t[font] = processes
+ return processes
+ else
+ t[font] = false
+ return false
+ end
+end)
+
+fonts.hashes.setdynamics = setfontdynamics
+fonts.hashes.processes = fontprocesses
+
+-- if we forget about basemode we don't need to test too much here and we can consider running
+-- over sub-ranges .. this involves a bit more initializations but who cares .. in that case we
+-- also need to use the stop criterium (we already use head too) ... we cannot use traverse
+-- then, so i'll test it on some local clone first ... the only pitfall is changed directions
+-- inside a run which means that we need to keep track of this which in turn complicates matters
+-- in a way i don't like
+
+-- we need to deal with the basemode fonts here and can only run over ranges as we
+-- otherwise get luatex craches due to all kind of asserts in the disc/lig builder
+
+local ligaturing = nuts.ligaturing
+local kerning = nuts.kerning
+
+local expanders
+
+function fonts.setdiscexpansion(v)
+ if v == nil or v == true then
+ expanders = languages and languages.expanders
+ elseif type(v) == "table" then
+ expanders = v
+ else
+ expanders = false
+ end
+end
+
+function fonts.getdiscexpansion()
+ return expanders and true or false
+end
+
+fonts.setdiscexpansion(true)
+
+function handlers.characters(head)
+ -- either next or not, but definitely no already processed list
+ starttiming(nodes)
+
+ local usedfonts = { }
+ local attrfonts = { }
+ local basefonts = { }
+ local a, u, b = 0, 0, 0
+ local basefont = nil
+ local prevfont = nil
+ local prevattr = 0
+ local mode = nil
+ local done = false
+ local variants = nil
+ local redundant = nil
+
+ if trace_fontrun then
+ run = run + 1
+ report_fonts()
+ report_fonts("checking node list, run %s",run)
+ report_fonts()
+ local n = tonut(head)
+ while n do
+ local char, id = isglyph(n)
+ if char then
+ local font = getfont(n)
+ local attr = getattr(n,0) or 0
+ report_fonts("font %03i, dynamic %03i, glyph %C",font,attr,char)
+ elseif id == disc_code then
+ report_fonts("[disc] %s",nodes.listtoutf(n,true,false,n))
+ elseif id == boundary_code then
+ report_fonts("[boundary] %i:%i",getsubtype(n),getfield(n,"value"))
+ else
+ report_fonts("[%s]",nodecodes[id])
+ end
+ n = getnext(n)
+ end
+ end
+
+ local nuthead = tonut(head)
+
+ for n in traverse_char(nuthead) do
+ local font = getfont(n)
+ local attr = getattr(n,0) or 0 -- zero attribute is reserved for fonts in context
+ if font ~= prevfont or attr ~= prevattr then
+ prevfont = font
+ prevattr = attr
+ mode = fontmodes[font] -- we can also avoid the attr check
+ variants = fontvariants[font]
+ if mode == "none" then
+ -- skip
+ protect_glyph(n)
+ else
+ if basefont then
+ basefont[2] = getprev(n)
+ end
+ if attr > 0 then
+ local used = attrfonts[font]
+ if not used then
+ used = { }
+ attrfonts[font] = used
+ end
+ if not used[attr] then
+ local fd = setfontdynamics[font]
+ if fd then
+ used[attr] = fd[attr]
+ a = a + 1
+ elseif force_basepass then
+ b = b + 1
+ basefont = { n, nil }
+ basefonts[b] = basefont
+ end
+ end
+ else
+ local used = usedfonts[font]
+ if not used then
+ local fp = fontprocesses[font]
+ if fp then
+ usedfonts[font] = fp
+ u = u + 1
+ elseif force_basepass then
+ b = b + 1
+ basefont = { n, nil }
+ basefonts[b] = basefont
+ end
+ end
+ end
+ end
+ end
+ if variants then
+ local char = getchar(n)
+ if char >= 0xFE00 and (char <= 0xFE0F or (char >= 0xE0100 and char <= 0xE01EF)) then
+ local hash = variants[char]
+ if hash then
+ local p = getprev(n)
+ if p then
+ local char = ischar(p) -- checked
+ local variant = hash[char]
+ if variant then
+ if trace_variants then
+ report_fonts("replacing %C by %C",char,variant)
+ end
+ setchar(p,variant)
+ if not redundant then
+ redundant = { n }
+ else
+ redundant[#redundant+1] = n
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+
+ if force_boundaryrun then
+
+ -- we can inject wordboundaries and then let the hyphenator do its work
+ -- but we need to get rid of those nodes in order to build ligatures
+ -- and kern (a rather context thing)
+
+ for b in traverse_id(boundary_code,nuthead) do
+ if getsubtype(b) == word_boundary then
+ if redundant then
+ redundant[#redundant+1] = b
+ else
+ redundant = { b }
+ end
+ end
+ end
+
+ end
+
+ if redundant then
+ for i=1,#redundant do
+ local r = redundant[i]
+ local p, n = getboth(r)
+ if r == nuthead then
+ nuthead = n
+ setprev(n)
+ else
+ setlink(p,n)
+ end
+ if b > 0 then
+ for i=1,b do
+ local bi = basefonts[i]
+ if r == bi[1] then
+ bi[1] = n
+ end
+ if r == bi[2] then
+ bi[2] = n
+ end
+ end
+ end
+ free_node(r)
+ end
+ end
+
+ local e = 0
+
+ if force_discrun then
+
+ -- basefont is not supported in disc only runs ... it would mean a lot of
+ -- ranges .. we could try to run basemode as a separate processor run but
+ -- not for now (we can consider it when the new node code is tested
+
+ -- local prevfont = nil
+ -- local prevattr = 0
+
+ for d in traverse_id(disc_code,nuthead) do
+ -- we could use first_glyph, only doing replace is good enough
+ local _, _, r = getdisc(d)
+ if r then
+ for n in traverse_char(r) do
+ local font = getfont(n)
+ local attr = getattr(n,0) or 0 -- zero attribute is reserved for fonts in context
+ if font ~= prevfont or attr ~= prevattr then
+ if attr > 0 then
+ local used = attrfonts[font]
+ if not used then
+ used = { }
+ attrfonts[font] = used
+ end
+ if not used[attr] then
+ local fd = setfontdynamics[font]
+ if fd then
+ used[attr] = fd[attr]
+ a = a + 1
+ end
+ end
+ else
+ local used = usedfonts[font]
+ if not used then
+ local fp = fontprocesses[font]
+ if fp then
+ usedfonts[font] = fp
+ u = u + 1
+ end
+ end
+ end
+ prevfont = font
+ prevattr = attr
+ end
+ end
+ break
+ elseif expanders then
+ local subtype = getsubtype(d)
+ if subtype == discretionary_code then
+ -- already done when replace
+ else
+ expanders[subtype](d)
+ e = e + 1
+ end
+ end
+ end
+
+ end
+
+ if trace_fontrun then
+ report_fonts()
+ report_fonts("statics : %s",u > 0 and concat(keys(usedfonts)," ") or "none")
+ report_fonts("dynamics: %s",a > 0 and concat(keys(attrfonts)," ") or "none")
+ report_fonts("built-in: %s",b > 0 and b or "none")
+ report_fonts("removed : %s",redundant and #redundant > 0 and #redundant or "none")
+ if expanders then
+ report_fonts("expanded: %s",e > 0 and e or "none")
+ end
+ report_fonts()
+ end
+ -- in context we always have at least 2 processors
+ if u == 0 then
+ -- skip
+ elseif u == 1 then
+ local font, processors = next(usedfonts)
+ for i=1,#processors do
+ local h, d = processors[i](head,font,0)
+ if d then
+ head = h or head
+ done = true
+ end
+ end
+ else
+ for font, processors in next, usedfonts do
+ for i=1,#processors do
+ local h, d = processors[i](head,font,0)
+ if d then
+ head = h or head
+ done = true
+ end
+ end
+ end
+ end
+ if a == 0 then
+ -- skip
+ elseif a == 1 then
+ local font, dynamics = next(attrfonts)
+ for attribute, processors in next, dynamics do -- attr can switch in between
+ for i=1,#processors do
+ local h, d = processors[i](head,font,attribute)
+ if d then
+ head = h or head
+ done = true
+ end
+ end
+ end
+ else
+ for font, dynamics in next, attrfonts do
+ for attribute, processors in next, dynamics do -- attr can switch in between
+ for i=1,#processors do
+ local h, d = processors[i](head,font,attribute)
+ if d then
+ head = h or head
+ done = true
+ end
+ end
+ end
+ end
+ end
+ if b == 0 then
+ -- skip
+ elseif b == 1 then
+ -- only one font
+ local range = basefonts[1]
+ local start = range[1]
+ local stop = range[2]
+ if (start or stop) and (start ~= stop) then
+ local front = nuthead == start
+ if stop then
+ start, stop = ligaturing(start,stop)
+ start, stop = kerning(start,stop)
+ elseif start then -- safeguard
+ start = ligaturing(start)
+ start = kerning(start)
+ end
+ if front then
+ head = tonode(start)
+ end
+ end
+ else
+ -- multiple fonts
+ for i=1,b do
+ local range = basefonts[i]
+ local start = range[1]
+ local stop = range[2]
+ if start then
+ local front = nuthead == start
+ local prev, next
+ if stop then
+ next = getnext(stop)
+ start, stop = ligaturing(start,stop)
+ start, stop = kerning(start,stop)
+ else
+ prev = getprev(start)
+ start = ligaturing(start)
+ start = kerning(start)
+ end
+ if prev then
+ setlink(prev,start)
+ end
+ if next then
+ setlink(stop,next)
+ end
+ if front and nuthead ~= start then
+ head = tonode(nuthead)
+ end
+ end
+ end
+ end
+ stoptiming(nodes)
+ if trace_characters then
+ nodes.report(head,done)
+ end
+ return head, true
+end
+
+local d_protect_glyphs = nuts.protect_glyphs
+local d_unprotect_glyphs = nuts.unprotect_glyphs
+
+handlers.protectglyphs = function(n) return d_protect_glyphs (tonut(n)) end
+handlers.unprotectglyphs = function(n) return d_unprotect_glyphs(tonut(n)) end
+
+-- function handlers.protectglyphs(h)
+-- local h = tonut(h)
+-- for n in traverse_id(disc_code,h) do
+-- local pre, post, replace = getdisc(n)
+-- if pre then d_protect_glyphs(pre) end
+-- if post then d_protect_glyphs(post) end
+-- if replace then d_protect_glyphs(replace) end
+-- end
+-- return d_protect_glyphs(h)
+-- end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/node-ini.lua
new file mode 100644
index 00000000000..bb8a7d33121
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-ini.lua
@@ -0,0 +1,356 @@
+if not modules then modules = { } end modules ['node-ini'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+--[[ldx--
+<p>Most of the code that had accumulated here is now separated in
+modules.</p>
+--ldx]]--
+
+-- this module is being reconstructed
+
+-- todo: query names with new node.subtypes
+
+local next, type, tostring = next, type, tostring
+local gsub = string.gsub
+local concat, remove = table.concat, table.remove
+local sortedhash, sortedkeys, swapped = table.sortedhash, table.sortedkeys, table.swapped
+
+--[[ldx--
+<p>Access to nodes is what gives <l n='luatex'/> its power. Here we
+implement a few helper functions. These functions are rather optimized.</p>
+--ldx]]--
+
+--[[ldx--
+<p>When manipulating node lists in <l n='context'/>, we will remove
+nodes and insert new ones. While node access was implemented, we did
+quite some experiments in order to find out if manipulating nodes
+in <l n='lua'/> was feasible from the perspective of performance.</p>
+
+<p>First of all, we noticed that the bottleneck is more with excessive
+callbacks (some gets called very often) and the conversion from and to
+<l n='tex'/>'s datastructures. However, at the <l n='lua'/> end, we
+found that inserting and deleting nodes in a table could become a
+bottleneck.</p>
+
+<p>This resulted in two special situations in passing nodes back to
+<l n='tex'/>: a table entry with value <type>false</type> is ignored,
+and when instead of a table <type>true</type> is returned, the
+original table is used.</p>
+
+<p>Insertion is handled (at least in <l n='context'/> as follows. When
+we need to insert a node at a certain position, we change the node at
+that position by a dummy node, tagged <type>inline</type> which itself
+has_attribute the original node and one or more new nodes. Before we pass
+back the list we collapse the list. Of course collapsing could be built
+into the <l n='tex'/> engine, but this is a not so natural extension.</p>
+
+<p>When we collapse (something that we only do when really needed), we
+also ignore the empty nodes. [This is obsolete!]</p>
+--ldx]]--
+
+-- local gf = node.direct.getfield
+-- local n = table.setmetatableindex("number")
+-- function node.direct.getfield(a,b) n[b] = n[b] + 1 print(b,n[b]) return gf(a,b) end
+
+nodes = nodes or { }
+local nodes = nodes
+nodes.handlers = nodes.handlers or { }
+
+local mark = utilities.storage.mark
+local allocate = utilities.storage.allocate
+local formatcolumns = utilities.formatters.formatcolumns
+
+local getsubtypes = node.subtypes
+
+-- local listcodes = allocate {
+-- [0] = "unknown",
+-- [1] = "line",
+-- [2] = "box",
+-- [3] = "indent",
+-- [4] = "alignment", -- row or column
+-- [5] = "cell",
+-- [6] = "equation",
+-- [7] = "equationnumber",
+-- }
+
+local listcodes = mark(getsubtypes("list"))
+
+-- local rulecodes = allocate {
+-- [0] = "normal",
+-- [1] = "box",
+-- [2] = "image",
+-- [3] = "empty",
+-- [4] = "user",
+-- }
+
+local rulecodes = mark(getsubtypes("rule"))
+
+-- local glyphcodes = allocate {
+-- [0] = "character",
+-- [1] = "glyph",
+-- [2] = "ligature",
+-- [3] = "ghost",
+-- [4] = "left",
+-- [5] = "right",
+-- }
+
+local glyphcodes = mark(getsubtypes("glyph"))
+
+-- local disccodes = allocate {
+-- [0] = "discretionary", -- \discretionary
+-- [1] = "explicit", -- \-
+-- [2] = "automatic", -- following a -
+-- [3] = "regular", -- by hyphenator: simple
+-- [4] = "first", -- by hyphenator: hard first item
+-- [5] = "second", -- by hyphenator: hard second item
+-- }
+
+local disccodes = mark(getsubtypes("disc"))
+
+-- local skipcodes = allocate {
+-- [ 0] = "userskip",
+-- [ 1] = "lineskip",
+-- [ 2] = "baselineskip",
+-- [ 3] = "parskip",
+-- [ 4] = "abovedisplayskip",
+-- [ 5] = "belowdisplayskip",
+-- [ 6] = "abovedisplayshortskip",
+-- [ 7] = "belowdisplayshortskip",
+-- [ 8] = "leftskip",
+-- [ 9] = "rightskip",
+-- [ 10] = "topskip",
+-- [ 11] = "splittopskip",
+-- [ 12] = "tabskip",
+-- [ 13] = "spaceskip",
+-- [ 14] = "xspaceskip",
+-- [ 15] = "parfillskip",
+-- [ 16] = "mathskip", -- experiment
+-- [ 17] = "thinmuskip",
+-- [ 18] = "medmuskip",
+-- [ 19] = "thickmuskip",
+-- [ 98] = "conditionalmathglue",
+-- [ 99] = "muskip",
+-- [100] = "leaders",
+-- [101] = "cleaders",
+-- [102] = "xleaders",
+-- [103] = "gleaders",
+-- }
+
+local skipcodes = mark(getsubtypes("glue"))
+
+-- local leadercodes = allocate {
+-- [100] = "leaders",
+-- [101] = "cleaders",
+-- [102] = "xleaders",
+-- [103] = "gleaders",
+-- }
+
+local leadercodes = mark(getsubtypes("leader"))
+
+-- local fillcodes = allocate {
+-- [0] = "stretch",
+-- [1] = "fi",
+-- [2] = "fil",
+-- [3] = "fill",
+-- [4] = "filll",
+-- }
+
+local fillcodes = mark(getsubtypes("fill"))
+
+-- for now:
+
+local boundarycodes = allocate {
+ [0] = "cancel",
+ [1] = "user",
+ [2] = "protrusion",
+ [3] = "word",
+}
+
+-- local boundarycodes = mark(getsubtypes("boundary"))
+
+-- local penaltycodes = allocate { -- unfortunately not used (yet)
+-- [ 0] = "userpenalty",
+-- }
+
+local penaltycodes = mark(getsubtypes("penalty"))
+
+table.setmetatableindex(penaltycodes,function(t,k) return "userpenalty" end) -- not used anyway
+
+-- local kerncodes = allocate {
+-- [0] = "fontkern",
+-- [1] = "userkern",
+-- [2] = "accentkern",
+-- [3] = "italiccorrection",
+-- }
+
+local kerncodes = mark(getsubtypes("kern"))
+
+-- local margincodes = allocate {
+-- [0] = "left",
+-- [1] = "right",
+-- }
+
+local margincodes = mark(getsubtypes("marginkern"))
+
+-- local mathcodes = allocate {
+-- [0] = "beginmath",
+-- [1] = "endmath",
+-- }
+
+local mathcodes = mark(getsubtypes("math"))
+
+-- local noadcodes = allocate { -- simple nodes
+-- [ 0] = "ord",
+-- [ 1] = "opdisplaylimits",
+-- [ 2] = "oplimits",
+-- [ 3] = "opnolimits",
+-- [ 4] = "bin",
+-- [ 5] = "rel",
+-- [ 6] = "open",
+-- [ 7] = "close",
+-- [ 8] = "punct",
+-- [ 9] = "inner",
+-- [10] = "under",
+-- [11] = "over",
+-- [12] = "vcenter",
+-- }
+
+local noadcodes = mark(getsubtypes("noad"))
+
+-- local radicalcodes = allocate {
+-- [0] = "radical",
+-- [1] = "uradical",
+-- [2] = "uroot",
+-- [3] = "uunderdelimiter",
+-- [4] = "uoverdelimiter",
+-- [5] = "udelimiterunder",
+-- [6] = "udelimiterover",
+-- }
+
+local radicalcodes = mark(getsubtypes("radical"))
+
+-- local accentcodes = allocate {
+-- [0] = "bothflexible",
+-- [1] = "fixedtop",
+-- [2] = "fixedbottom",
+-- [3] = "fixedboth",
+-- }
+
+local accentcodes = mark(getsubtypes("accent"))
+
+-- local fencecodes = allocate {
+-- [0] = "unset",
+-- [1] = "left",
+-- [2] = "middle",
+-- [3] = "right",
+-- }
+
+local fencecodes = mark(getsubtypes("fence"))
+
+-- maybe we also need fractioncodes
+
+local function simplified(t)
+ local r = { }
+ for k, v in next, t do
+ r[k] = gsub(v,"_","")
+ end
+ return r
+end
+
+local nodecodes = simplified(node.types())
+local whatcodes = simplified(node.whatsits())
+
+skipcodes = allocate(swapped(skipcodes,skipcodes))
+boundarycodes = allocate(swapped(boundarycodes,boundarycodes))
+noadcodes = allocate(swapped(noadcodes,noadcodes))
+radicalcodes = allocate(swapped(radicalcodes,radicalcodes))
+nodecodes = allocate(swapped(nodecodes,nodecodes))
+whatcodes = allocate(swapped(whatcodes,whatcodes))
+listcodes = allocate(swapped(listcodes,listcodes))
+glyphcodes = allocate(swapped(glyphcodes,glyphcodes))
+kerncodes = allocate(swapped(kerncodes,kerncodes))
+penaltycodes = allocate(swapped(penaltycodes,penaltycodes))
+mathcodes = allocate(swapped(mathcodes,mathcodes))
+fillcodes = allocate(swapped(fillcodes,fillcodes))
+margincodes = allocate(swapped(margincodes,margincodes))
+disccodes = allocate(swapped(disccodes,disccodes))
+accentcodes = allocate(swapped(accentcodes,accentcodes))
+fencecodes = allocate(swapped(fencecodes,fencecodes))
+rulecodes = allocate(swapped(rulecodes,rulecodes))
+leadercodes = allocate(swapped(leadercodes,leadercodes))
+
+nodes.skipcodes = skipcodes nodes.gluecodes = skipcodes -- more official
+nodes.boundarycodes = boundarycodes
+nodes.noadcodes = noadcodes
+nodes.nodecodes = nodecodes
+nodes.whatcodes = whatcodes nodes.whatsitcodes = whatcodes -- more official
+nodes.listcodes = listcodes
+nodes.glyphcodes = glyphcodes
+nodes.kerncodes = kerncodes
+nodes.penaltycodes = penaltycodes
+nodes.mathcodes = mathcodes
+nodes.fillcodes = fillcodes
+nodes.margincodes = margincodes nodes.marginkerncodes = margincodes
+nodes.disccodes = disccodes nodes.discretionarycodes = disccodes
+nodes.accentcodes = accentcodes
+nodes.radicalcodes = radicalcodes
+nodes.fencecodes = fencecodes
+nodes.rulecodes = rulecodes
+nodes.leadercodes = leadercodes
+
+listcodes.row = listcodes.alignment
+listcodes.column = listcodes.alignment
+
+kerncodes.kerning = kerncodes.fontkern
+
+kerncodes.italiccorrection = kerncodes.italiccorrection or 1 -- new
+
+nodes.codes = allocate { -- mostly for listing
+ glue = skipcodes,
+ boundary = boundarycodes,
+ noad = noadcodes,
+ node = nodecodes,
+ hlist = listcodes,
+ vlist = listcodes,
+ glyph = glyphcodes,
+ kern = kerncodes,
+ penalty = penaltycodes,
+ math = mathnodes,
+ fill = fillcodes,
+ margin = margincodes,
+ disc = disccodes,
+ whatsit = whatcodes,
+ accent = accentcodes,
+ fence = fencecodes,
+}
+
+local report_codes = logs.reporter("nodes","codes")
+
+function nodes.showcodes()
+ local t = { }
+ for name, codes in sortedhash(nodes.codes) do
+ local sorted = sortedkeys(codes)
+ for i=1,#sorted do
+ local s = sorted[i]
+ if type(s) ~= "number" then
+ t[#t+1] = { name, s, codes[s] }
+ end
+ end
+ end
+ formatcolumns(t)
+ for k=1,#t do
+ report_codes (t[k])
+ end
+end
+
+trackers.register("system.showcodes", nodes.showcodes)
+
+if not nodecodes.dir then
+ report_codes("use a newer version of luatex")
+ os.exit()
+end
diff --git a/Master/texmf-dist/tex/context/base/node-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/node-ini.mkiv
index d04e647de42..d04e647de42 100644
--- a/Master/texmf-dist/tex/context/base/node-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-ini.mkiv
diff --git a/Master/texmf-dist/tex/context/base/node-ltp.lua b/Master/texmf-dist/tex/context/base/mkiv/node-ltp.lua
index e4956f7df8e..ae17ab9ef00 100644
--- a/Master/texmf-dist/tex/context/base/node-ltp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-ltp.lua
@@ -20,6 +20,9 @@ if not modules then modules = { } end modules ['node-par'] = {
-- todo: fix line numbers (cur_list.pg_field needed)
-- todo: check and improve protrusion
-- todo: arabic etc (we could use pretty large scales there) .. marks and cursive
+-- todo: see: we need to check this with the latest patches to the tex kernel
+
+-- todo: optimize a bit more (less par.*)
--[[
@@ -192,15 +195,28 @@ local tonut = nuts.tonut
local tonode = nuts.tonode
local getfield = nuts.getfield
-local setfield = nuts.setfield
local getid = nuts.getid
local getsubtype = nuts.getsubtype
local getnext = nuts.getnext
local getprev = nuts.getprev
+local getboth = nuts.getboth
local getlist = nuts.getlist
local getfont = nuts.getfont
local getchar = nuts.getchar
+local getdisc = nuts.getdisc
local getattr = nuts.getattr
+local getdisc = nuts.getdisc
+
+local isglyph = nuts.isglyph
+
+local setfield = nuts.setfield
+local setlink = nuts.setlink
+local setlist = nuts.setlist
+local setboth = nuts.setboth
+local setnext = nuts.setnext
+local setprev = nuts.setprev
+local setdisc = nuts.setdisc
+local setsubtype = nuts.setsubtype
local slide_nodelist = nuts.slide -- get rid of this, probably ok > 78.2
local find_tail = nuts.tail
@@ -221,7 +237,6 @@ local setnodecolor = nodes.tracers.colors.set
local nodepool = nuts.pool
local nodecodes = nodes.nodecodes
-local whatcodes = nodes.whatcodes
local kerncodes = nodes.kerncodes
local glyphcodes = nodes.glyphcodes
local gluecodes = nodes.gluecodes
@@ -229,6 +244,7 @@ local margincodes = nodes.margincodes
local disccodes = nodes.disccodes
local mathcodes = nodes.mathcodes
local fillcodes = nodes.fillcodes
+local boundarycodes = nodes.boundarycodes
local temp_code = nodecodes.temp
local glyph_code = nodecodes.glyph
@@ -236,7 +252,6 @@ local ins_code = nodecodes.ins
local mark_code = nodecodes.mark
local adjust_code = nodecodes.adjust
local penalty_code = nodecodes.penalty
-local whatsit_code = nodecodes.whatsit
local disc_code = nodecodes.disc
local math_code = nodecodes.math
local kern_code = nodecodes.kern
@@ -245,16 +260,18 @@ local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
local unset_code = nodecodes.unset
local marginkern_code = nodecodes.marginkern
+local dir_code = nodecodes.dir
+local boundary_code = nodecodes.boundary
+
+local protrusion_code = boundarycodes.protrusion
local leaders_code = gluecodes.leaders
-local localpar_code = whatcodes.localpar
-local dir_code = whatcodes.dir
-local pdfrefximage_code = whatcodes.pdfrefximage
-local pdfrefxform_code = whatcodes.pdfrefxform
+local localpar_code = nodecodes.localpar
local kerning_code = kerncodes.kerning -- font kern
local userkern_code = kerncodes.userkern
+local italickern_code = kerncodes.italiccorrection
local ligature_code = glyphcodes.ligature
@@ -284,6 +301,7 @@ local infinite_penalty = 10000
local eject_penalty = -10000
local infinite_badness = 10000
local awful_badness = 0x3FFFFFFF
+local ignore_depth = -65536000
local fit_very_loose_class = 0 -- fitness for lines stretching more than their stretchability
local fit_loose_class = 1 -- fitness for lines stretching 0.5 to 1.0 of their stretchability
@@ -352,7 +370,8 @@ local function inject_dirs_at_end_of_line(stack,current,start,stop)
local n = stack.n
local h = nil
while start and start ~= stop do
- if getid(start) == whatsit_code and getsubtype(start) == dir_code then
+ local id = getid(start)
+ if id == dir_code then
if not dir_pops[getfield(start,"dir")] then -- weird, what is this #
n = n + 1
stack[n] = start
@@ -404,11 +423,6 @@ local function register_statistics(par)
nofadjustedlines = nofadjustedlines + statistics.nofadjustedlines
end
--- resolvers --
-
-local get_whatsit_width = nodes.whatsitters.getters.width
-local get_whatsit_dimensions = nodes.whatsitters.getters.dimensions
-
-- expansion etc --
local function calculate_fraction(x,n,d,max_answer)
@@ -479,37 +493,40 @@ end)
local function kern_stretch_shrink(p,d)
local left = getprev(p)
- if left and getid(left) == glyph_code then -- how about disc nodes?
- local data = expansions[getfont(left)][getchar(left)]
- if data then
- local stretch = data.stretch
- local shrink = data.shrink
- if stretch ~= 0 then
- -- stretch = data.factor * (d * stretch - d)
- stretch = data.factor * d * (stretch - 1)
+ if left then
+ local char = isglyph(left)
+ if char then
+ local data = expansions[getfont(left)][char]
+ if data then
+ local stretch = data.stretch
+ local shrink = data.shrink
+ if stretch ~= 0 then
+ -- stretch = data.factor * (d * stretch - d)
+ stretch = data.factor * d * (stretch - 1)
+ end
+ if shrink ~= 0 then
+ -- shrink = data.factor * (d * shrink - d)
+ shrink = data.factor * d * (shrink - 1)
+ end
+ return stretch, shrink
end
- if shrink ~= 0 then
- -- shrink = data.factor * (d * shrink - d)
- shrink = data.factor * d * (shrink - 1)
- end
- return stretch, shrink
end
end
return 0, 0
end
-local expand_kerns = false
------ expand_kerns = "both"
+local expand_kerns_mode = false
+local expand_kerns = false
directives.register("builders.paragraphs.adjusting.kerns",function(v)
if not v then
- expand_kerns = false
+ expand_kerns_mode = false
elseif v == "stretch" or v == "shrink" then
- expand_kerns = v
+ expand_kerns_mode = v
elseif v == "both" then
- expand_kerns = true
+ expand_kerns_mode = true
else
- expand_kerns = toboolean(v,true) or false
+ expand_kerns_mode = toboolean(v,true) or false
end
end)
@@ -599,6 +616,16 @@ local function find(head) -- do we really want to recurse into an hlist?
else
head = getnext(head)
end
+ elseif id == protrusion_code then
+ local v = getfield(head,"value")
+ if v == 1 or v == 3 then
+ head = getnext(head)
+ if head then
+ head = getnext(head)
+ end
+ else
+ return head
+ end
elseif is_skipable(head) then
head = getnext(head)
else
@@ -639,6 +666,16 @@ local function find(head,tail)
else
tail = getprev(tail)
end
+ elseif id == protrusion_code then
+ local v = getfield(tail,"value")
+ if v == 2 or v == 3 then
+ tail = getprev(tail)
+ if tail then
+ tail = getprev(tail)
+ end
+ else
+ return tail
+ end
elseif is_skipable(tail) then
tail = getprev(tail)
else
@@ -687,8 +724,8 @@ local function add_to_width(line_break_dir,checked_expansion,s) -- split into tw
local adjust_stretch = 0
local adjust_shrink = 0
while s do
- local id = getid(s)
- if id == glyph_code then
+ local char, id = isglyph(s)
+ if char then
if is_rotated[line_break_dir] then -- can be shared
size = size + getfield(s,"height") + getfield(s,"depth")
else
@@ -697,7 +734,7 @@ local function add_to_width(line_break_dir,checked_expansion,s) -- split into tw
if checked_expansion then
local data = checked_expansion[getfont(s)]
if data then
- data = data[getchar(s)]
+ data = data[char]
if data then
adjust_stretch = adjust_stretch + data.glyphstretch
adjust_shrink = adjust_shrink + data.glyphshrink
@@ -745,14 +782,13 @@ local function compute_break_width(par,break_type,p) -- split in two
local break_size = break_width.size + disc_width.size
local break_adjust_stretch = break_width.adjust_stretch + disc_width.adjust_stretch
local break_adjust_shrink = break_width.adjust_shrink + disc_width.adjust_shrink
- local replace = getfield(p,"replace")
+ local pre, post, replace = getdisc(p)
if replace then
local size, adjust_stretch, adjust_shrink = add_to_width(line_break_dir,checked_expansion,replace)
break_size = break_size - size
break_adjust_stretch = break_adjust_stretch - adjust_stretch
break_adjust_shrink = break_adjust_shrink - adjust_shrink
end
- local post = getfield(p,"post")
if post then
local size, adjust_stretch, adjust_shrink = add_to_width(line_break_dir,checked_expansion,post)
break_size = break_size + size
@@ -773,15 +809,15 @@ local function compute_break_width(par,break_type,p) -- split in two
if id == glyph_code then
return -- happens often
elseif id == glue_code then
- local spec = getfield(p,"spec")
- local order = stretch_orders[getfield(spec,"stretch_order")]
- break_width.size = break_width.size - getfield(spec,"width")
- break_width[order] = break_width[order] - getfield(spec,"stretch")
- break_width.shrink = break_width.shrink - getfield(spec,"shrink")
+ local order = stretch_orders[getfield(p,"stretch_order")]
+ break_width.size = break_width.size - getfield(p,"width")
+ break_width[order] = break_width[order] - getfield(p,"stretch")
+ break_width.shrink = break_width.shrink - getfield(p,"shrink")
elseif id == penalty_code then
-- do nothing
elseif id == kern_code then
- if getsubtype(p) == userkern_code then
+ local s = getsubtype(p)
+ if s == userkern_code or s == italickern_code then
break_width.size = break_width.size - getfield(p,"kern")
else
return
@@ -797,22 +833,15 @@ end
local function append_to_vlist(par, b)
local prev_depth = par.prev_depth
- if prev_depth > par.ignored_dimen then
+ -- if prev_depth > par.ignored_dimen then
+ if prev_depth > ignore_depth then
if getid(b) == hlist_code then
local d = getfield(par.baseline_skip,"width") - prev_depth - getfield(b,"height") -- deficiency of space between baselines
local s = d < par.line_skip_limit and new_lineskip(par.lineskip) or new_baselineskip(d)
- -- local s = d < par.line_skip_limit
- -- if s then
- -- s = new_lineskip()
- -- setfield(s,"spec",tex.lineskip)
- -- else
- -- s = new_baselineskip(d)
- -- end
local head_field = par.head_field
if head_field then
local n = slide_nodelist(head_field) -- todo: find_tail
- setfield(n,"next",s)
- setfield(s,"prev",n)
+ setlink(n,s)
else
par.head_field = s
end
@@ -821,8 +850,7 @@ local function append_to_vlist(par, b)
local head_field = par.head_field
if head_field then
local n = slide_nodelist(head_field) -- todo: find_tail
- setfield(n,"next",b)
- setfield(b,"prev",n)
+ setlink(n,b)
else
par.head_field = b
end
@@ -837,8 +865,7 @@ local function append_list(par, b)
local head_field = par.head_field
if head_field then
local n = slide_nodelist(head_field) -- todo: find_tail
- setfield(n,"next",b)
- setfield(b,"prev",n)
+ setlink(n,b)
else
par.head_field = b
end
@@ -864,12 +891,12 @@ local function initialize_line_break(head,display)
local right_skip = tonut(tex.rightskip) -- nodes
local pretolerance = tex.pretolerance
local tolerance = tex.tolerance
- local adjust_spacing = tex.pdfadjustspacing
- local protrude_chars = tex.pdfprotrudechars
+ local adjust_spacing = tex.adjustspacing
+ local protrude_chars = tex.protrudechars
local last_line_fit = tex.lastlinefit
local newhead = new_temp()
- setfield(newhead,"next",head)
+ setnext(newhead,head)
local adjust_spacing_status = adjust_spacing > 1 and -1 or 0
@@ -930,11 +957,12 @@ local function initialize_line_break(head,display)
first_line = 0, -- tex.nest[tex.nest.ptr].modeline, -- 0, -- cur_list.pg_field
- each_line_height = tex.pdfeachlineheight or 0, -- this will go away
- each_line_depth = tex.pdfeachlinedepth or 0, -- this will go away
- first_line_height = tex.pdffirstlineheight or 0, -- this will go away
- last_line_depth = tex.pdflastlinedepth or 0, -- this will go away
- ignored_dimen = tex.pdfignoreddimen or 0, -- this will go away
+ -- each_line_height = tex.pdfeachlineheight or 0, -- this will go away
+ -- each_line_depth = tex.pdfeachlinedepth or 0, -- this will go away
+ -- first_line_height = tex.pdffirstlineheight or 0, -- this will go away
+ -- last_line_depth = tex.pdflastlinedepth or 0, -- this will go away
+
+ -- ignored_dimen = tex.pdfignoreddimen or 0,
baseline_skip = tonut(tex.baselineskip),
lineskip = tonut(tex.lineskip),
@@ -1031,6 +1059,8 @@ local function initialize_line_break(head,display)
par.tolerance = hztolerance
end
+ expand_kerns = expand_kerns_mode or (adjust_spacing == 2)
+
end
-- we need par for the error message
@@ -1142,7 +1172,7 @@ local function post_line_break(par)
local leftskip = par.used_left_skip -- used or normal ?
local rightskip = par.right_skip
local parshape = par.par_shape_ptr
- local ignored_dimen = par.ignored_dimen
+ ----- ignored_dimen = par.ignored_dimen
local adapt_width = par.adapt_width
@@ -1192,72 +1222,54 @@ local function post_line_break(par)
local prevlast = getprev(lastnode)
local nextlast = getnext(lastnode)
local subtype = getsubtype(lastnode)
- local pre = getfield(lastnode,"pre")
- local post = getfield(lastnode,"post")
- local replace = getfield(lastnode,"replace")
+ local pre, post, replace, pretail, posttail, replacetail = getdisc(lastnode,true)
if subtype == second_disc_code then
if not (getid(prevlast) == disc_code and getsubtype(prevlast) == first_disc_code) then
report_parbuilders('unsupported disc at location %a',3)
end
if pre then
flush_nodelist(pre)
- setfield(lastnode,"pre",nil)
pre = nil -- signal
end
if replace then
- local n = find_tail(replace)
- setfield(prevlast,"next",replace)
- setfield(replace,"prev",prevlast)
- setfield(n,"next",lastnode)
- setfield(lastnode,"prev",n)
- setfield(lastnode,"replace",nil)
+ setlink(prevlast,replace)
+ setlink(replacetail,lastnode)
replace = nil -- signal
end
- local pre = getfield(prevlast,"pre")
- local post = getfield(prevlast,"post")
- local replace = getfield(prevlast,"replace")
+ setdisc(lastnode,pre,post,replace)
+ local pre, post, replace = getdisc(prevlast)
if pre then
flush_nodelist(pre)
- setfield(prevlast,"pre",nil)
end
if replace then
flush_nodelist(replace)
- setfield(prevlast,"replace",nil)
end
if post then
flush_nodelist(post)
- setfield(prevlast,"post",nil)
end
+ setdisc(prevlast) -- nil,nil,nil
elseif subtype == first_disc_code then
-- what is v ... next probably
if not (getid(v) == disc_code and getsubtype(v) == second_disc_code) then
report_parbuilders('unsupported disc at location %a',4)
end
- setfield(nextlast,"subtype",regular_disc_code)
+ setsubtype(nextlast,regular_disc_code)
setfield(nextlast,"replace",post)
- setfield(lastnode,"post",nil)
+ setfield(lastnode,"post") -- nil
end
if replace then
- setfield(lastnode,"replace",nil) -- free
flush_nodelist(replace)
end
if pre then
- local n = find_tail(pre)
- setfield(prevlast,"next",pre)
- setfield(pre,"prev",prevlast)
- setfield(n,"next",lastnode)
- setfield(lastnode,"prev",n)
- setfield(lastnode,"pre",nil)
+ setlink(prevlast,pre)
+ setlink(pretail,lastnode)
end
if post then
- local n = find_tail(post)
- setfield(lastnode,"next",post)
- setfield(post,"prev",lastnode)
- setfield(n,"next",nextlast)
- setfield(nextlast,"prev",n)
- setfield(lastnode,"post",nil)
+ setlink(lastnode,post)
+ setlink(posttail,nextlast)
post_disc_break = true
end
+ setdisc(lastnode) -- nil, nil, nil
disc_break = true
elseif id == kern_code then
setfield(lastnode,"kern",0)
@@ -1287,7 +1299,7 @@ local function post_line_break(par)
end
-- we finish the line
local r = getnext(lineend)
- setfield(lineend,"next",nil)
+ setnext(lineend)
if not glue_break then
if rightskip then
insert_node_after(lineend,lineend,new_rightskip(right_skip)) -- lineend moves on as pseudo head
@@ -1295,10 +1307,7 @@ local function post_line_break(par)
end
-- each time ?
local q = getnext(head)
- setfield(head,"next",r)
- if r then
- setfield(r,"prev",head)
- end
+ setlink(head,r)
-- insert leftbox (if needed after parindent)
local leftbox = current_break.passive_left_box
if leftbox then
@@ -1357,20 +1366,22 @@ local function post_line_break(par)
local pre_adjust_head = texlists.pre_adjust_head
--
setfield(finished_line,"shift",cur_indent)
- -- this will probably go away:
- if par.each_line_height ~= ignored_dimen then
- setfield(finished_line,"height",par.each_line_height)
- end
- if par.each_line_depth ~= ignored_dimen then
- setfield(finished_line,"depth",par.each_line_depth)
- end
- if par.first_line_height ~= ignored_dimen and (current_line == par.first_line + 1) then
- setfield(finished_line,"height",par.first_line_height)
- end
- if par.last_line_depth ~= ignored_dimen and current_line + 1 == par.best_line then
- setfield(finished_line,"depth",par.last_line_depth)
- end
- --
+ --
+ -- -- this is gone:
+ --
+ -- if par.each_line_height ~= ignored_dimen then
+ -- setfield(finished_line,"height",par.each_line_height)
+ -- end
+ -- if par.each_line_depth ~= ignored_dimen then
+ -- setfield(finished_line,"depth",par.each_line_depth)
+ -- end
+ -- if par.first_line_height ~= ignored_dimen and (current_line == par.first_line + 1) then
+ -- setfield(finished_line,"height",par.first_line_height)
+ -- end
+ -- if par.last_line_depth ~= ignored_dimen and current_line + 1 == par.best_line then
+ -- setfield(finished_line,"depth",par.last_line_depth)
+ -- end
+ --
if texlists.pre_adjust_head ~= pre_adjust_head then
append_list(par, texlists.pre_adjust_head)
texlists.pre_adjust_head = pre_adjust_head
@@ -1421,28 +1432,25 @@ local function post_line_break(par)
end
local id = getid(next)
local subtype = getsubtype(next)
- if id == whatsit_code and subtype == localpar_code then
+ if id == localpar_code then
-- nothing
elseif id < math_code then
-- messy criterium
break
-elseif id == math_code then
- -- keep the math node
- setfield(next,"surround",0)
- break
- elseif id == kern_code and (subtype ~= userkern_code and not getattr(next,a_fontkern)) then
+ elseif id == math_code then
+ -- keep the math node
+ setfield(next,"surround",0)
+ break
+ elseif id == kern_code and (subtype ~= userkern_code and subtype ~= italickern_code and not getattr(next,a_fontkern)) then
-- fontkerns and accent kerns as well as otf injections
break
end
current = next
end
if current ~= head then
- setfield(current,"next",nil)
+ setnext(current)
flush_nodelist(getnext(head))
- setfield(head,"next",next)
- if next then
- setfield(next,"prev",head)
- end
+ setlink(head,next)
end
end
end
@@ -1472,11 +1480,8 @@ local function wrap_up(par)
par.do_last_line_fit = false
else
local glue = par.final_par_glue
- local spec = copy_node(getfield(glue,"spec"))
- setfield(spec,"width",getfield(spec,"width") + active_short - active_glue)
- setfield(spec,"stretch",0)
- -- flush_node(getfield(glue,"spec")) -- brrr, when we do this we can get an "invalid id stretch message", maybe dec refcount
- setfield(glue,"spec",spec)
+ setfield(glue,"width",getfield(glue,"width") + active_short - active_glue)
+ setfield(glue,"stretch",0)
if trace_lastlinefit then
report_parbuilders("applying last line fit, short %a, glue %p",active_short,active_glue)
end
@@ -1893,8 +1898,13 @@ local function try_break(pi, break_type, par, first_p, current, checked_expansio
local b = r.break_node
local l = b and b.cur_break or first_p
local o = current and getprev(current)
- if current and getid(current) == disc_code and getfield(current,"pre") then
- o = find_tail(getfield(current,"pre"))
+ if current and getid(current) == disc_code then
+ local pre, _, _, pretail = getdisc(current,true)
+ if pre then
+ o = pretail
+ else
+ o = find_protchar_right(l,o)
+ end
else
o = find_protchar_right(l,o)
end
@@ -2144,7 +2154,7 @@ function constructors.methods.basic(head,d)
par.pass_number = 0
-- par.auto_breaking = true
- setfield(temp_head,"next",head)
+ setnext(temp_head,head)
local current = head
local first_p = current
@@ -2153,15 +2163,18 @@ function constructors.methods.basic(head,d)
par.font_in_short_display = 0
- if current and getid(current) == whatsit_code and getsubtype(current) == localpar_code then
- par.init_internal_left_box = getfield(current,"box_left")
- par.init_internal_left_box_width = getfield(current,"box_left_width")
- par.internal_pen_inter = getfield(current,"pen_inter")
- par.internal_pen_broken = getfield(current,"pen_broken")
- par.internal_left_box = par.init_internal_left_box
- par.internal_left_box_width = par.init_internal_left_box_width
- par.internal_right_box = getfield(current,"box_right")
- par.internal_right_box_width = getfield(current,"box_right_width")
+ if current then
+ local id = getid(current)
+ if id == localpar_code then
+ par.init_internal_left_box = getfield(current,"box_left")
+ par.init_internal_left_box_width = getfield(current,"box_left_width")
+ par.internal_pen_inter = getfield(current,"pen_inter")
+ par.internal_pen_broken = getfield(current,"pen_broken")
+ par.internal_left_box = par.init_internal_left_box
+ par.internal_left_box_width = par.init_internal_left_box_width
+ par.internal_right_box = getfield(current,"box_right")
+ par.internal_right_box_width = getfield(current,"box_right_width")
+ end
end
-- all passes are combined in this loop so maybe we should split this into
@@ -2184,8 +2197,8 @@ function constructors.methods.basic(head,d)
trialcount = 0
while current and p_active ~= n_active do
- local id = getid(current)
- if id == glyph_code then
+ local char, id = isglyph(current)
+ if char then
if is_rotated[par.line_break_dir] then
active_width.size = active_width.size + getfield(current,"height") + getfield(current,"depth")
else
@@ -2193,14 +2206,14 @@ function constructors.methods.basic(head,d)
end
if checked_expansion then
local currentfont = getfont(current)
- local data= checked_expansion[currentfont]
+ local data = checked_expansion[currentfont]
if data then
if currentfont ~= lastfont then
fontexps = checked_expansion[currentfont] -- a bit redundant for the par line packer
lastfont = currentfont
end
if fontexps then
- local expansion = fontexps[getchar(current)]
+ local expansion = fontexps[char]
if expansion then
active_width.adjust_stretch = active_width.adjust_stretch + expansion.glyphstretch
active_width.adjust_shrink = active_width.adjust_shrink + expansion.glyphshrink
@@ -2220,26 +2233,32 @@ function constructors.methods.basic(head,d)
local prev_p = getprev(current)
if prev_p and prev_p ~= temp_head then
local id = getid(prev_p)
- if id == glyph_code or
- (id < math_code and (id ~= whatsit_code or getsubtype(prev_p) ~= dir_code)) or -- was: precedes_break(prev_p)
- (id == kern_code and getsubtype(prev_p) ~= userkern_code) then
+ -- we need to check this with the latest patches to the tex kernel
+ if (id == glyph_code) or (id < math_code) then
p_active, n_active = try_break(0, unhyphenated_code, par, first_p, current, checked_expansion)
+ elseif id == kern_code then
+ local s = getsubtype(prev_p)
+ if s ~= userkern_code and s ~= italickern_code then
+ p_active, n_active = try_break(0, unhyphenated_code, par, first_p, current, checked_expansion)
+ end
end
end
end
- local spec = check_shrinkage(par,getfield(current,"spec"))
- local order = stretch_orders[getfield(spec,"stretch_order")]
- setfield(current,"spec",spec)
- active_width.size = active_width.size + getfield(spec,"width")
- active_width[order] = active_width[order] + getfield(spec,"stretch")
- active_width.shrink = active_width.shrink + getfield(spec,"shrink")
+ check_shrinkage(par,current)
+ local order = stretch_orders[getfield(current,"stretch_order")]
+ active_width.size = active_width.size + getfield(current,"width")
+ active_width[order] = active_width[order] + getfield(current,"stretch")
+ active_width.shrink = active_width.shrink + getfield(current,"shrink")
elseif id == disc_code then
local subtype = getsubtype(current)
if subtype ~= second_disc_code then
local line_break_dir = par.line_break_dir
if second_pass or subtype <= automatic_disc_code then
local actual_pen = subtype == automatic_disc_code and par.ex_hyphen_penalty or par.hyphen_penalty
- local pre = getfield(current,"pre")
+ -- 0.81 :
+ -- local actual_pen = getfield(current,"penalty")
+ --
+ local pre, post, replace = getdisc(current)
if not pre then -- trivial pre-break
disc_width.size = 0
if checked_expansion then
@@ -2282,7 +2301,7 @@ function constructors.methods.basic(head,d)
-- do_one_seven_eight(sub_disc_width_from_active_width);
-- do_one_seven_eight(reset_disc_width);
-- s = vlink_no_break(vlink(current));
- -- add_to_widths(s, line_break_dir, pdf_adjust_spacing,disc_width);
+ -- add_to_widths(s, line_break_dir, adjust_spacing,disc_width);
-- ext_try_break(...,first_p,vlink(current));
--
else
@@ -2298,7 +2317,6 @@ function constructors.methods.basic(head,d)
end
end
end
- local replace = getfield(current,"replace")
if replace then
local size, adjust_stretch, adjust_shrink = add_to_width(line_break_dir,checked_expansion,replace)
active_width.size = active_width.size + size
@@ -2309,9 +2327,10 @@ function constructors.methods.basic(head,d)
end
end
elseif id == kern_code then
- if getsubtype(current) == userkern_code then
+ local s = getsubtype(current)
+ if s == userkern_code or s == italickern_code then
local v = getnext(current)
--- if par.auto_breaking and getid(v) == glue_code then
+ -- if par.auto_breaking and getid(v) == glue_code then
if auto_breaking and getid(v) == glue_code then
p_active, n_active = try_break(0, unhyphenated_code, par, first_p, current, checked_expansion)
end
@@ -2348,23 +2367,15 @@ function constructors.methods.basic(head,d)
active_width.size = active_width.size + getfield(current,"width")
elseif id == penalty_code then
p_active, n_active = try_break(getfield(current,"penalty"), unhyphenated_code, par, first_p, current, checked_expansion)
- elseif id == whatsit_code then
- local subtype = getsubtype(current)
- if subtype == localpar_code then
- par.internal_pen_inter = getfield(current,"pen_inter")
- par.internal_pen_broken = getfield(current,"pen_broken")
- par.internal_left_box = getfield(current,"box_left")
- par.internal_left_box_width = getfield(current,"box_left_width")
- par.internal_right_box = getfield(current,"box_right")
- par.internal_right_box_width = getfield(current,"box_right_width")
- elseif subtype == dir_code then
- par.line_break_dir = checked_line_dir(dirstack) or par.line_break_dir
- else
- local get_width = get_whatsit_width[subtype]
- if get_width then
- active_width.size = active_width.size + get_width(current,par.line_break_dir)
- end
- end
+ elseif id == dir_code then
+ par.line_break_dir = checked_line_dir(dirstack) or par.line_break_dir
+ elseif id == localpar_code then
+ par.internal_pen_inter = getfield(current,"pen_inter")
+ par.internal_pen_broken = getfield(current,"pen_broken")
+ par.internal_left_box = getfield(current,"box_left")
+ par.internal_left_box_width = getfield(current,"box_left_width")
+ par.internal_right_box = getfield(current,"box_right")
+ par.internal_right_box_width = getfield(current,"box_right_width")
elseif trace_unsupported then
if id == mark_code or id == ins_code or id == adjust_code then
-- skip
@@ -2461,8 +2472,8 @@ local verbose = false -- true
local function short_display(target,a,font_in_short_display)
while a do
- local id = getid(a)
- if id == glyph_code then
+ local char, id = isglyph(a)
+ if char then
local font = getfont(a)
if font ~= font_in_short_display then
write(target,tex.fontidentifier(font) .. ' ')
@@ -2471,24 +2482,28 @@ local function short_display(target,a,font_in_short_display)
if getsubtype(a) == ligature_code then
font_in_short_display = short_display(target,getfield(a,"components"),font_in_short_display)
else
- write(target,utfchar(getchar(a)))
+ write(target,utfchar(char))
end
elseif id == disc_code then
- font_in_short_display = short_display(target,getfield(a,"pre"),font_in_short_display)
- font_in_short_display = short_display(target,getfield(a,"post"),font_in_short_display)
+ local pre, post, replace = getdisc(a)
+ font_in_short_display = short_display(target,pre,font_in_short_display)
+ font_in_short_display = short_display(target,post,font_in_short_display)
elseif verbose then
write(target,format("[%s]",nodecodes[id]))
elseif id == rule_code then
write(target,"|")
elseif id == glue_code then
- if getfield(getfield(a,"spec"),"writable") then
- write(target," ")
- end
- elseif id == kern_code and (getsubtype(a) == userkern_code or getattr(a,a_fontkern)) then
- if verbose then
- write(target,"[|]")
+ write(target," ")
+ elseif id == kern_code then
+ local s = getsubtype(a)
+ if s == userkern_code or s == italickern_code or getattr(a,a_fontkern) then
+ if verbose then
+ write(target,"[|]")
+ -- else
+ -- write(target,"")
+ end
else
- write(target,"")
+ write(target,"[]")
end
elseif id == math_code then
write(target,"$")
@@ -2534,10 +2549,10 @@ function diagnostics.feasible_break(par, current, r, b, pi, d, artificial_demeri
par.font_in_short_display = short_display("log",getnext(printed_node),par.font_in_short_display)
else
local save_link = getnext(current)
- setfield(current,"next",nil)
+ setnext(current)
write_nl("log","")
par.font_in_short_display = short_display("log",getnext(printed_node),par.font_in_short_display)
- setfield(current,"next",save_link)
+ setnext(current,save_link)
end
par.printed_node = current
end
@@ -2659,7 +2674,7 @@ end
--
-- local hlist = new_node("hlist")
--
--- setfield(hlist,"list",head)
+-- setlist(hlist,head)
-- setfield(hlist,"dir",direction or tex.textdir)
-- setfield(hlist,"width",width)
-- setfield(hlist,"height",height)
@@ -2781,7 +2796,7 @@ local function hpack(head,width,method,direction,firstline,line) -- fast version
setfield(hlist,"width",width)
return hlist, 0
else
- setfield(hlist,"list",head)
+ setlist(hlist,head)
end
local cal_expand_ratio = method == "cal_expand_ratio" or method == "subst_ex_font"
@@ -2825,8 +2840,8 @@ local function hpack(head,width,method,direction,firstline,line) -- fast version
local function process(current) -- called nested in disc replace
while current do
- local id = getid(current)
- if id == glyph_code then
+ local char, id = isglyph(current)
+ if char then
if cal_expand_ratio then
local currentfont = getfont(current)
if currentfont ~= lastfont then
@@ -2834,7 +2849,7 @@ local function hpack(head,width,method,direction,firstline,line) -- fast version
lastfont = currentfont
end
if fontexps then
- local expansion = fontexps[getchar(current)]
+ local expansion = fontexps[char]
if expansion then
font_stretch = font_stretch + expansion.glyphstretch
font_shrink = font_shrink + expansion.glyphshrink
@@ -2878,12 +2893,11 @@ local function hpack(head,width,method,direction,firstline,line) -- fast version
end
end
elseif id == glue_code then
- local spec = getfield(current,"spec")
- natural = natural + getfield(spec,"width")
- local op = getfield(spec,"stretch_order")
- local om = getfield(spec,"shrink_order")
- total_stretch[op] = total_stretch[op] + getfield(spec,"stretch")
- total_shrink [om] = total_shrink [om] + getfield(spec,"shrink")
+ natural = natural + getfield(current,"width")
+ local op = getfield(current,"stretch_order")
+ local om = getfield(current,"shrink_order")
+ total_stretch[op] = total_stretch[op] + getfield(current,"stretch")
+ total_shrink [om] = total_shrink [om] + getfield(current,"shrink")
if getsubtype(current) >= leaders_code then
local leader = getleader(current)
local ht = getfield(leader,"height")
@@ -2934,50 +2948,27 @@ local function hpack(head,width,method,direction,firstline,line) -- fast version
depth = ds
end
elseif id == ins_code or id == mark_code then
- local prev = getprev(current)
- local next = getnext(current)
+ local prev, next = getboth(current)
if adjust_tail then -- todo
- if next then
- setfield(next,"prev",prev)
- end
- if prev then
- setfield(prev,"next",next)
- end
- setfield(current,"prev",adjust_tail)
- setfield(current,"next",nil)
- adjust_setfield(tail,"next",current)
+ setlink(prev,next)
+ setlink(adjust_tail,current)
+ setnext(current)
adjust_tail = current
else
adjust_head = current
adjust_tail = current
- setfield(current,"prev",nil)
- setfield(current,"next",nil)
+ setboth(current)
end
elseif id == adjust_code then
local list = getlist(current)
if adjust_tail then
- adjust_setfield(tail,"next",list)
+ setnext(adjust_tail,list)
else
adjust_head = list
end
adjust_tail = slide_nodelist(list) -- find_tail(list)
- elseif id == whatsit_code then
- local subtype = getsubtype(current)
- if subtype == dir_code then
- hpack_dir = checked_line_dir(stack,current) or hpack_dir
- else
- local get_dimensions = get_whatsit_dimensions[subtype]
- if get_dimensions then
- local wd, ht, dp = get_dimensions(current,hpack_dir)
- natural = natural + wd
- if ht > height then
- height = ht
- end
- if dp > depth then
- depth = dp
- end
- end
- end
+ elseif id == dir_code then
+ hpack_dir = checked_line_dir(stack,current) or hpack_dir
elseif id == marginkern_code then
local width = getfield(current,"width")
if cal_expand_ratio then
@@ -3030,15 +3021,16 @@ local function hpack(head,width,method,direction,firstline,line) -- fast version
local fontexps, lastfont
for i=1,expansion_index do
- local g = expansion_stack[i]
- local e
- if getid(g) == glyph_code then
+ local g = expansion_stack[i]
+ local e = 0
+ local char = isglyph(g)
+ if char then
local currentfont = getfont(g)
if currentfont ~= lastfont then
fontexps = expansions[currentfont]
lastfont = currentfont
end
- local data = fontexps[getchar(g)]
+ local data = fontexps[char]
if trace_expansion then
setnodecolor(g,"hz:positive")
end
@@ -3086,15 +3078,16 @@ local function hpack(head,width,method,direction,firstline,line) -- fast version
local fontexps, lastfont
for i=1,expansion_index do
- local g = expansion_stack[i]
- local e
- if getid(g) == glyph_code then
+ local g = expansion_stack[i]
+ local e = 0
+ local char = isglyph(g)
+ if char then
local currentfont = getfont(g)
if currentfont ~= lastfont then
fontexps = expansions[currentfont]
lastfont = currentfont
end
- local data = fontexps[getchar(g)]
+ local data = fontexps[char]
if trace_expansion then
setnodecolor(g,"hz:negative")
end
diff --git a/Master/texmf-dist/tex/context/base/node-met.lua b/Master/texmf-dist/tex/context/base/mkiv/node-met.lua
index 335ce2a9837..272b1d1769a 100644
--- a/Master/texmf-dist/tex/context/base/node-met.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-met.lua
@@ -60,13 +60,11 @@ end
-- We start with some helpers and provide all relevant basic functions in the
-- node namespace as well.
-local gonuts = type(node.direct) == "table"
--- local gonuts = false
-
nodes = nodes or { }
local nodes = nodes
-nodes.gonuts = gonuts
+----- gonuts = type(node.direct) == "table"
+-----.gonuts = gonuts
local nodecodes = nodes.nodecodes
local hlist_code = nodecodes.hlist
@@ -88,13 +86,13 @@ nodes.new = node.new
nodes.tail = node.tail
nodes.traverse = node.traverse
nodes.traverse_id = node.traverse_id
+nodes.traverse_char = node.traverse_char
nodes.slide = node.slide
nodes.vpack = node.vpack
nodes.fields = node.fields
nodes.is_node = node.is_node
nodes.first_glyph = node.first_glyph
-nodes.first_character = node.first_character
nodes.has_glyph = node.has_glyph or node.first_glyph
nodes.current_attr = node.current_attr
@@ -110,50 +108,93 @@ nodes.set_attribute = node.set_attribute
nodes.unset_attribute = node.unset_attribute
nodes.protect_glyphs = node.protect_glyphs
+nodes.protect_glyph = node.protect_glyph
nodes.unprotect_glyphs = node.unprotect_glyphs
nodes.kerning = node.kerning
nodes.ligaturing = node.ligaturing
nodes.mlist_to_hlist = node.mlist_to_hlist
-if not gonuts or not node.getfield then
- node.getfield = metatable.__index
- node.setfield = metatable.__newindex
-end
+nodes.effective_glue = node.effective_glue
--- if gonuts then
- nodes.tonode = function(n) return n end
- nodes.tonut = function(n) return n end
+nodes.is_zero_glue = node.is_zero_glue
+nodes.getglue = node.getglue
+nodes.getglue = node.getglue
+
+-- if not gonuts or not node.getfield then
+-- node.getfield = metatable.__index
+-- node.setfield = metatable.__newindex
-- end
+nodes.tonode = function(n) return n end
+nodes.tonut = function(n) return n end
+
local getfield = node.getfield
local setfield = node.setfield
-local getattr = getfield
+local getattr = node.get_attribute
local setattr = setfield
-local getnext = node.getnext or function(n) return getfield(n,"next") end
-local getprev = node.getprev or function(n) return getfield(n,"prev") end
-local getid = node.getid or function(n) return getfield(n,"id") end
-local getchar = node.getchar or function(n) return getfield(n,"char") end
-local getfont = node.getfont or function(n) return getfield(n,"font") end
-local getsubtype = node.getsubtype or function(n) return getfield(n,"subtype") end
-local getlist = node.getlist or function(n) return getfield(n,"list") end
-local getleader = node.getleader or function(n) return getfield(n,"leader") end
-
-nodes.getfield = getfield
-nodes.getattr = getattr
-
-nodes.setfield = setfield
-nodes.setattr = setattr
-
-nodes.getnext = getnext
-nodes.getprev = getprev
-nodes.getid = getid
-nodes.getchar = getchar
-nodes.getfont = getfont
-nodes.getsubtype = getsubtype
-nodes.getlist = getlist
-nodes.getleader = getleader
+local n_getid = node.getid
+local n_getlist = node.getlist
+local n_getnext = node.getnext
+local n_getprev = node.getprev
+local n_getchar = node.getchar
+local n_getfont = node.getfont
+local n_getsubtype = node.getsubtype
+local n_setfield = node.setfield
+local n_getfield = node.getfield
+local n_setattr = node.setattr
+local n_getattr = node.getattr
+local n_getdisc = node.getdisc
+local n_getleader = node.getleader
+
+local n_setnext = node.setnext or
+ function(c,next)
+ setfield(c,"next",n)
+ end
+local n_setprev = node.setprev or
+ function(c,prev)
+ setfield(c,"prev",p)
+ end
+local n_setlink = node.setlink or
+ function(c1,c2)
+ if c1 then setfield(c1,"next",c2) end
+ if c2 then setfield(c2,"prev",c1) end
+ end
+local n_setboth = node.setboth or
+ function(c,p,n)
+ setfield(c,"prev",p)
+ setfield(c,"next",n)
+ end
+
+node.setnext = n_setnext
+node.setprev = n_setprev
+node.setlink = n_setlink
+node.setboth = n_setboth
+
+nodes.getfield = n_getfield
+nodes.setfield = n_setfield
+nodes.getattr = n_getattr
+nodes.setattr = n_setattr
+
+nodes.getnext = n_getnext
+nodes.getprev = n_getprev
+nodes.getid = n_getid
+nodes.getchar = n_getchar
+nodes.getfont = n_getfont
+nodes.getsubtype = n_getsubtype
+nodes.getlist = n_getlist
+nodes.getleader = n_getleader
+nodes.getdisc = n_getdisc
+-----.getpre = node.getpre or function(n) local h, _, _, t = n_getdisc(n,true) return h, t end
+-----.getpost = node.getpost or function(n) local _, h, _, _, t = n_getdisc(n,true) return h, t end
+-----.getreplace = node.getreplace or function(n) local _, _, h, _, _, t = n_getdisc(n,true) return h, t end
+
+nodes.is_char = node.is_char
+nodes.ischar = node.is_char
+
+nodes.is_glyph = node.is_glyph
+nodes.isglyph = node.is_glyph
nodes.getbox = node.getbox or tex.getbox
nodes.setbox = node.setbox or tex.setbox
@@ -161,12 +202,6 @@ nodes.getskip = node.getskip or tex.get
local n_new_node = nodes.new
local n_free_node = nodes.free
-local n_setfield = nodes.setfield
-local n_getfield = nodes.getfield
-local n_getnext = nodes.getnext
-local n_getprev = nodes.getprev
-local n_getid = nodes.getid
-local n_getlist = nodes.getlist
local n_copy_node = nodes.copy
local n_copy_list = nodes.copy_list
local n_find_tail = nodes.tail
@@ -176,14 +211,6 @@ local n_slide = nodes.slide
local n_remove_node = node.remove -- not yet nodes.remove
--- if t.id == glue_code then
--- local s = t.spec
--- if s and s.writable then
--- free_node(s)
--- end
--- t.spec = nil
--- end
-
local function remove(head,current,free_too)
local t = current
head, current = n_remove_node(head,current)
@@ -193,8 +220,7 @@ local function remove(head,current,free_too)
n_free_node(t)
t = nil
else
- n_setfield(t,"next",nil)
- n_setfield(t,"prev",nil)
+ n_setboth(t)
end
return head, current, t
end
@@ -219,12 +245,10 @@ function nodes.replace(head,current,new) -- no head returned if false
local prev = n_getprev(current)
local next = n_getnext(current)
if next then
- n_setfield(new,"next",next)
- n_setfield(next,"prev",new)
+ n_setlink(new,next)
end
if prev then
- n_setfield(new,"prev",prev)
- n_setfield(prev,"next",new)
+ n_setlink(prev,new)
end
if head then
if head == current then
@@ -279,8 +303,7 @@ function nodes.linked(...)
local next = select(i,...)
if next then
if head then
- n_setfield(last,"next",next)
- n_setfield(next,"prev",last)
+ n_setlink(last,next)
else
head = next
end
@@ -296,8 +319,7 @@ function nodes.concat(list) -- consider tail instead of slide
local li = list[i]
if li then
if head then
- n_setfield(tail,"next",li)
- n_setfield(li,"prev",tail)
+ n_setlink(tail,li)
else
head = li
end
@@ -320,56 +342,8 @@ and hide it for the user. And yes, LuaTeX now gives a warning as
well.</p>
]]--
-function nodes.writable_spec(n) -- not pool
- local spec = n_getfield(n,"spec")
- if not spec then
- spec = n_copy_node(glue_spec)
- n_setfield(n,"spec",spec)
- elseif not n_getfield(spec,"writable") then
- spec = n_copy_node(spec)
- n_setfield(n,"spec",spec)
- end
- return spec
-end
-
-function nodes.copy_spec(old,free) -- also frees
- if not old then
- return n_new_node("glue_spec")
- else
- local new = n_copy_node(old)
- if free and old.writable then
- free_node(old)
- end
- return new
- end
-end
-
-function nodes.free_spec(old)
- if not old then
- -- skip
- elseif old.writable then
- free_node(old)
- else
- -- skip
- end
-end
-
-if gonuts then
-
- function nodes.reference(n)
- return n and tonut(n) or "<none>"
- end
-
-else
-
- local left, space = lpeg.P("<"), lpeg.P(" ")
-
- local reference = left * (1-left)^0 * left * space^0 * lpeg.C((1-space)^0)
-
- function nodes.reference(n)
- return n and lpegmatch(reference,tostring(n)) or "<none>"
- end
-
+function nodes.reference(n)
+ return n and tonut(n) or "<none>"
end
-- Here starts an experiment with metatables. Of course this only works with nodes
@@ -438,8 +412,7 @@ metatable.__concat = function(n1,n2) -- todo: accept nut on one end
return n2 -- or n2 * 2
else
local tail = n_find_tail(n1)
- n_setfield(tail,"next",n2)
- n_setfield(n2,"prev",tail)
+ n_setlink(tail,n2)
return n1
end
end
@@ -456,26 +429,22 @@ metatable.__mul = function(n,multiplier)
local h = n_copy_list(n)
if head then
local t = n_find_tail(h)
- n_setfield(t,"next",head)
- n_setfield(head,"prev",t)
+ n_setlink(t,head)
end
head = h
end
local t = n_find_tail(n)
- n_setfield(t,"next",head)
- n_setfield(head,"prev",t)
+ n_setlink(t,head)
else
local head
for i=2,multiplier do
local c = n_copy_node(n)
if head then
- n_setfield(c,"next",head)
- n_setfield(head,"prev",c)
+ n_setlink(c,head)
end
head = c
end
- n_setfield(n,"next",head)
- n_setfield(head,"prev",n)
+ n_setlink(n,head)
end
return n
end
@@ -484,7 +453,7 @@ metatable.__sub = function(first,second)
if type(second) == "number" then
local tail = n_find_tail(first)
for i=1,second do
- local prev = n_getfield(tail,"prev")
+ local prev = n_getprev(tail)
n_free_node(tail) -- can become flushlist/flushnode
if prev then
tail = prev
@@ -493,7 +462,7 @@ metatable.__sub = function(first,second)
end
end
if tail then
- n_setfield(tail,"next",nil)
+ n_setnext(tail)
return first
else
return nil
@@ -504,15 +473,12 @@ metatable.__sub = function(first,second)
local prev = n_getprev(firsttail)
if prev then
local secondtail = n_find_tail(second)
- n_setfield(secondtail,"next",firsttail)
- n_setfield(firsttail,"prev",ltail)
- n_setfield(prev,"next",second)
- n_setfield(second,"prev",prev)
+ n_setlink(secondtail,firsttail)
+ n_setlink(prev,second)
return first
else
local secondtail = n_find_tail(second)
- n_setfield(secondtail,"next",first)
- n_setfield(first,"prev",ltail)
+ n_setlink(secondtail,first)
return second
end
end
@@ -531,7 +497,7 @@ metatable.__add = function(first,second)
end
end
if head then
- n_setfield(head,"prev",nil)
+ n_setprev(head)
return head
else
return nil
@@ -541,13 +507,10 @@ metatable.__add = function(first,second)
local next = n_getnext(first)
if next then
local secondtail = n_find_tail(second)
- n_setfield(first,"next",second)
- n_setfield(second,"prev",first)
- n_setfield(secondtail,"next",next)
- n_setfield(next,"prev",secondtail)
+ n_setlink(first,second)
+ n_setlink(secondtail,next)
else
- n_setfield(first,"next",second)
- n_setfield(second,"prev",first)
+ n_setlink(first,second)
end
return first
end
@@ -569,7 +532,7 @@ end
metatable.__pow = function(n,multiplier)
local tail = n
local head = nil
- if getnext(n) then
+ if n_getnext(n) then
if multiplier == 1 then
head = n_copy_list(n)
else
@@ -577,8 +540,7 @@ metatable.__pow = function(n,multiplier)
local h = n_copy_list(n)
if head then
local t = n_find_tail(h)
- n_setfield(t,"next",head)
- n_setfield(head,"prev",t)
+ n_setlink(t,head)
end
head = h
end
@@ -590,8 +552,7 @@ metatable.__pow = function(n,multiplier)
for i=2,multiplier do
local c = n_copy_node(n)
if head then
- n_setfield(head,"next",c)
- n_setfield(c,"prev",head)
+ n_setlink(head,c)
end
head = c
end
@@ -607,35 +568,34 @@ metatable.__unm = function(head)
local current = n_getnext(head)
while current do
local next = n_getnext(current)
- n_setfield(first,"prev",current)
- n_setfield(current,"next",first)
+ n_setlink(current,first)
first = current
current = next
end
- n_setfield(first,"prev",nil)
- n_setfield(last,"next",nil)
+ n_setprev(first)
+ n_setnext(last)
return first
end
-- see node-nut.lua for more info on going nuts
-if not gonuts then
-
- local nuts = { }
- nodes.nuts = nuts
-
- local function dummy(f) return f end
-
- nodes.vianuts = dummy
- nodes.vianodes = dummy
-
- for k, v in next, nodes do
- if type(v) == "function" then
- nuts[k] = v
- end
- end
-
-end
+-- if not gonuts then
+--
+-- local nuts = { }
+-- nodes.nuts = nuts
+--
+-- local function dummy(f) return f end
+--
+-- nodes.vianuts = dummy
+-- nodes.vianodes = dummy
+--
+-- for k, v in next, nodes do
+-- if type(v) == "function" then
+-- nuts[k] = v
+-- end
+-- end
+--
+-- end
-- also handy
@@ -690,34 +650,3 @@ end
nodes.keys = keys -- [id][subtype]
nodes.fields = nodefields -- (n)
-
--- one issue solved in flush_node:
---
--- case glue_spec_node:
--- if (glue_ref_count(p)!=null) {
--- decr(glue_ref_count(p));
--- return ;
--- /*
--- } else if (! valid_node(p)) {
--- return ;
--- */
--- /*
--- } else {
--- free_node(p, get_node_size(type(p), subtype(p)));
--- return ;
--- */
--- }
--- break ;
---
--- or:
---
--- case glue_spec_node:
--- if (glue_ref_count(p)!=null) {
--- decr(glue_ref_count(p));
--- return ;
--- } else if (valid_node(p)) {
--- free_node(p, get_node_size(type(p), subtype(p)));
--- return ;
--- } else {
--- break ;
--- }
diff --git a/Master/texmf-dist/tex/context/base/node-mig.lua b/Master/texmf-dist/tex/context/base/mkiv/node-mig.lua
index 41f95be4590..24bebb0ccb2 100644
--- a/Master/texmf-dist/tex/context/base/node-mig.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-mig.lua
@@ -28,6 +28,10 @@ local getattr = nuts.getattr
local setfield = nuts.setfield
local setattr = nuts.setattr
+local setlink = nuts.setlink
+local setlist = nuts.setlist
+local setprev = nuts.setprev
+local setnext = nuts.setnext
local remove_node = nuts.remove
@@ -51,18 +55,17 @@ local function locate(head,first,last,ni,nm)
local list = getlist(current)
if list then
list, first, last, ni, nm = locate(list,first,last,ni,nm)
- setfield(current,"list",list)
+ setlist(current,list)
end
current = getnext(current)
elseif migrate_inserts and id == insert_code then
local insert
head, current, insert = remove_node(head,current)
- setfield(insert,"next",nil)
+ setnext(insert)
if first then
- setfield(insert,"prev",last)
- setfield(last,"next",insert)
+ setlink(last,insert)
else
- setfield(insert,"prev",nil)
+ setprev(insert)
first = insert
end
last = insert
@@ -70,12 +73,11 @@ local function locate(head,first,last,ni,nm)
elseif migrate_marks and id == mark_code then
local mark
head, current, mark = remove_node(head,current)
- setfield(mark,"next",nil)
+ setnext(mark)
if first then
- setfield(mark,"prev",last)
- setfield(last,"next",mark)
+ setlink(last,mark)
else
- setfield(mark,"prev",nil)
+ setprev(mark)
first = mark
end
last = mark
@@ -120,11 +122,9 @@ function nodes.handlers.migrate(head,where)
-- inserts after head, use insert_after
local n = getnext(current)
if n then
- setfield(last,"next",n)
- setfield(n,"prev",last)
+ setlink(last,n)
end
- setfield(current,"next",first)
- setfield(first,"prev",current)
+ setlink(current,first)
done = true
current = last
end
diff --git a/Master/texmf-dist/tex/context/base/node-mig.mkiv b/Master/texmf-dist/tex/context/base/mkiv/node-mig.mkiv
index 143fd4466e5..143fd4466e5 100644
--- a/Master/texmf-dist/tex/context/base/node-mig.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-mig.mkiv
diff --git a/Master/texmf-dist/tex/context/base/node-nut.lua b/Master/texmf-dist/tex/context/base/mkiv/node-nut.lua
index b133c4e7484..1465a668019 100644
--- a/Master/texmf-dist/tex/context/base/node-nut.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-nut.lua
@@ -89,20 +89,10 @@ if not modules then modules = { } end modules ['node-met'] = {
local type, rawget = type, rawget
local nodes = nodes
-local gonuts = nodes.gonuts
local direct = node.direct
local fastcopy = table.fastcopy
-if type(direct) ~= "table" then
- return
-elseif gonuts then
- statistics.register("running in nuts mode", function() return "yes" end)
-else
- statistics.register("running in nuts mode", function() return "no" end)
- return
-end
-
local texget = tex.get
local nodecodes = nodes.nodecodes
@@ -133,7 +123,7 @@ nuts.getfield = direct.getfield
nuts.getnext = direct.getnext
nuts.getprev = direct.getprev
nuts.getid = direct.getid
-nuts.getattr = direct.has_attribute or direct.getfield
+nuts.getattr = direct.get_attribute or direct.has_attribute or direct.getfield
nuts.getchar = direct.getchar
nuts.getfont = direct.getfont
nuts.getsubtype = direct.getsubtype
@@ -152,9 +142,7 @@ nuts.getleader = direct.getleader
-- end
-- end
--- track("getsubtype")
-
--- local dgf = direct.getfield function nuts.getlist(n) return dgf(n,"list") end
+-- track("getfield")
-- setters
@@ -183,6 +171,7 @@ nuts.new = direct.new
nuts.tail = direct.tail
nuts.traverse = direct.traverse
nuts.traverse_id = direct.traverse_id
+nuts.traverse_char = direct.traverse_char
nuts.slide = direct.slide
nuts.writable_spec = direct.writable_spec
nuts.vpack = direct.vpack
@@ -190,7 +179,6 @@ nuts.is_node = direct.is_node
nuts.is_direct = direct.is_direct
nuts.is_nut = direct.is_direct
nuts.first_glyph = direct.first_glyph
-nuts.first_character = direct.first_character
nuts.has_glyph = direct.has_glyph or direct.first_glyph
nuts.current_attr = direct.current_attr
@@ -206,41 +194,83 @@ nuts.set_attribute = direct.set_attribute
nuts.unset_attribute = direct.unset_attribute
nuts.protect_glyphs = direct.protect_glyphs
+nuts.protect_glyph = direct.protect_glyph
nuts.unprotect_glyphs = direct.unprotect_glyphs
+nuts.ligaturing = direct.ligaturing
+nuts.kerning = direct.kerning
+nuts.effective_glue = direct.effective_glue
--- placeholders
+if not direct.mlist_to_hlist then -- needed
-if not direct.kerning then
-
- local n_kerning = node.kerning
+ local n_mlist_to_hlist = node.mlist_to_hlist
- function nuts.kerning(head)
- return tonode(n_kerning(tonut(head)))
+ function nuts.mlist_to_hlist(head)
+ return tonode(n_mlist_to_hlist(tonut(head)))
end
end
-if not direct.ligaturing then
-
- local n_ligaturing = node.ligaturing
-
- function nuts.ligaturing(head)
- return tonode(n_ligaturing(tonut(head)))
+local is_zero_glue = direct.is_zero_glue
+local setglue = direct.setglue
+local getglue = direct.getglue
+
+if not is_zero_glue then
+ is_zero_glue = function(n)
+ return not n or (
+ getfield(n,"width") == 0 and
+ getfield(n,"stretch") == 0 and
+ getfield(n,"shrink") == 0
+ )
+ end
+ setglue = function(n,width,stretch,shrink,stretch_order,shrink_order)
+ setfield(n,"width", width or 0)
+ setfield(n,"stretch", stretch or 0)
+ setfield(n,"shrink", shrink or 0)
+ setfield(n,"stretch_order",stretch_order or 0)
+ setfield(n,"shrink_order", shrink_order or 0)
+ end
+ getglue = function(n)
+ return
+ getfield(n,"width"), getfield(n,"stretch"), getfield(n,"shrink"),
+ getfield(n,"stretch_order"), getfield(n,"shrink_order")
end
-
end
-if not direct.mlist_to_hlist then
-
- local n_mlist_to_hlist = node.mlist_to_hlist
-
- function nuts.mlist_to_hlist(head)
- return tonode(n_mlist_to_hlist(tonut(head)))
- end
+nuts.is_zero_glue = is_zero_glue
+nuts.setglue = setglue
+nuts.getglue = getglue
-end
+-- if not direct.getpre then
+--
+-- local getfield = nuts.getfield
+--
+-- function direct.getpre (n) local h, _, _, t = getdisc(n,true) return h, t end
+-- function direct.getpost (n) local _, h, _, _, t = getdisc(n,true) return h, t end
+-- function direct.getreplace(n) local _, _, h, _, _, t = getdisc(n,true) return h, t end
--
+-- end
+
+----.getpre = direct.getpre
+----.getpost = direct.getpost
+----.getreplace = direct.getreplace
+
+nuts.getdisc = direct.getdisc
+nuts.setdisc = direct.setdisc
+nuts.setchar = direct.setchar
+nuts.setnext = direct.setnext
+nuts.setprev = direct.setprev
+nuts.setboth = direct.setboth
+nuts.getboth = direct.getboth
+nuts.setlink = direct.setlink
+nuts.setlist = direct.setlist
+nuts.setleader = direct.setleader
+nuts.setsubtype = direct.setsubtype
+
+nuts.is_char = direct.is_char
+nuts.ischar = direct.is_char
+nuts.is_glyph = direct.is_glyph
+nuts.isglyph = direct.is_glyph
local d_remove_node = direct.remove
local d_free_node = direct.free
@@ -254,8 +284,10 @@ local d_find_tail = direct.tail
local d_insert_after = direct.insert_after
local d_insert_before = direct.insert_before
local d_slide = direct.slide
-local d_copy_node = direct.copy
+----- d_copy_node = direct.copy
local d_traverse = direct.traverse
+local d_setlink = direct.setlink
+local d_setboth = direct.setboth
local function remove(head,current,free_too)
local t = current
@@ -266,41 +298,13 @@ local function remove(head,current,free_too)
d_free_node(t)
t = nil
else
- d_setfield(t,"next",nil) -- not that much needed (slows down unless we check the source on this)
- d_setfield(t,"prev",nil) -- not that much needed (slows down unless we check the source on this)
+ d_setboth(t) -- (t,nil,nil)
end
return head, current, t
end
-- bad: we can have prev's being glue_spec
--- local function remove(head,current,free_too) -- d_remove_node does a slide which can fail
--- local prev = d_getprev(current) -- weird
--- local next = d_getnext(current)
--- if next then
--- -- print("!!!!!!!! prev is gluespec",
--- -- nodes.nodecodes[d_getid(current)],
--- -- nodes.nodecodes[d_getid(next)],
--- -- nodes.nodecodes[d_getid(prev)])
--- d_setfield(prev,"next",next)
--- d_setfield(next,"prev",prev)
--- else
--- d_setfield(prev,"next",nil)
--- end
--- if free_too then
--- d_free_node(current)
--- current = nil
--- else
--- d_setfield(current,"next",nil) -- use this fact !
--- d_setfield(current,"prev",nil) -- use this fact !
--- end
--- if head == current then
--- return next, next, current
--- else
--- return head, next, current
--- end
--- end
-
nuts.remove = remove
function nuts.delete(head,current)
@@ -311,15 +315,12 @@ function nuts.replace(head,current,new) -- no head returned if false
if not new then
head, current, new = false, head, current
end
- local prev = d_getprev(current)
- local next = d_getnext(current)
+ local prev, next = d_getboth(current)
if next then
- d_setfield(new,"next",next)
- d_setfield(next,"prev",new)
+ d_setlink(new,next)
end
if prev then
- d_setfield(new,"prev",prev)
- d_setfield(prev,"next",new)
+ d_setlink(new,prev)
end
if head then
if head == current then
@@ -374,8 +375,7 @@ function nuts.linked(...)
local next = select(i,...)
if next then
if head then
- d_setfield(last,"next",next)
- d_setfield(next,"prev",last)
+ d_setlink(last,next)
else
head = next
end
@@ -391,8 +391,7 @@ function nuts.concat(list) -- consider tail instead of slide
local li = list[i]
if li then
if head then
- d_setfield(tail,"next",li)
- d_setfield(li,"prev",tail)
+ d_setlink(tail,li)
else
head = li
end
@@ -402,18 +401,6 @@ function nuts.concat(list) -- consider tail instead of slide
return head, tail
end
-function nuts.writable_spec(n) -- not pool
- local spec = d_getfield(n,"spec")
- if not spec then
- spec = d_copy_node(glue_spec)
- d_setfield(n,"spec",spec)
- elseif not d_getfield(spec,"writable") then
- spec = d_copy_node(spec)
- d_setfield(n,"spec",spec)
- end
- return spec
-end
-
function nuts.reference(n)
return n or "<none>"
end
@@ -432,24 +419,6 @@ function nodes.vianodes(f) return function(n,...) return tonut (f(tonode(n),...)
nuts.vianuts = nodes.vianuts
nuts.vianodes = nodes.vianodes
--- for k, v in next, nuts do
--- if type(v) == "function" then
--- if not string.find(k,"^[sg]et") and not string.find(k,"^to") then
--- local f = v
--- nuts[k] = function(...) print("d",k,...) return f(...) end
--- end
--- end
--- end
-
--- for k, v in next, nodes do
--- if type(v) == "function" then
--- if not string.find(k,"^[sg]et") and not string.find(k,"^to") then
--- local f = v
--- nodes[k] = function(...) print("n",k,...) return f(...) end
--- end
--- end
--- end
-
-- function nodes.insert_before(h,c,n)
-- if c then
-- if c == h then
@@ -491,6 +460,7 @@ function nodes.insert_list_after(h,c,n)
if c then
local cn = n_getnext(c)
if cn then
+ -- no setboth here yet
n_setfield(t,"next",cn)
n_setfield(cn,"prev",t)
else
@@ -506,17 +476,17 @@ end
-- function nuts.insert_before(h,c,n)
-- if c then
-- if c == h then
--- d_setfield(n,"next",h)
--- d_setfield(n,"prev",nil)
--- d_setfield(h,"prev",n)
+-- d_setnext(n,h)
+-- d_setprev(n)
+-- d_setprev(h,n)
-- else
-- local cp = d_getprev(c)
--- d_setfield(n,"next",c)
--- d_setfield(n,"prev",cp)
+-- d_setnext(n,c)
+-- d_setprev(n,cp)
-- if cp then
--- d_setfield(cp,"next",n)
+-- d_setnext(cp,n)
-- end
--- d_setfield(c,"prev",n)
+-- d_setprev(c,n)
-- return h, n
-- end
-- end
@@ -527,13 +497,11 @@ end
-- if c then
-- local cn = d_getnext(c)
-- if cn then
--- d_setfield(n,"next",cn)
--- d_setfield(cn,"prev",n)
+-- d_setlink(n,cn)
-- else
--- d_setfield(n,"next",nil)
+-- d_setnext(n,nil)
-- end
--- d_setfield(c,"next",n)
--- d_setfield(n,"prev",c)
+-- d_setlink(c,n)
-- return h, n
-- end
-- return n, n
@@ -544,13 +512,11 @@ function nuts.insert_list_after(h,c,n)
if c then
local cn = d_getnext(c)
if cn then
- d_setfield(t,"next",cn)
- d_setfield(cn,"prev",t)
+ d_setlink(t,cn)
else
- d_setfield(t,"next",nil)
+ d_setnext(t)
end
- d_setfield(c,"next",n)
- d_setfield(n,"prev",c)
+ d_setlink(c,n)
return h, n
end
return n, t
@@ -674,57 +640,57 @@ local propertydata = direct.get_properties_table and direct.get_properties_table
local getattr = nuts.getattr
local setattr = nuts.setattr
-if propertydata then
-
- nodes.properties = {
- data = propertydata,
- }
+nodes.properties = {
+ data = propertydata,
+}
- -- direct.set_properties_mode(true,false) -- shallow copy ... problem: in fonts we then affect the originals too
- direct.set_properties_mode(true,true) -- create metatable, slower but needed for font-inj.lua (unless we use an intermediate table)
+------.set_properties_mode(true,false) -- shallow copy ... problem: in fonts we then affect the originals too
+direct.set_properties_mode(true,true) -- create metatable, slower but needed for font-inj.lua (unless we use an intermediate table)
- -- todo:
- --
- -- function direct.set_properties_mode()
- -- -- we really need the set modes
- -- end
+-- todo:
+--
+-- function direct.set_properties_mode()
+-- -- we really need the set modes
+-- end
- -- experimental code with respect to copying attributes has been removed
- -- as it doesn't pay of (most attributes are only accessed once anyway)
+-- experimental code with respect to copying attributes has been removed
+-- as it doesn't pay of (most attributes are only accessed once anyway)
- nuts.getprop = function(n,k)
- local p = propertydata[n]
- if p then
- return p[k]
- end
+nuts.getprop = function(n,k)
+ local p = propertydata[n]
+ if p then
+ return p[k]
end
+end
- nuts.setprop = function(n,k,v)
- if v then
- local p = propertydata[n]
- if p then
- p[k] = v
- else
- propertydata[n] = { [k] = v }
- end
- end
+nuts.rawprop = function(n,k)
+ local p = rawget(propertydata,n)
+ if p then
+ return p[k]
end
+end
- nodes.setprop = nodes.setproperty
- nodes.getprop = nodes.getproperty
-
-else
-
- -- for testing and simple cases
-
- nuts.getprop = getattr
- nuts.setprop = setattr
-
- nodes.setprop = getattr
- nodes.getprop = setattr
+nuts.setprop = function(n,k,v)
+ local p = propertydata[n]
+ if p then
+ p[k] = v
+ else
+ propertydata[n] = { [k] = v }
+ end
+end
+nuts.theprop = function(n)
+ local p = propertydata[n]
+ if not p then
+ p = { }
+ propertydata[n] = p
+ end
+ return p
end
+nodes.setprop = nodes.setproperty
+nodes.getprop = nodes.getproperty
+
function nuts.copy_properties(source,target,what)
local newprops = propertydata[source]
if not newprops then
@@ -765,26 +731,29 @@ nodes.whatsitters = {
setters = { width = setwidth, dimensions = setdimensions },
}
--- this might move (in fact forms and images will become nodes)
-
-local function get_width(n,dir)
- n = tonut(n)
- return getfield(n,"width")
-end
-
-local function get_dimensions(n,dir)
- n = tonut(n)
- return getfield(n,"width"), getfield(n,"height"), getfield(n,"depth")
-end
-
-local whatcodes = nodes.whatcodes
-local pdfrefximage_code = whatcodes.pdfrefximage
-local pdfrefxform_code = whatcodes.pdfrefxform
-
-getwidth [pdfrefximage_code] = get_width
-getwidth [pdfrefxform_code ] = get_width
-
-getdimensions[pdfrefximage_code] = get_dimensions
-getdimensions[pdfrefxform_code ] = get_dimensions
+-- obsolete
+-- local function get_width(n,dir)
+-- n = tonut(n)
+-- return getfield(n,"width")
+-- end
+--
+-- local function get_dimensions(n,dir)
+-- n = tonut(n)
+-- return getfield(n,"width"), getfield(n,"height"), getfield(n,"depth")
+-- end
+--
+-- local whatcodes = nodes.whatcodes
+-- local pdfrefximage_code = whatcodes.pdfrefximage
+-- local pdfrefxform_code = whatcodes.pdfrefxform
+--
+-- if pdfrefxform_code then
+-- getwidth [pdfrefxform_code ] = get_width
+-- getdimensions[pdfrefxform_code ] = get_dimensions
+-- end
+--
+-- if pdfrefximage_code then
+-- getwidth [pdfrefximage_code] = get_width
+-- getdimensions[pdfrefximage_code] = get_dimensions
+-- end
diff --git a/Master/texmf-dist/tex/context/base/node-pag.lua b/Master/texmf-dist/tex/context/base/mkiv/node-pag.lua
index 9b8202042c5..9b8202042c5 100644
--- a/Master/texmf-dist/tex/context/base/node-pag.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-pag.lua
diff --git a/Master/texmf-dist/tex/context/base/node-pag.mkiv b/Master/texmf-dist/tex/context/base/mkiv/node-pag.mkiv
index b8ed197fe64..b8ed197fe64 100644
--- a/Master/texmf-dist/tex/context/base/node-pag.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-pag.mkiv
diff --git a/Master/texmf-dist/tex/context/base/node-ppt.lua b/Master/texmf-dist/tex/context/base/mkiv/node-ppt.lua
index 5e7abeaae79..2573e5f5cea 100644
--- a/Master/texmf-dist/tex/context/base/node-ppt.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-ppt.lua
@@ -29,6 +29,7 @@ local getsubtype = nuts.getsubtype
local getfield = nuts.getfield
local setfield = nuts.setfield
local getlist = nuts.getlist
+local setlist = nuts.setlist
local flushnode = nuts.flush
local removenode = nuts.remove
local traverse = nuts.traverse
@@ -41,7 +42,6 @@ local whatsit_code = nodecodes.whatsit
local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
local userdefined_code = whatsitcodes.userdefined
-local localpar_code = whatsitcodes.localpar
local nodepool = nodes.pool
local new_usernumber = nodepool.usernumber
@@ -254,7 +254,7 @@ local function delayed(head,parent) -- direct based
if list then
local done = delayed(list,parent)
if done then
- setfield(target,"list",done)
+ setlist(target,done)
end
if nofdelayed == 0 then
return head
@@ -302,8 +302,6 @@ local anchored = {
local subtype = getsubtype(n)
if (subtype == userdefined_code and getfield(n,"user_id") == property_id) then
-- continue
- elseif subtype == localpar_code then
- -- continue .. can't happen anyway as we cannot write
else
return n
end
diff --git a/Master/texmf-dist/tex/context/base/node-pro.lua b/Master/texmf-dist/tex/context/base/mkiv/node-pro.lua
index 27e349893b6..36670eed2f9 100644
--- a/Master/texmf-dist/tex/context/base/node-pro.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-pro.lua
@@ -9,7 +9,8 @@ if not modules then modules = { } end modules ['node-pro'] = {
local utfchar = utf.char
local format, concat = string.format, table.concat
-local trace_callbacks = false trackers.register("nodes.callbacks", function(v) trace_callbacks = v end)
+local trace_callbacks = false trackers .register("nodes.callbacks", function(v) trace_callbacks = v end)
+local force_processors = false directives.register("nodes.processors.force", function(v) force_processors = v end)
local report_nodes = logs.reporter("nodes","processors")
@@ -34,8 +35,7 @@ local actions = tasks.actions("processors")
do
local tonut = nuts.tonut
- local getid = nuts.getid
- local getchar = nuts.getchar
+ local isglyph = nuts.isglyph
local getnext = nuts.getnext
local n = 0
@@ -44,9 +44,9 @@ do
local t, n, h = { }, 0, tonut(head)
while h do
n = n + 1
- local id = getid(h)
- if id == glyph_code then -- todo: disc etc
- t[n] = utfchar(getchar(h))
+ local char, id = isglyph(h)
+ if char then -- todo: disc etc
+ t[n] = utfchar(char)
else
t[n] = "[]"
end
@@ -77,7 +77,7 @@ processors.enabled = true -- this will become a proper state (like trackers)
function processors.pre_linebreak_filter(head,groupcode) -- ,size,packtype,direction
-- local first, found = first_glyph(head) -- they really need to be glyphs
- local found = has_glyph(head)
+ local found = force_processors or has_glyph(head)
if found then
if trace_callbacks then
local before = nodes.count(head,true)
@@ -100,46 +100,46 @@ function processors.pre_linebreak_filter(head,groupcode) -- ,size,packtype,direc
return true
end
-local enabled = true
-
-function processors.hpack_filter(head,groupcode,size,packtype,direction)
- if enabled then
- -- local first, found = first_glyph(head) -- they really need to be glyphs
- local found = has_glyph(head)
- if found then
- if trace_callbacks then
- local before = nodes.count(head,true)
- local head, done = actions(head,groupcode,size,packtype,direction)
- local after = nodes.count(head,true)
- if done then
- tracer("hpack","changed",head,groupcode,before,after,true)
- else
- tracer("hpack","unchanged",head,groupcode,before,after,true)
- end
- return done and head or true
+local function hpack_filter(head,groupcode,size,packtype,direction,attributes)
+ -- local first, found = first_glyph(head) -- they really need to be glyphs
+ local found = force_processors or has_glyph(head)
+ if found then
+ if trace_callbacks then
+ local before = nodes.count(head,true)
+ local head, done = actions(head,groupcode,size,packtype,direction,attributes)
+ local after = nodes.count(head,true)
+ if done then
+ tracer("hpack","changed",head,groupcode,before,after,true)
else
- local head, done = actions(head,groupcode,size,packtype,direction)
- return done and head or true
+ tracer("hpack","unchanged",head,groupcode,before,after,true)
end
- elseif trace_callbacks then
- local n = nodes.count(head,false)
- tracer("hpack","no chars",head,groupcode,n,n)
+ return done and head or true
+ else
+ local head, done = actions(head,groupcode,size,packtype,direction,attributes)
+ return done and head or true
end
+ elseif trace_callbacks then
+ local n = nodes.count(head,false)
+ tracer("hpack","no chars",head,groupcode,n,n)
end
return true
end
+processors.hpack_filter = hpack_filter
+
do
local setfield = nodes.setfield
local hpack = nodes.hpack
- function nodes.fasthpack(...) -- todo: pass explicit arguments
- enabled = false
- local hp, b = hpack(...)
+ function nodes.fullhpack(head,...)
+ local ok = hpack_filter(head)
+ if not done or done == true then
+ ok = head
+ end
+ local hp, b = hpack(ok,...)
setfield(hp,"prev",nil)
setfield(hp,"next",nil)
- enabled = true
return hp, b
end
@@ -147,15 +147,18 @@ end
do
- local setfield = nuts.setfield
- local hpack = nuts.hpack
+ local setboth = nuts.setboth
+ local hpack = nuts.hpack
- function nuts.fasthpack(...) -- todo: pass explicit arguments
- enabled = false
+ function nuts.fullhpack(head,...)
+ local ok = hpack_filter(tonode(head))
+ if not done or done == true then
+ ok = head
+ else
+ ok = tonut(ok)
+ end
local hp, b = hpack(...)
- setfield(hp,"prev",nil)
- setfield(hp,"next",nil)
- enabled = true
+ setboth(hp)
return hp, b
end
diff --git a/Master/texmf-dist/tex/context/base/node-ref.lua b/Master/texmf-dist/tex/context/base/mkiv/node-ref.lua
index 97c37c74e40..9f2d0918c0f 100644
--- a/Master/texmf-dist/tex/context/base/node-ref.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-ref.lua
@@ -52,10 +52,14 @@ local tonut = nuts.tonut
local getfield = nuts.getfield
local setfield = nuts.setfield
+local setlink = nuts.setlink
+local setnext = nuts.setnext
+local setprev = nuts.setprev
local getnext = nuts.getnext
local getprev = nuts.getprev
local getid = nuts.getid
local getlist = nuts.getlist
+local setlist = nuts.setlist
local getattr = nuts.getattr
local setattr = nuts.setattr
local getsubtype = nuts.getsubtype
@@ -68,7 +72,6 @@ local find_node_tail = nuts.tail
local nodecodes = nodes.nodecodes
local skipcodes = nodes.skipcodes
-local whatcodes = nodes.whatcodes
local listcodes = nodes.listcodes
local hlist_code = nodecodes.hlist
@@ -76,15 +79,13 @@ local vlist_code = nodecodes.vlist
local glue_code = nodecodes.glue
local glyph_code = nodecodes.glyph
local rule_code = nodecodes.rule
-local whatsit_code = nodecodes.whatsit
+local dir_code = nodecodes.dir
+local localpar_code = nodecodes.localpar
local leftskip_code = skipcodes.leftskip
local rightskip_code = skipcodes.rightskip
local parfillskip_code = skipcodes.parfillskip
-local localpar_code = whatcodes.localpar
-local dir_code = whatcodes.dir
-
local line_code = listcodes.line
local new_rule = nodepool.rule
@@ -97,44 +98,52 @@ local tosequence = nodes.tosequence
local implement = interfaces.implement
-- Normally a (destination) area is a box or a simple stretch if nodes but when it is
--- a paragraph we hav ea problem: we cannot calculate the height well. This happens
+-- a paragraph we have a problem: we cannot calculate the height well. This happens
-- with footnotes or content broken across a page.
-local function vlist_dimensions(start,stop)
+local function hlist_dimensions(start,stop,parent)
+ local last = stop and getnext(stop)
+ if parent then
+ return list_dimensions(getfield(parent,"glue_set"),getfield(parent,"glue_sign"),getfield(parent,"glue_order"),start,last)
+ else
+ return list_dimensions(start,last)
+ end
+end
+
+local function vlist_dimensions(start,stop) -- also needs the stretch and so
local temp
if stop then
temp = getnext(stop)
- setfield(stop,"next",nil)
+ setnext(stop,nil)
end
local v = vpack_list(start)
local w = getfield(v,"width")
local h = getfield(v,"height")
local d = getfield(v,"depth")
- setfield(v,"list",nil)
+ setlist(v) -- not needed
free_node(v)
if temp then
- setfield(stop,"next",temp)
+ setnext(stop,temp)
end
return w, h, d
end
-local function hlist_dimensions(start,stop,parent)
- local last = stop and getnext(stop)
- if parent then
- return list_dimensions(getfield(parent,"glue_set"),getfield(parent,"glue_sign"),getfield(parent,"glue_order"),start,last)
- else
- return list_dimensions(start,last)
- end
-end
-
local function dimensions(parent,start,stop) -- in principle we could move some to the caller
local id = getid(start)
if start == stop then
- if id == hlist_code or id == vlist_code or id == glyph_code or id == rule_code then -- or image
+ if id == hlist_code or id == vlist_code or id == glyph_code or id == rule_code then
if trace_areas then
report_area("dimensions taken of %a",nodecodes[id])
end
- return getfield(start,"width"), getfield(parent,"height"), getfield(parent,"depth")
+ -- hm, parent can be zero
+ local width = getfield(start,"width")
+ local height = getfield(parent,"height")
+ local depth = getfield(parent,"depth")
+ if height == 0 and depth == 0 then
+ height = getfield(start,"height")
+ depth = getfield(start,"depth")
+ end
+ return width, height, depth
else
if trace_areas then
report_area("dimensions calculated of %a",nodecodes[id])
@@ -147,29 +156,77 @@ local function dimensions(parent,start,stop) -- in principle we could move some
-- todo: if no prev and no next and parent
-- todo: we need a a list_dimensions for a vlist
if getid(parent) == vlist_code then
- local l = getlist(parent)
- local c = l
- local ok = false
- while c do
- if c == start then
- ok = true
+ if false then
+ local l = getlist(parent)
+ local c = l
+ local ok = false
+ while c do
+ if c == start then
+ ok = true
+ end
+ if ok and getid(c) == hlist_code then
+ break
+ else
+ c = getnext(c)
+ end
end
- if ok and getid(c) == hlist_code then
- break
+ if ok and c then
+ if trace_areas then
+ report_area("dimensions taken of first line in vlist")
+ end
+ return getfield(c,"width"), getfield(c,"height"), getfield(c,"depth"), c
else
- c = getnext(c)
- end
- end
- if ok and c then
- if trace_areas then
- report_area("dimensions taken of first line in vlist")
+ if trace_areas then
+ report_area("dimensions taken of vlist (probably wrong)")
+ end
+ return hlist_dimensions(start,stop,parent)
end
- return getfield(c,"width"), getfield(c,"height"), getfield(c,"depth"), c
else
- if trace_areas then
- report_area("dimensions taken of vlist (probably wrong)")
+ --
+ -- we can as well calculate here because we only have kerns and glue
+ --
+ local first = nil
+ local last = nil
+ local current = start
+ local noflines = 0
+ while current do
+ local id = getid(current)
+ if id == hlist_code or id == vlist_code or id == rule_code then
+ if noflines == 0 then
+ first = current
+ noflines = 1
+ else
+ noflines = noflines + 1
+ end
+ last = current
+ end
+ if current == stop then
+ break
+ else
+ current = getnext(current)
+ end
+ end
+ if noflines > 1 then
+ if trace_areas then
+ report_area("dimensions taken of vlist")
+ end
+ local w, h, d = vlist_dimensions(first,last,parent)
+ local ht = getfield(first,"height")
+ return w, ht, d + h - ht, first
+ else
+ -- return hlist_dimensions(start,stop,parent)
+ if first then
+ if trace_areas then
+ report_area("dimensions taken of first line in vlist")
+ end
+ return getfield(first,"width"), getfield(first,"height"), getfield(first,"depth"), first
+ else
+ if trace_areas then
+ report_area("dimensions taken of vlist (probably wrong)")
+ end
+ return hlist_dimensions(start,stop,parent)
+ end
end
- return hlist_dimensions(start,stop,parent)
end
else
if trace_areas then
@@ -198,37 +255,33 @@ local function inject_range(head,first,last,reference,make,stack,parent,pardir,t
-- special case, we only treat the first line in a vlist
local l = getlist(line)
if trace_areas then
- report_area("%s: %04i %s %s %s => w=%p, h=%p, d=%p, c=%S","line",
- reference,pardir or "---",txtdir or "---",tosequence(l,nil,true),width,height,depth,resolved)
+ report_area("%s: %i : %s %s %s => w=%p, h=%p, d=%p, c=%S","line",
+ reference,pardir or "---",txtdir or "---",
+ tosequence(l,nil,true),width,height,depth,resolved)
end
- setfield(line,"list",result)
- setfield(result,"next",l)
- setfield(l,"prev",result)
+ setlist(line,result)
+ setlink(result,l)
return head, last
else
if head == first then
if trace_areas then
- report_area("%s: %04i %s %s %s => w=%p, h=%p, d=%p, c=%S","head",
- reference,pardir or "---",txtdir or "---",tosequence(first,last,true),width,height,depth,resolved)
+ report_area("%s: %i : %s %s %s => w=%p, h=%p, d=%p, c=%S","head",
+ reference,pardir or "---",txtdir or "---",
+ tosequence(first,last,true),width,height,depth,resolved)
end
- setfield(result,"next",first)
- setfield(first,"prev",result)
+ setlink(result,first)
return result, last
else
if trace_areas then
- report_area("%s: %04i %s %s %s => w=%p, h=%p, d=%p, c=%S","middle",
- reference,pardir or "---",txtdir or "---",tosequence(first,last,true),width,height,depth,resolved)
+ report_area("%s: %i : %s %s %s => w=%p, h=%p, d=%p, c=%S","middle",
+ reference,pardir or "---",txtdir or "---",
+ tosequence(first,last,true),width,height,depth,resolved)
end
local prev = getprev(first)
if prev then
- setfield(prev,"next",result)
- setfield(result,"prev",prev)
+ setlink(prev,result)
end
- setfield(result,"next",first)
- setfield(first,"prev",result)
- -- if first == getnext(head) then
- -- setfield(head,"next",result) -- hm, weird
- -- end
+ setlink(result,first)
return head, last
end
end
@@ -257,12 +310,10 @@ local function inject_list(id,current,reference,make,stack,pardir,txtdir)
if prev and getid(prev) == glue_code and getsubtype(prev) == parfillskip_code then
width = dimensions(current,first,getprev(prev)) -- maybe not current as we already take care of it
else
- if moveright and getfield(first,"writable") then
- width = width - getfield(getfield(first,"spec"),"stretch") * getfield(current,"glue_set") * getfield(current,"glue_sign")
- end
- if getfield(last,"writable") then
- width = width - getfield(getfield(last,"spec"),"stretch") * getfield(current,"glue_set") * getfield(current,"glue_sign")
+ if moveright then
+ width = width - getfield(first,"stretch") * getfield(current,"glue_set") * getfield(current,"glue_sign")
end
+ width = width - getfield(last,"stretch") * getfield(current,"glue_set") * getfield(current,"glue_sign")
end
end
else
@@ -287,27 +338,31 @@ local function inject_list(id,current,reference,make,stack,pardir,txtdir)
reference,pardir or "---",txtdir or "----","[]",width,height,depth,resolved)
end
if not first then
- setfield(current,"list",result)
+ setlist(current,result)
elseif moveright then -- brr no prevs done
-- result after first
local n = getnext(first)
- setfield(result,"next",n)
- setfield(first,"next",result)
- setfield(result,"prev",first)
+ setnext(result,n)
+ setlink(first,first)
if n then
- setfield(n,"prev",result)
+ setprev(n,result)
end
else
-- first after result
- setfield(result,"next",first)
- setfield(first,"prev",result)
- setfield(current,"list",result)
+ setlink(result,first)
+ setlist(current,result)
end
end
end
-- skip is somewhat messy
+-- todo: when line we can look at the next line
+
+-- see dimensions: this is tricky with split off boxes like inserts
+-- where we can end up with a first and last spanning lines so maybe
+-- we need to do vlists differently
+
local function inject_areas(head,attribute,make,stack,done,skip,parent,pardir,txtdir) -- main
if head then
local current, first, last, firstdir, reference = head, nil, nil, nil, nil
@@ -316,10 +371,6 @@ local function inject_areas(head,attribute,make,stack,done,skip,parent,pardir,tx
while current do
local id = getid(current)
if id == hlist_code or id == vlist_code then
-
- -- see dimensions: this is tricky with split off boxes like inserts
- -- where we can end up with a first and last spanning lines
-
local r = getattr(current,attribute)
-- test \goto{test}[page(2)] test \gotobox{test}[page(2)]
-- test \goto{\TeX}[page(2)] test \gotobox{\hbox {x} \hbox {x}}[page(2)]
@@ -346,18 +397,17 @@ local function inject_areas(head,attribute,make,stack,done,skip,parent,pardir,tx
if list then
local h, ok
h, ok , pardir, txtdir = inject_areas(list,attribute,make,stack,done,r or skip or 0,current,pardir,txtdir)
- setfield(current,"list",h)
+ if h ~= current then
+ setlist(current,h)
+ end
end
if r then
done[r] = done[r] - 1
end
- elseif id == whatsit_code then
- local subtype = getsubtype(current)
- if subtype == localpar_code then
- pardir = getfield(current,"dir")
- elseif subtype == dir_code then
- txtdir = getfield(current,"dir")
- end
+ elseif id == dir_code then
+ txtdir = getfield(current,"dir")
+ elseif id == localpar_code then
+ pardir = getfield(current,"dir")
elseif id == glue_code and getsubtype(current) == leftskip_code then -- any glue at the left?
--
else
@@ -401,15 +451,15 @@ local function inject_area(head,attribute,make,stack,done,parent,pardir,txtdir)
end
local list = getlist(current)
if list then
- setfield(current,"list",(inject_area(list,attribute,make,stack,done,current,pardir,txtdir)))
- end
- elseif id == whatsit_code then
- local subtype = getsubtype(current)
- if subtype == localpar_code then
- pardir = getfield(current,"dir")
- elseif subtype == dir_code then
- txtdir = getfield(current,"dir")
+ local h = inject_area(list,attribute,make,stack,done,current,pardir,txtdir)
+ if h ~= current then
+ setlist(current,h)
+ end
end
+ elseif id == dir_code then
+ txtdir = getfield(current,"dir")
+ elseif id == localpar_code then
+ pardir = getfield(current,"dir")
else
local r = getattr(current,attribute)
if r and not done[r] then
@@ -449,12 +499,10 @@ local function addstring(what,str,shift) --todo make a pluggable helper (in font
str = str .. " "
shift = (shift or 2) * exheight
end
- local text = typesetters.fast_hpack(str,infofont)
+ local text = typesetters.tohpack(str,infofont)
local rule = new_rule(emwidth/5,4*exheight,3*exheight)
setfield(text,"shift",shift)
- return nuts.fasthpack(nuts.linked(text,rule))
- -- local text = typesetters.fast_hpack(str,fonts.infofont())
- -- return text
+ return hpack_list(nuts.linked(text,rule))
end
end
end
@@ -493,8 +541,8 @@ local function colorize(width,height,depth,n,reference,what,sr,offset)
if width < 0 then
local kern = new_kern(width)
setfield(rule,"width",-width)
- setfield(kern,"next",rule)
- setfield(rule,"prev",kern)
+ setnext(kern,rule)
+ setprev(rule,kern)
return kern
else
@@ -502,10 +550,8 @@ if sr and sr ~= "" then
local text = addstring(what,sr,shift)
if text then
local kern = new_kern(-getfield(text,"width"))
- setfield(kern,"next",text)
- setfield(text,"prev",kern)
- setfield(text,"next",rule)
- setfield(rule,"prev",text)
+ setlink(kern,text)
+ setlink(text,rule)
return kern
end
end
@@ -519,10 +565,8 @@ local function justadd(what,sr,shift)
local text = addstring(what,sr,shift)
if text then
local kern = new_kern(-getfield(text,"width"))
- setfield(kern,"next",text)
- setfield(text,"prev",kern)
- setfield(text,"next",rule)
- setfield(rule,"prev",text)
+ setlink(kern,text)
+ setlink(text,rule)
return kern
end
end
@@ -609,8 +653,7 @@ local function makereference(width,height,depth,reference) -- height and depth a
end
end
if current then
- setfield(current,"next",annot)
- setfield(annot,"prev",current)
+ setlink(current,annot)
else
result = annot
end
@@ -720,8 +763,7 @@ local function makedestination(width,height,depth,reference)
if not result then
result, current = rule, rule
else
- setfield(current,"next",rule)
- setfield(rule,"prev",current)
+ setlink(current,rule)
current = rule
end
width, height = width - step, height - step
@@ -740,8 +782,7 @@ local function makedestination(width,height,depth,reference)
if annot then
annot = tonut(annot) -- obsolete soon
if result then
- setfield(current,"next",annot)
- setfield(annot,"prev",current)
+ setlink(current,annot)
else
result = annot
end
@@ -787,12 +828,10 @@ function references.mark(reference,h,d,view)
end
function references.inject(prefix,reference,specification) -- todo: use currentreference is possible
--- print(prefix,reference,h,d,highlight,newwindow,layer)
local set, bug = references.identify(prefix,reference)
if bug or #set == 0 then
-- unknown ref, just don't set it and issue an error
else
- -- check
set.highlight = specification.highlight
set.newwindow = specification.newwindow
set.layer = specification.layer
@@ -800,6 +839,20 @@ function references.inject(prefix,reference,specification) -- todo: use currentr
end
end
+-- function references.injectinternal(internal,specification)
+-- references.inject("","internal("..internal..")",specification)
+-- if bug or #set == 0 then
+-- -- unknown ref, just don't set it and issue an error
+-- else
+-- -- nil prefix when ""
+-- -- check
+-- set.highlight = specification.highlight
+-- set.newwindow = specification.newwindow
+-- set.layer = specification.layer
+-- setreference(specification.height,specification.depth,set) -- sets attribute / todo: for set[*].error
+-- end
+-- end
+
function references.injectcurrentset(h,d) -- used inside doifelse
local currentset = references.currentset
if currentset then
@@ -819,10 +872,27 @@ implement {
{ "layer" },
{ "height", "dimen" },
{ "depth", "dimen" },
+ { "view" },
}
}
}
+-- implement {
+-- name = "injectinternalreference",
+-- actions = references.injectinternal,
+-- arguments = {
+-- "integer",
+-- {
+-- { "highlight", "boolean" },
+-- { "newwindow", "boolean" },
+-- { "layer" },
+-- { "height", "dimen" },
+-- { "depth", "dimen" },
+-- { "view" },
+-- }
+-- }
+-- }
+
implement {
name = "injectcurrentreference",
actions = references.injectcurrentset,
diff --git a/Master/texmf-dist/tex/context/base/node-res.lua b/Master/texmf-dist/tex/context/base/mkiv/node-res.lua
index 43dd3895ed6..4d25314ad85 100644
--- a/Master/texmf-dist/tex/context/base/node-res.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-res.lua
@@ -18,19 +18,21 @@ local report_nodes = logs.reporter("nodes","housekeeping")
local nodes, node = nodes, node
-nodes.pool = nodes.pool or { }
-local nodepool = nodes.pool
+nodes.pool = nodes.pool or { }
+local nodepool = nodes.pool
-local whatsitcodes = nodes.whatsitcodes
-local skipcodes = nodes.skipcodes
-local kerncodes = nodes.kerncodes
-local nodecodes = nodes.nodecodes
+local whatsitcodes = nodes.whatsitcodes
+local skipcodes = nodes.skipcodes
+local kerncodes = nodes.kerncodes
+local rulecodes = nodes.rulecodes
+local nodecodes = nodes.nodecodes
+local boundarycodes = nodes.boundarycodes
-local glyph_code = nodecodes.glyph
+local glyph_code = nodecodes.glyph
-local allocate = utilities.storage.allocate
+local allocate = utilities.storage.allocate
-local texgetcount = tex.getcount
+local texgetcount = tex.getcount
local reserved, nofreserved = { }, 0
@@ -58,25 +60,28 @@ setmetatable(userids, {
-- nuts overload
-local nuts = nodes.nuts
-local nutpool = { }
-nuts.pool = nutpool
+local nuts = nodes.nuts
+local nutpool = { }
+nuts.pool = nutpool
-local tonut = nuts.tonut
-local tonode = nuts.tonode
+local tonut = nuts.tonut
+local tonode = nuts.tonode
-local getbox = nuts.getbox
-local getfield = nuts.getfield
-local setfield = nuts.setfield
-local getid = nuts.getid
-local getlist = nuts.getlist
+local getbox = nuts.getbox
+local getfield = nuts.getfield
+local getid = nuts.getid
+local getlist = nuts.getlist
-local copy_nut = nuts.copy
-local new_nut = nuts.new
-local free_nut = nuts.free
+local setfield = nuts.setfield
+local setchar = nuts.setchar
+local setlist = nuts.setlist
-local copy_node = nodes.copy
-local new_node = nodes.new
+local copy_nut = nuts.copy
+local new_nut = nuts.new
+local free_nut = nuts.free
+
+local copy_node = nodes.copy
+local new_node = nodes.new
-- at some point we could have a dual set (the overhead of tonut is not much larger than
-- metatable associations at the lua/c end esp if we also take assignments into account
@@ -135,11 +140,14 @@ nutpool.register = register_node -- could be register_nut
local disc = register_nut(new_nut("disc"))
local kern = register_nut(new_nut("kern",kerncodes.userkern))
local fontkern = register_nut(new_nut("kern",kerncodes.fontkern))
+local italickern = register_nut(new_nut("kern",kerncodes.italiccorrection))
local penalty = register_nut(new_nut("penalty"))
local glue = register_nut(new_nut("glue")) -- glue.spec = nil
local glue_spec = register_nut(new_nut("glue_spec"))
local glyph = register_nut(new_nut("glyph",0))
-local textdir = register_nut(new_nut("whatsit",whatsitcodes.dir))
+
+local textdir = register_nut(new_nut("dir"))
+
local latelua = register_nut(new_nut("whatsit",whatsitcodes.latelua))
local special = register_nut(new_nut("whatsit",whatsitcodes.special))
local user_n = register_nut(new_nut("whatsit",whatsitcodes.userdefined)) setfield(user_n,"type",100) -- 44
@@ -147,47 +155,79 @@ local user_l = register_nut(new_nut("whatsit",whatsitcodes.userdefine
local user_s = register_nut(new_nut("whatsit",whatsitcodes.userdefined)) setfield(user_s,"type",115) -- 44
local user_t = register_nut(new_nut("whatsit",whatsitcodes.userdefined)) setfield(user_t,"type",116) -- 44
----- user_c = register_nut(new_nut("whatsit",whatsitcodes.userdefined)) setfield(user_c,"type",108) -- 44
+
local left_margin_kern = register_nut(new_nut("margin_kern",0))
local right_margin_kern = register_nut(new_nut("margin_kern",1))
+
local lineskip = register_nut(new_nut("glue",skipcodes.lineskip))
local baselineskip = register_nut(new_nut("glue",skipcodes.baselineskip))
local leftskip = register_nut(new_nut("glue",skipcodes.leftskip))
local rightskip = register_nut(new_nut("glue",skipcodes.rightskip))
+
local temp = register_nut(new_nut("temp",0))
+
local noad = register_nut(new_nut("noad"))
+local boundary = register_nut(new_nut("boundary",boundarycodes.user))
+local wordboundary = register_nut(new_nut("boundary",boundarycodes.word))
+
-- the dir field needs to be set otherwise crash:
-local rule = register_nut(new_nut("rule")) setfield(rule, "dir","TLT")
-local hlist = register_nut(new_nut("hlist")) setfield(hlist,"dir","TLT")
-local vlist = register_nut(new_nut("vlist")) setfield(vlist,"dir","TLT")
+local rule = register_nut(new_nut("rule")) setfield(rule, "dir","TLT")
+local emptyrule = register_nut(new_nut("rule",rulecodes.empty)) setfield(rule, "dir","TLT")
+local userrule = register_nut(new_nut("rule",rulecodes.user)) setfield(rule, "dir","TLT")
+local hlist = register_nut(new_nut("hlist")) setfield(hlist,"dir","TLT")
+local vlist = register_nut(new_nut("vlist")) setfield(vlist,"dir","TLT")
function nutpool.zeroglue(n)
- local s = getfield(n,"spec")
- return
- getfield(s,"width") == 0 and
- getfield(s,"stretch") == 0 and
- getfield(s,"shrink") == 0 and
- getfield(s,"stretch_order") == 0 and
- getfield(s,"shrink_order") == 0
+ if n then
+ return
+ getfield(n,"width") == 0 and
+ getfield(n,"stretch") == 0 and
+ getfield(n,"shrink") == 0 and
+ getfield(n,"stretch_order") == 0 and
+ getfield(n,"shrink_order") == 0
+ else
+ return false
+ end
end
function nutpool.glyph(fnt,chr)
local n = copy_nut(glyph)
if fnt then setfield(n,"font",fnt) end
- if chr then setfield(n,"char",chr) end
+ if chr then setchar(n,chr) end
return n
end
function nutpool.penalty(p)
local n = copy_nut(penalty)
- setfield(n,"penalty",p)
+ if p and p ~= 0 then
+ setfield(n,"penalty",p)
+ end
return n
end
function nutpool.kern(k)
local n = copy_nut(kern)
- setfield(n,"kern",k)
+ if k and k ~= 0 then
+ setfield(n,"kern",k)
+ end
+ return n
+end
+
+function nutpool.boundary(v)
+ local n = copy_nut(boundary)
+ if v and v ~= 0 then
+ setfield(n,"value",v)
+ end
+ return n
+end
+
+function nutpool.wordboundary(v)
+ local n = copy_nut(wordboundary)
+ if v and v ~= 0 then
+ setfield(n,"value",v)
+ end
return n
end
@@ -197,60 +237,75 @@ function nutpool.fontkern(k)
return n
end
+function nutpool.italickern(k)
+ local n = copy_nut(italickern)
+ if k and k ~= 0 then
+ setfield(n,"kern",k)
+ end
+ return n
+end
+
function nutpool.gluespec(width,stretch,shrink,stretch_order,shrink_order)
local s = copy_nut(glue_spec)
- if width then setfield(s,"width",width) end
- if stretch then setfield(s,"stretch",stretch) end
- if shrink then setfield(s,"shrink",shrink) end
- if stretch_order then setfield(s,"stretch_order",stretch_order) end
- if shrink_order then setfield(s,"shrink_order",shrink_order) end
+ if width and width ~= 0 then
+ setfield(s,"width",width)
+ end
+ if stretch and stretch ~= 0 then
+ setfield(s,"stretch",stretch)
+ end
+ if shrink and shrink ~= 0 then
+ setfield(s,"shrink",shrink)
+ end
+ if stretch_order and stretch_order ~= 0 then
+ setfield(s,"stretch_order",stretch_order)
+ end
+ if shrink_order and shrink_order ~= 0 then
+ setfield(s,"shrink_order",shrink_order)
+ end
return s
end
local function someskip(skip,width,stretch,shrink,stretch_order,shrink_order)
local n = copy_nut(skip)
- if not width then
- -- no spec
- elseif width == false or tonumber(width) then
- local s = copy_nut(glue_spec)
- if width then setfield(s,"width",width) end
- if stretch then setfield(s,"stretch",stretch) end
- if shrink then setfield(s,"shrink",shrink) end
- if stretch_order then setfield(s,"stretch_order",stretch_order) end
- if shrink_order then setfield(s,"shrink_order",shrink_order) end
- setfield(n,"spec",s)
- else
- -- shared
- setfield(n,"spec",copy_nut(width))
+ if width and width ~= 0 then
+ setfield(n,"width",width)
+ end
+ if stretch and stretch ~= 0 then
+ setfield(n,"stretch",stretch)
+ end
+ if shrink and shrink ~= 0 then
+ setfield(n,"shrink",shrink)
+ end
+ if stretch_order and stretch_order ~= 0 then
+ setfield(n,"stretch_order",stretch_order)
+ end
+ if shrink_order and shrink_order ~= 0 then
+ setfield(n,"shrink_order",shrink_order)
end
return n
end
function nutpool.stretch(a,b)
local n = copy_nut(glue)
- local s = copy_nut(glue_spec)
if b then
- setfield(s,"stretch",a)
- setfield(s,"stretch_order",b)
+ setfield(n,"stretch",a)
+ setfield(n,"stretch_order",b)
else
- setfield(s,"stretch",1)
- setfield(s,"stretch_order",a or 1)
+ setfield(n,"stretch",1)
+ setfield(n,"stretch_order",a or 1)
end
- setfield(n,"spec",s)
return n
end
function nutpool.shrink(a,b)
local n = copy_nut(glue)
- local s = copy_nut(glue_spec)
if b then
- setfield(s,"shrink",a)
- setfield(s,"shrink_order",b)
+ setfield(n,"shrink",a)
+ setfield(n,"shrink_order",b)
else
- setfield(s,"shrink",1)
- setfield(s,"shrink_order",a or 1)
+ setfield(n,"shrink",1)
+ setfield(n,"shrink_order",a or 1)
end
- setfield(n,"spec",s)
return n
end
@@ -260,14 +315,18 @@ end
function nutpool.negatedglue(glue)
local n = copy_nut(glue)
- local s = copy_nut(getfield(n,"spec"))
- local width = getfield(s,"width")
- local stretch = getfield(s,"stretch")
- local shrink = getfield(s,"shrink")
- if width then setfield(s,"width", -width) end
- if stretch then setfield(s,"stretch",-stretch) end
- if shrink then setfield(s,"shrink", -shrink) end
- setfield(n,"spec",s)
+ local width = getfield(n,"width")
+ local stretch = getfield(n,"stretch")
+ local shrink = getfield(n,"shrink")
+ if width and width ~= 0 then
+ setfield(n,"width", -width)
+ end
+ if stretch and stretch ~= 0 then
+ setfield(n,"stretch",-stretch)
+ end
+ if shrink and shrink ~= 0 then
+ setfield(n,"shrink", -shrink)
+ end
return n
end
@@ -299,10 +358,52 @@ end
function nutpool.rule(width,height,depth,dir) -- w/h/d == nil will let them adapt
local n = copy_nut(rule)
- if width then setfield(n,"width",width) end
- if height then setfield(n,"height",height) end
- if depth then setfield(n,"depth",depth) end
- if dir then setfield(n,"dir",dir) end
+ if width then -- also 0 else adapt
+ setfield(n,"width",width)
+ end
+ if height then -- also 0 else adapt
+ setfield(n,"height",height)
+ end
+ if depth then -- also 0 else adapt
+ setfield(n,"depth",depth)
+ end
+ if dir then
+ setfield(n,"dir",dir)
+ end
+ return n
+end
+
+function nutpool.emptyrule(width,height,depth,dir) -- w/h/d == nil will let them adapt
+ local n = copy_nut(emptyrule)
+ if width then -- also 0 else adapt
+ setfield(n,"width",width)
+ end
+ if height then -- also 0 else adapt
+ setfield(n,"height",height)
+ end
+ if depth then -- also 0 else adapt
+ setfield(n,"depth",depth)
+ end
+ if dir then
+ setfield(n,"dir",dir)
+ end
+ return n
+end
+
+function nutpool.userrule(width,height,depth,dir) -- w/h/d == nil will let them adapt
+ local n = copy_nut(userrule)
+ if width then -- also 0 else adapt
+ setfield(n,"width",width)
+ end
+ if height then -- also 0 else adapt
+ setfield(n,"height",height)
+ end
+ if depth then -- also 0 else adapt
+ setfield(n,"depth",depth)
+ end
+ if dir then
+ setfield(n,"dir",dir)
+ end
return n
end
@@ -327,36 +428,38 @@ if context and _cldo_ then
local setfield_node = nodes.setfield
local setfield_nut = nuts .setfield
- function nodepool.lateluafunction(f)
- local n = copy_node(latelua_node)
- setfield_node(n,"string",f_cldo(register(f)))
- return n
- end
- function nutpool.lateluafunction(f)
- local n = copy_nut(latelua_nut)
- setfield_nut(n,"string",f_cldo(register(f)))
- return n
- end
-
- -- when function in latelua:
-
-- function nodepool.lateluafunction(f)
-- local n = copy_node(latelua_node)
- -- setfield_node(n,"string",f)
+ -- setfield_node(n,"string",f_cldo(register(f)))
-- return n
-- end
+
-- function nutpool.lateluafunction(f)
-- local n = copy_nut(latelua_nut)
- -- setfield_nut(n,"string",f)
+ -- setfield_nut(n,"string",f_cldo(register(f)))
-- return n
-- end
+ -- when function in latelua:
+
+ function nodepool.lateluafunction(f)
+ local n = copy_node(latelua_node)
+ setfield_node(n,"string",f)
+ return n
+ end
+
+ function nutpool.lateluafunction(f)
+ local n = copy_nut(latelua_nut)
+ setfield_nut(n,"string",f)
+ return n
+ end
+
local latefunction = nodepool.lateluafunction
local flushnode = context.flushnode
- function context.lateluafunction(f)
- flushnode(latefunction(f)) -- hm, quite some indirect calls
- end
+ -- function context.lateluafunction(f)
+ -- flushnode(latefunction(f)) -- hm, quite some indirect calls
+ -- end
-- when function in latelua:
@@ -378,11 +481,11 @@ if context and _cldo_ then
-- when function in latelua:
- -- function context.lateluafunction(f)
- -- local n = copy_node(latelua_node)
- -- setfield_node(n,"string",f)
- -- contextsprint(ctxcatcodes,"\\cldl",storenode(n)," ")
- -- end
+ function context.lateluafunction(f)
+ local n = copy_node(latelua_node)
+ setfield_node(n,"string",f)
+ contextsprint(ctxcatcodes,"\\cldl",storenode(n)," ")
+ end
end
@@ -395,7 +498,7 @@ function nutpool.leftmarginkern(glyph,width)
else
setfield(n,"glyph",glyph)
end
- if width then
+ if width and width ~= 0 then
setfield(n,"width",width)
end
return n
@@ -410,7 +513,7 @@ function nutpool.rightmarginkern(glyph,width)
else
setfield(n,"glyph",glyph)
end
- if width then
+ if width and width ~= 0 then
setfield(n,"width",width)
end
return n
@@ -424,37 +527,43 @@ function nutpool.noad()
return copy_nut(noad)
end
-function nutpool.hlist(list,width,height,depth)
+function nutpool.hlist(list,width,height,depth,shift)
local n = copy_nut(hlist)
if list then
- setfield(n,"list",list)
+ setlist(n,list)
end
- if width then
+ if width and width ~= 0 then
setfield(n,"width",width)
end
- if height then
+ if height and height ~= 0 then
setfield(n,"height",height)
end
- if depth then
+ if depth and depth ~= 0 then
setfield(n,"depth",depth)
end
+ if shift and shift ~= 0 then
+ setfield(n,"shift",shift)
+ end
return n
end
-function nutpool.vlist(list,width,height,depth)
+function nutpool.vlist(list,width,height,depth,shift)
local n = copy_nut(vlist)
if list then
- setfield(n,"list",list)
+ setlist(n,list)
end
- if width then
+ if width and width ~= 0 then
setfield(n,"width",width)
end
- if height then
+ if height and height ~= 0 then
setfield(n,"height",height)
end
- if depth then
+ if depth and depth ~= 0 then
setfield(n,"depth",depth)
end
+ if shift and shift ~= 0 then
+ setfield(n,"shift",shift)
+ end
return n
end
@@ -572,7 +681,10 @@ statistics.register("cleaned up reserved nodes", function()
end) -- \topofboxstack
statistics.register("node memory usage", function() -- comes after cleanup !
- return status.node_mem_usage
+ local usage = status.node_mem_usage
+ if usage ~= "" then
+ return usage
+ end
end)
lua.registerfinalizer(cleanup, "cleanup reserved nodes")
diff --git a/Master/texmf-dist/tex/context/base/node-rul.lua b/Master/texmf-dist/tex/context/base/mkiv/node-rul.lua
index 36d56a16c1a..e0649e99b3e 100644
--- a/Master/texmf-dist/tex/context/base/node-rul.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-rul.lua
@@ -11,6 +11,7 @@ if not modules then modules = { } end modules ['node-rul'] = {
--
-- todo: make robust for layers ... order matters
+
local attributes, nodes, node = attributes, nodes, node
local nuts = nodes.nuts
@@ -19,6 +20,9 @@ local tonut = nuts.tonut
local getfield = nuts.getfield
local setfield = nuts.setfield
+local setnext = nuts.setnext
+local setprev = nuts.setprev
+local setlink = nuts.setlink
local getnext = nuts.getnext
local getprev = nuts.getprev
local getid = nuts.getid
@@ -26,12 +30,15 @@ local getattr = nuts.getattr
local setattr = nuts.setattr
local getfont = nuts.getfont
local getsubtype = nuts.getsubtype
-local getchar = nuts.getchar
local getlist = nuts.getlist
+local setlist = nuts.setlist
local nodecodes = nodes.nodecodes
local tasks = nodes.tasks
+local properties = nodes.properties
+local attribs = node.current_attr
+
local glyph_code = nodecodes.glyph
local disc_code = nodecodes.disc
local rule_code = nodecodes.rule
@@ -102,11 +109,11 @@ local dimenfactor = fonts.helpers.dimenfactor
local splitdimen = number.splitdimen
local v_yes = variables.yes
+local v_all = variables.all
local v_foreground = variables.foreground
local nodecodes = nodes.nodecodes
local skipcodes = nodes.skipcodes
-local whatcodes = nodes.whatcodes
local kerncodes = nodes.kerncodes
local glyph_code = nodecodes.glyph
@@ -117,19 +124,19 @@ local kern_code = nodecodes.kern
local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
local rule_code = nodecodes.rule
-local whatsit_code = nodecodes.whatsit
+local dir_code = nodecodes.dir
local userskip_code = skipcodes.userskip
local spaceskip_code = skipcodes.spaceskip
local xspaceskip_code = skipcodes.xspaceskip
-
-local dir_code = whatcodes.dir
+local leader_code = skipcodes.leaders
local kerning_code = kerncodes.kern
local nodepool = nuts.pool
local new_rule = nodepool.rule
+local new_userrule = nodepool.userrule
local new_kern = nodepool.kern
local new_glue = nodepool.glue
@@ -151,11 +158,13 @@ local checkdir = true
-- todo: switching inside math
+-- handlers
+
local function processwords(attribute,data,flush,head,parent) -- we have hlistdir and local dir
local n = head
if n then
local f, l, a, d, i, class
- local continue, done, strip, level = false, false, true, -1
+ local continue, leaders, done, strip, level = false, false, false, true, -1
while n do
local id = getid(n)
if id == glyph_code or id == rule_code then
@@ -180,7 +189,9 @@ local function processwords(attribute,data,flush,head,parent) -- we have hlistdi
f, l, a = n, n, aa
level, class = newlevel, newclass
d = data[class]
- continue = d.continue == v_yes
+ local c = d.continue
+ leaders = c == v_all
+ continue = leaders or c == v_yes
end
else
if f then
@@ -188,8 +199,6 @@ local function processwords(attribute,data,flush,head,parent) -- we have hlistdi
end
f, l, a = nil, nil, nil
end
--- elseif f and (id == disc_code or (id == kern_code and getsubtype(n) == kerning_code)) then
--- l = n
elseif id == disc_code then
if f then
l = n
@@ -205,9 +214,9 @@ local function processwords(attribute,data,flush,head,parent) -- we have hlistdi
end
local list = getlist(n)
if list then
- setfield(n,"list",(processwords(attribute,data,flush,list,n))) -- watch ()
+ setlist(n,(processwords(attribute,data,flush,list,n))) -- watch ()
end
- elseif checkdir and id == whatsit_code and getsubtype(n) == dir_code then -- only changes in dir, we assume proper boundaries
+ elseif checkdir and id == dir_code then -- only changes in dir, we assume proper boundaries
if f and a then
l = n
end
@@ -220,7 +229,7 @@ local function processwords(attribute,data,flush,head,parent) -- we have hlistdi
elseif id == glue_code then
-- catch \underbar{a} \underbar{a} (subtype test is needed)
local subtype = getsubtype(n)
- if getattr(n,attribute) and (subtype == userskip_code or subtype == spaceskip_code or subtype == xspaceskip_code) then
+ if getattr(n,attribute) and (subtype == userskip_code or subtype == spaceskip_code or subtype == xspaceskip_code or (leaders and subtype >= leader_code)) then
l = n
else
head, done = flush(head,f,l,d,level,parent,strip), true
@@ -256,14 +265,40 @@ end
--
-nodes.rules = nodes.rules or { }
-nodes.rules.data = nodes.rules.data or { }
+local rules = nodes.rules or { }
+nodes.rules = rules
+rules.data = rules.data or { }
+
+storage.register("nodes/rules/data", rules.data, "nodes.rules.data")
+
+local data = rules.data
-storage.register("nodes/rules/data", nodes.rules.data, "nodes.rules.data")
+-- we implement user rules here as it takes less code this way
-local data = nodes.rules.data
+local function userrule(t)
+ local r = new_userrule(t.width or 0,t.height or 0,t.depth or 0)
+ setfield(r,"attr",attribs())
+ properties[r] = t
+ return tonode(r)
+end
+
+rules.userrule = userrule
+local ruleactions = { }
+rules.ruleactions = ruleactions
+
+callback.register("process_rule",function(n,h,v)
+ local n = tonut(n)
+ local p = properties[n]
+ local i = p.type or "draw"
+ local a = ruleactions[i]
+ if a then
+ a(p,h,v,i,n)
+ end
+end)
+
+--
-function nodes.rules.define(settings)
+function rules.define(settings)
data[#data+1] = settings
context(#data)
end
@@ -289,18 +324,26 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a
if not f then
return head
end
- local w = list_dimensions(getfield(parent,"glue_set"),getfield(parent,"glue_sign"),getfield(parent,"glue_order"),f,getnext(l))
- local method, offset, continue, dy, order, max = d.method, d.offset, d.continue, d.dy, d.order, d.max
- local rulethickness, unit = d.rulethickness, d.unit
- local ma, ca, ta = d.ma, d.ca, d.ta
- local colorspace = ma > 0 and ma or getattr(f,a_colorspace) or 1
- local color = ca > 0 and ca or getattr(f,a_color)
- local transparency = ta > 0 and ta or getattr(f,a_transparency)
- local foreground = order == v_foreground
-
- local e = dimenfactor(unit,getfont(f)) -- what if no glyph node
-
- local rt = tonumber(rulethickness)
+ local w, ht, dp = list_dimensions(getfield(parent,"glue_set"),getfield(parent,"glue_sign"),getfield(parent,"glue_order"),f,getnext(l))
+ local method = d.method
+ local offset = d.offset
+ local continue = d.continue
+ local dy = d.dy
+ local order = d.order
+ local max = d.max
+ local mp = d.mp
+ local rulethickness = d.rulethickness
+ local unit = d.unit
+ local ma = d.ma
+ local ca = d.ca
+ local ta = d.ta
+ local colorspace = ma > 0 and ma or getattr(f,a_colorspace) or 1
+ local color = ca > 0 and ca or getattr(f,a_color)
+ local transparency = ta > 0 and ta or getattr(f,a_transparency)
+ local foreground = order == v_foreground
+ local layer = getattr(f,a_viewerlayer)
+ local e = dimenfactor(unit,getfont(f)) -- what if no glyph node
+ local rt = tonumber(rulethickness)
if rt then
rulethickness = e * rulethickness / 2
else
@@ -311,7 +354,7 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a
rulethickness = 1/5
end
end
-
+ --
if level > max then
level = max
end
@@ -321,22 +364,10 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a
else
m = 0
end
- for i=1,level do
- local ht = (offset+(i-1)*dy)*e + rulethickness - m
- local dp = -(offset+(i-1)*dy)*e + rulethickness + m
- local r = new_rule(w,ht,dp)
- local v = getattr(f,a_viewerlayer)
- -- quick hack
- if v then
- setattr(r,a_viewerlayer,v)
- end
- --
- if color then
- setattr(r,a_colorspace,colorspace)
- setattr(r,a_color,color)
- end
- if transparency then
- setattr(r,a_transparency,transparency)
+
+ local function inject(r,w,ht,dp)
+ if layer then
+ setattr(r,a_viewerlayer,layer)
end
local k = new_kern(-w)
if foreground then
@@ -352,14 +383,45 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a
level,w,ht,dp,n_tostring(f,l),n_tosequence(f,l,true))
end
end
+
+ if mp and mp ~= "" then
+ local r = userrule {
+ width = w,
+ height = ht,
+ depth = dp,
+ type = "mp",
+ factor = e,
+ offset = offset,
+ line = rulethickness,
+ data = mp,
+ ma = colorspace,
+ ca = color,
+ ta = transparency,
+ }
+ inject(tonut(r),w,ht,dp)
+ else
+ for i=1,level do
+ local ht = (offset+(i-1)*dy)*e + rulethickness - m
+ local dp = -(offset+(i-1)*dy)*e + rulethickness + m
+ local r = new_rule(w,ht,dp)
+ if color then
+ setattr(r,a_colorspace,colorspace)
+ setattr(r,a_color,color)
+ end
+ if transparency then
+ setattr(r,a_transparency,transparency)
+ end
+ inject(r,w,ht,dp)
+ end
+ end
return head
end
local process = nodes.processwords
-nodes.rules.handler = function(head) return process(a_ruled,data,flush_ruled,head) end
+rules.handler = function(head) return process(a_ruled,data,flush_ruled,head) end
-function nodes.rules.enable()
+function rules.enable()
tasks.enableaction("shipouts","nodes.rules.handler")
end
@@ -392,20 +454,18 @@ local function flush_shifted(head,first,last,data,level,parent,strip) -- not tha
end
local prev = getprev(first)
local next = getnext(last)
- setfield(first,"prev",nil)
- setfield(last,"next",nil)
+ setprev(first)
+ setnext(last)
local width, height, depth = list_dimensions(getfield(parent,"glue_set"),getfield(parent,"glue_sign"),getfield(parent,"glue_order"),first,next)
local list = hpack_nodes(first,width,"exactly")
if first == head then
head = list
end
if prev then
- setfield(prev,"next",list)
- setfield(list,"prev",prev)
+ setlink(prev,list)
end
if next then
- setfield(next,"prev",list)
- setfield(list,"next",next)
+ setlink(next,list)
end
local raise = data.dy * dimenfactor(data.unit,fontdata[getfont(first)])
setfield(list,"shift",raise)
@@ -431,7 +491,7 @@ local implement = interfaces.implement
implement {
name = "definerule",
- actions = { nodes.rules.define, context },
+ actions = { rules.define, context },
arguments = {
{
{ "continue" },
@@ -445,6 +505,7 @@ implement {
{ "ma", "integer" },
{ "ca", "integer" },
{ "ta", "integer" },
+ { "mp", "string" },
}
}
}
@@ -452,7 +513,7 @@ implement {
implement {
name = "enablerules",
onlyonce = true,
- actions = nodes.rules.enable
+ actions = rules.enable
}
implement {
diff --git a/Master/texmf-dist/tex/context/base/node-rul.mkiv b/Master/texmf-dist/tex/context/base/mkiv/node-rul.mkiv
index 7fa0473a5ff..8706b8ecf39 100644
--- a/Master/texmf-dist/tex/context/base/node-rul.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-rul.mkiv
@@ -101,7 +101,7 @@
\appendtoks
\ifcsname\??barindex\currentbar\endcsname
- \csname\??barindex\currentbar\endcsname\zerocount
+ \lastnamedcs
\else
\expandafter\newcount\csname\??barindex\currentbar\endcsname
\fi
@@ -119,12 +119,13 @@
order {\barparameter\c!order}%
rulethickness {\barparameter\c!rulethickness}%
method \barparameter\c!method
+ max \barparameter\c!max\space % number
+ mp {\includeMPgraphic{\barparameter\c!mp}}
ma \thecolormodelattribute
ca \thecolorattribute\p_node_rules_color
ta \thetransparencyattribute\p_node_rules_color
offset \barparameter\c!offset\space % number
dy \barparameter\c!dy\space % number
- max \barparameter\c!max
\relax}}
\unexpanded\def\node_rules_redefine#1%
@@ -141,13 +142,15 @@
%\unexpanded\def\node_rules_set_indeed#1% maybe reverse the 1000 (also maybe use more attributes instead of settings)
\unexpanded\def\node_rules_set#1% maybe reverse the 1000 (also maybe use more attributes instead of settings)
- {\clf_enablerules % will be relaxed
- \edef\currentbar{#1}%
+ {\edef\currentbar{#1}%
+ \usebarstyleandcolor\c!foregroundstyle\c!foregroundcolor
+ % todo: move this to lua .. we callout anyway
\expandafter\let\expandafter\c_node_rules_index\csname\??barindex#1\endcsname
\advance\c_node_rules_index\plusone
- \usebarstyleandcolor\c!foregroundstyle\c!foregroundcolor
+ \clf_enablerules % will be relaxed
\attribute\ruledattribute\numexpr
\plusthousand*\c_node_rules_index
+ % optimizing this one needs testing
+\csname\??barattribute#1\ifcsname\??bar#1:\number\c_node_rules_index\s!parent\endcsname:\number\c_node_rules_index\fi\endcsname
\relax}
@@ -214,6 +217,8 @@
\definebar[\v!overstrikes] [\v!overstrike] [\c!continue=\v!no]
\definebar[\v!understrikes][\v!understrike][\c!continue=\v!no]
+% \setupbar[\v!overstrike][continue=all]
+
% we want these always so ...
\ifdefined\normalmathunderbar
@@ -251,6 +256,60 @@
\unexpanded\def\setupunderbar[#1]% too incompatible for the moment
{}
+%D An experimental new feature:
+%D
+%D \startbuffer
+%D test {\red\underrandoms{test me}} and \underrandom{test} or \underrandom{grep} \blank
+%D test {\red\underdashes {test me}} and \underdash {test} or \underdash {grep} \blank
+%D test {\red\underdots {test me}} and \underdot {test} or \underdot {grep} \blank
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\startuseMPgraphic{rules:under:random}
+ draw
+ ((0,RuleDepth) ... (RuleWidth,RuleDepth)) randomized (4*RuleThickness)
+ shifted (0,RuleFactor*RuleOffset)
+ withpen pencircle scaled RuleThickness
+ withcolor RuleColor ;
+ setbounds currentpicture to unitsquare xysized(RuleWidth,RuleHeight) ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{rules:under:dash}
+ draw
+ ((0,RuleDepth) ... (RuleWidth,RuleDepth))
+ shifted (0,RuleFactor*RuleOffset)
+ dashed dashpattern(on RuleFactor/2 off RuleFactor/2)
+ withpen pencircle scaled RuleThickness
+ withcolor RuleColor ;
+ setbounds currentpicture to unitsquare xysized(RuleWidth,RuleHeight) ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{rules:under:dots}
+ draw
+ ((0,RuleDepth) ... (RuleWidth,RuleDepth))
+ shifted (0,RuleFactor*RuleOffset)
+ dashed dashpattern(off 3/RuleFactor on 0 off 3/RuleFactor)
+ withpen pencircle scaled 2RuleThickness
+ withcolor RuleColor ;
+ setbounds currentpicture to unitsquare xysized(RuleWidth,RuleHeight) ;
+\stopuseMPgraphic
+
+\definebar
+ [undergraphic]
+ [\c!mp=rules:under:dash,
+ \c!offset=-.2,
+ \c!order=\v!background]
+
+\definebar[underrandom] [undergraphic][\c!mp=rules:under:random]
+\definebar[underrandoms][underrandom] [\c!continue=\v!yes]
+
+\definebar[underdash] [undergraphic][\c!mp=rules:under:dash]
+\definebar[underdashes] [underdash] [\c!continue=\v!yes]
+
+\definebar[underdot] [undergraphic][\c!mp=rules:under:dots]
+\definebar[underdots] [underdot] [\c!continue=\v!yes]
+
%D This will move: (a bit duplicated)
\installcorenamespace{shift}
@@ -275,7 +334,7 @@
\appendtoks
\ifcsname\??shiftindex\currentshift\endcsname
- \csname\??shiftindex\currentshift\endcsname\zerocount
+ \lastnamedcs\zerocount
\else
\expandafter\newcount\csname\??shiftindex\currentshift\endcsname
\fi
@@ -303,9 +362,8 @@
%
% \def\node_shifts_set_indeed#1% todo: check parent !
-\unexpanded\def\node_shifts_set#1% todo: check parent !
- {\clf_enableshifts
- \def\currentshift{#1}%
+\unexpanded\def\node_shifts_set#1% todo: check parent ! todo: move attr etc to lua
+ {\def\currentshift{#1}%
\expandafter\let\expandafter\c_node_shifts_index\csname\??shiftindex#1\endcsname
\advance\c_node_shifts_index\plusone
\attribute\shiftedattribute\numexpr
diff --git a/Master/texmf-dist/tex/context/base/node-ser.lua b/Master/texmf-dist/tex/context/base/mkiv/node-ser.lua
index d7593cec748..2ad1242c533 100644
--- a/Master/texmf-dist/tex/context/base/node-ser.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-ser.lua
@@ -43,7 +43,6 @@ local expand = allocate ( tohash {
"list", -- list_ptr & ins_ptr & adjust_ptr
"pre", --
"post", --
- "spec", -- glue_ptr
"top_skip", --
"attr", --
"replace", -- nobreak
@@ -128,7 +127,7 @@ end
nodes.astable = astable
-setinspector(function(v) if is_node(v) then printtable(astable(v),tostring(v)) return true end end)
+setinspector("node",function(v) if is_node(v) then printtable(astable(v),tostring(v)) return true end end)
-- under construction:
diff --git a/Master/texmf-dist/tex/context/base/node-shp.lua b/Master/texmf-dist/tex/context/base/mkiv/node-shp.lua
index 42cc83b8f34..2f2af490566 100644
--- a/Master/texmf-dist/tex/context/base/node-shp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-shp.lua
@@ -40,23 +40,28 @@ local tonode = nuts.tonode
local free_node = nuts.free
local remove_node = nuts.remove
local traverse_nodes = nuts.traverse
-local find_tail = nuts.tail
local getfield = nuts.getfield
local setfield = nuts.setfield
+local setsetlink = nuts.setlink
+local setsetprev = nuts.setprev
+local setsetnext = nuts.setnext
local getid = nuts.getid
+local getdisc = nuts.getdisc
+local getboth = nuts.getboth
local getnext = nuts.getnext
-local getprev = nuts.getprev
local getlist = nuts.getlist
local getsubtype = nuts.getsubtype
+local setlist = nuts.setlist
+
local removables = {
- [whatsitcodes.open] = true,
- [whatsitcodes.close] = true,
- [whatsitcodes.write] = true,
- [whatsitcodes.pdfdest] = true,
- [whatsitcodes.pdfsavepos] = true,
- [whatsitcodes.latelua] = true,
+ [whatsitcodes.open] = true,
+ [whatsitcodes.close] = true,
+ [whatsitcodes.write] = true,
+ [whatsitcodes.savepos] = true,
+ [whatsitcodes.latelua] = true,
+ [whatsitcodes.pdfdest] = true,
}
-- About 10% of the nodes make no sense for the backend. By (at least)
@@ -73,11 +78,9 @@ local function cleanup_redundant(head) -- better name is: flatten_page
local id = getid(start)
if id == disc_code then
if getsubtype(start) == fulldisc_code then
- local replace = getfield(start,"replace")
+ local _, _, replace, _, _ tail = getdisc(start,true)
if replace then
- local prev = getprev(start)
- local next = getnext(start)
- local tail = find_tail(replace)
+ local prev, next = getboth(start)
setfield(start,"replace",nil)
if start == head then
remove_node(head,start,true)
@@ -86,14 +89,12 @@ local function cleanup_redundant(head) -- better name is: flatten_page
remove_node(head,start,true)
end
if next then
- setfield(tail,"next",next)
- setfield(next,"prev",tail)
+ setlink(tail,next)
end
if prev then
- setfield(prev,"next",replace)
- setfield(replace,"prev",prev)
+ setlink(prev,replace)
else
- setfield(replace,"prev",nil) -- to be sure
+ setprev(replace) -- to be sure
end
start = next
elseif wipedisc then
@@ -110,7 +111,7 @@ local function cleanup_redundant(head) -- better name is: flatten_page
if sl then
local rl = cleanup_redundant(sl)
if rl ~= sl then
- setfield(start,"list",rl)
+ setlist(start,rl)
end
end
start = getnext(start)
@@ -136,7 +137,7 @@ local function cleanup_flushed(head) -- rough
if sl then
local rl = cleanup_flushed(sl)
if rl ~= sl then
- setfield(start,"list",rl)
+ setlist(start,rl)
end
end
start = getnext(start)
@@ -201,7 +202,7 @@ local function count(head,data,subcategory)
local dn = data[nodecodes[id]] -- we could use id and then later convert to nodecodes
dn[subcategory] = dn[subcategory] + 1
if id == hlist_code or id == vlist_code then
- count(getfield(n,"list"),data,subcategory)
+ count(getlist(n),data,subcategory)
end
end
end
diff --git a/Master/texmf-dist/tex/context/base/node-snp.lua b/Master/texmf-dist/tex/context/base/mkiv/node-snp.lua
index 31c7771ac92..31c7771ac92 100644
--- a/Master/texmf-dist/tex/context/base/node-snp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-snp.lua
diff --git a/Master/texmf-dist/tex/context/base/node-tex.lua b/Master/texmf-dist/tex/context/base/mkiv/node-tex.lua
index c9d3091df23..c9d3091df23 100644
--- a/Master/texmf-dist/tex/context/base/node-tex.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-tex.lua
diff --git a/Master/texmf-dist/tex/context/base/node-tra.lua b/Master/texmf-dist/tex/context/base/mkiv/node-tra.lua
index a7ab7f77f72..d184620ef2e 100644
--- a/Master/texmf-dist/tex/context/base/node-tra.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-tra.lua
@@ -45,8 +45,9 @@ local getid = nuts.getid
local getchar = nuts.getchar
local getsubtype = nuts.getsubtype
local getlist = nuts.getlist
-
+local getdisc = nuts.getdisc
local setattr = nuts.setattr
+local isglyph = nuts.isglyph
local flush_list = nuts.flush_list
local count_nodes = nuts.count
@@ -71,12 +72,11 @@ local disc_code = nodecodes.disc
local glue_code = nodecodes.glue
local kern_code = nodecodes.kern
local rule_code = nodecodes.rule
+local dir_code = nodecodes.dir
+local localpar_code = nodecodes.localpar
local whatsit_code = nodecodes.whatsit
local gluespec_code = nodecodes.gluespec
-local localpar_code = whatcodes.localpar
-local dir_code = whatcodes.dir
-
local dimenfactors = number.dimenfactors
local fillorders = nodes.fillcodes
local formatters = string.formatters
@@ -129,9 +129,8 @@ local function tosequence(start,stop,compact)
stop = stop and tonut(stop)
local t = { }
while start do
- local id = getid(start)
- if id == glyph_code then
- local c = getchar(start)
+ local c, id = isglyph(start)
+ if c then
if compact then
local components = getfield(start,"components")
if components then
@@ -148,7 +147,7 @@ local function tosequence(start,stop,compact)
else
t[#t+1] = nodecodes[id]
end
- elseif id == whatsit_code and getsubtype(start) == localpar_code or getsubtype(start) == dir_code then
+ elseif id == dir_code or id == localpar_code then
t[#t+1] = "[" .. getfield(start,"dir") .. "]"
elseif compact then
t[#t+1] = "[]"
@@ -175,7 +174,7 @@ nodes.tosequence = tosequence
nuts .tosequence = tosequence
function nodes.report(t,done)
- report_nodes("output %a, %changed %a, %s nodes",status.output_active,done,count_nodes(tonut(t)))
+ report_nodes("output %a, changed %a, %s nodes",status.output_active,done,count_nodes(tonut(t)))
end
function nodes.packlist(head)
@@ -189,20 +188,29 @@ end
function nodes.idstostring(head,tail)
head = tonut(head)
tail = tail and tonut(tail)
- local t, last_id, last_n = { }, nil, 0
+ local t = { }
+ local last_id = nil
+ local last_n = 0
for n in traverse_nodes(head,tail) do -- hm, does not stop at tail
local id = getid(n)
+ if id == whatsit_code then
+ id = whatcodes[getsubtype(n)]
+ else
+ id = nodecodes[id]
+ end
if not last_id then
- last_id, last_n = id, 1
+ last_id = id
+ last_n = 1
elseif last_id == id then
last_n = last_n + 1
else
if last_n > 1 then
- t[#t+1] = formatters["[%s*%s]"](last_n,nodecodes[last_id] or "?")
+ t[#t+1] = formatters["[%s*%s]"](last_n,last_id)
else
- t[#t+1] = formatters["[%s]"](nodecodes[last_id] or "?")
+ t[#t+1] = formatters["[%s]"](last_id)
end
- last_id, last_n = id, 1
+ last_id = id
+ last_n = 1
end
if n == tail then
break
@@ -210,10 +218,12 @@ function nodes.idstostring(head,tail)
end
if not last_id then
t[#t+1] = "no nodes"
- elseif last_n > 1 then
- t[#t+1] = formatters["[%s*%s]"](last_n,nodecodes[last_id] or "?")
else
- t[#t+1] = formatters["[%s]"](nodecodes[last_id] or "?")
+ if last_n > 1 then
+ t[#t+1] = formatters["[%s*%s]"](last_n,last_id)
+ else
+ t[#t+1] = formatters["[%s]"](last_id)
+ end
end
return concat(t," ")
end
@@ -279,29 +289,29 @@ end
nodes.showsimplelist = function(h,depth) showsimplelist(h,depth,0) end
-local function listtoutf(h,joiner,textonly,last)
+local function listtoutf(h,joiner,textonly,last,nodisc)
local w = { }
while h do
- local id = getid(h)
- if id == glyph_code then -- always true
- local c = getchar(h)
+ local c, id = isglyph(h)
+ if c then
w[#w+1] = c >= 0 and utfchar(c) or formatters["<%i>"](c)
if joiner then
w[#w+1] = joiner
end
elseif id == disc_code then
- local pre = getfield(h,"pre")
- local pos = getfield(h,"post")
- local rep = getfield(h,"replace")
- w[#w+1] = formatters["[%s|%s|%s]"] (
- pre and listtoutf(pre,joiner,textonly) or "",
- pos and listtoutf(pos,joiner,textonly) or "",
- rep and listtoutf(rep,joiner,textonly) or ""
- )
+ local pre, pos, rep = getdisc(h)
+ if not nodisc then
+ w[#w+1] = formatters["[%s|%s|%s]"] (
+ pre and listtoutf(pre,joiner,textonly) or "",
+ pos and listtoutf(pos,joiner,textonly) or "",
+ rep and listtoutf(rep,joiner,textonly) or ""
+ )
+ elseif rep then
+ w[#w+1] = listtoutf(rep,joiner,textonly) or ""
+ end
elseif textonly then
if id == glue_code then
- local spec = getfield(h,"spec")
- if spec and getfield(spec,"width") > 0 then
+ if getfield(h,"width") > 0 then
w[#w+1] = " "
end
elseif id == hlist_code or id == vlist_code then
@@ -319,10 +329,10 @@ local function listtoutf(h,joiner,textonly,last)
return concat(w)
end
-function nodes.listtoutf(h,joiner,textonly,last)
+function nodes.listtoutf(h,joiner,textonly,last,nodisc)
if h then
local joiner = joiner == true and utfchar(0x200C) or joiner -- zwnj
- return listtoutf(tonut(h),joiner,textonly,last and tonut(last))
+ return listtoutf(tonut(h),joiner,textonly,last and tonut(last),nodisc)
else
return ""
end
@@ -349,93 +359,6 @@ local ptfactor = dimenfactors.pt
local bpfactor = dimenfactors.bp
local stripper = lpeg.patterns.stripzeros
--- start redefinition
---
--- -- if fmt then
--- -- return formatters[fmt](n*dimenfactors[unit],unit)
--- -- else
--- -- return match(formatters["%.20f"](n*dimenfactors[unit]),"(.-0?)0*$") .. unit
--- -- end
---
--- redefined:
-
--- local function nodetodimen(d,unit,fmt,strip)
--- d = tonut(d) -- tricky: direct nuts are an issue
--- if unit == true then
--- unit = "pt"
--- fmt = "%0.5f%s"
--- else
--- unit = unit or 'pt'
--- if not fmt then
--- fmt = "%s%s"
--- elseif fmt == true then
--- fmt = "%0.5f%s"
--- end
--- end
--- local id = getid(d)
--- if id == kern_code then
--- local str = formatters[fmt](getfield(d,"width")*dimenfactors[unit],unit)
--- return strip and lpegmatch(stripper,str) or str
--- end
--- if id == glue_code then
--- d = getfield(d,"spec")
--- end
--- if not d or not getid(d) == gluespec_code then
--- local str = formatters[fmt](0,unit)
--- return strip and lpegmatch(stripper,str) or str
--- end
--- local width = getfield(d,"width")
--- local plus = getfield(d,"stretch_order")
--- local minus = getfield(d,"shrink_order")
--- local stretch = getfield(d,"stretch")
--- local shrink = getfield(d,"shrink")
--- if plus ~= 0 then
--- plus = " plus " .. stretch/65536 .. fillcodes[plus]
--- elseif stretch ~= 0 then
--- plus = formatters[fmt](stretch*dimenfactors[unit],unit)
--- plus = " plus " .. (strip and lpegmatch(stripper,plus) or plus)
--- else
--- plus = ""
--- end
--- if minus ~= 0 then
--- minus = " minus " .. shrink/65536 .. fillcodes[minus]
--- elseif shrink ~= 0 then
--- minus = formatters[fmt](shrink*dimenfactors[unit],unit)
--- minus = " minus " .. (strip and lpegmatch(stripper,minus) or minus)
--- else
--- minus = ""
--- end
--- local str = formatters[fmt](getfield(d,"width")*dimenfactors[unit],unit)
--- return (strip and lpegmatch(stripper,str) or str) .. plus .. minus
--- end
---
--- local function numbertodimen(d,unit,fmt,strip)
--- if not d then
--- local str = formatters[fmt](0,unit)
--- return strip and lpegmatch(stripper,str) or str
--- end
--- local t = type(d)
--- if t == 'string' then
--- return d
--- elseif t == "number" then
--- if unit == true then
--- unit = "pt"
--- fmt = "%0.5f%s"
--- else
--- unit = unit or 'pt'
--- if not fmt then
--- fmt = "%s%s"
--- elseif fmt == true then
--- fmt = "%0.5f%s"
--- end
--- end
--- local str = formatters[fmt](d*dimenfactors[unit],unit)
--- return strip and lpegmatch(stripper,str) or str
--- else
--- return nodetodimen(d,unit,fmt,strip) -- real node
--- end
--- end
-
local f_f_f = formatters["%0.5Fpt plus %0.5F%s minus %0.5F%s"]
local f_f_m = formatters["%0.5Fpt plus %0.5F%s minus %0.5Fpt"]
local f_p_f = formatters["%0.5Fpt plus %0.5Fpt minus %0.5F%s"]
@@ -459,11 +382,7 @@ local function nodetodimen(n)
else
return f_z_z(width)
end
- end
- if id == glue_code then
- n = getfield(n,"spec")
- end
- if not n or not getid(n) == gluespec_code then
+ elseif id ~= glue_code then
return "0pt"
end
local stretch_order = getfield(n,"stretch_order")
diff --git a/Master/texmf-dist/tex/context/base/node-tsk.lua b/Master/texmf-dist/tex/context/base/mkiv/node-tsk.lua
index 56a4b18ef24..56a4b18ef24 100644
--- a/Master/texmf-dist/tex/context/base/node-tsk.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-tsk.lua
diff --git a/Master/texmf-dist/tex/context/base/node-tst.lua b/Master/texmf-dist/tex/context/base/mkiv/node-tst.lua
index 7f5102d5fcd..4832c048c89 100644
--- a/Master/texmf-dist/tex/context/base/node-tst.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-tst.lua
@@ -39,7 +39,7 @@ function nuts.leftmarginwidth(n) -- todo: three values
while n do
local id = getid(n)
if id == glue_code then
- return getsubtype(n) == leftskip_code and getfield(getfield(n,"spec"),"width") or 0
+ return getsubtype(n) == leftskip_code and getfield(n,"width") or 0
elseif id == whatsit_code then
n = getnext(n)
elseif id == hlist_code then
@@ -57,7 +57,7 @@ function nuts.rightmarginwidth(n)
while n do
local id = getid(n)
if id == glue_code then
- return getsubtype(n) == rightskip_code and getfield(getfield(n,"spec"),"width") or 0
+ return getsubtype(n) == rightskip_code and getfield(n,"width") or 0
elseif id == whatsit_code then
n = getprev(n)
else
@@ -72,7 +72,8 @@ function nuts.somespace(n,all)
if n then
local id = getid(n)
if id == glue_code then
- return (all or (getfield(getfield(n,"spec"),"width") ~= 0)) and glue_code
+ return (all or ((getfield(n,"width") or 0) ~= 0)) and glue_code -- temp: or 0
+ -- return (all or (getfield(n,"width") ~= 0)) and glue_code
elseif id == kern_code then
return (all or (getfield(n,"kern") ~= 0)) and kern
elseif id == glyph_code then
diff --git a/Master/texmf-dist/tex/context/base/node-typ.lua b/Master/texmf-dist/tex/context/base/mkiv/node-typ.lua
index f1aacf25a86..2d84e07a3fc 100644
--- a/Master/texmf-dist/tex/context/base/node-typ.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-typ.lua
@@ -16,11 +16,15 @@ local tonode = nuts.tonode
local tonut = nuts.tonut
local setfield = nuts.setfield
+local setlink = nuts.setlink
+local setchar = nuts.setchar
+
+local getfield = nuts.getfield
local getfont = nuts.getfont
local hpack_node_list = nuts.hpack
local vpack_node_list = nuts.vpack
-local fast_hpack_list = nuts.fasthpack
+local full_hpack_list = nuts.fullhpack
local copy_node = nuts.copy
local nodepool = nuts.pool
@@ -30,15 +34,19 @@ local new_glue = nodepool.glue
local utfvalues = utf.values
local currentfont = font.current
+local currentattr = node.current_attr
local fontparameters = fonts.hashes.parameters
local function tonodes(str,fontid,spacing,templateglyph) -- quick and dirty
local head, prev = nil, nil
+-- local attrid = nil
if not fontid then
if templateglyph then
fontid = getfont(templateglyph)
+-- attrid = getfield(templateglyph,"attr")
else
fontid = currentfont()
+-- attrid = currentattr()
end
end
local fp = fontparameters[fontid]
@@ -58,7 +66,7 @@ local function tonodes(str,fontid,spacing,templateglyph) -- quick and dirty
end
elseif templateglyph then
next = copy_glyph(templateglyph)
- setfield(next,"char",c)
+ setchar(next,c)
spacedone = false
else
next = new_glyph(fontid or 1,c)
@@ -67,10 +75,11 @@ local function tonodes(str,fontid,spacing,templateglyph) -- quick and dirty
if not next then
-- nothing
elseif not head then
+-- setfield(next,"attr",attrid)
head = next
else
- setfield(prev,"next",next)
- setfield(next,"prev",prev)
+-- setfield(next,"attr",attrid)
+ setlink(prev,next)
end
prev = next
end
@@ -81,42 +90,40 @@ local function tohpack(str,fontid,spacing)
return hpack_node_list(tonodes(str,fontid,spacing),"exactly")
end
-local function tohpackfast(str,fontid,spacing)
- return fast_hpack_list(tonodes(str,fontid,spacing),"exactly")
+local function tohbox(str,fontid,spacing)
+ return full_hpack_list(tonodes(str,fontid,spacing),"exactly")
end
local function tovpack(str,fontid,spacing)
- -- vpack is just a hack, and a proper implentation is on the agenda
+ -- vpack is just a hack, and a proper implemtation is on the agenda
-- as it needs more info etc than currently available
return vpack_node_list(tonodes(str,fontid,spacing))
end
-local tovpackfast = tovpack
+local tovbox = tovpack -- for now no vpack filter
local tnuts = { }
nuts.typesetters = tnuts
tnuts.tonodes = tonodes
tnuts.tohpack = tohpack
-tnuts.tohpackfast = tohpackfast
+tnuts.tohbox = tohbox
tnuts.tovpack = tovpack
-tnuts.tovpackfast = tovpackfast
-
-tnuts.hpack = tohpack -- obsolete
-tnuts.fast_hpack = tohpackfast -- obsolete
-tnuts.vpack = tovpack -- obsolete
-
-typesetters.tonodes = function(...) local h, b = tonodes (...) return tonode(h), b end
-typesetters.tohpack = function(...) local h, b = tohpack (...) return tonode(h), b end
-typesetters.tohpackfast = function(...) local h, b = tohpackfast(...) return tonode(h), b end
-typesetters.tovpack = function(...) local h, b = tovpack (...) return tonode(h), b end
-typesetters.tovpackfast = function(...) local h, b = tovpackfast(...) return tonode(h), b end
-
-typesetters.hpack = typesetters.tohpack -- obsolete
-typesetters.fast_hpack = typesetters.tofasthpack -- obsolete
-typesetters.vpack = typesetters.tovpack -- obsolete
-
--- node.write(nodes.typestters.hpack("Hello World!"))
--- node.write(nodes.typestters.hpack("Hello World!",1,100*1024*10))
+tnuts.tovbox = tovbox
+
+typesetters.tonodes = function(...) local h, b = tonodes(...) return tonode(h), b end
+typesetters.tohpack = function(...) local h, b = tohpack(...) return tonode(h), b end
+typesetters.tohbox = function(...) local h, b = tohbox (...) return tonode(h), b end
+typesetters.tovpack = function(...) local h, b = tovpack(...) return tonode(h), b end
+typesetters.tovbox = function(...) local h, b = tovbox (...) return tonode(h), b end
+
+typesetters.hpack = typesetters.tohpack -- obsolete
+typesetters.hbox = typesetters.tohbox -- obsolete
+typesetters.vpack = typesetters.tovpack -- obsolete
+
+-- node.write(nodes.typesetters.tohpack("Hello World!"))
+-- node.write(nodes.typesetters.tohbox ("Hello World!"))
+-- node.write(nodes.typesetters.tohpack("Hello World!",1,100*1024*10))
+-- node.write(nodes.typesetters.tohbox ("Hello World!",1,100*1024*10))
string.tonodes = function(...) return tonode(tonodes(...)) end -- quite convenient
diff --git a/Master/texmf-dist/tex/context/base/norm-ctx.mkiv b/Master/texmf-dist/tex/context/base/mkiv/norm-ctx.mkiv
index 6fc012c452e..6fc012c452e 100644
--- a/Master/texmf-dist/tex/context/base/norm-ctx.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/norm-ctx.mkiv
diff --git a/Master/texmf-dist/tex/context/base/pack-bar.mkiv b/Master/texmf-dist/tex/context/base/mkiv/pack-bar.mkiv
index 06eeebd1411..06eeebd1411 100644
--- a/Master/texmf-dist/tex/context/base/pack-bar.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-bar.mkiv
diff --git a/Master/texmf-dist/tex/context/base/pack-bck.mkvi b/Master/texmf-dist/tex/context/base/mkiv/pack-bck.mkvi
index bb4b72252a2..346e7df575e 100644
--- a/Master/texmf-dist/tex/context/base/pack-bck.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-bck.mkvi
@@ -16,7 +16,7 @@
%D The code here is already pretty old and is used for simple
%D backgrounds. As it is still used WS adapted the code to the
%D new command handler methods so that it gets a second life. So
-%D it made sense to mkvi ir as well. Some more code is moved here
+%D it made sense to mkvi as well. Some more code is moved here
%D too.
%D \macros
@@ -87,7 +87,9 @@
{\setupcurrentbackground[#settings,\c!state=\v!start,\c!offset=\v!overlay]%
\let\pack_backgrounds_stop\pack_backgrounds_stop_indeed
\setbox0\vbox\bgroup
- \vbox to \lineheight{}\vskip\zeropoint
+ \strut
+ \vskip-2\lineheight
+ \strut
\blank[\v!disable]
\leftskip \backgroundparameter\c!leftoffset
\rightskip\backgroundparameter\c!rightoffset}
@@ -100,6 +102,9 @@
\unexpanded\def\pack_backgrounds_stop_indeed % we shoul duse the fast background variant of framed
{\endgraf
\removelastskip
+ \strut
+ \vskip-2\lineheight
+ \strut
\egroup
\dimen2\leftskip % new **
\forgetall
@@ -114,7 +119,6 @@
\else
\splitmaxdepth\boxmaxdepth
\splittopskip\topskip
- \setbox2\vsplit0 to \lineheight % get rid of fake line
\doloop
{\ifdim\pagetotal=\zeropoint % empty page
\scratchdimen\textheight
@@ -124,7 +128,13 @@
\scratchdimen\dimexpr\pagegoal-\ht2-\pagetotal\relax
\backgroundsplitmode\plustwo % split to partial height
\fi
- \advance\scratchdimen\dimexpr-\backgroundparameter\c!topoffset-\backgroundparameter\c!bottomoffset\relax
+ \ifdim\scratchdimen<\zeropoint
+ \scratchdimen\pagegoal
+ \fi
+ \advance\scratchdimen\dimexpr
+ -\backgroundparameter\c!topoffset
+ -\backgroundparameter\c!bottomoffset
+ \relax
\ifdim\scratchdimen>2\lineheight\relax % reasonable, will be configurable
\ifdim\ht0>\scratchdimen % larger than page
\setbox2\vsplit0 to \scratchdimen
@@ -191,9 +201,9 @@
\definebackground[\v!background]
\ifdefined\startbackground \else
- \expandafter\let\startbackground\csname\e!start\v!background\endcsname
- \expandafter\let\stopbackground \csname\e!stop \v!background\endcsname
- \expandafter\let\background \csname \v!background\endcsname
+ \expandafter\let\expandafter\startbackground\csname\e!start\v!background\endcsname
+ \expandafter\let\expandafter\stopbackground \csname\e!stop \v!background\endcsname
+ \expandafter\let\expandafter\background \csname \v!background\endcsname
\fi
\setupbackground
@@ -234,8 +244,6 @@
%D \macros
%D {backgroundline}
-%D
-%D For the moment an undocumented feature, but a candidate for going public.
\unexpanded\def\backgroundline[#color]%
{\dontleavehmode
diff --git a/Master/texmf-dist/tex/context/base/pack-box.mkiv b/Master/texmf-dist/tex/context/base/mkiv/pack-box.mkiv
index 6e3bab6f498..fad7d6e18a3 100644
--- a/Master/texmf-dist/tex/context/base/pack-box.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-box.mkiv
@@ -147,7 +147,8 @@
\unexpanded\def\resetcollector[#1]%
{\ifcsname\??collectorbox#1\endcsname
- \global\setbox\csname\??collectorbox#1\endcsname\emptybox
+ %\global\setbox\csname\??collectorbox#1\endcsname\emptybox
+ \global\setbox\lastnamedcs\emptybox
\fi}
\newconditional\c_pack_boxes_collector_valid_box
@@ -158,7 +159,8 @@
{\edef\currentcollector{#1}%
\ifcsname\??collectorbox\currentcollector\endcsname
\settrue\c_pack_boxes_collector_valid_box
- \expandafter\let\expandafter\b_pack_boxes_collector\csname\??collectorbox\currentcollector\endcsname
+ %\expandafter\let\expandafter\b_pack_boxes_collector\csname\??collectorbox\currentcollector\endcsname
+ \expandafter\let\expandafter\b_pack_boxes_collector\lastnamedcs
\else
\setfalse\c_pack_boxes_collector_valid_box
\writestatus{collector}{unknown collector \currentcollector}%
@@ -209,14 +211,14 @@
\def\pack_boxes_collector_check_corner#1%
{\ifcsname\??collectorcorners#1\endcsname
- \csname\??collectorcorners#1\endcsname
+ \lastnamedcs
\fi}
\def\pack_boxes_collector_finish
{\edef\p_collector_rotation{\collectorparameter\c!rotation}%
\edef\p_collector_corner {\collectorparameter\c!corner}%
\ifx\p_collector_rotation\empty \else
- \setbox\nextbox\hbox
+ \setbox\nextbox\hpack
{\rotate
[\c!location=\v!high,
\c!rotation=\p_collector_rotation]
@@ -227,24 +229,24 @@
\d_pack_layers_x_position\dimexpr\collectorparameter\c!x+\collectorparameter\c!hoffset\relax
\d_pack_layers_y_position\dimexpr\collectorparameter\c!y+\collectorparameter\c!voffset\relax
\rawprocesscommacommand[\p_collector_corner]\pack_boxes_collector_check_corner
- \setbox\nextbox\hbox
- {\alignedbox[\collectorparameter\c!location]\vbox{\box\nextbox}}%
+ \setbox\nextbox\hpack
+ {\alignedbox[\collectorparameter\c!location]\vpack{\box\nextbox}}%
\boxmaxdepth\zeropoint % really needed, nice example
\global\advance\boxhdisplacement\d_pack_layers_x_position
\ifdim\boxhdisplacement<\zeropoint
- \global\setbox\b_pack_boxes_collector\hbox
+ \global\setbox\b_pack_boxes_collector\hpack
{\kern-\boxhdisplacement
\box\b_pack_boxes_collector}%
\fi
\global\advance\boxvdisplacement\d_pack_layers_y_position
\ifdim\boxvdisplacement<\zeropoint
- \global\setbox\b_pack_boxes_collector\hbox
+ \global\setbox\b_pack_boxes_collector\hpack
{\lower-\boxvdisplacement
\box\b_pack_boxes_collector}%
\fi
\d_pack_layers_x_size\wd\b_pack_boxes_collector
\d_pack_layers_y_size\htdp\b_pack_boxes_collector
- \global\setbox\b_pack_boxes_collector\hbox
+ \global\setbox\b_pack_boxes_collector\hpack
{\box\b_pack_boxes_collector
\kern\dimexpr
-\d_pack_layers_x_size
@@ -253,13 +255,13 @@
-\boxhdisplacement
\fi
\relax
- \lower\d_pack_layers_y_position\hbox
+ \lower\d_pack_layers_y_position\hpack
{\ifdim\boxvdisplacement<\zeropoint
\lower-\boxvdisplacement
\fi
\box\nextbox}}%
% combine height and depth into depth only (later flushed as height)
- \global\setbox\b_pack_boxes_collector\hbox
+ \global\setbox\b_pack_boxes_collector\hpack
{\lower\ht\b_pack_boxes_collector\box\b_pack_boxes_collector}%
% just to be sure
\ifdim\wd\b_pack_boxes_collector<\d_pack_layers_x_size
@@ -273,7 +275,7 @@
\ifconditional\c_pack_boxes_collector_valid_box
\edef\p_collector_state{\collectorparameter\c!state}%
\ifx\p_collector_state\v!stop \else
- \vbox{\hbox{\raise
+ \vpack{\hpack{\raise
\dp\b_pack_boxes_collector
\ifx\p_collector_state\v!repeat\copy\else\box\fi\b_pack_boxes_collector}}%
\fi
@@ -391,6 +393,7 @@
\unexpanded\def\placelayeredtext[#1]%
{\bgroup
\edef\currentlayeredtext{#1}%
+ \checklayeredtextparent % bonus
\dodoubleempty\pack_layeredtexts_place}
\def\pack_layeredtexts_place[#1][#2]#3% layersettings content(framed)settings content
@@ -587,13 +590,13 @@
\def\pack_boxes_bleed_finish
{\doif{\bleedingparameter\c!page}\v!yes
{\setbox\nextbox\topskippedbox{\box\nextbox}}%
- \setbox\nextbox\hbox to \scratchwidth
+ \setbox\nextbox\hpack to \scratchwidth
{\ifconditional\c_pack_boxes_l\hss\fi
\box\nextbox
\ifconditional\c_pack_boxes_r\hss\fi}%
\ifconditional\c_pack_boxes_b
- \setbox\nextbox\hbox
- {\lower\bleedheight\hbox{\raise\scratchheight\box\nextbox}}%
+ \setbox\nextbox\hpack
+ {\lower\bleedheight\hpack{\raise\scratchheight\box\nextbox}}%
\fi
\wd\nextbox\scratchwidth
\ht\nextbox\scratchheight
@@ -657,11 +660,11 @@
\def\pack_layers_set_framed_s[#1][#2][#3]%
{\setlayer[#1][\c!width=\wd\nextbox,\c!height=\ht\nextbox,\c!offset=\zeropoint]%
- \normalframedwithsettings[\c!location=\v!normal]} % diffrent kind of location
+ \normalframedwithsettings[\c!location=\v!normal]} % different kind of location
\def\pack_layers_set_framed_d[#1][#2][#3]%
{\setlayer[#1][\c!width=\wd\nextbox,\c!height=\ht\nextbox,#2,\c!offset=\zeropoint]%
- \normalframedwithsettings[\c!location=\v!normal,#2]} % diffrent kind of location
+ \normalframedwithsettings[\c!location=\v!normal,#2]} % different kind of location
\def\pack_layers_set_framed_t[#1][#2][#3]%
{\setlayer[#1][#2]%
@@ -762,10 +765,18 @@
\def\pack_boxes_aligned_box[#1]{\bgroup\serializecommalist[#1]\dowithnextboxcs\pack_boxes_aligned_finish}
\def\pack_boxes_aligned [#1]{\bgroup\serializecommalist[#1]\dowithnextboxcs\pack_boxes_aligned_finish\hbox}
+% \def\pack_boxes_aligned_finish
+% {\csname\??alignedboxes
+% \ifcsname\??alignedboxes\serializedcommalist\endcsname\serializedcommalist\else\v!middle\fi
+% \endcsname{\flushnextbox}%
+% \egroup}
+
\def\pack_boxes_aligned_finish
- {\csname\??alignedboxes
- \ifcsname\??alignedboxes\serializedcommalist\endcsname\serializedcommalist\else\v!middle\fi
- \endcsname{\flushnextbox}%
+ {\ifcsname\??alignedboxes\serializedcommalist\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\middlebox
+ \fi{\flushnextbox}%
\egroup}
\letvalue{\??alignedboxes }\middlebox
@@ -887,11 +898,11 @@
\fi
\fi
\ifdone
- \setbox\nextbox\vbox
+ \setbox\nextbox\vpack
{\forgetall % already done
\offinterlineskip
\kern\scratchtopoffset
- \hbox
+ \hpack
{\kern\scratchleftoffset
\box\nextbox
\kern\scratchrightoffset}%
@@ -903,13 +914,13 @@
\scratchheight\offsetboxparameter\c!height
\scratchdepth \offsetboxparameter\c!depth
\edef\p_location{\offsetboxparameter\c!location}%
- \setbox\nextbox\hbox
+ \setbox\nextbox\hpack
{\kern\scratchxposition
- \lower\scratchyposition\hbox
+ \lower\scratchyposition\hpack
{\ifx\p_location\empty
\box\nextbox
\else
- \alignedbox[\p_location]\hbox{\box\nextbox}%
+ \alignedbox[\p_location]\hpack{\box\nextbox}%
\fi}}%
\wd\nextbox\scratchwidth
\ht\nextbox\scratchheight
@@ -954,8 +965,8 @@
\def\pack_boxes_tabbed#1#2#3#4%
{\dontleavehmode
\begingroup
- \setbox\scratchbox\hbox{#3}%
- \hbox to \wd\scratchbox{#1#4#2}%
+ \setbox\scratchbox\hpack{#3}%
+ \hpack to \wd\scratchbox{#1#4#2}%
\endgroup}
\unexpanded\def\ltabbed{\pack_boxes_tabbed\relax\hss}
@@ -967,7 +978,7 @@
% to be documented
\unexpanded\def\phantombox[#1]% == \framed[\c!empty=\v!yes,\c!offset=\v!overlay,#1]{}
- {\hbox\bgroup
+ {\hpack\bgroup
\letdummyparameter\c!width \zeropoint
\letdummyparameter\c!height\zeropoint
\letdummyparameter\c!depth \zeropoint
@@ -1017,21 +1028,21 @@
% to be considered: methods
\ifcase\scratchcounter
\or % x and y
- \setbox\nextbox\hbox{\dorecurse\scratchnx{\copy\nextbox}}%
- \setbox\nextbox\vbox{\dorecurse\scratchny{\copy\nextbox\endgraf}}%
+ \setbox\nextbox\hpack{\dorecurse\scratchnx{\copy\nextbox}}%
+ \setbox\nextbox\vpack{\dorecurse\scratchny{\copy\nextbox\endgraf}}%
\or % x
- \setbox\nextbox\hbox{\dorecurse\scratchnx{\copy\nextbox}}%
+ \setbox\nextbox\hpack{\dorecurse\scratchnx{\copy\nextbox}}%
\or % y
- \setbox\nextbox\vbox{\dorecurse\scratchny{\copy\nextbox\endgraf}}%
+ \setbox\nextbox\vpack{\dorecurse\scratchny{\copy\nextbox\endgraf}}%
\fi
\fi
\ifdim\wd\nextbox>\scratchwidth
- \setbox\nextbox\hbox to \scratchwidth{\hss\box\nextbox\hss}%
- \setbox\nextbox\hbox{\normalexpanded{\clip[\c!width=\the\scratchwidth,\c!height=\the\ht\nextbox]{\box\nextbox}}}%
+ \setbox\nextbox\hpack to \scratchwidth{\hss\box\nextbox\hss}%
+ \setbox\nextbox\hpack{\normalexpanded{\clip[\c!width=\the\scratchwidth,\c!height=\the\ht\nextbox]{\box\nextbox}}}%
\fi
\ifdim\ht\nextbox>\scratchheight
- \setbox\nextbox\vbox to \scratchheight{\vss\box\nextbox\vss}%
- \setbox\nextbox\hbox{\normalexpanded{\clip[\c!width=\the\wd\nextbox,\c!height=\the\scratchheight]{\box\nextbox}}}%
+ \setbox\nextbox\vpack to \scratchheight{\vss\box\nextbox\vss}%
+ \setbox\nextbox\hpack{\normalexpanded{\clip[\c!width=\the\wd\nextbox,\c!height=\the\scratchheight]{\box\nextbox}}}%
\fi
\box\nextbox
\egroup}
@@ -1046,7 +1057,7 @@
\def\pack_boxes_background_image_fill
{\offinterlineskip
- \setbox\nextbox\hbox\bgroup
+ \setbox\nextbox\hpack\bgroup
\ifdim\scratchwidth>\scratchheight
\scale[\c!width=\the\scratchwidth]{\box\nextbox}%
\else
@@ -1054,7 +1065,7 @@
\fi
\egroup
\ifdim\wd\nextbox>\scratchwidth
- \setbox\nextbox\hbox to \scratchwidth
+ \setbox\nextbox\hpack to \scratchwidth
{\ifcase\scratchcounter
\hss\box\nextbox\hss
\or
@@ -1064,10 +1075,11 @@
\else
\hss\box\nextbox\hss
\fi}%
- \setbox\nextbox\hbox{\normalexpanded{\clip[\c!width=\the\scratchwidth,\c!height=\the\ht\nextbox]{\box\nextbox}}}%
+ \setbox\nextbox\hpack
+ {\normalexpanded{\clip[\c!width=\the\scratchwidth,\c!height=\the\ht\nextbox]{\box\nextbox}}}%
\fi
\ifdim\ht\nextbox>\scratchheight
- \setbox\nextbox\vbox to \scratchheight
+ \setbox\nextbox\vpack to \scratchheight
{\ifcase\scratchcounter
\vss\box\nextbox\vss
\or
@@ -1077,7 +1089,8 @@
\else
\vss\box\nextbox\vss
\fi}%
- \setbox\nextbox\hbox{\normalexpanded{\clip[\c!width=\the\wd\nextbox,\c!height=\the\scratchheight]{\box\nextbox}}}%
+ \setbox\nextbox\hpack
+ {\normalexpanded{\clip[\c!width=\the\wd\nextbox,\c!height=\the\scratchheight]{\box\nextbox}}}%
\fi
\box\nextbox
\egroup}
diff --git a/Master/texmf-dist/tex/context/base/pack-com.mkiv b/Master/texmf-dist/tex/context/base/mkiv/pack-com.mkiv
index b734d602858..c9c3bab4b9e 100644
--- a/Master/texmf-dist/tex/context/base/pack-com.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-com.mkiv
@@ -76,20 +76,60 @@
\global\resetsystemmode{combination}%
\to \everyinsidefloat
-\newcount\c_pack_combinations_x
-\newcount\c_pack_combinations_n
-\newcount\c_pack_combinations_max
-\newbox \b_pack_combinations_captions
-\newbox \b_pack_combinations_content
-\newbox \b_pack_combinations_caption
-\newbox \b_pack_combinations_temp % global
+\newcount\c_pack_combinations_nesting % local
+\newcount\c_pack_combinations_x % global
+\newcount\c_pack_combinations_n % global
+\newcount\c_pack_combinations_max % global
+\newbox \b_pack_combinations_captions % global
+\newbox \b_pack_combinations_temp % global
+\newbox \b_pack_combinations_content % local
+\newbox \b_pack_combinations_caption % local
\installcorenamespace{combination}
\installcommandhandler \??combination {combination} \??combination
+\initializeboxstack{\??combination captions}
+\initializeboxstack{\??combination temp}
+
+\newcount\c_pack_combinations_x_saved
+\newcount\c_pack_combinations_n_saved
+\newcount\c_pack_combinations_max_saved
+\newbox \b_pack_combinations_captions_saved
+\newbox \b_pack_combinations_temp_saved
+\newbox \b_pack_combinations_content_saved
+\newbox \b_pack_combinations_caption_saved
+
\setfalse\c_strc_constructions_define_commands
+\def\pack_combinations_push
+ {\advance\c_pack_combinations_nesting\plusone
+ \ifnum\c_pack_combinations_nesting>\plusone
+ \c_pack_combinations_x_saved \c_pack_combinations_x
+ \c_pack_combinations_n_saved \c_pack_combinations_n
+ \c_pack_combinations_max_saved\c_pack_combinations_max
+ \setbox\b_pack_combinations_captions_saved\box\b_pack_combinations_captions
+ \setbox\b_pack_combinations_temp_saved \box\b_pack_combinations_temp
+ \setbox\b_pack_combinations_content_saved \box\b_pack_combinations_content
+ \setbox\b_pack_combinations_caption_saved \box\b_pack_combinations_caption
+ \else
+ \global\setsystemmode{combination}% why global
+ \fi}
+
+\def\pack_combinations_pop
+ {\ifnum\c_pack_combinations_nesting>\plusone
+ \global\c_pack_combinations_x \c_pack_combinations_x_saved
+ \global\c_pack_combinations_n \c_pack_combinations_n_saved
+ \global\c_pack_combinations_max\c_pack_combinations_max_saved
+ \global\setbox\b_pack_combinations_captions\box\b_pack_combinations_captions_saved
+ \global\setbox\b_pack_combinations_temp \box\b_pack_combinations_temp_saved
+ \setbox\b_pack_combinations_content \box\b_pack_combinations_content_saved
+ \setbox\b_pack_combinations_caption \box\b_pack_combinations_caption_saved
+ \else
+ \global\resetsystemmode{combination}% why global
+ \fi
+ \advance\c_pack_combinations_nesting\minusone}
+
\definelabel
[\v!combination] % handy for configuring
[\c!numberconversion=\v!character,
@@ -143,6 +183,7 @@
\unexpanded\def\startcombination
{\bgroup % so we can grab a group
+ \pack_combinations_push
\dodoubleempty\pack_combinations_start}
% formally ok:
@@ -181,14 +222,13 @@
{\bgroup\normalexpanded{\egroup{}\ntimes{{}{}}\c_pack_combinations_n}% brr
\dostoptagged
\egroup
+ \pack_combinations_pop
\egroup}
\newtoks\everycombination
\def\pack_combinations_start[#1][#2]% needs a cleanup, also nx ny (pretty old, this one)
- {\global\setsystemmode{combination}%
- %
- \edef\currentcombination{#1}%
+ {\edef\currentcombination{#1}%
\edef\currentcombinationspec{#2}%
\ifx\currentcombinationspec\empty
\doifelseassignment{#1}%
@@ -339,7 +379,7 @@
\def\pack_combinations_pickup_package_pair % we need to store the caption row
{\vbox
{\forgetall
- \m_pack_combinations_valigner{\copy\b_pack_combinations_content}%
+ \m_pack_combinations_valigner{\box\b_pack_combinations_content}%
% we need to save the caption for a next alignment line
\pack_combinations_save_caption}%
\ifnum\c_pack_combinations_n>\plusone
@@ -382,8 +422,8 @@
\egroup}
\def\pack_combinations_save_caption
- {\global\setbox\b_pack_combinations_captions\hbox
- {\hbox{\box\b_pack_combinations_caption}%
+ {\global\setbox\b_pack_combinations_captions\hpack
+ {\hpack{\box\b_pack_combinations_caption}%
\unhbox\b_pack_combinations_captions}}
\def\pack_combinations_flush_captions
@@ -401,7 +441,7 @@
\crcr}
\def\pack_combinations_flush_captions_yes
- {\global\setbox\b_pack_combinations_captions\hbox
+ {\global\setbox\b_pack_combinations_captions\hpack
{\unhbox\b_pack_combinations_captions
\global\setbox\b_pack_combinations_temp\lastbox}%
\box\b_pack_combinations_temp
@@ -763,8 +803,8 @@
\setvalue{\??pairedboxalign\v!bottom}{\getvalue{\??pairedboxalign\v!low }}
\setvalue{\??pairedboxalign \v!top}{\getvalue{\??pairedboxalign\v!high}}
-\def\pack_pairedbox_valign#1{\setbox#1\vbox to \s_pack_pairedboxes_size{\pack_pairedboxes_align_t\box#1\pack_pairedboxes_align_b}}
-\def\pack_pairedbox_halign#1{\setbox#1\hbox to \s_pack_pairedboxes_size{\pack_pairedboxes_align_l\box#1\pack_pairedboxes_align_r}}
+\def\pack_pairedbox_valign#1{\setbox#1\vpack to \s_pack_pairedboxes_size{\pack_pairedboxes_align_t\box#1\pack_pairedboxes_align_b}}
+\def\pack_pairedbox_halign#1{\setbox#1\hpack to \s_pack_pairedboxes_size{\pack_pairedboxes_align_l\box#1\pack_pairedboxes_align_r}}
\def\pack_pairedboxes_before
{\ifx\p_location\empty
@@ -822,7 +862,7 @@
\fi}
\def\pack_pairedboxes_after
- {\setbox\b_pack_pairedboxes_second\vbox
+ {\setbox\b_pack_pairedboxes_second\vpack
{\ifnum\p_n>\plusone
\rigidcolumnbalance\nextbox
\else
@@ -856,7 +896,7 @@
\egroup}
\def\pack_pairedboxes_pack_vertical
- {\dontleavehmode\vbox\bgroup
+ {\dontleavehmode\vpack\bgroup
\forgetall
\s_pack_pairedboxes_size\wd
\ifdim\wd\b_pack_pairedboxes_first>\wd\b_pack_pairedboxes_second
@@ -875,7 +915,7 @@
\s_pack_pairedboxes_size\pairedboxparameter\c!maxheight\relax % \relax needed
\fi
\ifdim\s_pack_pairedboxes_size>\ht\b_pack_pairedboxes_second
- \setbox\b_pack_pairedboxes_second\vbox to \s_pack_pairedboxes_size
+ \setbox\b_pack_pairedboxes_second\vpack to \s_pack_pairedboxes_size
{\pack_pairedboxes_fill_top
\box\b_pack_pairedboxes_second
\pack_pairedboxes_fill_bottom}% \kern\zeropoint
@@ -896,10 +936,14 @@
\unexpanded\def\placeontopofeachother{\bgroup\dowithnextboxcs\pack_topofeachother_one\hbox}
\unexpanded\def\placesidebyside {\bgroup\dowithnextboxcs\pack_sidebyside_one \hbox}
-\def\pack_topofeachother_one{\bgroup\setbox0\box\nextbox\dowithnextboxcs\pack_topofeachother_two\hbox}
-\def\pack_sidebyside_one {\bgroup\setbox0\box\nextbox\dowithnextboxcs\pack_sidebyside_two \hbox}
+\def\pack_topofeachother_one{\bgroup\setbox\scratchboxone\box\nextbox\dowithnextboxcs\pack_topofeachother_two\hbox}
+\def\pack_sidebyside_one {\bgroup\setbox\scratchboxone\box\nextbox\dowithnextboxcs\pack_sidebyside_two \hbox}
-\def\pack_topofeachother_two{\setbox2\box\nextbox\halign{\hss##\hss\cr\box0\cr\box2\cr}\egroup\egroup}
-\def\pack_sidebyside_two {\setbox2\box\nextbox\valign{\vss##\vss\cr\box0\cr\box2\cr}\egroup\egroup}
+\def\pack_topofeachother_two{\setbox\scratchboxtwo\box\nextbox
+ \halign{\hss\alignmark\alignmark\hss\cr\box\scratchboxone\cr\box\scratchboxtwo\cr}%
+ \egroup\egroup}
+\def\pack_sidebyside_two {\setbox\scratchboxtwo\box\nextbox
+ \valign{\vss\alignmark\alignmark\vss\cr\box\scratchboxone\cr\box\scratchboxtwo\cr}%
+ \egroup\egroup}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/pack-cut.mkiv b/Master/texmf-dist/tex/context/base/mkiv/pack-cut.mkiv
index 63f4524a8dd..ffd0251d5ae 100644
--- a/Master/texmf-dist/tex/context/base/pack-cut.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-cut.mkiv
@@ -93,7 +93,7 @@
{\scratchdimen\dimexpr\cutmarklength/2\relax
\scratchskip \ifx\cutmarkhoffset\empty\cutmarkoffset\scratchdimen\else\cutmarkhoffset\fi
\normalvss
- \hbox to \d_pack_cutmarks_width
+ \hpack to \d_pack_cutmarks_width
{\llap{\copy\scratchbox\normalhskip\scratchskip}%
\normalhskip\scratchdimen\hss\infofont#1\hss\normalhskip\scratchdimen
\rlap{\normalhskip\scratchskip\copy\scratchbox}}%
@@ -116,7 +116,7 @@
{\setbox\scratchbox\normalhbox{\horizontalcuts}%
\scratchskip\ifx\cutmarkvoffset\empty\cutmarkoffset\scratchdimen\else\cutmarkvoffset\fi
\tlap{\copy\scratchbox\normalvskip\scratchskip}%
- \hbox to \d_pack_cutmarks_width
+ \hpack to \d_pack_cutmarks_width
{\scratchskip\ifx\cutmarkhoffset\empty\cutmarkoffset\scratchdimen\else\cutmarkhoffset\fi
\setbox\scratchbox\normalhbox{\verticalcuts}%
\llap{\copy\scratchbox\normalhskip\scratchskip}%
diff --git a/Master/texmf-dist/tex/context/base/pack-fen.mkiv b/Master/texmf-dist/tex/context/base/mkiv/pack-fen.mkiv
index 04a36fa462c..7bc8211440c 100644
--- a/Master/texmf-dist/tex/context/base/pack-fen.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-fen.mkiv
@@ -63,24 +63,24 @@
\def\whateverleftframe#1%
{\setinstalledframedimensions
- \setbox\b_framed_rendered\vbox to \d_overlay_height{\vss#1\vss}%
- \setbox\b_framed_rendered\hbox to \zeropoint{\box\b_framed_rendered\hss}%
+ \setbox\b_framed_rendered\vpack to \d_overlay_height{\vss#1\vss}%
+ \setbox\b_framed_rendered\hpack to \zeropoint{\box\b_framed_rendered\hss}%
\ht\b_framed_rendered\zeropoint
\dp\b_framed_rendered\zeropoint
\box\b_framed_rendered}
\def\whateverrightframe#1%
{\setinstalledframedimensions
- \setbox\b_framed_rendered\vbox to \d_overlay_height{\vss#1\vss}%
- \setbox\b_framed_rendered\hbox to \zeropoint{\hss\box\b_framed_rendered}%
+ \setbox\b_framed_rendered\vpack to \d_overlay_height{\vss#1\vss}%
+ \setbox\b_framed_rendered\hpack to \zeropoint{\hss\box\b_framed_rendered}%
\ht\b_framed_rendered\zeropoint
\dp\b_framed_rendered\zeropoint
\box\b_framed_rendered}
\def\whatevertopframe#1%
{\setinstalledframedimensions
- \setbox\b_framed_rendered\hbox to \d_overlay_width{\hss#1\hss}%
- \setbox\b_framed_rendered\vbox to \zeropoint{\box\b_framed_rendered\vss}%
+ \setbox\b_framed_rendered\hpack to \d_overlay_width{\hss#1\hss}%
+ \setbox\b_framed_rendered\vpack to \zeropoint{\box\b_framed_rendered\vss}%
\ht\b_framed_rendered\zeropoint
\dp\b_framed_rendered\zeropoint
\box\b_framed_rendered
@@ -88,8 +88,8 @@
\def\whateverbottomframe#1%
{\setinstalledframedimensions
- \setbox\b_framed_rendered\hbox to \d_overlay_width{\hss#1\hss}%
- \setbox\b_framed_rendered\vbox to \zeropoint{\vss\box\b_framed_rendered}%
+ \setbox\b_framed_rendered\hpack to \d_overlay_width{\hss#1\hss}%
+ \setbox\b_framed_rendered\vpack to \zeropoint{\vss\box\b_framed_rendered}%
\ht\b_framed_rendered\zeropoint
\dp\b_framed_rendered\zeropoint
\box\b_framed_rendered}
diff --git a/Master/texmf-dist/tex/context/base/pack-lyr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/pack-lyr.mkiv
index a847dec67be..61ed1e64b75 100644
--- a/Master/texmf-dist/tex/context/base/pack-lyr.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-lyr.mkiv
@@ -180,7 +180,8 @@
\def\pack_layers_reset_box#1%
{\ifcsname\??layerbox#1\endcsname
- \global\setbox\csname\??layerbox#1\endcsname\emptybox
+ %\global\setbox\csname\??layerbox#1\endcsname\emptybox
+ \global\setbox\lastnamedcs\emptybox
\fi}
\def\resetlayer[#1]%
@@ -208,11 +209,8 @@
{\edef\currentlayerwidth {\thelayerwidth {#2#1}}%
\edef\currentlayerheight{\thelayerheight{#2#1}}}
-% \def\thelayerwidth #1{\the\wd\executeifdefined{\??layerbox#1}\emptybox}
-% \def\thelayerheight#1{\the\ht\executeifdefined{\??layerbox#1}\emptybox}
-
-\def\thelayerwidth #1{\the\ifcsname\??layerbox#1\endcsname\wd\csname\??layerbox#1\endcsname\else\zeropoint\fi}
-\def\thelayerheight#1{\the\ifcsname\??layerbox#1\endcsname\ht\csname\??layerbox#1\endcsname\else\zeropoint\fi}
+\def\thelayerwidth #1{\the\ifcsname\??layerbox#1\endcsname\wd\lastnamedcs\else\zeropoint\fi}
+\def\thelayerheight#1{\the\ifcsname\??layerbox#1\endcsname\ht\lastnamedcs\else\zeropoint\fi}
\unexpanded\def\setlayer
{\dotripleempty\pack_layers_set}
@@ -222,7 +220,7 @@
\edef\currentlayer{#1}%
\edef\p_pack_layers_state{\layerparameter\c!state}%
\ifx\p_pack_layers_state\v!stop
- \dowithnextboxcs\egroup\hbox
+ \dowithnextboxcs\egroup\hbox % no pack ?
\else\ifthirdargument
\pack_layers_set_indeed[#1][#2][#3]%
\else
@@ -272,19 +270,6 @@
% todo: get position data in one go
-% \def\pack_layers_set_last_position_yes
-% {\edef\m_pack_layers_page{\MPp{\??layerposition\the\c_pack_layers_current_data}}%
-% \xdef\lastlayerxpos{\the\dimexpr-\MPx{\??layerposition\m_pack_layers_target\currentlayer:\m_pack_layers_page}+\MPx{\??layerposition\the\c_pack_layers_current_data}\relax}%
-% \xdef\lastlayerypos{\the\dimexpr \MPy{\??layerposition\m_pack_layers_target\currentlayer:\m_pack_layers_page}-\MPy{\??layerposition\the\c_pack_layers_current_data}\relax}%}
-% \d_pack_layers_x_position\lastlayerxpos
-% \d_pack_layers_y_position\lastlayerypos
-% \begingroup
-% \edef\currentlayer{\currentlayer\m_pack_layers_page}%
-% \global\letlayerparameter\c!position\v!yes
-% \endgroup
-% \global\letlayerparameter\c!state\v!start % needed ?
-% \setbox\b_layers\vbox to \d_pack_layers_y_size{\hbox to \d_pack_layers_x_size{\xypos{\??layerposition\the\c_pack_layers_current_data}\hss}\vss}}
-
\def\pack_layers_set_last_position_yes % target: left|right
{% this will become one call
\edef\m_pack_layers_anchor{\??layerposition\the\c_pack_layers_current_data}%
@@ -302,8 +287,8 @@
% \global\letlayerparameter\c!position\v!yes
% \endgroup
\global\letlayerparameter\c!state\v!start % needed ?
- \setbox\b_layers\vbox to \d_pack_layers_y_size
- {\hbox to \d_pack_layers_x_size
+ \setbox\b_layers\vpack to \d_pack_layers_y_size
+ {\hpack to \d_pack_layers_x_size
{\xypos\m_pack_layers_anchor\hss}%
\vss}}
@@ -335,7 +320,7 @@
\edef\p_pack_layers_preset {\layerparameter\c!preset }%
%
\ifcsname\??layerpreset\p_pack_layers_preset\endcsname
- \csname\??layerpreset\p_pack_layers_preset\endcsname
+ \lastnamedcs
\setupcurrentlayer[#1]% postroll
\fi
%
@@ -365,7 +350,8 @@
\fi
\ifx\p_pack_layers_rotation\empty \else
% use direct call
- \setbox\nextbox\hbox{\rotate[\c!location=\v!high,\c!rotation=\layerparameter\c!rotation]{\box\nextbox}}%
+ \setbox\nextbox\hpack
+ {\rotate[\c!location=\v!high,\c!rotation=\layerparameter\c!rotation]{\box\nextbox}}%
\fi
\d_pack_layers_x_offset\p_pack_layers_sx\dimexpr
\ifx\p_pack_layers_hoffset\v!max\d_pack_layers_x_size\else\p_pack_layers_hoffset\fi+\p_pack_layers_offset+\p_pack_layers_dx
@@ -392,7 +378,7 @@
\gsetboxllx\layerpagebox\zeropoint
\gsetboxlly\layerpagebox\zeropoint
\fi
- \global\setbox\layerpagebox\vbox %to \layerparameter\c!height % new, otherwise no negative y possible
+ \global\setbox\layerpagebox\vpack %to \layerparameter\c!height % new, otherwise no negative y possible
{\offinterlineskip
\ifvoid\layerpagebox
\let\lastlayerwidth \zeropoint
@@ -416,7 +402,8 @@
\ht\nextbox\strutheight
\dp\nextbox\strutdepth
\else
- \setbox\nextbox\hbox{\alignedbox[\p_pack_layers_location]\vbox{\box\nextbox}}%
+ \setbox\nextbox\hpack
+ {\alignedbox[\p_pack_layers_location]\vpack{\box\nextbox}}%
\fi
\ifnum\p_pack_layers_line=\zerocount\else % no \ifcase, can be negative
\advance\d_pack_layers_y_position\dimexpr\p_pack_layers_line\lineheight+\topskip-\lineheight-\ht\nextbox\relax
@@ -425,7 +412,8 @@
\advance\d_pack_layers_x_position\layoutcolumnoffset\p_pack_layers_column\relax
\fi
\ifx\p_pack_layers_location\v!grid
- \setbox\nextbox\hbox{\alignedbox[rb]\vbox{\box\nextbox}}%
+ \setbox\nextbox\hpack
+ {\alignedbox[rb]\vpack{\box\nextbox}}%
\fi
% ll registration
\scratchdimen\dimexpr\d_pack_layers_x_position+\d_pack_layers_x_offset\relax
@@ -444,7 +432,7 @@
\dp\nextbox\zeropoint
% placement
\hsize\p_pack_layers_width
- \vbox to \p_pack_layers_height \bgroup
+ \vpack to \p_pack_layers_height \bgroup
\smashbox\nextbox
\vskip\dimexpr\d_pack_layers_y_position+\d_pack_layers_y_offset\relax
\hskip\dimexpr\d_pack_layers_x_position+\d_pack_layers_x_offset\relax
@@ -498,7 +486,8 @@
\def\doifelselayerdata#1%
{\ifcsname\??layerbox#1\endcsname
- \ifvoid\csname\??layerbox#1\endcsname
+ %\ifvoid\csname\??layerbox#1\endcsname
+ \ifvoid\lastnamedcs
\doubleexpandafter\secondoftwoarguments
\else
\doubleexpandafter\firstoftwoarguments
@@ -550,6 +539,8 @@
% \ifcase#1\else\writestatus{layer}{unknown layer #3}\fi
+% todo: pass the layer with \lastnamedcs
+
\def\pack_layers_flush_single
{\startoverlay
{\ifcsname\??layerbox \currentlayer \endcsname\pack_layers_flush_indeed\plusone \currentlayer \fi}%
@@ -564,66 +555,6 @@
{\ifcsname\??layerbox#1\currentlayer:\the\realpageno\endcsname\pack_layers_flush_indeed\zerocount{#1\currentlayer:\the\realpageno}\fi}%
\stopoverlay}
-% \def\pack_layers_flush_indeed#1#2% quite core, so optimized
-% {\begingroup % already grouped
-% \offinterlineskip
-% \edef\p_pack_layers_preset{\layerparameter\c!preset}%
-% \ifcsname\??layerpreset\p_pack_layers_preset\endcsname
-% \csname\??layerpreset\p_pack_layers_preset\endcsname
-% \fi
-% \edef\p_pack_layers_method{\layerparameter\c!method}%
-% \edef\p_pack_layers_option{\layerparameter\c!option}%
-% \ifx\p_pack_layers_option\v!test
-% \settrue\c_pack_layers_trace
-% \traceboxplacementtrue
-% \fi
-% \ifcase#1\relax
-% \setfalse\c_pack_layers_repeated
-% \else
-% \edef\p_pack_layers_position{\layerparameter\c!position}%
-% \ifx\p_pack_layers_position\v!yes
-% \setfalse\c_pack_layers_repeated
-% \else
-% \edef\p_pack_layers_repeat{\layerparameter\c!repeat}%
-% \ifx\p_pack_layers_repeat\v!yes
-% \settrue\c_pack_layers_repeated
-% \else\ifx\p_pack_layers_state\v!repeat
-% \settrue\c_pack_layers_repeated
-% \else
-% \setfalse\c_pack_layers_repeated
-% \fi\fi
-% \fi
-% \fi
-% \chardef\b_layers\csname\??layerbox#2\endcsname % trick
-% % we need to copy in order to retain the negative offsets for a next
-% % stage of additions, i.e. llx/lly accumulate in repeat mode and the
-% % compensation may differ each flush depending on added content
-% \setbox\nextbox
-% \ifx\p_pack_layers_method\v!fit
-% \pack_layers_positioned_box_yes
-% \else
-% \pack_layers_positioned_box_nop
-% \fi
-% % todo: method=offset => overlayoffset right/down (handy for backgrounds with offset)
-% \doifoverlayelse{#2}%
-% {\setlayoutcomponentattribute{\v!layer:#2}}%
-% \resetlayoutcomponentattribute
-% \ifx\p_pack_layers_option\v!test \ruledvbox \else \vbox \fi \ifx\p_pack_layers_method\v!overlay to \overlayheight \fi \layoutcomponentboxattribute
-% {\hbox \ifx\p_pack_layers_method\v!overlay to \d_overlay_width \fi
-% {\edef\currentlayer{#2\the\realpageno}% local
-% \edef\p_pack_layers_position{\layerparameter\c!position}% local
-% \ifx\p_pack_layers_position\v!yes
-% \xypos{\??layerposition#2:\the\realpageno}%
-% \fi
-% \box\nextbox
-% \hss}%
-% \vss}%
-% \ifconditional\c_pack_layers_repeated\else
-% \gsetboxllx\b_layers\zeropoint
-% \gsetboxlly\b_layers\zeropoint
-% \fi
-% \endgroup}
-
\let\pack_layers_top_fill \relax
\let\pack_layers_bottom_fill\vss
@@ -632,7 +563,7 @@
\offinterlineskip
\edef\p_pack_layers_preset{\layerparameter\c!preset}%
\ifcsname\??layerpreset\p_pack_layers_preset\endcsname
- \csname\??layerpreset\p_pack_layers_preset\endcsname
+ \lastnamedcs
\fi
\edef\p_pack_layers_method{\layerparameter\c!method}%
\edef\p_pack_layers_option{\layerparameter\c!option}%
@@ -674,9 +605,9 @@
% we have conflicting demands: some mechanisms want ll anchoring .. I need to figure this out
% an dmaybe we will have 'origin=bottom' or so
\setbox\nextbox
- \ifx\p_pack_layers_option\v!test \ruledvbox \else \vbox \fi \ifx\p_pack_layers_method\v!overlay to \d_overlay_height \fi \layoutcomponentboxattribute
+ \ifx\p_pack_layers_option\v!test \ruledvbox \else \vpack \fi \ifx\p_pack_layers_method\v!overlay to \d_overlay_height \fi \layoutcomponentboxattribute
{\pack_layers_top_fill
- \hbox \ifx\p_pack_layers_method\v!overlay to \d_overlay_width \fi
+ \hpack \ifx\p_pack_layers_method\v!overlay to \d_overlay_width \fi
{\box\nextbox
\hss}%
\pack_layers_bottom_fill}%
@@ -698,7 +629,7 @@
\endgroup}
\def\pack_layers_positioned_box_yes
- {\vbox
+ {\vpack
{\vskip-\getboxlly\b_layers
\hskip-\getboxllx\b_layers
\hsize-\dimexpr\getboxllx\b_layers-\wd\b_layers\relax
@@ -732,7 +663,7 @@
% \composedlayer{#1}}}
\unexpanded\def\tightlayer[#1]%
- {\hbox
+ {\hpack
{\def\currentlayer{#1}% todo: left/right
\setbox\nextbox\emptybox
\d_overlay_width \layerparameter\c!width
@@ -807,7 +738,7 @@
\unexpanded\def\settextpagecontent#1#2#3% #2 and #3 will disappear
{\doifelselayerdata{OTRTEXT}
- {\setbox#1\hbox to \makeupwidth
+ {\setbox#1\hpack to \makeupwidth
{\startoverlay
{\tightlayer[OTRTEXT]} % first, otherwise problems with toc
{\normalsettextpagecontent{#1}{#2}{#3}\box#1}
diff --git a/Master/texmf-dist/tex/context/base/pack-mis.mkvi b/Master/texmf-dist/tex/context/base/mkiv/pack-mis.mkvi
index 420f9440a2f..420f9440a2f 100644
--- a/Master/texmf-dist/tex/context/base/pack-mis.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-mis.mkvi
diff --git a/Master/texmf-dist/tex/context/base/pack-mrl.mkiv b/Master/texmf-dist/tex/context/base/mkiv/pack-mrl.mkiv
index a97c9e6f8c8..649b29fa6e6 100644
--- a/Master/texmf-dist/tex/context/base/pack-mrl.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-mrl.mkiv
@@ -57,9 +57,9 @@
\fi\fi
\useblackrulesstyleandcolor\c!style\c!color
\vrule
- \s!width \ifx\p_width \v!max\emwidth\else\p_width \fi
- \s!height\ifx\p_height\v!max\strutht\else\p_height\fi
- \s!depth \ifx\p_depth \v!max\strutdp\else\p_depth \fi
+ \ifx\p_width \v!max\s!width \emwidth\else\ifx\p_width \empty\else\s!width \p_width \fi\fi
+ \ifx\p_height\v!max\s!height\strutht\else\ifx\p_height\empty\else\s!height\p_height\fi\fi
+ \ifx\p_depth \v!max\s!depth \strutdp\else\ifx\p_depth \empty\else\s!depth \p_depth \fi\fi
\egroup}
\setupblackrules
@@ -346,26 +346,35 @@
\def\pack_thinrules[#1]%
{\bgroup
\setupcurrentthinrules[#1]%
- \assignvalue{\directthinrulesparameter\c!interlinespace}\m_pack_thinrules_interlinespace{1.0}{1.5}{2.0}%
- \spacing\m_pack_thinrules_interlinespace
- \edef\p_after {\directthinrulesparameter\c!after}%
- \edef\p_inbetween{\directthinrulesparameter\c!inbetween}%
- \directthinrulesparameter\c!before
\scratchcounter\directthinrulesparameter\c!n\relax
- \dorecurse\scratchcounter
- {\ifnum\recurselevel=\scratchcounter \penalty500 \else
- \ifnum\recurselevel=\plustwo \penalty500 \fi\fi
- \thinrule
- \ifnum\recurselevel<\scratchcounter\relax
- % test needed, else messed up whitespace
- \ifx\p_inbetween\empty
- \softbreak % \ifhmode \hskip \parfillskip \break \fi
- \else
- \endgraf
- \nowhitespace
- \p_inbetween
- \fi
- \fi}%
+ \ifcase\scratchcounter
+ % nothing, not even before/after
+ \let\p_after\relax
+ \else
+ \assignvalue{\directthinrulesparameter\c!interlinespace}\m_pack_thinrules_interlinespace{1.0}{1.5}{2.0}%
+ \spacing\m_pack_thinrules_interlinespace
+ \edef\p_after {\directthinrulesparameter\c!after}%
+ \edef\p_inbetween{\directthinrulesparameter\c!inbetween}%
+ \directthinrulesparameter\c!before
+ \ifcase\scratchcounter\or
+ \thinrule
+ \else
+ \dorecurse\scratchcounter
+ {\ifnum\recurselevel=\scratchcounter \directvspacing\v!samepage \else % \penalty500
+ \ifnum\recurselevel=\plustwo \directvspacing\v!samepage \fi\fi % \penalty500
+ \thinrule
+ \ifnum\recurselevel<\scratchcounter\relax
+ % test needed, else messed up whitespace
+ \ifx\p_inbetween\empty
+ \softbreak % \ifhmode \hskip \parfillskip \break \fi
+ \else
+ \endgraf
+ \nowhitespace
+ \p_inbetween
+ \fi
+ \fi}%
+ \fi
+ \fi
\ifx\p_after\empty
\carryoverpar\egroup
\else
diff --git a/Master/texmf-dist/tex/context/base/mkiv/pack-obj.lua b/Master/texmf-dist/tex/context/base/mkiv/pack-obj.lua
new file mode 100644
index 00000000000..8a1af2b7049
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-obj.lua
@@ -0,0 +1,262 @@
+if not modules then modules = { } end modules ['pack-obj'] = {
+ version = 1.001,
+ comment = "companion to pack-obj.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+--[[ldx--
+<p>We save object references in the main utility table. jobobjects are
+reusable components.</p>
+--ldx]]--
+
+local context = context
+local codeinjections = backends.codeinjections
+
+local ctx_doifelse = commands.doifelse
+
+local nuts = nodes.nuts
+
+local setlink = nuts.setlink
+local getlist = nuts.getlist
+local setbox = nuts.setbox
+
+local new_latelua = nuts.pool.latelua
+
+local settexdimen = tokens.setters.dimen
+local settexcount = tokens.setters.count
+
+local gettexbox = tokens.getters.box
+local gettexdimen = tokens.getters.dimen
+local gettexcount = tokens.getters.count
+
+local implement = interfaces.implement
+local setmacro = interfaces.setmacro
+
+local allocate = utilities.storage.allocate
+
+local collected = allocate()
+local tobesaved = allocate()
+
+local jobobjects = {
+ collected = collected,
+ tobesaved = tobesaved,
+}
+
+job.objects = jobobjects
+
+local function initializer()
+ collected = jobobjects.collected
+ tobesaved = jobobjects.tobesaved
+end
+
+job.register('job.objects.collected', tobesaved, initializer, nil)
+
+local function saveobject(tag,number,page)
+ local t = { number, page }
+ tobesaved[tag], collected[tag] = t, t
+end
+
+local function setobject(tag,number,page)
+ collected[tag] = { number, page }
+end
+
+local function getobject(tag)
+ return collected[tag] or tobesaved[tag]
+end
+
+local function getobjectnumber(tag,default)
+ local o = collected[tag] or tobesaved[tag]
+ return o and o[1] or default
+end
+
+local function getobjectpage(tag,default)
+ local o = collected[tag] or tobesaved[tag]
+ return o and o[2] or default
+end
+
+jobobjects.save = saveobject
+jobobjects.set = setobject
+jobobjects.get = getobject
+jobobjects.number = getobjectnumber
+jobobjects.page = getobjectpage
+
+-- implement {
+-- name = "saveobject",
+-- actions = saveobject
+-- }
+--
+-- implement {
+-- name = "setobject",
+-- actions = setobject,
+-- arguments = { "string", "integer", "integer" }
+-- }
+--
+-- implement {
+-- name = "objectnumber",
+-- actions = { getobjectnumber, context },
+-- arguments = { "string", "string" },
+-- }
+--
+-- implement {
+-- name = "objectpage",
+-- actions = { getobjectpage, context },
+-- arguments = { "string", "string" },
+-- }
+--
+-- implement {
+-- name = "doifelseobjectreferencefound",
+-- actions = { getobject, commands.doifelse },
+-- arguments = "string"
+-- }
+
+-- if false then
+-- -- we can flush the inline ref ourselves now if we want
+-- local flush = new_latelua("pdf.flushxform("..index..")")
+-- flush.next = list
+-- next.prev = flush
+-- end
+
+local data = table.setmetatableindex("table")
+
+objects = {
+ data = data,
+ n = 0,
+}
+
+function objects.register(ns,id,b,referenced)
+ objects.n = objects.n + 1
+ nodes.handlers.finalize(gettexbox(b))
+ data[ns][id] = {
+ codeinjections.registerboxresource(b), -- a box number
+ gettexdimen("objectoff"),
+ referenced
+ }
+end
+
+function objects.restore(ns,id)
+ local d = data[ns][id]
+ if d then
+ local index = d[1]
+ local offset = d[2]
+ local status = d[3]
+ local hbox = codeinjections.restoreboxresource(index) -- a nut !
+ if status then
+ local list = getlist(hbox)
+ local page = new_latelua(function()
+ saveobject(ns .. "::" .. id,index,gettexcount("realpageno"))
+ end)
+ setlink(list,page)
+ end
+ setbox("objectbox",hbox)
+ settexdimen("objectoff",offset)
+ else
+ setbox("objectbox",nil)
+ settexdimen("objectoff",0)
+ end
+end
+
+function objects.dimensions(index)
+ local d = data[ns][id]
+ if d then
+ return codeinjections.boxresourcedimensions(d[1])
+ else
+ return 0, 0, 0
+ end
+end
+
+function objects.reference(ns,id)
+ local d = data[ns][id]
+ if d then
+ return d[1]
+ else
+ return getobjectnumber(ns .."::" .. id,0)
+ end
+end
+
+function objects.page(ns,id)
+ return getobjectpage(ns .."::" .. id,gettexcount("realpageno"))
+end
+
+function objects.found(ns,id)
+ return data[ns][id]
+end
+
+implement {
+ name = "registerreferencedobject",
+ arguments = { "string", "string", "integer", true },
+ actions = objects.register,
+}
+
+implement {
+ name = "registerobject",
+ arguments = { "string", "string", "integer" },
+ actions = objects.register,
+}
+
+implement {
+ name = "restoreobject",
+ arguments = { "string", "string" },
+ actions = objects.restore,
+}
+
+implement {
+ name = "doifelseobject",
+ arguments = { "string", "string" },
+ actions = function(ns,id)
+ ctx_doifelse(data[ns][id])
+ -- ctx_doifelse(objects.reference(ns,id))
+ end,
+}
+
+implement {
+ name = "doifelseobjectreference",
+ arguments = { "string", "string" },
+ actions = function(ns,id)
+ -- ctx_doifelse(data[ns][id])
+ ctx_doifelse(objects.reference(ns,id))
+ end,
+}
+
+implement {
+ name = "getobjectreference",
+ arguments = { "string", "string", "csname" },
+ actions = function(ns,id,target)
+ setmacro(target,objects.reference(ns,id),"global")
+ end
+}
+
+implement {
+ name = "getobjectreferencepage",
+ arguments = { "string", "string", "csname" },
+ actions = function(ns,id,target)
+ setmacro(target,objects.page(ns,id),"global")
+ end
+}
+
+implement {
+ name = "getobjectdimensions",
+ arguments = { "string", "string" },
+ actions = function(ns,id)
+ local o = data[ns][id]
+ local w, h, d = 0, 0, 0
+ if d then
+ w, h, d = codeinjections.boxresourcedimensions(o[1])
+ end
+ settexdimen("objectwd",w or 0)
+ settexdimen("objectht",h or 0)
+ settexdimen("objectdp",d or 0)
+ settexdimen("objectoff",o[2])
+ end
+}
+
+-- for the moment here:
+
+implement {
+ name = "registerbackendsymbol",
+ arguments = { "string", "integer" },
+ actions = function(...)
+ codeinjections.registersymbol(...)
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/pack-obj.mkiv b/Master/texmf-dist/tex/context/base/mkiv/pack-obj.mkiv
new file mode 100644
index 00000000000..23608846d2d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-obj.mkiv
@@ -0,0 +1,162 @@
+%D \module
+%D [ file=pack-obj,
+%D version=1998.01.15,
+%D title=\CONTEXT\ Packaging Macros,
+%D subtitle=Objects,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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 Packaging Macros / Objects}
+
+\unprotect
+
+\registerctxluafile{pack-obj}{1.001}
+
+%D \macros
+%D {setobject,getobject,ifinobject}
+%D
+%D Boxes can be considered reuable objects. Traditionally once passed
+%D to the \DVI\ file, such objects cannot be reused. In \PDF\ however,
+%D reusing is possible and sometimes even a necessity. Therefore,
+%D \CONTEXT\ supports reusable objects and \LUATEX\ has native support
+%D for so called box resources.
+%D
+%D The first application of objects in \CONTEXT\ concerned \METAPOST\
+%D graphics and fill||in form fields. Reusing resources can save lots
+%D of bytes and sometimes also runtime.
+%D
+%D \starttyping
+%D \setobject{class}{name}\somebox{}
+%D \getobject{class}{name}
+%D \stoptyping
+%D
+%D Here \type {\somebox} can be whatever box specification suits \TEX.
+%D Although the implementation in \MKIV\ is somewhat different the
+%D principles have not changed.
+
+\installcorenamespace {objects}
+
+\newif \ifinobject
+\newbox \objectbox
+
+\def\objectoffset{1cm}
+
+\newdimen\objectoff \def\objectmargin{\the\objectoff}
+\newdimen\objectwd \def\objectwidth {\the\objectwd}
+\newdimen\objectht \def\objectheight{\the\objectht}
+\newdimen\objectdp \def\objectdepth {\the\objectdp}
+
+% If I have time I will use the unreferenced variant for e.g. mp reuse.
+
+% todo formmargin per obj
+
+\unexpanded\def\setreferencedobject #1#2{\begingroup\objectoff\objectoffset\inobjecttrue\dowithnextbox{\pack_objects_set_yes{#1}{#2}}}
+\unexpanded\def\settightreferencedobject #1#2{\begingroup\objectoff\zeropoint \inobjecttrue\dowithnextbox{\pack_objects_set_yes{#1}{#2}}}
+\unexpanded\def\setunreferencedobject #1#2{\begingroup\objectoff\objectoffset\inobjecttrue\dowithnextbox{\pack_objects_set_nop{#1}{#2}}}
+\unexpanded\def\settightunreferencedobject#1#2{\begingroup\objectoff\zeropoint \inobjecttrue\dowithnextbox{\pack_objects_set_nop{#1}{#2}}}
+
+\let\setobject \setreferencedobject
+\let\settightobject\settightreferencedobject
+
+\unexpanded\def\pack_objects_set_yes#1#2%
+ {\ifdim\objectoff>\zeropoint\relax
+ \pack_objects_package
+ \else
+ \setbox\objectbox\box\nextbox
+ \fi
+ \clf_registerreferencedobject{#1}{#2}\objectbox
+ \endgroup}
+
+\unexpanded\def\pack_objects_set_nop#1#2%
+ {\ifdim\objectoff>\zeropoint\relax
+ \pack_objects_package
+ \else
+ \setbox\objectbox\box\nextbox
+ \fi
+ \clf_registerobject{#1}{#2}\objectbox
+ \endgroup}
+
+\def\pack_objects_package
+ {\objectwd\dimexpr\wd\nextbox+2\objectoff\relax
+ \objectht\dimexpr\ht\nextbox+ \objectoff\relax
+ \objectdp\dimexpr\dp\nextbox+ \objectoff\relax
+ \setbox\objectbox\hpack
+ {\hskip\objectoff
+ \box\nextbox}%
+ \wd\objectbox\objectwd
+ \ht\objectbox\objectht
+ \dp\objectbox\objectdp}
+
+\def\pack_objects_repackage
+ {\objectwd\dimexpr\wd\objectbox-2\objectoff\relax
+ \objectht\dimexpr\ht\objectbox- \objectoff\relax
+ \objectdp\dimexpr\dp\objectbox- \objectoff\relax
+ \setbox\objectbox\hpack
+ {\hskip-\objectoff
+ \box\objectbox}%
+ \wd\objectbox\objectwd
+ \ht\objectbox\objectht
+ \dp\objectbox\objectdp}
+
+\unexpanded\def\getobject#1#2%
+ {\begingroup
+ \clf_restoreobject{#1}{#2}%
+ \ifdim\objectoff>\zeropoint
+ \pack_objects_repackage
+ \fi
+ \box\objectbox
+ \endgroup}
+
+%D If needed one can ask for the dimensions of an object with:
+%D
+%D \starttyping
+%D \getobjectdimensions{class}{name}
+%D \stoptyping
+%D
+%D The results are reported in \type {\objectwidth}, \type
+%D {\objectheight} and \type {\objectdepth}.
+
+\unexpanded\def\getobjectdimensions#1#2%
+ {\clf_getobjectdimensions{#1}{#2}}
+
+%D \macros
+%D {doifobjectfoundelse,doifobjectreferencefoundelse}
+%D
+%D To prevent redundant definition of objects, one can use
+%D the next tests:
+%D
+%D \starttyping
+%D \doifobjectfoundelse{class}{object}{do then}{do else}
+%D \doifobjectreferencefoundelse{class}{object}{do then}{do else}
+%D \stoptyping
+
+\def\defaultobjectreference{0}
+\def\defaultobjectpage {\realfolio}
+
+\unexpanded\def\dogetobjectreference {\clf_getobjectreference}
+\unexpanded\def\dogetobjectreferencepage {\clf_getobjectreferencepage}
+
+\unexpanded\def\doifelseobjectfound {\clf_doifelseobject}
+\unexpanded\def\doifelseobjectreferencefound{\clf_doifelseobjectreference}
+
+\let\doifobjectfoundelse \doifelseobjectfound
+\let\doifobjectreferencefoundelse\doifelseobjectreferencefound
+
+%D For the moment here:
+
+\let\lastpredefinedsymbol\empty % some day we can do more at the lua end
+
+\unexpanded\def\predefinesymbol[#1]%
+ {\begingroup
+ \xdef\lastpredefinedsymbol{#1}%
+ \settightobject{SYM}{#1}\hbox{\symbol[#1]}% to be checked ... maybe only fitting
+ \dogetobjectreference{SYM}{#1}\m_back_object_reference
+ \clf_registerbackendsymbol{#1}\m_back_object_reference\relax
+ \endgroup}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/pack-pos.mkiv b/Master/texmf-dist/tex/context/base/mkiv/pack-pos.mkiv
index c52c01ca4b9..c52c01ca4b9 100644
--- a/Master/texmf-dist/tex/context/base/pack-pos.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-pos.mkiv
diff --git a/Master/texmf-dist/tex/context/base/pack-rul.lua b/Master/texmf-dist/tex/context/base/mkiv/pack-rul.lua
index 151642c3a1b..427a2d11da0 100644
--- a/Master/texmf-dist/tex/context/base/pack-rul.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-rul.lua
@@ -39,6 +39,7 @@ local setfield = nuts.setfield
local getnext = nuts.getnext
local getprev = nuts.getprev
local getlist = nuts.getlist
+local setlist = nuts.setlist
local getid = nuts.getid
local getsubtype = nuts.getsubtype
local getbox = nuts.getbox
@@ -46,6 +47,7 @@ local getbox = nuts.getbox
local hpack = nuts.hpack
local traverse_id = nuts.traverse_id
local node_dimensions = nuts.dimensions
+local free_node = nuts.free
local function doreshapeframedbox(n)
local box = getbox(n)
@@ -72,7 +74,8 @@ local function doreshapeframedbox(n)
if repack then
local subtype = getsubtype(n)
if subtype == box_code or subtype == line_code then
- lastlinelength = node_dimensions(l,getfield(n,"dir")) -- used to be: hpack(copy(l)).width
+ -- used to be: hpack(copy(l)).width
+ lastlinelength = node_dimensions(l,getfield(n,"dir"))
else
lastlinelength = getfield(n,"width")
end
@@ -107,9 +110,18 @@ local function doreshapeframedbox(n)
if l then
local subtype = getsubtype(h)
if subtype == box_code or subtype == line_code then
- l = hpack(l,maxwidth,'exactly',getfield(h,"dir")) -- multiple return values
- setfield(h,"list",l)
- setfield(h,"shift",0) -- needed for display math, so no width check possible
+ local p = hpack(l,maxwidth,'exactly',getfield(h,"dir")) -- multiple return value
+ if false then
+ setlist(h,p)
+ setfield(h,"shift",0) -- needed for display math, so no width check possible
+ -- setfield(p,"attr",getfield(h,"attr"))
+ else
+ setfield(h,"glue_set",getfield(p,"glue_set"))
+ setfield(h,"glue_order",getfield(p,"glue_order"))
+ setfield(h,"glue_sign",getfield(p,"glue_sign"))
+ setlist(p)
+ free_node(p)
+ end
end
setfield(h,"width",maxwidth)
end
@@ -169,7 +181,7 @@ end
implement { name = "doreshapeframedbox", actions = doreshapeframedbox, arguments = "integer" }
implement { name = "doanalyzeframedbox", actions = doanalyzeframedbox, arguments = "integer" }
-function nodes.maxboxwidth(box)
+local function maxboxwidth(box)
local boxwidth = getfield(box,"width")
if boxwidth == 0 then
return 0
@@ -207,4 +219,13 @@ function nodes.maxboxwidth(box)
for v in traverse_id(vlist_code,list) do -- no dir etc needed
check(v,false)
end
+ return maxwidth
end
+
+nodes.maxboxwidth = maxboxwidth
+
+implement {
+ name = "themaxboxwidth",
+ actions = function(n) context("%isp",maxboxwidth(getbox(n))) end,
+ arguments = "integer"
+}
diff --git a/Master/texmf-dist/tex/context/base/pack-rul.mkiv b/Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkiv
index 5f72a1113fa..c8288586f4b 100644
--- a/Master/texmf-dist/tex/context/base/pack-rul.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkiv
@@ -22,7 +22,7 @@
\unprotect
-\definesystemvariable {ol} % OmLijnd -> check scrn-fld too
+% \definesystemvariable {ol} % OmLijnd -> check scrn-fld too
%D \macros
%D {linewidth, setuplinewidth}
@@ -104,7 +104,8 @@
\unexpanded\def\doinstallinheritedframed#1#2#3#4#5#6#7#8#9%
{\def#5##1##2{\ifx##1\relax#6{##2}\else#4{##1}{##2}\fi}%
- \def#6##1{\ifcsname\??framed:##1\endcsname\??framed:##1\else\s!empty\fi}% root
+ %\def#6##1{\ifcsname\??framed:##1\endcsname\??framed:##1\else\s!empty\fi}% root
+ \def#6##1{\ifcsname\??framed:##1\endcsname\??framed:##1\else\??empty\fi}% root
\unexpanded\def#8%
{\bgroup
\bgroup
@@ -368,7 +369,7 @@
\fi}
\def\pack_framed_background_box_color_indeed
- {\hbox{\dousecolorparameter\p_framed_backgroundcolor\pack_framed_filled_box}}
+ {\hpack{\dousecolorparameter\p_framed_backgroundcolor\pack_framed_filled_box}}
%D \macros
%D {defineoverlay, doifoverlayelse, overlayoffset,
@@ -434,6 +435,8 @@
\let\overlaycolor \empty
\let\overlaylinecolor \empty
+\def\overlayradius{\framedparameter\c!frameradius}
+
\newdimen\d_overlay_width
\newdimen\d_overlay_height
\newdimen\d_overlay_depth
@@ -493,7 +496,7 @@
\fi
\egroup
\setlayoutcomponentattribute{\v!overlay:#1}%
- \setbox\scratchbox\hbox \layoutcomponentboxattribute
+ \setbox\scratchbox\hpack \layoutcomponentboxattribute
{\kern -.5\dimexpr\wd\scratchbox-\d_framed_target_wd\relax % was \d_overlay_width
\raise-.5\dimexpr\ht\scratchbox-\d_framed_target_ht\relax % not \d_overlay_height !
\box\scratchbox}%
@@ -506,12 +509,19 @@
%D \macros
%D {overlayfakebox}
+% \unexpanded\def\overlayfakebox
+% {\hpack
+% {\setbox\scratchbox\emptyhbox
+% \wd\scratchbox\d_overlay_width
+% \ht\scratchbox\d_overlay_height
+% \box\scratchbox}}
+
\unexpanded\def\overlayfakebox
- {\hbox
- {\setbox\scratchbox\emptyhbox
- \wd\scratchbox\d_overlay_width
- \ht\scratchbox\d_overlay_height
- \box\scratchbox}}
+ {\hpack % redundant but needs testing
+ {\novrule
+ \s!width \d_overlay_width
+ \s!height\d_overlay_height
+ \s!depth \zeropoint}}
%D For testing we provide:
@@ -536,19 +546,21 @@
\def\pack_framed_process_background
{\ifcsname\??overlaybuiltin\m_framed_background\endcsname
- \pack_framed_process_background_indeed_internal
+ \expandafter\pack_framed_process_background_indeed_internal\lastnamedcs
\else\ifcsname\??overlay\m_framed_background\endcsname
- \pack_framed_process_background_indeed_external
+ \expandafter\pack_framed_process_background_indeed_external\lastnamedcs
\fi\fi}
-\def\pack_framed_process_background_indeed_internal % : in name
+\def\pack_framed_process_background_indeed_internal#1% % : in name
{\bgroup
\setbox\b_framed_extra\hbox{%\bgroup
\ifzeropt\framedbackgroundoffset
- \csname\??overlaybuiltin\m_framed_background\endcsname
+ %\csname\??overlaybuiltin\m_framed_background\endcsname
+ #1
\else
\kern-\framedbackgroundoffset
- \hbox{\csname\??overlaybuiltin\m_framed_background\endcsname}%
+ %\hbox{\csname\??overlaybuiltin\m_framed_background\endcsname}%
+ \hbox{#1}%
\fi
}%\egroup
\wd\b_framed_extra\zeropoint
@@ -557,15 +569,17 @@
\box\b_framed_extra
\egroup}
-\def\pack_framed_process_background_indeed_external
+\def\pack_framed_process_background_indeed_external#1%
{\pack_framed_overlay_initialize
\bgroup
\setbox\b_framed_extra\hbox{%\bgroup
\ifzeropt\framedbackgroundoffset
- \csname\??overlay\m_framed_background\endcsname
+ %\csname\??overlay\m_framed_background\endcsname
+ #1%
\else
\kern-\framedbackgroundoffset
- \hbox{\csname\??overlay\m_framed_background\endcsname}%
+ %\hbox{\csname\??overlay\m_framed_background\endcsname}%
+ \hbox{#1}%
\fi
}%\egroup
\wd\b_framed_extra\zeropoint
@@ -590,7 +604,7 @@
\newdimen\framedbackgroundoffset
\def\pack_framed_background_box_content% fuzzy but needed hack, this \vss, otherwise
- {\vbox to \framedbackgroundheight{\vss\box\b_framed_normal\vss}} % vertical shift \backgroundheight
+ {\vpack to \framedbackgroundheight{\vss\box\b_framed_normal\vss}} % vertical shift \backgroundheight
\def\pack_framed_add_region % experiment
{\anch_mark_region_box\b_framed_normal}
@@ -649,7 +663,7 @@
%D
%D We predefine two already familiar backgrounds:
-\letvalue{\??overlaybuiltin\v!screen }\pack_framed_background_box_gray
+%letvalue{\??overlaybuiltin\v!screen }\pack_framed_background_box_gray
\letvalue{\??overlaybuiltin\v!color }\pack_framed_background_box_color
\letvalue{\??overlaybuiltin\v!foreground}\pack_framed_background_box_content % replaces: \defineoverlay[\v!foreground][\foregroundbox]
@@ -662,7 +676,7 @@
%D also support a negative offset.
\def\pack_framed_add_outline
- {\setbox\b_framed_normal\hbox % rules on top of box
+ {\setbox\b_framed_normal\hpack % rules on top of box
{\d_framed_target_wd\dimexpr\wd\b_framed_normal+2\d_framed_frameoffset\relax
\d_framed_target_ht\dimexpr\ht\b_framed_normal+ \d_framed_frameoffset\relax
\d_framed_target_dp\dimexpr\dp\b_framed_normal+ \d_framed_frameoffset+\framedparameter\c!framedepth\relax
@@ -685,17 +699,37 @@
\box\b_framed_normal
\box\b_framed_extra}}
+% \def\pack_framed_stroked_box_normal
+% {\setbox\scratchbox\emptyhbox
+% \wd\scratchbox\d_framed_target_wd
+% \ht\scratchbox\d_framed_target_ht
+% \dp\scratchbox\d_framed_target_dp
+% \setbox\scratchbox\vpack \bgroup
+% \csname \??framedtop\p_framed_frame\framedparameter\c!topframe \endcsname
+% \nointerlineskip % new (needed for fences)
+% \hbox \bgroup
+% \csname \??framedleft\p_framed_frame\framedparameter\c!leftframe \endcsname
+% \box\scratchbox
+% \csname \??framedright\p_framed_frame\framedparameter\c!rightframe \endcsname
+% \egroup
+% \nointerlineskip % new (needed for fences)
+% \csname \??framedbottom\p_framed_frame\framedparameter\c!bottomframe\endcsname
+% \egroup
+% \wd\scratchbox\d_framed_target_wd
+% \ht\scratchbox\d_framed_target_ht
+% \dp\scratchbox\d_framed_target_dp
+% \box\scratchbox}
+
\def\pack_framed_stroked_box_normal
- {\setbox\scratchbox\emptyhbox
- \wd\scratchbox\d_framed_target_wd
- \ht\scratchbox\d_framed_target_ht
- \dp\scratchbox\d_framed_target_dp
- \setbox\scratchbox\vbox \bgroup
+ {\setbox\scratchbox\vpack \bgroup
\csname \??framedtop\p_framed_frame\framedparameter\c!topframe \endcsname
\nointerlineskip % new (needed for fences)
\hbox \bgroup
\csname \??framedleft\p_framed_frame\framedparameter\c!leftframe \endcsname
- \box\scratchbox
+ \novrule
+ \s!width \d_framed_target_wd
+ \s!height\d_framed_target_ht
+ \s!depth \d_framed_target_dp
\csname \??framedright\p_framed_frame\framedparameter\c!rightframe \endcsname
\egroup
\nointerlineskip % new (needed for fences)
@@ -729,8 +763,8 @@
% no overlapping rules
-\def\pack_framed_t_rules{\hbox{\kern\d_framed_linewidth\vrule\s!width\dimexpr\d_framed_target_wd-2\d_framed_linewidth\relax\s!height\d_framed_linewidth}\nointerlineskip\kern-\d_framed_linewidth}
-\def\pack_framed_b_rules{\kern-\d_framed_linewidth\nointerlineskip\hbox{\kern\d_framed_linewidth\vrule\s!width\dimexpr\d_framed_target_wd-2\d_framed_linewidth\relax\s!height\d_framed_linewidth}}
+\def\pack_framed_t_rules{\hpack{\kern\d_framed_linewidth\vrule\s!width\dimexpr\d_framed_target_wd-2\d_framed_linewidth\relax\s!height\d_framed_linewidth}\nointerlineskip\kern-\d_framed_linewidth}
+\def\pack_framed_b_rules{\kern-\d_framed_linewidth\nointerlineskip\hpack{\kern\d_framed_linewidth\vrule\s!width\dimexpr\d_framed_target_wd-2\d_framed_linewidth\relax\s!height\d_framed_linewidth}}
\def\pack_framed_r_rules{\kern-\d_framed_linewidth\vrule\s!height\dimexpr\d_framed_target_ht-\d_framed_linewidth\relax\s!depth-\d_framed_linewidth\s!width\d_framed_linewidth}
\def\pack_framed_l_rules{\vrule\s!height\dimexpr\d_framed_target_ht-\d_framed_linewidth\relax\s!depth-\d_framed_linewidth\s!width\d_framed_linewidth\kern-\d_framed_linewidth}
@@ -962,7 +996,7 @@
\ifx\p_framed_region\v!yes % maybe later named
\pack_framed_add_region
\fi
- \getparameters[\currentframed][#3]% no \expanded !
+ \setupcurrentframed[#3]%
\edef\p_framed_rulethickness{\framedparameter\c!rulethickness}% also used in backgrounds
\d_framed_frameoffset\framedparameter\c!frameoffset\relax % also used in backgrounds
\edef\p_framed_frame{\framedparameter\c!frame}%
@@ -1082,6 +1116,10 @@
\def\c!fr!analyze{fr:analyze} % private option
+\let\delayedbegstrut\relax
+\let\delayedendstrut\relax
+\let\delayedstrut \relax
+
\unexpanded\def\pack_framed_process_indeed
{\d_framed_frameoffset\framedparameter\c!frameoffset
\edef\p_framed_backgroundoffset{\framedparameter\c!backgroundoffset}%
@@ -1144,27 +1182,21 @@
\dosetraggedcommand\localformat % not that fast
\fi
%
- \csname\??framedoffsetalternative
- \ifcsname\??framedoffsetalternative\localoffset\endcsname
- \localoffset
- \else
- \s!unknown
- \fi
- \endcsname
- \csname\??framedwidthalternative
- \ifcsname\??framedwidthalternative\localwidth\endcsname
- \localwidth
- \else
- \s!unknown
- \fi
- \endcsname
- \csname\??framedheightalternative
- \ifcsname\??framedheightalternative\localheight\endcsname
- \localheight
- \else
- \s!unknown
- \fi
- \endcsname
+ \ifcsname\??framedoffsetalternative\localoffset\endcsname
+ \lastnamedcs
+ \else
+ \framed_offset_alternative_unknown
+ \fi
+ \ifcsname\??framedwidthalternative\localwidth\endcsname
+ \lastnamedcs
+ \else
+ \framed_width_alternative_unknown
+ \fi
+ \ifcsname\??framedheightalternative\localheight\endcsname
+ \lastnamedcs
+ \else
+ \framed_height_alternative_unknown
+ \fi
% the next check could move to heightalternative
\ifconditional\c_framed_has_height
% obey user set height, also downward compatible
@@ -1188,13 +1220,11 @@
% i.e. disable (colsetbackgroundproblemintechniek)
\advance\d_framed_width -2\d_framed_local_offset
\advance\d_framed_height -2\d_framed_local_offset
- \csname\??framedstrutalternative
- \ifcsname\??framedstrutalternative\localstrut\endcsname
- \localstrut
- \else
- \s!unknown
- \fi
- \endcsname
+ \ifcsname\??framedstrutalternative\localstrut\endcsname
+ \lastnamedcs
+ \else
+ \framed_offset_alternative_unknown
+ \fi
% the next check could move to strutalternative
\ifconditional\c_framed_has_strut
\let\localbegstrut\begstrut
@@ -1327,6 +1357,10 @@
{\settrue\c_framed_has_width
\d_framed_width\localwidth}
+\def\framed_width_alternative_unknown
+ {\settrue\c_framed_has_width
+ \d_framed_width\localwidth}
+
% heights
\setvalue{\??framedheightalternative\empty}%
@@ -1349,7 +1383,11 @@
{\settrue\c_framed_has_height
\d_framed_height\localheight}
-% struts
+\def\framed_height_alternative_unknown
+ {\settrue\c_framed_has_height
+ \d_framed_height\localheight}
+
+% struts (use let instead?)
\setvalue{\??framedstrutalternative\v!no}%
{\setfalse\c_framed_has_strut}
@@ -1366,6 +1404,9 @@
\setvalue{\??framedstrutalternative\s!unknown}%
{\setstrut}
+\def\framed_strut_alternative_unknown
+ {\setstrut}
+
% offsets
\setvalue{\??framedoffsetalternative\v!none}%
@@ -1402,6 +1443,13 @@
\let\defaultframeoffset\localoffset
\d_framed_local_offset\dimexpr\localoffset+\d_framed_linewidth\relax}
+\def\framed_offset_alternative_unknown
+ {\settrue \c_framed_has_offset
+ \settrue \c_framed_has_strut
+ \setfalse\c_framed_is_overlaid
+ \let\defaultframeoffset\localoffset
+ \d_framed_local_offset\dimexpr\localoffset+\d_framed_linewidth\relax}
+
% so far for alternatives
\let\pack_framed_stop_orientation\relax
@@ -1500,18 +1548,18 @@
\def\pack_framed_profile_box
{\profilegivenbox\p_profile\b_framed_normal
- \setbox\b_framed_normal\vbox{\unvbox\b_framed_normal}}
+ \setbox\b_framed_normal\vpack{\unvbox\b_framed_normal}}
\unexpanded\def\pack_framed_finish
{%\pack_framed_stop_orientation % hm, wrong place ! should rotate the result (after reshape) .. moved down
\pack_framed_locator_before\p_framed_location
\ifconditional\c_framed_has_format
- \ifconditional\c_framed_has_height \else
- \edef\p_profile{\framedparameter\c!profile}%
- \ifx\p_profile\empty\else
- \pack_framed_profile_box
- \fi
- \fi
+ %\ifconditional\c_framed_has_height \else
+ % \edef\p_profile{\framedparameter\c!profile}%
+ % \ifx\p_profile\empty\else
+ % \pack_framed_profile_box
+ % \fi
+ %\fi
\ifx\p_framed_autowidth\v!force
\pack_framed_finish_a
\else\ifx\localwidth\v!fit
@@ -1525,7 +1573,14 @@
\else
\pack_framed_finish_c
\fi\fi\fi
+ \ifconditional\c_framed_has_height \else
+ \edef\p_profile{\framedparameter\c!profile}%
+ \ifx\p_profile\empty\else
+ \pack_framed_profile_box
+ \fi
+ \fi
\ifconditional\page_postprocessors_needed_box
+ % quite late
\page_postprocessors_linenumbers_box\b_framed_normal
\fi
\else
@@ -1666,14 +1721,14 @@
\installframedlocator \v!hanging % best with strut=no *1* / see mail to list by SB
{}
{\scratchdimen\ht\b_framed_normal
- \setbox\b_framed_normal\hbox{\lower\scratchdimen\box\b_framed_normal}%
+ \setbox\b_framed_normal\hpack{\lower\scratchdimen\box\b_framed_normal}%
\dp\b_framed_normal\scratchdimen
\ht\b_framed_normal\zeropoint
\box\b_framed_normal}
\installframedlocator \v!depth % *1*
{}
- {\setbox\b_framed_normal\hbox{\lower\strutdp\box\b_framed_normal}%
+ {\setbox\b_framed_normal\hpack{\lower\strutdp\box\b_framed_normal}%
\ht\b_framed_normal\dimexpr\ht\b_framed_normal-\strutdp\relax
\dp\b_framed_normal\strutdp
\box\b_framed_normal}
@@ -1681,7 +1736,7 @@
\installframedlocator \v!height % *1*
{}
{\scratchdimen\dimexpr \ht\b_framed_normal - \strutht \relax
- \setbox\b_framed_normal\hbox{\lower\scratchdimen\box\b_framed_normal}%
+ \setbox\b_framed_normal\hpack{\lower\scratchdimen\box\b_framed_normal}%
\dp\b_framed_normal\dimexpr\ht\b_framed_normal-\strutht\relax
\ht\b_framed_normal\strutht
\box\b_framed_normal}
@@ -1689,22 +1744,22 @@
\installframedlocator \v!high
{}
{\pack_framed_locater_set\strutht
- \setbox\b_framed_normal\hbox{\lower\d_framed_locator_dp\box\b_framed_normal}%
+ \setbox\b_framed_normal\hpack{\lower\d_framed_locator_dp\box\b_framed_normal}%
\ht\b_framed_normal\strutht
\dp\b_framed_normal\strutdp
- \hbox{\box\b_framed_normal}}
+ \hpack{\box\b_framed_normal}}
\installframedlocator \v!line
{}
- {\setbox\b_framed_normal\hbox{\lower.5\ht\b_framed_normal\box\b_framed_normal}%
+ {\setbox\b_framed_normal\hpack{\lower.5\ht\b_framed_normal\box\b_framed_normal}%
\ht\b_framed_normal.5\lineheight
\dp\b_framed_normal.5\lineheight
- \hbox{\box\b_framed_normal}}
+ \hpack{\box\b_framed_normal}}
\installframedlocator \v!low
{}
{\pack_framed_locater_set\strutdp
- \setbox\b_framed_normal\hbox{\lower\d_framed_locator_ht\box\b_framed_normal}%
+ \setbox\b_framed_normal\hpack{\lower\d_framed_locator_ht\box\b_framed_normal}%
\ht\b_framed_normal\strutht
\dp\b_framed_normal\strutdp
\box\b_framed_normal}
@@ -1712,18 +1767,18 @@
\installframedlocator \v!top
{}
{\pack_framed_locater_set\strutht
- \setbox\b_framed_normal\hbox{\lower\d_framed_locator_dp\box\b_framed_normal}%
+ \setbox\b_framed_normal\hpack{\lower\d_framed_locator_dp\box\b_framed_normal}%
\ht\b_framed_normal\d_framed_locator_ht
\dp\b_framed_normal\d_framed_locator_dp
- \hbox{\box\b_framed_normal}}
+ \hpack{\box\b_framed_normal}}
\installframedlocator \v!middle
{}
{\scratchdimen.5\ht\b_framed_normal
- \setbox\b_framed_normal\hbox{\lower\scratchdimen\box\b_framed_normal}%
+ \setbox\b_framed_normal\hpack{\lower\scratchdimen\box\b_framed_normal}%
\ht\b_framed_normal\scratchdimen
\dp\b_framed_normal\scratchdimen
- \hbox{\box\b_framed_normal}}
+ \hpack{\box\b_framed_normal}}
\installframedlocator \v!lohi
{\pack_framed_locator_before\v!middle}
@@ -1732,10 +1787,10 @@
\installframedlocator \v!bottom
{}
{\pack_framed_locater_set\strutdp
- \setbox\b_framed_normal\hbox{\lower\d_framed_locator_ht\box\b_framed_normal}%
+ \setbox\b_framed_normal\hpack{\lower\d_framed_locator_ht\box\b_framed_normal}%
\ht\b_framed_normal\d_framed_locator_dp
\dp\b_framed_normal\d_framed_locator_ht
- \hbox{\box\b_framed_normal}}
+ \hpack{\box\b_framed_normal}}
\installframedlocator \v!keep % retains height/depth
{\pack_framed_remove_depth}
@@ -1752,7 +1807,7 @@
\d_framed_original_ht\ht\b_framed_normal
\d_framed_original_dp\dp\b_framed_normal
\ifzeropt\d_framed_original_dp\else
- \setbox\b_framed_normal\hbox{\raise\d_framed_original_dp\box\b_framed_normal}%
+ \setbox\b_framed_normal\hpack{\raise\d_framed_original_dp\box\b_framed_normal}%
\fi
\wd\b_framed_normal\d_framed_original_wd
\ht\b_framed_normal\dimexpr\d_framed_original_ht+\d_framed_original_dp\relax
@@ -1760,7 +1815,7 @@
\def\pack_framed_restore_depth
{\ifzeropt\d_framed_original_dp \else
- \setbox\b_framed_normal\hbox{\lower\d_framed_original_dp\box\b_framed_normal}%
+ \setbox\b_framed_normal\hpack{\lower\d_framed_original_dp\box\b_framed_normal}%
\fi
\wd\b_framed_normal\d_framed_original_wd
\ht\b_framed_normal\d_framed_original_ht
@@ -1806,7 +1861,7 @@
\fi}
\def\pack_framed_stop_orientation_indeed
- {\setbox\b_framed_normal\hbox{\dorotatebox\p_framed_orientation\hbox{\box\b_framed_normal}}%
+ {\setbox\b_framed_normal\hpack{\dorotatebox\p_framed_orientation\hpack{\box\b_framed_normal}}%
\d_framed_height\ht\b_framed_normal
\d_framed_width \wd\b_framed_normal}
@@ -1922,7 +1977,7 @@
\installframedlocator \v!mathematics
{}
{\lower\dimexpr\MPy\pack_framed_mc_two-\MPy\pack_framed_mc_one\relax
- \hbox{\xypos\pack_framed_mc_one\box\b_framed_normal}}
+ \hpack{\xypos\pack_framed_mc_one\box\b_framed_normal}}
\definemathframed[mframed]
\definemathframed[inmframed][\c!location=\v!low]
@@ -1985,13 +2040,13 @@
\ifzeropt\d_framed_boffset\else \advance\d_framed_height-\d_framed_boffset \settrue\c_framed_has_extra_offset \fi}
\def\pack_framed_apply_extra_offsets
- {\setbox\b_framed_normal\vbox\bgroup
+ {\setbox\b_framed_normal\vpack\bgroup
\advance\d_framed_toffset\d_framed_applied_offset
\advance\d_framed_boffset\d_framed_applied_offset
\advance\d_framed_loffset\d_framed_applied_offset
\advance\d_framed_roffset\d_framed_applied_offset
\kern\d_framed_toffset
- \hbox\bgroup
+ \hpack\bgroup
\kern\d_framed_loffset
\box\b_framed_normal
\kern\d_framed_roffset
@@ -2000,9 +2055,9 @@
\egroup}
\def\pack_framed_widen_box
- {\setbox\b_framed_normal\vbox
+ {\setbox\b_framed_normal\vpack
{\kern\d_framed_applied_offset
- \hbox{\kern\d_framed_applied_offset\box\b_framed_normal\kern\d_framed_applied_offset}%
+ \hpack{\kern\d_framed_applied_offset\box\b_framed_normal\kern\d_framed_applied_offset}%
\kern\d_framed_applied_offset}}
%D Let's hope that the next few examples show us enough of what needs to be
@@ -2087,14 +2142,14 @@
\def\dodoformatonelinerbox
{\afterassignment\redoformatonelinerbox
- \setbox\nextbox\hbox}
+ \setbox\nextbox\hbox} % maybe \hpack
\def\redoformatonelinerbox
{\aftergroup\dododoformatonelinerbox
\ignorespaces}
\def\dododoformatonelinerbox
- {\hbox to \hsize
+ {\hbox to \hsize % maybe \hpack
{\ifcase\raggedstatus\or\hss\or\hss \fi
\unhbox\nextbox \removeunwantedspaces
\ifcase\raggedstatus\or \or\hss\or\hss\fi}%
@@ -2440,9 +2495,9 @@
\par
\kern-\d_framed_linewidth
\dontleavehmode
- \hbox to \zeropoint{\normalhss\vrule\s!height\d_framed_linewidth\s!depth\zeropoint\s!width\scratchwidth}%
+ \hpack to \zeropoint{\normalhss\vrule\s!height\d_framed_linewidth\s!depth\zeropoint\s!width\scratchwidth}%
\hfill
- \hbox to \zeropoint{\vrule\s!height\d_framed_linewidth\s!depth\zeropoint\s!width\scratchwidth\normalhss}%
+ \hpack to \zeropoint{\vrule\s!height\d_framed_linewidth\s!depth\zeropoint\s!width\scratchwidth\normalhss}%
\par
\nointerlineskip
\kern\scratchoffset
@@ -2463,7 +2518,7 @@
\dimen\scratchdepth \dimexpr\strutdp+\scratchoffset\relax
\fi
\unskip
- \setbox\scratchbox\hbox
+ \setbox\scratchbox\hpack
{\kern\scratchoffset
\vrule\s!height\dimen\scratchheight\s!depth\dimen\scratchdepth\s!width\d_framed_linewidth
\kern\scratchoffset}%
@@ -2835,9 +2890,9 @@
\appendtoks
\ifcsname\??regularframedlevel\currentframed\endcsname
- % already defined, keeps settings
+ % already defined, keeps settings
\else
- \expandafter\newcount\csname\??regularframedlevel\currentframed\endcsname
+ \expandafter\newcount\csname\??regularframedlevel\currentframed\endcsname
\fi
\to \everypresetframed
@@ -2850,7 +2905,8 @@
\unexpanded\def\pack_framed_defined_process[#1]% official (not much checking, todo: parent)
{\bgroup
\ifcsname\??regularframedlevel#1\endcsname
- \expandafter\let\expandafter\c_pack_framed_temp\csname\??regularframedlevel#1\endcsname
+ %\expandafter\let\expandafter\c_pack_framed_temp\csname\??regularframedlevel#1\endcsname
+ \expandafter\let\expandafter\c_pack_framed_temp\lastnamedcs
\else
\let\c_pack_framed_temp\c_temp_framed_crap
\fi
@@ -2944,7 +3000,7 @@
\fi}
\def\pack_framed_start_content_indeed
- {\setbox\b_framed_normal\hbox\bgroup
+ {\setbox\b_framed_normal\hbox\bgroup % maybe \hpack
\setlocalhsize
\hsize\localhsize
\scratchleftoffset \framedcontentparameter\c!leftoffset \relax
@@ -2998,4 +3054,13 @@
\c!foregroundstyle=\framedparameter\c!style,
\c!foregroundcolor=\framedparameter\c!color]
+%D Bonus (as defined in \type {pack-rul.lua}):
+%D
+%D \starttyping
+%D \setbox\scratchbox\vbox{a\par aa\par aaa\par}
+%D \the\dimexpr\themaxboxwidth\scratchbox\relax
+%D \stoptyping
+
+\let\themaxboxwidth\clf_themaxboxwidth
+
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/page-app.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-app.mkiv
index 2e81f75371f..cdb964ab06e 100644
--- a/Master/texmf-dist/tex/context/base/page-app.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-app.mkiv
@@ -86,7 +86,7 @@
\egroup
% finalize
\doif{\fittingpageparameter\c!margin}\v!page
- {\setbox\b_page_fitting\hbox\bgroup
+ {\setbox\b_page_fitting\hpack\bgroup
\offsetbox
[\c!leftoffset=\backspace,
\c!rightoffset=\cutspace,
@@ -95,7 +95,7 @@
{\box\b_page_fitting}%
\egroup}%
\doifsomething{\fittingpageparameter\c!scale}
- {\setbox\b_page_fitting\hbox\bgroup
+ {\setbox\b_page_fitting\hpack\bgroup
\scale[\c!scale=\fittingpageparameter\c!scale]{\box\b_page_fitting}%
\egroup}%
\ifdim\ht\b_page_fitting=\zeropoint
diff --git a/Master/texmf-dist/tex/context/base/page-bck.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-bck.mkiv
index 01de48e8cda..b44910bbe6c 100644
--- a/Master/texmf-dist/tex/context/base/page-bck.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-bck.mkiv
@@ -57,7 +57,8 @@
\unexpanded\def\page_backgrounds_check_background
{\ifcsname\??framed\currentotrbackground:\c!background\endcsname
- \edef\page_background_temp{\csname\??framed\currentotrbackground:\c!background\endcsname}%
+ %\edef\page_background_temp{\csname\??framed\currentotrbackground:\c!background\endcsname}%
+ \edef\page_background_temp{\lastnamedcs}%
\ifx\page_background_temp\empty
\expandafter\expandafter\expandafter\page_backgrounds_check_frame
\else
@@ -69,7 +70,8 @@
\def\page_backgrounds_check_frame
{\ifcsname\??framed\currentotrbackground:\c!frame\endcsname
- \edef\page_background_temp{\csname\??framed\currentotrbackground:\c!frame\endcsname}%
+ %\edef\page_background_temp{\csname\??framed\currentotrbackground:\c!frame\endcsname}%
+ \edef\page_background_temp{\lastnamedcs}%
\ifx\page_background_temp\v!on
\page_backgrounds_set_yes
\else
@@ -81,7 +83,8 @@
\def\page_backgrounds_check_leftframe
{\ifcsname\??framed\currentotrbackground:\c!leftframe\endcsname
- \edef\page_background_temp{\csname\??framed\currentotrbackground:\c!leftframe\endcsname}%
+ %\edef\page_background_temp{\csname\??framed\currentotrbackground:\c!leftframe\endcsname}%
+ \edef\page_background_temp{\lastnamedcs}%
\ifx\page_background_temp\v!on
\page_backgrounds_set_yes
\else
@@ -93,7 +96,8 @@
\def\page_backgrounds_check_rightframe
{\ifcsname\??framed\currentotrbackground:\c!rightframe\endcsname
- \edef\page_background_temp{\csname\??framed\currentotrbackground:\c!rightframe\endcsname}%
+ %\edef\page_background_temp{\csname\??framed\currentotrbackground:\c!rightframe\endcsname}%
+ \edef\page_background_temp{\lastnamedcs}%
\ifx\page_background_temp\v!on
\page_backgrounds_set_yes
\else
@@ -105,7 +109,8 @@
\def\page_backgrounds_check_topframe
{\ifcsname\??framed\currentotrbackground:\c!topframe\endcsname
- \edef\page_background_temp{\csname\??framed\currentotrbackground:\c!topframe\endcsname}%
+ %\edef\page_background_temp{\csname\??framed\currentotrbackground:\c!topframe\endcsname}%
+ \edef\page_background_temp{\lastnamedcs}%
\ifx\page_background_temp\v!on
\page_backgrounds_set_yes
\else
@@ -117,7 +122,8 @@
\def\page_backgrounds_check_bottomframe
{\ifcsname\??framed\currentotrbackground:\c!bottomframe\endcsname
- \edef\page_background_temp{\csname\??framed\currentotrbackground:\c!bottomframe\endcsname}%
+ %\edef\page_background_temp{\csname\??framed\currentotrbackground:\c!bottomframe\endcsname}%
+ \edef\page_background_temp{\lastnamedcs}%
\ifx\page_background_temp\v!on
\page_backgrounds_set_yes
\else
@@ -176,7 +182,7 @@
\doprocesslocalsetups\p_page_backgrounds_setups % should not produce funny spaces !
\fi
% #2 has the right dimensions already
- \setbox#2\hbox{\localbackgroundframed{\??layoutbackgrounds#1}#1#2}}% a real framed (including foreground)
+ \setbox#2\hpack{\localbackgroundframed{\??layoutbackgrounds#1}#1#2}}% a real framed (including foreground)
%D There are quite some backgrounds. At the bottom layer, there is the {\em
@@ -277,7 +283,7 @@
\def\page_backgrounds_add_to_main#1% todo: dimension spec
{\ifconditional\c_page_backgrounds_some
\page_backgrounds_set_boxes
- \setbox#1\vbox
+ \setbox#1\vpack
{\offinterlineskip
\doifelsemarginswap{\copy\leftbackground}{\copy\rightbackground}%
\box#1}%
@@ -341,7 +347,7 @@
\newconditional\swapbackgroundmargins \settrue\swapbackgroundmargins
\def\page_backgrounds_set_box#1% #2%
- {\global\setbox#1\vbox
+ {\global\setbox#1\vpack
{\dontcomplain
\swapmargins
\ifconditional\swapbackgroundmargins
@@ -378,8 +384,8 @@
\smashbox#1}
\def\page_backgrounds_set_box_row#1#2% maybe helper
- {\setbox\scratchbox\vbox to #2
- \bgroup\hbox\bgroup
+ {\setbox\scratchbox\vpack to #2
+ \bgroup\hpack\bgroup
\goleftonpage
\ifdim\leftedgewidth>\zeropoint
\ifcsname\??layoutbackgrounds#1\v!leftedge\endcsname
@@ -446,7 +452,7 @@
\ht\scratchbox#2}
\def\page_backgrounds_set_box_cell_yes#1#2%
- {\setbox\scratchbox\vbox to #2{\vss\hbox to#1{\hss\p_page_backgrounds_command\hss}\vss}%
+ {\setbox\scratchbox\vpack to #2{\vss\hpack to#1{\hss\p_page_backgrounds_command\hss}\vss}%
\dp\scratchbox\zeropoint}
%D The background mechanism is quite demanding in terms or resources. We used to
diff --git a/Master/texmf-dist/tex/context/base/page-box.mkvi b/Master/texmf-dist/tex/context/base/mkiv/page-box.mkvi
index 8f5647a14bc..fa85aef6898 100644
--- a/Master/texmf-dist/tex/context/base/page-box.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-box.mkvi
@@ -46,10 +46,10 @@
\v_page_target_left}
\def\page_boxes_apply_center_indeed#box% we could test for a difference (saves packing)
- {\setbox#box\vbox to \printpaperheight
+ {\setbox#box\vpack to \printpaperheight
{\v_page_target_top
\v_page_target_top_fill
- \hbox to \printpaperwidth
+ \hpack to \printpaperwidth
{\ifconditional\c_page_target_print_doublesided
\doifbothsides
{\page_boxes_apply_center_indeed_l_r#box}%
@@ -77,7 +77,7 @@
{\scratchwidth \wd#box%
\scratchheight\ht#box%
\scratchdepth \dp#box%
- \setbox#box\vbox
+ \setbox#box\vpack
{\offinterlineskip
\vskip\topoffset
\hskip\doifbothsides\backoffset\backoffset{-\backoffset}%
@@ -96,10 +96,10 @@
\fi\fi}
\def\page_boxes_apply_replicate_indeed#box%
- {\setbox#box\vbox
+ {\setbox#box\vpack
{\offinterlineskip
\dorecurse{\layoutparameter\c!ny}
- {\hbox{\dorecurse{\layoutparameter\c!nx}{\copy#box\kern\layoutparameter\c!dx}\unskip}%
+ {\hpack{\dorecurse{\layoutparameter\c!nx}{\copy#box\kern\layoutparameter\c!dx}\unskip}%
\vskip\layoutparameter\c!dy}
\unskip}}
@@ -114,12 +114,12 @@
\fi}
\def\page_boxes_apply_orientate_indeed#odd#even#box%
- {\setbox#box\vbox
+ {\setbox#box\vpack
{\edef\somerotation{\number\ifdoublesided\ifodd\realpageno#odd\else#even\fi\else#odd\fi}%
- \dorotatebox\somerotation\hbox{\box#box}}}
+ \dorotatebox\somerotation\hpack{\box#box}}}
\def\page_boxes_apply_mirror#box%
- {\setbox#box\vbox{\mirror{\box#box}}}
+ {\setbox#box\vpack{\mirror{\box#box}}}
\def\page_boxes_apply_mirror_paper#box{\ifconditional\c_page_target_paper_mirror\page_boxes_apply_mirror{#box}\fi}
\def\page_boxes_apply_mirror_print#box{\ifconditional\c_page_target_print_mirror\page_boxes_apply_mirror{#box}\fi}
@@ -152,7 +152,7 @@
\fi}
\def\page_boxes_apply_scale_indeed#sx#sy#box%
- {\setbox#box\vbox{\scale[\c!sx=#sx,\c!sy=#sy]{\box#box}}% can be a fast one
+ {\setbox#box\vpack{\scale[\c!sx=#sx,\c!sy=#sy]{\box#box}}% can be a fast one
\paperwidth #sx\paperwidth
\paperheight#sy\paperheight}
@@ -189,7 +189,7 @@
\scratchwidth \wd#box%
\scratchheight\ht#box%
\scratchdepth \dp#box%
- \setbox#box\hbox
+ \setbox#box\hpack
{\advance\scratchheight\dimexpr\scratchdepth+2\scratchoffset\relax
\advance\scratchwidth \scratchoffset
\ifconditional#right\relax
@@ -198,7 +198,7 @@
\else
\scratchdimen\zeropoint
\fi
- \lower\scratchoffset\hbox
+ \lower\scratchoffset\hpack
{\clip
[\c!hoffset=\scratchdimen,
\c!voffset=-\scratchoffset,
@@ -221,7 +221,7 @@
{\scratchwidth \wd#box%
\scratchheight\ht#box%
\scratchdepth \dp#box%
- \setbox#box\hbox
+ \setbox#box\hpack
{\advance\scratchheight\dimexpr\scratchdepth+2\scratchoffset\relax
\advance\scratchwidth \scratchoffset
\doifbothsides
@@ -231,7 +231,7 @@
{\scratchdimen\zeropoint}
{\scratchdimen-\scratchoffset
\kern\scratchdimen}%
- \lower\scratchoffset\hbox
+ \lower\scratchoffset\hpack
{\clip
[\c!hoffset=\scratchdimen,
\c!voffset=-\scratchoffset,
@@ -245,7 +245,7 @@
% nearly always some displacement so no speedup test needed
\def\page_boxes_apply_offsets#1%
- {\setbox#1\vbox to \paperheight
+ {\setbox#1\vpack to \paperheight
{\hsize\paperwidth
\vskip\topspace
\doifbothsides
@@ -282,9 +282,9 @@
\def\page_areas_register_boxed#1%
{\begingroup
- \setbox\scratchbox\vbox{#1}%
+ \setbox\scratchbox\vpack{#1}%
\wd\scratchbox\makeupwidth % somehow a space creeps in
- \vbox{\page_areas_registered_box00\scratchbox}% 0 0 will go
+ \vpack{\page_areas_registered_box00\scratchbox}% 0 0 will go
\endgroup}
% \def\page_areas_register_direct#1%
diff --git a/Master/texmf-dist/tex/context/base/page-brk.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-brk.mkiv
index f9c93305293..eabcb74f877 100644
--- a/Master/texmf-dist/tex/context/base/page-brk.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-brk.mkiv
@@ -58,15 +58,16 @@
\def\page_breaks_handle_step#1%
{\edef\page_breaks_current_option{#1}% can be used in handler
\ifcsname\??pagebreakmethod\page_breaks_current_option\endcsname
- \csname\??pagebreakmethod\page_breaks_current_option\endcsname
+ \lastnamedcs
\else\ifcsname\??pagebreaks\page_breaks_current_option\endcsname
- \expandafter\page_breaks_handle\csname\??pagebreaks\page_breaks_current_option\endcsname
+ \expandafter\page_breaks_handle\lastnamedcs
\else
- \csname\??pagebreakmethod\s!unknown\endcsname
+ \page_breaks_unknown
\fi\fi}
\def\page_breaks_handle_direct#1%
- {\csname\??pagebreakmethod#1\endcsname}
+ %{\csname\??pagebreakmethod#1\endcsname}
+ {\begincsname\??pagebreakmethod#1\endcsname}
\unexpanded\def\installpagebreakmethod#1#2% low level definer
{\setvalue{\??pagebreakmethod#1}{#2}}
@@ -112,6 +113,20 @@
\endgroup
\fi}
+\unexpanded\def\usepageparameter#1%
+ {\edef\m_page_breaks_asked{#1\c!page}%
+ \ifx\m_page_breaks_asked\empty\else
+ \firstargumenttrue
+ \page_breaks_process[\m_page_breaks_asked]%
+ \fi}
+
+\unexpanded\def\dousepageparameter#1%
+ {\edef\m_page_breaks_asked{#1}%
+ \ifx\m_spac_align_asked\empty\else
+ \firstargumenttrue
+ \page_breaks_process[\m_page_breaks_asked]%
+ \fi}
+
\unexpanded\def\resetpagebreak % used elsewhere too
{\global\settrue\c_page_breaks_enabled}
@@ -133,7 +148,7 @@
\page[\v!empty]
\endgroup}
-\installpagebreakmethod \s!unknown
+\unexpanded\def\page_breaks_unknown % how often called ?
{\doifelseinstring{+}\page_breaks_current_option
{\page_otr_flush_all_floats
\page_otr_command_next_page
@@ -149,6 +164,9 @@
\fi}}
{}}}
+\installpagebreakmethod \s!unknown
+ {\page_breaks_unknown}
+
\installpagebreakmethod \s!default
{} % do nothing if empty
@@ -266,6 +284,7 @@
\newtoks\everybeforecolumnbreak
\newtoks\everyaftercolumnbreak
+\newtoks\everysynchronizecolumn
\let\page_breaks_columns_current_option \empty
\let\page_breaks_columns_current_options\empty
@@ -277,15 +296,17 @@
\def\page_breaks_columns_handle_step#1%
{\edef\page_breaks_columns_current_option{#1}%
\ifcsname\??columnbreakmethod\currentoutputroutine:\page_breaks_columns_current_option\endcsname
- \csname\??columnbreakmethod\currentoutputroutine:\page_breaks_columns_current_option\endcsname
+ \lastnamedcs
\else\ifcsname\??columnbreaks\page_breaks_columns_current_option\endcsname
- \expandafter\csname\page_breaks_columns_handle\??columnbreaks\page_breaks_columns_current_option\endcsname
- \else
- \csname\??columnbreakmethod\currentoutputroutine:\s!unknown\endcsname
- \fi\fi}
+ %\expandafter\csname\page_breaks_columns_handle\??columnbreaks\page_breaks_columns_current_option\endcsname
+ \lastnamedcs
+ \else\ifcsname\??columnbreakmethod\currentoutputroutine:\s!unknown\endcsname
+ \lastnamedcs
+ \fi\fi\fi}
\def\page_breaks_columns_handle_direct#1%
- {\csname\??columnbreakmethod\currentoutputroutine:#1\endcsname}
+ %{\csname\??columnbreakmethod\currentoutputroutine:#1\endcsname}
+ {\begincsname\??columnbreakmethod\currentoutputroutine:#1\endcsname}
\unexpanded\def\installcolumnbreakmethod#1#2#3% #1=otr-id #2=tag #3=action
{\setvalue{\??columnbreakmethod#1:#2}{#3}}
@@ -314,7 +335,13 @@
\fi
\relax
\the\everyaftercolumnbreak
- \endgroup}
+ \endgroup
+ % outside group e.g. setting hsize
+ \the\everysynchronizecolumn}
+
+\appendtoks
+ \page_otr_command_set_hsize
+\to \everysynchronizecolumn
%D Test page breaks.
@@ -414,6 +441,8 @@
\def\page_check[#1][#2]%
{\relax % needed before \if
\endgraf
+ \triggerpagebuilder
+ \relax
\ifconditional\c_page_breaks_enabled
\begingroup
\edef\currentpagechecker{#1}%
diff --git a/Master/texmf-dist/tex/context/base/page-col.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-col.mkiv
index 14b5124210f..14b5124210f 100644
--- a/Master/texmf-dist/tex/context/base/page-col.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-col.mkiv
diff --git a/Master/texmf-dist/tex/context/base/page-com.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-com.mkiv
index 0ff8e3b54e4..dfec3e25d30 100644
--- a/Master/texmf-dist/tex/context/base/page-com.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-com.mkiv
@@ -54,7 +54,7 @@
\expandnamespacemacro\??pagecommentstates\p_page_commands_state\v!none
\to \everysetuppagecomment
-\ifdefined\scrn_canvas_synchronize_simple
+% \ifdefined\scrn_canvas_synchronize_simple
\appendtoks
\ifx\p_page_commands_state\v!start
@@ -64,7 +64,7 @@
\fi
\to \everyshipout
-\fi
+% \fi
\setvalue{\??pagecommentstates\v!start}%
{\d_page_comments_offset \directpagecommentparameter\c!offset \relax
@@ -114,7 +114,7 @@
{}% \setuppapersize[\c!bottom=,\c!top=,\c!left=,\c!right=]}
\unexpanded\def\page_comments_top_bottom
- {\vbox to \printpaperheight
+ {\vpack to \printpaperheight
{%\forgetall
\hsize\printpaperwidth\relax
\ifx\p_page_commands_location\v!bottom
@@ -140,7 +140,7 @@
\fi}}
\unexpanded\def\page_comments_left_right
- {\hbox to \printpaperwidth
+ {\hpack to \printpaperwidth
{\ifx\p_page_commands_location\v!right
\hskip\dimexpr\paperwidth+\d_page_comments_distance+\d_page_comments_offset\relax
\else
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-cst.lua b/Master/texmf-dist/tex/context/base/mkiv/page-cst.lua
new file mode 100644
index 00000000000..782bbebfce8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-cst.lua
@@ -0,0 +1,1454 @@
+if not modules then modules = { } end modules ["page-cst"] = {
+ version = 1.001,
+ comment = "companion to page-cst.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- todo: check what is used
+
+local next, type = next, type
+local ceil, floor, odd, round = math.ceil, math.floor, math.odd, math.round
+local lower = string.lower
+local copy = table.copy
+
+local trace_state = false trackers.register("columnsets.trace", function(v) trace_state = v end)
+local trace_detail = false trackers.register("columnsets.detail", function(v) trace_detail = v end)
+local trace_cells = false trackers.register("columnsets.cells", function(v) trace_cells = v end)
+
+local report = logs.reporter("column sets")
+
+local setmetatableindex = table.setmetatableindex
+
+local properties = nodes.properties
+
+local nodecodes = nodes.nodecodes
+local gluecodes = nodes.gluecodes
+local rulecodes = nodes.rulecodes
+
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local kern_code = nodecodes.kern
+local glue_code = nodecodes.glue
+local penalty_code = nodecodes.penalty
+local insert_code = nodecodes.ins
+local mark_code = nodecodes.mark
+local rule_code = nodecodes.rule
+
+local topskip_code = gluecodes.topskip
+local lineskip_code = gluecodes.lineskip
+local baselineskip_code = gluecodes.baselineskip
+local userskip_code = gluecodes.userskip
+
+local nuts = nodes.nuts
+local tonode = nuts.tonode
+local tonut = nuts.tonut
+
+local hpack = nuts.hpack
+local vpack = nuts.vpack
+local freenode = nuts.free
+local flushlist = nuts.flush_list
+local removenode = nuts.remove
+
+local getfield = nuts.getfield
+local setfield = nuts.setfield
+local setlink = nuts.setlink
+local setlist = nuts.setlist
+local setnext = nuts.setnext
+local setprev = nuts.setprev
+local setsubtype = nuts.setsubtype
+local setbox = nuts.setbox
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getid = nuts.getid
+local getlist = nuts.getlist
+local getsubtype = nuts.getsubtype
+local takebox = nuts.takebox
+local takelist = nuts.takelist
+local splitbox = nuts.splitbox
+local getskip = nuts.getskip
+local getattribute = nuts.getattribute
+local copylist = nuts.copy_list
+
+local getbox = nuts.getbox
+local getcount = tex.getcount
+local getdimen = tex.getdimen
+
+local texsetbox = tex.setbox
+local texsetcount = tex.setcount
+local texsetdimen = tex.setdimen
+
+local theprop = nuts.theprop
+
+local nodepool = nuts.pool
+
+local new_hlist = nodepool.hlist
+local new_vlist = nodepool.vlist
+local new_kern = nodepool.kern
+local new_trace_rule = nodepool.rule
+local new_empty_rule = nodepool.emptyrule
+
+local context = context
+local implement = interfaces.implement
+
+local variables = interfaces.variables
+local v_here = variables.here
+local v_fixed = variables.fixed
+local v_top = variables.top
+local v_bottom = variables.bottom
+local v_repeat = variables["repeat"]
+local v_left = variables.left
+local v_right = variables.right
+local v_yes = variables.yes
+local v_page = variables.page
+local v_first = variables.first
+local v_last = variables.last
+local v_wide = variables.wide
+
+pagebuilders = pagebuilders or { } -- todo: pages.builders
+pagebuilders.columnsets = pagebuilders.columnsets or { }
+local columnsets = pagebuilders.columnsets
+
+local data = { [""] = { } }
+
+-- todo: use state
+
+local function setstate(t,start)
+ if start or not t.firstcolumn then
+ t.firstcolumn = odd(getcount("realpageno")) and 1 or 2
+ end
+ if t.firstcolumn > 1 then
+ t.firstcolumn = 1
+ t.lastcolumn = t.nofleft
+ t.state = "left"
+ else
+ t.firstcolumn = t.nofleft + 1
+ t.lastcolumn = t.firstcolumn + t.nofright - 1
+ t.state = "right"
+ end
+ t.currentcolumn = t.firstcolumn
+ t.currentrow = 1
+end
+
+function columnsets.define(t)
+ local name = t.name
+ local nofleft = t.nofleft or 1
+ local nofright = t.nofright or 1
+ local nofcolumns = nofleft + nofright
+ local dataset = data[name] or { }
+ data[name] = dataset
+ dataset.nofleft = nofleft
+ dataset.nofright = nofright
+ dataset.nofcolumns = nofcolumns
+ dataset.nofrows = t.nofrows or 1
+ dataset.distance = t.distance or getdimen("bodyfontsize")
+ dataset.maxwidth = t.maxwidth or getdimen("makeupwidth")
+ dataset.lineheight = t.lineheight or getdimen("globalbodyfontstrutheight")
+ dataset.linedepth = t.linedepth or getdimen("globalbodyfontstrutdepth")
+ --
+ dataset.cells = { }
+ dataset.currentcolumn = 1
+ dataset.currentrow = 1
+ --
+ dataset.lines = dataset.lines or setmetatableindex("table")
+ dataset.start = dataset.start or setmetatableindex("table")
+ --
+ dataset.page = 1
+ --
+ local distances = dataset.distances or setmetatableindex(function(t,k)
+ return dataset.distance
+ end)
+ dataset.distances = distances
+ --
+ local widths = dataset.widths or setmetatableindex(function(t,k)
+ return dataset.width
+ end)
+ dataset.widths = widths
+ --
+ local width = t.width
+ if not width or width == 0 then
+ local dl = 0
+ local dr = 0
+ for i=1,nofleft-1 do
+ dl = dl + distances[i]
+ end
+ for i=1,nofright-1 do
+ dr = dr + distances[nofleft+i]
+ end
+ local nl = nofleft
+ local nr = nofright
+ local wl = dataset.maxwidth
+ local wr = wl
+ for i=1,nofleft do
+ local w = rawget(widths,i)
+ if w then
+ nl = nl - 1
+ wl = wl - w
+ end
+ end
+ for i=1,nofright do
+ local w = rawget(widths,nofleft+i)
+ if w then
+ nr = nr - 1
+ wr = wr - w
+ end
+ end
+ dl = (wl - dl) / nl
+ dr = (wr - dr) / nr
+ if dl > dr then
+ report("using %s page column width %p in columnset %a","right",dr,name)
+ width = dr
+ elseif dl < dr then
+ report("using %s page column width %p in columnset %a","left",dl,name)
+ width = dl
+ else
+ width = dl
+ end
+ end
+ -- report("width %p, nleft %i, nright %i",width,nofleft,nofright)
+ width = round(width)
+ dataset.width = width
+ local spans = { }
+ dataset.spans = spans
+ for i=1,nofleft do
+ local s = { }
+ local d = 0
+ for j=1,nofleft-i+1 do
+ d = d + width
+ s[j] = round(d)
+ d = d + distances[j]
+ end
+ spans[i] = s
+ end
+ for i=1,nofright do
+ local s = { }
+ local d = 0
+ for j=1,nofright-i+1 do
+ d = d + width
+ s[j] = round(d)
+ d = d + distances[j]
+ end
+ spans[nofleft+i] = s
+ end
+ --
+ local spreads = copy(spans)
+ dataset.spreads = spreads
+ local gap = 2 * getdimen("backspace")
+ for l=1,nofleft do
+ local s = spreads[l]
+ local n = #s
+ local o = s[n] + gap
+ for r=1,nofright do
+ n = n + 1
+ s[n] = s[r] + o
+ end
+ end
+ --
+ texsetdimen("d_page_grid_column_width",dataset.width)
+ --
+ setstate(dataset,true)
+ --
+ return dataset
+end
+
+local function check(dataset)
+ local cells = dataset.cells
+ local page = dataset.page
+ local offset = odd(page) and dataset.nofleft or 0
+ local start = dataset.start
+ local list = rawget(start,page)
+ if list then
+ for c, n in next, list do
+ local column = cells[offset + c]
+ if column then
+ for r=1,n do
+ column[r] = true
+ end
+ end
+ end
+ start[page] = nil
+ end
+ local lines = dataset.lines
+ local list = rawget(lines,page)
+ local rows = dataset.nofrows
+ if list then
+ for c, n in next, list do
+ local column = cells[offset + c]
+ if column then
+ if n > 0 then
+ for r=n+1,rows do
+ column[r] = true
+ end
+ elseif n < 0 then
+ for r=rows,rows+n+1,-1 do
+ column[r] = true
+ end
+ end
+ end
+ end
+ lines[page] = nil
+ end
+end
+
+local function erase(dataset,all)
+ local cells = dataset.cells
+ local nofrows = dataset.nofrows
+ local first = 1
+ local last = dataset.nofcolumns
+ --
+ if not all then
+ first = dataset.firstcolumn or first
+ last = dataset.lastcolumn or last
+ end
+ for c=first,last do
+ local column = { }
+ for r=1,nofrows do
+ if column[r] then
+ report("slot (%i,%i) is not empty",c,r)
+ end
+ column[r] = false -- not used
+ end
+ cells[c] = column
+ end
+end
+
+function columnsets.reset(t)
+ local dataset = columnsets.define(t)
+ erase(dataset,true)
+ check(dataset)
+end
+
+function columnsets.prepareflush(name)
+ local dataset = data[name]
+ local cells = dataset.cells
+ local firstcolumn = dataset.firstcolumn
+ local lastcolumn = dataset.lastcolumn
+ local nofrows = dataset.nofrows
+ local lineheight = dataset.lineheight
+ local linedepth = dataset.linedepth
+ local widths = dataset.widths
+ local height = (lineheight+linedepth)*nofrows -- - linedepth
+ --
+ local columns = { }
+ dataset.columns = columns
+ --
+ for c=firstcolumn,lastcolumn do
+ local column = cells[c]
+ for r=1,nofrows do
+ local cell = column[r]
+ if (cell == false) or (cell == true) then
+ if trace_cells then
+ column[r] = new_trace_rule(65536*2,lineheight,linedepth)
+ else
+ column[r] = new_empty_rule(0,lineheight,linedepth)
+ end
+ end
+ end
+ for r=1,nofrows-1 do
+ setlink(column[r],column[r+1])
+ end
+ local v = new_vlist(column[1])
+ setfield(v,"height",height)
+-- setfield(v,"depth",linedepth)
+ setfield(v,"width",widths[c])
+ columns[c] = v
+ end
+ --
+ texsetcount("c_page_grid_first_column",firstcolumn)
+ texsetcount("c_page_grid_last_column",lastcolumn)
+end
+
+function columnsets.flushcolumn(name,column)
+ local dataset = data[name]
+ local columns = dataset.columns
+ local packed = columns[column]
+ setbox("b_page_grid_column",packed)
+ columns[column] = nil
+end
+
+function columnsets.finishflush(name)
+ local dataset = data[name]
+ local cells = dataset.cells
+ local firstcolumn = dataset.firstcolumn
+ local lastcolumn = dataset.lastcolumn
+ local nofrows = dataset.nofrows
+ for c=firstcolumn,lastcolumn do
+ local column = { }
+ for r=1,nofrows do
+ column[r] = false -- not used
+ end
+ cells[c] = column
+ end
+ dataset.page = dataset.page + 1
+ check(dataset)
+ setstate(dataset)
+end
+
+function columnsets.block(t)
+ local dataset = data[t.name]
+ local cells = dataset.cells
+ local nofcolumns = dataset.nofcolumns
+ local nofrows = dataset.nofrows
+ --
+ local c = t.c or 0
+ local r = t.r or 0
+ if c == 0 or r == 0 or c > nofcolumns or r > nofrows then
+ return
+ end
+ local nc = t.nc or 0
+ local nr = t.nr or 0
+ if nc == 0 then
+ return
+ end
+ if nr == 0 then
+ return
+ end
+ local rr = r + nr - 1
+ local cc = c + nc - 1
+ if rr > nofrows then
+ rr = nofrows
+ end
+ if cc > nofcolumns then
+ cc = nofcolumns
+ end
+ for i=c,cc do
+ local column = cells[i]
+ for j=r,rr do
+ column[j] = true
+ end
+ end
+end
+
+local function here(c,r,nr,nofcolumns,nofrows,cells,width,spans)
+ local rr = r + nr - 1
+ if rr > nofrows then
+ return false
+ end
+ local cc = 0
+ local wd = spans[c]
+ local wc = 0
+ local nc = 0
+ for i=c,nofcolumns do
+ nc = nc + 1
+ wc = wd[nc]
+ if not wc then
+ break
+ elseif wc >= width then
+ cc = i
+ break
+ end
+ end
+ if cc == 0 or cc > nofcolumns then
+ -- report("needed %p, no slot free at (%i,%i)",width,c,r)
+ return false
+ end
+ for i=c,cc do
+ local column = cells[i]
+ for j=r,rr do
+ if column[j] then
+ -- report("width %p, needed %p, checking (%i,%i) x (%i,%i), %s",width,wc,c,r,nc,nr,"quit")
+ return false
+ end
+ end
+ end
+ -- report("width %p, needed %p, checking (%i,%i) x (%i,%i), %s",width,wc,c,r,nc,nr,"match")
+ return c, r, nc
+end
+
+local methods = {
+ [v_here] = here,
+ [v_fixed] = here,
+ tblr = function(c,r,nr,nofcolumns,nofrows,cells,width,spans)
+ for j=1,nofrows-nr+1 do
+ for i=c,nofcolumns do
+ if not cells[i][j] then
+ local c, r, cc = here(i,j,nr,nofcolumns,nofrows,cells,width,spans)
+ if c then
+ return c, r, cc
+ end
+ end
+ end
+ end
+ end,
+ lrtb = function(c,r,nr,nofcolumns,nofrows,cells,width,spans)
+ for i=c,nofcolumns do
+ for j=1,nofrows-nr+1 do
+ if not cells[i][j] then
+ local c, r, cc = here(i,j,nr,nofcolumns,nofrows,cells,width,spans)
+ if c then
+ return c, r, cc
+ end
+ end
+ end
+ end
+ end,
+ tbrl = function(c,r,nr,nofcolumns,nofrows,cells,width,spans)
+ for j=1,nofrows-nr+1 do
+ for i=nofcolumns,c,-1 do
+ if not cells[i][j] then
+ local c, r, cc = here(i,j,nr,nofcolumns,nofrows,cells,width,spans)
+ if c then
+ return c, r, cc
+ end
+ end
+ end
+ end
+ end,
+ rltb = function(c,r,nr,nofcolumns,nofrows,cells,width,spans)
+ for i=nofcolumns,c,-1 do
+ for j=1,nofrows-nr+1 do
+ if not cells[i][j] then
+ local c, r, cc = here(i,j,nr,nofcolumns,nofrows,cells,width,spans)
+ if c then
+ return c, r, cc
+ end
+ end
+ end
+ end
+ end,
+ btlr = function(c,r,nr,nofcolumns,nofrows,cells,width,spans)
+ for j=nofrows-nr+1,1,-1 do
+ for i=c,nofcolumns do
+ if not cells[i][j] then
+ local c, r, cc = here(i,j,nr,nofcolumns,nofrows,cells,width,spans)
+ if c then
+ return c, r, cc
+ end
+ end
+ end
+ end
+ end,
+ lrbt = function(c,r,nr,nofcolumns,nofrows,cells,width,spans)
+ for i=c,nofcolumns do
+ for j=nofrows-nr+1,1,-1 do
+ if not cells[i][j] then
+ local c, r, cc = here(i,j,nr,nofcolumns,nofrows,cells,width,spans)
+ if c then
+ return c, r, cc
+ end
+ end
+ end
+ end
+ end,
+ btrl = function(c,r,nr,nofcolumns,nofrows,cells,width,spans)
+ for j=nofrows-nr+1,1,-1 do
+ for i=nofcolumns,c,-1 do
+ if not cells[i][j] then
+ local c, r, cc = here(i,j,nr,nofcolumns,nofrows,cells,width,spans)
+ if c then
+ return c, r, cc
+ end
+ end
+ end
+ end
+ end,
+ rlbt = function(c,r,nr,nofcolumns,nofrows,cells,width,spans)
+ for i=nofcolumns,c,-1 do
+ for j=nofrows-nr+1,1,-1 do
+ if not cells[i][j] then
+ local c, r, cc = here(i,j,nr,nofcolumns,nofrows,cells,width,spans)
+ if c then
+ return c, r, cc
+ end
+ end
+ end
+ end
+ end,
+ fxtb = function(c,r,nr,nofcolumns,nofrows,cells,width,spans)
+ for i=c,nofcolumns do
+ for j=r,nofrows-nr+1 do
+ if not cells[i][j] then
+ local c, r, cc = here(i,j,nr,nofcolumns,nofrows,cells,width,spans)
+ if c then
+ return c, r, cc
+ end
+ end
+ r = 1
+ end
+ end
+ end,
+ fxbt = function(c,r,nr,nofcolumns,nofrows,cells,width,spans)
+ for i=c,nofcolumns do
+ for j=nofrows-nr+1,r,-1 do
+ if not cells[i][j] then
+ local c, r, cc = here(i,j,nr,nofcolumns,nofrows,cells,width,spans)
+ if c then
+ return c, r, cc
+ end
+ end
+ end
+ r = 1
+ end
+ end,
+ [v_top] = function(c,r,nr,nofcolumns,nofrows,cells,width,spans)
+ for i=c,nofcolumns do
+ for j=1,nofrows-nr+1 do
+ if cells[i][j] then
+ break
+ else
+ local c, r, cc = here(i,j,nr,nofcolumns,nofrows,cells,width,spans)
+ if c then
+ return c, r, cc
+ end
+ end
+ end
+ end
+ end,
+ [v_bottom] = function(c,r,nr,nofcolumns,nofrows,cells,width,spans)
+ for i=c,nofcolumns do
+ for j=1,nofrows-nr+1 do
+ if cells[i][j] then
+ break
+ else
+ local c, r, cc = here(i,j,nr,nofcolumns,nofrows,cells,width,spans)
+ if c then
+ return c, r, cc
+ end
+ end
+ end
+ end
+ end,
+}
+
+local threshold = 50
+
+function columnsets.check(t)
+ local dataset = data[t.name]
+ local cells = dataset.cells
+ local nofcolumns = dataset.nofcolumns
+ local nofrows = dataset.nofrows
+ local widths = dataset.widths
+ local lineheight = dataset.lineheight
+ local linedepth = dataset.linedepth
+ local distances = dataset.distances
+ local spans = dataset.spans
+ --
+ local method = lower(t.method or "tblr")
+ local boxwidth = t.width or 0
+ local boxheight = t.height or 0
+ local boxnumber = t.box
+ local box = boxnumber and getbox(boxnumber)
+ --
+ if boxwidth > 0 and boxheight > 0 then
+ -- we're ok
+ elseif box then
+ boxwidth = getfield(box,"width")
+ boxheight = getfield(box,"height") + getfield(box,"depth")
+ else
+ report("empty box")
+ return
+ end
+ --
+ local c = t.c or 0
+ local r = t.r or 0
+ if c == 0 then
+ c = dataset.currentcolumn
+ end
+ if r == 0 then
+ r = dataset.currentrow
+ end
+ if c == 0 or r == 0 or c > nofcolumns or r > nofrows then
+ texsetcount("c_page_grid_reserved_state",5)
+ return
+ end
+-- report("checking width %p, height %p, depth %p, slot (%i,%i)",boxwidth,boxheight,boxdepth,c,r)
+ local nr = ceil(boxheight/(lineheight+linedepth))
+ --
+ local action = methods[method]
+ local cfound = false
+ local rfound = false
+ local lastcolumn = dataset.lastcolumn
+ -- if t.option == v_wide then
+ -- lastcolumn = nofcolumns
+ -- spans = dataset.spreads
+ -- end
+ if action then
+ cfound, rfound, nc = action(c,r,nr,lastcolumn,nofrows,cells,boxwidth-threshold,spans)
+ end
+ if not cfound and method ~= v_here then
+ cfound, rfound, nc = here(c,r,nr,lastcolumn,nofrows,cells,boxwidth-threshold,spans)
+ end
+ if cfound then
+ local ht = nr*(lineheight+linedepth)
+ local wd = spans[cfound][nc]
+ dataset.reserved_ht = ht
+ dataset.reserved_wd = wd
+ dataset.reserved_c = cfound
+ dataset.reserved_r = rfound
+ dataset.reserved_nc = nc
+ dataset.reserved_nr = nr
+ texsetcount("c_page_grid_reserved_state",0)
+ texsetdimen("d_page_grid_reserved_height",ht)
+ texsetdimen("d_page_grid_reserved_width",wd)
+ -- report("using (%i,%i) x (%i,%i) @ (%p,%p)",cfound,rfound,nc,nr,wd,ht)
+ else
+ dataset.reserved_ht = false
+ dataset.reserved_wd = false
+ dataset.reserved_c = false
+ dataset.reserved_r = false
+ dataset.reserved_nc = false
+ dataset.reserved_nr = false
+ texsetcount("c_page_grid_reserved_state",4)
+ -- texsetdimen("d_page_grid_reserved_height",0)
+ -- texsetdimen("d_page_grid_reserved_width",0)
+ -- report("no slot found")
+ end
+end
+
+function columnsets.put(t)
+ local dataset = data[t.name]
+ local cells = dataset.cells
+ local widths = dataset.widths
+ local lineheight = dataset.lineheight
+ local linedepth = dataset.linedepth
+ local boxnumber = t.box
+ local box = boxnumber and takebox(boxnumber)
+ --
+ local c = t.c or dataset.reserved_c
+ local r = t.r or dataset.reserved_r
+ if not c or not r then
+ -- report("no reserved slot (%i,%i)",c,r)
+ return
+ end
+ local lastc = c + dataset.reserved_nc - 1
+ local lastr = r + dataset.reserved_nr - 1
+ --
+ for i=c,lastc do
+ local column = cells[i]
+ for j=r,lastr do
+ column[j] = true
+ end
+ end
+ cells[c][r] = box
+ setfield(box,"height",lineheight)
+ setfield(box,"depth",linedepth)
+ setfield(box,"width",widths[c])
+ dataset.reserved_c = false
+ dataset.reserved_r = false
+ dataset.reserved_nc = false
+ dataset.reserved_nr = false
+ --
+end
+
+local function findgap(dataset)
+ local cells = dataset.cells
+ local nofcolumns = dataset.nofcolumns
+ local nofrows = dataset.nofrows
+ local currentrow = dataset.currentrow
+ local currentcolumn = dataset.currentcolumn
+ --
+ local foundc = 0
+ local foundr = 0
+ local foundn = 0
+ for c=currentcolumn,dataset.lastcolumn do
+ local column = cells[c]
+foundn = 0
+ for r=currentrow,nofrows do
+ if not column[r] then
+ if foundc == 0 then
+ foundc = c
+ foundr = r
+ end
+ foundn = foundn + 1
+ elseif foundn > 0 then
+ return foundc, foundr, foundn
+ end
+ end
+ if foundn > 0 then
+ return foundc, foundr, foundn
+ end
+ currentrow = 1
+ end
+end
+
+-- we can enforce grid snapping
+
+-- local function checkroom(head,available,row)
+-- if row == 1 then
+-- while head do
+-- local id = getid(head)
+-- if id == glue_code then
+-- head = getnext(head)
+-- else
+-- break
+-- end
+-- end
+-- end
+-- local used = 0
+-- local line = false
+-- while head do
+-- local id = getid(head)
+-- if id == hlist_code or id == vlist_code or id == rule_code then -- <= rule_code
+-- used = used + getfield(head,"height") + getfield(head,"depth")
+-- line = true
+-- elseif id == glue_code then
+-- if line then
+-- break
+-- end
+-- used = used + getfield(head,"width")
+-- elseif id == kern_code then
+-- used = used + getfield(head,"kern")
+-- elseif id == penalty_code then
+-- end
+-- if used > available then
+-- break
+-- end
+-- head = getnext(head)
+-- end
+-- return line, used
+-- end
+
+local function checkroom(head,available,row)
+ if row == 1 then
+ while head do
+ local id = getid(head)
+ if id == glue_code then
+ head = getnext(head)
+ else
+ break
+ end
+ end
+ end
+ local used = 0
+ local line = false
+ while head do
+ local id = getid(head)
+ if id == hlist_code or id == vlist_code or id == rule_code then -- <= rule_code
+ used = used + getfield(head,"height") + getfield(head,"depth")
+ line = true
+ if used > available then
+ break
+ end
+ elseif id == glue_code then
+ if line then
+ break
+ end
+ used = used + getfield(head,"width")
+ if used > available then
+ break
+ end
+ elseif id == kern_code then
+ used = used + getfield(head,"kern")
+ if used > available then
+ break
+ end
+ elseif id == penalty_code then
+ -- not good enough ... we need to look bakck too
+ if getfield(head,"penalty") >= 10000 then
+ line = false
+ else
+ break
+ end
+ end
+ head = getnext(head)
+ end
+ return line, used
+end
+
+-- we could preroll on a cheap copy .. in fact, a split loop normally works on
+-- a copy ... then we could also stepsise make the height smaller .. slow but nice
+
+-- local function findslice(dataset,head,available,column,row)
+-- local used = 0
+-- local first = nil
+-- local last = nil
+-- local line = false
+-- local lineheight = dataset.lineheight
+-- local linedepth = dataset.linedepth
+-- if row == 1 then
+-- while head do
+-- local id = getid(head)
+-- if id == glue_code then
+-- head = removenode(head,head,true)
+-- else
+-- break
+-- end
+-- end
+-- end
+-- while head do
+-- -- no direction yet, if so use backend code
+-- local id = getid(head)
+-- local hd = 0
+-- if id == hlist_code or id == vlist_code or id == rule_code then -- <= rule_code
+-- hd = getfield(head,"height") + getfield(head,"depth")
+-- elseif id == glue_code then
+-- hd = getfield(head,"width")
+-- elseif id == kern_code then
+-- hd = getfield(head,"kern")
+-- elseif id == penalty_code then
+-- end
+-- if used + hd > available then
+-- if first then
+-- setnext(last)
+-- setprev(head)
+-- return used, first, head
+-- else
+-- return 0
+-- end
+-- else
+-- if not first then
+-- first = head
+-- end
+-- used = used + hd
+-- last = head
+-- head = getnext(head)
+-- end
+-- end
+-- return used, first
+-- end
+
+-- todo
+--
+-- first = takelist(done)
+-- head = takelist(rest)
+-- local tail = nuts.tail(first)
+-- if false then
+-- local disc = tex.lists.split_discards_head
+-- if disc then
+-- disc = tonut(disc)
+-- setlink(tail,disc)
+-- tail = nuts.tail(disc)
+-- tex.lists.split_discards_head = nil
+-- end
+-- end
+-- setlink(tail,head)
+
+-- We work on a copy because we need to keep properties. We can make faster copies
+-- by only doing a one-level deep copy.
+
+local function findslice(dataset,head,available,column,row)
+ local first = nil
+ local lineheight = dataset.lineheight
+ local linedepth = dataset.linedepth
+ local linetotal = lineheight + linedepth
+ local slack = 65536 -- 1pt
+ local copy = copylist(head)
+ local attempts = 0
+ local usedsize = available
+ while true do
+ attempts = attempts + 1
+ texsetbox("scratchbox",tonode(new_vlist(copy)))
+ local done = splitbox("scratchbox",usedsize,"additional")
+ local used = getfield(done,"height")
+ local rest = takebox("scratchbox")
+ if used > (usedsize+slack) then
+ if trace_detail then
+ report("at (%i,%i) available %p, used %p, overflow %p",column,row,usedsize,used,used-usedsize)
+ end
+ -- flush copy
+ flushlist(takelist(done))
+ flushlist(takelist(rest))
+ -- check it we can try again
+ usedsize = usedsize - linetotal
+ if usedsize > linetotal then
+ copy = copylist(head)
+ else
+ return 0, nil, head
+ end
+ else
+ -- flush copied box
+ flushlist(takelist(done))
+ flushlist(takelist(rest))
+ -- deal with real data
+ texsetbox("scratchbox",tonode(new_vlist(head)))
+ done = splitbox("scratchbox",usedsize,"additional")
+ rest = takebox("scratchbox")
+ used = getfield(done,"height")
+ if attempts > 1 then
+ used = available
+ end
+ first = takelist(done)
+ head = takelist(rest)
+ -- return result
+ return used, first, head
+ end
+ end
+end
+
+local nofcolumngaps = 0
+
+function columnsets.add(name,box)
+ local dataset = data[name]
+ local cells = dataset.cells
+ local nofcolumns = dataset.nofcolumns
+ local nofrows = dataset.nofrows
+ local currentrow = dataset.currentrow
+ local currentcolumn = dataset.currentcolumn
+ local lineheight = dataset.lineheight
+ local linedepth = dataset.linedepth
+ local widths = dataset.widths
+ --
+ local b = getbox(box)
+ local l = getlist(b)
+-- dataset.rest = l
+ if l then
+ setlist(b,nil)
+ local hd = lineheight + linedepth
+ while l do
+ local foundc, foundr, foundn = findgap(dataset)
+ if foundc then
+ local available = foundn * hd
+ local used, first, last = findslice(dataset,l,available,foundc,foundr)
+ if first then
+ local v
+ if used == available or (foundr+foundn > nofrows) then
+ v = vpack(first,available,"exactly")
+ else
+ v = new_vlist(first)
+ end
+ nofcolumngaps = nofcolumngaps + 1
+ -- getmetatable(v).columngap = nofcolumngaps
+ properties[v] = { columngap = nofcolumngaps }
+ -- report("setting gap %a at (%i,%i)",nofcolumngaps,foundc,foundr)
+ setfield(v,"height",lineheight)
+ setfield(v,"depth",linedepth)
+ setfield(v,"width",widths[currentcolumn])
+ local column = cells[foundc]
+ --
+ column[foundr] = v
+ used = used - hd
+ if used > 0 then
+ for r=foundr+1,foundr+foundn-1 do
+ used = used - hd
+ foundr = foundr + 1
+ column[r] = true
+ if used <= 0 then
+ break
+ end
+ end
+ end
+ currentcolumn = foundc
+ currentrow = foundr
+ dataset.currentcolumn = currentcolumn
+ dataset.currentrow = currentrow
+ l = last
+ dataset.rest = l
+ else
+ local column = cells[foundc]
+ for i=foundr,foundr+foundn-1 do
+ column[i] = true
+ end
+ l = last
+ end
+ else
+ dataset.rest = l
+ return -- save and flush
+ end
+ end
+ end
+end
+
+do
+
+ -- A split approach is more efficient than a context(followup) inside
+ -- followup itself as we need less (internal) housekeeping.
+
+ local followup = nil
+ local splitter = lpeg.splitter("*",tonumber)
+
+ columnsets["noto"] = function(t)
+ return followup()
+ end
+
+ columnsets["goto"] = function(name,target)
+ local dataset = data[name]
+ local nofcolumns = dataset.nofcolumns
+ if target == v_yes or target == "" then
+ local currentcolumn = dataset.currentcolumn
+ followup = function()
+ context(dataset.currentcolumn == currentcolumn and 1 or 0)
+ end
+ return followup()
+ end
+ if target == v_first then
+ if dataset.currentcolumn > 1 then
+ target = v_page
+ else
+ return context(0)
+ end
+ end
+ if target == v_page then
+ if dataset.currentcolumn == 1 and dataset.currentrow == 1 then
+ return context(0)
+ else
+ local currentpage = dataset.page
+ followup = function()
+ context(dataset.page == currentpage and 1 or 0)
+ end
+ return followup()
+ end
+ end
+ if target == v_last then
+ target = dataset.nofcolumns
+ if dataset.currentcolumn ~= target then
+ followup = function()
+ context(dataset.currentcolumn ~= target and 1 or 0)
+ end
+ return followup()
+ end
+ return
+ end
+ local targetpage = tonumber(target)
+ if targetpage then
+ followup = function()
+ context(dataset.currentcolumn ~= targetpage and 1 or 0)
+ end
+ return followup()
+ end
+ local targetcolumn, targetrow = lpeg.match(splitter,target)
+ if targetcolumn and targetrow then
+ if dataset.currentcolumn ~= targetcolumn and dataset.currentrow ~= targetrow then
+ followup = function()
+ if dataset.currentcolumn ~= targetcolumn then
+ context(1)
+ return
+ end
+ if dataset.currentcolumn == targetcolumn then
+ context(dataset.currentrow ~= targetrow and 1 or 0)
+ else
+ context(0)
+ end
+ end
+ return followup()
+ end
+ end
+ end
+
+end
+
+function columnsets.currentcolumn(name)
+ local dataset = data[name]
+ context(dataset.currentcolumn)
+end
+
+function columnsets.flushrest(name,box)
+ local dataset = data[name]
+ local rest = dataset.rest
+ if rest then
+ dataset.rest = nil
+ setbox("global",box,new_vlist(rest))
+ end
+end
+
+function columnsets.setvsize(name)
+ local dataset = data[name]
+ local c, r, n = findgap(dataset)
+ if n then
+ dataset.currentcolumn = c
+ dataset.currentrow = r
+ else
+ dataset.currentcolumn = 1
+ dataset.currentrow = 1
+ n = 0
+ end
+ local gap = n*(dataset.lineheight+dataset.linedepth)
+ texsetdimen("d_page_grid_gap_height",gap)
+ -- can be integrated
+ -- report("state %a, n %a, column %a, row %a",dataset.state,n,dataset.currentcolumn,dataset.currentrow)
+end
+
+function columnsets.sethsize(name)
+ local dataset = data[name]
+ texsetdimen("d_page_grid_column_width",dataset.widths[dataset.currentcolumn])
+end
+
+function columnsets.sethspan(name,span)
+ -- no checking if there is really space, so we assume it can be
+ -- placed which makes spans a very explicit feature
+ local dataset = data[name]
+ local column = dataset.currentcolumn
+ local available = dataset.lastcolumn - column + 1
+ if span > available then
+ span = available
+ end
+ local width = dataset.spans[column][span]
+ texsetdimen("d_page_grid_span_width",width)
+end
+
+function columnsets.setlines(t)
+ local dataset = data[t.name]
+ dataset.lines[t.page][t.column] = t.value
+end
+
+function columnsets.setstart(t)
+ local dataset = data[t.name]
+ dataset.start[t.page][t.column] = t.value
+end
+
+function columnsets.setproperties(t)
+ local dataset = data[t.name]
+ local column = t.column
+ dataset.distances[column] = t.distance
+ dataset.widths[column] = t.width
+end
+
+local areas = { }
+
+function columnsets.registerarea(t)
+ -- maybe metatable with values
+ areas[#areas+1] = t
+end
+
+-- state : repeat | start
+
+local ctx_page_grid_set_area = context.protected.page_grid_set_area
+
+function columnsets.flushareas(name)
+ local nofareas = #areas
+ if nofareas == 0 then
+ return
+ end
+ local dataset = data[name]
+ local page = dataset.page
+ if odd(page) then
+ -- report("checking %i areas",#areas)
+ local kept = { }
+ for i=1,nofareas do
+ local area = areas[i]
+ -- local page = area.page -- maybe use page counter in columnset
+ -- local type = area.type
+ local okay = false
+ --
+ local nofcolumns = area.nc
+ local nofrows = area.nr
+ local column = area.c
+ local row = area.r
+ columnsets.block {
+ name = name,
+ c = column,
+ r = row,
+ nc = nofcolumns,
+ nr = nofrows,
+ }
+ local left = 0
+ local start = dataset.nofleft + 1
+ local overflow = (column + nofcolumns - 1) - dataset.nofleft
+ local height = nofrows * (dataset.lineheight + dataset.linedepth)
+ local width = dataset.spreads[column][nofcolumns]
+ -- report("span, width %p, overflow %i",width,overflow)
+ if overflow > 0 then
+ local used = nofcolumns - overflow
+ left = dataset.spreads[column][used] + getdimen("backspace")
+ end
+ ctx_page_grid_set_area(name,area.name,column,row,width,height,start,left) -- or via counters / dimens
+ if area.state ~= v_repeat then
+ area = nil
+ end
+ if area then
+ kept[#kept+1] = area
+ end
+ end
+ areas = kept
+ end
+end
+
+function columnsets.setarea(t)
+ local dataset = data[t.name]
+ local cells = dataset.cells
+ local box = takebox(t.box)
+ local column = t.c
+ local row = t.r
+ if column and row then
+ setfield(box,"height",dataset.lineheight)
+ setfield(box,"depth",dataset.linedepth)
+ setfield(box,"width",dataset.widths[column])
+ cells[column][row] = box
+ end
+end
+
+-- The interface.
+
+interfaces.implement {
+ name = "definecolumnset",
+ actions = columnsets.define,
+ arguments = { {
+ { "name", "string" },
+ } }
+}
+
+interfaces.implement {
+ name = "resetcolumnset",
+ actions = columnsets.reset,
+ arguments = { {
+ { "name", "string" },
+ { "nofleft", "integer" },
+ { "nofright", "integer" },
+ { "nofrows", "integer" },
+ { "lineheight", "dimension" },
+ { "linedepth", "dimension" },
+ { "width", "dimension" },
+ { "distance", "dimension" },
+ { "maxwidth", "dimension" },
+ } }
+}
+
+interfaces.implement {
+ name = "preparecolumnsetflush",
+ actions = columnsets.prepareflush,
+ arguments = { "string" },
+}
+
+interfaces.implement {
+ name = "finishcolumnsetflush",
+ actions = columnsets.finishflush,
+ arguments = { "string" },
+}
+
+interfaces.implement {
+ name = "flushcolumnsetcolumn",
+ actions = columnsets.flushcolumn,
+ arguments = { "string" ,"integer" },
+}
+
+interfaces.implement {
+ name = "setvsizecolumnset",
+ actions = columnsets.setvsize,
+ arguments = { "string" },
+}
+
+interfaces.implement {
+ name = "sethsizecolumnset",
+ actions = columnsets.sethsize,
+ arguments = { "string" },
+}
+
+interfaces.implement {
+ name = "sethsizecolumnspan",
+ actions = columnsets.sethspan,
+ arguments = { "string" ,"integer" },
+}
+
+interfaces.implement {
+ name = "flushcolumnsetrest",
+ actions = columnsets.flushrest,
+ arguments = { "string", "integer" },
+}
+
+interfaces.implement {
+ name = "blockcolumnset",
+ actions = columnsets.block,
+ arguments = { {
+ { "name", "string" },
+ { "c", "integer" },
+ { "r", "integer" },
+ { "nc", "integer" },
+ { "nr", "integer" },
+ { "box", "integer" },
+ } }
+}
+
+interfaces.implement {
+ name = "checkcolumnset",
+ actions = columnsets.check,
+ arguments = { {
+ { "name", "string" },
+ { "method", "string" },
+ { "c", "integer" },
+ { "r", "integer" },
+ { "box", "integer" },
+ { "width", "dimension" },
+ { "height", "dimension" },
+ { "option", "string" },
+ } }
+}
+
+interfaces.implement {
+ name = "putincolumnset",
+ actions = columnsets.put,
+ arguments = { {
+ { "name", "string" },
+ { "c", "integer" },
+ { "r", "integer" },
+ { "box", "integer" },
+ } }
+}
+
+interfaces.implement {
+ name = "addtocolumnset",
+ actions = columnsets.add,
+ arguments = { "string", "integer" },
+}
+
+interfaces.implement {
+ name = "setcolumnsetlines",
+ actions = columnsets.setlines,
+ arguments = { {
+ { "name", "string" },
+ { "page", "integer" },
+ { "column", "integer" },
+ { "value", "integer" },
+ } }
+}
+
+interfaces.implement {
+ name = "setcolumnsetstart",
+ actions = columnsets.setstart,
+ arguments = { {
+ { "name", "string" },
+ { "page", "integer" },
+ { "column", "integer" },
+ { "value", "integer" },
+ } }
+}
+
+interfaces.implement {
+ name = "setcolumnsetproperties",
+ actions = columnsets.setproperties,
+ arguments = { {
+ { "name", "string" },
+ { "column", "integer" },
+ { "distance", "dimension" },
+ { "width", "dimension" },
+ } }
+}
+
+interfaces.implement {
+ name = "registercolumnsetarea",
+ actions = columnsets.registerarea,
+ arguments = { {
+ { "name", "string" },
+ { "type", "string" },
+ { "page", "integer" },
+ { "state", "string" },
+ { "c", "integer" },
+ { "r", "integer" },
+ { "nc", "integer" },
+ { "nr", "integer" },
+ } }
+}
+
+interfaces.implement {
+ name = "flushcolumnsetareas",
+ actions = columnsets.flushareas,
+ arguments = "string",
+}
+
+interfaces.implement {
+ name = "setcolumnsetarea",
+ actions = columnsets.setarea,
+ arguments = { {
+ { "name", "string" },
+ { "c", "integer" },
+ { "r", "integer" },
+ { "box", "integer" },
+ } }
+}
+
+interfaces.implement {
+ name = "columnsetgoto",
+ actions = columnsets["goto"],
+ arguments = { "string" , "string" },
+}
+
+interfaces.implement {
+ name = "columnsetnoto",
+ actions = columnsets["noto"],
+}
+
+interfaces.implement {
+ name = "columnsetcurrentcolumn",
+ actions = columnsets.currentcolumn,
+ arguments = "string",
+}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-cst.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-cst.mkiv
new file mode 100644
index 00000000000..4559ec33fdf
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-cst.mkiv
@@ -0,0 +1,778 @@
+%D \module
+%D [ file=page-cst,
+%D version=2016.12.15,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Page Grids (aka Column Sets),
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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 : markings per column
+
+%D This module is work in progress and in due time it will replace
+%D columnsets.
+
+\writestatus{loading}{ConTeXt Page Macros / Page Grids}
+
+\registerctxluafile{page-cst}{1.001}
+
+\unprotect
+
+% maybe some protected def ([esc])
+
+%D Columnsets are kind of special. They are mostly meant for special products with
+%D magazine like properties. They are normally not mixed with single column layouts
+%D and not all features of \CONTEXT\ might cooperate well with a mechanism like
+%D this. We use the name page grid because (as with other reimplementations of
+%D \MKII\ features in \MKIV, we need another namespace in order to migrate stepwise.
+%D
+%D This implementation is not neccessarily better than the previous one but it might
+%D be easier to extend it. It should be a bit more efficient.
+%D
+%D When writing this code I occasionally needed a motivational musical time||out and
+%D watching the latest Snarky Puppy DVD brought me the musically and visually videos
+%D of Jacob Collier (Piano, voice, anything) on YouTube (and yes, music keeps amazing
+%D me). It's definitely more fun to watch that than to write code like this.
+
+\definesystemconstant{pagegrid}
+
+\installcorenamespace{pagegrid}
+
+\installframedcommandhandler \??pagegrid {pagegrid} \??pagegrid
+
+\setuppagegrid
+ [\c!distance=1.5\bodyfontsize,
+ \c!n=\plustwo,
+ \c!nleft=\pagegridparameter\c!n,
+ \c!nright=\pagegridparameter\c!n,
+ %\c!align=, % inherit
+ %\c!separator=\v!none,
+ %\c!setups=,
+ \c!lines=\layoutparameter\c!lines,
+ \c!frame=\v!off,
+ \c!strut=\v!no,
+ \c!offset=\v!overlay,
+ \c!alternative=\v!local,
+ \c!width=\v!auto,
+ \c!page=,
+ \c!direction=\v!normal, % todo
+ \c!maxheight=\textheight,
+ \c!maxwidth=\makeupwidth]
+
+\appendtoks % could become an option
+ \setuevalue{\e!start\currentpagegrid}{\startpagegrid[\currentpagegrid]}%
+ \setuevalue{\e!stop \currentpagegrid}{\stoppagegrid}%
+ \clf_definecolumnset {
+ name {\currentpagegrid}%
+ }%
+\to \everydefinepagegrid
+
+\newdimen \d_page_grid_column_width
+\newdimen \d_page_grid_max_height
+\newdimen \d_page_grid_max_width
+\newdimen \d_page_grid_distance
+
+\newdimen \d_page_grid_reserved_height
+\newdimen \d_page_grid_reserved_width
+\newcount \c_page_grid_reserved_state
+
+\newdimen \d_page_grid_gap_height
+
+\newcount \c_page_grid_n_of_left
+\newcount \c_page_grid_n_of_right
+\newcount \c_page_grid_n_of_rows
+\newcount \c_page_grid_first_column
+\newcount \c_page_grid_last_column
+
+\newbox \b_page_grid_collected
+\newbox \b_page_grid_column_rest
+\newbox \b_page_grid_column
+
+\unexpanded\def\setuppagegridlines{\doquadrupleempty\page_grid_setup_lines}
+\unexpanded\def\setuppagegridstart{\doquadrupleempty\page_grid_setup_start}
+
+\def\page_grid_setup_lines[#1][#2][#3][#4]% id page col value
+ {\clf_setcolumnsetlines{name {#1} page #2 column #3 value #4}}
+
+\def\page_grid_setup_start[#1][#2][#3][#4]% id page col value
+ {\clf_setcolumnsetstart{name {#1} page #2 column #3 value #4}}
+
+\unexpanded\def\page_grid_check
+ {\dorecurse{\numexpr\pagegridparameter\c!nleft+\pagegridparameter\c!nright}
+ {\page_grid_check_column{##1}}}
+
+\unexpanded\def\page_grid_check_column#1%
+ {\chaintocurrentpagegrid{\currentpagegrid:#1}%
+ \edef\p_distance{\namedpagegridparameter{\currentpagegrid:#1}\c!distance}%
+ \edef\p_width {\namedpagegridparameter{\currentpagegrid:#1}\c!width}%
+ \clf_setcolumnsetproperties {%
+ name {\currentpagegrid}
+ column \numexpr#1\relax
+ \ifx\p_distance\empty\else
+ distance \p_distance
+ \fi
+ \ifx\p_width\empty\else\ifx\p_width\v!auto\else
+ width \p_width
+ \fi\fi
+ }}
+
+\appendtoks
+ \dorecurse{\numexpr\pagegridparameter\c!nleft+\pagegridparameter\c!nright}
+ {\chaintocurrentpagegrid{\currentpagegrid:#1}}%
+\to \everydefinepagegrid
+
+\unexpanded\def\startpagegrid
+ {\bgroup
+ \dodoubleempty\page_grid_start}
+
+\def\page_grid_start_dummy[#1][#2]%
+ {\let\page_grid_stop\egroup}
+
+\def\page_grid_start[#1][#2]%
+ {\let\page_grid_start\page_grid_start_dummy
+ \ifsecondargument
+ \edef\currentpagegrid{#1}%
+ \setupcurrentpagegrid[#2]%
+ \else\iffirstargument
+ \doifassignmentelse{#1}
+ {\let\currentpagegrid\empty
+ \setupcurrentpagegrid[#1]}%
+ {\def\currentpagegrid{#1}}%
+ \else
+ \let\currentpagegrid\empty
+ \fi\fi
+ \usepageparameter\pagegridparameter
+ \c_page_grid_n_of_left \pagegridparameter\c!nleft\relax
+ \c_page_grid_n_of_right\pagegridparameter\c!nright\relax
+ \c_page_grid_n_of_rows \pagegridparameter\c!lines\relax
+ \d_page_grid_max_width \pagegridparameter\c!maxwidth\relax
+ \d_page_grid_max_height\pagegridparameter\c!maxheight\relax
+ \d_page_grid_distance \pagegridparameter\c!distance\relax
+ %
+ \ifcase\c_page_grid_n_of_rows
+ \getrawnoflines{\dimexpr\d_page_grid_max_height-\strutheight+\topskip\relax}%
+ \c_page_grid_n_of_rows\noflines
+ \fi
+ \edef\p_width{\pagegridparameter\c!width}%
+ \insidecolumnstrue % will be different flag in addition
+ \clf_resetcolumnset {
+ name {\currentpagegrid}
+ nofrows \c_page_grid_n_of_rows
+ nofleft \c_page_grid_n_of_left
+ nofright \c_page_grid_n_of_right
+ lineheight \strutht
+ linedepth \strutdp
+ \ifx\p_width\v!auto
+ % sets \d_page_grid_column_width
+ \else
+ width \p_width
+ \fi
+ distance \d_page_grid_distance
+ maxwidth \d_page_grid_max_width
+ }%
+ %
+ \page_grid_check
+ %
+ \clf_flushcolumnsetareas{\currentpagegrid}\relax
+ \setupoutputroutine[\s!pagegrid]%
+ \page_grid_command_set_hsize
+ \page_grid_command_set_vsize
+ }%\begingroup}
+
+\unexpanded\def\stoppagegrid
+ {\page_grid_stop}
+
+\def\page_grid_stop
+ {\endgraf % needed, else wrong vsize in one par case
+ \vfill % otherwise weird \placenotes[endnotes]
+ \page_otr_command_set_vsize % needed
+ \penalty\c_page_otr_eject_penalty
+ \page_grid_command_flush_page
+ \page_otr_fill_and_eject_page
+ \page_otr_command_set_vsize % needed
+ \egroup
+ \page_otr_command_set_vsize
+ \page_otr_command_set_hsize}
+
+\unexpanded\def\reservepagegrid[#1]%
+ {\begingroup
+ \letdummyparameter\c!c\plusone
+ \letdummyparameter\c!r\plusone
+ \letdummyparameter\c!nc\plusone
+ \letdummyparameter\c!nr\plusone
+ \getdummyparameters[#1]%
+ \clf_blockcolumnset {
+ name {\currentpagegrid}
+ c \dummyparameter\c!c
+ r \dummyparameter\c!r
+ nc \dummyparameter\c!nc
+ nr \dummyparameter\c!nr
+ }%
+ \endgroup}
+
+\unexpanded\def\setpagegrid
+ {\dosingleempty\page_grid_set}
+
+\unexpanded\def\page_grid_set[#1]%
+ {\begingroup
+ \letdummyparameter\c!c\zerocount
+ \letdummyparameter\c!r\zerocount
+ \letdummyparameter\c!option\v!none
+ \getdummyparameters[#1]%
+ \dowithnextboxcs\page_grid_set_indeed\hbox}
+
+\def\page_grid_set_indeed
+ {\clf_checkcolumnset {
+ name {\currentpagegrid}
+ c \dummyparameter\c!c
+ r \dummyparameter\c!r
+ box \nextbox
+ option {\dummyparameter\c!option}
+ }%
+ \ifcase\c_page_grid_reserved_state
+ \setbox\nextbox\vpack to \d_page_grid_reserved_height \bgroup
+ \vss
+ \hpack to \d_page_grid_reserved_width \bgroup
+ \box\nextbox
+ \hss
+ \egroup
+ \vss
+ \egroup
+ \wd\nextbox\d_page_grid_reserved_width
+ \clf_putincolumnset {
+ name {\currentpagegrid}
+ box \nextbox
+ }%
+ \fi
+ \endgroup}
+
+\unexpanded\def\page_grid_command_set_vsize
+ {\clf_setvsizecolumnset{\currentpagegrid}%
+ \ifdim\d_page_grid_gap_height<\lineheight
+ \page_grid_command_flush_page
+ \page_otr_fill_and_eject_page
+ \fi
+ \global\vsize\d_page_grid_gap_height
+ \pagegoal\vsize}
+
+\unexpanded\def\page_grid_command_set_hsize
+ {\clf_sethsizecolumnset{\currentpagegrid}%
+ \hsize\d_page_grid_column_width
+ \textwidth\d_page_grid_column_width}
+
+\unexpanded\def\page_grid_command_routine
+ {\ifvoid\normalpagebox \else
+ \clf_addtocolumnset{\currentpagegrid}\normalpagebox
+ \fi
+ \page_grid_command_set_vsize
+ \page_grid_command_flush_saved_floats
+ \page_grid_command_set_vsize
+ \ifdim\d_page_grid_gap_height<\lineheight
+ \page_grid_command_flush_page
+ \fi
+ \page_grid_command_set_vsize
+ \clf_flushcolumnsetrest {\currentpagegrid}\normalpagebox
+ \ifvoid\normalpagebox \else
+ \unvbox\normalpagebox
+ \fi}
+
+\installoutputroutine\synchronizepagegrid
+ {\ifvoid\normalpagebox\else
+ \clf_addtocolumnset{\currentpagegrid}\normalpagebox
+ \page_grid_command_set_vsize
+ \clf_flushcolumnsetrest{\currentpagegrid}\normalpagebox
+ \ifvoid\normalpagebox \else
+ \unvbox\normalpagebox
+ \fi
+ \fi}
+
+% todo line numbers and marks
+
+\unexpanded\def\page_grid_command_flush_page_column#1%
+ {\scratchcounter#1\relax
+ \clf_flushcolumnsetcolumn{\currentpagegrid}\scratchcounter
+ \anch_mark_column_box\b_page_grid_column
+ \page_marks_synchronize_column\c_page_grid_first_column\c_page_grid_last_column\scratchcounter\b_page_grid_column
+ \ifnum\scratchcounter>\c_page_grid_n_of_left
+ \advance\scratchcounter-\c_page_grid_n_of_left
+ \page_lines_add_numbers_to_box\b_page_grid_column\scratchcounter\c_page_grid_n_of_right\plustwo
+ \else
+ \page_lines_add_numbers_to_box\b_page_grid_column\scratchcounter\c_page_grid_n_of_left\plustwo
+ \fi
+ \begingroup
+ \edef\currentpagegrid{\currentpagegrid:#1}%
+ \inheritedpagegridframedbox\box\b_page_grid_column
+ \endgroup}
+
+\unexpanded\def\page_grid_command_flush_page
+ {\deactivatecolor % puzzling, try ungrouped color \red or so
+ \setbox\b_page_grid_collected\hpack\bgroup
+ \clf_preparecolumnsetflush{\currentpagegrid}%
+ \letpagegridparameter\c!region\currentpagegrid
+ \doifelse{\pagegridparameter\c!direction}\v!reverse
+ {\dostepwiserecurse\c_page_grid_last_column\c_page_grid_first_column\minusone
+ {\page_grid_command_flush_page_column{##1}%
+ \ifnum##1>\plusone
+ \kern\namedpagegridparameter{\currentpagegrid:##1}\c!distance\relax
+ \fi}}%
+ {\dostepwiserecurse\c_page_grid_first_column\c_page_grid_last_column\plusone
+ {\page_grid_command_flush_page_column{##1}%
+ \ifnum##1<\c_page_grid_last_column
+ \kern\namedpagegridparameter{\currentpagegrid:##1}\c!distance\relax
+ \fi}}%
+ \clf_finishcolumnsetflush{\currentpagegrid}%
+ \egroup
+ \page_otr_construct_and_shipout\box\b_page_grid_collected
+ \clf_flushcolumnsetareas{\currentpagegrid}\relax
+ \page_grid_command_flush_saved_floats}
+
+% slow but robust
+
+\unexpanded\def\page_grid_command_next_progress
+ {\strut
+ \page_otr_flush_all_floats
+ \page_otr_eject_page
+ \ifcase\clf_columnsetnoto\else
+ \expandafter\page_grid_command_next_progress
+ \fi}
+
+\unexpanded\def\page_grid_command_handle_column
+ {\ifcase\clf_columnsetgoto{\currentpagegrid}{\page_breaks_columns_current_option}\relax\else
+ \expandafter\page_grid_command_next_progress
+ \fi}
+
+\installcolumnbreakmethod\s!pagegrid\s!unknown {\page_grid_command_handle_column}
+\installcolumnbreakmethod\s!pagegrid\v!yes {\page_grid_command_handle_column}
+
+\unexpanded\def\page_grid_command_next_page
+ {\ifcase\clf_columnsetgoto{\currentpagegrid}{\v!page}\relax\else
+ \page_grid_command_flush_page
+ \fi}
+
+\unexpanded\def\page_grid_command_next_page_and_inserts
+% {\page_otr_eject_page_and_flush_inserts}
+ {\page_otr_flush_all_floats
+ \page_grid_command_next_page}
+
+\let\page_grid_command_package_contents\page_one_command_package_contents
+
+\unexpanded\def\page_grid_command_flush_saved_floats
+ {\ifconditional\c_page_floats_flushing \else
+ \ifconditional\c_page_floats_some_waiting
+ \page_grid_command_flush_saved_floats_indeed
+ \fi
+ \fi}
+
+\unexpanded\def\page_grid_command_flush_saved_floats_indeed
+ {\page_floats_flush\s!text\plusone
+ \clf_checkcolumnset {
+ name {\currentpagegrid}
+ method {\floatmethod}
+ width \wd\floatbox
+ height \ht\floatbox
+ }%
+ \ifcase\c_page_grid_reserved_state
+ \page_grid_place_float_here_indeed
+ \page_grid_command_set_vsize % needed
+ \ifconditional\c_page_floats_some_waiting
+ \doubleexpandafter\page_grid_command_flush_saved_floats_indeed
+ \fi
+ \else
+ \page_floats_resave\s!text
+ \fi}
+
+% needs checking
+
+\unexpanded\def\page_grid_command_flush_floats
+ {\wait\global\settrue\c_page_floats_flushing
+ \ifconditional\c_page_floats_some_waiting
+ \par
+ \page_grid_command_flush_floats_indeed
+ \fi
+ \global\savednoffloats\zerocount
+ \global\setfalse\c_page_floats_some_waiting
+ \global\setfalse\c_page_floats_flushing}
+
+\def\page_grid_command_flush_floats_indeed % much in common with OTRSET
+ {\wait\ifconditional\c_page_floats_some_waiting
+ \ifconditional\c_page_floats_pack_flushed
+ \setfalse\c_page_floats_center_box % not needed as we do call directly
+ \page_floats_collect\s!text\hsize\emwidth
+ \global\setbox\floatbox\hbox to \hsize
+ {\hfil
+ \dorecurse\nofcollectedfloats
+ {\ifcase\columndirection % nog document wide
+ \page_floats_flush\s!text\plusone
+ \else
+ \page_floats_flush\s!text{\the\numexpr\nofcollectedfloats-\recurselevel+1\relax}%
+ \fi
+ \ifdim\wd\floatbox>\makeupwidth % \hsize
+ \hbox to \makeupwidth{\hss\box\floatbox\hss}%
+ \else
+ \box\floatbox
+ \fi
+ \ifnum\recurselevel<\nofcollectedfloats
+ \hfil
+ \fi}%
+ \hfil}%
+ \else
+ \page_floats_get
+ \fi
+ \doplacefloatbox
+ \expandafter\page_grid_command_flush_floats_indeed
+ \fi}
+
+% so far
+
+\unexpanded\def\page_grid_command_check_if_float_fits
+ {\clf_checkcolumnset {
+ name {\currentpagegrid}
+ method {\floatmethod}
+ % c \zerocount
+ % r \zerocount
+ box \floatbox
+ }%
+ \ifcase\c_page_grid_reserved_state
+ \global\settrue\c_page_floats_room
+ \else
+ \global\setfalse\c_page_floats_room
+ \fi}
+
+\unexpanded\def\page_grid_place_float_here_indeed
+ {\setbox\floatbox\vpack to \d_page_grid_reserved_height \bgroup
+ \vss
+ \hpack to \d_page_grid_reserved_width \bgroup
+ % \hss % no
+ \box\floatbox
+ \hss
+ \egroup
+ \vss
+ \egroup
+ \clf_putincolumnset {
+ name {\currentpagegrid}
+ box \floatbox
+ }}
+
+\def\page_grid_place_float_slot
+ {% safeguard
+ \ifx\floatmethod\empty
+ \let\floatmethod\v!here
+ \fi
+ % synchronize
+ \penalty\c_page_otr_eject_penalty
+ % push
+ \setbox\savedfloatbox\box\floatbox
+ \page_grid_command_flush_saved_floats
+ \setbox\floatbox\box\savedfloatbox
+ % pop
+ \ifconditional\c_page_floats_some_waiting
+ \page_floats_save\s!text
+ \nonoindentation
+ \else
+ \clf_checkcolumnset {
+ name {\currentpagegrid}
+ method {\floatmethod}
+ \ifx\floatcolumn\empty \else
+ c \floatcolumn
+ \fi
+ \ifx\floatrow\empty \else
+ r \floatrow
+ \fi
+ box \floatbox
+ }%
+ \ifcase\c_page_grid_reserved_state
+ \page_grid_place_float_here_indeed
+ \else
+ \page_floats_save\s!text
+ \nonoindentation
+ \fi
+ \fi}
+
+\def\page_grid_place_float_fixed % todo: fallback on here
+ {\ifx\floatcolumn\empty
+ \let\floatmethod\v!here
+ \else\ifx\floatrow\empty
+ \let\floatmethod\v!here
+ \else
+ \let\floatmethod\v!fixed
+ \fi\fi
+ \page_grid_place_float_slot}
+
+\def\page_grid_place_float_force
+ {% synchronize
+ \penalty\c_page_otr_eject_penalty
+ \clf_checkcolumnset {
+ name {\currentpagegrid}
+ method {\floatmethod}
+ box \floatbox
+ }%
+ \ifcase\c_page_grid_reserved_state
+ \page_grid_place_float_here_indeed
+ \else
+ \page_floats_save\s!text
+ \nonoindentation
+ \fi}
+
+\def\page_grid_place_float_page {\page_grid_place_float_slot} % todo: fallback on here
+
+\def\page_grid_place_float_here {\let\floatmethod\v!here\page_grid_place_float_slot}
+\def\page_grid_place_float_top {\page_grid_place_float_slot}
+\def\page_grid_place_float_bottom{\page_grid_place_float_slot}
+
+\installfloatmethod \s!pagegrid \v!here \page_grid_place_float_here
+\installfloatmethod \s!pagegrid \v!force \page_grid_place_float_force % todo
+%installfloatmethod \s!pagegrid \v!left
+%installfloatmethod \s!pagegrid \v!right
+%installfloatmethod \s!pagegrid \v!text
+\installfloatmethod \s!pagegrid \v!top \page_grid_place_float_top
+\installfloatmethod \s!pagegrid \v!bottom \page_grid_place_float_bottom
+%installfloatmethod \s!pagegrid \v!auto
+%installfloatmethod \s!pagegrid \v!margin
+%installfloatmethod \s!pagegrid \v!opposite
+\installfloatmethod \s!pagegrid \v!page \page_grid_place_float_page
+%installfloatmethod \s!pagegrid \v!leftpage
+%installfloatmethod \s!pagegrid \v!rightpage
+%installfloatmethod \s!pagegrid \v!inmargin
+%installfloatmethod \s!pagegrid \v!inleft
+%installfloatmethod \s!pagegrid \v!inright
+%installfloatmethod \s!pagegrid \v!leftmargin
+%installfloatmethod \s!pagegrid \v!rightmargin
+%installfloatmethod \s!pagegrid \v!leftedge
+%installfloatmethod \s!pagegrid \v!rightedge
+%installfloatmethod \s!pagegrid \v!somewhere
+%installfloatmethod \s!pagegrid \v!backspace
+%installfloatmethod \s!pagegrid \v!cutspace
+\installfloatmethod \s!pagegrid \s!tblr \page_grid_place_float_slot
+\installfloatmethod \s!pagegrid \s!lrtb \page_grid_place_float_slot
+\installfloatmethod \s!pagegrid \s!tbrl \page_grid_place_float_slot
+\installfloatmethod \s!pagegrid \s!rltb \page_grid_place_float_slot
+\installfloatmethod \s!pagegrid \s!fxtb \page_grid_place_float_slot
+\installfloatmethod \s!pagegrid \s!btlr \page_grid_place_float_slot
+\installfloatmethod \s!pagegrid \s!lrbt \page_grid_place_float_slot
+\installfloatmethod \s!pagegrid \s!btrl \page_grid_place_float_slot
+\installfloatmethod \s!pagegrid \s!rlbt \page_grid_place_float_slot
+\installfloatmethod \s!pagegrid \s!fxbt \page_grid_place_float_slot
+\installfloatmethod \s!pagegrid \s!fixd \page_grid_place_float_fixed
+
+%
+
+\unexpanded\def\page_grid_command_side_float_output
+ {} % nothing, reset anyway
+
+\unexpanded\def\page_grid_command_flush_side_floats
+ {\page_sides_forget_floats}
+
+\unexpanded\def\page_grid_command_synchronize_side_floats
+ {\page_sides_forget_floats}
+
+\unexpanded\def\page_grid_command_synchronize_hsize
+ {\page_grid_command_set_hsize}
+
+\defineoutputroutine
+ [\s!pagegrid]
+ [\s!page_otr_command_routine =\page_grid_command_routine,
+ \s!page_otr_command_package_contents =\page_grid_command_package_contents,
+ \s!page_otr_command_set_vsize =\page_grid_command_set_vsize,
+ \s!page_otr_command_set_hsize =\page_grid_command_set_hsize, % tricky, goes wrong
+ \s!page_otr_command_next_page =\page_grid_command_next_page,
+ \s!page_otr_command_next_page_and_inserts =\page_grid_command_next_page_and_inserts,
+ \s!page_otr_command_synchronize_hsize =\page_grid_command_synchronize_hsize,
+ % \s!page_otr_command_set_top_insertions =\page_grid_command_set_top_insertions,
+ % \s!page_otr_command_set_bottom_insertions =\page_grid_command_set_bottom_insertions,
+ % \s!page_otr_command_flush_top_insertions =\page_grid_command_flush_top_insertions,
+ % \s!page_otr_command_flush_bottom_insertions =\page_grid_command_flush_bottom_insertions,
+ % \s!page_otr_command_set_float_hsize =\page_grid_command_set_float_hsize,
+ \s!page_otr_command_check_if_float_fits =\page_grid_command_check_if_float_fits,
+ % \s!page_otr_command_flush_float_box =\page_grid_command_flush_float_box,
+ \s!page_otr_command_synchronize_side_floats =\page_grid_command_synchronize_side_floats,
+ \s!page_otr_command_side_float_output =\page_grid_command_side_float_output,
+ \s!page_otr_command_flush_floats =\page_grid_command_flush_floats,
+ \s!page_otr_command_flush_side_floats =\page_grid_command_flush_side_floats,
+ \s!page_otr_command_flush_saved_floats =\page_grid_command_flush_saved_floats
+ % \s!page_otr_command_flush_margin_blocks =\page_grid_command_flush_margin_blocks, % not used
+ ]
+
+% spans
+
+\installcorenamespace{pagegridspan}
+
+\installframedcommandhandler \??pagegridspan {pagegridspan} \??pagegridspan
+
+\setuppagegridspan
+ [\c!frame=\v!off,
+ \c!before=,
+ \c!after=,
+ \c!offset=\v!overlay,
+ \c!location=\v!left,
+ \c!linecorrection=\v!off,
+ \c!depthcorrection=\v!off,
+ \c!n=\plustwo,
+ \c!nlines=\zerocount,
+ \c!align=\v!normal,
+ \c!width=\d_page_grid_span_width,
+ \c!indenting=,
+ \c!indentnext=\v!yes,
+ \c!default=\v!here,
+ \c!alternative=\v!a]
+
+\newdimen\d_page_grid_span_width
+
+\unexpanded\def\startpagegridspan
+ {\dotripleempty\page_grid_span_start}
+
+\def\page_grid_span_start[#1][#2][#3]% [#3] gobbles space
+ {\endgraf % else rubish output if forgotten
+ \synchronizepagegrid
+ \bgroup
+ \forgetall
+ \edef\currentpagegridspan{#1}%
+ \clf_sethsizecolumnspan{\currentpagegrid}\pagegridspanparameter\c!n\relax
+ \setbox\scratchbox\hbox\bgroup\inheritedpagegridspanframed\bgroup
+ \usepagegridspanstyleandcolor\c!style\c!color
+ \pagegridspanparameter\c!before
+ \ignorespaces}
+
+\unexpanded\def\stoppagegridspan
+ {\removeunwantedspaces
+ \par
+ \verticalstrut
+ \kern-2\struttotal
+ \verticalstrut
+ \endgraf
+ \pagegridspanparameter\c!after
+ \egroup\egroup
+ \setpagegrid{\box\scratchbox}%
+ % todo: push into slot
+ \egroup
+ \endgraf}
+
+\def\pagegridspanwidth#1% assumes equal distances
+ {\the\dimexpr
+ #1\d_page_grid_column_width
+ +#1\d_page_grid_distance
+ - \d_page_grid_distance
+ \relax}
+
+% areas
+
+\installcorenamespace{pagegridarea}
+
+\installframedcommandhandler \??pagegridarea {pagegridarea} \??pagegridarea
+
+\setuppagegridarea
+ [\c!x=\plusone,
+ \c!y=\plusone,
+ \c!nx=\plusone,
+ \c!ny=\plusone,
+ \c!clipoffset=2\lineheight,
+ \c!leftoffset=\zeropoint,
+ \c!rightoffset=\zeropoint,
+ \c!offset=\v!overlay,
+ \c!strut=\v!no,
+ \c!frame=\v!off,
+ %\c!type=\v!next,
+ \c!align=\v!normal,
+ \c!page=\plusone,
+ \c!state=\v!stop]
+
+% type: both fixed left right next (not now), then better
+% lefttext and righttext or so
+
+\appendtoks
+ % \edef\p_type{}%
+ % \ifx\p_type\v!next
+ % \doifelseoddpage
+ % {\letpagegridareaparameter\c!type\v!right}%
+ % {\letpagegridareaparameter\c!type\v!left}%
+ % \fi
+ \clf_registercolumnsetarea {
+ name {\currentpagegridarea}
+ % type {\p_type}
+ % page \pagegridareaparameter\c!page
+ state {\pagegridareaparameter\c!state}
+ c \pagegridareaparameter\c!x
+ r \pagegridareaparameter\c!y
+ nc \pagegridareaparameter\c!nx
+ nr \pagegridareaparameter\c!ny
+ }%
+\to \everydefinepagegridarea
+
+\unexpanded\def\setuppagegridareatext
+ {\dodoubleargument\page_grid_set_area_text}
+
+\def\page_grid_set_area_text[#1][#2]%
+ {\edef\currentpagegridarea{#1}%
+ \setpagegridareaparameter\c!text{#2}}
+
+% maybe move the left/right correction to the tex end or the offset to lua
+
+\unexpanded\def\page_grid_set_area#1#2#3#4#5#6#7#8% can be optimized
+ {\begingroup
+ \edef\currentpagegridarea{#2}%
+ \setpagegridareaparameter\c!width {#5\scaledpoint}%
+ \setpagegridareaparameter\c!height{#6\scaledpoint}%
+ \setbox\nextbox\hpack\bgroup\inheritedpagegridareaframed\bgroup
+ \usepagegridareastyleandcolor\c!style\c!color
+ \ignorespaces
+ \pagegridareaparameter\c!text
+ \egroup\egroup
+ %
+ \scratchdimen#8\scaledpoint
+ \ifdim\scratchdimen>\zeropoint
+ \setbox\scratchbox\vbox\bgroup
+ \clip
+ [ \c!offset=\pagegridareaparameter\c!clipoffset,%
+ \c!rightoffset=\pagegridareaparameter\c!rightoffset,%
+ \c!width=\scratchdimen,%
+ % \c!height=
+ ]%
+ {\copy\nextbox}%
+ \egroup
+ \clf_setcolumnsetarea{name {#1} box \scratchbox c #3 r #4}%
+ \setbox\scratchbox\vbox\bgroup
+ \hskip-\layoutparameter\c!backspace % todo: #9
+ \clip
+ [ \c!offset=\pagegridareaparameter\c!clipoffset,%
+ \c!leftoffset=\pagegridareaparameter\c!rightoffset,%
+ \c!hoffset=\scratchdimen,%
+ \c!width=\dimexpr\wd\nextbox-\scratchdimen\relax,%
+ % \c!height=
+ ]%
+ {\box\nextbox}%
+ \egroup
+ \clf_setcolumnsetarea{name {#1} box \scratchbox c #7 r #4}%
+ \else
+ \setbox\scratchbox\vbox\bgroup
+ \box\nextbox % wrapping needed
+ \egroup
+ \clf_setcolumnsetarea{name {#1} box \scratchbox c #3 r #4}%
+ \fi
+ \endgroup}
+
+\let\setpagegridarea\page_grid_set_area
+
+% state start | repeat
+
+% for now (transition)
+
+\let\definecolumnset \definepagegrid
+\let\setupcolumnset \setuppagegrid
+\let\setupcolumnsetlines \setuppagegridlines
+\let\setupcolumnsetstart \setuppagegridstart
+\let\startcolumnset \startpagegrid
+\let\stopcolumnset \stoppagegrid
+\let\definecolumnsetspan \definepagegridspan
+\let\setupcolumnsetspan \setuppagegridspan
+\let\startcolumnsetspan \startpagegridspan
+\let\stopcolumnsetspan \stoppagegridspan
+\let\columnsetspanwidth \pagegridspanwidth
+\let\definecolumnsetarea \definepagegridarea
+\let\setupcolumnsetarea \setuppagegridarea
+\let\setupcolumnsetareatext\setuppagegridareatext
+
+\protect
+
diff --git a/Master/texmf-dist/tex/context/base/page-fac.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-fac.mkiv
index 88789abe9fb..88789abe9fb 100644
--- a/Master/texmf-dist/tex/context/base/page-fac.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-fac.mkiv
diff --git a/Master/texmf-dist/tex/context/base/page-flt.lua b/Master/texmf-dist/tex/context/base/mkiv/page-flt.lua
index e91285d0a64..caa8d490d19 100644
--- a/Master/texmf-dist/tex/context/base/page-flt.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-flt.lua
@@ -21,9 +21,7 @@ local C, S, P, lpegmatch = lpeg.C, lpeg.S, lpeg.P, lpeg.match
-- we use floatbox, floatwidth, floatheight
-- text page leftpage rightpage (todo: top, bottom, margin, order)
-local copy_node_list = node.copy_list
local flush_node_list = node.flush_list
-local copy_node = node.copy
local setdimen = tex.setdimen
local setcount = tex.setcount
@@ -34,6 +32,13 @@ local textakebox = nodes.takebox
floats = floats or { }
local floats = floats
+local context = context
+local commands = commands
+local interfaces = interfaces
+local showmessage = interfaces.showmessage
+local implement = interfaces.implement
+local setmacro = interfaces.setmacro
+
local noffloats = 0
local last = nil
local default = "text"
@@ -118,12 +123,13 @@ function floats.save(which,data)
box = b,
}
insert(stack,t)
+-- inspect(stacks)
setcount("global","savednoffloats",#stacks[default])
if trace_floats then
report_floats("%s, category %a, number %a, slot %a, width %p, height %p, depth %p","saving",
which,noffloats,#stack,b.width,b.height,b.depth)
else
- interfaces.showmessage("floatblocks",2,noffloats)
+ showmessage("floatblocks",2,noffloats)
end
else
report_floats("ignoring empty, category %a, number %a",which,noffloats)
@@ -137,12 +143,13 @@ function floats.resave(which)
local b = textakebox("floatbox")
last.box = b
insert(stack,1,last)
+-- inspect(stacks)
setcount("global","savednoffloats",#stacks[default])
if trace_floats then
report_floats("%s, category %a, number %a, slot %a width %p, height %p, depth %p","resaving",
which,noffloats,#stack,b.width,b.height,b.depth)
else
- interfaces.showmessage("floatblocks",2,noffloats)
+ showmessage("floatblocks",2,noffloats)
end
else
report_floats("unable to resave float")
@@ -151,15 +158,19 @@ end
function floats.flush(which,n,bylabel)
which = which or default
+-- inspect(stacks)
local stack = stacks[which]
local t, b, n = get(stack,n or 1,bylabel)
if t then
+ if not b then
+ showmessage("floatblocks",1,t.n)
+ end
if trace_floats then
local w, h, d = setdimensions(b) -- ?
report_floats("%s, category %a, number %a, slot %a width %p, height %p, depth %p","flushing",
which,t.n,n,w,h,d)
else
- interfaces.showmessage("floatblocks",3,t.n)
+ showmessage("floatblocks",3,t.n)
end
texsetbox("floatbox",b)
last = remove(stack,n)
@@ -175,8 +186,8 @@ function floats.consult(which,n)
local stack = stacks[which]
local t, b, n = get(stack,n)
if t then
+ local w, h, d = setdimensions(b)
if trace_floats then
- local w, h, d = setdimensions(b)
report_floats("%s, category %a, number %a, slot %a width %p, height %p, depth %p","consulting",
which,t.n,n,w,h,d)
end
@@ -277,11 +288,6 @@ end
-- interface
-local context = context
-local commands = commands
-local implement = interfaces.implement
-local setmacro = interfaces.setmacro
-
implement {
name = "flushfloat",
actions = floats.flush,
@@ -367,7 +373,7 @@ implement {
implement {
name = "analysefloatmethod",
actions = function(str)
- local method, label, row, column = floats.analysemethod(str)
+ local method, label, column, row = floats.analysemethod(str)
setmacro("floatmethod",method or "")
setmacro("floatlabel", label or "")
setmacro("floatrow", row or "")
diff --git a/Master/texmf-dist/tex/context/base/page-flt.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-flt.mkiv
index 16c42713970..c514496dfd4 100644
--- a/Master/texmf-dist/tex/context/base/page-flt.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-flt.mkiv
@@ -194,7 +194,7 @@
\page_floats_flush\s!text\plusone
\ifconditional\c_page_floats_center_box
\ifdim\wd\globalscratchbox<\hsize
- \global\setbox\floatbox\hbox to \hsize{\hss\box\floatbox\hss}%
+ \global\setbox\floatbox\hpack to \hsize{\hss\box\floatbox\hss}%
\else
% retain special alignments
\ifinsidecolumns
@@ -258,7 +258,7 @@
{\page_floats_flush{#1}\plusone
\edef\floatspecification{\clf_getfloatvariable{specification}}% Is this okay?
\the\everybeforeflushedpagefloat
- \vbox to \textheight
+ \vpack to \textheight
{\doifnotinset\v!high\floatspecification\vfill
\box\floatbox
\doifnotinset\v!low\floatspecification\vfill}%
diff --git a/Master/texmf-dist/tex/context/base/page-flw.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-flw.mkiv
index 56fe32e5b9e..56fe32e5b9e 100644
--- a/Master/texmf-dist/tex/context/base/page-flw.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-flw.mkiv
diff --git a/Master/texmf-dist/tex/context/base/page-grd.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-grd.mkiv
index e70414b666c..4125eb46aea 100644
--- a/Master/texmf-dist/tex/context/base/page-grd.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-grd.mkiv
@@ -30,17 +30,19 @@
\c_page_grids_columns_mode\plusone
\processallactionsinset
[#1]%
- [ \v!reset=>\c_page_grids_location \zerocount,
- \v!bottom=>\c_page_grids_location \plusone,
- \v!top=>\c_page_grids_location \plustwo,
- \v!none=>\c_page_grids_line_mode \zerocount,
- \v!all=>\c_page_grids_line_mode \plusone,
- \v!lines=>\c_page_grids_line_mode \plustwo,
- \v!frame=>\c_page_grids_line_mode \plusthree,
- \v!nonumber=>\c_page_grids_lineno_mode\zerocount,
- \v!right=>\c_page_grids_lineno_mode\plusone,
- \v!left=>\c_page_grids_lineno_mode\plustwo,
- \v!outer=>\c_page_grids_lineno_mode\plusthree]%
+ [ \v!reset=>\c_page_grids_location \zerocount
+ \c_page_grids_columns_mode\zerocount,
+ \v!bottom=>\c_page_grids_location \plusone,
+ \v!top=>\c_page_grids_location \plustwo,
+ \v!none=>\c_page_grids_line_mode \zerocount,
+ \v!all=>\c_page_grids_line_mode \plusone,
+ \v!lines=>\c_page_grids_line_mode \plustwo,
+ \v!frame=>\c_page_grids_line_mode \plusthree,
+ \v!nonumber=>\c_page_grids_lineno_mode \zerocount,
+ \v!right=>\c_page_grids_lineno_mode \plusone,
+ \v!left=>\c_page_grids_lineno_mode \plustwo,
+ \v!outer=>\c_page_grids_lineno_mode \plusthree,
+ \v!columns=>\c_page_grids_columns_mode\plusone]% new option
\ifcase\c_page_grids_location
\let\page_grids_add_to_box\gobbleoneargument
\else % 1=bottom 2=top
@@ -92,13 +94,13 @@
\def\page_grids_add_to_one_indeed#1%
{\begingroup
\resetvisualizers
- \global\setbox#1\vbox{\backgroundline[layout:one]{\box#1}}%
+ \global\setbox#1\vpack{\backgroundline[layout:one]{\box#1}}%
\endgroup}
\def\page_grids_add_to_mix_indeed#1%
{\begingroup
\resetvisualizers
- \global\setbox#1\vbox{\backgroundline[layout:mix]{\box#1}}%
+ \global\setbox#1\vpack{\backgroundline[layout:mix]{\box#1}}%
\endgroup}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/page-imp.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-imp.mkiv
index 198a982298c..c08f9856fa7 100644
--- a/Master/texmf-dist/tex/context/base/page-imp.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-imp.mkiv
@@ -73,12 +73,19 @@
\unexpanded\def\invokepagehandler#1%
{\expandnamespacevalue\??shipoutmethod{#1}\v!normal}
+% \def\page_shipouts_handle
+% {\csname\??shipoutmethod\ifcsname\??shipoutmethod\v_page_target_method\endcsname
+% \v_page_target_method
+% \else
+% \v!none
+% \fi\endcsname}
+
\def\page_shipouts_handle
- {\csname\??shipoutmethod\ifcsname\??shipoutmethod\v_page_target_method\endcsname
- \v_page_target_method
+ {\ifcsname\??shipoutmethod\v_page_target_method\endcsname
+ \expandafter\lastnamedcs
\else
- \v!none
- \fi\endcsname}
+ \expandafter\page_shipouts_ignore
+ \fi}
\installshipoutmethod \v!normal
{\ifarrangingpages
@@ -108,7 +115,7 @@
\ifcase\shipoutfinalizemethod
\page_shipouts_handle{#1}%
\else
- \setbox\shipoutscratchbox\hbox{#1}% just in case there are objects there, hook for testing (will go away)
+ \setbox\shipoutscratchbox\hpack{#1}% just in case there are objects there, hook for testing (will go away)
\finalizeshipoutbox\shipoutscratchbox
\page_shipouts_handle{\box\shipoutscratchbox}%
\fi
@@ -124,13 +131,13 @@
{[\ifarrangingpages arranged \fi page
\ifarrangingpages\the\arrangeno\else\the\realpageno\fi\normalspace
not flushed]}%
- \setbox\scratchbox\hbox{#1}%
+ \setbox\scratchbox\hpack{#1}%
\deadcycles\zerocount
\endgroup}
\def\page_otr_flush_every_stuff
{\begingroup
- \setbox\scratchbox\hbox
+ \setbox\scratchbox\hpack
{% before the main one !
\ifcase\realfolio \or
\the\everyfirstshipout
@@ -166,15 +173,15 @@
\normalexpanded{\doifelseinset{\the\shippedoutpages}{\pagestoshipout}}\donetrue\donefalse
\fi
\ifdone
- \setbox\shipoutscratchbox\hbox{#1}%
+ \setbox\shipoutscratchbox\hpack{#1}%
\ifcase\shipoutfinalizemethod
\finalizeshipoutbox\shipoutscratchbox
\fi
- \normalshipout\vbox
+ \normalshipout\vpack
{\offinterlineskip
\vskip\d_page_shipouts_offset
\hskip\d_page_shipouts_offset
- \hbox
+ \hpack
{\page_otr_flush_every_stuff
\page_otr_flush_special_content
\box\shipoutscratchbox}}%
@@ -185,7 +192,7 @@
\def\page_shipouts_arrange#1%
{% \global\advance\shippedoutpages\plusone
\begingroup
- \setbox\scratchbox\hbox
+ \setbox\scratchbox\hpack
{\page_otr_flush_every_stuff
\page_otr_flush_special_content
\box\shipoutscratchbox}%
@@ -297,7 +304,7 @@
{\setgvalue{\??layoutarranger#1}}
\def\checkinstalledpagearrangement#1% can be empty: aaa,,bbb
- {\executeifdefined{\??layoutarranger#1}\donothing}
+ {\begincsname\??layoutarranger#1\endcsname}
\let\poparrangedpages\relax
\let\pusharrangedpage\relax
@@ -375,12 +382,12 @@
\fi}
\def\handlearrangedpageXandY#1#2#3#4#5%
- {\global\setbox#5\hbox to \arrangedpageX\paperwidth
- {\setbox\scratchbox\vbox to \arrangedpageY\paperheight
+ {\global\setbox#5\hpack to \arrangedpageX\paperwidth
+ {\setbox\scratchbox\vpack to \arrangedpageY\paperheight
{\offinterlineskip
\vskip#4\paperheight
\hskip#3\paperwidth
- \dorotatebox{\ifcase#2 0\else180\fi}\hbox{\box#1}%
+ \dorotatebox{\ifcase#2 0\else180\fi}\hpack{\box#1}%
\vfill}%
\wd\scratchbox\zeropoint
\box\scratchbox\box#5\hss}}
@@ -394,15 +401,15 @@
\forgetall % somehow we're back and need to redo this
\gotonextarrangepage
\ifnum\arrangedrotationO\arrangedrotationE>\zerocount
- \setbox#1\vbox
+ \setbox#1\vpack
{\ifconditional\arrangeddoublestate
\ifodd\arrangeno
- \dorotatebox\arrangedrotationO\hbox{\box#1}%
+ \dorotatebox\arrangedrotationO\hpack{\box#1}%
\else
- \dorotatebox\arrangedrotationE\hbox{\box#1}%
+ \dorotatebox\arrangedrotationE\hpack{\box#1}%
\fi
\else
- \dorotatebox\arrangedrotationO\hbox{\box#1}%
+ \dorotatebox\arrangedrotationO\hpack{\box#1}%
\fi}%
\fi
\ifconditional\arrangedmirrorstate
@@ -550,14 +557,14 @@
\def\handlearrangedpageSIDE
{\wd\arrangedpageA\paperwidth
\wd\arrangedpageB\paperwidth
- \global\setbox\arrangedpageA\hbox
+ \global\setbox\arrangedpageA\hpack
{\box\arrangedpageA\box\arrangedpageB}%
\ht\arrangedpageA\paperheight}
\def\handlearrangedpageTOP
{\ht\arrangedpageA\paperheight
\ht\arrangedpageB\paperheight
- \global\setbox\arrangedpageA\vbox
+ \global\setbox\arrangedpageA\vpack
{\offinterlineskip\vskip\paperheight
\box\arrangedpageA\box\arrangedpageB}%
\global\setbox\arrangedpageB\box\scratchbox} % ?
@@ -577,14 +584,14 @@
\ht\arrangedpageA\paperheight
\ht\arrangedpageB\paperheight
\ifconditional\arrangedswapstate
- \global\setbox\arrangedpageA\hbox
+ \global\setbox\arrangedpageA\hpack
{\page_boxes_apply_clip_print_left \arrangedpageA
\box\arrangedpageA
\page_boxes_apply_clip_print_right\arrangedpageB
\box\arrangedpageB}%
\setfalse\arrangedswapstate
\else
- \global\setbox\arrangedpageA\hbox
+ \global\setbox\arrangedpageA\hpack
{\page_boxes_apply_clip_print_left \arrangedpageB
\box\arrangedpageB
\page_boxes_apply_clip_print_right\arrangedpageA
@@ -598,14 +605,14 @@
\ht\arrangedpageA\paperheight
\ht\arrangedpageB\paperheight
\ifconditional\arrangedswapstate
- \global\setbox\arrangedpageA\vbox
+ \global\setbox\arrangedpageA\vpack
{\offinterlineskip
\vskip\paperheight
\box\arrangedpageA
\box\arrangedpageB}%
\setfalse\arrangedswapstate
\else
- \global\setbox\arrangedpageA\vbox
+ \global\setbox\arrangedpageA\vpack
{\offinterlineskip
\vskip\paperheight
\box\arrangedpageB
@@ -635,14 +642,14 @@
\def\pusharrangedpageTWO#1%
{\advancearrangedpageN
\reportarrangedpage\arrangedpageN
- \global\setbox\arrangedpageB\vbox
+ \global\setbox\arrangedpageB\vpack
{\offinterlineskip
\unvbox\arrangedpageB
\allowbreak
- \setbox#1\vbox{\box#1}% really needed in order to keep real dimensions
+ \setbox#1\vpack{\box#1}% really needed in order to keep real dimensions
\ht#1\onepoint
\dp#1\zeropoint
- \vbox{\box#1}}}
+ \vpack{\box#1}}}
\def\poparrangedpagesTWOTOPSIDE
{\ifnum\arrangedpageN>\zerocount
@@ -757,7 +764,6 @@
{\dosetuparrangement{2}{4}{8}{3}{5}% X,Y,Total,hcutmarks,vcutmarks
\pusharrangedpageSIXTEENZ\poparrangedpagesAB\relax}
-
\def\pusharrangedpageSIXTEENZ#1%
{\advancearrangedpageN
\reportarrangedpage\arrangedpageN
@@ -1014,9 +1020,9 @@
\installpagearrangement 1*2-Conference
{\dosetuparrangement{1}{2}{4}{3}{2}% X,Y,Total,hcutmarks,vcutmarks
- \pusharrangedpageCONFERENCE2\poparrangedpagesAB\relax}
+ \pusharrangedpageCONFERENCETWO\poparrangedpagesAB\relax}
-\def\pusharrangedpageCONFERENCE2#1%
+\def\pusharrangedpageCONFERENCETWO#1%
{\advancearrangedpageN
\reportarrangedpage\arrangedpageN
\ifcase\arrangedpageN
@@ -1030,9 +1036,9 @@
\installpagearrangement 1*4-Conference
{\dosetuparrangement{1}{2}{4}{3}{2}% X,Y,Total,hcutmarks,vcutmarks
- \pusharrangedpageCONFERENCE4\poparrangedpagesAB\relax}
+ \pusharrangedpageCONFERENCEFOUR\poparrangedpagesAB\relax}
-\def\pusharrangedpageCONFERENCE4#1%
+\def\pusharrangedpageCONFERENCEFOUR#1%
{\advancearrangedpageN
\reportarrangedpage\arrangedpageN
\ifcase\arrangedpageN
@@ -1185,11 +1191,11 @@
%
% \starttext \dorecurse{30}{test \recurselevel \page} \stoptext
-\def\pusharrangedpageXY#1%
+\unexpanded\def\pusharrangedpageXY#1%
{\advancearrangedpageN
\global\advance\arrangedpageM\plusone
\reportarrangedpage\arrangedpageN
- \global\setbox\arrangedpageB\hbox \ifdim\v_page_target_width>\zeropoint to \v_page_target_width \fi
+ \global\setbox\arrangedpageB\hpack \ifdim\v_page_target_width>\zeropoint to \v_page_target_width \fi
{\ifvoid\arrangedpageB\else
\unhbox\arrangedpageB
\ifdim\v_page_target_dx>\zeropoint
@@ -1202,7 +1208,7 @@
\fi
\box#1}%
\ifnum\arrangedpageM<\arrangedpageX\else
- \global\setbox\arrangedpageA\vbox \ifdim\v_page_target_height>\zeropoint to \v_page_target_height \fi
+ \global\setbox\arrangedpageA\vpack \ifdim\v_page_target_height>\zeropoint to \v_page_target_height \fi
{\offinterlineskip
\ifvoid\arrangedpageA\else
\unvbox\arrangedpageA
@@ -1221,7 +1227,7 @@
\poparrangedpages
\fi}
-\def\poparrangedpagesXY
+\unexpanded\def\poparrangedpagesXY
{\ifnum\arrangedpageN>\zerocount
\paperwidth \arrangedpageX\paperwidth
\paperheight\arrangedpageY\paperheight
@@ -1267,7 +1273,7 @@
\setuppaper
[\c!width =\dimexpr\printpaperwidth -2\v_page_target_backspace\relax,
\c!height=\dimexpr\printpaperheight-2\v_page_target_topspace \relax]
-
+
% \definepageshift[test][horizontal][10pt,20pt,30pt,40pt,50pt]
% \definepageshift[test][vertical] [10pt,20pt,30pt,40pt,50pt]
%
@@ -1334,7 +1340,7 @@
\def\page_boxes_apply_shift_indeed#1%
{\edef\next{\wd#1\the\wd#1\ht#1\the\ht#1\dp#1\the\dp#1}%
- \setbox#1\vbox
+ \setbox#1\vpack
{\offinterlineskip
\vskip\d_page_boxes_v_shifts
\hskip\d_page_boxes_h_shifts
@@ -1346,8 +1352,10 @@
\def\page_boxes_setup_shift[#1][#2][#3]% page|paper horizontal vertical
{\ifthirdargument % paper=arrange
- \edef\page_boxes_h_shifts{\ifcsname\??pageshift\v!horizontal:#2\endcsname\csname\??pageshift\v!horizontal:#2\endcsname\fi}%
- \edef\page_boxes_v_shifts{\ifcsname\??pageshift\v!vertical :#3\endcsname\csname\??pageshift\v!vertical :#3\endcsname\fi}%
+ %edef\page_boxes_h_shifts{\ifcsname\??pageshift\v!horizontal:#2\endcsname\csname\??pageshift\v!horizontal:#2\endcsname\fi}%
+ %edef\page_boxes_v_shifts{\ifcsname\??pageshift\v!vertical :#3\endcsname\csname\??pageshift\v!vertical :#3\endcsname\fi}%
+ \edef\page_boxes_h_shifts{\begincsname\??pageshift\v!horizontal:#2\endcsname}%
+ \edef\page_boxes_v_shifts{\begincsname\??pageshift\v!vertical :#3\endcsname}%
\doifelse{#1}\v!page {\let\page_boxes_apply_shift_print\page_boxes_apply_shift}{\let\page_boxes_apply_shift_print\gobbleoneargument}%
\doifelse{#1}\v!paper{\let\page_boxes_apply_shift_paper\page_boxes_apply_shift}{\let\page_boxes_apply_shift_paper\gobbleoneargument}%
\else\ifsecondargument
diff --git a/Master/texmf-dist/tex/context/base/page-inf.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-inf.mkiv
index acfbf26f6ab..f60977e0c97 100644
--- a/Master/texmf-dist/tex/context/base/page-inf.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-inf.mkiv
@@ -89,7 +89,7 @@
\def\page_info_add_to_box_indeed#1%
{\scratchdimen\wd#1%
- \setbox\b_page_versions\vbox to \ht#1%
+ \setbox\b_page_versions\vpack to \ht#1%
{\vfill
\settexthoffset
\hsize\dimexpr\scratchdimen-2\texthoffset\relax
@@ -98,7 +98,7 @@
\vskip\bodyfontsize}%
\dp\b_page_versions\zeropoint
\wd\b_page_versions\scratchdimen
- \setbox#1\hbox{\box#1\hskip-\scratchdimen\box\b_page_versions}}
+ \setbox#1\hpack{\box#1\hskip-\scratchdimen\box\b_page_versions}}
\setupversion % resets
[\v!final]
diff --git a/Master/texmf-dist/tex/context/base/page-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-ini.mkiv
index 15783a99bc3..6f6cb7180ff 100644
--- a/Master/texmf-dist/tex/context/base/page-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-ini.mkiv
@@ -178,7 +178,7 @@
\newbox \b_page_boxes_saved_page_body
\def\page_boxes_constructed_page_body#1#2%
- {\ifconditional\c_page_boxes_save_page_body \global\setbox\b_page_boxes_saved_page_body \fi \vbox \bgroup
+ {\ifconditional\c_page_boxes_save_page_body \global\setbox\b_page_boxes_saved_page_body \fi \vpack \bgroup
\boxmaxdepth\maxdimen % new
\dontcomplain
\page_marks_synchronize_page {#2}% we could consider doing this for \pagebox (needs testing)
@@ -220,13 +220,14 @@
\to \everybeforepagebody
\def\page_boxes_constructed_page#1#2%
- {\vbox\bgroup % intercept spurious spaces
+ {\vpack\bgroup % intercept spurious spaces
\the\everybeforepagebody
\starttextproperties
\checkmarginblocks
\the\beforeeverypage
\normalexpanded{\global\beforepage\emptytoks\the\beforepage}%
\inpagebodytrue
+ \pagebodymode\plusone % todo: \plustwo when spread
\page_boxes_constructed_page_body#1#2%
\normalexpanded{\global\afterpage \emptytoks\the\afterpage }%
\the\aftereverypage
diff --git a/Master/texmf-dist/tex/context/base/page-inj.lua b/Master/texmf-dist/tex/context/base/mkiv/page-inj.lua
index fd66ead08d1..fd66ead08d1 100644
--- a/Master/texmf-dist/tex/context/base/page-inj.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-inj.lua
diff --git a/Master/texmf-dist/tex/context/base/page-inj.mkvi b/Master/texmf-dist/tex/context/base/mkiv/page-inj.mkvi
index 03472fe5593..03472fe5593 100644
--- a/Master/texmf-dist/tex/context/base/page-inj.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-inj.mkvi
diff --git a/Master/texmf-dist/tex/context/base/page-ins.lua b/Master/texmf-dist/tex/context/base/mkiv/page-ins.lua
index 235f586c689..235f586c689 100644
--- a/Master/texmf-dist/tex/context/base/page-ins.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-ins.lua
diff --git a/Master/texmf-dist/tex/context/base/page-ins.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-ins.mkiv
index c91073a143d..c91073a143d 100644
--- a/Master/texmf-dist/tex/context/base/page-ins.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-ins.mkiv
diff --git a/Master/texmf-dist/tex/context/base/page-lay.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-lay.mkiv
index d1328bb6ba0..1fde9e9c9c5 100644
--- a/Master/texmf-dist/tex/context/base/page-lay.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-lay.mkiv
@@ -379,8 +379,11 @@
\letvalue{\??layoutcurrent\currentlayouttarget}\relax
\to \everydefinelayouttarget
-\def\page_paper_the_paper_size#1{\ifcsname\??layoutpaper#1\endcsname\csname\??layoutpaper#1\endcsname\else#1\fi}
-\def\page_paper_the_print_size#1{\ifcsname\??layoutprint#1\endcsname\csname\??layoutprint#1\endcsname\else#1\fi}
+%def\page_paper_the_paper_size#1{\ifcsname\??layoutpaper#1\endcsname\csname\??layoutpaper#1\endcsname\else#1\fi}
+%def\page_paper_the_print_size#1{\ifcsname\??layoutprint#1\endcsname\csname\??layoutprint#1\endcsname\else#1\fi}
+
+\def\page_paper_the_paper_size#1{\ifcsname\??layoutpaper#1\endcsname\lastnamedcs\else#1\fi}
+\def\page_paper_the_print_size#1{\ifcsname\??layoutprint#1\endcsname\lastnamedcs\else#1\fi}
% \setuppaper [page=A4,paper=A3] % the k/v variant, changes the current page mapping
% \setuppapersize[A4][a=b,c=d] % the k/v variant, changes nothing, just settings
@@ -497,8 +500,11 @@
\setvalue{\??layoutprint\number\leftrotationangle }{\global\c_page_target_print_orientation\leftrotationangle
\global\c_page_target_print_reverse \rightrotationangle}
-\def\page_paper_handle_page_option #1{\ifcsname\??layoutpaper#1\endcsname\csname\??layoutpaper#1\endcsname\fi}
-\def\page_paper_handle_print_option#1{\ifcsname\??layoutprint#1\endcsname\csname\??layoutprint#1\endcsname\fi}
+%def\page_paper_handle_page_option #1{\ifcsname\??layoutpaper#1\endcsname\csname\??layoutpaper#1\endcsname\fi}
+%def\page_paper_handle_print_option#1{\ifcsname\??layoutprint#1\endcsname\csname\??layoutprint#1\endcsname\fi}
+
+\def\page_paper_handle_page_option #1{\begincsname\??layoutpaper#1\endcsname}
+\def\page_paper_handle_print_option#1{\begincsname\??layoutprint#1\endcsname}
\unexpanded\def\page_paper_identify_target#1%
{\ifcsname\??layoutcurrent#1\endcsname
@@ -578,7 +584,13 @@
\endgroup
\fi
%\writestatus{layout target}{(\the\paperwidth,\the\paperheight) -> (\the\printpaperwidth,\the\printpaperheight)}%
- \page_layouts_synchronize}
+ \page_layouts_synchronize
+ % new but we assume \setuplayout
+ \scrn_canvas_synchronize_only}
+
+\ifdefined\scrn_canvas_synchronize_only \else
+ \let\scrn_canvas_synchronize_only\relax
+\fi
\ifdefined\page_paper_set_offsets \else
@@ -730,7 +742,7 @@
\letvalue{\??layoutcolumn0}\zeropoint
-\def\layoutcolumnoffset#1%
+\def\layoutcolumnoffset#1% can travel around so we can't use \lastnamedcs
{\csname\??layoutcolumn\ifcsname\??layoutcolumn#1\endcsname#1\else0\fi\endcsname}
\def\page_layouts_synchronize_at_start
@@ -821,12 +833,19 @@
\installlayoutmethod\v!default{\page_layouts_check_default}
\installlayoutmethod\v!normal {\page_layouts_check_default}
+% \def\page_layouts_check_next
+% {\csname\??layoutmethod\ifcsname\??layoutmethod\layoutparameter\c!method\endcsname
+% \layoutparameter\c!method
+% \else
+% \v!normal
+% \fi\endcsname}
+
\def\page_layouts_check_next
- {\csname\??layoutmethod\ifcsname\??layoutmethod\layoutparameter\c!method\endcsname
- \layoutparameter\c!method
+ {\ifcsname\??layoutmethod\layoutparameter\c!method\endcsname
+ \lastnamedcs
\else
- \v!normal
- \fi\endcsname}
+ \page_layouts_check_default
+ \fi}
\let\checkcurrentlayout\page_layouts_check_next % public and used in naw, so this synonym will stay
@@ -868,39 +887,48 @@
\appendtoks \page_layouts_check_next \to \everyaftershipout
\newconditional\c_page_layouts_location_is_set
+\newconditional\c_page_layouts_location_is_middle
\def\page_layouts_location_reset % we start in the left top and mirror right pages
{\setfalse\c_page_layouts_location_is_set
+ \setfalse\c_page_layouts_location_is_middle
\let\v_page_target_left_fill \relax
\let\v_page_target_right_fill \hss % ? \relax
\let\v_page_target_top_fill \relax
\let\v_page_target_bottom_fill\vss} % \relax}
\setvalue{\??layoutlocation\v!right }{\settrue\c_page_layouts_location_is_set
+ \setfalse\c_page_layouts_location_is_middle
\let\v_page_target_left_fill \hss
\let\v_page_target_right_fill \relax}
\setvalue{\??layoutlocation\v!left }{\settrue\c_page_layouts_location_is_set
+ \setfalse\c_page_layouts_location_is_middle
\let\v_page_target_left_fill \relax
\let\v_page_target_right_fill \hss}
\setvalue{\??layoutlocation\v!bottom }{\settrue\c_page_layouts_location_is_set
+ \setfalse\c_page_layouts_location_is_middle
\let\v_page_target_top_fill \vss
\let\v_page_target_bottom_fill\relax}
\setvalue{\??layoutlocation\v!top }{\settrue\c_page_layouts_location_is_set
+ \setfalse\c_page_layouts_location_is_middle
\let\v_page_target_top_fill \relax
\let\v_page_target_bottom_fill\vss}
\setvalue{\??layoutlocation\v!middle }{\settrue\c_page_layouts_location_is_set
+ \settrue\c_page_layouts_location_is_middle
\let\v_page_target_left_fill \hss
\let\v_page_target_right_fill \hss
\let\v_page_target_top_fill \vss
\let\v_page_target_bottom_fill\vss}
\setvalue{\??layoutlocation\empty }{\setfalse\c_page_layouts_location_is_set % default also signal to scrn_
+ \setfalse\c_page_layouts_location_is_middle
\let\v_page_target_right_fill \hss
\let\v_page_target_bottom_fill\hss}
\setvalue{\??layoutlocation\v!doublesided}{\settrue \c_page_target_print_doublesided}
\setvalue{\??layoutlocation\v!singlesided}{\setfalse\c_page_target_print_doublesided}
\def\page_target_check_centering_indeed#1%
- {\ifcsname\??layoutlocation#1\endcsname\csname\??layoutlocation#1\endcsname\fi}
+ % {\ifcsname\??layoutlocation#1\endcsname\csname\??layoutlocation#1\endcsname\fi}
+ {\begincsname\??layoutlocation#1\endcsname}
\unexpanded\def\page_target_check_centering
{\setfalse\c_page_target_print_doublesided
@@ -925,12 +953,19 @@
\installlayoutalternative\v!default{\page_boxes_construct_content_default}
\installlayoutalternative\v!normal {\page_boxes_construct_content_default}
+% \def\page_boxes_construct_content % targetbox flusher box
+% {\csname\??layoutalternative\ifcsname\??layoutalternative\layoutparameter\c!alternative\endcsname
+% \layoutparameter\c!alternative
+% \else
+% \v!normal
+% \fi\endcsname}
+
\def\page_boxes_construct_content % targetbox flusher box
- {\csname\??layoutalternative\ifcsname\??layoutalternative\layoutparameter\c!alternative\endcsname
- \layoutparameter\c!alternative
+ {\ifcsname\??layoutalternative\layoutparameter\c!alternative\endcsname
+ \expandafter\lastnamedcs
\else
- \v!normal
- \fi\endcsname}
+ \expandafter\page_boxes_construct_content_default
+ \fi}
%D \macros
%D {adaptlayout}
@@ -990,12 +1025,20 @@
\global\let\page_adepts_push\relax
\global\let\page_adepts_pop\page_adepts_pop_indeed}
+% \def\page_adapts_check
+% {\csname\??pageadaptations\the\ifcsname\??pageadaptations\the\realpageno\endcsname\realpageno\else\zerocount\fi\endcsname}
+%
+% \def\page_adapts_reset
+% {\ifcsname\??pageadaptations\the\realpageno\endcsname
+% \global\undefinevalue{\??pageadaptations\the\realpageno}%
+% \fi}
+
\def\page_adapts_check
- {\csname\??pageadaptations\the\ifcsname\??pageadaptations\the\realpageno\endcsname\realpageno\else\zerocount\fi\endcsname}
+ {\begincsname\??pageadaptations\the\realpageno\endcsname}
\def\page_adapts_reset
{\ifcsname\??pageadaptations\the\realpageno\endcsname
- \global\undefinevalue{\??pageadaptations\the\realpageno}%
+ \expandafter\glet\csname\??pageadaptations\the\realpageno\endcsname\relax
\fi}
\def\page_adepts_push_indeed
@@ -1262,7 +1305,7 @@
\def\outercombitotal {\dimexpr\outermargintotal+\outeredgetotal\relax}
\def\innersidetotal {\dimexpr\innermarginwidth+\inneredgetotal\relax}
\def\outersidetotal {\dimexpr\outermarginwidth+\outeredgetotal\relax}
-
+
%D \macros
%D {startlocallayout}
%D
diff --git a/Master/texmf-dist/tex/context/base/page-lin.lua b/Master/texmf-dist/tex/context/base/mkiv/page-lin.lua
index 5a447c45840..5b18d982373 100644
--- a/Master/texmf-dist/tex/context/base/page-lin.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-lin.lua
@@ -40,17 +40,20 @@ local v_next = variables.next
local v_page = variables.page
local v_no = variables.no
+local properties = nodes.properties
+
local nodecodes = nodes.nodecodes
local skipcodes = nodes.skipcodes
local whatcodes = nodes.whatcodes
+local listcodes = nodes.listcodes
local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
local whatsit_code = nodecodes.whatsit
local glue_code = nodecodes.glue
local glyph_code = nodecodes.glyph
+local line_code = listcodes.line
local leftskip_code = skipcodes.leftskip
-local textdir_code = whatcodes.dir
local a_displaymath = attributes.private('displaymath')
local a_linenumber = attributes.private('linenumber')
@@ -67,27 +70,39 @@ local getid = nuts.getid
local getsubtype = nuts.getsubtype
local getnext = nuts.getnext
local getattr = nuts.getattr
+local setattr = nuts.setattr
local getlist = nuts.getlist
local getbox = nuts.getbox
local getfield = nuts.getfield
+local setprop = nuts.setprop
+local getprop = nuts.getprop
+
local setfield = nuts.setfield
local traverse_id = nuts.traverse_id
local traverse = nuts.traverse
local copy_node = nuts.copy
-local hpack_node = nuts.hpack
+local hpack_nodes = nuts.hpack
+local linked_nodes = nuts.linked
local insert_node_after = nuts.insert_after
local insert_node_before = nuts.insert_before
local is_display_math = nuts.is_display_math
local leftmarginwidth = nuts.leftmarginwidth
-local negated_glue = nuts.pool.negatedglue
-local new_hlist = nuts.pool.hlist
+local nodepool = nuts.pool
+local negated_glue = nodepool.negatedglue
+local new_hlist = nodepool.hlist
+local new_kern = nodepool.kern
local ctx_convertnumber = context.convertnumber
local ctx_makelinenumber = context.makelinenumber
+local paragraphs = typesetters.paragraphs
+local addtoline = paragraphs.addtoline
+local checkline = paragraphs.checkline
+local moveinline = paragraphs.moveinline
+
-- cross referencing
function lines.number(n)
@@ -233,164 +248,231 @@ local function check_number(n,a,skip,sameline)
report_lines("skipping line number %s for setup %a: %s (%s)",#current_list,a,s,d.continue or v_no)
end
end
- ctx_makelinenumber(tag,skipflag,s,getfield(n,"shift"),getfield(n,"width"),leftmarginwidth(getlist(n)),getfield(n,"dir"))
+ local p = checkline(n)
+ if p then
+ ctx_makelinenumber(tag,skipflag,s,p.hsize,p.reverse and "TRT" or "TLT")
+ else
+ report_lines("needs checking")
+ end
end
end
--- xlist
--- xlist
--- hlist
+-- print(nodes.idstostring(list))
-local function identify(list)
- if list then
- for n in traverse_id(hlist_code,list) do
+-- hlists of type line will only have an attribute when the line number attribute
+-- still set at par building time which is not always the case unless we explicitly
+-- do a par before we end the line
+
+-- todo: check for a: when <= 0 then false
+
+local function lineisnumbered(n)
+ local n = getlist(n)
+ while n do
+ local id = getid(n)
+ if id == hlist_code or id == vlist_code then
+ -- this can hit fast as we inherit anchor attributes from parent
local a = getattr(n,a_linenumber)
- if a then
- return list, a
+ if a and a > 0 then
+ return a
+ end
+ elseif id == glyph_code then
+ local a = getattr(n,a_linenumber)
+ if a and a > 0 then
+ return a
+ else
+ return false
end
end
- local n = list
- while n do
- local id = getid(n)
- if id == hlist_code or id == vlist_code then
- local ok, a = identify(getlist(n))
- if ok then
- return ok, a
+ n = getnext(n)
+ end
+end
+
+local function listisnumbered(list)
+ if list then
+ for n in traverse_id(hlist_code,list) do
+ if getsubtype(n) == line_code then
+ local a = getattr(n,a_linenumber)
+ if a then
+ -- a quick test for lines (only valid when \par before \stoplinenumbering)
+ return a > 0 and list or false
+ else
+ -- a bit slower one, assuming that we have normalized and anchored
+ if lineisnumbered(n) then
+ return list
+ end
end
end
- n = getnext(n)
end
end
end
-function boxed.stage_zero(n)
- return identify(getlist(getbox(n)))
+local function findnumberedlist(list)
+ -- we assume wrapped boxes, only one with numbers
+ local n = list
+ while n do
+ local id = getid(n)
+ if id == hlist_code then
+ if getsubtype(n) == line_code then
+ local a = getattr(n,a_linenumber)
+ if a then
+ return a > 0 and list
+ end
+ return
+ else
+ local list = getlist(n)
+ if lineisnumbered(list) then
+ return n
+ end
+ local okay = findnumberedlist(list)
+ if okay then
+ return okay
+ end
+ end
+ elseif id == vlist_code then
+ local list = getlist(n)
+ if listisnumbered(list) then
+ return list
+ end
+ local okay = findnumberedlist(list)
+ if okay then
+ return okay
+ end
+ elseif id == glyph_code then
+ return
+ end
+ n = getnext(n)
+ end
end
-- reset ranges per page
-- store first and last per page
-- maybe just set marks directly
+local function findcolumngap(list)
+ -- we assume wrapped boxes, only one with numbers
+ local n = list
+ while n do
+ local id = getid(n)
+ if id == hlist_code or id == vlist_code then
+ local p = properties[n]
+ if p and p.columngap then
+ if trace_numbers then
+ report_lines("first column gap %a",p.columngap)
+ end
+ return n
+ else
+ local list = getlist(n)
+ if list then
+ local okay = findcolumngap(list)
+ if okay then
+ return okay
+ end
+ end
+ end
+ end
+ n = getnext(n)
+ end
+end
+
function boxed.stage_one(n,nested)
current_list = { }
local box = getbox(n)
- if box then
- local found = nil
- local list = getlist(box)
- if list and nested then
- list, found = identify(list)
- end
- if list then
- local last_a, last_v, skip = nil, -1, false
- for n in traverse_id(hlist_code,list) do -- attr test here and quit as soon as zero found
- if getfield(n,"height") == 0 and getfield(n,"depth") == 0 then
- -- skip funny hlists -- todo: check line subtype
- else
- local list = getlist(n)
- local a = getattr(list,a_linenumber)
- if not a or a == 0 then
- local n = getnext(list)
- while n do
- local id = getid(n)
- if id == whatsit_code and getsubtype(n) == textdir_code then
- n = getnext(n)
- elseif id == glue_code and getsubtype(n) == leftskip_code then
- n = getnext(n)
- else
-if id == glyph_code then
- break
-else
- -- can be hlist or skip (e.g. footnote line)
- n = getnext(n)
-end
- end
+ if not box then
+ return
+ end
+ local list = getlist(box)
+ if not list then
+ return
+ end
+ local last_a = nil
+ local last_v = -1
+ local skip = false
+
+ local function check()
+ for n in traverse_id(hlist_code,list) do -- attr test here and quit as soon as zero found
+ local subtype = getsubtype(n)
+ if subtype ~= line_code then
+ -- go on
+ elseif getfield(n,"height") == 0 and getfield(n,"depth") == 0 then
+ -- skip funny hlists -- todo: check line subtype
+ else
+ local a = lineisnumbered(n)
+ if a then
+ if last_a ~= a then
+ local da = data[a]
+ local ma = da.method
+ if ma == v_next then
+ skip = true
+ elseif ma == v_page then
+ da.start = 1 -- eventually we will have a normal counter
+ end
+ last_a = a
+ if trace_numbers then
+ report_lines("starting line number range %s: start %s, continue %s",a,da.start,da.continue or v_no)
end
- a = n and getattr(n,a_linenumber)
end
- if a and a > 0 then
- if last_a ~= a then
- local da = data[a]
- local ma = da.method
- if ma == v_next then
- skip = true
- elseif ma == v_page then
- da.start = 1 -- eventually we will have a normal counter
- end
- last_a = a
- if trace_numbers then
- report_lines("starting line number range %s: start %s, continue %s",a,da.start,da.continue or v_no)
- end
+ if getattr(n,a_displaymath) then
+ if is_display_math(n) then
+ check_number(n,a,skip)
end
- if getattr(n,a_displaymath) then
- if is_display_math(n) then
- check_number(n,a,skip)
- end
+ else
+ local v = getattr(list,a_verbatimline)
+ if not v or v ~= last_v then
+ last_v = v
+ check_number(n,a,skip)
else
- local v = getattr(list,a_verbatimline)
- if not v or v ~= last_v then
- last_v = v
- check_number(n,a,skip)
- else
- check_number(n,a,skip,true)
- end
+ check_number(n,a,skip,true)
end
- skip = false
end
+ skip = false
end
end
end
end
-end
--- [dir][leftskip][content]
-
-function boxed.stage_two(n,m)
- if #current_list > 0 then
- m = m or lines.scratchbox
- local t, tn = { }, 0
- for l in traverse_id(hlist_code,getlist(getbox(m))) do
- tn = tn + 1
- t[tn] = copy_node(l) -- use take_box instead
+ if nested == 0 then
+ if list then
+ check()
end
- for i=1,#current_list do
- local li = current_list[i]
- local n, m, ti = li[1], li[2], t[i]
- if ti then
- local l = getlist(n)
- -- we want to keep leftskip at the start
--- local id = getid(l)
--- if id == whatsit_code and getsubtype(l) == textdir_code then
--- l = getnext(l)
--- id = getid(l)
--- end
--- if getid(l) == glue_code and getsubtype(l) == leftskip_code then
--- -- [leftskip] [number] [rest]
--- local forward = copy_node(l)
--- local backward = negated_glue(l)
--- local next = getnext(l)
--- setfield(l,"next",backward)
--- setfield(backward,"prev",l)
--- setfield(backward,"next",ti)
--- setfield(ti,"prev",backward)
--- setfield(ti,"next",forward)
--- setfield(forward,"prev",ti)
--- setfield(forward,"next",next)
--- setfield(next,"prev",forward)
--- else
- -- [number] [rest]
- setfield(ti,"next",l)
- setfield(l,"prev",ti)
- setfield(n,"list",ti)
--- end
- resolve(n,m)
+ elseif nested == 1 then
+ local id = getid(box)
+ if id == vlist_code then
+ if listisnumbered(list) then
+ -- ok
else
- report_lines("error in linenumbering (1)")
- return
+ list = findnumberedlist(list)
end
- end
+ else -- hlist
+ list = findnumberedlist(list)
+ end
+ if list then
+ check()
+ end
+ elseif nested == 2 then
+ list = findcolumngap(list)
+ -- we assume we have a vlist
+ if not list then
+ return
+ end
+ for n in traverse_id(vlist_code,list) do
+ local p = properties[n]
+ if p and p.columngap then
+ if trace_numbers then
+ report_lines("found column gap %a",p.columngap)
+ end
+ list = getlist(n)
+ if list then
+ check()
+ end
+ end
+ end
+ else
+ -- bad call
end
end
+-- column attribute
+
function boxed.stage_two(n,m)
if #current_list > 0 then
m = m or lines.scratchbox
@@ -403,13 +485,16 @@ function boxed.stage_two(n,m)
local li = current_list[i]
local n, m, ti = li[1], li[2], t[i]
if ti then
- local l = getlist(n)
- setfield(ti,"next",l)
- setfield(l,"prev",ti)
- local h = copy_node(n)
- setfield(h,"dir","TLT")
- setfield(h,"list",ti)
- setfield(n,"list",h)
+ -- local d = getfield(n,"dir")
+ -- local l = getlist(n)
+ -- if d == "TRT" then
+ -- local w = getfield(n,"width")
+ -- ti = hpack_nodes(linked_nodes(new_kern(-w),ti,new_kern(w)))
+ -- end
+ -- setnext(ti,l)
+ -- setprev(l,ti)
+ -- setlist(n,ti)
+ addtoline(n,ti)
resolve(n,m)
else
report_lines("error in linenumbering (1)")
@@ -419,10 +504,14 @@ function boxed.stage_two(n,m)
end
end
+-- function boxed.stage_zero(n) -- not used
+-- return identify(getlist(getbox(n)))
+-- end
+
implement {
name = "linenumbersstageone",
actions = boxed.stage_one,
- arguments = { "integer", "boolean" }
+ arguments = { "integer", "integer" }
}
implement {
diff --git a/Master/texmf-dist/tex/context/base/page-lin.mkvi b/Master/texmf-dist/tex/context/base/mkiv/page-lin.mkvi
index dd13a98c38e..5756d870b66 100644
--- a/Master/texmf-dist/tex/context/base/page-lin.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-lin.mkvi
@@ -64,7 +64,7 @@
% tag skipflag s getfield(n,"shift") getfield(n,"width") leftmarginwidth(getlist(n)) getfield(n,"dir"))
-\let\makelinenumber\gobblesevenarguments % used at lua end
+\let\makelinenumber\gobblefivearguments % used at lua end
\newconditional\page_postprocessors_needed_box
@@ -94,7 +94,7 @@
\def\page_lines_setup
{\ifcsname \??linenumberinginstance\currentlinenumbering\endcsname
\clf_setuplinenumbering
- \csname\??linenumberinginstance\currentlinenumbering\endcsname
+ \lastnamedcs
{%
continue {\ifnum\c_page_lines_mode=\zerocount\v!yes\else\v!no\fi}%
start \linenumberingparameter\c!start
@@ -188,7 +188,7 @@
\def\page_lines_start_zero[#1][#2]%
{\edef\m_argument{\linenumberingparameter\c!continue}%
- \ifx\m_argument\v!continue
+ \ifx\m_argument\v!yes
\c_page_lines_mode\zerocount
\else
\c_page_lines_mode\plusone
@@ -300,27 +300,6 @@
\ifx\p_align\v!left \let\p_align\v!right \else
\ifx\p_align\v!right \let\p_align\v!left \fi\fi\fi\fi\fi\fi}
-\def\page_lines_add_numbers_to_box#box#column#max#nesting%
- {\bgroup
- \b_page_lines_number #box\relax
- \c_page_lines_column #column\relax
- \c_page_lines_last_column#max\relax
- \c_page_lines_nesting #nesting\relax
- \fullrestoreglobalbodyfont
- \let\makelinenumber\page_lines_make_number % used at lua end
- \setbox\b_page_lines_scratch\vbox
- {\forgetall
- \offinterlineskip
- \clf_linenumbersstageone
- \b_page_lines_number
- \ifcase\c_page_lines_nesting false\else true\fi
- \relax}%
- \clf_linenumbersstagetwo
- \b_page_lines_number
- \b_page_lines_scratch
- \fi
- \egroup}
-
\let\page_lines_make_number_indeed\relax
% \def\page_lines_rlap{\ifconditional\c_page_lines_dir_left_to_right\expandafter\rlap\else\expandafter\llap\fi}
@@ -331,7 +310,6 @@
\b_page_lines_number #box\relax
\c_page_lines_column #column\relax
\c_page_lines_last_column#max\relax
- \c_page_lines_nesting #nesting\relax
\fullrestoreglobalbodyfont
\let\makelinenumber\page_lines_make_number % used at lua end
\setbox\b_page_lines_scratch\vbox
@@ -339,7 +317,7 @@
\offinterlineskip
\clf_linenumbersstageone
\b_page_lines_number
- \ifcase\c_page_lines_nesting false\else true\fi
+ #nesting%
\relax}%
\clf_linenumbersstagetwo
\b_page_lines_number
@@ -347,7 +325,7 @@
\relax
\egroup}
-\def\page_lines_make_number#tag#mode#linenumber#shift#width#leftskip#dir% beware, one needs so compensate for this in the \hsize
+\def\page_lines_make_number#tag#mode#linenumber#width#dir% with hang and parindent and skips we have to compensate for \hsize
{\naturalhbox to \zeropoint \bgroup
\ifcase#mode\relax
% \settrue \c_page_lines_fake_number
@@ -399,7 +377,7 @@
\fi
\fi
%
- \executeifdefined{\??linenumberinghandler\p_location}\relax
+ \begincsname\??linenumberinghandler\p_location\endcsname
\fi
\egroup}
@@ -442,15 +420,22 @@
\def\page_line_handle_left#align#width#distance%
{\llap
{\page_lines_number_inject#align#width%
- \kern\dimexpr#distance+\d_page_lines_distance\relax
+ \kern\dimexpr
+ #distance+\d_page_lines_distance
+ \ifconditional\c_page_lines_dir_left_to_right\else+\d_page_lines_line_width\fi
+ \relax
\the\everylinenumber
\hss}}
\def\page_line_handle_right#align#width#distance%
{\rlap
- {\kern\dimexpr#distance+\d_page_lines_distance+\d_page_lines_line_width\relax
+ {\kern\dimexpr
+ #distance+\d_page_lines_distance
+ \ifconditional\c_page_lines_dir_left_to_right+\d_page_lines_line_width\fi
+ \relax
\page_lines_number_inject#align#width%
- \the\everylinenumber}}
+ \the\everylinenumber
+ \hss}}
\setuvalue{\??linenumberinghandler\v!left}%
{\page_line_handle_left\p_align\leftmarginwidth\leftmargindistance}
@@ -514,15 +499,16 @@
\setuvalue{\??linenumberinghandler\v!end }{\page_line_handle_end \p_align}
\setuvalue{\??linenumberinghandler\v!text }{\page_line_handle_begin\p_align}
-\setuevalue{\??linenumberinghandler\v!inleft }{\getvalue{\??linenumberinghandler\v!left }}
-\setuevalue{\??linenumberinghandler\v!inmargin}{\getvalue{\??linenumberinghandler\v!left }}
-\setuevalue{\??linenumberinghandler\v!margin }{\getvalue{\??linenumberinghandler\v!left }}
-\setuevalue{\??linenumberinghandler\v!inright }{\getvalue{\??linenumberinghandler\v!right}}
+\expandafter\let\csname\??linenumberinghandler\v!inleft \expandafter\endcsname\csname\??linenumberinghandler\v!left \endcsname
+\expandafter\let\csname\??linenumberinghandler\v!inmargin\expandafter\endcsname\csname\??linenumberinghandler\v!left \endcsname
+\expandafter\let\csname\??linenumberinghandler\v!margin \expandafter\endcsname\csname\??linenumberinghandler\v!left \endcsname
+\expandafter\let\csname\??linenumberinghandler\v!inright \expandafter\endcsname\csname\??linenumberinghandler\v!right\endcsname
% referencing: \permithyphenation, also removes leading spaces (new per 29-11-2013)
\unexpanded\def\someline [#1]{\page_lines_reference_start{#1}\page_lines_reference_stop{#1}} % was just a def
-\unexpanded\def\startline[#1]{\page_lines_reference_start{#1}\ignorespaces}
+%unexpanded\def\startline[#1]{\page_lines_reference_start{#1}\ignorespaces}
+\unexpanded\def\startline[#1]{\page_lines_reference_start{#1}\permithyphenation\ignorespaces} %okay?
\unexpanded\def\stopline [#1]{\removeunwantedspaces\permithyphenation\page_lines_reference_stop{#1}}
\def\page_lines_reference_show_start
@@ -540,14 +526,14 @@
\fi}
\def\page_lines_reference_show_start_indeed#1%
- {\setbox\scratchbox\hbox{\llap
- {\vrule\s!width\onepoint\s!depth\strutdp\s!height.8\strutht\raise.85\strutht\hbox{\llap{\tt\txx#1}}}}%
+ {\setbox\scratchbox\hpack{\llap
+ {\vrule\s!width\onepoint\s!depth\strutdp\s!height.8\strutht\raise.85\strutht\hpack{\llap{\tt\txx#1}}}}%
\smashbox\scratchbox
\box\scratchbox}
\def\page_lines_reference_show_stop_indeed#1%
- {\setbox\scratchbox\hbox{\rlap
- {\raise.85\strutht\hbox{\rlap{\tt\txx#1}}\vrule\s!width\onepoint\s!depth\strutdp\s!height.8\strutht}}%
+ {\setbox\scratchbox\hpack{\rlap
+ {\raise.85\strutht\hpack{\rlap{\tt\txx#1}}\vrule\s!width\onepoint\s!depth\strutdp\s!height.8\strutht}}%
\smashbox\scratchbox
\box\scratchbox}
diff --git a/Master/texmf-dist/tex/context/base/page-mak.mkvi b/Master/texmf-dist/tex/context/base/mkiv/page-mak.mkvi
index ee144f20a34..bbb7cc1488a 100644
--- a/Master/texmf-dist/tex/context/base/page-mak.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-mak.mkvi
@@ -35,7 +35,7 @@
%D \showsetup{startmakeup}
%D New is that we have a layout with the same name so one can set
-%D up a special layout tthat then gets used.
+%D up a special layout that then gets used.
\installcorenamespace{makeup}
\installcorenamespace{makeupdoublesided}
@@ -179,7 +179,7 @@
\endgroup
\makeupparameter\c!after\relax
\ifdoublesided \ifodd\realpageno \else
- \getvalue{\??makeupdoublesided\makeupparameter\c!doublesided}%
+ \csname\??makeupdoublesided\makeupparameter\c!doublesided\endcsname
\fi \fi
\strc_pagenumbers_page_state_pop % new
\egroup
@@ -258,7 +258,6 @@
\definemakeup
[\v!page]
- []
\definemakeup
[\v!middle]
diff --git a/Master/texmf-dist/tex/context/base/page-mbk.mkvi b/Master/texmf-dist/tex/context/base/mkiv/page-mbk.mkvi
index 8038771d9c7..8038771d9c7 100644
--- a/Master/texmf-dist/tex/context/base/page-mbk.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-mbk.mkvi
diff --git a/Master/texmf-dist/tex/context/base/page-mix.lua b/Master/texmf-dist/tex/context/base/mkiv/page-mix.lua
index 61a4f944d9e..c844bd32d00 100644
--- a/Master/texmf-dist/tex/context/base/page-mix.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-mix.lua
@@ -49,20 +49,26 @@ local vpack = nuts.vpack
local freenode = nuts.free
local concatnodes = nuts.concat
local slidenodes = nuts.slide -- ok here as we mess with prev links intermediately
-local traversenodes = nuts.traverse
local getfield = nuts.getfield
local setfield = nuts.setfield
+local setlink = nuts.setlink
+local setlist = nuts.setlist
+local setnext = nuts.setnext
+local setprev = nuts.setprev
+local setbox = nuts.setbox
+
local getnext = nuts.getnext
local getprev = nuts.getprev
local getid = nuts.getid
local getlist = nuts.getlist
local getsubtype = nuts.getsubtype
local getbox = nuts.getbox
-local setbox = nuts.setbox
local getskip = nuts.getskip
local getattribute = nuts.getattribute
+local theprop = nuts.theprop
+
local nodepool = nuts.pool
local new_hlist = nodepool.hlist
@@ -163,7 +169,7 @@ local function discardtopglue(current,discarded)
while current do
local id = getid(current)
if id == glue_code then
- size = size + getfield(getfield(current,"spec"),"width")
+ size = size + getfield(current,"width")
discarded[#discarded+1] = current
current = getnext(current)
elseif id == penalty_code then
@@ -171,7 +177,7 @@ local function discardtopglue(current,discarded)
discarded[#discarded+1] = current
current = getnext(current)
while current and getid(current) == glue_code do
- size = size + getfield(getfield(current,"spec"),"width")
+ size = size + getfield(current,"width")
discarded[#discarded+1] = current
current = getnext(current)
end
@@ -184,7 +190,7 @@ local function discardtopglue(current,discarded)
end
end
if current then
- setfield(current,"prev",nil) -- prevent look back
+ setprev(current) -- prevent look back
end
return current, size
end
@@ -210,7 +216,7 @@ local function stripbottomglue(results,discarded)
end
elseif id == glue_code then
discarded[#discarded+1] = t
- local width = getfield(getfield(t,"spec"),"width")
+ local width = getfield(t,"width")
if trace_state then
report_state("columns %s, discarded bottom glue %p",i,width)
end
@@ -272,6 +278,7 @@ local function preparesplit(specification) -- a rather large function
if specification.balance ~= v_yes then
optimal = maxheight
end
+ local topback = 0
local target = optimal + extra
local overflow = target > maxheight - preheight
local threshold = specification.threshold or 0
@@ -291,6 +298,7 @@ local function preparesplit(specification) -- a rather large function
depth = 0,
inserts = { },
delta = 0,
+ back = 0,
}
end
@@ -470,7 +478,7 @@ local function preparesplit(specification) -- a rather large function
head = current
local function process_skip(current,nxt)
- local advance = getfield(getfield(current,"spec"),"width")
+ local advance = getfield(current,"width")
if advance ~= 0 then
local state, skipped = checked(advance,"glue")
if trace_state then
@@ -611,7 +619,6 @@ end
line = line + 1
local inserts, currentskips, nextskips, inserttotal = nil, 0, 0, 0
local advance = getfield(current,"height")
--- + getfield(current,"depth") -- when > strutdp
if trace_state then
report_state("%-7s > column %s, content: %s","line",column,listtoutf(getlist(current),true,true))
end
@@ -628,6 +635,23 @@ end
if state == "quit" then
return true
end
+-- if state == "next" then -- only when profile
+-- local unprofiled = theprop(current).unprofiled
+-- if unprofiled then
+-- local h = unprofiled.height
+-- local s = unprofiled.strutht
+-- local t = s/2
+-- print("profiled",h,s)
+-- local snapped = theprop(current).snapped
+-- if snapped then
+-- inspect(snapped)
+-- end
+-- if h < s + t then
+-- result.back = - (h - s)
+-- advance = s
+-- end
+-- end
+-- end
height = height + depth + skip + advance + inserttotal
if state == "next" then
height = height + nextskips
@@ -727,7 +751,7 @@ local kept = head
specification.overflow = overflow
specification.discarded = discarded
- setfield(getbox(specification.box),"list",nil)
+ setlist(getbox(specification.box),nil)
return specification
end
@@ -741,12 +765,18 @@ local function finalize(result)
local r = results[i]
local h = r.head
if h then
- setfield(h,"prev",nil)
+ setprev(h)
+if r.back then
+ local k = new_glue(r.back)
+ setlink(k,h)
+ h = k
+ r.head = h
+end
local t = r.tail
if t then
- setfield(t,"next",nil)
+ setnext(t,nil)
else
- setfield(h,"next",nil)
+ setnext(h,nil)
r.tail = h
end
for c, list in next, r.inserts do
@@ -755,13 +785,13 @@ local function finalize(result)
local l = list[i]
local h = new_hlist()
t[i] = h
- setfield(h,"list",getfield(l,"head"))
+ setlist(h,getfield(l,"head"))
setfield(h,"height",getfield(l,"height"))
setfield(h,"depth",getfield(l,"depth"))
setfield(l,"head",nil)
end
- setfield(t[1],"prev",nil) -- needs checking
- setfield(t[#t],"next",nil) -- needs checking
+ setprev(t[1]) -- needs checking
+ setnext(t[#t]) -- needs checking
r.inserts[c] = t
end
end
@@ -843,14 +873,14 @@ local function getsplit(result,n)
return new_glue(result.originalwidth)
end
- setfield(h,"prev",nil) -- move up
+ setprev(h) -- move up
local strutht = result.strutht
local strutdp = result.strutdp
local lineheight = strutht + strutdp
local isglobal = result.alternative == v_global
local v = new_vlist()
- setfield(v,"list",h)
+ setlist(v,h)
-- local v = vpack(h,"exactly",height)
diff --git a/Master/texmf-dist/tex/context/base/page-mix.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-mix.mkiv
index 6d7f144a662..0e329ce098b 100644
--- a/Master/texmf-dist/tex/context/base/page-mix.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-mix.mkiv
@@ -72,6 +72,7 @@
\c!internalgrid=\v!line,
\c!step=.25\lineheight, % needs some experimenting
%\c!splitmethod=\v!fixed, % will be default
+ \c!direction=\v!normal, % new (also todo in the new columnsets)
\c!method=\ifinner\s!box\else\s!otr\fi] % automatic as suggested by WS
\let\startmixedcolumns\relax % defined later
@@ -166,6 +167,7 @@
\definemixedcolumns
[\s!itemgroupcolumns]
[\c!n=\itemgroupparameter\c!n,
+ \c!direction=\itemgroupparameter\c!direction,
\c!separator=\v!none,
\c!splitmethod=\v!none,
\c!grid=\v!tolerant,
@@ -213,7 +215,7 @@
% preceding is overwritten ... needs to be figured out some day
\page_one_command_routine
\fi
- \global\setbox\b_page_mix_preceding\vbox
+ \global\setbox\b_page_mix_preceding\vbox % pack ?
{\page_otr_command_flush_top_insertions
\ifdim\htdp\b_page_mix_preceding=\zeropoint \else
\writestatus\m!columns{preceding error}%
@@ -311,7 +313,7 @@
\hss
\starttextproperties
\usemixedcolumnscolorparameter\c!rulecolor
- \csname\??mixedcolumnsseparator\p_separator\endcsname % was \c!rule
+ \begincsname\??mixedcolumnsseparator\p_separator\endcsname % was \c!rule
\stoptextproperties
\hss
\egroup
@@ -361,11 +363,11 @@
{\edef\currentmixedcolumns{#1}%
\edef\currentmixedcolumnsmethod{\mixedcolumnsparameter\c!method}%
\mixedcolumnsparameter\c!before\relax
- \csname\??mixedcolumnsbefore\currentmixedcolumnsmethod\endcsname\relax
+ \begincsname\??mixedcolumnsbefore\currentmixedcolumnsmethod\endcsname\relax
\begingroup
\setupcurrentmixedcolumns[#2]%
\page_mix_initialize_columns
- \csname\??mixedcolumnsstart\currentmixedcolumnsmethod\endcsname}
+ \begincsname\??mixedcolumnsstart\currentmixedcolumnsmethod\endcsname}
\def\page_mix_start_columns_b[#1][#2]%
{\doifelseassignment{#1}%
@@ -375,13 +377,13 @@
\firstargumentfalse}%
\edef\currentmixedcolumnsmethod{\mixedcolumnsparameter\c!method}%
\mixedcolumnsparameter\c!before\relax % so, it doesn't listen to local settings !
- \csname\??mixedcolumnsbefore\currentmixedcolumnsmethod\endcsname\relax
+ \begincsname\??mixedcolumnsbefore\currentmixedcolumnsmethod\endcsname\relax
\begingroup
\iffirstargument
\setupcurrentmixedcolumns[#1]%
\fi
\page_mix_initialize_columns
- \csname\??mixedcolumnsstart\currentmixedcolumnsmethod\endcsname} % no \relax
+ \begincsname\??mixedcolumnsstart\currentmixedcolumnsmethod\endcsname} % no \relax
\def\page_mix_error_b
{\writestatus\m!columns{best use an instance of mixed columns}}
@@ -390,10 +392,10 @@
{\let\currentmixedcolumns\empty
\edef\currentmixedcolumnsmethod{\mixedcolumnsparameter\c!method}%
\mixedcolumnsparameter\c!before\relax
- \csname\??mixedcolumnsbefore\currentmixedcolumnsmethod\endcsname\relax
+ \begincsname\??mixedcolumnsbefore\currentmixedcolumnsmethod\endcsname\relax
\begingroup
\page_mix_initialize_columns
- \csname\??mixedcolumnsstart\currentmixedcolumnsmethod\endcsname}
+ \begincsname\??mixedcolumnsstart\currentmixedcolumnsmethod\endcsname}
\unexpanded\def\page_mix_fast_columns_start#1%
{\pushmacro\currentmixedcolumns
@@ -401,27 +403,27 @@
\edef\currentmixedcolumns{#1}%
\edef\currentmixedcolumnsmethod{\mixedcolumnsparameter\c!method}%
\mixedcolumnsparameter\c!before\relax % so, it doesn't list to local settings !
- \csname\??mixedcolumnsbefore\currentmixedcolumnsmethod\endcsname\relax
+ \begincsname\??mixedcolumnsbefore\currentmixedcolumnsmethod\endcsname\relax
\begingroup
\page_mix_initialize_columns
- \csname\??mixedcolumnsstart\currentmixedcolumnsmethod\endcsname} % no \relax
+ \begincsname\??mixedcolumnsstart\currentmixedcolumnsmethod\endcsname} % no \relax
%D When we stop, we switch over to the balancing routine. After we're done we
%D make sure to set the sizes are set, a somewhat redundant action when we
%D already have flushed but better be safe.
\unexpanded\def\stopmixedcolumns
- {\csname\??mixedcolumnsstop \currentmixedcolumnsmethod\endcsname % no \relax
+ {\begincsname\??mixedcolumnsstop \currentmixedcolumnsmethod\endcsname % no \relax
\endgroup
- \csname\??mixedcolumnsafter\currentmixedcolumnsmethod\endcsname\relax
+ \begincsname\??mixedcolumnsafter\currentmixedcolumnsmethod\endcsname\relax
\mixedcolumnsparameter\c!after\relax
\popmacro\currentmixedcolumnsmethod
\popmacro\currentmixedcolumns}
% \unexpanded\def\stopmixedcolumns
-% {\csname\??mixedcolumnsstop \currentmixedcolumnsmethod\endcsname % no \relax
+% {\begincsname\??mixedcolumnsstop \currentmixedcolumnsmethod\endcsname % no \relax
% \endgroup
-% \csname\??mixedcolumnsafter\currentmixedcolumnsmethod\endcsname\relax
+% \begincsname\??mixedcolumnsafter\currentmixedcolumnsmethod\endcsname\relax
% \mixedcolumnsparameter\c!after\relax
% \ifx\currentmixedcolumnsmethod\s!otr
% \popmacro\currentmixedcolumnsmethod
@@ -522,7 +524,7 @@
% moved here, before the packaging
\page_postprocessors_linenumbers_deepbox\b_page_mix_preceding
% we need to avoid unvboxing with successive balanced on one page
- \global\setbox\b_page_mix_preceding\vbox{\box\b_page_mix_preceding}%
+ \global\setbox\b_page_mix_preceding\vpack{\box\b_page_mix_preceding}%
\wd\b_page_mix_preceding\scratchwidth % \makeupwidth
\page_grids_add_to_one\b_page_mix_preceding
\fi
@@ -595,6 +597,7 @@
\def\page_mix_routine_package_step
{% needs packaging anyway
\setbox\scratchbox\page_mix_command_package_column
+ \page_lines_add_numbers_to_box\scratchbox\recurselevel\c_page_mix_n_of_columns\plusone % new
\page_marks_synchronize_column\plusone\c_page_mix_n_of_columns\recurselevel\scratchbox
% backgrounds
\anch_mark_column_box\scratchbox
@@ -603,22 +606,21 @@
% the framed needs a reset of strut, align, setups etc
\mixedcolumnseparatorheight\ht\scratchbox
\mixedcolumnseparatordepth \dp\scratchbox
- \inheritedmixedcolumnsframedbox\currentmixedcolumns\scratchbox
- % optional
- \ifnum\recurselevel<\c_page_mix_n_of_columns
- \ifcsname\??mixedcolumnsseparator\p_separator\endcsname
- \page_mix_command_inject_separator
- \else
- \hss
- \fi
+ \inheritedmixedcolumnsframedbox\currentmixedcolumns\scratchbox}
+
+\def\page_mix_routine_package_separate
+ {\ifcsname\??mixedcolumnsseparator\p_separator\endcsname
+ \page_mix_command_inject_separator
+ \else
+ \hss
\fi}
\unexpanded\def\page_mix_routine_package
{\clf_mixfinalize
\setbox\b_page_mix_collected\vbox \bgroup
\ifvoid\b_page_mix_preceding \else
- \page_postprocessors_linenumbers_deepbox\b_page_mix_preceding
- \vbox\bgroup
+ % \page_postprocessors_linenumbers_deepbox\b_page_mix_preceding % already done
+ \vpack\bgroup
\box\b_page_mix_preceding
\egroup
\global\d_page_mix_preceding_height\zeropoint
@@ -630,7 +632,20 @@
\page_mix_hbox to \d_page_mix_max_width \bgroup
\edef\p_separator{\mixedcolumnsparameter\c!separator}%
\mixedcolumnseparatorwidth\d_page_mix_distance % \mixedcolumnsparameter\c!rulethickness\relax
- \dorecurse\c_page_mix_n_of_columns\page_mix_routine_package_step
+ \edef\p_direction{\mixedcolumnsparameter\c!direction}%
+ \ifx\p_direction\v!reverse
+ \dostepwiserecurse\c_page_mix_n_of_columns\plusone\minusone
+ {\page_mix_routine_package_step
+ \ifnum\recurselevel>\plusone
+ \page_mix_routine_package_separate
+ \fi}%
+ \else
+ \dorecurse\c_page_mix_n_of_columns
+ {\page_mix_routine_package_step
+ \ifnum\recurselevel<\c_page_mix_n_of_columns
+ \page_mix_routine_package_separate
+ \fi}%
+ \fi
\egroup
\egroup}
@@ -649,7 +664,7 @@
{\bgroup
\forgetall
\dontcomplain
- \setbox\b_page_mix_collected\vbox{\unvbox\normalpagebox}% brrr we need to make a tight box (combine this in lua)
+ \setbox\b_page_mix_collected\vpack{\unvbox\normalpagebox}% brrr we need to make a tight box (combine this in lua)
\page_mix_routine_construct\v!no
\page_mix_routine_package
\page_otr_construct_and_shipout\box\b_page_mix_collected
@@ -661,13 +676,13 @@
{\bgroup
\forgetall
\dontcomplain
- \setbox\b_page_mix_collected\vbox{\unvbox\normalpagebox}% brrr we need to make a tight box (combine this in lua)
+ \setbox\b_page_mix_collected\vpack{\unvbox\normalpagebox}% brrr we need to make a tight box (combine this in lua)
\doloop
{%writestatus\m!columns{construct continue (\the\htdp\b_page_mix_collected)}%
\page_mix_routine_construct\v!no
\ifcase\clf_mixstate\relax
% 0 = okay, we can balance
- \setbox\b_page_mix_collected\vbox{\clf_mixflushlist}% we could avoid this
+ \setbox\b_page_mix_collected\vpack{\clf_mixflushlist}% we could avoid this
%writestatus\m!columns{construct balance}%
\page_mix_routine_construct\v!yes
\page_mix_routine_package
@@ -691,7 +706,7 @@
%writestatus\m!columns{flush continue}%
\page_mix_routine_package
\page_otr_construct_and_shipout\box\b_page_mix_collected
- \setbox\b_page_mix_collected\vbox{\clf_mixflushrest}% we could avoid this
+ \setbox\b_page_mix_collected\vpack{\clf_mixflushrest}% we could avoid this
\clf_mixcleanup
\ifdim\ht\b_page_mix_collected=\zeropoint
\exitloop
@@ -804,7 +819,7 @@
% and glue in between and when we're too large we run into issues
% so mayb best limit correction to one line
\profilegivenbox\p_profile\b_page_mix_collected
- \setbox\b_page_mix_collected\vbox{\unvbox\b_page_mix_collected}%
+ \setbox\b_page_mix_collected\vpack{\unvbox\b_page_mix_collected}%
% tracing
% \addprofiletobox\b_page_mix_collected
\fi
diff --git a/Master/texmf-dist/tex/context/base/page-mrk.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-mrk.mkiv
index 0823464fe36..0cd615f8acc 100644
--- a/Master/texmf-dist/tex/context/base/page-mrk.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-mrk.mkiv
@@ -56,7 +56,7 @@
\def\page_marks_add_color
{\setlayoutcomponentattribute{\v!print:\v!color}%
- \setbox\scratchbox\hbox \layoutcomponentboxattribute\bgroup
+ \setbox\scratchbox\hpack \layoutcomponentboxattribute\bgroup
\uniqueMPgraphic
{print:color}%
{w=\the\scratchwidth,h=\the\scratchheight,%
@@ -67,7 +67,7 @@
\def\page_marks_add_marking
{\setlayoutcomponentattribute{\v!print:\v!marking}%
- \setbox\scratchbox\hbox \layoutcomponentboxattribute\bgroup
+ \setbox\scratchbox\hpack \layoutcomponentboxattribute\bgroup
\uniqueMPgraphic
{print:marking}%
{w=\the\scratchwidth,h=\the\scratchheight,%
@@ -78,7 +78,7 @@
\def\page_marks_add_lines
{\setlayoutcomponentattribute{\v!print:\v!lines}%
- \setbox\scratchbox\hbox \layoutcomponentboxattribute\bgroup
+ \setbox\scratchbox\hpack \layoutcomponentboxattribute\bgroup
\uniqueMPgraphic
{print:lines}%
{w=\the\scratchwidth,h=\the\scratchheight,%
@@ -90,7 +90,7 @@
\def\page_marks_add_number
{\setlayoutcomponentattribute{\v!print:\v!number}%
- \setbox\scratchbox\hbox \layoutcomponentboxattribute\bgroup
+ \setbox\scratchbox\hpack \layoutcomponentboxattribute\bgroup
\useMPgraphic
{print:number}%
{w=\the\scratchwidth ,h=\the\scratchheight,%
@@ -101,7 +101,7 @@
\hskip-\scratchwidth\box\scratchbox}
\def\page_marks_add_page_indeed#1%
- {\setbox#1\hbox\bgroup
+ {\setbox#1\hpack\bgroup
\resetvisualizers
\let\objectoffset\pagecutmarkmargin
%\infofont
@@ -142,7 +142,7 @@
\installcorenamespace{layoutmarking}
-\def\installpagecutmark#1#2%
+\unexpanded\def\installpagecutmark#1#2%
{\setvalue{\??layoutmarking#1}{#2}}
% \installpagecutmark\v!off
@@ -180,12 +180,13 @@
\setfalse\c_page_marks_add_more_marking
\setfalse\c_page_marks_add_more_lines
\setfalse\c_page_marks_add_more_number
- \csname\??layoutmarking\layoutparameter\c!marking\endcsname
+ \begincsname\??layoutmarking\layoutparameter\c!marking\endcsname
\ifconditional\c_page_marks_add_page_lines
\let\page_marks_add_page\page_marks_add_page_indeed
\else
\let\page_marks_add_page\gobbleoneargument
\fi
+ % we can get a double set of (overlayed) lines .. needs to be redone (too many objects anyway)
\ifconditional\c_page_marks_add_more_lines
\let\page_marks_add_more\page_marks_add_more_indeed
\else\ifconditional\c_page_marks_add_more_color
diff --git a/Master/texmf-dist/tex/context/base/page-mul.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-mul.mkiv
index 8db5a47732b..6312323685a 100644
--- a/Master/texmf-dist/tex/context/base/page-mul.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-mul.mkiv
@@ -452,6 +452,9 @@
\box\columnpagebox
\egroup}
+\def\page_mul_synchronize_marks
+ {\dohandleallcolumns{\page_marks_synchronize_column\plusone\nofcolumns\mofcolumns\currentcolumnbox}}
+
\def\page_mul_flush_packaged_columns_indeed
{\ifvoid\b_page_mul_preceding
\setfalse\c_page_mul_preceding_present % will be set elsewhere
@@ -463,10 +466,7 @@
\page_mul_initialize_variables
\page_mul_calculate_column_result_dimensions
\page_mul_postprocess_linenumbers
- \dohandleallcolumns
- {\page_postprocessors_column\currentcolumnbox}%
- \dohandleallcolumns
- {\page_marks_synchronize_column\plusone\nofcolumns\mofcolumns\currentcolumnbox}%
+ \page_mul_synchronize_marks
\page_mul_postprocess_lines
\page_mul_postprocess_columns
\dohandleallcolumns
diff --git a/Master/texmf-dist/tex/context/base/page-not.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-not.mkiv
index d7602bd2658..d7602bd2658 100644
--- a/Master/texmf-dist/tex/context/base/page-not.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-not.mkiv
diff --git a/Master/texmf-dist/tex/context/base/page-one.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-one.mkiv
index 4cf59da2dec..a4178713394 100644
--- a/Master/texmf-dist/tex/context/base/page-one.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-one.mkiv
@@ -137,7 +137,7 @@
%
% \setbox\b_page_one_contents\vbox \ifconditional\c_notes_bottom_present to \textheight \fi
%
- \setbox\b_page_one_contents\vbox to \textheight
+ \setbox\b_page_one_contents\vbox to \textheight % probably no pack
{\page_otr_command_flush_top_insertions
% this is messy ... we will provide a more tight area (no big deal as we can
% do that at the lua end)
@@ -175,13 +175,13 @@
\else
\scratchoffset\ht\b_page_one_contents
\fi
- \setbox\b_page_one_bottom_notes\hbox
+ \setbox\b_page_one_bottom_notes\hpack
{\checksinglecolumnfootnotes % why this check? ***
- \lower\scratchoffset\vbox{\placebottomnotes\par\kern\zeropoint}}% kerns makes notes sit on bottom
+ \lower\scratchoffset\vbox{\placebottomnotes\par\kern\zeropoint}}% kerns makes notes sit on bottom % pack ?
\smashbox\b_page_one_bottom_notes
\ht\b_page_one_contents\zeropoint
\page_one_registered_text_area_b
- {\vbox to \textheight
+ {\vpack to \textheight
{\box\b_page_one_contents
\box\b_page_one_bottom_notes}}%
\else
@@ -356,9 +356,9 @@
\unexpanded\def\page_one_command_flush_float_box
{\ifconditional\c_page_floats_center_box \ifdim\wd\floatbox<\hsize
- \global\setbox\floatbox\hbox to \hsize{\hss\box\floatbox\hss}%
+ \global\setbox\floatbox\hpack to \hsize{\hss\box\floatbox\hss}%
\fi \fi
- \snaptogrid\hbox{\box\floatbox}} % was copy
+ \snaptogrid\hpack{\box\floatbox}} % was copy
\def\page_one_command_flush_floats_indeed % much in common with OTRSET
{\ifconditional\c_page_floats_some_waiting
@@ -417,7 +417,7 @@
\begingroup
\scratchdimen\dimexpr\pagetotal+\lineheight\relax
\ifdim\scratchdimen>\pagegoal
- \goodbreak % hack ? needed in icare-az
+ \goodbreak % hack ?
\fi
% should be an option
\endgroup
@@ -470,7 +470,7 @@
\page_one_place_float_here_indeed}
\def\page_one_place_float_side_indeed#1%
- {\setbox\floatbox\vbox{\box\floatbox}% ? can go
+ {\setbox\floatbox\vpack{\box\floatbox}% ? can go
\wd\floatbox\floatwidth
#1{\box\floatbox}%
\doifinset\v!tall\floatlocationmethod\page_sides_flush_floats_after_par}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-otr.lua b/Master/texmf-dist/tex/context/base/mkiv/page-otr.lua
new file mode 100644
index 00000000000..30715868426
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-otr.lua
@@ -0,0 +1,12 @@
+if not modules then modules = { } end modules ['page-otr'] = {
+ version = 1.001,
+ comment = "companion to page-otr.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+interfaces.implement {
+ name = "triggerpagebuilder",
+ actions = tex.triggerbuildpage,
+}
diff --git a/Master/texmf-dist/tex/context/base/page-otr.mkvi b/Master/texmf-dist/tex/context/base/mkiv/page-otr.mkvi
index e146d99b7ba..ec38a06c1d9 100644
--- a/Master/texmf-dist/tex/context/base/page-otr.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-otr.mkvi
@@ -19,8 +19,12 @@
% When issuing two \par\penalty-\plustenthousand's, only the first
% triggers the otr. Is this an obscure feature or an optimization?
+\registerctxluafile{page-otr}{1.001}
+
\unprotect
+\let\triggerpagebuilder\clf_triggerpagebuilder
+
\def\m!otr{otr} % todo
\installcorenamespace{outputroutine}
@@ -47,32 +51,32 @@
\let\page_otr_commands_process\gobbleoneargument
\to \everyswitchoutputroutine
-\unexpanded\def\page_otr_specifics_preset#1%
- {\edef\page_otr_specifics_command{\strictoutputroutineparameter{#1}}% no inheritance of commands
+\unexpanded\def\page_otr_specifics_preset#name%
+ {\edef\page_otr_specifics_command{\strictoutputroutineparameter{#name}}% no inheritance of commands
\ifx\page_otr_specifics_command\empty
- \writestatus{\currentoutputroutine}{- \expandafter\strippedcsname\csname#1\endcsname}%
- \expandafter\let\csname#1\endcsname\relax
+ \writestatus{\currentoutputroutine}{- \expandafter\strippedcsname\csname#name\endcsname}%
+ \expandafter\let\csname#name\endcsname\relax
\else
- \writestatus{\currentoutputroutine}{+ \expandafter\strippedcsname\csname#1\endcsname}%
- \expandafter\let\csname#1\expandafter\endcsname\page_otr_specifics_command
+ \writestatus{\currentoutputroutine}{+ \expandafter\strippedcsname\csname#name\endcsname}%
+ \expandafter\let\csname#name\expandafter\endcsname\page_otr_specifics_command
\fi}
-\unexpanded\def\page_otr_specifics_preset_normal#1%
- {\edef\page_otr_specifics_command{\strictoutputroutineparameter{#1}}% no inheritance of commands
+\unexpanded\def\page_otr_specifics_preset_normal#name%
+ {\edef\page_otr_specifics_command{\strictoutputroutineparameter{#name}}% no inheritance of commands
\ifx\page_otr_specifics_command\empty
- \expandafter\let\csname#1\endcsname\relax
+ \expandafter\let\csname#name\endcsname\relax
\else
- \expandafter\let\csname#1\expandafter\endcsname\page_otr_specifics_command
+ \expandafter\let\csname#name\expandafter\endcsname\page_otr_specifics_command
\fi}
-\unexpanded\def\page_otr_specifics_preset_traced#1%
- {\edef\page_otr_specifics_command{\strictoutputroutineparameter{#1}}% no inheritance of commands
+\unexpanded\def\page_otr_specifics_preset_traced#name%
+ {\edef\page_otr_specifics_command{\strictoutputroutineparameter{#name}}% no inheritance of commands
\ifx\page_otr_specifics_command\empty
- \writestatus{\currentoutputroutine}{preset: - \expandafter\strippedcsname\csname#1\endcsname}%
- \expandafter\let\csname#1\endcsname\relax
+ \writestatus{\currentoutputroutine}{preset: - \expandafter\strippedcsname\csname#name\endcsname}%
+ \expandafter\let\csname#name\endcsname\relax
\else
- \writestatus{\currentoutputroutine}{preset: + \expandafter\strippedcsname\csname#1\endcsname}%
- \expandafter\let\csname#1\expandafter\endcsname\page_otr_specifics_command
+ \writestatus{\currentoutputroutine}{preset: + \expandafter\strippedcsname\csname#name\endcsname}%
+ \expandafter\let\csname#name\expandafter\endcsname\page_otr_specifics_command
\fi}
\let\page_otr_specifics_preset\page_otr_specifics_preset_normal
@@ -100,11 +104,11 @@
\unexpanded\def\page_otr_message_b{\page_otr_message_s+}
\unexpanded\def\page_otr_message_e{\page_otr_message_s-}
-\unexpanded\def\page_otr_message_s#1#2%
+\unexpanded\def\page_otr_message_s#sign#what%
{\writestatus
\currentoutputroutine
- {#1\space \space
- #2\space \space
+ {#sign\space \space
+ #what\space \space
p:\the\outputpenalty,\space
r:\the\realpageno ,\space
c:\number\mofcolumns,\space
@@ -115,21 +119,21 @@
d:\the\dimexpr\pagetotal-\pagegoal\relax
\fi}}
-\unexpanded\def\page_otr_trigger#1%
+\unexpanded\def\page_otr_trigger#penalty%
{\begingroup
\par
- \penalty#1%
+ \penalty#penalty%
\endgroup}
-\unexpanded\def\installoutputroutine#1#2% \invoke \action
+\unexpanded\def\installoutputroutine#invoke#action% \invoke \action
{\global\advance\c_page_otf_trigger_penalty\minusone
- \edef#1{\page_otr_trigger{\number\c_page_otf_trigger_penalty}}%
- \setvalue{\??otrtriggers\number\c_page_otf_trigger_penalty}{#2}}
+ \edef#invoke{\page_otr_trigger{\number\c_page_otf_trigger_penalty}}%
+ \setvalue{\??otrtriggers\number\c_page_otf_trigger_penalty}{#action}}
\unexpanded\def\page_otr_triggered_output_routine_traced
{\ifcsname\??otrtriggers\the\outputpenalty\endcsname
\page_otr_message_b{special}%
- \csname\??otrtriggers\the\outputpenalty\endcsname
+ \csname\??otrtriggers\the\outputpenalty\endcsname % \lastnamedcs can be gone
\page_otr_message_e{special}%
\else
\page_otr_message_b{normal}%
@@ -139,7 +143,7 @@
\unexpanded\def\page_otr_triggered_output_routine_normal
{\ifcsname\??otrtriggers\the\outputpenalty\endcsname
- \csname\??otrtriggers\the\outputpenalty\endcsname
+ \lastnamedcs
\else
\page_otr_command_routine
\fi}
@@ -155,11 +159,11 @@
\ifdefined\everybeforeoutput \else \newtoks\everybeforeoutput \fi
\ifdefined\everyafteroutput \else \newtoks\everyafteroutput \fi
-\def\page_otf_set_engine_output_routine#1%
+\def\page_otf_set_engine_output_routine#content%
{\global\output
{\inotrtrue
\the\everybeforeoutput
- #1\relax
+ #content\relax
\the\everyafteroutput}}
\page_otf_set_engine_output_routine\page_otr_triggered_output_routine
@@ -220,7 +224,7 @@
\def\page_otr_force_another_page
{% we should actually remove the dummy line in the otr
- \hbox to \hsize{}%
+ \hpack to \hsize{}%
\kern-\topskip
\nobreak
\vfill
diff --git a/Master/texmf-dist/tex/context/base/page-par.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-par.mkiv
index 588065d6563..588065d6563 100644
--- a/Master/texmf-dist/tex/context/base/page-par.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-par.mkiv
diff --git a/Master/texmf-dist/tex/context/base/page-plg.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-plg.mkiv
index b59a05a9454..b59a05a9454 100644
--- a/Master/texmf-dist/tex/context/base/page-plg.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-plg.mkiv
diff --git a/Master/texmf-dist/tex/context/base/page-pst.lua b/Master/texmf-dist/tex/context/base/mkiv/page-pst.lua
index 472bdbabed5..472bdbabed5 100644
--- a/Master/texmf-dist/tex/context/base/page-pst.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-pst.lua
diff --git a/Master/texmf-dist/tex/context/base/page-pst.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-pst.mkiv
index f12663f6665..f12663f6665 100644
--- a/Master/texmf-dist/tex/context/base/page-pst.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-pst.mkiv
diff --git a/Master/texmf-dist/tex/context/base/page-run.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-run.mkiv
index 9adcb23c7b3..9adcb23c7b3 100644
--- a/Master/texmf-dist/tex/context/base/page-run.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-run.mkiv
diff --git a/Master/texmf-dist/tex/context/base/page-sel.mkvi b/Master/texmf-dist/tex/context/base/mkiv/page-sel.mkvi
index ee25a37db4a..eb83890328e 100644
--- a/Master/texmf-dist/tex/context/base/page-sel.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-sel.mkvi
@@ -272,8 +272,8 @@
\exitloop
\fi}}
-\setvalue{\??combinepagesalternative\v!horizontal}{\getvalue{\??combinepagesalternative\v!a}}
-\setvalue{\??combinepagesalternative\v!vertical }{\getvalue{\??combinepagesalternative\v!c}}
+\expandafter\let\csname\??combinepagesalternative\v!horizontal\expandafter\endcsname\csname\??combinepagesalternative\v!a\endcsname
+\expandafter\let\csname\??combinepagesalternative\v!vertical \expandafter\endcsname\csname\??combinepagesalternative\v!c\endcsname
\setvalue{\??combinepagesalternative\v!b}%
{\global\combinedpagescounter\directwithpagesparameter\c!start\relax
@@ -366,4 +366,40 @@
% \starttext \slicepages[slice1.pdf][n=3] \stoptext
+\unexpanded\def\trimpages[#1]% was for a over decade in p-pdf-51.tex
+ {\begingroup
+ \getdummyparameters
+ [\c!file=dummy,
+ \c!hoffset=\zeropoint,
+ \c!voffset=\zeropoint,
+ \c!width=17cm,
+ \c!height=24cm,
+ \c!x=\zeropoint,
+ \c!y=\zeropoint,
+ #1]
+ \getfiguredimensions
+ [\dummyparameter\c!file]
+ [\c!object=\v!no]
+ \dorecurse\noffigurepages
+ {\scale
+ [\c!width=\paperwidth,
+ \c!height=\paperheight]
+ {\offset
+ [\c!x=\dummyparameter\c!x,
+ \c!y=\dummyparameter\c!y]
+ {\clip
+ [\c!hoffset=\dummyparameter\c!hoffset,
+ \c!voffset=\dummyparameter\c!voffset,
+ \c!width=\dummyparameter\c!width,
+ \c!height=\dummyparameter\c!height]
+ {% we correct by default, if not needed, introduce option
+ \setbox\nextbox\hbox
+ {\externalfigure[\dummyparameter\c!file][\c!page=##1]}%
+ \ifdim\wd\nextbox>\ht\nextbox
+ \rotate[\c!rotation=90]{\box\nextbox}%
+ \else
+ \box\nextbox
+ \fi}}}}%
+ \endgroup}
+
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/page-set.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-set.mkiv
index a5afb92e951..6e6759208ce 100644
--- a/Master/texmf-dist/tex/context/base/page-set.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-set.mkiv
@@ -694,7 +694,7 @@
\installcolumnbreakmethod \s!columnset \v!page
{\page_otr_fill_and_eject_page}
-
+
\newtoks\OTRSETeverystartofcolumn
\newbox\OTRSETsavedfootnotes
@@ -857,7 +857,7 @@
\fi}
\let\OTRSETcheckfreelines\donothing
-
+
\def\OTRSETfillgapsbetweencells#1#2% col
{\ifnum\columngaplimit>\zerocount
\donefalse
@@ -885,7 +885,7 @@
\appendtoks
\OTRSETfillgapsbetweencells\mofcolumns\plusone
\to \OTRSETeverystartofcolumn
-
+
\newif\ifspancolumnslots \spancolumnslotstrue
\newif\ifcheckcolumnspan \checkcolumnspantrue
@@ -963,7 +963,7 @@
\columnlastcell\savedcolumnlastcell
\OTRSETsavebox{#1}%
\fi}
-
+
\newdimen\totalcolumnspace
\def\columnspacetopoffset{0}
@@ -1038,15 +1038,6 @@
\fi}%
\fi}
-\let\preferedcolumn\empty
-\let\preferedrow \empty
-
-\def\OTRSETsetpreferedcolumnslot#1#2%
- {\doifsomething{#1}{\edef\preferedcolumn{#1}}%
- \doifsomething{#2}{\edef\preferedrow {#2}}}
-
-\OTRSETsetpreferedcolumnslot{\nofcolumns}{1} % default ?
-
\let\pofcolumns\mofcolumns
\let\qofcolumns\mofcolumns
@@ -1118,8 +1109,8 @@
{\OTRSETprepareforcolumnslot2}{\OTRSETprepareforcolumnslot1}{#1}% % 1/2 dependent of place, todo
\OTRSETflushtextsofar
\OTRSETstoreincolumnslotindeed
- \pofcolumns \pofcolumns +\currenthcell
- \preferedrow\columnmaxcells+\currentvcell{#1}}
+ \pofcolumns \pofcolumns +\currenthcell
+ \floatrow\columnmaxcells+\currentvcell{#1}}
\def\OTRSETstoreincolumnslotFXBT#1% fixed column
{\OTRSETcheckprefered
@@ -1127,8 +1118,8 @@
{\OTRSETprepareforcolumnslot2}{\OTRSETprepareforcolumnslot3}{#1}% % 3/2 dependent of place, todo
\OTRSETflushtextsofar
\OTRSETstoreincolumnslotindeed
- \pofcolumns \pofcolumns +\currenthcell
- \columnmaxcells\preferedrow-\currentvcell{#1}}
+ \pofcolumns \pofcolumns+\currenthcell
+ \columnmaxcells\floatrow -\currentvcell{#1}}
\newconstant\OTRSETforcefixedfloats
@@ -1179,10 +1170,15 @@
\page_set_command_set_vsize}
\def\OTRSETcheckprefered
- {\ifnum\preferedcolumn<\mofcolumns
+ {\ifx\floatcolumn\empty
+ \let\pofcolumns\nofcolumns
+ \else\ifnum\floatcolumn<\mofcolumns
\let\pofcolumns\mofcolumns
\else
- \let\pofcolumns\preferedcolumn
+ \let\pofcolumns\floatcolumn
+ \fi\fi
+ \ifx\floatrow\empty
+ \let\pofcolumns\plusone
\fi
\ifquitincurrentcolumn
\ifnum\mofcolumns=\nofcolumns
@@ -1200,12 +1196,12 @@
{\OTRSETcheckprefered
\enoughcolumncellsfalse
\donefalse
- \dostepwiserecurse{#1}{#2}{#31}
+ \dostepwiserecurse{#1}{#2}{#3#4}
{\ifdone
\exitloop
\else
#4=\recurselevel
- \dostepwiserecurse{#5}{#6}{#71}
+ \dostepwiserecurse{#5}{#6}{#7#8}
{\ifdone
\exitloop
\else
@@ -1271,10 +1267,10 @@
% {\vss\box#2\vss}%
% \fi
% and don't change this any more
-% \doifdefinedelse{\strippedcsname\OTRSETstoreincolumnslot#1}
-% {\getvalue{\strippedcsname\OTRSETstoreincolumnslot#1}{#2}}
+% \doifdefinedelse{\csstring\OTRSETstoreincolumnslot#1}
+% {\getvalue{\csstring\OTRSETstoreincolumnslot#1}{#2}}
% {\OTRSETstoreincolumnslotUNKNOWN{#2}}}
- \executeifdefined{\strippedcsname\OTRSETstoreincolumnslot#1}
+ \executeifdefined{\csstring\OTRSETstoreincolumnslot#1}
\OTRSETstoreincolumnslotUNKNOWN} % {#2}}
\def\OTRSETstoreincolumnslotUNKNOWN#1%
@@ -1298,7 +1294,7 @@
\ifnum#1<3\vss\fi
\egroup
\fi}
-
+
\unexpanded\def\page_set_command_check_if_float_fits
{\global\ifconditional\c_page_floats_not_permitted\setfalse\c_page_floats_room\else\settrue\c_page_floats_room\fi}
@@ -1334,6 +1330,13 @@
\ifdim\floatwidth>\zeropoint
\!!doneatrue
\page_floats_flush\s!text\plusone
+%
+% a quick hack ... will be redone
+%
+\ifdim\wd\floatbox<\floatwidth \ifhbox\floatbox
+ \global\setbox\floatbox\hbox{\unhbox\floatbox}%
+\fi \fi
+%
\dp\floatbox\zeropoint
\OTRSETstoreincolumnslot{TBLR}\floatbox
\if!!donea
@@ -1349,9 +1352,8 @@
\exitloop
\fi}
\egroup}
-
-\newif\ifcentergridcells \centergridcellstrue
+\newif\ifcentergridcells \centergridcellstrue
\newif\ifcentergridcellonly \centergridcellonlyfalse
\newif\ifautocentergridcellonly \autocentergridcellonlytrue
@@ -1420,7 +1422,7 @@
\fi
\fi}}%
\fi}
-
+
\def\OTRSETinitializecolumns% once per page
{\columnspreadtrue % todo
\ifcolumnspread
@@ -1442,7 +1444,7 @@
\OTRSETassignwidths
\global\mofcolumns\plusone
\page_set_cell_erase_grid}
-
+
% this is a first step in upgrading
\installcorenamespace{columnset}
@@ -1462,8 +1464,7 @@
\c!frame=\v!off,
\c!offset=\v!overlay,
\c!frame=\v!off,
- \c!align=,
- \c!lines=0]
+ \c!align=]
\let\page_set_setup_saved\setupcolumnset
@@ -1489,7 +1490,7 @@
\unexpanded\def\page_set_setup_step##1%
{\doifelse{##1}\v!each
{\dorecurse{\namedcolumnsetparameter{#1}\c!n}{\page_set_setup_step\recurselevel}}
- {\normalexpanded{\page_set_setup_saved[#1:\recurselevel]}[#3]}}%
+ {\normalexpanded{\page_set_setup_saved[#1:##1]}[#3]}}%
\processcommalist[#2]\page_set_setup_step
\else
\page_set_setup_saved[#1][#2]%
@@ -1558,7 +1559,7 @@
\v!last=>\expanded{\doOTRSETgotoCOLUMN{\the\nofcolumns}},
\s!default=>\OTRSETdummycolumn,
\s!unknown=>\expanded{\doOTRSETgotoCOLROW{\commalistelement}}]}
-
+
% to be documented and tested, not yet that robust
% \def\OTRSETgotocell#1#2%
@@ -1600,7 +1601,7 @@
{\endgraf
\doOTRSETgotoCOLUMN{#1}%
\doOTRSETgotoROW {#2}}
-
+
\def\OTRSETdummycolumn
{\verticalstrut
\vskip-\struttotal
@@ -2032,7 +2033,7 @@
\@EA\uppercasestring\floatmethod\to\floatmethod
\OTRSETstoreincolumnslot\floatmethod\floatbox
\page_floats_report_total}
-
+
% kind of new, looks much like OTRONE, but not entirely
\newconditional\c_page_set_top_of_insert
@@ -2046,10 +2047,8 @@
\ifnum\rootfloatparameter\c!nbottom=\zerocount
\ifnum\rootfloatparameter\c!nlines>\zerocount
\ifdim\totaltopinserted>\zeropoint\relax
- \dimen0\lineheight
- \dimen0=\rootfloatparameter\c!nlines\dimen0
- \advance\dimen0 \totaltopinserted\relax
- \ifdim\dimen0>\textheight % \vsize %%%%%%%%% \textheight
+ \scratchdimen\dimexpr\rootfloatparameter\c!nlines\lineheight+\totaltopinserted\relax
+ \ifdim\scratchdimen>\textheight % \vsize %%%%%%%%% \textheight
\showmessage\m!floatblocks8{\rootfloatparameter\c!nlines}%
\page_otr_fill_and_eject_page % was triple: vfilll
\fi
@@ -2080,7 +2079,7 @@
\blank[\rootfloatparameter\c!spaceafter]}%
\global\advance\d_page_floats_inserted_top \ht\scratchbox\relax
\ifdim\d_page_floats_inserted_top>\vsize % was \textheight\relax
- \OTRSETresavebox\floatbox
+ \OTRSETresavebox\scratchbox
\noffloatinserts\c_page_floats_n_of_top\relax
\global\advance\d_page_floats_inserted_top -\ht\scratchbox
\let\OTRSETdodosettopinserts\relax % to be tested
@@ -2167,7 +2166,7 @@
% \box\columnbotbox\mofcolumns}
\fi
\global\d_page_floats_inserted_bottom\zeropoint\relax} % goes away
-
+
% set ipv text
% left right 1 2 3 +1 +2 +3
@@ -2177,7 +2176,7 @@
% links rechts => odd, even, n, named
-\definesystemvariable {mt} % MulTicolumn
+\installcorenamespace{columnsetarea}
\unexpanded\def\definecolumntextarea
{\dotripleempty\dodefinecolumntextarea}
@@ -2192,11 +2191,11 @@
{\definecolumntextarea[#1][\v!right][\c!type=#2,#3]}
{\definecolumntextarea[#1][\v!left ][\c!type=#2,#3]}}
{\presetlocalframed
- [\??mt#1#2]%
+ [\??columnsetarea#1#2]%
\processaction[#2] % \doglobal voorkomt stack build up
[ \v!left=>\doglobal\addtocommalist{#1}\columnleftareas,
\v!right=>\doglobal\addtocommalist{#1}\columnrightareas]%
- \getparameters[\??mt#1#2]
+ \getparameters[\??columnsetarea#1#2]
[\c!x=1,\c!y=1,\c!nx=1,\c!ny=1,\c!clipoffset=2\lineheight,
\c!leftoffset=\zeropoint,\c!rightoffset=\zeropoint,
\c!offset=\v!overlay,\c!strut=\v!no,\c!frame=\v!off,
@@ -2217,18 +2216,18 @@
{\doifelseoddpage
{\setupcolumntextarea[#1][\v!right][#3]}
{\setupcolumntextarea[#1][\v!left][#3]}}
- {\getparameters[\??mt#1#2][#3]}}%
+ {\getparameters[\??columnsetarea#1#2][#3]}}%
\else
\setupcolumntextarea[#1][\v!next][#2]%
\fi}
\def\docheckcolumnsetareapage#1#2%
- {\ifnum\getvalue{\??mt#1\c!page}>\plusone
- \doifelsevalue{\??mt#1\c!type}\v!fixed
- {\ifnum\columnsetpage=\getvalue{\??mt#1\c!page}\relax
+ {\ifnum\getvalue{\??columnsetarea#1\c!page}>\plusone
+ \doifelsevalue{\??columnsetarea#1\c!type}\v!fixed
+ {\ifnum\columnsetpage=\getvalue{\??columnsetarea#1\c!page}\relax
\donetrue\else\donefalse
\fi}
- {\ifnum\columnsetpage<\getvalue{\??mt#1\c!page}\relax
+ {\ifnum\columnsetpage<\getvalue{\??columnsetarea#1\c!page}\relax
\donefalse\else\donetrue
\fi}%
\else
@@ -2248,7 +2247,7 @@
\ifdone
\donefalse
\processaction
- [\getvalue{\??mt##1#2\c!state}]
+ [\getvalue{\??columnsetarea##1#2\c!state}]
[ \v!start=>\donetrue,
\v!repeat=>\donetrue,
\s!unknown=>\doperformtest\commalistelement\donetrue\donefalse]%
@@ -2259,8 +2258,8 @@
\def\dodoinitializecolumntextareas#1#2%
{\doOTRSETsetgridcells
{\copy\placeholderboxd}
- {\getvalue{\??mt#1#2\c!x }}{\getvalue{\??mt#1#2\c!y }}
- {\getvalue{\??mt#1#2\c!nx}}{\getvalue{\??mt#1#2\c!ny}}
+ {\getvalue{\??columnsetarea#1#2\c!x }}{\getvalue{\??columnsetarea#1#2\c!y }}
+ {\getvalue{\??columnsetarea#1#2\c!nx}}{\getvalue{\??columnsetarea#1#2\c!ny}}
{\copy\placeholderboxd}}
\unexpanded\def\placecolumntextareas
@@ -2278,7 +2277,7 @@
\ifdone
\donefalse
\processaction
- [\getvalue{\??mt##1#2\c!state}]
+ [\getvalue{\??columnsetarea##1#2\c!state}]
[ \v!start=>\donetrue\doglobal\removefromcommalist{##1}#1,
\v!repeat=>\donetrue,
\s!unknown=>\doperformtest\commalistelement\donetrue\donefalse]%
@@ -2305,7 +2304,7 @@
% beware, we have clipping offsets of 2\lineheight by default
\def\columntextareaparameter#1%
- {\csname\??mt\currentcolumntestarea#1\endcsname}
+ {\csname\??columnsetarea\currentcolumntestarea#1\endcsname}
\def\dodoplacecolumntextareas#1#2%
{\def\currentcolumntestarea{#1#2}%
@@ -2326,7 +2325,7 @@
%
\setbox\scratchbox\vbox
{\donetrue\localframed
- [\??mt\currentcolumntestarea]
+ [\??columnsetarea\currentcolumntestarea]
[\c!location=,% new (*)
\c!width=\!!widtha,\c!height=\!!heighta,\c!lines=]
{\columntextareaparameter\empty{}}}% messy
@@ -2349,7 +2348,6 @@
%\c!bottomoffset=\columntextareaparameter\c!clipoffset,%
%\c!leftoffset=\columntextareaparameter\c!clipoffset,%
\c!offset=\columntextareaparameter\c!clipoffset,%
- \c!offset=\columntextareaparameter\c!clipoffset,%
\c!rightoffset=\columntextareaparameter\c!rightoffset,%
\c!width=\!!widthb,%
\c!height=\!!heighta]%
@@ -2382,13 +2380,13 @@
\def\dosetupcolumntextareatext[#1][#2][#3]%
{\ifthirdargument
\doifelse{#2}\v!both
- {\setvalue{\??mt#1\v!left }{#3}%
- \setvalue{\??mt#1\v!right}{#3}}
+ {\setvalue{\??columnsetarea#1\v!left }{#3}%
+ \setvalue{\??columnsetarea#1\v!right}{#3}}
{\doifelse{#2}\v!next
{\doifelseoddpage
- {\setvalue{\??mt#1\v!right}{#3}}%
- {\setvalue{\??mt#1\v!left }{#3}}}%
- {\setvalue{\??mt#1#2}{#3}}}%
+ {\setvalue{\??columnsetarea#1\v!right}{#3}}%
+ {\setvalue{\??columnsetarea#1\v!left }{#3}}}%
+ {\setvalue{\??columnsetarea#1#2}{#3}}}%
\else
\setupcolumntextareatext[#1][\v!next][{#2}]%
\fi}
@@ -2441,14 +2439,16 @@
\else
\d_strc_float_temp_width
\fi}
-
+
+\installcorenamespace{columnsetspan}
+
\unexpanded\def\definecolumnsetspan
{\dodoubleempty\dodefinecolumnsetspan}
\def\dodefinecolumnsetspan[#1][#2]%
{%\ifsecondargument
\defineframedtext % we can have a parent
- [cs:#1]
+ [\??columnsetspan#1]
[\c!frame=\v!off,
\c!before=,
\c!after=,
@@ -2474,7 +2474,7 @@
\def\dosetupcolumnsetspan[#1][#2]%
{\ifsecondargument
- \setupframedtexts[cs:#1][#2]%
+ \setupframedtexts[\??columnsetspan#1][#2]%
\else
\setupcolumnsetspan[\s!default][#1]%
\fi}
@@ -2495,13 +2495,13 @@
\nofcolumns\plusone
\mofcolumns\plusone
\fi
- \setupframedtexts[cs:#1]
+ \setupframedtexts[\??columnsetspan#1]
[\c!width=\columnsetspanhsize,
\c!linecorrection=\v!off,
\c!depthcorrection=\v!off,
#2]%
% determine widths
- \!!countc\namedframedtextparameter{cs:#1}\c!n
+ \!!countc\namedframedtextparameter{\??columnsetspan#1}\c!n
% \!!countd\numexpr(\nofcolumns-\mofcolumns+\plusone)%
\!!countd\nofcolumns
% n <= n of columns
@@ -2509,16 +2509,16 @@
\advance\!!countd -\mofcolumns
\advance\!!countd \plusone
% n <= n of available columns (alternative a)
- \doif{\namedframedtextparameter{cs:#1}\c!alternative}\v!a
+ \doif{\namedframedtextparameter{\??columnsetspan#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
- \pack_framed_text_start{cs:#1}[\v!none]% geen nils placement
+ \pack_framed_text_start{\??columnsetspan#1}[\v!none]% geen nils placement
% spoils spacing : \vskip-\struttotal\par\verticalstrut\par
\ifnum\columnsetlevel>\zerocount
- \namedframedtextparameter{cs:#1}\c!before
+ \namedframedtextparameter{\??columnsetspan#1}\c!before
\fi
\unexpanded\def\stopcolumnsetspan{\dostopcolumnsetspan{#1}}}
@@ -2528,8 +2528,8 @@
\kern-2\struttotal
\verticalstrut
\ifnum\columnsetlevel>\zerocount
- \doifsomething{\namedframedtextparameter{cs:#1}\c!after}
- {\namedframedtextparameter{cs:#1}\c!after
+ \doifsomething{\namedframedtextparameter{\??columnsetspan#1}\c!after}
+ {\namedframedtextparameter{\??columnsetspan#1}\c!after
\kern\zeropoint}% otherwise blanks disappear, better be a switch
\else
\endgraf
@@ -2538,7 +2538,7 @@
\egroup
\setbox\scratchbox\frozenhbox to \hsize
{\dontcomplain
- \alignedline{\namedframedtextparameter{cs:#1}\c!location}\v!middle{\lower\strutdepth\box\scratchbox}}%
+ \alignedline{\namedframedtextparameter{\??columnsetspan#1}\c!location}\v!middle{\lower\strutdepth\box\scratchbox}}%
\dp\scratchbox\zeropoint % else wrong snap insidefloat
%
% to be tested first (strange in grid mode)
@@ -2546,7 +2546,7 @@
% \setbox\scratchbox\frozenhbox to \hsize
% {\dontcomplain
% \alignstrutmode\zerocount
-% \alignedline{\namedframedtextparameter{cs:#1}\c!plaats}\v!midden
+% \alignedline{\namedframedtextparameter{\??columnsetspan#1}\c!plaats}\v!midden
% {\box\scratchbox}}%
%
\ifinsidefloat
@@ -2554,23 +2554,23 @@
\else\ifnum\columnsetlevel>\zerocount
% we only set \columnsetspacing when asked for, else bottom problems
% don't change this any more (test naw)
- \columnslotspacing\namedframedtextparameter{cs:#1}\c!nlines\relax
+ \columnslotspacing\namedframedtextparameter{\??columnsetspan#1}\c!nlines\relax
% todo: nboven/onder
%\OTRSETstoreincolumnslotHERE\scratchbox
- \edef\floatmethod{\namedframedtextparameter{cs:#1}\c!default}%
+ \edef\floatmethod{\namedframedtextparameter{\??columnsetspan#1}\c!default}%
\@EA\uppercasestring\floatmethod\to\floatmethod
% todo : \v!here -> here enzovoorts
\OTRSETstoreincolumnslot\floatmethod\scratchbox
- \checknextindentation[\namedframedtextparameter{cs:#1}\c!indentnext]%
+ \checknextindentation[\namedframedtextparameter{\??columnsetspan#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
- \namedframedtextparameter{cs:#1}\c!before
+ \namedframedtextparameter{\??columnsetspan#1}\c!before
\snaptogrid\vbox{\box\scratchbox}%
- \namedframedtextparameter{cs:#1}\c!after
+ \namedframedtextparameter{\??columnsetspan#1}\c!after
\fi\fi
\egroup
\endgraf}
diff --git a/Master/texmf-dist/tex/context/base/page-sid.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-sid.mkiv
index cbee4da20f7..2c1c624df38 100644
--- a/Master/texmf-dist/tex/context/base/page-sid.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-sid.mkiv
@@ -258,7 +258,7 @@
\doloop
{\iftracesidefloats
\dontleavehmode
- \ruledhbox{\m_pages_strut\kern\d_page_sides_width}%
+ \ruledhpack{\m_pages_strut\kern\d_page_sides_width}%
\else
\m_pages_strut
\fi
@@ -456,7 +456,7 @@
% The compact way:
\def\page_sides_relocate_float#1%
- {\global\setbox\floatbox\hbox
+ {\global\setbox\floatbox\hpack
{\ifnum\c_page_sides_float_type=\plusfour
\kern\d_page_sided_leftshift
\else\ifnum\c_page_sides_float_type=\plusone
@@ -487,7 +487,7 @@
\advance\scratchdimen\noflines\lineheight
% todo: maybe rounding problem here
% \global\setbox\floatbox\hbox{\lower\lineheight\box\floatbox}%
- \global\setbox\floatbox\hbox{\lower\strutdepth\box\floatbox}%
+ \global\setbox\floatbox\hpack{\lower\strutdepth\box\floatbox}%
\ht\floatbox\scratchdimen
\dp\floatbox\zeropoint
\fi
@@ -522,7 +522,7 @@
\ifnum\c_page_sides_n_of_lines>\zerocount
\advance\scratchdimen\c_page_sides_n_of_lines\lineheight
\fi
- \global\setbox\floatbox\hbox % why extra box
+ \global\setbox\floatbox\hpack % why extra box
{\vbox
{\vskip\scratchdimen
\nointerlineskip
@@ -690,7 +690,7 @@
{\par
\begingroup
\reseteverypar
- \dontleavehmode\hbox to \zeropoint{\page_sides_anchor\hss\strut}%
+ \dontleavehmode\hpack to \zeropoint{\page_sides_anchor\hss\strut}%
\vskip-\parskip
\vskip-\struttotal
\inhibitblank
@@ -801,7 +801,7 @@
\divide\scratchcounter \baselineskip
\advance\scratchcounter \plusone
\parskip\zeropoint
- \dorecurse\scratchcounter{\hbox to \hsize{}}%
+ \dorecurse\scratchcounter{\hpack to \hsize{}}%
\kern-\scratchcounter\baselineskip
\penalty\zerocount
\endgroup}
diff --git a/Master/texmf-dist/tex/context/base/page-spr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-spr.mkiv
index dc1e013d50d..dc1e013d50d 100644
--- a/Master/texmf-dist/tex/context/base/page-spr.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-spr.mkiv
diff --git a/Master/texmf-dist/tex/context/base/page-str.lua b/Master/texmf-dist/tex/context/base/mkiv/page-str.lua
index 56c6167aa56..56c6167aa56 100644
--- a/Master/texmf-dist/tex/context/base/page-str.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-str.lua
diff --git a/Master/texmf-dist/tex/context/base/page-str.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-str.mkiv
index e4b2fa22980..e4b2fa22980 100644
--- a/Master/texmf-dist/tex/context/base/page-str.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-str.mkiv
diff --git a/Master/texmf-dist/tex/context/base/page-txt.mkvi b/Master/texmf-dist/tex/context/base/mkiv/page-txt.mkvi
index 76143a01859..515d16e135b 100644
--- a/Master/texmf-dist/tex/context/base/page-txt.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-txt.mkvi
@@ -177,77 +177,160 @@
% An alternative approach is to have more variables but that does not
% make the code less complex (probably more).
-\def\page_layouts_setup_texts[#vertical][#horizontal][#a][#b][#c][#d]%
- {\ifsixthargument
- \edef\currentlayoutelement{#vertical:#horizontal}%
- \setlayoutelementparameter\c!lefttext
- {\page_layouts_process_element_double
- \c!leftstyle \c!leftcolor \c!leftwidth {#a}%
- \c!rightstyle\c!rightcolor\c!rightwidth{#d}}%
- \setlayoutelementparameter\c!righttext
- {\page_layouts_process_element_double
- \c!rightstyle\c!rightcolor\c!rightwidth{#b}%
- \c!leftstyle \c!leftcolor \c!leftwidth {#c}}%
- \else\iffifthargument
- \edef\currentlayoutelement{#vertical:\v!text}%
- \setlayoutelementparameter\c!lefttext
- {\page_layouts_process_element_double
- \c!leftstyle \c!leftcolor \c!leftwidth {#horizontal}%
- \c!rightstyle\c!rightcolor\c!rightwidth{#c}}%
- \setlayoutelementparameter\c!righttext
- {\page_layouts_process_element_double
- \c!rightstyle\c!rightcolor\c!rightwidth{#a}%
- \c!leftstyle \c!leftcolor \c!leftwidth {#b}}%
- \else\iffourthargument
- \edef\currentlayoutelement{#vertical:#horizontal}%
- \doifelsenothing{\detokenize{#a}}
- {\resetlayoutelementparameter\c!lefttext}
- {\setlayoutelementparameter\c!lefttext
- {\page_layouts_process_element_double
- \c!leftstyle\c!leftcolor\c!leftwidth{#a}%
- \c!leftstyle\c!leftcolor\c!leftwidth{#a}}}%
- \doifelsenothing{\detokenize{#b}}
- {\resetlayoutelementparameter\c!righttext}
- {\setlayoutelementparameter\c!righttext
- {\page_layouts_process_element_double
- \c!rightstyle\c!rightcolor\c!rightwidth{#b}%
- \c!rightstyle\c!rightcolor\c!rightwidth{#b}}}%
- \else\ifthirdargument
- \edef\currentlayoutelement{#vertical:\v!text}%
- \doifelsenothing{\detokenize{#horizontal}}
- {\resetlayoutelementparameter\c!lefttext}
- {\setlayoutelementparameter\c!lefttext
- {\page_layouts_process_element_double
- \c!leftstyle\c!leftcolor\c!leftwidth{#horizontal}%
- \c!leftstyle\c!leftcolor\c!leftwidth{#horizontal}}}%
- \doifelsenothing{\detokenize{#a}}
- {\resetlayoutelementparameter\c!righttext}
- {\setlayoutelementparameter\c!righttext
- {\page_layouts_process_element_double
- \c!rightstyle\c!rightcolor\c!rightwidth{#a}%
- \c!rightstyle\c!rightcolor\c!rightwidth{#a}}}%
- \else\ifsecondargument
- \edef\currentlayoutelement{#vertical:\v!text}%
- \resetlayoutelementparameter\c!lefttext
- \resetlayoutelementparameter\c!righttext
- \doifelsenothing{\detokenize{#horizontal}}
- {\resetlayoutelementparameter\c!middletext}
- {\setlayoutelementparameter\c!middletext
- {\page_layouts_process_element_single\c!style\c!color\c!width{#horizontal}}}%
- \else
- \edef\currentlayoutelement{#vertical:\v!text}%
- \resetlayoutelementparameter\c!lefttext
- \resetlayoutelementparameter\c!righttext
- \resetlayoutelementparameter\c!middletext
- \edef\currentlayoutelement{#vertical:\v!margin}%
- \resetlayoutelementparameter\c!lefttext
- \resetlayoutelementparameter\c!righttext
- \resetlayoutelementparameter\c!middletext
- \edef\currentlayoutelement{#vertical:\v!edge}%
- \resetlayoutelementparameter\c!lefttext
- \resetlayoutelementparameter\c!righttext
- \resetlayoutelementparameter\c!middletext
- \fi\fi\fi\fi\fi}
+% \unexpanded\def\page_layouts_setup_texts[#vertical][#horizontal][#a][#b][#c][#d]%
+% {\ifsixthargument
+% \edef\currentlayoutelement{#vertical:#horizontal}%
+% \setlayoutelementparameter\c!lefttext
+% {\page_layouts_process_element_double
+% \c!leftstyle \c!leftcolor \c!leftwidth {#a}%
+% \c!rightstyle\c!rightcolor\c!rightwidth{#d}}%
+% \setlayoutelementparameter\c!righttext
+% {\page_layouts_process_element_double
+% \c!rightstyle\c!rightcolor\c!rightwidth{#b}%
+% \c!leftstyle \c!leftcolor \c!leftwidth {#c}}%
+% \else\iffifthargument
+% \edef\currentlayoutelement{#vertical:\v!text}%
+% \setlayoutelementparameter\c!lefttext
+% {\page_layouts_process_element_double
+% \c!leftstyle \c!leftcolor \c!leftwidth {#horizontal}%
+% \c!rightstyle\c!rightcolor\c!rightwidth{#c}}%
+% \setlayoutelementparameter\c!righttext
+% {\page_layouts_process_element_double
+% \c!rightstyle\c!rightcolor\c!rightwidth{#a}%
+% \c!leftstyle \c!leftcolor \c!leftwidth {#b}}%
+% \else\iffourthargument
+% \edef\currentlayoutelement{#vertical:#horizontal}%
+% \doifelsenothing{\detokenize{#a}}
+% {\resetlayoutelementparameter\c!lefttext}
+% {\setlayoutelementparameter\c!lefttext
+% {\page_layouts_process_element_double
+% \c!leftstyle\c!leftcolor\c!leftwidth{#a}%
+% \c!leftstyle\c!leftcolor\c!leftwidth{#a}}}%
+% \doifelsenothing{\detokenize{#b}}
+% {\resetlayoutelementparameter\c!righttext}
+% {\setlayoutelementparameter\c!righttext
+% {\page_layouts_process_element_double
+% \c!rightstyle\c!rightcolor\c!rightwidth{#b}%
+% \c!rightstyle\c!rightcolor\c!rightwidth{#b}}}%
+% \else\ifthirdargument
+% \edef\currentlayoutelement{#vertical:\v!text}%
+% \doifelsenothing{\detokenize{#horizontal}}
+% {\resetlayoutelementparameter\c!lefttext}
+% {\setlayoutelementparameter\c!lefttext
+% {\page_layouts_process_element_double
+% \c!leftstyle\c!leftcolor\c!leftwidth{#horizontal}%
+% \c!leftstyle\c!leftcolor\c!leftwidth{#horizontal}}}%
+% \doifelsenothing{\detokenize{#a}}
+% {\resetlayoutelementparameter\c!righttext}
+% {\setlayoutelementparameter\c!righttext
+% {\page_layouts_process_element_double
+% \c!rightstyle\c!rightcolor\c!rightwidth{#a}%
+% \c!rightstyle\c!rightcolor\c!rightwidth{#a}}}%
+% \else\ifsecondargument
+% \edef\currentlayoutelement{#vertical:\v!text}%
+% \resetlayoutelementparameter\c!lefttext
+% \resetlayoutelementparameter\c!righttext
+% \doifelsenothing{\detokenize{#horizontal}}
+% {\resetlayoutelementparameter\c!middletext}
+% {\setlayoutelementparameter\c!middletext
+% {\page_layouts_process_element_single\c!style\c!color\c!width{#horizontal}}}%
+% \else
+% \edef\currentlayoutelement{#vertical:\v!text}%
+% \resetlayoutelementparameter\c!lefttext
+% \resetlayoutelementparameter\c!righttext
+% \resetlayoutelementparameter\c!middletext
+% \edef\currentlayoutelement{#vertical:\v!margin}%
+% \resetlayoutelementparameter\c!lefttext
+% \resetlayoutelementparameter\c!righttext
+% \resetlayoutelementparameter\c!middletext
+% \edef\currentlayoutelement{#vertical:\v!edge}%
+% \resetlayoutelementparameter\c!lefttext
+% \resetlayoutelementparameter\c!righttext
+% \resetlayoutelementparameter\c!middletext
+% \fi\fi\fi\fi\fi}
+
+\unexpanded\def\page_layouts_setup_text_six#vertical#horizontal#a#b#c#d%
+ {\edef\currentlayoutelement{#vertical:#horizontal}%
+ \setlayoutelementparameter\c!lefttext
+ {\page_layouts_process_element_double
+ \c!leftstyle \c!leftcolor \c!leftwidth {#a}%
+ \c!rightstyle\c!rightcolor\c!rightwidth{#d}}%
+ \setlayoutelementparameter\c!righttext
+ {\page_layouts_process_element_double
+ \c!rightstyle\c!rightcolor\c!rightwidth{#b}%
+ \c!leftstyle \c!leftcolor \c!leftwidth {#c}}}
+
+\unexpanded\def\page_layouts_setup_text_five#vertical#horizontal#a#b#c%
+ {\edef\currentlayoutelement{#vertical:\v!text}%
+ \setlayoutelementparameter\c!lefttext
+ {\page_layouts_process_element_double
+ \c!leftstyle \c!leftcolor \c!leftwidth {#horizontal}%
+ \c!rightstyle\c!rightcolor\c!rightwidth{#c}}%
+ \setlayoutelementparameter\c!righttext
+ {\page_layouts_process_element_double
+ \c!rightstyle\c!rightcolor\c!rightwidth{#a}%
+ \c!leftstyle \c!leftcolor \c!leftwidth {#b}}}
+
+\unexpanded\def\page_layouts_setup_text_four#vertical#horizontal#a#b%
+ {\edef\currentlayoutelement{#vertical:#horizontal}%
+ \doifelsenothing{\detokenize{#a}}
+ {\resetlayoutelementparameter\c!lefttext}
+ {\setlayoutelementparameter\c!lefttext
+ {\page_layouts_process_element_double
+ \c!leftstyle\c!leftcolor\c!leftwidth{#a}%
+ \c!leftstyle\c!leftcolor\c!leftwidth{#a}}}%
+ \doifelsenothing{\detokenize{#b}}
+ {\resetlayoutelementparameter\c!righttext}
+ {\setlayoutelementparameter\c!righttext
+ {\page_layouts_process_element_double
+ \c!rightstyle\c!rightcolor\c!rightwidth{#b}%
+ \c!rightstyle\c!rightcolor\c!rightwidth{#b}}}}
+
+\unexpanded\def\page_layouts_setup_text_three#vertical#horizontal#a%
+ {\edef\currentlayoutelement{#vertical:\v!text}%
+ \doifelsenothing{\detokenize{#horizontal}}
+ {\resetlayoutelementparameter\c!lefttext}
+ {\setlayoutelementparameter\c!lefttext
+ {\page_layouts_process_element_double
+ \c!leftstyle\c!leftcolor\c!leftwidth{#horizontal}%
+ \c!leftstyle\c!leftcolor\c!leftwidth{#horizontal}}}%
+ \doifelsenothing{\detokenize{#a}}
+ {\resetlayoutelementparameter\c!righttext}
+ {\setlayoutelementparameter\c!righttext
+ {\page_layouts_process_element_double
+ \c!rightstyle\c!rightcolor\c!rightwidth{#a}%
+ \c!rightstyle\c!rightcolor\c!rightwidth{#a}}}}
+
+\unexpanded\def\page_layouts_setup_text_two#vertical#horizontal%
+ {\edef\currentlayoutelement{#vertical:\v!text}%
+ \resetlayoutelementparameter\c!lefttext
+ \resetlayoutelementparameter\c!righttext
+ \doifelsenothing{\detokenize{#horizontal}}
+ {\resetlayoutelementparameter\c!middletext}
+ {\setlayoutelementparameter\c!middletext
+ {\page_layouts_process_element_single\c!style\c!color\c!width{#horizontal}}}}
+
+\unexpanded\def\page_layouts_setup_text_one#vertical%
+ {\edef\currentlayoutelement{#vertical:\v!text}%
+ \resetlayoutelementparameter\c!lefttext
+ \resetlayoutelementparameter\c!righttext
+ \resetlayoutelementparameter\c!middletext
+ \edef\currentlayoutelement{#vertical:\v!margin}%
+ \resetlayoutelementparameter\c!lefttext
+ \resetlayoutelementparameter\c!righttext
+ \resetlayoutelementparameter\c!middletext
+ \edef\currentlayoutelement{#vertical:\v!edge}%
+ \resetlayoutelementparameter\c!lefttext
+ \resetlayoutelementparameter\c!righttext
+ \resetlayoutelementparameter\c!middletext}
+
+\unexpanded\def\page_layouts_setup_texts[#vertical][#horizontal][#a][#b][#c][#d]%
+ {\ifsixthargument \page_layouts_setup_text_six {#vertical}{#horizontal}{#a}{#b}{#c}{#d}\else
+ \iffifthargument \page_layouts_setup_text_five {#vertical}{#horizontal}{#a}{#b}{#c}\else
+ \iffourthargument\page_layouts_setup_text_four {#vertical}{#horizontal}{#a}{#b}\else
+ \ifthirdargument \page_layouts_setup_text_three{#vertical}{#horizontal}{#a}\else
+ \ifsecondargument\page_layouts_setup_text_two {#vertical}{#horizontal}\else
+ \page_layouts_setup_text_one {#vertical}\fi\fi\fi\fi\fi}
%D Left and right texts are swapped on odd and even pages, but
%D only when double sided typesetting is enabled.
@@ -283,7 +366,7 @@
\uselayoutelementstyleandcolor#style#color%
\csname\??layouttextstrut\layoutelementparameter\c!strut\endcsname
\ifcsname\??layouttextspecial\m_page_layouts_element_content\endcsname
- \csname\??layouttextspecial\m_page_layouts_element_content\endcsname
+ \lastnamedcs
\else
\edef\currentlayoutelementwidth{\layoutelementparameter#width}%
\ifx\currentlayoutelementwidth\empty
@@ -355,8 +438,12 @@
\to \everybeforeflushedpagefloat
\unexpanded\def\page_layouts_place_text_line#vertical%
- {\page_layouts_set_element_status#vertical%
- \csname\??layouttextsline\ifcsname\??layouttextsline\textlinestatus\endcsname\textlinestatus\else\s!unknown\fi\endcsname#vertical}
+ {\page_layouts_set_element_status#vertical\relax
+ \ifcsname\??layouttextsline\textlinestatus\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\page_layouts_place_text_line_unknown
+ \fi#vertical}
\unexpanded\def\doifelselayouttextline#vertical% shown or not
{\edef\currentlayoutelementstate{\namedlayoutelementparameter{#vertical}\c!state}%
@@ -407,7 +494,7 @@
\page_layouts_place_text_line_indeed#vertical#height%
\egroup}
-\setvalue{\??layouttextsline\s!unknown}#vertical#height%
+\def\page_layouts_place_text_line_unknown#vertical#height%
{\global\settrue\resyncaftertextline
\begingroup % new
\page_layouts_reset_element_status#vertical%
@@ -418,6 +505,8 @@
\page_layouts_place_text_line_indeed#vertical#height%
\endgroup}
+\letvalue{\??layouttextsline\s!unknown}\page_layouts_place_text_line_unknown
+
%D The following macro has to be called after a page
%D is flushed.
@@ -472,9 +561,9 @@
\resetlayoutelementparameter\c!righttext
\fi\fi}
-\letvalue{\??layouttextcontent\c!middle:\v!text}\c!middletext
-\letvalue{\??layouttextcontent\c!left :\v!text}\c!lefttext
-\letvalue{\??layouttextcontent\c!right :\v!text}\c!righttext
+\letvalue{\??layouttextcontent\v!text:\c!middle}\c!middletext
+\letvalue{\??layouttextcontent\v!text:\c!left }\c!lefttext
+\letvalue{\??layouttextcontent\v!text:\c!right }\c!righttext
%D The placement of a whole line is handled by the next two
%D macros. These are hooked into the general purpose token
@@ -513,7 +602,7 @@
\let\page_layouts_place_extra_text_right\relax % historic
\def\page_layouts_place_text_line_right
- {\hbox
+ {\hpack
{\ifdim\leftedgewidth>\zeropoint
\page_layouts_left_edge_element\c!lefttext
\fi
@@ -534,7 +623,7 @@
\fi}}
\def\page_layouts_place_text_line_left
- {\hbox
+ {\hpack
{\ifdim\leftedgewidth>\zeropoint
\page_layouts_left_edge_element\c!righttext
\fi
@@ -649,22 +738,35 @@
\unexpanded\def\definetext
{\doseventupleempty\page_layouts_define_text}
+% \def\page_layouts_define_text[#tag][#vertical][#horizontal][#a][#b][#c][#d]%
+% {\ifseventhargument
+% \setvalue{\namedlayoutelementhash{#vertical:#horizontal}#tag}%
+% {\dosixtupleempty\page_layouts_setup_texts[#vertical][#horizontal][#a][#b][#c][#d]}%
+% \else\ifsixthargument
+% \setvalue{\namedlayoutelementhash{#vertical}#tag}%
+% {\dosixtupleempty\page_layouts_setup_texts[#vertical][#horizontal][#a][#b][#c]}%
+% \else\iffifthargument
+% \setvalue{\namedlayoutelementhash{#vertical:#horizontal}#tag}%
+% {\dosixtupleempty\page_layouts_setup_texts[#vertical][#horizontal][#a][#b]}%
+% \else\iffourthargument
+% \setvalue{\namedlayoutelementhash{#vertical}#tag}%
+% {\dosixtupleempty\page_layouts_setup_texts[#vertical][#horizontal][#a]}%
+% \else
+% \setvalue{\namedlayoutelementhash{#vertical}#tag}%
+% {\dosixtupleempty\page_layouts_setup_texts[#vertical][#horizontal]}%
+% \fi\fi\fi\fi}
+
\def\page_layouts_define_text[#tag][#vertical][#horizontal][#a][#b][#c][#d]%
{\ifseventhargument
- \setvalue{\namedlayoutelementhash{#vertical:#horizontal}#tag}%
- {\dosixtupleempty\page_layouts_setup_texts[#vertical][#horizontal][#a][#b][#c][#d]}%
+ \setvalue{\namedlayoutelementhash{#vertical:#horizontal}#tag}{\page_layouts_setup_text_six {#vertical}{#horizontal}{#a}{#b}{#c}{#d}}%
\else\ifsixthargument
- \setvalue{\namedlayoutelementhash{#vertical}#tag}%
- {\dosixtupleempty\page_layouts_setup_texts[#vertical][#horizontal][#a][#b][#c]}%
+ \setvalue{\namedlayoutelementhash {#vertical}#tag}{\page_layouts_setup_text_five {#vertical}{#horizontal}{#a}{#b}{#c}}%
\else\iffifthargument
- \setvalue{\namedlayoutelementhash{#vertical:#horizontal}#tag}%
- {\dosixtupleempty\page_layouts_setup_texts[#vertical][#horizontal][#a][#b]}%
+ \setvalue{\namedlayoutelementhash{#vertical:#horizontal}#tag}{\page_layouts_setup_text_four {#vertical}{#horizontal}{#a}{#b}}%
\else\iffourthargument
- \setvalue{\namedlayoutelementhash{#vertical}#tag}%
- {\dosixtupleempty\page_layouts_setup_texts[#vertical][#horizontal][#a]}%
+ \setvalue{\namedlayoutelementhash {#vertical}#tag}{\page_layouts_setup_text_three{#vertical}{#horizontal}{#a}}%
\else
- \setvalue{\namedlayoutelementhash{#vertical}#tag}%
- {\dosixtupleempty\page_layouts_setup_texts[#vertical][#horizontal]}%
+ \setvalue{\namedlayoutelementhash {#vertical}#tag}{\page_layouts_setup_text_two {#vertical}{#horizontal}}%
\fi\fi\fi\fi}
%D A few more page breakers:
@@ -807,7 +909,7 @@
\fi}
\def\page_layouts_place_elements_indeed
- {\setbox\b_page_layouts_element\vbox
+ {\setbox\b_page_layouts_element\vpack
{\dontcomplain
\calculatereducedvsizes
\swapmargins
@@ -832,7 +934,7 @@
\box\b_page_layouts_element}
\def\page_insert_body#1#2%
- {\setbox\b_page_layouts_element\vbox
+ {\setbox\b_page_layouts_element\vpack
{\offinterlineskip
\calculatereducedvsizes
\calculatehsizes
@@ -880,8 +982,8 @@
% page-spr we overload the the stored version .. evenatually i will
% clear up the experimental mess
-\def\settextpagecontent#1#2#3% #2 and #3 will disappear
- {\setbox#1\hbox to \makeupwidth
+\def\settextpagecontent#1#2#3% #2 and #3 will disappear / is overloaded
+ {\setbox#1\hbox to \makeupwidth % maybe \hpack
{\hss % so don't change this
\setlayoutcomponentattribute{\v!page:\v!text}%
\vbox \layoutcomponentboxattribute to \textheight
@@ -890,7 +992,7 @@
\hsize\textwidth % local variant of \sethsize <<< in columns?
\boxmaxdepth\maxdepth
\noindent % content can be < \hsize
- \dopagecontents#2#3}%
+ \page_otr_command_package_contents#2#3}%
\hss}%
\dp#1\zeropoint}
diff --git a/Master/texmf-dist/tex/context/base/page-var.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-var.mkiv
index 1c7fd5b252d..1c7fd5b252d 100644
--- a/Master/texmf-dist/tex/context/base/page-var.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-var.mkiv
diff --git a/Master/texmf-dist/tex/context/base/phys-dim.lua b/Master/texmf-dist/tex/context/base/mkiv/phys-dim.lua
index 71c9b0bd40e..71c9b0bd40e 100644
--- a/Master/texmf-dist/tex/context/base/phys-dim.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/phys-dim.lua
diff --git a/Master/texmf-dist/tex/context/base/phys-dim.mkiv b/Master/texmf-dist/tex/context/base/mkiv/phys-dim.mkiv
index b1bcb40c947..3ea042b0570 100644
--- a/Master/texmf-dist/tex/context/base/phys-dim.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/phys-dim.mkiv
@@ -145,8 +145,8 @@
\fi\fi}
\def\phys_digits_normalized_math#1#2%
- {\setbox\scratchbox\hbox{$\Ustack{#1}$}%
- \hbox to \wd\scratchbox{\hss{$\Ustack{#2}$}\hss}}
+ {\setbox\scratchbox\hbox{\normalstartimath\Ustack{#1}\normalstopimath}%
+ \hbox to \wd\scratchbox{\hss{\normalstartimath\Ustack{#2}\normalstopimath}\hss}}
\def\phys_digits_normalized_text#1#2%
{\setbox\scratchbox\hbox{#1}%
@@ -168,6 +168,7 @@
% \definesymbol[units][times][\times]
% \definesymbol[units][times][\cdots]
+% \definesymbol[units][times][\invisibletimes]
% \definesymbol[units][times][\ifmmode\cdot\else\kern.2\emwidth\cdot\kern.2\emwidth\fi]
\unexpanded\def\digitstextbinop#1% assumes preceding
@@ -399,11 +400,15 @@
\unexpanded\def\installunitsseparator#1#2%
{\setvalue{\??unitseparator#1}{#2}}
+% \unexpanded\def\phys_units_separator
+% {\edef\currentunitsseparator{\unitparameter\c!separator}%
+% \csname\??unitseparator
+% \ifcsname\??unitseparator\currentunitsseparator\endcsname\currentunitsseparator\else\v!normal\fi
+% \endcsname}
+
\unexpanded\def\phys_units_separator
- {\edef\currentunitsseparator{\unitparameter\c!separator}%
- \csname\??unitseparator
- \ifcsname\??unitseparator\currentunitsseparator\endcsname\currentunitsseparator\else\v!normal\fi
- \endcsname}
+ {\edef\currentunitsseparator{\unitparameter\c!separator}% no longer needed
+ \ifcsname\??unitseparator\currentunitsseparator\endcsname\lastnamedcs\else\cdot\fi}
\installunitsseparator\v!normal {\cdot}
\installunitsseparator\v!big {\unitsbigspace}
@@ -414,12 +419,17 @@
\unexpanded\def\installunitsspace#1#2%
{\setvalue{\??unitspace#1}{#2}}
+% \unexpanded\def\phys_units_space
+% {\unskip % weird, why is unskip needed
+% \edef\currentunitsspace{\unitparameter\c!space}%
+% \csname\??unitspace
+% \ifcsname\??unitspace\currentunitsspace\endcsname\currentunitsspace\else\v!normal\fi
+% \endcsname}
+
\unexpanded\def\phys_units_space
{\unskip % weird, why is unskip needed
\edef\currentunitsspace{\unitparameter\c!space}%
- \csname\??unitspace
- \ifcsname\??unitspace\currentunitsspace\endcsname\currentunitsspace\else\v!normal\fi
- \endcsname}
+ \ifcsname\??unitspace\currentunitsspace\endcsname\lastnamedcs\else\unitsmediumspace\fi}
\installunitsspace\v!normal {\unitsmediumspace}
\installunitsspace\v!big {\unitsbigspace}
diff --git a/Master/texmf-dist/tex/context/base/prop-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/prop-ini.mkiv
index 3b1c59b245c..3b1c59b245c 100644
--- a/Master/texmf-dist/tex/context/base/prop-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/prop-ini.mkiv
diff --git a/Master/texmf-dist/tex/context/base/publ-aut.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-aut.lua
index 5a9d485516c..5ed25f288c3 100644
--- a/Master/texmf-dist/tex/context/base/publ-aut.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-aut.lua
@@ -734,7 +734,7 @@ authorhashers.short = function(authors)
else
local s = surnames[1]
local c = lpegmatch(p_clean,s)
- if s ~= c then
+ if trace_hashing and s ~= c then
report_cite("name %a cleaned to %a for short construction",s,c)
end
return utfsub(c,1,3)
diff --git a/Master/texmf-dist/tex/context/base/publ-dat.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-dat.lua
index 36ba150009b..b9c43ac4486 100644
--- a/Master/texmf-dist/tex/context/base/publ-dat.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-dat.lua
@@ -53,7 +53,7 @@ local report_duplicates = logs.reporter("publications","duplicates")
local allocate = utilities.storage.allocate
local commands = commands
-local implement = interfaces.implement
+local implement = interfaces and interfaces.implement
publications = publications or { }
local publications = publications
@@ -383,6 +383,7 @@ function publications.new(name)
userdata = { },
used = { },
commands = { }, -- for statistical purposes
+ citestate = { },
status = {
resources = false,
userdata = false,
@@ -430,8 +431,7 @@ do
local space = S(" \t\n\r\f") -- / " "
local collapsed = space^1/" "
- ----- csletter = R("az","AZ")
- local csletter = lpegpatterns.csletter
+ local csletter = lpegpatterns.csletter or R("az","AZ")
----- command = P("\\") * Cc("btxcmd{") * (R("az","AZ")^1) * Cc("}")
----- command = P("\\") * (Carg(1) * C(R("az","AZ")^1) / function(list,c) list[c] = (list[c] or 0) + 1 return "btxcmd{" .. c .. "}" end)
@@ -907,12 +907,16 @@ do
return v
end)
+ local done = setmetatableindex("table")
+
function publications.load(specification)
- local current = datasets[specification.dataset or v_default]
+ local name = specification.dataset or v_default
+ local current = datasets[name]
local files = settings_to_array(specification.filename)
local kind = specification.kind
local dataspec = specification.specification
statistics.starttiming(publications)
+ local somedone = false
for i=1,#files do
local filetype, filename = string.splitup(files[i],"::")
if not filename then
@@ -926,7 +930,13 @@ do
if file.suffix(filename) == "" then
file.addsuffix(filename,filetype)
end
- loaders[filetype](current,filename)
+ if done[current][filename] then
+ report("file %a is already loaded in dataset %a",filename,name)
+ else
+ loaders[filetype](current,filename)
+ done[current][filename] = true
+ somedone = true
+ end
if kind then
current.loaded[current.fullname or filename] = kind
end
@@ -935,9 +945,11 @@ do
end
end
end
- local runner = enhancer.runner
- if runner then
- runner(current)
+ if somedone then
+ local runner = enhancer.runner
+ if runner then
+ runner(current)
+ end
end
statistics.stoptiming(publications)
return current
@@ -1128,18 +1140,22 @@ do
return dataset
end
- implement {
- name = "btxsavedataset",
- actions = publications.save,
- arguments = {
- {
- { "dataset" },
- { "filename" },
- { "filetype" },
- { "criterium" },
+ if implement then
+
+ implement {
+ name = "btxsavedataset",
+ actions = publications.save,
+ arguments = {
+ {
+ { "dataset" },
+ { "filename" },
+ { "filetype" },
+ { "criterium" },
+ }
}
}
- }
+
+ end
end
diff --git a/Master/texmf-dist/tex/context/base/publ-fnd.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-fnd.lua
index 32d0c11beed..32d0c11beed 100644
--- a/Master/texmf-dist/tex/context/base/publ-fnd.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-fnd.lua
diff --git a/Master/texmf-dist/tex/context/base/publ-imp-apa.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.lua
index 1d894f261e1..f2e7f11e107 100644
--- a/Master/texmf-dist/tex/context/base/publ-imp-apa.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.lua
@@ -31,7 +31,9 @@ local specification = {
-- Vons, Last, Jrs, First
--
author = "author", -- interpreted as name(s)
+ withauthor = "author",
editor = "author",
+ translator = "author",
artist = "author",
composer = "author",
producer = "author",
@@ -89,6 +91,7 @@ categories.article = {
"author"
},
optional = {
+ "withauthor", "translator",
"year",
"subtitle", "type", "file",
"journal", "volume", "number", "pages",
@@ -106,6 +109,7 @@ categories.magazine = {
"journal",
},
optional = {
+ "withauthor", "translator",
"subtitle", "type", "file",
"number",
"month", "day",
@@ -127,7 +131,7 @@ categories.periodical = {
"year",
},
optional = {
- "author",
+ "author", "withauthor", "translator",
"subtitle", "file",
"series", "volume", "number", "month",
"organization",
@@ -149,6 +153,7 @@ categories.standard = {
"doi", "note",
},
optional = {
+ "withauthor", "translator",
},
}
@@ -162,6 +167,7 @@ categories.book = {
},
required = { "author" },
optional = {
+ "withauthor", "translator",
"year", "month", "day",
"subtitle", "type", "file",
"editionset", "series",
@@ -183,6 +189,7 @@ categories.inbook = {
"year" ,
},
optional = {
+ "withauthor", "translator",
"subtitle", "type", "file",
"booktitle",
-- APA ignores this: "chapter",
@@ -208,6 +215,7 @@ categories.incollection = {
"year",
},
optional = {
+ "withauthor", "translator",
"subtitle", "type", "file",
"editionset", "series",
-- APA ignores this: "chapter",
@@ -229,6 +237,7 @@ categories.booklet = {
"author"
},
optional = {
+ "withauthor", "translator",
"publisher",
"year", "month",
"subtitle", "type", "file",
@@ -251,6 +260,7 @@ categories.proceedings = {
"year"
},
optional = {
+ "withauthor", "translator",
"publisher",
"subtitle", "file",
"editionset", "series",
@@ -266,6 +276,7 @@ categories.inproceedings = {
sets = categories.incollection.sets,
required = categories.incollection.required,
optional = {
+ "withauthor", "translator",
"subtitle", "type", "file",
"month",
"edition", "series",
@@ -290,6 +301,7 @@ categories.thesis = {
"type"
},
optional = {
+ "withauthor", "translator",
"subtitle", "file",
"month",
"address",
@@ -306,6 +318,7 @@ categories.mastersthesis = {
"year"
},
optional = {
+ "withauthor", "translator",
"type",
"subtitle", "file",
"month",
@@ -331,6 +344,7 @@ categories.techreport = {
"year"
},
optional = {
+ "withauthor", "translator",
"publisher",
"address",
"subtitle", "file",
@@ -354,6 +368,7 @@ categories.manual = {
},
optional = {
"author", "publisher",
+ "withauthor", "translator",
"address",
"subtitle", "file",
"editionset", "month", "year",
@@ -382,6 +397,7 @@ categories.patent = {
"type",
--check this: "language",
"author", "publisher",
+ "withauthor", "translator",
"title", "subtitle", "file",
"address",
"day", "month",
@@ -401,6 +417,7 @@ categories.unpublished = {
"note"
},
optional = {
+ "withauthor", "translator",
"subtitle", "file",
"year", "month",
"doi"
@@ -419,7 +436,7 @@ categories.electronic = {
optional = {
"subtitle", "type", "file",
"year", "month",
- "author",
+ "author", "withauthor", "translator",
"address",
"organization",
"howpublished",
@@ -441,6 +458,7 @@ categories.film = {
"address", "publisher", -- aka studio
},
optional = {
+ "withauthor", "translator",
"type",
"note",
"doi",
@@ -460,6 +478,7 @@ categories.music = {
"address", "publisher", -- aka label
},
optional = {
+ "withauthor", "translator",
"type",
"note",
"doi",
@@ -476,7 +495,7 @@ categories.misc = {
-- nothing is really important here
},
optional = {
- "author",
+ "author", "withauthor", "translator",
"title", "subtitle", "file",
"year", "month",
"howpublished",
@@ -496,6 +515,7 @@ categories.other = {
"year"
},
optional = {
+ "withauthor", "translator",
"subtitle", "file",
"doi", "note",
},
@@ -513,6 +533,7 @@ categories.literal = {
"text"
},
optional = {
+ "withauthor", "translator",
"doi", "note"
},
virtual = false,
diff --git a/Master/texmf-dist/tex/context/base/publ-imp-apa.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.mkvi
index 85e0ebd5f39..5600b572238 100644
--- a/Master/texmf-dist/tex/context/base/publ-imp-apa.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.mkvi
@@ -73,10 +73,19 @@
[apa:\s!list]
\definebtx
+ [apa:\s!list:withauthor]
+ [apa:\s!list:author]
+
+\definebtx
[apa:\s!list:editor]
[apa:\s!list:author]
\definebtx
+ [apa:\s!list:translator]
+ [apa:\s!list:author]
+ [\c!authorconversion=normalshort]
+
+\definebtx
[apa:\s!list:suffix]
[apa:\s!list]
@@ -462,6 +471,7 @@
apa:Volume={Vol.},
apa:Volumes={Vols.},
apa:others={et al.},
+ apa:with=with,
apa:page={p.},
apa:pages={pp.},
apa:nd={n.d.}, % no date
@@ -477,7 +487,7 @@
apa:Directors=Directors,
apa:Recordedby={Recorded by},
apa:Author=Author,
- apa:Translator={Trans.}, % Translator(s) (not used?)
+ apa:Translator={Trans.}, % Translator(s)
apa:Advanced={Advanced online publication},
apa:Retrieved={Available from}, % {Retrieved from},
apa:In=In]
@@ -492,6 +502,7 @@
apa:Volume={Vol.},
apa:Volumes={Vols.},
apa:others={et al.},
+ apa:with=met,
apa:page={p.},
apa:pages={pp.},
apa:nd={g.d.} % geen datum
@@ -522,6 +533,7 @@
apa:Volume=Volume,
apa:Volumes=Volumes,
apa:others={et al.},
+ apa:with=avec,
apa:page={p.},
apa:pages={pp.},
apa:nd={s.d.} % sans date
@@ -552,6 +564,7 @@
apa:Volume=Band, % Bd.
apa:Volumes={Bände},
apa:others={et al.},
+ apa:with=mit,
apa:page={S.},
apa:pages={S.},
apa:nd={o.D.}, % ohne Datum (mostly: o.J. / ohne Jahr)
@@ -584,6 +597,7 @@
apa:Volume={Vol.}, % Volume
apa:Volumes={Vol.}, % Volumi
apa:others={et al.},
+ apa:with=con,
apa:page={p.},
apa:pages={pp.},
apa:nd={s.d.}, % senza data
@@ -614,6 +628,7 @@
apa:Volume={Vol.}, % Volumen
apa:Volumes={Vols.}, % Volúmenes
apa:others={et al.},
+ apa:with=con,
apa:page={p.},
apa:pages={pp.},
apa:nd={s.f.}, % sin fecha
@@ -657,7 +672,7 @@
\texdefinition {\s!btx:\s!cite:inject} {
\currentbtxsecond
}
- \fi
+ \fi
\btxflushsuffix
\fi
%\btxparameter\c!right
@@ -731,7 +746,7 @@
% #title can be title or booktitle
-\starttexdefinition btx:apa:translated-title #title
+\starttexdefinition unexpanded btx:apa:translated-title #title
\ifx\currentbtxlanguage\empty
% no need for an extra
\else\ifx\mainbtxlanguage\currentbtxlanguage
@@ -750,8 +765,8 @@
\fi\fi
\stoptexdefinition
-\starttexdefinition btx:apa:composed-title #title
- \btxstartstyleandcolor [apa:\s!list:title:\currentbtxcategory]
+\starttexdefinition unexpanded btx:apa:composed-title #title
+ \btxstartstyleandcolor[apa:\s!list:title:\currentbtxcategory]
\begingroup
\language[\currentbtxlanguage]
\btxusecommand [apa:\s!list:title:\currentbtxcategory] {
@@ -769,7 +784,7 @@
\btxstopstyleandcolor
\stoptexdefinition
-\starttexdefinition btx:apa:title
+\starttexdefinition unexpanded btx:apa:title
\setmode{btx:apa:title-placed}
% we make the title active, opening "file"
\btxdoifelse {file} {
@@ -782,12 +797,19 @@
\texdefinition{btx:apa:composed-title}{title}
}
\btxdoif {title} {
+ \btxdoif {translator} {
+ \btxleftparenthesis
+ \btxflush{translator}
+ \btxcomma
+ \btxlabeltext{apa:Translator}
+ \btxrightparenthesis
+ }
\btxperiod
% TODO: this period may NOT be wanted, as in: Title (2nd ed.).
}
\stoptexdefinition
-\starttexdefinition btx:apa:title-if-not-placed
+\starttexdefinition unexpanded btx:apa:title-if-not-placed
\doifelsemode {btx:apa:title-placed} {
\resetmode{btx:apa:title-placed}
} {
@@ -798,7 +820,7 @@
}
\stoptexdefinition
-\starttexdefinition btx:apa:suffixedyear
+\starttexdefinition unexpanded btx:apa:suffixedyear
\btxdoifelse {year} {
\btxflush{year}
\btxflushsuffix
@@ -815,7 +837,7 @@
% #author may be author(set) or editor
-\starttexdefinition btx:apa:author-or-editor #author
+\starttexdefinition unexpanded btx:apa:author-or-editor #author
\btxdoif {#author} {
\btxflush{#author}
\doifelse {\btxfoundname{#author}} {editor} {
@@ -825,7 +847,7 @@
} {
\btxlabeltext{apa:Editors}
}
- \btxrightparenthesisperiod
+ \btxrightparenthesis
} {
\doifelse {\btxfoundname{#author}} {producer} {
\btxleftparenthesis
@@ -835,7 +857,7 @@
\btxlabeltext{apa:Producers}
}
\btxrightparenthesis
- \btxdoifelse {director} {
+ \btxdoif {director} {
\removeunwantedspaces
\btxparameter{\c!separator:names:3}
\btxflush{director}
@@ -845,9 +867,7 @@
} {
\btxlabeltext{apa:Directors}
}
- \btxrightparenthesisperiod
- } {
- \btxperiod
+ \btxrightparenthesis
}
} {
\doif {\btxfoundname{#author}} {director} {
@@ -857,14 +877,21 @@
} {
\btxlabeltext{apa:Directors}
}
- \btxrightparenthesisperiod
+ \btxrightparenthesis
}
}
}
+ \btxdoif {withauthor} {
+ \btxleftparenthesis
+ \btxlabeltext{apa:with}
+ \btxspace
+ \btxflush{withauthor}
+ \btxrightparenthesis
+ }
}
\stoptexdefinition
-\starttexdefinition btx:apa:authoryear
+\starttexdefinition unexpanded btx:apa:authoryear
% we make the authoryear active, pointing to the citation
\texdefinition{btx:format:inject}
{internal(\currentbtxinternal)}
@@ -889,7 +916,7 @@
}
\stoptexdefinition
-\starttexdefinition btx:apa:editor-in
+\starttexdefinition unexpanded btx:apa:editor-in
\btxdoif {booktitle} {
\btxlabeltext{apa:In}
\doifnot {\btxfoundname{author}} {editor} {
@@ -897,7 +924,7 @@
\texdefinition{btx:apa:author-or-editor} {editor}
}
\btxspace
- \texdefinition{btx:apa:composed-title} {booktitle}
+ \texdefinition{btx:apa:composed-title}{booktitle}
\btxperiod
}
\stoptexdefinition
@@ -905,7 +932,7 @@
% TODO: The title is terminated with period. However,
% we probably don't want this before the parenthesis.
-\starttexdefinition btx:apa:leftparenthesis-or-comma
+\starttexdefinition unexpanded btx:apa:leftparenthesis-or-comma
\doifelsemode {btx:apa:editionset-is-empty} {
\btxleftparenthesis
\resetmode{btx:apa:editionset-is-empty}
@@ -914,7 +941,7 @@
}
\stoptexdefinition
-\starttexdefinition btx:apa:editionset
+\starttexdefinition unexpanded btx:apa:editionset
\setmode{btx:apa:editionset-is-empty}
\doif {\currentbtxcategory} {techreport} {
\texdefinition{btx:apa:leftparenthesis-or-comma}
@@ -963,7 +990,7 @@
}
\stoptexdefinition
-\starttexdefinition btx:apa:journal
+\starttexdefinition unexpanded btx:apa:journal
\btxstartstyleandcolor[apa:\s!list:journal]
\btxusecommand [apa:\s!list:journal] {
\btxflush{journal}
@@ -971,7 +998,7 @@
\btxstopstyleandcolor
\stoptexdefinition
-\starttexdefinition btx:apa:volume
+\starttexdefinition unexpanded btx:apa:volume
\btxstartstyleandcolor[apa:\s!list:volume]
\btxflush{volume}
\btxstopstyleandcolor
@@ -979,7 +1006,7 @@
% this could be simplified!
-\starttexdefinition btx:apa:journal-volume-number-pages
+\starttexdefinition unexpanded btx:apa:journal-volume-number-pages
\btxdoif {journal} {
\btxspace
\texdefinition{btx:apa:journal}
@@ -1028,7 +1055,7 @@
}
\stoptexdefinition
-\starttexdefinition btx:apa:wherefrom-publisher
+\starttexdefinition unexpanded btx:apa:wherefrom-publisher
\btxdoifelse {address} {
\btxflush{address}
\btxdoif {country} {
@@ -1062,7 +1089,7 @@
% use \btxentry here?
-\starttexdefinition btx:apa:url
+\starttexdefinition unexpanded btx:apa:url
\btxspace
\btxlabeltext{apa:Retrieved}
\btxspace
@@ -1082,7 +1109,7 @@
% use \btxentry here?
-\starttexdefinition btx:apa:doi
+\starttexdefinition unexpanded btx:apa:doi
\btxspace
\begingroup
\setbreakpoints[doi]
@@ -1098,7 +1125,7 @@
\endgroup
\stoptexdefinition
-\starttexdefinition btx:apa:note
+\starttexdefinition unexpanded btx:apa:note
\btxdoif {note} {
\btxleftparenthesis
\btxflush{note}
@@ -1106,7 +1133,7 @@
}
\stoptexdefinition
-\starttexdefinition btx:apa:url-doi-note
+\starttexdefinition unexpanded btx:apa:url-doi-note
\doif {\btxfoundname{doi}} {url} {
\texdefinition{btx:apa:url}
}
diff --git a/Master/texmf-dist/tex/context/base/publ-imp-aps.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-aps.lua
index c15ffe918e9..c15ffe918e9 100644
--- a/Master/texmf-dist/tex/context/base/publ-imp-aps.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-aps.lua
diff --git a/Master/texmf-dist/tex/context/base/publ-imp-aps.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-aps.mkvi
index 71b0dc1855c..6742457146b 100644
--- a/Master/texmf-dist/tex/context/base/publ-imp-aps.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-aps.mkvi
@@ -631,7 +631,7 @@
%D returned. In lua syntax, it can be understood as
%D author or editor or publisher or title or ""
-\starttexdefinition btx:aps:composed-title #title
+\starttexdefinition unexpanded btx:aps:composed-title #title
\btxstartstyleandcolor [aps:\s!list:title:\currentbtxcategory]
\begingroup
\language[\currentbtxlanguage]
@@ -646,7 +646,7 @@
\btxstopstyleandcolor
\stoptexdefinition
-\starttexdefinition btx:aps:title
+\starttexdefinition unexpanded btx:aps:title
\btxdoif {title} {
% we make the title active, opening file
\btxdoifelse {file} {
@@ -662,13 +662,13 @@
}
\stoptexdefinition
-\starttexdefinition btx:aps:optional-title
+\starttexdefinition unexpanded btx:aps:optional-title
\doif{\btxparameter{\c!title}}\v!yes {
\texdefinition {btx:aps:title}
}
\stoptexdefinition
-\starttexdefinition btx:aps:year
+\starttexdefinition unexpanded btx:aps:year
\btxdoifelse {year} {
\btxflush{year}
} {
@@ -678,7 +678,7 @@
% #author may be author(set) or editor
-\starttexdefinition btx:aps:author-or-editor #author
+\starttexdefinition unexpanded btx:aps:author-or-editor #author
\btxdoif {#author} {
\btxflush{#author}
\doifelse {\btxfoundname{#author}} {editor} {
@@ -699,12 +699,12 @@
}
\stoptexdefinition
-\starttexdefinition btx:aps:author
+\starttexdefinition unexpanded btx:aps:author
\btxflush{author}
\btxcomma
\stoptexdefinition
-\starttexdefinition btx:aps:editor-in
+\starttexdefinition unexpanded btx:aps:editor-in
\btxdoif {booktitle} {
\btxlabeltext{aps:In}
\doifnot {\btxfoundname{author}} {editor} {
@@ -712,12 +712,12 @@
\texdefinition{btx:aps:author-or-editor} {editor}
}
\btxspace
- \texdefinition{btx:aps:composed-title} {booktitle}
+ \texdefinition{btx:aps:composed-title}{booktitle}
\btxcomma
}
\stoptexdefinition
-\starttexdefinition btx:aps:editionset
+\starttexdefinition unexpanded btx:aps:editionset
\doif {\currentbtxcategory} {techreport} {
\btxdoifelse {type} {
\btxusecommand [\currentbtx:type] {
@@ -762,7 +762,7 @@
}
\stoptexdefinition
-\starttexdefinition btx:aps:journal-volume-year
+\starttexdefinition unexpanded btx:aps:journal-volume-year
\btxdoif {journal} {
\btxstartstyleandcolor [aps:\s!list:journal]
% expandedjournal abbreviatedjournal
@@ -795,7 +795,7 @@
\btxrightparenthesis
\stoptexdefinition
-\starttexdefinition btx:aps:publisher-wherefrom-year
+\starttexdefinition unexpanded btx:aps:publisher-wherefrom-year
\removeunwantedspaces
\removepunctuation
\btxleftparenthesis
@@ -819,7 +819,7 @@
\btxrightparenthesis
\stoptexdefinition
-\starttexdefinition btx:aps:note
+\starttexdefinition unexpanded btx:aps:note
\btxperiod
\btxdoif {note} {
\btxleftparenthesis
@@ -828,7 +828,7 @@
}
\stoptexdefinition
-\starttexdefinition btx:aps:doi-url #text
+\starttexdefinition unexpanded btx:aps:doi-url #text
\ifconditional\btxinteractive
\btxdoifelse {doi} {
\goto {#text} [url(http://dx.doi.org/\btxflush{doi})]
diff --git a/Master/texmf-dist/tex/context/base/publ-imp-author.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-author.mkvi
index 7529c7aa970..b524331867c 100644
--- a/Master/texmf-dist/tex/context/base/publ-imp-author.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-author.mkvi
@@ -23,7 +23,7 @@
% \currentbtxsurnames : \btxauthorfield{surnames}
% \currentbtxjuniors : \btxauthorfield{juniors}
-\starttexdefinition \s!btx:\s!cite:\s!author:\s!de
+\starttexdefinition unexpanded \s!btx:\s!cite:\s!author:\s!de
\ifx\currentbtxlanguage\s!de
\setmode{\s!btx:\s!de}
\fi
diff --git a/Master/texmf-dist/tex/context/base/publ-imp-cite.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-cite.mkvi
index 7ce9ea0da6e..cb1c46fe480 100644
--- a/Master/texmf-dist/tex/context/base/publ-imp-cite.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-cite.mkvi
@@ -13,7 +13,7 @@
\unprotect
-\starttexdefinition btx:cite:inject #content
+\starttexdefinition unexpanded btx:cite:inject #content
\ifconditional\btxinteractive
\ifx\currentbtxinternal\empty
#content
@@ -29,7 +29,7 @@
\fi
\stoptexdefinition
-\starttexdefinition btx:cite:checkconcat
+\starttexdefinition unexpanded btx:cite:checkconcat
\ifnum\currentbtxcount>\zerocount
\let\currentbtxinternal\empty
\let\currentbtxbacklink\empty
@@ -66,7 +66,7 @@
{\tt <\currentbtxreference>}
\stopsetups
-\starttexdefinition btx:cite:concat
+\starttexdefinition unexpanded btx:cite:concat
\btxparameter{\c!separator:\number\currentbtxconcat}
\stoptexdefinition
@@ -143,7 +143,6 @@
\currentbtxrighttext
\stopsetups
-
\startsetups btx:cite:range
\texdefinition{\s!btx:\s!cite:concat}
\currentbtxlefttext
diff --git a/Master/texmf-dist/tex/context/base/publ-imp-commands.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-commands.mkvi
index 14e2dbae12d..14e2dbae12d 100644
--- a/Master/texmf-dist/tex/context/base/publ-imp-commands.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-commands.mkvi
diff --git a/Master/texmf-dist/tex/context/base/publ-imp-default.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-default.lua
index 61b08f30cef..61b08f30cef 100644
--- a/Master/texmf-dist/tex/context/base/publ-imp-default.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-default.lua
diff --git a/Master/texmf-dist/tex/context/base/publ-imp-default.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-default.mkvi
index 6a15712ade4..f5c99ac1817 100644
--- a/Master/texmf-dist/tex/context/base/publ-imp-default.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-default.mkvi
@@ -141,7 +141,7 @@
[\s!default:\s!list:title:article]
[\s!default:\s!list:title]
[\c!style=, % journal is set in italics
- \c!command={\quotation\Word}]
+ \c!command=\quotation] % alan, you can't do \quotation\Word
\definebtx
[\s!default:\s!list:title:book]
diff --git a/Master/texmf-dist/tex/context/base/publ-imp-definitions.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-definitions.mkvi
index 8dfa931b37a..295586f60fb 100644
--- a/Master/texmf-dist/tex/context/base/publ-imp-definitions.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-definitions.mkvi
@@ -27,7 +27,7 @@
\btxfield{short}
\stopxmlsetups
-\starttexdefinition btx:format:inject #link #content
+\starttexdefinition unexpanded btx:format:inject #link #content
\ifx\currentbtxinternal\empty
#content
\else\ifconditional\btxinteractive
@@ -86,7 +86,7 @@
% macros:
-\starttexdefinition btx:style:italic #content
+\starttexdefinition unexpanded btx:style:italic #content
\dontleavehmode
\begingroup
\it
@@ -95,7 +95,7 @@
\endgroup
\stoptexdefinition
-\starttexdefinition btx:style:bold #content
+\starttexdefinition unexpanded btx:style:bold #content
\dontleavehmode
\begingroup
\bf
@@ -103,14 +103,14 @@
\endgroup
\stoptexdefinition
-\starttexdefinition btx:style:quote #content
+\starttexdefinition unexpanded btx:style:quote #content
\dontleavehmode
\startquote
#content
\stopquote
\stoptexdefinition
-\starttexdefinition btx:style #style #content
+\starttexdefinition unexpanded btx:style #style #content
\doifelsedefined {btx:style:#style} {
\texdefinition{btx:style:#style} {
#content
diff --git a/Master/texmf-dist/tex/context/base/publ-imp-list.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-list.mkvi
index 23256de333c..68ccaef01f1 100644
--- a/Master/texmf-dist/tex/context/base/publ-imp-list.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-list.mkvi
@@ -13,7 +13,7 @@
\unprotect
-\starttexdefinition btx:list:inject #content
+\starttexdefinition unexpanded btx:list:inject #content
\ifconditional\btxinteractive
\ifx\currentbtxinternal\empty
#content
@@ -29,7 +29,7 @@
\fi
\stoptexdefinition
-\starttexdefinition btx:list:helpers:concat
+\starttexdefinition unexpanded btx:list:helpers:concat
\space
\stoptexdefinition
diff --git a/Master/texmf-dist/tex/context/base/publ-imp-page.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-page.mkvi
index 2d9040b105a..2d9040b105a 100644
--- a/Master/texmf-dist/tex/context/base/publ-imp-page.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-page.mkvi
diff --git a/Master/texmf-dist/tex/context/base/publ-imp-replacements.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-replacements.lua
index e0ac249fc0d..e0ac249fc0d 100644
--- a/Master/texmf-dist/tex/context/base/publ-imp-replacements.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-replacements.lua
diff --git a/Master/texmf-dist/tex/context/base/publ-imp-test.bib b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-test.bib
index 0d81b49ff08..0d81b49ff08 100644
--- a/Master/texmf-dist/tex/context/base/publ-imp-test.bib
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-test.bib
diff --git a/Master/texmf-dist/tex/context/base/publ-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua
index 34eeaec1882..c30f780f188 100644
--- a/Master/texmf-dist/tex/context/base/publ-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua
@@ -72,6 +72,9 @@ local v_yes = variables.yes
local v_no = variables.no
local v_all = variables.all
local v_always = variables.always
+local v_hidden = variables.hidden
+local v_list = variables.list
+local v_text = variables.text
local v_doublesided = variables.doublesided
local v_default = variables.default
local v_dataset = variables.dataset
@@ -163,6 +166,8 @@ local ctx_btxsetnoflistentries = context.btxsetnoflistentries
local ctx_btxsetcurrentlistentry = context.btxsetcurrentlistentry
local ctx_btxsetcurrentlistindex = context.btxsetcurrentlistindex
+local trialtypesetting = context.trialtypesetting
+
languages.data = languages.data or { }
local data = languages.data
@@ -479,7 +484,7 @@ local findallused do
local reported = { }
local finder = publications.finder
- findallused = function(dataset,reference,internal)
+ findallused = function(dataset,reference,internal,forcethem)
local current = datasets[dataset]
local finder = publications.finder -- for the moment, not yet in all betas
local find = finder and finder(current,reference)
@@ -490,10 +495,20 @@ local findallused do
local luadata = current.luadata
local details = current.details
local ordered = current.ordered
- if set then
+ if allused then
local registered = { }
local function register(tag)
- local entry = allused[tag]
+ local entry = forcethem and luadata[tag]
+ if entry then
+ if registered[tag] then
+ return
+ end
+ okay[#okay+1] = entry
+ -- todo[tag] = true
+ registered[tag] = true
+ return tag
+ end
+ entry = allused[tag]
if not entry then
local parent = details[tag].parent
if parent then
@@ -632,7 +647,15 @@ end
local concatstate = publications.concatstate
-local tobemarked = nil
+-- hidden : mark for list, don't show in text
+-- list : mark for list, show in text only when in list
+-- text : not to list, show in text
+-- always : mark for list, show in text
+
+local marked_todo = false -- keeps track or not yet flushed
+local marked_dataset = false
+local marked_list = false -- the sequential list (we flush in order, not by unordered hash)
+local marked_method = false
local function marknocite(dataset,tag,nofcitations,setup)
ctx_btxstartcite()
@@ -647,10 +670,10 @@ local function marknocite(dataset,tag,nofcitations,setup)
end
local function markcite(dataset,tag,flush)
- if not tobemarked then
+ if not marked_todo then
return 0
end
- local citation = tobemarked[tag]
+ local citation = marked_todo[tag]
if not citation then
return 0
end
@@ -662,39 +685,35 @@ local function markcite(dataset,tag,flush)
if flush then
marknocite(dataset,tag,nofcitations,"nocite")
end
- tobemarked[tag] = nofcitations
+ marked_todo[tag] = nofcitations -- signal that it's marked
return nofcitations
else
return citation
end
end
-local marked_dataset = nil
-local marked_list = nil
-
-local function flushmarked(dataset,list,todo)
- marked_dataset = dataset
- marked_list = list
-end
-
local function btxflushmarked()
- if marked_list and tobemarked then
+ if marked_list and marked_todo then
for i=1,#marked_list do
-- keep order
local tag = marked_list[i]
- local tbm = tobemarked[tag]
+ local tbm = marked_todo[tag]
if tbm == true or not tbm then
nofcitations = nofcitations + 1
- marknocite(marked_dataset,tag,nofcitations,tbm and "nocite" or "invalid")
+ local setup = (tbm or marked_method == v_always) and "nocite" or "invalid"
+ marknocite(marked_dataset,tag,nofcitations,setup)
if trace_cite then
- report_cite("mark, dataset: %s, tag: %s, number: %s, state: %s",marked_dataset,tag,nofcitations,tbm and "unset" or "invalid")
+ report_cite("mark, dataset: %s, tag: %s, number: %s, setup: %s",marked_dataset,tag,nofcitations,setup)
end
+ else
+ -- a number signaling being marked
end
end
end
- tobemarked = nil
- marked_dataset = nil
- marked_list = nil
+ marked_todo = false
+ marked_dataset = false
+ marked_list = false
+ marked_method = false
end
implement { name = "btxflushmarked", actions = btxflushmarked }
@@ -1062,7 +1081,7 @@ do
end
-- we have two suffixes: author (dependent of type) and short
local kind = dataset.authorconversion or "name"
- local field = "author" -- currently only author
+ local fields = { "author", "editor" } -- will be entry in data definition
local shorts = { }
local authors = { }
local hasher = publications.authorhashers[kind]
@@ -1082,36 +1101,42 @@ do
if btxspc then
-- we could act on the 3rd arg returned by getcasted but in general any string will do
-- so we deal with it in the author hashers ... maybe some day ...
- local author = getcasted(dataset,tag,field,specifications[btxspc])
- local kind = type(author)
- if kind == "table" or kind == "string" then
- if u then
- u = listentry.entries.text -- hm
- else
- u = "0"
- end
- local year = tonumber(entry.year) or 9999
- local data = { tag, year, u, i }
- -- authors
- local hash = hasher(author)
- local found = authors[hash]
- if not found then
- authors[hash] = { data }
- else
- found[#found+1] = data
- end
- -- shorts
- local hash = shorter(author)
- local short = f_short(hash,mod(year,100))
- local found = shorts[short]
- if not found then
- shorts[short] = { data }
- else
- found[#found+1] = data
+ local done = false
+ for i=1,#fields do
+ local field = fields[i]
+ local author = getcasted(dataset,tag,field,specifications[btxspc])
+ local kind = type(author)
+ if kind == "table" or kind == "string" then
+ if u then
+ u = listentry.entries.text -- hm
+ else
+ u = "0"
+ end
+ local year = tonumber(entry.year) or 9999
+ local data = { tag, year, u, i }
+ -- authors
+ local hash = hasher(author)
+ local found = authors[hash]
+ if not found then
+ authors[hash] = { data }
+ else
+ found[#found+1] = data
+ end
+ -- shorts
+ local hash = shorter(author)
+ local short = f_short(hash,mod(year,100))
+ local found = shorts[short]
+ if not found then
+ shorts[short] = { data }
+ else
+ found[#found+1] = data
+ end
+ done = true
+ break
end
- --
- else
- report("author typecast expected for field %a",field)
+ end
+ if not done then
+ report("unable to create short for %a, needs one of [%,t]",tag,fields)
end
else
--- no spec so let's forget about it
@@ -1144,7 +1169,7 @@ do
local entry = luadata[tag]
local year = entry.year
detail[key] = hash
- if year ~= lastyear then
+ if not year or year ~= lastyear then
lastyear = year
suffix = 1
else
@@ -2286,14 +2311,17 @@ do
end
local function btxhandlenocite(specification)
+ if trialtypesetting() then
+ return
+ end
local dataset = specification.dataset or v_default
local reference = specification.reference
if not reference or reference == "" then
return
end
--
- local markentry = specification.markentry ~= false
- local internal = specification.internal or ""
+ local method = specification.method
+ local internal = specification.internal or ""
--
local prefix, rest = lpegmatch(prefixsplitter,reference)
if rest then
@@ -2309,10 +2337,14 @@ do
--
local found, todo, list = findallused(dataset,reference,internal)
--
- tobemarked = markentry and todo
- if found and tobemarked then
- flushmarked(dataset,list)
+ if todo then
+ marked_todo = todo
+ marked_dataset = dataset
+ marked_list = list
+ marked_method = method
btxflushmarked() -- here (could also be done in caller)
+ else
+ marked_todo = false
end
end
@@ -2323,7 +2355,7 @@ do
{
{ "dataset" },
{ "reference" },
- { "markentry", "boolean" },
+ { "method" },
{ "variant" },
{ "sorttype" },
{ "compress" },
@@ -2342,9 +2374,9 @@ do
actions = btxhandlenocite,
arguments = {
{
- { "dataset" },
- { "reference" },
- { "markentry", "boolean" },
+ { "dataset" },
+ { "reference" },
+ { "method" },
}
}
}
@@ -2470,12 +2502,15 @@ do
local getter = specification.getter
local setter = specification.setter
local compressor = specification.compressor
+ local method = specification.method
--
local reference = publications.parenttag(dataset,reference)
--
- local found, todo, list = findallused(dataset,reference,internal)
- tobemarked = specification.markentry and todo
+ local found, todo, list = findallused(dataset,reference,internal,method == v_text or method == v_always) -- also when not in list
--
+-- inspect(found)
+-- inspect(todo)
+-- inspect(list)
if not found or #found == 0 then
report("no entry %a found in dataset %a",reference,dataset)
elseif not setup then
@@ -2487,23 +2522,26 @@ do
local source = { }
local luadata = datasets[dataset].luadata
for i=1,#found do
- local entry = found[i]
--- inspect(entry)
- local tag = entry.userdata.btxref
- local ldata = luadata[tag]
- local data = {
- internal = entry.references.internal,
- language = ldata.language,
- dataset = dataset,
- tag = tag,
- -- combis = entry.userdata.btxcom,
- -- luadata = ldata,
- }
- setter(data,dataset,tag,entry)
- if type(data) == "table" then
- source[#source+1] = data
- else
- report("error in cite rendering %a",setup or "?")
+ local entry = found[i]
+ local userdata = entry.userdata
+ local references = entry.references
+ local tag = userdata and userdata.btxref or entry.tag -- no need for userdata
+ if tag then
+ local ldata = luadata[tag]
+ local data = {
+ internal = references and references.internal,
+ language = ldata.language,
+ dataset = dataset,
+ tag = tag,
+ -- combis = entry.userdata.btxcom,
+ -- luadata = ldata,
+ }
+ setter(data,dataset,tag,entry)
+ if type(data) == "table" then
+ source[#source+1] = data
+ else
+ report("error in cite rendering %a",setup or "?")
+ end
end
end
@@ -2530,14 +2568,16 @@ do
if before then local text = before [i] ; if text and text ~= "" then ctx_btxsetbefore (text) end end
if after then local text = after [i] ; if text and text ~= "" then ctx_btxsetafter (text) end end
--
- ctx_btxsetbacklink(currentcitation)
- local bl = listtocite[currentcitation]
- if bl then
- -- we refer to a coming list entry
- ctx_btxsetinternal(bl.references.internal or "")
- else
- -- we refer to a previous list entry
- ctx_btxsetinternal(entry.internal or "")
+ if method ~= v_text then
+ ctx_btxsetbacklink(currentcitation)
+ local bl = listtocite[currentcitation]
+ if bl then
+ -- we refer to a coming list entry
+ ctx_btxsetinternal(bl.references.internal or "")
+ else
+ -- we refer to a previous list entry
+ ctx_btxsetinternal(entry.internal or "")
+ end
end
local language = entry.language
if language then
@@ -2591,9 +2631,16 @@ do
end
end
end
- if tobemarked then
- flushmarked(dataset,list)
+ if trialtypesetting() then
+ marked_todo = false
+ elseif method ~= v_text then
+ marked_todo = todo
+ marked_dataset = dataset
+ marked_list = list
+ marked_method = method
btxflushmarked() -- here (could also be done in caller)
+ else
+ marked_todo = false
end
end
diff --git a/Master/texmf-dist/tex/context/base/publ-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/publ-ini.mkiv
index 41fbfa5a1a4..cf51b831a81 100644
--- a/Master/texmf-dist/tex/context/base/publ-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-ini.mkiv
@@ -165,7 +165,7 @@
\unexpanded\def\btxcheckdefine#1{\doifelsecommandhandler\??btx{#1}\gobbleoneargument{\btx_check_chain{define}{#1}}} % {#2}
\unexpanded\def\btxchecksetup #1{\doifelsecommandhandler\??btx{#1}\gobbleoneargument{\btx_check_chain {setup}{#1}}} % {#2}
-% fpr the moment experimental:
+% for the moment experimental:
\unexpanded\def\btxenableautodefine
{\prependtoks
@@ -350,7 +350,7 @@
\publ_command_yes{#1}}
\unexpanded\def\definebtxcommand#1% {body} #1..#n{body}
- {\setuvalue{\??btxcommand\strippedcsname#1}}%
+ {\setuvalue{\??btxcommand\csstring#1}}%
% tracing
@@ -475,10 +475,10 @@
\let\currentbtxbacklink \empty
\let\currentbtxbacktrace\empty
\let\currentbtxlanguage \empty
- \let\currentbtxtag \empty
\let\currentbtxsuffix \empty
- \let\currentbtxnumber \empty
- \let\currentbtxdataset \empty}
+ %\let\currentbtxdataset \empty % will always be set
+ %\let\currentbtxtag \empty % will always be set
+ \let\currentbtxnumber \empty}
\unexpanded\def\btx_reset_cite % check for less .. not all resets needed when we're grouped (only subcites)
{\let \currentbtxfirst \empty
@@ -492,8 +492,8 @@
\let \currentbtxbacklink \empty
\let \currentbtxbacktrace \empty % not used here
\let \currentbtxlanguage \empty
- \let \currentbtxdataset \empty
- \let \currentbtxtag \empty
+ %\let \currentbtxdataset \empty % will always be set, beware of local reset ~
+ %\let \currentbtxtag \empty % will always be set, beware of local reset ~
\let \currentbtxnumber \empty
\setconstant\currentbtxoverflow \zerocount
\setconstant\currentbtxconcat \zerocount
@@ -1203,6 +1203,13 @@
% these need to be sort of protected:
+% methods:
+%
+% hidden : mark for list, don't show in text
+% list : mark for list, show in text only when in list
+% text : not to list, show in text
+% always : mark for list, show in text
+
\let\p_publ_cite_before \empty
\let\p_publ_cite_after \empty
\let\p_publ_cite_lefttext \empty
@@ -1279,6 +1286,7 @@
\newconditional\btxcitecompress
\let\currentbtxreference\empty
+\let\currentbtxcitemethod\v!hidden
\def\publ_cite_variant
{\begingroup
@@ -1295,7 +1303,7 @@
{\clf_btxhandlecite
dataset {\currentbtxdataset}%
reference {\currentbtxreference}%
- markentry \iftrialtypesetting\s!false\else\s!true\fi\space
+ method {\currentbtxcitemethod}%
variant {\currentbtxcitealternative}%
sorttype {\btxparameter\c!sorttype}%
compress {\btxparameter\c!compress}%
@@ -1306,7 +1314,9 @@
before {\p_publ_cite_before}%
after {\p_publ_cite_after}%
\relax
- \clf_btxflushmarked} % maybe: \iftrialtypesetting\else ... \fi
+ \iftrialtypesetting\else
+ %\clf_btxflushmarked
+ \fi}
\let\dobtxcitevariantblob\publ_cite_handle_variant_blob % command can use it via lua
@@ -1320,9 +1330,23 @@
\btxparameter\c!right
\endgroup}
-\unexpanded\def\btxcitation
+\unexpanded\def\btxlistcitation
+ {\dontleavehmode
+ \begingroup
+ \let\currentbtxcitemethod\v!list
+ \dodoubleempty\publ_citation}
+
+\unexpanded\def\btxtextcitation
+ {\dontleavehmode
+ \begingroup
+ \let\btxcitereference\relax % a bit of a hack but ok
+ \let\currentbtxcitemethod\v!text
+ \dodoubleempty\publ_citation}
+
+\unexpanded\def\btxalwayscitation
{\dontleavehmode
\begingroup
+ \let\currentbtxcitemethod\v!always
\dodoubleempty\publ_citation}
\def\publ_citation[#1][#2]% could be made more efficient but not now
@@ -1332,19 +1356,20 @@
\publ_cite_tags_indeed{#1}%
\fi}
-\unexpanded\def\btxnocitation
- {\dosingleempty\publ_cite_no}
+\unexpanded\def\btxhiddencitation
+ {\dosingleempty\publ_cite_hidden}
-\unexpanded\def\publ_cite_no[#1]%
+\unexpanded\def\publ_cite_hidden[#1]%
{\iftrialtypesetting \else
\begingroup
+ \let\currentbtxcitemethod\v!hidden
\edef\currentbtxreference{#1}%
\clf_btxhandlenocite
+ method {\currentbtxcitemethod}%
dataset {\currentbtxdataset}%
reference {\currentbtxreference}%
- markentry true%
\relax
- % \clf_btxflushmarked
+ %\clf_btxflushmarked
\endgroup
\fi}
@@ -1353,16 +1378,27 @@
%D Compatibility:
-\let\cite \btxcitation
-\let\citation \btxcitation
-\let\nocite \btxnocitation
-\let\nocitation\btxnocitation
+\let\hiddencitation\btxhiddencitation \let\hiddencite\hiddencitation
+\let\listcitation \btxlistcitation \let\listcite \listcitation
+\let\textcitation \btxtextcitation \let\textcite \textcitation
+\let\alwayscitation\btxalwayscitation \let\alwayscite\alwayscitation
+
+\unexpanded\def\citation {\doifelsenextoptionalcs\btxlistcitation \btxdirectlistcite}
+\unexpanded\def\nocitation{\doifelsenextoptionalcs\btxhiddencitation\btxdirecthiddencite}
-\unexpanded\def\cite {\doifelsenextoptionalcs\btxcitation \btxdirectcite}
-\unexpanded\def\nocite{\doifelsenextoptionalcs\btxnocitation\btxdirectnocite}
+\let\cite \citation
+\let\nocite\nocitation
-\unexpanded\def\btxdirectcite #1{\btxcitation [#1]\relax} % no optional arguments
-\unexpanded\def\btxdirectnocite#1{\btxnocitation[#1]\relax} % no optional arguments
+\unexpanded\def\publ_entry_citation {\doifelsenextoptionalcs\btxlistcitation \btxdirectlistcite}
+\unexpanded\def\publ_entry_nocitation{\doifelsenextoptionalcs\btxhiddencitation\btxdirecthiddencite}
+
+\appendtoks
+ \let\cite \publ_entry_citation
+ \let\nocite\publ_entry_nocitation
+\to \everybtxlistrendering
+
+\unexpanded\def\btxdirectlistcite #1{\btxlistcitation [#1]\relax} % no optional arguments
+\unexpanded\def\btxdirecthiddencite#1{\btxhiddencitation[#1]\relax} % no optional arguments
%D Setup helpers, beware, we need to wrap this .. now we need to know
%D how setups are implemented.
@@ -1412,42 +1448,47 @@
\unexpanded\def\publ_fast_btx_setup_chain_inbetween
{\allowbreak->\allowbreak}
+\unexpanded\def\publ_fast_btx_setup_colon_inbetween
+ {\allowbreak:\allowbreak}
+
\unexpanded\def\publ_fast_btx_setup_chain_yes#1#2%
{\dontleavehmode\begingroup
+ \let\:\publ_fast_btx_setup_colon_inbetween
\infofont
\ifcase\btxsetuptype\darkred\or\darkblue\or\darkgreen\or\darkcyan\or\darkmagenta\else\darkred\fi
- [%
- \currentbtxspecification :#1:#2\ifcsname\??setup:\s!btx:\currentbtxspecification :#1:#2\endcsname\else
+ [\prewordbreak
+ \currentbtxspecification \:#1\:#2\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:#2\endcsname\else
\publ_fast_btx_setup_chain_inbetween
- \currentbtxspecificationfallback:#1:#2\ifcsname\??setup:\s!btx:\currentbtxspecificationfallback :#1:#2\endcsname\else
+ \currentbtxspecificationfallback\:#1\:#2\ifcsname\??setup:\s!btx:\currentbtxspecificationfallback:#1:#2\endcsname\else
\publ_fast_btx_setup_chain_inbetween
- #1:#2\ifcsname\??setup:\s!btx :#1:#2\endcsname\else
+ #1\:#2\ifcsname\??setup:\s!btx:#1:#2\endcsname\else
\publ_fast_btx_setup_chain_inbetween
- \currentbtxspecification :#1:\s!unknown\ifcsname\??setup:\s!btx:\currentbtxspecification :#1:\s!unknown\endcsname\else
+ \currentbtxspecification \:#1\:\s!unknown\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:\s!unknown\endcsname\else
\publ_fast_btx_setup_chain_inbetween
- \currentbtxspecificationfallback:#1:\s!unknown\ifcsname\??setup:\s!btx:\currentbtxspecificationfallback:#1:\s!unknown\endcsname\else
+ \currentbtxspecificationfallback\:#1\:\s!unknown\ifcsname\??setup:\s!btx:\currentbtxspecificationfallback:#1:\s!unknown\endcsname\else
\publ_fast_btx_setup_chain_inbetween
unset\fi\fi\fi\fi\fi
\space @\space
\currentbtx
- ]%
+ \prewordbreak]%
\endgroup}
\unexpanded\def\publ_fast_btx_setup_chain_nop#1#2%
{\dontleavehmode\begingroup
+ \let\:\publ_fast_btx_setup_colon_inbetween
\infofont
\darkred
- [%
- \currentbtxspecification :#1:#2\ifcsname\??setup:\s!btx:\currentbtxspecification :#1:#2\endcsname\else
+ [\prewordbreak
+ \currentbtxspecification\:#1\:#2\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:#2\endcsname\else
\publ_fast_btx_setup_chain_inbetween
- #1:#2\ifcsname\??setup:\s!btx :#1:#2\endcsname\else
+ #1\:#2\ifcsname\??setup:\s!btx:#1:#2\endcsname\else
\publ_fast_btx_setup_chain_inbetween
- \currentbtxspecification :#1:\s!unknown\ifcsname\??setup:\s!btx:\currentbtxspecification :#1:\s!unknown\endcsname\else
+ \currentbtxspecification\:#1\:\s!unknown\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:\s!unknown\endcsname\else
\publ_fast_btx_setup_chain_inbetween
unset\fi\fi\fi
\space @\space
\currentbtx
- ]%
+ \prewordbreak]%
\endgroup}
\unexpanded\def\publ_fast_btx_setup_normal#1%
@@ -1527,11 +1568,12 @@
\btxparameter\c!right
\endgroup}
-\let\btxstartcite \begingroup
-\let\btxstopcite \endgroup
\let\btxstartciteauthor\begingroup
\let\btxstopciteauthor \endgroup
+\unexpanded\def\btxstartcite{\begingroup\btx_reset_cite}
+ \let\btxstopcite \endgroup
+
%D Whatever helpers:
\unexpanded\def\btxsingularplural#1{\clf_btxsingularorplural{\currentbtxdataset}{\currentbtxtag}{#1}}
diff --git a/Master/texmf-dist/tex/context/base/publ-jrn.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-jrn.lua
index 0cc41862f53..0cc41862f53 100644
--- a/Master/texmf-dist/tex/context/base/publ-jrn.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-jrn.lua
diff --git a/Master/texmf-dist/tex/context/base/publ-old.mkiv b/Master/texmf-dist/tex/context/base/mkiv/publ-old.mkiv
index f616428e6df..f616428e6df 100644
--- a/Master/texmf-dist/tex/context/base/publ-old.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-old.mkiv
diff --git a/Master/texmf-dist/tex/context/base/publ-oth.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-oth.lua
index 55c62c31eba..55c62c31eba 100644
--- a/Master/texmf-dist/tex/context/base/publ-oth.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-oth.lua
diff --git a/Master/texmf-dist/tex/context/base/publ-reg.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-reg.lua
index 3f276b49abc..3f276b49abc 100644
--- a/Master/texmf-dist/tex/context/base/publ-reg.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-reg.lua
diff --git a/Master/texmf-dist/tex/context/base/publ-sor.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-sor.lua
index b617af760e3..218d1109356 100644
--- a/Master/texmf-dist/tex/context/base/publ-sor.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-sor.lua
@@ -9,31 +9,31 @@ if not modules then modules = { } end modules ['publ-sor'] = {
-- if needed we can optimize this one: chekc if it's detail or something else
-- and use direct access, but in practice it's fast enough
-local type = type
-local concat = table.concat
-local formatters = string.formatters
-local compare = sorters.comparers.basic -- (a,b)
-local sort = table.sort
-
-local toarray = utilities.parsers.settings_to_array
-local utfchar = utf.char
-
-local publications = publications
-local writers = publications.writers
-
-local variables = interfaces.variables
-local v_short = variables.short
-local v_default = variables.default
-local v_reference = variables.reference
-local v_dataset = variables.dataset
-local v_list = variables.list
-local v_index = variables.index
-local v_cite = variables.cite
-local v_used = variables.used
-
-local report = logs.reporter("publications","sorters")
-
-local trace_sorters trackers.register("publications.sorters",function(v) trace_sorters = v end)
+local type = type
+local concat = table.concat
+local formatters = string.formatters
+local compare = sorters.comparers.basic -- (a,b)
+local sort = table.sort
+
+local toarray = utilities.parsers.settings_to_array
+local utfchar = utf.char
+
+local publications = publications
+local writers = publications.writers
+
+local variables = interfaces.variables
+local v_short = variables.short
+local v_default = variables.default
+local v_reference = variables.reference
+local v_dataset = variables.dataset
+local v_list = variables.list
+local v_index = variables.index
+local v_cite = variables.cite
+local v_used = variables.used
+
+local report = logs.reporter("publications","sorters")
+
+local trace_sorters = false trackers.register("publications.sorters",function(v) trace_sorters = v end)
-- authors(s) | year | journal | title | pages
diff --git a/Master/texmf-dist/tex/context/base/publ-tra.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-tra.lua
index 4b03307acc2..4b03307acc2 100644
--- a/Master/texmf-dist/tex/context/base/publ-tra.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-tra.lua
diff --git a/Master/texmf-dist/tex/context/base/publ-tra.mkiv b/Master/texmf-dist/tex/context/base/mkiv/publ-tra.mkiv
index 6ef86ca5944..6ef86ca5944 100644
--- a/Master/texmf-dist/tex/context/base/publ-tra.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-tra.mkiv
diff --git a/Master/texmf-dist/tex/context/base/publ-usr.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-usr.lua
index 901f116296c..901f116296c 100644
--- a/Master/texmf-dist/tex/context/base/publ-usr.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-usr.lua
diff --git a/Master/texmf-dist/tex/context/base/publ-usr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/publ-usr.mkiv
index cb078f424d5..cb078f424d5 100644
--- a/Master/texmf-dist/tex/context/base/publ-usr.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-usr.mkiv
diff --git a/Master/texmf-dist/tex/context/base/publ-xml.mkiv b/Master/texmf-dist/tex/context/base/mkiv/publ-xml.mkiv
index 96375b9cc61..96375b9cc61 100644
--- a/Master/texmf-dist/tex/context/base/publ-xml.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-xml.mkiv
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-1.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-1.lua
index ff2182afa2c..ff2182afa2c 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-1.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-1.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-10.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-10.lua
index f23744b4a24..f23744b4a24 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-10.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-10.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-11.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-11.lua
index 54e5626c28f..54e5626c28f 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-11.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-11.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-13.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-13.lua
index 1646133b5ae..1646133b5ae 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-13.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-13.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-14.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-14.lua
index 2b0c6881445..2b0c6881445 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-14.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-14.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-15.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-15.lua
index 48861f39690..48861f39690 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-15.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-15.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-16.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-16.lua
index e122a2042a4..e122a2042a4 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-16.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-16.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-2.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-2.lua
index affd6c3ca20..affd6c3ca20 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-2.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-2.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-3.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-3.lua
index 4b5c54b4fbb..4b5c54b4fbb 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-3.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-3.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-4.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-4.lua
index 774ec2e1056..774ec2e1056 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-4.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-4.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-5.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-5.lua
index 1137f37bb2e..1137f37bb2e 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-5.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-5.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-6.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-6.lua
index 651ae79ffe6..651ae79ffe6 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-6.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-6.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-7.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-7.lua
index 08cbbab6edf..08cbbab6edf 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-7.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-7.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-8.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-8.lua
index b6960999174..b6960999174 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-8.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-8.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-8859-9.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-9.lua
index 773307fff09..773307fff09 100644
--- a/Master/texmf-dist/tex/context/base/regi-8859-9.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-8859-9.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-cp1250.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-cp1250.lua
index 00d55d1b83f..00d55d1b83f 100644
--- a/Master/texmf-dist/tex/context/base/regi-cp1250.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-cp1250.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-cp1251.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-cp1251.lua
index 7bb72e0ccab..7bb72e0ccab 100644
--- a/Master/texmf-dist/tex/context/base/regi-cp1251.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-cp1251.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-cp1252.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-cp1252.lua
index 86954c9af36..86954c9af36 100644
--- a/Master/texmf-dist/tex/context/base/regi-cp1252.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-cp1252.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-cp1253.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-cp1253.lua
index 31a411efeec..31a411efeec 100644
--- a/Master/texmf-dist/tex/context/base/regi-cp1253.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-cp1253.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-cp1254.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-cp1254.lua
index 73b9927c6ca..73b9927c6ca 100644
--- a/Master/texmf-dist/tex/context/base/regi-cp1254.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-cp1254.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-cp1255.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-cp1255.lua
index 2abb16b54e7..2abb16b54e7 100644
--- a/Master/texmf-dist/tex/context/base/regi-cp1255.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-cp1255.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-cp1256.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-cp1256.lua
index a0697c321c4..a0697c321c4 100644
--- a/Master/texmf-dist/tex/context/base/regi-cp1256.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-cp1256.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-cp1257.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-cp1257.lua
index 6e39c10d4bb..6e39c10d4bb 100644
--- a/Master/texmf-dist/tex/context/base/regi-cp1257.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-cp1257.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-cp1258.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-cp1258.lua
index cf64d2ab629..cf64d2ab629 100644
--- a/Master/texmf-dist/tex/context/base/regi-cp1258.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-cp1258.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-demo.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-demo.lua
index 689f44e32c5..689f44e32c5 100644
--- a/Master/texmf-dist/tex/context/base/regi-demo.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-demo.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-ini.lua
index 37a88fd5f96..37a88fd5f96 100644
--- a/Master/texmf-dist/tex/context/base/regi-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-ini.lua
diff --git a/Master/texmf-dist/tex/context/base/regi-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/regi-ini.mkiv
index 6190393d804..6190393d804 100644
--- a/Master/texmf-dist/tex/context/base/regi-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-ini.mkiv
diff --git a/Master/texmf-dist/tex/context/base/regi-pdfdoc.lua b/Master/texmf-dist/tex/context/base/mkiv/regi-pdfdoc.lua
index 363d3ae0da3..363d3ae0da3 100644
--- a/Master/texmf-dist/tex/context/base/regi-pdfdoc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/regi-pdfdoc.lua
diff --git a/Master/texmf-dist/tex/context/base/scrn-bar.mkvi b/Master/texmf-dist/tex/context/base/mkiv/scrn-bar.mkvi
index 8a2f9441c80..2f21b00040e 100644
--- a/Master/texmf-dist/tex/context/base/scrn-bar.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-bar.mkvi
@@ -132,29 +132,29 @@
\d_scrn_bar_width1.5\emwidth
\fi
\doifnothing{\interactionbarparameter\c!height}{\letinteractionbarparameter\c!height\v!broad}%
- \doifnothing{\interactionbarparameter\c!depth }{\letinteractionbarparameter\c!depth\!!zeropoint}%%%
+ \doifnothing{\interactionbarparameter\c!depth }{\letinteractionbarparameter\c!depth\zeropoint}%%%
\letinteractionbarparameter\c!background\empty
\setbox2\hbox{\inheritedinteractionbarframed{\symbol[\interactionparameter\c!symbolset][\v!previouspage]}}%
- \!!heighta\ht2 % needed because we default to nothing
+ \scratchheight\ht2 % needed because we default to nothing
\letinteractionbarparameter\c!strut\v!no
\letinteractionparameter\c!width\zeropoint
- \!!counta\zerocount % new, was 1
+ \scratchcounterone\zerocount % new, was 1
\processallactionsinset
[#list]
- [ \v!page=>\advance\!!counta\plusfour,
- \v!subpage=>\advance\!!counta\plusfour,
- \s!unknown=>\advance\!!counta\plusone]%
+ [ \v!page=>\advance\scratchcounterone\plusfour,
+ \v!subpage=>\advance\scratchcounterone\plusfour,
+ \s!unknown=>\advance\scratchcounterone\plusone]%
\ifdim\d_scrn_bar_width=\zeropoint
- \!!widtha\dimexpr2\emwidth+\d_scrn_bar_distance\relax
- \!!widthb\dimexpr\!!counta\!!widtha-\d_scrn_bar_distance\relax
+ \scratchdimenone\dimexpr2\emwidth+\d_scrn_bar_distance\relax
+ \scratchdimentwo\dimexpr\scratchcounterone\scratchdimenone-\d_scrn_bar_distance\relax
\else
- \!!widtha\d_scrn_bar_width
- \!!widthb\dimexpr\!!counta\d_scrn_bar_distance-\d_scrn_bar_distance\relax
- \advance\!!widtha -\!!widthb
- \divide\!!widtha \!!counta
- \!!widthb\d_scrn_bar_width
+ \scratchdimenone\d_scrn_bar_width
+ \scratchdimentwo\dimexpr\scratchcounterone\d_scrn_bar_distance-\d_scrn_bar_distance\relax
+ \advance\scratchdimenone -\scratchdimentwo
+ \divide\scratchdimenone \scratchcounterone
+ \scratchdimentwo\d_scrn_bar_width
\fi
- \hbox to \!!widthb
+ \hbox to \scratchdimentwo
{\setnostrut
\startsymbolset[\interactionparameter\c!symbolset]%
\processallactionsinset
@@ -174,12 +174,12 @@
\def\scrn_bar_goto#action%
{\button
- [\c!height=\the\!!heighta,\c!width=\the\!!widtha]%
+ [\c!height=\the\scratchheight,\c!width=\the\scratchdimenone]%
{\symbol[#action]}% we could expand this one once only
[#action]%
\hss}
-% todo: this will be \letblackruleparameter\c!width\!!widtha (faster)
+% todo: this will be \letblackruleparameter\c!width\scratchdimenone (faster)
\def\scrn_bar_alternative_a
{\d_scrn_bar_width \interactionbarparameter\c!width
@@ -189,15 +189,15 @@
\noindent\hbox to \d_scrn_bar_width \bgroup
\dontcomplain
\setupblackrules[\c!height=\v!max,\c!depth=\v!max]%
- \!!widthb\dimexpr\d_scrn_bar_width-4\emwidth\relax
+ \scratchdimentwo\dimexpr\d_scrn_bar_width-4\emwidth\relax
\processaction
[\interactionbarparameter\c!step]
[ \v!small=>\scratchcounter 20,
\v!medium=>\scratchcounter 10,
\v!big=>\scratchcounter 5,
\s!unknown=>\scratchcounter 10]%
- \!!widtha\dimexpr\!!widthb/\scratchcounter\relax
- \setupblackrules[\c!width=\!!widtha]%
+ \scratchdimenone\dimexpr\scratchdimentwo/\scratchcounter\relax
+ \setupblackrules[\c!width=\scratchdimenone]%
\setbox\scratchbox\hbox to \d_scrn_bar_width
{\hskip2\emwidth
\setbox\scratchbox\hbox{\blackrule[\c!color=\interactionbarparameter\c!backgroundcolor]}%
@@ -211,13 +211,13 @@
\normalexpanded{\directgotospecbox\noexpand\interactionbarparameter{\blackrule}[\v!firstpage]}%
\hskip\emwidth
\ifnum\realpageno>\plusone
- \hskip\zeropoint\!!plus\numexpr\realpageno-\plustwo\relax \s!sp\relax % cm gives overflow
+ \hskip\zeropoint\s!plus\numexpr\realpageno-\plustwo\relax \s!sp\relax % cm gives overflow
\normalexpanded{\directgotospecbox\noexpand\interactionbarparameter{\blackrule}[\v!previouspage)]}%
\fi
\normalexpanded{\directgotospecbox\noexpand\interactionbarparameter{\blackrule}[page(\number\realpageno)]}% todo: \v!currentpage
\ifnum\realpageno<\lastpage\relax
\normalexpanded{\directgotospecbox\noexpand\interactionbarparameter{\blackrule}[\v!nextpage]}%
- \hskip\zeropoint\!!plus\numexpr\lastpage-\realpageno-\plusone\relax \s!sp\relax % cm gives overflow
+ \hskip\zeropoint\s!plus\numexpr\lastpage-\realpageno-\plusone\relax \s!sp\relax % cm gives overflow
\fi
\hskip\emwidth
\normalexpanded{\directgotospecbox\noexpand\interactionbarparameter{\blackrule}[\v!lastpage]}%
@@ -234,13 +234,13 @@
\hbox to \d_scrn_bar_width
{\setupblackrules[\c!height=\interactionbarparameter\c!height,\c!depth=\interactionbarparameter\c!depth,\c!width=\emwidth]%
\scratchdimen\dimexpr(\d_scrn_bar_width-4\emwidth)/\numexpr\lastpage+\minusone\relax\relax
- \!!widtha\numexpr\realpageno+\minusone\relax\scratchdimen
- \!!widthb\numexpr\lastpage-\realpageno\relax\scratchdimen
+ \scratchdimenone\numexpr\realpageno+\minusone\relax\scratchdimen
+ \scratchdimentwo\numexpr\lastpage-\realpageno\relax\scratchdimen
\directgotospecbox\interactionbarparameter{\blackrule}[\v!firstpage]%
\hss
- \directgotospecbox\interactionbarparameter{\blackrule[\c!width=\!!widtha]}[\v!previouspage]%
+ \directgotospecbox\interactionbarparameter{\blackrule[\c!width=\scratchdimenone]}[\v!previouspage]%
\blackrule[\c!color=\interactionbarparameter\c!contrastcolor]%
- \directgotospecbox\interactionbarparameter{\blackrule[\c!width=\!!widthb]}[\v!nextpage]%
+ \directgotospecbox\interactionbarparameter{\blackrule[\c!width=\scratchdimentwo]}[\v!nextpage]%
\hss
\directgotospecbox\interactionbarparameter{\blackrule}[\v!lastpage]}%
\fi}
@@ -249,18 +249,18 @@
{\symbol[\ifcase#whereto\v!previous\or\v!somewhere\or\v!next\fi]}
\unexpanded\def\scrn_bar_goto_b#whereto%
- {\vrule\!!height\d_scrn_bar_height\!!depth\d_scrn_bar_depth\!!width\!!widtha\relax}
+ {\vrule\s!height\d_scrn_bar_height\s!depth\d_scrn_bar_depth\s!width\scratchdimenone\relax}
\unexpanded\def\scrn_bar_goto_c#whereto%
{\symbol[\ifcase#whereto\v!previous\or\v!somewhere\or\v!somewhere\or\v!somewhere\or\v!next\fi}
\unexpanded\def\scrn_bar_goto_d#whereto%
- {\vrule \!!width\!!widtha \ifcase#whereto%
- \!!height \d_scrn_bar_height \!!depth \d_scrn_bar_depth \or
- \!!height.5\d_scrn_bar_height \!!depth.5\d_scrn_bar_depth \or
- \!!height \d_scrn_bar_height \!!depth \d_scrn_bar_depth \or
- \!!height.5\d_scrn_bar_height \!!depth.5\d_scrn_bar_depth \else
- \!!height \d_scrn_bar_height \!!depth \d_scrn_bar_depth \fi}
+ {\vrule \s!width\scratchdimenone \ifcase#whereto%
+ \s!height \d_scrn_bar_height \s!depth \d_scrn_bar_depth \or
+ \s!height.5\d_scrn_bar_height \s!depth.5\d_scrn_bar_depth \or
+ \s!height \d_scrn_bar_height \s!depth \d_scrn_bar_depth \or
+ \s!height.5\d_scrn_bar_height \s!depth.5\d_scrn_bar_depth \else
+ \s!height \d_scrn_bar_height \s!depth \d_scrn_bar_depth \fi}
\newconstant\c_scrn_bar_mode
@@ -270,7 +270,8 @@
\let\scrn_bar_goto_indeed\scrn_bar_goto_a}
{\let\scrn_bar_goto_indeed\scrn_bar_goto_b}%
\dorecurse\nofsubpages
- {\scratchcounter\numexpr\recurselevel+\firstsubpage+\minusone\relax
+ %{\scratchcounter\numexpr\recurselevel+\firstsubpage+\minusone\relax
+ {\scratchcounter\therealsubpageno\recurselevel
\c_scrn_bar_mode
\ifnum\scratchcounter<\realpageno \zerocount \else
\ifnum\scratchcounter=\realpageno \plusone \else
@@ -285,7 +286,7 @@
\d_scrn_bar_distance\interactionbarparameter\c!distance
\d_scrn_bar_height \interactionbarparameter\c!height
\d_scrn_bar_depth \interactionbarparameter\c!depth
- \!!widtha\d_scrn_bar_width
+ \scratchdimenone\d_scrn_bar_width
\noindent\hbox{\scrn_bar_goto_x{\hskip\d_scrn_bar_distance}}%
}\fi}
@@ -295,9 +296,9 @@
\d_scrn_bar_distance\interactionbarparameter\c!distance
\d_scrn_bar_height \interactionbarparameter\c!height
\d_scrn_bar_depth \interactionbarparameter\c!depth
- \!!widthb\dimexpr\nofsubpages\d_scrn_bar_distance-\d_scrn_bar_distance\relax % (n-1)
- \!!widtha\dimexpr(\d_scrn_bar_width-\!!widthb)/\nofsubpages\relax
- \ifdim\!!widtha<\d_scrn_bar_distance
+ \scratchdimentwo\dimexpr\nofsubpages\d_scrn_bar_distance-\d_scrn_bar_distance\relax % (n-1)
+ \scratchdimenone\dimexpr(\d_scrn_bar_width-\scratchdimentwo)/\nofsubpages\relax
+ \ifdim\scratchdimenone<\d_scrn_bar_distance
\scrn_bar_alternative_f
\else
\noindent\hbox to \d_scrn_bar_width{\scrn_bar_goto_x{\hss}\unskip}%
@@ -312,37 +313,37 @@
\d_scrn_bar_depth \interactionbarparameter\c!depth
\noindent \hbox to \d_scrn_bar_width \bgroup
\doloop
- {\!!countc\numexpr(\nofsubpages/\recurselevel)+\plusone\relax % rounding
- \!!widthb\d_scrn_bar_distance
- \multiply\!!widthb \!!countc
- \advance\!!widthb -\d_scrn_bar_distance
- \!!widtha\d_scrn_bar_width
- \advance\!!widtha -\!!widthb
- \divide\!!widtha \!!countc
- \ifdim\!!widtha<\d_scrn_bar_distance\else
- \!!countb\recurselevel
+ {\scratchcounterthree\numexpr(\nofsubpages/\recurselevel)+\plusone\relax % rounding
+ \scratchdimentwo\d_scrn_bar_distance
+ \multiply\scratchdimentwo \scratchcounterthree
+ \advance\scratchdimentwo -\d_scrn_bar_distance
+ \scratchdimenone\d_scrn_bar_width
+ \advance\scratchdimenone -\scratchdimentwo
+ \divide\scratchdimenone \scratchcounterthree
+ \ifdim\scratchdimenone<\d_scrn_bar_distance\else
+ \scratchcountertwo\recurselevel
\exitloop
\fi}%
- \ifnum\!!countc>\plusone
+ \ifnum\scratchcounterthree>\plusone
% this is not that well tested
- \advance\!!countc \minustwo
- \!!widtha-\d_scrn_bar_distance
- \!!widtha\!!countc\!!widtha
- \advance\!!widtha \d_scrn_bar_width
- \advance\!!countc \plusone
- \divide\!!widtha \!!countc
+ \advance\scratchcounterthree \minustwo
+ \scratchdimenone-\d_scrn_bar_distance
+ \scratchdimenone\scratchcounterthree\scratchdimenone
+ \advance\scratchdimenone \d_scrn_bar_width
+ \advance\scratchcounterthree \plusone
+ \divide\scratchdimenone \scratchcounterthree
\fi
\doifelse{\interactionbarparameter\c!symbol}\v!yes
{\setupsymbolset[\interactionparameter\c!symbolset]%
\let\scrn_bar_goto_indeed\scrn_bar_goto_c}%
{\let\scrn_bar_goto_indeed\scrn_bar_goto_d}%
- \!!countc\numexpr\realpageno-\plustwo\relax
- \!!countd\numexpr\realpageno+\plustwo\relax
- \ifnum\!!countc<\plusone \!!countc\plusone \fi
- \!!countf\zerocount
+ \scratchcounterthree\numexpr\realpageno-\plustwo\relax
+ \scratchcounterfour\numexpr\realpageno+\plustwo\relax
+ \ifnum\scratchcounterthree<\plusone \scratchcounterthree\plusone \fi
+ \scratchcounterfive\zerocount
\dostepwiserecurse\firstsubpage\lastsubpage\plusone
{\!!doneafalse
- \advance\!!countf \plusone
+ \advance\scratchcounterfive \plusone
\ifnum\recurselevel=\firstsubpage\relax \!!doneatrue \fi
\ifnum\recurselevel=\lastsubpage \relax \!!doneatrue \fi
\c_scrn_bar_mode
@@ -355,7 +356,7 @@
\plusfour
\fi\fi
\else
- \ifnum\!!countf=\!!countb
+ \ifnum\scratchcounterfive=\scratchcountertwo
\ifnum\recurselevel<\realpageno
\plusone
\else\ifnum\recurselevel>\realpageno
@@ -367,9 +368,9 @@
\plusthree
\fi
\fi
- \normalexpanded{\directgotospecbox\noexpand\interactionbarparameter{\scrn_bar_goto_indeed\c_scrn_bar_mode}[page(\recurselevel)]}%
+ \normalexpanded{\directgotospecbox\noexpand\interactionbarparameter{\scrn_bar_goto_indeed\c_scrn_bar_mode}[page(\therealsubpageno\recurselevel)]}%
\hss
- \!!countf\zerocount}%
+ \scratchcounterfive\zerocount}%
\unskip
\egroup
}\fi}
diff --git a/Master/texmf-dist/tex/context/base/scrn-but.lua b/Master/texmf-dist/tex/context/base/mkiv/scrn-but.lua
index 7d883c910b7..85cbf0b3973 100644
--- a/Master/texmf-dist/tex/context/base/scrn-but.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-but.lua
@@ -11,7 +11,7 @@ local f_two_colon = string.formatters["%s:%s"]
local function registerbuttons(tag,register,language)
local data = sorters.definitions[language]
- local orders = daya and data.orders or sorters.definitions.default.orders
+ local orders = data and data.orders or sorters.definitions.default.orders
local tag = tag == "" and { "" } or { tag }
for i=1,#orders do
local order = orders[i]
diff --git a/Master/texmf-dist/tex/context/base/scrn-but.mkvi b/Master/texmf-dist/tex/context/base/mkiv/scrn-but.mkvi
index 3fdaf2c5d75..1d5ffe6f3d6 100644
--- a/Master/texmf-dist/tex/context/base/scrn-but.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-but.mkvi
@@ -724,7 +724,7 @@
{\scrn_menu_action_start
\letinteractionmenuparameter\c!frame\v!off
\letinteractionmenuparameter\c!background\empty
- \letinteractionmenuparameter\v!yes
+ \letinteractionmenuparameter\c!empty\v!yes
\inheritedinteractionmenuframed{\ignorespaces#text\removeunwantedspaces}%
\scrn_menu_action_stop}
diff --git a/Master/texmf-dist/tex/context/base/scrn-fld.lua b/Master/texmf-dist/tex/context/base/mkiv/scrn-fld.lua
index 1563b9005d7..f68cc039dce 100644
--- a/Master/texmf-dist/tex/context/base/scrn-fld.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-fld.lua
@@ -10,11 +10,13 @@ if not modules then modules = { } end modules ['scrn-fld'] = {
local context = context
local ctx_doifelse = commands.doifelse
-local implement = interfaces.implement
+local implement = interfaces.implement
local variables = interfaces.variables
local v_yes = variables.yes
+local report = logs.reporter("widgets")
+
local texsetbox = tex.setbox
local fields = { }
@@ -85,7 +87,12 @@ implement {
implement {
name = "insertfield",
actions = function(name,specification)
- texsetbox("b_scrn_field_body",insert(name,specification))
+ local b = insert(name,specification)
+ if b then
+ texsetbox("b_scrn_field_body",b)
+ else
+ report("unknown field %a",name)
+ end
end,
arguments = {
"string",
diff --git a/Master/texmf-dist/tex/context/base/scrn-fld.mkvi b/Master/texmf-dist/tex/context/base/mkiv/scrn-fld.mkvi
index 4b4c9d0eeca..a92abebc51e 100644
--- a/Master/texmf-dist/tex/context/base/scrn-fld.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-fld.mkvi
@@ -141,9 +141,6 @@
{\definesymbol[defaultyes][\mathematics{\times}]%
\definesymbol[defaultno] [\mathematics{\cdot }]}
-% \def\resetfieldsymbol[#tag]% for experimental usage only
-% {\resetobject{SYM}{#tag}}
-
%D Now comes the real code:
\installcorenamespace{fieldcategory}
@@ -749,12 +746,16 @@
% todo: expand #symbols
+\installcorenamespace {fieldstack}
+
\unexpanded\def\definefieldstack
{\dotripleargument\scrn_fieldstack_define}
\def\scrn_fieldstack_define[#tag][#symbols][#settings]%
- {\ifcsname scrn_fieldstack:#tag\endcsname \else
- \setgvalue{scrn_fieldstack:#tag}{\scrn_fieldstack_construct[#tag][#symbols][#settings]}%
+ {\ifcsname\??fieldstack#tag\endcsname
+ % already done
+ \else
+ \setgvalue{\??fieldstack#tag}{\scrn_fieldstack_construct[#tag][#symbols][#settings]}%
\fi}
\unexpanded\def\fieldstack
@@ -764,7 +765,7 @@
{\ifsecondargument
\scrn_fieldstack_define[#tag][#symbols][#settings]%
\fi
- \getvalue{scrn_fieldstack:#tag}}
+ \csname\??fieldstack#tag\endcsname}
\newbox\b_scrn_fieldstack_box
@@ -885,15 +886,15 @@
{\bgroup
\global\advance\c_scrn_pushbutton_n\plusone
\setupfield
- [pushbutton]
- [\c!frame=\v!overlay,
- \c!offset=\v!overlay,
- \c!clickout={#reference},
+ [pushbutton]%
+ [\c!frame=\v!overlay,%
+ \c!offset=\v!overlay,%
+ \c!clickout={#reference},%
#settings]%
\definefield
[pushbutton:\number\c_scrn_pushbutton_n]%
- [push]
- [pushbutton]
+ [push]%
+ [pushbutton]%
[pushsymbol:#tag:n,pushsymbol:#tag:r,pushsymbol:#tag:d]%
\fitfield
[pushbutton:\number\c_scrn_pushbutton_n]%
diff --git a/Master/texmf-dist/tex/context/base/scrn-hlp.lua b/Master/texmf-dist/tex/context/base/mkiv/scrn-hlp.lua
index 99c0565a8b7..99c0565a8b7 100644
--- a/Master/texmf-dist/tex/context/base/scrn-hlp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-hlp.lua
diff --git a/Master/texmf-dist/tex/context/base/scrn-hlp.mkvi b/Master/texmf-dist/tex/context/base/mkiv/scrn-hlp.mkvi
index eca79c90a5b..7466e5687b7 100644
--- a/Master/texmf-dist/tex/context/base/scrn-hlp.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-hlp.mkvi
@@ -89,7 +89,7 @@
\dontleavehmode \hbox \bgroup
\dontcomplain
\setbox\b_scrn_help_box\hbox{\strut#text}%
- \doregisterhelp{#target}%
+ \scrn_help_register{#target}%
\egroup % can be usernode instead
\goto
{\helpsignal{\number\c_scrn_help_n}#target}%
diff --git a/Master/texmf-dist/tex/context/base/scrn-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.lua
index ce9f9f71b06..ce9f9f71b06 100644
--- a/Master/texmf-dist/tex/context/base/scrn-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.lua
diff --git a/Master/texmf-dist/tex/context/base/scrn-ini.mkvi b/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.mkvi
index 2ed822c6e96..0e00fb456b4 100644
--- a/Master/texmf-dist/tex/context/base/scrn-ini.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.mkvi
@@ -182,7 +182,7 @@
title {\interactionparameter\c!title}%
subtitle {\interactionparameter\c!subtitle}%
author {\interactionparameter\c!author}%
- creator { ConTeXt - \contextversion}%
+ creator {ConTeXt - \contextversion}%
date {\interactionparameter\c!date}%
keywords {\interactionparameter\c!keyword}%
\relax}
diff --git a/Master/texmf-dist/tex/context/base/scrn-pag.lua b/Master/texmf-dist/tex/context/base/mkiv/scrn-pag.lua
index 4d7b388ee0c..dba5b4786c4 100644
--- a/Master/texmf-dist/tex/context/base/scrn-pag.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-pag.lua
@@ -36,6 +36,10 @@ implement {
{ "height", "dimen" },
{ "paperwidth", "dimen" },
{ "paperheight", "dimen" },
+ { "cropoffset", "dimen" },
+ { "bleedoffset", "dimen" },
+ { "artoffset", "dimen" },
+ { "trimoffset", "dimen" },
}
}
}
diff --git a/Master/texmf-dist/tex/context/base/scrn-pag.mkvi b/Master/texmf-dist/tex/context/base/mkiv/scrn-pag.mkvi
index 3dfcd65c5ff..7a7effdc40a 100644
--- a/Master/texmf-dist/tex/context/base/scrn-pag.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-pag.mkvi
@@ -30,6 +30,10 @@
\newdimen\canvastopoffset
\newdimen\canvasmaxwidth
\newdimen\canvasmaxheight
+\newdimen\canvascropoffset
+\newdimen\canvastrimoffset
+\newdimen\canvasbleedoffset
+\newdimen\canvasartoffset
\newconditional\c_scrn_canvas_tight_page
@@ -39,9 +43,11 @@
\edef\currentinteractionscreenheight{\interactionscreenparameter\c!height}%
\canvasbackoffset\backspace
\canvastopoffset\topspace
+ \donetrue
\ifx\currentinteractionscreenwidth\v!max
\global\canvaswidth\printpaperwidth
\else\ifx\currentinteractionscreenwidth\v!fit
+ \donefalse
\global\canvaswidth\dimexpr
\leftcombitotal
+ \makeupwidth
@@ -52,6 +58,7 @@
\relax
\relax
\else\ifx\currentinteractionscreenwidth\v!tight
+ \donefalse
\ifdim\backspace>\canvaswidth
\ifdim\backspace>\zeropoint\relax
\global\advance\canvasbackoffset -\canvaswidth
@@ -66,11 +73,13 @@
\relax
\relax
\else
+ \donefalse
\global\canvaswidth\currentinteractionscreenwidth
\fi\fi\fi
\ifx\currentinteractionscreenheight\v!max
\global\canvasheight\printpaperheight
\else\ifx\currentinteractionscreenheight\v!fit
+ \donefalse
\global\canvasheight\dimexpr
\topheight
+ \topdistance
@@ -83,6 +92,7 @@
\relax
\relax
\else\ifx\currentinteractionscreenheight\v!tight
+ \donefalse
\global\canvasheight\dimexpr\topheight+\topdistance\relax
\ifdim\topspace>\canvasheight
\ifdim\topspace>\zeropoint\relax
@@ -99,6 +109,7 @@
\relax
\relax
\else
+ \donefalse
\global\canvasheight\currentinteractionscreenheight
\fi\fi\fi
\ifconditional\c_page_layouts_location_is_set
@@ -111,8 +122,57 @@
\global\canvasmaxwidth \printpaperwidth
\global\canvasmaxheight\printpaperheight
\fi
+ % new:
+ \ifdone
+ \global\canvascropoffset \layoutcropoffset
+ \global\canvastrimoffset \layouttrimoffset
+ \global\canvasbleedoffset\layoutbleedoffset
+ \global\canvasartoffset \layoutartoffset
+ \else
+ \global\canvascropoffset \zeropoint
+ \global\canvastrimoffset \zeropoint
+ \global\canvasbleedoffset\zeropoint
+ \global\canvasartoffset \zeropoint
+ \fi
\endgroup}
+\newdimen\layoutcropoffset
+\newdimen\layouttrimoffset
+\newdimen\layoutbleedoffset
+\newdimen\layoutartoffset
+
+\appendtoks
+ \edef\p_cropoffset{\layoutparameter\c!cropoffset}%
+ \ifx\p_cropoffset\v!auto
+ \ifconditional\c_page_layouts_location_is_middle
+ \scratchheight\dimexpr(\printpaperheight-\paperheight)/2\relax
+ \scratchwidth \dimexpr(\printpaperwidth -\paperwidth )/2\relax
+ \layoutcropoffset\ifdim\scratchheight>\scratchwidth\scratchheight\else\scratchwidth\fi
+ \layouttrimoffset \layoutparameter\c!trimoffset
+ \layoutbleedoffset\layoutparameter\c!bleedoffset
+ \layoutartoffset \layoutparameter\c!artoffset
+ \else
+ \writestatus\m!system{auto crop etc only supported when location=middle}%
+ \layoutcropoffset \zeropoint
+ \layouttrimoffset \zeropoint
+ \layoutbleedoffset\zeropoint
+ \layoutartoffset \zeropoint
+ \fi
+ \else
+ \layoutcropoffset \layoutparameter\c!cropoffset
+ \layouttrimoffset \layoutparameter\c!trimoffset
+ \layoutbleedoffset\layoutparameter\c!bleedoffset
+ \layoutartoffset \layoutparameter\c!artoffset
+ \fi
+ \relax
+\to \everysetuplayout
+
+\setuplayout
+ [\c!cropoffset=\zeropoint,
+ \c!trimoffset=\zeropoint,
+ \c!bleedoffset=\zeropoint,
+ \c!artoffset=\zeropoint]
+
% test the next when something is changed here:
%
% \setuppapersize[A5][A3] \showframe
@@ -132,6 +192,17 @@
\global\let\scrn_canvas_synchronize_complex\scrn_canvas_synchronize_complex_indeed
\to \everysetuplayout
+\appendtoks
+ \global\let\scrn_canvas_synchronize_simple \scrn_canvas_synchronize_simple_indeed
+ \global\let\scrn_canvas_synchronize_complex\scrn_canvas_synchronize_complex_indeed
+\to \everysetuplayouttarget
+
+\def\scrn_canvas_synchronize_only
+ {\clf_setupcanvas
+ paperwidth \printpaperwidth
+ paperheight \printpaperheight
+ \relax}
+
\def\scrn_canvas_synchronize_simple_indeed
{\clf_setupcanvas
paperwidth \printpaperwidth
@@ -152,6 +223,10 @@
height \canvasheight
paperwidth \canvasmaxwidth
paperheight \canvasmaxheight
+ cropoffset \canvascropoffset
+ trimoffset \canvastrimoffset
+ bleedoffset \canvasbleedoffset
+ artoffset \canvasartoffset
\relax
%\global\let\scrn_canvas_synchronize_simple \relax
\global\let\scrn_canvas_synchronize_complex\relax}
@@ -179,8 +254,8 @@
\c!option=\v!auto]
\appendtoks
- \global\let\scrn_canvas_synchronize_simple \scrn_canvas_synchronize_simple
- \global\let\scrn_canvas_synchronize_complex\scrn_canvas_synchronize_complex
+ \global\let\scrn_canvas_synchronize_simple \scrn_canvas_synchronize_simple_indeed
+ \global\let\scrn_canvas_synchronize_complex\scrn_canvas_synchronize_complex_indeed
\to \everysetupinteractionscreen
%D Conditional page breaks:
diff --git a/Master/texmf-dist/tex/context/base/scrn-ref.lua b/Master/texmf-dist/tex/context/base/mkiv/scrn-ref.lua
index c1fc9487138..c1fc9487138 100644
--- a/Master/texmf-dist/tex/context/base/scrn-ref.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-ref.lua
diff --git a/Master/texmf-dist/tex/context/base/scrn-ref.mkvi b/Master/texmf-dist/tex/context/base/mkiv/scrn-ref.mkvi
index 2b15b46778e..c165e9131c2 100644
--- a/Master/texmf-dist/tex/context/base/scrn-ref.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-ref.mkvi
@@ -18,10 +18,14 @@
\unprotect
\appendtoks
- \doifsomething{\interactionparameter\c!calculate}{\doregistercalculationset{\interactionparameter\c!calculate}}%
- \doifelse{\interactionparameter\c!click }\v!yes \settrue \setfalse \highlighthyperlinks
- \doifelse{\interactionparameter\c!display}\v!new \settrue \setfalse \gotonewwindow
- \doifnot {\interactionparameter\c!page }\v!no \scrn_reference_enable_page_destinations
+ \doifsomething{\interactionparameter\c!calculate}%
+ {\clf_setfieldcalculationset{\interactionparameter\c!calculate}}%
+ \doifelse{\interactionparameter\c!click }\v!yes
+ \settrue\setfalse\highlighthyperlinks
+ \doifelse{\interactionparameter\c!display}\v!new
+ \settrue\setfalse\gotonewwindow
+ \doifnot {\interactionparameter\c!page}\v!no
+ \scrn_reference_enable_page_destinations
\to \everysetupinteraction
\def\scrn_reference_enable_page_destinations % no reset
@@ -32,6 +36,8 @@
\c!click=\v!yes,
\c!display=\v!normal,
\c!focus=\v!fit,
+ %\c!focusoffset=\zeropoint, % when tested with al views it will become 5\points
+ \c!focusoffset=5\points,
\c!calculate=,
% rendering:
\c!width=\emwidth,
@@ -39,6 +45,12 @@
\c!depth=\zeropoint,
\c!symbolset=]
+% for now here, might become per link
+
+\appendtoks
+ \enabledirectives[destinations.offset=\the\dimexpr\interactionparameter\c!focusoffset\relax]%
+\to \everysetupinteraction
+
%D We have to make sure of some settings:
\def\scrn_reference_set_text_actions
diff --git a/Master/texmf-dist/tex/context/base/scrn-wid.lua b/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.lua
index 72c9bc733aa..b9855546e1a 100644
--- a/Master/texmf-dist/tex/context/base/scrn-wid.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.lua
@@ -47,8 +47,8 @@ implement {
name = "presetsymbollist",
arguments = "string",
actions = function(list)
- codeinjections.presetsymbollist(list)
- end
+ codeinjections.presetsymbollist(list)
+ end
}
-- Attachments
diff --git a/Master/texmf-dist/tex/context/base/scrn-wid.mkvi b/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.mkvi
index 57a4be27639..f4679684c21 100644
--- a/Master/texmf-dist/tex/context/base/scrn-wid.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.mkvi
@@ -272,7 +272,7 @@
\else\ifsecondargument
\registerattachment[#tag][title=#title,name=#title,file=#title]%
\else
- \registerattachment[#tag][title=#title,name=#tag,file=#tag]%
+ \registerattachment[#tag][title=#tag,name=#tag,file=#tag]%
\fi\fi\fi}
%D Comments:
diff --git a/Master/texmf-dist/tex/context/base/scrp-cjk.lua b/Master/texmf-dist/tex/context/base/mkiv/scrp-cjk.lua
index 9050da6be20..77c58b18a95 100644
--- a/Master/texmf-dist/tex/context/base/scrp-cjk.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrp-cjk.lua
@@ -34,7 +34,8 @@ local getid = nuts.getid
local getattr = nuts.getattr
local getsubtype = nuts.getsubtype
local getfield = nuts.getfield
-local setfield = nuts.setfield
+
+local setchar = nuts.setchar
local nodepool = nuts.pool
local new_glue = nodepool.glue
@@ -46,6 +47,8 @@ local skipcodes = nodes.skipcodes
local glyph_code = nodecodes.glyph
local glue_code = nodecodes.glue
local userskip_code = skipcodes.userskip
+local spaceskip_code = skipcodes.spaceskip
+local xspaceskip_code = skipcodes.xspaceskip
local a_scriptstatus = attributes.private('scriptstatus')
local a_scriptinjection = attributes.private('scriptinjection')
@@ -514,13 +517,13 @@ function scripts.decomposehangul(head)
for current in traverse_id(glyph_code,head) do
local lead_consonant, medial_vowel, tail_consonant = decomposed(getchar(current))
if lead_consonant then
- setfield(current,"char",lead_consonant)
+ setchar(current,lead_consonant)
local m = copy_node(current)
- setfield(m,"char",medial_vowel)
+ setchar(m,medial_vowel)
head, current = insert_node_after(head,current,m)
if tail_consonant then
local t = copy_node(current)
- setfield(t,"char",tail_consonant)
+ setchar(t,tail_consonant)
head, current = insert_node_after(head,current,t)
end
done = true
@@ -953,15 +956,19 @@ local function process(head,first,last)
or pcjk == "half_width_close" or ncjk == "half_width_open" then -- extra compared to korean
previous = "start"
else -- if head ~= first then
- if id == glue_code and getsubtype(first) == userskip_code then -- also scriptstatus check?
- -- for the moment no distinction possible between space and userskip
- local w = getfield(getfield(first,"spec"),"width")
- local s = spacedata[getfont(p)]
- if w == s then -- could be option
- if trace_details then
- trace_detail_between(p,n,"space removed")
+ if id == glue_code then
+ -- also scriptstatus check?
+ local subtype = getsubtype(first)
+ if subtype == userskip_code or subtype == spaceskip_code or subtype == xspaceskip_code then
+ -- for the moment no distinction possible between space and userskip
+ local w = getfield(first,"width")
+ local s = spacedata[getfont(p)]
+ if w == s then -- could be option
+ if trace_details then
+ trace_detail_between(p,n,"space removed")
+ end
+ remove_node(head,first,true)
end
- remove_node(head,first,true)
end
end
previous = pcjk
diff --git a/Master/texmf-dist/tex/context/base/scrp-eth.lua b/Master/texmf-dist/tex/context/base/mkiv/scrp-eth.lua
index 8ecbce52295..43cb2ff6a4e 100644
--- a/Master/texmf-dist/tex/context/base/scrp-eth.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrp-eth.lua
@@ -13,7 +13,6 @@ local nuts = nodes.nuts
local getnext = nuts.getnext
local getfont = nuts.getfont
-local getchar = nuts.getchar
local getid = nuts.getid
local getattr = nuts.getattr
diff --git a/Master/texmf-dist/tex/context/base/scrp-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.lua
index 3c3517542d3..02b2891378e 100644
--- a/Master/texmf-dist/tex/context/base/scrp-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.lua
@@ -57,17 +57,18 @@ local getfont = nuts.getfont
local getid = nuts.getid
local getattr = nuts.getattr
local setattr = nuts.setattr
+local isglyph = nuts.isglyph
local insert_node_after = nuts.insert_after
local first_glyph = nuts.first_glyph
local traverse_id = nuts.traverse_id
+local traverse_char = nuts.traverse_char
local nodepool = nuts.pool
local new_glue = nodepool.glue
local new_rule = nodepool.rule
local new_penalty = nodepool.penalty
------ new_gluespec = nodepool.gluespec
scripts = scripts or { }
local scripts = scripts
@@ -453,8 +454,8 @@ function scripts.injectors.handler(head)
local last_a, normal_process, lastfont, originals = nil, nil, nil, nil
local done, first, last, ok = false, nil, nil, false
while start do
- local id = getid(start)
- if id == glyph_code then
+ local char, id = isglyph(start)
+ if char then
local a = getattr(start,a_scriptinjection)
if a then
if a ~= last_a then
@@ -478,21 +479,20 @@ function scripts.injectors.handler(head)
end
if normal_process then
-- wrong: originals are indices !
- local f = getfont(start)
- if f ~= lastfont then
- originals = fontdata[f].resources
+ local font = getfont(start)
+ if font ~= lastfont then
+ originals = fontdata[font].resources
if resources then
originals = resources.originals
else
originals = nil -- can't happen
end
- lastfont = f
+ lastfont = font
end
- local c = getchar(start)
if originals and type(originals) == "number" then
- c = originals[c] or c
+ char = originals[char] or char
end
- local h = hash[c]
+ local h = hash[char]
if h then
setattr(start,a_scriptstatus,categorytonumber[h])
if not first then
@@ -697,26 +697,55 @@ end)
local categories = characters.categories or { }
+-- local function hit(root,head)
+-- local current = getnext(head)
+-- local lastrun = false
+-- local lastfinal = false
+-- while current and getid(current) == glyph_code do
+-- local char = getchar(current)
+-- local newroot = root[char]
+-- if newroot then
+-- local final = newroot.final
+-- if final then
+-- lastrun = current
+-- lastfinal = final
+-- end
+-- root = newroot
+-- elseif categories[char] == "mn" then
+-- -- continue
+-- else
+-- return lastrun, lastfinal
+-- end
+-- current = getnext(current)
+-- end
+-- if lastrun then
+-- return lastrun, lastfinal
+-- end
+-- end
+
local function hit(root,head)
local current = getnext(head)
local lastrun = false
local lastfinal = false
- while current and getid(current) == glyph_code do
- local char = getchar(current)
- local newroot = root[char]
- if newroot then
- local final = newroot.final
- if final then
- lastrun = current
- lastfinal = final
+ while current do
+ local char = isglyph(current)
+ if char then
+ local newroot = root[char]
+ if newroot then
+ local final = newroot.final
+ if final then
+ lastrun = current
+ lastfinal = final
+ end
+ root = newroot
+ elseif categories[char] == "mn" then
+ -- continue
+ else
+ return lastrun, lastfinal
end
- root = newroot
- elseif categories[char] == "mn" then
- -- continue
else
- return lastrun, lastfinal
+ break
end
- current = getnext(current)
end
if lastrun then
return lastrun, lastfinal
@@ -746,9 +775,11 @@ function splitters.handler(head) -- todo: also first_glyph test
local last, final = hit(root,current)
if last then
local next = getnext(last)
- if next and getid(next) == glyph_code then
- local nextchar = getchar(next)
- if tree[nextchar] then
+ if next then
+ local nextchar = isglyph(next)
+ if not nextchar then
+ -- we're done
+ elseif tree[nextchar] then
if trace_splitdetail then
if type(final) == "string" then
report_splitting("advance %s processing between <%s> and <%c>","with",final,nextchar)
@@ -791,20 +822,6 @@ local function marker(head,current,font,color) -- could become: nodes.tracers.ma
return head, current
end
--- local function process(handler,head,first,last)
--- dataset = numbertodataset[first[a_scriptsplitting]]
--- stretch = emwidths[first.font]*dataset.inter_word_stretch_factor
--- return insert_node_after(head,last,new_glue(0,stretch))
--- end
---
--- local cache = { } table.setmetatableindex(cache,function(t,k)
--- local v = new_gluespec(0,k)
--- nodepool.register(v)
--- t[k] = v
--- return v
--- end)
--- return insert_node_after(head,last,new_glue(cache[last_s]))
-
local last_a, last_f, last_s, last_q
function splitters.insertafter(handler,head,first,last,detail)
@@ -886,11 +903,11 @@ setmetatableindex(cache_nop,function(t,k) local v = { } t[k] = v return v end)
-- playing nice
function autofontfeature.handler(head)
- for n in traverse_id(glyph_code,tonut(head)) do
+ for n in traverse_char(tonut(head)) do
-- if getattr(n,a_scriptinjection) then
-- -- already tagged by script feature, maybe some day adapt
-- else
- local char = getchar(n)
+ local char = getchar(n)
local script = otfscripts[char]
if script then
local dynamic = getattr(n,0) or 0
diff --git a/Master/texmf-dist/tex/context/base/scrp-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.mkiv
index cd060c02bbd..cd060c02bbd 100644
--- a/Master/texmf-dist/tex/context/base/scrp-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.mkiv
diff --git a/Master/texmf-dist/tex/context/base/scrp-tha.lua b/Master/texmf-dist/tex/context/base/mkiv/scrp-tha.lua
index ec5df07c075..ec5df07c075 100644
--- a/Master/texmf-dist/tex/context/base/scrp-tha.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrp-tha.lua
diff --git a/Master/texmf-dist/tex/context/base/sort-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/sort-ini.lua
index 9c4d5acee78..3266425cbf4 100644
--- a/Master/texmf-dist/tex/context/base/sort-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/sort-ini.lua
@@ -312,7 +312,7 @@ local function update() -- prepare parent chains, needed when new languages are
end
end
-local function setlanguage(l,m,d,u) -- this will become a specification table
+local function setlanguage(l,m,d,u) -- this will become a specification table (also keep this one as it's used in manuals)
language = (l ~= "" and l) or constants.defaultlanguage
data = definitions[language or constants.defaultlanguage] or definitions[constants.defaultlanguage]
method = (m ~= "" and m) or (data.method ~= "" and data.method) or constants.defaultmethod
@@ -509,10 +509,11 @@ end
local pattern = nil
-local function prepare()
+local function prepare() -- todo: test \Ux{hex}
pattern = Cs( (
characters.tex.toutfpattern()
+ lpeg.patterns.whitespace / "\000"
+ + (P("\\Ux{") / "" * ((1-P("}"))^1/function(s) return utfchar(tonumber(s,16)) end) * (P("}")/""))
+ (P("\\") / "") * R("AZ")^0 * (P(-1) + #(1-R("AZ")))
+ (P("\\") * P(1) * R("az","AZ")^0) / ""
+ S("[](){}$\"'") / ""
@@ -696,54 +697,68 @@ end
local function packch(entry)
local split = entry.split
- if #split > 0 then -- useless test
+ if split and #split > 0 then -- useless test
local t = { }
for i=1,#split do
- local tt, li = { }, split[i].ch
- for j=1,#li do
- local lij = li[j]
- local byt = utfbyte(lij)
+ local tt = { }
+ local ch = split[i].ch
+ for j=1,#ch do
+ local chr = ch[j]
+ local byt = utfbyte(chr)
if byt > ignoredoffset then
tt[j] = "[]"
elseif byt == 0 then
tt[j] = " "
else
- tt[j] = lij
+ tt[j] = chr
end
end
t[i] = concat(tt)
end
return concat(t," + ")
else
- local t, li = { }, split.ch
- for j=1,#li do
- local lij = li[j]
- local byt = utfbyte(lij)
- if byt > ignoredoffset then
- t[j] = "[]"
- elseif byt == 0 then
- t[j] = " "
- else
- t[j] = lij
+ local t = { }
+ local ch = (split and split.ch) or entry.ch or entry
+ if ch then
+ for i=1,#ch do
+ local chr = ch[i]
+ local byt = utfbyte(chr)
+ if byt > ignoredoffset then
+ t[i] = "[]"
+ elseif byt == 0 then
+ t[i] = " "
+ else
+ t[i] = chr
+ end
end
+ return concat(t)
+ else
+ return ""
end
- return concat(t)
end
end
local function packuc(entry)
local split = entry.split
- if #split > 0 then -- useless test
+ if split and #split > 0 then -- useless test
local t = { }
for i=1,#split do
t[i] = concat(split[i].uc, " ") -- sq
end
return concat(t," + ")
else
- return concat(split.uc," ") -- sq
+ local uc = (split and split.uc) or entry.uc or entry
+ if uc then
+ return concat(uc," ") -- sq
+ else
+ return ""
+ end
end
end
+sorters.packch = packch
+sorters.packuc = packuc
+
function sorters.sort(entries,cmp)
if trace_methods then
local nofentries = #entries
diff --git a/Master/texmf-dist/tex/context/base/sort-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/sort-ini.mkiv
index b7b49025561..b7b49025561 100644
--- a/Master/texmf-dist/tex/context/base/sort-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/sort-ini.mkiv
diff --git a/Master/texmf-dist/tex/context/base/sort-lan.lua b/Master/texmf-dist/tex/context/base/mkiv/sort-lan.lua
index 6b0cc50072e..e84692afc52 100644
--- a/Master/texmf-dist/tex/context/base/sort-lan.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/sort-lan.lua
@@ -103,10 +103,10 @@ definitions['de'] = {
},
}
-definitions['deo'] = { parent = 'de' } -- old german
+definitions['deo'] = { parent = 'de' } -- old german
-definitions['de-DE'] = { parent = 'de' } -- german - Germany
-definitions['de-CH'] = { parent = 'de' } -- german - Swiss
+definitions['de-DE'] = { parent = 'de' } -- german - Germany
+definitions['de-CH'] = { parent = 'de' } -- german - Swiss
-- german - Austria
diff --git a/Master/texmf-dist/tex/context/base/spac-adj.lua b/Master/texmf-dist/tex/context/base/mkiv/spac-adj.lua
index cdf9b505119..cdf9b505119 100644
--- a/Master/texmf-dist/tex/context/base/spac-adj.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-adj.lua
diff --git a/Master/texmf-dist/tex/context/base/spac-adj.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-adj.mkiv
index b8534303df9..ad0f92a1f2e 100644
--- a/Master/texmf-dist/tex/context/base/spac-adj.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-adj.mkiv
@@ -45,7 +45,7 @@
{\dowithnextboxcs\spac_vadjust_faked_finish\vtop}
\def\spac_vadjust_faked_finish
- {\setbox\nextbox\hbox{\llap{\lower\strutdepth\box\nextbox}}%
+ {\setbox\nextbox\hpack{\llap{\lower\strutdepth\box\nextbox}}%
\smashedbox\nextbox}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/spac-ali.lua b/Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua
index 880da6213d5..a67a3013333 100644
--- a/Master/texmf-dist/tex/context/base/spac-ali.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua
@@ -24,11 +24,12 @@ local getnext = nuts.getnext
local getprev = nuts.getprev
local getid = nuts.getid
local getlist = nuts.getlist
+local setlist = nuts.setlist
local getattr = nuts.getattr
local setattr = nuts.setattr
local getsubtype = nuts.getsubtype
-local hpack_nodes = nuts.hpack -- nodes.fasthpack not really faster here
+local hpack_nodes = nuts.hpack
local linked_nodes = nuts.linked
local unsetvalue = attributes.unsetvalue
@@ -86,12 +87,12 @@ local function handler(head,leftpage,realpageno)
action = leftpage and 2 or 1
end
if action == 1 then
- setfield(current,"list",hpack_nodes(linked_nodes(getlist(current),new_stretch(3)),getfield(current,"width"),"exactly"))
+ setlist(current,hpack_nodes(linked_nodes(getlist(current),new_stretch(3)),getfield(current,"width"),"exactly"))
if trace_realign then
report_realign("flushing left, align %a, page %a, realpage %a",align,pageno,realpageno)
end
elseif action == 2 then
- setfield(current,"list",hpack_nodes(linked_nodes(new_stretch(3),getlist(current)),getfield(current,"width"),"exactly"))
+ setlist(current,hpack_nodes(linked_nodes(new_stretch(3),getlist(current)),getfield(current,"width"),"exactly"))
if trace_realign then
report_realign("flushing right. align %a, page %a, realpage %a",align,pageno,realpageno)
end
diff --git a/Master/texmf-dist/tex/context/base/spac-ali.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-ali.mkiv
index 07d588ba7d5..21714f07c36 100644
--- a/Master/texmf-dist/tex/context/base/spac-ali.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-ali.mkiv
@@ -113,13 +113,13 @@
{\textdir TRT\relax
\setfalse\inlinelefttoright}
-\def\currentdirectionparameters
- {\ifconditional\inlinelefttoright \else
- idir="r2l",
- \fi
- \ifconditional\displaylefttoright \else
- ddir="r2l",
- \fi}
+% \def\currentdirectionparameters
+% {\ifconditional\inlinelefttoright \else
+% idir {r2l}%
+% \fi
+% \ifconditional\displaylefttoright \else
+% ddir {r2l}%
+% \fi}
\unexpanded\def\synchronizelayoutdirection
{\ifconditional\layoutlefttoright
@@ -148,6 +148,35 @@
\unexpanded\def\synchronizeinlinedirection
{\textdir T\ifconditional\inlinelefttoright L\else R\fi T\relax}
+% maybe some day:
+%
+% \newcount\postdirpenalty % \zerocount
+% \newcount\predirpenalty % \zerocount
+%
+% \def\spac_directions_post_break
+% {\ifhmode
+% \removeunwantedspaces
+% \penalty\postdirpenalty
+% \fi}
+%
+% \def\spac_directions_pre_break
+% {\ifhmode
+% \penalty\predirpenalty
+% \ignorespaces
+% \fi}
+%
+% \unexpanded\def\spac_directions_lefttoright_hmode
+% {\settrue\inlinelefttoright
+% \textdir TLT\relax
+% \aftergroup\spac_directions_post_break
+% \spac_directions_pre_break}
+%
+% \unexpanded\def\spac_directions_righttoleft_hmode
+% {\textdir TRT\relax
+% \setfalse\inlinelefttoright
+% \aftergroup\spac_directions_post_break
+% \spac_directions_pre_break}
+
\unexpanded\def\showdirections
{\dontleavehmode
\begingroup\infofont\textdir TLT[\space
@@ -167,6 +196,10 @@
\unexpanded\def\autodirvbox#1#{\vbox#1\bgroup\synchronizeinlinedirection\let\next} % maybe also pardir or maybe just a \vbox
\unexpanded\def\autodirvtop#1#{\vtop#1\bgroup\synchronizeinlinedirection\let\next} % maybe also pardir or maybe just a \vtop
+\unexpanded\def\leftorrighthbox{\ifconditional\displaylefttoright\expandafter\lefttorighthbox\else\expandafter\righttolefthbox\fi}
+\unexpanded\def\leftorrightvbox{\ifconditional\displaylefttoright\expandafter\lefttorightvbox\else\expandafter\righttoleftvbox\fi}
+\unexpanded\def\leftorrightvtop{\ifconditional\displaylefttoright\expandafter\lefttorightvtop\else\expandafter\righttoleftvtop\fi}
+
% Tolerance and hyphenation
\ifdefined\lesshyphens \else \let\lesshyphens\relax \fi
@@ -255,6 +288,7 @@
\newconstant\c_spac_align_state_horizontal
\newconstant\c_spac_align_state_broad
+\newconstant\c_spac_align_state_par_fill
\def\v_spac_align_fill_amount {\plusone fil}
\def\v_spac_align_fill_amount_negative {\minusone fil}
@@ -439,7 +473,8 @@
\spac_align_set_horizontal_centered_last_line
\or
\parfillskip\zeropoint
- \fi}
+ \fi
+ \relax}
% Page spacing:
@@ -509,8 +544,9 @@
\c_spac_align_state_vertical \zerocount
\c_spac_align_state_direction \zerocount % what is default ?
\c_spac_align_state_page \zerocount
+ \c_spac_align_state_par_fill \zerocount
\ifcsname\??aligncommand\m_spac_align_asked\endcsname
- \csname\??aligncommand\m_spac_align_asked\endcsname % not much gain in new method
+ \lastnamedcs
\else
\rawprocesscommacommand[\m_spac_align_asked]\spac_align_collect
\fi
@@ -522,6 +558,7 @@
\spac_align_flush_vertical
\spac_align_flush_direction
\spac_align_flush_page
+ \spac_align_flush_parfill
}}% kept, nice for tracing
\edef\raggedcommand {\the\t_spac_align_collected }%
\edef\updateraggedskips{\spac_align_flush_horizontal}%
@@ -598,7 +635,7 @@
\unexpanded\def\installalign#1#2% beware: commands must be unexpandable!
{\ifcsname\??aligncommand#1\endcsname \else
- \setvalue{\??aligncommand#1}{\t_spac_align_collected\expandafter{\the\t_spac_align_collected#2}}%
+ \setvalue{\??aligncommand#1}{\toksapp\t_spac_align_collected{#2}}%
\fi}
% beware, toks stuff and states are set at a differt time, so installalign is
@@ -606,7 +643,7 @@
%
% \setvalue{\??aligncommand whatever}%
% {\c_spac_align_state_horizontal\plushundred
-% \t_spac_align_collected\expandafter{\the\t_spac_align_collected .....}}
+% \toksapp\t_spac_align_collected{.....}}
%
% this one could deal with both
%
@@ -615,7 +652,7 @@
% \setvalue{\??aligncommand#1}%
% {\spac_align_set_horizontal_none
% \c_spac_align_state_horizontal\plushundred % don't set
-% \t_spac_align_collected\expandafter{\the\t_spac_align_collected#2}}%
+% \toksapp\t_spac_align_collected{#2}}%
% \fi}
%
% \installalignoption
@@ -632,7 +669,7 @@
\setvalue{\??aligncommand\v!height }{\c_spac_align_state_page \plustwo }
\setvalue{\??aligncommand\v!line }{\c_spac_align_state_page \plusthree
% this will become another keyword (undocumented anyway)
- \t_spac_align_collected\expandafter{\the\t_spac_align_collected\settrue\raggedonelinerstate}}
+ \toksapp\t_spac_align_collected{\settrue\raggedonelinerstate}}
\setvalue{\??aligncommand\v!high }{\c_spac_align_state_vertical \plusthree}
\setvalue{\??aligncommand\v!low }{\c_spac_align_state_vertical \plustwo }
@@ -669,22 +706,42 @@
\c_spac_align_state_broad \plusone
\c_spac_align_state_horizontal\plustwo }
-\setvalue{\??aligncommand\v!lesshyphenation}{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\lesshyphens}}
-\setvalue{\??aligncommand\v!morehyphenation}{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\morehyphens}}
-
-\setvalue{\??aligncommand\v!hanging }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\font_protruding_enable }}
-\setvalue{\??aligncommand\v!nothanging }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\font_protruding_disable}}
-\setvalue{\??aligncommand\v!hz }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\font_expansion_enable }}
-\setvalue{\??aligncommand\v!nohz }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\font_expansion_disable }}
-%setvalue{\??aligncommand\v!spacing }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\enablespacehandling \enablekernhandling }} % not in mkiv
-%setvalue{\??aligncommand\v!nospacing }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\disablespacehandling\disablekernhandling}} % not in mkiv
-\setvalue{\??aligncommand\v!hyphenated }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\dohyphens}}
-\setvalue{\??aligncommand\v!nothyphenated }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\nohyphens}}
+\setvalue{\??aligncommand\v!lesshyphenation}{\toksapp\t_spac_align_collected{\lesshyphens}}
+\setvalue{\??aligncommand\v!morehyphenation}{\toksapp\t_spac_align_collected{\morehyphens}}
+
+\setvalue{\??aligncommand\v!hanging }{\toksapp\t_spac_align_collected{\font_protruding_enable }}
+\setvalue{\??aligncommand\v!nothanging }{\toksapp\t_spac_align_collected{\font_protruding_disable}}
+\setvalue{\??aligncommand\v!hz }{\toksapp\t_spac_align_collected{\font_expansion_enable }}
+\setvalue{\??aligncommand\v!fullhz }{\toksapp\t_spac_align_collected{\font_expansion_enable_k}}
+\setvalue{\??aligncommand\v!nohz }{\toksapp\t_spac_align_collected{\font_expansion_disable }}
+%setvalue{\??aligncommand\v!spacing }{\toksapp\t_spac_align_collected{\normalspacing\zerocount}} % not yet
+%setvalue{\??aligncommand\v!nospacing }{\toksapp\t_spac_align_collected{\normalspacing\plusone}} % not yet
+\setvalue{\??aligncommand\v!hyphenated }{\toksapp\t_spac_align_collected{\dohyphens}}
+\setvalue{\??aligncommand\v!nothyphenated }{\toksapp\t_spac_align_collected{\nohyphens}}
+
+\setvalue{\??aligncommand\v!tolerant }{\toksapp\t_spac_align_collected{\spac_align_set_tolerant}}
+\setvalue{\??aligncommand\v!verytolerant }{\toksapp\t_spac_align_collected{\spac_align_set_very_tolerant}}
+\setvalue{\??aligncommand\v!stretch }{\toksapp\t_spac_align_collected{\spac_align_set_stretch}}
+\setvalue{\??aligncommand\v!extremestretch }{\toksapp\t_spac_align_collected{\spac_align_set_extreme_stretch}}
+
+\setvalue{\??aligncommand \v!final}{\c_spac_align_state_par_fill\plusone}
+\setvalue{\??aligncommand2*\v!final}{\c_spac_align_state_par_fill\plustwo} % hardcoded multiplier
+\setvalue{\??aligncommand3*\v!final}{\c_spac_align_state_par_fill\plusthree}
+\setvalue{\??aligncommand4*\v!final}{\c_spac_align_state_par_fill\plusfour}
+
+\definehspace [\v!final] [\emspaceamount]
+
+\def\spac_align_flush_parfill
+ {\ifcase\c_spac_align_state_par_fill\else
+ \spac_align_flush_parfill_indeed{\number\c_spac_align_state_par_fill}%
+ \fi}
-\setvalue{\??aligncommand\v!tolerant }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\spac_align_set_tolerant}}
-\setvalue{\??aligncommand\v!verytolerant }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\spac_align_set_very_tolerant}}
-\setvalue{\??aligncommand\v!stretch }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\spac_align_set_stretch}}
-\setvalue{\??aligncommand\v!extremestretch }{\t_spac_align_collected\expandafter{\the\t_spac_align_collected\spac_align_set_extreme_stretch}}
+\unexpanded\def\spac_align_flush_parfill_indeed#1%
+ {\parfillskip
+ #1\directhspaceamount\v!final
+ % plus \dimexpr\availablehsize-#1\directhspaceamount\v!final\relax
+ plus 1fill
+ \relax}
%D For Wolfgang:
@@ -720,7 +777,7 @@
% Box commands.
-\unexpanded\def\ibox#1#2#3%
+\unexpanded\def\ibox
{\vbox\bgroup
\forgetall
\let\\=\endgraf
@@ -728,7 +785,7 @@
\doifelserightpage\spac_align_set_horizontal_right\spac_align_set_horizontal_left
\let\next}
-\unexpanded\def\obox#1#2#3%
+\unexpanded\def\obox
{\vbox\bgroup
\forgetall
\let\\=\endgraf
@@ -748,13 +805,13 @@
\def\spac_align_set_ragged_vbox#1%
{\ifcsname\??alignvertical#1\endcsname
- \csname\??alignvertical#1\endcsname
+ \lastnamedcs
\quitcommalist
\fi}
\def\spac_align_set_ragged_hbox#1%
{\ifcsname\??alignhorizontal#1\endcsname
- \csname\??alignhorizontal#1\endcsname
+ \lastnamedcs
\quitcommalist
\fi}
@@ -854,7 +911,8 @@
% Structure:
\unexpanded\def\startalignment
- {\begingroup
+ {\par
+ \begingroup
\setupalign}
\unexpanded\def\stopalignment
@@ -906,8 +964,11 @@
\setuvalue{\??alignwrapper\v!right }{\doalignline\hss \relax}
\setuvalue{\??alignwrapper\v!max }{\doalignline\relax \relax}
+\def\spac_align_wrapper_middle {\doalignline\hss \hss}
+
\def\spac_align_wrapper_handle#1%
- {\csname\??alignwrapper\ifcsname\??alignwrapper#1\endcsname#1\else\v!middle\fi\endcsname}
+ %{\csname\??alignwrapper\ifcsname\??alignwrapper#1\endcsname#1\else\v!middle\fi\endcsname}
+ {\ifcsname\??alignwrapper#1\endcsname\expandafter\lastnamedcs\else\expandafter\spac_align_wrapper_middle\fi}
\unexpanded\def\spac_align_wrapper_start[#1]%
{\spac_align_wrapper_handle{#1}%
@@ -991,7 +1052,12 @@
{\csname\??alignline#1\endcsname} % no \resetrealignsignal here ?
\def\alignedline#1#2% setting default
- {\csname\??alignline\ifcsname\??alignline#1\endcsname#1\else#2\fi\endcsname}
+ % {\csname\??alignline\ifcsname\??alignline#1\endcsname#1\else#2\fi\endcsname}
+ {\ifcsname\??alignline#1\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \csname\??alignline#2\expandafter\endcsname
+ \fi}
% beware: \wordright{whatever\kern-\rightskip} should work!
% so, no funny boxing here
@@ -1069,26 +1135,81 @@
\letvalue{\??alignsimplereverse\v!flushright}\spac_align_simple_left
\letvalue{\??alignsimplereverse\v!middle }\spac_align_simple_middle
+% \unexpanded\def\simplealignedbox#1#2%
+% {\hbox \ifdim#1>\zeropoint to #1
+% \csname\??alignsimple\ifcsname\??alignsimple#2\endcsname#2\else\v!right\fi\expandafter\endcsname
+% \fi}
+
+% \unexpanded\def\simplealignedboxplus#1#2#3%
+% {\hbox #3 \ifdim#1>\zeropoint to #1
+% \csname\??alignsimple\ifcsname\??alignsimple#2\endcsname#2\else\v!right\fi\expandafter\endcsname
+% \fi}
+
+% \unexpanded\def\simplealignedbox#1#2%
+% {\hbox \ifdim#1>\zeropoint to #1
+% \csname\??alignsimple\ifcsname\??alignsimple#2\endcsname#2\else\v!right\fi\expandafter\endcsname
+% \fi}
+%
+% \unexpanded\def\simplealignedboxplus#1#2#3%
+% {\hbox #3 \ifdim#1>\zeropoint to #1
+% \csname\??alignsimple\ifcsname\??alignsimple#2\endcsname#2\else\v!right\fi\expandafter\endcsname
+% \fi}
+
\unexpanded\def\simplealignedbox#1#2%
{\hbox \ifdim#1>\zeropoint to #1
- \csname\??alignsimple\ifcsname\??alignsimple#2\endcsname#2\else\v!right\fi\expandafter\endcsname
+ \ifcsname\??alignsimple#2\endcsname
+ \doubleexpandafter\lastnamedcs
+ \else
+ \doubleexpandafter\spac_align_simple_left
+ \fi
+ \fi}
+
+\unexpanded\def\simplealignedspreadbox#1#2%
+ {\hbox \ifdim#1>\zeropoint spread #1
+ \ifcsname\??alignsimple#2\endcsname
+ \doubleexpandafter\lastnamedcs
+ \else
+ \doubleexpandafter\spac_align_simple_left
+ \fi
\fi}
\unexpanded\def\simplealignedboxplus#1#2#3%
{\hbox #3 \ifdim#1>\zeropoint to #1
- \csname\??alignsimple\ifcsname\??alignsimple#2\endcsname#2\else\v!right\fi\expandafter\endcsname
+ \ifcsname\??alignsimple#2\endcsname
+ \doubleexpandafter\lastnamedcs
+ \else
+ \doubleexpandafter\spac_align_simple_left
+ \fi
\fi}
\newconditional\alignsimplelefttoright \settrue\alignsimplelefttoright
+% \unexpanded\def\simplereversealignedbox#1#2%
+% {\hbox \ifdim#1>\zeropoint to #1
+% \csname\??alignsimplereverse\ifcsname\??alignsimplereverse#2\endcsname#2\else\v!left\fi\expandafter\endcsname
+% \fi}
+%
+% \unexpanded\def\simplereversealignedboxplus#1#2#3%
+% {\hbox #3 \ifdim#1>\zeropoint to #1
+% \csname\??alignsimplereverse\ifcsname\??alignsimplereverse#2\endcsname#2\else\v!left\fi\expandafter\endcsname
+% \fi}
+
\unexpanded\def\simplereversealignedbox#1#2%
{\hbox \ifdim#1>\zeropoint to #1
- \csname\??alignsimplereverse\ifcsname\??alignsimplereverse#2\endcsname#2\else\v!left\fi\expandafter\endcsname
+ \ifcsname\??alignsimplereverse#2\endcsname
+ \doubleexpandafter\lastnamedcs
+ \else
+ \doubleexpandafter\spac_align_simple_left
+ \fi
\fi}
\unexpanded\def\simplereversealignedboxplus#1#2#3%
{\hbox #3 \ifdim#1>\zeropoint to #1
- \csname\??alignsimplereverse\ifcsname\??alignsimplereverse#2\endcsname#2\else\v!left\fi\expandafter\endcsname
+ \ifcsname\??alignsimplereverse#2\endcsname
+ \doubleexpandafter\lastnamedcs
+ \else
+ \doubleexpandafter\spac_align_simple_left
+ \fi
\fi}
% \installnamespace{alignsets}
diff --git a/Master/texmf-dist/tex/context/base/spac-chr.lua b/Master/texmf-dist/tex/context/base/mkiv/spac-chr.lua
index e3fa6d09983..97b32c36613 100644
--- a/Master/texmf-dist/tex/context/base/spac-chr.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-chr.lua
@@ -34,11 +34,12 @@ local getfield = nuts.getfield
local setfield = nuts.setfield
local getnext = nuts.getnext
local getprev = nuts.getprev
-local getid = nuts.getid
local getattr = nuts.getattr
local setattr = nuts.setattr
local getfont = nuts.getfont
local getchar = nuts.getchar
+local setsubtype = nuts.setsubtype
+local isglyph = nuts.isglyph
local setcolor = nodes.tracers.colors.set
@@ -136,7 +137,7 @@ local function nbsp(head,current)
local para = fontparameters[getfont(current)]
if getattr(current,a_alignstate) == 1 then -- flushright
head, current = inject_nobreak_space(0x00A0,head,current,para.space,0,0)
- setfield(current,"subtype",space_skip_code)
+ setsubtype(current,space_skip_code)
else
head, current = inject_nobreak_space(0x00A0,head,current,para.space,para.spacestretch,para.spaceshrink)
end
@@ -180,32 +181,42 @@ local methods = {
[0x001F] = function(head,current)
local next = getnext(current)
- if next and getid(next) == glyph_code then
- local char = getchar(next)
- head, current = remove_node(head,current,true)
- if not is_punctuation[char] then
- local p = fontparameters[getfont(next)]
- head, current = insert_node_before(head,current,new_glue(p.space,p.space_stretch,p.space_shrink))
+ if next then
+ local char = isglyph(next)
+ if char then
+ head, current = remove_node(head,current,true)
+ if not is_punctuation[char] then
+ local p = fontparameters[getfont(next)]
+ head, current = insert_node_before(head,current,new_glue(p.space,p.space_stretch,p.space_shrink))
+ end
end
end
end,
[0x00A0] = function(head,current) -- nbsp
local next = getnext(current)
- if next and getid(next) == glyph_code then
- local char = getchar(next)
- if char == 0x200C or char == 0x200D then -- nzwj zwj
+ if next then
+ local char = isglyph(current)
+ if not char then
+ -- move on
+ elseif char == 0x200C or char == 0x200D then -- nzwj zwj
next = getnext(next)
- if next and nbsphash[getchar(next)] then
- return false
+ if next then
+ char = isglyph(next)
+ if char and nbsphash[char] then
+ return false
+ end
end
elseif nbsphash[char] then
return false
end
end
local prev = getprev(current)
- if prev and getid(prev) == glyph_code and nbsphash[getchar(prev)] then
- return false
+ if prev then
+ local char = isglyph(prev)
+ if char and nbsphash[char] then
+ return false
+ end
end
return nbsp(head,current)
end,
@@ -272,15 +283,16 @@ local methods = {
}
+characters.methods = methods
+
function characters.handler(head) -- todo: use traverse_id
head = tonut(head)
local current = head
local done = false
while current do
- local id = getid(current)
- if id == glyph_code then
- local next = getnext(current)
- local char = getchar(current)
+ local char, id = isglyph(current)
+ if char then
+ local next = getnext(current)
local method = methods[char]
if method then
if trace_characters then
diff --git a/Master/texmf-dist/tex/context/base/spac-chr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-chr.mkiv
index 562fb940ce1..562fb940ce1 100644
--- a/Master/texmf-dist/tex/context/base/spac-chr.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-chr.mkiv
diff --git a/Master/texmf-dist/tex/context/base/spac-def.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-def.mkiv
index 7ead3c63e21..7ead3c63e21 100644
--- a/Master/texmf-dist/tex/context/base/spac-def.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-def.mkiv
diff --git a/Master/texmf-dist/tex/context/base/spac-flr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-flr.mkiv
index d09a9cf79f3..29351a3dd46 100644
--- a/Master/texmf-dist/tex/context/base/spac-flr.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-flr.mkiv
@@ -45,6 +45,7 @@
{\removeunwantedspaces
\begingroup
\edef\currentfiller{#1}%
+ \usefillerstyleandcolor\c!style\c!color
\scratchdimen\fillerparameter\c!leftmargin\relax
\ifdim\scratchdimen=\zeropoint\else
\hskip\scratchdimen
@@ -64,16 +65,26 @@
\setvalue{\??filleralternative\v!symbol}%
{\expandnamespaceparameter\??fillerleadermethod\fillerparameter\c!method\v!local
- \simplealignedbox
- {\fillerparameter\c!width}%
- {\fillerparameter\c!align}%
- {\fillerparameter\c!symbol}%
+ \ifdim\fillerparameter\c!offset>\zeropoint
+ \simplealignedspreadbox
+ {2\dimexpr\fillerparameter\c!offset\relax}%
+ {\fillerparameter\c!align}%
+ {\fillerparameter\c!symbol}%
+ \else
+ \simplealignedbox
+ {\fillerparameter\c!width}%
+ {\fillerparameter\c!align}%
+ {\fillerparameter\c!symbol}%
+ \fi
\hfill}
-\setvalue{\??filleralternative\c!stretch}%
+\setvalue{\??filleralternative\v!stretch}%
{\hfill}
-\setvalue{\??filleralternative\c!rule}%
+\setvalue{\??filleralternative\v!space}%
+ {\hskip\fillerparameter\c!distance\relax}
+
+\setvalue{\??filleralternative\v!rule}%
{\expandnamespaceparameter\??fillerleadermethod\fillerparameter\c!method\v!local
\hrule
\!!height\fillerparameter\c!height
@@ -88,6 +99,8 @@
\setupfillers
[\c!width=\emwidth,
\c!symbol=.,
+ \c!distance=\emwidth,
+ \c!offset=\zeropoint,
\c!align=\v!middle,
\c!height=.1\exheight,
\c!depth=\zeropoint,
@@ -96,6 +109,35 @@
\c!alternative=\v!symbol,
\c!method=\s!local]
+\definefiller
+ [\v!sym]
+ [\c!method=\v!global,
+ \c!width=.5\emwidth,
+ \c!leftmargin=.5\emwidth,
+ \c!rightmargin=.5\emwidth]
+
+\definefiller
+ [\v!symbol]
+ [\c!method=\v!global,
+ \c!offset=.125\emwidth,
+ \c!leftmargin=.5\emwidth,
+ \c!rightmargin=.5\emwidth]
+
+\definefiller
+ [\v!rule]
+ [\c!alternative=\v!rule,
+ \c!leftmargin=.5\emwidth,
+ \c!rightmargin=.5\emwidth]
+
+\definefiller
+ [\v!width]
+ [\c!alternative=\v!stretch]
+
+\definefiller
+ [\v!space]
+ [\c!alternative=\v!space,
+ \c!distance=3\emwidth]
+
% maybe box -> symbol
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/spac-grd.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-grd.mkiv
index 7b3ee6d6ce2..7b3ee6d6ce2 100644
--- a/Master/texmf-dist/tex/context/base/spac-grd.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-grd.mkiv
diff --git a/Master/texmf-dist/tex/context/base/spac-hor.lua b/Master/texmf-dist/tex/context/base/mkiv/spac-hor.lua
index 5d5a43e311c..5d5a43e311c 100644
--- a/Master/texmf-dist/tex/context/base/spac-hor.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-hor.lua
diff --git a/Master/texmf-dist/tex/context/base/spac-hor.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-hor.mkiv
index 54156c3b428..7c5358c5135 100644
--- a/Master/texmf-dist/tex/context/base/spac-hor.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-hor.mkiv
@@ -101,15 +101,41 @@
\def\spac_indenting_define[#1][#2]% todo: mixes
{\setevalue{\??indentingpreset#1}{#2}}
-\def\spac_indentation_apply_step_one_nested#1%
- {\expandafter\processcommacommand\expandafter[\csname\??indentingpreset#1\endcsname]\spac_indentation_apply_step_one}
+% \def\spac_indentation_apply_step_one_nested#1%
+% {\expandafter\processcommacommand\expandafter[\csname\??indentingpreset#1\endcsname]\spac_indentation_apply_step_one}
+%
+% \def\spac_indentation_apply_step_two_nested#1%
+% {\expandafter\processcommacommand\expandafter[\csname\??indentingpreset#1\endcsname]\spac_indentation_apply_step_two}
+%
+% \def\spac_indentation_apply_step_one#1%
+% {\ifcsname\??indentingpreset#1\endcsname
+% \spac_indentation_apply_step_one_nested{#1}%
+% \else\ifcsname\??indentingmethod#1\endcsname
+% % case two
+% \else
+% \edef\v_spac_indentation_current{#1}% single entry in list
+% \let\normalindentation\v_spac_indentation_current
+% \spac_indentation_setup_size
+% \fi\fi}
+%
+% \def\spac_indentation_apply_step_two#1%
+% {\ifcsname\??indentingpreset#1\endcsname
+% \spac_indentation_apply_step_two_nested{#1}%
+% \else\ifcsname\??indentingmethod#1\endcsname
+% \lastnamedcs
+% \else
+% % case one
+% \fi\fi}
+
+\def\spac_indentation_apply_step_one_nested
+ {\expandafter\processcommacommand\expandafter[\lastnamedcs]\spac_indentation_apply_step_one}
-\def\spac_indentation_apply_step_two_nested#1%
- {\expandafter\processcommacommand\expandafter[\csname\??indentingpreset#1\endcsname]\spac_indentation_apply_step_two}
+\def\spac_indentation_apply_step_two_nested
+ {\expandafter\processcommacommand\expandafter[\lastnamedcs]\spac_indentation_apply_step_two}
\def\spac_indentation_apply_step_one#1%
{\ifcsname\??indentingpreset#1\endcsname
- \spac_indentation_apply_step_one_nested{#1}%
+ \spac_indentation_apply_step_one_nested
\else\ifcsname\??indentingmethod#1\endcsname
% case two
\else
@@ -120,9 +146,9 @@
\def\spac_indentation_apply_step_two#1%
{\ifcsname\??indentingpreset#1\endcsname
- \spac_indentation_apply_step_two_nested{#1}%
+ \spac_indentation_apply_step_two_nested
\else\ifcsname\??indentingmethod#1\endcsname
- \csname\??indentingmethod#1\endcsname
+ \lastnamedcs
\else
% case one
\fi\fi}
@@ -154,7 +180,7 @@
\installindentingmethod \v!normal{\ifx\normalindentation\empty\else
\let\v_spac_indentation_current\normalindentation
- \simplesetupindenting
+ \spac_indentation_setup_size
\fi}
\installindentingmethod \v!reset {\settrue\c_spac_indentation_indent_first
@@ -275,12 +301,12 @@
\installcorenamespace{indentnext}
\unexpanded\def\checknextindentation[#1]%
- {\csname\??indentnext\ifcsname\??indentnext#1\endcsname#1\fi\endcsname}
+ {\begincsname\??indentnext#1\endcsname}
\unexpanded\def\useindentnextparameter#1% new, the more efficient variant
{\edef\p_indentnext{#1\c!indentnext}%
\ifx\p_indentnext\empty\else
- \csname\??indentnext\ifcsname\??indentnext\p_indentnext\endcsname\p_indentnext\fi\endcsname
+ \begincsname\??indentnext\p_indentnext\endcsname
\fi}
\letvalue{\??indentnext }\donothing
@@ -389,7 +415,7 @@
{\doifelsenextoptionalcs\spac_spacecodes_setup_yes\spac_spacecodes_setup_nop}
\def\spac_spacecodes_setup_yes[#1]%
- {\csname\??spacecodemethod#1\endcsname
+ {\begincsname\??spacecodemethod#1\endcsname
\updateraggedskips}
\def\spac_spacecodes_setup_nop
@@ -426,16 +452,33 @@
\let\normalspaceprimitive=\ % space-comment is really needed
-% hm ...
+%D As the \type{\ } is convenient in:
+%D
+%D \starttyping
+%D \TEX\space x\crlf
+%D \TEX\ x\crlf
+%D \TEX{} x\crlf
+%D \stoptyping
+%D
+%D from now on we treat it as a normal space and not as a space with \type
+%D {sfcode} 1000.
+
+\unexpanded\def\specialspaceprimitive
+ {\begingroup
+ % so, no fancy extra spacing after: foo i.e.\ bar
+ \nonfrenchspacing\normalspaceprimitive
+ \endgroup}
+
+\unexpanded\def\normalnotobeyedspace
+ {\mathortext\normalspaceprimitive\specialspaceprimitive} % no \dontleavehmode\space (else no frenchspacing)
-% \unexpanded\def\normalnotobeyedspace{\mathortext\normalspaceprimitive\space} % no \dontleavehmode\space (else no frenchspacing)
-% \let\ =\normalnotobeyedspace
+\let\ =\normalnotobeyedspace
% Because I strip spaces at the end of lines (in the editor) we need a bit of
% a trick to define slash+newline, so \space and \<newline> are the same
% We need to be careful with \ and \space and the definition of ~ which uses \ as
-% we need to associate unicode spacing with it. There is some messy thing that that
+% we need to associate unicode spacing with it. There is some messy aspect that
% I forgot to note down so I will revision the \ once I ran into it again.
% \ruledhbox spread 10pt {\frenchspacing xx xx\ X}
@@ -460,7 +503,17 @@
\unexpanded\def\removelastspace{\ifhmode\unskip\fi}
\unexpanded\def\nospace {\removelastspace\ignorespaces}
-\ifdefined\softhyphen \else \let\softhyphen\- \fi
+\ifdefined\nospaces
+ \unexpanded\def\nospacing{\normalnospaces\plusone}
+ \unexpanded\def\dospacing{\normalnospaces\zerocount}
+\else
+ \unexpanded\def\nospacing{\spaceskip\scaledpoint \xspaceskip\zeropoint}
+ \unexpanded\def\dospacing{\spaceskip\currentspaceskip\xspaceskip\zeropoint} % what
+\fi
+
+\ifdefined\softhyphen \else
+ \let\softhyphen\-
+\fi
\cldcontext{"\string\\unexpanded\string\\def\string\\\string\n{\string\\space}"}
%cldcontext{"\string\\let\string\\\string\n=\string\\space"}
@@ -598,7 +651,7 @@
\unexpanded\def\spac_narrower_method_analyze#1%
{\ifcsname\??narrowermethod#1\endcsname
- \csname\??narrowermethod#1\endcsname
+ \lastnamedcs
\else
\global\advance\s_spac_narrower_mid#1\relax
\fi}
@@ -736,8 +789,11 @@
\letvalue{\??skipadaptionright\v!no }\zeropoint
\letvalue{\??skipadaptionright\empty }\zeropoint
-\unexpanded\def\dosetleftskipadaption #1{\leftskipadaption \ifcsname\??skipadaptionleft #1\endcsname\csname\??skipadaptionleft #1\endcsname\else#1\fi\relax}
-\unexpanded\def\dosetrightskipadaption#1{\rightskipadaption\ifcsname\??skipadaptionright#1\endcsname\csname\??skipadaptionright#1\endcsname\else#1\fi\relax}
+% \unexpanded\def\dosetleftskipadaption #1{\leftskipadaption \ifcsname\??skipadaptionleft #1\endcsname\csname\??skipadaptionleft #1\endcsname\else#1\fi\relax}
+% \unexpanded\def\dosetrightskipadaption#1{\rightskipadaption\ifcsname\??skipadaptionright#1\endcsname\csname\??skipadaptionright#1\endcsname\else#1\fi\relax}
+
+\unexpanded\def\dosetleftskipadaption #1{\leftskipadaption \ifcsname\??skipadaptionleft #1\endcsname\lastnamedcs\else#1\fi\relax}
+\unexpanded\def\dosetrightskipadaption#1{\rightskipadaption\ifcsname\??skipadaptionright#1\endcsname\lastnamedcs\else#1\fi\relax}
\unexpanded\def\doadaptleftskip #1{\normalexpanded{\dosetleftskipadaption {#1}}\advance\leftskip \leftskipadaption }
\unexpanded\def\doadaptrightskip#1{\normalexpanded{\dosetrightskipadaption{#1}}\advance\rightskip\rightskipadaption}
@@ -774,11 +830,16 @@
\installtolerancemethod \v!horizontal \v!stretch {\emergencystretch\bodyfontsize}
\installtolerancemethod \v!horizontal \v!space {\spaceskip.5em\s!plus.25em\s!minus.25em\relax}
-\installtolerancemethod \v!horizontal \v!verystrict {\tolerance 200 }
+\installtolerancemethod \v!horizontal \v!verystrict {\tolerance\plustwohundred}
\installtolerancemethod \v!horizontal \v!strict {\tolerance1500 }
\installtolerancemethod \v!horizontal \v!tolerant {\tolerance3000 }
\installtolerancemethod \v!horizontal \v!verytolerant {\tolerance4500 }
+\appendetoks
+ \pretolerance\plushundred
+ \tolerance \plustwohundred
+\to\everyforgetall
+
\def\spac_tolerances_step_vertical #1{\csname\??tolerancemethods\v!vertical :#1\endcsname}
\def\spac_tolerances_step_horizontal#1{\csname\??tolerancemethods\v!horizontal:#1\endcsname}
@@ -919,9 +980,10 @@
\fi}
\def\hspaceamount#1#2%
- {\csname\??hspace
- \ifcsname\??hspace#1:#2\endcsname#1:#2\else:\v!none\fi
- \endcsname}
+ {\dimexpr\ifcsname\??hspace#1:#2\endcsname\lastnamedcs\else\zeropoint\fi\relax}
+
+\def\directhspaceamount#1%
+ {\dimexpr\ifcsname\??hspace :#1\endcsname\lastnamedcs\else\zeropoint\fi\relax}
% no installhspace here (this is already an old command)
diff --git a/Master/texmf-dist/tex/context/base/spac-lin.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-lin.mkiv
index 20fec5d4537..c4c6eb6d9eb 100644
--- a/Master/texmf-dist/tex/context/base/spac-lin.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-lin.mkiv
@@ -137,8 +137,19 @@
\unexpanded\def\emptylines
{\dosingleempty\spac_lines_empty}
+% \def\spac_lines_empty[#1]%
+% {\endgraf
+% \dorecurse{\iffirstargument#1\else3\fi}\crlf}
+
\def\spac_lines_empty[#1]%
- {\endgraf\dorecurse{\iffirstargument#1\else3\fi}\crlf}
+ {\endgraf
+ \begingroup
+ %\forgetall % debatable
+ \ifhmode
+ \crlf % finish the current line
+ \fi
+ \dorecurse{\iffirstargument#1\else3\fi}{\strut\crlf}%
+ \endgroup}
\ifdefined\startlines \else
\expandafter\let\expandafter\startlines\csname\e!start\v!lines\endcsname
diff --git a/Master/texmf-dist/tex/context/base/spac-pag.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-pag.mkiv
index 1ecc31d8cd5..c7d22f0e0c5 100644
--- a/Master/texmf-dist/tex/context/base/spac-pag.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-pag.mkiv
@@ -163,7 +163,7 @@
\doforcedtrackpagestate{#2}{#3}%
\edef\m_spac_pagestates_realpage{\pagestaterealpage{#2}{\number#3}}%
\ifx\m_spac_pagestates_realpage\empty \else
- \ifnum\m_spac_pagestates_realpage>0\getvalue{\??pagechanges#2:#1}\relax
+ \ifnum\m_spac_pagestates_realpage>0\csname\??pagechanges#2:#1\endcsname\relax
\pagechangedtrue
\fi
\fi
diff --git a/Master/texmf-dist/tex/context/base/spac-par.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-par.mkiv
index 4dd3db24338..4dd3db24338 100644
--- a/Master/texmf-dist/tex/context/base/spac-par.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-par.mkiv
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua b/Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua
new file mode 100644
index 00000000000..39d90794cce
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua
@@ -0,0 +1,943 @@
+ if not modules then modules = { } end modules ['spac-prf'] = {
+ version = 1.001,
+ comment = "companion to spac-prf.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is a playground, a byproduct of some experiments in a project where
+-- we needed something like this where it works ok, but nevertheless it's
+-- still experimental code. It is very likely to change (or extended).
+
+local unpack, rawget = unpack, rawget
+
+local formatters = string.formatters
+
+local nodecodes = nodes.nodecodes
+local gluecodes = nodes.gluecodes
+local listcodes = nodes.listcodes
+
+local glyph_code = nodecodes.glyph
+local disc_code = nodecodes.disc
+local kern_code = nodecodes.kern
+local penalty_code = nodecodes.penalty
+local glue_code = nodecodes.glue
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local unset_code = nodecodes.unset
+local math_code = nodecodes.math
+local rule_code = nodecodes.rule
+local marginkern_code = nodecodes.marginkern
+
+local leaders_code = gluecodes.leaders
+local lineskip_code = gluecodes.lineskip
+local baselineskip_code = gluecodes.baselineskip
+local line_code = listcodes.line
+local parskip_code = listcodes.parskip
+
+local texlists = tex.lists
+local gettexdimen = tex.getdimen
+local settexattribute = tex.setattribute
+local settexbox = tex.setbox
+local taketexbox = tex.takebox
+
+local nuts = nodes.nuts
+local tonut = nodes.tonut
+local tonode = nuts.tonode
+
+local getfield = nuts.getfield
+local getattr = nuts.getattr
+local getid = nuts.getid
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getsubtype = nuts.getsubtype
+local getlist = nuts.getlist
+local gettexbox = nuts.getbox
+
+local setfield = nuts.setfield
+local setlink = nuts.setlink
+local setlist = nuts.setlist
+local setattr = nuts.setattr
+
+local theprop = nuts.theprop
+
+local floor = math.floor
+local ceiling = math.ceil
+
+local new_rule = nuts.pool.rule
+local new_glue = nuts.pool.glue
+local new_kern = nuts.pool.kern
+local hpack_nodes = nuts.hpack
+local link_nodes = nuts.link
+local find_node_tail = nuts.tail
+local setglue = nuts.setglue
+
+local properties = nodes.properties.data
+
+local a_visual = attributes.private("visual")
+local a_snapmethod = attributes.private("snapmethod")
+local a_profilemethod = attributes.private("profilemethod")
+local a_specialcontent = attributes.private("specialcontent")
+
+local variables = interfaces.variables
+local v_none = variables.none
+local v_fixed = variables.fixed
+local v_strict = variables.strict
+
+local setcolor = nodes.tracers.colors.set
+local settransparency = nodes.tracers.transparencies.set
+
+local profiling = { }
+builders.profiling = profiling
+
+local report = logs.reporter("profiling")
+
+local show_profile = false trackers.register("profiling.show", function(v) show_profile = v end)
+local trace_profile = false trackers.register("profiling.trace",function(v) trace_profile = v end)
+
+local function getprofile(line,step)
+
+ -- only l2r
+ -- no hz yet
+
+ local line = tonut(line)
+ local current = getlist(line)
+
+ if not current then
+ return
+ end
+
+ local glue_sign = getfield(line,"glue_sign")
+ local glue_order = getfield(line,"glue_order")
+ local glue_set = getfield(line,"glue_set")
+
+ local heights = { }
+ local depths = { }
+ local width = 0
+ local position = 0
+ local step = step or 65536 -- * 2 -- 2pt
+ local margin = step / 4
+ local min = 0
+ local max = ceiling(getfield(line,"width")/step) + 1
+
+ for i=min,max do
+ heights[i] = 0
+ depths [i] = 0
+ end
+
+ -- remember p
+
+ local wd, ht, dp = 0, 0, 0
+
+ local function progress()
+ position = width
+ width = position + wd
+ p = floor((position - margin)/step + 0.5)
+ w = floor((width + margin)/step - 0.5)
+ if p < 0 then
+ p = 0
+ end
+ if w < 0 then
+ w = 0
+ end
+ if p > w then
+ w, p = p, w
+ end
+ if w > max then
+ for i=max+1,w+1 do
+ heights[i] = 0
+ depths [i] = 0
+ end
+ max = w
+ end
+ for i=p,w do
+ if ht > heights[i] then
+ heights[i] = ht
+ end
+ if dp > depths[i] then
+ depths[i] = dp
+ end
+ end
+ end
+
+ local function process(current) -- called nested in disc replace
+ while current do
+ local id = getid(current)
+ if id == glyph_code then
+ wd = getfield(current,"width")
+ ht = getfield(current,"height")
+ dp = getfield(current,"depth")
+ progress()
+ elseif id == kern_code then
+ wd = getfield(current,"kern")
+ ht = 0
+ dp = 0
+ progress()
+ elseif id == disc_code then
+ local replace = getfield(current,"replace")
+ if replace then
+ process(replace)
+ end
+ elseif id == glue_code then
+ wd = getfield(current,"width")
+ if glue_sign == 1 then
+ if getfield(current,"stretch_order") == glue_order then
+ wd = wd + getfield(current,"stretch") * glue_set
+ end
+ elseif glue_sign == 2 then
+ if getfield(current,"shrink_order") == glue_order then
+ wd = wd - getfield(current,"shrink") * glue_set
+ end
+ end
+ if getsubtype(current) >= leaders_code then
+ local leader = getleader(current)
+ ht = getfield(leader,"height")
+ dp = getfield(leader,"depth")
+ else
+ ht = 0
+ dp = 0
+ end
+ progress()
+ elseif id == hlist_code then
+ -- we could do a nested check .. but then we need to push / pop glue
+ local shift = getfield(current,"shift")
+ wd = getfield(current,"width")
+ if getattr(current,a_specialcontent) then
+ -- like a margin note, maybe check for wd
+ ht = 0
+ dp = 0
+ else
+ ht = getfield(current,"height") - shift
+ dp = getfield(current,"depth") + shift
+ end
+ progress()
+ elseif id == vlist_code or id == unset_code then
+ local shift = getfield(current,"shift") -- todo
+ wd = getfield(current,"width")
+ ht = getfield(current,"height") -- - shift
+ dp = getfield(current,"depth") -- + shift
+ progress()
+ elseif id == rule_code then
+ wd = getfield(current,"width")
+ ht = getfield(current,"height")
+ dp = getfield(current,"depth")
+ progress()
+ elseif id == math_code then
+ wd = getfield(current,"surround")
+ ht = 0
+ dp = 0
+ progress()
+ elseif id == marginkern_code then
+ wd = getfield(current,"width")
+ ht = 0
+ dp = 0
+ progress()
+ else
+-- print(nodecodes[id])
+ end
+ current = getnext(current)
+ end
+ end
+
+ process(current)
+
+ return {
+ heights = heights,
+ depths = depths,
+ min = min, -- not needed
+ max = max,
+ step = step,
+ }
+
+end
+
+profiling.get = getprofile
+
+local function getpagelist()
+ local pagehead = texlists.page_head
+ if pagehead then
+ pagehead = tonut(texlists.page_head)
+ pagetail = find_node_tail(pagehead)
+ else
+ pagetail = nil
+ end
+ return pagehead, pagetail
+end
+
+local function setprofile(n,step)
+ local p = rawget(properties,n)
+ if p then
+ local pp = p.profile
+ if not pp then
+ pp = getprofile(n,step)
+ p.profile = pp
+ end
+ return pp
+ else
+ local pp = getprofile(n,step)
+ properties[n] = { profile = pp }
+ return pp
+ end
+end
+
+local function hasprofile(n)
+ local p = rawget(properties,n)
+ if p then
+ return p.profile
+ end
+end
+
+local function addstring(height,depth)
+ local typesetters = nuts.typesetters
+ local hashes = fonts.hashes
+ local infofont = fonts.infofont()
+ local emwidth = hashes.emwidths [infofont]
+ local exheight = hashes.exheights[infofont]
+ local httext = height
+ local dptext = depth
+ local httext = typesetters.tohpack(height,infofont)
+ local dptext = typesetters.tohpack(depth,infofont)
+ setfield(httext,"shift",- 1.2 * exheight)
+ setfield(dptext,"shift", 0.6 * exheight)
+ local text = nuts.hpack(
+ nuts.linked(
+ new_kern(-getfield(httext,"width")-emwidth),
+ httext,
+ new_kern(-getfield(dptext,"width")),
+ dptext
+ )
+ )
+ setfield(text,"height",0)
+ setfield(text,"depth",0)
+ setfield(text,"width",0)
+ return text
+end
+
+local function addprofile(node,profile,step)
+
+ local line = tonut(node)
+
+ if not profile then
+ profile = setprofile(line,step)
+ end
+
+ if not profile then
+ report("some error")
+ return node
+ end
+
+ if profile.shown then
+ return node
+ end
+
+ local list = getlist(line)
+ profile.shown = true
+
+ local heights = profile.heights
+ local depths = profile.depths
+ local step = profile.step
+
+ local head = nil
+ local tail = nil
+
+ local lastht = 0
+ local lastdp = 0
+ local lastwd = 0
+
+ local visual = "f:s:t" -- this can change !
+
+ local function progress()
+ if lastwd == 0 then
+ return
+ end
+ local what = nil
+ if lastht == 0 and lastdp == 0 then
+ what = new_kern(lastwd)
+ else
+ what = new_rule(lastwd,lastht,lastdp)
+ setcolor(what,visual)
+ settransparency(what,visual)
+ end
+ if tail then
+ setlink(tail,what)
+ else
+ head = what
+ end
+ tail = what
+ end
+
+-- inspect(profile)
+
+ for i=profile.min,profile.max do
+ local ht = heights[i]
+ local dp = depths[i]
+ if ht ~= lastht or dp ~= lastdp and lastwd > 0 then
+ progress()
+ lastht = ht
+ lastdp = dp
+ lastwd = step
+ else
+ lastwd = lastwd + step
+ end
+ end
+ if lastwd > 0 then
+ progress()
+ end
+
+ local rule = hpack_nodes(head)
+
+ setfield(rule,"width", 0)
+ setfield(rule,"height",0)
+ setfield(rule,"depth", 0)
+
+ -- if texttoo then
+ --
+ -- local text = addstring(
+ -- formatters["%0.4f"](getfield(rule,"height")/65536),
+ -- formatters["%0.4f"](getfield(rule,"depth") /65536)
+ -- )
+ --
+ -- setlink(text,rule)
+ --
+ -- rule = text
+ --
+ -- end
+
+ setlink(rule,list)
+ setlist(line,rule)
+
+end
+
+profiling.add = addprofile
+
+local methods = { }
+
+local function getdelta(t_profile,b_profile)
+ local t_heights = t_profile.heights
+ local t_depths = t_profile.depths
+ local t_max = t_profile.max
+ local b_heights = b_profile.heights
+ local b_depths = b_profile.depths
+ local b_max = b_profile.max
+
+ local max = t_max
+ local delta = 0
+
+ if t_max > b_max then
+ for i=b_max+1,t_max do
+ b_depths [i] = 0
+ b_heights[i] = 0
+ end
+ max = t_max
+ elseif b_max > t_max then
+ for i=t_max+1,b_max do
+ t_depths [i] = 0
+ t_heights[i] = 0
+ end
+ max = b_max
+ end
+
+ for i=0,max do
+ local ht = b_heights[i]
+ local dp = t_depths[i]
+ local hd = ht + dp
+ if hd > delta then
+ delta = hd
+ end
+ end
+
+ return delta
+end
+
+-- local properties = theprop(bot)
+-- local unprofiled = properties.unprofiled
+-- if not unprofiled then -- experiment
+-- properties.unprofiled = {
+-- height = height,
+-- strutht = strutht,
+-- }
+-- end
+
+-- lineskip | lineskiplimit
+
+local function inject(top,bot,amount) -- todo: look at penalties
+ local glue = new_glue(amount)
+ --
+ setattr(glue,a_profilemethod,0)
+ setattr(glue,a_visual,getattr(top,a_visual))
+ --
+ setlink(glue,bot)
+ setlink(top,glue)
+end
+
+methods[v_none] = function()
+ return false
+end
+
+methods[v_strict] = function(top,bot,t_profile,b_profile,specification)
+
+ local top = tonut(top)
+ local bot = tonut(bot)
+
+ local strutht = specification.height or texdimen.strutht
+ local strutdp = specification.depth or texdimen.strutdp
+ local lineheight = strutht + strutdp
+
+ local depth = getfield(top,"depth")
+ local height = getfield(bot,"height")
+ local total = depth + height
+ local distance = specification.distance or 0
+ local delta = lineheight - total
+
+ -- there is enough room between the lines so we don't need
+ -- to add extra distance
+
+ if delta >= distance then
+ inject(top,bot,delta)
+ return true
+ end
+
+ local delta = getdelta(t_profile,b_profile)
+ local skip = delta - total + distance
+
+ -- we don't want to be too tight so we limit the skip and
+ -- make sure we have at least lineheight
+
+ inject(top,bot,skip)
+ return true
+
+end
+
+-- todo: also set ht/dp of first / last (but what is that)
+
+methods[v_fixed] = function(top,bot,t_profile,b_profile,specification)
+
+ local top = tonut(top)
+ local bot = tonut(bot)
+
+ local strutht = specification.height or texdimen.strutht
+ local strutdp = specification.depth or texdimen.strutdp
+ local lineheight = strutht + strutdp
+
+ local depth = getfield(top,"depth")
+ local height = getfield(bot,"height")
+ local total = depth + height
+ local distance = specification.distance or 0
+ local delta = lineheight - total
+
+ local snapmethod = getattr(top,a_snapmethod)
+
+ if snapmethod then
+
+ -- no distance (yet)
+
+ if delta < lineheight then
+ setfield(top,"depth",strutdp)
+ setfield(bot,"height",strutht)
+ return true
+ end
+
+ local delta = getdelta(t_profile,b_profile)
+
+ local dp = strutdp
+ while depth > lineheight - strutdp do
+ depth = depth - lineheight
+ dp = dp + lineheight
+ end
+ setfield(top,"depth",dp)
+ local ht = strutht
+ while height > lineheight - strutht do
+ height = height - lineheight
+ ht = ht + lineheight
+ end
+ setfield(bot,"height",ht)
+ local lines = floor(delta/lineheight)
+ if lines > 0 then
+ inject(top,bot,-lines * lineheight)
+ end
+
+ return true
+
+ end
+
+ if total < lineheight then
+ setfield(top,"depth",strutdp)
+ setfield(bot,"height",strutht)
+ return true
+ end
+
+ if depth < strutdp then
+ setfield(top,"depth",strutdp)
+ total = total - depth + strutdp
+ end
+ if height < strutht then
+ setfield(bot,"height",strutht)
+ total = total - height + strutht
+ end
+
+ local delta = getdelta(t_profile,b_profile)
+
+ local target = total - delta
+ local factor = specification.factor or 1
+ local step = lineheight / factor
+ local correction = 0
+ local nofsteps = 0
+ while correction < target - step - distance do -- a loop is more accurate, for now
+ correction = correction + step
+ nofsteps = nofsteps + 1
+ end
+
+ if trace_profile then
+ report("top line : %s %05i > %s",t_profile.shown and "+" or "-",top,nodes.toutf(getlist(top)))
+ report("bottom line : %s %05i > %s",b_profile.shown and "+" or "-",bot,nodes.toutf(getlist(bot)))
+ report(" depth : %p",depth)
+ report(" height : %p",height)
+ report(" total : %p",total)
+ report(" lineheight : %p",lineheight)
+ report(" delta : %p",delta)
+ report(" target : %p",target)
+ report(" factor : %i",factor)
+ report(" distance : %p",distance)
+ report(" step : %p",step)
+ report(" nofsteps : %i",nofsteps)
+ -- report(" max lines : %s",lines == 0 and "unset" or lines)
+ report(" correction : %p",correction)
+ end
+
+ inject(top,bot,-correction) -- we could mess with the present glue (if present)
+
+ return true -- remove interlineglue
+
+end
+
+function profiling.distance(top,bot,specification)
+ local step = specification.step
+ local method = specification.method
+ local ptop = getprofile(top,step)
+ local pbot = getprofile(bot,step)
+ local action = methods[method or v_strict] or methods[v_strict]
+ return action(top,bot,ptop,pbot,specification)
+end
+
+local specifications = { } -- todo: save these !
+
+function profiling.fixedprofile(current)
+ local a = getattr(current,a_profilemethod)
+ if a then
+ local s = specifications[a]
+ if s then
+ return s.method == v_fixed
+ end
+ end
+ return false
+end
+
+local function profilelist(line,mvl)
+
+ local current = tonut(line)
+
+ local top = nil
+ local bot = nil
+
+ local t_profile = nil
+ local b_profile = nil
+
+ local specification = nil
+ local lastattr = nil
+ local method = nil
+ local action = nil
+
+ local distance = 0
+ local lastglue = nil
+
+ local pagehead = nil
+ local pagetail = nil
+
+ if mvl then
+
+ pagehead, pagetail = getpagelist()
+
+ if pagetail then
+ local current = pagetail
+ while current do
+ local id = getid(current)
+ if id == hlist_code then
+ local subtype = getsubtype(current)
+ if subtype == line_code then
+ t_profile = hasprofile(current)
+ if t_profile then
+ top = current
+ end
+ end
+ break
+ elseif id == glue_code then
+ local wd = getfield(current,"width")
+ if not wd or wd == 0 then
+ -- go on
+ else
+ break
+ end
+ elseif id == penalty_code then
+ -- ok
+ else
+ break
+ end
+ current = getnext(current)
+ end
+ end
+
+ end
+
+ while current do
+
+ local attr = getattr(current,a_profilemethod)
+
+ if attr then
+
+ if attr ~= lastattr then
+ specification = specifications[attr]
+ method = specification and specification.method
+ action = method and methods[method] or methods[v_strict]
+ lastattr = attr
+ end
+
+ local id = getid(current)
+
+ if id == hlist_code then -- check subtype
+ local subtype = getsubtype(current)
+ if subtype == line_code then
+ if top == current then
+ -- skip
+ bot = nil -- to be sure
+ elseif top then
+ bot = current
+ b_profile = setprofile(bot)
+ if show_profile then
+ addprofile(bot,b_profile)
+ end
+ if not t_profile.done then
+ if action then
+ local ok = action(top,bot,t_profile,b_profile,specification)
+ if ok and lastglue and distance ~= 0 then
+ setglue(lastglue)
+ end
+ end
+ t_profile.done = true
+ end
+ top = bot
+ bot = nil
+ t_profile = b_profile
+ b_profile = nil
+ distance = 0
+ else
+ top = current
+ t_profile = setprofile(top)
+ bot = nil
+ if show_profile then
+ addprofile(top,t_profile)
+ end
+ end
+ else
+ top = nil
+ bot = nil
+ end
+ elseif id == glue_code then
+ if top then
+ local subtype = getsubtype(current)
+ -- if subtype == lineskip_code or subtype == baselineskip_code then
+ local wd = getfield(current,"width")
+ if wd > 0 then
+ distance = wd
+ lastglue = current
+ elseif wd < 0 then
+ top = nil
+ bot = nil
+ else
+ -- ok
+ end
+ -- else
+ -- top = nil
+ -- bot = nil
+ -- end
+ else
+ top = nil
+ bot = nil
+ end
+ elseif id == penalty_code then
+ -- okay
+ else
+ top = nil
+ bot = nil
+ end
+ else
+ top = nil
+ bot = nil
+ end
+ current = getnext(current)
+ end
+ if top then
+ t_profile = setprofile(top)
+ if show_profile then
+ addprofile(top,t_profile)
+ end
+ end
+end
+
+profiling.list = profilelist
+
+local enabled = false
+
+function profiling.set(specification)
+ if not enabled then
+ nodes.tasks.enableaction("mvlbuilders", "builders.profiling.pagehandler")
+ -- too expensive so we expect that this happens explicitly, we keep for reference:
+ -- nodes.tasks.enableaction("vboxbuilders","builders.profiling.vboxhandler")
+ enabled = true
+ end
+ local n = #specifications + 1
+ specifications[n] = specification
+ settexattribute(a_profilemethod,n)
+end
+
+function profiling.profilebox(specification)
+ local boxnumber = specification.box
+ local current = getlist(gettexbox(boxnumber))
+ local top = nil
+ local bot = nil
+ local t_profile = nil
+ local b_profile = nil
+ local method = specification and specification.method
+ local action = method and methods[method] or methods[v_strict]
+ local lastglue = nil
+ local distance = 0
+ while current do
+ local id = getid(current)
+ if id == hlist_code then
+ local subtype = getsubtype(current)
+ if subtype == line_code then
+ if top then
+ bot = current
+ b_profile = setprofile(bot)
+ if show_profile then
+ addprofile(bot,b_profile)
+ end
+ if not t_profile.done then
+ if action then
+ local ok = action(top,bot,t_profile,b_profile,specification)
+ if ok and lastglue and distance ~= 0 then
+ setglue(lastglue)
+ end
+ end
+ t_profile.done = true
+ end
+ top = bot
+ t_profile = b_profile
+ b_profile = nil
+ distance = 0
+ else
+ top = current
+ t_profile = setprofile(top)
+ if show_profile then
+ addprofile(top,t_profile)
+ end
+ bot = nil
+ end
+ else
+ top = nil
+ bot = nil
+ end
+ elseif id == glue_code then
+ local subtype = getsubtype(current)
+ if subtype == lineskip_code or subtype == baselineskip_code then
+ if top then
+ local wd = getfield(current,"width")
+ if wd > 0 then
+ distance = wd
+ lastglue = current
+ elseif wd < 0 then
+ top = nil
+ bot = nil
+ else
+ -- ok
+ end
+ else
+ top = nil
+ bot = nil
+ end
+ else
+ top = nil
+ bot = nil
+ end
+ elseif id == penalty_code then
+ -- okay
+ else
+ top = nil
+ bot = nil
+ end
+ current = getnext(current)
+ end
+
+ if top then
+ t_profile = setprofile(top) -- not needed
+ if show_profile then
+ addprofile(top,t_profile)
+ end
+ end
+
+end
+
+local ignore = table.tohash {
+ "split_keep",
+ "split_off",
+ -- "vbox",
+}
+
+-- function profiling.vboxhandler(head,where)
+-- if head and not ignore[where] then
+-- local h = tonut(head)
+-- if getnext(h) then
+-- profilelist(h)
+-- end
+-- end
+-- return head
+-- end
+
+function profiling.pagehandler(head)
+ if head then
+ profilelist(head,true)
+ end
+ return head, true
+end
+
+interfaces.implement {
+ name = "setprofile",
+ actions = profiling.set,
+ arguments = {
+ {
+ { "name" },
+ { "height", "dimen" },
+ { "depth", "dimen" },
+ { "distance", "dimen" },
+ { "factor", "integer" },
+ { "lines", "integer" },
+ { "method" }
+ }
+ }
+}
+
+interfaces.implement {
+ name = "profilebox",
+ actions = profiling.profilebox,
+ arguments = {
+ {
+ { "box", "integer" },
+ { "height", "dimen" },
+ { "depth", "dimen" },
+ { "distance", "dimen" },
+ { "factor", "integer" },
+ { "lines", "integer" },
+ { "method" }
+ }
+ }
+}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-prf.mkvi b/Master/texmf-dist/tex/context/base/mkiv/spac-prf.mkvi
new file mode 100644
index 00000000000..8d150f58d4d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-prf.mkvi
@@ -0,0 +1,117 @@
+%D \module
+%D [ file=spac-prf,
+%D version=2015.11.16, % moved from test module mathplus
+%D title=\CONTEXT\ Spacing Macros,
+%D subtitle=Profiling,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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 Spacing Macros / Profiling}
+
+%D This is experimental code that we need for a project. The interface and
+%D details can change. I moved it into the core because that way we can use
+%D it on servers.
+
+% framed: first reflow then profile
+
+\unprotect
+
+\registerctxluafile{spac-prf}{1.001}
+
+\definesystemattribute[profilemethod][public]
+
+\installcorenamespace {profile} % beware, profiles are not like in mkii at all
+\installcorenamespace {profiles}
+
+\installcommandhandler \??profile {profile} \??profile
+
+\setupprofile
+ [\c!height=\strutht,
+ \c!depth=\strutdp,
+ \c!distance=\normallineskip,
+ \c!lines=\zerocount,
+ \c!factor=\plusone]
+
+\defineprofile
+ [\v!strict]
+ [\c!method=\v!strict]
+
+\defineprofile
+ [\v!fixed]
+ [\c!method=\v!fixed]
+
+\defineprofile
+ [\v!none]
+ [\c!method=\v!none,
+ \c!height=\zeropoint,
+ \c!depth=\zeropoint,
+ \c!distance=\zeropoint,
+ \c!factor=\plusone]
+
+\defineprofile[halffixed] [\v!fixed][\c!factor=\plustwo]
+\defineprofile[quarterfixed][\v!fixed][\c!factor=\plusfour]
+\defineprofile[eightsfixed] [\v!fixed][\c!factor=\pluseight]
+
+\unexpanded\def\setprofile[#profile]%
+ {\edef\currentprofile{#profile}%
+ \clf_setprofile
+ name {\currentprofile}%
+ height \dimexpr\profileparameter\c!height\relax
+ depth \dimexpr\profileparameter\c!depth\relax
+ distance \dimexpr\profileparameter\c!distance\relax
+ factor \numexpr\profileparameter\c!factor\relax
+ lines \numexpr\profileparameter\c!lines\relax
+ method {\profileparameter\c!method}%
+ \relax}
+
+\unexpanded\def\resetprofile
+ {\attribute\profilemethodattribute\attributeunsetvalue}
+
+\unexpanded\def\useprofileparameter#getparameter%
+ {\edef\m_spac_profile_asked{#getparameter\c!profile}%
+ \ifx\m_spac_profile_asked\empty
+ \resetprofile
+ \else
+ \setprofile[\m_spac_profile_asked]%
+ \fi}
+
+\unexpanded\def\profiledbox
+ {\vbox\bgroup
+ \dodoubleempty\spac_profiling_box}
+
+\def\spac_profiling_box[#profile][#settings]%
+ {\ifsecondargument
+ \edef\currentprofile{#profile}%
+ \setupcurrentprofile[#settings]%
+ \else
+ \doifassignmentelse{#profile}
+ {\let\currentprofile\v!none
+ \setupcurrentprofile[#profile]}%
+ {\edef\currentprofile{#profile}}%
+ \fi
+ \dowithnextbox
+ {\profilegivenbox\currentprofile\nextbox
+ \unvbox\nextbox
+ \egroup}%
+ \vbox}
+
+\unexpanded\def\profilegivenbox#profile#box%
+ {\begingroup
+ \edef\currentprofile{#profile}%
+ \clf_profilebox
+ box \numexpr#box\relax
+ height \dimexpr\profileparameter\c!height\relax
+ depth \dimexpr\profileparameter\c!depth\relax
+ distance \dimexpr\profileparameter\c!distance\relax
+ factor \numexpr\profileparameter\c!factor\relax
+ lines \numexpr\profileparameter\c!lines\relax
+ method {\profileparameter\c!method}%
+ \relax
+ \endgroup}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/spac-ver.lua b/Master/texmf-dist/tex/context/base/mkiv/spac-ver.lua
index d1cf09e17a9..e81e8b81d16 100644
--- a/Master/texmf-dist/tex/context/base/spac-ver.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-ver.lua
@@ -15,6 +15,9 @@ if not modules then modules = { } end modules ['spac-ver'] = {
-- todo: use lua nodes with lua data (>0.79)
-- see ** can go when 0.79
+-- needs to be redone, too many calls and tests now ... still within some
+-- luatex limitations
+
-- this code dates from the beginning and is kind of experimental; it
-- will be optimized and improved soon .. it's way too complex now but
-- dates from less possibilities
@@ -36,22 +39,22 @@ local allocate = utilities.storage.allocate
local todimen = string.todimen
local formatters = string.formatters
-local P, C, R, S, Cc = lpeg.P, lpeg.C, lpeg.R, lpeg.S, lpeg.Cc
+local P, C, R, S, Cc, Carg = lpeg.P, lpeg.C, lpeg.R, lpeg.S, lpeg.Cc, lpeg.Carg
-local nodes = nodes
-local node = node
-local trackers = trackers
-local attributes = attributes
-local context = context
-local tex = tex
+local nodes = nodes
+local node = node
+local trackers = trackers
+local attributes = attributes
+local context = context
+local tex = tex
-local texlists = tex.lists
-local texgetdimen = tex.getdimen
-local texsetdimen = tex.setdimen
-local texnest = tex.nest
+local texlists = tex.lists
+local texgetdimen = tex.getdimen
+local texsetdimen = tex.setdimen
+local texnest = tex.nest
-local variables = interfaces.variables
-local implement = interfaces.implement
+local variables = interfaces.variables
+local implement = interfaces.implement
-- vertical space handler
@@ -75,6 +78,7 @@ local a_skiporder = attributes.private('skiporder')
----- snap_category = attributes.private('snapcategory')
local a_snapmethod = attributes.private('snapmethod')
local a_snapvbox = attributes.private('snapvbox')
+local a_profilemethod = attributes.private("profilemethod")
local nuts = nodes.nuts
local tonode = nuts.tonode
@@ -84,9 +88,11 @@ local ntostring = nuts.tostring
local getfield = nuts.getfield
local setfield = nuts.setfield
local getnext = nuts.getnext
+local setlink = nuts.setlink
local getprev = nuts.getprev
local getid = nuts.getid
local getlist = nuts.getlist
+local setlist = nuts.setlist
local getattr = nuts.getattr
local setattr = nuts.setattr
local getsubtype = nuts.getsubtype
@@ -95,7 +101,6 @@ local getbox = nuts.getbox
local find_node_tail = nuts.tail
local free_node = nuts.free
local free_node_list = nuts.flush_list
-local copy_node = nuts.copy
local traverse_nodes = nuts.traverse
local traverse_nodes_id = nuts.traverse_id
local insert_node_before = nuts.insert_before
@@ -104,9 +109,11 @@ local remove_node = nuts.remove
local count_nodes = nuts.count
local hpack_node = nuts.hpack
local vpack_node = nuts.vpack
-local writable_spec = nuts.writable_spec
+----- writable_spec = nuts.writable_spec
local nodereference = nuts.reference
+local theprop = nuts.theprop
+
local listtoutf = nodes.listtoutf
local nodeidstostring = nodes.idstostring
@@ -115,19 +122,27 @@ local nodepool = nuts.pool
local new_penalty = nodepool.penalty
local new_kern = nodepool.kern
local new_rule = nodepool.rule
-local new_glue = nodepool.glue
-local new_gluespec = nodepool.gluespec
local nodecodes = nodes.nodecodes
local skipcodes = nodes.skipcodes
-local whatsitcodes = nodes.whatsitcodes
local penalty_code = nodecodes.penalty
local kern_code = nodecodes.kern
local glue_code = nodecodes.glue
local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
-local whatsit_code = nodecodes.whatsit
+local localpar_code = nodecodes.localpar
+
+local userskip_code = skipcodes.userskip
+local lineskip_code = skipcodes.lineskip
+local baselineskip_code = skipcodes.baselineskip
+local parskip_code = skipcodes.parskip
+local abovedisplayskip_code = skipcodes.abovedisplayskip
+local belowdisplayskip_code = skipcodes.belowdisplayskip
+local abovedisplayshortskip_code = skipcodes.abovedisplayshortskip
+local belowdisplayshortskip_code = skipcodes.belowdisplayshortskip
+local topskip_code = skipcodes.topskip
+local splittopskip_code = skipcodes.splittopskip
local vspacing = builders.vspacing or { }
builders.vspacing = vspacing
@@ -224,7 +239,7 @@ end
local function validvbox(parentid,list)
if parentid == hlist_code then
local id = getid(list)
- if id == whatsit_code then -- check for initial par subtype
+ if id == localpar_code then -- check for initial par subtype
list = getnext(list)
if not next then
return nil
@@ -259,7 +274,7 @@ local function already_done(parentid,list,a_snapmethod) -- todo: done when only
-- problem: any snapped vbox ends up in a line
if list and parentid == hlist_code then
local id = getid(list)
- if id == whatsit_code then -- check for initial par subtype
+ if id == localpar_code then -- check for initial par subtype
list = getnext(list)
if not next then
return false
@@ -276,7 +291,7 @@ local function already_done(parentid,list,a_snapmethod) -- todo: done when only
elseif a == 0 then
return true -- already snapped
end
- elseif id == glue_code or id == penalty_code then -- whatsit is weak spot
+ elseif id == glue_code or id == penalty_code then
-- go on
else
return false -- whatever
@@ -307,7 +322,15 @@ end
-- check variables.none etc
+local function fixedprofile(current)
+ local profiling = builders.profiling
+ return profiling and profiling.fixedprofile(current)
+end
+
local function snap_hlist(where,current,method,height,depth) -- method.strut is default
+ if fixedprofile(current) then
+ return
+ end
local list = getlist(current)
local t = trace_vsnapping and { }
if t then
@@ -359,6 +382,17 @@ local function snap_hlist(where,current,method,height,depth) -- method.strut is
local plusdp = snapdp
local snaphtdp = snapht + snapdp
+-- local properties = theprop(current)
+-- local unsnapped = properties.unsnapped
+-- if not unsnapped then -- experiment
+-- properties.unsnapped = {
+-- height = h,
+-- depth = d,
+-- snapht = snapht,
+-- snapdp = snapdp,
+-- }
+-- end
+
if method.box then
local br = 1 - br
if br < 0 then
@@ -428,7 +462,7 @@ local function snap_hlist(where,current,method,height,depth) -- method.strut is
h, d = ch, cd
local shifted = hpack_node(getlist(current))
setfield(shifted,"shift",delta)
- setfield(current,"list",shifted)
+ setlist(current,shifted)
done = true
if t then
t[#t+1] = formatters["first: height %p depth %p shift %p"](ch,cd,delta)
@@ -465,7 +499,7 @@ local function snap_hlist(where,current,method,height,depth) -- method.strut is
h, d = ch, cd
local shifted = hpack_node(getlist(current))
setfield(shifted,"shift",delta)
- setfield(current,"list",shifted)
+ setlist(current,shifted)
done = true
if t then
t[#t+1] = formatters["last: height %p depth %p shift %p"](ch,cd,delta)
@@ -526,13 +560,13 @@ local function snap_hlist(where,current,method,height,depth) -- method.strut is
if offset then
-- we need to set the attr
if t then
- t[#t+1] = formatters["before offset: %p (width %p height %p depth %p)"](offset,getfield(current,"width"),getfield(current,"height"),getfield(current,"depth"))
+ t[#t+1] = formatters["before offset: %p (width %p height %p depth %p)"](offset,getfield(current,"width") or 0,getfield(current,"height"),getfield(current,"depth"))
end
local shifted = hpack_node(getlist(current))
setfield(shifted,"shift",offset)
- setfield(current,"list",shifted)
+ setlist(current,shifted)
if t then
- t[#t+1] = formatters["after offset: %p (width %p height %p depth %p)"](offset,getfield(current,"width"),getfield(current,"height"),getfield(current,"depth"))
+ t[#t+1] = formatters["after offset: %p (width %p height %p depth %p)"](offset,getfield(current,"width") or 0,getfield(current,"height"),getfield(current,"depth"))
end
setattr(shifted,a_snapmethod,0)
setattr(current,a_snapmethod,0)
@@ -570,14 +604,9 @@ local function snap_hlist(where,current,method,height,depth) -- method.strut is
end
local function snap_topskip(current,method)
- local spec = getfield(current,"spec")
- local w = getfield(spec,"width")
- local wd = w
- if getfield(spec,"writable") then
- setfield(spec,"width",0)
- wd = 0
- end
- return w, wd
+ local w = getfield(current,"width") or 0
+ setfield(current,"width",0)
+ return w, 0
end
local categories = allocate {
@@ -591,6 +620,7 @@ local categories = allocate {
[7] = 'goback',
[8] = 'together', -- not used (?)
[9] = 'overlay',
+ [10] = 'notopskip',
}
vspacing.categories = categories
@@ -624,20 +654,27 @@ storage.register("builders/vspacing/data/skip", vspacingdata.skip, "builders.vsp
do -- todo: interface.variables
- vspacing.fixed = false
+ vspacing.fixed = false
- local map = vspacingdata.map
- local skip = vspacingdata.skip
+ local map = vspacingdata.map
+ local skip = vspacingdata.skip
local multiplier = C(S("+-")^0 * R("09")^1) * P("*")
- local category = P(":") * C(P(1)^1)
- local keyword = C((1-category)^1)
+ local separator = S(", ")
+ local category = P(":") * C((1-separator)^1)
+ local keyword = C((1-category-separator)^1)
local splitter = (multiplier + Cc(1)) * keyword * (category + Cc(false))
- local k_fixed, k_flexible, k_category, k_penalty, k_order = variables.fixed, variables.flexible, "category", "penalty", "order"
+ local k_fixed = variables.fixed
+ local k_flexible = variables.flexible
+ local k_category = "category"
+ local k_penalty = "penalty"
+ local k_order = "order"
-- This will change: just node.write and we can store the values in skips which
- -- then obeys grouping
+ -- then obeys grouping .. but .. we miss the amounts then as they live at the tex
+ -- end so we then also need to change that bit ... it would be interesting if we
+ -- could store in properties
local ctx_fixedblankskip = context.fixedblankskip
local ctx_flexibleblankskip = context.flexibleblankskip
@@ -649,67 +686,171 @@ do -- todo: interface.variables
local ctx_addpredefinedblankskip = context.addpredefinedblankskip
local ctx_addaskedblankskip = context.addaskedblankskip
- local function analyze(str,oldcategory) -- we could use shorter names
- for s in gmatch(str,"([^ ,]+)") do
- local amount, keyword, detail = lpegmatch(splitter,s) -- the comma splitter can be merged
- if not keyword then
- report_vspacing("unknown directive %a",s)
+ local ctx_pushlogger = context.pushlogger
+ local ctx_startblankhandling = context.startblankhandling
+ local ctx_stopblankhandling = context.stopblankhandling
+ local ctx_poplogger = context.poplogger
+
+ --
+
+ -- local function analyze(str,oldcategory) -- we could use shorter names
+ -- for s in gmatch(str,"([^ ,]+)") do
+ -- local amount, keyword, detail = lpegmatch(splitter,s) -- the comma splitter can be merged
+ -- if not keyword then
+ -- report_vspacing("unknown directive %a",s)
+ -- else
+ -- local mk = map[keyword]
+ -- if mk then
+ -- category = analyze(mk,category) -- category not used .. and we pass crap anyway
+ -- elseif keyword == k_fixed then
+ -- ctx_fixedblankskip()
+ -- elseif keyword == k_flexible then
+ -- ctx_flexibleblankskip()
+ -- elseif keyword == k_category then
+ -- local category = tonumber(detail)
+ -- if category then
+ -- ctx_setblankcategory(category)
+ -- if category ~= oldcategory then
+ -- ctx_flushblankhandling()
+ -- oldcategory = category
+ -- end
+ -- end
+ -- elseif keyword == k_order and detail then
+ -- local order = tonumber(detail)
+ -- if order then
+ -- ctx_setblankorder(order)
+ -- end
+ -- elseif keyword == k_penalty and detail then
+ -- local penalty = tonumber(detail)
+ -- if penalty then
+ -- ctx_setblankpenalty(penalty)
+ -- end
+ -- else
+ -- amount = tonumber(amount) or 1
+ -- local sk = skip[keyword]
+ -- if sk then
+ -- ctx_addpredefinedblankskip(amount,keyword)
+ -- else -- no check
+ -- ctx_addaskedblankskip(amount,keyword)
+ -- end
+ -- end
+ -- end
+ -- end
+ -- return category
+ -- end
+
+ -- local function analyze(str) -- we could use shorter names
+ -- for s in gmatch(str,"([^ ,]+)") do
+ -- local amount, keyword, detail = lpegmatch(splitter,s) -- the comma splitter can be merged
+ -- if not keyword then
+ -- report_vspacing("unknown directive %a",s)
+ -- else
+ -- local mk = map[keyword]
+ -- if mk then
+ -- analyze(mk) -- category not used .. and we pass crap anyway
+ -- elseif keyword == k_fixed then
+ -- ctx_fixedblankskip()
+ -- elseif keyword == k_flexible then
+ -- ctx_flexibleblankskip()
+ -- elseif keyword == k_category then
+ -- local category = tonumber(detail)
+ -- if category then
+ -- ctx_setblankcategory(category)
+ -- ctx_flushblankhandling()
+ -- end
+ -- elseif keyword == k_order and detail then
+ -- local order = tonumber(detail)
+ -- if order then
+ -- ctx_setblankorder(order)
+ -- end
+ -- elseif keyword == k_penalty and detail then
+ -- local penalty = tonumber(detail)
+ -- if penalty then
+ -- ctx_setblankpenalty(penalty)
+ -- end
+ -- else
+ -- amount = tonumber(amount) or 1
+ -- local sk = skip[keyword]
+ -- if sk then
+ -- ctx_addpredefinedblankskip(amount,keyword)
+ -- else -- no check
+ -- ctx_addaskedblankskip(amount,keyword)
+ -- end
+ -- end
+ -- end
+ -- end
+ -- end
+
+ -- function vspacing.analyze(str)
+ -- if trace_vspacing then
+ -- ctx_pushlogger(report_vspacing)
+ -- ctx_startblankhandling()
+ -- analyze(str,1)
+ -- ctx_stopblankhandling()
+ -- ctx_poplogger()
+ -- else
+ -- ctx_startblankhandling()
+ -- analyze(str,1)
+ -- ctx_stopblankhandling()
+ -- end
+ -- end
+
+ -- alternative
+
+ local pattern = nil
+
+ local function handler(amount, keyword, detail)
+ if not keyword then
+ report_vspacing("unknown directive %a",s)
+ else
+ local mk = map[keyword]
+ if mk then
+ lpegmatch(pattern,mk)
+ elseif keyword == k_fixed then
+ ctx_fixedblankskip()
+ elseif keyword == k_flexible then
+ ctx_flexibleblankskip()
+ elseif keyword == k_category then
+ local category = tonumber(detail)
+ if category then
+ ctx_setblankcategory(category)
+ ctx_flushblankhandling()
+ end
+ elseif keyword == k_order and detail then
+ local order = tonumber(detail)
+ if order then
+ ctx_setblankorder(order)
+ end
+ elseif keyword == k_penalty and detail then
+ local penalty = tonumber(detail)
+ if penalty then
+ ctx_setblankpenalty(penalty)
+ end
else
- local mk = map[keyword]
- if mk then
- category = analyze(mk,category)
- elseif keyword == k_fixed then
- ctx_fixedblankskip()
- elseif keyword == k_flexible then
- ctx_flexibleblankskip()
- elseif keyword == k_category then
- local category = tonumber(detail)
- if category then
- ctx_setblankcategory(category)
- if category ~= oldcategory then
- ctx_flushblankhandling()
- oldcategory = category
- end
- end
- elseif keyword == k_order and detail then
- local order = tonumber(detail)
- if order then
- ctx_setblankorder(order)
- end
- elseif keyword == k_penalty and detail then
- local penalty = tonumber(detail)
- if penalty then
- ctx_setblankpenalty(penalty)
- end
- else
- amount = tonumber(amount) or 1
- local sk = skip[keyword]
- if sk then
- ctx_addpredefinedblankskip(amount,keyword)
- else -- no check
- ctx_addaskedblankskip(amount,keyword)
- end
+ amount = tonumber(amount) or 1
+ local sk = skip[keyword]
+ if sk then
+ ctx_addpredefinedblankskip(amount,keyword)
+ else -- no check
+ ctx_addaskedblankskip(amount,keyword)
end
end
end
- return category
end
- local ctx_pushlogger = context.pushlogger
- local ctx_startblankhandling = context.startblankhandling
- local ctx_stopblankhandling = context.stopblankhandling
- local ctx_poplogger = context.poplogger
+ local splitter = ((multiplier + Cc(1)) * keyword * (category + Cc(false))) / handler
+ pattern = (splitter + separator^1)^0
function vspacing.analyze(str)
if trace_vspacing then
ctx_pushlogger(report_vspacing)
ctx_startblankhandling()
- analyze(str,1)
+ lpegmatch(pattern,str)
ctx_stopblankhandling()
ctx_poplogger()
else
ctx_startblankhandling()
- analyze(str,1)
+ lpegmatch(pattern,str)
ctx_stopblankhandling()
end
end
@@ -740,8 +881,8 @@ local function nodes_to_string(head)
local ty = nodecodes[id]
if id == penalty_code then
t[#t+1] = formatters["%s:%s"](ty,getfield(current,"penalty"))
- elseif id == glue_code then -- or id == kern_code then -- to be tested
- t[#t+1] = formatters["%s:%p"](ty,current)
+ elseif id == glue_code then
+ t[#t+1] = formatters["%s:%s:%p"](ty,skipcodes[getsubtype(current)],getfield(current,"width"))
elseif id == kern_code then
t[#t+1] = formatters["%s:%p"](ty,getfield(current,"kern"))
else
@@ -757,12 +898,12 @@ local function reset_tracing(head)
end
local function trace_skip(str,sc,so,sp,data)
- trace_list[#trace_list+1] = { "skip", formatters["%s | %p | category %s | order %s | penalty %s"](str, data, sc or "-", so or "-", sp or "-") }
+ trace_list[#trace_list+1] = { "skip", formatters["%s | %p | category %s | order %s | penalty %s"](str, getfield(data,"width"), sc or "-", so or "-", sp or "-") }
tracing_info = true
end
local function trace_natural(str,data)
- trace_list[#trace_list+1] = { "skip", formatters["%s | %p"](str, data) }
+ trace_list[#trace_list+1] = { "skip", formatters["%s | %p"](str, getfield(data,"width")) }
tracing_info = true
end
@@ -784,7 +925,7 @@ local function trace_done(str,data)
if getid(data) == penalty_code then
trace_list[#trace_list+1] = { "penalty", formatters["%s | %s"](str,getfield(data,"penalty")) }
else
- trace_list[#trace_list+1] = { "glue", formatters["%s | %p"](str,data) }
+ trace_list[#trace_list+1] = { "glue", formatters["%s | %p"](str,getfield(data,"width")) }
end
tracing_info = true
end
@@ -807,31 +948,6 @@ end
-- alignment box begin_of_par vmode_par hmode_par insert penalty before_display after_display
-local skipcodes = nodes.skipcodes
-
-local userskip_code = skipcodes.userskip
-local lineskip_code = skipcodes.lineskip
-local baselineskip_code = skipcodes.baselineskip
-local parskip_code = skipcodes.parskip
-local abovedisplayskip_code = skipcodes.abovedisplayskip
-local belowdisplayskip_code = skipcodes.belowdisplayskip
-local abovedisplayshortskip_code = skipcodes.abovedisplayshortskip
-local belowdisplayshortskip_code = skipcodes.belowdisplayshortskip
-local topskip_code = skipcodes.topskip
-local splittopskip_code = skipcodes.splittopskip
-
--- local function free_glue_node(n)
--- free_node(n)
--- local s = getfield(n,"spec")
--- if s then
--- free_node(s)
--- end
--- end
-
-local free_glue_node = free_node
-local free_glue_spec = function() end
------ free_glue_spec = free_node -- can be enabled in in 0.73 (so for the moment we leak due to old luatex engine issues)
-
function vspacing.snapbox(n,how)
local sv = snapmethods[how]
if sv then
@@ -885,7 +1001,7 @@ local w, h, d = 0, 0, 0
local function forced_skip(head,current,width,where,trace)
if head == current then
if getsubtype(head) == baselineskip_code then
- width = width - getfield(getfield(head,"spec"),"width")
+ width = width - (getfield(head,"width") or 0)
end
end
if width == 0 then
@@ -1018,9 +1134,6 @@ local function check_experimental_overlay(head,current)
local p = nil
local c = current
local n = nil
-
- -- setfield(head,"prev",nil) -- till we have 0.79 **
-
local function overlay(p,n,mvl)
local p_ht = getfield(p,"height")
local p_dp = getfield(p,"depth")
@@ -1034,7 +1147,7 @@ local function check_experimental_overlay(head,current)
while c and c ~= n do
local id = getid(c)
if id == glue_code then
- skips = skips + getfield(getfield(c,"glue_spec"),"width")
+ skips = skips + (getfield(c,"width") or 0)
elseif id == kern_code then
skips = skips + getfield(c,"kern")
end
@@ -1116,6 +1229,19 @@ end
-- we now look back a lot, way too often
+-- userskip
+-- lineskip
+-- baselineskip
+-- parskip
+-- abovedisplayskip
+-- belowdisplayskip
+-- abovedisplayshortskip
+-- belowdisplayshortskip
+-- topskip
+-- splittopskip
+
+local experiment = false directives.register("vspacing.experiment",function(v) experiment = v end)
+
local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also pass tail
if trace then
reset_tracing(head)
@@ -1143,7 +1269,9 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
local function flush(why)
if penalty_data then
local p = new_penalty(penalty_data)
- if trace then trace_done("flushed due to " .. why,p) end
+ if trace then
+ trace_done("flushed due to " .. why,p)
+ end
if penalty_data >= 10000 then -- or whatever threshold?
local prev = getprev(current)
if getid(prev) == glue_code then -- maybe go back more, or maybe even push back before any glue
@@ -1155,31 +1283,46 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
else
head = insert_node_before(head,current,p)
end
--- if penalty_data > special_penalty_min and penalty_data < special_penalty_max then
- local props = properties[p]
- if props then
- props.special_penalty = special_penalty or penalty_data
- else
- properties[p] = {
- special_penalty = special_penalty or penalty_data
- }
- end
--- end
+ -- if penalty_data > special_penalty_min and penalty_data < special_penalty_max then
+ local props = properties[p]
+ if props then
+ props.special_penalty = special_penalty or penalty_data
+ else
+ properties[p] = {
+ special_penalty = special_penalty or penalty_data
+ }
+ end
+ -- end
end
if glue_data then
- local spec = getfield(glue_data,"spec")
if force_glue then
- if trace then trace_done("flushed due to " .. why,glue_data) end
- head = forced_skip(head,current,getfield(spec,"width"),"before",trace)
- free_glue_node(glue_data)
- elseif getfield(spec,"writable") then
- if trace then trace_done("flushed due to " .. why,glue_data) end
- head = insert_node_before(head,current,glue_data)
+ if trace then
+ trace_done("flushed due to forced " .. why,glue_data)
+ end
+ head = forced_skip(head,current,getfield(glue_data,"width") or 0,"before",trace)
+ free_node(glue_data)
else
- free_glue_node(glue_data)
+ local w = getfield(glue_data,"width")
+ if w ~= 0 then
+ if trace then
+ trace_done("flushed due to non zero " .. why,glue_data)
+ end
+ head = insert_node_before(head,current,glue_data)
+ elseif getfield(glue_data,"stretch") ~= 0 or getfield(glue_data,"shrink") ~= 0 then
+ if trace then
+ trace_done("flushed due to stretch/shrink in" .. why,glue_data)
+ end
+ head = insert_node_before(head,current,glue_data)
+ else
+ -- report_vspacing("needs checking (%s): %p",skipcodes[getsubtype(glue_data)],w)
+ free_node(glue_data)
+ end
end
end
- if trace then trace_node(current) end
+
+ if trace then
+ trace_node(current)
+ end
glue_order, glue_data, force_glue = 0, nil, false
penalty_order, penalty_data, natural_penalty = 0, nil, nil
parskip, ignore_parskip, ignore_following, ignore_whitespace = nil, false, false, false
@@ -1210,7 +1353,9 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
texgetdimen("bodyfontstrutheight"), texgetdimen("bodyfontstrutdepth")
)
end
- if trace then trace_info("start analyzing",where,what) end
+ if trace then
+ trace_info("start analyzing",where,what)
+ end
-- local headprev = getprev(head)
@@ -1263,7 +1408,9 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
current = getnext(current)
elseif id == penalty_code then
-- natural_penalty = getfield(current,"penalty")
- -- if trace then trace_done("removed penalty",current) end
+ -- if trace then
+ -- trace_done("removed penalty",current)
+ -- end
-- head, current = remove_node(head, current, true)
-- if nobreakfound == nil then
@@ -1294,9 +1441,11 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
getpagelist()
local p = specialmethods[specialmethod](pagehead,pagetail,current,sp)
if p then
- if trace then
- trace_skip("previous special penalty %a is changed to %a using method %a",sp,p,specialmethod)
- end
+ -- todo: other tracer
+ --
+ -- if trace then
+ -- trace_skip("previous special penalty %a is changed to %a using method %a",sp,p,specialmethod)
+ -- end
special_penalty = sp
sp = p
end
@@ -1314,7 +1463,9 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
elseif penalty_order == so and sp > penalty_data then
penalty_data = sp
end
- if trace then trace_skip("penalty in skip",sc,so,sp,current) end
+ if trace then
+ trace_skip("penalty in skip",sc,so,sp,current)
+ end
-- if nobreakfound then
-- penalty_data = 10000
@@ -1326,119 +1477,163 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
head, current = remove_node(head, current, true)
elseif not sc then -- if not sc then
if glue_data then
- if trace then trace_done("flush",glue_data) end
+ if trace then
+ trace_done("flush",glue_data)
+ end
head = insert_node_before(head,current,glue_data)
- if trace then trace_natural("natural",current) end
+ if trace then
+ trace_natural("natural",current)
+ end
current = getnext(current)
else
-- not look back across head
-- todo: prev can be whatsit (latelua)
local previous = getprev(current)
if previous and getid(previous) == glue_code and getsubtype(previous) == userskip_code then
- local ps = getfield(previous,"spec")
- if getfield(ps,"writable") then
- local cs = getfield(current,"spec")
- if getfield(cs,"writable") and getfield(ps,"stretch_order") == 0 and getfield(ps,"shrink_order") == 0 and getfield(cs,"stretch_order") == 0 and getfield(cs,"shrink_order") == 0 then
- local pw, pp, pm = getfield(ps,"width"), getfield(ps,"stretch"), getfield(ps,"shrink")
- local cw, cp, cm = getfield(cs,"width"), getfield(cs,"stretch"), getfield(cs,"shrink")
- -- ps = writable_spec(previous) -- no writable needed here
- -- ps.width, ps.stretch, ps.shrink = pw + cw, pp + cp, pm + cm
- free_glue_spec(ps)
- setfield(previous,"spec",new_gluespec(pw + cw, pp + cp, pm + cm)) -- else topskip can disappear
- if trace then trace_natural("removed",current) end
- head, current = remove_node(head, current, true)
- -- current = previous
- if trace then trace_natural("collapsed",previous) end
- -- current = getnext(current)
- else
- if trace then trace_natural("filler",current) end
- current = getnext(current)
+ if getfield(previous,"stretch_order") == 0 and getfield(previous,"shrink_order") == 0 and
+ getfield(current, "stretch_order") == 0 and getfield(current, "shrink_order") == 0 then
+ setfield(previous,"width", (getfield(previous,"width") or 0) + (getfield(current,"width") or 0))
+ setfield(previous,"stretch",(getfield(previous,"stretch") or 0) + (getfield(current,"stretch") or 0))
+ setfield(previous,"shrink", (getfield(previous,"shrink") or 0) + (getfield(current,"shrink") or 0))
+ if trace then
+ trace_natural("removed",current)
+ end
+ head, current = remove_node(head, current, true)
+ if trace then
+ trace_natural("collapsed",previous)
end
else
- if trace then trace_natural("natural (no prev spec)",current) end
+ if trace then
+ trace_natural("filler",current)
+ end
current = getnext(current)
end
else
- if trace then trace_natural("natural (no prev)",current) end
+ if trace then
+ trace_natural("natural (no prev)",current)
+ end
current = getnext(current)
end
end
glue_order, glue_data = 0, nil
elseif sc == disable then
+local next = getnext(current)
+if not experiment or next then
ignore_following = true
- if trace then trace_skip("disable",sc,so,sp,current) end
+ if trace then
+ trace_skip("disable",sc,so,sp,current)
+ end
head, current = remove_node(head, current, true)
+else
+ current = next
+end
elseif sc == together then
+local next = getnext(current)
+if not experiment or next then
keep_together = true
- if trace then trace_skip("together",sc,so,sp,current) end
+ if trace then
+ trace_skip("together",sc,so,sp,current)
+ end
head, current = remove_node(head, current, true)
+else
+ current = next
+end
elseif sc == nowhite then
+local next = getnext(current)
+if not experiment or next then
ignore_whitespace = true
head, current = remove_node(head, current, true)
+else
+ current = next
+end
elseif sc == discard then
- if trace then trace_skip("discard",sc,so,sp,current) end
+ if trace then
+ trace_skip("discard",sc,so,sp,current)
+ end
head, current = remove_node(head, current, true)
elseif sc == overlay then
-- todo (overlay following line over previous
- if trace then trace_skip("overlay",sc,so,sp,current) end
+ if trace then
+ trace_skip("overlay",sc,so,sp,current)
+ end
-- beware: head can actually be after the affected nodes as
-- we look back ... some day head will the real head
head, current = check_experimental_overlay(head,current,a_snapmethod)
elseif ignore_following then
- if trace then trace_skip("disabled",sc,so,sp,current) end
+ if trace then
+ trace_skip("disabled",sc,so,sp,current)
+ end
head, current = remove_node(head, current, true)
elseif not glue_data then
- if trace then trace_skip("assign",sc,so,sp,current) end
+ if trace then
+ trace_skip("assign",sc,so,sp,current)
+ end
glue_order = so
head, current, glue_data = remove_node(head, current)
elseif glue_order < so then
- if trace then trace_skip("force",sc,so,sp,current) end
+ if trace then
+ trace_skip("force",sc,so,sp,current)
+ end
glue_order = so
- free_glue_node(glue_data)
+ free_node(glue_data)
head, current, glue_data = remove_node(head, current)
elseif glue_order == so then
-- is now exclusive, maybe support goback as combi, else why a set
if sc == largest then
- local cs, gs = getfield(current,"spec"), getfield(glue_data,"spec")
- local cw, gw = getfield(cs,"width"), getfield(gs,"width")
+ local cw = getfield(current,"width") or 0
+ local gw = getfield(glue_data,"width") or 0
if cw > gw then
- if trace then trace_skip("largest",sc,so,sp,current) end
- free_glue_node(glue_data) -- also free spec
+ if trace then
+ trace_skip("largest",sc,so,sp,current)
+ end
+ free_node(glue_data)
head, current, glue_data = remove_node(head,current)
else
- if trace then trace_skip("remove smallest",sc,so,sp,current) end
+ if trace then
+ trace_skip("remove smallest",sc,so,sp,current)
+ end
head, current = remove_node(head, current, true)
end
elseif sc == goback then
- if trace then trace_skip("goback",sc,so,sp,current) end
- free_glue_node(glue_data) -- also free spec
+ if trace then
+ trace_skip("goback",sc,so,sp,current)
+ end
+ free_node(glue_data)
head, current, glue_data = remove_node(head,current)
elseif sc == force then
-- last one counts, some day we can provide an accumulator and largest etc
-- but not now
- if trace then trace_skip("force",sc,so,sp,current) end
- free_glue_node(glue_data) -- also free spec
+ if trace then
+ trace_skip("force",sc,so,sp,current)
+ end
+ free_node(glue_data)
head, current, glue_data = remove_node(head, current)
elseif sc == penalty then
- if trace then trace_skip("penalty",sc,so,sp,current) end
- free_glue_node(glue_data) -- also free spec
+ if trace then
+ trace_skip("penalty",sc,so,sp,current)
+ end
+ free_node(glue_data)
glue_data = nil
head, current = remove_node(head, current, true)
elseif sc == add then
- if trace then trace_skip("add",sc,so,sp,current) end
- -- local old, new = glue_data.spec, getfield(current,"spec")
- local old, new = writable_spec(glue_data), getfield(current,"spec")
- setfield(old,"width",getfield(old,"width") + getfield(new,"width"))
- setfield(old,"stretch",getfield(old,"stretch") + getfield(new,"stretch"))
- setfield(old,"shrink",getfield(old,"shrink") + getfield(new,"shrink"))
+ if trace then
+ trace_skip("add",sc,so,sp,current)
+ end
+ setfield(old,"width", (getfield(glue_data,"width") or 0) + (getfield(current,"width") or 0))
+ setfield(old,"stretch",(getfield(glue_data,"stretch") or 0) + (getfield(current,"stretch") or 0))
+ setfield(old,"shrink", (getfield(glue_data,"shrink") or 0) + (getfield(current,"shrink") or 0))
-- toto: order
head, current = remove_node(head, current, true)
else
- if trace then trace_skip("unknown",sc,so,sp,current) end
+ if trace then
+ trace_skip("unknown",sc,so,sp,current)
+ end
head, current = remove_node(head, current, true)
end
else
- if trace then trace_skip("unknown",sc,so,sp,current) end
+ if trace then
+ trace_skip("unknown",sc,so,sp,current)
+ end
head, current = remove_node(head, current, true)
end
if sc == force then
@@ -1449,20 +1644,20 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
local s = getattr(current,a_snapmethod)
if s and s ~= 0 then
setattr(current,a_snapmethod,0)
- local spec = getfield(current,"spec")
- if getfield(spec,"writable") then
- local spec = writable_spec(current)
- setfield(spec,"width",0)
- if trace_vsnapping then
- report_snapper("lineskip set to zero")
- end
+ setfield(current,"width",0)
+ if trace_vsnapping then
+ report_snapper("lineskip set to zero")
end
else
- if trace then trace_skip("lineskip",sc,so,sp,current) end
+ if trace then
+ trace_skip("lineskip",sc,so,sp,current)
+ end
flush("lineskip")
end
else
- if trace then trace_skip("lineskip",sc,so,sp,current) end
+ if trace then
+ trace_skip("lineskip",sc,so,sp,current)
+ end
flush("lineskip")
end
current = getnext(current)
@@ -1471,43 +1666,55 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
local s = getattr(current,a_snapmethod)
if s and s ~= 0 then
setattr(current,a_snapmethod,0)
- local spec = getfield(current,"spec")
- if getfield(spec,"writable") then
- local spec = writable_spec(current)
- setfield(spec,"width",0)
- if trace_vsnapping then
- report_snapper("baselineskip set to zero")
- end
+ setfield(current,"width",0)
+ if trace_vsnapping then
+ report_snapper("baselineskip set to zero")
end
else
- if trace then trace_skip("baselineskip",sc,so,sp,current) end
+ if trace then
+ trace_skip("baselineskip",sc,so,sp,current)
+ end
flush("baselineskip")
end
else
- if trace then trace_skip("baselineskip",sc,so,sp,current) end
+ if trace then
+ trace_skip("baselineskip",sc,so,sp,current)
+ end
flush("baselineskip")
end
current = getnext(current)
elseif subtype == parskip_code then
-- parskip always comes later
if ignore_whitespace then
- if trace then trace_natural("ignored parskip",current) end
+ if trace then
+ trace_natural("ignored parskip",current)
+ end
head, current = remove_node(head, current, true)
elseif glue_data then
- local ps = getfield(current,"spec")
- local gs = getfield(glue_data,"spec")
- if getfield(ps,"writable") and getfield(gs,"writable") and getfield(ps,"width") > getfield(gs,"width") then
- setfield(glue_data,"spec",copy_node(ps))
- if trace then trace_natural("taking parskip",current) end
+ local wp = getfield(current,"width") or 0
+ if ((w ~= 0) and (w > (getfield(glue_data,"width") or 0))) then
+ glue_data = current
+ head, current = remove_node(head, current)
+ if trace then
+ trace_natural("taking parskip",current)
+ end
else
- if trace then trace_natural("removed parskip",current) end
+ head, current = remove_node(head, current, true)
+ if trace then
+ trace_natural("removed parskip",current)
+ end
end
- head, current = remove_node(head, current, true)
else
- if trace then trace_natural("honored parskip",current) end
+ if trace then
+ trace_natural("honored parskip",current)
+ end
head, current, glue_data = remove_node(head, current)
end
elseif subtype == topskip_code or subtype == splittopskip_code then
+ local next = getnext(current)
+ if next and getattr(next,a_skipcategory) == 10 then -- no top skip
+ nuts.setglue(current) -- zero
+ end
if snap then
local s = getattr(current,a_snapmethod)
if s and s ~= 0 then
@@ -1518,47 +1725,60 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
report_snapper("topskip snapped from %p to %p for %a",w,cw,where)
end
else
- if trace then trace_skip("topskip",sc,so,sp,current) end
+ if trace then
+ trace_skip("topskip",sc,so,sp,current)
+ end
flush("topskip")
end
else
- if trace then trace_skip("topskip",sc,so,sp,current) end
+ if trace then
+ trace_skip("topskip",sc,so,sp,current)
+ end
flush("topskip")
end
current = getnext(current)
elseif subtype == abovedisplayskip_code then
--
- if trace then trace_skip("above display skip (normal)",sc,so,sp,current) end
+ if trace then
+ trace_skip("above display skip (normal)",sc,so,sp,current)
+ end
flush("above display skip (normal)")
current = getnext(current)
--
elseif subtype == belowdisplayskip_code then
--
- if trace then trace_skip("below display skip (normal)",sc,so,sp,current) end
+ if trace then
+ trace_skip("below display skip (normal)",sc,so,sp,current)
+ end
flush("below display skip (normal)")
current = getnext(current)
--
elseif subtype == abovedisplayshortskip_code then
--
- if trace then trace_skip("above display skip (short)",sc,so,sp,current) end
+ if trace then
+ trace_skip("above display skip (short)",sc,so,sp,current)
+ end
flush("above display skip (short)")
current = getnext(current)
--
elseif subtype == belowdisplayshortskip_code then
--
- if trace then trace_skip("below display skip (short)",sc,so,sp,current) end
+ if trace then
+ trace_skip("below display skip (short)",sc,so,sp,current)
+ end
flush("below display skip (short)")
current = getnext(current)
--
else -- other glue
if snap and trace_vsnapping then
- local spec = getfield(current,"spec")
- if getfield(spec,"writable") and getfield(spec,"width") ~= 0 then
- report_snapper("glue %p of type %a kept",getfield(spec,"width"),skipcodes[subtype])
- -- setfield(spec,"width",0)
+ local w = getfield(current,"width") or 0
+ if w ~= 0 then
+ report_snapper("glue %p of type %a kept",w,skipcodes[subtype])
end
end
- if trace then trace_skip(formatters["glue of type %a"](subtype),sc,so,sp,current) end
+ if trace then
+ trace_skip(formatters["glue of type %a"](subtype),sc,so,sp,current)
+ end
flush("some glue")
current = getnext(current)
end
@@ -1567,7 +1787,9 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
current = getnext(current)
end
end
- if trace then trace_info("stop analyzing",where,what) end
+ if trace then
+ trace_info("stop analyzing",where,what)
+ end
-- if natural_penalty and (not penalty_data or natural_penalty > penalty_data) then
-- penalty_data = natural_penalty
-- end
@@ -1578,7 +1800,9 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
if penalty_data then
tail = find_node_tail(head)
local p = new_penalty(penalty_data)
- if trace then trace_done("result",p) end
+ if trace then
+ trace_done("result",p)
+ end
head, tail = insert_node_after(head,tail,p)
-- if penalty_data > special_penalty_min and penalty_data < special_penalty_max then
local props = properties[p]
@@ -1593,11 +1817,13 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also
end
if glue_data then
if not tail then tail = find_node_tail(head) end
- if trace then trace_done("result",glue_data) end
+ if trace then
+ trace_done("result",glue_data)
+ end
if force_glue then
- local spec = getfield(glue_data,"spec")
- head, tail = forced_skip(head,tail,getfield(spec,"width"),"after",trace)
- free_glue_node(glue_data)
+ head, tail = forced_skip(head,tail,getfield(glue_data,"width") or 0,"after",trace)
+ free_node(glue_data)
+ glue_data = nil
else
head, tail = insert_node_after(head,tail,glue_data)
end
@@ -1634,8 +1860,12 @@ end
local stackhead, stacktail, stackhack = nil, nil, false
-local function report(message,lst)
- report_vspacing(message,count_nodes(lst,true),nodeidstostring(lst))
+local function report(message,where,lst)
+ if lst and where then
+ report_vspacing(message,where,count_nodes(lst,true),nodeidstostring(lst))
+ else
+ report_vspacing(message,count_nodes(lst,true),nodeidstostring(lst))
+ end
end
-- ugly code: we get partial lists (check if this stack is still okay) ... and we run
@@ -1665,29 +1895,27 @@ function vspacing.pagehandler(newhead,where)
end
if flush then
if stackhead then
- if trace_collect_vspacing then report("appending %s nodes to stack (final): %s",newhead) end
- setfield(stacktail,"next",newhead)
- setfield(newhead,"prev",stacktail)
+ if trace_collect_vspacing then report("%s > appending %s nodes to stack (final): %s",where,newhead) end
+ setlink(stacktail,newhead)
newhead = stackhead
stackhead, stacktail = nil, nil
end
if stackhack then
stackhack = false
- if trace_collect_vspacing then report("processing %s nodes: %s",newhead) end
+ if trace_collect_vspacing then report("%s > processing %s nodes: %s",where,newhead) end
-- texlists.contrib_head = collapser(newhead,"page",where,trace_page_vspacing,true,a_snapmethod)
newhead = collapser(newhead,"page",where,trace_page_vspacing,true,a_snapmethod)
else
- if trace_collect_vspacing then report("flushing %s nodes: %s",newhead) end
+ if trace_collect_vspacing then report("%s > flushing %s nodes: %s",where,newhead) end
-- texlists.contrib_head = newhead
end
return tonode(newhead)
else
if stackhead then
- if trace_collect_vspacing then report("appending %s nodes to stack (intermediate): %s",newhead) end
- setfield(stacktail,"next",newhead)
- setfield(newhead,"prev",stacktail)
+ if trace_collect_vspacing then report("%s > appending %s nodes to stack (intermediate): %s",where,newhead) end
+ setlink(stacktail,newhead)
else
- if trace_collect_vspacing then report("storing %s nodes in stack (initial): %s",newhead) end
+ if trace_collect_vspacing then report("%s > storing %s nodes in stack (initial): %s",where,newhead) end
stackhead = newhead
end
stacktail = newtail
@@ -1722,9 +1950,9 @@ function vspacing.collapsevbox(n,aslist) -- for boxes but using global a_snapmet
if list then
list = collapser(list,"snapper","vbox",trace_vbox_vspacing,true,a_snapmethod)
if aslist then
- setfield(box,"list",list) -- beware, dimensions of box are wrong now
+ setlist(box,list) -- beware, dimensions of box are wrong now
else
- setfield(box,"list",vpack_node(list))
+ setlist(box,vpack_node(list))
end
end
end
diff --git a/Master/texmf-dist/tex/context/base/spac-ver.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-ver.mkiv
index 86a731d3c78..bbe53fb2aa3 100644
--- a/Master/texmf-dist/tex/context/base/spac-ver.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-ver.mkiv
@@ -132,7 +132,7 @@
\def\spac_linespacing_setup_relative_interlinespace#1%
{\ifcsname\??interlinespacerelative#1\endcsname
- \csname\??interlinespacerelative#1\endcsname
+ \lastnamedcs
\else
\spac_linespacing_set_specified_relative_interlinespace{#1}%
\fi}
@@ -370,7 +370,7 @@
\def\spac_whitespace_setup % quick test for no list
{\ifcsname\??whitespacemethod\v_spac_whitespace_current\endcsname
- \csname\??whitespacemethod\v_spac_whitespace_current\endcsname
+ \lastnamedcs
\else
\expandafter\processcommalist\expandafter[\v_spac_whitespace_current]\spac_whitespace_setup_method % can be raw
\fi\relax
@@ -418,11 +418,11 @@
\installwhitespacemethod \v!medium {\s_spac_whitespace_parskip \medskipamount}
\installwhitespacemethod \v!small {\s_spac_whitespace_parskip \smallskipamount}
-\installwhitespacemethod \s!default {\spac_whitespace_setup_nop}
+\installwhitespacemethod \s!default {\spac_whitespace_setup_nop} % also covers none
\def\spac_whitespace_setup_method#1%
{\ifcsname\??whitespacemethod#1\endcsname
- \csname\??whitespacemethod#1\endcsname
+ \lastnamedcs
\else
\s_spac_whitespace_parskip#1\fi
\relax}
@@ -441,8 +441,8 @@
% \def\spac_whitespace_setup_method#1%
% {\csname\??whitespacemethod\ifcsname\??whitespacemethod#1\endcsname#1\else\s!unknown\endcsname\relax}
-\unexpanded\def\nowhitespace{\vspacing[\v!nowhite]}
-\unexpanded\def\whitespace {\vspacing[\v!white]}
+\unexpanded\def\nowhitespace{\directcheckedvspacing\v!nowhite} % {\vspacing[\v!nowhite]}
+\unexpanded\def\whitespace {\directcheckedvspacing\v!white} % {\vspacing[\v!white]}
\setupwhitespace
[\v!none]
@@ -463,9 +463,9 @@
\ifnum\c_spac_packed_level=\plusone \ifvmode
\begingroup
\whitespace % not combined
- \blank[\v!disable]%
+ \directcheckedvspacing\v!disable % \blank[\v!disable]% or \inhibitblank
\doifelse{#1}\v!blank\settrue\setfalse\c_spac_packed_blank
- \setupwhitespace[\v!none]%
+ \setupwhitespace[\v!none]% or \forgetparskip
\fi \fi}
\unexpanded\def\stoppacked
@@ -476,48 +476,37 @@
\global\advance\c_spac_packed_level\minusone}
\unexpanded\def\startunpacked
- {\blank
+ {\directdefaultvspacing % \blank
\begingroup}
\unexpanded\def\stopunpacked
{\endgroup
- \blank}
+ \directdefaultvspacing}% \blank}
% \prevdepth crosses pageboundaries!
%
% todo: a version that works ok inside a box
+% global : outer hsize + keep skips
+% local : inner hsize + reset skips
+
\installcorenamespace{linesaround}
+\let\spac_lines_vbox\vbox
+
+\installtextracker
+ {linecorrection.boxes}
+ {\let\spac_lines_vbox\ruledvbox}
+ {\let\spac_lines_vbox\vbox}
+
\let\v_spac_lines_around_action_set\relax
\let\m_spac_lines_around \empty
-% \setvalue{\??linesaround\v!blank }{\blank}
-% \letvalue{\??linesaround\empty }\relax
-% \setvalue{\??linesaround\s!unknown}{\blank[\m_spac_lines_around]}
-%
-% \unexpanded\def\startlinecorrection
-% {\bgroup
-% \dodoubleempty\spac_lines_start_correction}
-%
-% \def\spac_lines_start_correction[#1][#2]% #2 gobbles spaces
-% {\edef\m_spac_lines_around{#1}%
-% \expandafter\let\expandafter\spac_lines_action_around\csname\??linesaround
-% \ifcsname\??linesaround\m_spac_lines_around\endcsname\m_spac_lines_around\else\s!unknown\fi
-% \endcsname
-% \spac_lines_action_around
-% \startbaselinecorrection
-% \offbaselinecorrection
-% \ignorespaces}
-%
-% \unexpanded\def\stoplinecorrection
-% {\stopbaselinecorrection
-% \spac_lines_action_around
-% \egroup}
+\newconstant\c_spac_lines_correction_mode
\setvalue{\??linesaround\v!blank }{\blank}
\letvalue{\??linesaround\empty }\relax
-\setvalue{\??linesaround\s!unknown}{\blank[\m_spac_lines_around]}
+\setvalue{\??linesaround\s!unknown}{\directcheckedvspacing\m_spac_lines_around} % \blank[\m_spac_lines_around]}
\def\spac_lines_action_around % we used to let this one but it's cleaner this way
{\csname\??linesaround % i.e. do it twice
@@ -526,62 +515,61 @@
\unexpanded\def\startlinecorrection
{\endgraf
- \bgroup
+ \begingroup
+ \setconstant\c_spac_lines_correction_mode\plusone
\dosingleempty\spac_lines_start_correction}
\unexpanded\def\startlocallinecorrection
{\endgraf
- \bgroup
- \setlocalhsize
- \hsize\localhsize
+ \begingroup
+ \setconstant\c_spac_lines_correction_mode\plustwo
\dosingleempty\spac_lines_start_correction}
-\def\spac_lines_start_correction
- {\ifvmode
- \expandafter\spac_lines_start_correction_yes
- \else
- \expandafter\spac_lines_start_correction_nop
- \fi}
-
-\def\spac_lines_start_correction_nop[#1]%
- {\vbox\bgroup
- \ignorespaces
- \let\spac_lines_stop_correction\spac_lines_stop_correction_nop}
-
-\def\spac_lines_stop_correction_nop
- {\removeunwantedspaces
- \egroup}
-
-\def\spac_lines_start_correction_yes[#1]%
+\unexpanded\def\spac_lines_start_correction[#1]%
{\edef\m_spac_lines_around{#1}%
\spac_lines_action_around
\d_spac_prevdepth\prevdepth
\spac_lines_initialize_corrections
\offbaselinecorrection % ???
- \setbox\scratchbox\vbox\bgroup
- \ignorespaces
- \let\spac_lines_stop_correction\spac_lines_stop_correction_yes}
-
-% still not ok ... will move to the lua end ... needs a final solution
+ \setbox\scratchbox\spac_lines_vbox\bgroup
+ \ifcase\c_spac_lines_correction_mode
+ % nothing
+ \or
+ % global
+ \or
+ % local
+ \setlocalhsize
+ \hsize\localhsize
+ \forgetbothskips
+ \fi
+ \ignorespaces}
-\unexpanded\def\spac_lines_stop_correction_yes
+\unexpanded\def\spac_lines_stop_correction
{\removeunwantedspaces
\egroup
\ifgridsnapping
- \blank[\v!white]%
- \snaptogrid\hbox{\box\scratchbox}%
+ \spac_lines_stop_correction_ongrid
+ \else
+ \spac_lines_stop_correction_normal
+ \fi
+ \endgroup}
+
+\unexpanded\def\spac_lines_stop_correction_ongrid
+ {\directcheckedvspacing\v!white % \blank[\v!white]%
+ \snaptogrid\hpack{\box\scratchbox}}
+
+\unexpanded\def\spac_lines_stop_correction_normal
+ {\directcheckedvspacing\v!nowhite % \blank[\v!nowhite]%
+ \ifdim\parskip>\zeropoint
+ % too fuzzy otherwise
\else
-\blank[\v!nowhite]%
-\ifdim\parskip>\zeropoint
- % too fuzzy otherwise
-\else
- % doesn't like whitespace
+ % doesn't like whitespace
\ifdim\d_spac_prevdepth<\maxdimen
\unless\ifdim\d_spac_prevdepth<\zeropoint
\ifdim\d_spac_prevdepth<\strutdp \relax
\pushlastnode
\ifdim\d_spac_prevdepth>\zeropoint
- \kern-\d_spac_prevdepth
+ \kern-\d_spac_prevdepth
\fi
\kern\strutdp
\prevdepth\strutdp
@@ -589,24 +577,35 @@
\fi
\fi
\fi
-\fi
- \ifdim\pagegoal<\maxdimen
- \blank[\v!white,\the\d_spac_lines_correction_before]% \blank[\v!white]\dotopbaselinecorrection
- \fi
- \nointerlineskip % new
- \noindent % not just \dontleavehmode (MKII compatible)
- \box\scratchbox
- \endgraf
- \blank[\the\d_spac_lines_correction_after]% \dobotbaselinecorrection
- % \allowbreak % new, otherwise problems when many in a row
- \prevdepth\strutdp
\fi
- \spac_lines_action_around
- \egroup}
-
-\unexpanded\def\stoplinecorrection{\spac_lines_stop_correction}
-
-\let\stoplocallinecorrection\stoplinecorrection
+ \ifdim\pagegoal<\maxdimen
+ % \blank[\v!white,\the\d_spac_lines_correction_before]% \blank[\v!white]\dotopbaselinecorrection
+ \directcheckedvspacing{\v!white,\the\d_spac_lines_correction_before}% \blank[\v!white]\dotopbaselinecorrection
+ \fi
+ \nointerlineskip % new
+ \noindent % not \dontleavehmode !
+ \ifcase\c_spac_lines_correction_mode
+ % nothing
+ \or
+ % global
+ \hskip-\leftskip % more tricky would be hangindent so we ignore that one
+ \or
+ % local
+ \fi
+ \box\scratchbox
+ \endgraf
+ %
+ % eventually i'll get it right ... (i also need to check all whitespace code elsewhere)
+ %
+ % \blank[\the\d_spac_lines_correction_after]% \dobotbaselinecorrection
+ % \directcheckedvspacing{\the\d_spac_lines_correction_after}% \dobotbaselinecorrection
+ \directcheckedvspacing{\v!white,\the\d_spac_lines_correction_after}% \dobotbaselinecorrection
+ % \allowbreak % new, otherwise problems when many in a row
+ \prevdepth\strutdp
+ \spac_lines_action_around}
+
+\let\stoplinecorrection \spac_lines_stop_correction
+\let\stoplocallinecorrection\spac_lines_stop_correction
% todo:
@@ -618,8 +617,8 @@
\flushnextbox
\stopbaselinecorrection}
-\unexpanded\def\verticalstrut {\vbox{\hsize\zeropoint\forgetall\strut}}
-\unexpanded\def\horizontalstrut{\hbox {\strut}}
+\unexpanded\def\verticalstrut {\vpack{\hsize\zeropoint\forgetall\strut}}
+\unexpanded\def\horizontalstrut{\hpack {\strut}}
% Hieronder volgen enkele instellingen en macro's ten behoeve
% van de interlinie en \strut. De waarden 2.8, 0.07, 0.72 en
@@ -839,10 +838,14 @@
\newbox\strutbox
-\setbox\strutbox\hbox{\vrule\s!height8.5pt\s!depth3.5pt\s!width\zeropoint} % just a start
+\setbox\strutbox\hpack{\vrule\s!height8.5pt\s!depth3.5pt\s!width\zeropoint} % just a start
\def\strut{\relax\ifmmode\copy\else\unhcopy\fi\strutbox}
+% \unexpanded\def\strut
+% {\relax
+% \ifmmode\copy\else\dontleavehmode\unhcopy\fi\strutbox}
+
\let\normalstrut\strut
% The double \hbox construction enables us to \backtrack
@@ -889,7 +892,7 @@
\dosetstrut}
\unexpanded\def\setcharstrut#1%
- {\setbox\strutbox\hbox{#1}%
+ {\setbox\strutbox\hbox{#1}% hm, maybe hpack i.e. why apply fonts .. conceptual choice
\strutht\ht\strutbox
\strutdp\dp\strutbox
\dosetstrut}
@@ -940,7 +943,7 @@
\fi}
\def\spac_struts_set_hide
- {\setbox\strutbox\hbox
+ {\setbox\strutbox\hpack
{\vrule
\s!width \zeropoint
\s!height\strutht
@@ -949,7 +952,7 @@
\newconstant\c_strut_visual_mode
\def\spac_struts_set_vide
- {\setbox\strutbox\hbox % at some time this extra wrapping was needed
+ {\setbox\strutbox\hpack % at some time this extra wrapping was needed
{\spac_struts_vide_hbox to \zeropoint
{\ifcase\c_strut_visual_mode
\spac_struts_black
@@ -1008,6 +1011,10 @@
\dontleavehmode
\copy\strutbox}
+% \unexpanded\def\strut % slightly faster
+% {\relax
+% \ifmmode\copy\else\dontleavehmode\unhcopy\fi\strutbox}
+
\let\normalstrut\strut
\unexpanded\def\halfstrut
@@ -1059,7 +1066,7 @@
\def\spac_struts_setup[#1]%
{\edef\m_strut{#1}%
\ifcsname\??struts\m_strut\endcsname
- \csname\??struts\m_strut\endcsname % these are defined later
+ \lastnamedcs
\else
\setcharstrut\m_strut
\fi}
@@ -1067,16 +1074,16 @@
\unexpanded\def\synchronizestrut#1% no [] parsing, faster for internal
{\edef\m_strut{#1}%
\ifcsname\??struts\m_strut\endcsname
- \csname\??struts\m_strut\endcsname
+ \lastnamedcs
\else
\setcharstrut\m_strut
\fi}
\unexpanded\def\dosynchronizestrut#1% no [] parsing, faster for internal
{\ifcsname\??struts#1\endcsname
- \csname\??struts#1\endcsname
+ \lastnamedcs
\else
- \setcharstrut\m_strut
+ \setcharstrut{#1}%
\fi}
\unexpanded\def\showstruts % adapts .. is wrong
@@ -1132,6 +1139,12 @@
% when enabled, sigstruts will remove themselves if nothing
% goes inbetween
+%D For poractical reasons we define some boundary characters here.
+
+\unexpanded\def\leftboundary {\protrusionboundary\plusone}
+\unexpanded\def\rightboundary {\protrusionboundary\plustwo}
+\unexpanded\def\signalcharacter{\boundary\plusone\char\zerocount\boundary\plustwo} % not the same as strut signals
+
\newsignal\strutsignal \setfalse\sigstruts
\unexpanded\def\begstrut
@@ -1155,9 +1168,17 @@
\hskip-\strutsignal
\hskip\strutsignal}
+% \def\spac_struts_beg_normal
+% {\strut
+% \penalty\plustenthousand
+% \hskip\zeropoint}
+
\def\spac_struts_beg_normal
- {\strut
+ {\boundary\plusone
+ \strut
+ %\boundary\plusone
\penalty\plustenthousand
+ %\boundary\plusone
\hskip\zeropoint}
\unexpanded\def\endstrut
@@ -1188,11 +1209,20 @@
\strut
\fi}
+% \def\spac_struts_end_normal
+% {\removeunwantedspaces
+% \penalty\plustenthousand
+% \hskip\zeropoint
+% \strut}
+
\def\spac_struts_end_normal
{\removeunwantedspaces
\penalty\plustenthousand
+ %\boundary\plustwo
\hskip\zeropoint
- \strut}
+ %\boundary\plustwo
+ \strut
+ \boundary\plustwo}
% unsave:
%
@@ -1457,11 +1487,11 @@
\def\spac_grids_snap_value_set#1%
{%\gridsnappingtrue
- \ifcsname\??gridsnappers#1\endcsname\csname\??gridsnappers#1\endcsname\fi}
+ \begincsname\??gridsnappers#1\endcsname}
\def\spac_grids_snap_value_auto#1%
{\ifcsname\??gridsnappers#1\endcsname
- \csname\??gridsnappers#1\endcsname
+ \lastnamedcs
\else
\installsnapvalues\s!dummy{#1}%
\csname\??gridsnappers\s!dummy\endcsname
@@ -1602,7 +1632,7 @@
\fi
\doifelsenothing{#1}{\spac_grids_snap_value_set\v!normal}{\spac_grids_snap_value_set{#1}}%
\clf_vspacingsnap\nextbox\attribute\snapmethodattribute\relax
- \ifvbox\nextbox\vbox\else\hbox\fi attr \snapmethodattribute \zerocount {\box\nextbox}%
+ \ifvbox\nextbox\vbox\else\hbox\fi attr \snapmethodattribute \zerocount {\box\nextbox}% pack ?
\egroup}
\def\spac_grids_check_nop
@@ -1666,6 +1696,7 @@
\unexpanded\def\setgridbox#1#2#3% maybe ifgridsnapping at outer level
{\setbox#1\gridboxvbox to #3 % given size
{\forgetall
+ \resetvisualizers
\resetteststrut
\offinterlineskip
\hsize#2%
@@ -1725,14 +1756,16 @@
% experimental code, not yet interfaced:
% category:
-% 0 == discard discard
-% 1 == only if larger largest
-% 2 == force even if smaller force
-% 3 == only take penalty component penalty
-% 4 == add to existing skip add
-% 5 == disable (ignore following) disable
-% 6 == kill whitespace nowhite
-% 7 == discard previous back
+%
+% 0 == discard discard
+% 1 == only if larger largest
+% 2 == force even if smaller force
+% 3 == only take penalty component penalty
+% 4 == add to existing skip add
+% 5 == disable (ignore following) disable
+% 6 == kill whitespace nowhite
+% 7 == discard previous back
+% 10 == no topskip
%
% penalty: larger wins
% order: larger wins
@@ -1750,9 +1783,18 @@
{\dotripleempty\spac_vspacing_define_amount}
\def\spac_vspacing_define_amount[#1][#2][#3]% can be combined
- {\setvalue{\??vspacingamount#1}{\ifgridsnapping#3\else#2\fi}%
+ {\ifthirdargument
+ \setvalue{\??vspacingamount#1}{\ifgridsnapping#3\else#2\fi}%
+ \else\ifsecondargument
+ \setvalue{\??vspacingamount#1}{\ifgridsnapping\lineheight\else#2\fi}%
+ \else
+ \setvalue{\??vspacingamount#1}{\lineheight}%
+ \fi\fi
\clf_vspacingsetamount{#1}}
+\def\spac_vspacing_no_topskip % use grouped
+ {\attribute\skipcategoryattribute\plusten}
+
% \installcorenamespace{vspacingamountnormal}
% \installcorenamespace{vspacingamountgrid}
@@ -1905,6 +1947,22 @@
\def\directvspacing#1%
{\par\clf_vspacing{#1}}
+\def\directcheckedvspacing
+ {\ifinpagebody % somewhat weird
+ \expandafter\directvspacing
+ \else\ifconditional\c_spac_packed_blank
+ \doubleexpandafter\directvspacing
+ \else
+ \doubleexpandafter\gobbleoneargument
+ \fi\fi}
+
+\def\directdefaultvspacing
+ {\ifinpagebody % somewhat weird
+ \clf_vspacing{\currentvspacing}%
+ \else\ifconditional\c_spac_packed_blank
+ \clf_vspacing{\currentvspacing}%
+ \fi\fi}
+
% handy (and faster):
\unexpanded\def\directvpenalty#1%
@@ -1984,7 +2042,7 @@
\newdimen\d_spac_overlay
\def\spac_overlay_lines
- {\blank[\v!back,\v!overlay]%
+ {\directcheckedvspacing{\v!back,\v!overlay}% \blank[\v!back,\v!overlay]%
\nointerlineskip}
% \startitemize[n]
@@ -2085,34 +2143,66 @@
\unexpanded\def\vspace
{\dodoubleempty\spac_vspace_inject}
-\def\spac_vspace_inject[#1][#2]%
+% \def\spac_vspace_inject[#1][#2]% use \lastnamedcs
+% {\par
+% \ifvmode
+% \removelastskip
+% \vskip
+% \csname\??vspace
+% \ifsecondargument
+% \ifcsname\??vspace#1:#2\endcsname
+% #1:#2%
+% \else\ifcsname\??vspace:#2\endcsname
+% :#2%
+% \else
+% :\s!unknown
+% \fi\fi
+% \else\iffirstargument
+% \ifcsname\??vspace:#1\endcsname
+% :#1%
+% \else
+% :\s!unknown
+% \fi
+% \else
+% \ifcsname\??vspace:\s!default\endcsname
+% :\s!default
+% \else
+% :\s!unknown
+% \fi
+% \fi\fi
+% \endcsname
+% \relax
+% \fi}
+
+\def\spac_vspace_unknown
+ {\csname\??vspace:\s!unknown\endcsname}
+
+\def\spac_vspace_inject[#1][#2]% use \lastnamedcs
{\par
\ifvmode
\removelastskip
\vskip
- \csname\??vspace
- \ifsecondargument
- \ifcsname\??vspace#1:#2\endcsname
- #1:#2%
- \else\ifcsname\??vspace:#2\endcsname
- :#2%
- \else
- :\s!unknown
- \fi\fi
- \else\iffirstargument
- \ifcsname\??vspace:#1\endcsname
- :#1%
- \else
- :\s!unknown
- \fi
+ \ifsecondargument
+ \ifcsname\??vspace#1:#2\endcsname
+ \lastnamedcs
+ \else\ifcsname\??vspace:#2\endcsname
+ \lastnamedcs
\else
- \ifcsname\??vspace:\s!default\endcsname
- :\s!default
- \else
- :\s!unknown
- \fi
+ \spac_vspace_unknown
\fi\fi
- \endcsname
+ \else\iffirstargument
+ \ifcsname\??vspace:#1\endcsname
+ \lastnamedcs
+ \else
+ \spac_vspace_unknown
+ \fi
+ \else
+ \ifcsname\??vspace:\s!default\endcsname
+ \lastnamedcs
+ \else
+ \spac_vspace_unknown
+ \fi
+ \fi\fi
\relax
\fi}
@@ -2165,10 +2255,10 @@
\dp\nextbox\strutdp
\scratchwidth\dimexpr\wd\nextbox+\scratchdistance\relax
\ifx\m_spac_hanging_location\v!right
- \hangindent-\scratchwidth
+ \hangindent\ifconditional\displaylefttoright-\fi\scratchwidth
\rlap{\hskip\dimexpr\hsize-\wd\nextbox\relax\box\nextbox}%
\else
- \hangindent\scratchwidth
+ \hangindent\ifconditional\displaylefttoright\else-\fi\scratchwidth
\llap{\box\nextbox\hskip\scratchdistance}%
\fi
\ignorespaces}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/status-files.pdf b/Master/texmf-dist/tex/context/base/mkiv/status-files.pdf
new file mode 100644
index 00000000000..f5692f2c4f1
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/context/base/mkiv/status-lua.pdf b/Master/texmf-dist/tex/context/base/mkiv/status-lua.pdf
new file mode 100644
index 00000000000..65ec9e7c7ed
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/context/base/status-mkiv.lua b/Master/texmf-dist/tex/context/base/mkiv/status-mkiv.lua
index 45c2822565b..3fe9e0d8e30 100644
--- a/Master/texmf-dist/tex/context/base/status-mkiv.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/status-mkiv.lua
@@ -2615,12 +2615,6 @@ return {
lua = {
{
category = "lua",
- filename = "anch-pgr",
- loading = "anch-pgr",
- status = "okay",
- },
- {
- category = "lua",
filename = "anch-pos",
loading = "anch-pos",
status = "okay",
@@ -3574,6 +3568,11 @@ return {
},
{
category = "lua",
+ filename = "lpdf-res",
+ status = "todo",
+ },
+ {
+ category = "lua",
filename = "lpdf-col",
status = "todo",
},
@@ -4214,6 +4213,12 @@ return {
},
{
category = "lua",
+ filename = "page-otr",
+ loading = "page-otr",
+ status = "okay",
+ },
+ {
+ category = "lua",
filename = "page-flt",
status = "todo",
},
diff --git a/Master/texmf-dist/tex/context/base/status-mkiv.tex b/Master/texmf-dist/tex/context/base/mkiv/status-mkiv.tex
index 8685c97ad3f..8685c97ad3f 100644
--- a/Master/texmf-dist/tex/context/base/status-mkiv.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/status-mkiv.tex
diff --git a/Master/texmf-dist/tex/context/base/strc-bkm.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-bkm.lua
index 96b68b23697..a055a97a1c4 100644
--- a/Master/texmf-dist/tex/context/base/strc-bkm.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-bkm.lua
@@ -214,6 +214,7 @@ function bookmarks.place()
end
end
end
+-- inspect(levels)
bookmarks.finalize(levels)
function bookmarks.place() end -- prevent second run
end
diff --git a/Master/texmf-dist/tex/context/base/strc-bkm.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-bkm.mkiv
index 9688a1f93b1..5a8dba562f5 100644
--- a/Master/texmf-dist/tex/context/base/strc-bkm.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-bkm.mkiv
@@ -15,6 +15,8 @@
\registerctxluafile{strc-bkm}{1.001}
+% \enabledirectives[references.bookmarks.preroll]
+
\unprotect
%D Bookmarks are a very viewer dependent feature. They are mostly used
diff --git a/Master/texmf-dist/tex/context/base/strc-blk.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-blk.lua
index 0ababcfc09c..0ababcfc09c 100644
--- a/Master/texmf-dist/tex/context/base/strc-blk.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-blk.lua
diff --git a/Master/texmf-dist/tex/context/base/strc-blk.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-blk.mkiv
index fe259d223ce..fe259d223ce 100644
--- a/Master/texmf-dist/tex/context/base/strc-blk.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-blk.mkiv
diff --git a/Master/texmf-dist/tex/context/base/strc-con.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-con.lua
index 29a1c0cb36d..29a1c0cb36d 100644
--- a/Master/texmf-dist/tex/context/base/strc-con.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-con.lua
diff --git a/Master/texmf-dist/tex/context/base/strc-con.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-con.mkvi
index 11f6f758e0e..25e26bf7369 100644
--- a/Master/texmf-dist/tex/context/base/strc-con.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-con.mkvi
@@ -135,7 +135,7 @@
\dodoubleempty\strc_constructions_start_regular}
\unexpanded\def\strc_constructions_start_regular[#1][#2]%
- {\strc_constructions_register[\c!label={\constructionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=,#1][#2]%
+ {\strc_constructions_register[#2][\c!label={\constructionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=,#1]%
\csname\??constructionstarthandler\currentconstructionhandler\endcsname}
\unexpanded\def\strc_constructions_stop
@@ -184,7 +184,7 @@
%D Also, passing the title as argument has some history so we need to keep that as
%D well.
-\ifdefined\dotagsetconstruction \else \let\dotagsetconstruction\relax \fi
+% \ifdefined\dotagsetconstruction \else \let\dotagsetconstruction\relax \fi
\newtoks\everyconstruction
@@ -271,7 +271,7 @@
\unexpanded\setvalue{\??constructionstarthandler\v!construction}% this will be redone (reorganized) .. too much boxing
{\dostarttaggedchained\t!construction\currentconstruction\currentconstructionhash
- \dotagsetconstruction
+% \dotagsetconstruction
\constructionparameter\c!before
\begingroup
\edef\currentconstructionalternative{\constructionparameter\c!alternative}%
@@ -301,7 +301,9 @@
\ifdim\constructionsheaddistance=\zeropoint
\ifx\p_strc_constructions_width\v!broad
\constructionsheaddistance\emwidth
- \fi
+ \else\ifx\p_strc_constructions_width\v!line
+ \constructionsheaddistance\emwidth
+ \fi\fi
\fi
\fi
% inefficient and not always needed, for instance not with margins so we will make checkers
@@ -492,8 +494,8 @@
\ifconditional\c_strc_constructions_distance_none \else
\advance\ifx#1\v!flushleft\rightskip\else\leftskip\fi\constructionsheaddistance % only difference and wrong anyway
\fi
- \ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox}%
- \setbox\constructionheadbox\hbox{\box\constructionheadbox}% needed in case of e.g. a real big head font, see descriptions-006.tex
+ \flushconstructionheadbox}%
+ \setbox\constructionheadbox\hpack{\box\constructionheadbox}% needed in case of e.g. a real big head font, see descriptions-006.tex
\ht\constructionheadbox\strutht
\dp\constructionheadbox\strutdp}
@@ -507,8 +509,8 @@
\else
\setupalign[\p_strc_constructions_headalign]% use fast one
\fi
- \ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox}%
- \setbox\constructionheadbox\hbox{\box\constructionheadbox}% needed in case of e.g. a real big head font, see descriptions-006.tex
+ \flushconstructionheadbox}%
+ \setbox\constructionheadbox\hpack{\box\constructionheadbox}% needed in case of e.g. a real big head font, see descriptions-006.tex
\ht\constructionheadbox\strutht
\dp\constructionheadbox\strutdp}
@@ -529,6 +531,12 @@
\relax
\hangindent\ifx#1\v!right-\fi\constructionsheadwidth}
+% \unexpanded\def\flushconstructionheadbox
+% {\ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox}
+
+\unexpanded\def\flushconstructionheadbox
+ {\ifhbox\constructionheadbox\unhbox\else\box\fi\constructionheadbox}
+
% The setups. These only deal with placement of the descriptor and initializing the
% environment. The wrapping happens elsewhere.
@@ -562,9 +570,10 @@
\leftskip\dimexpr\leftconstructionskip+\constructionsheadwidth+\constructionsheaddistance\relax
\rightskip\rightconstructionskip\relax
\llap {
- \hbox to \leftskip {
+ \hpack to \leftskip {
\hskip\leftconstructionskip
- \copy\constructionheadbox\hss
+ \box\constructionheadbox % was copy
+ \hss
}
}
\nobreak
@@ -611,8 +620,8 @@
\noindent
\strc_constructions_set_pure_box\v!flushleft
\llap {
- \hbox to \constructionsheadwidth {
- \copy\constructionheadbox
+ \hpack to \constructionsheadwidth {
+ \box\constructionheadbox % was copy
\hss
}
\hskip\constructionsheaddistance
@@ -627,8 +636,9 @@
\strc_constructions_set_pure_box\v!flushright
\rlap {
\hskip\constructionsheaddistance
- \hbox to \constructionsheadwidth {
- \copy\constructionheadbox\hss
+ \hpack to \constructionsheadwidth {
+ \box\constructionheadbox % was copy
+ \hss
}
}
\useconstructionstyleandcolor\c!style\c!color
@@ -643,7 +653,7 @@
\strc_constructions_set_hang\v!left
\noindent
\llap {
- \vtop to \zeropoint {
+ \tpack to \zeropoint {
\box\constructionheadbox
}
}
@@ -660,9 +670,9 @@
\strc_constructions_set_hang\v!right
\noindent
\rlap {
- \hbox to \dimexpr\hsize-\leftskip-\rightskip\relax {
+ \hpack to \dimexpr\hsize-\leftskip-\rightskip\relax {
\hss
- \vtop to \zeropoint {
+ \tpack to \zeropoint {
\box\constructionheadbox
}
}
@@ -694,7 +704,7 @@
\startsetups[\??constructionrenderings:\v!margin]
\let\\=\crlf
\noindent
- \inmargin[\c!scope=\v!local]{\ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox}%
+ \inmargin[\c!scope=\v!local]{\flushconstructionheadbox}%
\useconstructionstyleandcolor\c!style\c!color
\ignorespaces
\stopsetups
@@ -702,7 +712,7 @@
\startsetups[\??constructionrenderings:\v!leftmargin]
\let\\=\crlf
\noindent
- \inleft[\c!scope=\v!local]{\ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox}%
+ \inleft[\c!scope=\v!local]{\flushconstructionheadbox}%
\useconstructionstyleandcolor\c!style\c!color
\ignorespaces
\stopsetups
@@ -710,7 +720,7 @@
\startsetups[\??constructionrenderings:\v!rightmargin]
\let\\=\crlf
\noindent
- \inright[\c!scope=\v!local]{\ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox}%
+ \inright[\c!scope=\v!local]{\flushconstructionheadbox}%
\useconstructionstyleandcolor\c!style\c!color
\ignorespaces
\stopsetups
@@ -718,7 +728,7 @@
\startsetups[\??constructionrenderings:\v!innermargin]
\let\\=\crlf
\noindent
- \ininner[\c!scope=\v!local]{\ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox}%
+ \ininner[\c!scope=\v!local]{\flushconstructionheadbox}%
\useconstructionstyleandcolor\c!style\c!color
\ignorespaces
\stopsetups
@@ -726,7 +736,7 @@
\startsetups[\??constructionrenderings:\v!outermargin]
\let\\=\crlf
\noindent
- \inouter[\c!scope=\v!local]{\ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox}%
+ \inouter[\c!scope=\v!local]{\flushconstructionheadbox}%
\useconstructionstyleandcolor\c!style\c!color
\ignorespaces
\stopsetups
@@ -744,6 +754,7 @@
\stopsetups
\startsetups[\??constructionrenderings:\v!serried]
+ % already set?
\edef\p_strc_constructions_width{\constructionparameter\c!width}% CHECK ! ! ! wrong parameter namespace
\doifelsesetups{\??constructionrenderings:\v!serried:\p_strc_constructions_width} {
\directsetup{\??constructionrenderings:\v!serried:\p_strc_constructions_width}
@@ -755,7 +766,7 @@
\startsetups[\??constructionrenderings:\v!serried:\v!fit]
\let\\=\crlf
\noindent
- \ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox % why copy? leftover?
+ \flushconstructionheadbox
\nobreak
\hskip\constructionsheaddistance\relax
\useconstructionstyleandcolor\c!style\c!color
@@ -765,10 +776,10 @@
\startsetups[\??constructionrenderings:\v!serried:\v!broad]
\let\\=\crlf
\noindent
- \ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox % why copy? leftover?
+ \flushconstructionheadbox
\ifconditional\c_strc_constructions_distance_none \else
\nobreak
- \hskip\constructionsheaddistance \!!plus .5\constructionsheaddistance \!!minus .25\constructionsheaddistance\relax
+ \hskip\constructionsheaddistance \s!plus .5\constructionsheaddistance \s!minus .25\constructionsheaddistance\relax
\fi
\useconstructionstyleandcolor\c!style\c!color
\ignorespaces
@@ -782,7 +793,7 @@
\let\\=\crlf
\noindent
\hbox to \constructionsheadwidth {
- \ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox
+ \flushconstructionheadbox
\hss
}
\nobreak
@@ -816,7 +827,13 @@
\s!plus .25\scratchdistance
\s!minus.25\scratchdistance
\fi
- \allowbreak % new
+ \ifhmode
+ \ifx\p_strc_constructions_width\v!line
+ \hfill\break
+ \else
+ \allowbreak
+ \fi
+ \fi
\useconstructionstyleandcolor\c!style\c!color
\ignorespaces
\stopsetups
@@ -827,7 +844,7 @@
\startsetups[\??constructionrenderings:\v!command]
\noindent
- \constructionparameter\c!headcommand{\ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox}
+ \constructionparameter\c!headcommand{\flushconstructionheadbox}
\useconstructionstyleandcolor\c!style\c!color
\ignorespaces
\stopsetups
@@ -860,14 +877,14 @@
\let\currentconstructionlistentry\!!zerocount
-\def\strc_constructions_register
+\unexpanded\def\strc_constructions_register
{\clf_doifelselisthasentry\numexpr\currentconstructionlistentry\relax
\strc_constructions_register_nop
\strc_constructions_register_yes}
% \def\strc_constructions_register{\strc_constructions_register_yes}
-\def\strc_constructions_register_nop[#1][#2]% #1=interfaced-settings, #2=optional user data
+\def\strc_constructions_register_nop[#1][#2]% #1=optional user data #2=interfaced-settings
%{\writestatus{constructions}{reusing \currentconstruction: \number\currentconstructionlistentry}}
{}
@@ -881,9 +898,9 @@
\let\currentconstructionsynchronize\relax
\let\currentconstructionattribute \attributeunsetvalue
-\def\strc_constructions_register_yes[#1][#2]% #1=interfaced-settings, #2=optional user data
+\def\strc_constructions_register_yes[#1][#2]% #1=optional user data #2=interfaced-settings
{\begingroup % similar to structure so we might generalize this
- \setupcurrentconstruction[#1]% % xdef's will become edef's
+ \setupcurrentconstruction[#2]% % xdef's will become edef's
\xdef\currentconstructionexpansion {\constructionparameter\c!expansion}%
\xdef\currentconstructionxmlsetup {\constructionparameter\c!xmlsetup}%
\xdef\currentconstructioncatcodes {\constructionparameter\s!catcodes}%
@@ -950,7 +967,6 @@
name {\currentconstructionmain}
% level structures.sections.currentlevel()
catcodes \catcodetable
- % \currentdirectionparameters
}
references {
internal \nextinternalreference
@@ -992,7 +1008,7 @@
\or
% symbol
\fi
- userdata {\detokenize{#2}}
+ userdata {\detokenize{#1}}
\relax
% \writestatus{constructions}{registering \currentconstruction: \number\scratchcounter}%
\clf_setinternalreference
@@ -1017,6 +1033,10 @@
{\edef\currentconstructionattribute {\clf_getinternallistreference#1}%
\edef\currentconstructionsynchronize{\ctxlatecommand{enhancelist(#1)}}}
+\def\reinstatecachedconstructionnumberentry#1% was xdef | #1 = cached index can be different from real
+ {\edef\currentconstructionattribute {\clf_getinternalcachedlistreference#1}% destination
+ \edef\currentconstructionsynchronize{\ctxlatecommand{enhancelist(#1)}}}
+
\installstructurelistprocessor{construction}{\usestructurelistprocessor{number+title}}
% Helpers:
diff --git a/Master/texmf-dist/tex/context/base/strc-def.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-def.mkiv
index b4d2a5feadf..962c46b485b 100644
--- a/Master/texmf-dist/tex/context/base/strc-def.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-def.mkiv
@@ -65,8 +65,16 @@
\setsectionblock [\v!bodypart] % default
+% \appendtoks
+% \setsectionblock[\v!bodypart]% default
+% \to \everyjob
+%
+% \appendtoks
+% \clf_setinitialsectionblock{\v!bodypart}%
+% \to \everystarttext
+
\appendtoks
- \setsectionblock [\v!bodypart]% default
+ \clf_setinitialsectionblock{\v!bodypart}%
\to \everyjob
% \definesection (could become \definehead with one parameter)
diff --git a/Master/texmf-dist/tex/context/base/strc-des.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-des.mkvi
index 3557000f91d..4376d9cdcd5 100644
--- a/Master/texmf-dist/tex/context/base/strc-des.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-des.mkvi
@@ -92,8 +92,6 @@
% start-stop one. Also, passing the title as argument has some
% history so we need to keep that as well.
-\ifdefined\dotagsetdescription \else \let\dotagsetdescription\relax \fi
-
% \startdescription [reference] text \stopdescription
% \startdescription [reference]{title} text \stopdescription
% \startdescription [title=,title=,reference=] text \stopdescription
@@ -109,7 +107,7 @@
{\doifelseassignment{#1}\strc_descriptions_start_yes_assignment\strc_descriptions_start_yes_reference[#1]}
\unexpanded\def\strc_descriptions_start_yes_assignment[#1]% todo userdata
- {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=,#1][]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=,#1]%
\csname\??constructionstarthandler\currentconstructionhandler\endcsname}
\unexpanded\def\strc_descriptions_start_yes_reference
@@ -126,11 +124,11 @@
\strc_descriptions_start_yes_normal[#1]}}
\unexpanded\def\strc_descriptions_start_yes_titled_indeed[#1]#2% todo userdata
- {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=][]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=]%
\csname\??constructionstarthandler\currentconstructionhandler\endcsname}
\unexpanded\def\strc_descriptions_start_yes_normal[#1]% todo userdata
- {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title=,\c!bookmark=,\c!list=][]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title=,\c!bookmark=,\c!list=]%
\csname\??constructionstarthandler\currentconstructionhandler\endcsname}
\unexpanded\def\strc_descriptions_start_nop
@@ -147,11 +145,11 @@
\strc_descriptions_start_nop_normal}}%
\unexpanded\def\strc_descriptions_start_nop_titled_indeed#1%
- {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#1},\c!bookmark=,\c!list=][]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#1},\c!bookmark=,\c!list=]%
\csname\??constructionstarthandler\currentconstructionhandler\endcsname}
\unexpanded\def\strc_descriptions_start_nop_normal
- {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=][]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=]%
\csname\??constructionstarthandler\currentconstructionhandler\endcsname}
\unexpanded\def\strc_descriptions_stop
@@ -173,7 +171,7 @@
\fi}
\unexpanded\def\strc_descriptions_yes_titled[#1]#2%
- {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=][]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=]%
\csname\??constructioncommandhandler\currentconstructionhandler\endcsname}
\unexpanded\def\strc_descriptions_yes_titled[#1]%
@@ -183,11 +181,11 @@
\strc_descriptions_yes_normal[#1]}}
\unexpanded\def\strc_descriptions_yes_titled_indeed[#1]#2%
- {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=][]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=]%
\csname\??constructioncommandhandler\currentconstructionhandler\endcsname}
\unexpanded\def\strc_descriptions_yes_normal[#1]%
- {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title=,\c!bookmark=,\c!list=][]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title=,\c!bookmark=,\c!list=]%
\csname\??constructioncommandhandler\currentconstructionhandler\endcsname}
\unexpanded\def\strc_descriptions_nop
@@ -204,11 +202,11 @@
\strc_descriptions_nop_normal}}
\unexpanded\def\strc_descriptions_nop_titled_indeed#1%
- {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#1},\c!bookmark=,\c!list=][]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#1},\c!bookmark=,\c!list=]%
\csname\??constructioncommandhandler\currentconstructionhandler\endcsname}
\unexpanded\def\strc_descriptions_nop_normal
- {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=][]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=]%
\csname\??constructioncommandhandler\currentconstructionhandler\endcsname}
%D Handlers:
diff --git a/Master/texmf-dist/tex/context/base/strc-doc.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-doc.lua
index 029d68a9dc2..885e2de0ba3 100644
--- a/Master/texmf-dist/tex/context/base/strc-doc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-doc.lua
@@ -115,6 +115,10 @@ end
-- -- -- sections -- -- --
+-- This is just a quick way to have access to prefixes and the numbers (section entry in a ref)
+-- is not the list entry. An alternative is to use the list index of the last numbered section. In
+-- that case we should check a buse of the current structure.
+
local collected = allocate()
local tobesaved = allocate()
@@ -236,6 +240,24 @@ function sections.setblock(name,settings)
return block
end
+local jobvariables = job.variables
+local pushed_order = { }
+local pushed_done = { }
+
+jobvariables.tobesaved.sectionblockorder = pushed_order
+
+-- function sections.order()
+-- return jobvariables.collected.sectionblockorder or pushed_order -- so we have a first pass list too
+-- end
+
+function sections.setinitialblock(default)
+ local order = jobvariables.collected.sectionblockorder or pushed_order
+ local name = #order > 0 and order[1] or default or "bodypart"
+ context.setsectionblock { name }
+ -- interfaces.setmacro("currentsectionblock",name)
+ -- sections.setblock(name,{})
+end
+
function sections.pushblock(name,settings)
counters.check(0) -- we assume sane usage of \page between blocks
local block = name or data.block
@@ -243,6 +265,11 @@ function sections.pushblock(name,settings)
data.block = block
sectionblockdata[block] = settings
documents.reset()
+ if not pushed_done[name] then
+ pushed_done[name] = true
+ local nofpushed = #pushed_order + 1
+ pushed_order[nofpushed] = name
+ end
return block
end
@@ -1090,6 +1117,13 @@ implement {
}
implement {
+ name = "setinitialsectionblock",
+ actions = sections.setinitialblock,
+ arguments = "string",
+ -- onlyonce = true,
+}
+
+implement {
name = "pushsectionblock",
actions = sections.pushblock,
arguments = { "string", { { "bookmark" } } }
diff --git a/Master/texmf-dist/tex/context/base/strc-doc.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-doc.mkiv
index c453f199ef8..c453f199ef8 100644
--- a/Master/texmf-dist/tex/context/base/strc-doc.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-doc.mkiv
diff --git a/Master/texmf-dist/tex/context/base/strc-enu.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-enu.mkvi
index b76bc0067e1..832bdaf82af 100644
--- a/Master/texmf-dist/tex/context/base/strc-enu.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-enu.mkvi
@@ -285,8 +285,8 @@
\unexpanded\def\strc_enumerations_inject_extra_text
{\ifconditional\c_strc_constructions_title_state
\clf_doifelselisthastitle{\currentconstructionmain}\numexpr\currentconstructionlistentry\relax
- \donothing
\strc_enumerations_inject_extra_text_indeed
+ \donothing
\fi}
\unexpanded\def\strc_enumerations_inject_text
diff --git a/Master/texmf-dist/tex/context/base/strc-flt.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-flt.lua
index 466fd515e04..466fd515e04 100644
--- a/Master/texmf-dist/tex/context/base/strc-flt.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-flt.lua
diff --git a/Master/texmf-dist/tex/context/base/strc-flt.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi
index be2958fbfc3..e83e036fa75 100644
--- a/Master/texmf-dist/tex/context/base/strc-flt.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi
@@ -157,6 +157,8 @@
\c!ntop=2,
\c!nbottom=0,
\c!nlines=4, % used?
+ \c!topoffset=\zeropoint,
+ \c!bottomoffset=\zeropoint,
%\c!local=,
%\c!bottombefore=, % e.g. \vfill
%\c!bottomafter=,
@@ -184,16 +186,36 @@
\unexpanded\def\definefloat
{\dotripleempty\strc_floats_define}
-\def\strc_floats_define[#1][#2][#3]% #1=naam #2=meervoud #3=parent
+\def\strc_floats_define[#1][#2][#3]% name+plural+parent | name+parent+settings
{\ifthirdargument
- \strc_floats_define_cloned[#1][#2][#3]%
+ \doifassignmentelse{#3}
+ {\strc_floats_define_b[#1][#2][#3]}%
+ {\strc_floats_define_a[#1][#2][#3]}%
\else\ifsecondargument
- \strc_floats_define_normal[#1][#2]%
+ \doifelsecommandhandler\??float{#2}%
+ {\strc_floats_define_a[#1][#1][#2]}%
+ {\strc_floats_define_c[#1][#2]}%
\else
- \strc_floats_define_normal[#1][#1]%
+ \strc_floats_define_c[#1][#1]%
\fi\fi}
-\def\strc_floats_define_normal[#1][#2]%
+\def\strc_floats_define_a[#1][#2][#3]% name names parent
+ {\definefloatcaption[#1][#3]%
+ \definecounter[#1][#3]%
+ \definelist[#1][#3]%
+ \copylabeltext[#1=#3]%
+ \strc_floats_define_saved[#1][#3]%
+ \strc_floats_define_commands{#1}{#2}}
+
+\def\strc_floats_define_b[#1][#2][#3]% name parent settings
+ {\definefloatcaption[#1][#2]%
+ \definecounter[#1][#2]%
+ \definelist[#1][#2]%
+ \copylabeltext[#1=#2]%
+ \strc_floats_define_saved[#1][#2][#3]%
+ \strc_floats_define_commands{#1}{#1}}
+
+\def\strc_floats_define_c[#1][#2]% name names
{\registerfloatcaptioncounter{#1}%
\definefloatcaption[#1]%
\definecounter[#1]%
@@ -203,15 +225,6 @@
\strc_floats_define_saved[#1]%
\strc_floats_define_commands{#1}{#2}}
-\def\strc_floats_define_cloned[#1][#2][#3]%
- {\definefloatcaption[#1][#3]%
- \definecounter[#1][#3]%
- \definelist[#1][#3]%
- \copylabeltext[#1=#3]%
- %\presetheadtext[#2=\Word{#2}]%
- \strc_floats_define_saved[#1][#3]%
- \strc_floats_define_commands{#1}{#2}}
-
\def\strc_floats_define_commands#1#2%
{\setuvalue {\e!place\e!listof#2}{\dodoubleempty\strc_lists_place[#1]}% call will change
\setuvalue {\e!complete\e!listof#2}{\dotripleempty\strc_lists_complete_indeed[#1][#2]}% call will change
@@ -256,21 +269,25 @@
\namedtaggedlabeltexts
\t!floatlabel \currentfloat
\t!floatnumber\currentfloat
- {\floatcaptionparameter\c!numbercommand
+ {\begstrut
+ \floatcaptionparameter\c!numbercommand
{\clf_savedlistprefixednumber{\currentfloat}\currentfloatnumber\relax
- \thecurrentfloatnumbersuffix}}%
+ \thecurrentfloatnumbersuffix}%
+ \endstrut}%
\fi
\fi \fi}
\unexpanded\def\thecurrentfloatcaption
- {\ifnofloatcaption \else
+ {\ifnofloatcaption \else \ifemptyfloatcaption \else
\ifx\currentfloatnumber\relax\else
\dostarttagged\t!floattext\empty
+ \begstrut
\floatcaptionparameter\c!textcommand
- {\clf_savedlisttitle{\currentfloat}\currentfloatnumber\relax}%
+ {\clf_savedlisttitle{\currentfloat}\numexpr\currentfloatnumber\relax}%
+ \endstrut
\dostoptagged
\fi
- \fi}
+ \fi \fi}
%D Captions.
@@ -314,9 +331,12 @@
\gdef\lastcaptiontag{\strut\thecurrentfloatnumber}% was xdef ... needs checking
\begingroup
\usefloatcaptionstyleandcolor\c!style\c!color
+ \clf_doifelselisthastitle{\currentfloat}\numexpr\currentfloatnumber\relax
+ \donothing
+ \emptyfloatcaptiontrue
\ifnofloatnumber
\else
- \hbox{\usefloatcaptionstyleandcolor\c!headstyle\c!headcolor\strut\thecurrentfloatnumber}%
+ \hbox{\usefloatcaptionstyleandcolor\c!headstyle\c!headcolor\thecurrentfloatnumber}%
\ifnofloatcaption \else \ifemptyfloatcaption \else
\doifelsenothing{\floatcaptionparameter\c!spaceinbetween}
{\scratchskip\floatcaptionparameter\c!distance\relax
@@ -331,7 +351,7 @@
\usefloatcaptionstyleandcolor\c!textstyle\c!textcolor
\global\d_strc_floats_caption_height\strutheight
\global\d_strc_floats_caption_depth \strutdepth
- \begstrut\thecurrentfloatcaption\endstrut\endgraf
+ \thecurrentfloatcaption\endgraf
\fi
\endgroup
\doifsomething{\floatcaptionparameter\c!spaceafter}{\blank[\floatcaptionparameter\c!spaceafter]}}
@@ -383,7 +403,7 @@
\fi
\else
\global\emptyfloatcaptionfalse
- \setbox\b_strc_floats_caption\hbox{\hskip\leftskip\box\b_strc_floats_caption}%
+ \setbox\b_strc_floats_caption\hpack{\hskip\leftskip\box\b_strc_floats_caption}%
\fi
\fi}
@@ -509,12 +529,22 @@
\strc_floats_set_current_tag{#tag}%
\dodoubleempty\strc_floats_place_indeed}
+\newtoks\c_floats_every_table_float
+
+\appendtoks
+ \edef\floatlocation{\v!force,\v!always,\floatlocation}%
+ \setupfloat[\c!spacebefore=\v!none,\c!spaceafter=\v!none]%
+\to \c_floats_every_table_float
+
\def\strc_floats_place_indeed[#location][#reference]#caption%
{\strc_floats_reset_variables
\edef\floatlocation{#location}%
\ifx\floatlocation\empty
\edef\floatlocation{\floatparameter\c!default}% beware of a clash between alignment locations
\fi
+ \ifintable
+ \the\c_floats_every_table_float
+ \fi
\strc_floats_analyze_location
% todo: use \lets
\setupcurrentfloatcaption[\c!reference={#reference},\c!title={#caption},\c!marking=,\c!list=,\c!bookmark=]%
@@ -552,10 +582,14 @@
\def\strc_floats_start_place_indeed[#settings][#userdata]%
{\strc_floats_reset_variables
\edef\savedfloatlocation{\floatcaptionparameter\c!location}%
+ \setexpandedfloatcaptionparameter\c!topoffset {\floatparameter\c!topoffset}%
+ \setexpandedfloatcaptionparameter\c!bottomoffset{\floatparameter\c!bottomoffset}%
\setupcurrentfloatcaption[\c!location=,\c!reference=,\c!title=,\c!marking=,\c!list=,\c!bookmark=,#settings]%
+ \setexpandedfloatparameter\c!topoffset {\floatcaptionparameter\c!topoffset}%
+ \setexpandedfloatparameter\c!bottomoffset{\floatcaptionparameter\c!bottomoffset}%
\def\m_strc_floats_saved_userdata{#2}%
\edef\floatlocation{\floatcaptionparameter\c!location}%
- \setupcurrentfloatcaption[\c!location=\savedfloatlocation]%
+ \setfloatcaptionparameter\c!location{\savedfloatlocation}% not expanded
\ifx\floatlocation\empty
\edef\floatlocation{\floatparameter\c!default}%
\fi
@@ -741,6 +775,8 @@
{\global\d_page_sides_topskip \zeropoint
\global\d_page_sides_bottomskip\zeropoint
\global\d_strc_floats_margin \zeropoint}%
+ \global\advance\d_page_sides_topskip \floatparameter\c!topoffset
+ \global\advance\d_page_sides_bottomskip\floatparameter\c!bottomoffset
\else
\processallactionsinset
[\floatlocation]
@@ -848,9 +884,11 @@
\ifnofloatnumber \else \ifnofloatcaption \else
\ifx\currentfloatgroup\empty
% independent
+ \iftrialtypesetting\strc_counters_save\currentfloatcounter\fi
\strc_counters_increment\currentfloatcounter
\else\ifcase\strc_floats_group_index
% first in group
+ \iftrialtypesetting\strc_counters_save\currentfloatcounter\fi
\strc_counters_increment\currentfloatcounter
\else
% next in group
@@ -880,22 +918,23 @@
\global\setfalse\usesamefloatnumber % one shot
% check float box
\strc_floats_set_natural_dimensions\nextbox
- \global\setbox\floatbox\vbox{\floatparameter\c!command{\box\nextbox}}%
+ \global\setbox\floatbox\vbox{\floatparameter\c!command{\box\nextbox}}% can be anything so no pack
\strc_floats_set_natural_dimensions\floatbox
\ifdim\htdp\floatbox=\zeropoint
\showmessage\m!floatblocks{11}\empty
- \global\setbox\floatbox\vbox
+ \global\setbox\floatbox\vpack
{\dostarttagged\t!floatcontent\empty
\strc_floats_place_empty_box
\dostoptagged}%
\fi
% deal with lack of caption
- \global\setbox\floatbox\vbox \floatcaptionattribute
+ \global\setbox\floatbox\vpack \floatcaptionattribute
{\doifelsemainfloatbody\currentfloatsynchronize\donothing
\unvbox\floatbox
\ifnofloatcaption
\vss
\fi}% gets rid of the depth (unless tabulate)
+ \iftrialtypesetting\strc_counters_restore\currentfloatcounter\fi
\egroup
% place the float
\strc_floats_set_box
@@ -931,13 +970,13 @@
\ifsinglesided
\doubleexpandafter\firstoftwoarguments
\else
- \doubleexpandafter\doifelseoddfloatpage
+ \doubleexpandafter\doifelseoddpagefloat
\fi
\else
\expandafter\firstoftwoarguments
\fi}
-\def\doifelseoddfloatpage
+\def\doifelseoddpagefloat
{\ifodd\purenumber\strc_float_realpage\space
\expandafter\firstoftwoarguments
\else
@@ -1062,7 +1101,7 @@
{\global\d_page_sides_shift \zeropoint % duplicate
\global\d_page_sides_maximum\zeropoint\relax % duplicate
\ifdim\d_page_sides_downshift=\zeropoint\else
- \global\setbox\floatbox\vbox
+ \global\setbox\floatbox\vpack
{\vskip\d_page_sides_downshift
\nointerlineskip
\box\floatbox}%
@@ -1098,13 +1137,13 @@
\fi}
\def\strc_floats_realign_floatbox_horizontal_one
- {\global\setbox\floatbox\hbox to \scratchwidth
+ {\global\setbox\floatbox\hpack to \scratchwidth
{\doifnotinset\v!right\floatlocation\hss
\box\floatbox
\doifnotinset\v!left \floatlocation\hss}}
\def\strc_floats_realign_floatbox_horizontal_two
- {\global\setbox\floatbox\hbox to \scratchwidth
+ {\global\setbox\floatbox\hpack to \scratchwidth
{\doifnot{\floatparameter\c!location}\v!left \hss
\box\floatbox
\doifnot{\floatparameter\c!location}\v!right\hss}}
@@ -1143,23 +1182,44 @@
\unexpanded\def\betweenfloatblanko % assumes that spaceafter is present
{\blank[\rootfloatparameter\c!spacebefore]} % or v!back,....
+% keep as old 1
+%
% \unexpanded\def\doplacefloatbox % used elsewhere
% {%\forgetall % NO
% \whitespace
% \blank[\rootfloatparameter\c!spacebefore]
% \page_otr_command_flush_float_box
% \blank[\rootfloatparameter\c!spaceafter]}
+%
+% keep as old 2
+%
+% \unexpanded\def\doplacefloatbox % used elsewhere
+% {%\forgetall % NO
+% \whitespace
+% \blank[\rootfloatparameter\c!spacebefore]
+% \nointerlineskip
+% \flushnotes % new per 2014-05-29 : todo: move them up in the mvl
+% \nointerlineskip
+% \page_otr_command_flush_float_box
+% \nointerlineskip
+% \blank[\rootfloatparameter\c!spaceafter]}
+
+\def\strc_floats_apply_skip#1%
+ {\edef\m_space{\rootfloatparameter#1}%
+ \ifx\m_space\empty \else\ifx\m_space\v!none \else
+ \directvspacing\m_space
+ \fi\fi}
\unexpanded\def\doplacefloatbox % used elsewhere
{%\forgetall % NO
\whitespace
- \blank[\rootfloatparameter\c!spacebefore]
+ \strc_floats_apply_skip\c!spacebefore
\nointerlineskip
\flushnotes % new per 2014-05-29 : todo: move them up in the mvl
\nointerlineskip
\page_otr_command_flush_float_box
- \nointerlineskip
- \blank[\rootfloatparameter\c!spaceafter]}
+ % \nointerlineskip % interferes with depth of caption
+ \strc_floats_apply_skip\c!spaceafter}
% test case:
%
@@ -1199,7 +1259,7 @@
{\egroup
\doifnotinset\v!tall\floatlocation
{\floattextheight\ifdim\ht\floattext<\floatheight\floatheight\else\ht\floattext\fi}%
- \setbox\floatbox\vbox to \floattextheight
+ \setbox\floatbox\vpack to \floattextheight
{\hsize\floatwidth
\doifelseinset\v!both\floatlocation
{\doifelseinset\v!low\floatlocation
@@ -1208,7 +1268,7 @@
{\vfill\box\floatbox\vfill}
{\box\floatbox\vfill}}}
{\box\floatbox\vfill}}%
- \setbox\floattext\vbox to \floattextheight
+ \setbox\floattext\vpack to \floattextheight
{\hsize\floattextwidth
\doifelseinset\v!low\floatlocation
{\vfill
@@ -1222,11 +1282,11 @@
\box\floattext
\vfill}}}%
\doifelseinset\v!right\floatlocation
- {\setbox\floatbox\hbox to \hsize
+ {\setbox\floatbox\hpack to \hsize
{\box\floattext
\hfill
\box\floatbox}}
- {\setbox\floatbox\hbox to \hsize
+ {\setbox\floatbox\hpack to \hsize
{\box\floatbox
\hfill
\box\floattext}}%
@@ -1280,7 +1340,7 @@
\forgetall
\postponenotes
\dontcomplain
- \setbox\b_strc_floats_content\vbox{\borderedfloatbox}%
+ \setbox\b_strc_floats_content\vpack{\borderedfloatbox}%
\let\strc_floats_align_content\strc_floats_align_content_indeed
\let\strc_floats_align_caption\strc_floats_align_caption_indeed
\strc_floats_check_caption_content
@@ -1296,7 +1356,7 @@
% todo: installable maken, variant/method=auto vs macro
\strc_floats_prepare_page_caption
%\page_backgrounds_add_local_to_box\b_strc_floats_content
- \setbox\b_strc_floats_caption\hbox
+ \setbox\b_strc_floats_caption\hbox % text
{\floatcaptionparameter\c!command{\box\b_strc_floats_caption}}%
\moveboxontogrid\b_strc_floats_caption{\floatcaptionparameter\c!grid}\d_strc_floats_caption_height
%\page_backgrounds_add_local_to_box\b_strc_floats_caption
@@ -1311,13 +1371,13 @@
\doifnotinset\v!margin\floatlocation % brr, really needed! see wm
{\postcenterfloatbox\d_strc_floats_content}%
\else
- \global\setbox\floatbox\vbox
+ \global\setbox\floatbox\vpack
{\rotate[\c!rotation=\number\c_strc_floats_rotation]{\box\floatbox}}%
\fi
\egroup}
\def\strc_floats_prepare_no_caption
- {\global\setbox\floatbox\vbox % pas op als wd groter dan hsize
+ {\global\setbox\floatbox\vpack % pas op als wd groter dan hsize
{\ifinsidecolumns\ifdim\wd\b_strc_floats_content>\hsize
\let\strc_floats_align_content\relax
\fi\fi
@@ -1416,70 +1476,6 @@
\fi
\strc_floats_make_complete_caption}}
-% \def\strc_floats_prepare_stack_caption_auto
-% {\ifx\p_strc_floats_caption_align\empty \else
-% \doifnotinset\v!middle\p_strc_floats_caption_align{\let\captionovershoot\!!zeropoint}%
-% \fi
-% \edef\captionhsize{\the\wd\b_strc_floats_content}%
-% \ifdim\captionhsize>\hsize
-% % float is wider than \hsize
-% \setbox\b_strc_floats_caption\vbox
-% {\settrialtypesetting
-% \strc_floats_caption_set_align
-% \hsize\captionhsize
-% \notesenabledfalse
-% \strc_floats_make_complete_caption}%
-% \ifdim\ht\scratchbox>\lineheight % more lines
-% \setbox\b_strc_floats_caption\vbox
-% {\strc_floats_caption_set_align
-% \hsize\dimexpr\captionhsize-\captionovershoot\relax
-% \ifdim\hsize<\captionminwidth\relax
-% \hsize\captionhsize
-% \fi
-% \strc_floats_make_complete_caption}%
-% \else
-% \setbox\b_strc_floats_caption\vbox
-% {\strc_floats_caption_set_align
-% \hsize\captionhsize
-% \strc_floats_make_complete_caption}%
-% \fi
-% \else
-% % float is smaller of equal to \hsize
-% \ifdim\captionhsize<\captionminwidth\relax
-% \scratchdimen\captionminwidth % float smaller than min width
-% \edef\captionhsize{\the\scratchdimen}%
-% \fi
-% \setbox\scratchbox\vbox % test with overshoot
-% {\settrialtypesetting
-% \scratchdimen\dimexpr\captionhsize+\captionovershoot+3\emwidth\relax % 3em is an average word length
-% \ifdim\scratchdimen<\hsize
-% \hsize\scratchdimen
-% \fi
-% \notesenabledfalse
-% \strc_floats_make_complete_caption}%
-% \ifdim\ht\scratchbox>\lineheight
-% % at least an average word longer than a line
-% \setbox\b_strc_floats_caption\vbox
-% {\strc_floats_caption_set_align
-% \scratchdimen\dimexpr\captionhsize+\captionovershoot\relax
-% \ifdim\scratchdimen<\hsize
-% \hsize\scratchdimen
-% \fi
-% \strc_floats_make_complete_caption}%
-% \else\ifx\p_strc_floats_caption_align\empty
-% \setbox\b_strc_floats_caption\vbox
-% {\strc_floats_caption_set_align
-% \hsize\captionhsize
-% \raggedcenter % overloads
-% \strc_floats_make_complete_caption}%
-% \else
-% \setbox\b_strc_floats_caption\vbox
-% {\strc_floats_caption_set_align
-% \hsize\captionhsize
-% \strc_floats_make_complete_caption}%
-% \fi\fi
-% \fi}
-
\def\strc_floats_prepare_stack_caption_auto
{\ifx\p_strc_floats_caption_align\empty \else
\doifnotinset\v!middle\p_strc_floats_caption_align{\let\captionovershoot\!!zeropoint}%
@@ -1555,7 +1551,7 @@
{\strc_floats_align_content{\box\b_strc_floats_content}}
\def\strc_floats_build_box_next_right#1%
- {\ifconditional\c_strc_floats_par_float \hbox \else \expandafter \strc_floats_align_content \fi
+ {\ifconditional\c_strc_floats_par_float \hbox \else \expandafter \strc_floats_align_content \fi % skip, no pack
{\d_strc_float_temp_height\ht\b_strc_floats_content
\box\b_strc_floats_content
\doifnotinset\v!hang{\floatcaptionparameter\c!location}
@@ -1563,7 +1559,7 @@
\vbox to\d_strc_float_temp_height{#1}}}
\def\strc_floats_build_box_next_left#1%
- {\ifconditional\c_strc_floats_par_float \hbox \else \expandafter \strc_floats_align_content \fi
+ {\ifconditional\c_strc_floats_par_float \hbox \else \expandafter \strc_floats_align_content \fi % skip, no pack
{\d_strc_float_temp_height\ht\b_strc_floats_content
\vbox to\d_strc_float_temp_height{#1}%
\doifnotinset\v!hang{\floatcaptionparameter\c!location}
@@ -1577,23 +1573,23 @@
{\doifelserightpagefloat\strc_floats_build_box_next_left\strc_floats_build_box_next_right}
\def\strc_floats_build_box_next_right_hang#1%
- {\ifconditional\c_strc_floats_par_float \hbox \else \expandafter \strc_floats_align_content \fi
+ {\ifconditional\c_strc_floats_par_float \hpack \else \expandafter \strc_floats_align_content \fi
{\d_strc_float_temp_height\ht\b_strc_floats_content
\box\b_strc_floats_content
\vbox to\d_strc_float_temp_height{#1}}}
\def\strc_floats_build_box_next_left_hang#1%
- {\ifconditional\c_strc_floats_par_float \hbox \else \expandafter \strc_floats_align_content \fi
+ {\ifconditional\c_strc_floats_par_float \hpack \else \expandafter \strc_floats_align_content \fi
{\d_strc_float_temp_height\ht\b_strc_floats_content
\vbox to\d_strc_float_temp_height{#1}%
\box\b_strc_floats_content}}
\def\strc_floats_build_box_next_right_margin_indeed#1#2%
{\ifconditional\c_strc_floats_par_float
- \hbox\bgroup
- \d_strc_float_temp_height\ht\b_strc_floats_content
- \box\b_strc_floats_content
- \hsmash{\hskip#1\vbox to\d_strc_float_temp_height{#2}}%
+ \hpack\bgroup
+ \d_strc_float_temp_height\ht\b_strc_floats_content
+ \box\b_strc_floats_content
+ \hsmash{\hskip#1\vbox to\d_strc_float_temp_height{#2}}%
\egroup
\else
\begingroup
@@ -1605,10 +1601,10 @@
\def\strc_floats_build_box_next_left_margin_indeed#1#2%
{\ifconditional\c_strc_floats_par_float
- \hbox\bgroup
- \d_strc_float_temp_height\ht\b_strc_floats_content
- \hsmash{\hskip-\dimexpr#1+\wd\b_strc_floats_caption\relax\vbox to\d_strc_float_temp_height{#2}}%
- \box\b_strc_floats_content
+ \hpack\bgroup
+ \d_strc_float_temp_height\ht\b_strc_floats_content
+ \hsmash{\hskip-\dimexpr#1+\wd\b_strc_floats_caption\relax\vbox to\d_strc_float_temp_height{#2}}%
+ \box\b_strc_floats_content
\egroup
\else
\begingroup
@@ -1712,14 +1708,14 @@
\def\strc_floats_build_box_top_stack_normal_content
{\d_strc_float_temp_width\wd\b_strc_floats_content
\ifconditional\c_strc_floats_par_float
- \hbox{\strc_floats_locate_side_float{\box\b_strc_floats_caption}}%
+ \hpack{\strc_floats_locate_side_float{\box\b_strc_floats_caption}}%
\strc_floats_between_stack
- \hbox{\hbox{\box\b_strc_floats_content}}%
+ \hpack{\hbox{\box\b_strc_floats_content}}%
\else
\page_otr_command_set_float_hsize
- \hbox{\strc_floats_locate_text_float{\box\b_strc_floats_caption}}
+ \hpack{\strc_floats_locate_text_float{\box\b_strc_floats_caption}}
\strc_floats_between_stack
- \hbox{\strc_floats_align_content{\box\b_strc_floats_content}}%
+ \hpack{\strc_floats_align_content{\box\b_strc_floats_content}}%
\fi}
\def\strc_floats_build_box_bottom_stack_normal_overlay
@@ -1728,14 +1724,14 @@
\def\strc_floats_build_box_bottom_stack_normal_content
{\d_strc_float_temp_width\wd\b_strc_floats_content
\ifconditional\c_strc_floats_par_float
- \hbox{\hbox{\box\b_strc_floats_content}}%
+ \hpack{\hpack{\box\b_strc_floats_content}}%
\strc_floats_between_stack
- \hbox{\strc_floats_locate_side_float{\box\b_strc_floats_caption}}%
+ \hpack{\strc_floats_locate_side_float{\box\b_strc_floats_caption}}%
\else
\page_otr_command_set_float_hsize
- \hbox{\strc_floats_align_content{\box\b_strc_floats_content}}%
+ \hpack{\strc_floats_align_content{\box\b_strc_floats_content}}%
\strc_floats_between_stack
- \hbox{\strc_floats_locate_text_float{\box\b_strc_floats_caption}}%
+ \hpack{\strc_floats_locate_text_float{\box\b_strc_floats_caption}}%
\fi}
\def\strc_floats_build_box_top_stack_normal
@@ -1755,7 +1751,7 @@
\ifconditional\c_strc_floats_par_float
\strc_floats_locate_side_float{\box\b_strc_floats_caption}%
\vss\strc_floats_between_stack
- \hbox{\box\b_strc_floats_content}%
+ \hpack{\box\b_strc_floats_content}%
\else
\page_otr_command_set_float_hsize
\strc_floats_locate_text_float{\box\b_strc_floats_caption}%
@@ -1770,7 +1766,7 @@
\setbox\scratchbox\vbox
{\d_strc_float_temp_width\wd\b_strc_floats_content
\ifconditional\c_strc_floats_par_float
- \hbox{\box\b_strc_floats_content}%
+ \hpack{\box\b_strc_floats_content}%
\vss\strc_floats_between_stack
\strc_floats_locate_side_float{\box\b_strc_floats_caption}%
\else
@@ -1784,16 +1780,16 @@
\def\strc_floats_build_box_top_stack_stretch
{\dp\b_strc_floats_caption\strutdepth
- \setbox\scratchbox\vbox
+ \setbox\scratchbox\vpack
{\strc_floats_align_caption{\copy\b_strc_floats_caption}%
\strc_floats_align_content{\copy\b_strc_floats_content}}%
\getnoflines{\dimexpr\htdp\scratchbox-10\scaledpoint\relax}% get rid of inaccuracy
- \vbox to \noflines\lineheight
+ \vbox to \noflines\lineheight % pack ?
{\d_strc_float_temp_width\wd\b_strc_floats_content
\ifconditional\c_strc_floats_par_float
\strc_floats_locate_side_float{\box\b_strc_floats_caption}%
\vss\strc_floats_between_stack\vss
- \hbox{\box\b_strc_floats_content}%
+ \hpack{\box\b_strc_floats_content}%
\else
\page_otr_command_set_float_hsize
\strc_floats_locate_text_float{\box\b_strc_floats_caption}%
@@ -1803,14 +1799,14 @@
\def\strc_floats_build_box_bottom_stack_stretch
{\dp\b_strc_floats_caption\strutdepth
- \setbox\scratchbox\vbox
+ \setbox\scratchbox\vbox % pack ?
{\strc_floats_align_content{\copy\b_strc_floats_content }%
\strc_floats_align_caption{\copy\b_strc_floats_caption}}%
\getnoflines{\dimexpr\htdp\scratchbox-10\scaledpoint\relax}% get rid of inaccuracy
\vbox to \noflines\lineheight
{\d_strc_float_temp_width\wd\b_strc_floats_content
\ifconditional\c_strc_floats_par_float
- \hbox{\box\b_strc_floats_content}%
+ \hpack{\box\b_strc_floats_content}%
\vss\strc_floats_between_stack\vss
\strc_floats_locate_side_float{\box\b_strc_floats_caption}
\else
@@ -1840,15 +1836,25 @@
\unexpanded\def\installfloatboxbuilder#1#2{\setvalue{\??floatbuilder#1}{#2}}
\def\strc_floats_build_box
- {\global\setbox\floatbox\vbox
+ {\global\setbox\floatbox\vbox % pack ? probably not
{\strc_floats_set_local_hsize
\forgetall
\let\floatcaptionarrangement\s!default
\processcommacommand[\floatcaptionparameter\c!location]\strc_floats_build_box_step
- \executeifdefined{\??floatbuilder\floatcaptionarrangement}{\getvalue{\??floatbuilder\s!default}}}}
+ \ifcsname\??floatbuilder\floatcaptionarrangement\endcsname
+ \lastnamedcs
+ \else
+ \strc_floats_build_box_default
+ \fi}}
+
+% \def\strc_floats_build_box_step#1%
+% {\doifdefined{\??floatbuilder#1}{\def\floatcaptionarrangement{#1}\quitcommalist}}
\def\strc_floats_build_box_step#1%
- {\doifdefined{\??floatbuilder#1}{\def\floatcaptionarrangement{#1}\quitcommalist}}
+ {\ifcsname\??floatbuilder#1\endcsname
+ \def\floatcaptionarrangement{#1}% \let\floatcaptionarrangement\commalistelement
+ \quitcommalist
+ \fi}
\def\strc_floats_locate_text_float
{\let\next\strc_floats_align_caption
@@ -1922,7 +1928,7 @@
\setbox\b_strc_floats_content\vbox{\borderedfloatbox}%
%\page_backgrounds_add_local_to_box\b_strc_floats_content
\ifnofloatcaption
- \global\setbox\floatbox\vbox{\box\b_strc_floats_content}%
+ \global\setbox\floatbox\vpack{\box\b_strc_floats_content}%
\else
\strc_floats_check_caption_content
\strc_floats_prepare_side_caption
@@ -1933,30 +1939,6 @@
\fi
\egroup}
-% \def\strc_floats_prepare_side_caption
-% {\dostarttagged\t!floatcaption\empty
-% \edef\p_strc_floats_caption_align{\floatcaptionparameter\c!align}%
-% \doifelse{\floatcaptionparameter\c!width}\v!max
-% {\setbox\b_strc_floats_caption\vbox
-% {\strc_floats_caption_set_align
-% \hsize\wd\b_strc_floats_content
-% \strc_floats_make_complete_caption}}%
-% {\doifelse{\floatcaptionparameter\c!width}\v!fit
-% {\ifdim\wd\b_strc_floats_caption>\wd\b_strc_floats_content\relax
-% \setbox\b_strc_floats_caption\vbox
-% {\forgetall % needed?
-% \hsize\wd\b_strc_floats_content
-% \strc_floats_make_complete_caption}%
-% \else
-% \setbox\b_strc_floats_caption\hbox to \wd\b_strc_floats_content
-% {\hss\hbox{\strc_floats_make_complete_caption}\hss}%
-% \fi}
-% {\setbox\b_strc_floats_caption\vbox
-% {\strc_floats_caption_set_align
-% \hsize\floatcaptionparameter\c!width % \wd\b_strc_floats_content
-% \strc_floats_make_complete_caption}}}%
-% \dostoptagged}
-
\def\strc_floats_prepare_side_caption
{\dostarttagged\t!floatcaption\empty
\edef\p_strc_floats_caption_width{\floatcaptionparameter\c!width}%
@@ -1972,20 +1954,26 @@
% these could be \??floatpreparesidecaption
+% \setupfloat[figure][location=left]
+% \setupcaption[figure][width=max]
+%
+% \placefigure{my figure caption my figure caption}{\framed[width=4cm,height=1cm]{}} \input tufte
+% \placefigure{my figure caption} {\framed[width=4cm,height=1cm]{}} \input tufte
+
\def\strc_floats_prepare_side_caption_max
{\setbox\b_strc_floats_caption\vbox
{\strc_floats_caption_set_align
\hsize\wd\b_strc_floats_content
\strc_floats_make_complete_caption}}
-\def\strc_floats_prepare_side_caption_fit
+\def\strc_floats_prepare_side_caption_fit % or center when smaller
{\ifdim\wd\b_strc_floats_caption>\wd\b_strc_floats_content\relax
\setbox\b_strc_floats_caption\vbox
{\forgetall % needed?
\hsize\wd\b_strc_floats_content
\strc_floats_make_complete_caption}%
\else
- \setbox\b_strc_floats_caption\hbox to \wd\b_strc_floats_content
+ \setbox\b_strc_floats_caption\hpack to \wd\b_strc_floats_content
{\hss\hbox{\strc_floats_make_complete_caption}\hss}%
\fi}
@@ -2052,11 +2040,11 @@
\fi
\strc_floats_set_local_dimensions
\global\advance\totalnoffloats\plusone
- \setbox\floatbox\hbox{\strc_float_save_data\box\floatbox}% still needed? we will do renumbering differently
+ \setbox\floatbox\hpack{\strc_float_save_data\box\floatbox}% still needed? we will do renumbering differently
\global\floatheight\htdp\floatbox
\global\floatwidth\wd\floatbox
\doifnotinset\v!margin\floatlocation % gaat namelijk nog fout
- {\setbox\floatbox\vbox
+ {\setbox\floatbox\vpack
{\parindent\zeropoint
\box\floatbox}}%
\wd\floatbox\floatwidth
@@ -2113,9 +2101,9 @@
% \let\floatrow \empty
% \setfloatmethodvariables\floatlocation
% todo: nog algemeen otr
- \ifdefined\OTRSETsetpreferedcolumnslot
- \OTRSETsetpreferedcolumnslot\floatcolumn\floatrow
- \fi
+% \ifdefined\OTRSETsetpreferedcolumnslot
+% \OTRSETsetpreferedcolumnslot\floatcolumn\floatrow
+% \fi
\ifcsname\??floatmethods\currentoutputroutine:\floatmethod\endcsname \else
\let\floatmethod\v!here
\fi
@@ -2296,7 +2284,7 @@
\else
\directlocalfloatsparameter\c!inbetween
\fi
- \dontleavehmode\hbox{\foundbox\??localfloatstack\recurselevel}% \restorebox...
+ \dontleavehmode\hpack{\foundbox\??localfloatstack\recurselevel}% \restorebox...
\ifnum\recurselevel=\c_strc_localfloats_n\relax
\directlocalfloatsparameter\c!after
\fi}}
diff --git a/Master/texmf-dist/tex/context/base/strc-ind.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-ind.mkiv
index 0098bff7da6..2748fd684ac 100644
--- a/Master/texmf-dist/tex/context/base/strc-ind.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-ind.mkiv
@@ -104,6 +104,12 @@
\par
\endgroup}
+\unexpanded\def\startindentedtext
+ {\dosingleempty\strc_indentedtexts_start_direct}
+
+\def\strc_indentedtexts_start_direct[#1]%
+ {\strc_indentedtexts_start{#1}\c_strc_indentedtexts_nesting}
+
\let\stopindentedtext\strc_indentedtexts_stop
\unexpanded\def\strc_indentedtexts_direct#1#2#3\par % no longer clever grabpar trickery
diff --git a/Master/texmf-dist/tex/context/base/strc-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-ini.lua
index f736427bb44..dffbe3fcd8f 100644
--- a/Master/texmf-dist/tex/context/base/strc-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-ini.lua
@@ -233,6 +233,13 @@ local tags = {
--
-- local command = formatters["\\xmlprocessbuffer{%s}{%s}{}"](metadata.xmlroot or "main",tag)
+local overload_catcodes = true
+
+directives.register("typesetters.processors.overloadcatcodes",function(v)
+ -- number | true | false | string
+ overload_catcodes = v
+end)
+
local experiment = true
function helpers.title(title,metadata) -- coding is xml is rather old and not that much needed now
@@ -265,12 +272,7 @@ function helpers.title(title,metadata) -- coding is xml is rather old and not th
ctx_xmlsetup(title,metadata.xmlsetup)
else
local catcodes = metadata.catcodes
- if catcodes == notcatcodes or catcodes == xmlcatcodes then
- if trace_processors then
- report_processors("catcodetable %a, overloads %a, text %a",ctxcatcodes,catcodes,title)
- end
- context(title) -- nasty
- else
+ if overload_catcodes == false then
if trace_processors then
report_processors("catcodetable %a, text %a",catcodes,title)
end
@@ -283,10 +285,30 @@ function helpers.title(title,metadata) -- coding is xml is rather old and not th
ctx_pushcatcodes(catcodes)
context(title)
ctx_popcatcodes()
+ elseif overload_catcodes == true then
+ if catcodes == notcatcodes or catcodes == xmlcatcodes then
+ -- when was this needed
+ if trace_processors then
+ report_processors("catcodetable %a, overloads %a, text %a",ctxcatcodes,catcodes,title)
+ end
+ context(title)
+ else
+ ctx_pushcatcodes(catcodes)
+ context(title)
+ ctx_popcatcodes()
+ end
+ else
+ if trace_processors then
+ report_processors("catcodetable %a, overloads %a, text %a",catcodes,overload_catcodes,title)
+ end
+ ctx_pushcatcodes(overload_catcodes)
+ context(title)
+ ctx_popcatcodes()
end
end
else
- context(title) -- no catcode switch, was: texsprint(title)
+ -- no catcode switch, was: texsprint(title)
+ context(title)
end
end
end
@@ -370,7 +392,6 @@ function sets.get(namespace,block,name,level,default) -- check if name is passed
if not dn then
return default
end
--- inspect(dn)
local dl = dn[1][level]
return dl or dn[2] or default
end
diff --git a/Master/texmf-dist/tex/context/base/strc-ini.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-ini.mkvi
index ad83cbc58c2..ad83cbc58c2 100644
--- a/Master/texmf-dist/tex/context/base/strc-ini.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-ini.mkvi
diff --git a/Master/texmf-dist/tex/context/base/strc-itm.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-itm.lua
index adec591c1c1..adec591c1c1 100644
--- a/Master/texmf-dist/tex/context/base/strc-itm.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-itm.lua
diff --git a/Master/texmf-dist/tex/context/base/strc-itm.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-itm.mkvi
index 86fc9d9fd28..48c8e1a302e 100644
--- a/Master/texmf-dist/tex/context/base/strc-itm.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-itm.mkvi
@@ -167,6 +167,8 @@
\newconditional\c_strc_itemgroups_head
\newconditional\c_strc_itemgroups_intro
\newconditional\c_strc_itemgroups_randomize
+\newconditional\c_strc_itemgroups_horizontal
+\newconditional\c_strc_itemgroups_collecting
\newconditional\c_strc_itemgroups_auto_intro
\newconditional\c_strc_itemgroups_pack
\newconditional\c_strc_itemgroups_paragraph
@@ -253,7 +255,7 @@
% no need to collect nodes in \b_strc_destination_nodes here ... maybe at some point
\strc_references_start_destination_nodes
% this is somewhat over the top ... we should use the counter's reference
- \clf_setreferenceattribute
+ \clf_setdestinationattribute
{%
metadata {%
kind {item}% was item, why?
@@ -337,12 +339,12 @@
\setgvalue{\??itemgroupsetting\currentitemgroup}{\setupcurrentitemgroup[#settings]}}
\def\strc_itemgroups_fetch_continue_state
- {\getvalue{\??itemgroupoption \currentitemgroup}%
- \getvalue{\??itemgroupsetting\currentitemgroup}}
+ {\csname\??itemgroupoption \currentitemgroup\endcsname
+ \csname\??itemgroupsetting\currentitemgroup\endcsname}
\def\strc_itemgroups_reset_continue_state
- {\letgvalue{\??itemgroupoption \currentitemgroup}\relax
- \letgvalue{\??itemgroupsetting\currentitemgroup}\relax}
+ {\global\expandafter\let\csname\??itemgroupoption \currentitemgroup\endcsname\relax
+ \global\expandafter\let\csname\??itemgroupsetting\currentitemgroup\endcsname\relax}
% These will become keywords. We will also add a feature to keep the while set
% together.
@@ -388,7 +390,7 @@
\let\itemgroupfirst\!!plusone
\fi
\ifcsname\??itemgroupkeyword\itemgroupsecond\endcsname
- \csname\??itemgroupkeyword\itemgroupsecond\endcsname
+ \lastnamedcs
\else
\strc_itemgroups_set_symbol\itemgroupconstantvalue
\fi
@@ -440,10 +442,30 @@
\setvalue{\??itemgroupkeyword\v!three }{\letitemgroupparameter\c!n\plusthree}
\setvalue{\??itemgroupkeyword\v!four }{\letitemgroupparameter\c!n\plusfour}
\setvalue{\??itemgroupkeyword\v!five }{\letitemgroupparameter\c!n\plusfive}
-\setvalue{\??itemgroupkeyword\v!standard }{\setupcurrentitemgroup
- [\c!width=1.5em,\c!factor=0,\c!distance=.5em,\c!inner=,\c!factor=0,%
- \c!beforehead=,\c!afterhead=\blank,%
- \c!before=\blank,\c!inbetween=\blank,\c!after=\blank]}
+\setvalue{\??itemgroupkeyword\v!six }{\letitemgroupparameter\c!n\plussix}
+\setvalue{\??itemgroupkeyword\v!seven }{\letitemgroupparameter\c!n\plusseven}
+\setvalue{\??itemgroupkeyword\v!eight }{\letitemgroupparameter\c!n\pluseight}
+\setvalue{\??itemgroupkeyword\v!nine }{\letitemgroupparameter\c!n\plusnine}
+%setvalue{\??itemgroupkeyword\v!standard }{\setupcurrentitemgroup
+% [\c!width =1.5\emwidth,%
+% \c!distance =.5\emwidth,%
+% \c!factor =0,%
+% \c!inner =,%
+% \c!beforehead=,%
+% \c!afterhead =\blank,%
+% \c!before =\blank,%
+% \c!inbetween =\blank,%
+% \c!after =\blank]}
+\setvalue{\??itemgroupkeyword\v!standard }{\setitemgroupparameter\c!width {1.5\emwidth}%
+ \setitemgroupparameter\c!distance {.5\emwidth}%
+ \letitemgroupparameter\c!factor \!!zerocount
+ \letitemgroupparameter\c!inner \empty
+ \letitemgroupparameter\c!beforehead\empty
+ \letitemgroupparameter\c!afterhead \blank
+ \letitemgroupparameter\c!before \blank
+ \letitemgroupparameter\c!inbetween \blank
+ \letitemgroupparameter\c!after \blank}
+
\def\strc_itemgroups_initialize_local
{\setfalse\c_strc_itemgroups_inline
@@ -457,6 +479,8 @@
\setfalse\c_strc_itemgroups_after
\setfalse\c_strc_itemgroups_nowhite
\setfalse\c_strc_itemgroups_randomize
+ \setfalse\c_strc_itemgroups_horizontal
+ \setfalse\c_strc_itemgroups_collecting
\setfalse\c_strc_itemgroups_intro
\setfalse\c_strc_itemgroups_continue
% this will be a constant
@@ -473,16 +497,22 @@
\global\letitemgroupparameter\c!maxwidth\!!zeropoint
}
-\setvalue{\??itemgroupfirst\v!intro }{\settrue\c_strc_itemgroups_intro }
-\setvalue{\??itemgroupfirst\v!random }{\settrue\c_strc_itemgroups_randomize}
-\setvalue{\??itemgroupfirst\v!continue}{\settrue\c_strc_itemgroups_continue }
+\setvalue{\??itemgroupfirst\v!intro }{\settrue\c_strc_itemgroups_intro}
+\setvalue{\??itemgroupfirst\v!continue }{\settrue\c_strc_itemgroups_continue}
+\setvalue{\??itemgroupfirst\v!random }{\settrue\c_strc_itemgroups_randomize
+ \settrue\c_strc_itemgroups_collecting}
+\setvalue{\??itemgroupkeyword\v!horizontal}{\settrue\c_strc_itemgroups_horizontal
+ \settrue\c_strc_itemgroups_collecting
+ \settrue\c_strc_itemgroups_inline
+ \settrue\c_strc_itemgroups_joined
+ \strc_itemgroups_process_set_option_pack}
\def\strc_itemgroups_preset_stage_one#options%
{\processcommacommand[#options]\strc_itemgroups_preset_stage_one_indeed}
\def\strc_itemgroups_preset_stage_one_indeed#option%
{\ifcsname\??itemgroupfirst#option\endcsname
- \csname\??itemgroupfirst#option\endcsname
+ \lastnamedcs
\fi}
\ifdefined\dotagsetitemgroup \else \let\dotagsetitemgroup\relax \fi
@@ -640,6 +670,36 @@
\strc_itemgroups_insert_reference
\endgroup}
+% needs testing (maybe it need to happen later)
+%
+% \appendtoks
+% \setupcounter
+% [\v_strc_itemgroups_counter]%
+% [\c!prefix=\itemgroupparameter\c!prefix,
+% \c!prefixstopper=\itemgroupparameter\c!prefixstopper,
+% \c!prefixseparatorset=\itemgroupparameter\c!prefixseparatorset,
+% \c!prefixconversion=\itemgroupparameter\c!prefixconversion,
+% \c!prefixconversionset=\itemgroupparameter\c!prefixseparatorset,
+% \c!prefixset=\itemgroupparameter\c!prefixset,
+% \c!prefixsegments=\itemgroupparameter\c!prefixsegments,
+% \c!prefixconnector=\itemgroupparameter\c!prefixconnector,
+% \c!criterium=\itemgroupparameter\c!criterium,
+% \c!numberorder=\ifconditional\c_strc_itemgroups_reverse\v!reverse\else\v!normal\fi,
+% \c!numberstopper=\expdoif{\itemgroupparameter\c!placestopper}\v!yes{\itemgroupparameter\c!stopper},
+% \c!numberconversionset=\v_strc_itemgroups_counter,
+% \c!numbersegments=\currentitemgroupsegments]%
+% \to\itemgroupcommands
+%
+% \def\strc_itemgroups_insert_item_counter_indeed % quite slow ... every time this setup .. but it
+% {\begingroup % can be optimized ... best move some to strc-num
+% % there will be a fixedconversion key
+% %\normalexpanded{\defineconversionset[\v_strc_itemgroups_counter][\currentitemgroupconversionset][\currentitemgroupsymbol]}%
+% \normalexpanded{\strc_sets_define_conversion_set[\v_strc_itemgroups_counter][\currentitemgroupconversionset][\currentitemgroupsymbol]}%
+% %
+% \convertedcounter[\v_strc_itemgroups_counter]% [\number\currentitemlevel]%
+% \strc_itemgroups_insert_reference
+% \endgroup}
+
\def\strc_itemgroups_set_symbol#symbol%
{\edef\strc_itemgroups_tmp_symbol{#symbol}%
\ifx\strc_itemgroups_tmp_symbol\empty \else
@@ -814,7 +874,7 @@
\ifinsidecolumns\else\ifcase\c_strc_itemgroups_column_depth
\global\c_strc_itemgroups_column_depth\c_strc_itemgroups_nesting % global ?
\strc_itemgroups_before_command
- %\strc_itemgroups_tag_start_group
+ \strc_itemgroups_tag_start_group
\strc_itemgroups_start_columns
\fi\fi
\fi
@@ -861,10 +921,10 @@
{\letgvalue{\??itemgrouplocal\currentitemlevel}#symbol}
\def\strc_itemgroups_fetch_global_symbol
- {\getvalue{\??itemgroupglobal\currentitemlevel}}
+ {\csname\??itemgroupglobal\currentitemlevel\endcsname}
\def\strc_itemgroups_fetch_local_symbol
- {\getvalue{\??itemgrouplocal\currentitemlevel}}
+ {\csname\??itemgrouplocal\currentitemlevel\endcsname}
\def\strc_itemgroups_setup_symbol_default
{\edef\strc_itemgroups_asked_symbol{\itemgroupparameter\c!symbol}%
@@ -1183,8 +1243,15 @@
{\dorecurse{0\itemgroupparameter\c!items}{\strc_itemgroups_used_symbol\hss}%
\unskip}}
+% \unexpanded\def\startspecialitemgroupitem[#name]%
+% {\csname\??itemgroupstart\ifcsname\??itemgroupstart#name\endcsname#name\else\v!item\fi\endcsname}
+
\unexpanded\def\startspecialitemgroupitem[#name]%
- {\csname\??itemgroupstart\ifcsname\??itemgroupstart#name\endcsname#name\else\v!item\fi\endcsname}
+ {\ifcsname\??itemgroupstart#name\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\strc_itemgroups_start_do_item
+ \fi}
\unexpanded\def\stopspecialitemgroupitem
{\stopitemgroupitem}
@@ -1422,7 +1489,7 @@
\ifx\m_strc_itemgroups_text_distance\empty
%
\else\ifcsname\??itemgroupdistance\m_strc_itemgroups_text_distance\endcsname
- \csname\??itemgroupdistance\m_strc_itemgroups_text_distance\endcsname
+ \lastnamedcs
\else
\strc_itemgroups_set_text_item_distance_indeed
\fi\fi}
@@ -1435,9 +1502,12 @@
{\interwordspace \!!plus \emwidth}%
{\emwidth \!!plus \interwordstretch\!!minus\interwordshrink}}
+% \unexpanded\def\strc_itemgroups_default_command
+% {\EveryPar{\ignorespaces}% needed ?
+% \ignorespaces}
+
\unexpanded\def\strc_itemgroups_default_command
- {\EveryPar{\ignorespaces}% needed ?
- \ignorespaces}
+ {\ignorespaces}
%D Special case:
@@ -1522,10 +1592,43 @@
\newcount\c_strc_itemgroups_collected_done
\newcount\c_strc_itemgroups_collected_current
-\@EA\def\@EA\strc_itemgroups_collected_store\@EA#\@EA1\csname\e!stop\v!item\endcsname % use grabuntil
+% \expandafter\def\expandafter\strc_itemgroups_collected_store\expandafter#\expandafter1\csname\e!stop\v!item\endcsname % use grabuntil
+% {\advance\c_strc_itemgroups_collected_stored\plusone
+% \setvalue{\??itemgroupstack\number\c_strc_itemgroups_collected_stored}{\startitemgroupitem#1\stopitemgroupitem}}
+
+\let\strc_itemgroups_collected_store\relax
+
+\normalexpanded{\def\strc_itemgroups_collected_store#1\csname\e!stop\v!item\endcsname}%
{\advance\c_strc_itemgroups_collected_stored\plusone
\setvalue{\??itemgroupstack\number\c_strc_itemgroups_collected_stored}{\startitemgroupitem#1\stopitemgroupitem}}
+\def\strc_itemgroups_collected_flush_randomize
+ {\collecteditemgroupitem}
+
+\def\strc_itemgroups_collected_flush_horizontal
+ {\begingroup
+ \scratchcounter\itemgroupparameter\c!n\relax
+ \ifnum\c_strc_itemgroups_collected_done>\plusone
+ \ifcase\modulonumber\scratchcounter\c_strc_itemgroups_collected_done\relax
+ % compensate for rounding errors
+ \hfill % \hskip\zeropoint plus \scaledpoint minus \scaledpoint
+ \allowbreak
+ \fi
+ \fi
+ \noindent % no \dontleavehmode
+ \hbox to \dimexpr\availablehsize/\scratchcounter\relax{\collecteditemgroupitem\hss}%
+ \endgroup}
+
+% \def\strc_itemgroups_collected_flush_indeed
+% {\collecteditemgroupitem
+% \iftrialtypesetting
+% \undefinevalue{\??itemgroupstack\number\c_strc_itemgroups_collected_current}%
+% \fi}
+
+\def\strc_itemgroups_collected_flush_indeed
+ {\collecteditemgroupitem
+ \undefinevalue{\??itemgroupstack\number\c_strc_itemgroups_collected_current}}
+
\def\strc_itemgroups_collected_flush
{\ifconditional\c_strc_itemgroups_randomize
\getrandomcount\c_strc_itemgroups_collected_current\plusone\c_strc_itemgroups_collected_stored
@@ -1533,8 +1636,12 @@
\advance\c_strc_itemgroups_collected_current\plusone
\fi
\ifcsname\??itemgroupstack\number\c_strc_itemgroups_collected_current\endcsname
- \getvalue{\??itemgroupstack\number\c_strc_itemgroups_collected_current}%
- \letbeundefined{\??itemgroupstack\number\c_strc_itemgroups_collected_current}%
+ \edef\collecteditemgroupitem{\lastnamedcs}%
+ \ifconditional\c_strc_itemgroups_horizontal
+ \strc_itemgroups_collected_flush_horizontal
+ \else
+ \strc_itemgroups_collected_flush_indeed
+ \fi
\advance\c_strc_itemgroups_collected_done\plusone
\fi
\ifnum\c_strc_itemgroups_collected_done<\c_strc_itemgroups_collected_stored
@@ -1542,7 +1649,7 @@
\fi}
\unexpanded\def\stopcollectitems
- {\ifconditional\c_strc_itemgroups_randomize
+ {\ifconditional\c_strc_itemgroups_collecting
\c_strc_itemgroups_collected_done \zerocount
\c_strc_itemgroups_collected_current\zerocount
\ifnum\c_strc_itemgroups_collected_stored>\zerocount
@@ -1551,7 +1658,7 @@
\fi}
\unexpanded\def\startcollectitems
- {\ifconditional\c_strc_itemgroups_randomize
+ {\ifconditional\c_strc_itemgroups_collecting
\c_strc_itemgroups_collected_stored\zerocount
\letvalue{\e!start\v!item}\strc_itemgroups_collected_store
\fi}
@@ -1589,15 +1696,45 @@
%D End of plugin.
+%D Something for tables:
+
+\unexpanded\def\itemtag
+ {\dosingleempty\strc_itemgroups_item_tag}
+
+\unexpanded\def\strc_itemgroups_item_tag[#reference]% we can reuse more
+ {\def\currentitemreference{#reference}%
+ \iftrialtypesetting
+ \strc_counters_save\v_strc_itemgroups_counter
+ \strc_itemgroups_increment_item_counter
+ \strc_itemgroups_insert_item_tag_indeed
+ \strc_counters_restore\v_strc_itemgroups_counter
+ \else
+ \strc_itemgroups_increment_item_counter
+ \strc_itemgroups_insert_item_tag_indeed
+ \fi}
+
+\def\strc_itemgroups_insert_item_tag_indeed
+ {\letitemgroupparameter\c!distance\zeropoint
+ %letitemgroupparameter\c!width\zeropoint
+ \strc_itemgroups_make_symbol_box
+ \strc_itemgroups_make_destination_box
+ \let\m_strc_itemgroups_destination\empty
+ \ht\b_strc_itemgroups\strutheight
+ \dp\b_strc_itemgroups\strutdepth
+ \box\b_strc_itemgroups
+ \ignorespaces}
+
+%D Done again.
+
\setupitemgroup
[\c!margin=\zeropoint,
\c!leftmargin=\zeropoint,
\c!rightmargin=\zeropoint,
\c!indentnext=\v!yes,
- \c!width=1.5em,
+ \c!width=1.5\emwidth,
\c!factor=0,
%\c!distance=.5em, % is now:
- \c!step=.5em, % deals with broad
+ \c!step=.5\emwidth, % deals with broad
\c!distance=\zeropoint,
%\c!align=\v!normal, % definitely not \v!normal !
%\c!symalign=,
diff --git a/Master/texmf-dist/tex/context/base/strc-lab.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-lab.mkiv
index ac49941aaee..ac49941aaee 100644
--- a/Master/texmf-dist/tex/context/base/strc-lab.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-lab.mkiv
diff --git a/Master/texmf-dist/tex/context/base/strc-lev.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-lev.lua
index d7ffd6af434..d7ffd6af434 100644
--- a/Master/texmf-dist/tex/context/base/strc-lev.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-lev.lua
diff --git a/Master/texmf-dist/tex/context/base/strc-lev.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-lev.mkvi
index dae3f28e30e..dae3f28e30e 100644
--- a/Master/texmf-dist/tex/context/base/strc-lev.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-lev.mkvi
diff --git a/Master/texmf-dist/tex/context/base/strc-lnt.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-lnt.mkvi
index ee7d5dd8854..cd10c9def20 100644
--- a/Master/texmf-dist/tex/context/base/strc-lnt.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-lnt.mkvi
@@ -142,13 +142,13 @@
% we keep things local so we can use it as regular note too
\edef\currentnotation{#1}%
\edef\currentlinenotereference{#2}%
- \xdef\m_page_lines_previous_from{\csname\??linenotespreviousfrom\ifcsname\??linenotespreviousfrom\currentnotation\endcsname\currentnotation\fi\endcsname}%
- \xdef\m_page_lines_previous_to {\csname\??linenotespreviousto \ifcsname\??linenotespreviousto \currentnotation\endcsname\currentnotation\fi\endcsname}%
+ \xdef\m_page_lines_previous_from{\begincsname\??linenotespreviousfrom\currentnotation\endcsname}%
+ \xdef\m_page_lines_previous_to {\begincsname\??linenotespreviousto \currentnotation\endcsname}%
\strc_linenotes_check_compression
\let\currentnote\currentnotation
\letnotationparameter\c!numbercommand\linenotelinenumber% todo: deep hook
\letnoteparameter \c!textcommand \gobbleoneargument % todo: deep hook
- \getvalue{\??linenote\currentnotation}{#3}%
+ \csname\??linenote\currentnotation\endcsname{#3}%
\expandafter\glet\csname\??linenotespreviousfrom\currentnotation\endcsname\m_page_lines_current_from
\expandafter\glet\csname\??linenotespreviousto \currentnotation\endcsname\m_page_lines_current_to
\endgroup}
@@ -256,15 +256,15 @@
\unexpanded\def\tracelinenotes
{\let\strc_linenotes_traced\strc_linenotes_traced_indeed}
+% We predefine one, namely \type {\linenote} cum suis.
+
+\definelinenote[\v!linenote]
+
%D Use these when not properly nested:
\let\fromlinenote\startlinenote
\let\tolinenote \stoplinenote
-% We predefine one, namely \type {\linenote} cum suis.
-
-\definelinenote[\v!linenote]
-
% beware: line numbers are added later on so grouping setups is a bad idea
%
% \startbuffer[test]
diff --git a/Master/texmf-dist/tex/context/base/strc-lst.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-lst.lua
index fd79bbd7a9c..0f5d8e0d7b8 100644
--- a/Master/texmf-dist/tex/context/base/strc-lst.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-lst.lua
@@ -33,6 +33,7 @@ local report_lists = logs.reporter("structure","lists")
local context = context
local commands = commands
local implement = interfaces.implement
+local conditionals = tex.conditionals
local structures = structures
local lists = structures.lists
@@ -122,6 +123,7 @@ local function initializer()
local ordered = lists.ordered
local usedinternals = references.usedinternals
local blockdone = { }
+ local lastblock = nil
for i=1,#collected do
local c = collected[i]
local m = c.metadata
@@ -135,9 +137,22 @@ local function initializer()
usedinternals[internal] = r.used
end
local block = r.block
- if block and not blockdone[block] then
+ if not block then
+ -- shouldn't happen
+ elseif lastblock == block then
+ -- we're okay
+ elseif lastblock then
+ if blockdone[block] then
+ report_lists("out of order sectionsblocks, maybe use \\setsectionblock")
+ else
+ blockdone[block] = true
+ sectionblocks[#sectionblocks+1] = block
+ end
+ lastblock = block
+ elseif not blockdone[block] then
blockdone[block] = true
sectionblocks[#sectionblocks+1] = block
+ lastblock = block
end
end
-- access by order in list
@@ -205,6 +220,14 @@ function lists.addto(t) -- maybe more more here (saves parsing at the tex end)
if not metadata.level then
metadata.level = structures.sections.currentlevel() -- this is not used so it will go away
end
+ --
+ -- if not conditionals.inlinelefttoright then
+ -- metadata.idir = "r2l"
+ -- end
+ -- if not conditionals.displaylefttoright then
+ -- metadata.ddir = "r2l"
+ -- end
+ --
if numberdata then
local numbers = numberdata.numbers
if type(numbers) == "string" then
@@ -213,6 +236,7 @@ function lists.addto(t) -- maybe more more here (saves parsing at the tex end)
end
local group = numberdata and numberdata.group
local name = metadata.name
+ local kind = metadata.kind
if not group then
-- forget about it
elseif group == "" then
@@ -232,12 +256,20 @@ function lists.addto(t) -- maybe more more here (saves parsing at the tex end)
r.section = structures.sections.currentid()
end
local i = r and r.internal or 0 -- brrr
+ if r and kind and name then
+ local tag = tags.getid(kind,name)
+ if tag and tag ~= "?" then
+ r.tag = tag -- todo: use internal ... is unique enough
+ end
+ end
local p = pushed[i]
if not p then
p = #cached + 1
cached[p] = helpers.simplify(t)
pushed[i] = p
- r.listindex = p
+ if r then
+ r.listindex = p
+ end
end
if group then
groupindices[name][group] = p
@@ -254,7 +286,7 @@ function lists.discard(n)
-- maybe an error message
elseif n == #cached then
cached[n] = nil
- n = n -1
+ n = n - 1
while n > 0 and cached[n] == false do
cached[n] = nil -- collect garbage
n = n - 1
@@ -298,15 +330,15 @@ function lists.enhance(n)
local kind = metadata.kind
local name = metadata.name
if trace_lists then
- report_lists("enhancing %a, name %a",n,name)
- end
- if references then
- -- is this used ?
- local tag = tags.getid(kind,name)
- if tag and tag ~= "?" then
- references.tag = tag
- end
+ report_lists("enhancing %a, name %a, page %a",n,name,references.realpage or 0)
end
+-- if references then
+-- -- is this used ?
+-- local tag = tags.getid(kind,name)
+-- if tag and tag ~= "?" then
+-- references.tag = tag
+-- end
+-- end
-- specific enhancer (kind of obsolete)
local enhancer = kind and lists.enhancers[kind]
if enhancer then
@@ -871,7 +903,7 @@ function lists.hastitledata(name,n,tag)
if data then
local titledata = data.titledata
if titledata then
- return (titledata[tag] or titledata.title or "") == ""
+ return (titledata[tag] or titledata.title or "") ~= ""
end
end
return false
@@ -892,7 +924,7 @@ function lists.hasnumberdata(name,n)
local data = lists.result[n]
if data then
local numberdata = data.numberdata
- if numberdata and not numberdata.hidenumber then -- th ehide number is true
+ if numberdata and not numberdata.hidenumber then -- the hide number is true
return true
end
end
@@ -989,6 +1021,7 @@ implement {
{ "location" },
{ "prefix" },
{ "reference" },
+ { "view" },
{ "order", "integer" },
}
},
diff --git a/Master/texmf-dist/tex/context/base/strc-lst.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-lst.mkvi
index 71fc0982964..e7ed0f1f2ff 100644
--- a/Master/texmf-dist/tex/context/base/strc-lst.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-lst.mkvi
@@ -116,6 +116,22 @@
% userdata : location=none
% simple : location=here
+\installcorenamespace {listlocations}
+
+\unexpanded\def\doifelseinlistentry#1%
+ {\ifcsname\??listlocations#1\endcsname
+ \ifnum\lastnamedcs=\structurelistlocation\relax
+ \doubleexpandafter\firstoftwoarguments
+ \else
+ \doubleexpandafter\secondoftwoarguments
+ \fi
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\unexpanded\def\doifelseincurrentlistentry
+ {\doifelseinlistentry\currentlist}
+
\unexpanded\def\structurelistinject
{\dotripleempty\strc_lists_inject}
@@ -150,10 +166,14 @@
userdata {\detokenize\expandafter{\normalexpanded{#userdata}}}
\relax
\edef\currentlistnumber{\the\scratchcounter}%
+\setxvalue{\??listlocations\currentlist}{\nextinternalreference}%
\ifx\p_location\v!here
% this branch injects nodes !
\strc_lists_inject_enhance{\currentlistnumber}{\nextinternalreference}%
- \clf_setinternalreference internal \nextinternalreference\relax % this will change
+ \clf_setinternalreference
+ internal \nextinternalreference
+ view {\interactionparameter\c!focus}%
+ \relax % this will change
\xdef\currentstructurelistattribute{\the\lastdestinationattribute}%
\dontleavehmode\hbox attr \destinationattribute \lastdestinationattribute{}% todo
\else
@@ -277,8 +297,8 @@
%D a document source but nowadays that is less an issue in the
%D sense that the extra few lines are neglectable to the rest.
-\unexpanded\def\systemsuppliedchapter {\getvalue{\v!chapter}} % obsolete
-\unexpanded\def\systemsuppliedtitle {\getvalue{\v!title}} % obsolete
+\unexpanded\def\systemsuppliedchapter {\csname\v!chapter\endcsname} % obsolete
+\unexpanded\def\systemsuppliedtitle {\csname\v!title \endcsname} % obsolete
\unexpanded\def\completelist
{\dodoubleempty\strc_lists_complete}
@@ -352,7 +372,7 @@
\unexpanded\def\structurelistpagenumber
{\dostarttagged\t!listpage\empty
\clf_listprefixedpage
- {\currentlist}
+ {\currentlist}%
\currentlistindex
{
separatorset {\listparameter\c!pageprefixseparatorset}
@@ -360,13 +380,13 @@
set {\listparameter\c!pageprefixset}
segments {\listparameter\c!pageprefixsegments}
connector {\listparameter\c!pageprefixconnector}
- }
+ }%
{
prefix {\listparameter\c!pageprefix}
conversionset {\listparameter\c!pageconversionset}
starter {\listparameter\c!pagestarter}
stopper {\listparameter\c!pagestopper}
- }
+ }%
\relax
\dostoptagged}
@@ -378,8 +398,8 @@
\def\rawstructurelistuservariable#name%
{\clf_listuserdata{\currentlist}\currentlistindex{#name}}
-\unexpanded\def\structurelistfirst {\structurelistuservariable\s!first } % s!
-\unexpanded\def\structurelistsecond{\structurelistuservariable\s!second} % s!
+\unexpanded\def\structurelistfirst {\structurelistuservariable\s!first } % s!
+\unexpanded\def\structurelistsecond {\structurelistuservariable\s!second} % s!
\def\rawstructurelistfirst {\rawstructurelistuservariable\s!first } % s! % was \unexpanded
\def\rawstructurelistsecond{\rawstructurelistuservariable\s!second} % s! % was \unexpanded
@@ -477,16 +497,30 @@
\let\dotaglistlocation\relax
+\def\strc_lists_entry_process_default
+ {no list method}
+
+% \def\strc_lists_entry_process % assume things to be set up
+% {\listextraparameter\c!before
+% \dostarttagged\t!listitem\currentlist
+% \dotaglistlocation
+% \csname\??structurelistprocessor
+% \ifcsname\??structurelistprocessor\currentlist:\currentlistmethod\endcsname\currentlist:\currentlistmethod\else
+% \ifcsname\??structurelistprocessor\currentlistmethod \endcsname\currentlistmethod \else
+% \ifcsname\??structurelistprocessor\currentlist \endcsname\currentlist \else
+% \s!default \fi\fi\fi
+% \endcsname
+% \dostoptagged
+% \listextraparameter\c!after}
+
\def\strc_lists_entry_process % assume things to be set up
{\listextraparameter\c!before
\dostarttagged\t!listitem\currentlist
\dotaglistlocation
- \csname\??structurelistprocessor
- \ifcsname\??structurelistprocessor\currentlist:\currentlistmethod\endcsname\currentlist:\currentlistmethod\else
- \ifcsname\??structurelistprocessor\currentlistmethod \endcsname\currentlistmethod \else
- \ifcsname\??structurelistprocessor\currentlist \endcsname\currentlist \else
- \s!default \fi\fi\fi
- \endcsname
+ \ifcsname\??structurelistprocessor\currentlist:\currentlistmethod\endcsname\lastnamedcs\else
+ \ifcsname\??structurelistprocessor\currentlistmethod \endcsname\lastnamedcs\else
+ \ifcsname\??structurelistprocessor\currentlist \endcsname\lastnamedcs\else
+ \strc_lists_entry_process_default\fi\fi\fi
\dostoptagged
\listextraparameter\c!after}
@@ -502,7 +536,7 @@
% lists that have a number/title are kind of generic and can share code
\installstructurelistprocessor\s!default
- {no list method}
+ {\strc_lists_entry_process_default}
\installstructurelistprocessor\s!simple
{\let\currentlistentrynumber \structurelistfirst
@@ -567,7 +601,7 @@
\unexpanded\def\strc_lists_symbol_none
{\strc_lists_assign_dimen\scratchwidth\c!width{1.5\emwidth}%
- \hbox to \scratchwidth{}}
+ \hpack to \scratchwidth{}}
\unexpanded\def\strc_lists_symbol_one
{\strut\symbol[bullet]}
@@ -588,22 +622,29 @@
\installcorenamespace{listsymbollabels}
+\def\strc_lists_symbol_label_unknown
+ {\leftlabeltext\currentlistlabel
+ \listparameter\c!starter
+ \currentlistentrynumber
+ \listparameter\c!stopper
+ \rightlabeltext\currentlistlabel}
+
\unexpanded\def\strc_lists_symbol_default
{\dontleavehmode
\strut
\begingroup
\edef\currentlistlabel{\listparameter\c!label}% can be used in label
- \csname\??listsymbollabels
- \ifcsname\??listsymbollabels\currentlistlabel\endcsname\currentlistlabel\else\s!unknown\fi
- \endcsname
+% \csname\??listsymbollabels
+% \ifcsname\??listsymbollabels\currentlistlabel\endcsname\currentlistlabel\else\s!unknown\fi
+% \endcsname
+ \ifcsname\??listsymbollabels\currentlistlabel\endcsname
+ \lastnamedcs
+ \else
+ \strc_lists_symbol_label_unknown
+ \fi
\endgroup}
-\setvalue{\??listsymbollabels\s!unknown}% use whatever is set
- {\leftlabeltext\currentlistlabel
- \listparameter\c!starter
- \currentlistentrynumber
- \listparameter\c!stopper
- \rightlabeltext\currentlistlabel}
+\letvalue{\??listsymbollabels\s!unknown}\strc_lists_symbol_default
\setvalue{\??listsymbollabels}% default (empty)
{\listparameter\c!starter
@@ -643,8 +684,64 @@
% quite special and don't apply to multiple. So, being strict saves
% us resets.
+% \installcorenamespace{listfiller}
+%
+% \unexpanded\def\installlistfiller#1#2%
+% {\setuvalue{\??listfiller#1}{#2}}
+%
+% \unexpanded\def\listfiller#1%
+% {\begincsname\??listfiller#1\endcsname}
+%
+% \unexpanded\def\currentlistfiller
+% {\begingroup
+% \edef\p_filler{\listalternativeparameter\c!filler}%
+% \ifcsname\??listfiller\p_filler\endcsname
+% \lastnamedcs
+% \else
+% \p_filler
+% \fi
+% \endgroup}
+%
+% \installlistfiller\v!sym % original one
+% {\begingroup
+% \scratchdimen.5\emwidth
+% \hskip\scratchdimen
+% \gleaders
+% \hbox to \scratchdimen
+% {\hss
+% \uselistalternativestyleandcolor\c!symstyle\c!symcolor
+% \listalternativeparameter\c!symbol
+% \hss}%
+% \hfill
+% \hskip\scratchdimen
+% \endgroup}
+%
+% \installlistfiller\v!symbol % new one (make that default?)
+% {\begingroup
+% \scratchdimen.5\emwidth
+% \hskip\scratchdimen
+% \gleaders
+% \hbox spread .5\scratchdimen
+% {\hss
+% \uselistalternativestyleandcolor\c!symstyle\c!symcolor
+% \listalternativeparameter\c!symbol
+% \hss}%
+% \hfill
+% \hskip\scratchdimen
+% \endgroup}
+%
+% \installlistfiller\v!width
+% {\hfill}
+%
+% \installlistfiller\v!space
+% {\hskip.25\emwidth\relax}
+
\setuplistalternative
- [\c!command=\strictlistparameter\c!command]
+ [\c!command=\strictlistparameter\c!command,
+ \c!symbol=.]
+
+\unexpanded\def\currentlistfiller
+ {\checkedfiller{\listalternativeparameter\c!filler}}
\definelistalternative
[a]
@@ -838,12 +935,16 @@
\unexpanded\def\strc_lists_apply_renderingsetup
{\the\t_lists_every_renderingsetup
+ % now we group
+ \begingroup
\ifx\m_strc_list_alternative\empty
\edef\currentlistalternative{\listparameter\c!alternative}%
\else
\let\currentlistalternative\m_strc_list_alternative
\fi
\directsetup{\listalternativeparameter\c!renderingsetup}\relax
+ \endgroup
+ % till here, where we reset locals
\the\t_lists_every_renderingcleanup}
% todo: provide packager via attributes
@@ -856,6 +957,12 @@
% nothing, nb we use the [] syntax here because we end with a \cs
\stopsetups
+\unexpanded\def\currentlistentrytitlesynchronize
+ {\the\t_lists_every_renderingsynchronize}
+
+\unexpanded\def\currentlistentrytitlerendered
+ {\currentlistentrytitlesynchronize\currentlistentrytitle}
+
\startsetups[\??listrenderings:command]
\edef\p_command{\listalternativeparameter\c!command}%
\ifx\p_command\empty
@@ -863,7 +970,7 @@
\else
\p_command
\currentlistentrynumber
- {\the\t_lists_every_renderingsynchronize\currentlistentrytitle}%
+ \currentlistentrytitlerendered % {\currentlistentrytitlesynchronize\currentlistentrytitle}
\currentlistentrypagenumber
\fi
\stopsetups
@@ -914,7 +1021,7 @@
\listalternativeparameter\c!after
\else
\noindent % otherwise annotations are mirrored up
-\typo_injectors_mark_list
+ \typo_injectors_mark_list
\hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute {
\p_command\currentlistentrynumber\currentlistentrytitle\currentlistentrypagenumber
}
@@ -1034,7 +1141,7 @@
\endgroup
\ifdim\wd\b_strc_lists_page=\zeropoint\else
\nobreak
- \listalternativeparameter\c!filler
+ \currentlistfiller
\box\b_strc_lists_page
\fi
}
@@ -1239,7 +1346,7 @@
\definelistalternative
[\v!paragraph]
- [\c!filler=\hskip.25\emwidth,
+ [\c!filler=\v!space,
\c!renderingsetup=\??listrenderings:\v!paragraph]
\startsetups[\??listrenderings:\v!paragraph]
@@ -1301,7 +1408,7 @@
\ifconditional\c_lists_has_page
\ifconditional\c_lists_show_page
\nobreak
- \listalternativeparameter\c!filler\relax
+ \currentlistfiller
\begingroup
\useliststyleandcolor\c!pagestyle\c!pagecolor
\currentlistentrypagenumber
@@ -1342,11 +1449,45 @@
\strc_lists_interaction_check_nop
\fi}
+% \def\strc_lists_interaction_check_yes
+% {\edef\p_interaction_forward{\listparameter\c!interaction}%
+% \ifcsname\??listinteractions\p_interaction_forward\endcsname
+% \expandafter\let\expandafter\p_interaction_forward\csname\??listinteractions\p_interaction_forward\endcsname
+% \strc_references_get_simple_reference{internal(\currentlistentrylocation)}%
+% \a_strc_lists_reference\currentreferenceattribute
+% \else
+% \a_strc_lists_reference\attributeunsetvalue
+% \fi
+% \ifnum\a_strc_lists_reference=\attributeunsetvalue
+% \let\strc_lists_get_reference_attribute\gobbleoneargument
+% \let\strc_lists_set_reference_attribute\gobbleoneargument
+% \let\strc_lists_set_style_color \strc_lists_set_style_color_normal
+% \else
+% \let\strc_lists_get_reference_attribute\strc_lists_get_reference_attribute_indeed
+% \let\strc_lists_set_reference_attribute\strc_lists_set_reference_attribute_indeed
+% \let\strc_lists_set_style_color \strc_lists_set_style_color_special
+% \fi
+% \edef\p_interaction_backward{\namedheadparameter\currentlist\c!interaction}% \namedheadparameter !
+% \ifx\p_interaction_backward\v!list
+% \strc_references_set_simple_reference{*\currentlistentrylocation}%
+% \a_strc_lists_destination\currentdestinationattribute
+% \else
+% \a_strc_lists_destination\attributeunsetvalue
+% \fi
+% \ifnum\a_strc_lists_destination=\attributeunsetvalue
+% \let\strc_lists_get_destination_attribute\empty
+% \let\strc_lists_set_destination_attribute\empty
+% \else
+% \let\strc_lists_get_destination_attribute\strc_lists_get_destination_attribute_indeed
+% \let\strc_lists_set_destination_attribute\strc_lists_set_destination_attribute_indeed
+% \fi}
+
\def\strc_lists_interaction_check_yes
{\edef\p_interaction_forward{\listparameter\c!interaction}%
\ifcsname\??listinteractions\p_interaction_forward\endcsname
- \expandafter\let\expandafter\p_interaction_forward\csname\??listinteractions\p_interaction_forward\endcsname
- \strc_references_get_simple_page_reference{internal(\currentlistentrylocation)}%
+ %\expandafter\let\expandafter\p_interaction_forward\csname\??listinteractions\p_interaction_forward\endcsname
+ \expandafter\let\expandafter\p_interaction_forward\lastnamedcs
+ \strc_references_get_simple_reference{internal(\currentlistentrylocation)}%
\a_strc_lists_reference\currentreferenceattribute
\else
\a_strc_lists_reference\attributeunsetvalue
@@ -1362,7 +1503,7 @@
\fi
\edef\p_interaction_backward{\namedheadparameter\currentlist\c!interaction}% \namedheadparameter !
\ifx\p_interaction_backward\v!list
- \strc_references_set_simple_page_reference{bck:\currentlistentrylocation}%
+ \strc_references_set_simple_reference{*\currentlistentrylocation}%
\a_strc_lists_destination\currentdestinationattribute
\else
\a_strc_lists_destination\attributeunsetvalue
diff --git a/Master/texmf-dist/tex/context/base/strc-mar.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-mar.lua
index 3af9113bf85..8b30e85143e 100644
--- a/Master/texmf-dist/tex/context/base/strc-mar.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-mar.lua
@@ -26,14 +26,12 @@ local tonut = nuts.tonut
local getfield = nuts.getfield
local setfield = nuts.setfield
-local getnext = nuts.getnext
-local getprev = nuts.getprev
local getid = nuts.getid
local getlist = nuts.getlist
local getattr = nuts.getattr
local getbox = nuts.getbox
-local traversenodes = nuts.traverse
+local traverse_nodes = nuts.traverse
local nodecodes = nodes.nodecodes
local glyph_code = nodecodes.glyph
@@ -119,7 +117,7 @@ end
-- identify range
local function sweep(head,first,last)
- for n in traversenodes(head) do
+ for n in traverse_nodes(head) do
local id = getid(n)
if id == glyph_code then
local a = getattr(n,a_marks)
diff --git a/Master/texmf-dist/tex/context/base/strc-mar.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-mar.mkiv
index 8bd8c094e44..4e8df5f5dbe 100644
--- a/Master/texmf-dist/tex/context/base/strc-mar.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-mar.mkiv
@@ -120,7 +120,7 @@
% the fetchers are fully expandable: [name][method]
-\def\fetchonemark[#1]#2[#3]{\ifconditional\inhibitgetmarking\else\clf_fetchonemark {#1}{\v!page}{#2}\fi}
+\def\fetchonemark[#1]#2[#3]{\ifconditional\inhibitgetmarking\else\clf_fetchonemark {#1}{\v!page}{#3}\fi}
\def\fetchtwomarks [#1]{\ifconditional\inhibitgetmarking\else\clf_fetchtwomarks{#1}{\v!page}\fi}
\def\fetchallmarks [#1]{\ifconditional\inhibitgetmarking\else\clf_fetchallmarks{#1}{\v!page}\fi}
diff --git a/Master/texmf-dist/tex/context/base/strc-mat.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-mat.lua
index 87f35ed1d3a..87f35ed1d3a 100644
--- a/Master/texmf-dist/tex/context/base/strc-mat.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-mat.lua
diff --git a/Master/texmf-dist/tex/context/base/strc-mat.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-mat.mkiv
index 225531fa894..85870d54769 100644
--- a/Master/texmf-dist/tex/context/base/strc-mat.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-mat.mkiv
@@ -56,6 +56,56 @@
\setupformulas[\c!distance=\emwidth]
\fi
+% \ifdefined\mathdisplayskipmode
+% \mathdisplayskipmode\plustwo % only when not zero / needs adapted space handler
+% \fi
+
+% \mathdisplayskipmode\plusthree
+%
+% \hbox\bgroup
+% \setbox0\vbox\bgroup
+% xxxxxxxxx\par
+% \vskip-\baselineskip
+% $$a^2_2$$\par
+% xxxxxxxxx\par
+% \egroup
+% \box0
+% \vbox\bgroup
+% xxxxxxxxx\par
+% \vskip-\baselineskip
+% $$a^2$$\par
+% xxxxxxxxx\par
+% \egroup
+% \vbox\bgroup
+% xxxxxxxxx
+% \vskip-\baselineskip
+% $$a_2$$
+% xxxxxxxxx
+% \egroup
+% \egroup
+%
+% \hbox\bgroup
+% \setbox0\vbox\bgroup
+% xxxxxxxxx\par
+% \ctxlua{tex.prevdepth=-1000 *65536}
+% $$a^2_2$$\par
+% xxxxxxxxx\par
+% \egroup
+% \box0
+% \vbox\bgroup
+% xxxxxxxxx\par
+% \ctxlua{tex.prevdepth=-1000 *65536}
+% $$a^2$$\par
+% xxxxxxxxx\par
+% \egroup
+% \vbox\bgroup
+% xxxxxxxxx
+% \ctxlua{tex.prevdepth=-1000 *65536}
+% $$a_2$$
+% xxxxxxxxx
+% \egroup
+% \egroup
+
\setupsubformulas % subformulas could be last in chain
[\c!indentnext=\formulaparameter\c!indentnext]
@@ -197,7 +247,7 @@
\glet\strc_formulas_place_number_nested\strc_formulas_place_number_nested_indeed}
\def\strc_formulas_handle_number % formulas
- {\strc_formulas_check_reference\c_strc_formulas_number_mode\currentformulareference}
+ {\strc_formulas_check_reference\c_strc_formulas_number_mode\currentformulasreference}
\def\strc_formulas_handle_sub_number_indeed % sub formulas
{\strc_formulas_check_reference\c_strc_formulas_sub_number_mode\currentsubformulasreference
@@ -420,7 +470,7 @@
% subcounter
\ifconditional\c_strc_formulas_inside_formulas_sub
\ifcase\c_strc_formulas_sub_number_mode
- % nothing
+ \strc_formulas_handle_sub_numbering % was nothing
\or
\strc_formulas_handle_sub_numbering
\or
@@ -579,7 +629,7 @@
\let\strc_formulas_start_formula\strc_formulas_start_formula_nested
%\freezedimenmacro\predisplaysizethreshhold
\strc_formulas_forget_display_skips
- \getvalue{\e!start\formulaparameter\c!alternative\v!formula}}
+ \csname\e!start\formulaparameter\c!alternative\v!formula\endcsname}
\unexpanded\def\strc_formulas_start_formula_nested#1%
{\bgroup
@@ -597,7 +647,7 @@
\strc_formulas_place_number
\dostoptagged
\dostarttagged\t!formulacontent\empty
- \getvalue{\e!stop\formulaparameter\c!alternative\v!formula}%
+ \csname\e!stop\formulaparameter\c!alternative\v!formula\endcsname
\dostoptagged
\dostoptagged
\nonoindentation
@@ -835,12 +885,12 @@
\unexpanded\def\formulanumber
{\strc_formulas_number} % for the moment
-\def\strc_formulas_number
+\unexpanded\def\strc_formulas_number
{\dosingleempty\strc_formulas_number_again}
-\def\strc_formulas_number_again[#1]%
+\unexpanded\def\strc_formulas_number_again[#1]%
{\def\currentformulareference{#1}%
- \dosinglegroupempty\strc_formulas_number_indeed}
+ \strc_formulas_number_indeed}
\unexpanded\def\placeformula
{\global\settrue\c_strc_formulas_inside_place
@@ -852,27 +902,80 @@
\setfalse\c_strc_formulas_increment
\dosingleempty\strc_formulas_place}
-\def\strc_formulas_place[#1]%
+\unexpanded\def\strc_formulas_place[#1]%
{\def\currentplaceformulareference{#1}%
\let\currentplaceformulasuffix\empty
- \doifelsenextbgroup\strc_formulas_place_yes\strc_formulas_place_nop\strc_formulas_place_nop} % [ref]{}
+ \doifelsenextbgroup\strc_formulas_place_yes\strc_formulas_place_nop} % [ref]{}
-\def\strc_formulas_place_yes#1%
+\unexpanded\def\strc_formulas_place_yes#1%
{\def\currentplaceformulasuffix{#1}%
\strc_formulas_place_nop}
-\def\strc_formulas_place_nop
+\unexpanded\def\strc_formulas_place_nop
{\doifelsenextchar$\strc_formulas_place_pickup\strc_formulas_place_indeed} % [ref]$$ [ref]\start
-\def\strc_formulas_place_indeed
+\unexpanded\def\strc_formulas_place_indeed
{\strc_formulas_place_numbering}
-\def\strc_formulas_place_pickup$$#1$$%
+\unexpanded\def\strc_formulas_place_pickup$$#1$$%
{\strc_formulas_place_numbering
\strc_formulas_start_formula{}#1\strc_formulas_stop_formula}
-\let\startplaceformula\placeformula
-\let\stopplaceformula \relax
+% \let\startplaceformula\placeformula
+% \let\stopplaceformula \relax
+
+% \startplaceformula \startformula e=mc^2 \stopformula \stopplaceformula
+% \startplaceformula[-] \startformula e=mc^2 \stopformula \stopplaceformula
+% \startplaceformula[x] \startformula e=mc^2 \stopformula \stopplaceformula
+% \startplaceformula[reference=foo] \startformula e=mc^2 \stopformula \stopplaceformula
+% \startplaceformula[title=whatever] \startformula e=mc^2 \stopformula \stopplaceformula
+% \startplaceformula[suffix=x] \startformula e=mc^2 \stopformula \stopplaceformula
+
+\unexpanded\def\startplaceformula{\dosingleempty\strc_formulas_start_place}
+\unexpanded\def\stopplaceformula {\strc_formulas_stop_place}
+
+\let\currentplaceformulareference\empty
+\let\currentplaceformulasuffix \empty
+
+\def\strc_formulas_start_place
+ {\begingroup
+ \global\settrue\c_strc_formulas_inside_place
+ \iffirstargument
+ \expandafter\strc_formulas_start_place_yes
+ \else
+ \expandafter\strc_formulas_start_place_nop
+ \fi}
+
+\def\strc_formulas_start_place_yes[#1]%
+ {\doifassignmentelse{#1}\strc_formulas_start_place_parameters\strc_formulas_start_place_reference[#1]}
+
+\def\strc_formulas_start_place_nop[#1]%
+ {\let\currentplaceformulareference\empty
+ \let\currentplaceformulasuffix \empty
+ \strc_formulas_place_nop}
+
+\def\strc_formulas_start_place_reference[#1]%
+ {\edef\currentplaceformulareference{#1}%
+ \let\currentplaceformulasuffix\empty
+ %\doifelsenextbgroup\strc_formulas_place_yes\strc_formulas_place_nop} % [ref]{}
+ \strc_formulas_place_nop}
+
+\def\strc_formulas_start_place_parameters[#1]%
+ {\letdummyparameter\c!title \empty
+ \letdummyparameter\c!reference\empty
+ \letdummyparameter\c!suffix \empty
+ \getdummyparameters[#1]%
+ \edef\currentplaceformulatitle {\dummyparameter\c!title}%
+ \edef\currentplaceformulareference{\dummyparameter\c!reference}%
+ \edef\currentplaceformulasuffix {\dummyparameter\c!suffix}%
+ \ifx\currentplaceformulatitle\empty\else
+ \normalexpanded{\setformulalistentry{\currentplaceformulatitle}}%
+ \fi
+ \doifelsenextbgroup\strc_formulas_place_yes\strc_formulas_place_nop} % [ref]{}
+
+\def\strc_formulas_stop_place
+ {\relax
+ \endgroup}
% to be checked
@@ -905,7 +1008,7 @@
\unexpanded\def\placenamedformula
{\dosingleempty\strc_formulase_place_named}
-\def\strc_formulase_place_named
+\unexpanded\def\strc_formulase_place_named
{\iffirstargument
\expandafter\strc_formulase_place_named_yes
\else
diff --git a/Master/texmf-dist/tex/context/base/strc-not.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-not.lua
index 71eccf1cec2..ddbd2ae06eb 100644
--- a/Master/texmf-dist/tex/context/base/strc-not.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-not.lua
@@ -32,7 +32,7 @@ lists.enhancers = lists.enhancers or { }
storage.register("structures/notes/states", notes.states, "structures.notes.states")
local notestates = notes.states
-local notedata = { }
+local notedata = table.setmetatableindex("table")
local variables = interfaces.variables
local context = context
@@ -51,10 +51,6 @@ local function store(tag,n)
end
--
local nd = notedata[tag]
- if not nd then
- nd = { }
- notedata[tag] = nd
- end
local nnd = #nd + 1
nd[nnd] = n
local state = notestates[tag]
@@ -66,7 +62,7 @@ local function store(tag,n)
end
state.start = state.start or nnd
end
- return #nd
+ return nnd
end
notes.store = store
@@ -79,25 +75,22 @@ implement {
local function get(tag,n) -- tricky ... only works when defined
local nd = notedata[tag]
+ if not n then
+ n = #nd
+ end
+ nd = nd[n]
if nd then
- n = n or #nd
- nd = nd[n]
- if nd then
- if trace_notes then
- report_notes("getting note %a of %a with listindex %a",n,tag,nd)
- end
- -- is this right?
--- local newdata = lists.collected[nd]
- local newdata = lists.cached[nd]
--- local newdata = lists.tobesaved[nd]
- return newdata
+ if trace_notes then
+ report_notes("getting note %a of %a with listindex %a",n,tag,nd)
end
+ -- is this right?
+ local newdata = lists.cached[nd]
+ return newdata
end
end
local function getn(tag)
- local nd = notedata[tag]
- return nd and #nd or 0
+ return #notedata[tag]
end
notes.get = get
@@ -302,85 +295,51 @@ implement {
actions = notes.postpone
}
-function notes.setsymbolpage(tag,n,l)
- local l = l or listindex(tag,n)
- if l then
- local p = texgetcount("realpageno")
- if trace_notes or trace_references then
- report_notes("note %a of %a with list index %a gets symbol page %a",n,tag,l,p)
- end
- local entry = lists.cached[l]
- if entry then
- entry.references.symbolpage = p
- else
- report_notes("internal error: note %a of %a is not flushed",n,tag)
- end
- else
- report_notes("internal error: note %a of %a is not initialized",n,tag)
- end
-end
-
-implement {
- name = "setnotesymbolpage",
- actions = notes.setsymbolpage,
- arguments = { "string", "integer" }
-}
-
-local function getsymbolpage(tag,n)
- local li = internal(tag,n)
- li = li and li.references
- li = li and (li.symbolpage or li.realpage) or 0
- if trace_notes or trace_references then
- report_notes("page number of note symbol %a of %a is %a",n,tag,li)
- end
- return li
-end
-
-local function getnumberpage(tag,n)
+local function getinternal(tag,n)
local li = internal(tag,n)
- li = li and li.references
- li = li and li.realpage or 0
- if trace_notes or trace_references then
- report_notes("page number of note number %s of %a is %a",n,tag,li)
+ if li then
+ local references = li.references
+ if references then
+ return references.internal or 0
+ end
end
- return li
+ return 0
end
local function getdeltapage(tag,n)
-- 0:unknown 1:textbefore, 2:textafter, 3:samepage
- local what = 0
- -- references.internals[lists.tobesaved[nd].internal]
local li = internal(tag,n)
if li then
local references = li.references
if references then
- local symbolpage = references.symbolpage or 0
- local notepage = references.realpage or 0
+ -- local symb = structures.references.collected[""]["symb:"..tag..":"..n]
+ local rymb = structures.references.collected[""]
+ local symb = rymb and rymb["*"..(references.internal or 0)]
+ local notepage = references.realpage or 0
+ local symbolpage = symb and symb.references.realpage or -1
if trace_references then
report_notes("note number %a of %a points from page %a to page %a",n,tag,symbolpage,notepage)
end
if notepage < symbolpage then
- what = 3 -- after
+ return 3 -- after
elseif notepage > symbolpage then
- what = 2 -- before
+ return 2 -- before
elseif notepage > 0 then
- what = 1 -- same
+ return 1 -- same
end
else
-- might be a note that is not flushed due to to deep
-- nesting in a vbox
end
end
- return what
+ return 0
end
-notes.getsymbolpage = getsymbolpage
-notes.getnumberpage = getnumberpage
-notes.getdeltapage = getdeltapage
+notes.getinternal = getinternal
+notes.getdeltapage = getdeltapage
-implement { name = "notesymbolpage", actions = { getsymbolpage, context }, arguments = { "string", "integer" } }
-implement { name = "notenumberpage", actions = { getnumberpage, context }, arguments = { "string", "integer" } }
-implement { name = "notedeltapage", actions = { getdeltapage, context }, arguments = { "string", "integer" } }
+implement { name = "noteinternal", actions = { getinternal, context }, arguments = { "string", "integer" } }
+implement { name = "notedeltapage", actions = { getdeltapage, context }, arguments = { "string", "integer" } }
local function flushnotes(tag,whatkind,how) -- store and postpone
local state = notestates[tag]
diff --git a/Master/texmf-dist/tex/context/base/strc-not.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-not.mkvi
index 25a1072a3e7..edbbf92b3fc 100644
--- a/Master/texmf-dist/tex/context/base/strc-not.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-not.mkvi
@@ -22,6 +22,7 @@
% todo: see if we can now use \insertpenalties (>0 == some left)
\ifdefined\dotagsetnotesymbol \else \let\dotagsetnotesymbol\relax \fi
+\ifdefined\dotagsetnotation \else \let\dotagsetnotation \relax \fi
\unexpanded\def\unvboxed {\ifvmode\unvbox \else\box \fi} % will change or used more often
\unexpanded\def\unvcopied{\ifvmode\unvcopy\else\copy\fi} % will change or used more often
@@ -224,49 +225,57 @@
\unexpanded\def\strc_notations_reset{\strc_constructions_reset_indeed\namednotationparameter} % #1#2
%unexpanded\def\strc_notations_set {\strc_constructions_set_indeed \namednotationparameter} % #1#2
+\newconditional\c_strc_notations_anchored_next
+
+\def\strc_notations_finalize
+ {\ifconditional\c_strc_notations_anchored_next
+ \expandafter\strc_notations_finalize_next
+ \else
+ \expandafter\strc_notations_finalize_previous
+ \fi}
+
+\def\strc_notations_finalize_previous
+ {\normalexpanded{\endgroup\noteparameter\c!next}}
+
+\def\strc_notations_finalize_next
+ {\endgroup\ignorespaces}
+
\unexpanded\def\strc_notations_command#tag%
{\begingroup
\edef\currentnote{#tag}%
\strc_constructions_initialize{#tag}%
\strc_notes_synchronize
+ \edef\p_next{\noteparameter\c!anchor}%
+ \ifx\p_next\v!next % for now only two states
+ \settrue \c_strc_notations_anchored_next
+ \else
+ \setfalse\c_strc_notations_anchored_next
+ \fi
\ifnotesenabled
\strc_counters_increment_sub\currentconstructionnumber\currentconstructionlevel
\fi
\doifelsenextoptionalcs\strc_notations_command_yes\strc_notations_command_nop}
\unexpanded\def\strc_notations_command_nop#title%
- {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#title},\c!bookmark=,\c!list=][]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#title},\c!bookmark=,\c!list=]%
\csname\??constructionnotehandler\currentconstructionhandler\endcsname
\strc_constructions_finalize
- \normalexpanded{\endgroup\noteparameter\c!next}}
+ \strc_notations_finalize}
\unexpanded\def\strc_notations_command_yes[#optional]%
{\doifelseassignment{#optional}\strc_notations_command_assignment\strc_notations_command_argument[#optional]}
\unexpanded\def\strc_notations_command_assignment[#settings]%
- {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=,#settings][]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=,#settings]%
\csname\??constructionnotehandler\currentconstructionhandler\endcsname
\strc_constructions_finalize
- \normalexpanded{\endgroup\noteparameter\c!next}}
+ \strc_notations_finalize}
\unexpanded\def\strc_notations_command_argument[#reference]#title%
- {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference={#reference},\c!title={#title},\c!bookmark=,\c!list=][]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference={#reference},\c!title={#title},\c!bookmark=,\c!list=]%
\csname\??constructionnotehandler\currentconstructionhandler\endcsname
\strc_constructions_finalize
- \normalexpanded{\endgroup\noteparameter\c!next}}
-
-% \unexpanded\def\strc_notations_start#tag#stoptag%
-% {\begingroup
-% \edef\currentnote{#tag}%
-% \strc_constructions_initialize{#tag}%
-% \strc_notes_synchronize
-% \ifnotesenabled
-% \strc_counters_increment_sub\currentconstructionnumber\currentconstructionlevel
-% \fi
-% \normalexpanded % not that efficient but also not that frequently used (\normaldef for parser)
-% {\normaldef\noexpand\strc_pickup_yes[##1]##2\csname\e!stop#stoptag\endcsname{\strc_notations_command_yes[##1]{##2}}%
-% \normaldef\noexpand\strc_pickup_nop ##1\csname\e!stop#stoptag\endcsname{\strc_notations_command_nop {##1}}}%
-% \doifnextoptionalcselse\strc_pickup_yes\strc_pickup_nop}
+ \strc_notations_finalize}
\unexpanded\def\strc_notations_start#tag#stoptag%
{\begingroup
@@ -282,16 +291,16 @@
\doifelsenextoptionalcs\strc_pickup_yes\strc_pickup_nop}
\unexpanded\def\strc_notations_start_yes[#reference]#title%
- {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference={#reference},\c!title={#title},\c!bookmark=,\c!list=][]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference={#reference},\c!title={#title},\c!bookmark=,\c!list=]%
\csname\??constructionnotehandler\currentconstructionhandler\endcsname
\strc_constructions_finalize
- \normalexpanded{\endgroup\noteparameter\c!next}}
+ \strc_notations_finalize}
\unexpanded\def\strc_notations_start_nop#title%
- {\strc_constructions_register[\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#title},\c!bookmark=,\c!list=][]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#title},\c!bookmark=,\c!list=]%
\csname\??constructionnotehandler\currentconstructionhandler\endcsname
\strc_constructions_finalize
- \normalexpanded{\endgroup\noteparameter\c!next}}
+ \strc_notations_finalize}
\unexpanded\def\strc_notations_stop
{}
@@ -315,6 +324,7 @@
\startsetups[\??constructionrenderings:\v!note]
\noindent
+ \leftboundary % experiment, to be done in more places
\llap{\box\constructionheadbox\hskip\constructionparameter\c!distance}%
\useconstructionstyleandcolor\c!style\c!color
\ignorespaces
@@ -337,6 +347,7 @@
\c!rule=\v!on,
\c!before=\blank,
\c!bodyfont=\v!small,
+ \c!anchor=, % can also be v!next
%\c!style=,
%\c!color=,
%\c!after=,
@@ -442,9 +453,6 @@
\settrue\processingnote
\ifconditional\c_strc_notes_skip
\globallet\lastnotesymbol\strc_notes_inject_symbol_nop
- \ifconditional\c_strc_notes_delayed
- \strc_notes_inject_symbol_snc
- \fi
\else
\iftypesettinglines % otherwise problems with \type <crlf> {xxx}
\ignorelines % makes footnotes work in \startlines ... \stoplines
@@ -460,13 +468,11 @@
\global\settrue\postponednote
\else\ifconditional\inlocalnotes % todo: per note class
\global\settrue\postponednote
+ \else\ifconditional\c_strc_notes_delayed
+ % probably end notes
\else
-\ifconditional\c_strc_notes_delayed
- % probably end notes
-\else
\handlenoteinsert\currentnote\currentnotenumber % either an insert or just delayed
-\fi
- \fi\fi
+ \fi\fi\fi
\endgroup
\fi
\fi
@@ -507,6 +513,9 @@
\newconstant\a_strc_notes_text_reference
\newconstant\a_strc_notes_text_destination
+\let\strc_notes_get_reference_attribute_symbol \empty
+\let\strc_notes_get_destination_attribute_symbol\empty
+
\def\strc_notes_interaction_check_inline
{\edef\p_interaction{\noteparameter\c!interaction}%
\csname\??noteinteractioninline
@@ -519,58 +528,111 @@
\ifcsname\??noteinteractiondisplay\p_interaction\endcsname\p_interaction\else\v!no\fi
\endcsname}
-\setvalue{\??noteinteractioninline\v!yes}%
- {\strc_references_get_simple_page_reference{page(\clf_notenumberpage{\currentnote}\currentnotenumber)}%
- \edef\strc_notes_get_reference_attribute_symbol{attr\referenceattribute\currentreferenceattribute}%
- \let \strc_notes_set_style_color_inline \strc_notes_set_style_color_inline_yes}
+\def\currentnotenumber{0}
-\setvalue{\??noteinteractioninline\v!all}%
- {%\strc_references_get_simple_page_reference{note:\cldcontext{structures.notes.internalid("\currentnote",\currentnotenumber)}}%
- \strc_references_get_simple_page_reference{note:\currentnote:\currentnotenumber}%
- \edef\strc_notes_get_reference_attribute_symbol{attr\referenceattribute\currentreferenceattribute}%
- \let \strc_notes_set_style_color_inline \strc_notes_set_style_color_inline_yes}
+\let\strc_notes_get_reference_attribute_symbol \empty
+\let\strc_notes_get_destination_attribute_symbol\empty
-\setvalue{\??noteinteractioninline\v!no}%
- {\let\strc_notes_get_reference_attribute_symbol\empty
- \let\strc_notes_set_style_color_inline \strc_notes_set_style_color_inline_nop}
+\let\strc_notes_set_reference_attribute_number\donothing
+\let\strc_notes_set_reference_attribute_text \donothing
+\let\strc_notes_set_destination_attribute_text\donothing
+
+% inline
-\expandafter\let\csname\??noteinteractioninline\v!number\expandafter\endcsname\csname\??noteinteractioninline\v!yes\endcsname
-\expandafter\let\csname\??noteinteractioninline\v!text \expandafter\endcsname\csname\??noteinteractioninline\v!yes\endcsname
+\def\strc_references_prepare_inline_references_nop
+ {\let\strc_notes_get_reference_attribute_symbol\empty
+ \let\strc_notes_get_destination_attribute_symbol\empty
+ \let\strc_notes_set_style_color_inline\strc_notes_set_style_color_inline_nop}
+
+% \def\strc_references_prepare_inline_references_yes
+% {\strc_references_set_simple_reference{symb:\currentnote:\currentnotenumber}% destination
+% \strc_references_get_simple_reference{internal(\clf_noteinternal{\currentnote}\currentnotenumber)}% reference
+% \edef\strc_notes_get_destination_attribute_symbol{attr\destinationattribute\currentdestinationattribute}%
+% \edef\strc_notes_get_reference_attribute_symbol{attr\referenceattribute\currentreferenceattribute}%
+% \let\strc_notes_set_style_color_inline\strc_notes_set_style_color_inline_yes}
+
+\def\strc_references_prepare_inline_references_yes
+ {\edef\currentnoteinternal{\clf_noteinternal{\currentnote}\currentnotenumber}%
+ \strc_references_set_simple_reference{*\currentnoteinternal}% destination
+ \strc_references_get_simple_reference{internal(\currentnoteinternal)}% reference
+ \edef\strc_notes_get_destination_attribute_symbol{attr\destinationattribute\currentdestinationattribute}%
+ \edef\strc_notes_get_reference_attribute_symbol{attr\referenceattribute\currentreferenceattribute}%
+ \let\strc_notes_set_style_color_inline\strc_notes_set_style_color_inline_yes}
-% page(...) : we could have a dedicated one
+\letvalue{\??noteinteractioninline\v!no }\strc_references_prepare_inline_references_nop
+\letvalue{\??noteinteractioninline\v!all }\strc_references_prepare_inline_references_yes
+\letvalue{\??noteinteractioninline\v!number}\strc_references_prepare_inline_references_yes
+\letvalue{\??noteinteractioninline\v!text }\strc_references_prepare_inline_references_yes
+\letvalue{\??noteinteractioninline\v!yes }\strc_references_prepare_inline_references_yes
-\setvalue{\??noteinteractiondisplay\v!yes}%
- {\strc_references_get_simple_page_reference{page(\clf_notesymbolpage{\currentnote}\currentnotenumber)}%
- \edef\strc_notes_set_reference_attribute_number{\attribute\referenceattribute\currentreferenceattribute}%
- \let \strc_notes_set_reference_attribute_text \donothing
- \let \strc_notes_set_destination_attribute_text\donothing
- \let \strc_notes_set_style_color_display \strc_notes_set_style_color_display_yes}
+% display (for 'all' we need unique text and number attributes so we resolve twice
+% as we otherwise don't get the number one which is lapped in the margin so we need
+% to explicitly visit it)
-\setvalue{\??noteinteractiondisplay\v!no}%
+\def\strc_references_prepare_display_references_nop
{\let\strc_notes_set_reference_attribute_number\donothing
- \let\strc_notes_set_reference_attribute_text \donothing
+ \let\strc_notes_set_reference_attribute_text\donothing
\let\strc_notes_set_destination_attribute_text\donothing
- \let\strc_notes_set_style_color_display \strc_notes_set_style_color_display_nop}
-
-\setvalue{\??noteinteractiondisplay\v!all}%
- {\strc_references_get_simple_page_reference{page(\clf_notesymbolpage{\currentnote}\currentnotenumber)}%
- \edef\strc_notes_set_reference_attribute_text {\attribute\referenceattribute\currentreferenceattribute}%
- %\strc_references_set_simple_page_reference{note:\cldcontext{structures.notes.internalid("\currentnote",\currentnotenumber)}}%
- \strc_references_set_simple_page_reference{note:\currentnote:\currentnotenumber}%
- \edef\strc_notes_set_destination_attribute_text{\attribute\destinationattribute\currentdestinationattribute}%
- \let \strc_notes_set_reference_attribute_number\strc_notes_set_reference_attribute_text
- \let \strc_notes_set_style_color_display \strc_notes_set_style_color_display_yes}
-
-\setvalue{\??noteinteractiondisplay\v!text}%
- {\strc_references_get_simple_page_reference{page(\clf_notesymbolpage{\currentnote}\currentnotenumber)}%
- \edef\strc_notes_set_reference_attribute_text {\attribute\referenceattribute\currentreferenceattribute}%
- %\strc_references_set_simple_page_reference{note:\cldcontext{structures.notes.internalid("\currentnote",\currentnotenumber)}}%
- \strc_references_set_simple_page_reference{note:\currentnote:\currentnotenumber}%
- \edef\strc_notes_set_destination_attribute_text{\attribute\destinationattribute\currentdestinationattribute}%
- \let \strc_notes_set_reference_attribute_number\donothing
- \let \strc_notes_set_style_color_display \strc_notes_set_style_color_display_yes}
-
-\expandafter\let\csname\??noteinteractiondisplay\v!number\expandafter\endcsname\csname\??noteinteractiondisplay\v!yes\endcsname
+ \let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_nop}
+
+% \def\strc_references_prepare_display_references_yes_number
+% {\let\strc_notes_set_reference_attribute_text\donothing
+% \strc_references_get_simple_reference{symb:\currentnote:\currentnotenumber}% reference
+% \edef\strc_notes_set_reference_attribute_number{\attribute\referenceattribute\currentreferenceattribute}%
+% \let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_yes}
+
+% \def\strc_references_prepare_display_references_yes_text
+% {\strc_references_get_simple_reference{symb:\currentnote:\currentnotenumber}% reference
+% \edef\strc_notes_set_reference_attribute_text{\attribute\referenceattribute\currentreferenceattribute}%
+% \let\strc_notes_set_reference_attribute_number\donothing
+% \let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_yes}
+
+% \def\strc_references_prepare_display_references_yes_all
+% {\strc_references_get_simple_reference{symb:\currentnote:\currentnotenumber}% reference
+% \edef\strc_notes_set_reference_attribute_text{\attribute\referenceattribute\currentreferenceattribute}%
+% \strc_references_get_simple_reference{symb:\currentnote:\currentnotenumber}% reference
+% \edef\strc_notes_set_reference_attribute_number{\attribute\referenceattribute\currentreferenceattribute}%
+% \let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_yes}
+
+\def\strc_references_prepare_display_references_yes_number
+ {\edef\currentnoteinternal{\clf_noteinternal{\currentnote}\currentnotenumber}%
+ \ifcase\currentnoteinternal\relax
+ \strc_references_prepare_display_references_nop
+ \else
+ \let\strc_notes_set_reference_attribute_text\donothing
+ \strc_references_get_simple_reference{*\currentnoteinternal}% reference
+ \edef\strc_notes_set_reference_attribute_number{\attribute\referenceattribute\currentreferenceattribute}%
+ \let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_yes
+ \fi}
+
+\def\strc_references_prepare_display_references_yes_text
+ {\edef\currentnoteinternal{\clf_noteinternal{\currentnote}\currentnotenumber}%
+ \ifcase\currentnoteinternal\relax
+ \strc_references_prepare_display_references_nop
+ \else
+ \strc_references_get_simple_reference{*\currentnoteinternal}% reference
+ \edef\strc_notes_set_reference_attribute_text{\attribute\referenceattribute\currentreferenceattribute}%
+ \let\strc_notes_set_reference_attribute_number\donothing
+ \let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_yes
+ \fi}
+
+\def\strc_references_prepare_display_references_yes_all
+ {\edef\currentnoteinternal{\clf_noteinternal{\currentnote}\currentnotenumber}%
+ \ifcase\currentnoteinternal\relax
+ \strc_references_prepare_display_references_nop
+ \else
+ \strc_references_get_simple_reference{*\currentnoteinternal}% reference
+ \edef\strc_notes_set_reference_attribute_text{\attribute\referenceattribute\currentreferenceattribute}%
+ \strc_references_get_simple_reference{*\currentnoteinternal}% reference
+ \edef\strc_notes_set_reference_attribute_number{\attribute\referenceattribute\currentreferenceattribute}%
+ \let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_yes
+ \fi}
+
+\letvalue{\??noteinteractiondisplay\v!no }\strc_references_prepare_display_references_nop
+\letvalue{\??noteinteractiondisplay\v!all }\strc_references_prepare_display_references_yes_all
+\letvalue{\??noteinteractiondisplay\v!number}\strc_references_prepare_display_references_yes_number
+\letvalue{\??noteinteractiondisplay\v!text }\strc_references_prepare_display_references_yes_text
+\letvalue{\??noteinteractiondisplay\v!yes }\strc_references_prepare_display_references_yes_number
\let\strc_notes_set_style_color_inline_nop \usenotestyleandcolor
\let\strc_notes_set_style_color_display_nop\usenotationstyleandcolor
@@ -599,6 +661,7 @@
% a criterium
% \strc_notes_interaction_check_display
\strc_notes_set_reference_attribute_number
+ \dotagsetnotation
\strc_notes_set_style_color_display\c!headstyle\c!headcolor
\strc_enumerations_text
\endgroup}
@@ -616,52 +679,57 @@
\noteparameter\c!symbolcommand{\symbol[\v!note:\v!previouspage]}%
\fi}
-\unexpanded\def\strc_notes_register_note_page % called more often than needed
- {\iftrialtypesetting \else
- \normalexpanded{\noexpand\ctxlatecommand{setnotesymbolpage("\currentnote",\currentnotenumber)}}%
- \fi}
-
\unexpanded\def\strc_notes_inject_symbol_yes
{\strc_notes_inject_symbol_indeed\conditionaltrue}
\unexpanded\def\strc_notes_inject_symbol_nop
{\strc_notes_inject_symbol_indeed\conditionalfalse}
-% % this flushes the data to the list
-%
-% \unexpanded\def\strc_notes_inject_symbol_snc
-% {\currentconstructionsynchronize}
+\definemargindata
+ [strc_notes_destination_margin]
+ [\v!left]
+ [\c!margin=\zeropoint,
+ \c!width=\zeropoint,
+ \c!style=,
+ \c!color=]
+
+% \unexpanded\def\strc_notes_destination_hack
+% {\ifx\strc_notes_get_destination_attribute_symbol\empty\else
+% \strc_notes_destination_hack_indeed
+% \fi}
%
-% but instead we need to do this with the content
-
-\unexpanded\def\strc_notes_inject_symbol_snc % so this will go away probably
- {}
+% \unexpanded\def\strc_notes_destination_hack_indeed % can be a helper
+% {\strc_notes_destination_margin
+% {\setbox\scratchbox\hpack \strc_notes_get_destination_attribute_symbol{}%
+% \wd\scratchbox\makeupwidth
+% \ht\scratchbox\strutht
+% \dp\scratchbox\strutdp
+% \hpack to \zeropoint{\box\scratchbox\hss}}}
\unexpanded\def\strc_notes_inject_symbol_indeed#synchronize%
- {\removeunwantedspaces
- \doifelseitalic\/\donothing % Charles IV \footnote{the fourth}
+ {\ifconditional\c_strc_notations_anchored_next\else
+ \removeunwantedspaces
+ \doifelseitalic\/\donothing % Charles IV \footnote{the fourth}
+ \fi
\ifdim\lastkern=\notesignal
% \kern\noteparameter\c!distance % yes or no note font? or main text
\strc_notes_inject_separator
\fi
\nobreak
\begingroup
- \ifconditional#synchronize\relax
- \strc_notes_inject_symbol_snc % this flushes the data to the list
- \fi
- \strc_notes_register_note_page % this registers the symbol page number (late)
\strc_notes_interaction_check_inline
\strc_notes_set_style_color_inline\c!textstyle\c!textcolor
- \hbox \strc_notes_get_reference_attribute_symbol \bgroup
- \dostarttagged\t!descriptionsymbol\currentnote
- \dotagsetnotesymbol
- \noteparameter\c!textcommand{\clf_noteprefixednumber{\currentnote}\currentnotenumber\relax}%
- % the next one can cycle so we need to make sure it has no advance width
- \doif{\noteparameter\c!indicator}\v!yes\strc_notes_inject_pointer
- \dostoptagged
+ \hbox \strc_notes_get_reference_attribute_symbol \strc_notes_get_destination_attribute_symbol \bgroup
+ % \hbox \strc_notes_get_reference_attribute_symbol \bgroup \strc_notes_destination_hack
+ \strc_references_flush_destination_nodes % a bit late but ok
+ \dostarttagged\t!descriptionsymbol\currentnote
+ \dotagsetnotesymbol
+ \noteparameter\c!textcommand{\clf_noteprefixednumber{\currentnote}\currentnotenumber\relax}%
+ % the next one can cycle so we need to make sure it has no advance width
+ \doif{\noteparameter\c!indicator}\v!yes\strc_notes_inject_pointer
+ \dostoptagged
\egroup
\endgroup
-% \dostoptagged % check
\globallet\lastnotesymbol\relax}
\unexpanded\def\strc_notes_inject_dummy % temp hack
@@ -672,7 +740,7 @@
\strc_notes_inject_separator
\fi
\nobreak
- \hbox to .5\emwidth{}%
+ \hpack to .5\emwidth{}%
\globallet\lastnotesymbol\relax}
\unexpanded\def\strc_notes_inject_separator % patch by WS due to request on list
@@ -814,8 +882,8 @@
\installcorenamespace{notepenalty}
\installcorenamespace{noterule}
-\def\currentnoterulecommand{\csname\??notecommand\currentnote\endcsname}
-\def\currentnoterulealign {\csname\??notealign \currentnote\endcsname}
+\def\currentnoterulecommand{\begincsname\??notecommand\currentnote\endcsname}
+\def\currentnoterulealign {\begincsname\??notealign \currentnote\endcsname}
\def\currentnoterulecommandcommand{\noteparameter\c!rulecommand}
\def\currentnoterulecommandnormal {\normalnoterule} % no let as it can be changed afterwards
@@ -831,18 +899,25 @@
\def\strc_notes_set_rule
{\letcurrentnoterulecommand\relax % so we default to nothing
+ \letcurrentnoterulealign \relax
\processcommacommand[\noteparameter\c!rule]\strc_notes_set_rule_step}
\def\strc_notes_set_rule_step#alternative%
- {\csname\??noterule\ifcsname\??noterule#alternative\endcsname#alternative\else\s!unknown\fi\endcsname}
-
-\setvalue{\??noterule\v!command}{\letcurrentnoterulecommand\currentnoterulecommandcommand}
-\setvalue{\??noterule \v!on}{\letcurrentnoterulecommand\currentnoterulecommandnormal}
-\setvalue{\??noterule \v!normal}{\letcurrentnoterulecommand\currentnoterulecommandnormal}
-\setvalue{\??noterule \v!left}{\letcurrentnoterulealign \lefttoright}
-\setvalue{\??noterule \v!right}{\letcurrentnoterulealign \righttoleft}
-\setvalue{\??noterule \v!off}{\letcurrentnoterulecommand\relax}
-%setvalue{\??noterule\s!unknown}{\letcurrentnoterulecommand\currentnoterulecommandunknown} % obsolete
+ {\begincsname\??noterule#alternative\endcsname}
+
+\def\strc_notes_set_rule_autodir
+ {\doifelserighttoleftinbox\currentnoteinsertionnumber\righttoleft\lefttoright}
+
+\setvalue{\??noterule \v!command}{\letcurrentnoterulecommand\currentnoterulecommandcommand}
+\setvalue{\??noterule \v!on}{\letcurrentnoterulecommand\currentnoterulecommandnormal}
+\setvalue{\??noterule \v!normal}{\letcurrentnoterulecommand\currentnoterulecommandnormal}
+\setvalue{\??noterule \v!left}{\letcurrentnoterulecommand\currentnoterulecommandnormal
+ \letcurrentnoterulealign \lefttoright}
+\setvalue{\??noterule \v!right}{\letcurrentnoterulecommand\currentnoterulecommandnormal
+ \letcurrentnoterulealign \righttoleft}
+\setvalue{\??noterule\v!paragraph}{\letcurrentnoterulecommand\currentnoterulecommandnormal
+ \letcurrentnoterulealign \strc_notes_set_rule_autodir}
+\setvalue{\??noterule \v!off}{\letcurrentnoterulecommand\relax}
\appendtoks
\strc_notes_set_rule
@@ -850,7 +925,7 @@
\def\currentnotepenalty
{\ifcsname\??notepenalty\noteparameter\c!split\endcsname
- \csname\??notepenalty\noteparameter\c!split\endcsname
+ \lastnamedcs
\else
\numexpr\noteparameter\c!split\relax
\fi}
@@ -967,7 +1042,8 @@
{\normalexpanded{\rawprocesscommalist[\noteparameter\c!location]\strc_notes_set_location_step}}
\unexpanded\def\strc_notes_set_location_step#alternative% the insert related one
- {\ifcsname\??notelocation#alternative\endcsname\csname\??notelocation#alternative\endcsname\fi}
+ %{\ifcsname\??notelocation#alternative\endcsname\csname\??notelocation#alternative\endcsname\fi}
+ {\begincsname\??notelocation#alternative\endcsname}
\appendtoks
\strc_notes_set_variants
@@ -1170,8 +1246,8 @@
\newconditional\c_strc_notes_symbol \settrue\c_strc_notes_symbol % not used
\newconditional\c_strc_notes_skip
-\unexpanded\def\setnote [#tag]{\getvalue{#tag}}
-\unexpanded\def\setnotetext[#tag]{\global\settrue\c_strc_notes_skip\getvalue{#tag}}
+\unexpanded\def\setnote [#tag]{\csname#tag\endcsname}
+\unexpanded\def\setnotetext[#tag]{\global\settrue\c_strc_notes_skip\csname#tag\endcsname}
\unexpanded\def\handlenoteinsert#tag#id%
{\begingroup
@@ -1209,10 +1285,10 @@
% as we can have collected notes (e.g. in tables) we need to recover
% \currentdescriptionattribute and \currentdescriptionsynchronize
%
- \reinstateconstructionnumberentry\currentconstructionlistentry % we could store the number in the entry (e.g. needed when local notes in table)
+ \reinstatecachedconstructionnumberentry\currentconstructionlistentry % we could store the number in the entry (e.g. needed when local notes in table)
%
\dontcomplain
-% \begingroup
+ %begingroup
\strc_notes_interaction_check_display
\strc_notes_set_reference_attribute_text
\strc_constructions_stored_start
@@ -1222,7 +1298,7 @@
\strc_notes_inject_text\relax
\ifvmode\obeydepth\else\endstrut\fi % \obeydepth is new per 2015-01-10
\strc_constructions_stored_stop
-% \endgroup
+ %endgroup
}
\unexpanded\def\strc_notes_inject_text % hm main?
@@ -1298,11 +1374,7 @@
\whitespace
\noteparameter\c!before
\fi
- % \bgroup
- % \usealignparameter\noteparameter
- \placenoterule % alleen in ..mode
- % \par
- % \egroup
+ \placenoterule
\bgroup
\strc_notes_set_bodyfont
\setbox\scratchbox\hbox
@@ -1316,12 +1388,12 @@
\c!strut=\v!no,
\c!offset=\v!overlay]%
\inheritednoteframed
- {\ifdim\dp\scratchbox=\zeropoint % this hack is needed because \vadjust
- \hbox{\lower\strutdp\box\scratchbox}% % in margin number placement
- \else % hides the (always) present depth
+ {\ifdim\dp\scratchbox=\zeropoint % this hack is needed because \vadjust
+ \hpack{\lower\strutdp\box\scratchbox}% % in margin number placement
+ \else % hides the (always) present depth
\box\scratchbox
\fi}}%
- \setbox\scratchbox\hbox{\lower\strutdepth\box\scratchbox}%
+ \setbox\scratchbox\hpack{\lower\strutdepth\box\scratchbox}%
\dp\scratchbox\strutdepth % so we know that it has the note bodyfont depth
\ifvmode
\nointerlineskip % else sometimes empty line
@@ -1358,9 +1430,10 @@
{\begingroup
\useinterlinespaceparameter\noteparameter
\doifelse{\noteparameter\c!paragraph}\v!yes
- {\vbox\starthboxestohbox
- \iftrialtypesetting\unvcopy\else\unvbox\fi\currentnoteinsertionnumber
- \stophboxestohbox}
+ {\leftorrightvbox % cf mail from ws to list
+ {\starthboxestohbox
+ \iftrialtypesetting\unvcopy\else\unvbox\fi\currentnoteinsertionnumber
+ \stophboxestohbox}}
{\iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteinsertionnumber}%
\endgroup}
@@ -1567,8 +1640,6 @@
\noteparameter\c!after
\fi}}
-\setvalue{\??notealternative}{\getvalue{\??notealternative\v!none}}
-
%D A stupid alternative is also provided:
%D
%D \starttyping
@@ -1582,6 +1653,9 @@
\installnotealternative \v!none
{\flushlocalnotes\currentnote}
+\installnotealternative \empty
+ {\flushlocalnotes\currentnote}
+
\installnotealternative \v!grid % test if n > 0
{\begingroup
\setupcurrentnote[\c!location=]%
@@ -1769,7 +1843,7 @@
%D }
%D \stoptyping
-\def\doifelsenoteonsamepage[#tag]{\clf_doifnoteonsamepageasprevious{#tag}}
+\def\doifelsenoteonsamepage#tag{\clf_doifnoteonsamepageasprevious{#tag}}
\let\doifnoteonsamepageelse\doifelsenoteonsamepage
diff --git a/Master/texmf-dist/tex/context/base/strc-num.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-num.lua
index 0203334fff6..0203334fff6 100644
--- a/Master/texmf-dist/tex/context/base/strc-num.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-num.lua
diff --git a/Master/texmf-dist/tex/context/base/strc-num.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-num.mkiv
index 58095b8e7d9..2418130f952 100644
--- a/Master/texmf-dist/tex/context/base/strc-num.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-num.mkiv
@@ -118,8 +118,8 @@
\unexpanded\def\prevcounter {\dodoubleargument\strc_counters_prev_interfaced}
\unexpanded\def\countersubs {\dodoubleargument\strc_counters_subs_interfaced}
-\unexpanded\def\savecounter {\dodoubleempty \strc_counters_save_interfaced}
-\unexpanded\def\restorecounter {\dodoubleempty \strc_counters_restore_interfaced}
+\unexpanded\def\savecounter {\dosingleempty \strc_counters_save_interfaced}
+\unexpanded\def\restorecounter {\dosingleempty \strc_counters_restore_interfaced}
\def\strc_counters_set_interfaced
{\ifthirdargument
@@ -247,7 +247,7 @@
\def\strc_counters_setown_two [#1][#2][#3]{\clf_setownsubcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax{#3}}
\def\strc_counters_restart_two [#1][#2][#3]{\clf_restartsubcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax\numexpr#3\relax}
\def\strc_counters_reset_two [#1][#2]{\clf_resetsubcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
-\def\strc_counters_increment_two [#1][#2]{\clf_incrementsubcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
+%def\strc_counters_increment_two [#1][#2]{\clf_incrementsubcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
\def\strc_counters_decrement_two [#1][#2]{\clf_decrementsubcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
\def\strc_counters_raw_two [#1][#2]{\clf_subcountervalue {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
@@ -261,7 +261,7 @@
\def\strc_counters_setown_one [#1][#2][#3]{\clf_setowncounter {\namedcounterparameter{#1}\s!name}{#2}}
\def\strc_counters_restart_one [#1][#2][#3]{\clf_restartcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
\def\strc_counters_reset_one [#1][#2]{\clf_resetcounter {\namedcounterparameter{#1}\s!name}}
-\def\strc_counters_increment_one [#1][#2]{\clf_incrementcounter {\namedcounterparameter{#1}\s!name}}
+%def\strc_counters_increment_one [#1][#2]{\clf_incrementcounter {\namedcounterparameter{#1}\s!name}}
\def\strc_counters_decrement_one [#1][#2]{\clf_decrementcounter {\namedcounterparameter{#1}\s!name}}
\def\strc_counters_raw_one [#1][#2]{\clf_countervalue {\namedcounterparameter{#1}\s!name}}
@@ -278,7 +278,7 @@
\unexpanded\def\strc_counters_setown #1#2{\clf_setowncounter {\namedcounterparameter{#1}\s!name}{#2}}
\unexpanded\def\strc_counters_restart #1#2{\clf_restartcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
\unexpanded\def\strc_counters_reset #1{\clf_resetcounter {\namedcounterparameter{#1}\s!name}}
-\unexpanded\def\strc_counters_increment #1{\clf_incrementcounter {\namedcounterparameter{#1}\s!name}}
+%unexpanded\def\strc_counters_increment #1{\clf_incrementcounter {\namedcounterparameter{#1}\s!name}}
\unexpanded\def\strc_counters_decrement #1{\clf_decrementcounter {\namedcounterparameter{#1}\s!name}}
\def\strc_counters_raw #1{\clf_countervalue {\namedcounterparameter{#1}\s!name}}
@@ -292,7 +292,7 @@
\unexpanded\def\strc_counters_setown_sub #1#2#3{\clf_setownsubcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax{#3}}
\unexpanded\def\strc_counters_restart_sub #1#2#3{\clf_restartsubcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax\numexpr#3\relax}
\unexpanded\def\strc_counters_reset_sub #1#2{\clf_resetsubcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
-\unexpanded\def\strc_counters_increment_sub #1#2{\clf_incrementsubcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
+%unexpanded\def\strc_counters_increment_sub #1#2{\clf_incrementsubcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
\unexpanded\def\strc_counters_decrement_sub #1#2{\clf_decrementsubcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
\def\strc_counters_raw_sub #1#2{\clf_subcountervalue {\namedcounterparameter{#1}\s!name}\numexpr#2\relax} % maybe raw
@@ -322,11 +322,11 @@
\def\nextcountervalue [#1]{\clf_nextcountervalue {\namedcounterparameter{#1}\s!name}}
\def\prevcountervalue [#1]{\clf_previouscountervalue{\namedcounterparameter{#1}\s!name}}
-\let\rawsubcountervalue \strc_counters_raw_two
-\let\lastsubcountervalue \strc_counters_last_two
-\let\firstsubcountervalue \strc_counters_first_two
-\let\nextsubcountervalue \strc_counters_next_two
-\let\prevsubcountervalue \strc_counters_prev_two
+\def\rawsubcountervalue [#1]#2[#3]{\clf_subcountervalue {\namedcounterparameter{#1}\s!name}\numexpr#3\relax}
+\def\lastsubcountervalue [#1]#2[#3]{\clf_lastsubcountervalue {\namedcounterparameter{#1}\s!name}\numexpr#3\relax}
+\def\firstsubcountervalue[#1]#2[#3]{\clf_firstsubcountervalue {\namedcounterparameter{#1}\s!name}\numexpr#3\relax}
+\def\nextsubcountervalue [#1]#2[#3]{\clf_nextsubcountervalue {\namedcounterparameter{#1}\s!name}\numexpr#3\relax}
+\def\prevsubcountervalue [#1]#2[#3]{\clf_previoussubcountervalue{\namedcounterparameter{#1}\s!name}\numexpr#3\relax}
% The bypage check needs a multipass reference and therefore we only check for it when we increment
% and know that some content will be placed. We could also check for spreads.
@@ -342,6 +342,14 @@
\fi
\clf_incrementsubcounter{\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
+% We also need to redefine these because of the page check:
+
+ \def\strc_counters_increment_two [#1][#2]{\strc_counters_increment_sub{#1}{#2}}
+ \def\strc_counters_increment_one [#1][#2]{\strc_counters_increment_sub{#1}\plusone}
+\unexpanded\def\strc_counters_increment #1{\strc_counters_increment_sub{#1}\plusone}
+
+% so far for the hack
+
\unexpanded\def\convertedcounter
{\dodoubleempty\strc_counters_converted}
@@ -534,7 +542,7 @@
\xdef\currentstructurecomponentreferenceprefix{#1\c!referenceprefix}%
\strc_counters_register_component_check_prefix
\setnextinternalreference
- \clf_setreferenceattribute
+ \clf_setdestinationattribute
{%
references {%
internal \nextinternalreference
@@ -618,6 +626,7 @@
reference {\currentstructurecomponentreference}
prefix {\currentstructurecomponentreferenceprefix}
% section structures.sections.currentid()
+ view {\interactionparameter\c!focus}%
}
titledata {
label {\detokenize\expandafter{\currentstructurecomponentlabel}}
@@ -660,7 +669,9 @@
%}
\relax
\xdef\m_strc_counters_last_registered_index{\the\scratchcounter}%
- \clf_setinternalreference internal \nextinternalreference\relax
+ \clf_setinternalreference
+ internal \nextinternalreference
+ \relax
\xdef\m_strc_counters_last_registered_attribute {\the\lastdestinationattribute}%
\xdef\m_strc_counters_last_registered_synchronize{\strc_lists_inject_enhance{\m_strc_counters_last_registered_index}{\nextinternalreference}}}
diff --git a/Master/texmf-dist/tex/context/base/strc-pag.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-pag.lua
index 96d26e6f666..96d26e6f666 100644
--- a/Master/texmf-dist/tex/context/base/strc-pag.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-pag.lua
diff --git a/Master/texmf-dist/tex/context/base/strc-pag.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-pag.mkiv
index 72f0cf32aa8..0a55fb45f33 100644
--- a/Master/texmf-dist/tex/context/base/strc-pag.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-pag.mkiv
@@ -237,6 +237,19 @@
\strc_pagenumbers_decrement_counters
\to \everygoodbye
+\newcount\c_strc_subpage_first_real \c_strc_subpage_first_real\plusone
+
+\appendtoks
+ \ifcase\subpageno\relax
+ \global\c_strc_subpage_first_real\realpageno
+ \or
+ \global\c_strc_subpage_first_real\realpageno
+ \fi
+\to \everybeforepagebody
+
+\def\therealsubpageno#1% new helper
+ {\the\numexpr\c_strc_subpage_first_real+#1+\minusone\relax}
+
% Equivalents (compatibility):
%
% todo: maybe leave lastpage etc lua calls
@@ -329,7 +342,7 @@
{\edef\p_strc_pagenumbers_page{\directpagenumberingparameter\c!page}%
\ifx\p_strc_pagenumbers_page\empty \else
\ifx\p_strc_pagenumbers_page\v!no \else
- \page[\p_strc_pagenumbers_page]
+ \page[\p_strc_pagenumbers_page]%
\fi
\fi}
diff --git a/Master/texmf-dist/tex/context/base/strc-ref.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-ref.lua
index 2a1d0dd59e0..c3b852e8917 100644
--- a/Master/texmf-dist/tex/context/base/strc-ref.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-ref.lua
@@ -50,6 +50,8 @@ local v_file = variables.file
local v_unknown = variables.unknown
local v_page = variables.page
local v_auto = variables.auto
+local v_yes = variables.yes
+local v_name = variables.name
local context = context
local commands = commands
@@ -197,7 +199,7 @@ local function initializer() -- can we use a tobesaved as metatable for collecte
nofreferred = #referred
end
--- no longer fone this way
+-- no longer done this way
-- references.resolvers = references.resolvers or { }
-- local resolvers = references.resolvers
@@ -505,7 +507,6 @@ local function register_from_lists(collected,derived,pages,sections)
end
end
end
- -- inspect(derived)
end
references.registerinitializer(function() register_from_lists(lists.collected,derived) end)
@@ -983,6 +984,9 @@ local function loadexternalreferences(name,utilitydata)
local pages = struc.pages.collected -- pagenumber data
-- a bit weird one, as we don't have the externals in the collected
for prefix, set in next, external do
+if prefix == "" then
+ prefix = name -- this can clash!
+end
for reference, data in next, set do
if trace_importing then
report_importing("registering %a reference, kind %a, name %a, prefix %a, reference %a",
@@ -1010,6 +1014,9 @@ local function loadexternalreferences(name,utilitydata)
if kind and realpage then
references.pagedata = pages[realpage]
local prefix = references.prefix or ""
+if prefix == "" then
+ prefix = name -- this can clash!
+end
local target = external[prefix]
if not target then
target = { }
@@ -1245,7 +1252,6 @@ function references.loadpresets(product,component) -- we can consider a special
loadproductvariables (product,component,utilitydata)
loadproductreferences(product,component,utilitydata)
loadproductcomponents(product,component,utilitydata)
- -- inspect(productdata)
end
end
end
@@ -1607,7 +1613,8 @@ local function identify_inner_or_outer(set,var,i)
-- nest we look at each component (but we can omit the already consulted one
- local components = job.structure.components
+ local jobstructure = job.structure
+ local components = jobstructure and jobstructure.components
if components then
for c=1,#components do
local component = components[c]
@@ -1870,8 +1877,10 @@ local defaultinnermethod = defaultinnermethod
references.innermethod = innermethod -- don't mess with this one directly
function references.setinnermethod(m)
- if toboolean(m) or m == v_page then
+ if toboolean(m) or m == v_page or m == v_yes then
innermethod = v_page
+ elseif m == v_name then
+ innermethod = v_name
else
innermethod = v_auto
end
@@ -1885,7 +1894,7 @@ implement {
name = "setinnerreferencemethod",
actions = references.setinnermethod,
arguments = "string",
- onlyonce = true
+ -- onlyonce = true
}
function references.getinnermethod()
@@ -1896,16 +1905,18 @@ directives.register("references.linkmethod", function(v) -- page auto
references.setinnermethod(v)
end)
--- this is inconsistent
+-- we can call setinternalreference with an already known internal or with
+-- a reference/prefix specification
local destinationattributes = { }
local function setinternalreference(specification)
local internal = specification.internal
local destination = unsetvalue
- if innermethod == v_auto then
+ if innermethod == v_auto or innermethod == v_name then
local t, tn = { }, 0 -- maybe add to current (now only used for tracing)
local reference = specification.reference
+ local view = specification.view
if reference then
local prefix = specification.prefix
if prefix and prefix ~= "" then
@@ -1926,10 +1937,19 @@ local function setinternalreference(specification)
-- ugly .. later we decide to ignore it when we have a real one
-- but for testing we might want to see them all
if internal then
- tn = tn + 1
- t[tn] = internal -- when number it's internal
+ if innermethod ~= v_name then -- so page and auto
+ -- we don't want too many #1 #2 #3 etc
+ tn = tn + 1
+ t[tn] = internal -- when number it's internal
+ end
+ if not view then
+ local i = references.internals[internal]
+ if i then
+ view = i.references.view
+ end
+ end
end
- destination = references.mark(t,nil,nil,specification.view) -- returns an attribute
+ destination = references.mark(t,nil,nil,view) -- returns an attribute
end
if internal then -- new
destinationattributes[internal] = destination
@@ -1995,7 +2015,7 @@ function references.setandgetattribute(data) -- maybe do internal automatically
if done then
attr = setinternalreference {
prefix = prefix,
- reference = tag,
+ reference = rdat.reference,
internal = rdat.internal,
view = rdat.view
} or unsetvalue
@@ -2006,7 +2026,7 @@ function references.setandgetattribute(data) -- maybe do internal automatically
end
implement {
- name = "setreferenceattribute",
+ name = "setdestinationattribute",
actions = references.setandgetattribute,
arguments = {
{
@@ -2048,12 +2068,25 @@ function references.getinternallistreference(n) -- n points into list (todo: reg
return i and destinationattributes[i] or 0
end
+function references.getinternalcachedlistreference(n) -- n points into list (todo: registers)
+ local l = lists.cached[n]
+ local i = l and l.references.internal
+ return i and destinationattributes[i] or 0
+end
+
implement {
name = "getinternallistreference",
actions = { references.getinternallistreference, context },
arguments = "integer"
}
+implement {
+ name = "getinternalcachedlistreference",
+ actions = { references.getinternalcachedlistreference, context },
+ arguments = "integer"
+}
+
+
--
function references.getcurrentmetadata(tag)
@@ -2078,9 +2111,9 @@ local function getcurrentprefixspec(default)
local data = currentreference and currentreference.i
local metadata = data and data.metadata
return
- metatadata and metadata.kind or "?",
- metatadata and metadata.name or "?",
- default or "?"
+ metadata and metadata.kind or "?",
+ metadata and metadata.name or "?",
+ default or "?"
end
references.getcurrentprefixspec = getcurrentprefixspec
@@ -2557,14 +2590,16 @@ end
runners["special operation"] = runners["special"]
runners["special operation with arguments"] = runners["special"]
--- These are the testspecials not the real ones. They are used to
--- check the validity.
-
function specials.internal(var,actions)
local v = internals[tonumber(var.operation)]
- local r = v and v.references.realpage
+ local r = v and v.references
if r then
- actions.realpage = r
+ local p = r.realpage
+ if p then
+-- setmetatableindex(actions,r)
+ actions.realpage = p
+ actions.view = r.view
+ end
end
end
diff --git a/Master/texmf-dist/tex/context/base/strc-ref.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-ref.mkvi
index f5d0d1d7863..177abd835b7 100644
--- a/Master/texmf-dist/tex/context/base/strc-ref.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-ref.mkvi
@@ -216,13 +216,15 @@
% beware, the structures.references.set writes a
\setnextinternalreference
\strc_references_start_destination_nodes
- \clf_setreferenceattribute
+ \clf_setdestinationattribute
{%
references {%
internal \nextinternalreference
% block {\currentsectionblock}%
view {\interactionparameter\c!focus}%
+ \ifx\referenceprefix\empty\else
prefix {\referenceprefix}%
+ \fi
reference {\currentreferencelabels}%
}%
metadata {%
@@ -259,7 +261,13 @@
\strc_references_flush_destination_nodes
\egroup
\strc_references_inject_after % new
- \fi}
+ \else\ifvoid\b_strc_destination_nodes\else
+ \strc_references_inject_before % new
+ \dontleavehmode\hbox \bgroup
+ \strc_references_flush_destination_nodes
+ \egroup
+ \strc_references_inject_after % new
+ \fi\fi}
\def\strc_references_set_page_only_destination_attribute#labels% could in fact be fully expandable
{\ifreferencing
@@ -270,13 +278,15 @@
\else
\strc_references_start_destination_nodes
\setnextinternalreference
- \clf_setreferenceattribute
+ \clf_setdestinationattribute
{%
references {%
internal \nextinternalreference
% block {\currentsectionblock}%
view {\interactionparameter\c!focus}%
+ \ifx\referenceprefix\empty\else
prefix {\referenceprefix}%
+ \fi
reference {\currentreferencelabels}%
}%
metadata {%
@@ -297,13 +307,15 @@
\setnextinternalreference
\edef\m_strc_references_user{#user}%
\edef\m_strc_references_text{#text}%
- \clf_setreferenceattribute
+ \clf_setdestinationattribute
{%
references {%
internal \nextinternalreference
% block {\currentsectionblock}%
view {\interactionparameter\c!focus}%
+ \ifx\referenceprefix\empty\else
prefix {\referenceprefix}%
+ \fi
reference {#labels}%
}%
metadata {%
@@ -333,7 +345,13 @@
\strc_references_flush_destination_nodes
\egroup
\strc_references_inject_after % new
- \fi}
+ \else\ifvoid\b_strc_destination_nodes\else
+ \strc_references_inject_before % new
+ \dontleavehmode\hbox \bgroup
+ \strc_references_flush_destination_nodes
+ \egroup
+ \strc_references_inject_after % new
+ \fi\fi}
\unexpanded\def\strc_references_direct_full
{\strc_references_direct_full_user\empty}
@@ -371,16 +389,19 @@
%D For internal usage:
-\def\strc_references_set_simple_page_reference#label%
+\def\strc_references_set_simple_reference#label%
{\iflocation
\strc_references_start_destination_nodes
- \clf_setreferenceattribute
+ \setnextinternalreference
+ \clf_setdestinationattribute
{%
references {%
- % block {\currentsectionblock}%
view {\interactionparameter\c!focus}%
+ \ifx\referenceprefix\empty\else
prefix {\referenceprefix}%
+ \fi
reference {#label}%
+ internal \nextinternalreference
}%
metadata {%
kind {\s!page}%
@@ -394,7 +415,30 @@
\xdef\currentdestinationattribute{\number\attributeunsetvalue}%
\fi}
-\def\strc_references_get_simple_page_reference#label%
+\def\strc_references_set_simple_internal_reference#label% no prefix
+ {\iflocation
+ \strc_references_start_destination_nodes
+ \setnextinternalreference
+ \clf_setdestinationattribute
+ {%
+ references {%
+ view {\interactionparameter\c!focus}%
+ reference {#label}%
+ internal \nextinternalreference
+ }%
+ metadata {%
+ kind {\s!page}%
+ }%
+ }%
+ \relax
+ \strc_references_stop_destination_nodes
+ \xdef\currentdestinationattribute{\number\lastdestinationattribute}%
+ \else
+ \setbox\b_strc_destination_nodes\emptyhbox
+ \xdef\currentdestinationattribute{\number\attributeunsetvalue}%
+ \fi}
+
+\def\strc_references_get_simple_reference#label%
{\iflocation
\clf_injectreference
{\referenceprefix}%
@@ -438,7 +482,7 @@
{\ifsecondargument
\expandafter\strc_references_content_pickup_yes
\else
- \expandafter\strc_references_content_pickup_yes
+ \expandafter\strc_references_content_pickup_nop
\fi}
\def\strc_references_content_pickup_yes[#1][#2]%
@@ -453,7 +497,7 @@
\scratchdepth \dp\nextbox
\setbox\nextbox\hbox
{\framed[\c!frame=\v!off,#2]{\box\nextbox}}%
- \strc_references_set_simple_page_reference{#1}%
+ \strc_references_set_simple_reference{#1}%
\setbox\nextbox\hbox attr \destinationattribute \currentdestinationattribute
{\strc_references_flush_destination_nodes
\box\nextbox}%
@@ -465,7 +509,7 @@
\egroup}
\def\strc_references_content_nop_finish#1#2%
- {\strc_references_set_simple_page_reference{#1}%
+ {\strc_references_set_simple_reference{#1}%
\hbox attr \destinationattribute \currentdestinationattribute
{\strc_references_flush_destination_nodes
\box\nextbox}%
@@ -790,9 +834,11 @@
\def\getinternalorderreference#kind#name%
{\clf_currentreferenceorder{#kind}{#name}}
-\def\thisissomeinternal#kind#name% only for old time sake
+\def\thisissomeinternal#kind#name% only for old time sake, will go away
{\begingroup
- \clf_setinternalreference reference {#kind:#name}\relax
+ \clf_setinternalreference
+ reference {#kind:#name}% no view
+ \relax
\hbox attr \destinationattribute\lastdestinationattribute{}%
\endgroup}
@@ -1187,7 +1233,7 @@
\installcorenamespace{referencinginteraction}
-\setvalue{\??referencinginteraction\v!all}%
+\def\strc_references_interaction_all
{\the\leftreferencetoks
\doifelsesometoks\leftreferencetoks \leftofreferencecontent \donothing
\leftofreference
@@ -1196,6 +1242,8 @@
\doifelsesometoks\rightreferencetoks\rightofreferencecontent\donothing
\the\rightreferencetoks}
+\letvalue{\??referencinginteraction\v!all}\strc_references_interaction_all
+
\setvalue{\??referencinginteraction\v!label}%
{\leftofreference
\the\leftreferencetoks
@@ -1210,14 +1258,21 @@
\setvalue{\??referencinginteraction\v!symbol}%
{\referencesymbol}
+% \def\referencesequence
+% {\csname\??referencinginteraction
+% \ifcsname\??referencinginteraction\referencingparameter\c!interaction\endcsname
+% \referencingparameter\c!interaction
+% \else
+% \v!all
+% \fi
+% \endcsname}
+
\def\referencesequence
- {\csname\??referencinginteraction
- \ifcsname\??referencinginteraction\referencingparameter\c!interaction\endcsname
- \referencingparameter\c!interaction
- \else
- \v!all
- \fi
- \endcsname}
+ {\ifcsname\??referencinginteraction\referencingparameter\c!interaction\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\strc_references_interaction_all
+ \fi}
\newtoks\everyresetinatreference
@@ -1429,16 +1484,16 @@
\unexpanded\def\directgoto
{\ifconditional\uselocationstrut
- \expandafter\dodirectgoto
+ \expandafter\strc_references_direct_goto
\else
- \expandafter\dodirectgotohtdp
+ \expandafter\strc_references_direct_goto_htdp
\fi}
\unexpanded\def\goto
{\ifconditional\uselocationstrut
- \expandafter\dogoto
+ \expandafter\strc_references_goto
\else
- \expandafter\dogotohtdp
+ \expandafter\strc_references_goto_htdp
\fi}
% The unbox trick is needed in order to permit \par inside a reference. Otherwise
@@ -1451,7 +1506,7 @@
\def\revivesavedreferenceattribute % sometimes handy as no test etc needed
{\attribute\referenceattribute\lastsavedreferenceattribute}
-\def\dodirectgoto#content[#label]% no test for valid references
+\def\strc_references_direct_goto#content[#label]% no test for valid references
{\dontleavehmode
\begingroup
\attribute\referenceattribute\attributeunsetvalue
@@ -1478,7 +1533,7 @@
\fi
\endgroup}
-\def\dodirectgotohtdp#content[#label]% no test for valid references
+\def\strc_references_direct_goto_htdp#content[#label]% no test for valid references
{\dontleavehmode
\begingroup
\global\lastsavedreferenceattribute\attributeunsetvalue
@@ -1504,7 +1559,7 @@
\fi
\endgroup}
-\def\dogoto#content#dummy[#label]% #dummy gobbles spaces
+\def\strc_references_goto#content#dummy[#label]% #dummy gobbles spaces
{\dontleavehmode
\begingroup
%\setbox\referencebox\hbox\bgroup % experiment, might change again to non \par support
@@ -1531,24 +1586,43 @@
%\egroup\unhbox\referencebox}
\endgroup}
+\def\strc_references_goto_internal#content#dummy[#internal]% #dummy gobbles spaces
+ {\dontleavehmode
+ \begingroup
+ \global\lastsavedreferenceattribute\attributeunsetvalue
+ \attribute\referenceattribute\attributeunsetvalue
+ \iflocation
+ \setstrut % can be option
+ \strc_references_get_simple_reference{internal(#internal)}%
+ \global\lastsavedreferenceattribute\currentreferenceattribute
+ \attribute\referenceattribute\currentreferenceattribute
+ \setlocationattributes
+ \dostarttagged\t!link\empty
+ #content%
+ \dostoptagged
+ \else
+ #content%
+ \fi
+ \endgroup}
+
\unexpanded\def\startgoto[#label]%
{\dontleavehmode
\begingroup
\iflocation
\clf_doifelsereference{\referenceprefix}{#label}{\extrareferencearguments}%
- {\expandafter\startgoto_yes}%
- {\expandafter\startgoto_nop}%
+ {\expandafter\strc_references_start_goto_yes}%
+ {\expandafter\strc_references_start_goto_nop}%
\else
- \expandafter\startgoto_nop
+ \expandafter\strc_references_start_goto_nop
\fi}
-\unexpanded\def\startgoto_nop
- {\let\stopgoto\stopgoto_nop}
+\unexpanded\def\strc_references_start_goto_nop
+ {\let\stopgoto\strc_references_stop_goto_nop}
-\unexpanded\def\stopgoto_nop
+\unexpanded\def\strc_references_stop_goto_nop
{\endgroup}
-\unexpanded\def\startgoto_yes
+\unexpanded\def\strc_references_start_goto_yes
{\expandtexincurrentreference
\clf_injectcurrentreferencehtdp
\ht\strutbox
@@ -1559,13 +1633,13 @@
\global\lastsavedreferenceattribute\lastreferenceattribute
\attribute\referenceattribute\lastreferenceattribute
\dostarttagged\t!link\empty
- \let\stopgoto\stopgoto_yes}
+ \let\stopgoto\strc_references_stop_goto_yes}
-\unexpanded\def\stopgoto_yes
+\unexpanded\def\strc_references_stop_goto_yes
{\dostoptagged
\endgroup}
-\def\dogotohtdp#content#dummy[#label]% dummy gobbles spaces
+\def\strc_references_goto_htdp#content#dummy[#label]% dummy gobbles spaces
{\dontleavehmode
\begingroup
\global\lastsavedreferenceattribute\attributeunsetvalue
@@ -2121,11 +2195,11 @@
\def\referencestructureprefixparameter#kind#name#category#parameter%
{\ifcsname\??referencingprefix#name:#category#parameter\endcsname
- \csname\??referencingprefix#name:#category#parameter\endcsname
+ \lastnamedcs
\else\ifcsname\??referencingprefix#kind:#category#parameter\endcsname
- \csname \??referencingprefix#kind:#category#parameter\endcsname
+ \lastnamedcs
\else\ifcsname\??referencingprefix:#category#parameter\endcsname
- \csname \??referencingprefix:#category#parameter\endcsname
+ \lastnamedcs
\fi\fi\fi}
\def\currentreferencedefault % for some reason we need to explicitly expand
diff --git a/Master/texmf-dist/tex/context/base/strc-reg.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-reg.lua
index ed329219595..4efbe038b3d 100644
--- a/Master/texmf-dist/tex/context/base/strc-reg.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-reg.lua
@@ -391,13 +391,18 @@ end
local function finalizer()
local flaginternals = references.flaginternals
+ local usedviews = references.usedviews
for k, v in next, tobesaved do
local entries = v.entries
if entries then
for i=1,#entries do
local r = entries[i].references
- if r and flaginternals[r.internal] then
- r.used = true
+ if r then
+ local i = r.internal
+ local f = flaginternals[i]
+ if f then
+ r.used = usedviews[i] or true
+ end
end
end
end
@@ -539,7 +544,7 @@ local function storeregister(rawdata) -- metadata, references, entries
end
--
if notsaved then
- usedinternals[internal] = true -- todo view (we assume that forward references index entries are used)
+ usedinternals[internal] = references.used -- todo view (we assume that forward references index entries are used)
end
--
if not references.realpage then
@@ -641,11 +646,12 @@ implement {
implement {
name = "storeregister",
- actions = function(rawdata)
- local nofentries = storeregister(rawdata)
- setinternalreference { internal = rawdata.references.internal }
- context(nofentries)
- end,
+ -- actions = function(rawdata)
+ -- local nofentries = storeregister(rawdata)
+ -- setinternalreference { internal = rawdata.references.internal }
+ -- context(nofentries)
+ -- end,
+ actions = { storeregister, context },
arguments = {
{
{ "metadata", {
@@ -669,6 +675,7 @@ implement {
{ "references", {
{ "internal", "integer" },
{ "section", "integer" },
+ { "view" },
{ "label" }
}
},
diff --git a/Master/texmf-dist/tex/context/base/strc-reg.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-reg.mkiv
index 138a1486f3e..1d28db8dfed 100644
--- a/Master/texmf-dist/tex/context/base/strc-reg.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-reg.mkiv
@@ -108,7 +108,6 @@
\c!entries=,
\c!alternative=]
-
\definemixedcolumns
[\v!register]
[\c!n=\registerparameter\c!n,
@@ -269,6 +268,7 @@
\ifx\currentregisterlabel\empty \else
label {\currentregisterlabel}%
\fi
+% view {\interactionparameter\c!focus}%
}%
entries {%
% we need a special one for xml, this is just a single one
@@ -293,7 +293,10 @@
}%
userdata {\detokenize\expandafter{\normalexpanded{#3}}}
}%
- % \clf_setinternalreference internal \nextinternalreference\relax % in previous
+ \clf_setinternalreference
+ internal \nextinternalreference
+ view {\interactionparameter\c!focus}%
+ \relax % this will change
\ifx\currentregisterownnumber\v!yes
\glet\currentregistersynchronize\relax
\else
@@ -328,6 +331,10 @@
}%
}%
% overlap with the above
+ % \clf_setinternalreference
+ % internal \nextinternalreference
+ % view {\interactionparameter\c!focus}%
+ \relax % this will change
\xdef\currentregistersynchronize{\ctxlatecommand{enhanceregister("\currentregister",\currentregisternumber)}}%
\currentregistersynchronize % here?
\dostarttagged\t!registerlocation\currentregister
@@ -465,7 +472,7 @@
{\doflushatpar{\strc_registers_register_page_entry{#1}{\c!label=#2,#3}{#4}}}
\def\strc_registers_stop[#1][#2]%
- {\normalexpanded{\ctxlatelua{structures.registers.extend("#1","#2")}}}
+ {\normalexpanded{\ctxlatecommand{structures.registers.extend("#1","#2")}}}
% So far.
@@ -494,14 +501,13 @@
\fi
\setnextinternalreference
% we could consider storing register entries in list
- \edef\temp{\clf_storeregister{
+ \edef\temp{\clf_storeregister{% \temp grabs the nofentries
metadata {%
kind {see}%
name {\currentregister}%
}%
references {%
- % internal = \nextinternalreference,
- % section = structures.sections.currentid(),
+% view {\interactionparameter\c!focus}%
}%
entries {%
% we need a special one for xml, this is just a single one
@@ -512,6 +518,10 @@
text {\currentregisterseeword}%
}%
}}%
+ \clf_setinternalreference
+ internal \nextinternalreference
+ view {\interactionparameter\c!focus}%
+ \relax % this will change
\dostarttagged\t!registerlocation\currentregister
\attribute\destinationattribute\lastdestinationattribute \signalcharacter % no \strut as it will be removed during cleanup
\dotagregisterlocation
@@ -574,8 +584,12 @@
\endgroup
\fi}
+\newconditional\c_strc_registers_text_interaction
+
\def\strc_registers_place_indeed
- {\clf_processregister
+ {\doifelse{\registerparameter\c!interaction}\v!text
+ \settrue\setfalse\c_strc_registers_text_interaction
+ \clf_processregister
{\currentregister}%
{%
language {\registerparameter\s!language}%
@@ -838,10 +852,18 @@
\unexpanded\def\registeronepagerangeseparator
{|\endash|} % todo use \prewordbreak
-\def\withregisterpagecommand#1#2#3#4%
+% \unexpanded\def\withregisterpagecommand#1#2#3#4%
+% {\def\currentregisterpageindex{#2}%
+% \iflocation
+% \goto{\applyprocessor{#1}{\registerparameter\c!pagecommand{#4}}}[internal(#2)]%
+% \else
+% \applyprocessor{#1}{\registerparameter\c!pagecommand{#4}}%
+% \fi}
+
+\unexpanded\def\withregisterpagecommand#1#2#3#4%
{\def\currentregisterpageindex{#2}%
\iflocation
- \goto{\applyprocessor{#1}{\registerparameter\c!pagecommand{#4}}}[internal(#2)]%
+ \strc_references_goto_internal{\applyprocessor{#1}{\registerparameter\c!pagecommand{#4}}}[#2]%
\else
\applyprocessor{#1}{\registerparameter\c!pagecommand{#4}}%
\fi}
@@ -866,13 +888,27 @@
\dostoptagged
\dostoptagged}
+% \unexpanded\def\defaultregisterentry#1#2#3#4% #1:processor #2:internal #3:seeindex #4:word
+% {\def\currentregisterpageindex{#2}%
+% \iflocation
+% \def\currentregisterseeindex{#3}%
+% \doifelse{\registerparameter\c!interaction}\v!text
+% {\directgoto{\setlocationcolor\doapplyregisterentrycommand{#1}{#4}}[internal(#2)]}
+% {\doapplyregisterentrycommand{#1}{#4}}%
+% \else
+% \let\currentregisterseeindex\empty
+% \doapplyregisterentrycommand{#1}{#4}%
+% \fi}
+
\unexpanded\def\defaultregisterentry#1#2#3#4% #1:processor #2:internal #3:seeindex #4:word
{\def\currentregisterpageindex{#2}%
\iflocation
\def\currentregisterseeindex{#3}%
- \doifelse{\registerparameter\c!interaction}\v!text
- {\directgoto{\setlocationcolor\doapplyregisterentrycommand{#1}{#4}}[internal(#2)]}
- {\doapplyregisterentrycommand{#1}{#4}}%
+ \ifconditional\c_strc_registers_text_interaction
+ \strc_references_goto_internal{\setlocationcolor\doapplyregisterentrycommand{#1}{#4}}[internal(#2)]%
+ \else
+ \doapplyregisterentrycommand{#1}{#4}%
+ \fi
\else
\let\currentregisterseeindex\empty
\doapplyregisterentrycommand{#1}{#4}%
@@ -887,13 +923,22 @@
\applyprocessor{#1}{\registerparameter\c!textcommand{\limitedregisterentry{\registerparameter\c!deeptextcommand{#2}}}}%
\dostoptagged}
+% \unexpanded\def\doapplyregisterseecommand#1#2%
+% {\ifx\currentregisterseeindex\empty
+% % \dontleavehmode
+% \applyprocessor{#1}{#2}%
+% \else
+% \goto{\applyprocessor{#1}{#2}}[seeindex:\currentregisterseeindex]%
+% \fi}
+
\unexpanded\def\doapplyregisterseecommand#1#2%
{\ifx\currentregisterseeindex\empty
- % \dontleavehmode
\applyprocessor{#1}{#2}%
+ \else\iflocation
+ \strc_references_goto_internal{\applyprocessor{#1}{#2}}[seeindex:\currentregisterseeindex]%
\else
- \goto{\applyprocessor{#1}{#2}}[seeindex:\currentregisterseeindex]%
- \fi}
+ \applyprocessor{#1}{#2}%
+ \fi\fi}
\unexpanded\def\defaultregisterseeword#1#2#3#4#5#6% i n #3:processor #4:internal #5:seeindex #6:word
{\registerpageseparator
diff --git a/Master/texmf-dist/tex/context/base/strc-ren.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-ren.mkiv
index 34903dfa02a..6bdd05de96f 100644
--- a/Master/texmf-dist/tex/context/base/strc-ren.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-ren.mkiv
@@ -99,13 +99,13 @@
{\edef\currentheadinteraction{\headparameter\c!interaction}%
\ifx\currentheadinteraction\v!list
% setuphead[<section>][interaction=list,...]
- \strc_references_get_simple_page_reference{bck:\nextinternalreference}%
+ \strc_references_get_simple_reference{*\nextinternalreference}%
\let\currentstructurereferenceattribute\currentreferenceattribute
\else\ifx\currentheadinteraction\v!reference
% setuphead[<section>][interaction=reference,...] start<section>[backreference=abc,...]
\edef\currentheadbackreference{\structurevariable\c!backreference}% weird, was references.backreference
\ifx\currentheadbackreference\empty \else
- \strc_references_get_simple_page_reference\currentheadbackreference
+ \strc_references_get_simple_reference\currentheadbackreference
\let\currentstructurereferenceattribute\currentreferenceattribute
\fi
\else
@@ -118,14 +118,14 @@
\unexpanded\def\strc_rendering_place_head_text
{\strc_rendering_start_placement
\setheadmarking
- \doresettructureheadnumbercontent
+ \doresetstructureheadnumbercontent
\ifconditional\c_strc_sectioning_empty
\setbox\b_strc_rendering_head\hbox \headreferenceattributes to \zeropoint{\strut}%
\else
\docheckheadreference
\setbox\b_strc_rendering_head\hbox \headreferenceattributes
{\spac_grids_set_local_snapping{\headparameter\c!internalgrid}%
- \doresettructureheadnumbercontent
+ \doresetstructureheadnumbercontent
\useheadstyleparameter\c!style
\setinlineheadreferenceattributes
\strc_rendering_inject_text}%
@@ -136,8 +136,8 @@
{\strc_rendering_start_placement
\setheadmarking
\doifelsetext\getheadnumber
- \dosettructureheadnumbercontent
- \doresettructureheadnumbercontent
+ \dosetstructureheadnumbercontent
+ \doresetstructureheadnumbercontent
\ifconditional\c_strc_sectioning_empty
\setbox\b_strc_rendering_head\hbox \headreferenceattributes to \zeropoint{\strut}%
\else % = needed
@@ -486,7 +486,8 @@
\strc_rendering_initialize_style_and_color\c!textstyle\c!textcolor
\headparameter\c!commandbefore\relax
\ifcsname\currentheadhash\c!deeptextcommand\endcsname
- \expandafter\let\expandafter\deepstructuretitlecommand\csname\currentheadhash\c!deeptextcommand\endcsname
+ %\expandafter\let\expandafter\deepstructuretitlecommand\csname\currentheadhash\c!deeptextcommand\endcsname
+ \expandafter\let\expandafter\deepstructuretitlecommand\lastnamedcs
\fi
\ifconditional\headisdisplay
% struts can be nilled with \setnostrut
@@ -506,7 +507,8 @@
{\begingroup
\strc_rendering_initialize_style_and_color\c!numberstyle\c!numbercolor
\ifcsname\currentheadhash\c!deepnumbercommand\endcsname
- \expandafter\let\expandafter\deepstructurenumbercommand\csname\currentheadhash\c!deepnumbercommand\endcsname
+ %\expandafter\let\expandafter\deepstructurenumbercommand\csname\currentheadhash\c!deepnumbercommand\endcsname
+ \expandafter\let\expandafter\deepstructurenumbercommand\lastnamedcs
\fi
\ifconditional\headisdisplay
% can be nilled with \setnostrut
@@ -698,7 +700,7 @@
\headnumbercontent
\par
\else
- \fakeheadnumbercontent % will also be done in the other ones (force consistency with numbered)
+ \fakeheadnumbercontent
\fi
\begstrut
\headtextcontent
diff --git a/Master/texmf-dist/tex/context/base/strc-rsc.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-rsc.lua
index 627e443b2ce..627e443b2ce 100644
--- a/Master/texmf-dist/tex/context/base/strc-rsc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-rsc.lua
diff --git a/Master/texmf-dist/tex/context/base/strc-sbe.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-sbe.mkiv
index 9f1d214cfda..9f1d214cfda 100644
--- a/Master/texmf-dist/tex/context/base/strc-sbe.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-sbe.mkiv
diff --git a/Master/texmf-dist/tex/context/base/strc-sec.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-sec.mkiv
index b5a1a5ba011..c78cffbffaf 100644
--- a/Master/texmf-dist/tex/context/base/strc-sec.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-sec.mkiv
@@ -299,7 +299,7 @@
% lua interface / names and interface might change
-\newconditional\c_strc_rendering_continuous % not used (mkii ?)
+% \newconditional\c_strc_rendering_continuous % not used (mkii ?)
\def\setstructurelevel #1#2{\clf_setstructurelevel {#1}{#2}} % name, level|parent
\def\getstructurelevel #1{\clf_getstructurelevel {#1}} % name
@@ -453,6 +453,10 @@
\setuevalue{\e!stop \currenthead}{\strc_sectioning_stop [\currenthead]}%
\to \everydefinehead
+% so \subject as well as \section will need two commands when ownnumber
+% is used (one can disable it anyway for subject) .. this is not downward
+% compatible but better
+
\appendtoks
\doifelse{\headparameter\c!ownnumber}\v!yes
{\setuevalue\currenthead{\strc_sectioning_handle_own[\currenthead]}}
@@ -667,7 +671,7 @@
\unexpanded\def\strc_sectioning_initialize_increment
{\edef\currentheadincrement{\headparameter\c!incrementnumber}%
\ifcsname\??headincrement\currentheadincrement\endcsname
- \csname\??headincrement\currentheadincrement\endcsname
+ \lastnamedcs
\else
\settrue \c_strc_sectioning_increment\settrue \c_strc_sectioning_to_list
% \filterheadnumber
@@ -706,11 +710,11 @@
\newmode\v!sectionnumber
-\def\dosettructureheadnumbercontent
+\def\dosetstructureheadnumbercontent
{\setsystemmode\v!sectionnumber
\settrue\headshownumber} % why ?
-\def\doresettructureheadnumbercontent
+\def\doresetstructureheadnumbercontent
{\resetsystemmode\v!sectionnumber
\setfalse\headshownumber} % why ?
@@ -893,7 +897,7 @@
\fi\fi
\fi
\flushingcolumnfloatstrue
- \setfalse\c_strc_sectioniong_ignore_page
+ \setfalse\c_strc_sectioning_ignore_page
% ignorespaces prevents spaces creeping in when after=\dontleavehmode
\dostarttagged\t!sectioncontent\empty
\ifconditional\headisdisplay
@@ -988,14 +992,14 @@
\doifelselayouttextline\v!footer{\normalexpanded{\setuplayouttext[\v!footer][\c!state=\p_footer]}}\donothing
\fi}
-\newcount \c_strc_sectioniong_preceding_level \c_strc_sectioniong_preceding_level\plusone
+\newcount \c_strc_sectioning_preceding_level \c_strc_sectioning_preceding_level\plusone
\newconditional\c_strc_sectioning_auto_break \settrue\c_strc_sectioning_auto_break
-\newconditional\c_strc_sectioniong_ignore_page
-\newsignal \s_strc_sectioniong_continuous_signal
+\newconditional\c_strc_sectioning_ignore_page
+\newsignal \s_strc_sectioning_continuous_signal
\unexpanded\def\strc_sectioning_inject_continuous_signal
{\ifhmode
- \hskip\s_strc_sectioniong_continuous_signal\relax
+ \hskip\s_strc_sectioning_continuous_signal\relax
\fi}
% \let\dotagsectionlevel\relax
@@ -1038,63 +1042,84 @@
{\ifhmode
\scratchcounter\lastpenalty
\unpenalty % no beauty in this
- \ifdim\lastskip=\s_strc_sectioniong_continuous_signal
+ \ifdim\lastskip=\s_strc_sectioning_continuous_signal
% no page break
- \ifconditional\c_strc_sectioniong_ignore_page
- \setfalse\c_strc_sectioniong_ignore_page
+ \ifconditional\c_strc_sectioning_ignore_page
+ \setfalse\c_strc_sectioning_ignore_page
\else
- \global\c_strc_sectioniong_preceding_level\currentheadlevel
+ \global\c_strc_sectioning_preceding_level\currentheadlevel
\nobreak
\fi
- \global\settrue\c_strc_rendering_continuous
+ % \global\settrue\c_strc_rendering_continuous
\else
\penalty\scratchcounter
- \global\setfalse\c_strc_rendering_continuous
+ % \global\setfalse\c_strc_rendering_continuous
#1%
\fi
\else
- \global\setfalse\c_strc_rendering_continue
+ % \global\setfalse\c_strc_rendering_continuous
#1%
\fi}
\def\currentsectioncountervalue {\clf_depthnumber\numexpr\thenamedheadlevel\currenthead\relax}
\def\previoussectioncountervalue{\clf_depthnumber\numexpr\thenamedheadlevel\currenthead+\minusone\relax}
+% \def\strc_sectioning_handle_page_nop
+% {\edef\p_continue{\headparameter\c!continue}%
+% \ifx\p_continue\v!yes
+% \ifnum\previoussectioncountervalue=\zerocount
+% \strc_sectioning_check_layout
+% \else\ifnum\currentsectioncountervalue>\zerocount
+% \strc_sectioning_check_layout
+% \fi\fi
+% \else
+% \strc_sectioning_check_layout
+% \fi}
+
+\def\currentsectioncountervalue {\clf_depthnumber\numexpr\thenamedheadlevel\currenthead\relax}
+%def\previoussectioncountervalue{\clf_depthnumber\numexpr\thenamedheadlevel\currenthead+\minusone\relax}
+\def\previoussectioncountervalue{\clf_depthnumber\numexpr\thenamedheadlevel\previoushead\relax}
+
+\let\previoushead\empty
+
\def\strc_sectioning_handle_page_nop
{\edef\p_continue{\headparameter\c!continue}%
\ifx\p_continue\v!yes
- \ifnum\previoussectioncountervalue=\zerocount
- \strc_sectioning_check_layout
+ \ifx\currenthead\previoushead % not really needed
+ \strc_sectioning_check_layout
+ \else\ifnum\previoussectioncountervalue=\zerocount
+ \strc_sectioning_check_layout
\else\ifnum\currentsectioncountervalue>\zerocount
- \strc_sectioning_check_layout
- \fi\fi
+ \strc_sectioning_check_layout
+ \fi\fi\fi
\else
\strc_sectioning_check_layout
- \fi}
+ \fi
+ \globallet\previoushead\currenthead}
\def\strc_sectioning_handle_page_yes
- {%[[\currenthead @\thenamedheadlevel\currenthead/prev:\previoussectioncountervalue/curr:\currentsectioncountervalue]]
- \ifconditional\c_strc_sectioniong_ignore_page
- \setfalse\c_strc_sectioniong_ignore_page
+ {\ifconditional\c_strc_sectioning_ignore_page
+ \setfalse\c_strc_sectioning_ignore_page
\else
% beware, these numbers are not yet know here
\strc_sectioning_handle_page_nop
\edef\p_aligntitle{\headparameter\c!aligntitle}%
\ifx\p_aligntitle\v!float
-\ifconditional\c_strc_sectioning_auto_break
- \vspacing[\v!samepage-\currentheadlevel]%
-\fi
+ \ifconditional\c_strc_sectioning_auto_break
+ \vspacing[\v!samepage-\currentheadlevel]%
+ \fi
\headparameter\c!before\relax
\indent
\else
\page_otr_command_flush_side_floats
-\ifconditional\c_strc_sectioning_auto_break
- \vspacing[\v!samepage-\currentheadlevel]%
-\fi
+ \ifconditional\c_strc_sectioning_auto_break
+ \vspacing[\v!samepage-\currentheadlevel]%
+ \fi
\headparameter\c!before\relax
\fi
- \global\c_strc_sectioniong_preceding_level\currentheadlevel
- \fi}
+ \global\c_strc_sectioning_preceding_level\currentheadlevel
+ \fi
+ \globallet\previoushead\currenthead}
\unexpanded\def\strc_sectioning_prevent_page_break#1% see strc-con
{\ifconditional\c_strc_sectioning_auto_break
diff --git a/Master/texmf-dist/tex/context/base/strc-syn.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-syn.lua
index 5f3557a6958..5f3557a6958 100644
--- a/Master/texmf-dist/tex/context/base/strc-syn.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-syn.lua
diff --git a/Master/texmf-dist/tex/context/base/strc-syn.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-syn.mkiv
index b206f8069ba..72c94d069df 100644
--- a/Master/texmf-dist/tex/context/base/strc-syn.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-syn.mkiv
@@ -274,16 +274,18 @@
{\begingroup
\edef\currentsynonym{#2}%
\edef\currentsynonymtag{#3}%
- \let\currentsimplelist\currentsimplelist
+ \let\currentsimplelist\currentsynonym
\ifx\currentsynonymtag\empty
\edef\currentsynonymtag{#4}%
\fi
\ifx\currentsynonymtag\empty
% todo: error message
\else
+ % this is not that efficient, esp when we load a big list
\edef\currentsynonymexpansion{\simplelistparameter\c!expansion}%
\preprocessexpansion\currentsynonymexpansion\m_synonyms_text \currentsynonymcoding{#4}%
\preprocessexpansion\currentsynonymexpansion\m_synonyms_meaning\currentsynonymcoding{#5}%
+ %
\clf_registersynonym
{\currentsynonym}%
{synonym}%
@@ -320,6 +322,9 @@
\unexpanded\def\resetusedsynonyms [#1]{\clf_resetusedsynonyms {#1}}
\unexpanded\def\resetshownsynonyms [#1]{\clf_resetshownsynonyms {#1}}
+\let\rawsynonymname \clf_synonymname
+\let\rawsynonymmeaning\clf_synonymmeaning
+
\installcorenamespace{simplelistalternative} % specific ways of rendering a list
\installcorenamespace{simplelistrenderings} % a namespace for setups (rather local)
@@ -342,6 +347,8 @@
\let \currentsynonym\currentsimplelist % for a while
\def \currentsynonymtag{#2}%
\edef\currentsimplelistalternative{\simplelistparameter\c!alternative}%
+ \doifnotcommandhandler\??simplelistalternative\currentsimplelistalternative
+ {\let\currentsimplelistalternative\v!normal}%
\fastsetup{\??simplelistrenderings:\v!synonym:\currentsimplelistalternative}%
\normalexpanded{\endgroup\simplelistparameter\c!next}}
@@ -548,9 +555,17 @@
\def \currentsortingtag{#2}%
\let \currentsimplelist\currentsorting
\edef\currentsimplelistalternative{\simplelistparameter\c!alternative}%
+ \doifnotcommandhandler\??simplelistalternative\currentsimplelistalternative
+ {\let\currentsimplelistalternative\v!normal}%
\fastsetup{\??simplelistrenderings:\v!sorting:\currentsimplelistalternative}%
\normalexpanded{\endgroup\simplelistparameter\c!next}}
+% or:
+%
+% \doifelsesetups{\??simplelistrenderings:\v!sorting:\currentsimplelistalternative}
+% {\fastsetup{\??simplelistrenderings:\v!sorting:\currentsimplelistalternative}}
+% {\fastsetup{\??simplelistrenderings:\v!sorting:\v!normal}}
+
\startsetups [\??simplelistrenderings:\v!sorting:\v!normal]
\fastsetup{\??simplelistrenderings::\v!sorting}%
\stopsetups
diff --git a/Master/texmf-dist/tex/context/base/strc-tag.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-tag.lua
index 637d74e8c08..8f2e1897810 100644
--- a/Master/texmf-dist/tex/context/base/strc-tag.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-tag.lua
@@ -12,7 +12,7 @@ if not modules then modules = { } end modules ['strc-tag'] = {
-- end of the chain tag) or by so called fullname which is a tagname combined with a number.
local type, next = type, next
-local insert, remove, unpack, concat = table.insert, table.remove, table.unpack, table.concat
+local insert, remove, unpack, concat, merge = table.insert, table.remove, table.unpack, table.concat, table.merge
local find, topattern, format = string.find, string.topattern, string.format
local lpegmatch, P, S, C, Cc = lpeg.match, lpeg.P, lpeg.S, lpeg.C, lpeg.Cc
local texattribute = tex.attribute
@@ -45,6 +45,7 @@ local tagpatterns = { }
local lasttags = { }
local stacksize = 0
local metadata = nil -- applied to the next element
+local documentdata = { }
local tags = structures.tags
tags.taglist = taglist -- can best be hidden
@@ -127,7 +128,11 @@ local properties = allocate {
delimitedblock = { pdf = "BlockQuote", nature = "display" },
delimited = { pdf = "Quote", nature = "inline" },
+ delimitedcontent = { pdf = "Span", nature = "inline" },
+ delimitedsymbol = { pdf = "Span", nature = "inline" },
subsentence = { pdf = "Span", nature = "inline" },
+ subsentencecontent = { pdf = "Span", nature = "inline" },
+ subsentencesymbol = { pdf = "Span", nature = "inline" },
label = { pdf = "Span", nature = "mixed" },
number = { pdf = "Span", nature = "mixed" },
@@ -266,10 +271,14 @@ end
function tags.registermetadata(data)
local d = settings_to_hash(data)
- if metadata then
- table.merge(metadata,d)
+ if #chain > 1 then
+ if metadata then
+ merge(metadata,d)
+ else
+ metadata = d
+ end
else
- metadata = d
+ merge(documentdata,d)
end
end
@@ -331,6 +340,10 @@ function tags.start(tag,specification)
taglist[attribute] = specification
specifications[completetag] = specification
--
+ if completetag == "document>1" then
+ specification.metadata = documentdata
+ end
+ --
texattribute[a_tagged] = attribute
return attribute
end
@@ -498,6 +511,6 @@ implement {
implement {
name = "settaggedmetadata",
- actions = structures.tags.registermetadata,
+ actions = tags.registermetadata,
arguments = "string"
}
diff --git a/Master/texmf-dist/tex/context/base/strc-tag.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-tag.mkiv
index f2b59c29c2d..c9132bf0493 100644
--- a/Master/texmf-dist/tex/context/base/strc-tag.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-tag.mkiv
@@ -109,7 +109,11 @@
\def\t!delimitedblock {delimited} % BlockQuote
\def\t!delimited {delimited} % Quote
+\def\t!delimitedsymbol {delimitedsymbol} % Span
+\def\t!delimitedcontent {delimitedcontent} % Span
\def\t!subsentence {subsentence} % Span
+\def\t!subsentencecontent {subsentencecontent} % Span
+\def\t!subsentencesymbol {subsentencesymbol} % Span
\def\t!float {float} % Div
\def\t!floatcaption {floatcaption} % Caption
@@ -262,6 +266,11 @@
\let\strc_tags_start_nop_chained \gobblethreearguments
\let\strc_tags_stop_nop \donothing
+\def\strc_tags_start_yes_ignore{\clf_starttag{\t!ignore}}
+\let\strc_tags_stop_yes_ignore \strc_tags_stop_yes
+\let\strc_tags_start_nop_ignore\donothing
+\let\strc_tags_stop_nop_ignore \donothing
+
% more efficient:
% \dostarttagged % {tag} {detail}
@@ -276,13 +285,17 @@
{\let\dostarttagged \strc_tags_enabled_start_detail
\let\dostarttaggednodetail\strc_tags_enabled_start_no_detail
\let\dostarttaggedchained \strc_tags_enabled_start_chained
- \let\dostoptagged \strc_tags_enabled_stop}
+ \let\dostoptagged \strc_tags_enabled_stop
+ \let\dostartignoretagging \strc_tags_start_yes_ignore
+ \let\dostopignoretagging \strc_tags_stop_yes_ignore}
\unexpanded\def\strc_tags_disable
{\let\dostarttagged \strc_tags_start_nop_detail
\let\dostarttaggednodetail\strc_tags_start_nop_no_detail
\let\dostarttaggedchained \strc_tags_start_nop_chained
- \let\dostoptagged \strc_tags_stop_nop}
+ \let\dostoptagged \strc_tags_stop_nop
+ \let\dostartignoretagging \strc_tags_start_nop_ignore
+ \let\dostopignoretagging \strc_tags_stop_nop_ignore}
% for luigi (beware: fully expandable):
@@ -434,6 +447,16 @@
\strc_tags_disable
\to \everybeforepagebody
+%D This will only work well with sane use.
+
+\appendtoks
+ \dostartignoretagging
+\to \everybeforepagebody
+
+\appendtoks
+ \dostopignoretagging
+\to \everyafterpagebody
+
% \doifelseinelement{structure:section} {yes} {no}
% \doifelseinelement{structure:chapter} {yes} {no}
% \doifelseinelement{division:*-structure:chapter} {yes} {no}
diff --git a/Master/texmf-dist/tex/context/base/strc-xml.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-xml.mkiv
index 3f9b4ef811d..3f9b4ef811d 100644
--- a/Master/texmf-dist/tex/context/base/strc-xml.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-xml.mkiv
diff --git a/Master/texmf-dist/tex/context/base/supp-box.lua b/Master/texmf-dist/tex/context/base/mkiv/supp-box.lua
index 7cc71a891dd..d3a4f57e54b 100644
--- a/Master/texmf-dist/tex/context/base/supp-box.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/supp-box.lua
@@ -12,59 +12,66 @@ local lpegmatch = lpeg.match
local report_hyphenation = logs.reporter("languages","hyphenation")
-local tex = tex
-local context = context
-local nodes = nodes
-
-local implement = interfaces.implement
-
-local splitstring = string.split
-
-local nodecodes = nodes.nodecodes
-
-local disc_code = nodecodes.disc
-local hlist_code = nodecodes.hlist
-local vlist_code = nodecodes.vlist
-local glue_code = nodecodes.glue
-local kern_code = nodecodes.kern
-local glyph_code = nodecodes.glyph
-
-local nuts = nodes.nuts
-local tonut = nuts.tonut
-local tonode = nuts.tonode
-
-local getfield = nuts.getfield
-local getnext = nuts.getnext
-local getprev = nuts.getprev
-local getid = nuts.getid
-local getlist = nuts.getlist
-local getattribute = nuts.getattribute
-local getbox = nuts.getbox
-
-local setfield = nuts.setfield
-local setbox = nuts.setbox
-
-local free_node = nuts.free
-local flush_list = nuts.flush_list
-local copy_node = nuts.copy
-local copy_list = nuts.copy_list
-local find_tail = nuts.tail
-local traverse_id = nuts.traverse_id
-local link_nodes = nuts.linked
-
-local listtoutf = nodes.listtoutf
-
-local nodepool = nuts.pool
-local new_penalty = nodepool.penalty
-local new_hlist = nodepool.hlist
-local new_glue = nodepool.glue
-local new_rule = nodepool.rule
-local new_kern = nodepool.kern
-
-local setlistcolor = nodes.tracers.colors.setlist
-
-local texget = tex.get
-local texgetbox = tex.getbox
+local tex = tex
+local context = context
+local nodes = nodes
+
+local implement = interfaces.implement
+
+local splitstring = string.split
+
+local nodecodes = nodes.nodecodes
+
+local disc_code = nodecodes.disc
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local glue_code = nodecodes.glue
+local kern_code = nodecodes.kern
+local glyph_code = nodecodes.glyph
+
+local nuts = nodes.nuts
+local tonut = nuts.tonut
+local tonode = nuts.tonode
+
+local getfield = nuts.getfield
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getdisc = nuts.getdisc
+local getid = nuts.getid
+local getlist = nuts.getlist
+local getattribute = nuts.getattribute
+local getbox = nuts.getbox
+
+local setfield = nuts.setfield
+local setlink = nuts.setlink
+local setboth = nuts.setboth
+local setnext = nuts.setnext
+local setbox = nuts.setbox
+local setlist = nuts.setlist
+
+local free_node = nuts.free
+local flush_list = nuts.flush_list
+local copy_node = nuts.copy
+local copy_list = nuts.copy_list
+local find_tail = nuts.tail
+local traverse_id = nuts.traverse_id
+local link_nodes = nuts.linked
+local dimensions = nuts.dimensions
+
+local listtoutf = nodes.listtoutf
+
+local nodepool = nuts.pool
+local new_penalty = nodepool.penalty
+local new_hlist = nodepool.hlist
+local new_glue = nodepool.glue
+local new_rule = nodepool.rule
+local new_kern = nodepool.kern
+
+local setlistcolor = nodes.tracers.colors.setlist
+
+local texget = tex.get
+local texgetbox = tex.getbox
+local texsetdimen = tex.setdimen
local function hyphenatedlist(head,usecolor)
local current = head and tonut(head)
@@ -73,9 +80,7 @@ local function hyphenatedlist(head,usecolor)
local next = getnext(current)
local prev = getprev(current)
if id == disc_code then
- local pre = getfield(current,"pre")
- local post = getfield(current,"post")
- local replace = getfield(current,"replace")
+ local pre, post, replace = getdisc(current)
if pre then
setfield(current,"pre",nil)
end
@@ -97,8 +102,7 @@ local function hyphenatedlist(head,usecolor)
setfield(current,"replace",nil)
end
-- setfield(current,"replace",new_rule(65536)) -- new_kern(65536*2))
- setfield(current,"next",nil)
- setfield(current,"prev",nil)
+ setboth(current)
local list = link_nodes (
pre and new_penalty(10000),
pre,
@@ -108,12 +112,10 @@ local function hyphenatedlist(head,usecolor)
)
local tail = find_tail(list)
if prev then
- setfield(prev,"next",list)
- setfield(list,"prev",prev)
+ setlink(prev,list)
end
if next then
- setfield(tail,"next",next)
- setfield(next,"prev",tail)
+ setlink(tail,next)
end
-- free_node(current)
elseif id == vlist_code or id == hlist_code then
@@ -313,12 +315,10 @@ implement {
if head then
if inbetween > 0 then
local n = new_glue(0,0,inbetween)
- setfield(tail,"next",n)
- setfield(n,"prev",tail)
+ setlink(tail,n)
tail = n
end
- setfield(tail,"next",list)
- setfield(list,"prev",tail)
+ setlink(tail,list)
else
head = list
end
@@ -329,9 +329,8 @@ implement {
local prev = getprev(tail)
if next then
local list = getlist(tail)
- setfield(prev,"next",list)
- setfield(list,"prev",prev)
- setfield(tail,"list",nil)
+ setlink(prev,list)
+ setlist(tail)
tail = find_tail(list)
else
tail = prev
@@ -339,13 +338,13 @@ implement {
free_node(temp)
end
-- done
- setfield(tail,"next",nil)
- setfield(current,"list",nil)
+ setnext(tail)
+ setlist(current)
end
current = next
end
local result = new_hlist()
- setfield(result,"list",head)
+ setlist(result,head)
setbox(target,result)
end
}
@@ -368,3 +367,54 @@ implement {
context.puretext(nodes.toutf(texgetbox(n).list)) -- helper is defined later
end
}
+
+local function getnaturaldimensions(n)
+ local w, h, d = 0, 0, 0
+ local l = getlist(getbox(n))
+ if l then
+ w, h, d = dimensions(l)
+ end
+ texsetdimen("lastnaturalboxwd",w)
+ texsetdimen("lastnaturalboxht",h)
+ texsetdimen("lastnaturalboxdp",d)
+ return w, h, d
+end
+
+interfaces.implement {
+ name = "getnaturaldimensions",
+ arguments = "integer",
+ actions = getnaturaldimensions
+}
+
+interfaces.implement {
+ name = "naturalwd",
+ arguments = "integer",
+ actions = function(n)
+ getnaturaldimensions(n)
+ context.lastnaturalboxwd(false)
+ end
+}
+
+local function firstdirinbox(n)
+ local b = getbox(n)
+ if b then
+ local l = getlist(b)
+ if l then
+ for h in traverse_id(hlist_code,l) do
+ return getfield(h,"dir")
+ end
+ end
+ end
+end
+
+nodes.firstdirinbox = firstdirinbox
+
+local doifelse = commands.doifelse
+
+interfaces.implement {
+ name = "doifelserighttoleftinbox",
+ arguments = "integer",
+ actions = function(n)
+ doifelse(firstdirinbox(n) == "TRT")
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/supp-box.mkiv b/Master/texmf-dist/tex/context/base/mkiv/supp-box.mkiv
index 54b0e2860a3..a302076f204 100644
--- a/Master/texmf-dist/tex/context/base/supp-box.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/supp-box.mkiv
@@ -217,7 +217,7 @@
\unexpanded\def\syst_boxes_math_set_nextbox#1%
{\c_boxes_math_style\mathstyle
- \setbox\nextbox\hbox{$\mathsurround\zeropoint\triggermathstyle\c_boxes_math_style{#1}$}}
+ \setbox\nextbox\hbox{\normalstartimath\mathsurround\zeropoint\triggermathstyle\c_boxes_math_style{#1}\normalstopimath}}
%D \macros
%D {smash}
@@ -281,7 +281,7 @@
\def\syst_boxes_smash_process_option#1%
{\ifx#1\relax\else
- \ifcsname\??smashoptions#1\endcsname\csname\??smashoptions#1\endcsname\fi
+ \begincsname\??smashoptions#1\endcsname
\expandafter\syst_boxes_smash_process_option
\fi}
@@ -726,24 +726,24 @@
%D Some well known friends, but we implement them our own
%D way. We want the macros to work in both math and text mode.
-\def\dodorlap{\hbox to \zeropoint{\box\nextbox\normalhss}\endgroup}
-\def\dodollap{\hbox to \zeropoint{\normalhss\box\nextbox}\endgroup}
-\def\dodoclap{\hbox to \zeropoint{\normalhss\box\nextbox\normalhss}\endgroup}
+\def\dodorlap{\hpack to \zeropoint{\box\nextbox\normalhss}\endgroup}
+\def\dodollap{\hpack to \zeropoint{\normalhss\box\nextbox}\endgroup}
+\def\dodoclap{\hpack to \zeropoint{\normalhss\box\nextbox\normalhss}\endgroup}
\def\dorlap{\begingroup\dowithnextboxcs\dodorlap\hbox}
\def\dollap{\begingroup\dowithnextboxcs\dodollap\hbox}
\def\doclap{\begingroup\dowithnextboxcs\dodoclap\hbox}
-\def\domathclap{\mathpalette\dodomathclap} \def\dodomathclap#1#2{\doclap{$\mathsurround\zeropoint#1#2$}}
-\def\domathllap{\mathpalette\dodomathllap} \def\dodomathllap#1#2{\dollap{$\mathsurround\zeropoint#1#2$}}
-\def\domathrlap{\mathpalette\dodomathrlap} \def\dodomathrlap#1#2{\dorlap{$\mathsurround\zeropoint#1#2$}}
+\def\domathclap{\mathpalette\dodomathclap} \def\dodomathclap#1#2{\doclap{\normalstartimath\mathsurround\zeropoint#1#2\normalstopimath}}
+\def\domathllap{\mathpalette\dodomathllap} \def\dodomathllap#1#2{\dollap{\normalstartimath\mathsurround\zeropoint#1#2\normalstopimath}}
+\def\domathrlap{\mathpalette\dodomathrlap} \def\dodomathrlap#1#2{\dorlap{\normalstartimath\mathsurround\zeropoint#1#2\normalstopimath}}
\unexpanded\def\rlap{\mathortext\domathrlap\dorlap}
\unexpanded\def\llap{\mathortext\domathllap\dollap}
\unexpanded\def\clap{\mathortext\domathclap\doclap}
-\def\dodotlap{\vbox to \zeropoint{\normalvss\box\nextbox}\endgroup}
-\def\dodoblap{\vbox to \zeropoint{\box\nextbox\normalvss}\endgroup}
+\def\dodotlap{\vpack to \zeropoint{\normalvss\box\nextbox}\endgroup}
+\def\dodoblap{\vpack to \zeropoint{\box\nextbox\normalvss}\endgroup}
\unexpanded\def\tlap{\begingroup\dowithnextboxcs\dodotlap\vbox}
\unexpanded\def\blap{\begingroup\dowithnextboxcs\dodoblap\vbox}
@@ -915,7 +915,7 @@
% We will turn this into a \MKIV\ variant.
\unexpanded\def\insertshapesignal
- {\hbox to \shapesignal{\strut\hss}% plus \strut
+ {\hpack to \shapesignal{\strut\hss}% plus \strut
\prevdepth\strutdp} % never \nointerlineskip
\unexpanded\def\restoreshapebox % compensates for the signal
@@ -1263,7 +1263,7 @@
\fi
\unvbox\nextbox
\setbox\nextbox\lastbox
- \global\setbox1\hbox
+ \global\setbox1\hpack
{\ifdone
\unhbox\nextbox\unskip\kern\zeropoint\box\scratchbox
\else
@@ -1341,7 +1341,7 @@
{\ifx\clip\undefined
\box\plusone
\else\ifdim\wd\plusone>\hsize
- \lower\strutdepth\hbox{\clip[\c!width=\hsize,\c!height=\lineheight]{\hbox{\raise\strutdepth\box\plusone}}}%
+ \lower\strutdepth\hpack{\clip[\c!width=\hsize,\c!height=\lineheight]{\hpack{\raise\strutdepth\box\plusone}}}%
\else
\box\plusone
\fi\fi
@@ -1375,7 +1375,7 @@
\clf_applytobox
method {char}%
box \scratchbox
- command {\checkedstrippedcsname#2}%
+ command {\csstring#2}%
nested true%
\relax
\endgroup}
@@ -1388,7 +1388,7 @@
\clf_applytobox
method {word}%
box \scratchbox
- command {\checkedstrippedcsname#2}%
+ command {\csstring#2}%
nested true%
\relax
\endgroup}
@@ -1400,7 +1400,7 @@
\dowithnextbox{\clf_applytobox
method {char}%
box \nextbox
- command {\checkedstrippedcsname#1}%
+ command {\csstring#1}%
nested true%
\relax}%
\hbox}
@@ -1410,7 +1410,7 @@
\dowithnextbox{\clf_applytobox
method {word}%
box \nextbox
- command {\checkedstrippedcsname#1}%
+ command {\csstring#1}%
nested true%
\relax}%
\hbox}
@@ -1425,28 +1425,28 @@
\unexpanded\def\applytosplitstringchar#1#2%
{\dontleavehmode\clf_processsplit
data {#2}%
- command {\checkedstrippedcsname#1}%
+ command {\csstring#1}%
method {char}%
\relax}
\unexpanded\def\applytosplitstringword#1#2%
{\dontleavehmode\clf_processsplit
data {#2}%
- command {\checkedstrippedcsname#1}%
+ command {\csstring#1}%
method {word}%
\relax}
\unexpanded\def\applytosplitstringline#1#2%
{\dontleavehmode\clf_processsplit
data {#2}%
- command {\checkedstrippedcsname#1}%
+ command {\csstring#1}%
method {line}%
\relax}
\unexpanded\def\applytosplitstringcharspaced#1#2%
{\dontleavehmode\clf_processsplit
data {#2}%
- command {\checkedstrippedcsname#1}%
+ command {\csstring#1}%
method {char}%
spaced true%
\relax}
@@ -1454,7 +1454,7 @@
\unexpanded\def\applytosplitstringwordspaced#1#2%
{\dontleavehmode\clf_processsplit
data {#2}%
- command {\checkedstrippedcsname#1}%
+ command {\csstring#1}%
method {word}%
spaced true%
\relax}
@@ -1462,7 +1462,7 @@
\unexpanded\def\applytosplitstringlinespaced#1#2%
{\dontleavehmode\clf_processsplit
data {#2}%
- command {\checkedstrippedcsname#1}%
+ command {\csstring#1}%
method {line}%
spaced true%
\relax}
@@ -1499,7 +1499,7 @@
\dowithnextboxcs\syst_boxes_sbox_finish\vbox}
\unexpanded\def\syst_boxes_sbox_finish
- {\setbox\nextbox\hbox
+ {\setbox\nextbox\hpack
{\strut
\dp\nextbox\zeropoint
\lower\strutdp\box\nextbox}%
@@ -1513,7 +1513,7 @@
\unexpanded\def\inlinedbox
{\bgroup
\dowithnextbox
- {\setbox\nextbox\hbox
+ {\setbox\nextbox\hpack
{\lower
\dimexpr(\htdp\nextbox-\lineheight)/\plustwo+\strutdp\relax
\box\nextbox}%
@@ -1551,7 +1551,7 @@
\def\syst_boxes_topskippedbox_finish
{\edef\m_boxes_tmp{\ifdim\strutdepth=\dp\nextbox\dp\nextbox\the\dp\nextbox\fi}%
- \lower\topskip\hbox{\raise\strutheight\box\nextbox}%
+ \lower\topskip\hpack{\raise\strutheight\box\nextbox}%
\m_boxes_tmp
\egroup}
@@ -1603,7 +1603,7 @@
\unexpanded\def\centeredbox#1#% height +/-dimen width +/-dimen
{\bgroup
- \setbox0\vbox to \vsize
+ \setbox0\vpack to \vsize
\bgroup
\dontcomplain
\forgetall
@@ -1611,11 +1611,11 @@
\setbox2\vbox{\hrule\s!height\zeropoint#1}%
\advance\vsize \ht2
\advance\hsize \wd0
- \vbox to \vsize
+ \vpack to \vsize
\bgroup
\vskip-\ht2
\vss
- \hbox to \hsize
+ \hpack to \hsize
\bgroup
\dowithnextbox
{\hskip-\wd0
@@ -1671,7 +1671,7 @@
\ifzeropt\wd\scratchbox\else\hsize\wd\scratchbox\fi
\setbox\scratchbox\vbox{\hrule\s!height\zeropoint#1}%
\ifzeropt\ht\scratchbox\else\vsize\ht\scratchbox\fi
- \vbox to \vsize{\vss\hbox to \hsize{\hss\box\nextbox\hss}\vss}%
+ \vpack to \vsize{\vss\hpack to \hsize{\hss\box\nextbox\hss}\vss}%
\egroup}%
\hbox}
@@ -1757,7 +1757,7 @@
\setbox0=\box\rigidcolumnbox
\doloop
{\setbox\rigidcolumnbox=\copy0
- \setbox\scratchbox\hbox to \savedrigidhsize
+ \setbox\scratchbox\hpack to \savedrigidhsize
{\dorecurse\rigidcolumns
{\setbox\scratchbox\vsplit\rigidcolumnbox to \scratchdimen
\dp\scratchbox\openstrutdepth
@@ -1772,10 +1772,10 @@
\hfillneg}%
\ifvoid\rigidcolumnbox\exitloop\else\advance\scratchdimen\lineheight\fi}%
\iftightrigidcolumns
- \setbox\scratchbox\hbox{\raise\dp\scratchbox\box\scratchbox}%
+ \setbox\scratchbox\hpack{\raise\dp\scratchbox\box\scratchbox}%
\else
\advance\scratchdimen -\openstrutdepth
- \setbox\scratchbox\hbox{\raise\scratchdimen\box\scratchbox}%
+ \setbox\scratchbox\hpack{\raise\scratchdimen\box\scratchbox}%
\dp\scratchbox\openstrutdepth
\ht\scratchbox\scratchdimen
\fi
@@ -1949,7 +1949,7 @@
\ht\hhbox\strutht
\dp\hhbox\strutdp
\ifzeropt\hhboxindent\else % \ifdim\hhboxindent=\zeropoint\else
- \setbox\hhbox\hbox{\kern-\hhboxindent\box\hhbox}%
+ \setbox\hhbox\hpack{\kern-\hhboxindent\box\hhbox}%
\hhboxindent\zeropoint
\fi
\global\lasthhboxwidth\wd\hhbox
@@ -1962,7 +1962,7 @@
\egroup}
\def\dohboxofvbox
- {\setbox0\vbox{\unvbox\scratchcounter\global\setbox1\lastbox}%
+ {\setbox0\vpack{\unvbox\scratchcounter\global\setbox1\lastbox}%
\unhbox1
\egroup}
@@ -2130,17 +2130,17 @@
{%\removeunwantedspaces % already done
\scratchdepth\dp\ifdim\dp\nextbox>\dp\processbox\nextbox\else\processbox\fi
\ifdim\ht\nextbox>\ht\processbox
- \setbox\processbox\vbox to \ht\nextbox {\dp\processbox\zeropoint\vss\box\processbox\vss}%
+ \setbox\processbox\vpack to \ht\nextbox {\dp\processbox\zeropoint\vss\box\processbox\vss}%
\else
- \setbox\nextbox \vbox to \ht\processbox{\dp\nextbox \zeropoint\vss\box\nextbox \vss}%
+ \setbox\nextbox \vpack to \ht\processbox{\dp\nextbox \zeropoint\vss\box\nextbox \vss}%
\fi
\dp\nextbox \scratchdepth
\dp\processbox\scratchdepth
\scratchwidth\wd\ifdim\wd\nextbox>\wd\processbox\nextbox\else\processbox\fi
- \setbox\processbox\hbox to \scratchwidth
- {\hbox to \scratchwidth{\hss\box\processbox\hss}%
+ \setbox\processbox\hpack to \scratchwidth
+ {\hpack to \scratchwidth{\hss\box\processbox\hss}%
\kern-\scratchwidth
- \hbox to \scratchwidth{\hss\box\nextbox \hss}}}
+ \hpack to \scratchwidth{\hss\box\nextbox \hss}}}
\unexpanded\def\startoverlay
{\bgroup
@@ -2226,7 +2226,7 @@
{\scratchdepth\dimexpr\ht\nextbox+\dp\nextbox-\ht\strutbox\relax
\ht\nextbox\ht\strutbox
\dp\nextbox\scratchdepth
- \setbox\nextbox\hbox{\lower\dp\nextbox\box\nextbox}%
+ \setbox\nextbox\hpack{\lower\dp\nextbox\box\nextbox}%
\ht\nextbox\ht\strutbox
\dp\nextbox\scratchdepth
\box\nextbox
@@ -2236,7 +2236,7 @@
{\scratchheight\dimexpr\ht\nextbox+\dp\nextbox-\dp\strutbox\relax
\dp\nextbox\dp\strutbox
\ht\nextbox\scratchheight
- \setbox\nextbox\hbox{\lower\dp\nextbox\box\nextbox}%
+ \setbox\nextbox\hpack{\lower\dp\nextbox\box\nextbox}%
\dp\nextbox\dp\strutbox
\ht\nextbox\scratchheight
\box\nextbox
@@ -2247,9 +2247,9 @@
%D
%D A few more boxes.
-\def\dodolhbox{\hbox to \hsize{\box\nextbox\hss }}
-\def\dodomhbox{\hbox to \hsize{\hss\box\nextbox\hss}}
-\def\dodorhbox{\hbox to \hsize{\hss\box\nextbox }}
+\def\dodolhbox{\hpack to \hsize{\box\nextbox\hss }}
+\def\dodomhbox{\hpack to \hsize{\hss\box\nextbox\hss}}
+\def\dodorhbox{\hpack to \hsize{\hss\box\nextbox }}
\unexpanded\def\lhbox{\dowithnextboxcs\dodolhbox\hbox}
\unexpanded\def\mhbox{\dowithnextboxcs\dodomhbox\hbox}
@@ -2315,7 +2315,7 @@
\dimen0\ht\nextbox
\ht\nextbox\strutht
\dp\nextbox\strutdp
- \hbox{\box\nextbox}
+ \hpack{\box\nextbox}
\prevdepth\strutdp
\doloop
{\advance\dimen0 -\lineheight
@@ -2323,7 +2323,7 @@
\exitloop
\else
\nobreak
- \hbox{\strut}
+ \hpack{\strut}
\fi}
\egroup}
\vbox}
@@ -2341,7 +2341,7 @@
{\iftraceboxplacement
\bgroup
\scratchdimen2\onepoint
- \setbox\scratchbox\hbox to \zeropoint
+ \setbox\scratchbox\hpack to \zeropoint
{\hss
\vrule
\s!width \scratchdimen
@@ -2361,14 +2361,14 @@
\newdimen\boxhdisplacement
\newdimen\boxvdisplacement
-\unexpanded\def\rightbox {\hbox\bgroup\dowithnextboxcs\syst_boxes_rightbox_finish \placedbox}
-\unexpanded\def\leftbox {\hbox\bgroup\dowithnextboxcs\syst_boxes_leftbox_finish \placedbox}
-\unexpanded\def\topbox {\hbox\bgroup\dowithnextboxcs\syst_boxes_topbox_finish \placedbox}
-\unexpanded\def\bottombox {\hbox\bgroup\dowithnextboxcs\syst_boxes_bottombox_finish \placedbox}
-\unexpanded\def\lefttopbox {\hbox\bgroup\dowithnextboxcs\syst_boxes_lefttopbox_finish \placedbox}
-\unexpanded\def\righttopbox {\hbox\bgroup\dowithnextboxcs\syst_boxes_righttopbox_finish \placedbox}
-\unexpanded\def\leftbottombox {\hbox\bgroup\dowithnextboxcs\syst_boxes_leftbottombox_finish \placedbox}
-\unexpanded\def\rightbottombox{\hbox\bgroup\dowithnextboxcs\syst_boxes_rightbottombox_finish\placedbox}
+\unexpanded\def\rightbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_rightbox_finish \placedbox}
+\unexpanded\def\leftbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_leftbox_finish \placedbox}
+\unexpanded\def\topbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_topbox_finish \placedbox}
+\unexpanded\def\bottombox {\hpack\bgroup\dowithnextboxcs\syst_boxes_bottombox_finish \placedbox}
+\unexpanded\def\lefttopbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_lefttopbox_finish \placedbox}
+\unexpanded\def\righttopbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_righttopbox_finish \placedbox}
+\unexpanded\def\leftbottombox {\hpack\bgroup\dowithnextboxcs\syst_boxes_leftbottombox_finish \placedbox}
+\unexpanded\def\rightbottombox{\hpack\bgroup\dowithnextboxcs\syst_boxes_rightbottombox_finish\placedbox}
\let\topleftbox \lefttopbox
\let\toprightbox \righttopbox
@@ -2434,10 +2434,10 @@
\boxcursor\kern\boxhdisplacement\lower\boxvdisplacement\box\nextbox
\egroup}
-\unexpanded\def\middlebox {\hbox\bgroup\dowithnextboxcs\syst_boxes_middlebox_finish \placedbox}
-\unexpanded\def\baselinemiddlebox{\hbox\bgroup\dowithnextboxcs\syst_boxes_baselinemiddlebox_finish\placedbox}
-\unexpanded\def\baselineleftbox {\hbox\bgroup\dowithnextboxcs\syst_boxes_baselineleftbox_finish \placedbox}
-\unexpanded\def\baselinerightbox {\hbox\bgroup\dowithnextboxcs\syst_boxes_baselinerightbox_finish \placedbox}
+\unexpanded\def\middlebox {\hpack\bgroup\dowithnextboxcs\syst_boxes_middlebox_finish \placedbox}
+\unexpanded\def\baselinemiddlebox{\hpack\bgroup\dowithnextboxcs\syst_boxes_baselinemiddlebox_finish\placedbox}
+\unexpanded\def\baselineleftbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_baselineleftbox_finish \placedbox}
+\unexpanded\def\baselinerightbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_baselinerightbox_finish \placedbox}
\def\syst_boxes_middlebox_finish
{\global\boxhdisplacement-.5\wd\nextbox
@@ -2476,7 +2476,7 @@
\dowithnextboxcontent
{\advance\hsize-#1\advance\hsize-#2\relax
\advance\vsize-#3\advance\vsize-#4\relax}
- {\forgetall\vbox to \vsize{\vskip#3\hbox to \hsize{\hskip#1\box\nextbox\hss}\vss}\egroup}
+ {\forgetall\vpack to \vsize{\vskip#3\hpack to \hsize{\hskip#1\box\nextbox\hss}\vss}\egroup}
\vbox}
%D \macros
@@ -2518,6 +2518,8 @@
%D \hbox{y:\foundbox{two}{a}} \par
%D \stoptyping
+%D Kind of obsolete:
+
\installcorenamespace {stackbox}
\installcorenamespace {stacklst}
@@ -2530,7 +2532,7 @@
\unexpanded\def\initializeboxstack#1%
{\def\docommand##1{\setstackbox{#1}{##1}{}}%
\ifcsname\??stacklst#1\endcsname
- \processcommacommand[\getvalue{\??stacklst#1}]\docommand
+ \expandafter\processcommacommand\expandafter[\lastnamedcs]\docommand
\fi
\letgvalueempty{\??stacklst#1}}
@@ -2538,28 +2540,32 @@
{% beware, \setxvalue defines the cs beforehand so we cannot use the
% test inside the { }
\ifcsname\??stacklst#1\endcsname
- \setxvalue{\??stacklst#1}{\csname\??stacklst#1\endcsname,#2}%
+ %\setxvalue{\??stacklst#1}{\csname\??stacklst#1\endcsname,#2}%
+ \expandafter\xdef\csname\??stacklst#1\expandafter\endcsname\expandafter{\lastnamedcs,#2}%
\else
- \setxvalue{\??stacklst#1}{#2}%
+ \expandafter\xdef\csname\??stacklst#1\endcsname{#2}%
\fi
\setstackbox{#1}{#2}}
\unexpanded\def\restorebox#1#2% unwrapped
{\ifcsname\??stackbox#1:#2\endcsname
- \copy\csname\??stackbox#1:#2\endcsname
+ %\copy\csname\??stackbox#1:#2\endcsname
+ \copy\lastnamedcs
\else
\emptybox
\fi}
\unexpanded\def\foundbox#1#2% wrapped
- {\vbox
+ {\vpack
{\ifcsname\??stackbox#1:#2\endcsname
- \copy\csname\??stackbox#1:#2\endcsname
+ %\copy\csname\??stackbox#1:#2\endcsname
+ \copy\lastnamedcs
\fi}}
\unexpanded\def\doifelsebox#1#2#3#4%
{\ifcsname\??stackbox#1:#2\endcsname
- \ifvoid\csname\??stackbox#1:#2\endcsname#4\else#3\fi
+ %\ifvoid\csname\??stackbox#1:#2\endcsname#4\else#3\fi
+ \ifvoid\lastnamedcs#4\else#3\fi
\else
#4%
\fi}
@@ -2665,14 +2671,14 @@
\def\syst_boxes_lower_indeed{\dowithnextboxcs\syst_boxes_lower_finish}
\def\syst_boxes_raise_finish
- {\setbox\nextbox\hbox{\raise\scratchdimen\box\nextbox}%
+ {\setbox\nextbox\hpack{\raise\scratchdimen\box\nextbox}%
\ht\nextbox\strutht
\dp\nextbox\strutdp
\box\nextbox
\egroup}
\def\syst_boxes_lower_finish
- {\setbox\nextbox\hbox{\lower\scratchdimen\box\nextbox}%
+ {\setbox\nextbox\hpack{\lower\scratchdimen\box\nextbox}%
\ht\nextbox\strutht
\dp\nextbox\strutdp
\box\nextbox
@@ -2712,9 +2718,10 @@
\ifdefined\textdir
- \unexpanded\def\naturalhbox{\hbox dir TLT}
- \unexpanded\def\naturalvbox{\vbox dir TLT}
- %\unexpanded\def\naturalvtop{\normalvtop dir TLT}
+ \unexpanded\def\naturalhbox {\hbox dir TLT}
+ \unexpanded\def\naturalvbox {\vbox dir TLT}
+ \unexpanded\def\naturalhpack{\hpack dir TLT}
+ \unexpanded\def\naturalvpack{\vpack dir TLT}
\fi
@@ -2728,7 +2735,7 @@
\dowithnextboxcs\syst_boxes_vcenter_finish\vbox}
\def\syst_boxes_vcenter_finish
- {\hbox{$\normalvcenter{\box\nextbox}$}%
+ {\hpack{\normalstartimath\normalvcenter{\box\nextbox}\normalstopimath}%
\egroup}
% could be \everymathematics
@@ -2748,7 +2755,7 @@
\dowithnextboxcs\syst_boxes_frozenhbox_finish\hbox}
\def\syst_boxes_frozenhbox_finish
- {\hbox{\hbox{\box\nextbox}}%
+ {\hpack{\hpack{\box\nextbox}}%
\egroup}
%D \macros
@@ -2765,8 +2772,10 @@
\unexpanded\def\gsetboxllx#1#2{\expandafter\xdef\csname\??box_x\number#1\endcsname{\the\dimexpr#2\relax}}
\unexpanded\def\gsetboxlly#1#2{\expandafter\xdef\csname\??box_y\number#1\endcsname{\the\dimexpr#2\relax}}
-\def\getboxllx#1{\ifcsname\??box_x\number#1\endcsname\csname\??box_x\number#1\endcsname\else\zeropoint\fi}
-\def\getboxlly#1{\ifcsname\??box_y\number#1\endcsname\csname\??box_y\number#1\endcsname\else\zeropoint\fi}
+%def\getboxllx#1{\ifcsname\??box_x\number#1\endcsname\csname\??box_x\number#1\endcsname\else\zeropoint\fi}
+%def\getboxlly#1{\ifcsname\??box_y\number#1\endcsname\csname\??box_y\number#1\endcsname\else\zeropoint\fi}
+\def\getboxllx#1{\ifcsname\??box_x\number#1\endcsname\lastnamedcs\else\zeropoint\fi}
+\def\getboxlly#1{\ifcsname\??box_y\number#1\endcsname\lastnamedcs\else\zeropoint\fi}
\def\directgetboxllx#1{\csname\??box_x\number#1\endcsname} % use when sure existence
\def\directgetboxlly#1{\csname\??box_y\number#1\endcsname} % use when sure existence
@@ -2831,7 +2840,7 @@
\unexpanded\def\minimalhbox#1#%
{\dowithnextbox
{\bgroup
- \setbox\scratchbox\hbox#1{\hss}%
+ \setbox\scratchbox\hpack#1{\hss}%
\ifdim\wd\nextbox<\wd\scratchbox\wd\nextbox\wd\scratchbox\fi
\box\nextbox
\egroup}
@@ -2854,6 +2863,29 @@
\let\hyphenatedhbox\hbox
+%D We can do this:
+%D
+%D \starttyping
+%D \setbox0\hbox to 10cm{foo} \setbox2\hbox{\unhbox0} \the\wd2
+%D \stoptyping
+%D
+%D But this saves a copy (and hpack pass):
+%D
+%D \starttyping
+%D \setbox0\hbox to 10cm{foo} \the\naturalwd0
+%D \stoptyping
+
+\newdimen\lastnaturalboxwd
+\newdimen\lastnaturalboxht
+\newdimen\lastnaturalboxdp
+
+\let\getnaturaldimensions\clf_getnaturaldimensions % sets three dimensions
+\let\naturalwd \clf_naturalwd % calculates and returns wd
+
+\unexpanded\def\doifelserighttoleftinbox{\clf_doifelserighttoleftinbox}
+
+\let\doifrighttoleftinboxelse\doifelserighttoleftinbox
+
\protect \endinput
% a bit of test code:
diff --git a/Master/texmf-dist/tex/context/base/supp-dir.mkiv b/Master/texmf-dist/tex/context/base/mkiv/supp-dir.mkiv
index 6251012b6a1..6251012b6a1 100644
--- a/Master/texmf-dist/tex/context/base/supp-dir.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/supp-dir.mkiv
diff --git a/Master/texmf-dist/tex/context/base/supp-mat.mkiv b/Master/texmf-dist/tex/context/base/mkiv/supp-mat.mkiv
index 925f25cc4c3..b265a7c5a1d 100644
--- a/Master/texmf-dist/tex/context/base/supp-mat.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/supp-mat.mkiv
@@ -44,14 +44,14 @@
%D \def\MyPlus{\mathematics{\,+\,}}
%D \stoptyping
%D
-%D Which is implemented as:
-
-\let\normalsuperscript \Usuperscript
-\let\normalsubscript \Usubscript
-\let\normalstartimath \Ustartmath
-\let\normalstopimath \Ustopmath
-\let\normalstartdmath \Ustartdisplaymath
-\let\normalstopdmath \Ustopdisplaymath
+%D Which is implemented (in \type{syst-ini.mkiv}) as:
+
+% \let\normalsuperscript\Usuperscript
+% \let\normalsubscript \Usubscript
+% \let\normalstartimath \Ustartmath
+% \let\normalstopimath \Ustopmath
+% \let\normalstartdmath \Ustartdisplaymath
+% \let\normalstopdmath \Ustopdisplaymath
% \unexpanded\def\Ustartdisplaymath
% {\ifinner
diff --git a/Master/texmf-dist/tex/context/base/supp-ran.lua b/Master/texmf-dist/tex/context/base/mkiv/supp-ran.lua
index 4968e8cfc1d..4968e8cfc1d 100644
--- a/Master/texmf-dist/tex/context/base/supp-ran.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/supp-ran.lua
diff --git a/Master/texmf-dist/tex/context/base/supp-ran.mkiv b/Master/texmf-dist/tex/context/base/mkiv/supp-ran.mkiv
index f7cfd6e7334..f7cfd6e7334 100644
--- a/Master/texmf-dist/tex/context/base/supp-ran.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/supp-ran.mkiv
diff --git a/Master/texmf-dist/tex/context/base/supp-vis.mkiv b/Master/texmf-dist/tex/context/base/mkiv/supp-vis.mkiv
index de7c4288d49..8b94201620a 100644
--- a/Master/texmf-dist/tex/context/base/supp-vis.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/supp-vis.mkiv
@@ -1415,7 +1415,9 @@
{\dontinterfere
\dontcomplain
\setbox\boxrulescratchbox\normalhbox
- {$\normalmkern\ifnegative-\fi\scratchskip$}%
+ {\normalstartimath
+ \normalmkern\ifnegative-\fi\scratchskip
+ \normalstopimath}%
\setbox\boxrulescratchbox\normalhbox to \wd\boxrulescratchbox
{\visualvrule
\s!height16\testrulewidth
diff --git a/Master/texmf-dist/tex/context/base/symb-imp-cc.mkiv b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-cc.mkiv
index e753d695f8c..e753d695f8c 100644
--- a/Master/texmf-dist/tex/context/base/symb-imp-cc.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-cc.mkiv
diff --git a/Master/texmf-dist/tex/context/base/symb-imp-cow.mkiv b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-cow.mkiv
index 59eabae28ca..59eabae28ca 100644
--- a/Master/texmf-dist/tex/context/base/symb-imp-cow.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-cow.mkiv
diff --git a/Master/texmf-dist/tex/context/base/symb-imp-eur.mkiv b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-eur.mkiv
index 19a88c8fa86..19a88c8fa86 100644
--- a/Master/texmf-dist/tex/context/base/symb-imp-eur.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-eur.mkiv
diff --git a/Master/texmf-dist/tex/context/base/symb-imp-jmn.mkiv b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-jmn.mkiv
index d66e0a33257..d66e0a33257 100644
--- a/Master/texmf-dist/tex/context/base/symb-imp-jmn.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-jmn.mkiv
diff --git a/Master/texmf-dist/tex/context/base/symb-imp-mis.mkiv b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-mis.mkiv
index d2657512f3f..d2657512f3f 100644
--- a/Master/texmf-dist/tex/context/base/symb-imp-mis.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-mis.mkiv
diff --git a/Master/texmf-dist/tex/context/base/symb-imp-mvs.mkiv b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-mvs.mkiv
index 9902fc9e8a3..9902fc9e8a3 100644
--- a/Master/texmf-dist/tex/context/base/symb-imp-mvs.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-mvs.mkiv
diff --git a/Master/texmf-dist/tex/context/base/symb-imp-nav.mkiv b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-nav.mkiv
index 6e2f2c1f034..6e2f2c1f034 100644
--- a/Master/texmf-dist/tex/context/base/symb-imp-nav.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-nav.mkiv
diff --git a/Master/texmf-dist/tex/context/base/symb-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/symb-ini.lua
index 6a4a1882529..6a4a1882529 100644
--- a/Master/texmf-dist/tex/context/base/symb-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/symb-ini.lua
diff --git a/Master/texmf-dist/tex/context/base/symb-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/symb-ini.mkiv
index 40a0af6d690..23879b43a28 100644
--- a/Master/texmf-dist/tex/context/base/symb-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/symb-ini.mkiv
@@ -72,8 +72,6 @@
\addvalue{\??symbolset\m_symb_current_set}{#1}%
\fi}
-\letvalue{\??symbolset}\empty
-
\unexpanded\def\doifelseinsymbolset#1#2{\ifcsname\??symbol#1:#2\endcsname\expandafter\firstoftwoarguments\else\expandafter\secondoftwoarguments\fi}
\unexpanded\def\doifinsymbolset #1#2{\ifcsname\??symbol#1:#2\endcsname\expandafter\firstofoneargument \else\expandafter\gobbleoneargument \fi}
\unexpanded\def\doifelsesymbolset #1{\ifcsname\??symbolset#1\endcsname\expandafter\firstoftwoarguments\else\expandafter\secondoftwoarguments\fi}
@@ -81,7 +79,11 @@
\let\doifinsymbolsetelse\doifelseinsymbolset
\let\doifsymbolsetelse \doifelsesymbolset
-\def\symbolset#1{\csname\??symbolset\ifcsname\??symbolset#1\endcsname#1\fi\endcsname} % no [#1], to be used in commalists etc
+\letvalue{\??symbolset}\empty
+
+%def\symbolset#1{\csname\??symbolset\ifcsname\??symbolset#1\endcsname#1\fi\endcsname} % no [#1], to be used in commalists etc
+
+\def\symbolset#1{\begincsname\??symbolset#1\endcsname} % no [#1], to be used in commalists etc
%D Since symbols are used frequently in interactive
%D documents, we speed up this one. Well, that was history,
@@ -148,7 +150,8 @@
\letvalue{\??symbol}\firstofoneargument
\def\directsymbol#1#2% no \relax, there can be an argument, see lists
- {\csname\??symbol\ifcsname\??symbol#1:#2\endcsname#1:#2\fi\endcsname}
+ %{\csname\??symbol\ifcsname\??symbol#1:#2\endcsname#1:#2\fi\endcsname}
+ {\begincsname\??symbol#1:#2\endcsname}
\unexpanded\def\symb_fetch
{\ifconditional\c_symb_found
diff --git a/Master/texmf-dist/tex/context/base/symb-run.mkiv b/Master/texmf-dist/tex/context/base/mkiv/symb-run.mkiv
index 3d92c44166f..ed4d90861ec 100644
--- a/Master/texmf-dist/tex/context/base/symb-run.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/symb-run.mkiv
@@ -19,6 +19,7 @@
context.start()
context.forcesymbolset { collection }
context.starttabulate { "|lT|l|l|" }
+ local options = { framecolor = "orange", rulethickness = ".8pt", offset = interfaces.variables.overlay }
for i=1,#symbols do
local symbol = symbols[i]
context.NC()
@@ -26,15 +27,8 @@
context.NC()
context.symbol(symbol)
context.NC()
- context.color (
- { "red" },
- context.nested.ruledhbox(
- context.nested.color (
- { "black" },
- context.nested.symbol(symbol)
- )
- )
- )
+ context.framed(options,context.nested.symbol(symbol))
+ context.NC()
context.NR()
end
context.stoptabulate()
@@ -50,4 +44,16 @@
\gdef\symb_show_set[#1]%
{\ctxcommand{showsymbolset("#1","\symbolset{#1}")}}
-\protect \endinput
+\protect
+
+\continueifinputfile{symb-run.mkiv}
+
+\usesymbols[cc]
+
+\starttext
+
+ \showsymbolset[cc]
+
+ \symbol[cc][cc-by-sa-nc]
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-aux.lua b/Master/texmf-dist/tex/context/base/mkiv/syst-aux.lua
new file mode 100644
index 00000000000..98b92cef3b3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-aux.lua
@@ -0,0 +1,514 @@
+if not modules then modules = { } end modules ['syst-aux'] = {
+ version = 1.001,
+ comment = "companion to syst-aux.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- slower than lpeg:
+--
+-- utfmatch(str,"(.?)(.*)$")
+-- utf.sub(str,1,1)
+
+local tonumber = tonumber
+local utfsub = utf.sub
+local P, S, R, C, Cc, Cs, Carg, lpegmatch = lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.Cc, lpeg.Cs, lpeg.Carg, lpeg.match
+local next = next
+local find = string.find
+
+local context = context
+local implement = interfaces.implement
+local formatters = string.formatters
+local setcatcode = tex.setcatcode
+local utf8character = lpeg.patterns.utf8character
+local settings_to_array = utilities.parsers.settings_to_array
+local settings_to_set = utilities.parsers.settings_to_set
+local setmacro = interfaces.setmacro
+
+local pattern = C(utf8character^-1) * C(P(1)^0)
+
+implement {
+ name = "getfirstcharacter",
+ arguments = "string",
+ actions = function(str)
+ local first, rest = lpegmatch(pattern,str)
+ setmacro("firstcharacter",first)
+ setmacro("remainingcharacters",rest)
+ end
+}
+
+implement {
+ name = "thefirstcharacter",
+ arguments = "string",
+ actions = function(str)
+ local first, rest = lpegmatch(pattern,str)
+ context(first)
+ end
+}
+
+implement {
+ name = "theremainingcharacters",
+ arguments = "string",
+ actions = function(str)
+ local first, rest = lpegmatch(pattern,str)
+ context(rest)
+ end
+}
+
+local pattern = C(utf8character^-1)
+local ctx_doifelse = commands.doifelse
+
+implement {
+ name = "doifelsefirstchar",
+ arguments = { "string", "string" },
+ actions = function(str,chr)
+ ctx_doifelse(lpegmatch(pattern,str) == chr)
+ end
+}
+
+implement {
+ name = "getsubstring",
+ arguments = { "string", "string", "string" },
+ actions = function(str,first,last)
+ context(utfsub(str,tonumber(first),tonumber(last)))
+ end
+}
+
+-- function commands.addtocommalist(list,item)
+-- if list == "" then
+-- context(item)
+-- else
+-- context("%s,%s",list,item) -- using tex.print is some 10% faster
+-- end
+-- end
+--
+-- function commands.removefromcommalist(list,item)
+-- if list == "" then
+-- context(item)
+-- else
+-- -- okay, using a proper lpeg is probably faster
+-- -- we could also check for #l = 1
+-- local l = settings_to_array(list)
+-- local t, n = { }
+-- for i=1,#l do
+-- if l[i] ~= item then
+-- n = n + 1
+-- t[n] = item
+-- end
+-- end
+-- if n == 0 then
+-- context(item)
+-- else
+-- context(concat(list,","))
+-- end
+-- end
+-- end
+
+local pattern = (C((1-P("%"))^1) * Carg(1)) / function(n,d)
+ return formatters["%.0fsp"](d * tonumber(n)/100) end * P("%") * P(-1) -- .0 ?
+
+-- percentageof("10%",65536*10)
+
+implement {
+ name = "percentageof",
+ arguments = { "string", "dimen" },
+ actions = function(str,dim)
+ context(lpegmatch(pattern,str,1,dim) or str)
+ end
+}
+
+-- \gdef\setpercentdimen#1#2%
+-- {#1=\ctxcommand{percentageof("#2",\number#1)}\relax}
+
+local spaces = P(" ")^0 / ""
+local nohash = 1 - P("#")
+local digit = R("09")
+local double = P("##") / "#"
+local single = P("#")
+local sentinel = spaces * (nohash^1 / "\\%0")
+local sargument = (single * digit)^1
+local dargument = (double * digit)^1
+
+local usespaces = nil
+local texpreamble = nil
+
+local pattern = Cs( -- ^-1
+ ( P("spaces") / function() usespaces = true return "" end )^0
+ * spaces
+ * ( P("nospaces") / function() usespaces = false return "" end )^0
+ * spaces
+ * ( P("global") / "\\global" )^0
+ * spaces
+ * ( P("unexpanded") / "\\unexpanded" )^0
+ * spaces
+ * Cc("\\expandafter\\")
+ * spaces
+ * ( P("expanded") / "e" )^0
+ * spaces
+ * ( P((1-S(" #"))^1) / "def\\csname %0\\endcsname" )
+ * spaces
+ * (
+ -- (double * digit)^1 * sentinel^-1 * double^-1
+ -- + (single * digit)^1 * sentinel^-1 * single^-1
+ ( P("[") * dargument * P("]") + dargument)^1 * sentinel^-1 * double^-1
+ + ( P("[") * sargument * P("]") + sargument)^1 * sentinel^-1 * single^-1
+ + sentinel^-1 * (double+single)^-1
+ )
+)
+
+local ctx_dostarttexdefinition = context.dostarttexdefinition
+
+local function texdefinition_one(str)
+ usespaces = nil
+ texpreamble = lpegmatch(pattern,str)
+ if usespaces == true then
+ setcatcode(32,10) -- space
+ setcatcode(13, 5) -- endofline
+ elseif usespaces == false then
+ setcatcode(32, 9) -- ignore
+ setcatcode(13, 9) -- ignore
+ else
+ -- this is default
+ -- setcatcode(32,10) -- space
+ -- setcatcode(13, 9) -- ignore
+ end
+ ctx_dostarttexdefinition()
+end
+
+local function texdefinition_two()
+ context(texpreamble)
+end
+
+implement { name = "texdefinition_one", actions = texdefinition_one, scope = "private", arguments = "string" }
+implement { name = "texdefinition_two", actions = texdefinition_two, scope = "private" }
+
+implement { name = "upper", arguments = "string", actions = { utf.upper, context } }
+implement { name = "lower", arguments = "string", actions = { utf.lower, context } }
+implement { name = "strip", arguments = "string", actions = { string.strip, context } } -- or utf.strip
+
+implement {
+ name = "converteddimen",
+ arguments = { "dimen", "string" },
+ actions = function(dimen,unit)
+ context(number.todimen(dimen,unit or "pt","%0.5f")) -- no unit appended (%F)
+ end
+}
+
+-- where, not really the best spot for this:
+
+implement {
+ name = "immediatemessage",
+ arguments = { "'message'", "string" },
+ actions = logs.status
+}
+
+implement {
+ name = "resettimer",
+ actions = function()
+ statistics.resettiming("whatever")
+ statistics.starttiming("whatever")
+ end
+}
+
+implement {
+ name = "elapsedtime",
+ actions = function()
+ statistics.stoptiming("whatever")
+ context(statistics.elapsedtime("whatever"))
+ end
+}
+
+local accuracy = table.setmetatableindex(function(t,k)
+ local v = formatters["%0." ..k .. "f"]
+ t[k] = v
+ return v
+end)
+
+implement {
+ name = "rounded",
+ arguments = "integer",
+ actions = function(n,m) context(accuracy[n](m)) end
+}
+
+-- not faster but just less tracing:
+
+local firstoftwoarguments = context.firstoftwoarguments
+local secondoftwoarguments = context.secondoftwoarguments
+local firstofoneargument = context.firstofoneargument
+local gobbleoneargument = context.gobbleoneargument
+
+local hash = utilities.parsers.hashes.settings_to_set
+
+local function doifelsecommon(a,b)
+ if a == b then
+ setmacro("commalistelement",a)
+ if a == "" then
+ secondoftwoarguments()
+ else
+ firstoftwoarguments()
+ end
+ return
+ end
+ local ba = find(a,",")
+ local bb = find(b,",")
+ if ba and bb then
+ local ha = hash[a]
+ local hb = hash[b]
+ -- local ha = settings_to_set(a)
+ -- local hb = settings_to_set(b)
+ for k in next, ha do
+ if hb[k] then
+ setmacro("commalistelement",k)
+ firstoftwoarguments()
+ return
+ end
+ end
+ elseif ba then
+ if hash[a][b] then
+ -- if settings_to_set(a)[b] then
+ setmacro("commalistelement",b)
+ firstoftwoarguments()
+ return
+ end
+ elseif bb then
+ if hash[b][a] then
+ -- if settings_to_set(b)[a] then
+ setmacro("commalistelement",a)
+ firstoftwoarguments()
+ return
+ end
+ end
+ setmacro("commalistelement","")
+ secondoftwoarguments()
+end
+
+local function doifcommon(a,b)
+ if a == b then
+ setmacro("commalistelement",a)
+ if a == "" then
+ gobbleoneargument()
+ else
+ firstofoneargument()
+ end
+ return
+ end
+ local ba = find(a,",")
+ local bb = find(b,",")
+ if ba and bb then
+ local ha = hash[a]
+ local hb = hash[b]
+ -- local ha = settings_to_set(a)
+ -- local hb = settings_to_set(b)
+ for k in next, ha do
+ if hb[k] then
+ setmacro("commalistelement",k)
+ firstofoneargument()
+ return
+ end
+ end
+ elseif ba then
+ if hash[a][b] then
+ -- if settings_to_set(a)[b] then
+ setmacro("commalistelement",b)
+ firstofoneargument()
+ return
+ end
+ elseif bb then
+ if hash[b][a] then
+ -- if settings_to_set(b)[a] then
+ setmacro("commalistelement",a)
+ firstofoneargument()
+ return
+ end
+ end
+ setmacro("commalistelement","")
+ gobbleoneargument()
+end
+
+local function doifnotcommon(a,b)
+ if a == b then
+ setmacro("commalistelement",a)
+ if a == "" then
+ firstofoneargument()
+ else
+ gobbleoneargument()
+ end
+ return
+ end
+ local ba = find(a,",")
+ local bb = find(b,",")
+ if ba and bb then
+ local ha = hash[a]
+ local hb = hash[b]
+ -- local ha = settings_to_set(a)
+ -- local hb = settings_to_set(b)
+ for k in next, ha do
+ if hb[k] then
+ setmacro("commalistelement",k)
+ gobbleoneargument()
+ return
+ end
+ end
+ elseif ba then
+ if hash[a][b] then
+ -- if settings_to_set(a)[b] then
+ setmacro("commalistelement",b)
+ gobbleoneargument()
+ return
+ end
+ elseif bb then
+ if hash[b][a] then
+ -- if settings_to_set(b)[a] then
+ setmacro("commalistelement",a)
+ gobbleoneargument()
+ return
+ end
+ end
+ setmacro("commalistelement","")
+ firstofoneargument()
+end
+
+local function doifelseinset(a,b)
+ if a == b then
+ setmacro("commalistelement",a)
+ if a == "" then
+ secondoftwoarguments()
+ else
+ firstoftwoarguments()
+ end
+ return
+ end
+ local bb = find(b,",")
+ if bb then
+ if hash[b][a] then
+ -- if settings_to_set(b)[a] then
+ setmacro("commalistelement",a)
+ firstoftwoarguments()
+ return
+ end
+ end
+ setmacro("commalistelement","")
+ secondoftwoarguments()
+end
+
+local function doifinset(a,b)
+ if a == b then
+ setmacro("commalistelement",a)
+ if a == "" then
+ gobbleoneargument()
+ else
+ firstofoneargument()
+ end
+ return
+ end
+ local bb = find(b,",")
+ if bb then
+ if hash[b][a] then
+ -- if settings_to_set(b)[a] then
+ setmacro("commalistelement",a)
+ firstofoneargument()
+ return
+ end
+ end
+ setmacro("commalistelement","")
+ gobbleoneargument()
+end
+
+local function doifnotinset(a,b)
+ if a == b then
+ setmacro("commalistelement",a)
+ if a == "" then
+ firstofoneargument()
+ else
+ gobbleoneargument()
+ end
+ return
+ end
+ local bb = find(b,",")
+ if bb then
+ if hash[b][a] then
+ -- if settings_to_set(b)[a] then
+ setmacro("commalistelement",a)
+ gobbleoneargument()
+ return
+ end
+ end
+ setmacro("commalistelement","")
+ firstofoneargument()
+end
+
+implement {
+ name = "doifelsecommon",
+ actions = doifelsecommon,
+ arguments = { "string", "string" },
+}
+
+implement {
+ name = "doifcommon",
+ actions = doifcommon,
+ arguments = { "string", "string" },
+}
+
+implement {
+ name = "doifnotcommon",
+ actions = doifnotcommon,
+ arguments = { "string", "string" },
+}
+
+implement {
+ name = "doifelseinset",
+ actions = doifelseinset,
+ arguments = { "string", "string" },
+}
+
+implement {
+ name = "doifinset",
+ actions = doifinset,
+ arguments = { "string", "string" },
+}
+
+implement {
+ name = "doifnotinset",
+ actions = doifnotinset,
+ arguments = { "string", "string" },
+}
+
+-- implement {
+-- name = "stringcompare",
+-- arguments = { "string", "string" },
+-- actions = function(a,b)
+-- context((a == b and 0) or (a > b and 1) or -1)
+-- end
+-- }
+--
+-- implement {
+-- name = "doifelsestringafter",
+-- arguments = { "string", "string" },
+-- actions = function(a,b)
+-- ctx_doifelse((a == b and 0) or (a > b and 1) or -1)
+-- end
+-- }
+--
+-- implement {
+-- name = "doifelsestringbefore",
+-- arguments = { "string", "string" },
+-- actions = function(a,b)
+-- ctx_doifelse((a == b and 0) or (a < b and -1) or 1)
+-- end
+-- }
+
+-- implement { -- not faster than addtocommalist
+-- name = "additemtolist", -- unique
+-- arguments = { "string", "string" },
+-- actions = function(l,s)
+-- if l == "" or s == l then
+-- -- s = s
+-- elseif find("," .. l .. ",","," .. s .. ",") then
+-- s = l
+-- else
+-- s = l .. "," .. s
+-- end
+-- context(s)
+-- end
+-- }
diff --git a/Master/texmf-dist/tex/context/base/syst-aux.mkiv b/Master/texmf-dist/tex/context/base/mkiv/syst-aux.mkiv
index bd9b1630e70..825d1863641 100644
--- a/Master/texmf-dist/tex/context/base/syst-aux.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-aux.mkiv
@@ -48,15 +48,15 @@
%D \macros
%D {unexpanded}
%D
-%D Because we use this module only in \MKIV, we have removed the
-%D old protection code.
+%D Because we use this module only in \MKIV, we have removed the old protection
+%D code.
%D
%D \starttyping
%D \unexpanded\def\somecommand{... ... ...}
%D \stoptyping
%D
-%D This overloads the \ETEX\ primitive but as we already had an \MKII\
-%D solution we keep the same name for a similar mechanism.
+%D This overloads the \ETEX\ primitive but as we already had an \MKII\ solution we
+%D keep the same name for a similar mechanism.
\let\unexpanded\normalprotected
@@ -100,8 +100,7 @@
%D \macros
%D {normalspace}
%D
-%D There is already \type{\space} but just to be sure we also
-%D provide:
+%D There is already \type{\space} but just to be sure we also provide:
\def\normalspace{ }
@@ -109,9 +108,8 @@
%D {!!count, !!toks, !!dimen, !!box,
%D !!width, !!height, !!depth, !!string, !!done}
%D
-%D We define some more \COUNTERS\ and \DIMENSIONS. We also
-%D define some shortcuts to the local scatchregisters~0, 2, 4,
-%D 6 and~8.
+%D We define some more \COUNTERS\ and \DIMENSIONS. We also define some shortcuts to
+%D the local scatchregisters~0, 2, 4, 6 and~8.
\newcount\!!counta \newtoks\!!toksa \newdimen\!!dimena \newbox\!!boxa
\newcount\!!countb \newtoks\!!toksb \newdimen\!!dimenb \newbox\!!boxb
@@ -158,9 +156,8 @@
%D \macros
%D {s!,c!,e!,p!,v!,@@,??}
%D
-%D To save memory, we use constants (sometimes called
-%D variables). Redefining these constants can have disastrous
-%D results.
+%D To save memory, we use constants (sometimes called variables). Redefining these
+%D constants can have disastrous results.
\def\v!prefix! {v!}
\def\c!prefix! {c!}
@@ -181,8 +178,9 @@
\def\s!empty {empty}
-%D These are not needed any more now that we have wide screens (and
-%D bytes come cheap).
+%D These are not needed any more now that we have wide screens (and bytes come
+%D cheap).
+
\let\@EA \singleexpandafter
\let\@EAEAEA \doubleexpandafter
@@ -265,19 +263,16 @@
%D \macros
%D {doifnextcharelse}
%D
-%D When we started using \TEX\ in the late eighties, our
-%D first experiences with programming concerned a simple shell
-%D around \LATEX. The commands probably use most at \PRAGMA,
-%D are the itemizing ones. One of those few shell commands took
-%D care of an optional argument, that enabled us to specify
-%D what kind of item symbol we wanted. Without understanding
-%D anything we were able to locate a \LATEX\ macro that could
-%D be used to inspect the next character.
+%D When we started using \TEX\ in the late eighties, our first experiences with
+%D programming concerned a simple shell around \LATEX. The commands probably use
+%D most at \PRAGMA, are the itemizing ones. One of those few shell commands took
+%D care of an optional argument, that enabled us to specify what kind of item symbol
+%D we wanted. Without understanding anything we were able to locate a \LATEX\ macro
+%D that could be used to inspect the next character.
%D
-%D It's this macro that the ancester of the next one presented
-%D here. It executes one of two actions, dependant of the next
-%D character. Disturbing spaces and line endings, which are
-%D normally interpreted as spaces too, are skipped.
+%D It's this macro that the ancester of the next one presented here. It executes one
+%D of two actions, dependant of the next character. Disturbing spaces and line
+%D endings, which are normally interpreted as spaces too, are skipped.
%D
%D \starttyping
%D \doifnextcharelse {karakter} {then ...} {else ...}
@@ -309,16 +304,14 @@
\expandafter\m_syst_action_nop
\fi}
-%D Because we will mostly use this macro for testing if the next
-%D character is \type {[}, we also make a slightly faster variant
-%D as it is not uncommon to have tens of thousands of calls to this
-%D test in a run. Of course it also is more convenient to read a
-%D trace then.
+%D Because we will mostly use this macro for testing if the next character is \type
+%D {[}, we also make a slightly faster variant as it is not uncommon to have tens of
+%D thousands of calls to this test in a run. Of course it also is more convenient to
+%D read a trace then.
-% We could make variants without the \if_next_blank_space_token but
-% the overhead is only .1 sec on 3.5 for 10^6 tests and often that
-% branch is not entered anyway. The fast variants with less checking
-% do make a difference however:
+% We could make variants without the \if_next_blank_space_token but the overhead is
+% only .1 sec on 3.5 for 10^6 tests and often that branch is not entered anyway. The
+% fast variants with less checking do make a difference however:
% \testfeature{1000000}{\doifnextoptionalelse \gobbleoneargument\gobbleoneargument[} % 2.902s
% \testfeature{1000000}{\doifnextoptionalcselse \gobbleoneargument\gobbleoneargument[} % 2.590s
@@ -594,7 +587,7 @@
%D \ifundefined\NameB ... \else ... \fi
%D \stoptyping
-\suppressifcsnameerror\plusone
+% \suppressifcsnameerror\plusone % already set
\def\doifelseundefined#1%
{\ifcsname#1\endcsname
@@ -628,7 +621,7 @@
%D existance is not the same as the one described here. Therefore we introduce:
\def\letbeundefined#1% potential stack buildup when used \global
- {\expandafter\let\csname#1\endcsname\undefined}
+ {\expandafter\let\csname#1\endcsname\undefined} % or use \undefinevalue to match \setvalue
\def\localundefine#1% conditional
{\ifcsname#1\endcsname\expandafter\let\csname#1\endcsname\undefined\fi}
@@ -782,132 +775,138 @@
% !5yes=\doifnotinset{}{}{yes}
% !6yes=\doifnotinset{aaa}{}{yes}
-\def\v_syst_helpers_right_optional_bracket{]}
-
-\def\syst_helpers_do_quit_if_item_in_set_else#1],\relax{\firstoftwoarguments}
-\def\syst_helpers_do_quit_if_item_in_set #1],\relax{\firstofoneargument}
-\def\syst_helpers_do_quit_if_item_not_in_set #1],\relax{\gobbleoneargument}
-
-\def\syst_helpers_re_do_if_in_set_else{\expandafter\syst_helpers_do_check_if_item_in_set_else\m_syst_string_two,],\relax}
-\def\syst_helpers_re_do_if_in_set {\expandafter\syst_helpers_do_check_if_item_in_set \m_syst_string_two,],\relax}
-\def\syst_helpers_re_do_if_not_in_set {\expandafter\syst_helpers_do_check_if_item_not_in_set \m_syst_string_two,],\relax}
+% \def\v_syst_helpers_right_optional_bracket{]}
+%
+% \def\syst_helpers_do_quit_if_item_in_set_else#1],\relax{\firstoftwoarguments}
+% \def\syst_helpers_do_quit_if_item_in_set #1],\relax{\firstofoneargument}
+% \def\syst_helpers_do_quit_if_item_not_in_set #1],\relax{\gobbleoneargument}
+%
+% \def\syst_helpers_re_do_if_in_set_else{\expandafter\syst_helpers_do_check_if_item_in_set_else\m_syst_string_two,],\relax}
+% \def\syst_helpers_re_do_if_in_set {\expandafter\syst_helpers_do_check_if_item_in_set \m_syst_string_two,],\relax}
+% \def\syst_helpers_re_do_if_not_in_set {\expandafter\syst_helpers_do_check_if_item_not_in_set \m_syst_string_two,],\relax}
+%
+% \unexpanded\def\doifelseinset#1% make this two step too
+% {\edef\m_syst_string_one{#1}%
+% \ifx\m_syst_string_one\empty
+% \expandafter\thirdofthreearguments
+% \else
+% \expandafter\syst_helpers_do_if_in_set_else
+% \fi}
+%
+% \let\doifinsetelse\doifelseinset
+%
+% \def\syst_helpers_do_if_in_set_else#1%
+% {\edef\m_syst_string_two{#1}%
+% \ifx\m_syst_string_two\empty
+% \expandafter\secondoftwoarguments
+% \else
+% \expandafter\syst_helpers_re_do_if_in_set_else
+% \fi}
+%
+% \unexpanded\def\doifinset#1%
+% {\edef\m_syst_string_one{#1}%
+% \ifx\m_syst_string_one\empty
+% \expandafter\gobbletwoarguments
+% \else
+% \expandafter\syst_helpers_do_if_in_set
+% \fi}
+%
+% \def\syst_helpers_do_if_in_set#1%
+% {\edef\m_syst_string_two{#1}%
+% \ifx\m_syst_string_two\empty
+% \expandafter\gobbleoneargument
+% \else
+% \expandafter\syst_helpers_re_do_if_in_set
+% \fi}
+%
+% \unexpanded\def\doifnotinset#1%
+% {\edef\m_syst_string_one{#1}%
+% \ifx\m_syst_string_one\empty
+% \expandafter\secondoftwoarguments
+% \else
+% \expandafter\syst_helpers_do_if_not_in_set
+% \fi}
+%
+% \def\syst_helpers_do_if_not_in_set#1%
+% {\edef\m_syst_string_two{#1}%
+% \ifx\m_syst_string_two\empty
+% \expandafter\firstofoneargument
+% \else
+% \expandafter\syst_helpers_re_do_if_not_in_set % ...]{true}
+% \fi}
+%
+% \def\syst_helpers_do_check_if_item_in_set_else#1,#2% #2 eats up preceding space
+% {\edef\m_syst_string_two{#1}%
+% \ifx\m_syst_string_two\empty
+% \expandafter\syst_helpers_do_check_if_item_in_set_else
+% \else
+% \expandafter\syst_helpers_do_do_check_if_item_in_set_else
+% \fi#2}
+%
+% \def\syst_helpers_do_do_check_if_item_in_set_else
+% {\ifx\m_syst_string_two\v_syst_helpers_right_optional_bracket
+% \expandafter\thirdofthreearguments
+% \else
+% \expandafter\syst_helpers_do_do_do_check_if_item_in_set_else
+% \fi}
+%
+% \def\syst_helpers_do_do_do_check_if_item_in_set_else
+% {\ifx\m_syst_string_one\m_syst_string_two
+% \expandafter\syst_helpers_do_quit_if_item_in_set_else
+% \else
+% \expandafter\syst_helpers_do_check_if_item_in_set_else
+% \fi}
+%
+% \def\syst_helpers_do_check_if_item_in_set#1,#2% #2 eats up preceding space
+% {\edef\m_syst_string_two{#1}%
+% \ifx\m_syst_string_two\empty
+% \expandafter\syst_helpers_do_check_if_item_in_set
+% \else
+% \expandafter\syst_helpers_do_do_check_if_item_in_set
+% \fi#2}
+%
+% \def\syst_helpers_do_do_check_if_item_in_set
+% {\ifx\m_syst_string_two\v_syst_helpers_right_optional_bracket
+% \expandafter\gobbletwoarguments
+% \else
+% \expandafter\syst_helpers_do_do_do_check_if_item_in_set
+% \fi}
+%
+% \def\syst_helpers_do_do_do_check_if_item_in_set
+% {\ifx\m_syst_string_one\m_syst_string_two
+% \expandafter\syst_helpers_do_quit_if_item_in_set
+% \else
+% \expandafter\syst_helpers_do_check_if_item_in_set
+% \fi}
+%
+% \def\syst_helpers_do_check_if_item_not_in_set#1,#2% #2 eats up preceding space
+% {\edef\m_syst_string_two{#1}%
+% \ifx\m_syst_string_two\empty
+% \expandafter\syst_helpers_do_check_if_item_not_in_set
+% \else
+% \expandafter\syst_helpers_do_do_check_if_item_not_in_set
+% \fi#2}
+%
+% \def\syst_helpers_do_do_check_if_item_not_in_set
+% {\ifx\m_syst_string_two\v_syst_helpers_right_optional_bracket
+% \expandafter\secondoftwoarguments
+% \else
+% \expandafter\syst_helpers_do_do_do_check_if_item_not_in_set
+% \fi}
+%
+% \def\syst_helpers_do_do_do_check_if_item_not_in_set
+% {\ifx\m_syst_string_one\m_syst_string_two
+% \expandafter\syst_helpers_do_quit_if_item_not_in_set
+% \else
+% \expandafter\syst_helpers_do_check_if_item_not_in_set
+% \fi}
-\unexpanded\def\doifelseinset#1% make this two step too
- {\edef\m_syst_string_one{#1}%
- \ifx\m_syst_string_one\empty
- \expandafter\thirdofthreearguments
- \else
- \expandafter\syst_helpers_do_if_in_set_else
- \fi}
+\unexpanded\def\doifelseinset#1#2{\clf_doifelseinset{#1}{#2}}
+\unexpanded\def\doifinset #1#2{\clf_doifinset {#1}{#2}}
+\unexpanded\def\doifnotinset #1#2{\clf_doifnotinset {#1}{#2}}
\let\doifinsetelse\doifelseinset
-\def\syst_helpers_do_if_in_set_else#1%
- {\edef\m_syst_string_two{#1}%
- \ifx\m_syst_string_two\empty
- \expandafter\secondoftwoarguments
- \else
- \expandafter\syst_helpers_re_do_if_in_set_else
- \fi}
-
-\unexpanded\def\doifinset#1%
- {\edef\m_syst_string_one{#1}%
- \ifx\m_syst_string_one\empty
- \expandafter\gobbletwoarguments
- \else
- \expandafter\syst_helpers_do_if_in_set
- \fi}
-
-\def\syst_helpers_do_if_in_set#1%
- {\edef\m_syst_string_two{#1}%
- \ifx\m_syst_string_two\empty
- \expandafter\gobbleoneargument
- \else
- \expandafter\syst_helpers_re_do_if_in_set
- \fi}
-
-\unexpanded\def\doifnotinset#1%
- {\edef\m_syst_string_one{#1}%
- \ifx\m_syst_string_one\empty
- \expandafter\secondoftwoarguments
- \else
- \expandafter\syst_helpers_do_if_not_in_set
- \fi}
-
-\def\syst_helpers_do_if_not_in_set#1%
- {\edef\m_syst_string_two{#1}%
- \ifx\m_syst_string_two\empty
- \expandafter\firstofoneargument
- \else
- \expandafter\syst_helpers_re_do_if_not_in_set % ...]{true}
- \fi}
-
-\def\syst_helpers_do_check_if_item_in_set_else#1,#2% #2 eats up preceding space
- {\edef\m_syst_string_two{#1}%
- \ifx\m_syst_string_two\empty
- \expandafter\syst_helpers_do_check_if_item_in_set_else
- \else
- \expandafter\syst_helpers_do_do_check_if_item_in_set_else
- \fi#2}
-
-\def\syst_helpers_do_do_check_if_item_in_set_else
- {\ifx\m_syst_string_two\v_syst_helpers_right_optional_bracket
- \expandafter\thirdofthreearguments
- \else
- \expandafter\syst_helpers_do_do_do_check_if_item_in_set_else
- \fi}
-
-\def\syst_helpers_do_do_do_check_if_item_in_set_else
- {\ifx\m_syst_string_one\m_syst_string_two
- \expandafter\syst_helpers_do_quit_if_item_in_set_else
- \else
- \expandafter\syst_helpers_do_check_if_item_in_set_else
- \fi}
-
-\def\syst_helpers_do_check_if_item_in_set#1,#2% #2 eats up preceding space
- {\edef\m_syst_string_two{#1}%
- \ifx\m_syst_string_two\empty
- \expandafter\syst_helpers_do_check_if_item_in_set
- \else
- \expandafter\syst_helpers_do_do_check_if_item_in_set
- \fi#2}
-
-\def\syst_helpers_do_do_check_if_item_in_set
- {\ifx\m_syst_string_two\v_syst_helpers_right_optional_bracket
- \expandafter\gobbletwoarguments
- \else
- \expandafter\syst_helpers_do_do_do_check_if_item_in_set
- \fi}
-
-\def\syst_helpers_do_do_do_check_if_item_in_set
- {\ifx\m_syst_string_one\m_syst_string_two
- \expandafter\syst_helpers_do_quit_if_item_in_set
- \else
- \expandafter\syst_helpers_do_check_if_item_in_set
- \fi}
-
-\def\syst_helpers_do_check_if_item_not_in_set#1,#2% #2 eats up preceding space
- {\edef\m_syst_string_two{#1}%
- \ifx\m_syst_string_two\empty
- \expandafter\syst_helpers_do_check_if_item_not_in_set
- \else
- \expandafter\syst_helpers_do_do_check_if_item_not_in_set
- \fi#2}
-
-\def\syst_helpers_do_do_check_if_item_not_in_set
- {\ifx\m_syst_string_two\v_syst_helpers_right_optional_bracket
- \expandafter\secondoftwoarguments
- \else
- \expandafter\syst_helpers_do_do_do_check_if_item_not_in_set
- \fi}
-
-\def\syst_helpers_do_do_do_check_if_item_not_in_set
- {\ifx\m_syst_string_one\m_syst_string_two
- \expandafter\syst_helpers_do_quit_if_item_not_in_set
- \else
- \expandafter\syst_helpers_do_check_if_item_not_in_set
- \fi}
-
%D \macros
%D {doifcommon,doifnotcommon,doifcommonelse}
%D
@@ -936,65 +935,71 @@
% !9yes=\doifcommonelse{,a,}{,,,a,}{yes}{nop}
% !9yes=\doifcommonelse{,,a,}{,,,a,}{yes}{nop}
-\let\m_syst_common_a\empty
-\let\m_syst_common_b\empty
-\let\m_syst_common_c\empty
-
-\def\syst_helpers_do_quit_if_common_else#1],\relax#2],\relax{\firstoftwoarguments}
-
-\def\syst_helpers_do_check_if_common_else_one#1,#2%
- {\edef\m_syst_common_c{#1}%
- \ifx\m_syst_common_c\v_syst_helpers_right_optional_bracket
- \expandafter\thirdofthreearguments
- \else
- \expandafter\syst_helpers_do_common_check
- \fi#2}
-
-\def\syst_helpers_do_check_if_common_else_two#1,#2% we can do an empty #1 check too
- {\edef\commalistelement{#1}%
- \ifx\commalistelement\v_syst_helpers_right_optional_bracket
- \expandafter\syst_helpers_re_do_check_if_common_else_one
- \else
- \expandafter\syst_helpers_do_do_check_if_common_else_two
- \fi#2}
-
-\def\syst_helpers_do_do_check_if_common_else_two
- {\ifx\commalistelement\empty
- \expandafter\syst_helpers_do_check_if_common_else_two
- \else
- \expandafter\syst_helpers_do_do_do_check_if_common_else_two
- \fi}
-
-\def\syst_helpers_do_do_do_check_if_common_else_two
- {\ifx\m_syst_common_c\commalistelement
- \expandafter\syst_helpers_do_quit_if_common_else
- \else
- \expandafter\syst_helpers_do_check_if_common_else_two
- \fi}
-
-\def\syst_helpers_re_do_check_if_common_else_one#1{\syst_helpers_do_check_if_common_else_one}
-
-\def\syst_helpers_do_common_check
- {\expandafter\syst_helpers_do_check_if_common_else_two\m_syst_common_b,],\relax}%
-
-\def\syst_helpers_do_do_do_if_common_else
- {\expandafter\syst_helpers_do_check_if_common_else_one\m_syst_common_a,],\relax}
+% \let\m_syst_common_a\empty
+% \let\m_syst_common_b\empty
+% \let\m_syst_common_c\empty
+%
+% \def\syst_helpers_do_quit_if_common_else#1],\relax#2],\relax{\firstoftwoarguments}
+%
+% \def\syst_helpers_do_check_if_common_else_one#1,#2% hm, why #2 here and passed at end
+% {\edef\m_syst_common_c{#1}%
+% \ifx\m_syst_common_c\v_syst_helpers_right_optional_bracket
+% \expandafter\thirdofthreearguments
+% \else
+% \expandafter\syst_helpers_do_common_check
+% \fi#2}
+%
+% \def\syst_helpers_do_check_if_common_else_two#1,#2% we can do an empty #1 check too
+% {\edef\commalistelement{#1}%
+% \ifx\commalistelement\v_syst_helpers_right_optional_bracket
+% \expandafter\syst_helpers_re_do_check_if_common_else_one
+% \else
+% \expandafter\syst_helpers_do_do_check_if_common_else_two
+% \fi#2}
+%
+% \def\syst_helpers_do_do_check_if_common_else_two
+% {\ifx\commalistelement\empty
+% \expandafter\syst_helpers_do_check_if_common_else_two
+% \else
+% \expandafter\syst_helpers_do_do_do_check_if_common_else_two
+% \fi}
+%
+% \def\syst_helpers_do_do_do_check_if_common_else_two
+% {\ifx\m_syst_common_c\commalistelement
+% \expandafter\syst_helpers_do_quit_if_common_else
+% \else
+% \expandafter\syst_helpers_do_check_if_common_else_two
+% \fi}
+%
+% \def\syst_helpers_re_do_check_if_common_else_one#1{\syst_helpers_do_check_if_common_else_one}
+%
+% \def\syst_helpers_do_common_check
+% {\expandafter\syst_helpers_do_check_if_common_else_two\m_syst_common_b,],\relax}%
+%
+% \def\syst_helpers_do_do_do_if_common_else
+% {\expandafter\syst_helpers_do_check_if_common_else_one\m_syst_common_a,],\relax}
+%
+% \def\syst_helpers_do_do_if_common_else#1#2#3#4%
+% {\edef\m_syst_common_a{#3}%
+% \edef\m_syst_common_b{#4}%
+% \ifx\m_syst_common_a\empty
+% \expandafter\secondoftwoarguments
+% \else\ifx\m_syst_common_b\empty
+% \expandafter\expandafter\expandafter\secondoftwoarguments
+% \else
+% \expandafter\expandafter\expandafter\syst_helpers_do_do_do_if_common_else
+% \fi\fi
+% #1#2}
-\def\syst_helpers_do_do_if_common_else#1#2#3#4%
- {\edef\m_syst_common_a{#3}%
- \edef\m_syst_common_b{#4}%
- \ifx\m_syst_common_a\empty
- \expandafter\secondoftwoarguments
- \else\ifx\m_syst_common_b\empty
- \expandafter\expandafter\expandafter\secondoftwoarguments
- \else
- \expandafter\expandafter\expandafter\syst_helpers_do_do_do_if_common_else
- \fi\fi
- #1#2}
+% \unexpanded\def\doifelsecommon{\syst_helpers_do_do_if_common_else\firstoftwoarguments\secondoftwoarguments}
+% \unexpanded\def\doifcommon {\syst_helpers_do_do_if_common_else\firstofoneargument \gobbleoneargument }
+% \unexpanded\def\doifnotcommon {\syst_helpers_do_do_if_common_else\gobbleoneargument \firstofoneargument }
+%
+% \let\doifcommonelse\doifelsecommon
-\unexpanded\def\doifelsecommon{\syst_helpers_do_do_if_common_else\firstoftwoarguments\secondoftwoarguments}
-\unexpanded\def\doifcommon {\syst_helpers_do_do_if_common_else\firstofoneargument \gobbleoneargument }
-\unexpanded\def\doifnotcommon {\syst_helpers_do_do_if_common_else\gobbleoneargument \firstofoneargument }
+\unexpanded\def\doifelsecommon#1#2{\clf_doifelsecommon{#1}{#2}}
+\unexpanded\def\doifcommon #1#2{\clf_doifcommon {#1}{#2}}
+\unexpanded\def\doifnotcommon #1#2{\clf_doifnotcommon {#1}{#2}}
\let\doifcommonelse\doifelsecommon
@@ -2723,8 +2728,10 @@
%D
%D This expands to \type{\ifsomething}.
-\def\strippedcsname
- {\expandafter\gobbleoneargument\string}
+% \def\strippedcsname
+% {\expandafter\gobbleoneargument\string}
+
+\let\strippedcsname\csstring
%D \macros
%D {complexorsimple,complexorsimpleempty}
@@ -2770,14 +2777,14 @@
\unexpanded\def\complexorsimple#1%
{% \relax % prevents lookahead, brrr
\doifelsenextoptional
- {\firstargumenttrue \csname\s!complex\strippedcsname#1\endcsname}
- {\firstargumentfalse\csname\s!simple \strippedcsname#1\endcsname}}
+ {\firstargumenttrue \csname\s!complex\csstring#1\endcsname}
+ {\firstargumentfalse\csname\s!simple \csstring#1\endcsname}}
\unexpanded\def\complexorsimpleempty#1%
{% \relax % prevents lookahead, brrr
\doifelsenextoptional
- {\firstargumenttrue \csname\s!complex\strippedcsname#1\endcsname}
- {\firstargumentfalse\csname\s!complex\strippedcsname#1\endcsname[]}}
+ {\firstargumenttrue \csname\s!complex\csstring#1\endcsname}
+ {\firstargumentfalse\csname\s!complex\csstring#1\endcsname[]}}
%D \macros
%D {definecomplexorsimple,definecomplexorsimpleempty}
@@ -2794,12 +2801,12 @@
\unexpanded\def\definecomplexorsimple#1%
{\unexpanded\edef#1{\syst_helpers_complex_or_simple
- \expandafter\noexpand\csname\s!complex\strippedcsname#1\endcsname
- \expandafter\noexpand\csname\s!simple \strippedcsname#1\endcsname}}
+ \expandafter\noexpand\csname\s!complex\csstring#1\endcsname
+ \expandafter\noexpand\csname\s!simple \csstring#1\endcsname}}
\unexpanded\def\definecomplexorsimpleempty#1%
{\unexpanded\edef#1{\syst_helpers_complex_or_simple_empty
- \expandafter\noexpand\csname\s!complex\strippedcsname#1\endcsname}}
+ \expandafter\noexpand\csname\s!complex\csstring#1\endcsname}}
%D These commands are called as:
%D
@@ -3051,8 +3058,8 @@
%D of the identification string with the macro \type
%D {\statuswidth}.
-\setnewconstant\statuswidth 15
-\setnewconstant\statuswrite 16
+\setnewconstant\statuswidth 15
+\setnewconstant\statuswrite 128 % \pluscxxviii
\ifdefined\writestring \else
@@ -3337,7 +3344,9 @@
\egroup
-\unexpanded\def\texdefinition#1{\csname\ifcsname#1\endcsname#1\else donothing\fi\endcsname} % todo: a nop cs: char 0 or some corenamespace
+% \unexpanded\def\texdefinition#1{\csname\ifcsname#1\endcsname#1\else donothing\fi\endcsname} % todo: a nop cs: char 0 or some corenamespace
+
+\unexpanded\def\texdefinition#1{\begincsname#1\endcsname}
% This is a first variant, more might be added:
@@ -3461,12 +3470,14 @@
%D \csname if\strippedcsname\something\endcsname
%D \stoptyping
-\def\checkedstrippedcsname#1% this permits \strippedcsname{\xxx} and \strippedcsname{xxx}
- {\expandafter\syst_helpers_checked_stripped_csname\string#1}
+% \def\checkedstrippedcsname#1% this permits \strippedcsname{\xxx} and \strippedcsname{xxx}
+% {\expandafter\syst_helpers_checked_stripped_csname\string#1}
+%
+% \def\syst_helpers_checked_stripped_csname#1%
+% %{\ifx#1\letterbackslash\else#1\fi}
+% {\if\noexpand#1\letterbackslash\else#1\fi}
-\def\syst_helpers_checked_stripped_csname#1%
- %{\ifx#1\letterbackslash\else#1\fi}
- {\if\noexpand#1\letterbackslash\else#1\fi}
+\let\checkedstrippedcsname\csstring
%D \macros
%D {savenormalmeaning}
@@ -3474,8 +3485,8 @@
%D We will use this one in:
\unexpanded\def\savenormalmeaning#1%
- {\ifcsname normal\strippedcsname#1\endcsname \else
- \expandafter\let\csname normal\strippedcsname#1\endcsname#1%
+ {\ifcsname normal\csstring#1\endcsname \else
+ \expandafter\let\csname normal\csstring#1\endcsname#1%
\fi}
%D \macros
@@ -3939,18 +3950,15 @@
%D \macros
%D {newevery,everyline,EveryLine,EveryPar}
%D
-%D Lets skip to something quite different. It's common use
-%D to use \type {\everypar} for special purposes. In \CONTEXT\
-%D we use this primitive for locating sidefloats. This means
-%D that when user assignments to \type {\everypar} can interfere
-%D with those of the package. We therefore introduce
-%D \type {\EveryPar}.
+%D Lets skip to something quite different. It's common use to use \type {\everypar}
+%D for special purposes. In \CONTEXT\ we use this primitive for locating sidefloats.
+%D This means that when user assignments to \type {\everypar} can interfere with
+%D those of the package. We therefore introduce \type {\EveryPar}.
%D
-%D The same goes for \type {\EveryLine}. Because \TEX\ offers
-%D no \type {\everyline} primitive, we have to call for
-%D \type {\everyline} when we are working on a line by line
-%D basis. Just by calling \type {\EveryPar{}} and
-%D \type {\EveryLine{}} we restore the old situation.
+%D The same goes for \type {\EveryLine}. Because \TEX\ offers no \type {\everyline}
+%D primitive, we have to call for \type {\everyline} when we are working on a line
+%D by line basis. Just by calling \type {\EveryPar{}} and \type {\EveryLine{}} we
+%D restore the old situation.
% \dorecurse{2}{
% \expanded{\everypar{before \recurselevel\space}}
@@ -3963,21 +3971,33 @@
\installsystemnamespace{extraevery}
+% \unexpanded\def\newevery#1#2%
+% {\ifx#1\everypar\else\newtoks#1\fi% we test for redefinition elsewhere
+% \ifx#2\relax\else\ifdefined#2\else
+% \expandafter\newtoks\csname\??extraevery\csstring#1\endcsname
+% \def#2{\syst_helpers_every#1}%
+% \fi\fi}
+%
+% \unexpanded\def\syst_helpers_every#1%
+% {\expandafter\removetoks\expandafter\the\csname\??extraevery\csstring#1\endcsname\from#1%
+% \expandafter\appendtoks\expandafter\the\csname\??extraevery\csstring#1\endcsname\to #1%
+% \csname\??extraevery\csstring#1\endcsname}
+
\unexpanded\def\newevery#1#2%
{\ifx#1\everypar\else\newtoks#1\fi% we test for redefinition elsewhere
\ifx#2\relax\else\ifdefined#2\else
- \expandafter\newtoks\csname\??extraevery\strippedcsname#1\endcsname
- \def#2{\syst_helpers_every#1}%
+ \expandafter\newtoks\csname\??extraevery\csstring#1\endcsname
+ \edef#2{\syst_helpers_every#1\csname\??extraevery\csstring#1\endcsname}%
\fi\fi}
-\unexpanded\def\syst_helpers_every#1%
- {\expandafter\removetoks\expandafter\the\csname\??extraevery\strippedcsname#1\endcsname\from#1%
- \expandafter\appendtoks\expandafter\the\csname\??extraevery\strippedcsname#1\endcsname\to #1%
- \csname\??extraevery\strippedcsname#1\endcsname}
+\unexpanded\def\syst_helpers_every#1#2%
+ {\removetoks\the#2\from#1%
+ \appendtoks\the#2\to #1%
+ #2}
%D This one permits definitions like:
-\newevery \everypar \EveryPar % we get a warning which is ok
+\newevery \everypar \EveryPar % we get a warning which is ok
\newevery \everyline \EveryLine
%D and how about:
@@ -4882,36 +4902,80 @@
\newtoks\t_syst_helpers_scratch
\let \m_syst_helpers_scratch\empty
-% no longer \def but \let to target toks
+% no longer \def but \let to target toks .. the space gobbling \relax will go
+
+% \unexpanded\def\appendtoks {\syst_helpers_append_toks \relax}
+% \unexpanded\def\prependtoks {\syst_helpers_prepend_toks \relax}
+% \unexpanded\def\appendtoksonce {\syst_helpers_append_toks_once \relax}
+% \unexpanded\def\prependtoksonce{\syst_helpers_prepend_toks_once\relax}
+%
+% \def\syst_helpers_append_toks_indeed
+% {\dodoglobal\m_syst_helpers_scratch\doubleexpandafter{\expandafter\the\expandafter\m_syst_helpers_scratch\the\t_syst_helpers_scratch}}
+%
+% \def\syst_helpers_prepend_toks_indeed
+% {\dodoglobal\m_syst_helpers_scratch\doubleexpandafter{\expandafter\the\expandafter\t_syst_helpers_scratch\the\m_syst_helpers_scratch}}
+%
+% \def\syst_helpers_append_toks#1\to#2%
+% {\let\m_syst_helpers_scratch#2%
+% \t_syst_helpers_scratch\expandafter{\gobbleoneargument#1}%
+% \syst_helpers_append_toks_indeed}
+%
+% \def\syst_helpers_prepend_toks#1\to#2%
+% {\let\m_syst_helpers_scratch#2%
+% \t_syst_helpers_scratch\expandafter{\gobbleoneargument#1}%
+% \syst_helpers_prepend_toks_indeed}
+%
+% \def\syst_helpers_append_toks_once#1\to#2%
+% {\let\m_syst_helpers_scratch#2%
+% \t_syst_helpers_scratch\expandafter{\gobbleoneargument#1}%
+% \doifelseintoks\t_syst_helpers_scratch\m_syst_helpers_scratch
+% \donothing
+% \syst_helpers_append_toks_indeed}
+%
+% \def\syst_helpers_prepend_toks_once#1\to#2%
+% {\let\m_syst_helpers_scratch#2%
+% \t_syst_helpers_scratch\expandafter{\gobbleoneargument#1}%
+% \doifelseintoks\t_syst_helpers_scratch\m_syst_helpers_scratch
+% \donothing
+% \syst_helpers_prepend_toks_indeed}
+
+\unexpanded\def\appendtoks#1\to#2%
+ {\toksapp#2{#1}%
+ \ifx\dodoglobal\relax\else
+ \global#2#2%
+ \fi}
-\unexpanded\def\appendtoks {\syst_helpers_append_toks \relax}
-\unexpanded\def\prependtoks {\syst_helpers_prepend_toks \relax}
-\unexpanded\def\appendtoksonce {\syst_helpers_append_toks_once \relax}
-\unexpanded\def\prependtoksonce{\syst_helpers_prepend_toks_once\relax}
+\unexpanded\def\prependtoks#1\to#2%
+ {\tokspre#2{#1}%
+ \ifx\dodoglobal\relax\else
+ \global#2#2%
+ \fi}
\def\syst_helpers_append_toks_indeed
- {\dodoglobal\m_syst_helpers_scratch\doubleexpandafter{\expandafter\the\expandafter\m_syst_helpers_scratch\the\t_syst_helpers_scratch}}
+ {\toksapp\m_syst_helpers_scratch\t_syst_helpers_scratch
+ \ifx\dodoglobal\relax\else
+ \global\m_syst_helpers_scratch\m_syst_helpers_scratch
+ \fi}
\def\syst_helpers_prepend_toks_indeed
- {\dodoglobal\m_syst_helpers_scratch\doubleexpandafter{\expandafter\the\expandafter\t_syst_helpers_scratch\the\m_syst_helpers_scratch}}
-
-\def\syst_helpers_append_toks#1\to#2%
- {\let\m_syst_helpers_scratch#2%
- \t_syst_helpers_scratch\expandafter{\gobbleoneargument#1}\syst_helpers_append_toks_indeed}
-
-\def\syst_helpers_prepend_toks#1\to#2%
- {\let\m_syst_helpers_scratch#2%
- \t_syst_helpers_scratch\expandafter{\gobbleoneargument#1}\syst_helpers_prepend_toks_indeed}
+ {\tokspre\m_syst_helpers_scratch\t_syst_helpers_scratch
+ \ifx\dodoglobal\relax\else
+ \global\m_syst_helpers_scratch\m_syst_helpers_scratch
+ \fi}
-\def\syst_helpers_append_toks_once#1\to#2%
+\unexpanded\def\appendtoksonce#1\to#2%
{\let\m_syst_helpers_scratch#2%
- \t_syst_helpers_scratch\expandafter{\gobbleoneargument#1}%
- \doifelseintoks\t_syst_helpers_scratch\m_syst_helpers_scratch\donothing\syst_helpers_append_toks_indeed}
+ \t_syst_helpers_scratch{#1}%
+ \doifelseintoks\t_syst_helpers_scratch\m_syst_helpers_scratch
+ \donothing
+ \syst_helpers_append_toks_indeed}
-\def\syst_helpers_prepend_toks_once#1\to#2%
+\unexpanded\def\prependtoksonce#1\to#2%
{\let\m_syst_helpers_scratch#2%
- \t_syst_helpers_scratch\expandafter{\gobbleoneargument#1}%
- \doifelseintoks\t_syst_helpers_scratch\m_syst_helpers_scratch\donothing\syst_helpers_prepend_toks_indeed}
+ \t_syst_helpers_scratch{#1}%
+ \doifelseintoks\t_syst_helpers_scratch\m_syst_helpers_scratch
+ \donothing
+ \syst_helpers_prepend_toks_indeed}
%D The test macro:
@@ -4922,6 +4986,36 @@
\let\doifintokselse\doifelseintoks
+%D Moved from \type{lxml-ini.tex} to here. This one is for generators that
+%D collect stuff piecewise, which is sometimes hard on mechanisms that
+%D grab content using delimiters:
+%D
+%D \starttyping
+%D \startcollecting
+%D \startcollect \bTABLE \stopcollect
+%D \startcollect \bTR \stopcollect
+%D \startcollect \bTD \stopcollect
+%D \startcollect foo\stopcollect
+%D \startcollect \eTD \stopcollect
+%D \startcollect \bTD \stopcollect
+%D \startcollect bar\stopcollect
+%D \startcollect \eTD \stopcollect
+%D \startcollect \eTR \stopcollect
+%D \startcollect \eTABLE \stopcollect
+%D \stopcollecting
+%D \stoptyping
+
+\newtoks \collectingtoks
+
+\unexpanded\def\startcollect #1\stopcollect {\toksapp \collectingtoks{#1}}
+\unexpanded\def\startexpandedcollect#1\stopexpandedcollect{\etoksapp\collectingtoks{#1}}
+
+\unexpanded\def\startcollecting{\collectingtoks\emptytoks}
+\unexpanded\def\stopcollecting {\the\collectingtoks}
+
+\unexpanded\def\collect {\toksapp \collectingtoks}
+\unexpanded\def\collectexpanded{\etoksapp\collectingtoks}
+
%D A nice one too:
% {\scratchtoks{abc} \removetoks b\from\scratchtoks [\the\scratchtoks]}
@@ -4938,12 +5032,24 @@
%D Also:
-\unexpanded\def\appendetoks #1\to{\normalexpanded{\appendtoks #1}\to}
-\unexpanded\def\prependetoks#1\to{\normalexpanded{\prependtoks#1}\to}
+% \unexpanded\def\appendetoks #1\to{\normalexpanded{\appendtoks #1}\to}
+% \unexpanded\def\prependetoks#1\to{\normalexpanded{\prependtoks#1}\to}
+
+\unexpanded\def\appendetoks#1\to#2%
+ {\etoksapp#2{#1}%
+ \ifx\dodoglobal\relax\else
+ \global#2#2%
+ \fi}
+
+\unexpanded\def\prependetoks#1\to#2%
+ {\etokspre#2{#1}%
+ \ifx\dodoglobal\relax\else
+ \global#2#2%
+ \fi}
%D Hm.
-\unexpanded\def\flushtoks#1% nb: can reassing to #1 again, hence the indirectness
+\unexpanded\def\flushtoks#1% nb: can reassign to #1 again, hence the indirectness
{\t_syst_helpers_scratch#1\relax
\dodoglobal#1\emptytoks
\the\t_syst_helpers_scratch\relax}
@@ -5353,33 +5459,80 @@
\installsystemnamespace{localpushedmacro}
\installsystemnamespace{globalpushedmacro}
+% \let\m_syst_helpers_push_macro\empty
+%
+% \unexpanded\def\globalpushmacro#1%
+% {\xdef\m_syst_helpers_push_macro{\string#1}%
+% \ifcsname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname \else
+% \expandafter\newcount\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname
+% \fi
+% \global\advance\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname \plusone
+% \global\expandafter\let\csname\the\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname\m_syst_helpers_push_macro\endcsname#1}
+%
+% \unexpanded\def\globalpopmacro#1%
+% {\xdef\m_syst_helpers_push_macro{\string#1}%
+% \global\expandafter\let\expandafter#1\csname\the\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname\m_syst_helpers_push_macro\endcsname
+% \global\advance\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname \minusone}
+%
+% \unexpanded\def\localpushmacro#1% this one can be used to push a value over an \egroup
+% {\xdef\m_syst_helpers_push_macro{\string#1}%
+% \ifcsname\??localpushedmacro\m_syst_helpers_push_macro\endcsname \else
+% \expandafter\newcount\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname
+% \fi
+% \global\advance\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname \plusone
+% \global\expandafter\let\csname\the\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname\m_syst_helpers_push_macro\endcsname#1}
+%
+% \unexpanded\def\localpopmacro#1%
+% {\xdef\m_syst_helpers_push_macro{\string#1}%
+% \expandafter\let\expandafter#1\csname\the\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname\m_syst_helpers_push_macro\endcsname
+% \global\advance\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname \minusone }
+%
+% \let\pushmacro\localpushmacro
+% \let\popmacro \localpopmacro
+%
+% slightly faster but more important: less tracing
+
\let\m_syst_helpers_push_macro\empty
+\newcount\c_syst_helpers_pop_count
+
+\def\syst_helpers_push_macro_new_global
+ {\expandafter\newcount\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname
+ \global\advance\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname\plusone}
+
+\def\syst_helpers_push_macro_new_local
+ {\expandafter\newcount\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname
+ \global\advance\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname\plusone}
+
\unexpanded\def\globalpushmacro#1%
- {\xdef\m_syst_helpers_push_macro{\string#1}%
- \ifcsname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname \else
- \expandafter\newcount\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname
+ {\xdef\m_syst_helpers_push_macro{\csstring#1}%
+ \ifcsname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname
+ \global\advance\lastnamedcs\plusone
+ \else
+ \syst_helpers_push_macro_new_global
\fi
- \global\advance\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname \plusone
- \global\expandafter\let\csname\the\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname\m_syst_helpers_push_macro\endcsname#1}
-
-\unexpanded\def\globalpopmacro#1%
- {\xdef\m_syst_helpers_push_macro{\string#1}%
- \global\expandafter\let\expandafter#1\csname\the\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname\m_syst_helpers_push_macro\endcsname
- \global\advance\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname \minusone}
+ \global\expandafter\let\csname\the\lastnamedcs\m_syst_helpers_push_macro\endcsname#1}
\unexpanded\def\localpushmacro#1% this one can be used to push a value over an \egroup
- {\xdef\m_syst_helpers_push_macro{\string#1}%
- \ifcsname\??localpushedmacro\m_syst_helpers_push_macro\endcsname \else
- \expandafter\newcount\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname
+ {\xdef\m_syst_helpers_push_macro{\csstring#1}%
+ \ifcsname\??localpushedmacro\m_syst_helpers_push_macro\endcsname
+ \global\advance\lastnamedcs\plusone
+ \else
+ \syst_helpers_push_macro_new_local
\fi
- \global\advance\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname \plusone
- \global\expandafter\let\csname\the\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname\m_syst_helpers_push_macro\endcsname#1}
+ \global\expandafter\let\csname\the\lastnamedcs\m_syst_helpers_push_macro\endcsname#1}
+
+\unexpanded\def\globalpopmacro#1%
+ {\xdef\m_syst_helpers_push_macro{\csstring#1}%
+ \c_syst_helpers_pop_count\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname
+ \global\advance\lastnamedcs \minusone
+ \expandafter\let\expandafter#1\csname\the\c_syst_helpers_pop_count\m_syst_helpers_push_macro\endcsname}
\unexpanded\def\localpopmacro#1%
- {\xdef\m_syst_helpers_push_macro{\string#1}%
- \expandafter\let\expandafter#1\csname\the\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname\m_syst_helpers_push_macro\endcsname
- \global\advance\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname \minusone }
+ {\xdef\m_syst_helpers_push_macro{\csstring#1}%
+ \c_syst_helpers_pop_count\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname
+ \global\advance\lastnamedcs \minusone
+ \expandafter\let\expandafter#1\csname\the\c_syst_helpers_pop_count\m_syst_helpers_push_macro\endcsname}
\let\pushmacro\localpushmacro
\let\popmacro \localpopmacro
@@ -5754,7 +5907,8 @@
\def\executeifdefined#1% #2 / never change this one again
{\ifcsname#1\endcsname
- \csname#1\expandafter\expandafter\expandafter\endcsname\expandafter\gobbleoneargument
+ % \csname#1\expandafter\expandafter\expandafter\endcsname\expandafter\gobbleoneargument
+ \expandafter\expandafter\expandafter\lastnamedcs\expandafter\gobbleoneargument
\else
\expandafter\firstofoneargument
\fi}
@@ -6461,7 +6615,7 @@
%D macros mood}.
\def\dofilterfromstr#1#2% max n % no need to be fast
- {\expandafter \expandafter \expandafter \strippedcsname
+ {\expandafter \expandafter \expandafter \csstring
\ifcase#1\or \ifcase#2\or
\firstofoneargument \else
\gobbleoneargument \fi
@@ -6492,7 +6646,7 @@
\def\filterfromvalue#1#2#3% value max n
{\expandafter\doubleexpandafter\csname % we use the fact that an
\expandafter\ifx\csname#1\endcsname\relax % undefined cs has become \relax
- \strippedcsname\gobbleoneargument % which we then gobble here
+ \csstring\gobbleoneargument % which we then gobble here
\else
\dofilterfromstr{#2}{#3}%
\fi
@@ -6533,7 +6687,8 @@
{\the\measured}
\def\measured#1%
- {\dimexpr\ifcsname\??measure#1\endcsname\csname\??measure#1\endcsname\else\zeropoint\fi\relax}
+ %{\dimexpr\ifcsname\??measure#1\endcsname\csname\??measure#1\endcsname\else\zeropoint\fi\relax}
+ {\dimexpr\ifcsname\??measure#1\endcsname\lastnamedcs\else\zeropoint\fi\relax}
% #2 could be omitted, but we want to support spaces
%
@@ -6696,7 +6851,7 @@
\unexpanded\def\addvalue#1#2% cs item
{\ifcsname#1\endcsname\else\expandafter\let\csname#1\endcsname\empty\fi
\normalexpanded{\noexpand\addtocommalist{#2}\expandafter\noexpand\csname#1\endcsname}}
-
+
\def\unspaced#1%
{\syst_helpers_unspaced#1\end}
@@ -6799,7 +6954,7 @@
\unexpanded\def\getrawxparameters {\dogetparameters\dosetrawxvalue}
\unexpanded\def\globalgetrawparameters{\dogetparameters\dosetrawgvalue} % obsolete
-
+
%D Sort of obsolete:
\newcount\c_syst_helpers_mod
@@ -6813,14 +6968,14 @@
\unexpanded\def\DoMod#1by#2to#3{\dosetmodulo {#1}{#2}{#3}}
\unexpanded\def\DoDiv#1by#2to#3{\dosetdivision{#1}{#2}{#3}}
-
+
\def\syst_helpers_unprotected#1\par
{#1\protect}
\unexpanded\def\unprotected
{\unprotect
\syst_helpers_unprotected}
-
+
% awaiting the definitive implementation
% \ifdefined\resettimer \else
@@ -6834,11 +6989,17 @@
\let\elapsedseconds \elapsedtime
\newcount\c_syst_helpers_test_feature_n
+\chardef \c_syst_helpers_test_feature_m\zerocount
+
+\def\currentfeaturetest{\number\c_syst_helpers_test_feature_n}
\unexpanded\def\testfeature#1#2%
- {\def\syst_helpers_test_feature_step
+ {\chardef\c_syst_helpers_test_feature_m#1\relax
+ \def\syst_helpers_test_feature_step
{\advance\c_syst_helpers_test_feature_n\plusone
- \ifnum\c_syst_helpers_test_feature_n>#1\else#2\expandafter\syst_helpers_test_feature_step\fi}%
+ \ifnum\c_syst_helpers_test_feature_n>\c_syst_helpers_test_feature_m\else
+ #2\expandafter\syst_helpers_test_feature_step
+ \fi}%
\retestfeature}
\unexpanded\def\retestfeature % timer support is new per 10/5/2005
@@ -6848,7 +7009,7 @@
\resettimer
\c_syst_helpers_test_feature_n\zerocount
\syst_helpers_test_feature_step
- \writestatus\m!system{feature test done (\elapsedseconds s)}%
+ \writestatus\m!system{\number\c_syst_helpers_test_feature_m\space feature tests done (\elapsedseconds s)}%
\wait
\egroup}
@@ -6860,7 +7021,7 @@
\let\wait\relax
\testfeature{#1}{#2}%
\endgroup}
-
+
%D \macros
%D {freezedimenmacro}
%D
@@ -6872,7 +7033,7 @@
\unexpanded\def\freezedimenmacro#1%
{\edef#1{\the\dimexpr#1}}
-
+
%D The next macro negates a macro (dimension or number, or actually, whatever.
%D It's a typical example of \type {\if} usage:
%D
@@ -6882,12 +7043,12 @@
%D \stoptyping
\def\negated#1{\if-#1\else-#1\fi} % does only work in macros or text
-
+
\def\gobbleassigndimen#1\\{}
\def\assigndimen#1#2%
{\afterassignment\gobbleassigndimen#1=#2\zeropoint\\}
-
+
\unexpanded\def\appended#1#2#3{\expandafter#1\expandafter#2\expandafter{#2#3}}
\unexpanded\def\appendvalue #1{\expandafter\appended\expandafter \def\csname#1\endcsname}
\unexpanded\def\appendgvalue#1{\expandafter\appended\expandafter\gdef\csname#1\endcsname}
@@ -6899,7 +7060,7 @@
\unexpanded\def\prependvalue #1{\expandafter\prepended\expandafter \def\csname#1\endcsname}
\unexpanded\def\prependgvalue#1{\expandafter\prepended\expandafter\gdef\csname#1\endcsname}
-
+
%D \macros
%D {dowithrange}
%D
@@ -6958,7 +7119,7 @@
{\syst_helpers_process_word#1 \_e_o_w_}% no \unskip
\let\processword\relax
-
+
%D \macros
%D {startnointerference}
%D
@@ -6987,7 +7148,7 @@
{\csname#1\ifcsname#1#2\endcsname#2\else#3\fi\endcsname}
%D Signal. Some fonts have a char0 rendering so we need to make sure that it
-%D is not set in the font!
+%D is not set in the font! (THis will be overloaded)
\unexpanded\def\signalcharacter{\char\zerocount} % \zwj
@@ -7196,6 +7357,15 @@
%def\ntimes#1#2{\ifnum#2>\zerocount#1\ntimes{#1}{\numexpr#2-\plusone\relax}\fi} % 1.72
\def\ntimes#1#2{\clf_ntimes{#1}\numexpr#2\relax} % 0.33
+%D Not that useful:
+
+% \unexpanded\def\doifelsestringbefore{\clf_doifelsestringbefore}
+% \unexpanded\def\doifelsestringafter {\clf_doifelsestringafter}
+
+% Could have been useful but not faster that addtocommalist and also expansion mess:
+%
+% \def\additemtolist#1#2{\normalexpanded{\noexpand\clf_additemtolist{#1}{#2}}}
+
\protect \endinput
% \edef\choicetokenyes{+}
diff --git a/Master/texmf-dist/tex/context/base/syst-con.lua b/Master/texmf-dist/tex/context/base/mkiv/syst-con.lua
index 0fa685b2dab..0fa685b2dab 100644
--- a/Master/texmf-dist/tex/context/base/syst-con.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-con.lua
diff --git a/Master/texmf-dist/tex/context/base/syst-con.mkiv b/Master/texmf-dist/tex/context/base/mkiv/syst-con.mkiv
index 17c40781977..17c40781977 100644
--- a/Master/texmf-dist/tex/context/base/syst-con.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-con.mkiv
diff --git a/Master/texmf-dist/tex/context/base/syst-fnt.mkiv b/Master/texmf-dist/tex/context/base/mkiv/syst-fnt.mkiv
index 625b952b7e4..cacc5f51740 100644
--- a/Master/texmf-dist/tex/context/base/syst-fnt.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-fnt.mkiv
@@ -40,6 +40,12 @@
\def\currentspaceskip {\interwordspace\s!plus\interwordstretch\s!minus\interwordshrink\relax}
+\def\currentspacevalue {\the\interwordspace
+ \ifzeropt\interwordstretch\else{ plus }\the\interwordstretch\fi
+ \ifzeropt\interwordshrink \else{ minus }\the\interwordshrink \fi}
+
+\def\usedspacevalue {\ifzeropt\spaceskip\the\spaceskip\else\currentspacevalue\fi}
+
\def\mathstacktotal {\dimexpr\Umathstacknumup\scriptstyle+\Umathstackdenomdown\scriptstyle\relax}
\def\mathstackvgap {\Umathstackvgap\scriptstyle}
diff --git a/Master/texmf-dist/tex/context/base/syst-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkiv
index dc5fddb63e1..dc8300e7f07 100644
--- a/Master/texmf-dist/tex/context/base/syst-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkiv
@@ -63,6 +63,8 @@
\chardef\xetexengine = 2
\chardef\luatexengine = 3
+\chardef\statuswrite = 128
+
\ifx\directlua\undefined
\ifx\XeTeXversion\undefined
\ifx\pdftexversion\undefined
@@ -80,9 +82,9 @@
\ifnum\texengine=\luatexengine
% for historic reasons we keep some mkii code around
\else
- \immediate\write16{>>>}
- \immediate\write16{>>> only luatex is supported}
- \immediate\write16{>>>}
+ \immediate\write\statuswrite{>>>}
+ \immediate\write\statuswrite{>>> only luatex is supported}
+ \immediate\write\statuswrite{>>>}
\let\dump\relax
\expandafter\end
\fi
@@ -91,27 +93,19 @@
\directlua 0 { % this info is stored in the format
lua.name[0] = "main ctx instance"
- local extraprimitives = tex.extraprimitives
- local enableprimitives = tex.enableprimitives
- local core = extraprimitives("core")
- local btex = extraprimitives("tex")
- local etex = extraprimitives("etex")
- local pdftex = extraprimitives("pdftex")
- local luatex = extraprimitives("luatex")
- local omega = {
- "textdir", "pagedir", "mathdir", "pardir", "bodydir",
- "leftghost", "rightghost", "localleftbox", "localrightbox",
- "localinterlinepenalty", "localbrokenpenalty",
- }
- local aleph = {
- "boxdir", "pagebottomoffset", "pagerightoffset",
- }
- for _, subset in next, { etex, pdftex, luatex, omega, aleph } do
- enableprimitives("",subset)
- end
- for _, subset in next, { core, btex, etex, pdftex, luatex, omega, aleph } do
- enableprimitives("normal",subset)
- end
+
+ local coreprimitives = tex.extraprimitives("core")
+ local texprimitives = tex.extraprimitives("tex")
+ local etexprimitives = tex.extraprimitives("etex")
+ local luatexprimitives = tex.extraprimitives("luatex")
+
+ tex.enableprimitives("",etexprimitives)
+ tex.enableprimitives("",luatexprimitives)
+
+ tex.enableprimitives("normal",coreprimitives)
+ tex.enableprimitives("normal",texprimitives)
+ tex.enableprimitives("normal",etexprimitives)
+ tex.enableprimitives("normal",luatexprimitives)
}
%D \ETEX\ has a not so handy way of telling you the version number, i.e. the revision
@@ -171,8 +165,8 @@
\countdef \c_syst_min_allocated_register = 52 \c_syst_min_allocated_register = 256 % can change
\countdef \c_syst_max_allocated_register = 53 \c_syst_max_allocated_register = 32767
-\countdef \c_syst_min_allocated_iochannel = 54 \c_syst_min_allocated_iochannel = -1
-\countdef \c_syst_max_allocated_iochannel = 55 \c_syst_max_allocated_iochannel = 16
+\countdef \c_syst_min_allocated_read = 54 \c_syst_min_allocated_read = -1
+\countdef \c_syst_max_allocated_read = 55 \c_syst_max_allocated_read = 16
\countdef \c_syst_min_allocated_language = 56 \c_syst_min_allocated_language = 0
\countdef \c_syst_max_allocated_language = 57 \c_syst_max_allocated_language = 255
\countdef \c_syst_max_allocated_insert = 58 \c_syst_max_allocated_insert = 254
@@ -180,6 +174,8 @@
\countdef \c_syst_min_allocated_family = 60 \c_syst_min_allocated_family = 128
\countdef \c_syst_max_allocated_family = 61 \c_syst_max_allocated_family = 255
\countdef \c_syst_min_allocated_attribute = 62 \c_syst_min_allocated_attribute = 1024 % 127-1023 : private
+\countdef \c_syst_min_allocated_write = 63 \c_syst_min_allocated_write = 0 % luatex >= 0.82
+\countdef \c_syst_max_allocated_write = 64 \c_syst_max_allocated_write = 127 % luatex >= 0.82
\countdef \c_syst_last_allocated_count = 32 \c_syst_last_allocated_count = \c_syst_min_allocated_register
\countdef \c_syst_last_allocated_dimen = 33 \c_syst_last_allocated_dimen = \c_syst_min_allocated_register
@@ -187,8 +183,8 @@
\countdef \c_syst_last_allocated_muskip = 35 \c_syst_last_allocated_muskip = \c_syst_min_allocated_register
\countdef \c_syst_last_allocated_box = 36 \c_syst_last_allocated_box = \c_syst_min_allocated_register
\countdef \c_syst_last_allocated_toks = 37 \c_syst_last_allocated_toks = \c_syst_min_allocated_register
-\countdef \c_syst_last_allocated_read = 38 \c_syst_last_allocated_read = \c_syst_min_allocated_iochannel
-\countdef \c_syst_last_allocated_write = 39 \c_syst_last_allocated_write = \c_syst_min_allocated_iochannel
+\countdef \c_syst_last_allocated_read = 38 \c_syst_last_allocated_read = \c_syst_min_allocated_read
+\countdef \c_syst_last_allocated_write = 39 \c_syst_last_allocated_write = \c_syst_min_allocated_write
\countdef \c_syst_last_allocated_marks = 40 \c_syst_last_allocated_marks = \c_syst_min_allocated_register
\countdef \c_syst_last_allocated_language = 41 \c_syst_last_allocated_language = \c_syst_min_allocated_language % not used in context
\countdef \c_syst_last_allocated_insertion = 42 \c_syst_last_allocated_insertion = \c_syst_min_allocated_insert
@@ -226,8 +222,8 @@
\normalprotected\def\newmuskip {\syst_basics_allocate\c_syst_last_allocated_muskip \muskip \muskipdef \c_syst_max_allocated_register}
\normalprotected\def\newbox {\syst_basics_allocate\c_syst_last_allocated_box \box \mathchardef\c_syst_max_allocated_register}
\normalprotected\def\newtoks {\syst_basics_allocate\c_syst_last_allocated_toks \toks \toksdef \c_syst_max_allocated_register}
-\normalprotected\def\newread {\syst_basics_allocate\c_syst_last_allocated_read \read \chardef \c_syst_max_allocated_iochannel}
-\normalprotected\def\newwrite {\syst_basics_allocate\c_syst_last_allocated_write \write \chardef \c_syst_max_allocated_iochannel}
+\normalprotected\def\newread {\syst_basics_allocate\c_syst_last_allocated_read \read \chardef \c_syst_max_allocated_read}
+\normalprotected\def\newwrite {\syst_basics_allocate\c_syst_last_allocated_write \write \chardef \c_syst_max_allocated_write}
\normalprotected\def\newmarks {\syst_basics_allocate\c_syst_last_allocated_marks \marks \mathchardef\c_syst_max_allocated_register}
\normalprotected\def\newinsert {\syst_basics_allocate\c_syst_last_allocated_insertion\insert \chardef \c_syst_max_allocated_insert}
@@ -238,6 +234,8 @@
\let\newfam\newfamily
+\firstvalidlanguage\plusone
+
% Watch out, for the moment we disable the check for already being defined
% later we will revert this but first all chardefs must be replaced.
@@ -260,7 +258,7 @@
%D as all engines now provide many registers we removed all traces.
\ifdefined\writestatus \else
- \normalprotected\def\writestatus#1#2{\immediate\write16{#1: #2}}
+ \normalprotected\def\writestatus#1#2{\immediate\write\statuswrite{#1: #2}}
\fi
\def\syst_basics_allocate_yes#1#2#3#4#5% last class method max name
@@ -302,7 +300,8 @@
%D strings instead of tokens that take more memory. It's a trick to trick to force
%D strings. This macro is never used in \CONTEXT.
-\normalprotected\def\newhelp#1#2{\newtoks#1#1\expandafter{\csname#2\endcsname}}
+%normalprotected\def\newhelp#1#2{\newtoks#1#1\expandafter{\csname#2\endcsname}}
+\normalprotected\def\newhelp#1#2{\newtoks#1#1\expandafter{\detokenize{#2}}}
%D \macros
%D {scratchcounter,
@@ -327,6 +326,13 @@
\newtoks \scratchtoksone \newtoks \scratchtokstwo \newtoks \scratchtoksthree
\newbox \scratchboxone \newbox \scratchboxtwo \newbox \scratchboxthree
+\newcount\scratchcounterfour \newcount\scratchcounterfive \newcount\scratchcountersix
+\newdimen \scratchdimenfour \newdimen \scratchdimenfive \newdimen \scratchdimensix
+\newskip \scratchskipfour \newskip \scratchskipfive \newskip \scratchskipsix
+\newmuskip\scratchmuskipfour \newmuskip\scratchmuskipfive \newmuskip\scratchmuskipsix
+\newtoks \scratchtoksfour \newtoks \scratchtoksfive \newtoks \scratchtokssix
+\newbox \scratchboxfour \newbox \scratchboxfive \newbox \scratchboxsix
+
%D \macros
%D {scratchwidth, scratchheight, scratchdepth, scratchoffset, scratchdistance}
%D
@@ -361,6 +367,9 @@
\newcount\scratchmx
\newcount\scratchmy
+\newcount\scratchmin
+\newcount\scratchmax
+
\newcount\scratchunicode
\newdimen\scratchleftskip
@@ -405,6 +414,7 @@
\chardef \plusten = 10
\chardef \plussixteen = 16
\chardef \plushundred = 100
+\chardef \plustwohundred = 200
\chardef \pluscxxvii = 127
\chardef \pluscxxviii = 128
\chardef \pluscclv = 255
@@ -454,17 +464,17 @@
%D Some expected plain variants follow. We don't reuse registers because we
%D don't want clashes.
-\newdimen\p@ \p@ \onepoint
-\newcount\m@ne \m@ne \minusone
-\newdimen\z@ \z@ \zeropoint
+\let \p@ \onepoint
+\let \m@ne \minusone
+\let \z@ \zeropoint
\let \@ne \plusone
\let \tw@ \plustwo
\let \thr@@ \plusthree
\let \sixt@@n \plussixteen
\let \@cclv \pluscclv
\let \@cclvi \pluscclvi
-\newbox \voidb@x
-\newtoks \toks@
+\let \voidb@x \voidbox
+\newtoks \toks@ % \scratchtoks
%D We define \type {\newif} a la plain \TEX, but will redefine it later. As
%D Knuth says:
@@ -499,6 +509,7 @@
%D Let's test this one:
\newif\ifdone
+\newif\iffound
%D Potential primitive in \LUATEX:
@@ -819,7 +830,9 @@
%D
%D Handy for \ETEX-only usage (avoids making \type {\relax}'s:
-\def\begcsname#1\endcsname{\ifcsname#1\endcsname\csname#1\endcsname\fi}
+% \def\begcsname#1\endcsname{\ifcsname#1\endcsname\csname#1\endcsname\fi}
+
+\let\begcsname\begincsname
%D Now come a few macros that might be needed in successive loading. We redefine the
%D \type {\par} primitive pretty soon so that we get the equivalents right.
@@ -844,7 +857,8 @@
\def\space{ }
\def\empty{}
-\def\null {\hbox{}}
+
+\normalprotected\def\null{\hpack{}}
%D The following two might be overloaded later on but some modules need then
%D earlier. These functionality is reflected in the name and will not change.
@@ -943,90 +957,109 @@
\spanomit \advance\mscount\minusone
\repeat}
-%D The next section deals with selective definitions in later modules. One can of
-%D course use the \type {\texengine} number that we defined earlier instead.
-
-\bgroup \obeylines
- \gdef\pickupSOMETEX#1%
- {\expandafter\gdef\csname begin#1\endcsname{\bgroup\obeylines\dopickupSOMETEX{#1}}}
- \gdef\dopickupSOMETEX#1#2
- % {\egroup\immediate\write16{special code for #1 -> [line \the\inputlineno] \detokenize{#2}}}
- {\egroup}
-\egroup
-
-\let\endTEX \relax \def\beginTEX #1\endTEX {}
-\let\endETEX \relax \def\beginETEX #1\endETEX {}
-\let\endXETEX \relax \def\beginXETEX #1\endXETEX {}
-\let\endLUATEX\relax \def\beginLUATEX#1\endLUATEX{}
-\let\endOLDTEX\relax \def\beginOLDTEX#1\endOLDTEX{}
-\let\endNEWTEX\relax \def\beginNEWTEX#1\endNEWTEX{}
-
-\pickupSOMETEX{ETEX}
-
-\ifnum\texengine=\xetexengine
- \pickupSOMETEX{XETEX}
-\fi
-\ifnum\texengine=\luatexengine
- \pickupSOMETEX{LUATEX}
-\fi
-\ifnum\texengine<\xetexengine
- \pickupSOMETEX{OLDTEX}
-\else
- \pickupSOMETEX{NEWTEX}
-\fi
-
-%D \macros
-%D {bindprimitive}
-%D
-%D We can remap primitives (which is needed because of changes in for instance
-%D \PDFTEX).
-
-\def\bindprimitive#1 #2 % new old
- {\ifcsname#1\endcsname \else \ifcsname#2\endcsname
- \expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname
- \fi \fi}
-
-%D Because \XETEX\ also implements some \PDFTEX\ functionality, we take care of this
-%D here instead of a dedicated module. Later modules need to handle the undefined
-%D cases.
-
-%D These messy checks will disappear.
-
-% new after 1.10, watch the change in prefix
-
-% \bindprimitive quitvmode ptexquitvmode
-% \bindprimitive noligatures ptexnoligatures
-% \bindprimitive setrandomseed ptexsetrandomseed
-% \bindprimitive uniformdeviate ptexuniformdeviate
-
-% \bindprimitive quitvmode pdfquitvmode
-% \bindprimitive noligatures pdfnoligatures
-% \bindprimitive setrandomseed pdfsetrandomseed
-% \bindprimitive uniformdeviate pdfuniformdeviate
-
-% \bindprimitive resettimer pdfresettimer
-% \bindprimitive elapsedtime pdfelapsedtime
-
-% new per 1.40
-
-% \bindprimitive ifprimitive ifpdfprimitive
-% \bindprimitive primitive pdfprimitive
-% \bindprimitive ifabsdim ifpdfabsdim
-% \bindprimitive ifabsnum ifpdfabsnum
-
-%D We need to make sure that we start up in \DVI\ mode, so, after testing for running
-%D \PDFTEX, we default to \DVI. Why?
-
-\pdfoutput \zerocount
-\pdfminorversion \plusseven
-\pdfgentounicode \plusone
-\pdfinclusioncopyfonts \plusone
-\pdfinclusionerrorlevel \zerocount
-\pdfdecimaldigits \plusten
-\pdfhorigin 1 true in
-\pdfvorigin \pdfhorigin
-\pdfimageresolution 300
-\pdfpkresolution 600
+%D Backend:
+
+% For the moment we define some \pdf... helpers but this will move to the backend
+% module after which the official interfaces have to be used. This is needed for
+% modules not made by ctx developers.
+
+\normalprotected\def\pdfliteral {\pdfextension literal }
+\normalprotected\def\pdfcolorstack {\pdfextension colorstack }
+\normalprotected\def\pdfsetmatrix {\pdfextension setmatrix }
+\normalprotected\def\pdfsave {\pdfextension save\relax}
+\normalprotected\def\pdfrestore {\pdfextension restore\relax}
+\normalprotected\def\pdfobj {\pdfextension obj }
+\normalprotected\def\pdfrefobj {\pdfextension refobj }
+\normalprotected\def\pdfannot {\pdfextension annot }
+\normalprotected\def\pdfstartlink {\pdfextension startlink }
+\normalprotected\def\pdfendlink {\pdfextension endlink\relax}
+\normalprotected\def\pdfoutline {\pdfextension outline }
+\normalprotected\def\pdfdest {\pdfextension dest }
+\normalprotected\def\pdfthread {\pdfextension thread }
+\normalprotected\def\pdfstartthread {\pdfextension startthread }
+\normalprotected\def\pdfendthread {\pdfextension endthread\relax}
+\normalprotected\def\pdfinfo {\pdfextension info }
+\normalprotected\def\pdfcatalog {\pdfextension catalog }
+\normalprotected\def\pdfnames {\pdfextension names }
+\normalprotected\def\pdfincludechars {\pdfextension includechars }
+\normalprotected\def\pdffontattr {\pdfextension fontattr }
+\normalprotected\def\pdfmapfile {\pdfextension mapfile }
+\normalprotected\def\pdfmapline {\pdfextension mapline }
+\normalprotected\def\pdftrailer {\pdfextension trailer }
+\normalprotected\def\pdfglyphtounicode {\pdfextension glyphtounicode }
+
+% \chardef\pdfnofullbanner = 1
+% \chardef\pdfnofilename = 2
+% \chardef\pdfnopagenumber = 4
+% \chardef\pdfnoinfodict = 8
+% \chardef\pdfnocreator = 16
+% \chardef\pdfnocreationdate = 32
+% \chardef\pdfnomoddate = 64
+% \chardef\pdfnoproducer = 128
+% \chardef\pdfnotrapped = 256
+% \chardef\pdfnoid = 512
+
+\def\pdftexversion {\numexpr\pdffeedback version}
+\def\pdftexrevision {\pdffeedback revision}
+\def\pdflastlink {\numexpr\pdffeedback lastlink}
+\def\pdfretval {\numexpr\pdffeedback retval}
+\def\pdflastobj {\numexpr\pdffeedback lastobj}
+\def\pdflastannot {\numexpr\pdffeedback lastannot}
+\def\pdfxformname {\numexpr\pdffeedback xformname}
+\def\pdfcreationdate {\pdffeedback creationdate}
+\def\pdffontname {\numexpr\pdffeedback fontname}
+\def\pdffontobjnum {\numexpr\pdffeedback fontobjnum}
+\def\pdffontsize {\dimexpr\pdffeedback fontsize}
+\def\pdfpageref {\numexpr\pdffeedback pageref}
+\def\pdfcolorstackinit {\pdffeedback colorstackinit}
+
+\let\pdfxform \saveboxresource
+\let\pdflastxform \lastsavedboxresourceindex
+\let\pdfrefxform \useboxresource
+\let\pdfximage \saveimageresource
+\let\pdflastximage \lastsavedimageresourceindex
+\let\pdflastximagepages \lastsavedimageresourcepages
+\let\pdfrefximage \useimageresource
+\let\pdfsavepos \savepos
+\let\pdflastxpos \lastxpos
+\let\pdflastypos \lastypos
+
+\edef\pdfcompresslevel {\pdfvariable compresslevel} \pdfcompresslevel \plusnine
+\edef\pdfobjcompresslevel {\pdfvariable objcompresslevel} \pdfobjcompresslevel \plusone
+\edef\pdfdecimaldigits {\pdfvariable decimaldigits} \pdfdecimaldigits \plusfive
+\edef\pdfgamma {\pdfvariable gamma} \pdfgamma \plusthousand
+\edef\pdfimageresolution {\pdfvariable imageresolution} \pdfimageresolution 300
+\edef\pdfimageapplygamma {\pdfvariable imageapplygamma} \pdfimageapplygamma \zerocount
+\edef\pdfimagegamma {\pdfvariable imagegamma} \pdfimagegamma 2200
+\edef\pdfimagehicolor {\pdfvariable imagehicolor} \pdfimagehicolor \plusone
+\edef\pdfimageaddfilename {\pdfvariable imageaddfilename} \pdfimageaddfilename \plusone
+\edef\pdfpkresolution {\pdfvariable pkresolution} \pdfpkresolution 1200
+\edef\pdfinclusioncopyfonts {\pdfvariable inclusioncopyfonts} \pdfinclusioncopyfonts \plusone
+\edef\pdfinclusionerrorlevel {\pdfvariable inclusionerrorlevel} \pdfinclusionerrorlevel \zerocount
+\edef\pdfgentounicode {\pdfvariable gentounicode} \pdfgentounicode \plusone
+\edef\pdfpagebox {\pdfvariable pagebox} \pdfpagebox \zerocount
+\edef\pdfminorversion {\pdfvariable minorversion} \pdfminorversion \plusseven
+\edef\pdfuniqueresname {\pdfvariable uniqueresname} \pdfuniqueresname \zerocount
+\edef\pdfhorigin {\pdfvariable horigin} \pdfhorigin 1in
+\edef\pdfvorigin {\pdfvariable vorigin} \pdfvorigin \pdfhorigin
+\edef\pdflinkmargin {\pdfvariable linkmargin} \pdflinkmargin \zeropoint
+\edef\pdfdestmargin {\pdfvariable destmargin} \pdfdestmargin \zeropoint
+\edef\pdfthreadmargin {\pdfvariable threadmargin} \pdfthreadmargin \zeropoint
+\edef\pdfxformmargin {\pdfvariable xformmargin} \pdfxformmargin \zeropoint
+\edef\pdfpkfixeddpi {\pdfvariable pkfixeddpi} \pdfpkfixeddpi \plusone
+\edef\pdfignoreunknownimages {\pdfvariable ignoreunknownimages} \pdfignoreunknownimages \zerocount
+
+\edef\pdfpagesattr {\pdfvariable pagesattr}
+\edef\pdfpageattr {\pdfvariable pageattr}
+\edef\pdfpageresources {\pdfvariable pageresources}
+\edef\pdfxformattr {\pdfvariable xformattr}
+\edef\pdfxformresources {\pdfvariable xformresources}
+\edef\pdfpkmode {\pdfvariable pkmode}
+
+\edef\pdfsuppressoptionalinfo{\pdfvariable suppressoptionalinfo }
+\let \pdfsuppressptexinfo \pdfsuppressoptionalinfo
+\edef\pdftrailerid {\pdfvariable trailerid }
+\edef\pdfinfoomitdate {\pdfvariable suppressoptionalinfo \numexpr32+64\relax}
\normalprotected\def\nopdfcompression {\pdfobjcompresslevel\zerocount \pdfcompresslevel\zerocount}
\normalprotected\def\maximumpdfcompression{\pdfobjcompresslevel\plusnine \pdfcompresslevel\plusnine }
@@ -1034,8 +1067,7 @@
\normalpdfcompression
-\let\normalsetrandomseed \setrandomseed
-\let\normaluniformdeviate\uniformdeviate
+\outputmode \zerocount % we generate the format in this mode
%D Basic status stuff.
@@ -1051,28 +1083,6 @@
\def\modulonumber#1#2{\the\numexpr#2-((((#2+(#1/2))/#1)-1)*#1)\relax}
\def\dividenumber#1#2{\the\numexpr(#2-(#1/2))/#1\relax}
-% \ifnum\texengine=\xetexengine
-% \edef\xetexversion {\numexpr\XeTeXversion*100+(\expandafter\gobbleoneargument\XeTeXrevision-5)/10\relax}
-% \edef\xetexrevision {\the\numexpr(\expandafter\gobbleoneargument\XeTeXrevision-50)/100\relax}
-% \fi
-%
-% \ifcase\texengine
-% \def \texenginename {impossible}
-% \edef\texengineversion{0}
-% \or
-% \def \texenginename {pdfTeX}
-% \edef\texengineversion{\dividenumber{100}\pdftexversion.\modulonumber{100}\pdftexversion.\pdftexrevision}
-% \or
-% \def \texenginename {XeTeX}
-% \edef\texengineversion{\dividenumber{100}\xetexversion .\modulonumber{100}\xetexversion .\xetexrevision}
-% \or
-% \def \texenginename {LuaTeX}
-% \edef\texengineversion{\dividenumber{100}\luatexversion.\modulonumber{100}\luatexversion.\luatexrevision}
-% \else
-% \def \texenginename {impossible}
-% \edef\texengineversion{0}
-% \fi
-
\def \texenginename {LuaTeX}
\edef\texengineversion{\dividenumber{100}\luatexversion.\modulonumber{100}\luatexversion.\luatexrevision}
@@ -1091,13 +1101,12 @@
%D Handy.
-\suppresslongerror \plusone
-\suppressoutererror \plusone
-\suppressmathparerror \plusone
+\suppresslongerror \plusone % \let\suppresslongerror \relax
+\suppressoutererror \plusone % \let\suppressoutererror \relax
+\suppressmathparerror \plusone % \let\suppressmathparerror \relax
+\suppressifcsnameerror\plusone % \let\suppressifcsnameerror\relax
-\ifdefined\matheqnogapstep % for now
- \matheqnogapstep \zerocount
-\fi
+\matheqnogapstep \zerocount % fr now
%D While cleaning this code up a bit I was listening to Heather Nova's \CD\ Redbird.
%D The first song on that \CD\ ends with a few lines suitable for ending this
@@ -1126,11 +1135,25 @@
\normalprotected\def\installsystemnamespace#1%
{\ifcsname ??#1\endcsname
- \immediate\write16{fatal error: duplicate system namespace '#1'}%
+ \immediate\write\statuswrite{fatal error: duplicate system namespace '#1'}%
\expandafter\normalend
\else
\global\advance\c_syst_helpers_n_of_namespaces\plusone
\expandafter\edef\csname ??#1\endcsname{\v_interfaces_prefix_template_system}%
\fi}
+%D It makes more sense to have these here:
+
+\let\normalsuperscript\Usuperscript
+\let\normalsubscript \Usubscript
+\let\normalstartimath \Ustartmath
+\let\normalstopimath \Ustopmath
+\let\normalstartdmath \Ustartdisplaymath
+\let\normalstopdmath \Ustopdisplaymath
+
+%D For now:
+
+\ifdefined\protrusionboundary \else \let\protrusionboundary\boundary \fi
+\ifdefined\wordboundary \else \let\wordboundary \noboundary \fi
+
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/syst-lua.lua b/Master/texmf-dist/tex/context/base/mkiv/syst-lua.lua
index a6665f4104a..422f57a0092 100644
--- a/Master/texmf-dist/tex/context/base/syst-lua.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-lua.lua
@@ -113,57 +113,6 @@ function commands.doifelsespaces(str)
end
end
-local s = lpegtsplitat(",")
-local h = { }
-
-local function doifelsecommon(a,b) -- often the same test
- local ha = h[a]
- local hb = h[b]
- if not ha then
- ha = lpegmatch(s,a)
- h[a] = ha
- end
- if not hb then
- hb = lpegmatch(s,b)
- h[b] = hb
- end
- local na = #ha
- local nb = #hb
- for i=1,na do
- for j=1,nb do
- if ha[i] == hb[j] then
- ctx_firstoftwoarguments()
- return
- end
- end
- end
- ctx_secondoftwoarguments()
-end
-
-local function doifelseinset(a,b)
- local hb = h[b]
- if not hb then hb = lpegmatch(s,b) h[b] = hb end
- for i=1,#hb do
- if a == hb[i] then
- ctx_firstoftwoarguments()
- return
- end
- end
- ctx_secondoftwoarguments()
-end
-
-implement {
- name = "doifelsecommon",
- arguments = two_strings,
- actions = doifelsecommon
-}
-
-implement {
- name = "doifelseinset",
- arguments = two_strings,
- actions = doifelseinset
-}
-
local pattern = lpeg.patterns.validdimen
function commands.doifelsedimenstring(str)
@@ -194,18 +143,6 @@ implement {
actions = os.execute -- wrapped in sandbox
}
--- function commands.write(n,str)
--- if n == 18 then
--- os.execute(str)
--- elseif n == 16 then
--- -- immediate
--- logs.report(str)
--- else
--- -- at the tex end we can still drop the write / also delayed vs immediate
--- context.writeviatex(n,str)
--- end
--- end
-
implement {
name = "doifelsesame",
arguments = two_strings,
diff --git a/Master/texmf-dist/tex/context/base/syst-lua.mkiv b/Master/texmf-dist/tex/context/base/mkiv/syst-lua.mkiv
index 5e82a9ea9e7..b5001ab6253 100644
--- a/Master/texmf-dist/tex/context/base/syst-lua.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-lua.mkiv
@@ -53,49 +53,11 @@
\def\ui_ft#1#2{#1}
\def\ui_st#1#2{#2}
-%D Let's bring this under \LUA\ (and therefore \MKIV\ sandbox) control:
-
-% \setnewconstant\c_syst_write 18
-%
-% \unexpanded\def\write#1#% so we can handle \immediate
-% {\ifnum#1=\c_syst_write
-% \expandafter\syst_execute
-% \else
-% \normalwrite#1%
-% \fi}
-%
-% \unexpanded\def\syst_execute#1%
-% {\ctxlua{os.execute(\!!bs#1\!!es)}}
%D But as we only use write 16 we could as well do all in \LUA\
%D and ignore the rest. Okay, we still can do writes here but only
%D when not blocked.
-% Nicer would be if we could just disable write 18 and keep os.execute
-% which in fact we can do by defining write18 as macro instead of
-% primitive ... todo.
-
-% \unexpanded\def\write#1#%
-% {\syst_write{#1}}
-%
-% \def\syst_write#1#2%
-% {\ctxcommand{write(\number#1,\!!bs\normalunexpanded{#2}\!!es)}}
-%
-% \unexpanded\def\writeviatex#1#2%
-% {\ifx\normalwrite\relax\else
-% \normalwrite#1{#2}%
-% \fi}
-
-% we have no way yet to pickup \immediate unless we redefine it
-% we assume immediate execution
-
\let\syst_write_execute\clf_execute % always {...}
-\unexpanded\def\write#1#%
- {\ifnum#1=18
- \expandafter\syst_write_execute
- \else
- \normalwrite#1%
- \fi}
-
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/syst-mes.mkiv b/Master/texmf-dist/tex/context/base/mkiv/syst-mes.mkiv
index 4cd36e24bdf..4cd36e24bdf 100644
--- a/Master/texmf-dist/tex/context/base/syst-mes.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-mes.mkiv
diff --git a/Master/texmf-dist/tex/context/base/syst-pln.mkiv b/Master/texmf-dist/tex/context/base/mkiv/syst-pln.mkiv
index 2481131209f..2481131209f 100644
--- a/Master/texmf-dist/tex/context/base/syst-pln.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-pln.mkiv
diff --git a/Master/texmf-dist/tex/context/base/tabl-com.mkiv b/Master/texmf-dist/tex/context/base/mkiv/tabl-com.mkiv
index e9008636886..e9008636886 100644
--- a/Master/texmf-dist/tex/context/base/tabl-com.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-com.mkiv
diff --git a/Master/texmf-dist/tex/context/base/mkiv/tabl-ltb.mkiv b/Master/texmf-dist/tex/context/base/mkiv/tabl-ltb.mkiv
new file mode 100644
index 00000000000..b0e3f52e439
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-ltb.mkiv
@@ -0,0 +1,780 @@
+%D \module
+%D [ file=tabl-ltb,
+%D version=2002.10.31, % updated 2016.01.08
+%D title=\CONTEXT\ Table Macros,
+%D subtitle=Line Tables,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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 was made for some special project where we needed to typeset tables
+%D spanning spanning many pages horizontally and vertically, with repeated header
+%D lines and (entry) columns, tab tracking, color, etc. We do two passes over a
+%D table, which is why the table can go into a buffer or file. As said, tables can
+%D be real huge but performance is still quite okay (there is room for some speed
+%D up). The code has been adapted to \MKIV\ but the functionality is the same as in
+%D \MKII.
+
+% \BH \BC .. \EC \BC .. \EC \EH % append
+% \BR \BC .. \EC \BC .. \EC \ER
+%
+% or
+%
+% \NC .. \NC .. \NC \NR (todo: optional last \NC)
+
+% alternative:
+%
+% (1) direct run, save content in macro, but only if needed
+%
+% todo
+%
+% (2) buffered table content
+%
+% \startbuffer
+% \startlinetablehead
+% \stoplinetablehead
+% \startlinetablebody
+% \stoplinetablebody
+% \stopbuffer
+%
+% \processlinetablebuffer[buffer]
+%
+% in buffer : head and body
+%
+% (3) unbuffered run, multipass
+%
+% - run with starting width zero / prev run
+% - clip on prev run
+% - flush real widths
+
+\writestatus{loading}{ConTeXt Table Macros / Line Tables}
+
+\unprotect
+
+\installcorenamespace{linetable}
+\installcorenamespace{linetablepart}
+\installcorenamespace{linetablewidth}
+\installcorenamespace{linetableheight}
+\installcorenamespace{linetabledepth}
+
+\newconditional \c_tabl_lines_preroll
+\newconditional \c_tabl_lines_in_table
+
+\newdimen \d_tabl_lines_width
+\newdimen \d_tabl_lines_height
+%newdimen \d_tabl_lines_depth
+
+\newbox \b_tabl_lines_cell
+
+\newcount \c_tabl_lines_n_of_columns
+\newcount \c_tabl_lines_n_of_rows
+\newcount \c_tabl_lines_n_of_lines
+\newcount \c_tabl_lines_n_of_parts
+\newcount \c_tabl_lines_part \c_tabl_lines_part\plusone
+\newcount \c_tabl_lines_step \c_tabl_lines_step\plusone
+\newcount \c_tabl_lines_line
+\newcount \c_tabl_lines_row
+\newcount \c_tabl_lines_rows
+\newcount \c_tabl_lines_column
+\newcount \c_tabl_lines_subcol
+
+\newconstant \c_tabl_lines_hmode
+\newconstant \c_tabl_lines_page
+\newconstant \c_tabl_lines_repeat
+\newconstant \c_tabl_lines_split_state
+\newconstant \c_tabl_lines_head_state
+\newconstant \c_tabl_lines_mode
+
+\newtoks \t_tabl_lines_head
+
+\newconditional \linetableautoheight \settrue\linetableautoheight
+
+\initializetablebox\zerocount % holds repeater
+
+\unexpanded\def\setuplinetable
+ {\dotripleempty\tabl_lines_setup}
+
+\def\tabl_lines_setup[#1][#2][#3]%
+ {\ifthirdargument
+ \getparameters[\??linetable#1:#2][#3]%
+ \else\ifsecondargument
+ \getparameters[\??linetable#1:][#2]%
+ \else
+ \getparameters[\??linetable][#1]%
+ \fi\fi}
+
+\setuplinetable
+ [\c!n=\maxcard,
+ \c!lines=\maxcard,
+ \c!nx=\plusone,
+ \c!nleft=\zerocount,
+ \c!repeat=\v!yes, % when 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=.25\exheight,
+ \c!rightoffset=\linetableparameter\c!leftoffset,
+ \c!maxwidth=\zeropoint,
+ \c!width=5\emwidth,
+ \c!height=\v!fit, % \v!line = faster
+ \c!background=,
+ \c!backgroundcolor=]
+
+\def\linetableparameter#1%
+ {\begincsname\??linetable#1\endcsname}
+
+\unexpanded\def\doifelselinetablecparameter#1%
+ {\ifcsname\??linetable c:\number\c_tabl_lines_column#1\endcsname
+ \expandafter\firstoftwoarguments
+ \else\ifcsname\??linetable c:#1\endcsname
+ \doubleexpandafter\firstoftwoarguments
+ \else
+ \doubleexpandafter\secondoftwoarguments
+ \fi\fi}
+
+\let\doiflinetablecparameterelse\doifelselinetablecparameter
+
+\def\linetablecparameter#1%
+ {\begincsname
+ \??linetable
+ \ifcsname\??linetable c:\number\c_tabl_lines_column#1\endcsname
+ c:\number\c_tabl_lines_column
+ \else\ifcsname\??linetable c:#1\endcsname
+ c:%
+ \fi\fi
+ #1%
+ \endcsname}
+
+\def\linetablerparameter#1% faster, leaner and meaner
+ {\begincsname
+ \??linetable
+ \ifnum\c_tabl_lines_row=\zerocount % geen ifcase
+ \ifcsname\??linetable r:\v!header#1\endcsname
+ r:\v!header
+ \else\ifcsname\??linetable r:0#1\endcsname
+ r:0%
+ \fi\fi
+ \else
+ \ifcsname\??linetable r:\number\c_tabl_lines_row#1\endcsname
+ r:\number\c_tabl_lines_row
+ \else\ifcsname\??linetable r:\v!oddeven\c_tabl_lines_row#1\endcsname
+ r:\v!oddeven\c_tabl_lines_row
+ \fi\fi
+ \fi
+ #1%
+ \endcsname}
+
+\unexpanded\def\tabl_lines_set
+ {\edef\p_lines{\linetableparameter\c!lines}%
+ \ifx\p_lines\v!fit
+ \tabl_lines_set_indeed
+ \else
+ \global\c_tabl_lines_n_of_lines\p_lines
+ \fi}
+
+\unexpanded\def\tabl_lines_set_indeed
+ {% whitespace already added by vertical strut
+ %\triggerpagebuilder
+ \scratchdimen
+ \ifdim\pagegoal<\maxdimen
+ \dimexpr\pagegoal-\pagetotal\relax
+ \else
+ \textheight
+ \fi
+ \getrawnoflines\scratchdimen
+ \global\c_tabl_lines_n_of_lines\noflines
+ \ifconditional\c_tabl_lines_preroll \else \ifnum\c_tabl_lines_n_of_lines<\plustwo
+ \page
+ \tabl_lines_set
+ \fi \fi}
+
+\unexpanded\def\startlinetablecell
+ {\dosingleempty\tabl_lines_start_cell}
+
+\def\tabl_lines_step_cell
+ {\advance\scratchdimen\linetablecparameter\c!width
+ \global\advance \c_tabl_lines_column\plusone
+ \advance\scratchskip \linetablecparameter\c!distance}
+
+\def\tabl_lines_start_cell[#1]%
+ {\global\setbox\b_tabl_lines_cell\hbox\bgroup
+ \iffirstargument
+ \getparameters[\??linetable c:\number\c_tabl_lines_column][#1]%
+ \fi
+ \global\c_tabl_lines_step\linetablecparameter\c!nx\relax
+ \ifcase\c_tabl_lines_step\or
+ \scratchdimen\linetablecparameter\c!width
+ \scratchskip \linetablecparameter\c!distance
+ \else
+ \scratchdimen \zeropoint
+ \scratchskip \zeropoint
+ \scratchcounter\c_tabl_lines_column
+ \dorecurse\c_tabl_lines_step\tabl_lines_step_cell
+ \global\c_tabl_lines_column\scratchcounter
+ \fi
+ \c_tabl_lines_mode
+ \ifconditional\c_tabl_lines_preroll
+ \ifdim\scratchdimen>\zeropoint \zerocount \else \plustwo \fi
+ \else
+ \zerocount
+ \fi
+ \ifcase\c_tabl_lines_mode
+ \ifcase\c_tabl_lines_hmode
+ % nothing
+ \or
+ % fit, keep it simple
+ \or
+ \c_tabl_lines_mode\plusone % line
+ \else
+ % some already calculated height
+ \fi
+ \fi
+ \setbox\scratchbox\hbox
+ \bgroup
+ \dontcomplain
+ \hskip\linetablecparameter\c!leftoffset\relax
+ % 0 = width, unknown height
+ % 1 = width, fixed height
+ % 2 = no width, auto hsize
+ \ifnum\c_tabl_lines_mode<\plustwo
+ \advance\scratchdimen-\linetablecparameter\c!leftoffset
+ \advance\scratchdimen-\linetablecparameter\c!rightoffset
+ \fi
+ \ifcase\c_tabl_lines_mode
+ \dosetraggedcommand{\linetablecparameter\c!align}%
+ \vtop \ifdim\d_tabl_lines_height>\zeropoint to\d_tabl_lines_height \fi \bgroup
+ \hsize\scratchdimen
+ \raggedcommand
+ \else
+ \setalignmentswitch{\linetablecparameter\c!align}%
+ \hbox \ifcase\c_tabl_lines_mode \or to\scratchdimen \fi \bgroup
+ \ifcase\alignmentswitch\hss\or\hss\fi
+ \fi
+ \dousestyleparameter{\linetablecparameter\c!style}%
+ \dousecolorparameter{\linetablecparameter\c!color}%
+ \begstrut \ignorespaces}
+
+\unexpanded\def\stoplinetablecell
+ {\unskip \endstrut
+ \ifcase\c_tabl_lines_mode
+ \endgraf
+ \else
+ \ifcase\alignmentswitch\else\hss\fi
+ \fi
+ \egroup
+ \hskip\linetablecparameter\c!rightoffset
+ \egroup
+ \ifconditional\c_tabl_lines_preroll
+ \box\scratchbox
+ \else
+ \tabl_lines_wrap_up
+ \fi
+ \egroup}
+
+\def\tabl_lines_wrap_up
+ {\edef\p_background{\linetablecparameter\c!background}%
+ \ifx\p_background\v!color
+ \ifconditional\linetableautoheight
+ \tabl_lines_wrap_up_auto
+ \else
+ \tabl_lines_wrap_up_line
+ \fi
+ \else
+ \box\scratchbox
+ \fi}
+
+\def\tabl_lines_wrap_up_auto
+ {\edef\p_height{\linetablerparameter{x\c!height}}%
+ \edef\p_depth {\linetablerparameter{x\c!depth }}%
+ \hbox
+ {\blackrule
+ [ \c!color=\linetablecparameter\c!backgroundcolor,
+ \c!height=\ifx\p_height\empty\ht\scratchbox\else\p_height\fi,
+ \c!depth=\ifx\p_depth \empty\dp\scratchbox\else\p_depth \fi,
+ \c!width=\wd\scratchbox]%
+ \hskip-\wd\scratchbox\box\scratchbox}}
+
+\def\tabl_lines_wrap_up_line
+ {\backgroundline[\linetablecparameter\c!backgroundcolor]{\box\scratchbox}}
+
+\def\tabl_lines_save_part
+ {\global\setbox\tablebox\c_tabl_lines_part
+ \ifnum\c_tabl_lines_part=\zerocount
+ \box\scratchbox % just storing
+ \else
+ \vbox
+ {\ifvoid\tablebox\c_tabl_lines_part\else\unvbox\tablebox\c_tabl_lines_part\fi
+ \doif{\linetablerparameter\c!background}\v!color
+ {\backgroundline[\linetablerparameter\c!backgroundcolor]}%
+ {\box\scratchbox}% is also arg to \backgroundline
+ \endgraf
+ \linetablerparameter\c!after}%
+ \fi}
+
+\def\tabl_lines_flush_parts
+ {\global\advance\c_tabl_lines_line\plusone
+ \ifnum\c_tabl_lines_line<\c_tabl_lines_n_of_lines
+ % keep collecting
+ \else
+ \ifconditional\c_tabl_lines_preroll
+ % forget about them
+ \else
+ \dorecurse\c_tabl_lines_n_of_parts
+ {\c_tabl_lines_part\recurselevel
+ \dp\tablebox\c_tabl_lines_part\strutdepth
+ % noindent en endgraf needed else whitespace mess-up!
+ \whitespace % here not after verticalstrut
+ \ifdim\topskipgap=\zeropoint\else
+ \verticalstrut
+ \nobreak
+ \kern-\struttotal
+ \kern-\parskip
+ \nobreak
+ \nointerlineskip % fix topskip
+ \fi
+ \noindent\strut
+ \hbox to \hsize{\box\tablebox\c_tabl_lines_part\hss}%
+ \endgraf
+ \ifnum\c_tabl_lines_part<\c_tabl_lines_n_of_parts\relax
+ \linetableparameter\c!inbetween
+ \fi}%
+ \ifnum\c_tabl_lines_rows<\c_tabl_lines_n_of_rows
+ \linetableparameter\c!inbetween
+ \else
+ % after, later
+ \fi
+ \c_tabl_lines_head_state\plusthree
+ \global\setbox\tablebox\zerocount\emptybox % here
+ \fi
+ % reset \c_tabl_lines_row will be an option, currently
+ % starts at zero after split
+ \global\c_tabl_lines_row\zerocount
+ \global\c_tabl_lines_line\zerocount
+ \global\c_tabl_lines_page\zerocount
+ \global\d_tabl_lines_width\zeropoint
+ \tabl_lines_set
+ \fi}
+
+\def\tabl_lines_start_part
+ {\global\c_tabl_lines_subcol\zerocount
+ \setbox\scratchbox\hbox\bgroup
+ \dousestyleparameter{\linetablerparameter\c!style}%
+ \dousecolorparameter{\linetablerparameter\c!color}%
+ \ignorespaces}
+
+\def\tabl_lines_stop_part
+ {\ifnum\c_tabl_lines_part>\zerocount
+ \unskip \unskip % remove last intercolumn skip (distance+fill)
+ \fi
+ \egroup
+ \ifconditional\c_tabl_lines_preroll \else
+ \ifcase\c_tabl_lines_part
+ % we're collecting the repeater
+ \else
+ \ifdim\dimexpr\hsize-\wd\scratchbox\relax>\linetableparameter\c!stretch\else
+ \setbox\scratchbox\hpack to \hsize{\unhbox\scratchbox}%
+ \fi
+ \fi
+ \fi}
+
+\def\tabl_lines_check_part
+ {\global\advance\d_tabl_lines_width\wd\b_tabl_lines_cell
+ \global\advance\c_tabl_lines_column\c_tabl_lines_step
+ \global\advance\c_tabl_lines_subcol\c_tabl_lines_step
+ \relax
+ %\message{\the\c_tabl_lines_column,\the\c_tabl_lines_subcol}\wait
+ % from now on the column counter is already incremented
+ \ifcase\c_tabl_lines_split_state
+ \ifconditional\c_tabl_lines_preroll \else
+ \box\b_tabl_lines_cell
+ % the columncounter is one ahead !
+ \hskip\scratchskip
+ \fi
+ %%%
+ \donefalse
+ \ifcase\c_tabl_lines_repeat\else
+ % calculate ahead
+ \ifnum\c_tabl_lines_repeat=\numexpr\c_tabl_lines_column-\plustwo\relax
+ \donetrue % collecting repeater
+ \fi
+ \fi
+ %%%%
+ \ifdone
+ % collecting repeater
+ \else
+ \ifnum\c_tabl_lines_column>\csname\??linetablepart\number\c_tabl_lines_part\endcsname\relax
+ \donetrue
+ \fi
+ \fi
+ \ifdone
+ \tabl_lines_stop_part
+ \ifconditional\c_tabl_lines_preroll \else
+ \tabl_lines_save_part
+ \fi
+ \ifcase\c_tabl_lines_page \or
+ \global\c_tabl_lines_page \plustwo
+ \else
+ \global\c_tabl_lines_page \plusone
+ \fi
+ \global\advance\c_tabl_lines_part\plusone
+ \global\d_tabl_lines_width\wd\tablebox\zerocount
+ \tabl_lines_start_part
+ \fi
+ \else
+ \donefalse
+ \!!doneafalse
+ \ifcase\c_tabl_lines_repeat\else
+ % calculate ahead
+ \ifnum\c_tabl_lines_repeat=\numexpr\c_tabl_lines_column-\plustwo\relax
+ \donetrue % collecting repeater
+ \fi
+ \fi
+ \ifdone
+ \!!doneatrue
+ % collecting repeater
+ \else\ifdim\d_tabl_lines_width>\hsize
+ \donetrue
+ \else
+ \global\advance\d_tabl_lines_width\scratchskip
+ \ifdim\d_tabl_lines_width>\hsize % ?
+ \donetrue
+ \fi
+ \fi\fi
+ \ifdone
+ \tabl_lines_stop_part
+ \tabl_lines_save_part
+ \ifcase\c_tabl_lines_page \or
+ \global\c_tabl_lines_page \plustwo
+ \else
+ \global\c_tabl_lines_page \plusone
+ \fi
+ \global\advance\c_tabl_lines_part\plusone
+ \ifnum\c_tabl_lines_part>\c_tabl_lines_n_of_parts
+ \global\c_tabl_lines_n_of_parts\c_tabl_lines_part
+ \initializetablebox\c_tabl_lines_part
+ \fi
+ \global\d_tabl_lines_width\wd\b_tabl_lines_cell
+ \tabl_lines_start_part
+ \if!!doneb \else \ifcase\c_tabl_lines_repeat \else
+ % check for left/right page
+ \ifcase\c_tabl_lines_page\donetrue\or\donetrue\or\donefalse\fi\ifdone
+ % insert repeater
+ \global\advance\d_tabl_lines_width\wd\tablebox\zerocount
+ \ifconditional\c_tabl_lines_preroll\kern\wd\else\unhcopy\fi\tablebox\zerocount
+ \fi
+ \fi \fi
+ \fi
+ \ifconditional\c_tabl_lines_preroll \else
+ \box\b_tabl_lines_cell
+ % the columncounter is one ahead !
+ \dorecurse\c_tabl_lines_step{\strut\hfil}%
+ \hskip\scratchskip
+ \fi
+ \fi}
+
+\unexpanded\def\startlinetablerun % to do: quit when nested
+ {\bgroup
+ \settrue\c_tabl_lines_in_table
+ % autowidth
+ \doif{\linetableparameter\c!maxwidth}\v!fit
+ {\setuplinetable[\c!maxwidth=\zeropoint]}%
+ \processaction
+ [\linetableparameter\c!stretch]
+ [ \v!no=>{\setuplinetable[\c!stretch=\maxdimen]},% no stretch
+ \v!yes=>{\setuplinetable[\c!stretch=\zeropoint]}]% max stretch
+ \c_tabl_lines_repeat\linetableparameter\c!nleft
+ \c_tabl_lines_split_state % =
+ \ifdim\linetableparameter\c!maxwidth>\zeropoint
+ \zerocount \else \plusone
+ \fi
+ % optional prevdepth correction
+ \ifconditional\c_tabl_lines_preroll
+ \global\c_tabl_lines_n_of_rows\zerocount
+ \else
+ \linetableparameter\c!before
+ \fi
+ \global\c_tabl_lines_rows\zerocount
+ \global\c_tabl_lines_n_of_columns\zerocount
+ \global\c_tabl_lines_n_of_parts\zerocount
+ \scratchcounter\zerocount
+ \def\docommand##1%
+ {\global\advance\c_tabl_lines_n_of_parts\plusone
+ \advance\scratchcounter##1%
+ \setxvalue{\??linetablepart\number\c_tabl_lines_n_of_parts}{\the\scratchcounter}}%
+ \processcommacommand[\linetableparameter\c!n]\docommand
+ \initializetableboxes\c_tabl_lines_n_of_parts
+ \global\c_tabl_lines_part\ifcase\c_tabl_lines_repeat\plusone\else\zerocount\fi % repeater
+ \global\c_tabl_lines_step\plusone
+ \global\c_tabl_lines_line\zerocount
+ \global\c_tabl_lines_row \zerocount
+ \global\c_tabl_lines_column\zerocount
+ \global\c_tabl_lines_subcol\zerocount
+ \global\d_tabl_lines_width\zeropoint
+ \ifconditional\c_tabl_lines_preroll \else \ifdim\pagetotal>\zeropoint
+ \verticalstrut\kern-\struttotal
+ \fi \fi
+ \tabl_lines_set
+ \tabl_lines_check_page
+ \let\BR\tabl_lines_BR
+ \let\ER\tabl_lines_ER
+ \let\BH\tabl_lines_BR
+ \let\EH\tabl_lines_ER
+ \let\BC\tabl_lines_BC
+ \let\EC\tabl_lines_EC
+ \let\NC\tabl_lines_NC
+ \let\NR\tabl_lines_NR
+ \tabl_lines_flush_head}
+
+\unexpanded\def\stoplinetablerun
+ {\global\c_tabl_lines_line\maxcard
+ \c_tabl_lines_head_state\zerocount % blocked
+ \tabl_lines_flush_parts
+ \ifconditional\c_tabl_lines_preroll \else
+ \linetableparameter\c!after
+ \fi
+ \global\c_tabl_lines_part\zerocount
+ \global\c_tabl_lines_n_of_parts\zerocount
+ \egroup}
+
+\def\checklinecolumndimension#1#2#3%
+ {\expandafter\xdef\csname#1\number#3\endcsname
+ {\expandafter\ifx\csname#1\number#3\endcsname\relax
+ \the#2\b_tabl_lines_cell
+ \else\ifdim\csname#1\number#3\endcsname<#2\b_tabl_lines_cell
+ \the#2\b_tabl_lines_cell
+ \else
+ \csname#1\number#3\endcsname
+ \fi\fi}}
+
+\def\tabl_lines_check_width {\checklinecolumndimension\??linetablewidth \wd\c_tabl_lines_column}
+\def\tabl_lines_check_height{\checklinecolumndimension\??linetableheight\ht\c_tabl_lines_row}
+\def\tabl_lines_check_depth {\checklinecolumndimension\??linetabledepth \dp\c_tabl_lines_row}
+
+\unexpanded\def\tabl_lines_BR
+ {\dosingleempty\tabl_lines_BR_indeed}
+
+\def\tabl_lines_BR_indeed[#1]% #1 not yet implemented
+ {\ifnum\c_tabl_lines_head_state=1\else
+ \global\advance\c_tabl_lines_row\plusone
+ \global\advance\c_tabl_lines_rows\plusone
+ \fi
+ \global\c_tabl_lines_column\plusone
+ \global\c_tabl_lines_subcol\plusone
+ \d_tabl_lines_height\zeropoint
+ \edef\p_height{\linetablerparameter\c!height}%
+ \ifx\p_height\empty
+ \c_tabl_lines_hmode \zerocount
+ \else\ifx\p_height\v!fit
+ \c_tabl_lines_hmode \plusone
+ \else\ifx\p_height\v!line
+ \c_tabl_lines_hmode \plustwo
+ \else
+ \d_tabl_lines_height\dimexpr\p_height-\strutdepth\relax
+ \fi\fi\fi
+ \tabl_lines_start_part}
+
+\unexpanded\def\tabl_lines_BC
+ {\startlinetablecell}
+
+\unexpanded\def\tabl_lines_EC
+ {\stoplinetablecell
+ \ifconditional\c_tabl_lines_preroll
+ \tabl_lines_check_width
+ \tabl_lines_check_height
+ \tabl_lines_check_depth
+ \fi
+ \tabl_lines_check_part}
+
+\unexpanded\def\tabl_lines_ER
+ {% \stoplinetablecell
+ % no \box\b_tabl_lines_cell, i.e. dummy columnn, last \NC \NR
+ \tabl_lines_stop_part
+ \tabl_lines_save_part
+ \advance\c_tabl_lines_column \minusone
+ \ifnum\c_tabl_lines_column>\c_tabl_lines_n_of_columns
+ \global\c_tabl_lines_n_of_columns\c_tabl_lines_column
+ \fi
+ \tabl_lines_flush_parts
+ \global\c_tabl_lines_column\zerocount
+ \global\d_tabl_lines_width \zeropoint
+ \ifcase\c_tabl_lines_repeat
+ \global\c_tabl_lines_part\plusone
+ \else
+ \global\c_tabl_lines_part\zerocount % repeater
+ \fi
+ \tabl_lines_check_page
+ \tabl_lines_flush_head}
+
+\def\tabl_lines_check_page
+ {\global\c_tabl_lines_page\zerocount
+ \ifcase\c_tabl_lines_repeat \else \ifcase\c_tabl_lines_page
+ \doif{\linetableparameter\c!repeat}\v!no
+ {\global\c_tabl_lines_page\doifelseoddpage\plusone\plustwo}%
+ \fi \fi}
+
+\def\tabl_lines_flush_head
+ {\ifcase\c_tabl_lines_head_state
+ % 0 blocked
+ \or
+ % 1 doing head
+ \or
+ % 2 head done
+ \or
+ % 3 trigger flush
+ \c_tabl_lines_head_state\plusone
+ \the\t_tabl_lines_head\relax
+ \c_tabl_lines_head_state\plustwo
+ \fi}
+
+\unexpanded\def\tabl_lines_NC % first time special treatment
+ {\relax
+ \ifcase\c_tabl_lines_column
+ \tabl_lines_BR
+ \else
+ \tabl_lines_EC
+ \fi
+ \tabl_lines_BC} % beware, this will result in BR BC EC BC NR
+
+\unexpanded\def\tabl_lines_NR
+ {\stoplinetablecell % dummy
+ \tabl_lines_ER}
+
+\unexpanded\def\startlinetable
+ {\startlinetablerun}
+
+\unexpanded\def\stoplinetable
+ {\stoplinetablerun}
+
+\unexpanded\def\startlinetableanalysis
+ {\bgroup
+ \settrue\c_tabl_lines_preroll
+ \settrialtypesetting
+ \startlinetablerun}
+
+% \unexpanded\def\stoplinetableanalysis
+% {\stoplinetablerun
+% \egroup
+% \global\c_tabl_lines_n_of_rows\c_tabl_lines_rows
+% \dorecurse\c_tabl_lines_n_of_rows % global, from last run {\linetableparameter\c!n}
+% {\setevalue{\??linetable r:\recurselevel x\c!height}{\getvalue{\??linetableheight\recurselevel}}%
+% \setevalue{\??linetable r:\recurselevel x\c!depth }{\getvalue{\??linetabledepth \recurselevel}}%
+% \letgvalue{\??linetableheight\recurselevel}\!!zeropoint
+% \letgvalue{\??linetabledepth \recurselevel}\!!zeropoint}
+% \dorecurse\c_tabl_lines_n_of_columns % global, from last run {\linetableparameter\c!n}
+% {\setevalue{\??linetable c:\recurselevel\c!width}{\getvalue{\??linetablewidth\recurselevel}}%
+% \letgvalue{\??linetablewidth\recurselevel}\!!zeropoint}} % init next table
+
+\unexpanded\def\stoplinetableanalysis
+ {\stoplinetablerun
+ \egroup
+ \global\c_tabl_lines_n_of_rows\c_tabl_lines_rows
+ \dorecurse\c_tabl_lines_n_of_rows % global, from last run {\linetableparameter\c!n}
+ {\setevalue{\??linetable r:##1x\c!height}{\csname\??linetableheight##1\endcsname}%
+ \setevalue{\??linetable r:##1x\c!depth }{\csname\??linetabledepth ##1\endcsname}%
+ \letgvalue{\??linetableheight##1}\zeropoint
+ \letgvalue{\??linetabledepth ##1}\zeropoint}
+ \dorecurse\c_tabl_lines_n_of_columns % global, from last run {\linetableparameter\c!n}
+ {\setevalue{\??linetable c:##1\c!width}{\csname\??linetablewidth##1\endcsname}%
+ \letgvalue{\??linetablewidth##1}\zeropoint}} % init next table
+
+% todo: store in box instead of macro
+
+\let\stoplinetablehead\relax
+
+\unexpanded\def\startlinetablehead#1\stoplinetablehead
+ {\ifconditional\c_tabl_lines_in_table
+ \t_tabl_lines_head\emptytoks
+ \fi
+ \c_tabl_lines_head_state\plusthree % full
+ \t_tabl_lines_head{#1}%
+ \ifconditional\c_tabl_lines_in_table
+ \tabl_lines_flush_head
+ \fi}
+
+\unexpanded\def\tabl_lines_BH
+ {\ifx\EC\relax
+ % signal, grabbing lines
+ \else
+ \t_tabl_lines_head\emptytoks
+ \fi
+ \pushmacro\BC
+ \pushmacro\EC
+ \def\BC##1\EC{\appendtoks##1\to\t_tabl_lines_head}%
+ \let\EC\relax} % signal
+
+\unexpanded\def\tabl_lines_EH
+ {\popmacro\EC
+ \popmacro\BC
+ \expandafter\startlinetablehead\the\t_tabl_lines_head\stoplinetablehead}
+
+\let\startlinetablebody\relax
+\let\stoplinetablebody \relax
+
+\unexpanded\def\processlinetablebuffer
+ {\dosingleempty\tabl_lines_process_buffer}
+
+\def\tabl_lines_process_buffer[#1]%
+ {\bgroup
+ \let\startlinetable\relax
+ \let\stoplinetable \relax
+ \startlinetableanalysis\getbuffer[#1]\stoplinetableanalysis
+ \startlinetablerun \getbuffer[#1]\stoplinetablerun
+ \egroup}
+
+\unexpanded\def\processlinetablefile
+ {\dosingleempty\tabl_lines_process_file}
+
+\def\tabl_lines_process_file#1% maybe accept #1 as well as [#1]
+ {\bgroup
+ \let\startlinetable\relax
+ \let\stoplinetable \relax
+ \startlinetableanalysis\readfile{#1}\donothing\donothing\stoplinetableanalysis
+ \startlinetablerun \readfile{#1}\donothing\donothing\stoplinetablerun
+ \egroup}
+
+\protect
+
+\continueifinputfile{tabl-ltb.mkiv}
+
+\setuplinetable[n=6,m={2,2,2},lines=25] % m ?
+
+\setuplinetable[c][1] [width=2cm,background=color,backgroundcolor=red]
+\setuplinetable[c][4] [width=3cm,background=color,backgroundcolor=yellow]
+\setuplinetable[c][6] [width=3cm,background=color,backgroundcolor=magenta]
+\setuplinetable[r][odd] [background=color,backgroundcolor=gray]
+\setuplinetable[r][even][background=color,backgroundcolor=green]
+
+\starttext
+
+\showframe \showstruts
+
+\setupcolors[state=start]
+
+\setuppagenumbering[alternative=doublesided]\page[left]
+
+\startlinetable
+\NC aaa\crlf aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR
+\dorecurse{100}{\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR}
+\stoplinetable
+
+\startlinetable
+\NC[style=slanted,color=green,background=color,backgroundcolor=darkred,nx=2,uitlijnen=middle] xxx
+ \NC yy \NC ddddd \NC eeee \NC ff \NC \NR
+\dorecurse{100}{\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR}
+\stoplinetable
+
+% \startbuffer[lt]
+% \NC aaa\crlf aaa \NC bb \NC c \NC ddddd \NC ee \NC ff \NC \NR
+% \NC aaa\crlf aaa \NC b \NC cc \NC ddd \NC eeee \NC f \NC \NR
+% \stopbuffer
+%
+% \processlinetablebuffer[lt]
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/tabl-mis.mkiv b/Master/texmf-dist/tex/context/base/mkiv/tabl-mis.mkiv
index 9a0f13853ac..8db31b31d7a 100644
--- a/Master/texmf-dist/tex/context/base/tabl-mis.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-mis.mkiv
@@ -134,7 +134,8 @@
\def\typo_paragraphs_setup[#1][#2][#3]% we are downward compatible with [each] and [1,3]
{\ifthirdargument
\doifelse{#2}\v!each
- {\typo_paragraphs_setup_saved[#1][#3]}
+ {\dorecurse{\namedparagraphsparameter{#1}\c!n}%
+ {\normalexpanded{\typo_paragraphs_setup_saved[#1:\recurselevel]}[#3]}}%
{\def\typo_paragraphs_setup_step##1{\typo_paragraphs_setup_saved[#1:##1][#3]}%
\processcommalist[#2]\typo_paragraphs_setup_step}%
\else\ifsecondargument
@@ -273,7 +274,7 @@
\fi
\paragraphsparameter\c!bottom
\egroup % (2)
- \dontleavehmode\hbox{\raise\strutheight\box\scratchbox}%
+ \dontleavehmode\hpack{\raise\strutheight\box\scratchbox}%
\endgroup}
\def\typo_paragraphs_separator
diff --git a/Master/texmf-dist/tex/context/base/tabl-ntb.mkiv b/Master/texmf-dist/tex/context/base/mkiv/tabl-ntb.mkiv
index fcf8ac31231..78e867546b4 100644
--- a/Master/texmf-dist/tex/context/base/tabl-ntb.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-ntb.mkiv
@@ -290,9 +290,9 @@
\def\tabl_ntb_let_dis#1{\global\expandafter\let\csname\??naturaltabledis\m_tabl_tbl_level:\number#1\endcsname} % {#2} global !
\def\tabl_ntb_let_aut#1{\global\expandafter\let\csname\??naturaltableaut\m_tabl_tbl_level:\number#1\endcsname} % {#2} global !
-\def\tabl_ntb_get_wid#1{\ifcsname\??naturaltablewid\m_tabl_tbl_level:\number#1\endcsname\csname\??naturaltablewid\m_tabl_tbl_level:\number#1\endcsname\else\zeropoint\fi}
-\def\tabl_ntb_get_hei#1{\ifcsname\??naturaltablehei\m_tabl_tbl_level:\number#1\endcsname\csname\??naturaltablehei\m_tabl_tbl_level:\number#1\endcsname\else\zeropoint\fi}
-\def\tabl_ntb_get_dis#1{\ifcsname\??naturaltabledis\m_tabl_tbl_level:\number#1\endcsname\csname\??naturaltabledis\m_tabl_tbl_level:\number#1\endcsname\else\zeropoint\fi}
+\def\tabl_ntb_get_wid#1{\ifcsname\??naturaltablewid\m_tabl_tbl_level:\number#1\endcsname\lastnamedcs\else\zeropoint\fi}
+\def\tabl_ntb_get_hei#1{\ifcsname\??naturaltablehei\m_tabl_tbl_level:\number#1\endcsname\lastnamedcs\else\zeropoint\fi}
+\def\tabl_ntb_get_dis#1{\ifcsname\??naturaltabledis\m_tabl_tbl_level:\number#1\endcsname\lastnamedcs\else\zeropoint\fi}
\def\tabl_ntb_get_aut#1{\csname \??naturaltableaut\m_tabl_tbl_level:\number#1\endcsname}
\def\tabl_ntb_tag_pattern#1#2{\??naturaltabletag\m_tabl_tbl_level:\number#1:\number#2}
@@ -320,7 +320,8 @@
\def\tabl_ntb_let_ref #1#2{\expandafter\glet\csname\??naturaltableref\m_tabl_tbl_level:\number#1:\number#2\endcsname}
\def\tabl_ntb_set_ref #1#2{\expandafter\xdef\csname\??naturaltableref\m_tabl_tbl_level:\number#1:\number#2\endcsname}
-\def\tabl_ntb_get_ref #1#2{\ifcsname\??naturaltableref\m_tabl_tbl_level:\number#1:\number#2\endcsname\csname\??naturaltableref\m_tabl_tbl_level:\number#1:\number#2\endcsname\fi}
+%def\tabl_ntb_get_ref #1#2{\ifcsname\??naturaltableref\m_tabl_tbl_level:\number#1:\number#2\endcsname\csname\??naturaltableref\m_tabl_tbl_level:\number#1:\number#2\endcsname\fi}
+\def\tabl_ntb_get_ref #1#2{\begincsname\??naturaltableref\m_tabl_tbl_level:\number#1:\number#2\endcsname}
\def\tabl_ntb_set_spn #1{\expandafter\let\csname\??naturaltablespn\m_tabl_tbl_level:\number#1\endcsname \!!plusone}
\def\tabl_ntb_spn_doifelse#1{\ifcase0\csname\??naturaltablespn\m_tabl_tbl_level:\number#1\endcsname\relax % could be inlined
@@ -404,8 +405,11 @@
\installcorenamespace{naturaltablesetupthree}
\installcorenamespace{naturaltablesetuptwo}
-\def\tabl_ntb_setup_three[#1]{\csname\??naturaltablesetupthree\ifcsname\??naturaltablesetupthree#1\endcsname#1\else\s!unknown\fi\endcsname[#1]}
-\def\tabl_ntb_setup_two [#1]{\csname\??naturaltablesetuptwo \ifcsname\??naturaltablesetuptwo #1\endcsname#1\else\s!unknown\fi\endcsname[#1]}
+%def\tabl_ntb_setup_three[#1]{\csname\??naturaltablesetupthree\ifcsname\??naturaltablesetupthree#1\endcsname#1\else\s!unknown\fi\endcsname[#1]}
+%def\tabl_ntb_setup_two [#1]{\csname\??naturaltablesetuptwo \ifcsname\??naturaltablesetuptwo #1\endcsname#1\else\s!unknown\fi\endcsname[#1]}
+
+\def\tabl_ntb_setup_three[#1]{\ifcsname\??naturaltablesetupthree#1\endcsname\expandafter\lastnamedcs\else\expandafter\tabl_ntb_setup_un\fi[#1]}
+\def\tabl_ntb_setup_two [#1]{\ifcsname\??naturaltablesetuptwo #1\endcsname\expandafter\lastnamedcs\else\expandafter\tabl_ntb_setup_ux\fi[#1]}
\setvalue{\??naturaltablesetupthree \v!row}[#1]{\tabl_ntb_setup_xy [\c!y]}
\setvalue{\??naturaltablesetupthree \v!column}[#1]{\tabl_ntb_setup_xy [\c!x]}
@@ -435,7 +439,7 @@
\ifcsname\??naturaltableset\m_tabl_tbl_level:#1\endcsname
\def\tabl_ntb_parameters_get[##1]%
{\setvalue{\??naturaltableset\m_tabl_tbl_level:#1}{\tabl_ntb_parameters_get[##1,#2]}}%
- \getvalue{\??naturaltableset\m_tabl_tbl_level:#1}%
+ \csname\??naturaltableset\m_tabl_tbl_level:#1\endcsname
\let\tabl_ntb_parameters_get\setupcurrentnaturaltablelocal
\else
\setvalue{\??naturaltableset\m_tabl_tbl_level:#1}{\tabl_ntb_parameters_get[#2]}%
@@ -515,78 +519,78 @@
% saves tokens (no speed gain)
\edef\m_tabl_ntb_prefix{\??naturaltableset\m_tabl_tbl_level:}%
% each each
- \csname\m_tabl_ntb_prefix\c!x\v!each\c!y\v!each\endcsname
- \csname\m_tabl_ntb_prefix\c!y\v!each\endcsname
- \csname\m_tabl_ntb_prefix\c!x\v!each\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!x\v!each\c!y\v!each\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!y\v!each\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!x\v!each\endcsname
% odd even
- \csname\m_tabl_ntb_prefix\c!y\v!oddeven\m_tabl_ntb_positive_row\endcsname
- \csname\m_tabl_ntb_prefix\c!x\v!oddeven\m_tabl_ntb_positive_col\endcsname
- \csname\m_tabl_ntb_prefix\c!x\v!oddeven\m_tabl_ntb_positive_col\c!y\v!oddeven\m_tabl_ntb_positive_row\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!y\v!oddeven\m_tabl_ntb_positive_row\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!x\v!oddeven\m_tabl_ntb_positive_col\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!x\v!oddeven\m_tabl_ntb_positive_col\c!y\v!oddeven\m_tabl_ntb_positive_row\endcsname
% row/col number combinations
- \ifcsname\m_tabl_ntb_prefix\c!y\m_tabl_ntb_positive_row\endcsname\csname\m_tabl_ntb_prefix\c!y\m_tabl_ntb_positive_row\endcsname\fi
- \ifcsname\m_tabl_ntb_prefix\c!y\m_tabl_ntb_negative_row\endcsname\csname\m_tabl_ntb_prefix\c!y\m_tabl_ntb_negative_row\endcsname\fi
+ \begincsname\m_tabl_ntb_prefix\c!y\m_tabl_ntb_positive_row\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!y\m_tabl_ntb_negative_row\endcsname
\naturaltablelocalparameter\c!extras
\letnaturaltablelocalparameter\c!extras\relax % new, see x-fo
- \ifcsname\m_tabl_ntb_prefix\c!x\m_tabl_ntb_positive_col\endcsname\csname\m_tabl_ntb_prefix\c!x\m_tabl_ntb_positive_col\endcsname\fi
- \ifcsname\m_tabl_ntb_prefix\c!x\m_tabl_ntb_negative_col\endcsname\csname\m_tabl_ntb_prefix\c!x\m_tabl_ntb_negative_col\endcsname\fi
+ \begincsname\m_tabl_ntb_prefix\c!x\m_tabl_ntb_positive_col\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!x\m_tabl_ntb_negative_col\endcsname
\naturaltablelocalparameter\c!extras
\letnaturaltablelocalparameter\c!extras\relax % new, see x-fo
% first/last combinations
\ifnum\m_tabl_ntb_positive_row=\plusone
- \csname\m_tabl_ntb_prefix\c!y\v!first\endcsname
- \ifcsname\m_tabl_ntb_prefix\c!x\m_tabl_ntb_positive_col\c!y\v!first\endcsname\csname\m_tabl_ntb_prefix\c!x\m_tabl_ntb_positive_col\c!y\v!first\endcsname\fi
+ \begincsname\m_tabl_ntb_prefix\c!y\v!first\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!x\m_tabl_ntb_positive_col\c!y\v!first\endcsname
\fi
\ifnum\m_tabl_ntb_positive_col=\plusone
- \csname\m_tabl_ntb_prefix\c!x\v!first\endcsname
- \ifcsname\m_tabl_ntb_prefix\c!x\v!first\c!y\m_tabl_ntb_positive_row\endcsname\csname\m_tabl_ntb_prefix\c!x\v!first\c!y\m_tabl_ntb_positive_row\endcsname\fi
+ \begincsname\m_tabl_ntb_prefix\c!x\v!first\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!x\v!first\c!y\m_tabl_ntb_positive_row\endcsname
\fi
\ifnum\m_tabl_ntb_positive_row=\c_tabl_ntb_maximum_row\relax
- \csname\m_tabl_ntb_prefix\c!y\v!last\endcsname
- \ifcsname\m_tabl_ntb_prefix\c!x\m_tabl_ntb_positive_col\c!y\v!last\endcsname\csname\m_tabl_ntb_prefix\c!x\m_tabl_ntb_positive_col\c!y\v!last\endcsname\fi
+ \begincsname\m_tabl_ntb_prefix\c!y\v!last\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!x\m_tabl_ntb_positive_col\c!y\v!last\endcsname
\fi
\ifnum\m_tabl_ntb_positive_col=\c_tabl_ntb_maximum_col\relax
- \csname\m_tabl_ntb_prefix\c!x\v!last\endcsname
- \ifcsname\m_tabl_ntb_prefix\c!x\v!last\c!y\m_tabl_ntb_positive_row\endcsname\csname\m_tabl_ntb_prefix\c!x\v!last\c!y\m_tabl_ntb_positive_row\endcsname\fi
+ \begincsname\m_tabl_ntb_prefix\c!x\v!last\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!x\v!last\c!y\m_tabl_ntb_positive_row\endcsname
\fi
\ifnum\m_tabl_ntb_positive_row=\c_tabl_ntb_maximum_row\relax \ifnum\m_tabl_ntb_positive_col=\c_tabl_ntb_maximum_col\relax
- \csname\m_tabl_ntb_prefix\c!x\v!last\c!y\v!last\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!x\v!last\c!y\v!last\endcsname
\fi\fi
\ifnum\m_tabl_ntb_positive_row=\plusone \ifnum\m_tabl_ntb_positive_col=\plusone
- \csname\m_tabl_ntb_prefix\c!x\v!first\c!y\v!first\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!x\v!first\c!y\v!first\endcsname
\fi\fi
\ifnum\m_tabl_ntb_positive_row=\plusone \ifnum\m_tabl_ntb_positive_col=\c_tabl_ntb_maximum_col\relax
- \csname\m_tabl_ntb_prefix\c!x\v!last\c!y\v!first\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!x\v!last\c!y\v!first\endcsname
\fi\fi
\ifnum\m_tabl_ntb_positive_row=\c_tabl_ntb_maximum_row\relax \ifnum\m_tabl_ntb_positive_col=\plusone
- \csname\m_tabl_ntb_prefix\c!x\v!first\c!y\v!last\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!x\v!first\c!y\v!last\endcsname
\fi\fi
% special case: two rows and last row : two&first and two&last (round corners)
\ifnum\c_tabl_ntb_maximum_row=\plustwo\relax
\ifnum\m_tabl_ntb_positive_row=\c_tabl_ntb_maximum_row\relax \ifnum\m_tabl_ntb_positive_col=\plusone
- \csname\m_tabl_ntb_prefix\c!x\v!first\c!y\v!two\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!x\v!first\c!y\v!two\endcsname
\fi\fi
\ifnum\m_tabl_ntb_positive_row=\c_tabl_ntb_maximum_row\relax \ifnum\m_tabl_ntb_positive_col=\c_tabl_ntb_maximum_col\relax
- \csname\m_tabl_ntb_prefix\c!x\v!last\c!y\v!two\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!x\v!last\c!y\v!two\endcsname
\fi\fi
\fi
\ifnum\tabl_ntb_get_col\m_tabl_ntb_positive_row\m_tabl_ntb_positive_col=\c_tabl_ntb_maximum_col\relax % top span over whole width
\ifnum\m_tabl_ntb_positive_row=\plusone
- \csname\m_tabl_ntb_prefix\c!x\v!one\c!y\v!first\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!x\v!one\c!y\v!first\endcsname
\fi
\ifnum\m_tabl_ntb_positive_row=\c_tabl_ntb_maximum_row\relax
- \csname\m_tabl_ntb_prefix\c!x\v!one\c!y\v!last\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!x\v!one\c!y\v!last\endcsname
\fi
\fi
% header things
\ifnum#1>\c_tabl_ntb_n_of_hdnx_lines\else
- \ifcsname\m_tabl_ntb_prefix\v!header\v!each \endcsname\csname\m_tabl_ntb_prefix\v!header\v!each \endcsname\fi
- \ifcsname\m_tabl_ntb_prefix\v!header\m_tabl_ntb_positive_col\endcsname\csname\m_tabl_ntb_prefix\v!header\m_tabl_ntb_positive_col\endcsname\fi
+ \begincsname\m_tabl_ntb_prefix\v!header\v!each\endcsname
+ \begincsname\m_tabl_ntb_prefix\v!header\m_tabl_ntb_positive_col\endcsname
\fi
% explicit cells
- \ifcsname\m_tabl_ntb_prefix\c!x\m_tabl_ntb_positive_col\c!y\m_tabl_ntb_positive_row\endcsname\csname\m_tabl_ntb_prefix\c!x\m_tabl_ntb_positive_col\c!y\m_tabl_ntb_positive_row\endcsname\fi
- \ifcsname\m_tabl_ntb_prefix\c!x\m_tabl_ntb_negative_col\c!y\m_tabl_ntb_negative_row\endcsname\csname\m_tabl_ntb_prefix\c!x\m_tabl_ntb_negative_col\c!y\m_tabl_ntb_negative_row\endcsname\fi
+ \begincsname\m_tabl_ntb_prefix\c!x\m_tabl_ntb_positive_col\c!y\m_tabl_ntb_positive_row\endcsname
+ \begincsname\m_tabl_ntb_prefix\c!x\m_tabl_ntb_negative_col\c!y\m_tabl_ntb_negative_row\endcsname
% local
- \ifcsname\m_tabl_ntb_prefix\c!y++\m_tabl_ntb_positive_row\endcsname\csname\m_tabl_ntb_prefix\c!y++\m_tabl_ntb_positive_row\endcsname\fi
+ \begincsname\m_tabl_ntb_prefix\c!y++\m_tabl_ntb_positive_row\endcsname
% done
\relax}
@@ -873,15 +877,9 @@
\let\tabl_ntb_setup_section\relax}
\def\tabl_ntb_preset_parameters% each odd|even level / can be sped up but only once per table
- {\ifcsname\??naturaltableset\m_tabl_tbl_level:\v!start\v!each\endcsname
- \csname\??naturaltableset\m_tabl_tbl_level:\v!start\v!each\endcsname
- \fi
- \ifcsname\??naturaltableset\m_tabl_tbl_level:\v!start\v!oddeven\m_tabl_tbl_level\endcsname % hm
- \csname\??naturaltableset\m_tabl_tbl_level:\v!start\v!oddeven\m_tabl_tbl_level\endcsname
- \fi
- \ifcsname\??naturaltableset\m_tabl_tbl_level:\v!start\m_tabl_tbl_level\endcsname % hm
- \csname\??naturaltableset\m_tabl_tbl_level:\v!start\m_tabl_tbl_level\endcsname
- \fi}
+ {\begincsname\??naturaltableset\m_tabl_tbl_level:\v!start\v!each\endcsname
+ \begincsname\??naturaltableset\m_tabl_tbl_level:\v!start\v!oddeven\m_tabl_tbl_level\endcsname
+ \begincsname\??naturaltableset\m_tabl_tbl_level:\v!start\m_tabl_tbl_level\endcsname}
\unexpanded\def\bTABLE
{\dosingleempty\tabl_ntb_table}
@@ -1812,10 +1810,23 @@
%
% nilling the background makes a run upto 25% faster
+% \def\tabl_ntb_cell_process_a_check_span_one
+% {\ifautosqueezeTBLspan
+% \edef\p_width{\naturaltablelocalparameter\c!width}%
+% \csname\??naturaltablesqueeze\ifcsname\??naturaltablesqueeze\p_width\endcsname\p_width\fi\endcsname
+% \else
+% \donetrue
+% \fi
+% \ifdone % brr, 0
+% \ifnum\scratchcounter>\plusone
+% \tabl_ntb_set_spn\c_tabl_ntb_col
+% \fi
+% \fi}
+
\def\tabl_ntb_cell_process_a_check_span_one
{\ifautosqueezeTBLspan
\edef\p_width{\naturaltablelocalparameter\c!width}%
- \csname\??naturaltablesqueeze\ifcsname\??naturaltablesqueeze\p_width\endcsname\p_width\fi\endcsname
+ \ifcsname\??naturaltablesqueeze\p_width\endcsname\lastnamedcs\else\donefalse\fi
\else
\donetrue
\fi
@@ -2090,11 +2101,17 @@
\let\eTDs\relax
\let\eTRs\relax
+% \unexpanded\def\bTDs[#1]#2\eTDs
+% {\normalexpanded{\bTD[\ifcsname\??naturaltablesetup#1\endcsname\csname\??naturaltablesetup#1\endcsname\fi]}#2\eTD}
+%
+% \unexpanded\def\bTRs[#1]#2\eTRs
+% {\normalexpanded{\bTR[\ifcsname\??naturaltablesetup#1\endcsname\csname\??naturaltablesetup#1\endcsname\fi]}#2\eTR}
+
\unexpanded\def\bTDs[#1]#2\eTDs
- {\normalexpanded{\bTD[\ifcsname\??naturaltablesetup#1\endcsname\csname\??naturaltablesetup#1\endcsname\fi]}#2\eTD}
+ {\normalexpanded{\bTD[\begincsname\??naturaltablesetup#1\endcsname]}#2\eTD}
\unexpanded\def\bTRs[#1]#2\eTRs
- {\normalexpanded{\bTR[\ifcsname\??naturaltablesetup#1\endcsname\csname\??naturaltablesetup#1\endcsname\fi]}#2\eTR}
+ {\normalexpanded{\bTR[\begincsname\??naturaltablesetup#1\endcsname]}#2\eTR}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/tabl-nte.mkiv b/Master/texmf-dist/tex/context/base/mkiv/tabl-nte.mkiv
index af74a2abe9b..af74a2abe9b 100644
--- a/Master/texmf-dist/tex/context/base/tabl-nte.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-nte.mkiv
diff --git a/Master/texmf-dist/tex/context/base/tabl-pln.mkiv b/Master/texmf-dist/tex/context/base/mkiv/tabl-pln.mkiv
index 3638006c79a..3638006c79a 100644
--- a/Master/texmf-dist/tex/context/base/tabl-pln.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-pln.mkiv
diff --git a/Master/texmf-dist/tex/context/base/tabl-tab.mkiv b/Master/texmf-dist/tex/context/base/mkiv/tabl-tab.mkiv
index 5add1c684a0..e238447b952 100644
--- a/Master/texmf-dist/tex/context/base/tabl-tab.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-tab.mkiv
@@ -12,30 +12,31 @@
\writestatus{loading}{ConTeXt Table Macros / TaBlE Embedding}
-% Todo: consistent namespace and get rid of not used code
-
-% In \MKIV\ the old table macros are sort of obsolete. The color extensions
-% have been removed and some code is stripped. For practical reasons the
-% \TABLE\ macros that are used are embedded in this file.
+% Todo: a bitmore namespace protection ... although we want to keep some of the
+% original flavour.
+%
+% In \MKIV\ the old table macros are sort of obsolete. The color extensions have
+% been removed and some code is stripped. For practical reasons the \TABLE\ macros
+% that are used are embedded in this file.
%
-% The following code is based on TABLE 1.0 by Michael J. Wichura (August 1988.
-% We used a patched version with many overloads and extensions. The documented
-% (and larger) source can be found in \type {thrd-tab.tex}.
+% The following code is based on TABLE 1.0 by Michael J. Wichura (August 1988. We
+% used a patched version with many overloads and extensions. The documented (and
+% larger) source can be found in \type {thrd-tab.tex}.
%
-% Some code has been stripped. Some color has been added. Some macros have
-% been renamed. Registers have been replaces. And probably much more can be
-% cleaned up. We also need to use \tabl_tab_ prefixes here.
+% Some code has been stripped. Some color has been added. Some macros have been
+% renamed. Registers have been replaces. And probably much more can be cleaned up.
+% We also need to use \tabl_tab_ prefixes here.
\unprotect
-\newconditional\tablehasleftspacing
-\newconditional\tablehasrightspacing
+\newconditional\c_tabl_table_spacing_left
+\newconditional\c_tabl_table_spacing_right
-\newdimen\tablelinethicknessunit
-\newdimen\tablestrutunit
-\newskip \tableintercolumnspaceunit
-\newdimen\tablecolumnwidthunit
-\newdimen\tablekernunit
+\newdimen \d_tabl_table_line_thickness_unit
+\newdimen \d_tabl_table_strut_unit
+\newskip \s_tabl_table_inter_column_space_unit
+\newdimen \d_tabl_table_column_width_unit
+\newdimen \d_tabl_table_kern_unit
\def\tablestrutheightfactor {8}
\def\tablestrutdepthfactor {3}
@@ -48,17 +49,17 @@
\newtoks\everytable
\newtoks\everytableparbox
-\unexpanded\def\dotablebeginparbox#1%
+\unexpanded\def\tabl_table_begin_par_box#1%
{\setbox\scratchbox\vtop\bgroup % \setbox added
\hsize#1\relax
\dontcomplain
- \dorestoretablelineskips
+ \tabl_table_restore_lineskips
\normalbaselines
\let~\fixedspace
- \blank[\v!disable]% % added
+ \inhibitblank % \blank[\v!disable]% % added
\the\everytableparbox}
-\unexpanded\def\dotableendparbox
+\unexpanded\def\tabl_table_end_par_box
{\removelastskip % itemize or so
\endgraf
\ifnum\prevgraf>\zerocount % we want at least
@@ -106,8 +107,8 @@
\newif \if!taOnceOnlyTabskip
\def\!thToksEdef#1#2%
- {\edef\!ttemp{#2}%
- #1\expandafter{\!ttemp}%
+ {\edef\tempstring{#2}%
+ #1\expandafter{\tempstring}%
\ignorespaces}
\def\!thLoop#1\repeat
@@ -115,10 +116,10 @@
\!thIterate
\let\!thIterate\relax}
-\def\dobegintableformat
+\def\tabl_table_begin_format
{\!taPreamble\emptytoks
\!taColumnNumber\zerocount
- \scratchskip\tableintercolumnspaceunit
+ \scratchskip\s_tabl_table_inter_column_space_unit
\multiply\scratchskip\tableintercolumnspacefactor
\divide\scratchskip\plustwo
\!taRuleColumnTemplate\expandafter{\expandafter\tabskip\the\scratchskip}%
@@ -131,26 +132,29 @@
\def\!tfSetWidth
{\ifx\!tfRowOfWidths\empty % true if no prior "w" keys
\ifnum\!taColumnNumber>\zerocount % true if "w" key is to right of first "|"
- \begingroup % RowOfWidths={&\omit || n copies of &\omit&\omit}, where n = number of column to the left of this one
- \scratchcounter\plusone
- \aftergroup \edef \aftergroup \!tfRowOfWidths \aftergroup {%
- \aftergroup &\aftergroup \omit
+ \begingroup % RowOfWidths={\aligntab\omit || n copies of \aligntab\omit\aligntab#\omit}, where n = number of column to the left of this one
+ \scratchcounter\plusone
+ \aftergroup\edef
+ \aftergroup\!tfRowOfWidths
+ \aftergroup{%
+ \aftergroup\aligntab
+ \aftergroup\omit
\!thLoop
\ifnum \scratchcounter<\!taColumnNumber
- \advance\scratchcounter\plusone
- \aftergroup \!tfAOAO
+ \advance\scratchcounter\plusone
+ \aftergroup\!tfAOAO
\repeat
\aftergroup}%
\endgroup
\fi
\fi
- \ifx[\!ttemp % \!tgGetValue sets \!ttemp = token after w
+ \ifx[\tempstring % \!tgGetValue sets \tempstring = token after w
\expandafter\!tfSetWidthText
\else
\expandafter\!tfSetWidthValue
\fi}
-\def\!tfAOAO{&\omit&\omit}
+\def\!tfAOAO{\aligntab\omit\aligntab\omit}
\def\!tfSetWidthText[#1]%
{\def\!tfWidthText{#1}%
@@ -159,7 +163,7 @@
\def\!tfSetWidthValue
{\!taMinimumColumnWidth=
\ifnum\!tgCode=\plusone
- \ifx\!tgValue\empty \tablecolumnwidthfactor \else \!tgValue \fi \tablecolumnwidthunit
+ \ifx\!tgValue\empty \tablecolumnwidthfactor \else \!tgValue \fi \d_tabl_table_column_width_unit
\else
\!tgValue
\fi
@@ -168,7 +172,7 @@
\def\!tfSetTabskip
{\ifnum\!tgCode=\plusone
- \scratchskip\tableintercolumnspaceunit
+ \scratchskip\s_tabl_table_inter_column_space_unit
\multiply\scratchskip \ifx\!tgValue\empty\tableintercolumnspacefactor\else\!tgValue\fi
\else
\scratchskip\!tgValue
@@ -190,18 +194,18 @@
{\!thToksEdef\!taRuleColumnTemplate
{\hfil
\vrule
- \noexpand\!!width
+ \noexpand\s!width
\ifnum\!tgCode=\plusone
\ifx\!tgValue\empty
- \tablevrulethicknessfactor
+ \c_tabl_table_vrule_thickness_factor
\else
\!tgValue
\fi
- \tablelinethicknessunit
+ \d_tabl_table_line_thickness_unit
\else
\!tgValue
\fi
- ####%
+ \alignmark\alignmark\alignmark\alignmark
\hfil
\the\!taRuleColumnTemplate}%
\!tfAdjoinPriorColumn}
@@ -223,13 +227,13 @@
\!tfUpdateRowOfWidths
\fi
\!thToksEdef\!taDataColumnTemplate{\the\!taLeftGlue\the\!taDataColumnTemplate\the\!taRightGlue}%
- \!thToksEdef\!taPreamble{\the\!taPreamble&\the\!taDataColumnTemplate&\the\!taRuleColumnTemplate}%
+ \!thToksEdef\!taPreamble{\the\!taPreamble\aligntab\the\!taDataColumnTemplate\aligntab\the\!taRuleColumnTemplate}%
\fi
\advance \!taColumnNumber \plusone
\if!taOnceOnlyTabskip
- \!thToksEdef\!taDataColumnTemplate{####\tabskip \the\!taLastRegularTabskip}%
+ \!thToksEdef\!taDataColumnTemplate{\alignmark\alignmark\alignmark\alignmark\tabskip\the\!taLastRegularTabskip}%
\else
- \!taDataColumnTemplate{##}%
+ \!taDataColumnTemplate{\alignmark\alignmark}%
\fi
\!taRuleColumnTemplate\emptytoks
\!taLeftGlue{\hfil}%
@@ -245,12 +249,12 @@
\fi
\edef\!tfRowOfWidths
{\!tfRowOfWidths
- &%
+ \aligntab
\omit
\ifdim \!taMinimumColumnWidth>\zeropoint
\hskip \the\!taMinimumColumnWidth
\fi
- &
+ \aligntab
\omit}}
\def\!tfComputeMinColWidth
@@ -261,27 +265,32 @@
\!taMinimumColumnWidth=\wd0 }
\def\!tfFinishFormat
- {\!thToksEdef\!taPreamble{####\tabskip\tablelefttabskip&\the\!taPreamble \tabskip\tablerighttabskip&####\tabskip\zeropoint\cr}
+ {\!thToksEdef\!taPreamble{%
+ \alignmark\alignmark\alignmark\alignmark\tabskip\tablelefttabskip
+ \aligntab
+ \the\!taPreamble\tabskip\tablerighttabskip
+ \aligntab
+ \alignmark\alignmark\alignmark\alignmark\tabskip\zeropoint\cr}
\!taBeginFormatfalse
\!ttDoHalign}
-\def\dotablereformat[#1]% will become local
+\def\tabl_table_reformat[#1]% will become local
{\omit
- \!taDataColumnTemplate{##}%
+ \!taDataColumnTemplate{\alignmark\alignmark}%
\!taLeftGlue\emptytoks
\!taRightGlue\emptytoks
\begingroup
- \@@useotherbar
- \expanded{\endgroup\noexpand\doreadtableformatkeys#1]}}% appear in a \dotablereformat cmd; this is here as a safeguard.
+ \tabl_table_use_bar
+ \expanded{\endgroup\noexpand\doreadtableformatkeys#1]}}% appear in a \tabl_table_reformat cmd; this is here as a safeguard.
\appendtoks
- \let\ReFormat\dotablereformat
+ \let\ReFormat\tabl_table_reformat
\to \everytable
\def\!tfEndReFormat
{\!tfReFormat}
-\appendtoks \dotableparalignment \to \everytableparbox
+\appendtoks \tabl_table_paralignment \to \everytableparbox
\def\!tfReFormat#1%
{\the \!taLeftGlue
@@ -291,10 +300,10 @@
\def\!tgGetValue#1%
{\def\!tgReturn{#1}%
- \futurelet\!ttemp\!tgCheckForParen}
+ \futurelet\tempstring\!tgCheckForParen}
\def\!tgCheckForParen%
- {\ifx\!ttemp (%
+ {\ifx\tempstring (%
\expandafter \!tgDoParen
\else
\expandafter \!tgCheckForSpace
@@ -308,7 +317,7 @@
\def\!tgCheckForSpace
{\def\!tgCode{1}%
\let\!tgValue\empty
- \ifx\!ttemp\!thSpaceToken
+ \ifx\tempstring\!thSpaceToken
\expandafter \!tgReturn
\else
\expandafter \!tgCheckForDigit
@@ -316,16 +325,16 @@
% \def\!tgCheckForDigit
% {\donefalse
-% \ifx 0\!ttemp \donetrue
-% \else\ifx 1\!ttemp \donetrue
-% \else\ifx 2\!ttemp \donetrue
-% \else\ifx 3\!ttemp \donetrue
-% \else\ifx 4\!ttemp \donetrue
-% \else\ifx 5\!ttemp \donetrue
-% \else\ifx 6\!ttemp \donetrue
-% \else\ifx 7\!ttemp \donetrue
-% \else\ifx 8\!ttemp \donetrue
-% \else\ifx 9\!ttemp \donetrue
+% \ifx 0\tempstring \donetrue
+% \else\ifx 1\tempstring \donetrue
+% \else\ifx 2\tempstring \donetrue
+% \else\ifx 3\tempstring \donetrue
+% \else\ifx 4\tempstring \donetrue
+% \else\ifx 5\tempstring \donetrue
+% \else\ifx 6\tempstring \donetrue
+% \else\ifx 7\tempstring \donetrue
+% \else\ifx 8\tempstring \donetrue
+% \else\ifx 9\tempstring \donetrue
% \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
% \ifdone
% \expandafter \!tgGetNumber
@@ -333,13 +342,13 @@
% \expandafter \!tgReturn
% \fi}
-\def\!tgCheckForDigit % less tokens:
+\def\!tgCheckForDigit % less tokens: (could be an ifcsname)
{\donetrue
- \ifx 0\!ttemp \else \ifx 1\!ttemp \else
- \ifx 2\!ttemp \else \ifx 3\!ttemp \else
- \ifx 4\!ttemp \else \ifx 5\!ttemp \else
- \ifx 6\!ttemp \else \ifx 7\!ttemp \else
- \ifx 8\!ttemp \else \ifx 9\!ttemp \else
+ \ifx 0\tempstring \else \ifx 1\tempstring \else
+ \ifx 2\tempstring \else \ifx 3\tempstring \else
+ \ifx 4\tempstring \else \ifx 5\tempstring \else
+ \ifx 6\tempstring \else \ifx 7\tempstring \else
+ \ifx 8\tempstring \else \ifx 9\tempstring \else
\donefalse
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\ifdone
@@ -349,7 +358,7 @@
\fi}
% \def\!tgCheckForDigit % does not work
-% {\relax\doifnumberelse\!ttemp\!tgGetNumber\!tgReturn}
+% {\relax\doifnumberelse\tempstring\!tgGetNumber\!tgReturn}
\def\!tgGetNumber {\afterassignment\!tgGetNumberA\scratchcounter=}
\def\!tgGetNumberA{\edef\!tgValue{\the\scratchcounter}\!tgReturn}
@@ -357,21 +366,21 @@
\def\!tgSetUpParBox
{\normalexpanded
{\noexpand \doreadtableformatkeys
- b{\dotablebeginparbox
+ b{\tabl_table_begin_par_box
{\ifnum\!tgCode=\plusone
\ifx\!tgValue\empty
\tablecolumnwidthfactor
\else
\!tgValue
\fi
- \tablecolumnwidthunit
+ \d_tabl_table_column_width_unit
\else
\!tgValue
\fi}}%
- a{\dotableendparbox}}}
+ a{\tabl_table_end_par_box}}}
\def\!tgInsertKern
- {\edef\!ttemp
+ {\edef\tempstring
{\kern
\ifnum \!tgCode=\plusone
\ifx \!tgValue\empty
@@ -379,21 +388,21 @@
\else
\!tgValue
\fi
- \tablekernunit
+ \d_tabl_table_kern_unit
\else
\!tgValue
\fi}%
- \edef\!ttemp
+ \edef\tempstring
{\noexpand\doreadtableformatkeys
- \ifconditional\tablehasleftspacing
- b{\!ttemp}
+ \ifconditional\c_tabl_table_spacing_left
+ b{\tempstring}
\fi
- \ifconditional\tablehasrightspacing
- a{\!ttemp}
+ \ifconditional\c_tabl_table_spacing_right
+ a{\tempstring}
\fi}%
- \!ttemp}
+ \tempstring}
-\def\newtableformatkey #1{\setvalue{!tk<\string#1>}}
+\def\newtableformatkey #1{\setvalue{!tk<\string#1>}}
\def\doreadtableformatkeys#1{\getvalue{!tk<\string#1>}}
% Key "b": b{TOKENS} adds TOKENS to the left of (before) the template
@@ -458,29 +467,28 @@
{\prependtoks\notragged\to\!taDataColumnTemplate
\doreadtableformatkeys \LeftGlue\hfil \RightGlue\empty}
-% Key "k": Adds kerns to left and right of "#"
-% This key and the two below use Plain TeX's \if@h as if it were \if@left,
-% and \if@v as if it were \if@right. Table making goes on in a group,
-% so even in the unlikely circumstance that a \phantom is currently under
-% construction, there's no problem.
+% Key "k": Adds kerns to left and right of "#" This key and the two below use Plain
+% TeX's \if@h as if it were \if@left, and \if@v as if it were \if@right. Table
+% making goes on in a group, so even in the unlikely circumstance that a \phantom
+% is currently under construction, there's no problem.
\newtableformatkey k%
- {\settrue\tablehasleftspacing
- \settrue\tablehasrightspacing
+ {\settrue\c_tabl_table_spacing_left
+ \settrue\c_tabl_table_spacing_right
\!tgGetValue{\!tgInsertKern}}
% Key "i": Adds a kern to the left of "#"
\newtableformatkey i%
- {\settrue\tablehasleftspacing
- \setfalse\tablehasrightspacing
+ {\settrue\c_tabl_table_spacing_left
+ \setfalse\c_tabl_table_spacing_right
\!tgGetValue{\!tgInsertKern}}
% Key "j": Adds a kern to the right of "#"
\newtableformatkey j%
- {\setfalse\tablehasleftspacing
- \settrue\tablehasrightspacing
+ {\setfalse\c_tabl_table_spacing_left
+ \settrue\c_tabl_table_spacing_right
\!tgGetValue{\!tgInsertKern}}
% Key "n": numeric item , non-math mode.
@@ -498,14 +506,15 @@
% Key "m": Math mode.
\newtableformatkey m%
- {\doreadtableformatkeys b$ a$}
+ {\doreadtableformatkeys b{\normalstartimath} a{\normalstopimath}}
% Key "M": Displaymath mode.
\newtableformatkey M%
- {\doreadtableformatkeys \{ b{$\displaystyle} a$}
+ {\doreadtableformatkeys \{ b{\normalstartimath\displaystyle} a{\normalstopimath}}
% Key "\m": Template ${}#\hfil$
+
\newtableformatkey \m%
{\doreadtableformatkeys l b{{}} m}
@@ -536,17 +545,16 @@
\newtableformatkey w%
{\!tkTestForBeginFormat w{\!tgGetValue{\!tfSetWidth}}}
-% Key "s": Set tabskip for the inter-column space to the right
-% of the current column, and all subsequent spaces, until overriden
-% by a new "s" or "o" key.
+% Key "s": Set tabskip for the inter-column space to the right of the current
+% column, and all subsequent spaces, until overriden by a new "s" or "o" key.
\newtableformatkey s%
{\!taOnceOnlyTabskipfalse % in case same column has a prior "o" key
\!tkTestForBeginFormat t{\!tgGetValue{\!tfSetTabskip}}}
-% Key "o": Apply the \tabskip stated for this column ONLY to the
-% inter-column space just to the right of this column; restore the
-% the previous \tabskip for subsequent columns.
+% Key "o": Apply the \tabskip stated for this column ONLY to the inter-column space
+% just to the right of this column; restore the the previous \tabskip for
+% subsequent columns.
\newtableformatkey o%
{\!taOnceOnlyTabskiptrue
@@ -562,7 +570,7 @@
\newtableformatkey \|%
{\!tkTestForBeginFormat \|{\!tfSetAlternateVrule}}
-% Key ".": PERIOD -- end of \dobegintableformat section.
+% Key ".": PERIOD -- end of \tabl_table_begin_format section.
\newtableformatkey .%
{\!tkTestForBeginFormat.{\!tfFinishFormat}}
@@ -572,41 +580,40 @@
\newtableformatkey \doendtableformat
{\!tkTestForBeginFormat\doendtableformat{\!tfFinishFormat}}
-% Key "]": End of \dotablereformat section
+% Key "]": End of \tabl_table_reformat section
\newtableformatkey ]%
{\!tkTestForReFormat ] \!tfEndReFormat}
-% TEST FOR BEGIN FORMAT{<Key>}{Intended Action}: This test is run
-% on keys that can only be used by \dobegintableformat --- "s", "o",
-% "|", "\|", "w", ".", and "\doendtableformat".
+% TEST FOR BEGIN FORMAT{<Key>}{Intended Action}: This test is run on keys that can
+% only be used by \tabl_table_begin_format --- "s", "o", "|", "\|", "w", ".", and
+% "\doendtableformat".
\def\!tkTestForBeginFormat#1#2%
{\if!taBeginFormat
- \def\!ttemp{#2}%
- \expandafter\!ttemp
+ \def\tempstring{#2}%
+ \expandafter\tempstring
\else
\toks0={#1}%
- \toks2=\expandafter{\string\dotablereformat}%
+ \toks2=\expandafter{\string\tabl_table_reformat}%
\expandafter\!tkImproperUse
\fi}
-% TEST FOR RE FORMAT{<Key>}{Intended Action}: This test is run
-% on the key "]", which can only be used by \dotablereformat.
+% TEST FOR RE FORMAT{<Key>}{Intended Action}: This test is run on the key "]",
+% which can only be used by \tabl_table_reformat.
\def\!tkTestForReFormat#1#2%
{\if!taBeginFormat
\toks0={#1}%
- \toks2=\expandafter{\string\dobegintableformat}%
+ \toks2=\expandafter{\string\tabl_table_begin_format}%
\expandafter\!tkImproperUse
\else
- \def\!ttemp{#2}%
- \expandafter\!ttemp
+ \def\tempstring{#2}%
+ \expandafter\tempstring
\fi}
-% NOTE: THE SPACE BETWEEN A NUMERIC ENTRY AND THE FOLLOWING '|', '"',
-% OR '\|' IS MANDATORY.
-% EMPTY NUMERIC ENTRIES ARE NOT ALLOWED: USE '{}' OR '\omit' INSTEAD.
+% NOTE: THE SPACE BETWEEN A NUMERIC ENTRY AND THE FOLLOWING '|', '"', OR '\|' IS
+% MANDATORY. EMPTY NUMERIC ENTRIES ARE NOT ALLOWED: USE '{}' OR '\omit' INSTEAD.
\def\!tnTestForBracket
{\ifx[\!tnext
@@ -620,12 +627,11 @@
\def\!tnGetCode#1 %
{\!tnConvertCode #1..!}
-% CONVERT CODE: E.g. converts above to [0000], [0000.], [.0000],
-% [0000000000.00]
+% CONVERT CODE: E.g. converts above to [0000], [0000.], [.0000], [0000000000.00]
\def\!tnConvertCode #1.#2.#3!%
{\begingroup
- \aftergroup\edef \aftergroup\!ttemp \aftergroup{%
+ \aftergroup\edef \aftergroup\tempstring \aftergroup{%
\aftergroup[%
\scratchcounter#1\relax
\!thLoop
@@ -633,8 +639,8 @@
\advance\scratchcounter\minusone
\aftergroup0
\repeat
- \def\!ttemp{#3}%
- \ifx\!ttemp \empty
+ \def\tempstring{#3}%
+ \ifx\tempstring \empty
\else
\aftergroup.
\scratchcounter#2\relax
@@ -646,7 +652,7 @@
\fi
\aftergroup]\aftergroup}%
\endgroup\relax
- \expandafter\!tnGetArgument\!ttemp}
+ \expandafter\!tnGetArgument\tempstring}
% GET ARGUMENT: [<sample left field> <optional .<sample right field>>
@@ -656,8 +662,8 @@
% MAKE NUMERIC TEMPLATE
\def\!tnMakeNumericTemplate#1#2.#3.#4!% #1=<empty> or $
- {\def\!ttemp{#4}%
- \ifx\!ttemp\empty
+ {\def\tempstring{#4}%
+ \ifx\tempstring\empty
\!taDimenC\zeropoint
\else
\setbox\scratchbox=\hbox{\mathsurround\zeropoint #1.#3#1}%
@@ -675,9 +681,9 @@
{\!tnSetNumericItemA {#1}{#2}{#3}#4..!}
\def\!tnSetNumericItemA #1#2#3#4.#5.#6!%
- {\def\!ttemp{#6}%
+ {\def\tempstring{#6}%
\hbox to #1{\hss \mathsurround\zeropoint #3#4#3}%
- \hbox to #2{\ifx\!ttemp\empty\else\mathsurround\zeropoint #3.#5#3\fi\hss}}
+ \hbox to #2{\ifx\tempstring\empty\else\mathsurround\zeropoint #3.#5#3\fi\hss}}
% extensions
@@ -702,7 +708,7 @@
\def\!tqConvertCode #1,#2,#3!%
{\begingroup
\aftergroup\edef
- \aftergroup\!ttemp
+ \aftergroup\tempstring
\aftergroup{%
\aftergroup[%
\scratchcounter#1\relax
@@ -711,8 +717,8 @@
\advance\scratchcounter\minusone
\aftergroup0
\repeat
- \def\!ttemp{#3}%
- \ifx\!ttemp\empty
+ \def\tempstring{#3}%
+ \ifx\tempstring\empty
\else
\aftergroup,
\scratchcounter#2\relax
@@ -724,14 +730,14 @@
\fi
\aftergroup]\aftergroup}%
\endgroup\relax
- \!thx\!tqGetArgument\!ttemp}
+ \!thx\!tqGetArgument\tempstring}
\def\!tqGetArgument[#1]%
{\!tqMakeQuantityTemplate\!tqStyle#1,,!}
\def\!tqMakeQuantityTemplate#1#2,#3,#4!% #1=<empty> or $
- {\def\!ttemp{#4}%
- \ifx\!ttemp\empty
+ {\def\tempstring{#4}%
+ \ifx\tempstring\empty
\!taDimenC\zeropoint
\else
\setbox\scratchbox\hbox{\mathsurround\zeropoint #1,#3#1}%
@@ -747,14 +753,14 @@
{\!tqSetQuantityItemA{#1}{#2}{#3}#4,,!}
\def\!tqSetQuantityItemA #1#2#3#4,#5,#6!%
- {\def\!ttemp{#6}%
+ {\def\tempstring{#6}%
\hbox to #1{\hss\mathsurround\zeropoint#3#4#3}%
- \hbox to #2{\ifx\!ttemp\empty\else\mathsurround\zeropoint#3,#5#3\fi\hss}}
+ \hbox to #2{\ifx\tempstring\empty\else\mathsurround\zeropoint#3,#5#3\fi\hss}}
% \Enlarge<extra height><extra depth><original>
% \enlarge<multiple for extra height><multiple for extra depth><original>
-\def\dotableEnlarge#1#2%
+\def\tabl_table_Enlarge#1#2%
{% 3rd argument is picked up later
% #1=extra height
% #2=extra depth
@@ -777,7 +783,7 @@
\!TsFinishEnlarge}
\def\!TsEnlargeMath#1#2%
- {\setbox\scratchbox\hbox{$\mathsurround\zeropoint#1{#2}$}%
+ {\setbox\scratchbox\hbox{\normalstartimath\mathsurround\zeropoint#1{#2}\normalstopimath}%
\!TsFinishEnlarge}
\def\!TsFinishEnlarge
@@ -786,37 +792,40 @@
\box\scratchbox
\!TsSpaceFactor\relax}
-\def\dotableenlarge#1#2% 3rd argument is picked up later
- {\dotableEnlarge{#1\tablestrutunit}{#2\tablestrutunit}}
+\def\tabl_table_enlarge#1#2% 3rd argument is picked up later
+ {\tabl_table_Enlarge{#1\d_tabl_table_strut_unit}{#2\d_tabl_table_strut_unit}}
\appendtoks
- \let\enlarge\dotableenlarge
- \let\Enlarge\dotableEnlarge
+ \let\enlarge\tabl_table_enlarge
+ \let\Enlarge\tabl_table_Enlarge
\to \everytable
% BEGIN TABLE
-\let\dotablestandardend\relax
+\let\tabl_table_standard_end\relax
-\def\dotablestandardbegin[#1]% \!ttBeginTable (always argument)
+\def\tabl_table_standard_begin[#1]% \!ttBeginTable (always argument)
{\if#1u% unboxed table
\ifmmode
- \let\dotablestandardend\relax % user had better be in display math mode and have only one table at the outer level
- \else % user had better be in vertical mode
+ \let\tabl_table_standard_end\relax % user had better be in display math mode and have only one table at the outer level
+ \else % user had better be in vertical mode
\bgroup
- \let\dotablestandardend\egroup
+ \let\tabl_table_standard_end\egroup
\fi
\else
\hbox\bgroup
- \def\dotablestandardend{\egroup\egroup}%
+ \def\tabl_table_standard_end{\egroup\egroup}%
\if#1t%
\vtop
\else\if#1b%
\vbox
\else
- \def\dotablestandardend{\egroup$\egroup}%
- %$\vcenter
- \scratchtoks\everymath\everymath\emptytoks$\everymath\scratchtoks\vcenter
+ \def\tabl_table_standard_end{\egroup\normalstopimath\egroup}%
+ \scratchtoks\everymath
+ \everymath\emptytoks
+ \normalstartimath
+ \everymath\scratchtoks
+ \vcenter
\fi\fi
\bgroup % for the \vtop, \vbox, or \vcenter
\fi
@@ -841,8 +850,10 @@
% DO HALIGN: Invoked by END FORMAT (or the key ".")
+\let\tabl_table_restore_lineskips\relax
+
\def\!ttDoHalign
- {\edef\dorestoretablelineskips
+ {\edef\tabl_table_restore_lineskips
{\baselineskip \the\baselineskip
\lineskiplimit\the\lineskiplimit
\lineskip \the\lineskip
@@ -864,80 +875,78 @@
% END TABLE
-\def\dotablenormalend
- {\egroup % finishes the \halign
- \dotablestandardend} % closes off the table envirnoment set up by \tablestandardbegin
+\def\tabl_table_normal_end
+ {\egroup % finishes the \halign
+ \tabl_table_standard_end} % closes off the table envirnoment set up by \tablestandardbegin
-\def\donormaltablelineending
+\def\tabl_table_normal_line_ending
{\cr}
-\def\donormaltablelineformat#1#2%
+\def\tabl_table_normal_line_format#1#2%
{\vrule
\s!width \zeropoint
- \s!height\dimexpr\tablestrutheightfactor\tablestrutunit+#1\tablestrutunit\relax
- \s!depth \dimexpr\tablestrutdepthfactor \tablestrutunit+#2\tablestrutunit\relax
+ \s!height\dimexpr\tablestrutheightfactor\d_tabl_table_strut_unit+#1\d_tabl_table_strut_unit\relax
+ \s!depth \dimexpr\tablestrutdepthfactor \d_tabl_table_strut_unit+#2\d_tabl_table_strut_unit\relax
\relax
\cr}
% INSERT VRULE
-\newcount\noftablevrules \noftablevrules\plusone
+\newcount\c_tabl_table_n_of_vrules \c_tabl_table_n_of_vrules\plusone
-\let\tablecurrentvrulecolor\empty
-\let\tablecurrenthrulecolor\empty
-
-\def\@VLd{.125em}
+\let\m_tabl_table_vrule_color\empty
+\let\m_tabl_table_hrule_color\empty
\def\do!ttInsertVrule
- {\vrule\!!width
+ {\vrule\s!width
\ifnum\!tgCode=\plusone
\ifx\!tgValue\empty
- \tablevrulethicknessfactor
+ \c_tabl_table_vrule_thickness_factor
\else
\!tgValue
\fi
- \tablelinethicknessunit
+ \d_tabl_table_line_thickness_unit
\else
\!tgValue
\fi
- \hskip\@VLd}
+ \hskip.125\emwidth\relax}
-\def\donormaltablesimplebar
- {\unskip\!ttRightGlue&&}
+\def\tabl_table_normal_line_simple_bar
+ {\unskip\!ttRightGlue\aligntab\aligntab}
-\def\donormaltablecomplexbar
- {\unskip\!ttRightGlue&\omit
+\def\tabl_table_normal_line_complex_bar
+ {\unskip\!ttRightGlue\aligntab\omit
\hfil
- \ifx\tablecurrentvrulecolor\empty\else
- \switchtocolor[\tablecurrentvrulecolor]%
+ \ifx\m_tabl_table_vrule_color\empty\else
+ \switchtocolor[\m_tabl_table_vrule_color]%
\fi
- \ifcase\noftablevrules\or
+ \ifcase\c_tabl_table_n_of_vrules\or
\do!ttInsertVrule
\unskip
\else
- \dorecurse\noftablevrules\do!ttInsertVrule
- \global\noftablevrules\plusone
+ \dorecurse\c_tabl_table_n_of_vrules\do!ttInsertVrule
+ \global\c_tabl_table_n_of_vrules\plusone
\unskip
\fi
- \global\let\tablecurrentvrulecolor\empty
+ \global\let\m_tabl_table_vrule_color\empty
\hfil
- &}
+ \aligntab}
-\def\donormaltablenobar
- {\unskip\!ttRightGlue&\omit&}
+\def\tabl_table_normal_no_bar
+ {\unskip\!ttRightGlue\aligntab\omit\aligntab}
-\def\donormaltablesinglerule
- {&\donormaltablelongrule&}
+\def\tabl_table_normal_single_rule
+ {\aligntab\tabl_table_normal_long_rule\aligntab}
-\def\donormaltablemultirule
- {&\!ttuse\tabledrulespan\donormaltablelongrule&}
+\def\tabl_table_normal_multi_rule
+ {\aligntab\tabl_table_use\c_tabl_table_drule_span\tabl_table_normal_long_rule\aligntab}
% USE
-\def\!ttuse#1%
+\def\tabl_table_use#1%
{\ifnum#1>\plusone
\omit
- \global\setfalse\istabledivision % added
+ \global\setfalse\c_tabl_table_is_division % added
\scratchcounter\currenttablecolumn % added
\advance\scratchcounter #1% % added
\advance\scratchcounter \minusone % added
@@ -958,47 +967,47 @@
\fi
\next} % added
-\def\!ttUse#1[%
- {\!ttuse{#1}%
- \dotablereformat[}
+\def\tabl_table_Use#1[%
+ {\tabl_table_use{#1}%
+ \tabl_table_reformat[}
\appendtoks
- \let\use\!ttuse
- \let\Use\!ttUse
+ \let\use\tabl_table_use
+ \let\Use\tabl_table_Use
\to \everytable
% rules
-\def\donormaltablefullrule
+\def\tabl_table_normal_full_rule
{\starttablenoalign
\!ttGetHalfRuleThickness
\hrule\s!height\scratchdimen\s!depth\scratchdimen
\stoptablenoalign}
-\def\donormaltableshortrule % was: \!ttShortHrule
+\def\tabl_table_normal_short_rule % was: \!ttShortHrule
{\omit
\!ttGetHalfRuleThickness
- \ifx\tablecurrenthrulecolor\empty\else
- \switchtocolor[\tablecurrenthrulecolor]% see *DL*
+ \ifx\m_tabl_table_hrule_color\empty\else
+ \switchtocolor[\m_tabl_table_hrule_color]% see *DL*
\fi
\leaders\hrule\s!height\scratchdimen\s!depth\scratchdimen\hfill
\emptyhbox
\ignorespaces}
-\def\donormaltablelongrule % was: \!ttLongHrule
+\def\tabl_table_normal_long_rule % was: \!ttLongHrule
{\omit\span
\omit\span
- \donormaltableshortrule}
+ \tabl_table_normal_short_rule}
\def\!ttGetHalfRuleThickness
{\scratchdimen\dimexpr
\ifnum\!tgCode=\plusone
\ifx\!tgValue\empty
- \tablehrulethicknessfactor
+ \c_tabl_table_hrule_thickness_factor
\else
\!tgValue % user-specified integer
\fi
- \tablelinethicknessunit
+ \d_tabl_table_line_thickness_unit
\else
\!tgValue % user-specified dimension
\fi
@@ -1006,11 +1015,11 @@
% \emptyhbox prevents \unskip
-\def\dotableLeft #1{#1\hfill\emptyhbox}
-\def\dotableCenter#1{\hfill#1\hfill\emptyhbox}
-\def\dotableRight #1{\hfill#1}
+\def\tabl_table_Left #1{#1\hfill\emptyhbox}
+\def\tabl_table_Center#1{\hfill#1\hfill\emptyhbox}
+\def\tabl_table_Right #1{\hfill#1}
-\def\dotableOpenUp#1#2%
+\def\tabl_table_OpenUp#1#2%
{\edef\tablestrutheightfactor{\withoutpt\the\dimexpr\tablestrutheightfactor\points+#1\points}%
\edef\tablestrutdepthfactor {\withoutpt\the\dimexpr\tablestrutdepthfactor \points+#2\points}}
@@ -1021,11 +1030,11 @@
% \tablerighttabskip\tablelefttabskip
% LongLines -> [spread \hsize]
-\def\dotableJustLeft {\omit\let\!ttRightGlue\hfill}
-\def\dotableJustCenter{\omit\hfill\emptyhbox\let\!ttRightGlue\hfill}
-\def\dotableJustRight {\omit\hfill\emptyhbox}
+\def\tabl_table_JustLeft {\omit\let\!ttRightGlue\hfill}
+\def\tabl_table_JustCenter{\omit\hfill\emptyhbox\let\!ttRightGlue\hfill}
+\def\tabl_table_JustRight {\omit\hfill\emptyhbox}
-\def\dotableSmash
+\def\tabl_table_Smash
{\relax
\ifmmode
\expandafter\mathpalette
@@ -1039,28 +1048,28 @@
\!thFinishVCS}
\def\!thDoMathVCS#1#2%
- {\setbox\zerocount\hbox{$\mathsurround\zeropoint#1{#2}$}%
+ {\setbox\zerocount\hbox{\normalstartimath\mathsurround\zeropoint#1{#2}\normalstopimath}%
\!thFinishVCS}
\def\!thFinishVCS
- {\vbox to\zeropoint{\vss\box\zerocount\vss}}
+ {\vpack to\zeropoint{\vss\box\zerocount\vss}}
-\def\dotableRaise
+\def\tabl_table_Raise
{\def\!thSign{+}%
\!tgGetValue\!thSetDimen}
-\def\dotableLower
+\def\tabl_table_Lower
{\def\!thSign{-}%
\!tgGetValue\!thSetDimen}
\def\!thSetDimen
{\ifnum\!tgCode=\plusone
\ifx\!tgValue\empty
- \!taDimenA\tablestrutheightfactor\tablestrutunit
- \advance\!taDimenA\tablestrutdepthfactor\tablestrutunit
+ \!taDimenA\tablestrutheightfactor\d_tabl_table_strut_unit
+ \advance\!taDimenA\tablestrutdepthfactor\d_tabl_table_strut_unit
\divide\!taDimenA\plustwo
\else
- \!taDimenA\!tgValue\tablestrutunit
+ \!taDimenA\!tgValue\d_tabl_table_strut_unit
\fi
\else
\!taDimenA\!tgValue
@@ -1078,7 +1087,7 @@
\!thFinishRaise} % From Plain TeX: \ht0=0pt \dp0=0pt \box0
\def\!thDoMathRaise#1#2%
- {\setbox\zerocount\hbox{\raise \!taDimenA\hbox{$\mathsurround\zeropoint#1{#2}$}}%
+ {\setbox\zerocount\hbox{\raise \!taDimenA\hbox{\normalstartimath\mathsurround\zeropoint#1{#2}\normalstopimath}}%
\!thFinishRaise}
\def\!thFinishRaise
@@ -1086,7 +1095,7 @@
\dp\zerocount\zeropoint
\box\zerocount}
-\def\dotableBackSpace
+\def\tabl_table_BackSpace
{\!tgGetValue\!thKernBack}
\def\!thKernBack
@@ -1097,13 +1106,13 @@
\else
\!tgValue % user-specified integer
\fi
- \tablekernunit
+ \d_tabl_table_kern_unit
\else
\!tgValue % user-specified dimension
\fi
\ignorespaces}
-\def\dotableVspace
+\def\tabl_table_Vspace
{\noalign
\bgroup
\!tgGetValue\!thVspace}
@@ -1116,40 +1125,39 @@
\else
\!tgValue % user-specified integer
\fi
- \tablestrutunit
+ \d_tabl_table_strut_unit
\else
\!tgValue % user-specified skip
\fi
\egroup} % Ends the \noalign
\appendtoks
- \let\JustLeft \dotableJustLeft
- \let\JustCenter \dotableJustCenter
- \let\JustRight \dotableJustRight
- \let\Smash \dotableSmash
- \let\Raise \dotableRaise
- \let\Lower \dotableLower
- \let\BackSpace \dotableBackSpace
- \let\Vspace \dotableVspace
- \let\OpenUp \dotableOpenUp
- \let\TableLeft \dotableLeft
- \let\TableCenter \dotableCenter
- \let\TableRight \dotableRight
+ \let\JustLeft \tabl_table_JustLeft
+ \let\JustCenter \tabl_table_JustCenter
+ \let\JustRight \tabl_table_JustRight
+ \let\Smash \tabl_table_Smash
+ \let\Raise \tabl_table_Raise
+ \let\Lower \tabl_table_Lower
+ \let\BackSpace \tabl_table_BackSpace
+ \let\Vspace \tabl_table_Vspace
+ \let\OpenUp \tabl_table_OpenUp
+ \let\TableLeft \tabl_table_Left
+ \let\TableCenter \tabl_table_Center
+ \let\TableRight \tabl_table_Right
\to \everytable
%D \macros
%D {inintable, ifsplittables}
%D
-%D First we declare some variables. These show a bit what we
-%D are dealing with. First we introdoce some booleans that
-%D enable us, inside as well as outside this module, to
-%D determine in what mode we are.
+%D First we declare some variables. These show a bit what we are dealing with. First
+%D we introdoce some booleans that enable us, inside as well as outside this module,
+%D to determine in what mode we are.
\newif\ifintable
\newif\ifsplittables
-%D We show this feature in an example that also shows some of
-%D the basic table typesetting commands.
+%D We show this feature in an example that also shows some of the basic table
+%D typesetting commands.
%D
%D \startbuffer
%D \starttable[|||]
@@ -1171,10 +1179,9 @@
%D
%D \typebuffer
%D
-%D This examples shows about the minimum of commands needed to
-%D typeset such a table. In this table, the \type {\AR} is
-%D automatically translated into the more primitive (but more
-%D verbose) commands \type {\SR}, \type {\FR}, \type {\MR} and
+%D This examples shows about the minimum of commands needed to typeset such a table.
+%D In this table, the \type {\AR} is automatically translated into the more
+%D primitive (but more verbose) commands \type {\SR}, \type {\FR}, \type {\MR} and
%D \type {\LR} commands.
%D
%D \startbuffer
@@ -1211,10 +1218,9 @@
\def\m!TABLE{TABLE}
-%D We already saw that the table macros report errors and
-%D provide automatic spacing. These features can only be
-%D implemented by keeping track of the state, often the last
-%D command on a row.
+%D We already saw that the table macros report errors and provide automatic spacing.
+%D These features can only be implemented by keeping track of the state, often the
+%D last command on a row.
\newconstant\tableforcestate
\newconstant\tableactionstate
@@ -1239,28 +1245,25 @@
\newconstant\tablerowzero
\newconstant\TABLEn
-%D We store these states using \type {constants}'s and
-%D like most variables, these are global ones. When needed,
-%D especially when we flush the backgrounds, we can temporary
-%D disable the assignment.
+%D We store these states using \type {constants}'s and like most variables, these
+%D are global ones. When needed, especially when we flush the backgrounds, we can
+%D temporary disable the assignment.
\newconditional\tableactionstatepermitted
-\def\dosettableaction#1{\ifconditional\tableactionstatepermitted\global\tableactionstate#1\fi}
-\def\dosettableforce #1{\ifconditional\tableactionstatepermitted\global\tableforcestate #1\fi}
+\def\tabl_table_set_action#1{\ifconditional\tableactionstatepermitted\global\tableactionstate#1\fi}
+\def\tabl_table_set_force #1{\ifconditional\tableactionstatepermitted\global\tableforcestate #1\fi}
-%D To give an impression of what the (well documented) source
-%D of \TABLE\ looks like, we first implement an alternative for
-%D the numeric keys. The quantity keys (\type{q} and \type{Q})
-%D support the more european way of writing numbers:
+%D To give an impression of what the (well documented) source of \TABLE\ looks like,
+%D we first implement an alternative for the numeric keys. The quantity keys
+%D (\type{q} and \type{Q}) support the more european way of writing numbers:
%D
%D \startnarrower
%D 100.000.000,00 instead of 100,000,000.00
%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
-%D format.
+%D The next table shows how to use these keys. We use braces instead of brackets because
+%D we need brackets to specify the format.
%D
%D \starttyping
%D \starttable{|q[00,000]|Q[00,00]|}
@@ -1271,22 +1274,18 @@
%D \stoptable
%D \stoptyping
%D
-%D Although a more efficient implementation is possible |<|we
-%D can for instance share common macros|>| we just adapt a copy
-%D of the numeric ones. To permit double loading of this
-%D module, we check for the existence of one of the macros.
-
-%D To be compatible with the tabulate environment, we also
-%D support the \type {l}, \type {c} and \type {r} keys for
-%D paragraph entries.
-
-%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:\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.}
+%D Although a more efficient implementation is possible |<|we can for instance share
+%D common macros|>| we just adapt a copy of the numeric ones. To permit double
+%D loading of this module, we check for the existence of one of the macros.
+%D
+%D To be compatible with the tabulate environment, we also support the \type {l},
+%D \type {c} and \type {r} keys for paragraph entries.
+%D
+%D All commands that are executed between rows are to be put in \type {\noalign}. We
+%D can however not verify if we (that is \TABLE) does or did not enter this mode. A
+%D moderate dirty but useful trick is using our own alternative:\footnote{Once one
+%D has entered the stage of redefining \TEX\ primitives, such hacks become a second
+%D nature. However, redefining \type {\omit} and \type{\span} is not that easy.}
\def\tablenoalign
{\noalign
@@ -1303,8 +1302,8 @@
%D \macros
%D {starttable}
%D
-%D The rest of this module is not easy to comprehend, mainly
-%D because we have to take care of:
+%D The rest of this module is not easy to comprehend, mainly because we have to take
+%D care of:
%D
%D \startitemize[packed]
%D \item \type{\startitemize[template]}
@@ -1322,18 +1321,18 @@
%D
%D \showsetup{starttable}
-\newconditional\tablerepeathead
-\newconditional\tablerepeattail
+\newconditional\c_tabl_table_repeat_head
+\newconditional\c_tabl_table_repeat_tail
\unexpanded\def\starttable
{\bgroup
- \dodoubleempty\dostarttable}
+ \dodoubleempty\table_table_start}
-\unexpanded\def\dostarttable[#1][#2]% preamble optional-settings
+\unexpanded\def\table_table_start[#1][#2]% preamble optional-settings
{\ifsecondargument
\setupcurrenttables[#2]%
\fi
- \let\stoptable\dostoptable
+ \let\stoptable\table_table_stop
\edef\p_tabl_table_split{\directtablesparameter\c!split}%
\edef\p_tabl_table_frame{\directtablesparameter\c!frame}%
\ifx\p_tabl_table_split\v!auto
@@ -1343,10 +1342,10 @@
\fi
\fi
\ifx\p_tabl_table_split\v!yes
- \def\stoptable{\dostoptables\egroup}% not \unexpanded as we look ahead
+ \def\stoptable{\table_table_stop_s\egroup}% not \unexpanded as we look ahead
\expandafter\starttables
\else\ifx\p_tabl_table_split\v!repeat
- \def\stoptable{\dostoptables\egroup}% not \unexpanded as we look ahead
+ \def\stoptable{\table_table_stop_s\egroup}% not \unexpanded as we look ahead
\doubleexpandafter\starttables
\else
\ifx\p_tabl_table_frame\empty
@@ -1355,23 +1354,23 @@
\startframedcontent[\p_tabl_table_frame]%
\fi
\postponenotes
- \doubleexpandafter\firststagestarttable
+ \doubleexpandafter\tabl_table_first_stage
\fi\fi
[#1]}
-% We cannot define \unexpanded\def\dostoptable a ssomehow lookahead
-% in alignments fail then, so we relax it and define it locally.
+% We cannot define the stopper as \type {\unexpanded} because lookahead in
+% alignments fail then, so we relax it and define it locally.
\let\stoptable\relax
-\def\dostoptable
- {\dochucktableautorow % before the tail, else noalign problem
- \doinserttabletail
+\def\table_table_stop
+ {\tabl_tables_chuck_auto_row % before the tail, else noalign problem
+ \tabl_table_insert_tail
\starttablenoalign
- \global\let\dotablehead\empty
- \global\let\dotabletail\empty
+ \global\let\tabl_table_head\empty
+ \global\let\tabl_table_tail\empty
\stoptablenoalign
- \dofinishtable
+ \tabl_table_finish
\ifx\p_tabl_table_frame\empty
\ifinsidefloat\else
\stopbaselinecorrection
@@ -1382,19 +1381,19 @@
\fi
\egroup}
-%D Before we can grab the argument, we have to make sure that
-%D the \CATCODES\ are set. The first stage takes care of that.
+%D Before we can grab the argument, we have to make sure that the \CATCODES\ are
+%D set. The first stage takes care of that.
-\def\firststagestarttable
+\def\tabl_table_first_stage
{\bgroup
\global\intabletrue
- \secondstagestarttable}
+ \tabl_table_second_stage}
%D \macros
%D {definetabletemplate}
%D
-%D The complex (and main) start macro first takes care of the
-%D predefined case. Such a predefined setup looks like:
+%D The complex (and main) start macro first takes care of the predefined case. Such
+%D a predefined setup looks like:
%D
%D \starttyping
%D \definetabletemplate[test][|||]
@@ -1406,8 +1405,7 @@
%D \stoptable
%D \stoptyping
%D
-%D The implementation of the definition macro is not that
-%D complicated:
+%D The implementation of the definition macro is not that complicated:
\installcorenamespace{tablehead}
\installcorenamespace{tabletail}
@@ -1415,28 +1413,26 @@
\unexpanded\def\definetabletemplate % to be redone
{\bgroup
\catcode\barasciicode\othercatcode
- \doquadrupleempty\dodefinetabletemplate}
+ \doquadrupleempty\tabl_table_define_template}
-\def\dodefinetabletemplate[#1][#2][#3][#4]%
+\def\tabl_table_define_template[#1][#2][#3][#4]%
{\ifsecondargument
- \setgvalue{\??tabletemplate#1}{\dousetabletemplate{#2}{#3}{#4}}%
+ \setgvalue{\??tabletemplate#1}{\tabl_table_use_template{#2}{#3}{#4}}%
\fi
\egroup}
-\def\dousetabletemplate#1#2#3%
- {\gdef\dotablehead{\executeifdefined{\??tablehead#2}\empty}%
- \gdef\dotabletail{\executeifdefined{\??tabletail#3}\empty}%
- \secondstagestarttable[#1]}
+\def\tabl_table_use_template#1#2#3%
+ {\gdef\tabl_table_head{\begincsname\??tablehead#2\endcsname}%
+ \gdef\tabl_table_tail{\begincsname\??tabletail#3\endcsname}%
+ \tabl_table_second_stage[#1]}
-%D The optional third and fourth arguments define which table
-%D head and tail to use.
+%D The optional third and fourth arguments define which table head and tail to use.
%D
%D \starttyping
%D \definetabletemplate[test][|||][before][after]
%D \stoptyping
%D
-%D This also means that one can define table heads and tails
-%D by name!
+%D This also means that one can define table heads and tails by name!
%D
%D \starttyping
%D \starttablehead[before]
@@ -1444,50 +1440,50 @@
%D \stoptablehead
%D \stoptyping
%D
-%D Templates defined this way get protected names, that cannot
-%D conflict with existing commands.
+%D Templates defined this way get protected names, that cannot conflict with
+%D existing commands.
%D
%D \showsetup{definetabletemplate}
%D
%D The second half of the next macro prepares table
%D splitting.
-\def\doinserttablehead
+\def\tabl_table_insert_head
{\starttablenoalign
\global\settrue\preventtablebreak
\global\setfalse\hassometablehead
\stoptablenoalign
- \dotablehead
+ \tabl_table_head
\starttablenoalign
\global\setfalse\preventtablebreak
\stoptablenoalign}
-\def\doinserttabletail
+\def\tabl_table_insert_tail
{\starttablenoalign
\global\settrue\preventtablebreak
\global\setfalse\hassometabletail
\stoptablenoalign
- \dotabletail
+ \tabl_table_tail
\starttablenoalign
\global\setfalse\preventtablebreak
\stoptablenoalign}
% \def\doverysimpletableHL % todo
% {\starttablenoalign
-% \normalexpanded{\noexpand\donormaltablefullrule\m_tabl_table_HLheight}%
+% \normalexpanded{\noexpand\tabl_table_normal_full_rule\m_tabl_table_HLheight}%
% \stoptablenoalign}
-\def\dorestarttable#1%
- {\gdef\restarttable{#1}%
- \restarttable
+\def\tabl_table_restart_indeed#1%
+ {\gdef\tabl_table_restart{#1}%
+ \tabl_table_restart
% \starttablenoalign
% \globalpushmacro\simpletableHL
% \global\let\simpletableHL\doverysimpletableHL
% \stoptablenoalign
- \doinserttablehead
- \ifsplittables \ifconditional \tablerepeattail
+ \tabl_table_insert_head
+ \ifsplittables \ifconditional \c_tabl_table_repeat_tail
\tablenoalign{\goodbreak}%
- \doinserttabletail
+ \tabl_table_insert_tail
\tablenoalign{\goodbreak}%
\fi \fi
% \starttablenoalign
@@ -1497,24 +1493,23 @@
\bgroup \catcode\barasciicode\othercatcode
-\gdef\secondstagestarttable[#1]% brr nested mess
+\gdef\tabl_table_second_stage[#1]% brr nested mess
{\bgroup
- \@@useotherbar
+ \tabl_table_use_bar
\global\setfalse\tableactionstatepermitted
\global\setfalse\hassometablehead
\global\setfalse\hassometabletail
\expanded{\doifelseinstring{|}{#1}}
- {\xdef\restarttable{\noexpand\dorestarttable{\noexpand\thirdstagestarttable{#1}}}}
+ {\xdef\tabl_table_restart{\noexpand\tabl_table_restart_indeed{\noexpand\tabl_table_third_stage{#1}}}}
{\doifelsedefined{\??tabletemplate#1}
- {\gdef\restarttable{\getvalue{\??tabletemplate#1}}}
- {\gdef\restarttable{\dorestarttable{\getvalue{#1}}}}}%
+ {\gdef\tabl_table_restart{\getvalue{\??tabletemplate#1}}}
+ {\gdef\tabl_table_restart{\tabl_table_restart_indeed{\getvalue{#1}}}}}%
\egroup
- \restarttable}
+ \tabl_table_restart}
\egroup
-%D The third stage involves a lot of (re)sets, which we will
-%D explain later.
+%D The third stage involves a lot of (re)sets, which we will explain later.
\appendtoks
\fixedspaces
@@ -1523,35 +1518,34 @@
%D Now we can start the table.
-\newtoks \localtabledefinitions
+\newtoks\localtabledefinitions
-\def\thirdstagestarttable#1%
+\def\tabl_table_third_stage#1%
{\global\settrue\tableactionstatepermitted
- \dosettableaction\tableunknownstate
- \dosettableforce\tableunknownstate
- \dotableresetVLvalues
- \appendtoks\dolocaltablesetup\to\everytable
- \dotablestandardbegin[\ifsplittables u\else b\fi]%
+ \tabl_table_set_action\tableunknownstate
+ \tabl_table_set_force\tableunknownstate
+ \tabl_table_resetVLvalues
+ \appendtoks\tabl_table_local_setups\to\everytable
+ \tabl_table_standard_begin[\ifsplittables u\else b\fi]%
\the\localtabledefinitions
\forgetall % added
\edef\currenttableformat{#1}%
\doifsomething\currenttableformat
{\dogettablenofcolumns\currenttableformat
% more modern is to use catcode tables
- \expandafter\dobegintableformat\currenttableformat\doendtableformat}}
+ \expandafter\tabl_table_begin_format\currenttableformat\doendtableformat}}
-\def\dofinishtable
- {\dochucktableautorow
+\def\tabl_table_finish
+ {\tabl_tables_chuck_auto_row
\unskip\crcr
- \dotablenormalend
+ \tabl_table_normal_end
\global\intablefalse
\egroup}
%D \macros
%D {starttables}
%D
-%D Split tables are specified using the plural form of the
-%D start and stop commands.
+%D Split tables are specified using the plural form of the start and stop commands.
%D
%D \showsetup{starttables}
%D
@@ -1572,45 +1566,45 @@
\unexpanded\def\starttables
{\bgroup
- \let\stoptables\dostoptables
+ \let\stoptables\table_table_stop_s
\splittablestrue
\edef\p_tabl_table_split{\directtablesparameter\c!split}%
\ifx\p_tabl_table_split\v!repeat
- \settrue\tablerepeathead
- \settrue\tablerepeattail
+ \settrue\c_tabl_table_repeat_head
+ \settrue\c_tabl_table_repeat_tail
\else
- \setfalse\tablerepeathead
- \setfalse\tablerepeattail
+ \setfalse\c_tabl_table_repeat_head
+ \setfalse\c_tabl_table_repeat_tail
\fi
\flushnotes
\setbox\tablecontentbox\vbox\bgroup
\forgetall
- \firststagestarttable}
+ \tabl_table_first_stage}
\let\stoptables\relax % needed for \noalign
-\def\dostoptables % not \unexpanded as we need the lookahead (brrr)
- {\dochucktableautorow % AM: before the tail, else noalign problem
- \ifconditional\tablerepeattail\else\doinserttabletail\fi
- \dofinishtable
+\def\table_table_stop_s % not \unexpanded as we need the lookahead (brrr)
+ {\tabl_tables_chuck_auto_row % AM: before the tail, else noalign problem
+ \ifconditional\c_tabl_table_repeat_tail\else\tabl_table_insert_tail\fi
+ \tabl_table_finish
\egroup
\dontcomplain
- \dosplittablebox\tablecontentbox
- \global\let\dotablehead\empty % new here
- \global\let\dotabletail\empty % new here
+ \tabl_table_split_box\tablecontentbox
+ \global\let\tabl_table_head\empty % new here
+ \global\let\tabl_table_tail\empty % new here
\flushnotes
\egroup}
-\def\dosplittablebox#1%
+\def\tabl_table_split_box#1%
{\resettsplit
\def\tsplitminimumfreelines{2}%
\def\tsplitminimumfreespace{\zeropoint}%
\setbox\tsplitcontent\box#1%
- \ifconditional\tablerepeathead \ifconditional\hassometablehead
+ \ifconditional\c_tabl_table_repeat_head \ifconditional\hassometablehead
\setbox\tsplithead\vsplit\tsplitcontent to \lineheight
\setbox\tsplithead\vbox{\unvbox\tsplithead}%
\fi \fi
- \ifconditional\tablerepeattail \ifconditional\hassometabletail
+ \ifconditional\c_tabl_table_repeat_tail \ifconditional\hassometabletail
\setbox\tsplittail\vsplit\tsplitcontent to \lineheight
\setbox\tsplittail\vbox{\unvbox\tsplittail}%
\fi \fi
@@ -1620,9 +1614,8 @@
\fi
\handletsplit}
-%D When the table in the previous example is split across
-%D pages, only the first gets a head. We could have said
-%D something like:
+%D When the table in the previous example is split across pages, only the first gets
+%D a head. We could have said something like:
%D
%D \starttyping
%D \starttablehead
@@ -1641,71 +1634,67 @@
%D \stoptables
%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
-%D unbroken ones and should be defined local (grouped) if
-%D needed. The rather complicated definition below is due to
-%D the fact that the stopcondition is interface language
-%D dependant.
+%D This time each split table gets a head line and ends with a rule. Keep in mind
+%D that such heads also apply to the unbroken ones and should be defined local
+%D (grouped) if needed. The rather complicated definition below is due to the fact
+%D that the stopcondition is interface language dependant.
-\let\dotablehead\empty % needs checking
-\let\dotabletail\empty % needs checking
+\let\tabl_table_head\empty % needs checking
+\let\tabl_table_tail\empty % needs checking
\letvalue{\e!start\v!tablehead}\relax
\letvalue{\e!stop \v!tablehead}\relax
\letvalue{\e!start\v!tabletail}\relax
\letvalue{\e!stop \v!tabletail}\relax
-%D The second argument is a dummy one, by scanning for it, we
-%D get rid of interfering spaces.
+%D The second argument is a dummy one, by scanning for it, we get rid of
+%D interfering spaces.
\newconditional\preventtablebreak
\newconditional\hassometablehead
\newconditional\hassometabletail
-\unexpanded\def\settablehead{\dodoubleempty\dosettablehead}
-\unexpanded\def\settabletail{\dodoubleempty\dosettabletail}
+\unexpanded\def\settablehead{\dodoubleempty\tabl_table_set_head}
+\unexpanded\def\settabletail{\dodoubleempty\tabl_table_set_tail}
-% \def\dosettablehead[#1][#2]#3\end{\setvalue{\??tablehead#1}{\tablenoalign{\global\settrue\hassometablehead}#3}}
-% \def\dosettabletail[#1][#2]#3\end{\setvalue{\??tabletail#1}{\tablenoalign{\global\settrue\hassometabletail}#3}}
+% \def\tabl_table_set_head[#1][#2]#3\end{\setvalue{\??tablehead#1}{\tablenoalign{\global\settrue\hassometablehead}#3}}
+% \def\tabl_table_set_tail[#1][#2]#3\end{\setvalue{\??tabletail#1}{\tablenoalign{\global\settrue\hassometabletail}#3}}
-\def\dosettablehead[#1][#2]#3\end
- {\gdef\dotablehead{\executeifdefined{\??tablehead#1}\empty}% new
+\def\tabl_table_set_head[#1][#2]#3\end
+ {\gdef\tabl_table_head{\begincsname\??tablehead#1\endcsname}% new
\setvalue{\??tablehead#1}{\tablenoalign{\global\settrue\hassometablehead}#3}}
-\def\dosettabletail[#1][#2]#3\end
- {\gdef\dotabletail{\executeifdefined{\??tabletail#1}\empty}% new
+\def\tabl_table_set_tail[#1][#2]#3\end
+ {\gdef\tabl_table_tail{\begincsname\??tabletail#1\endcsname}% new
\setvalue{\??tabletail#1}{\tablenoalign{\global\settrue\hassometabletail}#3}}
\normalexpanded
{\def\csname\e!start\v!tablehead\endcsname#1\csname\e!stop\v!tablehead\endcsname%
- {\settablehead#1\noexpand\end}}
+ {\settablehead#1\noexpand\end}}
\normalexpanded
{\def\csname\e!start\v!tabletail\endcsname#1\csname\e!stop\v!tabletail\endcsname%
{\settabletail#1\noexpand\end}}
-%D Redundant \type{\HL}'s are removed automatically, so
-%D mid||lines can be used without problems.
-
-%D The order of the next macros is more or less random. First
-%D we implement error recovery. Errors are reported to the
-%D screen and log file as well as visualized in the table in
-%D teletype.
+%D Redundant \type{\HL}'s are removed automatically, so mid||lines can be used
+%D without problems.
+%D
+%D The order of the next macros is more or less random. First we implement error
+%D recovery. Errors are reported to the screen and log file as well as visualized in
+%D the table in teletype.
-\def\dofinishtablerow
+\def\tabl_table_finish_row
{\crcr
\starttablenoalign
\nobreak
- \dosettableaction\tableunknownstate
- \globalletempty\dochecktableautorow
- \globalletempty\dochucktableautorow
+ \tabl_table_set_action\tableunknownstate
+ \globalletempty\tabl_tables_check_auto_row
+ \globalletempty\tabl_tables_chuck_auto_row
\global\currenttablecolumn\zerocount
\stoptablenoalign}
-%D Next we enter the more complicated area of column and row
-%D switching. I won't go into much detail from now on, but just
-%D mention the general principles.
+%D Next we enter the more complicated area of column and row switching. I won't go
+%D into much detail from now on, but just mention the general principles.
%D
%D \startitemize[3*ruim]
%D \sym{\type{\SR}} end a separate row (between rules)
@@ -1720,9 +1709,8 @@
%D \sym{\type{\AR}} end a row with automatic spacing
%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 As far as possible, we report confusing situations. In most cases one can use
+%D \type{\AR}, which transfigurates itself into one of the other types.
%D
%D \starttyping
%D \starttable[||]
@@ -1736,27 +1724,24 @@
%D \stoptable
%D \stoptyping
%D
-%D In this example we could have used \type{\AR} without
-%D problems.
+%D In this example we could have used \type{\AR} without problems.
%D
-%D Color or gray scale backgrounds precede the content. They
-%D are passed over horizontal (division) lines when needed.
-%D Errors in the color template are traced elsewhere. Here we
-%D only check for inconsistent spacing. Due to the way \TEX\
-%D handles alignments, we cannot automate spacing for colored
-%D rows and columns.
+%D Color or gray scale backgrounds precede the content. They are passed over
+%D horizontal (division) lines when needed. Errors in the color template are traced
+%D elsewhere. Here we only check for inconsistent spacing. Due to the way \TEX\
+%D handles alignments, we cannot automate spacing for colored rows and columns.
\setnewconstant\tablerowzero\zerocount
\appendtoks
- \let\SR\dotableSR
- \let\FR\dotableFR
- \let\MR\dotableMR
- \let\LR\dotableLR
- \let\AR\dotableAR
+ \let\SR\tabl_table_SR
+ \let\FR\tabl_table_FR
+ \let\MR\tabl_table_MR
+ \let\LR\tabl_table_LR
+ \let\AR\tabl_table_AR
\to \localtabledefinitions
-\unexpanded\def\dotableSR
+\unexpanded\def\tabl_table_SR
{\ifnum\tableactionstate=\tablefirstrowstate
\writestatus\m!TABLE{change \string\SR\space into \string\MR/\string\LR}%
\else\ifnum\tableactionstate=\tablemidrowstate
@@ -1764,60 +1749,57 @@
\else\ifnum\tableactionstate=\tablemidrowstate
\writestatus\m!TABLE{change \string\SR\space into \string\MR/\string\LR}%
\fi\fi\fi
- \doendtablerow\tableseparaterowstate\tablerowfactor\tablerowfactor}
+ \tabl_table_end_row_indeed\tableseparaterowstate\tablerowfactor\tablerowfactor}
-\unexpanded\def\dotableFR
+\unexpanded\def\tabl_table_FR
{\ifnum\tableactionstate=\tablemidrowstate
\writestatus\m!TABLE{change \string\FR\space into \string\MR/\string\LR}%
\else\ifnum\tableactionstate=\tablelastrowstate
\writestatus\m!TABLE{change \string\FR\space into \string\MR/\string\LR}%
\fi\fi
- \doendtablerow\tablefirstrowstate\tablerowfactor\tablerowzero}
+ \tabl_table_end_row_indeed\tablefirstrowstate\tablerowfactor\tablerowzero}
-\unexpanded\def\dotableMR
+\unexpanded\def\tabl_table_MR
{\ifnum\tableactionstate=\tablerulestate
\writestatus\m!TABLE{change \string\MR\space into \string\FR/\string\SR}%
\else\ifnum\tableactionstate=\tablelastrowstate
\writestatus\m!TABLE{change \string\MR\space into \string\FR}%
\fi\fi
- \doendtablerow\tablemidrowstate00}
+ \tabl_table_end_row_indeed\tablemidrowstate00}
-\unexpanded\def\dotableLR
+\unexpanded\def\tabl_table_LR
{\ifnum\tableactionstate=\tablerulestate
\writestatus\m!TABLE{change \string\LR\space into \string\FR/\string\SR}%
\fi
- \doendtablerow\tablelastrowstate\tablerowzero\tablerowfactor}
+ \tabl_table_end_row_indeed\tablelastrowstate\tablerowzero\tablerowfactor}
%D \macros
%D {ifcheckTABLEcolums}
%D
-%D
-%D The next macros handle the actual row ending. This macro
-%D also take care of space corrections due to table splitting
-%D when \type{\MR} and collegues are used. When tracing is
-%D enabled, the corrections as well as the values used to
-%D determine the available space are shown (in color). By default
-%D checking is off.
-
-\def\doendtablerow#1#2#3%
- {\dosettableaction#1%
+%D The next macros handle the actual row ending. This macro also take care of space
+%D corrections due to table splitting when \type{\MR} and collegues are used. When
+%D tracing is enabled, the corrections as well as the values used to determine the
+%D available space are shown (in color). By default checking is off.
+
+\def\tabl_table_end_row_indeed#1#2#3%
+ {\tabl_table_set_action#1%
\ifcase#1\relax
% unknown
\or
- \doendoftableline\SR\SR\tablerowfactor\tablerowfactor
+ \tabl_tables_end_line\SR\SR\tablerowfactor\tablerowfactor
\or
- \doendoftableline\FR\FR\tablerowfactor\tablerowzero
+ \tabl_tables_end_line\FR\FR\tablerowfactor\tablerowzero
\or\ifnum\tableforcestate=\tableforcelastrowstate
- \doendoftableline\MR\LR\tablerowzero\tablerowfactor
+ \tabl_tables_end_line\MR\LR\tablerowzero\tablerowfactor
\else\ifnum\tableforcestate=\tableforcefirstrowstate
- \doendoftableline\MR\FR\tablerowfactor\tablerowzero
+ \tabl_tables_end_line\MR\FR\tablerowfactor\tablerowzero
\else
- \doendoftableline\MR\MR\tablerowzero\tablerowzero
+ \tabl_tables_end_line\MR\MR\tablerowzero\tablerowzero
\fi\fi\or
- \doendoftableline\LR\LR\tablerowzero\tablerowfactor
+ \tabl_tables_end_line\LR\LR\tablerowzero\tablerowfactor
\fi
\starttablenoalign
- \dosettableforce\tableunknownstate
+ \tabl_table_set_force\tableunknownstate
\global\currenttablecolumn\zerocount
\ifconditional\preventtablebreak
\nobreak
@@ -1826,61 +1808,57 @@
\fi
\stoptablenoalign}
-%D Handling \type{\AR} is postponed till the next row. The
-%D check takes care of the first and mid rows, the chuck macro
-%D |<|how about that name|>| handles the last row.
+%D Handling \type{\AR} is postponed till the next row. The check takes care of
+%D the first and mid rows, the chuck macro |<|how about that name|>| handles
+%D the last row.
-\unexpanded\def\dotableAR
- {\globallet\dochecktableautorow\dodochecktableautorow
- \globallet\dochucktableautorow\dodochucktableautorow}
+\unexpanded\def\tabl_table_AR
+ {\globallet\tabl_tables_check_auto_row\tabl_tables_check_auto_row_indeed
+ \globallet\tabl_tables_chuck_auto_row\tabl_tables_chuck_auto_row_indeed}
-\let\dochecktableautorow\empty
-\let\dochucktableautorow\empty
+\let\tabl_tables_check_auto_row\empty
+\let\tabl_tables_chuck_auto_row\empty
-\def\dodochecktableautorow
- {\globallet\dochecktableautorow\empty
+\def\tabl_tables_check_auto_row_indeed
+ {\globallet\tabl_tables_check_auto_row\empty
\ifnum\tableactionstate=\tablerulestate \FR\else
\ifnum\tableactionstate=\tableunknownstate\FR\else
\MR\fi\fi}
-\def\dodochucktableautorow
- {\globalletempty\dochecktableautorow
- \globalletempty\dochucktableautorow
+\def\tabl_tables_chuck_auto_row_indeed
+ {\globalletempty\tabl_tables_check_auto_row
+ \globalletempty\tabl_tables_chuck_auto_row
\ifnum\tableactionstate=\tablerulestate \SR\else
\ifnum\tableactionstate=\tableunknownstate\SR\else
\LR\fi\fi}
-%D When a table is split, we also add a tail and when present
-%D we repeat the table head.
-
-%D When tables are split, the spacing before and after a
-%D horizontal rule is corrected according to what we expect.
+%D When a table is split, we also add a tail and when present we repeat the table
+%D head. If a gets split indeed, the spacing before and after a horizontal rule is
+%D corrected according to what we expect.
-\def\doendoftableline#1#2#3#4%
+\def\tabl_tables_end_line#1#2#3#4%
{\ifx#1#2\else
\writestatus\m!TABLE{\string#1\space changed into \string#2}%
\fi
- \expandafter\donormaltablelineformat#3#4\crcr % \crcr nodig ?
+ \expandafter\tabl_table_normal_line_format#3#4\crcr % \crcr nodig ?
\tablenoalign{\nobreak\global\settrue\tableactionstatepermitted}}
-%D In order to prevent (as good as possible) alignment overflow
-%D and therefore \TEX\ error messages, we check the maximum
-%D number of columns. We keep track of the current column and
-%D maximum column by means of two \COUNTERS. Keep in mind that
-%D the number of \type{|}'s and \type{\VL}'s or alike is always
-%D one more than the number of columns.
+%D In order to prevent (as good as possible) alignment overflow and therefore \TEX\
+%D error messages, we check the maximum number of columns. We keep track of the
+%D current column and maximum column by means of two \COUNTERS. Keep in mind that
+%D the number of \type{|}'s and \type{\VL}'s or alike is always one more than the
+%D number of columns.
\newcount\currenttablecolumn
-%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.\footnote{Normally it is, but
-%D \TABLE\ changes the catcode when needed.}
+% DWhile defining this macro we change the \CATCODE\ of \type{|}. When counting the
+% Dbars, we use a non active representation of the bar, simply because we cannot be
+% Dsure if the bar is active or not.\footnote{Normally it is, but \TABLE\ changes
+% Dthe catcode when needed.}
\bgroup
- \catcode\barasciicode\othercatcode \gdef\@@otherbar {|}
- \catcode\barasciicode\activecatcode \gdef\@@useotherbar {\let|\@@otherbar}
+ \catcode\barasciicode\othercatcode \gdef\tabl_table_bar {|}
+ \catcode\barasciicode\activecatcode \gdef\tabl_table_use_bar{\let|\tabl_table_bar}
\egroup
\bgroup \catcode\barasciicode\othercatcode
@@ -1888,7 +1866,7 @@
\gdef\dogettablenofcolumns#1% todo: also divert this to lua as with tabulate
{\bgroup
\cleanupfeatures % needed !
- \@@useotherbar
+ \tabl_table_use_bar
\egroup}
\egroup
@@ -1900,46 +1878,47 @@
%D \sym{\type{\HC}} a horizontal colored line
%D \stopitemize
-\newcount\tablevrulethicknessfactor
-\newcount\tablehrulethicknessfactor
-\newcount\tabledrulespan
-\let \tablecurrentvrulecolor \empty
-\let \tablecurrenthrulecolor \empty
+\newcount\c_tabl_table_vrule_thickness_factor
+\newcount\c_tabl_table_hrule_thickness_factor
+\newcount\c_tabl_table_drule_span
+
+\let\m_tabl_table_vrule_color\empty
+\let\m_tabl_table_hrule_color\empty
\appendtoks
- \let\VL\dotableVL
- \let\VC\dotableVC
- \let\HL\dotableHL
- \let\HC\dotableHC
- \let\VS\dotableVS
- \let\VD\dotableVD
- \let\VT\dotableVT
- \let\VN\dotableVN
+ \let\VL\tabl_table_VL
+ \let\VC\tabl_table_VC
+ \let\HL\tabl_table_HL
+ \let\HC\tabl_table_HC
+ \let\VS\tabl_table_VS
+ \let\VD\tabl_table_VD
+ \let\VT\tabl_table_VT
+ \let\VN\tabl_table_VN
\to \localtabledefinitions
-\def\dotableresetVLvalues
+\def\tabl_table_resetVLvalues
{\global\currenttablecolumn\zerocount}
-\def\dotablevrulecommand#1% global assignments
+\def\tabl_table_vrulecommand#1% global assignments
{\doifelsenumber{#1}
- {\global\tablevrulethicknessfactor#1\relax
- \global\multiply\tablevrulethicknessfactor\m_tabl_table_VLwidth\relax}
- {\xdef\tablecurrentvrulecolor{#1}}}
+ {\global\c_tabl_table_vrule_thickness_factor#1\relax
+ \global\multiply\c_tabl_table_vrule_thickness_factor\m_tabl_table_VLwidth\relax}
+ {\xdef\m_tabl_table_vrule_color{#1}}}
-\unexpanded\def\dotableVL
- {\dochecktableautorow
+\unexpanded\def\tabl_table_VL
+ {\tabl_tables_check_auto_row
\global\advance\currenttablecolumn\plusone
- \dosingleempty\dodotableVL}
+ \dosingleempty\table_tabl_VL_indeed}
-\def\dodotableVL[#1]%
- {\global\let\tablecurrentvrulecolor\empty
- \global\tablevrulethicknessfactor\m_tabl_table_VLwidth\relax
+\def\table_tabl_VL_indeed[#1]%
+ {\global\let\m_tabl_table_vrule_color\empty
+ \global\c_tabl_table_vrule_thickness_factor\m_tabl_table_VLwidth\relax
\iffirstargument
- \rawprocesscommalist[#1]\dotablevrulecommand
+ \rawprocesscommalist[#1]\tabl_table_vrulecommand
\fi
- \donormaltablecomplexbar}% \relax breaks \use
+ \tabl_table_normal_line_complex_bar}% \relax breaks \use
-\let\dotableVC\dotableVL % for mojca
+\let\tabl_table_VC\tabl_table_VL % for mojca
% \starttable[|||]
% \HL
@@ -1949,24 +1928,24 @@
% \HL
% \stoptable
-\unexpanded\def\dotableVS {\VN1}
-\unexpanded\def\dotableVD {\VN2}
-\unexpanded\def\dotableVT {\VN3}
-\unexpanded\def\dotableVN#1{\global\noftablevrules#1\relax\VL}
+\unexpanded\def\tabl_table_VS {\VN1}
+\unexpanded\def\tabl_table_VD {\VN2}
+\unexpanded\def\tabl_table_VT {\VN3}
+\unexpanded\def\tabl_table_VN#1{\global\c_tabl_table_n_of_vrules#1\relax\VL}
-\def\dotablehrulecommand#1% global assignments
+\def\tabl_table_hrulecommand#1% global assignments
{\doifelsenumber{#1}
- {\global\tablehrulethicknessfactor#1\relax
- \global\multiply\tablehrulethicknessfactor\m_tabl_table_HLheight\relax}
- {\xdef\tablecurrenthrulecolor{#1}}}
+ {\global\c_tabl_table_hrule_thickness_factor#1\relax
+ \global\multiply\c_tabl_table_hrule_thickness_factor\m_tabl_table_HLheight\relax}
+ {\xdef\m_tabl_table_hrule_color{#1}}}
-\unexpanded\def\dotableHL
- {\dochucktableautorow
- \dofinishtablerow
+\unexpanded\def\tabl_table_HL
+ {\tabl_tables_chuck_auto_row
+ \tabl_table_finish_row
\starttablenoalign
- \dosingleempty\dodotableHL}
+ \dosingleempty\table_tabl_HL_indeed}
-\def\dodotableHL[#1]%
+\def\table_tabl_HL_indeed[#1]%
{\nobreak
\ifnum\tableactionstate=\tablerulestate
\writestatus\m!TABLE{skipping \string\HL}% \statusmessage
@@ -1977,23 +1956,23 @@
\writestatus\m!TABLE{change \string\MR\space into \string\SR}%
\fi\fi
\bgroup
- \global\tablehrulethicknessfactor\m_tabl_table_HLheight\relax
+ \global\c_tabl_table_hrule_thickness_factor\m_tabl_table_HLheight\relax
\iffirstargument
- \global\let\tablecurrenthrulecolor\empty
- \rawprocesscommalist[#1]\dotablehrulecommand
- \ifx\tablecurrenthrulecolor\empty\else
- \switchtocolor[\tablecurrenthrulecolor]%
+ \global\let\m_tabl_table_hrule_color\empty
+ \rawprocesscommalist[#1]\tabl_table_hrulecommand
+ \ifx\m_tabl_table_hrule_color\empty\else
+ \switchtocolor[\m_tabl_table_hrule_color]%
\fi
\fi
- \donormaltablefullrule
+ \tabl_table_normal_full_rule
\egroup
- \doaccounttablelinewidth
+ \tabl_table_account_width
\fi
- \dosettableaction\tablerulestate
+ \tabl_table_set_action\tablerulestate
\nobreak
\stoptablenoalign}
-\let\dotableHC\dotableHL % for mojca
+\let\tabl_table_HC\tabl_table_HL % for mojca
%D \startitemize[3*ruim]
%D \sym{\type{\NL}} a vertical skip
@@ -2015,41 +1994,41 @@
% n+1 uitleggen
\appendtoks
- \let\TB\dotableTB
- \let\NL\dotableNL % old
- \let\NR\dotableNR
- \let\NC\dotableNC
- \let\FC\dotableNC
- \let\MC\dotableNC
- \let\LC\dotableNC
+ \let\TB\tabl_table_TB
+ \let\NL\tabl_table_NL % old
+ \let\NR\tabl_table_NR
+ \let\NC\tabl_table_NC
+ \let\FC\tabl_table_NC
+ \let\MC\tabl_table_NC
+ \let\LC\tabl_table_NC
\to \localtabledefinitions
-\unexpanded\def\dotableTB
- {\dochucktableautorow
- \dofinishtablerow
+\unexpanded\def\tabl_table_TB
+ {\tabl_tables_chuck_auto_row
+ \tabl_table_finish_row
\starttablenoalign
- \dosingleempty\dodotableTB}
+ \dosingleempty\table_tabl_TB_indeed}
-\def\dodotableTB[#1]%
+\def\table_tabl_TB_indeed[#1]%
{\blank[\iffirstargument#1\else\directtablesparameter\c!NL\fi]%
\nobreak
\stoptablenoalign}
-\let\dotableNL\dotableTB
+\let\tabl_table_NL\tabl_table_TB
-\unexpanded\def\dotableNR
+\unexpanded\def\tabl_table_NR
{\global\currenttablecolumn\zerocount
- \donormaltablelineending
+ \tabl_table_normal_line_ending
\starttablenoalign
\nobreak
- \dosettableaction\tableunknownstate
+ \tabl_table_set_action\tableunknownstate
\stoptablenoalign}
-\unexpanded\def\dotableNC
- {\dochecktableautorow
+\unexpanded\def\tabl_table_NC
+ {\tabl_tables_check_auto_row
\global\advance\currenttablecolumn \plusone
- \donormaltablenobar}
-
+ \tabl_table_normal_no_bar}
+
%D \startitemize[3*broad]
%D \sym{\type{\DL}}
%D \sym{\type{\DV}} (\type{\VD})
@@ -2057,38 +2036,38 @@
%D \sym{\type{\DR}}
%D \stopitemize
-\newconditional\istabledivision
+\newconditional\c_tabl_table_is_division
\appendtoks
- \global\setfalse\istabledivision
- \let\DL\dotableDL
- \let\DC\dotableDC
- \let\DV\dotableDV
- \let\DR\dotableDR
+ \global\setfalse\c_tabl_table_is_division
+ \let\DL\tabl_table_DL
+ \let\DC\tabl_table_DC
+ \let\DV\tabl_table_DV
+ \let\DR\tabl_table_DR
\to \localtabledefinitions
-\def\dochecktabledivision
- {\ifconditional\istabledivision\else
- \dochucktableautorow
+\def\tabl_table_check_division
+ {\ifconditional\c_tabl_table_is_division\else
+ \tabl_tables_chuck_auto_row
\global\currenttablecolumn\zerocount
- \global\settrue\istabledivision
+ \global\settrue\c_tabl_table_is_division
\fi}
-\def\dotabledrulecommand#1% global assignments
+\def\tabl_table_drulecommand#1% global assignments
{\doifelsenumber{#1}
- {\ifcase\tabledrulespan
- \global\tabledrulespan#1\relax
+ {\ifcase\c_tabl_table_drule_span
+ \global\c_tabl_table_drule_span#1\relax
\else
- \global\tablehrulethicknessfactor#1\relax
- \global\multiply\tablehrulethicknessfactor\m_tabl_table_VLwidth\relax
+ \global\c_tabl_table_hrule_thickness_factor#1\relax
+ \global\multiply\c_tabl_table_hrule_thickness_factor\m_tabl_table_VLwidth\relax
\fi}
- {\xdef\tablecurrenthrulecolor{#1}}}
+ {\xdef\m_tabl_table_hrule_color{#1}}}
-\unexpanded\def\dotableDL
- {\dochecktabledivision
- \dosingleempty\dodotableDL}
+\unexpanded\def\tabl_table_DL
+ {\tabl_table_check_division
+ \dosingleempty\table_tabl_DL_indeed}
-\def\dodotableDL[#1]%
+\def\table_tabl_DL_indeed[#1]%
{\ifnum\tableactionstate=\tablerulestate
\writestatus\m!TABLE{skipping \string\DL}%
\else
@@ -2097,67 +2076,67 @@
\else\ifnum\tableactionstate=\tablefirstrowstate
\writestatus\m!TABLE{change \string\MR\space into \string\SR}%
\fi\fi
- \dosettableaction\tableunknownstate
- \global\tablehrulethicknessfactor\m_tabl_table_HLheight\relax
- \global\tabledrulespan\zerocount
+ \tabl_table_set_action\tableunknownstate
+ \global\c_tabl_table_hrule_thickness_factor\m_tabl_table_HLheight\relax
+ \global\c_tabl_table_drule_span\zerocount
\iffirstargument
- \global\let\tablecurrenthrulecolor\empty
- \rawprocesscommalist[#1]\dotabledrulecommand
- % \ifx\tablecurrenthrulecolor\empty\else
- % \switchtocolor[\tablecurrenthrulecolor]% see *DL*
+ \global\let\m_tabl_table_hrule_color\empty
+ \rawprocesscommalist[#1]\tabl_table_drulecommand
+ % \ifx\m_tabl_table_hrule_color\empty\else
+ % \switchtocolor[\m_tabl_table_hrule_color]% see *DL*
% \fi
\fi
- \ifcase\tabledrulespan
+ \ifcase\c_tabl_table_drule_span
\global\advance\currenttablecolumn \plusone
- \donormaltablesinglerule
+ \tabl_table_normal_single_rule
\or
\global\advance\currenttablecolumn \plustwo
- \donormaltablesinglerule
+ \tabl_table_normal_single_rule
\else
\global\advance\currenttablecolumn \plusone
- \donormaltablemultirule
+ \tabl_table_normal_multi_rule
\fi
\fi}
-\unexpanded\def\dotableDV
- {\dotableDCV\donormaltablesimplebar}
+\unexpanded\def\tabl_table_DV
+ {\tabl_table_DCV\tabl_table_normal_line_simple_bar}
-\unexpanded\def\dotableDC
- {\dotableDCV\donormaltablenobar}
+\unexpanded\def\tabl_table_DC
+ {\tabl_table_DCV\tabl_table_normal_no_bar}
-\unexpanded\def\dotableDCV#1%
- {\dochecktabledivision
- \dochecktableautorow
+\unexpanded\def\tabl_table_DCV#1%
+ {\tabl_table_check_division
+ \tabl_tables_check_auto_row
\global\advance\currenttablecolumn \plusone
#1}
-\unexpanded\def\dotableDR
+\unexpanded\def\tabl_table_DR
{\global\currenttablecolumn\zerocount % nog check
- \donormaltablelineending
+ \tabl_table_normal_line_ending
\starttablenoalign
\nobreak
- \global\setfalse\istabledivision
- \doaccounttablelinewidth % temporary solution
- \dosettableaction\tablerulestate
+ \global\setfalse\c_tabl_table_is_division
+ \tabl_table_account_width % temporary solution
+ \tabl_table_set_action\tablerulestate
\stoptablenoalign}
-\def\doaccounttablelinewidth
- {\scratchdimen\tablelinethicknessunit}
-
-\def\dotableTWO {\use\plustwo}
-\def\dotableTHREE {\use\plusthree}
-\def\dotableFOUR {\use\plusfour}
-\def\dotableFIVE {\use\plusfive}
-\def\dotableSIX {\use\plussix}
+\def\tabl_table_account_width
+ {\scratchdimen\d_tabl_table_line_thickness_unit}
+
+\def\tabl_table_TWO {\use\plustwo}
+\def\tabl_table_THREE {\use\plusthree}
+\def\tabl_table_FOUR {\use\plusfour}
+\def\tabl_table_FIVE {\use\plusfive}
+\def\tabl_table_SIX {\use\plussix}
\appendtoks
- \let\TWO \dotableTWO
- \let\THREE\dotableTHREE
- \let\FOUR \dotableFOUR
- \let\FIVE \dotableFIVE
- \let\SIX \dotableSIX
+ \let\TWO \tabl_table_TWO
+ \let\THREE\tabl_table_THREE
+ \let\FOUR \tabl_table_FOUR
+ \let\FIVE \tabl_table_FIVE
+ \let\SIX \tabl_table_SIX
\let\SPAN \use
- \let\REF \dotablereformat
+ \let\REF \tabl_table_reformat
\to \localtabledefinitions
\installcorenamespace{tables}
@@ -2166,19 +2145,19 @@
\installsetuponlycommandhandler \??tables {tables} % some day we can have named tables
-\setvalue{\??tabledistance\v!none }{\dotableOpenUp00\def\LOW{\Lower6 }}
-\setvalue{\??tabledistance\v!small }{\dotableOpenUp00\def\LOW{\Lower6 }} % == baseline
-\setvalue{\??tabledistance\v!medium}{\dotableOpenUp11\def\LOW{\Lower7 }}
-\setvalue{\??tabledistance\v!big }{\dotableOpenUp22\def\LOW{\Lower8 }}
+\setvalue{\??tabledistance\v!none }{\tabl_table_OpenUp00\def\LOW{\Lower6 }}
+\setvalue{\??tabledistance\v!small }{\tabl_table_OpenUp00\def\LOW{\Lower6 }} % == baseline
+\setvalue{\??tabledistance\v!medium}{\tabl_table_OpenUp11\def\LOW{\Lower7 }}
+\setvalue{\??tabledistance\v!big }{\tabl_table_OpenUp22\def\LOW{\Lower8 }}
\appendtoks
\expandnamespaceparameter\??tabledistance\directtablesparameter\c!distance\v!medium
\to \localtabledefinitions
-\setvalue{\??tablealign\v!right }{\def\dotableparalignment{\raggedright}}
-\setvalue{\??tablealign\v!left }{\def\dotableparalignment{\raggedleft}}
-\setvalue{\??tablealign\v!middle }{\def\dotableparalignment{\raggedcenter}}
-\setvalue{\??tablealign\s!unknown}{\def\dotableparalignment{\notragged}}
+\setvalue{\??tablealign\v!right }{\def\tabl_table_paralignment{\raggedright}}
+\setvalue{\??tablealign\v!left }{\def\tabl_table_paralignment{\raggedleft}}
+\setvalue{\??tablealign\v!middle }{\def\tabl_table_paralignment{\raggedcenter}}
+\setvalue{\??tablealign\s!unknown}{\def\tabl_table_paralignment{\notragged}}
\appendtoks
\doifelse{\directtablesparameter\c!distance}\v!none
@@ -2188,11 +2167,11 @@
\def\dohandlebar % here ?
{\ifmmode
- \@EA\domathmodebar
+ \expandafter\domathmodebar
\else\ifintable
- \@EAEAEA\domathmodebar
+ \doubleexpandafter\domathmodebar
\else
- \@EAEAEA\dotextmodebar
+ \doubleexpandafter\dotextmodebar
\fi\fi}
\appendtoks
@@ -2201,10 +2180,10 @@
\assignalfadimension{\directtablesparameter\c!HL}\m_tabl_table_HLheight246%
\to \everysetuptables
-\def\dolocaltablesetup
+\def\tabl_table_local_setups
{\directtablesparameter\c!commands\relax
\usebodyfontparameter\directtablesparameter
- \tablelinethicknessunit\dimexpr\directtablesparameter\c!rulethickness/\tablelinethicknessfactor\relax
+ \d_tabl_table_line_thickness_unit\dimexpr\directtablesparameter\c!rulethickness/\tablelinethicknessfactor\relax
\edef\p_tabl_table_height{\directtablesparameter\c!height}%
\edef\p_tabl_table_depth{\directtablesparameter\c!depth}%
\ifx\p_tabl_table_height\v!strut
@@ -2219,13 +2198,13 @@
\fi
\edef\tablestrutheightfactor{\withoutpt\the\dimexpr10\dimexpr\tablestrutheightfactor\points}%
\edef\tablestrutdepthfactor {\withoutpt\the\dimexpr10\dimexpr\tablestrutdepthfactor \points}%
- \tablestrutunit\dimexpr\normalbaselineskip/12\relax % 12 is default bodyfont
- \tableintercolumnspaceunit.5em plus 1fil minus .25em\relax
- \tablecolumnwidthunit .5em\relax
- \tablekernunit .5em\relax}
+ \d_tabl_table_strut_unit \dimexpr\normalbaselineskip/12\relax % 12 is default bodyfont
+ \d_tabl_table_kern_unit .5em\relax
+ \s_tabl_table_inter_column_space_unit.5em plus 1fil minus .25em\relax
+ \d_tabl_table_column_width_unit \d_tabl_table_kern_unit
+ \d_tabl_table_kern_unit \d_tabl_table_kern_unit}
-%D As one can see, we didn't only add color, but also more
-%D control over spacing.
+%D As one can see, we didn't only add color, but also more control over spacing.
%D
%D \startbuffer[a]
%D \starttable[|c|]
@@ -2257,11 +2236,10 @@
%D
%D \typebuffer[b]
%D
-%D The first table is typeset using the default height and
-%D depth factors .8 and .4. The second table has both factors
-%D set to \type {strut}, and the third table shows what
-%D happens when we set the values to zero. The rightmost table
-%D is typeset using the tabulate environment.
+%D The first table is typeset using the default height and depth factors .8 and .4.
+%D The second table has both factors set to \type {strut}, and the third table shows
+%D what happens when we set the values to zero. The rightmost table is typeset using
+%D the tabulate environment.
%D
%D \startcombination[4*1]
%D {$\vcenter{\getbuffer[a]}$}
diff --git a/Master/texmf-dist/tex/context/base/tabl-tbl.lua b/Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.lua
index 13d899de647..13d899de647 100644
--- a/Master/texmf-dist/tex/context/base/tabl-tbl.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.lua
diff --git a/Master/texmf-dist/tex/context/base/tabl-tbl.mkiv b/Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.mkiv
index ae4f03825a7..c8d7d5aae6d 100644
--- a/Master/texmf-dist/tex/context/base/tabl-tbl.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.mkiv
@@ -262,14 +262,21 @@
\expandafter\tabl_tabulate_initialize_boxes_step
\fi}
+% \def\tabl_tabulate_initialize_box#1% also used elsewhere
+% {\ifcsname\??tabulatebox\number#1\endcsname
+% \tabl_tabulate_initialize_box_yes#1%
+% \else
+% \tabl_tabulate_initialize_box_nop#1%
+% \fi}
\def\tabl_tabulate_initialize_box#1% also used elsewhere
{\ifcsname\??tabulatebox\number#1\endcsname
- \tabl_tabulate_initialize_box_yes#1%
+ \tabl_tabulate_initialize_box_yes
\else
\tabl_tabulate_initialize_box_nop#1%
\fi}
-\def\tabl_tabulate_initialize_box_yes#1{\global \setbox\csname\??tabulatebox\number#1\endcsname\emptybox}
+%def\tabl_tabulate_initialize_box_yes#1{\global \setbox\csname\??tabulatebox\number#1\endcsname\emptybox}
+\def\tabl_tabulate_initialize_box_yes {\global \setbox\lastnamedcs\emptybox}
\def\tabl_tabulate_initialize_box_nop#1{\expandafter\newbox\csname\??tabulatebox\number#1\endcsname}
\tabl_tabulate_initialize_boxes{16} % not really needed
@@ -322,7 +329,7 @@
\fi}
\unexpanded\def\tabl_tabulate_setups_check
- {\csname\??tabulatesetup\the\c_tabl_tabulate_column\endcsname}
+ {\begincsname\??tabulatesetup\the\c_tabl_tabulate_column\endcsname}
\unexpanded\def\tabl_tabulate_entry_before{\ignorespaces\tabl_tabulate_hook}
\unexpanded\def\tabl_tabulate_entry_after {\unskip\unskip\ifmmode\else\endgraf\fi}
@@ -372,7 +379,7 @@
\unexpanded\def\tabl_tabulate_check_local_vrule_color_second#1%
{\relax
\ifx\m_tabl_tabulate_vrule_color_local\empty
- \gdef\m_tabl_tabulate_vrule_color{#1}%
+ \xdef\m_tabl_tabulate_vrule_color{#1}%
\else
\global\let\m_tabl_tabulate_vrule_color\m_tabl_tabulate_vrule_color_local
\global\let\m_tabl_tabulate_vrule_color_local\empty
@@ -421,7 +428,7 @@
\let\tabl_tabulate_hook_g\donothing
\def\tabl_tabulate_set_preamble_step#1#2% only makes sense for many tabulates
- {\normalexpanded{\t_tabl_tabulate_preamble{\the\t_tabl_tabulate_preamble
+ {\etoksapp\t_tabl_tabulate_preamble{%
\tabl_tabulate_check_local_vrule_thickness\constantdimenargument\d_tabl_tabulate_vrulethickness
\tabl_tabulate_check_local_vrule_color\constantemptyargument\m_tabl_tabulate_vrule_color
\tabl_tabulate_check_local_color\constantemptyargument\m_tabl_tabulate_color\constantnumberargument\c_tabl_tabulate_colorspan
@@ -429,7 +436,6 @@
\aligntab
\tabl_tabulate_column_vrule_inject
\tabl_tabulate_color_side_left
-% \tabl_tabulate_inject_pre_skip{\the\s_tabl_tabulate_pre}%
\tabl_tabulate_inject_pre_skip{\the\dimexpr\s_tabl_tabulate_pre}% get rid of plus
\alignmark\alignmark
\aligntab
@@ -499,8 +505,8 @@
\noexpand\dostoptagged
\tabl_tabulate_inject_post_skip{\the\dimexpr\s_tabl_tabulate_post}% get rid of plus
\alignmark\alignmark
- }}%
- \t_tabl_tabulate_dummy\expandafter{\the\t_tabl_tabulate_dummy\NC}%
+ }%
+ \toksapp\t_tabl_tabulate_dummy{\NC}%
\s_tabl_tabulate_pre.5\d_tabl_tabulate_unit\relax
\ifnum\c_tabl_tabulate_columns<\numexpr\c_tabl_tabulate_nofcolumns-\plusone\relax
\s_tabl_tabulate_post\s_tabl_tabulate_pre
@@ -535,10 +541,11 @@
\tabl_tabulate_set_preamble}
\installtabulatepreambleoption{R}{\t_tabl_tabulate_font{\rm}%
\tabl_tabulate_set_preamble}
-\installtabulatepreambleoption{m}{\t_tabl_tabulate_bmath{$}%
- \t_tabl_tabulate_emath{$}%
+\installtabulatepreambleoption{m}{\t_tabl_tabulate_bmath{\normalstartimath}%
+ \t_tabl_tabulate_emath{\normalstopimath}%
\tabl_tabulate_set_preamble}
-\installtabulatepreambleoption{M}{\t_tabl_tabulate_bmath{$\displaystyle}\t_tabl_tabulate_emath{$}%
+\installtabulatepreambleoption{M}{\t_tabl_tabulate_bmath{\normalstartimath\displaystyle}%
+ \t_tabl_tabulate_emath{\normalstopimath}%
\tabl_tabulate_set_preamble}
\installtabulatepreambleoption{h}{\tabl_tabulate_set_hook}
\installtabulatepreambleoption{b}{\tabl_tabulate_set_before}
@@ -586,7 +593,8 @@
\def\tabl_tabulate_set_preamble#1%
{\ifcsname\??tabulatepreamble\string#1\endcsname
- \expandafter\tabl_tabulate_set_preamble_yes
+ %\expandafter\tabl_tabulate_set_preamble_yes
+ \expandafter\expandafter\expandafter\lastnamedcs\expandafter\gobbleoneargument
\else
\expandafter\tabl_tabulate_set_preamble_nop
\fi{#1}}
@@ -791,19 +799,19 @@
\fi}
\def\tabl_tabulate_set_last_entry#1% rulespec
- {\global\let\m_tabl_tabulate_vrule_color\empty
- \rawprocesscommalist[#1]\tabl_tabulate_set_vrule_command
+ {\global\let\m_tabl_tabulate_color\empty
+ \global\let\m_tabl_tabulate_vrule_color\empty
+ \edef\currenttabulationtrulespec{#1}%
\ifx\currenttabulationtrulespec\empty
\global\d_tabl_tabulate_vrulethickness\zeropoint
\else
\global\d_tabl_tabulate_vrulethickness\d_tabl_tabulate_vrulethickness_default
\rawprocesscommalist[#1]\tabl_tabulate_set_vrule_command
\fi
- \normalexpanded{\t_tabl_tabulate_preamble{\the\t_tabl_tabulate_preamble
+ \etoksapp\t_tabl_tabulate_preamble{%
\tabl_tabulate_check_local_vrule_thickness\constantdimenargument\d_tabl_tabulate_vrulethickness
\tabl_tabulate_check_local_vrule_color\constantemptyargument\m_tabl_tabulate_vrule_color
- \tabl_tabulate_column_vrule_inject}}%
- }
+ \tabl_tabulate_column_vrule_inject}}
\let\settabulateentry \tabl_tabulate_set_entry % used at the lua end
\let\settabulatelastentry\tabl_tabulate_set_last_entry % used at the lua end
@@ -830,7 +838,7 @@
\fi}
\def\tabl_tabulate_check_whitespace
- {\setbox\scratchbox\vbox
+ {\setbox\scratchbox\vpack
{\splitdiscards
\unskip
\ifdim\lastskip>\d_tabl_tabulate_splitoff_betweenskip
@@ -853,7 +861,7 @@
\tabl_tabulate_check_whitespace
\fi
\tabl_tabulate_color_repeat % needs to end up in a cell
- \setbox\b_tabl_tabulate\hbox to \wd\b_tabl_tabulate
+ \setbox\b_tabl_tabulate\hpack to \wd\b_tabl_tabulate
{\hss\tabl_tabulate_hook_yes{\box\b_tabl_tabulate}\hss}%
\tabl_tabulate_normalize_splitline
\tabl_tabulate_check_linenumbers
@@ -1054,7 +1062,8 @@
\def\tabl_tabulate_check_full_content % - needed, else confusion with \c!header
{\ifcsname\??tabulatehead\currenttabulation\endcsname
- \expandafter\ifx\csname\??tabulatehead\currenttabulation\endcsname\empty
+ %\expandafter\ifx\csname\??tabulatehead\currenttabulation\endcsname\empty
+ \expandafter\ifx\lastnamedcs\empty
\let\tabl_tabulate_insert_head\empty
\else
\let\tabl_tabulate_insert_head\tabl_tabulate_insert_head_content
@@ -1064,6 +1073,7 @@
\fi
\ifcsname\??tabulatefoot\currenttabulation\endcsname
\expandafter\ifx\csname\??tabulatefoot\currenttabulation\endcsname\empty
+ %\expandafter\ifx\lastnamedcs\empty
\let\tabl_tabulate_insert_foot\empty
\else
\let\tabl_tabulate_insert_foot\tabl_tabulate_insert_head_content
@@ -1210,6 +1220,9 @@
\fi
\bgroup % settings
%
+ \t_tabl_tabulate_preamble\emptytoks
+ \t_tabl_tabulate_dummy \emptytoks
+ %
\resetcharacteralign
%
\edef\p_distance {\tabulationparameter\c!distance}%
@@ -1426,7 +1439,7 @@
\def\tabl_tabulate_column_rule_separator_step#1%
{\ifcsname\??tabulateseparator#1\endcsname
- \csname\??tabulateseparator#1\endcsname
+ \lastnamedcs
\else
\s_tabl_tabulate_separator#1\relax
\fi}
@@ -1533,18 +1546,15 @@
\global\c_tabl_tabulate_max_colorcolumn\c_tabl_tabulate_column
\fi
\setxvalue{\??tabulatecolor\the\c_tabl_tabulate_column}{#1}%
- %\attribute\alignbackgroundattribute\plusone
- %\dousecolorparameter{#1}\char\zerocount\strut % hack
- \hbox \thealignbackgroundcolorattr{#1}{}%
+ \hbox \thealignbackgroundcolorattr{#1}{}% pack ?
\endgroup}
\def\tabl_tabulate_color_repeat_second % for split off lines
{\begingroup
\scratchcounter\numexpr\c_tabl_tabulate_column-\plusone\relax % ugly !
\ifcsname\??tabulatecolor\the\scratchcounter\endcsname
- %\expandafter\dousecolorparameter\csname\??tabulatecolor\the\scratchcounter\endcsname
- %\strut\char\zerocount % hack
- \hbox \thealignbackgroundcolorattr{\csname\??tabulatecolor\the\scratchcounter\endcsname}{}%
+ %\hbox \thealignbackgroundcolorattr{\csname\??tabulatecolor\the\scratchcounter\endcsname}{}% pack ?
+ \hbox \thealignbackgroundcolorattr{\lastnamedcs}{}% pack ?
\fi
\endgroup}
@@ -1617,7 +1627,7 @@
\def\tabl_tabulate_flush_indent
{\ifnum\c_tabl_tabulate_column=\zerocount
- \hbox to \d_tabl_tabulate_indent
+ \hbox to \d_tabl_tabulate_indent % pack ?
{% we now have a local hsize, and since we want to
% register positional info (i.e. real hsizes) we
% need to reconstitute the original hsize
@@ -1907,11 +1917,28 @@
\tabl_tabulate_nobreak_inject
\stoptabulatenoalign}
+% \unexpanded\def\tabl_tabulate_ML_second_indeed
+% {\tabl_tabulate_column_rule_separator_inject
+% \tabl_tabulate_hrule_inject
+% \vskip-\p_rulethickness\relax
+% \tabl_tabulate_hrule_inject
+% \tabl_tabulate_break_no
+% \tabl_tabulate_column_rule_separator_inject
+% \stoptabulatenoalign}
+
+\def\spac_vspacing_no_topskip % use grouped
+ {\attribute\skipcategoryattribute\plusten}
+
\unexpanded\def\tabl_tabulate_ML_second_indeed
- {\tabl_tabulate_column_rule_separator_inject
+ {\tabl_tabulate_break_no
+ \tabl_tabulate_column_rule_separator_inject
+ \tabl_tabulate_break_no
\tabl_tabulate_hrule_inject
\vskip-\p_rulethickness\relax
+ \begingroup
+ \spac_vspacing_no_topskip
\tabl_tabulate_hrule_inject
+ \endgroup
\tabl_tabulate_break_no
\tabl_tabulate_column_rule_separator_inject
\stoptabulatenoalign}
@@ -2106,11 +2133,11 @@
% \edef\totaltabulatecolumns{\the\numexpr3*\c_tabl_tabulate_columns+\plusfour}%
\d_tabl_tabulate_width\zeropoint
\tabl_tabulate_initialize_boxes\c_tabl_tabulate_columns
- \t_tabl_tabulate_preamble\expandafter{\the\t_tabl_tabulate_preamble
+ \toksapp\t_tabl_tabulate_preamble{%
\aligntab\alignmark\alignmark
\global\advance\c_tabl_tabulate_column\plusone % maybe just set it already
}%
- \t_tabl_tabulate_dummy\expandafter{\the\t_tabl_tabulate_dummy
+ \toksapp\t_tabl_tabulate_dummy{%
\NC\unskip\unskip\crcr\tabl_tabulate_flush_collected % no count
}%
\global\c_tabl_tabulate_column\zerocount
@@ -2171,6 +2198,7 @@
\dostarttagged\t!tabulaterow\empty
\setfalse\inhibitmargindata % new per 2012.06.13 ... really needed
\everycr\expandafter{\the\everycr\dostoptagged\dostarttagged\t!tabulaterow\empty}%
+ % \toksapp\everycr{\dostoptagged\dostarttagged\t!tabulaterow\empty}%
\expandafter\halign\expandafter{\the\t_tabl_tabulate_preamble\crcr\tabl_tabulate_insert_content\crcr}%
\dostoptagged
\dostoptagged
diff --git a/Master/texmf-dist/tex/context/base/tabl-tsp.mkiv b/Master/texmf-dist/tex/context/base/mkiv/tabl-tsp.mkiv
index 64ab94a67da..e0c3b9b746b 100644
--- a/Master/texmf-dist/tex/context/base/tabl-tsp.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-tsp.mkiv
@@ -257,6 +257,8 @@
\global\setfalse\usesamefloatnumber % new, prevent next increment
\global\setfalse\splitfloatfirstdone} % we can use this one for tests
+\newconditional\tabl_split_forced_page
+
\def\tabl_split_loop_body
{\ifinsidecolumns
% brrr, assumes empty columns
@@ -303,8 +305,22 @@
\splittopskip\zeropoint
\doloop % inner loop
{\setbox\scratchbox\vsplit\tsplitcontent to \onepoint % \lineheight
- \setbox\scratchbox\vbox{\unvbox\scratchbox}%
- \ifdim\dimexpr\d_tabl_split_available-\htdp\scratchbox-\htdp\tsplitresult\relax>\zeropoint
+ \setbox\scratchbox\vbox % \vpack
+ {\unvbox\scratchbox
+ \setbox\scratchbox\vbox
+ {\splitdiscards
+ \ifnum\lastpenalty>-\plustenthousand\else
+ % so that \bTR[before=\page] works
+ \global\settrue\tabl_split_forced_page
+ \fi}}%
+ \ifconditional\tabl_split_forced_page
+ \global\setfalse\tabl_split_forced_page
+ \setbox\tsplitresult\vbox
+ {\unvbox\tsplitresult
+ \tsplitinbetween
+ \unvbox\scratchbox}%
+ \exitloop
+ \else\ifdim\dimexpr\d_tabl_split_available-\htdp\scratchbox-\htdp\tsplitresult\relax>\zeropoint
\setbox\tsplitresult\vbox
{\unvbox\tsplitresult
\tsplitinbetween
@@ -328,7 +344,7 @@
\tsplitinbetween
\ifvoid\tsplitcontent\else\unvbox\tsplitcontent\fi}%
\exitloop
- \fi\fi\fi
+ \fi\fi\fi\fi
\setfalse\c_tabl_split_head
\setfalse\c_tabl_split_full}%
\postprocesstsplit
diff --git a/Master/texmf-dist/tex/context/base/tabl-xnt.mkvi b/Master/texmf-dist/tex/context/base/mkiv/tabl-xnt.mkvi
index fd2de5a13cd..fd2de5a13cd 100644
--- a/Master/texmf-dist/tex/context/base/tabl-xnt.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-xnt.mkvi
diff --git a/Master/texmf-dist/tex/context/base/tabl-xtb.lua b/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.lua
index 4bf8e3107ec..87d5fa12150 100644
--- a/Master/texmf-dist/tex/context/base/tabl-xtb.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.lua
@@ -68,6 +68,7 @@ local getfield = nuts.getfield
local getbox = nuts.getbox
local setfield = nuts.setfield
+local setlink = nuts.setlink
local copy_node_list = nuts.copy_list
local hpack_node_list = nuts.hpack
@@ -573,11 +574,13 @@ function xtables.reflow_width()
widths[c] = fixedwidth
width = width + fixedwidth
else
- width = width + widths[c]
- if width > maxwidth then
+ local wc = widths[c]
+ width = width + wc
+ -- if width > maxwidth then
+ if wc > maxwidth then -- per 2015-08-09
autowidths[c] = true
nofwide = nofwide + 1
- widetotal = widetotal + widths[c]
+ widetotal = widetotal + wc
end
end
if c < nofcolumns then
@@ -822,13 +825,11 @@ function xtables.construct()
-- setfield(list,"height",0)
-- setfield(list,"depth",0)
-- faster:
- local h = new_hlist()
- setfield(h,"list",list)
+ local h = new_hlist(list)
list = h
--
if start then
- setfield(stop,"next",list)
- setfield(list,"prev",stop)
+ setlink(stop,list)
else
start = list
end
@@ -840,8 +841,7 @@ function xtables.construct()
end
local kern = new_kern(step)
if stop then
- setfield(stop,"next",kern)
- setfield(kern,"prev",stop)
+ setlink(stop,kern)
else -- can be first spanning next row (ny=...)
start = kern
end
@@ -850,8 +850,7 @@ function xtables.construct()
if start then
if rightmargindistance > 0 then
local kern = new_kern(rightmargindistance)
- setfield(stop,"next",kern)
- setfield(kern,"prev",stop)
+ setlink(stop,kern)
-- stop = kern
end
return start, heights[r] + depths[r], hasspan
@@ -1248,3 +1247,27 @@ implement { name = "x_table_set_reflow_height", actions = xtables.set_re
implement { name = "x_table_set_construct", actions = xtables.set_construct }
implement { name = "x_table_r", actions = function() context(data.currentrow or 0) end }
implement { name = "x_table_c", actions = function() context(data.currentcolumn or 0) end }
+
+-- experiment:
+
+do
+
+ local context = context
+
+ local startxtable = context.startxtable
+ local stopxtable = context.stopxtable
+
+ local startcollecting = context.startcollecting
+ local stopcollecting = context.stopcollecting
+
+ function context.startxtable(...)
+ startcollecting()
+ startxtable(...)
+ end
+
+ function context.stopxtable()
+ stopxtable()
+ stopcollecting()
+ end
+
+end
diff --git a/Master/texmf-dist/tex/context/base/tabl-xtb.mkvi b/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.mkvi
index 73ba9104551..851b6e80f84 100644
--- a/Master/texmf-dist/tex/context/base/tabl-xtb.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.mkvi
@@ -86,7 +86,7 @@
\numexpr\tablecellcolumns\relax
\numexpr\raggedstatus\relax}%
\def\dotagxtablesignal
- {\char\zerocount}% not used
+ {\signalcharacter}% not used
\to \everyenableelements
\newdimen\d_tabl_x_width
@@ -718,6 +718,19 @@
\letvalue{\??xtablecheck\currentxtable}\relax % faster than checking parent
\to \everysetupxtable
+% \definefontfamily[newtimes][serif][TeX Gyre Termes]
+% \setupxtable[newtimes][foregroundstyle=\newtimes]
+% \startxcell[newtimes] ...\stopxcell
+% \startxcell[foregroundstyle=\newtimes] ...\stopxcell
+
+% % \ifcsname\namedxtablehash{#tag}\s!parent\endcsname
+% % \ifcsname\??xtablecheck#tag\endcsname
+% \ifcsname\??xtablecheck\detokenize\expandafter{\normalexpanded{#tag}}\endcsname % two times slower on keywords
+% \expandafter\whatever % but more tolerant for tricky key=value
+% \else
+% \expandafter\whatever
+% \fi[#tag]
+
% groups
\unexpanded\def\startxgroup
@@ -728,8 +741,7 @@
{\endgroup}
\unexpanded\def\tabl_x_start_group_delayed_one[#tag]%
-% {\ifcsname\namedxtablehash{#tag}\s!parent\endcsname
- {\ifcsname\??xtablecheck#tag\endcsname
+ {\ifcsname\??xtablecheck\detokenize\expandafter{\normalexpanded{#tag}}\endcsname
\expandafter\tabl_x_start_group_delayed_two
\else
\expandafter\setupcurrentxtable
@@ -754,8 +766,7 @@
\doifelsenextoptionalcs\tabl_x_start_cell_delayed_one\tabl_x_start_cell_nop}
\unexpanded\def\tabl_x_start_cell_delayed_one[#tag]%
-% {\ifcsname\namedxtablehash{#tag}\s!parent\endcsname
- {\ifcsname\??xtablecheck#tag\endcsname
+ {\ifcsname\??xtablecheck\detokenize\expandafter{\normalexpanded{#tag}}\endcsname
\expandafter\tabl_x_start_cell_delayed_two
\else
\expandafter\tabl_x_start_cell_yes
@@ -779,8 +790,7 @@
\doifelsenextoptionalcs\tabl_x_start_row_delayed_one\tabl_x_start_row_nop}
\unexpanded\def\tabl_x_start_row_delayed_one[#tag]%
-% {\ifcsname\namedxtablehash{#tag}\s!parent\endcsname
- {\ifcsname\??xtablecheck#tag\endcsname
+ {\ifcsname\??xtablecheck\detokenize\expandafter{\normalexpanded{#tag}}\endcsname
\expandafter\tabl_x_start_row_delayed_two
\else
\expandafter\tabl_x_start_row_yes
diff --git a/Master/texmf-dist/tex/context/base/task-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/task-ini.lua
index 062f0208f18..eaf342234de 100644
--- a/Master/texmf-dist/tex/context/base/task-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/task-ini.lua
@@ -65,7 +65,8 @@ appendaction("processors", "lists", "languages.visualizediscretionaries"
-- appendaction("processors", "lists", "typesetters.initials.handler") -- disabled
-appendaction("shipouts", "normalizers", "nodes.handlers.cleanuppage") -- disabled
+appendaction("shipouts", "normalizers", "typesetters.margins.finalhandler") -- disabled
+------------("shipouts", "normalizers", "nodes.handlers.cleanuppage") -- disabled
appendaction("shipouts", "normalizers", "builders.paragraphs.expansion.trace") -- disabled
appendaction("shipouts", "normalizers", "typesetters.alignments.handler")
appendaction("shipouts", "normalizers", "nodes.references.handler") -- disabled
@@ -88,26 +89,30 @@ appendaction("shipouts", "finishers", "attributes.viewerlayers.handler")
--maybe integrate relocate and families
-appendaction("math", "normalizers", "noads.handlers.showtree", nil, "nohead")
+appendaction("math", "normalizers", "noads.handlers.showtree", nil, "nohead")
-appendaction("math", "normalizers", "noads.handlers.unscript", nil, "nohead") -- always on (maybe disabled)
-appendaction("math", "normalizers", "noads.handlers.variants", nil, "nohead") -- always on
-appendaction("math", "normalizers", "noads.handlers.relocate", nil, "nohead") -- always on
-appendaction("math", "normalizers", "noads.handlers.families", nil, "nohead") -- always on
+appendaction("math", "normalizers", "noads.handlers.unscript", nil, "nohead") -- always on (maybe disabled)
+appendaction("math", "normalizers", "noads.handlers.variants", nil, "nohead") -- always on
+appendaction("math", "normalizers", "noads.handlers.relocate", nil, "nohead") -- always on
+appendaction("math", "normalizers", "noads.handlers.families", nil, "nohead") -- always on
-appendaction("math", "normalizers", "noads.handlers.render", nil, "nohead") -- always on
-appendaction("math", "normalizers", "noads.handlers.collapse", nil, "nohead") -- always on
-appendaction("math", "normalizers", "noads.handlers.resize", nil, "nohead") -- always on
-------------("math", "normalizers", "noads.handlers.respace", nil, "nohead") -- always on
-appendaction("math", "normalizers", "noads.handlers.check", nil, "nohead") -- always on
-appendaction("math", "normalizers", "noads.handlers.tags", nil, "nohead") -- disabled
-appendaction("math", "normalizers", "noads.handlers.italics", nil, "nohead") -- disabled
-appendaction("math", "normalizers", "noads.handlers.classes", nil, "nohead") -- disabled
+appendaction("math", "normalizers", "noads.handlers.render", nil, "nohead") -- always on
+appendaction("math", "normalizers", "noads.handlers.collapse", nil, "nohead") -- * first-- always on
+appendaction("math", "normalizers", "noads.handlers.domains", nil, "nohead") -- * last -- disabled
+appendaction("math", "normalizers", "noads.handlers.autofences",nil, "nohead") -- disabled
+appendaction("math", "normalizers", "noads.handlers.resize", nil, "nohead") -- always on
+------------("math", "normalizers", "noads.handlers.respace", nil, "nohead") -- always on
+appendaction("math", "normalizers", "noads.handlers.alternates",nil, "nohead") -- always on
+appendaction("math", "normalizers", "noads.handlers.tags", nil, "nohead") -- disabled
+appendaction("math", "normalizers", "noads.handlers.italics", nil, "nohead") -- disabled
+appendaction("math", "normalizers", "noads.handlers.classes", nil, "nohead") -- disabled
appendaction("math", "builders", "builders.kernel.mlist_to_hlist") -- always on
------------("math", "builders", "noads.handlers.italics", nil, "nohead") -- disabled
appendaction("math", "builders", "typesetters.directions.processmath") -- disabled (has to happen pretty late)
+appendaction("finalizers", "lists", "typesetters.paragraphs.normalize") -- moved here
+appendaction("finalizers", "lists", "typesetters.margins.localhandler") -- disabled
appendaction("finalizers", "lists", "builders.paragraphs.keeptogether")
------------("finalizers", "lists", "nodes.handlers.graphicvadjust") -- todo
appendaction("finalizers", "fonts", "builders.paragraphs.solutions.splitters.optimize") -- experimental
@@ -115,13 +120,15 @@ appendaction("finalizers", "lists", "builders.paragraphs.tag")
-- still experimental
+appendaction("mvlbuilders", "normalizers", "typesetters.margins.globalhandler") -- disabled
appendaction("mvlbuilders", "normalizers", "nodes.handlers.migrate")
appendaction("mvlbuilders", "normalizers", "builders.vspacing.pagehandler") -- last !
-appendaction("mvlbuilders", "normalizers", "builders.profiling.pagehandler") -- here !
+appendaction("mvlbuilders", "normalizers", "builders.profiling.pagehandler") -- here !
+------------("vboxbuilders", "normalizers", "typesetters.margins.localhandler")
appendaction("vboxbuilders", "normalizers", "builders.vspacing.vboxhandler")
-appendaction("vboxbuilders", "normalizers", "builders.profiling.vboxhandler") -- here !
+appendaction("vboxbuilders", "normalizers", "builders.profiling.vboxhandler") -- here !
-- experimental too
@@ -157,7 +164,9 @@ disableaction("processors", "typesetters.kerns.handler")
disableaction("processors", "typesetters.italics.handler")
disableaction("processors", "languages.visualizediscretionaries")
disableaction("processors", "nodes.handlers.stripping")
+disableaction("processors", "builders.paragraphs.solutions.splitters.split")
+disableaction("shipouts", "typesetters.margins.finalhandler")
disableaction("shipouts", "builders.paragraphs.expansion.trace")
disableaction("shipouts", "typesetters.alignments.handler")
disableaction("shipouts", "nodes.rules.handler")
@@ -173,16 +182,11 @@ disableaction("shipouts", "nodes.visualizers.handler")
disableaction("shipouts", "nodes.handlers.accessibility")
disableaction("shipouts", "nodes.handlers.backgrounds")
disableaction("shipouts", "nodes.handlers.alignbackgrounds")
-
disableaction("shipouts", "nodes.references.handler")
disableaction("shipouts", "nodes.destinations.handler")
+-------------("shipouts", "nodes.handlers.export")
---~ disableaction("shipouts", "nodes.handlers.export")
-
-disableaction("mvlbuilders", "nodes.handlers.migrate")
-
-disableaction("processors", "builders.paragraphs.solutions.splitters.split")
-
+disableaction("finalizers", "typesetters.margins.localhandler")
disableaction("finalizers", "builders.paragraphs.keeptogether")
disableaction("finalizers", "builders.paragraphs.solutions.splitters.optimize")
-------------("finalizers", "nodes.handlers.graphicvadjust") -- sort of obsolete
@@ -191,12 +195,17 @@ disableaction("finalizers", "builders.paragraphs.tag")
disableaction("math", "noads.handlers.showtree")
disableaction("math", "noads.handlers.tags")
disableaction("math", "noads.handlers.italics")
+disableaction("math", "noads.handlers.domains")
disableaction("math", "noads.handlers.classes")
+disableaction("math", "noads.handlers.autofences")
disableaction("math", "typesetters.directions.processmath")
+disableaction("mvlbuilders", "typesetters.margins.globalhandler")
+disableaction("mvlbuilders", "nodes.handlers.migrate")
disableaction("mvlbuilders", "typesetters.checkers.handler")
disableaction("mvlbuilders", "builders.profiling.pagehandler")
+-------------("vboxbuilders","typesetters.margins.localhandler")
disableaction("vboxbuilders","typesetters.checkers.handler")
disableaction("vboxbuilders","builders.profiling.vboxhandler")
@@ -235,10 +244,10 @@ disableaction("processors", "builders.kernel.kerning")
directives.register("nodes.basepass", function(v)
if v then
- disableaction("processors", "builders.kernel.ligaturing")
- disableaction("processors", "builders.kernel.kerning")
- else
enableaction("processors", "builders.kernel.ligaturing")
enableaction("processors", "builders.kernel.kerning")
+ else
+ disableaction("processors", "builders.kernel.ligaturing")
+ disableaction("processors", "builders.kernel.kerning")
end
end)
diff --git a/Master/texmf-dist/tex/context/base/task-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/task-ini.mkiv
index 6cdbe739f15..6cdbe739f15 100644
--- a/Master/texmf-dist/tex/context/base/task-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/task-ini.mkiv
diff --git a/Master/texmf-dist/tex/context/base/mkiv/toks-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/toks-ini.lua
new file mode 100644
index 00000000000..132605d385a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/toks-ini.lua
@@ -0,0 +1,281 @@
+if not modules then modules = { } end modules ['toks-ini'] = {
+ version = 1.001,
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+tokens = tokens or { }
+
+local tokens = tokens
+local token = token -- the built in one
+local tonumber = tonumber
+local tostring = tostring
+local utfchar = utf.char
+local char = string.char
+local printtable = table.print
+local concat = table.concat
+
+if setinspector then
+
+ local istoken = token.is_token
+ local simple = { letter = "letter", other_char = "other" }
+
+ local function astable(t)
+ if t and istoken(t) then
+ local cmdname = t.cmdname
+ local simple = simple[cmdname]
+ if simple then
+ return {
+ category = simple,
+ character = utfchar(t.mode) or nil,
+ }
+ else
+ return {
+ command = t.command,
+ id = t.id,
+ tok = t.tok,
+ csname = t.csname,
+ active = t.active,
+ expandable = t.expandable,
+ protected = t.protected,
+ mode = t.mode,
+ index = t.index,
+ cmdname = cmdname,
+ }
+ end
+ end
+ end
+
+ tokens.istoken = istoken
+ tokens.astable = astable
+
+ setinspector("token",function(v) if istoken(v) then printtable(astable(v),tostring(v)) return true end end)
+
+end
+
+local scan_toks = token.scan_toks
+local scan_string = token.scan_string
+local scan_int = token.scan_int
+local scan_code = token.scan_code
+local scan_dimen = token.scan_dimen
+local scan_glue = token.scan_glue
+local scan_keyword = token.scan_keyword
+local scan_token = token.scan_token
+local scan_word = token.scan_word
+local scan_number = token.scan_number
+local scan_csname = token.scan_csname
+
+local get_next = token.get_next
+
+local set_macro = token.set_macro
+local get_cmdname = token.get_cmdname
+local create_token = token.create
+
+function tokens.defined(name)
+ return get_cmdname(create_token(name)) ~= "undefined_cs"
+end
+
+-- set_macro = function(k,v,g)
+-- if g == "global" then
+-- context.setgvalue(k,v or '')
+-- else
+-- context.setvalue(k,v or '')
+-- end
+-- end
+
+local bits = {
+ escape = 2^ 0,
+ begingroup = 2^ 1,
+ endgroup = 2^ 2,
+ mathshift = 2^ 3,
+ alignment = 2^ 4,
+ endofline = 2^ 5,
+ parameter = 2^ 6,
+ superscript = 2^ 7,
+ subscript = 2^ 8,
+ ignore = 2^ 9,
+ space = 2^10, -- 1024
+ letter = 2^11,
+ other = 2^12,
+ active = 2^13,
+ comment = 2^14,
+ invalid = 2^15,
+ --
+ character = 2^11 + 2^12,
+ whitespace = 2^13 + 2^10, -- / needs more checking
+ --
+ open = 2^10 + 2^1, -- space + begingroup
+ close = 2^10 + 2^2, -- space + endgroup
+}
+
+-- for k, v in next, bits do bits[v] = k end
+
+tokens.bits = bits
+
+local space_bits = bits.space
+
+-- words are space or \relax terminated and the trailing space is gobbled; a word
+-- can contain any non-space letter/other
+
+local t = { } -- small optimization, a shared variable that is not reset
+
+if scan_word then
+
+ scan_number = function(base)
+ local s = scan_word()
+ if not s then
+ return nil
+ elseif base then
+ return tonumber(s,base)
+ else
+ return tonumber(s)
+ end
+ end
+
+else
+
+ scan_word = function()
+ local n = 0
+ while true do
+ local c = scan_code()
+ if c then
+ n = n + 1
+ t[n] = utfchar(c)
+ elseif scan_code(space_bits) then
+ if n > 0 then
+ break
+ end
+ elseif n > 0 then
+ break
+ else
+ return
+ end
+ end
+ return concat(t,"",1,n)
+ end
+
+ -- so we gobble the space (like scan_int) (number has to be space or non-char terminated
+ -- as we accept 0xabcd and such so there is no clear separator for a keyword
+
+ scan_number = function(base)
+ local n = 0
+ while true do
+ local c = scan_code()
+ if c then
+ n = n + 1
+ t[n] = char(c)
+ elseif scan_code(space_bits) then
+ if n > 0 then
+ break
+ end
+ elseif n > 0 then
+ break
+ else
+ return
+ end
+ end
+ local s = concat(t,"",1,n)
+ if base then
+ return tonumber(s,base)
+ else
+ return tonumber(s)
+ end
+ end
+
+end
+
+-- -- the next one cannot handle \iftrue true\else false\fi
+--
+-- local function scan_boolean()
+-- if scan_keyword("true") then
+-- return true
+-- elseif scan_keyword("false") then
+-- return false
+-- else
+-- return nil
+-- end
+-- end
+
+local function scan_boolean()
+ local kw = scan_word()
+ if kw == "true" then
+ return true
+ elseif kw == "false" then
+ return false
+ else
+ return nil
+ end
+end
+
+if not scan_csname then
+
+ scan_csname = function()
+ local t = get_next()
+ local n = t.csname
+ return n ~= "" and n or nil
+ end
+
+end
+
+tokens.scanners = { -- these expand
+ token = scan_token,
+ toks = scan_toks,
+ tokens = scan_toks,
+ dimen = scan_dimen,
+ dimension = scan_dimen,
+ glue = scan_glue,
+ skip = scan_glue,
+ integer = scan_int,
+ count = scan_int,
+ string = scan_string,
+ code = scan_code,
+ word = scan_word,
+ number = scan_number,
+ boolean = scan_boolean,
+ keyword = scan_keyword,
+ csname = scan_csname,
+}
+
+tokens.getters = { -- these don't expand
+ token = get_next,
+ count = tex.getcount,
+ dimen = tex.getdimen,
+ skip = tex.getglue,
+ glue = tex.getglue,
+ skip = tex.getmuglue,
+ glue = tex.getmuglue,
+ box = tex.getbox,
+}
+
+tokens.setters = {
+ macro = set_macro,
+ count = tex.setcount,
+ dimen = tex.setdimen,
+ skip = tex.setglue,
+ glue = tex.setglue,
+ skip = tex.setmuglue,
+ glue = tex.setmuglue,
+ box = tex.setbox,
+}
+
+-- static int run_scan_token(lua_State * L)
+-- {
+-- saved_tex_scanner texstate;
+-- save_tex_scanner(texstate);
+-- get_x_token();
+-- make_new_token(L, cur_cmd, cur_chr, cur_cs);
+-- unsave_tex_scanner(texstate);
+-- return 1;
+-- }
+--
+-- static int run_get_future(lua_State * L)
+-- {
+-- /* saved_tex_scanner texstate; */
+-- /* save_tex_scanner(texstate); */
+-- get_token();
+-- make_new_token(L, cur_cmd, cur_chr, cur_cs);
+-- back_input();
+-- /* unsave_tex_scanner(texstate); */
+-- return 1;
+-- }
diff --git a/Master/texmf-dist/tex/context/base/toks-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/toks-ini.mkiv
index 49625a93990..03ec997421a 100644
--- a/Master/texmf-dist/tex/context/base/toks-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/toks-ini.mkiv
@@ -16,6 +16,7 @@
\registerctxluafile{toks-ini}{1.001}
\registerctxluafile{toks-scn}{1.001}
\registerctxluafile{cldf-scn}{1.001}
+\registerctxluafile{cldf-stp}{1.001}
\unprotect
diff --git a/Master/texmf-dist/tex/context/base/toks-map.lua b/Master/texmf-dist/tex/context/base/mkiv/toks-map.lua
index 9120c2084e6..9120c2084e6 100644
--- a/Master/texmf-dist/tex/context/base/toks-map.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/toks-map.lua
diff --git a/Master/texmf-dist/tex/context/base/toks-map.mkiv b/Master/texmf-dist/tex/context/base/mkiv/toks-map.mkiv
index f1b63a68b0a..f1b63a68b0a 100644
--- a/Master/texmf-dist/tex/context/base/toks-map.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/toks-map.mkiv
diff --git a/Master/texmf-dist/tex/context/base/toks-scn.lua b/Master/texmf-dist/tex/context/base/mkiv/toks-scn.lua
index 84924c69419..5c8dee8f3d2 100644
--- a/Master/texmf-dist/tex/context/base/toks-scn.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/toks-scn.lua
@@ -28,6 +28,7 @@ local scanword = scanners.word
local scancode = scanners.code
local scanboolean = scanners.boolean
local scandimen = scanners.dimen
+local scancsname = scanners.csname
local todimen = number.todimen
local toboolean = toboolean
@@ -125,6 +126,7 @@ local shortcuts = {
scanopen = scanopen,
scanclose = scanclose,
scanlist = scanlist,
+ scancsname = scancsname,
todimen = todimen,
tonumber = tonumber,
tostring = tostring,
@@ -435,3 +437,11 @@ function tokens.scantable(t,data)
end
return data
end
+
+function tokens.constant(s)
+ if type(s) == "string" then
+ return "'" .. s .. "'"
+ else
+ return s
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/toks-tra.lua b/Master/texmf-dist/tex/context/base/mkiv/toks-tra.lua
new file mode 100644
index 00000000000..a1408b0b85a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/toks-tra.lua
@@ -0,0 +1,292 @@
+if not modules then modules = { } end modules ['toks-ini'] = {
+ version = 1.001,
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+
+local utfbyte, utfchar, utfvalues = utf.byte, utf.char, utf.values
+local format, gsub = string.format, string.gsub
+local tostring = tostring
+
+local tokens = tokens
+local token = token -- the built in one
+local tex = tex
+local context = context
+local commands = commands
+
+tokens.collectors = tokens.collectors or { }
+local collectors = tokens.collectors
+
+collectors.data = collectors.data or { }
+local collectordata = collectors.data
+
+collectors.registered = collectors.registered or { }
+local registered = collectors.registered
+
+local report = logs.reporter("tokens","collectors")
+
+-- todo:
+--
+-- register : macros that will be expanded (only for demo-ing)
+-- flush : print back to tex
+-- test : fancy stuff
+
+local get_next = token.get_next
+local create_token = token.create
+
+function collectors.install(tag,end_cs)
+ local data, d = { }, 0
+ collectordata[tag] = data
+ end_cs = gsub(end_cs,"^\\","")
+ while true do
+ local t = get_next()
+ if t.csname == end_cs then
+ context[end_cs]()
+ return
+ else
+ d = d + 1
+ data[d] = t
+ end
+ end
+end
+
+local simple = { letter = "letter", other_char = "other" }
+
+function collectors.show(data)
+ -- We no longer have methods as we only used (in demos) method a
+ -- so there is no need to burden the core with this. We have a
+ -- different table anyway.
+ if type(data) == "string" then
+ data = collectordata[data]
+ end
+ if not data then
+ return
+ end
+ local ctx_NC = context.NC
+ local ctx_NR = context.NR
+ local ctx_bold = context.bold
+ local ctx_verbatim = context.verbatim
+ context.starttabulate { "|Tl|Tc|Tl|" }
+ ctx_NC() ctx_bold("cmd")
+ ctx_NC() ctx_bold("meaning")
+ ctx_NC() ctx_bold("properties")
+ ctx_NC() ctx_NR()
+ context.HL()
+ for i=1,#data do
+ local token = data[i]
+ local cmdname = token.cmdname
+ local simple = simple[cmdname]
+ ctx_NC()
+ ctx_verbatim(simple or cmdname)
+ ctx_NC()
+ ctx_verbatim(simple and utfchar(token.mode) or token.csname)
+ ctx_NC()
+ if token.active then context("active ") end
+ if token.expandable then context("expandable ") end
+ if token.protected then context("protected ") end
+ ctx_NC()
+ ctx_NR()
+ end
+ context.stoptabulate()
+end
+
+local function printlist(data)
+ if data and #data > 0 then
+ report("not supported (yet): printing back to tex")
+ end
+end
+
+tokens.printlist = printlist -- will change to another namespace
+
+function collectors.flush(tag)
+ printlist(collectordata[tag])
+end
+
+function collectors.test(tag,handle)
+ report("not supported (yet): testing")
+end
+
+function collectors.register(name)
+ report("not supported (yet): registering")
+end
+
+-- -- old token code
+--
+-- -- 1 = command, 2 = modifier (char), 3 = controlsequence id
+--
+-- local create = token.create
+-- local csname_id = token.csname_id
+-- local command_id = token.command_id
+-- local command_name = token.command_name
+-- local get_next = token.get_next
+-- local expand = token.expand
+-- local csname_name = token.csname_name
+--
+-- local function printlist(data)
+-- if data and #data > 0 then
+-- callbacks.push('token_filter', function ()
+-- callbacks.pop('token_filter') -- tricky but the nil assignment helps
+-- return data
+-- end)
+-- end
+-- end
+--
+-- tokens.printlist = printlist -- will change to another namespace
+--
+-- function collectors.flush(tag)
+-- printlist(collectordata[tag])
+-- end
+--
+-- function collectors.register(name)
+-- registered[csname_id(name)] = name
+-- end
+--
+-- local call = command_id("call")
+-- local letter = command_id("letter")
+-- local other = command_id("other_char")
+--
+-- function collectors.install(tag,end_cs)
+-- local data, d = { }, 0
+-- collectordata[tag] = data
+-- end_cs = gsub(end_cs,"^\\","")
+-- local endcs = csname_id(end_cs)
+-- while true do
+-- local t = get_next()
+-- local a, b = t[1], t[3]
+-- if b == endcs then
+-- context[end_cs]()
+-- return
+-- elseif a == call and registered[b] then
+-- expand()
+-- else
+-- d = d + 1
+-- data[d] = t
+-- end
+-- end
+-- end
+--
+-- function collectors.show(data)
+-- -- We no longer have methods as we only used (in demos) method a
+-- -- so there is no need to burden the core with this.
+-- if type(data) == "string" then
+-- data = collectordata[data]
+-- end
+-- if not data then
+-- return
+-- end
+-- local ctx_NC = context.NC
+-- local ctx_NR = context.NR
+-- local ctx_bold = context.bold
+-- local ctx_verbatim = context.verbatim
+-- context.starttabulate { "|T|Tr|cT|Tr|T|" }
+-- ctx_NC() ctx_bold("cmd")
+-- ctx_NC() ctx_bold("chr")
+-- ctx_NC()
+-- ctx_NC() ctx_bold("id")
+-- ctx_NC() ctx_bold("name")
+-- ctx_NC() ctx_NR()
+-- context.HL()
+-- for i=1,#data do
+-- local token = data[i]
+-- local cmd = token[1]
+-- local chr = token[2]
+-- local id = token[3]
+-- local name = command_name(token)
+-- ctx_NC()
+-- ctx_verbatim(name)
+-- ctx_NC()
+-- if tonumber(chr) >= 0 then
+-- ctx_verbatim(chr)
+-- end
+-- ctx_NC()
+-- if cmd == letter or cmd == other then
+-- ctx_verbatim(utfchar(chr))
+-- end
+-- ctx_NC()
+-- if id > 0 then
+-- ctx_verbatim(id)
+-- end
+-- ctx_NC()
+-- if id > 0 then
+-- ctx_verbatim(csname_name(token) or "")
+-- end
+-- ctx_NC() ctx_NR()
+-- end
+-- context.stoptabulate()
+-- end
+--
+-- function collectors.test(tag,handle)
+-- local t, w, tn, wn = { }, { }, 0, 0
+-- handle = handle or collectors.defaultwords
+-- local tagdata = collectordata[tag]
+-- for k=1,#tagdata do
+-- local v = tagdata[k]
+-- if v[1] == letter then
+-- wn = wn + 1
+-- w[wn] = v[2]
+-- else
+-- if wn > 0 then
+-- handle(t,w)
+-- wn = 0
+-- end
+-- tn = tn + 1
+-- t[tn] = v
+-- end
+-- end
+-- if wn > 0 then
+-- handle(t,w)
+-- end
+-- collectordata[tag] = t
+-- end
+
+-- Interfacing:
+
+commands.collecttokens = collectors.install
+commands.showtokens = collectors.show
+commands.flushtokens = collectors.flush
+commands.testtokens = collectors.test
+commands.registertoken = collectors.register
+
+-- Redundant:
+
+-- function collectors.test(tag)
+-- printlist(collectordata[tag])
+-- end
+
+-- For old times sake:
+
+collectors.dowithwords = collectors.test
+
+-- This is only used in old articles ... will move to a module:
+
+tokens.vbox = create_token("vbox")
+tokens.hbox = create_token("hbox")
+tokens.vtop = create_token("vtop")
+tokens.bgroup = create_token(utfbyte("{"),1)
+tokens.egroup = create_token(utfbyte("}"),2)
+
+tokens.letter = function(chr) return create_token(utfbyte(chr),11) end
+tokens.other = function(chr) return create_token(utfbyte(chr),12) end
+
+tokens.letters = function(str)
+ local t, n = { }, 0
+ for chr in utfvalues(str) do
+ n = n + 1
+ t[n] = create_token(chr, 11)
+ end
+ return t
+end
+
+function collectors.defaultwords(t,str)
+ if t then
+ local n = #t
+ n = n + 1 ; t[n] = tokens.bgroup
+ n = n + 1 ; t[n] = create_token("red")
+ for i=1,#str do
+ n = n + 1 ; t[n] = tokens.other('*')
+ end
+ n = n + 1 ; t[n] = tokens.egroup
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/toks-tra.mkiv b/Master/texmf-dist/tex/context/base/mkiv/toks-tra.mkiv
index a3e27eaf89f..a3e27eaf89f 100644
--- a/Master/texmf-dist/tex/context/base/toks-tra.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/toks-tra.mkiv
diff --git a/Master/texmf-dist/tex/context/base/trac-ctx.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-ctx.lua
index 493ce793686..493ce793686 100644
--- a/Master/texmf-dist/tex/context/base/trac-ctx.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-ctx.lua
diff --git a/Master/texmf-dist/tex/context/base/trac-ctx.mkiv b/Master/texmf-dist/tex/context/base/mkiv/trac-ctx.mkiv
index 4240281a6fb..4240281a6fb 100644
--- a/Master/texmf-dist/tex/context/base/trac-ctx.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-ctx.mkiv
diff --git a/Master/texmf-dist/tex/context/base/trac-deb.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-deb.lua
index d998295c13c..792ad9b567d 100644
--- a/Master/texmf-dist/tex/context/base/trac-deb.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-deb.lua
@@ -9,7 +9,7 @@ if not modules then modules = { } end modules ['trac-deb'] = {
local lpeg, status = lpeg, status
local lpegmatch = lpeg.match
-local format, concat, match, find = string.format, table.concat, string.match, string.find
+local format, concat, match, find, gsub = string.format, table.concat, string.match, string.find, string.gsub
local tonumber, tostring = tonumber, tostring
-- maybe tracers -> tracers.tex (and tracers.lua for current debugger)
@@ -104,13 +104,10 @@ end
local savedluaerror = nil
local function errorreporter(luaerror)
- if luaerror then
- logs.enable("lua error") --
- return logs.reporter("lua error")
- else
- logs.enable("tex error")
- return logs.reporter("tex error")
- end
+ local category = luaerror and "lua error" or "tex error"
+ local report = logs.reporter(category)
+ logs.enable(category)
+ return report
end
function tracers.showlines(filename,linenumber,offset,luaerrorline)
@@ -171,28 +168,33 @@ end
-- todo: \starttext bla \blank[foo] bla \stoptext
+local nop = function() end
+local resetmessages = status.resetmessages() or nop
+
local function processerror(offset)
+ -- print("[[ last tex error: " .. tostring(status.lasterrorstring or "<unset>") .. " ]]")
+ -- print("[[ last lua error: " .. tostring(status.lastluaerrorstring or "<unset>") .. " ]]")
+ -- print("[[ last warning : " .. tostring(status.lastwarningstring or "<unset>") .. " ]]")
+ -- print("[[ last location : " .. tostring(status.lastwarninglocation or "<unset>") .. " ]]")
+ -- print("[[ last context : " .. tostring(status.lasterrorcontext or "<unset>") .. " ]]")
+
local inputstack = resolvers.inputstack
local filename = inputstack[#inputstack] or status.filename
local linenumber = tonumber(status.linenumber) or 0
- --
- -- print("[[ last tex error: " .. tostring(status.lasterrorstring) .. " ]]")
- -- print("[[ last lua error: " .. tostring(status.lastluaerrorstring) .. " ]]")
- -- print("[[ start errorcontext ]]")
- -- tex.show_context()
- -- print("\n[[ stop errorcontext ]]")
- --
+ local lastcontext = status.lasterrorcontext
local lasttexerror = status.lasterrorstring or "?"
local lastluaerror = status.lastluaerrorstring or lasttexerror
local luaerrorline = match(lastluaerror,[[lua%]?:.-(%d+)]]) or (lastluaerror and find(lastluaerror,"?:0:",1,true) and 0)
- local report = errorreporter(luaerrorline)
+ resetmessages()
+ lastluaerror = gsub(lastluaerror,"%[\\directlua%]","[ctxlua]")
tracers.printerror {
filename = filename,
linenumber = linenumber,
+ offset = tonumber(offset) or 10,
lasttexerror = lasttexerror,
lastluaerror = lastluaerror,
luaerrorline = luaerrorline,
- offset = tonumber(offset) or 10,
+ lastcontext = lastcontext,
}
end
@@ -203,6 +205,7 @@ function tracers.printerror(specification)
local linenumber = specification.linenumber
local lasttexerror = specification.lasttexerror
local lastluaerror = specification.lastluaerror
+ local lastcontext = specification.lasterrorcontext
local luaerrorline = specification.luaerrorline
local offset = specification.offset
local report = errorreporter(luaerrorline)
@@ -213,11 +216,15 @@ function tracers.printerror(specification)
else
report_nl()
if luaerrorline then
- report("error on line %s in file %s:\n\n%s",linenumber,filename,lastluaerror)
+ report("lua error on line %s in file %s:\n\n%s",linenumber,filename,lastluaerror)
-- report("error on line %s in file %s:\n\n%s",linenumber,filename,lasttexerror)
else
- report("error on line %s in file %s: %s",linenumber,filename,lasttexerror)
- if tex.show_context then
+ report("tex error on line %s in file %s: %s",linenumber,filename,lasttexerror)
+ if lastcontext then
+ report_nl()
+ report_str(lastcontext)
+ report_nl()
+ elseif tex.show_context then
report_nl()
tex.show_context()
end
@@ -228,17 +235,37 @@ function tracers.printerror(specification)
end
end
-local nop = function() end
+local function processwarning(offset)
+ -- local inputstack = resolvers.inputstack
+ -- local filename = inputstack[#inputstack] or status.filename
+ -- local linenumber = tonumber(status.linenumber) or 0
+ local lastwarning = status.lastwarningstring or "?"
+ local lastlocation = status.lastwarningtag or "?"
+ resetmessages()
+ tracers.printwarning {
+ -- filename = filename,
+ -- linenumber = linenumber,
+ -- offset = tonumber(offset) or 10,
+ lastwarning = lastwarning ,
+ lastlocation = lastlocation,
+ }
+end
+
+function tracers.printwarning(specification)
+ logs.report("luatex warning","%s: %s",specification.lastlocation,specification.lastwarning)
+end
directives.register("system.errorcontext", function(v)
local register = callback.register
if v then
register('show_error_message', nop)
+ register('show_warning_message',function() processwarning(v) end)
register('show_error_hook', function() processerror(v) end)
register('show_lua_error_hook', nop)
else
register('show_error_message', nil)
register('show_error_hook', nil)
+ register('show_warning_message',nil)
register('show_lua_error_hook', nil)
end
end)
diff --git a/Master/texmf-dist/tex/context/base/trac-deb.mkiv b/Master/texmf-dist/tex/context/base/mkiv/trac-deb.mkiv
index 1e61a351261..1e61a351261 100644
--- a/Master/texmf-dist/tex/context/base/trac-deb.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-deb.mkiv
diff --git a/Master/texmf-dist/tex/context/base/trac-exp.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-exp.lua
index 5879f1b7bad..5879f1b7bad 100644
--- a/Master/texmf-dist/tex/context/base/trac-exp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-exp.lua
diff --git a/Master/texmf-dist/tex/context/base/trac-fil.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-fil.lua
index 8cc903e2a62..8cc903e2a62 100644
--- a/Master/texmf-dist/tex/context/base/trac-fil.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-fil.lua
diff --git a/Master/texmf-dist/tex/context/base/trac-inf.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-inf.lua
index 5497e54eb70..401fd01e7d9 100644
--- a/Master/texmf-dist/tex/context/base/trac-inf.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-inf.lua
@@ -14,7 +14,7 @@ if not modules then modules = { } end modules ['trac-inf'] = {
local type, tonumber, select = type, tonumber, select
local format, lower, find = string.format, string.lower, string.find
local concat = table.concat
-local clock = os.gettimeofday or os.clock -- should go in environment
+local clock = os.gettimeofday or os.clock -- should go in environment
local setmetatableindex = table.setmetatableindex
local serialize = table.serialize
@@ -145,13 +145,13 @@ function statistics.show()
-- so far
-- collectgarbage("collect")
register("lua properties",function()
- local list = status.list()
- local hashchar = tonumber(list.luatex_hashchars)
+ local hashchar = tonumber(status.luatex_hashchars)
+ local hashtype = status.luatex_hashtype
local mask = lua.mask or "ascii"
return format("engine: %s, used memory: %s, hash type: %s, hash chars: min(%s,40), symbol mask: %s (%s)",
jit and "luajit" or "lua",
statistics.memused(),
- list.luatex_hashtype or "default",
+ hashtype or "default",
hashchar and 2^hashchar or "unknown",
mask,
mask == "utf" and "τεχ" or "tex")
diff --git a/Master/texmf-dist/tex/context/base/trac-jus.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-jus.lua
index 0c92848dcec..ad1a098e27f 100644
--- a/Master/texmf-dist/tex/context/base/trac-jus.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-jus.lua
@@ -89,22 +89,22 @@ function checkers.handler(head)
-- special box
elseif delta >= max_threshold then
local rule = tracedrule(delta,naturalheight,naturaldepth,getfield(list,"glue_set") == 1 and "trace:dr" or "trace:db")
- setfield(current,"list",linked_nodes(list,new_hlist(rule)))
+ setlist(current,linked_nodes(list,new_hlist(rule)))
elseif delta <= min_threshold then
local alignstate = getattr(list,a_alignstate)
if alignstate == 1 then
local rule = tracedrule(-delta,naturalheight,naturaldepth,"trace:dc")
- setfield(current,"list",linked_nodes(new_hlist(rule),list))
+ setlist(current,linked_nodes(new_hlist(rule),list))
elseif alignstate == 2 then
local lrule = tracedrule(-delta/2,naturalheight,naturaldepth,"trace:dy")
local rrule = copy_node(lrule)
- setfield(current,"list",linked_nodes(new_hlist(lrule),list,new_kern(delta/2),new_hlist(rrule)))
+ setlist(current,linked_nodes(new_hlist(lrule),list,new_kern(delta/2),new_hlist(rrule)))
elseif alignstate == 3 then
local rule = tracedrule(-delta,naturalheight,naturaldepth,"trace:dm")
- setfield(current,"list",linked_nodes(list,new_kern(delta),new_hlist(rule)))
+ setlist(current,linked_nodes(list,new_kern(delta),new_hlist(rule)))
else
local rule = tracedrule(-delta,naturalheight,naturaldepth,"trace:dg")
- setfield(current,"list",linked_nodes(list,new_kern(delta),new_hlist(rule)))
+ setlist(current,linked_nodes(list,new_kern(delta),new_hlist(rule)))
end
end
end
diff --git a/Master/texmf-dist/tex/context/base/trac-jus.mkiv b/Master/texmf-dist/tex/context/base/mkiv/trac-jus.mkiv
index d0823d31196..71d88b00e42 100644
--- a/Master/texmf-dist/tex/context/base/trac-jus.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-jus.mkiv
@@ -1,6 +1,6 @@
%D \module
%D [ file=trac-jus,
-%D version=2112.11.27,
+%D version=2012.11.27,
%D title=\CONTEXT\ Tracing Macros,
%D subtitle=Justification,
%D author=Hans Hagen,
diff --git a/Master/texmf-dist/tex/context/base/trac-lmx.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-lmx.lua
index 4f4ea62c489..4f4ea62c489 100644
--- a/Master/texmf-dist/tex/context/base/trac-lmx.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-lmx.lua
diff --git a/Master/texmf-dist/tex/context/base/trac-log.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-log.lua
index ce620e6cf0c..86557ef0927 100644
--- a/Master/texmf-dist/tex/context/base/trac-log.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-log.lua
@@ -110,6 +110,10 @@ local direct, subdirect, writer, pushtarget, poptarget, setlogfile, settimedlog,
if tex and (tex.jobname or tex.formatname) then
+ if texio.setescape then
+ texio.setescape(0) -- or (false)
+ end
+
local function useluawrites()
-- quick hack, awaiting speedup in engine (8 -> 6.4 sec for --make with console2)
@@ -132,6 +136,8 @@ if tex and (tex.jobname or tex.formatname) then
elseif target == "term" then
texio_write_nl("term","")
io_write(...)
+ elseif type(target) == "number" then
+ texio_write_nl(target,...) -- a tex output channel
elseif target ~= "none" then
texio_write_nl("log",target,...)
texio_write_nl("term","")
@@ -150,6 +156,8 @@ if tex and (tex.jobname or tex.formatname) then
texio_write("log",...)
elseif target == "term" then
io_write(...)
+ elseif type(target) == "number" then
+ texio_write(target,...) -- a tex output channel
elseif target ~= "none" then
texio_write("log",target,...)
io_write(target,...)
@@ -233,7 +241,7 @@ if tex and (tex.jobname or tex.formatname) then
end
report = function(a,b,c,...)
- if c then
+ if c ~= nil then
write_nl(target,report_yes(translations[a],formatters[formats[b]](c,...)))
elseif b then
write_nl(target,report_yes(translations[a],formats[b]))
@@ -245,7 +253,7 @@ if tex and (tex.jobname or tex.formatname) then
end
direct = function(a,b,c,...)
- if c then
+ if c ~= nil then
return direct_yes(translations[a],formatters[formats[b]](c,...))
elseif b then
return direct_yes(translations[a],formats[b])
@@ -257,7 +265,7 @@ if tex and (tex.jobname or tex.formatname) then
end
subreport = function(a,s,b,c,...)
- if c then
+ if c ~= nil then
write_nl(target,subreport_yes(translations[a],translations[s],formatters[formats[b]](c,...)))
elseif b then
write_nl(target,subreport_yes(translations[a],translations[s],formats[b]))
@@ -269,7 +277,7 @@ if tex and (tex.jobname or tex.formatname) then
end
subdirect = function(a,s,b,c,...)
- if c then
+ if c ~= nil then
return subdirect_yes(translations[a],translations[s],formatters[formats[b]](c,...))
elseif b then
return subdirect_yes(translations[a],translations[s],formats[b])
@@ -281,7 +289,7 @@ if tex and (tex.jobname or tex.formatname) then
end
status = function(a,b,c,...)
- if c then
+ if c ~= nil then
write_nl(target,status_yes(translations[a],formatters[formats[b]](c,...)))
elseif b then
write_nl(target,status_yes(translations[a],formats[b]))
@@ -626,7 +634,7 @@ end
-- so far
-local function setblocked(category,value)
+local function setblocked(category,value) -- v.state == value == true : disable
if category == true then
-- lock all
category, value = "*", true
@@ -644,7 +652,7 @@ local function setblocked(category,value)
end
else
states = utilities.parsers.settings_to_hash(category,type(states)=="table" and states or nil)
- for c, _ in next, states do
+ for c in next, states do
local v = data[c]
if v then
v.state = value
diff --git a/Master/texmf-dist/tex/context/base/trac-par.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-par.lua
index aab57ce5c14..fc3be5b6c55 100644
--- a/Master/texmf-dist/tex/context/base/trac-par.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-par.lua
@@ -7,6 +7,8 @@ if not modules then modules = { } end modules ['trac-par'] = {
comment = "a translation of the built in parbuilder, initial convertsin by Taco Hoekwater",
}
+-- todo: kern
+
local utfchar = utf.char
local concat = table.concat
diff --git a/Master/texmf-dist/tex/context/base/trac-pro.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-pro.lua
index 897b6a15c11..897b6a15c11 100644
--- a/Master/texmf-dist/tex/context/base/trac-pro.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-pro.lua
diff --git a/Master/texmf-dist/tex/context/base/trac-set.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-set.lua
index 9e2bf87589a..9e2bf87589a 100644
--- a/Master/texmf-dist/tex/context/base/trac-set.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-set.lua
diff --git a/Master/texmf-dist/tex/context/base/mkiv/trac-tex.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-tex.lua
new file mode 100644
index 00000000000..86f3b539f30
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-tex.lua
@@ -0,0 +1,118 @@
+if not modules then modules = { } end modules ['trac-tex'] = {
+ version = 1.001,
+ comment = "companion to trac-deb.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- moved from trac-deb.lua
+
+local next = next
+
+local texhashtokens = tex.hashtokens
+
+local trackers = trackers
+local token = token
+local saved = { }
+
+function trackers.savehash()
+ saved = texhashtokens()
+end
+
+function trackers.dumphashtofile(filename,delta)
+ local list = { }
+ local hash = tex.hashtokens()
+ local create = token.create
+ for name, token in next, hash do
+ if not delta or not saved[name] then
+ if token[2] ~= 0 then -- still old interface
+ local token = create(name)
+ -- inspect(token)
+ local category = token.cmdname
+ local dk = list[category]
+ if not dk then
+ dk = {
+ names = { },
+ found = 0,
+ -- code = token[1],
+ }
+ list[category] = dk
+ end
+ if token.protected then
+ if token.expandable then
+ dk.names[name] = "ep"
+ else
+ dk.names[name] = "-p"
+ end
+ else
+ if token.expandable then
+ dk.names[name] = "ep"
+ else
+ dk.names[name] = "--"
+ end
+ end
+ dk.found = dk.found + 1
+ end
+ end
+ end
+ table.save(filename or tex.jobname .. "-hash.log",list)
+end
+
+-- -- old token code
+--
+-- function trackers.dumphashtofile(filename,delta)
+-- local list = { }
+-- local hash = texhashtokens()
+-- local getname = token.command_name
+-- for name, token in next, hash do
+-- if not delta or not saved[name] then
+-- -- token: cmd, chr, csid -- combination cmd,chr determines name
+-- local category = getname(token)
+-- local dk = list[category]
+-- if not dk then
+-- -- a bit funny names but this sorts better (easier to study)
+-- dk = { names = { }, found = 0, code = token[1] }
+-- list[category] = dk
+-- end
+-- dk.names[name] = { token[2], token[3] }
+-- dk.found = dk.found + 1
+-- end
+-- end
+-- table.save(filename or tex.jobname .. "-hash.log",list)
+-- end
+
+local delta = nil
+
+local function dump_hash(wanteddelta)
+ if delta == nil then
+ saved = saved or texhashtokens() -- no need for trackers.dump_hash
+ luatex.registerstopactions(1,function() dump_hash(nil,wanteddelta) end) -- at front
+ end
+ delta = wanteddelta
+end
+
+directives.register("system.dumphash", function() dump_hash(false) end)
+directives.register("system.dumpdelta", function() dump_hash(true ) end)
+
+local report_dump = logs.reporter("resolvers","dump")
+
+local function saveusedfilesintrees(format)
+ local data = {
+ jobname = environment.jobname or "?",
+ version = environment.version or "?",
+ kind = environment.kind or "?",
+ files = resolvers.instance.foundintrees
+ }
+ local filename = file.replacesuffix(environment.jobname or "context-job",'jlg')
+ if format == "lua" then
+ io.savedata(filename,table.serialize(data,true))
+ else
+ io.savedata(filename,table.toxml(data,"job"))
+ end
+end
+
+directives.register("system.dumpfiles", function(v)
+ luatex.registerstopactions(function() saveusedfilesintrees(v) end)
+end)
+
diff --git a/Master/texmf-dist/tex/context/base/trac-tex.mkiv b/Master/texmf-dist/tex/context/base/mkiv/trac-tex.mkiv
index 53c95ab01d7..53c95ab01d7 100644
--- a/Master/texmf-dist/tex/context/base/trac-tex.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-tex.mkiv
diff --git a/Master/texmf-dist/tex/context/base/trac-tim.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-tim.lua
index b4744291ce0..b4744291ce0 100644
--- a/Master/texmf-dist/tex/context/base/trac-tim.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-tim.lua
diff --git a/Master/texmf-dist/tex/context/base/trac-vis.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-vis.lua
index b541827988b..061cef8ba5c 100644
--- a/Master/texmf-dist/tex/context/base/trac-vis.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-vis.lua
@@ -34,6 +34,8 @@ local formatters = string.formatters
-- todo: inline concat (more efficient)
-- todo: tags can also be numbers (just add to hash)
+-- todo: dir and localpar nodes
+
local nodecodes = nodes.nodecodes
local disc_code = nodecodes.disc
local kern_code = nodecodes.kern
@@ -66,19 +68,28 @@ local nuts = nodes.nuts
local tonut = nuts.tonut
local tonode = nuts.tonode
-local getfield = nuts.getfield
-local getnext = nuts.getnext
-local getprev = nuts.getprev
-local getid = nuts.getid
local setfield = nuts.setfield
-local getattr = nuts.getattr
+local setboth = nuts.setboth
+local setlink = nuts.setlink
+local setdisc = nuts.setdisc
+local setlist = nuts.setlist
+local setleader = nuts.setleader
+local setsubtype = nuts.setsubtype
local setattr = nuts.setattr
+
+local getfield = nuts.getfield
+local getid = nuts.getid
local getfont = nuts.getfont
+local getattr = nuts.getattr
local getsubtype = nuts.getsubtype
local getchar = nuts.getchar
local getbox = nuts.getbox
local getlist = nuts.getlist
local getleader = nuts.getleader
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getboth = nuts.getboth
+local getdisc = nuts.getdisc
local hpack_nodes = nuts.hpack
local vpack_nodes = nuts.vpack
@@ -91,8 +102,9 @@ local insert_node_after = nuts.insert_after
local traverse_nodes = nuts.traverse
local linked_nodes = nuts.linked
-local fast_hpack = nuts.fasthpack
-local fast_hpack_string = nuts.typesetters.fast_hpack
+local effectiveglue = nuts.effective_glue
+
+local hpack_string = nuts.typesetters.tohpack
local texgetattribute = tex.getattribute
local texsetattribute = tex.setattribute
@@ -112,6 +124,8 @@ local new_rule = nodepool.rule
local new_kern = nodepool.kern
local new_glue = nodepool.glue
local new_penalty = nodepool.penalty
+local new_hlist = nodepool.hlist
+local new_vlist = nodepool.vlist
local tracers = nodes.tracers
local visualizers = nodes.visualizers
@@ -144,41 +158,42 @@ local trace_strut
local trace_whatsit
local trace_user
local trace_math
+local trace_italic
local report_visualize = logs.reporter("visualize")
local modes = {
- hbox = 1,
- vbox = 2,
- vtop = 4,
- kern = 8,
- glue = 16,
- penalty = 32,
- fontkern = 64,
- strut = 128,
- whatsit = 256,
- glyph = 512,
- simple = 1024,
- simplehbox = 1024 + 1,
- simplevbox = 1024 + 2,
- simplevtop = 1024 + 4,
- user = 2048,
- math = 4096,
+ hbox = 1,
+ vbox = 2,
+ vtop = 4,
+ kern = 8,
+ glue = 16,
+ penalty = 32,
+ fontkern = 64,
+ strut = 128,
+ whatsit = 256,
+ glyph = 512,
+ simple = 1024,
+ simplehbox = 1024 + 1,
+ simplevbox = 1024 + 2,
+ simplevtop = 1024 + 4,
+ user = 2048,
+ math = 4096,
+ italic = 8192,
+ origin = 16384,
}
-local modes_makeup = { "hbox", "vbox", "kern", "glue", "penalty" }
-local modes_boxes = { "hbox", "vbox" }
-local modes_all = { "hbox", "vbox", "kern", "glue", "penalty", "fontkern", "whatsit", "glyph", "user", "math" }
-
local usedfont, exheight, emwidth
-local l_penalty, l_glue, l_kern, l_fontkern, l_hbox, l_vbox, l_vtop, l_strut, l_whatsit, l_glyph, l_user, l_math
+local l_penalty, l_glue, l_kern, l_fontkern, l_hbox, l_vbox, l_vtop, l_strut, l_whatsit, l_glyph, l_user, l_math, l_italic, l_origin
local enabled = false
local layers = { }
-local preset_boxes = modes.hbox + modes.vbox
-local preset_makeup = preset_boxes + modes.kern + modes.glue + modes.penalty
-local preset_all = preset_makeup + modes.fontkern + modes.whatsit + modes.glyph + modes.user + modes.math
+local preset_boxes = modes.hbox + modes.vbox + modes.origin
+local preset_makeup = preset_boxes
+ + modes.kern + modes.glue + modes.penalty
+local preset_all = preset_makeup
+ + modes.fontkern + modes.whatsit + modes.glyph + modes.user + modes.math
function visualizers.setfont(id)
usedfont = id or current_font()
@@ -216,6 +231,8 @@ local function enable()
l_glyph = layers.glyph
l_user = layers.user
l_math = layers.math
+ l_italic = layers.italic
+ l_origin = layers.origin
nodes.tasks.enableaction("shipouts","nodes.visualizers.handler")
report_visualize("enabled")
enabled = true
@@ -272,6 +289,14 @@ local function setvisual(n,a,what) -- this will become more efficient when we ha
return a
end
+function nuts.setvisual(n,mode)
+ setattr(n,a_visual,setvisual(mode,getattr(n,a_visual),true))
+end
+
+function nuts.copyvisual(n,m)
+ setattr(n,a_visual,getattr(m,a_visual))
+end
+
function visualizers.setvisual(n)
texsetattribute(a_visual,setvisual(n,texgetattribute(a_visual)))
end
@@ -288,13 +313,17 @@ for mode, value in next, modes do
trackers.register(formatters["visualizers.%s"](mode), function(v) set(mode,v) end)
end
+local raisepenalties = false
+
+directives.register("visualizers.raisepenalties",function(v) raisepenalties = v end)
+
local fraction = 10
trackers .register("visualizers.reset", function(v) set("reset", v) end)
trackers .register("visualizers.all", function(v) set("all", v) end)
trackers .register("visualizers.makeup", function(v) set("makeup",v) end)
trackers .register("visualizers.boxes", function(v) set("boxes", v) end)
-directives.register("visualizers.fraction", function(v) fraction = tonumber(v) or fraction end)
+directives.register("visualizers.fraction", function(v) fraction = (v and tonumber(v)) or (v == "more" and 5) or 10 end)
local c_positive = "trace:b"
local c_negative = "trace:r"
@@ -307,6 +336,7 @@ local c_glyph = "trace:o"
local c_ligature = "trace:s"
local c_white = "trace:w"
local c_math = "trace:r"
+local c_origin = "trace:o"
local c_positive_d = "trace:db"
local c_negative_d = "trace:dr"
@@ -319,9 +349,10 @@ local c_glyph_d = "trace:do"
local c_ligature_d = "trace:ds"
local c_white_d = "trace:dw"
local c_math_d = "trace:dr"
+local c_origin_d = "trace:do"
local function sometext(str,layer,color,textcolor,lap) -- we can just paste verbatim together .. no typesteting needed
- local text = fast_hpack_string(str,usedfont)
+ local text = hpack_string(str,usedfont)
local size = getfield(text,"width")
local rule = new_rule(size,2*exheight,exheight/2)
local kern = new_kern(-size)
@@ -333,29 +364,26 @@ local function sometext(str,layer,color,textcolor,lap) -- we can just paste verb
end
local info = linked_nodes(rule,kern,text)
setlisttransparency(info,c_zero)
- info = fast_hpack(info)
+ info = new_hlist(info)
local width = getfield(info,"width")
if lap then
- info = fast_hpack(linked_nodes(new_kern(-width),info))
+ info = new_hlist(linked_nodes(new_kern(-width),info))
end
if layer then
setattr(info,a_layer,layer)
end
- setfield(info,"width",0)
- setfield(info,"height",0)
- setfield(info,"depth",0)
return info, width
end
local f_cache = { }
local function fontkern(head,current)
- local kern = getfield(current,"kern")
+ local kern = getfield(current,"kern") + getfield(current,"expansion_factor")
local info = f_cache[kern]
if info then
-- print("hit fontkern")
else
- local text = fast_hpack_string(formatters[" %0.3f"](kern*pt_factor),usedfont)
+ local text = hpack_string(formatters[" %0.3f"](kern*pt_factor),usedfont)
local rule = new_rule(emwidth/fraction,6*exheight,2*exheight)
local list = getlist(text)
if kern > 0 then
@@ -368,11 +396,8 @@ local function fontkern(head,current)
setlisttransparency(list,c_text_d)
settransparency(rule,c_text_d)
setfield(text,"shift",-5 * exheight)
- info = fast_hpack(linked_nodes(rule,text))
+ info = new_hlist(linked_nodes(rule,text))
setattr(info,a_layer,l_fontkern)
- setfield(info,"width",0)
- setfield(info,"height",0)
- setfield(info,"depth",0)
f_cache[kern] = info
end
head = insert_node_before(head,current,copy_list(info))
@@ -381,34 +406,29 @@ end
local w_cache = { }
local tags = {
- open = "FIC",
- write = "FIW",
- close = "FIC",
- special = "SPE",
- localpar = "PAR",
- dir = "DIR",
- pdfliteral = "PDF",
- pdfrefobj = "PDF",
- pdfrefxform = "PDF",
- pdfrefximage = "PDF",
- pdfannot = "PDF",
- pdfstartlink = "PDF",
- pdfendlink = "PDF",
- pdfdest = "PDF",
- pdfthread = "PDF",
- pdfstartthread = "PDF",
- pdfendthread = "PDF",
- pdfsavepos = "PDF",
- pdfthreaddata = "PDF",
- pdflinkdata = "PDF",
- pdfcolorstack = "PDF",
- pdfsetmatrix = "PDF",
- pdfsave = "PDF",
- pdfrestore = "PDF",
- latelua = "LUA",
- closelua = "LUA",
- cancelboundary = "CBD",
- userdefined = "USR",
+ open = "FIC",
+ write = "FIW",
+ close = "FIC",
+ special = "SPE",
+ latelua = "LUA",
+ savepos = "POS",
+ userdefined = "USR",
+ -- backend stuff
+ pdfliteral = "PDF",
+ pdfrefobj = "PDF",
+ pdfannot = "PDF",
+ pdfstartlink = "PDF",
+ pdfendlink = "PDF",
+ pdfdest = "PDF",
+ pdfthread = "PDF",
+ pdfstartthread = "PDF",
+ pdfendthread = "PDF",
+ pdfthreaddata = "PDF",
+ pdflinkdata = "PDF",
+ pdfcolorstack = "PDF",
+ pdfsetmatrix = "PDF",
+ pdfsave = "PDF",
+ pdfrestore = "PDF",
}
local function whatsit(head,current)
@@ -466,7 +486,17 @@ end
local b_cache = { }
-local function ruledbox(head,current,vertical,layer,what,simple,previous)
+local o_cache = table.setmetatableindex(function(t,size)
+ local rule = new_rule(2*size,size,size)
+ origin = hpack_nodes(rule)
+ setcolor(rule,c_origin_d)
+ settransparency(rule,c_origin_d)
+ setattr(rule,a_layer,l_origin)
+ t[size] = origin
+ return origin
+end)
+
+local function ruledbox(head,current,vertical,layer,what,simple,previous,trace_origin,parent)
local wd = getfield(current,"width")
if wd ~= 0 then
local ht = getfield(current,"height")
@@ -475,9 +505,9 @@ local function ruledbox(head,current,vertical,layer,what,simple,previous)
local next = getnext(current)
local prev = previous
-- local prev = getprev(current) -- prev can be wrong in math mode < 0.78.3
- setfield(current,"next",nil)
- setfield(current,"prev",nil)
+ setboth(current)
local linewidth = emwidth/fraction
+ local size = 2*linewidth
local baseline, baseskip
if dp ~= 0 and ht ~= 0 then
if wd > 20*linewidth then
@@ -485,43 +515,37 @@ local function ruledbox(head,current,vertical,layer,what,simple,previous)
if not baseline then
-- due to an optimized leader color/transparency we need to set the glue node in order
-- to trigger this mechanism
- local leader = linked_nodes(new_glue(2*linewidth),new_rule(6*linewidth,linewidth,0),new_glue(2*linewidth))
- -- setlisttransparency(leader,c_text)
- leader = fast_hpack(leader)
- -- setlisttransparency(leader,c_text)
+ local leader = linked_nodes(new_glue(size),new_rule(3*size,linewidth,0),new_glue(size))
+ leader = hpack_nodes(leader)
baseline = new_glue(0)
- setfield(baseline,"leader",leader)
- setfield(baseline,"subtype",cleaders_code)
- local spec = getfield(baseline,"spec")
- setfield(spec,"stretch",65536)
- setfield(spec,"stretch_order",2)
+ setleader(baseline,leader)
+ setsubtype(baseline,cleaders_code)
+ setfield(baseline,"stretch",65536)
+ setfield(baseline,"stretch_order",2)
setlisttransparency(baseline,c_text)
b_cache.baseline = baseline
end
baseline = copy_list(baseline)
- baseline = fast_hpack(baseline,wd-2*linewidth)
- -- or new hpack node, set head and also:
+ baseline = hpack_nodes(baseline,wd-size)
+ -- or new_hlist, set head and also:
-- baseline.width = wd
-- baseline.glue_set = wd/65536
-- baseline.glue_order = 2
-- baseline.glue_sign = 1
baseskip = new_kern(-wd+linewidth)
else
- baseline = new_rule(wd-2*linewidth,linewidth,0)
- baseskip = new_kern(-wd+2*linewidth)
+ baseline = new_rule(wd-size,linewidth,0)
+ baseskip = new_kern(-wd+size)
end
end
local this
if not simple then
this = b_cache[what]
if not this then
- local text = fast_hpack_string(what,usedfont)
+ local text = hpack_string(what,usedfont)
this = linked_nodes(new_kern(-getfield(text,"width")),text)
setlisttransparency(this,c_text)
- this = fast_hpack(this)
- setfield(this,"width",0)
- setfield(this,"height",0)
- setfield(this,"depth",0)
+ this = new_hlist(this)
b_cache[what] = this
end
end
@@ -529,58 +553,77 @@ local function ruledbox(head,current,vertical,layer,what,simple,previous)
local info = linked_nodes(
this and copy_list(this) or nil,
new_rule(linewidth,ht,dp),
- new_rule(wd-2*linewidth,-dp+linewidth,dp),
+ new_rule(wd-size,-dp+linewidth,dp),
new_rule(linewidth,ht,dp),
new_kern(-wd+linewidth),
- new_rule(wd-2*linewidth,ht,-ht+linewidth)
+ new_rule(wd-size,ht,-ht+linewidth)
)
if baseskip then
info = linked_nodes(info,baseskip,baseline) -- could be in previous linked
end
- local shft
- if shift == 0 then
- shift = nil
- else
- local sh = shift > 0 and shift or 0
- local sd = shift < 0 and - shift or 0
- shft = fast_hpack(new_rule(2*emwidth/fraction,sh,sd))
- setfield(shft,"width",0)
- if sh > 0 then
- setfield(shft,"height",0)
- end
- if sd > 0 then
- setfield(shft,"depth",0)
- end
- end
setlisttransparency(info,c_text)
- info = fast_hpack(info)
- setfield(info,"width",0)
- setfield(info,"height",0)
- setfield(info,"depth",0)
+ info = new_hlist(info)
+ --
setattr(info,a_layer,layer)
- local info = linked_nodes(shft,current,new_kern(-wd),info)
- info = fast_hpack(info,wd)
if vertical then
- info = vpack_nodes(info)
- end
- if shift then
- setfield(current,"shift",0)
- setfield(info,"width",wd)
- setfield(info,"height",ht)
- setfield(info,"depth",dp)
- setfield(info,"shift",shift)
+ if shift == 0 then
+ info = linked_nodes(current,info)
+ elseif trace_origin then
+ local size = 2*size
+ local origin = o_cache[size]
+ origin = copy_list(origin)
+ if getid(parent) == vlist_code then
+ setfield(origin,"shift",-shift)
+ info = linked_nodes(current,new_kern(-size),origin,new_kern(-size),info)
+ else
+ -- todo .. i need an example
+ info = linked_nodes(current,info)
+ end
+ setfield(current,"shift",0)
+ else
+ info = linked_nodes(current,info)
+ setfield(current,"shift",0)
+ end
+ info = new_vlist(info,wd,ht,dp,shift)
+ else
+ if shift == 0 then
+ info = linked_nodes(current,new_kern(-wd),info)
+ elseif trace_origin then
+ local size = 2*size
+ local origin = o_cache[size]
+ origin = copy_list(origin)
+ if getid(parent) == vlist_code then
+ info = linked_nodes(current,new_kern(-wd-size-shift),origin,new_kern(-size+shift),info)
+ else
+ setfield(origin,"shift",-shift)
+ info = linked_nodes(current,new_kern(-wd-size),origin,new_kern(-size),info)
+ end
+ setfield(current,"shift",0)
+ else
+ info = linked_nodes(current,new_kern(-wd),info)
+ setfield(current,"shift",0)
+ end
+ info = new_hlist(info,wd,ht,dp,shift)
end
+
+-- how about dir, so maybe just copy the node
+--
+-- local l = getlist(current)
+-- setlist(current,nil)
+-- local c = copy_node(current)
+-- setlist(current,l)
+-- setlist(c,info)
+-- info = c
+
if next then
- setfield(info,"next",next)
- setfield(next,"prev",info)
+ setlink(info,next)
end
if prev then
if getid(prev) == gluespec_code then
report_visualize("ignoring invalid prev")
-- weird, how can this happen, an inline glue-spec, probably math
else
- setfield(info,"prev",prev)
- setfield(prev,"next",info)
+ setlink(prev,info)
end
end
if head == current then
@@ -593,16 +636,22 @@ local function ruledbox(head,current,vertical,layer,what,simple,previous)
end
end
+local bpfactor = number.dimenfactors.bp
+
+-- callback.register("process_rule",function(n,h,v)
+-- local p = string.formatters["0 0 %0.6F %0.6F re f"](h*bpfactor,v*bpfactor)
+-- pdf.print("direct",p)
+-- end)
+
local function ruledglyph(head,current,previous)
local wd = getfield(current,"width")
- -- local wd = chardata[getfield(current,"font")][getfield(current,"char")].width
+ -- local wd = chardata[getfont(current)][getchar(current)].width
if wd ~= 0 then
local ht = getfield(current,"height")
local dp = getfield(current,"depth")
local next = getnext(current)
local prev = previous
- setfield(current,"next",nil)
- setfield(current,"prev",nil)
+ setboth(current)
local linewidth = emwidth/(2*fraction)
local baseline
-- if dp ~= 0 and ht ~= 0 then
@@ -610,7 +659,7 @@ local function ruledglyph(head,current,previous)
baseline = new_rule(wd-2*linewidth,linewidth,0)
end
local doublelinewidth = 2*linewidth
- -- could be a pdf rule
+ -- could be a pdf rule (or a user rule now)
local info = linked_nodes(
new_rule(linewidth,ht,dp),
new_rule(wd-doublelinewidth,-dp+linewidth,dp),
@@ -620,29 +669,24 @@ local function ruledglyph(head,current,previous)
new_kern(-wd+doublelinewidth),
baseline
)
-local char = chardata[getfield(current,"font")][getfield(current,"char")]
-if char and char.tounicode and #char.tounicode > 4 then -- hack test
- setlistcolor(info,c_ligature)
- setlisttransparency(info,c_ligature_d)
-else
- setlistcolor(info,c_glyph)
- setlisttransparency(info,c_glyph_d)
-end
- info = fast_hpack(info)
- setfield(info,"width",0)
- setfield(info,"height",0)
- setfield(info,"depth",0)
+ local char = chardata[getfont(current)][getchar(current)]
+ if char and type(char.unicode) == "table" then -- hackery test
+ setlistcolor(info,c_ligature)
+ setlisttransparency(info,c_ligature_d)
+ else
+ setlistcolor(info,c_glyph)
+ setlisttransparency(info,c_glyph_d)
+ end
+ info = new_hlist(info)
setattr(info,a_layer,l_glyph)
local info = linked_nodes(current,new_kern(-wd),info)
- info = fast_hpack(info)
+ info = hpack_nodes(info)
setfield(info,"width",wd)
if next then
- setfield(info,"next",next)
- setfield(next,"prev",info)
+ setlink(info,next)
end
if prev then
- setfield(info,"prev",prev)
- setfield(prev,"next",info)
+ setlink(prev,info)
end
if head == current then
return info, info
@@ -654,7 +698,8 @@ end
end
end
-local g_cache = { }
+local g_cache_v = { }
+local g_cache_h = { }
local tags = {
-- userskip = "US",
@@ -686,12 +731,11 @@ local tags = {
-- we sometimes pass previous as we can have issues in math (not watertight for all)
-local function ruledglue(head,current,vertical)
- local spec = getfield(current,"spec")
- local width = getfield(spec,"width")
+local function ruledglue(head,current,vertical,parent)
local subtype = getsubtype(current)
- local amount = formatters["%s:%0.3f"](tags[subtype] or (vertical and "VS") or "HS",width*pt_factor)
- local info = g_cache[amount]
+ local width = effectiveglue(current,parent)
+ local amount = formatters["%s:%0.3f"](tags[subtype] or (vertical and "VS") or "HS",width*pt_factor)
+ local info = (vertical and g_cache_v or g_cache_h)[amount]
if info then
-- print("glue hit")
else
@@ -710,7 +754,7 @@ local function ruledglue(head,current,vertical)
else
info = sometext(amount,l_glue,c_skip_b)
end
- g_cache[amount] = info
+ (vertical and g_cache_v or g_cache_h)[amount] = info
end
info = copy_list(info)
if vertical then
@@ -720,11 +764,12 @@ local function ruledglue(head,current,vertical)
return head, getnext(current)
end
-local k_cache = { }
+local k_cache_v = { }
+local k_cache_h = { }
local function ruledkern(head,current,vertical)
local kern = getfield(current,"kern")
- local info = k_cache[kern]
+ local info = (vertical and k_cache_v or k_cache_h)[kern]
if info then
-- print("kern hit")
else
@@ -736,7 +781,7 @@ local function ruledkern(head,current,vertical)
else
info = sometext(amount,l_kern,c_zero)
end
- k_cache[kern] = info
+ (vertical and k_cache_v or k_cache_h)[kern] = info
end
info = copy_list(info)
if vertical then
@@ -746,11 +791,35 @@ local function ruledkern(head,current,vertical)
return head, getnext(current)
end
-local p_cache = { }
+local i_cache = { }
+
+local function ruleditalic(head,current)
+ local kern = getfield(current,"kern")
+ local info = i_cache[kern]
+ if info then
+ -- print("kern hit")
+ else
+ local amount = formatters["%s:%0.3f"]("IC",kern*pt_factor)
+ if kern > 0 then
+ info = sometext(amount,l_kern,c_positive)
+ elseif kern < 0 then
+ info = sometext(amount,l_kern,c_negative)
+ else
+ info = sometext(amount,l_kern,c_zero)
+ end
+ i_cache[kern] = info
+ end
+ info = copy_list(info)
+ head, current = insert_node_before(head,current,info)
+ return head, getnext(current)
+end
+
+local p_cache_v = { }
+local p_cache_h = { }
local function ruledpenalty(head,current,vertical)
local penalty = getfield(current,"penalty")
- local info = p_cache[penalty]
+ local info = (vertical and p_cache_v or p_cache_h)[penalty]
if info then
-- print("penalty hit")
else
@@ -762,17 +831,19 @@ local function ruledpenalty(head,current,vertical)
else
info = sometext(amount,l_penalty,c_zero)
end
- p_cache[penalty] = info
+ (vertical and p_cache_v or p_cache_h)[penalty] = info
end
info = copy_list(info)
if vertical then
info = vpack_nodes(info)
+ elseif raisepenalties then
+ setfield(info,"shift",-65536*4)
end
head, current = insert_node_before(head,current,info)
return head, getnext(current)
end
-local function visualize(head,vertical,forced)
+local function visualize(head,vertical,forced,parent)
local trace_hbox = false
local trace_vbox = false
local trace_vtop = false
@@ -786,6 +857,8 @@ local function visualize(head,vertical,forced)
local trace_simple = false
local trace_user = false
local trace_math = false
+ local trace_italic = false
+ local trace_origin = false
local current = head
local previous = nil
local attr = unsetvalue
@@ -809,20 +882,24 @@ local function visualize(head,vertical,forced)
trace_simple = false
trace_user = false
trace_math = false
+ trace_italic = false
+ trace_origin = false
else -- dead slow:
- trace_hbox = hasbit(a, 1)
- trace_vbox = hasbit(a, 2)
- trace_vtop = hasbit(a, 4)
- trace_kern = hasbit(a, 8)
- trace_glue = hasbit(a, 16)
- trace_penalty = hasbit(a, 32)
- trace_fontkern = hasbit(a, 64)
- trace_strut = hasbit(a, 128)
- trace_whatsit = hasbit(a, 256)
- trace_glyph = hasbit(a, 512)
- trace_simple = hasbit(a,1024)
- trace_user = hasbit(a,2048)
- trace_math = hasbit(a,4096)
+ trace_hbox = hasbit(a, 1)
+ trace_vbox = hasbit(a, 2)
+ trace_vtop = hasbit(a, 4)
+ trace_kern = hasbit(a, 8)
+ trace_glue = hasbit(a, 16)
+ trace_penalty = hasbit(a, 32)
+ trace_fontkern = hasbit(a, 64)
+ trace_strut = hasbit(a, 128)
+ trace_whatsit = hasbit(a, 256)
+ trace_glyph = hasbit(a, 512)
+ trace_simple = hasbit(a, 1024)
+ trace_user = hasbit(a, 2048)
+ trace_math = hasbit(a, 4096)
+ trace_italic = hasbit(a, 8192)
+ trace_origin = hasbit(a,16384)
end
attr = a
end
@@ -833,18 +910,17 @@ local function visualize(head,vertical,forced)
head, current = ruledglyph(head,current,previous)
end
elseif id == disc_code then
- local pre = getfield(current,"pre")
+ local pre, post, replace = getdisc(current)
if pre then
- setfield(current,"pre",visualize(pre,false,a))
+ pre = visualize(pre,false,a,parent)
end
- local post = getfield(current,"post")
if post then
- setfield(current,"post",visualize(post,false,a))
+ post = visualize(post,false,a,parent)
end
- local replace = getfield(current,"replace")
if replace then
- setfield(current,"replace",visualize(replace,false,a))
+ replace = visualize(replace,false,a,parent)
end
+ setdisc(current,pre,post,replace)
elseif id == kern_code then
local subtype = getsubtype(current)
-- tricky ... we don't copy the trace attribute in node-inj (yet)
@@ -853,16 +929,18 @@ local function visualize(head,vertical,forced)
head, current = fontkern(head,current)
end
else -- if subtype == user_kern_code then
- if trace_kern then
+ if trace_italic then
+ head, current = ruleditalic(head,current)
+ elseif trace_kern then
head, current = ruledkern(head,current,vertical)
end
end
elseif id == glue_code then
local content = getleader(current)
if content then
- setfield(current,"leader",visualize(content,false))
+ setleader(current,visualize(content,false,nil,parent))
elseif trace_glue then
- head, current = ruledglue(head,current,vertical)
+ head, current = ruledglue(head,current,vertical,parent)
end
elseif id == penalty_code then
if trace_penalty then
@@ -871,20 +949,20 @@ local function visualize(head,vertical,forced)
elseif id == hlist_code then
local content = getlist(current)
if content then
- setfield(current,"list",visualize(content,false))
+ setlist(current,visualize(content,false,nil,current))
end
if trace_hbox then
- head, current = ruledbox(head,current,false,l_hbox,"H__",trace_simple,previous)
+ head, current = ruledbox(head,current,false,l_hbox,"H__",trace_simple,previous,trace_origin,parent)
end
elseif id == vlist_code then
local content = getlist(current)
if content then
- setfield(current,"list",visualize(content,true))
+ setlist(current,visualize(content,true,nil,current))
end
if trace_vtop then
- head, current = ruledbox(head,current,true,l_vtop,"_T_",trace_simple,previous)
+ head, current = ruledbox(head,current,true,l_vtop,"_T_",trace_simple,previous,trace_origin,parent)
elseif trace_vbox then
- head, current = ruledbox(head,current,true,l_vbox,"__V",trace_simple,previous)
+ head, current = ruledbox(head,current,true,l_vbox,"__V",trace_simple,previous,trace_origin,parent)
end
elseif id == whatsit_code then
if trace_whatsit then
@@ -905,55 +983,68 @@ local function visualize(head,vertical,forced)
return head
end
-local function freed(cache)
- local n = 0
- for k, v in next, cache do
- free_node_list(v)
- n = n + 1
- end
- if n == 0 then
- return 0, cache
- else
- return n, { }
+do
+
+ local function freed(cache)
+ local n = 0
+ for k, v in next, cache do
+ free_node_list(v)
+ n = n + 1
+ end
+ if n == 0 then
+ return 0, cache
+ else
+ return n, { }
+ end
end
-end
-local function cleanup()
- local hf, ng, np, nk, nw
- nf, f_cache = freed(f_cache)
- ng, g_cache = freed(g_cache)
- np, p_cache = freed(p_cache)
- nk, k_cache = freed(k_cache)
- nw, w_cache = freed(w_cache)
- nb, b_cache = freed(b_cache)
- -- report_visualize("cache cleanup: %s fontkerns, %s skips, %s penalties, %s kerns, %s whatsits, %s boxes",nf,ng,np,nk,nw,nb)
-end
+ local function cleanup()
+ local hf, nw, nb, ng_v, ng_h, np_v, np_h, nk_v, nk_h
+ nf, f_cache = freed(f_cache)
+ nw, w_cache = freed(w_cache)
+ nb, b_cache = freed(b_cache)
+ no, o_cache = freed(o_cache)
+ ng_v, g_cache_v = freed(g_cache_v)
+ ng_h, g_cache_h = freed(g_cache_h)
+ np_v, p_cache_v = freed(p_cache_v)
+ np_h, p_cache_h = freed(p_cache_h)
+ nk_v, k_cache_v = freed(k_cache_v)
+ nk_h, k_cache_h = freed(k_cache_h)
+ -- report_visualize("cache cleanup: %s fontkerns, %s skips, %s penalties, %s kerns, %s whatsits, %s boxes, %s origins",
+ -- nf,ng_v+ng_h,np_v+np_h,nk_v+nk_h,nw,nb,no)
+ end
-local function handler(head)
- if usedfont then
- starttiming(visualizers)
- -- local l = texgetattribute(a_layer)
- -- local v = texgetattribute(a_visual)
- -- texsetattribute(a_layer,unsetvalue)
- -- texsetattribute(a_visual,unsetvalue)
- head = visualize(tonut(head))
- -- texsetattribute(a_layer,l)
- -- texsetattribute(a_visual,v)
- -- -- cleanup()
- stoptiming(visualizers)
- return tonode(head), true
- else
- return head, false
+ local function handler(head)
+ if usedfont then
+ starttiming(visualizers)
+ -- local l = texgetattribute(a_layer)
+ -- local v = texgetattribute(a_visual)
+ -- texsetattribute(a_layer,unsetvalue)
+ -- texsetattribute(a_visual,unsetvalue)
+ head = visualize(tonut(head),true)
+ -- texsetattribute(a_layer,l)
+ -- texsetattribute(a_visual,v)
+ -- -- cleanup()
+ stoptiming(visualizers)
+ return tonode(head), true
+ else
+ return head, false
+ end
end
-end
-visualizers.handler = handler
+ visualizers.handler = handler
+
+ luatex.registerstopactions(cleanup)
+
+end
function visualizers.box(n)
if usedfont then
starttiming(visualizers)
local box = getbox(n)
- setfield(box,"list",visualize(getlist(box)))
+ if box then
+ setlist(box,visualize(getlist(box),getid(box) == vlist_code))
+ end
stoptiming(visualizers)
return head, true
else
@@ -961,39 +1052,41 @@ function visualizers.box(n)
end
end
-local last = nil
-local used = nil
-
-local mark = {
- "trace:1", "trace:2", "trace:3",
- "trace:4", "trace:5", "trace:6",
- "trace:7",
-}
-
-local function markfonts(list)
- for n in traverse_nodes(list) do
- local id = getid(n)
- if id == glyph_code then
- local font = getfont(n)
- local okay = used[font]
- if not okay then
- last = last + 1
- okay = mark[last]
- used[font] = okay
+do
+
+ local last = nil
+ local used = nil
+
+ local mark = {
+ "trace:1", "trace:2", "trace:3",
+ "trace:4", "trace:5", "trace:6",
+ "trace:7",
+ }
+
+ local function markfonts(list)
+ for n in traverse_nodes(list) do
+ local id = getid(n)
+ if id == glyph_code then
+ local font = getfont(n)
+ local okay = used[font]
+ if not okay then
+ last = last + 1
+ okay = mark[last]
+ used[font] = okay
+ end
+ setcolor(n,okay)
+ elseif id == hlist_code or id == vlist_code then
+ markfonts(getlist(n))
end
- setcolor(n,okay)
- elseif id == hlist_code or id == vlist_code then
- markfonts(getlist(n))
end
end
-end
-function visualizers.markfonts(list)
- last, used = 0, { }
- markfonts(type(n) == "number" and getlist(getbox(n)) or n)
-end
+ function visualizers.markfonts(list)
+ last, used = 0, { }
+ markfonts(type(n) == "number" and getlist(getbox(n)) or n)
+ end
-luatex.registerstopactions(cleanup)
+end
statistics.register("visualization time",function()
if enabled then
diff --git a/Master/texmf-dist/tex/context/base/trac-vis.mkiv b/Master/texmf-dist/tex/context/base/mkiv/trac-vis.mkiv
index 74a2c1ba223..a503981f5d9 100644
--- a/Master/texmf-dist/tex/context/base/trac-vis.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-vis.mkiv
@@ -54,11 +54,19 @@
\let\syst_visualizers_vbox\vbox
\let\syst_visualizers_vtop\vtop
+\let\syst_visualizers_hpack\hpack
+\let\syst_visualizers_vpack\vpack
+\let\syst_visualizers_tpack\tpack
+
\unexpanded\def\ruledhbox{\syst_visualizers_hbox attr \visualattribute \clf_getvisual{simplehbox} }
\unexpanded\def\ruledvbox{\syst_visualizers_vbox attr \visualattribute \clf_getvisual{simplevbox} }
\unexpanded\def\ruledvtop{\syst_visualizers_vtop attr \visualattribute \clf_getvisual{simplevtop} } % special case
\unexpanded\def\ruledtopv{\syst_visualizers_vtop attr \visualattribute \clf_getvisual{vtop} }
+\unexpanded\def\ruledhpack{\syst_visualizers_hpack attr \visualattribute \clf_getvisual{simplehbox} }
+\unexpanded\def\ruledvpack{\syst_visualizers_vpack attr \visualattribute \clf_getvisual{simplevbox} }
+\unexpanded\def\ruledtpack{\syst_visualizers_tpack attr \visualattribute \clf_getvisual{simplevtop} } % special case
+
\unexpanded\def\ruledmbox#1{\ruledhbox{\startimath#1\stopimath}}
\appendtoks
@@ -133,20 +141,13 @@
% \definecolor[f:y:t][a=1,t=.25,y=1]
% \definecolor[f:k:t][a=1,t=.25,s=0]
-% \def\node_backgrounds_boxes_add#1[#2]%
-% {\node_backgrounds_boxes_initialize
-% #1\backgroundcolorattr{#2}}
-
-\def\syst_visualizers_filled_hbox#1%
- {\node_backgrounds_boxes_initialize\hbox\backgroundcolorattr{#1}}
-
-\unexpanded\def\filledhboxr{\syst_visualizers_filled_hbox{f:r:t}}
-\unexpanded\def\filledhboxg{\syst_visualizers_filled_hbox{f:g:t}}
-\unexpanded\def\filledhboxb{\syst_visualizers_filled_hbox{f:b:t}}
-\unexpanded\def\filledhboxc{\syst_visualizers_filled_hbox{f:c:t}}
-\unexpanded\def\filledhboxm{\syst_visualizers_filled_hbox{f:m:t}}
-\unexpanded\def\filledhboxy{\syst_visualizers_filled_hbox{f:y:t}}
-\unexpanded\def\filledhboxk{\syst_visualizers_filled_hbox{f:k:t}}
+\unexpanded\def\filledhboxr{\node_backgrounds_boxes_add\hbox[f:r:t]}
+\unexpanded\def\filledhboxg{\node_backgrounds_boxes_add\hbox[f:g:t]}
+\unexpanded\def\filledhboxb{\node_backgrounds_boxes_add\hbox[f:b:t]}
+\unexpanded\def\filledhboxc{\node_backgrounds_boxes_add\hbox[f:c:t]}
+\unexpanded\def\filledhboxm{\node_backgrounds_boxes_add\hbox[f:m:t]}
+\unexpanded\def\filledhboxy{\node_backgrounds_boxes_add\hbox[f:y:t]}
+\unexpanded\def\filledhboxk{\node_backgrounds_boxes_add\hbox[f:k:t]}
%D Overload:
@@ -174,6 +175,32 @@
\unhbox\scratchbox
\endgroup}
+% As demo:
+%
+% \startbuffer
+% \hbox {\raise1cm\hbox{raised} normal \lower1cm\hbox{lowered}}
+% \blank
+% \moveleft1cm\hbox{left}
+% \blank
+% \hbox{normal}
+% \blank
+% \moveright1cm\hbox{right}
+% \blank
+% \stopbuffer
+%
+% \start \showboxes \getbuffer \stop \blank[4*big] \getbuffer
+%
+% \startbuffer
+% \moveleft1cm\vbox{left}
+% \blank
+% \vbox{normal}
+% \blank
+% \moveright1cm\vbox{right}
+% \blank
+% \stopbuffer
+%
+% \start \showboxes \getbuffer \stop \blank[4*big] \getbuffer
+
%D We keep this one:
\unexpanded\def\dontinterfere
diff --git a/Master/texmf-dist/tex/context/base/trac-xml.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-xml.lua
index cd8b8c0a5f5..cd8b8c0a5f5 100644
--- a/Master/texmf-dist/tex/context/base/trac-xml.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-xml.lua
diff --git a/Master/texmf-dist/tex/context/base/type-def.mkiv b/Master/texmf-dist/tex/context/base/mkiv/type-def.mkiv
index a80b4f7bdf3..a80b4f7bdf3 100644
--- a/Master/texmf-dist/tex/context/base/type-def.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/type-def.mkiv
diff --git a/Master/texmf-dist/tex/context/base/type-fbk.mkiv b/Master/texmf-dist/tex/context/base/mkiv/type-fbk.mkiv
index 4ac38178754..4ac38178754 100644
--- a/Master/texmf-dist/tex/context/base/type-fbk.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/type-fbk.mkiv
diff --git a/Master/texmf-dist/tex/context/base/type-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/type-ini.lua
index cd5b32d3e6c..cd5b32d3e6c 100644
--- a/Master/texmf-dist/tex/context/base/type-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/type-ini.lua
diff --git a/Master/texmf-dist/tex/context/base/type-ini.mkvi b/Master/texmf-dist/tex/context/base/mkiv/type-ini.mkvi
index f56c5573d5d..3969a5b95e6 100644
--- a/Master/texmf-dist/tex/context/base/type-ini.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/type-ini.mkvi
@@ -258,9 +258,12 @@
\def\font_typescripts_synonym_define[#name][#synonym]%
{\ifsecondargument\setevalue{\??typescriptsynonyms#name}{#synonym}\fi}
-\def\truetypescript#name%
+\def\truetypescript#name% recursove so no \lastnamedcs
{\ifcsname\??typescriptsynonyms#name\endcsname
- \expandafter\truetypescript\csname\??typescriptsynonyms#name\endcsname\else#name%
+ %\expandafter\truetypescript\csname\??typescriptsynonyms#name\endcsname
+ \expandafter\truetypescript\lastnamedcs
+ \else
+ #name%
\fi}
% script [serif] [default] [size]
@@ -417,7 +420,8 @@
% with testing:
\def\typescriptprefix#name%
- {\ifcsname\??typescriptprefix#name\endcsname\csname\??typescriptprefix#name\endcsname\else#name\fi}
+ %{\ifcsname\??typescriptprefix#name\endcsname\csname\??typescriptprefix#name\endcsname\else#name\fi}
+ {\ifcsname\??typescriptprefix#name\endcsname\lastnamedcs\else#name\fi}
% defining typefaces:
%
@@ -550,12 +554,13 @@
\def\font_typefaces_setup[#class][#settings]%
{\setcurrentfontclass{#class}%
\let\globalfontclass\fontclass
- \iffourthargument
+ \ifsecondargument
\setupbodyfont[#settings]%
\else\ifx\fontclass\empty
\setupbodyfont[\s!rm]%
\else\ifcsname\??typescriptdefaultstyles\fontclass\endcsname
- \setupbodyfont[\csname\??typescriptdefaultstyles\fontclass\endcsname]%
+ %\setupbodyfont[\csname\??typescriptdefaultstyles\fontclass\endcsname]%
+ \expandafter\setupbodyfont\expandafter[\lastnamedcs]%
\else
\setupbodyfont[\s!rm]%
\fi \fi \fi
@@ -564,12 +569,13 @@
\def\font_typefaces_switch[#class][#settings]%
{\setcurrentfontclass{#class}%
\let\globalfontclass\globalfontclass
- \iffourthargument
+ \ifsecondargument
\switchtobodyfont[#settings]%
\else\ifx\fontclass\empty
\switchtobodyfont[\s!rm]%
\else\ifcsname\??typescriptdefaultstyles\fontclass\endcsname
- \switchtobodyfont[\csname\??typescriptdefaultstyles\fontclass\endcsname]%
+ %\switchtobodyfont[\csname\??typescriptdefaultstyles\fontclass\endcsname]%
+ \expandafter\switchtobodyfont\expandafter[\lastnamedcs]%
\else
\switchtobodyfont[\s!rm]%
\fi \fi \fi
@@ -601,7 +607,8 @@
\def\font_typescripts_inherit_check_indeed#name% called often
{\ifcsname\??typescriptinheritances\fontclass:#name\endcsname
- \expandafter\let\expandafter\fontclass\csname\??typescriptinheritances\fontclass:#name\endcsname
+ %\expandafter\let\expandafter\fontclass\csname\??typescriptinheritances\fontclass:#name\endcsname
+ \expandafter\let\expandafter\fontclass\lastnamedcs
\fi}
\let\font_typescripts_inherit_check\gobbleoneargument
@@ -626,13 +633,10 @@
{\ifx\fontclass\empty
\let\fontstyle\s!rm
\else\ifcsname\??typescriptdefaultstyles\fontclass\endcsname
- \edef\fontstyle{\csname\??typescriptdefaultstyles\fontclass\endcsname}%
+ %\edef\fontstyle{\csname\??typescriptdefaultstyles\fontclass\endcsname}%
+ \edef\fontstyle{\lastnamedcs}%
\else
\let\fontstyle\s!rm
\fi\fi}
-%D This might become a module:
-
-\fetchruntimecommand \typetypescript {\f!typeprefix\s!run}
-
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/type-lua.mkiv b/Master/texmf-dist/tex/context/base/mkiv/type-lua.mkiv
index fac6c3867a8..fac6c3867a8 100644
--- a/Master/texmf-dist/tex/context/base/type-lua.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/type-lua.mkiv
diff --git a/Master/texmf-dist/tex/context/base/type-one.mkiv b/Master/texmf-dist/tex/context/base/mkiv/type-one.mkiv
index 12b9e14add2..12b9e14add2 100644
--- a/Master/texmf-dist/tex/context/base/type-one.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/type-one.mkiv
diff --git a/Master/texmf-dist/tex/context/base/type-otf.mkiv b/Master/texmf-dist/tex/context/base/mkiv/type-otf.mkiv
index 1f1564ef571..1f1564ef571 100644
--- a/Master/texmf-dist/tex/context/base/type-otf.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/type-otf.mkiv
diff --git a/Master/texmf-dist/tex/context/base/type-set.mkiv b/Master/texmf-dist/tex/context/base/mkiv/type-set.mkiv
index b07944afe06..e2d7071d461 100644
--- a/Master/texmf-dist/tex/context/base/type-set.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/type-set.mkiv
@@ -58,8 +58,10 @@
\fi
\definefilesynonym [type-imp-lucida.mkiv] [type-imp-lucida-typeone.mkiv]
-\definefilesynonym [type-imp-lucidanova.mkiv] [type-imp-lucida-opentype.mkiv]
\definefilesynonym [type-imp-lucidaot.mkiv] [type-imp-lucida-opentype.mkiv]
+\definefilesynonym [type-imp-lucidadk.mkiv] [type-imp-lucida-opentype.mkiv]
+
+\definefilesynonym [type-imp-dejavu-condensed.mkiv] [type-imp-dejavu.mkiv]
\definefilesynonym [type-imp-palatino.mkiv] [type-imp-texgyre.mkiv]
\definefilesynonym [type-imp-courier.mkiv] [type-imp-texgyre.mkiv]
diff --git a/Master/texmf-dist/tex/context/base/type-siz.mkiv b/Master/texmf-dist/tex/context/base/mkiv/type-siz.mkiv
index d4c90b18229..d4c90b18229 100644
--- a/Master/texmf-dist/tex/context/base/type-siz.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/type-siz.mkiv
diff --git a/Master/texmf-dist/tex/context/base/type-tmf.mkiv b/Master/texmf-dist/tex/context/base/mkiv/type-tmf.mkiv
index 829b6baec99..829b6baec99 100644
--- a/Master/texmf-dist/tex/context/base/type-tmf.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/type-tmf.mkiv
diff --git a/Master/texmf-dist/tex/context/base/typo-bld.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-bld.lua
index 4d0f28d9ab1..ce6a65baf37 100644
--- a/Master/texmf-dist/tex/context/base/typo-bld.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-bld.lua
@@ -1,4 +1,4 @@
-if not modules then modules = { } end modules ['typo-bld'] = { -- was node-par
+if modules then modules = { } end modules ['typo-bld'] = { -- was node-par
version = 1.001,
comment = "companion to typo-bld.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
@@ -49,7 +49,11 @@ local stoptiming = statistics.stoptiming
storage.register("builders/paragraphs/constructors/names", names, "builders.paragraphs.constructors.names")
storage.register("builders/paragraphs/constructors/numbers", numbers, "builders.paragraphs.constructors.numbers")
-local report_parbuilders = logs.reporter("parbuilders")
+local trace_page_builder = false trackers.register("builders.page", function(v) trace_page_builder = v end)
+local trace_post_builder = false trackers.register("builders.post", function(v) trace_post_builder = v end)
+
+local report_par_builder = logs.reporter("builders","par")
+local report_page_builder = logs.reporter("builders","page")
local mainconstructor = nil -- not stored in format
local nofconstructors = 0
@@ -81,7 +85,7 @@ function constructors.start(name)
if mainconstructor ~= unsetvalue then
constructors.enable()
end
- -- report_parbuilders("start %a",name)
+ -- report_par_builder("start %a",name)
end
function constructors.stop()
@@ -91,7 +95,7 @@ function constructors.stop()
if mainconstructor == unsetvalue then
constructors.disable()
end
- -- report_parbuilders("stop")
+ -- report_par_builder("stop")
end
-- return values:
@@ -112,7 +116,7 @@ function constructors.handler(head,followed_by_display)
if handler then
return handler(head,followed_by_display)
else
- report_parbuilders("contructor method %a is not defined",tostring(method))
+ report_par_builder("contructor method %a is not defined",tostring(method))
return true -- let tex break
end
end
@@ -179,7 +183,9 @@ end)
nodes.builders = nodes.builder or { }
local builders = nodes.builders
-local actions = nodes.tasks.actions("vboxbuilders")
+local normalize = typesetters.paragraphs.normalize
+
+local vboxactions = nodes.tasks.actions("vboxbuilders")
function builders.vpack_filter(head,groupcode,size,packtype,maxdepth,direction)
local done = false
@@ -187,7 +193,7 @@ function builders.vpack_filter(head,groupcode,size,packtype,maxdepth,direction)
starttiming(builders)
if trace_vpacking then
local before = nodes.count(head)
- head, done = actions(head,groupcode,size,packtype,maxdepth,direction)
+ head, done = vboxactions(head,groupcode,size,packtype,maxdepth,direction)
local after = nodes.count(head)
if done then
nodes.processors.tracer("vpack","changed",head,groupcode,before,after,true)
@@ -195,7 +201,7 @@ function builders.vpack_filter(head,groupcode,size,packtype,maxdepth,direction)
nodes.processors.tracer("vpack","unchanged",head,groupcode,before,after,true)
end
else
- head, done = actions(head,groupcode)
+ head, done = vboxactions(head,groupcode)
end
stoptiming(builders)
end
@@ -205,7 +211,8 @@ end
-- This one is special in the sense that it has no head and we operate on the mlv. Also,
-- we need to do the vspacing last as it removes items from the mvl.
-local actions = nodes.tasks.actions("mvlbuilders")
+local pageactions = nodes.tasks.actions("mvlbuilders")
+----- lineactions = nodes.tasks.actions("linebuilders")
local function report(groupcode,head)
report_page_builder("trigger: %s",groupcode)
@@ -217,38 +224,42 @@ end
-- use tex.[sg]etlist
+-- check why box is called before after_linebreak .. maybe make categories and
+-- call 'm less
+
+
+-- this will be split into contribute_filter for these 4 so at some point
+-- thecheck can go away
+
function builders.buildpage_filter(groupcode)
- -- -- this needs checking .. gets called too often
- -- if group_code ~= "after_output" then
- -- if trace_page_builder then
- -- report(groupcode)
- -- end
- -- return nil, false
- -- end
- local head, done = texlists.contrib_head, false
+ -- the next check saves 1% runtime on 1000 tufte pages
+ local head = texlists.contrib_head
+ local done = false
if head then
+ -- called quite often ... maybe time to remove timing
starttiming(builders)
if trace_page_builder then
report(groupcode,head)
end
- head, done = actions(head,groupcode)
+ head, done = pageactions(head,groupcode)
stoptiming(builders)
-- -- doesn't work here (not passed on?)
-- tex.pagegoal = tex.vsize - tex.dimen.d_page_floats_inserted_top - tex.dimen.d_page_floats_inserted_bottom
texlists.contrib_head = head or nil -- needs checking
--- tex.setlist("contrib_head",head,head and nodes.tail(head))
+ -- tex.setlist("contrib_head",head,head and nodes.tail(head))
return done and head or true -- no return value needed
else
+ -- happens quite often
if trace_page_builder then
report(groupcode)
end
return nil, false -- no return value needed
end
-
end
-callbacks.register('vpack_filter', builders.vpack_filter, "vertical spacing etc")
-callbacks.register('buildpage_filter', builders.buildpage_filter, "vertical spacing etc (mvl)")
+callbacks.register('vpack_filter', builders.vpack_filter, "vertical spacing etc")
+callbacks.register('buildpage_filter', builders.buildpage_filter, "vertical spacing etc (mvl)")
+---------.register('contribute_filter', builders.contribute_filter, "adding content to lists")
statistics.register("v-node processing time", function()
return statistics.elapsedseconds(builders)
@@ -262,3 +273,113 @@ implement { name = "startparbuilder", actions = constructors.start, arguments
implement { name = "stopparbuilder", actions = constructors.stop }
implement { name = "enableparbuilder", actions = constructors.enable }
implement { name = "disableparbuilder", actions = constructors.disable }
+
+-- Here are some tracers:
+
+local new_kern = nodes.pool.kern
+local new_rule = nodes.pool.rule
+local hpack = nodes.hpack
+local setcolor = nodes.tracers.colors.set
+local listtoutf = nodes.listtoutf
+
+local report_hpack = logs.reporter("hpack routine")
+local report_vpack = logs.reporter("vpack routine")
+
+-- overflow|badness w h d dir
+
+local function vpack_quality(how,n,detail,first,last)
+ if last <= 0 then
+ report_vpack("%s vbox",how)
+ elseif first > 0 and first < last then
+ report_vpack("%s vbox at line %i - %i",how,first,last)
+ else
+ report_vpack("%s vbox at line %i",how,last)
+ end
+end
+
+trackers.register("builders.vpack.quality",function(v)
+ callback.register("vpack_quality",v and report_vpack_quality or nil)
+end)
+
+local report, show = false, false
+
+local function hpack_quality(how,detail,n,first,last)
+ if report then
+ local str = listtoutf(n.head,"",true,nil,true)
+ if last <= 0 then
+ report_hpack("%s hbox: %s",how,str)
+ elseif first > 0 and first < last then
+ report_hpack("%s hbox at line %i - %i: %s",how,first,last,str)
+ else
+ report_hpack("%s hbox at line %i: %s",how,last,str)
+ end
+ end
+ if show then
+ local width = 2*65536
+ local height = n.height
+ local depth = n.depth
+ local dir = n.dir
+ if height < 4*65526 then
+ height = 4*65526
+ end
+ if depth < 2*65526 then
+ depth = 2*65526
+ end
+ local rule = new_rule(width,height,depth)
+ rule.dir = dir
+ if how == "overfull" then
+ setcolor(rule,"red")
+ local kern = new_kern(-detail)
+ kern.next = rule
+ rule.prev = kern
+ rule = kern
+ elseif how == "underfull" then
+ setcolor(rule,"blue")
+ elseif how == "loose" then
+ setcolor(rule,"magenta")
+ elseif how == "tight" then
+ setcolor(rule,"cyan")
+ end
+ rule = hpack(rule)
+ rule.width = 0
+ rule.dir = dir
+ return rule
+ end
+end
+
+trackers.register("builders.hpack.quality",function(v)
+ report = v
+ callback.register("hpack_quality",(report or show) and hpack_quality or nil)
+end)
+
+trackers.register("builders.hpack.overflow",function(v)
+ show = v
+ callback.register("hpack_quality",(report or show) and hpack_quality or nil)
+end)
+
+-- local ignoredepth = - 65536000
+--
+-- callback.register("append_to_vlist_filter", function(box,location,prevdepth,mirrored)
+-- if prevdepth > ignoredepth then
+-- local b = tex.baselineskip
+-- local d = b.width - prevdepth
+-- local g = nil
+-- if mirrored then
+-- d = d - box.depth
+-- else
+-- d = d - box.height
+-- end
+-- if d < tex.lineskiplimit then
+-- g = nodes.pool.glue()
+-- g.spec = tex.lineskip
+-- else
+-- g = nodes.pool.baselineskip(d)
+-- end
+-- g.next = box
+-- box.prev = g
+-- return g, mirrored and box.height or box.depth
+-- else
+-- return box, mirrored and box.height or box.depth
+-- end
+-- end)
+--
diff --git a/Master/texmf-dist/tex/context/base/typo-bld.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-bld.mkiv
index 69047c98b15..621d81c524f 100644
--- a/Master/texmf-dist/tex/context/base/typo-bld.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-bld.mkiv
@@ -17,6 +17,10 @@
%D the underlying interfaces. But at least it's cleaned as part of the status-mkiv
%D cleanup.
+% \enabletrackers[builders.hpack.overflow]
+% \enabletrackers[builders.hpack.quality]
+% \enabletrackers[builders.vpack.quality]
+
% \startparbuilder[default]
% \input tufte \par
% \startparbuilder[oneline]
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-brk.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-brk.lua
new file mode 100644
index 00000000000..106bb49546b
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-brk.lua
@@ -0,0 +1,500 @@
+if not modules then modules = { } end modules ['typo-brk'] = {
+ version = 1.001,
+ comment = "companion to typo-brk.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- this code dates from the beginning and is kind of experimental; it
+-- will be optimized and improved soon
+
+local next, type, tonumber = next, type, tonumber
+local utfbyte, utfchar = utf.byte, utf.char
+local format = string.format
+
+local trace_breakpoints = false trackers.register("typesetters.breakpoints", function(v) trace_breakpoints = v end)
+
+local report_breakpoints = logs.reporter("typesetting","breakpoints")
+
+local nodes, node = nodes, node
+
+local settings_to_array = utilities.parsers.settings_to_array
+
+local nuts = nodes.nuts
+local tonut = nuts.tonut
+local tonode = nuts.tonode
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getboth = nuts.getboth
+local getsubtype = nuts.getsubtype
+local getfont = nuts.getfont
+local getid = nuts.getid
+local getfield = nuts.getfield
+local getattr = nuts.getattr
+local isglyph = nuts.isglyph
+
+local setfield = nuts.setfield
+local setattr = nuts.setattr
+local setlink = nuts.setlink
+local setchar = nuts.setchar
+local setdisc = nuts.setdisc
+local setnext = nuts.setnext
+local setprev = nuts.setprev
+local setboth = nuts.setboth
+local setsubtype = nuts.setsubtype
+
+local copy_node = nuts.copy
+local copy_nodelist = nuts.copy_list
+local free_node = nuts.free
+local insert_node_before = nuts.insert_before
+local insert_node_after = nuts.insert_after
+local remove_node = nuts.remove
+local end_of_math = nuts.end_of_math
+
+local tonodes = nuts.tonodes
+
+local texsetattribute = tex.setattribute
+local unsetvalue = attributes.unsetvalue
+
+local nodepool = nuts.pool
+local tasks = nodes.tasks
+
+local v_reset = interfaces.variables.reset
+local v_yes = interfaces.variables.yes
+
+local implement = interfaces.implement
+
+local new_penalty = nodepool.penalty
+local new_glue = nodepool.glue
+local new_disc = nodepool.disc
+local new_wordboundary = nodepool.wordboundary
+
+local nodecodes = nodes.nodecodes
+local kerncodes = nodes.kerncodes
+
+local glyph_code = nodecodes.glyph
+local kern_code = nodecodes.kern
+local math_code = nodecodes.math
+
+local fontkern_code = kerncodes.fontkern
+local userkern_code = kerncodes.userkern
+local italickern_code = kerncodes.italiccorrection
+
+local typesetters = typesetters
+
+typesetters.breakpoints = typesetters.breakpoints or {}
+local breakpoints = typesetters.breakpoints
+
+breakpoints.mapping = breakpoints.mapping or { }
+breakpoints.numbers = breakpoints.numbers or { }
+
+breakpoints.methods = breakpoints.methods or { }
+local methods = breakpoints.methods
+
+local a_breakpoints = attributes.private("breakpoint")
+
+storage.register("typesetters/breakpoints/mapping", breakpoints.mapping, "typesetters.breakpoints.mapping")
+
+local mapping = breakpoints.mapping
+local numbers = breakpoints.mapping
+
+for i=1,#mapping do
+ local m = mapping[i]
+ numbers[m.name] = m
+end
+
+-- this needs a cleanup ... maybe make all of them disc nodes
+
+-- todo: use boundaries
+
+local function withattribute(n,a)
+ setfield(n,"attr",a)
+ return n
+end
+
+local function insert_break(head,start,stop,before,after,kern)
+ local a = getfield(start,"attr")
+ if not kern then
+ insert_node_before(head,start,withattribute(new_penalty(before),a))
+ insert_node_before(head,start,withattribute(new_glue(0),a))
+ end
+ insert_node_after(head,stop,withattribute(new_glue(0),a))
+ insert_node_after(head,stop,withattribute(new_penalty(after),a))
+end
+
+methods[1] = function(head,start,stop,settings,kern)
+ local p, n = getboth(stop)
+ if p and n then
+ insert_break(head,start,stop,10000,0,kern)
+ end
+ return head, stop
+end
+
+methods[6] = function(head,start,stop,settings,kern)
+ local p = getprev(start)
+ local n = getnext(stop)
+ if p and n then
+ if kern then
+ insert_break(head,start,stop,10000,0,kern)
+ else
+ local l = new_wordboundary()
+ local d = new_disc()
+ local r = new_wordboundary()
+ local a = getfield(start,"attr")
+ -- setfield(l,"attr",a)
+ setfield(d,"attr",a) -- otherwise basemode is forces and we crash
+ -- setfield(r,"attr",a)
+ setlink(p,l)
+ setlink(l,d)
+ setlink(d,r)
+ setlink(r,n)
+ if start == stop then
+ setboth(start)
+ setdisc(d,start,nil,copy_node(start))
+ else
+ setprev(start)
+ setnext(stop)
+ setdisc(d,start,nil,copy_nodelist(start))
+ end
+ stop = r
+ end
+ end
+ return head, stop
+end
+
+methods[2] = function(head,start) -- ( => (-
+ local p, n = getboth(start)
+ if p and n then
+ local tmp
+ head, start, tmp = remove_node(head,start)
+ head, start = insert_node_before(head,start,new_disc())
+ -- setfield(start,"attr",copy_nodelist(getfield(tmp,"attr"))) -- just a copy will do
+ setfield(start,"attr",getfield(tmp,"attr"))
+ setfield(start,"replace",tmp)
+ local tmp = copy_node(tmp)
+ local hyphen = copy_node(tmp)
+ setchar(hyphen,languages.prehyphenchar(getfield(tmp,"lang")))
+ setlink(tmp,hyphen)
+ setfield(start,"post",tmp)
+ insert_break(head,start,start,10000,10000)
+ end
+ return head, start
+end
+
+methods[3] = function(head,start) -- ) => -)
+ local p, n = getboth(start)
+ if p and n then
+ local tmp
+ head, start, tmp = remove_node(head,start)
+ head, start = insert_node_before(head,start,new_disc())
+ -- setfield(start,"attr",copy_nodelist(getfield(tmp,"attr"))) -- just a copy will do
+ setfield(start,"attr",getfield(tmp,"attr"))
+ setfield(start,"replace",tmp)
+ local tmp = copy_node(tmp)
+ local hyphen = copy_node(tmp)
+ setchar(hyphen,languages.prehyphenchar(getfield(tmp,"lang")))
+ setlink(hyphen,tmp)
+ setfield(start,"pre",hyphen)
+ insert_break(head,start,start,10000,10000)
+ end
+ return head, start
+end
+
+methods[4] = function(head,start) -- - => - - -
+ local p, n = getboth(start)
+ if p and n then
+ local tmp
+ head, start, tmp = remove_node(head,start)
+ head, start = insert_node_before(head,start,new_disc())
+ -- setfield(start,"attr",copy_nodelist(getfield(tmp,"attr"))) -- just a copy will do
+ setfield(start,"attr",getfield(tmp,"attr"))
+ setdisc(start,copy_node(tmp),copy_node(tmp),tmp)
+ insert_break(head,start,start,10000,10000)
+ end
+ return head, start
+end
+
+methods[5] = function(head,start,stop,settings) -- x => p q r
+ local p, n = getboth(start)
+ if p and n then
+ local tmp
+ head, start, tmp = remove_node(head,start)
+ head, start = insert_node_before(head,start,new_disc())
+ local attr = getfield(tmp,"attr")
+ local font = getfont(tmp)
+ local left = settings.left
+ local right = settings.right
+ local middle = settings.middle
+ if left then
+ left = tonodes(tostring(left),font,attr)
+ end
+ if right then
+ right = tonodes(tostring(right),font,attr)
+ end
+ if middle then
+ middle = tonodes(tostring(middle),font,attr)
+ end
+ setdisc(start,left,right,middle)
+ -- setfield(start,"attr",copy_nodelist(attr)) -- todo: critical only -- just a copy will do
+ setfield(start,"attr",attr) -- todo: critical only -- just a copy will do
+ free_node(tmp)
+ insert_break(head,start,start,10000,10000)
+ end
+ return head, start
+end
+
+-- we know we have a limited set
+-- what if characters are replaced by the font handler
+-- do we need to go into disc nodes (or do it as first step but then we need a pre/post font handler)
+
+function breakpoints.handler(head)
+ local done = false
+ local nead = tonut(head)
+ local attr = nil
+ local map = nil
+ local current = nead
+ while current do
+ local char, id = isglyph(current)
+ if char then
+ local a = getattr(current,a_breakpoints)
+ if a and a > 0 then
+ if a ~= attr then
+ local data = mapping[a]
+ if data then
+ map = data.characters
+ else
+ map = nil
+ end
+ attr = a
+ end
+ if map then
+ local cmap = map[char]
+ if cmap then
+ -- for now we collect but when found ok we can move the handler here
+ -- although it saves nothing in terms of performance
+ local lang = getfield(current,"lang")
+ local smap = lang and lang >= 0 and lang < 0x7FFF and (cmap[numbers[lang]] or cmap[""])
+ if smap then
+ local skip = smap.skip
+ local start = current
+ local stop = current
+ current = getnext(current)
+ if skip then
+ while current do
+ local c = isglyph(current)
+ if c == char then
+ stop = current
+ current = getnext(current)
+ else
+ break
+ end
+ end
+ end
+ local d = { start, stop, cmap, smap, char }
+ if done then
+ done[#done+1] = d
+ else
+ done = { d }
+ end
+ else
+ current = getnext(current)
+ end
+ setattr(start,a_breakpoints,unsetvalue) -- should not be needed
+ else
+ current = getnext(current)
+ end
+ else
+ current = getnext(current)
+ end
+ else
+ current = getnext(current)
+ end
+ elseif id == math_code then
+ attr = nil
+ current = end_of_math(current)
+ if current then
+ current = getnext(current)
+ end
+ else
+ current = getnext(current)
+ end
+ end
+ if not done then
+ return head, false
+ end
+ -- we have hits
+ local numbers = languages.numbers
+ for i=1,#done do
+ local data = done[i]
+ local start = data[1]
+ local stop = data[2]
+ local cmap = data[3]
+ local smap = data[4]
+-- local lang = getfield(start,"lang")
+-- -- we do a sanity check for language
+-- local smap = lang and lang >= 0 and lang < 0x7FFF and (cmap[numbers[lang]] or cmap[""])
+-- if smap then
+ local nleft = smap.nleft
+ local cleft = 0
+ local prev = getprev(start)
+ local kern = nil
+ while prev and nleft ~= cleft do
+ local id = getid(prev)
+ if id == glyph_code then
+ cleft = cleft + 1
+ prev = getprev(prev)
+ elseif id == kern_code then
+ local s = getsubtype(prev)
+ if s == fontkern_code or s == italickern_code then
+ if cleft == 0 then
+ kern = prev
+ prev = getprev(prev)
+ else
+ break
+ end
+ else
+ break
+ end
+ else
+ break
+ end
+ end
+ if nleft == cleft then
+ local nright = smap.nright
+ local cright = 0
+ local next = getnext(stop) -- getnext(start)
+ while next and nright ~= cright do
+ local char, id = isglyph(next)
+ if char then
+ if cright == 1 and cmap[char] then
+ -- let's not make it too messy
+ break
+ end
+ cright = cright + 1
+ next = getnext(next)
+ elseif id == kern_code then
+ local s = getsubtype(next)
+ if s == fontkern_code or s == italickern_code then
+ if cleft == 0 then
+ next = getnext(next)
+ else
+ break
+ end
+ else
+ break
+ end
+ else
+ break
+ end
+ end
+ if nright == cright then
+ local method = methods[smap.type]
+ if method then
+ nead, start = method(nead,start,stop,smap,kern)
+ end
+ end
+-- end
+ end
+ end
+ return tonode(nead), true
+end
+
+local enabled = false
+
+function breakpoints.define(name)
+ local data = numbers[name]
+ if data then
+ -- error
+ else
+ local number = #mapping + 1
+ local data = {
+ name = name,
+ number = number,
+ characters = { },
+ }
+ mapping[number] = data
+ numbers[name] = data
+ end
+end
+
+function breakpoints.setreplacement(name,char,language,settings)
+ char = utfbyte(char)
+ local data = numbers[name]
+ if data then
+ local characters = data.characters
+ local cmap = characters[char]
+ if not cmap then
+ cmap = { }
+ characters[char] = cmap
+ end
+ local left, right, middle = settings.left, settings.right, settings.middle
+ cmap[language or ""] = {
+ type = tonumber(settings.type) or 1,
+ nleft = tonumber(settings.nleft) or 1,
+ nright = tonumber(settings.nright) or 1,
+ left = left ~= "" and left or nil,
+ right = right ~= "" and right or nil,
+ middle = middle ~= "" and middle or nil,
+ skip = settings.range == v_yes,
+ } -- was { type or 1, before or 1, after or 1 }
+ end
+end
+
+function breakpoints.set(n)
+ if n == v_reset then
+ n = unsetvalue
+ else
+ n = mapping[n]
+ if not n then
+ n = unsetvalue
+ else
+ if not enabled then
+ if trace_breakpoints then
+ report_breakpoints("enabling breakpoints handler")
+ end
+ tasks.enableaction("processors","typesetters.breakpoints.handler")
+ end
+ n = n.number
+ end
+ end
+ texsetattribute(a_breakpoints,n)
+end
+
+-- function breakpoints.enable()
+-- tasks.enableaction("processors","typesetters.breakpoints.handler")
+-- end
+
+-- interface
+
+implement {
+ name = "definebreakpoints",
+ actions = breakpoints.define,
+ arguments = "string"
+}
+
+implement {
+ name = "definebreakpoint",
+ actions = breakpoints.setreplacement,
+ arguments = {
+ "string",
+ "string",
+ "string",
+ {
+ { "type", "integer" },
+ { "nleft", "integer" },
+ { "nright", "integer" },
+ { "right" },
+ { "left" },
+ { "middle" },
+ { "range" },
+ }
+ }
+}
+
+implement {
+ name = "setbreakpoints",
+ actions = breakpoints.set,
+ arguments = "string"
+}
diff --git a/Master/texmf-dist/tex/context/base/typo-brk.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-brk.mkiv
index 3b463c06f92..3f9ce6f3a49 100644
--- a/Master/texmf-dist/tex/context/base/typo-brk.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-brk.mkiv
@@ -38,18 +38,22 @@
\def\typo_breakpoints_define_character[#1][#2][#3]% name char settings
{\begingroup
- \getdummyparameters[\c!type=1,\c!nleft=3,\c!nright=3,\s!language=,\c!left=,\c!right=,\c!middle=,#3]%
+ \getdummyparameters
+ [\c!type=\plusone,\c!nleft=\plusthree,\c!nright=\plusthree,%
+ \s!language=,\c!left=,\c!right=,\c!middle=,\c!range=\v!no,%
+ #3]%
\clf_definebreakpoint
{#1}%
{#2}%
{\reallanguagetag{\directdummyparameter\s!language}}%
{% maybe deal with #3 at the lua end
type \directdummyparameter\c!type
- nleft {\directdummyparameter\c!nleft}%
- nright {\directdummyparameter\c!nright}%
+ nleft \directdummyparameter\c!nleft
+ nright \directdummyparameter\c!nright
right {\directdummyparameter\c!right}%
left {\directdummyparameter\c!left}%
middle {\directdummyparameter\c!middle}%
+ range {\directdummyparameter\c!range}%
}%
\relax
\endgroup}
@@ -63,11 +67,15 @@
\definebreakpoints[compound]
-\definebreakpoint [compound] [+] [\c!nleft=3,\c!nright=3,\c!type=1] % middle=+,left=,right=
-\definebreakpoint [compound] [-] [\c!nleft=3,\c!nright=3,\c!type=1] % middle=+,left=,right=
-\definebreakpoint [compound] [/] [\c!nleft=3,\c!nright=3,\c!type=1] % middle=+,left=,right=
-\definebreakpoint [compound] [(] [\c!nleft=3,\c!nright=3,\c!type=2] % type=5,middle=(,left=(-,right=
-\definebreakpoint [compound] [)] [\c!nleft=3,\c!nright=3,\c!type=3] % type=5,middle=),left=,right=-)
+% 1: simple break
+% 6: simple break but skip same
+
+\definebreakpoint [compound] [+] [\c!nleft=3,\c!nright=3,\c!type=1] % middle=+,left=,right=
+%definebreakpoint [compound] [-] [\c!nleft=3,\c!nright=3,\c!type=1,\c!range=\v!yes] % middle=+,left=,right=
+\definebreakpoint [compound] [-] [\c!nleft=3,\c!nright=3,\c!type=6,\c!range=\v!yes] % middle=+,left=,right=
+\definebreakpoint [compound] [/] [\c!nleft=3,\c!nright=3,\c!type=1] % middle=+,left=,right=
+\definebreakpoint [compound] [(] [\c!nleft=3,\c!nright=3,\c!type=2] % type=5,middle=(,left=(-,right=
+\definebreakpoint [compound] [)] [\c!nleft=3,\c!nright=3,\c!type=3] % type=5,middle=),left=,right=-)
\let\installbreakpoint\definebreakpoint % for a while
diff --git a/Master/texmf-dist/tex/context/base/typo-cap.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-cap.lua
index 80a74bac916..62b90b8ab36 100644
--- a/Master/texmf-dist/tex/context/base/typo-cap.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-cap.lua
@@ -10,7 +10,8 @@ local next, type = next, type
local format, insert = string.format, table.insert
local div, randomnumber = math.div, math.random
-local trace_casing = false trackers.register("typesetters.casing", function(v) trace_casing = v end)
+local trace_casing = false trackers .register("typesetters.casing", function(v) trace_casing = v end)
+local check_kerns = true directives.register("typesetters.casing.checkkerns", function(v) check_kerns = v end)
local report_casing = logs.reporter("typesetting","casing")
@@ -21,15 +22,18 @@ local tonode = nuts.tonode
local tonut = nuts.tonut
local getfield = nuts.getfield
-local setfield = nuts.setfield
local getnext = nuts.getnext
local getprev = nuts.getprev
local getid = nuts.getid
local getattr = nuts.getattr
-local setattr = nuts.setattr
local getfont = nuts.getfont
local getsubtype = nuts.getsubtype
local getchar = nuts.getchar
+local getdisc = nuts.getdisc
+
+local setfield = nuts.setfield
+local setattr = nuts.setattr
+local setchar = nuts.setchar
local copy_node = nuts.copy
local end_of_math = nuts.end_of_math
@@ -47,10 +51,11 @@ local disc_code = nodecodes.disc
local math_code = nodecodes.math
local kerning_code = kerncodes.kerning
-local userskip_code = skipcodes.userskip
local tasks = nodes.tasks
+local newkern = nuts.pool.kern
+
local fonthashes = fonts.hashes
local fontdata = fonthashes.identifiers
local fontchar = fonthashes.characters
@@ -83,7 +88,9 @@ local function set(tag,font)
else
run = run + 1
end
- return font * 0x10000 + tag * 0x100 + run
+ local a = font * 0x10000 + tag * 0x100 + run
+ blocked[a] = false
+ return a
end
local function get(a)
@@ -93,6 +100,7 @@ local function get(a)
return tag, font, run
end
+
-- print(get(set( 1, 0)))
-- print(get(set( 1, 99)))
-- print(get(set( 2, 96)))
@@ -130,16 +138,16 @@ local function replacer(start,codes)
for i=#dc,1,-1 do
local chr = dc[i]
if i == 1 then
- setfield(start,"char",chr)
+ setchar(start,chr)
else
local g = copy_node(start)
- setfield(g,"char",chr)
+ setchar(g,chr)
insert_after(start,start,g)
end
end
return start, true
elseif ifc[dc] then
- setfield(start,"char",dc)
+ setchar(start,dc)
return start, true
end
end
@@ -196,25 +204,67 @@ local function camel(start,attr,lastfont,n,count,where,first)
return start, done_1 or done_2, true
end
+-- local function mixed(start,attr,lastfont,n,count,where,first)
+-- if where == "post" then
+-- return
+-- end
+-- local used = first or start
+-- local char = getchar(first)
+-- local dc = uccodes[char]
+-- if not dc then
+-- return start, false, true
+-- elseif dc == char then
+-- local lfa = lastfont[n]
+-- if lfa then
+-- setfield(first,"font",lfa)
+-- return start, true, true
+-- else
+-- return start, false, true
+-- end
+-- else
+-- replacer(first or start,uccodes)
+-- return start, true, true
+-- end
+-- end
+
local function mixed(start,attr,lastfont,n,count,where,first)
if where == "post" then
return
end
local used = first or start
- local char = getchar(first)
+ local char = getchar(used)
local dc = uccodes[char]
if not dc then
return start, false, true
elseif dc == char then
local lfa = lastfont[n]
if lfa then
- setfield(first,"font",lfa)
+ setfield(used,"font",lfa)
return start, true, true
else
return start, false, true
end
else
- replacer(first or start,uccodes)
+ if check_kerns then
+ local p = getprev(used)
+ if p and getid(p) == glyph_code then
+ local c = lccodes[char]
+ local c = type(c) == "table" and c[1] or c
+ replacer(used,uccodes)
+ local fp = getfont(p)
+ local fc = getfont(used)
+ if fp ~= fc then
+ local k = fonts.getkern(fontdata[fp],getchar(p),c)
+ if k ~= 0 then
+ insert_after(p,p,newkern(k))
+ end
+ end
+ else
+ replacer(used,uccodes)
+ end
+ else
+ replacer(used,uccodes)
+ end
return start, true, true
end
end
@@ -256,7 +306,7 @@ local function random(start,attr,lastfont,n,count,where,first)
while true do
local n = randomnumber(0x41,0x5A)
if tfm[n] then -- this also intercepts tables
- setfield(used,"char",n)
+ setchar(used,n)
return start, true
end
end
@@ -264,7 +314,7 @@ local function random(start,attr,lastfont,n,count,where,first)
while true do
local n = randomnumber(0x61,0x7A)
if tfm[n] then -- this also intercepts tables
- setfield(used,"char",n)
+ setchar(used,n)
return start, true
end
end
@@ -337,7 +387,7 @@ function cases.handler(head) -- not real fast but also not used on much data
end
local action = actions[n] -- map back to low number
if action then
- local replace = getfield(start,"replace")
+ local pre, post, replace = getdisc(start)
if replace then
local cnt = count
for g in traverse_id(glyph_code,replace) do
@@ -347,7 +397,6 @@ function cases.handler(head) -- not real fast but also not used on much data
if quit then break end
end
end
- local pre = getfield(start,"pre")
if pre then
local cnt = count
for g in traverse_id(glyph_code,pre) do
@@ -357,7 +406,6 @@ function cases.handler(head) -- not real fast but also not used on much data
if quit then break end
end
end
- local post = getfield(start,"post")
if post then
local cnt = count
for g in traverse_id(glyph_code,post) do
diff --git a/Master/texmf-dist/tex/context/base/typo-cap.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-cap.mkiv
index 2859ba104e1..114532e4e47 100644
--- a/Master/texmf-dist/tex/context/base/typo-cap.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-cap.mkiv
@@ -266,14 +266,14 @@
% [MixedCaps]
% [MixedCaps*default cp \the\exheight]
-\definefontfeature
- [mixeddefault]
- [default]
- [extend=1.2]
+% \definefontfeature
+% [mixeddefault]
+% [default]
+% [extend=1.2]
\definefont
[MixedCaps]
- [CurrentFont*default,mixeddefault cp \the\exheight]
+ [CurrentFont*default cp 1.2\exheight]
\setupcapitals
[\v!mixed]
diff --git a/Master/texmf-dist/tex/context/base/typo-chr.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua
index db8579c8448..041a73e1b23 100644
--- a/Master/texmf-dist/tex/context/base/typo-chr.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua
@@ -89,10 +89,9 @@ if not modules then modules = { } end modules ['typo-chr'] = {
local insert, remove = table.insert, table.remove
local nodecodes = nodes.nodecodes
-local whatsitcodes = nodes.whatsitcodes
local glyph_code = nodecodes.glyph
local whatsit_code = nodecodes.whatsit
-local localpar_code = whatsitcodes.localpar
+local localpar_code = nodecodes.localpar
local texnest = tex.nest
local free_node = node.free
@@ -171,7 +170,8 @@ local function pickup(head,tail,str)
while true do
local prev = first.prev
if prev and prev[a_marked] == attr then
- if prev.id == whatsit_code and prev.subtype == localpar_code then
+ local id = prev.id
+ if id == localpar_code then
break
else
first = prev
diff --git a/Master/texmf-dist/tex/context/base/typo-chr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-chr.mkiv
index dc0c6866408..dc0c6866408 100644
--- a/Master/texmf-dist/tex/context/base/typo-chr.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-chr.mkiv
diff --git a/Master/texmf-dist/tex/context/base/typo-cln.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-cln.lua
index 7228e02c543..bc11f944c94 100644
--- a/Master/texmf-dist/tex/context/base/typo-cln.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-cln.lua
@@ -31,11 +31,13 @@ local texsetattribute = tex.setattribute
local nuts = nodes.nuts
local tonut = nuts.tonut
-local setfield = nuts.setfield
local getchar = nuts.getchar
local getattr = nuts.getattr
local setattr = nuts.setattr
+local setfield = nuts.setfield
+local setchar = nuts.setchar
+
local traverse_id = nuts.traverse_id
local unsetvalue = attributes.unsetvalue
@@ -67,7 +69,7 @@ function cleaners.handler(head)
if type(upper) == "table" then
-- some day, not much change that \SS ends up here
else
- setfield(n,"char",upper)
+ setchar(n,upper)
done = true
if trace_autocase then
report_autocase("")
@@ -95,7 +97,7 @@ function cleaners.set(n)
end
enabled = true
end
- texsetattribute(a_cleaner,n)
+ texsetattribute(a_cleaner,tonumber(n))
end
end
diff --git a/Master/texmf-dist/tex/context/base/typo-cln.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-cln.mkiv
index 193198dc556..193198dc556 100644
--- a/Master/texmf-dist/tex/context/base/typo-cln.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-cln.mkiv
diff --git a/Master/texmf-dist/tex/context/base/typo-del.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-del.mkiv
index 4c3c5ab3da0..eb51a06e107 100644
--- a/Master/texmf-dist/tex/context/base/typo-del.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-del.mkiv
@@ -11,10 +11,15 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% todo: textstyle|color for inline \quotation etc
+
\writestatus{loading}{ConTeXt Typesetting Macros / Delimited Content}
\unprotect
+\ifdefined\dotagsetdelimitedsymbol \else \let\dotagsetdelimitedsymbol \gobbleoneargument \fi
+\ifdefined\dotagsetsubsentencesymbol \else \let\dotagsetsubsentencesymbol\gobbleoneargument \fi
+
% THIS IS OBSOLETE:
\installcorenamespace{hyphenmarksign} % let's not waste a setuphandler (yet)
@@ -136,7 +141,10 @@
% \def\aftersubsentence {\ignorespaces}
\unexpanded\def\midsentence
- {\symbol[\c!midsentence]}
+ {\dostarttagged\t!subsentencesymbol\empty
+ \dotagsetsubsentencesymbol\s!middle
+ \symbol[\c!midsentence]%
+ \dostoptagged}
\unexpanded\def\beginofsubsentence
{\beforesubsentence
@@ -149,11 +157,19 @@
\dontleavehmode % was \leaveoutervmode
\fi
\dostarttagged\t!subsentence\empty % no chain
+ \dostarttagged\t!subsentencesymbol\empty
+ \dotagsetsubsentencesymbol\s!left
\symbol[\ifodd\c_typo_subsentence_nesting\c!leftsentence\else\c!leftsubsentence\fi]%
+ \dostoptagged
+ \dostarttagged\t!subsentencecontent\empty
}% \ignorespaces}
\unexpanded\def\endofsubsentence % relax prevents space gobbling
- {\symbol[\ifodd\c_typo_subsentence_nesting\c!rightsentence\else\c!rightsubsentence\fi]%
+ {\dostoptagged
+ \dostarttagged\t!subsentencesymbol\empty
+ \dotagsetsubsentencesymbol\s!right
+ \symbol[\ifodd\c_typo_subsentence_nesting\c!rightsentence\else\c!rightsubsentence\fi]%
+ \dostoptagged
\dostoptagged
\global\advance\c_typo_subsentence_nesting\minusone
\unskip
@@ -237,13 +253,11 @@
\def\quote #1{'#1'}%
\to \everysimplifycommands
-%D The next features was so desperately needed by Giuseppe
-%D Bilotta that he made a module for it. Since this is a
-%D typical example of core functionality, I decided to extend
-%D the low level quotation macros in such a way that a speech
-%D feature could be build on top of it. The speech opening and
-%D closing symbols are defined per language. Italian is an
-%D example of a language that has them set.
+%D The next features was so desperately needed by Giuseppe Bilotta that he made a
+%D module for it. Since this is a typical example of core functionality, I decided
+%D to extend the low level quotation macros in such a way that a speech feature
+%D could be build on top of it. The speech opening and closing symbols are defined
+%D per language. Italian is an example of a language that has them set.
\newsignal\d_typo_delimited_signal
@@ -283,7 +297,7 @@
[\c!location=\v!margin, % \v!text \v!paragraph
\c!spacebefore=,
\c!spaceafter=\delimitedtextparameter\c!spacebefore,
- \c!style=\v!normal,
+ \c!style=,
\c!color=,
\c!leftmargin=\zeropoint,
\c!rightmargin=\delimitedtextparameter\c!leftmargin,
@@ -318,13 +332,16 @@
\def\typo_delimited_start_font
{\let\typo_delimited_stop\typo_delimitedtexts_finish_font
+ \dostarttagged\t!delimitedsymbol\empty
+ \dotagsetdelimitedsymbol\s!left
\delimitedtextparameter\c!left
+ \dostoptagged
\ignorespaces}
\def\typo_delimited_start_other
{\edef\p_delimited_repeat{\delimitedtextparameter\c!repeat}%
\ifx\p_delimited_repeat\v!yes
- \let\typo_delimited_repeat\typo_delimited_repeat_ideed
+ \let\typo_delimited_repeat\typo_delimited_repeat_indeed
\else
\let\typo_delimited_repeat\relax
\fi
@@ -338,7 +355,11 @@
\fi\fi}
\def\typo_delimitedtexts_finish_font
- {\removeunwantedspaces\delimitedtextparameter\c!right}
+ {\removeunwantedspaces
+ \dostarttagged\t!delimitedsymbol\empty
+ \dotagsetdelimitedsymbol\s!right
+ \delimitedtextparameter\c!right
+ \dostoptagged}
\def\typo_delimited_start_par
{\dosingleempty\typo_delimited_start_par_indeed}
@@ -379,11 +400,13 @@
\setnextleftdelimitedtextmark
\setnextrightdelimitedtextmark
%
- \ignorespaces}
+ \ignorespaces
+ \dostarttagged\t!delimitedcontent\empty}
\def\typo_delimited_stop_par
{\removeunwantedspaces
\removelastskip
+ \dostoptagged
\rightdelimitedtextmark
\carryoverpar\endgroup % new per 2013-01-21 ... please left floats
\popmacro\checkindentation
@@ -401,10 +424,12 @@
\begingroup
\usedelimitedtextstyleandcolor\c!style\c!color
\typo_delimited_handle_left\c!left
- \ignorespaces}
+ \ignorespaces
+ \dostarttagged\t!delimitedcontent\empty}
\def\typo_delimited_stop_txt
{\removeunwantedspaces
+ \dostoptagged
\typo_delimited_handle_right\c!right
\endgroup}
@@ -499,16 +524,22 @@
\fi}
\def\typo_delimited_left_symbol#1%
- {\setbox\scratchbox\hbox{\usedelimitedtextstyleandcolor\c!symstyle\c!symcolor#1}%
+ {\dostarttagged\t!delimitedsymbol\empty
+ \dotagsetdelimitedsymbol\s!left
+ \setbox\scratchbox\hbox{\usedelimitedtextstyleandcolor\c!symstyle\c!symcolor#1}%
\dontleavehmode
\edef\p_delimited_margin{\delimitedtextparameter\c!location}%
\ifx\p_delimited_margin\v!margin
\hskip-\wd\scratchbox
\fi
- \box\scratchbox}
+ \box\scratchbox
+ \dostoptagged}
\def\typo_delimited_right_symbol#1%
- {\hsmash{\usedelimitedtextstyleandcolor\c!symstyle\c!symcolor#1}}
+ {\dostarttagged\t!delimitedsymbol\empty
+ \dotagsetdelimitedsymbol\s!right
+ \hsmash{\usedelimitedtextstyleandcolor\c!symstyle\c!symcolor#1}%
+ \dostoptagged}
\def\typo_delimited_nextleft_symbol#1%
{\localleftbox\bgroup
@@ -538,7 +569,8 @@
% \stoptext
\def\typo_delimited_handle_middle#1%
- {\begingroup
+ {\dostoptagged
+ \begingroup
\usedelimitedtextstyleandcolor\c!symstyle\c!symcolor
\setbox\scratchbox\hbox{\delimitedtextparameter#1}%
\ifdim\wd\scratchbox>\zeropoint
@@ -551,11 +583,15 @@
\hskip\zeropoint % == \prewordbreak
\fi
\strut % new, needed below
+ \dostarttagged\t!delimitedsymbol\empty
+ \dotagsetdelimitedsymbol\s!middle
\delimitedtextparameter#1% unhbox\scratchbox
+ \dostoptagged
% \penalty\plustenthousand % else overfull boxes, but that's better than dangling periods
\kern\d_typo_delimited_signal % +- \prewordbreak
\fi
- \endgroup}
+ \endgroup
+ \dostarttagged\t!delimitedcontent\empty}
\def\typo_delimited_handle_left#1%
{\begingroup
@@ -575,7 +611,10 @@
\hskip\zeropoint % == \prewordbreak
\fi
\strut % new, needed below
+ \dostarttagged\t!delimitedsymbol\empty
+ \dotagsetdelimitedsymbol\s!left
\delimitedtextparameter#1% unhbox\scratchbox
+ \dostoptagged
\penalty\plustenthousand % new per 2013-03-09 WS mailing list
\hskip\d_typo_delimited_signal % +- \prewordbreak
\fi
@@ -600,7 +639,10 @@
\hskip\zeropoint % == \prewordbreak
\fi
\strut % new, needed below
+ \dostarttagged\t!delimitedsymbol\empty
+ \dotagsetdelimitedsymbol\s!right
\delimitedtextparameter#1% unhbox\scratchbox
+ \dostoptagged
\kern\d_typo_delimited_signal % +- \prewordbreak
\fi
\endgroup}
@@ -608,44 +650,15 @@
\unexpanded\def\typo_delimited_par
{\groupedcommand
{\dostarttaggedchained\t!delimited\currentdelimitedtext\??delimitedtext % block?
- \typo_delimited_handle_left\c!left}
- {\typo_delimited_handle_right\c!right
+ \usedelimitedtextstyleandcolor\c!style\c!color
+ \typo_delimited_handle_left\c!left
+ \dostarttagged\t!delimitedcontent\empty}
+ {\dostoptagged
+ \typo_delimited_handle_right\c!right
\removelastskip
\dostoptagged
\typo_delimited_pop}}
-% \unexpanded\def\typo_delimited_txt
-% {\doifelse{\delimitedtextparameter\c!style}\v!normal
-% \typo_delimited_quoted
-% \typo_delimited_attributed}
-%
-% \def\typo_delimited_quoted_b
-% {\dostarttaggedchained\t!delimited\currentdelimitedtext\??delimitedtext
-% \typo_delimited_handle_left\c!left}
-%
-% \def\typo_delimited_quoted_e
-% {\typo_delimited_handle_right\c!right
-% \removelastskip
-% \dostoptagged
-% \typo_delimited_pop}
-%
-% \def\typo_delimited_attributed_b
-% {\dostarttaggedchained\t!delimited\currentdelimitedtext\??delimitedtext
-% \usedelimitedtextstyleandcolor\c!style\c!color}
-%
-% \def\typo_delimited_attributed_e
-% {\dostoptagged
-% \typo_delimited_pop}
-%
-% \def\typo_delimited_fontdriven_b
-% {\dostarttaggedchained\t!delimited\currentdelimitedtext\??delimitedtext
-% \languageparameter{\c!left\currentparentdelimitedtext}}% was: \currentdelimitedtext
-%
-% \def\typo_delimited_fontdriven_e
-% {\languageparameter{\c!right\currentparentdelimitedtext}% was: \currentdelimitedtext
-% \dostoptagged
-% \typo_delimited_pop}
-
\unexpanded\def\typo_delimited_txt
{\edef\p_left_right{\delimitedtextparameter\c!left\delimitedtextparameter\c!right}%
\ifx\p_left_right\empty
@@ -657,29 +670,36 @@
\def\typo_delimited_quoted_b
{\dostarttaggedchained\t!delimited\currentdelimitedtext\??delimitedtext
\typo_delimited_handle_left\c!left
- \usedelimitedtextstyleandcolor\c!style\c!color}
+ \usedelimitedtextstyleandcolor\c!style\c!color
+ \dostarttagged\t!delimitedcontent\empty}
\def\typo_delimited_quoted_e
- {\typo_delimited_handle_right\c!right
- \removelastskip
+ {\dostoptagged
+ \typo_delimited_handle_right\c!right
+ \removelastskip % ?
\dostoptagged
\typo_delimited_pop}
\def\typo_delimited_attributed_b
{\dostarttaggedchained\t!delimited\currentdelimitedtext\??delimitedtext
- \usedelimitedtextstyleandcolor\c!style\c!color}
+ \usedelimitedtextstyleandcolor\c!style\c!color
+ \dostarttagged\t!delimitedcontent\empty
+ \ignorespaces}
\def\typo_delimited_attributed_e
{\dostoptagged
+ \dostoptagged
\typo_delimited_pop}
\def\typo_delimited_fontdriven_b
{\dostarttaggedchained\t!delimited\currentdelimitedtext\??delimitedtext
\usedlanguageparameter{\c!left\currentparentdelimitedtext}% was: \currentdelimitedtext
- \usedelimitedtextstyleandcolor\c!style\c!color}
+ \usedelimitedtextstyleandcolor\c!style\c!color
+ \dostarttagged\t!delimitedcontent\empty}
\def\typo_delimited_fontdriven_e
- {\usedlanguageparameter{\c!right\currentparentdelimitedtext}% was: \currentdelimitedtext
+ {\dostoptagged
+ \usedlanguageparameter{\c!right\currentparentdelimitedtext}% was: \currentdelimitedtext
\dostoptagged
\typo_delimited_pop}
@@ -737,6 +757,11 @@
\c!middle={\symbol[\c!middlespeech]},
\c!right={\symbol[\c!rightspeech]}]
+\definedelimitedtext
+ [\v!aside]
+ [\c!left={\symbol[\c!leftsentence]},
+ \c!right={\symbol[\c!rightsentence]}]
+
% how do we call an tight quote
%
% \definedelimitedtext
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-dha.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-dha.lua
new file mode 100644
index 00000000000..25e92bd2841
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-dha.lua
@@ -0,0 +1,458 @@
+if not modules then modules = { } end modules ['typo-dha'] = {
+ version = 1.001,
+ comment = "companion to typo-dir.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- Some analysis by Idris:
+--
+-- 1. Assuming the reading- vs word-order distinction (bidi-char types) is governing;
+-- 2. Assuming that 'ARAB' represents an actual arabic string in raw input order, not word-order;
+-- 3. Assuming that 'BARA' represent the correct RL word order;
+--
+-- Then we have, with input: LATIN ARAB
+--
+-- \textdir TLT LATIN ARAB => LATIN BARA
+-- \textdir TRT LATIN ARAB => LATIN BARA
+-- \textdir TRT LRO LATIN ARAB => LATIN ARAB
+-- \textdir TLT LRO LATIN ARAB => LATIN ARAB
+-- \textdir TLT RLO LATIN ARAB => NITAL ARAB
+-- \textdir TRT RLO LATIN ARAB => NITAL ARAB
+
+-- elseif d == "es" then -- European Number Separator
+-- elseif d == "et" then -- European Number Terminator
+-- elseif d == "cs" then -- Common Number Separator
+-- elseif d == "nsm" then -- Non-Spacing Mark
+-- elseif d == "bn" then -- Boundary Neutral
+-- elseif d == "b" then -- Paragraph Separator
+-- elseif d == "s" then -- Segment Separator
+-- elseif d == "ws" then -- Whitespace
+-- elseif d == "on" then -- Other Neutrals
+
+-- todo : use new dir functions
+-- todo : make faster
+-- todo : move dir info into nodes
+-- todo : swappable tables and floats i.e. start-end overloads (probably loop in builders)
+
+-- I removed the original tracing code and now use the colorful one. If I ever want to change
+-- something I will just inject prints for tracing.
+
+local nodes, node = nodes, node
+
+local trace_directions = false trackers.register("typesetters.directions.default", function(v) trace_directions = v end)
+
+local report_directions = logs.reporter("typesetting","text directions")
+
+local nuts = nodes.nuts
+local tonut = nuts.tonut
+local tonode = nuts.tonode
+local nutstring = nuts.tostring
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getchar = nuts.getchar
+local getid = nuts.getid
+local getsubtype = nuts.getsubtype
+local getlist = nuts.getlist
+local getfield = nuts.getfield
+local getattr = nuts.getattr
+local getprop = nuts.getprop
+local isglyph = nuts.isglyph -- or ischar
+
+local setfield = nuts.setfield
+local setprop = nuts.setprop
+local setchar = nuts.setchar
+
+local insert_node_before = nuts.insert_before
+local insert_node_after = nuts.insert_after
+local remove_node = nuts.remove
+local end_of_math = nuts.end_of_math
+
+local nodepool = nuts.pool
+
+local nodecodes = nodes.nodecodes
+local skipcodes = nodes.skipcodes
+
+local glyph_code = nodecodes.glyph
+local math_code = nodecodes.math
+local penalty_code = nodecodes.penalty
+local kern_code = nodecodes.kern
+local glue_code = nodecodes.glue
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local dir_code = nodecodes.dir
+local localpar_code = nodecodes.localpar
+
+local parfillskip_code = skipcodes.parfillskip
+
+local new_textdir = nodepool.textdir
+
+local hasbit = number.hasbit
+local formatters = string.formatters
+local insert = table.insert
+
+local fonthashes = fonts.hashes
+local fontdata = fonthashes.identifiers
+local fontchar = fonthashes.characters
+
+local chardirections = characters.directions
+local charmirrors = characters.mirrors
+local charclasses = characters.textclasses
+
+local directions = typesetters.directions
+local setcolor = directions.setcolor
+local getglobal = directions.getglobal
+
+local a_state = attributes.private('state')
+local a_directions = attributes.private('directions')
+
+local strip = false
+
+local s_isol = fonts.analyzers.states.isol
+
+local function stopdir(finish)
+ local n = new_textdir(finish == "TRT" and "-TRT" or "-TLT")
+ setprop(n,"direction",true)
+ return n
+end
+
+local function startdir(finish)
+ local n = new_textdir(finish == "TRT" and "+TRT" or "+TLT")
+ setprop(n,"direction",true)
+ return n
+end
+
+local function nextisright(current)
+ current = getnext(current)
+ local character, id = isglyph(current)
+ if character then
+ local direction = chardirections[character]
+ return direction == "r" or direction == "al" or direction == "an"
+ end
+end
+
+local function previsright(current)
+ current = getprev(current)
+ local character, id = isglyph(current)
+ if character then
+ local direction = chardirections[character]
+ return direction == "r" or direction == "al" or direction == "an"
+ end
+end
+
+local function process(start)
+
+ local head = tonut(start) -- we have a global head
+ local current = head
+ local autodir = 0
+ local embedded = 0
+ local override = 0
+ local pardir = 0
+ local textdir = 0
+ local done = false
+ local stack = { }
+ local top = 0
+ local obsolete = { }
+ local rlo = false
+ local lro = false
+ local prevattr = false
+ local fences = { }
+
+ while current do
+ -- no isglyph here as we test for skips first
+ local id = getid(current)
+ local next = getnext(current)
+ if id == math_code then
+ current = getnext(end_of_math(next))
+ elseif getprop(current,"direction") then
+ -- this handles unhbox etc
+ current = next
+ else
+ local attr = getattr(current,a_directions)
+ if attr and attr > 0 then
+ if attr ~= prevattr then
+ if not getglobal(a) then
+ lro = false
+ rlo = false
+ end
+ prevattr = attr
+ end
+ end
+ if id == glyph_code then
+ if attr and attr > 0 then
+ local character, font = isglyph(current)
+ if character == 0 then
+ -- skip signals
+ setprop(current,"direction",true)
+ else
+ local direction = chardirections[character]
+ local reversed = false
+ if rlo or override > 0 then
+ if direction == "l" then
+ direction = "r"
+ reversed = true
+ end
+ elseif lro or override < 0 then
+ if direction == "r" or direction == "al" then
+ setprop(current,a_state,s_isol) -- hm
+ direction = "l"
+ reversed = true
+ end
+ end
+ if direction == "on" then
+ local mirror = charmirrors[character]
+ if mirror and fontchar[font][mirror] then
+ local class = charclasses[character]
+ if class == "open" then
+ if nextisright(current) then
+ setchar(current,mirror)
+ setprop(current,"direction","r")
+ elseif autodir < 0 then
+ setchar(current,mirror)
+ setprop(current,"direction","r")
+ else
+ mirror = false
+ setprop(current,"direction","l")
+ end
+ local fencedir = autodir == 0 and textdir or autodir
+ fences[#fences+1] = fencedir
+ elseif class == "close" and #fences > 0 then
+ local fencedir = fences[#fences]
+ fences[#fences] = nil
+ if fencedir < 0 then
+ setchar(current,mirror)
+ setprop(current,"direction","r")
+ else
+ setprop(current,"direction","l")
+ mirror = false
+ end
+ elseif autodir < 0 then
+ setchar(current,mirror)
+ setprop(current,"direction","r")
+ else
+ setprop(current,"direction","l")
+ mirror = false
+ end
+ else
+ setprop(current,"direction",true)
+ end
+ if trace_directions then
+ setcolor(current,direction,false,mirror)
+ end
+ elseif direction == "l" then
+ if trace_directions then
+ setcolor(current,"l",reversed)
+ end
+ setprop(current,"direction","l")
+ elseif direction == "r" then
+ if trace_directions then
+ setcolor(current,"r",reversed)
+ end
+ setprop(current,"direction","r")
+ elseif direction == "en" then -- european number
+ if trace_directions then
+ setcolor(current,"l")
+ end
+ setprop(current,"direction","l")
+ elseif direction == "al" then -- arabic letter
+ if trace_directions then
+ setcolor(current,"r")
+ end
+ setprop(current,"direction","r")
+ elseif direction == "an" then -- arabic number
+ -- needs a better scanner as it can be a float
+ if trace_directions then
+ setcolor(current,"l") -- was r
+ end
+ setprop(current,"direction","n") -- was r
+ elseif direction == "lro" then -- Left-to-Right Override -> right becomes left
+ top = top + 1
+ stack[top] = { override, embedded }
+ override = -1
+ obsolete[#obsolete+1] = current
+ elseif direction == "rlo" then -- Right-to-Left Override -> left becomes right
+ top = top + 1
+ stack[top] = { override, embedded }
+ override = 1
+ obsolete[#obsolete+1] = current
+ elseif direction == "lre" then -- Left-to-Right Embedding -> TLT
+ top = top + 1
+ stack[top] = { override, embedded }
+ embedded = 1
+ obsolete[#obsolete+1] = current
+ elseif direction == "rle" then -- Right-to-Left Embedding -> TRT
+ top = top + 1
+ stack[top] = { override, embedded }
+ embedded = -1
+ obsolete[#obsolete+1] = current
+ elseif direction == "pdf" then -- Pop Directional Format
+ if top > 0 then
+ local s = stack[top]
+ override = s[1]
+ embedded = s[2]
+ top = top - 1
+ else
+ override = 0
+ embedded = 0
+ end
+ obsolete[#obsolete+1] = current
+ elseif trace_directions then
+ setcolor(current)
+ setprop(current,"direction",true)
+ else
+ setprop(current,"direction",true)
+ end
+ end
+ else
+ setprop(current,"direction",true)
+ end
+ elseif id == glue_code then
+ if getsubtype(current) == parfillskip_code then
+ setprop(current,"direction",'!')
+ else
+ setprop(current,"direction",'g')
+ end
+ elseif id == kern_code then
+ setprop(current,"direction",'k')
+ elseif id == dir_code then
+ local dir = getfield(current,"dir")
+ if dir == "+TRT" then
+ autodir = -1
+ elseif dir == "+TLT" then
+ autodir = 1
+ elseif dir == "-TRT" or dir == "-TLT" then
+ if embedded and embedded~= 0 then
+ autodir = embedded
+ else
+ autodir = 0
+ end
+ else
+ -- message
+ end
+ textdir = autodir
+ setprop(current,"direction",true)
+ elseif id == localpar_code then
+ local dir = getfield(current,"dir")
+ if dir == 'TRT' then
+ autodir = -1
+ elseif dir == 'TLT' then
+ autodir = 1
+ end
+ pardir = autodir
+ textdir = pardir
+ setprop(current,"direction",true)
+ else
+ setprop(current,"direction",true)
+ end
+ current = next
+ end
+ end
+
+ -- todo: track if really needed
+ -- todo: maybe we need to set the property (as it can be a copied list)
+
+ if done and strip then
+ local n = #obsolete
+ if n > 0 then
+ for i=1,n do
+ remove_node(head,obsolete[i],true)
+ end
+ if trace_directions then
+ report_directions("%s character nodes removed",n)
+ end
+ end
+ end
+
+ local state = false
+ local last = false
+ local collapse = true
+ current = head
+
+ -- todo: textdir
+ -- todo: inject before parfillskip
+
+ while current do
+ local id = getid(current)
+ if id == math_code then
+ -- todo: this might be tricky nesting
+ current = getnext(end_of_math(getnext(current)))
+ else
+ local cp = getprop(current,"direction")
+ if cp == "n" then
+ local swap = state == "r"
+ if swap then
+ head = insert_node_before(head,current,startdir("TLT"))
+ end
+ setprop(current,"direction",true)
+ while true do
+ local n = getnext(current)
+ if n and getprop(n,"direction") == "n" then
+ current = n
+ setprop(current,"direction",true)
+ else
+ break
+ end
+ end
+ if swap then
+ head, current = insert_node_after(head,current,stopdir("TLT"))
+ end
+ elseif cp == "l" then
+ if state ~= "l" then
+ if state == "r" then
+ head = insert_node_before(head,last or current,stopdir("TRT"))
+ end
+ head = insert_node_before(head,current,startdir("TLT"))
+ state = "l"
+ done = true
+ end
+ last = false
+ elseif cp == "r" then
+ if state ~= "r" then
+ if state == "l" then
+ head = insert_node_before(head,last or current,stopdir("TLT"))
+ end
+ head = insert_node_before(head,current,startdir("TRT"))
+ state = "r"
+ done = true
+ end
+ last = false
+ elseif collapse then
+ if cp == "k" or cp == "g" then
+ last = last or current
+ else
+ last = false
+ end
+ else
+ if state == "r" then
+ head = insert_node_before(head,current,stopdir("TRT"))
+ elseif state == "l" then
+ head = insert_node_before(head,current,stopdir("TLT"))
+ end
+ state = false
+ last = false
+ end
+ setprop(current,"direction",true)
+ end
+ local next = getnext(current)
+ if next then
+ current = next
+ else
+ local sd = (state == "r" and stopdir("TRT")) or (state == "l" and stopdir("TLT"))
+ if sd then
+ if id == glue_code and getsubtype(current) == parfillskip_code then
+ head = insert_node_before(head,current,sd)
+ else
+ head = insert_node_after(head,current,sd)
+ end
+ end
+ break
+ end
+ end
+
+ return tonode(head), done
+
+end
+
+directions.installhandler(interfaces.variables.default,process)
diff --git a/Master/texmf-dist/tex/context/base/typo-dig.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-dig.lua
index c753a03520a..09c2f64eeb7 100644
--- a/Master/texmf-dist/tex/context/base/typo-dig.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-dig.lua
@@ -29,8 +29,11 @@ local getfont = nuts.getfont
local getchar = nuts.getchar
local getid = nuts.getid
local getfield = nuts.getfield
-local setfield = nuts.setfield
local getattr = nuts.getattr
+
+local setlink = nuts.setlink
+local setnext = nuts.setnext
+local setprev = nuts.setprev
local setattr = nuts.setattr
local hpack_node = nuts.hpack
@@ -82,16 +85,14 @@ function nodes.aligned(head,start,stop,width,how)
end
local prv = getprev(start)
local nxt = getnext(stop)
- setfield(start,"prev",nil)
- setfield(stop,"next",nil)
+ setprev(start)
+ setnext(stop)
local packed = hpack_node(start,width,"exactly") -- no directional mess here, just lr
if prv then
- setfield(prv,"next",packed)
- setfield(packed,"prev",prv)
+ setlink(prv,packed)
end
if nxt then
- setfield(nxt,"prev",packed)
- setfield(packed,"next",nxt)
+ setlink(packed,nxt)
end
if getprev(packed) then
return head, packed
diff --git a/Master/texmf-dist/tex/context/base/typo-dig.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-dig.mkiv
index aa610b3c943..aa610b3c943 100644
--- a/Master/texmf-dist/tex/context/base/typo-dig.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-dig.mkiv
diff --git a/Master/texmf-dist/tex/context/base/typo-dir.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-dir.lua
index 482b7114d63..482b7114d63 100644
--- a/Master/texmf-dist/tex/context/base/typo-dir.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-dir.lua
diff --git a/Master/texmf-dist/tex/context/base/typo-dir.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-dir.mkiv
index f9b4ecb976c..c5fd6fa4184 100644
--- a/Master/texmf-dist/tex/context/base/typo-dir.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-dir.mkiv
@@ -22,6 +22,7 @@
\registerctxluafile{typo-dha}{1.001}
\registerctxluafile{typo-dua}{1.001}
\registerctxluafile{typo-dub}{1.001}
+\registerctxluafile{typo-duc}{1.001}
\definesystemattribute[directions][public]
@@ -53,7 +54,7 @@
% \setupdirections[bidi=global,method=two]
% \setupdirections[bidi=global,method=two,fences=no]
-% maybee use chardefs
+% maybe use chardefs
\def\typo_dir_get_mode
{\def\currentbidimode{\clf_getbidimode
diff --git a/Master/texmf-dist/tex/context/base/typo-drp.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-drp.lua
index 4bbf0b8e989..bddcc008e01 100644
--- a/Master/texmf-dist/tex/context/base/typo-drp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-drp.lua
@@ -9,6 +9,8 @@ if not modules then modules = { } end modules ['typo-drp'] = {
-- This ons is sensitive for order (e.g. when combined with first line
-- processing.
+-- todo: use isglyph
+
local tonumber, type, next = tonumber, type, next
local ceil = math.ceil
local settings_to_hash = utilities.parsers.settings_to_hash
@@ -32,14 +34,18 @@ local getchar = nuts.getchar
local getid = nuts.getid
local getsubtype = nuts.getsubtype
local getfield = nuts.getfield
-local setfield = nuts.setfield
local getattr = nuts.getattr
+
+local setfield = nuts.setfield
local setattr = nuts.setattr
+local setlink = nuts.setlink
+local setprev = nuts.setprev
+local setnext = nuts.setnext
+local setchar = nuts.setchar
local hpack_nodes = nuts.hpack
local nodecodes = nodes.nodecodes
-local whatsitcodes = nodes.whatsitcodes
local nodepool = nuts.pool
local new_kern = nodepool.kern
@@ -66,8 +72,7 @@ local glyph_code = nodecodes.glyph
local hlist_code = nodecodes.hlist
local glue_code = nodecodes.glue
local kern_code = nodecodes.kern
-local whatsit_code = nodecodes.whatsit
-local localpar_code = whatsitcodes.localpar
+local localpar_code = nodecodes.localpar
local actions = { }
initials.actions = actions
@@ -127,102 +132,10 @@ interfaces.implement {
-- todo: prevent linebreak .. but normally a initial ends up at the top of
-- a page so this has a low priority
--- actions[v_default] = function(head,setting)
--- local done = false
--- if getid(head) == whatsit_code and getsubtype(head) == localpar_code then
--- -- begin of par
--- local first = getnext(head)
--- -- parbox .. needs to be set at 0
--- if first and getid(first) == hlist_code then
--- first = getnext(first)
--- end
--- -- we need to skip over kerns and glues (signals)
--- while first and getid(first) ~= glyph_code do
--- first = getnext(first)
--- end
--- if first and getid(first) == glyph_code then
--- local char = getchar(first)
--- local prev = getprev(first)
--- local next = getnext(first)
--- -- if getid(prev) == hlist_code then
--- -- -- set the width to 0
--- -- end
--- if next and getid(next) == kern_code then
--- setfield(next,"kern",0)
--- end
--- if setting.font then
--- setfield(first,"font",setting.font)
--- end
--- if setting.dynamic > 0 then
--- setattr(first,0,setting.dynamic)
--- end
--- -- can be a helper
--- local ma = setting.ma or 0
--- local ca = setting.ca
--- local ta = setting.ta
--- if ca and ca > 0 then
--- setattr(first,a_colorspace,ma == 0 and 1 or ma)
--- setattr(first,a_color,ca)
--- end
--- if ta and ta > 0 then
--- setattr(first,a_transparency,ta)
--- end
--- --
--- local width = getfield(first,"width")
--- local height = getfield(first,"height")
--- local depth = getfield(first,"depth")
--- local distance = setting.distance or 0
--- local voffset = setting.voffset or 0
--- local hoffset = setting.hoffset or 0
--- local parindent = tex.parindent
--- local baseline = texget("baselineskip").width
--- local lines = tonumber(setting.n) or 0
--- --
--- setfield(first,"xoffset",- width - hoffset - distance - parindent)
--- setfield(first,"yoffset",- voffset) -- no longer - height here
--- -- We pack so that successive handling cannot touch the dropped cap. Packaging
--- -- in a hlist is also needed because we cannot locally adapt e.g. parindent (not
--- -- yet stored in with localpar).
--- setfield(first,"prev",nil)
--- setfield(first,"next",nil)
--- local h = hpack_nodes(first)
--- setfield(h,"width",0)
--- setfield(h,"height",0)
--- setfield(h,"depth",0)
--- setfield(prev,"next",h)
--- setfield(next,"prev",h)
--- setfield(h,"next",next)
--- setfield(h,"prev",prev)
--- first = h
--- -- end of packaging
--- if setting.location == v_margin then
--- -- okay
--- else
--- if lines == 0 then -- safeguard, not too precise
--- lines = ceil((height+voffset) / baseline)
--- end
--- -- We cannot set parshape yet ... when we can I'll add a slope
--- -- option (positive and negative, in emwidth).
--- local hangafter = - lines
--- local hangindent = width + distance + parindent
--- if trace_initials then
--- report_initials("setting hangafter to %i and hangindent to %p",hangafter,hangindent)
--- end
--- tex.hangafter = hangafter
--- tex.hangindent = hangindent
--- if parindent ~= 0 then
--- insert_after(first,first,new_kern(-parindent))
--- end
--- end
--- done = true
--- end
--- end
--- return head, done
--- end
-
actions[v_default] = function(head,setting)
local done = false
- if getid(head) == whatsit_code and getsubtype(head) == localpar_code then
+ local id = getid(head)
+ if id == localpar_code then
-- begin of par
local first = getnext(head)
local indent = false
@@ -350,7 +263,7 @@ actions[v_default] = function(head,setting)
-- g.subtype = 0
-- nodes.handlers.characters(g)
-- nodes.handlers.protectglyphs(g)
--- setfield(current,"char",g.char)
+-- setchar(current,g.char)
-- nodes.free(g)
-- can be a helper
@@ -375,8 +288,8 @@ actions[v_default] = function(head,setting)
local prev = getprev(first)
local next = getnext(last)
--
- setfield(first,"prev",nil)
- setfield(last,"next",nil)
+ setprev(first)
+ setnext(last)
local dropper = hpack_nodes(first)
local width = getfield(dropper,"width")
local height = getfield(dropper,"height")
@@ -385,12 +298,8 @@ actions[v_default] = function(head,setting)
setfield(dropper,"height",0)
setfield(dropper,"depth",0)
--
- setfield(prev,"next",dropper)
- if next then
- setfield(next,"prev",dropper)
- end
- setfield(dropper,"next",next)
- setfield(dropper,"prev",prev)
+ setlink(prev,dropper)
+ setlink(dropper,next)
--
if next then
local current = next
diff --git a/Master/texmf-dist/tex/context/base/typo-drp.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-drp.mkiv
index 2520c3bfdef..2520c3bfdef 100644
--- a/Master/texmf-dist/tex/context/base/typo-drp.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-drp.mkiv
diff --git a/Master/texmf-dist/tex/context/base/typo-dua.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-dua.lua
index 1e9b325a623..f697ac5620a 100644
--- a/Master/texmf-dist/tex/context/base/typo-dua.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-dua.lua
@@ -72,15 +72,18 @@ local tonode = nuts.tonode
local nutstring = nuts.tostring
local getnext = nuts.getnext
-local getchar = nuts.getchar
local getid = nuts.getid
local getsubtype = nuts.getsubtype
local getlist = nuts.getlist
+local getchar = nuts.getchar
local getfield = nuts.getfield
+local getprop = nuts.getprop
+
local setfield = nuts.setfield
+local setprop = nuts.setprop
+local setchar = nuts.setchar
local remove_node = nuts.remove
-local copy_node = nuts.copy
local insert_node_after = nuts.insert_after
local insert_node_before = nuts.insert_before
@@ -88,7 +91,6 @@ local nodepool = nuts.pool
local new_textdir = nodepool.textdir
local nodecodes = nodes.nodecodes
-local whatsitcodes = nodes.whatsitcodes
local skipcodes = nodes.skipcodes
local glyph_code = nodecodes.glyph
@@ -96,10 +98,9 @@ local glue_code = nodecodes.glue
local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
local math_code = nodecodes.math
-local whatsit_code = nodecodes.whatsit
-local dir_code = whatsitcodes.dir
-local localpar_code = whatsitcodes.localpar
-local parfillskip_code = skipcodes.skipcodes
+local dir_code = nodecodes.dir
+local localpar_code = nodecodes.localpar
+local parfillskip_code = skipcodes.parfillskip
----- object_replacement = 0xFFFC -- object replacement character
local maximum_stack = 60 -- probably spec but not needed
@@ -204,15 +205,34 @@ local function build_list(head) -- todo: store node pointer ... saves loop
while current do
size = size + 1
local id = getid(current)
- if id == glyph_code then
+ if getprop(current,"directions") then
+ local skip = 0
+ local last = id
+ current = getnext(current)
+ while current do
+ local id = getid(current)
+ if getprop(current,"directions") then
+ skip = skip + 1
+ last = id
+ current = getnext(current)
+ else
+ break
+ end
+ end
+ if id == last then -- the start id
+ list[size] = { char = 0xFFFC, direction = "on", original = "on", level = 0, skip = skip, id = id }
+ else
+ list[size] = { char = 0xFFFC, direction = "on", original = "on", level = 0, skip = skip, id = id, last = last }
+ end
+ elseif id == glyph_code then
local chr = getchar(current)
local dir = directiondata[chr]
list[size] = { char = chr, direction = dir, original = dir, level = 0 }
current = getnext(current)
- elseif id == glue_code then
+ elseif id == glue_code then -- and how about kern
list[size] = { char = 0x0020, direction = "ws", original = "ws", level = 0 }
current = getnext(current)
- elseif id == whatsit_code and getsubtype(current) == dir_code then
+ elseif id == dir_code then
local dir = getfield(current,"dir")
if dir == "+TLT" then
list[size] = { char = 0x202A, direction = "lre", original = "lre", level = 0 }
@@ -240,7 +260,7 @@ local function build_list(head) -- todo: store node pointer ... saves loop
current = getnext(current)
while n do
local id = getid(current)
- if id ~= glyph_code and id ~= glue_code and not (id == whatsit_code and getsubtype(current) == dir_code) then
+ if id ~= glyph_code and id ~= glue_code and id ~= dir_code then
skip = skip + 1
last = id
current = getnext(current)
@@ -248,7 +268,7 @@ local function build_list(head) -- todo: store node pointer ... saves loop
break
end
end
- if id == last then
+ if id == last then -- the start id
list[size] = { char = 0xFFFC, direction = "on", original = "on", level = 0, skip = skip, id = id }
else
list[size] = { char = 0xFFFC, direction = "on", original = "on", level = 0, skip = skip, id = id, last = last }
@@ -302,8 +322,9 @@ local function find_run_limit_b_s_ws_on(list,start,limit)
return start
end
-local function get_baselevel(head,list,size) -- todo: skip if first is object (or pass head and test for local_par)
- if getid(head) == whatsit_code and getsubtype(head) == localpar_code then
+local function get_baselevel(head,list,size) -- todo: skip if first is object (or pass head and test for localpar)
+ local id = getid(head)
+ if id == localpar_code then
if getfield(head,"dir") == "TRT" then
return 1, "TRT", true
else
@@ -549,26 +570,47 @@ local function resolve_neutral(list,size,start,limit,sor,eor)
end
end
+-- local function resolve_implicit(list,size,start,limit,sor,eor)
+-- -- I1
+-- for i=start,limit do
+-- local entry = list[i]
+-- local level = entry.level
+-- if level % 2 ~= 1 then -- not odd(level)
+-- local direction = entry.direction
+-- if direction == "r" then
+-- entry.level = level + 1
+-- elseif direction == "an" or direction == "en" then
+-- entry.level = level + 2
+-- end
+-- end
+-- end
+-- -- I2
+-- for i=start,limit do
+-- local entry = list[i]
+-- local level = entry.level
+-- if level % 2 == 1 then -- odd(level)
+-- local direction = entry.direction
+-- if direction == "l" or direction == "en" or direction == "an" then
+-- entry.level = level + 1
+-- end
+-- end
+-- end
+-- end
+
local function resolve_implicit(list,size,start,limit,sor,eor)
- -- I1
for i=start,limit do
- local entry = list[i]
- local level = entry.level
- if level % 2 ~= 1 then -- not odd(level)
- local direction = entry.direction
+ local entry = list[i]
+ local level = entry.level
+ local direction = entry.direction
+ if level % 2 ~= 1 then -- even
+ -- I1
if direction == "r" then
entry.level = level + 1
elseif direction == "an" or direction == "en" then
entry.level = level + 2
end
- end
- end
- -- I2
- for i=start,limit do
- local entry = list[i]
- local level = entry.level
- if level % 2 == 1 then -- odd(level)
- local direction = entry.direction
+ else
+ -- I2
if direction == "l" or direction == "en" or direction == "an" then
entry.level = level + 1
end
@@ -695,14 +737,15 @@ local function apply_to_list(list,size,head,pardir)
local entry = list[index]
local begindir = entry.begindir
local enddir = entry.enddir
+ setprop(current,"directions",true)
if id == glyph_code then
local mirror = entry.mirror
if mirror then
- setfield(current,"char",mirror)
+ setchar(current,mirror)
end
if trace_directions then
local direction = entry.direction
- setcolor(current,direction,direction ~= entry.original,mirror)
+ setcolor(current,direction,false,mirror)
end
elseif id == hlist_code or id == vlist_code then
setfield(current,"dir",pardir) -- is this really needed?
@@ -710,15 +753,17 @@ local function apply_to_list(list,size,head,pardir)
if enddir and getsubtype(current) == parfillskip_code then
-- insert the last enddir before \parfillskip glue
local d = new_textdir(enddir)
+ setprop(d,"directions",true)
-- setfield(d,"attr",getfield(current,"attr"))
head = insert_node_before(head,current,d)
enddir = false
done = true
end
- elseif id == whatsit_code then
- if begindir and getsubtype(current) == localpar_code then
- -- local_par should always be the 1st node
+ elseif begindir then
+ if id == localpar_code then
+ -- localpar should always be the 1st node
local d = new_textdir(begindir)
+ setprop(d,"directions",true)
-- setfield(d,"attr",getfield(current,"attr"))
head, current = insert_node_after(head,current,d)
begindir = nil
@@ -727,6 +772,7 @@ local function apply_to_list(list,size,head,pardir)
end
if begindir then
local d = new_textdir(begindir)
+ setprop(d,"directions",true)
-- setfield(d,"attr",getfield(current,"attr"))
head = insert_node_before(head,current,d)
done = true
@@ -735,10 +781,12 @@ local function apply_to_list(list,size,head,pardir)
if skip and skip > 0 then
for i=1,skip do
current = getnext(current)
+ setprop(current,"directions",true)
end
end
if enddir then
local d = new_textdir(enddir)
+ setprop(d,"directions",true)
-- setfield(d,"attr",getfield(current,"attr"))
head, current = insert_node_after(head,current,d)
done = true
diff --git a/Master/texmf-dist/tex/context/base/typo-dub.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-dub.lua
index a1c9de75245..7ac33979935 100644
--- a/Master/texmf-dist/tex/context/base/typo-dub.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-dub.lua
@@ -60,16 +60,19 @@ local tonode = nuts.tonode
local nutstring = nuts.tostring
local getnext = nuts.getnext
-local getchar = nuts.getchar
local getid = nuts.getid
local getsubtype = nuts.getsubtype
local getlist = nuts.getlist
+local getchar = nuts.getchar
local getattr = nuts.getattr
local getfield = nuts.getfield
+local getprop = nuts.getprop
+
local setfield = nuts.setfield
+local setprop = nuts.setprop
+local setchar = nuts.setchar
local remove_node = nuts.remove
-local copy_node = nuts.copy
local insert_node_after = nuts.insert_after
local insert_node_before = nuts.insert_before
@@ -77,7 +80,6 @@ local nodepool = nuts.pool
local new_textdir = nodepool.textdir
local nodecodes = nodes.nodecodes
-local whatsitcodes = nodes.whatsitcodes
local skipcodes = nodes.skipcodes
local glyph_code = nodecodes.glyph
@@ -85,10 +87,9 @@ local glue_code = nodecodes.glue
local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
local math_code = nodecodes.math
-local whatsit_code = nodecodes.whatsit
-local dir_code = whatsitcodes.dir
-local localpar_code = whatsitcodes.localpar
-local parfillskip_code = skipcodes.skipcodes
+local dir_code = nodecodes.dir
+local localpar_code = nodecodes.localpar
+local parfillskip_code = skipcodes.parfillskip
local maximum_stack = 0xFF -- unicode: 60, will be jumped to 125, we don't care too much
@@ -109,6 +110,7 @@ local remove_controls = true directives.register("typesetters.directions.re
local trace_directions = false trackers .register("typesetters.directions.two", function(v) trace_directions = v end)
local trace_details = false trackers .register("typesetters.directions.two.details", function(v) trace_details = v end)
+local trace_list = false trackers .register("typesetters.directions.two.list", function(v) trace_list = v end)
local report_directions = logs.reporter("typesetting","directions two")
@@ -197,7 +199,7 @@ local function show_list(list,size,what)
result[i] = formatters["%-3s:%s %s (%i)"](direction,joiner,nodecodes[first],skip or 0)
end
elseif character >= 0x202A and character <= 0x202C then
- result[i] = formatters["%-3s:%s %U"](direction,joiner,character)
+ result[i] = formatters["%-3s:%s %U"](direction,joiner,character)
else
result[i] = formatters["%-3s:%s %c %U"](direction,joiner,character,character)
end
@@ -258,15 +260,34 @@ local function build_list(head) -- todo: store node pointer ... saves loop
while current do
size = size + 1
local id = getid(current)
- if id == glyph_code then
+ if getprop(current,"directions") then
+ local skip = 0
+ local last = id
+ current = getnext(current)
+ while current do
+ local id = getid(current)
+ if getprop(current,"directions") then
+ skip = skip + 1
+ last = id
+ current = getnext(current)
+ else
+ break
+ end
+ end
+ if id == last then -- the start id
+ list[size] = { char = 0xFFFC, direction = "on", original = "on", level = 0, skip = skip, id = id }
+ else
+ list[size] = { char = 0xFFFC, direction = "on", original = "on", level = 0, skip = skip, id = id, last = last }
+ end
+ elseif id == glyph_code then
local chr = getchar(current)
local dir = directiondata[chr]
list[size] = { char = chr, direction = dir, original = dir, level = 0 }
current = getnext(current)
- elseif id == glue_code then
+ elseif id == glue_code then -- and how about kern
list[size] = { char = 0x0020, direction = "ws", original = "ws", level = 0 }
current = getnext(current)
- elseif id == whatsit_code and getsubtype(current) == dir_code then
+ elseif id == dir_code then
local dir = getfield(current,"dir")
if dir == "+TLT" then
list[size] = { char = 0x202A, direction = "lre", original = "lre", level = 0 }
@@ -294,7 +315,7 @@ local function build_list(head) -- todo: store node pointer ... saves loop
current = getnext(current)
while n do
local id = getid(current)
- if id ~= glyph_code and id ~= glue_code and not (id == whatsit_code and getsubtype(current) == dir_code) then
+ if id ~= glyph_code and id ~= glue_code and id ~= dir_code then
skip = skip + 1
last = id
current = getnext(current)
@@ -302,7 +323,7 @@ local function build_list(head) -- todo: store node pointer ... saves loop
break
end
end
- if id == last then
+ if id == last then -- the start id
list[size] = { char = 0xFFFC, direction = "on", original = "on", level = 0, skip = skip, id = id }
else
list[size] = { char = 0xFFFC, direction = "on", original = "on", level = 0, skip = skip, id = id, last = last }
@@ -327,7 +348,7 @@ end
-- ש ( ל [ × ] ×› ) 2-8,4-6
local function resolve_fences(list,size,start,limit)
- -- N0: funny effects, not always better, so it's an options
+ -- N0: funny effects, not always better, so it's an option
local stack = { }
local top = 0
for i=start,limit do
@@ -379,8 +400,9 @@ end
-- the action
-local function get_baselevel(head,list,size) -- todo: skip if first is object (or pass head and test for local_par)
- if getid(head) == whatsit_code and getsubtype(head) == localpar_code then
+local function get_baselevel(head,list,size) -- todo: skip if first is object (or pass head and test for localpar)
+ local id = getid(head)
+ if id == localpar_code then
if getfield(head,"dir") == "TRT" then
return 1, "TRT", true
else
@@ -391,7 +413,7 @@ local function get_baselevel(head,list,size) -- todo: skip if first is object (o
for i=1,size do
local entry = list[i]
local direction = entry.direction
- if direction == "r" or direction == "al" then
+ if direction == "r" or direction == "al" then -- and an ?
return 1, "TRT", true
elseif direction == "l" then
return 0, "TLT", true
@@ -522,23 +544,50 @@ local function resolve_weak(list,size,start,limit,orderbefore,orderafter)
end
end
-- W4: make separators number
- for i=start+1,limit-1 do
- local entry = list[i]
- local direction = entry.direction
- if direction == "es" then
- if list[i-1].direction == "en" and list[i+1].direction == "en" then
- entry.direction = "en"
- end
- elseif direction == "cs" then
- local prevdirection = list[i-1].direction
- if prevdirection == "en" then
- if list[i+1].direction == "en" then
+ if true then
+ for i=start+1,limit-1 do
+ local entry = list[i]
+ local direction = entry.direction
+ if direction == "es" then
+ if list[i-1].direction == "en" and list[i+1].direction == "en" then
entry.direction = "en"
end
- elseif prevdirection == "an" and list[i+1].direction == "an" then
- entry.direction = "an"
+ elseif direction == "cs" then
+ local prevdirection = list[i-1].direction
+ if prevdirection == "en" then
+ if list[i+1].direction == "en" then
+ entry.direction = "en"
+ end
+ elseif prevdirection == "an" and list[i+1].direction == "an" then
+ entry.direction = "an"
+ end
end
end
+ else -- probably more efficient
+ local runner = start + 2
+ local before = list[start]
+ local entry = list[start + 1]
+ local after = list[runner]
+ while after do
+ local direction = entry.direction
+ if direction == "es" then
+ if before.direction == "en" and after.direction == "en" then
+ entry.direction = "en"
+ end
+ elseif direction == "cs" then
+ local prevdirection = before.direction
+ if prevdirection == "en" then
+ if after.direction == "en" then
+ entry.direction = "en"
+ end
+ elseif prevdirection == "an" and after.direction == "an" then
+ entry.direction = "an"
+ end
+ end
+ before = current
+ current = after
+ after = list[runner]
+ end
end
-- W5
local i = start
@@ -598,18 +647,21 @@ local function resolve_neutral(list,size,start,limit,orderbefore,orderafter)
for i=start,limit do
local entry = list[i]
if b_s_ws_on[entry.direction] then
+ -- this needs checking
local leading_direction, trailing_direction, resolved_direction
local runstart = i
local runlimit = runstart
- for i=runstart,limit do
- if b_s_ws_on[list[i].direction] then
- runstart = i
+-- for j=runstart,limit do
+ for j=runstart+1,limit do
+ if b_s_ws_on[list[j].direction] then
+-- runstart = j
+ runlimit = j
else
break
end
end
if runstart == start then
- leading_direction = sor
+ leading_direction = orderbefore
else
leading_direction = list[runstart-1].direction
if leading_direction == "en" or leading_direction == "an" then
@@ -629,7 +681,7 @@ local function resolve_neutral(list,size,start,limit,orderbefore,orderafter)
resolved_direction = leading_direction
else
-- N2 / does the weird period
- resolved_direction = entry.level % 2 == 1 and "r" or "l" -- direction_of_level(entry.level)
+ resolved_direction = entry.level % 2 == 1 and "r" or "l"
end
for j=runstart,runlimit do
list[j].direction = resolved_direction
@@ -640,26 +692,47 @@ local function resolve_neutral(list,size,start,limit,orderbefore,orderafter)
end
end
-local function resolve_implicit(list,size,start,limit,orderbefore,orderafter)
- -- I1
+-- local function resolve_implicit(list,size,start,limit,orderbefore,orderafter)
+-- -- I1
+-- for i=start,limit do
+-- local entry = list[i]
+-- local level = entry.level
+-- if level % 2 ~= 1 then -- not odd(level)
+-- local direction = entry.direction
+-- if direction == "r" then
+-- entry.level = level + 1
+-- elseif direction == "an" or direction == "en" then
+-- entry.level = level + 2
+-- end
+-- end
+-- end
+-- -- I2
+-- for i=start,limit do
+-- local entry = list[i]
+-- local level = entry.level
+-- if level % 2 == 1 then -- odd(level)
+-- local direction = entry.direction
+-- if direction == "l" or direction == "en" or direction == "an" then
+-- entry.level = level + 1
+-- end
+-- end
+-- end
+-- end
+
+local function resolve_implicit(list,size,start,limit,orderbefore,orderafter,baselevel)
for i=start,limit do
- local entry = list[i]
- local level = entry.level
- if level % 2 ~= 1 then -- not odd(level)
- local direction = entry.direction
+ local entry = list[i]
+ local level = entry.level
+ local direction = entry.direction
+ if level % 2 ~= 1 then -- even
+ -- I1
if direction == "r" then
entry.level = level + 1
elseif direction == "an" or direction == "en" then
entry.level = level + 2
end
- end
- end
- -- I2
- for i=start,limit do
- local entry = list[i]
- local level = entry.level
- if level % 2 == 1 then -- odd(level)
- local direction = entry.direction
+ else
+ -- I2
if direction == "l" or direction == "en" or direction == "an" then
entry.level = level + 1
end
@@ -678,8 +751,8 @@ local function resolve_levels(list,size,baselevel,analyze_fences)
end
local prev_level = start == 1 and baselevel or list[start-1].level
local next_level = limit == size and baselevel or list[limit+1].level
- local orderbefore = (level > prev_level and level or prev_level) % 2 == 1 and "r" or "l" -- direction_of_level(max(level,prev_level))
- local orderafter = (level > next_level and level or next_level) % 2 == 1 and "r" or "l" -- direction_of_level(max(level,next_level))
+ local orderbefore = (level > prev_level and level or prev_level) % 2 == 1 and "r" or "l"
+ local orderafter = (level > next_level and level or next_level) % 2 == 1 and "r" or "l"
-- W1 .. W7
resolve_weak(list,size,start,limit,orderbefore,orderafter)
-- N0
@@ -689,7 +762,7 @@ local function resolve_levels(list,size,baselevel,analyze_fences)
-- N1 .. N2
resolve_neutral(list,size,start,limit,orderbefore,orderafter)
-- I1 .. I2
- resolve_implicit(list,size,start,limit,orderbefore,orderafter)
+ resolve_implicit(list,size,start,limit,orderbefore,orderafter,baselevel)
start = limit
end
-- L1
@@ -795,6 +868,9 @@ local function apply_to_list(list,size,head,pardir)
local index = 1
local current = head
local done = false
+ if trace_list then
+ report_directions("start run")
+ end
while current do
if index > size then
report_directions("fatal error, size mismatch")
@@ -804,14 +880,25 @@ local function apply_to_list(list,size,head,pardir)
local entry = list[index]
local begindir = entry.begindir
local enddir = entry.enddir
+ setprop(current,"directions",true)
if id == glyph_code then
local mirror = entry.mirror
if mirror then
- setfield(current,"char",mirror)
+ setchar(current,mirror)
end
if trace_directions then
local direction = entry.direction
- setcolor(current,direction,direction ~= entry.original,mirror)
+ if trace_list then
+ local original = entry.original
+ local char = entry.char
+ local level = entry.level
+ if direction == original then
+ report_directions("%2i : %C : %s",level,char,direction)
+ else
+ report_directions("%2i : %C : %s -> %s",level,char,original,direction)
+ end
+ end
+ setcolor(current,direction,false,mirror)
end
elseif id == hlist_code or id == vlist_code then
setfield(current,"dir",pardir) -- is this really needed?
@@ -819,23 +906,27 @@ local function apply_to_list(list,size,head,pardir)
if enddir and getsubtype(current) == parfillskip_code then
-- insert the last enddir before \parfillskip glue
local d = new_textdir(enddir)
+ setprop(d,"directions",true)
-- setfield(d,"attr",getfield(current,"attr"))
head = insert_node_before(head,current,d)
enddir = false
done = true
end
- elseif id == whatsit_code then
- if begindir and getsubtype(current) == localpar_code then
- -- local_par should always be the 1st node
+ elseif begindir then
+ if id == localpar_code then
+ -- localpar should always be the 1st node
local d = new_textdir(begindir)
+ setprop(d,"directions",true)
-- setfield(d,"attr",getfield(current,"attr"))
head, current = insert_node_after(head,current,d)
begindir = nil
done = true
end
+ else
end
if begindir then
local d = new_textdir(begindir)
+ setprop(d,"directions",true)
-- setfield(d,"attr",getfield(current,"attr"))
head = insert_node_before(head,current,d)
done = true
@@ -844,10 +935,12 @@ local function apply_to_list(list,size,head,pardir)
if skip and skip > 0 then
for i=1,skip do
current = getnext(current)
+ setprop(current,"directions",true)
end
end
if enddir then
local d = new_textdir(enddir)
+ setprop(d,"directions",true)
-- setfield(d,"attr",getfield(current,"attr"))
head, current = insert_node_after(head,current,d)
done = true
@@ -863,6 +956,9 @@ local function apply_to_list(list,size,head,pardir)
end
index = index + 1
end
+ if trace_list then
+ report_directions("stop run")
+ end
return head, done
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-duc.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-duc.lua
new file mode 100644
index 00000000000..fce40932fcb
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-duc.lua
@@ -0,0 +1,1025 @@
+if not modules then modules = { } end modules ['typo-duc'] = {
+ version = 1.001,
+ comment = "companion to typo-dir.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+ comment = "Unicode bidi (sort of) variant b",
+}
+
+-- This is a follow up on typo-uba which itself is a follow up on t-bidi by Khaled Hosny which
+-- in turn is based on minibidi.c from Arabeyes. This is a further optimizations, as well as
+-- an update on some recent unicode bidi developments. There is (and will) also be more control
+-- added. As a consequence this module is somewhat slower than its precursor which itself is
+-- slower than the one-pass bidi handler. This is also a playground and I might add some plugin
+-- support. However, in the meantime performance got a bit better and this third variant is again
+-- some 10% faster than the two variant.
+
+-- todo (cf html):
+--
+-- normal The element does not offer a additional level of embedding with respect to the bidirectional algorithm. For inline elements implicit reordering works across element boundaries.
+-- embed If the element is inline, this value opens an additional level of embedding with respect to the bidirectional algorithm. The direction of this embedding level is given by the direction property.
+-- bidi-override For inline elements this creates an override. For block container elements this creates an override for inline-level descendants not within another block container element. This means that inside the element, reordering is strictly in sequence according to the direction property; the implicit part of the bidirectional algorithm is ignored.
+-- isolate This keyword indicates that the element's container directionality should be calculated without considering the content of this element. The element is therefore isolated from its siblings. When applying its bidirectional-resolution algorithm, its container element treats it as one or several U+FFFC Object Replacement Character, i.e. like an image.
+-- isolate-override This keyword applies the isolation behavior of the isolate keyword to the surrounding content and the override behavior o f the bidi-override keyword to the inner content.
+-- plaintext This keyword makes the elements directionality calculated without considering its parent bidirectional state or the value of the direction property. The directionality is calculated using the P2 and P3 rules of the Unicode Bidirectional Algorithm.
+-- This value allows to display data which has already formatted using a tool following the Unicode Bidirectional Algorithm.
+--
+-- todo: check for introduced errors
+-- todo: reuse list, we have size, so we can just change values (and auto allocate when not there)
+-- todo: reuse the stack
+-- todo: no need for a max check
+-- todo: collapse bound similar ranges (not ok yet)
+-- todo: combine some sweeps
+-- todo: removing is not needed when we inject at the same spot (only chnage the dir property)
+-- todo: isolated runs (isolating runs are similar to bidi=local in the basic analyzer)
+
+-- todo: check unicode addenda (from the draft):
+--
+-- Added support for canonical equivalents in BD16.
+-- Changed logic in N0 to not check forwards for context in the case of enclosed text opposite the embedding direction.
+-- Major extension of the algorithm to allow for the implementation of directional isolates and the introduction of new isolate-related values to the Bidi_Class property.
+-- Adds BD8, BD9, BD10, BD11, BD12, BD13, BD14, BD15, and BD16, Sections 2.4 and 2.5, and Rules X5a, X5b, X5c and X6a.
+-- Extensively revises Section 3.3.2, Explicit Levels and Directions and its existing X rules to formalize the algorithm for matching a PDF with the embedding or override initiator whose scope it terminates.
+-- Moves Rules X9 and X10 into a separate new Section 3.3.3, Preparations for Implicit Processing.
+-- Modifies Rule X10 to make the isolating run sequence the unit to which subsequent rules are applied.
+-- Modifies Rule W1 to change an NSM preceded by an isolate initiator or PDI into ON.
+-- Adds Rule N0 and makes other changes to Section 3.3.5, Resolving Neutral and Isolate Formatting Types to resolve bracket pairs to the same level.
+
+local insert, remove, unpack, concat = table.insert, table.remove, table.unpack, table.concat
+local utfchar = utf.char
+local setmetatable = setmetatable
+local formatters = string.formatters
+
+local directiondata = characters.directions
+local mirrordata = characters.mirrors
+local textclassdata = characters.textclasses
+
+local nuts = nodes.nuts
+local tonut = nuts.tonut
+local tonode = nuts.tonode
+local nutstring = nuts.tostring
+
+local getnext = nuts.getnext
+local getid = nuts.getid
+local getsubtype = nuts.getsubtype
+local getchar = nuts.getchar
+local getlist = nuts.getlist
+local getattr = nuts.getattr
+local getfield = nuts.getfield
+local getprop = nuts.getprop
+
+local setfield = nuts.setfield
+local setprop = nuts.setprop
+local setchar = nuts.setchar
+
+local properties = nodes.properties
+
+local remove_node = nuts.remove
+local insert_node_after = nuts.insert_after
+local insert_node_before = nuts.insert_before
+
+local nodepool = nuts.pool
+local new_textdir = nodepool.textdir
+
+local nodecodes = nodes.nodecodes
+local skipcodes = nodes.skipcodes
+
+local glyph_code = nodecodes.glyph
+local glue_code = nodecodes.glue
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local math_code = nodecodes.math
+local dir_code = nodecodes.dir
+local localpar_code = nodecodes.localpar
+local parfillskip_code = skipcodes.parfillskip
+
+local maximum_stack = 0xFF -- unicode: 60, will be jumped to 125, we don't care too much
+
+local directions = typesetters.directions
+local setcolor = directions.setcolor
+local getfences = directions.getfences
+
+local a_directions = attributes.private('directions')
+local a_textbidi = attributes.private('textbidi')
+----- a_state = attributes.private('state')
+
+----- s_isol = fonts.analyzers.states.isol
+
+----- current[a_state] = s_isol -- maybe better have a special bidi attr value -> override (9) -> todo
+
+local remove_controls = true directives.register("typesetters.directions.removecontrols",function(v) remove_controls = v end)
+----- analyze_fences = true directives.register("typesetters.directions.analyzefences", function(v) analyze_fences = v end)
+
+local trace_directions = false trackers .register("typesetters.directions.two", function(v) trace_directions = v end)
+local trace_details = false trackers .register("typesetters.directions.two.details", function(v) trace_details = v end)
+local trace_list = false trackers .register("typesetters.directions.two.list", function(v) trace_list = v end)
+
+local report_directions = logs.reporter("typesetting","directions two")
+
+-- strong (old):
+--
+-- l : left to right
+-- r : right to left
+-- lro : left to right override
+-- rlo : left to left override
+-- lre : left to right embedding
+-- rle : left to left embedding
+-- al : right to legt arabic (esp punctuation issues)
+
+-- weak:
+--
+-- en : english number
+-- es : english number separator
+-- et : english number terminator
+-- an : arabic number
+-- cs : common number separator
+-- nsm : nonspacing mark
+-- bn : boundary neutral
+
+-- neutral:
+--
+-- b : paragraph separator
+-- s : segment separator
+-- ws : whitespace
+-- on : other neutrals
+
+-- interesting: this is indeed better (and more what we expect i.e. we already use this split
+-- in the old original (also these isolates)
+
+-- strong (new):
+--
+-- l : left to right
+-- r : right to left
+-- al : right to left arabic (esp punctuation issues)
+
+-- explicit: (new)
+--
+-- lro : left to right override
+-- rlo : left to left override
+-- lre : left to right embedding
+-- rle : left to left embedding
+-- pdf : pop dir format
+-- lri : left to right isolate
+-- rli : left to left isolate
+-- fsi : first string isolate
+-- pdi : pop directional isolate
+
+local whitespace = {
+ lre = true,
+ rle = true,
+ lro = true,
+ rlo = true,
+ pdf = true,
+ bn = true,
+ ws = true,
+}
+
+local b_s_ws_on = {
+ b = true,
+ s = true,
+ ws = true,
+ on = true
+}
+
+-- tracing
+
+local function show_list(list,size,what)
+ local what = what or "direction"
+ local joiner = utfchar(0x200C)
+ local result = { }
+ for i=1,size do
+ local entry = list[i]
+ local character = entry.char
+ local direction = entry[what]
+ if character == 0xFFFC then
+ local first = entry.id
+ local last = entry.last
+ local skip = entry.skip
+ if last then
+ result[i] = formatters["%-3s:%s %s..%s (%i)"](direction,joiner,nodecodes[first],nodecodes[last],skip or 0)
+ else
+ result[i] = formatters["%-3s:%s %s (%i)"](direction,joiner,nodecodes[first],skip or 0)
+ end
+ elseif character >= 0x202A and character <= 0x202C then
+ result[i] = formatters["%-3s:%s %U"](direction,joiner,character)
+ else
+ result[i] = formatters["%-3s:%s %c %U"](direction,joiner,character,character)
+ end
+ end
+ return concat(result,joiner .. " | " .. joiner)
+end
+
+-- preparation
+
+local function show_done(list,size)
+ local joiner = utfchar(0x200C)
+ local result = { }
+ for i=1,size do
+ local entry = list[i]
+ local character = entry.char
+ local begindir = entry.begindir
+ local enddir = entry.enddir
+ if begindir then
+ result[#result+1] = formatters["<%s>"](begindir)
+ end
+ if entry.remove then
+ -- continue
+ elseif character == 0xFFFC then
+ result[#result+1] = formatters["<%s>"]("?")
+ elseif character == 0x0020 then
+ result[#result+1] = formatters["<%s>"](" ")
+ elseif character >= 0x202A and character <= 0x202C then
+ result[#result+1] = formatters["<%s>"](entry.original)
+ else
+ result[#result+1] = utfchar(character)
+ end
+ if enddir then
+ result[#result+1] = formatters["<%s>"](enddir)
+ end
+ end
+ return concat(result,joiner)
+end
+
+-- keeping the list and overwriting doesn't save much runtime, only a few percent
+-- char is only used for mirror, so in fact we can as well only store it for
+-- glyphs only
+
+-- tracking what direction is used and skipping tests is not faster (extra kind of
+-- compensates gain)
+
+local mt_space = { __index = { char = 0x0020, direction = "ws", original = "ws", level = 0 } }
+local mt_lre = { __index = { char = 0x202A, direction = "lre", original = "lre", level = 0 } }
+local mt_lre = { __index = { char = 0x202B, direction = "rle", original = "rle", level = 0 } }
+local mt_pdf = { __index = { char = 0x202C, direction = "pdf", original = "pdf", level = 0 } }
+local mt_object = { __index = { char = 0xFFFC, direction = "on", original = "on", level = 0 } }
+
+local function build_list(head) -- todo: store node pointer ... saves loop
+ -- P1
+ local current = head
+ local list = { }
+ local size = 0
+ while current do
+ size = size + 1
+ local id = getid(current)
+ local p = properties[current]
+ local t
+ if p and p.directions then
+ local skip = 0
+ local last = id
+ current = getnext(current)
+ while current do
+ local id = getid(current)
+ if p and p.directions then
+ skip = skip + 1
+ last = id
+ current = getnext(current)
+ else
+ break
+ end
+ end
+ if id == last then -- the start id
+ t = { skip = skip, id = id }
+ else
+ t = { skip = skip, id = id, last = last }
+ end
+ setmetatable(t,mt_object)
+ elseif id == glyph_code then
+ local chr = getchar(current)
+ local dir = directiondata[chr]
+ t = { char = chr, direction = dir, original = dir, level = 0 }
+ current = getnext(current)
+ -- if not list[dir] then list[dir] = true end -- not faster when we check for usage
+ elseif id == glue_code then -- and how about kern
+ t = { }
+ setmetatable(t,mt_space)
+ current = getnext(current)
+ elseif id == dir_code then
+ local dir = getfield(current,"dir")
+ if dir == "+TLT" then
+ t = { }
+ setmetatable(t,mt_lre)
+ elseif dir == "+TRT" then
+ t = { }
+ setmetatable(t,mt_rle)
+ elseif dir == "-TLT" or dir == "-TRT" then
+ t = { }
+ setmetatable(t,mt_pdf)
+ else
+ t = { id = id }
+ setmetatable(t,mt_object)
+ end
+ current = getnext(current)
+ elseif id == math_code then
+ local skip = 0
+ current = getnext(current)
+ while getid(current) ~= math_code do
+ skip = skip + 1
+ current = getnext(current)
+ end
+ skip = skip + 1
+ current = getnext(current)
+ t = { id = id, skip = skip }
+ setmetatable(t,mt_object)
+ else
+ local skip = 0
+ local last = id
+ current = getnext(current)
+ while n do
+ local id = getid(current)
+ if id ~= glyph_code and id ~= glue_code and id ~= dir_code then
+ skip = skip + 1
+ last = id
+ current = getnext(current)
+ else
+ break
+ end
+ end
+ if skip == 0 then
+ t = { id = id }
+ elseif id == last then -- the start id
+ t = { id = id, skip = skip }
+ else
+ t = { id = id, skip = skip, last = last }
+ end
+ setmetatable(t,mt_object)
+ end
+ list[size] = t
+ end
+ return list, size
+end
+
+-- new
+
+-- we could support ( ] and [ ) and such ...
+
+-- ש ) ל ( × 0-0
+-- ש ( ל ] × 0-0
+-- ש ( ל ) × 2-4
+-- ש ( ל [ × ) ×› ] 2-6
+-- ש ( ל ] × ) ×› 2-6
+-- ש ( ל ) × ) ×› 2-4
+-- ש ( ל ( × ) ×› 4-6
+-- ש ( ל ( × ) ×› ) 2-8,4-6
+-- ש ( ל [ × ] ×› ) 2-8,4-6
+
+local function resolve_fences(list,size,start,limit)
+ -- N0: funny effects, not always better, so it's an option
+ local stack = { }
+ local top = 0
+ for i=start,limit do
+ local entry = list[i]
+ if entry.direction == "on" then
+ local char = entry.char
+ local mirror = mirrordata[char]
+ if mirror then
+ local class = textclassdata[char]
+ entry.mirror = mirror
+ entry.class = class
+ if class == "open" then
+ top = top + 1
+ stack[top] = { mirror, i, false }
+ elseif top == 0 then
+ -- skip
+ elseif class == "close" then
+ while top > 0 do
+ local s = stack[top]
+ if s[1] == char then
+ local open = s[2]
+ local close = i
+ list[open ].paired = close
+ list[close].paired = open
+ break
+ else
+ -- do we mirror or not
+ end
+ top = top - 1
+ end
+ end
+ end
+ end
+ end
+end
+
+-- local function test_fences(str)
+-- local list = { }
+-- for s in string.gmatch(str,".") do
+-- local b = utf.byte(s)
+-- list[#list+1] = { c = s, char = b, direction = directiondata[b] }
+-- end
+-- resolve_fences(list,#list,1,#size)
+-- inspect(list)
+-- end
+--
+-- test_fences("a(b)c(d)e(f(g)h)i")
+-- test_fences("a(b[c)d]")
+
+-- the action
+
+local function get_baselevel(head,list,size) -- todo: skip if first is object (or pass head and test for localpar)
+ local id = getid(head)
+ if id == localpar_code then
+ if getfield(head,"dir") == "TRT" then
+ return 1, "TRT", true
+ else
+ return 0, "TLT", true
+ end
+ else
+ -- P2, P3
+ for i=1,size do
+ local entry = list[i]
+ local direction = entry.direction
+ if direction == "r" or direction == "al" then -- and an ?
+ return 1, "TRT", true
+ elseif direction == "l" then
+ return 0, "TLT", true
+ end
+ end
+ return 0, "TLT", false
+ end
+end
+
+local function resolve_explicit(list,size,baselevel)
+-- if list.rle or list.lre or list.rlo or list.lro then
+ -- X1
+ local level = baselevel
+ local override = "on"
+ local stack = { }
+ local nofstack = 0
+ for i=1,size do
+ local entry = list[i]
+ local direction = entry.direction
+ -- X2
+ if direction == "rle" then
+ if nofstack < maximum_stack then
+ nofstack = nofstack + 1
+ stack[nofstack] = { level, override }
+ level = level + (level % 2 == 1 and 2 or 1) -- least_greater_odd(level)
+ override = "on"
+ entry.level = level
+ entry.direction = "bn"
+ entry.remove = true
+ elseif trace_directions then
+ report_directions("stack overflow at position %a with direction %a",i,direction)
+ end
+ -- X3
+ elseif direction == "lre" then
+ if nofstack < maximum_stack then
+ nofstack = nofstack + 1
+ stack[nofstack] = { level, override }
+ level = level + (level % 2 == 1 and 1 or 2) -- least_greater_even(level)
+ override = "on"
+ entry.level = level
+ entry.direction = "bn"
+ entry.remove = true
+ elseif trace_directions then
+ report_directions("stack overflow at position %a with direction %a",i,direction)
+ end
+ -- X4
+ elseif direction == "rlo" then
+ if nofstack < maximum_stack then
+ nofstack = nofstack + 1
+ stack[nofstack] = { level, override }
+ level = level + (level % 2 == 1 and 2 or 1) -- least_greater_odd(level)
+ override = "r"
+ entry.level = level
+ entry.direction = "bn"
+ entry.remove = true
+ elseif trace_directions then
+ report_directions("stack overflow at position %a with direction %a",i,direction)
+ end
+ -- X5
+ elseif direction == "lro" then
+ if nofstack < maximum_stack then
+ nofstack = nofstack + 1
+ stack[nofstack] = { level, override }
+ level = level + (level % 2 == 1 and 1 or 2) -- least_greater_even(level)
+ override = "l"
+ entry.level = level
+ entry.direction = "bn"
+ entry.remove = true
+ elseif trace_directions then
+ report_directions("stack overflow at position %a with direction %a",i,direction)
+ end
+ -- X7
+ elseif direction == "pdf" then
+ if nofstack < maximum_stack then
+ local stacktop = stack[nofstack]
+ nofstack = nofstack - 1
+ level = stacktop[1]
+ override = stacktop[2]
+ entry.level = level
+ entry.direction = "bn"
+ entry.remove = true
+ elseif trace_directions then
+ report_directions("stack overflow at position %a with direction %a",i,direction)
+ end
+ -- X6
+ else
+ entry.level = level
+ if override ~= "on" then
+ entry.direction = override
+ end
+ end
+ end
+-- else
+-- for i=1,size do
+-- list[i].level = baselevel
+-- end
+-- end
+ -- X8 (reset states and overrides after paragraph)
+end
+
+local function resolve_weak(list,size,start,limit,orderbefore,orderafter)
+ -- W1: non spacing marks get the direction of the previous character
+-- if list.nsm then
+ for i=start,limit do
+ local entry = list[i]
+ if entry.direction == "nsm" then
+ if i == start then
+ entry.direction = orderbefore
+ else
+ entry.direction = list[i-1].direction
+ end
+ end
+ end
+-- end
+ -- W2: mess with numbers and arabic
+-- if list.en then
+ for i=start,limit do
+ local entry = list[i]
+ if entry.direction == "en" then
+ for j=i-1,start,-1 do
+ local prev = list[j]
+ local direction = prev.direction
+ if direction == "al" then
+ entry.direction = "an"
+ break
+ elseif direction == "r" or direction == "l" then
+ break
+ end
+ end
+ end
+ end
+-- end
+ -- W3
+-- if list.al then
+ for i=start,limit do
+ local entry = list[i]
+ if entry.direction == "al" then
+ entry.direction = "r"
+ end
+ end
+-- end
+ -- W4: make separators number
+-- if list.es or list.cs then
+ -- skip
+ if false then
+ for i=start+1,limit-1 do
+ local entry = list[i]
+ local direction = entry.direction
+ if direction == "es" then
+ if list[i-1].direction == "en" and list[i+1].direction == "en" then
+ entry.direction = "en"
+ end
+ elseif direction == "cs" then
+ local prevdirection = list[i-1].direction
+ if prevdirection == "en" then
+ if list[i+1].direction == "en" then
+ entry.direction = "en"
+ end
+ elseif prevdirection == "an" and list[i+1].direction == "an" then
+ entry.direction = "an"
+ end
+ end
+ end
+ else -- only more efficient when we have es/cs
+ local runner = start + 2
+ local before = list[start]
+ local entry = list[start + 1]
+ local after = list[runner]
+ while after do
+ local direction = entry.direction
+ if direction == "es" then
+ if before.direction == "en" and after.direction == "en" then
+ entry.direction = "en"
+ end
+ elseif direction == "cs" then
+ local prevdirection = before.direction
+ if prevdirection == "en" then
+ if after.direction == "en" then
+ entry.direction = "en"
+ end
+ elseif prevdirection == "an" and after.direction == "an" then
+ entry.direction = "an"
+ end
+ end
+ before = current
+ current = after
+ after = list[runner]
+ runner = runner + 1
+ end
+ end
+-- end
+ -- W5
+-- if list.et then
+ local i = start
+ while i <= limit do
+ if list[i].direction == "et" then
+ local runstart = i
+ local runlimit = runstart
+ for i=runstart,limit do
+ if list[i].direction == "et" then
+ runlimit = i
+ else
+ break
+ end
+ end
+ local rundirection = runstart == start and sor or list[runstart-1].direction
+ if rundirection ~= "en" then
+ rundirection = runlimit == limit and orderafter or list[runlimit+1].direction
+ end
+ if rundirection == "en" then
+ for j=runstart,runlimit do
+ list[j].direction = "en"
+ end
+ end
+ i = runlimit
+ end
+ i = i + 1
+ end
+-- end
+ -- W6
+-- if list.es or list.cs or list.et then
+ for i=start,limit do
+ local entry = list[i]
+ local direction = entry.direction
+ if direction == "es" or direction == "et" or direction == "cs" then
+ entry.direction = "on"
+ end
+ end
+-- end
+ -- W7
+ for i=start,limit do
+ local entry = list[i]
+ if entry.direction == "en" then
+ local prev_strong = orderbefore
+ for j=i-1,start,-1 do
+ local direction = list[j].direction
+ if direction == "l" or direction == "r" then
+ prev_strong = direction
+ break
+ end
+ end
+ if prev_strong == "l" then
+ entry.direction = "l"
+ end
+ end
+ end
+end
+
+local function resolve_neutral(list,size,start,limit,orderbefore,orderafter)
+ -- N1, N2
+ for i=start,limit do
+ local entry = list[i]
+ if b_s_ws_on[entry.direction] then
+ -- this needs checking
+ local leading_direction, trailing_direction, resolved_direction
+ local runstart = i
+ local runlimit = runstart
+-- for j=runstart,limit do
+ for j=runstart+1,limit do
+ if b_s_ws_on[list[j].direction] then
+-- runstart = j
+ runlimit = j
+ else
+ break
+ end
+ end
+ if runstart == start then
+ leading_direction = orderbefore
+ else
+ leading_direction = list[runstart-1].direction
+ if leading_direction == "en" or leading_direction == "an" then
+ leading_direction = "r"
+ end
+ end
+ if runlimit == limit then
+ trailing_direction = orderafter
+ else
+ trailing_direction = list[runlimit+1].direction
+ if trailing_direction == "en" or trailing_direction == "an" then
+ trailing_direction = "r"
+ end
+ end
+ if leading_direction == trailing_direction then
+ -- N1
+ resolved_direction = leading_direction
+ else
+ -- N2 / does the weird period
+ resolved_direction = entry.level % 2 == 1 and "r" or "l"
+ end
+ for j=runstart,runlimit do
+ list[j].direction = resolved_direction
+ end
+ i = runlimit
+ end
+ i = i + 1
+ end
+end
+
+-- local function resolve_implicit(list,size,start,limit,orderbefore,orderafter)
+-- -- I1
+-- for i=start,limit do
+-- local entry = list[i]
+-- local level = entry.level
+-- if level % 2 ~= 1 then -- not odd(level)
+-- local direction = entry.direction
+-- if direction == "r" then
+-- entry.level = level + 1
+-- elseif direction == "an" or direction == "en" then
+-- entry.level = level + 2
+-- end
+-- end
+-- end
+-- -- I2
+-- for i=start,limit do
+-- local entry = list[i]
+-- local level = entry.level
+-- if level % 2 == 1 then -- odd(level)
+-- local direction = entry.direction
+-- if direction == "l" or direction == "en" or direction == "an" then
+-- entry.level = level + 1
+-- end
+-- end
+-- end
+-- end
+
+local function resolve_implicit(list,size,start,limit,orderbefore,orderafter,baselevel)
+ for i=start,limit do
+ local entry = list[i]
+ local level = entry.level
+ local direction = entry.direction
+ if level % 2 ~= 1 then -- even
+ -- I1
+ if direction == "r" then
+ entry.level = level + 1
+ elseif direction == "an" or direction == "en" then
+ entry.level = level + 2
+ end
+ else
+ -- I2
+ if direction == "l" or direction == "en" or direction == "an" then
+ entry.level = level + 1
+ end
+ end
+ end
+end
+
+local function resolve_levels(list,size,baselevel,analyze_fences)
+ -- X10
+ local start = 1
+ while start < size do
+ local level = list[start].level
+ local limit = start + 1
+ while limit < size and list[limit].level == level do
+ limit = limit + 1
+ end
+ local prev_level = start == 1 and baselevel or list[start-1].level
+ local next_level = limit == size and baselevel or list[limit+1].level
+ local orderbefore = (level > prev_level and level or prev_level) % 2 == 1 and "r" or "l"
+ local orderafter = (level > next_level and level or next_level) % 2 == 1 and "r" or "l"
+ -- W1 .. W7
+ resolve_weak(list,size,start,limit,orderbefore,orderafter)
+ -- N0
+ if analyze_fences then
+ resolve_fences(list,size,start,limit)
+ end
+ -- N1 .. N2
+ resolve_neutral(list,size,start,limit,orderbefore,orderafter)
+ -- I1 .. I2
+ resolve_implicit(list,size,start,limit,orderbefore,orderafter,baselevel)
+ start = limit
+ end
+ -- L1
+ for i=1,size do
+ local entry = list[i]
+ local direction = entry.original
+ -- (1)
+ if direction == "s" or direction == "b" then
+ entry.level = baselevel
+ -- (2)
+ for j=i-1,1,-1 do
+ local entry = list[j]
+ if whitespace[entry.original] then
+ entry.level = baselevel
+ else
+ break
+ end
+ end
+ end
+ end
+ -- (3)
+ for i=size,1,-1 do
+ local entry = list[i]
+ if whitespace[entry.original] then
+ entry.level = baselevel
+ else
+ break
+ end
+ end
+ -- L4
+ if analyze_fences then
+ for i=1,size do
+ local entry = list[i]
+ if entry.level % 2 == 1 then -- odd(entry.level)
+ if entry.mirror and not entry.paired then
+ entry.mirror = false
+ end
+ -- okay
+ elseif entry.mirror then
+ entry.mirror = false
+ end
+ end
+ else
+ for i=1,size do
+ local entry = list[i]
+ if entry.level % 2 == 1 then -- odd(entry.level)
+ local mirror = mirrordata[entry.char]
+ if mirror then
+ entry.mirror = mirror
+ end
+ end
+ end
+ end
+end
+
+local function insert_dir_points(list,size)
+ -- L2, but no actual reversion is done, we simply annotate where
+ -- begindir/endddir node will be inserted.
+ local maxlevel = 0
+ local finaldir = false
+ for i=1,size do
+ local level = list[i].level
+ if level > maxlevel then
+ maxlevel = level
+ end
+ end
+ for level=0,maxlevel do
+ local started = false
+ local begindir = nil
+ local enddir = nil
+ if level % 2 == 1 then
+ begindir = "+TRT"
+ enddir = "-TRT"
+ else
+ begindir = "+TLT"
+ enddir = "-TLT"
+ end
+ for i=1,size do
+ local entry = list[i]
+ if entry.level >= level then
+ if not started then
+ entry.begindir = begindir
+ started = true
+ end
+ else
+ if started then
+ list[i-1].enddir = enddir
+ started = false
+ end
+ end
+ end
+ -- make sure to close the run at end of line
+ if started then
+ finaldir = enddir
+ end
+ end
+ if finaldir then
+ list[size].enddir = finaldir
+ end
+end
+
+local function apply_to_list(list,size,head,pardir)
+ local index = 1
+ local current = head
+ local done = false
+ if trace_list then
+ report_directions("start run")
+ end
+ while current do
+ if index > size then
+ report_directions("fatal error, size mismatch")
+ break
+ end
+ local id = getid(current)
+ local entry = list[index]
+ local begindir = entry.begindir
+ local enddir = entry.enddir
+ local p = properties[current] if p then p.directions = true else properties[current] = { directions = true } end
+ if id == glyph_code then
+ local mirror = entry.mirror
+ if mirror then
+ setchar(current,mirror)
+ end
+ if trace_directions then
+ local direction = entry.direction
+ if trace_list then
+ local original = entry.original
+ local char = entry.char
+ local level = entry.level
+ if direction == original then
+ report_directions("%2i : %C : %s",level,char,direction)
+ else
+ report_directions("%2i : %C : %s -> %s",level,char,original,direction)
+ end
+ end
+ setcolor(current,direction,false,mirror)
+ end
+ elseif id == hlist_code or id == vlist_code then
+ setfield(current,"dir",pardir) -- is this really needed?
+ elseif id == glue_code then
+ if enddir and getsubtype(current) == parfillskip_code then
+ -- insert the last enddir before \parfillskip glue
+ local d = new_textdir(enddir)
+ local p = properties[d] if p then p.directions = true else properties[d] = { directions = true } end
+ -- setfield(d,"attr",getfield(current,"attr"))
+ head = insert_node_before(head,current,d)
+ enddir = false
+ done = true
+ end
+ elseif begindir then
+ if id == localpar_code then
+ -- localpar should always be the 1st node
+ local d = new_textdir(begindir)
+ local p = properties[d] if p then p.directions = true else properties[d] = { directions = true } end
+ -- setfield(d,"attr",getfield(current,"attr"))
+ head, current = insert_node_after(head,current,d)
+ begindir = nil
+ done = true
+ end
+ end
+ if begindir then
+ local d = new_textdir(begindir)
+ local p = properties[d] if p then p.directions = true else properties[d] = { directions = true } end
+ -- setfield(d,"attr",getfield(current,"attr"))
+ head = insert_node_before(head,current,d)
+ done = true
+ end
+ local skip = entry.skip
+ if skip and skip > 0 then
+ for i=1,skip do
+ current = getnext(current)
+ local p = properties[current] if p then p.directions = true else properties[current] = { directions = true } end
+ end
+ end
+ if enddir then
+ local d = new_textdir(enddir)
+ local p = properties[d] if p then p.directions = true else properties[d] = { directions = true } end
+ -- setfield(d,"attr",getfield(current,"attr"))
+ head, current = insert_node_after(head,current,d)
+ done = true
+ end
+ if not entry.remove then
+ current = getnext(current)
+ elseif remove_controls then
+ -- X9
+ head, current = remove_node(head,current,true)
+ done = true
+ else
+ current = getnext(current)
+ end
+ index = index + 1
+ end
+ if trace_list then
+ report_directions("stop run")
+ end
+ return head, done
+end
+
+local function process(head)
+ head = tonut(head)
+ -- for the moment a whole paragraph property
+ local attr = getattr(head,a_directions)
+ local analyze_fences = getfences(attr)
+ --
+ local list, size = build_list(head)
+ local baselevel, pardir, dirfound = get_baselevel(head,list,size) -- we always have an inline dir node in context
+ if not dirfound and trace_details then
+ report_directions("no initial direction found, gambling")
+ end
+ if trace_details then
+ report_directions("before : %s",show_list(list,size,"original"))
+ end
+ resolve_explicit(list,size,baselevel)
+ resolve_levels(list,size,baselevel,analyze_fences)
+ insert_dir_points(list,size)
+ if trace_details then
+ report_directions("after : %s",show_list(list,size,"direction"))
+ report_directions("result : %s",show_done(list,size))
+ end
+ head, done = apply_to_list(list,size,head,pardir)
+ return tonode(head), done
+end
+
+directions.installhandler(interfaces.variables.three,process)
diff --git a/Master/texmf-dist/tex/context/base/typo-fln.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-fln.lua
index 2076a7464ff..1e1a2c44a69 100644
--- a/Master/texmf-dist/tex/context/base/typo-fln.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-fln.lua
@@ -35,6 +35,7 @@ local getid = nuts.getid
local getfield = nuts.getfield
local setfield = nuts.setfield
local getlist = nuts.getlist
+local setlist = nuts.setlist
local getattr = nuts.getattr
local setattr = nuts.setattr
local getbox = nuts.getbox
@@ -289,7 +290,7 @@ local function applytofirstcharacter(box,what)
break
end
if done then
- setfield(tbox,"list",list)
+ setlist(tbox,list)
local kind = type(what)
if kind == "string" then
context[what](tonode(done))
diff --git a/Master/texmf-dist/tex/context/base/typo-fln.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-fln.mkiv
index 38a53bfa973..e883c57d2a3 100644
--- a/Master/texmf-dist/tex/context/base/typo-fln.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-fln.mkiv
@@ -104,7 +104,7 @@
\unexpanded\def\applytofirstcharacter#1%
{\begingroup
\dowithnextbox
- {\clf_applytofirstcharacter\nextbox{\strippedcsname#1}%
+ {\clf_applytofirstcharacter\nextbox{\csstring#1}%
\unhbox\nextbox
\endgroup}%
\hbox}
diff --git a/Master/texmf-dist/tex/context/base/typo-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-ini.lua
index c45d2966436..c45d2966436 100644
--- a/Master/texmf-dist/tex/context/base/typo-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-ini.lua
diff --git a/Master/texmf-dist/tex/context/base/typo-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-ini.mkiv
index 1c2d6617a53..1c2d6617a53 100644
--- a/Master/texmf-dist/tex/context/base/typo-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-ini.mkiv
diff --git a/Master/texmf-dist/tex/context/base/typo-inj.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-inj.lua
index b5d9e1c513a..786c3c2875a 100644
--- a/Master/texmf-dist/tex/context/base/typo-inj.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-inj.lua
@@ -8,16 +8,20 @@ if not modules then modules = { } end modules ['typo-inj'] = { -- was node-par
local tonumber = tonumber
-local context = context
-local implement = interfaces.implement
+local context = context
+local implement = interfaces.implement
-local injectors = { }
-typesetters.injectors = injectors
-local list = { }
-injectors.list = list
-local showall = false
+local injectors = { }
+typesetters.injectors = injectors
+local list = { }
+injectors.list = list
+local showall = false
-local settings_to_array = utilities.parsers.settings_to_array
+local settings_to_array = utilities.parsers.settings_to_array
+
+local variables = interfaces.variables
+local v_next = variables.next
+local v_previous = variables.previous
local ctx_domarkinjector = context.domarkinjector
local ctx_doactivateinjector = context.doactivateinjector
@@ -72,10 +76,10 @@ end
function injectors.check(name,n) -- we could also accent n = number : +/- 2
local injector = list[name]
- if n == false then
+ if not n or n == "" or n == v_next then
+ n = injector.counter + 1
+ elseif n == v_previous then
n = injector.counter
- elseif n == nil then
- n = injector.counter + 1 -- next (upcoming)
else
n = tonumber(n) or 0
end
@@ -89,6 +93,6 @@ implement { name = "resetinjector", actions = injectors.reset, arguments
implement { name = "showinjector", actions = injectors.show, arguments = "string" }
implement { name = "setinjector", actions = injectors.set, arguments = { "string", "string", "string" } }
implement { name = "markinjector", actions = injectors.mark, arguments = "string" }
-implement { name = "checkinjector", actions = injectors.check, arguments = "string" }
-implement { name = "checkpreviousinjector", actions = injectors.check, arguments = { "string", true } }
-implement { name = "checknextinjector", actions = injectors.check }
+implement { name = "checkinjector", actions = injectors.check, arguments = { "string", "string" } }
+--------- { name = "checkpreviousinjector", actions = injectors.check, arguments = { "string", tokens.constant(v_previous) } }
+--------- { name = "checknextinjector", actions = injectors.check, arguments = { "string", tokens.constant(v_next) } }
diff --git a/Master/texmf-dist/tex/context/base/typo-inj.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-inj.mkiv
index 46cd9fe4599..59f35378fca 100644
--- a/Master/texmf-dist/tex/context/base/typo-inj.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-inj.mkiv
@@ -44,16 +44,19 @@
%D \startsection[title=Delta] fourth \index{fourth} \stopsection
%D \stoptext
-\unexpanded\def\resetinjector [#1]{\clf_resetinjector{#1}}
-\unexpanded\def\markinjector [#1]{\dontleavehmode\clf_markinjector{#1}}
-\unexpanded\def\checkinjector [#1]{\clf_checkinjector{#1}}
-\unexpanded\def\checknextinjector {\clf_checknextinjector}
-\unexpanded\def\checkpreviousinjector {\clf_checkpreviousinjector}
-\unexpanded\def\dosetinjector [#1][#2][#3]{\clf_setinjector{#1}{#2}{#3}}
-\unexpanded\def\doshowinjector [#1]{\clf_showinjector{#1}}
+\unexpanded\def\resetinjector [#1]{\clf_resetinjector{#1}}
+\unexpanded\def\markinjector [#1]{\dontleavehmode\clf_markinjector{#1}}
+\unexpanded\def\docheckinjector [#1][#2]{\clf_checkinjector{#1}{#2}}
+\unexpanded\def\checknextinjector [#1]{\clf_checkinjector{#1}{\v!next}}
+\unexpanded\def\checkpreviousinjector [#1]{\clf_checkinjector{#1}{\v!previous}}
+%unexpanded\def\checknextinjector [#1]{\clf_checknextinjector{#1}}
+%unexpanded\def\checkpreviousinjector [#1]{\clf_checkpreviousinjector{#1}}
+\unexpanded\def\dosetinjector [#1][#2][#3]{\clf_setinjector{#1}{#2}{#3}}
+\unexpanded\def\doshowinjector [#1]{\clf_showinjector{#1}}
-\unexpanded\def\setinjector {\dotripleargument\dosetinjector}
-\unexpanded\def\showinjector{\dosingleempty\doshowinjector}
+\unexpanded\def\checkinjector{\dodoubleempty \docheckinjector}
+\unexpanded\def\setinjector {\dotripleargument\dosetinjector}
+\unexpanded\def\showinjector {\dosingleempty \doshowinjector}
\unexpanded\def\domarkinjector#1#2% called at the lua end
{\dontleavehmode\llap{\infofont\ifcase#1\else\red\fi<#2>\quad}}
diff --git a/Master/texmf-dist/tex/context/base/typo-itc.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-itc.lua
index d3a31fad1bf..cf54187d737 100644
--- a/Master/texmf-dist/tex/context/base/typo-itc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-itc.lua
@@ -37,9 +37,12 @@ local getnext = nuts.getnext
local getid = nuts.getid
local getfont = nuts.getfont
local getchar = nuts.getchar
+local getdisc = nuts.getdisc
local getattr = nuts.getattr
local setattr = nuts.setattr
local setfield = nuts.setfield
+local setdisc = nuts.setdisc
+local isglyph = nuts.isglyph
local insert_node_after = nuts.insert_after
local delete_node = nuts.delete
@@ -49,9 +52,11 @@ local find_tail = nuts.tail
local texgetattribute = tex.getattribute
local texsetattribute = tex.setattribute
local a_italics = attributes.private("italics")
+local a_mathitalics = attributes.private("mathitalics")
+
local unsetvalue = attributes.unsetvalue
-local new_correction_kern = nodepool.fontkern
+local new_correction_kern = nodepool.italickern
local new_correction_glue = nodepool.glue
local fonthashes = fonts.hashes
@@ -59,6 +64,8 @@ local fontdata = fonthashes.identifiers
local italicsdata = fonthashes.italics
local exheights = fonthashes.exheights
+local is_punctuation = characters.is_punctuation
+
local implement = interfaces.implement
local forcedvariant = false
@@ -67,11 +74,14 @@ function typesetters.italics.forcevariant(variant)
forcedvariant = variant
end
+-- We use the same key as the tex font handler. So, if a valua has already be set, we
+-- use that one.
+
local function setitalicinfont(font,char)
local tfmdata = fontdata[font]
local character = tfmdata.characters[char]
if character then
- local italic = character.italic_correction
+ local italic = character.italic
if not italic then
local autoitalicamount = tfmdata.properties.autoitalicamount or 0
if autoitalicamount ~= 0 then
@@ -93,7 +103,10 @@ local function setitalicinfont(font,char)
if trace_italics then
report_italics("setting italic correction of %C of font %a to %p",char,font,italic)
end
- character.italic_correction = italic or 0
+ if not italic then
+ italic = 0
+ end
+ character.italic = italic
end
return italic
else
@@ -163,28 +176,32 @@ function italics.handler(head)
local previtalic = 0
local previnserted = nil
- local replace = nil
- local replacechar = nil
- local replacehead = nil
- local replaceitalic = 0
- local replaceinserted = nil
+ local pre = nil
+ local pretail = nil
local post = nil
+ local posttail = nil
local postchar = nil
local posthead = nil
local postitalic = 0
local postinserted = nil
+ local replace = nil
+ local replacetail = nil
+ local replacechar = nil
+ local replacehead = nil
+ local replaceitalic = 0
+ local replaceinserted = nil
+
local current = prevhead
local done = false
local lastfont = nil
local lastattr = nil
while current do
- local id = getid(current)
- if id == glyph_code then
+ local char, id = isglyph(current)
+ if char then
local font = getfont(current)
- local char = getchar(current)
local data = italicsdata[font]
if font ~= lastfont then
if previtalic ~= 0 then
@@ -236,7 +253,7 @@ function italics.handler(head)
-- this really can happen
previtalic = 0
else
- previtalic = cd.italic or cd.italic_correction
+ previtalic = cd.italic
if not previtalic then
previtalic = setitalicinfont(font,char) -- calculated once
-- previtalic = 0
@@ -265,95 +282,84 @@ function italics.handler(head)
replaceitalic = 0
postinserted = nil
postitalic = 0
- replace = getfield(current,"replace")
+ updated = false
+ pre, post, replace, pretail, posttail, replacetail = getdisc(current,true)
if replace then
- local current = find_tail(replace)
- if getid(current) ~= glyph_code then
- current = getprev(current)
- end
- if current and getid(current) == glyph_code then
- local font = getfont(current)
- local char = getchar(current)
- local data = italicsdata[font]
- if data then
- local attr = forcedvariant or getattr(current,a_italics)
- if attr and attr > 0 then
- local cd = data[char]
- if not cd then
- -- this really can happen
- replaceitalic = 0
- else
- replaceitalic = cd.italic or cd.italic_correction
- if not replaceitalic then
- replaceitalic = setitalicinfont(font,char) -- calculated once
- -- replaceitalic = 0
- end
- if replaceitalic ~= 0 then
- lastfont = font
- lastattr = attr
- replacechar = char
- replacehead = replace
- replace = current
+ local current = replacetail
+ while current do
+ local char, id = isglyph(current)
+ if char then
+ local font = getfont(current)
+ local data = italicsdata[font]
+ if data then
+ local attr = forcedvariant or getattr(current,a_italics)
+ if attr and attr > 0 then
+ local cd = data[char]
+ if not cd then
+ -- this really can happen
+ replaceitalic = 0
+ else
+ replaceitalic = cd.italic
+ if not replaceitalic then
+ replaceitalic = setitalicinfont(font,char) -- calculated once
+ -- replaceitalic = 0
+ end
+ if replaceitalic ~= 0 then
+ lastfont = font
+ lastattr = attr
+ replacechar = char
+ replacehead = replace
+ replace = current
+ updated = true
+ end
end
end
--- else
--- replaceitalic = 0
end
--- else
--- replaceitalic = 0
+ break
+ else
+ current = getprev(current)
end
--- else
--- replaceitalic = 0
end
--- replaceinserted = nil
--- else
--- replaceitalic = 0
--- replaceinserted = nil
end
- post = getfield(current,"post")
if post then
- local current = find_tail(post)
- if getid(current) ~= glyph_code then
- current = getprev(current)
- end
- if current and getid(current) == glyph_code then
- local font = getfont(current)
- local char = getchar(current)
- local data = italicsdata[font]
- if data then
- local attr = forcedvariant or getattr(current,a_italics)
- if attr and attr > 0 then
- local cd = data[char]
- if not cd then
- -- this really can happen
--- postitalic = 0
- else
- postitalic = cd.italic or cd.italic_correction
- if not postitalic then
- postitalic = setitalicinfont(font,char) -- calculated once
- -- postitalic = 0
- end
- if postitalic ~= 0 then
- lastfont = font
- lastattr = attr
- postchar = char
- posthead = post
- post = current
+ local current = posttail
+ while current do
+ local char, id = isglyph(current)
+ if char then
+ local font = getfont(current)
+ local data = italicsdata[font]
+ if data then
+ local attr = forcedvariant or getattr(current,a_italics)
+ if attr and attr > 0 then
+ local cd = data[char]
+ if not cd then
+ -- this really can happen
+ -- postitalic = 0
+ else
+ postitalic = cd.italic
+ if not postitalic then
+ postitalic = setitalicinfont(font,char) -- calculated once
+ -- postitalic = 0
+ end
+ if postitalic ~= 0 then
+ lastfont = font
+ lastattr = attr
+ postchar = char
+ posthead = post
+ post = current
+ updated = true
+ end
end
end
--- else
--- postitalic = 0
end
--- else
--- postitalic = 0
+ break
+ else
+ current = getprev(current)
end
--- else
--- postitalic = 0
end
--- postinserted = nil
--- else
--- postitalic = 0
--- postinserted = nil
+ end
+ if updated then
+ setdisc(current,pre,post,replace)
end
elseif id == kern_code then -- how about fontkern ?
previnserted = nil
@@ -399,6 +405,30 @@ function italics.handler(head)
replaceitalic = 0
postinserted = nil
postitalic = 0
+ local next = getnext(current)
+ if next then
+ local char, id = isglyph(next)
+ if char and is_punctuation[char] then
+ local kern = getprev(current)
+ if kern and getid(kern) == kern_code then
+ local glyph = getprev(kern)
+ if glyph and getid(glyph) == glyph_code then
+ local a = getattr(glyph,a_mathitalics)
+ if a == 101 then
+ local font = getfont(next)
+ local ex = exheights[font]
+ -- we need an extrat punctuation checker: . ; etc
+ if getfield(next,"height") < 1.25*ex then
+ if trace_italics then
+ report_italics("removing italic between math %C and punctuation %C",getchar(glyph),char)
+ end
+ setfield(kern,"kern",0) -- or maybe a small value or half the ic
+ end
+ end
+ end
+ end
+ end
+ end
else
if previtalic ~= 0 then
if trace_italics then
@@ -529,7 +559,7 @@ local function setupitaliccorrection(option) -- no grouping !
texsetattribute(a_italics,variant)
end
if trace_italics then
- report_italics("forcing %a, variant %a",forcedvariant,variant ~= unsetvalue and variant)
+ report_italics("forcing %a, variant %a",forcedvariant or "-",variant ~= unsetvalue and variant)
end
end
diff --git a/Master/texmf-dist/tex/context/base/typo-itc.mkvi b/Master/texmf-dist/tex/context/base/mkiv/typo-itc.mkvi
index c0aa8e2f6dd..b0d2673cd48 100644
--- a/Master/texmf-dist/tex/context/base/typo-itc.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-itc.mkvi
@@ -24,7 +24,8 @@
\registerctxluafile{typo-itc}{1.001}
-\definesystemattribute[italics][public]
+\definesystemattribute[italics] [public]
+\definesystemattribute[mathitalics][public]
% \let\/=/
% \let\emphasiscorrection\donothing
diff --git a/Master/texmf-dist/tex/context/base/typo-itm.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-itm.mkiv
index 0bb8170c721..0bb8170c721 100644
--- a/Master/texmf-dist/tex/context/base/typo-itm.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-itm.mkiv
diff --git a/Master/texmf-dist/tex/context/base/typo-krn.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-krn.lua
index 46a977cfd49..7607fc5f509 100644
--- a/Master/texmf-dist/tex/context/base/typo-krn.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-krn.lua
@@ -7,6 +7,7 @@ if not modules then modules = { } end modules ['typo-krn'] = {
}
-- glue is still somewhat suboptimal
+-- components: better split on tounicode
local next, type, tonumber = next, type, tonumber
local utfchar = utf.char
@@ -30,20 +31,27 @@ local insert_node_after = nuts.insert_after
local end_of_math = nuts.end_of_math
local getfield = nuts.getfield
-local setfield = nuts.setfield
local getnext = nuts.getnext
local getprev = nuts.getprev
+local getboth = nuts.getboth
local getid = nuts.getid
-local getattr = nuts.getattr
-local setattr = nuts.setattr
local getfont = nuts.getfont
local getsubtype = nuts.getsubtype
local getchar = nuts.getchar
+local getdisc = nuts.getdisc
+local isglyph = nuts.isglyph
+
+local setfield = nuts.setfield
+local getattr = nuts.getattr
+local setattr = nuts.setattr
+local setlink = nuts.setlink
+local setsubtype = nuts.setsubtype
local texsetattribute = tex.setattribute
local unsetvalue = attributes.unsetvalue
-local new_gluespec = nodepool.gluespec
+local setglue = nuts.setglue -- todo
+
local new_kern = nodepool.kern
local new_glue = nodepool.glue
@@ -98,6 +106,10 @@ local kerns = typesetters.kerns
local report = logs.reporter("kerns")
local trace_ligatures = false trackers.register("typesetters.kerns.ligatures",function(v) trace_ligatures = v end)
+-- use_advance is just an experiment: it makes copying glyphs (instead of new_glyph) dangerous
+
+local use_advance = false directives.register("typesetters.kerns.advance", function(v) use_advance = v end)
+
kerns.mapping = kerns.mapping or { }
kerns.factors = kerns.factors or { }
local a_kerns = attributes.private("kern")
@@ -190,31 +202,20 @@ end
local function kern_injector(fillup,kern)
if fillup then
local g = new_glue(kern)
- local s = getfield(g,"spec")
- setfield(s,"stretch",kern)
- setfield(s,"stretch_order",1)
+ setfield(g,"stretch",kern)
+ setfield(g,"stretch_order",1)
return g
else
return new_kern(kern)
end
end
-local function spec_injector(fillup,width,stretch,shrink)
- if fillup then
- local s = new_gluespec(width,2*stretch,2*shrink)
- setfield(s,"stretch_order",1)
- return s
- else
- return new_gluespec(width,stretch,shrink)
- end
-end
-
-- a simple list injector, no components and such .. just disable ligatures in
-- kern mode .. maybe not even hyphenate ... anyway, the next one is for simple
-- sublists .. beware: we can have char -1
local function inject_begin(boundary,prev,keeptogether,krn,ok) -- prev is a glyph
- local id = getid(boundary)
+ local char, id = isglyph(boundary)
if id == kern_code then
if getsubtype(boundary) == kerning_code or getattr(boundary,a_fontkern) then
local inject = true
@@ -226,23 +227,22 @@ local function inject_begin(boundary,prev,keeptogether,krn,ok) -- prev is a glyp
end
if inject then
-- not yet ok, as injected kerns can be overlays (from node-inj.lua)
- setfield(boundary,"subtype",userkern_code)
+ setsubtype(boundary,userkern_code)
setfield(boundary,"kern",getfield(boundary,"kern") + quaddata[getfont(prev)]*krn)
return boundary, true
end
end
- elseif id == glyph_code then
+ elseif char then
if keeptogether and keeptogether(boundary,prev) then
-- keep 'm
else
- local charone = getchar(prev)
- if charone > 0 then
- local font = getfont(boundary)
- local chartwo = getchar(boundary)
- local kerns = chardata[font][charone].kerns
- local kern = new_kern((kerns and kerns[chartwo] or 0) + quaddata[font]*krn)
- setfield(boundary,"prev",kern)
- setfield(kern,"next",boundary)
+ local prevchar = isglyph(prev)
+ if prevchar and prevchar > 0 then
+ local font = getfont(boundary)
+ local data = chardata[font][prevchar]
+ local kerns = data and data.kerns
+ local kern = new_kern((kerns and kerns[char] or 0) + quaddata[font]*krn)
+ setlink(kern,boundary)
return kern, true
end
end
@@ -252,7 +252,7 @@ end
local function inject_end(boundary,next,keeptogether,krn,ok)
local tail = find_node_tail(boundary)
- local id = getid(tail)
+ local char, id = getid(tail)
if id == kern_code then
if getsubtype(tail) == kerning_code or getattr(tail,a_fontkern) then
local inject = true
@@ -264,21 +264,21 @@ local function inject_end(boundary,next,keeptogether,krn,ok)
end
if inject then
-- not yet ok, as injected kerns can be overlays (from node-inj.lua)
- setfield(tail,"subtype",userkern_code)
+ setsubtype(tail,userkern_code)
setfield(tail,"kern",getfield(tail,"kern") + quaddata[getfont(next)]*krn)
return boundary, true
end
end
- elseif id == glyph_code then
+ elseif char then
if keeptogether and keeptogether(tail,two) then
-- keep 'm
else
- local charone = getchar(tail)
- if charone > 0 then
- local font = getfont(tail)
- local chartwo = getchar(next)
- local kerns = chardata[font][charone].kerns
- local kern = (kerns and kerns[chartwo] or 0) + quaddata[font]*krn
+ local nextchar = isglyph(tail)
+ if nextchar and nextchar > 0 then
+ local font = getfont(tail)
+ local data = chardata[font][nextchar]
+ local kerns = data and data.kerns
+ local kern = (kerns and kerns[char] or 0) + quaddata[font]*krn
insert_node_after(boundary,tail,new_kern(kern))
return boundary, true
end
@@ -294,15 +294,14 @@ local function process_list(head,keeptogether,krn,font,okay)
local kern = 0
local mark = font and markdata[font]
while start do
- local id = getid(start)
- if id == glyph_code then
+ local char, id = isglyph(start)
+ if char then
if not font then
font = getfont(start)
mark = markdata[font]
kern = quaddata[font]*krn
end
if prev then
- local char = getchar(start)
if mark[char] then
-- skip
elseif pid == kern_code then
@@ -316,7 +315,7 @@ local function process_list(head,keeptogether,krn,font,okay)
end
if inject then
-- not yet ok, as injected kerns can be overlays (from node-inj.lua)
- setfield(prev,"subtype",userkern_code)
+ setsubtype(prev,userkern_code)
setfield(prev,"kern",getfield(prev,"kern") + kern)
okay = true
end
@@ -326,7 +325,8 @@ local function process_list(head,keeptogether,krn,font,okay)
-- keep 'm
else
local prevchar = getchar(prev)
- local kerns = chardata[font][prevchar].kerns
+ local data = chardata[font][prevchar]
+ local kerns = data and data.kerns
-- if kerns then
-- print("it happens indeed, basemode kerns not yet injected")
-- end
@@ -401,17 +401,14 @@ function kerns.handler(head)
while c do
local s = start
local t = find_node_tail(c)
- local p = getprev(s)
- local n = getnext(s)
+ local p, n = getboth(s)
if p then
- setfield(p,"next",c)
- setfield(c,"prev",p)
+ setlink(p,c)
else
head = c
end
if n then
- setfield(n,"prev",t)
- setfield(t,"next",n)
+ setlink(t,n)
end
start = c
setfield(s,"components",nil)
@@ -436,7 +433,7 @@ function kerns.handler(head)
end
if inject then
-- not yet ok, as injected kerns can be overlays (from node-inj.lua)
- setfield(prev,"subtype",userkern_code)
+ setsubtype(prev,userkern_code)
setfield(prev,"kern",getfield(prev,"kern") + quaddata[font]*krn)
done = true
end
@@ -446,9 +443,14 @@ function kerns.handler(head)
if keeptogether and keeptogether(prev,start) then
-- keep 'm
else
- local kerns = chardata[font][prevchar].kerns
+ local data = chardata[font][prevchar]
+ local kerns = data and data.kerns
local kern = (kerns and kerns[char] or 0) + quaddata[font]*krn
- insert_node_before(head,start,kern_injector(fillup,kern))
+ if not fillup and use_advance then
+ setfield(prev,"xadvance",getfield(prev,"xadvance") + kern)
+ else
+ insert_node_before(head,start,kern_injector(fillup,kern))
+ end
done = true
end
else
@@ -477,9 +479,7 @@ function kerns.handler(head)
pglyph = prev and getid(prev) == glyph_code
languages.expand(start,pglyph and prev)
end
- local pre = getfield(start,"pre")
- local post = getfield(start,"post")
- local replace = getfield(start,"replace")
+ local pre, post, replace = getdisc(start)
-- we really need to reasign the fields as luatex keeps track of
-- the tail in a temp preceding head .. kind of messy so we might
-- want to come up with a better solution some day like a real
@@ -549,13 +549,21 @@ function kerns.handler(head)
elseif id == glue_code then
local subtype = getsubtype(start)
if subtype == userskip_code or subtype == xspaceskip_code or subtype == spaceskip_code then
- local s = getfield(start,"spec")
- local w = getfield(s,"width")
+ local w = getfield(start,"width")
if w > 0 then
- local width = w+gluefactor*w*krn
- local stretch = getfield(s,"stretch")
- local shrink = getfield(s,"shrink")
- setfield(start,"spec",spec_injector(fillup,width,stretch*width/w,shrink*width/w))
+ local width = w + gluefactor * w * krn
+ local stretch = getfield(start,"stretch") * width / w
+ local shrink = getfield(start,"shrink") * width / w
+ if fillup then
+ stretch = 2 * stretch
+ shrink = 2 * shrink
+ setfield(start,"stretch_order",1)
+ -- shrink_order ?
+ end
+ setfield(start,"width",width)
+ setfield(start,"stretch",stretch)
+ setfield(start,"shrink", shrink)
+ --
done = true
end
end
diff --git a/Master/texmf-dist/tex/context/base/typo-krn.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-krn.mkiv
index 6d6126542bf..6d6126542bf 100644
--- a/Master/texmf-dist/tex/context/base/typo-krn.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-krn.mkiv
diff --git a/Master/texmf-dist/tex/context/base/typo-lan.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-lan.lua
index c42d2119eb6..c42d2119eb6 100644
--- a/Master/texmf-dist/tex/context/base/typo-lan.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-lan.lua
diff --git a/Master/texmf-dist/tex/context/base/typo-lan.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-lan.mkiv
index 8b633957bca..6bc052b9989 100644
--- a/Master/texmf-dist/tex/context/base/typo-lan.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-lan.mkiv
@@ -30,7 +30,8 @@
\def\charwidthlanguage{\currentmainlanguage}
-\def\averagecharwidth{\dimexpr\clf_averagecharwidth{\charwidthlanguage}\scaledpoint\relax}
+\def\averagecharwidth {\dimexpr\clf_averagecharwidth{\charwidthlanguage}\scaledpoint\relax}
+\def\languagecharwidth#1{\dimexpr\clf_averagecharwidth{#1}\scaledpoint\relax}
\protect
diff --git a/Master/texmf-dist/tex/context/base/typo-lig.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-lig.mkiv
index 6171441d6d3..6171441d6d3 100644
--- a/Master/texmf-dist/tex/context/base/typo-lig.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-lig.mkiv
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-lin.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-lin.lua
new file mode 100644
index 00000000000..40a27dd3949
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-lin.lua
@@ -0,0 +1,471 @@
+if not modules then modules = { } end modules ['typo-lin'] = {
+ version = 1.001,
+ comment = "companion to typo-lin.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is experimental code. The idea is to create an anchor point in a line but there are
+-- some considerations:
+--
+-- * if we normalize in order to have more easy access later on, we need to normalize all
+-- lines and we cannot catch all without losing efficiency
+--
+-- * if we normalize too soon, we might have issues with changed properties later on
+--
+-- * if we normalize too late, we have no knowledge of the current hsize
+--
+-- * if we always create an anchor we also create unwanted overhead if it is not used later
+-- on (more nodes)
+--
+-- The question is: do we mind of at the first access an anchor is created? As we cannot know
+-- that now, I choose some middle ground but this might change. if we don't assume direct
+-- access but only helpers, we can decide later.
+--
+-- Because of right2left mess it makes sense to use helpers so that we only need to deal with
+-- this mess once, in helpers. The more abstraction there the better. And so, after a week of
+-- experimenting, yet another abstraction was introduced.
+--
+-- The danger of adding the anchor later is that we adapt the head and so the caller needs to
+-- check that ... real messy. On the other hand, we soldom traverse the line. And other
+-- mechanisms can push stuff in front too. Actually that alone can mess up analysis when we
+-- delay too much. So in the end we need to accept the slow down.
+--
+-- We only need to normalize the left side because when we mess around we keep the page stream
+-- order (and adding content to the right of the line is a no-go for tagged etc. For the same
+-- reason we don't use two left anchors (each side fo leftskip) because there can be stretch.
+-- But, maybe there are good reasons for having just that anchor (mostly for educational purposes
+-- I guess.)
+--
+-- At this stage the localpar node is no longer of any use so we remove it (each line has the
+-- direction attached). We might at some point also strip the disc nodes as they no longer serve
+-- a purpose but that can better be a helper. Anchoring left has advantage of keeping page
+-- stream.
+--
+-- This looks a bit messy but we want to keep the box as it is so \showboxes still visualizes as
+-- expected. Normally left and rightskips end up in the line while hangindents become shifts and
+-- hsize corrections. We could normalize this to a line with
+
+-- indent : hlist type 3
+-- hangindent : shift and width
+
+local type = type
+
+local trace_anchors = false trackers.register("paragraphs.anchors", function(v) trace_anchors = v end)
+
+local report = logs.reporter("anchors")
+
+local nuts = nodes.nuts
+local nodecodes = nodes.nodecodes
+local gluecodes = nodes.gluecodes
+local listcodes = nodes.listcodes
+
+local hlist_code = nodecodes.hlist
+local glue_code = nodecodes.glue
+local kern_code = nodecodes.kern
+local line_code = listcodes.line
+local localpar_code = nodecodes.localpar
+local leftskip_code = gluecodes.leftskip
+local rightskip_code = gluecodes.rightskip
+local parfillskip_code = gluecodes.parfillskip
+
+local tonut = nodes.tonut
+local tonode = nodes.tonode
+
+local traverse_id = nuts.traverse_id
+local insert_before = nuts.insert_before
+local insert_after = nuts.insert_after
+local find_tail = nuts.tail
+----- remove_node = nuts.remove
+
+local getsubtype = nuts.getsubtype
+local getlist = nuts.getlist
+local setlist = nuts.setlist
+local getid = nuts.getid
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getboth = nuts.getboth
+local getfield = nuts.getfield
+local setfield = nuts.setfield
+
+local setprop = nuts.setprop
+local getprop = nuts.rawprop -- getprop
+
+local effectiveglue = nuts.effective_glue
+
+local nodepool = nuts.pool
+local new_glue = nodepool.glue
+local new_kern = nodepool.kern
+local new_leftskip = nodepool.leftskip
+local new_rightskip = nodepool.rightskip
+local new_hlist = nodepool.hlist
+local new_vlist = nodepool.vlist
+local new_rule = nodepool.rule
+local new_latelua = nodepool.latelua
+
+local texgetcount = tex.getcount
+local setmetatableindex = table.setmetatableindex
+local formatters = string.formatters
+
+local jobpositions = job.positions
+local getposition = jobpositions.get
+local getreserved = jobpositions.getreserved
+
+local paragraphs = { }
+typesetters.paragraphs = paragraphs
+
+local addskips = false
+local noflines = 0
+
+-- This is the third version, a mix between immediate (prestice lines) and delayed
+-- as we don't want anchors that are not used.
+
+-- if reverse then delta = - delta end
+-- head = insert_before(head,head,nodepool.textdir("-TLT"))
+-- ....
+-- head = insert_before(head,head,nodepool.textdir("TLT"))
+
+-- todo: figure out metatable mess ... when we copy we also need to copy
+-- anchors ... use rawgets
+
+-- problem: what if a box is copied ... we could check an attribute
+
+local function finalize(prop,key) -- delayed calculations
+ local line = prop.line
+ local hsize = prop.hsize
+ local width = prop.width
+ local shift = getfield(line,"shift") -- dangerous as it can be vertical as well
+ local reverse = getfield(line,"dir") == "TRT" or false
+ local pack = new_hlist()
+ local head = getlist(line)
+ local delta = 0
+ if reverse then
+ delta = - shift + (hsize - width)
+ else
+ delta = shift
+ end
+ local kern1 = new_kern(delta)
+ local kern2 = new_kern(-delta)
+ head = insert_before(head,head,kern1)
+ head = insert_before(head,head,pack)
+ head = insert_before(head,head,kern2)
+ setlist(line,head)
+ local where = {
+ pack = pack,
+ head = nil,
+ tail = nil,
+ }
+ prop.where = where
+ prop.reverse = reverse
+ prop.shift = shift
+ setmetatableindex(prop,nil)
+ return prop[key]
+end
+
+local function normalize(line,islocal) -- assumes prestine lines, nothing pre/appended
+ local oldhead = getlist(line)
+ local head = oldhead
+ local leftskip = nil
+ local rightskip = nil
+ local width = getfield(line,"width")
+ local hsize = islocal and width or tex.hsize
+ local lskip = 0
+ local rskip = 0
+ local pskip = 0
+ local current = head
+ local id = getid(current)
+ if id == glue_code then
+ local subtype = getsubtype(head)
+ if subtype == leftskip_code then
+ leftskip = head
+ lskip = getfield(head,"width") or 0
+ end
+ current = getnext(head)
+ id = getid(current)
+ end
+ -- no:
+ -- if id == localpar_code then
+ -- head = remove_node(head,head,true)
+ -- end
+ local tail = find_tail(head)
+ local current = tail
+ local id = getid(current)
+ if id == glue_code then
+ if getsubtype(current) == rightskip_code then
+ rightskip = tail
+ rskip = getfield(current,"width") or 0
+ current = getprev(tail)
+ id = getid(current)
+ end
+ if id == glue_code then
+ if getsubtype(current) == parfillskip_code then
+ pskip = effectiveglue(current,line)
+ end
+ end
+ end
+ if addskips then
+ if rightskip and not leftskip then
+ leftskip = new_leftskip(lskip)
+ head = insert_before(head,head,leftskip)
+ end
+ if leftskip and not rightskip then
+ rightskip = new_rightskip(0)
+ head, tail = insert_after(head,tail,rightskip)
+ end
+ end
+ if head ~= oldhead then
+ setlist(line,head)
+ end
+ noflines = noflines + 1
+ local prop = {
+ width = width,
+ hsize = hsize,
+ leftskip = lskip,
+ rightskip = rskip,
+ parfillskip = pskip,
+ line = line,
+ number = noflines,
+ }
+ setprop(line,"line",prop)
+ setmetatableindex(prop,finalize)
+ return prop
+end
+
+function paragraphs.checkline(n)
+ return getprop(n,"line") or normalize(n,true)
+end
+
+function paragraphs.normalize(head,islocal)
+ if texgetcount("pagebodymode") > 0 then
+ -- can be an option, maybe we need a proper state in lua itself ... is this check still needed?
+ return head, false
+ end
+ for line in traverse_id(hlist_code,tonut(head)) do
+ if getsubtype(line) == line_code and not getprop(line,"line") then
+ normalize(line)
+ end
+ end
+ return head, true
+end
+
+-- print(nodes.idstostring(head))
+
+-- We do only basic positioning and leave compensation for directions and distances
+-- to the caller as that one knows the circumstances better.
+
+-- todo: only in mvl or explicitly, e.g. framed or so, not in all lines
+
+local function addtoline(n,list,option)
+ local line = getprop(n,"line")
+ if not line then
+ line = normalize(n,true)
+ end
+ if line then
+ if trace_anchors and not line.traced then
+ line.traced = true
+ local rule = new_rule(2*65536,2*65536,1*65536)
+ local list = insert_before(rule,rule,new_kern(-1*65536))
+ addtoline(n,list)
+ local rule = new_rule(2*65536,6*65536,-3*65536)
+ local list = insert_before(rule,rule,new_kern(-1*65536))
+ addtoline(n,list,"internal")
+ else
+ line.traced = true
+ end
+ local list = tonut(list)
+ local where = line.where
+ local head = where.head
+ local tail = where.tail
+ local blob = new_hlist(list)
+ local delta = 0
+ if option == "internal" then
+ if line.reverse then
+ delta = line.shift - line.leftskip - (line.hsize - line.width)
+ else
+ delta = line.shift + line.leftskip
+ end
+ end
+ -- always kerns, also when 0 so that we can adapt but we can optimize if needed
+ -- by keeping a hash as long as we use the shiftinline helper .. no need to
+ -- optimize now .. we can also decide to put each blob in a hlist
+ local kern = new_kern(delta)
+ if tail then
+ head, tail = insert_after(head,tail,kern)
+ else
+ head, tail = kern, kern
+ setlist(where.pack,head)
+ end
+ head, tail = insert_after(head,tail,blob)
+ local kern = new_kern(-delta)
+ head, tail = insert_after(head,tail,kern)
+ --
+ where.head = head
+ where.tail = tail
+ return line, blob
+ else
+ -- report("unknown anchor")
+ end
+end
+
+local function addanchortoline(n,anchor)
+ local line = type(n) ~= "table" and getprop(n,"line") or n
+ if not line then
+ line = normalize(n,true)
+ end
+ if line then
+ local anchor = tonut(anchor)
+ local where = line.where
+ if trace_anchors then
+ local rule1 = new_rule(65536/2,4*65536,4*65536)
+ local rule2 = new_rule(8*65536,65536/4,65536/4)
+ local kern1 = new_kern(-65536/4)
+ local kern2 = new_kern(-65536/4-4*65536)
+ anchor = new_hlist(nuts.link { anchor, kern1, rule1, kern2, rule2 })
+ setfield(anchor,"width",0)
+ end
+ if where.tail then
+ local head = where.head
+ insert_before(head,head,anchor)
+ else
+ where.tail = anchor
+ end
+ setlist(where.pack,anchor)
+ where.head = anchor
+ return line
+ end
+end
+
+paragraphs.addtoline = addtoline
+paragraphs.addanchortoline = addanchortoline
+
+function paragraphs.moveinline(n,blob,dx,dy)
+ if not blob then
+ return
+ end
+ if not dx then
+ dx = 0
+ end
+ if not dy then
+ dy = 0
+ end
+ if dx ~= 0 or dy ~= 0 then
+ local line = type(n) ~= "table" and getprop(n,"line") or n
+ if line then
+ if dx ~= 0 then
+ local prev, next = getboth(blob)
+ if prev and getid(prev) == kern_code then
+ setfield(prev,"kern",getfield(prev,"kern") + dx)
+ end
+ if next and getid(next) == kern_code then
+ setfield(next,"kern",getfield(next,"kern") - dx)
+ end
+ end
+ if dy ~= 0 then
+ if getid(blob) == hlist_code then
+ setfield(blob,"shift",getfield(blob,"shift") + dy)
+ end
+ end
+ else
+-- report("no line")
+ end
+ end
+end
+
+local f_anchor = formatters["_plib_.set('md:h',%i,{x=true,c=true})"]
+local s_anchor = 'md:h'
+
+local function setanchor(h_anchor)
+ return new_latelua(f_anchor(h_anchor))
+end
+
+-- local t_anchor = { x = true, c = true }
+--
+-- local function setanchor(h_anchor)
+-- return lateluafunction(function() setposition("md:h",h_anchor,t_anchor) end)
+-- end
+
+function paragraphs.calculatedelta(n,width,delta,atleft,islocal,followshape,area)
+ local line = type(n) ~= "table" and getprop(n,"line") or n
+ if not line then
+ line = normalize(n,true)
+ end
+ local hmove = 0
+ if line then
+ local reverse = line.reverse
+ -- basic hsize based anchoring
+ if atleft then
+ if reverse then
+ -- delta = delta
+ else
+ delta = - delta - width
+ end
+ else
+ if reverse then
+ delta = - delta - width - line.hsize
+ else
+ delta = delta + line.hsize
+ end
+ end
+ if islocal then
+ -- relative to hsize with leftskip / rightskip compensation
+ if atleft then
+ if reverse then
+ delta = delta - line.leftskip
+ else
+ delta = delta + line.leftskip
+ end
+ else
+ if reverse then
+ delta = delta + line.rightskip
+ else
+ delta = delta - line.rightskip
+ end
+ end
+ if followshape then
+ -- shape compensation
+ if atleft then
+ if reverse then
+ delta = delta + line.shift - line.hsize + line.width
+ else
+ delta = delta + line.shift
+ end
+ else
+ if reverse then
+ delta = delta + line.shift + line.parfillskip
+ else
+ delta = delta + line.shift - line.hsize + line.width - line.parfillskip
+ end
+ end
+ end
+ end
+ if area then
+ local number = line.number
+ if not line.hanchor then
+ addanchortoline(line,setanchor(number))
+ line.hanchor = true
+ end
+ local blob = getposition(s_anchor,number)
+ if blob then
+ local reference = getreserved(area,blob.c)
+ if reference then
+ hmove = (reference.x or 0) - (blob.x or 0)
+ if atleft then
+ if reverse then
+ hmove = hmove + (reference.w or 0)
+ else
+ -- hmove = hmove
+ end
+ else
+ if reverse then
+ hmove = hmove + line.hsize
+ else
+ hmove = hmove + (reference.w or 0) - line.hsize
+ end
+ end
+ end
+ end
+ end
+ end
+ return delta, hmove
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-lin.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-lin.mkiv
new file mode 100644
index 00000000000..eba08b4c8ba
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-lin.mkiv
@@ -0,0 +1,25 @@
+%D \module
+%D [ file=typo-lin,
+%D version=2015.08.01,
+%D title=\CONTEXT\ Typographic Macros,
+%D subtitle=Line Normalization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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 Typographic Macros / Normalization}
+
+%D Beware: the mvl callback is also called when a line is added to a vbox.
+
+\registerctxluafile{typo-lin}{1.001}
+
+\unprotect
+
+% nothing yet / experimental
+
+\protect \endinput
+
diff --git a/Master/texmf-dist/tex/context/base/typo-man.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-man.lua
index 6c6d7926f37..6c6d7926f37 100644
--- a/Master/texmf-dist/tex/context/base/typo-man.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-man.lua
diff --git a/Master/texmf-dist/tex/context/base/typo-mar.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-mar.lua
index fed9e0745d6..cdb4d544cee 100644
--- a/Master/texmf-dist/tex/context/base/typo-mar.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-mar.lua
@@ -78,6 +78,7 @@ local insert, remove = table.insert, table.remove
local setmetatable, next = setmetatable, next
local formatters = string.formatters
local toboolean = toboolean
+local settings_to_hash = utilities.parsers.settings_to_hash
local attributes, nodes, node, variables = attributes, nodes, node, variables
@@ -115,8 +116,10 @@ local v_yes = variables.yes
local v_continue = variables.continue
local v_first = variables.first
local v_text = variables.text
+local v_paragraph = variables.paragraph
local v_column = variables.column
local v_line = variables.line
+local v_hanging = variables.hanging
local nuts = nodes.nuts
local nodepool = nuts.pool
@@ -125,7 +128,7 @@ local tonode = nuts.tonode
local tonut = nuts.tonut
local copy_node_list = nuts.copy_list
-local hpack_nodes = nuts.hpack -- nodes.fasthpack not really faster here
+local hpack_nodes = nuts.hpack
local traverse_id = nuts.traverse_id
local free_node_list = nuts.flush_list
local insert_node_after = nuts.insert_after
@@ -142,6 +145,7 @@ local setattr = nuts.setattr
local getsubtype = nuts.getsubtype
local getbox = nuts.getbox
local getlist = nuts.getlist
+local setlist = nuts.setlist
local nodecodes = nodes.nodecodes
local listcodes = nodes.listcodes
@@ -157,13 +161,8 @@ local whatsit_code = nodecodes.whatsit
local line_code = listcodes.line
local cell_code = listcodes.cell
local alignment_code = listcodes.alignment
-local leftskip_code = gluecodes.leftskip
-local rightskip_code = gluecodes.rightskip
local userdefined_code = whatsitcodes.userdefined
-local dir_code = whatsitcodes.dir
-local localpar_code = whatsitcodes.localpar
-
local nodepool = nuts.pool
local new_kern = nodepool.kern
@@ -179,7 +178,14 @@ local texget = tex.get
local isleftpage = layouts.status.isleftpage
local registertogether = builders.paragraphs.registertogether -- tonode
+local paragraphs = typesetters.paragraphs
+local addtoline = paragraphs.addtoline
+local moveinline = paragraphs.moveinline
+local calculatedelta = paragraphs.calculatedelta
+
local a_margindata = attributes.private("margindata")
+local a_specialcontent = attributes.private("specialcontent")
+local a_linenumber = attributes.private('linenumber')
local inline_mark = nodepool.userids["margins.inline"]
@@ -242,6 +248,7 @@ local defaults = {
inline = false,
leftskip = 0,
rightskip = 0,
+ option = { }
}
}
@@ -261,10 +268,17 @@ end
function margins.save(t)
setmetatable(t,defaults)
local content = getbox(t.number)
+setattr(content,a_specialcontent,1) -- todo: a property
local location = t.location
local category = t.category
local inline = t.inline
- local scope = t.scope or v_global
+ local scope = t.scope
+ local name = t.name
+ local option = t.option
+ if option then
+ option = settings_to_hash(option)
+ t.option = option
+ end
if not content then
report_margindata("ignoring empty margin data %a",location or "unknown")
return
@@ -292,9 +306,8 @@ function margins.save(t)
elseif enableglobal and scope == v_global then
enableglobal()
end
- nofsaved = nofsaved + 1
+ nofsaved = nofsaved + 1
nofstored = nofstored + 1
- local name = t.name
if trace_marginstack then
showstore(store,"before",location)
end
@@ -321,18 +334,20 @@ function margins.save(t)
end
end
if t.number then
+ local leftmargindistance = texgetdimen("naturalleftmargindistance")
+ local rightmargindistance = texgetdimen("naturalrightmargindistance")
+ local strutbox = getbox("strutbox")
-- better make a new table and make t entry in t
t.box = copy_node_list(content)
t.n = nofsaved
-- used later (we will clean up this natural mess later)
-- nice is to make a special status table mechanism
- local leftmargindistance = texgetdimen("naturalleftmargindistance")
- local rightmargindistance = texgetdimen("naturalrightmargindistance")
- local strutbox = getbox("strutbox")
t.strutdepth = getfield(strutbox,"depth")
t.strutheight = getfield(strutbox,"height")
+ -- beware: can be different from the applied one
t.leftskip = getfield(texget("leftskip"),"width") -- we're not in forgetall
t.rightskip = getfield(texget("rightskip"),"width") -- we're not in forgetall
+ --
t.leftmargindistance = leftmargindistance -- todo:layoutstatus table
t.rightmargindistance = rightmargindistance
t.leftedgedistance = texgetdimen("naturalleftedgedistance")
@@ -370,11 +385,12 @@ end
local status, nofstatus = { }, 0
-local f_anchor = formatters["_plib_.set('md:h',%i,{x=true,c=true})"]
-
-local function setanchor(h_anchor)
- return new_latelua(f_anchor(h_anchor))
-end
+-- local f_anchor = formatters["_plib_.set('md:h',%i,{x=true,c=true})"]
+-- local s_anchor = 'md:h'
+--
+-- local function setanchor(h_anchor)
+-- return new_latelua(f_anchor(h_anchor))
+-- end
-- local t_anchor = { x = true, c = true }
--
@@ -390,13 +406,25 @@ local function realign(current,candidate)
local hsize = candidate.hsize
local width = candidate.width
local align = candidate.align
+ local inline = candidate.inline
+ local anchor = candidate.anchor
+ local hook = candidate.hook
+ local scope = candidate.scope
+ local option = candidate.option
+ local reverse = hook.reverse
+ local atleft = true
+ local hmove = 0
+ local delta = 0
-- local realpageno = candidate.realpageno
local leftpage = isleftpage(false,true)
- local delta = 0
local leftdelta = 0
local rightdelta = 0
local leftdistance = distance
local rightdistance = distance
+ --
+ if not anchor or anchor == "" then
+ anchor = v_text -- this has to become more clever: region:0|column:n|column
+ end
if margin == v_normal then
--
elseif margin == v_local then
@@ -412,73 +440,48 @@ local function realign(current,candidate)
if leftpage then
leftdistance, rightdistance = rightdistance, leftdistance
end
-
- if location == v_left then
- delta = hoffset + width + leftdistance + leftdelta
- elseif location == v_right then
- delta = -hoffset - hsize - rightdistance + rightdelta
+ if location == v_right then
+ atleft = false
elseif location == v_inner then
if leftpage then
- delta = -hoffset - hsize - rightdistance + rightdelta
- else
- delta = hoffset + width + leftdistance + leftdelta
+ atleft = false
end
elseif location == v_outer then
- if leftpage then
- delta = hoffset + width + leftdistance + leftdelta
- else
- delta = -hoffset - hsize - rightdistance + rightdelta
+ if not leftpage then
+ atleft = false
end
end
- -- we assume that list is a hbox, otherwise we had to take the whole current
- -- in order to get it right
-
- setfield(current,"width",0)
- local anchornode, move_x
-
- -- this mess is needed for alignments (combinations) so we use that
- -- oportunity to add arbitrary anchoring
+ local islocal = scope == v_local
+ local area = (not islocal or option[v_text]) and anchor or nil
- -- always increment anchor is nicer for multipass when we add new ..
-
- local inline = candidate.inline
- local anchor = candidate.anchor
- if not anchor or anchor == "" then
- anchor = v_text
- end
- if inline or anchor ~= v_text or candidate.psubtype == alignment_code then
- -- the alignment_code check catches margintexts before a tabulate
- h_anchors = h_anchors + 1
- anchornode = setanchor(h_anchors)
- local blob = getposition('md:h',h_anchors)
- if blob then
- local reference = getreserved(anchor,blob.c)
- if reference then
- if location == v_left then
- move_x = (reference.x or 0) - (blob.x or 0)
- elseif location == v_right then
- move_x = (reference.x or 0) - (blob.x or 0) + (reference.w or 0) - hsize
- else
- -- not yet done
- end
- end
- end
+ if atleft then
+ delta = hoffset + leftdelta + leftdistance
+ else
+ delta = hoffset + rightdelta + rightdistance
end
- if move_x then
- delta = delta - move_x
+ local delta, hmove = calculatedelta (
+ hook, -- the line
+ width, -- width of object
+ delta, -- offset
+ atleft,
+ islocal, -- islocal
+ option[v_paragraph], -- followshape
+ area -- relative to area
+ )
+
+ if hmove ~= 0 then
+ delta = delta + hmove
if trace_margindata then
- report_margindata("realigned %a, location %a, margin %a, move %p",candidate.n,location,margin,move_x)
+ report_margindata("realigned %a, location %a, margin %a, move %p",candidate.n,location,margin,hmove)
end
else
if trace_margindata then
report_margindata("realigned %a, location %a, margin %a",candidate.n,location,margin)
end
end
- local list = hpack_nodes(linked_nodes(anchornode,new_kern(-delta),getlist(current),new_kern(delta)))
- setfield(current,"list",list)
- setfield(current,"width",0)
+ moveinline(hook,candidate.node,delta)
end
local function realigned(current,a)
@@ -519,6 +522,7 @@ end
margins.ha = ha
local f_anchor = formatters["typesetters.margins.ha(%s)"]
+
local function setanchor(v_anchor)
return new_latelua(f_anchor(v_anchor))
end
@@ -531,8 +535,11 @@ local function markovershoot(current) -- todo: alleen als offset > line
v_anchors = v_anchors + 1
cache[v_anchors] = stacked
local anchor = setanchor(v_anchors)
- local list = hpack_nodes(linked_nodes(anchor,getlist(current)))
- setfield(current,"list",list)
+ -- local list = hpack_nodes(linked_nodes(anchor,getlist(current))) -- not ok, we need to retain width
+ local list = hpack_nodes(linked_nodes(anchor,getlist(current)),getfield(current,"width"),"exactly")--
+ -- why not:
+ -- local list = linked_nodes(anchor,getlist(current))
+ setlist(current,list)
end
local function getovershoot(location)
@@ -583,11 +590,6 @@ local function inject(parent,head,candidate)
--
if baseline == true then
baseline = false
- -- hbox vtop
---~ for h in traverse_id(hlist_code,box.list.list) do
---~ baseline = h.height
---~ break
---~ end
else
baseline = tonumber(baseline)
if not baseline or baseline <= 0 then
@@ -604,7 +606,7 @@ local function inject(parent,head,candidate)
if firstonstack then
offset = 0
else
--- offset = offset + height
+ -- offset = offset + height
end
if stack == v_yes then
offset = offset + candidate.dy -- always
@@ -678,20 +680,9 @@ local function inject(parent,head,candidate)
end
setfield(box,"shift",shift)
setfield(box,"width",0)
- if not head then
- head = box
- elseif getid(head) == whatsit_code and getsubtype(head) == localpar_code then
- -- experimental
- if getfield(head,"dir") == "TRT" then
- local list = hpack_nodes(linked_nodes(new_kern(candidate.hsize),getlist(box),new_kern(-candidate.hsize)))
- setfield(box,"list",list)
- end
- insert_node_after(head,head,box)
- else
- setfield(head,"prev",box)
- setfield(box,"next",head)
- head = box
- end
+ --
+ candidate.hook, candidate.node = addtoline(parent,box)
+ --
setattr(box,a_margindata,nofstatus)
if trace_margindata then
report_margindata("injected, location %a, shift %p",location,shift)
@@ -710,7 +701,7 @@ local function inject(parent,head,candidate)
if trace_margindata then
report_margindata("status, offset %s",offset)
end
- return head, room, stack == v_continue
+ return getlist(parent), room, stack == v_continue
end
local function flushinline(parent,head)
@@ -736,7 +727,7 @@ local function flushinline(parent,head)
elseif id == hlist_code or id == vlist_code then
-- optional (but sometimes needed)
list, don, con = flushinline(current,getlist(current))
- setfield(current,"list",list)
+ setlist(current,list)
continue = continue or con
done = done or don
end
@@ -745,8 +736,6 @@ local function flushinline(parent,head)
return head, done, continue
end
-local a_linenumber = attributes.private('linenumber')
-
local function flushed(scope,parent) -- current is hlist
local head = getlist(parent)
local done = false
@@ -779,7 +768,7 @@ local function flushed(scope,parent) -- current is hlist
end
if nofinlined > 0 then
if done then
- setfield(parent,"list",head)
+ setlist(parent,head)
end
head, don, con = flushinline(parent,head)
continue = continue or con
@@ -787,10 +776,18 @@ local function flushed(scope,parent) -- current is hlist
end
if done then
local a = getattr(head,a_linenumber) -- hack .. we need a more decent critical attribute inheritance mechanism
- local l = hpack_nodes(head,getfield(parent,"width"),"exactly")
- setfield(parent,"list",l)
- if a then
- setattr(l,a_linenumber,a)
+ if false then
+ local l = hpack_nodes(head,getfield(parent,"width"),"exactly")
+ setlist(parent,l)
+ if a then
+ setattr(l,a_linenumber,a)
+ end
+ else
+ -- because packing messes up profiling
+ setlist(parent,head)
+ if a then
+ setattr(parent,a_linenumber,a)
+ end
end
-- resetstacked()
end
@@ -813,6 +810,7 @@ local function handler(scope,head,group)
if (id == vlist_code or id == hlist_code) and not getattr(current,a_margindata) then
local don, continue = flushed(scope,current)
if don then
+ done = true
setattr(current,a_margindata,0) -- signal to prevent duplicate processing
if continue then
markovershoot(current)
@@ -820,11 +818,17 @@ local function handler(scope,head,group)
if nofstored <= 0 then
break
end
- done = true
end
end
current = getnext(current)
end
+ if trace_margindata then
+ if done then
+ report_margindata("flushing stage one, done, %s left",nofstored)
+ else
+ report_margindata("flushing stage one, nothing done, %s left",nofstored)
+ end
+ end
-- if done then
resetstacked() -- why doesn't done work ok here?
-- end
@@ -834,7 +838,14 @@ local function handler(scope,head,group)
end
end
+local trialtypesetting = context.trialtypesetting
+
function margins.localhandler(head,group) -- sometimes group is "" which is weird
+
+if trialtypesetting() then
+ return head, false
+end
+
local inhibit = conditionals.inhibitmargindata
if inhibit then
if trace_margingroup then
@@ -852,6 +863,11 @@ function margins.localhandler(head,group) -- sometimes group is "" which is weir
end
function margins.globalhandler(head,group) -- check group
+
+if trialtypesetting() then
+ return head, false
+end
+
local inhibit = conditionals.inhibitmargindata
if inhibit or nofstored == 0 then
if trace_margingroup then
@@ -880,9 +896,9 @@ local function finalhandler(head)
if nofdelayed > 0 then
local current = head
local done = false
- while current do
+ while current and nofdelayed > 0 do
local id = getid(current)
- if id == hlist_code then
+ if id == hlist_code then -- only lines?
local a = getattr(current,a_margindata)
if not a or a == 0 then
finalhandler(getlist(current))
@@ -975,6 +991,7 @@ interfaces.implement {
-- { "leftskip", "dimen" },
-- { "rightskip", "dimen" },
{ "align" },
+ { "option" },
{ "line", "integer" },
{ "stack" },
}
diff --git a/Master/texmf-dist/tex/context/base/typo-mar.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-mar.mkiv
index d5869b45998..90ccd46e2f0 100644
--- a/Master/texmf-dist/tex/context/base/typo-mar.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-mar.mkiv
@@ -13,6 +13,8 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% maybe dontleavehmode when scope is local
+
% todo: tags
% todo: force inline with option (saves pos)
% todo: margintitle (also less position then)
@@ -120,6 +122,7 @@
\c!scope=\v!global,
\c!width=,
% \c!stack=,
+ % \c!option=, % \v!paragraph (follow shape)
\c!line=0,
\c!anchor=\v!text,
\c!bottomspace=\strutdepth, % slack used for keeptogether
@@ -190,6 +193,10 @@
\unexpanded\def\typo_margins_data_nop_indeed[#dataparameters][#textparameters]#content%
{}
+% todo: naturalhbox
+
+\let\margindatahbox\naturalhbox % \hbox
+
\unexpanded\def\typo_margins_data_yes_indeed[#dataparameters][#textparameters]#content%
{\iffirstargument
\setupcurrentmargindata[#dataparameters]%
@@ -203,7 +210,7 @@
\edef\currentmargindatastrut{\margindataparameter\c!strut}%
\dostarttaggedchained\t!margintext\currentmargindata\??margindata
\ifcsname\currentmarginframedhash\s!parent\endcsname
- \setbox\nextbox\hbox \currentmarginreference \bgroup
+ \setbox\nextbox\margindatahbox \currentmarginreference \bgroup
\the\everymargindatacontent
\usemargindatastyleandcolor\c!style\c!color
\setupcurrentmarginframed[\c!location=\v!normal,#textparameters]%
@@ -222,7 +229,7 @@
\else
\edef\currentmargindatawidth{\margindataparameter\c!width}%
\ifx\currentmargindatawidth\empty
- \setbox\nextbox\hbox \currentmarginreference \bgroup
+ \setbox\nextbox\margindatahbox \currentmarginreference \bgroup
\typo_margins_data_synchronize
\the\everymargindatacontent
\usemargindatastyleandcolor\c!style\c!color
@@ -236,7 +243,7 @@
\egroup
\let\currentmarginfirstheight\empty
\else
- \setbox\nextbox\hbox \currentmarginreference \bgroup
+ \setbox\nextbox\margindatahbox \currentmarginreference \bgroup
\typo_margins_data_synchronize
\dosetraggedcommand{\margindataparameter\c!align}%
\vtop \bgroup
@@ -259,6 +266,7 @@
\dostoptagged
\fi
\ifdone
+ \edef\p_anchor{\margindataparameter\c!anchor}%
\anch_positions_initialize % we use positions at the lua end
\clf_savemargindata
location {\margindataparameter\c!location}%
@@ -266,6 +274,7 @@
category {\margindataparameter\c!category}%
name {\margindataparameter\c!name}%
scope {\margindataparameter\c!scope}%
+ option {\margindataparameter\c!option}%
number \nextbox
margin {\margindataparameter\c!margin}% local normal margin edge
distance \dimexpr\margindataparameter\c!distance\relax
@@ -280,7 +289,7 @@
\ifhmode
inline true %
\fi
- anchor {\margindataparameter\c!anchor}%
+ anchor {\p_anchor\ifx\p_anchor\v!region:0\fi}% kind of a hack to force column anchoring (for now)
%
% we're not in forgetall
%
@@ -339,44 +348,44 @@
% lines
-\definemargindata [inleftmargin] [\v!left ] [\c!margin=\v!margin,\c!width=\leftmarginwidth ,\c!style=,\c!color=]
-\definemargindata [inrightmargin] [\v!right] [\c!margin=\v!margin,\c!width=\rightmarginwidth,\c!style=,\c!color=]
-\definemargindata [inoutermargin] [\v!outer] [\c!margin=\v!margin,\c!width=\outermarginwidth,\c!style=,\c!color=]
-\definemargindata [ininnermargin] [\v!inner] [\c!margin=\v!margin,\c!width=\innermarginwidth,\c!style=,\c!color=]
+\definemargindata [\v!inleftmargin] [\v!left ] [\c!margin=\v!margin,\c!width=\leftmarginwidth ,\c!style=,\c!color=]
+\definemargindata [\v!inrightmargin] [\v!right] [\c!margin=\v!margin,\c!width=\rightmarginwidth,\c!style=,\c!color=]
+\definemargindata [\v!inoutermargin] [\v!outer] [\c!margin=\v!margin,\c!width=\outermarginwidth,\c!style=,\c!color=]
+\definemargindata [\v!ininnermargin] [\v!inner] [\c!margin=\v!margin,\c!width=\innermarginwidth,\c!style=,\c!color=]
-\definemargindata [inleftedge] [\v!left ] [\c!margin=\v!edge ,\c!width=\leftedgewidth ,\c!style=,\c!color=,\c!category=\v!edge]
-\definemargindata [inrightedge] [\v!right] [\c!margin=\v!edge ,\c!width=\rightedgewidth ,\c!style=,\c!color=,\c!category=\v!edge]
-\definemargindata [inouteredge] [\v!outer] [\c!margin=\v!edge ,\c!width=\outeredgewidth ,\c!style=,\c!color=,\c!category=\v!edge]
-\definemargindata [ininneredge] [\v!inner] [\c!margin=\v!edge ,\c!width=\inneredgewidth ,\c!style=,\c!color=,\c!category=\v!edge]
+\definemargindata [\v!inleftedge] [\v!left ] [\c!margin=\v!edge ,\c!width=\leftedgewidth ,\c!style=,\c!color=,\c!category=\v!edge]
+\definemargindata [\v!inrightedge] [\v!right] [\c!margin=\v!edge ,\c!width=\rightedgewidth ,\c!style=,\c!color=,\c!category=\v!edge]
+\definemargindata [\v!inouteredge] [\v!outer] [\c!margin=\v!edge ,\c!width=\outeredgewidth ,\c!style=,\c!color=,\c!category=\v!edge]
+\definemargindata [\v!ininneredge] [\v!inner] [\c!margin=\v!edge ,\c!width=\inneredgewidth ,\c!style=,\c!color=,\c!category=\v!edge]
-\definemargindata [atleftmargin] [\v!left ] [\c!margin=\v!normal,\c!width=\leftmarginwidth ,\c!style=,\c!color=]
-\definemargindata [atrightmargin] [\v!right] [\c!margin=\v!normal,\c!width=\rightmarginwidth,\c!style=,\c!color=]
+\definemargindata [\v!atleftmargin] [\v!left ] [\c!margin=\v!normal,\c!width=\leftmarginwidth ,\c!style=,\c!color=]
+\definemargindata [\v!atrightmargin] [\v!right] [\c!margin=\v!normal,\c!width=\rightmarginwidth,\c!style=,\c!color=]
-% text
+% text: \v!added
-\definemargindata [inleft] [\v!left ] [\c!margin=\v!margin,\c!width=\leftmarginwidth ,\c!align=\v!flushright]
-\definemargindata [inright] [\v!right] [\c!margin=\v!margin,\c!width=\rightmarginwidth,\c!align=\v!flushleft]
-\definemargindata [inouter] [\v!outer] [\c!margin=\v!margin,\c!width=\outermarginwidth,\c!align=\v!inner]
-\definemargindata [ininner] [\v!inner] [\c!margin=\v!margin,\c!width=\innermarginwidth,\c!align=\v!outer]
+\definemargindata [\v!inleft] [\v!left ] [\c!margin=\v!margin,\c!width=\leftmarginwidth ,\c!align=\v!flushright]
+\definemargindata [\v!inright] [\v!right] [\c!margin=\v!margin,\c!width=\rightmarginwidth,\c!align=\v!flushleft]
+\definemargindata [\v!inouter] [\v!outer] [\c!margin=\v!margin,\c!width=\outermarginwidth,\c!align=\v!inner]
+\definemargindata [\v!ininner] [\v!inner] [\c!margin=\v!margin,\c!width=\innermarginwidth,\c!align=\v!outer]
% no longer auto auto-other
-\definemargindata [inmargin] [\v!left] [\c!margin=\v!margin,\c!width=\leftmarginwidth, \c!align=\v!flushright]
-\definemargindata [inother] [\v!right] [\c!margin=\v!margin,\c!width=\rightmarginwidth,\c!align=\v!flushleft]
+\definemargindata [\v!inmargin] [\v!left] [\c!margin=\v!margin,\c!width=\leftmarginwidth, \c!align=\v!flushright]
+\definemargindata [\v!inother] [\v!right] [\c!margin=\v!margin,\c!width=\rightmarginwidth,\c!align=\v!flushleft]
-\definemargindata [margintext] [\v!left] [\c!margin=\v!margin,\c!width=\leftmarginwidth, \c!align=\v!flushright,\c!stack=\v!yes]
+\definemargindata [\v!margintext] [\v!left] [\c!margin=\v!margin,\c!width=\leftmarginwidth, \c!align=\v!flushright,\c!stack=\v!yes]
\setupmarginframed [\v!left ] [\c!method=\v!first,\c!align=\v!flushright,\s!parent=\??marginframed] % we could autoparent when no define yet
\setupmarginframed [\v!right] [\c!method=\v!first,\c!align=\v!flushleft, \s!parent=\??marginframed]
\setupmarginframed [\v!outer] [\c!method=\v!first,\c!align=\v!inner, \s!parent=\??marginframed]
\setupmarginframed [\v!inner] [\c!method=\v!first,\c!align=\v!outer, \s!parent=\??marginframed]
-\definemarginframed [inleft] [\v!left ]
-\definemarginframed [inright] [\v!right]
-\definemarginframed [inouter] [\v!outer]
-\definemarginframed [ininner] [\v!inner]
-\definemarginframed [inmargin] [\v!inleft]
-\definemarginframed [inother] [\v!inright]
+\definemarginframed [\v!inleft] [\v!left ]
+\definemarginframed [\v!inright] [\v!right]
+\definemarginframed [\v!inouter] [\v!outer]
+\definemarginframed [\v!ininner] [\v!inner]
+\definemarginframed [\v!inmargin] [\v!inleft]
+\definemarginframed [\v!inother] [\v!inright]
\let\marginword \margintext
\let\margintitle \margintext
diff --git a/Master/texmf-dist/tex/context/base/typo-pag.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-pag.lua
index 53f79fcfc69..355becff667 100644
--- a/Master/texmf-dist/tex/context/base/typo-pag.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-pag.lua
@@ -49,7 +49,7 @@ local enabled = false
trackers.register("parbuilders.keeptogether", function(v) trace_keeptogether = v end)
-- todo: also support lines = 3 etc (e.g. dropped caps) but how to set that
--- when no hlists are there ? ... maybe the local_par
+-- when no hlists are there ?
function parbuilders.registertogether(line,specification) -- might change
if not specification then
@@ -133,7 +133,7 @@ local function keeptogether(start,a)
end
elseif id == glue_code then
-- hm, breakpoint, maybe turn this into kern
- total = total + getfield(getfield(current,"spec"),"width")
+ total = total + getfield(current,"width")
if trace_keeptogether then
report_keeptogether("%s, index %s, total %p, threshold %p","glue",a,total,threshold)
end
diff --git a/Master/texmf-dist/tex/context/base/typo-pag.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-pag.mkiv
index 30d2b51b73d..30d2b51b73d 100644
--- a/Master/texmf-dist/tex/context/base/typo-pag.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-pag.mkiv
diff --git a/Master/texmf-dist/tex/context/base/typo-par.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-par.mkiv
index 8572f31b83b..8572f31b83b 100644
--- a/Master/texmf-dist/tex/context/base/typo-par.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-par.mkiv
diff --git a/Master/texmf-dist/tex/context/base/typo-prc.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-prc.lua
index cde66df0087..cde66df0087 100644
--- a/Master/texmf-dist/tex/context/base/typo-prc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-prc.lua
diff --git a/Master/texmf-dist/tex/context/base/typo-prc.mkvi b/Master/texmf-dist/tex/context/base/mkiv/typo-prc.mkvi
index 49a16569647..49a16569647 100644
--- a/Master/texmf-dist/tex/context/base/typo-prc.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-prc.mkvi
diff --git a/Master/texmf-dist/tex/context/base/typo-rep.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-rep.lua
index d95eff68e0f..a8925a2ceab 100644
--- a/Master/texmf-dist/tex/context/base/typo-rep.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-rep.lua
@@ -26,7 +26,7 @@ local tonode = nuts.tonode
local getnext = nuts.getnext
local getchar = nuts.getchar
-local getid = nuts.getid
+local isglyph = nuts.isglyph
local getattr = nuts.getattr
@@ -89,11 +89,11 @@ function nodes.handlers.stripping(head)
head = tonut(head)
local current, done = head, false
while current do
- if getid(current) == glyph_code then
+ local char, id = isglyph(current)
+ if char then
-- it's more efficient to keep track of what needs to be kept
local todo = getattr(current,a_stripping)
if todo == 1 then
- local char = getchar(current)
local what = glyphs[char]
if what then
head, current = process(what,head,current,char)
diff --git a/Master/texmf-dist/tex/context/base/typo-rep.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-rep.mkiv
index c1146997e33..c1146997e33 100644
--- a/Master/texmf-dist/tex/context/base/typo-rep.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-rep.mkiv
diff --git a/Master/texmf-dist/tex/context/base/typo-scr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-scr.mkiv
index 6249c390a93..6249c390a93 100644
--- a/Master/texmf-dist/tex/context/base/typo-scr.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-scr.mkiv
diff --git a/Master/texmf-dist/tex/context/base/typo-spa.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-spa.lua
index 519ba3f34fb..f00e3ae6b39 100644
--- a/Master/texmf-dist/tex/context/base/typo-spa.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-spa.lua
@@ -32,11 +32,10 @@ local tonode = nuts.tonode
local getnext = nuts.getnext
local getprev = nuts.getprev
-local getchar = nuts.getchar
-local getid = nuts.getid
local getfont = nuts.getfont
local getattr = nuts.getattr
local setattr = nuts.setattr
+local isglyph = nuts.isglyph
local insert_node_before = nuts.insert_before
local insert_node_after = nuts.insert_after
@@ -84,13 +83,12 @@ function spacings.handler(head)
-- head is always begin of par (whatsit), so we have at least two prev nodes
-- penalty followed by glue
while start do
- local id = getid(start)
- if id == glyph_code then
+ local char, id = isglyph(start)
+ if char then
local attr = getattr(start,a_spacings)
if attr and attr > 0 then
local data = mapping[attr]
if data then
- local char = getchar(start)
local map = data.characters[char]
setattr(start,a_spacings,unsetvalue) -- needed?
if map then
diff --git a/Master/texmf-dist/tex/context/base/typo-spa.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-spa.mkiv
index 2e3e71bf3b3..2e3e71bf3b3 100644
--- a/Master/texmf-dist/tex/context/base/typo-spa.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-spa.mkiv
diff --git a/Master/texmf-dist/tex/context/base/typo-sus.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-sus.lua
index 0fe8e143adc..ce193333050 100644
--- a/Master/texmf-dist/tex/context/base/typo-sus.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-sus.lua
@@ -42,16 +42,17 @@ local tonut = nodes.tonut
local tonode = nodes.tonode
local getid = nuts.getid
-local getchar = nuts.getchar
local getprev = nuts.getprev
local getnext = nuts.getnext
local getfield = nuts.getfield
local getattr = nuts.getattr
local getfont = nuts.getfont
local getlist = nuts.getlist
+local isglyph = nuts.isglyph
local setfield = nuts.setfield
local setattr = nuts.setattr
+local setlist = nuts.setlist
local setcolor = nodes.tracers.colors.set
local insert_before = nuts.insert_before
@@ -82,7 +83,7 @@ local function special(n)
elseif id == penalty_code then
return true
elseif id == glue_code then
- local width = getfield(getfield(n,"spec"),"width")
+ local width = getfield(n,"width")
return width < threshold
elseif id == hlist_code then
local width = getfield(n,"width")
@@ -117,7 +118,7 @@ local function mark(head,current,id,color)
if id == glue_code then
-- the glue can have stretch and/or shrink so the rule can overlap with the
-- following glyph .. no big deal as that one then sits on top of the rule
- local width = getfield(getfield(current,"spec"),"width")
+ local width = getfield(current,"width")
local rule = new_rule(width)
local kern = new_kern(-width)
head = insert_before(head,current,rule)
@@ -165,9 +166,8 @@ function typesetters.marksuspects(head)
local lastdone = nil
while current do
if getattr(current,a_suspecting) then
- local id = getid(current)
- if id == glyph_code then
- local char = getchar(current)
+ local char, id = isglyph(current)
+ if char then
local code = categories[char]
local done = false
if punctuation[code] then
@@ -275,7 +275,7 @@ local function showsuspects(head)
if list then
local l = showsuspects(list)
if l ~= list then
- setfield(current,"list",l)
+ setlist(current,l)
end
end
end
diff --git a/Master/texmf-dist/tex/context/base/typo-sus.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-sus.mkiv
index fe44e63277b..fe44e63277b 100644
--- a/Master/texmf-dist/tex/context/base/typo-sus.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-sus.mkiv
diff --git a/Master/texmf-dist/tex/context/base/typo-tal.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-tal.lua
index 5663c3bd995..a67cd0a4b47 100644
--- a/Master/texmf-dist/tex/context/base/typo-tal.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-tal.lua
@@ -42,10 +42,12 @@ local getid = nuts.getid
local getfont = nuts.getfont
local getchar = nuts.getchar
local getfield = nuts.getfield
-local setfield = nuts.setfield
-
local getattr = nuts.getattr
+local isglyph = nuts.isglyph
+
+local setfield = nuts.setfield
local setattr = nuts.setattr
+local setchar = nuts.setchar
local insert_node_before = nuts.insert_before
local insert_node_after = nuts.insert_after
@@ -53,9 +55,10 @@ local traverse_list_by_id = nuts.traverse_id
local dimensions_of_list = nuts.dimensions
local first_glyph = nuts.first_glyph
+local setglue = nuts.setglue
+
local nodepool = nuts.pool
local new_kern = nodepool.kern
-local new_gluespec = nodepool.gluespec
local tracers = nodes.tracers
local setcolor = tracers.colors.set
@@ -195,9 +198,8 @@ function characteralign.handler(originalhead,where)
-- we can think of constraints
if method == v_number then
while current do
- local id = getid(current)
- if id == glyph_code then
- local char = getchar(current)
+ local char, id = isglyph(current)
+ if char then
local font = getfont(current)
-- local unicode = unicodes[font][char]
local unicode = fontcharacters[font][char].unicode or char -- ignore tables
@@ -228,7 +230,7 @@ function characteralign.handler(originalhead,where)
setcolor(sign,"darkyellow")
end
else
- setfield(sign,"char",new)
+ setchar(sign,new)
if trace_split then
setcolor(sign,"darkmagenta")
end
@@ -259,9 +261,7 @@ function characteralign.handler(originalhead,where)
local prev = getprev(current)
if next and prev and getid(next) == glyph_code and getid(prev) == glyph_code then -- too much checking
local width = fontcharacters[getfont(b_start)][separator or period].width
- -- local spec = getfield(current,"spec")
- -- free_spec(spec)
- setfield(current,"spec",new_gluespec(width))
+ setglue(current,width)
setattr(current,a_character,punctuationspace)
if a_start then
a_stop = current
@@ -274,9 +274,8 @@ function characteralign.handler(originalhead,where)
end
else
while current do
- local id = getid(current)
- if id == glyph_code then
- local char = getchar(current)
+ local char, id = isglyph(current)
+ if char then
local font = getfont(current)
-- local unicode = unicodes[font][char]
local unicode = fontcharacters[font][char].unicode or char -- ignore tables
diff --git a/Master/texmf-dist/tex/context/base/typo-tal.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-tal.mkiv
index 570f1a1f56e..570f1a1f56e 100644
--- a/Master/texmf-dist/tex/context/base/typo-tal.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-tal.mkiv
diff --git a/Master/texmf-dist/tex/context/base/typo-txt.mkvi b/Master/texmf-dist/tex/context/base/mkiv/typo-txt.mkvi
index 7562fe70cd0..7562fe70cd0 100644
--- a/Master/texmf-dist/tex/context/base/typo-txt.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-txt.mkvi
diff --git a/Master/texmf-dist/tex/context/base/typo-wrp.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-wrp.lua
index 07639392ff7..394e15090db 100644
--- a/Master/texmf-dist/tex/context/base/typo-wrp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-wrp.lua
@@ -19,7 +19,7 @@ local nuts = nodes.nuts
local tonut = nodes.tonut
local tonode = nodes.tonode
-local findtail = nuts.tail
+local find_node_tail = nuts.tail
local getprev = nuts.getprev
local getid = nuts.getid
local getsubtype = nuts.getsubtype
@@ -60,7 +60,7 @@ end
function wrappers.handler(head)
local head = tonut(head)
if head then
- local tail = findtail(head)
+ local tail = find_node_tail(head)
local done = false
head, tail, done = remove_dangling_crlf(head,tail) -- will be action chain
end
diff --git a/Master/texmf-dist/tex/context/base/typo-wrp.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-wrp.mkiv
index 0538a966273..4b18785bd33 100644
--- a/Master/texmf-dist/tex/context/base/typo-wrp.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-wrp.mkiv
@@ -62,4 +62,8 @@
\let\spac_crlf_placeholder\empty
\to \everysetnostrut
+\appendtoks
+ \let\spac_crlf\space
+\to \everysimplifycommands
+
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/unic-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/unic-ini.lua
index 132c92efaab..132c92efaab 100644
--- a/Master/texmf-dist/tex/context/base/unic-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/unic-ini.lua
diff --git a/Master/texmf-dist/tex/context/base/unic-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/unic-ini.mkiv
index 13ad4bdb98f..13ad4bdb98f 100644
--- a/Master/texmf-dist/tex/context/base/unic-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/unic-ini.mkiv
diff --git a/Master/texmf-dist/tex/context/base/util-deb.lua b/Master/texmf-dist/tex/context/base/mkiv/util-deb.lua
index ee732b3b54c..ee732b3b54c 100644
--- a/Master/texmf-dist/tex/context/base/util-deb.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-deb.lua
diff --git a/Master/texmf-dist/tex/context/base/util-dim.lua b/Master/texmf-dist/tex/context/base/mkiv/util-dim.lua
index 2bdb870e7a4..2bdb870e7a4 100644
--- a/Master/texmf-dist/tex/context/base/util-dim.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-dim.lua
diff --git a/Master/texmf-dist/tex/context/base/util-env.lua b/Master/texmf-dist/tex/context/base/mkiv/util-env.lua
index b72226900a9..b72226900a9 100644
--- a/Master/texmf-dist/tex/context/base/util-env.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-env.lua
diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-fil.lua b/Master/texmf-dist/tex/context/base/mkiv/util-fil.lua
new file mode 100644
index 00000000000..28c92c7c3c3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-fil.lua
@@ -0,0 +1,167 @@
+if not modules then modules = { } end modules ['util-fil'] = {
+ version = 1.001,
+ comment = "companion to luat-lib.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local byte = string.byte
+local extract = bit32.extract
+
+-- Here are a few helpers (the starting point were old ones I used for parsing
+-- flac files). In Lua 5.3 we can probably do this better. Some code will move
+-- here.
+
+utilities = utilities or { }
+local files = { }
+utilities.files = files
+
+local zerobased = { }
+
+function files.open(filename,zb)
+ local f = io.open(filename,"rb")
+ if f then
+ zerobased[f] = zb or false
+ end
+ return f
+end
+
+function files.close(f)
+ zerobased[f] = nil
+ f:close()
+end
+
+function files.size(f)
+ return f:seek("end")
+end
+
+function files.setposition(f,n)
+ if zerobased[f] then
+ f:seek("set",n)
+ else
+ f:seek("set",n - 1)
+ end
+end
+
+function files.getposition(f)
+ if zerobased[f] then
+ return f:seek()
+ else
+ return f:seek() + 1
+ end
+end
+
+function files.look(f,n,chars)
+ local p = f:seek()
+ local s = f:read(n)
+ f:seek("set",p)
+ if chars then
+ return s
+ else
+ return byte(s,1,#s)
+ end
+end
+
+function files.skip(f,n)
+ if n == 1 then
+ f:read(n)
+ else
+ f:seek("set",f:seek()+n)
+ end
+end
+
+function files.readbyte(f)
+ return byte(f:read(1))
+end
+
+function files.readbytes(f,n)
+ return byte(f:read(n),1,n)
+end
+
+function files.readchar(f)
+ return f:read(1)
+end
+
+function files.readstring(f,n)
+ return f:read(n or 1)
+end
+
+function files.readinteger1(f) -- one byte
+ local n = byte(f:read(1))
+ if n >= 0x80 then
+ return n - 0xFF - 1
+ else
+ return n
+ end
+end
+
+files.readcardinal1 = files.readbyte -- one byte
+files.readcardinal = files.readcardinal1
+files.readinteger = files.readinteger1
+
+function files.readcardinal2(f)
+ local a, b = byte(f:read(2),1,2)
+ return 0x100 * a + b
+end
+
+function files.readinteger2(f)
+ local a, b = byte(f:read(2),1,2)
+ local n = 0x100 * a + b
+ if n >= 0x8000 then
+ return n - 0xFFFF - 1
+ else
+ return n
+ end
+end
+
+function files.readcardinal3(f)
+ local a, b, c = byte(f:read(3),1,3)
+ return 0x10000 * a + 0x100 * b + c
+end
+
+function files.readcardinal4(f)
+ local a, b, c, d = byte(f:read(4),1,4)
+ return 0x1000000 * a + 0x10000 * b + 0x100 * c + d
+end
+
+function files.readinteger4(f)
+ local a, b, c, d = byte(f:read(4),1,4)
+ local n = 0x1000000 * a + 0x10000 * b + 0x100 * c + d
+ if n >= 0x8000000 then
+ return n - 0xFFFFFFFF - 1
+ else
+ return n
+ end
+end
+
+function files.readfixed4(f)
+ local a, b, c, d = byte(f:read(4),1,4)
+ local n = 0x100 * a + b
+ if n >= 0x8000 then
+ return n - 0xFFFF - 1 + (0x100 * c + d)/0xFFFF
+ else
+ return n + (0x100 * c + d)/0xFFFF
+ end
+end
+
+function files.read2dot14(f)
+ local a, b = byte(f:read(2),1,2)
+ local n = 0x100 * a + b
+ local m = extract(n,0,30)
+ if n > 0x7FFF then
+ n = extract(n,30,2)
+ return m/0x4000 - 4
+ else
+ n = extract(n,30,2)
+ return n + m/0x4000
+ end
+end
+
+function files.skipshort(f,n)
+ f:read(2*(n or 1))
+end
+
+function files.skiplong(f,n)
+ f:read(4*(n or 1))
+end
diff --git a/Master/texmf-dist/tex/context/base/util-fmt.lua b/Master/texmf-dist/tex/context/base/mkiv/util-fmt.lua
index 371a5dfcece..371a5dfcece 100644
--- a/Master/texmf-dist/tex/context/base/util-fmt.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-fmt.lua
diff --git a/Master/texmf-dist/tex/context/base/util-jsn.lua b/Master/texmf-dist/tex/context/base/mkiv/util-jsn.lua
index bbe25d89df8..bbe25d89df8 100644
--- a/Master/texmf-dist/tex/context/base/util-jsn.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-jsn.lua
diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-lib-imp-gm.lua b/Master/texmf-dist/tex/context/base/mkiv/util-lib-imp-gm.lua
new file mode 100644
index 00000000000..4c5254721df
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-lib-imp-gm.lua
@@ -0,0 +1,69 @@
+if not modules then modules = { } end modules ['util-lib-imp-gm'] = {
+ version = 1.001,
+ comment = "a mkiv swiglib module",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+local graphicmagick = utilities.graphicmagick or { }
+utilities.graphicmagick = graphicmagick
+
+local report_gm = logs.reporter("swiglib gm")
+
+local gm = swiglib("gmwand.core")
+
+if gm then
+ report_gm("library loaded")
+ -- inspect(table.sortedkeys(gm))
+else
+ return
+end
+
+local nofruns = 0
+
+function graphicmagick.convert(specification)
+ --
+ nofruns = nofruns + 1
+ statistics.starttiming(graphicmagick)
+ --
+ local inputname = specification.inputname
+ if not inputname or inputname == "" then
+ report_gm("invalid run %s, no inputname specified",nofruns)
+ statistics.stoptiming(graphicmagick)
+ return false
+ end
+ local outputname = specification.outputname
+ if not outputname or outputname == "" then
+ outputname = file.replacesuffix(inputname,"pdf")
+ end
+ --
+ if not lfs.isfile(inputname) then
+ report_gm("invalid run %s, input file %a is not found",nofruns,inputname)
+ statistics.stoptiming(graphicmagick)
+ return false
+ end
+ --
+ report_gm("run %s, input file %a, outputfile %a",nofruns,inputname,outputname)
+ local magick_wand = gm.NewMagickWand()
+ gm.MagickReadImage(magick_wand,inputname)
+ gm.MagickWriteImage(magick_wand,outputname)
+ gm.DestroyMagickWand(magick_wand)
+ --
+ statistics.stoptiming(graphicmagick)
+end
+
+function graphicmagick.statistics(report)
+ local runtime = statistics.elapsedtime(graphicmagick)
+ if report then
+ report_gm("nofruns %s, runtime %s",nofruns,runtime)
+ else
+ return {
+ runtime = runtime,
+ nofruns = nofruns,
+ }
+ end
+end
+
+-- graphicmagick.convert { inputname = "t:/sources/hacker.jpg", outputname = "e:/tmp/hacker.png" }
+-- graphicmagick.statistics(true)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-lib-imp-gs.lua b/Master/texmf-dist/tex/context/base/mkiv/util-lib-imp-gs.lua
new file mode 100644
index 00000000000..8fd2dd45826
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-lib-imp-gs.lua
@@ -0,0 +1,212 @@
+if not modules then modules = { } end modules ['util-lib-imp-gs'] = {
+ version = 1.001,
+ comment = "a mkiv swiglib module",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+local insert = table.insert
+local formatters = string.formatters
+
+local ghostscript = utilities.ghostscript or { }
+utilities.ghostscript = ghostscript
+
+local report_gs = logs.reporter("swiglib gs")
+
+local gs = swiglib("gs.core")
+local helpers = swiglib("helpers.core")
+
+if gs then
+ report_gs("library loaded")
+ -- inspect(table.sortedkeys(gs))
+else
+ return
+end
+
+-- these could be generic helpers
+
+local function luatable_to_c_array(t)
+ local gsargv = helpers.new_char_p_array(#t)
+ for i=1,#t do
+ helpers.char_p_array_setitem(gsargv,i-1,t[i])
+ end
+ return gsargv
+end
+
+-- the more abstract interface
+
+local interface = { }
+ghostscript.interface = interface
+
+function interface.new()
+
+ local instance = helpers.new_void_p_p()
+ local result = gs.gsapi_new_instance(instance,nil)
+ local buffer = nil
+ local object = { }
+
+ local function reader(instance,str,len)
+ return 0
+ end
+
+ local function writer(instance,str,len)
+ if buffer then
+ str = buffer .. str
+ buffer = nil
+ end
+ if not string.find(str,"[\n\r]$") then
+ str, buffer = string.match(str,"(.-)([^\n\r]+)$")
+ end
+ local log = object.log
+ for s in string.gmatch(str,"[^\n\r]+") do
+ insert(log,s)
+ report_gs(s)
+ end
+ return len
+ end
+
+ if result < 0 then
+ return nil
+ else
+ local job = helpers.void_p_p_value(instance)
+ gs.gsapi_set_stdio_callback(job,reader,writer,writer) -- could be option
+ object.instance = instance
+ object.job = job
+ object.result = 0
+ object.log = { }
+ return object
+ end
+end
+
+function interface.dispose(run)
+ if run.job then
+ gs.gsapi_delete_instance(run.job)
+ run.job = nil
+ end
+ if run.instance then
+ helpers.delete_void_p_p(run.instance)
+ run.instance = nil
+ end
+end
+
+function interface.init(run,options)
+ if run.job then
+ if not options then
+ options = { "ps2pdf" }
+ else
+ insert(options,1,"ps2pdf") -- a dummy
+ end
+ run.log = { }
+ local ct = luatable_to_c_array(options)
+ local result = gs.gsapi_init_with_args(run.job,#options,ct)
+ helpers.delete_char_p_array(ct)
+ run.initresult = result
+ return result >= 0
+ end
+end
+
+function interface.exit(run)
+ if run.job then
+ local result = gs.gsapi_exit(run.job)
+ if run.initresult == 0 or run.initresult == gs.e_Quit then
+ run.result = result
+ end
+ run.exitresult = result
+ return run.result >= 0
+ end
+end
+
+function interface.process(run,options)
+ interface.init(run,options)
+ return interface.exit(run)
+end
+
+-- end of more abstract interface
+
+local nofruns = 0
+
+function ghostscript.convert(specification)
+ --
+ nofruns = nofruns + 1
+ statistics.starttiming(ghostscript)
+ --
+ local inputname = specification.inputname
+ if not inputname or inputname == "" then
+ report_gs("invalid run %s, no inputname specified",nofruns)
+ statistics.stoptiming(ghostscript)
+ return false
+ end
+ local outputname = specification.outputname
+ if not outputname or outputname == "" then
+ outputname = file.replacesuffix(inputname,"pdf")
+ end
+ --
+ if not lfs.isfile(inputname) then
+ report_gs("invalid run %s, input file %a is not found",nofruns,inputname)
+ statistics.stoptiming(ghostscript)
+ return false
+ end
+ --
+ local device = specification.device
+ if not device or device == "" then
+ device = "pdfwrite"
+ end
+ --
+ local code = specification.code
+ if not code or code == "" then
+ code = ".setpdfwrite"
+ end
+ --
+ local run = interface.new()
+ if gsinstance then
+ report_gs("invalid run %s, initialization error",nofruns)
+ statistics.stoptiming(ghostscript)
+ return false
+ end
+ --
+ local options = specification.options or { }
+ --
+ insert(options,"-dNOPAUSE")
+ insert(options,"-dBATCH")
+ insert(options,"-dSAFER")
+ insert(options,formatters["-sDEVICE=%s"](device))
+ insert(options,formatters["-sOutputFile=%s"](outputname))
+ insert(options,"-c")
+ insert(options,code)
+ insert(options,"-f")
+ insert(options,inputname)
+ --
+ report_gs("run %s, input file %a, outputfile %a",nofruns,inputname,outputname)
+ report_gs("")
+ local okay = interface.process(run,options)
+ report_gs("")
+ --
+ interface.dispose(run)
+ --
+ statistics.stoptiming(ghostscript)
+ if okay then
+ return outputname
+ else
+ report_gs("run %s quit with errors",nofruns)
+ return false
+ end
+end
+
+function ghostscript.statistics(report)
+ local runtime = statistics.elapsedtime(ghostscript)
+ if report then
+ report_gs("nofruns %s, runtime %s",nofruns,runtime)
+ else
+ return {
+ runtime = runtime,
+ nofruns = nofruns,
+ }
+ end
+end
+
+-- for i=1,100 do
+-- ghostscript.convert { inputname = "temp.eps" }
+-- ghostscript.convert { inputname = "t:/escrito/tiger.eps" }
+-- end
+-- ghostscript.statistics(true)
diff --git a/Master/texmf-dist/tex/context/base/util-lib.lua b/Master/texmf-dist/tex/context/base/mkiv/util-lib.lua
index 2601b2e5781..2601b2e5781 100644
--- a/Master/texmf-dist/tex/context/base/util-lib.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-lib.lua
diff --git a/Master/texmf-dist/tex/context/base/util-lua.lua b/Master/texmf-dist/tex/context/base/mkiv/util-lua.lua
index e1dcdc94d57..e1dcdc94d57 100644
--- a/Master/texmf-dist/tex/context/base/util-lua.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-lua.lua
diff --git a/Master/texmf-dist/tex/context/base/util-mrg.lua b/Master/texmf-dist/tex/context/base/mkiv/util-mrg.lua
index 690188ef879..690188ef879 100644
--- a/Master/texmf-dist/tex/context/base/util-mrg.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-mrg.lua
diff --git a/Master/texmf-dist/tex/context/base/util-pck.lua b/Master/texmf-dist/tex/context/base/mkiv/util-pck.lua
index 7be5e8f4244..83b85cd9486 100644
--- a/Master/texmf-dist/tex/context/base/util-pck.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-pck.lua
@@ -10,12 +10,12 @@ if not modules then modules = { } end modules ['util-pck'] = {
local next, tostring, type = next, tostring, type
local sort, concat = table.sort, table.concat
-local sortedhashkeys, sortedkeys = table.sortedhashkeys, table.sortedkeys
+local sortedhashkeys, sortedkeys, tohash = table.sortedhashkeys, table.sortedkeys, table.tohash
utilities = utilities or { }
utilities.packers = utilities.packers or { }
local packers = utilities.packers
-packers.version = 1.00
+packers.version = 1.01
local function hashed(t)
local s, ns = { }, 0
@@ -48,33 +48,33 @@ packers.simplehashed = simplehashed
-- but in the latest greatest versions (lua 5.2) we really need to sort the keys in order
-- not to get endless runs due to a difference in tuc files.
-local function pack(t,keys,hash,index)
+local function pack(t,keys,skip,hash,index)
if t then
- -- for k, v in next, t do
- -- local sk = sortedkeys(t)
- local sk = sortedhashkeys(t)
+ local sk = #t > 0 and sortedkeys(t) or sortedhashkeys(t)
for i=1,#sk do
local k = sk[i]
- local v = t[k]
- --
- if type(v) == "table" then
- pack(v,keys,hash,index)
- if keys[k] then
- local h = hashed(v)
- local i = hash[h]
- if not i then
- i = #index + 1
- index[i] = v
- hash[h] = i
+ if not skip or not skip[k] then
+ local v = t[k]
+ --
+ if type(v) == "table" then
+ pack(v,keys,skip,hash,index)
+ if keys[k] then
+ local h = hashed(v)
+ local i = hash[h]
+ if not i then
+ i = #index + 1
+ index[i] = v
+ hash[h] = i
+ end
+ t[k] = i
end
- t[k] = i
end
end
end
end
end
-local function unpack(t,keys,index)
+local function unpack(t,keys,skip,index)
if t then
for k, v in next, t do
if keys[k] and type(v) == "number" then
@@ -84,17 +84,18 @@ local function unpack(t,keys,index)
t[k] = v
end
end
- if type(v) == "table" then
- unpack(v,keys,index)
+ if type(v) == "table" and (not skip or not skip[k]) then
+ unpack(v,keys,skip,index)
end
end
end
end
-function packers.new(keys,version)
+function packers.new(keys,version,skip)
return {
version = version or packers.version,
- keys = table.tohash(keys),
+ keys = tohash(keys),
+ skip = tohash(skip),
hash = { },
index = { },
}
@@ -102,13 +103,14 @@ end
function packers.pack(t,p,shared)
if shared then
- pack(t,p.keys,p.hash,p.index)
+ pack(t,p.keys,p.skip,p.hash,p.index)
elseif not t.packer then
- pack(t,p.keys,p.hash,p.index)
+ pack(t,p.keys,p.skip,p.hash,p.index)
if #p.index > 0 then
t.packer = {
version = p.version or packers.version,
keys = p.keys,
+ skip = p.skip,
index = p.index,
}
end
@@ -120,13 +122,13 @@ end
function packers.unpack(t,p,shared)
if shared then
if p then
- unpack(t,p.keys,p.index)
+ unpack(t,p.keys,p.skip,p.index)
end
else
local tp = t.packer
if tp then
if tp.version == (p and p.version or packers.version) then
- unpack(t,tp.keys,tp.index)
+ unpack(t,tp.keys,tp.skip,tp.index)
else
return false
end
diff --git a/Master/texmf-dist/tex/context/base/util-prs.lua b/Master/texmf-dist/tex/context/base/mkiv/util-prs.lua
index a3c1c6f8f23..01138f1bbb3 100644
--- a/Master/texmf-dist/tex/context/base/util-prs.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-prs.lua
@@ -24,6 +24,8 @@ local sortedhash = table.sortedhash
local sortedkeys = table.sortedkeys
local tohash = table.tohash
+local hashes = { }
+utilities.parsers.hashes = hashes
-- we share some patterns
local digit = R("09")
@@ -315,10 +317,17 @@ end
local pattern = Cf(Ct("") * Cg(C((1-S(", "))^1) * S(", ")^0 * Cc(true))^1,rawset)
-function utilities.parsers.settings_to_set(str,t)
+function utilities.parsers.settings_to_set(str)
return str and lpegmatch(pattern,str) or { }
end
+hashes.settings_to_set = table.setmetatableindex(function(t,k) -- experiment, not public
+ local v = k and lpegmatch(pattern,k) or { }
+ t[k] = v
+ return v
+end)
+
+getmetatable(hashes.settings_to_set).__mode = "kv" -- could be an option (maybe sharing makes sense)
function parsers.simple_hash_to_string(h, separator)
local t, tn = { }, 0
diff --git a/Master/texmf-dist/tex/context/base/util-ran.lua b/Master/texmf-dist/tex/context/base/mkiv/util-ran.lua
index 50d0a7082ac..50d0a7082ac 100644
--- a/Master/texmf-dist/tex/context/base/util-ran.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-ran.lua
diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-sac.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sac.lua
new file mode 100644
index 00000000000..8a12e7cf06e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-sac.lua
@@ -0,0 +1,202 @@
+if not modules then modules = { } end modules ['util-sac'] = {
+ version = 1.001,
+ comment = "companion to luat-lib.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- experimental string access (some 3 times faster than file access when messing
+-- with bytes)
+
+local byte, sub = string.byte, string.sub
+local extract = bit32.extract
+
+utilities = utilities or { }
+local streams = { }
+utilities.streams = streams
+
+function streams.open(filename,zerobased)
+ local f = io.loaddata(filename)
+ return { f, 1, #f, zerobased or false }
+end
+
+function streams.close()
+ -- dummy
+end
+
+function streams.size(f)
+ return f and f[3] or 0
+end
+
+function streams.setposition(f,i)
+ if f[4] then
+ -- zerobased
+ if i <= 0 then
+ f[2] = 1
+ else
+ f[2] = i + 1
+ end
+ else
+ if i <= 1 then
+ f[2] = 1
+ else
+ f[2] = i
+ end
+ end
+end
+
+function streams.getposition(f)
+ if f[4] then
+ -- zerobased
+ return f[2] - 1
+ else
+ return f[2]
+ end
+end
+
+function streams.look(f,n,chars)
+ local b = f[2]
+ local e = b + n - 1
+ if chars then
+ return sub(f[1],b,e)
+ else
+ return byte(f[1],b,e)
+ end
+end
+
+function streams.skip(f,n)
+ f[2] = f[2] + n
+end
+
+function streams.readbyte(f)
+ local i = f[2]
+ f[2] = i + 1
+ return byte(f[1],i)
+end
+
+function streams.readbytes(f,n)
+ local i = f[2]
+ local j = i + n
+ f[2] = j
+ return byte(f[1],i,j-1)
+end
+
+function streams.skipbytes(f,n)
+ f[2] = f[2] + n
+end
+
+function streams.readchar(f)
+ local i = f[2]
+ f[2] = i + 1
+ return sub(f[1],i,i)
+end
+
+function streams.readstring(f,n)
+ local i = f[2]
+ local j = i + n
+ f[2] = j
+ return sub(f[1],i,j-1)
+end
+
+function streams.readinteger1(f) -- one byte
+ local i = f[2]
+ f[2] = i + 1
+ local n = byte(f[1],i)
+ if n >= 0x80 then
+ return n - 0xFF - 1
+ else
+ return n
+ end
+end
+
+streams.readcardinal1 = streams.readbyte -- one byte
+streams.readcardinal = streams.readcardinal1
+streams.readinteger = streams.readinteger1
+
+function streams.readcardinal2(f)
+ local i = f[2]
+ local j = i + 1
+ f[2] = j + 1
+ local a, b = byte(f[1],i,j)
+ return 0x100 * a + b
+end
+
+function streams.readinteger2(f)
+ local i = f[2]
+ local j = i + 1
+ f[2] = j + 1
+ local a, b = byte(f[1],i,j)
+ local n = 0x100 * a + b
+ if n >= 0x8000 then
+ return n - 0xFFFF - 1
+ else
+ return n
+ end
+end
+
+function streams.readcardinal3(f)
+ local i = f[2]
+ local j = i + 2
+ f[2] = j + 1
+ local a, b, c = byte(f[1],i,j)
+ return 0x10000 * a + 0x100 * b + c
+end
+
+function streams.readcardinal4(f)
+ local i = f[2]
+ local j = i + 3
+ f[2] = j + 1
+ local a, b, c, d = byte(f[1],i,j)
+ return 0x1000000 * a + 0x10000 * b + 0x100 * c + d
+end
+
+function streams.readinteger4(f)
+ local i = f[2]
+ local j = i + 3
+ f[2] = j + 1
+ local a, b, c, d = byte(f[1],i,j)
+ local n = 0x1000000 * a + 0x10000 * b + 0x100 * c + d
+ if n >= 0x8000000 then
+ return n - 0xFFFFFFFF - 1
+ else
+ return n
+ end
+end
+
+function streams.readfixed4(f)
+ local i = f[2]
+ local j = i + 3
+ f[2] = j + 1
+ local a, b, c, d = byte(f[1],i,j)
+ local n = 0x100 * a + b
+ if n >= 0x8000 then
+ return n - 0xFFFF - 1 + (0x100 * c + d)/0xFFFF
+ else
+ return n + (0x100 * c + d)/0xFFFF
+ end
+end
+
+function streams.read2dot14(f)
+ local i = f[2]
+ local j = i + 1
+ f[2] = j + 1
+ local a, b = byte(f[1],i,j)
+ local n = 0x100 * a + b
+ local m = extract(n,0,30)
+ if n > 0x7FFF then
+ n = extract(n,30,2)
+ return m/0x4000 - 4
+ else
+ n = extract(n,30,2)
+ return n + m/0x4000
+ end
+end
+
+function streams.skipshort(f,n)
+ f[2] = f[2] + 2*(n or 1)
+end
+
+function streams.skiplong(f,n)
+ f[2] = f[2] + 4*(n or 1)
+end
diff --git a/Master/texmf-dist/tex/context/base/util-sbx.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sbx.lua
index 260e8b3b5a7..260e8b3b5a7 100644
--- a/Master/texmf-dist/tex/context/base/util-sbx.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-sbx.lua
diff --git a/Master/texmf-dist/tex/context/base/util-sci.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sci.lua
index c3e24cd9d81..43d873b6377 100644
--- a/Master/texmf-dist/tex/context/base/util-sci.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-sci.lua
@@ -1,3 +1,11 @@
+if not modules then modules = { } end modules ['util-sci'] = {
+ version = 1.001,
+ comment = "companion to m-scite.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
local gsub, sub, find = string.gsub, string.sub, string.find
local concat = table.concat
local formatters = string.formatters
diff --git a/Master/texmf-dist/tex/context/base/util-seq.lua b/Master/texmf-dist/tex/context/base/mkiv/util-seq.lua
index 08fc4e95cb8..32fe5909624 100644
--- a/Master/texmf-dist/tex/context/base/util-seq.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-seq.lua
@@ -347,5 +347,6 @@ function sequencers.nodeprocessor(t,nofarguments) -- todo: handle 'kind' in plug
end
end
local processor = #calls > 0 and formatters[template_yes](concat(vars,"\n"),args,concat(calls,"\n")) or template_nop
+-- print(processor)
return processor
end
diff --git a/Master/texmf-dist/tex/context/base/util-soc.lua b/Master/texmf-dist/tex/context/base/mkiv/util-soc.lua
index 3a52ee86de3..3a52ee86de3 100644
--- a/Master/texmf-dist/tex/context/base/util-soc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-soc.lua
diff --git a/Master/texmf-dist/tex/context/base/util-sql-imp-client.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-client.lua
index e09dfde945a..9a0fbc29983 100644
--- a/Master/texmf-dist/tex/context/base/util-sql-imp-client.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-client.lua
@@ -24,6 +24,7 @@ local splitdata = helpers.splitdata
local replacetemplate = utilities.templates.replace
local serialize = sql.serialize
local deserialize = sql.deserialize
+local getserver = sql.getserver
-- Experiments with an p/action demonstrated that there is not much gain. We could do a runtime
-- capture but creating all the small tables is not faster and it doesn't work well anyway.
@@ -43,6 +44,7 @@ local entry = Cs((unescaped + (1-separator-newline))^0) -- C 10% faster t
local getfirst = Ct( entry * (separator * (entry+empty))^0) + newline
local skipfirst = (1-newline)^1 * newline
+local skipdashes = (P("-")+separator)^1 * newline
local getfirstline = C((1-newline)^0)
local cache = { }
@@ -105,7 +107,11 @@ local function splitdata(data) -- todo: hash on first line ... maybe move to cli
end
end
p = Cf(Ct("") * p,rawset) * newline^1
+if getserver() == "mssql" then
+ p = skipfirst * skipdashes * Ct(p^0)
+else
p = skipfirst * Ct(p^0)
+end
cache[first] = { parser = p, keys = keys }
local entries = lpegmatch(p,data)
return entries or { }, keys
@@ -121,9 +127,31 @@ end
helpers.splitdata = splitdata
helpers.getdata = getdata
-local function dataprepared(specification)
+local t_runner = {
+ mysql = [[mysql --batch --user="%username%" --password="%password%" --host="%host%" --port=%port% --database="%database%" --default-character-set=utf8 < "%queryfile%" > "%resultfile%"]],
+ mssql = [[sqlcmd -S %host% %?U: -U "%username%" ?% %?P: -P "%password%" ?% -I -W -w 65535 -s"]] .. "\t" .. [[" -m 1 -i "%queryfile%" -o "%resultfile%"]],
+}
+
+local t_preamble = {
+ mysql = [[
+SET GLOBAL SQL_MODE=ANSI_QUOTES;
+ ]],
+ mssql = [[
+:setvar SQLCMDERRORLEVEL 1
+SET QUOTED_IDENTIFIER ON;
+SET NOCOUNT ON;
+%?database: USE %database%; ?%
+ ]],
+}
+
+local function dataprepared(specification,client)
local query = preparetemplate(specification)
if query then
+ local preamble = t_preamble[getserver()] or t_preamble.mysql
+ if preamble then
+ preamble = replacetemplate(preamble,specification.variables,'sql')
+ query = preamble .. "\n" .. query
+ end
io.savedata(specification.queryfile,query)
os.remove(specification.resultfile)
if trace_queries then
@@ -137,7 +165,8 @@ local function dataprepared(specification)
end
end
-local function datafetched(specification,runner)
+local function datafetched(specification,client)
+ local runner = t_runner[getserver()] or t_runner.mysql
local command = replacetemplate(runner,specification)
if trace_sql then
local t = osclock()
@@ -191,11 +220,11 @@ local function execute(specification)
report_state("error in specification")
return
end
- if not dataprepared(specification) then
+ if not dataprepared(specification,methods.client) then
report_state("error in preparation")
return
end
- if not datafetched(specification,methods.client.runner) then
+ if not datafetched(specification,methods.client) then
report_state("error in fetching, query: %s",string.collapsespaces(io.loaddata(specification.queryfile)))
return
end
@@ -248,7 +277,6 @@ end
local celltemplate = "cells[%s]"
methods.client = {
- runner = [[mysql --batch --user="%username%" --password="%password%" --host="%host%" --port=%port% --database="%database%" --default-character-set=utf8 < "%queryfile%" > "%resultfile%"]],
execute = execute,
usesfiles = true,
wraptemplate = wraptemplate,
diff --git a/Master/texmf-dist/tex/context/base/util-sql-imp-library.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-library.lua
index 15754e26ab1..15754e26ab1 100644
--- a/Master/texmf-dist/tex/context/base/util-sql-imp-library.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-library.lua
diff --git a/Master/texmf-dist/tex/context/base/util-sql-imp-swiglib.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-swiglib.lua
index af7012392b6..af7012392b6 100644
--- a/Master/texmf-dist/tex/context/base/util-sql-imp-swiglib.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-sql-imp-swiglib.lua
diff --git a/Master/texmf-dist/tex/context/base/util-sql-loggers.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sql-loggers.lua
index ceb1ff75cfa..ceb1ff75cfa 100644
--- a/Master/texmf-dist/tex/context/base/util-sql-loggers.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-sql-loggers.lua
diff --git a/Master/texmf-dist/tex/context/base/util-sql-sessions.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sql-sessions.lua
index 76bb91962fa..76bb91962fa 100644
--- a/Master/texmf-dist/tex/context/base/util-sql-sessions.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-sql-sessions.lua
diff --git a/Master/texmf-dist/tex/context/base/util-sql-tickets.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sql-tickets.lua
index 5e958299deb..5e958299deb 100644
--- a/Master/texmf-dist/tex/context/base/util-sql-tickets.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-sql-tickets.lua
diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-sql-tracers.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sql-tracers.lua
new file mode 100644
index 00000000000..44e32d256c6
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-sql-tracers.lua
@@ -0,0 +1,71 @@
+if not modules then modules = { } end modules ['util-sql-tracers'] = {
+ version = 1.001,
+ comment = "companion to m-sql.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local sql = utilities.sql
+local tracers = { }
+sql.tracers = tracers
+
+sql.setmethod("swiglib")
+
+local gsub, lower = string.gsub, string.lower
+
+local t_names = {
+ mysql = [[SHOW TABLES FROM `%database%`]],
+ mssql = [[SELECT table_name FROM %database%.information_schema.tables;]],
+ mssql = [[SELECT "name" FROM "%database%"."sys"."databases" ORDER BY "name";]],
+ mssql = [[SELECT name FROM "%database%"."sys"."objects" WHERE "type" IN ('P', 'U', 'V', 'TR', 'FN', 'TF');]],
+}
+
+local t_fields = {
+ mysql = [[SHOW FIELDS FROM `%database%`.`%table%` ]],
+ mssql = [[SELECT column_name "field", data_type "type", column_default "default", is_nullable "null" FROM %database%.information_schema.columns WHERE table_name='%table%']],
+}
+
+function sql.tracers.gettables(presets)
+ local servertype = sql.getserver()
+
+ local results, keys = sql.execute {
+ presets = presets,
+ template = t_names[servertype],
+ variables = {
+ database = presets.database,
+ },
+ }
+
+ local key = keys and keys[1]
+ local tables = { }
+
+ if keys then
+ for i=1,#results do
+ local name = results[i][key]
+ local results, keys = sql.execute {
+ presets = presets,
+ template = t_fields[servertype],
+ variables = {
+ database = presets.database,
+ table = name
+ },
+ }
+ if #results > 0 then
+ for i=1,#results do
+ local result = table.loweredkeys(results[i])
+ -- ms cleanup
+ result.default = gsub(result.default,"^[%(']+(.-)[%)']+$","%1")
+ result.null = lower(result.null)
+ --
+ results[i] = result
+ end
+ tables[name] = results
+ else
+ -- a view
+ end
+ end
+ end
+
+ return tables
+end
diff --git a/Master/texmf-dist/tex/context/base/util-sql-users.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sql-users.lua
index a1f4339461c..a1f4339461c 100644
--- a/Master/texmf-dist/tex/context/base/util-sql-users.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-sql-users.lua
diff --git a/Master/texmf-dist/tex/context/base/util-sql.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sql.lua
index 1c1766edf93..84cbb1692bb 100644
--- a/Master/texmf-dist/tex/context/base/util-sql.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-sql.lua
@@ -283,6 +283,7 @@ helpers.preparetemplate = preparetemplate
-- -- -- we delay setting this -- -- --
local currentmethod
+local currentserver
local function firstexecute(...)
local execute = methods[currentmethod].execute
@@ -295,7 +296,20 @@ function sql.setmethod(method)
sql.execute = firstexecute
end
+function sql.setserver(server)
+ currentserver = server
+end
+
+function sql.getmethod()
+ return currentmethod
+end
+
+function sql.getserver()
+ return currentserver
+end
+
sql.setmethod("library")
+sql.setserver("mysql")
-- helper:
diff --git a/Master/texmf-dist/tex/context/base/util-sta.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sta.lua
index 27ab5a624b6..27ab5a624b6 100644
--- a/Master/texmf-dist/tex/context/base/util-sta.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-sta.lua
diff --git a/Master/texmf-dist/tex/context/base/util-sto.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sto.lua
index 8aafca425b8..d21267d7a8c 100644
--- a/Master/texmf-dist/tex/context/base/util-sto.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-sto.lua
@@ -113,22 +113,16 @@ local f_index = {
["number"] = f_number,
}
-local t_index = {
- ["empty"] = { __index = f_empty },
- ["self"] = { __index = f_self },
- ["table"] = { __index = f_table },
- ["number"] = { __index = f_number },
-}
-
function table.setmetatableindex(t,f)
if type(t) ~= "table" then
f, t = t, { }
end
local m = getmetatable(t)
+ local i = f_index[f] or f
if m then
- m.__index = f_index[f] or f
+ m.__index = i
else
- setmetatable(t,t_index[f] or { __index = f })
+ setmetatable(t,{ __index = i })
end
return t
end
@@ -137,19 +131,16 @@ local f_index = {
["ignore"] = f_ignore,
}
-local t_index = {
- ["ignore"] = { __newindex = f_ignore },
-}
-
function table.setmetatablenewindex(t,f)
if type(t) ~= "table" then
f, t = t, { }
end
local m = getmetatable(t)
+ local i = f_index[f] or f
if m then
- m.__newindex = f_index[f] or f
+ m.__newindex = i
else
- setmetatable(t,t_index[f] or { __newindex = f })
+ setmetatable(t,{ __newindex = i })
end
return t
end
diff --git a/Master/texmf-dist/tex/context/base/util-str.lua b/Master/texmf-dist/tex/context/base/mkiv/util-str.lua
index c2139b155c2..28b75dbc599 100644
--- a/Master/texmf-dist/tex/context/base/util-str.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-str.lua
@@ -6,7 +6,7 @@ if not modules then modules = { } end modules ['util-str'] = {
license = "see context related readme files"
}
-utilities = utilities or {}
+utilities = utilities or { }
utilities.strings = utilities.strings or { }
local strings = utilities.strings
@@ -354,7 +354,16 @@ function string.autosingle(s,sep)
return ("'" .. tostring(s) .. "'")
end
-local tracedchars = { }
+local tracedchars = { [0] =
+ -- the regular bunch
+ "[null]", "[soh]", "[stx]", "[etx]", "[eot]", "[enq]", "[ack]", "[bel]",
+ "[bs]", "[ht]", "[lf]", "[vt]", "[ff]", "[cr]", "[so]", "[si]",
+ "[dle]", "[dc1]", "[dc2]", "[dc3]", "[dc4]", "[nak]", "[syn]", "[etb]",
+ "[can]", "[em]", "[sub]", "[esc]", "[fs]", "[gs]", "[rs]", "[us]",
+ -- plus space
+ "[space]", -- 0x20
+}
+
string.tracedchars = tracedchars
strings.tracers = tracedchars
@@ -813,6 +822,8 @@ end
-- aA b cC d eE f gG hH iI jJ lL mM N o p qQ r sS tT uU wW xX z
+-- extensions : %!tag!
+
local builder = Cs { "start",
start = (
(
diff --git a/Master/texmf-dist/tex/context/base/util-tab.lua b/Master/texmf-dist/tex/context/base/mkiv/util-tab.lua
index 618f34ceef8..a6239adf409 100644
--- a/Master/texmf-dist/tex/context/base/util-tab.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-tab.lua
@@ -545,6 +545,7 @@ local f_val_str = formatters["%w%q,"]
local f_val_boo = formatters["%w%l,"]
local f_val_not = formatters["%w{},"]
local f_val_seq = formatters["%w{ %, t },"]
+local f_fin_seq = formatters[" %, t }"]
local f_table_return = formatters["return {"]
local f_table_name = formatters["%s={"]
@@ -556,20 +557,21 @@ local f_table_finish = formatters["}"]
local spaces = utilities.strings.newrepeater(" ")
-local serialize = table.serialize -- the extensive one, the one we started with
+local original_serialize = table.serialize -- the extensive one, the one we started with
-- there is still room for optimization: index run, key run, but i need to check with the
-- latest lua for the value of #n (with holes) .. anyway for tracing purposes we want
-- indices / keys being sorted, so it will never be real fast
-function table.serialize(root,name,specification)
+local function serialize(root,name,specification)
if type(specification) == "table" then
- return serialize(root,name,specification) -- the original one
+ return original_serialize(root,name,specification) -- the original one
end
- local t -- = { }
- local n = 1
+ local t -- = { }
+ local n = 1
+ local unknown = false
-- local function simple_table(t)
-- local ts = #t
@@ -614,6 +616,7 @@ function table.serialize(root,name,specification)
return nil
end
end
+ local haszero = t[0]
if n == nt then
local tt = { }
for i=1,nt do
@@ -630,6 +633,23 @@ function table.serialize(root,name,specification)
end
end
return tt
+ elseif haszero and (n == nt + 1) then
+ local tt = { }
+ for i=0,nt do
+ local v = t[i]
+ local tv = type(v)
+ if tv == "number" then
+ tt[i+1] = v -- not needed tostring(v)
+ elseif tv == "string" then
+ tt[i+1] = format("%q",v) -- f_string(v)
+ elseif tv == "boolean" then
+ tt[i+1] = v and "true" or "false"
+ else
+ return nil
+ end
+ end
+ tt[1] = "[0] = " .. tt[1]
+ return tt
end
end
return nil
@@ -680,7 +700,7 @@ function table.serialize(root,name,specification)
elseif tv == "string" then
n = n + 1 t[n] = f_val_str(depth,v)
elseif tv == "table" then
- if next(v) == nil then
+ if next(v) == nil then -- tricky as next is unpredictable in a hash
n = n + 1 t[n] = f_val_not(depth)
else
local st = simple_table(v)
@@ -692,6 +712,8 @@ function table.serialize(root,name,specification)
end
elseif tv == "boolean" then
n = n + 1 t[n] = f_val_boo(depth,v)
+ elseif unknown then
+ n = n + 1 t[n] = f_val_str(depth,tostring(v))
end
elseif tv == "number" then
if tk == "number" then
@@ -700,6 +722,8 @@ function table.serialize(root,name,specification)
n = n + 1 t[n] = f_key_str_value_num(depth,k,v)
elseif tk == "boolean" then
n = n + 1 t[n] = f_key_boo_value_num(depth,k,v)
+ elseif unknown then
+ n = n + 1 t[n] = f_key_str_value_num(depth,tostring(k),v)
end
elseif tv == "string" then
if tk == "number" then
@@ -708,6 +732,8 @@ function table.serialize(root,name,specification)
n = n + 1 t[n] = f_key_str_value_str(depth,k,v)
elseif tk == "boolean" then
n = n + 1 t[n] = f_key_boo_value_str(depth,k,v)
+ elseif unknown then
+ n = n + 1 t[n] = f_key_str_value_str(depth,tostring(k),v)
end
elseif tv == "table" then
if next(v) == nil then
@@ -717,6 +743,8 @@ function table.serialize(root,name,specification)
n = n + 1 t[n] = f_key_str_value_not(depth,k)
elseif tk == "boolean" then
n = n + 1 t[n] = f_key_boo_value_not(depth,k)
+ elseif unknown then
+ n = n + 1 t[n] = f_key_str_value_not(depth,tostring(k))
end
else
local st = simple_table(v)
@@ -728,6 +756,8 @@ function table.serialize(root,name,specification)
n = n + 1 t[n] = f_key_str_value_seq(depth,k,st)
elseif tk == "boolean" then
n = n + 1 t[n] = f_key_boo_value_seq(depth,k,st)
+ elseif unknown then
+ n = n + 1 t[n] = f_key_str_value_seq(depth,tostring(k),st)
end
end
elseif tv == "boolean" then
@@ -737,6 +767,18 @@ function table.serialize(root,name,specification)
n = n + 1 t[n] = f_key_str_value_boo(depth,k,v)
elseif tk == "boolean" then
n = n + 1 t[n] = f_key_boo_value_boo(depth,k,v)
+ elseif unknown then
+ n = n + 1 t[n] = f_key_str_value_boo(depth,tostring(k),v)
+ end
+ else
+ if tk == "number" then
+ n = n + 1 t[n] = f_key_num_value_str(depth,k,tostring(v))
+ elseif tk == "string" then
+ n = n + 1 t[n] = f_key_str_value_str(depth,k,tostring(v))
+ elseif tk == "boolean" then
+ n = n + 1 t[n] = f_key_boo_value_str(depth,k,tostring(v))
+ elseif unknown then
+ n = n + 1 t[n] = f_key_str_value_str(depth,tostring(k),tostring(v))
end
end
end
@@ -775,10 +817,21 @@ function table.serialize(root,name,specification)
end
-- Let's forget about empty tables.
if next(root) ~= nil then
- do_serialize(root,name,1,0)
+ local st = simple_table(root)
+ if st then
+ return t[1] .. f_fin_seq(st) -- todo: move up and in one go
+ else
+ do_serialize(root,name,1,0)
+ end
end
end
n = n + 1
t[n] = f_table_finish()
return concat(t,"\n")
end
+
+table.serialize = serialize
+
+if setinspector then
+ setinspector("table",function(v) if type(v) == "table" then print(serialize(v,"table",{})) return true end end)
+end
diff --git a/Master/texmf-dist/tex/context/base/util-tpl.lua b/Master/texmf-dist/tex/context/base/mkiv/util-tpl.lua
index 468dd429c98..468dd429c98 100644
--- a/Master/texmf-dist/tex/context/base/util-tpl.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-tpl.lua
diff --git a/Master/texmf-dist/tex/context/base/util-you.lua b/Master/texmf-dist/tex/context/base/mkiv/util-you.lua
index 79a0e83e781..79a0e83e781 100644
--- a/Master/texmf-dist/tex/context/base/util-you.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-you.lua
diff --git a/Master/texmf-dist/tex/context/base/mult-def.mkiv b/Master/texmf-dist/tex/context/base/mult-def.mkiv
deleted file mode 100644
index d547a7b8170..00000000000
--- a/Master/texmf-dist/tex/context/base/mult-def.mkiv
+++ /dev/null
@@ -1,177 +0,0 @@
-%D \module
-%D [ file=mult-def,
-%D version=2008.10.22,
-%D title=\CONTEXT\ Multilingual Macros,
-%D subtitle=Definitions,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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
-
-\installcorenamespace{multilingual}
-
-\setvalue{\??multilingual czech}{cs}
-\setvalue{\??multilingual german}{de}
-\setvalue{\??multilingual english}{en}
-\setvalue{\??multilingual french}{fr}
-\setvalue{\??multilingual italian}{it}
-\setvalue{\??multilingual dutch}{nl}
-\setvalue{\??multilingual persian}{pe}
-\setvalue{\??multilingual romanian}{ro}
-
-\def\userinterfacetag{\ifcsname\??multilingual\currentinterface\endcsname\csname\??multilingual\currentinterface\endcsname\else en\fi}
-\def\userresponsestag{\ifcsname\??multilingual\currentresponses\endcsname\csname\??multilingual\currentresponses\endcsname\else en\fi}
-
-% \input mult-\userinterfacetag \relax
-% \input mult-m\userresponsestag \relax
-
-\clf_setuserinterface{\userinterfacetag}{\userresponsestag}
-
-% start todo in mult-def.lua:
-
-\def\c!openup {openup}
-
-\def\v!serifnormal {serifnormal}
-\def\v!serifbold {serifbold}
-\def\v!sansnormal {sansnormal}
-%def\v!sansbold {sansbold}
-\def\v!mononormal {mononormal}
-\def\v!monobold {monobold}
-
-\def\c!functionstyle {functionstyle}
-\def\c!functioncolor {functioncolor}
-
-\def\v!extremestretch {extremestretch}
-
-\def\v!alphabetic {alphabetic}
-\def\v!Alphabetic {Alphabetic}
-
-\def\c!svgstyle {svgstyle}
-
-\def\c!translate {translate}
-
-\def\c!nextleft {nextleft}
-\def\c!nextright {nextright}
-\def\c!nextleftquotation {nextleftquotation}
-\def\c!nextrightquotation{nextrightquotation}
-
-\def\c!profile {profile}
-
-\def\c!fences {fences}
-\def\c!words {words}
-\def\c!characters {characters}
-\def\c!hyphens {hyphens}
-\def\c!joiners {joiners}
-\def\c!leftwords {leftwords}
-\def\c!rightwords {rightwords}
-\def\c!keeptogether {keeptogether}
-\def\c!viewerprefix {viewerprefix}
-
-\def\v!display {display}
-\def\v!inline {inline}
-
-\def\v!camel {camel}
-
-\def\c!dataset {dataset}
-\def\c!sectionblock {sectionblock}
-\def\c!language {language}
-\def\c!compressseparator {compressseparator}
-\def\c!renderingsetup {renderingsetup}
-\def\c!filler {filler}
-\def\c!resources {resources}
-\def\c!first {first}
-\def\c!last {last}
-\def\c!quotechar {quotechar}
-\def\c!commentchar {commentchar}
-\def\c!symbolcommand {symbolcommand}
-\def\c!xmlsetup {xmlsetup}
-\def\c!comma {comma}
-\def\c!period {period}
-\def\c!monthconversion {monthconversion}
-\def\c!authorconversion {authorconversion}
-\def\c!comment {comment}
-\def\c!textalign {textalign}
-\def\c!up {up}
-\def\c!down {down}
-\def\c!instance {instance}
-\def\c!database {database}
-\def\c!group {group}
-\def\c!groupsuffix {groupsuffix}
-\def\c!properties {properties}
-\def\c!journalconversion {journalconversion}
-\def\c!register {register}
-\def\c!note {note}
-\def\c!field {field}
-\def\c!ignore {ignore}
-\def\c!specification {specification}
-
-\def\c!pageleft {pageleft}
-\def\c!pageright {pageright}
-\def\c!pagesep {pagesep}
-\def\c!lastpagesep {lastpagesep}
-\def\c!finalpagesep {finalpagesep}
-\def\c!pageconnector {pageconnector}
-
-\def\c!referencemethod {referencemethod} % forward both
-
-\def\v!dataset {dataset}
-\def\v!compressseparator {compressseparator}
-\def\v!notation {notation}
-\def\v!endnote {endnote}
-\def\v!interactive {interactive}
-\def\v!autopunctuation {autopunctuation}
-\def\v!integral {integral}
-\def\v!shiftup {shiftup}
-\def\v!shiftdown {shiftdown}
-\def\v!construction {construction}
-\def\v!unframed {unframed}
-\def\v!chemical {chemical}
-\def\v!chemicals {chemicals}
-\def\v!words {words}
-\def\v!combination {combination}
-\def\v!norepeat {norepeat}
-\def\v!mixed {mixed}
-\def\v!centerlast {centerlast}
-\def\v!long {long}
-\def\v!box {box}
-
-\def\v!noline {noline}
-\def\v!noheight {noheight}
-\def\v!nodepth {nodepth}
-
-\def\v!bookmark {bookmark}
-
-\def\v!vfenced {vfenced}
-\def\v!bothtext {bothtext}
-
-\def\s!traditional {traditional}
-
-\def\c!HL {HL}
-\def\c!VL {VL}
-\def\c!NL {NL}
-
-\ifdefined\v!kerncharacters\else \def\v!kerncharacters{kerncharacters} \fi % no time now for translations should be a e! actually
-\ifdefined\v!letterspacing \else \def\v!letterspacing {letterspacing} \fi % no time now for translations should be a e! actually
-\ifdefined\v!stretched \else \def\v!stretched {stretched} \fi
-\ifdefined\v!vulgarfraction\else \def\v!vulgarfraction{vulgarfraction} \fi
-\ifdefined\v!block \else \def\v!block {block} \fi
-\ifdefined\v!rule \else \def\v!rule {rule} \fi
-\ifdefined\v!oldstyle \else \def\v!oldstyle {oldstyle} \fi
-
-\def\c!etallimit {etallimit}
-\def\c!etaldisplay{etaldisplay}
-\def\c!etaltext {etaltext}
-\def\c!etaloption {etaloption}
-
-\ifdefined\v!simplelist\else \def\v!simplelist{simplelist} \fi
-\ifdefined\v!sorting \else \def\v!sorting {sorting} \fi
-\ifdefined\v!synonym \else \def\v!synonym {synonym} \fi
-
-% stop todo
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/node-fnt.lua b/Master/texmf-dist/tex/context/base/node-fnt.lua
deleted file mode 100644
index 774a687186a..00000000000
--- a/Master/texmf-dist/tex/context/base/node-fnt.lua
+++ /dev/null
@@ -1,556 +0,0 @@
-if not modules then modules = { } end modules ['node-fnt'] = {
- version = 1.001,
- comment = "companion to font-ini.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files",
-}
-
-if not context then os.exit() end -- generic function in node-dum
-
-local next, type = next, type
-local concat, keys = table.concat, table.keys
-
-local nodes, node, fonts = nodes, node, fonts
-
-local trace_characters = false trackers .register("nodes.characters", function(v) trace_characters = v end)
-local trace_fontrun = false trackers .register("nodes.fontrun", function(v) trace_fontrun = v end)
-
-local force_discrun = true directives.register("nodes.discrun", function(v) force_discrun = v end)
-local force_basepass = true directives.register("nodes.basepass", function(v) force_basepass = v end)
-
-local report_fonts = logs.reporter("fonts","processing")
-
-local fonthashes = fonts.hashes
-local fontdata = fonthashes.identifiers
-
-local otf = fonts.handlers.otf
-
-local starttiming = statistics.starttiming
-local stoptiming = statistics.stoptiming
-
-local nodecodes = nodes.nodecodes
-local handlers = nodes.handlers
-
-local nuts = nodes.nuts
-local tonut = nuts.tonut
-local tonode = nuts.tonode
-
-local getattr = nuts.getattr
-local getid = nuts.getid
-local getfont = nuts.getfont
-local getsubtype = nuts.getsubtype
-local getchar = nuts.getchar
-local getnext = nuts.getnext
-local getprev = nuts.getprev
-local getfield = nuts.getfield
-
-local traverse_id = nuts.traverse_id
-
-local glyph_code = nodecodes.glyph
-local disc_code = nodecodes.disc
-
-local setmetatableindex = table.setmetatableindex
-
--- some tests with using an array of dynamics[id] and processes[id] demonstrated
--- that there was nothing to gain (unless we also optimize other parts)
---
--- maybe getting rid of the intermediate shared can save some time
-
--- potential speedup: check for subtype < 256 so that we can remove that test
--- elsewhere, danger: injected nodes will not be dealt with but that does not
--- happen often; we could consider processing sublists but that might need more
--- checking later on; the current approach also permits variants
-
-local run = 0
-
-local setfontdynamics = { }
-local fontprocesses = { }
-
--- setmetatableindex(setfontdynamics, function(t,font)
--- local tfmdata = fontdata[font]
--- local shared = tfmdata.shared
--- local v = shared and shared.dynamics and otf.setdynamics or false
--- t[font] = v
--- return v
--- end)
-
-setmetatableindex(setfontdynamics, function(t,font)
- local tfmdata = fontdata[font]
- local shared = tfmdata.shared
- local f = shared and shared.dynamics and otf.setdynamics or false
- if f then
- local v = { }
- t[font] = v
- setmetatableindex(v,function(t,k)
- local v = f(font,k)
- t[k] = v
- return v
- end)
- return v
- else
- t[font] = false
- return false
- end
-end)
-
-setmetatableindex(fontprocesses, function(t,font)
- local tfmdata = fontdata[font]
- local shared = tfmdata.shared -- we need to check shared, only when same features
- local processes = shared and shared.processes
- if processes and #processes > 0 then
- t[font] = processes
- return processes
- else
- t[font] = false
- return false
- end
-end)
-
-fonts.hashes.setdynamics = setfontdynamics
-fonts.hashes.processes = fontprocesses
-
--- if we forget about basemode we don't need to test too much here and we can consider running
--- over sub-ranges .. this involves a bit more initializations but who cares .. in that case we
--- also need to use the stop criterium (we already use head too) ... we cannot use traverse
--- then, so i'll test it on some local clone first ... the only pitfall is changed directions
--- inside a run which means that we need to keep track of this which in turn complicates matters
--- in a way i don't like
-
--- we need to deal with the basemode fonts here and can only run over ranges as we
--- otherwise get luatex craches due to all kind of asserts in the disc/lig builder
-
-local ligaturing = node.ligaturing
-local kerning = node.kerning
-
-function handlers.characters(head)
- -- either next or not, but definitely no already processed list
- starttiming(nodes)
-
- local usedfonts = { }
- local attrfonts = { }
- local basefonts = { }
- local a, u, b = 0, 0, 0
- local basefont = nil
- local prevfont = nil
- local prevattr = 0
- local done = false
-
- if trace_fontrun then
- run = run + 1
- report_fonts()
- report_fonts("checking node list, run %s",run)
- report_fonts()
- local n = tonut(head)
- while n do
- local id = getid(n)
- if id == glyph_code then
- local font = getfont(n)
- local attr = getattr(n,0) or 0
- report_fonts("font %03i, dynamic %03i, glyph %C",font,attr,getchar(n))
- elseif id == disc_code then
- report_fonts("[disc] %s",nodes.listtoutf(n,true,false,n))
- else
- report_fonts("[%s]",nodecodes[id])
- end
- n = getnext(n)
- end
- end
-
- local nuthead = tonut(head)
-
- for n in traverse_id(glyph_code,nuthead) do
- if getsubtype(n) < 256 then -- all are 1
- local font = getfont(n)
- local attr = getattr(n,0) or 0 -- zero attribute is reserved for fonts in context
- if font ~= prevfont or attr ~= prevattr then
- if basefont then
- basefont[2] = tonode(getprev(n)) -- todo, save p
- end
- if attr > 0 then
- local used = attrfonts[font]
- if not used then
- used = { }
- attrfonts[font] = used
- end
- if not used[attr] then
- local fd = setfontdynamics[font]
- if fd then
- used[attr] = fd[attr]
- a = a + 1
- elseif force_basepass then
- b = b + 1
- basefont = { tonode(n), nil }
- basefonts[b] = basefont
- end
- end
- else
- local used = usedfonts[font]
- if not used then
- local fp = fontprocesses[font]
- if fp then
- usedfonts[font] = fp
- u = u + 1
- elseif force_basepass then
- b = b + 1
- basefont = { tonode(n), nil }
- basefonts[b] = basefont
- end
- end
- end
- prevfont = font
- prevattr = attr
- end
- end
- end
-
- -- could be an optional pass : seldom needed, only for documentation as a discretionary
- -- with pre/post/replace will normally not occur on it's own
-
- if force_discrun then
-
- -- basefont is not supported in disc only runs ... it would mean a lot of
- -- ranges .. we could try to run basemode as a separate processor run but
- -- not for now (we can consider it when the new node code is tested
-
- -- local prevfont = nil
- -- local prevattr = 0
-
- for d in traverse_id(disc_code,nuthead) do
- -- we could use first_glyph
- local r = getfield(n,"replace") -- good enough
- if r then
- for n in traverse_id(glyph_code,r) do
- if getsubtype(n) < 256 then -- all are 1
- local font = getfont(n)
- local attr = getattr(n,0) or 0 -- zero attribute is reserved for fonts in context
- if font ~= prevfont or attr ~= prevattr then
- if attr > 0 then
- local used = attrfonts[font]
- if not used then
- used = { }
- attrfonts[font] = used
- end
- if not used[attr] then
- local fd = setfontdynamics[font]
- if fd then
- used[attr] = fd[attr]
- a = a + 1
- end
- end
- else
- local used = usedfonts[font]
- if not used then
- local fp = fontprocesses[font]
- if fp then
- usedfonts[font] = fp
- u = u + 1
- end
- end
- end
- prevfont = font
- prevattr = attr
- end
- end
- break
- end
- end
- end
-
- end
-
- if trace_fontrun then
- report_fonts()
- report_fonts("statics : %s",u > 0 and concat(keys(usedfonts)," ") or "none")
- report_fonts("dynamics: %s",a > 0 and concat(keys(attrfonts)," ") or "none")
- report_fonts("built-in: %s",b > 0 and b or "none")
- report_fonts()
- end
- -- in context we always have at least 2 processors
- if u == 0 then
- -- skip
- elseif u == 1 then
- local font, processors = next(usedfonts)
- for i=1,#processors do
- local h, d = processors[i](head,font,0)
- if d then
- head = h or head
- done = true
- end
- end
- else
- for font, processors in next, usedfonts do
- for i=1,#processors do
- local h, d = processors[i](head,font,0)
- if d then
- head = h or head
- done = true
- end
- end
- end
- end
- if a == 0 then
- -- skip
- elseif a == 1 then
- local font, dynamics = next(attrfonts)
- for attribute, processors in next, dynamics do -- attr can switch in between
- for i=1,#processors do
- local h, d = processors[i](head,font,attribute)
- if d then
- head = h or head
- done = true
- end
- end
- end
- else
- for font, dynamics in next, attrfonts do
- for attribute, processors in next, dynamics do -- attr can switch in between
- for i=1,#processors do
- local h, d = processors[i](head,font,attribute)
- if d then
- head = h or head
- done = true
- end
- end
- end
- end
- end
- if b == 0 then
- -- skip
- elseif b == 1 then
- -- only one font
- local front = head == start
- local range = basefonts[1]
- local start = range[1]
- local stop = range[2]
- if stop then
- start, stop = ligaturing(start,stop)
- start, stop = kerning(start,stop)
- elseif start then -- safeguard
- start = ligaturing(start)
- start = kerning(start)
- else
- -- something bad happened
- end
- if front then
- -- shouldn't happen
- head = start
- end
- else
- -- multiple fonts
- local front = head == start
- for i=1,b do
- local range = basefonts[i]
- local start = range[1]
- local stop = range[2]
- if stop then
- start, stop = ligaturing(start,stop)
- start, stop = kerning(start,stop)
- elseif start then -- safeguard
- start = ligaturing(start)
- start = kerning(start)
- else
- -- something bad happened
- end
- end
- if front then
- -- shouldn't happen
- head = start
- end
- end
- stoptiming(nodes)
- if trace_characters then
- nodes.report(head,done)
- end
- return head, true
-end
-
--- local formatters = string.formatters
-
--- local function make(processors,font,attribute)
--- _G.__temp = processors
--- local t = { }
--- for i=1,#processors do
--- if processors[i] then
--- t[#t+1] = formatters["local p_%s = _G.__temp[%s]"](i,i)
--- end
--- end
--- t[#t+1] = "return function(head,done)"
--- if #processors == 1 then
--- t[#t+1] = formatters["return p_%s(head,%s,%s)"](1,font,attribute or 0)
--- else
--- for i=1,#processors do
--- if processors[i] then
--- t[#t+1] = formatters["local h,d=p_%s(head,%s,%s) if d then head=h or head done=true end"](i,font,attribute or 0)
--- end
--- end
--- t[#t+1] = "return head, done"
--- end
--- t[#t+1] = "end"
--- t = concat(t,"\n")
--- t = load(t)(processors)
--- _G.__temp = nil
--- return t
--- end
-
--- setmetatableindex(fontprocesses, function(t,font)
--- local tfmdata = fontdata[font]
--- local shared = tfmdata.shared -- we need to check shared, only when same features
--- local processes = shared and shared.processes
--- if processes and #processes > 0 then
--- processes = make(processes,font,0)
--- t[font] = processes
--- return processes
--- else
--- t[font] = false
--- return false
--- end
--- end)
-
--- setmetatableindex(setfontdynamics, function(t,font)
--- local tfmdata = fontdata[font]
--- local shared = tfmdata.shared
--- local f = shared and shared.dynamics and otf.setdynamics or false
--- if f then
--- local v = { }
--- t[font] = v
--- setmetatableindex(v,function(t,k)
--- local v = f(font,k)
--- v = make(v,font,k)
--- t[k] = v
--- return v
--- end)
--- return v
--- else
--- t[font] = false
--- return false
--- end
--- end)
---
--- -- TODO: basepasses!
---
--- function handlers.characters(head)
--- -- either next or not, but definitely no already processed list
--- starttiming(nodes)
--- local usedfonts, attrfonts
--- local a, u, prevfont, prevattr, done = 0, 0, nil, 0, false
--- if trace_fontrun then
--- run = run + 1
--- report_fonts()
--- report_fonts("checking node list, run %s",run)
--- report_fonts()
--- local n = head
--- while n do
--- local id = n.id
--- if id == glyph_code then
--- local font = n.font
--- local attr = n[0] or 0
--- report_fonts("font %03i, dynamic %03i, glyph %s",font,attr,utf.char(n.char))
--- else
--- report_fonts("[%s]",nodecodes[n.id])
--- end
--- n = n.next
--- end
--- end
--- for n in traverse_id(glyph_code,head) do
--- -- if n.subtype<256 then -- all are 1
--- local font = n.font
--- local attr = n[0] or 0 -- zero attribute is reserved for fonts in context
--- if font ~= prevfont or attr ~= prevattr then
--- if attr > 0 then
--- if not attrfonts then
--- attrfonts = {
--- [font] = {
--- [attr] = setfontdynamics[font][attr]
--- }
--- }
--- a = 1
--- else
--- local used = attrfonts[font]
--- if not used then
--- attrfonts[font] = {
--- [attr] = setfontdynamics[font][attr]
--- }
--- a = a + 1
--- elseif not used[attr] then
--- used[attr] = setfontdynamics[font][attr]
--- a = a + 1
--- end
--- end
--- else
--- if not usedfonts then
--- local fp = fontprocesses[font]
--- if fp then
--- usedfonts = {
--- [font] = fp
--- }
--- u = 1
--- end
--- else
--- local used = usedfonts[font]
--- if not used then
--- local fp = fontprocesses[font]
--- if fp then
--- usedfonts[font] = fp
--- u = u + 1
--- end
--- end
--- end
--- end
--- prevfont = font
--- prevattr = attr
--- end
--- -- end
--- end
--- if trace_fontrun then
--- report_fonts()
--- report_fonts("statics : %s",(u > 0 and concat(keys(usedfonts)," ")) or "none")
--- report_fonts("dynamics: %s",(a > 0 and concat(keys(attrfonts)," ")) or "none")
--- report_fonts()
--- end
--- if not usedfonts then
--- -- skip
--- elseif u == 1 then
--- local font, processors = next(usedfonts)
--- head, done = processors(head,done)
--- else
--- for font, processors in next, usedfonts do
--- head, done = processors(head,done)
--- end
--- end
--- if not attrfonts then
--- -- skip
--- elseif a == 1 then
--- local font, dynamics = next(attrfonts)
--- for attribute, processors in next, dynamics do
--- head, done = processors(head,done)
--- end
--- else
--- for font, dynamics in next, attrfonts do
--- for attribute, processors in next, dynamics do
--- head, done = processors(head,done)
--- end
--- end
--- end
--- stoptiming(nodes)
--- if trace_characters then
--- nodes.report(head,done)
--- end
--- return head, true
--- end
-
-local d_protect_glyphs = nuts.protect_glyphs
-local d_unprotect_glyphs = nuts.unprotect_glyphs
-
-handlers.protectglyphs = function(n) return d_protect_glyphs (tonut(n)) end
-handlers.unprotectglyphs = function(n) return d_unprotect_glyphs(tonut(n)) end
-
--- function handlers.protectglyphs(h)
--- local h = tonut(h)
--- for n in traverse_id(disc_code,h) do
--- local d = getfield(n,"pre") if d then d_protect_glyphs(d) end
--- local d = getfield(n,"post") if d then d_protect_glyphs(d) end
--- local d = getfield(n,"replace") if d then d_protect_glyphs(d) end
--- end
--- return d_protect_glyphs(h)
--- end
diff --git a/Master/texmf-dist/tex/context/base/node-ini.lua b/Master/texmf-dist/tex/context/base/node-ini.lua
deleted file mode 100644
index 02d4c7a3fb8..00000000000
--- a/Master/texmf-dist/tex/context/base/node-ini.lua
+++ /dev/null
@@ -1,262 +0,0 @@
-if not modules then modules = { } end modules ['node-ini'] = {
- version = 1.001,
- comment = "companion to node-ini.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
---[[ldx--
-<p>Most of the code that had accumulated here is now separated in
-modules.</p>
---ldx]]--
-
--- this module is being reconstructed
-
-local next, type, tostring = next, type, tostring
-local gsub = string.gsub
-local concat, remove = table.concat, table.remove
-local sortedhash, sortedkeys, swapped = table.sortedhash, table.sortedkeys, table.swapped
-
---[[ldx--
-<p>Access to nodes is what gives <l n='luatex'/> its power. Here we
-implement a few helper functions. These functions are rather optimized.</p>
---ldx]]--
-
---[[ldx--
-<p>When manipulating node lists in <l n='context'/>, we will remove
-nodes and insert new ones. While node access was implemented, we did
-quite some experiments in order to find out if manipulating nodes
-in <l n='lua'/> was feasible from the perspective of performance.</p>
-
-<p>First of all, we noticed that the bottleneck is more with excessive
-callbacks (some gets called very often) and the conversion from and to
-<l n='tex'/>'s datastructures. However, at the <l n='lua'/> end, we
-found that inserting and deleting nodes in a table could become a
-bottleneck.</p>
-
-<p>This resulted in two special situations in passing nodes back to
-<l n='tex'/>: a table entry with value <type>false</type> is ignored,
-and when instead of a table <type>true</type> is returned, the
-original table is used.</p>
-
-<p>Insertion is handled (at least in <l n='context'/> as follows. When
-we need to insert a node at a certain position, we change the node at
-that position by a dummy node, tagged <type>inline</type> which itself
-has_attribute the original node and one or more new nodes. Before we pass
-back the list we collapse the list. Of course collapsing could be built
-into the <l n='tex'/> engine, but this is a not so natural extension.</p>
-
-<p>When we collapse (something that we only do when really needed), we
-also ignore the empty nodes. [This is obsolete!]</p>
---ldx]]--
-
-nodes = nodes or { }
-local nodes = nodes
-nodes.handlers = nodes.handlers or { }
-
-local allocate = utilities.storage.allocate
-local formatcolumns = utilities.formatters.formatcolumns
-
--- there will be more of this:
-
-local skipcodes = allocate {
- [ 0] = "userskip",
- [ 1] = "lineskip",
- [ 2] = "baselineskip",
- [ 3] = "parskip",
- [ 4] = "abovedisplayskip",
- [ 5] = "belowdisplayskip",
- [ 6] = "abovedisplayshortskip",
- [ 7] = "belowdisplayshortskip",
- [ 8] = "leftskip",
- [ 9] = "rightskip",
- [ 10] = "topskip",
- [ 11] = "splittopskip",
- [ 12] = "tabskip",
- [ 13] = "spaceskip",
- [ 14] = "xspaceskip",
- [ 15] = "parfillskip",
- [ 16] = "thinmuskip",
- [ 17] = "medmuskip",
- [ 18] = "thickmuskip",
- [100] = "leaders",
- [101] = "cleaders",
- [102] = "xleaders",
- [103] = "gleaders",
-}
-
-local penaltycodes = allocate { -- unfortunately not used
- [ 0] = "userpenalty",
-}
-
-table.setmetatableindex(penaltycodes,function(t,k) return "userpenalty" end) -- not used anyway
-
-local noadcodes = allocate { -- simple nodes
- [ 0] = "ord",
- [ 1] = "opdisplaylimits",
- [ 2] = "oplimits",
- [ 3] = "opnolimits",
- [ 4] = "bin",
- [ 5] = "rel",
- [ 6] = "open",
- [ 7] = "close",
- [ 8] = "punct",
- [ 9] = "inner",
- [10] = "under",
- [11] = "over",
- [12] = "vcenter",
-}
-
-local listcodes = allocate {
- [ 0] = "unknown",
- [ 1] = "line",
- [ 2] = "box",
- [ 3] = "indent",
- [ 4] = "alignment", -- row or column
- [ 5] = "cell",
-}
-
-local glyphcodes = allocate {
- [0] = "character",
- [1] = "glyph",
- [2] = "ligature",
- [3] = "ghost",
- [4] = "left",
- [5] = "right",
-}
-
-local kerncodes = allocate {
- [0] = "fontkern",
- [1] = "userkern",
- [2] = "accentkern",
-}
-
-local mathcodes = allocate {
- [0] = "beginmath",
- [1] = "endmath",
-}
-
-local fillcodes = allocate {
- [0] = "stretch",
- [1] = "fi",
- [2] = "fil",
- [3] = "fill",
- [4] = "filll",
-}
-
-local margincodes = allocate {
- [0] = "left",
- [1] = "right",
-}
-
-local disccodes = allocate {
- [0] = "discretionary", -- \discretionary
- [1] = "explicit", -- \-
- [2] = "automatic", -- following a -
- [3] = "regular", -- by hyphenator: simple
- [4] = "first", -- by hyphenator: hard first item
- [5] = "second", -- by hyphenator: hard second item
-}
-
-local accentcodes = allocate {
- [0] = "bothflexible",
- [1] = "fixedtop",
- [2] = "fixedbottom",
- [3] = "fixedboth",
-}
-
-local fencecodes = allocate {
- [0] = "unset",
- [1] = "left",
- [2] = "middle",
- [3] = "right",
-}
-
-local function simplified(t)
- local r = { }
- for k, v in next, t do
- r[k] = gsub(v,"_","")
- end
- return r
-end
-
-local nodecodes = simplified(node.types())
-local whatcodes = simplified(node.whatsits())
-
-skipcodes = allocate(swapped(skipcodes,skipcodes))
-noadcodes = allocate(swapped(noadcodes,noadcodes))
-nodecodes = allocate(swapped(nodecodes,nodecodes))
-whatcodes = allocate(swapped(whatcodes,whatcodes))
-listcodes = allocate(swapped(listcodes,listcodes))
-glyphcodes = allocate(swapped(glyphcodes,glyphcodes))
-kerncodes = allocate(swapped(kerncodes,kerncodes))
-penaltycodes = allocate(swapped(penaltycodes,penaltycodes))
-mathcodes = allocate(swapped(mathcodes,mathcodes))
-fillcodes = allocate(swapped(fillcodes,fillcodes))
-margincodes = allocate(swapped(margincodes,margincodes))
-disccodes = allocate(swapped(disccodes,disccodes))
-accentcodes = allocate(swapped(accentcodes,accentcodes))
-fencecodes = allocate(swapped(fencecodes,fencecodes))
-
-nodes.skipcodes = skipcodes nodes.gluecodes = skipcodes -- more official
-nodes.noadcodes = noadcodes
-nodes.nodecodes = nodecodes
-nodes.whatcodes = whatcodes nodes.whatsitcodes = whatcodes -- more official
-nodes.listcodes = listcodes
-nodes.glyphcodes = glyphcodes
-nodes.kerncodes = kerncodes
-nodes.penaltycodes = penaltycodes
-nodes.mathcodes = mathcodes
-nodes.fillcodes = fillcodes
-nodes.margincodes = margincodes
-nodes.disccodes = disccodes nodes.discretionarycodes = disccodes
-nodes.accentcodes = accentcodes
-nodes.fencecodes = fencecodes
-
-listcodes.row = listcodes.alignment
-listcodes.column = listcodes.alignment
-
-kerncodes.italiccorrection = kerncodes.userkern
-kerncodes.kerning = kerncodes.fontkern
-
-whatcodes.textdir = whatcodes.dir
-
-nodes.codes = allocate { -- mostly for listing
- glue = skipcodes,
- noad = noadcodes,
- node = nodecodes,
- hlist = listcodes,
- vlist = listcodes,
- glyph = glyphcodes,
- kern = kerncodes,
- penalty = penaltycodes,
- math = mathnodes,
- fill = fillcodes,
- margin = margincodes,
- disc = disccodes,
- whatsit = whatcodes,
- accent = accentcodes,
- fence = fencecodes,
-}
-
-local report_codes = logs.reporter("nodes","codes")
-
-function nodes.showcodes()
- local t = { }
- for name, codes in sortedhash(nodes.codes) do
- local sorted = sortedkeys(codes)
- for i=1,#sorted do
- local s = sorted[i]
- if type(s) ~= "number" then
- t[#t+1] = { name, s, codes[s] }
- end
- end
- end
- formatcolumns(t)
- for k=1,#t do
- report_codes (t[k])
- end
-end
-
-trackers.register("system.showcodes", nodes.showcodes)
diff --git a/Master/texmf-dist/tex/context/base/node-inj.lua b/Master/texmf-dist/tex/context/base/node-inj.lua
deleted file mode 100644
index 402403529c6..00000000000
--- a/Master/texmf-dist/tex/context/base/node-inj.lua
+++ /dev/null
@@ -1,603 +0,0 @@
-if not modules then modules = { } end modules ['node-inj'] = {
- version = 1.001,
- comment = "companion to node-ini.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files",
-}
-
--- This is very experimental (this will change when we have luatex > .50 and
--- a few pending thingies are available. Also, Idris needs to make a few more
--- test fonts. Some optimizations can go away when we have faster machines.
-
--- todo: ignore kerns between disc and glyph
-
-local next = next
-local utfchar = utf.char
-
-local trace_injections = false trackers.register("nodes.injections", function(v) trace_injections = v end)
-
-local report_injections = logs.reporter("nodes","injections")
-
-local attributes, nodes, node = attributes, nodes, node
-
-fonts = fonts
-local fontdata = fonts.hashes.identifiers
-
-nodes.injections = nodes.injections or { }
-local injections = nodes.injections
-
-local nodecodes = nodes.nodecodes
-local glyph_code = nodecodes.glyph
-local kern_code = nodecodes.kern
-
-local nuts = nodes.nuts
-local nodepool = nuts.pool
-
-local newkern = nodepool.kern
-
-local tonode = nuts.tonode
-local tonut = nuts.tonut
-
-local getfield = nuts.getfield
-local getnext = nuts.getnext
-local getprev = nuts.getprev
-local getid = nuts.getid
-local getattr = nuts.getattr
-local getfont = nuts.getfont
-local getsubtype = nuts.getsubtype
-local getchar = nuts.getchar
-
-local setfield = nuts.setfield
-local setattr = nuts.setattr
-
-local traverse_id = nuts.traverse_id
-local insert_node_before = nuts.insert_before
-local insert_node_after = nuts.insert_after
-
-local a_kernpair = attributes.private('kernpair')
-local a_ligacomp = attributes.private('ligacomp')
-local a_markbase = attributes.private('markbase')
-local a_markmark = attributes.private('markmark')
-local a_markdone = attributes.private('markdone')
-local a_cursbase = attributes.private('cursbase')
-local a_curscurs = attributes.private('curscurs')
-local a_cursdone = attributes.private('cursdone')
-
-local unsetvalue = attributes.unsetvalue
-
--- This injector has been tested by Idris Samawi Hamid (several arabic fonts as well as
--- the rather demanding Husayni font), Khaled Hosny (latin and arabic) and Kaj Eigner
--- (arabic, hebrew and thai) and myself (whatever font I come across). I'm pretty sure
--- that this code is not 100% okay but examples are needed to figure things out.
-
-function injections.installnewkern(nk)
- newkern = nk or newkern
-end
-
-local cursives = { }
-local marks = { }
-local kerns = { }
-
--- Currently we do gpos/kern in a bit inofficial way but when we have the extra fields in
--- glyphnodes to manipulate ht/dp/wd explicitly I will provide an alternative; also, we
--- can share tables.
-
--- For the moment we pass the r2l key ... volt/arabtype tests .. idris: this needs
--- checking with husayni (volt and fontforge).
-
-function injections.reset(n)
--- if getattr(n,a_kernpair) then
--- setattr(n,a_kernpair,unsetvalue)
--- end
--- if getattr(n,a_markdone) then
--- setattr(n,a_markbase,unsetvalue)
--- setattr(n,a_markmark,unsetvalue)
--- setattr(n,a_markdone,unsetvalue)
--- end
--- if getattr(n,a_cursdone) then
--- setattr(n,a_cursbase,unsetvalue)
--- setattr(n,a_curscurs,unsetvalue)
--- setattr(n,a_cursdone,unsetvalue)
--- end
--- if getattr(n,a_ligacomp) then
--- setattr(n,a_ligacomp,unsetvalue)
--- end
-end
-
-function injections.setligaindex(n,index)
- setattr(n,a_ligacomp,index)
-end
-
-function injections.getligaindex(n,default)
- return getattr(n,a_ligacomp) or default
-end
-
-function injections.setcursive(start,nxt,factor,rlmode,exit,entry,tfmstart,tfmnext)
- local dx, dy = factor*(exit[1]-entry[1]), factor*(exit[2]-entry[2])
- local ws, wn = tfmstart.width, tfmnext.width
- local bound = #cursives + 1
- setattr(start,a_cursbase,bound)
- setattr(nxt,a_curscurs,bound)
- cursives[bound] = { rlmode, dx, dy, ws, wn }
- return dx, dy, bound
-end
-
-function injections.setpair(current,factor,rlmode,r2lflag,spec,tfmchr)
- local x, y, w, h = factor*spec[1], factor*spec[2], factor*spec[3], factor*spec[4]
- -- dy = y - h
- if x ~= 0 or w ~= 0 or y ~= 0 or h ~= 0 then
- local bound = getattr(current,a_kernpair)
- if bound then
- local kb = kerns[bound]
- -- inefficient but singles have less, but weird anyway, needs checking
- kb[2], kb[3], kb[4], kb[5] = (kb[2] or 0) + x, (kb[3] or 0) + y, (kb[4] or 0)+ w, (kb[5] or 0) + h
- else
- bound = #kerns + 1
- setattr(current,a_kernpair,bound)
- kerns[bound] = { rlmode, x, y, w, h, r2lflag, tfmchr.width }
- end
- return x, y, w, h, bound
- end
- return x, y, w, h -- no bound
-end
-
-function injections.setkern(current,factor,rlmode,x,tfmchr)
- local dx = factor*x
- if dx ~= 0 then
- local bound = #kerns + 1
- setattr(current,a_kernpair,bound)
- kerns[bound] = { rlmode, dx }
- return dx, bound
- else
- return 0, 0
- end
-end
-
-function injections.setmark(start,base,factor,rlmode,ba,ma) -- ba=baseanchor, ma=markanchor
- local dx, dy = factor*(ba[1]-ma[1]), factor*(ba[2]-ma[2])
- local bound = getattr(base,a_markbase)
- local index = 1
- if bound then
- local mb = marks[bound]
- if mb then
- -- if not index then index = #mb + 1 end
- index = #mb + 1
- mb[index] = { dx, dy, rlmode }
- setattr(start,a_markmark,bound)
- setattr(start,a_markdone,index)
- return dx, dy, bound
- else
- report_injections("possible problem, %U is base mark without data (id %a)",getchar(base),bound)
- end
- end
- index = index or 1
- bound = #marks + 1
- setattr(base,a_markbase,bound)
- setattr(start,a_markmark,bound)
- setattr(start,a_markdone,index)
- marks[bound] = { [index] = { dx, dy, rlmode } }
- return dx, dy, bound
-end
-
-local function dir(n)
- return (n and n<0 and "r-to-l") or (n and n>0 and "l-to-r") or "unset"
-end
-
-local function trace(head)
- report_injections("begin run")
- for n in traverse_id(glyph_code,head) do
- if getsubtype(n) < 256 then
- local kp = getattr(n,a_kernpair)
- local mb = getattr(n,a_markbase)
- local mm = getattr(n,a_markmark)
- local md = getattr(n,a_markdone)
- local cb = getattr(n,a_cursbase)
- local cc = getattr(n,a_curscurs)
- local char = getchar(n)
- report_injections("font %s, char %U, glyph %c",getfont(n),char,char)
- if kp then
- local k = kerns[kp]
- if k[3] then
- report_injections(" pairkern: dir %a, x %p, y %p, w %p, h %p",dir(k[1]),k[2],k[3],k[4],k[5])
- else
- report_injections(" kern: dir %a, dx %p",dir(k[1]),k[2])
- end
- end
- if mb then
- report_injections(" markbase: bound %a",mb)
- end
- if mm then
- local m = marks[mm]
- if mb then
- local m = m[mb]
- if m then
- report_injections(" markmark: bound %a, index %a, dx %p, dy %p",mm,md,m[1],m[2])
- else
- report_injections(" markmark: bound %a, missing index",mm)
- end
- else
- m = m[1]
- report_injections(" markmark: bound %a, dx %p, dy %p",mm,m and m[1],m and m[2])
- end
- end
- if cb then
- report_injections(" cursbase: bound %a",cb)
- end
- if cc then
- local c = cursives[cc]
- report_injections(" curscurs: bound %a, dir %a, dx %p, dy %p",cc,dir(c[1]),c[2],c[3])
- end
- end
- end
- report_injections("end run")
-end
-
--- todo: reuse tables (i.e. no collection), but will be extra fields anyway
--- todo: check for attribute
-
--- We can have a fast test on a font being processed, so we can check faster for marks etc
--- but I'll make a context variant anyway.
-
-local function show_result(head)
- local current = head
- local skipping = false
- while current do
- local id = getid(current)
- if id == glyph_code then
- report_injections("char: %C, width %p, xoffset %p, yoffset %p",
- getchar(current),getfield(current,"width"),getfield(current,"xoffset"),getfield(current,"yoffset"))
- skipping = false
- elseif id == kern_code then
- report_injections("kern: %p",getfield(current,"kern"))
- skipping = false
- elseif not skipping then
- report_injections()
- skipping = true
- end
- current = getnext(current)
- end
-end
-
-function injections.handler(head,where,keep)
- head = tonut(head)
- local has_marks, has_cursives, has_kerns = next(marks), next(cursives), next(kerns)
- if has_marks or has_cursives then
- if trace_injections then
- trace(head)
- end
- -- in the future variant we will not copy items but refs to tables
- local done, ky, rl, valid, cx, wx, mk, nofvalid = false, { }, { }, { }, { }, { }, { }, 0
- if has_kerns then -- move outside loop
- local nf, tm = nil, nil
- for n in traverse_id(glyph_code,head) do -- only needed for relevant fonts
- if getsubtype(n) < 256 then
- nofvalid = nofvalid + 1
- valid[nofvalid] = n
- local f = getfont(n)
- if f ~= nf then
- nf = f
- tm = fontdata[nf].resources.marks -- other hash in ctx
- end
- if tm then
- mk[n] = tm[getchar(n)]
- end
- local k = getattr(n,a_kernpair)
- if k then
- local kk = kerns[k]
- if kk then
- local x, y, w, h = kk[2] or 0, kk[3] or 0, kk[4] or 0, kk[5] or 0
- local dy = y - h
- if dy ~= 0 then
- ky[n] = dy
- end
- if w ~= 0 or x ~= 0 then
- wx[n] = kk
- end
- rl[n] = kk[1] -- could move in test
- end
- end
- end
- end
- else
- local nf, tm = nil, nil
- for n in traverse_id(glyph_code,head) do
- if getsubtype(n) < 256 then
- nofvalid = nofvalid + 1
- valid[nofvalid] = n
- local f = getfont(n)
- if f ~= nf then
- nf = f
- tm = fontdata[nf].resources.marks -- other hash in ctx
- end
- if tm then
- mk[n] = tm[getchar(n)]
- end
- end
- end
- end
- if nofvalid > 0 then
- -- we can assume done == true because we have cursives and marks
- local cx = { }
- if has_kerns and next(ky) then
- for n, k in next, ky do
- setfield(n,"yoffset",k)
- end
- end
- -- todo: reuse t and use maxt
- if has_cursives then
- local p_cursbase, p = nil, nil
- -- since we need valid[n+1] we can also use a "while true do"
- local t, d, maxt = { }, { }, 0
- for i=1,nofvalid do -- valid == glyphs
- local n = valid[i]
- if not mk[n] then
- local n_cursbase = getattr(n,a_cursbase)
- if p_cursbase then
- local n_curscurs = getattr(n,a_curscurs)
- if p_cursbase == n_curscurs then
- local c = cursives[n_curscurs]
- if c then
- local rlmode, dx, dy, ws, wn = c[1], c[2], c[3], c[4], c[5]
- if rlmode >= 0 then
- dx = dx - ws
- else
- dx = dx + wn
- end
- if dx ~= 0 then
- cx[n] = dx
- rl[n] = rlmode
- end
- -- if rlmode and rlmode < 0 then
- dy = -dy
- -- end
- maxt = maxt + 1
- t[maxt] = p
- d[maxt] = dy
- else
- maxt = 0
- end
- end
- elseif maxt > 0 then
- local ny = getfield(n,"yoffset")
- for i=maxt,1,-1 do
- ny = ny + d[i]
- local ti = t[i]
- setfield(ti,"yoffset",getfield(ti,"yoffset") + ny)
- end
- maxt = 0
- end
- if not n_cursbase and maxt > 0 then
- local ny = getfield(n,"yoffset")
- for i=maxt,1,-1 do
- ny = ny + d[i]
- local ti = t[i]
- setfield(ti,"yoffset",ny) -- maybe add to current yoffset
- end
- maxt = 0
- end
- p_cursbase, p = n_cursbase, n
- end
- end
- if maxt > 0 then
- local ny = getfield(n,"yoffset") -- hm, n unset ?
- for i=maxt,1,-1 do
- ny = ny + d[i]
- local ti = t[i]
- setfield(ti,"yoffset",ny)
- end
- maxt = 0
- end
- if not keep then
- cursives = { }
- end
- end
- if has_marks then
- for i=1,nofvalid do
- local p = valid[i]
- local p_markbase = getattr(p,a_markbase)
- if p_markbase then
- local mrks = marks[p_markbase]
- local nofmarks = #mrks
- for n in traverse_id(glyph_code,getnext(p)) do
- local n_markmark = getattr(n,a_markmark)
- if p_markbase == n_markmark then
- local index = getattr(n,a_markdone) or 1
- local d = mrks[index]
- if d then
- local rlmode = d[3]
- --
- local k = wx[p]
- local px = getfield(p,"xoffset")
- local ox = 0
- if k then
- local x = k[2]
- local w = k[4]
- if w then
- if rlmode and rlmode >= 0 then
- -- kern(x) glyph(p) kern(w-x) mark(n)
- ox = px - getfield(p,"width") + d[1] - (w-x)
- -- report_injections("l2r case 1: %p",ox)
- else
- -- kern(w-x) glyph(p) kern(x) mark(n)
- ox = px - d[1] - x
- -- report_injections("r2l case 1: %p",ox)
- end
- else
- if rlmode and rlmode >= 0 then
- -- okay for husayni
- ox = px - getfield(p,"width") + d[1]
- -- report_injections("r2l case 2: %p",ox)
- else
- -- needs checking: is x ok here?
- ox = px - d[1] - x
- -- report_injections("r2l case 2: %p",ox)
- end
- end
- else
- -- if rlmode and rlmode >= 0 then
- -- ox = px - getfield(p,"width") + d[1]
- -- -- report_injections("l2r case 3: %p",ox)
- -- else
- -- ox = px - d[1]
- -- -- report_injections("r2l case 3: %p",ox)
- -- end
- --
- -- we need to deal with fonts that have marks with width
- --
- local wp = getfield(p,"width")
- local wn = getfield(n,"width") -- in arial marks have widths
- if rlmode and rlmode >= 0 then
- ox = px - wp + d[1]
- -- report_injections("l2r case 3: %p",ox)
- else
- ox = px - d[1]
- -- report_injections("r2l case 3: %p",ox)
- end
- if wn ~= 0 then
- -- bad: we should center
- insert_node_before(head,n,newkern(-wn/2))
- insert_node_after(head,n,newkern(-wn/2))
- -- wx[n] = { 0, -wn/2, 0, -wn }
- end
- -- so far
- end
- setfield(n,"xoffset",ox)
- --
- local py = getfield(p,"yoffset")
- local oy = 0
- if mk[p] then
- oy = py + d[2]
- else
- oy = getfield(n,"yoffset") + py + d[2]
- end
- setfield(n,"yoffset",oy)
- --
- if nofmarks == 1 then
- break
- else
- nofmarks = nofmarks - 1
- end
- end
- elseif not n_markmark then
- break -- HH: added 2013-09-12: no need to deal with non marks
- else
- -- KE: there can be <mark> <mkmk> <mark> sequences in ligatures
- end
- end
- end
- end
- if not keep then
- marks = { }
- end
- end
- -- todo : combine
- if next(wx) then
- for n, k in next, wx do
- -- only w can be nil (kernclasses), can be sped up when w == nil
- local x = k[2]
- local w = k[4]
- if w then
- local rl = k[1] -- r2l = k[6]
- local wx = w - x
- if rl < 0 then -- KE: don't use r2l here
- if wx ~= 0 then
- insert_node_before(head,n,newkern(wx)) -- type 0/2
- end
- if x ~= 0 then
- insert_node_after (head,n,newkern(x)) -- type 0/2
- end
- else
- if x ~= 0 then
- insert_node_before(head,n,newkern(x)) -- type 0/2
- end
- if wx ~= 0 then
- insert_node_after (head,n,newkern(wx)) -- type 0/2
- end
- end
- elseif x ~= 0 then
- -- this needs checking for rl < 0 but it is unlikely that a r2l script
- -- uses kernclasses between glyphs so we're probably safe (KE has a
- -- problematic font where marks interfere with rl < 0 in the previous
- -- case)
- insert_node_before(head,n,newkern(x)) -- a real font kern, type 0
- end
- end
- end
- if next(cx) then
- for n, k in next, cx do
- if k ~= 0 then
- local rln = rl[n]
- if rln and rln < 0 then
- insert_node_before(head,n,newkern(-k)) -- type 0/2
- else
- insert_node_before(head,n,newkern(k)) -- type 0/2
- end
- end
- end
- end
- if not keep then
- kerns = { }
- end
- -- if trace_injections then
- -- show_result(head)
- -- end
- return tonode(head), true
- elseif not keep then
- kerns, cursives, marks = { }, { }, { }
- end
- elseif has_kerns then
- if trace_injections then
- trace(head)
- end
- for n in traverse_id(glyph_code,head) do
- if getsubtype(n) < 256 then
- local k = getattr(n,a_kernpair)
- if k then
- local kk = kerns[k]
- if kk then
- local rl, x, y, w = kk[1], kk[2] or 0, kk[3], kk[4]
- if y and y ~= 0 then
- setfield(n,"yoffset",y) -- todo: h ?
- end
- if w then
- -- copied from above
- -- local r2l = kk[6]
- local wx = w - x
- if rl < 0 then -- KE: don't use r2l here
- if wx ~= 0 then
- insert_node_before(head,n,newkern(wx))
- end
- if x ~= 0 then
- insert_node_after (head,n,newkern(x))
- end
- else
- if x ~= 0 then
- insert_node_before(head,n,newkern(x))
- end
- if wx ~= 0 then
- insert_node_after(head,n,newkern(wx))
- end
- end
- else
- -- simple (e.g. kernclass kerns)
- if x ~= 0 then
- insert_node_before(head,n,newkern(x))
- end
- end
- end
- end
- end
- end
- if not keep then
- kerns = { }
- end
- -- if trace_injections then
- -- show_result(head)
- -- end
- return tonode(head), true
- else
- -- no tracing needed
- end
- return tonode(head), false
-end
diff --git a/Master/texmf-dist/tex/context/base/pack-obj.lua b/Master/texmf-dist/tex/context/base/pack-obj.lua
deleted file mode 100644
index d1cc5bafc67..00000000000
--- a/Master/texmf-dist/tex/context/base/pack-obj.lua
+++ /dev/null
@@ -1,93 +0,0 @@
-if not modules then modules = { } end modules ['pack-obj'] = {
- version = 1.001,
- comment = "companion to pack-obj.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
---[[ldx--
-<p>We save object references in the main utility table. jobobjects are
-reusable components.</p>
---ldx]]--
-
-local context = context
-
-local implement = interfaces.implement
-
-local allocate = utilities.storage.allocate
-
-local collected = allocate()
-local tobesaved = allocate()
-
-local jobobjects = {
- collected = collected,
- tobesaved = tobesaved,
-}
-
-job.objects = jobobjects
-
-local function initializer()
- collected = jobobjects.collected
- tobesaved = jobobjects.tobesaved
-end
-
-job.register('job.objects.collected', tobesaved, initializer, nil)
-
-local function saveobject(tag,number,page)
- local t = { number, page }
- tobesaved[tag], collected[tag] = t, t
-end
-
-local function setobject(tag,number,page)
- collected[tag] = { number, page }
-end
-
-local function getobject(tag)
- return collected[tag] or tobesaved[tag]
-end
-
-local function getobjectnumber(tag,default)
- local o = collected[tag] or tobesaved[tag]
- return o and o[1] or default
-end
-
-local function getobjectpage(tag,default)
- local o = collected[tag] or tobesaved[tag]
- return o and o[2] or default
-end
-
-jobobjects.save = saveobject
-jobobjects.set = setobject
-jobobjects.get = getobject
-jobobjects.number = getobjectnumber
-jobobjects.page = getobjectpage
-
-implement {
- name = "saveobject",
- actions = saveobject
-}
-
-implement {
- name = "setobject",
- actions = setobject,
- arguments = { "string", "integer", "integer" }
-}
-
-implement {
- name = "objectnumber",
- actions = { getobjectnumber, context },
- arguments = { "string", "string" },
-}
-
-implement {
- name = "objectpage",
- actions = { getobjectpage, context },
- arguments = { "string", "string" },
-}
-
-implement {
- name = "doifelseobjectreferencefound",
- actions = { jobobjects.get, commands.doifelse },
- arguments = "string"
-}
diff --git a/Master/texmf-dist/tex/context/base/pack-obj.mkiv b/Master/texmf-dist/tex/context/base/pack-obj.mkiv
deleted file mode 100644
index 605dd3b9e5a..00000000000
--- a/Master/texmf-dist/tex/context/base/pack-obj.mkiv
+++ /dev/null
@@ -1,415 +0,0 @@
-%D \module
-%D [ file=pack-obj,
-%D version=1998.01.15,
-%D title=\CONTEXT\ Packaging Macros,
-%D subtitle=Objects,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Packaging Macros / Objects}
-
-\unprotect
-
-\let\objectreference\gobblefourarguments % catch mkii tuo stuff
-
-\registerctxluafile{pack-obj}{1.001}
-
-% \startluacode
-% local texbox, texdimen, texcount, texwrite = tex.box, tex.dimen, tex.count, tex.write
-% local pdfxform, pdfrefxform = pdf.xform, pdf.refxform
-%
-% function pdf.xform (l) texbox["objectbox"] = nil return l end
-% function pdf.refxform(l) return node.copy_list(l) end
-%
-% backends.codeinjections.register = pdf.xform
-% backends.codeinjections.restore = pdf.refxform
-%
-% local codeinjections = backends.codeinjections
-%
-% objects = objects or { }
-%
-% local data = { }
-%
-% objects.data = data
-% objects.n = 0
-%
-% function objects.register(name)
-% objects.n = objects.n + 1
-% local list = texbox.objectbox
-% nodes.handlers.finalize(list)
-% data[name] = {
-% codeinjections.restore(list),
-% texdimen.objectwd,
-% texdimen.objectht,
-% texdimen.objectdp,
-% texdimen.objectoff,
-% }
-% end
-%
-% function objects.restore(name)
-% local d = data[name]
-% if d then
-% texbox .objectbox = codeinjections.restore(d[1])
-% texdimen.objectwd = d[2]
-% texdimen.objectht = d[3]
-% texdimen.objectdp = d[4]
-% texdimen.objectoff = d[5]
-% else
-% texbox .objectbox = nil
-% texdimen.objectwd = 0
-% texdimen.objectht = 0
-% texdimen.objectdp = 0
-% texdimen.objectoff = 0
-% end
-% end
-%
-% function objects.reference(name)
-% local d = data[name]
-% texwrite((d and d[1]) or 0)
-% end
-%
-% function objects.enhance(name)
-% local d = data[name]
-% if d then
-% d[6] = texcount.realpageno
-% end
-% end
-%
-% function objects.page(name)
-% local d = data[name]
-% texwrite((d and d[6]) or texcount.realpageno)
-% end
-%
-% function objects.doifelse(name)
-% commands.testcase(data[name])
-% end
-% \stopluacode
-%
-% \unprotect
-%
-% \newbox \objectbox
-% \newtoks \everyobject
-% \newif \ifinobject
-%
-% \newdimen\objectoff \def\objectmargin{\the\objectoff}
-% \newdimen\objectwd \def\objectwidth {\the\objectwd }
-% \newdimen\objectht \def\objectheight{\the\objectht }
-% \newdimen\objectdp \def\objectdepth {\the\objectdp }
-%
-% \def\objectoffset{1cm}
-%
-% \everyobject{\the\pdfbackendeveryxform}
-%
-% \unexpanded\def\setobject #1#2{\begingroup\objectoff\objectoffset\inobjecttrue\the\everyobject\dowithnextbox{\pack_objects_set{#1}{#2}}}
-% \unexpanded\def\settightobject#1#2{\begingroup\objectoff\zeropoint \inobjecttrue\the\everyobject\dowithnextbox{\pack_objects_set{#1}{#2}}}
-%
-% \let\objectsetvbox\vbox %\def\objectsetvbox{\ruledvbox}
-% \let\objectgetvbox\vbox %\def\objectgetvbox{\ruledvbox}
-% \let\objectsethbox\hbox %\def\objectsethbox{\ruledhbox}
-% \let\objectgethbox\hbox %\def\objectgethbox{\ruledhbox}
-%
-% \unexpanded\def\pack_objects_set#1#2%
-% {\objectwd\wd\nextbox
-% \objectht\ht\nextbox
-% \objectdp\dp\nextbox
-% \ifdim\objectoff=\zeropoint\relax
-% \setbox\objectbox\box\nextbox
-% \else
-% \setbox\objectbox\objectsetvbox spread 2\objectoff{\vss\objectsethbox spread 2\objectoff{\hss\box\nextbox\hss}\vss}%
-% \fi
-% \ctxlua{objects.register("#1::#2")}%
-% \endgroup}
-%
-% \unexpanded\def\getobject#1#2%
-% {\begingroup
-% \ctxlua{objects.restore("#1::#2")}%
-% \ifdim\objectoff=\zeropoint\relax \else
-% \setbox\objectbox\objectgetvbox to \dimexpr\objectht+\objectdp\relax
-% {\vss\objectgethbox to \objectwd{\hss\box\objectbox\hss}\vss}%
-% \wd\objectbox\objectwd
-% \ht\objectbox\objectht
-% \dp\objectbox\objectdp
-% \fi
-% \box\objectbox
-% \endgroup}
-%
-% \unexpanded\def\getpageobject#1#2%
-% {\begingroup
-% \ctxlua{objects.restore("#1::#2")}%
-% \ifdim\objectoff=\zeropoint\relax
-% \setbox\objectbox\objectgethbox{\ctxlatelua{objects.enhance("#1::#2")}\box\objectbox}
-% \else
-% \setbox\objectbox\objectgetvbox to \dimexpr\objectht+\objectdp\relax
-% {\vss\objectgethbox to \objectwd{\ctxlatelua{objects.enhance("#1::#2")}\hss\box\objectbox\hss}\vss}%
-% \wd\objectbox\objectwd
-% \ht\objectbox\objectht
-% \dp\objectbox\objectdp
-% \fi
-% \box\objectbox
-% \endgroup}
-%
-% \unexpanded\def\setobjectdirectly #1#2{\ctxlua{objects.register("#1::#2")}}
-% \unexpanded\def\getobjectdirectly #1#2{\ctxlua{objects.restore ("#1::#2")}}
-% \unexpanded\def\getobjectdimensions #1#2{\ctxlua{objects.restore ("#1::#2")}}
-% \unexpanded\def\doifobjectfoundelse #1#2{\ctxlua{objects.doifelse("#1::#2")}}
-% \unexpanded\def\doifobjectreferencefoundelse#1#2{\ctxlua{objects.doifelse("#1::#2")}}
-%
-% \let\objectreferenced\relax
-% \let\driverreferenced\relax
-%
-% \unexpanded\def\pack_objects_register_reference{\writestatus{objects}{obsolete: register object reference}\gobblethreearguments}
-% \unexpanded\def\pack_objects_overload_reference{\writestatus{objects}{obsolete: overload object reference}\gobblethreearguments}
-% \unexpanded\def\dosetobjectreference {\writestatus{objects}{obsolete: set object reference}\gobblethreearguments}
-% \unexpanded\def\dosetdriverreference {\writestatus{objects}{obsolete: set driver reference}\gobblethreearguments}
-%
-% \def\defaultobjectreference{0}
-% \def\defaultobjectpage {\realfolio}
-%
-% \unexpanded\def\dogetobjectreference #1#2#3{\xdef#3{\ctxlua{objects.reference("#1::#2)}}}
-% \unexpanded\def\dogetobjectreferencepage#1#2#3{\xdef#3{\ctxlua{objects.page("#1::#2))}}}
-%
-% \protect
-%
-% \starttext
-% test \setobject{a}{b}\ruledhbox{xxx}\getobject{a}{b} test
-% \vskip3cm
-% test \settightobject{a}{b}\ruledhbox{xxx}\getobject{a}{b} test
-% test \settightobject{a}{c}\ruledhbox{xxx}\getobject{a}{c} test
-% \dorecurse{5000}{test \setobject{a}{b}\ruledhbox{xxx}\getobject{a}{b} test }
-% \stoptext
-
-%D \macros
-%D {setobject,getobject,ifinobject}
-%D
-%D Boxes can be considered reuable objects. Unfortunaltely once
-%D passed to the \DVI\ file, such objects cannot be reused. In
-%D \PDF\ however, reusing is possible and sometimes even a
-%D necessity. Therefore, \CONTEXT\ supports reusable objects.
-%D
-%D During the \TEX\ processing run, boxes can serve the purpose
-%D of objects, and the \DVI\ driver module implements objects
-%D using packed boxes.
-%D
-%D The \PDF\ and \PDFTEX\ driver modules implement objects
-%D using \PDF\ forms. There is no (real) restriction on the
-%D number of objects there.
-%D
-%D The first application of objects in \CONTEXT\ concerned
-%D \METAPOST\ graphics and fill||in form fields. The first
-%D application can save lots of bytes, while the latter use is
-%D more a necessity than byte saving.
-%D
-%D \starttyping
-%D \setobject{class}{name}\somebox{}
-%D \getobject{class}{name}
-%D \stoptyping
-%D
-%D Here \type{\somebox} can be whatever box specification suits
-%D \TEX. We save the dimensions of an object, although some
-%D drivers will do so themselves. This means that when for
-%D instance using \PDFTEX\ we could save a hash entry plus some
-%D 20+ memory locations per object by delegating this
-%D housekeeping to the driver. The current approach permits
-%D us to keep the box characteristic too.
-
-\installcorenamespace {objects}
-
-\newif\ifinobject % public (might become a conditional)
-
-\def\objectplaceholder{NOT YET FLUSHED}
-
-\unexpanded\def\presetobject#1#2% \global added
- {\ifcsname\??objects#1::#2\endcsname\else
- \global\expandafter\let\csname\??objects#1::#2\endcsname\objectplaceholder
- \fi}
-
-\unexpanded\def\pack_objects_set#1#2#3%
- {\ifcsname\??objects#2::#3\endcsname
- \expandafter\gobblefivearguments
- \else % tzt, overload internal referenced objects to save entries
- \expandafter\pack_objects_set_indeed
- \fi
- {#1}{#2}{#3}}
-
-\unexpanded\def\resetobject#1#2%
- {\letbeundefined{\??objects#1::#2}}
-
-%D \macros
-%D {finalizeobjectbox}
-%D
-%D This one provides a hook for last minute object box processing
-%D we need this in \MKIV.
-
-\ifdefined\finalizeobjectbox \else
- \let\finalizeobjectbox\gobbleoneargument
-\fi
-
-%D Somehow there is a rounding error problem in either \PDFTEX\
-%D or in viewers, or maybe it is conforming the specs. The next
-%D variable compensate for it by removing the rather tight
-%D clip.
-
-\def\objectoffset{1cm}
-
-\unexpanded\def\pack_objects_set_indeed#1#2#3%
- {\bgroup
- \globalpushmacro\crossreferenceobject
- \objectreferenced
- \inobjecttrue
- \dowithnextbox
- {\globalpopmacro\crossreferenceobject
- \pack_objects_set_indeed_indeed{#1}{#2}{#3}%
- \egroup}}
-
-% in luatex version < 66 we had a 1bp compensation (hardcoded in luatex)
-
-\let\pack_objects_handle\relax
-
-\unexpanded\def\pack_objects_set_indeed_indeed#1#2#3%
- {\begingroup
- \scratchdimen\objectoffset
- \expandafter\xdef\csname\??objects#2::#3\endcsname
- {\pack_objects_handle
- {#2}%
- {#3}%
- {\ifhbox\nextbox\hbox\else\vbox\fi}%
- {\number\wd\nextbox}%
- {\number\ht\nextbox}%
- {\number\dp\nextbox}%
- {\number\scratchdimen}}%
- \expanded % freeze the dimensions since \dostartobject may use \nextbox
- {\dostartobject{#2}{#3}{\the\wd\nextbox}{\the\ht\nextbox}{\the\dp\nextbox}}%
- \ifcase#1\relax\else \ifdim\objectoffset>\zeropoint
- \setbox\nextbox\vbox \s!spread 2\scratchdimen
- {\forgetall \offinterlineskip
- \vss\hbox \s!spread 2\scratchdimen{\hss\box\nextbox\hss}\vss}%
- \fi \fi
- \box\nextbox
- \dostopobject
- \endgroup}
-
-\unexpanded\def\getobject#1#2%
- {\ifcsname\??objects#1::#2\endcsname
- \begingroup
- \let\pack_objects_handle\pack_objects_get
- \csname\??objects#1::#2\expandafter\endcsname
- \else
- {\infofont[object #1::#2]}%
- \fi}
-
-\unexpanded\def\pack_objects_get#1#2#3#4#5#6#7% don't change this, should work for dvi & pdf
- {\forgetall
- % todo: if no attr then faster
- \setbox\scratchbox\vbox attr \viewerlayerattribute \attribute\viewerlayerattribute
- {\doinsertobject{#1}{#2}}%
- \setbox\scratchbox#3%
- {\vbox to #5\scaledpoint
- {\ifdim\ht\scratchbox>#5\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
- \vss\hbox to #4\scaledpoint{\box\scratchbox\hss}% fix Chof
- \fi\fi}}%
- \box\scratchbox
- \endgroup}
-
-%D If needed one can ask for the dimensions of an object with:
-%D
-%D \starttyping
-%D \getobjectdimensions{class}{name}
-%D \stoptyping
-%D
-%D The results are reported in \type {\objectwidth}, \type
-%D {\objectheight} and \type {\objectdepth}.
-
-\unexpanded\def\pack_objects_get_dimensions#1#2#3#4#5#6#7%
- {\def\objectwidth {#4\s!sp}%
- \def\objectheight{#5\s!sp}%
- \def\objectdepth {#6\s!sp}%
- \def\objectmargin{#7\s!sp}}
-
-\unexpanded\def\getobjectdimensions#1#2%
- {\let\pack_objects_handle\pack_objects_get_dimensions
- \let\objectwidth \!!zeropoint
- \let\objectheight\!!zeropoint
- \let\objectdepth \!!zeropoint
- \csname\??objects#1::#2\endcsname}
-
-%D Apart from this kind of objects, that have typeset content,
-%D we can have low level driver specific objects. Both types
-%D can have references to internal representations, hidden for
-%D the user. We keep track of such references by means of a
-%D dedicated cross reference mechanism. Normally, objects are
-%D defined before they are used, but forward referencing
-%D sometimes occurs.
-%D
-%D \starttyping
-%D \dosetobjectreference {class} {identifier} {reference value} {page}
-%D \dogetobjectreference {class} {identifier} \csname
-%D \stoptyping
-%D
-%D These commands are to be called by the \type{\startobject},
-%D \type{\stopobject} and \type{\insertobject} specials.
-
-\unexpanded\def\objectreferenced{\global\chardef\crossreferenceobject\plusone}
-\unexpanded\def\driverreferenced{\global\chardef\crossreferenceobject\zerocount}
-
-\objectreferenced
-
-% no undefined test ! ! ! ! (pdftex fails on undefined objects)
-
-\unexpanded\def\pack_objects_register_reference#1#2#3{\normalexpanded{\noexpand\ctxlatecommand{saveobject("#1::#2",#3,\noexpand\the\realpageno)}}}
-\unexpanded\def\pack_objects_overload_reference#1#2#3{\clf_setobject{#1::#2}#3 \realpageno\relax}
-
-\unexpanded\def\dosetobjectreference
- {\ifcase\crossreferenceobject
- \objectreferenced
- \expandafter\pack_objects_overload_reference
- \else
- \expandafter\pack_objects_register_reference
- \fi}
-
-\unexpanded\def\dosetdriverreference
- {\driverreferenced\dosetobjectreference}
-
-\def\defaultobjectreference#1#2{0} % driver dependent
-\def\defaultobjectpage #1#2{\realfolio}
-
-\unexpanded\def\dogetobjectreference #1#2#3{\xdef#3{\clf_objectnumber{#1::#2}{\defaultobjectreference{#1}{#2}}}}
-\unexpanded\def\dogetobjectreferencepage#1#2#3{\xdef#3{\clf_objectpage {#1::#2}{\defaultobjectpage {#1}{#2}}}}
-
-\unexpanded\def\setobject {\driverreferenced\pack_objects_set1}
-\unexpanded\def\settightobject{\driverreferenced\pack_objects_set0}
-
-%D \macros
-%D {doifobjectfoundelse,doifobjectreferencefoundelse}
-%D
-%D To prevent redundant definition of objects, one can use
-%D the next tests:
-%D
-%D \starttyping
-%D \doifobjectfoundelse{class}{object}{do then}{do else}
-%D \doifobjectreferencefoundelse{class}{object}{do then}{do else}
-%D \stoptyping
-
-\unexpanded\def\doifelseobjectfound#1#2%
- {\ifcsname\??objects#1::#2\endcsname
- \expandafter\firstoftwoarguments
- \else
- \expandafter\secondoftwoarguments
- \fi}
-
-\unexpanded\def\doifelseobjectreferencefound#1#2%
- {\clf_doifelseobjectreferencefound{#1::#2}}
-
-\let\doifobjectfoundelse \doifelseobjectfound
-\let\doifobjectreferencefoundelse\doifelseobjectreferencefound
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/ppchtex.mkii b/Master/texmf-dist/tex/context/base/ppchtex.mkii
deleted file mode 100644
index 07ca9789ac0..00000000000
--- a/Master/texmf-dist/tex/context/base/ppchtex.mkii
+++ /dev/null
@@ -1,3555 +0,0 @@
-%D \module
-%D [ file=ppchtex (m-chemie),
-%D version=1997.03.19,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=\PPCHTEX\ (Plain Pictex Context cHemie \TEX),
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D suggestions={Tobias Burnus, Dirk Kuypers \& Ton Otten}.
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%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, maybe ...
-
-% Deze module ondersteunt het zetten van chemische
-% (structuur)formules. Hoewel de macro' zijn afgestemd op
-% CONTEXT, zijn ze ook buiten deze zetomgeving te gebruiken.
-%
-% Dit is, afgezien van updates, de definitieve versie van
-% PPCHTEX. Gebruikersgemak, eenvoud, flexibiliteit, en
-% snelheid zijn inmiddels redelijk geoptimaliseerd. Dit neemt
-% niet weg dat hier en daar nog verbetering mogelijk is. Dit
-% zal dan ook nog gebeuren.
-%
-% Volgende versies zullen tenminste dezelfde functionaliteit
-% hebben. We houden ons natuurlijk het recht voor de kwaliteit
-% van de output te verbeteren. Daarnaast staan nog op het
-% wensenlijstje:
-%
-% - optimaliseren in termen van proces-tijd
-% - aanpassen naamgeving van interne macro's
-% - toevoegen van functionaliteit
-% - in \x!-vorm omzetten van GIVES, TB enz.
-%
-% De mix tussen engels en nederlands lijkt soms verwarrend.
-% Meestal zijn verborgen macro's engels en zichtbare macro's
-% nederlands. Het gebruik van [ ] en { } sluit aan op andere
-% Context-macro's. Hetzelfde geldt voor instellingen en
-% \start-\stop-constructies.
-%
-% De schijnbaar overbodige \bgroup-\egroup constructie
-% garandeert aansluiting bij de Context-macro's voor het
-% plaatsen van figuren, tabellen en andere floats.
-%
-% Binnen Context worden de macro's geladen met
-% \gebruikextras[chemie]. Daarbij wordt een passende melding
-% getoont. Buiten Context genereren we een melding:
-
-\doifundefined{usemodule}
- {\writestatus{loading}{ConTeXt Chemical Macro's / 1996.3.1}}
-
-% Er kan gebruik worden gemaakt van PiCTeX of PStricks. Een
-% van deze pakketten moet van te voren zijn geladen.
-%
-% \input prepictex.tex (i.g.v. LaTeX)
-% \input pictex.tex
-% \input postpictex.tex (i.g.v. LaTeX)
-%
-% of:
-%
-% \input multido.tex
-% \input pstricks.tex
-% \input pst-plot.tex
-%
-% In \CONTEXT\ kan men de modules m-pictex en m-pstricks
-% gebruiken. De eerste module laad of efficiente wijze PiCTeX
-% en de tweede module koppelt het PSTRICKS kleurmechanisme
-% aan dat van \CONTEXT.
-%
-
-% PSTricks: {-\chemicalangle} instead of {*0}, which produces
-% faulty ps code when \chemicalangle=0
-
-\startcommands dutch english german
-
- gotochemical: naarchemie gotochemical zurchemie
- setupchemical: stelchemiein setupchemical stellechemieein
- startchemical: startchemie startchemical startchemie
- stopchemical: stopchemie stopchemical stopchemie
- definechemical: definieerchemie definechemical definierechemie
- chemical: chemie chemical chemie
- toptext: boventekst toptext textueber
- bottext: ondertekst bottext textunter
- midtext: middentekst midtext textmitte
-
-\stopcommands
-
-\doifundefined{fiverm} % In the more recent LaTeX versions
- {\font\fiverm=cmr5 } % \fiverm is no longer (pre)defined.
-
-\doifdefinedelse{beginpicture} % PiCTeX
- {\doifdefinedelse{startMPdrawing}
- {\chardef\chemicaldrawingmode=2 } % MetaPost
- {\chardef\chemicaldrawingmode=0 }} % raw
- {\doifdefinedelse{psaxes}
- {\chardef\chemicaldrawingmode=1 } % PSTricks
- {\chardef\chemicaldrawingmode=3 }} % unknown
-
-\ifcase\chemicaldrawingmode
- \writestatus{ppchtex}{using PiCTeX}
-\or
- \writestatus{ppchtex}{using PSTricks (still experimental)}
- \writestatus{ppchtex}{automatic sizing not (yet) supported}
-\or
- \writestatus{ppchtex}{using PiCTeX and MetaPost}
-\else
- \writestatus{ppchtex}{load PiCTeX (+pre/post) or PSTricks (+pst_plot) first}
- \bgroup
- \read16 to \exit
- \egroup
- \expandafter\endinput
-\fi
-
-% De onderstaande help-informatie (%I) kan worden opgeroepen
-% in TeXEdit. De daaropvolgende setup-informatie (%S) kan
-% nadat zij is uit deze file is gefilterd met TeXUtil, in
-% handleidingen worden gebruikt. In deze file opgenomen
-% documentatie (%D en %M) kan worden gebruikt voor een
-% technische handleiding. Met %T kunnen templates worden
-% gedefinieerd voor TeXEdit.
-
-%I n=Chemie
-%I c=\stelchemiein,\chemie
-%I
-%I Chemische formules kunnen worden gezet met behulp van de
-%I onderstaande commando's:
-%I
-%I buiten $ en $$ :
-%I
-%I \chemie[segmenten][symbolen]
-%I
-%I \startchemie[instellingen]
-%I \chemie...
-%I \chemie...
-%I \stopchemie
-%I
-%I en binnen $ en $$:
-%I
-%I \chemie{}{}
-%I
-%I Voor tekst, uitleg en voorbeelde verwijzen we vooralsnog
-%I naar de handleiding.
-%P
-%I Het gedrag van de macro's kan worden ingesteld met:
-%I
-%I \stelchemiein[breedte=,hoogte=,links=,rechts=,boven=,
-%I onder=,korps=,schaal=,status=,assenstelsel=,kader=,
-%I variant=,optie=,formaat=,tekstformaat=,resolutie=,
-%I offset=,letter=]
-%I
-%I Structuren kunnen worden voorgedefinieerd met het commando
-%I
-%I \definieerchemie[naam]{\chemie...}
-
-%S \startsetup
-%S \command
-%S [\!stelchemiein]
-%S \type
-%S [\c!vars!]
-%S \variable
-%S [\c!breedte]
-%S [\c!number!,\v!passend]
-%S [0]
-%S \variable
-%S [\c!hoogte]
-%S [\c!number!,\v!passend]
-%S [0]
-%S \variable
-%S [\c!links]
-%S [\c!number!]
-%S [0]
-%S \variable
-%S [\c!rechts]
-%S [\c!number!]
-%S [0]
-%S \variable
-%S [\c!boven]
-%S [\c!number!]
-%S [0]
-%S \variable
-%S [\c!onder]
-%S [\c!number!]
-%S [0]
-%S \variable
-%S [\c!resolutie]
-%S [\c!number!]
-%S [\outputresolution]
-%S \variable
-%S [\c!korps]
-%S [10pt,11pt,12pt]
-%S [\bodyfontsize]
-%S \variable
-%S [\c!schaal]
-%S [\v!klein,\v!middel,\v!groot]
-%S [\v!middel]
-%S \variable
-%S [\c!formaat]
-%S [\v!klein,\v!middel,\v!groot]
-%S [\v!groot]
-%S \variable
-%S [\c!tekstformaat]
-%S [\v!klein,\v!middel,\v!groot]
-%S [\v!groot]
-%S \variable
-%S [\c!status]
-%S [\v!start,\v!stop]
-%S [\v!start]
-%S \variable
-%S [\c!kader]
-%S [\v!aan,\v!uit]
-%S [\v!uit]
-%S \variable
-%S [\c!assenstelsel]
-%S [\v!aan,\v!uit]
-%S [\v!uit]
-%S \variable
-%S [\c!optie]
-%S [\v!test]
-%S []
-%S \variable
-%S [\c!variant]
-%S [1,2]
-%S [1]
-%S \variable
-%S [\c!offset]
-%S [HIGH,LOW]
-%S [LOW]
-%S \variable
-%S [\c!letter]
-%S [\c!command!]
-%S [\rm]
-%S \stopsetup
-
-%S \startsetup
-%S \command
-%S [\v!startchemie]
-%S \type
-%S [\c!vars!\c!stp!]
-%S \inheritvariable
-%S [\v!stelchemiein]
-%S []
-%S \stopsetup
-
-%S \startsetup
-%S \command
-%S [\v!chemie]
-%S \type
-%S [\c!vals!\c!vals!]
-%S \value
-%S [\c!list!]
-%S []
-%S \value
-%S [\c!list!]
-%S []
-%S \stopsetup
-
-%S \startsetup
-%S \command
-%S [definieerchemie]
-%S \type
-%S [\c!val!\c!arg!]
-%S \value
-%S [\c!text!]
-%S []
-%S \stopsetup
-
-\unprotect
-
-% Om te voorkomen dat sub- en superscripts botsen passen we
-% wat fontdimen's aan (Knuth, The TeXBook, p179). Helaas
-% kunnen deze instellingen niet lokaal worden gehouden door
-% groeperen, vandaar dat een en ander moet worden geset ‚n
-% gereset.
-%
-% Er dient een relatie te worden gelegd met de afmetingen
-% van de letters. In een eerdere versie werden daartoe de
-% \fontdimen's opgehoogd. Omdat dit problemen gaf bij
-% scaled fonts, is bij nader inzien gekozen voor de
-% onderstaande oplossing, waarbij de nieuwe waarden worden
-% afgeleid van de x-height (\fontexheight). De factor 0.70
-% is min of meer experimenteel vastgesteld. Soms worden de
-% regels iets verder uit elkaar gezet. Jammer. Italic fonts
-% hebben grotere cijfers en vallen min of meer uit de boot.
-
-\newif\ifloweredsubscripts
-
-% Due to some upward incompatibality of LaTeX to LaTeX2.09
-% and/or LaTeX2e we had to force \@@dochemicalstyle. Otherwise
-% some weird \nullfont error comes up.
-
-\def\beginlatexmathmodehack
- {\ifmmode
- \let\endlatexmathmodehack=\relax
- \else
- \def\endlatexmathmodehack{$}$\@@dochemicalstyle\empty
- \fi}
-
-\def\setsubscripts%
- {\beginlatexmathmodehack
- \def\dosetsubscript##1##2##3%
- {\dimen0=##3\fontexheight##2%
- \setxvalue{@@\string##1\string##2}{\the##1##2\relax}%
- ##1##2=\dimen0\relax}%
- \def\dodosetsubscript##1##2%
- {\dosetsubscript{##1}{\textfont 2}{##2}%
- \dosetsubscript{##1}{\scriptfont 2}{##2}%
- \dosetsubscript{##1}{\scriptscriptfont2}{##2}}%
- %dodosetsubscript\mathsupnormal {?}%
- \dodosetsubscript\mathsubnormal {.7}%
- \dodosetsubscript\mathsubcombined{.7}%
- \global\loweredsubscriptstrue
- \endlatexmathmodehack}
-
-\def\resetsubscripts
- {\ifloweredsubscripts
- \beginlatexmathmodehack
- \def\doresetsubscript##1##2%
- {\dimen0=\getvalue{@@\string##1\string##2}\relax
- ##1##2=\dimen0}%
- \def\dodoresetsubscript##1%
- {\doresetsubscript{##1}{\textfont2}%
- \doresetsubscript{##1}{\scriptfont2}%
- \doresetsubscript{##1}{\scriptscriptfont2}}%
- %dodoresetsubscript\mathsupnormal
- \dodoresetsubscript\mathsubnormal
- \dodoresetsubscript\mathsubcombined
- \global\loweredsubscriptsfalse
- \endlatexmathmodehack
- \fi}
-
-\ifx\Umathchar\undefined \else
- % for the moment we nil them, soon we will have a proper
- % way to deal with this
- \let\setsubscripts \relax
- \let\resetsubscripts\relax
-\fi
-
-\def\doresetsubscripts
- {\resetsubscripts}
-
-\def\sethighsubscripts
- {\resetsubscripts
- \let\dosetsubscripts=\relax}
-
-\def\setlowsubscripts
- {\def\dosetsubscripts{\setsubscripts}}
-
-\setlowsubscripts
-
-\newcount\horchemical % t.z.t. \newcounter
-\newcount\verchemical % t.z.t. \newcounter
-\newcount\txtchemical % t.z.t. \newcounter
-\newcount\levchemical % t.z.t. \newcounter
-
-\newif\ifinchemical \inchemicalfalse
-\newif\iffixedchemical \fixedchemicalfalse
-
-\newbox\chemicalsymbols
-
-% Eigenlijk moeten de constanten en variabelen in cont-nl.tex
-% staan. Dit pakket is echter relatief onafhankelijk van CONTEXT.
-
-\definesystemvariable {chemical}
-
-\definesystemconstant {chemical}
-
-\definesystemconstant {translate}
-\definesystemconstant {distance}
-\definesystemconstant {mirror}
-\definesystemconstant {rotate}
-\definesystemconstant {substitute}
-\definesystemconstant {angle}
-
-\definesystemconstant {executechemical}
-\definesystemconstant {chemicaltextelement}
-\definesystemconstant {chemicallinesegment}
-\definesystemconstant {chemicalcircsegment}
-
-\def\chemicalspace {\quad}
-
-% begin van experiment:
-%
-% De onderstaande twee macro's kunnen worden gebruikt voor
-% bijvoorbeeld een interactiemechanisme.
-%
-% \localgotochemical {verwijzing} {tekst}
-% \localthisischemical {verwijzing}
-
-\def\dowithchemical%
- {}
-
-\doifdefinedelse{@@iastate}
- {\def\localgotochemical#1#2{\naarbox{#2}[#1]}%
- \def\localthisischemical#1{\pagereference[#1]}}
- {\def\localgotochemical#1{}%
- \def\localthisischemical#1{}}
-
-% eind van experiment
-
-\def\setchemicalmaximum #1
- {\def\maxchemical{#1}}
-
-\def\doifchemicalnumber#1#2#3%
- {\doifnumberelse{#1}
- {\ifnum#1>\maxchemical\relax
- \writestatus{ppchtex}{number #1 is skipped}%
- \else
- #3%
- \fi}
- {\unknownchemical{#2}}}%
-
-\newif\ifsmallchemicaltext
-
-\let\@@localchemicalstyle\empty
-
-\def\setupchemicalformat[#1]%
- {\processaction
- [\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!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!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
- \@@localchemicalformat
- \else
- \@@localchemicalstyle
- \fi}
-
-\def\dosetupchemical[#1]%
- {\getparameters[\??chemical\s!chemical][#1]%
- \doifelse{\@@chemicalchemicaloffset}{LOW}
- {\setlowsubscripts}
- {\sethighsubscripts}%
- \setupchemicalformat[\??chemical\s!chemical]%
- \ignorespaces}
-
-\def\setupchemical
- {\dosingleargument\dosetupchemical}
-
-\def\@@dochemicalstyle% % default mapping
- {\@@chemicalstyle}
-
-\def\@@dochemicalcolor% % no mapping yet
- {}
-
-\def\@@chemicalstyle % $inner-style$ % (overloaded)
- {\@@chemicalchemicalstyle} % $$outer-style$$
-
-\def\@@writechemicalstate#1#2%
- {}
-
-\def\@@beginchemicallocalpicture
- {\ifcase\chemicaldrawingmode
- \beginpicture
- \or
- \pspicture(0,0)(0,0) % is this permitted ?
- \or
- \pushMPdrawing
- \startMPdrawing
- %prologues := 1 ;
- %input mp-tool ;
- u := 10*\@@chemicalunit;
- bboxmargin := 0pt ;
- pickup pencircle scaled 2u ; % ???
- \stopMPdrawing
- \beginpicture
- \fi}
-
-\def\@@endchemicallocalpicture#1#2%
- {\ifcase\chemicaldrawingmode
- \endpicture
- \or
- \endpspicture
- \or
- \resetchemicalcoordinates
- \setbox2\hbox{\MPshiftdrawingtrue\MPstaticgraphictrue\getMPdrawing}%
- \wd2=\!!zeropoint
- \ht2=\!!zeropoint
- \dp2=\!!zeropoint
- \put {\box2} at 0 0
- \endpicture
- \popMPdrawing
- \fi}
-
-\def\@@beginchemicalpicture#1#2#3#4%
- {\ifnum\chemicaldrawingmode=1
- \pspicture(#1,#3)(#2,#4)%
- \def\account##1##2{}%
- \psaxes[axesstyle=none,labels=none,ticks=none](#1,#3)(#2,#4)%
- \else
- \beginpicture
- \setplotarea
- x from {#1} to {#2},
- y from {#3} to {#4}
- \iffixedchemical
- \accountingon
- \def\account##1##2%
- {\put {} at {##1} {##2} }%
- \else
- \accountingoff
- \def\account##1##2{}%
- \fi
- \fi
- \ignorespaces}
-
-\def\@@endchemicalpicture%
- {\ifcase\chemicaldrawingmode
- \put {\box\chemicalsymbols} at 0 0 % elders
- \endpicture
- \or
- \rput(0,0){\box\chemicalsymbols}%
- \endpspicture
- \or
- \put {\box\chemicalsymbols} at 0 0 % elders
- \ifMPdrawingdone
- \resetchemicalcoordinates
- \setbox2\hbox{\MPshiftdrawingtrue\MPstaticgraphictrue\getMPdrawing}%
- \wd2=\!!zeropoint
- \ht2=\!!zeropoint
- \dp2=\!!zeropoint
- \put {\box2} at 0 0 %
- \fi
- \endpicture
- \fi}
-
-\def\@@setchemicalcoordinatesystem#1%
- {\edef\@@chemicalunit{#1}%
- \ifcase\chemicaldrawingmode
- \setcoordinatesystem units <\@@chemicalunit,\@@chemicalunit> %
- \or
- \psset{unit=\@@chemicalunit}%
- \or
- \setcoordinatesystem units <\@@chemicalunit,\@@chemicalunit> %
- \startMPdrawing
- %input mp-tool ;
- %prologues := 1 ;
- u := 10*#1;
- bboxmargin := 0pt ;
- pickup pencircle scaled 2u ; % ???
- \stopMPdrawing
- \fi}
-
-\ifx\MPdivten\undefined % hack to prevent overflows in mp
- \def\MPdivten[#1]{\withoutpt\the\dimexpr#1pt/10\relax}
-\fi
-
-\def\@@setchemicalaxis#1#2#3#4%
- {\ifcase\chemicaldrawingmode
- \axis
- bottom shiftedto y=0
- ticks from {#1} to {#2} by 500 /
- \axis
- left shiftedto x=0
- ticks from {#3} to {#4} by 500 / %
- \or
- \psaxes[labels=none,Dx=500,Dy=500](0,0)(#1,#3)(#2,#4)%
- \or
- \global\MPdrawingdonetrue
- % we need to div beforehand because of mp limitations
- \startMPdrawing
- x1 := \MPdivten[#1]u ; x2 := \MPdivten[#2]u;
- y1 := \MPdivten[#3]u ; y2 := \MPdivten[#4]u;
- draw z1--(x2,y1)--z2--(x1,y2)--cycle ;
- d := 50u ; dd := 10u ;
- draw (x1,0)--(x2,0) ;
- draw (0,y1)--(0,y2) ;
- for i=d step -d until x1: draw (i,dd)--(i,-dd) ; endfor ;
- for i=d step d until x2: draw (i,dd)--(i,-dd) ; endfor ;
- for i=d step -d until y1: draw (-dd,i)--(dd,i) ; endfor ;
- for i=d step d until y2: draw (-dd,i)--(dd,i) ; endfor ;
- \stopMPdrawing
- \fi}
-
-\def\@@setsecondchemicalplotsymbol%
- {\ifcase\chemicaldrawingmode
- \!!widtha=50.8mm
- \divide\!!widtha by \@@chemicalresolution\relax
- \plotsymbolspacing=\!!widtha
- \setplotsymbol({\vrule\!!height\!!widtha\!!width\!!widtha})%
- \fi}
-
-% Something for Dirk:
-
-\newcount \currentchemical
-
-%\newif \ifskipchemical
-
-\def\setchemicaldimensions#1#2#3%
- {\bgroup
- \global\advance\currentchemical by 1
- \dimen0=#1\relax
- \dimen2=#2\relax
- \dimen4=#3\relax
- \setxvalue{chemical::\the\currentchemical}%
- {\noexpand\docommand{\the\dimen0}{\the\dimen2}{\the\dimen4}}%
- \egroup}
-
-%\def\getchemicaldimensions#1#2#3%
-% {\global\advance\currentchemical by 1
-% \def\docommand##1##2##3%
-% {#1=##1\relax#2=##2\relax#3=##3\relax}%
-% \doifdefinedelse{chemical::\the\currentchemical}
-% {\getvalue{chemical::\the\currentchemical}}
-% {\docommand{6cm}{4cm}{0cm}}}
-%
-%\def\savechemicaldimensions%
-% {\bgroup
-% \writestatus{ppchtex}{saving dimensions in ppchtex.dim}%
-% \def\docommand##1##2##3%
-% {\immediate\write\scratchwrite
-% {\noexpand\setchemicaldimensions{##1}{##2}{##3}}}%
-% \immediate\openout\scratchwrite=ppchtex.dim
-% \scratchcounter=0
-% \loop
-% \ifnum\scratchcounter<\currentchemical
-% \advance\scratchcounter by 1
-% \getvalue{chemical::\the\scratchcounter}%
-% \repeat
-% \immediate\closeout\scratchwrite
-% \egroup}
-%
-%\def\loadchemicaldimensions% oh, how nice it would be to use
-% {\bgroup % one of the context read commands
-% \global\currentchemical=0
-% \immediate\openin\scratchread=./ppchtex.dim
-% \ifeof\scratchread
-% \immediate\closein\scratchread
-% \global\skipchemicalfalse
-% \else
-% \immediate\closein\scratchread
-% \input ./ppchtex.dim\relax
-% \ifnum\currentchemical>0
-% \writestatus{ppchtex}{loading dimensions from ppchtex.dim}%
-% \global\skipchemicaltrue
-% \else
-% \global\skipchemicalfalse
-% \fi
-% \global\currentchemical=0
-% \global\let\savechemicaldimensions=\relax
-% \fi
-% \egroup
-% \global\let\loadchemicaldimensions=\relax}
-
-\ifx\normalchemicalframe\undefined
- \let\normalchemicalframe\hbox % hook for educational purposes
-\fi
-
-\unexpanded\def\complexstartchemical[#1]%
- {\copyparameters
- [\??chemical][\??chemical\s!chemical]
- [\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!factor,
- \c!location,\c!option,\c!alternative,\c!resolution,\c!offset,\c!style,
- \c!color,\c!rulecolor,\c!rulethickness]%
- \getparameters
- [\??chemical]
- [#1]%
- %
- \setupchemicalformat[\??chemical]%
- %
- \ifnum\chemicaldrawingmode=2
- \resetMPdrawing
- \fi
- %
- \doif{\@@chemicalalternative}{2}
- {\@@setsecondchemicalplotsymbol}%
- %
- \doif{\@@chemicalaxis}\v!on
- {\let\chemicalframe\hbox}%
- %
- \!!counta=250000
- \divide\!!counta by \@@localchemicalscale
- \!!widtha=\@@chemicalbodyfont
- \divide\!!widtha by \!!counta
- \@@setchemicalcoordinatesystem{\the\!!widtha}%
- %
- % \!!counta = -x \!!countc = -y
- % \!!countb = +x \!!countd = +y
- %
- \def\calculateaxis##1##2##3##4##5%
- {##1=##3\relax
- ##2=##4\relax
- \ifnum##5=0
- \ifnum##3=0
- \ifnum##4=0
- ##1=2000
- ##2=2000
- \fi
- \fi
- \else
- \ifnum##3=0
- \ifnum##4=0
- ##1=##5\relax
- \divide##1 by 2
- ##2=##1\relax
- \else
- ##1=##5\relax
- \advance##1 by -##2\relax
- \fi
- \else
- \ifnum##4=0
- ##2=##5\relax
- \advance##2 by -##1\relax
- \fi
- \fi
- \fi}%
- \fixedchemicalfalse
- \doif\@@chemicalwidth\v!fit
- {\edef\@@chemicalwidth
- {\ifnum\chemicaldrawingmode=1 2000 \else 1 \fi}%
- \fixedchemicaltrue}%
- \doif\@@chemicalheight\v!fit
- {\edef\@@chemicalheight
- {\ifnum\chemicaldrawingmode=1 2000 \else 1 \fi}%
- \fixedchemicaltrue}%
- \doifelse\@@chemicallocation\v!intext
- {\!!counta=0 \!!countb=0
- \!!counta=0 \!!countd=0 }
- {\calculateaxis
- \!!counta\!!countb
- \@@chemicalleft\@@chemicalright\@@chemicalwidth
- \calculateaxis
- \!!countc\!!countd
- \@@chemicalbottom\@@chemicaltop\@@chemicalheight}%
- %
- \edef\@@chemheight {\the\!!countc}%
- \edef\@@chemdepth {\the\!!countd}%
- \edef\@@chemicaltop {\the\!!countc}%
- \edef\@@chemicalbottom{\the\!!countd}%
- %
- \doifinsetelse\v!on{\@@chemicalframe,\@@chemicalaxis}
- {\def\@@chemicalborder{\chemicalframe}}
- {\def\@@chemicalborder{\normalchemicalframe}}%
- %
- \setbox0=\hbox\bgroup % this was a \vbox which took \hsize
- %
- \@@beginchemicalpicture
- {-\the\!!counta}{\the\!!countb}
- {-\the\!!countc}{\the\!!countd}%
- \doif{\@@chemicalstate}\v!start
- {\doif\@@chemicalaxis\v!on
- {\@@setchemicalaxis
- {-\the\!!counta}{\the\!!countb}
- {-\the\!!countc}{\the\!!countd}}}%
- \doifelse\@@chemicaloption\v!test
- {\def\@@writechemicalstate##1##2%
- {\convertargument##2\to\ascii
- \writestatus{##1}{\ascii}}}
- {\def\@@writechemicalstate##1##2{}}%
- \ignorespaces}
-
-\def\dostartchemical%
- {\catcode`\^=\@@superscript% t.b.v. \enableduplication
- \catcode`\_=\@@subscript % t.b.v. de zekerheid
- \begingroup
- \inchemicaltrue
- \def\toptext##1{\gdef\thetoptext{##1}\ignorespaces}\toptext{}%
- \def\bottext##1{\gdef\thebottext{##1}\ignorespaces}\bottext{}%
- \def\midtext##1{\gdef\themidtext{##1}\ignorespaces}\midtext{}%
- \def\@@chemicalpostponed{}%
- \complexorsimpleempty\startchemical}
-
-\def\startchemical
- {\bgroup % t.b.v. ungrouped floats
-% \loadchemicaldimensions
-% \ifskipchemical
-% \def\dostartchemical%
-% {\def\dummy[####1]{}\dosingleempty\dummy}%
-% \def\chemical%
-% {\def\dummy[####1][####2][####3]{}\dotripleempty\dummy}%
-% \def\toptext##1{}%
-% \def\midtext##1{}%
-% \def\bottext##1{}%
-% \fi
- \dostartchemical}
-
-\def\stopchemical
- {%\ifskipchemical
- % \getchemicaldimensions{\dimen0}{\dimen2}{\dimen4}%
- % \dimen8=\dimen2\advance\dimen8 by \dimen4
- % \setbox0=\vbox to \dimen8
- % {\vss\hbox to \dimen0{\hss\the\currentchemical\hss}\vss}%
- % \wd0=\dimen0\ht0=\dimen2\dp0=\dimen4
- % \chemicalframe{\box0}%
- %\else
- \checkchemicalpicture
- \@@endchemicalpicture
- \egroup
- \ifnum\chemicaldrawingmode=1
- \dimen0=\@@chemicalunit
- \setbox0=\hbox{\lower\@@chemdepth\dimen0\box0}%
- \ht0=\@@chemheight\dimen0
- \dp0=\@@chemdepth\dimen0
- \fi
- \dimen0=\ht0
- \advance\dimen0 by \dp0
- \inchemicalfalse % enables \chemie{} in text
- \setbox4=\alignedchemical\themidtext
- \setbox6=\alignedchemical\thetoptext
- \setbox8=\alignedchemical\thebottext
- \setbox4=\hbox to \wd0
- {\strut\hss$\vcenter{\box4}$\hss}%
- \setbox2=\vbox to \dimen0
- {\hbox to \wd0{\strut\hss\box6\hss}
- \vfill
- \hbox to \wd0{\strut\hss\box8\hss}
- \vss}% disables the depth
- \wd0=0pt \wd4=0pt
- \ht2=\ht0 \dp2=\dp0
- \ht4=\ht0 \dp4=\dp0
- %\setchemicaldimensions{\wd2}{\ht2}{\dp2}%
- \@@chemicalborder{\box0\box4\box2}% text on top of chemicals
- \endgroup
- %\fi
- \ignorespaces
- \egroup} % t.b.v. ungrouped floats
-
-\def\alignedchemical#1%
- {\vtop
- {\def\par{\egroup\hbox\bgroup\strut}%
- \let\\=\par
- \let\endgraf=\par
- \hbox\bgroup\strut#1\egroup}}
-
-% \setchemicalcoordinates{#1}{#2}
-%
-% #1: verplaatsing in x-richting
-% #2: verplaatsing in y-richting
-
-\newif\ifchemicaldirection
-
-\def\checkchemicaldirection#1#2%
- {\ifchemicaldirection
- \ifnum#1>0 \advance\horchemical -\chemicaldirection \fi
- \ifnum#1<0 \advance\horchemical +\chemicaldirection \fi
- \ifnum#2>0 \advance\verchemical -\chemicaldirection \fi
- \ifnum#2<0 \advance\verchemical +\chemicaldirection \fi
- \chemicaldirectionfalse
- \fi}
-
-\def\processchemicaldirection%
- {\chemicaldirectiontrue\processchemicaltranslate}
-
-\def\setchemicalcoordinates#1#2%
- {\advance\horchemical #1\relax
- \advance\verchemical #2\relax
- \checkchemicaldirection{#1}{#2}%
- \!!counta=-\horchemical\edef\chemicalxoffset{\the\!!counta}%
- \!!countb=-\verchemical\edef\chemicalyoffset{\the\!!countb}%
- \ifnum\chemicaldrawingmode=1
- % njet
- \else
- \setcoordinatesystem point at {\the\horchemical} {\the\verchemical}
- \fi}
-
-\def\resetchemicalcoordinates
- {\horchemical=0
- \verchemical=0
- \edef\chemicalxoffset{0}%
- \edef\chemicalyoffset{0}%
- \ifnum\chemicaldrawingmode=1
- % njet
- \else
- \setcoordinatesystem point at 0 0
- \fi}
-
-\def\restorechemicalcoordinates
- {%\writestatus{ppchtex}{restoring \the\horchemical,\the\verchemical}%
- \edef\chemicalxoffset{\the\horchemical}%
- \edef\chemicalyoffset{\the\verchemical}%
- \ifnum\chemicaldrawingmode=1
- % njet
- \else
- \setcoordinatesystem point at {\the\horchemical} {\the\verchemical}
- \fi}
-
-\def\setchemicaltranslate #1 #2 #3
- {\setvalue{\s!translate#1}{\setchemicalcoordinates{#2}{#3}}}
-
-\def\processchemicaltranslate#1%
- {\def\doprocess[##1##2]%
- {\doifchemicalnumber{##1}{MOV#1}
- {\ifnum##1=0
- \def\chemicaloffset{0}% incompatible change
- \resetchemicalcoordinates
- \else
- \getvalue{\s!translate##1}%
- \dochemicaloffset{##1}%
- \def\chemicaloffset{0}%
- \fi}}%
- \doprocess[#1]}
-
-\def\setchemicaldistance #1
- {\setvalue{\s!distance1}{\setchemicalcoordinates{-#1}{ 0}}%
- \setvalue{\s!distance2}{\setchemicalcoordinates{ 0}{ #1}}%
- \setvalue{\s!distance3}{\setchemicalcoordinates{ #1}{ 0}}%
- \setvalue{\s!distance4}{\setchemicalcoordinates{ 0}{-#1}}}
-
-\def\setchemicaldirection #1
- {\def\chemicaldirection{#1}}
-
-\def\processchemicaldistance#1%
- {\def\doprocess[##1##2]%
- {\doifchemicalnumber{##1}{ADJ#1}
- {\ifnum##1=0
- \resetchemicalcoordinates
- \else
- \def\@@chemicalpostponed{\getvalue{\s!distance##1}}%
- \@@chemicalpostponed
- \fi}}%
- \doprocess[#1]}
-
-\def\setchemicalsubstitute #1
- {\setvalue{\s!substitute1}{\setchemicalcoordinates{-#1}{ 0}}%
- \setvalue{\s!substitute2}{\setchemicalcoordinates{ 0}{ #1}}%
- \setvalue{\s!substitute3}{\setchemicalcoordinates{ #1}{ 0}}%
- \setvalue{\s!substitute4}{\setchemicalcoordinates{ 0}{-#1}}}
-
-\def\processchemicalsubstitute#1%
- {\def\doprocess[##1##2]%
- {\doifchemicalnumber{##1}{SUB#1}
- {\ifnum##1=0
- \resetchemicalcoordinates
- \else
- \def\@@chemicalpostponed{\getvalue{\s!substitute##1}}%
- \@@chemicalpostponed
- \fi}}%
- \doprocess[#1]}
-
-% Het is mogelijk een offset of move meerdere malen uit te
-% voeren, door een nummer voor het commando te plaatsen.
-
-\def\chemicalrepeat {1}
-
-\def\redoprocesschemical[#1#2]%
- {\doifinstringelse{#1}{0123456789.}
- {\edef\chemicalrepeat{\chemicalrepeat#1}%
- \redoprocesschemical[#2]}
- {\processchemical[#1#2]%
- \def\chemicalrepeat{1}}}
-
-\def\doprocesschemical[#1#2]#3%
- {\doifinstringelse{#1}{0123456789.}
- {\def\chemicalrepeat{#1}%
- \redoprocesschemical[#2]}
- {#3}}
-
-% \dochemicaloffset{#1}
-%
-% #1: binding
-
-\def\chemicaloffset{0}
-
-\def\processchemicaloffset#1%
- {\dimen0=62500 sp % real calc on cardinals, funny number
- \dimen0=\chemicalrepeat\dimen0
- \divide\dimen0 by \@@localchemicalscale
- \!!counta=\dimen0
- \def\doprocess[##1##2]%
- {\doifinstringelse{##1}{128}
- {\edef\chemicaloffset{\the\!!counta}}
- {\doifinstringelse{##1}{456}
- {\edef\chemicaloffset{-\the\!!counta}}
- {\doifelse{##1}{0}
- {\edef\chemicaloffset{0}}
- {\unknownchemical{OFF#1}}}}}%
- \doprocess[#1]}
-
-\def\dochemicaloffset#1%
- {\ifnum\chemicaloffset=0
- \def\undochemicaloffset{}%
- \else
- \setchemicalcoordinates{-\chemicaloffset}{0}%
- \def\undochemicaloffset%
- {\setchemicalcoordinates{\chemicaloffset}{0}%
- \def\undochemicaloffset{}}%
- \fi}
-
-\def\processchemicalphantom#1#2%
- {\setbox0=\hbox
- {\def\splitoff##1????{##1}%
- $\@@dochemicalstyle{\@@localchemicalformat\splitoff#2}$}%
- \dimen0=.25\wd0
- \divide\dimen0 by \@@localchemicalscale
- \!!counta=\dimen0
- \doifinstringelse{#1}{128}
- {\edef\chemicaloffset{\the\!!counta}}
- {\doifinstringelse{#1}{456}
- {\edef\chemicaloffset{-\the\!!counta}}
- {\doifelse{#1}{0}
- {\edef\chemicaloffset{0}}
- {\unknownchemical{OF#1:#2}}}}}
-
-% \dosetchemicalrotation{#1}{#2}
-%
-% #1: cos(phi)
-% #2: sin(phi)
-
-\def\chemicalrotation {1}
-\def\chemicalangle {0}
-\def\chemicalxoffset {0}
-\def\chemicalyoffset {0}
-
-\def\setchemicalmirror#1%
- {\setvalue{\s!mirror#1}{*}}
-
-\def\resetchemicalmirror#1%
- {\resetvalue{\s!mirror#1}}
-
-\def\togglechemicalmirror#1%
- {\doifelse{\getvalue{\s!mirror#1}}{*}
- {\resetchemicalmirror{#1}}
- {\setchemicalmirror{#1}}}
-
-\def\setchemicalrotation #1 #2 #3 #4 #5 #6 #7 #8 #9
- {\setvalue{\s!rotate1.#1}{\dosetchemicalrotation{#2}{#3}}%
- \setvalue{\s!rotate2.#1}{\dosetchemicalrotation{#4}{#5}}%
- \setvalue{\s!rotate3.#1}{\dosetchemicalrotation{#6}{#7}}%
- \setvalue{\s!rotate4.#1}{\dosetchemicalrotation{#8}{#9}}}
-
-\def\setchemicalangle #1 #2 #3 #4 #5
- {\setvalue{\s!angle1.#1}{\dosetchemicalangle{#2}}%
- \setvalue{\s!angle2.#1}{\dosetchemicalangle{#3}}%
- \setvalue{\s!angle3.#1}{\dosetchemicalangle{#4}}%
- \setvalue{\s!angle4.#1}{\dosetchemicalangle{#5}}}
-
-\def\chemicalrotate[#1]%
- {\doifdefinedelse{\s!mirror#1}
- {\getvalue{\s!rotate\chemicalrotation.#1\getvalue{\s!mirror#1}}%
- \getvalue{\s!angle\chemicalrotation.#1\getvalue{\s!mirror#1}}}
- {\getvalue{\s!rotate\chemicalrotation.#1}%
- \getvalue{\s!angle\chemicalrotation.#1}}}
-
-\def\dosetchemicalangle#1% zwak zie onder
- {\def\chemicalangle{#1}}
-
-\def\dosetchemicalrotation#1#2%
- {\ifnum\chemicaldrawingmode=1
- % njet
- \else
- \startrotation by {#1} {#2} %% \stoprotation (t.b.v. testen)
- \fi}
-
-\def\doresetchemicalrotation
- {\ifnum\chemicaldrawingmode=1
- % njet
- \else
- \stoprotation
- \fi}
-
-\def\processchemicalrotation#1%
- {\def\doprocess[##1##2]%
- {\doifnumberelse{##1}
- {\def\chemicalrotation{##1}}
- {\unknownchemical{ROT#1}}}%
- \doprocess[#1]}
-
-% \filtertextelement[#1][#2][#3][#4]
-%
-% #1: volgnummer
-% #2: offset in uitlijningen
-% #3: lijst met uitlijningen -> \chemicalloca
-% #4: lijst met teksten -> \chemicaltext
-
-\def\setchemicallocation#1%
- {\doifelse{#1}{}
- {\edef\chemicalloca{c}}
- {\edef\chemicalloca{#1}}}
-
-\newif\iffixedchemicaltext
-
-\def\filterchemicaltextelement[#1][#2][#3][#4]%
- {\ifchemicaltextconstant
- \def\chemicaltext{#4}%
- \setchemicallocation{}%
- \else
- \ifnum#1=0\relax
- \setchemicallocation{}%
- \else
- \iffixedchemicaltext
- \!!counta#2
- \else
- \!!counta=\chemicalrotation
- \advance\!!counta -1
- \multiply\!!counta #2
- \advance\!!counta #1
- \fi
- \getfromcommalist[#3][\the\!!counta]%
- \setchemicallocation\commalistelement
- \fi
- \ifchemicalpicture
- \let\chemicaltext\relax
- \else
- \advance\txtchemical 1
- \getfromcommalist[#4][\txtchemical]%
- \let\chemicaltext\commalistelement
- \fi
- \fi
- \fixedchemicaltextfalse}
-
-% \putchemicaltext{#1}{#2}
-%
-% #1 : x-coordinaat
-% #2 : y-coordinaat
-%
-% \chemicaltext en \chemicalloca worden met \gettextelement
-% opgehaald uit de tweede set bij \chemie
-%
-% Ten behoeve van testdoeleinden wordt gebruik gemaakt van
-% \chemicalframe in plaats van het meer sjieke, maar tevens
-% meer trage \framed.
-
-\ifx\ruledhbox\undefined
- \def\chemicalframe#1%
- {\hbox
- {\vrule\hskip-.4pt
- \vbox{\hrule\vskip-.4pt\hbox{#1}\vskip-.4pt\hrule}%
- \hskip-.4pt\vrule}}
-\else
- \def\chemicalframe#1%
- {\ruledhbox{#1}}
-\fi
-
-\def\doputchemicaltext#1 [#2] at #3 #4 %
- {\ifnum\chemicaldrawingmode=1
- \rput
- {-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\expanded{\rput[#2]{\chemicalangle}(#3,#4){#1}}}%
- \else
- \put {#1} [#2] at {#3} {#4} %
- \fi}
-
-\def\dodoifsinglelocation#1#2\\#3%
- {\ifx#2\relax#3\fi}
-
-\def\doifsinglelocationelse#1%
- {\expandafter\dodoifsinglelocationelse#1\relax\\}
-
-\def\putchemicaltext#1#2%
- {\enablechemicalspecials
- \ifchemicalpicture
- \setchemicalpicture{#1}{#2}%
- \else
- \doifelse\@@chemicaloption\v!test
- {\def\@@chemicalframe{\chemicalframe}}
- {\def\@@chemicalframe{}}%
- \dosetsubscripts
- \setbox2=\hbox{\@@dochemicalcolor
- $\@@dochemicalstyle{\@@localchemicalformat \chemicaltext}$}%
- \setbox4=\hbox{$\@@dochemicalstyle{\@@localchemicalformat C_2^2}$}%
- \setbox6=\hbox{$\@@dochemicalstyle{\@@localchemicalformat O}$}% or C
- \doresetsubscripts
- \doifnot\@@chemicallocation\v!intext
- {\ht2=\ht4
- \dp2=\dp4}%
- \setbox2=\hbox{\@@chemicalframe{\box2}}%
- \ifdim\wd2>\wd6
- \doifelse{#1}{0}
- {\doifnot{#2}{0}{\wd2=\wd6}}
- {%\doifsinglelocation\chemicalloca
- {\doifinset{\chemicalloca}{t,b}{\wd2=\wd6}}}% common ?
- \fi
- \expanded
- {\doputchemicaltext
- {\noexpand\dowithchemical{\copy2}} % per se \copy2 i.p.v. \box2
- [\chemicalloca] at {#1} {#2} }
- \nomoreaccounting
- \fi
- \disablechemicalspecials}
-
-\def\setchemicaltextelement #1 #2 #3
- {\setvalue{\s!chemicaltextelement#1}{\putchemicaltext{#2}{#3}}}
-
-\def\getchemicalfixedtextelement%
- {\fixedchemicaltexttrue
- \getchemicaltextelement}
-
-\def\getchemicaltextelement[#1][#2][#3][#4][#5]%
- {\filterchemicaltextelement[#2][#3][#4][#5]%
- \doifelse{#2}{0}
- {\dochemicaloffset{#2}% % incompatible change
- \putchemicaltext{0}{0}%
- \undochemicaloffset} % incompatible change
- {\chemicalrotate[#2]%
- \dochemicaloffset{#2}%
- \def\chemicaltextelementnumber{#2}%
- \getvalue{\s!chemicaltextelement#1}%
- \getvalue{\s!chemicaltextelement#11}%
- \getvalue{\s!chemicaltextelement#12}%
- \getvalue{\s!chemicaltextelement#13}%
- \undochemicaloffset}}
-
-\def\processchemicaltextelement#1#2#3#4#5%
- {\def\doprocess[##1##2##3##4##5]%
- {\doifelse{##1}{?}
- {\doprocess[1..\maxchemical ????]}
- {\doifchemicalnumber{##1}{#1#2}
- {\doifelse{##2##3}{..}
- {\doifchemicalnumber{##4}{#1#2}
- {\getchemicaltextelement[#1][##1][#4][#5][#3]%
- \doifnot{##1}{##4}
- {\!!counta=##1\relax
- \advance\!!counta by 1
- \edef\nextsegment{\the\!!counta}%
- \doprocess[\nextsegment..##4##5]}}}
- {\getchemicaltextelement[#1][##1][#4][#5][#3]%
- \doifnot{##2}{?}{\doprocess[##2##3##4##5]}}}}}%
- \doprocess[#2]%
- \smallchemicaltextfalse}
-
-\def\processchemicalsmalltextelement%
- {\smallchemicaltexttrue\processchemicaltextelement}
-
-\def\processchemicalsmalltextconstant%
- {\smallchemicaltexttrue\processchemicaltextconstant}
-
-\def\processchemicalunrotatedtextelement#1#2#3#4#5#6%
- {\bgroup
- \xdef\@@xxx{0}%
- \xdef\@@yyy{0}%
- \def\putchemicaltext##1##2%
- {\xdef\@@xxx{##1}%
- \xdef\@@yyy{##2}}%
- \getvalue{\s!chemicaltextelement#1}%
- \egroup
- \bgroup
- \def\doputchemicaltext##1 [##2] at ##3 ##4 %
- {\ifnum\chemicaldrawingmode=1
- \rput
- {-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\rput{\chemicalangle}(\@@xxx,\@@yyy){\expanded{\rput[##2](##3,##4){##1}}}}%
- \else
- \put
- {\stoprotation \setcoordinatesystem point at 0 0
- \expanded{\put {##1} [##2] at {##3} {##4} }}
- at {\@@xxx} {\@@yyy}
- \fi}%
- \processchemicaltextelement{#2}{#3}{#4}{#5}{#6}%
- \egroup}
-
-\newif\ifchemicaltextconstant
-
-\def\processchemicaltextconstant#1#2#3#4%
- {\chemicaltextconstanttrue
- \let\@@oldchemicalframe\@@chemicalframe
- \let\@@chemicalframe\relax
- \processchemicaltextelement{#1}{#2}{#3}{#4}{}%
- \let\@@chemicalframe\@@oldchemicalframe
- \chemicaltextconstantfalse}
-
-% \plotchemicalline{#1}{#2}{#3}{#4}
-%
-% #1: x-coordinaat beginpunt
-% #2: y-coordinaat beginpunt
-% #3: x-coordinaat eindpunt
-% #4: y-coordinaat eindpunt
-
-\chardef\chemicallinetype=0
-
-\def\doplotchemicalline
- {\!!counte=\!!countc \advance\!!counte by -\!!counta
- \!!countf=\!!countd \advance\!!countf by -\!!countb
- \bgroup
- \ifcase\chemicaldrawingmode
- \ifcase\chemicallinetype
- % 0 : normal line
- \plot {\!!counta} {\!!countb} {\!!countc} {\!!countd} /%
- \or
- % 1 : normal arrow
- \arrow <5pt> [.2,.67] from {\!!counta} {\!!countb} to {\!!countc} {\!!countd}
- \or
- % 2 : reverse arrow
- \arrow <5pt> [.2,.67] from {\!!countc} {\!!countd} to {\!!counta} {\!!countb}
- \or
- % 3 : unrotated line
- \put {\stoprotation \setcoordinatesystem point at 0 0
- \plot 0 0 {\!!counte} {\!!countf} /}
- [\chemicallineposition] at {\!!counta} {\!!countb}
- \else
- % 4 : dashed line
- \findlength {\plot {\!!counta} {\!!countb} {\!!countc} {\!!countd} /}%
- \setdashesnear <2pt> for <\totalarclength>%
- \plot {\!!counta} {\!!countb} {\!!countc} {\!!countd} /%
- \fi
- \or
- \ifcase\chemicallinetype
- \rput
- {-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\psline(\!!counta,\!!countb)(\!!countc,\!!countd)}%
- \or
- \rput
- {-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\psline{->}(\!!counta,\!!countb)(\!!countc,\!!countd)}%
- \or
- \rput
- {-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\psline{<-}(\!!counta,\!!countb)(\!!countc,\!!countd)}%
- \or
- \rput
- {-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\expanded{\rput[\chemicallineposition]{-\chemicalangle}%
- (\!!counta,\!!countb){\psline(0,0)(\!!counte,\!!countf)}}}%
- \else
- \psset{linestyle=dashed}%
- \rput
- {-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\psline(\!!counta,\!!countb)(\!!countc,\!!countd)}%
- \fi
- \or
- \global\MPdrawingdonetrue
- \setchemicalattributes
- \startMPdrawing
- x0 := \MPdivten[\chemicalxoffset]u ;
- y0 := \MPdivten[\chemicalyoffset]u ;
- x1 := \MPdivten[\the\!!counta]u ;
- y1 := \MPdivten[\the\!!countb]u ;
- x2 := \MPdivten[\the\!!countc]u ;
- y2 := \MPdivten[\the\!!countd]u ;
- x3 := \MPdivten[\the\!!counte]u ;
- y3 := \MPdivten[\the\!!countf]u ;
- \ifcase\chemicallinetype
- % 0 : normal line
- draw ((z1--z2) rotatedaround(origin,-\chemicalangle))
- shifted z0 ;
- \or
- % 1 : normal arrow
- drawarrow ((z1--z2) rotatedaround(origin,-\chemicalangle))
- shifted z0 ;
- \or
- % 2 : reverse arrow
- drawarrow ((z2--z1) rotatedaround(origin,-\chemicalangle))
- shifted z0 ;
- \or
- % 3 : unrotated line % nog \chemicalineposition: t/b
- draw (origin--z3)
- shifted (z1 rotatedaround(origin,-\chemicalangle))
- shifted z0 ;
- \else
- % 4 : dashed line
- draw ((z1--z2) rotatedaround(origin,-\chemicalangle))
-% shifted z0 dashed evenly ;
- shifted z0 dashed dashpattern(on 5.5u off 6u) ;
- \fi
- \stopMPdrawing
- \fi
- \egroup
- \account\!!counta\!!countb
- \account\!!countc\!!countd}
-
-\def\plotchemicalline#1#2#3#4%
- {\!!counta=#1\!!countb=#2\!!countc=#3\!!countd=#4\relax
- \doplotchemicalline}
-
-\def\plotchemicalfactorline#1#2#3#4%
- {\!!counta=#1\!!countb=#2\!!countc=#3\!!countd=#4\relax
- \ifdim\@@chemicalfactor\onepoint=\onepoint \else
- \scratchdimen\!!counta\s!sp \multiply\scratchdimen1000 \scratchdimen\@@chemicalfactor\scratchdimen \divide\scratchdimen1000 \!!counta\scratchdimen
- \scratchdimen\!!countc\s!sp \multiply\scratchdimen1000 \scratchdimen\@@chemicalfactor\scratchdimen \divide\scratchdimen1000 \!!countc\scratchdimen
- \fi
- \doplotchemicalline}
-
-\def\plotchemicalzline#1#2#3#4%
- {\!!counta=#1\!!countb=#2\!!countc=#3\!!countd=#4\relax
- \ifnum\chemicaldrawingmode=2
- \global\MPdrawingdonetrue
- \setchemicalattributes
- \startMPdrawing
- x0 := \MPdivten[\chemicalxoffset]u ;
- y0 := \MPdivten[\chemicalyoffset]u ;
- x1 := \MPdivten[\the\!!counta]u ;
- y1 := \MPdivten[\the\!!countb]u ;
- x2 := \MPdivten[\the\!!countc]u ;
- y2 := \MPdivten[\the\!!countd]u ;
- filldraw ((
- \ifnum\chemicalangle>180
- z1--z2
- \else\ifnum\chemicalangle<90
- z1--(z2 shifted (-2u,+2u))--(z2 shifted (+2u,-2u))
- \else\ifnum\chemicalangle=90
- (z1 shifted (-2u,+2u))--(z1 shifted (+2u,-2u))--
- (z2 shifted (+2u,+2u))--(z2 shifted (-2u,-2u))
- \else
- (z1 shifted (+2u,+2u))--(z1 shifted (-2u,-2u))--z2
- \fi\fi\fi
- --cycle) rotatedaround(origin,-\chemicalangle)) shifted z0 ;
- \stopMPdrawing
- \else
- \doplotchemicalline
- \ifnum\chemicalangle>180 \else
- \ifnum\chemicalangle=90
- \advance\!!counta by -20 \advance\!!countc by -20
- \doplotchemicalline
- \advance\!!counta by 40 \advance\!!countc by 40
- \else\ifnum\chemicalangle<90
- \advance\!!countc by -20 \advance\!!countd by +20
- \doplotchemicalline
- \advance\!!countc by +40 \advance\!!countd by -40
- \else
- \advance\!!counta by 20 \advance\!!countb by 20
- \doplotchemicalline
- \advance\!!counta by -40 \advance\!!countb by -40
- \fi\fi
- \fi
- \doplotchemicalline
- \fi}
-
-\def\plotchemicaldeltaline#1#2#3#4%
- {\!!counta=#1\!!countb=#2\!!countc=#3\!!countd=#4\relax
- \ifnum\chemicaldrawingmode=2
- \global\MPdrawingdonetrue
- \setchemicalattributes
- \startMPdrawing
- x0 := \MPdivten[\chemicalxoffset]u ;
- y0 := \MPdivten[\chemicalyoffset]u ;
- x1 := \MPdivten[\the\!!counta]u ;
- y1 := \MPdivten[\the\!!countb]u ;
- x2 := \MPdivten[\the\!!countc]u ;
- y2 := \MPdivten[\the\!!countd]u ;
- filldraw ((z1--(z2 rotatedaround(z1,5))--(z2 rotatedaround(z1,-5))
- --cycle) rotatedaround(origin,-\chemicalangle))
- shifted z0 ;
- \stopMPdrawing
- \account{#1}{#2}%
- \account{#3}{#4}%
- \else
- \doplotchemicalline
- \advance\!!countc by 16 \advance\!!countd by -21
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -8 \advance\!!countd by 14
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \fi}
-
-\def\setchemicallinesegment #1 #2 #3 #4 #5
- {\setvalue{\s!chemicallinesegment#1}{\plotchemicalline{#2}{#3}{#4}{#5}}}
-
-\def\setchemicalfactorlinesegment #1 #2 #3 #4 #5
- {\setvalue{\s!chemicallinesegment#1}{\plotchemicalfactorline{#2}{#3}{#4}{#5}}}
-
-\def\getchemicallinesegment[#1][#2]%
- {\chemicalrotate[#1]%
- \dochemicaloffset{#1}%
- \getvalue{\s!chemicallinesegment#2}%
- \getvalue{\s!chemicallinesegment#21}%
- \getvalue{\s!chemicallinesegment#22}%
- \undochemicaloffset}
-
-\def\getprivatechemicallinesegment[#1][#2]%
- {\chemicalrotate[#1]%
- \getvalue{\s!chemicallinesegment#2#1}}
-
-\def\doprocesschemicallinesegment#1#2#3#4#5%
- {\chardef\chemicallinetype=#1
- \def\chemicallineposition{#2}%
- \def\doprocess[##1##2##3##4##5]%
- {\doifelse{##1}{?}
- {\doprocess[1..\maxchemical ????]}
- {\doifchemicalnumber{##1}{#4#5}
- {\doifelse{##2##3}{..}
- {\doifchemicalnumber{##4}{#4#5}
- {#3[##1][#4]%
- \doifnot{##1}{##4}
- {\!!counta=##1\relax
- \advance\!!counta by 1
- \edef\nextsegment{\the\!!counta}%
- \doprocess[\nextsegment..##4##5]}}}
- {#3[##1][#4]%
- \doifnot{##2}{?}
- {\doprocess[##2##3##4##5]}}}}}%
- \doprocess[#5]}
-
-\def\processchemicallinesegment
- {\doprocesschemicallinesegment0c\getchemicallinesegment}
-
-\def\processchemicalzlinesegment#1#2%
- {%\doprocesschemicallinesegment0c\getchemicallinesegment{#1}{#2}%
- \bgroup
- \def\plotchemicalline{\plotchemicalzline}%
- \doprocesschemicallinesegment0c\getchemicallinesegment{#1}{#2}%
- \egroup}
-
-\def\processchemicaldeltalinesegment#1#2%
- {%\doprocesschemicallinesegment0c\getchemicallinesegment{#1}{#2}%
- \bgroup
- \def\plotchemicalline{\plotchemicaldeltaline}%
- \doprocesschemicallinesegment0c\getchemicallinesegment{#1}{#2}%
- \egroup}
-
-\def\processprivatechemicallinesegment%
- {\doprocesschemicallinesegment0c\getprivatechemicallinesegment}
-
-\def\processchemicaldownarrowsegment%
- {\doprocesschemicallinesegment1c\getchemicallinesegment}
-
-\def\processchemicaluparrowsegment%
- {\doprocesschemicallinesegment2c\getchemicallinesegment}
-
-\def\processchemicalunrotatedlinesegment#1%
- {\doprocesschemicallinesegment3{#1}\getchemicallinesegment}
-
-\def\processchemicaldashedlinesegment
- {\doprocesschemicallinesegment4c\getchemicallinesegment}
-
-\def\plotchemicaldasheddeltaline#1#2#3#4%
- {\!!counta=#1\!!countb=#2\!!countc=#3\!!countd=#4\relax
- \ifnum\chemicaldrawingmode=2
- \global\MPdrawingdonetrue
- \setchemicalattributes
- \startMPdrawing
- x0 := \MPdivten[\chemicalxoffset]u ;
- y0 := \MPdivten[\chemicalyoffset]u ;
- x1 := \MPdivten[\the\!!counta]u ;
- y1 := \MPdivten[\the\!!countb]u ;
- x2 := \MPdivten[\the\!!countc]u ;
- y2 := \MPdivten[\the\!!countd]u ;
- z20 = z2 rotatedaround(z1,+5) ;
- z21 = z2 rotatedaround(z1,-5) ;
- draw (z1 rotatedaround(origin,-\chemicalangle)) shifted z0 ;
- save n ; n := 5 ;
- for i=1 upto n :
- draw ((((z20--z21) shifted -z2) shifted (i/n)[z2,z1])
- rotatedaround(origin,-\chemicalangle)) shifted z0 ;
- endfor
- \stopMPdrawing
- \account{#1}{#2}%
- \account{#3}{#4}%
- \else
- \doplotchemicalline
- \advance\!!countc by 16 \advance\!!countd by -21
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -8 \advance\!!countd by 14
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \fi}
-
-\def\plotchemicalwavyline#1#2#3#4%
- {\!!counta=#1\!!countb=#2\!!countc=#3\!!countd=#4\relax
- \ifnum\chemicaldrawingmode=2
- \global\MPdrawingdonetrue
- \setchemicalattributes
- \startMPdrawing
- x0 := \MPdivten[\chemicalxoffset]u ;
- y0 := \MPdivten[\chemicalyoffset]u ;
- x1 := \MPdivten[\the\!!counta]u ;
- y1 := \MPdivten[\the\!!countb]u ;
- x2 := \MPdivten[\the\!!countc]u ;
- y2 := \MPdivten[\the\!!countd]u ;
- save d ; pair d ;
- d := z2 rotatedaround(z1,+5) shifted -z2 ;
- save n ; n := 4 ;
- draw ((for i=0 upto n-1 :
- ((i)/n)[z1,z2] ..
- ((i+.25)/n)[z1,z2] shifted d ..
- ((i+.50)/n)[z1,z2] ..
- ((i+.75)/n)[z1,z2] shifted -d ..
- endfor
- z2) rotatedaround(origin,-\chemicalangle)) shifted z0 ;
- \stopMPdrawing
- \account{#1}{#2}%
- \account{#3}{#4}%
- \else
- \doplotchemicalline
- \advance\!!countc by 16 \advance\!!countd by -21
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -8 \advance\!!countd by 14
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \fi}
-
-\def\processchemicaldasheddeltalinesegment#1#2%
- {\bgroup
- \def\plotchemicalline{\plotchemicaldasheddeltaline}%
- \doprocesschemicallinesegment0c\getchemicallinesegment{#1}{#2}%
- \egroup}
-
-\def\processchemicalwavylinesegment#1#2%
- {\bgroup
- \def\plotchemicalline{\plotchemicalwavyline}%
- \doprocesschemicallinesegment0c\getchemicallinesegment{#1}{#2}%
- \egroup}
-
-\def\processchemicalopenend#1#2%
- {\doprocesschemicallinesegment0c\doprocesschemicalopenend{#1}{#2}}
-
-\def\doprocesschemicalopenend[#1][#2]%
- {\chemicalrotate[#1]%
- \dochemicaloffset{#1}%
- \ifcase\chemicaldrawingmode
- \beginpicture
- \setquadratic\plot
- 300 0 400 0
- 500 0 550 75
- 600 0 650 -75
- 700 0 750 75
- 800 0 850 -75
- 900 0 950 0
- 1050 0 /
- \endpicture
- \or
- \rput{-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\psline(300,0)(500,0)%
- \rput(500,0){\psplot[yunit=75,plotstyle=curve]{0}{720}{x sin}}%
- \psline(950,0)(1050,0)}%
- \or
- \global\MPdrawingdonetrue
- \setchemicalattributes
- \startMPdrawing
- x0 := \MPdivten[\chemicalxoffset]u ;
- y0 := \MPdivten[\chemicalyoffset]u ;
- draw
- (((30.0u,0)--(50.0u,0){up}..(55.0u,7.5u)..
- (60.0u,0)..(65.0u,-7.5u)..(70.0u,0)..
- (75.0u,7.5u)..(80.0u,0)..(85.0u,-7.5u)..{up}
- (90.0u,0)--(105.0u,0)) rotatedaround(origin,-\chemicalangle))
- shifted z0 ;
- \stopMPdrawing
- \fi
- \undochemicaloffset}
-
-% \plotchemicalcircle{#1}{#2}{#3}{#4}
-%
-% #1: lengte van de boog in graden
-% #2: x-coordinaat eindpunt
-% #3: y-coordinaat eindpunt
-
-\newif\ifchemicaldotted
-
-\def\plotchemicalcircle#1#2#3#4#5#6%
- {\bgroup
- \ifcase\chemicaldrawingmode
- \ifchemicaldotted
- \findlength{\circulararc {#4} degrees from {#5} {#6} center at {0} {0} }%
- \divide\totalarclength by 6
- \def\b{\the\totalarclength}%
- \divide\totalarclength by 2
- \def\a{\the\totalarclength}%
- \setdashpattern <\a,\b,\b,\b,\b,\b,\a>
- \fi
- \circulararc {#4} degrees from {#5} {#6} center at {0} {0} %
- \or
- \ifchemicaldotted
- \psset{linestyle=dashed}%
- \fi
- \rput
- {-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\psarc(0,0){#3}{#1}{#2}}%
- \or
- \global\MPdrawingdonetrue
- \setchemicalattributes
- \startMPdrawing
- r := \MPdivten[#3]*2u;
- x0 := \MPdivten[\chemicalxoffset]u ;
- y0 := \MPdivten[\chemicalyoffset]u ;
- draw ((subpath (#1/45,#2/45) of (fullcircle scaled (r)))
- rotatedaround (origin,\chemicalangle+150))
- shifted z0 \ifchemicaldotted dashed withdots \fi ;
- \stopMPdrawing
- \fi
- \egroup}
-
-\def\setchemicalcircsegment #1 #2 #3 #4 #5 #6 #7
- {\setvalue{\s!chemicalcircsegment#1}{\plotchemicalcircle{#2}{#3}{#4}{#5}{#6}{#7}}}
-
-\def\getchemicalcircsegment[#1][#2]%
- {\chemicalrotate[#1]%
- \getvalue{\s!chemicalcircsegment#2}}
-
-\def\doprocesschemicalcircsegment#1#2%
- {\def\doprocess[##1##2##3##4##5]%
- {\doifelse{##1}{?}
- {\doprocess[1..\maxchemical ????]}
- {\doifchemicalnumber{##1}{#1#2}
- {\doifelse{##2##3}{..}
- {\doifchemicalnumber{##4}{#1#2}
- {\getchemicalcircsegment[##1][#1]%
- \doifnot{##1}{##4}
- {\!!counta=##1\relax
- \advance\!!counta by 1
- \edef\nextsegment{\the\!!counta}%
- \doprocess[\nextsegment..##4##5]}}}
- {\getchemicalcircsegment[##1][#1]%
- \doifnot{##2}{?}
- {\doprocess[##2##3##4##5]}}}}}%
- \doprocess[#2]}
-
-\def\processchemicalcircsegment%
- {\chemicaldottedfalse\doprocesschemicalcircsegment}
-
-\def\processchemicaldottsegment%
- {\chemicaldottedtrue\doprocesschemicalcircsegment}
-
-\let\endchemicalpicture = \relax
-\let\checkchemicalpicture = \relax
-\let\nomoreaccounting = \relax
-
-\newif\ifchemicalpicture
-
-\def\beginchemicalpicture#1% NO PSTRICKS SUPPORT YET
- {\checkchemicalpicture
- \bgroup % DOES NOT HANDLE AUTOWIDTH/HEIGHT
- \chemicalpicturetrue
- \processchemical[#1]}
-
-\def\setchemicalpicture#1#2%
- {\chemicalpicturefalse
- \def\endchemicalpicture%
- {\@@endchemicallocalpicture{#1}{#2}%
- \egroup
- \ifnum\chemicaldrawingmode=1
- \rput
- {-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\expanded{\rput[\chemicalloca]{\chemicalangle}(#1,#2){\box\nextbox}}}%
- \else
- \expanded{\put{\box\nextbox}[\chemicalloca] at {#1} {#2} }
- \fi
- \egroup}%
- \def\checkchemicalpicture%
- {\ifx\endchemicalpicture\relax \else
- \writestatus{ppchtex}{missing end of picture (PE)}%
- \endchemicalpicture
- \fi}%
- \setbox\nextbox=\hbox\bgroup
- \@@beginchemicallocalpicture
- % alternatief: gewoon accounting, en zelf l,r afhandelen
- \ifnum\chemicaldrawingmode=1
- % njet
- \else
- \accountingon
- \let\nomoreaccounting=\accountingoff
- \fi}
-
-\def\doskipchemical[#1][#2]%
- {{\tt[ppchtex]}}
-
-\def\skipchemical%
- {\dodoubleargument\doskipchemical}
-
-\def\complexchemical% met \expandafter
- {\ifinchemical
- \expandafter\dochemical
- \else
- \writestatus{ppchtex}{the [][]-alternative is not permitted here}%
- \expandafter\skipchemical
- \fi}
-
-\newif\ifinnerchemical
-
-\def\dosimplechemical#1#2#3%
- {\doifdefinedelse{\??chemical\c!location}
- {\writestatus{ppchtex}{the {}{}-alternative is not permitted here}}
- {\ifinnerchemical
- \let\chemicalsign = \chemicalinnersign
- \let\chemicalmolecule = \chemicalinnermolecule
- \let\chemicalsinglearrow = \chemicalsingleinnerarrow
- \let\chemicaldoublearrow = \chemicaldoubleinnerarrow
- \let\chemicaltwintiparrow = \chemicaltwintipinnerarrow
- \else
- \let\chemicalsign = \chemicaloutersign
- \let\chemicalmolecule = \chemicaloutermolecule
- \let\chemicalsinglearrow = \chemicalsingleouterarrow
- \let\chemicaldoublearrow = \chemicaldoubleouterarrow
- \let\chemicaltwintiparrow = \chemicaltwintipouterarrow
- \fi
- \disablechemicalspecials
- \unexpandedprocessallactionsinset
- [#1]
- [ HIGH=>\sethighsubscripts,
- LOW=>\setlowsubscripts,
- PLUS=>\chemicalsign{+},
- GIVES=>\chemicalsinglearrow{#2}{#3},
- EQUILIBRIUM=>\chemicaldoublearrow{#2}{#3},
- MESOMERIC=>\chemicaltwintiparrow{#2}{#3},
- SINGLE=>\singlechemicalbond,
- DOUBLE=>\doublechemicalbond,
- TRIPLE=>\triplechemicalbond,
- +=>\chemicalsign{+},
- ->=>\chemicalsinglearrow{#2}{#3},
- <->=>\chemicaldoublearrow{#2}{#3},
- <>=>\chemicaltwintiparrow{#2}{#3},
- -=>\singlechemicalbond,
- --=>\doublechemicalbond,
- ---=>\triplechemicalbond,
- \s!unknown=>\enablechemicalspecials
- \chemicalmolecule{\commalistelement}{#2}{#3}]}}
-
-%\def\dosimplechemicalA#1#2#3%
-% {\let\chemicalspace=\relax
-% \def\dodosimplechemical##1%
-% {\dosimplechemical{##1}{}{}}%
-% \@EA\processcommalist\@EA[\@@chemicalchemicaloffset,#1]\dodosimplechemical
-% \egroup}
-
-\def\dosimplechemicalA#1#2#3% % evt: {#1,\relax}
- {\let\chemicalspace=\relax
- \@EA\dosimplechemical\@EA{\@@chemicalchemicaloffset,#1}{#2}{#3}%
- \egroup}
-
-\def\dosimplechemicalB#1#2#3%
- {\dosimplechemical{#1}{#2}{#3}%
- \egroup}
-
-\def\dosimplechemicalC#1#2#3%
- {$\simplechemical{#1}{#2}{#3}$%
- \egroup} % erbij
-
-\def\simplechemical
- {\ifinner
- \innerchemicaltrue
- \else
- \innerchemicalfalse
- \fi
- \bgroup
- \catcode`\^=\@@superscript % t.b.v. \enableduplication
- \catcode`\_=\@@subscript % t.b.v. de zekerheid
- \ifmmode
- \ifinnerchemical
- \def\next{\dotriplegroupempty\dosimplechemicalA}%
- \else
- \def\next{\dotriplegroupempty\dosimplechemicalB}%
- \fi
- \else
- \def\next{\dotriplegroupempty\dosimplechemicalC}%
- \fi
- \next}
-
-\definecomplexorsimple\chemical
-
-\def\dogotochemical#1#2%
- {\def\dowithchemical% % experiment
- {\localgotochemical{#1}}% % experiment
- \chemical} % experiment
-
-\def\gotochemical% % experiment
- {\dosingleargument\dogotochemical} % experiment
-
-\def\dododochemical#1[#2][#3]% % experiment
- {\def\simpledododochemical% % experiment
- {#1[#2][#3]}% % experiment
- \def\complexdododochemical[##1]% % experiment
- {\def\dowithchemical% % experiment
- {\localthisischemical{#2}}% % experiment
- #1[#3][##1]}% % experiment
- \complexorsimple\dododochemical} % experiment
-
-\def\dodochemical[#1][#2]%
- {\ignorespaces
- \ifinchemical
- \drawchemical[#1][#2]%
- \ignorespaces
- \else
- \startchemical[\c!location=\v!intext]%
- \drawchemical[#1][#2]%
- \expandafter\stopchemical
- \fi
- \ignorespaces}
-
-\def\dochemical[#1]%
- {\def\simpledochemical%
- {\@@writechemicalstate{ppchtex}{[#1][]}%
- \dodochemical[#1][]}%
- %
- \def\complexdochemical[##1]%
- {\@@writechemicalstate{ppchtex}{[#1][##1]}%
- \txtchemical=0%
- \dodochemical[#1][##1]}%
- %
- \def\complexdochemical[##1]% % experiment
- {\@@writechemicalstate{ppchtex}{[#1][##1]}% % experiment
- \txtchemical=0% % experiment
- \dododochemical\dodochemical[#1][##1]}% % experiment
- %
- \complexorsimple\dochemical}
-
-% \processlocalchemicals{#1}
-%
-% #1: commando's
-
-\def\dodoprocesschemical#1%
- {\processchemical[#1????]}
-
-\def\processlocalchemicals#1%
- {\processcommalist[#1]\dodoprocesschemical}
-
-% \drawchemical[#1][#2]
-%
-% #1: bindingen enz.
-% #2: atomen enz.
-
-\def\localdodochemical[#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!text\the\levchemical}{\the\txtchemical}%
- \txtchemical=0
- \dodochemical[#1][#2]%
- % \@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
- \ignorespaces}
-
-\def\drawchemical[#1][#2]%
- {\ignorespaces
- \def\dodochemical[##1][##2]%
- {\drawchemical[##1][##2]%
- \ignorespaces}%
- \def\dochemical[##1]%
- {\def\simpledochemical%
- {\@@writechemicalstate{ppchtex}{[##1][#2]}%
- \dodochemical[##1][#2]%
- \ignorespaces}%
- \def\complexdochemical[####1]%
- {\dododochemical\localdodochemical[##1][####1,#2]}%
- \complexorsimple\dochemical}%
- \doif\@@chemicalstate\v!start
- {\doifelse\chemicalname\s!unknown
- {\getvalue{\s!executechemical\defaultchemical}[#2]}
- {\getvalue{\s!executechemical\chemicalname}[#2]}%
- \def\unknownchemical##1%
- {\processunknownchemical[##1][#2]}%
- \processcommalist[\@@chemicaloffset,#1]\dodoprocesschemical}%
- \ignorespaces}
-
-\unexpanded\def\chemicaloxidation#1#2#3%
- {\chemicaltop
- {\ifnum#20=0
- 0%
- \else
- #1\expandafter\uppercase\expandafter{\romannumeral#2}%
- \fi}
- {#3}}
-
-\def\chemicaltfraction{\ifinchemical.60\else.8\fi}
-\def\chemicalbfraction{\ifinchemical.45\else.6\fi}
-\def\chemicallfraction{\ifinchemical.1\else.1\fi}
-\def\chemicalrfraction{\ifinchemical.1\else.1\fi}
-
-\def\chemicaltighttext
- {\def\chemicaltfraction{\ifinchemical.3\else.6\fi}%
- \def\chemicalbfraction{\ifinchemical.2\else.4\fi}%
- \def\chemicallfraction{\ifinchemical 0\else 0\fi}%
- \def\chemicalrfraction{\ifinchemical 0\else 0\fi}}
-
-\def\dochemicaltop#1#2#3#4%
- {\vbox
- {\@@dochemicalcolor
- \baselineskip=\chemicaltfraction\baselineskip \lineskip0pt
- \halign
- {#1###2\cr
- $\@@dochemicalstyle{\scriptscriptstyle#3}$\cr
- $\@@dochemicalstyle{\@@currentchemicalformat#4}$\cr}}}
-
-\def\dochemicalbottom#1#2#3#4%
- {\vtop
- {\@@dochemicalcolor
- \baselineskip=\chemicalbfraction\baselineskip \lineskip0pt
- \halign
- {#1###2\cr
- $\@@dochemicalstyle{\@@currentchemicalformat#4}$\cr
- $\@@dochemicalstyle{\scriptscriptstyle#3}$\cr}}}
-
-\def\chemicalleft#1#2%
- {\hbox
- {\@@dochemicalcolor
- $\@@dochemicalstyle{\scriptscriptstyle#1}$%
- $\@@dochemicalstyle{\@@currentchemicalformat\hskip\chemicallfraction em#2}$}}
-
-\def\chemicalright#1#2%
- {\hbox
- {\@@dochemicalcolor
- $\@@dochemicalstyle{\@@currentchemicalformat#2\hskip\chemicalrfraction em}$%
- $\@@dochemicalstyle{\scriptscriptstyle#1}$}}
-
-\def\chemicalcentered#1%
- {\setbox0=\hbox{$\@@dochemicalstyle{\scriptscriptstyle#1}$}%
- \setbox2=\hbox{$\@@dochemicalstyle{\@@currentchemicalformat C}$}%
- \dimen0=.5\ht2
- \advance\dimen0 by -.5\ht0
- \advance\dimen0 by \dp0
- \hbox{\@@dochemicalcolor\raise\dimen0\box0}}
-
-\def\chemicalleftcentered#1#2%
- {\hbox
- {\@@dochemicalcolor
- \chemicalcentered{#1}%
- $\@@dochemicalstyle{\@@currentchemicalformat\hskip\chemicallfraction em#2}$}}
-
-\def\chemicalrightcentered#1#2%
- {\hbox
- {\@@dochemicalcolor
- $\@@dochemicalstyle{\@@currentchemicalformat#2\hskip\chemicalrfraction em}$%
- \chemicalcentered{#1}}}
-
-\def\chemicaltop {\dochemicaltop \hss \hss }
-\def\chemicallefttop {\dochemicaltop \relax \hss }
-\def\chemicalrighttop {\dochemicaltop \hss \relax}
-\def\chemicalbottom {\dochemicalbottom \hss \hss }
-\def\chemicalleftbottom {\dochemicalbottom \relax \hss }
-\def\chemicalrightbottom {\dochemicalbottom \hss \relax}
-
-\def\chemicaltopleft #1{\chemicalleft {\chemicallefttop {#1}{}}}
-\def\chemicalbottomleft #1{\chemicalleft {\chemicalleftbottom{#1}{}}}
-\def\chemicaltopright #1{\chemicalright{\chemicallefttop {#1}{}}}
-\def\chemicalbottomright#1{\chemicalright{\chemicalleftbottom{#1}{}}}
-
-\def\chemicalsmashedleft#1%
- {\hbox\bgroup
- \@@dochemicalcolor
- \setbox0=\hbox{$\@@dochemicalstyle{\@@currentchemicalformat C}$}%
- \setbox2=\hbox{$\@@dochemicalstyle{\@@currentchemicalformat#1}$}%
- \wd2=\wd0
- \box2
- \egroup}
-
-\def\chemicalsmashedmiddle#1%
- {\hbox\bgroup
- \@@dochemicalcolor
- \setbox0=\hbox{$\@@dochemicalstyle{\@@currentchemicalformat C}$}%
- \setbox2=\hbox{$\@@dochemicalstyle{\@@currentchemicalformat#1}$}%
- \hbox{\hskip-.5\wd2\hskip.5\wd0\box2}
- \egroup}
-
-\def\chemicalsmashedright#1%
- {\hbox\bgroup
- \@@dochemicalcolor
- \setbox0=\hbox{$\@@dochemicalstyle{\@@currentchemicalformat C}$}%
- \setbox2=\hbox{$\@@dochemicalstyle{\@@currentchemicalformat#1}$}%
- \hbox to \wd0{\hskip-\wd2\hskip\wd0\box2}%
- \egroup}
-
-\def\+{\tabalign} % is \long in Plain
-
-\def\chemicalforever#1#2%
- {\bgroup
- \setbox0=\hbox
- {\@@dochemicalcolor
- $\@@dochemicalstyle{\scriptscriptstyle\hskip-.15em#2}$}%
- \wd0=0pt
- \big#1_{\hskip.1em\box0}%
- \egroup}
-
-\def\disablechemicalspecials%
- {\def\+##1{##1}\def\-##1{##1}%
- \def\[{[}\def\]{]}%
- \def\1{}\def\2{}\def\3{}\def\4{}\def\5{}\def\6{}\def\7{}%
- \def\X{}%
- \def\T{}\def\B{}\def\L{}\def\R{}\def\LC{}\def\RC{}%
- \def\TL{}\def\BL{}\def\TR{}\def\BR{}%
- \def\LT{}\def\LB{}\def\RT{}\def\RB{}%
- \def\SL{}\def\SM{}\def\SR{}}
-
-\def\enablechemicalspecials%
- {\def\+{\dodoublegroupempty\chemicaloxidation{+}}% {} needed!
- \def\-{\dodoublegroupempty\chemicaloxidation{-}}% {} needed!
- \def\[{\dodoublegroupempty\chemicalforever {[}}% {} needed!
- \def\]{\dodoublegroupempty\chemicalforever {]}}% {} needed!
- \def\1{\chemicaloxidation\relax1}%
- \def\2{\chemicaloxidation\relax2}%
- \def\3{\chemicaloxidation\relax3}%
- \def\4{\chemicaloxidation\relax4}%
- \def\5{\chemicaloxidation\relax5}%
- \def\6{\chemicaloxidation\relax6}%
- \def\7{\chemicaloxidation\relax7}%
- \def\X{\chemicaltighttext}%
- \def\T{\chemicaltop}%
- \def\B{\chemicalbottom}%
- \def\L{\chemicalleft}%
- \def\LC{\chemicalleftcentered}%
- \def\R{\chemicalright}%
- \def\RC{\chemicalrightcentered}%
- \def\TL{\chemicaltopleft}%
- \def\BL{\chemicalbottomleft}%
- \def\TR{\chemicaltopright}%
- \def\BR{\chemicalbottomright}%
- \def\LT{\chemicallefttop}%
- \def\LB{\chemicalleftbottom}%
- \def\RT{\chemicalrighttop}%
- \def\RB{\chemicalrightbottom}%
- \def\SL{\chemicalsmashedleft}%
- \def\SM{\chemicalsmashedmiddle}%
- \def\SR{\chemicalsmashedright}%
-}
-
-% \reversechemical#1#2#3
-%
-% #1: prefix
-% #2: volgnummer enz
-% #3: tegengestelde volgnummers
-
-\def\reversechemical#1#2#3%
- {\def\doprocess[##1##2]%
- {\doifchemicalnumber{##1}{#1#2}%
- {\getfromcommalist[#3][##1]%
- \let\reversechemicalaction=\commalistelement
- \processchemical[#1\reversechemicalaction##2]}}%
- \doprocess[#2]}
-
-% \processunknownchemical[#1????][#2]
-%
-% #1: bindingen enz.
-% #2: atomen enz.
-
-\def\defaultchemical%
- {SIX}
-
-\def\processunknownchemical[#1????][#2]%
- {\processaction
- [#1]
- [ SAVE=>\executechemicalSAVE,
- RESTORE=>\executechemicalRESTORE,
- HIGH=>\sethighsubscripts,
- LOW=>\setlowsubscripts,
- \s!default=>,
- \s!unknown=>\doifdefinedelse{\s!executechemical#1}
- {\def\chemicalrotation{1}%
- \def\chemicaloffset{0}%
- \doifdefined{\s!executechemical#1}
- {\getvalue{\s!executechemical#1}[#2]}%
- \@@chemicalpostponed}
- {\getpredefinedchemical{#1}}]}
-
-\newcount\chemicalstack % tzt \newwounter
-
-\setvalue{\s!chemical\c!x1}{0}
-\setvalue{\s!chemical\c!y1}{0}
-
-\def\executechemicalSAVE
- {%\writestatus{ppchtex}{saving \the\horchemical,\the\verchemical}%
- \advance\chemicalstack by 1
- \letvalue {\s!chemical n\the\chemicalstack}=\chemicalname
- %\letvalue {\s!chemical p\the\chemicalstack}=\@@chemicalpostponed
- \setevalue{\s!chemical x\the\chemicalstack}{\the\horchemical}%
- \setevalue{\s!chemical y\the\chemicalstack}{\the\verchemical}}
-
-\def\restorechemicalvalues#1%
- {\let\oldprocesschemical=\processchemical
- \doifdefined{\s!executechemical#1}{\getvalue{\s!executechemical#1}[]}%
- \let\processchemical=\oldprocesschemical}
-
-\def\executechemicalRESTORE
- {\ifnum\chemicalstack=0\relax
- \horchemical=\getvalue{\s!chemical x1}\relax
- \verchemical=\getvalue{\s!chemical y1}\relax
- \else
- \restorechemicalvalues{\getvalue{\s!chemical n\the\chemicalstack}}%
- %\@EA\let\@EA\@@chemicalpostponed\@EA=\csname\s!chemical p\the\chemicalstack\endcsname
- \let\@@chemicalpostponed=\relax
- \horchemical=\getvalue{\s!chemical x\the\chemicalstack}\relax
- \verchemical=\getvalue{\s!chemical y\the\chemicalstack}\relax
- \advance\chemicalstack by -1
- \fi
- \restorechemicalcoordinates}
-
-% De onderstaande macro's zijn verantwoordelijk voor het zetten
-% van de + en pijlen. De +, en dus ook de pijlen, worden omhoog
-% gehaald. Dit oogt m.i. fraaier.
-
-\def\chemicalinnerclip#1%
- {{\setbox0=\hbox{#1}\ht0\ht\strutbox\dp0\dp\strutbox\box0}}
-
-\def\chemicalraise#1#2%
- {\chemicalinnerclip
- {\setbox0=\hbox{$#1+$}%
- \raise\dp0\hbox{$#1#2$}}}
-
-\def\chemicalinnersign#1% todo: \@@chemicaltextcolor
- {\chemicalraise{\@@localchemicalstyle}{#1}}
-
-\def\chemicaloutersign#1%
- {\chemicalraise{}{\@@dochemicalcolor#1}}
-
-\def\chemicalsingleinnerarrow#1#2%
- {\chemicalraise{\@@localchemicalstyle}{\longrightarrow}}
-
-\def\chemicaldoubleinnerarrow#1#2% todo: \@@chemicaltextcolor
- {\chemicalinnerclip
- {\lower.2ex\hbox
- {\setbox0=\hbox{$\@@localchemicalstyle\longrightarrow$}%
- \setbox2=\hbox{$\@@localchemicalstyle\longleftarrow$}%
- \wd0=0pt\raise\ht0\box0\box2}}}
-
-\def\chemicaltwintipinnerarrow#1#2% todo: \@@chemicaltextcolor
- {\chemicalinnerclip
- {\setbox0=\hbox{\chemicalraise{\@@localchemicalstyle}{\longrightarrow}}%
- \setbox2=\hbox{\chemicalraise{\@@localchemicalstyle}{\longleftarrow}}%
- \wd0=0pt\box0\box2}}
-
-\def\dochemicalouterarrow#1#2#3%
- {\bgroup
- \setbox0=\hbox{$\longrightarrow$}%
- \setbox2=\hbox{$\@@dochemicalstyle{\scriptstyle\quad#2\quad}$}%
- \setbox4=\hbox{$\@@dochemicalstyle{\scriptstyle\quad#3\quad}$}%
- \dimen2=\wd0 % \dimen0 is used elsewhere
- \ifdim\wd2>\dimen2 \dimen0=\wd2 \fi
- \ifdim\wd4>\dimen2 \dimen0=\wd4 \fi
- \chemicaloutermolecule
- {#1}
- {\ifdim\ht2>\!!zeropoint\box2\fi} % expands to \empty in test
- {\ifdim\ht4>\!!zeropoint\box4\fi}% % expands to \empty in test
- \egroup}
-
-\def\chemicalsingleouterarrow
- {\dochemicalouterarrow
- {\hbox to \dimen2{\rightarrowfill}}}
-
-\def\chemicaldoubleouterarrow
- {\dochemicalouterarrow
- {\lower.5\ht0\vbox
- {\offinterlineskip
- \hbox to \dimen2{\rightarrowfill}
- \hbox to \dimen2{\leftarrowfill}}}}
-
-\def\chemicaltwintipouterarrow
- {\dochemicalouterarrow
- {\hbox
- {\hbox to \dimen2{\rightarrowfill}%
- \hskip-\dimen2
- \hbox to \dimen2{\leftarrowfill}}}}
-
-\def\chemicalinnermolecule#1#2#3% no mathop here, can generate space
- {\chemicalspace % todo: \@@chemicaltextcolor
- \chemicalinnerclip
- {\dosetsubscripts
- $\@@dochemicalstyle{\@@localchemicalstyle\strut#1}$%
- \doresetsubscripts}%
- \chemicalspace}
-
-\def\chemicaloutermolecule#1#2#3%
- {\chemicalspace
- \bgroup
- \@@dochemicalcolor
- \setbox0=\hbox % else the font is reset
- {\dosetsubscripts
- \hbox{$\@@dochemicalstyle{\strut#1}$}%
- \doresetsubscripts}%
- \mathop{\box0}%
- \ifthirdargument
- \doifnot{#2}{}
- {^{\@@dochemicalstyle{\strut#2}}}%
- \doifnot{#3}{}
- {_{\@@dochemicalstyle{\strut#3}}}%
- \else
- \doifnot{#2}{}
- {_{\@@dochemicalstyle{\strut#2}}}%
- \fi
- \egroup
- \chemicalspace}
-
-\def\chemicalsinglepicturearrow#1%
- {\lower.5ex\hbox
- {\@@dochemicalstyle
- $\chemicalspace
- \buildrel
- \@@dochemicalstyle{\scriptstyle\quad#1\quad}%
- \over{\overrightarrow
- {\hphantom{\@chemicalstyle{\scriptstyle\quad#1\quad}}}}%
- \chemicalspace$}}
-
-\def\chemicaldoublepicturearrow#1%
- {\lower.5ex\hbox
- {\@@dochemicalstyle
- $\chemicalspace
- \buildrel
- \@@dochemicalstyle{\scriptstyle\quad#1\quad}%
- \over{\overrightarrow{\overleftarrow
- {\hphantom{\@@dochemicalstyle{\scriptstyle\quad#1\quad}}}}}%
- \chemicalspace$}}
-
-% Bij de in-line bindingen wordt gebruik gemaakt van
-% een \hrule. De maatvoering wordt bepaald door een
-% kunstmatige em (\wd0).
-
-\def\somechemicalbond%
- {\hrule width \wd0 height .4pt}
-
-\def\dochemicalbonds#1#2#3% todo: \@@chemicaltextstyle
- {{\setbox0=\hbox
- {${\@@localchemicalstyle M}$}%
- \vbox to \ht0
- {\@@dochemicalcolor
- \hsize\wd0
- \vskip.1\wd0#1\vfill#2\vfill#3\vskip.1\wd0}}}
-
-\def\singlechemicalbond%
- {\dochemicalbonds{}{\somechemicalbond}{}}
-
-\def\doublechemicalbond%
- {\dochemicalbonds{\somechemicalbond}{}{\somechemicalbond}}
-
-\def\triplechemicalbond%
- {\dochemicalbonds{\somechemicalbond}{\somechemicalbond}{\somechemicalbond}}
-
-% In plaats van \def\naam{\chemie[...]...} kan beter gebruik
-% worden gemaakt van het commando
-%
-% \definieerchemie[naam]{commando's}
-%
-% De naam krijgt, om problemen met bestaande macro's te
-% voorkomen, een prefix. Bij het ophalen van een commando
-% worden beide definities afgehandeld.
-
-\def\dodefinechemical[#1]#2%
- {\doifdefined{\??chemical#1}
- {\writestatus{ppchtex}{chemical definition #1 is redefined}}%
- \setvalue{\??chemical#1}{#2}}
-
-\def\definechemical%
- {\dosingleargument\dodefinechemical}
-
-\def\getpredefinedchemical#1%
- {\doifdefinedelse{\??chemical#1}
- {\getvalue{\??chemical#1}}
- {\doifdefinedelse{#1}
- {\getvalue{#1}}
- {\writestatus{ppchtex}{unknown chemical definition #1}}}}
-
-% Hieronder zijn de definities van de structuren opgenomen. De
-% naam van de structuur is als volgt opgebouwd:
-%
-% \executechemicalNUMBER[#1]
-%
-% waarbij [#1] betrekking heeft op de tekstelementen van \chemie,
-% de [tweede lijst] dus.
-%
-% De aan \chemie[#1][#2] meegegeven lijst van segmenten wordt
-% deels door de in \execute gedefinieerde macro's afgehandeld,
-% deels door algemene macro's. Segmenten hebben de vorm:
-%
-% [+|-|]identifier[X|XYZ|X..Y]
-%
-% Voorbeelden van segmenten zijn:
-%
-% R1
-% R1..4
-% R135
-% -R1
-% +R35
-
-\setchemicalmaximum 0
-
-\def\processchemical[#1]%
- {\unknownchemical{#1}}
-
-\def\setchemicalname#1 %
- {\def\chemicalname{#1}}
-
-\let\chemicalname=\s!unknown
-
-% Vooruitlopend op een gedetailleerde documentatie, zijn hier
-% vast enkele gebruikte afmetingen:
-%
-% lengte radikalen : 500
-% afstand radikalen : 100
-% afstand dubbele radikalen : 260
-% afstand substituenten : +125
-
-\def\executechemicalONE[#1]%
- {\setchemicalname ONE
- %
- \setchemicalmaximum 8
- \setchemicaldistance 0
- \setchemicalsubstitute 625
- \setchemicaldirection 303
- %
- \setchemicalrotation 1 1 0 1 0 1 0 1 0
- \setchemicalrotation 2 0.707 -0.707 0.707 -0.707 0.707 -0.707 0.707 -0.707
- \setchemicalrotation 3 0 -1 0 -1 0 -1 0 -1
- \setchemicalrotation 4 -0.707 -0.707 -0.707 -0.707 -0.707 -0.707 -0.707 -0.707
- \setchemicalrotation 5 -1 0 -1 0 -1 0 -1 0
- \setchemicalrotation 6 -0.707 0.707 -0.707 0.707 -0.707 0.707 -0.707 0.707
- \setchemicalrotation 7 0 1 0 1 0 1 0 1
- \setchemicalrotation 8 0.707 0.707 0.707 0.707 0.707 0.707 0.707 0.707
- %
- \setchemicalangle 1 0 90 180 270
- \setchemicalangle 2 45 135 225 315
- \setchemicalangle 3 90 180 270 0
- \setchemicalangle 4 135 225 315 45
- \setchemicalangle 5 180 270 0 90
- \setchemicalangle 6 225 315 45 135
- \setchemicalangle 7 270 0 90 180
- \setchemicalangle 8 315 45 135 225
- %
- \setchemicaltranslate 1 -1000 0
- \setchemicaltranslate 2 -1000 1000
- \setchemicaltranslate 3 0 1000
- \setchemicaltranslate 4 1000 1000
- \setchemicaltranslate 5 1000 0
- \setchemicaltranslate 6 1000 -1000
- \setchemicaltranslate 7 0 -1000
- \setchemicaltranslate 8 -1000 -1000
- %
- \setchemicallinesegment SB 300 0 700 0
- \setchemicallinesegment DB1 300 50 700 50
- \setchemicallinesegment DB2 300 -50 700 -50
- %
- %setchemicallinesegment EP 200 125 200 -125
- \setchemicalfactorlinesegment EP 200 125 200 -125
- %
- \setchemicaltextelement ES 200 0
- \setchemicaltextelement ED1 200 50
- \setchemicaltextelement ED2 200 -50
- \setchemicaltextelement ET1 200 75
- \setchemicaltextelement ET2 200 0
- \setchemicaltextelement ET3 200 -75
- \setchemicaltextelement HB1 300 0
- \setchemicaltextelement HB2 475 0
- \setchemicaltextelement HB3 650 0
- %
- \setchemicaltextelement Z 800 0
- \setchemicaltextelement RZ 950 0
- \setchemicaltextelement ZN 500 0
- \setchemicaltextelement ZTN 500 150
- \setchemicaltextelement ZBN 500 -150
- %
- \def\processchemical[##1##2##3##4##5]%
- {\doprocesschemical[##1##2##3##4##5]
- {\processaction
- [##1##2##3##4##5]
- [ PB:##4##5=>\beginchemicalpicture{##4##5},
- PE????=>\endchemicalpicture,
- SUB##4##5=>\processchemicalsubstitute{##4##5},
- ADJ##4##5=>\processchemicaldistance{##4##5},
- MOV##4##5=>\processchemicaltranslate{##4##5},
- DIR##4##5=>\processchemicaldirection{##4##5},
- OFF##4##5=>\processchemicaloffset{##4##5},
- CCD##4##5=>\processchemicaldottsegment{CC}{##4##5},
- LDD##4##5=>\processchemicaldashedlinesegment{DB1}{##4##5}%
- \processchemicallinesegment{DB2}{##4##5},
- RDD##4##5=>\processchemicallinesegment{DB1}{##4##5}%
- \processchemicaldashedlinesegment{DB2}{##4##5},
- OF##3:##5=>\processchemicalphantom{##3}{##5},
- OE##3##4##5=>\processchemicalopenend{OE}{##3##4##5},
- EP##3##4##5=>\processchemicallinesegment{EP}{##3##4##5},
- ES##3##4##5=>\processchemicaltextconstant{ES}{##3##4##5}{\hbox{$\cdot$}}{0},
- ED##3##4##5=>\processchemicaltextconstant{ED}{##3##4##5}{\hbox{$\cdot$}}{0},
- ET##3##4##5=>\processchemicaltextconstant{ET}{##3##4##5}{\hbox{$\cdot$}}{0},
- HB##3##4##5=>\processchemicaltextconstant{HB}{##3##4##5}{\hbox{$\cdot$}}{0},
- SB##3##4##5=>\processchemicallinesegment{SB}{##3##4##5},
- DB##3##4##5=>\processchemicallinesegment{DB}{##3##4##5},
- SB##3##4##5=>\processchemicallinesegment{SB}{##3##4##5},
- BB##3##4##5=>\processchemicaldeltalinesegment{SB}{##3##4##5},
- BD##3##4##5=>\processchemicaldasheddeltalinesegment{SB}{##3##4##5},
- BW##3##4##5=>\processchemicalwavylinesegment{SB}{##3##4##5},
- SD##3##4##5=>\processchemicaldashedlinesegment{SB}{##3##4##5},
- TB##3##4##5=>\processchemicallinesegment{SB}{##3##4##5}%
- \processchemicallinesegment{DB}{##3##4##5},
- CZ##3##4##5=>\processchemicaltextelement{RZ}{##3##4##5}{#1}{0}{},
- ZTN##4##5=>\processchemicalsmalltextconstant{ZTN}{##4##5}{\chemicaltextelementnumber}{0},
- ZTT##4##5=>\processchemicalsmalltextelement{ZTN}{##4##5}{#1}{0}{},
- ZBN##4##5=>\processchemicalsmalltextconstant{ZBN}{##4##5}{\chemicaltextelementnumber}{0},
- ZBT##4##5=>\processchemicalsmalltextelement{ZBN}{##4##5}{#1}{0}{},
- ZN##3##4##5=>\processchemicaltextconstant{ZN}{##3##4##5}{\chemicaltextelementnumber}{0},
- ZT##3##4##5=>\processchemicaltextelement{ZN}{##3##4##5}{#1}{0}{},
- Z##2##3##4##5=>\processchemicaltextelement{Z}{##2##3##4##5}{#1}{0}
- {l,l,t,r,r,r,b,l},
- \s!unknown=>\unknownchemical{##1##2##3##4##5}]}}}
-
-\def\executechemicalTHREE[#1]%
- {\setchemicalname THREE
- %
- \setchemicalmaximum 3
- \setchemicaldistance 289
- \setchemicalsubstitute 952
- %
- \setchemicalrotation 1 1 0 0 -1 -1 0 0 1
- \setchemicalrotation 2 -0.5 -0.866 -0.866 0.5 0.5 0.866 0.866 -0.5
- \setchemicalrotation 3 -0.5 0.866 0.866 0.5 0.5 -0.866 -0.866 -0.5
- %
- \setchemicalangle 1 0 90 180 270
- \setchemicalangle 2 120 210 300 30
- \setchemicalangle 3 240 330 60 150
- %
- \setchemicaltranslate 1 -1000 0
- \setchemicaltranslate 2 0 1000
- \setchemicaltranslate 3 1000 0
- \setchemicaltranslate 4 0 -1000
- %
- \setchemicallinesegment B 577 0 -289 -500
- \setchemicallinesegment SB 352 -130 -64 -370
- \setchemicallinesegment -SB 352 -130 -289 -500
- \setchemicallinesegment +SB 577 0 -64 -370
- \setchemicallinesegment DB1 327 -87 -89 -327
- \setchemicallinesegment DB2 377 -172 -39 -413
- \setchemicallinesegment R 577 0 1077 0
- \setchemicallinesegment -R 577 0 1010 250
- \setchemicallinesegment +R 577 0 1010 -250
- \setchemicallinesegment ER1 577 50 1077 50
- \setchemicallinesegment ER2 577 -50 1077 -50
- \setchemicallinesegment SR 837 0 1077 0
- \setchemicallinesegment -SR 802 130 1010 250
- \setchemicallinesegment +SR 802 -130 1010 -250
- \setchemicallinesegment DR1 837 50 1077 50
- \setchemicallinesegment DR2 837 -50 1077 -50
- %
- \setchemicaltextelement Z 577 0
- \setchemicaltextelement RZ 1177 0
- \setchemicaltextelement -RZ 1097 300
- \setchemicaltextelement +RZ 1097 -300
- \setchemicaltextelement CRZ 1077 0
- %
- \def\processchemical[##1##2##3##4]%
- {\processaction
- [##1##2##3##4]
- [ ROT##4=>\processchemicalrotation{##4},
- MOV##4=>\processchemicaltranslate{##4},
- SUB##4=>\processchemicalsubstitute{##4},
- ADJ##4=>\processchemicaldistance{##4},
- -RZ##4=>\processchemicaltextelement{-RZ}{##4}{#1}{3}
- {l,t,r, l,r,l, r,b,l, r,l,r},
- +RZ##4=>\processchemicaltextelement{+RZ}{##4}{#1}{3}
- {l,r,b, r,r,l, r,l,t, l,l,r},
- -SB##4=>\processchemicallinesegment{-SB}{##4},
- +SB##4=>\processchemicallinesegment{+SB}{##4},
- -SR##4=>\processchemicallinesegment{-SR}{##4},
- +SR##4=>\processchemicallinesegment{+SR}{##4},
- CRZ##4=>\processchemicaltextelement{CRZ}{##4}{#1}{0}
- {},
- DB##3##4=>\processchemicallinesegment{DB}{##3##4},
- DR##3##4=>\processchemicallinesegment{DR}{##3##4},
- RZ##3##4=>\processchemicaltextelement{RZ}{##3##4}{#1}{3}
- {l,r,r, t,r,l, r,l,l, b,l,r},
- ER##3##4=>\processchemicallinesegment{ER}{##3##4},
- SB##3##4=>\processchemicallinesegment{SB}{##3##4},
- SR##3##4=>\processchemicallinesegment{SR}{##3##4},
- -R##3##4=>\processchemicallinesegment{-R}{##3##4},
- +R##3##4=>\processchemicallinesegment{+R}{##3##4},
- B##2##3##4=>\processchemicallinesegment{B}{##2##3##4},
- R##2##3##4=>\processchemicallinesegment{R}{##2##3##4},
- Z##2##3##4=>\processchemicaltextelement{Z}{##2##3##4}{#1}{0}{},
- \s!unknown=>\unknownchemical{##1##2##3##4}]}}
-
-\def\executechemicalFOUR[#1]%
- {\setchemicalname FOUR
- %
- \setchemicalmaximum 4
- \setchemicaldistance 500
- \setchemicalsubstitute 0
- %
- \setchemicalrotation 1 1 0 0 -1 -1 0 0 1
- \setchemicalrotation 2 0 -1 -1 0 0 1 1 0
- \setchemicalrotation 3 -1 0 0 1 1 0 0 -1
- \setchemicalrotation 4 0 1 1 0 0 -1 -1 0
- %
- \setchemicalangle 1 0 90 180 270
- \setchemicalangle 2 90 180 270 0
- \setchemicalangle 3 180 270 0 90
- \setchemicalangle 4 270 0 90 180
- %
- \setchemicaltranslate 1 -1000 0
- \setchemicaltranslate 2 0 1000
- \setchemicaltranslate 3 1000 0
- \setchemicaltranslate 4 0 -1000
- %
- \setchemicallinesegment B 500 500 500 -500
- \setchemicallinesegment SB 500 240 500 -240
- \setchemicallinesegment -SB 500 240 500 -500
- \setchemicallinesegment +SB 500 500 500 -240
- \setchemicallinesegment DB1 450 240 450 -240
- \setchemicallinesegment DB2 550 240 550 -240
- \setchemicallinesegment EB 360 300 360 -300
- \setchemicallinesegment R 500 500 854 854
- \setchemicallinesegment -R 500 500 500 1000
- \setchemicallinesegment +R 500 500 1000 500
- \setchemicallinesegment ER1 465 535 819 889
- \setchemicallinesegment ER2 535 465 889 819
- \setchemicallinesegment SR 684 684 854 854
- \setchemicallinesegment -SR 500 760 500 1000
- \setchemicallinesegment +SR 760 500 1000 500
- \setchemicallinesegment DR1 649 719 819 889
- \setchemicallinesegment DR2 719 649 889 819
- %
- \setchemicaltextelement Z 500 500
- \setchemicaltextelement RZ 925 925
- \setchemicaltextelement -RZ 500 1100
- \setchemicaltextelement +RZ 1100 500
- \setchemicaltextelement CRZ 1038 1038
- %
- \setchemicaltextelement ZN 350 350
- %
- \def\processchemical[##1##2##3##4]%
- {\processaction
- [##1##2##3##4]
- [ PB:##4=>\beginchemicalpicture{##4},
- PE????=>\endchemicalpicture,
- ROT##4=>\processchemicalrotation{##4},
- SUB##4=>\processchemicalsubstitute{##4},
- ADJ##4=>\processchemicaldistance{##4},
- MOV##4=>\processchemicaltranslate{##4},
- -RZ##4=>\processchemicaltextelement{-RZ}{##4}{#1}{4}
- {b,l,t,r, l,t,r,b, t,r,b,l, r,b,l,t},
- +RZ##4=>\processchemicaltextelement{+RZ}{##4}{#1}{4}
- {l,t,r,b, t,r,b,l, r,b,l,t, b,l,t,r},
- -SB##4=>\processchemicallinesegment{-SB}{##4},
- +SB##4=>\processchemicallinesegment{+SB}{##4},
- -SR##4=>\processchemicallinesegment{-SR}{##4},
- +SR##4=>\processchemicallinesegment{+SR}{##4},
- CRZ##4=>\processchemicaltextelement{CRZ}{##4}{#1}{0}{},
- ZN##3##4=>\processchemicaltextconstant{ZN}{##3##4}{\chemicaltextelementnumber}{0},
- ZT##3##4=>\processchemicaltextelement{ZN}{##3##4}{#1}{0}{},
- DB##3##4=>\processchemicallinesegment{DB}{##3##4},
- DR##3##4=>\processchemicallinesegment{DR}{##3##4},
- EB##3##4=>\processchemicallinesegment{EB}{##3##4},
- ER##3##4=>\processchemicallinesegment{ER}{##3##4},
- RZ##3##4=>\processchemicaltextelement{RZ}{##3##4}{#1}{4}
- {lb,lt,rt,rb, lt,rt,rb,lb, rt,rb,lb,lt, rb,lb,lt,rt},
- SB##3##4=>\processchemicallinesegment{SB}{##3##4},
- SR##3##4=>\processchemicallinesegment{SR}{##3##4},
- -R##3##4=>\processchemicallinesegment{-R}{##3##4},
- +R##3##4=>\processchemicallinesegment{+R}{##3##4},
- B##2##3##4=>\processchemicallinesegment{B}{##2##3##4},
- R##2##3##4=>\processchemicallinesegment{R}{##2##3##4},
- Z##2##3##4=>\processchemicaltextelement{Z}{##2##3##4}{#1}{0}{},
- \s!unknown=>\unknownchemical{##1##2##3##4}]}}
-
-\def\executechemicalFIVE[#1]%
- {\setchemicalname FIVE
- %
- \setchemicalmaximum 5
- \setchemicaldistance 688
- \setchemicalsubstitute 1226
- %
- \setchemicalrotation 1 1 0 0 -1 -1 0 0 1
- \setchemicalrotation 2 0.309 -0.951 -0.951 -0.309 -0.309 0.940 0.951 0.309
- \setchemicalrotation 3 -0.809 -0.588 -0.588 0.809 0.809 0.588 0.588 -0.809
- \setchemicalrotation 4 -0.809 0.588 0.588 0.809 0.809 -0.588 -0.588 -0.809
- \setchemicalrotation 5 0.309 0.951 0.951 -0.309 -0.309 -0.951 -0.951 0.309
- %
- \setchemicalangle 1 0 90 180 270
- \setchemicalangle 2 72 162 252 342
- \setchemicalangle 3 144 234 324 54
- \setchemicalangle 4 216 306 36 126
- \setchemicalangle 5 288 18 108 198
- %
- \setchemicaltranslate 1 -1376 0
- \setchemicaltranslate 2 -425 1304
- \setchemicaltranslate 3 1113 809
- \setchemicaltranslate 4 1113 -809
- \setchemicaltranslate 5 -425 -1304
- %
- \setchemicallinesegment A 1188 500 1188 -500
- \setchemicallinesegment B 688 500 688 -500
- \setchemicallinesegment S -263 808 688 -500
- \setchemicallinesegment SS -116 606 541 -298
- \setchemicallinesegment -SS -263 808 541 -298
- \setchemicallinesegment +SS -116 606 688 -500
- \setchemicallinesegment SB 688 240 688 -240
- \setchemicallinesegment -SB 688 240 688 -500
- \setchemicallinesegment +SB 688 500 688 -240
- \setchemicallinesegment DB1 638 240 638 -240
- \setchemicallinesegment DB2 738 240 738 -240
- \setchemicallinesegment EB 548 340 548 -340
- \setchemicallinesegment R 688 500 1093 794
- \setchemicallinesegment -R 688 500 688 1000
- \setchemicallinesegment +R 688 500 1163 345
- \setchemicallinesegment ER1 659 540 1064 834
- \setchemicallinesegment ER2 727 460 1122 754
- \setchemicallinesegment SR 898 653 1093 794
- \setchemicallinesegment -SR 688 760 688 1000
- \setchemicallinesegment +SR 935 420 1163 345
- \setchemicallinesegment DR1 869 693 1064 834
- \setchemicallinesegment DR2 927 613 1122 754
- %
- \setchemicaltextelement Z 688 500
- \setchemicaltextelement RZ 1188 863
- \setchemicaltextelement -RZ 688 1100
- \setchemicaltextelement +RZ 1258 315
- \setchemicaltextelement CRZ 1323 947
- %
- \setchemicalcircsegment C -36 36 590 72 475 -345
- \setchemicalcircsegment CC -72 0 590 72 182 -561
- %
- \setchemicaltextelement ZN 468 350
- \setchemicaltextelement RN 860 625 % 1.25 Z
- \setchemicaltextelement RTN 785 728 % .12 / 103 75
- \setchemicaltextelement RBN 935 522
- %
- \def\processchemical[##1##2##3##4]%
- {\processaction
- [##1##2##3##4]
- [ FRONT????=>{\executechemicalFIVEFRONT[#1]},
- PB:##4=>\beginchemicalpicture{##4},
- PE????=>\endchemicalpicture,
- ROT##4=>\processchemicalrotation{##4},
- SUB##4=>\processchemicalsubstitute{##4},
- ADJ##4=>\processchemicaldistance{##4},
- MOV##4=>\processchemicaltranslate{##4},
- -RZ##4=>\processchemicaltextelement{-RZ}{##4}{#1}{5}
- {b,l,t,r,r, l,t,r,r,l, t,r,r,l,l, r,b,l,t,r},
- +RZ##4=>\processchemicaltextelement{+RZ}{##4}{#1}{5}
- {l,t,r,r,b, t,r,r,l,l, r,r,l,l,r, b,l,l,r,r},
- -SB##4=>\processchemicallinesegment{-SB}{##4},
- +SB##4=>\processchemicallinesegment{+SB}{##4},
- -SR##4=>\processchemicallinesegment{-SR}{##4},
- +SR##4=>\processchemicallinesegment{+SR}{##4},
- -RD##4=>\processchemicaldashedlinesegment{-R}{##4},
- +RD##4=>\processchemicaldashedlinesegment{+R}{##4},
- -RB##4=>\processchemicaldeltalinesegment{-R}{##4},
- +RB##4=>\processchemicaldeltalinesegment{+R}{##4},
- CRZ##4=>\processchemicaltextelement{CRZ}{##4}{#1}{0}{},
- RTN##4=>\processchemicaltextconstant{RTN}{##4}{\chemicaltextelementnumber}{0},
- RTT##4=>\processchemicaltextelement{RTN}{##4}{#1}{0}{},
- RBN##4=>\processchemicaltextconstant{RBN}{##4}{\chemicaltextelementnumber}{0},
- RBT##4=>\processchemicaltextelement{RBN}{##4}{#1}{0}{},
- -SS##4=>\processchemicallinesegment{-SS}{##4},
- +SS##4=>\processchemicallinesegment{+SS}{##4},
- CCD##4=>\processchemicaldottsegment{CC}{##4},
- SS##3##4=>\processchemicallinesegment{SS}{##3##4},
- RD##3##4=>\processchemicaldashedlinesegment{R}{##3##4},
- RB##3##4=>\processchemicaldeltalinesegment{R}{##3##4},
- ZN##3##4=>\processchemicaltextconstant{ZN}{##3##4}{\chemicaltextelementnumber}{0},
- ZT##3##4=>\processchemicaltextelement{ZN}{##3##4}{#1}{0}{},
- RN##3##4=>\processchemicaltextconstant{RN}{##3##4}{\chemicaltextelementnumber}{0},
- RT##3##4=>\processchemicaltextelement{RN}{##3##4}{#1}{0}{},
- AU##3##4=>\processchemicaluparrowsegment{A}{##3##4},
- AD##3##4=>\processchemicaldownarrowsegment{A}{##3##4},
- CC##3##4=>\processchemicalcircsegment{CC}{##3##4},
- CD##3##4=>\processchemicaldottsegment{C}{##3##4},
- DB##3##4=>\processchemicallinesegment{DB}{##3##4},
- DR##3##4=>\processchemicallinesegment{DR}{##3##4},
- EB##3##4=>\processchemicallinesegment{EB}{##3##4},
- ER##3##4=>\processchemicallinesegment{ER}{##3##4},
- RZ##3##4=>\processchemicaltextelement{RZ}{##3##4}{#1}{5}
- {l,l,r,r,r, l,r,r,b,l, r,r,b,l,t, r,l,l,t,r},
- SB##3##4=>\processchemicallinesegment{SB}{##3##4},
- SR##3##4=>\processchemicallinesegment{SR}{##3##4},
- -R##3##4=>\processchemicallinesegment{-R}{##3##4},
- +R##3##4=>\processchemicallinesegment{+R}{##3##4},
- B##2##3##4=>\processchemicallinesegment{B}{##2##3##4},
- C##2##3##4=>\processchemicalcircsegment{C}{##2##3##4},
- R##2##3##4=>\processchemicallinesegment{R}{##2##3##4},
- S##2##3##4=>\processchemicallinesegment{S}{##2##3##4},
- Z##2##3##4=>\processchemicaltextelement{Z}{##2##3##4}{#1}{0}{},
- \s!unknown=>\unknownchemical{##1##2##3##4}]}}
-
-\def\executechemicalSIX[#1]%
- {\setchemicalname SIX
- %
- \setchemicalmaximum 6
- \setchemicalsubstitute 1375
- \setchemicaldistance 866
- %
- \setchemicalrotation 1 1 0 0 -1 -1 0 0 1
- \setchemicalrotation 2 0.5 -0.866 -0.866 -0.5 -0.5 0.866 0.866 0.5
- \setchemicalrotation 3 -0.5 -0.866 -0.866 0.5 0.5 0.866 0.866 -0.5
- \setchemicalrotation 4 -1 0 0 1 1 0 0 -1
- \setchemicalrotation 5 -0.5 0.866 0.866 0.5 0.5 -0.866 -0.866 -0.5
- \setchemicalrotation 6 0.5 0.866 0.866 -0.5 -0.5 -0.866 -0.866 0.5
- %
- \setchemicalangle 1 0 90 180 270
- \setchemicalangle 2 60 150 240 330
- \setchemicalangle 3 120 210 300 30
- \setchemicalangle 4 180 270 0 90
- \setchemicalangle 5 240 330 60 150
- \setchemicalangle 6 300 30 120 210
- %
- \setchemicaltranslate 1 -1732 0
- \setchemicaltranslate 2 -866 1500
- \setchemicaltranslate 3 866 1500
- \setchemicaltranslate 4 1732 0
- \setchemicaltranslate 5 866 -1500
- \setchemicaltranslate 6 -866 -1500
- %
- \setchemicallinesegment A 1386 500 1386 -500
- \setchemicallinesegment S 0 1000 866 -500
- \setchemicallinesegment SS 125 783 741 -283
- \setchemicallinesegment -SS 0 1000 741 -283
- \setchemicallinesegment +SS 125 783 866 -500
- \setchemicallinesegment B 866 500 866 -500
- \setchemicallinesegment SB 866 240 866 -240
- \setchemicallinesegment -SB 866 240 866 -500
- \setchemicallinesegment +SB 866 500 866 -240
- \setchemicallinesegment DB1 816 240 816 -240
- \setchemicallinesegment DB2 916 240 916 -240
- \setchemicallinesegment EB 726 340 726 -340
- \setchemicallinesegment R 866 500 1299 750
- \setchemicallinesegment -R 866 500 866 1000
- \setchemicallinesegment +R 866 500 1299 250
- \setchemicallinesegment ER1 841 543 1274 793
- \setchemicallinesegment ER2 891 457 1324 707
- \setchemicallinesegment SR 1091 630 1299 750
- \setchemicallinesegment -SR 866 740 866 1000
- \setchemicallinesegment +SR 1091 370 1299 250
- \setchemicallinesegment DR1 1066 673 1274 793
- \setchemicallinesegment DR2 1116 588 1324 707
- \setchemicallinesegment MID1 0 1000 -150 200
- \setchemicallinesegment MID2 0 -1000 -150 -200
- \setchemicallinesegment MIDS1 0 1000 -180 0
- \setchemicallinesegment MIDS2 0 -1000 -180 0
- %
- \setchemicalcircsegment C -30 30 700 60 600 -346
- \setchemicalcircsegment CC -60 0 700 60 350 -606
- %
- \setchemicaltextelement Z 866 500
- \setchemicaltextelement RZ 1386 800
- \setchemicaltextelement -RZ 866 1100
- \setchemicaltextelement +RZ 1386 200
- \setchemicaltextelement CRZ 1524 880
- \setchemicaltextelement MIDZ -150 0
- %
- \setchemicaltextelement ZN 589 350
- \setchemicaltextelement RN 1083 625 % 1.25 Z
- \setchemicaltextelement RTN 1008 755 % .12 / 130 75
- \setchemicaltextelement RBN 1158 495
- %
- \def\processchemical[##1##2##3##4##5]%
- {\processaction
- [##1##2##3##4##5]
- [ FRONT????=>{\executechemicalSIXFRONT[#1]},
- MID????=>\processchemicallinesegment{MID}{1????},
- MIDS????=>\processchemicallinesegment{MIDS}{1????},
- MIDZ????=>\processchemicaltextelement{MIDZ}{1????}{#1}{0}{},
- PB:##4##5=>\beginchemicalpicture{##4##5},
- PE????=>\endchemicalpicture,
- ROT##4##5=>\processchemicalrotation{##4##5},
- SUB##4##5=>\processchemicalsubstitute{##4##5},
- ADJ##4##5=>\processchemicaldistance{##4##5},
- MOV##4##5=>\processchemicaltranslate{##4##5},
- -RZ##4##5=>\processchemicaltextelement{-RZ}{##4##5}{#1}{6}
- {b,l,l,t,r,r, l,l,r,r,r,l, t,r,r,b,l,l, r,r,l,l,l,r},
- +RZ##4##5=>\processchemicaltextelement{+RZ}{##4##5}{#1}{6}
- {l,t,r,r,b,l, r,r,r,l,l,l, r,b,l,l,t,r, l,l,l,r,r,r},
- -SB##4##5=>\processchemicallinesegment{-SB}{##4##5},
- +SB##4##5=>\processchemicallinesegment{+SB}{##4##5},
- -SR##4##5=>\processchemicallinesegment{-SR}{##4##5},
- +SR##4##5=>\processchemicallinesegment{+SR}{##4##5},
- -RD##4##5=>\processchemicaldashedlinesegment{-R}{##4##5},
- +RD##4##5=>\processchemicaldashedlinesegment{+R}{##4##5},
- -RB##4##5=>\processchemicaldeltalinesegment{-R}{##4##5},
- +RB##4##5=>\processchemicaldeltalinesegment{+R}{##4##5},
- CRZ##4##5=>\processchemicaltextelement{CRZ}{##4##5}{#1}{0}{},
- -SS##4##5=>\processchemicallinesegment{-SS}{##4##5},
- +SS##4##5=>\processchemicallinesegment{+SS}{##4##5},
- CCD##4##5=>\processchemicaldottsegment{CC}{##4##5},
-RTN##4##5=>\processchemicaltextconstant{RTN}{##4##5}{\chemicaltextelementnumber}{0},
-RTT##4##5=>\processchemicaltextelement{RTN}{##4##5}{#1}{0}{},
-RBN##4##5=>\processchemicaltextconstant{RBN}{##4##5}{\chemicaltextelementnumber}{0},
-RBT##4##5=>\processchemicaltextelement{RBN}{##4##5}{#1}{0}{},
- SS##3##4##5=>\processchemicallinesegment{SS}{##3##4##5},
- RD##3##4##5=>\processchemicaldashedlinesegment{R}{##3##4##5},
- RB##3##4##5=>\processchemicaldeltalinesegment{R}{##3##4##5},
- ZN##3##4##5=>\processchemicaltextconstant{ZN}{##3##4##5}{\chemicaltextelementnumber}{0},
- ZT##3##4##5=>\processchemicaltextelement{ZN}{##3##4##5}{#1}{0}{},
-RN##3##4##5=>\processchemicaltextconstant{RN}{##3##4##5}{\chemicaltextelementnumber}{0},
-RT##3##4##5=>\processchemicaltextelement{RN}{##3##4##5}{#1}{0}{},
- AU##3##4##5=>\processchemicaluparrowsegment{A}{##3##4##5},
- AD##3##4##5=>\processchemicaldownarrowsegment{A}{##3##4##5},
- CD##3##4##5=>\processchemicaldottsegment{C}{##3##4##5},
- CC##3##4##5=>\processchemicalcircsegment{CC}{##3##4##5},
- DB##3##4##5=>\processchemicallinesegment{DB}{##3##4##5},
- EB##3##4##5=>\processchemicallinesegment{EB}{##3##4##5},
- ER##3##4##5=>\processchemicallinesegment{ER}{##3##4##5},
- RZ##3##4##5=>\processchemicaltextelement{RZ}{##3##4##5}{#1}{6}
- {l,l,t,r,r,b, l,r,r,r,l,l, r,r,b,l,l,t, r,l,l,l,r,r},
- SB##3##4##5=>\processchemicallinesegment{SB}{##3##4##5},
- SR##3##4##5=>\processchemicallinesegment{SR}{##3##4##5},
- DR##3##4##5=>\processchemicallinesegment{DR}{##3##4##5},
- -R##3##4##5=>\processchemicallinesegment{-R}{##3##4##5},
- +R##3##4##5=>\processchemicallinesegment{+R}{##3##4##5},
- B##2##3##4##5=>\processchemicallinesegment{B}{##2##3##4##5},
- C##2##3##4##5=>\processchemicalcircsegment{C}{##2##3##4##5},
- R##2##3##4##5=>\processchemicallinesegment{R}{##2##3##4##5},
- S##2##3##4##5=>\processchemicallinesegment{S}{##2##3##4##5},
- Z##2##3##4##5=>\processchemicaltextelement{Z}{##2##3##4##5}{#1}{0}{},
- \s!unknown=>\unknownchemical{##1##2##3##4##5}]}}
-
-\def\executechemicalSEVEN[#1]% incomplete !
- {\setchemicalname SEVEN
- %
- \setchemicalmaximum 7
- \setchemicalsubstitute -
- \setchemicaldistance 1038
- %
- \setchemicalrotation 1 .623 .782 - - - - - -
- \setchemicalrotation 2 -.223 .975 - - - - - -
- \setchemicalrotation 3 -.901 .434 - - - - - -
- \setchemicalrotation 4 -.901 -.434 - - - - - -
- \setchemicalrotation 5 -.223 -.975 - - - - - -
- \setchemicalrotation 6 .623 -.782 - - - - - -
- \setchemicalrotation 7 1 0 - - - - - -
- %
- \setchemicalangle 1 0 - - -
- \setchemicalangle 2 51.429 - - -
- \setchemicalangle 3 102.857 - - -
- \setchemicalangle 4 154.286 - - -
- \setchemicalangle 5 205.714 - - -
- \setchemicalangle 6 257.143 - - -
- \setchemicalangle 7 308.571 - - -
- %
- \setchemicaltranslate 1 - -
- \setchemicaltranslate 2 - -
- \setchemicaltranslate 3 - -
- \setchemicaltranslate 4 - -
- \setchemicaltranslate 5 - -
- \setchemicaltranslate 6 - -
- \setchemicaltranslate 7 - -
- %
- \setchemicallinesegment B 1038 500 1038 -500
- \setchemicallinesegment SB 1038 240 1038 -240
- \setchemicallinesegment -SB 1038 240 1038 -500
- \setchemicallinesegment +SB 1038 500 1038 -240
- %
- \setchemicaltextelement Z 1038 500
- %
- \def\processchemical[##1##2##3##4##5]%
- {\processaction
- [##1##2##3##4##5]
- [ PB:##4##5=>\beginchemicalpicture{##4##5},
- PE????=>\endchemicalpicture,
- %ROT##4##5=>\processchemicalrotation{##4},
- %SUB##4##5=>\processchemicalsubstitute{##4##5},
- %ADJ##4##5=>\processchemicaldistance{##4##5},
- %MOV##4##5=>\processchemicaltranslate{##4##5},
- -SB##4##5=>\processchemicallinesegment{-SB}{##4##5},
- +SB##4##5=>\processchemicallinesegment{+SB}{##4##5},
- SB##3##4##5=>\processchemicallinesegment{SB}{##3##4##5},
- B##2##3##4##5=>\processchemicallinesegment{B}{##2##3##4##5},
- Z##2##3##4##5=>\processchemicaltextelement{Z}{##2##3##4##5}{#1}{0}{},
- \s!unknown=>\unknownchemical{##1##2##3##4##5}]}}
-
-\def\executechemicalEIGHT[#1]% incomplete !
- {\setchemicalname EIGHT
- %
- \setchemicalmaximum 8
- %\setchemicalsubstitute 1307
- \setchemicaldistance 1207
- %
- \setchemicalrotation 1 .707 .707 - - - - - -
- \setchemicalrotation 2 0 1 - - - - - -
- \setchemicalrotation 3 -.707 .707 - - - - - -
- \setchemicalrotation 4 -1 0 - - - - - -
- \setchemicalrotation 5 -.707 -.707 - - - - - -
- \setchemicalrotation 6 0 -1 - - - - - -
- \setchemicalrotation 7 .707 -.707 - - - - - -
- \setchemicalrotation 8 1 0 - - - - - -
- %
- \setchemicalangle 1 45 - - -
- \setchemicalangle 2 90 - - -
- \setchemicalangle 3 135 - - -
- \setchemicalangle 4 180 - - -
- \setchemicalangle 5 225 - - -
- \setchemicalangle 6 270 - - -
- \setchemicalangle 7 315 - - -
- \setchemicalangle 8 0 - - -
- %
- \setchemicaltranslate 1 -2414 0
- \setchemicaltranslate 2 -1706 1706
- \setchemicaltranslate 3 0 2414
- \setchemicaltranslate 4 1706 1706
- \setchemicaltranslate 5 2414 0
- \setchemicaltranslate 6 1706 -1706
- \setchemicaltranslate 7 0 -2414
- \setchemicaltranslate 8 -1706 -1706
- %
- \setchemicallinesegment B 1207 500 1207 -500
- \setchemicallinesegment SB 1207 240 1207 -240
- \setchemicallinesegment -SB 1207 240 1207 -500
- \setchemicallinesegment +SB 1207 500 1207 -240
- %
- \setchemicaltextelement Z 1207 500
- %
- \def\processchemical[##1##2##3##4##5]%
- {\processaction
- [##1##2##3##4##5]
- [ PB:##4##5=>\beginchemicalpicture{##4##5},
- PE????=>\endchemicalpicture,
- %SUB##4##5=>\processchemicalsubstitute{##4##5},
- ADJ##4##5=>\processchemicaldistance{##4##5},
- MOV##4##5=>\processchemicaltranslate{##4##5},
- -SB##4##5=>\processchemicallinesegment{-SB}{##4##5},
- +SB##4##5=>\processchemicallinesegment{+SB}{##4##5},
- SB##3##4##5=>\processchemicallinesegment{SB}{##3##4##5},
- B##2##3##4##5=>\processchemicallinesegment{B}{##2##3##4##5},
- Z##2##3##4##5=>\processchemicaltextelement{Z}{##2##3##4##5}{#1}{0}{},
- \s!unknown=>\unknownchemical{##1##2##3##4##5}]}}
-
-\def\executechemicalFIVEFRONT[#1]%
- {\executechemicalFIVE[]%
- %
- \setchemicalname FIVEFRONT
- %
- \setchemicallinesegment -R 688 500 688 100
- \setchemicallinesegment +R 688 500 688 900
- %
- \setchemicaltextelement -RZ 0 -1300
- \setchemicaltextelement +RZ 0 1300
- %
- \def\processchemical[##1##2##3##4]%
- {\def\chemicalrotation{2}%
- \processaction
- [##1##2##3##4]
- [ -RZ##4=>\processchemicalunrotatedtextelement{Z}{-RZ}{##4}{#1}{5}
- {,,,,, t,t,t,t,t},
- +RZ##4=>\processchemicalunrotatedtextelement{Z}{+RZ}{##4}{#1}{5}
- {,,,,, b,b,b,b,b},
- -SB##4=>\processchemicallinesegment{-SB}{##4},
- +SB##4=>\processchemicallinesegment{+SB}{##4},
- SB##3##4=>\processchemicallinesegment{SB}{##3##4},
- -R##3##4=>\processchemicalunrotatedlinesegment{t}{-R}{##3##4},
- +R##3##4=>\processchemicalunrotatedlinesegment{b}{+R}{##3##4},
- BB##3##4=>\processchemicalzlinesegment{B}{##3##4},
- R##2##3##4=>\processchemicalunrotatedlinesegment{t}{-R}{##2##3##4}%
- \processchemicalunrotatedlinesegment{b}{+R}{##2##3##4},
- B##2##3##4=>\processchemicallinesegment{B}{##2##3##4},
- Z##2##3##4=>\processchemicaltextelement{Z}{##2##3##4}{#1}{0}{},
- \s!unknown=>\unknownchemical{##1##2##3##4}]}}
-
-\def\executechemicalSIXFRONT[#1]%
- {\executechemicalSIX[]%
- %
- \setchemicalname SIXFRONT
- %
- \setchemicallinesegment -R 866 500 866 100
- \setchemicallinesegment +R 866 500 866 900
- %
- \setchemicaltextelement -RZ 0 -1300
- \setchemicaltextelement +RZ 0 1300
- %
- \def\processchemical[##1##2##3##4]%
- {\def\chemicalrotation{2}%
- \processaction
- [##1##2##3##4]
- [ -RZ##4=>\processchemicalunrotatedtextelement{Z}{-RZ}{##4}{#1}{6}
- {,,,,,, t,t,t,t,t,t},
- +RZ##4=>\processchemicalunrotatedtextelement{Z}{+RZ}{##4}{#1}{6}
- {,,,,,, b,b,b,b,b,b},
- -SB##4=>\processchemicallinesegment{-SB}{##4},
- +SB##4=>\processchemicallinesegment{+SB}{##4},
- SB##3##4=>\processchemicallinesegment{SB}{##3##4},
- -R##3##4=>\processchemicalunrotatedlinesegment{t}{-R}{##3##4},
- +R##3##4=>\processchemicalunrotatedlinesegment{b}{+R}{##3##4},
- BB##3##4=>\processchemicalzlinesegment{B}{##3##4},
- R##2##3##4=>\processchemicalunrotatedlinesegment{t}{-R}{##2##3##4}%
- \processchemicalunrotatedlinesegment{b}{+R}{##2##3##4},
- B##2##3##4=>\processchemicallinesegment{B}{##2##3##4},
- Z##2##3##4=>\processchemicaltextelement{Z}{##2##3##4}{#1}{0}{},
- \s!unknown=>\unknownchemical{##1##2##3##4}]}}
-
-% 1 : 0
-% 2 : -115
-% 3* : -195
-% 3 : -165
-% 4 : -245
-
-\def\executechemicalCARBON[#1]%
- {\setchemicalname CARBON
- %
- \setchemicalmaximum 4
- \setchemicaldistance 0
- \setchemicalsubstitute 0
- %
- \setchemicalrotation 1 1 0 0 -1 -1 0 0 1
- \setchemicalrotation 2 -0.423 -0.906 -0.906 0.423 0.423 0.906 0.906 -0.423
- \setchemicalrotation 3 -0.966 -0.259 -0.259 0.966 0.966 0.259 0.259 -0.966
- \setchemicalrotation 3* -0.966 0.259 0.259 0.966 0.966 -0.259 -0.259 -0.966
- \setchemicalrotation 4 -0.423 0.906 0.906 0.423 0.423 -0.906 -0.906 -0.423
- %
- \setchemicalangle 1 0 90 180 270
- \setchemicalangle 2 115 205 295 25
- \setchemicalangle 3 165 255 345 75
- \setchemicalangle 3* 195 285 15 105
- \setchemicalangle 4 245 335 65 155
- %
- \setchemicaltranslate 1 -1500 0
- \setchemicaltranslate 2 0 1500
- \setchemicaltranslate 3 1500 0
- \setchemicaltranslate 4 0 -1500
- %
- \setchemicallinesegment B1 500 0 1000 0
- \setchemicallinesegment B2 300 0 1000 0
- \setchemicallinesegment B3 500 0 1000 0
- \setchemicallinesegment B4 300 0 1000 0
- %
- \setchemicaltextelement Z 1100 0
- %
- \setchemicalcircsegment C 0 360 500 360 0 -500
- %
- \def\processchemical[##1##2##3##4##5]%
- {\processaction
- [##1##2##3##4##5]
- [ MIR????=>\setchemicalmirror{3},
- -MIR????=>\resetchemicalmirror{3},
- *MIR????=>\togglechemicalmirror{3},
- CB????=>\processlocalchemicals{B,C,Z},
- C????=>\processchemicalcircsegment{C}{1????},
- -ROT##5=>\reversechemical{ROT}{##5}{3,4,1,2},
- ROT##4##5=>\processchemicalrotation{##4##5},
- MOV##4##5=>\processchemicaltranslate{##4##5},
- CB##3##4##5=>\processlocalchemicals
- {ROT##3,C,B,Z2..4,
- MOV##3,*MIR,-ROT##3,C,B,Z2..4},
- B##2##3##4##5=>\processprivatechemicallinesegment{B}{##2##3##4##5},
- Z##2##3##4##5=>\processchemicaltextelement{Z}{##2##3##4##5}{#1}{4}
- {l,t,r,b, t,r,b,l, r,b,l,t, b,l,t,r},
- \s!unknown=>\unknownchemical{##1##2##3##4##5}]}}
-
-% 1: 45 2: -90 3: -225
-% 4: -45 5: -135 6: -270
-
-\newif\ifNEWMANstagger \NEWMANstaggertrue
-
-\def\executechemicalNEWMANSTAGGER%
- {\NEWMANstaggertrue\executechemicalNEWMAN}
-
-\def\executechemicalNEWMANECLIPSE%
- {\NEWMANstaggerfalse\executechemicalNEWMAN}
-
-\def\executechemicalNEWMAN[#1]%
- {\setchemicalname NEWMAN
- %
- \setchemicalmaximum 6
- \setchemicaldistance 0
- \setchemicalsubstitute 0
- %
- \ifNEWMANstagger
- \setchemicalrotation 1 0.707 0.707 0.707 -0.707 -0.707 -0.707 -0.707 0.707
- \setchemicalrotation 2 0 -1 -1 0 0 1 1 0
- \setchemicalrotation 3 -0.707 0.707 0.707 0.707 0.707 -0.707 -0.707 -0.707
- \else
- \setchemicalrotation 1 .866 -.5 -.5 -.866 -.866 .5 .5 .866
- \setchemicalrotation 2 -.259 .966 .966 .259 .259 -.966 -.966 -.259
- \setchemicalrotation 3 -.5 -.866 -.866 .5 .5 .866 .866 -.5
- \fi
- \setchemicalrotation 4 0.707 -0.707 -0.707 -0.707 -0.707 0.707 0.707 0.707
- \setchemicalrotation 5 -0.707 -0.707 -0.707 0.707 0.707 0.707 0.707 -0.707
- \setchemicalrotation 6 0 1 1 0 0 -1 -1 0
- %
- \ifNEWMANstagger
- \setchemicalangle 1 315 45 135 225
- \setchemicalangle 2 90 180 270 0
- \setchemicalangle 3 225 315 45 135
- \else
- \setchemicalangle 1 30 120 210 300
- \setchemicalangle 2 255 345 75 165
- \setchemicalangle 3 120 210 300 30
- \fi
- \setchemicalangle 4 45 135 225 315
- \setchemicalangle 5 135 225 315 45
- \setchemicalangle 6 270 0 90 180
- %
- \setchemicaltranslate 1 -1500 0
- \setchemicaltranslate 2 0 1500
- \setchemicaltranslate 3 1500 0
- \setchemicaltranslate 4 0 -1500
- %
- \setchemicallinesegment B1 0 0 1000 0
- \setchemicallinesegment B2 0 0 1000 0
- \setchemicallinesegment B3 0 0 1000 0
- \setchemicallinesegment B4 500 0 1000 0
- \setchemicallinesegment B5 500 0 1000 0
- \setchemicallinesegment B6 500 0 1000 0
- %
- \setchemicaltextelement Z 1100 0
- %
- \setchemicalcircsegment C 0 360 500 360 0 -500
- %
- \def\processchemical[##1##2##3##4]%
- {\processaction
- [##1##2##3##4]
- [STAGGER????=>{\executechemicalNEWMANSTAGGER[#1]},
- ECLIPSE????=>{\executechemicalNEWMANECLIPSE[#1]},
- B????=>\processlocalchemicals{B1..6},
- CB????=>\processlocalchemicals{B1..6,C,Z1..6},
- C????=>\processchemicalcircsegment{C}{1????},
- ROT##4=>\processchemicalrotation{##4},
- MOV##4=>\processchemicaltranslate{##4},
- B##2##3##4=>\processprivatechemicallinesegment{B}{##2##3##4},
- Z##2##3##4=>\ifNEWMANstagger
- \processchemicaltextelement{Z}{##2##3##4}{#1}{6}
- {l,t,r,l,r,b, l,r,l,r,r,l, r,b,l,r,l,t, r,l,r,l,l,r}%
- \else
- \processchemicaltextelement{Z}{##2##3##4}{#1}{6}
- {l,r,t,t,r,b, t,b,r,r,b,l, r,l,b,b,l,t, b,t,l,l,t,r}%
- \fi,
- \s!unknown=>\unknownchemical{##1##2##3##4}]}}
-
-\def\executechemicalCHAIR[#1]% smaller
- {\setchemicalname CHAIR
- %
- \setchemicalmaximum 6
- %
- \setchemicallinesegment B1 1600 800 2800 -800
- \setchemicallinesegment B2 2800 -800 800 0
- \setchemicallinesegment B3 800 0 -1600 -800
- \setchemicallinesegment B4 -1600 -800 -2800 800
- \setchemicallinesegment B5 -2800 800 -800 0
- \setchemicallinesegment B6 -800 0 1600 800
- %
- \setchemicallinesegment +R1 1600 800 1600 1600
- \setchemicallinesegment +R2 2800 -800 2800 -1600
- \setchemicallinesegment +R3 800 0 800 800
- \setchemicallinesegment +R4 -1600 -800 -1600 -1600
- \setchemicallinesegment +R5 -2800 800 -2800 1600
- \setchemicallinesegment +R6 -800 0 -800 -800
- %
- \setchemicallinesegment -R1 1600 800 2350 522 % 750 278
- \setchemicallinesegment -R2 2800 -800 3493 -400
- \setchemicallinesegment -R3 800 0 1329 -600 % 528 600
- \setchemicallinesegment -R4 -1600 -800 -2350 -522 % 750 278
- \setchemicallinesegment -R5 -2800 800 -3493 400
- \setchemicallinesegment -R6 -800 0 -1329 600 % 528 600
- %
- \setchemicaltextelement +RZ1 1600 1800
- \setchemicaltextelement +RZ2 2800 -1800
- \setchemicaltextelement +RZ3 800 1000
- \setchemicaltextelement +RZ4 -1600 -1800
- \setchemicaltextelement +RZ5 -2800 1800
- \setchemicaltextelement +RZ6 -800 -1000
- %
- \setchemicaltextelement -RZ1 2538 453 % 200 lang
- \setchemicaltextelement -RZ2 3666 -300
- \setchemicaltextelement -RZ3 1460 -750
- \setchemicaltextelement -RZ4 -2538 -453
- \setchemicaltextelement -RZ5 -3666 300
- \setchemicaltextelement -RZ6 -1460 750
- %
- \def\processchemical[##1##2##3##4##5]%
- {\def\chemicalrotation{1}%
- \processaction
- [##1##2##3##4##5]
- [ B????=>\processlocalchemicals{B1,B2,B3,B4,B5,B6},
- -R????=>\processlocalchemicals{-R1,-R2,-R3,-R4,-R5,-R6},
- +R????=>\processlocalchemicals{+R1,+R2,+R3,+R4,+R5,+R6},
- B##2????=>{\getchemicallinesegment[0][B##2]},
- -RZ##4????=>{\getchemicalfixedtextelement[-RZ##4][1][##4][l,l,tc,r,r,bc][#1]},
- +RZ##4????=>{\getchemicalfixedtextelement[+RZ##4][1][##4][c][#1]},
- -R##3????=>{\getchemicallinesegment[0][-R##3]},
- +R##3????=>{\getchemicallinesegment[0][+R##3]},
- \s!unknown=>\unknownchemical{##1##2##3##4##5}]}}
-
-\def\executechemicalarrow#1#2[#3]%
- {\dogetcommalistelement1\from#3\to\toptext
- \dogetcommalistelement2\from#3\to\bottext
- \def\dochemicaltext##1%
- {\dosetsubscripts%
- $\@@dochemicalstyle{\@@localchemicalformat\strut##1}$%
- \doresetsubscripts}%
- \doifelse\@@chemicallocation\v!intext
- {#1{\dochemicaltext\toptext}}%
- {\setbox\chemicalsymbols=\hbox
- {\box\chemicalsymbols
- \vbox{\halign{##\cr
- \hbox to 3em{\hss\dochemicaltext{\toptext}\hss}\cr
- #2%
- \hbox to 3em{\hss\dochemicaltext{\bottext}\hss}\cr}}}}}
-
-\def\executechemicalGIVES
- {\executechemicalarrow
- {\chemicalsinglepicturearrow}% nodig
- {\rightarrowfill\cr}}
-
-\def\executechemicalEQUILIBRIUM
- {\executechemicalarrow
- {\chemicaldoublepicturearrow}% nodig
- {\rightarrowfill\cr\leftarrowfill\cr}}
-
-\def\executechemicalMESOMERIC
- {\executechemicalarrow
- {\chemicalsinglepicturearrow}% nodig
- {$\leftarrow\hskip-1em$\rightarrowfill\cr}}
-
-\def\executechemicalsign#1[#2]%
- {\doifelse\@@chemicallocation\v!intext
- {\dosetsubscripts
- $\@@dochemicalstyle{\@@localchemicalformat#1}$%
- \doresetsubscripts}
- {\setbox\chemicalsymbols\hbox
- {\box\chemicalsymbols
- \dosetsubscripts
- $\@@dochemicalstyle{\@@localchemicalformat#1}$%
- \doresetsubscripts}}}
-
-\def\executechemicalPLUS
- {\executechemicalsign{+}}
-
-\def\executechemicalMINUS
- {\executechemicalsign{-}}
-
-\def\executechemicalEQUAL
- {\executechemicalsign{=}}
-
-\def\executechemicalSPACE[#1]%
- {\doifnot\@@chemicallocation\v!intext
- {\setbox\chemicalsymbols\hbox
- {\box\chemicalsymbols
- \quad}}}
-
-\def\executechemicalCHEM[#1]%
- {\doifnot\@@chemicallocation\v!intext
- {\setbox\chemicalsymbols\hbox
- {\box\chemicalsymbols
- $\@@dochemicalstyle{\@@localchemicalformat#1}$}}}
-
-\def\executechemicalTEXT[#1]%
- {\doifnot\@@chemicallocation\v!intext
- {\setbox\chemicalsymbols\hbox
- {\box\chemicalsymbols#1}}}
-
-%\def\executechemicalLOW[#1]%
-% {\setlowsubscripts}
-%
-%\def\executechemicalHIGH[#1]%
-% {\sethighsubscripts}
-
-\def\putchemicalrule#1#2#3#4%
- {\ifcase\chemicaldrawingmode
- \putrule from {#1} {#2} to {#3} {#4}
- \or
- \psline(#1,#2)(#3,#4)%
- \or
- \bgroup
- \!!counta=#1\!!countb=#2\!!countc=#3\!!countd=#4\relax
- \global\MPdrawingdonetrue
- \setchemicalattributes
- \startMPdrawing
- x1 := \MPdivten[\the\!!counta]u ;
- y1 := \MPdivten[\the\!!countb]u ;
- x2 := \MPdivten[\the\!!countc]u ;
- y2 := \MPdivten[\the\!!countd]u ;
- draw z1--z2 ;
- \stopMPdrawing
- \egroup
- \fi}
-
-\def\executechemicalcomplex#1%
- {\bgroup
- \putchemicalrule {0} {-\@@chemicalbottom} {0} {\@@chemicaltop}%
- \putchemicalrule {0} {\@@chemicaltop} {#1150} {\@@chemicaltop}%
- \putchemicalrule {0} {-\@@chemicalbottom} {#1150} {-\@@chemicalbottom}%
- \egroup}
-
-\def\executechemicalOPENCOMPLEX[#1]%
- {\executechemicalcomplex+\ignorespaces
- \executechemicalSPACE[]}
-
-\def\executechemicalCLOSECOMPLEX[#1]%
- {\executechemicalSPACE[]%
- \executechemicalcomplex-\ignorespaces}
-
-% nog niet door midden as!
-
-\def\executechemicalverticalsymbol#1#2%
- {\executechemicalTEXT
- [$\left#1\relax
- \dimen0=\@@chemicalunit
- \scratchcounter=\@@chemicaltop
- \advance\scratchcounter by \@@chemicalbottom
- \dimen0=\scratchcounter\dimen0
- \vcenter to \dimen0{}
- \dimen2=\@@chemicalunit
- \dimen2=\@@chemicalright\dimen0
- \vcenter{\leftskip1em\hsize\dimen2\relax\strut#2\strut}%
- \right.$]}%
-
-\def\executechemicalUPARROW[#1]%
- {\executechemicalverticalsymbol\uparrow{#1}}
-
-\def\executechemicalDOWNARROW[#1]%
- {\executechemicalverticalsymbol\downarrow{#1}}
-
-\def\executechemicalUPDOWNARROW[#1]%
- {\executechemicalverticalsymbol\updownarrow{#1}}
-
-\let\setchemicalattributes\relax
-
-\setupchemical
- [\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!alternative=1,
- \c!color=,
- \c!rulethickness=,
- \c!rulecolor=,
- \c!factor=1]
-
-% Tijdelijk plaatsen we deze extra macro's hier.
-%
-% mathontop: \mtop {} {}
-% textontop: \ttop {} {}
-
-\def\putontop#1#2%
- {\vbox
- {\halign
- {\strut\hss##\hss\cr
- #1\cr
- #2\cr}}}
-
-\def\ttop#1#2%
- {\putontop{\tx#1}{#2}}
-
-\def\mtop#1#2%
- {\vbox
- {\offinterlineskip
- \halign
- {\hss##\hss\cr
- $\scriptscriptstyle#1$\cr
- \noalign{\vskip.5ex}%
- $#2$\cr}}}
-
-\def\ctop#1#2%
- {\vbox
- {\offinterlineskip
- \halign
- {\hss##\hss\cr
- $\@@dochemicalstyle{\@@localchemicalformat\scriptscriptstyle#1}$\cr
- \noalign{\vskip.5ex}%
- $\@@dochemicalstyle{\@@localchemicalformat#2}$\cr}}}
-
-%D Here are a couple of \CONTEXT\ goodies:
-%D
-%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 \stopitemize
-
-\ifCONTEXT \else \protect \endinput \fi
-
-\let\@@chemicalrulecolor\empty
-\let\@@chemicalcolor \empty
-
-% \def\setchemicalattributes
-% {\scratchdimen\@@chemicalchemicalrulethickness
-% \def\chemicalattributes
-% {withpen pencircle scaled \the\scratchdimen\space
-% withcolor }%
-% \doifelsenothing\@@chemicalchemicalrulecolor
-% {\edef\chemicalattributes{\chemicalattributes black}}
-% {\edef\chemicalattributes{\chemicalattributes \MPcolor{\@@chemicalchemicalrulecolor}}}%
-% \startMPdrawing
-% drawoptions (\chemicalattributes) ;
-% \stopMPdrawing}
-
-\def\setchemicalattributes
- {\scratchdimen\@@chemicalrulethickness
- \def\chemicalattributes
- {withpen pencircle scaled \the\scratchdimen\space
- withcolor }%
- \doifelsenothing\@@chemicalrulecolor
- {\edef\chemicalattributes{\chemicalattributes black}}
- {\edef\chemicalattributes{\chemicalattributes \MPcolor{\@@chemicalrulecolor}}}%
- \startMPdrawing
- drawoptions (\chemicalattributes) ;
- \stopMPdrawing}
-
-\def\@@dochemicalcolor
- {\doifsomething\@@chemicalcolor{\color[\@@chemicalcolor]}}
-
-\def\@@dochemicalstyle
- {\doconvertfont\@@chemicalstyle}
-
-\setupchemical
- [\c!rulethickness=\linewidth,
- \c!rulecolor=,
- \c!color=]
-
-\def\cpos#1#2%
- {\iftrialtypesetting
- #2%
- \else
- \bgroup
- \globalpushmacro\dowithchemical
- \gdef\dowithchemical##1{\hpos{#1}{##1}\globalpopmacro\dowithchemical}%
- #2%
- \egroup
- \fi}
-
-\protect \endinput
-
-% \startchemical[axis=on,frame=yes]
-% \chemical[SIX,ROT2,B,R36,RZ6][CH_3]
-% \chemical[PB:RZ3,ONE,Z05,SB5,EP37,PE][O,H]
-% \stopchemical
-
-% \startchemical[size=big,scale=small,axis=on,frame=yes,factor=1.5]
-% \chemical[SIX,ROT2,B,R36,RZ6][CH_3]
-% \chemical[PB:RZ3,ONE,Z05,SB5,EP37,PE][O,H]
-% \stopchemical
-
-% \startchemical[size=big,scale=medium,axis=on,frame=yes,factor=1.5]
-% \chemical[SIX,ROT2,B,R36,RZ6][CH_3]
-% \chemical[PB:RZ3,ONE,Z05,SB5,EP37,PE][O,H]
-% \stopchemical
-
-% \startchemical[size=big,scale=big,axis=on,frame=yes,factor=1.5]
-% \chemical[SIX,ROT2,B,R36,RZ6][CH_3]
-% \chemical[PB:RZ3,ONE,Z05,SB5,EP37,PE][O,H]
-% \stopchemical
-
diff --git a/Master/texmf-dist/tex/context/base/ppchtex.mkiv b/Master/texmf-dist/tex/context/base/ppchtex.mkiv
deleted file mode 100644
index d1167d4143a..00000000000
--- a/Master/texmf-dist/tex/context/base/ppchtex.mkiv
+++ /dev/null
@@ -1,3445 +0,0 @@
-%D \module
-%D [ file=ppchtex,
-%D version=1997.03.19,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=\PPCHTEX\ (Plain Pictex Context cHemie \TEX),
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D suggestions={Tobias Burnus, Dirk Kuypers \& Ton Otten},
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\endinput
-
-% 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, maybe ...
-
-% Deze module ondersteunt het zetten van chemische
-% (structuur)formules. Hoewel de macro' zijn afgestemd op
-% CONTEXT, zijn ze ook buiten deze zetomgeving te gebruiken.
-%
-% Dit is, afgezien van updates, de definitieve versie van
-% PPCHTEX. Gebruikersgemak, eenvoud, flexibiliteit, en
-% snelheid zijn inmiddels redelijk geoptimaliseerd. Dit neemt
-% niet weg dat hier en daar nog verbetering mogelijk is. Dit
-% zal dan ook nog gebeuren.
-%
-% Volgende versies zullen tenminste dezelfde functionaliteit
-% hebben. We houden ons natuurlijk het recht voor de kwaliteit
-% van de output te verbeteren. Daarnaast staan nog op het
-% wensenlijstje:
-%
-% - optimaliseren in termen van proces-tijd
-% - aanpassen naamgeving van interne macro's
-% - toevoegen van functionaliteit
-% - in \x!-vorm omzetten van GIVES, TB enz.
-%
-% De mix tussen engels en nederlands lijkt soms verwarrend.
-% Meestal zijn verborgen macro's engels en zichtbare macro's
-% nederlands. Het gebruik van [ ] en { } sluit aan op andere
-% Context-macro's. Hetzelfde geldt voor instellingen en
-% \start-\stop-constructies.
-%
-% De schijnbaar overbodige \bgroup-\egroup constructie
-% garandeert aansluiting bij de Context-macro's voor het
-% plaatsen van figuren, tabellen en andere floats.
-%
-% Binnen Context worden de macro's geladen met
-% \gebruikextras[chemie]. Daarbij wordt een passende melding
-% getoont. Buiten Context genereren we een melding:
-
-\doifundefined{usemodule}
- {\writestatus{loading}{ConTeXt Chemical Macro's / 1996.3.1}}
-
-% Er kan gebruik worden gemaakt van PiCTeX of PStricks. Een
-% van deze pakketten moet van te voren zijn geladen.
-%
-% \input prepictex.tex (i.g.v. LaTeX)
-% \input pictex.tex
-% \input postpictex.tex (i.g.v. LaTeX)
-%
-% of:
-%
-% \input multido.tex
-% \input pstricks.tex
-% \input pst-plot.tex
-%
-% In \CONTEXT\ kan men de modules m-pictex en m-pstricks
-% gebruiken. De eerste module laad of efficiente wijze PiCTeX
-% en de tweede module koppelt het PSTRICKS kleurmechanisme
-% aan dat van \CONTEXT.
-
-% PSTricks: {-\chemicalangle} instead of {*0}, which produces
-% faulty ps code when \chemicalangle=0
-
-\startcommands dutch english german
-
- gotochemical: naarchemie gotochemical zurchemie
- setupchemical: stelchemiein setupchemical stellechemieein
- startchemical: startchemie startchemical startchemie
- stopchemical: stopchemie stopchemical stopchemie
- definechemical: definieerchemie definechemical definierechemie
- chemical: chemie chemical chemie
- toptext: boventekst toptext textueber
- bottext: ondertekst bottext textunter
- midtext: middentekst midtext textmitte
-
-\stopcommands
-
-\doifundefined{fiverm} % In the more recent LaTeX versions
- {\font\fiverm=cmr5 } % \fiverm is no longer (pre)defined.
-
-\newconstant\chemicaldrawingmode
-
-\doifelsedefined{beginpicture} % PiCTeX
- {\doifelsedefined{startMPdrawing}
- {\chemicaldrawingmode\plustwo } % MetaPost
- {\chemicaldrawingmode\zerocount}} % raw
- {\doifelsedefined{psaxes}
- {\chemicaldrawingmode\plusone } % PSTricks
- {\chemicaldrawingmode\plusthree}} % unknown
-
-\ifcase\chemicaldrawingmode
- \writestatus{ppchtex}{using PiCTeX}
-\or
- \writestatus{ppchtex}{using PSTricks (still experimental)}
- \writestatus{ppchtex}{automatic sizing not (yet) supported}
-\or
- \writestatus{ppchtex}{using PiCTeX and MetaPost}
-\else
- \writestatus{ppchtex}{load PiCTeX (+pre/post) or PSTricks (+pst_plot) first}
- \bgroup
- \read16 to \exit
- \egroup
- \expandafter\endinput
-\fi
-
-%I n=Chemie
-%I c=\stelchemiein,\chemie
-%I
-%I Chemische formules kunnen worden gezet met behulp van de
-%I onderstaande commando's:
-%I
-%I buiten $ en $$ :
-%I
-%I \chemie[segmenten][symbolen]
-%I
-%I \startchemie[instellingen]
-%I \chemie...
-%I \chemie...
-%I \stopchemie
-%I
-%I en binnen $ en $$:
-%I
-%I \chemie{}{}
-%I
-%I Voor tekst, uitleg en voorbeelde verwijzen we vooralsnog
-%I naar de handleiding.
-%P
-%I Het gedrag van de macro's kan worden ingesteld met:
-%I
-%I \stelchemiein[breedte=,hoogte=,links=,rechts=,boven=,
-%I onder=,korps=,schaal=,status=,assenstelsel=,kader=,
-%I variant=,optie=,formaat=,tekstformaat=,resolutie=,
-%I offset=,letter=]
-%I
-%I Structuren kunnen worden voorgedefinieerd met het commando
-%I
-%I \definieerchemie[naam]{\chemie...}
-
-%S \startsetup
-%S \command
-%S [\!stelchemiein]
-%S \type
-%S [\c!vars!]
-%S \variable
-%S [\c!breedte]
-%S [\c!number!,\v!passend]
-%S [0]
-%S \variable
-%S [\c!hoogte]
-%S [\c!number!,\v!passend]
-%S [0]
-%S \variable
-%S [\c!links]
-%S [\c!number!]
-%S [0]
-%S \variable
-%S [\c!rechts]
-%S [\c!number!]
-%S [0]
-%S \variable
-%S [\c!boven]
-%S [\c!number!]
-%S [0]
-%S \variable
-%S [\c!onder]
-%S [\c!number!]
-%S [0]
-%S \variable
-%S [\c!resolutie]
-%S [\c!number!]
-%S [\outputresolution]
-%S \variable
-%S [\c!korps]
-%S [10pt,11pt,12pt]
-%S [\bodyfontsize]
-%S \variable
-%S [\c!schaal]
-%S [\v!klein,\v!middel,\v!groot]
-%S [\v!middel]
-%S \variable
-%S [\c!formaat]
-%S [\v!klein,\v!middel,\v!groot]
-%S [\v!groot]
-%S \variable
-%S [\c!tekstformaat]
-%S [\v!klein,\v!middel,\v!groot]
-%S [\v!groot]
-%S \variable
-%S [\c!status]
-%S [\v!start,\v!stop]
-%S [\v!start]
-%S \variable
-%S [\c!kader]
-%S [\v!aan,\v!uit]
-%S [\v!uit]
-%S \variable
-%S [\c!assenstelsel]
-%S [\v!aan,\v!uit]
-%S [\v!uit]
-%S \variable
-%S [\c!optie]
-%S [\v!test]
-%S []
-%S \variable
-%S [\c!variant]
-%S [1,2]
-%S [1]
-%S \variable
-%S [\c!offset]
-%S [HIGH,LOW]
-%S [LOW]
-%S \variable
-%S [\c!letter]
-%S [\c!command!]
-%S [\rm]
-%S \stopsetup
-
-%S \startsetup
-%S \command
-%S [\v!startchemie]
-%S \type
-%S [\c!vars!\c!stp!]
-%S \inheritvariable
-%S [\v!stelchemiein]
-%S []
-%S \stopsetup
-
-%S \startsetup
-%S \command
-%S [\v!chemie]
-%S \type
-%S [\c!vals!\c!vals!]
-%S \value
-%S [\c!list!]
-%S []
-%S \value
-%S [\c!list!]
-%S []
-%S \stopsetup
-
-%S \startsetup
-%S \command
-%S [definieerchemie]
-%S \type
-%S [\c!val!\c!arg!]
-%S \value
-%S [\c!text!]
-%S []
-%S \stopsetup
-
-\unprotect
-
-% Om te voorkomen dat sub- en superscripts botsen passen we
-% wat fontdimen's aan (Knuth, The TeXBook, p179). Helaas
-% kunnen deze instellingen niet lokaal worden gehouden door
-% groeperen, vandaar dat een en ander moet worden geset ‚n
-% gereset.
-%
-% Er dient een relatie te worden gelegd met de afmetingen
-% van de letters. In een eerdere versie werden daartoe de
-% \fontdimen's opgehoogd. Omdat dit problemen gaf bij
-% scaled fonts, is bij nader inzien gekozen voor de
-% onderstaande oplossing, waarbij de nieuwe waarden worden
-% afgeleid van de x-height (\fontexheight). De factor 0.70
-% is min of meer experimenteel vastgesteld. Soms worden de
-% regels iets verder uit elkaar gezet. Jammer. Italic fonts
-% hebben grotere cijfers en vallen min of meer uit de boot.
-
-\newif\ifloweredsubscripts % this will be redone in the mkiv ways
-
-\def\setsubscripts
- {\def\dosetsubscript##1##2##3%
- {\dimen0=##3\fontexheight##2%
- \setxvalue{@@\string##1\string##2}{\the##1##2\relax}%
- ##1##2=\dimen0\relax}%
- \def\dodosetsubscript##1##2%
- {\dosetsubscript{##1}{\textfont 2}{##2}%
- \dosetsubscript{##1}{\scriptfont 2}{##2}%
- \dosetsubscript{##1}{\scriptscriptfont2}{##2}}%
- %dodosetsubscript\mathsupnormal {?}%
- \dodosetsubscript\mathsubnormal {.7}%
- \dodosetsubscript\mathsubcombined{.7}%
- \global\loweredsubscriptstrue}
-
-\def\resetsubscripts
- {\ifloweredsubscripts
- \def\doresetsubscript##1##2%
- {\dimen0=\getvalue{@@\string##1\string##2}\relax
- ##1##2=\dimen0}%
- \def\dodoresetsubscript##1%
- {\doresetsubscript{##1}{\textfont2}%
- \doresetsubscript{##1}{\scriptfont2}%
- \doresetsubscript{##1}{\scriptscriptfont2}}%
- %dodoresetsubscript\mathsupnormal
- \dodoresetsubscript\mathsubnormal
- \dodoresetsubscript\mathsubcombined
- \global\loweredsubscriptsfalse
- \fi}
-
-\ifx\Umathchar\undefined \else
- % for the moment we nil them, soon we will have a proper
- % way to deal with this
- \let\setsubscripts \relax
- \let\resetsubscripts\relax
-\fi
-
-\def\doresetsubscripts
- {\resetsubscripts}
-
-\def\sethighsubscripts
- {\resetsubscripts
- \let\dosetsubscripts=\relax}
-
-\def\setlowsubscripts
- {\def\dosetsubscripts{\setsubscripts}}
-
-\setlowsubscripts
-
-\newcount\horchemical % t.z.t. \newcounter
-\newcount\verchemical % t.z.t. \newcounter
-\newcount\txtchemical % t.z.t. \newcounter
-\newcount\levchemical % t.z.t. \newcounter
-
-\newif\ifinchemical \inchemicalfalse
-\newif\iffixedchemical \fixedchemicalfalse
-
-\newbox\chemicalsymbols
-
-% Eigenlijk moeten de constanten en variabelen in cont-nl.tex
-% staan. Dit pakket is echter relatief onafhankelijk van CONTEXT.
-
-\definesystemvariable {chemical}
-
-\definesystemconstant {chemical}
-
-\definesystemconstant {translate}
-\definesystemconstant {distance}
-\definesystemconstant {mirror}
-\definesystemconstant {rotate}
-\definesystemconstant {substitute}
-\definesystemconstant {angle}
-
-\definesystemconstant {executechemical}
-\definesystemconstant {chemicaltextelement}
-\definesystemconstant {chemicallinesegment}
-\definesystemconstant {chemicalcircsegment}
-
-\def\chemicalspace {\quad}
-
-% begin van experiment:
-%
-% De onderstaande twee macro's kunnen worden gebruikt voor
-% bijvoorbeeld een interactiemechanisme.
-%
-% \localgotochemical {verwijzing} {tekst}
-% \localthisischemical {verwijzing}
-
-\def\dowithchemical%
- {}
-
-\def\localgotochemical#1#2{\gotobox{#2}[#1]}
-\def\localthisischemical#1{\pagereference[#1]}
-
-% eind van experiment
-
-\def\setchemicalmaximum #1
- {\def\maxchemical{#1}}
-
-\def\doifchemicalnumber#1#2#3%
- {\doifelsenumber{#1}
- {\ifnum#1>\maxchemical\relax
- \writestatus{ppchtex}{number #1 is skipped}%
- \else
- #3%
- \fi}
- {\unknownchemical{#2}}}%
-
-\newif\ifsmallchemicaltext
-
-\let\@@localchemicalstyle\empty
-
-\unexpanded\def\setupchemicalformat[#1]%
- {\processaction
- [\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!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!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
- \@@localchemicalformat
- \else
- \@@localchemicalstyle
- \fi}
-
-\def\dosetupchemical[#1]%
- {\getparameters[\??chemical\s!chemical][#1]%
- \doifelse{\@@chemicalchemicaloffset}{LOW}
- {\setlowsubscripts}
- {\sethighsubscripts}%
- \setupchemicalformat[\??chemical\s!chemical]%
- \ignorespaces}
-
-\unexpanded\def\setupchemical
- {\dosingleargument\dosetupchemical}
-
-\def\@@dochemicalstyle% % default mapping
- {\@@chemicalstyle}
-
-\def\@@dochemicalcolor% % no mapping yet
- {}
-
-\def\@@chemicalstyle % $inner-style$ % (overloaded)
- {\@@chemicalchemicalstyle} % $$outer-style$$
-
-\def\@@writechemicalstate#1#2%
- {}
-
-\def\@@beginchemicallocalpicture
- {\ifcase\chemicaldrawingmode
- \beginpicture
- \or
- \pspicture(0,0)(0,0) % is this permitted ?
- \or
- \pushMPdrawing
- \startMPdrawing
- %prologues := 1 ;
- %input mp-tool ;
- u := 10*\@@chemicalunit;
- bboxmargin := 0pt ;
- pickup pencircle scaled 2u ; % ???
- \stopMPdrawing
- \beginpicture
- \fi}
-
-\def\@@endchemicallocalpicture#1#2%
- {\ifcase\chemicaldrawingmode
- \endpicture
- \or
- \endpspicture
- \or
- \resetchemicalcoordinates
- \setbox2\hbox{\ignoreMPboxdepth\getMPdrawing}%
- \wd2\zeropoint
- \ht2\zeropoint
- \dp2\zeropoint
- \put {\box2} at 0 0
- \endpicture
- \popMPdrawing
- \fi}
-
-\def\@@beginchemicalpicture#1#2#3#4%
- {\ifnum\chemicaldrawingmode=1
- \pspicture(#1,#3)(#2,#4)%
- \def\account##1##2{}%
- \psaxes[axesstyle=none,labels=none,ticks=none](#1,#3)(#2,#4)%
- \else
- \beginpicture
- \setplotarea
- x from {#1} to {#2},
- y from {#3} to {#4}
- \iffixedchemical
- \accountingon
- \def\account##1##2%
- {\put {} at {##1} {##2} }%
- \else
- \accountingoff
- \def\account##1##2{}%
- \fi
- \fi
- \ignorespaces}
-
-\def\@@endchemicalpicture%
- {\ifcase\chemicaldrawingmode
- \put {\box\chemicalsymbols} at 0 0 % elders
- \endpicture
- \or
- \rput(0,0){\box\chemicalsymbols}%
- \endpspicture
- \or
- \put {\box\chemicalsymbols} at 0 0 % elders
- \ifMPdrawingdone
- \resetchemicalcoordinates
- \setbox2\hbox{\ignoreMPboxdepth\getMPdrawing}%
- \wd2\zeropoint
- \ht2\zeropoint
- \dp2\zeropoint
- \put {\box2} at 0 0 %
- \fi
- \endpicture
- \fi}
-
-\def\@@setchemicalcoordinatesystem#1%
- {\edef\@@chemicalunit{#1}%
- \ifcase\chemicaldrawingmode
- \setcoordinatesystem units <\@@chemicalunit,\@@chemicalunit> %
- \or
- \psset{unit=\@@chemicalunit}%
- \or
- \setcoordinatesystem units <\@@chemicalunit,\@@chemicalunit> %
- \startMPdrawing
- %input mp-tool ;
- %prologues := 1 ;
- u := 10*#1;
- bboxmargin := 0pt ;
- pickup pencircle scaled 2u ; % ???
- \stopMPdrawing
- \fi}
-
-\ifx\MPdivten\undefined % hack to prevent overflows in mp
- \def\MPdivten[#1]{\withoutpt\the\dimexpr#1pt/10\relax}
-\fi
-
-\def\@@setchemicalaxis#1#2#3#4%
- {\ifcase\chemicaldrawingmode
- \axis
- bottom shiftedto y=0
- ticks from {#1} to {#2} by 500 /
- \axis
- left shiftedto x=0
- ticks from {#3} to {#4} by 500 / %
- \or
- \psaxes[labels=none,Dx=500,Dy=500](0,0)(#1,#3)(#2,#4)%
- \or
- \global\MPdrawingdonetrue
- % we need to div beforehand because of mp limitations
- \startMPdrawing
- x1 := \MPdivten[#1]u ; x2 := \MPdivten[#2]u;
- y1 := \MPdivten[#3]u ; y2 := \MPdivten[#4]u;
- draw z1--(x2,y1)--z2--(x1,y2)--cycle ;
- d := 50u ; dd := 10u ;
- draw (x1,0)--(x2,0) ;
- draw (0,y1)--(0,y2) ;
- for i=d step -d until x1: draw (i,dd)--(i,-dd) ; endfor ;
- for i=d step d until x2: draw (i,dd)--(i,-dd) ; endfor ;
- for i=d step -d until y1: draw (-dd,i)--(dd,i) ; endfor ;
- for i=d step d until y2: draw (-dd,i)--(dd,i) ; endfor ;
- \stopMPdrawing
- \fi}
-
-\def\@@setsecondchemicalplotsymbol%
- {\ifcase\chemicaldrawingmode
- \!!widtha=50.8mm
- \divide\!!widtha by \@@chemicalresolution\relax
- \plotsymbolspacing=\!!widtha
- \setplotsymbol({\vrule\s!height\!!widtha\s!width\!!widtha})%
- \fi}
-
-% Something for Dirk:
-
-\newcount \currentchemical
-
-%\newif \ifskipchemical
-
-\def\setchemicaldimensions#1#2#3%
- {\bgroup
- \global\advance\currentchemical by 1
- \dimen0=#1\relax
- \dimen2=#2\relax
- \dimen4=#3\relax
- \setxvalue{chemical::\the\currentchemical}%
- {\noexpand\docommand{\the\dimen0}{\the\dimen2}{\the\dimen4}}%
- \egroup}
-
-\ifx\normalchemicalframe\undefined
- \let\normalchemicalframe\hbox % hook for educational purposes
-\fi
-
-\unexpanded\def\complexstartchemical[#1]%
- {\copyparameters
- [\??chemical][\??chemical\s!chemical]
- [\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!factor,
- \c!location,\c!option,\c!alternative,\c!resolution,\c!offset,\c!style,
- \c!color,\c!rulecolor,\c!rulethickness]%
- \getparameters
- [\??chemical]
- [#1]%
- %
- \setupchemicalformat[\??chemical]%
- %
- \ifnum\chemicaldrawingmode=2
- \resetMPdrawing
- \fi
- %
- \doif{\@@chemicalalternative}{2}
- {\@@setsecondchemicalplotsymbol}%
- %
- \doif{\@@chemicalaxis}\v!on
- {\let\chemicalframe\hbox}%
- %
- \!!counta=250000
- \divide\!!counta by \@@localchemicalscale
- \!!widtha=\@@chemicalbodyfont
- \divide\!!widtha by \!!counta
- \@@setchemicalcoordinatesystem{\the\!!widtha}%
- %
- % \!!counta = -x \!!countc = -y
- % \!!countb = +x \!!countd = +y
- %
- \def\calculateaxis##1##2##3##4##5%
- {##1=##3\relax
- ##2=##4\relax
- \ifnum##5=0
- \ifnum##3=0
- \ifnum##4=0
- ##1=2000
- ##2=2000
- \fi
- \fi
- \else
- \ifnum##3=0
- \ifnum##4=0
- ##1=##5\relax
- \divide##1 by 2
- ##2=##1\relax
- \else
- ##1=##5\relax
- \advance##1 by -##2\relax
- \fi
- \else
- \ifnum##4=0
- ##2=##5\relax
- \advance##2 by -##1\relax
- \fi
- \fi
- \fi}%
- \fixedchemicalfalse
- \doif\@@chemicalwidth\v!fit
- {\edef\@@chemicalwidth
- {\ifnum\chemicaldrawingmode=1 2000 \else 1 \fi}%
- \fixedchemicaltrue}%
- \doif\@@chemicalheight\v!fit
- {\edef\@@chemicalheight
- {\ifnum\chemicaldrawingmode=1 2000 \else 1 \fi}%
- \fixedchemicaltrue}%
- \doifelse\@@chemicallocation\v!intext
- {\!!counta=0 \!!countb=0
- \!!counta=0 \!!countd=0 }
- {\calculateaxis
- \!!counta\!!countb
- \@@chemicalleft\@@chemicalright\@@chemicalwidth
- \calculateaxis
- \!!countc\!!countd
- \@@chemicalbottom\@@chemicaltop\@@chemicalheight}%
- %
- \edef\@@chemheight {\the\!!countc}%
- \edef\@@chemdepth {\the\!!countd}%
- \edef\@@chemicaltop {\the\!!countc}%
- \edef\@@chemicalbottom{\the\!!countd}%
- %
- \doifelseinset\v!on{\@@chemicalframe,\@@chemicalaxis}
- {\def\@@chemicalborder{\chemicalframe}}
- {\def\@@chemicalborder{\normalchemicalframe}}%
- %
- \setbox0=\hbox\bgroup % this was a \vbox which took \hsize
- %
- \@@beginchemicalpicture
- {-\the\!!counta}{\the\!!countb}
- {-\the\!!countc}{\the\!!countd}%
- \doif{\@@chemicalstate}\v!start
- {\doif\@@chemicalaxis\v!on
- {\@@setchemicalaxis
- {-\the\!!counta}{\the\!!countb}
- {-\the\!!countc}{\the\!!countd}}}%
- \doifelse\@@chemicaloption\v!test
- {\def\@@writechemicalstate##1##2%
- {\convertargument##2\to\ascii
- \writestatus{##1}{\ascii}}}
- {\def\@@writechemicalstate##1##2{}}%
- \ignorespaces}
-
-\def\dostartchemical%
- {\catcode`\^=\superscriptcatcode% t.b.v. \enableduplication
- \catcode`\_=\subscriptcatcode % t.b.v. de zekerheid
- \begingroup
- \inchemicaltrue
- \def\toptext##1{\gdef\thetoptext{##1}\ignorespaces}\toptext{}%
- \def\bottext##1{\gdef\thebottext{##1}\ignorespaces}\bottext{}%
- \def\midtext##1{\gdef\themidtext{##1}\ignorespaces}\midtext{}%
- \def\@@chemicalpostponed{}%
- \complexorsimpleempty\startchemical}
-
-\unexpanded\def\startchemical
- {\bgroup % t.b.v. ungrouped floats
- \dostartchemical}
-
-\unexpanded\def\stopchemical
- {\checkchemicalpicture
- \@@endchemicalpicture
- \egroup
- \ifnum\chemicaldrawingmode=1
- \dimen0=\@@chemicalunit
- \setbox0=\hbox{\lower\@@chemdepth\dimen0\box0}%
- \ht0=\@@chemheight\dimen0
- \dp0=\@@chemdepth\dimen0
- \fi
- \dimen0=\ht0
- \advance\dimen0 by \dp0
- \inchemicalfalse % enables \chemie{} in text
- \setbox4=\alignedchemical\themidtext
- \setbox6=\alignedchemical\thetoptext
- \setbox8=\alignedchemical\thebottext
- \setbox4=\hbox to \wd0
- {\strut\hss$\vcenter{\box4}$\hss}%
- \setbox2=\vbox to \dimen0
- {\hbox to \wd0{\strut\hss\box6\hss}
- \vfill
- \hbox to \wd0{\strut\hss\box8\hss}
- \vss}% disables the depth
- \wd0=0pt \wd4=0pt
- \ht2=\ht0 \dp2=\dp0
- \ht4=\ht0 \dp4=\dp0
- \@@chemicalborder{\box0\box4\box2}% text on top of chemicals
- \endgroup
- \ignorespaces
- \egroup} % t.b.v. ungrouped floats
-
-\def\alignedchemical#1%
- {\vtop
- {\def\par{\egroup\hbox\bgroup\strut}%
- \let\\=\par
- \let\endgraf=\par
- \hbox\bgroup\strut#1\egroup}}
-
-% \setchemicalcoordinates{#1}{#2}
-%
-% #1: verplaatsing in x-richting
-% #2: verplaatsing in y-richting
-
-\newif\ifchemicaldirection
-
-\def\checkchemicaldirection#1#2%
- {\ifchemicaldirection
- \ifnum#1>0 \advance\horchemical -\chemicaldirection \fi
- \ifnum#1<0 \advance\horchemical +\chemicaldirection \fi
- \ifnum#2>0 \advance\verchemical -\chemicaldirection \fi
- \ifnum#2<0 \advance\verchemical +\chemicaldirection \fi
- \chemicaldirectionfalse
- \fi}
-
-\def\processchemicaldirection%
- {\chemicaldirectiontrue\processchemicaltranslate}
-
-\def\setchemicalcoordinates#1#2%
- {\advance\horchemical #1\relax
- \advance\verchemical #2\relax
- \checkchemicaldirection{#1}{#2}%
- \!!counta=-\horchemical\edef\chemicalxoffset{\the\!!counta}%
- \!!countb=-\verchemical\edef\chemicalyoffset{\the\!!countb}%
- \ifnum\chemicaldrawingmode=1
- % njet
- \else
- \setcoordinatesystem point at {\the\horchemical} {\the\verchemical}
- \fi}
-
-\def\resetchemicalcoordinates
- {\horchemical=0
- \verchemical=0
- \edef\chemicalxoffset{0}%
- \edef\chemicalyoffset{0}%
- \ifnum\chemicaldrawingmode=1
- % njet
- \else
- \setcoordinatesystem point at 0 0
- \fi}
-
-\def\restorechemicalcoordinates
- {%\writestatus{ppchtex}{restoring \the\horchemical,\the\verchemical}%
- \edef\chemicalxoffset{\the\horchemical}%
- \edef\chemicalyoffset{\the\verchemical}%
- \ifnum\chemicaldrawingmode=1
- % njet
- \else
- \setcoordinatesystem point at {\the\horchemical} {\the\verchemical}
- \fi}
-
-\def\setchemicaltranslate #1 #2 #3
- {\setvalue{\s!translate#1}{\setchemicalcoordinates{#2}{#3}}}
-
-\def\processchemicaltranslate#1%
- {\def\doprocess[##1##2]%
- {\doifchemicalnumber{##1}{MOV#1}
- {\ifnum##1=0
- \def\chemicaloffset{0}% incompatible change
- \resetchemicalcoordinates
- \else
- \getvalue{\s!translate##1}%
- \dochemicaloffset{##1}%
- \def\chemicaloffset{0}%
- \fi}}%
- \doprocess[#1]}
-
-\def\setchemicaldistance #1
- {\setvalue{\s!distance1}{\setchemicalcoordinates{-#1}{ 0}}%
- \setvalue{\s!distance2}{\setchemicalcoordinates{ 0}{ #1}}%
- \setvalue{\s!distance3}{\setchemicalcoordinates{ #1}{ 0}}%
- \setvalue{\s!distance4}{\setchemicalcoordinates{ 0}{-#1}}}
-
-\def\setchemicaldirection #1
- {\def\chemicaldirection{#1}}
-
-\def\processchemicaldistance#1%
- {\def\doprocess[##1##2]%
- {\doifchemicalnumber{##1}{ADJ#1}
- {\ifnum##1=0
- \resetchemicalcoordinates
- \else
- \def\@@chemicalpostponed{\getvalue{\s!distance##1}}%
- \@@chemicalpostponed
- \fi}}%
- \doprocess[#1]}
-
-\def\setchemicalsubstitute #1
- {\setvalue{\s!substitute1}{\setchemicalcoordinates{-#1}{ 0}}%
- \setvalue{\s!substitute2}{\setchemicalcoordinates{ 0}{ #1}}%
- \setvalue{\s!substitute3}{\setchemicalcoordinates{ #1}{ 0}}%
- \setvalue{\s!substitute4}{\setchemicalcoordinates{ 0}{-#1}}}
-
-\def\processchemicalsubstitute#1%
- {\def\doprocess[##1##2]%
- {\doifchemicalnumber{##1}{SUB#1}
- {\ifnum##1=0
- \resetchemicalcoordinates
- \else
- \def\@@chemicalpostponed{\getvalue{\s!substitute##1}}%
- \@@chemicalpostponed
- \fi}}%
- \doprocess[#1]}
-
-% Het is mogelijk een offset of move meerdere malen uit te
-% voeren, door een nummer voor het commando te plaatsen.
-
-\def\chemicalrepeat {1}
-
-\def\redoprocesschemical[#1#2]%
- {\doifelseinstring{#1}{0123456789.}
- {\edef\chemicalrepeat{\chemicalrepeat#1}%
- \redoprocesschemical[#2]}
- {\processchemical[#1#2]%
- \def\chemicalrepeat{1}}}
-
-\def\doprocesschemical[#1#2]#3%
- {\doifelseinstring{#1}{0123456789.}
- {\def\chemicalrepeat{#1}%
- \redoprocesschemical[#2]}
- {#3}}
-
-% \dochemicaloffset{#1}
-%
-% #1: binding
-
-\def\chemicaloffset{0}
-
-\def\processchemicaloffset#1%
- {\dimen0=62500 sp % real calc on cardinals, funny number
- \dimen0=\chemicalrepeat\dimen0
- \divide\dimen0 by \@@localchemicalscale
- \!!counta=\dimen0
- \def\doprocess[##1##2]%
- {\doifelseinstring{##1}{128}
- {\edef\chemicaloffset{\the\!!counta}}
- {\doifelseinstring{##1}{456}
- {\edef\chemicaloffset{-\the\!!counta}}
- {\doifelse{##1}{0}
- {\edef\chemicaloffset{0}}
- {\unknownchemical{OFF#1}}}}}%
- \doprocess[#1]}
-
-\def\dochemicaloffset#1%
- {\ifnum\chemicaloffset=0
- \def\undochemicaloffset{}%
- \else
- \setchemicalcoordinates{-\chemicaloffset}{0}%
- \def\undochemicaloffset%
- {\setchemicalcoordinates{\chemicaloffset}{0}%
- \def\undochemicaloffset{}}%
- \fi}
-
-\def\processchemicalphantom#1#2%
- {\setbox0=\hbox
- {\def\splitoff##1????{##1}%
- $\@@dochemicalstyle{\@@localchemicalformat\splitoff#2}$}%
- \dimen0=.25\wd0
- \divide\dimen0 by \@@localchemicalscale
- \!!counta=\dimen0
- \doifelseinstring{#1}{128}
- {\edef\chemicaloffset{\the\!!counta}}
- {\doifelseinstring{#1}{456}
- {\edef\chemicaloffset{-\the\!!counta}}
- {\doifelse{#1}{0}
- {\edef\chemicaloffset{0}}
- {\unknownchemical{OF#1:#2}}}}}
-
-% \dosetchemicalrotation{#1}{#2}
-%
-% #1: cos(phi)
-% #2: sin(phi)
-
-\def\chemicalrotation {1}
-\def\chemicalangle {0}
-\def\chemicalxoffset {0}
-\def\chemicalyoffset {0}
-
-\def\setchemicalmirror#1%
- {\setvalue{\s!mirror#1}{*}}
-
-\def\resetchemicalmirror#1%
- {\resetvalue{\s!mirror#1}}
-
-\def\togglechemicalmirror#1%
- {\doifelse{\getvalue{\s!mirror#1}}{*}
- {\resetchemicalmirror{#1}}
- {\setchemicalmirror{#1}}}
-
-\def\setchemicalrotation #1 #2 #3 #4 #5 #6 #7 #8 #9
- {\setvalue{\s!rotate1.#1}{\dosetchemicalrotation{#2}{#3}}%
- \setvalue{\s!rotate2.#1}{\dosetchemicalrotation{#4}{#5}}%
- \setvalue{\s!rotate3.#1}{\dosetchemicalrotation{#6}{#7}}%
- \setvalue{\s!rotate4.#1}{\dosetchemicalrotation{#8}{#9}}}
-
-\def\setchemicalangle #1 #2 #3 #4 #5
- {\setvalue{\s!angle1.#1}{\dosetchemicalangle{#2}}%
- \setvalue{\s!angle2.#1}{\dosetchemicalangle{#3}}%
- \setvalue{\s!angle3.#1}{\dosetchemicalangle{#4}}%
- \setvalue{\s!angle4.#1}{\dosetchemicalangle{#5}}}
-
-\def\chemicalrotate[#1]%
- {\doifelsedefined{\s!mirror#1}
- {\getvalue{\s!rotate\chemicalrotation.#1\getvalue{\s!mirror#1}}%
- \getvalue{\s!angle\chemicalrotation.#1\getvalue{\s!mirror#1}}}
- {\getvalue{\s!rotate\chemicalrotation.#1}%
- \getvalue{\s!angle\chemicalrotation.#1}}}
-
-\def\dosetchemicalangle#1% zwak zie onder
- {\def\chemicalangle{#1}}
-
-\def\dosetchemicalrotation#1#2%
- {\ifnum\chemicaldrawingmode=1
- % njet
- \else
- \startrotation by {#1} {#2} %% \stoprotation (t.b.v. testen)
- \fi}
-
-\def\doresetchemicalrotation
- {\ifnum\chemicaldrawingmode=1
- % njet
- \else
- \stoprotation
- \fi}
-
-\def\processchemicalrotation#1%
- {\def\doprocess[##1##2]%
- {\doifelsenumber{##1}
- {\def\chemicalrotation{##1}}
- {\unknownchemical{ROT#1}}}%
- \doprocess[#1]}
-
-% \filtertextelement[#1][#2][#3][#4]
-%
-% #1: volgnummer
-% #2: offset in uitlijningen
-% #3: lijst met uitlijningen -> \chemicalloca
-% #4: lijst met teksten -> \chemicaltext
-
-\def\setchemicallocation#1%
- {\doifelse{#1}{}
- {\edef\chemicalloca{c}}
- {\edef\chemicalloca{#1}}}
-
-\newif\iffixedchemicaltext
-
-\def\filterchemicaltextelement[#1][#2][#3][#4]%
- {\ifchemicaltextconstant
- \def\chemicaltext{#4}%
- \setchemicallocation{}%
- \else
- \ifnum#1=0\relax
- \setchemicallocation{}%
- \else
- \iffixedchemicaltext
- \!!counta#2
- \else
- \!!counta=\chemicalrotation
- \advance\!!counta -1
- \multiply\!!counta #2
- \advance\!!counta #1
- \fi
- \getfromcommalist[#3][\the\!!counta]%
- \setchemicallocation\commalistelement
- \fi
- \ifchemicalpicture
- \let\chemicaltext\relax
- \else
- \advance\txtchemical 1
- \getfromcommalist[#4][\txtchemical]%
- \let\chemicaltext\commalistelement
- \fi
- \fi
- \fixedchemicaltextfalse}
-
-% \putchemicaltext{#1}{#2}
-%
-% #1 : x-coordinaat
-% #2 : y-coordinaat
-%
-% \chemicaltext en \chemicalloca worden met \gettextelement
-% opgehaald uit de tweede set bij \chemie
-%
-% Ten behoeve van testdoeleinden wordt gebruik gemaakt van
-% \chemicalframe in plaats van het meer sjieke, maar tevens
-% meer trage \framed.
-
-\ifx\ruledhbox\undefined
- \def\chemicalframe#1%
- {\hbox
- {\vrule\hskip-.4pt
- \vbox{\hrule\vskip-.4pt\hbox{#1}\vskip-.4pt\hrule}%
- \hskip-.4pt\vrule}}
-\else
- \def\chemicalframe#1%
- {\ruledhbox{#1}}
-\fi
-
-\def\doputchemicaltext#1 [#2] at #3 #4 %
- {\ifnum\chemicaldrawingmode=1
- \rput
- {-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\expanded{\rput[#2]{\chemicalangle}(#3,#4){#1}}}%
- \else
- \put {#1} [#2] at {#3} {#4} %
- \fi}
-
-\def\dodoifsinglelocation#1#2\\#3%
- {\ifx#2\relax#3\fi}
-
-\def\doifelsesinglelocation#1%
- {\expandafter\dodoifsinglelocationelse#1\relax\\}
-
-\let\doifsinglelocationelse\doifelsesinglelocation
-
-\def\putchemicaltext#1#2%
- {\enablechemicalspecials
- \ifchemicalpicture
- \setchemicalpicture{#1}{#2}%
- \else
- \doifelse\@@chemicaloption\v!test
- {\def\@@chemicalframe{\chemicalframe}}
- {\def\@@chemicalframe{}}%
- \dosetsubscripts
- \setbox2=\hbox{\@@dochemicalcolor
- $\@@dochemicalstyle{\@@localchemicalformat \chemicaltext}$}%
- \setbox4=\hbox{$\@@dochemicalstyle{\@@localchemicalformat C\normalsubscript2\normapsuperscript2}$}%
- \setbox6=\hbox{$\@@dochemicalstyle{\@@localchemicalformat O}$}% or C
- \doresetsubscripts
- \doifnot\@@chemicallocation\v!intext
- {\ht2=\ht4
- \dp2=\dp4}%
- \setbox2=\hbox{\@@chemicalframe{\box2}}%
- \ifdim\wd2>\wd6
- \doifelse{#1}{0}
- {\doifnot{#2}{0}{\wd2=\wd6}}
- {%\doifsinglelocation\chemicalloca
- {\doifinset{\chemicalloca}{t,b}{\wd2=\wd6}}}% common ?
- \fi
- \expanded
- {\doputchemicaltext
- {\noexpand\dowithchemical{\copy2}} % per se \copy2 i.p.v. \box2
- [\chemicalloca] at {#1} {#2} }
- \nomoreaccounting
- \fi
- \disablechemicalspecials}
-
-\def\setchemicaltextelement #1 #2 #3
- {\setvalue{\s!chemicaltextelement#1}{\putchemicaltext{#2}{#3}}}
-
-\def\getchemicalfixedtextelement%
- {\fixedchemicaltexttrue
- \getchemicaltextelement}
-
-\def\getchemicaltextelement[#1][#2][#3][#4][#5]%
- {\filterchemicaltextelement[#2][#3][#4][#5]%
- \doifelse{#2}{0}
- {\dochemicaloffset{#2}% % incompatible change
- \putchemicaltext{0}{0}%
- \undochemicaloffset} % incompatible change
- {\chemicalrotate[#2]%
- \dochemicaloffset{#2}%
- \def\chemicaltextelementnumber{#2}%
- \getvalue{\s!chemicaltextelement#1}%
- \getvalue{\s!chemicaltextelement#11}%
- \getvalue{\s!chemicaltextelement#12}%
- \getvalue{\s!chemicaltextelement#13}%
- \undochemicaloffset}}
-
-\def\processchemicaltextelement#1#2#3#4#5%
- {\def\doprocess[##1##2##3##4##5]%
- {\doifelse{##1}{?}
- {\doprocess[1..\maxchemical ????]}
- {\doifchemicalnumber{##1}{#1#2}
- {\doifelse{##2##3}{..}
- {\doifchemicalnumber{##4}{#1#2}
- {\getchemicaltextelement[#1][##1][#4][#5][#3]%
- \doifnot{##1}{##4}
- {\!!counta=##1\relax
- \advance\!!counta by 1
- \edef\nextsegment{\the\!!counta}%
- \doprocess[\nextsegment..##4##5]}}}
- {\getchemicaltextelement[#1][##1][#4][#5][#3]%
- \doifnot{##2}{?}{\doprocess[##2##3##4##5]}}}}}%
- \doprocess[#2]%
- \smallchemicaltextfalse}
-
-\def\processchemicalsmalltextelement%
- {\smallchemicaltexttrue\processchemicaltextelement}
-
-\def\processchemicalsmalltextconstant%
- {\smallchemicaltexttrue\processchemicaltextconstant}
-
-\def\processchemicalunrotatedtextelement#1#2#3#4#5#6%
- {\bgroup
- \xdef\@@xxx{0}%
- \xdef\@@yyy{0}%
- \def\putchemicaltext##1##2%
- {\xdef\@@xxx{##1}%
- \xdef\@@yyy{##2}}%
- \getvalue{\s!chemicaltextelement#1}%
- \egroup
- \bgroup
- \def\doputchemicaltext##1 [##2] at ##3 ##4 %
- {\ifnum\chemicaldrawingmode=1
- \rput
- {-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\rput{\chemicalangle}(\@@xxx,\@@yyy){\expanded{\rput[##2](##3,##4){##1}}}}%
- \else
- \put
- {\stoprotation \setcoordinatesystem point at 0 0
- \expanded{\put {##1} [##2] at {##3} {##4} }}
- at {\@@xxx} {\@@yyy}
- \fi}%
- \processchemicaltextelement{#2}{#3}{#4}{#5}{#6}%
- \egroup}
-
-\newif\ifchemicaltextconstant
-
-\def\processchemicaltextconstant#1#2#3#4%
- {\chemicaltextconstanttrue
- \let\@@oldchemicalframe\@@chemicalframe
- \let\@@chemicalframe\relax
- \processchemicaltextelement{#1}{#2}{#3}{#4}{}%
- \let\@@chemicalframe\@@oldchemicalframe
- \chemicaltextconstantfalse}
-
-% \plotchemicalline{#1}{#2}{#3}{#4}
-%
-% #1: x-coordinaat beginpunt
-% #2: y-coordinaat beginpunt
-% #3: x-coordinaat eindpunt
-% #4: y-coordinaat eindpunt
-
-\newconstant\chemicallinetype
-
-\def\doplotchemicalline
- {\!!counte=\!!countc \advance\!!counte by -\!!counta
- \!!countf=\!!countd \advance\!!countf by -\!!countb
- \bgroup
- \ifcase\chemicaldrawingmode
- \ifcase\chemicallinetype
- % 0 : normal line
- \plot {\!!counta} {\!!countb} {\!!countc} {\!!countd} /%
- \or
- % 1 : normal arrow
- \arrow <5pt> [.2,.67] from {\!!counta} {\!!countb} to {\!!countc} {\!!countd}
- \or
- % 2 : reverse arrow
- \arrow <5pt> [.2,.67] from {\!!countc} {\!!countd} to {\!!counta} {\!!countb}
- \or
- % 3 : unrotated line
- \put {\stoprotation \setcoordinatesystem point at 0 0
- \plot 0 0 {\!!counte} {\!!countf} /}
- [\chemicallineposition] at {\!!counta} {\!!countb}
- \else
- % 4 : dashed line
- \findlength {\plot {\!!counta} {\!!countb} {\!!countc} {\!!countd} /}%
- \setdashesnear <2pt> for <\totalarclength>%
- \plot {\!!counta} {\!!countb} {\!!countc} {\!!countd} /%
- \fi
- \or
- \ifcase\chemicallinetype
- \rput
- {-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\psline(\!!counta,\!!countb)(\!!countc,\!!countd)}%
- \or
- \rput
- {-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\psline{->}(\!!counta,\!!countb)(\!!countc,\!!countd)}%
- \or
- \rput
- {-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\psline{<-}(\!!counta,\!!countb)(\!!countc,\!!countd)}%
- \or
- \rput
- {-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\expanded{\rput[\chemicallineposition]{-\chemicalangle}%
- (\!!counta,\!!countb){\psline(0,0)(\!!counte,\!!countf)}}}%
- \else
- \psset{linestyle=dashed}%
- \rput
- {-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\psline(\!!counta,\!!countb)(\!!countc,\!!countd)}%
- \fi
- \or
- \global\MPdrawingdonetrue
- \setchemicalattributes
- \startMPdrawing
- x0 := \MPdivten[\chemicalxoffset]u ;
- y0 := \MPdivten[\chemicalyoffset]u ;
- x1 := \MPdivten[\the\!!counta]u ;
- y1 := \MPdivten[\the\!!countb]u ;
- x2 := \MPdivten[\the\!!countc]u ;
- y2 := \MPdivten[\the\!!countd]u ;
- x3 := \MPdivten[\the\!!counte]u ;
- y3 := \MPdivten[\the\!!countf]u ;
- \ifcase\chemicallinetype
- % 0 : normal line
- draw ((z1--z2) rotatedaround(origin,-\chemicalangle))
- shifted z0 ;
- \or
- % 1 : normal arrow
- drawarrow ((z1--z2) rotatedaround(origin,-\chemicalangle))
- shifted z0 ;
- \or
- % 2 : reverse arrow
- drawarrow ((z2--z1) rotatedaround(origin,-\chemicalangle))
- shifted z0 ;
- \or
- % 3 : unrotated line % nog \chemicalineposition: t/b
- draw (origin--z3)
- shifted (z1 rotatedaround(origin,-\chemicalangle))
- shifted z0 ;
- \else
- % 4 : dashed line
- draw ((z1--z2) rotatedaround(origin,-\chemicalangle))
- shifted z0 dashed dashpattern(on 5.5u off 6u) ;
- \fi
- \stopMPdrawing
- \fi
- \egroup
- \account\!!counta\!!countb
- \account\!!countc\!!countd}
-
-\def\plotchemicalline#1#2#3#4%
- {\!!counta=#1\!!countb=#2\!!countc=#3\!!countd=#4\relax
- \doplotchemicalline}
-
-\def\plotchemicalfactorline#1#2#3#4%
- {\!!counta=#1\!!countb=#2\!!countc=#3\!!countd=#4\relax
- \ifdim\@@chemicalfactor\onepoint=\onepoint \else
- \scratchdimen\!!counta\s!sp \multiply\scratchdimen1000 \scratchdimen\@@chemicalfactor\scratchdimen \divide\scratchdimen1000 \!!counta\scratchdimen
- \scratchdimen\!!countc\s!sp \multiply\scratchdimen1000 \scratchdimen\@@chemicalfactor\scratchdimen \divide\scratchdimen1000 \!!countc\scratchdimen
- \fi
- \doplotchemicalline}
-
-\def\plotchemicalzline#1#2#3#4%
- {\!!counta=#1\!!countb=#2\!!countc=#3\!!countd=#4\relax
- \ifnum\chemicaldrawingmode=2
- \global\MPdrawingdonetrue
- \setchemicalattributes
- \startMPdrawing
- x0 := \MPdivten[\chemicalxoffset]u ;
- y0 := \MPdivten[\chemicalyoffset]u ;
- x1 := \MPdivten[\the\!!counta]u ;
- y1 := \MPdivten[\the\!!countb]u ;
- x2 := \MPdivten[\the\!!countc]u ;
- y2 := \MPdivten[\the\!!countd]u ;
- filldraw ((
- \ifnum\chemicalangle>180
- z1--z2
- \else\ifnum\chemicalangle<90
- z1--(z2 shifted (-2u,+2u))--(z2 shifted (+2u,-2u))
- \else\ifnum\chemicalangle=90
- (z1 shifted (-2u,+2u))--(z1 shifted (+2u,-2u))--
- (z2 shifted (+2u,+2u))--(z2 shifted (-2u,-2u))
- \else
- (z1 shifted (+2u,+2u))--(z1 shifted (-2u,-2u))--z2
- \fi\fi\fi
- --cycle) rotatedaround(origin,-\chemicalangle)) shifted z0 ;
- \stopMPdrawing
- \else
- \doplotchemicalline
- \ifnum\chemicalangle>180 \else
- \ifnum\chemicalangle=90
- \advance\!!counta by -20 \advance\!!countc by -20
- \doplotchemicalline
- \advance\!!counta by 40 \advance\!!countc by 40
- \else\ifnum\chemicalangle<90
- \advance\!!countc by -20 \advance\!!countd by +20
- \doplotchemicalline
- \advance\!!countc by +40 \advance\!!countd by -40
- \else
- \advance\!!counta by 20 \advance\!!countb by 20
- \doplotchemicalline
- \advance\!!counta by -40 \advance\!!countb by -40
- \fi\fi
- \fi
- \doplotchemicalline
- \fi}
-
-\def\plotchemicaldeltaline#1#2#3#4%
- {\!!counta=#1\!!countb=#2\!!countc=#3\!!countd=#4\relax
- \ifnum\chemicaldrawingmode=2
- \global\MPdrawingdonetrue
- \setchemicalattributes
- \startMPdrawing
- x0 := \MPdivten[\chemicalxoffset]u ;
- y0 := \MPdivten[\chemicalyoffset]u ;
- x1 := \MPdivten[\the\!!counta]u ;
- y1 := \MPdivten[\the\!!countb]u ;
- x2 := \MPdivten[\the\!!countc]u ;
- y2 := \MPdivten[\the\!!countd]u ;
- filldraw ((z1--(z2 rotatedaround(z1,5))--(z2 rotatedaround(z1,-5))
- --cycle) rotatedaround(origin,-\chemicalangle))
- shifted z0 ;
- \stopMPdrawing
- \account{#1}{#2}%
- \account{#3}{#4}%
- \else
- \doplotchemicalline
- \advance\!!countc by 16 \advance\!!countd by -21
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -8 \advance\!!countd by 14
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \fi}
-
-\def\setchemicallinesegment #1 #2 #3 #4 #5
- {\setvalue{\s!chemicallinesegment#1}{\plotchemicalline{#2}{#3}{#4}{#5}}}
-
-\def\setchemicalfactorlinesegment #1 #2 #3 #4 #5
- {\setvalue{\s!chemicallinesegment#1}{\plotchemicalfactorline{#2}{#3}{#4}{#5}}}
-
-\def\getchemicallinesegment[#1][#2]%
- {\chemicalrotate[#1]%
- \dochemicaloffset{#1}%
- \getvalue{\s!chemicallinesegment#2}%
- \getvalue{\s!chemicallinesegment#21}%
- \getvalue{\s!chemicallinesegment#22}%
- \undochemicaloffset}
-
-\def\getprivatechemicallinesegment[#1][#2]%
- {\chemicalrotate[#1]%
- \getvalue{\s!chemicallinesegment#2#1}}
-
-\def\doprocesschemicallinesegment#1#2#3#4#5%
- {\chemicallinetype#1\relax
- \def\chemicallineposition{#2}%
- \def\doprocess[##1##2##3##4##5]%
- {\doifelse{##1}{?}
- {\doprocess[1..\maxchemical ????]}
- {\doifchemicalnumber{##1}{#4#5}
- {\doifelse{##2##3}{..}
- {\doifchemicalnumber{##4}{#4#5}
- {#3[##1][#4]%
- \doifnot{##1}{##4}
- {\!!counta=##1\relax
- \advance\!!counta by 1
- \edef\nextsegment{\the\!!counta}%
- \doprocess[\nextsegment..##4##5]}}}
- {#3[##1][#4]%
- \doifnot{##2}{?}
- {\doprocess[##2##3##4##5]}}}}}%
- \doprocess[#5]}
-
-\def\processchemicallinesegment
- {\doprocesschemicallinesegment0c\getchemicallinesegment}
-
-\def\processchemicalzlinesegment#1#2%
- {%\doprocesschemicallinesegment0c\getchemicallinesegment{#1}{#2}%
- \bgroup
- \def\plotchemicalline{\plotchemicalzline}%
- \doprocesschemicallinesegment0c\getchemicallinesegment{#1}{#2}%
- \egroup}
-
-\def\processchemicaldeltalinesegment#1#2%
- {%\doprocesschemicallinesegment0c\getchemicallinesegment{#1}{#2}%
- \bgroup
- \def\plotchemicalline{\plotchemicaldeltaline}%
- \doprocesschemicallinesegment0c\getchemicallinesegment{#1}{#2}%
- \egroup}
-
-\def\processprivatechemicallinesegment%
- {\doprocesschemicallinesegment0c\getprivatechemicallinesegment}
-
-\def\processchemicaldownarrowsegment%
- {\doprocesschemicallinesegment1c\getchemicallinesegment}
-
-\def\processchemicaluparrowsegment%
- {\doprocesschemicallinesegment2c\getchemicallinesegment}
-
-\def\processchemicalunrotatedlinesegment#1%
- {\doprocesschemicallinesegment3{#1}\getchemicallinesegment}
-
-\def\processchemicaldashedlinesegment
- {\doprocesschemicallinesegment4c\getchemicallinesegment}
-
-\def\plotchemicaldasheddeltaline#1#2#3#4%
- {\!!counta=#1\!!countb=#2\!!countc=#3\!!countd=#4\relax
- \ifnum\chemicaldrawingmode=2
- \global\MPdrawingdonetrue
- \setchemicalattributes
- \startMPdrawing
- x0 := \MPdivten[\chemicalxoffset]u ;
- y0 := \MPdivten[\chemicalyoffset]u ;
- x1 := \MPdivten[\the\!!counta]u ;
- y1 := \MPdivten[\the\!!countb]u ;
- x2 := \MPdivten[\the\!!countc]u ;
- y2 := \MPdivten[\the\!!countd]u ;
- z20 = z2 rotatedaround(z1,+5) ;
- z21 = z2 rotatedaround(z1,-5) ;
- draw (z1 rotatedaround(origin,-\chemicalangle)) shifted z0 ;
- save n ; n := 5 ;
- for i=1 upto n :
- draw ((((z20--z21) shifted -z2) shifted (i/n)[z2,z1])
- rotatedaround(origin,-\chemicalangle)) shifted z0 ;
- endfor
- \stopMPdrawing
- \account{#1}{#2}%
- \account{#3}{#4}%
- \else
- \doplotchemicalline
- \advance\!!countc by 16 \advance\!!countd by -21
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -8 \advance\!!countd by 14
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \fi}
-
-\def\plotchemicalwavyline#1#2#3#4%
- {\!!counta=#1\!!countb=#2\!!countc=#3\!!countd=#4\relax
- \ifnum\chemicaldrawingmode=2
- \global\MPdrawingdonetrue
- \setchemicalattributes
- \startMPdrawing
- x0 := \MPdivten[\chemicalxoffset]u ;
- y0 := \MPdivten[\chemicalyoffset]u ;
- x1 := \MPdivten[\the\!!counta]u ;
- y1 := \MPdivten[\the\!!countb]u ;
- x2 := \MPdivten[\the\!!countc]u ;
- y2 := \MPdivten[\the\!!countd]u ;
- save d ; pair d ;
- d := z2 rotatedaround(z1,+5) shifted -z2 ;
- save n ; n := 4 ;
- draw ((for i=0 upto n-1 :
- ((i)/n)[z1,z2] ..
- ((i+.25)/n)[z1,z2] shifted d ..
- ((i+.50)/n)[z1,z2] ..
- ((i+.75)/n)[z1,z2] shifted -d ..
- endfor
- z2) rotatedaround(origin,-\chemicalangle)) shifted z0 ;
- \stopMPdrawing
- \account{#1}{#2}%
- \account{#3}{#4}%
- \else
- \doplotchemicalline
- \advance\!!countc by 16 \advance\!!countd by -21
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -8 \advance\!!countd by 14
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \advance\!!countc by -4 \advance\!!countd by 7
- \doplotchemicalline
- \fi}
-
-\def\processchemicaldasheddeltalinesegment#1#2%
- {\bgroup
- \def\plotchemicalline{\plotchemicaldasheddeltaline}%
- \doprocesschemicallinesegment0c\getchemicallinesegment{#1}{#2}%
- \egroup}
-
-\def\processchemicalwavylinesegment#1#2%
- {\bgroup
- \def\plotchemicalline{\plotchemicalwavyline}%
- \doprocesschemicallinesegment0c\getchemicallinesegment{#1}{#2}%
- \egroup}
-
-\def\processchemicalopenend#1#2%
- {\doprocesschemicallinesegment0c\doprocesschemicalopenend{#1}{#2}}
-
-\def\doprocesschemicalopenend[#1][#2]%
- {\chemicalrotate[#1]%
- \dochemicaloffset{#1}%
- \ifcase\chemicaldrawingmode
- \beginpicture
- \setquadratic\plot
- 300 0 400 0
- 500 0 550 75
- 600 0 650 -75
- 700 0 750 75
- 800 0 850 -75
- 900 0 950 0
- 1050 0 /
- \endpicture
- \or
- \rput{-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\psline(300,0)(500,0)%
- \rput(500,0){\psplot[yunit=75,plotstyle=curve]{0}{720}{x sin}}%
- \psline(950,0)(1050,0)}%
- \or
- \global\MPdrawingdonetrue
- \setchemicalattributes
- \startMPdrawing
- x0 := \MPdivten[\chemicalxoffset]u ;
- y0 := \MPdivten[\chemicalyoffset]u ;
- draw
- (((30.0u,0)--(50.0u,0){up}..(55.0u,7.5u)..
- (60.0u,0)..(65.0u,-7.5u)..(70.0u,0)..
- (75.0u,7.5u)..(80.0u,0)..(85.0u,-7.5u)..{up}
- (90.0u,0)--(105.0u,0)) rotatedaround(origin,-\chemicalangle))
- shifted z0 ;
- \stopMPdrawing
- \fi
- \undochemicaloffset}
-
-% \plotchemicalcircle{#1}{#2}{#3}{#4}
-%
-% #1: lengte van de boog in graden
-% #2: x-coordinaat eindpunt
-% #3: y-coordinaat eindpunt
-
-\newif\ifchemicaldotted
-
-\def\plotchemicalcircle#1#2#3#4#5#6%
- {\bgroup
- \ifcase\chemicaldrawingmode
- \ifchemicaldotted
- \findlength{\circulararc {#4} degrees from {#5} {#6} center at {0} {0} }%
- \divide\totalarclength by 6
- \def\b{\the\totalarclength}%
- \divide\totalarclength by 2
- \def\a{\the\totalarclength}%
- \setdashpattern <\a,\b,\b,\b,\b,\b,\a>
- \fi
- \circulararc {#4} degrees from {#5} {#6} center at {0} {0} %
- \or
- \ifchemicaldotted
- \psset{linestyle=dashed}%
- \fi
- \rput
- {-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\psarc(0,0){#3}{#1}{#2}}%
- \or
- \global\MPdrawingdonetrue
- \setchemicalattributes
- \startMPdrawing
- r := \MPdivten[#3]*2u;
- x0 := \MPdivten[\chemicalxoffset]u ;
- y0 := \MPdivten[\chemicalyoffset]u ;
- draw ((subpath (#1/45,#2/45) of (fullcircle scaled (r)))
- rotatedaround (origin,\chemicalangle+150))
- shifted z0 \ifchemicaldotted dashed withdots \fi ;
- \stopMPdrawing
- \fi
- \egroup}
-
-\def\setchemicalcircsegment #1 #2 #3 #4 #5 #6 #7
- {\setvalue{\s!chemicalcircsegment#1}{\plotchemicalcircle{#2}{#3}{#4}{#5}{#6}{#7}}}
-
-\def\getchemicalcircsegment[#1][#2]%
- {\chemicalrotate[#1]%
- \getvalue{\s!chemicalcircsegment#2}}
-
-\def\doprocesschemicalcircsegment#1#2%
- {\def\doprocess[##1##2##3##4##5]%
- {\doifelse{##1}{?}
- {\doprocess[1..\maxchemical ????]}
- {\doifchemicalnumber{##1}{#1#2}
- {\doifelse{##2##3}{..}
- {\doifchemicalnumber{##4}{#1#2}
- {\getchemicalcircsegment[##1][#1]%
- \doifnot{##1}{##4}
- {\!!counta=##1\relax
- \advance\!!counta by 1
- \edef\nextsegment{\the\!!counta}%
- \doprocess[\nextsegment..##4##5]}}}
- {\getchemicalcircsegment[##1][#1]%
- \doifnot{##2}{?}
- {\doprocess[##2##3##4##5]}}}}}%
- \doprocess[#2]}
-
-\def\processchemicalcircsegment%
- {\chemicaldottedfalse\doprocesschemicalcircsegment}
-
-\def\processchemicaldottsegment%
- {\chemicaldottedtrue\doprocesschemicalcircsegment}
-
-\let\endchemicalpicture = \relax
-\let\checkchemicalpicture = \relax
-\let\nomoreaccounting = \relax
-
-\newif\ifchemicalpicture
-
-\def\beginchemicalpicture#1% NO PSTRICKS SUPPORT YET
- {\checkchemicalpicture
- \bgroup % DOES NOT HANDLE AUTOWIDTH/HEIGHT
- \chemicalpicturetrue
- \processchemical[#1]}
-
-\def\setchemicalpicture#1#2%
- {\chemicalpicturefalse
- \def\endchemicalpicture%
- {\@@endchemicallocalpicture{#1}{#2}%
- \egroup
- \ifnum\chemicaldrawingmode=1
- \rput
- {-\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
- {\expanded{\rput[\chemicalloca]{\chemicalangle}(#1,#2){\box\nextbox}}}%
- \else
- \expanded{\put{\box\nextbox}[\chemicalloca] at {#1} {#2} }
- \fi
- \egroup}%
- \def\checkchemicalpicture%
- {\ifx\endchemicalpicture\relax \else
- \writestatus{ppchtex}{missing end of picture (PE)}%
- \endchemicalpicture
- \fi}%
- \setbox\nextbox=\hbox\bgroup
- \@@beginchemicallocalpicture
- % alternatief: gewoon accounting, en zelf l,r afhandelen
- \ifnum\chemicaldrawingmode=1
- % njet
- \else
- \accountingon
- \let\nomoreaccounting=\accountingoff
- \fi}
-
-\def\doskipchemical[#1][#2]%
- {{\tt[ppchtex]}}
-
-\def\skipchemical%
- {\dodoubleargument\doskipchemical}
-
-\def\complexchemical% met \expandafter
- {\ifinchemical
- \expandafter\dochemical
- \else
- \writestatus{ppchtex}{the [][]-alternative is not permitted here}%
- \expandafter\skipchemical
- \fi}
-
-\newif\ifinnerchemical
-
-\def\dosimplechemical#1#2#3%
- {\doifelsedefined{\??chemical\c!location}
- {\writestatus{ppchtex}{the {}{}-alternative is not permitted here}}
- {\ifinnerchemical
- \let\chemicalsign = \chemicalinnersign
- \let\chemicalmolecule = \chemicalinnermolecule
- \let\chemicalsinglearrow = \chemicalsingleinnerarrow
- \let\chemicaldoublearrow = \chemicaldoubleinnerarrow
- \let\chemicaltwintiparrow = \chemicaltwintipinnerarrow
- \else
- \let\chemicalsign = \chemicaloutersign
- \let\chemicalmolecule = \chemicaloutermolecule
- \let\chemicalsinglearrow = \chemicalsingleouterarrow
- \let\chemicaldoublearrow = \chemicaldoubleouterarrow
- \let\chemicaltwintiparrow = \chemicaltwintipouterarrow
- \fi
- \disablechemicalspecials
- \processallactionsinset
- [#1]
- [ HIGH=>\sethighsubscripts,
- LOW=>\setlowsubscripts,
- PLUS=>\chemicalsign{+},
- GIVES=>\chemicalsinglearrow{#2}{#3},
- EQUILIBRIUM=>\chemicaldoublearrow{#2}{#3},
- MESOMERIC=>\chemicaltwintiparrow{#2}{#3},
- SINGLE=>\singlechemicalbond,
- DOUBLE=>\doublechemicalbond,
- TRIPLE=>\triplechemicalbond,
- +=>\chemicalsign{+},
- ->=>\chemicalsinglearrow{#2}{#3},
- <->=>\chemicaldoublearrow{#2}{#3},
- <>=>\chemicaltwintiparrow{#2}{#3},
- -=>\singlechemicalbond,
- --=>\doublechemicalbond,
- ---=>\triplechemicalbond,
- \s!unknown=>\enablechemicalspecials
- \chemicalmolecule{\commalistelement}{#2}{#3}]}}
-
-\def\dosimplechemicalA#1#2#3% % evt: {#1,\relax}
- {\let\chemicalspace=\relax
- \@EA\dosimplechemical\@EA{\@@chemicalchemicaloffset,#1}{#2}{#3}%
- \egroup}
-
-\def\dosimplechemicalB#1#2#3%
- {\dosimplechemical{#1}{#2}{#3}%
- \egroup}
-
-\def\dosimplechemicalC#1#2#3%
- {$\simplechemical{#1}{#2}{#3}$%
- \egroup} % erbij
-
-\def\simplechemical
- {\ifinner
- \innerchemicaltrue
- \else
- \innerchemicalfalse
- \fi
- \bgroup
- \catcode`\^=\superscriptcatcode % t.b.v. \enableduplication
- \catcode`\_=\subscriptcatcode % t.b.v. de zekerheid
- \ifmmode
- \ifinnerchemical
- \def\next{\dotriplegroupempty\dosimplechemicalA}%
- \else
- \def\next{\dotriplegroupempty\dosimplechemicalB}%
- \fi
- \else
- \def\next{\dotriplegroupempty\dosimplechemicalC}%
- \fi
- \next}
-
-\definecomplexorsimple\chemical
-
-\def\dogotochemical#1#2%
- {\def\dowithchemical% % experiment
- {\localgotochemical{#1}}% % experiment
- \chemical} % experiment
-
-\def\gotochemical% % experiment
- {\dosingleargument\dogotochemical} % experiment
-
-\def\dododochemical#1[#2][#3]% % experiment
- {\def\simpledododochemical% % experiment
- {#1[#2][#3]}% % experiment
- \def\complexdododochemical[##1]% % experiment
- {\def\dowithchemical% % experiment
- {\localthisischemical{#2}}% % experiment
- #1[#3][##1]}% % experiment
- \complexorsimple\dododochemical} % experiment
-
-\def\dodochemical[#1][#2]%
- {\ignorespaces
- \ifinchemical
- \drawchemical[#1][#2]%
- \ignorespaces
- \else
- \startchemical[\c!location=\v!intext]%
- \drawchemical[#1][#2]%
- \expandafter\stopchemical
- \fi
- \ignorespaces}
-
-\def\dochemical[#1]%
- {\def\simpledochemical%
- {\@@writechemicalstate{ppchtex}{[#1][]}%
- \dodochemical[#1][]}%
- %
- \def\complexdochemical[##1]%
- {\@@writechemicalstate{ppchtex}{[#1][##1]}%
- \txtchemical=0%
- \dodochemical[#1][##1]}%
- %
- \def\complexdochemical[##1]% % experiment
- {\@@writechemicalstate{ppchtex}{[#1][##1]}% % experiment
- \txtchemical=0% % experiment
- \dododochemical\dodochemical[#1][##1]}% % experiment
- %
- \complexorsimple\dochemical}
-
-% \processlocalchemicals{#1}
-%
-% #1: commando's
-
-\def\dodoprocesschemical#1%
- {\processchemical[#1????]}
-
-\def\processlocalchemicals#1%
- {\processcommalist[#1]\dodoprocesschemical}
-
-% \drawchemical[#1][#2]
-%
-% #1: bindingen enz.
-% #2: atomen enz.
-
-\def\localdodochemical[#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!text\the\levchemical}{\the\txtchemical}%
- \txtchemical=0
- \dodochemical[#1][#2]%
- % \@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
- \ignorespaces}
-
-\def\drawchemical[#1][#2]%
- {\ignorespaces
- \def\dodochemical[##1][##2]%
- {\drawchemical[##1][##2]%
- \ignorespaces}%
- \def\dochemical[##1]%
- {\def\simpledochemical%
- {\@@writechemicalstate{ppchtex}{[##1][#2]}%
- \dodochemical[##1][#2]%
- \ignorespaces}%
- \def\complexdochemical[####1]%
- {\dododochemical\localdodochemical[##1][####1,#2]}%
- \complexorsimple\dochemical}%
- \doif\@@chemicalstate\v!start
- {\doifelse\chemicalname\s!unknown
- {\getvalue{\s!executechemical\defaultchemical}[#2]}
- {\getvalue{\s!executechemical\chemicalname}[#2]}%
- \def\unknownchemical##1%
- {\processunknownchemical[##1][#2]}%
- \processcommalist[\@@chemicaloffset,#1]\dodoprocesschemical}%
- \ignorespaces}
-
-\unexpanded\def\chemicaloxidation#1#2#3%
- {\chemicaltop
- {\ifnum#20=0
- 0%
- \else
- #1\expandafter\uppercase\expandafter{\romannumeral#2}%
- \fi}
- {#3}}
-
-\def\chemicaltfraction{\ifinchemical.60\else.8\fi}
-\def\chemicalbfraction{\ifinchemical.45\else.6\fi}
-\def\chemicallfraction{\ifinchemical.1\else.1\fi}
-\def\chemicalrfraction{\ifinchemical.1\else.1\fi}
-
-\def\chemicaltighttext
- {\def\chemicaltfraction{\ifinchemical.3\else.6\fi}%
- \def\chemicalbfraction{\ifinchemical.2\else.4\fi}%
- \def\chemicallfraction{\ifinchemical 0\else 0\fi}%
- \def\chemicalrfraction{\ifinchemical 0\else 0\fi}}
-
-\def\dochemicaltop#1#2#3#4%
- {\vbox
- {\@@dochemicalcolor
- \baselineskip=\chemicaltfraction\baselineskip \lineskip0pt
- \halign
- {#1###2\cr
- $\@@dochemicalstyle{\scriptscriptstyle#3}$\cr
- $\@@dochemicalstyle{\@@currentchemicalformat#4}$\cr}}}
-
-\def\dochemicalbottom#1#2#3#4%
- {\vtop
- {\@@dochemicalcolor
- \baselineskip=\chemicalbfraction\baselineskip \lineskip0pt
- \halign
- {#1###2\cr
- $\@@dochemicalstyle{\@@currentchemicalformat#4}$\cr
- $\@@dochemicalstyle{\scriptscriptstyle#3}$\cr}}}
-
-\def\chemicalleft#1#2%
- {\hbox
- {\@@dochemicalcolor
- $\@@dochemicalstyle{\scriptscriptstyle#1}$%
- $\@@dochemicalstyle{\@@currentchemicalformat\hskip\chemicallfraction em#2}$}}
-
-\def\chemicalright#1#2%
- {\hbox
- {\@@dochemicalcolor
- $\@@dochemicalstyle{\@@currentchemicalformat#2\hskip\chemicalrfraction em}$%
- $\@@dochemicalstyle{\scriptscriptstyle#1}$}}
-
-\def\chemicalcentered#1%
- {\setbox0=\hbox{$\@@dochemicalstyle{\scriptscriptstyle#1}$}%
- \setbox2=\hbox{$\@@dochemicalstyle{\@@currentchemicalformat C}$}%
- \dimen0=.5\ht2
- \advance\dimen0 by -.5\ht0
- \advance\dimen0 by \dp0
- \hbox{\@@dochemicalcolor\raise\dimen0\box0}}
-
-\def\chemicalleftcentered#1#2%
- {\hbox
- {\@@dochemicalcolor
- \chemicalcentered{#1}%
- $\@@dochemicalstyle{\@@currentchemicalformat\hskip\chemicallfraction em#2}$}}
-
-\def\chemicalrightcentered#1#2%
- {\hbox
- {\@@dochemicalcolor
- $\@@dochemicalstyle{\@@currentchemicalformat#2\hskip\chemicalrfraction em}$%
- \chemicalcentered{#1}}}
-
-\def\chemicaltop {\dochemicaltop \hss \hss }
-\def\chemicallefttop {\dochemicaltop \relax \hss }
-\def\chemicalrighttop {\dochemicaltop \hss \relax}
-\def\chemicalbottom {\dochemicalbottom \hss \hss }
-\def\chemicalleftbottom {\dochemicalbottom \relax \hss }
-\def\chemicalrightbottom {\dochemicalbottom \hss \relax}
-
-\def\chemicaltopleft #1{\chemicalleft {\chemicallefttop {#1}{}}}
-\def\chemicalbottomleft #1{\chemicalleft {\chemicalleftbottom{#1}{}}}
-\def\chemicaltopright #1{\chemicalright{\chemicallefttop {#1}{}}}
-\def\chemicalbottomright#1{\chemicalright{\chemicalleftbottom{#1}{}}}
-
-\def\chemicalsmashedleft#1%
- {\hbox\bgroup
- \@@dochemicalcolor
- \setbox0=\hbox{$\@@dochemicalstyle{\@@currentchemicalformat C}$}%
- \setbox2=\hbox{$\@@dochemicalstyle{\@@currentchemicalformat#1}$}%
- \wd2=\wd0
- \box2
- \egroup}
-
-\def\chemicalsmashedmiddle#1%
- {\hbox\bgroup
- \@@dochemicalcolor
- \setbox0=\hbox{$\@@dochemicalstyle{\@@currentchemicalformat C}$}%
- \setbox2=\hbox{$\@@dochemicalstyle{\@@currentchemicalformat#1}$}%
- \hbox{\hskip-.5\wd2\hskip.5\wd0\box2}
- \egroup}
-
-\def\chemicalsmashedright#1%
- {\hbox\bgroup
- \@@dochemicalcolor
- \setbox0=\hbox{$\@@dochemicalstyle{\@@currentchemicalformat C}$}%
- \setbox2=\hbox{$\@@dochemicalstyle{\@@currentchemicalformat#1}$}%
- \hbox to \wd0{\hskip-\wd2\hskip\wd0\box2}%
- \egroup}
-
-\def\+{\tabalign} % is \long in Plain
-
-\def\chemicalforever#1#2%
- {\bgroup
- \setbox0=\hbox
- {\@@dochemicalcolor
- $\@@dochemicalstyle{\scriptscriptstyle\hskip-.15em#2}$}%
- \wd0=0pt
- \big#1\normapsubscript{\hskip.1em\box0}%
- \egroup}
-
-\def\disablechemicalspecials%
- {\def\+##1{##1}\def\-##1{##1}%
- \def\[{[}\def\]{]}%
- \def\1{}\def\2{}\def\3{}\def\4{}\def\5{}\def\6{}\def\7{}%
- \def\X{}%
- \def\T{}\def\B{}\def\L{}\def\R{}\def\LC{}\def\RC{}%
- \def\TL{}\def\BL{}\def\TR{}\def\BR{}%
- \def\LT{}\def\LB{}\def\RT{}\def\RB{}%
- \def\SL{}\def\SM{}\def\SR{}}
-
-\def\enablechemicalspecials%
- {\def\+{\dodoublegroupempty\chemicaloxidation{+}}% {} needed!
- \def\-{\dodoublegroupempty\chemicaloxidation{-}}% {} needed!
- \def\[{\dodoublegroupempty\chemicalforever {[}}% {} needed!
- \def\]{\dodoublegroupempty\chemicalforever {]}}% {} needed!
- \def\1{\chemicaloxidation\relax1}%
- \def\2{\chemicaloxidation\relax2}%
- \def\3{\chemicaloxidation\relax3}%
- \def\4{\chemicaloxidation\relax4}%
- \def\5{\chemicaloxidation\relax5}%
- \def\6{\chemicaloxidation\relax6}%
- \def\7{\chemicaloxidation\relax7}%
- \def\X{\chemicaltighttext}%
- \def\T{\chemicaltop}%
- \def\B{\chemicalbottom}%
- \def\L{\chemicalleft}%
- \def\LC{\chemicalleftcentered}%
- \def\R{\chemicalright}%
- \def\RC{\chemicalrightcentered}%
- \def\TL{\chemicaltopleft}%
- \def\BL{\chemicalbottomleft}%
- \def\TR{\chemicaltopright}%
- \def\BR{\chemicalbottomright}%
- \def\LT{\chemicallefttop}%
- \def\LB{\chemicalleftbottom}%
- \def\RT{\chemicalrighttop}%
- \def\RB{\chemicalrightbottom}%
- \def\SL{\chemicalsmashedleft}%
- \def\SM{\chemicalsmashedmiddle}%
- \def\SR{\chemicalsmashedright}}
-
-% \reversechemical#1#2#3
-%
-% #1: prefix
-% #2: volgnummer enz
-% #3: tegengestelde volgnummers
-
-\def\reversechemical#1#2#3%
- {\def\doprocess[##1##2]%
- {\doifchemicalnumber{##1}{#1#2}%
- {\getfromcommalist[#3][##1]%
- \let\reversechemicalaction=\commalistelement
- \processchemical[#1\reversechemicalaction##2]}}%
- \doprocess[#2]}
-
-% \processunknownchemical[#1????][#2]
-%
-% #1: bindingen enz.
-% #2: atomen enz.
-
-\def\defaultchemical%
- {SIX}
-
-\def\processunknownchemical[#1????][#2]%
- {\processaction
- [#1]
- [ SAVE=>\executechemicalSAVE,
- RESTORE=>\executechemicalRESTORE,
- HIGH=>\sethighsubscripts,
- LOW=>\setlowsubscripts,
- \s!default=>,
- \s!unknown=>\doifelsedefined{\s!executechemical#1}
- {\def\chemicalrotation{1}%
- \def\chemicaloffset{0}%
- \doifdefined{\s!executechemical#1}
- {\getvalue{\s!executechemical#1}[#2]}%
- \@@chemicalpostponed}
- {\getpredefinedchemical{#1}}]}
-
-\newcount\chemicalstack
-
-\setvalue{\s!chemical\c!x1}{0}
-\setvalue{\s!chemical\c!y1}{0}
-
-\def\executechemicalSAVE
- {%\writestatus{ppchtex}{saving \the\horchemical,\the\verchemical}%
- \advance\chemicalstack by 1
- \letvalue {\s!chemical n\the\chemicalstack}=\chemicalname
- %\letvalue {\s!chemical p\the\chemicalstack}=\@@chemicalpostponed
- \setevalue{\s!chemical x\the\chemicalstack}{\the\horchemical}%
- \setevalue{\s!chemical y\the\chemicalstack}{\the\verchemical}}
-
-\def\restorechemicalvalues#1%
- {\let\oldprocesschemical=\processchemical
- \doifdefined{\s!executechemical#1}{\getvalue{\s!executechemical#1}[]}%
- \let\processchemical=\oldprocesschemical}
-
-\def\executechemicalRESTORE
- {\ifnum\chemicalstack=0\relax
- \horchemical=\getvalue{\s!chemical x1}\relax
- \verchemical=\getvalue{\s!chemical y1}\relax
- \else
- \restorechemicalvalues{\getvalue{\s!chemical n\the\chemicalstack}}%
- %\@EA\let\@EA\@@chemicalpostponed\@EA=\csname\s!chemical p\the\chemicalstack\endcsname
- \let\@@chemicalpostponed=\relax
- \horchemical=\getvalue{\s!chemical x\the\chemicalstack}\relax
- \verchemical=\getvalue{\s!chemical y\the\chemicalstack}\relax
- \advance\chemicalstack by -1
- \fi
- \restorechemicalcoordinates}
-
-% De onderstaande macro's zijn verantwoordelijk voor het zetten
-% van de + en pijlen. De +, en dus ook de pijlen, worden omhoog
-% gehaald. Dit oogt m.i. fraaier.
-
-\def\chemicalinnerclip#1%
- {{\setbox0=\hbox{#1}\ht0\ht\strutbox\dp0\dp\strutbox\box0}}
-
-\def\chemicalraise#1#2%
- {\chemicalinnerclip
- {\setbox0=\hbox{$#1+$}%
- \raise\dp0\hbox{$#1#2$}}}
-
-\def\chemicalinnersign#1% todo: \@@chemicaltextcolor
- {\chemicalraise{\@@localchemicalstyle}{#1}}
-
-\def\chemicaloutersign#1%
- {\chemicalraise{}{\@@dochemicalcolor#1}}
-
-\def\chemicalsingleinnerarrow#1#2%
- {\chemicalraise{\@@localchemicalstyle}{\longrightarrow}}
-
-\def\chemicaldoubleinnerarrow#1#2% todo: \@@chemicaltextcolor
- {\chemicalinnerclip
- {\lower.2ex\hbox
- {\setbox0=\hbox{$\@@localchemicalstyle\longrightarrow$}%
- \setbox2=\hbox{$\@@localchemicalstyle\longleftarrow$}%
- \wd0=0pt\raise\ht0\box0\box2}}}
-
-\def\chemicaltwintipinnerarrow#1#2% todo: \@@chemicaltextcolor
- {\chemicalinnerclip
- {\setbox0=\hbox{\chemicalraise{\@@localchemicalstyle}{\longrightarrow}}%
- \setbox2=\hbox{\chemicalraise{\@@localchemicalstyle}{\longleftarrow}}%
- \wd0=0pt\box0\box2}}
-
-\def\dochemicalouterarrow#1#2#3%
- {\bgroup
- \setbox0=\hbox{$\longrightarrow$}%
- \setbox2=\hbox{$\@@dochemicalstyle{\scriptstyle\quad#2\quad}$}%
- \setbox4=\hbox{$\@@dochemicalstyle{\scriptstyle\quad#3\quad}$}%
- \dimen2=\wd0 % \dimen0 is used elsewhere
- \ifdim\wd2>\dimen2 \dimen0=\wd2 \fi
- \ifdim\wd4>\dimen2 \dimen0=\wd4 \fi
- \chemicaloutermolecule
- {#1}
- {\ifdim\ht2>\zeropoint\box2\fi} % expands to \empty in test
- {\ifdim\ht4>\zeropoint\box4\fi}% % expands to \empty in test
- \egroup}
-
-\def\chemicalsingleouterarrow
- {\dochemicalouterarrow
- {\hbox to \dimen2{\rightarrowfill}}}
-
-\def\chemicaldoubleouterarrow
- {\dochemicalouterarrow
- {\lower.5\ht0\vbox
- {\offinterlineskip
- \hbox to \dimen2{\rightarrowfill}
- \hbox to \dimen2{\leftarrowfill}}}}
-
-\def\chemicaltwintipouterarrow
- {\dochemicalouterarrow
- {\hbox
- {\hbox to \dimen2{\rightarrowfill}%
- \hskip-\dimen2
- \hbox to \dimen2{\leftarrowfill}}}}
-
-\def\chemicalinnermolecule#1#2#3% no mathop here, can generate space
- {\chemicalspace % todo: \@@chemicaltextcolor
- \chemicalinnerclip
- {\dosetsubscripts
- $\@@dochemicalstyle{\@@localchemicalstyle\strut#1}$%
- \doresetsubscripts}%
- \chemicalspace}
-
-\def\chemicaloutermolecule#1#2#3%
- {\chemicalspace
- \bgroup
- \@@dochemicalcolor
- \setbox0=\hbox % else the font is reset
- {\dosetsubscripts
- \hbox{$\@@dochemicalstyle{\strut#1}$}%
- \doresetsubscripts}%
- \mathop{\box0}%
- \ifthirdargument
- \doifnot{#2}{}{\normapsuperscript{\@@dochemicalstyle{\strut#2}}}%
- \doifnot{#3}{}{\normapsubscript {\@@dochemicalstyle{\strut#3}}}%
- \else
- \doifnot{#2}{}
- {\normapsubscript{\@@dochemicalstyle{\strut#2}}}%
- \fi
- \egroup
- \chemicalspace}
-
-\def\chemicalsinglepicturearrow#1%
- {\lower.5ex\hbox
- {\@@dochemicalstyle
- $\chemicalspace
- \buildrel
- \@@dochemicalstyle{\scriptstyle\quad#1\quad}%
- \over{\overrightarrow
- {\hphantom{\@chemicalstyle{\scriptstyle\quad#1\quad}}}}%
- \chemicalspace$}}
-
-\def\chemicaldoublepicturearrow#1%
- {\lower.5ex\hbox
- {\@@dochemicalstyle
- $\chemicalspace
- \buildrel
- \@@dochemicalstyle{\scriptstyle\quad#1\quad}%
- \over{\overrightarrow{\overleftarrow
- {\hphantom{\@@dochemicalstyle{\scriptstyle\quad#1\quad}}}}}%
- \chemicalspace$}}
-
-% Bij de in-line bindingen wordt gebruik gemaakt van
-% een \hrule. De maatvoering wordt bepaald door een
-% kunstmatige em (\wd0).
-
-\def\somechemicalbond%
- {\hrule width \wd0 height .4pt}
-
-\def\dochemicalbonds#1#2#3% todo: \@@chemicaltextstyle
- {{\setbox0=\hbox
- {${\@@localchemicalstyle M}$}%
- \vbox to \ht0
- {\@@dochemicalcolor
- \hsize\wd0
- \vskip.1\wd0#1\vfill#2\vfill#3\vskip.1\wd0}}}
-
-\def\singlechemicalbond%
- {\dochemicalbonds{}{\somechemicalbond}{}}
-
-\def\doublechemicalbond%
- {\dochemicalbonds{\somechemicalbond}{}{\somechemicalbond}}
-
-\def\triplechemicalbond%
- {\dochemicalbonds{\somechemicalbond}{\somechemicalbond}{\somechemicalbond}}
-
-% In plaats van \def\naam{\chemie[...]...} kan beter gebruik
-% worden gemaakt van het commando
-%
-% \definieerchemie[naam]{commando's}
-%
-% De naam krijgt, om problemen met bestaande macro's te
-% voorkomen, een prefix. Bij het ophalen van een commando
-% worden beide definities afgehandeld.
-
-\def\dodefinechemical[#1]#2%
- {\doifdefined{\??chemical#1}
- {\writestatus{ppchtex}{chemical definition #1 is redefined}}%
- \setvalue{\??chemical#1}{#2}}
-
-\unexpanded\def\definechemical%
- {\dosingleargument\dodefinechemical}
-
-\def\getpredefinedchemical#1%
- {\doifelsedefined{\??chemical#1}
- {\getvalue{\??chemical#1}}
- {\doifelsedefined{#1}
- {\getvalue{#1}}
- {\writestatus{ppchtex}{unknown chemical definition #1}}}}
-
-% Hieronder zijn de definities van de structuren opgenomen. De
-% naam van de structuur is als volgt opgebouwd:
-%
-% \executechemicalNUMBER[#1]
-%
-% waarbij [#1] betrekking heeft op de tekstelementen van \chemie,
-% de [tweede lijst] dus.
-%
-% De aan \chemie[#1][#2] meegegeven lijst van segmenten wordt
-% deels door de in \execute gedefinieerde macro's afgehandeld,
-% deels door algemene macro's. Segmenten hebben de vorm:
-%
-% [+|-|]identifier[X|XYZ|X..Y]
-%
-% Voorbeelden van segmenten zijn:
-%
-% R1
-% R1..4
-% R135
-% -R1
-% +R35
-
-\setchemicalmaximum 0
-
-\def\processchemical[#1]%
- {\unknownchemical{#1}}
-
-\def\setchemicalname#1 %
- {\def\chemicalname{#1}}
-
-\let\chemicalname=\s!unknown
-
-% Vooruitlopend op een gedetailleerde documentatie, zijn hier
-% vast enkele gebruikte afmetingen:
-%
-% lengte radikalen : 500
-% afstand radikalen : 100
-% afstand dubbele radikalen : 260
-% afstand substituenten : +125
-
-
-
-
-\def\executechemicalONE[#1]%
- {\setchemicalname ONE
- %
- \setchemicalmaximum 8
- \setchemicaldistance 0
- \setchemicalsubstitute 625
- \setchemicaldirection 303
- %
- \setchemicalrotation 1 1 0 1 0 1 0 1 0
- \setchemicalrotation 2 0.707 -0.707 0.707 -0.707 0.707 -0.707 0.707 -0.707
- \setchemicalrotation 3 0 -1 0 -1 0 -1 0 -1
- \setchemicalrotation 4 -0.707 -0.707 -0.707 -0.707 -0.707 -0.707 -0.707 -0.707
- \setchemicalrotation 5 -1 0 -1 0 -1 0 -1 0
- \setchemicalrotation 6 -0.707 0.707 -0.707 0.707 -0.707 0.707 -0.707 0.707
- \setchemicalrotation 7 0 1 0 1 0 1 0 1
- \setchemicalrotation 8 0.707 0.707 0.707 0.707 0.707 0.707 0.707 0.707
- %
- \setchemicalangle 1 0 90 180 270
- \setchemicalangle 2 45 135 225 315
- \setchemicalangle 3 90 180 270 0
- \setchemicalangle 4 135 225 315 45
- \setchemicalangle 5 180 270 0 90
- \setchemicalangle 6 225 315 45 135
- \setchemicalangle 7 270 0 90 180
- \setchemicalangle 8 315 45 135 225
- %
- \setchemicaltranslate 1 -1000 0
- \setchemicaltranslate 2 -1000 1000
- \setchemicaltranslate 3 0 1000
- \setchemicaltranslate 4 1000 1000
- \setchemicaltranslate 5 1000 0
- \setchemicaltranslate 6 1000 -1000
- \setchemicaltranslate 7 0 -1000
- \setchemicaltranslate 8 -1000 -1000
- %
- \setchemicallinesegment SB 300 0 700 0
- \setchemicallinesegment DB1 300 50 700 50
- \setchemicallinesegment DB2 300 -50 700 -50
- %
- %setchemicallinesegment EP 200 125 200 -125
- \setchemicalfactorlinesegment EP 200 125 200 -125
- %
- \setchemicaltextelement ES 200 0
- \setchemicaltextelement ED1 200 50
- \setchemicaltextelement ED2 200 -50
- \setchemicaltextelement ET1 200 75
- \setchemicaltextelement ET2 200 0
- \setchemicaltextelement ET3 200 -75
- \setchemicaltextelement HB1 300 0
- \setchemicaltextelement HB2 475 0
- \setchemicaltextelement HB3 650 0
- %
- \setchemicaltextelement Z 800 0
- \setchemicaltextelement RZ 950 0
- \setchemicaltextelement ZN 500 0
- \setchemicaltextelement ZTN 500 150
- \setchemicaltextelement ZBN 500 -150
- %
- \def\processchemical[##1##2##3##4##5]%
- {\doprocesschemical[##1##2##3##4##5]
- {\processaction
- [##1##2##3##4##5]
- [ PB:##4##5=>\beginchemicalpicture{##4##5},
- PE????=>\endchemicalpicture,
- SUB##4##5=>\processchemicalsubstitute{##4##5},
- ADJ##4##5=>\processchemicaldistance{##4##5},
- MOV##4##5=>\processchemicaltranslate{##4##5},
- DIR##4##5=>\processchemicaldirection{##4##5},
- OFF##4##5=>\processchemicaloffset{##4##5},
- CCD##4##5=>\processchemicaldottsegment{CC}{##4##5},
- LDD##4##5=>\processchemicaldashedlinesegment{DB1}{##4##5}%
- \processchemicallinesegment{DB2}{##4##5},
- RDD##4##5=>\processchemicallinesegment{DB1}{##4##5}%
- \processchemicaldashedlinesegment{DB2}{##4##5},
- OF##3:##5=>\processchemicalphantom{##3}{##5},
- OE##3##4##5=>\processchemicalopenend{OE}{##3##4##5},
- EP##3##4##5=>\processchemicallinesegment{EP}{##3##4##5},
- ES##3##4##5=>\processchemicaltextconstant{ES}{##3##4##5}{\hbox{$\cdot$}}{0},
- ED##3##4##5=>\processchemicaltextconstant{ED}{##3##4##5}{\hbox{$\cdot$}}{0},
- ET##3##4##5=>\processchemicaltextconstant{ET}{##3##4##5}{\hbox{$\cdot$}}{0},
- HB##3##4##5=>\processchemicaltextconstant{HB}{##3##4##5}{\hbox{$\cdot$}}{0},
- SB##3##4##5=>\processchemicallinesegment{SB}{##3##4##5},
- DB##3##4##5=>\processchemicallinesegment{DB}{##3##4##5},
- SB##3##4##5=>\processchemicallinesegment{SB}{##3##4##5},
- BB##3##4##5=>\processchemicaldeltalinesegment{SB}{##3##4##5},
- BD##3##4##5=>\processchemicaldasheddeltalinesegment{SB}{##3##4##5},
- BW##3##4##5=>\processchemicalwavylinesegment{SB}{##3##4##5},
- SD##3##4##5=>\processchemicaldashedlinesegment{SB}{##3##4##5},
- TB##3##4##5=>\processchemicallinesegment{SB}{##3##4##5}%
- \processchemicallinesegment{DB}{##3##4##5},
- CZ##3##4##5=>\processchemicaltextelement{RZ}{##3##4##5}{#1}{0}{},
- ZTN##4##5=>\processchemicalsmalltextconstant{ZTN}{##4##5}{\chemicaltextelementnumber}{0},
- ZTT##4##5=>\processchemicalsmalltextelement{ZTN}{##4##5}{#1}{0}{},
- ZBN##4##5=>\processchemicalsmalltextconstant{ZBN}{##4##5}{\chemicaltextelementnumber}{0},
- ZBT##4##5=>\processchemicalsmalltextelement{ZBN}{##4##5}{#1}{0}{},
- ZN##3##4##5=>\processchemicaltextconstant{ZN}{##3##4##5}{\chemicaltextelementnumber}{0},
- ZT##3##4##5=>\processchemicaltextelement{ZN}{##3##4##5}{#1}{0}{},
- Z##2##3##4##5=>\processchemicaltextelement{Z}{##2##3##4##5}{#1}{0}
- {l,l,t,r,r,r,b,l},
- \s!unknown=>\unknownchemical{##1##2##3##4##5}]}}}
-
-\def\executechemicalTHREE[#1]%
- {\setchemicalname THREE
- %
- \setchemicalmaximum 3
- \setchemicaldistance 289
- \setchemicalsubstitute 952
- %
- \setchemicalrotation 1 1 0 0 -1 -1 0 0 1
- \setchemicalrotation 2 -0.5 -0.866 -0.866 0.5 0.5 0.866 0.866 -0.5
- \setchemicalrotation 3 -0.5 0.866 0.866 0.5 0.5 -0.866 -0.866 -0.5
- %
- \setchemicalangle 1 0 90 180 270
- \setchemicalangle 2 120 210 300 30
- \setchemicalangle 3 240 330 60 150
- %
- \setchemicaltranslate 1 -1000 0
- \setchemicaltranslate 2 0 1000
- \setchemicaltranslate 3 1000 0
- \setchemicaltranslate 4 0 -1000
- %
- \setchemicallinesegment B 577 0 -289 -500
- \setchemicallinesegment SB 352 -130 -64 -370
- \setchemicallinesegment -SB 352 -130 -289 -500
- \setchemicallinesegment +SB 577 0 -64 -370
- \setchemicallinesegment DB1 327 -87 -89 -327
- \setchemicallinesegment DB2 377 -172 -39 -413
- \setchemicallinesegment R 577 0 1077 0
- \setchemicallinesegment -R 577 0 1010 250
- \setchemicallinesegment +R 577 0 1010 -250
- \setchemicallinesegment ER1 577 50 1077 50
- \setchemicallinesegment ER2 577 -50 1077 -50
- \setchemicallinesegment SR 837 0 1077 0
- \setchemicallinesegment -SR 802 130 1010 250
- \setchemicallinesegment +SR 802 -130 1010 -250
- \setchemicallinesegment DR1 837 50 1077 50
- \setchemicallinesegment DR2 837 -50 1077 -50
- %
- \setchemicaltextelement Z 577 0
- \setchemicaltextelement RZ 1177 0
- \setchemicaltextelement -RZ 1097 300
- \setchemicaltextelement +RZ 1097 -300
- \setchemicaltextelement CRZ 1077 0
- %
- \def\processchemical[##1##2##3##4]%
- {\processaction
- [##1##2##3##4]
- [ ROT##4=>\processchemicalrotation{##4},
- MOV##4=>\processchemicaltranslate{##4},
- SUB##4=>\processchemicalsubstitute{##4},
- ADJ##4=>\processchemicaldistance{##4},
- -RZ##4=>\processchemicaltextelement{-RZ}{##4}{#1}{3}
- {l,t,r, l,r,l, r,b,l, r,l,r},
- +RZ##4=>\processchemicaltextelement{+RZ}{##4}{#1}{3}
- {l,r,b, r,r,l, r,l,t, l,l,r},
- -SB##4=>\processchemicallinesegment{-SB}{##4},
- +SB##4=>\processchemicallinesegment{+SB}{##4},
- -SR##4=>\processchemicallinesegment{-SR}{##4},
- +SR##4=>\processchemicallinesegment{+SR}{##4},
- CRZ##4=>\processchemicaltextelement{CRZ}{##4}{#1}{0}
- {},
- DB##3##4=>\processchemicallinesegment{DB}{##3##4},
- DR##3##4=>\processchemicallinesegment{DR}{##3##4},
- RZ##3##4=>\processchemicaltextelement{RZ}{##3##4}{#1}{3}
- {l,r,r, t,r,l, r,l,l, b,l,r},
- ER##3##4=>\processchemicallinesegment{ER}{##3##4},
- SB##3##4=>\processchemicallinesegment{SB}{##3##4},
- SR##3##4=>\processchemicallinesegment{SR}{##3##4},
- -R##3##4=>\processchemicallinesegment{-R}{##3##4},
- +R##3##4=>\processchemicallinesegment{+R}{##3##4},
- B##2##3##4=>\processchemicallinesegment{B}{##2##3##4},
- R##2##3##4=>\processchemicallinesegment{R}{##2##3##4},
- Z##2##3##4=>\processchemicaltextelement{Z}{##2##3##4}{#1}{0}{},
- \s!unknown=>\unknownchemical{##1##2##3##4}]}}
-
-\def\executechemicalFOUR[#1]%
- {\setchemicalname FOUR
- %
- \setchemicalmaximum 4
- \setchemicaldistance 500
- \setchemicalsubstitute 0
- %
- \setchemicalrotation 1 1 0 0 -1 -1 0 0 1
- \setchemicalrotation 2 0 -1 -1 0 0 1 1 0
- \setchemicalrotation 3 -1 0 0 1 1 0 0 -1
- \setchemicalrotation 4 0 1 1 0 0 -1 -1 0
- %
- \setchemicalangle 1 0 90 180 270
- \setchemicalangle 2 90 180 270 0
- \setchemicalangle 3 180 270 0 90
- \setchemicalangle 4 270 0 90 180
- %
- \setchemicaltranslate 1 -1000 0
- \setchemicaltranslate 2 0 1000
- \setchemicaltranslate 3 1000 0
- \setchemicaltranslate 4 0 -1000
- %
- \setchemicallinesegment B 500 500 500 -500
- \setchemicallinesegment SB 500 240 500 -240
- \setchemicallinesegment -SB 500 240 500 -500
- \setchemicallinesegment +SB 500 500 500 -240
- \setchemicallinesegment DB1 450 240 450 -240
- \setchemicallinesegment DB2 550 240 550 -240
- \setchemicallinesegment EB 360 300 360 -300
- \setchemicallinesegment R 500 500 854 854
- \setchemicallinesegment -R 500 500 500 1000
- \setchemicallinesegment +R 500 500 1000 500
- \setchemicallinesegment ER1 465 535 819 889
- \setchemicallinesegment ER2 535 465 889 819
- \setchemicallinesegment SR 684 684 854 854
- \setchemicallinesegment -SR 500 760 500 1000
- \setchemicallinesegment +SR 760 500 1000 500
- \setchemicallinesegment DR1 649 719 819 889
- \setchemicallinesegment DR2 719 649 889 819
- %
- \setchemicaltextelement Z 500 500
- \setchemicaltextelement RZ 925 925
- \setchemicaltextelement -RZ 500 1100
- \setchemicaltextelement +RZ 1100 500
- \setchemicaltextelement CRZ 1038 1038
- %
- \setchemicaltextelement ZN 350 350
- %
- \def\processchemical[##1##2##3##4]%
- {\processaction
- [##1##2##3##4]
- [ PB:##4=>\beginchemicalpicture{##4},
- PE????=>\endchemicalpicture,
- ROT##4=>\processchemicalrotation{##4},
- SUB##4=>\processchemicalsubstitute{##4},
- ADJ##4=>\processchemicaldistance{##4},
- MOV##4=>\processchemicaltranslate{##4},
- -RZ##4=>\processchemicaltextelement{-RZ}{##4}{#1}{4}
- {b,l,t,r, l,t,r,b, t,r,b,l, r,b,l,t},
- +RZ##4=>\processchemicaltextelement{+RZ}{##4}{#1}{4}
- {l,t,r,b, t,r,b,l, r,b,l,t, b,l,t,r},
- -SB##4=>\processchemicallinesegment{-SB}{##4},
- +SB##4=>\processchemicallinesegment{+SB}{##4},
- -SR##4=>\processchemicallinesegment{-SR}{##4},
- +SR##4=>\processchemicallinesegment{+SR}{##4},
- CRZ##4=>\processchemicaltextelement{CRZ}{##4}{#1}{0}{},
- ZN##3##4=>\processchemicaltextconstant{ZN}{##3##4}{\chemicaltextelementnumber}{0},
- ZT##3##4=>\processchemicaltextelement{ZN}{##3##4}{#1}{0}{},
- DB##3##4=>\processchemicallinesegment{DB}{##3##4},
- DR##3##4=>\processchemicallinesegment{DR}{##3##4},
- EB##3##4=>\processchemicallinesegment{EB}{##3##4},
- ER##3##4=>\processchemicallinesegment{ER}{##3##4},
- RZ##3##4=>\processchemicaltextelement{RZ}{##3##4}{#1}{4}
- {lb,lt,rt,rb, lt,rt,rb,lb, rt,rb,lb,lt, rb,lb,lt,rt},
- SB##3##4=>\processchemicallinesegment{SB}{##3##4},
- SR##3##4=>\processchemicallinesegment{SR}{##3##4},
- -R##3##4=>\processchemicallinesegment{-R}{##3##4},
- +R##3##4=>\processchemicallinesegment{+R}{##3##4},
- B##2##3##4=>\processchemicallinesegment{B}{##2##3##4},
- R##2##3##4=>\processchemicallinesegment{R}{##2##3##4},
- Z##2##3##4=>\processchemicaltextelement{Z}{##2##3##4}{#1}{0}{},
- \s!unknown=>\unknownchemical{##1##2##3##4}]}}
-
-\def\executechemicalFIVE[#1]%
- {\setchemicalname FIVE
- %
- \setchemicalmaximum 5
- \setchemicaldistance 688
- \setchemicalsubstitute 1226
- %
- \setchemicalrotation 1 1 0 0 -1 -1 0 0 1
- \setchemicalrotation 2 0.309 -0.951 -0.951 -0.309 -0.309 0.940 0.951 0.309
- \setchemicalrotation 3 -0.809 -0.588 -0.588 0.809 0.809 0.588 0.588 -0.809
- \setchemicalrotation 4 -0.809 0.588 0.588 0.809 0.809 -0.588 -0.588 -0.809
- \setchemicalrotation 5 0.309 0.951 0.951 -0.309 -0.309 -0.951 -0.951 0.309
- %
- \setchemicalangle 1 0 90 180 270
- \setchemicalangle 2 72 162 252 342
- \setchemicalangle 3 144 234 324 54
- \setchemicalangle 4 216 306 36 126
- \setchemicalangle 5 288 18 108 198
- %
- \setchemicaltranslate 1 -1376 0
- \setchemicaltranslate 2 -425 1304
- \setchemicaltranslate 3 1113 809
- \setchemicaltranslate 4 1113 -809
- \setchemicaltranslate 5 -425 -1304
- %
- \setchemicallinesegment A 1188 500 1188 -500
- \setchemicallinesegment B 688 500 688 -500
- \setchemicallinesegment S -263 808 688 -500
- \setchemicallinesegment SS -116 606 541 -298
- \setchemicallinesegment -SS -263 808 541 -298
- \setchemicallinesegment +SS -116 606 688 -500
- \setchemicallinesegment SB 688 240 688 -240
- \setchemicallinesegment -SB 688 240 688 -500
- \setchemicallinesegment +SB 688 500 688 -240
- \setchemicallinesegment DB1 638 240 638 -240
- \setchemicallinesegment DB2 738 240 738 -240
- \setchemicallinesegment EB 548 340 548 -340
- \setchemicallinesegment R 688 500 1093 794
- \setchemicallinesegment -R 688 500 688 1000
- \setchemicallinesegment +R 688 500 1163 345
- \setchemicallinesegment ER1 659 540 1064 834
- \setchemicallinesegment ER2 727 460 1122 754
- \setchemicallinesegment SR 898 653 1093 794
- \setchemicallinesegment -SR 688 760 688 1000
- \setchemicallinesegment +SR 935 420 1163 345
- \setchemicallinesegment DR1 869 693 1064 834
- \setchemicallinesegment DR2 927 613 1122 754
- %
- \setchemicaltextelement Z 688 500
- \setchemicaltextelement RZ 1188 863
- \setchemicaltextelement -RZ 688 1100
- \setchemicaltextelement +RZ 1258 315
- \setchemicaltextelement CRZ 1323 947
- %
- \setchemicalcircsegment C -36 36 590 72 475 -345
- \setchemicalcircsegment CC -72 0 590 72 182 -561
- %
- \setchemicaltextelement ZN 468 350
- \setchemicaltextelement RN 860 625 % 1.25 Z
- \setchemicaltextelement RTN 785 728 % .12 / 103 75
- \setchemicaltextelement RBN 935 522
- %
- \def\processchemical[##1##2##3##4]%
- {\processaction
- [##1##2##3##4]
- [ FRONT????=>{\executechemicalFIVEFRONT[#1]},
- PB:##4=>\beginchemicalpicture{##4},
- PE????=>\endchemicalpicture,
- ROT##4=>\processchemicalrotation{##4},
- SUB##4=>\processchemicalsubstitute{##4},
- ADJ##4=>\processchemicaldistance{##4},
- MOV##4=>\processchemicaltranslate{##4},
- -RZ##4=>\processchemicaltextelement{-RZ}{##4}{#1}{5}
- {b,l,t,r,r, l,t,r,r,l, t,r,r,l,l, r,b,l,t,r},
- +RZ##4=>\processchemicaltextelement{+RZ}{##4}{#1}{5}
- {l,t,r,r,b, t,r,r,l,l, r,r,l,l,r, b,l,l,r,r},
- -SB##4=>\processchemicallinesegment{-SB}{##4},
- +SB##4=>\processchemicallinesegment{+SB}{##4},
- -SR##4=>\processchemicallinesegment{-SR}{##4},
- +SR##4=>\processchemicallinesegment{+SR}{##4},
- -RD##4=>\processchemicaldashedlinesegment{-R}{##4},
- +RD##4=>\processchemicaldashedlinesegment{+R}{##4},
- -RB##4=>\processchemicaldeltalinesegment{-R}{##4},
- +RB##4=>\processchemicaldeltalinesegment{+R}{##4},
- CRZ##4=>\processchemicaltextelement{CRZ}{##4}{#1}{0}{},
- RTN##4=>\processchemicaltextconstant{RTN}{##4}{\chemicaltextelementnumber}{0},
- RTT##4=>\processchemicaltextelement{RTN}{##4}{#1}{0}{},
- RBN##4=>\processchemicaltextconstant{RBN}{##4}{\chemicaltextelementnumber}{0},
- RBT##4=>\processchemicaltextelement{RBN}{##4}{#1}{0}{},
- -SS##4=>\processchemicallinesegment{-SS}{##4},
- +SS##4=>\processchemicallinesegment{+SS}{##4},
- CCD##4=>\processchemicaldottsegment{CC}{##4},
- SS##3##4=>\processchemicallinesegment{SS}{##3##4},
- RD##3##4=>\processchemicaldashedlinesegment{R}{##3##4},
- RB##3##4=>\processchemicaldeltalinesegment{R}{##3##4},
- ZN##3##4=>\processchemicaltextconstant{ZN}{##3##4}{\chemicaltextelementnumber}{0},
- ZT##3##4=>\processchemicaltextelement{ZN}{##3##4}{#1}{0}{},
- RN##3##4=>\processchemicaltextconstant{RN}{##3##4}{\chemicaltextelementnumber}{0},
- RT##3##4=>\processchemicaltextelement{RN}{##3##4}{#1}{0}{},
- AU##3##4=>\processchemicaluparrowsegment{A}{##3##4},
- AD##3##4=>\processchemicaldownarrowsegment{A}{##3##4},
- CC##3##4=>\processchemicalcircsegment{CC}{##3##4},
- CD##3##4=>\processchemicaldottsegment{C}{##3##4},
- DB##3##4=>\processchemicallinesegment{DB}{##3##4},
- DR##3##4=>\processchemicallinesegment{DR}{##3##4},
- EB##3##4=>\processchemicallinesegment{EB}{##3##4},
- ER##3##4=>\processchemicallinesegment{ER}{##3##4},
- RZ##3##4=>\processchemicaltextelement{RZ}{##3##4}{#1}{5}
- {l,l,r,r,r, l,r,r,b,l, r,r,b,l,t, r,l,l,t,r},
- SB##3##4=>\processchemicallinesegment{SB}{##3##4},
- SR##3##4=>\processchemicallinesegment{SR}{##3##4},
- -R##3##4=>\processchemicallinesegment{-R}{##3##4},
- +R##3##4=>\processchemicallinesegment{+R}{##3##4},
- B##2##3##4=>\processchemicallinesegment{B}{##2##3##4},
- C##2##3##4=>\processchemicalcircsegment{C}{##2##3##4},
- R##2##3##4=>\processchemicallinesegment{R}{##2##3##4},
- S##2##3##4=>\processchemicallinesegment{S}{##2##3##4},
- Z##2##3##4=>\processchemicaltextelement{Z}{##2##3##4}{#1}{0}{},
- \s!unknown=>\unknownchemical{##1##2##3##4}]}}
-
-\def\executechemicalSIX[#1]%
- {\setchemicalname SIX
- %
- \setchemicalmaximum 6
- \setchemicalsubstitute 1375
- \setchemicaldistance 866
- %
- \setchemicalrotation 1 1 0 0 -1 -1 0 0 1
- \setchemicalrotation 2 0.5 -0.866 -0.866 -0.5 -0.5 0.866 0.866 0.5
- \setchemicalrotation 3 -0.5 -0.866 -0.866 0.5 0.5 0.866 0.866 -0.5
- \setchemicalrotation 4 -1 0 0 1 1 0 0 -1
- \setchemicalrotation 5 -0.5 0.866 0.866 0.5 0.5 -0.866 -0.866 -0.5
- \setchemicalrotation 6 0.5 0.866 0.866 -0.5 -0.5 -0.866 -0.866 0.5
- %
- \setchemicalangle 1 0 90 180 270
- \setchemicalangle 2 60 150 240 330
- \setchemicalangle 3 120 210 300 30
- \setchemicalangle 4 180 270 0 90
- \setchemicalangle 5 240 330 60 150
- \setchemicalangle 6 300 30 120 210
- %
- \setchemicaltranslate 1 -1732 0
- \setchemicaltranslate 2 -866 1500
- \setchemicaltranslate 3 866 1500
- \setchemicaltranslate 4 1732 0
- \setchemicaltranslate 5 866 -1500
- \setchemicaltranslate 6 -866 -1500
- %
- \setchemicallinesegment A 1386 500 1386 -500
- \setchemicallinesegment S 0 1000 866 -500
- \setchemicallinesegment SS 125 783 741 -283
- \setchemicallinesegment -SS 0 1000 741 -283
- \setchemicallinesegment +SS 125 783 866 -500
- \setchemicallinesegment B 866 500 866 -500
- \setchemicallinesegment SB 866 240 866 -240
- \setchemicallinesegment -SB 866 240 866 -500
- \setchemicallinesegment +SB 866 500 866 -240
- \setchemicallinesegment DB1 816 240 816 -240
- \setchemicallinesegment DB2 916 240 916 -240
- \setchemicallinesegment EB 726 340 726 -340
- \setchemicallinesegment R 866 500 1299 750
- \setchemicallinesegment -R 866 500 866 1000
- \setchemicallinesegment +R 866 500 1299 250
- \setchemicallinesegment ER1 841 543 1274 793
- \setchemicallinesegment ER2 891 457 1324 707
- \setchemicallinesegment SR 1091 630 1299 750
- \setchemicallinesegment -SR 866 740 866 1000
- \setchemicallinesegment +SR 1091 370 1299 250
- \setchemicallinesegment DR1 1066 673 1274 793
- \setchemicallinesegment DR2 1116 588 1324 707
- \setchemicallinesegment MID1 0 1000 -150 200
- \setchemicallinesegment MID2 0 -1000 -150 -200
- \setchemicallinesegment MIDS1 0 1000 -180 0
- \setchemicallinesegment MIDS2 0 -1000 -180 0
- %
- \setchemicalcircsegment C -30 30 700 60 600 -346
- \setchemicalcircsegment CC -60 0 700 60 350 -606
- %
- \setchemicaltextelement Z 866 500
- \setchemicaltextelement RZ 1386 800
- \setchemicaltextelement -RZ 866 1100
- \setchemicaltextelement +RZ 1386 200
- \setchemicaltextelement CRZ 1524 880
- \setchemicaltextelement MIDZ -150 0
- %
- \setchemicaltextelement ZN 589 350
- \setchemicaltextelement RN 1083 625 % 1.25 Z
- \setchemicaltextelement RTN 1008 755 % .12 / 130 75
- \setchemicaltextelement RBN 1158 495
- %
- \def\processchemical[##1##2##3##4##5]%
- {\processaction
- [##1##2##3##4##5]
- [ FRONT????=>{\executechemicalSIXFRONT[#1]},
- MID????=>\processchemicallinesegment{MID}{1????},
- MIDS????=>\processchemicallinesegment{MIDS}{1????},
- MIDZ????=>\processchemicaltextelement{MIDZ}{1????}{#1}{0}{},
- PB:##4##5=>\beginchemicalpicture{##4##5},
- PE????=>\endchemicalpicture,
- ROT##4##5=>\processchemicalrotation{##4##5},
- SUB##4##5=>\processchemicalsubstitute{##4##5},
- ADJ##4##5=>\processchemicaldistance{##4##5},
- MOV##4##5=>\processchemicaltranslate{##4##5},
- -RZ##4##5=>\processchemicaltextelement{-RZ}{##4##5}{#1}{6}
- {b,l,l,t,r,r, l,l,r,r,r,l, t,r,r,b,l,l, r,r,l,l,l,r},
- +RZ##4##5=>\processchemicaltextelement{+RZ}{##4##5}{#1}{6}
- {l,t,r,r,b,l, r,r,r,l,l,l, r,b,l,l,t,r, l,l,l,r,r,r},
- -SB##4##5=>\processchemicallinesegment{-SB}{##4##5},
- +SB##4##5=>\processchemicallinesegment{+SB}{##4##5},
- -SR##4##5=>\processchemicallinesegment{-SR}{##4##5},
- +SR##4##5=>\processchemicallinesegment{+SR}{##4##5},
- -RD##4##5=>\processchemicaldashedlinesegment{-R}{##4##5},
- +RD##4##5=>\processchemicaldashedlinesegment{+R}{##4##5},
- -RB##4##5=>\processchemicaldeltalinesegment{-R}{##4##5},
- +RB##4##5=>\processchemicaldeltalinesegment{+R}{##4##5},
- CRZ##4##5=>\processchemicaltextelement{CRZ}{##4##5}{#1}{0}{},
- -SS##4##5=>\processchemicallinesegment{-SS}{##4##5},
- +SS##4##5=>\processchemicallinesegment{+SS}{##4##5},
- CCD##4##5=>\processchemicaldottsegment{CC}{##4##5},
-RTN##4##5=>\processchemicaltextconstant{RTN}{##4##5}{\chemicaltextelementnumber}{0},
-RTT##4##5=>\processchemicaltextelement{RTN}{##4##5}{#1}{0}{},
-RBN##4##5=>\processchemicaltextconstant{RBN}{##4##5}{\chemicaltextelementnumber}{0},
-RBT##4##5=>\processchemicaltextelement{RBN}{##4##5}{#1}{0}{},
- SS##3##4##5=>\processchemicallinesegment{SS}{##3##4##5},
- RD##3##4##5=>\processchemicaldashedlinesegment{R}{##3##4##5},
- RB##3##4##5=>\processchemicaldeltalinesegment{R}{##3##4##5},
- ZN##3##4##5=>\processchemicaltextconstant{ZN}{##3##4##5}{\chemicaltextelementnumber}{0},
- ZT##3##4##5=>\processchemicaltextelement{ZN}{##3##4##5}{#1}{0}{},
-RN##3##4##5=>\processchemicaltextconstant{RN}{##3##4##5}{\chemicaltextelementnumber}{0},
-RT##3##4##5=>\processchemicaltextelement{RN}{##3##4##5}{#1}{0}{},
- AU##3##4##5=>\processchemicaluparrowsegment{A}{##3##4##5},
- AD##3##4##5=>\processchemicaldownarrowsegment{A}{##3##4##5},
- CD##3##4##5=>\processchemicaldottsegment{C}{##3##4##5},
- CC##3##4##5=>\processchemicalcircsegment{CC}{##3##4##5},
- DB##3##4##5=>\processchemicallinesegment{DB}{##3##4##5},
- EB##3##4##5=>\processchemicallinesegment{EB}{##3##4##5},
- ER##3##4##5=>\processchemicallinesegment{ER}{##3##4##5},
- RZ##3##4##5=>\processchemicaltextelement{RZ}{##3##4##5}{#1}{6}
- {l,l,t,r,r,b, l,r,r,r,l,l, r,r,b,l,l,t, r,l,l,l,r,r},
- SB##3##4##5=>\processchemicallinesegment{SB}{##3##4##5},
- SR##3##4##5=>\processchemicallinesegment{SR}{##3##4##5},
- DR##3##4##5=>\processchemicallinesegment{DR}{##3##4##5},
- -R##3##4##5=>\processchemicallinesegment{-R}{##3##4##5},
- +R##3##4##5=>\processchemicallinesegment{+R}{##3##4##5},
- B##2##3##4##5=>\processchemicallinesegment{B}{##2##3##4##5},
- C##2##3##4##5=>\processchemicalcircsegment{C}{##2##3##4##5},
- R##2##3##4##5=>\processchemicallinesegment{R}{##2##3##4##5},
- S##2##3##4##5=>\processchemicallinesegment{S}{##2##3##4##5},
- Z##2##3##4##5=>\processchemicaltextelement{Z}{##2##3##4##5}{#1}{0}{},
- \s!unknown=>\unknownchemical{##1##2##3##4##5}]}}
-
-\def\executechemicalSEVEN[#1]% incomplete !
- {\setchemicalname SEVEN
- %
- \setchemicalmaximum 7
- \setchemicalsubstitute -
- \setchemicaldistance 1038
- %
- \setchemicalrotation 1 .623 .782 - - - - - -
- \setchemicalrotation 2 -.223 .975 - - - - - -
- \setchemicalrotation 3 -.901 .434 - - - - - -
- \setchemicalrotation 4 -.901 -.434 - - - - - -
- \setchemicalrotation 5 -.223 -.975 - - - - - -
- \setchemicalrotation 6 .623 -.782 - - - - - -
- \setchemicalrotation 7 1 0 - - - - - -
- %
- \setchemicalangle 1 0 - - -
- \setchemicalangle 2 51.429 - - -
- \setchemicalangle 3 102.857 - - -
- \setchemicalangle 4 154.286 - - -
- \setchemicalangle 5 205.714 - - -
- \setchemicalangle 6 257.143 - - -
- \setchemicalangle 7 308.571 - - -
- %
- \setchemicaltranslate 1 - -
- \setchemicaltranslate 2 - -
- \setchemicaltranslate 3 - -
- \setchemicaltranslate 4 - -
- \setchemicaltranslate 5 - -
- \setchemicaltranslate 6 - -
- \setchemicaltranslate 7 - -
- %
- \setchemicallinesegment B 1038 500 1038 -500
- \setchemicallinesegment SB 1038 240 1038 -240
- \setchemicallinesegment -SB 1038 240 1038 -500
- \setchemicallinesegment +SB 1038 500 1038 -240
- %
- \setchemicaltextelement Z 1038 500
- %
- \def\processchemical[##1##2##3##4##5]%
- {\processaction
- [##1##2##3##4##5]
- [ PB:##4##5=>\beginchemicalpicture{##4##5},
- PE????=>\endchemicalpicture,
- %ROT##4##5=>\processchemicalrotation{##4},
- %SUB##4##5=>\processchemicalsubstitute{##4##5},
- %ADJ##4##5=>\processchemicaldistance{##4##5},
- %MOV##4##5=>\processchemicaltranslate{##4##5},
- -SB##4##5=>\processchemicallinesegment{-SB}{##4##5},
- +SB##4##5=>\processchemicallinesegment{+SB}{##4##5},
- SB##3##4##5=>\processchemicallinesegment{SB}{##3##4##5},
- B##2##3##4##5=>\processchemicallinesegment{B}{##2##3##4##5},
- Z##2##3##4##5=>\processchemicaltextelement{Z}{##2##3##4##5}{#1}{0}{},
- \s!unknown=>\unknownchemical{##1##2##3##4##5}]}}
-
-\def\executechemicalEIGHT[#1]% incomplete !
- {\setchemicalname EIGHT
- %
- \setchemicalmaximum 8
- %\setchemicalsubstitute 1307
- \setchemicaldistance 1207
- %
- \setchemicalrotation 1 .707 .707 - - - - - -
- \setchemicalrotation 2 0 1 - - - - - -
- \setchemicalrotation 3 -.707 .707 - - - - - -
- \setchemicalrotation 4 -1 0 - - - - - -
- \setchemicalrotation 5 -.707 -.707 - - - - - -
- \setchemicalrotation 6 0 -1 - - - - - -
- \setchemicalrotation 7 .707 -.707 - - - - - -
- \setchemicalrotation 8 1 0 - - - - - -
- %
- \setchemicalangle 1 45 - - -
- \setchemicalangle 2 90 - - -
- \setchemicalangle 3 135 - - -
- \setchemicalangle 4 180 - - -
- \setchemicalangle 5 225 - - -
- \setchemicalangle 6 270 - - -
- \setchemicalangle 7 315 - - -
- \setchemicalangle 8 0 - - -
- %
- \setchemicaltranslate 1 -2414 0
- \setchemicaltranslate 2 -1706 1706
- \setchemicaltranslate 3 0 2414
- \setchemicaltranslate 4 1706 1706
- \setchemicaltranslate 5 2414 0
- \setchemicaltranslate 6 1706 -1706
- \setchemicaltranslate 7 0 -2414
- \setchemicaltranslate 8 -1706 -1706
- %
- \setchemicallinesegment B 1207 500 1207 -500
- \setchemicallinesegment SB 1207 240 1207 -240
- \setchemicallinesegment -SB 1207 240 1207 -500
- \setchemicallinesegment +SB 1207 500 1207 -240
- %
- \setchemicaltextelement Z 1207 500
- %
- \def\processchemical[##1##2##3##4##5]%
- {\processaction
- [##1##2##3##4##5]
- [ PB:##4##5=>\beginchemicalpicture{##4##5},
- PE????=>\endchemicalpicture,
- %SUB##4##5=>\processchemicalsubstitute{##4##5},
- ADJ##4##5=>\processchemicaldistance{##4##5},
- MOV##4##5=>\processchemicaltranslate{##4##5},
- -SB##4##5=>\processchemicallinesegment{-SB}{##4##5},
- +SB##4##5=>\processchemicallinesegment{+SB}{##4##5},
- SB##3##4##5=>\processchemicallinesegment{SB}{##3##4##5},
- B##2##3##4##5=>\processchemicallinesegment{B}{##2##3##4##5},
- Z##2##3##4##5=>\processchemicaltextelement{Z}{##2##3##4##5}{#1}{0}{},
- \s!unknown=>\unknownchemical{##1##2##3##4##5}]}}
-
-\def\executechemicalFIVEFRONT[#1]%
- {\executechemicalFIVE[]%
- %
- \setchemicalname FIVEFRONT
- %
- \setchemicallinesegment -R 688 500 688 100
- \setchemicallinesegment +R 688 500 688 900
- %
- \setchemicaltextelement -RZ 0 -1300
- \setchemicaltextelement +RZ 0 1300
- %
- \def\processchemical[##1##2##3##4]%
- {\def\chemicalrotation{2}%
- \processaction
- [##1##2##3##4]
- [ -RZ##4=>\processchemicalunrotatedtextelement{Z}{-RZ}{##4}{#1}{5}
- {,,,,, t,t,t,t,t},
- +RZ##4=>\processchemicalunrotatedtextelement{Z}{+RZ}{##4}{#1}{5}
- {,,,,, b,b,b,b,b},
- -SB##4=>\processchemicallinesegment{-SB}{##4},
- +SB##4=>\processchemicallinesegment{+SB}{##4},
- SB##3##4=>\processchemicallinesegment{SB}{##3##4},
- -R##3##4=>\processchemicalunrotatedlinesegment{t}{-R}{##3##4},
- +R##3##4=>\processchemicalunrotatedlinesegment{b}{+R}{##3##4},
- BB##3##4=>\processchemicalzlinesegment{B}{##3##4},
- R##2##3##4=>\processchemicalunrotatedlinesegment{t}{-R}{##2##3##4}%
- \processchemicalunrotatedlinesegment{b}{+R}{##2##3##4},
- B##2##3##4=>\processchemicallinesegment{B}{##2##3##4},
- Z##2##3##4=>\processchemicaltextelement{Z}{##2##3##4}{#1}{0}{},
- \s!unknown=>\unknownchemical{##1##2##3##4}]}}
-
-\def\executechemicalSIXFRONT[#1]%
- {\executechemicalSIX[]%
- %
- \setchemicalname SIXFRONT
- %
- \setchemicallinesegment -R 866 500 866 100
- \setchemicallinesegment +R 866 500 866 900
- %
- \setchemicaltextelement -RZ 0 -1300
- \setchemicaltextelement +RZ 0 1300
- %
- \def\processchemical[##1##2##3##4]%
- {\def\chemicalrotation{2}%
- \processaction
- [##1##2##3##4]
- [ -RZ##4=>\processchemicalunrotatedtextelement{Z}{-RZ}{##4}{#1}{6}
- {,,,,,, t,t,t,t,t,t},
- +RZ##4=>\processchemicalunrotatedtextelement{Z}{+RZ}{##4}{#1}{6}
- {,,,,,, b,b,b,b,b,b},
- -SB##4=>\processchemicallinesegment{-SB}{##4},
- +SB##4=>\processchemicallinesegment{+SB}{##4},
- SB##3##4=>\processchemicallinesegment{SB}{##3##4},
- -R##3##4=>\processchemicalunrotatedlinesegment{t}{-R}{##3##4},
- +R##3##4=>\processchemicalunrotatedlinesegment{b}{+R}{##3##4},
- BB##3##4=>\processchemicalzlinesegment{B}{##3##4},
- R##2##3##4=>\processchemicalunrotatedlinesegment{t}{-R}{##2##3##4}%
- \processchemicalunrotatedlinesegment{b}{+R}{##2##3##4},
- B##2##3##4=>\processchemicallinesegment{B}{##2##3##4},
- Z##2##3##4=>\processchemicaltextelement{Z}{##2##3##4}{#1}{0}{},
- \s!unknown=>\unknownchemical{##1##2##3##4}]}}
-
-% 1 : 0
-% 2 : -115
-% 3* : -195
-% 3 : -165
-% 4 : -245
-
-\def\executechemicalCARBON[#1]%
- {\setchemicalname CARBON
- %
- \setchemicalmaximum 4
- \setchemicaldistance 0
- \setchemicalsubstitute 0
- %
- \setchemicalrotation 1 1 0 0 -1 -1 0 0 1
- \setchemicalrotation 2 -0.423 -0.906 -0.906 0.423 0.423 0.906 0.906 -0.423
- \setchemicalrotation 3 -0.966 -0.259 -0.259 0.966 0.966 0.259 0.259 -0.966
- \setchemicalrotation 3* -0.966 0.259 0.259 0.966 0.966 -0.259 -0.259 -0.966
- \setchemicalrotation 4 -0.423 0.906 0.906 0.423 0.423 -0.906 -0.906 -0.423
- %
- \setchemicalangle 1 0 90 180 270
- \setchemicalangle 2 115 205 295 25
- \setchemicalangle 3 165 255 345 75
- \setchemicalangle 3* 195 285 15 105
- \setchemicalangle 4 245 335 65 155
- %
- \setchemicaltranslate 1 -1500 0
- \setchemicaltranslate 2 0 1500
- \setchemicaltranslate 3 1500 0
- \setchemicaltranslate 4 0 -1500
- %
- \setchemicallinesegment B1 500 0 1000 0
- \setchemicallinesegment B2 300 0 1000 0
- \setchemicallinesegment B3 500 0 1000 0
- \setchemicallinesegment B4 300 0 1000 0
- %
- \setchemicaltextelement Z 1100 0
- %
- \setchemicalcircsegment C 0 360 500 360 0 -500
- %
- \def\processchemical[##1##2##3##4##5]%
- {\processaction
- [##1##2##3##4##5]
- [ MIR????=>\setchemicalmirror{3},
- -MIR????=>\resetchemicalmirror{3},
- *MIR????=>\togglechemicalmirror{3},
- CB????=>\processlocalchemicals{B,C,Z},
- C????=>\processchemicalcircsegment{C}{1????},
- -ROT##5=>\reversechemical{ROT}{##5}{3,4,1,2},
- ROT##4##5=>\processchemicalrotation{##4##5},
- MOV##4##5=>\processchemicaltranslate{##4##5},
- CB##3##4##5=>\processlocalchemicals
- {ROT##3,C,B,Z2..4,
- MOV##3,*MIR,-ROT##3,C,B,Z2..4},
- B##2##3##4##5=>\processprivatechemicallinesegment{B}{##2##3##4##5},
- Z##2##3##4##5=>\processchemicaltextelement{Z}{##2##3##4##5}{#1}{4}
- {l,t,r,b, t,r,b,l, r,b,l,t, b,l,t,r},
- \s!unknown=>\unknownchemical{##1##2##3##4##5}]}}
-
-% 1: 45 2: -90 3: -225
-% 4: -45 5: -135 6: -270
-
-\newif\ifNEWMANstagger \NEWMANstaggertrue
-
-\def\executechemicalNEWMANSTAGGER%
- {\NEWMANstaggertrue\executechemicalNEWMAN}
-
-\def\executechemicalNEWMANECLIPSE%
- {\NEWMANstaggerfalse\executechemicalNEWMAN}
-
-\def\executechemicalNEWMAN[#1]%
- {\setchemicalname NEWMAN
- %
- \setchemicalmaximum 6
- \setchemicaldistance 0
- \setchemicalsubstitute 0
- %
- \ifNEWMANstagger
- \setchemicalrotation 1 0.707 0.707 0.707 -0.707 -0.707 -0.707 -0.707 0.707
- \setchemicalrotation 2 0 -1 -1 0 0 1 1 0
- \setchemicalrotation 3 -0.707 0.707 0.707 0.707 0.707 -0.707 -0.707 -0.707
- \else
- \setchemicalrotation 1 .866 -.5 -.5 -.866 -.866 .5 .5 .866
- \setchemicalrotation 2 -.259 .966 .966 .259 .259 -.966 -.966 -.259
- \setchemicalrotation 3 -.5 -.866 -.866 .5 .5 .866 .866 -.5
- \fi
- \setchemicalrotation 4 0.707 -0.707 -0.707 -0.707 -0.707 0.707 0.707 0.707
- \setchemicalrotation 5 -0.707 -0.707 -0.707 0.707 0.707 0.707 0.707 -0.707
- \setchemicalrotation 6 0 1 1 0 0 -1 -1 0
- %
- \ifNEWMANstagger
- \setchemicalangle 1 315 45 135 225
- \setchemicalangle 2 90 180 270 0
- \setchemicalangle 3 225 315 45 135
- \else
- \setchemicalangle 1 30 120 210 300
- \setchemicalangle 2 255 345 75 165
- \setchemicalangle 3 120 210 300 30
- \fi
- \setchemicalangle 4 45 135 225 315
- \setchemicalangle 5 135 225 315 45
- \setchemicalangle 6 270 0 90 180
- %
- \setchemicaltranslate 1 -1500 0
- \setchemicaltranslate 2 0 1500
- \setchemicaltranslate 3 1500 0
- \setchemicaltranslate 4 0 -1500
- %
- \setchemicallinesegment B1 0 0 1000 0
- \setchemicallinesegment B2 0 0 1000 0
- \setchemicallinesegment B3 0 0 1000 0
- \setchemicallinesegment B4 500 0 1000 0
- \setchemicallinesegment B5 500 0 1000 0
- \setchemicallinesegment B6 500 0 1000 0
- %
- \setchemicaltextelement Z 1100 0
- %
- \setchemicalcircsegment C 0 360 500 360 0 -500
- %
- \def\processchemical[##1##2##3##4]%
- {\processaction
- [##1##2##3##4]
- [STAGGER????=>{\executechemicalNEWMANSTAGGER[#1]},
- ECLIPSE????=>{\executechemicalNEWMANECLIPSE[#1]},
- B????=>\processlocalchemicals{B1..6},
- CB????=>\processlocalchemicals{B1..6,C,Z1..6},
- C????=>\processchemicalcircsegment{C}{1????},
- ROT##4=>\processchemicalrotation{##4},
- MOV##4=>\processchemicaltranslate{##4},
- B##2##3##4=>\processprivatechemicallinesegment{B}{##2##3##4},
- Z##2##3##4=>\ifNEWMANstagger
- \processchemicaltextelement{Z}{##2##3##4}{#1}{6}
- {l,t,r,l,r,b, l,r,l,r,r,l, r,b,l,r,l,t, r,l,r,l,l,r}%
- \else
- \processchemicaltextelement{Z}{##2##3##4}{#1}{6}
- {l,r,t,t,r,b, t,b,r,r,b,l, r,l,b,b,l,t, b,t,l,l,t,r}%
- \fi,
- \s!unknown=>\unknownchemical{##1##2##3##4}]}}
-
-\def\executechemicalCHAIR[#1]% smaller
- {\setchemicalname CHAIR
- %
- \setchemicalmaximum 6
- %
- \setchemicallinesegment B1 1600 800 2800 -800
- \setchemicallinesegment B2 2800 -800 800 0
- \setchemicallinesegment B3 800 0 -1600 -800
- \setchemicallinesegment B4 -1600 -800 -2800 800
- \setchemicallinesegment B5 -2800 800 -800 0
- \setchemicallinesegment B6 -800 0 1600 800
- %
- \setchemicallinesegment +R1 1600 800 1600 1600
- \setchemicallinesegment +R2 2800 -800 2800 -1600
- \setchemicallinesegment +R3 800 0 800 800
- \setchemicallinesegment +R4 -1600 -800 -1600 -1600
- \setchemicallinesegment +R5 -2800 800 -2800 1600
- \setchemicallinesegment +R6 -800 0 -800 -800
- %
- \setchemicallinesegment -R1 1600 800 2350 522 % 750 278
- \setchemicallinesegment -R2 2800 -800 3493 -400
- \setchemicallinesegment -R3 800 0 1329 -600 % 528 600
- \setchemicallinesegment -R4 -1600 -800 -2350 -522 % 750 278
- \setchemicallinesegment -R5 -2800 800 -3493 400
- \setchemicallinesegment -R6 -800 0 -1329 600 % 528 600
- %
- \setchemicaltextelement +RZ1 1600 1800
- \setchemicaltextelement +RZ2 2800 -1800
- \setchemicaltextelement +RZ3 800 1000
- \setchemicaltextelement +RZ4 -1600 -1800
- \setchemicaltextelement +RZ5 -2800 1800
- \setchemicaltextelement +RZ6 -800 -1000
- %
- \setchemicaltextelement -RZ1 2538 453 % 200 lang
- \setchemicaltextelement -RZ2 3666 -300
- \setchemicaltextelement -RZ3 1460 -750
- \setchemicaltextelement -RZ4 -2538 -453
- \setchemicaltextelement -RZ5 -3666 300
- \setchemicaltextelement -RZ6 -1460 750
- %
- \def\processchemical[##1##2##3##4##5]%
- {\def\chemicalrotation{1}%
- \processaction
- [##1##2##3##4##5]
- [ B????=>\processlocalchemicals{B1,B2,B3,B4,B5,B6},
- -R????=>\processlocalchemicals{-R1,-R2,-R3,-R4,-R5,-R6},
- +R????=>\processlocalchemicals{+R1,+R2,+R3,+R4,+R5,+R6},
- B##2????=>{\getchemicallinesegment[0][B##2]},
- -RZ##4????=>{\getchemicalfixedtextelement[-RZ##4][1][##4][l,l,tc,r,r,bc][#1]},
- +RZ##4????=>{\getchemicalfixedtextelement[+RZ##4][1][##4][c][#1]},
- -R##3????=>{\getchemicallinesegment[0][-R##3]},
- +R##3????=>{\getchemicallinesegment[0][+R##3]},
- \s!unknown=>\unknownchemical{##1##2##3##4##5}]}}
-
-\def\executechemicalarrow#1#2[#3]%
- {\dogetcommalistelement1\from#3\to\toptext
- \dogetcommalistelement2\from#3\to\bottext
- \def\dochemicaltext##1%
- {\dosetsubscripts%
- $\@@dochemicalstyle{\@@localchemicalformat\strut##1}$%
- \doresetsubscripts}%
- \doifelse\@@chemicallocation\v!intext
- {#1{\dochemicaltext\toptext}}%
- {\setbox\chemicalsymbols=\hbox
- {\box\chemicalsymbols
- \vbox{\halign{##\cr
- \hbox to 3em{\hss\dochemicaltext{\toptext}\hss}\cr
- #2%
- \hbox to 3em{\hss\dochemicaltext{\bottext}\hss}\cr}}}}}
-
-\def\executechemicalGIVES
- {\executechemicalarrow
- {\chemicalsinglepicturearrow}% nodig
- {\rightarrowfill\cr}}
-
-\def\executechemicalEQUILIBRIUM
- {\executechemicalarrow
- {\chemicaldoublepicturearrow}% nodig
- {\rightarrowfill\cr\leftarrowfill\cr}}
-
-\def\executechemicalMESOMERIC
- {\executechemicalarrow
- {\chemicalsinglepicturearrow}% nodig
- {$\leftarrow\hskip-1em$\rightarrowfill\cr}}
-
-\def\executechemicalsign#1[#2]%
- {\doifelse\@@chemicallocation\v!intext
- {\dosetsubscripts
- $\@@dochemicalstyle{\@@localchemicalformat#1}$%
- \doresetsubscripts}
- {\setbox\chemicalsymbols\hbox
- {\box\chemicalsymbols
- \dosetsubscripts
- $\@@dochemicalstyle{\@@localchemicalformat#1}$%
- \doresetsubscripts}}}
-
-\def\executechemicalPLUS
- {\executechemicalsign{+}}
-
-\def\executechemicalMINUS
- {\executechemicalsign{-}}
-
-\def\executechemicalEQUAL
- {\executechemicalsign{=}}
-
-\def\executechemicalSPACE[#1]%
- {\doifnot\@@chemicallocation\v!intext
- {\setbox\chemicalsymbols\hbox
- {\box\chemicalsymbols
- \quad}}}
-
-\def\executechemicalCHEM[#1]%
- {\doifnot\@@chemicallocation\v!intext
- {\setbox\chemicalsymbols\hbox
- {\box\chemicalsymbols
- $\@@dochemicalstyle{\@@localchemicalformat#1}$}}}
-
-\def\executechemicalTEXT[#1]%
- {\doifnot\@@chemicallocation\v!intext
- {\setbox\chemicalsymbols\hbox
- {\box\chemicalsymbols#1}}}
-
-%\def\executechemicalLOW[#1]%
-% {\setlowsubscripts}
-%
-%\def\executechemicalHIGH[#1]%
-% {\sethighsubscripts}
-
-\def\putchemicalrule#1#2#3#4%
- {\ifcase\chemicaldrawingmode
- \putrule from {#1} {#2} to {#3} {#4}
- \or
- \psline(#1,#2)(#3,#4)%
- \or
- \bgroup
- \!!counta=#1\!!countb=#2\!!countc=#3\!!countd=#4\relax
- \global\MPdrawingdonetrue
- \setchemicalattributes
- \startMPdrawing
- x1 := \MPdivten[\the\!!counta]u ;
- y1 := \MPdivten[\the\!!countb]u ;
- x2 := \MPdivten[\the\!!countc]u ;
- y2 := \MPdivten[\the\!!countd]u ;
- draw z1--z2 ;
- \stopMPdrawing
- \egroup
- \fi}
-
-\def\executechemicalcomplex#1%
- {\bgroup
- \putchemicalrule {0} {-\@@chemicalbottom} {0} {\@@chemicaltop}%
- \putchemicalrule {0} {\@@chemicaltop} {#1150} {\@@chemicaltop}%
- \putchemicalrule {0} {-\@@chemicalbottom} {#1150} {-\@@chemicalbottom}%
- \egroup}
-
-\def\executechemicalOPENCOMPLEX[#1]%
- {\executechemicalcomplex+\ignorespaces
- \executechemicalSPACE[]}
-
-\def\executechemicalCLOSECOMPLEX[#1]%
- {\executechemicalSPACE[]%
- \executechemicalcomplex-\ignorespaces}
-
-% nog niet door midden as!
-
-\def\executechemicalverticalsymbol#1#2%
- {\executechemicalTEXT
- [$\left#1\relax
- \dimen0=\@@chemicalunit
- \scratchcounter=\@@chemicaltop
- \advance\scratchcounter by \@@chemicalbottom
- \dimen0=\scratchcounter\dimen0
- \vcenter to \dimen0{}
- \dimen2=\@@chemicalunit
- \dimen2=\@@chemicalright\dimen0
- \vcenter{\leftskip1em\hsize\dimen2\relax\strut#2\strut}%
- \right.$]}%
-
-\def\executechemicalUPARROW[#1]%
- {\executechemicalverticalsymbol\uparrow{#1}}
-
-\def\executechemicalDOWNARROW[#1]%
- {\executechemicalverticalsymbol\downarrow{#1}}
-
-\def\executechemicalUPDOWNARROW[#1]%
- {\executechemicalverticalsymbol\updownarrow{#1}}
-
-\let\setchemicalattributes\relax
-
-\setupchemical
- [\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!alternative=1,
- \c!color=,
- \c!rulethickness=,
- \c!rulecolor=,
- \c!factor=1]
-
-% Tijdelijk plaatsen we deze extra macro's hier.
-%
-% mathontop: \mtop {} {}
-% textontop: \ttop {} {}
-
-\def\putontop#1#2%
- {\vbox
- {\halign
- {\strut\hss##\hss\cr
- #1\cr
- #2\cr}}}
-
-\def\ttop#1#2%
- {\putontop{\tx#1}{#2}}
-
-\def\mtop#1#2%
- {\vbox
- {\offinterlineskip
- \halign
- {\hss##\hss\cr
- $\scriptscriptstyle#1$\cr
- \noalign{\vskip.5ex}%
- $#2$\cr}}}
-
-\def\ctop#1#2%
- {\vbox
- {\offinterlineskip
- \halign
- {\hss##\hss\cr
- $\@@dochemicalstyle{\@@localchemicalformat\scriptscriptstyle#1}$\cr
- \noalign{\vskip.5ex}%
- $\@@dochemicalstyle{\@@localchemicalformat#2}$\cr}}}
-
-%D Here are a couple of goodies:
-%D
-%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 \stopitemize
-
-\let\@@chemicalrulecolor\empty
-\let\@@chemicalcolor \empty
-
-\def\setchemicalattributes
- {\scratchdimen\@@chemicalrulethickness
- \def\chemicalattributes
- {withpen pencircle scaled \the\scratchdimen\space
- withcolor }%
- \doifelsenothing\@@chemicalrulecolor
- {\edef\chemicalattributes{\chemicalattributes black}}
- {\edef\chemicalattributes{\chemicalattributes \MPcolor{\@@chemicalrulecolor}}}%
- \startMPdrawing
- drawoptions (\chemicalattributes) ;
- \stopMPdrawing}
-
-\unexpanded\def\@@dochemicalcolor
- {\dousecolorparameter\@@chemicalcolor}
-
-\unexpanded\def\@@dochemicalstyle
- {\dousestyleparameter\@@chemicalstyle}
-
-\setupchemical
- [\c!rulethickness=\linewidth,
- \c!rulecolor=,
- \c!color=]
-
-\def\cpos#1#2%
- {\iftrialtypesetting
- #2%
- \else
- \bgroup
- \globalpushmacro\dowithchemical
- \gdef\dowithchemical##1{\hpos{#1}{##1}\globalpopmacro\dowithchemical}%
- #2%
- \egroup
- \fi}
-
-\protect \endinput
-
-% \startchemical[axis=on,frame=yes]
-% \chemical[SIX,ROT2,B,R36,RZ6][CH_3]
-% \chemical[PB:RZ3,ONE,Z05,SB5,EP37,PE][O,H]
-% \stopchemical
-
-% \startchemical[size=big,scale=small,axis=on,frame=yes,factor=1.5]
-% \chemical[SIX,ROT2,B,R36,RZ6][CH_3]
-% \chemical[PB:RZ3,ONE,Z05,SB5,EP37,PE][O,H]
-% \stopchemical
-
-% \startchemical[size=big,scale=medium,axis=on,frame=yes,factor=1.5]
-% \chemical[SIX,ROT2,B,R36,RZ6][CH_3]
-% \chemical[PB:RZ3,ONE,Z05,SB5,EP37,PE][O,H]
-% \stopchemical
-
-% \startchemical[size=big,scale=big,axis=on,frame=yes,factor=1.5]
-% \chemical[SIX,ROT2,B,R36,RZ6][CH_3]
-% \chemical[PB:RZ3,ONE,Z05,SB5,EP37,PE][O,H]
-% \stopchemical
diff --git a/Master/texmf-dist/tex/context/base/rlxcache.rlx b/Master/texmf-dist/tex/context/base/rlxcache.rlx
deleted file mode 100644
index 006e5feac7b..00000000000
--- a/Master/texmf-dist/tex/context/base/rlxcache.rlx
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version='1.0 standalone='yes'?>
-
-<rl:manipulators>
-
- <rl:manipulator name='pdf' suffix='eps'>
- <rl:old><rl:value name='path'/>/<rl:value name='file' method='nosuffix'/>.eps</rl:old>
- <rl:new><rl:value name='cache' default='rlxcache'/>/<rl:value name='file' method='nosuffix'/>.pdf</rl:new>
- <rl:step>
- texmfstart pstopdf --convert
- --inputpath="<rl:value name='path'/>"
- --outputpath="<rl:value name='cache' default='.'/>"
- "<rl:value name='file' method='nosuffix'/>.eps"
- </rl:step>
- </rl:manipulator>
-
- <rl:manipulator name='pdf' suffix='svg'>
- <rl:old><rl:value name='path'/>/<rl:value name='file' method='nosuffix'/>.svg</rl:old>
- <rl:new><rl:value name='cache' default='rlxcache'/>/<rl:value name='file' method='nosuffix'/>.pdf</rl:new>
- <rl:step>
- texmfstart pstopdf --convert
- --inputpath="<rl:value name='path'/>"
- --outputpath="<rl:value name='cache' default='.'/>"
- "<rl:value name='file' method='nosuffix'/>.svg"
- </rl:step>
- </rl:manipulator>
-
- <rl:manipulator name='pdf' suffix='svgz'>
- <rl:old><rl:value name='path'/>/<rl:value name='file' method='nosuffix'/>.svgz</rl:old>
- <rl:new><rl:value name='cache' default='rlxcache'/>/<rl:value name='file' method='nosuffix'/>.pdf</rl:new>
- <rl:step>
- texmfstart pstopdf --convert
- --inputpath="<rl:value name='path'/>"
- --outputpath="<rl:value name='cache' default='.'/>"
- "<rl:value name='file' method='nosuffix'/>.svgz"
- </rl:step>
- </rl:manipulator>
-
- <rl:manipulator name='pdf' suffix='gif'>
- <rl:old><rl:value name='path'/>/<rl:value name='file' method='nosuffix'/>.gif</rl:old>
- <rl:new><rl:value name='cache' default='rlxcache'/>/<rl:value name='file' method='nosuffix'/>.pdf</rl:new>
- <rl:step>
- texmfstart pstopdf --convert
- --inputpath="<rl:value name='path'/>"
- --outputpath="<rl:value name='cache' default='.'/>"
- "<rl:value name='file' method='nosuffix'/>.gif"
- </rl:step>
- </rl:manipulator>
-
- <rl:manipulator name='pdf' suffix='tif'>
- <rl:old><rl:value name='path'/>/<rl:value name='file' method='nosuffix'/>.tif</rl:old>
- <rl:new><rl:value name='cache' default='rlxcache'/>/<rl:value name='file' method='nosuffix'/>.pdf</rl:new>
- <rl:step>
- texmfstart pstopdf --convert
- --inputpath="<rl:value name='path'/>"
- --outputpath="<rl:value name='cache' default='.'/>"
- "<rl:value name='file' method='nosuffix'/>.tif"
- </rl:step>
- </rl:manipulator>
-
- <rl:manipulator name='pdf' suffix='tiff'>
- <rl:old><rl:value name='path'/>/<rl:value name='file' method='nosuffix'/>.tiff</rl:old>
- <rl:new><rl:value name='cache' default='rlxcache'/>/<rl:value name='file' method='nosuffix'/>.pdf</rl:new>
- <rl:step>
- texmfstart pstopdf --convert
- --inputpath="<rl:value name='path'/>"
- --outputpath="<rl:value name='cache' default='.'/>"
- "<rl:value name='file' method='nosuffix'/>.tiff"
- </rl:step>
- </rl:manipulator>
-
-</rl:manipulators>
diff --git a/Master/texmf-dist/tex/context/base/rlxtools.rlx b/Master/texmf-dist/tex/context/base/rlxtools.rlx
deleted file mode 100644
index b230c6d5b54..00000000000
--- a/Master/texmf-dist/tex/context/base/rlxtools.rlx
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version='1.0 standalone='yes'?>
-
-<rl:manipulators>
-
- <!-- normally the file tag will also have a suffix! -->
-
- <!-- pstopdf will be made independent of the example framework -->
-
- <!-- rl:manipulator name='pdf' suffix='svg'>
- <rl:old><rl:value name='path'/>/<rl:value name='file'/></rl:old>
- <rl:new><rl:value name='path'/>/<rl:value name='prefix'/><rl:value name='file' method='nosuffix'/>.pdf</rl:new>
- <rl:step>
- inkscape
- --without-gui
- --print="&gt;<rl:value name='path'/>/<rl:value name='prefix'/><rl:value name='file' method='nosuffix'/>.ps"
- <rl:value name='path'/>/<rl:value name='file' method='nosuffix'/>.svg
- </rl:step>
- <rl:step>
- texmfstart pstopdf
- <rl:value name='path'/>/<rl:value name='prefix'/><rl:value name='file' method='nosuffix'/>.ps
- <rl:value name='path'/>/<rl:value name='prefix'/><rl:value name='file' method='nosuffix'/>.pdf
- </rl:step>
- </rl:manipulator -->
-
- <!-- rl:manipulator name='pdf' suffix='svgz'>
- <rl:old><rl:value name='path'/>/<rl:value name='file'/></rl:old>
- <rl:new><rl:value name='path'/>/<rl:value name='prefix'/><rl:value name='file' method='nosuffix'/>.pdf</rl:new>
- <rl:step>
- inkscape
- --without-gui
- --print="&gt;<rl:value name='path'/>/<rl:value name='prefix'/><rl:value name='file' method='nosuffix'/>.ps"
- <rl:value name='path'/>/<rl:value name='file' method='nosuffix'/>.svgz
- </rl:step>
- <rl:step>
- texmfstart pstopdf
- <rl:value name='path'/>/<rl:value name='prefix'/><rl:value name='file' method='nosuffix'/>.ps
- <rl:value name='path'/>/<rl:value name='prefix'/><rl:value name='file' method='nosuffix'/>.pdf
- </rl:step>
- </rl:manipulator -->
-
- <rl:manipulator name='pdf' suffix='eps'>
- <rl:old><rl:value name='path'/>/<rl:value name='file' method='nosuffix'/>.eps</rl:old>
- <rl:new><rl:value name='path'/>/<rl:value name='prefix'/><rl:value name='file' method='nosuffix'/>.pdf</rl:new>
- <rl:step>
- texmfstart pstopdf --convert
- <rl:value name='old'/>
- </rl:step>
- </rl:manipulator>
-
- <rl:manipulator name='pdf' suffix='svg'>
- <rl:old><rl:value name='path'/>/<rl:value name='file' method='nosuffix'/>.svg</rl:old>
- <rl:new><rl:value name='path'/>/<rl:value name='prefix'/><rl:value name='file' method='nosuffix'/>.pdf</rl:new>
- <rl:step>
- texmfstart pstopdf --convert
- <rl:value name='old'/>
- <rl:value name='new'/>
- </rl:step>
- </rl:manipulator>
-
- <rl:manipulator name='pdf' suffix='svgz'>
- <rl:old><rl:value name='path'/>/<rl:value name='file' method='nosuffix'/>.svgz</rl:old>
- <rl:new><rl:value name='path'/>/<rl:value name='prefix'/><rl:value name='file' method='nosuffix'/>.pdf</rl:new>
- <rl:step>
- texmfstart pstopdf --convert
- <rl:value name='old'/>
- <rl:value name='new'/>
- </rl:step>
- </rl:manipulator>
-
- <rl:manipulator name='lowres' suffix='pdf'>
- <rl:old><rl:value name='path'/>/<rl:value name='file'/></rl:old>
- <rl:new><rl:value name='path'/>/<rl:value name='prefix'/><rl:value name='file'/></rl:new>
- <rl:step>
- texmfstart pstopdf --convert --method=4
- --inputpath=<rl:value name='path'/>
- --outputpath=<rl:value name='path'/>/<rl:value name='prefix'/>
- <rl:value name='file'/>
- </rl:step>
- </rl:manipulator>
-
- <rl:manipulator name='medres' suffix='pdf'>
- <rl:old><rl:value name='path'/>/<rl:value name='file'/></rl:old>
- <rl:new><rl:value name='path'/>/<rl:value name='prefix'/><rl:value name='file'/></rl:new>
- <rl:step>
- texmfstart pstopdf --convert --method=4
- --inputpath=<rl:value name='path'/>
- --outputpath=<rl:value name='path'/>/<rl:value name='prefix'/>
- <rl:value name='file'/>
- </rl:step>
- </rl:manipulator>
-
- <rl:manipulator name='pdf' suffix='gif'>
- <rl:old><rl:value name='path'/>/<rl:value name='file' method='nosuffix'/>.gif</rl:old>
- <rl:new><rl:value name='cache' default='.'/>/<rl:value name='file' method='nosuffix'/>.pdf</rl:new>
- <rl:step>
- texmfstart pstopdf --convert
- --inputpath=<rl:value name='path'/>
- --outputpath=<rl:value name='cache' default='.'/>
- <rl:value name='file' method='nosuffix'/>.gif
- </rl:step>
- </rl:manipulator>
-
- <rl:manipulator name='pdf' suffix='tif'>
- <rl:old><rl:value name='path'/>/<rl:value name='file' method='nosuffix'/>.tif</rl:old>
- <rl:new><rl:value name='cache' default='.'/>/<rl:value name='file' method='nosuffix'/>.pdf</rl:new>
- <rl:step>
- texmfstart pstopdf --convert
- --inputpath=<rl:value name='path'/>
- --outputpath=<rl:value name='cache' default='.'/>
- <rl:value name='file' method='nosuffix'/>.tif
- </rl:step>
- </rl:manipulator>
-
- <rl:manipulator name='pdf' suffix='tiff'>
- <rl:old><rl:value name='path'/>/<rl:value name='file' method='nosuffix'/>.tiff</rl:old>
- <rl:new><rl:value name='cache' default='.'/>/<rl:value name='file' method='nosuffix'/>.pdf</rl:new>
- <rl:step>
- texmfstart pstopdf --convert
- --inputpath=<rl:value name='path'/>
- --outputpath=<rl:value name='cache' default='.'/>
- <rl:value name='file' method='nosuffix'/>.tiff
- </rl:step>
- </rl:manipulator>
-
- <rl:manipulator name='cropped' suffix='pdf'>
- <rl:old><rl:value name='path'/>/<rl:value name='file'/></rl:old>
- <rl:new><rl:value name='path'/>/<rl:value name='prefix'/><rl:value name='file'/></rl:new>
- <rl:step>
- texmfstart pstopdf --convert --method=3
- --inputpath=<rl:value name='path'/>
- --outputpath=<rl:value name='path'/>/<rl:value name='prefix'/>
- <rl:value name='file'/>
- </rl:step>
- </rl:manipulator>
-
-</rl:manipulators>
diff --git a/Master/texmf-dist/tex/context/base/s-abr-01.tex b/Master/texmf-dist/tex/context/base/s-abr-01.tex
deleted file mode 100644
index 00a1a5c1e2f..00000000000
--- a/Master/texmf-dist/tex/context/base/s-abr-01.tex
+++ /dev/null
@@ -1,370 +0,0 @@
-%D \module
-%D [ file=s-abr-01,
-%D version=1996.01.01,
-%D title=\CONTEXT\ Style File,
-%D subtitle=General Abbreviations 1,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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
-
-\setupsorting[logo][\c!style=\v!capital]
-
-\setupcapitals[\c!title=\v!no]
-
-\protect
-
-\logo [MKI] {MkI} % joke
-\logo [MKII] {MkII}
-\logo [MKIII] {MkIII} % joke
-\logo [MKIV] {MkIV}
-\logo [MKVI] {MkVI}
-\logo [MKIX] {MkIX}
-\logo [MKXI] {MkXI}
-\logo [MKIC] {MkIC}
-\logo [MKCI] {MkCI}
-\logo [MPII] {MpII}
-\logo [MPIV] {MpIV}
-
-%logo [FGA] {fga}
-%logo [FGBBS] {fgbbs}
-\logo [ACROBAT] {Acro\-bat}
-\logo [APA] {apa}
-\logo [AFM] {afm}
-\logo [API] {api}
-\logo [ALEPH] {Aleph} % {\mathematics{\aleph}}
-\logo [ALGOL] {ALGOL}
-\logo [AMS] {ams}
-\logo [AMSLATEX] {\AmSLaTeX}
-\logo [AMSTEX] {\AmSTeX}
-\logo [ANSI] {ansi}
-\logo [ARABTEX] {Arab\TeX}
-\logo [ASCII] {ascii}
-\logo [ASCIITEX] {ascii\TeX}
-\logo [ASCIIMATH] {AsciiMath}
-\logo [BACHOTEX] {Bacho\TeX}
-\logo [BIBTEX] {bib\TeX}
-\logo [MLBIBTEX] {MLbib\TeX}
-\logo [BLUESKY] {BlueSky}
-\logo [BMP] {bmp}
-\logo [BSD] {bsd}
-\logo [CCODE] {C}
-\logo [CPLUSPLUS] {C\high{++}}
-\logo [CALCMATH] {CalcMath}
-\logo [CLD] {cld}
-\logo [CD] {cd}
-\logo [CPU] {cpu}
-\logo [CDROM] {cdrom}
-\logo [CID] {cid}
-\logo [CJK] {cjk}
-\logo [CMR] {cmr}
-\logo [CLD] {cld}
-\logo [CMYK] {cmyk}
-\logo [CODHOST] {CodHost}
-\logo [CONTEXT] {\ConTeXt}
-\logo [CONTEXTWIKI] {\ConTeXt\ Wiki}
-\logo [CONTEXTGROUP] {\ConTeXt\ Group}
-\logo [CSS] {css}
-\logo [CTAN] {ctan}
-\logo [CTXTOOLS] {ctxtools}
-\logo [CWEB] {cweb}
-\logo [CSTUG] {cstug}
-\logo [DANTE] {Dante}
-\logo [DISTILLER] {distiller}
-\logo [DRATEX] {Dra\TeX}
-\logo [DSC] {dsc}
-\logo [DTD] {dtd}
-\logo [DTK] {dtk}
-\logo [DTP] {dtp}
-\logo [DVD] {dvd}
-\logo [DVI] {dvi}
-\logo [DVIPDFM] {dvipdfm}
-\logo [DVIPDFMX] {dvipdfmx}
-\logo [DVIPOS] {dvipos}
-\logo [DVIPS] {dvips}
-\logo [DVIPSONE] {dvipsone}
-\logo [DVISCR] {dviscr}
-\logo [DVIWINDO] {dviwindo}
-\logo [EBCDIC] {ebcdic}
-\logo [EC] {ec}
-\logo [EIFFEL] {Eiffel}
-\logo [EMACS] {emacs}
-\logo [EMTEX] {em\TeX}
-\logo [ENCODING] {enc}
-\logo [ENCTEX] {enc\TeX}
-\logo [EPUB] {ePub}
-\logo [EPS] {eps}
-\logo [ETEX] {\eTeX}
-\logo [EUROBACHOTEX] {EuroBacho\TeX}
-\logo [EUROMATH] {EuroMath}
-\logo [EUROTEX] {Euro\TeX}
-\logo [EXAMPLE] {eXaMpLe}
-\logo [EXAMPLED] {exampled}
-\logo [EXAMPLEQ] {exampleq}
-\logo [EXAMPLER] {exampler}
-\logo [EXAMPLET] {examplet}
-\logo [EXAMPLEX] {examplex}
-\logo [EXIMPLE] {eXiMpLe}
-\logo [FLAC] {flac}
-\logo [FAQ] {faq}
-\logo [FDF] {fdf}
-\logo [FONTFORGE] {FontForge}
-\logo [FOXET] {foXet}
-\logo [FPTEX] {fp\TeX}
-\logo [FREEBSD] {FreeBSD}
-\logo [FTP] {ftp}
-\logo [GHOSTSCRIPT] {Ghost\-script}
-\logo [GHOSTVIEW] {Ghost\-view}
-\logo [GIF] {gif}
-\logo [GNU] {gnu}
-\logo [GNUPLOT] {gnuplot}
-\logo [GS] {Ghost\-Script}
-\logo [GUST] {Gust}
-\logo [GCC] {gcc}
-\logo [GWTEX] {gw\TeX}
-\logo [HSB] {hsb}
-\logo [HTML] {html}
-\logo [HTTP] {http}
-\logo [HZ] {hz}
-\logo [IBM] {ibm}
-\logo [IMAGEMAGICK] {ImageMagick}
-\logo [INITEX] {ini\TeX}
-\logo [INRSTEX] {inrs\TeX}
-\logo [IO] {io}
-\logo [IRCNET] {IRCnet}
-\logo [ISO] {iso}
-\logo [JAVA] {Java}
-\logo [JAVASCRIPT] {Java\-Script}
-\logo [JPEG] {jpeg}
-\logo [JPG] {jpg}
-\logo [JBIG] {jbig}
-\logo [KPATHSEA] {kpathsea}
-\logo [KPSE] {kpse}
-\logo [KVM] {kvm}
-\logo [KPSEWHICH] {kpsewhich}
-\logo [MKTEXLSR] {mktexlsr}
-\logo [MYSQL] {MySQL}
-\logo [LAMSTEX] {\LamSTeX}
-\logo [LATEX] {\LaTeX}
-\logo [LATEXTE] {\LaTeX2e}
-\logo [LATEXTN] {\LaTeX2.09}
-\logo [LCD] {lcd}
-\logo [LINUX] {linux}
-\logo [LISP] {Lisp}
-\logo [LPEG] {lpeg}
-\logo [LUA] {Lua}
-\logo [LUAJIT] {LuaJIT}
-\logo [LUAJITTEX] {Luajit\TeX}
-\logo [LUATEX] {Lua\TeX}
-\logo [LUATOOLS] {luatools}
-\logo [LMX] {lmx}
-\logo [MACOSX] {MacOSX}
-\logo [MACROTEX] {Macro\TeX}
-\logo [MAKEMPY] {MakeMPY}
-\logo [MAPPING] {map}
-\logo [MAPS] {Maps}
-\logo [MATHML] {MathML}
-\logo [METAFONT] {\MetaFont}
-\logo [METAPOST] {\MetaPost}
-\logo [METATEX] {Meta\TeX}
-\logo [MIKTEX] {Mik\TeX}
-\logo [MINGW] {MingW}
-\logo [MLTEX] {ml\TeX}
-\logo [METATYPE] {MetaType1}
-\logo [MODULA] {Modula}
-\logo [MOV] {mov}
-\logo [MPS] {mps}
-\logo [MPTOPDF] {mptopdf}
-\logo [MPLIB] {mplib}
-\logo [MSDOS] {msdos}
-\logo [MICROSOFT] {Microsoft}
-\logo [MSWINDOWS] {MS~Windows}
-\logo [MSWORD] {MS~Word}
-\logo [MTXRUN] {mtxrun}
-\logo [MTXTOOLS] {mtxtools}
-\logo [NETPBM] {NetPBM}
-\logo [NTG] {ntg}
-\logo [NTS] {nts}
-\logo [OFM] {ofm}
-\logo [OMEGA] {Omega}
-\logo [OPENMATH] {OpenMath}
-\logo [OPENTYPE] {OpenType}
-\logo [OPI] {opi}
-\logo [OTEX] {Oriental \TeX}
-\logo [OTF] {otf}
-\logo [OTP] {otp}
-\logo [OVF] {ovf}
-\logo [PASCAL] {Pascal}
-\logo [PCTEX] {pc\TeX}
-\logo [PFA] {pfa}
-\logo [PFB] {pfb}
-\logo [PDF] {pdf}
-\logo [PDFETEX] {pdfe\TeX}
-\logo [PDFTEX] {pdf\TeX}
-\logo [PDFTOOLS] {pdftools}
-\logo [PDFTOPS] {pdftops}
-\logo [PERL] {Perl}
-\logo [PERLTK] {Perl/Tk}
-\logo [PICTEX] {\PiCTeX}
-\logo [PK] {pk}
-\logo [PLAIN] {Plain}
-\logo [PNG] {png}
-\logo [POSIX] {posix}
-\logo [POSTSCRIPT] {Post\-Script}
-\logo [PPCHTEX] {\PPCHTeX}
-\logo [PRAGMA] {Pragma ADE}
-\logo [PRESS] {press}
-\logo [PRIFIL] {prifil}
-\logo [PS] {Post\-Script}
-\logo [PSCHECK] {pscheck}
-\logo [PSTOEDIT] {pstoedit}
-\logo [PSTOPAGE] {pstopage}
-\logo [PSTOPDF] {pstopdf}
-\logo [PSTRICKS] {pstricks}
-\logo [RAM] {ram}
-\logo [READER] {Acro\-bat Reader}
-\logo [RELAXNG] {Relax\kern.125emNG}
-\logo [RGB] {rgb}
-\logo [RLXTOOLS] {rlxtools}
-\logo [RUBY] {Ruby}
-\logo [SCITE] {SciTE}
-\logo [SGML] {sgml}
-\logo [SI] {si}
-\logo [SQL] {sql}
-\logo [SSD] {ssd}
-\logo [SVG] {svg}
-\logo [STIX] {Stix}
-\logo [SUMATRAPDF] {SumatraPDF}
-\logo [SWIG] {swig}
-\logo [SWIGLIB] {SwigLib}
-\logo [TABLE] {\TaBlE}
-\logo [TCPIP] {tcp/ip}
-\logo [TDS] {tds} % no sc te
-\logo [TEI] {tei} % no sc te
-\logo [TETEX] {te\TeX} % no sc te
-\logo [TEX] {\TeX}
-\logo [TEXADRES] {\TeX adress}
-\logo [TEXBASE] {\TeX base}
-\logo [TEXEDIT] {\TeX edit}
-\logo [TEXEXEC] {\TeX exec}
-\logo [TEXFONT] {\TeX font}
-\logo [TEXFORM] {\TeX form}
-\logo [TEXLIVE] {\TeX Live}
-\logo [TEXLUA] {\TeX Lua}
-\logo [TEXMF] {texmf}
-\logo [TEXMFSTART] {texmfstart}
-\logo [TEXNL] {tex-nl}
-\logo [TEXSHOW] {\TeX show}
-\logo [TEXSPELL] {\TeX spell}
-\logo [TEXGYRE] {\TeX\ Gyre}
-\logo [TEXSYNC] {texsync}
-\logo [TEXTMATE] {TextMate}
-\logo [TEXTOOLS] {\TeX tools}
-\logo [TEXUTIL] {\TeX util}
-\logo [TEXWORK] {\TeX work}
-\logo [TEXWORKS] {\TeX works}
-\logo [TEXXET] {\TeX\XeT} \def\XeT{XeT}
-\logo [TFM] {tfm}
-\logo [TIF] {tif}
-\logo [TIFF] {tiff}
-\logo [TIFFINFO] {tiffinfo}
-\logo [TIFFTAGS] {tifftags}
-\logo [TMFTOOLS] {tmftools}
-\logo [TPIC] {tpic}
-\logo [TPM] {tpm}
-\logo [TRUETYPE] {TrueType}
-\logo [TTC] {ttc}
-\logo [TTF] {ttf}
-\logo [TUG] {tug}
-\logo [TUGBOAT] {Tug\-Boat}
-\logo [TUGNEWS] {Tug\-News}
-\logo [TYPEONE] {Type1}
-\logo [UCS] {ucs}
-\logo [UNICODE] {Uni\-code}
-\logo [UNIX] {Unix}
-\logo [URI] {uri}
-\logo [URL] {url}
-\logo [USA] {usa}
-\logo [USENET] {usenet}
-\logo [UTF] {utf}
-\logo [USB] {usb}
-\logo [VF] {vf}
-\logo [WDT] {wdt}
-\logo [WEB] {web}
-\logo [WEBC] {web2c}
-\logo [WIKI] {Wiki}
-\logo [WINDOWS] {Windows}
-\logo [WINNT] {WinNT}
-\logo [WINNX] {Win9x}
-\logo [WWW] {www}
-\logo [WTHREEC] {W3C}
-\logo [WYSIWYG] {wysiwyg}
-\logo [XDVI] {Xdvi}
-\logo [XETEX] {\XeTeX}
-\logo [XFDF] {xfdf}
-\logo [XHTML] {xhtml}
-\logo [XINDY] {Xindy}
-\logo [XITS] {Xits}
-\logo [XML] {xml}
-\logo [XPATH] {xpath}
-\logo [XMLTOOLS] {xmltools}
-\logo [XPDFETEX] {xpdfe\TeX}
-\logo [XSL] {xsl}
-\logo [XSLFO] {xsl-fo}
-\logo [XSLT] {xslt}
-\logo [XSLTPROC] {xsltproc}
-\logo [XYPIC] {XYPIC} % wrong logo
-\logo [VMWARE] {VMWare}
-\logo [YandY] {y\&y}
-\logo [ZIP] {zip}
-
-\def\METAFUN {\MetaFun}
-
-\logo [METAFUN] {\MetaFun}
-
-\def\SystemSpecialA#1{$\langle\it#1\rangle$}
-\def\SystemSpecialB#1{{\tttf<#1>}}
-
-\unexpanded\def\CATCODE {\SystemSpecialA{catcode}}
-\unexpanded\def\CATCODES {\SystemSpecialA{catcodes}}
-\unexpanded\def\DIMENSION {\SystemSpecialA{dimension}}
-\unexpanded\def\DIMENSIONS {\SystemSpecialA{dimensions}}
-\unexpanded\def\COUNTER {\SystemSpecialA{counter}}
-\unexpanded\def\COUNTERS {\SystemSpecialA{counters}}
-\unexpanded\def\HBOX {\SystemSpecialA{hbox}}
-\unexpanded\def\HBOXES {\SystemSpecialA{hboxes}}
-\unexpanded\def\VBOX {\SystemSpecialA{vbox}}
-\unexpanded\def\VBOXES {\SystemSpecialA{vboxes}}
-\unexpanded\def\BOX {\SystemSpecialA{box}}
-\unexpanded\def\BOXES {\SystemSpecialA{boxes}}
-\unexpanded\def\TOKENLIST {\SystemSpecialA{token list}}
-\unexpanded\def\TOKENLISTS {\SystemSpecialA{token lists}}
-\unexpanded\def\NEWLINE {\SystemSpecialA{newline}}
-\unexpanded\def\SKIP {\SystemSpecialA{skip}}
-\unexpanded\def\SKIPS {\SystemSpecialA{skips}}
-\unexpanded\def\MUSKIP {\SystemSpecialA{muskip}}
-\unexpanded\def\MUSKIPS {\SystemSpecialA{muskips}}
-\unexpanded\def\MARK {\SystemSpecialA{mark}}
-\unexpanded\def\MARKS {\SystemSpecialA{marks}}
-
-\unexpanded\def\SPACE {\SystemSpecialB{space}}
-\unexpanded\def\EOF {\SystemSpecialB{eof}}
-\unexpanded\def\TAB {\SystemSpecialB{tab}}
-\unexpanded\def\NEWPAGE {\SystemSpecialB{newpage}}
-\unexpanded\def\NEWLINE {\SystemSpecialB{newline}}
-
-\unexpanded\def\LUWATEEKH {Ù„Ùواتيخ} % kh Ä« t Ä w [u] l
-\unexpanded\def\luwateekh {luwÄtÄ«kh}
-
-\doifmodeelse {mkiv} {
- \unexpanded\def\THANH{H\agrave n Th\ecircumflexacute\ Th\agrave nh}
-} {
- \unexpanded\def\THANH{H\`an Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh}
-}
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/s-abr-02.tex b/Master/texmf-dist/tex/context/base/s-abr-02.tex
deleted file mode 100644
index 8bb6a28986a..00000000000
--- a/Master/texmf-dist/tex/context/base/s-abr-02.tex
+++ /dev/null
@@ -1,22 +0,0 @@
-%D \module
-%D [ file=s-abr-02,
-%D version=1996.01.01,
-%D title=\CONTEXT\ Style File,
-%D subtitle=General Abbreviations 2,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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[abr-01]
-
-\unprotect
-
-\setupsorting[logo][\c!style=\v!smallcaps]
-
-\setupcapitals[\c!title=\v!no]
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/s-abr-03.tex b/Master/texmf-dist/tex/context/base/s-abr-03.tex
deleted file mode 100644
index 8247b68a916..00000000000
--- a/Master/texmf-dist/tex/context/base/s-abr-03.tex
+++ /dev/null
@@ -1,22 +0,0 @@
-%D \module
-%D [ file=s-abr-03,
-%D version=1998.08.10,
-%D title=\CONTEXT\ Style File,
-%D subtitle=General Abbreviations 3,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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[abr-01]
-
-\unprotect
-
-\setupsorting[logo][\c!style=\v!WORD]
-
-\protect
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/s-abr-04.tex b/Master/texmf-dist/tex/context/base/s-abr-04.tex
deleted file mode 100644
index 23940b52629..00000000000
--- a/Master/texmf-dist/tex/context/base/s-abr-04.tex
+++ /dev/null
@@ -1,24 +0,0 @@
-%D \module
-%D [ file=s-abr-04,
-%D version=1996.01.01,
-%D title=\CONTEXT\ Style File,
-%D subtitle=General Abbreviations 2,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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[abr-01]
-
-\unprotect
-
-% \definealternativestyle [\v!mixed] [\font_style_pseudoMixedCapped] [\font_style_pseudoMixedCapped]
-
-\setupsorting[logo][\c!style=\font_style_pseudoMixedCapped]
-
-% \setupcapitals[\c!title=\v!no]
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/s-art-01.mkiv b/Master/texmf-dist/tex/context/base/s-art-01.mkiv
deleted file mode 100644
index 601ee1adc80..00000000000
--- a/Master/texmf-dist/tex/context/base/s-art-01.mkiv
+++ /dev/null
@@ -1,62 +0,0 @@
-\unprotect
-
-\startmodule[art-01]
-
-\definemeasure [article:margin] [\paperheight/20] % was 15, see xtables-mkiv for results
-\definemeasure [overview:margin] [\paperheight/30]
-
-\definelayout
- [article]
- [\c!topspace=\measure{article:margin},
- \c!bottomspace=\measure{article:margin},
- \c!backspace=\measure{article:margin},
- \c!header=\measure{article:margin},
- \c!footer=0pt,
- \c!width=\v!middle,
- \c!height=\v!middle]
-
-
-\definelayout
- [overview]
- [\c!topspace=\measure{overview:margin},
- \c!bottomspace=\measure{overview:margin},
- \c!backspace=\measure{overview:margin},
- \c!header=\measure{overview:margin},
- \c!footer=0pt,
- \c!width=\v!middle,
- \c!height=\v!middle]
-
-\setuplayout
- [article]
-
-\setupbodyfont
- [dejavu,10pt] % 12pt is just to large and we use this for all kind of demos
-
-\setupwhitespace
- [\v!big]
-
-\setuphead
- [\v!chapter]
- [\c!style=\bfc,
- \c!headerstate=\v!high,
- \c!interaction=\v!all]
-
-\setuphead
- [\v!section]
- [\c!style=\bfb]
-
-\setuphead
- [\v!subsection]
- [\c!style=\bfa]
-
-\setuphead
- [\v!subsubsection]
- [\c!style=\bf,
- \c!after=]
-
-\setuplist
- [\c!interaction=\v!all]
-
-\protect
-
-\stopmodule
diff --git a/Master/texmf-dist/tex/context/base/s-cdr-01.tex b/Master/texmf-dist/tex/context/base/s-cdr-01.tex
deleted file mode 100644
index b0bced9da09..00000000000
--- a/Master/texmf-dist/tex/context/base/s-cdr-01.tex
+++ /dev/null
@@ -1,145 +0,0 @@
-%D \module
-%D [ file=s-cdr-01,
-%D version=2001.2.07, % maybe earlier
-%D title=\CONTEXT\ Style File,
-%D subtitle=CDROM Cover,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\startmodule[cdr-01]
-
-\setupmodule[cdr-01][option=]
-
-\def\PDFMPformoffset{20cm}
-
-\definepapersize
- [CDcover]
- [width=12.5cm,
- height=12.4cm]
-
-\definelayout
- [CDcover]
- [topspace=5mm,
- backspace=5mm,
- header=0pt,
- footer=0pt,
- width=middle,
- height=middle]
-
-\setuparranging
- [2SIDE]
-
-\setuppapersize
- [CDcover]
- [A4,landscape]
-
-\setuplayout
- [CDcover]
-
-\setuplayout
- [location=middle]
-
-\setupcolors
- [state=start]
-
-\setupbackgrounds
- [leftpage]
- [background=leftcover]
-
-\setupbackgrounds
- [rightpage]
- [background=rightcover]
-
-\setuppagenumbering
- [alternative=doublesided]
-
-\defineoverlay[leftcover] [\useMPgraphic{leftcover}]
-\defineoverlay[rightcover][\useMPgraphic{rightcover}]
-
-\definecolor [cd-color] [s=0]
-\definemeasure[cd-linewidth][.4pt]
-
-\doif {\moduleparameter{cdr-01}{option}} {light} {
- \definecolor [cd-color] [s=.85]
- \definemeasure[cd-linewidth][.2pt]
-}
-
-\startuseMPgraphic{leftcover}
- StartPage ;
- pickup pencircle scaled \measure{cd-linewidth} ;
- draw
- bottomboundary Page &
- rightboundary Page &
- topboundary Page withcolor \MPcolor{cd-color} ;
- draw
- bottomboundary (Page enlarged 3mm) &
- rightboundary (Page enlarged 3mm) &
- topboundary (Page enlarged 3mm) dashed evenly withcolor \MPcolor{cd-color} ;
- StopPage ;
-\stopuseMPgraphic
-
-\startuseMPgraphic{rightcover}
- StartPage ;
- pickup pencircle scaled \measure{cd-linewidth} ;
- draw
- topboundary Page &
- leftboundary Page &
- bottomboundary Page withcolor \MPcolor{cd-color} ;
- draw
- topboundary (Page enlarged 3mm) &
- leftboundary (Page enlarged 3mm) &
- bottomboundary (Page enlarged 3mm) dashed evenly withcolor \MPcolor{cd-color} ;
- draw
- bottomboundary Page --
- lrcorner Page shifted (-5mm,-1cm) --
- llcorner Page shifted ( 5mm,-1cm) -- cycle withcolor \MPcolor{cd-color} ;
- draw
- topboundary Page --
- ulcorner Page shifted ( 5mm, 1cm) --
- urcorner Page shifted (-5mm, 1cm) -- cycle withcolor \MPcolor{cd-color} ;
- StopPage ;
- setbounds currentpicture to Page ;
-\stopuseMPgraphic
-
-\setupmakeup
- [standard]
- [doublesided=no,page=]
-
-\setuplayout
- [topspace=5mm,
- backspace=5mm,
- header=0pt,
- footer=0pt,
- width=middle,
- height=middle]
-
-\defineframedtext
- [maintext]
- [background={foreground,color},
- backgroundcolor=a-bit-white,
- frame=off,
- before=,
- after=,
- align=right,
- strut=no,
- height=fit,
- width=\textheight]
-
-\stopmodule
-
-\doifnotmode{demo}{\endinput}
-
-\starttext
- \startstandardmakeup
- page 1
- \stopstandardmakeup
-
- \startstandardmakeup
- page 2
- \stopstandardmakeup
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-chi-00.mkii b/Master/texmf-dist/tex/context/base/s-chi-00.mkii
deleted file mode 100644
index fb8d47603be..00000000000
--- a/Master/texmf-dist/tex/context/base/s-chi-00.mkii
+++ /dev/null
@@ -1,76 +0,0 @@
-%D \module
-%D [ file=s-chi-00,
-%D version=1999.12.21,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Basic Chinese Style,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D suggestions=Wang Lei,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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-chi.mkii % faster than \setupbodyfont[chi]
-
-\mainlanguage [cn]
-
-\unprotect
-
-\setupsection [\s!section-1] [\c!headconversion=\s!chinese]
-\setupsection [\s!section-2] [\c!headconversion=\s!chinese]
-\setupsection [\s!section-3] [\c!headconversion=\s!chinese]
-
-\setupsection [\s!section-2] [\v!appendix\c!conversion=]
-
-\setuphead [\v!chapter] [\c!distance=1.25em]
-\setuphead [\v!section] [\c!distance=1.25em]
-\setuphead [\v!subsection] [\c!distance=1.00em]
-
-\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]
-
-\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!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
-
-\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
-
-\setuptyping[\c!tab=\v!no]
-
-%D This module (and font support) adapts to the \UTF\ regime, but you
-%D need to enable \UTF\ first!
-%D
-%D \starttyping
-%D \enableregime[utf] \usemodule[chi-00]
-%D
-%D \starttext
-%D
-%D 兡也包因沘氓侷柵苗孫孫財
-%D 崧淫設弼ç¶è·‘æ„窟榜蒸奭稽
-%D 霄瓢館縲擻鼕孃魔é‡ä½‰æ²Žå² 
-%D 狋垚柛胅娭涘罞åŸæƒˆç‰»èºå‚’
-%D 焱è酡廅滘絺赩塴榗箂踃å¬
-%D 澕蓴醊ç§èž—餟燱螬駸礑鎞瀧
-%D 鄿瀯騬醹躕鱕
-%D
-%D \blank
-%D
-%D Wang Lei is written as: 王磊
-%D
-%D \stoptext
-%D \stoptyping
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/s-def-01.mkiv b/Master/texmf-dist/tex/context/base/s-def-01.mkiv
deleted file mode 100644
index 49e585bd018..00000000000
--- a/Master/texmf-dist/tex/context/base/s-def-01.mkiv
+++ /dev/null
@@ -1,10 +0,0 @@
-% yes or no
-
-\unprotect
-
-\startsetups defaults:frontpart:pagenumbers:roman
- \defineconversionset[\c!frontpart:\c!pagenumber][][romannumerals]
- \setupuserpagenumber[\c!way=\v!by\v!block]
-\stopsetups
-
-\protect
diff --git a/Master/texmf-dist/tex/context/base/s-faq-00.tex b/Master/texmf-dist/tex/context/base/s-faq-00.tex
deleted file mode 100644
index 84055491f29..00000000000
--- a/Master/texmf-dist/tex/context/base/s-faq-00.tex
+++ /dev/null
@@ -1,93 +0,0 @@
-%D \module
-%D [ file=s-faq-00,
-%D version=1997.21.08,
-%D title=\CONTEXT\ Style File,
-%D subtitle=FAQ Common Macros,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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[abr-01]
-
-\defineblock[question]
-\defineblock[answer]
-
-\def\ScreenFAQ {fs-\TagOfFAQ-\LanguageOfFAQ}
-\def\PaperFAQ {fp-\TagOfFAQ-\LanguageOfFAQ}
-\def\FileNameOfFAQ {fa-\TagOfFAQ-\LanguageOfFAQ}
-
-\language
- [\HyphenationOfFAQ]
-
-\setupwhitespace
- [big]
-
-\setupbodyfont
- [ams]
-
-\setuptolerance
- [tolerant]
-
-\setupregister
- [index]
- [indicator=no]
-
-\setupframedtexts
- [width=\hsize]
-
-\setupblock
- [question]
- [before=\startframedtext,
- after=\stopframedtext]
-
-\setupblock
- [answer]
- [after=\EndAnswer]
-
-\def\EndAnswer {}
-
-\def\AuthorOfFAQ {}
-\def\IndexOfFAQ {}
-
-\def\FrequentlyAskedQuestion#1#2%
- {\page
- \doglobal\increment\CurrentNOfFAQ
- \pagereference[faq:\CurrentNOfFAQ]
- \gdef\IndexOfFAQ{#1}
- \gdef\AuthorOfFAQ{#2}}
-
-\newcounter\CurrentNOfFAQ
-
-\setuplabeltext [nl] [FAQ=Vaak gestelde vragen]
-\setuplabeltext [du] [FAQ=Oft gestellte Fragen]
-\setuplabeltext [en] [FAQ=Frequently Asked Questions]
-
-\setuplabeltext [nl] [about=over]
-\setuplabeltext [du] [about=zu]
-\setuplabeltext [en] [about=about]
-
-\setuplabeltext [nl] [version=Versie]
-\setuplabeltext [du] [version=Version]
-\setuplabeltext [en] [version=Version]
-
-\setuplabeltext [nl] [goback=terug]
-\setuplabeltext [du] [goback=zur\"uck]
-\setuplabeltext [en] [goback=go back]
-
-\setuplabeltext [nl] [paper=papier]
-\setuplabeltext [du] [paper=Papier]
-\setuplabeltext [en] [paper=paper]
-
-\setuplabeltext [nl] [faqs=FAQ's]
-\setuplabeltext [du] [faqs=FAQs]
-\setuplabeltext [en] [faqs=FAQ's]
-
-\setuplabeltext [nl] [index=index]
-\setuplabeltext [du] [index=Index]
-\setuplabeltext [en] [index=index]
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/s-faq-01.tex b/Master/texmf-dist/tex/context/base/s-faq-01.tex
deleted file mode 100644
index f6ee3ce0618..00000000000
--- a/Master/texmf-dist/tex/context/base/s-faq-01.tex
+++ /dev/null
@@ -1,215 +0,0 @@
-%D \module
-%D [ file=s-faq-01,
-%D version=1997.21.08,
-%D title=\CONTEXT\ Style File,
-%D subtitle=FAQ Interactive Version,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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[faq-00]
-
-\setuppapersize
- [S6][S6]
-
-\setuplayout
- [topspace=.5cm,
- backspace=.5cm,
- margin=0pt,
- height=fit,
- header=0pt,
- width=fit,
- footer=0pt,
- bottomdistance=12pt,
- bottom=18pt]
-
-\setupinteractionscreen
- [width=fit,
- height=fit,
- option=max]
-
-\setupinteraction
- [state=start,
- page=yes,
- color=darkred,
- contrastcolor=black,
- menu=on]
-
-\setupcolors
- [state=start]
-
-\setupbackgrounds
- [state=repeat]
-
-\setupbackgrounds
- [page]
- [offset=3pt]
-
-\setupbackgrounds
- [text]
- [text]
- [background={screen,go-on}]
-
-\setupbackgrounds
- [bottom]
- [text]
- [background=screen]
-
-\setupframedtexts
- [background=MyFrame,
- backgroundcolor=white,
- framecolor=darkred,
- frame=overlay]
-
-\defineoverlay[go-on][\overlaybutton{forward}]
-
-\useexternaldocument
- [paperfaq]
- [\PaperFAQ]
- []
-
-\setupregister
- [index]
- [coupling=yes,
- unknownreference=none,
- interaction=text]
-
-\coupleregister
- [index]
-
-\defineinteractionmenu [bottom 1] [bottom] [state=stop]
-\defineinteractionmenu [bottom 2] [bottom] [state=stop]
-
-\setupinteractionmenu
- [bottom, bottom 1, bottom 2]
- [background=MyFrame,
- backgroundcolor=white,
- color=black,
- contrastcolor=black,
- frame=overlay,
- framecolor=darkred,
- dummy=yes,
- middle=\hskip1em,
- height=\bottomheight,
- distance=overlay]
-
-\setupinteractionmenu
- [bottom 1]
- [{\hfill},
- {\labeltext{paper}[paperfaq::]},
- {\labeltext{goback}[PreviousJump]},
- {\labeltext{faqs}[faqs]},
- {\labeltext{index}[index]},
- {\gobackwardcharacter[previouspage]},
- {\goforwardcharacter[nextpage]}]
-
-\setupinteractionmenu
- [bottom 2]
- [{\CurrentIndexOfFAQ},
- {\hfill},
- {\labeltext{paper}[paperfaq::faq:\CurrentNOfFAQ]},
- {\labeltext{goback}[PreviousJump]},
- {\labeltext{faqs}[faqs]},
- {\labeltext{index}[index]},
- {\gobackwardcharacter[previouspage]},
- {\goforwardcharacter[nextpage]}]
-
-\def\CurrentIndexOfFAQ%
- {\bgroup
- \setupinteraction[color=]%
- \menubox[bottom]%
- {\hskip-.5em\def\index{\hskip.5em\coupledindex}\IndexOfFAQ}%
- \egroup}
-
-\setupinteractionmenu
- [bottom 1]
- [state=start]
-
-\def\EndAnswer
- {\vfill
- \bgroup
- \tfx\setstrut
- \framed
- [frame=overlay,
- framecolor=darkred,
- background=MyFrame,
- backgroundcolor=white]
- {\AuthorOfFAQ}
- \egroup}
-
-\def\TitlePage
- {\startstandardmakeup
- \blank[3*big]
- \midaligned{\bfd \labeltext{FAQ}}
- \blank[3*big]
- \midaligned{\bfd \labeltext{about} \NameOfFAQ}
- \blank[3*big]
- \midaligned{\bfb \labeltext{version}: \currentdate}
- \blank[3*big]
- \midaligned{\tta \ListOfFAQ}
- \vfill
- \midaligned{\tta pragma@wxs.nl}
- \blank[3*big]
- \stopstandardmakeup}
-
-\def\StartReadingFAQ
- {\setupinteractionmenu[bottom 1][state=stop]
- \setupinteractionmenu[bottom 2][state=start]
- \page}
-
-\def\StopReadingFAQ
- {\page
- \setupinteractionmenu[bottom 2][state=stop]
- \setupinteractionmenu[bottom 1][state=start]}
-
-\def\FileWithFAQs
- {\StartReadingFAQ
- \input \FileNameOfFAQ \relax
- \StopReadingFAQ}
-
-\def\IndexPage
- {\page
- \def\CurrentIndexOfFAQ{}
- \def\NameOfFAQ{}
- \pagereference[index]
- \placeregister[index]
- \page}
-
-\def\BeginFAQ
- {\doglobal\increment\CurrentNOfFAQ
- \setbox0=\vbox\bgroup
- \setupframedtexts[before=,after=,linecorrection=off]
- \startframedtext}
-
-\def\EndFAQ
- {\stopframedtext
- \egroup
- \button
- [color=,contrastcolor=,frame=overlay,offset=overlay]
- {\copy0}
- [faq:\CurrentNOfFAQ]
- \vskip6pt}
-
-\def\AllFAQs
- {\page
- \def\CurrentIndexOfFAQ{}
- \def\NameOfFAQ{}
- \newcounter\CurrentNOfFAQ
- \setupblock[question][before=\BeginFAQ,after=\EndFAQ]
- \pagereference[faqs]
- \useblocks[question]}
-
-\startuniqueMPgraphic{Frame}
- path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
- pickup pencircle scaled 2pt ;
- fill p withcolor \MPcolor{\overlaycolor} ;
- draw p withcolor \MPcolor{\overlaylinecolor} ;
-\stopuniqueMPgraphic
-
-\defineoverlay[MyFrame][\uniqueMPgraphic{Frame}]
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/s-faq-02.tex b/Master/texmf-dist/tex/context/base/s-faq-02.tex
deleted file mode 100644
index 92aa1eca2de..00000000000
--- a/Master/texmf-dist/tex/context/base/s-faq-02.tex
+++ /dev/null
@@ -1,63 +0,0 @@
-%D \module
-%D [ file=s-faq-02,
-%D version=1997.21.08,
-%D title=\CONTEXT\ Style File,
-%D subtitle=FAQ Paper Version,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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[faq-00]
-
-\setuplayout
- [header=0pt]
-
-\setuppagenumbering
- [location=]
-
-\setupfootertexts
- [\labeltext{FAQ}: \NameOfFAQ\IndexOfFAQ][pagenumber]
-
-\def\EndAnswer%
- {\blank[2*big]
- \page[no]
- (\AuthorOfFAQ)}
-
-\def\TitlePage%
- {\startstandardmakeup
- \midaligned{\bfd \labeltext{FAQ}}
- \blank[3*big]
- \midaligned{\bfd \labeltext{about} \NameOfFAQ}
- \blank[3*big]
- \midaligned{\bfb \labeltext{version}: \currentdate}
- \blank[3*big]
- \midaligned{\tta \ListOfFAQ}
- \vfill
- \midaligned{\tta pragma@wxs.nl}
- \blank[3*big]
- \stopstandardmakeup}
-
-\def\StartReadingFAQ
- {\page}
-
-\def\StopReadingFAQ
- {\page}
-
-\def\FileWithFAQs
- {\StartReadingFAQ
- \input \FileNameOfFAQ \relax
- \StopReadingFAQ}
-
-\def\IndexPage
- {\page
- \setupfootertexts[\labeltext{index}][]
- \placeregister[index]}
-
-\def\AllFAQs
- {}
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/s-faq-03.tex b/Master/texmf-dist/tex/context/base/s-faq-03.tex
deleted file mode 100644
index b1e1ef2c2e0..00000000000
--- a/Master/texmf-dist/tex/context/base/s-faq-03.tex
+++ /dev/null
@@ -1,70 +0,0 @@
-%D \module
-%D [ file=s-faq-03,
-%D version=1997.21.08,
-%D title=\CONTEXT\ Style File,
-%D subtitle=FAQ General Framework,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\def\StartFAQ[#1]%
- {\getrawparameters[FAQ][name=,label=,language=,hyphenation=,url=,#1]
- \let\NameOfFAQ \FAQname
- \let\TagOfFAQ \FAQlabel
- \let\LanguageOfFAQ \FAQlanguage
- \let\HyphenationOfFAQ \FAQhyphenation
- \let\ListOfFAQ \FAQurl
- \doifmodeelse{screen}
- {\usemodule[faq-01]}
- {\usemodule[faq-02]}
- \starttext
- \TitlePage
- \StartReadingFAQ}
-
-\def\StopFAQ
- {\StopReadingFAQ
- \IndexPage
- \AllFAQs
- \stoptext}
-
-\def\ProcessFAQ[#1]%
- {\StartFAQ[#1]
- \input \FileNameOfFAQ \relax
- \StopFAQ}
-
-% for old times sake:
-
-\def\PDFscreenFAQ \name #1 \tag #2 \language #3 \hyphenation #4 \list #5
- {\def\NameOfFAQ {#1}
- \def\TagOfFAQ {#2}
- \def\LanguageOfFAQ {#3}
- \def\HyphenationOfFAQ {#4}
- \def\ListOfFAQ {#5}
- \usemodule[faq-01]
- \starttext
- \TitlePage
- \FileWithFAQs
- \IndexPage
- \AllFAQs
- \stoptext}
-
-\def\PDFpaperFAQ \name #1 \tag #2 \language #3 \hyphenation #4 \list #5
- {\def\NameOfFAQ {#1}
- \def\TagOfFAQ {#2}
- \def\LanguageOfFAQ {#3}
- \def\HyphenationOfFAQ {#4}
- \def\ListOfFAQ {#5}
- \usemodule[faq-02]
- \starttext
- \TitlePage
- \FileWithFAQs
- \IndexPage
- \stoptext}
-
-\let\DVIpaperFAQ\PDFscreenFAQ
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/s-figures-names.mkiv b/Master/texmf-dist/tex/context/base/s-figures-names.mkiv
deleted file mode 100644
index a2782efc95d..00000000000
--- a/Master/texmf-dist/tex/context/base/s-figures-names.mkiv
+++ /dev/null
@@ -1,99 +0,0 @@
-%D \module
-%D [ file=s-figures-names.mkiv,
-%D version=2017.07.17,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Show Figure Names,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Normally this module will be run someplace at the end of a document in some kind of tracing
-%D mode. We could hook it into \type {\stoptext} but better leave it up to the user. Loading
-%D this module upfront will not show anything useful. The main reason for making this module
-%D was that we wanted to report weird figurenames: spaces, multiple hyphens in a row, mixed
-%D hyphens and underscores, inconsistently mixed upper and lowercase, etc.
-%D
-%D If you only want info in the logfile, you can use:
-%D
-%D \starttyping
-%D \enabletrackers[graphics.lognames]
-%D \stoptyping
-%D
-%D This directive is persistent and can be issued any time before the end of the run.
-
-\startmodule[figures-names]
-
-\startluacode
-
-local context = context
-local ctx_NC = context.NC
-local ctx_NR = context.NR
-local ctx_red = context.red
-local ctx_starttabulate = context.starttabulate
-local ctx_stoptabulate = context.stoptabulate
-local ctx_hyphenatedname = context.hyphenatedfilename
-
-trackers.enable("graphics.lognames")
-
-context.start()
-
- context.switchtobodyfont { "tt,small" }
-
- local template = { "|Bl|p|" }
-
- for _, data in table.sortedhash(figures.found) do
- ctx_starttabulate(template)
- local badname = data.badname
- local found = data.found
- ctx_NC()
- context("asked name")
- ctx_NC()
- if badname then
- ctx_red()
- end
- context(data.askedname)
- ctx_NC() ctx_NR()
- if found then
- ctx_NC()
- context("format")
- ctx_NC()
- context(data.format)
- ctx_NC() ctx_NR()
- ctx_NC()
- context("found file")
- ctx_NC()
- ctx_hyphenatedname(data.foundname)
- -- context(data.foundname)
- ctx_NC() ctx_NR()
- ctx_NC()
- context("used file")
- ctx_NC()
- ctx_hyphenatedname(data.fullname)
- -- context(data.fullname)
- ctx_NC() ctx_NR()
- if badname then
- ctx_NC()
- context("comment")
- ctx_NC()
- context("bad name")
- ctx_NC() ctx_NR()
- end
- else
- ctx_NC()
- context("comment")
- ctx_NC()
- context(data.comment or "not found")
- ctx_NC() ctx_NR()
- end
- ctx_stoptabulate()
- end
-
-context.stop()
-
-\stopluacode
-
-\stopmodule
diff --git a/Master/texmf-dist/tex/context/base/s-fnt-01.mkii b/Master/texmf-dist/tex/context/base/s-fnt-01.mkii
deleted file mode 100644
index aedcf913d97..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fnt-01.mkii
+++ /dev/null
@@ -1,61 +0,0 @@
-%D \module
-%D [ file=s-fnt-01,
-%D version=2001.08.22,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Font Environment 1,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 file is used by the \type {texfont.pl} installation
-%D script. It is of no use for \MKIV.
-
-%D Modes: compact
-
-\dontcomplain
-
-\setupbodyfont
- [10pt]
-
-\setuplayout
- [backspace=30pt,
- topspace=30pt,
- footer=0pt,
- header=36pt,
- width=middle,
- height=middle]
-
-\setupcolors
- [state=start]
-
-\def\ShowFont
- {\dotripleempty\doShowFont}
-
-\def\doShowFont[#1][#2][#3]%
- {\doifsomething{#1}
- {\bgroup
- \ifthirdargument
- \definefontsynonym[WhateverName][#2][encoding=#3]
- \definefont[WhateverFont][WhateverName]
- \setupheadertexts[\tttf#2\quad#1\quad#3]
- \WhateverFont
- \setupinterlinespace
- \showfont[WhateverName]
- \showligatures[WhateverName]
- \doifnotmode{compact}{\showaccents\showcharacters}
- \else
- \definefontsynonym[WhateverName][#2]
- \definefont[WhateverFont][WhateverName]
- \setupheadertexts[\tttf#2\quad#1\quad(special font)]
- \WhateverFont
- \setupinterlinespace
- \showfont[WhateverName]
- \fi
- \page
- \egroup}}
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/s-fnt-02.mkii b/Master/texmf-dist/tex/context/base/s-fnt-02.mkii
deleted file mode 100644
index 69f976102b1..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fnt-02.mkii
+++ /dev/null
@@ -1,133 +0,0 @@
-% output=pdftex modes=demo
-
-% nice example:
-%
-% \usemodule[s-fnt-02]
-%
-% \usetypescriptfile[type-ghz.tex]
-%
-% \usetypescript [sans] [optima,optima-nova] [texnansi]
-%
-% \setvariables
-% [glyphs]
-% [name-1=OptimaLT,
-% name-2=OptimaNovaLT-Regular]
-%
-% \starttext
-%
-% \setups[show-glyphs]
-%
-% \stoptext
-%
-% see end, for other example (or run texexec s-fnt-02 --mode=demo)
-
-\setvariables
- [glyphs]
- [frame=on,
- name-1=cmr10,
- name-2=cmtt10,
- map-1=,
- map-2=]
-
-\setuppapersize[S4][S4]
-
-\setupcolors[state=start]
-
-\setuplayout[page]
-
-\definecolor[Gray] [s=.2]
-\definecolor[ColorNone][s=1,t=.5,a=1]
-\definecolor[ColorOne] [r=1,t=.5,a=1]
-\definecolor[ColorTwo] [g=1,t=.5,a=1]
-\definecolor[BackOne] [b=1,t=.5,a=1]
-\definecolor[BackTwo] [r=1,g=1,t=.5,a=1]
-
-\setupbackgrounds
- [page]
- [background=color,
- backgroundcolor=Gray]
-
-\startsetups[show-glyphs]
-
- \doifnothing{\getvariable{glyphs}{name-1}}{\endinput}
- \doifnothing{\getvariable{glyphs}{name-2}}{\endinput}
-
- \doifsomething{\getvariable{glyphs}{map-1}}{\loadmapfile[\getvariable{glyphs}{map-1}]}
- \doifsomething{\getvariable{glyphs}{map-2}}{\loadmapfile[\getvariable{glyphs}{map-2}]}
-
- \definefont[FontOne][\getvariable{glyphs}{name-1} at 280pt]
- \definefont[FontTwo][\getvariable{glyphs}{name-2} at 280pt]
-
-% \dostepwiserecurse{0}{255}{1}
-% {\doiffontcharelse{\getvariable{glyphs}{name-1}}{\recurselevel}
-% {\doiffontcharelse{\getvariable{glyphs}{name-2}}{\recurselevel}
-% {\startstandardmakeup
-% \doifelse{\getvariable{glyphs}{frame}}{on} % too many box calculations when off, but who cares
-% {\boxrulewidth=2pt}
-% {\boxrulewidth=0pt}
-% \setbox 0=\hbox{\white\ruledhbox{\FontOne \char\recurselevel}}
-% \setbox 2=\hbox{\white\ruledhbox{\FontTwo \char\recurselevel}}
-% \setbox 4=\hbox{\FontOne \ColorOne \char\recurselevel}
-% \setbox 6=\hbox{\FontTwo \ColorTwo \char\recurselevel}
-% \setbox 8=\hbox{\BackOne \ruledhbox{\FontOne \phantom{\char\recurselevel}}}
-% \setbox10=\hbox{\BackTwo \ruledhbox{\FontTwo \phantom{\char\recurselevel}}}
-% \vfill
-% \hbox{\dostepwiserecurse{0}{10}{2}{\hbox to \hsize{\hss\box\recurselevel\hss}\hskip-\hsize}}
-% \vfill
-% \tttf
-% \setstrut
-% \hbox to \hsize{\strut\hss
-% {\ColorOne \getvariable{glyphs}{name-1}}\quad
-% {\ColorTwo \getvariable{glyphs}{name-2}}\quad
-% {\ColorNone char \recurselevel }\hss}
-% \stopstandardmakeup}
-% {}}
-% {}}
-
- \dostepwiserecurse{0}{255}{1}
- {\donefalse
- \doiffontcharelse{\getvariable{glyphs}{name-1}}{\recurselevel}{\donetrue}{}%
- \doiffontcharelse{\getvariable{glyphs}{name-2}}{\recurselevel}{\donetrue}{}%
- \ifdone
- \startstandardmakeup
- \doifelse{\getvariable{glyphs}{frame}}{on} % too many box calculations when off, but who cares
- {\boxrulewidth=2pt}
- {\boxrulewidth=0pt}
- \setbox 0=\hbox{\white\ruledhbox{\FontOne \char\recurselevel}}
- \setbox 2=\hbox{\white\ruledhbox{\FontTwo \char\recurselevel}}
- \setbox 4=\hbox{\FontOne \ColorOne \char\recurselevel}
- \setbox 6=\hbox{\FontTwo \ColorTwo \char\recurselevel}
- \setbox 8=\hbox{\BackOne \ruledhbox{\FontOne \phantom{\char\recurselevel}}}
- \setbox10=\hbox{\BackTwo \ruledhbox{\FontTwo \phantom{\char\recurselevel}}}
- \vfill
- \hbox{\dostepwiserecurse{0}{10}{2}{\hbox to \hsize{\hss\box\recurselevel\hss}\hskip-\hsize}}
- \vfill
- \tttf
- \setstrut
- \hbox to \hsize{\strut\hss
- {\ColorOne \getvariable{glyphs}{name-1}}\quad
- {\ColorTwo \getvariable{glyphs}{name-2}}\quad
- {\ColorNone char \recurselevel }\hss}
- \stopstandardmakeup
- \fi}
-
-\stopsetups
-
-\doifnotmode{demo}{\endinput}
-
-\starttext
-
- \setupencoding[default=ec]
-
- \loadmapline [=][aer10 <cmr10.pfb]
- \loadmapline [=][\defaultencoding-lmr10 <\defaultencoding.enc <lmr10.pfb]
-
- \setvariables
- [glyphs]
- [frame=on,
- name-1=aer10,
- name-2=\defaultencoding-lmr10]
-
- \setups[show-glyphs]
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-fnt-10.mkiv b/Master/texmf-dist/tex/context/base/s-fnt-10.mkiv
deleted file mode 100644
index 2fe82e0794b..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fnt-10.mkiv
+++ /dev/null
@@ -1,166 +0,0 @@
-%D \module
-%D [ file=s-fnt-01,
-%D version=2006.10.10, % guess
-%D title=\CONTEXT\ Style File,
-%D subtitle=Listing Glyphs in Large Fonts,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% sort of obsolete
-
-\startluacode
-local fontdata = fonts.hashes.identifiers
-
--- function fonts.tracers.show_all()
--- local tfmdata = fontdata[font.current()]
--- if tfmdata and tfmdata.shared then
--- local NC, NR, char = context.NC, context.NR, context.char
--- context.starttabulate { "|l|r|c|" }
--- for unicode, description in fonts.iterators.characters(tfmdata) do
--- NC() context(description.name) NC() context(unicode) NC() char(unicode) NC() NR()
--- end
--- context.stoptabulate()
--- end
--- end
-
-function fonts.tracers.show_all()
- local tfmdata = fontdata[font.current()]
- if tfmdata then
- local NC, NR, HL, char, bold, tttf = context.NC, context.NR, context.HL, context.char, context.bold, context.tttf
- local descriptions = tfmdata.descriptions or { }
- local data = characters.data
- -- context.setuptabulate { header = "repeat" }
- context.starttabulatehead()
- NC() bold("unicode")
- NC() bold("visual")
- NC() bold("index")
- NC() bold("glyph")
- NC() bold("adobe")
- NC() bold("context")
- NC() NR()
- context.stoptabulatehead()
- context.starttabulate { "|l|c|l|p|p|p|" }
- for unicode, chr in fonts.iterators.characters(tfmdata) do
- local des, dat = descriptions[unicode], data[unicode]
- local index = chr.index or 0
- local cname = (dat and dat.contextname) or ""
- local aname = (dat and dat.adobename) or ""
- local gname = (des and des.name) or ""
- local mname = dat and dat.mathname
- if type(mname) ~= "string" then
- mname = ""
- end
- local mspec = dat and dat.mathspec
- if mspec then
- for m=1,#mspec do
- local n = mspec[m].name
- if n then
- if mname == "" then
- mname = n
- else
- mname = mname .. " " .. n
- end
- end
- end
- end
- if mname ~= "" then
- mname = "m: " .. mname
- if cname ~= "" then
- cname = cname .. " " .. mname
- else
- cname = mname
- end
- end
- NC() tttf() context("U+%05X",unicode)
- NC() char(unicode)
- NC() tttf() context("%05X",index)
- NC() tttf() context(gname)
- NC() tttf() context(aname)
- NC() tttf() context(cname)
- NC() NR()
- end
- context.stoptabulate()
- else
- context("problems")
- end
-end
-
-function fonts.tracers.show_glyphs()
- local tfmdata = fontdata[font.current()]
- if tfmdata then
- for unicode, chr in fonts.iterators.characters(tfmdata) do
- context.showglyph(unicode)
- end
- end
-end
-\stopluacode
-
-\unexpanded\def\ShowCompleteFont#1#2#3%
- {\bgroup
- \page
- \font\TestFont=#1 at #2
- \setuplayout[style=\TestFont]
- \setupheadertexts[]
- \setupfootertexts[#1 -- \pagenumber]
- \setupfootertexts[pagenumber]
- \setuplayout[width=middle,height=middle,topspace=1cm,backspace=1cm]
- \TestFont
- \nonknuthmode
- \startcolumns[n=#3]
- \TestFont
- \ctxlua { fonts.tracers.show_all() }
- \stopcolumns
- \page
- \egroup}
-
-\unexpanded\def\ShowAllGlyphs#1#2#3%
- {\bgroup
- \page
- \def\showglyph##1{\dontleavehmode\strut\char##1\relax\par}
- \font\TestFontA=#1 at 12pt
- \font\TestFontB=#1 at #2
- \setuplayout[style=\TestFontA]
- \setupheadertexts[]
- \setupfootertexts[#1\space\endash\space\pagenumber]
- \setuplayout[width=middle,height=middle,topspace=1cm,backspace=1cm,header=1cm,footer=2cm]
- \TestFontB \setupinterlinespace[line=1.2\dimexpr#2\relax] \raggedcenter
- \nonknuthmode
- \startcolumns[n=#3]
- \TestFontB
- \ctxlua { fonts.tracers.show_glyphs() }
- \stopcolumns
- \page
- \egroup}
-
-\continueifinputfile{s-fnt-10.mkiv}
-
-\starttext
-
-% \ShowCompleteFont{name:dejavusansmono}{10pt}{1}
-% \ShowCompleteFont{name:dejavuserif}{10pt}{2}
-% \ShowCompleteFont{name:officinasansbookitcregular}{10pt}{2}
-% \ShowCompleteFont{name:officinaserifbookitcregular}{10pt}{2}
-% \ShowCompleteFont{name:serpentineserifeflight}{10pt}{2}
-\ShowCompleteFont{name:lmroman10-regular}{10pt}{1}
-% \ShowCompleteFont{name:lmtypewriter10-regular}{10pt}{2}
-% \ShowCompleteFont{lt55485}{10pt}{2}
-% \ShowCompleteFont{lmr10}{10pt}{2}
-% \ShowCompleteFont{lbr}{10pt}{2}
-% \ShowCompleteFont{name:Cambria}{10pt}{2}
-% \ShowCompleteFont{name:CambriaMath}{10pt}{2}
-% \ShowCompleteFont{name:texgyrepagella-regular}{10pt}{2}
-% \ShowCompleteFont{name:texgyrechorus-mediumitalic}{10pt}{2}
-% \ShowAllGlyphs {name:texgyrepagella-regular} {48pt}{2}
-% \ShowAllGlyphs {name:texgyrechorus-mediumitalic}{48pt}{2}
-% \ShowCompleteFont{name:euler10-regular}{10pt}{2}
-
-% \ShowCompleteFont{name:palatinosansinformalcombold}{20pt}{2}
-% \ShowCompleteFont{name:palatinonovaregular}{11pt}{2}
-% \ShowCompleteFont{pirat.ttf}{12pt}{1}
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-fnt-20.mkiv b/Master/texmf-dist/tex/context/base/s-fnt-20.mkiv
deleted file mode 100644
index 5840430990f..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fnt-20.mkiv
+++ /dev/null
@@ -1,161 +0,0 @@
-%D \module
-%D [ file=s-fnt-20,
-%D version=2009.01.10,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Tracing Feature Application (1),
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 file is used by Idris and me in the process of getting the
-%D best arabic fonts getting rendered best. As such it might change.
-
-% \setvariables
-% [otftracker]
-% [title=Reverse Chaining,
-% figure=test-003-volt.pdf,
-% font=husayni,
-% sample={ببب بببب ببببب بببببب}]
-
-\def\checkedotftrackerfeature #1{otftracker-\ifnum\featureattribute{otftracker-#1}=\zerocount default\else#1\fi}
-\def\checkedotftrackerdirection#1{\csname otftracker-direction-\ifcsname otftracker-direction-#1\endcsname#1\else default\fi\endcsname}
-
-% we can consider adding a dir key to features
-
-\definefontfeature
- [otftracker-default]
- [default]
- [mode=node]
-
-\definefontfeature
- [otftracker-arabtype]
- [mode=node,analyze=yes,
- language=dflt,script=arab,ccmp=yes,
- init=yes,medi=yes,fina=yes,isol=yes,
- liga=yes,dlig=yes,rlig=yes,clig=yes,
- mark=yes,mkmk=yes,kern=yes,curs=yes]
-
-% \definefontfeature
-% [otftracker-husayni]
-% [analyze=yes,mode=node,
-% language=dflt,script=arab,ccmp=yes,
-% init=yes,medi=yes,fina=yes,isol=yes,
-% calt=yes,
-% mark=yes,mkmk=yes,kern=yes,curs=yes]
-
-\definefontfeature
- [otftracker-husayni]
- [analyze=yes,mode=node,
- language=dflt,script=arab,
- init=yes,medi=yes,fina=yes,
- rlig=yes,
- ccmp=yes,
- ss01=yes, % full Allah, Muhammad, Allahumma
- ss05=yes, % full Jiim stacking
- ss09=yes, % full Haa stacking
- ss10=yes, % partial dipped Miim
- ss13=yes, % full stacked Miim
- ss15=yes, % full stacked Laam-on-Miim
- ss17=yes, % full stacked Ayn-on-Miim
- ss19=yes, % LM_im
- ss24=yes, % BX specials
- ss25=yes, % LH_im specials
- ss26=yes, % full Yaa.final specials
- ss27=yes, % partial thin Miim.final
- ss31=yes, % partial Raa.final contexts
- ss34=yes, % partial Raa.final contexts
- ss35=yes, % full Kaaf contexts
- ss36=yes, % full Laam contexts
- ss37=yes, % Miim-Miim contexts
- ss38=yes, % fancy thin Haa.medial-Miim.final
- ss39=yes, % high and low Baa strings
- ss40=yes, % diagonal entry
- ss41=yes, % initial alternates
- mark=yes,mkmk=yes,kern=yes,curs=yes]
-
-\definefontfeature
- [otftracker-simplenaskhi]
- [analyze=yes,mode=node,
- language=dflt,script=arab,
- init=yes,medi=yes,fina=yes,calt=yes,
- rlig=yes,liga=yes,dlig=yes,
- mark=yes,mkmk=yes,kern=yes,curs=yes]
-
-\setvalue{otftracker-direction-arabtype}{r2l}
-\setvalue{otftracker-direction-husayni}{r2l}
-\setvalue{otftracker-direction-simplenaskhi}{r2l}
-\setvalue{otftracker-direction-default}{}
-
-\setvariables
- [otftracker]
- [font=Serif,
- features=\checkedotftrackerfeature{\getvariable{otftracker}{font}},
- direction=\checkedotftrackerdirection{\getvariable{otftracker}{font}},
- size=48pt,
- figure=,
- title=Feature Check,
- sample=no sample,
- set=\setups{otftracker}]
-
-\setuplayout
- [topspace=1.5cm,
- backspace=1.5cm,
- width=middle,
- height=middle,
- header=1.5cm,
- footer=1.5cm]
-
-\setuphead
- [chapter]
- [header=high,
- number=no]
-
-\setupfootertexts
- [chapter]
-
-\setupalign
- [flushleft]
-
-\setupcolors
- [state=start]
-
-\startsetups otftracker
- \setupbodyfont[tt,10pt]
- \starttext
- \normalexpanded{\startchapter[title={\getvariable{otftracker}{title}}]}
- \doifsomething {\getvariable{otftracker}{figure}} {
- \startlinecorrection
- \externalfigure[\getvariable{otftracker}{figure}][maxwidth=\hsize,frame=on]
- \stoplinecorrection
- }
- \showotfcomposition
- {\getvariable{otftracker}{font}*\getvariable{otftracker}{features} at \getvariable{otftracker}{size}}
- {\getvariable{otftracker}{direction}}
- {\getvariable{otftracker}{sample}}
- \stopchapter
- \stoptext
-\stopsetups
-
-\continueifinputfile{s-fnt-20.mkiv}
-
-\usemodule[art-01]
-
-\setupbodyfont
-% [cambria]
- [dejavu]
-
-\starttext
-
-\setvariables
- [otftracker]
- [font=Serif,
- size=48pt,
- figure=,
- title=Feature Check,
- sample={affiliation}]
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-fnt-21.mkiv b/Master/texmf-dist/tex/context/base/s-fnt-21.mkiv
deleted file mode 100644
index 10d5a462394..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fnt-21.mkiv
+++ /dev/null
@@ -1,64 +0,0 @@
-%D \module
-%D [ file=s-fnt-20,
-%D version=2009.01.10,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Tracing Feature Application (2),
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 is related to:
-
-\usemodule[fnt-20]
-
-\setvariables
- [otftracker]
- [set=\setups{araball}]
-
-\startsetups araball
- \begingroup
- \setupcolors[state=start]%
- \enabletrackers[otf.analyzing]% beware, kind of global
- \ruledhbox \bgroup
- \definedfont[\getvariable{otftracker}{font}*\getvariable{otftracker}{features} at \getvariable{otftracker}{size}]%
- \ifnum\getvariable{otftracker}{direction}<0 \textdir TRT\else\ifnum\getvariable{otftracker}{direction}>0 \textdir TLT\fi\fi\relax
- \getvariable{otftracker}{sample}%
- \egroup
- \disabletrackers[otf.analyzing]%
- \endgroup
-\stopsetups
-
-\unexpanded\def\ShowOtfTrackerSample#1%
- {\doiffile{#1}
- {\blank
- \startlinecorrection
- \vbox \bgroup
- \forgetall
- \setbox\scratchbox\hbox{\component #1 \relax}
- \hbox{\copy\scratchbox\quad\lower\dp\scratchbox\hbox{\ruledhbox{\externalfigure[#1-volt.pdf][height=\htdp\scratchbox]}}}
- \hbox{\strut\tttf#1}%
- \egroup
- \stoplinecorrection
- \blank}}
-
-\endinput
-
-% \usemodule[fnt-21]
-%
-% \starttext
-%
-% \setvariables
-% [otftracker]
-% [direction=-1,
-% sample=لا,
-% title=Test,
-% font=file:arabtype,
-% % font=file:husayni,
-% % font=file:scheherazaderegot,
-% features=arabic]
-%
-% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-fnt-24.mkiv b/Master/texmf-dist/tex/context/base/s-fnt-24.mkiv
deleted file mode 100644
index 2e6b9a59187..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fnt-24.mkiv
+++ /dev/null
@@ -1,83 +0,0 @@
-%D \module
-%D [ file=s-fnt-24,
-%D version=2009.02.06,
-%D title=\CONTEXT\ Style File,
-%D subtitle=CJK Glyph Combination Testing,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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\ShowChineseCombiChar#1#2#3#4%
- {\blank[small]
- \dontleavehmode
- \hbox\bgroup
- \dontcomplain
- \setstrut
- \hbox to 7em{\ruledhbox{\char#1}\hskip.25em\type{+}\hskip.25em\ruledhbox{\char#2}\hskip.25em\type{=}\hskip.25em\ruledhbox{\char#1\char#2}\hss}\relax
- \ruledvtop{\hsize1em\char#1\char#2}\relax
- \hskip2em
- \ruledvtop{\hsize.625em\char#1\char#2}\relax
- \hskip2em
- \ruledvtop{\hsize1.5em\char#1\char#2}\relax
- \hskip2em
- \type{#3 + #4}\relax
- \egroup
- \blank[small]}
-
-\startluacode
-local example = {
- korean = 0x0AC00,
- chinese = 0x04E55,
- full_width_open = 0x03008,
- full_width_close = 0x03009,
- half_width_open = 0x02018,
- half_width_close = 0x02019,
- hyphen = 0x02026,
- non_starter = 0x03005,
- other = 0x0004D, -- M
-}
-
-function fonts.analyzers.cjktest(first,second)
- for k, v in next, example do
- if (not first or first == "") or first == k then
- for kk, vv in next, example do
- if (not second or second == "") or second == kk then
- context.ShowChineseCombiChar(v,vv,k,kk)
- end
- end
- end
- end
-end
-\stopluacode
-
-\unexpanded\def\ShowCombinationsKorean
- {\dodoubleempty\doShowCombinationsKorean}
-
-\def\doShowCombinationsKorean[#1][#2]%
- {\startpacked
- \setscript[hangul]
- \setupcolors[\c!state=\v!start]
- \enabletrackers[cjk.analyzing]
- \ctxlua{fonts.analyzers.cjktest("#1","#2")}\par % !
- \disabletrackers[cjk.analyzing]
- \stoppacked}
-
-\unexpanded\def\ShowCombinationsChinese
- {\dodoubleempty\doShowCombinationsChinese}
-
-\def\doShowCombinationsChinese[#1][#2]%
- {\startpacked
- \setscript[hanzi]
- \setupcolors[\c!state=\v!start]
- \enabletrackers[cjk.analyzing]
- \ctxlua{fonts.analyzers.cjktest("#1","#2")}\par % !
- \disabletrackers[cjk.analyzing]
- \stoppacked}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/s-fonts-coverage.lua b/Master/texmf-dist/tex/context/base/s-fonts-coverage.lua
deleted file mode 100644
index dd772d5f09b..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fonts-coverage.lua
+++ /dev/null
@@ -1,123 +0,0 @@
-if not modules then modules = { } end modules ['s-fonts-coverage'] = {
- version = 1.001,
- comment = "companion to s-fonts-coverage.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-moduledata.fonts = moduledata.fonts or { }
-moduledata.fonts.coverage = moduledata.fonts.coverage or { }
-
-local upper, format = string.upper, string.format
-local lpegmatch = lpeg.match
-local concat = table.concat
-
-local context = context
-local NC, NR, HL = context.NC, context.NR, context.HL
-local char, bold, getvalue = context.char, context.bold, context.getvalue
-
-local chardata = characters.data
-
-function moduledata.fonts.coverage.showcomparison(specification)
-
- specification = interfaces.checkedspecification(specification)
-
- local fontfiles = utilities.parsers.settings_to_array(specification.list or "")
- local pattern = upper(specification.pattern or "")
-
- local present = { }
- local names = { }
- local files = { }
- local chars = { }
-
- if not pattern then
- -- skip
- elseif pattern == "" then
- pattern = nil
- elseif tonumber(pattern) then
- pattern = tonumber(pattern)
- else
- pattern = lpeg.oneof(utilities.parsers.settings_to_array(pattern))
- pattern = (1-pattern)^0 * pattern
- end
-
- for i=1,#fontfiles do
- local fontname = format("testfont-%s",i)
- local fontfile = fontfiles[i]
- local fontsize = tex.dimen.bodyfontsize
- local id, fontdata = fonts.definers.define {
- name = fontfile,
- size = fontsize,
- cs = fontname,
- }
- if id and fontdata then
- for k, v in next, fontdata.characters do
- present[k] = true
- end
- names[#names+1] = fontname
- files[#files+1] = fontfile
- chars[#names] = fontdata.characters
- end
- end
-
- local t = { }
-
- context.starttabulate { "|Tr" .. string.rep("|l",#names) .. "|" }
- for i=1,#files do
- local file = files[i]
- t[#t+1] = i .. "=" .. file
- NC()
- context(i)
- NC()
- context(file)
- NC()
- NR()
- end
- context.stoptabulate()
-
- context.setupfootertexts {
- table.concat(t," ")
- }
-
- context.starttabulate { "|Tl" .. string.rep("|c",#names) .. "|Tl|" }
- NC()
- bold("unicode")
- NC()
- for i=1,#names do
- bold(i)
- NC()
- end
- bold("description")
- NC()
- NR()
- HL()
- for k, v in table.sortedpairs(present) do
- if k <= 0 then
- -- ignore
- elseif k >= 0x110000 then
- logs.report("warning","weird character %U",k)
- else
- local description = chardata[k].description
- if not pattern or (pattern == k) or (description and lpegmatch(pattern,description)) then
- NC()
- context("%05X",k)
- NC()
- for i=1,#names do
- getvalue(names[i])
- if chars[i][k] then
- char(k)
- else
- -- missing
- end
- NC()
- end
- context(description)
- NC()
- NR()
- end
- end
- end
- context.stoptabulate()
-
-end
diff --git a/Master/texmf-dist/tex/context/base/s-fonts-coverage.mkiv b/Master/texmf-dist/tex/context/base/s-fonts-coverage.mkiv
deleted file mode 100644
index c09d943bcca..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fonts-coverage.mkiv
+++ /dev/null
@@ -1,131 +0,0 @@
-%D \module
-%D [ file=s-fonts-coverage, % s-fnt-31
-%D version=2011.01.02,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Show Fonts Coverage,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% begin info
-%
-% title : compare glyphs in fonts
-%
-% comment : show glyphs in several fonts alongside in order to to compare coverage
-% status : experimental, used for luatex testing
-%
-% end info
-
-\startmodule[fonts-coverage]
-
-\registerctxluafile{s-fonts-coverage}{}
-
-\installmodulecommandluasingle \showfontcomparison {moduledata.fonts.coverage.showcomparison}
-
-\stopmodule
-
-\continueifinputfile{s-fonts-coverage.mkiv}
-
-\usemodule[art-01]
-
-\starttext
-
- \showfontcomparison
- [list={texgyrepagella-regular.otf,texgyretermes-regular.otf,texgyrebonum-regular.otf},
- pattern=ogonek]
-
- \page
-
- % $e=mc²$ ${}²$ $²$ $x²ᶞ$ $xâ½Â²âºÂ²â¼Â²âºÂ²â¾$ $x²âºÂ²â¼Â²âºÂ²$ $x₅²$ $x²₅²$
-
- % \startluacode
- % moduledata.fonts.coverage.showcomparison {
- % list = {
- % "texgyrepagella-math.otf",
- % "texgyretermes-math.otf",
- % "texgyrebonum-math.otf",
- % }
- % }
- % \stopluacode
-
- % \startluacode
- % moduledata.fonts.coverage.showcomparison {
- % list = "pirat.ttf",
- % }
- % \stopluacode
-
- % \startluacode
- % moduledata.fonts.coverage.showcomparison {
- % list = {
- % "lucidabrightot.otf",
- % "cambria.ttf",
- % "iwona-regular.otf",
- % "texgyrepagella-regular.otf",
- % "texgyretermes-regular.otf",
- % "texgyrebonum-regular.otf",
- % "antpolt-regular.otf",
- % },
- % pattern = "OGONEK"
- % }
- % \stopluacode
-
- % \loadfontgoodies[lucida-math]
- % \loadfontgoodies[lm-math]
- %
- % \startluacode
- % moduledata.fonts.coverage.showcomparison {
- % list = {
- % "LucidaBrightRegular.ttf",
- % "LucidaBrightOne@lucida-math",
- % "cambria.ttc(Cambria Math)",
- % "xits-math.otf",
- % "LMMath10-Regular@lmroman10-math",
- % },
- % }
- % \stopluacode
-
- % \loadfontgoodies[px-math]
- % \loadfontgoodies[lm-math]
- %
- % \startluacode
- % moduledata.fonts.coverage.showcomparison {
- % list = {
- % "cambria.ttc(Cambria Math)",
- % "xits-math.otf",
- % -- "stixmath-regular.otf",
- % "latinmodern-math.otf",
- % -- "lucidabrightmathot.otf",
- % -- "lucidabrightmathot-demi.otf",
- % "texgyrepagella-math.otf",
- % "texgyretermes-math.otf",
- % "texgyrebonum-math.otf",
- % -- "LMMath10-Regular@lmroman10-math",
- % -- "pxmath@px-math",
- % -- "txmath@tx-math",
- % },
- % }
- % \stopluacode
-
- % \startluacode
- % moduledata.fonts.coverage.showcomparison {
- % list = {
- % "dejavuserif.ttf",
- % "dejavusans.ttf",
- % "dejavusansmono.ttf",
- % "lucidabrightot.otf",
- % "cambria.ttf",
- % "iwona-regular.otf",
- % "texgyrepagella-regular.otf",
- % "texgyretermes-regular.otf",
- % "texgyrebonum-regular.otf",
- % "antpolt-regular.otf",
- % },
- % pattern = "CELSIUS,FAHRENHEIT"
- % }
- % \stopluacode
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-fonts-features.lua b/Master/texmf-dist/tex/context/base/s-fonts-features.lua
deleted file mode 100644
index 0a7cf8b132c..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fonts-features.lua
+++ /dev/null
@@ -1,161 +0,0 @@
-if not modules then modules = { } end modules ['s-fonts-features'] = {
- version = 1.001,
- comment = "companion to s-fonts-features.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-moduledata.fonts = moduledata.fonts or { }
-moduledata.fonts.features = moduledata.fonts.features or { }
-
--- for the moment only otf
-
-local sortedhash = table.sortedhash
-
-local NC, NR, bold = context.NC, context.NR, context.bold
-
-function moduledata.fonts.features.showused(specification)
-
- specification = interfaces.checkedspecification(specification)
-
- -- local list = utilities.parsers.settings_to_set(specification.list or "all")
-
- context.starttabulate { "|T|T|T|T|T|" }
-
- context.HL()
-
- NC() bold("feature")
- NC()
- NC() bold("description")
- NC() bold("value")
- NC() bold("internal")
- NC() NR()
-
- context.HL()
-
- local usedfeatures = fonts.handlers.otf.statistics.usedfeatures
- local features = fonts.handlers.otf.tables.features
- local descriptions = fonts.handlers.otf.features.descriptions
-
- for feature, keys in sortedhash(usedfeatures) do
- -- if list.all or (list.otf and rawget(features,feature)) or (list.extra and rawget(descriptions,feature)) then
- local done = false
- for k, v in sortedhash(keys) do
- if done then
- NC()
- NC()
- NC()
- elseif rawget(descriptions,feature) then
- NC() context(feature)
- NC() context("+") -- extra
- NC() context(descriptions[feature])
- done = true
- elseif rawget(features,feature) then
- NC() context(feature)
- NC() -- otf
- NC() context(features[feature])
- done = true
- else
- NC() context(feature)
- NC() context("-") -- unknown
- NC()
- done = true
- end
- NC() context(k)
- NC() context(tostring(v))
- NC() NR()
- end
- -- end
- end
-
- context.HL()
-
- context.stoptabulate()
-
-end
-
-local function collectkerns(tfmdata,feature)
- local combinations = { }
- local resources = tfmdata.resources
- local characters = tfmdata.characters
- local sequences = resources.sequences
- local lookuphash = resources.lookuphash
- local feature = feature or "kern"
- if sequences then
- for i=1,#sequences do
- local sequence = sequences[i]
- if sequence.features and sequence.features[feature] then
- local lookuplist = sequence.subtables
- if lookuplist then
- for l=1,#lookuplist do
- local lookupname = lookuplist[l]
- local lookupdata = lookuphash[lookupname]
- for unicode, data in next, lookupdata do
- local kerns = combinations[unicode]
- if not kerns then
- kerns = { }
- combinations[unicode] = kerns
- end
- for otherunicode, kern in next, data do
- if not kerns[otherunicode] and kern ~= 0 then
- kerns[otherunicode] = kern
- end
- end
- end
- end
- end
- end
- end
- end
- return combinations
-end
-
-local showkernpair = context.showkernpair
-
-function moduledata.fonts.features.showbasekerns(specification)
- -- assumes that the font is loaded in base mode
- specification = interfaces.checkedspecification(specification)
- local id, cs = fonts.definers.internal(specification,"<module:fonts:features:font>")
- local tfmdata = fonts.hashes.identifiers[id]
- local done = false
- for unicode, character in sortedhash(tfmdata.characters) do
- local kerns = character.kerns
- if kerns then
- context.par()
- for othercode, kern in sortedhash(kerns) do
- showkernpair(unicode,kern,othercode)
- end
- context.par()
- done = true
- end
- end
- if not done then
- context("no kern pairs found")
- context.par()
- end
-end
-
-function moduledata.fonts.features.showallkerns(specification)
- specification = interfaces.checkedspecification(specification)
- local id, cs = fonts.definers.internal(specification,"<module:fonts:features:font>")
- local tfmdata = fonts.hashes.identifiers[id]
- local allkerns = collectkerns(tfmdata)
- local characters = tfmdata.characters
- if next(allkerns) then
- for first, pairs in sortedhash(allkerns) do
- context.par()
- for second, kern in sortedhash(pairs) do
- -- local kerns = characters[first].kerns
- -- if not kerns and pairs[second] then
- -- -- weird
- -- end
- showkernpair(first,kern,second,0)
- end
- context.par()
- end
- else
- context("no kern pairs found")
- context.par()
- end
-end
diff --git a/Master/texmf-dist/tex/context/base/s-fonts-features.mkiv b/Master/texmf-dist/tex/context/base/s-fonts-features.mkiv
deleted file mode 100644
index b81b53a7176..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fonts-features.mkiv
+++ /dev/null
@@ -1,82 +0,0 @@
-%D \module
-%D [ file=s-fonts-features, % was s-fnt-41, s-fnt-27
-%D version=2012.11.27, % 2010.02.22
-%D title=\CONTEXT\ Style File,
-%D subtitle=Features,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\startmodule[fonts-features]
-
-\registerctxluafile{s-fonts-features}{}
-
-\installmodulecommandluasingle \showusedfeatures {moduledata.fonts.features.showused}
-\installmodulecommandluasingle \showallkerns {moduledata.fonts.features.showallkerns}
-\installmodulecommandluasingle \showbasekerns {moduledata.fonts.features.showbasekerns}
-
-\def\kernpairheight{\strutheight}
-\def\kernpairdepth {\strutdepth}
-\def\kernpairwidth {\onepoint}
-
-\unexpanded\def\showkernpair#1#2#3% first second kern
- {\dontleavehmode
- \hbox \bgroup
- \scratchdimen#2\scaledpoint
- \kern\fontcharwd\font#1\relax
- \ifdim\scratchdimen>\zeropoint
- \bgroup
- \darkgreen
- \vrule width \scratchdimen height \kernpairheight depth \kernpairdepth
- \egroup
- \kern-\scratchdimen
- \else\ifdim\scratchdimen<\zeropoint
- \kern\scratchdimen
- \bgroup
- \darkred
- \vrule width -\scratchdimen height \kernpairheight depth \kernpairdepth
- \egroup
- \else
- \kern-.5\dimexpr\kernpairwidth\relax
- \bgroup
- \darkblue
- \vrule width \kernpairwidth height \kernpairheight depth \kernpairdepth
- \egroup
- \kern-.5\dimexpr\kernpairwidth\relax
- \fi\fi
- \kern-\fontcharwd\font#1\relax
- \char#1\relax
- \char#3\relax
- \egroup
- \space}
-
-\stopmodule
-
-\continueifinputfile{s-fonts-features.mkiv}
-
-\usemodule
- [art-01]
-
-\starttext
-
- \showusedfeatures \page
-
- \definefontfeature[default-base][default][mode=base]
-
- \start
- \definedfont[Serif*default-base]
- \showbasekerns
- \page
- \stop
-
- \start
- \bf
- \showallkerns
- \page
- \stop
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-fonts-goodies.lua b/Master/texmf-dist/tex/context/base/s-fonts-goodies.lua
deleted file mode 100644
index 381fc45eabf..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fonts-goodies.lua
+++ /dev/null
@@ -1,117 +0,0 @@
-if not modules then modules = { } end modules['s-fonts-goodies'] = {
- version = 1.001,
- comment = "companion to s-fonts-goodies.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-moduledata.fonts = moduledata.fonts or { }
-moduledata.fonts.goodies = moduledata.fonts.goodies or { }
-
-local NC, NR, HL = context.NC, context.NR, context.HL
-
-local function initialized(specification)
- specification = interfaces.checkedspecification(specification)
- local name = specification.name
- if name then
- local goodies = fonts.goodies.load(name)
- if goodies then
- return specification, goodies
- end
- end
-end
-
-function moduledata.fonts.goodies.showstylistics(specification)
- local specification, goodies = initialized(specification)
- if goodies then
- local stylistics = goodies.stylistics
- if stylistics then
- context.starttabulate { "|Tl|Tpl|" }
- HL()
- NC() context.bold("feature")
- NC() context.bold("meaning")
- NC() NR()
- HL()
- for feature, meaning in table.sortedpairs(stylistics) do
- NC() context(feature)
- NC() context(string.lower(meaning))
- NC() NR()
- end
- HL()
- context.stoptabulate()
- end
- end
-end
-
-function moduledata.fonts.goodies.showfeaturesets(specification)
- local specification, goodies = initialized(specification)
- if goodies then
- local featuresets = goodies.featuresets
- if featuresets then
- context.starttabulate { "|Tl|Tpl|" }
- HL()
- NC() context.bold("featureset")
- NC() context.bold("definitions")
- NC() NR()
- HL()
- for featureset, definitions in table.sortedpairs(featuresets) do
- NC() context.type(featureset) NC()
- for k, v in table.sortedpairs(definitions) do
- context("%s=%S",k,v)
- context.quad()
- end
- NC() NR()
- end
- HL()
- context.stoptabulate()
- end
- end
-end
-
-function moduledata.fonts.goodies.showcolorschemes(specification)
- local specification, goodies = initialized(specification)
- if goodies then
- local colorschemes = goodies.colorschemes
- if colorschemes then
- context.starttabulate { "|Tl|Tpl|" }
- HL()
- NC() context.bold("colorscheme")
- NC() context.bold("numbers")
- NC() NR()
- HL()
- for colorscheme, numbers in table.sortedpairs(colorschemes) do
- NC() context.type(colorscheme) NC()
- for i=1,#numbers do
- context(i)
- context.quad()
- end
- NC() NR()
- end
- HL()
- context.stoptabulate()
- end
- end
-end
-
-function moduledata.fonts.goodies.showfiles(specification)
- local specification, goodies = initialized(specification)
- if goodies then
- local files = goodies.files
- if files and files.list then
- for filename, specification in table.sortedpairs(files.list) do
- context.start()
- context.dontleavehmode()
- context.definedfont{ filename .. "*default" }
- context("%s-%s-%s-%s-%s",
- specification.name or files.name,
- specification.weight or "normal",
- specification.style or "normal",
- specification.width or "normal",
- specification.variant or "normal")
- context.par()
- context.stop()
- end
- end
- end
-end
diff --git a/Master/texmf-dist/tex/context/base/s-fonts-goodies.mkiv b/Master/texmf-dist/tex/context/base/s-fonts-goodies.mkiv
deleted file mode 100644
index e596507afa9..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fonts-goodies.mkiv
+++ /dev/null
@@ -1,37 +0,0 @@
-%D \module
-%D [ file=s-fonts-goodies, % s-fnt-26, s-fnt-28
-%D version=2009.10.26,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Goodies Tables,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 More tables will follow here as we have many more goodies by now.
-
-\startmodule[fonts-goodies]
-
-\registerctxluafile{s-fonts-goodies}{}
-
-\installmodulecommandluasingle \showfontgoodiesstylistics {moduledata.fonts.goodies.showstylistics}
-\installmodulecommandluasingle \showfontgoodiesfeaturesets {moduledata.fonts.goodies.showfeaturesets}
-\installmodulecommandluasingle \showfontgoodiescolorschemes {moduledata.fonts.goodies.showcolorschemes}
-\installmodulecommandluasingle \showfontgoodiesfiles {moduledata.fonts.goodies.showfiles}
-
-\stopmodule
-
-\continueifinputfile{s-fonts-goodies.mkiv}
-
-\starttext
-
- \showfontgoodiesstylistics [name=husayni] \page
- \showfontgoodiesfeaturesets [name=husayni] \page
- \showfontgoodiescolorschemes[name=husayni] \page
-
- \showfontgoodiesfiles [name=antykwapoltawskiego] \page
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-fonts-ligatures.mkiv b/Master/texmf-dist/tex/context/base/s-fonts-ligatures.mkiv
deleted file mode 100644
index e6ff2461e8c..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fonts-ligatures.mkiv
+++ /dev/null
@@ -1,292 +0,0 @@
-%D \module
-%D [ file=s-fonts-ligatures,
-%D version=2014.12.14,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Show Fonts Ligatures,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% begin info
-%
-% title : show some ligature building in fonts
-%
-% comment : we trace some ligatures that have rather different implementations in fontss
-% status : experimental, used for luatex testing
-%
-% end info
-
-\definefontfeature
- [otfligaturetest]
- [analyze=off,
- ccmp=yes, % brill uses that .. not really ligatures !
- %clig=yes,
- script=latn,
- language=dflt]
-
-\hyphenation{xf-fi-a}
-\hyphenation{xff-i-b}
-\hyphenation{xffi-c}
-\hyphenation{xffid}
-
-\registerhyphenationexception[xf-fi-a]
-\registerhyphenationexception[xff-i-b]
-\registerhyphenationexception[xffi-c]
-\registerhyphenationexception[xffid]
-
-\starttexdefinition showotfligaturescaption #1
- \bTD [align={flushleft,lohi},nx=3]
- \nohyphens
- \ttbf
- #1
- \eTD
-\stoptexdefinition
-
-\starttexdefinition showotfligatureslegend #1
- \bTD [width=6em,align={flushleft,lohi}]
- \nohyphens \ttxx original
- \eTD
- \bTD [width=6em,align={flushleft,lohi}]
- \nohyphens \ttxx expanded
- \eTD
- \bTD [width=6em,align={flushleft,lohi}]
- \nohyphens \ttxx traditional
- \eTD
-\stoptexdefinition
-
-\starttexdefinition showotfligaturesline #1#2
- \bTD[toffset=.5ex,frame=off]
- \starthyphenation[#1]
- \LigatureFont
- \showfontkerns
- \showdiscretionaries
- \begstrut#2\endstrut
- \par
- \stophyphenation
- \eTD
-\stoptexdefinition
-
-\def\showotfligaturescells{3}
-%def\showotfligaturesnx {12}
-%def\showotfligatureswidth{18em}
-\def\showotfligaturesnx {\the\numexpr 4*\showotfligaturescells}
-\def\showotfligatureswidth{\the\dimexpr6em*\showotfligaturescells}
-
-\starttexdefinition showotfligaturesbanner #1
- \bTR[frame=off]
- \bTD [nx=\showotfligaturesnx,width=\showotfligatureswidth,align={middle,lohi},height=4ex]
- \tttf #1
- \eTD
- \eTR
-\stoptexdefinition
-
-\starttexdefinition showotfligaturescaptions #1
- \bTR[height=3ex,align={middle,lohi},bottomframe=off]
- \processcommalist[#1]\showotfligaturescaption
- \eTR
- \bTR[height=3ex,align={middle,lohi},topframe=off]
- \processcommalist[#1]\showotfligatureslegend
- \eTR
-\stoptexdefinition
-
-\starttexdefinition showotfligatureslineset #1
- \showotfligaturesline{original} {#1}
- \showotfligaturesline{expanded} {#1}
- \showotfligaturesline{traditional}{#1}
-\stoptexdefinition
-
-
-\starttexdefinition showotfligaturesparagraphset #1
- \showotfligatureslineset {
- \hsize \zeropoint
- \lefthyphenmin \plustwo
- \righthyphenmin\plustwo
- #1
- }
-\stoptexdefinition
-
-\starttexdefinition showotfligaturesextremeset #1
- \showotfligatureslineset {
- \hsize \zeropoint
- \lefthyphenmin \plusone
- \righthyphenmin\plusone
- #1
- }
-\stoptexdefinition
-
-\starttexdefinition showotfligatureslines #1
- \bTR[height=4ex,bottomframe=off]
- \processcommalist[#1]\showotfligatureslineset
- \eTR
-\stoptexdefinition
-
-\starttexdefinition showotfligaturesparagraphs #1
- \bTR[topframe=off]
- \processcommalist[#1]\showotfligaturesparagraphset
- \eTR
-\stoptexdefinition
-
-\starttexdefinition showotfligaturesextremes #1
- \bTR[topframe=off]
- \processcommalist[#1]\showotfligaturesextremeset
- \eTR
-\stoptexdefinition
-
-\starttexdefinition showotfligaturesdefaults
- \bTR
- \bTD [nx=\showotfligaturesnx,width=\showotfligatureswidth,align=middle,height=4ex,frame=off]
- \start \LigatureFont fb \stop \quad
- \start \LigatureFont ff \stop \quad
- \start \LigatureFont fi \stop \quad
- \start \LigatureFont fk \stop \quad
- \start \LigatureFont fl \stop \quad
- \start \LigatureFont ft \stop \quad
- \start \LigatureFont ffb \stop \quad
- \start \LigatureFont fff \stop \quad
- \start \LigatureFont ffi \stop \quad
- \start \LigatureFont ffl \stop \quad
- \start \LigatureFont ffk \stop \quad
- \start \LigatureFont fft \stop
- \eTD
- \eTR
-\stoptexdefinition
-
-\starttexdefinition showotfligaturesexample #1#2
- \showotfligaturescaptions {#1}
- \showotfligatureslines {#2}
- \showotfligaturesparagraphs{#2}
- \showotfligaturesextremes {#2}
-\stoptexdefinition
-
-% todo: n -> and split in lua
-
-\starttexdefinition showotfligaturesexamples
- \showotfligaturesexample
- {leafing,baffling,efficient,shifffahrt}
- {leafing,baffling,efficient,shifffahrt}
- \showotfligaturesexample
- {offbeat,effect,ef-fective,ef\-fective}
- {offbeat,effect,ef-fective,ef\-fective}
- \showotfligaturesexample
- {xf+fi+a,xff+i+b,xffi+c,xffid}
- {xffia, xffib, xffic, xffid}
-\stoptexdefinition
-
-\starttexdefinition showotfligatures [#1]
- \begingroup
- \getdummyparameters[font=Regular,features=default,#1]
- \definefont[LigatureFont][\dummyparameter{font}*\dummyparameter{features},otfligaturetest ht 2ex]
- \bTABLE[leftframe=off,rightframe=off]
- \showotfligaturesbanner{\dummyparameter{font} * \dummyparameter{features}}
- \showotfligaturesdefaults
- \showotfligaturesexamples
- \eTABLE
- \endgroup
-\stoptexdefinition
-
-\continueifinputfile{s-fonts-ligatures.mkiv}
-
-\starttext
-
- \startTEXpage[offset=10pt] \showotfligatures[font=lmroman10-regular.otf, features=default] \stopTEXpage
- \startTEXpage[offset=10pt] \showotfligatures[font=dejavu-serif.ttf, features=default] \stopTEXpage
- \startTEXpage[offset=10pt] \showotfligatures[font=minionpro.otf, features=default] \stopTEXpage
- \startTEXpage[offset=10pt] \showotfligatures[font=minionpro.otf, features=smallcaps] \stopTEXpage
- \startTEXpage[offset=10pt] \showotfligatures[font=brill.otf, features=default] \stopTEXpage
- \startTEXpage[offset=10pt] \showotfligatures[font=gentiumplus-r.ttf, features=default] \stopTEXpage
- \startTEXpage[offset=10pt] \showotfligatures[font=cambria, features=default] \stopTEXpage
-
-\stoptext
-
-% \startluacode
-%
-% local f = fonts.hashes.identifiers[true]
-%
-% local sequences = f.resources.sequences
-% local descriptions = f.shared.rawdata.descriptions
-% local lookuptypes = f.resources.lookuptypes
-% local lookups = f.resources.lookups
-%
-% local ligatures = { "liga", "dlig", "rlig", "clig", "tlig", "ccmp" }
-% local found = { }
-%
-% for i=1,#sequences do
-% local sequence = sequences[i]
-% local features = sequence.features
-% for i=1,#ligatures do
-% local l = ligatures[i]
-% if features[l] then
-% local subtables = sequence.subtables
-% if subtables then
-% for i=1,#subtables do
-% local subtable = subtables[i]
-% local lookup = found[subtable]
-% if lookup then
-% lookup[l] = true
-% else
-% found[subtable] = { [l] = true }
-% end
-% end
-% end
-% end
-% end
-% end
-%
-% context.starttabulate { "|||T|T|T|" }
-%
-% local function flush(l,v,start,unicode,data,done)
-% local features = found[l]
-% if features then
-% local lookuptype = lookuptypes[l]
-% if lookuptype == "ligature" then
-% local t = { }
-% for i=1,#v do
-% t[i] = utf.char(v[i])
-% end
-% t = table.concat(t," ")
-% if not done[t] then
-% context.NC()
-% context(t)
-% context.NC()
-% context(utf.char(unicode))
-% context.NC()
-% context(" %t",table.sortedkeys(features))
-% context.NC()
-% local name = data.name
-% if name then
-% context(name)
-% end
-% context.NC()
-% context("%U",unicode)
-% context.NC()
-% context.NR()
-% done[t] = true
-% end
-% end
-% end
-% end
-%
-% for unicode, data in table.sortedhash(descriptions) do
-% local slookups = data.slookups
-% local mlookups = data.mlookups
-% local done = { }
-% if slookups then
-% for l, v in next, slookups do
-% flush(l,v,1,unicode,data,done)
-% end
-% end
-% if mlookups then
-% for i=1,#mlookups do
-% local v = mlookups[i]
-% flush(v[1],v,2,unicode,data,done)
-% end
-% end
-% end
-%
-% context.stoptabulate()
-%
-% \stopluacode
diff --git a/Master/texmf-dist/tex/context/base/s-fonts-missing.lua b/Master/texmf-dist/tex/context/base/s-fonts-missing.lua
deleted file mode 100644
index 9a75676a908..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fonts-missing.lua
+++ /dev/null
@@ -1,91 +0,0 @@
-if not modules then modules = { } end modules ['s-fonts-missing'] = {
- version = 1.001,
- comment = "companion to s-fonts-missing.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-moduledata.fonts = moduledata.fonts or { }
-moduledata.fonts.missing = moduledata.fonts.missing or { }
-
-local function legend(id)
- local c = fonts.hashes.identifiers[id]
- local privates = c.properties.privates
- if privates then
- local categories = table.swapped(fonts.loggers.category_to_placeholder)
- context.starttabulate { "|c|l|" }
- context.HL()
- context.NC()
- context.bold("symbol")
- context.NC()
- context.bold("name")
- context.NC()
- context.NR()
- context.HL()
- for k, v in table.sortedhash(privates) do
- local tag = characters.categorytags[categories[k]]
- if tag and tag ~= "" then
- context.NC()
- context.dontleavehmode()
- context.char(v)
- context.NC()
- context(k)
- context.NC()
- context.NR()
- end
- end
- context.HL()
- context.stoptabulate()
- end
-end
-
-function moduledata.fonts.missing.showlegend(specification)
- specification = interfaces.checkedspecification(specification)
- context.begingroup()
- context.definedfont { "Mono*missing" } -- otherwise no privates added
- context(function() legend(specification.id or font.current()) end)
- context.endgroup()
-end
-
-local function missings()
- local collected = fonts.checkers.getmissing()
- for filename, list in table.sortedhash(collected) do
- if #list > 0 then
- context.starttabulate { "|l|l|" }
- context.NC()
- context.bold("filename")
- context.NC()
- context(file.basename(filename))
- context.NC()
- context.NR()
- context.NC()
- context.bold("missing")
- context.NC()
- context(#list)
- context.NC()
- context.NR()
- context.stoptabulate()
- context.starttabulate { "|l|c|l|" }
- for i=1,#list do
- local u = list[i]
- context.NC()
- context("%U",u)
- context.NC()
- context.char(u)
- context.NC()
- context(characters.data[u].description)
- context.NC()
- context.NR()
- end
- context.stoptabulate()
- end
- end
-end
-
-function moduledata.fonts.missing.showcharacters(specification)
- context.begingroup()
- context.definedfont { "Mono*missing" } -- otherwise no privates added
- context(function() missings() end)
- context.endgroup()
-end
diff --git a/Master/texmf-dist/tex/context/base/s-fonts-missing.mkiv b/Master/texmf-dist/tex/context/base/s-fonts-missing.mkiv
deleted file mode 100644
index c566f4995d3..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fonts-missing.mkiv
+++ /dev/null
@@ -1,56 +0,0 @@
-%D \module
-%D [ file=s-fonts-missing,
-%D version=2011.10.30,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Some Missing Character Info,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\startmodule[fonts-missing]
-
-\registerctxluafile{s-fonts-missing}{}
-
-\installmodulecommandluasingle \showmissingcharacterslegend {moduledata.fonts.missing.showlegend}
-\installmodulecommandluasingle \showmissingcharacters {moduledata.fonts.missing.showcharacters}
-
-\stopmodule
-
-\continueifinputfile{s-fonts-missing.mkiv}
-
-% the sooner, the more efficient, see log for details
-
-\enabletrackers[fonts.missing=replace]
-
-% \definefontfeature[default][default][missing=yes] % automatically when enabled
-
-\starttext
-
- \page legend: \blank
-
- \showmissingcharacterslegend
-
- \page sample: \blank
-
- ½ ⅓ ¼ ⅕ ⅙ ⅛ {\bf ½ ⅓ ¼ ⅕ ⅙ ⅛} \blank
-
- \startluacode
- for i=1,1000 do
- local c = characters.data[i]
- if c then
- context.char(c.unicodeslot)
- context.space()
- end
- end
- \stopluacode
-
- \page characters: \blank
-
- \showmissingcharacters
-
-\stoptext
-
diff --git a/Master/texmf-dist/tex/context/base/s-fonts-shapes.lua b/Master/texmf-dist/tex/context/base/s-fonts-shapes.lua
deleted file mode 100644
index bca860f3fb8..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fonts-shapes.lua
+++ /dev/null
@@ -1,323 +0,0 @@
-if not modules then modules = { } end modules['s-fonts-shapes'] = {
- version = 1.001,
- comment = "companion to s-fonts-shapes.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-moduledata.fonts = moduledata.fonts or { }
-moduledata.fonts.shapes = moduledata.fonts.shapes or { }
-
-local fontdata = fonts.hashes.identifiers
-
-local context = context
-local NC, NR = context.NC, context.NR
-local space, dontleavehmode, glyph, getvalue = context.space, context.dontleavehmode, context.glyph, context.getvalue
-local formatters = string.formatters
-
-function char(id,k)
- dontleavehmode()
- glyph(id,k)
-end
-
-local function special(id,specials)
- if specials and #specials > 1 then
- context("%s:",specials[1])
- if #specials > 5 then
- space() char(id,specials[2])
- space() char(id,specials[3])
- space() context("...")
- space() char(id,specials[#specials-1])
- space() char(id,specials[#specials])
- else
- for i=2,#specials do
- space() char(id,specials[i])
- end
- end
- end
-end
-
-function moduledata.fonts.shapes.showlist(specification) -- todo: ranges
- specification = interfaces.checkedspecification(specification)
- local id, cs = fonts.definers.internal(specification,"<module:fonts:shapes:font>")
- local chrs = fontdata[id].characters
- context.begingroup()
- context.tt()
- context.starttabulate { "|l|c|c|c|c|l|l|" }
- context.FL()
- NC() context.bold("unicode")
- NC() context.bold("glyph")
- NC() context.bold("shape")
- NC() context.bold("lower")
- NC() context.bold("upper")
- NC() context.bold("specials")
- NC() context.bold("description")
- NC() NR()
- context.TL()
- for k, v in next, characters.data do
- if chrs[k] then
- NC() context("0x%05X",k)
- NC() char(id,k) -- getvalue(cs) context.char(k)
- NC() char(id,v.shcode)
- NC() char(id,v.lccode or k)
- NC() char(id,v.uccode or k)
- NC() special(id,v.specials)
- NC() context.tx(v.description)
- NC() NR()
- end
- end
- context.stoptabulate()
- context.endgroup()
-end
-
-function moduledata.fonts.shapes.showlist(specification) -- todo: ranges
- specification = interfaces.checkedspecification(specification)
- local id, cs = fonts.definers.internal(specification,"<module:fonts:shapes:font>")
- local chrs = fontdata[id].characters
- context.begingroup()
- context.tt()
- context.starttabulate { "|l|c|c|c|c|l|l|" }
- context.FL()
- NC() context.bold("unicode")
- NC() context.bold("glyph")
- NC() context.bold("shape")
- NC() context.bold("lower")
- NC() context.bold("upper")
- NC() context.bold("specials")
- NC() context.bold("description")
- NC() NR()
- context.TL()
- for k, v in next, characters.data do
- if chrs[k] then
- NC() context("0x%05X",k)
- NC() char(id,k)
- NC() char(id,v.shcode)
- NC() char(id,v.lccode or k)
- NC() char(id,v.uccode or k)
- NC() special(id,v.specials)
- NC() context.tx(v.description)
- NC() NR()
- end
- end
- context.stoptabulate()
- context.endgroup()
-end
-
-local descriptions = nil
-local characters = nil
-
-local function showglyphshape(specification)
- specification = interfaces.checkedspecification(specification)
- local id, cs = fonts.definers.internal(specification,"<module:fonts:shapes:font>")
- local tfmdata = fontdata[id]
- local charnum = tonumber(specification.character)
- if not charnum then
- charnum = fonts.helpers.nametoslot(n)
- end
- context.start()
- context.dontleavehmode()
- context.obeyMPboxdepth()
- local characters = tfmdata.characters
- local descriptions = tfmdata.descriptions
- local parameters = tfmdata.parameters
- local c = characters[charnum]
- local d = descriptions[charnum]
- if d then
- local factor = (parameters.size/parameters.units)*((7200/7227)/65536)
- local llx, lly, urx, ury = unpack(d.boundingbox)
- llx, lly, urx, ury = llx*factor, lly*factor, urx*factor, ury*factor
- local width, italic = (d.width or 0)*factor, (d.italic or 0)*factor
- local top_accent, bot_accent = (d.top_accent or 0)*factor, (d.bot_accent or 0)*factor
- local anchors, math = d.anchors, d.math
- context.startMPcode()
- context("numeric lw ; lw := .125bp ;")
- context("pickup pencircle scaled lw ;")
- context('picture p ; p := image(draw textext.drt("\\getuvalue{%s}\\gray\\char%s");); draw p ;',cs,charnum)
- context('draw (%s,%s)--(%s,%s)--(%s,%s)--(%s,%s)--cycle withcolor green ;',llx,lly,urx,lly,urx,ury,llx,ury)
- context('draw (%s,%s)--(%s,%s) withcolor green ;',llx,0,urx,0)
- context('draw boundingbox p withcolor .2white withpen pencircle scaled .065bp ;')
- context("defaultscale := 0.05 ; ")
- -- inefficient but non critical
- local function slant_1(v,dx,dy,txt,xsign,ysign,loc,labloc)
- if #v > 0 then
- local l = { }
- for kk, vv in ipairs(v) do
- local h, k = vv.height, vv.kern
- if h and k then
- l[#l+1] = formatters["((%s,%s) shifted (%s,%s))"](xsign*k*factor,ysign*h*factor,dx,dy)
- end
- end
- context("draw ((%s,%s) shifted (%s,%s))--%s dashed (evenly scaled 1/16) withcolor .5white;", xsign*v[1].kern*factor,lly,dx,dy,l[1])
- context("draw laddered (%s) withcolor .5white ;",table.concat(l,".."))
- context("draw ((%s,%s) shifted (%s,%s))--%s dashed (evenly scaled 1/16) withcolor .5white;", xsign*v[#v].kern*factor,ury,dx,dy,l[#l])
- for k, v in ipairs(l) do
- context("draw %s withcolor blue withpen pencircle scaled 2lw ;",v)
- end
- end
- end
- local function slant_2(v,dx,dy,txt,xsign,ysign,loc,labloc)
- if #v > 0 then
- local l = { }
- for kk, vv in ipairs(v) do
- local h, k = vv.height, vv.kern
- if h and k then
- l[#l+1] = formatters["((%s,%s) shifted (%s,%s))"](xsign*k*factor,ysign*h*factor,dx,dy)
- end
- end
- if loc == "top" then
- context('label.%s("\\type{%s}",%s shifted (0,-1bp)) ;',loc,txt,l[#l])
- else
- context('label.%s("\\type{%s}",%s shifted (0,2bp)) ;',loc,txt,l[1])
- end
- for kk, vv in ipairs(v) do
- local h, k = vv.height, vv.kern
- if h and k then
- context('label.top("(%s,%s)",%s shifted (0,-2bp));',k,h,l[kk])
- end
- end
- end
- end
- if math then
- local kerns = math.kerns
- if kerns then
- for _, slant in ipairs { slant_1, slant_2 } do
- for k,v in pairs(kerns) do
- if k == "top_right" then
- slant(v,width+italic,0,k,1,1,"top","ulft")
- elseif k == "bottom_right" then
- slant(v,width,0,k,1,1,"bot","lrt")
- elseif k == "top_left" then
- slant(v,0,0,k,-1,1,"top","ulft")
- elseif k == "bottom_left" then
- slant(v,0,0,k,-1,1,"bot","lrt")
- end
- end
- end
- end
- end
- local function show(x,y,txt)
- local xx, yy = x*factor, y*factor
- context("draw (%s,%s) withcolor blue withpen pencircle scaled 2lw ;",xx,yy)
- context('label.top("\\type{%s}",(%s,%s-2bp)) ;',txt,xx,yy)
- context('label.bot("(%s,%s)",(%s,%s+2bp)) ;',x,y,xx,yy)
- end
- if anchors then
- local a = anchors.baselig
- if a then
- for k, v in pairs(a) do
- for kk, vv in ipairs(v) do
- show(vv[1],vv[2],k .. ":" .. kk)
- end
- end
- end
- local a = anchors.mark
- if a then
- for k, v in pairs(a) do
- show(v[1],v[2],k)
- end
- end
- local a = anchors.basechar
- if a then
- for k, v in pairs(a) do
- show(v[1],v[2],k)
- end
- end
- local ba = anchors.centry
- if a then
- for k, v in pairs(a) do
- show(v[1],v[2],k)
- end
- end
- local a = anchors.cexit
- if a then
- for k, v in pairs(a) do
- show(v[1],v[2],k)
- end
- end
- end
- if italic ~= 0 then
- context('draw (%s,%s-1bp)--(%s,%s-0.5bp) withcolor blue ;',width,ury,width,ury)
- context('draw (%s,%s-1bp)--(%s,%s-0.5bp) withcolor blue ;',width+italic,ury,width+italic,ury)
- context('draw (%s,%s-1bp)--(%s,%s-1bp) withcolor blue ;',width,ury,width+italic,ury)
- context('label.lft("\\type{%s}",(%s+2bp,%s-1bp));',"italic",width,ury)
- context('label.rt("%s",(%s-2bp,%s-1bp));',d.italic,width+italic,ury)
- end
- if top_accent ~= 0 then
- context('draw (%s,%s+1bp)--(%s,%s-1bp) withcolor blue;',top_accent,ury,top_accent,ury)
- context('label.bot("\\type{%s}",(%s,%s+1bp));',"top_accent",top_accent,ury)
- context('label.top("%s",(%s,%s-1bp));',d.top_accent,top_accent,ury)
- end
- if bot_accent ~= 0 then
- context('draw (%s,%s+1bp)--(%s,%s-1bp) withcolor blue;',bot_accent,lly,bot_accent,lly)
- context('label.top("\\type{%s}",(%s,%s-1bp));',"bot_accent",top_accent,ury)
- context('label.bot("%s",(%s,%s+1bp));',d.bot_accent,bot_accent,lly)
- end
- context('draw origin withcolor red withpen pencircle scaled 2lw;')
- context("setbounds currentpicture to boundingbox currentpicture enlarged 1bp ;")
- context("currentpicture := currentpicture scaled 8 ;")
- context.stopMPcode()
- -- elseif c then
- -- lastdata, lastunicode = nil, nil
- -- local factor = (7200/7227)/65536
- -- context.startMPcode()
- -- context("pickup pencircle scaled .25bp ; ")
- -- context('picture p ; p := image(draw textext.drt("\\gray\\char%s");); draw p ;',charnum)
- -- context('draw boundingbox p withcolor .2white withpen pencircle scaled .065bp ;')
- -- context("defaultscale := 0.05 ; ")
- -- local italic, top_accent, bot_accent = (c.italic or 0)*factor, (c.top_accent or 0)*factor, (c.bot_accent or 0)*factor
- -- local width, height, depth = (c.width or 0)*factor, (c.height or 0)*factor, (c.depth or 0)*factor
- -- local ury = height
- -- if italic ~= 0 then
- -- context('draw (%s,%s-1bp)--(%s,%s-0.5bp) withcolor blue;',width,ury,width,ury)
- -- context('draw (%s,%s-1bp)--(%s,%s-0.5bp) withcolor blue;',width+italic,ury,width+italic,ury)
- -- context('draw (%s,%s-1bp)--(%s,%s-1bp) withcolor blue;',width,ury,width+italic,height)
- -- context('label.lft("\\type{%s}",(%s+2bp,%s-1bp));',"italic",width,height)
- -- context('label.rt("%6.3f bp",(%s-2bp,%s-1bp));',italic,width+italic,height)
- -- end
- -- if top_accent ~= 0 then
- -- context('draw (%s,%s+1bp)--(%s,%s-1bp) withcolor blue;',top_accent,ury,top_accent,height)
- -- context('label.bot("\\type{%s}",(%s,%s+1bp));',"top_accent",top_accent,height)
- -- context('label.top("%6.3f bp",(%s,%s-1bp));',top_accent,top_accent,height)
- -- end
- -- if bot_accent ~= 0 then
- -- context('draw (%s,%s+1bp)--(%s,%s-1bp) withcolor blue;',bot_accent,lly,bot_accent,height)
- -- context('label.top("\\type{%s}",(%s,%s-1bp));',"bot_accent",top_accent,height)
- -- context('label.bot("%6.3f bp",(%s,%s+1bp));',bot_accent,bot_accent,height)
- -- end
- -- context('draw origin withcolor red withpen pencircle scaled 1bp;')
- -- context("setbounds currentpicture to boundingbox currentpicture enlarged 1bp ;")
- -- context("currentpicture := currentpicture scaled 8 ;")
- -- context.stopMPcode()
- else
- lastdata, lastunicode = nil, nil
- context("no such shape: 0x%05X",charnum)
- end
- context.stop()
-end
-
-moduledata.fonts.shapes.showglyphshape = showglyphshape
-
-function moduledata.fonts.shapes.showallglypshapes(specification)
- specification = interfaces.checkedspecification(specification)
- local id, cs = fonts.definers.internal(specification,"<module:fonts:shapes:font>")
- local descriptions = fontdata[id].descriptions
- for unicode, description in fonts.iterators.descriptions(tfmdata) do
- context.modulefontsstartshowglyphshape(unicode,description.name)
- showglyphshape { number = id, character = unicode }
- context.modulefontsstopshowglyphshape()
- end
-end
-
-function moduledata.fonts.shapes.showlastglyphshapefield(unicode,name)
- if not descriptions then
- -- bad news
- elseif name == "unicode" then
- context("U+%05X",descriptions.unicode)
- else
- local d = descriptions[name]
- if d then
- context(d)
- end
- end
-end
diff --git a/Master/texmf-dist/tex/context/base/s-fonts-shapes.mkiv b/Master/texmf-dist/tex/context/base/s-fonts-shapes.mkiv
deleted file mode 100644
index f8eb8ffddd3..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fonts-shapes.mkiv
+++ /dev/null
@@ -1,117 +0,0 @@
-%D \module
-%D [ file=s-fonts-shapes, % s-fnt-29,
-%D version=2010.09.27,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Tracing Shapes,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\startmodule[fonts-shapes]
-
-\registerctxluafile{s-fonts-shapes}{}
-
-\installmodulecommandluasingle \showfontshapes {moduledata.fonts.shapes.showlist}
-\installmodulecommandluasingle \showglyphshape {moduledata.fonts.shapes.showglypshape}
-\installmodulecommandluatwo \showlastglyphshapefield {moduledata.fonts.shapes.showlastglyphshapefield}
-\installmodulecommandluasingle \showallglyphshapes {moduledata.fonts.shapes.showallglypshapes}
-
-\let\modulefontsstartshowglyphshape\relax
-\let\modulefontsstopshowglyphshape \relax
-
-\unprotect
-
-\startsetups module:showallglyphshapes:start
-
- \def\modulefontsstartshowglyphshape##1##2{
- \startTEXpage[\c!offset=\exheight]
- \edef\lastshownglyphshapefieldunicode{##1}%
- \edef\lastshownglyphshapefieldname {##2}%
- \raggedcenter
- }
-
- \def\modulefontsstopshowglyphshape {
- \par
- \doifsomething {\lastshownglyphshapefieldunicode} {
- \begingroup
- \dontleavehmode
- \tttf
- \setstrut
- \strut
- 0x\uchexnumbers\lastshownglyphshapefieldunicode
- :\space
- \lastshownglyphshapefieldname
- \par
- \endgroup
- }
- \stopTEXpage
- }
-
-\stopsetups
-
-\protect
-
-% downward compatibility:
-
-\unexpanded\def\ShowGlyphShape#1#2#3% name size glyph
- {\ctxlua{moduledata.fonts.shapes.showglyphshape { name = "#1", size = "#2", character = "#3" } }}
-
-\stopmodule
-
-\continueifinputfile{s-fonts-shapes.mkiv}
-
-\setupbodyfont[dejavu,9pt]
-
-\setuplayout
- [backspace=1cm,
- topspace=1cm,
- footer=1cm,
- header=0cm,
- height=middle,
- width=middle]
-
-\setupfootertexts
- []
- [\saveddefinedfontname\quad\pagenumber]
-
-\starttext
-
- \savedefinedfont[Bold*default]
-
- \showfontshapes[number=\saveddefinedfontid]
-
- \page
-
- \showfontshapes[name=BoldItalic*default]
-
- \page
-
- % \startTEXpage \ShowGlyphShape{simplenaskhi}{100bp}{0x62A} \stopTEXpage
- % \startTEXpage \ShowGlyphShape{simplenaskhi}{100bp}{0x2004} \stopTEXpage
- % \startTEXpage \ShowGlyphShape{simplenaskhi}{100bp}{0xF0299} \stopTEXpage
- % \startTEXpage \ShowGlyphShape{simplenaskhi}{100bp}{NameMe.1190} \stopTEXpage
-
- \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{20bp}{0x00066}\stopTEXpage
- \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{20bp}{0x1D453}\stopTEXpage
- \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{20bp}{0x1D43F}\stopTEXpage
- \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x1D444}\stopTEXpage
- \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x1D447}\stopTEXpage
- \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x02112}\stopTEXpage
- \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x1D432}\stopTEXpage
- \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x1D43D}\stopTEXpage
- \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x1D44A}\stopTEXpage
- \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x1D45D}\stopTEXpage
-
- \page
-
- % \showallglyphshapes[name=name:cambria-math,size=100bp]
- % \showallglyphshapes[name=name:dejavuserif,size=100bp]
-
-\stoptext
-
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-fonts-system.lua b/Master/texmf-dist/tex/context/base/s-fonts-system.lua
deleted file mode 100644
index 0c0ad4d863c..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fonts-system.lua
+++ /dev/null
@@ -1,68 +0,0 @@
-if not modules then modules = { } end modules ['s-fonts-system'] = {
- version = 1.001,
- comment = "companion to s-fonts-system.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
--- ["zapfinoforteltpro"]={
--- ["designsize"]=0,
--- ["familyname"]="zapfinoforteltpro",
--- ["filename"]="zapfinoforteltpro.otf",
--- ["fontname"]="zapfinoforteltpro",
--- ["fontweight"]="regular",
--- ["format"]="otf",
--- ["fullname"]="zapfinoforteltpro",
--- ["maxsize"]=0,
--- ["minsize"]=0,
--- ["modification"]=1105543074,
--- ["modifiers"]="regular",
--- ["rawname"]="ZapfinoForteLTPro",
--- ["style"]="normal",
--- ["subfamily"]="regular",
--- ["variant"]="normal",
--- ["weight"]="normal",
--- ["width"]="normal",
--- }
-
-moduledata.fonts = moduledata.fonts or { }
-moduledata.fonts.system = moduledata.fonts.system or { }
-
-local lower = string.lower
-
-local context = context
-local NC, NR, HL = context.NC, context.NR, context.HL
-local bold = context.bold
-
-function moduledata.fonts.system.showinstalled(specification)
- specification = interfaces.checkedspecification(specification)
- local pattern = lower(specification.pattern or "")
- local list = fonts.names.list(pattern,false,true)
- if list then
- local files = { }
- for k, v in next, list do
- files[file.basename(string.lower(v.filename))] = v
- end
- context.starttabulate { "|Tl|Tl|Tl|Tl|Tl|Tl|" }
- HL()
- NC() bold("filename")
- NC() bold("fontname")
- NC() bold("subfamily")
- NC() bold("variant")
- NC() bold("weight")
- NC() bold("width")
- NC() NR()
- HL()
- for filename, data in table.sortedpairs(files) do
- NC() context(filename)
- NC() context(data.fontname)
- NC() context(data.subfamily)
- NC() context(data.variant)
- NC() context(data.weight)
- NC() context(data.width)
- NC() NR()
- end
- context.stoptabulate()
- end
-end
diff --git a/Master/texmf-dist/tex/context/base/s-fonts-system.mkiv b/Master/texmf-dist/tex/context/base/s-fonts-system.mkiv
deleted file mode 100644
index 6d9082a6bdc..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fonts-system.mkiv
+++ /dev/null
@@ -1,39 +0,0 @@
-%D \module
-%D [ file=s-fonts0system, % s-fnt-11,
-%D version=2006.02.01, % or so
-%D title=\CONTEXT\ Style File,
-%D subtitle=Listing Installed Fonts,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 code usd to be in the kernel but since it's hardly used
-%D it's now a module.
-%D
-%D \starttyping
-%D \showinstalledfonts[pattern={officinasans.*}]
-%D \showinstalledfonts[pattern={officinaserif.*}]
-%D \showinstalledfonts[pattern={officina.*itc.*}]
-%D \stoptyping
-
-\startmodule[fonts-system]
-
-\registerctxluafile{s-fonts-system}{}
-
-\installmodulecommandluasingle \showinstalledfonts {moduledata.fonts.system.showinstalled}
-
-\stopmodule
-
-\continueifinputfile{s-fonts-system.mkiv}
-
-\usemodule[art-01] \setuplayout[overview] \setupbodyfont[7pt]
-
-\starttext
-
- \showinstalledfonts
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-fonts-tables.lua b/Master/texmf-dist/tex/context/base/s-fonts-tables.lua
deleted file mode 100644
index b3dac7d0630..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fonts-tables.lua
+++ /dev/null
@@ -1,321 +0,0 @@
-if not modules then modules = { } end modules ['s-fonts-tables'] = {
- version = 1.001,
- comment = "companion to s-fonts-tables.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-moduledata.fonts = moduledata.fonts or { }
-moduledata.fonts.tables = moduledata.fonts.tables or { }
-
-local setmetatableindex = table.setmetatableindex
-local sortedhash = table.sortedhash
-local sortedkeys = table.sortedkeys
-local format = string.format
-local concat = table.concat
-
-local tabletracers = moduledata.fonts.tables
-
-local digits = {
- dflt = {
- dflt = "1234567890 1/2",
- },
- arab = {
- dflt = "",
- },
- latn = {
- dflt = "1234567890 1/2",
- }
-}
-
-local punctuation = {
- dflt = {
- dflt = ". , : ; ? ! ‹ › « »",
- },
-}
-
-local symbols = {
- dflt = {
- dflt = "@ # $ % & * () [] {} <> + - = / |",
- },
-}
-
-local LATN = "abcdefghijklmnopqrstuvwxyz"
-
-local uppercase = {
- latn = {
- dflt = LATN,
- fra = LATN .. " ÀÃÂÈÉÊÒÓÔÙÚÛÆÇ",
- },
- grek = {
- dftl = "ΑΒΓΔΕΗΘΙΚΛΜÎΞΟΠΡΣΤΥΦΧΨΩ",
- },
- cyrl= {
- dflt = "ÐБВГДЕЖЗИІЙКЛМÐОПРСТУФХЦЧШЩЪЫЬѢЭЮЯѲ"
- },
-}
-
-local latn = "abcdefghijklmnopqrstuvwxyz"
-
-local lowercase = {
- latn = {
- dftl = latn,
- nld = latn .. " ïèéë",
- deu = latn .. " äöüß",
- fra = latn .. " àáâèéêòóôùúûæç",
- },
- grek = {
- dftl = "αβγδεηθικλμνξοπÏστυφχψω",
- },
- cyrl= {
- dflt = "абвгдежзиійклмнопрÑтуфхцчшщъыьѣÑÑŽÑѳ"
- },
- arab = {
- dflt = "ابجدهوزحطيكلمنسعÙصقرشتثخذضظغ"
- },
-}
-
-local samples = {
- digits = digits,
- punctuation = punctuation,
- symbols = symbols,
- uppercase = uppercase,
- lowercase = lowercase,
-}
-
-tabletracers.samples = samples
-
-setmetatableindex(uppercase, function(t,k) return rawget(t,"latn") end)
-setmetatableindex(lowercase, function(t,k) return rawget(t,"latn") end)
-setmetatableindex(digits, function(t,k) return rawget(t,"dflt") end)
-setmetatableindex(symbols, function(t,k) return rawget(t,"dflt") end)
-setmetatableindex(punctuation, function(t,k) return rawget(t,"dflt") end)
-
-setmetatableindex(uppercase.latn, function(t,k) return rawget(t,"dflt") end)
-setmetatableindex(uppercase.grek, function(t,k) return rawget(t,"dflt") end)
-setmetatableindex(uppercase.cyrl, function(t,k) return rawget(t,"dflt") end)
-
-setmetatableindex(lowercase.latn, function(t,k) return rawget(t,"dflt") end)
-setmetatableindex(lowercase.grek, function(t,k) return rawget(t,"dflt") end)
-setmetatableindex(lowercase.cyrl, function(t,k) return rawget(t,"dflt") end)
-
-setmetatableindex(digits.dflt, function(t,k) return rawget(t,"dflt") end)
-setmetatableindex(symbols.dflt, function(t,k) return rawget(t,"dflt") end)
-setmetatableindex(punctuation.dflt, function(t,k) return rawget(t,"dflt") end)
-
-local function typesettable(t,keys,synonyms,nesting,prefix)
- if t then
- if not prefix then
- context.starttabulate { "|Tl|Tl|Tl|" }
- end
- for k, v in sortedhash(keys) do
- if k == "synonyms" then
- elseif type(v) ~= "table" then
- context.NC()
- if prefix then
- context("%s.%s",prefix,k)
- else
- context(k)
- end
- context.NC()
- local tk = t[k]
- if v == "boolean" then
- context(tostring(tk or false))
- elseif not tk then
- context("<unset>")
- elseif v == "filename" then
- context(file.basename(tk))
- elseif v == "basepoints" then
- context("%sbp",tk)
- elseif v == "scaledpoints" then
- context("%p",tk)
- elseif v == "table" then
- context("<table>")
- else -- if v == "integerscale" then
- context(tostring(tk))
- end
- context.NC()
- local synonym = (not prefix and synonyms[k]) or (prefix and synonyms[format("%s.%s",prefix,k)])
- if synonym then
- context(format("(%s)",concat(synonym," ")))
- end
- context.NC()
- context.NR()
- elseif nesting == false then
- context("<table>")
- else -- true or nil
- typesettable(t[k],v,synonyms,nesting,k)
- end
- end
- if not prefix then
- context.stoptabulate()
- end
- end
-end
-
-local function typeset(t,keys,nesting,prefix)
- local synonyms = keys.synonyms or { }
- local collected = { }
- for k, v in next, synonyms do
- local c = collected[v]
- if not c then
- c = { }
- collected[v] = c
- end
- c[#c+1] = k
- end
- for k, v in next, collected do
- table.sort(v)
- end
- typesettable(t,keys,collected,nesting,prefix)
-end
-
-tabletracers.typeset = typeset
-
-function tabletracers.showproperties(nesting)
- local tfmdata = fonts.hashes.identifiers[font.current()]
- typeset(tfmdata.properties,fonts.constructors.keys.properties,nesting)
-end
-
-function tabletracers.showparameters(nesting)
- local tfmdata = fonts.hashes.identifiers[font.current()]
- typeset(tfmdata.parameters,fonts.constructors.keys.parameters,nesting)
-end
-
-function tabletracers.showpositionings()
- local tfmdata = fonts.hashes.identifiers[font.current()]
- local resources = tfmdata.resources
- if resources then
- local features = resources.features
- if features then
- local gpos = features.gpos
- if gpos and next(gpos) then
- context.starttabulate { "|Tl|Tl|Tlp|" }
- for feature, scripts in sortedhash(gpos) do
- for script, languages in sortedhash(scripts) do
- context.NC()
- context(feature)
- context.NC()
- context(script)
- context.NC()
- context(concat(sortedkeys(languages)," "))
- context.NC()
- context.NR()
- end
- end
- context.stoptabulate()
- else
- context("no entries")
- context.par()
- end
- end
- end
-end
-
-local dynamics = true
-
-function tabletracers.showsubstitutions()
- local tfmdata = fonts.hashes.identifiers[font.current()]
- local resources = tfmdata.resources
- if resources then
- local features = resources.features
- if features then
- local gsub = features.gsub
- if gsub then
- local makes_sense = { }
- for feature, scripts in sortedhash(gsub) do
- for script, languages in sortedhash(scripts) do
- for language in sortedhash(languages) do
- local tag = format("dummy-%s-%s-%s",feature,script,language)
- local fnt = format("file:%s*%s",file.basename(tfmdata.properties.filename),tag)
- context.definefontfeature (
- { tag },
- {
- mode = "node",
- script = script,
- language = language,
- [feature] = "yes"
- }
- )
- if not dynamics then
- context.definefont( { fnt }, { fnt } )
- end
- makes_sense[#makes_sense+1] = {
- feature = feature,
- tag = tag,
- script = script,
- language = language,
- fontname = fnt,
- }
- end
- end
- end
- if #makes_sense > 0 then
- context.starttabulate { "|Tl|Tl|Tl|p|" }
- for i=1,#makes_sense do
- local data = makes_sense[i]
- local script = data.script
- local language = data.language
- context.NC()
- context(data.feature)
- context.NC()
- context(script)
- context.NC()
- context(language)
- context.NC()
- if not dynamics then
- context.startfont { data.fontname }
- else
- context.addff(data.tag)
- end
- context.verbatim(samples.lowercase [script][language]) context.par()
- context.verbatim(samples.uppercase [script][language]) context.par()
- context.verbatim(samples.digits [script][language]) context.par()
- context.verbatim(samples.punctuation[script][language]) context.quad()
- context.verbatim(samples.symbols [script][language])
- if not dynamics then
- context.stopfont()
- end
- context.NC()
- context.NR()
- end
- context.stoptabulate()
- else
- context("no entries")
- context.par()
- end
- end
- end
- end
-end
-
-function tabletracers.showall(specification) -- not interfaced
-
- specification = interfaces.checkedspecification(specification)
-
- if specification.title then
- context.starttitle { title = specification.title }
- end
-
- context.startsubject { title = "Properties" }
- tabletracers.showproperties()
- context.stopsubject()
-
- context.startsubject { title = "Parameters" }
- tabletracers.showparameters()
- context.stopsubject()
-
- context.startsubject { title = "Positioning features" }
- tabletracers.showpositionings()
- context.stopsubject()
-
- context.startsubject { title = "Substitution features" }
- tabletracers.showsubstitutions()
- context.stopsubject()
-
- if title then
- context.stoptitle()
- end
-
-end
diff --git a/Master/texmf-dist/tex/context/base/s-fonts-tables.mkiv b/Master/texmf-dist/tex/context/base/s-fonts-tables.mkiv
deleted file mode 100644
index e962f952d14..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fonts-tables.mkiv
+++ /dev/null
@@ -1,37 +0,0 @@
-%D \module
-%D [ file=s-fonts-tables,
-%D version=2011.10.10,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Basic Font Data Tables,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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: make a mtxrun --script font <name> option
-
-\startmodule[fonts-tables]
-
-\registerctxluafile{s-fonts-tables}{}
-
-\installmodulecommandluasingle \showfonttables {moduledata.fonts.tables.showall}
-\installmodulecommandluasingle \showfontproperties {moduledata.fonts.tables.showproperties}
-\installmodulecommandluasingle \showfontparameters {moduledata.fonts.tables.showparameters}
-\installmodulecommandluasingle \showfontpositionings {moduledata.fonts.tables.showpositionings}
-\installmodulecommandluasingle \showfontsubstitutions {moduledata.fonts.tables.showsubstitutions}
-
-\stopmodule
-
-\continueifinputfile{s-fonts-tables.mkiv}
-
-\usemodule[art-01]
-
-\setupbodyfont
- [cambria]
-
-\starttext
- \showfonttables[title=Cambria]
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-fonts-vectors.lua b/Master/texmf-dist/tex/context/base/s-fonts-vectors.lua
deleted file mode 100644
index af8042f8458..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fonts-vectors.lua
+++ /dev/null
@@ -1,104 +0,0 @@
-if not modules then modules = { } end modules ['s-fonts-vectors'] = {
- version = 1.001,
- comment = "companion to s-fonts-vectors.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-moduledata.fonts = moduledata.fonts or { }
-moduledata.fonts.protrusions = moduledata.fonts.protrusions or { }
-moduledata.fonts.expansions = moduledata.fonts.expansions or { }
-
-local NC, NR = context.NC, context.NR
-
-local classes = fonts.protrusions.classes
-local vectors = fonts.protrusions.vectors
-
-function moduledata.fonts.protrusions.showvector(specification)
- specification = interfaces.checkedspecification(specification)
- local vector = vectors[specification.name or "?"]
- if vector then
- context.blank()
- context.startcolumns { n = specification.columns or 3, balance="yes" }
- context.starttabulate { "|T||cw(.5em)||" }
- for unicode, values in table.sortedhash(vector) do
- NC() context("%U",unicode)
- NC() context("%.02f",values[1])
- NC() context("%c",unicode)
- NC() context("%.02f",values[2])
- NC() NR()
- end
- context.stoptabulate()
- context.stopcolumns()
- context.blank()
- end
-end
-
-function moduledata.fonts.protrusions.showclass(specification)
- specification = interfaces.checkedspecification(specification)
- local class = specification.name and classes[specification.name]
- local classes = class and { class} or classes
- context.starttabulate { "|l|l|r|r|r|" }
- NC() context.bold("name")
- NC() context.bold("vector")
- NC() context.bold("factor")
- NC() context.bold("left")
- NC() context.bold("right")
- NC() NR()
- for name, class in table.sortedhash(classes) do
- NC() context(name)
- NC() context(class.vector)
- NC() context("%.02f",class.factor)
- NC() context("%.02f",class.left)
- NC() context("%.02f",class.right)
- NC() NR()
- end
- context.stoptabulate()
-end
-
-local classes = fonts.expansions.classes
-local vectors = fonts.expansions.vectors
-
-function moduledata.fonts.expansions.showvector(specification)
- specification = interfaces.checkedspecification(specification)
- local vector = vectors[specification.name or "?"]
- if vector then
- context.blank()
- context.startcolumns { n = specification.columns or 3, balance="yes" }
- context.starttabulate { "|T|cw(.5em)||" }
- for unicode, value in table.sortedhash(vector) do
- NC() context("%U",unicode)
- NC() context("%c",unicode)
- NC() context("%.02f",value)
- NC() NR()
- end
- context.stoptabulate()
- context.stopcolumns()
- context.blank()
- end
-end
-
-function moduledata.fonts.expansions.showclass(specification)
- specification = interfaces.checkedspecification(specification)
- local class = specification.name and classes[specification.name]
- local classes = class and { class} or classes
- context.starttabulate { "|l|l|r|r|r|" }
- NC() context.bold("name")
- NC() context.bold("vector")
- NC() context.bold("step")
- NC() context.bold("factor")
- NC() context.bold("stretch")
- NC() context.bold("shrink")
- NC() NR()
- for name, class in table.sortedhash(classes) do
- NC() context(name)
- NC() context(class.vector)
- NC() context("%.02f",class.step)
- NC() context("%.02f",class.factor)
- NC() context("% 2i",class.stretch)
- NC() context("% 2i",class.shrink)
- NC() NR()
- end
- context.stoptabulate()
-end
diff --git a/Master/texmf-dist/tex/context/base/s-fonts-vectors.mkiv b/Master/texmf-dist/tex/context/base/s-fonts-vectors.mkiv
deleted file mode 100644
index 2605fe96403..00000000000
--- a/Master/texmf-dist/tex/context/base/s-fonts-vectors.mkiv
+++ /dev/null
@@ -1,72 +0,0 @@
-%D \module
-%D [ file=s-fonts-vectors, % was s-fnt-51,
-%D version=2012.11.27,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Protrusion and Expansion,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 code is used in the \MKIV\ fonts manual.
-
-\startmodule[fonts-vectors]
-
-\registerctxluafile{s-fonts-vectors}{}
-
-\installmodulecommandluasingle \showprotrusionclass {moduledata.fonts.protrusions.showclass}
-\installmodulecommandluasingle \showprotrusionvector {moduledata.fonts.protrusions.showvector}
-\installmodulecommandluasingle \showexpansionclass {moduledata.fonts.expansions.showclass}
-\installmodulecommandluasingle \showexpansionvector {moduledata.fonts.expansions.showvector}
-
-\stopmodule
-
-\continueifinputfile{s-fonts-vectors.mkiv}
-
-\usemodule[art-01]
-
-\starttext
-
- \startsubject[title=protrusion]
-
- \startsubsubject[title=class]
- \showprotrusionclass
- \stopsubsubject
-
- \startsubsubject[title=vector pure]
- \showprotrusionvector[name=pure]
- \stopsubsubject
-
- \startsubsubject[title=vector punctuation]
- \showprotrusionvector[name=punctuation]
- \stopsubsubject
-
- \startsubsubject[title=vector alpha]
- \showprotrusionvector[name=alpha]
- \stopsubsubject
-
- \startsubsubject[title=vector quality]
- \showprotrusionvector[name=quality]
- \stopsubsubject
-
- \stopsubject
-
- \page
-
- \startsubject[title=expansion]
-
- \startsubsubject[title=class]
- \showprotrusionclass
- \stopsubsubject
-
- \startsubsubject[title=vector quality]
- \showprotrusionvector[name=quality]
- \stopsubsubject
-
- \stopsubject
-
-\stoptext
-
diff --git a/Master/texmf-dist/tex/context/base/s-grk-00.mkii b/Master/texmf-dist/tex/context/base/s-grk-00.mkii
deleted file mode 100644
index f76d0c220b8..00000000000
--- a/Master/texmf-dist/tex/context/base/s-grk-00.mkii
+++ /dev/null
@@ -1,77 +0,0 @@
-%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 ADE \& \CONTEXT\ Development Team}]
-%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-medium]
-
-\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{<r, >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, 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 <er`on ptol'iejron >'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 <eta'irwn.
-\stopgreek
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-inf-01.mkvi b/Master/texmf-dist/tex/context/base/s-inf-01.mkvi
deleted file mode 100644
index 2c0c1681e12..00000000000
--- a/Master/texmf-dist/tex/context/base/s-inf-01.mkvi
+++ /dev/null
@@ -1,260 +0,0 @@
-%D \module
-%D [ file=s-inf-01,
-%D version=2009.07.09,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Information 1 (\MKII/\MKIV\ usage),
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Some day I will generalize this table mechanism. This list is only
-%D right when run in the minimals as my machine might have more files.
-%D
-%D Als, the remaining tex code can proably be lua also which is more
-%D consistent.
-%D
-%D \starttyping
-%D context auto:s-inf-01
-%D context auto:s-inf-01 --basepath=t:/texmf/tex/context/base
-%D \stoptyping
-
-% \enabletrackers[context.*]
-
-\startluacode
- local format, gsub, find, match = string.format, string.gsub, string.find, string.match
-
- local list, size, comp, used, nope = { }, { }, { }, { mkii = { }, mkiv = { }, mkvi = { } }, { 0, 0, 0, 0, 0 }
-
- local omit = {
- "char%-def%.lua",
- "mult%-def%.lua", "mult%-..%.mkii", "mult%-m..%.mkii",
- }
- local skip = {
- "prag%-.*%.tex", "docs%-.*.tex", "list%-.*%.tex", "test%-.*%.tex", "demo%-.*%.tex",
- "opti%-.*%.tex", "chrt%-.*%.tex", ".*%-old", ".*%-obs", ".*%-tst", "supp%-.*%.tex",
- "colo%-pan.tex", ".*test.*"
- }
- local types = {
- "tex", "mkii", "mkiv", "mkvi", "lua"
- }
- local patterns = {
- "^([a-z][a-z][a-z][a-z])%-[a-z0-9%-]+%.[a-z]+",
- "^([xms])%-[a-z0-9%-]+%.[a-z]+",
- }
-
- local function collect(list,suffix,n)
- local path = document.arguments.basepath or file.dirname(resolvers.find_file("context.mkiv"),".")
- local pattern = path .. "/*." .. suffix .. "$" -- avoid bla.tex~
- local texfiles = dir.glob(pattern)
- for i=1,#texfiles do
- local name = texfiles[i]
- local base = file.basename(name)
- for p=1,#patterns do
- local category = match(base,patterns[p])
- if category and lfs.isfile(name) then
- local okay = true
- for s=1,#skip do
- if find(base,skip[s]) then
- okay = false
- break
- end
- end
- if okay then
- local lm, sm, cm = list[category], size[category], comp[category]
- if not lm then
- lm, sm, cm = { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 }
- list[category], size[category], comp[category] = lm, sm, cm
- end
- lm[n] = lm[n] + 1
- local done = true
- for o=1,#omit do
- if find(base,omit[o]) then
- done = false
- break
- end
- end
- local data = io.loaddata(name)
- if data then
- if suffix == "lua" then
- data = gsub(data,"%-%-%[%[.-%]%]%-%-","")
- data = gsub(data,"%-%-.-[\n\r]","")
- else
- data = gsub(data,"%%.-[\n\r]","")
- end
- data = gsub(data,"%s","")
- else
- logs.report("error","unknown file %a",name)
- data = ""
- end
- sm[n+5] = sm[n+5] + #data
- if done then
- sm[n] = sm[n] + #data
- else
- cm[n] = cm[n] + 1
- end
- end
- end
- end
- end
- end
-
- local function prepare(what)
- if next(list) then
- -- already loaded
- else
- for i=1,#types do
- collect(list,types[i],i)
- end
- for category in next, list do
- pattern ="{"..category.."%-"
- for suffix, t in next, used do
- local data = io.loaddata(resolvers.find_file("context."..suffix))
- if data and find(data,pattern) then
- t[category] = true
- end
- end
- end
- end
- local max, what = 0, (what == "size" and size) or list
- for k, v in table.sortedpairs(what) do
- for i=1,5 do if v[i] > max then max = v[i] end end
- end
- return max, what, function(n) return (max == 0 and 0) or (n == 0 and 0) or n/max end
- end
-
- local f_norm = string.formatters["%0.3f"]
-
- function document.context_state_1(what)
- local max, what, norm = prepare(what)
- context.starttabulate { "|Tl|T|T|T|T|T|" }
- context.NC()
- context(category)
- context.NC()
- for i=1,#types do
- local n, m = 0, 0
- for k, v in next, list do
- local nn, mm = what[k][i], what[k][i+5]
- n = n + nn
- m = m + (mm or nn)
- end
- context.Top(types[i],norm(max),n,m)
- context.NC()
- end
- context.NC()
- context.NR()
- context.HL()
- for k, v in table.sortedpairs(what) do
- local c = what == size and comp[k] or nope
- context.NC()
- context("%s~%s~~%s~~%s",
- (used.mkii[k] and "ii") or "~~",
- (used.mkiv[k] and "iv") or "~~",
- (used.mkvi[k] and "vi") or "~~",
- k
- )
- -- context("%s\\enspace %s\\quad %s\\quad %s",
- -- (used.mkii[k] and "ii") or "\\quad",
- -- (used.mkiv[k] and "iv") or "\\quad",
- -- (used.mkvi[k] and "vi") or "\\quad",
- -- k
- -- )
- context.NC()
- for i=1,#types do
- context.Bar(types[i],v[i],c[i],f_norm(norm(v[i])))
- context.NC()
- end
- context.NR()
- end
- context.stoptabulate()
- end
-
- function document.context_state_2(what)
- local max, what, norm = prepare(what)
- for k, v in table.sortedpairs(what) do
- local c = (what == size and comp[k]) or nope
- context.StartUp(k)
- for i=1,#types do
- context.Up(types[i],f_norm(norm(v[i])))
- end
- context.StopUp()
- end
- end
-
-\stopluacode
-
-\definecolor[bar:tex] [middlegreen]
-\definecolor[bar:mkii][middleblue]
-\definecolor[bar:mkiv][middlered]
-\definecolor[bar:mkvi][middleyellow]
-\definecolor[bar:lua] [middlegray]
-
-\newcount\UpCounter
-
-\starttexdefinition Top #what#fraction#total#bigones
- \hbox to 5em{\hss#total}%
- \enspace
- \hbox {#what\ifnum#total=#bigones\else~#bigones\rlap{~+}\fi\hss}%
-\stoptexdefinition
-
-\starttexdefinition Bar #color#size#nobigones#fraction
- \ifcase#size\else
- \hbox to 5em{\hss\ifcase#nobigones\else\llap{-~}\fi#size}%
- \enspace
- \blackrule[color=bar:#color,width=#fraction\dimexpr 20em\relax,height=.8\strutht]%
- \fi
-\stoptexdefinition
-
-\starttexdefinition StartUp #name
- \def\UpName{#name}%
- \dontleavehmode\framed[frame=off,align={middle,low},height=18em]\bgroup
-\stoptexdefinition
-
-\starttexdefinition StopUp
- \par\nointerlineskip\blackrule[height=1pt,width=5em,depth=0pt,color=darkgray]
- \par\tttf\strut\UpName\par
- \egroup
- \ifnum\UpCounter=17
- \par \UpCounter\zerocount
- \else
- \kern1em \advance\UpCounter\plusone
- \fi
-\stoptexdefinition
-
-\starttexdefinition Up #color#width
- \scratchdimen#width\dimexpr 16em\relax
- \ifdim\scratchdimen=\zeropoint
- \kern1em
- \else
- \ifdim\scratchdimen<\onepoint \scratchdimen\onepoint \fi
- \blackrule[color=bar:#color,height=\scratchdimen,width=1em]%
- \fi
-\stoptexdefinition
-
-\starttexdefinition Show #title#how#what
- \startTEXpage[offset=1em,width=fit]
- \hbox{\tttf\strut\currentdate~-~#title}
- \par
- \ctxlua{document.context_state_\number#how("#what")}
- \stopTEXpage
-\stoptexdefinition
-
-% \continueifinputfile{s-inf-01.mkvi}
-
-\starttext
- \Show
- {The number of files used in ConTeXt (base modules and styles).}
- {1}{number}
- \Show
- {The size of (core) files used in ConTeXt (- indicates exclusion of large data files; + indicates inclusion of large data files; comment and spaces removed.)}
- {1}{size}
- \Show
- {The relative number of files used in ConTeXt (tex, mkii, mkiv, mkvi, lua).}
- {2}{number}
- \Show
- {The relative size of files used in ConTeXt (tex, mkii, mkiv, mkvi, lua).}
- {2}{size}
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-inf-02.mkiv b/Master/texmf-dist/tex/context/base/s-inf-02.mkiv
deleted file mode 100644
index cf8d572bca2..00000000000
--- a/Master/texmf-dist/tex/context/base/s-inf-02.mkiv
+++ /dev/null
@@ -1,27 +0,0 @@
-%D \module
-%D [ file=s-inf-02,
-%D version=2009.11.25,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Information 2 (filenames),
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\starttext
-
-\starttabulate [|T|T|]
- \NC \type{\jobname} \NC \jobname \NC \NR
- \NC \type{\jobfilename} \NC \jobfilename \NC \NR
- \NC \type{\jobfilesuffix} \NC \jobfilesuffix \NC \NR
- \NC \type{\inputfilename} \NC \inputfilename \NC \NR
- \NC \type{\inputfilebarename} \NC \inputfilebarename \NC \NR
- \NC \type{\inputfilesuffix} \NC \inputfilesuffix \NC \NR
- \NC \type{\outputfilename} \NC \outputfilename \NC \NR
- \NC \type{\operatingsystem} \NC \operatingsystem \NC \NR
-\stoptabulate
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-inf-03.mkiv b/Master/texmf-dist/tex/context/base/s-inf-03.mkiv
deleted file mode 100644
index a253bed773c..00000000000
--- a/Master/texmf-dist/tex/context/base/s-inf-03.mkiv
+++ /dev/null
@@ -1,372 +0,0 @@
-% \nopdfcompression
-
-% \starttext
-% There is a loop somewhere ... todo.
-% \stoptext
-
-\enablemode[tablet] % whatever that means
-
-\setupbodyfont[dejavu]
-
-\doifelsemode {tablet} {
-
- \setuppapersize
- [S6,landscape]
- [S6,landscape]
-
- \definefont
- [TitlePageFont]
- [MonoBold at 15pt]
-
- \setupbodyfont
- [tt,8pt]
-
-} {
-
- \definefont
- [TitlePageFont]
- [MonoBold at 18pt]
-
- \setupbodyfont
- [tt]
-
-}
-
-\setuplayout
- [header=0cm,
- footer=1cm,
- backspace=.5cm,
- topspace=.5cm,
- width=middle,
- height=middle]
-
-\setuphead
- [title]
- [style=\ttc,
- interaction=reference]
-
-\definehead
- [xtitle]
- [title]
-
-\setuphead
- [xtitle]
- [color=darkgreen]
-
-\setupfootertexts
- [\llap{\goto{\hbox to 5cm{\hss previous}}[previouspage]}%
- \quad\pagenumber\quad
- \rlap{\goto{\hbox to 5cm{next\hss}}[nextpage]}]
-
-\setupinteraction
- [state=start,
- style=,
- color=,
- title={ConTeXt MkIV},
- subtitle={Lua modules and functions},
- author={Hans Hagen - automatically generated},
- contrastcolor=]
-
-\setupinteractionscreen
- [option=bookmark]
-
-\placebookmarks
- [title,xtitle]
- [force=yes]
-
-\definecolor[darkyellow][r=.5,g=.5,b=0]
-\definecolor[darkgray] [s=.15]
-
-\nonknuthmode
-
-\starttext
-
-\startbuffer
-\startluacode
-local basiclua = libraries.basiclua
-local basictex = libraries.basictex
-local extratex = libraries.extratex
-local extralua = libraries.extralua
-local obsolete = libraries.obsolete
-
-local find = string.find
-local color, gotolocation = context.color, context["goto"]
-
-for k, v in table.sortedpairs(_G) do
- if obsolete[k] or find(k,"_") or k == "arg" or k == "utf" then
- --
- elseif basiclua[k] then
- gotolocation(function() color( { "darkred" }, k) end, { k } )
- elseif extralua[k] then
- gotolocation(function() color( { "darkgreen" }, k) end, { k } )
- elseif basictex[k] then
- gotolocation(function() color( { "darkblue" }, k) end, { k } )
- elseif extratex[k] then
- gotolocation(function() color( { "darkyellow" }, k) end, { k } )
- elseif type(v) == "table" then
- gotolocation(function() color( { "white" }, k) end, { k } )
- end
- context(" ")
-end
-\stopluacode
-\stopbuffer
-
-\setupbackgrounds
- [page]
- [background=color,
- backgroundcolor=darkgray,
- backgroundoffset=2mm]
-
-\startpagemakeup
- \vfill
- \pagereference[global]
- \startnarrower[10mm]
- \setupalign[nothyhenated,middle,broad]
- \TitlePageFont \setupinterlinespace
- \getbuffer % luabuffer
- \par
- \stopnarrower
- \vfill
- \vfill
- \hskip10mm\scale[width=\dimexpr\paperwidth-20mm\relax]{\ttbf\white\ConTeXt\ MkIV}
- \par
- % \hskip10mm\scale[width=\dimexpr\paperwidth-20mm\relax]{\white \strut Lua infrastructure \emdash\ \currentdate}
- \vfill
-\stoppagemakeup
-
-\setupbackgrounds
- [page]
- [background=]
-
-\startluacode
-local builtin = libraries.builtin
-local globals = libraries.globals
-local basiclua = libraries.basiclua
-local basictex = libraries.basictex
-local extratex = libraries.extratex
-local extralua = libraries.extralua
-local obsolete = libraries.obsolete
-
-local sortedkeys = table.sortedkeys
-local mark = storage.mark
-local marked = storage.marked
-local gsub = string.gsub
-local sub = string.sub
-local byte = string.byte
-local upper = string.upper
-
-local skipglobal = table.tohash {
- "_G", "_M", "_ENV", "",
- "context", "modules", "global", "arg", "utf", 1,
- "_ptbs_", "_pcol_", "_plib_", "_clib_", "_tlib_",
- "kpse", "commands",
-}
-
-local skipkeys = table.tohash {
- "_pcol_", "_plib_", "_clib_", "_tlib_", "_bpnf_", "_ptbs_",
- "_cldf_", "_cldn_", "_cldo_",
- "_clmb_", "_clme_", "_clmm_", "_clmn_", "_clma_", "_clmh_",
- "_G", "_M", "_ENV", "",
- -- "global", "shortcuts",
- "_VERSION", "_COPYRIGHT", "_DESCRIPTION", "_NAME", "_PACKAGE", "__unload",
-}
-
-local sameglobal = {
- ["global"] = "_G",
- -- ["commands"] = "cs", -- already gone
-}
-
--- -- -- -- -- -- -- -- -- -- -- -- --
--- this should be done internally
--- -- -- -- -- -- -- -- -- -- -- -- --
-
-for k,v in next, modules do
- mark(v)
-end
-
-mark(document.arguments)
-mark(environment.arguments)
-mark(environment.engineflags)
-mark(characters.data)
-
--- -- -- -- -- -- -- -- -- -- -- -- --
--- -- -- -- -- -- -- -- -- -- -- -- --
-
-local variant = 1 -- all parents
-local variant = 2 -- parent name too
-local variant = 3 -- no parents
-
-local done = { }
-
-local function childtables(key,tab,handler,depth)
- depth = depth or 1
- local keys = sortedkeys(tab) -- no sorted_pairs
- for i=1,#keys do
- local k = keys[i]
--- if k ~= "_G" and k ~= "_M" and type(k) == "string" then
- if not skipkeys[k] and type(k) == "string" then
- local v = tab[k]
- local t = type(v)
- local s = k
- if variant ~= 3 then
- s = key and (key .. "." .. s) or s
- end
- if t == "table" then
- if marked(v) then
- t = "data"
- handler(s,t,depth)
- else
-if done[v] then
- -- logs.report("inf-03","key %a in %a already done",k,v)
-else
- done[v] = true
- handler(s,t,depth)
- if variant == 3 then
- childtables(false,v,handler,depth+1)
- elseif variant == 2 then
- childtables(k,v,handler,depth+1)
- else
- childtables(s,v,handler,depth+1)
- end
- end
-end
- else
- handler(s,t,depth)
- end
- end
- end
-end
-
-local NC, NR = context.NC, context.NR
-local overstrike, rlap, bf = context.overstrike, context.rlap, context.bf
-local color, gotolocation = context.color, context["goto"]
-
-local function cleanup(s)
- return "\\char" ..byte(s) .. " "
-end
-
-local function handler(k,t,depth)
- k = gsub(k,"([~#$%%^&{}\\|])",cleanup)
- NC() rlap("\\quad\\tx\\kern" .. (depth or 0).. "em" .. upper(sub(t,1,1)) .. " ".. k) NC() NC() NR()
-end
-
-local function show(title,subtitle,alias,builtin,t,lib,libcolor,glo,glocolor,mark,obsolete)
- -- todo: table as argument
--- print(title,subtitle,alias,builtin,t,lib,libcolor,glo,glocolor,mark,obsolete)
- local keys = sortedkeys(t) -- no sorted_pairs
- if #keys > 0 then
- local fulltitle = title
- if subtitle and subtitle ~= "" then
- fulltitle = fulltitle .. " (" .. subtitle .. ")"
- end
- if alias and alias ~= "" then
- fulltitle = fulltitle .. " (alias: " .. alias .. ")"
- end
- if builtin then
- context.startxtitle { reference = title, title = fulltitle, backreference = "global" }
- else
- context.starttitle { reference = title, title = fulltitle, backreference = "global" }
- end
- context.startcolumns { n = 2 }
- context.starttabulate { "|||" }
- local t_obsolete = t.obsolete
- if type(t_obsolete) ~= "table" then
- t_obsolete = nil
- end
- for i=1,#keys do
- local k = keys[i]
- local v = t[k]
- if k and k ~= "obsolete" and not skipkeys[k] and (not obsolete or not obsolete[k]) then
- local inlib = lib and lib[k]
- local inglo = glo and glo[k]
- local t = type(v)
- local kstr, tstr = k, t
- local obs = t_obsolete and t_obsolete[k]
- if obs then
- tstr = function() overstrike(t) end
- kstr = function() overstrike(k) end
- end
- local marked = marked(v)
- if marked then
- tstr = "data table"
- end
- if t == "table" then
- local m = getmetatable(v)
- if m and m.__call then
- tstr = "function"
- end
- end
- if not mark then
- --
- elseif inlib and tostring(inlib) ~= tostring(v) then
- tstr = "overloaded ".. tstr
- elseif inglo and tostring(inglo) ~= tostring(v) then
- tstr = "overloaded ".. tstr
- end
- NC() bf()
- if inlib then
- if not mark and t == "table" then
- gotolocation(function() color( { libcolor }, kstr) end, { k } )
- else
- color( { libcolor }, kstr)
- end
- elseif inglo then
- if not mark and t == "table" then
- gotolocation(function() color( { glocolor }, kstr) end, { k } )
- else
- color( { glocolor }, kstr)
- end
- else
- if not mark and t == "table" then
- gotolocation(k, { kstr } )
- else
- context(kstr)
- end
- end
- NC()
- if inlib then
- color( { libcolor }, tstr)
- elseif inglo then
- color( { glocolor }, tstr)
- else
- context(tstr)
- end
- NC() NR()
- if mark and t == "table" and title ~= "libraries" and title ~= "package" and not marked then
- childtables(false,v,handler) -- (k,v,handler)
- end
- end
- end
- context.stoptabulate()
- context.stopcolumns()
- if builtin then
- context.stopxtitle()
- else
- context.stoptitle()
- end
- end
-end
-
-show("global","",sameglobal.global,false,_G,builtin,"darkgreen",globals,"darkblue",false,obsolete)
-
--- inspect(table.sortedkeys(context))
-
-for k, v in table.sortedpairs(_G) do
- if not skipglobal[k] and not obsolete[k] and type(v) == "table" and not marked(v) then
-
- -- local mt = getmetatable(v)
- -- print("!!!!!!!!!!",k,v,mt,mt and mt.__index)
-
- if basiclua[k] then show(k,"basic lua",sameglobal[k],basiclua[k],v,builtin[k],"darkred", false,false,true)
- elseif extralua[k] then show(k,"extra lua",sameglobal[k],extralua[k],v,builtin[k],"darkred", false,false,true)
- elseif basictex[k] then show(k,"basic tex",sameglobal[k],basictex[k],v,builtin[k],"darkred", false,false,true)
- elseif extratex[k] then show(k,"extra tex",sameglobal[k],extratex[k],v,builtin[k],"darkred", false,false,true)
- else
- show(k,"context", sameglobal[k],false, v,builtin[k],"darkyellow",false,false,true)
- end
- end
-end
-
-\stopluacode
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-inf-04.mkiv b/Master/texmf-dist/tex/context/base/s-inf-04.mkiv
deleted file mode 100644
index 862bed72f29..00000000000
--- a/Master/texmf-dist/tex/context/base/s-inf-04.mkiv
+++ /dev/null
@@ -1,48 +0,0 @@
-\usemodule[art-01]
-
-\setupbodyfont[10pt]
-
-\starttext
-
- \startluacode
-
- context.subject("Configuration files")
-
- local configurations = resolvers.instance.specification
-
- context.starttabulate { "|Tl|Tl|" }
- for i=1,#configurations do
- context.NC()
- context(i)
- context.NC()
- context.verbatim(resolvers.resolve(configurations[i]))
- context.NC()
- context.NR()
- end
- context.stoptabulate()
-
- local list = resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))
-
- context.subject("Configuration paths")
-
- -- context.verbatim(resolvers.luacnfspec)
-
- context.starttabulate { "|Tl|Tl|" }
- for i=1,#list do
- local li = resolvers.resolve(list[i])
- context.NC()
- if lfs.isdir(li) then
- context("-")
- else
- context("+")
- end
- context.NC()
- context.verbatim(li)
- context.NC()
- context.NR()
- end
- context.stoptabulate()
-
- \stopluacode
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-jap-00.mkii b/Master/texmf-dist/tex/context/base/s-jap-00.mkii
deleted file mode 100644
index 5eec2f72594..00000000000
--- a/Master/texmf-dist/tex/context/base/s-jap-00.mkii
+++ /dev/null
@@ -1,23 +0,0 @@
-%D \module
-%D [ file=s-jap-00,
-%D version=2006.01.19,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Basic Japanese Style,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D suggestions=Richard Gabriel,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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-jap.tex % faster than \setupbodyfont[jap]
-
-\mainlanguage [ja]
-
-\unprotect
-
-\setuptyping[\c!tab=\v!no]
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/s-languages-counters.lua b/Master/texmf-dist/tex/context/base/s-languages-counters.lua
deleted file mode 100644
index 436e64a6405..00000000000
--- a/Master/texmf-dist/tex/context/base/s-languages-counters.lua
+++ /dev/null
@@ -1,52 +0,0 @@
-if not modules then modules = { } end modules ['s-languages-counters'] = {
- version = 1.001,
- comment = "companion to s-languages-counters.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-moduledata.languages = moduledata.languages or { }
-moduledata.languages.counters = moduledata.languages.counters or { }
-
-local data = converters.verbose.data
-
-function moduledata.languages.counters.showverbose(specification)
- specification = interfaces.checkedspecification(specification)
- local list = utilities.parsers.settings_to_array(specification.language or "")
- if #list == 0then
- return
- end
- local used = { }
- local words = { }
- for i=1,#list do
- local ai = list[i]
- local di = data[ai]
- if di and di.words then
- used[#used+1] = ai
- table.merge(words,di.words)
- end
- end
- context.starttabulate { string.rep("|l",#used) .. "|r|" }
- context.HL()
- context.NC()
- for i=1,#used do
- context.bold(used[i])
- context.NC()
- end
- context.bold("number")
- context.NC()
- context.NR()
- context.HL()
- for k, v in table.sortedhash(words) do
- context.NC()
- for i=1,#used do
- context(data[used[i]].words[k] or "")
- context.NC()
- end
- context(k)
- context.NC()
- context.NR()
- end
- context.stoptabulate()
-end
diff --git a/Master/texmf-dist/tex/context/base/s-languages-counters.mkiv b/Master/texmf-dist/tex/context/base/s-languages-counters.mkiv
deleted file mode 100644
index fa938d65a87..00000000000
--- a/Master/texmf-dist/tex/context/base/s-languages-counters.mkiv
+++ /dev/null
@@ -1,30 +0,0 @@
-%D \module
-%D [ file=s-languages-counters, % s-lan-05,
-%D version=2011.05.01, % older
-%D title=\CONTEXT\ Style File,
-%D subtitle=Language Counters,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\startmodule[languages-counters]
-
-\registerctxluafile{s-languages-counters}{}
-
-\installmodulecommandluasingle \showverbosecounters {moduledata.languages.counters.showverbose}
-
-\stopmodule
-
-\continueifinputfile{s-languages-counters.mkiv}
-
-\usemodule[art-01]
-
-\starttext
-
- \showverbosecounters[language={en,es}]
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-languages-frequencies.lua b/Master/texmf-dist/tex/context/base/s-languages-frequencies.lua
deleted file mode 100644
index 16213a41271..00000000000
--- a/Master/texmf-dist/tex/context/base/s-languages-frequencies.lua
+++ /dev/null
@@ -1,33 +0,0 @@
-if not modules then modules = { } end modules ['s-languages-frequencies'] = {
- version = 1.001,
- comment = "companion to s-languages-frequencies.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-moduledata.languages = moduledata.languages or { }
-moduledata.languages.frequencies = moduledata.languages.frequencies or { }
-
-function moduledata.languages.frequencies.showlist(specification)
- specification = interfaces.checkedspecification(specification)
- local t = languages.frequencies.getdata(specification.language or languages.current())
- context.starttabulate { "|lT|cw(2em)|r|" }
- context.NC()
- context.formatted.rlap("%s: %p",t.language,languages.frequencies.averagecharwidth(t.language))
- context.NC()
- context.NC()
- context.NR()
- context.HL()
- for k, v in table.sortedhash(t.frequencies) do
- context.NC()
- context("%U",k)
- context.NC()
- context("%c",k)
- context.NC()
- context("%0.3f",v)
- context.NC()
- context.NR()
- end
- context.stoptabulate()
-end
diff --git a/Master/texmf-dist/tex/context/base/s-languages-frequencies.mkiv b/Master/texmf-dist/tex/context/base/s-languages-frequencies.mkiv
deleted file mode 100644
index 01a1f5682e2..00000000000
--- a/Master/texmf-dist/tex/context/base/s-languages-frequencies.mkiv
+++ /dev/null
@@ -1,38 +0,0 @@
-%D \module
-%D [ file=s-languages-frequencies, % s-lan-06,
-%D version=2013.03.22,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Language Frequencies,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\startmodule[languages-frequencies]
-
-\registerctxluafile{s-languages-frequencies}{}
-
-\installmodulecommandluasingle \showfrequencies {moduledata.languages.frequencies.showlist}
-
-\stopmodule
-
-\continueifinputfile{s-languages-frequencies.mkiv}
-
-\usemodule[art-01]
-
-\starttext
-
- \hsize65\averagecharwidth \the\hsize: \input ward \par
-
- \showfrequencies \page
-
- \mainlanguage[de]
-
- \hsize65\averagecharwidth \the\hsize: \input ward \par
-
- \showfrequencies \page
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-languages-hyphenation.lua b/Master/texmf-dist/tex/context/base/s-languages-hyphenation.lua
deleted file mode 100644
index c5a4f91f1e9..00000000000
--- a/Master/texmf-dist/tex/context/base/s-languages-hyphenation.lua
+++ /dev/null
@@ -1,135 +0,0 @@
-if not modules then modules = { } end modules ['s-languages-hyphenation'] = {
- version = 1.001,
- comment = "companion to s-languages-hyphenation.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-moduledata.languages = moduledata.languages or { }
-moduledata.languages.hyphenation = moduledata.languages.hyphenation or { }
-
-local a_colormodel = attributes.private('colormodel')
-
-local nodecodes = nodes.nodecodes
-local nodepool = nodes.pool
-local disc_code = nodecodes.disc
-local glyph_code = nodecodes.glyph
-local emwidths = fonts.hashes.emwidths
-local exheights = fonts.hashes.exheights
-local newkern = nodepool.kern
-local newrule = nodepool.rule
-local newglue = nodepool.glue
-
-local insert_node_after = node.insert_after
-local traverse_by_id = node.traverse_id
-local hyphenate = languages.hyphenators.handler -- lang.hyphenate
-local find_tail = node.tail
-local remove_node = nodes.remove
-
-local tracers = nodes.tracers
-local colortracers = tracers and tracers.colors
-local setnodecolor = colortracers.set
-
-local function identify(head,marked)
- local current, prev = head, nil
- while current do
- local id = current.id
- local next = current.next
- if id == disc_code then
- if prev and next then -- and next.id == glyph_code then -- catch other usage of disc
- marked[#marked+1] = prev
- end
- elseif id == glyph_code then
- prev = current
- end
- current = next
- end
-end
-
-local function strip(head,marked)
- for i=1,#marked do
- local prev = marked[i]
- remove_node(head,prev.next,true)
- end
-end
-
-local function mark(head,marked,w,h,d,how)
- for i=1,#marked do
- local prev = marked[i]
- local font = prev.font
- local em = emwidths[font]
- local ex = exheights[font]
- local width = w*em
- local rule = newrule(width,h*ex,d*ex)
- head, prev = insert_node_after(head,prev,newkern(-width/2))
- head, prev = insert_node_after(head,prev,rule)
- head, prev = insert_node_after(head,prev,newkern(-width/2))
- head, prev = insert_node_after(head,prev,newglue(0))
- setnodecolor(rule,how,prev[a_colormodel])
- end
-end
-
-local langs, tags, noflanguages = { }, { }, 0
-
-local colorbytag = false
-
-function moduledata.languages.hyphenation.showhyphens(head)
- if noflanguages > 0 then
- local marked = { }
- for i=1,noflanguages do
- local m = { }
- local l = langs[i]
- marked[i] = m
- for n in traverse_by_id(glyph_code,head) do
- n.lang = l
- end
- languages.hyphenators.methods.original(head)
- identify(head,m)
- strip(head,m)
- end
- for i=noflanguages,1,-1 do
- local l = noflanguages - i + 1
- mark(head,marked[i],1/16,l/2,l/4,"hyphenation:"..(colorbytag and tags[i] or i))
- end
- return head, true
- else
- return head, false
- end
-end
-
-local savedlanguage
-
-function moduledata.languages.hyphenation.startcomparepatterns(list)
- if list and list ~= "" then
- tags = utilities.parsers.settings_to_array(list)
- end
- savedlanguage = tex.language
- tex.language = 0
- noflanguages = #tags
- for i=1,noflanguages do
- langs[i] = tags[i] and languages.getnumber(tags[i])
- end
- nodes.tasks.enableaction("processors","moduledata.languages.hyphenation.showhyphens")
-end
-
-function moduledata.languages.hyphenation.stopcomparepatterns()
- noflanguages = 0
- tex.language = savedlanguage or tex.language
- nodes.tasks.disableaction("processors","moduledata.languages.hyphenation.showhyphens")
-end
-
-function moduledata.languages.hyphenation.showcomparelegend(list)
- if list and list ~= "" then
- tags = utilities.parsers.settings_to_array(list)
- end
- for i=1,#tags do
- if i > 1 then
- context.enspace()
- end
- context.color( { "hyphenation:"..(colorbytag and tags[i] or i) }, tags[i])
- end
-end
-
-nodes.tasks.appendaction("processors","before","moduledata.languages.hyphenation.showhyphens")
-nodes.tasks.disableaction("processors","moduledata.languages.hyphenation.showhyphens")
diff --git a/Master/texmf-dist/tex/context/base/s-languages-hyphenation.mkiv b/Master/texmf-dist/tex/context/base/s-languages-hyphenation.mkiv
deleted file mode 100644
index 6662dbf2f32..00000000000
--- a/Master/texmf-dist/tex/context/base/s-languages-hyphenation.mkiv
+++ /dev/null
@@ -1,77 +0,0 @@
-%D \module
-%D [ file=s-languages-hyphenation, % s-lan-04,
-%D version=2011.05.01,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Language Hyphenation,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 For Mojca.
-
-\startmodule[languages-hyphenation]
-
-\registerctxluafile{s-languages-hyphenation}{}
-
-\unprotect
-
-\unexpanded\def\startcomparepatterns
- {\dosingleempty\module_languages_hyphenation_start}
-
-\unexpanded\def\module_languages_hyphenation_start[#1]%
- {\begingroup
- \par
- % \language\zerocount
- % \setupalign[\v!nothyphenated]%
- \ctxlua{moduledata.languages.hyphenation.startcomparepatterns("#1")}}
-
-\unexpanded\def\stopcomparepatterns
- {\par
- \ctxlua{moduledata.languages.hyphenation.stopcomparepatterns()}%
- \endgroup}
-
-\installmodulecommandluasingle \showcomparepatternslegend {moduledata.languages.hyphenation.showcomparelegend}
-
-\protect
-
-\definecolor[hyphenation:1] [r=.8]
-\definecolor[hyphenation:2] [g=.8]
-\definecolor[hyphenation:3] [b=.8]
-\definecolor[hyphenation:4] [r=.4,g=.4]
-
-\definecolor[hyphenation:en] [hyphenation:1]
-\definecolor[hyphenation:de] [hyphenation:2]
-\definecolor[hyphenation:nl] [hyphenation:3]
-\definecolor[hyphenation:fr] [hyphenation:4]
-
-\stopmodule
-
-\continueifinputfile{s-languages-hyphenation.mkiv}
-
-\usemodule[art-01]
-
-\starttext
-
-\def|#1|{-}
-
- \startsubject{Normal text}
- \input tufte
- \stopsubject
-
- \startsubject{Compare hyphenation points of \showcomparepatternslegend[en,de]}
- \startcomparepatterns
- \input tufte \quad (\showcomparepatternslegend)
- \stopcomparepatterns
- \stopsubject
-
- \startsubject{Compare hyphenation points}
- \startcomparepatterns[de,nl,en,fr]
- \input tufte \quad (\showcomparepatternslegend)
- \stopcomparepatterns
- \stopsubject
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-languages-sorting.lua b/Master/texmf-dist/tex/context/base/s-languages-sorting.lua
deleted file mode 100644
index 82a0827bbd2..00000000000
--- a/Master/texmf-dist/tex/context/base/s-languages-sorting.lua
+++ /dev/null
@@ -1,118 +0,0 @@
-if not modules then modules = { } end modules ['s-languages-system'] = {
- version = 1.001,
- comment = "companion to s-languages-system.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-moduledata.languages = moduledata.languages or { }
-moduledata.languages.sorting = moduledata.languages.sorting or { }
-
-local formatters = string.formatters
-local utfbyte, utfcharacters = utf.byte, utf.characters
-local sortedpairs = table.sortedpairs
-
-local definitions = sorters.definitions
-local constants = sorters.constants
-local replacementoffset = constants.replacementoffset
-
-local currentfont = font.current
-local fontchars = fonts.hashes.characters
-
-local c_darkblue = { "darkblue" }
-local c_darkred = { "darkred" }
-local f_chr = formatters["\\tttf%H"]
-
-local function chr(str,done)
- if done then
- context.space()
- end
- local c = fontchars[currentfont()]
- for s in utfcharacters(str) do
- local u = utfbyte(s)
- if c[u] then
- context(s)
- elseif u > replacementoffset then
- context.color(c_darkblue, f_chr(u))
- else
- context.color(c_darkred, f_chr(u))
- end
- end
- return true
-end
-
-local function map(a,b,done)
- if done then
- context.space()
- end
- -- context.tttf()
- chr(a)
- context("=")
- chr(b)
- return true
-end
-
-local function nop()
- -- context.tttf()
- context("none")
-end
-
-local function key(data,field)
- context.NC()
- context(field)
- context.NC()
- context(data[field])
- context.NC()
- context.NR()
-end
-
-function moduledata.languages.sorting.showinstalled(tag)
- if not tag or tag == "" or tag == interfaces.variables.all then
- for tag, data in sortedpairs(definitions) do
- moduledata.languages.sorting.showinstalled (tag)
- end
- else
- sorters.update() -- syncs data
- local data = definitions[tag]
- if data then
- context.starttabulate { "|lB|pl|" }
- key(data,"language")
- key(data,"parent")
- key(data,"method")
- context.NC()
- context("replacements")
- context.NC()
- local replacements = data.replacements
- if #replacements == 0 then
- nop()
- else
- for i=1,#replacements do
- local r = replacements[i]
- map(r[1],r[2],i > 1)
- end
- end
- context.NC()
- context.NR()
- context.NC()
- context("order")
- context.NC()
- local orders = data.orders
- for i=1,#orders do
- chr(orders[i],i > 1)
- end
- context.NC()
- context.NR()
- context.NC()
- context("entries")
- context.NC()
- local done = false
- for k, e in sortedpairs(data.entries) do
- done = map(k,e,done)
- end
- context.NC()
- context.NR()
- context.stoptabulate()
- end
- end
-end
diff --git a/Master/texmf-dist/tex/context/base/s-languages-sorting.mkiv b/Master/texmf-dist/tex/context/base/s-languages-sorting.mkiv
deleted file mode 100644
index 67acda6f972..00000000000
--- a/Master/texmf-dist/tex/context/base/s-languages-sorting.mkiv
+++ /dev/null
@@ -1,30 +0,0 @@
-%D \module
-%D [ file=s-languages-sorting, % s-lan-02.mkiv
-%D version=2010.09.21,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Language Sorting,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\startmodule[languages-sorting]
-
-\registerctxluafile{s-languages-sorting}{}
-
-\installmodulecommandluasingle \showinstalledsorting {moduledata.languages.sorting.showinstalled}
-
-\stopmodule
-
-\continueifinputfile{s-languages-sorting.mkiv}
-
-\usemodule[art-01]
-
-\starttext
-
- \showinstalledsorting
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-languages-system.lua b/Master/texmf-dist/tex/context/base/s-languages-system.lua
deleted file mode 100644
index 3b422db9f2e..00000000000
--- a/Master/texmf-dist/tex/context/base/s-languages-system.lua
+++ /dev/null
@@ -1,62 +0,0 @@
-if not modules then modules = { } end modules ['s-languages-system'] = {
- version = 1.001,
- comment = "companion to s-languages-system.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-moduledata.languages = moduledata.languages or { }
-moduledata.languages.system = moduledata.languages.system or { }
-
-local NC, NR, HL = context.NC, context.NR, context.HL
-local sortedhash = table.sortedhash
-local registered = languages.registered
-local context = context
-local ctx_NC = context.NC
-local ctx_NR = context.NR
-local ctx_bold = context.bold
-
-function moduledata.languages.system.loadinstalled()
- context.start()
- for k, v in table.sortedhash(registered) do
- context.language{ k }
- end
- context.stop()
-end
-
-function moduledata.languages.system.showinstalled()
- --
- context.starttabulate { "|l|r|l|l|p(7em)|r|p|" }
- context.FL()
- ctx_NC() ctx_bold("tag")
- ctx_NC() ctx_bold("n")
- ctx_NC() ctx_bold("parent")
- ctx_NC() ctx_bold("file")
- ctx_NC() ctx_bold("synonyms")
- ctx_NC() ctx_bold("patterns")
- ctx_NC() ctx_bold("characters")
- ctx_NC() ctx_NR()
- context.FL()
- for k, v in sortedhash(registered) do
- local parent = v.parent
- local resources = v.resources
- local patterns = resources and resources.patterns
- ctx_NC() context(k)
- ctx_NC() context(v.number)
- ctx_NC() context(v.parent)
- ctx_NC() context(v.patterns)
- ctx_NC() for k, v in sortedhash(v.synonyms) do context("%s\\par",k) end
- if patterns then
- ctx_NC() context(patterns.n)
- ctx_NC() context("% t",utf.split(patterns.characters))
- else
- ctx_NC()
- ctx_NC()
- end
- ctx_NC() ctx_NR()
- end
- context.LL()
- context.stoptabulate()
- --
-end
diff --git a/Master/texmf-dist/tex/context/base/s-languages-system.mkiv b/Master/texmf-dist/tex/context/base/s-languages-system.mkiv
deleted file mode 100644
index 22991f264f8..00000000000
--- a/Master/texmf-dist/tex/context/base/s-languages-system.mkiv
+++ /dev/null
@@ -1,32 +0,0 @@
-%D \module
-%D [ file=s-languages-system, % moved from local s-lan-01
-%D version=2013.05.19,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Installed Languages,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\startmodule[languages-system]
-
-\registerctxluafile{s-languages-system}{}
-
-\installmodulecommandluasingle \showinstalledlanguages {moduledata.languages.system.showinstalled}
-\installmodulecommandluasingle \loadinstalledlanguages {moduledata.languages.system.loadinstalled}
-
-\stopmodule
-
-\continueifinputfile{s-languages-system.mkiv}
-
-\usemodule[art-01]
-
-\starttext
-
- \loadinstalledlanguages
- \showinstalledlanguages
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-languages-words.lua b/Master/texmf-dist/tex/context/base/s-languages-words.lua
deleted file mode 100644
index ea7aee87bcd..00000000000
--- a/Master/texmf-dist/tex/context/base/s-languages-words.lua
+++ /dev/null
@@ -1,32 +0,0 @@
-if not modules then modules = { } end modules ['s-languages-words'] = {
- version = 1.001,
- comment = "companion to s-languages-words.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-moduledata.languages = moduledata.languages or { }
-moduledata.languages.words = moduledata.languages.words or { }
-
-function moduledata.languages.words.showwords(specification)
- local filename = specification.filename or file.addsuffix(tex.jobname,"words")
- if lfs.isfile(filename) then
- local w = dofile(filename)
- if w then
- -- table.print(w)
- for cname, category in table.sortedpairs(w.categories) do
- for lname, language in table.sortedpairs(category.languages) do
- context.bold(string.format("category: %s, language: %s, total: %s, unique: %s:",
- cname, lname, language.total or 0, language.unique or 0)
- )
- for word, n in table.sortedpairs(language.list) do
- context(" %s (%s)",word,n)
- end
- context.par()
- end
- end
- end
- end
-end
-
diff --git a/Master/texmf-dist/tex/context/base/s-languages-words.mkiv b/Master/texmf-dist/tex/context/base/s-languages-words.mkiv
deleted file mode 100644
index 4e350bf34d2..00000000000
--- a/Master/texmf-dist/tex/context/base/s-languages-words.mkiv
+++ /dev/null
@@ -1,22 +0,0 @@
-%D \module
-%D [ file=s-languages-words,
-%D version=2010.10.21,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Language Environment 3,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D This is used in the test suite.
-
-\startmodule[languages-words]
-
-\registerctxluafile{s-languages-words}{}
-
-\installmodulecommandluasingle \showwords {moduledata.languages.words.showwords}
-
-\stopmodule
diff --git a/Master/texmf-dist/tex/context/base/s-mag-01.tex b/Master/texmf-dist/tex/context/base/s-mag-01.tex
deleted file mode 100644
index b90dceb66ce..00000000000
--- a/Master/texmf-dist/tex/context/base/s-mag-01.tex
+++ /dev/null
@@ -1,412 +0,0 @@
-%D \module
-%D [ file=s-mag-01,
-%D version=2002.12.14,
-%D title=\CONTEXT\ Style File,
-%D subtitle=\CONTEXT\ Magazine Base Style,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% This style is used for producing explanationary documents.
-% Don't misuse it for other purposes, since it may confuse
-% users. Don't change the title either, since it provides a
-% way to categorize documents. Numbers are disabled in
-% instances produced outside PRAGMA ADE.
-%
-% The layout setup is such that one has several text areas
-% available: headers and footers, margins and edges as well
-% as the main text area. The surrounding (gray) makes the
-% main page stand out and is suitable for viewing in spread
-% mode.
-%
-% Since this style is under constant construction, messing
-% around with settings will produce unwanted side effects.
-% So, if some feature or settings is needed, let me know.
-
-% todo: mp frames
-
-\setvariables[magazine][number=0]
-\setvariables[magazine][author=]
-\setvariables[magazine][title={Zero Issue}]
-\setvariables[magazine][date=\currentdate]
-
-% These are reserved for PRAGMA-ADE, don't use them yourself!
-
-% \setvariables[magazine][main=Tricky]
-% \setvariables[magazine][main=Update]
-% \setvariables[magazine][main=HOWTO]
-
-% \setvariables[magazine][main=This Way] % preludes to a/the manual
-% \setvariables[magazine][main=A Better Way] % dirty versus clean
-% \setvariables[magazine][main=No Way] % how users should not do it
-% \setvariables[magazine][main=Your Way] % how users do it
-% \setvariables[magazine][main=My Way] % how users do it
-% \setvariables[magazine][main=Our Way] % how we do things at pragma
-% \setvariables[magazine][main=Their Way] % how to do latex things in context
-
-\setvariables[magazine][main=My Way]
-
-\startmode[atpragma]
- \setvariables[magazine][main=This Way]
-\stopmode
-
-\definepapersize
- [magazine]
- [width=\dimexpr\paperwidth-.1\paperwidth\relax,
- height=\dimexpr\paperheight-.1\paperheight\relax]
-
-\setuppapersize
- [magazine]
- [A4]
-
-\setupinteractionscreen
- [option=doublesided]
-
-\definecolor[OuterColor][s=.3]
-\definecolor[InnerColor][s=.8]
-\definecolor[MainColor] [s=.2]
-\definecolor[TitleColor][s=.7]
-
-\definecolor[MyRed] [r=.6]
-\definecolor[MyGreen][g=.6]
-\definecolor[MyBlue] [b=.6]
-
-\startuseMPgraphic{paper}
- sh := define_circular_shade(a,a,0,bbheight(OverlayBox),
- \MPcolor{InnerColor},\MPcolor{OuterColor}) ;
- fill OverlayBox withshade sh ;
-\stopuseMPgraphic
-
-\startreusableMPgraphic{middlepaper}
- pair a ; a := center OverlayBox ;
- \includeMPgraphic{paper}
-\stopreusableMPgraphic
-
-\startreusableMPgraphic{rightpaper}
- pair a ; a := .5[urcorner OverlayBox,lrcorner OverlayBox] ;
- \includeMPgraphic{paper}
-\stopreusableMPgraphic
-
-\startreusableMPgraphic{leftpaper}
- pair a ; a := .5[ulcorner OverlayBox,llcorner OverlayBox] ;
- \includeMPgraphic{paper}
-\stopreusableMPgraphic
-
-\startreusableMPgraphic{page}
- fill OverlayBox withcolor white ;
-\stopreusableMPgraphic
-
-\startusableMPgraphic{text}
- StartPage ;
- for i = Header,Text,Footer :
- for j = LeftEdge, LeftMargin, Text, RightMargin, RightEdge :
- draw Field[i][j] withpen pencircle scaled .5pt ;
- endfor ;
- endfor ;
- StopPage ;
- setbounds currentpicture to Field[Text][Text] ;
-\stopusableMPgraphic
-
-\startsetups[paper]
-
- \doifmodeelse{*makeup}
- {\reuseMPgraphic{middlepaper}}
- {\doifoddpageelse
- {\reuseMPgraphic{rightpaper}}
- {\reuseMPgraphic{leftpaper}}}
-
-\stopsetups
-
-\defineoverlay[paper] [\setups{paper}]
-\defineoverlay[page] [\reuseMPgraphic{page}]
-\defineoverlay[text] [\doifmode{frame}{\useMPgraphic{text}}]
-
-\setupbackgrounds [paper] [background=paper]
-\setupbackgrounds [page] [background={page,title}]
-\setupbackgrounds [text] [background=text]
-
-\definelayer
- [title]
- [state=repeat,
- hoffset=-1cm,
- voffset=1cm,
- width=\paperwidth,
- height=\paperheight]
-
-\setupoutput
- [pdftex]
-
-\setuplayout
- [width=middle,
- topspace=1.5cm,
- height=middle,
- header=1.5cm,
- footer=1cm,
- %grid=yes,
- headerdistance=.25cm,
- footerdistance=.5cm,
- backspace=3cm,
- margin=1.5cm,
- margindistance=.25cm,
- edge=.75cm,
- edgedistance=.25cm,
- bottomdistance=1.5cm,
- bottom=.1\printpaperheight]
-
-\definelayout
- [makeup]
- [topspace=1cm,
- backspace=1cm,
- header=0pt,
- footer=0pt,
- bottom=0pt]
-
-\setuppagenumbering
- [alternative=doublesided]
-
-\setupcolors
- [state=start]
-
-\usetypescript
- [palatino][\defaultencoding]
-
-\setupbodyfont
- [palatino,10pt]
-
-\setuptolerance
- [verytolerant,stretch]
-
-\appendtoks\setups[papershift]\to\beforeeverypage
-
-\startsetups[papershift]
-
- \setuppapersize[top=\vskip.5cm,bottom=\vss]
-
- \doifmodeelse{*makeup}
- {\setuppapersize[left=\hfill,right=\hfill]}
- {\doifoddpageelse
- {\setuppapersize[right=\hfill]}
- {\setuppapersize[left=\hfill]}}
-
-\stopsetups
-
-\setupbottomtexts
- [\setups{rightbanner}] []
- [] [\setups{leftbanner}]
-
-\startsetups [leftbanner]
-
- \definedfont[Regular at \the\bottomheight]
- \setbox\scratchbox\hbox{\TitleColor\getvariable{magazine}{main}}
- \ht\scratchbox1ex
- \dp\scratchbox\zeropoint
- \MainColor
- \definedfont[Regular sa 2]
- \doifsomething{\getvariable{magazine}{number}}
- {\doifnot{\getvariable{magazine}{number}}{0}
- {\#\getvariable{magazine}{number}}}
- \quad
- \currentdate
- \quad
- \scale[height=.25\bottomheight]{\box\scratchbox}
- \quad
- \hbox to 1.5em{\hss\pagenumber\hss}
- \quad
- \hskip-\backspace
-
-\stopsetups
-
-\startsetups [rightbanner]
-
- \definedfont[Regular at \the\bottomheight]
- \setbox\scratchbox\hbox{\TitleColor\getvariable{magazine}{main}}
- \ht\scratchbox1ex
- \dp\scratchbox\zeropoint
- \MainColor
- \hskip-\backspace
- \definedfont[Regular sa 2]
- \quad
- \hbox to 1.5em{\hss\pagenumber\hss}
- \quad
- \scale[height=.25\bottomheight]{\box\scratchbox}
- \quad
- \currentdate
- \quad
- \doifmode{atpragma}{\#\getvariable{magazine}{number}}
-
-\stopsetups
-
-\startsetups[titlepage]
-
- \disablemode[frame]
-
- \setuplayout[makeup]
-
- \startstandardmakeup[doublesided=no]
-
- \dontcomplain
-
- \definelayer
- [makeup]
- [width=\textwidth,
- height=\textheight]
-
- \setlayerframed
- [makeup]
- [corner={left,top},location={right,bottom}]
- [frame=off,
- foregroundcolor=MainColor]
- {\scale
- [width=\makeupwidth]
- {\definedfont[Regular sa 10]%
- \getvariable{magazine}{main}}}
-
- \setlayerframed
- [makeup]
- [corner={right,top},location={left},y=.4\textheight]
- [frame=off,
- foregroundcolor=MainColor,
- width=\textwidth,
- align=left]
- {\definedfont[Regular sa 2.5]\setupinterlinespace
- \startmode[atpragma]
- \strut \ConTeXt\ magazine \#\getvariable{magazine}{number}\endgraf
- \stopmode
- \strut \getvariable{magazine}{date} \endgraf
- \blank
- \strut \getvariable{magazine}{title}\endgraf
- \doifsomething{\getvariable{magazine}{author}}
- {\strut \getvariable{magazine}{author}\endgraf}
- \doifsomething{\getvariable{magazine}{affiliation}}
- {\strut \getvariable{magazine}{affiliation}\endgraf}}
-
- \setlayerframed
- [makeup]
- [corner={right,bottom},location={left,top}]
- [frame=off,
- align=normal,
- width=.8\textwidth,
- foregroundcolor=MainColor]
- {\getbuffer[abstract]}
-
- \flushlayer[makeup]
-
- \stopstandardmakeup
-
- \setuplayout[reset]
-
-\stopsetups
-
-\startsetups[listing]
-
- \page \disablemode[frame]
-
- \setuptexttexts [][] \setuptexttexts []
- \setupheadertexts[][] \setupheadertexts[source code of this document]
- \setupfootertexts[][] \setupfootertexts[]
-
- \start \dontcomplain
-
- \typefile[TEX]{\inputfilename}
-
- \stop
-
-\stopsetups
-
-\startsetups[lastpage]
-
- \page \disablemode[frame] \page[even]
-
- \doifoddpageelse
- {}
- {\setuplayout[makeup]
- \startstandardmakeup[doublesided=no,page=]
- \stopstandardmakeup
- \setuplayout[reset]}
-
-\stopsetups
-
-\startsetups[title]
-
- \disablemode[frame]
-
- \setlayerframed
- [title]
- [corner={left,top},location={left,bottom},
- rotation=90]
- [frame=off,
- foregroundcolor=MainColor]
- {\definedfont[RegularBold sa 2]\strut\getvariable{magazine}{title}}
-
- \setlayerframed
- [title]
- [corner={right,top},
- rotation=270]
- [frame=off,
- foregroundcolor=MainColor]
- {\definedfont[RegularBold sa 2]\strut\getvariable{magazine}{title}}
-
-\stopsetups
-
-\startbuffer[abstract]
- % no abstract
-\stopbuffer
-
-\setuphead
- [chapter]
- [page=yes,
- after={\blank[2*big]},
- color=MainColor,
- style=\bfc]
-
-\setuphead
- [section]
- [before={\blank[2*big]},
- after=\blank,
- color=MainColor,
- style=\bfb]
-
-\setuphead
- [subsection]
- [before=\blank,
- after=,
- color=MainColor,
- style=\bf]
-
-\setupwhitespace
- [big]
-
-\definetyping[xtyping] [style=\ttx]
-\definetyping[xxtyping][style=\ttxx]
-
-\definetypeface
- [narrowtt] [tt]
- [mono] [modern-cond] [default] [encoding=\defaultencoding]
-
-\definetyping[ntyping] \setuptyping[ntyping][style=\narrowtt]
-\definetype [ntype] \setuptype [ntype] [style=\narrowtt]
-
-\doifnotmode{demo}{\endinput}
-
-\startbuffer[abstract]
- \input tufte
-\stopbuffer
-
-\starttext
-
- % \showframe
-
- \setups[titlepage] \setups[title]
-
- \chapter{E.R. Tufte} \input tufte \page
- \chapter{D.E.K. Knuth} \input knuth \page
- \chapter{H. Zapf} \input zapf \page
- \chapter{D. Hofstadter} \input douglas \page
-
- \setups[lastpage]
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-map-10.mkii b/Master/texmf-dist/tex/context/base/s-map-10.mkii
deleted file mode 100644
index 3446a214c52..00000000000
--- a/Master/texmf-dist/tex/context/base/s-map-10.mkii
+++ /dev/null
@@ -1,491 +0,0 @@
-%\module [
-% file=s-map-10.mkii,
-% version=2012.06.06,
-% title=\CONTEXT\ Style File,
-% subtitle=\MAPS\ journal style,
-% author={Hans Hagen, Taco Hoekwater and Siep Kroonenberg},
-% date=\currentdate,
-% copyright={NTG / MAPS}%
-%]
-
-% NOTE: this (MkII) version is not guaranteed to give exactly the
-% same output as the MkIV one, and exists mostly for compatibility
-% with old-fashioned authors. All final typesetting for the MAPS
-% is done with MkIV. If you are reading this: please consider
-% switching!
-
-% This module implements the MAPS style for use with the Context
-% macro package. The original MAPS layout was designed and
-% implemented in LaTeX by Taco Hoekwater and Siep Kroonenberg.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\newif\ifMapsInColumns
-\doifmode{asym}{\enablemode[onecolumn]} % implies onecolumn
-\doifnotmode{onecolumn}{\MapsInColumnstrue}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% fonts
-
-%%%%%%%%% first, font sizes
-\definebodyfontenvironment [7pt][% LaTeX: scriptsize
- interlinespace=8pt,
- big=8pt,
- small=6pt%
-]
-
-\definebodyfontenvironment [8pt][% LaTeX: footnotesize
- interlinespace=9pt,
- big=9pt,
- small=7pt,
- x=6pt%
-]
-
-\definebodyfontenvironment [9pt][% LaTeX: small
- interlinespace=10pt,
- big=10pt,
- small=8pt,%
- x=7pt,%
- script=6pt%
-]
-
-\definebodyfontenvironment [10pt][% LaTeX: normalsize
- interlinespace=11pt,
- big=11pt,
- a=11pt,
- small=9pt,%
- x=8pt,%
- script=7pt%
-]
-
-\definebodyfontenvironment [11pt][% LaTeX: large
- interlinespace=11pt,
- big=11pt,
- small=10pt,%
- x=9pt,%
- script=8pt%
-]
-
-\definebodyfontenvironment [14pt][%
- interlinespace=14pt,
- big=18pt,
- small=11pt,
- x=10pt%
-]
-
-\definebodyfontenvironment [18pt][%
- interlinespace=18pt,
- big=24pt,
- small=14pt,
- x=10pt%
-]
-
-\definebodyfontenvironment [24pt][%
- interlinespace=24pt,
- big=24pt,
- small=18pt,
- x=11pt%
-]
-
-%%% font families (no realfonts, no protruding)
-
-\starttypescript [maps][ec]
-\definetypeface [maps] [rm] [serif] [modern] [default] [encoding=ec,rscale=0.95]
-\definetypeface [maps] [mm] [math] [modern] [computer-modern]
-\definetypeface [maps] [tt] [mono] [modern] [default] [encoding=ec,rscale=0.90]
-\definetypeface [maps] [ss] [sans] [modern] [default] [encoding=ec,rscale=0.95]
-\stoptypescript
-
-\writestatus{maps\space warning}{This, the MkII style, is OUTDATED and UNSUPPORTED!}
-\writestatus{maps\space warning}{Please consider using ConTeXt MkIV instead.}
-
-\startmode[realfonts]
-\writestatus{maps\space error}{The MkII version of the module does not support 'realfonts'!}
-\wait
-\stopmode
-
-\setupbodyfont[maps,10pt,rm]
-
-\setupinterlinespace[line=11pt]
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% additional general typographic details
-
-\setupindenting [yes,next,11pt] % indenting after enumerations etc.
-
-\definepapersize
- [maps]
- [width=21cm,height=26.5cm]
-
-\setuppapersize [maps][maps]
-
-% parameters:
-% margin -> latex marginparwith
-
-\setuplayout[%
- topspace=40pt,
- height=688pt,
- header=33pt,
- margin=106pt,
- leftmargindistance=11pt,
- rightmargindistance=11pt%
-]
-
-
-\setupblank[5.5pt]
-
-\setuppagenumbering [location=]
-
-\definetyping [widetyping]
-
-\setupheader [style=\ss]
-\setupfooter [style=\ss]
-
-\def\AuHead{%
- %\ifnum\pageno=\MapsPage \hbox{}\else
- \MapsRunningAuthor%\fi
-}
-\def\TiHead{%
- \ifnum\pageno=\MapsPage \relax \MapsRunningAuthor %\hbox{}
- \else \MapsRunningTitle\fi}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% sectioning
-
-\setupheads[sectionnumber=no, align=right]
-
-\def\hfonti{\ssbfa}
-\def\hfontii{\ssbf}
-\def\hfontiii{\rm\it}
-\def\runin#1#2{#2.}
-
-\doifmodeelse{nosubsub}{%
-\setuphead [section][%
- style=\hfontii,
- before={\blank[line]},
- after={}%
-]
-\setuphead [subsection][%
- style=\hfontiii,
- command=\runin,
- alternative=text,
- distance=6pt,
- before={\blank[halfline]}%
-]}{%
-\setuphead [section][%
- style=\hfonti,
- before={\blank[line]},
- after={\blank[halfline]}%
-]
-\setuphead [subsection][%
- style=\hfontii,
- before={\blank[halfline]},
- after={}%
-]
-\setuphead [subsubsection][%
- style=\hfontiii,
- command=\runin,
- distance=6pt,
- alternative=text,
- before={\blank[halfline]}%
-]}
-
-\doifmodeelse{nosubsub}{%
-\setuphead [subject][%
- style=\hfontii,
- before={\blank[halfline]},
- after={}%
-]
-\setuphead [subsubject][%
- style=\hfontiii,
- command=\runin,
- alternative=text,
- before={\blank[halfline]}%
-]}{%
-\setuphead [subject][%
- style=\hfonti,
- before={\blank},
- after={\blank[halfline]}%
-]
-\setuphead [subsubject][%
- style=\hfontii,
- before={\blank[halfline]},
- after={}%
-]
-\setuphead [subsubsubject][%
- style=\hfontiii,
- command=\runin,
- alternative=text,
- before={\blank[halfline]}%
-]}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% floats
-
-\setupfloats [location=center, before={\ss}]
-\setupcaptions [headstyle={\ssbf},style={\ssx},
- suffix=,distance=6pt,
- inbetween={\blank[halfline]}]
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% various document elements
-
-\def\ChkBox{%
- \hbox {\boxrulewidth=.4pt \raise.2ex\ruledvbox
- {\phantom{\vrule width .85ex height .85ex%
-}}}}
-\definesymbol [1][\ChkBox]
-
-\setupitemize[1][packed]
-
-\setupitemize [each][%
- indentnext=no,
- align=right,
- width=1em,
- distance=0pt%
-]
-
-% an outer form of itemize that does not indent
-% the paragraph.
-
-\definecomplexorsimpleempty\startouteritemize
-\def\complexstartouteritemize[#1]{\begingroup
- \startitemize[width=1sp,#1]
- \let\doitem\item
- \def\item{\doitem[]\hbox{}\kern12pt\rightskip=0pt}%
-}
-
-\def\stopouteritemize{\stopitemize\endgroup}
-
-
-\setupenumerations [indentnext=no]
-
-\setupdescriptions [indentnext=no]
-
-\unexpanded\def\smalltyping{%
- \switchtobodyfont[tt]%
- \parindent=0pt
-}
-
-% typing:
-% - prettyverbatim is NOT the default
-% - smaller size
-
-\unexpanded\def
- \XeTeX{X\lower.5ex\hbox{\kern-.1em\mirror{E}}\kern-.1667em\TeX}
-
-\setuptyping [%
- style={\smalltyping},
- option=none,
- indentnext=no%
-]
-
-\def\footnum#1{#1.}
-
-\setupfootnotes
- [location=none,
- width=\textwidth,
- before={\blank},
- numbercommand=,
- command=\footnum]
-
-\setupfootnotedefinition
- [location=serried,
- before=,
- after=,
- distance=0.5em]
-
-\setuptabulate
- [before=\blank,
- inner=\ss,
- after=\blank]
-
-\def\startIntroEntry#1%
- {\startlinecorrection
- \bgroup
- \setupalign[right]
- \setuptolerance[verytolerant]
- \setupindenting[no]
- \noindent
- \switchtobodyfont[9pt]%
- \setuplocalinterlinespace[line=10pt]%
- %\hyphenpenalty10000
- \parfillskip 0pt plus 1fill
- \rightskip6pt plus 1fill
- \ss
- \bgroup\bf #1\par\egroup
- \ignorespaces }
-
-\def\stopIntroEntry
- {\par\egroup \stoplinecorrection
- \blank[line] }
-
-\def\defineIntroEntry[#1][#2][#3]%
- {\setvalue{start#1}{\startIntroEntry{#2}}%
- \setvalue {stop#1}{\stopIntroEntry#3}}
-
-\defineIntroEntry[Keywords][Keywords][]
-\defineIntroEntry[Abstract][Abstract][]
-
-% article parameters (other fields and defaults)
-\def\MapsBibData[#1]%
- {\getparameters [Maps]
- [SubTitle=,
- RunningAuthor=,
- RunningTitle=,
- Email=,
- Address=,
- Page=1,
- Title=,
- Author=,
- Period=,
- Number=,
- Year=,
- #1]%
- \doifnothing{\MapsPeriod}{%
- \ifnum \normalmonth<6 \gdef\MapsPeriod{VOORJAAR}\else \gdef\MapsPeriod{NAJAAR}\fi}
- \doifinstringelse{oorjaar}{\MapsPeriod}{\gdef\MapsPeriod{VOORJAAR}}{}%
- \doifinstringelse{pring}{\MapsPeriod}{\gdef\MapsPeriod{VOORJAAR}}{}%
- \doifinstringelse{ajaar}{\MapsPeriod}{\gdef\MapsPeriod{NAJAAR}}{}%
- \doifinstringelse{utumn}{\MapsPeriod}{\gdef\MapsPeriod{NAJAAR}}{}%
- \doifnothing{\MapsYear}{\gdef\MapsYear{\the\year}}%
- \doifnothing{\MapsNumber}{%
- \ifnum \normalmonth<6
- \xdef\MapsNumber{\the\numexpr (\the\year-1990)*2\relax}%
- \else
- \xdef\MapsNumber{\the\numexpr (\the\year-1990)*2+1\relax}%
- \fi }%
- \doifnothing\MapsRunningAuthor
- {\global\let\MapsRunningAuthor\MapsAuthor}%
- \doifnothing\MapsRunningTitle
- {\global\let\MapsRunningTitle\MapsTitle}}%
-
-\def\dostartArticle[#1]{%
- \MapsBibData[#1]
- \pageno=\MapsPage
- \setuppagenumber[start=\MapsPage]
- \startbaselinecorrection
- \bgroup
- \hsize = 457pt
- \let\\\crlf
- \blank[35pt,force]
- \switchtobodyfont[24pt]
- \setupalign[right]
- {\noindent\bf\MapsTitle\par}
- \ifx\MapsSubTitle\empty
- \blank[30pt]
- \else
- \bgroup
- \blank[12pt]
- \switchtobodyfont[18pt]\noindent \it
- \advance \rightskip 0pt plus 2em
- \MapsSubTitle\par
- \egroup
- \blank[30pt]
- \fi
- \egroup
- \setupalign[width]
- \switchtobodyfont[rm,10pt]
- \stopbaselinecorrection
- \ifMapsInColumns
- \startcolumns\hyphenpenalty1000
- \else
- \clubpenalty10000
- \widowpenalty10000
- \fi
-}
-
-\def\startArticle{\dosingleempty\dostartArticle}
-
-\def\signArticle{%
- \blank\let\\\crlf
- \noindent\switchtobodyfont[ss,9pt]%
- \MapsAuthor
- \doifsomething{\MapsAddress}{\\\MapsAddress}%
- \doifsomething{\MapsEmail}{\\\MapsEmail}%
- \switchtobodyfont[10pt]%
- \def\signArticle{}%
-}
-
-\def\stopArticle{%
- \par\signArticle
- \ifMapsInColumns \stopcolumns \fi
- \page
-}
-
-\installpagebreakhandler{last}{}
-
-%%% `logos' %%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\unexpanded\def\LaTeX % requested by erik frambach
- {{\setbox\scratchbox\hbox{L}%
- \scratchdimen\ht\scratchbox
- \setbox\scratchbox\hbox{\switchtobodyfont[script]A}%
- L\kern-.55\wd\scratchbox
- \raise\scratchdimen\hbox{\lower\ht\scratchbox\copy\scratchbox}%
- \kern-.2\wd\scratchbox\TeX}}
-
-
-\def\CONTEXT{Con{\TeX}t}
-\def\ConTeXt{Con{\TeX}t}
-\def\METAFONT{Metafont}
-\def\METAPOST{MetaPost}
-\def\POSTSCRIPT{PostScript}
-
-\def\acro#1{{\switchtobodyfont[9pt]#1}}
-
-
-%%%%%%%%%%%
-
-\doifmodeelse{onecolumn}{%
- \setuplayout[width=340pt]
- \doifmodeelse{asym}{% one col, asymmetric
- \setuplayout[backspace=187.3pt]%
- \setuptyping [widetyping][oddmargin=-117pt]
- \setuppagenumbering [alternative={singlesided,doublesided}]
- \setupheadertexts
- [{\hbox{}\hskip-117pt\TiHead}]
- [{\cap{\MapsPeriod\ \MapsYear}\quad\bf \pagenumber\hskip-30pt\hbox{}}]
- [{\hbox{}\hskip-147pt{\bf \pagenumber}\quad \cap {maps\ \MapsNumber}}]
- [\AuHead]
- \setupfootertexts
- }{% one col, symmetric
- \setuplayout[backspace=70.3pt]
- \setuppagenumbering [alternative=doublesided]
- \setuptyping[blank=halfline]
- \setupheadertexts
- [\TiHead]
- [{\cap{\MapsPeriod\ \MapsYear}\quad\bf \pagenumber\hskip-147pt\hbox{}}]
- [{\hbox{}\hskip-147pt{\bf \pagenumber}\quad \cap {maps\ \MapsNumber}}]
- [\AuHead]
- \setupfootertexts
-}}{% two col
- \setuplayout[width=457pt]
- \setupcolumns[n=2,tolerance=verytolerant,distance=11pt]
- \setuplayout[backspace=70.3pt,grid=yes]
- \setuppagenumbering [alternative=doublesided]
- \setuptyping[blank=halfline]
- \setupheadertexts
- [\TiHead]
- [{\cap{\MapsPeriod\ \MapsYear}\quad\bf \pagenumber\hskip-30pt\hbox{}}]
- [{\hbox{}\hskip-30pt{\bf \pagenumber}\quad \cap {maps\ \MapsNumber}}]
- [\AuHead]
- \setupfootertexts
-}
-
-\def\fulltextwidth{457pt}
-
-\def\startdescription
- {\blank
- \bgroup
- \def\sym##1{\par\noindent\hbox{\bf\kern -16pt ##1}\hskip 12pt}
- \startnarrower[left]
- }
-\def\stopdescription
- {\par \stopnarrower \egroup \blank \noindentation }
-
-\frenchspacing
-\setuptolerance[tolerant]
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/s-map-10.mkiv b/Master/texmf-dist/tex/context/base/s-map-10.mkiv
deleted file mode 100644
index c7541babc81..00000000000
--- a/Master/texmf-dist/tex/context/base/s-map-10.mkiv
+++ /dev/null
@@ -1,494 +0,0 @@
-%D \module
-%D [file=s-map-10.mkiv,
-%D version=2012.06.06,
-%D title=\CONTEXT\ Style File,
-%D subtitle=\MAPS\ journal style,
-%D author={Hans Hagen, Taco Hoekwater and Siep Kroonenberg},
-%D date=\currentdate,
-%D copyright=NTG/MAPS]
-
-% This module implements the MAPS style for use with the Context
-% macro package. The original MAPS layout was designed and
-% implemented in LaTeX by Taco Hoekwater and Siep Kroonenberg.
-
-% - three layouts:
-% 1. two columns
-% 2. one column, with wide outer margins (option onecolumn)
-% 3. one column, with wide left margin (option asym)
-% - font sizes deviate from TeX's usual geometric progression
-% - use of sans-serif for headers and various details
-% - option realfonts uses Linux Libertine, Euler Math and Inconsolata.
-% This is used for final typesetting.
-% The default font setup, intended for authors, uses Computer
-% Modern Math instead of Euler Math (which is still in beta),
-% and LM Mono instead of Inconsolata.
-
-% A mode nosubsub defines only two levels of sectioning. If you
-% don't need more and use the two-column layout, then this option
-% will probably improve the looks of your paper.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\newif\ifMapsInColumns
-\doifmode{asym}{\enablemode[onecolumn]} % implies onecolumn
-\doifnotmode{onecolumn}{\MapsInColumnstrue}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% fonts
-
-%%%%%%%%% first, font sizes
-\definebodyfontenvironment [7pt][% LaTeX: scriptsize
- interlinespace=8pt,
- big=8pt,
- small=6pt%
-]
-
-\definebodyfontenvironment [8pt][% LaTeX: footnotesize
- interlinespace=9pt,
- big=9pt,
- small=7pt,
- x=6pt%
-]
-
-\definebodyfontenvironment [9pt][% LaTeX: small
- interlinespace=10pt,
- big=10pt,
- small=8pt,%
- x=7pt,%
- script=6pt%
-]
-
-\definebodyfontenvironment [10pt][% LaTeX: normalsize
- interlinespace=11pt,
- big=11pt,
- a=11pt,
- small=9pt,%
- x=8pt,%
- script=7pt%
-]
-
-\definebodyfontenvironment [11pt][% LaTeX: large
- interlinespace=11pt,
- big=11pt,
- small=10pt,%
- x=9pt,%
- script=8pt%
-]
-
-\definebodyfontenvironment [14pt][%
- interlinespace=14pt,
- big=18pt,
- small=11pt,
- x=10pt%
-]
-
-\definebodyfontenvironment [18pt][%
- interlinespace=18pt,
- big=24pt,
- small=14pt,
- x=10pt%
-]
-
-\definebodyfontenvironment [24pt][%
- interlinespace=24pt,
- big=24pt,
- small=18pt,
- x=11pt%
-]
-
-%%% font families
-
-\starttypescript [maps]
-\definetypeface [maps] [rm] [serif] [modern] [default] [rscale=0.95]
-\definetypeface [maps] [mm] [math] [modern] [latin-modern]
-\definetypeface [maps] [tt] [mono] [modern] [default] [rscale=0.90]
-\definetypeface [maps] [ss] [sans] [modern] [default] [rscale=0.95]
-\stoptypescript
-
-\startmode[realfonts]
-\usetypescriptfile[type-libertine]
-
-\usetypescriptfile[type-inconsolata]
-
-\starttypescript [maps]
-\definetypeface [maps] [rm] [serif] [libertine] [default]
-\definetypeface [maps] [mm] [math] [euler] [default] [rscale=0.9]
-\definetypeface [maps] [tt] [mono] [inconsolata] [default] [rscale=0.92]
-\definetypeface [maps] [ss] [sans] [modern] [default] [rscale=0.95]
-\stoptypescript
-\stopmode
-
-\setupbodyfont[maps,10pt,rm]
-
-% activate protruding
-\setupinterlinespace[line=11pt]
-
-\setupfontsynonym[handling=pure]
-
-\setupalign[hanging]
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% additional general typographic details
-
-\setupindenting [yes,next,11pt] % indenting after enumerations etc.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% 3 versions of layout with matching headers
-
-\definepapersize
- [maps]
- [width=21cm,height=26.5cm]
-
-\setuppapersize
- [maps][maps]
-
-\setuplayout[
- [topspace=40pt,
- height=688pt,
- header=33pt,
- margin=106pt,
- leftmargindistance=11pt,
- rightmargindistance=11pt]
-
-\setupblank[5.5pt]
-
-\setuppagenumbering [location=]
-
-\definetyping [widetyping]
-
-\setupheader [style=\ss]
-\setupfooter [style=\ss]
-
-\def\AuHead{\MapsRunningAuthor}
-\def\TiHead{\ifnum\pageno=\MapsPage \relax \MapsRunningAuthor \else \MapsRunningTitle\fi}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% sectioning
-
-\setupheads[sectionnumber=no, align=right]
-
-\def\hfonti{\ssbfa}
-\def\hfontii{\ssbf}
-\def\hfontiii{\rm\it}
-
-\doifelsemode{nosubsub}{%
-\setuphead [section][%
- style=\hfontii,
- before={\blank[line]},
- after={}%
-]
-\setuphead [subsection][%
- style=\hfontiii,
- alternative=text,
- distance=6pt,
- before={\blank[halfline]}%
-]}{%
-\setuphead [section][%
- style=\hfonti,
- before={\blank[line]},
- after={\blank[halfline]}%
-]
-\setuphead [subsection][%
- style=\hfontii,
- before={\blank[halfline]},
- after={}%
-]
-\setuphead [subsubsection][%
- style=\hfontiii,
- distance=6pt,
- alternative=text,
- before={\blank[halfline]}%
-]}
-
-\doifelsemode{nosubsub}{%
-\setuphead [subject][%
- style=\hfontii,
- before={\blank[halfline]},
- after={}%
-]
-\setuphead [subsubject][%
- style=\hfontiii,
- alternative=text,
- before={\blank[halfline]}%
-]}{%
-\setuphead [subject][%
- style=\hfonti,
- before={\blank},
- after={\blank[halfline]}%
-]
-\setuphead [subsubject][%
- style=\hfontii,
- before={\blank[halfline]},
- after={}%
-]
-\setuphead [subsubsubject][%
- style=\hfontiii,
- alternative=text,
- before={\blank[halfline]}%
-]}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% floats
-
-\setupfloats [location=center, before={\ss}]
-\setupcaptions [headstyle={\ssbf},style={\ssx},
- suffix=.,distance=6pt,
- inbetween={\blank[halfline]}]
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% various document elements
-
-\definesymbol [1][\getnamedglyphdirect{file:stmary10}{boxempty}]
-
-\setupitemize[1][packed]
-
-\setupitemize [each][%
- indentnext=no,
- align=right,
- width=1em,
- distance=0pt%
-]
-
-% an outer form of itemize that does not indent
-% the paragraph.
-
-\definecomplexorsimpleempty\startouteritemize
-\def\complexstartouteritemize[#1]{\begingroup
- \startitemize[width=1sp,#1]
- \let\doitem\item
- \def\item{\doitem[]\hbox{}\kern12pt\rightskip=0pt}%
-}
-
-\def\stopouteritemize{\stopitemize\endgroup}
-
-
-\setupenumerations [indentnext=no]
-
-\setupdescriptions [indentnext=no]
-
-\unexpanded\def\smalltyping{%
- \switchtobodyfont[tt]%
- \parindent=0pt
-}
-
-% typing:
-% - prettyverbatim is NOT the default
-% - smaller size
-
-\unexpanded\def
- \XeTeX{X\lower.5ex\hbox{\kern-.1em\mirror{E}}\kern-.1667em\TeX}
-
-\setuptyping [%
- style={\smalltyping},
- option=none,
- indentnext=no%
-]
-
-\def\footnum#1{#1.}
-
-\setupnotation
- [footnote]
- [alternative=serried,
- before=,
- after=,
- location=none,
- width=\textwidth,
- before={\blank},
- numbercommand=,
- command=\footnum,
- distance=0.5em]
-
-\setuptabulate
- [before=\blank,
- inner=\ss,
- after=\blank]
-
-\def\startIntroEntry#1%
- {\startlinecorrection
- \bgroup
- \setupalign[right]
- \setuptolerance[verytolerant]
- \setupindenting[no]
- \noindent
- \switchtobodyfont[9pt]%
- \setuplocalinterlinespace[line=10pt]%
- %\hyphenpenalty10000
- \parfillskip 0pt plus 1fill
- \rightskip6pt plus 1fill
- \ss
- \bgroup\bf #1\par\egroup
- \ignorespaces }
-
-\def\stopIntroEntry
- {\par\egroup \stoplinecorrection
- \blank[line] }
-
-\def\defineIntroEntry[#1][#2][#3]%
- {\setvalue{start#1}{\startIntroEntry{#2}}%
- \setvalue {stop#1}{\stopIntroEntry#3}}
-
-\defineIntroEntry[Keywords][Keywords][]
-\defineIntroEntry[Abstract][Abstract][]
-
-% article parameters (other fields and defaults)
-\def\MapsBibData[#1]%
- {\getparameters [Maps]
- [SubTitle=,
- RunningAuthor=,
- RunningTitle=,
- Email=,
- Address=,
- Page=1,
- Title=,
- Author=,
- Period=,
- Number=,
- Year=,
- #1]%
- \doifnothing{\MapsPeriod}{%
- \ifnum \normalmonth<6 \gdef\MapsPeriod{VOORJAAR}\else \gdef\MapsPeriod{NAJAAR}\fi}
- \doifelseinstring{oorjaar}{\MapsPeriod}{\gdef\MapsPeriod{VOORJAAR}}{}%
- \doifelseinstring{pring}{\MapsPeriod}{\gdef\MapsPeriod{VOORJAAR}}{}%
- \doifelseinstring{ajaar}{\MapsPeriod}{\gdef\MapsPeriod{NAJAAR}}{}%
- \doifelseinstring{utumn}{\MapsPeriod}{\gdef\MapsPeriod{NAJAAR}}{}%
- \doifnothing{\MapsYear}{\gdef\MapsYear{\the\year}}%
- \doifnothing{\MapsNumber}{%
- \ifnum \normalmonth<6
- \xdef\MapsNumber{\the\numexpr (\the\year-1990)*2\relax}%
- \else
- \xdef\MapsNumber{\the\numexpr (\the\year-1990)*2+1\relax}%
- \fi }%
- \doifnothing\MapsRunningAuthor
- {\global\let\MapsRunningAuthor\MapsAuthor}%
- \doifnothing\MapsRunningTitle
- {\global\let\MapsRunningTitle\MapsTitle}}%
-
-\def\dostartArticle[#1]{%
- \MapsBibData[#1]
- \pageno=\MapsPage
- \setupuserpagenumber[start=\MapsPage]
- \startbaselinecorrection
- \bgroup
- \hsize = 457pt
- \let\\\crlf
- \blank[35pt,force]
- \switchtobodyfont[24pt]
- \setupalign[right]
- {\noindent\bf\MapsTitle\par}
- \ifx\MapsSubTitle\empty
- \blank[30pt]
- \else
- \bgroup
- \blank[12pt]
- \switchtobodyfont[18pt]\noindent \it
- \advance \rightskip 0pt plus 2em
- \MapsSubTitle\par
- \egroup
- \blank[30pt]
- \fi
- \egroup
- \setupalign[width]
- \switchtobodyfont[rm,10pt]
- \stopbaselinecorrection
- \ifMapsInColumns
- \startcolumns\hyphenpenalty1000
- \else
- \clubpenalty10000
- \widowpenalty10000
- \fi
-}
-
-\def\startArticle{\dosingleempty\dostartArticle}
-
-\def\signArticle{%
- \blank\let\\\crlf
- \noindent\switchtobodyfont[ss,9pt]%
- \MapsAuthor
- \doifsomething{\MapsAddress}{\\\MapsAddress}%
- \doifsomething{\MapsEmail}{\\\MapsEmail}%
- \switchtobodyfont[10pt]%
- \def\signArticle{}%
-}
-
-\def\stopArticle{%
- \par\signArticle
- \ifMapsInColumns \stopcolumns \fi
- \page
-}
-
-\installpagebreakmethod{last}{}
-
-%%% `logos' %%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\unexpanded\def\LaTeX % requested by erik frambach
- {{\setbox\scratchbox\hbox{L}%
- \scratchdimen\ht\scratchbox
- \setbox\scratchbox\hbox{\switchtobodyfont[script]A}%
- L\kern-.55\wd\scratchbox
- \raise\scratchdimen\hbox{\lower\ht\scratchbox\copy\scratchbox}%
- \kern-.2\wd\scratchbox\TeX}}
-
-
-\def\CONTEXT{Con{\TeX}t}
-\def\ConTeXt{Con{\TeX}t}
-\def\METAFONT{Metafont}
-\def\METAPOST{MetaPost}
-\def\POSTSCRIPT{PostScript}
-
-\def\acro#1{{\switchtobodyfont[9pt]#1}}
-
-
-%%%%%%%%%%%
-
-\doifelsemode{onecolumn}{%
- \setuplayout[width=340pt]
- \doifelsemode{asym}{% one col, asymmetric
- \setuplayout[backspace=187.3pt]%
- \setuptyping [widetyping][oddmargin=-117pt]
- \setuppagenumbering [alternative={singlesided,doublesided}]
- \setupheadertexts
- [{\hbox{}\hskip-117pt\TiHead}]
- [{\cap{\MapsPeriod\ \MapsYear}\quad\bf \pagenumber\hskip-30pt\hbox{}}]
- [{\hbox{}\hskip-147pt{\bf \pagenumber}\quad \cap {maps\ \MapsNumber}}]
- [\AuHead]
- \setupfootertexts
- }{% one col, symmetric
- \setuplayout[backspace=70.3pt]
- \setuppagenumbering [alternative=doublesided]
- \setuptyping[blank=halfline]
- \setupheadertexts
- [\TiHead]
- [{\cap{\MapsPeriod\ \MapsYear}\quad\bf \pagenumber\hskip-147pt\hbox{}}]
- [{\hbox{}\hskip-147pt{\bf \pagenumber}\quad \cap {maps\ \MapsNumber}}]
- [\AuHead]
- \setupfootertexts
-}}{% two col
- \setuplayout[width=457pt]
- \setupcolumns[n=2,tolerance=verytolerant,distance=11pt]
- \setuplayout[backspace=70.3pt,grid=yes]
- \setuppagenumbering [alternative=doublesided]
- \setuptyping[blank=halfline]
- \setupheadertexts
- [\TiHead]
- [{\cap{\MapsPeriod\ \MapsYear}\quad\bf \pagenumber\hskip-30pt\hbox{}}]
- [{\hbox{}\hskip-30pt{\bf \pagenumber}\quad \cap {maps\ \MapsNumber}}]
- [\AuHead]
- \setupfootertexts
-}
-
-\def\fulltextwidth{457pt}
-
-\def\startdescription
- {\blank
- \bgroup
- \def\sym##1{\par\noindent\hbox{\bf\kern -16pt ##1}\hskip 12pt}
- \startnarrower[left]
- }
-\def\stopdescription
- {\par \stopnarrower \egroup \blank \noindentation }
-
-\frenchspacing
-\setuptolerance[tolerant]
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/s-math-characters.lua b/Master/texmf-dist/tex/context/base/s-math-characters.lua
deleted file mode 100644
index 8ff3a8660df..00000000000
--- a/Master/texmf-dist/tex/context/base/s-math-characters.lua
+++ /dev/null
@@ -1,242 +0,0 @@
-if not modules then modules = { } end modules['s-math-characters'] = {
- version = 1.001,
- comment = "companion to s-math-characters.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
--- This is one of the oldest cld files but I'm not going to clean it up.
-
-moduledata.math = moduledata.math or { }
-moduledata.math.characters = moduledata.math.characters or { }
-
-local concat = table.concat
-local lower = string.lower
-local utfchar = utf.char
-local round = math.round
-
-local fontdata = fonts.hashes.identifiers
-local chardata = characters.data
-local blocks = characters.blocks
-
-local no_description = "no description, private to font"
-
-local limited = true
-local fillinthegaps = true
-local upperlimit = 0x0007F
-local upperlimit = 0xF0000
-
-local f_unicode = string.formatters["%U"]
-local f_slot = string.formatters["%s/%0X"]
-
-function moduledata.math.characters.showlist(specification)
- specification = interfaces.checkedspecification(specification)
- local id = specification.number -- or specification.id
- local list = specification.list
- local showvirtual = specification.virtual == "all"
- local check = specification.check == "yes"
- if not id then
- id = font.current()
- end
- if list == "" then
- list = nil
- end
- local tfmdata = fontdata[id]
- local characters = tfmdata.characters
- local descriptions = tfmdata.descriptions
- local resources = tfmdata.resources
- local lookuptypes = resources.lookuptypes
- local virtual = tfmdata.properties.virtualized
- local names = { }
- local gaps = mathematics.gaps
- local sorted = { }
- if type(list) == "string" then
- sorted = utilities.parsers.settings_to_array(list)
- elseif type(list) == "table" then
- sorted = list
- elseif fillinthegaps then
- sorted = table.keys(characters)
- for k, v in next, gaps do
- if characters[v] then
- sorted[#sorted+1] = k
- end
- end
- table.sort(sorted)
- else
- sorted = table.sortedkeys(characters)
- end
- if virtual then
- for k, v in ipairs(tfmdata.fonts) do
- local id = v.id
- local name = fontdata[id].properties.name
- names[k] = (name and file.basename(name)) or id
- end
- end
- if check then
- for k, v in table.sortedhash(blocks) do
- if v.math then
- local first = v.first
- local last = v.last
- local f, l = 0, 0
- if first and last then
- for unicode=first,last do
- local code = gaps[unicode] or unicode
- local char = characters[code]
- if char and not (char.commands and not showvirtual) then
- f = unicode
- break
- end
- end
- for unicode=last,first,-1 do
- local code = gaps[unicode] or unicode
- local char = characters[code]
- if char and not (char.commands and not showvirtual) then
- l = unicode
- break
- end
- end
- context.showmathcharacterssetrange(k,f,l)
- end
- end
- end
- else
- context.showmathcharactersstart()
- for _, unicode in next, sorted do
- if not limited or unicode < upperlimit then
- local code = gaps[unicode] or unicode
- local char = characters[code]
- local desc = descriptions[code]
- local info = chardata[code]
- if char then
- local commands = char.commands
- if commands and not showvirtual then
- -- skip
- else
- local next_sizes = char.next
- local v_variants = char.vert_variants
- local h_variants = char.horiz_variants
- local slookups = desc and desc.slookups
- local mlookups = desc and desc.mlookups
- local mathclass = info.mathclass
- local mathspec = info.mathspec
- local mathsymbol = info.mathsymbol
- local description = info.description or no_description
- context.showmathcharactersstartentry()
- context.showmathcharactersreference(f_unicode(unicode))
- context.showmathcharactersentryhexdectit(f_unicode(code),code,lower(description))
- context.showmathcharactersentrywdhtdpic(round(char.width or 0),round(char.height or 0),round(char.depth or 0),round(char.italic or 0))
- if virtual and commands then
- local t = { }
- for i=1,#commands do
- local ci = commands[i]
- if ci[1] == "slot" then
- local fnt, idx = ci[2], ci[3]
- t[#t+1] = f_slot(names[fnt] or fnt,idx)
- end
- end
- if #t > 0 then
- context.showmathcharactersentryresource(concat(t,", "))
- end
- end
- if mathclass or mathspec then
- context.showmathcharactersstartentryclassspec()
- if mathclass then
- context.showmathcharactersentryclassname(mathclass,info.mathname or "no name")
- end
- if mathspec then
- for i=1,#mathspec do
- local mi = mathspec[i]
- context.showmathcharactersentryclassname(mi.class,mi.name or "no name")
- end
- end
- context.showmathcharactersstopentryclassspec()
- end
- if mathsymbol then
- context.showmathcharactersentrysymbol(f_unicode(mathsymbol),mathsymbol)
- end
- if next_sizes then
- local n, done = 0, { }
- context.showmathcharactersstartnext()
- while next_sizes do
- n = n + 1
- if done[next_sizes] then
- context.showmathcharactersnextcycle(n)
- break
- else
- done[next_sizes] = true
- context.showmathcharactersnextentry(n,f_unicode(next_sizes),next_sizes)
- next_sizes = characters[next_sizes]
- v_variants = next_sizes.vert_variants or v_variants
- h_variants = next_sizes.horiz_variants or h_variants
- if next_sizes then
- next_sizes = next_sizes.next
- end
- end
- end
- context.showmathcharactersstopnext()
- if h_variants or v_variants then
- context.showmathcharactersbetweennextandvariants()
- end
- end
- if h_variants then
- context.showmathcharactersstarthvariants()
- for i=1,#h_variants do -- we might go top-down in the original
- local vi = h_variants[i]
- context.showmathcharactershvariantsentry(i,f_unicode(vi.glyph),vi.glyph)
- end
- context.showmathcharactersstophvariants()
- elseif v_variants then
- context.showmathcharactersstartvvariants()
- for i=1,#v_variants do
- local vi = v_variants[#v_variants-i+1]
- context.showmathcharactersvvariantsentry(i,f_unicode(vi.glyph),vi.glyph)
- end
- context.showmathcharactersstopvvariants()
- end
- if slookups or mlookups then
- local variants = { }
- if slookups then
- for lookupname, lookupdata in next, slookups do
- local lookuptype = lookuptypes[lookupname]
- if lookuptype == "substitution" then
- variants[lookupdata] = "sub"
- elseif lookuptype == "alternate" then
- for i=1,#lookupdata do
- variants[lookupdata[i]] = "alt"
- end
- end
- end
- end
- if mlookups then
- for lookupname, lookuplist in next, mlookups do
- local lookuptype = lookuptypes[lookupname]
- for i=1,#lookuplist do
- local lookupdata = lookuplist[i]
- local lookuptype = lookuptypes[lookupname]
- if lookuptype == "substitution" then
- variants[lookupdata] = "sub"
- elseif lookuptype == "alternate" then
- for i=1,#lookupdata do
- variants[lookupdata[i]] = "alt"
- end
- end
- end
- end
- end
- context.showmathcharactersstartlookupvariants()
- local i = 0
- for variant, lookuptype in table.sortedpairs(variants) do
- i = i + 1
- context.showmathcharacterslookupvariant(i,f_unicode(variant),variant,lookuptype)
- end
- context.showmathcharactersstoplookupvariants()
- end
- context.showmathcharactersstopentry()
- end
- end
- end
- end
- context.showmathcharactersstop()
- end
-end
diff --git a/Master/texmf-dist/tex/context/base/s-math-characters.mkiv b/Master/texmf-dist/tex/context/base/s-math-characters.mkiv
deleted file mode 100644
index 3b273cb6c21..00000000000
--- a/Master/texmf-dist/tex/context/base/s-math-characters.mkiv
+++ /dev/null
@@ -1,193 +0,0 @@
-%D \module
-%D [ file=s-math-characters.mkiv, % was: s-fnt-25 and later s-mat-10
-%D version=2009.01.25,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Math Glyph Checking,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\startmodule[math-characters]
-
-\registerctxluafile{s-math-characters}{}
-
-% context --jit --global --bodyfont=cambria --result=math-characters-cambria s-math-characters.mkiv
-% context --jit --global --bodyfont=modern --result=math-characters-modern s-math-characters.mkiv
-
-\startsetups s-math-characters:reset
-
- \let\showmathcharactersstart \relax
- \let\showmathcharactersstop \relax
- \let\showmathcharactersreference \gobbleoneargument
- \let\showmathcharactersstartentry \relax
- \let\showmathcharactersstopentry \relax
- \let\showmathcharactersentryhexdectit \gobblethreearguments
- \let\showmathcharactersentrywdhtdpic \gobblefourarguments
- \let\showmathcharactersentryresource \gobbleoneargument
- \let\showmathcharactersstartnext \relax
- \let\showmathcharactersnextentry \gobblethreearguments
- \let\showmathcharactersnextcycle \gobbleonearguments
- \let\showmathcharactersstopnext \relax
- \let\showmathcharactersstarthvariants \relax
- \let\showmathcharactershvariantsentry \gobblethreearguments
- \let\showmathcharactersstophvariants \relax
- \let\showmathcharactersstartvvariants \showmathcharactersstarthvariants
- \let\showmathcharactersvvariantsentry \showmathcharactershvariantsentry
- \let\showmathcharactersstopvvariants \showmathcharactersstophvariants
- \let\showmathcharactersbetweennextandvariants\relax
- \let\showmathcharactersstartentryclassspec \relax
- \let\showmathcharactersstopentryclassspec \relax
- \let\showmathcharactersentryclassname \gobbletwoarguments
- \let\showmathcharactersentrysymbol \gobbletwoarguments
- \let\showmathcharactersstartlookupvariants \relax
- \let\showmathcharacterslookupvariant \gobblefourarguments
- \let\showmathcharactersstoplookupvariants \relax
- \let\showmathcharacterssetrange \gobblethreearguments
-
-\stopsetups
-
-\directsetup{s-math-characters:reset}
-
-\startsetups s-math-characters:default
-
- \directsetup{s-math-characters:reset}
-
- \unexpanded\def\showmathcharactersstartentry {\blank\begingroup\raggedright}
- \unexpanded\def\showmathcharactersstopentry {\endgroup\blank}
-
- \def\showmathcharactersentryhexdectit##1##2##3%
- {##1:\space{\char##2}\space\ruledhbox{\char##2}\space##3\par
- \advance\leftskip\emwidth\relax}
-
- \def\showmathcharactersentrywdhtdpic##1##2##3##4%
- {width:\space##1,\space height:\space##2,\space depth:\space##3,\space italic:\space##4\par}
-
- \def\showmathcharactersentryresource##1%
- {virtual:\space##1\par}
-
- \def\showmathcharactersstartnext
- {\par\begingroup\hangindent\emwidth\hangafter-\plushundred\hskip-\emwidth
- next:\space}
-
- \def\showmathcharactersnextentry##1##2##3%
- {\ifnum##1>\plusone \space=>\space\fi##2~\ruledhbox{\char##3}}
-
- \def\showmathcharactersnextcycle##1%
- {\ifnum##1>\plusone \space=>\space\fi cycle}
-
- \def\showmathcharactersstopnext
- {\par\endgroup}
-
- \def\showmathcharactersstarthvariants
- {\par\begingroup\hangindent\emwidth\hangafter-\plushundred\hskip-\emwidth
- variants:\space}
-
- \def\showmathcharactershvariantsentry##1##2##3%
- {\ifnum##1>\plusone \space=>\space\fi##2~\ruledhbox{\char##3}}
-
- \def\showmathcharactersstophvariants
- {\par\endgroup}
-
- \let\showmathcharactersstartvvariants\showmathcharactersstarthvariants
- \let\showmathcharactersvvariantsentry\showmathcharactershvariantsentry
- \let\showmathcharactersstopvvariants \showmathcharactersstophvariants
-
- \def\showmathcharactersbetweennextandvariants
- {}% \space=>\space}
-
- \def\showmathcharactersentryclassname##1##2%
- {mathclass:\space##1,\space mathname:\space##2\par}
-
- \def\showmathcharactersentrysymbol##1##2%
- {mathsymbol:\space##1~\ruledhbox{\char##2}\par}
-
- \def\showmathcharactersstartlookupvariants
- {\par\begingroup\hangindent\emwidth\hangafter-\plushundred\hskip-\emwidth
- lookupvariants:\space}
-
- \def\showmathcharacterslookupvariant##1##2##3##4%
- {\ifnum##1>\plusone,\space\fi##2:~{\char##3}\space(##4)}
-
- \def\showmathcharactersstoplookupvariants
- {\par\endgroup}
-
-\stopsetups
-
-\unprotect
-
-\unexpanded\def\enableshowmathfontvirtual
- {\ctxlua{fonts.constructors.autocleanup=false}}
-
-\unexpanded\def\showmathfontcharacters
- {\dosingleempty\module_math_characters_show}
-
-\def\module_math_characters_show[#1]%
- {\begingroup
- \getdummyparameters
- [\c!bodyfont=,
- \c!list=,
- \c!check=,
- \c!alternative=default,
- \c!option=\v!all,
- #1]%
- \directsetup{s-math-characters:\dummyparameter\c!alternative}%
- \doifelsenothing{\dummyparameter\c!bodyfont}
- {\definedfont[MathRoman*math-text]}
- {\definedfont[\dummyparameter\c!bodyfont]}%
- \dontcomplain
- \ctxlua{moduledata.math.characters.showlist {
- number = false,
- check = "\dummyparameter\c!check",
- list = "\dummyparameter\c!list",
- option = "\dummyparameter\c!option",
- }}%
- \endgroup}
-
-\protect
-
-\stopmodule
-
-\continueifinputfile{s-math-characters.mkiv}
-
-\setuplayout
- [width=middle,
- height=middle,
- topspace=15mm,
- backspace=15mm,
- bottomspace=15mm,
- header=1cm,
- headerdistance=0.5cm,
- footer=0pt]
-
-\starttext
-
- \doifelse {\getdocumentargument{bodyfont}} {} {
-
- \setupbodyfont[cambria, 12pt]
- % \setupbodyfont[modern, 12pt]
- % \setupbodyfont[lmvirtual, 12pt]
- % \setupbodyfont[pxvirtual, 12pt]
- % \setupbodyfont[txvirtual, 12pt]
- % \setupbodyfont[palatino, 10pt]
- % \setupbodyfont[mathtimes, 12pt]
- % \setupbodyfont[stix, 12pt]
- % \setupbodyfont[xits, 12pt]
- % \setupbodyfont[lucida, 12pt]
- % \setupbodyfont[lucidanova,12pt]
- % \setupbodyfont[pagella, 12pt]
- % \setupbodyfont[bonum, 12pt]
-
- } {
-
- \normalexpanded{\setupbodyfont[\getdocumentargument{bodyfont},12pt]}
-
- }
-
- \showmathfontcharacters
-
-\stoptext
-
diff --git a/Master/texmf-dist/tex/context/base/s-math-coverage.lua b/Master/texmf-dist/tex/context/base/s-math-coverage.lua
deleted file mode 100644
index 3c6080dc36e..00000000000
--- a/Master/texmf-dist/tex/context/base/s-math-coverage.lua
+++ /dev/null
@@ -1,197 +0,0 @@
-if not modules then modules = { } end modules ['s-math-coverage'] = {
- version = 1.001,
- comment = "companion to s-math-coverage.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local utfchar, utfbyte = utf.char, utf.byte
-local formatters, lower = string.formatters, string.lower
-local concat = table.concat
-local sortedhash = table.sortedhash
-
-moduledata.math = moduledata.math or { }
-moduledata.math.coverage = moduledata.math.coverage or { }
-
-local context = context
-
-local ctx_NC = context.NC
-local ctx_NR = context.NR
-local ctx_HL = context.HL
-
-local ctx_startmixedcolumns = context.startmixedcolumns
-local ctx_stopmixedcolumns = context.stopmixedcolumns
-local ctx_setupalign = context.setupalign
-local ctx_starttabulate = context.starttabulate
-local ctx_stoptabulate = context.stoptabulate
-local ctx_rawmathematics = context.formatted.rawmathematics
-local ctx_mathematics = context.formatted.mathematics
-local ctx_startimath = context.startimath
-local ctx_stopimath = context.stopimath
-local ctx_setmathattribute = context.setmathattribute
-local ctx_underbar = context.underbar
-local ctx_getglyph = context.getglyph
-
-local styles = mathematics.styles
-local alternatives = mathematics.alternatives
-local charactersets = mathematics.charactersets
-
-local getboth = mathematics.getboth
-local remapalphabets = mathematics.remapalphabets
-
-local chardata = characters.data
-local superscripts = characters.superscripts
-local subscripts = characters.subscripts
-
-context.writestatus("math coverage","underline: not remapped")
-
-function moduledata.math.coverage.showalphabets()
- ctx_starttabulate { "|lT|l|Tl|" }
- for i=1,#styles do
- local style = styles[i]
- for i=1,#alternatives do
- local alternative = alternatives[i]
- for _, alphabet in sortedhash(charactersets) do
- ctx_NC()
- if i == 1 then
- context("%s %s",style,alternative)
- end
- ctx_NC()
- ctx_startimath()
- ctx_setmathattribute(style,alternative)
- for i=1,#alphabet do
- local letter = alphabet[i]
- local id = getboth(style,alternative)
- local unicode = remapalphabets(letter,id)
- if not unicode then
- ctx_underbar(utfchar(letter))
- elseif unicode == letter then
- context(utfchar(unicode))
- else
- context(utfchar(unicode))
- end
- end
- ctx_stopimath()
- ctx_NC()
- local first = alphabet[1]
- local last = alphabet[#alphabet]
- local id = getboth(style,alternative)
- local f_unicode = remapalphabets(first,id) or utfbyte(first)
- local l_unicode = remapalphabets(last,id) or utfbyte(last)
- context("%05X - %05X",f_unicode,l_unicode)
- ctx_NC()
- ctx_NR()
- end
- end
- end
- ctx_stoptabulate()
-end
-
-function moduledata.math.coverage.showcharacters()
- ctx_startmixedcolumns { balance = "yes" }
- ctx_setupalign { "nothyphenated" }
- ctx_starttabulate { "|T|i2|Tpl|" }
- for u, d in sortedhash(chardata) do
- local mathclass = d.mathclass
- local mathspec = d.mathspec
- if mathclass or mathspec then
- ctx_NC()
- context("%05X",u)
- ctx_NC()
- ctx_getglyph("MathRoman",u)
- ctx_NC()
- if mathspec then
- local t = { }
- for i=1,#mathspec do
- t[mathspec[i].class] = true
- end
- t = table.sortedkeys(t)
- context("% t",t)
- else
- context(mathclass)
- end
- ctx_NC()
- ctx_NR()
- end
- end
- ctx_stoptabulate()
- ctx_stopmixedcolumns()
-end
-
--- This is a somewhat tricky table as we need to bypass the math machinery.
-
-function moduledata.math.coverage.showscripts()
- ctx_starttabulate { "|cT|c|cT|c|c|c|l|" }
- for k, v in sortedhash(table.merged(superscripts,subscripts)) do
- local ck = utfchar(k)
- local cv = utfchar(v)
- local ss = superscripts[k] and "^" or "_"
- ctx_NC() context("%05X",k)
- ctx_NC() context(ck)
- ctx_NC() context("%05X",v)
- ctx_NC() context(cv)
- ctx_NC() ctx_rawmathematics("x%s = x%s%s",ck,ss,cv)
- ctx_NC() ctx_mathematics("x%s = x%s%s",ck,ss,cv)
- ctx_NC() context(lower(chardata[k].description))
- ctx_NC() ctx_NR()
- end
- ctx_stoptabulate()
-end
-
--- Handy too.
-
-function moduledata.math.coverage.showbold()
- ctx_starttabulate { "|lT|cm|lT|cm|lT|" }
- for k, v in sortedhash(mathematics.boldmap) do
- ctx_NC() context("%U",k)
- ctx_NC() context("%c",k)
- ctx_NC() context("%U",v)
- ctx_NC() context("%c",v)
- ctx_NC() context(chardata[k].description)
- ctx_NC() ctx_NR()
- end
- ctx_stoptabulate()
-end
-
--- function moduledata.math.coverage.showentities()
--- ctx_startmixedcolumns { balance = "yes" }
--- ctx_starttabulate { "|Tl|c|Tl|" }
--- for k, v in sortedhash(characters.entities) do
--- local b = utf.byte(v)
--- local d = chardata[b]
--- local m = d.mathname
--- local c = d.contextname
--- local s = ((m and "\\"..m) or (c and "\\".. c) or v) .. "{}{}{}"
--- ctx_NC()
--- context("%U",b)
--- ctx_NC()
--- ctx_mathematics(s)
--- ctx_NC()
--- context(k)
--- ctx_NC()
--- ctx_NR()
--- end
--- ctx_stoptabulate()
--- ctx_stopmixedcolumns()
--- end
-
-function moduledata.math.coverage.showentities()
- ctx_startmixedcolumns { balance = "yes" }
- ctx_starttabulate { "|T||T|T|" }
- for k, v in sortedhash(characters.entities) do
- local d = chardata[v]
- if d then
- local m = d.mathclass or d.mathspec
- local u = d.unicodeslot
- ctx_NC() context(m and "m" or "t")
- ctx_NC() ctx_getglyph("MathRoman",u)
- ctx_NC() context("%05X",u)
- ctx_NC() context(k)
- ctx_NC() ctx_NR()
- end
- end
- ctx_stoptabulate()
- ctx_stopmixedcolumns()
-end
-
diff --git a/Master/texmf-dist/tex/context/base/s-math-coverage.mkiv b/Master/texmf-dist/tex/context/base/s-math-coverage.mkiv
deleted file mode 100644
index e318c9effdd..00000000000
--- a/Master/texmf-dist/tex/context/base/s-math-coverage.mkiv
+++ /dev/null
@@ -1,38 +0,0 @@
-%D \module
-%D [ file=s-math-coverage, % s-fnt-33, s-fnt-32
-%D version=2011.05.10, % and older
-%D title=\CONTEXT\ Style File,
-%D subtitle=Show Math Coverage,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\startmodule[math-coverage]
-
-\registerctxluafile{s-math-coverage}{}
-
-\installmodulecommandluasingle \showmathalphabets {moduledata.math.coverage.showalphabets}
-\installmodulecommandluasingle \showmathcharacters{moduledata.math.coverage.showcharacters}
-\installmodulecommandluasingle \showmathscripts {moduledata.math.coverage.showscripts}
-\installmodulecommandluasingle \showmathbold {moduledata.math.coverage.showbold}
-\installmodulecommandluasingle \showmathentities {moduledata.math.coverage.showentities}
-
-\stopmodule
-
-\continueifinputfile{s-math-coverage.mkiv}
-
-\usemodule[art-01]
-
-\starttext
-
- \showmathalphabets \page
- \showmathcharacters \page
- \showmathscripts \page
- \showmathbold \page
- \showmathentities \page
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-math-extensibles.mkiv b/Master/texmf-dist/tex/context/base/s-math-extensibles.mkiv
deleted file mode 100644
index f9ff8547ae1..00000000000
--- a/Master/texmf-dist/tex/context/base/s-math-extensibles.mkiv
+++ /dev/null
@@ -1,145 +0,0 @@
-%D \module
-%D [ file=s-math-extensibles.mkiv,
-%D version=2013.02.03,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Math Stackers Checking,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 provides a macro that will typeset a table of (horizontal)
-%D extensibles including some tracing. You can set up the \type {demo}
-%D stacker category to tweak things.
-%D
-%D \starttyping
-%D \showmathextensibles[alternative=a|b]
-%D \stoptyping
-
-\startmodule[math-extensibles]
-
-\unprotect
-
-\definemathstackers
- [demo]
- [math]
- [\c!offset=\v!max]
-
-\installcorenamespace{modulemathextensibles}
-\installcorenamespace{modulemathextensiblesalternative}
-
-\installdirectsetuphandler \??modulemathextensibles {modulemathextensibles}
-
-\setupmodulemathextensibles
- [\c!alternative=\v!a]
-
-\unexpanded\def\showmathextensibles
- {\dosingleempty\module_math_extensibles_show_all}
-
-\def\module_math_extensibles_show_all[#1]%
- {\begingroup
- \setupcurrentmodulemathextensibles[#1]%
- \expandnamespacevalue\??modulemathextensiblesalternative\c!alternative\v!a
- \endgroup}
-
-\def\modulemathextensiblesalternativea#1#2#3%
- {\NC U+#1
- \NC \filledhboxm{\math{\char"#1}}
- \NC \hbox{\math{\mathextensible[demo]{"#1}{top}{bottom}}}
- \NC \hbox{\math{\mathextensible[demo]{"#1}{}{bottom}}}
- \NC \hbox{\math{\mathextensible[demo]{"#1}{top}{}}}
- \NC \nohyphens \veryraggedright #2
- \NC\NR}
-
-\setvalue{\??modulemathextensiblesalternative\v!a}%
- {\enabletrackers[math.stackers.texts]
- \starttabulate[|Tl|l|l|l|l|Tp|]
- \ctxlua { moduledata.math.extensibles.show {
- command = "modulemathextensiblesalternativea",
- } }
- \stoptabulate
- \disabletrackers[math.stackers.texts]}
-
-\def\modulemathextensiblesalternativeb#1#2#3%
- {\NC U+#1
- \NC \math{\char"#1}
- \NC \nohyphens \veryraggedright #3
- \NC \NR}
-
-\setvalue{\??modulemathextensiblesalternative\v!b}%
- {\enabletrackers[math.stackers.texts]
- \starttabulate[|Tl|l|Tp|]
- \ctxlua { moduledata.math.extensibles.show {
- command = "modulemathextensiblesalternativeb",
- sparse = true,
- } }
- \stoptabulate
- \disabletrackers[math.stackers.texts]}
-
-\startluacode
- moduledata.math = moduledata.math or { }
- moduledata.math.extensibles = moduledata.math.extensibles or { }
-
- function moduledata.math.extensibles.show(settings)
- local command = settings.command
- local sparse = settings.sparse
- for k, v in table.sortedhash(characters.data) do
- local mathextensible = v.mathextensible
- if mathextensible == "r" or mathextensible == "l" or mathextensible == "h" then
- local names = { }
- local mathname = v.mathname
- if mathname then
- names[#names+1] = v.mathclass .. ":" .. mathname
- end
- local mathspec = v.mathspec
- if mathspec then
- for i=1,#mathspec do
- local v = mathspec[i]
- names[#names+1] = v.class .. ":" .. v.name
- end
- end
- local mathfiller = v.mathfiller
- if mathfiller then
- names[#names+1] = "filler:" .. mathfiller
- end
- if not sparse or #names > 0 then
- context[command](string.format("%04X",k),v.description,table.concat(names," "))
- end
- end
- end
- end
-\stopluacode
-
-\protect
-
-\stopmodule
-
-\continueifinputfile{s-math-extensibles.mkiv}
-
-\setuplayout
- [width=middle,
- height=middle,
- footer=0cm,
- backspace=1.5cm,
- topspace=1.5cm]
-
-\setuphead[chapter][style=\bfc]
-\setuphead[section][style=\bfa]
-
-\starttext
-
- \dowith {a,b} {
-
- \page \title {Latin Modern} \showmathextensibles[alternative=#1]
- \page \setupbodyfont[pagella] \title {Pagella} \showmathextensibles[alternative=#1]
- \page \setupbodyfont[termes] \title {Termes} \showmathextensibles[alternative=#1]
- \page \setupbodyfont[dejavu] \title {Xits} \showmathextensibles[alternative=#1]
- \page \setupbodyfont[cambria] \title {Cambria} \showmathextensibles[alternative=#1]
- \page \setupbodyfont[lucidaot] \title {Lucida} \showmathextensibles[alternative=#1]
-
- }
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-math-parameters.lua b/Master/texmf-dist/tex/context/base/s-math-parameters.lua
deleted file mode 100644
index 8e8c15a2d37..00000000000
--- a/Master/texmf-dist/tex/context/base/s-math-parameters.lua
+++ /dev/null
@@ -1,135 +0,0 @@
-if not modules then modules = { } end modules ['s-math-coverage'] = {
- version = 1.001,
- comment = "companion to s-math-coverage.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-moduledata.math = moduledata.math or { }
-moduledata.math.parameters = moduledata.math.parameters or { }
-
-local tables = utilities.tables.definedtable("math","tracing","spacing","tables")
-
-tables.styleaxis = {
- "ord", "op", "bin", "rel", "open", "close", "punct", "inner",
-}
-
-tables.parameters = {
- "quad", "axis", "operatorsize",
- "overbarkern", "overbarrule", "overbarvgap",
- "underbarkern", "underbarrule", "underbarvgap",
- "radicalkern", "radicalrule", "radicalvgap",
- "radicaldegreebefore", "radicaldegreeafter", "radicaldegreeraise",
- "stackvgap", "stacknumup", "stackdenomdown",
- "fractionrule", "fractionnumvgap", "fractionnumup",
- "fractiondenomvgap", "fractiondenomdown", "fractiondelsize",
- "limitabovevgap", "limitabovebgap", "limitabovekern",
- "limitbelowvgap", "limitbelowbgap", "limitbelowkern",
- "underdelimitervgap", "underdelimiterbgap",
- "overdelimitervgap", "overdelimiterbgap",
- "subshiftdrop", "supshiftdrop", "subshiftdown",
- "subsupshiftdown", "subtopmax", "supshiftup",
- "supbottommin", "supsubbottommax", "subsupvgap",
- "spaceafterscript", "connectoroverlapmin",
-}
-
-tables.styles = {
- "display",
- "text",
- "script",
- "scriptscript",
-}
-
-function tables.stripmu(str)
- str = string.gsub(str,"mu","")
- str = string.gsub(str," ","")
- str = string.gsub(str,"plus","+")
- str = string.gsub(str,"minus","-")
- return str
-end
-
-function tables.strippt(old)
- local new = string.gsub(old,"pt","")
- if new ~= old then
- new = string.format("%0.4f",tonumber(new))
- end
- return new
-end
-
-function moduledata.math.parameters.showspacing()
-
- local styles = tables.styles
- local styleaxis = tables.styleaxis
-
- context.starttabulate { "|Tl|Tl|" .. string.rep("Tc|",(#styles*2)) }
- context.HL()
- context.NC()
- context.NC()
- context.NC()
- for i=1,#styles do
- context.bold(styles[i])
- context.NC()
- context.bold("(cramped)")
- context.NC()
- end
- context.NR()
- context.HL()
- for i=1,#styleaxis do
- -- print(key,tex.getmath(key,"text"))
- local one = styleaxis[i]
- for j=1,#styleaxis do
- local two = styleaxis[j]
- context.NC()
- if j == 1 then
- context.bold(one)
- end
- context.NC()
- context.bold(two)
- context.NC()
- for i=1,#styles do
- context("\\ctxlua{context(math.tracing.spacing.tables.stripmu('\\the\\Umath%s%sspacing\\%sstyle'))}",one,two,styles[i])
- context.NC()
- context("\\ctxlua{context(math.tracing.spacing.tables.stripmu('\\the\\Umath%s%sspacing\\cramped%sstyle'))}",one,two,styles[i])
- context.NC()
- end
- context.NR()
- end
- end
- context.stoptabulate()
-end
-
-function moduledata.math.parameters.showparameters()
-
- local styles = tables.styles
- local parameters = tables.parameters
-
- context.starttabulate { "|l|" .. string.rep("Tc|",(#styles*2)) }
- context.HL()
- context.NC()
- context.NC()
- for i=1,#styles do
- context.bold(styles[i])
- context.NC()
- context.bold("(cramped)")
- context.NC()
- end
- context.NR()
- context.HL()
- for i=1,#parameters do
- local parameter = parameters[i]
- -- print(parameter,tex.getmath(parameter,"text"))
- context.NC()
- context.type(parameter)
- context.NC()
- for i=1,#styles do
- context("\\ctxlua{context(math.tracing.spacing.tables.strippt('\\the\\Umath%s\\%sstyle'))}",parameter,styles[i])
- context.NC()
- context("\\ctxlua{context(math.tracing.spacing.tables.strippt('\\the\\Umath%s\\cramped%sstyle'))}",parameter,styles[i])
- context.NC()
- end
- context.NR()
- end
- context.stoptabulate()
-
-end
diff --git a/Master/texmf-dist/tex/context/base/s-math-parameters.mkiv b/Master/texmf-dist/tex/context/base/s-math-parameters.mkiv
deleted file mode 100644
index f2fde5d8384..00000000000
--- a/Master/texmf-dist/tex/context/base/s-math-parameters.mkiv
+++ /dev/null
@@ -1,41 +0,0 @@
-%D \module
-%D [ file=s-math-parameters.mkiv,
-%D version=2012.12.05,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Show Math Parameters,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\startmodule[math-parameters]
-
-\registerctxluafile{s-math-parameters}{}
-
-\installmodulecommandluasingle \showmathspacing {moduledata.math.parameters.showspacing}
-\installmodulecommandluasingle \showmathparameters {moduledata.math.parameters.showparameters}
-
-\stopmodule
-
-\continueifinputfile{s-math-parameters.mkiv}
-
-\setuplayout
- [width=middle,
- height=middle,
- backspace=1cm,
- topspace=1cm,
- footer=0pt,
- header=0pt]
-
-\setupbodyfont
- [dejavu,8pt]
-
-\starttext
-
- \showmathspacing \page
- \showmathparameters \page
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-math-repertoire.mkiv b/Master/texmf-dist/tex/context/base/s-math-repertoire.mkiv
deleted file mode 100644
index 230eb513ebe..00000000000
--- a/Master/texmf-dist/tex/context/base/s-math-repertoire.mkiv
+++ /dev/null
@@ -1,487 +0,0 @@
-%D \module
-%D [ file=s-math-parameters.mkiv, % was s-mat-12.mkiv
-%D version=2012.06.06, % whatever, probably a bit earlier
-%D title=\CONTEXT\ Style File,
-%D subtitle=Show Math Character Repertoire,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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[s][math-characters]
-
-% context --jit --global --bodyfont=lucidanova --result=math-repertoire-lucidanova s-math-repertoire.mkiv
-% context --jit --global --bodyfont=cambria --result=math-repertoire-cambria s-math-repertoire.mkiv
-% context --jit --global --bodyfont=xits --result=math-repertoire-xits s-math-repertoire.mkiv
-% context --jit --global --bodyfont=modern --result=math-repertoire-modern s-math-repertoire.mkiv
-% context --jit --global --bodyfont=pagella --result=math-repertoire-pagella s-math-repertoire.mkiv
-% context --jit --global --bodyfont=termes --result=math-repertoire-termes s-math-repertoire.mkiv
-% context --jit --global --bodyfont=bonum --result=math-repertoire-bonum s-math-repertoire.mkiv
-
-\startmodule[math-repertoire]
-
-% layout
-
-\definecolor[backgroundcolor] [r=.6,g=.6]
-\definecolor[backgroundcolorx][r=.6]
-\definecolor[backgroundcolory][g=.6]
-\definecolor[baselinecolor] [a=1,t=.5,s=.6]
-\definecolor[charactercolor] [b=.6]
-\definecolor[pagecolor] [s=.1]
-\definecolor[nonecolor] [s=.5]
-\definecolor[textcolor] [s=.9]
-
-% \setuppapersize[HD]
-%
-% \setuplayout
-% [page]
-
-\setuppapersize
- [HD+]
-
-\setuplayout
- [backspace=0pt,
- topspace=0pt,
- bottomspace=120pt, %1200-1080
- bottom=24pt,
- bottomdistance=5mm,
- header=0pt,
- footer=0pt,
- width=middle,
- height=middle]
-
-\definelayer
- [page]
-
-\setuplayer
- [page]
- [width=\textwidth,
- height=\textheight]
-
-\setupbackgrounds
- [page]
- [background=color,
- backgroundcolor=pagecolor]
-
-\setupbackgrounds
- [text][text]
- [bottomframe=on,
- framecolor=textcolor,
- rulethickness=0.025ex]
-
-\setupmakeup
- [standard]
- [pagestate=start]
-
-\setupinteraction
- [state=start,
- menu=on]
-
-\defineinteractionmenu
- [ALPHABETS]
- [bottom]
-
-\defineinteractionmenu
- [alphabets]
- [bottom]
-
-\defineinteractionmenu
- [symbols]
- [bottom]
-
-\setupinteractionmenu
- [bottom]
- [before=\vfill,
- after=\vfill,
- left=\hfill,
- right=\hfill,
- style=\tt\bf,
- distance=0pt,
- color=textcolor,
- contrastcolor=nonecolor]
-
-\def\showmathcharacterssetrange#1#2#3%
- {\writestatus{range}{#1: \unihex{#2} - \unihex{#3}}%
- \ifcase#2\relax
- \definereference[#1][notpresent]%
- \else\ifcase#3\relax
- \definereference[#1][notpresent]%
- \else
- \normalexpanded{\definereference[#1][\unihex{#2}]}%
- \fi\fi}
-
-\startinteractionmenu[bottom]
- \startgot [firstpage] first \stopgot \quad
- \startgot [deltapage(-100)] -100 \stopgot \quad
- \startgot [deltapage(-10)] -10 \stopgot \quad
- \startgot [previouspage] previous \stopgot \quad
- \startgot [nextpage] next \stopgot \quad
- \startgot [deltapage(+10)] +10 \stopgot \quad
- \startgot [deltapage(+100)] +100 \stopgot \quad
- \startgot [lastpage] last \stopgot
-\stopinteractionmenu
-
-\startinteractionmenu[ALPHABETS]
- \startgot [U+00041] NORMAL \stopgot \quad
- \startgot [U+1D400] BOLD \stopgot \quad
- \startgot [U+1D434] ITALIC \stopgot \quad
- \startgot [U+1D468] BOLDITALIC \stopgot \quad
- \startgot [U+1D49C] SCRIPT \stopgot \quad
- \startgot [U+1D4D0] BOLDSCRIPT \stopgot \quad
- \startgot [U+1D504] FRAKTUR \stopgot \quad
- \startgot [U+1D538] DOUBLESTRUCK \stopgot \quad
- \startgot [U+1D56C] BOLDFRAKTUR \stopgot \quad
- \startgot [U+1D5A0] SS NORMAL \stopgot \quad
- \startgot [U+1D5D4] SS BOLD \stopgot \quad
- \startgot [U+1D608] SS ITALIC \stopgot \quad
- \startgot [U+1D63C] SS BOLDITALIC \stopgot \quad
- \startgot [U+1D670] MONOSPACE \stopgot \quad
- \startgot [U+00391] GRK NORMAL \stopgot \quad
- \startgot [U+1D6A8] GRK BOLD \stopgot \quad
- \startgot [U+1D6E2] GRK ITALIC \stopgot \quad
- \startgot [U+1D71C] GRK BOLDITALIC \stopgot \quad
- \startgot [U+1D756] GRK SS BOLD \stopgot \quad
- \startgot [U+1D790] GRK SS BOLDITALIC \stopgot
-\stopinteractionmenu
-
-\startinteractionmenu[alphabets]
- \startgot [U+00061] normal \stopgot \quad
- \startgot [U+1D41A] bold \stopgot \quad
- \startgot [U+1D44E] italic \stopgot \quad
- \startgot [U+1D482] bolditalic \stopgot \quad
- \startgot [U+1D4B6] script \stopgot \quad
- \startgot [U+1D4EA] boldscript \stopgot \quad
- \startgot [U+1D51E] fraktur \stopgot \quad
- \startgot [U+1D552] doublestruck \stopgot \quad
- \startgot [U+1D586] boldfraktur \stopgot \quad
- \startgot [U+1D5BA] ss normal \stopgot \quad
- \startgot [U+1D5EE] ss bold \stopgot \quad
- \startgot [U+1D622] ss italic \stopgot \quad
- \startgot [U+1D656] ss bolditalic \stopgot \quad
- \startgot [U+1D68A] monospace \stopgot \quad
- \startgot [U+003B1] grk normal \stopgot \quad
- \startgot [U+1D6C2] grk bold \stopgot \quad
- \startgot [U+1D6FC] grk italic \stopgot \quad
- \startgot [U+1D736] grk bolditalic \stopgot \quad
- \startgot [U+1D770] grk ss bold \stopgot \quad
- \startgot [U+1D7AA] grk ss bolditalic \stopgot
-\stopinteractionmenu
-
-% \startinteractionmenu[symbols]
-% \startgot [U+00030] dig normal \stopgot \quad
-% \startgot [U+1D7CE] dig bold \stopgot \quad
-% \startgot [U+1D7D8] dig doublestruck \stopgot \quad
-% \startgot [U+1D7E2] dig ss normal \stopgot \quad
-% \startgot [U+1D7EC] dig ss bold \stopgot \quad
-% \startgot [U+1D7F6] dig monospace \stopgot \quad
-% \startgot [U+02200] operators \stopgot \quad
-% \startgot [U+02701] symbols a \stopgot \quad
-% \startgot [U+02901] symbols b \stopgot \quad
-% \startgot [U+02A00] supplemental \stopgot \quad
-% \startgot [U+027F0] arrows a \stopgot \quad
-% \startgot [U+02900] arrows b \stopgot \quad
-% \startgot [U+1F800] arrows c \stopgot
-% \stopinteractionmenu
-
-\startinteractionmenu[symbols]
- \startgot [U+00030] dig normal \stopgot \quad
- \startgot [U+1D7CE] dig bold \stopgot \quad
- \startgot [U+1D7D8] dig doublestruck \stopgot \quad
- \startgot [U+1D7E2] dig ss normal \stopgot \quad
- \startgot [U+1D7EC] dig ss bold \stopgot \quad
- \startgot [U+1D7F6] dig monospace \stopgot \quad
- \startgot [U+02200] operators \stopgot \quad
- \startgot [miscellaneousmathematicalsymbolsa] symbols a \stopgot \quad
- \startgot [miscellaneousmathematicalsymbolsb] symbols b \stopgot \quad
- \startgot [supplementalmathematicaloperators] supplemental \stopgot \quad
- \startgot [supplementalarrowsa] arrows a \stopgot \quad
- \startgot [supplementalarrowsb] arrows b \stopgot \quad
- \startgot [supplementalarrowsc] arrows c \stopgot \quad
- \removeunwantedspaces
-\stopinteractionmenu
-
-\defineframed
- [somedata]
- [background=color,
- backgroundcolor=textcolor,
- %framecolor=charactercolor,
- %rulethickness=1pt,
- frame=off,
- offset=1ex]
-
-% helpers
-
-\unexpanded\def\showmathcharacterstxt#1%
- {{\tttf#1}}
-
-\unexpanded\def\showmathcharacterschr#1#2%
- {\iffontchar\font#2\relax
- \scale
- [sx=#1,sy=#1]
- {\dontleavehmode
- \begingroup
- \setbox\scratchbox\hbox{\charactercolor\char#2}%
- \scratchdimen\wd\scratchbox
- \ifdim\scratchdimen>\zeropoint
- \backgroundline[backgroundcolor]{\box\scratchbox}%
- \else\ifdim\scratchdimen<\zeropoint
- \scratchdimen-\scratchdimen
- \setbox\scratchbox\hbox to \scratchdimen{\hss\charactercolor\char#2}%
- \backgroundline[backgroundcolorx]{\box\scratchbox}%
- \else
- \setbox\scratchbox\hbox to 1em{\hss\charactercolor\char#2}%
- \scratchdimen\wd\scratchbox
- \backgroundline[backgroundcolory]{\box\scratchbox}%
- \fi\fi
- \hskip-\scratchdimen
- \baselinecolor\vrule width \scratchdimen height .05ex depth .05ex
- \endgroup}%
- \fi}
-
-\unexpanded\def\showmathcharactersmth#1#2%
- {\setbox\scratchbox\hbox{\showmathcharacterschr{#1}{#2}}%
- \ht\scratchbox\strutht
- \dp\scratchbox\strutdp
- \box\scratchbox}
-
-\let\showmathcharactersbodyfonts\empty
-
-\unexpanded\def\showmathcharactersbodyfontentry#1#2%
- {\somedata
- [align={none,middle},background=,height=5cm]
- {\begingroup
- \switchtobodyfont[#2,12pt]%
- \definedfont[MathRoman*math-text]%
- \showmathcharactersmth{10}{#1}%
- \endgroup
- \vfilll
- \doifelsemode{crosslink}
- {\goto{\strut\textcolor\showmathcharacterstxt{#2}}[#2::#1]}%
- {\strut\textcolor\showmathcharacterstxt{#2}}}%
- \hskip1ex}
-
-\unexpanded\def\showmathcharacterssetbodyfonts#1%
- {\edef\showmathcharactersbodyfonts{#1}%
- \def\doshowmathcharacterssetbodyfonts##1{\setupbodyfont[##1,12pt]}%
- \processcommacommand[\showmathcharactersbodyfonts]\doshowmathcharacterssetbodyfonts}
-
-\unexpanded\def\showmathcharactersbodyfontschars#1%
- {\processcommacommand[\showmathcharactersbodyfonts]{\showmathcharactersbodyfontentry{#1}}}
-
-% main
-
-\unexpanded\def\showmathcharactersstart
- {\starttext
- \startstandardmakeup % we use baselinecolor so that we have a transparency on page 1
- \setupalign[middle]
- \vfil
- \dontleavehmode \scale[height=.3\textheight]{\strut\color[textcolor]{\fontclass}}
- \vfil
- \dontleavehmode \scale[height=.1\textheight]{\strut\color[baselinecolor]{\currentdate}}
- \vfil
- \vfil
- \stopstandardmakeup}
-
-\unexpanded\def\showmathcharactersstop
- {\stoptext}
-
-% entry
-
-\unexpanded\def\showmathcharactersstartentry
- {\startstandardmakeup}
-
-\unexpanded\def\showmathcharactersstopentry
- {\tightlayer[page]
- \stopstandardmakeup}
-
-\unexpanded\def\showmathcharactersreference#1%
- {\setlayer[page]{\pagereference[#1]}}
-
-\unexpanded\def\showmathcharactersentryhexdectit#1#2#3%
- {\setlayer
- [page]
- [preset=middletop,voffset=5mm]
- {\somedata[height=1cm]{\showmathcharacterstxt{#1}}}
- \setlayer
- [page]
- [preset=middle,y=2cm]
- {\showmathcharactersmth{25}{#2}}
- \setlayer
- [page]
- [preset=righttop,offset=5mm]
- {\somedata[height=1cm]{\showmathcharacterstxt{#3}}}
- \doifsomething\showmathcharactersbodyfonts
- {\setlayer
- [page]
- [preset=middlebottom,voffset=5mm]
- {\showmathcharactersbodyfontschars{#2}}}}
-
-% dimensions
-
-\unexpanded\def\showmathcharactersentrywdhtdpic#1#2#3#4%
- {\setlayer
- [page]
- [preset=leftbottom,offset=5mm]
- {\somedata[align=normal,width=5cm]
- {\strut width \hfill \the\dimexpr#1sp\par
- \strut height\hfill \the\dimexpr#2sp\par
- \strut depth \hfill \the\dimexpr#3sp\par
- \strut italic\hfill \the\dimexpr#4sp}}}
-
-\unexpanded\def\showmathcharactersentryresource#1%
- {} % {virtual: #1\par}
-
-% next
-
-\unexpanded\def\showmathcharactersstartnext
- {\setlayer
- [page]
- [preset=middleleft,hoffset=5mm]
- \bgroup\vbox\bgroup}
-
-\unexpanded\def\showmathcharactersstopnext
- {\egroup\egroup}
-
-\unexpanded\def\showmathcharactersnextentry#1#2#3%
- {\ifnum#1>1 \vskip1ex \fi
- \dontleavehmode\somedata
- [align=normal,width=4cm]
- {\strut\showmathcharacterstxt{#2}\hfill\showmathcharacterschr{2}{#3}}\par}
-
-\unexpanded\def\showmathcharactersnextcycle#1%
- {\ifnum#1>1 \vskip1ex \fi
- \dontleavehmode\somedata
- [align=normal,width=4cm]
- {\strut\showmathcharacterstxt{cycle}}\par}
-
-% variants
-
-\unexpanded\def\showmathcharactersstartvvariants
- {\setlayer
- [page]
- [preset=lefttop,offset=5mm]
- \bgroup\vbox\bgroup}
-
-\unexpanded\def\showmathcharactersstarthvariants
- {\setlayer
- [page]
- [preset=lefttop,offset=5mm]
- \bgroup\hbox\bgroup}
-
-\unexpanded\def\showmathcharactersvvariantsentry#1#2#3%
- {\ifnum#1>1 \vskip1ex \fi
- \dontleavehmode\somedata
- [align=middle,width=4cm]
- {\strut\showmathcharacterstxt{#2}\hfilll\showmathcharacterschr{2}{#3}}}
-
-\unexpanded\def\showmathcharactershvariantsentry#1#2#3%
- {\ifnum#1>1 \hskip1ex \else \dontleavehmode \fi
- \somedata
- [align={none,middle},height=2cm]
- {\strut\showmathcharacterstxt{#2}\vfilll\showmathcharacterschr{2}{#3}}}
-
-\unexpanded\def\showmathcharactersstopvvariants
- {\egroup\egroup}
-
-\unexpanded\def\showmathcharactersstophvariants
- {\egroup\egroup}
-
-\unexpanded\def\showmathcharactersbetweennextandvariants
- {}
-
-% classes
-
-\unexpanded\def\showmathcharactersstartentryclassspec
- {\setlayer
- [page]
- [preset=rightbottom,offset=5mm]
- \bgroup\somedata[align=normal,width=8cm]\bgroup}
-
-\unexpanded\def\showmathcharactersstopentryclassspec
- {\egroup\egroup}
-
-\unexpanded\def\showmathcharactersentryclassname#1#2%
- {\strut{\showmathcharacterstxt#1}\hfill\showmathcharacterstxt{#2}\par}
-
-% symbols
-
-\unexpanded\def\showmathcharactersentrysymbol#1#2%
- {\setlayer
- [page]
- [preset=leftbottom,hoffset=5mm,voffset=50mm]
- {\somedata
- [align=normal,width=5cm]
- {\showmathcharacterstxt{#1}\hfill\showmathcharacterschr{4}{#2}}}}
-
-% alternates
-
-\unexpanded\def\showmathcharactersstartlookupvariants
- {\setlayer
- [page]
- [preset=middleright,hoffset=5mm]
- \bgroup\vbox\bgroup}
-
-\unexpanded\def\showmathcharactersstoplookupvariants
- {\egroup\egroup}
-
-\unexpanded\def\showmathcharacterslookupvariant#1#2#3#4%
- {\ifnum#1>1 \vskip1ex \fi
- \somedata
- [align=normal,width=7cm]
- {\showmathcharacterstxt{#4:} \showmathcharacterstxt{#2}\hfill\showmathcharacterschr{4}{#3}}}
-
-% main
-
-% this is a one-run style so we can forget about an alternative
-% just assume that the previous definitions are global
-
-\unprotect
-
-\unexpanded\def\showmathfontrepertoire
- {\dosingleempty\module_math_repertoire_show}
-
-\def\module_math_repertoire_show[#1]%
- {\showmathfontcharacters[alternative=,option=,check=yes,#1]
- \showmathfontcharacters[alternative=,option=,#1]}
-
-\protect
-
-\stopmodule
-
-\continueifinputfile{s-math-repertoire.mkiv}
-
-\showmathcharacterssetbodyfonts{lucidaot,cambria,xits,modern,pagella,termes,bonum,schola,dejavu}
-
-\starttext
-
- \doifelse {\getdocumentargument{bodyfont}} {} {
-
- % \setupbodyfont[cambria, 12pt]
- % \setupbodyfont[modern, 12pt]
- % \setupbodyfont[lmvirtual, 12pt]
- % \setupbodyfont[pxvirtual, 12pt]
- % \setupbodyfont[txvirtual, 12pt]
- % \setupbodyfont[palatino, 10pt]
- % \setupbodyfont[mathtimes, 12pt]
- % \setupbodyfont[stix, 12pt]
- % \setupbodyfont[xits, 12pt]
- % \setupbodyfont[lucida, 12pt]
- % \setupbodyfont[lucidaot, 12pt]
- % \setupbodyfont[pagella, 12pt]
- % \setupbodyfont[bonum, 12pt]
- % \setupbodyfont[schola, 12pt]
- \setupbodyfont[dejavu, 12pt]
-
- } {
-
- \normalexpanded{\setupbodyfont[\getdocumentargument{bodyfont},12pt]}
-
- }
-
- \showmathfontrepertoire
-
-\stoptext
-
diff --git a/Master/texmf-dist/tex/context/base/s-mod-00.mkii b/Master/texmf-dist/tex/context/base/s-mod-00.mkii
deleted file mode 100644
index a81406a7346..00000000000
--- a/Master/texmf-dist/tex/context/base/s-mod-00.mkii
+++ /dev/null
@@ -1,511 +0,0 @@
-%D \module
-%D [ file=s-mod-00,
-%D version=very-old,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Documentation Base Environment,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 looks like crap, is not documented, will
-%D change, and used to be called modu-*.tex.
-
-% todo:
-%
-% file inclusions -> hyperlinks
-
-\mainlanguage[en] % better not here
-
-\usemodule[units]
-
-\enableactivediscretionaries
-\newprettytrue
-
-\unprotect
-
-% beter:
-%
-% group -> title
-% title -> category
-% subtitle -> subtitle
-
-% herzien ivm fonts
-
-% nog eens \interface \\ \\ verder doorvoeren
-
-\def\resetmoduledocumentation
- {\getrawparameters
- [Module]
- [ file=\jobname,
- type=,
- version={\currentdate[\v!year,{.},\v!month,{.},\v!day]},
- system=\CONTEXT,
- title=Unknown Title,
- subtitle=,
- author=Unknown Author,
- date=\currentdate,
- copyright=Unknown Copyright,
- suggestions=]}
-
-\resetmoduledocumentation
-
-\def\dostartmoduledocumentation[#1]%
- {\newcounter\ParagraphNumber
- \resetmoduledocumentation
- \getrawparameters[Module][type=tex,#1]}
-
-\def\startmoduledocumentation
- {\starttext
- \dosingleempty\dostartmoduledocumentation}
-
-\def\stopmoduledocumentation
- {\page
- \placeregister
- [\v!index]
- [\c!balance=\v!yes,
- \c!indicator=\v!no,
- \c!criterium=\v!text]
- \stoptext}
-
-% \def\complexmodule[#1]%
-% {\startglobal % i.v.m. \bgroup in \startdocumentation
-% \getrawparameters[Module][#1]
-% \stopglobal % i.v.m. \bgroup in \startdocumentation
-% \moduletitle}
-%
-% \def\simplemodule#1%
-% {\type{#1}}
-%
-% \definecomplexorsimple\module
-
-% \startmode[atpragma]
-%
-% \def\TitlePage#1% can be done more efficient
-% {\startMPrun
-% mpgraph := #1 ;
-% input mp-cont ;
-% \stopMPrun
-% \externalfigure
-% [\bufferprefix mprun.#1]
-% [\c!height=\vsize,
-% \c!width=\hsize]}
-%
-% \defineoverlay[titlepage][\TitlePage{512}]
-%
-% \stopmode
-
-\startuseMPgraphic{titlepage}
-
- width := PaperWidth ;
- height := PaperHeight ;
-
- color local_red, local_white, local_blue ;
-
- local_white := white ;
-
- local_blue := local_white randomized (.6,.8) ;
- local_red := local_white randomized (.3,.4) ;
-
- u := width/400 ;
-
- def a_module (expr dx, dy) =
- picture p ; p := image
- ( ddy := 0 ; sx := 60u ;
- for i=1 upto (4 randomized 2) :
- sy := 7u randomized 3u ;
- fill unitsquare xyscaled(sx,sy) shifted (0,ddy)
- withcolor local_red ;
- ddy := ddy + sy + 4u ;
- endfor ) ;
- p := p shifted (dx,dy) shifted - center p ;
- fill boundingbox p enlarged 8u withcolor local_white ;
- fill boundingbox p enlarged 4u withcolor local_blue ;
- draw p ;
- enddef ;
-
- set_grid(width, height, width/15, height/15) ;
- forever:
- if new_on_grid(uniformdeviate width,uniformdeviate height):
- a_module(dx,dy) ;
- fi ;
- exitif grid_full ;
- endfor ;
-
- clip currentpicture to unitsquare xyscaled(width,height) ;
-\stopuseMPgraphic
-
-\defineoverlay
- [titlepage]
- [\useMPgraphic{titlepage}]
-
-\doifmode{atpragma}{\readfile{s-mod-04.tex}{}{}}
-
-\defineframed
- [TitleFrame]
- [\c!background=\v!color,
- \c!backgroundcolor=white,
- \c!align=\v!right,
- \c!offset=12pt,
- \c!strut=\v!no,
- \c!frame=\v!off,
- \c!bottom=]
-
-\definelayout
- [titlepage]
- [\c!backspace=0pt,
- \c!topspace=0pt,
- \c!header=0pt,
- \c!footer=0pt,
- \c!height=\v!middle,
- \c!width=\v!middle]
-
-\def\moduletitle
- {\setuplayout[titlepage]
- \ifx\ModuleNumber\undefined \else
- \ifnum\ModuleNumber<10
- \edef\ModuleNumber{00\ModuleNumber}
- \else\ifnum\ModuleNumber<100
- \edef\ModuleNumber{0\ModuleNumber}
- \fi\fi
- \setupbackgrounds
- [\v!page]
- [\c!background=titlepage]
- \fi
- \startmakeup[\v!standard][\c!headerstate=\v!none,\c!footerstate=\v!none]
- \switchtobodyfont[14.4pt,ss]
- \bgroup
- \def\CONTEXT {Con\kern-.15em\TeX t}
- \def\TEXUTIL {\TeX Util}
- \def\PPCHTEX {PPCH\TeX}
- \def\METAPOST{MetaPost}
- \hfill
- {\definedfont[SansBold at 96pt]\setstrut
- \TitleFrame{\Modulesystem}}
- \vfill
- \definetabulate[temp][|l|l|]%
- \switchtobodyfont[17.3pt,ss]
- \hfill
- {\bf\setstrut
- \TitleFrame
- {\insidefloattrue\setuptabulate[\c!before=,\c!after=]%
- \starttemp
- \doifsomething{\Moduletitle}
- {\NC title \EQ \Moduletitle \NC\NR}%
- \doifsomething{\Modulesubtitle}
- {\NC subtitle \EQ \Modulesubtitle \NC\NR}%
- \doifsomething{\Moduleauthor}
- {\NC author \EQ \Moduleauthor \NC\NR}%
- \NC date \EQ \currentdate \NC\NR
- %\doifsomething{\Modulesuggestions} % todo: generates space
- % {\NC suggestions \NC \Modulesuggestions \NC\NR}%
- \stoptemp}}
- \egroup
- \stopmakeup
- \ifx\ModuleNumber\undefined \else
- \setupbackgrounds
- [\v!page]
- [\c!background=]
- \fi
- \setuplayout}
-
-\let\stopdocumentation=\relax
-
-\def\startdocumentation
- {\bgroup
- \doglobal\newcounter\NOfMarginLines
- \def\stopdocumentation{\par\egroup}}
-
-\newif\ifcompressdefinitions
-
-\def\startcompressdefinitions {\global\compressdefinitionstrue}
-\def\stopcompressdefinitions {\global\compressdefinitionsfalse}
-
-\gdef\CompressDefinitions%
- {\ifcompressdefinitions
- \switchtobodyfont[\v!small]%
- \fi}
-
-\startnotmode[nocode]
-
- \definetyping
- [definition]
-
- \setuptyping
- [definition]
- [\c!before={\page[\v!preference]}\blank\PresetParagraphNumber\CompressDefinitions,
- \c!after=\ResetParagraphNumber\blank,
- \c!option=\Moduletype]
-
-\stopnotmode
-
-\startmode[nocode]
-
-% \definieerbuffer[definition] % ignore
-
- \long\def\startdefinition#1\stopdefinition{}
-
-\stopmode
-
-\definetyping [PL] [\c!option=PL, \c!margin=\v!standard]
-\definetyping [JV] [\c!option=JV, \c!margin=\v!standard]
-\definetyping [MP] [\c!option=MP, \c!margin=\v!standard]
-\definetyping [TEX] [\c!option=TEX,\c!margin=\v!standard]
-
-\setuptyping [\v!typing] [\c!margin=\v!standard]
-\setuptyping [\v!file] [\c!margin=\v!standard]
-\setuptyping [definition] [\c!margin=0pt]
-
-\newcounter\NOfMarginLines
-\newcounter\ParagraphNumber
-
-\def\ResetParagraphNumber
- {\egroup}
-
-\def\PresetParagraphNumber
- {\bgroup
- \xdef\NOfTextLines%
- {\the\prevgraf}%
- \doglobal\decrement\NOfMarginLines
- \doglobal\increment\ParagraphNumber
- \message{.}%
- \gdef\ShowParagraphNumber%
- {\llap{\slx\ParagraphNumber\hskip\leftmargindistance}}%
- \gdef\ShowParagraphNumberA%
- {\ifnum\NOfMarginLines>\NOfTextLines\relax
- \doglobal\increment\NOfTextLines
- \else
- \ShowParagraphNumber
- \global\let\ShowParagraphNumberA=\relax
- \global\let\ShowParagraphNumberB=\ShowParagraphNumber
- \doglobal\newcounter\NOfMarginLines
- \fi}%
- \gdef\ShowParagraphNumberB%
- {}%
- \EveryLine
- {\ShowParagraphNumberA}%
- \EveryPar
- {\vadjust{\nobreak}%
- \ShowParagraphNumberB}}
-
-\EveryPar % skip one
- {\EveryPar
- {\doglobal\newcounter\NOfMarginLines}}
-
-\def\dodomargeaanduidingen[#1]#2%
- {\def\docommand##1%
- {\indent\hbox
- {\ifx#2\relax
- \index{##1}%
- \else
- \index{#2{##1}}%
- \fi
- #2{\doboundtext{##1}{\leftmarginwidth}{..}}}%
- \doglobal\increment\NOfMarginLines
- \endgraf}%
- \processcommalist[#1]\docommand}
-
-\def\margeaanduidingen#1[#2]%
- {\def\domargeaanduidingen##1##2%
- {\margintitle[#2]%
- {\switchtobodyfont[\v!small]%
- \doglobal\newcounter\NOfMarginLines
- \dodomargeaanduidingen[##1]#1%
- \scratchcounter=\NOfMarginLines
- \multiply\scratchcounter by 10
- \divide\scratchcounter by 12
- \advance\scratchcounter by 1
- \xdef\NOfMarginLines{\the\scratchcounter}%
- \processcommalist[##2]\index}}%
- \dodoublegroupempty\domargeaanduidingen}
-
-\def\complexmacros{\margeaanduidingen\tex }
-\def\complexextras{\margeaanduidingen\relax}
-
-\def\complexelements
- {\margeaanduidingen\someelement}
-
-\def\someelement#1{\type{<#1>}}
-
-\definecomplexorsimpleempty\macros
-\definecomplexorsimpleempty\extras
-\definecomplexorsimpleempty\elements
-
-\def\showelements{\dodoubleempty\doshowelements}
-
-\def\doshowelements[#1][#2]
- {\bgroup
- \processXMLbuffer
- \typebuffer
- \setupcolors[\c!state=\v!stop]
- \showXSDcomponent[#1][#2]
- \egroup}
-
-% \macros{a,b}
-% \macros{a,b}{b}
-% \macros[a]{a,b}{b}
-
-% weg ermee
-
-\defineparagraphs [interface] [\c!n=2]
-\setupparagraphs [interface] [1] [\c!width=4cm]
-
-\def\startexample{\par\startnarrower} \let\startvoorbeeld\startexample
-\def\stopexample {\stopnarrower} \let\stopvoorbeeld \stopexample
-
-\gdef\VisualizeLastSpace{\ifdim\lastskip>0pt\unskip\tttf\char32\fi}
-
-\gdef\ShowHeadText #1{\tttf#1\VL\mainlanguage[\currentlanguage]\headtext {#1}\VisualizeLastSpace}
-\gdef\ShowLabelText#1{\tttf#1\VL\mainlanguage[\currentlanguage]\labeltext{#1}\VisualizeLastSpace}
-
-\startbuffer[lang-a]
-\starttable[|l|l|]
- \HL
- \VL \bf head key \VL \bf current value \VL\SR
- \HL
- \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!content \VL\MR
- \VL \ShowHeadText \v!intermezzi \VL\MR
- \VL \ShowHeadText \v!logos \VL\MR
- \VL \ShowHeadText \v!tables \VL\LR
- \HL
-\stoptable
-\stopbuffer
-
-\startbuffer[lang-b]
-\starttable[|l|l|]
- \HL
- \VL \bf label key \VL \bf current value \VL\SR
- \HL
- \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 \v!subsection \VL\MR
- \VL \ShowLabelText \v!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
-\stoptable
-\stopbuffer
-
-\startbuffer[lang-c]
-\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!march \VL\MR
- \VL \ShowLabelText \v!april \VL\MR
- \VL \ShowLabelText \v!may \VL\MR
- \VL \ShowLabelText \v!june \VL\MR
- \VL \ShowLabelText \v!july \VL\MR
- \VL \ShowLabelText \v!august \VL\MR
- \VL \ShowLabelText \v!september \VL\MR
- \VL \ShowLabelText \v!october \VL\MR
- \VL \ShowLabelText \v!november \VL\MR
- \VL \ShowLabelText \v!december \VL\LR
- \HL
-\stoptable
-\stopbuffer
-
-\startbuffer[lang-d]
-\starttable[|l|l|]
- \HL
- \VL \bf label key \VL \bf current value \VL\SR
- \HL
- \VL \ShowLabelText \v!sunday \VL\FR
- \VL \ShowLabelText \v!monday \VL\MR
- \VL \ShowLabelText \v!tuesday \VL\MR
- \VL \ShowLabelText \v!wednesday \VL\MR
- \VL \ShowLabelText \v!thursday \VL\MR
- \VL \ShowLabelText \v!friday \VL\MR
- \VL \ShowLabelText \v!saturday \VL\LR
- \HL
-\stoptable
-\stopbuffer
-
-\gdef\ShowTextsValues[#1][#2]%
- {\vbox\bgroup
- \language[#1]%
- \setbox\scratchbox\hbox to \hsize{\hss\bfb#2 language defaults\hss}
- \dp\scratchbox\zeropoint
- \box\scratchbox
- \vskip1em
- \hrule
- \vskip2em
- \halign
- {\hss##\hss&##\hskip1em&\hss##\hss\cr
- $\vcenter{\getbuffer[lang-a]}$&&$\vcenter{\getbuffer[lang-b]}$\cr
- \noalign{\vskip1em}
- $\vcenter{\getbuffer[lang-c]}$&&$\vcenter{\getbuffer[lang-d]}$\cr}%
- \egroup}
-
-\gdef\ShowLanguageValues[#1][#2]#3#4%
- {\hbox to \hsize
- {\hss
- \vbox
- \bgroup
- \language[#1]%
- \let\normalbar=|
- \starttable[||||]
- \HL
- \VL \THREE{\bf subsentence symbol and quotes} \VL\SR
- \HL
- \VL \quotation{#3 #4} \VL \quote{#2} \VL \let|=\normalbar |<||<|#3|>|#4|>| \VL\FR
- \VL \quotation{#3 #4} \VL \quote{#2} \VL |<||<|#3|>|#4|>| \VL\LR
- \HL
- \stoptable
- \egroup
- \hss}}
-
-\gdef\doShowAllLanguageValues[#1][#2]#3#4%
- {\vbox
- {\ShowTextsValues[#1][#2]
- \vskip2em
- \ShowLanguageValues[#1][#2]{#3}{#4}}
- \protect
- \page}
-
-\gdef\ShowAllLanguageValues
- {\page
- \unprotect
- \dodoubleargument\doShowAllLanguageValues}
-
-\protect
-
-%D Command references:
-
-% \input setupa
-% \input setupb
-
-\usemodule[int-load] \loadsetups
-
-\unprotect
-
-% \def\showsetup
-% {\doglobal\newcounter\CurrentArgument
-% \setup}
-
-\def\showsetup#1%
- {{\def\y##1{\writestatus{setups}{warning: remove y! from #1}}%
- \setup{#1}}}
-
-\setupframedtexts
- [setuptext]
- [\c!background=\v!screen,
- \c!frame=\v!off]
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/s-mod-00.mkiv b/Master/texmf-dist/tex/context/base/s-mod-00.mkiv
deleted file mode 100644
index 7af56dc2de9..00000000000
--- a/Master/texmf-dist/tex/context/base/s-mod-00.mkiv
+++ /dev/null
@@ -1,24 +0,0 @@
-%D \module
-%D [ file=s-mod-00,
-%D version=very-old,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Documentation Base Environment,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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
-
-\startmode[nocode]
-
- % \definieerbuffer[definition] % ignore
-
- \def\startdefinition#1\stopdefinition{}
-
-\stopmode
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/s-mod-01.mkii b/Master/texmf-dist/tex/context/base/s-mod-01.mkii
deleted file mode 100644
index 5b83cd12110..00000000000
--- a/Master/texmf-dist/tex/context/base/s-mod-01.mkii
+++ /dev/null
@@ -1,155 +0,0 @@
-%D \module
-%D [ file=s-mod-01,
-%D version=very-old,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Documentation Paper Environment,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 looks like crap, is not documented, will
-%D change, and used to be called modu-*.tex.
-
-\usemodule[mod-00,abr-01]
-
-\dontcomplain
-
-\unprotect
-
-\setupbodyfont
- [10pt]
-
-\definetypeface
- [narrowtt] [tt]
- [mono] [modern-cond] [default] [encoding=\defaultencoding]
-
-\setuptyping[\v!typing][\c!style=\narrowtt]
-\setuptype [\v!type] [\c!style=\narrowtt]
-
-\mainlanguage
- [en]
-
-\setupwhitespace
- [\v!big]
-
-\setuptolerance
- [\v!verytolerant,\v!stretch]
-
-\setuplayout
- [\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=middle,
- \c!style=\ss]
-
-\setupsetup
- [\c!reference=1]
-
-\startnotmode[single]
-
- \setuppagenumbering
- [\c!alternative={\v!doublesided,\v!singlesided}]
-
-\stopnotmode
-
-\setuppagenumbering
- [\c!location=]
-
-\expanded{\setupfootertexts
- [\v!edge]
- [][\v!pagenumber]}
-
-\startmode[single]
-
- \setupfootertexts
- [\v!margin]
- [\filename{\Modulefile}][]
-
-\stopmode
-
-\startnotmode[single]
-
- \setupfootertexts
- [\v!margin]
- [\filename{\Modulefile}][]
- [\filename{\Modulefile}][]
-
-\stopnotmode
-
-\setupfootertexts
- [\v!text]
- [\CONTEXT]
- [\Moduletitle]
-
-\setupheadertexts
- [\v!text]
- []
- [\Modulesubtitle]
-
-\setupinmargin
- [\c!location=\v!left]
-
-\setupheads
- [\c!alternative=\v!inmargin]
-
-\setuphead
- [\v!chapter]
- [\c!style=\ssc,
- \c!page=\v!right,
- \c!header=\v!empty]
-
-\setuphead
- [\v!section]
- [\c!style=\ssb,
- \c!page=\v!right]
-
-\setuplist
- [\v!chapter]
- [\c!style=\v!bold,
- \c!after=\blank]
-
-\setupcombinedlist
- [\v!content]
- [\c!width=3em,
- \c!aligntitle=\v!yes]
-
-\setupregister
- [\v!index]
- [\c!balance=\v!yes,
- \c!indicator=\v!no]
-
-\startnotmode[nocolor]
-
-\setupcolors
- [\c!state=\v!start]
-
-\stopnotmode
-
-\startnotmode[color]
-
- \setupcolors
- [\c!conversion=\v!always]
-
- \setuptyping
- [\c!palet=graypretty]
-
-\stopnotmode
-
-\setupinteraction
- [\c!state=\v!start,
- \c!color=,
- \c!style=]
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/s-mod-01.mkiv b/Master/texmf-dist/tex/context/base/s-mod-01.mkiv
deleted file mode 100644
index 6946bef691c..00000000000
--- a/Master/texmf-dist/tex/context/base/s-mod-01.mkiv
+++ /dev/null
@@ -1,390 +0,0 @@
-%D \module
-%D [ file=s-mod-01,
-%D version=very-old,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Module Documentation,
-%D author={Hans Hagen \& Luigi Scarso},
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Usage:
-%D
-%D \starttyping
-%D context --ctx=s-mod somefile.mkiv
-%D \stoptyping
-%D
-%D In due time there will be a \type {mtx-context-module} as well.
-%D
-%D Luigi Scarso coordinates the processing of modules so best contact
-%D him when you run into problems. Bugs in this style can be sent to
-%D Hans.
-
-\usemodule
- [abr-00]
-
-\setvariables
- [document]
- [ file=\jobname,
- type=unknown,
- version={\currentdate[\v!year,{.},\v!month,{.},\v!day]},
- system=\CONTEXT,
- title=Unknown Title,
- subtitle=,
- author=Unknown Author,
- date=\currentdate,
- copyright=Unknown Copyright,
- suggestions=]
-
-\let\module\setupdocument
-
-\definepalet [module:unknown] [localone=black,localtwo=white]
-
-\definepalet [module:tex] [localone=blue,localtwo=green]
-\definepalet [module:mkii] [localone=blue,localtwo=green]
-\definepalet [module:mkiv] [localone=blue,localtwo=green]
-\definepalet [module:mkvi] [localone=blue,localtwo=green]
-
-\definepalet [module:lua] [localone=red,localtwo=green]
-\definepalet [module:cld] [localone=red,localtwo=green]
-
-\definepalet [module:mp] [localone=red,localtwo=blue]
-\definepalet [module:mpii] [localone=red,localtwo=blue]
-\definepalet [module:mpiv] [localone=red,localtwo=blue]
-\definepalet [module:metapost][localone=red,localtwo=blue]
-
-\setuppalet
- [module:unknown]
-
-\startuseMPgraphic{page}
-
- StartPage ;
-
- color local_white ; local_white := .8white ;
- color local_one ; local_one := \MPcolor{localone} randomized (.6,.8) ;
- color local_two ; local_two := \MPcolor{localtwo} randomized (.3,.4) ;
-
- color local_one ; local_one := .75[\MPcolor{localone},white] ;
- color local_two ; local_two := .75[\MPcolor{localtwo},white] ;
-
- numeric width ; width := bbwidth Page ;
- numeric height ; height := bbheight Page ;
-
- u := width/400 ;
-
- def a_module (expr dx, dy) =
- picture p ; p := image (
- ddy := 0 ; sx := 60u ;
- for i=1 upto (4 randomized 2) :
- sy := 7u randomized 3u ;
- fill unitsquare xyscaled(sx,sy) shifted (0,ddy) withcolor local_two ;
- ddy := ddy + sy + 4u ;
- endfor ;
- ) ;
- p := p shifted (dx,dy) shifted - center p ;
- fill boundingbox p enlarged 8u withcolor local_white ;
- fill boundingbox p enlarged 4u withcolor local_one ;
- draw p ;
- enddef ;
-
- set_grid(width, height, width/15, height/15) ;
-
- forever:
- if new_on_grid(uniformdeviate width,uniformdeviate height):
- a_module(dx,dy) ;
- fi ;
- exitif grid_full ;
- endfor ;
-
- picture p ;
-
- draw image (
- draw anchored.urt(textext("\bf\strut\documentvariable{system}") ysized 5.0cm,urcorner Page shifted (-1cm,- 1cm)) ;
- draw anchored.urt(textext("\bf\strut\documentvariable{title}") ysized 1.5cm,urcorner Page shifted (-1cm,- 8cm)) ;
- draw anchored.urt(textext("\bf\strut\documentvariable{subtitle}") ysized 1.5cm,urcorner Page shifted (-1cm,-10cm)) ;
- draw anchored.urt(textext("\bf\strut\documentvariable{author}") ysized 1.5cm,lrcorner Page shifted (-1cm, 5cm)) ;
- draw anchored.urt(textext("\bf\strut\currentdate") ysized 1.5cm,lrcorner Page shifted (-1cm, 3cm)) ;
- ) withcolor .25white ;
-
- StopPage ;
-
-\stopuseMPgraphic
-
-\startsetups[document:start]
-
- \setuppalet
- [module:\documentvariable{type}]
-
- \startTEXpage
- \useMPgraphic{page}
- \stopTEXpage
-
- \page[right]
-
-\stopsetups
-
-\startsetups[document:stop]
-
- \page
-
- \placeregister
- [\v!index]
- [\c!balance=\v!yes,
- \c!indicator=\v!no,
- \c!criterium=\v!text]
-
-\stopsetups
-
-% In order to be able to typeset this one too, we need to avoid
-% direct backslashed names.
-
-\starttexdefinition startmoduledocumentation
- \starttext
- \page
- \begingroup
- \startdocument
-\stoptexdefinition
-
-\starttexdefinition stopmoduledocumentation
- \stopdocument
- \page
- \endgroup
- \stoptext
-\stoptexdefinition
-
-\starttexdefinition startdocumentation
- \par
- \bgroup
-\stoptexdefinition
-
-\starttexdefinition stopdocumentation
- \par
- \egroup
-\stoptexdefinition
-
-\definetyping
- [definition]
-
-\starttexdefinition startcompressdefinitions
- \blank
- \begingroup
- \setuptyping[definition][bodyfont=small]
-\stoptexdefinition
-
-\starttexdefinition stopcompressdefinitions
- \blank
- \endgroup
-\stoptexdefinition
-
-\definetyping [PL] [\c!option=PL]
-\definetyping [JV] [\c!option=JV]
-\definetyping [MP] [\c!option=MP]
-\definetyping [TEX] [\c!option=TEX]
-\definetyping [LUA] [\c!option=LUA]
-
-\setuptyping [\v!typing] [\c!margin=\v!standard]
-\setuptyping [\v!file] [\c!margin=\v!standard]
-\setuptyping [definition] [\c!margin=0pt,\c!numbering=\v!line,\c!continue=\v!yes] % this continue wins
-
-\setuplinenumbering
- [definition]
- [\c!style=\ttx,
- \c!distance=\leftmargindistance,
- \c!align=\v!flushright]
-
-% This will be cleaned up.
-
-\unexpanded\def\domodulemarginstuff#1#2%
- {\marginstuff
- {\ifx#1\relax
- \index{#2}%
- \else
- \index{#1{#2}}%
- \fi
- #1{\doboundtext{#2}{\leftmarginwidth}{..}}}}
-
-\unexpanded\def\modulemarginstuff#1#2% to be renamed
- {\processcommalist[#2]{\domodulemarginstuff#1}}
-
-\definemargindata
- [marginstuff]
- [left]
- [stack=yes,
- hoffset=2em,
- style=\ttxx]
-
-\unexpanded\def\macros {\modulemarginstuff\tex }
-\unexpanded\def\extras {\modulemarginstuff\relax}
-\unexpanded\def\elements{\modulemarginstuff\someelement}
-
-\unexpanded\def\someelement#1{\type{<#1>}}
-
-% [index]{command}
-
-% \macros{a,b}
-% \macros{a,b}{b}
-% \macros[a]{a,b}{b}
-
-% weg ermee (indeed):
-%
-% \defineparagraphs [interface] [\c!n=2]
-% \setupparagraphs [interface] [1] [\c!width=4cm]
-
-\starttexdefinition startexample
- \par
- \startnarrower
-\stoptexdefinition
-
-\starttexdefinition stopexample
- \stopnarrower
-\stoptexdefinition
-
-%D Command references:
-
-\usemodule[int-load] \loadsetups
-
-\let\showsetup\setup
-
-\setupframedtexts
- [setuptext]
- [\c!background=\v!screen,
- \c!frame=\v!off]
-
-% style (we use dejavu as it supports more characters)
-
-\switchtobodyfont
- [dejavu-condensed,10pt] % preload
-
-\setupbodyfont
- [dejavu,10pt] % main font
-
-\mainlanguage
- [en]
-
-\setuptyping
- [\v!typing]
- [\c!bodyfont=dejavu-condensed]
-
-\setupwhitespace
- [\v!big]
-
-\setuptolerance
- [\v!verytolerant,\v!stretch]
-
-\setuplayout
- [\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=middle,
- \c!style=\ss]
-
-\setuppagenumbering
- [\c!location=]
-
-\setuppagenumbering
- [\c!alternative={\v!doublesided,\v!singlesided}]
-
-\setupfootertexts
- [\v!edge]
- [][\pagenumber]
-
-\setupfootertexts
- [\v!margin]
- [\filename{\documentvariable{file}}][]
- [\filename{\documentvariable{file}}][]
-
-\setupfootertexts
- [\v!text]
- [\CONTEXT]
- [\documentvariable{title}]
-
-\setupheadertexts
- [\v!text]
- []
- [\documentvariable{subtitle}]
-
-\setupinmargin
- [\c!location=\v!left]
-
-\setupheads
- [\c!alternative=\v!inmargin]
-
-\setuphead
- [\v!chapter]
- [\c!style=\bfc,
- \c!page=\v!right,
- \c!header=\v!empty]
-
-\setuphead
- [\v!section]
- [\c!style=\bfb,
- \c!page=\v!right]
-
-\setuphead
- [\v!subsection]
- [\c!style=\bfa]
-
-\setuplist
- [\v!chapter]
- [\c!style=\v!bold,
- \c!after=\blank]
-
-\setupcombinedlist
- [\v!content]
- [\c!width=3em,
- \c!aligntitle=\v!yes]
-
-\setupregister
- [\v!index]
- [\c!balance=\v!yes,
- \c!indicator=\v!no]
-
-\setupinteraction
- [\c!state=\v!start,
- \c!color=,
- \c!contrastcolor=,
- \c!style=]
-
-% modes
-
-\doifmode {nocolor} {
-
- \setupcolors
- [\c!conversion=\v!always]
-
-}
-
-\doifmode {singlesided} {
-
- \setuppagenumbering
- [\c!alternative=\v!singlesided]
-
- \setupfootertexts
- [\v!margin]
- [\filename{\documentvariable{file}}][]
-
-}
-
-% bonus
-
-\usemodule
- [abr-02]
-
-% another one
-
-\dontcomplain
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/s-mod-02.mkii b/Master/texmf-dist/tex/context/base/s-mod-02.mkii
deleted file mode 100644
index 2d095ff9ab6..00000000000
--- a/Master/texmf-dist/tex/context/base/s-mod-02.mkii
+++ /dev/null
@@ -1,421 +0,0 @@
-%D \module
-%D [ file=s-mod-02,
-%D version=very-old,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Documentation Screen Environment,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 looks like crap, is not documented, will
-%D change, and used to be called modu-*.tex.
-
-% Macro's
-
-\usemodule[mod-00]
-
-\unprotect
-
-% todo: internationalize + setups
-
-\setuphead[paragraaf][expansion=command]
-\setuphead[section][expansion=command]
-
-\def\complexmodule[#1]% redefined
- {\startglobal % i.v.m. \bgroup in \startdocumentation
- \getparameters[Module][#1]
- \stopglobal % i.v.m. \bgroup in \startdocumentation
- %%\section{\Modulesubtitle}
- \xdef\Temp{\Modulesubtitle}%%Modulesubtitle:\framed{BEGIN \Modulesubtitle END} :#1 !}
- \@EA\section\@EA{\Temp}
- \WriteLists}
-
-\def\stopmodule % redefined
- {\page
- \determineregistercharacteristics
- [index]
- [criterium=section]
- \doifmode{*register}
- {\pagereference
- [index]
- \placeregister
- [index]
- [balance=yes,
- indicator=no,
- criterium=section]}}
-
-\let\ComposeLists=\relax
-
-\newcounter\ModuleNumber
-
-\newwrite\BatchFile \openout\BatchFile=\jobname.bat
-
-\def\WriteBatchFile
- {\doglobal\increment\ModuleNumber
-% \immediate\write\BatchFile{call modu-run \FileName\space \ModuleNumber}}
-% \immediate\write\BatchFile{texmfstart texutil --modu \FileName}}
- \immediate\write\BatchFile{texmfstart texexec --pdf --modu --batch \FileName }}
-
-\newif\ifProcessingPublic
-
-\def\WriteLists
- {\writetolist[FileNames] {}{\FileName}
- \writetolist[GroupItems]{}{\GroupItem}}
-
-\def\moduletitle{}
-
-\def\TypeZeroModule#1%
- {\section{[to be extracted: #1]}
- {\em This module is not yet split off.}
- \WriteLists}
-
-\def\TypeOneModule#1%
- {\section{[to be documented: #1]}
- {\em This module is not yet fully documented.}
- \WriteLists}
-
-\def\TypeTwoModule#1%
- {\ifProcessingPublic
- \readfile{#1.ted}{}{}%
- \WriteBatchFile
- \else
- \section{[not yet public: #1]}
- {\em This module is documented but not yet public.}
- \WriteLists
- \fi}
-
-\def\TypeThreeModule#1%
- {\readfile{#1.ted}{}{}%
- \WriteBatchFile}
-
-\def\processmodule#1#2%
- {\page
- \bgroup
- \def\FileName{#1}
- \setupreferencing[prefix=#1]
- \useexternaldocument[PaperVersion][#1][]
- \aftersplitstring#1\at-\to\GroupItem
- \ComposeLists
- \ifcase#2
- \TypeZeroModule{#1}
- \or
- \TypeOneModule{#1}
- \or
- \TypeTwoModule{#1}
- \or
- \TypeThreeModule{#1}
- \fi
- \page
- \setupreferencing[prefix=]
- \egroup}
-
-\def\ModuleGroup#1#2%
- {\page
- \let\Modulefile=\empty
- \setupreferencing[prefix=#1]
- \def\FileGroup{#1}
- \writetolist[FileGroups]{}{\FileGroup}
- \chapter[content]{#2}
- \MakeListOfItems
- \MakeListOfNames
- \MakeListOfGroups
- \placecontent[criterium=chapter,level=section]}
-
-% Layout
-
-\setupbodyfont
- [9pt]
-
-\setuppapersize
- [S6][S6]
-
-\setuplayout
- [backspace=72.5pt,
- leftmargin=50pt,
- leftmargindistance=12.5pt,
- rightmargin=0pt,
- rightedge=80pt,
- rightedgedistance=10pt,
- leftedge=0pt,
- width=430pt,
- topspace=10pt,
- header=0pt,
- footer=30pt,
- bottomdistance=10pt,
- bottom=15pt,
- height=410pt,
- style=\ss]
-
-\setuptyping
- [palet=colorpretty]
-
-\setupsetup
- [reference=3]
-
-\definecolor [AchtergrondKleur] [s=.6]
-\definecolor [ButtonKleur] [r=.2,g=.2,b=.6]
-\definecolor [TekstKleur] [r=.6,g=.2,b=.2]
-
-\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
-
-\setupinteraction
- [state=start,
- page=yes,
- contrastcolor=,
- menu=on,
- color=]
-
-\setupbackgrounds
- [page]
- [background=color,
- backgroundcolor=AchtergrondKleur,
- offset=2.5pt] % this offset influences the menus!
-
-\setupbackgrounds
- [text,footer]
- [text,leftmargin]
- [background=color,
- backgroundcolor=white]
-
-\setupsubpagenumber
- [way=bysection,
- state=start]
-
-\setupinteractionbar
- [frame=off,
- offset=0pt,
- height=fit]
-
-\setupwhitespace
- [big]
-
-\setuptyping
- [typing]
- [option=color]
-
-\setuptyping
- [definition]
- [option=color]
-
-\setuptyping
- [file]
- [option=color]
-
-\setuppagenumbering
- [alternative=singlesided,
- way=bysection,
- state=none]
-
-\setupinmargin
- [location=left]
-
-\setupheads
- [alternative=inmargin]
-
-\setuphead
- [chapter]
- [style=\ssc,
- page=right]
-
-\setuphead
- [section]
- [style=\ssb,
- page=right]
-
-\setuplist
- [chapter]
- [style=bold,
- after=\blank]
-
-\setupcontent
- [width=2em]
-
-\setupindex
- [balance=yes,
- indicator=no]
-
-\setupcolors
- [state=start]
-
-\def\TitelBlad#1%
- {\startstandardmakeup
- \definefont[GrootFont] [SansBold at 72pt]
- \definefont[MiddelFont][Sans at 32pt]
- \definefont[KleinFont] [Sans at 24pt]
- \startcolor[AchtergrondKleur]
- \vskip12pt
- \midaligned{\GrootFont\setstrut\strut Con\TeX t}
- \vskip24pt
- \midaligned{\MiddelFont\setstrut\strut #1}
- \vskip24pt
- \midaligned{\KleinFont\setstrut\strut Hans Hagen}
- \vfilll
- \midaligned{\KleinFont\setstrut\strut PRAGMA ADE}
- \vskip24pt
- \midaligned{\KleinFont\setstrut\strut www.pragma-ade.com --- \currentdate}
- \vskip12pt
- \stopcolor
- \stopstandardmakeup}
-
-\def\ColofonBlad
- {\startmode[atpragma]
- \page
- \bgroup
- \def\PragmaHoogte {\makeupheight}
- \def\PragmaBreedte{\textwidth}
- \def\PragmaKopwit {\topspace}
- \def\PragmaRugwit {\backspace}
- \def\PragmaMarge {0pt}
- \PragmaLijnentrue
- \PlaatsPragmaLogo[ADE]
- \vfill
- todo: colofon
- \startnarrower[3*middle]
- This is the official documentation of \CONTEXT\ version
- \referraldate, a \TEX\ macropackage developed by J.~Hagen
- \& A.F.~Otten, who both hold the copyrights.
- \stopnarrower
- \vfill
- \page
- \egroup
- \stopmode}
-
-\def\ColofonBlad
- {}
-
-\newbox\ListOfItems
-\newbox\ListOfGroups
-\newbox\ListOfNames
-
-\definelist[FileNames] \def\FileName {}
-\definelist[FileGroups] \def\FileGroup {}
-\definelist[GroupItems] \def\GroupItem {}
-
-\setuplist
- [FileNames,FileGroups,FileGroups]
- [expansion=yes,
- pagenumber=no,
- style=\ss\bf]
-
-\setuplist
- [FileNames]
- [command=\FileNameEntry,
- after=\endgraf,
- alternative=none] % horizontal
-
-\setuplist
- [FileGroups]
- [command=\FileGroupEntry,
- after=\hss,
- alternative=horizontal]
-
-\def\FileNameEntry#1#2#3%
- {\strut\hbox{#2}\endgraf}
-
-\def\FileGroupEntry#1#2#3%
- {\strut\hbox{#2}\endgraf}
-
-\def\MakeListOfItems
- {\setbox\ListOfItems=\vbox
- {\ss\bf
- \placelist[GroupItems][color=ButtonKleur,contrastcolor=white,criterium=chapter]}}
-
-\def\MakeListOfNames
- {\setbox\ListOfNames=\vbox
- {\hsize\rightedgewidth
- \ss\bf\setupinterlinespace
- \startsimplecolumns[distance=10pt]
- \placelist[FileNames][color=ButtonKleur,contrastcolor=white,criterium=chapter]
- \stopsimplecolumns}}
-
-\def\MakeListOfGroups
- {\setbox\ListOfGroups=\hbox to \textwidth
- {\ss\bf
- \setupinteraction[color=ButtonKleur]%
- \placelist[FileGroups][color=ButtonKleur,contrastcolor=white,criterium=all]\unskip\unskip}}
-
-\setbox\ListOfGroups=\hbox{}
-
-%\setupfootertexts
-% [rand]
-% []
-% [{\interactiebalk[variant=g]}]
-
-\setupinteractionmenu
- [right,bottom]
- [state=start,
- frame=off,
- color=AchtergrondKleur,
- contrastcolor=white,
- style=\ss\bf,
- height=15pt,
- offset=0pt,
- inbetween=\vskip5pt,
- background=color,
- backgroundcolor=ButtonKleur]
-
-\startinteractionmenu[right]
- \boxofsize \vbox \textheight \footerdistance \footerheight 5pt
- \bgroup
- \copy\ListOfNames
- \vfill
- \but [\FileGroup:content] local contents \\
- \but [\FileName:index] local register \\
- \but [PaperVersion::begin] paper version \\
- \but [content] main contents \\
- \but [index] main register \\
- \but [PreviousJump] previous jump \\
- \but [CloseDocument] close document \\
- \unskip
- \egroup
-\stopinteractionmenu
-
-\startinteractionmenu[bottom]
- \unhcopy\ListOfGroups
-\stopinteractionmenu
-
-\def\placemoduleregister
- {\startbackmatter
- \setupsubpagenumber[reset]
- \title[-:index]{Register}
- \placeregister[index]
- \stopbackmatter}
-
-\def\placemodulecontent
- {\startfrontmatter
- \title[-:content]{Contents}
- \setupinteractionbar[state=stop]
- \placecontent[criterium=text,level=chapter]
- \stopfrontmatter}
-
-\setupcontent
- [pagenumber=no,
- level=chapter,
- interaction=all,
- style=,
- before=,
- after=]
-
-\setupfootertexts
- [margin]
- [\tt\Modulefile]
- []
-
-\setupfootertexts
- [text]
- [chapter][chapter]
-
-\setupindex
- [symbol=1]
-
-\setuptolerance
- [verytolerant]
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/s-mod-02.mkiv b/Master/texmf-dist/tex/context/base/s-mod-02.mkiv
deleted file mode 100644
index 37e3d2f143e..00000000000
--- a/Master/texmf-dist/tex/context/base/s-mod-02.mkiv
+++ /dev/null
@@ -1,24 +0,0 @@
-%D \module
-%D [ file=s-mod-02,
-%D version=very-old,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Documentation Screen Environment,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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
-
-\startmode[nocode]
-
- % \definieerbuffer[definition] % ignore
-
- \def\startdefinition#1\stopdefinition{}
-
-\stopmode
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/s-mod.ctx b/Master/texmf-dist/tex/context/base/s-mod.ctx
deleted file mode 100644
index 09ecf714cc4..00000000000
--- a/Master/texmf-dist/tex/context/base/s-mod.ctx
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version='1.0' standalone='yes'?>
-
-<ctx:job>
- <ctx:message>TeX Documentation Generator</ctx:message>
- <ctx:preprocess>
- <ctx:processors>
- <ctx:processor name='ted'>mtxrun --script modules --convert --prep <ctx:value name='old'/></ctx:processor>
- </ctx:processors>
- <ctx:files>
- <ctx:file processor='ted'><ctx:value name='old'/></ctx:file>
- </ctx:files>
- </ctx:preprocess>
- <ctx:flags>
- <ctx:flag>global</ctx:flag>
- <ctx:flag>prep</ctx:flag>
- <ctx:flag>purge</ctx:flag>
- </ctx:flags>
- <ctx:process>
- <ctx:resources>
- <ctx:module>mod-01</ctx:module>
- </ctx:resources>
- </ctx:process>
-</ctx:job>
-
diff --git a/Master/texmf-dist/tex/context/base/s-pages-statistics.mkiv b/Master/texmf-dist/tex/context/base/s-pages-statistics.mkiv
deleted file mode 100644
index 375dd9949f2..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pages-statistics.mkiv
+++ /dev/null
@@ -1,134 +0,0 @@
-%D \module
-%D [ file=s-pages-statistics, % s-otr-01,
-%D version=2012.02.02,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Page Statistics,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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
-
-\defineframed
- [otrstatistics]
- [\c!offset=\bodyfontsize,
- \c!background=\v!color,
- \c!strut=\v!no,
- \c!backgroundcolor=white,
- \c!frame=\v!off,
- \c!align=\v!middle]
-
-\definecombination
- [otrstatistics]
- [\c!nx=2,
- \c!ny=2,
- \c!location=\v!top]
-
-% expansion is neeed because tabulate sets some penalties
-
-\startsetups system:page:otr:statistics
- \normalexpanded {
- \startcombination[otrstatistics] {
- \otrstatistics {
- \starttabulate[|Tw(10em)|Trw(8em)|]
- \NC \string\textwidth \NC \the\textwidth \NC \NR
- \NC \string\textheight \NC \the\textheight \NC \NR
- \NC \string\lineheight \NC \the\lineheight \NC \NR
- \NC \string\strutheight \NC \strutheight \NC \NR
- \NC \string\strutdepth \NC \strutdepth \NC \NR
- % \NC \string\vsize \NC \the\vsize \NC \NR
- \NC \string\topskip \NC \the\topskip \NC \NR
- \stoptabulate
- }
- } {}
- {
- \otrstatistics {
- \starttabulate[|Tw(10em)|Trw(8em)|]
- \NC \string\pagegoal \NC \the\pagegoal \NC \NR
- \NC \string\pagetotal \NC \the\pagetotal \NC \NR
- \NC \string\pagedepth \NC \the\pagedepth \NC \NR
- \NC \string\pageshrink \NC \the\pageshrink \NC \NR
- \NC \string\pagestretch \NC \the\pagestretch \NC \NR
- \NC \string\pagefilstretch \NC \the\pagefilstretch \NC \NR
- \NC \string\pagefillstretch \NC \the\pagefillstretch \NC \NR
- \NC \string\pagefilllstretch \NC \the\pagefilllstretch \NC \NR
- \stoptabulate
- }
- } {}
- {
- \otrstatistics {
- \starttabulate[|Tw(10em)|Trw(8em)|]
- \NC \string\widowpenalty \NC \the\widowpenalty \NC \NR
- \NC \string\clubpenalty \NC \the\clubpenalty \NC \NR
- \NC \string\displaywidowpenalty \NC \the\displaywidowpenalty \NC \NR
- \NC \string\brokenpenalty \NC \the\brokenpenalty \NC \NR
- \NC \string\interlinepenalty \NC \the\interlinepenalty \NC \NR
- \stoptabulate
- }
- } {}
- {
- \otrstatistics[\c!foregroundcolor=darkred] {
- \starttabulate[|Tw(10em)|Trw(8em)|]
- \NC page \NC \the\realpageno \NC \NR
- \NC delta \NC \the\dimexpr\pagegoal-\pagetotal\relax \NC \NR
- \stoptabulate
- }
- } {}
- \stopcombination
- }
-\stopsetups
-
-\defineoverlay
- [system:page:otr:statistics]
- [{\framed
- [\c!offset=\bodyfontsize,
- \c!background=\v!color,
- \c!strut=\v!no,
- %\c!frame=\v!off,
- \c!framecolor=white,
- \c!frameoffset=\onepoint,
- \c!rulethickness=2\onepoint,
- \c!backgroundcolor=darkblue,
- \c!align=\v!middle]
- {\forgetall
- \insidefloattrue
- \setups{system:page:otr:statistics}}}]
-
-\unexpanded\def\page_one_command_package_show_state_indeed
- {\scratchheight\ht\b_page_one_contents
- \scratchdepth \dp\b_page_one_contents
- \setbox\b_page_one_contents\vbox\framed
- [\c!offset=\v!overlay,
- \c!framecolor=darkred,
- \c!rulethickness=\onepoint,
- \c!background={\v!foreground,system:page:otr:statistics}]
- {\lower\scratchdepth\box\b_page_one_contents}%
- \ht\b_page_one_contents\scratchheight
- \dp\b_page_one_contents\scratchdepth}
-
-\let\page_one_command_package_show_state\relax
-
-\unexpanded\def\showpageproperties
- {\let\page_one_command_package_show_state\page_one_command_package_show_state_indeed}
-
-\protect
-
-\continueifinputfile{s-pages-statistics.mkiv}
-
-\setupbodyfont[dejavu,11pt] \dontcomplain \showpageproperties
-
-\starttext
-
-\dorecurse {100} { \input tufte
-
- \startitemize[packed,intro]
- \startitem test \stopitem \startitem test \stopitem
- \startitem test \stopitem \startitem test \stopitem
- \stopitemize
-}
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-physics-units.mkiv b/Master/texmf-dist/tex/context/base/s-physics-units.mkiv
deleted file mode 100644
index 50adc801431..00000000000
--- a/Master/texmf-dist/tex/context/base/s-physics-units.mkiv
+++ /dev/null
@@ -1,30 +0,0 @@
-%D \module
-%D [ file=s-physics-units, % s-phy-01,
-%D version=2011-11-24,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Physics Units,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\startmodule[physics-units]
-
-\registerctxluafile{s-physics-units}{}
-
-\installmodulecommandluasingle \showunits {moduledata.physics.units.showlist}
-
-\stopmodule
-
-\continueifinputfile{s-physics-units.mkiv}
-
-\usemodule[art-01]
-
-\starttext
-
- \showunits
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-00.tex b/Master/texmf-dist/tex/context/base/s-pre-00.tex
deleted file mode 100644
index 7f217d5bb89..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-00.tex
+++ /dev/null
@@ -1,202 +0,0 @@
-%D \module
-%D [ file=s-pre-00,
-%D version=1997.07.22,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 0,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 provides some non core functionality that can
-%D be used in the presentations styles. This module contains
-%D experimental macros.
-%D
-%D The presentation environments are independent of each other.
-%D Although they have much in common, and in many cases can be
-%D exchanged, the common components are not collected in this
-%D file. That way they can serve as examples of style
-%D definitions.
-
-\unprotect
-
-\newbox \presentationstack
-\newcounter \presentationcounter
-\newdimen \presentationheight
-
-\appendtoks\doglobal\newcounter\presentationcounter\to\everyshipout
-
-\defineframedtext
- [presentationshield]
-
-\setupframedtexts
- [presentationshield]
- [\c!background=\v!color,
- \c!backgroundcolor=StepColor,
- \c!offset=\v!overlay,
- \c!frame=\v!off]
-
-\definecolor[StepColor][white]
-
-\def\enablepresentationstep%
- {\let\enablepresentationstep\relax
- \useJSpreamblenow{presentation}%
- \setuptexttexts
- [\vbox to \textheight
- {\dopresentationstep1\box\presentationstack\vfill}]}
-
-\def\presentationstep
- {\dopresentationstep0}
-
-\def\dopresentationstep#1% not ok yet
- {\global\setbox\presentationstack=\vbox
- {\ifnum\presentationcounter=0
- \global\presentationheight=\!!zeropoint
- \fi
- \ifcase#1\relax
- \scratchdimen=\pagetotal
- \else
- \scratchdimen=\textheight
- \fi
- \advance\scratchdimen by -\presentationheight
- \edef\presentationstepheight{\the\scratchdimen}
- \global\presentationheight=\pagetotal
- \forgetall
- \offinterlineskip
- \dontcomplain
- \box\presentationstack
- \doglobal\increment\presentationcounter
- \scratchcounter=\realpageno \multiply\scratchcounter by 100
- \advance\scratchcounter by \presentationcounter
- \edef\presentationtag{presentation:\the\scratchcounter}
- \setupfield
- [presentation]
- [\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!width=\textwidth,\c!height=\presentationstepheight]{}}
- \definefield[\presentationtag][check][presentation][\presentationtag,\v!none][\presentationtag]
- \fitfield[\presentationtag]}}
-
-\startJSpreamble {presentation} used later
- var presentation = new Array() ;
- for (i=1;i<=\lastpage;i++)
- { presentation[i] = 0 }
- this.dirty = false ;
- function NextPresentation (pagenumber)
- { % ++presentation[pagenumber] ;
- presentation[pagenumber] = presentation[pagenumber] + 1 ;
- var dummy = 100*pagenumber + presentation[pagenumber] ;
- var v = this.getField("presentation:"+dummy) ;
- if (v)
- { v.hidden = true }
- % { v.display = display.hidden }
- else
- { ++pagenumber ;
- if (pagenumber<=\lastpage)
- { presentation[pagenumber] = presentation[pagenumber] + 1 ;
- dummy = 100*(pagenumber) + presentation[pagenumber] ;
- v = this.getField("presentation:"+dummy) ;
- if (v) { v.hidden = true }
- % if (v) { v.display = display.hidden }
- ++this.pageNum } }
- this.dirty = false }
-\stopJSpreamble
-
-\definereference[NextStep][JS(NextPresentation{\realfolio})]
-
-%D \macros
-%D {presentationstep}
-%D
-%D The macro \type {\presentationstep} provides a basic slide
-%D show functionality. It sort of records pieces of the page
-%D that will show up stepwise. It can be used like:
-%D
-%D \starttyping
-%D \startitemize
-%D \item eerste
-%D \item tweede
-%D \stopitemize
-%D
-%D \presentationstep
-%D
-%D \startformula
-%D ax^2+bx+c
-%D \stopformula
-%D
-%D \presentationstep
-%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 \starttyping
-%D \setupfootertexts[{\button{Show Up}[NextStep]}]
-%D \stoptyping
-%D
-%D In case of presentation style 2, you can say:
-%D
-%D \starttyping
-%D \definereference[Whatever][JS(NextPresentation{\realfolio})]
-%D \stoptyping
-%D
-%D Depending of the viewer, you need to reset the fields at
-%D startup:
-%D
-%D \starttyping
-%D \setupinteraction[openaction=ResetForm]
-%D \stoptyping
-%D
-%D Fixed spacing give you the best results:
-%D
-%D \starttyping
-%D \setupwhitespace[fixed]
-%D \setupblank[fixed]
-%D \stoptyping
-%D
-%D Sometimes you need to set the color of the background, as
-%D with style 2:
-%D
-%D \starttyping
-%D \definecolor[StepColor][Page]
-%D \stoptyping
-%D
-%D Special effects can be reached with:
-%D
-%D \starttyping
-%D \setupframedtexts
-%D [presentationshield]
-%D [background=color,backgroundcolor=red]
-%D \stoptyping
-%D
-%D There is also:
-%D
-%D \starttyping
-%D \autopresentationsteptrue
-%D \stoptyping
-%D
-%D One can enable this feature as \type {step} mode.
-
-\newif\ifautopresentationstep
-
-\appendtoks \ifautopresentationstep\presentationstep\fi \to \everypar
-
-\doifmode{step} {\enablepresentationstep}
-\doifmode{autostep}{\autopresentationsteptrue\enablepresentationstep}
-
-%D When in \type {comment} mode, embedded page comments are
-%D processed and put below the page. The default space of
-%D 5cm should be adequate but can of course be changed.
-
-\doifmode{comment}{\setuppagecomment[state=start,location=bottom]}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/s-pre-01.tex b/Master/texmf-dist/tex/context/base/s-pre-01.tex
deleted file mode 100644
index 89c5642f9f5..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-01.tex
+++ /dev/null
@@ -1,404 +0,0 @@
-%D \module
-%D [ file=s-pre-01,
-%D version=1997.07.22,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 1,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 environment can be used to typeset interactive
-%D presentations. This module was first used at the 1997 \TUG\
-%D meeting.
-
-\usemodule[pre-general]
-
-%D \macros
-%D {language}
-%D
-%D Because this module is defined in english, we default to the
-%D english hyphenation patterns and labels too.
-
-\language
- [en]
-
-%D \macros
-%D {setupbodyfont,setuplayout}
-%D
-%D For screen reading, a Lucida Bright font looks nice. We use
-%D a 14.4 point bodyfont for the main text, but switch back to
-%D 12 points for ornaments.
-
-\startmode[asintended] \setupbodyfont[lbr] \stopmode
-
-\setupbodyfont[14.4pt]
-
-\setuplayout
- [style=smallbodyfont]
-
-%D \macros
-%D {setupcolors,definecolor}
-%D
-%D Screen presentations without color just look dull, so we
-%D enable color support. We define ourselves a yellowish
-%D backgroundcolor and a not too dark blue interactioncolor.
-
-\setupcolors
- [state=start]
-
-\definecolor [BackgroundColor] [r=1, g=1, b=.7]
-\definecolor [InteractionColor] [r=.1, g=.5, b=.8]
-\definecolor [ContrastColor] [r=.9, g=.5, b=.2]
-
-%D \macros
-%D {setuppapersize,setuplayout,setupinteractionscreen}
-%D
-%D
-%D We use a nice large screen, and dedicate the right edge and
-%D bottom part to navigational tools. We automatically set
-%D the width and height of the page and start up full screen.
-
-\setuppapersize
- [S6][S6]
-
-\setuplayout
- [topspace=12pt,
- header=0pt,
- footer=0pt,
- height=402pt, % 450 - 12 - 15 - 12 - 12 + 3
- bottomdistance=15pt,
- bottom=12pt,
- backspace=12pt,
- margin=0pt,
- width=fit,
- edgedistance=12pt,
- rightedge=96pt]
-
-\setupinteractionscreen
- [option=max]
-
-%D \macros
-%D {setupbackgrounds}
-%D
-%D We set the pagecolor to yellow except the part of the screen
-%D that is used to display the running text. By seting the
-%D offset to 3pt the text will not touch the yellow parts. We
-%D do not set the depth.
-
-\setupbackgrounds
- [page]
- [background=color,
- backgroundcolor=BackgroundColor,
- offset=3pt]
-
-\setupbackgrounds
- [text][text]
- [background=color,
- backgroundcolor=white]
-
-%D I considered the next setup too, but finaly decided to
-%D comment it out.
-%D
-%D \starttyping
-%D \setupbackgrounds
-%D [bottom][text]
-%D [frame=on,
-%D framecolor=white]
-%D \stoptyping
-
-%D \macros
-%D {setupinteraction}
-%D
-%D We did not enable interactive text support yet, so let's do
-%D that now. We force page reference to circumvent problems
-%D with named destinations in buggy viewers.
-
-\setupinteraction
- [page=yes,
- color=InteractionColor,
- contrastcolor=ContrastColor,
- menu=on,
- state=start]
-
-%D \macros
-%D {setupinteractionmenu,startinteractionmenu}
-%D
-%D At the bottom of the screen we show two navigational bars.
-%D At the left we show the subpage bar, at the right we use a
-%D non default backward|/|forward bar.
-
-\setupinteractionmenu
- [bottom]
- [leftoffset=-3pt,
- rightoffset=-3pt]
-
-\startinteractionmenu[bottom]
- \txt \InteractionBar \\
- \txt \InteractionButtons \\
-\stopinteractionmenu
-
-%D \macros
-%D {interactionbar}
-%D
-%D The left bar gets a white border (on the yellow background).
-%D Because we don't want to typeset an empty frame when no
-%D subpage bar is shown, we check for the number of subpages.
-
-\def\InteractionBar%
- {\ifnum\nofsubpages>1
- \framed
- [framecolor=white,rulethickness=1pt,
- height=\bottomheight,strut=no]
- {\interactionbar[alternative=f,width=.5\makeupwidth,height=1ex]}
- \fi}
-
-%D \macros
-%D {setupinteractionbar, interactionbuttons}
-%D
-%D The right hand buttons enable us to jump backward and forward,
-%D as well as to the previous and next jump. We also enable to
-%D close the presentation.
-
-\setupinteractionbar
- [framecolor=white,rulethickness=1pt,
- height=\bottomheight,strut=no]
-
-\def\InteractionButtons%
- {\interactionbuttons
- [width=15em]
- [PreviousJump,NextJump,
- firstpage,
- firstsubpage,previouspage,nextpage,lastsubpage,
- lastpage,
- CloseDocument]}
-
-%D \macros
-%D {StartTitlePage, TitlePage}
-%D
-%D The titlepage is rather simple and can be typeset in two
-%D ways:
-%D
-%D \starttyping
-%D \StartTitlePage
-%D text \\ text \\ text
-%D \StopTitlepage
-%D \stoptyping
-%D
-%D or more straightforward:
-%D
-%D \starttyping
-%D \TitlePage{text\\text\\text}
-%D \stoptyping
-%D
-%D The first alternative can be used for more complicated
-%D title pages.
-
-\def\StartTitlePage%
- {\startstandardmakeup
- \bfd\setupinterlinespace
- \setupalign[middle]
- \vfil
- \let\\=\vfil}
-
-\def\StopTitlePage%
- {\vfil\vfil\vfil
- \stopstandardmakeup}
-
-\def\TitlePage#1%
- {\StartTitlePage#1\StopTitlePage}
-
-%D \macros
-%D {TitlePage, Topics, Topic, Subject}
-%D
-%D A presentation after loading this module looks like:
-%D
-%D \starttyping
-%D \TitlePage {About Whatever\\Topics}
-%D
-%D \Topics {Todays Talk}
-%D
-%D \Topic {Some topic}
-%D
-%D \Subject {Alfa}
-%D
-%D .....
-%D
-%D \Subject {Beta}
-%D
-%D .....
-%D \stoptyping
-
-%D \macros
-%D {definehead}
-%D
-%D The commands \type{\Topic} and \type{\Subject} are defined
-%D as copies of head. We use \type{\Nopic} for internal
-%D purposes.
-
-\definehead [Topic] [chapter]
-\definehead [Subject] [section]
-
-\definehead [Nopic] [title]
-
-%D \macros
-%D {setuphead}
-%D
-%D Because chapters and sections do not make sense in
-%D presentations, we use our own command for typesetting the
-%D titles. Sectionnumbers are of course hidden from viewing.
-%D Each topic is followed by a list of subjects that belong
-%D to the topic.
-
-\setuphead
- [Topic, Nopic, Subject]
- [command=\HeadLine,
- page=yes,
- style=\tfb,
- after=\blank,
- sectionnumber=no]
-
-\setuphead
- [Topic]
- [after=\PlaceSubjectList]
-
-\setuphead
- [Subject]
- [continue=no]
-
-%D \macros
-%D {framed, midalined}
-%D
-%D The command used to typeset the head lines is rather simple.
-%D We just center the framed title. The frame macro optimizes
-%D the alignment and at the same time enables us to typeset a
-%D nice colored rule.
-
-\def\HeadLine#1#2%
- {\midaligned
- {\framed
- [framecolor=BackgroundColor,rulethickness=1pt,
- width=.8\hsize,align=middle,strut=no]
- {#2}}}
-
-%D \macros
-%D {setuplist}
-%D
-%D The subject list is automatically placed. We center each
-%D subject line by using one of the default alternatives (g). We
-%D could have said:
-%D
-%D \starttyping
-%D \setuplist
-%D [Subject]
-%D [alternative=none,
-%D command=\SubjectListLine,
-%D interaction=all]
-%D
-%D \def\SubjectListLine#1#2#3%
-%D {\midaligned{#2}}
-%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
-%D does not automatically goes a new page with each subject.
-
-\def\PlaceSubjectList%
- {\blank
- \determinelistcharacteristics[Subject]
- % \ifnum\utilitylistlength>0 \placelist[Subject] \fi}
- \doifmode{*list}{\placelist[Subject]}}
-
-\setuplist
- [Subject, Topic]
- [alternative=g,
- interaction=all,
- before=,
- after=]
-
-% %D \macros
-% %D {setuptexttexts}
-% %D
-% %D The topics will be listed in the right edge, using:
-%
-% \setuptexttexts
-% [edge]
-% [][\TopicList]
-
-%D \macros
-%D {setuplist, placelist,startinteractionmenu}
-%D
-%D The actual topic list is typeset using a \type{\vbox}. We
-%D have to specify \type{criteriumcriterium=all} because otherwise no
-%D list will be typeset. (By default lists are typeset
-%D locally.)
-
-\startinteractionmenu[right]
- \placelist
- [Topic]
- [alternative=f, % command, % none,
- maxwidth=\hsize,
- width=\hsize,
- offset=0pt,
- criterium=all,
- align=left,
- style=\setsmallbodyfont\bfx]
-\stopinteractionmenu
-
-\def\Topics#1% temporary hack
- {\Nopic{#1}
- \placelist[Topic][criterium=all]}
-
-\def\Subjects%
- {}
-
-%D \macros
-%D {setuptexttexts, button}
-%D
-%D During a presentation, we want to use the cursor to point to
-%D parts of the text. Furthermore we want to be able to jump to
-%D the next page, without the need to move the cursor on buttons.
-%D Therefore we make the text part of the screen into an
-%D invisible button.
-
-\setuptexttexts
- [\GotoNextPage][]
-
-\def\GotoNextPage
- {\button[width=\hsize,height=\vsize,frame=off]{}[nextpage]}
-
-%D \macros
-%D {setupsubpagenumber}
-%D
-%D The left bottom navigation bar shows the subpages, which will
-%D be counted by text. One can change this in the preentation
-%D itself by saying \type {[way=byTopic]}.
-
-\setupsubpagenumber
- [way=bytext, % Topic,
- state=start]
-
-\doifnotmode{demo}{\endinput}
-
-%D The (rather silly) demo section.
-
-\starttext
-
-\TitlePage{Title Page\\pre-original}
-
-\Topics{Some Nice Quotes}
-
-\Topic{A Few}
-
-\Subject{Knuth} \input knuth
-\Subject{Tufte} \input tufte
-
-\Topic{Some More}
-
-\Subject{Zapf} \input zapf
-\Subject{Bryson} \input bryson
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-02.tex b/Master/texmf-dist/tex/context/base/s-pre-02.tex
deleted file mode 100644
index d7a6fe4589a..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-02.tex
+++ /dev/null
@@ -1,381 +0,0 @@
-%D \module
-%D [ file=s-pre-02,
-%D version=1998.04.21,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 2,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 environment can be used to typeset interactive
-%D presentations. This module was first used at the 1998
-%D publishers conference of the European Portable Document
-%D Association (now merged into a graphics association).
-
-\usemodule[pre-general]
-
-%D \macros
-%D {setupbodyfont, switchtobodyfont, setuplayout}
-%D
-%D At \PRAGMA\ we prefer using the Lucida Bright fonts, but
-%D one can of course load another typeface.
-
-\startmode[asintended] \setupbodyfont[lbr] \stopmode
-
-\setupbodyfont[14.4pt]
-
-\setuplayout
- [style=smallbodyfont]
-
-%D \macros
-%D {setuppapersize, setuplayout}
-%D
-%D The papersize suits the screen dimensions. The layout is
-%D rather simple. We use the whole width of the screen and only
-%D have navigational tools at the bottom of the screen.
-
-\setuppapersize
- [S6][S6]
-
-\setuplayout
- [backspace=1cm,
- topspace=1cm,
- margin=0pt,
- header=0pt,
- footer=0pt,
- bottomdistance=.875cm,
- bottom=1cm,
- width=fit,
- height=fit]
-
-%D \macros
-%D {setupwhitespace, setuptyping}
-%D
-%D We don't have much height, so we use a more cramped
-%D spacing. Verbatim text looks better when indented.
-%D
-
-\setupwhitespace
- [medium]
-
-\setuptyping
- [margin=standard]
-
-%D \macros
-%D {definecolor, setupcolors}
-%D
-%D Of course we enable color. We define some logical colors,
-%D of which most default to the same green shade.
-
-\definecolor [BackgroundColor] [r=.8, g=.8, b=.8]
-\definecolor [OrnamentColor] [r= 0, g=.7, b=.4]
-
-\setupcolors
- [state=start]
-
-%D \macros
-%D {setupinteraction, setupinteractionscreen}
-%D
-%D We still have to enable interaction mode. We go full
-%D screen!
-
-\setupinteraction
- [state=start,
- color=OrnamentColor,
- contrastcolor=OrnamentColor]
-
-\setupinteractionscreen
- [option=max,
- width=fit,
- height=fit]
-
-%D \macros
-%D {setupitemize}
-%D
-%D And why not bring some color in itemizations too?
-
-\setupitemize
- [color=OrnamentColor]
-
-%D \macros
-%D {defineoverlay, setupbackgrounds}
-%D
-%D The navigational elements and the backgrounds are
-%D provided by \METAPOST.
-%D
-%D When \METAPOST\ is used, it makes sense to generate the
-%D graphics at runtime. This is supported when one enables
-%D system calls in the local \type {texmf.cnf} file and add the
-%D switch \type {\runMPgraphicstrue} to the local file \type
-%D {cont-sys.tex}. When direct processing is disabled or not
-%D supported, \TEXEXEC\ will take care of graphic generation.
-
-\startuniqueMPgraphic{PageBackground}
- fill unitsquare
- xyscaled(OverlayWidth,OverlayHeight)
- withcolor OverlayColor ;
- draw unitsquare
- xyscaled(OverlayWidth,OverlayHeight)
- enlarged (-2*OverlayLineWidth)
- withpen pencircle scaled OverlayLineWidth
- withcolor OverlayLineColor ;
-\stopuniqueMPgraphic
-
-\defineoverlay
- [PageBackground]
- [\uniqueMPgraphic{PageBackground}]
-
-\setupbackgrounds
- [page]
- [background=PageBackground,
- backgroundcolor=BackgroundColor,
- rulethickness=.125cm,
- framecolor=OrnamentColor]
-
-%D \macros
-%D {setuptexttexts}
-%D
-%D By clicking on the text area, one goes to the next page.
-%D We hook this feature into the text backgrounds.
-
-\startuniqueMPgraphic{TextBackground}
- draw unitsquare
- xyscaled(OverlayWidth,OverlayHeight)
- enlarged (4*OverlayLineWidth)
- withpen pencircle scaled OverlayLineWidth
- withcolor OverlayLineColor ;
-\stopuniqueMPgraphic
-
-\defineoverlay
- [TextBackground]
- [\uniqueMPgraphic{TextBackground}]
-
-\defineoverlay
- [NextPage]
- [\overlaybutton{nextpage}]
-
-\setupbackgrounds
- [text]
- [background={TextBackground,NextPage},
- backgroundcolor=BackgroundColor,
- rulethickness=.0625cm,
- framecolor=OrnamentColor]
-
-%D \macros
-%D {setupinteractionmenu,startinteractionmenu}
-%D
-%D At the bottom of the screen, we show three buttons. These
-%D direct us to the previous or next jump or exit the document.
-
-\setupMPvariables[RightArrow][height=\bottomheight]
-\setupMPvariables[LeftArrow] [height=\bottomheight]
-\setupMPvariables[Circle] [height=\bottomheight]
-\setupMPvariables[UpArrow] [height=\bottomheight]
-
-\startuniqueMPgraphic{RightArrow}{height}
- z1=(0,0) ; z2=(\MPvar{height},.5y3) ; z3=(0,\MPvar{height}) ;
- drawfill z1--z2--z3--cycle
- withpen pencircle scaled (\MPvar{height}/5)
- withcolor \MPcolor{OrnamentColor} ;
-\stopuniqueMPgraphic
-
-\startuniqueMPgraphic{LeftArrow}{height}
- z1=(\MPvar{height},0) ; z2=(0,.5y3) ; z3=(\MPvar{height},\MPvar{height}) ;
- drawfill z1--z2--z3--cycle
- withpen pencircle scaled (\MPvar{height}/5)
- withcolor \MPcolor{OrnamentColor} ;
-\stopuniqueMPgraphic
-
-\startuniqueMPgraphic{Circle}{height}
- drawfill fullcircle scaled \MPvar{height}
- withpen pencircle scaled (\MPvar{height}/5)
- withcolor \MPcolor{OrnamentColor} ;
-\stopuniqueMPgraphic
-
-\startuniqueMPgraphic{UpArrow}{height}
- z1=(0,0) ; z2=(\MPvar{height},0) ; z3=(.5x2,\MPvar{height}) ;
- drawfill z1--z2--z3--cycle
- withpen pencircle scaled (\MPvar{height}/5)
- withcolor \MPcolor{OrnamentColor} ;
-\stopuniqueMPgraphic
-
-\setupinteractionmenu
- [bottom]
- [state=start,
- frame=off,
- width=.3\textwidth,
- height=\bottomheight]
-
-\setupinteraction
- [menu=on]
-
-\def\WhateverButton
- {\doifreferencefoundelse{Whatever}
- {\raw [Whatever] \uniqueMPgraphic{UpArrow} \\}
- {}}
-
-\startinteractionmenu[bottom]
- \but [Topics] \\ % secret button
- \hfill
- \WhateverButton % user specific
- \kern2\bottomheight
- \raw [previouspage] \uniqueMPgraphic{LeftArrow} \\
- \kern.5\bottomheight
- \raw [CloseDocument] \uniqueMPgraphic{Circle} \\
- \kern.5\bottomheight
- \raw [nextpage] \uniqueMPgraphic{RightArrow} \\
- \kern.5\bottomheight
-\stopinteractionmenu
-
-%D \macros
-%D {TitlePage, Topics, Topic, Subject}
-%D
-%D A presentation after loading this module looks like:
-%D
-%D \starttyping
-%D \TitlePage {About Whatever\\Topics}
-%D
-%D \Topics {Todays Talk}
-%D
-%D \Topic {Some topic}
-%D
-%D .....
-%D
-%D \Topic {Next Topic}
-%D
-%D .....
-%D \stoptyping
-
-%D \macros
-%D {StartTitlePage, TitlePage}
-%D
-%D The titlepage is rather simple and can be typeset in two
-%D ways:
-%D
-%D \starttyping
-%D \StartTitlePage
-%D text \\ text \\ text
-%D \StopTitlepage
-%D \stoptyping
-%D
-%D or as one||liner:
-%D
-%D \starttyping
-%D \TitlePage{text\\text\\text}
-%D \stoptyping
-%D
-%D The first alternative can be used for more complicated
-%D title pages.
-
-\def\StartTitlePage%
- {\startstandardmakeup
- \bfd\setupinterlinespace
- \setupalign[middle]
- \vfil
- \let\\=\vfil}
-
-\def\StopTitlePage%
- {\vfil\vfil\vfil
- \stopstandardmakeup}
-
-\def\TitlePage#1%
- {\StartTitlePage#1\StopTitlePage}
-
-%D \macros
-%D {definehead}
-%D
-%D The commands \type{\Topic} and \type{\Subject} are defined
-%D as copies of head. We use \type{\Nopic} for internal
-%D purposes.
-
-\definehead [Topic] [chapter]
-\definehead [Subject] [section]
-
-\definehead [Nopic] [title]
-
-%D \macros
-%D {setuphead}
-%D
-%D We use our own command for typesetting the titles. We hide
-%D sectionnumbers from viewing. Each topic is followed by a
-%D list of subjects that belong to the topic.
-
-\setuphead
- [Topic, Nopic]
- [after={\blank[3*medium]},
- number=no,
- style=\tfb,
- page=yes,
- alternative=middle]
-
-\setuphead
- [Subject]
- [after=\blank,
- number=no,
- page=yes,
- continue=no,
- style=\tfa]
-
-%D \macros
-%D {setuplist}
-%D
-%D When found, the subject list is automatically placed
-%D after the topic head.
-
-\setuplist
- [Topic,Subject]
- [alternative=g,
- interaction=all,
- before=,
- after=]
-
-\setuplist
- [Topic]
- [criterium=all]
-
-\def\Topics#1%
- {\determinelistcharacteristics[Topic]
- \doifmode{*list}
- {\Nopic[Topics]{#1}
- \startcolumns
- \placelist[Topic]
- \stopcolumns}}
-
-\setuplist
- [Subject]
- [criterium=Topic]
-
-\def\Subjects%
- {\determinelistcharacteristics[Subject]
- \doifmode{*list}
- {\placelist[Subject]}}
-
-\setuphead
- [Topic]
- [after={\blank[3*medium]\Subjects}]
-
-\doifnotmode{demo}{\endinput}
-
-%D The (rather silly) demo section.
-
-\starttext
-
-\TitlePage{Title Page\\pre-green}
-
-\Topics{Some Nice Quotes}
-
-\Topic{A Few}
-
-\Subject{Knuth} \input knuth
-\Subject{Tufte} \input tufte
-
-\Topic{Some More}
-
-\Subject{Zapf} \input zapf
-\Subject{Bryson} \input bryson
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-03.tex b/Master/texmf-dist/tex/context/base/s-pre-03.tex
deleted file mode 100644
index 19a11d24e5d..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-03.tex
+++ /dev/null
@@ -1,257 +0,0 @@
-%D \module
-%D [ file=s-pre-03,
-%D version=1998.09.06,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 3,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D This is the third environment for typesetting interactive
-%D presentations. I used this style for a talk on \TEX\ and
-%D \JAVASCRIPT\ at \TUG98, mainly because I didn't want to
-%D use the same style three times. Therefore this is a rather
-%D simple, silly style.
-
-\usemodule[pre-general]
-
-%D \macros
-%D {setupbodyfont}
-%D
-%D We use a large bodyfont. Combined with the fancy
-%D background, this does not leave that much room for text, but
-%D presentations should use much text anyway.
-
-\startmode[asintended] \setupbodyfont[lbr] \stopmode
-
-\setupbodyfont[14.4pt]
-
-%D \macros
-%D {setuppapersize,setuplayout,setupinteractionscreen}
-%D
-%D The page dimensions are set to size \type {S6}, being
-%D 600pt by 450pt. We use wide margins and discard headers
-%D and footers. We also launch the document full screen.
-
-\setuppapersize
- [S6][S6]
-
-\setuplayout
- [width=middle,
- height=middle,
- topspace=75pt,
- backspace=100pt,
- header=0pt,
- footer=0pt]
-
-\setupinteractionscreen
- [option=max]
-
-%D \macros
-%D {setupcolors,definecolor}
-%D
-%D Next, color support is turned on and a dark red color is
-%D defined. Other red shades will be derived from this one
-%D color.
-
-\setupcolors
- [state=start]
-
-\definecolor [PageColor] [black]
-\definecolor [BackgroundColor] [s=.85]
-\definecolor [OrnamentColor] [r=.75]
-
-%D \macros
-%D {setupinteraction}
-%D
-%D We turn on interaction mode and use the same color for
-%D hyperlinks and redundant hyperlinks (the ones that point
-%D to the current page).
-
-\setupinteraction
- [state=start,
- contrastcolor=OrnamentColor,
- color=OrnamentColor]
-
-%D \macros
-%D {defineoverlay, setupbackgrounds}
-%D
-%D The joke in this presentation is the elliptical shape of
-%D which the bottom part includes a page indication.
-
-\defineoverlay
- [PageShape][\useMPgraphic{PageShape}]
-
-% \startuseMPgraphic{PageShape}
-% lin := 20pt ; off := .75lin ;
-% wid := \overlaywidth ; hei := \overlayheight ;
-% pos := \currentpage ; tot := \lastpage ;
-% path bb; bb := unitsquare xscaled wid yscaled hei ;
-% filldraw bb withcolor \MPcolor{PageColor} ;
-% pickup pencircle xscaled .5lin yscaled lin rotated 45 ;
-% pair r, t, l, b ;
-% r := (wid-off,.5hei) ; t := (.5wid,hei-off) ;
-% l := (off,.5hei) ; b := (.5wid,off) ;
-% path p; p := superellipse(r,t,l,b,.8) ;
-% fill p withcolor \MPcolor{Backgroundcolor} ;
-% draw p withcolor \MPcolor{OrnamentColor} ;
-% color contrastcolor ; contrastcolor = 2/3 * \MPcolor{OrnamentColor} ;
-% if (pos>0) and (tot>0):
-% pair pa ; pa := point 5 of p ;
-% pair pb ; pb := point 7 of p ;
-% draw pa withcolor contrastcolor ;
-% draw pb withcolor contrastcolor ;
-% len := 2/tot ;
-% pair pa ; pa := point (5+len*pos) of p ;
-% pair pb ; pb := point (5+len*(pos-1)) of p ;
-% p := p cutafter pa ;
-% p := p cutbefore pb ;
-% draw p withcolor contrastcolor ;
-% fi ;
-% setbounds currentpicture to bb ;
-% \stopuseMPgraphic
-
-\startuseMPgraphic{PageShape}
- StartPage ;
- path p ; pair pa, pb ; numeric len ; color contrastcolor ;
- fill Page withcolor \MPcolor {PageColor} ;
- pickup pencircle rotated 45 xscaled 10pt yscaled 20pt ;
- p := Page enlarged (-10pt,-15pt) superellipsed .8 ;
- p := p shifted (-1.5pt,0) ; % looks better
- fill p withcolor \MPcolor{BackgroundColor} ;
- draw p withcolor \MPcolor{OrnamentColor} ;
- contrastcolor = 2/3 * \MPcolor{OrnamentColor} ;
- if (PageNumber>0) and (NOfPages>0):
- draw point 5 of p withcolor contrastcolor ;
- draw point 7 of p withcolor contrastcolor ;
- len := 2/NOfPages ;
- pa := point (5+len*PageNumber) of p ;
- pb := point (5+len*(PageNumber-1)) of p ;
- draw (p cutafter pa) cutbefore pb
- withcolor contrastcolor ;
- fi ;
- StopPage ;
-\stopuseMPgraphic
-
-%D We use the viewer provided feature to go to the previous or
-%D next page.
-
-\defineoverlay[PrevButton][\overlaybutton{PreviousPage}]
-\defineoverlay[NextButton][\overlaybutton{NextPage}]
-
-\setupbackgrounds
- [page]
- [background={PageShape,PrevButton}]
-
-\setupbackgrounds
- [text][text]
- [background=NextButton]
-
-% or using hard coded next/prev pages:
-%
-% \defineoverlay[PrevButton][\overlaybutton{previouspage}]
-% \defineoverlay[NextButton][\overlaybutton{nextpage}]
-%
-% \setupbackgrounds[state=repeat]
-% \setupbackground[text][text][background=NextButton]
-%
-% or simply (using an repeated layer):
-%
-% \setupbackground[text][background=NextButton]
-
-%D \macros
-%D {definehead, setuphead}
-%D
-%D Like the other presentation styles, we use \type {\Topic}
-%D instead of \type {\chapters}. This time we don't provide
-%D an additional sectioning. So we have:
-%D
-%D \starttyping
-%D \TitlePage{How nice}
-%D
-%D \Topics{This is about ...}
-%D
-%D \Topic{The first one}
-%D
-%D \Topic{Another one}
-%D \stoptyping
-
-\definehead [Topic] [chapter]
-\definehead [Nopic] [title]
-
-\setuphead
- [Topic,Nopic]
- [after={\blank[3*medium]},
- number=no,
- style=\tfb,
- page=yes,
- alternative=middle]
-
-\setuplist
- [Topic]
- [alternative=g,
- interaction=all,
- before=,
- after=]
-
-\def\Subject
- {\Topic}
-
-%D The tables of contents is associated with \type
-%D {\Topics}.
-
-\def\Topics#1%
- {\Nopic[Topics]{#1}
- \placelist[Topic][criterium=all]}
-
-\def\Subjects
- {}
-
-%D Instead of \type {\TitlePage}, one can use the pair
-%D \type {\StartTitlePage} -- \type {\StopTitlePage}:
-%D
-%D \starttyping
-%D \StartTitlePage
-%D A Self Made Title
-%D \StopTitlePage
-%D \stoptyping
-
-\def\StartTitlePage%
- {\startstandardmakeup
- \bfd\setupinterlinespace
- \setupalign[middle]
- \vfil
- \def\\{\vfil\bfb\setupinterlinespace}}
-
-\def\StopTitlePage%
- {\vfil\vfil\vfil
- \stopstandardmakeup}
-
-\def\TitlePage#1%
- {\StartTitlePage#1\StopTitlePage}
-
-\doifnotmode{demo}{\endinput}
-
-%D The (rather silly) demo section.
-
-\starttext
-
-\TitlePage{Title Page\\pre-funny}
-
-\Topics{Some Nice Quotes}
-
-\Topic{A Few}
-
-\Subject{Knuth} \input knuth
-\Subject{Tufte} \input tufte
-
-\Topic{Some More}
-
-\Subject{Zapf} \input zapf
-\Subject{Bryson} \input bryson
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-04.tex b/Master/texmf-dist/tex/context/base/s-pre-04.tex
deleted file mode 100644
index 088f4e510ed..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-04.tex
+++ /dev/null
@@ -1,377 +0,0 @@
-%D \module
-%D [ file=s-pre-04,
-%D version=1998.09.06,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 4,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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[pre-general]
-
-%D \macros
-%D {setupbodyfont}
-%D
-%D This is just another environment for typesetting interactive
-%D presentations. I wrote this module on behalf of a course I
-%D gave for the United Kingdom \TeX\ users group.
-
-\setupbodyfont[ams,pos,14.4pt]
-
-%D \macros
-%D {setupcolors,definecolor}
-%D
-%D I started using dark blue for the navigational elements. In
-%D that context, dark red is a logical choice for the contrast
-%D color. While playing around with the navigational elements
-%D I decided to use the not so dominant color yellow for the
-%D status bar.
-%D
-%D A few days before I wrote this style, the recent acquisition
-%D of Mondriaans last painting by the Dutch governement was a
-%D hot topic in the dutch news scenary. Therefore I decided to
-%D replace the rather dull title page by something more
-%D colorful, in mondriaan colors, but far more random than any
-%D of his paintings. For consistence we remap the already
-%D defined primary colors.
-
-\setupcolors [state=start]
-
-\definecolor [NoneColor] [s=.6]
-\definecolor [GotoColor] [b=.6] \definecolor[blue] [GotoColor]
-\definecolor [ExitColor] [r=.6] \definecolor[red] [ExitColor]
-\definecolor [JumpColor] [s=.6]
-\definecolor [UserColor] [g=.6] \definecolor[green] [UserColor]
-\definecolor [StepColor] [r=.6,g=.6] \definecolor[yellow][StepColor]
-
-\definecolor [PageColor] [s=.80] \definecolor[gray] [PageColor]
-\definecolor [TextColor] [s=.90]
-
-%D \macros
-%D {setuppapersize}
-%D
-%D As usual, we take a screen oriented paper size:
-
-\setuppapersize
- [S6][S6]
-
-%D \macros
-%D {setuplayout,setupinteractionscreen}
-%D
-%D The layout definition fits into this $600\times450$ point
-%D area, but the dimensions are somewhat diffused by the text
-%D background offset.
-
-\setuplayout
- [width=530pt,
- height=400pt,
- header=0pt,
- footer=0pt,
- backspace=15pt,
- topspace=15pt,
- bottomdistance=15pt,
- bottom=10pt,
- margin=0pt,
- rightedgedistance=15pt,
- rightedge=30pt]
-
-\setupinteractionscreen
- [option=max]
-
-%D \macros
-%D {setupbackgrounds}
-%D
-%D Both the page and the text area have a gray background.
-%D The \type {[text,text]} area also has an offset. Later we
-%D will see that we have to compensate for that in the
-%D navigational areas.
-
-\setupbackgrounds
- [page]
- [background=color,
- backgroundcolor=PageColor]
-
-\setupbackgrounds
- [text][text]
- [background=color,
- backgroundcolor=TextColor,
- backgroundoffset=5pt]
-
-%D \macros
-%D {setupinteraction}
-%D
-%D For convenient navigation, we turn on interaction.
-
-\setupinteraction
- [state=start,
- menu=on,
- color=UserColor,
- contrastcolor=NoneColor]
-
-%D \macros
-%D {setupsubpagenumber}
-%D
-%D When navigating the document, we keep the title page out
-%D of sight, therefore we use sub page numbers.
-
-\setupsubpagenumber
- [state=start,
- way=bytext]
-
-%D \macros
-%D {setupinteractionmenu}
-%D
-%D There is only one interaction menu, located in the right
-%D edge of the screen. Both offsets enlarge the edge by the
-%D same amount as the text background offset.
-
-\setupinteractionmenu
- [right]
- [state=start,
- frame=off,
- strut=no,
- offset=0pt,
- inbetween=,
- bottomoffset=-5pt,
- topoffset=-5pt]
-
-%D \macros
-%D {startinteractionmenu}
-%D
-%D The menu itself is not that spectacular. We use the
-%D start||stop alternative for setting the content. The macro
-%D \type {\interactioncolor} expands into either the
-%D interaction color or the contrast color, the latter only
-%D when no jump is possible.
-
-\startinteractionmenu[right]
- \setupinteraction[color=GotoColor]
- \but [previoussubpage] \Triangle {90}\framedwidth\interactioncolor \\
- \vskip10pt
- \but [nextsubpage] \Triangle{270}\framedwidth\interactioncolor \\
- \vfill
- \but [PreviousJump] \Triangle{180}\framedwidth{NoneColor} \\
- \vskip-5pt
- \but [NextJump] \Triangle {0}\framedwidth{NoneColor} \\
-\stopinteractionmenu
-
-%D \macros
-%D {setupinteractionbar}
-%D
-%D The interaction bar at the bottom is also larger than the
-%D normal width of the bottom area.
-
-\setupinteractionbar
- [alternative=f,
- width=\textwidth,
- height=\bottomheight,
- distance=10pt,
- color=NoneColor,
- contrastcolor=StepColor]
-
-%D \macros
-%D {setupbottomtexts}
-%D
-%D The bar is centered in the middle.
-
-\setupbottomtexts
- [\interactionbar]
-
-%D We can exit viewing with a close button, located on the
-%D rightmost bottom area.
-
-\def\CloseButton
- {\button
- [width=\rightedgewidth,height=\bottomheight,offset=overlay,
- background=color,backgroundcolor=ExitColor,frame=off]
- {}%
- [CloseDocument]}
-
-\setupbottomtexts
- [edge][][\CloseButton]
-
-%D \macros
-%D {definesymbol,setupitemize}
-%D
-%D Because some prominent things are rectangular or triangular,
-%D we prefer some different symbols in itemizations:
-
-\definesymbol[1][$\blacktriangleright$]
-\definesymbol[2][$\blacktriangledown$]
-\definesymbol[3][$\blacktriangleright$]
-\definesymbol[4][$\blacktriangledown$]
-
-\setupitemize[each][color=NoneColor]
-
-%D \macros
-%D {TitlePage,defineoverlay,button,setupalign,
-%D setupbackgrounds,setupinteraction,setupinteractionbar,
-%D startstandardmakeup,switchtobodyfont,setupinterlinespace}
-%D
-%D Now the main layout and navigational definitions are
-%D done, it makes sense to define and tune some structuring
-%D commands. First we build the titlepage.
-
-\defineoverlay [TitleGraphic] [\useMPgraphic{title}]
-\defineoverlay [NextPage] [\overlaybutton{nextpage}]
-
-\def\StartTitlePage
- {\setupbackgrounds[page][background={color,TitleGraphic,NextPage}]
- \setupbackgrounds[text][text][background=]
- \setupinteraction[menu=off]
- \setupinteractionbar[state=stop]
- \startstandardmakeup
- \switchtobodyfont[24pt]
- \bfd\setupinterlinespace
- \setupalign[middle]
- \vfil
- \let\\=\vfil}
-
-\def\StopTitlePage
- {\vfil\vfil\vfil
- \stopstandardmakeup
- \setupinteraction[menu=on]
- \setupinteractionbar[state=start]
- \setupbackgrounds[page][background=color]
- \setupbackgrounds[text][text][background=color]
- \setupsubpagenumber[reset]}
-
-\def\TitlePage#1%
- {\StartTitlePage#1\StopTitlePage}
-
-%D \macros
-%D {Topic, Nopic, Subject,
-%D definehead, setuphead}
-%D
-%D We use \type {\Topic} and \type {\Subject} instead of
-%D chapters and sections. The \type {\Nopic} alternative is
-%D meant for internal use.
-
-\definehead [Topic] [chapter]
-\definehead [Nopic] [title]
-\definehead [Subject] [section]
-
-\setuphead
- [Topic, Nopic]
- [after={\blank[3*medium]},
- number=no,
- style=\tfb,
- page=yes,
- alternative=middle]
-
-\setuphead
- [Subject]
- [after=\blank,
- number=no,
- page=yes,
- continue=no,
- style=\tfa]
-
-%D \macros
-%D {Topics, Subjects,
-%D setuplist, placelist, startcolumns}
-%D
-%D This style is meant for the more large presentations, and
-%D therefore provided for a list of topics as well as local
-%D lists of subjects. When many topics are introduces, the
-%D list is typeset in columns.
-
-\setuplist
- [Topic,Subject]
- [alternative=g,
- interaction=all,
- before=,
- after=]
-
-\setuplist
- [Topic]
- [criterium=all]
-
-\def\Topics#1%
- {\determinelistcharacteristics[Topic]
- \ifnum\utilitylistlength>0
- \Nopic[Topics]{#1}
- \ifnum\utilitylistlength>12
- \startcolumns
- \placelist[Topic]
- \stopcolumns
- \else
- \placelist[Topic]
- \fi
- \fi}
-
-\def\Subjects%
- {\placelist[Subject]}
-
-%D Last we define the overlays. Look at the way colors are
-%D linked into the macros.
-
-\startMPinclusions
- def triangle (expr wid, rot, col) =
- x1 := x3 := y1 := 0 ; x2 := y3 := wid ; y2 := .5y3 ;
- fill (z1--z2--z3--cycle) rotated rot withcolor col ;
- currentpicture := currentpicture xysized (wid,wid) ;
- enddef ;
-\stopMPinclusions
-
-\setupMPvariables
- [triangle]
- [width=1cm,
- rotation=0,
- color=black]
-
-\startuniqueMPgraphic{triangle}{width,rotation,color}
- triangle(\MPvar{width},\MPvar{rotation},\MPvar{color}) ;
-\stopuniqueMPgraphic
-
-\def\Triangle#1#2#3%
- {\uniqueMPgraphic{triangle}{rotation=#1,width=#2,color=#3}}
-
-\startuseMPgraphic{title} % can be simplified with "randomized"
- color c ; path p ;
- for i=1 upto 250 :
- x0 := uniformdeviate \overlaywidth ;
- y0 := uniformdeviate \overlayheight ;
- sx := uniformdeviate 20 ;
- sy := uniformdeviate 20 ;
- cc := round(uniformdeviate 2) ;
- if cc=0 : c := \MPcolor{GotoColor} fi ;
- if cc=1 : c := \MPcolor{ExitColor} fi ;
- if cc=2 : c := \MPcolor{StepColor} fi ;
- qq := round(uniformdeviate 1) ;
- if qq=0 :
- p := unitsquare xscaled sx yscaled sy ;
- else :
- rr := round(uniformdeviate 3) * 90 ;
- x1 := x3 := y1 := 0 ; x2 := y3 := sx; y2 := .5y3 ;
- p := (z1--z2--z3--cycle) rotated rr ;
- fi ;
- fill p shifted z0 withcolor c ;
- endfor ;
-\stopuseMPgraphic
-
-\doifnotmode{demo}{\endinput}
-
-%D The (rather silly) demo section.
-
-\starttext
-
-\TitlePage{Title Page\\pre-colorfull}
-
-\Topics{Some Nice Quotes}
-
-\Topic{A Few}
-
-\Subject{Knuth} \input knuth
-\Subject{Tufte} \input tufte
-
-\Topic{Some More}
-
-\Subject{Zapf} \input zapf
-\Subject{Bryson} \input bryson
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-05.tex b/Master/texmf-dist/tex/context/base/s-pre-05.tex
deleted file mode 100644
index ccffd1f4d72..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-05.tex
+++ /dev/null
@@ -1,240 +0,0 @@
-%D \module
-%D [ file=s-pre-05,
-%D version=1998.12.12,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 5,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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[pre-general]
-
-%D As all styles sofar, this one has the same structuring
-%D commands.
-
-\startmode[asintended] \setupbodyfont[ludicaot] \stopmode
-
-\setupbodyfont[14.4pt]
-
-\setupcolors [state=start]
-
-\definecolor [BackgroundColor] [s=.95]
-\definecolor [OrnamentColor] [r=.6,g=.7,b=.8]
-
-\setuppapersize
- [S6][S6]
-
-\setuplayout
- [width=430pt,
- height=400pt,
- header=0pt,
- footer=0pt,
- margin=0pt,
- backspace=25pt,
- topspace=25pt,
- rightedgedistance=20pt,
- rightedge=110pt]
-
-\setupinteractionscreen
- [option=max]
-
-\setupbackgrounds
- [state=repeat]
-
-\setupbackgrounds
- [page]
- [backgroundcolor=white]
-
-\setupbackgrounds
- [text][text]
- [background={HashFrameA,NextPage},
- backgroundoffset=20pt]
-
-\defineoverlay
- [HashFrameA]
- [\useMPgraphic{HashFrameA}]
-
-\defineoverlay
- [HashFrameB]
- [\useMPgraphic{HashFrameB}]
-
-\setupinteraction
- [state=start,
- menu=on,
- color=OrnamentColor,
- contrastcolor=OrnamentColor]
-
-%D Watch how we use a list alternative that matches the
-%D menu.
-
-\setupinteractionmenu
- [right]
- [background=HashFrameB,
- style=smallbold,
- frame=off,
- offset=10pt,
- height=35pt,
- before=,
- after=,
- inbetween=\endgraf,
- width=\rightedgewidth]
-
-\startinteractionmenu[right]
- \placelist
- [Topic]
- [criterium=all,
- alternative=right,
- maxwidth=.8\rightedgewidth,
- interaction=all,
- before=,
- after=]
- \vfill
- \setupinteractionmenu
- [right]
- [height=30pt]
- \but [CloseDocument] Close \\
-\stopinteractionmenu
-
-\setupwhitespace
- [big]
-
-\setupblank
- [big]
-
-%D \macros
-%D {TitlePage}
-%D
-%D Now the main layout and navigational definitions are
-%D done, it makes sense to define and tune some structuring
-%D commands. First we build the titlepage.
-
-\defineoverlay [TitleGraphic] [\useMPgraphic{TitleGraphic}]
-\defineoverlay [NextPage] [\overlaybutton{forward}]
-
-\unexpanded\def\StartTitlePage
- {\setupbackgrounds[page][background={color,TitleGraphic,NextPage}]
- \setupbackgrounds[text][text][background=]
- \setupinteraction[menu=off]
- \setupinteractionbar[state=stop]
- \setuplayout[width=550pt,rightedge=0pt]
- \startstandardmakeup
- \switchtobodyfont[24pt]
- \bfd\setupinterlinespace
- \setupalign[middle]
- \vfil
- \let\\=\vfil}
-
-\unexpanded\def\StopTitlePage
- {\vfil\vfil\vfil
- \stopstandardmakeup
- \setuplayout[width=430pt,rightedge=110pt]
- \setupinteraction[menu=on]
- \setupinteractionbar[state=start]
- \setupbackgrounds[page][background=color]
- \setupbackgrounds[text][text][background={HashFrameA,NextPage}]}
-
-\unexpanded\def\TitlePage#1%
- {\StartTitlePage#1\StopTitlePage}
-
-%D \macros
-%D {Topics,Subjects}
-%D
-%D Since the lists are in the menu, we don't honor list
-%D placement macros.
-
-\unexpanded\def\Topics#1{}
-\unexpanded\def\Subjects{}
-
-%D \macros
-%D {Topic, Nopic, Subject}
-%D
-%D Since t his style is meant for rather flat structured
-%D documents, only \type {\Topic} makes sense.
-
-\definehead [Topic] [chapter]
-\definehead [Nopic] [title]
-\definehead [Subject] [section]
-
-\setuphead
- [Topic, Nopic]
- [after={\blank[3*medium]},
- number=no,
- style=\tfb,
- page=yes,
- alternative=middle]
-
-\setuphead
- [Subject]
- [after=\blank,
- number=no,
- page=yes,
- continue=no,
- style=\tfa]
-
-%D We use only one kind of base graphic, which is sligthly
-%D tuned for the different usage.
-
-\startMPinclusions
- def random_hash_frame (expr width, height, offset, linewidth ) =
-
- def delta = ((uniformdeviate .5offset) + .25offset) enddef ;
- x1 := offset ; y1 := offset ; x2 := width-offset ; y2 := height-offset ;
-
- drawoptions(withpen pencircle scaled linewidth withcolor \MPcolor{BackgroundColor}) ;
- fill z1--(x2,y1)--z2--(x1,y2)--cycle ;
-
- drawoptions(withpen pencircle scaled linewidth withcolor \MPcolor{OrnamentColor}) ;
- draw (x1-delta,y1)--(x2+delta,y1) ;
- draw (x2,y1-delta)--(x2,y2+delta) ;
- draw (x2+delta,y2)--(x1-delta,y2) ;
- draw (x1,y2+delta)--(x1,y1-delta) ;
-
- drawoptions();
- setbounds currentpicture to unitsquare xscaled width yscaled height ;
- enddef ;
-\stopMPinclusions
-
-\startuseMPgraphic{HashFrameA}
- random_hash_frame(OverlayWidth,OverlayHeight,15pt,2pt) ;
-\stopuseMPgraphic
-
-\startuseMPgraphic{HashFrameB}
- random_hash_frame(OverlayWidth,OverlayHeight, 5pt,2pt) ;
-\stopuseMPgraphic
-
-\startuseMPgraphic{TitleGraphic}
- for i=1 upto 300 :
- offset := uniformdeviate 10pt ;
- width := 2*offset + 30pt + uniformdeviate 30pt ;
- height := 2*offset + 10pt + uniformdeviate 10pt ;
- addto currentpicture also
- image(random_hash_frame(width,height,offset,1pt)) shifted
- (uniformdeviate OverlayWidth, uniformdeviate OverlayHeight) ;
- endfor ;
-\stopuseMPgraphic
-
-\continueifinputfile{s-pre-05.tex}
-
-%D The (rather silly) demo section.
-
-\starttext
-
-\TitlePage{Title Page\\pre-fuzzy}
-
-\Topics{Some Nice Quotes}
-
-\Topic{A Few}
-
-\Subject{Knuth} \input knuth
-\Subject{Tufte} \input tufte
-
-\Topic{Some More}
-
-\Subject{Zapf} \input zapf
-\Subject{Bryson} \input bryson
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-06.tex b/Master/texmf-dist/tex/context/base/s-pre-06.tex
deleted file mode 100644
index 47948262c8c..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-06.tex
+++ /dev/null
@@ -1,324 +0,0 @@
-%D \module
-%D [ file=s-pre-06,
-%D version=1999.04.28,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 6,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 I wrote this sixth presentation style on behalf of a
-%D presentation at Bachotek~'99. The joke in this style is
-%D (ab)using the Antikwa Torunska, a rather Polish font. When I
-%D was first confronted with this font, the backward slant
-%D stoke me as very characteristic.
-%D
-%D Each page has a slightly different background consisting of
-%D three O's. Although \TEX\ could do the randomization,
-%D scaling and placement, I prefered to use \METAPOST. The
-%D backward slant is also reflected in the stepwise increasing
-%D left margin. Due to this characteristic and the trick used,
-%D this style is only suited for simple presentations, using
-%D itemizations.
-
-\usemodule[pre-general]
-
-%D \macros
-%D {setupbodyfont}
-%D
-%D As said, we will use the Antikwa Torunska, and because we
-%D want it to show up well, we use it large.
-
-\setupbodyfont
- [ant,14.4pt]
-
-%D \macros
-%D {definecolor, setupcolors}
-%D
-%D Thus style only uses gray scales, but nevertheless we turn
-%D on color. We only use a few logical color names.
-
-\setupcolors
- [state=start]
-
-\definecolor [BackgroundColor] [s=.8]
-\definecolor [ContrastColor] [s=.9]
-\definecolor [InteractionColor] [s=.6]
-
-%D \macros
-%D {setuppapersize}
-%D
-%D As (nearly) always, we use a 600 pt times 450 pt screen
-%D width, mapped on ditto paper dimensions.
-
-\setuppapersize
- [S6][S6]
-
-%D \macros
-%D {setuplayout}
-%D
-%D The layout is rather symmetrical. We don't use headers and
-%D footers, and thereby automatically turn off the page
-%D numbering: no room, no number. We use the bottom to present
-%D a rather trivial menu.
-
-\setuplayout
- [backspace=2cm,
- topspace=2cm,
- width=middle,
- header=0pt,
- height=middle,
- footer=0pt,
- bottomdistance=.5cm,
- bottom=1cm]
-
-%D \macros
-%D {setupinteractionmenu,startinteractionmenu}
-%D
-%D This menu is slighly moved to the right because that looks
-%D better. The menu itself has one goto (\type {\got}) entry,
-%D which is forced to the right.
-
-\setupinteractionmenu
- [bottom]
- [rightoffset=-1cm]
-
-\startinteractionmenu[bottom]
- \hfill \got [CloseDocument] \bfd Quit \\
-\stopinteractionmenu
-
-%D \macros
-%D {setupbackgrounds}
-%D
-%D Page background are calculated at each page, opposite to the
-%D other backgrounds, that are reused and only calculated when
-%D \CONTEXT\ is explictly told to do so. There are three
-%D overlays: a gray fill, the graphic, and a button that
-%D circulates the pages.
-
-\setupbackgrounds
- [page]
- [background={color,Joke,GoAround},
- backgroundcolor=BackgroundColor]
-
-%D \macros
-%D {defineoverlay}
-%D
-%D The \type {forward} reference action circulates over the
-%D pages, so, at the last page, we are led back to the first.
-
-\defineoverlay [GoAround] [\overlaybutton{forward}]
-
-%D The joke is a simple \METAPOST\ routine. The picture is
-%D actually larger than the screen, but is clipped of when
-%D included.
-
-\defineoverlay [Joke] [\useMPgraphic{background}]
-
-\startuseMPgraphic{background}
- width := \overlaywidth ;
- height := \overlayheight ;
- picture p ; p := char 79 infont "\truefontname{Regular}" scaled 1 ;
- pwidth := xpart urcorner bbox p - xpart llcorner bbox p ;
- pheight := ypart urcorner bbox p - ypart llcorner bbox p ;
- def do (expr r) =
- addto currentpicture also p shifted - center p scaled r
- xscaled (width/pwidth) yscaled (height/pheight)
- withcolor \MPcolor{ContrastColor} ;
- enddef ;
- do (0.9+uniformdeviate0.1) ;
- do (1.4+uniformdeviate0.1) ;
- do (1.9+uniformdeviate0.1) ;
-\stopuseMPgraphic
-
-%D \macros
-%D {setupinteraction,setupinteractionscreen}
-%D
-%D We did not yet turn on the interaction, so let's do that
-%D now. When opened, the document will fil the screen.
-
-\setupinteraction
- [state=start,
- color=InteractionColor,
- contrastcolor=InteractionColor,
- menu=on]
-
-\setupinteractionscreen
- [option=max]
-
-%D \macros
-%D {TitlePage, Topics, Topic}
-%D
-%D A presentation normally consists of a title page, a list of
-%D topics, and the content itself. In this style, a further
-%D subdivision does not make sense, but because we want to be
-%D compatible with the other styles, they are added. A
-%D presentation looks like:
-%D
-%D \starttyping
-%D \usemodule[pre-antikwa]
-%D
-%D \startext
-%D
-%D \TitlePage{The Title}
-%D
-%D \Topics{Contents}
-%D
-%D \Topic{Some Topic}
-%D
-%D \startitemize
-%D \item first
-%D \item second
-%D \stopitemize
-%D
-%D \Topic{Some Topic}
-%D
-%D ...
-%D
-%D \stoptext
-%D \stoptyping
-
-%D \macros
-%D {definehead, Topic, Subject}
-%D
-%D We use dedicated sectioning commands.
-
-\definehead [Topic] [chapter]
-\definehead [Subject] [section]
-
-\definehead [Nopic] [title]
-
-%D \macros
-%D {setuphead}
-%D
-%D We turn of numbering. The assignment to \type {after} takes
-%D care of the increasing indentation. This indentation is the
-%D only low level \TEX\ code needed. Including this
-%D functionality in the core of \CONTEXT\ is not that useful
-%D and I would forget about this feature being present anyway.
-
-\setuphead
- [Topic, Nopic, Subject]
- [number=no,
- after={\blank[2*big]\ToTheLeft\everypar{\ToTheRight}}]
-
-%D After section titles we set the \type {\leftskip} to a value
-%D that suits the Antikwa slant.
-
-\def\ToTheLeft%
- {\gdef\LeftSkip{30}%
- \rightskip0pt\relax
- \leftskip30pt\relax}
-
-%D Each new paragraph adds to the \type {\leftskip}.
-
-\def\ToTheRight%
- {\doglobal\increment(\LeftSkip,20)%
- \leftskip=\LeftSkip pt\relax}
-
-%D \macros
-%D {Topics}
-%D
-%D The \type {\Topics} command uses a bot of low level
-%D \CONTEXT. We could have done with:
-%D
-%D \starttyping
-%D \def\Topics#1%
-%D {\Nopic[Topics]{#1}
-%D \placelist[Topic][criteriumcriterium=all]}
-%D \stoptyping
-%D
-%D but the next alternative sort of ignores this command when
-%D no list is found.
-
-\def\Topics#1%
- {\determinelistcharacteristics[Topic]
- \ifcase\utilitylistlength\else
- \Nopic[Topics]{#1}
- \placelist[Topic][criterium=all]
- \fi}
-
-%D \macros
-%D {setuplist}
-%D
-%D We use the single item command to achieve a result similar
-%D to the itemizations.
-
-\setuplist
- [Topic]
- [alternative=command,
- command=\TopicListCommand]
-
-\def\TopicListCommand#1#2#3%
- {\item#2\par}
-
-%D A dummy command, needed to be compatible with the other
-%D presentation styles.
-
-\def\Subjects%
- {}
-
-%D \macros
-%D {StartTitlePage}
-%D
-%D We use a nested \type {\everypar}; everything in there
-%D will be put in front of each paragraph. The nesting prevents
-%D the first paragraph from indenting. The struts give the
-%D lines a decent height, which looks better inrelation to the
-%D next pages.
-
-\def\StartTitlePage%
- {\startstandardmakeup
- \bfd\setupinterlinespace
- \everypar{\everypar{\advance\leftskip30pt\relax}}
- \let\\=\blank
- \begstrut}
-
-\def\StopTitlePage%
- {\endstrut
- \vfill
- \stopstandardmakeup}
-
-%D \macros
-%D {TitlePage}
-%D
-%D The title page can be generated with one command:
-
-\def\TitlePage#1%
- {\StartTitlePage#1\StopTitlePage}
-
-\doifnotmode{demo}{\endinput}
-
-%D The (rather silly) demo section.
-
-\usemodule[pre-antikwa]
-
-\starttext
-
-\TitlePage{Title Page\\pre-polish}
-
-\Topics{Some Nice Lists}
-
-\Topic{Some Lists}
-
-\Subject{A list}
-
-\startitemize
-\item first
-\item second
-\stopitemize
-
-\Subject{A bigger list}
-
-\startitemize
-\item first
-\item second
-\item third
-\item fourth
-\stopitemize
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-07.tex b/Master/texmf-dist/tex/context/base/s-pre-07.tex
deleted file mode 100644
index ba62b323694..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-07.tex
+++ /dev/null
@@ -1,212 +0,0 @@
-%D \module
-%D [ file=s-pre-07,
-%D version=1999.08.20,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 7,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 style was made for the \NTS\ presentation at
-%D \EUROTEX\ 1999. It's a wink to programming in a webbed way.
-%D This is just one way of implementing such a style. Today
-%D we have more \METAPOST\ interfacing available, and
-%D thereby moore tools and alternative ways to reach such a
-%D goal. I must admit that the main macro looks fuzzy. On
-%D the other hand, the presentation can look quite structured.
-%D
-%D \starttyping
-%D \Topics{...}
-%D
-%D \StartIdeas
-%D \Topic{...}
-%D \StartIdea ... \StopIdea
-%D \StartIdea ... \StopIdea
-%D \StopIdeas
-%D \stoptyping
-
-\startmode[asintended] \setupbodyfont[lbr] \stopmode
-
-\setupbodyfont[14.4pt]
-
-\usemodule
- [abr-02]
-
-\setuppapersize
- [S6][S6]
-
-\setuplayout
- [topspace=0cm,
- backspace=0cm,
- header=0pt,
- footer=0pt,
- width=middle,
- height=middle]
-
-\setupinteractionscreen
- [option=max]
-
-%D In order to prevent loops due to random placement, we
-%D keep the random seed reasonable constant.
-
-\setupsystem
- [random=big]
-
-\setupcolors
- [state=start]
-
-\definecolor[gray] [s=.4]
-\definecolor[lightgray][s=.9]
-
-\definecolor[red] [r=.4] \definecolor[cyan] [g=.4,b=.4]
-\definecolor[green][g=.4] \definecolor[magenta][r=.4,b=.4]
-\definecolor[blue] [b=.4] \definecolor[yellow] [r=.4,g=.4]
-
-\definecolor[PageColor][gray]
-\definecolor[TextColor][lightgray]
-\definecolor[LineColor][yellow]
-
-\definecolor[linecolor 1][red] \definecolor[linecolor 5][cyan]
-\definecolor[linecolor 2][green] \definecolor[linecolor 6][magenta]
-\definecolor[linecolor 3][blue] \definecolor[linecolor 4][yellow]
-
-\setupinteraction
- [state=start,
- display=new,
- color=LineColor,
- contrastcolor=LineColor]
-
-\startuseMPgraphic{shape}
- path p ; color c, w ; numeric width, height ;
- c := \MPcolor{LineColor} ; w := \MPcolor{TextColor} ;
- width := \overlaywidth ; height := \overlayheight ;
- pickup pencircle scaled .5cm ;
- p := unitcircle
- xscaled \MPw{\Idea} yscaled \MPh{\Idea}
- shifted \MPxy{\Idea} ;
- for z = (0,.5height), (width,.5height), (.5width,0), (.5width,height),
- (0,0), (width,height), (0,height), (width,0) :
- draw center p -- z withcolor c ;
- endfor ;
- fill p withcolor w ;
- draw p withcolor c ;
- p := unitcircle
- xscaled \MPw{\Page} yscaled \MPh{\Page}
- shifted \MPxy{\Page} ;
- pickup pencircle scaled .25cm ;
- fill p withcolor w ;
- draw p withcolor c ;
- draw unitsquare xscaled width yscaled height withcolor c ;
-\stopuseMPgraphic
-
-\defineoverlay [shape] [\useMPgraphic{shape}]
-\defineoverlay [nextpage] [\overlaybutton{nextpage}]
-\defineoverlay [previouspage] [\overlaybutton{previouspage}]
-\defineoverlay [content] [\overlaybutton{content}]
-\defineoverlay [forward] [\overlaybutton{forward}]
-
-\setupbackgrounds
- [page]
- [background={color,previouspage,shape},
- backgroundcolor=PageColor]
-
-\def\StartIdea%
- {\xdef\Idea{idea:\realfolio}
- \xdef\Page{page:\realfolio}
- \startstandardmakeup
- \dontcomplain
- \vbox to \makeupheight \bgroup
- \getrandomdimen\scratchdimen{75pt}{600pt}\vskip 0pt plus \scratchdimen
- \hbox to \makeupwidth \bgroup
- \getrandomdimen\scratchdimen{75pt}{600pt}\hskip 0pt plus \scratchdimen
- \hpos{idea:\realfolio} \bgroup
- \framed
- [width=.6\hsize,height=fit,offset=2cm,align=middle,
- frame=off,strut=no,background=forward]
- \bgroup
- \setupwhitespace[big]}
-
-\def\StopIdea%
- {\egroup
- \egroup
- \getrandomdimen\scratchdimen{75pt}{600pt}\hskip 0pt plus \scratchdimen
- \egroup
- \getrandomdimen\scratchdimen{75pt}{600pt}\vskip 0pt plus \scratchdimen
- \egroup
- \ifx\CurrentTopic\empty \else
- \vskip-\makeupheight
- \vbox to \makeupheight
- {\vfill
- \ifx\CurrentListTopic\empty\else
- \writetolist[Topic]{}{\CurrentListTopic}
- \fi
- \hbox to \makeupwidth
- {\hfill
- \hpos{page:\realfolio}
- {\framed
- [offset=.5cm,frame=off,background=content]
- {\bf\ignorespaces\CurrentTopic\unskip}}%
- \hskip.5cm}
- \vskip.5cm}
- \fi
- \stopstandardmakeup
- \let\CurrentListTopic\empty}
-
-\definelist
- [Topic]
-
-\setuplist
- [Topic]
- [alternative=f,
- expansion=command]
-
-\let\CurrentTopic\empty
-\let\CurrentListTopic\empty
-
-\long\def\StartTopic#1\StopTopic
- {\long\def\CurrentTopic{#1}
- \let\CurrentListTopic\CurrentTopic}
-
-\def\Topic#1%
- {\StartTopic#1\StopTopic}
-
-\def\Topics#1%
- {\StartIdeas
- \def\CurrentTopic{#1}
- \StartIdea
- \pagereference[content]
- \placelist[Topic][criterium=all]
- \StopIdea
- \StopIdeas}
-
-\newcounter\CurrentIdeas
-
-\def\StartIdeas%
- {\ifnum\CurrentIdeas=6 \doglobal\newcounter\CurrentIdeas \fi
- \doglobal\increment\CurrentIdeas
- \definecolor[LineColor][linecolor \CurrentIdeas]}
-
-\def\StopIdeas%
- {}
-
-\doifnotmode{demo}{\endinput}
-
-%D The (rather silly) demo section.
-
-\starttext
-
-\Topics{This is about \unknown}
-
-\StartIdeas
- \Topic{Some topic}
- \StartIdea An idea \unknown \StopIdea
- \StartIdea \unknown\ and another \StopIdea
-\StopIdeas
-
-\stoptext
-
-
diff --git a/Master/texmf-dist/tex/context/base/s-pre-08.tex b/Master/texmf-dist/tex/context/base/s-pre-08.tex
deleted file mode 100644
index b545bef2386..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-08.tex
+++ /dev/null
@@ -1,271 +0,0 @@
-%D \module
-%D [ file=s-pre-08,
-%D version=1999.09.01,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 8,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D This is one of the 6 styles made for the \NTS\ presentation
-%D at \EUROTEX\ 1999. The idea was to demonstrate a couple of
-%D nasty things that one can do with \PDFTEX, being an example
-%D of an extension. Afterwards it was provded that this could
-%D also be done using traditional \TEX.
-%D
-%D This version is nearly the same as the original, although
-%D since then the \METAPOST\ related macro have become more
-%D smooth. The original used a couple of boxes, skipt and
-%D fills, while this version uses the layer mechanism that
-%D came available in fall 2000. This style is actually more a
-%D demonstration gimmick than a real useful one.
-
-%D You may want to turn on layer tracing:
-%D
-%D \starttyping
-%D \tracelayerstrue
-%D \stoptyping
-
-\setuppapersize
- [S6][S6]
-
-\setupbodyfont
- [pos,10pt]
-
-%D We use the whole page and have no margins.
-
-\setuplayout
- [topspace=0cm,
- backspace=0cm,
- header=0pt,
- footer=0pt,
- width=middle,
- height=middle]
-
-\setupcolors
- [state=start]
-
-\definecolor[TextColor][s=.9]
-\definecolor[PageColor][r=.5,g=.4,b=.3]
-\definecolor[LineColor][r=.7,g=.6,b=.5]
-
-\definecolor[ColorPage][r=.5,g=.6,b=.7]
-\definecolor[ColorLine][r=.3,g=.4,b=.5]
-
-\setupinteraction
- [state=start,
- display=new]
-
-\setupinteractionscreen
- [option=max]
-
-%D The page, sample text and pagenumber will have a background
-%D graphic.
-
-\defineoverlay [page] [\uniqueMPgraphic{page}]
-\defineoverlay [graphic] [\uniqueMPgraphic{graphic}]
-\defineoverlay [number] [\uniqueMPgraphic{number}]
-
-%D Each element will also be a button.
-
-\defineoverlay [nextpage] [\overlaybutton{nextpage}]
-\defineoverlay [previouspage] [\overlaybutton{previouspage}]
-\defineoverlay [forward] [\overlaybutton{forward}]
-
-%D We are going to put all three elements on a layer.
-
-\definelayer [main]
-\defineoverlay [main] [\composedlayer{main}]
-
-%D The page backgrounds are as follows:
-
-\setupbackgrounds
- [page]
- [background={previouspage,page}]
-
-%D We could have put the main layer on the page overlay, but
-%D the next solution makes us independent of the back and top
-%D margins. The \type {idea} layer is for user purposes.
-
-\setupbackgrounds
- [text]
- [background={main,idea}]
-
-%D The page number, sample text and explanation all have
-%D associated framed texts. The two overlays \type {sample}
-%D and \type {text} and there for special (user) purposes.
-
-\defineframedtext
- [PageText]
- [width=fit,offset=.5cm,
- before=,after=,frame=off,background={number,forward}]
-
-\defineframedtext
- [SampleText]
- [width=.6\makeupwidth,height=fit,offset=2cm,align=middle,
- before=,after=,frame=off,background={graphic,sample,nextpage}]
-
-\defineframedtext
- [TextText]
- [width=.6\makeupwidth,height=fit,offset=2cm,align=middle,
- before=,after=,frame=off,background={text,nextpage}]
-
-%D Nothing goes on the page directly, since we use layers. The
-%D \type {\null} command makes sure that at least something is
-%D on the page so that the page is flushed. Here we also take
-%D care of placing the page number.
-
-\def\StartIdea
- {\null \dontcomplain}
-
-\def\StopIdea
- {\setlayer
- [main]
- [x=\makeupwidth,y=.5cm,hoffset=-.5cm,location=lb]
- {\PageText{\pagenumber}}
- \page}
-
-%D Both texts get their position registered.
-
-\def\StartSample
- {\setlayer
- [main]
- [hoffset=.75cm,voffset=.75cm]
- \bgroup \hpos {SampText:\realfolio} \bgroup \startSampleText [none]}
-
-\def\StopSample
- {\stopSampleText \egroup \egroup}
-
-%D Here the position of the sample text and explanationary
-%D text are passed on to the graphic that concerns the latter.
-
-% use setlayertext instead
-
-\def\StartText
- {\setMPpositiongraphic
- {TextText:\realfolio}{text}{other=SampText:\realfolio}
- \setlayer
- [main]
- [x=\makeupwidth,y=\makeupheight,
- hoffset=-.75cm,voffset=-.75cm,
- location=lt]
- \bgroup \noindent \hpos {TextText:\realfolio} \bgroup \startTextText [none]}
-
-\def\StopText
- {\stopTextText \egroup \egroup}
-
-%D The graphics that encircle the two texts are related to
-%D their position. This is because when they overlay, a shine
-%D through is shown. This only shows up when there is enough
-%D text to make them overlap.
-
-\startuniqueMPgraphic{page}
- StartPage ;
- pickup pencircle scaled .5cm ;
- fill Page withcolor \MPcolor{PageColor} ;
- draw Page withcolor \MPcolor{LineColor} ;
- StopPage ;
-\stopuniqueMPgraphic
-
-\startuniqueMPgraphic{number}
- path p ; p := fullcircle xscaled OverlayWidth yscaled OverlayHeight;
- pickup pencircle scaled .25cm ;
- fill p withcolor \MPcolor{TextColor} ;
- draw p withcolor (white-\MPcolor{PageColor}) ;
-\stopuniqueMPgraphic
-
-\startuniqueMPgraphic{graphic}
- path p ; p := fullcircle xscaled OverlayWidth yscaled OverlayHeight;
- pickup pencircle scaled .5cm ;
- fill p withcolor \MPcolor{TextColor} ;
- draw p withcolor \MPcolor{LineColor} ;
-\stopuniqueMPgraphic
-
-%D This graphic is calculated when a position is flushed that
-%D has this graphics as attached. The \type {self} reference
-%D is provided by \CONTEXT\ itself.
-
-\startMPpositiongraphic{text}
- initialize_box(\MPpos{\MPvar{other}}) ;
- path p ; p := fullcircle xscaled wxy yscaled hxy shifted cxy ;
- initialize_box(\MPpos{\MPvar{self}}) ;
- path q ; q := fullcircle xscaled wxy yscaled hxy shifted cxy ;
- pickup pencircle scaled .5cm ;
- fill q withcolor \MPcolor{TextColor} ;
- draw p withcolor (white-\MPcolor{PageColor}) ;
- clip currentpicture to q ;
- draw q withcolor \MPcolor{LineColor} ;
- anchor_box(\MPanchor{\MPvar{self}}) ;
-\stopMPpositiongraphic
-
-%D In order to be complete, we also define a title page.
-%D Here suddenly the text background shows up.
-
-\def\StartTitlePage
- {\startstandardmakeup
- \dontcomplain
- \setupframedtexts[TextText][width=fit]
- \StartText
- \bfd\setupinterlinespace
- \def\\{\blank\bfc\setupinterlinespace\def\\{\blank}}}
-
-\def\StopTitlePage
- {\StopText
- \stopstandardmakeup}
-
-\def\TitlePage#1%
- {\StartTitlePage#1\StopTitlePage}
-
-%D For this purpose, we redefine the position graphic to
-%D handle a text only case:
-
-\startMPpositiongraphic{text}
- if box_found(\MPpos{\MPvar{other}}) :
- initialize_box(\MPpos{\MPvar{other}}) ;
- path p ; p := fullcircle xscaled wxy yscaled hxy shifted cxy ;
- fi ;
- initialize_box(\MPpos{\MPvar{self}}) ;
- path q ; q := fullcircle xscaled wxy yscaled hxy shifted cxy ;
- pickup pencircle scaled .5cm ;
- fill q withcolor \MPcolor{TextColor} ;
- if box_found(\MPpos{\MPvar{other}}) :
- draw p withcolor (white-\MPcolor{PageColor}) ;
- clip currentpicture to q ;
- draw q withcolor \MPcolor{LineColor} ;
- else :
- draw q withcolor (white-\MPcolor{PageColor}) ;
- fi ;
- anchor_box(\MPanchor{\MPvar{self}}) ;
-% setbounds currentpicture to boundingbox origin ;
-\stopMPpositiongraphic
-
-\doifnotmode{demo}{\endinput}
-
-\starttext
-
-\TitlePage
- {Fancy Styles:\\layers}
-
-\StartIdea
- \StartSample
- \input tufte
- \StopSample
- \StartText
- \input reich
- \StopText
-\StopIdea
-
-\StartIdea
- \StartSample
- \input knuth
- \StopSample
- \StartText
- \input reich
- \StopText
-\StopIdea
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-09.tex b/Master/texmf-dist/tex/context/base/s-pre-09.tex
deleted file mode 100644
index a20b9f31acd..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-09.tex
+++ /dev/null
@@ -1,380 +0,0 @@
-%D \module
-%D [ file=s-pre-09,
-%D version=unknown,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 9,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 I made this style when I had to give a presentation on
-%D the \MAPS\ bibliography production for several user group
-%D meetings. This style is rather tuned for combinations of
-%D examples and explanations. The colors match the \MAPS\
-%D bibliography colors.
-
-\startmode[asintended] \setupbodyfont[lbr] \stopmode
-
-\setupbodyfont[14.4pt]
-
-%D A couple of years later, in 2001 this style was documented
-%D and made public. While documenting, I also changed box
-%D building on top of overlays into the now available layer
-%D positioning. So, this styles demonstrates quite some
-%D tricks.
-
-\setuppapersize
- [S6][S6]
-
-\setuplayout
- [topspace=0cm,
- backspace=0cm,
- header=0pt,
- footer=0pt,
- width=middle,
- height=middle]
-
-%D Local environments can be set by using the setups commands.
-%D For downward compatibility, we keep supporting the \type
-%D {\...Settings} hooks. Using local environments is seldom
-%D needed.
-
-\let\TextSettings \empty
-\let\SampleSettings\empty
-
-\startsetups [text] \TextSettings \stopsetups
-\startsetups [sample] \SampleSettings \stopsetups
-
-%D The dimensions are kind of fixed.
-
-\def\FrameWidth {448pt}
-\def\FrameHeight {348pt}
-\def\FrameOffset {24pt}
-\def\FrameSkip {12pt}
-
-%D But they {\em can} and {\em will} be changed.
-
-\def\FrameWidth {408pt}
-\def\FrameHeight {318pt}
-
-%D The funny values come from the $3:4$ display aspect
-%D ratio.
-
-\setupcolors
- [state=start]
-
-\definecolor[PageColor] [s=.40]
-\definecolor[TextColor] [s=.90]
-\definecolor[InteractionColor][r=.40]
-\definecolor[LineColor] [r=.60,g=.60]
-
-%D Of course we go interactive and since we will probably
-%D open other documents, we make sure that the viewer opens a
-%D new window.
-
-\setupinteraction
- [color=InteractionColor,
- contrastcolor=LineColor,
- display=new,
- state=start]
-
-\setupinteractionscreen
- [option=max]
-
-%D Before we come to the real macros, we do a little bit of
-%D tuning.
-
-\setupitemize
- [1][packed]
-
-\setuptyping
- [blank=medium]
-
-%D Apart from the titlepage, the page gets a simple colored
-%D background. Later we will activate the background.
-
-\setupbackgrounds
- [page]
- [backgroundcolor=PageColor]
-
-%D Everything gets frames by a nice \METAPOST\ frame.
-
-\defineoverlay [background] [\uniqueMPgraphic{background}]
-
-\startuniqueMPgraphic{background}
- path p ; color c, w, d ;
- c := \MPcolor{PageColor} ;
- w := \MPcolor{TextColor} ;
- d := \MPcolor{LineColor} ;
- p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
- pickup pencircle scaled (1.5*\FrameSkip) ;
- draw p withcolor c ;
- pickup pencircle scaled \FrameSkip ;
- fill p withcolor w ;
- draw p withcolor d ;
-\stopuniqueMPgraphic
-
-%D We will present samples and explanation pair||wise, so
-%D we need a hyperlink that skips a page.
-
-\defineoverlay [nextpage] [\overlaybutton{nextpage}]
-\defineoverlay [previouspage] [\overlaybutton{previouspage}]
-\defineoverlay [skippage] [\overlaybutton{page(+2)}]
-
-%D Layers are normally used to position multiple content on
-%D a specific overlay. Here we will use them to position
-%D only and since the samples and text will swap place, we
-%D will use quite a few layers.
-
-\defineoverlay [text] [\composedlayer{text}]
-\defineoverlay [sample] [\composedlayer{sample}]
-\defineoverlay [common] [\composedlayer{common}]
-
-%D There are three positions. When combined, the sample and
-%D text windows overlap, otherwise the lone window is
-%D centered. We could have used one layer and reversed the
-%D order by setting the \type {direction} parameter, but
-%D this approach is more readable.
-
-\definelayer
- [text]
- [x=\makeupwidth,y=\makeupheight,location=lt,
- hoffset=-\FrameSkip,voffset=-\FrameSkip]
-
-\definelayer
- [sample]
- [hoffset=\FrameSkip,voffset=\FrameSkip]
-
-\definelayer
- [common]
- [x=.5\makeupwidth,y=.5\makeupheight,location=c]
-
-%D The topic is put in the lower right corner of the text
-%D window.
-
-\defineoverlay [topic] [\composedlayer{topic}]
-
-\definelayer
- [topic]
- [x=\FrameWidth,y=\FrameHeight,location=lt,
- hoffset=-\FrameOffset,voffset=-\FrameSkip]
-
-%D The topic is put in a framed box. That way we can make
-%D sure that it gets a background, which looks better when
-%D it covers something else. Otherwise we could have stuct
-%D to:
-%D
-%D \starttyping
-%D \def\Topic#1%
-%D {\setlayer[topic]{\color[PageColor]{\bfb\setstrut#1}}}
-%D \stoptyping
-%D
-%D But, we go for the nice alternative:
-
-\def\Topic#1%
- {\doifsomething{#1}
- {\setlayer [topic]
- {\bfb\setstrut
- \inframed
- [frame=off,foregroundcolor=PageColor,offset=0pt,
- background=color,backgroundcolor=TextColor]
- {#1}}}}
-
-%D The sample as well as the explanation will be collected in
-%D a buffer. That way we can reuse the content. We could
-%D have used a box instead, but can we be sure that the content
-%D is not adapting itself? So, buffers we use.
-
-\resetbuffer[sample]
-\resetbuffer[text]
-
-%D Both the sample and explanation are kind of windowed.
-
-\defineframedtext
- [SampleText]
- [width=\FrameWidth,height=\FrameHeight,offset=\FrameOffset,
- frame=off,align=normal,strut=no,before=,after=,
- background={background,nextpage}]
-
-%D We safe some keying in by combining things in one macro.
-
-\def\DoSampleText#1#2#3% kind layer overlays
- {\setupframedtexts[SampleText][background={background,#3}]
- \setlayer[#2]
- {\startSampleText[none]
- \setups[#1]
- \getbuffer[#1]
- \stopSampleText}}
-
-\def\StartSample{\dostartbuffer[sample][StartSample][StopSample]}
-\def\StartText {\dostartbuffer[text] [StartText] [StopText]}
-
-%D The following definitions apply at the outer level.
-
-\def\StopSample
- {\startstandardmakeup
- \DoSampleText{sample}{common}{nextpage}
- \stopstandardmakeup
- \resetbuffer[sample]}
-
-\def\StopText
- {\startstandardmakeup
- \DoSampleText{text}{common}{topic,nextpage}
- \stopstandardmakeup
- \resetbuffer[text]}
-
-\setupbackgrounds[page][background={color,nextpage}]
-\setupbackgrounds[text][background=common]
-
-%D When we combine sample and text, we get slightly
-%D different definitions. As you can see we generate two
-%D pages. Watch how we manipulate the order of the
-%D overlays and teh nature of the buttons. Here data
-%D abstraction really pays off.
-
-\def\StartIdea
- {\bgroup
- \let\StopSample\relax
- \let\StopText \relax}
-
-\def\StopIdea%
- {\setupbackgrounds[page][background={color,skippage}]
- \setupbackgrounds[text][background={text,sample}]
- \startstandardmakeup
- \DoSampleText{sample}{sample}{previouspage}
- \DoSampleText{text} {text} {topic,nextpage}
- \stopstandardmakeup
- \setupbackgrounds[page][background={color,nextpage}]
- \setupbackgrounds[text][background={sample,text}]
- \startstandardmakeup
- \DoSampleText{sample}{sample}{previouspage}
- \DoSampleText{text} {text} {topic,nextpage}
- \stopstandardmakeup
- \egroup}
-
-%D The rest of the definitions takes care of the title page.
-%D Please don't steal this one for your own documents.
-
-\defineoverlay[joke] [\useMPgraphic{joke}{n=0}] % not to be changed!
-
-\startuseMPgraphic{joke}{n}
- StartPage ;
- path p, q ; numeric w ; pair xy ;
- set_grid(OverlayWidth,OverlayHeight,OverlayWidth/8,OverlayHeight/8) ;
- if \MPvar{n}=1 :
- p := fulldiamond ; fill Page withcolor \MPcolor{TextColor} ;
- else :
- p := fullsquare ; fill Page withcolor \MPcolor{PageColor} ;
- fi ;
- forever :
- xy := center Page randomized (OverlayWidth,OverlayHeight) ;
- if new_on_grid(xpart xy, ypart xy) :
- q := (p xyscaled (OverlayWidth/5,OverlayHeight/5))
- randomized (\FrameSkip,\FrameSkip)
- shifted xy ;
- w := (\FrameSkip) randomized (\FrameSkip/2) ;
- draw q withcolor \MPcolor{PageColor} withpen pencircle scaled (1.5w) ;
- fill q withcolor \MPcolor{TextColor} ;
- draw q withcolor \MPcolor{LineColor} withpen pencircle scaled ( w) ;
- fi ;
- exitif grid_full ;
- endfor ;
- StopPage ;
-\stopuseMPgraphic
-
-\defineoverlay[fuzzy][\useMPgraphic{fuzzy}]
-
-\startuseMPgraphic{fuzzy}
- path p ; numeric w ;
- p := (fullsquare xyscaled (OverlayWidth,OverlayHeight))
- randomized (\FrameSkip,\FrameSkip) ;
- w := (\FrameSkip) randomized (\FrameSkip/2) ;
- draw p withcolor \MPcolor{PageColor} withpen pencircle scaled (1.5w) ;
- fill p withcolor \MPcolor{TextColor} ;
- draw p withcolor \MPcolor{LineColor} withpen pencircle scaled ( w) ;
-\stopuseMPgraphic
-
-%D This time we use a fit window, but with a slightly randomized
-%D frame, our trademark so to say.
-
-\def\StartTitlePage
- {\bgroup
- \setupbackgrounds[page][background={joke,nextpage}]
- \startstandardmakeup
- \switchtobodyfont[big]
- \setupframedtexts
- [SampleText]
- [background=fuzzy,
- foregroundcolor=PageColor,
- width=fit,
- height=fit,
- align=middle]
- \startSampleText[middle]
- \bfd\setupinterlinespace
- \def\\{\bfb\setupinterlinespace\vfil\def\\{\vfil}}}
-
-\def\StopTitlePage
- {\stopSampleText
- \stopstandardmakeup
- \egroup}
-
-\def\TitlePage#1%
- {\StartTitlePage#1\StopTitlePage}
-
-%D Let's nill some error prone presentation macros.
-
-\let\Subject \Topic
-\let\Topics \gobbleoneargument
-\let\Subjects \relax
-
-%D We will avoid \quote {overfull} messages.
-
-\dontcomplain
-
-\doifnotmode{demo}{\endinput}
-
-%D The (rather silly) demo section.
-
-\starttext
-
-\setupbodyfont[12pt]
-
-\TitlePage{Quotes, Quotes\\and more quotes}
-
-\StartIdea
- \StartSample
- \input knuth \par
- \StopSample
- \StartText
- \Topic{Tufte}
- \input tufte \par
- \StopText
- \StopIdea
-
-\StartIdea
- \StartSample
- \input materie \par
- \StopSample
- \StartText
- \input reich \par
- \StopText
-\StopIdea
-
-\StartText
- \input tufte \par
-\StopText
-
-\StartIdea
- \StartSample
- \input knuth \par
- \StopSample
- \StartText
- \input tufte \par
- \StopText
-\StopIdea
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-10.tex b/Master/texmf-dist/tex/context/base/s-pre-10.tex
deleted file mode 100644
index a92e5af01c5..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-10.tex
+++ /dev/null
@@ -1,308 +0,0 @@
-%D \module
-%D [ file=s-pre-10,
-%D version=unknown,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 10,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 style is derived from the ninth style, which was
-%D used first at \EUROTEX\ 99 and later at \TUG\ 2000. This
-%D alternative build up a page.
-
-\startmode [demo]
- \disablemode[demo] \usemodule[pre-09] \enablemode[demo]
-\stopmode
-
-\startnotmode [demo]
- \usemodule[pre-09]
-\stopnotmode
-
-%D We use blue colors instead of yellow ones. Since we have
-%D used symbolic names, we can easily overload the existing
-%D scheme.
-
-\definecolor[LineColor][r=.40,g=.40,b=1.00]
-
-%D Here we don't use fixed dimensions, but fit the sample
-%D windows and derive the text windows's width from this one.
-
-\setupframedtexts
- [SampleText]
- [width=fit,height=fit,
- background={background,nextpage}]
-
-%D The topic goes to the top right corner of the screen which
-%D means that it is positioned left down to the reference
-%D point. Watch how we make data on this layer (here only
-%D the topic but it can be more) persistent.
-
-\setuplayer
- [topic]
- [y=0pt,x=\makeupwidth,location=lb,state=repeat,
- hoffset=-\FrameSkip,voffset=\FrameSkip]
-
-%D Clicking on the page brings us back.
-
-\setupbackgrounds
- [page]
- [background={previouspage,color,topic}]
-
-%D All layers end up on the text area. This could have been
-%D the page area too since these have the same dimensions.
-
-\setupbackgrounds
- [text]
- [background={common,sample,text}]
-
-%D Because we build up the text window step by step, we will
-%D separate the entries by white space.
-
-\startsetups [always]
- \setupwhitespace[big]
- \setupblank[big]
-\stopsetups
-
-%D The \type {\Topic} commands can be simplified to:
-
-\def\Topic#1%
- {\resetlayer[topic]
- \setlayer[topic]{\bfb\setstrut\color[TextColor]{#1}}}
-
-%D We also provide a way to erase the topic.
-
-\def\NoTopic
- {\resetlayer[topic]}
-
-%D We have to redefine the structuring commands to support
-%D the resetting of buffer counters.
-
-\newcounter\TextN
-
-\def\StartSample
- {\doglobal\newcounter\TextN
- \dostartbuffer[sample][StartSample][StopSample]}
-
-\def\StartText
- {\doglobal\newcounter\TextN
- \dostartbuffer[text][StartText][StopText]}
-
-\def\StartSubText
- {\doglobal\increment\TextN
- \dostartbuffer[text-\TextN][StartSubText][StopSubText]}
-
-\def\StopText
- {\startstandardmakeup
- \DoSampleText{text}{common}{nextpage}
- \stopstandardmakeup}
-
-\def\StopSubText
- {\startstandardmakeup
- \DoSampleText{text}{common}{nextpage}
- \stopstandardmakeup}
-
-%D The \type {\DoSampleText} command is adapted to support
-%D addition of subtexts (each subtext goes into its own
-%D buffer).
-
-\def\DoSampleText#1#2#3%
- {\setupframedtexts[SampleText][background={background,#3}]
- \bgroup
- \setups[#1]%
- \setups[always]%
- \setbox\nextbox=\hbox
- {\startSampleText[none]
- \getbuffer[#1]\par
- \doif{#1}{text}
- {\dorecurse{\TextN}{\getbuffer[text-\recurselevel]\par}}
- \stopSampleText}
- \xdef\SampleTextWidth{\the\wd\nextbox}
- \setlayer[#2]{\box\nextbox}%
- \egroup}
-
-%D Since we are no longer swapping windows, we end up with a
-%D much simplier \type {\Stopidea} macro. We don't reset
-%D samples at the inner level.
-
-\def\StartIdea%
- {\bgroup
- \let\StopSample \relax
- \let\StopText \relax
- \let\StopSubText\relax
- \def\StartSample{\dostartbuffer[sample][StartSample][StopSample]}}
-
-\def\StopIdea%
- {\startstandardmakeup
- \DoSampleText{sample}{sample}{nextpage}
- \SetTextWidth
- \DoSampleText{text} {text} {nextpage}
- \stopstandardmakeup
- \egroup}
-
-%D Here we determine the width of the text window. It is
-%D derived from the width of the sample and stays the same
-%D within a sequence.
-
-\def\SetTextWidth
- {\ifnum\TextN<1 % yes or no, may change
- \scratchdimen=\makeupwidth
- \advance\scratchdimen by -\SampleTextWidth
- \advance\scratchdimen by \FrameSkip
- \xdef\SampleWidth{\the\scratchdimen}%
- \fi
- \setupframedtexts
- [SampleText]
- [width=\SampleWidth]}
-
-%D We use the (already implemented) second alternative of
-%D the titlepage graphic. Please don't change this.
-
-\defineoverlay[joke] [\useMPgraphic{joke}{n=1}] % not to be changed !
-
-\doifnotmode{demo}{\endinput}
-
-%D The demo section. The original presentation uses proper
-%D graphics and has better spacing.
-
-\def\SomeSymbol#1#2{\definedfont[ContextNavigation at #1]\char#2}
-
-\setupcombinations[distance=\FrameOffset,inbetween=\vskip\FrameOffset]
-
-\starttext
-
-\TitlePage{Some Famous Symbols}
-
-\Topic{Symbols}
-
-\StartSample
- \startcombination[2*2]
- {\SomeSymbol{5cm}{1}} {}
- {\SomeSymbol{5cm}{3}} {}
- {\SomeSymbol{5cm}{2}} {}
- {\SomeSymbol{5cm}{4}} {}
- \stopcombination
-\StopSample
-
-\Topic{Previous}
-
-\StartIdea
- \StartSample
- \SomeSymbol{7cm}{1}
- \StopSample
- \StartText
- This symbol can be used to indicate a hyperlink to a
- previous page.
- \StopText
-\StopIdea
-
-\StartIdea
- \StartSubText
- As one can expect there is also a symbol for going to
- the next page.
- \StopSubText
-\StopIdea
-
-\Topic{Previous}
-
-\StartIdea
- \StartSample
- \SomeSymbol{9cm}{2}
- \StopSample
- \StartText
- This symbol is actually just a mirrored version of the
- first symbol we showed.
- \StopText
-\StopIdea
-
-\NoTopic
-
-\StartText
- Is this nice or not?
-\StopText
-
-\Topic{First and Last}
-
-\StartSample
- \SomeSymbol{11cm}{3}
-\StopSample
-
-\StartSample
- \SomeSymbol{11cm}{4}
-\StopSample
-
-\StartIdea
- \StartSample
- \SomeSymbol{5cm}{3}
- \StopSample
- \StartText
- A few screens back, we saw this symbol.
- \StopText
-\StopIdea
-
-\StartIdea
- \StartSubText
- This symbol represents the beginning of something.
- \StopSubText
-\StopIdea
-
-\StartIdea
- \StartSample
- \SomeSymbol{5cm}{4}
- \StopSample
- \StartSubText
- Just like this one represents an end.
- \StopSubText
-\StopIdea
-
-\StartIdea
- \StartSubText
- They look just like the symbols found on audio and
- video players.
- \StopSubText
-\StopIdea
-
-\Topic{Summary}
-
-\StartIdea
- \StartSample
- \SomeSymbol{6cm}{1}
- \StopSample
- \StartText
- So we have a symbol for previous \unknown
- \StopText
-\StopIdea
-
-\StartIdea
- \StartSample
- \SomeSymbol{6cm}{2}
- \StopSample
- \StartSubText
- \unknown\ and one for next \unknown
- \StopSubText
-\StopIdea
-
-\StartIdea
- \StartSample
- \SomeSymbol{6cm}{3}
- \StopSample
- \StartSubText
- \unknown\ and yet another for first \unknown
- \StopSubText
-\StopIdea
-
-\StartIdea
- \StartSample
- \SomeSymbol{6cm}{4}
- \StopSample
- \StartSubText
- \unknown\ and of course for last.
- \StopSubText
-\StopIdea
-
-\stoptext
-
diff --git a/Master/texmf-dist/tex/context/base/s-pre-11.tex b/Master/texmf-dist/tex/context/base/s-pre-11.tex
deleted file mode 100644
index 551c5ebbcce..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-11.tex
+++ /dev/null
@@ -1,220 +0,0 @@
-%D \module
-%D [ file=s-pre-11,
-%D version=1999.08.20,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 11,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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]
-
-\setuplayout
- [topspace=0cm,
- backspace=0cm,
- header=0pt,
- footer=0pt,
- width=middle,
- height=middle]
-
-\setupbodyfont
- [14.4pt,lbr]
-
-\setupcolors
- [state=start]
-
-\setupinteraction
- [click=no,
- display=new,
- state=start]
-
-\setupinteractionscreen
- [option=max]
-
-\def\SomeShape%
- {\resetMPdrawing
- \startMPdrawing
- path p[], q[] ; pair a, b ;
- StartPage ;
- \stopMPdrawing
- \dorecurse{\CurrentTopic}
- {\startMPdrawing
- initialize_box(\MPpos{topic-\realfolio-\recurselevel}) ;
- p[\recurselevel] := tensecircle (wxy,hxy,.25cm) shifted cxy ;
- fill p[\recurselevel] withcolor .9white ;
- pickup pencircle scaled .25cm ;
- \ifnum\recurselevel=\CurrentTopic\space
- draw p[\recurselevel] withcolor \MPcolor{ShowColor} ;
- \else
- draw p[\recurselevel] withcolor \MPcolor{DoneColor} ;
- \fi
- \stopMPdrawing}%
- \dorecurse{\CurrentMaxItem}
- {\startMPdrawing
- initialize_box(\MPpos{item-\realfolio-\recurselevel}) ;
- linewidth := .25cm ;
- q[\recurselevel] := tensecircle (wxy,hxy,linewidth) shifted cxy ;
- fill q[\recurselevel] withcolor .9white ;
- pickup pencircle scaled linewidth ;
- \ifnum\recurselevel=\CurrentMaxItem\space
- draw q[\recurselevel] withcolor \MPcolor{ShowColor} ;
- \else
- draw q[\recurselevel] withcolor \MPcolor{DoneColor} ;
- \fi
- \stopMPdrawing}%
- \dostepwiserecurse{2}{\CurrentTopic}{1}
- {\startMPdrawing
- draw
- rt point 3 of p[\recurselevel-1] --
- lft point 7 of p[\recurselevel]
- withcolor \MPcolor{ArrowColor} ;
- \stopMPdrawing}%
- \dostepwiserecurse{2}{\CurrentMaxItem}{1}
- {\startMPdrawing
- draw
- bot point 9 of q[\recurselevel-1] --
- top point 5 of q[\recurselevel]
- withcolor \MPcolor{ArrowColor} ;
- \stopMPdrawing}%
- \startMPdrawing
- draw Page
- withpen pencircle scaled .5cm
- withcolor \MPcolor{EdgeColor} ;
- StopPage ;
- \stopMPdrawing
- \MPdrawingdonetrue
- \getMPdrawing}
-
-\def\TitlePage#1%
- {\startstandardmakeup
- \setupalign[middle]
- \def\\{\vfil\bfb\setupinterlinespace}
- \bfd\setupinterlinespace
- \vfil#1\vfil\vfil
- \stopstandardmakeup}
-
-\definecolor[PageColor][r=.5,g=.4,b=.3]
-\definecolor[LineColor][r=.7,g=.6,b=.5]
-
-\definecolor[PageColor] [s=.60]
-\definecolor[ShowColor] [r=.40]
-\definecolor[EdgeColor] [g=.40]
-\definecolor[DoneColor] [r=.40,g=.40]
-\definecolor[ArrowColor] [b=.40]
-\definecolor[LineColor] [r=.60,g=.60]
-\definecolor[GotoColor] [ArrowColor]
-
-\setupinteraction[color=GotoColor,contrastcolor=GotoColor]
-
-\defineoverlay [shape] [\SomeShape]
-\defineoverlay [next] [\overlaybutton{forward}] % [{nextpage}]
-
-\setupbackgrounds
- [page]
- [background={color,next,shape},
- backgroundcolor=PageColor]
-
-\doglobal\newcounter\CurrentMaxItem
-\doglobal\newcounter\CurrentItem
-\doglobal\newcounter\CurrentTopic
-
-\def\StartIdea%
- {\doglobal\newcounter\CurrentItem}
-
-\def\StartTopic%
- {\doglobal\increment\CurrentTopic
- \dostartbuffer[topic-\CurrentTopic][StartTopic][StopTopic]}
-
-\def\StopIdea%
- {\dorecurse{\CurrentItem}
- {\let\CurrentMaxItem\recurselevel
- \doStopIdea}}
-
-\def\doStopIdea%
- {\startstandardmakeup
- \dontcomplain
- \vskip.875cm
- \hbox to \makeupwidth
- {\hfill
- \dorecurse{\CurrentTopic}
- {\edef\Topic{topic-\realfolio-\recurselevel}%
- \hpos
- {\Topic}
- {\framed
- [frame=off,align=middle,offset=.25cm]
- {\getbuffer[topic-\recurselevel]}}%
- \ifnum\recurselevel<\CurrentTopic
- \hskip.875cm
- \fi}%
- \hfill}
- \vskip.875cm
- \vfilll
- \dorecurse{\CurrentMaxItem}
- {\edef\Item{item-\realfolio-\recurselevel}
- \hbox to \makeupwidth
- {\hfill
- \hpos
- {\Item}
- {\framed
- [width=.75\makeupwidth,
- frame=off,
- align=middle,offset=.125cm]
- {\getbuffer[item-\recurselevel]}}%
- \hfill}
- \vskip.875cm}
- \vfilll
- \stopstandardmakeup}
-
-\def\StartItem%
- {\doglobal\increment\CurrentItem
- \dostartbuffer[item-\CurrentItem][StartItem][StopItem]}
-
-\lefthyphenmin =\maxdimen
-\righthyphenmin=\maxdimen
-
-\doifnotmode{demo}{\endinput}
-
-\starttext
-
-\StartIdea
- \StartTopic
- A Nice Idea
- \StopTopic
- \StartItem
- \input reich \relax
- \StopItem
- \StartItem
- \input reich \relax
- \StopItem
- \StartItem
- \input reich \relax
- \StopItem
-\StopIdea
-
-\StartIdea
- \StartTopic
- One More Nice Idea
- \StopTopic
- \StartItem
- \input reich \relax
- \StopItem
- \StartItem
- \input reich \relax
- \StopItem
-\StopIdea
-
-\StartIdea
- \StartTopic
- The Last Idea
- \StopTopic
- \StartItem
- \input tufte \relax
- \StopItem
-\StopIdea
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-12.tex b/Master/texmf-dist/tex/context/base/s-pre-12.tex
deleted file mode 100644
index 23418fbba34..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-12.tex
+++ /dev/null
@@ -1,226 +0,0 @@
-%D \module
-%D [ file=s-pre-12,
-%D version=1999.08.20,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 12,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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]
-
-\setuplayout
- [topspace=0cm,
- backspace=0cm,
- header=0pt,
- footer=0pt,
- width=middle,
- height=middle]
-
-\setupbodyfont
- [14.4pt,lbr]
-
-\setupcolors
- [state=start]
-
-\setupinteraction
- [click=no,
- display=new,
- state=start]
-
-\setupinteractionscreen
- [option=max]
-
-\def\SomeShape%
- {\resetMPdrawing
- \startMPdrawing
- path p ; pair a, b ;
- ahlength := .375cm ;
- StartPage ;
- draw Page %unitsquare
- %xscaled PaperWidth yscaled PaperHeight
- withpen pencircle scaled .5cm
- withcolor \MPcolor{EdgeColor} ;
- \stopMPdrawing
- \dorecurse{\CurrentTopic}
- {\startMPdrawing
- initialize_box(\MPpos{topic-\realfolio-\recurselevel}) ;
- p := tensecircle (wxy,hxy,.25cm) shifted cxy ;
- fill p withcolor .9white ;
- pickup pencircle scaled .25cm ;
- \ifnum\recurselevel=\CurrentTopic
- draw p withcolor \MPcolor{ShowColor} ;
- a := bot point 7 of p ;
- \else
- draw p withcolor \MPcolor{DoneColor} ;
- \fi
- \stopMPdrawing}
- \dorecurse{\CurrentMaxItem}
- {\startMPdrawing
- initialize_box(\MPpos{item-\realfolio-\recurselevel}) ;
- linewidth := .25cm ;
- p := tensecircle (wxy,hxy,linewidth) shifted cxy ;
- fill p withcolor .9white ;
- pickup pencircle scaled linewidth ;
- b := rt point 3 of p ;
- \ifnum\recurselevel=\CurrentMaxItem
- draw p withcolor \MPcolor{ShowColor} ;
- \else
- draw p withcolor \MPcolor{DoneColor} ;
- \fi
- dxab := xpart a-xpart b ;
- dyab := ypart a-ypart b ;
- sign := if dyab>0 : - fi 1 ;
- drawarrow
- a --
- a shifted (+2linewidth-dxab/2,0) {left} ..
- if abs(dyab)>4linewidth :
- a shifted (-dxab/2,+sign*2linewidth) --
- b shifted (+dxab/2,-sign*2linewidth) ..
- fi
- {left} b shifted (-2linewidth+dxab/2,0) --
- b
- withcolor \MPcolor{ArrowColor} ;
- \stopMPdrawing}%
- \startMPdrawing
- StopPage ;
- \stopMPdrawing
- \MPdrawingdonetrue
- \getMPdrawing}
-
-\definecolor[PageColor][r=.5,g=.4,b=.3]
-\definecolor[LineColor][r=.7,g=.6,b=.5]
-
-\definecolor[PageColor] [s=.60]
-\definecolor[ShowColor] [r=.40]
-\definecolor[EdgeColor] [g=.40]
-\definecolor[DoneColor] [r=.40,g=.40]
-\definecolor[ArrowColor] [b=.40]
-\definecolor[LineColor] [r=.60,g=.60]
-\definecolor[GotoColor] [ArrowColor]
-
-\setupinteraction[color=GotoColor,contrastcolor=GotoColor]
-
-\defineoverlay [shape] [\SomeShape]
-\defineoverlay [next] [\overlaybutton{forward}]
-
-\setupbackgrounds
- [page]
- [background={color,next,shape},
- backgroundcolor=PageColor]
-
-\doglobal\newcounter\CurrentItem
-\doglobal\newcounter\CurrentTopic
-\doglobal\newcounter\CurrentMaxItem
-
-\def\StartIdea%
- {\doglobal\newcounter\CurrentItem}
-
-\def\StartTopic%
- {\doglobal\increment\CurrentTopic
- \dostartbuffer[topic-\CurrentTopic][StartTopic][StopTopic]}
-
-\def\StopIdea%
- {\dorecurse{\CurrentItem}
- {\let\CurrentMaxItem\recurselevel
- \doStopIdea}}
-
-\def\IdeaWidth {.6\makeupwidth} % .5
-\def\TopicWidth{.2\makeupwidth} % .3
-
-\def\doStopIdea%
- {\startstandardmakeup
- \dontcomplain
- \vbox to \makeupheight
- {\vskip.75cm \relax % \vfill
- \dorecurse{\CurrentMaxItem}
- {\edef\Item{item-\realfolio-\recurselevel}
- \hbox to \makeupwidth
- {\hskip.75cm
- \hpos
- {\Item}
- {\framed
- [width=\IdeaWidth,frame=off,
- align=middle,offset=.125cm]
- {\getbuffer[item-\recurselevel]}}}
- \vskip.875cm}
- \vfill}
- \vskip-\makeupheight
- \vbox to \makeupheight
- {\vskip.75cm \relax
- \dorecurse{\CurrentTopic}
- {\edef\Topic{topic-\realfolio-\recurselevel}
- \hbox to \makeupwidth
- {\hfill
- \hpos
- {\Topic}
- {\framed
- [width=\TopicWidth,frame=off,
- align=middle,offset=.25cm]
- {\getbuffer[topic-\recurselevel]}}%
- \hskip.75cm}
- \vskip.875cm}
- \vfill}
- \stopstandardmakeup}
-
-\def\StartItem%
- {\doglobal\increment\CurrentItem
- \dostartbuffer[item-\CurrentItem][StartItem][StopItem]}
-
-\lefthyphenmin =\maxdimen
-\righthyphenmin=\maxdimen
-
-\def\TitlePage#1%
- {\startstandardmakeup
- \setupalign[middle]
- \def\\{\vfil\bfb\setupinterlinespace}
- \bfd\setupinterlinespace
- \vfil#1\vfil\vfil
- \stopstandardmakeup}
-
-\endinput
-
-% \starttext
-%
-% \StartIdea
-% \StartTopic
-% What a topic
-% \StopTopic
-% \StartItem
-% \input reich \relax
-% \StopItem
-% \StartItem
-% \input reich \relax
-% \StopItem
-% \StartItem
-% \input reich \relax
-% \StopItem
-% \StopIdea
-%
-% \StartIdea
-% \StartTopic
-% One More Nice Idea
-% \StopTopic
-% \StartItem
-% \input reich \relax
-% \StopItem
-% \StartItem
-% \input reich \relax
-% \StopItem
-% \StopIdea
-%
-% \StartIdea
-% \StartTopic
-% The Last Idea
-% \StopTopic
-% \StartItem
-% \input tufte \relax
-% \StopItem
-% \StopIdea
-%
-% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-13.tex b/Master/texmf-dist/tex/context/base/s-pre-13.tex
deleted file mode 100644
index 7b4daa4b31f..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-13.tex
+++ /dev/null
@@ -1,302 +0,0 @@
-%D \module
-%D [ file=s-pre-13,
-%D version=1999.08.20,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 13,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D This is again one of the \EUROTEX\ 99 styles. It's one of
-%D the quick and dirty styles supporting basic structuring.
-
-\setuppapersize
- [S6][S6]
-
-\setuplayout
- [width=middle,
- height=middle,
- header=0pt,
- footer=0pt,
- bottomdistance=.5cm,
- bottom=1cm,
- topspace=2cm,
- backspace=2cm]
-
-%D This style is meant to be used with lucida handwriting
-%D fonts. If you don't have that font, you may reconsider
-%D using this style.
-
-\startmode[asintended] \setupbodyfont[lbr,hw] \stopmode
-
-%D These colors will mostly be used in the graphics drawn by
-%D \METAPOST.
-
-\setupcolors
- [state=start]
-
-\definecolor[PageColor] [s=.6]
-\definecolor[TextColor] [s=.8]
-\definecolor[LineColor] [g=.4]
-\definecolor[SymbolColor][r=.4]
-
-%D When interacting, we will use button shaped that are
-%D quite random and thereby regenerated for each instance.
-
-\setupinteractionscreen
- [option=max]
-
-\setupinteractionmenu
- [bottom]
- [state=start,
- height=1cm,
- middle=\hskip1cm]
-
-\setupinteraction
- [state=start,
- menu=on,
- display=new,
- click=no,
- color=SymbolColor,
- contrastcolor=SymbolColor]
-
-\startinteractionmenu[bottom]
- \hfill
- \got [previouspage] \symbol[prevmark] \\
- \got [nextpage] \symbol[nextmark] \\
- \got [CloseDocument] \symbol[stopmark] \\
- \txt \tfd \SymbolColor \pagenumber \\
-\stopinteractionmenu
-
-%D When not processed at runtime, the itemmark graphics can
-%D result in processing loops due to funny dimensions.
-%D Therefore, from now on, the itemize macros limit the height
-%D and depth.
-
-\definesymbol[itemmark][\useMPgraphic{itemmark}]
-\definesymbol[stopmark][\useMPgraphic{stopmark}]
-\definesymbol[nextmark][\useMPgraphic{nextmark}]
-\definesymbol[prevmark][\useMPgraphic{prevmark}]
-
-%D Of course we have some backgrounds.
-
-\defineoverlay [page] [\useMPgraphic{page}]
-\defineoverlay [next] [\overlaybutton{forward}]
-\defineoverlay [prev] [\overlaybutton{PreviousJump}]
-
-\setupbackgrounds
- [page]
- [background={page,prev}]
-
-\setupbackgrounds
- [text]
- [background=next]
-
-\setuphead
- [chapter]
- [alternative=middle,
- number=no,
- color=SymbolColor,
- style=\tfc]
-
-%D A little bit of tweaking.
-
-\setupwhitespace
- [big]
-
-\setupitemize
- [1]
- [symbol=itemmark,
- width=3\bodyfontsize]
-
-\def\StartTitlePage%
- {\setupinteractionmenu[bottom][state=stop] % will be named page block
- \startstandardmakeup
- \setupalign[middle]
- \def\\%
- {\stopcolor
- \vfil
- \bfb\setupinterlinespace
- \startcolor[black]}
- \bfd\setupinterlinespace
- \vfil
- \startcolor[SymbolColor]}
-
-\def\StopTitlePage
- {\stopcolor
- \vfil\vfil
- \stopstandardmakeup
- \setupinteractionmenu[bottom][state=start]}
-
-
-\def\TitlePage#1%
- {\StartTitlePage#1\StopTitlePage}
-
-\definehead[Topic][chapter]
-\definehead[Nopic][title]
-
-\setuplist
- [Topic]
- [criterium=all,
- alternative=g,
- interaction=all,
- after=\blank]
-
-\def\Topics#1%
- {\Nopic{#1}
- \bgroup
- \setupinteraction
- [color=,
- contrastcolor=]
- \determinelistcharacteristics[Topic]
- \ifnum\utilitylistlength>12
- \startcolumns[n=2]
- \placelist[Topic]
- \stopcolumns
- \else
- \placelist[Topic]
- \fi
- \egroup}
-
-%D We don't support another level of structuring.
-
-\let\Subject \Topic
-\let\Subjects\relax
-
-%D Most of this style is \METAPOST\ definitions. We could
-%D have shared some code, but it would not on forehand make
-%D things more readable, so we stick to the following
-%D definitions.
-
-\startuseMPgraphic{page}
-
- width := \overlaywidth ;
- height := \overlayheight ;
-
- d := 15 ; dd := d ; dd := 10 ;
-
- def fuzzy (expr p,dx,dy) =
- (xpart p +dx-uniformdeviate dx,ypart p+dy-uniformdeviate dy)
- enddef ;
-
- pair ll, lr, ur, ul ;
-
- ll := (d,d) ;
- lr := (width-d,d) ;
- ur := (width-d,height-d) ;
- ul := (d,height-d) ;
-
- path p, q, r, s ;
-
- p := ll.. for i=.1 step .1 until .9 : fuzzy (i[ll,lr],0,+dd).. endfor lr ;
- q := lr.. for i=.1 step .1 until .9 : fuzzy (i[lr,ur],-dd,0).. endfor ur ;
- r := ur.. for i=.1 step .1 until .9 : fuzzy (i[ur,ul],0,-dd).. endfor ul ;
- s := ul.. for i=.1 step .1 until .9 : fuzzy (i[ul,ll],+dd,0).. endfor ll ;
-
- fill unitsquare xscaled width yscaled height withcolor \MPcolor{PageColor} ;
-
- fill p & q & r & s -- cycle withcolor \MPcolor{TextColor} ;
-
- color c ; c := \MPcolor{LineColor} ;
-
- draw p withpen pencircle xscaled 20 yscaled 5 rotated 30 withcolor c ;
- draw q withpen pencircle xscaled 5 yscaled 20 rotated 30 withcolor c ;
- draw r withpen pencircle xscaled 20 yscaled 5 rotated 30 withcolor c ;
- draw s withpen pencircle xscaled 5 yscaled 20 rotated 30 withcolor c ;
-
-\stopuseMPgraphic
-
-\startuseMPgraphic{itemmark}
- width := BodyFontSize ; height := width/4 ;
- maxheight := StrutHeight ; line := 3width/2 ;
-
- def fuzzy = -(height/4)+uniformdeviate (height/2) enddef ;
-
- draw
- ((0,0+fuzzy)--(width,height+fuzzy/2))
- shifted (line/2,0)
- withpen pencircle
- xscaled line yscaled (line/4)
- rotated (25+uniformdeviate 10) withcolor \MPcolor{SymbolColor} ;
-
- setbounds currentpicture to unitsquare xyscaled(width,maxheight) ;
-\stopuseMPgraphic
-
-\startuseMPgraphic{nextmark}
- LoadPageState ; width := BottomHeight ; height := line := width/2 ;
-
- def fuzzy = -(height/8)+uniformdeviate (height/4) enddef ;
-
- z1 = (0,0+fuzzy) ; z2 = (width,height/2+fuzzy/2) ; z3 = (0,height+fuzzy) ;
-
- draw
- (z1..{right}z2 & z2{left}..z3)
- withpen pencircle
- xscaled line yscaled (line/4)
- rotated 30 withcolor \MPcolor{SymbolColor} ;
-
- setbounds currentpicture to unitsquare xyscaled(width,height) ;
-\stopuseMPgraphic
-
-\startuseMPgraphic{prevmark}
- LoadPageState ; width := BottomHeight ; height := line := width/2 ;
-
- def fuzzy = -(height/8)+uniformdeviate (height/4) enddef ;
-
- z1 = (width,0+fuzzy) ; z2 = (0,height/2+fuzzy/2) ; z3 = (width,height+fuzzy) ;
-
- draw
- (z1..{left}z2 & z2{right}..z3)
- withpen pencircle
- xscaled line yscaled (line/4)
- rotated 30 withcolor \MPcolor{SymbolColor} ;
-
- setbounds currentpicture to unitsquare xyscaled(width,height) ;
-\stopuseMPgraphic
-
-\startuseMPgraphic{stopmark}
- LoadPageState ; width := BottomHeight ; height := line := width/2 ;
-
- def fuzzy = -(height/8)+uniformdeviate (height/4) enddef ;
-
- z1 = (0,0+fuzzy) ;
- z2 = (width,height+fuzzy) ;
- z3 = (width,0+fuzzy) ;
- z4 = (0,height+fuzzy) ;
- z5 = (width/2,height/2) ;
-
- drawoptions
- (withpen pencircle
- xscaled line yscaled (line/4)
- rotated 30 withcolor \MPcolor{SymbolColor}) ;
-
- draw z1..{right}z5..z2 ; draw z3..{left}z5..z4 ;
-
- setbounds currentpicture to unitsquare xyscaled(width,height) ;
-\stopuseMPgraphic
-
-\doifnotmode{demo}{\endinput}
-
-%D The (rather silly) demo section.
-
-\starttext
-
-\TitlePage{Title Page\\pre-writing}
-
-\Topics{Some Nice Quotes}
-
-\Topic{A Few}
-
-\Subject{Knuth} \input knuth
-\Subject{Tufte} \input tufte
-
-\Topic{Some More}
-
-\Subject{Zapf} \input zapf
-\Subject{Bryson} \input bryson
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-14.tex b/Master/texmf-dist/tex/context/base/s-pre-14.tex
deleted file mode 100644
index 4dae6c0097b..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-14.tex
+++ /dev/null
@@ -1,263 +0,0 @@
-%D \module
-%D [ file=s-pre-14,
-%D version=1999.08.20,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 14,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 the process of making a couple of simple styles for
-%D \EUROTEX\ 99, I came to this one. The joke is in the
-%D pagenumber. This style can be used for short presentations
-%D with much text.
-
-\startmode[asintended] \setupbodyfont[lbr] \stopmode
-
-\setupbodyfont[14.4pt]
-
-%D Since we expect text, we can best be very tolerant.
-
-\setuptolerance
- [verytolerant,stretch]
-
-%D As most styles we choose a large screen page size.
-
-\setuppapersize
- [S6][S6]
-
-\setuplayout
- [width=fit,
- rightedge=3cm,
- margin=0pt,
- rightedgedistance=2cm,
- height=middle,
- header=0pt,
- footer=0pt,
- topspace=1cm,
- backspace=1cm]
-
-%D We only use two colors, named \type {One} and \type
-%D {Two}:
-
-\setupcolors
- [state=start]
-
-\definecolor [One] [r=.6,g=.4,b=.4]
-\definecolor [Two] [r=.4,g=.6,b=.6]
-
-%D If you've looked at the demo file, you will have noticed
-%D that the background consists of four pieces: two filled
-%D rectangles and two half numbers. These are put on th epage
-%D using four overlays:
-
-\setupbackgrounds
- [page]
- [background={one,two,three,four}]
-
-%D When we code this in \TEX, we get the following
-%D definitions. As an alternative we coudl have used layers
-%D but I'm afraid that it would not have led to less code.
-
-\defineoverlay
- [one]
- [{\framed
- [frame=off,background=color,backgroundcolor=Two,
- width=\overlaywidth,height=\overlayheight]
- {}}]
-
-\defineoverlay
- [three]
- [{\hbox to \overlaywidth
- {\hfill\SetOverlayWidth
- \framed
- [frame=off,background=color,backgroundcolor=One,
- width=\overlaywidth,height=\overlayheight]
- {}}}]
-
-%D We could have used the main backgroundcolor instead of
-%D overlay \type {one}.
-
-\definefont[NumberFont][RegularBold at 3cm]
-
-\defineoverlay
- [two]
- [{\framed
- [frame=off,width=\overlaywidth,height=\overlayheight,
- offset=overlay]
- {\vfill
- \NumberFont\setstrut\SetOverlayWidth
- \hbox to \hsize
- {\hfill
- \setupinteraction[style=,color=]%
- \setbox0=\hbox{\strut\One\pagenumber}%
- \hbox to 0pt{\hss\gotobox{\box0}[previouspage]\hss}%
- \hskip\overlaywidth}}}]
-
-\defineoverlay
- [four]
- [{\framed
- [frame=off,width=\overlaywidth,height=\overlayheight,offset=overlay]
- {\vfill
- \hbox to \hsize
- {\hfill
- \SetOverlayWidth
- \framed
- [frame=off,width=\overlaywidth,height=\overlayheight,offset=overlay]
- {\vfill\NumberFont\setstrut
- \setbox0=\hbox{\strut\Two\pagenumber}%
- \setbox2=\hbox{\clip[nx=2,ny=1,x=2,y=1]{\copy0}}%
- \dp2=\dp0
- \hbox to \hsize{\hbox to 0pt{\hss\hskip.5\wd0\box2\hss}\hfill}}}}}]
-
-\def\SetOverlayWidth%
- {\scratchdimen = \rightedgedistance
- \divide\scratchdimen by 2
- \advance\scratchdimen by \rightedgewidth
- \advance\scratchdimen by \backspace
- \edef\overlaywidth{\the\scratchdimen}}
-
-%D A much cleaner implementation is the following. If you hate
-%D \METAPOST, you can run this style in the specified mode:
-
-\startnotmode[no-metapost]
-
-\setupbackgrounds
- [page]
- [background={number}]
-
-\defineoverlay[number][\useMPgraphic{number}]
-
-\startuseMPgraphic{number}
- StartPage ;
- path Vage ; picture Left, Right ;
- x1 = x2 = xpart (llcorner Field[Text][RightEdge] shifted (-RightEdgeDistance/2,0)) ;
- y1 = ypart llcorner Page ;
- y2 = ypart ulcorner Page ;
- Vage := llcorner Page -- z1 -- z2 -- ulcorner Page -- cycle ;
- fill Page withcolor \MPcolor {One} ;
- fill Vage withcolor \MPcolor {Two} ;
- if PageNumber>0 :
- defaultfont := "\truefontname{RegularBold}" ;
- Left := Right := thelabel("\folio",origin) ysized 3cm ;
- clip Right to boundingbox Right shifted (bbwidth(Right)/2,0) ;
- draw Left shifted z1 shifted (0,2.25cm) withcolor \MPcolor {One} ;
- draw Right shifted z1 shifted (0,2.25cm) withcolor \MPcolor {Two} ;
- fi ;
- StopPage ;
-\stopuseMPgraphic
-
-\stopnotmode
-
-%D We use the simple label typesetting present in \METAPOST\
-%D because digits are seldom kerned so real \TEX ing is not
-%D needed. As in the previous method, we let the graphics
-%D overlap so that we don't get white lines due to rounding
-%D problems in viewers.
-%D
-%D We put a button behind the text (this overlay is calculated
-%D each page).
-
-\defineoverlay
- [nextpage]
- [\overlaybutton{nextpage}]
-
-\setupbackgrounds
- [text]
- [backgroundoffset=.5cm,
- background=nextpage]
-
-%D We still have to turn on interaction mode.
-
-\setupinteraction
- [state=start,
- display=new,
- menu=on]
-
-\setupinteraction
- [color=,
- contrastcolor=]
-
-%D Next we define structuring commands.
-
-\definehead[Topic] [chapter] \setuphead[Topic] [style=\bfc]
-\definehead[Subject][section] \setuphead[Subject][style=\bfa]
-
-\setuphead
- [Topic, Subject]
- [number=no,
- after={\blank[big]}]
-
-%D Because we will provide a menu, we don't offer lists.
-
-\let\Topics \gobbleoneargument
-\let\Subjects\relax
-
-%D The table of contents goes to the right edge.
-
-\startinteractionmenu[right]
- \setupinteraction
- [color=black,
- contrastcolor=Two]
- \placelist
- [Topic]
- [alternative=e,
- frame=off,
- criterium=all]
- \vfill
-\stopinteractionmenu
-
-\setuplist
- [Topic]
- [width=\rightedgewidth,
- maxwidth=\rightedgewidth,
- style=\bfa]
-
-%D We safe some space:
-
-\setupwhitespace
- [medium]
-
-\setupblank
- [medium]
-
-%D In the titlepage, we still use the \TEX\ overlays,
-%D so that we don't have to define a second graphic.
-
-\def\TitlePage#1%
- {\StartTitlePage#1\StopTitlePage}
-
-\def\StartTitlePage%
- {\bgroup
- \setupbackgrounds[page][background={one,three}]
- \startstandardmakeup
- \setupalign[middle]
- \def\\{\vfil\bfb\setupinterlinespace}
- \bfd\setupinterlinespace
- \vfil}
-
-\def\StopTitlePage%
- {\vfil\vfil\vfil
- \stopstandardmakeup
- \egroup}
-
-%D This is it.
-
-\doifnotmode{demo}{\endinput}
-
-\starttext
-
-\TitlePage{Some Quotes\\(that you probably know by now)}
-
-\Topic{Tufte} \input tufte
-\Topic{Knuth} \input knuth
-\Topic{Reich} \input reich
-\Topic{Zapf} \input zapf
-\Topic{Materie} \input materie
-%Topic{Stork} \input stork
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-15.tex b/Master/texmf-dist/tex/context/base/s-pre-15.tex
deleted file mode 100644
index 25fb357839a..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-15.tex
+++ /dev/null
@@ -1,186 +0,0 @@
-%D \module
-%D [ file=s-pre-15,
-%D version=1999.09.01,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 15,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D This is one of the styles I made for the presentation on
-%D the \NTS\ project at Euro\TeX\ 1998. You need balls to let
-%D \TEX\ typeset graphics, but this style demonstrates that it
-%D can be done.
-%D
-%D This presentation is meant for presentations that build up
-%D an idea stepwise.
-%D
-%D \starttyping
-%D \TitlePage{Do you know \TEX ?}
-%D
-%D \StartIdea
-%D \StartItem We use \TEX\ for typesetting \unknown \StopItem
-%D \StartItem mathematical text \unknown \StopItem
-%D \StartItem but also for text that has no math \unknown \StopItem
-%D \StartItem or presentations like this \unknown \StopItem
-%D \StartItem and whatever you can come up with! \StopItem
-%D \StopIdea
-%D \stoptyping
-
-%D The basic layout is rather simple and used as much of the
-%D screen as possible.
-
-\setuppapersize
- [S6][S6]
-
-\setuplayout
- [backspace=25pt,
- topspace=25pt,
- width=middle,
- height=middle,
- header=0pt,
- footer=0pt]
-
-\setupinteraction
- [state=start,
- display=new,
- color=LineColor,
- contrastcolor=LineColor,
- click=no]
-
-\setupinteractionscreen
- [option=max]
-
-\startmode[asintended] \setupbodyfont[lbr] \stopmode
-
-\setupbodyfont[14.4pt]
-
-%D We use a lot of color. You can remap them if you want
-%D differend ones. The ideas circulate over the colors.
-
-\setupcolors
- [state=start]
-
-\definecolor[TextColor][s=.8]
-\definecolor[PageColor][s=.6]
-\definecolor[LineColor][s=.4]
-
-\definecolor[red] [r=.4] \definecolor[cyan] [g=.4,b=.4]
-\definecolor[green][g=.4] \definecolor[magenta][r=.4,b=.4]
-\definecolor[blue] [b=.4] \definecolor[yellow] [r=.4,g=.4]
-
-\definecolor[linecolor 1][red] \definecolor[linecolor 5][cyan]
-\definecolor[linecolor 2][green] \definecolor[linecolor 6][magenta]
-\definecolor[linecolor 3][blue] \definecolor[linecolor 4][yellow]
-
-%D We use variables to make sure that the graphics are reused
-%D but unique.
-
-\setupMPvariables[pageframe][pagecolor=PageColor,linecolor=LineColor]
-\setupMPvariables[textframe][textcolor=TextColor,linecolor=LineColor]
-
-\setupbackgrounds
- [page]
- [background={pageframe,nextpage}]
-
-\defineoverlay [pageframe] [\uniqueMPgraphic{pageframe}]
-\defineoverlay [textframe] [\uniqueMPgraphic{textframe}]
-\defineoverlay [nextpage] [\overlaybutton{forward}]
-
-\startuniqueMPgraphic{pageframe}{pagecolor,linecolor}
- path p ; p := fullsquare xyscaled (\overlaywidth,\overlayheight) ;
- pickup pencircle scaled 10pt ;
- fill p withcolor \MPvar{pagecolor} ;
- draw p withcolor \MPvar{linecolor} ;
-\stopuniqueMPgraphic
-
-\startuniqueMPgraphic{textframe}{textcolor,linecolor}
- path p ; p := fullcircle xyscaled (\overlaywidth,\overlayheight) ;
- pickup pencircle scaled 10pt ;
- fill p withcolor \MPvar{textcolor} ;
- draw p withcolor \MPvar{linecolor} ;
-\stopuniqueMPgraphic
-
-%D The rest of the file implements the nasty part: typesetting
-%D text embedded in a graphic. The text is collected in a box
-%D so that we can reuse it.
-
-\newbox\CollectedIdeas
-\newcounter\CurrentTopic
-
-\def\StartItem%
- {\setbox\CollectedIdeas=\hbox\bgroup
- \ifdim\wd\CollectedIdeas>0pt \unhbox\CollectedIdeas\hskip25pt \fi
- \setbox\scratchbox=\hbox\bgroup
- \framed
- [width=160pt,height=160pt,align=middle,frame=off,
- background=textframe,offset=15pt,top=\vfill,bottom=\vfill]
- \bgroup}
-
-\def\StopItem%
- {\egroup
- \egroup
- \setbox\scratchbox=\hbox{\lower.5\ht\scratchbox\box\scratchbox}%
- \ht\scratchbox=.5\ht\scratchbox
- \dp\scratchbox= \ht\scratchbox
- \box\scratchbox
- \egroup
- \startstandardmakeup
- \dontcomplain
- \leftskip 0pt plus 50pt
- \rightskip 0pt plus 50pt
- \parfillskip 0pt
- \baselineskip 100pt
- \unhcopy\CollectedIdeas
- \stopstandardmakeup}
-
-\def\StartIdea%
- {\ifnum\CurrentTopic=6 \doglobal\newcounter\CurrentTopic \fi
- \doglobal\increment\CurrentTopic
- \definecolor[LineColor][linecolor \CurrentTopic]
- \setbox\CollectedIdeas=\null}
-
-\def\StopIdea%
- {}
-
-\def\StartTitlePage%
- {\startstandardmakeup
- \setupalign[middle]
- \def\\{\vfil\bfb\setupinterlinespace}
- \bfd\setupinterlinespace
- \vfil}
-
-\def\StopTitlePage%
- {\vfil\vfil
- \stopstandardmakeup}
-
-\def\TitlePage#1%
- {\StartTitlePage#1\StopTitlePage}
-
-\doifnotmode{demo}{\endinput}
-
-%D A simple test on functionality.
-
-\setupoutput[pdftex]
-
-\starttext
-
-\TitlePage{Do you know \TEX ?}
-
-\startbuffer
-\StartIdea
- \StartItem We use \TEX\ for typesetting \unknown \StopItem
- \StartItem mathematical text \unknown \StopItem
- \StartItem but also for text that has no math \unknown \StopItem
- \StartItem or presentations like this \unknown \StopItem
- \StartItem and whatever you can come up with! \StopItem
-\StopIdea
-\stopbuffer
-
-\dorecurse{6}{\getbuffer}
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-16.tex b/Master/texmf-dist/tex/context/base/s-pre-16.tex
deleted file mode 100644
index 715936890bd..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-16.tex
+++ /dev/null
@@ -1,203 +0,0 @@
-%D \module
-%D [ file=s-pre-16,
-%D version=1999.09.01,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 16,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D The first version of this style was made late summer 1999,
-%D but its first usage was during a course I gave in BRNO.
-%D It's a rather simple style with a dominating background.
-
-\setuppapersize
- [S6][S6]
-
-\setupbodyfont
- [pos,14.4pt]
-
-\setuplayout
- [topspace=100pt,
- backspace=120pt,
- header=0pt,
- footer=0pt,
- width=middle,
- height=middle]
-
-\setupbackgrounds
- [text]
- [backgroundoffset=80pt,
- background=GoOn]
-
-\setupbackgrounds
- [page]
- [background={FuzzyCircle,Again}]
-
-\setupcolors
- [state=start]
-
-\definecolor[gray] [s=.4]
-\definecolor[white][s=.8]
-
-\definecolor[red] [r=.8] \definecolor[cyan] [g=.8,b=.8]
-\definecolor[green][g=.8] \definecolor[magenta][r=.8,b=.8]
-\definecolor[blue] [b=.8] \definecolor[yellow] [r=.8,g=.8]
-
-\definecolor[PageColor][gray]
-\definecolor[TextColor][yellow]
-\definecolor[LineColor][blue]
-
-\setupinteraction
- [state=start,
- color=LineColor,
- contrastcolor=LineColor]
-
-\setupinteractionscreen
- [option=max]
-
-\setupitemize
- [each]
- [color=blue,
- symbol=FuzzyDot]
-
-\startuseMPgraphic{FuzzyCircle}
- path p ; numeric w, h, l ;
- w := OverlayWidth ; h := OverlayHeight ;
- def dd = (1 randomized (1/5)) enddef ;
- pickup pencircle xscaled 10pt yscaled 2pt rotated 30;
- for i:=1 upto 50 :
- p := (-dd,-dd)..(dd,-dd)..(dd,dd)..(-dd,dd)..cycle ;
- p := p rotatedaround (center p, uniformdeviate 360) ;
- p := p xscaled (w/2) yscaled (h/2) ;
- l := length(p)/2 ;
- p := p cutbefore point (uniformdeviate l) of p ;
- p := p cutafter point (l+uniformdeviate l) of p ;
- draw p withcolor \MPcolor{LineColor} randomized (.4,1) ;
- endfor ;
- picture s ; s := currentpicture xysized (w-15,h-15) ;
- currentpicture := nullpicture ;
- fill boundingbox s enlarged 60pt withcolor \MPcolor{PageColor} ;
- addto currentpicture also s ;
-\stopuseMPgraphic
-
-\startuseMPgraphic{FuzzyDot}
- path p ; numeric w ;
- w := BodyFontSize/2 ;
- def dd = (w randomized (w/2)) enddef ;
- pickup pencircle xscaled (w/2) yscaled (w/3) rotated 30 ;
- for i=0 step 45 until 135 :
- p := (-dd,0)--(dd,0) ;
- p := p rotatedaround (origin,i-w+uniformdeviate w) ;
- draw p withcolor \MPcolor{LineColor} randomized (.3,.8) ;
- endfor ;
-\stopuseMPgraphic
-
-\defineoverlay [FuzzyCircle] [\useMPgraphic{FuzzyCircle}]
-\defineoverlay [GoOn] [{\setupinteraction[click=no]\overlaybutton{forward}}]
-\defineoverlay [Again] [\overlaybutton{firstpage}]
-
-\definesymbol
- [FuzzyDot]
- [\lower\dp\strutbox\hbox{\useMPgraphic{FuzzyDot}}]
-
-\def\Item%
- {\par\noindent\symbol[FuzzyDot]\hskip.5em\nobreak}
-
-\setupitemize
- [all]
- [packed]
- [symbol=FuzzyDot]
-
-\def\NextIdea%
- {\blank[back,medium]
- \midaligned{\symbol[FuzzyDot]}
- \blank[medium]
- \blank[disable]}
-
-\definehead [Topic] [chapter]
-\definehead [Nopic] [title]
-
-\setuphead
- [Topic, Nopic]
- [alternative=middle,
- before=,
- number=no,
- style=\bfb]
-
-\setuplist
- [Topic]
- [alternative=g,
- interaction=all]
-
-%D Since we want a colored text, and since color directive
-%D can spoil the spacing, we use a foregroundcolor.
-
-\setupbackgrounds
- [text]
- [foregroundcolor=TextColor]
-
-%D Unfortunately this does not work when on the page colors
-%D are set, so we play safe and say:
-
-\setupmakeup
- [standard]
- [color=TextColor]
-
-\def\StartIdea%
- {\startstandardmakeup
- \setupwhitespace[medium]
- \setupblank[medium]
- \setupalign[broad,middle]}
-
-\def\StopIdea%
- {\stopstandardmakeup}
-
-\def\Topics#1%
- {\Nopic{#1}
- \startcolumns
- \setupinteraction[color=TextColor,contrastcolor=TextColor]
- \placelist[Topic]
- \stopcolumns
- \page}
-
-%D Some fakes.
-
-\def\Subject {\Topic}
-\def\Subjects {}
-
-%D A bonus (copied from \type {s-pre-02} but with a different
-%D vertical alignment.
-
-\def\StartTitlePage%
- {\startstandardmakeup
- \bfd\setupinterlinespace
- \setupalign[middle]
- \vfil
- \let\\=\vfil}
-
-\def\StopTitlePage%
- {\vfil
- \stopstandardmakeup}
-
-\def\TitlePage#1%
- {\StartTitlePage#1\StopTitlePage}
-
-\doifnotmode{demo}{\endinput}
-
-\starttext
-
-\Topics{...}
-
-\StartIdea
- \Topic{...}
- ...
- \NextIdea
- ...
-\StopIdea
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-17.mkii b/Master/texmf-dist/tex/context/base/s-pre-17.mkii
deleted file mode 100644
index 7e8310a537e..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-17.mkii
+++ /dev/null
@@ -1,399 +0,0 @@
-%D \module
-%D [ file=s-pre-17,
-%D version=1999.08.20,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 17,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\setupbodyfont
- [12pt,ss]
-
-\setupcolors
- [state=start]
-
-\setupsystem
- [random=medium]
-
-\setupbackgrounds
- [state=repeat]
-
-\setupbackgrounds
- [page]
- [background={page,forward}]
-
-\setupbackgrounds
- [text][text]
- [background=blowup]
-
-\setupinteraction
- [state=start,
- %click=off,
- color=TitleColor,
- contrastcolor=TitleColor]
-
-\setupinteractionscreen
- [option=max]
-
-\setuptolerance
- [verytolerant,stretch]
-
-\definecolor [BackColor] [s=.30]
-\definecolor [PageColor] [g=1]
-\definecolor [FrameColor] [r=1]
-\definecolor [TitleColor] [y=1]
-\definecolor [ArrowColor] [b=1]
-
-\defineoverlay [title] [\useMPgraphic{title}]
-\defineoverlay [page] [\useMPgraphic{page}]
-\defineoverlay [blowup] [\overlaybutton{page(\realfolio)}]
-\defineoverlay [forward] [\overlaybutton{forward}]
-
-\startMPpositiongraphic{mppos:connection}
- path pa, pb, pc ; pair ca, cb ;
- initialize_box(\MPpos{\MPvar{self}}) ; pa := pxy ; ca := cxy ;
- initialize_box(\MPpos{\MPvar{prev}}) ; pb := pxy ; cb := cxy ;
- pickup pencircle scaled .5pt ;
- pa := pa enlarged 10pt ;
- pb := pb enlarged 10pt ;
- for i=1 upto 10 :
- draw pa randomized 20pt withcolor \MPcolor{FrameColor} ;
- endfor ;
- if \MPp{\MPvar{prev}}>0 :
- pair a, b, c, d ;
- for i=1 upto 25 :
- a := .5[ulcorner pa,urcorner pa] randomized (10pt,10pt) ;
- b := .5[llcorner pb,lrcorner pb] randomized (20pt,10pt) ;
- c := .5[a,b] rotatedaround(a,-25) randomized (5pt,5pt) ;
- d := .5[a,b] rotatedaround(a,+25) randomized (5pt,5pt) ;
- draw (a--b) withcolor \MPcolor{ArrowColor} ;
- draw (d--a--c) withcolor \MPcolor{ArrowColor} ;
- endfor ;
- fi ;
- anchor_box(\MPanchor{\MPvar{self}}) ;
-\stopMPpositiongraphic
-
-\startuseMPgraphic{title}
- pickup pencircle scaled .5pt ;
- for i=1 upto 10 :
- draw
- fullsquare xyscaled(OverlayWidth,OverlayHeight)
- enlarged 10pt randomized 20pt
- withcolor \MPcolor{TitleColor} ;
- endfor ;
-\stopuseMPgraphic
-
-\startuseMPgraphic{page}
- StartPage ;
- pickup pencircle scaled .5pt ;
- fill Page withcolor \MPcolor{BackColor} ;
- for i=1 upto 20 :
- draw Page enlarged -50pt randomized 50pt withcolor \MPcolor{PageColor} ;
- endfor ;
- StopPage ;
-\stopuseMPgraphic
-
-\def\StartText%
- {\bgroup
- \getrandomdimen\scratchdimen{250pt}{350pt}%
- \edef\TextWidth{\the\scratchdimen}%
- \setbox\scratchbox=\hbox\bgroup
- \hsize\TextWidth
- \setupframedtexts
- [before=,after=,
- width=fit,align=right, % normal,
- frame=off,foregroundcolor=white]%
- \framedtext\bgroup}
-
-\def\BlowX{450pt} % \def\BlowX{600pt}
-\def\BlowY{300pt} % \def\BlowY{450pt}
-\def\BlowV {50pt} % \def\BlowV{100pt}
-\def\BlowH {75pt} % \def\BlowH{100pt}
-\def\BackO {50pt} % \def\BackO {50pt}
-
-\def\StopText%
- {\egroup\egroup
- \doglobal\increment\CurrentBlaBla
- \let\PrevBlaBla\CurrentBlaBla \doglobal\decrement\PrevBlaBla
- \let\NextBlaBla\CurrentBlaBla \doglobal\increment\NextBlaBla
- \setMPpositiongraphic
- {connection:\CurrentBlaBla}%
- {mppos:connection}%
- {seed=\CurrentBlaBla,
- prev=connection:\PrevBlaBla,
- next=connection:\NextBlaBla}%
- \SetBlowUp{connection:\CurrentBlaBla}\BlowX\BlowY\BlowH\BlowV
- \hbox to 600pt
-% {\getrandomdimen\scratchdimen{50pt}{100pt}%
- {\getrandomdimen\scratchdimen{50pt}{75pt}%
- \hskip0pt plus \scratchdimen minus \scratchdimen
- \hpos{connection:\CurrentBlaBla}%
- {\framed
- [frame=off,
- offset=overlay,
- backgroundoffset=\BackO,
- background=blowup]
- {\box\scratchbox}}%
-% \getrandomdimen\scratchdimen{50pt}{100pt}%
- \getrandomdimen\scratchdimen{50pt}{75pt}%
- \hskip0pt plus \scratchdimen minus \scratchdimen}%
-% \getrandomdimen\scratchdimen{100pt}{150pt}%
- \getrandomdimen\scratchdimen{75pt}{125pt}%
- \vskip\scratchdimen
- \egroup}
-
-\def\xStartText
- {\bgroup
- \setbox\scratchbox=\hbox\bgroup
- \framed
- [frame=off,foregroundcolor=white]
- \bgroup}
-
-\def\xStopText{\StopText}
-
-\def\SetBlowUp#1#2#3#4#5% tag width height hoffset voffset
- {\scratchdimen=\MPw{#1}%
- \advance\scratchdimen-#2 %
- \divide\scratchdimen by 2
- \advance\scratchdimen by \MPx{#1}\relax
- \ifdim\scratchdimen<0pt \scratchdimen=0pt \fi
- \ScaledPointsToBigPoints{\number\scratchdimen}\TextX
- \advance\scratchdimen by #2 %
- \ScaledPointsToBigPoints{\number\scratchdimen}\TextW
- %
- \scratchdimen=\MPh{#1}%
- \advance\scratchdimen-#3 %
- \divide\scratchdimen by 2
- \advance\scratchdimen\MPy{#1}\relax
- \ifdim\scratchdimen<0pt \scratchdimen=0pt \fi
- \ScaledPointsToBigPoints{\number\scratchdimen}\TextY
- \advance\scratchdimen by #3
- \ScaledPointsToBigPoints{\number\scratchdimen}\TextH
- %
- \def\PDFpageviewkey{ fitr \TextX\space\TextY\space\TextW\space\TextH}%
- \def\PDFpageviewwrd{ /FitR \TextX\space\TextY\space\TextW\space\TextH}%
- \edef\PDFpageview{/View [\PDFpageviewwrd]}}
-
-\def\xSetBlowUp#1#2#3#4#5% tag width height hoffset voffset
- {\scratchdimen\MPx{#1}\relax
- \ifdim\scratchdimen<#4
- \ScaledPointsToBigPoints{0}\TextX
- \multiply\scratchdimen 2
- \else
- \advance\scratchdimen-#4
- \ScaledPointsToBigPoints{\number\scratchdimen}\TextX
- \advance\scratchdimen#4
- \advance\scratchdimen#4
- \fi
- \advance\scratchdimen\MPw{#1}%
- \ScaledPointsToBigPoints{\number\scratchdimen}\TextW
- %
- \scratchdimen\MPy{#1}\relax
- \ifdim\scratchdimen<#5
- \ScaledPointsToBigPoints{0}\TextY
- \multiply\scratchdimen 2
- \else
- \advance\scratchdimen-#5
- \ScaledPointsToBigPoints{\number\scratchdimen}\TextY
- \advance\scratchdimen#5
- \advance\scratchdimen#5
- \fi
- \advance\scratchdimen\MPh{#1}%
- \ScaledPointsToBigPoints{\number\scratchdimen}\TextH
- %
- \def\PDFpageviewkey{ fitr \TextX\space\TextY\space\TextW\space\TextH}%
- \def\PDFpageviewwrd{ /FitR \TextX\space\TextY\space\TextW\space\TextH}%
- \edef\PDFpageview{/View [\PDFpageviewwrd]}}
-
-\dontcomplain
-
-\def\StartPage#1%
- {\doStartPage{1}{#1}}
-
-\def\doStartPage#1#2%
- {\def\StopPage{\doStopPage{#1}{#2}}%
- \setbox\scratchbox=\hbox\bgroup
- \valign\bgroup\ignorespaces##\vss\cr}
-
-\def\doStopPage#1#2%
- {\cr
- \egroup
- \egroup
- \setbox\scratchbox=\vbox
- {\vskip100pt
- \hbox \ifcase#1 spread 200pt \else to \wd\scratchbox \fi
- {\hss
- \switchtobodyfont[big]%
- \bfd\setupinterlinespace
- \ifcase#1\else \SetBlowUp{title:\realfolio}\BlowX\BlowY\BlowH\BlowV \fi
- \hpos{title:\realfolio}
- {\framed
- [frame=off,align=middle,
- foregroundcolor=white,
- background={title,blowup}]
- {#2}}%
- \hss}
- \vskip100pt
- \box\scratchbox}
- \doFlushPage}
-
-\def\doFlushPage
- {\scratchdimen=\ht\scratchbox
- \advance\scratchdimen \dp\scratchbox
- \advance\scratchdimen 100pt
- \edef\height{\the\scratchdimen}
- \scratchdimen=\wd\scratchbox
- \advance\scratchdimen 100pt
- \edef\width {\the\scratchdimen}
- \expanded{\definepapersize[MASTER][width=\width,height=\height]}
- \setuppapersize
- [MASTER][MASTER]
- \setuplayout
- [topspace=25pt,backspace=25pt,
- width=middle,header=0pt,footer=0pt,height=middle]
- \centerbox{\box\scratchbox}
- \page}
-
-\def\StartTopic#1%
- {\unskip\unskip\cr
- \doglobal\increment(\CurrentBlaBla,100)%
- \vbox\bgroup
- \vskip100pt
- \bgroup
- \definecolor[FrameColor][TitleColor]
- \switchtobodyfont[big]
- \bfd\setupinterlinespace
- \xStartText#1\xStopText
- \vskip25pt
- \egroup}
-
-\def\StopTopic%
- {\vskip-\lastskip
- \vskip100pt
- \egroup
- \ignorespaces}
-
-\def\TitlePage#1%
- {\doStartPage{0}{\def\\{\vskip1ex\bfc\def\\{\vskip1ex\bfb}}#1}
- \StopPage}
-
-\doifnotmode{demo}{\endinput}
-
-\setupoutput[pdftex]
-
-\starttext
-
-\TitlePage{About Text\\Today's Talk\\Hans Hagen}
-
-\StartPage{The First Page}
-
-\StartTopic{Some Text}
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StartText \input knuth \StopText
-\StopTopic
-
-\StartTopic{Another Text}
- \StartText \input tufte \StopText
- \StartText \input zapf \StopText
- \StartText \input knuth \StopText
-\StopTopic
-
-\StartTopic{Some More Text}
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StartText \input tufte \StopText
-\StopTopic
-
-\StartTopic{Some Text Agian}
- \StartText \input tufte \StopText
- \StartText \input zapf \StopText
- \StartText \input knuth \StopText
- \StartText \input tufte \StopText
-\StopTopic
-
-\StopPage
-
-\StartPage{The Second Page}
-
-\StartTopic{Some Text}
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
-\StopTopic
-
-\StartTopic{Another Text}
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
-\StopTopic
-
-\StartTopic{Some Nice Text}
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StartText \input tufte \StopText
- \StartText \input tufte \StopText
-\StopTopic
-
-\StartTopic{Some Funny Text}
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
-\StopTopic
-
-\StartTopic{Quite Some Text}
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
-\StopTopic
-
-\StartTopic{Even More Text}
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
-\StopTopic
-
-\StopPage
-
-\StartPage{The Third Page}
-
-\StartTopic{Some Short Text}
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
-\StopTopic
-
-\StartTopic{Some Minimal Text}
- \StartText \input tufte \StopText
- \StartText \input zapf \StopText
-\StopTopic
-
-\StartTopic{Some More Text}
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StartText \input tufte \StopText
- \StartText \input tufte \StopText
-\StopTopic
-
-\StopPage
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-17.mkiv b/Master/texmf-dist/tex/context/base/s-pre-17.mkiv
deleted file mode 100644
index 9c46b4ed7a4..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-17.mkiv
+++ /dev/null
@@ -1,408 +0,0 @@
-%D \module
-%D [ file=s-pre-17,
-%D version=1999.08.20,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 17,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\setupbodyfont
- [dejavu,11pt,ss]
-
-\setupsystem
- [random=medium]
-
-\setupbackgrounds
- [state=repeat]
-
-\setupbackgrounds
- [page]
- [background={page,forward}]
-
-\setupbackgrounds
- [text][text]
- [background=blowdown]
-
-\setupinteraction
- [state=start,
-% click=off,
- color=TitleColor,
- contrastcolor=TitleColor]
-
-\setupinteractionscreen
- [option=max]
-
-\setuptolerance
- [verytolerant,stretch]
-
-\definecolor [BackColor] [s=.30]
-\definecolor [PageColor] [g=1]
-\definecolor [FrameColor] [r=1]
-\definecolor [TitleColor] [y=1]
-\definecolor [ArrowColor] [b=1]
-
-\defineoverlay [title] [\useMPgraphic{title}]
-\defineoverlay [page] [\useMPgraphic{page}]
-\defineoverlay [blowup] [{\hboxreference[whatever:\CurrentBlaBla]{\overlaybutton{whatever:\CurrentBlaBla}}}]
-\defineoverlay [blowdown] [{\hboxreference[page:\realfolio]{\overlaybutton{page:\realfolio}}}]
-\defineoverlay [forward] [\overlaybutton{forward}]
-
-\startMPinclusions
- input "mp-abck.mpiv" ;
-\stopMPinclusions
-
-\startMPpositiongraphic{mppos:connection}
- path pa, pb, pc ; pair ca, cb ;
- initialize_box(\MPpos{\MPvar{self}}) ; pa := pxy ; ca := cxy ;
- initialize_box(\MPpos{\MPvar{prev}}) ; pb := pxy ; cb := cxy ;
- pickup pencircle scaled .5pt ;
- pa := pa enlarged 10pt ;
- pb := pb enlarged 10pt ;
- for i=1 upto 10 :
- draw pa randomized 20pt withcolor \MPcolor{FrameColor} ;
- endfor ;
- if \MPp{\MPvar{prev}} > 0 :
- pair a, b, c, d ;
- for i=1 upto 25 :
- a := .5[ulcorner pa,urcorner pa] randomized (10pt,10pt) ;
- b := .5[llcorner pb,lrcorner pb] randomized (20pt,10pt) ;
- c := .5[a,b] rotatedaround(a,-25) randomized (5pt,5pt) ;
- d := .5[a,b] rotatedaround(a,+25) randomized (5pt,5pt) ;
- draw (a--b) withcolor \MPcolor{ArrowColor} ;
- draw (d--a--c) withcolor \MPcolor{ArrowColor} ;
- endfor ;
- fi ;
- anchor_box(\MPanchor{\MPvar{self}}) ;
-\stopMPpositiongraphic
-
-\startuseMPgraphic{title}
- pickup pencircle scaled .5pt ;
- for i=1 upto 10 :
- draw fullsquare
- xyscaled(OverlayWidth,OverlayHeight)
- enlarged 10pt randomized 20pt
- withcolor \MPcolor{TitleColor} ;
- endfor ;
-\stopuseMPgraphic
-
-\startuseMPgraphic{page}
- StartPage ;
- pickup pencircle scaled .5pt ;
- fill Page withcolor \MPcolor{BackColor} ;
- for i=1 upto 20 :
- draw Page enlarged -50pt randomized 50pt withcolor \MPcolor{PageColor} ;
- endfor ;
- StopPage ;
-\stopuseMPgraphic
-
-\newcounter\CurrentBlaBla
-
-\defineframedtext
- [ZoomText]
- [before=,
- after=,
- width=fit,
- align=flushleft,
- frame=off,
- foregroundcolor=white]
-
-\starttexdefinition StartText
- \begingroup
- \getrandomdimen\scratchdimen{250pt}{350pt}
- \edef\TextWidth{\the\scratchdimen}
- \setbox\scratchbox\hbox\bgroup
- \hsize\TextWidth
- \ZoomText\bgroup
-\stoptexdefinition
-
-\starttexdefinition StartTextSimple
- \begingroup
- \setbox\scratchbox\hbox\bgroup
- \framed [
- frame=off,
- foregroundcolor=white
- ]
- \bgroup
-\stoptexdefinition
-
-\starttexdefinition StopTextSimple
- \StopText
-\stoptexdefinition
-
-\starttexdefinition StopText
- \egroup
- \egroup
- \doglobal\increment\CurrentBlaBla
- \let\PrevBlaBla\CurrentBlaBla \doglobal\decrement\PrevBlaBla
- \let\NextBlaBla\CurrentBlaBla \doglobal\increment\NextBlaBla
- \setMPpositiongraphic {
- connection:\CurrentBlaBla
- }{
- mppos:connection
- }{
- seed=\CurrentBlaBla,
- prev=connection:\PrevBlaBla,
- next=connection:\NextBlaBla
- }
- \hbox to 600pt \bgroup
- \setupinteraction[focus=fitr]
- \getrandomdimen\scratchdimen{50pt}{75pt}
- \hskip0pt plus \scratchdimen minus \scratchdimen
- \hpos {
- connection:\CurrentBlaBla
- }{
- \framed [
- frame=off,
- offset=overlay,
- backgroundoffset=50pt,
- background=blowup
- ] {
- \box\scratchbox
- }
- }
- \getrandomdimen\scratchdimen{50pt}{75pt}
- \hskip0pt plus \scratchdimen minus \scratchdimen
- \egroup
- \getrandomdimen\scratchdimen{75pt}{125pt}
- \vskip\scratchdimen
- \endgroup
-\stoptexdefinition
-
-\dontcomplain
-
-\disablemode[SpreadPage]
-
-\starttexdefinition StartPage #1
- \doglobal\increment(\CurrentBlaBla,100)%
- \setvariables[StartPage][title={#1}]
- \setbox\scratchbox\hbox\bgroup
- \valign\bgroup
- \ignorespaces
- \alignmark\alignmark
- \vss
- \cr
-\stoptexdefinition
-
-\starttexdefinition StopPage
- \cr
- \egroup
- \egroup
- \setbox\scratchbox\vbox\bgroup
- \vskip100pt
- \doifelsemode {SpreadPage} {
- \hbox spread 200pt
- } {
- \hbox to \wd\scratchbox
- }
- \bgroup
- \setupinteraction[focus=fitr]
- \hss
- \switchtobodyfont[big]%
- \bfd
- \doglobal\increment\CurrentBlaBla
- \setupinterlinespace
- \hpos {
- title:\realfolio
- }{
- \framed [
- frame=off,
- offset=overlay,
- backgroundoffset=50pt,
- background=blowup
- ] {
- \framed [
- frame=off,
- align=middle,
- foregroundcolor=white,
- background=title
- ] {
- \getvariable{StartPage}{title}
- }
- }
- }
- \hss
- \egroup
- \vskip100pt
- \box\scratchbox
- \egroup
- \normalexpanded {
- \definepapersize [
- MasterPage
- ] [
- width=\the\dimexpr\wd\scratchbox+100pt\relax,
- height=\the\dimexpr\ht\scratchbox+\dp\scratchbox+100pt\relax
- ]
- }
- \setuppapersize
- [MasterPage]
- [MasterPage]
- \setuplayout [
- topspace=25pt,
- backspace=25pt,
- width=middle,
- header=0pt,
- footer=0pt,
- height=middle
- ]
- \centerbox {
- \box\scratchbox
- }
- \page
-\stoptexdefinition
-
-\starttexdefinition StartTopic #1
- \removeunwantedspaces
- \cr
- \doglobal\increment(\CurrentBlaBla,100)%
- \vbox\bgroup
- \vskip100pt
- \bgroup
- \definecolor[FrameColor][TitleColor]
- \switchtobodyfont[big]
- \bfd
- \setupinterlinespace
- \StartTextSimple
- \ignorespaces
- #1
- \removeunwantedspaces
- \StopTextSimple
- \vskip25pt
- \egroup
-\stoptexdefinition
-
-\starttexdefinition StopTopic
- \vskip-\lastskip
- \vskip100pt
- \egroup
- \ignorespaces
-\stoptexdefinition
-
-\starttexdefinition TitlePage #1
- \begingroup
- \def\\{\vskip1ex\bfc\def\\{\vskip1ex\bfb}}
- \enablemode[SpreadPage]
- \StartPage{#1}
- \StopPage
- \endgroup
-\stoptexdefinition
-
-\continueifinputfile{s-pre-17.mkiv}
-
-\starttext
-
-\nopdfcompression
-
-\TitlePage{About Text\\Today's Talk\\Hans Hagen}
-
-\StartPage{The First Page}
-
- \StartTopic{Some Text}
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StartText \input knuth \StopText
- \StopTopic
-
- \StartTopic{Another Text}
- \StartText \input tufte \StopText
- \StartText \input zapf \StopText
- \StartText \input knuth \StopText
- \StopTopic
-
- \StartTopic{Some More Text}
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StartText \input tufte \StopText
- \StopTopic
-
- \StartTopic{Some Text Again}
- \StartText \input tufte \StopText
- \StartText \input zapf \StopText
- \StartText \input knuth \StopText
- \StartText \input tufte \StopText
- \StopTopic
-
-\StopPage
-
-\StartPage{The Second Page}
-
- \StartTopic{Some Text}
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StopTopic
-
- \StartTopic{Another Text}
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StopTopic
-
- \StartTopic{Some Nice Text}
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StartText \input tufte \StopText
- \StartText \input tufte \StopText
- \StopTopic
-
- \StartTopic{Some Funny Text}
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StopTopic
-
- \StartTopic{Quite Some Text}
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StopTopic
-
- \StartTopic{Even More Text}
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StopTopic
-
-\StopPage
-
-\StartPage{The Third Page}
-
- \StartTopic{Some Short Text}
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StopTopic
-
- \StartTopic{Some Minimal Text}
- \StartText \input tufte \StopText
- \StartText \input zapf \StopText
- \StopTopic
-
- \StartTopic{Some More Text}
- \StartText \input tufte \StopText
- \StartText \input knuth \StopText
- \StartText \input zapf \StopText
- \StartText \input tufte \StopText
- \StartText \input tufte \StopText
- \StopTopic
-
-\StopPage
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-18.tex b/Master/texmf-dist/tex/context/base/s-pre-18.tex
deleted file mode 100644
index 876eec5f1f8..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-18.tex
+++ /dev/null
@@ -1,173 +0,0 @@
-%D \module
-%D [ file=s-pre-18,
-%D version=1999.08.20,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 18,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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: met pos en dan iedere titel
-
-\setuppapersize
- [S6][S6]
-
-\setupbodyfont
- [loc,ppl]
-
-\setupcolors
- [state=start]
-
-\definecolor [shade-1] [s=.7]
-\definecolor [shade-2] [s=.1]
-
-\definecolor [shade-3] [s=.8]
-\definecolor [shade-4] [b=.8]
-
-\definecolor [shade-5] [g=.6]
-
-\setuplayout
- [topspace=1cm,
- height=fit,
- backspace=1cm,
- width=middle,
- header=0pt,
- footer=0pt,
- bottomdistance=1cm]
-
-\setupbackgrounds
- [state=repeat]
-
-\setupbackgrounds [page] [background=page]
-
-\defineoverlay [page] [\useMPgraphic{page}]
-\defineoverlay [text] [\useMPgraphic{text}]
-
-\startuseMPgraphic{page}
- StartPage ;
- path p ; numeric s ; pair cp ; cp := center Page ;
- s := define_circular_shade(cp,cp,0,TextWidth,
- \MPcolor{shade-1},\MPcolor{shade-2}) ;
- fill Page withshade s ;
- p := fullcircle xyscaled (TextWidth+1cm, TextHeight+1cm) shifted cp ;
- s := define_circular_shade(cp,cp,0,TextWidth,\MPcolor{shade-3},
- \MPcolor{shade-4}) ;
- fill p withshade s ;
- StopPage
-\stopuseMPgraphic
-
-\startuseMPgraphic{text}
- StartPage ;
- path p ; numeric s, t ; pair cp ; cp := center Page ;
- s := define_circular_shade(cp,cp,0,TextWidth,
- \MPcolor{shade-1},\MPcolor{shade-2}) ;
- fill Page withshade s ;
- p := llcorner Field[Text][Bottom] --
- lrcorner Field[Text][Bottom] --
- urcorner Field[Text][Text] --
- ulcorner Field[Text][Text] -- cycle ;
- p := p enlarged .5cm randomized .5cm ;
- t := define_circular_shade(cp,cp,0,TextWidth,\MPcolor{shade-3},
- \MPcolor{shade-4}) ;
- fill p withshade t ;
-
- def bottom_menu_button (expr nn, rr, pp, xx, yy, ww, hh, dd) =
- if (pp>0) and (rr>0) :
- if nn = 1 :
- p := (0,0)--(ww,hh/2)--(0,hh)--cycle ;
- elseif nn = 2 :
- p := (0,hh/2)--(ww,hh)--(ww,0)--cycle ;
- else :
- p := origin--cycle ;
- fi ;
- fill p randomized 2.5mm shifted (xx,yy) withshade s ;
- fi ;
- enddef ;
-
- \MPmenubuttons{bottom}
-
- if length \MPstring{topic} > 0 :
- graphictext
- \MPstring{topic}
- scaled 3
- shifted ulcorner Field[Text][Text]
- shifted (0,-1.5cm)
- withshade s ;
- fi ;
-
- StopPage ;
-\stopuseMPgraphic
-
-\setupinteractionmenu
- [bottom]
- [state=start,
- frame=off,
- left=\hfill,
- middle=\hskip.5cm,
- width=2\bottomheight,
- position=yes]
-
-\startinteractionmenu[bottom]
- \but [previouspage] \\
- \but [nextpage] \\
-\stopinteractionmenu
-
-\setupinteraction
- [state=start,
- click=no,
- color=shade-5,
- contrastcolor=shade-5,
- menu=on]
-
-\setupwhitespace
- [big]
-
-\def\Topic#1%
- {\page
- \setMPtext{topic}{#1}
- \vbox to 2cm{}}
-
-\setMPtext{topic}{}
-
-\def\StartTitlePage%
- {\startstandardmakeup[bottomstate=none]
- \setupalign[middle]
- \vfill}
-
-\def\StopTitlePage%
- {\stopstandardmakeup
- \setuplayout[bottom=1.5cm]
- \setupbackgrounds[page][background=text]}
-
-\def\TitleString#1#2%
- {\indent
- \startMPcode
- graphictext
- "#2"
- scaled #1
- withdrawcolor .4white
- withfillcolor .7white
- withpen pencircle scaled 2pt ;
- \stopMPcode
- \vfill}
-
-\doifnotmode{demo}{\endinput}
-
-\starttext
-
-\StartTitlePage
- \TitleString{8}{Welcome}
- \TitleString{4}{to my favourite}
- \TitleString{8}{Quotes}
-\StopTitlePage
-
-\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
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-19.tex b/Master/texmf-dist/tex/context/base/s-pre-19.tex
deleted file mode 100644
index 991d311ced0..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-19.tex
+++ /dev/null
@@ -1,347 +0,0 @@
-%D \module
-%D [ file=s-pre-19,
-%D version=2000.07.31,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 19,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 style is made in the process or writing the \METAFUN\
-%D manual. It exploits a few tricks, like graphics calculated
-%D using positional information. It also uses the (at that
-%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
-%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 \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 developed using an $1400\times1050$ pixel LCD screen, so I
-%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.
-
-\setuplayout
- [topspace=48pt,
- backspace=48pt,
- cutspace=12pt,
- width=400pt,
- 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.
-
-\setupwhitespace
- [big]
-
-%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]
-\definecolor [white] [s=.85]
-
-\definecolor [PageColor] [yellow]
-\definecolor [TextColor] [white]
-\definecolor [OrnamentColor] [red]
-\definecolor [InteractionColor] [red]
-\definecolor [ContrastColor] [gray]
-
-%D This is an interactive document, so we enable interaction.
-%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,
- click=off,
- color=InteractionColor,
- contrastcolor=ContrastColor,
- menu=on]
-
-%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}.
-
-\setupinteractionmenu
- [right]
- [frame=off,
- position=yes,
- align=middle,
- topoffset=-.75cm,
- bottomoffset=-.75cm,
- color=gray,
- contrastcolor=gray,
- style=bold,
- 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.
-
-\startinteractionmenu[right]
- \placelist[Topic][alternative=right]
- \vfill
- \but [CloseDocument] close \\
-\stopinteractionmenu
-
-%D We have now arived at the more interesting part of the style
-%D definition: the graphic that goes in the page background.
-%D Because this graphic will change, we define a usable
-%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.
-
-\setupbackgrounds
- [page]
- [background=page]
-
-\defineoverlay
- [page]
- [\useMPgraphic{page}]
-
-\setupMPvariables
- [page]
- [alternative=3]
-
-\startuseMPgraphic{page}
-
- \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} ;
-
- 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 ;
-
- \MPmenubuttons{right}
-
- StopPage ;
-\stopuseMPgraphic
-
-\startuseMPgraphic{page}
-
- \includeMPgraphic{rightsuperbutton}
-
- StartPage ;
-
- numeric alternative, seed, superness, squeezeness, randomness ;
- path p, q ; transform t ;
-
- alternative := \MPvar{alternative} ;
- seed := uniformdeviate 100 ;
-
- if alternative > 10 :
- superness := .85 + ((\realfolio-1)/\lastpage) * .15 ;
- squeezeness := 12pt - ((\realfolio-1)/\lastpage) * 10pt ;
- else :
- superness := .90 ;
- squeezeness := 12pt ;
- fi ;
-
- randomness := squeezeness ;
-
- alternative := alternative mod 10 ;
-
- t := identity if alternative=3: shifted (9pt,-9pt) fi ;
-
- % first we draw the shape that surrounds the text
-
- 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 ;
- pickup pencircle scaled 3pt ;
-
- 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
-
- randomseed := seed ;
-
- 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 ...
-
- vardef right_menu_button (expr nn, rr, pp, xx, yy, ww, hh, dd) =
- save q ; path q ;
- 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 ...
-
- \MPmenubuttons{right}
-
- 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 ;
-
- edge := xpos + wid ; shift := ypos + hei ;
-
- p := rightpath pat ;
-
- ptop := ((-infinity,shift)--(edge,shift)) ;
- pbot := ((-infinity,shift-hei)--(edge,shift-hei)) ;
-
- 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)
-
-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.
-
-\definehead
- [Topic]
- [chapter]
-
-\setuphead
- [Topic]
- [number=no]
-
-%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=]
-
-%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
- \switchtobodyfont[big]
- \def\\{\vfill\bfb\let\\=\par}
- \bfd\setupinterlinespace\gray
- \vskip.5cm}
-
-\def\StopTitlePage
- {\\\vskip.5cm % the \\ is really needed
- \stopstandardmakeup}
-
-\def\TitlePage#1%
- {\StartTitlePage#1\StopTitlePage}
-
-%D A couple of goodies:
-
-\def\Subject {\Topic}
-\def\Topics #1{}
-\def\Subjects {}
-
-%D For those who want to test:
-
-\doifnotmode{demo}{\endinput}
-
-\starttext
-
-\setupMPvariables[page][alternative=3]
-
-\TitlePage
- {A Few Nice Quotes\\
- 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
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-22.tex b/Master/texmf-dist/tex/context/base/s-pre-22.tex
deleted file mode 100644
index be50ae195e4..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-22.tex
+++ /dev/null
@@ -1,319 +0,0 @@
-%D \module
-%D [ file=s-pre-22,
-%D version=2000.08.07,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 22,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 style was made on behalf of the \PDFTEX\ presentation
-%D at \TUG\ 2000. It cycled a summary of each talk, with name
-%D and title. When documenting this style, I changed
-%D reprocessing into pushing on layers.
-%D
-%D A \quote {problem} like this can be solved in several ways:
-%D
-%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 \item defining an overlay for each summary and changing the
-%D order when flushing
-%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.
-
-\startmode[asintended] \setupbodyfont[lbr] \stopmode
-
-\setupbodyfont[14.4pt]
-
-%D We use the whole page area.
-
-\setuppapersize
- [S6][S6]
-
-\setuplayout
- [topspace=0cm,
- backspace=0cm,
- header=0pt,
- footer=0pt,
- width=middle,
- height=middle]
-
-%D We define a couple of matching colors and gray scales.
-%D Watch out, some are really meant to look dim.
-
-\setupcolors
- [state=start]
-
-\definecolor[PageColor] [s=.50]
-\definecolor[TextColor] [s=.80]
-\definecolor[DoneColor] [s=.65]
-
-\definecolor[TopColor] [r=.5,g=.6,b=.7]
-\definecolor[BotColor] [r=.6,g=.7,b=.5]
-\definecolor[DotColor] [r=.7,g=.5,b=.6]
-
-%D We will use foreground colors. Because these can interfere
-%D with the colors they overload, we can bets make sure that
-%D we don't have local colors.
-
-\setupinteraction
- [state=start,
- color=,
- contrastcolor=]
-
-%D The presentation is supposed to cycle automatically.
-
-\setupinteractionscreen
- [option=max,
- delay=5]
-
-\setuppagetransitions
-
-%D We will use random positioning of objects.
-
-\setupsystem
- [random=medium]
-
-%D We have two kind of graphics: the page background and
-%D the shape around the textual elements.
-
-\defineoverlay [shape] [\uniqueMPgraphic{shape}]
-\defineoverlay [page] [\reuseMPgraphic{page}]
-
-\startreusableMPgraphic{page}
- StartPage ;
- filldraw Page withcolor \MPcolor{PageColor} ;
- pickup pencircle scaled .375cm ;
- for i=1 upto 200 :
- drawdot center Page randomized (PaperWidth,PaperHeight)
- withcolor \MPcolor {DotColor} ;
- endfor ;
- StopPage ;
-\stopreusableMPgraphic
-
-\startuniqueMPgraphic{shape}
- path p ;
- p := unitsquare xyscaled(OverlayWidth,OverlayHeight) superellipsed .90 ;
- draw p withpen pencircle scaled .50cm withcolor \MPcolor{PageColor} ;
- fill p withcolor OverlayColor ;
- draw p withpen pencircle scaled .25cm withcolor OverlayLineColor ;
- currentpicture := currentpicture xysized(OverlayWidth,OverlayHeight) ;
-\stopuniqueMPgraphic
-
-%D The resizing at the end is needed to get a nice inverted
-%D hyperlink when we click on it in a browser.
-
-%D Behind the page we put a forward button:
-
-\defineoverlay [forward] [\overlaybutton{forward}]
-
-%D The content will be managed by means of two layers.
-
-\definelayer [main] \defineoverlay [main] [\composedlayer{main}]
-\definelayer [temp] \defineoverlay [temp] [\composedlayer{temp}]
-
-%D The first layer will hold everything to be shown, while
-%D the second one gets the data we currently focus on.
-%D Therefore the first layer will not be flushed each page.
-
-\setuplayer
- [main]
- [state=repeat]
-
-%D All the overlays go onto the page area.
-
-\setupbackgrounds
- [page]
- [background={page,forward,main,temp}]
-
-%D We have to collect all data before we typeset it. Each
-%D element will be typeset dim and bright. The dim
-%D alternatives will be collected on the main layer, but each
-%D bring one goes onto a box stack.
-
-\initializeboxstack{Summary}
-\initializeboxstack{Subtext}
-
-%D The macros that take care of all this manipulations look
-%D more complicated than they actually are. We use a
-%D scratchbox to collect and inspect data. Also, because we
-%D typeset each element twice, we need to make sure that we use
-%D the same random seed for both.
-
-\doglobal\newcounter\CurrentSummary
-
-\def\StartSummary% bottom bot-title top-title
- {\dodoublegroupempty\doStartSummary}
-
-\def\doStartSummary#1#2%
- {\doglobal\increment\CurrentSummary
- \setbox\scratchbox=\hbox{\strut#1}
- \getrandomseed\RandomSeed
- \setlayer[main]
- {\RandomSubtextBox{DoneColor}{BotColor}{BotColor}}
- \setrandomseed\RandomSeed
- \savebox{Subtext}{\CurrentSummary}
- {\RandomSubtextBox{TextColor}{BotColor}{black}}
- \setbox\scratchbox=\hbox \bgroup
- \setbox\scratchbox=\hbox{\bfb\setstrut\strut\quad#2\quad}%
- \SetAcceptableWidth
- \framed [offset=0pt,width=fit,frame=off,align=middle,strut=no]
- \bgroup \setupwhitespace[big]
- \doifsomething{#2}{\noindent\box\scratchbox\blank}}
-
-\def\StopSummary
- {\egroup \egroup
- \getrandomseed\RandomSeed
- \setlayer[main]
- {\RandomSummaryBox{DoneColor}{TopColor}{TopColor}}
- \setrandomseed\RandomSeed
- \savebox{Summary}{\CurrentSummary}
- {\RandomSummaryBox{TextColor}{TopColor}{black}}}
-
-%D A \type {\doStartSummary#1#2#3\StopSummary} could have been
-%D used too but this one is less sensitive for catcode changes
-%D (not that we expect problems like this in this kind of
-%D application).
-
-%D The width is either derived from the width ot the title or
-%D at random. The final width of the box is detemined by the
-%D content.
-
-\def\SetAcceptableWidth
- {\scratchdimen=.5\makeupwidth
- \ifdim\wd\scratchbox>.5\makeupwidth
- \getrandomdimen\hsize{\wd\scratchbox}{.8\makeupwidth}%
- \else
- \getrandomdimen\hsize{.5\makeupwidth}{.7\makeupwidth}%
- \fi}
-
-%D The subtext box goes at the bottom, somewhere in the right
-%D corner.
-
-\def\RandomSubtextBox#1#2#3%
- {\vbox to \makeupheight
- {\vfill
- \hbox to \makeupwidth
- {\hfill
- \button
- [offset=2ex,frame=off,background=shape,strut=no,
- backgroundcolor=#1,framecolor=#2,foregroundcolor=#3]
- {\copy\scratchbox}%
- [previouspage]%
- \getrandomdimen\scratchdimen{.5cm}{2.5cm}%
- \hskip\scratchdimen}
- \getrandomdimen\scratchdimen{.5cm}{1.5cm}
- \vskip \scratchdimen}}
-
-%D The main text goes in the top half of the page, not to
-%D far from the center. The last \type {\vskip} makes sure
-%D that we don't clash with the subtexts.
-
-\definereference[thispage][page(\CurrentSummary)]
-
-\def\RandomSummaryBox#1#2#3%
- {\vbox to \makeupheight
- {\getrandomdimen\scratchdimen{.5cm}\makeupheight
- \vskip 0pt plus \scratchdimen
- \hbox to \makeupwidth
- {\getrandomdimen\scratchdimen{.5cm}\makeupwidth
- \hskip 0pt plus \scratchdimen
- \button
- [offset=3ex,frame=off,background=shape,strut=no,
- backgroundcolor=#1,framecolor=#2,foregroundcolor=#3]
- {\copy\scratchbox}%
- [thispage]%
- \getrandomdimen\scratchdimen{.5cm}\makeupwidth
- \hskip 0pt plus \scratchdimen}
- \getrandomdimen\scratchdimen{.5cm}\makeupheight
- \vskip 0pt plus \scratchdimen
- \vskip.2\makeupheight}}
-
-%D Because we conly collect data, we hav eto make sure that at
-%D some moment it is processed and flushed. The following loop
-%D does this.
-
-\def\BuildPage
- {\dorecurse{\CurrentSummary}
- {\startstandardmakeup
- \setlayer[temp]{\foundbox{Summary}\recurselevel}
- \setlayer[temp]{\foundbox{Subtext}\recurselevel}
- \stopstandardmakeup}}
-
-%D We hook this macro into the \type {\stoptext} macro.
-
-\appendtoks \BuildPage \to \everystoptext
-
-%D We still need a title page.
-
-\def\TitlePage%
- {\dodoublegroupempty\doTitlePage}
-
-\long\def\doTitlePage#1#2%
- {\ifsecondargument
- \MakeTitlePage{#1}{#2}
- \else\iffirstargument
- \MakeTitlePage{\currentdate}{#1}
- \else
- \MakeTitlePage{\currentdate}{Welcome}
- \fi\fi}
-
-\def\MakeTitlePage#1#2%
- {\StartSummary{#1}{#2}\StopSummary}
-
-%D For old times sake:
-
-\long\def\StartTopic#1\StopTopic{\StartSummary#1\StopSummary}
-
-\doifnotmode{demo}{\endinput}
-
-%D The demo text.
-
-\starttext
-
-\TitlePage{Indeed}{The Title Page}
-
-\StartSummary{Alpha}{Title}
- A simple and not too long text just to show the topic.
- A simple and not too long text just to show the topic.
- A simple and not too long text just to show the topic.
-\StopSummary
-
-\StartSummary{Beta and Gamma}{Another Title}
- A simple and not too long text just to show the topic.
- A simple and not too long text just to show the topic.
-\StopSummary
-
-\StartSummary{Delta}{Some Title}
- A simple and not too long text just to show the topic.
-\StopSummary
-
-\StartSummary{Epsilon}{What A Title}
- A simple and not too long text just to show the topic.
- A simple and not too long text just to show the topic.
- A simple and not too long text just to show the topic.
-\StopSummary
-
-\StartSummary{Zeta, Eta and Theta}{Eh, A Title}
- A simple and not too long text just to show the topic.
- A simple and not too long text just to show the topic.
- A simple and not too long text just to show the topic.
-\StopSummary
-
-\StartSummary{Omega}
- A simple and not too long text just to show the topic.
- A simple and not too long text just to show the topic.
- A simple and not too long text just to show the topic.
- A simple and not too long text just to show the topic.
-\StopSummary
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-23.tex b/Master/texmf-dist/tex/context/base/s-pre-23.tex
deleted file mode 100644
index f9983a89ed7..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-23.tex
+++ /dev/null
@@ -1,109 +0,0 @@
-%D \module
-%D [ file=s-pre-20,
-%D version=2000.08.07,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 20,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 style looks a lot like number 22. This time we don't
-%D cycle but build up the page. One can click on the text go
-%D to the page wanted. Clicking on the titl ebrings you to the
-%D previous page.
-
-\startmode [demo]
- \disablemode[demo] \usemodule[pre-22] \enablemode[demo]
-\stopmode
-
-\startnotmode [demo]
- \usemodule[pre-22]
-\stopnotmode
-
-%D We use a simple two||color scheme.
-
-\definecolor[DotColor][r=.5,g=.6,b=.7]
-\definecolor[TopColor][r=.7,g=.6,b=.5]
-\definecolor[BotColor][TopColor]
-
-%D We will not delay page building.
-
-\let\BuildPage\relax
-
-%D Instead, we will flush a page for each summary. The main
-%D layer is build up anyway, but we need to overlay the
-%D current summary.
-
-\let\normalStartSummary\StartSummary
-\let\normalStopSummary \StopSummary
-
-\def\StartSummary
- {\startstandardmakeup
- \normalStartSummary}
-
-\def\StopSummary
- {\normalStopSummary
- \setlayer[temp]{\foundbox{Summary}\CurrentSummary}
- \setlayer[temp]{\foundbox{Subtext}\CurrentSummary}
- \stopstandardmakeup}
-
-%D The title page is not added to the main layer (or
-%D actually, it is, but we erase the layer before it's
-%D used).
-
-\long\def\MakeTitlePage#1#2%
- {\startstandardmakeup
- \definereference[thispage][]
- \switchtobodyfont[32pt]
- \StartSummary{#1}{}#2\StopSummary
- \resetlayer[main]
- \setlayer[temp]{\foundbox{Summary}\CurrentSummary}
- \setlayer[temp]{\foundbox{Subtext}\CurrentSummary}
- \definereference[thispage][page(\CurrentSummary)]
- \stopstandardmakeup}
-
-\doifnotmode{demo}{\endinput}
-
-\starttext
-
-\TitlePage{August 2000}{Something Very Important}
-
-\StartSummary{Alpha}
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
-\StopSummary
-
-\StartSummary{Beta and Gamma}
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
-\StopSummary
-
-\StartSummary{Delta}
- A simple and not too long text just to show the idea.
-\StopSummary
-
-\StartSummary{Epsilon}
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
-\StopSummary
-
-\StartSummary{Zeta, Eta and Theta}
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
-\StopSummary
-
-\StartSummary{Omega}
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
-\StopSummary
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-26.tex b/Master/texmf-dist/tex/context/base/s-pre-26.tex
deleted file mode 100644
index 7c1dec5f8f1..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-26.tex
+++ /dev/null
@@ -1,255 +0,0 @@
-%D \module
-%D [ file=s-pre-26,
-%D version=2001.02.18,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 26,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 modes: reverse
-
-%D This is a nice and simple style, written in februari
-%D 2001. It uses a square papersize, derived from \type {S4}.
-%D Because this style is meant to be used with Zapf
-%D Chancery, I dedicate this style to Volker Schaa, a fan of
-%D Zapf.
-
-\setuppapersize
- [S44][S44]
-
-\startmode[asintended]
- \definetypeface[zaphy][cg][calligraphy][chancery]
- \setupbodyfont[zaphy,cg,12pt]
-\stopmode
-
-\startnotmode[asintended]
- \setupbodyfont[13pt]
-\stopnotmode
-
-%D We use the whole page.
-
-\setuplayout
- [backspace=0pt,
- topspace=0pt,
- header=0pt,
- footer=0pt,
- bottom=0pt,
- width=middle,
- height=middle]
-
-%D We will be very tolerant in alignment.
-
-\setuptolerance
- [verytolerant,stretch]
-
-%D Of course use navigation, but we hide the in this case
-%D ugly reverse video hyper spot.
-
-\setupinteraction
- [state=start,
- color=white,
- contrastcolor=white,
- style=\underbar,
- click=no]
-
-%D This style looks best in a dark room, full screen.
-
-\setupinteractionscreen
- [option=max]
-
-%D We use colors and remap a couple of standard colors.
-
-\setupcolors
- [state=start]
-
-\definecolor[white] [s=.8]
-\definecolor[red] [r=.7]
-\definecolor[green] [g=.7]
-\definecolor[blue] [b=.7]
-\definecolor[yellow][r=.7,g=.7]
-
-\definecolor [PageColor][black]
-
-%D These colors will cyclic be assigned to \type
-%D {TextColor}.
-
-\definecolor [TextColor 0][white]
-\definecolor [TextColor 1][red]
-\definecolor [TextColor 2][green]
-\definecolor [TextColor 3][blue]
-\definecolor [TextColor 4][yellow]
-
-\definecolor [TextColor] [TextColor 0]
-
-%D We will collect everything in a layer.
-
-\definelayer
- [main]
- [state=repeat]
-
-%D We have quite some overlays.
-
-\defineoverlay [page] [\reuseMPgraphic{page}]
-\defineoverlay [text] [\useMPgraphic{text}]
-\defineoverlay [next] [\overlaybutton{nextpage}]
-\defineoverlay [prev] [\overlaybutton{previouspage}]
-\defineoverlay [main] [\composedlayer{main}]
-
-%D These end up as paper, page and text backgrounds. We need
-%D to locate the foreground, otherwise hyperlinks will not
-%D work.
-
-\setupbackgrounds % otherwise in acrobat 5 rounding error
- [paper] % and one pixel white line
- [backgroundcolor=Pagecolor,
- background=page]
-
-\setupbackgrounds
- [page]
- [background={page,prev,foreground,main}]
-
-\setupbackgrounds
- [text]
- [background=next,
- backgroundoffset=-10pt]
-
-%D This means that clicking on the center brings you to the
-%D next page, while clicking on teh page frame brings you one
-%D page back.
-
-%D As usual, the graphics are handled by \METAPOST:
-
-\startuseMPgraphic{text}
- path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
- color c ; c := (.7+uniformdeviate.3)*\MPcolor{TextColor} ;
- p := p enlarged -1.25pt ;
- filldraw p withcolor c ;
- draw p withpen pencircle scaled 2.5pt withcolor .75c ;
-\stopuseMPgraphic
-
-\startreusableMPgraphic{page}
- path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
- color c ; c := \MPcolor{PageColor} ;
- filldraw p enlarged 5pt withcolor c ; % bleeding
-\stopreusableMPgraphic
-
-%D The text is typeset in a framed text. We cycle trough the
-%D colors by means of a counter. This counter also determines
-%D the positioning on the main layer. The width is slightly
-%D random.
-
-\newcounter\KindOfTopic % and cycle through corners
-\newdimen \TopicWidth % with randomized widths
-
-\defineframedtext
- [TopicText]
- [frame=off,
- offset=10pt,
- style=bold,
- width=\TopicWidth,
- background=text,
- before=,
- after=,
- align=normal]
-
-\def\BeforeTopic
- {\ifcase\KindOfTopic\relax
- \TopicWidth=.7\textwidth
- \definecolor[CharColor][black]
- \else
- \getrandomdimen\TopicWidth{.55\textwidth}{.7\textwidth}
- \definecolor[CharColor][white]
- \fi
- \doifmode{reverse}
- {\setupframedtexts[TopicText][foregroundcolor=CharColor]}
- \definecolor[TextColor][TextColor \KindOfTopic]
- \ifcase\KindOfTopic\relax
- \setuplayer[main][x=.5\textwidth,y=.5\textheight,location=c] \or
- \setuplayer[main][x=0pt, y=0pt, location=rb] \or
- \setuplayer[main][x=\textwidth, y=0pt, location=lb] \or
- \setuplayer[main][x=\textwidth, y=\textheight, location=lt] \or
- \setuplayer[main][x=0pt, y=\textheight, location=rt] \fi}
-
-\def\AfterTopic
- {\ifnum\KindOfTopic=4
- \gdef\KindOfTopic{1}
- \else
- \doglobal\increment\KindOfTopic
- \fi}
-
-\def\StartTopic
- {\BeforeTopic
- \startstandardmakeup
- \setlayer[main] \bgroup \startTopicText[none]
- }%\setupwhitespace[big]} % generates an empty line
-
-\def\StopTopic
- {\stopTopicText \egroup
- \stopstandardmakeup
- \AfterTopic}
-
-%D The title and colofon page are centered on the page.
-
-\def\StartNopic
- {\doglobal\newcounter\KindOfTopic % centered at the page
- \StartTopic
- \bfd\setupinterlinespace
- \setupinteraction[color=,contrastcolor=]%
- \def\\{\blank\bfb\setupinterlinespace\def\\{\blank}}%
- \raggedcenter\ignorespaces}
-
-\def\StopNopic
- {\StopTopic}
-
-\let\StartTitlePage\StartNopic \let\StartColofonPage\StartNopic
-\let\StopTitlePage \StopNopic \let\StopColofonPage \StopNopic
-
-\def\TitlePage #1{\StartTitlePage #1\StopTitlePage}
-\def\ColofonPage#1{\StartColofonPage#1\StopColofonPage}
-
-%D We provide a minimum of title commands.
-
-\definehead
- [Title]
- [title]
-
-\definehead
- [Subject]
- [subject]
-
-\setuphead
- [Title]
- [style=\bfb,
- page=,
- before=,
- after=\blank]
-
-\setuphead
- [Subject]
- [style=\bfa,
- before=\blank,
- after=\blank]
-
-\doifnotmode{demo}{\endinput}
-
-\def\Sample #1 {\input #1 \par \rightaligned{--- #1 ---}}
-
-\starttext
-
-\StartNopic The \ConTeXt\ Test Quotes \\ \currentdate \StopNopic
-
-\StartTopic \Sample tufte \StopTopic
-\StartTopic \Sample knuth \StopTopic
-\StartTopic \Sample zapf \StopTopic
-\StartTopic \Sample douglas \StopTopic
-\StartTopic \Sample stork \StopTopic
-\StartTopic \Sample materie \StopTopic
-
-\StartNopic There Will Be Some More \StopNopic
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-27.tex b/Master/texmf-dist/tex/context/base/s-pre-27.tex
deleted file mode 100644
index 2e201e8df93..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-27.tex
+++ /dev/null
@@ -1,181 +0,0 @@
-%D \module
-%D [ file=s-pre-27,
-%D version=1999.08.20,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 27,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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]
-
-% \setupbodyfont[ppl]
-
-\definetypeface[main][rm][casual][informal][default]
-\loadmapfile[original-micropress-informal.map]
-
-\setupbodyfont[main,10pt]
-
-\setuplayout
- [footerdistance=20pt,
- footer=40pt,
- %footer=24pt,
- %bottomdistance=10pt,
- %bottom=12pt,
- header=0pt,
- backspace=20pt,
- topspace=20pt,
- width=middle,
- height=fit]
-
-% \def\MainTitle#1{\setupfootertexts[\hfill#1]}
-% \def\SubTitle #1{\setupbottomtexts[\hfill#1]}
-%
-% \MainTitle{a dull talk held at \currentdate}
-% \SubTitle {welcome to whatever}
-%
-% \setupbottom
-% [style=\ssbf,
-% color=white]
-%
-% \setupfooter
-% [style=\ssbfb,
-% color=white]
-
-\setupfooter
- [strut=no,
- style=\bfb,
- color=white]
-
-\setupinteraction
- [state=start]
-
-\setupinteractionscreen
- [option=max]
-
-\definecolor[white] [s=.8]
-\definecolor[red] [r=.7]
-\definecolor[green] [g=.7]
-\definecolor[blue] [b=.7]
-\definecolor[yellow][r=.7,g=.7]
-
-\setupcolors
- [state=start]
-
-\defineoverlay [page] [\reuseMPgraphic{page}]
-\defineoverlay [text] [\useMPgraphic {text}]
-\defineoverlay [continue] [\overlaybutton {forward}]
-
-\setupbackgrounds
- [page]
- [background={page,continue}]
-
-\definecolor [PageColor] [red]
-\definecolor [TextColor] [yellow]
-
-\defineframedtext
- [TopicPage]
-
-\defineframedtext
- [TopicText]
-
-\setupframedtexts
- [TopicPage]
- [width=\textwidth,
- height=\textheight,
- offset=overlay]
-
-\setupframedtexts
- [TopicText]
- [offset=10pt,
- style=bold, % hm
- width=\TopicWidth,
- background=text,
- align=normal]
-
-\setupframedtexts
- [TopicPage,TopicText]
- [frame=off,
- depthcorrection=off,
- before=,
- after=]
-
-\newbox \TopicBox
-\newcounter \KindOfTopic
-\newdimen \TopicWidth
-
-\def\KindOfTopic{1}
-
-\def\StartTopic
- {\getrandomdimen\TopicWidth{.5\textwidth}{.7\textwidth}
- \ifcase\KindOfTopic\or
- \setupframedtexts [TopicPage] [align={right,high}] \or
- \setupframedtexts [TopicPage] [align={left,high}] \or
- \setupframedtexts [TopicPage] [align={left,low}] \or
- \setupframedtexts [TopicPage] [align={right,low}] \fi
- \setbox\scratchbox=\vbox \bgroup \dontcomplain
- \noindent \startTopicPage [none]
- \noindent \startTopicText [none]
- \setuptolerance [verytolerant,stretch]}
-
-\def\StopTopic%
- {\stopTopicText
- \stopTopicPage
- \egroup
- \global\setbox\TopicBox=\vbox
- {\startoverlay
- {\box\TopicBox} {\box\scratchbox}
- \stopoverlay}
- \copy\TopicBox
- \ifnum\KindOfTopic=4
- \def\KindOfTopic{1}
- \else
- \increment\KindOfTopic
- \fi
- \page}
-
-\startuseMPgraphic{text}
- path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
- color c ; c := (.7+uniformdeviate.3)*\MPcolor{TextColor} ;
- p := p enlarged -1.25pt ;
- fill p withcolor c ;
- draw p withpen pencircle scaled 2.5pt withcolor .75c ;
-\stopuseMPgraphic
-
-\startreusableMPgraphic{page}
- path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
- color c ; c := \MPcolor{PageColor} ;
- fill p withcolor c ;
- draw p withpen pencircle scaled 2.5pt withcolor c ;
-\stopreusableMPgraphic
-
-\def\StartNopic#1\StopNopic
- {\setupfootertexts
- [\vbox to \footerheight
- {\vfill
- \raggedleft
- \def\\{\endgraf\tx\setstrut\strut}
- \setstrut\strut\ignorespaces#1\unskip\endgraf\removedepth}]
- \null \page}
-
-\def\TitlePage#1%
- {\StartNopic#1\StopNopic}
-
-\setuphead[title] [style=\bfc,after=\blank]
-\setuphead[subject][style=\bfa,before=\blank]
-
-\doifnotmode{demo}{\endinput}
-
-\starttext
-
-\TitlePage
- {a dull talk held at \currentdate\\welcome to whatever}
-
-\dorecurse{10}{\StartTopic \input tufte \StopTopic}
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-30.mkii b/Master/texmf-dist/tex/context/base/s-pre-30.mkii
deleted file mode 100644
index a7152deb60b..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-30.mkii
+++ /dev/null
@@ -1,258 +0,0 @@
-%D \module
-%D [ file=s-pre-30,
-%D version=2006.04.25,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 30,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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[streams]
-
-\setuppapersize
- [S6] [S6]
-
-\setupbodyfont
- [12pt,tt]
-
-\definemeasure[bleed][6pt]
-
-\definecolor[maincolor-3][r=.5,g=.2,b=.2]
-\definecolor[maincolor-1][r=.2,g=.5,b=.2]
-\definecolor[maincolor-2][r=.2,g=.2,b=.5]
-
-\definecolor[pagecolor] [s=.5]
-\definecolor[resultcolor][s=1,t=.85,a=1]
-\definecolor[maincolor] [maincolor-3]
-
-\definecolorgroup
- [maingroup]
- [.5:.2:.2,
- .2:.5:.2,
- .2:.2:.5]
-
-\definecolorgroup
- [resultgroup]
- [1:.85:.85,
- .85:1:.85,
- .85:.85:1]
-
-\def\CurrentColor{1}
-
-\definecolor[maincolor] [maingroup:\CurrentColor]
-\definecolor[resultcolor][resultgroup:\CurrentColor]
-
-\def\NextColor{\ifnum\CurrentColor=3 \def\CurrentColor{1}\else\doglobal\increment\CurrentColor\fi}
-
-\setuplayout
- [backspace=\measure{bleed},
- topspace=30pt,
- bottomdistance=\measure{bleed},
- bottom=\dimexpr30pt-\measure{bleed}\relax,
- header=0pt,
- footer=0pt,
- topdistance=\measure{bleed},
- top=\dimexpr30pt-\measure{bleed}\relax,
- width=middle,
- height=middle]
-
-\setuptop
- [before=\vfill,
- after=\vfill,
- strut=yes]
-
-\setupbackgrounds
- [text]
- [backgroundoffset=\measure{bleed},
- background=color,
- backgroundcolor=maincolor]
-
-\setupbackgrounds
- [page]
- [background=color,
- backgroundcolor=pagecolor]
-
-\setupcolors
- [state=start,
- textcolor=white]
-
-\setuphead
- [chapter]
- [style=\ttd]
-
-\setuphead
- [section]
- [style=\ttd]
-
-\defineproperty
- [result]
- [layer]
- [state=stop]
-
-\definelayer
- [result]
-
-\setuplayer
- [result]
- [width=\textwidth,
- height=\textheight]
-
-\setupbackgrounds
- [text]
- [background={color,toggle,foreground,result}]
-
-\setupinteraction
- [state=start,
- click=no,
- menu=on,
- color=white,
- contrastcolor=white,
- closepageaction=HideLayer{result},
- openpageaction=HideLayer{result}]
-
-% We add a dummy color switch so that each page has at least one
-% transparency; else acrobat will render the pages differently
-% bug in 6 and 7).
-
-\startinteractionmenu[bottom]
-% \color[resultcolor]{ }%
- \hfill
- \got [content] content \\
- \got [previouspage] previous \\
- \got [nextpage] next \\
- \got [ToggleLayer{result}] result \\
- \got [CloseDocument] close \\
-\stopinteractionmenu
-
-\setuphead
- [section]
- [placehead=no,
- incrementnumber=list]
-
-\setuplist
- [section]
- [alternative=f]
-
-\defineoverlay
- [toggle]
- [\overlaybutton{ToggleLayer{result}}]
-
-\definestreamlayer
- [resultstream]
-
-\startsetups streamlayer:resultstream:flush
- \setlayer
- [result]
- [preset=middlebottom,
- hoffset=\measure{bleed},
-% voffset=-\measure{bleed}]
- voffset=\measure{bleed}]
- {\startproperty[result]%
-% \framed
-% [offset=overlay,
-% frame=off,
-% background=color,
-% backgroundoffset=1\dimexpr\measure{bleed}\relax,
-% backgroundcolor=maincolor]
- {\framed
- [offset=overlay,
- frame=off,
- foregroundcolor=maincolor,
- background=color,
- backgroundoffset=1\dimexpr\measure{bleed}\relax,
- backgroundcolor=resultcolor]
- {\tightlayer[\currentstreamlayer]}}
- \stopproperty}
-\stopsetups
-
-\startsetups show-definition
- \subject{definition}
- \typebuffer
- \getbuffer
- \page
-\stopsetups
-
-\startsetups show-result
- \startstreamlayer[resultstream]
- \subject{result}
- \getbuffer
- \stopstreamlayer
- \placestreamlayer[resultstream]
- \page
-\stopsetups
-
-\startsetups show-usage
- \subject{usage}
- \typebuffer
- \startstreamlayer[resultstream]
- \subject{result}
- \getbuffer
- \stopstreamlayer
- \placestreamlayer[resultstream]
- \page
-\stopsetups
-
-\startsetups show-usage-lines
- \subject{usage}
- \typebuffer
- \startstreamlayer[resultstream]
- \subject{result}
- \startlines
- \getbuffer
- \stoplines
- \stopstreamlayer
- \placestreamlayer[resultstream]
- \page
-\stopsetups
-
-\startsetups show-contents
- \startcolumns[n=3]
- \placelist[section][criterium=text]
- \stopcolumns
- \pagereference[content]
- \page
- \NextColor
-\stopsetups
-
-\def\TitlePage#1%
- {\title{#1}
- \setups{show-contents}}
-
-\def\StartSample#1%
- {\starttext
- \page
- \section{#1}
- \setuptoptexts[][\processedfile\enspace:\enspace\lowercase{#1}]}
-
-\def\StopSample
- {\page
- \setuptoptexts[][]
- \stoptext
- \NextColor}
-
-\endinput
-
-\usemodule[pre-30]
-
-% \TitlePage{Howling to the moon}
-
-\StartSample{Basics}
-
-\startbuffer
-\lua{a = 1.5 ; b = 1.8 ; c = a*b ; tex.print(c) ;}
-
-\startlua
- a = 1
- b = 2
- c = a*b
- tex.print(c)
-\stoplua
-\stopbuffer
-
-\setups{show-usage}
-
-\StopSample
diff --git a/Master/texmf-dist/tex/context/base/s-pre-30.mkiv b/Master/texmf-dist/tex/context/base/s-pre-30.mkiv
deleted file mode 100644
index 1be85d02b1c..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-30.mkiv
+++ /dev/null
@@ -1,257 +0,0 @@
-%D \module
-%D [ file=s-pre-30,
-%D version=2006.04.25,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 30,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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[streams]
-
-\setuppapersize
- [S6] [S6]
-
-\setupbodyfont
- [12pt,tt]
-
-\definemeasure[bleed][6pt]
-
-\definecolor[maincolor-3][r=.5,g=.2,b=.2]
-\definecolor[maincolor-1][r=.2,g=.5,b=.2]
-\definecolor[maincolor-2][r=.2,g=.2,b=.5]
-
-\definecolor[pagecolor] [s=.5]
-\definecolor[resultcolor][s=1,t=.85,a=1]
-\definecolor[maincolor] [maincolor-3]
-
-\definecolorgroup
- [maingroup]
- [.5:.2:.2,
- .2:.5:.2,
- .2:.2:.5]
-
-\definecolorgroup
- [resultgroup]
- [1:.85:.85,
- .85:1:.85,
- .85:.85:1]
-
-\def\CurrentColor{1}
-
-\definecolor[maincolor] [maingroup:\CurrentColor]
-\definecolor[resultcolor][resultgroup:\CurrentColor]
-
-\def\NextColor{\ifnum\CurrentColor=3 \def\CurrentColor{1}\else\doglobal\increment\CurrentColor\fi}
-
-\setuplayout
- [backspace=\measure{bleed},
- topspace=30pt,
- bottomdistance=\measure{bleed},
- bottom=\dimexpr30pt-\measure{bleed}\relax,
- header=0pt,
- footer=0pt,
- topdistance=\measure{bleed},
- top=\dimexpr30pt-\measure{bleed}\relax,
- width=middle,
- height=middle]
-
-\setuptop
- [before=\vfill,
- after=\vfill,
- strut=yes]
-
-\setupbackgrounds
- [text]
- [backgroundoffset=\measure{bleed},
- background=color,
- backgroundcolor=maincolor]
-
-\setupbackgrounds
- [page]
- [background=color,
- backgroundcolor=pagecolor]
-
-\setupcolors
- [state=start,
- textcolor=white]
-
-\setuphead
- [chapter]
- [style=\ttd]
-
-\setuphead
- [section]
- [style=\ttd]
-
-\defineviewerlayer
- [result]
- [state=stop]
-
-\definelayer
- [result]
-
-\setuplayer
- [result]
- [width=\textwidth,
- height=\textheight]
-
-\setupbackgrounds
- [text]
- [background={color,toggle,foreground,result}]
-
-\setupinteraction
- [state=start,
- click=no,
- menu=on,
- color=white,
- contrastcolor=white,
- closepageaction=HideLayer{result},
- openpageaction=HideLayer{result}]
-
-% We add a dummy color switch so that each page has at least one
-% transparency; else acrobat will render the pages differently
-% bug in 6 and 7).
-
-\startinteractionmenu[bottom]
-% \color[resultcolor]{ }%
- \hfill
- \got [content] content \\
- \got [previouspage] previous \\
- \got [nextpage] next \\
- \got [ToggleLayer{result}] result \\
- \got [CloseDocument] close \\
-\stopinteractionmenu
-
-\setuphead
- [section]
- [placehead=no,
- incrementnumber=list]
-
-\setuplist
- [section]
- [alternative=f]
-
-\defineoverlay
- [toggle]
- [\overlaybutton{ToggleLayer{result}}]
-
-\definestreamlayer
- [resultstream]
-
-\startsetups streamlayer:resultstream:flush
- \setlayer
- [result]
- [preset=middlebottom,
- hoffset=\measure{bleed},
-% voffset=-\measure{bleed}]
- voffset=\measure{bleed}]
- {\startviewerlayer[result]%
-% \framed
-% [offset=overlay,
-% frame=off,
-% background=color,
-% backgroundoffset=1\dimexpr\measure{bleed}\relax,
-% backgroundcolor=maincolor]
- {\framed
- [offset=overlay,
- frame=off,
- foregroundcolor=maincolor,
- background=color,
- backgroundoffset=1\dimexpr\measure{bleed}\relax,
- backgroundcolor=resultcolor]
- {\tightlayer[\currentstreamlayer]}}
- \stopviewerlayer}
-\stopsetups
-
-\startsetups show-definition
- \subject{definition}
- \typebuffer
- \getbuffer
- \page
-\stopsetups
-
-\startsetups show-result
- \startstreamlayer[resultstream]
- \subject{result}
- \getbuffer
- \stopstreamlayer
- \placestreamlayer[resultstream]
- \page
-\stopsetups
-
-\startsetups show-usage
- \subject{usage}
- \typebuffer
- \startstreamlayer[resultstream]
- \subject{result}
- \getbuffer
- \stopstreamlayer
- \placestreamlayer[resultstream]
- \page
-\stopsetups
-
-\startsetups show-usage-lines
- \subject{usage}
- \typebuffer
- \startstreamlayer[resultstream]
- \subject{result}
- \startlines
- \getbuffer
- \stoplines
- \stopstreamlayer
- \placestreamlayer[resultstream]
- \page
-\stopsetups
-
-\startsetups show-contents
- \startcolumns[n=3]
- \placelist[section][criterium=text]
- \stopcolumns
- \pagereference[content]
- \page
- \NextColor
-\stopsetups
-
-\def\TitlePage#1%
- {\title{#1}
- \setups{show-contents}}
-
-\def\StartSample#1%
- {\starttext
- \page
- \section{#1}
- \setuptoptexts[][\processedfile\enspace:\enspace\lowercase{#1}]}
-
-\def\StopSample
- {\page
- \setuptoptexts[][]
- \stoptext
- \NextColor}
-
-\endinput
-
-\usemodule[pre-30]
-
-% \TitlePage{Howling to the moon}
-
-\StartSample{Basics}
-
-\startbuffer
-\lua{a = 1.5 ; b = 1.8 ; c = a*b ; context(c) ;}
-
-\startlua
- a = 1
- b = 2
- c = a*b
- context(c)
-\stoplua
-\stopbuffer
-
-\setups{show-usage}
-
-\StopSample
diff --git a/Master/texmf-dist/tex/context/base/s-pre-50.tex b/Master/texmf-dist/tex/context/base/s-pre-50.tex
deleted file mode 100644
index ff3e48631ea..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-50.tex
+++ /dev/null
@@ -1,101 +0,0 @@
-%D \module
-%D [ file=s-pre-50,
-%D version=2003.01.26,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 50,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D When my mailbox started to overflow with messages about
-%D problems with the presentation step mechanism, I looked up
-%D old presentaton, hacked a bit and cooked up an alternative
-%D that is less dependent on \PDF\ trickery.
-%D
-%D Consider it a cheap trick and prelude to a couple of new
-%D presentation styles. (At the time of writing this, I
-%D still have some 10 of those styles to clean up and
-%D document.) You can give it a try:
-%D
-%D \starttyping
-%D texexec --pdf --mode=demo s-pre-50
-%D \stoptyping
-
-% Basic definitions.
-
-\defineframedtext
- [horizontal]
- [width=\textwidth,
- frame=off,
- strut=no,
- height=fit,
- align={right,lohi},
- before=,
- after=]
-
-\definecollector
- [contribution]
- [state=repeat,
- corner={left,bottom},
- location={right,bottom}]
-
-%D An example of tuning:
-
-\startmode[demo]
-
- \setupcollector
- [contribution]
- [voffset=-.25\bodyfontsize]
-
- \setupframedtexts
- [horizontal]
- [background=color,
- backgroundcolor=darkgray,
- foregroundcolor=white]
-
-\stopmode
-
-%D Structure and trick.
-
-\def\StartSteps
- {\doifnotmode{mkiv}{\checkutilities}}
-
-\def\StopSteps
- {\resetcollector[contribution]}
-
-\long\def\StartStep#1\StopStep
- {\setcollector
- [contribution]
- {\starthorizontal[none]#1\stophorizontal}
- \flushcollector[contribution]
- \page}
-
-%D Trick. Nowadays we can use streams.
-
-\installoutputroutine\FlushStep
- {\StartStep\unvbox\normalpagebox\StopStep}
-
-%D Demo.
-
-\doifnotmode{demo}{\endinput}
-
-\setupcolors[state=start] \setuppapersize[S6][S6] \setuplayout[middle]
-
-\starttext
-
-\StartSteps
-
- \title[whow]{How Much?} \FlushStep
- \item More \FlushStep
- \item And More \FlushStep
- \item And Even More \FlushStep
-
- \StartStep And So On \StopStep
-
-\StopSteps
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-60.mkii b/Master/texmf-dist/tex/context/base/s-pre-60.mkii
deleted file mode 100644
index 8823c66ce1e..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-60.mkii
+++ /dev/null
@@ -1,143 +0,0 @@
-%D \module
-%D [ file=s-pre-60,
-%D version=2004.03.15,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 60,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\startmode[paper,print]
- \let\StartSteps\relax
- \let\StopSteps \relax
- \let\FlushStep \relax
- \let\ResetStep \relax
- \let\StartBusy\relax
- \let\StopBusy \relax
- \endinput
-\stopmode
-
-\newcounter\StepCounter
-\newcounter\StepMaximum
-
-\useJSscripts[stp]
-
-\startsetups[set-stepper]
-
- \ifnum\getvariable{stepper}{nofsteps}>\StepMaximum
-
- \dostepwiserecurse {\numexpr(\StepMaximum+1)} {\getvariable{stepper}{nofsteps}} {1}
- {\doifnotmode{nosteps,nostep}
- {\expanded{\defineproperty[step:\recurselevel][layer][state=stop,global=yes]}}}
-
- \xdef\StepMaximum{\getvariable{stepper}{nofsteps}}
-
- \fi
-
-\stopsetups
-
-\setvariables
- [stepper]
- [set=\setups{set-stepper},
- nofsteps=50]
-
-\defineproperty[step:busy][layer][state=start,global=no]
-
-\definereference [SetupStepper] [JS(SetupStepper{step,\StepMaximum})]
-\definereference [ResetStepper] [JS(ResetStepper)]
-\definereference [CheckStepper] [JS(CheckStepper{\StepCounter})]
-\definereference [InvokeStepper] [JS(InvokeStepper)]
-
-\def\ResetStep {\doglobal\newcounter\StepCounter}
-\def\NextStep {\doglobal\increment \StepCounter}
-\def\PrevStep {\doglobal\decrement \StepCounter}
-
-% todo: roll back blank
-
-\def\StepLayer {step:\StepCounter}
-\def\NextStepLayer {step:\the\numexpr\StepCounter+1\relax}
-\def\FirstStepLayer{step:1}
-
-\def\StartStep
- {\ifvmode
- \scratchskip\lastskip
- \vskip-\scratchskip
- \startproperty[\StepLayer]%
- \vskip\scratchskip
- \else
- \startproperty[\StepLayer]%
- \fi
- \ignorespaces}
-
-\def\StopStep
- {\removeunwantedspaces
- \stopproperty}
-
-\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
-\to \everyaftershipout
-
-\def\StartBusy{\startproperty[step:busy]\ignorespaces}
-\def\StopBusy {\removeunwantedspaces\stopproperty}
-
-\setupinteraction
- [%openaction=SetupStepper,
- closeaction=ResetStepper,
- openpageaction=CheckStepper,
- closepageaction=ResetStepper]
-
-\defineoverlay[invoke][\overlaybutton{InvokeStepper}]
-
-\setupbackgrounds
- [text]
- [background=invoke]
-
-% 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]
-
-%D Handy:
-
-\def\StartLocalSteps{\ResetStep}
-\def\StopLocalSteps {}
-
-\def\StartLocalStep {\NextStep\StartStep}
-\def\StopLocalStep {\StopStep}
-
-%D used as (given some definitions):
-%D
-%D \starttyping
-%D \StartLocalSteps
-%D \startcombination[both]
-%D {\StartLocalStep\placestreamlayer[left]\StopLocalStep} {}
-%D {\StartLocalStep\placestreamlayer[right]\StopLocalStep} {}
-%D \stopcombination
-%D \StopLocalSteps
-%D \stoptyping
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/s-pre-60.mkiv b/Master/texmf-dist/tex/context/base/s-pre-60.mkiv
deleted file mode 100644
index 70f8978b02c..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-60.mkiv
+++ /dev/null
@@ -1,212 +0,0 @@
-%D \module
-%D [ file=s-pre-60,
-%D version=2004.03.15,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 60,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% use lua instead of global mess
-
-\unprotect
-
-\startmode[paper,print]
- \let\StartSteps\relax
- \let\StopSteps \relax
- \let\FlushStep \relax
- \let\ResetStep \relax
- \let\StartBusy \relax
- \let\StopBusy \relax
- \endinput
-\stopmode
-
-\newcount\c_module_pre_steps_current
-\newcount\c_module_pre_steps_maximum
-\newcount\c_module_pre_steps_nesting_step
-\newcount\c_module_pre_steps_nesting_steps
-\newcount\c_module_pre_steps_nesting_busy
-
-\def\StepCounter {\the\c_module_pre_steps_current}
-\def\StepMaximum {\the\c_module_pre_steps_maximum}
-\def\StepLayer {step:\the\c_module_pre_steps_current}
-\def\NextStepLayer {step:\the\numexpr\c_module_pre_steps_current+\plusone\relax}
-\def\FirstStepLayer{step:1}
-
-\useJSscripts[stp]
-
-\startsetups[set-stepper]
-
- \ifnum\getvariable{stepper}{nofsteps}>\c_module_pre_steps_maximum
-
- \dostepwiserecurse {\numexpr\c_module_pre_steps_maximum+\plusone\relax} {\getvariable{stepper}{nofsteps}} {1} {
- \doifnotmode{nosteps,nostep} {
- \expanded{\defineviewerlayer[step:\recurselevel][state=stop,scope=global]}
- }
- }
-
- \global\c_module_pre_steps_maximum\getvariable{stepper}{nofsteps}\relax
-
- \fi
-
-\stopsetups
-
-\setvariables
- [stepper]
- [set=\setups{set-stepper},
- nofsteps=50]
-
-\defineviewerlayer[step:busy][state=start]
-
-\definereference [SetupStepper] [JS(SetupStepper{step,\StepMaximum})]
-\definereference [ResetStepper] [JS(ResetStepper)]
-\definereference [CheckStepper] [JS(CheckStepper{\StepCounter})]
-\definereference [InvokeStepper] [JS(InvokeStepper)]
-
-% todo: roll back blank
-
-\unexpanded\def\ResetStep
- {\iftrialtypesetting\else
- \global\c_module_pre_steps_current\zerocount
- \fi}
-
-\unexpanded\def\NextStep
- {\iftrialtypesetting\else
- \global\advance\c_module_pre_steps_current\plusone
- \fi}
-
-\unexpanded\def\PrevStep
- {\iftrialtypesetting\else
- \global\advance\c_module_pre_steps_current\minusone
- \fi}
-
-\unexpanded\def\FlushStep
- {\iftrialtypesetting\else
- \StopStep
- \NextStep
- \StartStep
- \fi}
-
-\unexpanded\def\StartStep
- {\iftrialtypesetting\else
- \global\advance\c_module_pre_steps_nesting_step\plusone
- \ifcase\c_module_pre_steps_nesting_step\or
- \startviewerlayer[\StepLayer]%
- \fi
- \fi
- \ignorespaces}
-
-\unexpanded\def\StopStep
- {\removeunwantedspaces
- \iftrialtypesetting\else
- \ifcase\c_module_pre_steps_nesting_step\or
- \stopviewerlayer
- \fi
- \global\advance\c_module_pre_steps_nesting_step\minusone
- \fi}
-
-\unexpanded\def\StartSteps
- {\iftrialtypesetting\else
- \global\advance\c_module_pre_steps_nesting_steps\plusone
- \ifcase\c_module_pre_steps_nesting_steps\or
- \ResetStep
- \NextStep
- \StartStep
- \fi
- \fi}
-
-\unexpanded\def\StopSteps
- {\iftrialtypesetting\else
- \ifcase\c_module_pre_steps_nesting_steps\or
- \StopStep
- \PrevStep
- \fi
- \global\advance\c_module_pre_steps_nesting_steps\minusone
- \fi}
-
-\unexpanded\def\StartBusy
- {\iftrialtypesetting\else
- \global\advance\c_module_pre_steps_nesting_busy\plusone
- \ifcase\c_module_pre_steps_nesting_busy\or
- \startviewerlayer[step:busy]
- \fi
- \fi
- \ignorespaces}
-
-\unexpanded\def\StopBusy
- {\removeunwantedspaces
- \iftrialtypesetting\else
- \ifcase\c_module_pre_steps_nesting_busy\or
- \stopviewerlayer
- \fi
- \global\advance\c_module_pre_steps_nesting_busy\minusone
- \fi}
-
-%D Handy:
-
-\unexpanded\def\StartLocalSteps
- {\ResetStep}
-
-\unexpanded\def\StopLocalSteps
- {}
-
-\unexpanded\def\StartLocalStep
- {\NextStep
- \StartStep}
-
-\unexpanded\def\StopLocalStep
- {\StopStep}
-
-\appendtoks
- \ResetStep
-\to \everyaftershipout
-
-\setupinteraction
- [%openaction=SetupStepper,
- closeaction=ResetStepper,
- openpageaction=CheckStepper,
- closepageaction=ResetStepper]
-
-\defineoverlay[invoke][\overlaybutton{InvokeStepper}]
-
-\setupbackgrounds
- [text]
- [background=invoke]
-
-% 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]
-
-%D used as (given some definitions):
-%D
-%D \starttyping
-%D \StartLocalSteps
-%D \startcombination[both]
-%D {\StartLocalStep\placestreamlayer[left]\StopLocalStep} {}
-%D {\StartLocalStep\placestreamlayer[right]\StopLocalStep} {}
-%D \stopcombination
-%D \StopLocalSteps
-%D \stoptyping
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/s-pre-61.tex b/Master/texmf-dist/tex/context/base/s-pre-61.tex
deleted file mode 100644
index 48b9d09a02a..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-61.tex
+++ /dev/null
@@ -1,275 +0,0 @@
-%D \module
-%D [ file=s-pre-61,
-%D version=2004.03.15,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 61,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Optima
-
-\usemodule[pre-60]
-
-\doifmodeelse {mkiv} {
- \usetypescriptfile[ghz]
- \definetypeface[mainface][ss][sans][optima-nova][default]
-} {
- \usetypescriptfile[type-ghz]
- \definetypeface[mainface][ss][sans][optima-nova][default][encoding=\defaultencoding]
-}
-
-\setupbodyfont[mainface,ss,18pt]
-\setupinterlinespace[line=3.25ex]
-
-\setuppapersize
- [S6][S6]
-
-% \setuppapersize
-% [SW][SW]
-
-\setuplayout
- [topspace=10pt,
- header=30pt,
- headerdistance=20pt,
- height=middle,
- footerdistance=20pt,
- footer=0pt,
- bottomdistance=20pt,
- bottom=20pt,
- bottomspace=50pt,
- backspace=30pt,
- width=middle]
-
-\setupinteraction
- [state=start,
- click=off,
- menu=on,
- style=,
- color=interactioncolor,
- contrastcolor=interactioncolor]
-
-\setupinteractionscreen
- [option=max]
-
-\setupinteractionmenu
- [bottom]
- [color=maincolor,
- contrastcolor=maincolor,
- style=\tfa, % acceptable
- left=\hfill,
- middle=,
- right=,
- height=\bottomheight,
- width=2\bottomheight,
- offset=overlay,
- frame=off]
-
-\startinteractionmenu[bottom]
- \but [firstpage] \symbol[firstpage] \\
- \but [previouspage] \symbol[previouspage] \\
- \but [InvokeStepper] \StartBusy\symbol[PauseRendering]\StopBusy \\
- \but [nextpage] \symbol[nextpage] \\
- \but [lastpage] \symbol[lastpage] \\
- \but [CloseDocument] \symbol[CloseDocument] \\
-\stopinteractionmenu
-
-% maybe in colo-sjk : \setupcolor[sjk]
-
-\definecolor [dark] [s=.4]
-\definecolor [bright] [s=.9]
-
-\definecolor [red] [r=.4,g=.2,b=.2]
-\definecolor [green] [r=.2,g=.4,b=.2]
-\definecolor [blue] [r=.2,g=.2,b=.4]
-
-\definecolor [cyan] [r=.2,g=.4,b=.4]
-\definecolor [magenta][r=.4,g=.2,b=.4]
-\definecolor [yellow] [r=.4,g=.4,b=.2]
-
-\definecolor [pagecolor] [dark]
-\definecolor [maincolor] [bright]
-\definecolor [textcolor] [red]
-
-\definecolor [interactioncolor] [r=.8,g=.8,b=.6]
-
-\setupcolors
- [state=start,
- textcolor=maincolor]
-
-\setupbackgrounds
- [page]
- [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}
- StartPage ;
- fill Page
- enlarged 4pt
- withcolor \MPcolor{pagecolor} ;
- fill Field[Text][Text]
- enlarged 10pt
-% topenlarged (HeaderHeight+HeaderDistance)
- leftenlarged (BackSpace+4pt)
- rightenlarged (CutSpace +4pt)
- withcolor OverlayColor ;
- StopPage ;
-\stopuniqueMPgraphic
-
-\startuniqueMPgraphic{page-plus}
- StartPage ;
- fill Page
- enlarged 4pt
- withcolor \MPcolor{pagecolor} ;
- fill Field[Text][Text]
- enlarged 10pt
- leftenlarged (BackSpace+4pt)
- rightenlarged (CutSpace+4pt)
- withcolor OverlayColor ;
- StopPage ;
-\stopuniqueMPgraphic
-
-% this needs to be sorted out !
-
-\appendtoks
- \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}
-\to \everystarttext
-
-\appendtoks
- \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}
-\to \everystoptext
-
-\setuphead
- [chapter]
- [placehead=empty,
- after={\blank[medium]},
- color=maincolor,
- placenumber=no,
- style=\HeadFont]
-
-\setupheadertexts
- [\doiftextelse{\currentheadnumber}{\placeheadtext[Topic]}{\placeheadtext[Nopic]}]
- []
-
-\setuppagenumbering
- [location=]
-
-\definesymbol
- [emdash]
- [\emdash]
-
-\setupitemize
- [each]
- [loose,serried,joinedup,broad]
- [symbol=emdash]
-
-\setupalign
- [broad,right]
-
-\def\doTitlePage#1#2#3%
- {\startstandardmakeup[headerstate=high]
- \def\\{\def\\{\endgraf\quad\quad}\endgraf\quad\ignorespaces#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]
-
-\def\Topics#1%
- {\Nopic[topics]{#1}
- \startcolumns
- \placelist[Topic]
- \stopcolumns}
-
-\setuplist
- [Topic]
- [alternative=f,
- color=maincolor,
- contrastcolor=maincolor,
- criterium=all]
-
-\defineoverlay[topics][\overlaybutton{topics}]
-
-\setupbackgrounds
- [bottom] [text]
- [background=topics]
-
-\continueifinputfile{s-pre-61.tex}
-
-\starttext
-
-\TitlePage{Stepwise\\Refinement}
-
-\Topics{Topics}
-
-\Topic{Female Artists}
-
-\StartSteps
-
-\startitemize
-\item Fiona Apple \FlushStep
-\item Tori Amos \FlushStep
-\item Kate Bush \FlushStep
-\item Heather Nova \FlushStep
-\item Alanis Morissette \FlushStep
-\item Suzanne Vega \FlushStep
-\stopitemize
-
-\StopSteps
-
-\Topic{Male Composers}
-
-\StartSteps
-
-\startitemize
-\item John Adams \FlushStep
-\item Steve Reich \FlushStep
-\item Louis Andriessen \FlushStep
-\item Olivier Messiaen \FlushStep
-\stopitemize
-
-\StopSteps
-
-\Topic{And Some More}
-
-\StartSteps
-
-\startitemize
-\item Mark Hollis \FlushStep
-\item Roger Waters \FlushStep
-\item David Gilmore \FlushStep
-\item Peter Gabriel \FlushStep
-\item Randy Newman \FlushStep
-\stopitemize
-
-\StopSteps
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-62.tex b/Master/texmf-dist/tex/context/base/s-pre-62.tex
deleted file mode 100644
index a1a405c236b..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-62.tex
+++ /dev/null
@@ -1,224 +0,0 @@
-%D \module
-%D [ file=s-pre-62,
-%D version=2005.03.04,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 62,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Melior
-
-\usemodule[pre-60]
-
-\usetypescriptfile
- [type-ghz]
-
-\doifmodeelse {mkiv} {
-
- \definetypeface[mainface][rm][serif][melior] [default]
- \definetypeface[mainface][tt][mono] [modern] [default][rscale=1.05]
- \definetypeface[mainface][ss][serif][melior] [default]
- \definetypeface[mainface][mm][math] [palatino][default][rscale=0.95]
-
-} {
-
- \definetypeface[mainface][rm][serif][melior] [default][encoding=texnansi]
- \definetypeface[mainface][tt][mono] [modern] [default][encoding=texnansi,rscale=1.05]
- \definetypeface[mainface][ss][serif][melior] [default][encoding=texnansi]
- \definetypeface[mainface][mm][math] [palatino][default][encoding=texnansi,rscale=0.95]
-
-}
-
-\setupbodyfont
- [mainface,14.4pt]
-
-\setuppapersize
- [S6][S6]
-
-\setvariables[layout][dx=0,dy=1,nx=2,ny=2,step=64]
-
-\definemeasure[layoutwd][\dimexpr\paperwidth /\getvariable{layout}{step}\relax]
-\definemeasure[layoutht][\dimexpr\paperheight/\getvariable{layout}{step}\relax]
-
-\setuplayout
- [ width=middle,
- height=middle,
- header=0pt,
- footer=0pt,
- margin=0pt,
- backspace=5\measure{layoutwd},
- topspace=5\measure{layoutht}]
-
-\definelayout
- [step]
- [ backspace=\numexpr2+ \getvariable{layout}{dx}\relax\measure{layoutwd},
- cutspace=\numexpr3+\getvariable{layout}{nx}-\getvariable{layout}{dx}\relax\measure{layoutwd},
- topspace=\numexpr2+ \getvariable{layout}{dy}\relax\measure{layoutht},
- bottomspace=\numexpr3+\getvariable{layout}{ny}-\getvariable{layout}{dy}\relax\measure{layoutht}]
-
-\definecolor[layout:left] [t=.5,a=1,b=1]
-\definecolor[layout:right] [t=.5,a=1,r=1]
-\definecolor[layout:top] [t=.5,a=1,g=1]
-\definecolor[layout:bottom][t=.5,a=1,y=1]
-\definecolor[layout:page] [s=.75]
-
-\definehspace[menu][\measure{layoutwd}]
-
-\setupinteraction
- [state=start,
- click=off,
- style=,
- color=interactioncolor,
- contrastcolor=interactioncolor]
-
-\setupinteractionscreen
- [option=max]
-
-\setupbuttons
- [color=maincolor,
- contrastcolor=maincolor,
- style=\tf, % acceptable
- height=2\measure{layoutht},
- width=2\measure{layoutwd},
- offset=overlay,
- frame=off]
-
-\definecolor[interactioncolor][darkgray]
-\definecolor[maincolor] [lightgray]
-
-\setuptexttexts
- []
- [\vbox to \textheight{\vfill\hfill\setups{menu:content}}]
-
-\startsetups menu:content
-
- \button{\symbol[firstpage]}[firstpage]
- \hspace[menu]
- \button{\symbol[previouspage]}[previouspage]
- \hspace[menu]
- \button{\StartBusy\symbol[PauseRendering]\StopBusy}[InvokeStepper]
- \hspace[menu]
- \button{\symbol[nextpage]}[nextpage]
- \hspace[menu]
- \button{\symbol[lastpage]}[lastpage]
- \hspace[menu]
- \button{\symbol[CloseDocument]}[CloseDocument]
-
-\stopsetups
-
-\startuseMPgraphic{page}{step}
- StartPage ;
- numeric dx, dy ; dx := PaperWidth/\MPvar{step} ; dy := PaperHeight/\MPvar{step} ;
- fill Page withcolor .5white ;
- fill
- ulcorner Page -- urcorner Page --
- urcorner Page shifted (0,-TopSpace+dy) -- ulcorner Page shifted (0,-TopSpace+dy) -- cycle
- withcolor \MPcolor{layout:top} ;
- fill
- llcorner Page -- lrcorner Page --
- lrcorner Page shifted (0,BottomSpace-dy) -- llcorner Page shifted (0,BottomSpace-dy) -- cycle
- withcolor \MPcolor{layout:bottom} ;
- fill
- ulcorner Page -- llcorner Page --
- llcorner Page shifted (BackSpace-dx,0) -- ulcorner Page shifted (BackSpace-dx,0) -- cycle
- withcolor \MPcolor{layout:left} ;
- fill
- urcorner Page -- lrcorner Page --
- lrcorner Page shifted (-CutSpace+dx,0) -- urcorner Page shifted (-CutSpace+dx,0) -- cycle
- withcolor \MPcolor{layout:right} ;
- fill Field[Text][Text] enlarged (dx,dy) withcolor white ;
- fill Field[Text][Text] enlarged (dx,dy) withcolor \MPcolor{layout:page} ;
- StopPage ;
-\stopuseMPgraphic
-
-\defineoverlay[page][\useMPgraphic{page}{step=\getvariable{layout}{step}}]
-
-\setupbackgrounds
- [page]
- [background=page]
-
-\setupcolors
- [state=start]
-
-\startsetups nextstep
- % pagebreak handlers are grouped, so we need to set global
- \ifnum\getvariable{layout}{dx}=\getvariable{layout}{nx}\relax
- \ifnum\getvariable{layout}{dy}=\getvariable{layout}{ny}\relax
- \setxvariables[layout][dy=1]
- \else
- \setxvariables[layout][dy=\the\numexpr\getvariable{layout}{dy}+1\relax]
- \fi
- \setxvariables[layout][dx=1]
- \else
- \setxvariables[layout][dx=\the\numexpr\getvariable{layout}{dx}+1\relax]
- \fi
- % global anyway
- \setuplayout[step]
-\stopsetups
-
-\definefontsynonym[MainTitleFont][SerifBold]
-
-\definefont[ChapterTitleFont][MainTitleFont sa 2]
-
-\appendtoks
- \NormalizeFontHeight \TitleFont {\setstrut\strut\quad} {4\lineheight} {MainTitleFont}
- \NormalizeFontHeight \SubTitleFont {\setstrut\strut\quad} {3\lineheight} {MainTitleFont}
- \NormalizeFontHeight \ChapterNumberFont {XVI} {4\lineheight} {MainTitleFont}
-\to \everystarttext
-
-\setupsection
- [section-2]
- [bodypartconversion=Romannumerals]
-
-\installpagebreakhandler {step} {\setups{nextstep}}
-
-\definepagebreak[chapter][yes,step]
-
-\setuphead
- [chapter]
- [page=chapter,
- command=\MyChapterCommand]
-
-\definehead[Topic][chapter]
-\definehead[Nopic][title]
-
-\setuphead[chapter,Topic,Nopic]
- [numberstyle=\ChapterNumberFont,
- textstyle=\ChapterTitleFont,
- numbercolor=lightgray,
- textcolor=darkgray]
-
-\def\MyChapterCommand#1#2%
- {\hbox \bgroup % we need to nil the strut added by the headplacement
- \setupframed[frame=off,lines=4,offset=overlay]%
- \rlap{\hskip2\lineheight\framed{\setnostrut#1}}\framed{#2}%
- \egroup}
-
-\setupitemize
- [each]
- [R,broad]
- [stopper=,
- color=lightgray]
-
-\def\doTitlePage#1#2#3%
- {\startstandardmakeup[headerstate=high,textstate=stop]
- \setupalign[middle]
- \def\\{\def\\{\endgraf}\endgraf\vfil\ignorespaces#2}%
- \startcolor[darkgray]
- #1\setstrut\setupinterlinespace\vfil#3\vfil
- \stopcolor
- \stopstandardmakeup}
-
-\def\TitlePage {\doTitlePage\TitleFont\relax}
-\def\SubTitlePage{\doTitlePage\TitleFont\SubTitleFont}
-
-\long\def\StartTitlePage #1\StopTitlePage {\TitlePage {#1}}
-\long\def\StartSubTitlePage#1\StopSubTitlePage{\SubTitlePage{#1}}
-
-\endinput
-
diff --git a/Master/texmf-dist/tex/context/base/s-pre-63.tex b/Master/texmf-dist/tex/context/base/s-pre-63.tex
deleted file mode 100644
index 974c67a5f90..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-63.tex
+++ /dev/null
@@ -1,77 +0,0 @@
-%D \module
-%D [ file=s-pre-63,
-%D version=2006.05.11,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 63,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-this module is under reconstruction
-
-\endinput
-
-\usemodule[pre-61,streams]
-
-\definemeasure[textgap] [\dimexpr24pt\relax]
-
-\definemeasure[leftwidth] [\dimexpr.25\textwidth-.5\measure{textgap}\relax]
-\definemeasure[rightwidth][\dimexpr.75\textwidth-.5\measure{textgap}\relax]
-
-\definestreamlayer[left] [width=\measure{leftwidth}]
-\definestreamlayer[right][width=\measure{rightwidth}]
-
-\setupbodyfont[12pt]
-
-\definefont[LeftFont][Normal sa 3]
-
-\setupheader[style=\tfc,before=\vss,after=\vss]
-
-\startsetups streamlayer:left:settings
- \hsize\measure{leftwidth}
- \LeftFont
- \setupinterlinespace
-\stopsetups
-
-\startsetups streamlayer:right:settings
- \hsize\measure{rightwidth}
-\stopsetups
-
-\definecombination[both][distance=\measure{textgap},location=top]
-
-\startsetups place:both
- \startcombination[both]
- {\StartLocalStep\placestreamlayer[left]\StopLocalStep} {}
- {\StartLocalStep\placestreamlayer[right]\StopLocalStep} {}
- \stopcombination
-\stopsetups
-
-\def\StartPage {\page \StartLocalSteps}
-\def\StopPage {\StopLocalSteps \page}
-
-\def\StartLeft {\startstreamlayer[left]}
-\def\StartRight{\startstreamlayer[right]}
-
-\def\StopLeft {\stopstreamlayer}
-\def\StopRight {\stopstreamlayer}
-
-\def\StartPair {}
-\def\StopPair {\setups[place:both]}
-
-% \doifnotmode {demo} {\endinput}
-
-\setupbodyfont[8pt] \definefont[BigFont][Normal sa 4]
-
-\starttext
-
-\StartPage
- \StartPair \StartLeft ZAPF \StopLeft \StartRight \input zapf \StopRight \StopPair
- \StartPair \StartLeft DAVIS \StopLeft \StartRight \input davis \StopRight \StopPair
- \StartPair \StartLeft WARD \StopLeft \StartRight \input ward \StopRight \StopPair
-\StopPage
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-64.tex b/Master/texmf-dist/tex/context/base/s-pre-64.tex
deleted file mode 100644
index ef4889bbb66..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-64.tex
+++ /dev/null
@@ -1,208 +0,0 @@
-%D \module
-%D [ file=s-pre-64,
-%D version=2006.05.11,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 64,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% To be documented, used in 2007
-
-\usemodule[s][pre-60]
-
-\newcounter\shapesynctag
-\newdimen\slantedshapedimen
-\newdimen\slantedshapestep
-\newdimen\slantedshapeleftskip
-\newdimen\slantedshapeoffset
-\newdimen\slantedshapeextra
-
-\positioningtrue
-
-\def\AdaptShape
- {\doglobal\increment\shapesynctag
- \getnoflines\textheight
- \slantedshapestep\dimexpr\slantedshapeleftskip/\noflines\relax
- \leftskip\slantedshapeleftskip
- \scratchdimen\dimexpr\MPy{text:\MPp\shapesynctag}+\MPh{text:\MPp\shapesynctag}-\topskip-\MPy\shapesynctag\relax
- \advance\scratchdimen\slantedshapeextra
- \getnoflines\scratchdimen
- \slantedshapedimen \noflines \slantedshapestep
- \scratchtoks\emptytoks
- \dorecurse{30}
- {\appendetoks
- \the\dimexpr-\slantedshapedimen+\slantedshapeoffset \relax\space
- \the\dimexpr \hsize-2\slantedshapeoffset\relax\space
- \to\scratchtoks
- \advance\slantedshapedimen \slantedshapestep}%
- \parshape 30 \the\scratchtoks
- \strut\xypos\shapesynctag}
-
-\def\AdaptShapeX
- {\doglobal\increment\shapesynctag
- \getnoflines\textheight
- \slantedshapestep\dimexpr\slantedshapeleftskip/\noflines\relax
- \leftskip\slantedshapeleftskip
- \scratchdimen\dimexpr\MPy{text:\MPp\shapesynctag}+\MPh{text:\MPp\shapesynctag}-\topskip-\MPy\shapesynctag\relax
- \advance\scratchdimen\slantedshapeextra
- \getnoflines\scratchdimen
- \slantedshapedimen \noflines \slantedshapestep
- \scratchtoks\emptytoks
- \dorecurse{30}
- {\appendetoks
- \the\dimexpr-\slantedshapedimen+\slantedshapeoffset +5cm \relax\space
- \the\dimexpr \hsize-2\slantedshapeoffset\relax\space
- \to\scratchtoks
- \advance\slantedshapedimen \slantedshapestep}%
- \parshape 30 \the\scratchtoks
- \strut\xypos\shapesynctag}
-
-\setuppapersize[S6][S6]
-
-\setupinteraction
- [state=start,
- click=no]
-
-\setupinteractionscreen
- [option=max]
-
-\setuplayout
- [backspace=12pt,
- topspace=24pt,
- height=middle,
- width=middle,
- header=0pt,
- footer=0pt]
-
-\definecolor[maincolor][b=.5]
-\definecolor[somecolor][g=.5]
-\definecolor[morecolor][r=.5]
-
-\setupcolors
- [textcolor=maincolor,
- state=start]
-
-\setupbackgrounds
- [text]% [text]
- [background={base,text,invoke}]
-
-\definelayer
- [text]
- [width=\textwidth,
- height=\textheight]
-
-\definelayer
- [base]
- [width=\textwidth,
- height=\textheight]
-
-\definetype [epet] [style=,color=morecolor]
-\setuptype [style=,color=somecolor]
-
-\slantedshapeleftskip150pt
-\slantedshapeoffset12pt
-\slantedshapeextra10pt
-
-\startreusableMPgraphic{page}
- StartPage ;
- fill Page withcolor \MPcolor{maincolor} ;
- path p ; p := Field[Text][Text] enlarged 6pt ;
- p :=
- llcorner p shifted (0,-12pt) --
- lrcorner p shifted (-150pt,0) --
- urcorner p shifted (0,12pt) --
- ulcorner p shifted (150pt,0) --
- cycle ;
- fill p
- withcolor .9white ;
- StopPage ;
-\stopreusableMPgraphic
-
-\defineoverlay[page][\reuseMPgraphic{page}]
-\setupbackgrounds[page][background=page]
-
-\setupalign[flushleft]
-
-\def\StartItem
- {\blank[line]
- \begingroup
- \EveryPar {\AdaptShape}} % beware: \ABBREV aan begin gaat fout
-
-\def\StopItem
- {\endgraf
- \endgroup
- \blank[line]}
-
-\def\StartType
- {\blank[halfline]
- \begingroup
- \EveryPar {\AdaptShape}
- \dontleavehmode \quad}
-
-\def\StopType
- {\endgraf
- \endgroup
- \blank[halfline]}
-
-\def\Title#1%
- {\page
- \setlayer
- [text]
- [preset=lefttop,
- rotation=90]
- {\color[white]{\scale[height=24pt]{\strut#1}}}}
-
-\def\SetBanner#1%
- {\setuplayer[base][state=repeat]
- \setlayer[base][preset=rightbottom]{\color[white]{\scale[height=9pt]{\strut#1}}}}
-
-\let\TitleFont\relax
-
-\startmode[atpragma]
- \definefontfeature[default][method=node,script=latn,language=dflt,liga=yes,onum=yes,kern=yes]
- \definefont[TitleFont][palatinosanscom-bold*default at 48pt]
- \definefont[MainTextFont][palatinosanscom-regular*default at 12pt] \setupinterlinespace[line=15pt]
- \appendtoks
- \MainTextFont % hack, as we define a bodyfont at that point (better have a proper typeface)
- \to \everystarttext
-\stopmode
-
-\doifnotmode{demo}{\endinput}
-
-\starttext
-
-\usemodule[abr-01]
-
-\SetBanner{tug 2007 san diego}
-
-\Title {hans hagen}
-
-\startstandardmakeup \TitleFont \setupinterlinespace[line=3ex] \vfill
-
-\StartItem \dontleavehmode \quad {\morecolor zapfino, a} \StopItem
-\StartItem \dontleavehmode \quad {\morecolor torture test} \StopItem
-\StartItem \dontleavehmode \quad {\morecolor for luatex} \StopItem
-
-\vfill \stopstandardmakeup
-
-\Title{loading fonts}
-
-\StartSteps
-
-\StartItem the \OPENTYPE\ font reader is borrowed from \FONTFORGE\ \FlushStep \StopItem
-\StartItem once it was ready, we could look into such a font \FlushStep \StopItem
-\StartItem it tooks while to figure out the format due to rather fuzzy specs \FlushStep \StopItem
-\StartItem it took us even more time to find out that the loader was flawed \FlushStep \StopItem
-\StartItem one reason was that fonts themselves may have bugs or be incomplete \FlushStep \StopItem
-\StartItem then we changed to \FONTFORGE\ version 2 \FlushStep \StopItem
-\StartItem this made the missing pieces surface in more complex feature handling \FlushStep \StopItem
-\StartItem while implementing features the new table format was cleaned up \FlushStep \StopItem
-
-\StopSteps
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-66.tex b/Master/texmf-dist/tex/context/base/s-pre-66.tex
deleted file mode 100644
index 3e89e4a7e11..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-66.tex
+++ /dev/null
@@ -1,161 +0,0 @@
-%D \module
-%D [ file=s-pre-66,
-%D version=2009.02.24,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 66,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Cambria (made in the aftermath of testing \OPENTYPE\ math).
-
-% \enablemode[paper]
-
-\usemodule[pre-60]
-\usemodule[abr-01]
-
-\definepapersize
- [wide]
- [width=960pt,
- height=600pt]
-
-\setuppapersize
- [wide]
- [wide]
-
-\setuplayout
- [topspace=20pt,
- bottomspace=20pt,
- header=0pt,
- footer=0pt,
- backspace=20pt,
- height=middle,
- rightmargin=0pt,
- rightedge=\dimexpr220pt-40pt\relax,
- rightedgedistance=40pt,
- leftedge=0pt,
- leftmargin=0pt,
- cutspace=220pt,
- width=\dimexpr960pt-40pt-220pt\relax]
-
-\definebodyfontenvironment
- [20pt]
-
-\definefontfeature[default][default][mode=node,script=latn]
-
-\usetypescript
- [cambria]
-
-\setupbodyfont
- [cambria,20pt] \bf
-
-\setupwhitespace
- [big]
-
-\setupcolors
- [state=start]
-
-\definecolor[pagecolor][s=.25]
-\definecolor[edgecolor][b=.50,g=.75,r=.75]
-
-\setupinteraction
- [state=start,
- click=no,
- color=,
- contrastcolor=]
-
-\defineoverlay[pagegraphic][\reuseMPgraphic{pagegraphic}]
-
-\startuseMPgraphic{pagegraphic}
- StartPage ;
- fill Page enlarged 10pt withcolor \MPcolor{pagecolor} ;
- fill Page enlarged 10pt leftenlarged (CutSpace - bbwidth(Page) - 10pt) withcolor \MPcolor{edgecolor} ;
- % fill Field[Text][RightEdge] withcolor green ;
- % fill Field[Text][Text] withcolor yellow ;
- StopPage ;
-\stopuseMPgraphic
-
-\setupbackgrounds
- [page]
- [background=pagegraphic]
-
-\setupbackgrounds
- [text]
- [rightedge]
- [background=edge]
-
-\definelayer
- [edge]
- [width=\rightedgewidth,
- state=repeat]
-
-\setuphead
- [chapter]
- [style=\bfc,
- color=edgecolor]
-
-\setupcolors
- [textcolor=edgecolor]
-
-\newcounter\MyCounter
-
-\def\StartRemark#1%
- {\doglobal\increment\MyCounter % hm, we could use the autoref (todo in cont-xp)
- \title[topic:\MyCounter]{#1}
- \setlayer[edge][preset=middletop,y=\thelayerheight{edge}]{\strut\color[pagecolor]{\bf\goto{#1}[topic:\MyCounter]}}
- \StartSteps}
-
-\def\StopRemark
- {\StopSteps
- \page}
-
-\def\StartRemark#1%
- {\doglobal\increment\MyCounter % hm, we could use the autoref (todo in cont-xp)
- \title[topic:\MyCounter]{#1}
- \StartSteps
- \def\StopRemark
- {\StopSteps
- \page
- \setlayer[edge][preset=middletop,y=\thelayerheight{edge}]{\strut\color[pagecolor]{\bf\goto{#1}[topic:\MyCounter]}}}}
-
-\def\StartTitlePage
- {\startstandardmakeup[top=\vss,bottom=\vss\vss]
- \definedfont[Bold sa 4]
- \raggedcenter
- \setupinterlinespace
- \baselineskip=1\baselineskip plus 1fil minus 1fil\relax}
-
-\def\StopTitlePage
- {\stopstandardmakeup}
-
-\doifnotmode{demo} {\endinput}
-
-\starttext
-
-\StartTitlePage x\\y\\z \StopTitlePage
-
-\StartRemark{a}
- a \FlushStep
- a \FlushStep
-\StopRemark
-
-\StartRemark{b}
- b \FlushStep
- b \FlushStep
- b \FlushStep
-\StopRemark
-
-\StartRemark{c}
- c \FlushStep
- c \FlushStep
- c \FlushStep
- c \FlushStep
-\StopRemark
-
-\stoptext
-
-
diff --git a/Master/texmf-dist/tex/context/base/s-pre-67.tex b/Master/texmf-dist/tex/context/base/s-pre-67.tex
deleted file mode 100644
index 84ea1a66c93..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-67.tex
+++ /dev/null
@@ -1,155 +0,0 @@
-% todo: version of placement that also takes the sync node
-
-\usemodule[s][abr-02]
-\usemodule[s][pre-60]
-
-\definecolor[red:fullcolor] [r=1]
-\definecolor[red:lightcolor] [r=.5]
-\definecolor[red:darkcolor] [r=.375]
-
-\definecolor[green:fullcolor] [g=1]
-\definecolor[green:lightcolor] [g=.5]
-\definecolor[green:darkcolor] [g=.375]
-
-\definecolor[blue:fullcolor] [b=1]
-\definecolor[blue:lightcolor] [b=.5]
-\definecolor[blue:darkcolor] [b=.375]
-
-\definepalet[red-scheme] [fullcolor=red:fullcolor, lightcolor=red:lightcolor, darkcolor=red:darkcolor]
-\definepalet[green-scheme][fullcolor=green:fullcolor,lightcolor=green:lightcolor,darkcolor=green:darkcolor]
-\definepalet[blue-scheme] [fullcolor=blue:fullcolor, lightcolor=blue:lightcolor, darkcolor=blue:darkcolor]
-
-\setuppalet[red-scheme]
-
-\setupcolors
- [textcolor=darkcolor]
-
-\setupinteraction
- [color=darkcolor,
- contrastcolor=darkcolor]
-
-\startuseMPgraphic{bullet}
- path b, p ;
- p := fullsquare scaled .5LineHeight ;
- b := boundingbox p ;
- p := p rotatedaround(center p, 45) ;
- p := p shifted (0,-.125StrutDepth) ;
- fill p withcolor \MPcolor{lightcolor} ;
- setbounds currentpicture to b ;
-\stopuseMPgraphic
-
-\startuseMPgraphic{bar}
- path b, p ;
- p := fullsquare scaled .25LineHeight ;
- b := boundingbox p ;
- p := p rotatedaround(center p, 45) ;
- p := p shifted (0,+.25StrutDepth) ;
- fill p withcolor \MPcolor{lightcolor} ;
- setbounds currentpicture to b ;
-\stopuseMPgraphic
-
-\startuseMPgraphic{page}
- StartPage ;
- fill Page enlarged 5mm withcolor .1[white,\MPcolor{fullcolor}] ;
- interim linecap := butt ;
- numeric h ; h := bbheight(Page)/4 ;
- numeric w ; w := bbwidth(Page)/4 ;
- h := h randomized(h) ;
- w := w randomized(w) ;
- draw
- ulcorner Page shifted (0,-h) -- ulcorner Page -- ulcorner Page shifted (w,0)
- withpen pensquare scaled .5cm
- withcolor \MPcolor{lightcolor} ;
- numeric h ; h := bbheight(Page)/4 ;
- numeric w ; w := bbwidth(Page)/4 ;
- h := h randomized(h) ;
- w := w randomized(w) ;
- draw
- lrcorner Page shifted (0,h) -- lrcorner Page -- lrcorner Page shifted (-w,0)
- withpen pensquare scaled .5cm
- withcolor \MPcolor{lightcolor} ;
- setbounds currentpicture to Page ;
- StopPage ;
-\stopuseMPgraphic
-
-\defineoverlay[page][\useMPgraphic{page}]
-
-\definesymbol[1][\reuseMPgraphic{bullet}]
-\definesymbol[2][\reuseMPgraphic{bar}]
-
-\setupitemgroup[itemize][2][width=1em]
-
-\setupinteraction
- [state=start,
- click=no]
-
-\setuppapersize
- [S6][S6]
-
-\setuplayout
- [width=middle,
- height=middle,
- header=0pt,
- footer=0pt,
- backspace=1cm,
-% topspace=1cm]
- topspace=.5cm]
-
-\setupbackgrounds
- [page]
- [background=page]
-
-\setuphead
- [chapter]
- [command=\MyCommand,
- before=,
- after={\blank[disable]},
- color=lightcolor,
- style=\bfc]
-
-\definelayer
- [title]
- [width=\paperwidth,
- height=\paperheight]
-
-\setupbackgrounds
- [page]
- [background={page,title}]
-
-\setupwhitespace
- [big]
-
-\unexpanded\def\MyCommand#1#2%
- {\setlayer[title][preset=rightbottom,x=.75cm,y=.5cm]{#2}}
-
-\def\titlepage#1#2%
- {\startstandardmakeup
- \definefont[LargeFont][Normal at 100pt]
- \setlayerframed
- [title]
- [preset=lefttop,x=1cm,y=.25cm]
- [align=flushleft,foregroundstyle=\LargeFont,offset=0pt,foregroundcolor=lightcolor,frame=off]
- {#1}
- \definefont[SmallFont][Normal at 50pt]
- \setlayerframed
- [title]
- [preset=rightbottom,x=1cm,y=.5cm]
- [align=flushright,foregroundstyle=\SmallFont,offset=0pt,foregroundcolor=lightcolor,frame=off]
- {#2}
- \stopstandardmakeup}
-
-\let\Title\title
-\let\TitlePage\titlepage
-
-\doifnotmode{demo}{\endinput}
-
-\starttext
- \chapter{Test}
- \startitemize
- \startitem test \stopitem
- \startitem test \stopitem
- \startitem test \stopitem
- \stopitemize
-\stoptext
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/s-pre-68.tex b/Master/texmf-dist/tex/context/base/s-pre-68.tex
deleted file mode 100644
index 3c04a87e15a..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-68.tex
+++ /dev/null
@@ -1,150 +0,0 @@
-%D \module
-%D [ file=s-pre-68,
-%D version=2009.08.28,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 68,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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[pre-60,abr-02]
-
-% style
-
-\setuppapersize
- [S66][S66]
-
-\setuplayout
- [height=middle,
- width=middle,
- header=0pt,
- footer=0pt,
- backspace=2cm,
- topspace=2cm]
-
-\setupinteraction
- [state=start,
- click=no]
-
-\definecolor[maincolor][r=.4]
-
-\startreusableMPgraphic{page}
- StartPage ;
- fill Page enlarged 5mm withcolor \MPcolor{maincolor} ;
- StopPage ;
-\stopreusableMPgraphic
-
-\startreusableMPgraphic{next}
- fill ultriangle scaled .15PaperWidth withcolor white ;
-\stopreusableMPgraphic
-
-\startreusableMPgraphic{last}
- fill boundingbox(ultriangle scaled .15PaperWidth) withcolor white ;
-\stopreusableMPgraphic
-
-\startuniqueMPgraphic{bullit}
- fill ultriangle scaled 2ExHeight withcolor white ;
-\stopuniqueMPgraphic
-
-\definelayer
- [extra]
- [width=\paperwidth,
- height=\paperheight]
-
-\defineoverlay
- [page]
- [\reuseMPgraphic{page}]
-
-\setupbackgrounds
- [page]
- [background={page,extra}]
-
-\setupcolors
- [state=start,
- textcolor=white]
-
-\setuphead
- [chapter]
- [style=\bfc]
-
-\definehead[Title][title]
-
-\definesymbol[MyBullet][\uniqueMPgraphic{bullit}]
-
-\setupitemgroup[itemize][each][symbol=MyBullet]
-
-\usetypescript[cambria]
-\setupbodyfont[cambria,14.4pt]
-
-% interface
-
-\def\StartItems
- {\begingroup
- \StartSteps
- \startitemize
- \def\StartItems{\startitemize\def\StopItems{\stopitemize}}}
-
-\def\StopItems
- {\FlushStep
- \stopitemize
- \NextPageSymbol
- \StopSteps
- \endgroup}
-
-\def\Item
- {\def\Item{\FlushStep\item}
- \item}
-
-\def\NextPageSymbol
- {\setlayer
- [extra]
- [preset=rightbottom,offset=2mm]
- {\ifnum\realpageno=\lastpage
- \reuseMPgraphic{last}%
- \else\ifnum\realpageno>1
- \reuseMPgraphic{next}%
- \fi\fi
- \FlushStep}}
-
-\def\TitlePage#1#2%
- {\startstandardmakeup[bottom=,top=]
- \scale[width=\textwidth]{\framed[align=flushleft,foregroundstyle=\bf,frame=off]{#1}}
- \vfilll
- \hfill\scale[width=.5\textwidth]{\framed[align=flushright,foregroundstyle=\bf,frame=off]{#2}}
- \stopstandardmakeup}
-
-\doifnotmode{demo}{\endinput}
-
-\starttext
-
-\TitlePage{I'm running\\out of examples}{Hans Hagen\\Someplace, 2031}
-
-\Title{Alpha}
-
-\StartItems
-\Item one
-\Item two
-\Item three
-\StopItems
-
-\Title{Beta}
-
-\StartItems
-\Item four
-\Item five
-\Item six
-\StopItems
-
-\Title{Gamma}
-
-\StartItems
-\Item seven
-\Item eight
-\Item nine
-\StopItems
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-69.mkiv b/Master/texmf-dist/tex/context/base/s-pre-69.mkiv
deleted file mode 100644
index cc6af9ad38f..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-69.mkiv
+++ /dev/null
@@ -1,336 +0,0 @@
-%D \module
-%D [ file=s-pre-69,
-%D version=2010.04.28,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 69,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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]
-\setuppapersize[SM][SM]
-
-\usemodule
- [abr-01,pre-60]
-
-\setupinteraction
- [state=start,
- contrastcolor=white,
- color=white,
- click=no]
-
-\setuplayout
- [location=middle,
- topspace=60pt,
- bottomspace=80pt,
- backspace=80pt,
- header=0pt,
- footer=0pt,
- width=middle,
- height=middle]
-
-\setupcolors
- [textcolor=white]
-
-\setupbodyfont[euler]
-
-\definecolor[maincolor] [blue]
-\definecolor[extracolor][green]
-
-% \definecolor[maincolor] [red]
-% \definecolor[extracolor][blue]
-
-\startMPinitializations
- if unknown MyColor[1] :
- color MyColor[] ;
- MyColor[1] := transparent(1,.25,\MPcolor{maincolor}) ;
- MyColor[2] := transparent(1,.25,\MPcolor{extracolor}) ;
-
- picture MySoFar ; MySoFar := nullpicture ;
- path MyLastOne ; MyLastOne := origin -- cycle ;
- color MyPageColor ; MyPageColor := MyColor[1] ;
- path MyLeftSteps, MyRightSteps ;
- boolean MyPageDone ; MyPageDone := false ;
-
- vardef MySmallShape(expr parent) =
- path p ; p := boundingbox parent ;
- p := boundingbox parent ;
- numeric w, h ; w := bbwidth(p) ; h := bbheight(p) ;
- urcorner p shifted (-uniformdeviate w/4,0) --
- lrcorner p shifted (0,uniformdeviate h/4) --
- llcorner p shifted (uniformdeviate w/4,0) --
- ulcorner p shifted (0,-uniformdeviate h/4) -- cycle
- enddef ;
-
- vardef MyShape(expr parent) =
- path p ; p := boundingbox parent ;
- if MyPageDone :
- MyPageDone := false ;
- urcorner p shifted (-EmWidth + -uniformdeviate CutSpace/2,0) --
- lrcorner p shifted (0,EmWidth + uniformdeviate BottomSpace/2) --
- llcorner p shifted (EmWidth + uniformdeviate BackSpace/2,0) --
- ulcorner p shifted (0,-EmWidth + -uniformdeviate TopSpace/2) -- cycle
- else :
- MyPageDone := true ;
- urcorner p shifted (0,-EmWidth + -uniformdeviate TopSpace/2) --
- lrcorner p shifted (-EmWidth + -uniformdeviate CutSpace/2,0) --
- llcorner p shifted (0,EmWidth + uniformdeviate BottomSpace/2) --
- ulcorner p shifted (EmWidth + uniformdeviate BackSpace/2,0) -- cycle
- fi
- enddef ;
-
- vardef MyMakeOne =
- MyLastOne := MyShape(Page) ;
- enddef ;
-
- vardef MyAddOne =
- addto MySoFar also image(fill MyLastOne withcolor MyPageColor ; ) ;
- enddef ;
-
- vardef MyDrawOne =
- fill MyLastOne withcolor black ;
- fill MyLastOne withcolor MyPageColor ;
- enddef ;
-
- vardef MyDrawPage =
- draw MySoFar ;
- enddef ;
-
- vardef MySetSteps =
- path l, r ; numeric s ; path ll[], rr[] ; path t ;
- l := point 2 of MyLastOne -- point 3 of MyLastOne ;
- r := point 0 of MyLastOne -- point 1 of MyLastOne ;
- t := topboundary Field[Text][Text] rightenlarged TextWidth leftenlarged TextWidth ;
- s := bbheight(Field[Text][Text])/LineHeight + 2 ;
- t := t shifted (0,-TopSkip) ;
- for i=1 upto s :
- ll[i] := t intersectionpoint l ;
- rr[i] := t intersectionpoint r ;
- t := t shifted (0,-LineHeight) ;
- endfor ;
- MyLeftSteps := for i=1 upto s : ll[i] -- endfor cycle ;
- MyRightSteps := for i=1 upto s : rr[i] -- endfor cycle ;
- enddef ;
-
- vardef MyDrawText(expr txt) =
- pair a ; a := (point 1 of MyLastOne) - (point 2 of MyLastOne) ;
- picture p ; p := txt ;
- p := p
- shifted (-EmWidth,EmWidth)
- shifted ulcorner txt
- shifted point 1 of MyLastOne ;
- p := p rotatedaround(lrcorner p, radian * tan(ypart a/xpart a)) ;
- setbounds p to origin -- cycle ;
- draw p ;
- enddef ;
-
- vardef MyDrawTitle(expr txt) =
- % pair a ; a := (point 2 of MyLastOne) - (point 3 of MyLastOne) ;
- pair a ; a := (point 3 of MyLastOne) - (point 4 of MyLastOne) ;
- picture p ;
- if bbheight(txt) > bbwidth(txt) :
- p := txt ysized(0.8*TextHeight) ;
- else :
- p := txt xsized(0.8*TextWidth) ;
- fi ;
- numeric d ; d := arclength(point 2 of MyLastOne -- point 3 of MyLastOne) - bbheight(p) ;
- p := p
- shifted (BackSpace,-d/2)
- shifted -ulcorner p
- shifted point 3 of MyLastOne ;
- % p := p rotatedaround(ulcorner p, - radian * tan(xpart a/ypart a)) ;
- % p := p rotatedaround(ulcorner p, radian * tan(ypart a/xpart a)) ;
- setbounds p to origin -- cycle ;
- draw p ;
- enddef ;
-
- vardef MyDrawSteps =
- s := bbheight(Field[Text][Text])/LineHeight + 2 ;
- for i=1 upto s :
- draw ll[i] withpen pencircle scaled 1mm ;
- draw rr[i] withpen pencircle scaled 1mm ;
- draw ll[i] -- rr[i] ;
- endfor ;
- draw Field[Text][Text] ;
- enddef ;
-
- fi ;
-\stopMPinitializations
-
-\startuseMPgraphic{initialization}
- StartPage ;
- MySoFar := image(fill Page enlarged 12pt withcolor MyPageColor) ;
- MyMakeOne ;
- MySetSteps ;
- StopPage ;
-\stopuseMPgraphic
-
-\appendtoks
- \startnointerference
- \useMPgraphic{initialization}
- \stopnointerference
-\to \everystarttext
-
-\startuseMPgraphic{page}
- StartPage ;
- MyDrawPage ;
- MyDrawOne ;
- MySetSteps ;
- MyDrawTitle(textext("\getvariable{document}{title}")) ;
- MyDrawText(textext("\getvariable{document}{topic}")) ;
- %
- % we have multiple runs when we have text
- %
-% MyDrawSteps ;
-% MyMakeOne ;
-% MySetSteps ;
- StopPage ;
-\stopuseMPgraphic
-
-\appendtoks
- \startnointerference
- \startMPcode
- MyAddOne ;
- MyMakeOne ;
- MySetSteps ;
- \stopMPcode
- \stopnointerference
-\to \everyshipout
-
-\defineoverlay[page][\useMPgraphic{page}]
-
-\startuseMPgraphic{symbol}
- color cc ; cc := MyColor[2] ;
- path p ; p := MySmallShape(unitsquare scaled (.6*LineHeight)) ;
- fill p withcolor white ;
- fill p withcolor cc ;
-\stopuseMPgraphic
-
-\definesymbol[mysymbol][\struttedbox{\useMPgraphic{symbol}}]
-
-\setupitemgroup[itemize][1][symbol=mysymbol]
-
-\setupbackgrounds
- [page]
- [background=page]
-
-\startluacode
- local texdimen = tex.dimen
- function document.SetParShape()
- local leftpath = metapost.getclippath("metafun","metafun","clip currentpicture to MyLeftSteps ;")
- local rightpath = metapost.getclippath("metafun","metafun","clip currentpicture to MyRightSteps ;")
- local shape = { }
- for i=1,#leftpath do
- local left = leftpath[i].x_coord
- local right = rightpath[i].x_coord
- local hsize = right - left - (texdimen.backspace + texdimen.cutspace)*number.dimenfactors.bp
- shape[#shape+1] = string.format("%sbp %sbp",left,hsize)
- end
- -- print(table.serialize(shape))
- -- context.parshape(string.format("%s %s ",#shape,table.concat(shape," ")))
- context("\\parshape %s %s ",#shape,table.concat(shape," "))
- end
-\stopluacode
-
-\nopenalties \dontcomplain
-
-\setupwhitespace[none]
-
-\def\StartText#1#2%
- {\starttext
- \setvariable{document}{title}{\framed[frame=off,offset=0pt,align=flushleft,foregroundstyle=\tfd\setupinterlinespace]{\begstrut#1\endstrut}}
- \setvariable{document}{topic}{\tfb#2}
- \startstandardmakeup
- % dummy page
- \stopstandardmakeup
- \setvariable{document}{title}{}
- \setvariable{document}{topic}{}}
-
-\def\StopText
- {\stoptext}
-
-\def\StartItems#1%
- {\setvariable{document}{topic}{\tfb#1}
- \startstandardmakeup[top=,bottom=\vss]
- \startelement[items][title={#1}]%
- \ctxlua{document.SetParShape()}
- \StartSteps}
-
-\def\StopItems
- {\StopSteps
- \stopelement
- \stopstandardmakeup}
-
-\def\StartItem
- {\dontleavehmode
- \startelement[item]%
- \llap{\symbol[mysymbol]\quad}% graphic
- \ignorespaces}
-
-\def\StopItem
- {\removeunwantedspaces
- \nobreak
- \crlf
- \stopelement
- \crlf
- \FlushStep}
-
-\def\ShapeParagraph
- {\ctxlua{document.SetParShape()}}
-
-% no parshape yet
-
-\def\StartParagraphs#1%
- {\setvariable{document}{topic}{\tfb#1}
- \startstandardmakeup[top=,bottom=\vss]
- %\ctxlua{document.SetParShape()}
- \startelement[paragraphs]%
- \StartSteps}
-
-\def\StopParagraphs
- {\StopSteps
- \stopelement
- \stopstandardmakeup}
-
-\def\StartParagraph
- {\startelement[paragraph]}
-
-\def\StopParagraph
- {\par
- \stopelement
- \FlushStep}
-
-% experiment .. likely to change
-
-\setelementexporttag[items] [nature][display]
-\setelementexporttag[item] [nature][mixed]
-\setelementexporttag[paragraphs][nature][display]
-\setelementexporttag[paragraph] [nature][mixed]
-
-\continueifinputfile{s-pre-69.mkiv}
-
-% finetuning: \StartText{\TEX\ and Reality\vskip2exClashing Mindsets?\vskip1ex}{Bacho\TEX, May 1, 2010}
-
-\StartText{Just\\A Demo}{Bacho\TEX, May 1, 2010}
-
-\StartItems{Quote from Tufte and Ward}
- \StartItem
- \input tufte
- \StopItem
- \StartItem
- \input ward
- \StopItem
-\StopItems
-
-% \dorecurse{20}{
-% \ctxlua{document.SetParShape()}
-% \input tufte
-% \page
-% }
-
-\StopText
-
diff --git a/Master/texmf-dist/tex/context/base/s-pre-70.mkiv b/Master/texmf-dist/tex/context/base/s-pre-70.mkiv
deleted file mode 100644
index 2c8bb2d2648..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-70.mkiv
+++ /dev/null
@@ -1,176 +0,0 @@
-%D \module
-%D [ file=s-pre-70,
-%D version=2008.04.15,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 70,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 At the cost of more runtime and a larger output file, we
-%D turn on randomization. The instances are cached in the
-%D MkIV cache, so successive runs use the same shapes.
-
-% \usemodule[punk] \usetypescript[punk] \setupbodyfont[punk,20pt]
-%
-% \EnableRandomPunk
-
-\setupbodyfont[punknova,20pt] % we now use the opentype variant
-
-%D We use the regular screen size paper and layout setup.
-
-\setuppapersize
- [S6][S6]
-
-\setuplayout
- [topspace=30pt,
- backspace=30pt,
- width=middle,
- height=fit,
- header=0pt,
- footer=0pt,
- bottomdistance=24pt,
- bottom=30pt,
- bottom=18pt,
- top=0pt]
-
-\setupinterlinespace
- [top=height,
- line=1.25\bodyfontsize]
-
-\setupcolors
- [state=start,
- textcolor=white]
-
-\setupinteraction
- [state=start,
- %click=off,
- menu=on]
-
-%D We predefine a few palets. Of course you can define more.
-
-\definecolor[punkblue] [r=.4,b=.8,g=.4]
-\definecolor[punkgreen] [r=.4,b=.4,g=.8]
-\definecolor[punkred] [r=.8,b=.4,g=.4]
-\definecolor[punkyellow][r=.6,g=.6,b=.2]
-
-\definepalet [punk-one] [textcolor=punkblue,pagecolor=punkgreen]
-\definepalet [punk-two] [textcolor=punkred,pagecolor=punkyellow]
-\definepalet [punk-three] [textcolor=punkblue,pagecolor=punkyellow]
-\definepalet [punk-one-reverse] [textcolor=punkgreen,pagecolor=punkblue]
-\definepalet [punk-two-reverse] [textcolor=punkyellow,pagecolor=punkred]
-\definepalet [punk-three-reverse] [textcolor=punkyellow,pagecolor=punkblue]
-
-\setuppalet[punk-one]
-
-%D We use a few backgrounds. The hyperlink that invokes the
-%D stepper is hooked into the text background.
-
-\definelayer
- [page]
- [width=\paperwidth,
- height=\paperheight]
-
-\setupbackgrounds
- [page]
- [background={color,page},
- backgroundcolor=pagecolor,
- setups=pagestuff]
-
-\setupbackgrounds
- [text]
- [background={color,invoke},
- backgroundoffset=12pt,
- backgroundcolor=textcolor]
-
-%D We need different symbols for itemized lists.
-
-\definesymbol[1][\hbox{\lower1ex\hbox{*}}]
-\definesymbol[2][\endash]
-\definesymbol[3][\letterhash]
-\definesymbol[3][>]
-
-%D We don't want these reversed clicked areas in Acrobat.
-
-\setupinteraction
- [click=no,
- color=white, % pagecolor,
- contrastcolor=white] % pagecolor,
-
-%D We define a rather simple navigational panel at the
-%D bottom
-
-\setupinteractionmenu
- [bottom]
- [color=white, % pagecolor,
- contrastcolor=white, % pagecolor,
- background=color,
- backgroundcolor=textcolor,
- frame=off,
- height=24pt,
- left=\hfill,
- middle=\hskip12pt]
-
-\setupsubpagenumber
- [state=start]
-
-\startinteractionmenu[bottom]
- \starttxt
- \interactionbar
- [alternative=d,
- symbol=yes,
- color=white,
- contrastcolor=textcolor]
- \stoptxt
- \hfilll
- \startbut [previouspage] < < < \stopbut
- \startbut [nextpage] > > > \stopbut
-\stopinteractionmenu
-
-%D Instead of the normal symbols we use more punky ones.
-
-\startsymbolset [punk]
- \definesymbol[previous] [\string<\string<]
- \definesymbol[somewhere] [\string^\string^]
- \definesymbol[next] [\string>\string>]
-\stopsymbolset
-
-\setupinteraction[symbolset=punk]
-
-%D Because the font is rather large, we use less whitespace.
-
-\setuphead
- [chapter]
- [after={\blank[big]}]
-
-%D Run this file with the command: \type {context --mode=demo s-pre-70}
-%D in order to get an example.
-
-\continueifinputfile{s-pre-70.mkiv}
-
-\usemodule[pre-60] % use the stepper
-
-\starttext
-
-\title {Punk for dummies}
-
-\dorecurse{10} {
-
- \title{Just a few dummy pages}
-
- \StartSteps
- \startitemize[packed]
- \startitem bla \FlushStep \stopitem
- \startitem bla bla \FlushStep \stopitem
- \startitem bla bla bla \FlushStep \stopitem
- \startitem bla bla bla bla \FlushStep \stopitem
- \stopitemize
- \StopSteps
-
-}
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-71.lua b/Master/texmf-dist/tex/context/base/s-pre-71.lua
deleted file mode 100644
index bfa45a70578..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-71.lua
+++ /dev/null
@@ -1,63 +0,0 @@
-if not modules then modules = { } end modules ['steps'] = {
- version = 1.001,
- comment = "companion to steps.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-moduledata.steps = moduledata.steps or { }
-local steps = moduledata.steps
-
-local locations = {
- 'lefttop',
- 'middletop',
- 'righttop',
- 'middleleft',
- 'middle',
- 'middleright',
- 'leftbottom',
- 'middlebottom',
- 'rightbottom',
-}
-
-local done, current, previous, n
-
-function steps.reset_locations()
- done, current, previous, n = table.tohash(locations,false), 0, 0, 0
-end
-
-function steps.next_location(loc)
- previous = current
- n = n + 1
- loc = loc and loc ~= "" and tonumber(loc)
- while true do
- current = loc or math.random(1,#locations)
- if not done[current] then
- done[current] = true
- break
- end
- end
-end
-
-function steps.current_location()
- context(locations[current] or "")
-end
-
-function steps.previous_location()
- context(locations[previous] or "")
-end
-
-function steps.current_n()
- context(current)
-end
-
-function steps.previous_n()
- context(previous)
-end
-
-function steps.step()
- context(n)
-end
-
-steps.reset_locations()
diff --git a/Master/texmf-dist/tex/context/base/s-pre-71.mkii b/Master/texmf-dist/tex/context/base/s-pre-71.mkii
deleted file mode 100644
index 3431367685e..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-71.mkii
+++ /dev/null
@@ -1,213 +0,0 @@
-% engine=luatex
-
-%D \module
-%D [ file=s-pre-71,
-%D version=2008.08.05,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 71,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 I might improve this module so consider it experimental.
-
-% \enablemode[numbers]
-% \enablemode[paper]
-
-\usemodule[pre-60,abr-02]
-
-\setupinteraction[state=start,click=off]
-
-\definepapersize[wide][width=900pt,height=600pt]
-
-\setuppapersize[wide][wide]
-
-\setuplayout[page]
-
-% \setupbodyfont[15pt]
-
-\usetypescriptfile[type-hgz]
-\usetypescript[palatino-informal]
-\setupbodyfont[palatino-informal,15pt]
-
-\setupsorting[logo][style=]
-
-\startnotmode[paper]
- \setupbackgrounds[page][background=color,backgroundcolor=black]
-\stopnotmode
-
-\TransparencyHack
-
-\definelayer[page][width=\paperwidth,height=\paperheight]
-
-\definecolor[TopicColor-1][r=.3,g=.4,b=.5]
-\definecolor[TopicColor-2][r=.3,g=.5,b=.4]
-\definecolor[TopicColor-3][r=.4,g=.3,b=.5]
-\definecolor[TopicColor-4][r=.4,g=.5,b=.3]
-\definecolor[TopicColor-5][r=.5,g=.3,b=.4]
-\definecolor[TopicColor-6][r=.5,g=.4,b=.3]
-\definecolor[TopicColor-7][r=.35,g=.35,b=.6]
-\definecolor[TopicColor-8][r=.6,g=.35,b=.35]
-\definecolor[TopicColor-9][r=.35,g=.6,b=.35]
-
-\definecolor[TopicColor-0][t=.5,a=1,s=.5]
-\definecolor[TopicColor] [s=1]
-
-\setupcolors[state=start]
-\setupcolors[textcolor=TopicColor]
-
-\startluacode
- local locations = {
- 'lefttop',
- 'middletop',
- 'righttop',
- 'middleleft',
- 'middle',
- 'middleright',
- 'leftbottom',
- 'middlebottom',
- 'rightbottom',
- }
- local done, current, previous, n = table.tohash(locations,false), 0, 0, 0
- function document.reset_locations()
- done, current, previous, n = table.tohash(locations,false), 0, 0, 0
- end
- function document.next_location(loc)
- previous = current
- n = n + 1
- loc = loc and loc ~= "" and tonumber(loc)
- while true do
- current = loc or math.random(1,#locations)
- if not done[current] then
- done[current] = true
- break
- end
- end
- end
- function document.current_location()
- tex.print(locations[current] or "")
- end
- function document.previous_location()
- tex.print(locations[previous] or "")
- end
- function document.current_n()
- tex.print(tostring(current))
- end
- function document.previous_n()
- tex.print(tostring(previous))
- end
- function document.step()
- tex.print(tostring(n))
- end
-\stopluacode
-
-\def\StartTopics
- {\startstandardmakeup
- \ctxlua{document.reset_locations()}
- \doifnotmode{paper}{\StartLocalSteps}}
-
-\def\StopTopics
- {\doifnotmode{paper}{\StopLocalSteps}
- \flushlayer[page]
- \stopstandardmakeup}
-
-\def\StartTopic
- {\dosingleempty\doStartTopic}
-
-\def\doStartTopic[#1]%
- {\doifnotmode{paper}{\NextStep}
- \ctxlua{document.next_location("#1")}
- \startnotmode[paper]
- \doifnothing{#1}
- {\ifcase\ctxlua{document.previous_n()}\else
- \setlayer
- [page]
- [preset=\ctxlua{document.previous_location()}]
- \bgroup
- \doifnotmode{paper}{\startproperty[\StepLayer]}%
- \framed
- [offset=20pt,
- strut=no,
- align=normal,
- frame=off,
- height=\dimexpr\paperheight/3\relax,
- width=\dimexpr\paperwidth/3\relax,
- background=color,
- backgroundcolor=TopicColor-0]
- {}%
- \doifnotmode{paper}{\stopproperty}%
- \egroup
- \fi}
- \stopnotmode
- \setlayer
- [page]
- [preset=\ctxlua{document.current_location()}]
- \bgroup
- \doifnotmode{paper}{\startproperty[\StepLayer]}%
- \framed
- [offset=20pt,
- strut=no,
- align=\expdoifelse{#1}{}{normal}{middle,lohi},
- align=\expdoifelse{#1}{}{flushleft,verytolerant}{middle,lohi},
- frame=off,
- height=\dimexpr\paperheight/3\relax,
- width=\dimexpr\paperwidth/3\relax,
- background=color,
- backgroundcolor=TopicColor-\ctxlua{document.current_n()}]
- \bgroup
- \ignorespaces}
-
-\def\StopTopic
- {\removeunwantedspaces
- \egroup
- \doifnotmode{paper}{\stopproperty}%
- \egroup
- \startmode[numbers]
- \setlayerframed
- [page]
- [preset=\ctxlua{document.current_location()}]
- [height=\dimexpr\paperheight/3\relax,
- width=\dimexpr\paperwidth/3\relax,
- frame=off,
- foregroundstyle=\bfa,
- align={flushright,low}]
- {\doifnotmode{paper}{\startproperty[\StepLayer]}%
- \ctxlua{document.step()}\kern\strutdepth
- \doifnotmode{paper}{\stopproperty}}
- \stopmode}
-
-\logo [METAPOST] {MetaPost}
-
-\definefont[TitleFont][SansBold at 60pt]
-\definefont[TempFont] [SansBold at 12pt]
-
-\let\StartText\starttext
-\let\StopText \stoptext
-
-\doifnotmode{demo}{\endinput}
-
-\starttext
-
-\StartTopics
- \StartTopic[1] A \StopTopic
- \StartTopic[5] B \StopTopic
- \StartTopic[9] C \StopTopic
-\StopTopics
-
-\StartTopics
- \StartTopic A \StopTopic
- \StartTopic B \StopTopic
- \StartTopic C \StopTopic
- \StartTopic D \StopTopic
- \StartTopic E \StopTopic
- \StartTopic F \StopTopic
- \StartTopic G \StopTopic
- \StartTopic H \StopTopic
- \StartTopic I \StopTopic
-\StopTopics
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-71.mkiv b/Master/texmf-dist/tex/context/base/s-pre-71.mkiv
deleted file mode 100644
index 38dae61dfa5..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-71.mkiv
+++ /dev/null
@@ -1,170 +0,0 @@
-% engine=luatex
-
-%D \module
-%D [ file=s-pre-71,
-%D version=2008.08.05,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 71,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 I might improve this module so consider it experimental.
-
-% \enablemode[numbers]
-% \enablemode[paper]
-
-\usemodule[pre-60,abr-02]
-
-\registerctxluafile{s-pre-71}{}
-
-\setupinteraction[state=start,click=off]
-
-\definepapersize[wide][width=900pt,height=600pt]
-
-\setuppapersize[wide][wide]
-
-\setuplayout[page]
-
-% \setupbodyfont[15pt]
-
-\usetypescriptfile[type-hgz]
-\usetypescript[palatino-informal]
-\setupbodyfont[palatino-informal,15pt]
-
-\setupsorting[logo][style=]
-
-\startnotmode[paper]
- \setupbackgrounds[page][background=color,backgroundcolor=black]
-\stopnotmode
-
-\TransparencyHack
-
-\definelayer[page][width=\paperwidth,height=\paperheight]
-
-\definecolor[TopicColor-1][r=.3,g=.4,b=.5]
-\definecolor[TopicColor-2][r=.3,g=.5,b=.4]
-\definecolor[TopicColor-3][r=.4,g=.3,b=.5]
-\definecolor[TopicColor-4][r=.4,g=.5,b=.3]
-\definecolor[TopicColor-5][r=.5,g=.3,b=.4]
-\definecolor[TopicColor-6][r=.5,g=.4,b=.3]
-\definecolor[TopicColor-7][r=.35,g=.35,b=.6]
-\definecolor[TopicColor-8][r=.6,g=.35,b=.35]
-\definecolor[TopicColor-9][r=.35,g=.6,b=.35]
-
-\definecolor[TopicColor-0][t=.5,a=1,s=.5]
-\definecolor[TopicColor] [s=1]
-
-\setupcolors[state=start]
-\setupcolors[textcolor=TopicColor]
-
-\def\StartTopics
- {\startstandardmakeup
- \ctxlua{moduledata.steps.reset_locations()}
- \doifnotmode{paper}{\StartLocalSteps}}
-
-\def\StopTopics
- {\doifnotmode{paper}{\StopLocalSteps}
- \flushlayer[page]
- \stopstandardmakeup}
-
-\def\StartTopic
- {\dosingleempty\doStartTopic}
-
-\def\doStartTopic[#1]%
- {\doifnotmode{paper}{\NextStep}
- \ctxlua{moduledata.steps.next_location("#1")}
- \startnotmode[paper]
- \doifnothing{#1}
- {\ifcase\ctxlua{moduledata.steps.previous_n()}\else
- \setlayer
- [page]
- [preset=\ctxlua{moduledata.steps.previous_location()}]
- \bgroup
- \doifnotmode{paper}{\startviewerlayer[\StepLayer]}%
- \framed
- [offset=20pt,
- strut=no,
- align=normal,
- frame=off,
- height=\dimexpr\paperheight/3\relax,
- width=\dimexpr\paperwidth/3\relax,
- background=color,
- backgroundcolor=TopicColor-0]
- {}%
- \doifnotmode{paper}{\stopviewerlayer}%
- \egroup
- \fi}
- \stopnotmode
- \setlayer
- [page]
- [preset=\ctxlua{moduledata.steps.current_location()}]
- \bgroup
- \doifnotmode{paper}{\startviewerlayer[\StepLayer]}%
- \framed
- [offset=20pt,
- strut=no,
- align=\expdoifelse{#1}{}{normal}{middle,lohi},
- align=\expdoifelse{#1}{}{flushleft,verytolerant}{middle,lohi},
- frame=off,
- height=\dimexpr\paperheight/3\relax,
- width=\dimexpr\paperwidth/3\relax,
- background=color,
- backgroundcolor=TopicColor-\ctxlua{moduledata.steps.current_n()}]
- \bgroup
- \ignorespaces}
-
-\def\StopTopic
- {\removeunwantedspaces
- \egroup
- \doifnotmode{paper}{\stopviewerlayer}%
- \egroup
- \startmode[numbers]
- \setlayerframed
- [page]
- [preset=\ctxlua{moduledata.steps.current_location()}]
- [height=\dimexpr\paperheight/3\relax,
- width=\dimexpr\paperwidth/3\relax,
- frame=off,
- foregroundstyle=\bfa,
- align={flushright,low}]
- {\doifnotmode{paper}{\startviewerlayer[\StepLayer]}%
- \ctxlua{moduledata.steps.step()}\kern\strutdepth
- \doifnotmode{paper}{\stopviewerlayer}}
- \stopmode}
-
-\logo [METAPOST] {MetaPost}
-
-\definefont[TitleFont][SansBold at 60pt]
-\definefont[TempFont] [SansBold at 12pt]
-
-\let\StartText\starttext
-\let\StopText \stoptext
-
-\continueifinputfile{s-pre-71.mkiv}
-
-\starttext
-
-\StartTopics
- \StartTopic[1] A \StopTopic
- \StartTopic[5] B \StopTopic
- \StartTopic[9] C \StopTopic
-\StopTopics
-
-\StartTopics
- \StartTopic A \StopTopic
- \StartTopic B \StopTopic
- \StartTopic C \StopTopic
- \StartTopic D \StopTopic
- \StartTopic E \StopTopic
- \StartTopic F \StopTopic
- \StartTopic G \StopTopic
- \StartTopic H \StopTopic
- \StartTopic I \StopTopic
-\StopTopics
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-93.tex b/Master/texmf-dist/tex/context/base/s-pre-93.tex
deleted file mode 100644
index c36762f3861..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-93.tex
+++ /dev/null
@@ -1,208 +0,0 @@
-%D \module
-%D [ file=s-pre-20,
-%D version=2000.08.07,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 20,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\setupbodyfont
- [lbr,14.4pt]
-
-\setuppapersize
- [S6][S6]
-
-\setuplayout
- [topspace=0cm,
- backspace=0cm,
- header=0pt,
- footer=0pt,
- width=middle,
- height=middle]
-
-\setupcolors
- [state=start]
-
-\setupinteraction
- [state=start,
- click=no,
- display=new,
- color=LineColor,
- contrastcolor=LineColor]
-
-\setupinteractionscreen
- [option=max]
-
-\setupsystem
- [random=big] % once per hour
-
-\startreusableMPgraphic{page}
- StartPage ;
- filldraw Page withcolor \MPcolor{PageColor} ;
- pickup pencircle scaled (.25cm+uniformdeviate.25cm) ;
- for i=1 upto 200 :
- drawdot
- (uniformdeviate PaperWidth,uniformdeviate PaperHeight)
- withcolor \MPcolor {LineColor} ;
- endfor ;
- StopPage ;
-\stopreusableMPgraphic
-
-\startuseMPgraphic{idea}
- StartPage ;
- path p ;
- p := unitsquare xyscaled(\MPw{idea:\realfolio},\MPh{idea:\realfolio}) superellipsed .90 ;
- p := p shifted \MPxy{idea:\realfolio} ;
- draw p withpen pencircle scaled .500cm withcolor \MPcolor{PageColor} ;
- fill p withcolor \MPcolor{\overlaycolor} ;
- draw p withpen pencircle scaled .250cm withcolor \MPcolor{LineColor} ;
- p := unitsquare xyscaled(\MPw{title:\realfolio},\MPh{title:\realfolio}) superellipsed .90 ;
- p := p shifted \MPxy{title:\realfolio} ;
- draw p withpen pencircle scaled .250cm withcolor \MPcolor{PageColor} ;
- fill p withcolor \MPcolor{\overlaycolor} ;
- draw p withpen pencircle scaled .125cm withcolor \MPcolor{LineColor} ;
- StopPage ;
-\stopuseMPgraphic
-
-\definecolor[PageColor][s=.50]
-\definecolor[TextColor][s=.80]
-\definecolor[DoneColor][s=.65]
-\definecolor[LineColor][r=.7,g=.6,b=.5]
-
-\defineoverlay [idea] [\useMPgraphic {idea}]
-\defineoverlay [page] [\reuseMPgraphic{page}]
-
-\setupbackgrounds
- [page]
- [background={page,forward}]
-
-\defineoverlay[forward][\overlaybutton{forward}]
-
-% alternatief: buffer en ander regime, zodat lokale kleuren
-% kunnen worden genilled. Pos gebruiken om te positioneren.
-
-\definereference[thispage][page(\realfolio)]
-
-\newbox\firstideabox \setbox\firstideabox =\null
-\newbox\secondideabox \setbox\secondideabox=\null
-\newbox\thirdideabox \setbox\thirdideabox =\null
-
-\def\StartTopic% bottom title, top title
- {\dodoublegroupempty\doStartTopic}
-
-\def\doStartTopic#1#2% the positions end up at each page -)
- {\setbox\firstideabox=
- \vbox to \makeupheight
- \bgroup
- \getrandomdimen\scratchdimen{.5cm}\makeupheight
- \vskip 0cm plus \scratchdimen
- \hbox to \makeupwidth
- \bgroup
- \getrandomdimen\scratchdimen{.5cm}\makeupwidth
- \hskip 0cm plus \scratchdimen
- \setbox\scratchbox=\hbox\bgroup\hpos{idea:\realfolio}
- \bgroup
- \getrandomdimen\hsize{.5\makeupwidth}{.7\makeupwidth}%
- \framed
- [offset=3ex,align=middle,strut=no,frame=off,
- before=,after=]
- \bgroup
- \setupwhitespace[big]%
- \doifsomething{#2}{\Title{#2}}%
- \def\StopTopic{%
- \egroup
- \egroup
- \egroup
- \gotobox{\box\scratchbox}[thispage]%
- \getrandomdimen\scratchdimen{.5cm}\makeupwidth
- \hskip 0cm plus \scratchdimen
- \egroup
- \getrandomdimen\scratchdimen{.5cm}\makeupheight
- \vskip 0cm plus \scratchdimen
- \hbox to \makeupwidth
- \bgroup
- \hfill
- \hpos{title:\realfolio}
- {\button[offset=1.5ex,frame=off]{#1}[backward]}%
- \getrandomdimen\scratchdimen{.5cm}{2.5cm}%
- \hskip \scratchdimen
- \egroup
- \getrandomdimen\scratchdimen{.5cm}{1.5cm}
- \vskip \scratchdimen
- \egroup
- \setbox\secondideabox=\vbox
- {\framed
- [offset=overlay,frame=off,background=idea,backgroundcolor=TextColor]
- {\copy\firstideabox}}
- \setbox\firstideabox=\vbox
- {\framed
- [offset=overlay,frame=off,background=idea,backgroundcolor=DoneColor]
- {\LineColor\copy\firstideabox}}
- \startstandardmakeup
- \startoverlay
- {\copy\thirdideabox }
- {\copy\secondideabox}
- \stopoverlay
- \stopstandardmakeup
- \setbox\thirdideabox=\vbox
- {\startoverlay
- {\copy\thirdideabox }
- {\copy\firstideabox}
- \stopoverlay}}}
-
-\long\def\TitlePage#1#2%
- {\bgroup
- \switchtobodyfont[32pt]
- \StartTopic{#1}#2\StopTopic
- \egroup}
-
-\def\Title#1{\midaligned{\bfb#1}\blank}
-
-\doifnotmode{demo}{\endinput}
-
-% \usemodule[pre-super] % super ellipse as well as superpositioned
-
-\starttext
-
-\TitlePage{August 2000}{Something Very Important}
-
-\StartTopic{Alpha}
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
-\StopTopic
-
-\StartTopic{Beta and Gamma}
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
-\StopTopic
-
-\StartTopic{Delta}
- A simple and not too long text just to show the idea.
-\StopTopic
-
-\StartTopic{Epsilon}
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
-\StopTopic
-
-\StartTopic{Zeta, Eta and Theta}
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
-\StopTopic
-
-\StartTopic{Omega}
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
- A simple and not too long text just to show the idea.
-\StopTopic
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-pre-96.tex b/Master/texmf-dist/tex/context/base/s-pre-96.tex
deleted file mode 100644
index 2ad752007c3..00000000000
--- a/Master/texmf-dist/tex/context/base/s-pre-96.tex
+++ /dev/null
@@ -1,188 +0,0 @@
-%D \module
-%D [ file=s-pre-26,
-%D version=1999.08.20,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 26,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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
- [S44][S44]
-
-\definetypeface[main][rm][casual][informal][default]
-
-\setupbodyfont[main,13pt]
-
-\setuplayout
- [backspace=0pt,
- topspace=0pt,
- header=0pt,
- footer=0pt,
- bottom=0pt,
- width=middle,
- height=fit]
-
-\setupbottom
- [style=\ssbf,
- color=white]
-
-\setupfooter
- [style=\ssbfb,
- color=white]
-
-\setupinteraction
- [state=start,
- click=no]
-
-\setupinteractionscreen
- [option=max]
-
-\definecolor[white] [s=.8]
-\definecolor[red] [r=.7]
-\definecolor[green] [g=.7]
-\definecolor[blue] [b=.7]
-\definecolor[yellow][r=.7,g=.7]
-
-\setupcolors
- [state=start]
-
-\defineoverlay [page] [\reuseMPgraphic{page}]
-\defineoverlay [text] [\useMPgraphic {text}]
-\defineoverlay [continue] [\overlaybutton {nextpage}]
-
-\setupbackgrounds % otherwise in acrobat 5 rounding error
- [paper] % and one pixel white line
- [background=page]
-
-\setupbackgrounds
- [page]
- [background={page,continue}]
-
-\definecolor [PageColor][black]
-
-\definecolor [TextColor 0][white]
-\definecolor [TextColor 1][red]
-\definecolor [TextColor 2][green]
-\definecolor [TextColor 3][blue]
-\definecolor [TextColor 4][yellow]
-
-\definecolor [TextColor] [TextColor 0]
-
-\defineframedtext
- [TopicPage]
-
-\defineframedtext
- [TopicText]
-
-\setupframedtexts
- [TopicPage]
- [width=\textwidth,
- height=\textheight,
- offset=overlay]
-
-\setupframedtexts
- [TopicText]
- [offset=10pt,
- style=bold,
- width=\TopicWidth,
- background=text,
- align=normal]
-
-\setupframedtexts
- [TopicPage,TopicText]
- [frame=off,
- depthcorrection=off,
- before=,
- after=]
-
-\newbox \TopicBox % we stack old pages
-\newcounter\KindOfTopic % and cycle through corners
-\newdimen \TopicWidth % with randomized widths
-
-\setupinteraction
- [color=lightgray,
- contrastcolor=lightgray,
- style=]
-
-\def\StartTopic
- {\definecolor[TextColor][TextColor \KindOfTopic]
- \ifcase\KindOfTopic\relax
- \TopicWidth=.7\textwidth
- \else
- \getrandomdimen\TopicWidth{.55\textwidth}{.7\textwidth}
- \fi
- \ifcase\KindOfTopic\relax
- \setupframedtexts [TopicPage] [align={middle,lohi}] \or
- \setupframedtexts [TopicPage] [align={right,high}] \or
- \setupframedtexts [TopicPage] [align={left,high}] \or
- \setupframedtexts [TopicPage] [align={left,low}] \or
- \setupframedtexts [TopicPage] [align={right,low}] \fi
- \setbox\scratchbox=\vbox \bgroup \dontcomplain
- \noindent \startTopicPage [none]
- \noindent \startTopicText [none] }
-
-\def\StopTopic%
- {\stopTopicText
- \stopTopicPage
- \egroup
- \global\setbox\TopicBox=\vbox
- {\startoverlay
- {\box\TopicBox} {\box\scratchbox}
- \stopoverlay}
- \copy\TopicBox
- \ifnum\KindOfTopic=4
- \def\KindOfTopic{1}
- \else
- \increment\KindOfTopic
- \fi
- \getrandomdimen\TopicWidth{.55\textwidth}{.7\textwidth}
- \page}
-
-\startuseMPgraphic{text}
- path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
- color c ; c := (.7+uniformdeviate.3)*\MPcolor{TextColor} ;
- p := p enlarged -1.25pt ;
- filldraw p withcolor c ;
- draw p withpen pencircle scaled 2.5pt withcolor .75c ;
-\stopuseMPgraphic
-
-\startreusableMPgraphic{page}
- path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
- color c ; c := \MPcolor{PageColor} ;
- filldraw p enlarged 5pt withcolor c ; % bleeding
- draw p withpen pencircle scaled 2.5pt withcolor c ;
-\stopreusableMPgraphic
-
-\def\StartNopic
- {\def\KindOfTopic{0} % centered at the page
- \StartTopic
- \bfd\setupinterlinespace
- \def\\{\blank\bfb\setupinterlinespace}
- \raggedcenter}
-
-\def\StopNopic
- {\StopTopic}
-
-\def\TitlePage#1%
- {\StartNopic#1\StopNopic}
-
-\doifnotmode{demo}{\endinput}
-
-\starttext
-
-\StartNopic
- a dull talk \\ \currentdate
-\StopNopic
-
-\dorecurse{10}{\StartTopic \input tufte \StopTopic}
-
-\StartNopic
- that's it \\ goodbye
-\StopNopic
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-present-tiles.mkiv b/Master/texmf-dist/tex/context/base/s-present-tiles.mkiv
deleted file mode 100644
index b68a34ef42b..00000000000
--- a/Master/texmf-dist/tex/context/base/s-present-tiles.mkiv
+++ /dev/null
@@ -1,318 +0,0 @@
-%D \module
-%D [ file=s-present-tiles, % was s-pre-41
-%D version=2013.03.24,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment Tiles,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D The Bacho\TeX\ 2013 style.
-
-\setupbodyfont[pagella,14.4pt]
-
-\setuppapersize[S6][S6]
-
-\definecolor[primarycolor] [.50(darkblue,darkgreen)]
-\definecolor[secondarycolor][.25(darkblue,darkyellow)]
-\definecolor[mixedcolor] [s=.35]
-
-\setupcolors
- [textcolor=white]
-
-\setupalign
- [flushleft,nothyphenated]
-
-\definemeasure[layoutunit][\dimexpr\paperheight/25]
-
-\setuplayout
- [backspace=\measured{layoutunit},
- topspace=\measured{layoutunit},
- width=middle,
- height=middle,
- header=0pt,
- footer=0pt]
-
-\definelayout
- [content]
- [backspace=.5\measured{layoutunit},
- topspace=.5\measured{layoutunit}]
-
-\definemeasure [topiclistwidth] [
- (\textwidth+\backspace)/
- \ifcase\numexpr\structurelistsize\relax 1 % 0
- \or1\or1\or1\or2\or1\or3\or3\or3\or3 % 1 - 9
- \or3\or3\or3\or3\or3\or3\or4 % 10 - 16
- \or4\or4\or4\or4\or % 17 - 20
- \else5 % 21 - 25
- \fi
- -\backspace
-]
-
-\definemeasure [topiclistheight] [
- (\textheight+\topspace)/
- \ifcase\numexpr\structurelistsize\relax 1 % 0
- \or1\or2\or3\or2\or5\or2\or3\or3\or3 % 1 - 9
- \or4\or4\or4\or4\or4\or4\or4 % 10 - 16
- \or5\or5\or5\or5\or5 % 17 - 20
- \else5 % 21 - 25
- \fi
- -\topspace
-]
-
-\definemeasure [topiclistfontsize] [
- \ifcase\numexpr\structurelistsize\relax 2.5 % 0
- \or1.4\or1.4\or1.4\or1.4\or1.4\or1.4\or1.4\or1.4\or1.4 % 1 - 9
- \or1.3\or1.3\or1.3\or1.3\or1.3\or1.3\or1.3 % 10 - 16
- \or1.2\or1.2\or1.2\or1.2\or1.2 % 17 - 20
- \else1 % 21 - 25
- \fi
- \bodyfontsize
-]
-
-\definemeasure [topiclistfont] [\measured{topiclistfontsize}]
-\definemeasure [topictitlefont] [1.2\measured{layoutunit}]
-\definemeasure [titlepagefont] [2\measured{layoutunit}]
-
-\predefinefont[MyTopicTitleFont][SerifBold*default at \measure{topictitlefont}]
-\predefinefont[MyTopicListFont] [SerifBold*default at \measure{topiclistfont}]
-
-\defineframed
- [topiclistentry]
- [width=\measure{topiclistwidth},
- height=\measure{topiclistheight},
- background=color,
- frame=off,
- foregroundstyle=MyTopicListFont,
- backgroundcolor=primarycolor,
- foregroundcolor=white]
-
-\setupwhitespace
- [big]
-
-\setupblank
- [big]
-
-\setupinteraction
- [state=start,
- color=,
- contrastcolor=,
- click=off]
-
-\definemakeup
- [topic]
- [standard]
- [top=,bottom=]
-
-\definemakeup
- [content]
- [standard]
- [top=,bottom=]
-
-\startsetups[topic:start]
- \starttopicmakeup
-\stopsetups
-
-\startsetups[topic:stop]
- \vfill
- \stoptopicmakeup
-\stopsetups
-
-\definehead
- [topic]
- [chapter]
- [before=,
- style=MyTopicTitleFont,
- page=,
- number=off,
- interaction=list,
- beforesection=\directsetup{topic:start},
- aftersection=\directsetup{topic:stop}]
-
-\setuplist
- [topic]
- [alternative=topic,
- interaction=all]
-
-\definelistalternative
- [topic]
- [alternative=horizontal,
- renderingsetup=topic:list]
-
-\startsetups[topic:list]
- \dontleavehmode
- \startcurrentlistentrywrapper
- \topiclistentry{\currentlistentrytitle}
- \stopcurrentlistentrywrapper
- \blankspace
-\stopsetups
-
-\defineoverlay[nextpage][\overlaybutton{nextpage}]
-\defineoverlay[prevpage][\overlaybutton{prevpage}]
-\defineoverlay[menupage][\overlaybutton{menupage}]
-\defineoverlay[homepage][\overlaybutton{homepage}]
-
-\setupbackgrounds
- [text]
- [backgroundoffset=.5\measured{layoutunit}]
-
-% begin of buttons
-
-\defineframed
- [bb]
- [width=\dimexpr\overlaywidth/10,
- height=\dimexpr\overlayheight/10,
- background=color,
- foregroundstyle=\bfa,
- frame=off]
-
-\defineframed[nb] [bb] [empty=yes]
-\defineframed[rb] [bb] [backgroundcolor=white,foregroundcolor=secondarycolor]
-\defineframed[db] [bb] [backgroundcolor=mixedcolor,foregroundcolor=white]
-
-\definepushbutton [prev]
-\definepushbutton [next]
-\definepushbutton [menu]
-\definepushbutton [home]
-
-\definepushsymbol [prev] [n] [\nb{prev}]
-\definepushsymbol [prev] [r] [\rb{prev}]
-\definepushsymbol [prev] [d] [\db{prev}]
-
-\definepushsymbol [next] [n] [\nb{next}]
-\definepushsymbol [next] [r] [\rb{next}]
-\definepushsymbol [next] [d] [\db{next}]
-
-\definepushsymbol [menu] [n] [\nb{menu}]
-\definepushsymbol [menu] [r] [\rb{menu}]
-\definepushsymbol [menu] [d] [\db{menu}]
-
-\definepushsymbol [home] [n] [\nb{home}]
-\definepushsymbol [home] [r] [\rb{home}]
-\definepushsymbol [home] [d] [\db{home}]
-
-\definelayer
- [buttons]
- [width=\dimexpr\textwidth+\measured{layoutunit}\relax,
- height=\dimexpr\textheight+\measured{layoutunit}\relax] % a setups
-
-\startsetups [document:buttons]
-
- \setlayer
- [buttons]
- [preset=leftbottom,offset=-.25\measured{layoutunit}]
- {\pushbutton[prev][previouspage]}
-
- \setlayer
- [buttons]
- [preset=rightbottom,offset=-.25\measured{layoutunit}]
- {\pushbutton[next][nextpage]}
-
- \setlayer
- [buttons]
- [preset=lefttop,offset=-.25\measured{layoutunit}]
- {\pushbutton[home][homepage]}
-
- \setlayer
- [buttons]
- [preset=righttop,offset=-.25\measured{layoutunit}]
- {\pushbutton[menu][menupage]}
-
-\stopsetups
-
-\defineoverlay[setbuttons][\directsetup{document:buttons}]
-
-% end of buttons
-
-\defineframed
- [conclusion]
- [location=low,
- width=max,
- align={flushleft,lohi},
- background=color,
- backgroundcolor=white,
- foregroundcolor=secondarycolor]
-
-\startsetups [document:titlepage]
-
- \definebodyfontenvironment
- [\measure{titlepagefont}]
-
- \setupbackgrounds
- [page]
- [background={color,menupage},
- backgroundcolor=secondarycolor]
-
- \setupbackgrounds
- [text]
- [background={color,menupage},
- backgroundcolor=secondarycolor]
-
- \starttopicmakeup[reference=homepage]
-
- \switchtobodyfont[\measure{titlepagefont}]
-
- \let\\=\crlf
-
- \startalignment[flushleft]
- \bf
- \setupinterlinespace
- \begstrut\getvariable{document}{title}\endstrut\par
- \stopalignment
-
- \vfill
-
- \startalignment[flushright]
- \bf
- \setupinterlinespace
- \begstrut\getvariable{document}{subtitle}\endstrut\par
- \stopalignment
-
- \stoptopicmakeup
-
- \setupbackgrounds
- [page]
- [background={color,homepage},
- backgroundcolor=secondarycolor]
-
- \setupbackgrounds
- [text]
- [background={color,menupage},
- backgroundcolor=secondarycolor]
-
- \startcontentmakeup[reference=menupage]
-
- \setupalign[tolerant,stretch,paragraph]
- \flexiblebaselines
- \placelist[topic][criterium=text]
-
- \stopcontentmakeup
-
- \setupbackgrounds
- [page]
- % [background={color,menupage},
- [background={color,invoke},
- backgroundcolor=primarycolor]
-
- \setupbackgrounds
- [text]
- % [background={color,nextpage,setbuttons,buttons},
- [background={color,setbuttons,buttons},
- backgroundcolor=secondarycolor]
-
-\stopsetups
-
-\setupdocument
- [before=\directsetup{document:titlepage}]
-
-\continueifinputfile{s-present-tiles.mkiv}
-
-\startdocument[title=Whatever We\\Want Here,subtitle=Whatever We\\Want There]
-
- \dorecurse{12}{\starttopic[title=Topic #1]\input tufte \stoptopic}
-
-\stopdocument
diff --git a/Master/texmf-dist/tex/context/base/s-ptj-01.tex b/Master/texmf-dist/tex/context/base/s-ptj-01.tex
deleted file mode 100644
index a14a03ef145..00000000000
--- a/Master/texmf-dist/tex/context/base/s-ptj-01.tex
+++ /dev/null
@@ -1,425 +0,0 @@
-%D \module
-%D [ file=s-ptj-01,
-%D version=2009.12.18,
-%D title=\CONTEXT\ Style File,
-%D subtitle=PracTeX Journal Style,
-%D author=Aditya Mahajan,
-%D email=adityam at umich dot edu,
-%D date=\currentdate,
-%D copyright={Aditya Mahajan}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%M % These macros are needed to compile the documentation.
-%M \def\PracTeX {Prac\kern-0.07em\TeX}
-%M \def\PRACTEX {\PracTeX}
-%M \def\pracjourn {The \PRACTEX\ Journal}
-%M \useurl[pracjourn][http://www.tug.org/pracjourn/][][\pracjourn]
-%M \useurl[texgyre] [http://www.gust.org.pl/projects/e-foundry/tex-gyre/]
-
-\writestatus {loading} {Context Module for the PracTeX Journal}
-
-%D This module is for producing acticles for \from[pracjourn]. It merely copies the
-%D layout of the the \LATEX\ class \filename{pracjourn.cls} available from
-%D \pracjourn\ website (\url[pracjourn]). This module has a filename synonym
-%D \filename{pracjourn}. So to use this module, you can write:
-%D \starttyping
-%D \usemodule[pracjourn]
-%D \stoptyping
-%D A sample document is given at the end of this file. The typeset sample can
-%D be obtained by
-%D \starttyping
-%D texmfstart texexec --mode=demo s-ptj-01.tex
-%D \stoptyping
-%D The documentation is written as comments. If you want to see a \PDF\ copy
-%D \starttyping
-%D texmfstart texexec --module s-ptj-01.tex
-%D \stoptyping
-
-\startmodule[pracjourn]
-
-\unprotect
-
-%D First let's setup the paper size and layout for \pracjourn. I am actually not
-%D sure about the \quote{official} layout requirement for \pracjourn\ and have
-%D reverse engineered the layout from the typeset \LATEX\ examples. If you
-%D feel that anything is wrong here, please let me know.
-
-\setuppapersize
- [letter][letter]
-
-\setuplayout
- [ width=middle,
- height=middle,
- location=middle,
- topspace=1.25in,
- bottomspace=1in,
- backspace=1in,
- cutspace=1in,
- leftmargin=0.25in,
- rightmargin=0.25in,
- leftmargindistance=0in,
- rightmargindistance=0in,
- header=1in,
- footer=.5in,
- headerdistace=0in,
- footerdistance=.25in,
- ]
-
-%D Next we do the font setup. \pracjourn\ uses mathpazo for roman and math faces and
-%D uses latin modern for sans serif and monotype. For the main face, 12pt is
-%D used with a 15.5pt baseline skip. Font protrusion is enabled, but font
-%D expansion is not. We follow these conventions. \CONTEXT\ uses Pagella fonts
-%D from \TEX{gyre} project, so we use them instead.
-
-\usetypescript [serif,sans,mono] [hanging] [pure]
-\setupalign [hanging]
-\usetypescript [palatino][encoding=texnansi]
-\setupbodyfont [palatino,12pt]
-
-\definefont [titlefont] [Regular at 20pt]
-\definefont [authorfont] [Regular at 14pt]
-
-\setupbodyfontenvironment
- [12pt]
- [interlinespace=15.5pt,em=italic]
-
-\setupbodyfontenvironment
- [11pt]
- [interlinespace=13.6pt,em=italic]
-
-%D The variables for the article are stored in the \mono{pracjourn} namespace.
-%D To initialize these variables use
-%D \starttyping
-%D \setvariables
-%D [pracjourn]
-%D [ title=Tile of the Article,
-%D author=Name of Author,
-%D address=Write your Address,
-%D revision={d=14,m=11,y=2006},
-%D copyright=Whatever you want,
-%D ]
-%D \stoptyping
-%D \mono{title} and \mono{author} should always be entered (even though this
-%D module does not make them mandatory, it makes little sense to have an
-%D article without a title or author. Other variables are optional. If a
-%D revision is not written, current date will be used to show the revision.
-%D Other variables for the article are the author's email address and website
-%D url. Due to catcode problems, it is not always possible to reliably enter
-%D these using the variable mechanism. To enter these use \type|\useURL|
-%D \starttyping
-%D \useURL[email][mailto:address@whatever.com][][address@whatever.com]
-%D \useURL[website][link to your homepage]
-%D \stoptyping
-%D If either of these \URL's are not present, they will be silently ignored
-%D while generating the title.
-
-\setvariables [pracjourn] [ title=]
-\setvariables [pracjourn] [ author=]
-\setvariables [pracjourn] [ address=]
-\setvariables [pracjourn] [copyright=]
-\setvariables [pracjourn] [ revision=]
-
-%D We use the buffer \filename{abstract} for the abstract. So to enter the
-%D abstract, write
-%D \starttyping
-%D \startbuffer[abstract]
-%D Write your abstract
-%D \stopbuffer
-%D \stoptyping
-%D Right now, there is no mechanism to inhibt abstracts. In case someone
-%D requires it, such a mechanism is easy to implement.
-
-\startbuffer[abstract]
-\stopbuffer
-
-%D The actual title with the additional information is typset by calling
-%D \starttyping
-%D \setups{title}
-%D \stoptyping
-%D Remember that the \type|\setvariables[pracjourn][...]| step must be done
-%D before \type|\setups{title}|.
-
-\setuphead
- [title]
- [style=\titlefont,
- after={\blank[big]}]
-
-%D Next we define internal frames to take care of the layout of the extra
-%D material in the title.
-
-\defineframed
- [pracjourninfotitle]
- [ frame=off,
- strut=yes,
- width=0.1\textwidth,
- height=fit,
- align=left,
- location=hanging,
- ]
-
-\defineframed
- [pracjourninfodetails]
- [ frame=off,
- strut=yes,
- width=0.85\textwidth,
- height=fit,
- align=normal,
- location=hanging,
- ]
-
-\newif\ifpracjourntitleskipdone
-
-\def\pracjourninfo#1#2%
- {\pracjourntitleskipdonetrue
- \hbox to \textwidth
- \bgroup
- \hfill \pracjourninfotitle{#1}
- \hfill \pracjourninfodetails{#2}
- \egroup\endgraf}
-
-%D Now we take care of the actual layout of the title. Most of this is
-%D heuristic, as I was trying to get the same visual effect as the
-%D \filename{pracjourn.cls} class. If something does not match, please let me
-%D know. The information is typeset as
-%D \starttyping
-%D \hfill <box of .1\textwidth> \hfill <box of .85\textwidth>
-%D \stoptyping
-%D at 11pt size. We also add the title and author information in the \PDF\
-%D metadata.
-
-\startsetups [title]
-% Place the tile and the author
- \title{\getvariable{pracjourn}{title}}
- \blank[medium]
- \bgroup\authorfont\setupinterlinespace
- \getvariable{pracjourn}{author} \endgraf\egroup
- \blank[2*big]
-% Place the additional information
- \bgroup\switchtobodyfont[11pt]
- \setupindenting[no]
- \doifurldefinedelse{email}
- {\pracjourninfo{Email}{\tttf\from[email]\relax}}
- \empty
- \doifurldefinedelse{website}
- {\pracjourninfo{Website}{\from[website]\relax}}
- \empty
- \doifsomething{\getvariable{pracjourn}{address}}
- {\pracjourninfo{Address}{\getvariable{pracjourn}{address}}}
- \ifpracjourntitleskipdone \blank[big] \fi
- \pracjourninfo{Abstract}
- {\setupindenting[yes]
- \setupinterlinespace
- \getbuffer[abstract]
- \endgraf}
- \egroup
- \blank[big]
- \setups{pracjourndate}
- % Add information to pdfmetadata
- \setupinteraction
- [title={\getvariable{pracjourn}{title}},
- author={\getvariable{pracjourn}{author}},
- subtitle={The PracTeX Journal Article}]
-\stopsetups
-
-% If revision number is present, write it to \filename{_rev.tex}
-% FIXME: Do we need to ensure that the dates and month are two digits?
-\startrawsetups [pracjourndate]
- \doifsomething{\getvariable{pracjourn}{revision}}
- {\expanded{\setvariables[pracjourn:date][y=,m=,d=,\getvariable{pracjourn}{revision}]}
- \immediate\openout \scratchwrite _rev.tex
- \immediate\write \scratchwrite
- {\getvariable{pracjourn:date}{y}/\getvariable{pracjourn:date}{m}/\getvariable{pracjourn:date}{d}}
- \immediate\closeout\scratchwrite}
-\stoprawsetups
-
-%D Next we setup the header and footer for the first page. \pracjourn\ formats the
-%D header as
-%D \startlines
-%D The PracTeX Journal, year, No. number
-%D Article revision year/mm/dd
-%D \stoplines
-%D If a copyright notice is present, it is printed right aligned on the bottom
-%D of first page. Otherwise the footer on the first page is empty.
-
-\startsetups [pracjourntitleheader]
- \framed[frame=off,width=\textwidth,align=normal,location=low]
- {\small\setupinterlinespace
- \doifelsenothing{\pracjournissue}
- {For submission to \pracjourn}
- {\pracjournissue}
- \endgraf
- \doifelsenothing{\getvariable{pracjourn}{revision}}
- {Draft of \currentdate[year,/,mm,/,dd]}
- {Article revision\space
- \expanded{\date[\getvariable{pracjourn}{revision}][year,/,mm,/,dd]}}
- \endgraf}
-\stopsetups
-
-\startsetups [pracjourntitlefooter]
- \framed[frame=off,width=\textwidth,align=flushright,location=low]
- {\small\setupinterlinespace \getvariable{pracjourn}{copyright}\endgraf}
-\stopsetups
-
-\definetext [pracjourntitleheader] [header] [\setups{pracjourntitleheader}][]
-\definetext [pracjourntitlefooter] [footer] [\setups{pracjourntitlefooter}]
-
-\setuphead
- [title]
- [header=pracjourntitleheader,
- footer=pracjourntitlefooter]
-
-%D For rest of the pages, page number is printed on the middle of the footer.
-
-\setuppagenumbering [location={footer,middle}, style=mediaeval]
-
-%D Next we setup the formating for the sections. \pracjourn\ wants font sizes of
-%D 17pt, 14pt, and 12pt respectively for section, subsection, and
-%D subsubsection. By default, \tex{tfa} is 1.2, \tex{tfb} is 1.4, so the sizes
-%D come out close to what is required. The section number is typset in
-%D oldstyle fonts.
-
-\setuphead
- [section,subject]
- [ style=\tfb,
- numberstyle=mediaeval,
- before={\blank[2*big]},
- after={\blank[big]},
- ]
-
-\setuphead
- [subsection,subsubject]
- [ style=\tfa,
- numberstyle=mediaeval,
- before={\blank[big]},
- after={\blank[medium]},
- ]
-
-\setuphead
- [subsubsection,subsubsubject]
- [ style=\tf,
- numberstyle=mediaeval,
- before={\blank[medium]},
- after={\blank},
- ]
-
-%D Now we setup the captions. The captions head are set in normal font, and
-%D the caption number is set in oldstlyle.
-
-\setupcaptions [headstyle=normal,stopper=:,conversion=mediaeval]
-
-%D Footnotes are placed in a box with a width of 1.5em. The footnote numeral
-%D are set in oldstyle font.
-
-\setupnote
- [footnote]
- [margindistance=0em,
- conversion=mediaeval,
- command=\pracjournfootnote,
- ]
-
-\setupnotedefinition [footnote] [location=left,hang=1]
-
-\def\pracjournfootnote#1{\hbox to 1.5em{#1.}}
-
-%D \pracjourn\ uses dash as the first level of itemize and text period as the second
-%D level. The third level is left unspecified.
-
-\definesymbol [1] [{\symbol[dash]}]
-\definesymbol [2] [\periodcentered]
-
-\setupitemize [each] [packed]
-\setupitemize [1] [packed,autointro] [margin=1em]
-
-%D We enable colors, interaction and bookmarks.
-
-\setupinteraction [state=start,color=darkred,style=normal]
-\setupurl [color=darkred]
-\setupcolors [state=start]
-\placebookmarks [section,subsection] [section]
-
-%D We setup medium indenting, whitespace and blanks.
-
-\setupindenting [medium,yes]
-\setupwhitespace [medium]
-\setupblank [medium]
-
-%D We define logos for \PRACTEX\ and \pracjourn. These definitions are copied from
-%D \filename{pracjourn.cls} and can be accessed by \type|\PracTeX|,
-%D \type|\PRACTEX| and \type|\pracjourn|.
-
-\def\PracTeX{Prac\kern-0.07em\TeX}
-\def\PRACTEX{\PracTeX}
-\def\pracjourn {The \PRACTEX\ Journal}
-
-%D \filename{pracjourn.cls} provides two macros \type|\ctanfile| and
-%D \type|\ctanloc|. I am not sure what is the advantage of these macors. If
-%D you want to use these macros, you can use the \type|\useURL| mechanism of
-%D \CONTEXT. For example
-%D \starttyping
-%D \useURL[pracjourn][http://ctan.org/get?fn=/macros/contrib/latex/pracjourn][][\mono{CTAN:macros/contrib/latex/pracjourn}]
-%D The \LATEX\ style files for \pracjourn\ is localed at \from[pracjourn]
-%D \stoptyping
-
-%D For the final version of the paper, the string \quotation{The PracTeX
-%D Journal year, No x} is written on the header. This only happens when the
-%D current directory contains a file \filename{_iss.tex} which contains string
-%D like \quotation{pracjourn 2006 No 04, 2006-11-15}. This step is usually taken in
-%D the final production of the article. If this file is absent, \quotation{For
-%D submission to the PracTeX Journal} is written instead. The next macros are
-%D used to parse this file.
-
-\let\pracjournissue\empty
-
-\def\parse@iss pracjourn #1 No #2, #3-#4-#5\@nil%
- {\!!counta#2\relax
- \edef\pracjournissue{\pracjourn, #1, No.\,\the\!!counta}}
-
-%D Read the \filename{_iss.tex} file, if present to determine the current
-%D issue.
-
-\immediate\openin\scratchread _iss.tex
-\ifeof\scratchread\else
- \read \scratchread to \!!stringa
- \expandafter\parse@iss\!!stringa\@nil
-\fi
-\immediate\closein\scratchread
-
-\protect
-
-\stopmodule
-
-\doifnotmode{demo}{\endinput}
-
-\usemodule[pracjourn]
-
-\setvariables
- [pracjourn]
- [ title=\PRACTEX\ Article in \CONTEXT,
- author=Aditya Mahajan,
- address={Ann Arbor,\\ Michigan, USA.},
- revision={y=2006,m=11,d=14},
- copyright={Copyright \copyright\ 2006 Aditya Mahajan.}
- ]
-
-\useURL[website][http://www.eecs.umich.edu/~adityam]
-\useURL[email][mailto:adityam@umich.edu][][adityam@umich.edu]
-
-%D If any of the above information is not provided, the corresponding entry
-%D will not apprear in the title.
-
-\startbuffer[abstract]
-Write abstract here
-\stopbuffer
-
-\starttext \setups[title]
-
-\section{Introduction}
-
-Write your article \unknown
-
-\stoptext
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/s-references-show.mkiv b/Master/texmf-dist/tex/context/base/s-references-show.mkiv
deleted file mode 100644
index 72cccce54f1..00000000000
--- a/Master/texmf-dist/tex/context/base/s-references-show.mkiv
+++ /dev/null
@@ -1,132 +0,0 @@
-%D \module
-%D [ file=s-references-show.mkiv,
-%D version=2015.04.13,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Reference Checking,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\startmodule[references-show]
-
-\unprotect
-
-% \enabletrackers[nodes.references,nodes.destinations] % also shows areas
-
-\enabletrackers[nodes.references.show,nodes.destinations.show]
-
-\enablehiddenbackground % trick
-
-\edef\hiddenbackgroundlist{\hiddenbackgroundlist,trace-references}
-
-\defineoverlay
- [trace-references]
- [\directsetup{trace:references:onpage}]
-
-\startluacode
- local pagelist = structures.references.tracedpages
-
- function commands.getreferencesonpage(n)
- n = tonumber(n)
- if n then
- local pagedata = pagelist[n]
- if pagedata then
- context("%s references",#pagedata)
- context.blank()
- for i=1,#pagedata do
- local details = pagedata[i]
- local prefix = details[1]
- local reference = details[2]
- -- local internal = details[3]
- -- context("%04i = %s : %s",internal,prefix == "" and "-" or prefix,reference)
- context("%s : %s",prefix == "" and "-" or prefix,reference)
- context.par()
- end
- else
- context("no references")
- end
- else
- context("no valid page")
- end
- end
-
-\stopluacode
-
-\definecolor
- [trace:references:onpage]
- [b=.5,a=1,t=.25]
-
-\defineframed
- [trace:references:onpage]
- [\c!offset=2\exheight,
- %\c!foregroundstyle=\infofont,
- \c!frame=\v!off,
- \c!background=\v!color,
- \c!backgroundcolor=trace:references:onpage,
- \c!align=\v!normal]
-
-\startsetups trace:references:onpage
- \vbox to \vsize \bgroup
- \infofont
- \vskip\dimexpr-\topspace-\headerheight+2\exheight\relax
- \hbox to \hsize \bgroup
- \doifoddpageelse\hss{\hskip\dimexpr-\cutspace+2\exheight\relax}%
- \directlocalframed [
- trace:references:onpage
- ] {
- \ctxcommand{getreferencesonpage(\the\realpageno)}
- }
- \doifoddpageelse{\hskip\dimexpr-\cutspace+2\exheight\relax}\hss
- \egroup
- \vss
- \egroup
-\stopsetups
-
-\protect
-
-\continueifinputfile{s-references-show.mkiv}
-
-\usemodule[art-01]
-
-\setupinteraction
- [state=start]
-
-\setuppagenumbering
- [alternative=doublesided]
-
-\starttext
-
-\title {Contents}
-
-\placelist[chapter]
-
-\setupreferenceprefix[zero]
-
-\chapter[crap]{foo}
-
-\setupreferenceprefix[one]
-
-test \pagereference[whatever]
-
-\dorecurse{5}{
- \placefigure
- [here][bar 1.#1]
- {xx}{\framed{xx #1}}
-}
-
-\setupreferenceprefix[two]
-
-\dorecurse{5}{
- \placefigure
- [here][bar 2.#1]
- {xx}{\framed{xx #1}}
-}
-
-\in{checked}[bar 1.1]
-\in{checked}[bar 2.1]
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-reg-01.mkiv b/Master/texmf-dist/tex/context/base/s-reg-01.mkiv
deleted file mode 100644
index 36434c30c19..00000000000
--- a/Master/texmf-dist/tex/context/base/s-reg-01.mkiv
+++ /dev/null
@@ -1,60 +0,0 @@
-%D \module
-%D [ file=s-reg-01,
-%D version=2005.04.25,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Extra Regime Support,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 \macros
-%D {showregime}
-%D
-%D This code is moved from the kernel to here. (We could make it
-%D auto-loadable).
-
-\startluacode
---[[ldx--
-<p>The following code is rather <l n='context'/> specific.</p>
---ldx]]--
-
-function regimes.show(regime)
- regime = regimes.synonyms[regime] or regime
- local r = regimes.data[regime]
- if r then
- local chardata = characters.data
- context.starttabulate { "|rT|T|rT|lT|lT|lT|" }
- for k, v in ipairs(r) do
- local chr = chardata[v]
- if chr then
- context.NC() context(k)
- context.NC() context.getvalue(chr.contextname])
- context.NC() context("%U+05X",v)
- context.NC() context(chr.contextname)
- context.NC() context(chr.category)
- context.NC() context(chr.description)
- context.NC() context.NR()
- else
- -- can't happen
- end
- end
- context.stoptabulate()
- else
- context("unknown regime %s",regime)
- end
-end
-\stopluacode
-
-\unprotect
-
-\def\showregime
- {\dosingleempty\doshowregime}
-
-\def\doshowregime[#1]%
- {\ctxlua{regimes.show("#1")}}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/s-set-31.mkiv b/Master/texmf-dist/tex/context/base/s-set-31.mkiv
deleted file mode 100644
index 53037a78db4..00000000000
--- a/Master/texmf-dist/tex/context/base/s-set-31.mkiv
+++ /dev/null
@@ -1,118 +0,0 @@
-% show missing translations
-
-\startluacode
-function interfaces.show_missing(whatinterfaces)
- whatinterfaces = whatinterfaces or interfaces.interfaces
- local list = dofile(resolvers.find_file("mult-def.lua"))
- local NC, NR, HL = context.NC, context.NR, context.HL
- for k,v in table.sortedhash(list) do
- context.title(k)
- context.starttabulate { string.rep("|",#whatinterfaces+1) }
- for i=1,#whatinterfaces do
- NC()
- context(whatinterfaces[i])
- end
- NC() NR() HL()
- for kk, vv in next, v do
- if not string.find(kk,"subsub") then
- local okay = true
- for i=1,#whatinterfaces do
- local int = whatinterfaces[i]
- local str = vv[int]
- if not str or (int ~= "en" and str == vv.en) then
- okay = false
- break
- end
- end
- if not okay then
- for i=1,#whatinterfaces do
- local int = whatinterfaces[i]
- local str = vv[int]
- context.NC()
- if not str then
- -- nothing
- elseif int == "en" then
- context.color( { "darkgreen" }, str )
- elseif str == vv.en then
- context.color( { "darkred" }, str )
- elseif int == "pe" then
- context("\\righttoleft " .. str)
- else
- context(str)
- end
- end
- NC() NR()
- end
- end
- end
- context.stoptabulate()
- end
-end
-
-function interfaces.show_missing_messages(whatinterfaces)
- whatinterfaces = whatinterfaces or interfaces.interfaces
- local list = dofile(resolvers.find_file("mult-mes.lua"))
- local NC, NR, HL = context.NC, context.NR, context.HL
- for k,v in table.sortedhash(list) do
- context.title("message: " .. k)
- context.starttabulate { "|l|" .. string.rep("pl|",#whatinterfaces) }
- NC()
- for i=1,#whatinterfaces do
- NC()
- context(whatinterfaces[i])
- end
- NC() NR() HL()
- local sorted = table.sortedkeys(v)
- for i=1,#sorted do
- local kk = sorted[i]
- local vv = v[kk]
- if kk ~= "files" then
- local okay = true
- for i=1,#whatinterfaces do
- local int = whatinterfaces[i]
- local str = vv[int]
- if not str or (int ~= "en" and str == vv.en) then
- okay = false
- break
- end
- end
- if not okay then
- context.NC()
- context(kk)
- for i=1,#whatinterfaces do
- local int = whatinterfaces[i]
- local str = vv[int]
- NC()
- if not str then
- -- nothing
- elseif int == "en" then
- context.color( { "darkgreen" }, str )
- elseif str == vv.en then
- context.color( { "darkred" }, str )
- elseif int == "pe" then
- context("\\righttoleft " .. str)
- else
- context(str)
- end
- end
- NC() NR()
- end
- end
- end
- context.stoptabulate()
- end
-end
-\stopluacode
-
-\starttext
-
-\setupbodyfont[dejavu,7pt,tt]
-\setuppapersize[A4,landscape][A4,landscape]
-\setuplayout[backspace=.5cm,width=middle,topspace=.5cm,height=middle,header=1cm,footer=0cm]
-
-\startluacode
- interfaces.show_missing() -- { "en","nl" }
- interfaces.show_missing_messages() -- { "en","nl" }
-\stopluacode
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-sql-tables.lua b/Master/texmf-dist/tex/context/base/s-sql-tables.lua
deleted file mode 100644
index 43410354134..00000000000
--- a/Master/texmf-dist/tex/context/base/s-sql-tables.lua
+++ /dev/null
@@ -1,152 +0,0 @@
-if not modules then modules = { } end modules ['s-languages-counters'] = {
- version = 1.001,
- comment = "companion to s-languages-counters.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-require("util-tpl")
-require("util-sql")
-require("util-sql-tracers")
-
-moduledata = moduledata or { }
-moduledata.sql = moduledata.sql or { }
-moduledata.sql.tables = moduledata.sql.tables or { }
-
-local context = context
-
-function moduledata.sql.showfields(specification) -- not that sql specific
- local data = specification.data
- if data and #data > 0 then
- local keys = specification.order or table.sortedkeys(data[1])
- local align = specification.align
- local template = "|"
- if type(align) == "table" then
- for i=1,#keys do
- template = template .. (align[keys[i]] or "c") .. "|"
- end
- else
- template = template .. string.rep((align or "c").. "|",#keys)
- end
- context.starttabulate { template }
- context.NC()
- for i=1,#keys do
- context(keys[i])
- context.NC()
- end
- context.NR()
- context.HL()
- for i=specification.first or 1,specification.last or #data do
- local d = data[i]
- context.NC()
- for i=1,#keys do
- context(d[keys[i]])
- context.NC()
- end
- context.NR()
- end
- context.stoptabulate()
- end
-end
-
-function moduledata.sql.validpresets(presets)
- local okay = true
- if presets.database == "" then
- context("No database given.")
- context.blank()
- okay = false
- end
- if presets.password == "" then
- context("No password given")
- context.blank()
- okay = false
- end
- return okay
-end
-
-function moduledata.sql.tables.showdefined(presets) -- key=value string | { presets = "name" } | { presets }
-
- if type(presets) == "string" then
- local specification = interfaces.checkedspecification(presets)
- if specification.presets then
- presets = table.load(specification.presets) or { }
- end
- end
-
- if type(presets.presets) == "string" then
- presets = table.load(presets.presets) or { }
- end
-
- if not moduledata.sql.validpresets(presets) then
- return
- end
-
- local sql_tables = utilities.sql.tracers.gettables(presets)
-
- context.starttitle { title = presets.database }
-
- for name, fields in table.sortedhash(sql_tables) do
-
- context.startsubject { title = name }
-
- context.starttabulate { format = "|l|l|l|l|l|p|" }
- context.FL()
- context.NC() context.bold("field")
- context.NC() context.bold("type")
- context.NC() context.bold("default")
- context.NC() context.bold("null")
- context.NC() context.bold("key")
- context.NC() context.bold("extra")
- context.NC() context.NR()
- context.TL()
- for i=1,#fields do
- local field = fields[i]
- context.NC() context(field.field)
- context.NC() context(field.type)
- context.NC() context(field.default)
- context.NC() context(field.null)
- context.NC() context(field.key)
- context.NC() context(field.extra)
- context.NC() context.NR()
- end
- context.LL()
- context.stoptabulate()
-
- context.stopsubject()
- end
-
- context.stoptitle()
-
-end
-
-function moduledata.sql.tables.showconstants(list)
-
- context.starttitle { title = "Constants" }
-
- for name, fields in table.sortedhash(list) do
-
- if type(fields) == "table" and #fields > 0 then
-
- context.startsubject { title = name }
-
- context.starttabulate { format = "|l|l|" }
- for i=0,#fields do
- local field = fields[i]
- if field then
- context.NC() context(i)
- context.NC() context(field)
- context.NC() context.NR()
- end
- end
- context.stoptabulate()
-
- context.stopsubject()
-
- end
-
- end
-
- context.stoptitle()
-
-end
diff --git a/Master/texmf-dist/tex/context/base/s-sql-tables.mkiv b/Master/texmf-dist/tex/context/base/s-sql-tables.mkiv
deleted file mode 100644
index 12257087492..00000000000
--- a/Master/texmf-dist/tex/context/base/s-sql-tables.mkiv
+++ /dev/null
@@ -1,24 +0,0 @@
-%D \module
-%D [ file=s-sql-tables,
-%D version=2012.07.12,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=SQL,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% for the moment no helpers
-
-\startmodule[sql-tables]
-
-\registerctxluafile{s-sql-tables}{}
-
-\installmodulecommandluasingle \showdefinedsqltables {moduledata.sql.tables.showdefined}
-
-\stopmodule
-
-
diff --git a/Master/texmf-dist/tex/context/base/s-structure-sections.mkiv b/Master/texmf-dist/tex/context/base/s-structure-sections.mkiv
deleted file mode 100644
index daaab5abcd0..00000000000
--- a/Master/texmf-dist/tex/context/base/s-structure-sections.mkiv
+++ /dev/null
@@ -1,80 +0,0 @@
-%D \module
-%D [ file=s-structure-sections,
-%D version=2015.02.02,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Show Structure Sections,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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
-
-\startluacode
- local context = context
- local ctx_NC, ctx_NR = context.NC, context.NR
- local ctx_bold = context.bold
-
- structures.tracers = structures.tracers or { }
-
- function structures.tracers.showsections()
-
- local list = structures.sections.registered
- local keys = table.keys(list)
- table.sort(keys,function(a,b)
- local la, lb = list[a].level, list[b].level
- if la == lb then
- return a < b
- else
- return la < lb
- end
- end)
- context.start()
- context.switchtobodyfont { "tt" }
- context.starttabulate { "||c||||" }
- context.FL()
- ctx_NC() ctx_bold("name")
- ctx_NC() ctx_bold("level")
- ctx_NC() ctx_bold("parent")
- ctx_NC() ctx_bold("section")
- ctx_NC() ctx_bold("coupling")
- ctx_NC() context.NR()
- context.ML()
- for i=1,#keys do
- local k = keys[i]
- local v = list[k]
- ctx_NC() ctx_bold(k)
- ctx_NC() context(v.level)
- ctx_NC() context(v.parent)
- ctx_NC() context(v.section)
- ctx_NC() context(v.coupling)
- ctx_NC() context.NR()
- end
- context.LL()
- context.stoptabulate()
- context.stop()
-
- end
-\stopluacode
-
-
-\starttexdefinition showstructuresections
-
- % no settings yet
-
- \ctxlua{structures.tracers.showsections()}
-
-\stoptexdefinition
-
-\protect
-
-\continueifinputfile{s-structure-sections.mkiv}
-
-\starttext
-
- \showstructuresections
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/s-syntax.mkii b/Master/texmf-dist/tex/context/base/s-syntax.mkii
deleted file mode 100644
index 6d1d59697ec..00000000000
--- a/Master/texmf-dist/tex/context/base/s-syntax.mkii
+++ /dev/null
@@ -1,54 +0,0 @@
-%D \module
-%D [ file=s-syntax, % was: s-syn-01,
-%D version=0000.00.00,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Preliminary Syntax Stuff,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D This is needed for the \METAFUN\ manual (this module was
-%D called \type {p-syn-01} on my machine).
-
-\unprotect
-
-\def\Indent #1{\ifvmode\noindent\hbox to 2em{\hss#1}\else#1\fi}
-\def\Sugar #1{\ifhmode\unskip\unskip\unskip\fi\kern.25em{#1}\kern.25em\ignorespaces}
-\def\Something#1{\Sugar{\mathematics{\langle\hbox{#1}\rangle}}}
-\def\Lbrace {\Sugar{\tttf\leftargument}}
-\def\Rbrace {\Sugar{\tttf\rightargument}}
-\def\Or {\Sugar{\mathematics{\vert}}}
-\def\Optional #1{\Sugar{\mathematics{[\hbox{#1}]}}}
-\def\Means {\Sugar{\mathematics{\rightarrow}}}
-\def\Tex #1{\Sugar{\type{#1}}}
-\def\Literal #1{\Sugar{\type{#1}}}
-\def\Syntax #1{\strut\kern-.25em{#1}\kern-.25em}
-\def\Next {\crlf\hbox to 2em{}\nobreak}
-\def\Whatever #1{\Sugar{\mathematics{(\hbox{#1})}}}
-\def\Quote #1{\Sugar{\quote{#1}}}
-
-\def\Or {\Sugar{\Indent{\mathematics{\vert}}}}
-\def\Means {\Sugar{\Indent{\mathematics{\rightarrow}}}}
-
-\def\StartSyntax
- {\goodbreak
- \startlines
- \catcode`\#=12
- \let\L \Literal
- \let\S \Something
- \def\FL##1{\color[darkred]{\L{##1}}}
- \def\FS##1{\S{\color[darkred]{##1}}}
- \let\M \Means
- \let\O \Or
- \let\Q \Quote
- \let\LB\Lbrace
- \let\RB\Rbrace}
-
-\def\StopSyntax
- {\stoplines}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/s-syntax.mkiv b/Master/texmf-dist/tex/context/base/s-syntax.mkiv
deleted file mode 100644
index 96312f77179..00000000000
--- a/Master/texmf-dist/tex/context/base/s-syntax.mkiv
+++ /dev/null
@@ -1,96 +0,0 @@
-%D \module
-%D [ file=s-syntax, % was: s-syn-01,
-%D version=0000.00.00,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Preliminary Syntax Stuff,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D This is needed for the \METAFUN\ manual: quite old code that I would do
-%D differently nowadays.
-
-\unprotect
-
-\unexpanded\def\module_syntax_Indent #1{\ifvmode\noindent\hbox to 2em{\hss#1}\else#1\fi}
-\unexpanded\def\module_syntax_Sugar #1{\removeunwantedspaces\kern.25em{#1}\kern.25em\ignorespaces}
-\unexpanded\def\module_syntax_Something #1{\Sugar{\mathematics{\langle\hbox{#1}\rangle}}}
-\unexpanded\def\module_syntax_Lbrace {\Sugar{\tttf\leftargument}}
-\unexpanded\def\module_syntax_Rbrace {\Sugar{\tttf\rightargument}}
-\unexpanded\def\module_syntax_Lparent {\Sugar{\tttf(}}
-\unexpanded\def\module_syntax_Rparent {\Sugar{\tttf)}}
-\unexpanded\def\module_syntax_Lbracket {\Sugar{\tttf[}}
-\unexpanded\def\module_syntax_Rbracket {\Sugar{\tttf]}}
-\unexpanded\def\module_syntax_Or {\Sugar{\mathematics{\vert}}}
-\unexpanded\def\module_syntax_Optional #1{\Sugar{\mathematics{[\hbox{#1}]}}}
-\unexpanded\def\module_syntax_Means {\Sugar{\mathematics{\rightarrow}}}
-\unexpanded\def\module_syntax_Tex #1{\Sugar{\type{#1}}}
-\unexpanded\def\module_syntax_Literal #1{\Sugar{\type{#1}}}
-\unexpanded\def\module_syntax_Syntax #1{\strut\kern-.25em{#1}\kern-.25em}
-\unexpanded\def\module_syntax_Next {\crlf\hbox to 2em{}\nobreak}
-\unexpanded\def\module_syntax_Whatever #1{\Sugar{\mathematics{(\hbox{#1})}}}
-\unexpanded\def\module_syntax_Quote #1{\Sugar{\quote{#1}}}
-\unexpanded\def\module_syntax_Or {\Sugar{\module_syntax_Indent{\mathematics{\vert}}}}
-\unexpanded\def\module_syntax_Means {\Sugar{\module_syntax_Indent{\mathematics{\rightarrow}}}}
-\unexpanded\def\module_syntax_FlaggedLiteral #1{\color[darkred]{\module_syntax_Literal{#1}}}
-\unexpanded\def\module_syntax_FlaggedSomething#1{\module_syntax_Something{\color[darkred]{#1}}}
-
-\unexpanded\def\StartSyntax
- {\startlines
- % formatters
- \let\Indent \module_syntax_Indent
- \let\Sugar \module_syntax_Sugar
- \let\Something \module_syntax_Something
- \let\Lbrace \module_syntax_Lbrace
- \let\Rbrace \module_syntax_Rbrace
- \let\Lparent \module_syntax_Lparent
- \let\Rparent \module_syntax_Rparent
- \let\Lbracket \module_syntax_Lbracket
- \let\Rbracket \module_syntax_Rbracket
- \let\Or \module_syntax_Or
- \let\Optional \module_syntax_Optional
- \let\Means \module_syntax_Means
- \let\Tex \module_syntax_Tex
- \let\Literal \module_syntax_Literal
- \let\Syntax \module_syntax_Syntax
- \let\Next \module_syntax_Next
- \let\Whatever \module_syntax_Whatever
- \let\Quote \module_syntax_Quote
- \let\Or \module_syntax_Or
- \let\Means \module_syntax_Means
- \let\FlaggedLiteral \module_syntax_FlaggedLiteral
- \let\FlaggedSomething\module_syntax_FlaggedSomething
- % shortcuts
- \let\FL \module_syntax_FlaggedLiteral
- \let\FS \module_syntax_FlaggedSomething
- \let\L \module_syntax_Literal
- \let\S \module_syntax_Something
- \let\M \module_syntax_Means
- \let\O \module_syntax_Or
- \let\Q \module_syntax_Quote
- \let\LB \module_syntax_Lbrace
- \let\RB \module_syntax_Rbrace
- \let\LP \module_syntax_Lparent
- \let\RP \module_syntax_Rparent
- \let\LS \module_syntax_Lbracket
- \let\RS \module_syntax_Rbracket
- \let\{ \module_syntax_Lbrace
- \let\} \module_syntax_Rbrace
- \let\( \module_syntax_Lparent
- \let\) \module_syntax_Rparent
- \let\[ \module_syntax_Lbracket
- \let\] \module_syntax_Rbracket
- % precaution
- \catcode`\#\othercatcode}
-
-\unexpanded\def\StopSyntax
- {\stoplines}
-
-\unexpanded\def\SyntaxCommand#1%
- {\csname module_syntax_#1\endcsname}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/s-typesetting-kerning.mkiv b/Master/texmf-dist/tex/context/base/s-typesetting-kerning.mkiv
deleted file mode 100644
index 48d81ce3602..00000000000
--- a/Master/texmf-dist/tex/context/base/s-typesetting-kerning.mkiv
+++ /dev/null
@@ -1,209 +0,0 @@
-%D \module
-%D [ file=s-typesetting-kerning,
-%D version=2014.12.14,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Show Character Kerning,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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
-
-\definecharacterkerning
- [typesetting-kerning-demo]
- [factor=.5]
-
-\startbuffer[showcharacterkerning:boxes]
- \starttextrule{boxes}
- \showfontkerns
- \dontcomplain
- \startlines
- test \hbox{!} test
- test\hbox{!} test
- test \hbox{!}test
- test:$x$ test
- \setcharacterkerning[typesetting-kerning-demo]
- test \hbox{!} test
- test\hbox{!} test
- test \hbox{!}test
- test:$x$ test
- \stoplines
- \stoptextrule
-\stopbuffer
-
-\startbuffer[showcharacterkerning:ligatures]
- \starttextrule{ligatures}
- \dontcomplain
- \startlines
- effe flink effectief efficient fietsen
- \blank
- \setcharacterkerning[typesetting-kerning-demo]
- effe flink effectief efficient fietsen
- \blank \hsize\zeropoint
- effe
- flink
- effectief
- efficient
- fietsen
- \stoplines
- \stoptextrule
-\stopbuffer
-
-\startbuffer[showcharacterkerning:discretionaries]
- \starttextrule{discretionary}
- \dontcomplain
- \startlines
- \hbox{\samplediscretionary}
- \hbox{xxx\samplediscretionary}
- \hbox{\samplediscretionary xxx}
- \hbox{xxx\samplediscretionary xxx}
- \blank
- \setcharacterkerning[typesetting-kerning-demo]
- \hbox{\samplediscretionary}
- \hbox{xxx\samplediscretionary}
- \hbox{\samplediscretionary xxx}
- \hbox{xxx\samplediscretionary xxx}
- \blank \hsize\zeropoint
- \samplediscretionary
- xxx\samplediscretionary
- \samplediscretionary xxx
- xxx\samplediscretionary xxx
- \stoplines
- \stoptextrule
-\stopbuffer
-
-\startbuffer[showcharacterkerning:explicits]
- \starttextrule{explicits}
- \exhyphenchar \hyphenasciicode
- \preexhyphenchar \lessthanasciicode
- \postexhyphenchar\morethanasciicode
- \def\TestDisc
- {\discretionary
- {\kern\emwidth<}%
- {>\kern\emwidth}%
- {\kern\emwidth=\kern\emwidth}%
- }
- \dontcomplain
- \startlines
- \hbox{super-charged}
- \hbox{super\-charged}
- \hbox{super\TestDisc charged}
- \hbox{super\discretionary{[}{]}{[]}charged}
- \blank
- \setcharacterkerning[typesetting-kerning-demo]
- \hbox{super-charged}
- \hbox{super\-charged}
- \hbox{super\TestDisc charged}
- \hbox{super\discretionary{[}{]}{[]}charged}
- \blank \hsize\zeropoint
- super-charged
- super\-charged
- super\TestDisc charged
- super\discretionary{[}{]}{[]}charged
- \stoplines
- \stoptextrule
-\stopbuffer
-
-\starttexdefinition unexpanded showcharacterkerning
- \getbuffer[showcharacterkerning:boxes]
- \getbuffer[showcharacterkerning:ligatures]
- \getbuffer[showcharacterkerning:discretionaries]
- \getbuffer[showcharacterkerning:explicits]
-\stoptexdefinition
-
-
-\starttexdefinition showcharacterkerningstepscompared #1
- \definecharacterkerning[crap][factor=\KerningStepFactor]%
- \setbox0=\ruledhbox{\color[color-1]{#1}\hss}
- \setbox2=\ruledhbox{\setcharacterkerning[crap]\color[color-2]{#1}}
- \setbox4=\ruledhbox{\setcharacterkerning[crap]\showfontkerns\showglyphs#1}
- \xdef\KerningStepPercentage{\ctxlua{context("\letterpercent 0.2f",(1-\number\wd0/\number\wd2)*100)}}
- \scratchwidth\wd0
- \vtop\bgroup
- \hbox{\box0\hskip-\scratchwidth\box2}
- \par
- \box4
- \egroup
-\stoptexdefinition
-
-\starttexdefinition showcharacterkerningsteps [#1]
-
- \start
-
- \getdummyparameters
- [\s!font=Regular,
- \c!sample={Wat een bende, rommelen met het font design!},
- \c!text={rommelen},
- \c!first=00,
- \c!last=95,
- \c!step=05,
- \c!option=, % \v!page
- #1]
-
- \doif{\dummyparameter\c!option}\v!page {
- \startTEXpage[\c!offset=1ex]
- }
-
- \definecolor[color-1][r=1,t=.5,a=1]
- \definecolor[color-2][b=1,t=.5,a=1]
-
- \definedfont[\dummyparameter\s!font*default sa 1]
-
- \doif {\dummyparameter\c!option}\v!page {
- \begingroup
- \tttf \dummyparameter\s!font\space @ default
- \endgroup
- \blank
- }
-
- \starttabulate[|cT|l|cT|l|cT|]
-
- \NC \tt\bf factor \NC \tt\bf sample \NC \tt\bf \letterpercent \NC \tt\bf text \NC \tt\bf \letterpercent \NC \NR \HL
-
- \dostepwiserecurse {\dummyparameter\c!first} {\dummyparameter\c!last} {\dummyparameter\c!step} {
- \NC
- \xdef\KerningStepFactor{\ctxlua{context("\letterpercent 0.3f",####1/1000)}}
- \KerningStepFactor
- \NC
- \showcharacterkerningstepscompared{\dummyparameter\c!sample}
- \NC
- \KerningStepPercentage
- \NC
- \showcharacterkerningstepscompared{\dummyparameter\c!text}
- \NC
- \KerningStepPercentage
- \NC \NR
- }
-
- \stoptabulate
-
- \doif{\dummyparameter\c!option}\v!page {
- \stopTEXpage
- }
-
- \stop
-
-\stoptexdefinition
-
-\protect
-
-\continueifinputfile{s-typesetting-kerning.mkiv}
-
-\starttext
-
- % \showcharacterkerning
-
- \showcharacterkerningsteps[font=file:FuturaStd-Book.otf,option=page]
- \showcharacterkerningsteps[font=file:FuturaStd-Medium.otf,option=page]
- \showcharacterkerningsteps[font=file:FuturaStd-Bold.otf,option=page]
- \showcharacterkerningsteps[font=file:FuturaStd-heavy.otf,option=page]
-
-\stoptext
-
-% {\hsize1mm efficient\discretionary{\kern1pt!\kern1pt}{\kern1pt!\kern1pt}{\kern1pt!\kern1pt}efficient\par}
-% {\hsize1mm\definedfont[Regular]\setcharacterkerning[typesetting-kerning-demo]efficient\-efficient\par}
-
diff --git a/Master/texmf-dist/tex/context/base/s-youless.mkiv b/Master/texmf-dist/tex/context/base/s-youless.mkiv
deleted file mode 100644
index e15973b9c63..00000000000
--- a/Master/texmf-dist/tex/context/base/s-youless.mkiv
+++ /dev/null
@@ -1,171 +0,0 @@
-%D \module
-%D [ file=s-youless,
-%D version=2013.11.12,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Youless Graphics,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D This is experimental code. When I have collected enough data I will make the
-%D graphics nicer and provide some more.
-%D
-%D The Jouless can serve web pages but there is not much detail in them. They also are
-%D somewhat bad \HTML, like unquoted attributes and so. We don't need this anyway as we
-%D can also fetch data directly. The data is collected using a dedicated helper script
-%D (of course we could just call it as module too). The data is fetched from the Jouless
-%D device using queries (currently we use json, but a more direct parsing of data might
-%D be more efficient). The data is converted into a proper \LUA\ table and saved (merged).
-
-% in cronjob on one of the servers:
-%
-% mtxrun --script youless --collect --host=192.168.2.50 --watt youless-watt.lua
-% mtxrun --script youless --collect --host=192.168.2.50 --kwk youless-kwh.lua
-
-\startluacode
-
- require("util-you")
-
- moduledata.youless = { }
-
- function moduledata.youless.kwh(specification)
- -- todo
- end
-
- function moduledata.youless.watt(specification)
-
- local year = tonumber(specification.year) or os.today().year
- local data = table.load(specification.filename or "youless-watt.lua")
-
- if not data or data.variant ~= "watt" then
- context("invalid variant")
- return
- end
-
- utilities.youless.analyze(data)
-
- -- for the moment no specific font scaling
-
- local years = data.years
-
- if not years then
- context("no years")
- return
- end
-
- for y=year,year do
-
- local year = years[y]
- local scale = 20
- local mark = 3
- local maxwatt = specification.maxwatt or year.maxwatt
-
- for m=1,12 do
- local month = year.months[m]
- if month then
- context.startMPpage { offset = "10pt" }
- context("linecap := butt; pickup pencircle scaled .5")
-
- for i=0,(math.div(maxwatt,1000)+1)*1000,100 do
- context("draw (%s,%s) -- (%s,%s) withcolor .6white ;",0,i/scale,31 * 24,i/scale)
- end
-
- context("draw (0,%s) -- (31 * 24,%s) dashed dashpattern(on 6 off 6) withcolor darkgreen withpen pencircle scaled 1 ;",year.watt /scale,year.watt /scale)
- context("draw (0,%s) -- (31 * 24,%s) dashed dashpattern(off 6 on 6) withcolor darkred withpen pencircle scaled 1 ;",month.watt/scale,month.watt/scale)
-
- local days = month.days
- if days then
- local nd = os.nofdays(y,m)
- for d=1,nd do
- local day = days[d]
- local xoffset = (d-1) * 24
- local wd = os.weekday(d,m,y)
- local weekend = wd == 1 or wd == 7
- if not weekend then
- -- okay
- elseif mark == 1 then
- context("draw (%s,%s) -- (%s,%s) ; ",xoffset, -17.5,xoffset, -32.5)
- context("draw (%s,%s) -- (%s,%s) ; ",xoffset+24,-17.5,xoffset+24,-32.5)
- elseif mark == 2 then
- context("draw (%s,%s) -- (%s,%s) ; ",xoffset, -17.5,xoffset+24,-17.5)
- context("draw (%s,%s) -- (%s,%s) ; ",xoffset, -32.5,xoffset+24,-32.5)
- elseif mark == 3 then
- context("draw unitsquare xysized (%s,%s) shifted (%s,%s) ; ",24,15,xoffset,-32.5)
- end
- context([[draw textext("%s") shifted (%s,%s) ; ]],d,xoffset + 12,-25)
- if day then
- for h=0,23 do
- local hours = day.hours
- if hours then
- local hour = hours[h]
- if hour then
- local dx = xoffset + h
- local dy = hour.watt/scale
- local dm = hour.maxwatt/scale
- context("draw (%s,%s) -- (%s,%s) withcolor %s ; ",dx, 0,dx,dy,weekend and "darkmagenta" or "darkblue")
- context("draw (%s,%s) -- (%s,%s) withcolor %s ; ",dx,dy,dx,dm,"darkgray")
- end
- end
- end
- end
- end
- for d=0,30 do
- local xoffset = d * 24
- context("draw (%s,%s) -- (%s,%s) withcolor darkgray ; ",xoffset+ 0,0,xoffset+ 0,-10)
- context("draw (%s,%s) -- (%s,%s) withcolor darkgray ; ",xoffset+ 6,0,xoffset+ 6,-2.5)
- context("draw (%s,%s) -- (%s,%s) withcolor darkgray ; ",xoffset+12,0,xoffset+12,-5)
- context("draw (%s,%s) -- (%s,%s) withcolor darkgray ; ",xoffset+18,0,xoffset+18,-2.5)
- end
- local xoffset = 31 * 24
- context("draw (%s,%s) -- (%s,%s) withcolor darkgray ; ",xoffset,0,xoffset,-10)
- end
-
- local max = (math.div(maxwatt,1000)+1)
-
- for i=0,max*1000,1000 do
- context([[draw textext.lft("%s") shifted (%s,%s) ; ]],i,-10,i/scale)
- context("draw (%s,%s) -- (%s,%s) withcolor .2white ;",0,i/scale,31 * 24,i/scale)
- end
-
- context([[draw textext("\strut\month{%s}\enspace%s") shifted (%s,%s) ; ]],m, y, 31 * 24 / 2, -50)
- context([[draw textext.lft("watt") shifted (%s,%s) ; ]],-10,-25)
-
- context.stopMPpage()
- else
- -- maybe placeholder
- end
- end
-
- end
-
- end
-
-\stopluacode
-
-\continueifinputfile{s-youless.mkiv}
-
-\setupbodyfont[dejavu] % smaller sizes also look ok
-
-% printer (oce) : > 3000 W startup (900 W idle, 2000 W printing)
-% coffeemaker : 1500 W when heating
-
-% baseline day : 2250 W (servers, airco, workstations, routers, switches, heating, etc)
-% baseline night : 1750 W
-
-\starttext
-
- \startluacode
-
- -- os.execute([[mtxrun --script youless --collect --watt "c:/data/system/youless/data/youless-watt.lua"]])
- -- os.execute([[mtxrun --script youless --collect --watt --nobackup "c:/data/system/youless/data/youless-watt.lua"]])
- -- moduledata.youless.watt { year = 2013, filename = "c:/data/system/youless/data/youless-watt.lua" }
-
- moduledata.youless.watt { year = 2013, filename = "youless-watt.lua" }
-
- \stopluacode
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/spac-prf.mkiv b/Master/texmf-dist/tex/context/base/spac-prf.mkiv
deleted file mode 100644
index 5f1553ede11..00000000000
--- a/Master/texmf-dist/tex/context/base/spac-prf.mkiv
+++ /dev/null
@@ -1,31 +0,0 @@
-%D \module
-%D [ file=spac-prf,
-%D version=2015.11.16, % moved from test module mathplus
-%D title=\CONTEXT\ Spacing Macros,
-%D subtitle=Profiling,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Spacing Macros / Profiling}
-
-%D This is a placeholder for something to come. But as I don't want to
-%D be harrassed by 'why does it work different than a week before' this
-%D cool new feature will only end up here when stable enough. Alas.
-
-\unprotect
-
-\definesystemattribute[profilemethod][public]
-
-\unexpanded\def\setprofile [#1]{}
-\unexpanded\def\resetprofile {}
-\unexpanded\def\useprofileparameter#1{}
-\unexpanded\def\addprofiletobox #1{}
-\unexpanded\def\profilegivenbox #1#2{}
-\unexpanded\def\profiledbox {\vbox}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/status-files.pdf b/Master/texmf-dist/tex/context/base/status-files.pdf
deleted file mode 100644
index 619f763672f..00000000000
--- a/Master/texmf-dist/tex/context/base/status-files.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/tex/context/base/status-lua.pdf b/Master/texmf-dist/tex/context/base/status-lua.pdf
deleted file mode 100644
index 63c3286e8a7..00000000000
--- a/Master/texmf-dist/tex/context/base/status-lua.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/tex/context/base/syst-aux.lua b/Master/texmf-dist/tex/context/base/syst-aux.lua
deleted file mode 100644
index fff9bbb4c16..00000000000
--- a/Master/texmf-dist/tex/context/base/syst-aux.lua
+++ /dev/null
@@ -1,229 +0,0 @@
-if not modules then modules = { } end modules ['syst-aux'] = {
- version = 1.001,
- comment = "companion to syst-aux.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
--- slower than lpeg:
---
--- utfmatch(str,"(.?)(.*)$")
--- utf.sub(str,1,1)
-
-local tonumber = tonumber
-local utfsub = utf.sub
-local P, S, R, C, Cc, Cs, Carg, lpegmatch = lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.Cc, lpeg.Cs, lpeg.Carg, lpeg.match
-
-local context = context
-local implement = interfaces.implement
-local formatters = string.formatters
-local setcatcode = tex.setcatcode
-local utf8character = lpeg.patterns.utf8character
-local settings_to_array = utilities.parsers.settings_to_array
-local setmacro = interfaces.setmacro
-
-local pattern = C(utf8character^-1) * C(P(1)^0)
-
-implement {
- name = "getfirstcharacter",
- arguments = "string",
- actions = function(str)
- local first, rest = lpegmatch(pattern,str)
- setmacro("firstcharacter",first)
- setmacro("remainingcharacters",rest)
- end
-}
-
-implement {
- name = "thefirstcharacter",
- arguments = "string",
- actions = function(str)
- local first, rest = lpegmatch(pattern,str)
- context(first)
- end
-}
-
-implement {
- name = "theremainingcharacters",
- arguments = "string",
- actions = function(str)
- local first, rest = lpegmatch(pattern,str)
- context(rest)
- end
-}
-
-local pattern = C(utf8character^-1)
-local ctx_doifelse = commands.doifelse
-
-implement {
- name = "doifelsefirstchar",
- arguments = { "string", "string" },
- actions = function(str,chr)
- ctx_doifelse(lpegmatch(pattern,str) == chr)
- end
-}
-
-implement {
- name = "getsubstring",
- arguments = { "string", "string", "string" },
- actions = function(str,first,last)
- context(utfsub(str,tonumber(first),tonumber(last)))
- end
-}
-
--- function commands.addtocommalist(list,item)
--- if list == "" then
--- context(item)
--- else
--- context("%s,%s",list,item) -- using tex.print is some 10% faster
--- end
--- end
---
--- function commands.removefromcommalist(list,item)
--- if list == "" then
--- context(item)
--- else
--- -- okay, using a proper lpeg is probably faster
--- -- we could also check for #l = 1
--- local l = settings_to_array(list)
--- local t, n = { }
--- for i=1,#l do
--- if l[i] ~= item then
--- n = n + 1
--- t[n] = item
--- end
--- end
--- if n == 0 then
--- context(item)
--- else
--- context(concat(list,","))
--- end
--- end
--- end
-
-local pattern = (C((1-P("%"))^1) * Carg(1)) / function(n,d)
- return formatters["%.0fsp"](d * tonumber(n)/100) end * P("%") * P(-1) -- .0 ?
-
--- percentageof("10%",65536*10)
-
-implement {
- name = "percentageof",
- arguments = { "string", "dimen" },
- actions = function(str,dim)
- context(lpegmatch(pattern,str,1,dim) or str)
- end
-}
-
--- \gdef\setpercentdimen#1#2%
--- {#1=\ctxcommand{percentageof("#2",\number#1)}\relax}
-
-local spaces = P(" ")^0 / ""
-local nohash = 1 - P("#")
-local digit = R("09")
-local double = P("##") / "#"
-local single = P("#")
-local sentinel = spaces * (nohash^1 / "\\%0")
-local sargument = (single * digit)^1
-local dargument = (double * digit)^1
-
-local usespaces = nil
-local texpreamble = nil
-
-local pattern = Cs( -- ^-1
- ( P("spaces") / function() usespaces = true return "" end )^0
- * spaces
- * ( P("nospaces") / function() usespaces = false return "" end )^0
- * spaces
- * ( P("global") / "\\global" )^0
- * spaces
- * ( P("unexpanded") / "\\unexpanded" )^0
- * spaces
- * Cc("\\expandafter\\")
- * spaces
- * ( P("expanded") / "e" )^0
- * spaces
- * ( P((1-S(" #"))^1) / "def\\csname %0\\endcsname" )
- * spaces
- * (
- -- (double * digit)^1 * sentinel^-1 * double^-1
- -- + (single * digit)^1 * sentinel^-1 * single^-1
- ( P("[") * dargument * P("]") + dargument)^1 * sentinel^-1 * double^-1
- + ( P("[") * sargument * P("]") + sargument)^1 * sentinel^-1 * single^-1
- + sentinel^-1 * (double+single)^-1
- )
-)
-
-local ctx_dostarttexdefinition = context.dostarttexdefinition
-
-local function texdefinition_one(str)
- usespaces = nil
- texpreamble = lpegmatch(pattern,str)
- if usespaces == true then
- setcatcode(32,10) -- space
- setcatcode(13, 5) -- endofline
- elseif usespaces == false then
- setcatcode(32, 9) -- ignore
- setcatcode(13, 9) -- ignore
- else
- -- this is default
- -- setcatcode(32,10) -- space
- -- setcatcode(13, 9) -- ignore
- end
- ctx_dostarttexdefinition()
-end
-
-local function texdefinition_two()
- context(texpreamble)
-end
-
-implement { name = "texdefinition_one", actions = texdefinition_one, scope = "private", arguments = "string" }
-implement { name = "texdefinition_two", actions = texdefinition_two, scope = "private" }
-
-implement { name = "upper", arguments = "string", actions = { utf.upper, context } }
-implement { name = "lower", arguments = "string", actions = { utf.lower, context } }
-implement { name = "strip", arguments = "string", actions = { string.strip, context } } -- or utf.strip
-
-implement {
- name = "converteddimen",
- arguments = { "dimen", "string" },
- actions = function(dimen,unit)
- context(number.todimen(dimen,unit or "pt","%0.5f")) -- no unit appended (%F)
- end
-}
-
--- where, not really the best spot for this:
-
-implement {
- name = "immediatemessage",
- arguments = { "'message'", "string" },
- actions = logs.status
-}
-
-implement {
- name = "resettimer",
- actions = function()
- statistics.resettiming("whatever")
- statistics.starttiming("whatever")
- end
-}
-
-implement {
- name = "elapsedtime",
- actions = function()
- statistics.stoptiming("whatever")
- context(statistics.elapsedtime("whatever"))
- end
-}
-
-local accuracy = table.setmetatableindex(function(t,k)
- local v = formatters["%0." ..k .. "f"]
- t[k] = v
- return v
-end)
-
-implement {
- name = "rounded",
- arguments = "integer",
- actions = function(n,m) context(accuracy[n](m)) end
-}
diff --git a/Master/texmf-dist/tex/context/base/tabl-ltb.mkiv b/Master/texmf-dist/tex/context/base/tabl-ltb.mkiv
deleted file mode 100644
index 4c892138e82..00000000000
--- a/Master/texmf-dist/tex/context/base/tabl-ltb.mkiv
+++ /dev/null
@@ -1,766 +0,0 @@
-%D \module
-%D [ file=tabl-ltb,
-%D version=2002.10.31,
-%D title=\CONTEXT\ Table Macros,
-%D subtitle=Line Tables,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% testfile: tfmetrics.tex
-
-% todo: als nx>1, dan in geval van rek tussenruimte berekenen en optellen
-% bij breedte, dus: nx nog niet gebruiken in combinatie met rek ! ! ! ! !
-
-% This module is experimental, undocumented, and currently only set up
-% eTeX. It provides a mechanism for typesetting very large tables,
-% spanning many pages horizontally and vertically, with repeated
-% header lines and (entry) columns, tab tracking, color, etc. In does
-% two passes over a table, which is why the table goes into a
-% buffer or file. As said, tables can be real huge.
-
-% \BH \BC .. \EC \BC .. \EC \EH % append
-% \BR \BC .. \EC \BC .. \EC \ER
-%
-% or
-%
-% \NC .. \NC .. \NC \NR (todo: optional last \NC)
-
-% alternative:
-%
-% (1) direct run, save content in macro, but only if needed
-%
-% todo
-%
-% (2) buffered table content
-%
-% \startbuffer
-% \startlinetablehead
-% \stoplinetablehead
-% \startlinetablebody
-% \stoplinetablebody
-% \stopbuffer
-%
-% \processlinetablebuffer[buffer]
-%
-% in buffer : head and body
-%
-% (3) unbuffered run, multipass
-%
-% - run with starting width zero / prev run
-% - clip on prev run
-% - flush real widths
-
-\writestatus{loading}{ConTeXt Table Macros / Line Tables}
-
-\unprotect
-
-\newconstant\linetablesplitstate
-\newconstant\linetableheadstate
-\newconstant\linetablemode
-
-\definesystemvariable {le} % LinetablE
-
-\edef\??ler{\??le:r:}
-\edef\??lec{\??le:c:}
-\edef\??lew{\??le:w:}
-\edef\??leh{\??le:h:}
-\edef\??led{\??le:d:}
-
-\newif\iflinetablepreroll
-\newif\ifinlinetable
-
-\newcount\linetablecolumn
-\newcount\linetablesubcol
-\newdimen\linetablewidth
-\newdimen\linetableheight
-\newbox \linetablecell
-
-\let\noflinetablecolumns\!!zerocount
-\let\noflinetablerows \!!zerocount
-\let\noflinetablelines \!!zerocount
-\let\noflinetableparts \!!zerocount
-\let\linetablepart \!!plusone
-\let\linetablestep \!!plusone
-\let\linetableline \!!zerocount
-\let\linetablerow \!!zerocount
-\let\linetablerows \!!zerocount
-
-\initializetablebox \zerocount % holds repeater
-
-\newconstant\linetablehmode
-\newconstant\linetablepage
-\newconstant\linetablerepeat
-
-\unexpanded\def\setuplinetable
- {\dotripleempty\dosetuplinetable}
-
-\def\dosetuplinetable[#1][#2][#3]%
- {\ifthirdargument
- \getparameters[\??le:#1:#2][#3]%
- \else\ifsecondargument
- \getparameters[\??lec#1][#2]%
- \else
- \getparameters[\??le][#1]%
- \fi\fi}
-
-\setuplinetable
- [\c!n=\!!maxcard,
- \c!lines=\!!maxcard,
- \c!nx=\plusone,
- \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}
-
-\def\doifelselinetablecparameter#1%
- {\ifcsname\??lec\number\linetablecolumn#1\endcsname
- \expandafter\firstoftwoarguments
- \else
- \expandafter\secondoftwoarguments
- \fi}
-
-\let\doiflinetablecparameterelse\doifelselinetablecparameter
-
-\def\linetablecparameter#1%
- {\csname
- \ifcsname\??lec\number\linetablecolumn#1\endcsname
- \??lec\number\linetablecolumn
- \else
- \??le
- \fi
- #1\endcsname}
-
-\def\linetablerparameter#1% faster, leaner and meaner
- {\csname
- \ifnum\linetablerow=\zerocount % geen ifcase
- \ifcsname\??ler\v!header#1\endcsname
- \??ler\v!header#1%
- \else\ifcsname\??ler0#1\endcsname
- \??ler0#1%
- \else
- \s!empty
- \fi\fi
- \else
- \ifcsname\??ler\number\linetablerow#1\endcsname
- \??ler\number\linetablerow#1%
- \else\ifcsname\??ler\v!oddeven\linetablerow#1\endcsname
- \??ler\v!oddeven\linetablerow#1%
- \else
- \s!empty
- \fi\fi
- \fi
- \endcsname}
-
-\def\setnoftableslines
- {\doifelse{\linetableparameter\c!lines}\v!fit
- {% whitespace already added by vertical strut
- \ifdim\pagegoal<\maxdimen
- \scratchdimen\pagegoal
- \advance\scratchdimen -\pagetotal
- \else
- \scratchdimen\textheight
- \fi
- \getrawnoflines\scratchdimen
- \xdef\noflinetablelines{\the\noflines}
-\iflinetablepreroll \else \ifnum\noflinetablelines<\plustwo
- \page \setnoftableslines
-\fi \fi
-}
- {\xdef\noflinetablelines{\linetableparameter\c!lines}}}
-
-\unexpanded\def\startlinetablecell
- {\dosingleempty\dostartlinetablecell}
-
-\def\dostartlinetablecell[#1]%
- {\global\setbox\linetablecell\hbox\bgroup
- \iffirstargument
- \getparameters[\??lec\number\linetablecolumn][#1]%
- \fi
- \xdef\linetablestep{\linetablecparameter\c!nx}%
- \ifcase\linetablestep\or
- \scratchdimen\linetablecparameter\c!width
- \scratchskip \linetablecparameter\c!distance
- \else
- \scratchdimen \zeropoint
- \scratchskip \zeropoint
- \scratchcounter\linetablecolumn
- \dorecurse\linetablestep
- {\advance\scratchdimen\linetablecparameter\c!width
- %\advance\scratchskip \linetablecparameter\c!distance
- \global\advance \linetablecolumn\plusone
- \advance\scratchskip \linetablecparameter\c!distance
- }%
- \global\linetablecolumn\scratchcounter
- \fi
- \linetablemode
- \iflinetablepreroll
- \ifdim\scratchdimen>\zeropoint \zerocount \else \plustwo \fi
- \else
- \zerocount
- \fi
- \ifcase\linetablemode
- \ifcase\linetablehmode
- % nothing
- \or
- % fit, keep it simple
- \or
- \linetablemode\plusone % line
- \else
- % some already calculated height
- \fi
- \fi
- \setbox\scratchbox\hbox
- \bgroup
- \dontcomplain
- \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!leftoffset
- \advance\scratchdimen-\linetablecparameter\c!rightoffset
- \fi
- \ifcase\linetablemode
- \dosetraggedcommand{\linetablecparameter\c!align}%
- \vtop \ifdim\linetableheight>\zeropoint to\linetableheight \fi \bgroup
- \hsize\scratchdimen
- \raggedcommand
- \else
- \setalignmentswitch{\linetablecparameter\c!align}%
- \hbox \ifcase\linetablemode \or to\scratchdimen \fi \bgroup
- \ifcase\alignmentswitch\hss\or\hss\fi
- \fi
- \dousestylehashparameter{\??lec\number\linetablecolumn}\c!style
- \dousecolorhashparameter{\??lec\number\linetablecolumn}\c!color
- \begstrut \ignorespaces}
-
-\newconditional\linetableautoheight \settrue\linetableautoheight
-
-\unexpanded\def\stoplinetablecell
- {\unskip \endstrut
- \ifcase\linetablemode
- \endgraf
- \else
- \ifcase\alignmentswitch\else\hss\fi
- \fi
- \egroup
- \hskip\linetablecparameter\c!rightoffset
- \egroup
- \iflinetablepreroll
- \box\scratchbox
- \else
- \doifelse{\linetablecparameter\c!background}\v!color
- {\ifconditional\linetableautoheight
- \hbox{\blackrule
- [ \c!color=\linetablecparameter\c!backgroundcolor,
- \c!height=\linetablerparameter{x\c!height},
- \c!depth=\linetablerparameter{x\c!depth},
- \c!width=\wd\scratchbox]%
- \hskip-\wd\scratchbox\box\scratchbox}%
- \else
- \backgroundline[\linetablecparameter\c!backgroundcolor]{\box\scratchbox}%
- \fi}%
- {\box\scratchbox}%
- \fi
- \egroup}
-
-\def\savelinetablepart
- {\global\setbox\tablebox\linetablepart
- \ifnum\linetablepart=\zerocount
- \box\scratchbox % just storing
- \else
- \vbox
- {\ifvoid\tablebox\linetablepart\else\unvbox\tablebox\linetablepart\fi
- \doif{\linetablerparameter\c!background}\v!color
- {\backgroundline[\linetablerparameter\c!backgroundcolor]}%
- {\box\scratchbox}% is also arg to \backgroundline
- \endgraf
- \linetablerparameter\c!after}%
- \fi}
-
-\def\flushlinetableparts
- {\doglobal\increment\linetableline
- \ifnum\linetableline<\noflinetablelines
- % keep collecting
- \else
- \iflinetablepreroll
- % forget about them
- \else
- \dorecurse\noflinetableparts
- {\let\linetablepart\recurselevel
- \dp\tablebox\linetablepart\strutdepth
- % noindent en endgraf needed else whitespace mess-up!
- \whitespace % here not after verticalstrut
- \ifdim\topskipgap=\zeropoint\else
- \verticalstrut\nobreak\kern-\struttotal\kern-\parskip\nobreak\nointerlineskip % fix topskip
- \fi
- \noindent\strut\hbox to \hsize{\box\tablebox\linetablepart\hss}\endgraf
- \ifnum\linetablepart<\noflinetableparts\relax
- \linetableparameter\c!inbetween
- \fi}%
- \ifnum\linetablerows<\noflinetablerows\relax
- \linetableparameter\c!inbetween
- \else
- % after, later
- \fi
- \linetableheadstate\plusthree
- \global\setbox\tablebox\zerocount\emptybox % here
- \fi
- % reset \linetablerow will be an option, currently
- % starts at zero after split
- \globallet\linetablerow\!!zerocount
- \globallet\linetableline\!!zerocount
- \global\linetablepage\zerocount
- \global\linetablewidth\zeropoint
- \setnoftableslines
- \fi}
-
-\unexpanded\def\startlinetablepart
- {\global\linetablesubcol\zerocount
- \setbox\scratchbox\hbox\bgroup
- \dousestyleparameter{\linetablerparameter\c!style}%
- \dousecolorparameter{\linetablerparameter\c!color}%
- \ignorespaces}
-
-\unexpanded\def\stoplinetablepart
- {\ifnum\linetablepart>\zerocount
- \unskip \unskip % remove last intercolumn skip (distance+fill)
- \fi
- \egroup
- \iflinetablepreroll \else
- \ifcase\linetablepart
- % we're collecting the repeater
- \else
- \scratchdimen\hsize \advance\scratchdimen-\wd\scratchbox\relax
- \ifdim\scratchdimen>\linetableparameter\c!stretch\else
- \setbox\scratchbox\hbox to \hsize{\unhbox\scratchbox}%
- \fi
- \fi
- \fi}
-
-\def\checklinetablepart
- {\global\advance\linetablewidth\wd\linetablecell
- \global\advance\linetablecolumn\linetablestep
- \global\advance\linetablesubcol\linetablestep
- \relax
- %\message{\the\linetablecolumn,\the\linetablesubcol}\wait
- % from now on the column counter is already incremented
- \ifcase\linetablesplitstate
- \iflinetablepreroll \else
- \box\linetablecell
- % the columncounter is one ahead !
-% \hskip\linetablecparameter\c!afstand
- \hskip\scratchskip
- \fi
- %%%
- \donefalse
- \ifcase\linetablerepeat\else
- % van te voren berekenen
- \scratchcounter\linetablecolumn\advance\scratchcounter-\plustwo
- \ifnum\linetablerepeat=\scratchcounter
- \donetrue % collecting repeater
- \fi
- \fi
- %%%%
- \ifdone
- % collecting repeater
- \else
- \ifnum\linetablecolumn>\getvalue{\??le::\linetablepart}\relax
- \donetrue
- \fi
- \fi
- \ifdone
- \stoplinetablepart
- \iflinetablepreroll \else
- \savelinetablepart
- \fi
- \ifcase\linetablepage \or
- \global\linetablepage \plustwo
- \else
- \global\linetablepage \plusone
- \fi
- \doglobal\increment\linetablepart
- \global\linetablewidth\wd\tablebox\zerocount
- \startlinetablepart
- \fi
- \else
- \donefalse
- \!!doneafalse
- \ifcase\linetablerepeat\else
- % van te voren berekenen
- \scratchcounter\linetablecolumn \advance\scratchcounter-\plustwo
- \ifnum\linetablerepeat=\scratchcounter
- \donetrue % collecting repeater
- \fi
- \fi
- \ifdone
- \!!doneatrue
- % collecting repeater
- \else\ifdim\linetablewidth>\hsize
- \donetrue
- \else
-% \global\advance\linetablewidth\linetablecparameter\c!afstand\relax
- \global\advance\linetablewidth\scratchskip
- \ifdim\linetablewidth>\hsize % ?
- \donetrue
- \fi
- \fi\fi
- \ifdone
- \stoplinetablepart
- \savelinetablepart
- \ifcase\linetablepage \or
- \global\linetablepage \plustwo
- \else
- \global\linetablepage \plusone
- \fi
- \doglobal\increment\linetablepart
- \ifnum\linetablepart>\noflinetableparts
- \globallet\noflinetableparts\linetablepart
- \initializetablebox\linetablepart
- \fi
- \global\linetablewidth\wd\linetablecell
- \startlinetablepart
- \if!!doneb \else \ifcase\linetablerepeat \else
- % check for left/right page
- \ifcase\linetablepage\donetrue\or\donetrue\or\donefalse\fi\ifdone
- % insert repeater
- \global\advance\linetablewidth\wd\tablebox\zerocount
- \iflinetablepreroll\kern\wd\else\unhcopy\fi\tablebox\zerocount
- \fi
- \fi \fi
- \fi
- \iflinetablepreroll \else
- \box\linetablecell
- % the columncounter is one ahead !
-% \hskip\linetablecparameter\c!afstand
-% \hskip\scratchskip
-\dorecurse\linetablestep{\strut\hfil}%
- \hskip\scratchskip
- \fi
- \fi}
-
-% \linetableparameter\c!var -> \@@levar (when no classes)
-
-\unexpanded\def\startlinetablerun % to do: quit when nested
- {\bgroup
- \inlinetabletrue
- % autowidth
- \doif{\linetableparameter\c!maxwidth}\v!fit
- {\setuplinetable[\c!maxwidth=\zeropoint]}%
- \processaction
- [\linetableparameter\c!stretch]
- [ \v!no=>{\setuplinetable[\c!stretch=\maxdimen]},% no stretch
- \v!yes=>{\setuplinetable[\c!stretch=\zeropoint]}]% max stretch
- \linetablerepeat\linetableparameter\c!nleft
- \linetablesplitstate % =
- \ifdim\linetableparameter\c!maxwidth>\zeropoint
- \zerocount \else \plusone
- \fi
- % optional prevdepth correction
- \iflinetablepreroll
- \globallet\noflinetablerows\!!zerocount
- \else
- \linetableparameter\c!before
- \fi
- \globallet\linetablerows\!!zerocount
- \globallet\noflinetablecolumns\!!zerocount
- \globallet\noflinetableparts\!!zerocount
- \!!counta\zerocount
- \def\docommand##1%
- {\doglobal\increment\noflinetableparts
- \advance\!!counta##1%
- \setxvalue{\??le::\noflinetableparts}{\the\!!counta}}%
- \processcommacommand[\linetableparameter\c!n]\docommand
- \initializetableboxes\noflinetableparts
- \ifcase\linetablerepeat
- \globallet\linetablepart\!!plusone
- \else
- \globallet\linetablepart\!!zerocount % repeater
- \fi
- \globallet\linetablestep\!!plusone
- \globallet\linetableline\!!zerocount
- \globallet\linetablerow \!!zerocount
- \global\linetablecolumn \zerocount
- \global\linetablesubcol \zerocount
- \global\linetablewidth \zeropoint
-\iflinetablepreroll \else \ifdim\pagetotal>\zeropoint
- \verticalstrut\kern-\struttotal
-\fi \fi
- \setnoftableslines
- \checklinetablepage
- \let\BR\linetableBR
- \let\ER\linetableER
- \let\BH\linetableBR
- \let\EH\linetableER
- \let\BC\linetableBC
- \let\EC\linetableEC
- \let\NC\linetableNC
- \let\NR\linetableNR
- \flushlinetablehead}
-
-\unexpanded\def\stoplinetablerun
- {\globallet\linetableline\!!maxcard
- \linetableheadstate\zerocount % blocked
- \flushlinetableparts
- \iflinetablepreroll \else
- \linetableparameter\c!after
- \fi
- \globallet\linetablepart \!!zerocount
- \globallet\noflinetableparts\!!zerocount
- \egroup}
-
-\def\checklinecolumndimension#1#2#3%
- {\expandafter\xdef\csname#1\number#3\endcsname
- {\expandafter\ifx\csname#1\number#3\endcsname\relax
- \the#2\linetablecell
- \else\ifdim\csname#1\number#3\endcsname<#2\linetablecell
- \the#2\linetablecell
- \else
- \csname#1\number#3\endcsname
- \fi\fi}}
-
-\def\checklinecolumnwidth {\checklinecolumndimension\??lew\wd\linetablecolumn}
-\def\checklinecolumnheight{\checklinecolumndimension\??leh\ht\linetablerow}
-\def\checklinecolumndepth {\checklinecolumndimension\??led\dp\linetablerow}
-
-\def\linetableBR
- {\dosingleempty\dolinetableBR}
-
-\def\dolinetableBR[#1]% #1 not yet implemented
- {\ifnum\linetableheadstate=1\else
- \doglobal\increment\linetablerow
- \doglobal\increment\linetablerows
- \fi
- \global\linetablecolumn\plusone
- \global\linetablesubcol\plusone
-% \linetableheight\linetablerparameter\c!height
-%
-% \ifx\linetableheight\empty
-% % nothing
-% \else\ifx\linetableheight\v!fit
-% % keep it simple
-% \else\ifx\linetableheight\v!line
-% \linetablemode\plusone
-% \else
-% \!!heighta\linetableheight
-% \advance\!!heighta-\strutdepth
-% \fi\fi\fi
-%
- \linetableheight\zeropoint
- \edef\!!stringa{\linetablerparameter\c!height}%
- \ifx\!!stringa\empty
- \linetablehmode\zerocount
- \else\ifx\!!stringa\v!fit
- \linetablehmode\plusone
- \else\ifx\!!stringa\v!line
- \linetablehmode\plustwo
- \else
- \linetableheight\!!stringa
- \advance\linetableheight-\strutdepth
- \fi\fi\fi
-%
- \startlinetablepart}
-
-\def\linetableBC
- {\startlinetablecell}
-
-\def\linetableEC
- {\stoplinetablecell
- \iflinetablepreroll
- \checklinecolumnwidth
- \checklinecolumnheight
- \checklinecolumndepth
- \fi
- \checklinetablepart}
-
-\def\linetableER
- {% \stoplinetablecell
- % no \box\linetablecell, i.e. dummy columnn, last \NC \NR
- \stoplinetablepart
- \savelinetablepart
- \advance\linetablecolumn \minusone
- \ifnum\linetablecolumn>\noflinetablecolumns
- \xdef\noflinetablecolumns{\number\linetablecolumn}%
- \fi
- \flushlinetableparts
- \global\linetablecolumn\zerocount
- \global\linetablewidth \zeropoint
- \ifcase\linetablerepeat
- \globallet\linetablepart\!!plusone
- \else
- \globallet\linetablepart\!!zerocount % repeater
- \fi
- \checklinetablepage
- \flushlinetablehead}
-
-\def\checklinetablepage
- {\global\linetablepage\zerocount
- \ifcase\linetablerepeat \else \ifcase\linetablepage
- \doif{\linetableparameter\c!repeat}\v!no
- {\global\linetablepage\doifelseoddpage\plusone\plustwo}%
- \fi \fi}
-
-\def\flushlinetablehead
- {\ifcase\linetableheadstate
- % 0 blocked
- \or
- % 1 doing head
- \or
- % 2 head done
- \or
- % 3 trigger flush
- \linetableheadstate\plusone
- \the\@@linetablehead\relax
- \linetableheadstate\plustwo
- \fi}
-
-\def\linetableNC % first time special treatment
- {\relax
- \ifcase\linetablecolumn
- \linetableBR
- \else
- \linetableEC
- \fi
- \linetableBC} % beware, this will result in BR BC EC BC NR
-
-\def\linetableNR
- {\stoplinetablecell % dummy
- \linetableER}
-
-\unexpanded\def\startlinetable
- {\startlinetablerun}
-
-\unexpanded\def\stoplinetable
- {\stoplinetablerun}
-
-\unexpanded\def\startlinetableanalysis
- {\bgroup
- \linetableprerolltrue
- \settrialtypesetting
- \startlinetablerun}
-
-\unexpanded\def\stoplinetableanalysis
- {\stoplinetablerun
- \egroup
- \globallet\noflinetablerows\linetablerows
- \dorecurse\noflinetablerows % global, from last run {\linetableparameter\c!n}
- {%\writestatus{linetable}{\recurselevel->\getvalue{\??lew\recurselevel}}%
- \setevalue{\??ler\recurselevel x\c!height}{\getvalue{\??leh\recurselevel}}%
- \setevalue{\??ler\recurselevel x\c!depth }{\getvalue{\??led\recurselevel}}%
- \letgvalue{\??leh\recurselevel}\!!zeropoint
- \letgvalue{\??led\recurselevel}\!!zeropoint}
- \dorecurse\noflinetablecolumns % global, from last run {\linetableparameter\c!n}
- {%\writestatus{linetable}{\recurselevel->\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
-
-\newtoks \@@linetablehead
-
-\unexpanded\def\startlinetablehead#1\stoplinetablehead
- {\ifinlinetable
- \@@linetablehead\emptytoks
- \fi
- \linetableheadstate\plusthree % full
- \@@linetablehead{#1}%
- \ifinlinetable
- \flushlinetablehead
- \fi}
-
-\def\linetableBH
- {\ifx\EC\relax
- % signal, grabbing lines
- \else
- \@@linetablehead\emptytoks
- \fi
- \pushmacro\BC
- \pushmacro\EC
- \def\BC##1\EC{\appendtoks##1\to\@@linetablehead}%
- \let\EC\relax} % signal
-
-\def\linetableEH
- {\popmacro\EC
- \popmacro\BC
- \@EA\startlinetablehead\the\@@linetablehead\stoplinetablehead}
-
-\let\startlinetablebody\donothing
-\let\stoplinetablebody \donothing
-
-\def\processlinetablebuffer
- {\dosingleempty\doprocesslinetablebuffer}
-
-\def\doprocesslinetablebuffer[#1]%
- {\bgroup
- \let\startlinetable\donothing
- \let\stoplinetable \donothing
- \startlinetableanalysis\getbuffer[#1]\stoplinetableanalysis
- \startlinetablerun \getbuffer[#1]\stoplinetablerun
- \egroup}
-
-\def\processlinetablefile#1%
- {\bgroup
- \let\startlinetable\donothing
- \let\stoplinetable \donothing
- \startlinetableanalysis\readfile{#1}\donothing\donothing\stoplinetableanalysis
- \startlinetablerun \readfile{#1}\donothing\donothing\stoplinetablerun
- \egroup}
-
-\protect
-
-\continueifinputfile{tabl-ltb.mkiv}
-
-\setuplinetable[n=6,m={2,2,2},lines=25] % m ?
-
-\setuplinetable[c][1] [width=2cm,background=color,backgroundcolor=red]
-\setuplinetable[c][4] [width=3cm,background=color,backgroundcolor=yellow]
-\setuplinetable[c][6] [width=3cm,background=color,backgroundcolor=magenta]
-\setuplinetable[r][odd] [background=color,backgroundcolor=gray]
-\setuplinetable[r][even][background=color,backgroundcolor=green]
-
-\starttext
-
-\showframe \showstruts
-
-\setupcolors[state=start]
-
-\setuppagenumbering[alternative=doublesided]\page[left]
-
-\startlinetable
-\NC aaa\crlf aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR
-\dorecurse{100}{\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR}
-\stoplinetable
-
-\startlinetable
-\NC[style=slanted,color=green,background=color,backgroundcolor=darkred,nx=2,uitlijnen=middle] xxx
- \NC yy \NC ddddd \NC eeee \NC ff \NC \NR
-\dorecurse{100}{\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR}
-\stoplinetable
-
-% \startbuffer[lt]
-% \NC aaa\crlf aaa \NC bb \NC c \NC ddddd \NC ee \NC ff \NC \NR
-% \NC aaa\crlf aaa \NC b \NC cc \NC ddd \NC eeee \NC f \NC \NR
-% \stopbuffer
-%
-% \processlinetablebuffer[lt]
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/toks-ini.lua b/Master/texmf-dist/tex/context/base/toks-ini.lua
deleted file mode 100644
index f8b94589040..00000000000
--- a/Master/texmf-dist/tex/context/base/toks-ini.lua
+++ /dev/null
@@ -1,256 +0,0 @@
-if not modules then modules = { } end modules ['toks-ini'] = {
- version = 1.001,
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-tokens = tokens or { }
-
-local tokens = tokens
-local tostring = tostring
-local utfchar = utf.char
-local char = string.char
-local printtable = table.print
-local concat = table.concat
-
-if newtoken then
-
- if setinspector then
-
- local istoken = newtoken.is_token
- local simple = { letter = "letter", other_char = "other" }
-
- local function astable(t)
- if t and istoken(t) then
- local cmdname = t.cmdname
- local simple = simple[cmdname]
- if simple then
- return {
- category = simple,
- character = utfchar(t.mode) or nil,
- }
- else
- return {
- command = t.command,
- id = t.id,
- tok = t.tok,
- csname = t.csname,
- active = t.active,
- expandable = t.expandable,
- protected = t.protected,
- mode = t.mode,
- cmdname = cmdname,
- }
- end
- end
- end
-
- tokens.istoken = istoken
- tokens.astable = astable
-
- setinspector(function(v) if istoken(v) then printtable(astable(v),tostring(v)) return true end end)
-
- end
-
- local scan_toks = newtoken.scan_toks
- local scan_string = newtoken.scan_string
- local scan_int = newtoken.scan_int
- local scan_code = newtoken.scan_code
- local scan_dimen = newtoken.scan_dimen
- local scan_glue = newtoken.scan_glue
- local scan_keyword = newtoken.scan_keyword
- local scan_token = newtoken.scan_token
- local scan_word = newtoken.scan_word
- local scan_number = newtoken.scan_number
-
- local get_next = newtoken.get_next
-
- local set_macro = newtoken.set_macro
-
- set_macro = function(k,v,g)
- if g == "global" then
- context.setgvalue(k,v or '')
- else
- context.setvalue(k,v or '')
- end
- end
-
- local bits = {
- escape = 2^ 0,
- begingroup = 2^ 1,
- endgroup = 2^ 2,
- mathshift = 2^ 3,
- alignment = 2^ 4,
- endofline = 2^ 5,
- parameter = 2^ 6,
- superscript = 2^ 7,
- subscript = 2^ 8,
- ignore = 2^ 9,
- space = 2^10, -- 1024
- letter = 2^11,
- other = 2^12,
- active = 2^13,
- comment = 2^14,
- invalid = 2^15,
- --
- character = 2^11 + 2^12,
- whitespace = 2^13 + 2^10, -- / needs more checking
- --
- open = 2^10 + 2^1, -- space + begingroup
- close = 2^10 + 2^2, -- space + endgroup
- }
-
- -- for k, v in next, bits do bits[v] = k end
-
- tokens.bits = bits
-
- local space_bits = bits.space
-
- -- words are space or \relax terminated and the trailing space is gobbled; a word
- -- can contain any non-space letter/other
-
- local t = { } -- small optimization, a shared variable that is not reset
-
- if scan_word then
-
- scan_number = function(base)
- local s = scan_word()
- if not s then
- return nil
- elseif base then
- return tonumber(s,base)
- else
- return tonumber(s)
- end
- end
-
- else
-
- scan_word = function()
- local n = 0
- while true do
- local c = scan_code()
- if c then
- n = n + 1
- t[n] = utfchar(c)
- elseif scan_code(space_bits) then
- if n > 0 then
- break
- end
- elseif n > 0 then
- break
- else
- return
- end
- end
- return concat(t,"",1,n)
- end
-
- -- so we gobble the space (like scan_int) (number has to be space or non-char terminated
- -- as we accept 0xabcd and such so there is no clear separator for a keyword
-
- scan_number = function(base)
- local n = 0
- while true do
- local c = scan_code()
- if c then
- n = n + 1
- t[n] = char(c)
- elseif scan_code(space_bits) then
- if n > 0 then
- break
- end
- elseif n > 0 then
- break
- else
- return
- end
- end
- local s = concat(t,"",1,n)
- if base then
- return tonumber(s,base)
- else
- return tonumber(s)
- end
- end
-
- end
-
- -- -- the next one cannot handle \iftrue true\else false\fi
- --
- -- local function scan_boolean()
- -- if scan_keyword("true") then
- -- return true
- -- elseif scan_keyword("false") then
- -- return false
- -- else
- -- return nil
- -- end
- -- end
-
- local function scan_boolean()
- local kw = scan_word()
- if kw == "true" then
- return true
- elseif kw == "false" then
- return false
- else
- return nil
- end
- end
-
- tokens.scanners = { -- these expand
- token = scan_token or get_next,
- toks = scan_toks,
- tokens = scan_toks,
- dimen = scan_dimen,
- dimension = scan_dimen,
- glue = scan_glue,
- skip = scan_glue,
- integer = scan_int,
- count = scan_int,
- string = scan_string,
- code = scan_code,
- word = scan_word,
- number = scan_number,
- boolean = scan_boolean,
- keyword = scan_keyword,
- }
-
- tokens.getters = { -- these don't expand
- token = get_next,
- count = tex.getcount,
- dimen = tex.getdimen,
- box = tex.getbox,
- }
-
- tokens.setters = {
- macro = set_macro,
- count = tex.setcount,
- dimen = tex.setdimen,
- box = tex.setbox,
- }
-
-end
-
--- static int run_scan_token(lua_State * L)
--- {
--- saved_tex_scanner texstate;
--- save_tex_scanner(texstate);
--- get_x_token();
--- make_new_token(L, cur_cmd, cur_chr, cur_cs);
--- unsave_tex_scanner(texstate);
--- return 1;
--- }
---
--- static int run_get_future(lua_State * L)
--- {
--- /* saved_tex_scanner texstate; */
--- /* save_tex_scanner(texstate); */
--- get_token();
--- make_new_token(L, cur_cmd, cur_chr, cur_cs);
--- back_input();
--- /* unsave_tex_scanner(texstate); */
--- return 1;
--- }
diff --git a/Master/texmf-dist/tex/context/base/toks-tra.lua b/Master/texmf-dist/tex/context/base/toks-tra.lua
deleted file mode 100644
index bf2b91d38a3..00000000000
--- a/Master/texmf-dist/tex/context/base/toks-tra.lua
+++ /dev/null
@@ -1,298 +0,0 @@
-if not modules then modules = { } end modules ['toks-ini'] = {
- version = 1.001,
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-
-local utfbyte, utfchar, utfvalues = utf.byte, utf.char, utf.values
-local format, gsub = string.format, string.gsub
-local tostring = tostring
-
-local tokens = tokens
-local newtoken = newtoken
-local tex = tex
-local context = context
-local commands = commands
-
-tokens.collectors = tokens.collectors or { }
-local collectors = tokens.collectors
-
-collectors.data = collectors.data or { }
-local collectordata = collectors.data
-
-collectors.registered = collectors.registered or { }
-local registered = collectors.registered
-
-local report = logs.reporter("tokens","collectors")
-
-if newtoken then
-
- -- todo:
- --
- -- register : macros that will be expanded (only for demo-ing)
- -- flush : print back to tex
- -- test : fancy stuff
-
- local get_next = newtoken.get_next
- local create = newtoken.create
-
- function collectors.install(tag,end_cs)
- local data, d = { }, 0
- collectordata[tag] = data
- end_cs = gsub(end_cs,"^\\","")
- while true do
- local t = get_next()
- if t.csname == end_cs then
- context[end_cs]()
- return
- else
- d = d + 1
- data[d] = t
- end
- end
- end
-
- local simple = { letter = "letter", other_char = "other" }
-
- function collectors.show(data)
- -- We no longer have methods as we only used (in demos) method a
- -- so there is no need to burden the core with this. We have a
- -- different table anyway.
- if type(data) == "string" then
- data = collectordata[data]
- end
- if not data then
- return
- end
- local ctx_NC = context.NC
- local ctx_NR = context.NR
- local ctx_bold = context.bold
- local ctx_verbatim = context.verbatim
- context.starttabulate { "|Tl|Tc|Tl|" }
- ctx_NC() ctx_bold("cmd")
- ctx_NC() ctx_bold("meaning")
- ctx_NC() ctx_bold("properties")
- ctx_NC() ctx_NR()
- context.HL()
- for i=1,#data do
- local token = data[i]
- local cmdname = token.cmdname
- local simple = simple[cmdname]
- ctx_NC()
- ctx_verbatim(simple or cmdname)
- ctx_NC()
- ctx_verbatim(simple and utfchar(token.mode) or token.csname)
- ctx_NC()
- if token.active then context("active ") end
- if token.expandable then context("expandable ") end
- if token.protected then context("protected ") end
- ctx_NC()
- ctx_NR()
- end
- context.stoptabulate()
- end
-
- local function printlist(data)
- if data and #data > 0 then
- report("not supported (yet): printing back to tex")
- end
- end
-
- tokens.printlist = printlist -- will change to another namespace
-
- function collectors.flush(tag)
- printlist(collectordata[tag])
- end
-
- function collectors.test(tag,handle)
- report("not supported (yet): testing")
- end
-
- function collectors.register(name)
- report("not supported (yet): registering")
- end
-
-else
-
- -- 1 = command, 2 = modifier (char), 3 = controlsequence id
-
- local create = token.create
- local csname_id = token.csname_id
- local command_id = token.command_id
- local command_name = token.command_name
- local get_next = token.get_next
- local expand = token.expand
- local csname_name = token.csname_name
-
- local function printlist(data)
- if data and #data > 0 then
- callbacks.push('token_filter', function ()
- callbacks.pop('token_filter') -- tricky but the nil assignment helps
- return data
- end)
- end
- end
-
- tokens.printlist = printlist -- will change to another namespace
-
- function collectors.flush(tag)
- printlist(collectordata[tag])
- end
-
- function collectors.register(name)
- registered[csname_id(name)] = name
- end
-
- local call = command_id("call")
- local letter = command_id("letter")
- local other = command_id("other_char")
-
- function collectors.install(tag,end_cs)
- local data, d = { }, 0
- collectordata[tag] = data
- end_cs = gsub(end_cs,"^\\","")
- local endcs = csname_id(end_cs)
- while true do
- local t = get_next()
- local a, b = t[1], t[3]
- if b == endcs then
- context[end_cs]()
- return
- elseif a == call and registered[b] then
- expand()
- else
- d = d + 1
- data[d] = t
- end
- end
- end
-
- function collectors.show(data)
- -- We no longer have methods as we only used (in demos) method a
- -- so there is no need to burden the core with this.
- if type(data) == "string" then
- data = collectordata[data]
- end
- if not data then
- return
- end
- local ctx_NC = context.NC
- local ctx_NR = context.NR
- local ctx_bold = context.bold
- local ctx_verbatim = context.verbatim
- context.starttabulate { "|T|Tr|cT|Tr|T|" }
- ctx_NC() ctx_bold("cmd")
- ctx_NC() ctx_bold("chr")
- ctx_NC()
- ctx_NC() ctx_bold("id")
- ctx_NC() ctx_bold("name")
- ctx_NC() ctx_NR()
- context.HL()
- for i=1,#data do
- local token = data[i]
- local cmd = token[1]
- local chr = token[2]
- local id = token[3]
- local name = command_name(token)
- ctx_NC()
- ctx_verbatim(name)
- ctx_NC()
- if tonumber(chr) >= 0 then
- ctx_verbatim(chr)
- end
- ctx_NC()
- if cmd == letter or cmd == other then
- ctx_verbatim(utfchar(chr))
- end
- ctx_NC()
- if id > 0 then
- ctx_verbatim(id)
- end
- ctx_NC()
- if id > 0 then
- ctx_verbatim(csname_name(token) or "")
- end
- ctx_NC() ctx_NR()
- end
- context.stoptabulate()
- end
-
- function collectors.test(tag,handle)
- local t, w, tn, wn = { }, { }, 0, 0
- handle = handle or collectors.defaultwords
- local tagdata = collectordata[tag]
- for k=1,#tagdata do
- local v = tagdata[k]
- if v[1] == letter then
- wn = wn + 1
- w[wn] = v[2]
- else
- if wn > 0 then
- handle(t,w)
- wn = 0
- end
- tn = tn + 1
- t[tn] = v
- end
- end
- if wn > 0 then
- handle(t,w)
- end
- collectordata[tag] = t
- end
-
-end
-
--- Interfacing:
-
-commands.collecttokens = collectors.install
-commands.showtokens = collectors.show
-commands.flushtokens = collectors.flush
-commands.testtokens = collectors.test
-commands.registertoken = collectors.register
-
--- Redundant:
-
--- function collectors.test(tag)
--- printlist(collectordata[tag])
--- end
-
--- For old times sake:
-
-collectors.dowithwords = collectors.test
-
--- This is only used in old articles ... will move to a module:
-
-local create = newtoken and newtoken.create or token.create
-
-tokens.vbox = create("vbox")
-tokens.hbox = create("hbox")
-tokens.vtop = create("vtop")
-tokens.bgroup = create(utfbyte("{"),1)
-tokens.egroup = create(utfbyte("}"),2)
-
-tokens.letter = function(chr) return create(utfbyte(chr),11) end
-tokens.other = function(chr) return create(utfbyte(chr),12) end
-
-tokens.letters = function(str)
- local t, n = { }, 0
- for chr in utfvalues(str) do
- n = n + 1
- t[n] = create(chr, 11)
- end
- return t
-end
-
-function collectors.defaultwords(t,str)
- if t then
- local n = #t
- n = n + 1 ; t[n] = tokens.bgroup
- n = n + 1 ; t[n] = create("red")
- for i=1,#str do
- n = n + 1 ; t[n] = tokens.other('*')
- end
- n = n + 1 ; t[n] = tokens.egroup
- end
-end
diff --git a/Master/texmf-dist/tex/context/base/trac-tex.lua b/Master/texmf-dist/tex/context/base/trac-tex.lua
deleted file mode 100644
index 5fe4754cbde..00000000000
--- a/Master/texmf-dist/tex/context/base/trac-tex.lua
+++ /dev/null
@@ -1,122 +0,0 @@
-if not modules then modules = { } end modules ['trac-tex'] = {
- version = 1.001,
- comment = "companion to trac-deb.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
--- moved from trac-deb.lua
-
-local next = next
-
-local texhashtokens = tex.hashtokens
-
-local trackers = trackers
-
-local saved = { }
-
-function trackers.savehash()
- saved = texhashtokens()
-end
-
-if newtoken then
-
- function trackers.dumphashtofile(filename,delta)
- local list = { }
- local hash = tex.hashtokens()
- local create = newtoken.create
- for name, token in next, hash do
- if not delta or not saved[name] then
- if token[2] ~= 0 then -- still old interface
- local token = create(name)
- -- inspect(token)
- local category = token.cmdname
- local dk = list[category]
- if not dk then
- dk = {
- names = { },
- found = 0,
- -- code = token[1],
- }
- list[category] = dk
- end
- if token.protected then
- if token.expandable then
- dk.names[name] = "ep"
- else
- dk.names[name] = "-p"
- end
- else
- if token.expandable then
- dk.names[name] = "ep"
- else
- dk.names[name] = "--"
- end
- end
- dk.found = dk.found + 1
- end
- end
- end
- table.save(filename or tex.jobname .. "-hash.log",list)
- end
-
-else
-
- function trackers.dumphashtofile(filename,delta)
- local list = { }
- local hash = texhashtokens()
- local getname = token.command_name
- for name, token in next, hash do
- if not delta or not saved[name] then
- -- token: cmd, chr, csid -- combination cmd,chr determines name
- local category = getname(token)
- local dk = list[category]
- if not dk then
- -- a bit funny names but this sorts better (easier to study)
- dk = { names = { }, found = 0, code = token[1] }
- list[category] = dk
- end
- dk.names[name] = { token[2], token[3] }
- dk.found = dk.found + 1
- end
- end
- table.save(filename or tex.jobname .. "-hash.log",list)
- end
-
-end
-
-local delta = nil
-
-local function dump_hash(wanteddelta)
- if delta == nil then
- saved = saved or texhashtokens() -- no need for trackers.dump_hash
- luatex.registerstopactions(1,function() dump_hash(nil,wanteddelta) end) -- at front
- end
- delta = wanteddelta
-end
-
-directives.register("system.dumphash", function() dump_hash(false) end)
-directives.register("system.dumpdelta", function() dump_hash(true ) end)
-
-local report_dump = logs.reporter("resolvers","dump")
-
-local function saveusedfilesintrees(format)
- local data = {
- jobname = environment.jobname or "?",
- version = environment.version or "?",
- kind = environment.kind or "?",
- files = resolvers.instance.foundintrees
- }
- local filename = file.replacesuffix(environment.jobname or "context-job",'jlg')
- if format == "lua" then
- io.savedata(filename,table.serialize(data,true))
- else
- io.savedata(filename,table.toxml(data,"job"))
- end
-end
-
-directives.register("system.dumpfiles", function(v)
- luatex.registerstopactions(function() saveusedfilesintrees(v) end)
-end)
-
diff --git a/Master/texmf-dist/tex/context/base/type-buy.mkii b/Master/texmf-dist/tex/context/base/type-buy.mkii
deleted file mode 100644
index b8518acb0ea..00000000000
--- a/Master/texmf-dist/tex/context/base/type-buy.mkii
+++ /dev/null
@@ -1,571 +0,0 @@
-%D \module
-%D [ file=type-buy,
-%D version=2003.07.08, % 2001.04.12,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=A Few Commercial Fonts,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% fallback
-
-% todo \typescriptthree
-
-\starttypescriptcollection[commercial fonts]
-
-% Informal : Vulis
-
-\starttypescript [casual] [informal] [name]
- \definefontsynonym [Serif] [Informal-Regular]
- \definefontsynonym [SerifBold] [Informal-Bold]
- \definefontsynonym [SerifSlanted] [Informal-Oblique]
- \definefontsynonym [SerifItalic] [Informal-Oblique]
- \definefontsynonym [SerifBoldSlanted] [Informal-BoldOblique]
- \definefontsynonym [SerifBoldItalic] [Informal-BoldOblique]
- \definefontsynonym [SerifCaps] [Informal-Regular]
-\stoptypescript
-
-\starttypescript [math] [informal] [name]
- \definefontsynonym [MathRoman] [Informal-Regular]
- \definefontsynonym [MathExtension] [Informal-MathExtendedSymbols]
- \definefontsynonym [MathItalic] [Informal-MathItalics]
- \definefontsynonym [MathSymbol] [Informal-MathSymbols]
-\stoptypescript
-
-\starttypescript [casual] [informal] [default]
- \definefontsynonym [Informal-Regular] [ifrm10cm]
- \definefontsynonym [Informal-Bold] [ifrb10cm]
- \definefontsynonym [Informal-Oblique] [ifro10cm]
- \definefontsynonym [Informal-BoldOblique] [ifbo10cm]
- \loadmapfile[original-micropress-informal.map]
-\stoptypescript
-
-\starttypescript [math] [informal] [default]
- \definefontsynonym [Informal-Regular] [ifrm10cm]
- \definefontsynonym [Informal-MathExtendedSymbols] [ifex10]
- \definefontsynonym [Informal-MathItalics] [ifmi10]
- \definefontsynonym [Informal-MathSymbols] [ifsy10]
- \loadmapfile[original-micropress-informal.map]
-\stoptypescript
-
-% ITC Officina
-
-\starttypescript [serif] [officina] [name]
- \definefontsynonym [Serif] [OfficinaSerif-Book]
- \definefontsynonym [SerifItalic] [OfficinaSerif-BookItalic]
- \definefontsynonym [SerifSlanted] [OfficinaSerif-BookSlanted]
- \definefontsynonym [SerifBold] [OfficinaSerif-Bold]
- \definefontsynonym [SerifBoldItalic] [OfficinaSerif-BoldItalic]
- \definefontsynonym [SerifBoldSlanted] [OfficinaSerif-BoldSlanted]
- \definefontsynonym [SerifCaps] [OfficinaSerif-Caps]
-\stoptypescript
-
-\starttypescript [sans] [officina] [name]
- \definefontsynonym [Sans] [OfficinaSans-Book]
- \definefontsynonym [SansItalic] [OfficinaSans-BookItalic]
- \definefontsynonym [SansSlanted] [OfficinaSans-BookSlanted]
- \definefontsynonym [SansBold] [OfficinaSans-Bold]
- \definefontsynonym [SansBoldItalic] [OfficinaSans-BoldItalic]
- \definefontsynonym [SansBoldSlanted] [OfficinaSans-BoldSlanted]
- \definefontsynonym [SansCaps] [OfficinaSans-Caps]
-\stoptypescript
-
-\starttypescript [serif] [officina] [texnansi,ec,8r]
- \definefontsynonym [OfficinaSerif-Book] [\typescriptthree-ovbk] [encoding=\typescriptthree]
- \definefontsynonym [OfficinaSerif-BookItalic] [\typescriptthree-ovwi] [encoding=\typescriptthree]
- \definefontsynonym [OfficinaSerif-Bold] [\typescriptthree-ovb] [encoding=\typescriptthree]
- \definefontsynonym [OfficinaSerif-BoldItalic] [\typescriptthree-ovbi] [encoding=\typescriptthree]
- \definefontsynonym [OfficinaSerif-BookSlanted] [\typescriptthree-ovbk-slanted-167] [encoding=\typescriptthree]
- \definefontsynonym [OfficinaSerif-BoldSlanted] [\typescriptthree-ovb-slanted-167] [encoding=\typescriptthree]
- \definefontsynonym [OfficinaSerif-Caps] [\typescriptthree-ovbk-capitalized-800] [encoding=\typescriptthree]
- \loadmapfile [\typescriptthree-itc-officina.map]
-\stoptypescript
-
-\starttypescript [sans] [officina] [texnansi,ec,8r]
- \definefontsynonym [OfficinaSans-Book] [\typescriptthree-owbk] [encoding=\typescriptthree]
- \definefontsynonym [OfficinaSans-BookItalic] [\typescriptthree-owwi] [encoding=\typescriptthree]
- \definefontsynonym [OfficinaSans-Bold] [\typescriptthree-owb] [encoding=\typescriptthree]
- \definefontsynonym [OfficinaSans-BoldItalic] [\typescriptthree-owbi] [encoding=\typescriptthree]
- \definefontsynonym [OfficinaSans-BookSlanted] [\typescriptthree-owbk-slanted-167] [encoding=\typescriptthree]
- \definefontsynonym [OfficinaSans-BoldSlanted] [\typescriptthree-owb-slanted-167] [encoding=\typescriptthree]
- \definefontsynonym [OfficinaSans-Caps] [\typescriptthree-owbk-capitalized-800] [encoding=\typescriptthree]
- \loadmapfile [\typescriptthree-itc-officina.map]
-\stoptypescript
-
-% FontFont Meta
-
-\starttypescript [sans] [meta] [name]
- \definefontsynonym [Sans] [MetaNormal-Roman]
- \definefontsynonym [SansItalic] [MetaNormal-Italic]
- \definefontsynonym [SansSlanted] [MetaNormal-Italic]
- \definefontsynonym [SansBold] [MetaBold-Roman]
- \definefontsynonym [SansBoldItalic] [MetaBold-Italic]
- \definefontsynonym [SansBoldSlanted][MetaBold-Italic]
- \definefontsynonym [SansCaps] [MetaNormal-Caps]
-\stoptypescript
-
-\starttypescript [sans] [meta-medium] [name]
- \definefontsynonym [Sans] [MetaMedium-Roman]
- \definefontsynonym [SansItalic] [MetaMedium-Italic]
- \definefontsynonym [SansSlanted] [MetaMedium-Italic]
- \definefontsynonym [SansBold] [MetaBold-Roman]
- \definefontsynonym [SansBoldItalic] [MetaBold-Italic]
- \definefontsynonym [SansBoldSlanted][MetaBold-Italic]
- \definefontsynonym [SansCaps] [MetaMedium-Caps]
-\stoptypescript
-
-\starttypescript [sans] [meta-lf] [name]
- \definefontsynonym [Sans] [MetaBookLF-Roman]
- \definefontsynonym [SansBold] [MetaBoldLF-Roman]
- \definefontsynonym [SansItalic] [MetaBookLF-Italic]
- \definefontsynonym [SansBoldItalic] [MetaBoldLF-Italic]
- \definefontsynonym [SansCaps] [MetaBookLF-Caps]
-\stoptypescript
-
-\starttypescript [sans] [meta,meta-book] [texnansi,ec,8r]
- \definefontsynonym [MetaBook-Roman] [\typescriptthree-mtbk] [encoding=\typescriptthree]
- \definefontsynonym [MetaBook-Italic] [\typescriptthree-mtbki] [encoding=\typescriptthree]
- \definefontsynonym [MetaBook-Caps] [\typescriptthree-mtbkc] [encoding=\typescriptthree]
- \definefontsynonym [MetaBook-ItalicCaps] [\typescriptthree-mtbkic] [encoding=\typescriptthree]
- \loadmapfile [\typescriptthree-fontfont-meta.map]
-\stoptypescript
-
-\starttypescript [sans] [meta-lf,meta-book-lf] [texnansi,ec,8r]
- \definefontsynonym [MetaBookLF-Roman] [\typescriptthree-mtbkf] [encoding=\typescriptthree]
- \definefontsynonym [MetaBookLF-Italic] [\typescriptthree-mtbkfi] [encoding=\typescriptthree]
- \definefontsynonym [MetaBookLF-Caps] [\typescriptthree-mtbkfc] [encoding=\typescriptthree]
- \definefontsynonym [MetaBookLF-ItalicCaps] [\typescriptthree-mtbkfic] [encoding=\typescriptthree]
- \loadmapfile [\typescriptthree-fontfont-meta.map]
-\stoptypescript
-
-\starttypescript [sans] [meta,meta-bold] [texnansi,ec,8r]
- \definefontsynonym [MetaBold-Roman] [\typescriptthree-mtbd] [encoding=\typescriptthree]
- \definefontsynonym [MetaBold-Italic] [\typescriptthree-mtbdi] [encoding=\typescriptthree]
- \definefontsynonym [MetaBold-Caps] [\typescriptthree-mtbdc] [encoding=\typescriptthree]
- \definefontsynonym [MetaBold-ItalicCaps] [\typescriptthree-mtbdic] [encoding=\typescriptthree]
- \loadmapfile [\typescriptthree-fontfont-meta.map]
-\stoptypescript
-
-\starttypescript [sans] [meta-lf,meta-bold-lf] [texnansi,ec,8r]
- \definefontsynonym [MetaBoldLF-Roman] [\typescriptthree-mtbdf] [encoding=\typescriptthree]
- \definefontsynonym [MetaBoldLF-Italic] [\typescriptthree-mtbdfi] [encoding=\typescriptthree]
- \definefontsynonym [MetaBoldLF-Caps] [\typescriptthree-mtbdfc] [encoding=\typescriptthree]
- \definefontsynonym [MetaBoldLF-ItalicCaps] [\typescriptthree-mtbdfic] [encoding=\typescriptthree]
- \loadmapfile [\typescriptthree-fontfont-meta.map]
-\stoptypescript
-
-\starttypescript [sans] [meta-normal] [texnansi,ec,8r]
- \definefontsynonym [MetaNormal-Roman] [\typescriptthree-mtn] [encoding=\typescriptthree]
- \definefontsynonym [MetaNormal-Italic] [\typescriptthree-mtni] [encoding=\typescriptthree]
- \definefontsynonym [MetaNormal-Caps] [\typescriptthree-mtnc] [encoding=\typescriptthree]
- \definefontsynonym [MetaNormal-ItalicCaps] [\typescriptthree-mtnic] [encoding=\typescriptthree]
- \loadmapfile [\typescriptthree-fontfont-meta.map]
-\stoptypescript
-
-\starttypescript [sans] [meta-normal-lf] [texnansi,ec,8r]
- \definefontsynonym [MetaNormalLF-Roman] [\typescriptthree-mtnf] [encoding=\typescriptthree]
- \definefontsynonym [MetaNormalLF-Italic] [\typescriptthree-mtnfi] [encoding=\typescriptthree]
- \definefontsynonym [MetaNormalLF-Caps] [\typescriptthree-mtnfc] [encoding=\typescriptthree]
- \definefontsynonym [MetaNormalLF-ItalicCaps] [\typescriptthree-mtnfic] [encoding=\typescriptthree]
- \loadmapfile [\typescriptthree-fontfont-meta.map]
-\stoptypescript
-
-\starttypescript [sans] [meta-medium] [texnansi,ec,8r]
- \definefontsynonym [MetaMedium-Roman] [\typescriptthree-mtm] [encoding=\typescriptthree]
- \definefontsynonym [MetaMedium-Italic] [\typescriptthree-mtmi] [encoding=\typescriptthree]
- \definefontsynonym [MetaMedium-Caps] [\typescriptthree-mtmc] [encoding=\typescriptthree]
- \definefontsynonym [MetaMedium-ItalicCaps] [\typescriptthree-mtmic] [encoding=\typescriptthree]
- \loadmapfile [\typescriptthree-fontfont-meta.map]
-\stoptypescript
-
-\starttypescript [sans] [meta-medium-lf] [texnansi,ec,8r]
- \definefontsynonym [MetaMediumLF-Roman] [\typescriptthree-mtmf] [encoding=\typescriptthree]
- \definefontsynonym [MetaMediumLF-Italic] [\typescriptthree-mtmfi] [encoding=\typescriptthree]
- \definefontsynonym [MetaMediumLF-Caps] [\typescriptthree-mtmfc] [encoding=\typescriptthree]
- \definefontsynonym [MetaMediumLF-ItalicCaps] [\typescriptthree-mtmfic] [encoding=\typescriptthree]
- \loadmapfile [\typescriptthree-fontfont-meta.map]
-\stoptypescript
-
-\starttypescript [sans] [meta-black] [texnansi,ec,8r]
- \definefontsynonym [MetaBlack-Roman] [\typescriptthree-mtbl] [encoding=\typescriptthree]
- \definefontsynonym [MetaBlack-Italic] [\typescriptthree-mtbli] [encoding=\typescriptthree]
- \definefontsynonym [MetaBlack-Caps] [\typescriptthree-mtblc] [encoding=\typescriptthree]
- \definefontsynonym [MetaBlack-ItalicCaps] [\typescriptthree-mtblic] [encoding=\typescriptthree]
- \loadmapfile [\typescriptthree-fontfont-meta.map]
-\stoptypescript
-
-\starttypescript [sans] [meta-black-lf] [texnansi,ec,8r]
- \definefontsynonym [MetaBlackLF-Roman] [\typescriptthree-mtblf] [encoding=\typescriptthree]
- \definefontsynonym [MetaBlackLF-Italic] [\typescriptthree-mtblfi] [encoding=\typescriptthree]
- \definefontsynonym [MetaBlackLF-Caps] [\typescriptthree-mtblfc] [encoding=\typescriptthree]
- \definefontsynonym [MetaBlackLF-ItalicCaps] [\typescriptthree-mtblfic] [encoding=\typescriptthree]
- \loadmapfile [\typescriptthree-fontfont-meta.map]
-\stoptypescript
-
-\starttypescript [expert] [meta] % incomplete
- \definefontsynonym [MetaNormal-Expert] [mtnx]
- \loadmapfile [\typescriptthree-fontfont-meta.map]
-\stoptypescript
-
-%D Linotype Univers
-
-\starttypescript [sans] [univers,univers-light,univers-black] [name]
- \definefontsynonym [Sans] [Univers]
- \definefontsynonym [SansBold] [Univers-Bold]
- \definefontsynonym [SansSlanted] [Univers-Oblique]
- \definefontsynonym [SansBoldSlanted] [Univers-BoldOblique]
-\stoptypescript
-
-\starttypescript [sans] [univers-light] [name]
- \definefontsynonym [Sans] [Univers-Light]
- \definefontsynonym [SansSlanted] [Univers-LightOblique]
-\stoptypescript
-
-\starttypescript [sans] [univers-black] [name]
- \definefontsynonym [Sans] [Univers-Black]
- \definefontsynonym [SansSlanted] [Univers-BlackOblique]
- \definefontsynonym [SansBold] [Univers-Black]
- \definefontsynonym [SansBoldSlanted] [Univers-BlackOblique]
-\stoptypescript
-
-\starttypescript [sans] [univers,univers-black,univers-light] [texnansi,ec,8r]
- \definefontsynonym [Univers-Light] [\typescriptthree-lt50136] [encoding=\typescriptthree]
- \definefontsynonym [Univers-LightOblique] [\typescriptthree-lt50137] [encoding=\typescriptthree]
- \definefontsynonym [Univers] [\typescriptthree-lt50138] [encoding=\typescriptthree]
- \definefontsynonym [Univers-Oblique] [\typescriptthree-lt50139] [encoding=\typescriptthree]
- \definefontsynonym [Univers-Bold] [\typescriptthree-lt50140] [encoding=\typescriptthree]
- \definefontsynonym [Univers-BoldOblique] [\typescriptthree-lt50141] [encoding=\typescriptthree]
- \definefontsynonym [Univers-Black] [\typescriptthree-lt50142] [encoding=\typescriptthree]
- \definefontsynonym [Univers-BlackOblique] [\typescriptthree-lt50143] [encoding=\typescriptthree]
- \loadmapfile[\typescriptthree-linotype-univers.map]
-\stoptypescript
-
-% mendoza
-
-\starttypescript [serif] [mendoza] [name]
- \definefontsynonym [Serif] [MendozaRoman-Book]
- \definefontsynonym [SerifCaps] [MendozaRoman-Book]
- \definefontsynonym [SerifSlanted] [MendozaRoman-BookItalic]
- \definefontsynonym [SerifItalic] [MendozaRoman-BookItalic]
- \definefontsynonym [SerifBold] [MendozaRoman-Bold]
- \definefontsynonym [SerifBoldSlanted] [MendozaRoman-BoldItalic]
- \definefontsynonym [SerifBoldItalic] [MendozaRoman-BoldItalic]
-\stoptypescript
-
-\starttypescript [serif] [mendoza] [ec,8r,texnansi]
- \definefontsynonym[MendozaRoman-Bold] [\typescriptthree-zab] [encoding=\typescriptthree]
- \definefontsynonym[MendozaRoman-BoldItalic] [\typescriptthree-zabi][encoding=\typescriptthree]
- \definefontsynonym[MendozaRoman-Medium] [\typescriptthree-zam] [encoding=\typescriptthree]
- \definefontsynonym[MendozaRoman-MediumItalic][\typescriptthree-zami][encoding=\typescriptthree]
- \definefontsynonym[MendozaRoman-Book] [\typescriptthree-zaw] [encoding=\typescriptthree]
- \definefontsynonym[MendozaRoman-BookItalic] [\typescriptthree-zawi][encoding=\typescriptthree]
- \loadmapfile[\typescriptthree-itc-mendoza.map]
-\stoptypescript
-
-% frutiger
-
-\starttypescript [sans] [frutiger] [name]
- \definefontsynonym [Sans] [Frutiger-Roman]
- \definefontsynonym [SansCaps] [Frutiger-Roman]
- \definefontsynonym [SansItalic] [Frutiger-Italic]
- \definefontsynonym [SansSlanted] [Frutiger-Italic]
- \definefontsynonym [SansBold] [Frutiger-Bold]
- \definefontsynonym [SansBoldItalic] [Frutiger-BoldItalic]
- \definefontsynonym [SansBoldSlanted] [Frutiger-BoldItalic]
-\stoptypescript
-
-\starttypescript [sans] [frutiger] [ec,8r,texnansi]
- \definefontsynonym[Frutiger-Bold] [\typescriptthree-ftb] [encoding=\typescriptthree]
- \definefontsynonym[Frutiger-BoldItalic] [\typescriptthree-ftbi] [encoding=\typescriptthree]
- \definefontsynonym[Frutiger-Black] [\typescriptthree-ftbl] [encoding=\typescriptthree]
- \definefontsynonym[Frutiger-BlackItalic][\typescriptthree-ftbli][encoding=\typescriptthree]
- \definefontsynonym[Frutiger-Italic] [\typescriptthree-fti] [encoding=\typescriptthree]
- \definefontsynonym[Frutiger-Light] [\typescriptthree-ftl] [encoding=\typescriptthree]
- \definefontsynonym[Frutiger-LightItalic][\typescriptthree-ftli] [encoding=\typescriptthree]
- \definefontsynonym[Frutiger-Roman] [\typescriptthree-ftr] [encoding=\typescriptthree]
- \definefontsynonym[Frutiger-UltraBlack] [\typescriptthree-ftubl][encoding=\typescriptthree]
- \loadmapfile[\typescriptthree-adobe-frutiger.map]
-\stoptypescript
-
-\starttypescript [frutiger] [texnansi,ec,8r,uc]
- \definetypeface [frutiger] [ss] [sans] [frutiger] [default] [encoding=\typescripttwo]
-% \loadmapfile [\typescripttwo-adobe-frutiger.map]
-\stoptypescript
-
-% kabel
-
-\starttypescript [sans] [kabel] [ec,8r,texnansi]
- \definefontsynonym [ItcKabel-Bold] [\typescriptthree-kbb] [encoding=\typescriptthree]
- \definefontsynonym [ItcKabel-Demi] [\typescriptthree-kbd] [encoding=\typescriptthree]
- \definefontsynonym [ItcKabel-Medium] [\typescriptthree-kbm] [encoding=\typescriptthree]
- \definefontsynonym [ItcKabel-Ultra] [\typescriptthree-kbu] [encoding=\typescriptthree]
- \definefontsynonym [ItcKabel-Book] [\typescriptthree-kbw] [encoding=\typescriptthree]
- \loadmapfile [\typescriptthree-itc-kabel.map]
-\stoptypescript
-
-% thesans
-
-\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]
- \loadmapfile[\typescriptthree-lucas-thesans.map]
-\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]
- \loadmapfile[\typescriptthree-lucas-thesans.map]
-\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]
- \loadmapfile[\typescriptthree-lucas-thesans.map]
-\stoptypescript
-
-% monotype sabon
-
-\starttypescript [serif] [sabon] [name]
- \definefontsynonym [Serif] [SabonMT]
- \definefontsynonym [SerifItalic] [SabonMT-Italic]
- \definefontsynonym [SerifSlanted] [SabonMT-Italic]
- \definefontsynonym [SerifBold] [SabonMT-SemiBold]
- \definefontsynonym [SerifBoldItalic] [SabonMT-SemiBoldItalic]
- \definefontsynonym [SerifBoldSlanted] [SabonMT-SemiBoldItalic]
- \definefontsynonym [SerifCaps] [SabonMT-RegularSC]
-\stoptypescript
-
-\starttypescript [serif] [sabon] [ec,8r,texnansi]
- \definefontsynonym[SabonMT] [\typescriptthree-sab] [encoding=\typescriptthree]
- \definefontsynonym[SabonMT-Italic] [\typescriptthree-sabi] [encoding=\typescriptthree]
- \definefontsynonym[SabonMT-ItalicOsF] [\typescriptthree-saboi][encoding=\typescriptthree]
- \definefontsynonym[SabonMT-SemiBoldOsF] [\typescriptthree-sabos][encoding=\typescriptthree]
- \definefontsynonym[SabonMT-SemiBold] [\typescriptthree-sabs] [encoding=\typescriptthree]
- \definefontsynonym[SabonMT-RegularSC] [\typescriptthree-sabsc][encoding=\typescriptthree]
- \definefontsynonym[SabonMT-SemiBoldItalic] [\typescriptthree-sabsi][encoding=\typescriptthree]
- \definefontsynonym[SabonMT-SemiBoldItalicOsF][\typescriptthree-sasio][encoding=\typescriptthree]
- \loadmapfile[\typescriptthree-monotype-sabon.map]
-\stoptypescript
-
-% itc stone
-
-\starttypescript [sans] [stone] [name]
- \definefontsynonym [Sans] [StoneSansITC-Medium]
- \definefontsynonym [SansItalic] [StoneSansITC-MediumItalic]
- \definefontsynonym [SansSlanted] [StoneSansITC-MediumItalic]
- \definefontsynonym [SansBold] [StoneSansITC-Bold]
- \definefontsynonym [SansBoldItalic] [StoneSansITC-BoldItalic]
- \definefontsynonym [SansBoldSlanted] [StoneSansITC-BoldItalic]
- \definefontsynonym [SansCaps] [StoneSansSCITC-Medium]
-\stoptypescript
-
-\starttypescript [serif] [stone] [name]
- \definefontsynonym [Serif] [StoneSerifITC-Medium]
- \definefontsynonym [SerifItalic] [StoneSerifITC-MediumItalic]
- \definefontsynonym [SerifSlanted] [StoneSerifITC-MediumItalic]
- \definefontsynonym [SerifBold] [StoneSerifITC-Bold]
- \definefontsynonym [SerifBoldItalic] [StoneSerifITC-BoldItalic]
- \definefontsynonym [SerifBoldSlanted] [StoneSerifITC-BoldItalic]
- \definefontsynonym [SerifCaps] [StoneSerifSCITC-Medium]
-\stoptypescript
-
-\starttypescript [sans] [stone-oldstyle] [name]
- \definefontsynonym [Sans] [StoneSansOSITC-Medium]
- \definefontsynonym [SansItalic] [StoneSansOSITC-MediumItalic]
- \definefontsynonym [SansSlanted] [StoneSansOSITC-MediumItalic]
- \definefontsynonym [SansBold] [StoneSansOSITC-Bold]
- \definefontsynonym [SansBoldItalic] [StoneSansOSITC-BoldItalic]
- \definefontsynonym [SansBoldSlanted] [StoneSansOSITC-BoldItalic]
- \definefontsynonym [SansCaps] [StoneSansSCITC-Medium]
-\stoptypescript
-
-\starttypescript [serif] [stone-oldstyle] [name]
- \definefontsynonym [Serif] [StoneSerifOSITC-Medium]
- \definefontsynonym [SerifItalic] [StoneSerifOSITC-MediumItalic]
- \definefontsynonym [SerifSlanted] [StoneSerifOSITC-MediumItalic]
- \definefontsynonym [SerifBold] [StoneSerifOSITC-Bold]
- \definefontsynonym [SerifBoldItalic] [StoneSerifOSITC-BoldItalic]
- \definefontsynonym [SerifBoldSlanted] [StoneSerifOSITC-BoldItalic]
- \definefontsynonym [SerifCaps] [StoneSerifSCITC-Medium]
-\stoptypescript
-
-\starttypescript [sans] [stone] [ec,texnansi]
- \definefontsynonym[StoneSansITC-Bold] [\typescriptthree-stosnb] [encoding=\typescriptthree]
- \definefontsynonym[StoneSansITC-BoldItalic] [\typescriptthree-stosnbi] [encoding=\typescriptthree]
- \definefontsynonym[StoneSansITC-Medium] [\typescriptthree-stosnm] [encoding=\typescriptthree]
- \definefontsynonym[StoneSansITC-MediumItalic] [\typescriptthree-stosnmi] [encoding=\typescriptthree]
- \definefontsynonym[StoneSansOSITC-Bold] [\typescriptthree-stosnob] [encoding=\typescriptthree]
- \definefontsynonym[StoneSansOSITC-BoldItalic] [\typescriptthree-stosnobi][encoding=\typescriptthree]
- \definefontsynonym[StoneSansOSITC-Medium] [\typescriptthree-stosnom] [encoding=\typescriptthree]
- \definefontsynonym[StoneSansOSITC-MediumItalic][\typescriptthree-stosnomi][encoding=\typescriptthree]
- \definefontsynonym[StoneSansSCITC-Medium] [\typescriptthree-stosnscm][encoding=\typescriptthree]
- \definefontsynonym[StoneSansSemITC-Semi] [\typescriptthree-stosns] [encoding=\typescriptthree]
- \definefontsynonym[StoneSansSemITC-SemiIta] [\typescriptthree-stosnsi] [encoding=\typescriptthree]
- \definefontsynonym[StoneSansSemOSITC-Semi] [\typescriptthree-stosnos] [encoding=\typescriptthree]
- \definefontsynonym[StoneSansSemOSITC-SemiIta] [\typescriptthree-stosnosi][encoding=\typescriptthree]
- \definefontsynonym[StoneSansSemSCITC-Semi] [\typescriptthree-stosnscs][encoding=\typescriptthree]
- \loadmapfile[\typescriptthree-itc-stone.map]
-\stoptypescript
-
-\starttypescript [serif] [stone] [ec,texnansi]
- \definefontsynonym[StoneSerifITC-Bold] [\typescriptthree-stosfb] [encoding=\typescriptthree]
- \definefontsynonym[StoneSerifITC-BoldItalic] [\typescriptthree-stosfbi] [encoding=\typescriptthree]
- \definefontsynonym[StoneSerifITC-Medium] [\typescriptthree-stosfm] [encoding=\typescriptthree]
- \definefontsynonym[StoneSerifITC-MediumItalic] [\typescriptthree-stosfmi] [encoding=\typescriptthree]
- \definefontsynonym[StoneSerifOSITC-Bold] [\typescriptthree-stosfob] [encoding=\typescriptthree]
- \definefontsynonym[StoneSerifOSITC-BoldItalic] [\typescriptthree-stosfobi][encoding=\typescriptthree]
- \definefontsynonym[StoneSerifOSITC-Medium] [\typescriptthree-stosfom] [encoding=\typescriptthree]
- \definefontsynonym[StoneSerifOSITC-MediumItalic][\typescriptthree-stosfomi][encoding=\typescriptthree]
- \definefontsynonym[StoneSerifSCITC-Medium] [\typescriptthree-stosfscm][encoding=\typescriptthree]
- \definefontsynonym[StoneSerifSemITC-Semi] [\typescriptthree-stosfs] [encoding=\typescriptthree]
- \definefontsynonym[StoneSerifSemITC-SemiIta] [\typescriptthree-stosfsi] [encoding=\typescriptthree]
- \definefontsynonym[StoneSerifSemOSITC-Semi] [\typescriptthree-stosfos] [encoding=\typescriptthree]
- \definefontsynonym[StoneSerifSemOSITC-SemiIta] [\typescriptthree-stosfosi][encoding=\typescriptthree]
- \definefontsynonym[StoneSerifSemSCITC-Semi] [\typescriptthree-stosfscs][encoding=\typescriptthree]
- \loadmapfile[\typescriptthree-itc-stone.map]
-\stoptypescript
-
-% linotype industria
-
-\starttypescript [sans] [industria] [ec,texnansi]
- \definefontsynonym[Industria-Solid][\typescriptthree-lt50545][encoding=\typescriptthree]
- \loadmapfile[\typescriptthree-linotype-industria.map]
-\stoptypescript
-
-% itc bauhaus
-%
-% texfont --enc=texnansi --ven=itc --col=bauhaus type-buy.dat
-
-\starttypescript [sans] [bauhaus] [ec,texnansi]
- \definefontsynonym[Bauhaus-Light] [\typescriptthree-bhl] [encoding=\typescriptthree]
- \definefontsynonym[Bauhaus-Medium] [\typescriptthree-bhm] [encoding=\typescriptthree]
- \definefontsynonym[Bauhaus-Demi] [\typescriptthree-bhd] [encoding=\typescriptthree]
- \definefontsynonym[Bauhaus-Bold] [\typescriptthree-bhb] [encoding=\typescriptthree]
- \definefontsynonym[Bauhaus-Heavy] [\typescriptthree-bhh] [encoding=\typescriptthree]
- \definefontsynonym[Bauhaus-Bold-Slanted] [\typescriptthree-bhb-slanted-167][encoding=\typescriptthree]
- \definefontsynonym[Bauhaus-Demi-Slanted] [\typescriptthree-bhd-slanted-167][encoding=\typescriptthree]
- \definefontsynonym[Bauhaus-Heavy-Slanted] [\typescriptthree-bhh-slanted-167][encoding=\typescriptthree]
- \definefontsynonym[Bauhaus-Light-Slanted] [\typescriptthree-bhl-slanted-167][encoding=\typescriptthree]
- \definefontsynonym[Bauhaus-Medium-Slanted][\typescriptthree-bhm-slanted-167][encoding=\typescriptthree]
- \loadmapfile[\typescriptthree-itc-bauhaus.map]
-\stoptypescript
-
-% ef swift
-%
-% texfont --enc=texnansi --ven=ef --col=swift type-buy.dat
-
-\starttypescript [serif] [swift] [name]
- \definefontsynonym [Serif] [SwiftEF-Regular]
- \definefontsynonym [SerifItalic] [SwiftEF-RegularItalic]
- \definefontsynonym [SerifSlanted] [SwiftEF-RegularItalic]
- \definefontsynonym [SerifBold] [SwiftEF-Bold]
- \definefontsynonym [SerifBoldItalic] [SwiftEF-Bold]
- \definefontsynonym [SerifBoldSlanted] [SwiftEF-Bold]
- \definefontsynonym [SerifCaps] [SwiftSCEF-Regular]
-\stoptypescript
-
-\starttypescript [serif] [swift-light] [name]
- \definefontsynonym [Serif] [SwiftEF-Light]
- \definefontsynonym [SerifItalic] [SwiftEF-LightItalic]
- \definefontsynonym [SerifSlanted] [SwiftEF-LightItalic]
- \definefontsynonym [SerifBold] [SwiftEF-Regular]
- \definefontsynonym [SerifBoldItalic] [SwiftEF-RegularItalic]
- \definefontsynonym [SerifBoldSlanted] [SwiftEF-RegularItalic]
- \definefontsynonym [SerifCaps] [SwiftSCEF-Regular]
-\stoptypescript
-
-\starttypescript [serif] [swift] [ec,texnansi]
- \definefontsynonym[SwiftEF-Light] [\typescriptthree-swlt] [encoding=\typescriptthree]
- \definefontsynonym[SwiftEF-Regular] [\typescriptthree-swrg] [encoding=\typescriptthree]
- \definefontsynonym[SwiftEF-Bold] [\typescriptthree-swbd] [encoding=\typescriptthree]
- \definefontsynonym[SwiftEF-ExtraBold] [\typescriptthree-swxb] [encoding=\typescriptthree]
- \definefontsynonym[SwiftEF-LightItalic] [\typescriptthree-swlti][encoding=\typescriptthree]
- \definefontsynonym[SwiftEF-RegularItalic][\typescriptthree-swrgi][encoding=\typescriptthree]
- \definefontsynonym[SwiftEF-BoldCondensed][\typescriptthree-swbdc][encoding=\typescriptthree]
- \definefontsynonym[SwiftSCEF-Regular] [\typescriptthree-swrgs][encoding=\typescriptthree]
- \loadmapfile[\typescriptthree-ef-swift.map]
-\stoptypescript
-
-% linotype syntax
-
-\starttypescript [sans] [syntax] [name]
- \definefontsynonym [Sans] [SyntaxLT-Roman]
- \definefontsynonym [SansItalic] [SyntaxLT-Italic]
- \definefontsynonym [SansSlanted] [SyntaxLT-Italic]
- \definefontsynonym [SansBold] [SyntaxLT-Black]
- \definefontsynonym [SansBoldItalic] [SyntaxLT-Black]
- \definefontsynonym [SansBoldSlanted][SyntaxLT-Black]
-\stoptypescript
-
-\starttypescript [sans] [syntax] [ec,texnansi]
- \definefontsynonym [SyntaxLT-Roman] [\typescriptthree-lte50617] [encoding=\typescriptthree]
- \definefontsynonym [SyntaxLT-Italic] [\typescriptthree-lte50618] [encoding=\typescriptthree]
- \definefontsynonym [SyntaxLT-Bold] [\typescriptthree-lte50619] [encoding=\typescriptthree]
- \definefontsynonym [SyntaxLT-Black] [\typescriptthree-lte50620] [encoding=\typescriptthree]
- \definefontsynonym [SyntaxLT-UltraBlack] [\typescriptthree-lte50621] [encoding=\typescriptthree]
- \loadmapfile[\typescriptthree-linotype-syntax.map]
-\stoptypescript
-
-% linotype linoletter
-
-\starttypescript [serif] [linoletter] [name]
- \definefontsynonym [Serif] [LinoLetterLT-Roman]
- \definefontsynonym [SerifItalic] [LinoLetterLT-Italic]
- \definefontsynonym [SerifSlanted] [LinoLetterLT-Italic]
- \definefontsynonym [SerifBold] [LinoLetterLT-Bold]
- \definefontsynonym [SerifBoldItalic] [LinoLetterLT-BoldItalic]
- \definefontsynonym [SerifBoldSlanted][LinoLetterLT-BoldItalic]
-\stoptypescript
-
-\starttypescript [serif] [linoletter] [ec,texnansi]
- \definefontsynonym[LinoLetterLT-Roman] [texnansi-lte51129] [encoding=\typescriptthree]
- \definefontsynonym[LinoLetterLT-Italic] [texnansi-lte51130] [encoding=\typescriptthree]
- \definefontsynonym[LinoLetterLT-Bold] [texnansi-lte51133] [encoding=\typescriptthree]
- \definefontsynonym[LinoLetterLT-BoldItalic] [texnansi-lte51134] [encoding=\typescriptthree]
- \definefontsynonym[LinoLetterLT-BlackItalic] [texnansi-lte51136] [encoding=\typescriptthree]
- \definefontsynonym[LinoLetter-MediumSC] [texnansi-llmsc] [encoding=\typescriptthree]
- \loadmapfile[\typescriptthree-linotype-linoletter.map]
-\stoptypescript
-
-\stoptypescriptcollection
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/type-cbg.mkii b/Master/texmf-dist/tex/context/base/type-cbg.mkii
deleted file mode 100644
index a45a71d4ed4..00000000000
--- a/Master/texmf-dist/tex/context/base/type-cbg.mkii
+++ /dev/null
@@ -1,352 +0,0 @@
-%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 \& \CONTEXT\ Development Team}]
-%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(' ')}")
-
-\starttypescriptcollection[cbgreek]
-
-\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]
- \loadmapfile [cbgreek.map]
-\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]
- \loadmapfile [cbgreek.map]
-\stoptypescript
-
-\starttypescript [mono] [cbgreek] [name]
- \definefontsynonym [CBGreek-Typewriter-Medium-Normal] [gttn1000]
- \definefontsynonym [CBGreek-Typewriter-Medium-Oblique] [gtto1000]
- \definefontsynonym [CBGreek-Typewriter-Medium-Italic] [gtti1000]
- \definefontsynonym [CBGreek-Typewriter-Medium-UprightItalic] [gttu1000]
- \definefontsynonym [CBGreek-Typewriter-Medium-Caps] [gttc1000]
- \definefontsynonym [CBGreek-Typewriter-Medium-Leipzig] [gttl1000]
- \definefontsynonym [CBGreek-Typewriter-Medium-Roman] [gttr1000]
- \loadmapfile [cbgreek.map]
-\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]
- \loadmapfile [cbgreek.map]
-\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]
- \loadmapfile [cbgreek.map]
-\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]
- \loadmapfile [cbgreek.map]
-\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]
-
- \loadmapfile [cbgreek.map]
-
-\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]
-
- \loadmapfile [cbgreek.map]
-
-\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]
-
- \loadmapfile [cbgreek.map]
-
-\stoptypescript
-
-\starttypescript [serif] [cbgreek-medium] [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]
-
- \loadmapfile [cbgreek.map]
-
-\stoptypescript
-
-\starttypescript [sans] [cbgreek-medium] [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]
-
- \loadmapfile [cbgreek.map]
-
-\stoptypescript
-
-\starttypescript [mono] [cbgreek-medium] [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]
-
- \loadmapfile [cbgreek.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-medium] % lowercase, patched HH
-
- \definebodyfontenvironment [cbgreek] [default] []
-
- \definetypeface [cbgreek] [rm] [serif] [cbgreek] [cbgreek-medium]
- \definetypeface [cbgreek] [ss] [sans] [cbgreek] [cbgreek-medium]
- \definetypeface [cbgreek] [tt] [mono] [cbgreek] [cbgreek-medium]
-
-\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
-
-\stoptypescriptcollection
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/type-cow.mkii b/Master/texmf-dist/tex/context/base/type-cow.mkii
deleted file mode 100644
index f46ac968bb6..00000000000
--- a/Master/texmf-dist/tex/context/base/type-cow.mkii
+++ /dev/null
@@ -1,85 +0,0 @@
-%D \module
-%D [ file=type-cow,
-%D version=2006.06.23,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Cow Fonts,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D The cow fonts are a project of Duane Bibby, Hans Hagen and Taco
-%D Hoekwater.
-
-\starttypescriptcollection[cow]
-
-\starttypescript [math,serif] [cow,sheep] [default]
- \setups[font:fallback:serif]
- \usemathcollection[cow]
- \loadmapfile[koeieletters.map]
- \definefontsynonym [Serif] [Cows] [encoding=\typescriptthree]
- \definefontsynonym [SerifContour] [CowsContour] [encoding=\typescriptthree]
- \definefontsynonym [SerifLogo] [CowsLogo] [encoding=\typescriptthree]
- \definefontsynonym [SerifLogoContour][CowsLogoContour] [encoding=\typescriptthree]
- \definefontsynonym [MathRoman] [CowsMathRoman] [encoding=\typescriptthree]
- \definefontsynonym [MathItalic] [CowsMathItalic] [encoding=\typescriptthree]
- \definefontsynonym [MathSymbol] [CowsMathSymbol] [encoding=\typescriptthree]
- \definefontsynonym [MathExtension] [CowsMathExtensions][encoding=\typescriptthree]
-\stoptypescript
-
-\starttypescript [math,serif] [sheep] [default]
- \setups[font:fallback:serif]
- \usemathcollection[cow]
- \loadmapfile[koeieletters.map]
- \definefontsynonym [Serif] [Sheep] [encoding=\typescriptthree]
- \definefontsynonym [SerifContour] [SheepContour] [encoding=\typescriptthree]
- \definefontsynonym [SerifLogo] [SheepLogo] [encoding=\typescriptthree]
- \definefontsynonym [SerifLogoContour][SheepLogoContour] [encoding=\typescriptthree]
- \definefontsynonym [MathRoman] [SheepMathRoman] [encoding=\typescriptthree]
- \definefontsynonym [MathItalic] [SheepMathItalic] [encoding=\typescriptthree]
- \definefontsynonym [MathSymbol] [SheepMathSymbol] [encoding=\typescriptthree]
- \definefontsynonym [MathExtension] [SheepMathExtensions][encoding=\typescriptthree]
-\stoptypescript
-
-\starttypescript [all] [cow,sheep] [default]
- \definefontsynonym [Cows] [koeielett]
- \definefontsynonym [CowsContour] [koeielett-contour]
- \definefontsynonym [CowsLogo] [koeielogos]
- \definefontsynonym [CowsLogoContour] [koeielogos-contour]
- \definefontsynonym [CowsMathRoman] [koeielett]
- \definefontsynonym [CowsMathItalic] [koeieletter-mi]
- \definefontsynonym [CowsMathSymbol] [koeieletter-sy]
- \definefontsynonym [CowsMathExtensions][koeieletter-ex]
-\stoptypescript
-
-\starttypescript [all] [sheep] [default]
- \definefontsynonym [Sheep] [koeielett]
- \definefontsynonym [SheepContour] [koeielett-contour]
- \definefontsynonym [SheepLogo] [koeielogos]
- \definefontsynonym [SheepLogoContour] [koeielogos-contour]
- \definefontsynonym [SheepMathRoman] [koeielettx]
- \definefontsynonym [SheepMathItalic] [koeieletter-mi]
- \definefontsynonym [SheepMathSymbol] [koeieletter-syx]
- \definefontsynonym [SheepMathExtensions][koeieletter-ex]
-\stoptypescript
-
-\starttypescript [cow] [default]
- \definetypeface [cow] [rm][serif][cow] [default][encoding=default]
- \definetypeface [cow] [ss][serif][cow] [default][encoding=default]
- \definetypeface [cow] [mm][math] [cow] [default][encoding=default]
- \definetypeface [cow] [tt][mono] [modern][default][encoding=default,rscale=0.85]
-\stoptypescript
-
-\starttypescript [sheep] [default]
- \definetypeface [sheep][rm][serif][sheep] [default][encoding=default]
- \definetypeface [sheep][ss][serif][sheep] [default][encoding=default]
- \definetypeface [sheep][mm][math] [sheep] [default][encoding=default]
- \definetypeface [sheep][tt][mono] [modern][default][encoding=default,rscale=0.85]
-\stoptypescript
-
-\stoptypescriptcollection
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/type-exp.mkii b/Master/texmf-dist/tex/context/base/type-exp.mkii
deleted file mode 100644
index c7c6e4b45d3..00000000000
--- a/Master/texmf-dist/tex/context/base/type-exp.mkii
+++ /dev/null
@@ -1,95 +0,0 @@
-%D \module
-%D [ file=type-exp,
-%D version=2007.01.28,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Experimental Definitions,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% \usetypescript[palatino-light] [texnansi] \setupbodyfont[palatino-light] \input zapf \par
-% \usetypescript[palatino-normal][texnansi] \setupbodyfont[palatino-normal] \input zapf \par
-% \usetypescript[palatino-medium][texnansi] \setupbodyfont[palatino-medium] \input zapf \par
-
-%D This file is used for \LUATEX\ experiments.
-
-\starttypescriptcollection[experiment]
-
-\starttypescript [sans] [palatino-sans-light] [name]
-
- \definefontsynonym [Sans] [PalatinoSans-Light]
- \definefontsynonym [SansItalic] [PalatinoSans-LightItalic]
- \definefontsynonym [SansBold] [PalatinoSans-Regular]
- \definefontsynonym [SansBoldItalic] [PalatinoSans-Italic]
- \definefontsynonym [SansSlanted] [PalatinoSans-Regular]
- \definefontsynonym [SansBoldSlanted] [PalatinoSans-Italic]
- \definefontsynonym [SansCaps] [PalatinoSans-Light]
-
-\stoptypescript
-
-\starttypescript [sans] [palatino-sans-normal] [name]
-
- \definefontsynonym [Sans] [PalatinoSans-Regular]
- \definefontsynonym [SansItalic] [PalatinoSans-Italic]
- \definefontsynonym [SansBold] [PalatinoSans-Bold]
- \definefontsynonym [SansBoldItalic] [PalatinoSans-BoldItalic]
- \definefontsynonym [SansSlanted] [PalatinoSans-Italic]
- \definefontsynonym [SansBoldSlanted] [PalatinoSans-BoldItalic]
- \definefontsynonym [SansCaps] [PalatinoSans-Regular]
-
-\stoptypescript
-
-\starttypescript [sans] [palatino-sans-medium] [name]
-
- \definefontsynonym [Sans] [PalatinoSans-Medium]
- \definefontsynonym [SansItalic] [PalatinoSans-MediumItalic]
- \definefontsynonym [SansBold] [PalatinoSans-Bold]
- \definefontsynonym [SansBoldItalic] [PalatinoSans-BoldItalic]
- \definefontsynonym [SansSlanted] [PalatinoSans-Bold]
- \definefontsynonym [SansBoldSlanted] [PalatinoSans-BoldItalic]
- \definefontsynonym [SansCaps] [PalatinoSans-MediumSC]
-
-\stoptypescript
-
-\starttypescript [sans] [palatino-sans-light,palatino-sans-normal,palatino-sans-medium] [texnansi,ec,8r]
-
- \definefontsynonym[PalatinoSans-Light] [\typescriptthree-palatinosanscom-light] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoSans-LightItalic] [\typescriptthree-palatinosanscom-lightitalic] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoSans-Regular] [\typescriptthree-palatinosanscom-regular] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoSans-Italic] [\typescriptthree-palatinosanscom-italic] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoSans-Medium] [\typescriptthree-palatinosanscom-medium] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoSans-MediumItalic][\typescriptthree-palatinosanscom-mediumitalic][encoding=\typescriptthree]
- \definefontsynonym[PalatinoSans-Bold] [\typescriptthree-palatinosanscom-bold] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoSans-BoldItalic] [\typescriptthree-palatinosanscom-bolditalic] [encoding=\typescriptthree]
-
-\stoptypescript
-
-\starttypescript[palatino-normal][texnansi,ec]
- \definetypeface[palatino-normal][ss][sans] [palatino-sans-normal] [default][encoding=\typescripttwo]
- \definetypeface[palatino-normal][rm][serif][palatino-nova] [default][encoding=\typescripttwo]
- \definetypeface[palatino-normal][tt][mono] [latin-modern] [default][encoding=\typescripttwo,rscale=1.1]
- \definetypeface[palatino-normal][mm][math] [latin-modern] [default][encoding=\typescripttwo,rscale=1.1]
- \quittypescriptscanning
-\stoptypescript
-
-\starttypescript[palatino-medium][texnansi,ec]
- \definetypeface[palatino-medium][ss][sans] [palatino-sans-medium] [default][encoding=\typescripttwo]
- \definetypeface[palatino-medium][rm][serif][palatino-nova] [default][encoding=\typescripttwo]
- \definetypeface[palatino-medium][tt][mono] [latin-modern] [default][encoding=\typescripttwo,rscale=1.1]
- \definetypeface[palatino-medium][mm][math] [latin-modern] [default][encoding=\typescripttwo,rscale=1.1]
- \quittypescriptscanning
-\stoptypescript
-
-\starttypescript[palatino-light][texnansi,ec]
- \definetypeface[palatino-light][ss][sans] [palatino-sans-light] [default][encoding=\typescripttwo]
- \definetypeface[palatino-light][rm][serif][palatino-nova] [default][encoding=\typescripttwo]
- \definetypeface[palatino-light][tt][mono] [latin-modern] [default][encoding=\typescripttwo,rscale=1.1]
- \definetypeface[palatino-light][mm][math] [latin-modern] [default][encoding=\typescripttwo,rscale=1.1]
- \quittypescriptscanning
-\stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-fsf.mkii b/Master/texmf-dist/tex/context/base/type-fsf.mkii
deleted file mode 100644
index 6782d3dcf76..00000000000
--- a/Master/texmf-dist/tex/context/base/type-fsf.mkii
+++ /dev/null
@@ -1,94 +0,0 @@
-%D \module
-%D [ file=page-new,
-%D version=2000.10.20,
-%D title=\CONTEXT\ Page Macros,
-%D subtitle=Fontsite 500,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 I'm not sure how correct the fontsite cd is. These are probably
-%D mostly rip-offs. I no longer use these fonts.
-
-% run texfont from currentpath with the fonts on subpath fontsite/500
-
-% texfont --en=texnansi --ve=fontsite --co=opus type-fsf.dat
-% texfont --en=texnansi --ve=fontsite --co=typewriter type-fsf.dat
-
-\starttypescriptcollection[font site 500]
-
-%D Please use the original Optima!
-
-\starttypescript [sans] [opus] [name]
- \definefontsynonym [Sans] [Opus]
- \definefontsynonym [SansCaps] [OpusSmCaps]
- \definefontsynonym [SansItalic] [Opus-Italic]
- \definefontsynonym [SansBold] [Opus-Bold]
- \definefontsynonym [SansBoldCaps] [OpusSmCaps-Bold]
- \definefontsynonym [SansBoldItalic] [Opus-BoldItalic]
- \definefontsynonym [SansSlanted] [Opus-Slanted] % faked
- \definefontsynonym [SansBoldSlanted] [Opus-BoldSlanted] % faked
-\stoptypescript
-
-\starttypescript [sans] [opus] [texnansi,ec,8r]
- \definefontsynonym [Opus] [\typescriptthree-opusrg] [encoding=\typescriptthree]
- \definefontsynonym [OpusSmCaps] [\typescriptthree-opusscrg] [encoding=\typescriptthree]
- \definefontsynonym [Opus-Italic] [\typescriptthree-opusi] [encoding=\typescriptthree]
- \definefontsynonym [Opus-Bold] [\typescriptthree-opusb] [encoding=\typescriptthree]
- \definefontsynonym [Opus-BoldItalic] [\typescriptthree-opusbi] [encoding=\typescriptthree]
- \definefontsynonym [OpusSmCaps-Bold] [\typescriptthree-opusscb] [encoding=\typescriptthree]
- \definefontsynonym [Opus-Slanted] [\typescriptthree-opusrg-slanted-167] [encoding=\typescriptthree]
- \definefontsynonym [Opus-BoldSlanted] [\typescriptthree-opusb-slanted-167] [encoding=\typescriptthree]
- \loadmapfile[\typescriptthree-fontsite-opus.map]
-\stoptypescript
-
-\starttypescript [mono] [typewriter] [name]
- \definefontsynonym [Mono] [Typewriter]
- \definefontsynonym [MonoItalic] [Typewriter-Italic]
- \definefontsynonym [MonoBold] [Typewriter-Bold]
- \definefontsynonym [MonoBoldItalic] [Typewriter-BoldItalic]
- \definefontsynonym [MonoSlanted] [Typewriter-Slanted] % faked
- \definefontsynonym [MonoBoldSlanted] [Typewriter-BoldSlanted] % faked
-\stoptypescript
-
-\starttypescript [mono] [typewriter] [texnansi,ec,8r]
- \definefontsynonym [Typewriter] [\typescriptthree-typerg] [encoding=\typescriptthree]
- \definefontsynonym [Typewriter-Italic] [\typescriptthree-typei] [encoding=\typescriptthree]
- \definefontsynonym [Typewriter-Bold] [\typescriptthree-typeb] [encoding=\typescriptthree]
- \definefontsynonym [Typewriter-BoldItalic] [\typescriptthree-typebi] [encoding=\typescriptthree]
- \definefontsynonym [Typewriter-Slanted] [\typescriptthree-typerg-slanted-167] [encoding=\typescriptthree]
- \definefontsynonym [Typewriter-BoldSlanted] [\typescriptthree-typeb-slanted-167] [encoding=\typescriptthree]
- \definefontsynonym [TypewriterCond] [\typescriptthree-typecrg]
- \definefontsynonym [TypewriterCond-Bold] [\typescriptthree-typecb]
- \loadmapfile[\typescriptthree-fontsite-typewriter.map]
-\stoptypescript
-
-\starttypescript [serif] [garamond] [name]
- \definefontsynonym [Serif] [FSGaramond]
- \definefontsynonym [SerifCaps] [FSGaramondSmCaps]
- \definefontsynonym [SerifItalic] [FSGaramond-Italic]
- \definefontsynonym [SerifBold] [FSGaramond-Bold]
- \definefontsynonym [SerifBoldCaps] [FSGaramondSmCaps-Bold]
- \definefontsynonym [SerifSlanted] [FSGaramond-Slanted]
- \definefontsynonym [SerifBoldSlanted] [FSGaramond-BoldSlanted]
-\stoptypescript
-
-\starttypescript [serif] [garamond] [texnansi,ec,8r]
- \definefontsynonym [FSGaramond] [\typescriptthree-garamond] [encoding=\typescriptthree]
- \definefontsynonym [FSGaramondSmCaps] [\typescriptthree-garasc] [encoding=\typescriptthree]
- \definefontsynonym [FSGaramond-Italic] [\typescriptthree-garai] [encoding=\typescriptthree]
- \definefontsynonym [FSGaramond-Bold] [\typescriptthree-garab] [encoding=\typescriptthree]
- \definefontsynonym [FSGaramond-BoldItalic] [\typescriptthree-garabi] [encoding=\typescriptthree]
- \definefontsynonym [FSGaramondSmCaps-Bold] [\typescriptthree-garascb] [encoding=\typescriptthree]
- \definefontsynonym [FSGaramond-Slanted] [\typescriptthree-garamond-slanted-167] [encoding=\typescriptthree]
- \definefontsynonym [FSGaramond-BoldSlanted] [\typescriptthree-garab-slanted-167] [encoding=\typescriptthree]
- \loadmapfile[\typescriptthree-fontsite-garamond.map]
-\stoptypescript
-
-\stoptypescriptcollection
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/type-ghz.mkii b/Master/texmf-dist/tex/context/base/type-ghz.mkii
deleted file mode 100644
index 3778cd96485..00000000000
--- a/Master/texmf-dist/tex/context/base/type-ghz.mkii
+++ /dev/null
@@ -1,409 +0,0 @@
-%D \module
-%D [ file=type-ghz,
-%D version=2005.06.07,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Hermann Zapf's Fonts,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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-ghz]
-%
-% \definetypeface[optima] [ss][sans] [optima-nova] [default]
-% \definetypeface[palatino][rm][serif][palatino-nova][default]
-% \definetypeface[aldus] [rm][serif][aldus-nova] [default]
-%
-% \starttext
-% \setupbodyfont[optima] \input zapf \blank
-% \setupbodyfont[palatino] \input zapf \blank
-% \setupbodyfont[aldus] \input zapf \blank
-% \stoptext
-
-\starttypescriptcollection[zapf collection]
-
-% zapfino
-
-\starttypescript [serif,handwriting] [zapfino] [texnansi,ec,8r] % todo: handwriting
-
- \definefontsynonym [ZapfinoOne] [\typescriptthree-lt54223] [encoding=\typescriptthree]
- \definefontsynonym [ZapfinoTwo] [\typescriptthree-lt54224] [encoding=\typescriptthree]
- \definefontsynonym [ZapfinoThree] [\typescriptthree-lt54225] [encoding=\typescriptthree]
- \definefontsynonym [ZapfinoFour] [\typescriptthree-lt54226] [encoding=\typescriptthree]
-
- \loadmapfile[\typescriptthree-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
-
-\starttypescript [sans] [optima] [name]
-
- \definefontsynonym [Sans] [OptimaLT]
- \definefontsynonym [SansItalic] [OptimaLT-Italic]
- \definefontsynonym [SansBold] [OptimaLT-Bold]
- \definefontsynonym [SansBoldItalic] [OptimaLT-BoldItalic]
- \definefontsynonym [SansSlanted] [SansItalic]
- \definefontsynonym [SansBoldSlanted] [SansBoldItalic]
- \definefontsynonym [SansCaps] [Sans]
-
-\stoptypescript
-
-\starttypescript [sans] [optima,optima-nova] [texnansi,ec,8r]
-
- \definefontsynonym [OptimaLT] [\typescriptthree-lte50019] [encoding=\typescriptthree]
- \definefontsynonym [OptimaLT-Italic] [\typescriptthree-lte52401] [encoding=\typescriptthree]
- \definefontsynonym [OptimaLT-Bold] [\typescriptthree-lte50021] [encoding=\typescriptthree]
- \definefontsynonym [OptimaLT-BoldItalic] [\typescriptthree-lte54379] [encoding=\typescriptthree]
-
- \definefontsynonym [OptimaLT-Medium] [\typescriptthree-lte53505] [encoding=\typescriptthree]
- \definefontsynonym [OptimaLT-MediumItalic] [\typescriptthree-lte53506] [encoding=\typescriptthree]
- \definefontsynonym [OptimaLT-DemiBold] [\typescriptthree-lte53507] [encoding=\typescriptthree]
- \definefontsynonym [OptimaLT-DemiBoldItalic] [\typescriptthree-lte53508] [encoding=\typescriptthree]
- \definefontsynonym [OptimaLT-Black] [\typescriptthree-lte53509] [encoding=\typescriptthree]
- \definefontsynonym [OptimaLT-BlackItalic] [\typescriptthree-lte53510] [encoding=\typescriptthree]
- \definefontsynonym [OptimaLT-ExtraBlack] [\typescriptthree-lte53511] [encoding=\typescriptthree]
- \definefontsynonym [OptimaLT-ExtraBlackItalic] [\typescriptthree-lte53512] [encoding=\typescriptthree]
-
- \loadmapfile[\typescriptthree-linotype-optima.map]
-
-\stoptypescript
-
-\starttypescript [optima] [texnansi,ec,qx]
- \definetypeface[optima][ss][sans] [optima-nova][default][encoding=\typescripttwo]
- \definetypeface[optima][rm][serif][palatino] [default][encoding=\typescripttwo]
- \definetypeface[optima][tt][mono] [modern] [default][encoding=\typescripttwo,rscale=1.1]
- \definetypeface[optima][mm][math] [palatino] [default][encoding=\typescripttwo]
- \quittypescriptscanning
-\stoptypescript
-
-% optima nova
-
-% see antykwa, we could define variants for light and osf
-
-\starttypescript [sans] [optima-nova] [name]
-
- \definefontsynonym [Sans] [OptimaNovaLT-Regular]
- \definefontsynonym [SansItalic] [OptimaNovaLT-Italic]
- \definefontsynonym [SansBold] [OptimaNovaLT-Bold]
- \definefontsynonym [SansBoldItalic] [OptimaNovaLT-BoldItalic]
- \definefontsynonym [SansSlanted] [OptimaNovaLT-Italic]
- \definefontsynonym [SansBoldSlanted] [OptimaNovaLT-BoldItalic]
- \definefontsynonym [SansCaps] [OptimaNovaLT-RegularSC]
-
- \definefontvariant [Serif][osf][OsF]
- \definefontvariant [Serif][sc][Caps]
-
- \definefontsynonym [SansOsF] [OptimaNovaLT-RegularOsF]
- \definefontsynonym [SansItalicOsF] [OptimaNovaLT-ItalicOsF]
- \definefontsynonym [SansBoldOsF] [OptimaNovaLT-BoldOsF]
- \definefontsynonym [SansBoldItalicOsF] [OptimaNovaLT-BoldItalicOsF]
- \definefontsynonym [SansSlantedOsF] [OptimaNovaLT-ItalicOsF]
- \definefontsynonym [SansBoldSlantedOsF] [OptimaNovaLT-BoldItalicOsF]
- \definefontsynonym [SansCapsOsF] [OptimaNovaLT-RegularSC]
-
- \definefontsynonym [SansCaps] [OptimaNovaLT-RegularSC]
- \definefontsynonym [SansItalicCaps] [OptimaNovaLT-ItalicSC ]
- \definefontsynonym [SansBoldCaps] [OptimaNovaLT-BoldSC]
- \definefontsynonym [SansBoldItalicCaps] [OptimaNovaLT-BoldItalicSC]
- \definefontsynonym [SansSlantedCaps] [OptimaNovaLT-ItalicSC]
- \definefontsynonym [SansBoldSlantedCaps] [OptimaNovaLT-BoldItalicSC]
- \definefontsynonym [SansCapsCaps] [OptimaNovaLT-RegularSC]
-
-\stoptypescript
-
-\starttypescript [sans] [optima-nova-os] [name]
-
- \definefontsynonym [Sans] [OptimaNovaLT-RegularOsF]
- \definefontsynonym [SansItalic] [OptimaNovaLT-ItalicOsF]
- \definefontsynonym [SansBold] [OptimaNovaLT-BoldOsF]
- \definefontsynonym [SansBoldItalic] [OptimaNovaLT-BoldItalicOsF]
- \definefontsynonym [SansSlanted] [OptimaNovaLT-ItalicOsF]
- \definefontsynonym [SansBoldSlanted] [OptimaNovaLT-BoldItalicOsF]
- \definefontsynonym [SansCaps] [OptimaNovaLT-RegularSC]
-
-\stoptypescript
-
-\starttypescript [sans] [optima-nova-light] [name] % may change
-
- \definefontsynonym [Sans] [OptimaNovaLT-Light]
- \definefontsynonym [SansItalic] [OptimaNovaLT-LightItalic]
- \definefontsynonym [SansBold] [OptimaNovaLT-Medium]
- \definefontsynonym [SansBoldItalic] [OptimaNovaLT-MediumItalic]
- \definefontsynonym [SansSlanted] [OptimaNovaLT-LightItalic]
- \definefontsynonym [SansBoldSlanted] [OptimaNovaLT-MediumItalic]
- \definefontsynonym [SansCaps] [OptimaNovaLT-LightSC]
-
-\stoptypescript
-
-\starttypescript [sans] [optima-nova-medium] [name] % may change
-
- \definefontsynonym [Sans] [OptimaNovaLT-Medium]
- \definefontsynonym [SansItalic] [OptimaNovaLT-MediumItalic]
- \definefontsynonym [SansBold] [OptimaNovaLT-Heavy]
- \definefontsynonym [SansBoldItalic] [OptimaNovaLT-HeavyItalic]
- \definefontsynonym [SansSlanted] [OptimaNovaLT-MediumItalic]
- \definefontsynonym [SansBoldSlanted] [OptimaNovaLT-HeavyItalic]
- \definefontsynonym [SansCaps] [OptimaNovaLT-MediumSC]
-
-\stoptypescript
-
-\starttypescript [sans] [optima-nova,optima-nova-light,optima-nova-medium,optima-nova-os] [texnansi,ec,8r]
-
- \definefontsynonym[OptimaNovaLT-Light] [\typescriptthree-lt55476][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-LightSC] [\typescriptthree-lt55477][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-LightOsF] [\typescriptthree-lt55478][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-LightItalic] [\typescriptthree-lt55479][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-LightItalicSC] [\typescriptthree-lt55480][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-LightItalicOsF] [\typescriptthree-lt55481][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-LightCond] [\typescriptthree-lt55482][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-Regular] [\typescriptthree-lt55483][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-RegularSC] [\typescriptthree-lt55484][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-RegularOsF] [\typescriptthree-lt55485][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-Italic] [\typescriptthree-lt55486][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-ItalicSC] [\typescriptthree-lt55487][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-ItalicOsF] [\typescriptthree-lt55488][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-Condensed] [\typescriptthree-lt55489][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-Medium] [\typescriptthree-lt55490][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-MediumSC] [\typescriptthree-lt55491][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-MediumOsF] [\typescriptthree-lt55492][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-MediumItalic] [\typescriptthree-lt55493][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-MediumItalicSC] [\typescriptthree-lt55494][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-MediumItalicOsF][\typescriptthree-lt55495][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-MediumCond] [\typescriptthree-lt55496][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-TitlingInitials][\typescriptthree-lt55497][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-Demi] [\typescriptthree-lt55498][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-DemiSC] [\typescriptthree-lt55499][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-DemiOsF] [\typescriptthree-lt55500][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-DemiItalic] [\typescriptthree-lt55501][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-DemiItalicSC] [\typescriptthree-lt55502][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-DemiItalicOsF] [\typescriptthree-lt55503][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-DemiCond] [\typescriptthree-lt55504][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-Bold] [\typescriptthree-lt55505][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-BoldSC] [\typescriptthree-lt55506][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-BoldOsF] [\typescriptthree-lt55507][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-BoldItalic] [\typescriptthree-lt55508][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-BoldItalicSC] [\typescriptthree-lt55509][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-BoldItalicOsF] [\typescriptthree-lt55510][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-BoldCond] [\typescriptthree-lt55511][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-Heavy] [\typescriptthree-lt55512][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-HeavyItalic] [\typescriptthree-lt55513][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-Black] [\typescriptthree-lt55514][encoding=\typescriptthree]
- \definefontsynonym[OptimaNovaLT-BlackItalic] [\typescriptthree-lt55515][encoding=\typescriptthree]
-
- \loadmapfile[\typescriptthree-linotype-optima-nova.map]
-
-\stoptypescript
-
-\starttypescript[optima-nova][texnansi,ec] % will change to more narrow tt
- \definetypeface[optima][ss][sans][optima-nova] [default][encoding=\typescripttwo]
- \definetypeface[optima][rm][sans][optima-nova] [default][encoding=\typescripttwo]
- \definetypeface[optima][tt][mono][latin-modern][default][encoding=\typescripttwo,rscale=1.1]
- \definetypeface[optima][mm][math][latin-modern][default][encoding=\typescripttwo,rscale=1.1]
- \quittypescriptscanning
-\stoptypescript
-
-\starttypescript[optima-nova-os][texnansi,ec] % will change to more narrow tt
- \definetypeface[optima-os][ss][sans][optima-nova-os] [default][encoding=\typescripttwo]
- \definetypeface[optima-os][rm][sans][optima-nova-os] [default][encoding=\typescripttwo]
- \definetypeface[optima-os][tt][mono][latin-modern] [default][encoding=\typescripttwo,rscale=1.1]
- \definetypeface[optima-os][mm][math][latin-modern] [default][encoding=\typescripttwo,rscale=1.1]
- \quittypescriptscanning
-\stoptypescript
-
-% palatino
-
-\starttypescript [serif] [palatino] [name]
-
- \definefontsynonym [Serif] [PalatinoLT-Roman]
- \definefontsynonym [SerifItalic] [PalatinoLT-Italic]
- \definefontsynonym [SerifBold] [PalatinoLT-Bold]
- \definefontsynonym [SerifBoldItalic] [PalatinoLT-BoldItalic]
- \definefontsynonym [SerifSlanted] [SerifItalic]
- \definefontsynonym [SerifBoldSlanted] [SerifBoldItalic]
-
- \definefontsynonym [SerifCaps] [PalatinoSC]
-
-\stoptypescript
-
-\starttypescript [serif] [palatino] [texnansi,ec,8r]
-
- \definefontsynonym[PalatinoLT-Roman] [\typescriptthree-lte50001] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoLT-Italic] [\typescriptthree-lte50002] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoLT-Bold] [\typescriptthree-lte50003] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoLT-BoldItalic] [\typescriptthree-lte50004] [encoding=\typescriptthree]
-
- \definefontsynonym[PalatinoLT-Light] [\typescriptthree-lte52168] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoLT-LightItalic] [\typescriptthree-lte52169] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoLT-Medium] [\typescriptthree-lte52170] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoLT-MediumItalic] [\typescriptthree-lte52171] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoLT-Black] [\typescriptthree-lte52172] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoLT-BlackItalic] [\typescriptthree-lte52173] [encoding=\typescriptthree]
- \definefontsynonym[Palatino-BoldItalicOsF] [\typescriptthree-pobio] [encoding=\typescriptthree]
- \definefontsynonym[Palatino-BoldOsF] [\typescriptthree-pobos] [encoding=\typescriptthree]
- \definefontsynonym[Palatino-ItalicOsF] [\typescriptthree-poios] [encoding=\typescriptthree]
-
- \definefontsynonym[PalatinoSC] [\typescriptthree-posc] [encoding=\typescriptthree]
-
- \loadmapfile[\typescriptthree-linotype-palatino.map]
-
-\stoptypescript
-
-% palatino nova
-
-\starttypescript [serif] [palatino-nova] [name]
-
- \definefontsynonym [Serif] [PalatinoNova-Regular]
- \definefontsynonym [SerifItalic] [PalatinoNova-Italic]
- \definefontsynonym [SerifBold] [PalatinoNova-Bold]
- \definefontsynonym [SerifBoldItalic] [PalatinoNova-BoldItalic]
- \definefontsynonym [SerifSlanted] [PalatinoNova-Italic]
- \definefontsynonym [SerifBoldSlanted] [PalatinoNova-BoldItalic]
- \definefontsynonym [SerifCaps] [PalatinoNova-RegularSC]
-
- \definefontvariant [Serif][sc][Caps]
-
- \definefontsynonym [SerifCaps] [PalatinoNova-RegularSC]
- \definefontsynonym [SerifItalicCaps] [PalatinoNova-ItalicSC]
- \definefontsynonym [SerifBoldCaps] [PalatinoNova-BoldSC]
- \definefontsynonym [SerifBoldItalicCaps] [PalatinoNova-BoldItalicSC]
- \definefontsynonym [SerifSlantedCaps] [PalatinoNova-ItalicSC]
- \definefontsynonym [SerifBoldSlantedCaps] [PalatinoNova-BoldItalicSC]
- \definefontsynonym [SerifCapsCaps] [PalatinoNova-RegularSC]
-
-\stoptypescript
-
-\starttypescript [serif] [palatino-nova-light] [name] % may change
-
- \definefontsynonym [Serif] [PalatinoNova-Light]
- \definefontsynonym [SerifItalic] [PalatinoNova-LightItalic]
- \definefontsynonym [SerifBold] [PalatinoNova-Regular]
- \definefontsynonym [SerifBoldItalic] [PalatinoNova-Italic]
- \definefontsynonym [SerifSlanted] [PalatinoNova-Regular]
- \definefontsynonym [SerifBoldSlanted] [PalatinoNova-Italic]
- \definefontsynonym [SerifCaps] [PalatinoNova-LightSC]
-
-\stoptypescript
-
-\starttypescript [serif] [palatino-nova-medium] [name] % may change
-
- \definefontsynonym [Serif] [PalatinoNova-Medium]
- \definefontsynonym [SerifItalic] [PalatinoNova-MediumItalic]
- \definefontsynonym [SerifBold] [PalatinoNova-Bold]
- \definefontsynonym [SerifBoldItalic] [PalatinoNova-BoldItalic]
- \definefontsynonym [SerifSlanted] [PalatinoNova-Bold]
- \definefontsynonym [SerifBoldSlanted] [PalatinoNova-BoldItalic]
- \definefontsynonym [SerifCaps] [PalatinoNova-MediumSC]
-
-\stoptypescript
-
-\starttypescript [serif] [palatino-nova,palatino-nova-light,palatino-nova-medium] [texnansi,ec,8r]
-
- \definefontsynonym[PalatinoNova-Light] [\typescriptthree-PalatinoNova-Light] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoNova-LightItalic] [\typescriptthree-PalatinoNova-LightItalic] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoNova-Regular] [\typescriptthree-PalatinoNova-Regular] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoNova-Italic] [\typescriptthree-PalatinoNova-Italic] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoNova-Medium] [\typescriptthree-PalatinoNova-Medium] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoNova-MediumItalic][\typescriptthree-PalatinoNova-MediumItalic][encoding=\typescriptthree]
- \definefontsynonym[PalatinoNova-Bold] [\typescriptthree-PalatinoNova-Bold] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoNova-BoldItalic] [\typescriptthree-PalatinoNova-BoldItalic] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoNova-Imperial] [\typescriptthree-PalatinoNova-Imperial] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoNova-Titling] [\typescriptthree-PalatinoNova-Titling] [encoding=\typescriptthree]
-
- \definefontsynonym[PalatinoNova-LightSC] [\typescriptthree-sc-PalatinoNova-Light] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoNova-LightItalicSC] [\typescriptthree-sc-PalatinoNova-LightItalic] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoNova-RegularSC] [\typescriptthree-sc-PalatinoNova-Regular] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoNova-ItalicSC] [\typescriptthree-sc-PalatinoNova-Italic] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoNova-MediumSC] [\typescriptthree-sc-PalatinoNova-Medium] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoNova-MediumItalicSC][\typescriptthree-sc-PalatinoNova-MediumItalic][encoding=\typescriptthree]
- \definefontsynonym[PalatinoNova-BoldSC] [\typescriptthree-sc-PalatinoNova-Bold] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoNova-BoldItalicSC] [\typescriptthree-sc-PalatinoNova-BoldItalic] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoNova-ImperialSC] [\typescriptthree-sc-PalatinoNova-Imperial] [encoding=\typescriptthree]
- \definefontsynonym[PalatinoNova-TitlingSC] [\typescriptthree-sc-PalatinoNova-Titling] [encoding=\typescriptthree]
-
- \loadmapfile[\typescriptthree-linotype-palatino-nova.map]
- \loadmapfile[\typescriptthree-sc-linotype-palatino-nova.map]
-
-\stoptypescript
-
-% aldusnova
-
-\starttypescript [serif] [aldus-nova] [name]
-
- \definefontsynonym [Serif] [AldusNova-Book]
- \definefontsynonym [SerifItalic] [AldusNova-BookItalic]
- \definefontsynonym [SerifBold] [AldusNova-Bold]
- \definefontsynonym [SerifBoldItalic] [AldusNova-BoldItalic]
- \definefontsynonym [SerifSlanted] [AldusNova-BookItalic]
- \definefontsynonym [SerifBoldSlanted] [AldusNova-BoldItalic]
- \definefontsynonym [SerifCaps] [AldusNova-BookSC]
-
- \definefontvariant [Serif][sc][Caps]
-
- \definefontsynonym [SerifCaps] [AldusNova-BookSC]
- \definefontsynonym [SerifItalicCaps] [AldusNova-BookItalicSC]
- \definefontsynonym [SerifBoldCaps] [AldusNova-BoldSC]
- \definefontsynonym [SerifBoldItalicCaps] [AldusNova-BoldItalicSC]
- \definefontsynonym [SerifSlantedCaps] [AldusNova-BookItalicSC]
- \definefontsynonym [SerifBoldSlantedCaps] [AldusNova-BoldItalicSC]
- \definefontsynonym [SerifCapsCaps] [AldusNova-BookSC]
-
-\stoptypescript
-
-\starttypescript [serif] [aldus-nova] [texnansi,ec,8r]
-
- \definefontsynonym[AldusNova-Book] [\typescriptthree-AldusNova-Book] [encoding=\typescriptthree]
- \definefontsynonym[AldusNova-BookItalic] [\typescriptthree-AldusNova-BookItalic] [encoding=\typescriptthree]
- \definefontsynonym[AldusNova-Bold] [\typescriptthree-AldusNova-Bold] [encoding=\typescriptthree]
- \definefontsynonym[AldusNova-BoldItalic] [\typescriptthree-AldusNova-BoldItalic] [encoding=\typescriptthree]
-
- \definefontsynonym[AldusNova-BookSC] [\typescriptthree-sc-AldusNova-Book] [encoding=\typescriptthree]
- \definefontsynonym[AldusNova-BookItalicSC] [\typescriptthree-sc-AldusNova-BookItalic] [encoding=\typescriptthree]
- \definefontsynonym[AldusNova-BoldSC] [\typescriptthree-sc-AldusNova-Bold] [encoding=\typescriptthree]
- \definefontsynonym[AldusNova-BoldItalicSC] [\typescriptthree-sc-AldusNova-BoldItalic] [encoding=\typescriptthree]
-
- \loadmapfile[\typescriptthree-linotype-aldus-nova.map]
- \loadmapfile[\typescriptthree-sc-linotype-aldus-nova.map]
-
-\stoptypescript
-
-% melior
-
-\starttypescript [serif] [melior] [name]
-
- \definefontsynonym [MeliorLT-Roman] [MeliorLT]
-
- \definefontsynonym [Serif] [MeliorLT-Roman]
- \definefontsynonym [SerifItalic] [MeliorLT-Italic]
- \definefontsynonym [SerifBold] [MeliorLT-Bold]
- \definefontsynonym [SerifBoldItalic] [MeliorLT-BoldItalic]
-
- \definefontsynonym [SerifSlanted] [SerifItalic]
- \definefontsynonym [SerifBoldSlanted] [SerifBoldItalic]
-
- \definefontsynonym [SerifCaps] [Serif]
-
-\stoptypescript
-
-\starttypescript [serif] [melior] [texnansi,ec,8r]
-
- \definefontsynonym [MeliorLT] [texnansi-lte50062] [encoding=\typescriptthree]
- \definefontsynonym [MeliorLT-Italic] [texnansi-lte50063] [encoding=\typescriptthree]
- \definefontsynonym [MeliorLT-Bold] [texnansi-lte50064] [encoding=\typescriptthree]
- \definefontsynonym [MeliorLT-BoldItalic] [texnansi-lte50065] [encoding=\typescriptthree]
-
- \loadmapfile[\typescriptthree-linotype-melior.map]
-
-\stoptypescript
-
-\stoptypescriptcollection
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/type-hgz.mkii b/Master/texmf-dist/tex/context/base/type-hgz.mkii
deleted file mode 100644
index 4d3e495b065..00000000000
--- a/Master/texmf-dist/tex/context/base/type-hgz.mkii
+++ /dev/null
@@ -1 +0,0 @@
-\input type-ghz.mkii \endinput % can be file synonym
diff --git a/Master/texmf-dist/tex/context/base/type-imp-antykwa.mkiv b/Master/texmf-dist/tex/context/base/type-imp-antykwa.mkiv
deleted file mode 100644
index ba5895c8e4b..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-antykwa.mkiv
+++ /dev/null
@@ -1,228 +0,0 @@
-%D \module
-%D [ file=type-imp-antykwa,
-%D version=2010.06.21,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Antykwa Torunska,
-%D author=Mojca Miklavec \& Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\starttypescriptcollection[antykwa-torunska]
-
- \starttypescript [antykwa,antykwa-torunska,antykwa-torunska-light,antykwa-torunska-cond,antykwa-torunska-lightcond]
- \definetypeface[\typescriptone][\s!rm][\s!serif][\typescriptone] [\s!default]
- \definetypeface[\typescriptone][\s!ss][\s!sans] [modern] [\s!default] [\s!rscale=1.05]
- \definetypeface[\typescriptone][\s!tt][\s!mono] [modern] [\s!default] [\s!rscale=1.05]
- \definetypeface[\typescriptone][\s!mm][\s!math] [\typescriptone] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
- \starttypescript [\s!serif] [antykwa,antykwa-torunska,antykwa-torunska-light,antykwa-torunska-cond,antykwa-torunska-lightcond]
- \definefontsynonym [AntykwaTorunska-Regular] [\s!file:AntykwaTorunska-Regular] [\s!features=\s!default]
- \definefontsynonym [AntykwaTorunska-Italic] [\s!file:AntykwaTorunska-Italic] [\s!features=\s!default]
- \definefontsynonym [AntykwaTorunska-Bold] [\s!file:AntykwaTorunska-Bold] [\s!features=\s!default]
- \definefontsynonym [AntykwaTorunska-BoldItalic] [\s!file:AntykwaTorunska-BoldItalic] [\s!features=\s!default]
- \definefontsynonym [AntykwaTorunska-Light] [\s!file:AntykwaTorunskaLight-Regular] [\s!features=\s!default]
- \definefontsynonym [AntykwaTorunska-LightItalic] [\s!file:AntykwaTorunskaLight-Italic] [\s!features=\s!default]
- \definefontsynonym [AntykwaTorunska-Medium] [\s!file:AntykwaTorunskaMed-Regular] [\s!features=\s!default]
- \definefontsynonym [AntykwaTorunska-MedItalic] [\s!file:AntykwaTorunskaMed-Italic] [\s!features=\s!default]
- \definefontsynonym [AntykwaTorunska-CondRegular] [\s!file:AntykwaTorunskaCond-Regular] [\s!features=\s!default]
- \definefontsynonym [AntykwaTorunska-CondItalic] [\s!file:AntykwaTorunskaCond-Italic] [\s!features=\s!default]
- \definefontsynonym [AntykwaTorunska-CondBold] [\s!file:AntykwaTorunskaCond-Bold] [\s!features=\s!default]
- \definefontsynonym [AntykwaTorunska-CondBoldItalic] [\s!file:AntykwaTorunskaCond-BoldItalic] [\s!features=\s!default]
- \definefontsynonym [AntykwaTorunska-CondLight] [\s!file:AntykwaTorunskaCondLight-Regular] [\s!features=\s!default]
- \definefontsynonym [AntykwaTorunska-CondLightItalic] [\s!file:AntykwaTorunskaCondLight-Italic] [\s!features=\s!default]
- \definefontsynonym [AntykwaTorunska-CondMedium] [\s!file:AntykwaTorunskaCondMed-Regular] [\s!features=\s!default]
- \definefontsynonym [AntykwaTorunska-CondMedItalic] [\s!file:AntykwaTorunskaCondMed-Italic] [\s!features=\s!default]
-
- \definefontsynonym [AntykwaTorunska-Cap] [\s!file:AntykwaTorunska-Regular] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaTorunska-ItalicCap] [\s!file:AntykwaTorunska-Italic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaTorunska-BoldCap] [\s!file:AntykwaTorunska-Bold] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaTorunska-BoldItalicCap] [\s!file:AntykwaTorunska-BoldItalic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaTorunska-LightCap] [\s!file:AntykwaTorunskaLight-Regular] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaTorunska-LightItalicCap] [\s!file:AntykwaTorunskaLight-Italic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaTorunska-MediumCap] [\s!file:AntykwaTorunskaMed-Regular] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaTorunska-MedItalicCap] [\s!file:AntykwaTorunskaMed-Italic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaTorunska-CondCap] [\s!file:AntykwaTorunskaCond-Regular] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaTorunska-CondItalicCap] [\s!file:AntykwaTorunskaCond-Italic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaTorunska-CondBoldCap] [\s!file:AntykwaTorunskaCond-Bold] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaTorunska-CondBoldItalicCap] [\s!file:AntykwaTorunskaCond-BoldItalic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaTorunska-CondLightCap] [\s!file:AntykwaTorunskaCondLight-Regular] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaTorunska-CondLightItalicCap][\s!file:AntykwaTorunskaCondLight-Italic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaTorunska-CondMediumCap] [\s!file:AntykwaTorunskaCondMed-Regular] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaTorunska-CondMedItalicCap] [\s!file:AntykwaTorunskaCondMed-Italic] [\s!features=\s!smallcaps]
- \stoptypescript
-
- \starttypescript [\s!math][antykwa,antykwa-torunska][\s!all]
- \loadfontgoodies[antykwa-math]
- \definefontsynonym[\s!MathRoman][antykwamath@antykwa-math]
- \stoptypescript
-
- \starttypescript [\s!math][antykwa-torunska-light][\s!all]
- \loadfontgoodies[antykwa-math]
- \definefontsynonym[\s!MathRoman][antykwalightmath@antykwa-light-math]
- \stoptypescript
-
- \starttypescript [\s!math][antykwa-torunska-cond][\s!all]
- \loadfontgoodies[antykwa-math]
- \definefontsynonym[\s!MathRoman][antykwacondmath@antykwa-cond-math]
- \stoptypescript
-
- \starttypescript [\s!math][antykwa-torunska-lightcond][\s!all]
- \loadfontgoodies[antykwa-math]
- \definefontsynonym[\s!MathRoman][antykwalightcondmath@antykwa-lightcond-math]
- \stoptypescript
-
- \starttypescript [\s!serif] [antykwa,antykwa-torunska] [\s!name]
- \definefontsynonym [\s!Serif] [AntykwaTorunska-Regular]
- \definefontsynonym [\s!SerifBold] [AntykwaTorunska-Bold]
- \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-Italic]
- \definefontsynonym [\s!SerifSlanted] [AntykwaTorunska-Italic]
- \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-BoldItalic]
- \definefontsynonym [\s!SerifBoldSlanted] [AntykwaTorunska-BoldItalic]
- \definefontsynonym [\s!SerifCaps] [AntykwaTorunska-Cap]
- \stoptypescript
-
- \starttypescript [\s!serif] [antykwa-torunska-light] [\s!name]
- \definefontsynonym [\s!Serif] [AntykwaTorunska-Light]
- \definefontsynonym [\s!SerifBold] [AntykwaTorunska-Medium]
- \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-LightItalic]
- \definefontsynonym [\s!SerifSlanted] [AntykwaTorunska-LightItalic]
- \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-MedItalic]
- \definefontsynonym [\s!SerifBoldSlanted] [AntykwaTorunska-MedItalic]
- \definefontsynonym [\s!SerifCaps] [AntykwaTorunska-LightCap]
- \stoptypescript
-
- \starttypescript [\s!serif] [antykwa-torunska-cond] [\s!name]
- \definefontsynonym [\s!Serif] [AntykwaTorunska-CondRegular]
- \definefontsynonym [\s!SerifBold] [AntykwaTorunska-CondBold]
- \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-CondItalic]
- \definefontsynonym [\s!SerifSlanted] [AntykwaTorunska-CondItalic]
- \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-CondBoldItalic]
- \definefontsynonym [\s!SerifBoldSlanted] [AntykwaTorunska-CondBoldItalic]
- \definefontsynonym [\s!SerifCaps] [AntykwaTorunska-CondCap]
- \stoptypescript
-
- \starttypescript [\s!serif] [antykwa-torunska-lightcond] [\s!name]
- \definefontsynonym [\s!Serif] [AntykwaTorunska-CondLight]
- \definefontsynonym [\s!SerifBold] [AntykwaTorunska-CondMedium]
- \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-CondLightItalic]
- \definefontsynonym [\s!SerifSlanted] [AntykwaTorunska-CondLightItalic]
- \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-CondMedItalic]
- \definefontsynonym [\s!SerifBoldSlanted] [AntykwaTorunska-CondMedItalic]
- \definefontsynonym [\s!SerifCaps] [AntykwaTorunska-CondLightCap]
- \stoptypescript
-
- \starttypescript [\s!serif] [antykwa,antykwa-torunska] [\s!name]
- \definefontsynonym [SerifRegular] [Serif]
- \definefontsynonym [SerifRegularCaps] [AntykwaTorunska-Cap]
- \definefontsynonym [SerifBoldCaps] [AntykwaTorunska-BoldCap]
- \definefontsynonym [SerifItalicCaps] [AntykwaTorunska-ItalicCap]
- \definefontsynonym [SerifSlantedCaps] [AntykwaTorunska-ItalicCap]
- \definefontsynonym [SerifBoldItalicCaps] [AntykwaTorunska-BoldItalicCap]
- \definefontsynonym [SerifBoldSlantedCaps] [AntykwaTorunska-BoldItalicCap]
- \definefontsynonym [SerifCapsCaps] [AntykwaTorunska-Cap]
-
- \definefontsynonym [SerifRegularLight] [AntykwaTorunska-Light]
- \definefontsynonym [SerifBoldLight] [AntykwaTorunska-Medium]
- \definefontsynonym [SerifItalicLight] [AntykwaTorunska-LightItalic]
- \definefontsynonym [SerifSlantedLight] [AntykwaTorunska-LightItalic]
- \definefontsynonym [SerifBoldItalicLight] [AntykwaTorunska-MedItalic]
- \definefontsynonym [SerifBoldSlantedLight] [AntykwaTorunska-MedItalic]
- \definefontsynonym [SerifCapsLight] [AntykwaTorunska-LightCap]
-
- \definefontsynonym [SerifRegularCond] [AntykwaTorunska-CondRegular]
- \definefontsynonym [SerifBoldCond] [AntykwaTorunska-CondBold]
- \definefontsynonym [SerifItalicCond] [AntykwaTorunska-CondItalic]
- \definefontsynonym [SerifSlantedCond] [AntykwaTorunska-CondItalic]
- \definefontsynonym [SerifBoldItalicCond] [AntykwaTorunska-CondBoldItalic]
- \definefontsynonym [SerifBoldSlantedCond] [AntykwaTorunska-CondBoldItalic]
- \definefontsynonym [SerifCapsCond] [AntykwaTorunska-CondCap]
- \stoptypescript
-
- \starttypescript [\s!serif] [antykwa-torunska-light] [\s!name]
- \definefontsynonym [SerifRegular] [Serif]
- \definefontsynonym [SerifRegularCaps] [AntykwaTorunska-LightCap]
- \definefontsynonym [SerifBoldCaps] [AntykwaTorunska-MediumCap]
- \definefontsynonym [SerifItalicCaps] [AntykwaTorunska-LightItalicCap]
- \definefontsynonym [SerifSlantedCaps] [AntykwaTorunska-LightItalicCap]
- \definefontsynonym [SerifBoldItalicCaps] [AntykwaTorunska-MedItalicCap]
- \definefontsynonym [SerifBoldSlantedCaps] [AntykwaTorunska-MedItalicCap]
- \definefontsynonym [SerifCapsCaps] [AntykwaTorunska-LightCap]
-
- \definefontsynonym [SerifRegularDark] [AntykwaTorunska-Regular]
- \definefontsynonym [SerifBoldDark] [AntykwaTorunska-Bold]
- \definefontsynonym [SerifItalicDark] [AntykwaTorunska-Italic]
- \definefontsynonym [SerifSlantedDark] [AntykwaTorunska-Italic]
- \definefontsynonym [SerifBoldItalicDark] [AntykwaTorunska-BoldItalic]
- \definefontsynonym [SerifBoldSlantedDark] [AntykwaTorunska-BoldItalic]
- \definefontsynonym [SerifCapsDark] [AntykwaTorunska-Cap]
-
- \definefontsynonym [SerifRegularCond] [AntykwaTorunska-CondLight]
- \definefontsynonym [SerifBoldCond] [AntykwaTorunska-CondMedium]
- \definefontsynonym [SerifItalicCond] [AntykwaTorunska-CondLightItalic]
- \definefontsynonym [SerifSlantedCond] [AntykwaTorunska-CondLightItalic]
- \definefontsynonym [SerifBoldItalicCond] [AntykwaTorunska-CondMedItalic]
- \definefontsynonym [SerifBoldSlantedCond] [AntykwaTorunska-CondMedItalic]
- \definefontsynonym [SerifCapsCond] [AntykwaTorunska-CondLightCap]
- \stoptypescript
-
- \starttypescript [\s!serif] [antykwa-torunska-cond] [\s!name]
- \definefontsynonym [SerifRegular] [Serif]
- \definefontsynonym [SerifRegularCaps] [AntykwaTorunska-CondCap]
- \definefontsynonym [SerifBoldCaps] [AntykwaTorunska-CondBoldCap]
- \definefontsynonym [SerifItalicCaps] [AntykwaTorunska-CondItalicCap]
- \definefontsynonym [SerifSlantedCaps] [AntykwaTorunska-CondItalicCap]
- \definefontsynonym [SerifBoldItalicCaps] [AntykwaTorunska-CondBoldItalicCap]
- \definefontsynonym [SerifBoldSlantedCaps] [AntykwaTorunska-CondBoldItalicCap]
- \definefontsynonym [SerifCapsCaps] [AntykwaTorunska-CondCap]
-
- \definefontsynonym [SerifRegularLight] [AntykwaTorunska-CondLight]
- \definefontsynonym [SerifBoldLight] [AntykwaTorunska-CondMedium]
- \definefontsynonym [SerifItalicLight] [AntykwaTorunska-CondLightItalic]
- \definefontsynonym [SerifSlantedLight] [AntykwaTorunska-CondLightItalic]
- \definefontsynonym [SerifBoldItalicLight] [AntykwaTorunska-CondMedItalic]
- \definefontsynonym [SerifBoldSlantedLight] [AntykwaTorunska-CondMedItalic]
- \definefontsynonym [SerifCapsLight] [AntykwaTorunska-CondLightCap]
-
- \definefontsynonym [SerifRegularExp] [AntykwaTorunska-Regular]
- \definefontsynonym [SerifBoldExp] [AntykwaTorunska-Bold]
- \definefontsynonym [SerifItalicExp] [AntykwaTorunska-Italic]
- \definefontsynonym [SerifSlantedExp] [AntykwaTorunska-Italic]
- \definefontsynonym [SerifBoldItalicExp] [AntykwaTorunska-BoldItalic]
- \definefontsynonym [SerifBoldSlantedExp] [AntykwaTorunska-BoldItalic]
- \definefontsynonym [SerifCapsExp] [AntykwaTorunska-Cap]
- \stoptypescript
-
- \starttypescript [\s!serif] [antykwa-torunska-lightcond] [\s!name]
- \definefontsynonym [SerifRegular] [Serif]
- \definefontsynonym [SerifRegularCaps] [AntykwaTorunska-CondLightCap]
- \definefontsynonym [SerifBoldCaps] [AntykwaTorunska-CondMediumCap]
- \definefontsynonym [SerifItalicCaps] [AntykwaTorunska-CondLightItalicCap]
- \definefontsynonym [SerifSlantedCaps] [AntykwaTorunska-CondLightItalicCap]
- \definefontsynonym [SerifBoldItalicCaps] [AntykwaTorunska-CondMedItalicCap]
- \definefontsynonym [SerifBoldSlantedCaps] [AntykwaTorunska-CondMedItalicCap]
- \definefontsynonym [SerifCapsCaps] [AntykwaTorunska-CondLightCap]
-
- \definefontsynonym [SerifRegularDark] [AntykwaTorunska-CondRegular]
- \definefontsynonym [SerifBoldDark] [AntykwaTorunska-CondBold]
- \definefontsynonym [SerifItalicDark] [AntykwaTorunska-CondItalic]
- \definefontsynonym [SerifSlantedDark] [AntykwaTorunska-CondItalic]
- \definefontsynonym [SerifBoldItalicDark] [AntykwaTorunska-CondBoldItalic]
- \definefontsynonym [SerifBoldSlantedDark] [AntykwaTorunska-CondBoldItalic]
- \definefontsynonym [SerifCapsDark] [AntykwaTorunska-CondCap]
-
- \definefontsynonym [SerifRegularExp] [AntykwaTorunska-Light]
- \definefontsynonym [SerifBoldExp] [AntykwaTorunska-Medium]
- \definefontsynonym [SerifItalicExp] [AntykwaTorunska-LightItalic]
- \definefontsynonym [SerifSlantedExp] [AntykwaTorunska-LightItalic]
- \definefontsynonym [SerifBoldItalicExp] [AntykwaTorunska-MedItalic]
- \definefontsynonym [SerifBoldSlantedExp] [AntykwaTorunska-MedItalic]
- \definefontsynonym [SerifCapsExp] [AntykwaTorunska-LightCap]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-antykwapoltawskiego.mkiv b/Master/texmf-dist/tex/context/base/type-imp-antykwapoltawskiego.mkiv
deleted file mode 100644
index 5a4c1c4621c..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-antykwapoltawskiego.mkiv
+++ /dev/null
@@ -1,140 +0,0 @@
-%D \module
-%D [ file=type-imp-antykwa-poltawskiego,
-%D version=2010.06.21,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Antykwa Poltawskiego,
-%D author=Mojca Miklavec \& Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\starttypescriptcollection[antykwa-poltawskiego]
-
- % condensed and extended variants are still missing
-
- \starttypescript [antykwa-poltawskiego,antykwa-poltawskiego-light,antykwapoltawskiego,antykwapoltawskiego-light]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default]
- \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default] [\s!rscale=1.05]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.05]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default] [\s!rscale=1.05]
- \quittypescriptscanning
- \stoptypescript
-
- % names of "Caps" may still change
-
- \starttypescript [\s!serif] [antykwa-poltawskiego,antykwa-poltawskiego-light,antykwapoltawskiego,antykwapoltawskiego-light]
- \definefontsynonym [AntykwaPoltawskiego-Condensed-Light] [\s!file:antpoltltcond-regular] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-Condensed-LightItalic] [\s!file:antpoltltcond-italic] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-Condensed-Regular] [\s!file:antpoltcond-regular] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-Condensed-Italic] [\s!file:antpoltcond-italic] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-Condensed-Medium] [\s!file:antpoltltcond-bold] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-Condensed-MediumItalic] [\s!file:antpoltltcond-bolditalic] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-Condensed-Bold] [\s!file:antpoltcond-bold] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-Condensed-BoldItalic] [\s!file:antpoltcond-bolditalic] [\s!features=\s!default]
-
- \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsLight] [\s!file:antpoltltcond-regular] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsLightItalic] [\s!file:antpoltltcond-italic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsRegular] [\s!file:antpoltcond-regular] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsItalic] [\s!file:antpoltcond-italic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsMedium] [\s!file:antpoltltcond-bold] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsMediumItalic] [\s!file:antpoltltcond-bolditalic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsBold] [\s!file:antpoltcond-bold] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-Condensed-CapsBoldItalic] [\s!file:antpoltcond-bolditalic] [\s!features=\s!smallcaps]
-
- \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Light] [\s!file:antpoltltsemicond-regular] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-LightItalic] [\s!file:antpoltltsemicond-italic] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Regular] [\s!file:antpoltsemicond-regular] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Italic] [\s!file:antpoltsemicond-italic] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Medium] [\s!file:antpoltltsemicond-bold] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-MediumItalic] [\s!file:antpoltltsemicond-bolditalic] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-Bold] [\s!file:antpoltsemicond-bold] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-BoldItalic] [\s!file:antpoltsemicond-bolditalic] [\s!features=\s!default]
-
- \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsLight] [\s!file:antpoltltsemicond-regular] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsLightItalic] [\s!file:antpoltltsemicond-italic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsRegular] [\s!file:antpoltsemicond-regular] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsItalic] [\s!file:antpoltsemicond-italic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsMedium] [\s!file:antpoltltsemicond-bold] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsMediumItalic] [\s!file:antpoltltsemicond-bolditalic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsBold] [\s!file:antpoltsemicond-bold] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-SemiCondensed-CapsBoldItalic] [\s!file:antpoltsemicond-bolditalic] [\s!features=\s!smallcaps]
-
- \definefontsynonym [AntykwaPoltawskiego-Light] [\s!file:antpoltlt-regular] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-LightItalic] [\s!file:antpoltlt-italic] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-Regular] [\s!file:antpolt-regular] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-Italic] [\s!file:antpolt-italic] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-Medium] [\s!file:antpoltlt-bold] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-MediumItalic] [\s!file:antpoltlt-bolditalic] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-Bold] [\s!file:antpolt-bold] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-BoldItalic] [\s!file:antpolt-bolditalic] [\s!features=\s!default]
-
- \definefontsynonym [AntykwaPoltawskiego-CapsLight] [\s!file:antpoltcond-regular] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-CapsLightItalic] [\s!file:antpoltcond-italic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-CapsRegular] [\s!file:antpolt-regular] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-CapsItalic] [\s!file:antpolt-italic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-CapsMedium] [\s!file:antpoltcond-bold] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-CapsMediumItalic] [\s!file:antpoltcond-bolditalic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-CapsBold] [\s!file:antpolt-bold] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-CapsBoldItalic] [\s!file:antpolt-bolditalic] [\s!features=\s!smallcaps]
-
- \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-Light] [\s!file:antpoltltsemiexpd-regular] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-LightItalic] [\s!file:antpoltltsemiexpd-italic] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-Regular] [\s!file:antpoltsemiexpd-regular] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-Italic] [\s!file:antpoltsemiexpd-italic] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-Medium] [\s!file:antpoltltsemiexpd-bold] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-MediumItalic] [\s!file:antpoltltsemiexpd-bolditalic] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-Bold] [\s!file:antpoltsemiexpd-bold] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-BoldItalic] [\s!file:antpoltsemiexpd-bolditalic] [\s!features=\s!default]
-
- \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsLight] [\s!file:antpoltltsemiexpd-regular] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsLightItalic] [\s!file:antpoltltsemiexpd-italic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsRegular] [\s!file:antpoltsemiexpd-regular] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsItalic] [\s!file:antpoltsemiexpd-italic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsMedium] [\s!file:antpoltltsemiexpd-bold] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsMediumItalic] [\s!file:antpoltltsemiexpd-bolditalic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsBold] [\s!file:antpoltsemiexpd-bold] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-SemiExpanded-CapsBoldItalic] [\s!file:antpoltsemiexpd-bolditalic] [\s!features=\s!smallcaps]
-
- \definefontsynonym [AntykwaPoltawskiego-Expanded-Light] [\s!file:antpoltltexpd-regular] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-Expanded-LightItalic] [\s!file:antpoltltexpd-italic] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-Expanded-Regular] [\s!file:antpoltexpd-regular] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-Expanded-Italic] [\s!file:antpoltexpd-italic] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-Expanded-Medium] [\s!file:antpoltltexpd-bold] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-Expanded-MediumItalic] [\s!file:antpoltltexpd-bolditalic] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-Expanded-Bold] [\s!file:antpoltexpd-bold] [\s!features=\s!default]
- \definefontsynonym [AntykwaPoltawskiego-Expanded-BoldItalic] [\s!file:antpoltexpd-bolditalic] [\s!features=\s!default]
-
- \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsLight] [\s!file:antpoltltexpd-regular] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsLightItalic] [\s!file:antpoltltexpd-italic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsRegular] [\s!file:antpoltexpd-regular] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsItalic] [\s!file:antpoltexpd-italic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsMedium] [\s!file:antpoltltexpd-bold] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsMediumItalic] [\s!file:antpoltltexpd-bolditalic] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsBold] [\s!file:antpoltexpd-bold] [\s!features=\s!smallcaps]
- \definefontsynonym [AntykwaPoltawskiego-Expanded-CapsBoldItalic] [\s!file:antpoltexpd-bolditalic] [\s!features=\s!smallcaps]
- \stoptypescript
-
- \starttypescript [\s!serif] [antykwa-poltawskiego,antykwapoltawskiego] [\s!name]
- \definefontsynonym [\s!Serif] [AntykwaPoltawskiego-Regular]
- \definefontsynonym [\s!SerifBold] [AntykwaPoltawskiego-Bold]
- \definefontsynonym [\s!SerifItalic] [AntykwaPoltawskiego-Italic]
- \definefontsynonym [\s!SerifSlanted] [AntykwaPoltawskiego-Italic]
- \definefontsynonym [\s!SerifBoldItalic] [AntykwaPoltawskiego-BoldItalic]
- \definefontsynonym [\s!SerifBoldSlanted] [AntykwaPoltawskiego-BoldItalic]
- \definefontsynonym [\s!SerifCaps] [AntykwaPoltawskiego-CapsRegular]
- \stoptypescript
-
- \starttypescript [\s!serif] [antykwa-poltawskiego-light,antykwapoltawskiego-light] [\s!name]
- \definefontsynonym [\s!Serif] [AntykwaPoltawskiego-Light]
- \definefontsynonym [\s!SerifBold] [AntykwaPoltawskiego-Medium]
- \definefontsynonym [\s!SerifItalic] [AntykwaPoltawskiego-LightItalic]
- \definefontsynonym [\s!SerifSlanted] [AntykwaPoltawskiego-LightItalic]
- \definefontsynonym [\s!SerifBoldItalic] [AntykwaPoltawskiego-MediumItalic]
- \definefontsynonym [\s!SerifBoldSlanted] [AntykwaPoltawskiego-MediumItalic]
- \definefontsynonym [\s!SerifCaps] [AntykwaPoltawskiego-CapsLight]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-asana.mkiv b/Master/texmf-dist/tex/context/base/type-imp-asana.mkiv
deleted file mode 100644
index b87c969e2cf..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-asana.mkiv
+++ /dev/null
@@ -1,35 +0,0 @@
-%D \module
-%D [ file=type-imp-asana,
-%D version=2007.07.30,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Asana,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\loadtypescriptfile[texgyre]
-
-\starttypescriptcollection [asanamath]
-
- \starttypescript [\s!math] [asana]
- \definefontsynonym [AsanaMath] [\s!name:asanamath]
- \stoptypescript
-
- \starttypescript [\s!math] [asana] [\s!name]
- \loadfontgoodies[asana-math]
- \definefontsynonym [MathRoman] [AsanaMath] [\s!features=\s!math\mathsizesuffix,\s!goodies=asana-math]
- \stoptypescript
-
- \starttypescript[asana]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [palatino] [\s!default]
- \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default] [\s!rscale=1.075]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.075]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [\typescriptone] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-averia.mkiv b/Master/texmf-dist/tex/context/base/type-imp-averia.mkiv
deleted file mode 100644
index fd0ee7100ad..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-averia.mkiv
+++ /dev/null
@@ -1,90 +0,0 @@
-%D \module
-%D [ file=type-imp-averia,
-%D version=2012.04.24,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Averia fonts (iotic.com),
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D The fonts can be downloaded from the (nice looking) page:
-%D
-%D \starttyping
-%D http://iotic.com/averia
-%D \stoptyping
-%D
-%D This link was posted by Aditya on the ConTeXt mailing list.
-%D
-%D There is no monospace font yet.
-
-\starttypescriptcollection[averia]
-
- \starttypescript [\s!serif] [averia] [\s!name]
- \setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym [\s!Serif] [\s!file:averia-regular] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBold] [\s!file:averia-bold] [\s!features=\s!default]
- \definefontsynonym [\s!SerifItalic] [\s!file:averia-italic] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldItalic] [\s!file:averia-bolditalic] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!serif] [averiaserif] [\s!name]
- \setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym [\s!Serif] [\s!file:averiaserif-regular] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBold] [\s!file:averiaserif-bold] [\s!features=\s!default]
- \definefontsynonym [\s!SerifItalic] [\s!file:averiaserif-italic] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldItalic] [\s!file:averiaserif-bolditalic] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!serif] [averialight] [\s!name]
- \setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym [\s!Serif] [\s!file:averia-light] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBold] [\s!file:averia-regular] [\s!features=\s!default]
- \definefontsynonym [\s!SerifItalic] [\s!file:averia-lightitalic] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldItalic] [\s!file:averia-italic] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!serif] [averiaseriflight] [\s!name]
- \setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym [\s!Serif] [\s!file:averiaserif-light] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBold] [\s!file:averiaserif-regular] [\s!features=\s!default]
- \definefontsynonym [\s!SerifItalic] [\s!file:averiaserif-lightitalic] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldItalic] [\s!file:averiaserif-italic] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!sans] [averiasans] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [\s!file:averiasans-regular] [\s!features=\s!default]
- \definefontsynonym [\s!SansBold] [\s!file:averiasans-bold] [\s!features=\s!default]
- \definefontsynonym [\s!SansItalic] [\s!file:averiasans-italic] [\s!features=\s!default]
- \definefontsynonym [\s!SansBoldItalic] [\s!file:averiasans-bolditalic] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!sans] [averiasanslight] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [\s!file:averiasans-light] [\s!features=\s!default]
- \definefontsynonym [\s!SansBold] [\s!file:averiasans-regular] [\s!features=\s!default]
- \definefontsynonym [\s!SansItalic] [\s!file:averiasans-lightitalic] [\s!features=\s!default]
- \definefontsynonym [\s!SansBoldItalic] [\s!file:averiasans-italic] [\s!features=\s!default]
- \stoptypescript
-
- % todo: rscale
-
- \starttypescript[averia]
- \definetypeface [averia] [\s!rm] [\s!serif] [averiaserif] [\s!default]
- \definetypeface [averia] [\s!ss] [\s!sans] [averiasans] [\s!default]
- \definetypeface [averia] [\s!tt] [\s!mono] [dejavu] [\s!default] [\s!rscale=0.850]
- \definetypeface [averia] [\s!mm] [\s!math] [times] [\s!default] [\s!rscale=1.025]
- \stoptypescript
-
- \starttypescript[averialight]
- \definetypeface [averialight] [\s!rm] [\s!serif] [averiaseriflight] [\s!default]
- \definetypeface [averialight] [\s!ss] [\s!sans] [averiasanslight] [\s!default]
- \definetypeface [averialight] [\s!tt] [\s!mono] [dejavu] [\s!default] [\s!rscale=0.850]
- \definetypeface [averialight] [\s!mm] [\s!math] [times] [\s!default] [\s!rscale=1.025]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-buy.mkiv b/Master/texmf-dist/tex/context/base/type-imp-buy.mkiv
deleted file mode 100644
index dbfffe57ca1..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-buy.mkiv
+++ /dev/null
@@ -1,135 +0,0 @@
-%D \module
-%D [ file=type-buy,
-%D version=2003.07.08, % 2001.04.12,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=A Few Commercial Fonts,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% monotype sabon
-
-\starttypescriptcollection[sabon]
-
- \starttypescript [serif] [sabon] [name]
- %
- \definefontsynonym [Serif] [SabonMT]
- \definefontsynonym [SerifItalic] [SabonMT-Italic]
- \definefontsynonym [SerifSlanted] [SabonMT-Italic]
- \definefontsynonym [SerifBold] [SabonMT-SemiBold]
- \definefontsynonym [SerifBoldItalic] [SabonMT-SemiBoldItalic]
- \definefontsynonym [SerifBoldSlanted][SabonMT-SemiBoldItalic]
- \definefontsynonym [SerifCaps] [SabonMT-RegularSC]
- %
- \definefontsynonym[SabonMT] [sab_____]
- \definefontsynonym[SabonMT-Italic] [sabi____]
- \definefontsynonym[SabonMT-ItalicOsF] [saboi___]
- \definefontsynonym[SabonMT-SemiBoldOsF] [sabos___]
- \definefontsynonym[SabonMT-SemiBold] [sabs____]
- \definefontsynonym[SabonMT-RegularSC] [sabsc___]
- \definefontsynonym[SabonMT-SemiBoldItalic] [sabsi___]
- \definefontsynonym[SabonMT-SemiBoldItalicOsF][sasio___]
- %
- \stoptypescript
-
-\stoptypescriptcollection
-
-% itc stone
-
-\starttypescriptcollection[stone]
-
- \starttypescript [sans] [stone] [name]
- %
- \definefontsynonym [Sans] [StoneSansITC-Medium]
- \definefontsynonym [SansItalic] [StoneSansITC-MediumItalic]
- \definefontsynonym [SansSlanted] [StoneSansITC-MediumItalic]
- \definefontsynonym [SansBold] [StoneSansITC-Bold]
- \definefontsynonym [SansBoldItalic] [StoneSansITC-BoldItalic]
- \definefontsynonym [SansBoldSlanted][StoneSansITC-BoldItalic]
- \definefontsynonym [SansCaps] [StoneSansSCITC-Medium]
- %
- \definefontsynonym[StoneSansITC-Bold] [stosnb]
- \definefontsynonym[StoneSansITC-BoldItalic] [stosnbi]
- \definefontsynonym[StoneSansITC-Medium] [stosnm]
- \definefontsynonym[StoneSansITC-MediumItalic][stosnmi]
- \definefontsynonym[StoneSansSemITC-Semi] [stosns]
- \definefontsynonym[StoneSansSemITC-SemiIta] [stosnsi]
- \definefontsynonym[StoneSansSCITC-Medium] [stosnscm]
- \definefontsynonym[StoneSansSemSCITC-Semi] [stosnscs]
- %
- \stoptypescript
-
- \starttypescript [serif] [stone] [name]
- %
- \definefontsynonym [Serif] [StoneSerifITC-Medium]
- \definefontsynonym [SerifItalic] [StoneSerifITC-MediumItalic]
- \definefontsynonym [SerifSlanted] [StoneSerifITC-MediumItalic]
- \definefontsynonym [SerifBold] [StoneSerifITC-Bold]
- \definefontsynonym [SerifBoldItalic] [StoneSerifITC-BoldItalic]
- \definefontsynonym [SerifBoldSlanted][StoneSerifITC-BoldItalic]
- \definefontsynonym [SerifCaps] [StoneSerifSCITC-Medium]
- %
- \definefontsynonym[StoneSerifITC-Bold] [stosfb]
- \definefontsynonym[StoneSerifITC-BoldItalic] [stosfbi]
- \definefontsynonym[StoneSerifITC-Medium] [stosfm]
- \definefontsynonym[StoneSerifITC-MediumItalic][stosfmi]
- \definefontsynonym[StoneSerifSemITC-Semi] [stosfs]
- \definefontsynonym[StoneSerifSemITC-SemiIta] [stosfsi]
- \definefontsynonym[StoneSerifSCITC-Medium] [stosfscm]
- \definefontsynonym[StoneSerifSemSCITC-Semi] [stosfscs]
- %
- \stoptypescript
-
- \starttypescript [sans] [stone-oldstyle] [name]
- %
- \definefontsynonym [Sans] [StoneSansOSITC-Medium]
- \definefontsynonym [SansItalic] [StoneSansOSITC-MediumItalic]
- \definefontsynonym [SansSlanted] [StoneSansOSITC-MediumItalic]
- \definefontsynonym [SansBold] [StoneSansOSITC-Bold]
- \definefontsynonym [SansBoldItalic] [StoneSansOSITC-BoldItalic]
- \definefontsynonym [SansBoldSlanted][StoneSansOSITC-BoldItalic]
- \definefontsynonym [SansCaps] [StoneSansSCITC-Medium]
- %
- \definefontsynonym[StoneSansOSITC-Bold] [stosnob]
- \definefontsynonym[StoneSansOSITC-BoldItalic] [stosnobi]
- \definefontsynonym[StoneSansOSITC-Medium] [stosnom]
- \definefontsynonym[StoneSansOSITC-MediumItalic][stosnomi]
- \definefontsynonym[StoneSansSemOSITC-Semi] [stosnos]
- \definefontsynonym[StoneSansSemOSITC-SemiIta] [stosnosi]
- %
- \stoptypescript
-
- \starttypescript [serif] [stone-oldstyle] [name]
- %
- \definefontsynonym [Serif] [StoneSerifOSITC-Medium]
- \definefontsynonym [SerifItalic] [StoneSerifOSITC-MediumItalic]
- \definefontsynonym [SerifSlanted] [StoneSerifOSITC-MediumItalic]
- \definefontsynonym [SerifBold] [StoneSerifOSITC-Bold]
- \definefontsynonym [SerifBoldItalic] [StoneSerifOSITC-BoldItalic]
- \definefontsynonym [SerifBoldSlanted] [StoneSerifOSITC-BoldItalic]
- \definefontsynonym [SerifCaps] [StoneSerifSCITC-Medium]
- %
- \definefontsynonym[StoneSerifOSITC-Bold] [stosfob]
- \definefontsynonym[StoneSerifOSITC-BoldItalic] [stosfobi]
- \definefontsynonym[StoneSerifOSITC-Medium] [stosfom]
- \definefontsynonym[StoneSerifOSITC-MediumItalic][stosfomi]
- \definefontsynonym[StoneSerifSemOSITC-Semi] [stosfos]
- \definefontsynonym[StoneSerifSemOSITC-SemiIta] [stosfosi]
- %
- \stoptypescript
-
-\stoptypescriptcollection
-
-% linotype industria
-
-\starttypescriptcollection[industria]
-
- \starttypescript [sans] [industria] [name]
- \definefontsynonym[Industria-Solid][lt_50545]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-cambria.mkiv b/Master/texmf-dist/tex/context/base/type-imp-cambria.mkiv
deleted file mode 100644
index 9bfa2ee5c49..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-cambria.mkiv
+++ /dev/null
@@ -1,77 +0,0 @@
-%D \module
-%D [ file=type-imp-cambria,
-%D version=2007.07.30,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Microsoft Cambria,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 use Dejavu as it covers wider range of monospaced glyphs.
-
-\loadtypescriptfile[dejavu]
-
-\starttypescriptcollection[cambria]
-
- % microsoft: cambria.ttc cambriab.ttf cambriai.ttf cambriaz.ttf
- % ascender : cambmath.ttf cambria.ttf cambriab.ttf cambriai.ttf cambriaz.ttf
-
- \starttypescript [\s!math,\s!serif] [cambria,cambria-x,cambria-y]
- % whatever matches
- \definefontsynonym [CambriaMath] [\s!name:cambriamath]
- \definefontsynonym [CambriaSerif] [\s!name:cambria]
- \stoptypescript
- \starttypescript [\s!math,\s!serif] [cambria-m]
- % microsoft cabria
- \definefontsynonym [CambriaMath] [\s!file:cambria.ttc(Cambria Math)]
- \definefontsynonym [CambriaSerif] [\s!file:cambria.ttc(Cambria)]
- \stoptypescript
- \starttypescript [\s!math,\s!serif] [cambria-a]
- % ascender cambria
- \definefontsynonym [CambriaMath] [\s!file:cambmath.ttf]
- \definefontsynonym [CambriaSerif] [\s!file:cambria.ttf]
- \stoptypescript
-
- % We load a goodies file that will apply a patch to the font. As a demonstration
- % we apply the patch when caching as as when scaling which is why we also specify
- % the goodies file with the name.
-
- \starttypescript [\s!math] [cambria,cambria-m,cambria-a] [\s!name]
- \loadfontgoodies[cambria-math]
- \definefontsynonym [\s!MathRoman] [CambriaMath] [\s!features=\s!math\mathsizesuffix,\s!goodies=cambria-math]
- \stoptypescript
- \starttypescript [\s!math] [cambria-x] [\s!name]
- \loadfontgoodies[cambria-math]
- \definefontsynonym [\s!MathRoman] [CambriaMath] [\s!features=\s!math,\s!goodies=cambria-math]
- \stoptypescript
- \starttypescript [\s!math] [cambria-y] [\s!name]
- \loadfontgoodies[cambria-math]
- \definefontsynonym [\s!MathRoman] [CambriaMath] [\s!features=\s!math-nostack\mathsizesuffix,\s!goodies=cambria-math]
- \stoptypescript
-
- \starttypescript [\s!serif] [cambria,cambria-m,cambria-a] [\s!name]
- \setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym [\s!Serif] [CambriaSerif] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBold] [\s!name:cambriabold] [\s!features=\s!default]
- \definefontsynonym [\s!SerifItalic] [\s!name:cambriaitalic] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldItalic] [\s!name:cambriabolditalic] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [cambria,cambria-m,cambria-a]
- % any
- \definetypeface [cambria] [\s!rm] [\s!serif] [\typescriptone] [\s!default]
- \definetypeface [cambria] [\s!tt] [\s!mono] [dejavu] [\s!default]
- \definetypeface [cambria] [\s!mm] [\s!math] [\typescriptone] [\s!default]
- \stoptypescript
- \starttypescript [cambria-x,cambria-y]
- % test x
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [cambria] [\s!default]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [\typescriptone] [\s!default]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-charter.mkiv b/Master/texmf-dist/tex/context/base/type-imp-charter.mkiv
deleted file mode 100644
index b788a974e56..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-charter.mkiv
+++ /dev/null
@@ -1,36 +0,0 @@
-%D \module
-%D [ file=type-imp-charter,
-%D version=2007.07.30,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Charter,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\starttypescriptcollection[charter]
-
- \starttypescript [\s!serif] [charter]
- \definefontsynonym [Charter-Roman] [\s!name:CharterBT-Roman]
- \definefontsynonym [Charter-Italic] [\s!name:CharterBT-Italic]
- \definefontsynonym [Charter-Bold] [\s!name:CharterBT-Bold]
- \definefontsynonym [Charter-BoldItalic] [\s!name:CharterBT-BoldItalic]
- \definefontsynonym [Charter-Slanted] [\s!name:CharterBT-Italic]
- \definefontsynonym [Charter-BoldSlanted] [\s!name:CharterBT-BoldItalic]
- \definefontsynonym [Charter-Roman-Caps] [Charter-Roman]
- \stoptypescript
-
- \starttypescript [\s!serif] [charter] [\s!name]
- \definefontsynonym [Serif] [Charter-Roman]
- \definefontsynonym [SerifItalic] [Charter-Italic]
- \definefontsynonym [SerifBold] [Charter-Bold]
- \definefontsynonym [SerifBoldItalic] [Charter-BoldItalic]
- \definefontsynonym [SerifSlanted] [Charter-Slanted]
- \definefontsynonym [SerifBoldSlanted] [Charter-BoldSlanted]
- \definefontsynonym [SerifCaps] [Charter-Roman-Caps]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-cleartype.mkiv b/Master/texmf-dist/tex/context/base/type-imp-cleartype.mkiv
deleted file mode 100644
index b2f1b21a5b6..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-cleartype.mkiv
+++ /dev/null
@@ -1,56 +0,0 @@
-%D \module
-%D [ file=type-imp-cleartype,
-%D version=2007.07.30,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Microsoft Cleartype,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\starttypescriptcollection[cleartype]
-
- \starttypescript [\s!sans] [candara] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [\s!file:candara] [\s!features=\s!default]
- \definefontsynonym [\s!SansBold] [\s!file:candarab] [\s!features=\s!default]
- \definefontsynonym [\s!SansItalic] [\s!file:candarai] [\s!features=\s!default]
- \definefontsynonym [\s!SansBoldItalic] [\s!file:candaraz] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!mono] [consolas] [\s!name]
- \setups[\s!font:\s!fallback:\s!mono]
- \definefontsynonym [\s!Mono] [\s!file:consola] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBold] [\s!file:consolab] [\s!features=\s!none]
- \definefontsynonym [\s!MonoItalic] [\s!file:consolai] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBoldItalic] [\s!file:consolaz] [\s!features=\s!none]
- \stoptypescript
-
- \starttypescript [\s!serif] [constantia] [\s!name]
- \setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym [\s!Serif] [\s!file:constan] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBold] [\s!file:constanb] [\s!features=\s!default]
- \definefontsynonym [\s!SerifItalic] [\s!file:constani] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldItalic] [\s!file:constanz] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!sans] [corbel] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [\s!file:corbel] [\s!features=\s!default]
- \definefontsynonym [\s!SansBold] [\s!file:corbelb] [\s!features=\s!default]
- \definefontsynonym [\s!SansItalic] [\s!file:corbeli] [\s!features=\s!default]
- \definefontsynonym [\s!SansBoldItalic] [\s!file:corbelz] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!sans] [calibri] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [\s!file:calibri] [\s!features=\s!default]
- \definefontsynonym [\s!SansBold] [\s!file:calibrib] [\s!features=\s!default]
- \definefontsynonym [\s!SansItalic] [\s!file:calibrii] [\s!features=\s!default]
- \definefontsynonym [\s!SansBoldItalic] [\s!file:calibriz] [\s!features=\s!default]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-computer-modern-unicode.mkiv b/Master/texmf-dist/tex/context/base/type-imp-computer-modern-unicode.mkiv
deleted file mode 100644
index 0789b922e63..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-computer-modern-unicode.mkiv
+++ /dev/null
@@ -1,64 +0,0 @@
-%D \module
-%D [ file=type-computer-modern-unicode,
-%D version=2007.07.30, % moved from type-otf
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Computer Modern Unicode,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\starttypescriptcollection[computer-modern-unicode]
-
- \definefontfeature[default-slanted-concrete][default][slant=.2]
- \definefontfeature[none-slanted-concrete] [none] [slant=.2]
-
- \starttypescript [\s!serif] [computer-modern-unicode]
- \definefontsynonym [\s!Serif] [\s!file:cmunrm] [\s!features=\s!default]
- \definefontsynonym [\s!SerifItalic] [\s!file:cmunti] [\s!features=\s!default]
- \definefontsynonym [\s!SerifSlanted] [\s!file:cmunsl] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBold] [\s!file:cmunbx] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldItalic] [\s!file:cmunbi] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldSlanted][\s!SerifBoldItalic]
- \stoptypescript
-
- \starttypescript [\s!serif] [computer-modern-unicode-concrete]
- \definefontsynonym [\s!Serif] [\s!file:cmunorm] [\s!features=\s!default]
- \definefontsynonym [\s!SerifItalic] [\s!file:cmunoti] [\s!features=\s!default]
- \definefontsynonym [\s!SerifSlanted] [\s!file:cmunorm] [\s!features=default-slanted-concrete]
- \definefontsynonym [\s!SerifBold] [\s!file:cmunobx] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldItalic] [\s!file:cmunobi] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldSlanted][\s!file:cmunobx] [\s!features=default-slanted-concrete]
- \stoptypescript
-
- \starttypescript [\s!sans] [computer-modern-unicode,computer-modern-unicode-concrete]
- \definefontsynonym [\s!Sans] [\s!file:cmunss] [\s!features=\s!default]
- \definefontsynonym [\s!SansItalic] [\s!file:cmunsi] [\s!features=\s!default]
- \definefontsynonym [\s!SansSlanted] [\s!file:cmunss] [\s!features=default-slanted-concrete]
- \definefontsynonym [\s!SansBold] [\s!file:cmunsx] [\s!features=\s!default]
- \definefontsynonym [\s!SansBoldItalic] [\s!file:cmunso] [\s!features=\s!default]
- \definefontsynonym [\s!SansBoldSlanted] [\s!file:cmunsx] [\s!features=default-slanted-concrete]
- \stoptypescript
-
- \starttypescript [\s!mono] [computer-modern-unicode,computer-modern-unicode-concrete]
- \definefontsynonym [\s!Mono] [\s!file:cmuntt] [\s!features=\s!none]
- \definefontsynonym [\s!MonoItalic] [\s!file:cmunit] [\s!features=\s!none]
- \definefontsynonym [\s!MonoSlanted] [\s!file:cmunst] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBold] [\s!file:cmuntb] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBoldItalic] [\s!file:cmuntx] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBoldSlanted] [\s!file:cmuntb] [\s!features=none-slanted-concrete]
- \stoptypescript
-
- \starttypescript[computer-modern-unicode,computer-modern-unicode-concrete]
- \definetypeface[\typescriptone][\s!rm][\s!serif][\typescriptone] [\s!default]
- \definetypeface[\typescriptone][\s!ss][\s!sans] [computer-modern-unicode][\s!default]
- \definetypeface[\typescriptone][\s!tt][\s!mono] [computer-modern-unicode][\s!default]
- \definetypeface[\typescriptone][\s!mm][\s!math] [modern] [\s!default]
- \stoptypescript
-
-\stoptypescriptcollection
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/type-imp-cow.mkiv b/Master/texmf-dist/tex/context/base/type-imp-cow.mkiv
deleted file mode 100644
index f93e36428c0..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-cow.mkiv
+++ /dev/null
@@ -1,85 +0,0 @@
-%D \module
-%D [ file=type-cow,
-%D version=2006.06.23,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Cow Fonts,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D The cow fonts are a project of Duane Bibby, Hans Hagen and Taco
-%D Hoekwater.
-
-\starttypescriptcollection[cow]
-
-\starttypescript [math,serif] [cow,sheep]
- \setups[font:fallback:serif]
- % \usemathcollection[cow]
- \loadmapfile[koeieletters.map]
- \definefontsynonym [Serif] [Cows]
- \definefontsynonym [SerifContour] [CowsContour]
- \definefontsynonym [SerifLogo] [CowsLogo]
- \definefontsynonym [SerifLogoContour][CowsLogoContour]
- \definefontsynonym [MathRoman] [CowsMathRoman]
- \definefontsynonym [MathItalic] [CowsMathItalic]
- \definefontsynonym [MathSymbol] [CowsMathSymbol]
- \definefontsynonym [MathExtension] [CowsMathExtensions]
-\stoptypescript
-
-\starttypescript [math,serif] [sheep]
- \setups[font:fallback:serif]
- % \usemathcollection[cow]
- \loadmapfile[koeieletters.map]
- \definefontsynonym [Serif] [Sheep]
- \definefontsynonym [SerifContour] [SheepContour]
- \definefontsynonym [SerifLogo] [SheepLogo]
- \definefontsynonym [SerifLogoContour][SheepLogoContour]
- \definefontsynonym [MathRoman] [SheepMathRoman]
- \definefontsynonym [MathItalic] [SheepMathItalic]
- \definefontsynonym [MathSymbol] [SheepMathSymbol]
- \definefontsynonym [MathExtension] [SheepMathExtensions]
-\stoptypescript
-
-\starttypescript [all] [cow,sheep]
- \definefontsynonym [Cows] [koeielett]
- \definefontsynonym [CowsContour] [koeielett-contour]
- \definefontsynonym [CowsLogo] [koeielogos]
- \definefontsynonym [CowsLogoContour] [koeielogos-contour]
- \definefontsynonym [CowsMathRoman] [koeielett]
- \definefontsynonym [CowsMathItalic] [koeieletter-mi]
- \definefontsynonym [CowsMathSymbol] [koeieletter-sy]
- \definefontsynonym [CowsMathExtensions][koeieletter-ex]
-\stoptypescript
-
-\starttypescript [all] [sheep]
- \definefontsynonym [Sheep] [koeielett]
- \definefontsynonym [SheepContour] [koeielett-contour]
- \definefontsynonym [SheepLogo] [koeielogos]
- \definefontsynonym [SheepLogoContour] [koeielogos-contour]
- \definefontsynonym [SheepMathRoman] [koeielettx]
- \definefontsynonym [SheepMathItalic] [koeieletter-mi]
- \definefontsynonym [SheepMathSymbol] [koeieletter-syx]
- \definefontsynonym [SheepMathExtensions][koeieletter-ex]
-\stoptypescript
-
-\starttypescript [cow]
- \definetypeface [cow][rm][serif][cow] [default]
- \definetypeface [cow][ss][serif][cow] [default]
- \definetypeface [cow][mm][math] [cow] [default]
- \definetypeface [cow][tt][mono] [modern][default][rscale=0.85]
-\stoptypescript
-
-\starttypescript [sheep]
- \definetypeface [sheep][rm][serif][sheep] [default]
- \definetypeface [sheep][ss][serif][sheep] [default]
- \definetypeface [sheep][mm][math] [sheep] [default]
- \definetypeface [sheep][tt][mono] [modern][default][rscale=0.85]
-\stoptypescript
-
-\stoptypescriptcollection
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/type-imp-dejavu.mkiv b/Master/texmf-dist/tex/context/base/type-imp-dejavu.mkiv
deleted file mode 100644
index 41cf1f701e3..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-dejavu.mkiv
+++ /dev/null
@@ -1,106 +0,0 @@
-%D \module
-%D [ file=type-imp-dejavu,
-%D version=2010.06.21,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Dejavu fonts (dejavu-fonts.org),
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\definefontfeature[dejavu-condensed-mono][extend=.8]
-
-\starttypescriptcollection[dejavu]
-
- \starttypescript [\s!serif] [dejavu] [\s!name]
- \setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym [\s!Serif] [\s!name:dejavuserif] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBold] [\s!name:dejavuserifbold] [\s!features=\s!default]
- \definefontsynonym [\s!SerifItalic] [\s!name:dejavuserifitalic] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldItalic] [\s!name:dejavuserifbolditalic] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!sans] [dejavu] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [\s!name:dejavusans] [\s!features=\s!default]
- \definefontsynonym [\s!SansBold] [\s!name:dejavusansbold] [\s!features=\s!default]
- \definefontsynonym [\s!SansItalic] [\s!name:dejavusansoblique] [\s!features=\s!default]
- \definefontsynonym [\s!SansBoldItalic] [\s!name:dejavusansboldoblique] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!mono] [dejavu] [\s!name]
- \setups[\s!font:\s!fallback:\s!mono]
- \definefontsynonym [\s!Mono] [\s!name:dejavusansmono] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBold] [\s!name:dejavusansmonobold] [\s!features=\s!none]
- \definefontsynonym [\s!MonoItalic] [\s!name:dejavusansmonooblique] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBoldItalic] [\s!name:dejavusansmonoboldoblique] [\s!features=\s!none]
- \stoptypescript
-
- \starttypescript [\s!math][dejavu][\s!name]
- %\loadfontgoodies[dejavu]
- \definefontsynonym[\s!MathRoman][file:dejavu-math.otf][\s!features=\s!math\mathsizesuffix]
- \stoptypescript
-
- \starttypescript[dejavu]
- \definetypeface [dejavu] [\s!rm] [\s!serif] [dejavu] [\s!default]
- \definetypeface [dejavu] [\s!ss] [\s!sans] [dejavu] [\s!default]
- \definetypeface [dejavu] [\s!tt] [\s!mono] [dejavu] [\s!default]
-% \definetypeface [dejavu] [\s!mm] [\s!math] [xits] [\s!default] [\s!rscale=1.2]
- \definetypeface [dejavu] [\s!mm] [\s!math] [dejavu] [\s!default]
- \stoptypescript
-
- \starttypescript[dejavubidi]
- \definetypeface [dejavu] [\s!rm] [\s!serif] [dejavu] [\s!default]
- \definetypeface [dejavu] [\s!ss] [\s!sans] [dejavu] [\s!default]
- \definetypeface [dejavu] [\s!tt] [\s!mono] [dejavu] [\s!default]
- \definetypeface [dejavu] [\s!mm] [\s!math] [xitsbidi] [\s!default] [\s!rscale=1.2]
- \stoptypescript
-
- \starttypescript [\s!serif] [dejavu-condensed] [\s!name]
- \setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym [\s!Serif] [\s!name:dejavuserifcondensed] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBold] [\s!name:dejavuserifcondensedbold] [\s!features=\s!default]
- \definefontsynonym [\s!SerifItalic] [\s!name:dejavuserifcondenseditalic] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldItalic] [\s!name:dejavuserifcondensedbolditalic] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!sans] [dejavu-condensed] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [\s!name:dejavusanscondensed] [\s!features=\s!default]
- \definefontsynonym [\s!SansBold] [\s!name:dejavusanscondensedbold] [\s!features=\s!default]
- \definefontsynonym [\s!SansItalic] [\s!name:dejavusanscondensedoblique] [\s!features=\s!default]
- \definefontsynonym [\s!SansBoldItalic] [\s!name:dejavusanscondensedboldoblique] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!mono] [dejavu-condensed] [\s!name]
- \setups[\s!font:\s!fallback:\s!mono]
- % \definefontsynonym [\s!Mono] [\s!name:dejavusansmonocondensed] [\s!features=\s!none]
- % \definefontsynonym [\s!MonoBold] [\s!name:dejavusansmonoboldcondensed] [\s!features=\s!none]
- % \definefontsynonym [\s!MonoItalic] [\s!name:dejavusansmonoobliquecondensed] [\s!features=\s!none]
- % \definefontsynonym [\s!MonoBoldItalic] [\s!name:dejavusansmonoboldobliquecondensed] [\s!features=\s!none]
- \definefontsynonym [\s!Mono] [\s!name:dejavusansmono] [\s!features=dejavu-condensed-mono]
- \definefontsynonym [\s!MonoBold] [\s!name:dejavusansmonobold] [\s!features=dejavu-condensed-mono]
- \definefontsynonym [\s!MonoItalic] [\s!name:dejavusansmonooblique] [\s!features=dejavu-condensed-mono]
- \definefontsynonym [\s!MonoBoldItalic] [\s!name:dejavusansmonoboldoblique] [\s!features=dejavu-condensed-mono]
- \stoptypescript
-
- % \starttypescript [\s!mono] [dejavu-condensed] [\s!name]
- % \setups[\s!font:\s!fallback:\s!mono]
- % \definefontsynonym [\s!Mono] [\s!name:dejavusansmono] [\s!features=\s!none]
- % \definefontsynonym [\s!MonoBold] [\s!name:dejavusansmonobold] [\s!features=\s!none]
- % \definefontsynonym [\s!MonoItalic] [\s!name:dejavusansmonooblique] [\s!features=\s!none]
- % \definefontsynonym [\s!MonoBoldItalic] [\s!name:dejavusansmonoboldoblique] [\s!features=\s!none]
- % \stoptypescript
-
- \starttypescript[dejavu-condensed]
- \definetypeface [dejavu-condensed] [\s!rm] [\s!serif] [dejavu-condensed] [\s!default]
- \definetypeface [dejavu-condensed] [\s!ss] [\s!sans] [dejavu-condensed] [\s!default]
- \definetypeface [dejavu-condensed] [\s!tt] [\s!mono] [dejavu-condensed] [\s!default]
-% \definetypeface [dejavu-condensed] [\s!mm] [\s!math] [xits] [\s!default] [\s!rscale=1.2]
- \definetypeface [dejavu-condensed] [\s!mm] [\s!math] [dejavu] [\s!default]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-ebgaramond.mkiv b/Master/texmf-dist/tex/context/base/type-imp-ebgaramond.mkiv
deleted file mode 100644
index 838654d49cd..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-ebgaramond.mkiv
+++ /dev/null
@@ -1,45 +0,0 @@
-%D \module
-%D [ file=type-imp-ebgaramond,
-%D version=2013.06.22,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=EB Garamond,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\definefontfeature
- [eb-garamond-normal]
- [default]
- [mode=node,ccmp=yes,calt=yes,
- liga=yes,dlig=yes,hlig=yes,
- kern=yes,mark=yes,mkmk=yes,
- onum=yes,pnum=yes,salt=yes,
- script=latn]
-
-\definefontfeature
- [eb-garamond-smallcaps]
- [eb-garamond-normal]
- [smcp=yes,c2sc=yes]
-
-\starttypescriptcollection[ebgaramond]
-
- \starttypescript [serif] [ebgaramond]
- \loadfontgoodies[ebgaramond]
- \setups[font:fallback:serif]
- \definefontsynonym [Serif] [file:ebgaramond-regular] [features=eb-garamond-normal]
- \definefontsynonym [SerifItalic] [file:ebgaramond-italic] [features=eb-garamond-normal]
- \definefontsynonym [SerifBold] [file:ebgaramond-bold] [features=eb-garamond-normal]
- \definefontsynonym [SerifCaps] [Serif] [features=eb-garamond-smallcaps]
- \stoptypescript
-
- \starttypescript[ebgaramond]
- \definetypeface [ebgaramond] [rm] [serif] [ebgaramond] [default] [designsize=auto]
- \definetypeface [ebgaramond] [tt] [mono] [dejavu] [default]
- \definetypeface [ebgaramond] [mm] [math] [bonum] [default]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-euler.mkiv b/Master/texmf-dist/tex/context/base/type-imp-euler.mkiv
deleted file mode 100644
index d3b552b5672..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-euler.mkiv
+++ /dev/null
@@ -1,91 +0,0 @@
-%D \module
-%D [ file=type-otf,
-%D version=2007.07.30,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Euler,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\loadtypescriptfile[texgyre]
-\loadtypescriptfile[dejavu]
-
-% U+0000 upto U+3100 is probably ok, but even then we don't want a mix of accented
-
-\resetfontfallback [euleroverpagella]
-\resetfontfallback [pagellaovereuler]
-
-% 0x1D455 : italic h
-
-\definefontfallback [euleroverpagella] [\s!file:euler.otf] [0x02100-0x02BFF] [\s!check=yes,\c!force=yes]
-\definefontfallback [euleroverpagella] [\s!file:euler.otf] [0x1D400-0x1D7FF] [\s!check=yes,\c!force=yes]
-\definefontfallback [euleroverpagella] [texgyrepagella-math] [0x0210E] [\s!check=yes,\c!force=\v!yes]
-%definefontfallback [euleroverpagella] [\s!file:euler.otf] [0x1D538-0x1D550] [\s!check=yes,\c!force=yes]
-
-\definefontfallback [pagellaovereuler] [texgyrepagella-math] [0x02100-0x02BFF] [\s!check=yes]
-\definefontfallback [pagellaovereuler] [texgyrepagella-math] [0x1D400-0x1D7FF] [\s!check=yes]
-\definefontfallback [pagellaovereuler] [texgyrepagella-math] [0x1D400-0x1D7FF] [\s!check=yes]
-\definefontfallback [pagellaovereuler] [texgyrepagella-math] [0x0210E] [\s!check=yes,\c!force=\v!yes]
-%definefontfallback [pagellaovereuler] [texgyrepagella-math] [0x1D538-0x1D550] [\s!check=yes]
-
-% example for aditya:
-
-% \definefontfallback [pagellaovereuler] [texgyrepagella-math] [lowercasenormal] [offset=uppercasenormal,force=yes]
-% \definefontfallback [pagellaovereuler] [texgyrepagella-math] [uppercasenormal] [offset=lowercasenormal,force=yes]
-
-% \definefontfallback [pagellaovereuler] [texgyrepagella-math] [uppercasebolditalic] [force=yes]
-% \definefontfallback [pagellaovereuler] [texgyrepagella-math] [lowercasebolditalic] [force=yes]
-
-\starttypescriptcollection[pagella-eulernova]
-
- \starttypescript [\s!serif] [eulernova] [\s!name]
- \setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym [\s!Serif] [\s!file:euler.otf] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!math] [eulernova] [\s!name]
- \loadfontgoodies[euler-math]
- \definefontsynonym [MathRoman] [\s!file:euler.otf] [\s!features=\s!math\mathsizesuffix]
- \stoptypescript
-
- \starttypescript [pagella-eulernova]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [pagella] [\s!default]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] [\s!rscale=0.9]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [eulernova] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
- \starttypescript [eulernova]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [eulernova] [\s!default]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] [\s!rscale=0.9]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [eulernova] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
- \starttypescript [\s!math] [euleroverpagella] [\s!name]
- \definefontsynonym [MathRoman] [texgyrepagella-math] [\s!features=\s!math\mathsizesuffix,\s!fallbacks=euleroverpagella]
- \stoptypescript
-
- \starttypescript [\s!math] [pagellaovereuler] [\s!name]
- \definefontsynonym [MathRoman] [\s!file:euler.otf] [\s!features=\s!math\mathsizesuffix,\s!fallbacks=pagellaovereuler]
- \stoptypescript
-
- \starttypescript [pagella-with-euler]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [pagella] [\s!default]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] [\s!rscale=0.9]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [euleroverpagella] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
- \starttypescript [euler-with-pagella]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [eulernova] [\s!default]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] [\s!rscale=0.9]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [pagellaovereuler] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-ghz.mkiv b/Master/texmf-dist/tex/context/base/type-imp-ghz.mkiv
deleted file mode 100644
index 868d7302115..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-ghz.mkiv
+++ /dev/null
@@ -1,322 +0,0 @@
-%D \module
-%D [ file=type-hgz, % variant of ghz
-%D version=2005.06.07,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Hermann Zapf's Fonts,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 At some point I will switch to opentype Optima fonts (don't have them).
-
-% \usetypescriptfile[type-ghz]
-%
-% \definetypeface[optima] [ss][sans] [optima-nova] [default]
-% \definetypeface[palatino][rm][serif][palatino-nova][default]
-% \definetypeface[aldus] [rm][serif][aldus-nova] [default]
-%
-% \starttext
-% \setupbodyfont[optima] \input zapf \blank
-% \setupbodyfont[palatino] \input zapf \blank
-% \setupbodyfont[aldus] \input zapf \blank
-% \stoptext
-
-\starttypescriptcollection[zapf collection]
-
-% zapfino
-
-\starttypescript [serif,handwriting] [zapfino]
-
- \definefontsynonym[zapfino] [file:zapfinoextraltpro]
- \definefontsynonym[zapfinoextra] [file:zapfinoextraltpro]
- \definefontsynonym[zapfinoforte] [file:zapfinoextraltpro]
-
-\stoptypescript
-
-% optima nova
-
-\starttypescript [sans] [optima-nova,optima-nova-light,optima-nova-medium,optima-nova-os]
-
- \definefontsynonym[OptimaNova-Light] [file:lt55476]
- \definefontsynonym[OptimaNova-LightSC] [file:lt55477]
- \definefontsynonym[OptimaNova-LightOsF] [file:lt55478]
- \definefontsynonym[OptimaNova-LightItalic] [file:lt55479]
- \definefontsynonym[OptimaNova-LightItalicSC] [file:lt55480]
- \definefontsynonym[OptimaNova-LightItalicOsF] [file:lt55481]
- \definefontsynonym[OptimaNova-LightCond] [file:lt55482]
- \definefontsynonym[OptimaNova-Regular] [file:lt55483]
- \definefontsynonym[OptimaNova-RegularSC] [file:lt55484]
- \definefontsynonym[OptimaNova-RegularOsF] [file:lt55485]
- \definefontsynonym[OptimaNova-Italic] [file:lt55486]
- \definefontsynonym[OptimaNova-ItalicSC] [file:lt55487]
- \definefontsynonym[OptimaNova-ItalicOsF] [file:lt55488]
- \definefontsynonym[OptimaNova-Condensed] [file:lt55489]
- \definefontsynonym[OptimaNova-Medium] [file:lt55490]
- \definefontsynonym[OptimaNova-MediumSC] [file:lt55491]
- \definefontsynonym[OptimaNova-MediumOsF] [file:lt55492]
- \definefontsynonym[OptimaNova-MediumItalic] [file:lt55493]
- \definefontsynonym[OptimaNova-MediumItalicSC] [file:lt55494]
- \definefontsynonym[OptimaNova-MediumItalicOsF][file:lt55495]
- \definefontsynonym[OptimaNova-MediumCond] [file:lt55496]
- \definefontsynonym[OptimaNova-TitlingInitials][file:lt55497]
- \definefontsynonym[OptimaNova-Demi] [file:lt55498]
- \definefontsynonym[OptimaNova-DemiSC] [file:lt55499]
- \definefontsynonym[OptimaNova-DemiOsF] [file:lt55500]
- \definefontsynonym[OptimaNova-DemiItalic] [file:lt55501]
- \definefontsynonym[OptimaNova-DemiItalicSC] [file:lt55502]
- \definefontsynonym[OptimaNova-DemiItalicOsF] [file:lt55503]
- \definefontsynonym[OptimaNova-DemiCond] [file:lt55504]
- \definefontsynonym[OptimaNova-Bold] [file:lt55505]
- \definefontsynonym[OptimaNova-BoldSC] [file:lt55506]
- \definefontsynonym[OptimaNova-BoldOsF] [file:lt55507]
- \definefontsynonym[OptimaNova-BoldItalic] [file:lt55508]
- \definefontsynonym[OptimaNova-BoldItalicSC] [file:lt55509]
- \definefontsynonym[OptimaNova-BoldItalicOsF] [file:lt55510]
- \definefontsynonym[OptimaNova-BoldCond] [file:lt55511]
- \definefontsynonym[OptimaNova-Heavy] [file:lt55512]
- \definefontsynonym[OptimaNova-HeavyItalic] [file:lt55513]
- \definefontsynonym[OptimaNova-Black] [file:lt55514]
- \definefontsynonym[OptimaNova-BlackItalic] [file:lt55515]
-
-\stoptypescript
-
-\starttypescript [sans] [optima-nova] [name]
-
- \definefontsynonym [Sans] [OptimaNova-Regular]
- \definefontsynonym [SansItalic] [OptimaNova-Italic]
- \definefontsynonym [SansBold] [OptimaNova-Bold]
- \definefontsynonym [SansBoldItalic] [OptimaNova-BoldItalic]
- \definefontsynonym [SansSlanted] [OptimaNova-Italic]
- \definefontsynonym [SansBoldSlanted] [OptimaNova-BoldItalic]
- \definefontsynonym [SansCaps] [OptimaNova-RegularSC]
-
- \definefontsynonym [SansOsF] [OptimaNova-RegularOsF]
- \definefontsynonym [SansItalicOsF] [OptimaNova-ItalicOsF]
- \definefontsynonym [SansBoldOsF] [OptimaNova-BoldOsF]
- \definefontsynonym [SansBoldItalicOsF] [OptimaNova-BoldItalicOsF]
- \definefontsynonym [SansSlantedOsF] [OptimaNova-ItalicOsF]
- \definefontsynonym [SansBoldSlantedOsF] [OptimaNova-BoldItalicOsF]
- \definefontsynonym [SansCapsOsF] [OptimaNova-RegularSC]
-
- \definefontsynonym [SansCaps] [OptimaNova-RegularSC]
- \definefontsynonym [SansItalicCaps] [OptimaNova-ItalicSC ]
- \definefontsynonym [SansBoldCaps] [OptimaNova-BoldSC]
- \definefontsynonym [SansBoldItalicCaps] [OptimaNova-BoldItalicSC]
- \definefontsynonym [SansSlantedCaps] [OptimaNova-ItalicSC]
- \definefontsynonym [SansBoldSlantedCaps] [OptimaNova-BoldItalicSC]
- \definefontsynonym [SansCapsCaps] [OptimaNova-RegularSC]
-
-\stoptypescript
-
-\starttypescript [sans] [optima-nova-os] [name]
-
- \definefontsynonym [Sans] [OptimaNova-RegularOsF]
- \definefontsynonym [SansItalic] [OptimaNova-ItalicOsF]
- \definefontsynonym [SansBold] [OptimaNova-BoldOsF]
- \definefontsynonym [SansBoldItalic] [OptimaNova-BoldItalicOsF]
- \definefontsynonym [SansSlanted] [OptimaNova-ItalicOsF]
- \definefontsynonym [SansBoldSlanted] [OptimaNova-BoldItalicOsF]
- \definefontsynonym [SansCaps] [OptimaNova-RegularSC]
-
-\stoptypescript
-
-\starttypescript [sans] [optima-nova-light] [name] % may change
-
- \definefontsynonym [Sans] [OptimaNova-Light]
- \definefontsynonym [SansItalic] [OptimaNova-LightItalic]
- \definefontsynonym [SansBold] [OptimaNova-Medium]
- \definefontsynonym [SansBoldItalic] [OptimaNova-MediumItalic]
- \definefontsynonym [SansSlanted] [OptimaNova-LightItalic]
- \definefontsynonym [SansBoldSlanted] [OptimaNova-MediumItalic]
- \definefontsynonym [SansCaps] [OptimaNova-LightSC]
-
-\stoptypescript
-
-\starttypescript [sans] [optima-nova-medium] [name] % may change
-
- \definefontsynonym [Sans] [OptimaNova-Medium]
- \definefontsynonym [SansItalic] [OptimaNova-MediumItalic]
- \definefontsynonym [SansBold] [OptimaNova-Heavy]
- \definefontsynonym [SansBoldItalic] [OptimaNova-HeavyItalic]
- \definefontsynonym [SansSlanted] [OptimaNova-MediumItalic]
- \definefontsynonym [SansBoldSlanted] [OptimaNova-HeavyItalic]
- \definefontsynonym [SansCaps] [OptimaNova-MediumSC]
-
-\stoptypescript
-
-\starttypescript[optima-nova,optima]
- \definetypeface[\typescriptone][ss][sans][optima-nova] [default][features=default]
- \definetypeface[\typescriptone][rm][sans][optima-nova] [default][features=default]
- \definetypeface[\typescriptone][tt][mono][modern] [default][rscale=1.1]
- \definetypeface[\typescriptone][mm][math][modern] [default][rscale=1.1]
- \quittypescriptscanning
-\stoptypescript
-
-\starttypescript[optima-nova-os]
- \definetypeface[optima-os][ss][sans][optima-nova-os] [default][features=default]
- \definetypeface[optima-os][rm][sans][optima-nova-os] [default][features=default]
- \definetypeface[optima-os][tt][mono][modern] [default][rscale=1.1]
- \definetypeface[optima-os][mm][math][modern] [default][rscale=1.1]
- \quittypescriptscanning
-\stoptypescript
-
-% palatino nova
-
-\starttypescript [serif] [palatino-nova,palatino-nova-light,palatino-nova-medium]
-
- \definefontsynonym[PalatinoNova-Light] [file:palatinonova-light]
- \definefontsynonym[PalatinoNova-LightItalic] [file:palatinonova-lightitalic]
- \definefontsynonym[PalatinoNova-Regular] [file:palatinonova-regular]
- \definefontsynonym[PalatinoNova-Italic] [file:palatinonova-italic]
- \definefontsynonym[PalatinoNova-Medium] [file:palatinonova-medium]
- \definefontsynonym[PalatinoNova-MediumItalic][file:palatinonova-mediumitalic]
- \definefontsynonym[PalatinoNova-Bold] [file:palatinonova-bold]
- \definefontsynonym[PalatinoNova-BoldItalic] [file:palatinonova-bolditalic]
- \definefontsynonym[PalatinoNova-Imperial] [file:palatinonova-imperial]
- \definefontsynonym[PalatinoNova-Titling] [file:palatinonova-titling]
-
-\stoptypescript
-
-\starttypescript [serif] [palatino-nova] [name]
-
- \definefontsynonym [Serif] [PalatinoNova-Regular]
- \definefontsynonym [SerifItalic] [PalatinoNova-Italic]
- \definefontsynonym [SerifBold] [PalatinoNova-Bold]
- \definefontsynonym [SerifBoldItalic] [PalatinoNova-BoldItalic]
- \definefontsynonym [SerifSlanted] [SerifItalic]
- \definefontsynonym [SerifBoldSlanted] [SerifBoldItalic]
-
-\stoptypescript
-
-\starttypescript [serif] [palatino-nova-light] [name]% may change
-
- \definefontsynonym [Serif] [PalatinoNova-Light]
- \definefontsynonym [SerifItalic] [PalatinoNova-LightItalic]
- \definefontsynonym [SerifBold] [PalatinoNova-Regular]
- \definefontsynonym [SerifBoldItalic] [PalatinoNova-Italic]
- \definefontsynonym [SerifSlanted] [SerifItalic]
- \definefontsynonym [SerifBoldSlanted] [SerifBoldItalic]
-
-\stoptypescript
-
-\starttypescript [serif] [palatino-nova-medium] [name]% may change
-
- \definefontsynonym [Serif] [PalatinoNova-Medium]
- \definefontsynonym [SerifItalic] [PalatinoNova-MediumItalic]
- \definefontsynonym [SerifBold] [PalatinoNova-Bold]
- \definefontsynonym [SerifBoldItalic] [PalatinoNova-BoldItalic]
- \definefontsynonym [SerifSlanted] [SerifItalic]
- \definefontsynonym [SerifBoldSlanted] [SerifBoldItalic]
-
-\stoptypescript
-
-% palatino sans
-
-\starttypescript [sans] [palatino-sans,palatino-informal]
-
- % palatino sans com ultra light arrows / Palatino Sans Com Ultra Light Arrows / palatinosanscom-ultltarrows]
-
- \definefontsynonym[PalatinoSans-UltraLight] [file:palatinosanscom-ultlight]
- \definefontsynonym[PalatinoSans-UltraLightItalic] [file:palatinosanscom-ultlightita]
- \definefontsynonym[PalatinoSans-Light] [file:palatinosanscom-light]
- \definefontsynonym[PalatinoSans-LightItalic] [file:palatinosanscom-lightita]
- \definefontsynonym[PalatinoSans-Regular] [file:palatinosanscom-regular]
- \definefontsynonym[PalatinoSans-Italic] [file:palatinosanscom-italic]
- \definefontsynonym[PalatinoSans-Medium] [file:palatinosanscom-medium]
- \definefontsynonym[PalatinoSans-MediumItalic] [file:palatinosanscom-mediumita]
- \definefontsynonym[PalatinoSans-Bold] [file:palatinosanscom-bold]
- \definefontsynonym[PalatinoSans-BoldItalic] [file:palatinosanscom-boldita]
-
- \definefontsynonym[PalatinoInformal-UltraLight] [file:palatinosansinflcom-ultlt]
- \definefontsynonym[PalatinoInformal-UltraLightItalic] [file:palatinosansinflcom-ultltit]
- \definefontsynonym[PalatinoInformal-Light] [file:palatinosansinflcom-light]
- \definefontsynonym[PalatinoInformal-LightItalic] [file:palatinosansinflcom-lightit]
- \definefontsynonym[PalatinoInformal-Regular] [file:palatinosansinflcom-regular]
- \definefontsynonym[PalatinoInformal-Italic] [file:palatinosansinflcom-italic]
- \definefontsynonym[PalatinoInformal-Medium] [file:palatinosansinflcom-med]
- \definefontsynonym[PalatinoInformal-MediumItalic] [file:palatinosansinflcom-medit]
- \definefontsynonym[PalatinoInformal-Bold] [file:palatinosansinflcom-bold]
- \definefontsynonym[PalatinoInformal-BoldItalic] [file:palatinosansinflcom-boldit]
-
-\stoptypescript
-
-\starttypescript [sans] [palatino-sans] [name]
-
- \definefontsynonym [Sans] [PalatinoSans-Medium]
- \definefontsynonym [SansItalic] [PalatinoSans-MediumItalic]
- \definefontsynonym [SansBold] [PalatinoSans-Bold]
- \definefontsynonym [SansBoldItalic] [PalatinoSans-BoldItalic]
- \definefontsynonym [SansSlanted] [SansItalic]
- \definefontsynonym [SansBoldSlanted] [SansBoldItalic]
-
-\stoptypescript
-
-\starttypescript [sans] [palatino-informal] [name]
-
- \definefontsynonym [Sans] [PalatinoInformal-Medium]
- \definefontsynonym [SansItalic] [PalatinoInformal-MediumItalic]
- \definefontsynonym [SansBold] [PalatinoInformal-Bold]
- \definefontsynonym [SansBoldItalic] [PalatinoInformal-BoldItalic]
- \definefontsynonym [SansSlanted] [SansItalic]
- \definefontsynonym [SansBoldSlanted] [SansBoldItalic]
-
-\stoptypescript
-
-\starttypescript[palatino,palatino-nova]
- \definetypeface[palatino][rm][serif][palatino-nova][default][features=default]
- \definetypeface[palatino][ss][sans] [palatino-sans][default][features=default]
- \definetypeface[palatino][tt][mono] [modern] [default][rscale=1.1]
- \definetypeface[palatino][mm][math] [palatino] [default]% [rscale=1.1]
- \quittypescriptscanning
-\stoptypescript
-
-\starttypescript[palatino-sans]
- \definetypeface[palatino][ss][sans] [palatino-sans][default][features=default]
- \definetypeface[palatino][rm][serif][palatino-nova][default][features=default]
- \definetypeface[palatino][tt][mono] [modern] [default][rscale=1.1]
- \definetypeface[palatino][mm][math] [palatino] [default] % [rscale=1.1]
- \quittypescriptscanning
-\stoptypescript
-
-\starttypescript[palatino-informal]
- \definetypeface[palatino-informal][ss][sans] [palatino-informal][default][features=default]
- \definetypeface[palatino-informal][rm][serif][palatino-nova] [default][features=default]
- \definetypeface[palatino-informal][tt][mono] [latin-modern] [default][features=none,rscale=1.1]
- \definetypeface[palatino-informal][mm][math] [palatino] [default][features=default]% ,rscale=1.1]
- \quittypescriptscanning
-\stoptypescript
-
-% melior
-
-\starttypescript [serif] [melior] [name]
-
- \definefontsynonym [MeliorLT-Roman] [MeliorLT]
-
- \definefontsynonym [Serif] [MeliorLT-Roman]
- \definefontsynonym [SerifItalic] [MeliorLT-Italic]
- \definefontsynonym [SerifBold] [MeliorLT-Bold]
- \definefontsynonym [SerifBoldItalic] [MeliorLT-BoldItalic]
-
- \definefontsynonym [SerifSlanted] [SerifItalic]
- \definefontsynonym [SerifBoldSlanted] [SerifBoldItalic]
-
- \definefontsynonym [SerifCaps] [Serif]
-
-\stoptypescript
-
-\starttypescript [serif] [melior]
-
- \definefontsynonym [MeliorLT] [file:lte50062]
- \definefontsynonym [MeliorLT-Italic] [file:lte50063]
- \definefontsynonym [MeliorLT-Bold] [file:lte50064]
- \definefontsynonym [MeliorLT-BoldItalic] [file:lte50065]
-
-\stoptypescript
-
-\stoptypescriptcollection
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/type-imp-hgz.mkiv b/Master/texmf-dist/tex/context/base/type-imp-hgz.mkiv
deleted file mode 100644
index 091adeb2d82..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-hgz.mkiv
+++ /dev/null
@@ -1 +0,0 @@
-\input type-imp-ghz.mkiv \endinput % can be file synonym
diff --git a/Master/texmf-dist/tex/context/base/type-imp-husayni.mkiv b/Master/texmf-dist/tex/context/base/type-imp-husayni.mkiv
deleted file mode 100644
index 76cbf77db65..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-husayni.mkiv
+++ /dev/null
@@ -1,198 +0,0 @@
-%D \module
-%D [ file=type-imp-husayni,
-%D version=2008.08.08, % or whatever ... onwards
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Husayni,
-%D author=Idris Samawi Hamid \& Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 For a detailed list of features and names, see husayni.lfg. In fact, the following
-%D sets will go there.
-
-\definefontfeature
- [husayni-default]
- [analyze=yes,
- mode=node,
- language=dflt,
- script=arab,
- ccmp=yes, % adds identity dots to unicode letters; includes dynamic dot placement
- init=yes, % contextual analysis
- medi=yes, % contextual analysis
- fina=yes, % contextual analysis
- rlig=yes, % indispensable
- calt=yes, % ayah+numerals
- salt=yes, % includes manual justification with Tatwiil
- anum=yes, % replace latin numerals with arabic-script ones
- ss01=yes, % Allah, Muhammad,
- ss03=yes, % level-1 stack over Jiim, initial entry only
- ss10=yes, % basic dipped Miim, initial-entry B_S-stack over Miim
- ss12=yes, % XBM_im initial-medial entry B_S-stack over Miim,
- ss15=yes, % full stacked Laam-on-Miim
- ss16=yes, % initial entry, stacked Ayn-on-Miim
- ss19=yes, % LM_im
- ss24=yes, % BR_i_mf, BN_i_mf
- ss25=yes, % basic LH_im % might merge with ss24
- ss26=yes, % full Yaa.final special strings: BY_if, BY_mf, LY_mf
- ss27=yes, % basic thin Miim.final
- ss31=yes, % basic Raa.final strings: JR and SR
- ss34=yes, % AyR style % also available in jsnn
- ss35=yes, % full Kaaf contexts
- ss36=yes, % full Laam contexts
- ss37=yes, % Miim-Miim contexts
- ss38=yes, % basic dipped Haa, B_SH_mm
- ss41=yes, % high and low Baa strings
- ss42=yes, % diagonal entry
- ss43=yes, % initial alternates
- ss60=yes, %
- js16=yes, % aesthetic medial Faa/Qaaf
- kern=yes, % includes kerning of dot-base pairs, and final pairs in continuous strings
- curs=yes, % we don't curs final pairs, padj for that
- mark=yes, % vowels
- mkmk=yes, % stacked vowels
- tlig=yes,
- goodies=husayni,
- colorscheme=default]
-
-\definefontfeature
- [husayni-alternative] % was husayni-default2
- [analyze=yes,
- mode=node,
- language=dflt,
- script=arab,
- ccmp=yes, % adds identity dots to unicode letters; includes dynamic dot placement
- init=yes, % contextual analysis
- medi=yes, % contextual analysis
- fina=yes, % contextual analysis
- rlig=yes, % indispensable
- calt=yes, % ayah+numerals
- salt=yes, % includes manual justification with Tatwiil
- anum=yes, % replace latin numerals with arabic-script ones
- ss01=yes, % Allah, Muhammad,
- ss03=yes, % level-1 stack over Jiim, initial entry only
- ss10=yes, % basic dipped Miim, initial-entry B_S-stack over Miim
- ss12=yes, % XBM_im initial-medial entry B_S-stack over Miim,
- ss15=yes, % full stacked Laam-on-Miim
- ss16=yes, % initial entry, stacked Ayn-on-Miim
- ss19=yes, % LM_im
- ss24=yes, % BR_i_mf, BN_i_mf
- ss25=yes, % basic LH_im % might merge with ss24
- ss26=yes, % full Yaa.final special strings: BY_if, BY_mf, LY_mf
- ss27=yes, % basic thin Miim.final
- ss31=yes, % basic Raa.final strings: JR and SR
- ss34=yes, % AyR style % also available in jsnn
- ss35=yes, % full Kaaf contexts
- ss36=yes, % full Laam contexts
- ss37=yes, % Miim-Miim contexts
- ss38=yes, % basic dipped Haa, B_SH_mm
- ss41=yes, % high and low Baa strings
- ss42=yes, % diagonal entry
- ss43=yes, % initial alternates
- ss60=yes, %
- js16=yes, % aesthetic medial Faa/Qaaf
- kern=yes, % includes kerning of dot-base pairs, and final pairs in continuous strings
- curs=yes, % we don't curs final pairs, padj for that
- mark=yes, % vowels
- mkmk=yes, % stacked vowels
- tlig=yes]
-
-\definefontfeature
- [husayni-tt]
- [analyze=yes,
- mode=node,
- language=dflt,
- script=arab,
- ccmp=yes,
- init=yes,
- medi=yes,
- fina=yes,
- rlig=yes,
- fchr=yes,
- kern=yes,
- curs=yes,
- mark=yes,
- mkmk=yes]
-
-\definefontfeature
- [husayni-mono]
- [analyze=yes,
- mode=node,
- language=dflt,
- script=arab,
- ccmp=no,
- init=yes,
- medi=yes,
- fina=yes,
- isol=yes,
- mset=yes]
-
-\definedelimitedtext
- [ornatequote]
- [left={â€\char"FD3F\penalty10000},
- right={â€\char"FD3E\penalty10000}]
-
-\definedelimitedtext
- [arparenthesis]
- [left={â€\char"0028},
- right={â€\char"0029}]
-
-\definedelimitedtext
- [arquotation]
- [left={â€\symbol[rightquotation]},
- right={â€\symbol[leftquotation]},
- leftmargin=standard]
-
-\definedelimitedtext
- [arquote]
- [left={â€\symbol[rightquote]},
- right={â€\symbol[leftquote]},
- leftmargin=standard]
-
-\definebodyfontenvironment
- [husayni-default]
- [default]
- [interlinespace=4.4ex]
-
-\definefontfallback
- [husayni-latin]
- [file:lmroman12-regular*default]
- [basiclatin,latin-1supplement,latinextended-A,latinextendedadditional]
- [force=no,
- rscale=.7]
-
-\definefontfallback
- [husayni-mono]
- [file:cour*husayni-mono]
- [arabic,arabicpresentationformsa,arabicpresentationformsb,arabicsupplement,0x200C,0x200D,0x200E,0x200F]
- % [force=no]
-
-\definebodyfontenvironment[20.7pt]
-\definebodyfontenvironment[24.8pt]
-\definebodyfontenvironment[29.8pt]
-\definebodyfontenvironment[35.8pt]
-
-\starttypescriptcollection[husayni]
-
- \starttypescript [naskh] [husayni] [name]
- \definefontsynonym [Arabic-Light] [name:husayni] [goodies=husayni,features=husayni-default]
- \definefontsynonym [Arabic-Bold] [name:husayni] [goodies=husayni,features=husayni-default]
- \definefontsynonym [Arabic-Italic] [name:husayni] [goodies=husayni,features=husayni-default]
- \definefontsynonym [Arabic-Bold-Italic] [name:husayni] [goodies=husayni,features=husayni-default]
-
- \definefontsynonym [Serif] [Arabic-Light]
- \definefontsynonym [SerifItalic] [Arabic-Italic]
- \definefontsynonym [SerifBold] [Arabic-Bold]
- \definefontsynonym [SerifBoldItalic] [Arabic-Bold-Italic]
- \stoptypescript
-
- \starttypescript [husayni-default]
- \definetypeface [husayni-default] [rm] [naskh] [husayni] [default] [fallbacks=husayni-latin]
- \definetypeface [husayni-default] [tt] [mono] [modern] [default] [fallbacks=husayni-latin]
- \definetypeface [husayni-default] [mm] [math] [xitsbidi] [default]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-hvmath.mkiv b/Master/texmf-dist/tex/context/base/type-imp-hvmath.mkiv
deleted file mode 100644
index 01595710e54..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-hvmath.mkiv
+++ /dev/null
@@ -1,30 +0,0 @@
-%D \module
-%D [ file=type-imp-hvmath,
-%D version=2007.07.30,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=HV Math Fonts,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\loadtypescriptfile[texgyre]
-
-\starttypescriptcollection[hvmath]
-
- \starttypescript [\s!math] [hvmath]
- \definefontsynonym[\s!MathRoman][hvmath@hvmath-math]
- \loadfontgoodies[hvmath-math]
- \stoptypescript
-
- \starttypescript [hvmath]
- \definetypeface [hvmath] [\s!ss] [\s!sans] [heros] [\s!default] [\s!rscale=0.9]
- \definetypeface [hvmath] [\s!rm] [\s!serif] [termes] [\s!default]
- \definetypeface [hvmath] [\s!tt] [\s!mono] [cursor] [\s!default] [\s!rscale=1.05]
- \definetypeface [hvmath] [\s!mm] [\s!math] [hvmath] [\s!default]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-inconsolata.mkiv b/Master/texmf-dist/tex/context/base/type-imp-inconsolata.mkiv
deleted file mode 100644
index 159759e9b5d..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-inconsolata.mkiv
+++ /dev/null
@@ -1,25 +0,0 @@
-%D \module
-%D [ file=type-imp-incolsolata,
-%D version=2007.07.30,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Inconsolata,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\starttypescriptcollection[inconsolata]
-
- \starttypescript [\s!mono] [inconsolata]
- \definefontsynonym [Inconsolata] [\s!file:inconsolata.otf]
- \stoptypescript
-
- \starttypescript [\s!mono] [inconsolata] [\s!name]
- \setups[\s!font:\s!fallback:\s!mono]
- \definefontsynonym [\s!Mono] [Inconsolata]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-informal.mkiv b/Master/texmf-dist/tex/context/base/type-imp-informal.mkiv
deleted file mode 100644
index 575a836e58a..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-informal.mkiv
+++ /dev/null
@@ -1,52 +0,0 @@
-%D \module
-%D [ file=type-buy,
-%D version=2003.07.08, % 2001.04.12,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Informal by M. Vulis,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\starttypescriptcollection[informal]
-
-\starttypescript [casual] [informal]
- \definefontsynonym [Serif] [Informal-Regular]
- \definefontsynonym [SerifBold] [Informal-Bold]
- \definefontsynonym [SerifSlanted] [Informal-Oblique]
- \definefontsynonym [SerifItalic] [Informal-Oblique]
- \definefontsynonym [SerifBoldSlanted] [Informal-BoldOblique]
- \definefontsynonym [SerifBoldItalic] [Informal-BoldOblique]
- \definefontsynonym [SerifCaps] [Informal-Regular]
-\stoptypescript
-
-\starttypescript [math] [informal] [name]
- \definefontsynonym [MathRoman] [Informal-Regular]
- \definefontsynonym [MathExtension] [Informal-MathExtendedSymbols]
- \definefontsynonym [MathItalic] [Informal-MathItalics]
- \definefontsynonym [MathSymbol] [Informal-MathSymbols]
-\stoptypescript
-
-\starttypescript [casual] [informal]
- \definefontsynonym [Informal-Regular] [file:ifrg]
- \definefontsynonym [Informal-Bold] [file:ifb]
- \definefontsynonym [Informal-Oblique] [file:ifo]
- \definefontsynonym [Informal-BoldOblique] [file:ifbo]
-\stoptypescript
-
-\starttypescript [math] [informal] [name]
- \loadfontgoodies[informal-math]
- \definefontsynonym[MathRoman][informalmath@informal-math]
-\stoptypescript
-
-\starttypescript [informal]
- \definetypeface[informal][rm][casual][informal][default]
- \definetypeface[informal][tt][mono] [modern] [default][rscale=0.95]
- \definetypeface[informal][mm][math] [informal][default]
-\stoptypescript
-
-\stoptypescriptcollection
-
diff --git a/Master/texmf-dist/tex/context/base/type-imp-ipaex.mkiv b/Master/texmf-dist/tex/context/base/type-imp-ipaex.mkiv
deleted file mode 100644
index b11f9687857..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-ipaex.mkiv
+++ /dev/null
@@ -1,137 +0,0 @@
-%D \module
-%D [ file=type-imp-ipaex,
-%D version=2015.05.01,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=IPAex,
-%D author=Yusuke KUROKI \& Hans HAGEN,
-%D date=\currentdate,
-%D copyright=Yusuke KUROKI \& 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.
-
-% usage: \setupbodyfont[ipaex,10pt]
-
-\loadtypescriptfile[texgyre]
-\loadtypescriptfile[xits]
-
-\definefontfeature
- [jp-default]
- [script=default,lang=japanese]
-
-\definefontfeature
- [jp-latin-default]
- [jp-default]
-
-\definefontfeature
- [jp-latin-slanted]
- [jp-latin-default]
- [slant=.2]
-
-\definefontfeature
- [jp-latin-slanted-mono]
- [slant=.2]
-
-\definefontfeature
- [jp-latin-smallcaps]
- [jp-latin-default]
- [smcp=yes]
-
-\definefontfeature
- [jp-latin-smallcaps-mono]
- [cmcp=yes]
-
-\definefontfallback[jp-serif] [texgyrepagella-regular*jp-latin-default] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-serifbold] [texgyrepagella-bold*jp-latin-default] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-serifitalic] [texgyrepagella-italic*jp-latin-default] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-serifbolditalic] [texgyrepagella-bolditalic*jp-latin-default] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-serifslanted] [texgyrepagella-regular*jp-latin-slanted] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-serifboldslanted][texgyrepagella-bold*jp-latin-slanted] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-serifcaps] [texgyrepagella-regular*jp-latin-smallcaps] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-sans] [texgyreheros-regular*jp-latin-default] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-sansbold] [texgyreheros-bold*jp-latin-default] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-sansitalic] [texgyreheros-italic*jp-latin-default] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-sansbolditalic] [texgyreheros-bolditalic*jp-latin-default] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-sansslanted] [texgyreheros-regular*jp-latin-slanted] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-sansboldslanted] [texgyreheros-bold*jp-latin-slanted] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-sanscaps] [texgyreheros-regular*jp-latin-smallcaps] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-mono] [texgyrecursor-regular] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-monobold] [texgyrecursor-bold] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-monoitalic] [texgyrecursor-italic] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-monobolditalic] [texgyrecursor-bolditalic] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-monoslanted] [texgyrecursor-regular*jp-latin-slanted-mono] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-monoboldslanted] [texgyrecursor-bold*jp-latin-slanted-mono] [0x0000-0x0400][force=yes,rscale=1.0406]
-\definefontfallback[jp-monocaps] [texgyrecursor-regular*jp-latin-smallcaps-mono][0x0000-0x0400][force=yes,rscale=1.0406]
-
-\starttypescriptcollection[ipaex]
- \starttypescript [\s!serif] [ipaexm]
- \definefontsynonym [ipaexm] [\s!file:ipaexm][\s!features=jp-default,\s!fallbacks=jp-serif]
- \definefontsynonym [ipaexmbold] [\s!file:ipaexg][\s!features=jp-default,\s!fallbacks=jp-serifbold]
- \definefontsynonym [ipaexmitalic] [\s!file:ipaexg][\s!features=jp-default,\s!fallbacks=jp-serifitalic]
- \definefontsynonym [ipaexmbolditalic] [\s!file:ipaexg][\s!features=jp-default,\s!fallbacks=jp-serifbolditalic]
- \definefontsynonym [ipaexmslanted] [\s!file:ipaexg][\s!features=jp-default,\s!fallbacks=jp-serifslanted]
- \definefontsynonym [ipaexmboldslanted][\s!file:ipaexg][\s!features=jp-default,\s!fallbacks=jp-serifboldslanted]
- \definefontsynonym [ipaexmcaps] [\s!file:ipaexm][\s!features=jp-default,\s!fallbacks=jp-serifcaps]
- \stoptypescript
-
- \starttypescript [\s!sans] [ipaexg]
- \definefontsynonym[ipaexg] [\s!file:ipaexg][\s!features=jp-default,\s!fallbacks=jp-sans]
- \definefontsynonym[ipaexgbold] [\s!file:ipaexg][\s!features=jp-default,\s!fallbacks=jp-sansbold]
- \definefontsynonym[ipaexgitalic] [\s!file:ipaexg][\s!features=jp-default,\s!fallbacks=jp-sansitalic]
- \definefontsynonym[ipaexgbolditalic] [\s!file:ipaexg][\s!features=jp-default,\s!fallbacks=jp-sansbolditalic]
- \definefontsynonym[ipaexgslanted] [\s!file:ipaexg][\s!features=jp-default,\s!fallbacks=jp-sansslanted]
- \definefontsynonym[ipaexgboldslanted] [\s!file:ipaexg][\s!features=jp-default,\s!fallbacks=jp-sansboldslanted]
- \definefontsynonym[ipaexgcaps] [\s!file:ipaexg][\s!features=jp-default,\s!fallbacks=jp-sanscaps]
- \stoptypescript
-
- \starttypescript [\s!mono] [ipaexgmono]
- \definefontsynonym[ipaexgmono] [\s!file:ipaexg][\s!features=jp-default,\s!fallbacks=jp-mono]
- \definefontsynonym[ipaexgmonobold] [\s!file:ipaexg][\s!features=jp-default,\s!fallbacks=jp-monobold]
- \definefontsynonym[ipaexgmonoitalic] [\s!file:ipaexg][\s!features=jp-slanted,\s!fallbacks=jp-monoitalic]
- \definefontsynonym[ipaexgmonobolditalic] [\s!file:ipaexg][\s!features=jp-slanted,\s!fallbacks=jp-monobolditalic]
- \definefontsynonym[ipaexgmonoslanted] [\s!file:ipaexg][\s!features=jp-slanted,\s!fallbacks=jp-monoslanted]
- \definefontsynonym[ipaexgmonoboldslanted] [\s!file:ipaexg][\s!features=jp-slanted,\s!fallbacks=jp-monoboldslanted]
- \definefontsynonym[ipaexgmonocaps] [\s!file:ipaexg][\s!features=jp-default,\s!fallbacks=jp-monocaps]
- \stoptypescript
-
- \starttypescript [\s!serif] [ipaexm] [\s!name]
- \definefontsynonym[\s!Serif] [ipaexm]
- \definefontsynonym[\s!SerifBold] [ipaexmbold]
- \definefontsynonym[\s!SerifItalic] [ipaexmitalic]
- \definefontsynonym[\s!SerifBoldItalic] [ipaexmbolditalic]
- \definefontsynonym[\s!SerifSlanted] [ipaexmslanted]
- \definefontsynonym[\s!SerifBoldSlanted][ipaexmboldslanted]
- \definefontsynonym[\s!SerifCaps] [ipaexmcaps]
- \stoptypescript
-
- \starttypescript [\s!sans] [ipaexg] [\s!name]
- \definefontsynonym[\s!Sans] [ipaexg]
- \definefontsynonym[\s!SansBold] [ipaexgbold]
- \definefontsynonym[\s!SansItalic] [ipaexgitalic]
- \definefontsynonym[\s!SansBoldItalic] [ipaexgbolditalic]
- \definefontsynonym[\s!SansSlanted] [ipaexgslanted]
- \definefontsynonym[\s!SansBoldSlanted] [ipaexgboldslanted]
- \definefontsynonym[\s!SansCaps] [ipaexgcaps]
- \stoptypescript
-
- \starttypescript [\s!mono] [ipaexgmono] [\s!name]
- \definefontsynonym[\s!Mono] [ipaexgmono]
- \definefontsynonym[\s!MonoBold] [ipaexgmonobold]
- \definefontsynonym[\s!MonoItalic] [ipaexgmonoitalic]
- \definefontsynonym[\s!MonoBoldItalic] [ipaexgmonobolditalic]
- \definefontsynonym[\s!MonoSlanted] [ipaexgmonoslanted]
- \definefontsynonym[\s!MonoBoldSlanted] [ipaexgmonoboldslanted]
- \definefontsynonym[\s!MonoCaps] [ipaexgmonocaps]
- \stoptypescript
-
- % xits might get replaced with a pagella once we have it
-
- \starttypescript[ipaex]
- \definetypeface [ipaex] [\s!rm] [\s!serif] [ipaexm]
- \definetypeface [ipaex] [\s!ss] [\s!sans] [ipaexg]
- \definetypeface [ipaex] [\s!tt] [\s!mono] [ipaexgmono]
- \definetypeface [ipaex] [\s!mm] [\s!math] [xits]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-iwona.mkiv b/Master/texmf-dist/tex/context/base/type-imp-iwona.mkiv
deleted file mode 100644
index 88cb7e719c3..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-iwona.mkiv
+++ /dev/null
@@ -1,236 +0,0 @@
-%D \module
-%D [ file=type-imp-iwona,
-%D version=2010.06.21,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Iwona,
-%D author=Mojca Miklavec \& Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\starttypescriptcollection[iwona]
-
- % maybe this will change in Iwona-Math-Letters and Iwona-Math-Letters-Italic
-
- % These names are a depressing mess. They have changed over time and are
- % still not consistent. I'd expect Bold-Regular and Bold-Italic.
-
- \starttypescript [\s!sans] [iwona-light,iwona,iwona-medium,iwona-heavy,iwona-light-cond,iwona-cond,iwona-medium-cond,iwona-heavy-cond]
-
- \definefontsynonym [Iwona-Regular] [\s!file:Iwona-Regular] [\s!features=\s!default]
- \definefontsynonym [Iwona-Italic] [\s!file:Iwona-Italic] [\s!features=\s!default]
- \definefontsynonym [Iwona-Bold] [\s!file:Iwona-Bold] [\s!features=\s!default]
- \definefontsynonym [Iwona-BoldItalic] [\s!file:Iwona-BoldItalic] [\s!features=\s!default]
- \definefontsynonym [Iwona-Light-Regular] [\s!file:IwonaLight-Regular] [\s!features=\s!default]
- \definefontsynonym [Iwona-Light-Italic] [\s!file:IwonaLight-Italic] [\s!features=\s!default]
- \definefontsynonym [Iwona-Medium-Regular] [\s!file:IwonaMedium-Regular] [\s!features=\s!default]
- \definefontsynonym [Iwona-Medium-Italic] [\s!file:IwonaMedium-Italic] [\s!features=\s!default]
- \definefontsynonym [Iwona-Heavy-Regular] [\s!file:IwonaHeavy-Regular] [\s!features=\s!default]
- \definefontsynonym [Iwona-Heavy-Italic] [\s!file:IwonaHeavy-Italic] [\s!features=\s!default]
-
- \definefontsynonym [Iwona-CapsRegular] [\s!file:Iwona-Regular] [\s!features=\s!smallcaps]
- \definefontsynonym [Iwona-CapsItalic] [\s!file:Iwona-Italic] [\s!features=\s!smallcaps]
- \definefontsynonym [Iwona-CapsBold] [\s!file:Iwona-Bold] [\s!features=\s!smallcaps]
- \definefontsynonym [Iwona-CapsBoldItalic] [\s!file:Iwona-BoldItalic] [\s!features=\s!smallcaps]
- \definefontsynonym [Iwona-CapsLight] [\s!file:IwonaLight-Regular] [\s!features=\s!smallcaps]
- \definefontsynonym [Iwona-CapsLight-Italic] [\s!file:IwonaLight-Italic] [\s!features=\s!smallcaps]
- \definefontsynonym [Iwona-CapsMedium] [\s!file:IwonaMedium-Regular] [\s!features=\s!smallcaps]
- \definefontsynonym [Iwona-CapsMedium-Italic] [\s!file:IwonaMedium-Italic] [\s!features=\s!smallcaps]
- \definefontsynonym [Iwona-CapsHeavy] [\s!file:IwonaHeavy-Regular] [\s!features=\s!smallcaps]
- \definefontsynonym [Iwona-CapsHeavy-Italic] [\s!file:IwonaHeavy-Italic] [\s!features=\s!smallcaps]
-
- \definefontsynonym [Iwona-CondRegular] [\s!file:IwonaCond-Regular] [\s!features=\s!default]
- \definefontsynonym [Iwona-CondItalic] [\s!file:IwonaCond-Italic] [\s!features=\s!default]
- \definefontsynonym [Iwona-CondBold] [\s!file:IwonaCond-Bold] [\s!features=\s!default]
- \definefontsynonym [Iwona-CondBoldItalic] [\s!file:IwonaCond-BoldItalic] [\s!features=\s!default]
- \definefontsynonym [Iwona-CondLight-Regular] [\s!file:IwonaCondLight-Regular] [\s!features=\s!default]
- \definefontsynonym [Iwona-CondLight-Italic] [\s!file:IwonaCondLight-Italic] [\s!features=\s!default]
- \definefontsynonym [Iwona-CondMedium-Regular] [\s!file:IwonaCondMedium-Regular] [\s!features=\s!default]
- \definefontsynonym [Iwona-CondMedium-Italic] [\s!file:IwonaCondMedium-Italic] [\s!features=\s!default]
- \definefontsynonym [Iwona-CondHeavy-Regular] [\s!file:IwonaCondHeavy-Regular] [\s!features=\s!default]
- \definefontsynonym [Iwona-CondHeavy-Italic] [\s!file:IwonaCondHeavy-Italic] [\s!features=\s!default]
-
- \definefontsynonym [Iwona-CapsCondRegular] [\s!file:IwonaCond-Regular] [\s!features=\s!smallcaps]
- \definefontsynonym [Iwona-CapsCondItalic] [\s!file:IwonaCond-Italic] [\s!features=\s!smallcaps]
- \definefontsynonym [Iwona-CapsCondBold] [\s!file:IwonaCond-Bold] [\s!features=\s!smallcaps]
- \definefontsynonym [Iwona-CapsCondBoldItalic] [\s!file:IwonaCond-BoldItalic] [\s!features=\s!smallcaps]
- \definefontsynonym [Iwona-CapsCondLight-Regular] [\s!file:IwonaCondLight-Regular] [\s!features=\s!smallcaps]
- \definefontsynonym [Iwona-CapsCondLight-Italic] [\s!file:IwonaCondLight-Italic] [\s!features=\s!smallcaps]
- \definefontsynonym [Iwona-CapsCondMedium-Regular][\s!file:IwonaCondMedium-Regular] [\s!features=\s!smallcaps]
- \definefontsynonym [Iwona-CapsCondMedium-Italic] [\s!file:IwonaCondMedium-Italic] [\s!features=\s!smallcaps]
- \definefontsynonym [Iwona-CapsCondHeavy-Regular] [\s!file:IwonaCondHeavy-Regular] [\s!features=\s!smallcaps]
- \definefontsynonym [Iwona-CapsCondHeavy-Italic] [\s!file:IwonaCondHeavy-Italic] [\s!features=\s!smallcaps]
-
- \stoptypescript
-
- % [all] is redundant
-
- \starttypescript [\s!math][iwona][\s!all]
- \definefontsynonym[\s!MathRoman][iwonamath@iwona-math]
- \stoptypescript
- \starttypescript [\s!math][iwona-light][\s!all]
- \definefontsynonym[\s!MathRoman][iwonalightmath@iwona-light-math]
- \stoptypescript
- \starttypescript [\s!math][iwona-medium][\s!all]
- \definefontsynonym[\s!MathRoman][iwonamediummath@iwona-medium-math]
- \stoptypescript
- \starttypescript [\s!math][iwona-heavy][\s!all]
- \definefontsynonym[\s!MathRoman][iwonaheavymath@iwona-heavy-math]
- \stoptypescript
-
- \starttypescript [\s!math] [iwona,iwona-light,iwona-medium,iwona-heavy] [\s!all]
- \loadfontgoodies[iwona-math]
- \stoptypescript
-
- \starttypescript [\s!sans] [iwona-light] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [Iwona-Light-Regular]
- \definefontsynonym [\s!SansItalic] [Iwona-Light-Italic]
- \definefontsynonym [\s!SansBold] [Iwona-Medium-Regular]
- \definefontsynonym [\s!SansBoldItalic] [Iwona-Medium-Italic]
- \definefontsynonym [SansCaps] [Iwona-CapsLight]
- \definefontsynonym [SansItalicCaps] [Iwona-CapsLightItalic]
- \definefontsynonym [SansBoldCaps] [Iwona-CapsMedium]
- \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsMediumItalic]
- \stoptypescript
-
- \starttypescript [\s!sans] [iwona-light-caps] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [Iwona-CapsLight-Regular]
- \definefontsynonym [\s!SansItalic] [Iwona-CapsLight-Italic]
- \definefontsynonym [\s!SansBold] [Iwona-CapsMedium-Regular]
- \definefontsynonym [\s!SansBoldItalic] [Iwona-CapsMedium-Italic]
- \stoptypescript
-
- \starttypescript [\s!sans] [iwona] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [Iwona-Regular]
- \definefontsynonym [\s!SansItalic] [Iwona-Italic]
- \definefontsynonym [\s!SansBold] [Iwona-Bold]
- \definefontsynonym [\s!SansBoldItalic] [Iwona-BoldItalic]
- \definefontsynonym [SansCaps] [Iwona-CapsRegular]
- \definefontsynonym [SansItalicCaps] [Iwona-CapsItalic]
- \definefontsynonym [SansBoldCaps] [Iwona-CapsBold]
- \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsBoldItalic]
- \stoptypescript
-
- \starttypescript [\s!sans] [iwona-caps] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [Iwona-CapsRegular]
- \definefontsynonym [\s!SansItalic] [Iwona-CapsItalic]
- \definefontsynonym [\s!SansBold] [Iwona-CapsBold]
- \definefontsynonym [\s!SansBoldItalic] [Iwona-CapsBoldItalic]
- \stoptypescript
-
- \starttypescript [\s!sans] [iwona-medium] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [Iwona-Medium-Regular]
- \definefontsynonym [\s!SansItalic] [Iwona-Medium-Italic]
- \definefontsynonym [\s!SansBold] [Iwona-Heavy-Regular]
- \definefontsynonym [\s!SansBoldItalic] [Iwona-Heavy-Italic]
- \definefontsynonym [SansCaps] [Iwona-CapsHeavy-Regular]
- \definefontsynonym [SansItalicCaps] [Iwona-CapsMedium-Italic]
- \definefontsynonym [SansBoldCaps] [Iwona-CapsHeavy-Regular]
- \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsHeavy-Italic]
- \stoptypescript
-
- \starttypescript [\s!sans] [iwona-medium-caps] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [Iwona-CapsHeavy-Regular]
- \definefontsynonym [\s!SansItalic] [Iwona-CapsMedium-Italic]
- \definefontsynonym [\s!SansBold] [Iwona-CapsHeavy-Regular]
- \definefontsynonym [\s!SansBoldItalic] [Iwona-CapsHeavy-Italic]
- \stoptypescript
-
- \starttypescript [\s!sans] [iwona-heavy] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [Iwona-Heavy-Regular]
- \definefontsynonym [\s!SansItalic] [Iwona-Heavy-Italic]
- \definefontsynonym [\s!SansBold] [Iwona-Heavy-Regular]
- \definefontsynonym [\s!SansBoldItalic] [Iwona-Heavy-Italic]
- \definefontsynonym [SansCaps] [Iwona-CapsHeavy-Regular]
- \definefontsynonym [SansItalicCaps] [Iwona-CapsHeavy-Italic]
- \definefontsynonym [SansBoldCaps] [Iwona-CapsHeavy-Regular]
- \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsHeavy-Italic]
- \stoptypescript
-
- \starttypescript [\s!sans] [iwona-heavy-caps] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [SansCaps] [Iwona-CapsHeavy-Regular]
- \definefontsynonym [SansItalicCaps] [Iwona-CapsHeavy-Italic]
- \definefontsynonym [SansBoldCaps] [Iwona-CapsHeavy-Regular]
- \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsHeavy-Italic]
- \stoptypescript
-
- \starttypescript [\s!sans] [iwona-light-cond] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [Iwona-CondLight-Regular]
- \definefontsynonym [\s!SansItalic] [Iwona-CondLight-Italic]
- \definefontsynonym [\s!SansBold] [Iwona-CondMedium-Regular]
- \definefontsynonym [\s!SansBoldItalic] [Iwona-CondMedium-Italic]
- \definefontsynonym [SansCaps] [Iwona-CapsCondLight-Regular]
- \definefontsynonym [SansItalicCaps] [Iwona-CapsCondLight-Italic]
- \definefontsynonym [SansBoldCaps] [Iwona-CapsCondMedium-Regular]
- \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsCondMedium-Italic]
- \stoptypescript
-
- \starttypescript [\s!sans] [iwona-light-cond-caps,iwona-light-caps-cond] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [Iwona-CapsCondLight-Regular]
- \definefontsynonym [\s!SansItalic] [Iwona-CapsCondLight-Italic]
- \definefontsynonym [\s!SansBold] [Iwona-CapsCondMedium-Regular]
- \definefontsynonym [\s!SansBoldItalic] [Iwona-CapsCondMedium-Italic]
- \stoptypescript
-
- \starttypescript [\s!sans] [iwona-cond] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [Iwona-CondRegular]
- \definefontsynonym [\s!SansItalic] [Iwona-CondItalic]
- \definefontsynonym [\s!SansBold] [Iwona-CondBold]
- \definefontsynonym [\s!SansBoldItalic] [Iwona-CondBoldItalic]
- \definefontsynonym [SansCaps] [Iwona-CapsCondRegular]
- \definefontsynonym [SansItalicCaps] [Iwona-CapsCondItalic]
- \definefontsynonym [SansBoldCaps] [Iwona-CapsCondBold]
- \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsCondBoldItalic]
- \stoptypescript
-
- \starttypescript [\s!sans] [iwona-cond-caps,iwona-caps-cond] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [Iwona-CapsCondRegular]
- \definefontsynonym [\s!SansItalic] [Iwona-CapsCondItalic]
- \definefontsynonym [\s!SansBold] [Iwona-CapsCondBold]
- \definefontsynonym [\s!SansBoldItalic] [Iwona-CapsCondBoldItalic]
- \stoptypescript
-
- \starttypescript [\s!sans] [iwona-medium-cond] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [Iwona-CondMedium-Regular]
- \definefontsynonym [\s!SansItalic] [Iwona-CondMedium-Italic]
- \definefontsynonym [\s!SansBold] [Iwona-CondHeavy-Regular]
- \definefontsynonym [\s!SansBoldItalic] [Iwona-CondHeavy-Italic]
- \definefontsynonym [SansCaps] [Iwona-CapsCondHeavy-Regular]
- \definefontsynonym [SansItalicCaps] [Iwona-CapsCondMedium-Italic]
- \definefontsynonym [SansBoldCaps] [Iwona-CapsCondHeavy-Regular]
- \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsCondHeavy-Italic]
- \stoptypescript
-
- \starttypescript [\s!sans] [iwona-medium-cond-caps,iwona-medium-caps-cond] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [Iwona-CapsCondHeavy-Regular]
- \definefontsynonym [\s!SansItalic] [Iwona-CapsCondMedium-Italic]
- \definefontsynonym [\s!SansBold] [Iwona-CapsCondHeavy-Regular]
- \definefontsynonym [\s!SansBoldItalic] [Iwona-CapsCondHeavy-Italic]
- \stoptypescript
-
- \starttypescript [iwona,iwona-light,iwona-heavy,iwona-medium]
- \definetypeface[\typescriptone][\s!ss][\s!sans] [\typescriptone] [\s!default]
- \definetypeface[\typescriptone][\s!rm][\s!serif][modern] [\s!default]
- \definetypeface[\typescriptone][\s!tt][\s!mono] [modern] [\s!default]
- \definetypeface[\typescriptone][\s!mm][\s!math] [\typescriptone] [\s!default][text=ss]
- \quittypescriptscanning
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-kurier.mkiv b/Master/texmf-dist/tex/context/base/type-imp-kurier.mkiv
deleted file mode 100644
index d83510b95b5..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-kurier.mkiv
+++ /dev/null
@@ -1,56 +0,0 @@
-%D \module
-%D [ file=type-imp-kurier,
-%D version=2007.07.30,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Kurier by JMN,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% There are no open type fonts yet so this should be in type-one.mkiv
-% instead but we keep it here till ready.
-
-\starttypescriptcollection[kurier]
-
- \starttypescript [\s!sans] [kurier-light,kurier,kurier-medium]
- \definefontsynonym[Kurier-Light] [kurierl]
- \definefontsynonym[Kurier-Regular] [kurierr]
- \definefontsynonym[Kurier-Medium] [kurierm]
- \definefontsynonym[Kurier-Bold] [kurierb]
- \definefontsynonym[Kurier-Heavy] [kurierh]
- \definefontsynonym[Kurier-LightItalic] [kurierli]
- \definefontsynonym[Kurier-Italic] [kurierri]
- \definefontsynonym[Kurier-MediumItalic] [kuriermi]
- \definefontsynonym[Kurier-BoldItalic] [kurierbi]
- \definefontsynonym[Kurier-HeavyItalic] [kurierhi]
- \stoptypescript
-
- \starttypescript [\s!sans] [kurier-light] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [Kurier-Light-Regular]
- \definefontsynonym [\s!SansItalic] [Kurier-Light-Italic]
- \definefontsynonym [\s!SansBold] [Kurier-Medium-Regular]
- \definefontsynonym [\s!SansBoldItalic] [Kurier-Medium-Italic]
- \stoptypescript
-
- \starttypescript [\s!sans] [kurier] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [Kurier-Regular]
- \definefontsynonym [\s!SansItalic] [Kurier-Italic]
- \definefontsynonym [\s!SansBold] [Kurier-Bold]
- \definefontsynonym [\s!SansBoldItalic] [Kurier-BoldItalic]
- \stoptypescript
-
- \starttypescript [\s!sans] [kurier-medium] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [Kurier-Medium-Regular]
- \definefontsynonym [\s!SansItalic] [Kurier-Medium-Italic]
- \definefontsynonym [\s!SansBold] [Kurier-Heavy-Regular]
- \definefontsynonym [\s!SansBoldItalic] [Kurier-Heavy-Italic]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-latinmodern.mkiv b/Master/texmf-dist/tex/context/base/type-imp-latinmodern.mkiv
deleted file mode 100644
index fe4b669bd70..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-latinmodern.mkiv
+++ /dev/null
@@ -1,238 +0,0 @@
-%D \module
-%D [ file=type-imp-modern,
-%D version=2007.07.30,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Latin Modern,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% \starttypescriptcollection[\s!fallback]
-% \starttypescript [\s!fallback]
-% \definetypeface [\s!fallback] [\s!rm] [\s!serif] [modern] [\s!default]
-% \definetypeface [\s!fallback] [\s!ss] [\s!sans] [modern] [\s!default]
-% \definetypeface [\s!fallback] [\s!tt] [\s!mono] [modern] [\s!default]
-% \definetypeface [\s!fallback] [\s!mm] [\s!math] [modern] [\s!default]
-% \quittypescriptscanning
-% \stoptypescript
-% \stoptypescriptcollection
-
-%D Here comes good old Latin Modern, the default font, based on Knuths Computer
-%D Modern. The design size variants is:
-%D
-%D modern-designsize
-
-\starttypescriptcollection[latinmodern]
-
- \starttypescript [\s!serif] [simple] [\s!name]% for old times sake (manuals)
- \definefontsynonym [\s!Simple] [\s!file:lmmonoproplt10-regular] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!serif] [modern,latin-modern-designsize,latin-modern] [\s!name]
- \loadfontgoodies[lm]
- \definefontsynonym [\s!Serif] [LMRoman-Regular] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBold] [LMRoman-Bold] [\s!features=\s!default]
- \definefontsynonym [\s!SerifItalic] [LMRoman-Italic] [\s!features=\s!default]
- \definefontsynonym [\s!SerifSlanted] [LMRoman-Oblique] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldItalic] [LMRoman-BoldItalic] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldSlanted] [LMRoman-BoldOblique] [\s!features=\s!default]
- \definefontsynonym [\s!SerifCaps] [LMRoman-CapsRegular] [\s!features=\s!default]
- \definefontsynonym [SerifCapsSlanted] [LMRoman-CapsOblique] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!sans] [modern,latin-modern-designsize,latin-modern] [\s!name]
- \loadfontgoodies[lm]
- \definefontsynonym [\s!Sans] [LMSans-Regular] [\s!features=\s!default]
- \definefontsynonym [\s!SansBold] [LMSans-Bold] [\s!features=\s!default]
- \definefontsynonym [\s!SansItalic] [LMSans-Oblique] [\s!features=\s!default]
- \definefontsynonym [\s!SansSlanted] [LMSans-Oblique] [\s!features=\s!default]
- \definefontsynonym [\s!SansBoldItalic] [LMSans-BoldOblique] [\s!features=\s!default]
- \definefontsynonym [\s!SansBoldSlanted] [LMSans-BoldOblique] [\s!features=\s!default]
- \definefontsynonym [\s!SansCaps] [LMSans-Regular] [\s!features=\s!default]
- \definefontsynonym [SansCapsSlanted] [LMSans-Oblique] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!mono] [modern,latin-modern-designsize,latin-modern] [\s!name]
- \loadfontgoodies[lm]
- \definefontsynonym [\s!Mono] [LMTypewriter-Regular] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBold] [LMTypewriter-Dark] [\s!features=\s!none]
- \definefontsynonym [\s!MonoItalic] [LMTypewriter-Italic] [\s!features=\s!none]
- \definefontsynonym [\s!MonoSlanted] [LMTypewriter-Oblique] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBoldItalic] [LMTypewriter-DarkOblique] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBoldSlanted] [LMTypewriter-DarkOblique] [\s!features=\s!none]
- \definefontsynonym [\s!MonoCaps] [LMTypewriter-CapsRegular] [\s!features=\s!none]
- \definefontsynonym [MonoCapsSlanted] [LMTypewriter-CapsOblique] [\s!features=\s!none]
- \definefontsynonym [MonoVariable] [LMTypewriterVarWd-Regular] [\s!features=\s!none]
- \stoptypescript
-
- \starttypescript [\s!math] [modern,latin-modern-designsize,latin-modern] [\s!name]
- \loadfontgoodies[lm]
- \definefontsynonym [\s!MathRoman] [LMMathRoman-Regular]
- \definefontsynonym [\s!MathRomanBold] [LMMathRoman-Bold]
- \stoptypescript
-
- \starttypescript [\s!math] [latin-modern-designsize] [\s!name]
- \loadfontgoodies[lm-math]
- \stoptypescript
-
- \starttypescript [\s!serif] [modern-variable,latin-modern-variable-designsize,latin-modern-variable] [\s!name]
- \loadfontgoodies[lm]
- \definefontsynonym [\s!Serif] [LMTypewriterVarWd-Regular] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBold] [LMTypewriterVarWd-Oblique] [\s!features=\s!default]
- \definefontsynonym [\s!SerifItalic] [LMTypewriterVarWd-Oblique] [\s!features=\s!default]
- \definefontsynonym [\s!SerifSlanted] [LMTypewriterVarWd-Dark] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldItalic] [LMTypewriterVarWd-DarkOblique] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldSlanted] [LMTypewriterVarWd-DarkOblique] [\s!features=\s!default]
- \definefontsynonym [\s!SerifCaps] [LMTypewriterVarWd-Regular] [\s!features=\s!default]
- \definefontsynonym [SerifCapsSlanted] [LMTypewriterVarWd-Oblique] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!mono] [modern-condensed,latin-modern-condensed-designsize,latin-modern-condensed,modern-light-condensed,latin-modern-light-condensed] [\s!name]
- \loadfontgoodies[lm]
- \definefontsynonym [\s!Mono] [LMTypewriter-LightCondensed] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBold] [LMTypewriter-LightCondensed] [\s!features=\s!none]
- \definefontsynonym [\s!MonoItalic] [LMTypewriter-LightCondensedOblique] [\s!features=\s!none]
- \definefontsynonym [\s!MonoSlanted] [LMTypewriter-LightCondensedOblique] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBoldItalic] [LMTypewriter-LightCondensed] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBoldSlanted] [LMTypewriter-LightCondensed] [\s!features=\s!none]
- \definefontsynonym [\s!MonoCaps] [LMTypewriter-LightCondensed] [\s!features=\s!none]
- \definefontsynonym [MonoCapsSlanted] [LMTypewriter-LightCondensed] [\s!features=\s!none]
- \stoptypescript
-
- \starttypescript [\s!mono] [modern-light,latin-modern-light-designsize,latin-modern-light] [\s!name]
- \loadfontgoodies[lm]
- \definefontsynonym [\s!Mono] [LMTypewriter-Light] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBold] [LMTypewriter-Light] [\s!features=\s!none]
- \definefontsynonym [\s!MonoItalic] [LMTypewriter-LightOblique] [\s!features=\s!none]
- \definefontsynonym [\s!MonoSlanted] [LMTypewriter-LightOblique] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBoldItalic] [LMTypewriter-Light] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBoldSlanted] [LMTypewriter-Light] [\s!features=\s!none]
- \definefontsynonym [\s!MonoCaps] [LMTypewriter-Light] [\s!features=\s!none]
- \definefontsynonym [MonoCapsSlanted] [LMTypewriter-Light] [\s!features=\s!none]
- \stoptypescript
-
- % why not also [name]
-
- \starttypescript [\s!serif] [modern,latin-modern]
- \loadfontgoodies[lm]
- \definefontsynonym [LMRoman-Regular] [\s!file:lmroman10-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman-Bold] [\s!file:lmroman10-bold] [\s!features=\s!default]
- \definefontsynonym [LMRoman-Demi] [\s!file:lmromandemi10-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman-Italic] [\s!file:lmroman10-italic] [\s!features=\s!default]
- \definefontsynonym [LMRoman-Oblique] [\s!file:lmromanslant10-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman-BoldItalic] [\s!file:lmroman10-bolditalic] [\s!features=\s!default]
- \definefontsynonym [LMRoman-BoldOblique] [\s!file:lmromanslant10-bold] [\s!features=\s!default]
- \definefontsynonym [LMRoman-DemiOblique] [\s!file:lmromandemi10-oblique] [\s!features=\s!default]
- \definefontsynonym [LMRoman-CapsRegular] [\s!file:lmroman10-CapsRegular] [\s!features=\s!default]
- \definefontsynonym [LMRoman-CapsOblique] [\s!file:lmroman10-CapsOblique] [\s!features=\s!default]
- \definefontsynonym [LMRoman-CapsRegular] [\s!file:lmromancaps10-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman-CapsOblique] [\s!file:lmromancaps10-oblique] [\s!features=\s!default]
- \definefontsynonym [LMRoman-Dunhill] [\s!file:lmromandunh10-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman-DunhillOblique] [\s!file:lmromandunh10-oblique] [\s!features=\s!default]
- \definefontsynonym [LMRoman-Unslanted] [\s!file:lmromanunsl10-regular] [\s!features=\s!default]
-
- \stoptypescript
-
- \starttypescript [\s!sans] [modern,latin-modern]
- \loadfontgoodies[lm]
- \definefontsynonym [LMSans-Regular] [\s!file:lmsans10-regular] [\s!features=\s!default]
- \definefontsynonym [LMSans-Bold] [\s!file:lmsans10-bold] [\s!features=\s!default]
- \definefontsynonym [LMSans-Oblique] [\s!file:lmsans10-oblique] [\s!features=\s!default]
- \definefontsynonym [LMSans-BoldOblique] [\s!file:lmsans10-boldoblique] [\s!features=\s!default]
- \definefontsynonym [LMSans-DemiCondensed] [\s!file:lmsansdemicond10-regular] [\s!features=\s!default]
- \definefontsynonym [LMSans-DemiCondensedOblique] [\s!file:lmsansdemicond10-oblique] [\s!features=\s!default]
- \definefontsynonym [LMSansQuotation-Regular] [\s!file:lmsansquot8-regular] [\s!features=\s!default]
- \definefontsynonym [LMSansQuotation-Bold] [\s!file:lmsansquot8-bold] [\s!features=\s!default]
- \definefontsynonym [LMSansQuotation-Oblique] [\s!file:lmsansquot8-oblique] [\s!features=\s!default]
- \definefontsynonym [LMSansQuotation-BoldOblique] [\s!file:lmsansquot8-boldoblique] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!mono] [modern,latin-modern,modern-variable,latin-modern-variable,modern-condensed,latin-modern-condensed]
- \definefontsynonym [LMTypewriter-Regular] [\s!file:lmmono10-regular] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter-Italic] [\s!file:lmmono10-italic] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter-Oblique] [\s!file:lmmonoslant10-regular] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter-CapsRegular] [\s!file:lmmonocaps10-regular] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter-CapsOblique] [\s!file:lmmonocaps10-oblique] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter-Light] [\s!file:lmmonolt10-regular] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter-LightOblique] [\s!file:lmmonolt10-oblique] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter-LightCondensed] [\s!file:lmmonoltcond10-regular] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter-LightCondensedOblique] [\s!file:lmmonoltcond10-oblique] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter-Dark] [\s!file:lmmonolt10-bold] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter-DarkOblique] [\s!file:lmmonolt10-boldoblique] [\s!features=\s!none]
- \definefontsynonym [LMTypewriterVarWd-Regular] [\s!file:lmmonoproplt10-regular] [\s!features=\s!default]
- \definefontsynonym [LMTypewriterVarWd-Oblique] [\s!file:lmmonoproplt10-oblique] [\s!features=\s!default]
- \definefontsynonym [LMTypewriterVarWd-Light] [\s!file:lmmonoprop10-regular] [\s!features=\s!default]
- \definefontsynonym [LMTypewriterVarWd-LightOblique] [\s!file:lmmonoprop10-oblique] [\s!features=\s!default]
- \definefontsynonym [LMTypewriterVarWd-Dark] [\s!file:lmmonoproplt10-bold] [\s!features=\s!default]
- \definefontsynonym [LMTypewriterVarWd-DarkOblique] [\s!file:lmmonoproplt10-boldoblique] [\s!features=\s!default]
- \stoptypescript
-
-% \starttypescript [\s!math] [modern,latin-modern]
-% \loadfontgoodies[lm]
-% \definefontsynonym [LMMathRoman-Regular] [\v!file:latinmodern-math-regular.otf] [\s!features=\s!math\mathsizesuffix,\s!goodies=lm]
-% \definefontsynonym [LMMathRoman-Bold] [\v!file:latinmodern-math-regular.otf] [\s!features=\s!math\mathsizesuffix,\s!goodies=lm]
-% \stoptypescript
-
- \starttypescript [\s!math] [modern,latin-modern]
- \loadfontgoodies[lm]
- \definefontsynonym [LMMathRoman-Regular] [\v!file:latinmodern-math-regular.otf] [\s!features={\s!math\mathsizesuffix,lm-math},\s!goodies=lm]
- \definefontsynonym [LMMathRoman-Bold] [\v!file:latinmodern-math-regular.otf] [\s!features={\s!math\mathsizesuffix,lm-math},\s!goodies=lm]
- \stoptypescript
-
- \starttypescript [modern-designsize-virtual]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [latin-modern-designsize] [\s!default] [\s!designsize=\s!auto]
- \definetypeface [\typescriptone] [\s!ss] [\s!sans] [latin-modern-designsize] [\s!default] [\s!designsize=\s!auto]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [latin-modern-designsize] [\s!default] [\s!designsize=\s!auto]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [latin-modern-designsize] [\s!default] [\s!designsize=\s!auto]
- \quittypescriptscanning
- \stoptypescript
-
- \starttypescript [modern-designsize]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [latin-modern-designsize] [\s!default] [\s!designsize=\s!auto]
- \definetypeface [\typescriptone] [\s!ss] [\s!sans] [latin-modern-designsize] [\s!default] [\s!designsize=\s!auto]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [latin-modern-designsize] [\s!default] [\s!designsize=\s!auto]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
- \starttypescript [modern,modern-base]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern] [\s!default]
- \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
- \starttypescript [modernvariable,modern-variable]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern-variable] [\s!default]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern-variable] [\s!default]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
- \starttypescript [modernvariablelight,modern-variable-light]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern-variable-light] [\s!default]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern-variable-light] [\s!default]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
- \starttypescript [modern-mono,modern-base-mono]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern] [\s!default]
- \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern-light] [\s!default]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
-\stoptypescriptcollection
-
-%D It doesn't hurt to have these, at least for the moment (can go to type-imp-symbol)
-
-\definefontsynonym [ZapfDingbats] [\s!file:uzdr] [\s!features=dingbats]% [\s!goodies=dingbats]
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/type-imp-lato.mkiv b/Master/texmf-dist/tex/context/base/type-imp-lato.mkiv
deleted file mode 100644
index 8fb8647fceb..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-lato.mkiv
+++ /dev/null
@@ -1,56 +0,0 @@
-%D \module
-%D [ file=type-imp-lato,
-%D version=2014.05.02,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Lato fonts,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% hai : hair / lta : italic
-% lig : light / lta : italic
-% reg : regular / lta : italic
-% bol : bold / lta : italic
-% bla : black / lta : italic
-
-\loadtypescriptfile[dejavu]
-\loadtypescriptfile[xits]
-
-\starttypescriptcollection[lato]
-
- \starttypescript [\s!sans] [lato] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [\s!file:lato-reg] [\s!features=\s!default]
- \definefontsynonym [\s!SansBold] [\s!file:lato-bol] [\s!features=\s!default]
- \definefontsynonym [\s!SansItalic] [\s!file:lato-reglta] [\s!features=\s!default]
- \definefontsynonym [\s!SansBoldItalic] [\s!file:lato-bollta] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!sans] [lato-light] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [\s!file:lato-lig] [\s!features=\s!default]
- \definefontsynonym [\s!SansBold] [\s!file:lato-reg] [\s!features=\s!default]
- \definefontsynonym [\s!SansItalic] [\s!file:lato-liglta] [\s!features=\s!default]
- \definefontsynonym [\s!SansBoldItalic] [\s!file:lato-reglta] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!sans] [lato-dark] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [\s!file:lato-bol] [\s!features=\s!default]
- \definefontsynonym [\s!SansBold] [\s!file:lato-bla] [\s!features=\s!default]
- \definefontsynonym [\s!SansItalic] [\s!file:lato-bollta] [\s!features=\s!default]
- \definefontsynonym [\s!SansBoldItalic] [\s!file:lato-blalta] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript[lato,lato-light,lato-dark]
- \definetypeface [\typescriptone] [\s!ss] [\s!sans] [\typescriptone] [\s!default]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [dejavu] [\s!default]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [xits] [\s!default] [\s!rscale=1.2]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-liberation.mkiv b/Master/texmf-dist/tex/context/base/type-imp-liberation.mkiv
deleted file mode 100644
index cc2c01b7bd3..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-liberation.mkiv
+++ /dev/null
@@ -1,47 +0,0 @@
-%D \module
-%D [ file=type-imp-liberation,
-%D version=2010.06.21,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Liberation fonts,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\starttypescriptcollection[liberation]
-
- \starttypescript [\s!serif] [liberation] [\s!name]
- \setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym [\s!Serif] [\s!file:liberationserif-regular] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBold] [\s!file:liberationserif-bold] [\s!features=\s!default]
- \definefontsynonym [\s!SerifItalic] [\s!file:liberationserif-italic] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldItalic] [\s!file:liberationserif-bolditalic] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!sans] [liberation] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [\s!file:liberationsans-regular] [\s!features=\s!default]
- \definefontsynonym [\s!SansBold] [\s!file:liberationsans-bold] [\s!features=\s!default]
- \definefontsynonym [\s!SansItalic] [\s!file:liberationsans-italic] [\s!features=\s!default]
- \definefontsynonym [\s!SansBoldItalic] [\s!file:liberationsans-bolditalic] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!mono] [liberation] [\s!name]
- \setups[\s!font:\s!fallback:\s!mono]
- \definefontsynonym [\s!Mono] [\s!file:liberationmono-regular] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBold] [\s!file:liberationmono-bold] [\s!features=\s!none]
- \definefontsynonym [\s!MonoItalic] [\s!file:liberationmono-italic] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBoldItalic] [\s!file:liberationmono-bolditalic] [\s!features=\s!none]
- \stoptypescript
-
- \starttypescript[liberation]
- \definetypeface [liberation] [\s!rm] [\s!serif] [liberation] [\s!default]
- \definetypeface [liberation] [\s!ss] [\s!sans] [liberation] [\s!default] [\s!rscale=0.870]
- \definetypeface [liberation] [\s!tt] [\s!mono] [liberation] [\s!default] [\s!rscale=0.870]
- \definetypeface [liberation] [\s!mm] [\s!math] [times] [\s!default] [\s!rscale=1.040]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-libertine.mkiv b/Master/texmf-dist/tex/context/base/type-imp-libertine.mkiv
deleted file mode 100644
index be92c27c730..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-libertine.mkiv
+++ /dev/null
@@ -1,63 +0,0 @@
-%D \module
-%D [ file=type-imp-libertine,
-%D version=2010.06.21,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Libertine fonts,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\starttypescriptcollection[libertine]
-
- \starttypescript [\s!serif] [libertine]
- \definefontsynonym [Libertine-Regular] [\s!file:linlibertiner]
- \definefontsynonym [Libertine-Italic] [\s!file:linlibertineri]
- \definefontsynonym [Libertine-Slanted] [\s!file:linlibertinearl]
- \definefontsynonym [Libertine-Bold] [\s!file:linlibertinerb]
- \definefontsynonym [Libertine-BoldItalic] [\s!file:linlibertinerbi]
- \definefontsynonym [Libertine-BoldSlanted] [\s!file:linlibertineabl]
- \stoptypescript
-
- \starttypescript [\s!serif] [libertine] [\s!name]
- \setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym [\s!Serif] [Libertine-Regular] [\s!features=\s!default]
- \definefontsynonym [\s!SerifItalic] [Libertine-Italic] [\s!features=\s!default]
- \definefontsynonym [\s!SerifSlanted] [Libertine-Slanted] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBold] [Libertine-Bold] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldItalic] [Libertine-BoldItalic] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldSlanted] [Libertine-BoldSlanted] [\s!features=\s!default]
- \definefontsynonym [SerifCaps] [Libertine-Regular] [\s!features=\s!smallcaps]
- \stoptypescript
-
- \starttypescript [\s!sans] [biolinum]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [Biolinum-Regular] [\s!file:linbiolinumr]
- \definefontsynonym [Biolinum-Bold] [\s!file:linbiolinumrb]
- \definefontsynonym [Biolinum-Italic] [\s!file:linbiolinumri]
- \definefontsynonym [Biolinum-Slanted] [\s!file:linbiolinumarl]
- \definefontsynonym [Biolinum-BoldSlanted] [\s!file:linbiolinumabl]
- \stoptypescript
-
- \starttypescript [\s!sans] [biolinum] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [Biolinum-Regular] [\s!features=\s!default]
- \definefontsynonym [\s!SansBold] [Biolinum-Bold] [\s!features=\s!default]
- \definefontsynonym [\s!SansItalic] [Biolinum-Italic] [\s!features=\s!default]
- \definefontsynonym [\s!SansSlanted] [Biolinum-Slanted] [\s!features=\s!default]
- \definefontsynonym [\s!SansBoldItalic] [Biolinum-BoldSlanted] [\s!features=\s!default]
- \definefontsynonym [SansCaps] [Biolinum-Regular] [\s!features=\s!smallcaps]
- \stoptypescript
-
- \starttypescript [libertine]
- \definetypeface [libertine] [\s!rm] [\s!serif] [libertine] [\s!default]
- \definetypeface [libertine] [\s!ss] [\s!sans] [biolinum] [\s!default]
- \definetypeface [libertine] [\s!tt] [\s!mono] [default] [\s!default]
- %definetypeface [libertine] [\s!mm] [\s!math] [times] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-lmnames.mkiv b/Master/texmf-dist/tex/context/base/type-imp-lmnames.mkiv
deleted file mode 100644
index 11ba93c348b..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-lmnames.mkiv
+++ /dev/null
@@ -1,129 +0,0 @@
-%D \module
-%D [ file=type-otf,
-%D version=2007.07.30,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Opentype Definitions,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\starttypescriptcollection[latinmodern-names]
-
- \starttypescript [\s!serif] [modern,latin-modern-designsize,latin-modern]
-
- \definefontsynonym [LMRoman5-Regular] [\s!file:lmroman5-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman6-Regular] [\s!file:lmroman6-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman7-Regular] [\s!file:lmroman7-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman8-Regular] [\s!file:lmroman8-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman9-Regular] [\s!file:lmroman9-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman10-Regular] [\s!file:lmroman10-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman12-Regular] [\s!file:lmroman12-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman17-Regular] [\s!file:lmroman17-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman5-Bold] [\s!file:lmroman5-bold] [\s!features=\s!default]
- \definefontsynonym [LMRoman6-Bold] [\s!file:lmroman6-bold] [\s!features=\s!default]
- \definefontsynonym [LMRoman7-Bold] [\s!file:lmroman7-bold] [\s!features=\s!default]
- \definefontsynonym [LMRoman8-Bold] [\s!file:lmroman8-bold] [\s!features=\s!default]
- \definefontsynonym [LMRoman9-Bold] [\s!file:lmroman9-bold] [\s!features=\s!default]
- \definefontsynonym [LMRoman10-Bold] [\s!file:lmroman10-bold] [\s!features=\s!default]
- \definefontsynonym [LMRoman12-Bold] [\s!file:lmroman12-bold] [\s!features=\s!default]
- \definefontsynonym [LMRoman7-Italic] [\s!file:lmroman7-italic] [\s!features=\s!default]
- \definefontsynonym [LMRoman8-Italic] [\s!file:lmroman8-italic] [\s!features=\s!default]
- \definefontsynonym [LMRoman9-Italic] [\s!file:lmroman9-italic] [\s!features=\s!default]
- \definefontsynonym [LMRoman10-Italic] [\s!file:lmroman10-italic] [\s!features=\s!default]
- \definefontsynonym [LMRoman12-Italic] [\s!file:lmroman12-italic] [\s!features=\s!default]
- \definefontsynonym [LMRoman10-BoldItalic] [\s!file:lmroman10-bolditalic] [\s!features=\s!default]
- \definefontsynonym [LMRoman8-Oblique] [\s!file:lmromanslant8-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman9-Oblique] [\s!file:lmromanslant9-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman10-Oblique] [\s!file:lmromanslant10-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman12-Oblique] [\s!file:lmromanslant12-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman17-Oblique] [\s!file:lmromanslant17-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman10-BoldOblique] [\s!file:lmromanslant10-bold] [\s!features=\s!default]
- \definefontsynonym [LMRoman10-Demi] [\s!file:lmromandemi10-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman10-DemiOblique] [\s!file:lmromandemi10-oblique] [\s!features=\s!default]
- \definefontsynonym [LMRoman10-CapsRegular] [\s!file:lmromancaps10-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman10-CapsOblique] [\s!file:lmromancaps10-oblique] [\s!features=\s!default]
- \definefontsynonym [LMRoman10-Dunhill] [\s!file:lmromandunh10-regular] [\s!features=\s!default]
- \definefontsynonym [LMRoman10-DunhillOblique] [\s!file:lmromandunh10-oblique] [\s!features=\s!default]
- \definefontsynonym [LMRoman10-Unslanted] [\s!file:lmromanunsl10-regular] [\s!features=\s!default]
-
- \stoptypescript
-
- \starttypescript [\s!sans] [modern,latin-modern-designsize,latin-modern]
-
- \definefontsynonym [LMSans8-Regular] [\s!file:lmsans8-regular] [\s!features=\s!default]
- \definefontsynonym [LMSans9-Regular] [\s!file:lmsans9-regular] [\s!features=\s!default]
- \definefontsynonym [LMSans10-Regular] [\s!file:lmsans10-regular] [\s!features=\s!default]
- \definefontsynonym [LMSans12-Regular] [\s!file:lmsans12-regular] [\s!features=\s!default]
- \definefontsynonym [LMSans17-Regular] [\s!file:lmsans17-regular] [\s!features=\s!default]
- \definefontsynonym [LMSans10-Bold] [\s!file:lmsans10-bold] [\s!features=\s!default]
- \definefontsynonym [LMSans8-Oblique] [\s!file:lmsans8-oblique] [\s!features=\s!default]
- \definefontsynonym [LMSans9-Oblique] [\s!file:lmsans9-oblique] [\s!features=\s!default]
- \definefontsynonym [LMSans10-Oblique] [\s!file:lmsans10-oblique] [\s!features=\s!default]
- \definefontsynonym [LMSans12-Oblique] [\s!file:lmsans12-oblique] [\s!features=\s!default]
- \definefontsynonym [LMSans17-Oblique] [\s!file:lmsans17-oblique] [\s!features=\s!default]
- \definefontsynonym [LMSans10-BoldOblique] [\s!file:lmsans10-boldoblique] [\s!features=\s!default]
- \definefontsynonym [LMSans10-DemiCondensed] [\s!file:lmsansdemicond10-regular] [\s!features=\s!default]
- \definefontsynonym [LMSans10-DemiCondensedOblique] [\s!file:lmsansdemicond10-oblique] [\s!features=\s!default]
- \definefontsynonym [LMSansQuotation8-Regular] [\s!file:lmsansquot8-regular] [\s!features=\s!default]
- \definefontsynonym [LMSansQuotation8-Bold] [\s!file:lmsansquot8-bold] [\s!features=\s!default]
- \definefontsynonym [LMSansQuotation8-Oblique] [\s!file:lmsansquot8-oblique] [\s!features=\s!default]
- \definefontsynonym [LMSansQuotation8-BoldOblique] [\s!file:lmsansquot8-boldoblique] [\s!features=\s!default]
-
- \stoptypescript
-
- \starttypescript [\s!mono] [modern,latin-modern-designsize,latin-modern,modern-variable,modern-condensed,latin-modern-variable,latin-modern-condensed]
-
- \definefontsynonym [LMTypewriter8-Regular] [\s!file:lmmono8-regular] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter9-Regular] [\s!file:lmmono9-regular] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter10-Regular] [\s!file:lmmono10-regular] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter12-Regular] [\s!file:lmmono12-regular] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter10-Italic] [\s!file:lmmono10-italic] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter10-Oblique] [\s!file:lmmonoslant10-regular] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter10-CapsRegular] [\s!file:lmmonocaps10-regular] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter10-CapsOblique] [\s!file:lmmonocaps10-oblique] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter10-Light] [\s!file:lmmonolt10-regular] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter10-LightOblique] [\s!file:lmmonolt10-oblique] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter10-LightCondensed] [\s!file:lmmonoltcond10-regular] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter10-LightCondensedOblique] [\s!file:lmmonoltcond10-oblique] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter10-Dark] [\s!file:lmmonolt10-bold] [\s!features=\s!none]
- \definefontsynonym [LMTypewriter10-DarkOblique] [\s!file:lmmonolt10-boldoblique] [\s!features=\s!none]
- \definefontsynonym [LMTypewriterVarWd10-Regular] [\s!file:lmmonoproplt10-regular] [\s!features=\s!default]
- \definefontsynonym [LMTypewriterVarWd10-Oblique] [\s!file:lmmonoproplt10-oblique] [\s!features=\s!default]
- \definefontsynonym [LMTypewriterVarWd10-Light] [\s!file:lmmonoprop10-regular] [\s!features=\s!default]
- \definefontsynonym [LMTypewriterVarWd10-LightOblique] [\s!file:lmmonoprop10-oblique] [\s!features=\s!default]
- \definefontsynonym [LMTypewriterVarWd10-Dark] [\s!file:lmmonoproplt10-bold] [\s!features=\s!default]
- \definefontsynonym [LMTypewriterVarWd10-DarkOblique] [\s!file:lmmonoproplt10-boldoblique] [\s!features=\s!default]
-
- \stoptypescript
-
- \starttypescript [\s!math] [modern,latin-modern]
-
- \definefontsynonym [LMMathRoman5-Regular] [LMMath5-Regular@lmroman5-math]
- \definefontsynonym [LMMathRoman6-Regular] [LMMath6-Regular@lmroman6-math]
- \definefontsynonym [LMMathRoman7-Regular] [LMMath7-Regular@lmroman7-math]
- \definefontsynonym [LMMathRoman8-Regular] [LMMath8-Regular@lmroman8-math]
- \definefontsynonym [LMMathRoman9-Regular] [LMMath9-Regular@lmroman9-math]
- \definefontsynonym [LMMathRoman10-Regular] [LMMath10-Regular@lmroman10-math]
- \definefontsynonym [LMMathRoman12-Regular] [LMMath12-Regular@lmroman12-math]
- \definefontsynonym [LMMathRoman17-Regular] [LMMath17-Regular@lmroman17-math]
-
- % we no longer care to provide pseudo full bold
-
- \definefontsynonym [LMMathRoman5-Bold] [LMMathRoman5-Regular]
- \definefontsynonym [LMMathRoman6-Bold] [LMMathRoman6-Regular]
- \definefontsynonym [LMMathRoman7-Bold] [LMMathRoman7-Regular]
- \definefontsynonym [LMMathRoman8-Bold] [LMMathRoman8-Regular]
- \definefontsynonym [LMMathRoman9-Bold] [LMMathRoman9-Regular]
- \definefontsynonym [LMMathRoman10-Bold] [LMMathRoman10-Regular]
- \definefontsynonym [LMMathRoman12-Bold] [LMMathRoman12-Regular]
- \definefontsynonym [LMMathRoman17-Bold] [LMMathRoman17-Regular]
-
- \loadfontgoodies[lm-math]
-
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-lucida-opentype.mkiv b/Master/texmf-dist/tex/context/base/type-imp-lucida-opentype.mkiv
deleted file mode 100644
index 63a331cad6b..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-lucida-opentype.mkiv
+++ /dev/null
@@ -1,92 +0,0 @@
-%D \module
-%D [ file=type-lucida-opentype,
-%D version=2011.05.18,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Lucida Nova Opentype,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% NOTA BENE: class feattures and goodies get expanded!
-
-\starttypescriptcollection[lucida-opentype]
-
- \starttypescript [lucidanova,lucidaot,otlucida]
- \loadfontgoodies[lucida-opentype-math]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default] [\s!features=\s!default]
- \definetypeface [\typescriptone] [\s!ss] [\s!sans] [\typescriptone] [\s!default] [\s!features=\s!default]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [\typescriptone] [\s!default] [\s!features=\s!none]
- \definetypeface [\typescriptone] [\s!hw] [\s!handwriting] [\typescriptone] [\s!default] [\s!features=\s!default]
- \definetypeface [\typescriptone] [\s!cg] [\s!calligraphy] [\typescriptone] [\s!default] [\s!features=\s!default]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [\typescriptone] [\s!default]
- % for the moment here:
- \setupmathrendering[\typescriptone][\s!it=\s!italic]
- \quittypescriptscanning
- \stoptypescript
-
- \starttypescript [\s!serif] [lucidanova,lucidaot,otlucida]
- \definefontsynonym [\s!Serif] [\s!file:LucidaBrightOT.otf]
- \definefontsynonym [\s!SerifBold] [\s!file:LucidaBrightOT-Demi.otf]
- \definefontsynonym [\s!SerifItalic] [\s!file:LucidaBrightOT-Italic.otf]
- \definefontsynonym [\s!SerifBoldItalic] [\s!file:LucidaBrightOT-DemiItalic.otf]
- \definefontsynonym [\s!SerifSlanted] [\s!SerifItalic]
- \definefontsynonym [\s!SerifBoldSlanted] [\s!SerifBoldItalic]
- \stoptypescript
-
- \starttypescript [\s!sans] [lucidanova,lucidaot,otlucida]
- \definefontsynonym [\s!Sans] [\s!file:LucidaSansOT.otf]
- \definefontsynonym [\s!SansBold] [\s!file:LucidaSansOT-Demi.otf]
- \definefontsynonym [\s!SansItalic] [\s!file:LucidaSansOT-Italic.otf]
- \definefontsynonym [\s!SansBoldItalic] [\s!file:LucidaSansOT-DemiItalic.otf]
- \definefontsynonym [\s!SansSlanted] [\s!SansItalic]
- \definefontsynonym [\s!SansBoldSlanted] [\s!SansBoldItalic]
- \stoptypescript
-
- \starttypescript [\s!mono] [lucidanova,lucidaot,otlucida]
- \definefontsynonym [\s!Mono] [\s!file:LucidaSansTypewriterOT.otf]
- \definefontsynonym [\s!MonoBold] [\s!file:LucidaSansTypewriterOT-Bold.otf]
- \definefontsynonym [\s!MonoItalic] [\s!file:LucidaSansTypewriterOT-Oblique.otf]
- \definefontsynonym [\s!MonoBoldItalic] [\s!file:LucidaSansTypewriterOT-BoldOblique.otf]
- \definefontsynonym [\s!MonoSlanted] [\s!MonoItalic]
- \definefontsynonym [\s!MonoBoldSlanted] [\s!MonoBoldItalic]
- \stoptypescript
-
- \starttypescript [\s!math] [lucidanova,lucidaot,otlucida]
- \definefontsynonym [\s!MathRoman] [\s!file:LucidaBrightMathOT.otf] [\s!features=\s!math\mathsizesuffix,\s!goodies=lucida-opentype-math]
- \definefontsynonym [\s!MathRomanBold] [\s!file:LucidaBrightMathOT-Demi.otf] [\s!features=\s!math\mathsizesuffix,\s!goodies=lucida-opentype-math]
- \stoptypescript
-
- \starttypescript [\s!handwriting] [lucidanova,lucidaot,otlucida]
- \definefontsynonym [\s!Handwriting] [\s!file:LucidaHandwritingOT.otf]
- \stoptypescript
-
- \starttypescript [\s!calligraphy] [lucidanova,lucidaot,otlucida]
- \definefontsynonym [\s!Calligraphy] [\s!file:LucidaCalligraphyOT.otf]
- \stoptypescript
-
-\stoptypescriptcollection
-
-\endinput
-
-\starttext
-
- \setupbodyfont[lucidanova]
-
-% \showfont[Serif][all]
-% \showfont[MathRoman][all]
-
- \usemodule[fnt-31]
-
- \startluacode
- fonts.tracers.coverage {
- "LucidaMathOT.otf",
- "LucidaBrightOT.otf",
- "LucidaSansOT-Typewriter.otf",
- }
- \stopluacode
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/type-imp-lucida-typeone.mkiv b/Master/texmf-dist/tex/context/base/type-imp-lucida-typeone.mkiv
deleted file mode 100644
index 5f28b9eedcb..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-lucida-typeone.mkiv
+++ /dev/null
@@ -1,134 +0,0 @@
-%D \module
-%D [ file=type-imp-lucida-typeone,
-%D version=2010.06.21,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Lucida,
-%D author=Mojca Miklavec \& Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\starttypescriptcollection[lucida-typeone]
-
- \starttypescript [\s!serif] [lucida]
- \definefontsynonym [LucidaBright] [\s!name:LucidaBright]
- \definefontsynonym [LucidaBright-Demi] [\s!name:LucidaBright-Demi]
- \definefontsynonym [LucidaBright-Italic] [\s!name:LucidaBright-Italic]
- \definefontsynonym [LucidaBright-DemiItalic] [\s!name:LucidaBright-DemiItalic]
- \definefontsynonym [LucidaBright-Oblique] [\s!name:LucidaBright-Oblique]
- \definefontsynonym [LucidaBrightSmallcaps] [\s!name:LucidaBrightSmallcaps]
- \definefontsynonym [LucidaBrightSmallcaps-Demi] [\s!name:LucidaBrightSmallcaps-Demi]
- \stoptypescript
-
- \starttypescript [\s!sans] [lucida]
- \definefontsynonym [LucidaSans] [\s!name:LucidaSans]
- \definefontsynonym [LucidaSans-Demi] [\s!name:LucidaSans-Demi]
- \definefontsynonym [LucidaSans-Bold] [\s!name:LucidaSans-Bold]
- \definefontsynonym [LucidaSans-Italic] [\s!name:LucidaSans-Italic]
- \definefontsynonym [LucidaSans-DemiItalic] [\s!name:LucidaSans-DemiItalic]
- \definefontsynonym [LucidaSans-BoldItalic] [\s!name:LucidaSans-BoldItalic]
- \stoptypescript
-
- \starttypescript [\s!mono] [lucida]
- \definefontsynonym [LucidaTypewriter] [\s!name:LucidaTypewriter]
- \definefontsynonym [LucidaTypewriterBold] [\s!name:LucidaTypewriterBold]
- \definefontsynonym [LucidaTypewriterOblique] [\s!name:LucidaTypewriterOblique]
- \definefontsynonym [LucidaTypewriterBoldOblique] [\s!name:LucidaTypewriterBoldOblique]
- \stoptypescript
-
- \starttypescript [\s!mono] [lucida]
- \definefontsynonym [LucidaSans-Typewriter] [\s!name:LucidaSans-Typewriter]
- \definefontsynonym [LucidaSans-TypewriterBold] [\s!name:LucidaSans-TypewriterBold]
- \definefontsynonym [LucidaSans-TypewriterOblique] [\s!name:LucidaSans-TypewriterOblique]
- \definefontsynonym [LucidaSans-TypewriterBoldOblique] [\s!name:LucidaSans-TypewriterBoldOblique]
- \stoptypescript
-
- \starttypescript [calligraphy] [lucida]
- \definefontsynonym [LucidaCalligraphy-Italic] [\s!name:LucidaCalligraphy-Italic]
- \stoptypescript
-
- \starttypescript [casual] [lucida]
- \definefontsynonym [LucidaCasual] [\s!name:LucidaCasual]
- \definefontsynonym [LucidaCasual-Italic] [\s!name:LucidaCasual-Italic]
- \stoptypescript
-
- \starttypescript [handwriting] [lucida]
- \definefontsynonym [LucidaHandwriting-Italic] [\s!name:LucidaHandwriting-Italic]
- \stoptypescript
-
- \starttypescript [fax] [lucida]
- \definefontsynonym [LucidaFax] [\s!name:LucidaFax]
- \definefontsynonym [LucidaFax-Demi] [\s!name:LucidaFax-Demi]
- \definefontsynonym [LucidaFax-Italic] [\s!name:LucidaFax-Italic]
- \definefontsynonym [LucidaFax-DemiItalic] [\s!name:LucidaFax-DemiItalic]
- \stoptypescript
-
- \starttypescript [blackletter] [lucida]
- \definefontsynonym [LucidaBlackletter] [\s!name:LucidaBlackletter]
- \stoptypescript
-
- \starttypescript [\s!math] [lucida]
- \loadfontgoodies[lucida-typeone-math]
- \definefontsynonym[\s!MathRoman][lucidamath@lucida-math]
- \stoptypescript
-
- \starttypescript [\s!serif] [lucida] [\s!name]
- \definefontsynonym [\s!Serif] [LucidaBright]
- \definefontsynonym [\s!SerifBold] [LucidaBright-Demi]
- \definefontsynonym [\s!SerifItalic] [LucidaBright-Italic]
- \definefontsynonym [\s!SerifBoldItalic] [LucidaBright-DemiItalic]
- \definefontsynonym [\s!SerifSlanted] [LucidaBright-Oblique]
- \definefontsynonym [\s!SerifBoldSlanted] [LucidaBright-DemiItalic]
- \definefontsynonym [SerifCaps] [LucidaBrightSmallcaps]
- \definefontsynonym [SerifBoldCaps] [LucidaBrightSmallcaps-Demi]
- \stoptypescript
-
- % Lucida Bright Sans
-
- \starttypescript [\s!sans] [lucida] [\s!name]
- \definefontsynonym [\s!Sans] [LucidaSans]
- \definefontsynonym [\s!SansBold] [LucidaSans-Demi]
- \definefontsynonym [\s!SansItalic] [LucidaSans-Italic]
- \definefontsynonym [\s!SansBoldItalic] [LucidaSans-DemiItalic]
- \definefontsynonym [\s!SansSlanted] [LucidaSans-Italic]
- \definefontsynonym [\s!SansBoldSlanted] [LucidaSans-DemiItalic]
- \definefontsynonym [SansCaps] [LucidaSans]
- \stoptypescript
-
- % Lucida Bright Sans Typewriter
-
- \starttypescript [\s!mono] [lucida] [\s!name]
- \definefontsynonym [\s!Mono] [LucidaSans-Typewriter]
- \definefontsynonym [\s!MonoBold] [LucidaSans-TypewriterBold]
- \definefontsynonym [\s!MonoItalic] [LucidaSans-TypewriterOblique]
- \definefontsynonym [\s!MonoBoldItalic] [LucidaSans-TypewriterBoldOblique]
- \definefontsynonym [\s!MonoSlanted] [LucidaSans-TypewriterOblique]
- \definefontsynonym [\s!MonoBoldSlanted] [LucidaSans-TypewriterBoldOblique]
- \definefontsynonym [MonoCaps] [LucidaSans-Typewriter]
- \stoptypescript
-
- % Lucida Calligraphy
-
- \starttypescript [calligraphy] [lucida] [\s!name]
- \definefontsynonym [Calligraphy] [LucidaCalligraphy-Italic]
- \stoptypescript
-
- % Lucida Handwriting
-
- \starttypescript [handwriting] [lucida] [\s!name]
- \definefontsynonym [Handwriting] [LucidaHandwriting-Italic]
- \stoptypescript
-
- \starttypescript [lucida]
- \definetypeface [lucida] [\s!rm] [\s!serif] [lucida] [\s!default] [\s!features=\s!default]
- \definetypeface [lucida] [\s!ss] [\s!sans] [lucida] [\s!default] [\s!features=\s!default]
- \definetypeface [lucida] [\s!tt] [\s!mono] [lucida] [\s!default] [\s!features=\s!none]
- \definetypeface [lucida] [\s!hw] [\s!handwriting] [lucida] [\s!default] [\s!features=\s!default]
- \definetypeface [lucida] [\s!cg] [\s!calligraphy] [lucida] [\s!default] [\s!features=\s!default]
- \definetypeface [lucida] [\s!mm] [\s!math] [lucida] [\s!default]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-mathdesign.mkiv b/Master/texmf-dist/tex/context/base/type-imp-mathdesign.mkiv
deleted file mode 100644
index 00e753e75a8..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-mathdesign.mkiv
+++ /dev/null
@@ -1,133 +0,0 @@
-%D \module
-%D [ file=type-imp-mathdesign,
-%D version=2013.11.03,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Mathdesign,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\starttypescriptcollection [mathdesign]
-
- % Bistream Charter
-
- \starttypescript [\s!serif] [charter]
- \definefontsynonym [Charter-Regular] [\s!file:bchr8a.afm]
- \definefontsynonym [Charter-Italic] [\s!file:bchri8a.afm]
- \definefontsynonym [Charter-Bold] [\s!file:bchb8a.afm]
- \definefontsynonym [Charter-BoldItalic] [\s!file:bchbi8a.afm]
- \stoptypescript
-
- \starttypescript [\s!serif] [charter] [\s!name]
- \setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym [\s!Serif] [Charter-Regular]
- \definefontsynonym [\s!SerifItalic] [Charter-Italic]
- \definefontsynonym [\s!SerifBold] [Charter-Bold]
- \definefontsynonym [\s!SerifBoldItalic] [Charter-BoldItalic]
- \stoptypescript
-
- \starttypescript [\s!math] [mdbch,mathdesignch,charter] [\s!all]
- \loadfontgoodies[mdbch-math]
- \definefontsynonym [\s!MathRoman] [mdbchrm@mdbch-rm]
- \definefontsynonym [\s!MathRomanBold] [mdbchbf@mdbch-bf]
- \stoptypescript
-
- \starttypescript [mathdesignch,charter]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [charter] [\s!default]
- \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [charter] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
- % URW Garamond
-
- \starttypescript [\s!serif] [garamond]
- \definefontsynonym [Garamond-Regular] [\s!file:ugmr8a.afm]
- \definefontsynonym [Garamond-Italic] [\s!file:ugmri8a.afm]
- \definefontsynonym [Garamond-Bold] [\s!file:bchb8a.afm]
- \definefontsynonym [Garamond-BoldItalic] [\s!file:ugmmi8a.afm]
- \stoptypescript
-
- \starttypescript [\s!serif] [garamond] [\s!name]
- \setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym [\s!Serif] [Garamond-Regular]
- \definefontsynonym [\s!SerifItalic] [Garamond-Italic]
- \definefontsynonym [\s!SerifBold] [Garamond-Bold]
- \definefontsynonym [\s!SerifBoldItalic] [Garamond-BoldItalic]
- \stoptypescript
-
- \starttypescript [\s!math] [mdugm,mathdesigngm,garamond] [\s!all]
- \loadfontgoodies[mdugm-math]
- \definefontsynonym [\s!MathRoman] [mdugmrm@mdugm-rm]
- \definefontsynonym [\s!MathRomanBold] [mdugmbf@mdugm-bf]
- \stoptypescript
-
- \starttypescript [mathdesigngm,garamond]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [garamond] [\s!default]
- \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [garamond] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
- % Adobe Utopia
-
- \starttypescript [\s!serif] [utopia]
- \definefontsynonym [Utopia-Regular] [\s!file:putr8a.afm]
- \definefontsynonym [Utopia-Italic] [\s!file:putri8a.afm]
- \definefontsynonym [Utopia-Bold] [\s!file:putb8a.afm]
- \definefontsynonym [Utopia-BoldItalic] [\s!file:putbi8a.afm]
- \stoptypescript
-
- \starttypescript [\s!serif] [utopia] [\s!name]
- \setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym [\s!Serif] [Utopia-Regular]
- \definefontsynonym [\s!SerifItalic] [Utopia-Italic]
- \definefontsynonym [\s!SerifBold] [Utopia-Bold]
- \definefontsynonym [\s!SerifBoldItalic] [Utopia-BoldItalic]
- \stoptypescript
-
- \starttypescript [\s!math] [mdput,mathdesignut,utopia] [\s!all]
- \loadfontgoodies[mdput-math]
- \definefontsynonym [\s!MathRoman] [mdputrm@mdput-rm]
- \definefontsynonym [\s!MathRomanBold] [mdputbf@mdput-bf]
- \stoptypescript
-
- \starttypescript [mathdesignut,utopia]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [utopia] [\s!default]
- \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [utopia] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
- % Charter ITC Std
-
- \starttypescript [\s!math] [mdici,mathdesignci] [\s!all]
- \loadfontgoodies[mdici-math]
- \definefontsynonym [\s!MathRoman] [mdicirm@mdici-rm]
- \definefontsynonym [\s!MathRomanBold] [mdicibf@mdici-bf]
- \stoptypescript
-
- % Adobe Garamond Pro
-
- \starttypescript [\s!math] [mdpgd,mathdesigngd] [\s!all]
- \loadfontgoodies[mdpgd-math]
- \definefontsynonym [\s!MathRoman] [mdpgdrm@mdpgd-rm]
- \definefontsynonym [\s!MathRomanBold] [mdpgdbf@mdpgd-bf]
- \stoptypescript
-
- % Adobe Utopia Std
-
- \starttypescript [\s!math] [mdpus,mathdesignus] [\s!all]
- \loadfontgoodies[mdpus-math]
- \definefontsynonym [\s!MathRoman] [mdpusrm@mdpus-rm]
- \definefontsynonym [\s!MathRomanBold] [mdpusbf@mdpus-bf]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-mathdigits.mkiv b/Master/texmf-dist/tex/context/base/type-imp-mathdigits.mkiv
deleted file mode 100644
index 7a7e6b764bb..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-mathdigits.mkiv
+++ /dev/null
@@ -1,53 +0,0 @@
-%D \module
-%D [ file=type-imp-hvmath,
-%D version=2007.07.30,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Xits,
-%D author=Khaled Hosny \& Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% \starttypescript [math] [xits] [name]
-% \definefontsynonym[MathRoman][file:xits-math.otf][features=math\mathsizesuffix,goodies=xits-math,fallbacks=mathdigits]
-% \stoptypescript
-%
-% \usetypescript [mathdigits][dejavu][arabicindic]
-
-% \definefontsynonym [MathRomanDigitsXitsDejavu] [file:xits-math.otf] [features=math\mathsizesuffix,goodies=xits-math,fallbacks=mathdigits]
-%
-% \starttypescript [math] [xits] [name]
-% \definefontsynonym [MathRoman] [MathRomanDigitsXitsDejavu]
-% \stoptypescript
-%
-% \usetypescript [mathdigits][dejavu][arabicindic]
-
-\starttypescriptcollection[mathdigits]
-
- \starttypescript [mathdigits] [dejavu] [arabicindic,extendedarabicindic]
- \resetfontfallback [mathdigits]
- \definefontfallback [mathdigits] [dejavusansmono] [digits\typescriptthree] [check=yes,force=yes,offset=digitsnormal]
- \definefontfallback [mathdigits] [dejavusansmonobold] [digits\typescriptthree] [check=yes,force=yes,offset=digitsbold]
- \stoptypescript
-
- \starttypescript [mathdigits] [xits-dejavu] [arabicindic,extendedarabicindic]
- \usetypescript [mathdigits] [dejavu] [\typescriptthree]
- \definefontsynonym[MathRoman][file:xits-math.otf][features=math\mathsizesuffix,goodies=xits-math,fallbacks=mathdigits]
- \stoptypescript
-
-\stoptypescriptcollection
-
-\continueifinputfile{type-imp-mathdigits.mkiv}
-
-% \usetypescriptfile[mathdigits]
-
-\usetypescript [mathdigits] [xits-dejavu] [arabicindic]
-
-\setupbodyfont[dejavu]
-
-\starttext
- $3+2=5 \quad \bf 3+2=5$
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/type-imp-mathtimes.mkiv b/Master/texmf-dist/tex/context/base/type-imp-mathtimes.mkiv
deleted file mode 100644
index 21288277289..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-mathtimes.mkiv
+++ /dev/null
@@ -1,31 +0,0 @@
-%D \module
-%D [ file=type-imp-mathtimes,
-%D version=2007.07.30,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Math Times,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\loadtypescriptfile[texgyre]
-
-\starttypescriptcollection[mathtimes]
-
- \starttypescript [\s!math] [mathtimes] [\s!all]
- \loadfontgoodies[mathtimes-math]
- \definefontsynonym[\s!MathRoman][mathtimes@mathtimes-math]
- \stoptypescript
-
- \starttypescript [mathtimes]
- \definetypeface [mathtimes] [\s!rm] [\s!serif] [times] [\s!default]
- \definetypeface [mathtimes] [\s!ss] [\s!sans] [helvetica] [\s!default] [\s!rscale=0.9]
- \definetypeface [mathtimes] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.05]
- \definetypeface [mathtimes] [\s!mm] [\s!math] [mathtimes] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-mscore.mkiv b/Master/texmf-dist/tex/context/base/type-imp-mscore.mkiv
deleted file mode 100644
index 19276c01722..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-mscore.mkiv
+++ /dev/null
@@ -1,64 +0,0 @@
-%D \module
-%D [ file=type-imp-mscore,
-%D version=2007.07.30,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Microsoft Core Fonts,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\starttypescriptcollection[mscore]
-
- % .ttf not really needed but we want to force the originals
-
- \starttypescript [\s!serif] [mscoretimes] [\s!name]
- \setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym [\s!Serif] [\s!file:times.ttf] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBold] [\s!file:timesbd.ttf] [\s!features=\s!default]
- \definefontsynonym [\s!SerifItalic] [\s!file:timesi.ttf] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldItalic] [\s!file:timesbi.ttf] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!sans] [mscorearial] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [\s!file:arial.ttf] [\s!features=\s!default]
- \definefontsynonym [\s!SansBold] [\s!file:arialbd.ttf] [\s!features=\s!default]
- \definefontsynonym [\s!SansItalic] [\s!file:ariali.ttf] [\s!features=\s!default]
- \definefontsynonym [\s!SansBoldItalic] [\s!file:arialbi.ttf] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!mono] [mscorecourier] [\s!name]
- \setups[\s!font:\s!fallback:\s!mono]
- \definefontsynonym [\s!Mono] [\s!file:cour.ttf] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBold] [\s!file:courbd.ttf] [\s!features=\s!none]
- \definefontsynonym [\s!MonoItalic] [\s!file:couri.ttf] [\s!features=\s!none]
- \definefontsynonym [\s!MonoBoldItalic] [\s!file:courbi.ttf] [\s!features=\s!none]
- \stoptypescript
-
- \starttypescript [\s!sans] [mscoreverdana] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [\s!file:verdana.ttf] [\s!features=\s!default]
- \definefontsynonym [\s!SansBold] [\s!file:verdanab.ttf] [\s!features=\s!default]
- \definefontsynonym [\s!SansItalic] [\s!file:verdanai.ttf] [\s!features=\s!default]
- \definefontsynonym [\s!SansBoldItalic] [\s!file:verdanaz.ttf] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript[mscore]
- \definetypeface [mscore] [\s!rm] [\s!serif] [mscoretimes] [\s!default]
- \definetypeface [mscore] [\s!ss] [\s!sans] [mscorearial] [\s!default] [\s!rscale=0.860]
- \definetypeface [mscore] [\s!tt] [\s!mono] [mscorecourier] [\s!default] [\s!rscale=1.065]
- \definetypeface [mscore] [\s!mm] [\s!math] [times] [\s!default] [\s!rscale=1.020]
- \stoptypescript
-
- % \starttypescript[mscoress]
- % \definetypeface [mscoress] [\s!ss] [\s!sans] [mscorearial] [\s!default]
- % \definetypeface [mscoress] [\s!rm] [\s!serif] [mscoretimes] [\s!default] [rscale=1.160]
- % \definetypeface [mscoress] [\s!tt] [\s!mono] [mscorecourier] [\s!default] [rscale=1.240]
- % \definetypeface [mscoress] [\s!mm] [\s!math] [times] [\s!default] [rscale=1.185]
- % \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-opendyslexic.mkiv b/Master/texmf-dist/tex/context/base/type-imp-opendyslexic.mkiv
deleted file mode 100644
index 770d43c6ce4..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-opendyslexic.mkiv
+++ /dev/null
@@ -1,39 +0,0 @@
-%D \module
-%D [ file=type-imp-opendyslexic,
-%D version=2013.05.02,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Opendyslexic Fonts,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\starttypescriptcollection[opendyslexic]
-
- \starttypescript [\s!serif] [opendyslexic] [\s!name]
- \setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym [\s!Serif] [\s!file:opendyslexic-regular.otf] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBold] [\s!file:opendyslexic-bold.otf] [\s!features=\s!default]
- \definefontsynonym [\s!SerifItalic] [\s!file:opendyslexic-italic.otf] [\s!features=\s!default]
- \definefontsynonym [\s!SerifBoldItalic] [\s!file:opendyslexic-bolditalic.otf] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!sans] [opendyslexic] [\s!name]
- \setups[\s!font:\s!fallback:\s!sans]
- \definefontsynonym [\s!Sans] [\s!file:opendyslexicalta-regular.otf] [\s!features=\s!default]
- \definefontsynonym [\s!SansBold] [\s!file:opendyslexicalta-bold.otf] [\s!features=\s!default]
- \definefontsynonym [\s!SansItalic] [\s!file:opendyslexicalta-italic.otf] [\s!features=\s!default]
- \definefontsynonym [\s!SansBoldItalic] [\s!file:opendyslexicalta-bolditalic.otf] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript[opendyslexic]
- \definetypeface [opendyslexic] [\s!rm] [\s!serif] [opendyslexic] [\s!default]
- \definetypeface [opendyslexic] [\s!ss] [\s!sans] [opendyslexic] [\s!default]
- \definetypeface [opendyslexic] [\s!tt] [\s!mono] [dejavu] [\s!default]% [rscale=1.065]
- \definetypeface [opendyslexic] [\s!mm] [\s!math] [xits] [\s!default]% [rscale=1.020]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-osx.mkiv b/Master/texmf-dist/tex/context/base/type-imp-osx.mkiv
deleted file mode 100644
index 16b8e054582..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-osx.mkiv
+++ /dev/null
@@ -1,567 +0,0 @@
-%D \module
-%D [ file=type-mac,
-%D version=2009.03.10,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Mac OS X Definitions,
-%D author=Wolfgang Schuster,
-%D date=\currentdate,
-%D copyright={Wolfgang Schuster}]
-%C
-%C This module is part of the \CONTEXT\ macro||package. See
-%C mreadme.pdf for details.
-
-\starttypescriptcollection [macosx]
-
-% American Typewriter
-
-\starttypescript [serif] [americantypewriter-light-condensed,americantypewriter-condensed,americantypewriter-light,americantypewriter]
- \definefontsynonym [AmericanTypewriter-Light] [name:americantypewriterlight] [features=default]
- \definefontsynonym [AmericanTypewriter-Regular] [name:americantypewriter] [features=default]
- \definefontsynonym [AmericanTypewriter-Bold] [name:americantypewriterbold] [features=default]
- \definefontsynonym [AmericanTypewriter-LightCond] [name:americantypewritercondensedlight] [features=default]
- \definefontsynonym [AmericanTypewriter-Condensed] [name:americantypewritercondensed] [features=default]
- \definefontsynonym [AmericanTypewriter-BoldCond] [name:americantypewritercondensedbold] [features=default]
-\stoptypescript
-
-\starttypescript [serif] [americantypewriter-light-condensed]
- \setups[font:fallback:serif]
- \definefontsynonym [Serif] [AmericanTypewriter-LightCond] [features=default]
- \definefontsynonym [SerifBold] [AmericanTypewriter-Condensed] [features=default]
-\stoptypescript
-
-\starttypescript [serif] [americantypewriter-condensed]
- \setups[font:fallback:serif]
- \definefontsynonym [Serif] [AmericanTypewriter-Condensed] [features=default]
- \definefontsynonym [SerifBold] [AmericanTypewriter-BoldCond] [features=default]
-\stoptypescript
-
-\starttypescript [serif] [americantypewriter-light]
- \setups[font:fallback:serif]
- \definefontsynonym [Serif] [AmericanTypewriter-Light] [features=default]
- \definefontsynonym [SerifBold] [AmericanTypewriter-Regular] [features=default]
-\stoptypescript
-
-\starttypescript [serif] [americantypewriter]
- \setups[font:fallback:serif]
- \definefontsynonym [Serif] [AmericanTypewriter-Regular] [features=default]
- \definefontsynonym [SerifBold] [AmericanTypewriter-Bold] [features=default]
-\stoptypescript
-
-\starttypescript [americantypewriter-light-condensed,americantypewriter-condensed,americantypewriter-light,americantypewriter]
- \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
-\stoptypescript
-
-% Arial / Arial Narrow / Arial Rounded / Arial Unicode
-
-\starttypescript [sans] [arial-narrow,arial-condensed,arial,arial-rounded,arial-unicode]
- \definefontsynonym [Arial-Condensed] [name:arialnarrow] [features=default]
- \definefontsynonym [Arial-ItalicCond] [name:arialnarrowitalic] [features=default]
- \definefontsynonym [Arial-BoldCond] [name:arialnarrowbold] [features=default]
- \definefontsynonym [Arial-BoldItalicCond] [name:arialnarrowbolditalic] [features=default]
- \definefontsynonym [Arial-Regular] [name:arial] [features=default]
- \definefontsynonym [Arial-Italic] [name:arialitalic] [features=default]
- \definefontsynonym [Arial-Bold] [name:arialbold] [features=default]
- \definefontsynonym [Arial-BoldItalic] [name:arialbolditalic] [features=default]
- \definefontsynonym [Arial-Black] [name:arialblack] [features=default]
- \definefontsynonym [Arial-Unicode] [name:arialunicodems] [features=default]
- \definefontsynonym [Arial-Rounded] [name:arialroundedmtbold] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [arial-narrow,arial-condensed]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Arial-Condensed] [features=default]
- \definefontsynonym [SansItalic] [Arial-ItalicCond] [features=default]
- \definefontsynonym [SansBold] [Arial-BoldCond] [features=default]
- \definefontsynonym [SansBoldItalic] [Arial-BoldItalicCond] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [arial]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Arial-Regular] [features=default]
- \definefontsynonym [SansItalic] [Arial-Italic] [features=default]
- \definefontsynonym [SansBold] [Arial-Bold] [features=default]
- \definefontsynonym [SansBoldItalic] [Arial-BoldItalic] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [arial-rounded]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Arial-Rounded] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [arial-unicode]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Arial-Unicode] [features=default]
-\stoptypescript
-
-\starttypescript [arial-narrow,arial-condensed,arial,arial-rounded,arial-unicode]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Baskerville
-
-\starttypescript [serif] [baskerville]
- \definefontsynonym [Baskerville-Regular] [name:baskerville] [features=default]
- \definefontsynonym [Baskerville-Italic] [name:baskervilleitalic] [features=default]
- \definefontsynonym [Baskerville-Medium] [name:baskervillesemibold] [features=default]
- \definefontsynonym [Baskerville-MediumItalic] [name:baskervillesemibolditalic] [features=default]
- \definefontsynonym [Baskerville-Bold] [name:baskervillebold] [features=default]
- \definefontsynonym [Baskerville-BoldItalic] [name:baskervillebolditalic] [features=default]
-\stoptypescript
-
-\starttypescript [serif] [baskerville]
- \setups[font:fallback:serif]
- \definefontsynonym [Serif] [Baskerville-Regular] [features=default]
- \definefontsynonym [SerifItalic] [Baskerville-Italic] [features=default]
- \definefontsynonym [SerifBold] [Baskerville-Medium] [features=default]
- \definefontsynonym [SerifBoldItalic] [Baskerville-MediumItalic] [features=default]
-\stoptypescript
-
-\starttypescript [baskerville]
- \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
-\stoptypescript
-
-% Big Caslon
-
-\starttypescript [serif] [caslon,bigcaslon]
- \definefontsynonym [BigCaslon-Medium] [name:bigcaslonmedium] [features=default]
-\stoptypescript
-
-\starttypescript [serif] [caslon,bigcaslon]
- \setups[font:fallback:serif]
- \definefontsynonym [Serif] [BigCaslon-Medium] [features=default]
-\stoptypescript
-
-\starttypescript [caslon,bigcaslon]
- \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
-\stoptypescript
-
-% Copperplate
-
-\starttypescript [sans] [copperplate-light,copperplate]
- \definefontsynonym [Copperplate-Light] [name:copperplatelight] [features=default]
- \definefontsynonym [Copperplate-Regular] [name:copperplate] [features=default]
- \definefontsynonym [Copperplate-Bold] [name:copperplatebold] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [copperplate-light]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Copperplate-Light] [features=default]
- \definefontsynonym [SansBold] [Copperplate-Regular] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [copperplate]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Copperplate-Regular] [features=default]
- \definefontsynonym [SansBold] [Copperplate-Bold] [features=default]
-\stoptypescript
-
-\starttypescript [copperplate-light,copperplate]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Futura
-
-\starttypescript [sans] [futura-condensed,futura]
- \definefontsynonym [Futura-MediumCond] [name:futuracondensedmedium] [features=default]
- \definefontsynonym [Futura-Medium] [name:futuramedium] [features=default]
- \definefontsynonym [Futura-MediumItalic] [name:futuramediumitalic] [features=default]
- \definefontsynonym [Futura-BoldCond] [name:futuracondensedextrabold] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [futura-condensed]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Futura-MediumCond] [features=default]
- \definefontsynonym [SansBold] [Futura-BoldCond] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [futura]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Futura-Medium] [features=default]
- \definefontsynonym [SansItalic] [Futura-MediumItalic] [features=default]
-\stoptypescript
-
-\starttypescript [futura-condensed,futura]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Gill Sans
-
-\starttypescript [sans] [gillsans-light,gillsans]
- \definefontsynonym [GillSans-Light] [name:gillsanslight] [features=default]
- \definefontsynonym [GillSans-LightItalic] [name:gillsanslightitalic] [features=default]
- \definefontsynonym [GillSans-Regular] [name:gillsans] [features=default]
- \definefontsynonym [GillSans-Italic] [name:gillsansitalic] [features=default]
- \definefontsynonym [GillSans-Bold] [name:gillsansbold] [features=default]
- \definefontsynonym [GillSans-BoldItalic] [name:gillsansbolditalic] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [gillsans-light]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [GillSans-Light] [features=default]
- \definefontsynonym [SansItalic] [GillSans-LightItalic] [features=default]
- \definefontsynonym [SansBold] [GillSans-Regular] [features=default]
- \definefontsynonym [SansBoldItalic] [GillSans-Italic] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [gillsans]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [GillSans-Regular] [features=default]
- \definefontsynonym [SansItalic] [GillSans-Italic] [features=default]
- \definefontsynonym [SansBold] [GillSans-Bold] [features=default]
- \definefontsynonym [SansBoldItalic] [GillSans-BoldItalic] [features=default]
-\stoptypescript
-
-\starttypescript [gillsans-light,gillsans]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Helvetica Neuse
-
-\starttypescript [sans] [helvetica-neue-ultralight,helvetica-neue-light,helvetica-neue,helvetica-neue-boldcondensed]
- \definefontsynonym [HelveticaNeue-UltraLight] [name:helveticaneueultralight] [features=default]
- \definefontsynonym [HelveticaNeue-UltraLightItalic] [name:helveticaneueultralightitalic] [features=default]
- \definefontsynonym [HelveticaNeue-Light] [name:helveticaneuelight] [features=default]
- \definefontsynonym [HelveticaNeue-LightItalic] [name:helveticaneuelightitalic] [features=default]
- \definefontsynonym [HelveticaNeue-Regular] [name:helveticaneue] [features=default]
- \definefontsynonym [HelveticaNeue-Italic] [name:helveticaneueitalic] [features=default]
- \definefontsynonym [HelveticaNeue-Bold] [name:helveticaneuebold] [features=default]
- \definefontsynonym [HelveticaNeue-BoldItalic] [name:helveticaneuebolditalic] [features=default]
- \definefontsynonym [HelveticaNeue-BoldCond] [name:helveticaneuecondensedbold] [features=default]
- \definefontsynonym [HelveticaNeue-BlackCond] [name:helveticaneuecondensedblack] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [helvetica-neue-ultralight]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [HelveticaNeue-UltraLight] [features=default]
- \definefontsynonym [SansItalic] [HelveticaNeue-UltraLightItalic] [features=default]
- \definefontsynonym [SansBold] [HelveticaNeue-Light] [features=default]
- \definefontsynonym [SansBoldItalic] [HelveticaNeue-LightItalic] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [helvetica-neue-light]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [HelveticaNeue-Light] [features=default]
- \definefontsynonym [SansItalic] [HelveticaNeue-LightItalic] [features=default]
- \definefontsynonym [SansBold] [HelveticaNeue-Regular] [features=default]
- \definefontsynonym [SansBoldItalic] [HelveticaNeue-Italic] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [helvetica-neue]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [HelveticaNeue-Regular] [features=default]
- \definefontsynonym [SansItalic] [HelveticaNeue-Italic] [features=default]
- \definefontsynonym [SansBold] [HelveticaNeue-Bold] [features=default]
- \definefontsynonym [SansBoldItalic] [HelveticaNeue-BoldItalic] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [helvetica-neue-boldcondensed]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [HelveticaNeue-BoldCond] [features=default]
- \definefontsynonym [SansBold] [HelveticaNeue-BlackCond] [features=default]
-\stoptypescript
-
-\starttypescript [helvetica-neue-ultralight,helvetica-neue-light,helvetica-neue,helvetica-neue-boldcondensed]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Hiragino Mincho
-
-\starttypescript [serif] [hiragino-mincho]
- \definefontsynonym [HiraginoMinchoPro-Regular] [name:hiraminprow3] [features=japanese]
- \definefontsynonym [HiraginoMinchoPro-Bold] [name:hiraminprow6] [features=japanese]
- \definefontsynonym [HiraginoMinchoProN-Regular] [name:hiraminpronw3] [features=japanese]
- \definefontsynonym [HiraginoMinchoProN-Bold] [name:hiraminpronw6] [features=japanese]
-\stoptypescript
-
-\starttypescript [serif] [hiragino-mincho]
- \setups[font:fallback:serif]
- \definefontsynonym [Serif] [HiraginoMinchoPro-Regular] [features=japanese]
- \definefontsynonym [SerifBold] [HiraginoMinchoPro-Bold] [features=japanese]
-\stoptypescript
-
-% \starttypescript [serif] [hiragino-mincho]
-% \setups[font:fallback:serif]
-% \definefontsynonym [Serif] [HiraginoMinchoProN-Regular] [features=japanese]
-% \definefontsynonym [SerifBold] [HiraginoMinchoProN-Bold] [features=japanese]
-% \stoptypescript
-
-\starttypescript [hiragino-mincho]
- \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
-\stoptypescript
-
-% Hiragino Maru
-
-\starttypescript [sans] [hiragino-maru]
- \definefontsynonym [HiraginoMaruGothicPro-Regular] [name:hiramaruprow4] [features=japanese]
- \definefontsynonym [HiraginoMaruGothicProN-Regular] [name:hiramarupronw4] [features=japanese]
-\stoptypescript
-
-\starttypescript [sans] [hiragino-maru]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [HiraginoMaruGothicPro-Regular] [features=japanese]
-\stoptypescript
-
-% \starttypescript [sans] [hiragino-maru]
-% \setups[font:fallback:sans]
-% \definefontsynonym [Sans] [HiraginoMaruGothicProN-Regular] [features=japanese]
-% \stoptypescript
-
-\starttypescript [hiragino-maru]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Hiragino Kaku
-
-\starttypescript [sans] [hiragino-kaku]
- \definefontsynonym [HiraginoKakuGothicPro-Regular] [name:hirakakuprow3] [features=japanese]
- \definefontsynonym [HiraginoKakuGothicPro-Bold] [name:hirakakuprow6] [features=japanese]
- \definefontsynonym [HiraginoKakuGothicStd-Black] [name:hirakakustdw8] [features=japanese]
- \definefontsynonym [HiraginoKakuGothicProN-Regular] [name:hirakakupronw3] [features=japanese]
- \definefontsynonym [HiraginoKakuGothicProN-Bold] [name:hirakakupronw6] [features=japanese]
- \definefontsynonym [HiraginoKakuGothicStdN-Black] [name:hirakakustdnw8] [features=japanese]
-\stoptypescript
-
-\starttypescript [sans] [hiragino-kaku]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [HiraginoKakuGothicPro-Regular] [features=japanese]
- \definefontsynonym [SansBold] [HiraginoKakuGothicPro-Bold] [features=japanese]
-\stoptypescript
-
-% \starttypescript [sans] [hiragino-kaku]
-% \setups[font:fallback:sans]
-% \definefontsynonym [Sans] [HiraginoKakuGothicProN-Regular] [features=japanese]
-% \definefontsynonym [SansBold] [HiraginoKakuGothicProN-Bold] [features=japanese]
-% \stoptypescript
-
-\starttypescript [hiragino-kaku]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Hoefler Text
-
-\starttypescript [serif] [hoefler]
- \definefontsynonym [HoeflerText-Regular] [name:hoeflertext] [features=default]
- \definefontsynonym [HoeflerText-Italic] [name:hoeflertextitalic] [features=default]
- \definefontsynonym [HoeflerText-Black] [name:hoeflertextblack] [features=default]
- \definefontsynonym [HoeflerText-BlackItalic] [name:hoeflertextblackitalic] [features=default]
- \definefontsynonym [HoeflerText-Ornaments] [name:hoeflertextornaments] [features=default]
-\stoptypescript
-
-\starttypescript [serif] [hoefler]
- \setups[font:fallback:serif]
- \definefontsynonym [Serif] [HoeflerText-Regular] [features=default]
- \definefontsynonym [SerifItalic] [HoeflerText-Italic] [features=default]
- \definefontsynonym [SerifBold] [HoeflerText-Black] [features=default]
- \definefontsynonym [SerifBoldItalic] [HoeflerText-BlackItalic] [features=default]
-\stoptypescript
-
-\starttypescript [hoefler]
- \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
-\stoptypescript
-
-% Impact
-
-\starttypescript [sans] [impact]
- \definefontsynonym [Impact-Regular] [name:impact] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [impact]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Impact-Regular] [features=default]
-\stoptypescript
-
-\starttypescript [impact]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Andale Mono / Monaco
-
-\starttypescript [mono] [andalemono,monaco]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular] [name:\typescriptprefix{f:\typescripttwo}] [features=default]
-\stoptypescript
-
-\starttypescript [mono] [andalemono,monaco]
- \setups[font:fallback:mono]
- \definefontsynonym [Mono] [\typescriptprefix{n:\typescripttwo}-Regular] [features=default]
-\stoptypescript
-
-\starttypescript [andalemono,monaco]
- \definetypeface [\typescriptone] [tt] [mono] [\typescriptone] [default]
-\stoptypescript
-
-% Optima
-
-\starttypescript [sans] [optima,optima-bold]
- \definefontsynonym [Optima-Regular] [name:optimaregular] [features=default]
- \definefontsynonym [Optima-Italic] [name:optimaitalic] [features=default]
- \definefontsynonym [Optima-Bold] [name:optimabold] [features=default]
- \definefontsynonym [Optima-BoldItalic] [name:optimabolditalic] [features=default]
- \definefontsynonym [Optima-Black] [name:optimaextrablack] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [optima]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Optima-Regular] [features=default]
- \definefontsynonym [SansItalic] [Optima-Italic] [features=default]
- \definefontsynonym [SansBold] [Optima-Bold] [features=default]
- \definefontsynonym [SansBoldItalic] [Optima-BoldItalic] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [optima-bold]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Optima-Bold] [features=default]
- \definefontsynonym [SansItalic] [Optima-BoldItalic] [features=default]
- \definefontsynonym [SansBold] [Optima-Black] [features=default]
-\stoptypescript
-
-\starttypescript [optima,optima-bold]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Papyrus
-
-\starttypescript [sans] [papyrus]
- \definefontsynonym [Papyrus-Regular] [name:papyrus] [features=default]
- \definefontsynonym [Papyrus-Condensed] [name:papyruscondensed] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [papyrus]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Papyrus-Regular] [features=default]
-\stoptypescript
-
-\starttypescript [papyrus]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% STFangsong
-
-\starttypescript [serif] [stfangsong]
- \definefontsynonym [STFangsong-Regular] [name:stfangsong] [features=chinese]
-\stoptypescript
-
-\starttypescript [serif] [stfangsong]
- \setups[font:fallback:sans]
- \definefontsynonym [Serif] [STFangsong-Regular] [features=chinese]
-\stoptypescript
-
-\starttypescript [stfangsong]
- \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
-\stoptypescript
-
-% STHeiti
-
-\starttypescript [sans] [stheiti]
- \definefontsynonym [STXihei-Light] [name:stxihei] [features=chinese]
- \definefontsynonym [STHeiti-Regular] [name:stheiti] [features=chinese]
-\stoptypescript
-
-\starttypescript [sans] [stheiti]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [STXihei-Light] [features=chinese]
- \definefontsynonym [SansBold] [STKaiti-Regular] [features=chinese]
-\stoptypescript
-
-\starttypescript [stheiti]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% STKaiti
-
-\starttypescript [serif] [stkaiti]
- \definefontsynonym [STKaiti-Regular] [name:stkaiti] [features=chinese]
-\stoptypescript
-
-\starttypescript [serif] [stkaiti]
- \setups[font:fallback:sans]
- \definefontsynonym [Serif] [STKaiti-Regular] [features=chinese]
-\stoptypescript
-
-\starttypescript [stkaiti]
- \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
-\stoptypescript
-
-% STSong
-
-\starttypescript [serif] [stsong]
- \definefontsynonym [STSong-Regular] [name:stsong] [features=chinese]
-\stoptypescript
-
-\starttypescript [serif] [stsong]
- \setups[font:fallback:sans]
- \definefontsynonym [Serif] [STSong-Regular] [features=chinese]
-\stoptypescript
-
-\starttypescript [stsong]
- \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
-\stoptypescript
-
-% Chalkboard / Comic Sans / Tahoma
-
-\starttypescript [sans] [chalkboard,comicsans,tahoma]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular] [name:\typescriptprefix{f:\typescripttwo}] [features=default]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Bold] [name:\typescriptprefix{f:\typescripttwo}bold] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [chalkboard,comicsans,lucidagrande,tahoma]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [\typescriptprefix{n:\typescripttwo}-Regular] [features=default]
- \definefontsynonym [SansBold] [\typescriptprefix{n:\typescripttwo}-Bold] [features=default]
-\stoptypescript
-
-\starttypescript [chalkboard,comicsans,tahoma]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Cochin / Courier New / Georgia / Times New Roman / Trebuchet / Verdana
-
-\starttypescript [serif,sans,mono] [cochin,georgia,timesnewroman,trebuchet,verdana,couriernew]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular] [name:\typescriptprefix{f:\typescripttwo}] [features=default]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Italic] [name:\typescriptprefix{f:\typescripttwo}italic] [features=default]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Bold] [name:\typescriptprefix{f:\typescripttwo}bold] [features=default]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldItalic] [name:\typescriptprefix{f:\typescripttwo}bolditalic] [features=default]
-\stoptypescript
-
-\starttypescript [serif] [cochin,georgia,timesnewroman]
- \setups[font:fallback:serif]
- \definefontsynonym [Serif] [\typescriptprefix{n:\typescripttwo}-Regular] [features=default]
- \definefontsynonym [SerifItalic] [\typescriptprefix{n:\typescripttwo}-Italic] [features=default]
- \definefontsynonym [SerifBold] [\typescriptprefix{n:\typescripttwo}-Bold] [features=default]
- \definefontsynonym [SerifBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalic] [features=default]
-\stoptypescript
-
-\starttypescript [cochin,georgia,timesnewroman]
- \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
-\stoptypescript
-
-% Courier New
-
-% \starttypescript [mono] [couriernew]
-% \setups[font:fallback:mono]
-% \definefontsynonym [Mono] [\typescriptprefix{n:\typescripttwo}-Regular] [features=default]
-% \definefontsynonym [MonoItalic] [\typescriptprefix{n:\typescripttwo}-Italic] [features=default]
-% \definefontsynonym [MonoBold] [\typescriptprefix{n:\typescripttwo}-Bold] [features=default]
-% \definefontsynonym [MonoBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalic] [features=default]
-% \stoptypescript
-
-% \starttypescript [couriernew]
-% \definetypeface [\typescriptone] [tt] [mono] [\typescriptone] [default]
-% \stoptypescript
-
-% Trebuchet / Verdana
-
-% \starttypescript [sans] [trebuchet,verdana]
-% \setups[font:fallback:sans]
-% \definefontsynonym [Sans] [\typescriptprefix{n:\typescripttwo}-Regular] [features=default]
-% \definefontsynonym [SansItalic] [\typescriptprefix{n:\typescripttwo}-Italic] [features=default]
-% \definefontsynonym [SansBold] [\typescriptprefix{n:\typescripttwo}-Bold] [features=default]
-% \definefontsynonym [SansBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalic] [features=default]
-% \stoptypescript
-
-% \starttypescript [trebuchet,verdana]
-% \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-% \stoptypescript
-
-\stoptypescriptcollection
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/type-imp-postscript.mkiv b/Master/texmf-dist/tex/context/base/type-imp-postscript.mkiv
deleted file mode 100644
index c53b8951996..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-postscript.mkiv
+++ /dev/null
@@ -1,26 +0,0 @@
-%D \module
-%D [ file=type-imp-postscript,
-%D version=2007.07.30,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Basic Font Set,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\loadtypescriptfile[texgyre]
-
-\starttypescriptcollection[postscript]
-
- \starttypescript [postscript]
- \definetypeface [postscript] [\s!rm] [\s!serif] [times] [\s!default]
- \definetypeface [postscript] [\s!ss] [\s!sans] [helvetica] [\s!default] [\s!rscale=0.9]
- \definetypeface [postscript] [\s!tt] [\s!mono] [courier] [\s!default] [\s!rscale=1.1]
- \definetypeface [postscript] [\s!mm] [\s!math] [times] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-punknova.mkiv b/Master/texmf-dist/tex/context/base/type-imp-punknova.mkiv
deleted file mode 100644
index 8d95bf88568..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-punknova.mkiv
+++ /dev/null
@@ -1,34 +0,0 @@
-%D \module
-%D [ file=type-imp-punknova,
-%D version=2010.06.21,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Punk Nova,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 file defined the Punk made by Khaled Hosny based on the
-%D \METAPOST\ output from a (slightly) adapted punk font.
-
-\starttypescriptcollection[punknova]
-
- \definefontfeature [punknova] [mode=node,script=latn,rand=yes,kern=yes,liga=yes,tlig=yes]
-
- \starttypescript [\s!serif] [punknova]
- \definefontsynonym [\s!Serif] [\s!file:punknova-regular] [\s!features=punknova]
- \definefontsynonym [\s!SerifSlanted] [\s!file:punknova-slanted] [\s!features=punknova]
- \definefontsynonym [\s!SerifBold] [\s!file:punknova-bold] [\s!features=punknova]
- \definefontsynonym [\s!SerifBoldSlanted][\s!file:punknova-boldslanted] [\s!features=punknova]
- \definefontsynonym [\s!SerifItalic] [\s!SerifSlanted]
- \definefontsynonym [\s!SerifBoldItalic] [\s!SerifBoldSlanted]
- \stoptypescript
-
- \starttypescript [punknova]
- \definetypeface [punknova] [\s!rm] [\s!serif] [punknova] [\s!default]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-texgyre.mkiv b/Master/texmf-dist/tex/context/base/type-imp-texgyre.mkiv
deleted file mode 100644
index 247b4ef2101..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-texgyre.mkiv
+++ /dev/null
@@ -1,288 +0,0 @@
-%D \module
-%D [ file=type-imp-texgyre,
-%D version=2007.07.30,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=\TEX Gyre Fonts,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 There are some weird ones that are never used .. all these Caps ... we can better
-%D split them into pagella-caps etc.
-
-\starttypescriptcollection[texgyre]
-
- \definetypescriptprefix [f:pagella] [pagella]
- \definetypescriptprefix [f:termes] [termes]
- \definetypescriptprefix [f:heros] [heros]
- \definetypescriptprefix [f:bonum] [bonum]
- \definetypescriptprefix [f:schola] [schola]
- \definetypescriptprefix [f:adventor][adventor]
- \definetypescriptprefix [f:cursor] [cursor]
- \definetypescriptprefix [f:chorus] [chorus]
-
- \definetypescriptprefix [f:palatino] [pagella]
- \definetypescriptprefix [f:times] [termes]
- \definetypescriptprefix [f:helvetica] [heros]
- \definetypescriptprefix [f:bookman] [bonum]
- \definetypescriptprefix [f:schoolbook] [schola]
- \definetypescriptprefix [f:avantgarde] [adventor]
- \definetypescriptprefix [f:courier] [cursor]
- \definetypescriptprefix [f:chancery] [chorus]
-
- \definetypescriptprefix [n:pagella] [TeXGyrePagella]
- \definetypescriptprefix [n:termes] [TeXGyreTermes]
- \definetypescriptprefix [n:heros] [TeXGyreHeros]
- \definetypescriptprefix [n:bonum] [TeXGyreBonum]
- \definetypescriptprefix [n:schola] [TeXGyreSchola]
- \definetypescriptprefix [n:adventor] [TeXGyreAdventor]
- \definetypescriptprefix [n:cursor] [TeXGyreCursor]
- \definetypescriptprefix [n:chorus] [TeXGyreChorus]
-
- \definetypescriptprefix [n:palatino] [TeXGyrePagella]
- \definetypescriptprefix [n:times] [TeXGyreTermes]
- \definetypescriptprefix [n:helvetica] [TeXGyreHeros]
- \definetypescriptprefix [n:bookman] [TeXGyreBonum]
- \definetypescriptprefix [n:schoolbook] [TeXGyreSchola]
- \definetypescriptprefix [n:adventor] [TeXGyreAdventor]
- \definetypescriptprefix [n:courier] [TeXGyreCursor]
- \definetypescriptprefix [n:chancery] [TeXGyreChorus]
-
- \starttypescript [\s!serif,\s!sans] [adventor,bonum,bookman,heros,helvetica,pagella,palatino,bonum,bookman,schola,schoolbook,termes,times]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-regular] [\s!features=\s!default]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Italic] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-italic] [\s!features=\s!default]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Bold] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bold] [\s!features=\s!default]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldItalic] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bolditalic] [\s!features=\s!default]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Caps] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-regular] [\s!features=\s!smallcaps]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-ItalicCaps] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-italic] [\s!features=\s!smallcaps]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldCaps] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bold] [\s!features=\s!smallcaps]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldItalicCaps] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bolditalic] [\s!features=\s!smallcaps]
- \stoptypescript
-
- \starttypescript [\s!mono] [cursor,courier]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-regular] [\s!features=\s!none]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Italic] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-italic] [\s!features=\s!none]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Bold] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bold] [\s!features=\s!none]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldItalic] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bolditalic] [\s!features=\s!none]
- \stoptypescript
-
- \starttypescript [\s!serif,\s!calligraphy] [chorus,chancery]
- \definefontsynonym [TeXGyreChorus-MediumItalic] [\s!file:texgyrechorus-mediumitalic] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript [\s!serif] [pagella,palatino,termes,times,bonum,bookman,schola,schoolbook] [\s!name]
- \definefontsynonym [\s!Serif] [\typescriptprefix{n:\typescripttwo}-Regular]
- \definefontsynonym [\s!SerifItalic] [\typescriptprefix{n:\typescripttwo}-Italic]
- \definefontsynonym [\s!SerifBold] [\typescriptprefix{n:\typescripttwo}-Bold]
- \definefontsynonym [\s!SerifBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalic]
- \definefontsynonym [\s!SerifSlanted] [\s!SerifItalic]
- \definefontsynonym [\s!SerifBoldSlanted] [\s!SerifBoldItalic]
- \definefontsynonym [\s!SerifCaps] [\typescriptprefix{n:\typescripttwo}-Caps]
- \stoptypescript
-
- \starttypescript [\s!serif] [pagella-caps,palatino-caps,termes-caps,times-caps,bonum-caps,bookman-caps,schola-caps,schoolbook-caps] [\s!name]
- \definefontsynonym [\s!Serif] [\typescriptprefix{n:\typescripttwo}-Caps]
- \definefontsynonym [\s!SerifItalic] [\typescriptprefix{n:\typescripttwo}-ItalicCaps]
- \definefontsynonym [\s!SerifBold] [\typescriptprefix{n:\typescripttwo}-BoldCaps]
- \definefontsynonym [\s!SerifBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalicCaps]
- \definefontsynonym [\s!SerifSlanted] [\s!SerifItalic]
- \definefontsynonym [\s!SerifBoldSlanted] [\s!SerifBoldItalic]
- \stoptypescript
-
- \starttypescript [\s!serif] [chorus,chancery] [\s!name]
- \definefontsynonym [\s!Serif] [TeXGyreChorus-MediumItalic]
- \definefontsynonym [\s!SerifItalic] [\s!Serif]
- \definefontsynonym [\s!SerifBold] [\s!Serif]
- \definefontsynonym [\s!SerifBoldItalic] [\s!Serif]
- \definefontsynonym [\s!SerifSlanted] [\s!Serif]
- \definefontsynonym [\s!SerifBoldSlanted] [\s!Serif]
- \definefontsynonym [\s!SerifCaps] [\s!Serif]
- \stoptypescript
-
- \starttypescript [\s!calligraphy] [chorus,chancery] [\s!name]
- \definefontsynonym [Calligraphy] [TeXGyreChorus-MediumItalic]
- \stoptypescript
-
- \starttypescript [\s!sans] [heros,helvetica,adventor] [\s!name]
- \definefontsynonym [\s!Sans] [\typescriptprefix{n:\typescripttwo}-Regular]
- \definefontsynonym [\s!SansItalic] [\typescriptprefix{n:\typescripttwo}-Italic]
- \definefontsynonym [\s!SansBold] [\typescriptprefix{n:\typescripttwo}-Bold]
- \definefontsynonym [\s!SansBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalic]
- \definefontsynonym [\s!SansSlanted] [\s!SansItalic]
- \definefontsynonym [\s!SansBoldSlanted] [\s!SansBoldItalic]
- \definefontsynonym [\s!SansCaps] [\typescriptprefix{n:\typescripttwo}-Caps]
- \stoptypescript
-
- \starttypescript [\s!sans] [heros-caps,helvetica-caps,adventor-caps] [\s!name]
- \definefontsynonym [\s!Sans] [\typescriptprefix{n:\typescripttwo}-Caps]
- \definefontsynonym [\s!SansItalic] [\typescriptprefix{n:\typescripttwo}-ItalicCaps]
- \definefontsynonym [\s!SansBold] [\typescriptprefix{n:\typescripttwo}-BoldCaps]
- \definefontsynonym [\s!SansBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalicCaps]
- \definefontsynonym [\s!SansSlanted] [\s!SansItalic]
- \definefontsynonym [\s!SansBoldSlanted] [\s!SansBoldItalic]
- \stoptypescript
-
- \starttypescript [\s!mono] [cursor,courier] [\s!name]
- \definefontsynonym [\s!Mono] [\typescriptprefix{n:\typescripttwo}-Regular]
- \definefontsynonym [\s!MonoItalic] [\typescriptprefix{n:\typescripttwo}-Italic]
- \definefontsynonym [\s!MonoBold] [\typescriptprefix{n:\typescripttwo}-Bold]
- \definefontsynonym [\s!MonoBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalic]
- \definefontsynonym [\s!MonoSlanted] [\s!MonoItalic]
- \definefontsynonym [\s!MonoBoldSlanted] [\s!MonoBoldItalic]
- \definefontsynonym [\s!MonoCaps] [\typescriptprefix{n:\typescripttwo}-Caps]
- \stoptypescript
-
- \starttypescript [\s!mono] [cursor-caps,courier-caps] [\s!name]
- \definefontsynonym [\s!Mono] [\typescriptprefix{n:\typescripttwo}-Caps]
- \definefontsynonym [\s!MonoItalic] [\typescriptprefix{n:\typescripttwo}-ItalicCaps]
- \definefontsynonym [\s!MonoBold] [\typescriptprefix{n:\typescripttwo}-BoldCaps]
- \definefontsynonym [\s!MonoBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalicCaps]
- \definefontsynonym [\s!MonoSlanted] [\s!MonoItalic]
- \definefontsynonym [\s!MonoBoldSlanted] [\s!MonoBoldItalic]
- \stoptypescript
-
- % interesting is that we cannot move these definitions up (without loosing features)
-
- % caps: \definetypeface [pagella] [rm] [serif] [pagella-caps] [default]
-
- \starttypescript [times,termes]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default]
- \definetypeface [\typescriptone] [\s!ss] [\s!sans] [helvetica] [\s!default] [\s!rscale=0.9]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.05]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [termes] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
- \starttypescript [palatino,pagella]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default]
- \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default] [\s!rscale=1.075]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.075]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [pagella] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
- \starttypescript [schoolbook,schola]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default]
- \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default] [\s!rscale=1.1]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.1]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [schola] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
- \starttypescript [bookman,bonum]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default]
- \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default] [\s!rscale=1.1]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.1]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [bonum] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
- \starttypescript [chancery,chorus]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default]
- \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
- \starttypescript [helvetica,heros]
- \definetypeface [\typescriptone] [\s!ss] [\s!sans] [\typescriptone] [\s!default]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern] [\s!default] [\s!rscale=1.15]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.15]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default] [\s!rscale=1.15]
- \quittypescriptscanning
- \stoptypescript
-
- \starttypescript [avantgarde,adventor]
- \definetypeface [\typescriptone] [\s!ss] [\s!sans] [adventor] [\s!default]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern] [\s!default] [\s!rscale=1.15]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.15]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
- \starttypescript [courier,cursor]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [\typescriptone] [\s!default]
- \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern] [\s!default]
- \definetypeface [\typescriptone] [\s!ss] [\s!sans] [modern] [\s!default]
- \definetypeface [\typescriptone] [\s!mm] [\s!math] [modern] [\s!default]
- \quittypescriptscanning
- \stoptypescript
-
-\stoptypescriptcollection
-
-\startmode[txmath]
-
- \starttypescriptcollection[texgyre-math-times]
-
- \starttypescript [\s!math][times,termes][\s!all]
- \loadfontgoodies[tx-math]
- \definefontsynonym[\s!MathRoman][txmath@tx-math]
- % \definefontsynonym[\s!MathRomanBold][MathRoman]
- \stoptypescript
-
- \stoptypescriptcollection
-
-\stopmode
-
-\startnotmode[txmath]
-
- \starttypescriptcollection[texgyre-math-times]
-
- \starttypescript [\s!math][times,termes][\s!all]
- \loadfontgoodies[texgyre]
- \definefontsynonym[\s!MathRoman][file:texgyre-termes-math-regular.otf][\s!features=\s!math\mathsizesuffix]
- \stoptypescript
-
- \stoptypescriptcollection
-
-\stopnotmode
-
-\startmode[pxmath]
-
- \starttypescriptcollection[texgyre-math-pagella]
-
- \starttypescript [\s!math][palatino,pagella][\s!all]
- \loadfontgoodies[px-math]
- \definefontsynonym[\s!MathRoman][pxmath@px-math]
- % \definefontsynonym[\s!MathRomanBold][MathRoman]
- \stoptypescript
-
- \stoptypescriptcollection
-
-\stopmode
-
-\startnotmode[pxmath]
-
- \starttypescriptcollection[texgyre-math-pagella]
-
- \starttypescript [\s!math][palatino,pagella][\s!all]
- \loadfontgoodies[texgyre]
- \definefontsynonym[\s!MathRoman][file:texgyre-pagella-math-regular.otf][\s!features=\s!math\mathsizesuffix]
- \stoptypescript
-
- \stoptypescriptcollection
-
-\stopnotmode
-
-\starttypescriptcollection[texgyre-math-bonum]
-
- \starttypescript [\s!math][bookman,bonum][\s!all]
- \loadfontgoodies[texgyre]
- \definefontsynonym[\s!MathRoman][file:texgyre-bonum-math-regular.otf][\s!features=\s!math\mathsizesuffix]
- \stoptypescript
-
-\stoptypescriptcollection
-
-\starttypescriptcollection[texgyre-math-schola]
-
- \starttypescript [\s!math][schoolbook,schola][\s!all]
- \loadfontgoodies[texgyre]
- \definefontsynonym[\s!MathRoman][file:texgyre-schola-math-regular.otf][\s!features=\s!math\mathsizesuffix]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-unfonts.mkiv b/Master/texmf-dist/tex/context/base/type-imp-unfonts.mkiv
deleted file mode 100644
index 91ae3b2300f..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-unfonts.mkiv
+++ /dev/null
@@ -1,142 +0,0 @@
-%D \module
-%D [ file=type-imp-unfonts,
-%D version=2012.03.11,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=UnFonts,
-%D author=Dalyoung \& Hans,
-%D date=\currentdate,
-%D copyright=Dalyoung \& Hans]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% usage: \setupbodyfont[unfonts]
-
-\loadtypescriptfile[texgyre]
-\loadtypescriptfile[xits]
-
-\definefontfeature
- [kr-default]
- [mode=node,script=hang,lang=kor]
-
-\definefontfeature
- [kr-slanted]
- [mode=node,script=hang,lang=kor,slant=.2]
-
-\definefontfeature
- [kr-latin-default]
- [default]
-
-\definefontfeature
- [kr-latin-slanted]
- [krlatindefault]
- [slant=.2]
-
-\definefontfeature
- [kr-latin-slanted-mono]
- [slant=.2]
-
-\definefontfeature
- [kr-latin-smallcaps]
- [krlatindefault]
- [smcp=yes]
-
-\definefontfeature
- [kr-latin-smallcaps-mono]
- [cmcp=yes]
-
-\definefontfallback[kr-serif] [texgyrepagella-regular*kr-latin-default] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-serifbold] [texgyrepagella-bold*kr-latin-default] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-serifitalic] [texgyrepagella-italic*kr-latin-default] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-serifbolditalic] [texgyrepagella-bolditalic*kr-latin-default] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-serifslanted] [texgyrepagella-regular*kr-latin-slanted] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-serifboldslanted][texgyrepagella-bold*kr-latin-slanted] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-serifcaps] [texgyrepagella-regular*kr-latin-smallcaps] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-sans] [texgyreheros-regular*kr-latin-default] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-sansbold] [texgyreheros-bold*kr-latin-default] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-sansitalic] [texgyreheros-italic*kr-latin-default] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-sansbolditalic] [texgyreheros-bolditalic*kr-latin-default] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-sansslanted] [texgyreheros-regular*kr-latin-slanted] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-sansboldslanted] [texgyreheros-bold*kr-latin-slanted] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-sanscaps] [texgyreheros-regular*kr-latin-smallcaps] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-mono] [texgyrecursor-regular] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-monobold] [texgyrecursor-bold] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-monoitalic] [texgyrecursor-italic] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-monobolditalic] [texgyrecursor-bolditalic] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-monoslanted] [texgyrecursor-regular*kr-latin-slanted-mono] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-monoboldslanted] [texgyrecursor-bold*kr-latin-slanted-mono] [0x0000-0x0400][force=yes]
-\definefontfallback[kr-monocaps] [texgyrecursor-regular*kr-latin-smallcaps-mono][0x0000-0x0400][force=yes]
-
-\starttypescriptcollection[unfonts]
-
- \starttypescript [\s!serif] [unbatang]
- \definefontsynonym [unbatang] [\s!file:unbatang] [\s!features=kr-default,\s!fallbacks=kr-serif]
- \definefontsynonym [unbatangbold] [\s!file:unbatangbold][\s!features=kr-default,\s!fallbacks=kr-serifbold]
- \definefontsynonym [unbatangitalic] [\s!file:unbatang] [\s!features=kr-slanted,\s!fallbacks=kr-serifitalic]
- \definefontsynonym [unbatangbolditalic] [\s!file:unbatangbold][\s!features=kr-slanted,\s!fallbacks=kr-serifbolditalic]
- \definefontsynonym [unbatangslanted] [\s!file:unbatang] [\s!features=kr-slanted,\s!fallbacks=kr-serifslanted]
- \definefontsynonym [unbatangboldslanted][\s!file:unbatangbold][\s!features=kr-slanted,\s!fallbacks=kr-serifboldslanted]
- \definefontsynonym [unbatangcaps] [\s!file:unbatang] [\s!features=kr-default,\s!fallbacks=kr-serifcaps]
- \stoptypescript
-
- \starttypescript [\s!sans] [undotum]
- \definefontsynonym[undotum] [\s!file:undotum] [\s!features=kr-default,\s!fallbacks=kr-sans]
- \definefontsynonym[undotumbold] [\s!file:undotumbold] [\s!features=kr-default,\s!fallbacks=kr-sansbold]
- \definefontsynonym[undotumitalic] [\s!file:undotum] [\s!features=kr-slanted,\s!fallbacks=kr-sansitalic]
- \definefontsynonym[undotumbolditalic] [\s!file:undotumbold] [\s!features=kr-slanted,\s!fallbacks=kr-sansbolditalic]
- \definefontsynonym[undotumslanted] [\s!file:undotum] [\s!features=kr-slanted,\s!fallbacks=kr-sansslanted]
- \definefontsynonym[undotumboldslanted] [\s!file:undotumbold] [\s!features=kr-slanted,\s!fallbacks=kr-sansboldslanted]
- \definefontsynonym[undotumcaps] [\s!file:undotum] [\s!features=kr-default,\s!fallbacks=kr-sanscaps]
- \stoptypescript
-
- \starttypescript [\s!mono] [untype]
- \definefontsynonym[untype] [\s!file:untaza] [\s!features=kr-default,\s!fallbacks=kr-mono]
- \definefontsynonym[untypebold] [\s!file:untaza] [\s!features=kr-default,\s!fallbacks=kr-monobold]
- \definefontsynonym[untypeitalic] [\s!file:untaza] [\s!features=kr-slanted,\s!fallbacks=kr-monoitalic]
- \definefontsynonym[untypebolditalic] [\s!file:untaza] [\s!features=kr-slanted,\s!fallbacks=kr-monobolditalic]
- \definefontsynonym[untypeslanted] [\s!file:untaza] [\s!features=kr-slanted,\s!fallbacks=kr-monoslanted]
- \definefontsynonym[untypeboldslanted] [\s!file:untaza] [\s!features=kr-slanted,\s!fallbacks=kr-monoboldslanted]
- \definefontsynonym[untypecaps] [\s!file:untaza] [\s!features=kr-default,\s!fallbacks=kr-monocaps]
- \stoptypescript
-
- \starttypescript [\s!serif] [unbatang] [\s!name]
- \definefontsynonym[\s!Serif] [unbatang]
- \definefontsynonym[\s!SerifBold] [unbatangbold]
- \definefontsynonym[\s!SerifItalic] [unbatangitalic]
- \definefontsynonym[\s!SerifBoldItalic] [unbatangbolditalic]
- \definefontsynonym[\s!SerifSlanted] [unbatangslanted]
- \definefontsynonym[\s!SerifBoldSlanted][unbatangboldslanted]
- \definefontsynonym[\s!SerifCaps] [unbatangcaps]
- \stoptypescript
-
- \starttypescript [\s!sans] [undotum] [\s!name]
- \definefontsynonym[\s!Sans] [undotum]
- \definefontsynonym[\s!SansBold] [undotumbold]
- \definefontsynonym[\s!SansItalic] [undotumitalic]
- \definefontsynonym[\s!SansBoldItalic] [undotumbolditalic]
- \definefontsynonym[\s!SansSlanted] [undotumslanted]
- \definefontsynonym[\s!SansBoldSlanted] [undotumboldslanted]
- \definefontsynonym[\s!SansCaps] [undotumcaps]
- \stoptypescript
-
- \starttypescript [\s!mono] [untype] [\s!name]
- \definefontsynonym[\s!Mono] [untype]
- \definefontsynonym[\s!MonoBold] [untypebold]
- \definefontsynonym[\s!MonoItalic] [untypeitalic]
- \definefontsynonym[\s!MonoBoldItalic] [untypebolditalic]
- \definefontsynonym[\s!MonoSlanted] [untypeslanted]
- \definefontsynonym[\s!MonoBoldSlanted] [untypeboldslanted]
- \definefontsynonym[\s!MonoCaps] [untypecaps]
- \stoptypescript
-
- % xits might get replaced with a pagella once we have it
-
- \starttypescript[unfonts]
- \definetypeface [unfonts] [\s!rm] [\s!serif] [unbatang]
- \definetypeface [unfonts] [\s!ss] [\s!sans] [undotum]
- \definetypeface [unfonts] [\s!tt] [\s!mono] [untype]
- \definetypeface [unfonts] [\s!mm] [\s!math] [xits]
- \stoptypescript
-
-\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/type-imp-xits.mkiv b/Master/texmf-dist/tex/context/base/type-imp-xits.mkiv
deleted file mode 100644
index f83050e14ac..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-xits.mkiv
+++ /dev/null
@@ -1,60 +0,0 @@
-%D \module
-%D [ file=type-imp-hvmath,
-%D version=2007.07.30,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Xits,
-%D author=Khaled Hosny \& Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% This one makes more sense than Stix. Xits uses the glyph collection from stix
-% but packages it in a proper OpenType Math font. From the Stix site: Version 1.1,
-% which will include fonts packaged for use with Microsoft Office applications, is
-% scheduled for release by the end of 2010. Version 1.2, which will include Type 1
-% fonts for use with LaTeX, will follow in 2011. So, we are on our own anyway.
-
-\loadtypescriptfile[texgyre]
-
-\starttypescriptcollection[xits]
-
- \starttypescript [\s!math] [xits,xitsbidi] [\s!name]
- \loadfontgoodies[xits-math]
- \definefontsynonym[\s!MathRoman ][\s!file:xits-math.otf] [\s!features=\s!math\mathsizesuffix,\s!goodies=xits-math]
- \definefontsynonym[\s!MathRoman L2R][\s!file:xits-math.otf] [\s!features=\s!math\mathsizesuffix-l2r,\s!goodies=xits-math]
- \definefontsynonym[\s!MathRoman R2L][\s!file:xits-math.otf] [\s!features=\s!math\mathsizesuffix-r2l,\s!goodies=xits-math]
- \definefontsynonym[\s!MathRomanBold ][\s!file:xits-mathbold.otf][\s!features=\s!math\mathsizesuffix,\s!goodies=xits-math]
- \definefontsynonym[\s!MathRomanBold L2R][\s!file:xits-mathbold.otf][\s!features=\s!math\mathsizesuffix-l2r,\s!goodies=xits-math]
- \definefontsynonym[\s!MathRomanBold R2L][\s!file:xits-mathbold.otf][\s!features=\s!math\mathsizesuffix-r2l,\s!goodies=xits-math]
- \stoptypescript
-
- \starttypescript [\s!serif] [xits] [\s!name]
- \setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym[\s!Serif] [\s!file:xits-regular.otf] [\s!features=\s!default]
- \definefontsynonym[\s!SerifBold] [\s!file:xits-bold.otf] [\s!features=\s!default]
- \definefontsynonym[\s!SerifItalic] [\s!file:xits-italic.otf] [\s!features=\s!default]
- \definefontsynonym[\s!SerifBoldItalic][\s!file:xits-bolditalic.otf] [\s!features=\s!default]
- \stoptypescript
-
- \starttypescript[xits]
- \definetypeface [xits] [\s!rm] [\s!serif] [xits] [\s!default]
- \definetypeface [xits] [\s!ss] [\s!sans] [heros] [\s!default] [\s!rscale=0.9]
- \definetypeface [xits] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.05]
- \definetypeface [xits] [\s!mm] [\s!math] [xits] [\s!default]
- \stoptypescript
-
- % for the moment
-
- \starttypescript[xitsbidi]
- \definetypeface [xitsbidi] [\s!rm] [\s!serif] [xits] [\s!default]
- \definetypeface [xitsbidi] [\s!ss] [\s!sans] [heros] [\s!default] [\s!rscale=0.9]
- \definetypeface [xitsbidi] [\s!tt] [\s!mono] [modern] [\s!default] [\s!rscale=1.05]
- %definetypeface [xitsbidi] [\s!mm] [\s!math] [xitsbidi] [bidi] [\s!direction=\s!both]
- \definetypeface [xitsbidi] [\s!mm] [\s!math] [xitsbidi] [\s!default] [\s!direction=\s!both]
- \stoptypescript
-
-\stoptypescriptcollection
-
diff --git a/Master/texmf-dist/tex/context/base/type-imp-xitsbidi.mkiv b/Master/texmf-dist/tex/context/base/type-imp-xitsbidi.mkiv
deleted file mode 100644
index 33c4340ed0e..00000000000
--- a/Master/texmf-dist/tex/context/base/type-imp-xitsbidi.mkiv
+++ /dev/null
@@ -1,16 +0,0 @@
-%D \module
-%D [ file=type-imp-hvmath,
-%D version=2007.07.30,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Xits,
-%D author=Khaled Hosny \& Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\loadtypescriptfile[xits]
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/type-mac.mkii b/Master/texmf-dist/tex/context/base/type-mac.mkii
deleted file mode 100644
index e8abf09b99e..00000000000
--- a/Master/texmf-dist/tex/context/base/type-mac.mkii
+++ /dev/null
@@ -1,593 +0,0 @@
-%D \module
-%D [ file=type-mac,
-%D version=2009.03.10,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Mac OS X Definitions,
-%D author=Wolfgang Schuster,
-%D date=\currentdate,
-%D copyright={Wolfgang Schuster}]
-%C
-%C This module is part of the \CONTEXT\ macro||package. See
-%C mreadme.pdf for details.
-
-\definetypescriptprefix [f:andalemono] [Andale Mono]
-\definetypescriptprefix [f:chalkboard] [Chalkboard]
-\definetypescriptprefix [f:cochin] [Cochin]
-\definetypescriptprefix [f:comicsans] [Comic Sans MS]
-\definetypescriptprefix [f:couriernew] [Courier New]
-\definetypescriptprefix [f:georgia] [Georgia]
-\definetypescriptprefix [f:lucidagrande] [Lucida Grande]
-\definetypescriptprefix [f:monaco] [Monaco]
-\definetypescriptprefix [f:tahoma] [Tahoma]
-\definetypescriptprefix [f:timesnewroman] [Times New Roman]
-\definetypescriptprefix [f:trebuchet] [Trebuchet MS]
-\definetypescriptprefix [f:verdana] [Verdana]
-
-\definetypescriptprefix [n:andalemono] [AndaleMono]
-\definetypescriptprefix [n:chalkboard] [Chalkboard]
-\definetypescriptprefix [n:cochin] [Cochin]
-\definetypescriptprefix [n:comicsans] [ComicSans]
-\definetypescriptprefix [n:couriernew] [CourierNew]
-\definetypescriptprefix [n:georgia] [Georgia]
-\definetypescriptprefix [n:lucidagrande] [LucidaGrande]
-\definetypescriptprefix [n:monaco] [Monaco]
-\definetypescriptprefix [n:tahoma] [Tahoma]
-\definetypescriptprefix [n:timesnewroman] [TimesNewRoman]
-\definetypescriptprefix [n:trebuchet] [Trebuchet]
-\definetypescriptprefix [n:verdana] [Verdana]
-
-\starttypescriptcollection [macosx]
-
-% American Typewriter
-
-\starttypescript [serif] [americantypewriter-light-condensed,americantypewriter-condensed,americantypewriter-light,americantypewriter]
- \definefontsynonym [AmericanTypewriter-Light] [name:American Typewriter Light] [features=default]
- \definefontsynonym [AmericanTypewriter-Regular] [name:American Typewriter] [features=default]
- \definefontsynonym [AmericanTypewriter-Bold] [name:American Typewriter Bold] [features=default]
- \definefontsynonym [AmericanTypewriter-LightCond] [name:American Typewriter Condensed Light] [features=default]
- \definefontsynonym [AmericanTypewriter-Condensed] [name:American Typewriter Condensed] [features=default]
- \definefontsynonym [AmericanTypewriter-BoldCond] [name:American Typewriter Condensed Bold] [features=default]
-\stoptypescript
-
-\starttypescript [serif] [americantypewriter-light-condensed]
- \setups[font:fallback:serif]
- \definefontsynonym [Serif] [AmericanTypewriter-LightCond] [features=default]
- \definefontsynonym [SerifBold] [AmericanTypewriter-Condensed] [features=default]
-\stoptypescript
-
-\starttypescript [serif] [americantypewriter-condensed]
- \setups[font:fallback:serif]
- \definefontsynonym [Serif] [AmericanTypewriter-Condensed] [features=default]
- \definefontsynonym [SerifBold] [AmericanTypewriter-BoldCond] [features=default]
-\stoptypescript
-
-\starttypescript [serif] [americantypewriter-light]
- \setups[font:fallback:serif]
- \definefontsynonym [Serif] [AmericanTypewriter-Light] [features=default]
- \definefontsynonym [SerifBold] [AmericanTypewriter-Regular] [features=default]
-\stoptypescript
-
-\starttypescript [serif] [americantypewriter]
- \setups[font:fallback:serif]
- \definefontsynonym [Serif] [AmericanTypewriter-Regular] [features=default]
- \definefontsynonym [SerifBold] [AmericanTypewriter-Bold] [features=default]
-\stoptypescript
-
-\starttypescript [americantypewriter-light-condensed,americantypewriter-condensed,americantypewriter-light,americantypewriter]
- \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
-\stoptypescript
-
-% Arial / Arial Narrow / Arial Rounded / Arial Unicode
-
-\starttypescript [sans] [arial-narrow,arial-condensed,arial,arial-rounded,arial-unicode]
- \definefontsynonym [Arial-Condensed] [name:Arial Narrow] [features=default]
- \definefontsynonym [Arial-ItalicCond] [name:Arial Narrow Italic] [features=default]
- \definefontsynonym [Arial-BoldCond] [name:Arial Narrow Bold] [features=default]
- \definefontsynonym [Arial-BoldItalicCond] [name:Arial Narrow Bold Italic] [features=default]
- \definefontsynonym [Arial-Regular] [name:Arial] [features=default]
- \definefontsynonym [Arial-Italic] [name:Arial Italic] [features=default]
- \definefontsynonym [Arial-Bold] [name:Arial Bold] [features=default]
- \definefontsynonym [Arial-BoldItalic] [name:Arial Bold Italic] [features=default]
- \definefontsynonym [Arial-Black] [name:Arial Black] [features=default]
- \definefontsynonym [Arial-Unicode] [name:Arial Unicode MS] [features=default]
- \definefontsynonym [Arial-Rounded] [name:Arial Rounded MT Bold] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [arial-narrow,arial-condensed]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Arial-Condensed] [features=default]
- \definefontsynonym [SansItalic] [Arial-ItalicCond] [features=default]
- \definefontsynonym [SansBold] [Arial-BoldCond] [features=default]
- \definefontsynonym [SansBoldItalic] [Arial-BoldItalicCond] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [arial]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Arial-Regular] [features=default]
- \definefontsynonym [SansItalic] [Arial-Italic] [features=default]
- \definefontsynonym [SansBold] [Arial-Bold] [features=default]
- \definefontsynonym [SansBoldItalic] [Arial-BoldItalic] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [arial-rounded]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Arial-Rounded] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [arial-unicode]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Arial-Unicode] [features=default]
-\stoptypescript
-
-\starttypescript [arial-narrow,arial-condensed,arial,arial-rounded,arial-unicode]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Baskerville
-
-\starttypescript [serif] [baskerville]
- \definefontsynonym [Baskerville-Regular] [name:Baskerville] [features=default]
- \definefontsynonym [Baskerville-Italic] [name:Baskerville Italic] [features=default]
- \definefontsynonym [Baskerville-Medium] [name:Baskerville SemiBold] [features=default]
- \definefontsynonym [Baskerville-MediumItalic] [name:Baskerville SemiBold Italic] [features=default]
- \definefontsynonym [Baskerville-Bold] [name:Baskerville Bold] [features=default]
- \definefontsynonym [Baskerville-BoldItalic] [name:Baskerville Bold Italic] [features=default]
-\stoptypescript
-
-\starttypescript [serif] [baskerville]
- \setups[font:fallback:serif]
- \definefontsynonym [Serif] [Baskerville-Regular] [features=default]
- \definefontsynonym [SerifItalic] [Baskerville-Italic] [features=default]
- \definefontsynonym [SerifBold] [Baskerville-Medium] [features=default]
- \definefontsynonym [SerifBoldItalic] [Baskerville-MediumItalic] [features=default]
-\stoptypescript
-
-\starttypescript [baskerville]
- \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
-\stoptypescript
-
-% Big Caslon
-
-\starttypescript [serif] [caslon,bigcaslon]
- \definefontsynonym [BigCaslon-Medium] [name:Big Caslon Medium] [features=default]
-\stoptypescript
-
-\starttypescript [serif] [caslon,bigcaslon]
- \setups[font:fallback:serif]
- \definefontsynonym [Serif] [BigCaslon-Medium] [features=default]
-\stoptypescript
-
-\starttypescript [caslon,bigcaslon]
- \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
-\stoptypescript
-
-% Copperplate
-
-\starttypescript [sans] [copperplate-light,copperplate]
- \definefontsynonym [Copperplate-Light] [name:Copperplate Light] [features=default]
- \definefontsynonym [Copperplate-Regular] [name:Copperplate] [features=default]
- \definefontsynonym [Copperplate-Bold] [name:Copperplate Bold] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [copperplate-light]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Copperplate-Light] [features=default]
- \definefontsynonym [SansBold] [Copperplate-Regular] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [copperplate]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Copperplate-Regular] [features=default]
- \definefontsynonym [SansBold] [Copperplate-Bold] [features=default]
-\stoptypescript
-
-\starttypescript [copperplate-light,copperplate]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Futura
-
-\starttypescript [sans] [futura-condensed,futura]
- \definefontsynonym [Futura-MediumCond] [name:Futura Condensed Medium] [features=default]
- \definefontsynonym [Futura-Medium] [name:Futura Medium] [features=default]
- \definefontsynonym [Futura-MediumItalic] [name:Futura Medium Italic] [features=default]
- \definefontsynonym [Futura-BoldCond] [name:Futura Condensed ExtraBold] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [futura-condensed]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Futura-MediumCond] [features=default]
- \definefontsynonym [SansBold] [Futura-BoldCond] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [futura]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Futura-Medium] [features=default]
- \definefontsynonym [SansItalic] [Futura-MediumItalic] [features=default]
-\stoptypescript
-
-\starttypescript [futura-condensed,futura]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Gill Sans
-
-\starttypescript [sans] [gillsans-light,gillsans]
- \definefontsynonym [GillSans-Light] [name:Gill Sans Light] [features=default]
- \definefontsynonym [GillSans-LightItalic] [name:Gill Sans Light Italic] [features=default]
- \definefontsynonym [GillSans-Regular] [name:Gill Sans] [features=default]
- \definefontsynonym [GillSans-Italic] [name:Gill Sans Italic] [features=default]
- \definefontsynonym [GillSans-Bold] [name:Gill Sans Bold] [features=default]
- \definefontsynonym [GillSans-BoldItalic] [name:Gill Sans Bold Italic] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [gillsans-light]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [GillSans-Light] [features=default]
- \definefontsynonym [SansItalic] [GillSans-LightItalic] [features=default]
- \definefontsynonym [SansBold] [GillSans-Regular] [features=default]
- \definefontsynonym [SansBoldItalic] [GillSans-Italic] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [gillsans]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [GillSans-Regular] [features=default]
- \definefontsynonym [SansItalic] [GillSans-Italic] [features=default]
- \definefontsynonym [SansBold] [GillSans-Bold] [features=default]
- \definefontsynonym [SansBoldItalic] [GillSans-BoldItalic] [features=default]
-\stoptypescript
-
-\starttypescript [gillsans-light,gillsans]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Helvetica Neuse
-
-\starttypescript [sans] [helvetica-neue-ultralight,helvetica-neue-light,helvetica-neue,helvetica-neue-boldcondensed]
- \definefontsynonym [HelveticaNeue-UltraLight] [name:Helvetica Neue UltraLight] [features=default]
- \definefontsynonym [HelveticaNeue-UltraLightItalic] [name:Helvetica Neue UltraLight Italic] [features=default]
- \definefontsynonym [HelveticaNeue-Light] [name:Helvetica Neue Light] [features=default]
- \definefontsynonym [HelveticaNeue-LightItalic] [name:Helvetica Neue Light Italic] [features=default]
- \definefontsynonym [HelveticaNeue-Regular] [name:Helvetica Neue] [features=default]
- \definefontsynonym [HelveticaNeue-Italic] [name:Helvetica Neue Italic] [features=default]
- \definefontsynonym [HelveticaNeue-Bold] [name:Helvetica Neue Bold] [features=default]
- \definefontsynonym [HelveticaNeue-BoldItalic] [name:Helvetica Neue Bold Italic] [features=default]
- \definefontsynonym [HelveticaNeue-BoldCond] [name:Helvetica Neue Condensed Bold] [features=default]
- \definefontsynonym [HelveticaNeue-BlackCond] [name:Helvetica Neue Condensed Black] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [helvetica-neue-ultralight]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [HelveticaNeue-UltraLight] [features=default]
- \definefontsynonym [SansItalic] [HelveticaNeue-UltraLightItalic] [features=default]
- \definefontsynonym [SansBold] [HelveticaNeue-Light] [features=default]
- \definefontsynonym [SansBoldItalic] [HelveticaNeue-LightItalic] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [helvetica-neue-light]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [HelveticaNeue-Light] [features=default]
- \definefontsynonym [SansItalic] [HelveticaNeue-LightItalic] [features=default]
- \definefontsynonym [SansBold] [HelveticaNeue-Regular] [features=default]
- \definefontsynonym [SansBoldItalic] [HelveticaNeue-Italic] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [helvetica-neue]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [HelveticaNeue-Regular] [features=default]
- \definefontsynonym [SansItalic] [HelveticaNeue-Italic] [features=default]
- \definefontsynonym [SansBold] [HelveticaNeue-Bold] [features=default]
- \definefontsynonym [SansBoldItalic] [HelveticaNeue-BoldItalic] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [helvetica-neue-boldcondensed]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [HelveticaNeue-BoldCond] [features=default]
- \definefontsynonym [SansBold] [HelveticaNeue-BlackCond] [features=default]
-\stoptypescript
-
-\starttypescript [helvetica-neue-ultralight,helvetica-neue-light,helvetica-neue,helvetica-neue-boldcondensed]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Hiragino Mincho
-
-\starttypescript [serif] [hiragino-mincho]
- \definefontsynonym [HiraginoMinchoPro-Regular] [name:Hiragino Mincho Pro W3] [features=japanese]
- \definefontsynonym [HiraginoMinchoPro-Bold] [name:Hiragino Mincho Pro W6] [features=japanese]
- \definefontsynonym [HiraginoMinchoProN-Regular] [name:Hiragino Mincho ProN W3] [features=japanese]
- \definefontsynonym [HiraginoMinchoProN-Bold] [name:Hiragino Mincho ProN W6] [features=japanese]
-\stoptypescript
-
-\starttypescript [serif] [hiragino-mincho]
- \setups[font:fallback:serif]
- \definefontsynonym [Serif] [HiraginoMinchoPro-Regular] [features=japanese]
- \definefontsynonym [SerifBold] [HiraginoMinchoPro-Bold] [features=japanese]
-\stoptypescript
-
-% \starttypescript [serif] [hiragino-mincho]
-% \setups[font:fallback:serif]
-% \definefontsynonym [Serif] [HiraginoMinchoProN-Regular] [features=japanese]
-% \definefontsynonym [SerifBold] [HiraginoMinchoProN-Bold] [features=japanese]
-% \stoptypescript
-
-\starttypescript [hiragino-mincho]
- \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
-\stoptypescript
-
-% Hiragino Maru
-
-\starttypescript [sans] [hiragino-maru]
- \definefontsynonym [HiraginoMaruGothicPro-Regular] [name:Hiragino Maru Gothic Pro W4] [features=japanese]
- \definefontsynonym [HiraginoMaruGothicProN-Regular] [name:Hiragino Maru Gothic ProN W4] [features=japanese]
-\stoptypescript
-
-\starttypescript [sans] [hiragino-maru]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [HiraginoMaruGothicPro-Regular] [features=japanese]
-\stoptypescript
-
-% \starttypescript [sans] [hiragino-maru]
-% \setups[font:fallback:sans]
-% \definefontsynonym [Sans] [HiraginoMaruGothicProN-Regular] [features=japanese]
-% \stoptypescript
-
-\starttypescript [hiragino-maru]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Hiragino Kaku
-
-\starttypescript [sans] [hiragino-kaku]
- \definefontsynonym [HiraginoKakuGothicPro-Regular] [name:Hiragino Kaku Gothic Pro W3] [features=japanese]
- \definefontsynonym [HiraginoKakuGothicPro-Bold] [name:Hiragino Kaku Gothic Pro W6] [features=japanese]
- \definefontsynonym [HiraginoKakuGothicStd-Black] [name:Hiragino Kaku Gothic Std W8] [features=japanese]
- \definefontsynonym [HiraginoKakuGothicProN-Regular] [name:Hiragino Kaku Gothic Pron W3] [features=japanese]
- \definefontsynonym [HiraginoKakuGothicProN-Bold] [name:Hiragino Kaku Gothic ProN W6] [features=japanese]
- \definefontsynonym [HiraginoKakuGothicStdN-Black] [name:Hiragino Kaku Gothic StdN W8] [features=japanese]
-\stoptypescript
-
-\starttypescript [sans] [hiragino-kaku]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [HiraginoKakuGothicPro-Regular] [features=japanese]
- \definefontsynonym [SansBold] [HiraginoKakuGothicPro-Bold] [features=japanese]
-\stoptypescript
-
-% \starttypescript [sans] [hiragino-kaku]
-% \setups[font:fallback:sans]
-% \definefontsynonym [Sans] [HiraginoKakuGothicProN-Regular] [features=japanese]
-% \definefontsynonym [SansBold] [HiraginoKakuGothicProN-Bold] [features=japanese]
-% \stoptypescript
-
-\starttypescript [hiragino-kaku]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Hoefler Text
-
-\starttypescript [serif] [hoefler]
- \definefontsynonym [HoeflerText-Regular] [name:Hoefler Text] [features=default]
- \definefontsynonym [HoeflerText-Italic] [name:Hoefler Text Italic] [features=default]
- \definefontsynonym [HoeflerText-Black] [name:Hoefler Text Black] [features=default]
- \definefontsynonym [HoeflerText-BlackItalic] [name:Hoefler Text Black Italic] [features=default]
- \definefontsynonym [HoeflerText-Ornaments] [name:Hoefler Text Ornaments] [features=default]
-\stoptypescript
-
-\starttypescript [serif] [hoefler]
- \setups[font:fallback:serif]
- \definefontsynonym [Serif] [HoeflerText-Regular] [features=default]
- \definefontsynonym [SerifItalic] [HoeflerText-Italic] [features=default]
- \definefontsynonym [SerifBold] [HoeflerText-Black] [features=default]
- \definefontsynonym [SerifBoldItalic] [HoeflerText-BlackItalic] [features=default]
-\stoptypescript
-
-\starttypescript [hoefler]
- \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
-\stoptypescript
-
-% Impact
-
-\starttypescript [sans] [impact]
- \definefontsynonym [Impact-Regular] [name:Impact] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [impact]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Impact-Regular] [features=default]
-\stoptypescript
-
-\starttypescript [impact]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Andale Mono / Monaco
-
-\starttypescript [mono] [andalemono,monaco]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular] [name:\typescriptprefix{f:\typescripttwo}] [features=default]
-\stoptypescript
-
-\starttypescript [mono] [andalemono,monaco]
- \setups[font:fallback:mono]
- \definefontsynonym [Mono] [\typescriptprefix{n:\typescripttwo}-Regular] [features=default]
-\stoptypescript
-
-\starttypescript [andalemono,monaco]
- \definetypeface [\typescriptone] [tt] [mono] [\typescriptone] [default]
-\stoptypescript
-
-% Optima
-
-\starttypescript [sans] [optima,optima-bold]
- \definefontsynonym [Optima-Regular] [name:Optima Regular] [features=default]
- \definefontsynonym [Optima-Italic] [name:Optima Italic] [features=default]
- \definefontsynonym [Optima-Bold] [name:Optima Bold] [features=default]
- \definefontsynonym [Optima-BoldItalic] [name:Optima Bold Italic] [features=default]
- \definefontsynonym [Optima-Black] [name:Optima ExtraBlack] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [optima]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Optima-Regular] [features=default]
- \definefontsynonym [SansItalic] [Optima-Italic] [features=default]
- \definefontsynonym [SansBold] [Optima-Bold] [features=default]
- \definefontsynonym [SansBoldItalic] [Optima-BoldItalic] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [optima-bold]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Optima-Bold] [features=default]
- \definefontsynonym [SansItalic] [Optima-BoldItalic] [features=default]
- \definefontsynonym [SansBold] [Optima-Black] [features=default]
-\stoptypescript
-
-\starttypescript [optima,optima-bold]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Papyrus
-
-\starttypescript [sans] [papyrus]
- \definefontsynonym [Papyrus-Regular] [name:Papyrus] [features=default]
- \definefontsynonym [Papyrus-Condensed] [name:Papyrus Condensed] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [papyrus]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Papyrus-Regular] [features=default]
-\stoptypescript
-
-\starttypescript [papyrus]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% STFangsong
-
-\starttypescript [serif] [stfangsong]
- \definefontsynonym [STFangsong-Regular] [name:STFangsong] [features=chinese]
-\stoptypescript
-
-\starttypescript [serif] [stfangsong]
- \setups[font:fallback:sans]
- \definefontsynonym [Serif] [STFangsong-Regular] [features=chinese]
-\stoptypescript
-
-\starttypescript [stfangsong]
- \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
-\stoptypescript
-
-% STHeiti
-
-\starttypescript [sans] [stheiti]
- \definefontsynonym [STXihei-Light] [name:STHeiti Light] [features=chinese]
- \definefontsynonym [STHeiti-Regular] [name:STHeiti Regular] [features=chinese]
-\stoptypescript
-
-\starttypescript [sans] [stheiti]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [STXihei-Light] [features=chinese]
- \definefontsynonym [SansBold] [STKaiti-Regular] [features=chinese]
-\stoptypescript
-
-\starttypescript [stheiti]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% STKaiti
-
-\starttypescript [serif] [stkaiti]
- \definefontsynonym [STKaiti-Regular] [name:STKaiti] [features=chinese]
-\stoptypescript
-
-\starttypescript [serif] [stkaiti]
- \setups[font:fallback:sans]
- \definefontsynonym [Serif] [STKaiti-Regular] [features=chinese]
-\stoptypescript
-
-\starttypescript [stkaiti]
- \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
-\stoptypescript
-
-% STSong
-
-\starttypescript [serif] [stsong]
- \definefontsynonym [STSong-Regular] [name:STSong] [features=chinese]
-\stoptypescript
-
-\starttypescript [serif] [stsong]
- \setups[font:fallback:sans]
- \definefontsynonym [Serif] [STSong-Regular] [features=chinese]
-\stoptypescript
-
-\starttypescript [stsong]
- \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
-\stoptypescript
-
-% Chalkboard / Comic Sans / Tahoma
-
-\starttypescript [sans] [chalkboard,comicsans,lucidagrande,tahoma]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular] [name:\typescriptprefix{f:\typescripttwo}] [features=default]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Bold] [name:\typescriptprefix{f:\typescripttwo} Bold] [features=default]
-\stoptypescript
-
-\starttypescript [sans] [chalkboard,comicsans,lucidagrande,tahoma]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [\typescriptprefix{n:\typescripttwo}-Regular] [features=default]
- \definefontsynonym [SansBold] [\typescriptprefix{n:\typescripttwo}-Bold] [features=default]
-\stoptypescript
-
-\starttypescript [chalkboard,comicsans,tahoma]
- \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-\stoptypescript
-
-% Cochin / Courier New / Georgia / Times New Roman / Trebuchet / Verdana
-
-\starttypescript [serif,sans,mono] [cochin,georgia,timesnewroman,trebuchet,verdana,couriernew]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular] [name:\typescriptprefix{f:\typescripttwo}] [features=default]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Italic] [name:\typescriptprefix{f:\typescripttwo} Italic] [features=default]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Bold] [name:\typescriptprefix{f:\typescripttwo} Bold] [features=default]
- \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldItalic] [name:\typescriptprefix{f:\typescripttwo} Bold Italic] [features=default]
-\stoptypescript
-
-\starttypescript [serif] [cochin,georgia,timesnewroman]
- \setups[font:fallback:serif]
- \definefontsynonym [Serif] [\typescriptprefix{n:\typescripttwo}-Regular] [features=default]
- \definefontsynonym [SerifItalic] [\typescriptprefix{n:\typescripttwo}-Italic] [features=default]
- \definefontsynonym [SerifBold] [\typescriptprefix{n:\typescripttwo}-Bold] [features=default]
- \definefontsynonym [SerifBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalic] [features=default]
-\stoptypescript
-
-\starttypescript [cochin,georgia,timesnewroman]
- \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
-\stoptypescript
-
-% Courier New
-
-% \starttypescript [mono] [couriernew]
-% \setups[font:fallback:mono]
-% \definefontsynonym [Mono] [\typescriptprefix{n:\typescripttwo}-Regular] [features=default]
-% \definefontsynonym [MonoItalic] [\typescriptprefix{n:\typescripttwo}-Italic] [features=default]
-% \definefontsynonym [MonoBold] [\typescriptprefix{n:\typescripttwo}-Bold] [features=default]
-% \definefontsynonym [MonoBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalic] [features=default]
-% \stoptypescript
-
-% \starttypescript [couriernew]
-% \definetypeface [\typescriptone] [tt] [mono] [\typescriptone] [default]
-% \stoptypescript
-
-% Trebuchet / Verdana
-
-% \starttypescript [sans] [trebuchet,verdana]
-% \setups[font:fallback:sans]
-% \definefontsynonym [Sans] [\typescriptprefix{n:\typescripttwo}-Regular] [features=default]
-% \definefontsynonym [SansItalic] [\typescriptprefix{n:\typescripttwo}-Italic] [features=default]
-% \definefontsynonym [SansBold] [\typescriptprefix{n:\typescripttwo}-Bold] [features=default]
-% \definefontsynonym [SansBoldItalic] [\typescriptprefix{n:\typescripttwo}-BoldItalic] [features=default]
-% \stoptypescript
-
-% \starttypescript [trebuchet,verdana]
-% \definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
-% \stoptypescript
-
-\stoptypescriptcollection
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/type-msw.mkii b/Master/texmf-dist/tex/context/base/type-msw.mkii
deleted file mode 100644
index 26ec190cbee..00000000000
--- a/Master/texmf-dist/tex/context/base/type-msw.mkii
+++ /dev/null
@@ -1 +0,0 @@
-\input type-win.mkii \endinput % could be a file synonym
diff --git a/Master/texmf-dist/tex/context/base/type-pre.mkii b/Master/texmf-dist/tex/context/base/type-pre.mkii
deleted file mode 100644
index 99db52c2fad..00000000000
--- a/Master/texmf-dist/tex/context/base/type-pre.mkii
+++ /dev/null
@@ -1,253 +0,0 @@
-%D \module
-%D [ file=type-pre,
-%D version=2001.04.12,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Compatibility scripts,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 file is obsolete. We now have latin modern and proper
-%D typescripts. Forget about this file.
-
-%D This file defines some typescripts that simulate the pre-typescript way
-%D of defining fonts. This file will not be extended.
-
-\starttypescriptcollection[previous]
-
-%D The Computer Modern Roman is derived from the Monotype~8a
-%D Times Roman. In this module, that is loaded by default, we
-%D define all relevant alternatives.
-
-\starttypescript [cmr]
- \usetypescript[modern][default]
- \setupbodyfont[modern]
-\stoptypescript
-
-%D This script remaps the default Computer Modern Font Files
-%D onto the EC ones, so that hyphenations work well. (The proper
-%D latin modern ec variants have replaed the ae ones.)
-
-\starttypescript [aer]
- \usetypescript[modern][ec]
- \setupbodyfont[modern]
- %\enableregime[ec]
-\stoptypescript
-
-%D This script defines the Computer Modern Roman with a pseudo kind
-%D of iso latin 2 encoding.
-
-\starttypescript [csr]
- \usetypescript[modern][ec]
- \setupbodyfont[modern]
- \enableregime[il2]
-\stoptypescript
-
-%D This script defines the Computer Modern Roman with a
-%D polish encoding.
-
-\starttypescript [plr]
- \usetypescript[modern][qx]
- \setupbodyfont[modern]
- \enableregime[pl0]
-\stoptypescript
-
-%D Vietnamese.
-
-\starttypescript [vnr]
- \usetypescript[modern][t5]
- \setupbodyfont[modern]
-\stoptypescript
-
-%D Cyrillic alternatives are available under the symbolic
-%D name \type {cyr}.
-
-\starttypescript [cyr]
- \usetypescript [serif,sans,mono,math] [computer-modern,latin-modern] [default,name,size,cyr]
- \usemathcollection[default]
-\stoptypescript
-
-\starttypescript [lh-ec]
- \usetypescript [serif,sans,mono,math] [computer-modern,latin-modern] [default,name,size,ec]
- \usemathcollection[default]
-\stoptypescript
-
-\starttypescript [lh-t2a]
- \usetypescript [serif,sans,mono,math] [computer-modern,latin-modern] [default,name,size,t2a]
- \usemathcollection[default]
-\stoptypescript
-
-\starttypescript [lh-t2b]
- \usetypescript [serif,sans,mono,math] [computer-modern,latin-modern] [default,name,size,t2b]
- \usemathcollection[default]
-\stoptypescript
-
-\starttypescript [lh-t2c]
- \usetypescript [serif,sans,mono,math] [computer-modern,latin-modern] [default,name,size,t2c]
- \usemathcollection [default]
-\stoptypescript
-
-\starttypescript [lh-x2]
- \usetypescript [serif,sans,mono,math] [computer-modern,latin-modern] [default,name,size,x2]
- \usemathcollection [default]
-\stoptypescript
-
-\starttypescript [lh-lcy]
- \usetypescript [serif,sans,mono,math] [computer-modern,latin-modern] [default,name,size,lcy]
- \usemathcollection [default]
-\stoptypescript
-
-%D Here we implement the symbol fonts as provided by the
-%D American Mathematical Society. The names of these symbols
-%D can be found in The Joy of \TeX\ by M.~Spivak.
-
-% \starttypescript [ams]
-% \usetypescript [math] [ams] [all]
-% \usemathcollection[default]
-% \stoptypescript
-
-%D The Concrete Modern Roman is just an alternative Computer
-%D Modern Roman.
-
-% \starttypescript [con]
-% \usetypescript [serif] [concrete] [all]
-% \usemathcollection[default]
-% \stoptypescript
-
-%D The Euler Fonts are designed by Herman Zapf and can be
-%D used with the Concrete Fonts defined elsewhere.
-
-% \starttypescript [eul]
-% \usetypescript [math] [euler] [all]
-% \usemathcollection[eul]
-% \stoptypescript
-
-%D The Lucida Bright fonts are both good looking and and
-%D complete. These fonts have prebuilt accented characters,
-%D which means that we use another encoding vector: \YandY\
-%D texnansi. These fonts are a good illustration that a 12
-%D point bodyfont is indeed never that size. The Lucida Bright
-%D fonts come in one design size.
-
-% \starttypescript [lbr]
-% \usetypescript [serif,sans,mono,math,calligraphy,handwriting] [lucida] [name,special,\defaultencoding]
-% \usetypescript [serif,sans,mono,math,calligraphy,handwriting] [default] [size]
-% \usemathcollection[lbr]
-% \usetypescript [all] [lucida] [\defaultencoding]
-% \stoptypescript
-
-\starttypescript [lbr]
- \usetypescript[lucida][\defaultencoding]
-\stoptypescript
-
-%D Times
-
-\starttypescript [tim]
- \usetypescript [times] [\defaultencoding]
- \setupbodyfont [times]
-\stoptypescript
-
-%D The Antikwa Torunska font family is a rather nice
-%D and subtle one. Although primary meant for the polish
-%D language, it can be used for other languages as well.
-
-\starttypescript [ant]
- \usetypescript [antykwa-torunska] [\defaultencoding]
- \setupbodyfont [antykwa,rm]
-\stoptypescript
-
-%D This script defines the Standard Adobe Courier fonts.
-
-% \starttypescript [pcr]
-% \usetypescript [mono] [courier] [name,\defaultencoding]
-% \usetypescript [mono] [default] [size]
-% \usetypescript [all] [courier] [\defaultencoding]
-% \stoptypescript
-
-\starttypescript [pcr]
- \usetypescript [postscript] [\defaultencoding]
- \setupbodyfont [postscript,tt]
-\stoptypescript
-
-%D This script defines the Standard Adobe Helvetica fonts.
-
-% \starttypescript [phv]
-% \usetypescript [sans] [helvetica] [name,\defaultencoding]
-% \usetypescript [sans] [default] [size]
-% \usetypescript [all] [helvetica] [\defaultencoding]
-% \stoptypescript
-
-\starttypescript [phv]
- \usetypescript [postscript] [\defaultencoding]
- \setupbodyfont [postscript,ss]
-\stoptypescript
-
-%D This script defines the Standard Adobe Times fonts.
-
-% \starttypescript [ptm]
-% \usetypescript [serif] [times] [name,\defaultencoding]
-% \usetypescript [serif] [default] [size]
-% \usetypescript [all] [times] [\defaultencoding]
-% \stoptypescript
-
-\starttypescript [ptm]
- \usetypescript [postscript] [\defaultencoding]
- \setupbodyfont [postscript,rm]
-\stoptypescript
-
-%D This script loads the Adobe Times Roman, Helvetica and
-%D Courier.
-
-% \starttypescript [pos]
-% \usetypescript [serif] [times] [name,\defaultencoding]
-% \usetypescript [sans] [helvetica] [name,\defaultencoding]
-% \usetypescript [mono] [courier] [name,\defaultencoding]
-% \usetypescript [serif,sans,mono] [default] [size]
-% \usetypescript [all] [times,helvetica,courier] [\defaultencoding]
-% \stoptypescript
-
-\starttypescript [pos]
- \usetypescript [postscript] [\defaultencoding]
- \setupbodyfont [postscript]
-\stoptypescript
-
-%D This script defines the Palatino font.
-
-\starttypescript [ppl]
- \usetypescript [palatino] [\defaultencoding]
- \setupbodyfont [palatino]
-\stoptypescript
-
-%D The following scripts fake the old \type {font-ber} and
-%D alike files.
-
-\starttypescript[fil]
- % fake to prevent loading font-fil.tex and signal 'done'
-\stoptypescript
-
-%D But for old time sake we provide:
-
-\starttypescript[ber]
- \usetypescript [berry] [ec,t5] % could be [all]
-\stoptypescript
-
-\stoptypescriptcollection
-
-%D Special scripts:
-
-\unprotect
-
-\starttypescriptcollection[special scripts]
-
- \starttypescript[chi] \readfile{\f!fontprefix chi}\donothing\donothing \stoptypescript
- \starttypescript[jap] \readfile{\f!fontprefix jap}\donothing\donothing \stoptypescript
- \starttypescript[arb] \readfile{\f!fontprefix arb}\donothing\donothing \stoptypescript
- \starttypescript[heb] \readfile{\f!fontprefix heb}\donothing\donothing \stoptypescript
-
-\stoptypescriptcollection
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/type-run.mkiv b/Master/texmf-dist/tex/context/base/type-run.mkiv
deleted file mode 100644
index 0455d896636..00000000000
--- a/Master/texmf-dist/tex/context/base/type-run.mkiv
+++ /dev/null
@@ -1,51 +0,0 @@
-%D \module
-%D [ file=type-run,
-%D version=2001.04.20,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Runtime Macros,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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\typetypescript
- {\dotripleempty\dotypetypescript}
-
-\gdef\dotypetypescript[#1][#2][#3]%
- {\bgroup
- \def\dochecktypescript##1##2% script use
- {\doifelsenothing{##1##2}
- {\donetrue}
- {\doifelsecommon{##1}{##2}\donetrue\donefalse}}
- \edef\typescriptone {\truetypescript{#1}}%
- \edef\typescripttwo {\truetypescript{#2}}%
- \edef\typescriptthree{\truetypescript{#3}}%
- \unexpanded\def\starttypescript
- {\bgroup
- \obeylines % else we loose the first line due to lookahead
- \dotripleempty\dostarttypescript}
- \def\dostarttypescript[##1][##2][##3]%
- {\def\next####1\stoptypescript{\egroup}
- \dochecktypescript{##1}\typescriptone \ifdone
- \dochecktypescript{##2}\typescripttwo \ifdone
- \dochecktypescript{##3}\typescriptthree\ifdone
- \def\next%
- {\unexpanded\def\stoptypescript{\egroup\type{\stoptypescript}}
- % what follows now is quite ugly
- \skipfirstverbatimlinefalse
- \type{\starttypescript}
- \doifsomething{##1}{\type{[##1]}}
- \doifsomething{##2}{\type{[##2]}}
- \doifsomething{##3}{\type{[##3]}}
- \processdisplayverbatim{\stoptypescript}}%
- \fi\fi\fi
- \next}
- \processcommacommand[\typescriptfiles]\ReadFile % \dodousetypescript
- \egroup}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/type-win.mkii b/Master/texmf-dist/tex/context/base/type-win.mkii
deleted file mode 100644
index ae690982093..00000000000
--- a/Master/texmf-dist/tex/context/base/type-win.mkii
+++ /dev/null
@@ -1,69 +0,0 @@
-%D \module
-%D [ file=type-msw,
-%D version=2005.02.04,
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Microsoft Windows Fonts,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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-msw]
-%
-% \definetypeface[verdana][ss][sans] [verdana] [default][encoding=texnansi]
-% \definetypeface[verdana][rm][serif][palatino][default][encoding=texnansi,rscale=1.1]
-% \definetypeface[verdana][mm][math] [palatino][default][encoding=texnansi,rscale=1.1]
-% \definetypeface[verdana][tt][mono] [modern] [default][encoding=texnansi,rscale=1.25]
-%
-% \setupbodyfont[verdana] \showfontstrip
-%
-% \startlines
-% {\rm test {\sl test} {\it test} {\bf test} {\bs test} {\bi test}}
-% {\ss test {\sl test} {\it test} {\bf test} {\bs test} {\bi test}}
-% {\tt test {\sl test} {\it test} {\bf test} {\bs test} {\bi test}}
-% \stoplines
-
-\starttypescriptcollection[windows]
-
-% verdana
-
-\starttypescript [sans] [verdana] [name]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [Verdana]
- \definefontsynonym [SansBold] [Verdana-Bold]
- \definefontsynonym [SansItalic] [Verdana-Italic]
- \definefontsynonym [SansBoldItalic] [Verdana-BoldItalic]
-\stoptypescript
-
-\starttypescript [sans] [verdana] [texnansi,ec,qx]
- \definefontsynonym [Verdana] [\typescriptthree-verdana] [encoding=\typescriptthree]
- \definefontsynonym [Verdana-Bold] [\typescriptthree-verdanab] [encoding=\typescriptthree]
- \definefontsynonym [Verdana-Italic] [\typescriptthree-verdanai] [encoding=\typescriptthree]
- \definefontsynonym [Verdana-BoldItalic] [\typescriptthree-verdanaz] [encoding=\typescriptthree]
- \loadmapfile[\typescriptthree-microsoft-verdana.map]
-\stoptypescript
-
-% arial
-
-\starttypescript [sans] [arial] [name]
- \setups[font:fallback:sans]
- \definefontsynonym [Sans] [ArialMT]
- \definefontsynonym [SansBold] [Arial-BoldMT]
- \definefontsynonym [SansItalic] [Arial-ItalicMT]
- \definefontsynonym [SansBoldItalic] [Arial-BoldItalicMT]
-\stoptypescript
-
-\starttypescript [sans] [arial] [texnansi,ec,qx]
- \definefontsynonym [ArialMT] [\typescriptthree-arial] [encoding=\typescriptthree]
- \definefontsynonym [Arial-BoldMT] [\typescriptthree-arialbd] [encoding=\typescriptthree]
- \definefontsynonym [Arial-ItalicMT] [\typescriptthree-ariali] [encoding=\typescriptthree]
- \definefontsynonym [Arial-BoldItalicMT] [\typescriptthree-arialbi] [encoding=\typescriptthree]
- \loadmapfile[\typescriptthree-microsoft-arial.map]
-\stoptypescript
-
-\stoptypescriptcollection
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/type-xtx.mkii b/Master/texmf-dist/tex/context/base/type-xtx.mkii
deleted file mode 100644
index d8b5f9c2a85..00000000000
--- a/Master/texmf-dist/tex/context/base/type-xtx.mkii
+++ /dev/null
@@ -1,563 +0,0 @@
-%D \module
-%D [ file=type-xtx,
-%D version=2004.11.15, % prereleased earlier
-%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=\XETEX's font treasures,
-%D author=Adam T. Lindsay,
-%D date=\currentdate,
-%D copyright={Adam Lindsay \& 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.
-
-%D Here are some fonts definitions that can get you started with
-%D \XETEX\ (for more details see Adam's MyWay documents).
-%D
-%D Most typescripts in this file are mostly independent of the other
-%D typescript files. Generally, you can speed things up a lot by
-%D eliminating all but one of \CONTEXT's typescript files:
-%D
-%D \starttyping
-%D \usetypescriptfiles[reset] % HH: watch out, new feature, since
-%D \usetypescriptfiles[type-siz] % I disliked the low level redef.
-%D \stoptyping
-%D
-%D The exceptions are the \quotation {legacy} fonts Times, Palatino,
-%D Courier, and Helvetica, which also depend on \type {type-syn}.
-%D
-%D These following six typescripts call the basic four variants on any
-%D given font, given the name of the \quotation {Regular} variant in the
-%D name slot. These typescripts default to a Unicode encoding,
-%D accepts sizes \quotation {default} and \quotation {dtp}, and are
-%D activated with the identifiers \quotation {Xserif}, \quotation {Xsans},
-%D and \quotation {Xmono}. They can have relative scaling within the
-%D typeface. Any of the following work:
-%D
-%D \starttyping
-%D \definetypeface[basic][rm][Xserif][Baskerville]
-%D \definetypeface[basic][ss][Xsans] [Optima Regular][default][features=default,rscale=0.87]
-%D \definetypeface[basic][tt][Xmono] [Courier] [default]
-%D \stoptyping
-%D
-%D Activate the typeface with:
-%D
-%D \starttyping
-%D \setupbodyfont[basic]
-%D \stoptyping
-
-%D This file is hacked by Taco Hoekwater in an attempt to figure out the right approach
-%D to font loading in \XeTeX. (jun19,2007)
-
-%D The General \XeTeX\ low-level font syntax is (at least) as follows.
-%D
-%D Named font:
-%D \starttyping
-%D \font\x = "<fontname><engine-options>:<featurelist>" <at or scaled>
-%D \stoptyping
-%D \type{<fontname>} = Font name as seen in a system font menu or the output of fc-list
-%D
-%D \type{<engine-options>} = \type{/B} or \type{/I} or \tupe{/BI}, and||or \type{/S=<X>}.
-%D That last one selects an optical scaled variant for size \type{<X>}
-%D (it is a bare number, the unit is points).
-%D
-%D \type{<featurelist>} = comma- or semicolon- separated list of font features.
-%D
-%D Opentype features are selected using \type{+<tag>}, and deselected using \type{-<tag>},
-%D except that key||value pairs are used for \type{script=<tag>} and \type{language=<tag>}
-%D
-%D AAT features are always key||value pairs, often including spaces.
-%D
-%D \XETEX's own features are key||value pairs, and can be applied to both OpenType
-%D and AAT fonts:
-%D \type{mapping=<font map>} for glyph remapping
-%D \type{color=RRGGBB[TT]} for color (hex numbers, with optional transparancy),
-%D \type{letterspace=<x>} to add \type{<x>/<fontsize>} intercharacter spacing.
-%D
-%D Full example showing all parts of the syntax for an OTF font:
-%D \starttyping
-%D \font\f= "Warnock Pro/I/S=5:+smcp,-liga,mapping=tex-text,script=latn"
-%D \stoptyping
-
-%D Non-installed (filename-based) fonts :
-%D
-%D \starttyping
-%D \font\x = "[<fontname>]:<featurelist>" <at or scaled>
-%D \stoptyping
-%D
-%D Here, there are no \type{<engine-options>}, because there is no
-%D font discovery engine available to be queried.
-
-%D TH: This \type{\xetexcolon} definition seems needed because the name/file \
-%D parser otherwise drops the rest of the argument into oblivion.
-
-\unexpanded\def\xetexcolon{:}
-
-\starttypescriptcollection[xetex]
-
-\starttypescript[Xserif][all][name]
-
-%D TH: I removed all single quotes because they don't seem to add anything. And I added
-%D the \type{name:} everywhere, because passing that information on \type{\typescripttwo}
-%D doesn't work either (maybe \type{\typescripttwo} is expanded incorrectly)
-%D
-%D And even if that would have worked, \type{file:} will not work properly anyway
-%D in this case since tricks like \type{/I} will never, ever work for local fonts,
-%D so there is really only one choice.
-
-%D HH: todo, define feature set switch mapping=tex-tex
-
-\definefontsynonym[Dummy] [name:\typescripttwo] [features=default]
-\definefontsynonym[DummyItalic] [name:\typescripttwo/I] [features=default]
-\definefontsynonym[DummyBold] [name:\typescripttwo/B] [features=default]
-\definefontsynonym[DummyBoldItalic][name:\typescripttwo/BI][features=default]
-
-\definefontsynonym[DummyCaps] [name:\typescripttwo] [features=smallcaps]
-
-\definefontsynonym[Serif] [Dummy]
-\definefontsynonym[SerifBold] [DummyBold]
-\definefontsynonym[SerifItalic] [DummyItalic]
-\definefontsynonym[SerifBoldItalic] [DummyBoldItalic]
-\definefontsynonym[SerifSlanted] [DummyItalic]
-\definefontsynonym[SerifBoldSlanted][DummyBoldItalic]
-\definefontsynonym[SerifCaps] [DummyCaps]
-
-\stoptypescript
-
-\starttypescript[Xsans][all][name]
-
-\definefontsynonym[DummySans] [name:\typescripttwo] [features=default]
-\definefontsynonym[DummySansItalic] [name:\typescripttwo/I] [features=default]
-\definefontsynonym[DummySansBold] [name:\typescripttwo/B] [features=default]
-\definefontsynonym[DummySansBoldItalic][name:\typescripttwo/BI][features=default]
-
-\definefontsynonym[DummySansCaps] [name:\typescripttwo] [features=smallcaps]
-
-\definefontsynonym[Sans] [DummySans]
-\definefontsynonym[SansBold] [DummySansBold]
-\definefontsynonym[SansItalic] [DummySansItalic]
-\definefontsynonym[SansBoldItalic] [DummySansBoldItalic]
-\definefontsynonym[SansSlanted] [DummySansItalic]
-\definefontsynonym[SansBoldSlanted][DummySansBoldItalic]
-\definefontsynonym[SansCaps] [DummySansCaps]
-
-\stoptypescript
-
-\starttypescript[Xmono][all][name]
-
-\definefontsynonym[DummyMono] [name:\typescripttwo]
-\definefontsynonym[DummyMonoItalic] [name:\typescripttwo/I]
-\definefontsynonym[DummyMonoBold] [name:\typescripttwo/B]
-\definefontsynonym[DummyMonoBoldItalic][name:\typescripttwo/BI]
-
-% TODO: smallcaps without other features
-
-\definefontsynonym[Mono] [DummyMono]
-\definefontsynonym[MonoBold] [DummyMonoBold]
-\definefontsynonym[MonoItalic] [DummyMonoItalic]
-\definefontsynonym[MonoBoldItalic] [DummyMonoBoldItalic]
-\definefontsynonym[MonoSlanted] [DummyMonoItalic]
-\definefontsynonym[MonoBoldSlanted][DummyMonoBoldItalic]
-\definefontsynonym[MonoCaps] [DummyMono]
-
-\stoptypescript
-
-\starttypescript[Xserif][default][size]
- \definebodyfont
- [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt] [rm]
- [default]
-\stoptypescript
-
-\starttypescript[Xsans][default][size]
- \definebodyfont
- [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
- [ss] [default]
-\stoptypescript
-
-\starttypescript [Xmono][default][size]
- \definebodyfont
- [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
- [tt] [default]
-\stoptypescript
-
-\starttypescript[Xserif][dtp][size]
- \definebodyfont
- [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt]
- [rm] [default]
-\stoptypescript
-
-\starttypescript[Xsans][dtp][size]
- \definebodyfont
- [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt]
- [ss] [default]
-\stoptypescript
-
-\starttypescript[Xmono][dtp][size]
- \definebodyfont
- [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt]
- [tt] [default]
-\stoptypescript
-
-%D The following are \quotation {legacy} named fonts. Times, Palatino,
-%D and Helvetica are familiar to most users of modern \TEX\
-%D systems. These versions are accessed via the Unicode encoding
-%D enabled by \XETEX. There is no attempt to match metrics with
-%D the actual legacy fonts. These are simply familiar names.
-
-%D These typescripts, unlike others in this file, depend on those in
-%D \type{type-pre}.
-
-\starttypescript[serif][times][uc]
-
-\definefontsynonym[Times-Roman] [name:Times Roman] [features=default]
-\definefontsynonym[Times-Italic] [name:Times Italic] [features=default]
-\definefontsynonym[Times-Bold] [name:Times Bold] [features=default]
-\definefontsynonym[Times-BoldItalic][name:Times Bold Italic][features=default]
-
-\stoptypescript
-
-%D Book Antiqua is Mac OS X's Palatino clone.
-
-\starttypescript[serif][palatino][uc]
-
-\definefontsynonym[Palatino] [name:Book Antiqua] [features=default]
-\definefontsynonym[Palatino-Italic] [name:Book Antiqua Italic] [features=default]
-\definefontsynonym[Palatino-Bold] [name:Book Antiqua Bold] [features=default]
-\definefontsynonym[Palatino-BoldItalic] [name:Book Antiqua Bold Italic][features=default]
-
-\definefontsynonym[Palatino-Slanted] [Palatino-Italic]
-\definefontsynonym[Palatino-BoldSlanted] [Palatino-BoldItalic]
-\definefontsynonym[Palatino-Caps] [Palatino]
-
-\stoptypescript
-
-%D The default Helvetica doesn't have an oblique variant, so we'll
-%D go ahead and name Helvertica Neue here.
-
-\starttypescript[sans][helvetica][uc]
-
-\definefontsynonym[Helvetica] [name:Helvetica Neue] [features=default]
-\definefontsynonym[Helvetica-Oblique] [name:Helvetica Neue Italic] [features=default]
-\definefontsynonym[Helvetica-Bold] [name:Helvetica Neue Bold] [features=default]
-\definefontsynonym[Helvetica-BoldOblique][name:Helvetica Neue Bold Italic][features=default]
-
-\stoptypescript
-
-%D Courier, as delivered on MacOSX 10.3, doesn't have an oblique
-%D variant, either. Unfortunately, none of the default Mono fonts in
-%D MacOSX have oblique|/|italic versions!
-
-\starttypescript[mono][courier][uc]
-
-\definefontsynonym[Courier] [name:Courier]
-\definefontsynonym[Courier-Oblique] [Courier]
-\definefontsynonym[Courier-Bold] [name:Courier Bold]
-\definefontsynonym[Courier-BoldOblique][Courier-Bold]
-
-\stoptypescript
-
-%D The following fonts go beyond the usual four variants that
-%D are accessible via the above wildcard typescripts, so they
-%D get a more expanded treatment here\xetexcolon
-
-\starttypescript[serif][hoefler][uc]
-
-\definefontsynonym[Hoefler] [name:Hoefler Text\xetexcolon mapping=tex-text;%
- Ligatures=Diphthongs] [encoding=uc]
-\definefontsynonym[HoeflerItalic][name:Hoefler Text Italic\xetexcolon mapping=tex-text;%
- Ligatures=Diphthongs] [encoding=uc]
-\definefontsynonym[HoeflerBlack] [name:Hoefler Text Black\xetexcolon mapping=tex-text;%
- Ligatures=Diphthongs] [encoding=uc]
-\definefontsynonym[HoeflerBlackItalic][name:Hoefler Text Black Italic\xetexcolon mapping=tex-text;%
- Ligatures=Diphthongs] [encoding=uc]
-\definefontsynonym[HoeflerSmCap] [name:Hoefler Text\xetexcolon mapping=tex-text;%
- Ligatures=Diphthongs;%
- Letter Case=Small Caps][encoding=uc]
-\stoptypescript
-
-\starttypescript[serif][hoefler][name]
-
-\definefontsynonym[Serif] [Hoefler]
-\definefontsynonym[SerifBold] [HoeflerBlack]
-\definefontsynonym[SerifItalic] [HoeflerItalic]
-\definefontsynonym[SerifBoldItalic] [HoeflerBlackItalic]
-\definefontsynonym[SerifSlanted] [HoeflerItalic]
-\definefontsynonym[SerifBoldSlanted][HoeflerBlackItalic]
-\definefontsynonym[SerifCaps] [HoeflerSmCap]
-
-\stoptypescript
-
-\starttypescript[sans][lucidagrande][uc]
-
-\definefontsynonym[LucidaGrande] [name:Lucida Grande] [features=default]
-\definefontsynonym[LucidaGrandeBold][name:Lucida Grande Bold][features=default]
-
-\stoptypescript
-
-\starttypescript[sans][lucidagrande][name]
-
-\definefontsynonym[Sans] [LucidaGrande]
-\definefontsynonym[SansBold] [LucidaGrandeBold]
-\definefontsynonym[SansItalic] [LucidaGrande]
-\definefontsynonym[SansBoldItalic] [LucidaGrandeBold]
-\definefontsynonym[SansSlanted] [LucidaGrande]
-\definefontsynonym[SansBoldSlanted][LucidaGrandeBold]
-\definefontsynonym[SansCaps] [LucidaGrande]
-
-\stoptypescript
-
-\starttypescript[sans][optima][uc]
-\definefontsynonym[Optima] [name:Optima Regular] [features=default]
-\definefontsynonym[OptimaItalic] [name:Optima Italic] [features=default]
-\definefontsynonym[OptimaBold] [name:Optima Bold] [features=default]
-\definefontsynonym[OptimaBoldItalic][name:Optima Bold Italic][features=default]
-\definefontsynonym[OptimaBlack] [name:Optima ExtraBlack] [features=default]
-\stoptypescript
-
-\starttypescript[sans][optima][name]
-
-\definefontsynonym[Sans] [Optima]
-\definefontsynonym[SansBold] [OptimaBold]
-\definefontsynonym[SansItalic] [OptimaItalic]
-\definefontsynonym[SansBoldItalic] [OptimaBoldItalic]
-\definefontsynonym[SansSlanted] [OptimaItalic]
-\definefontsynonym[SansBoldSlanted][OptimaBoldItalic]
-\definefontsynonym[SansCaps] [Optima]
-
-\stoptypescript
-
-\starttypescript[sans][gillsans,gillsanslt][uc]
-
-\definefontsynonym[GillSans] [name:Gill Sans] [features=default]
-\definefontsynonym[GillSansItalic] [name:Gill Sans Italic] [features=default]
-\definefontsynonym[GillSansBold] [name:Gill Sans Bold] [features=default]
-\definefontsynonym[GillSansBoldItalic] [name:Gill Sans Bold Italic] [features=default]
-\definefontsynonym[GillSansLight] [name:Gill Sans Light] [features=default]
-\definefontsynonym[GillSansLightItalic][name:Gill Sans Light Italic][features=default]
-
-\stoptypescript
-
-\starttypescript[sans][gillsans][name]
-
-\definefontsynonym[Sans] [GillSans]
-\definefontsynonym[SansBold] [GillSansBold]
-\definefontsynonym[SansItalic] [GillSansItalic]
-\definefontsynonym[SansBoldItalic] [GillSansBoldItalic]
-\definefontsynonym[SansSlanted] [GillSansItalic]
-\definefontsynonym[SansBoldSlanted][GillSansBoldItalic]
-\definefontsynonym[SansCaps] [GillSans]
-
-\stoptypescript
-
-\starttypescript[sans][gillsanslt][name]
-
-\definefontsynonym[Sans] [GillSansLight]
-\definefontsynonym[SansBold] [GillSans]
-\definefontsynonym[SansItalic] [GillSansLightItalic]
-\definefontsynonym[SansBoldItalic] [GillSansItalic]
-\definefontsynonym[SansSlanted] [GillSansLightItalic]
-\definefontsynonym[SansBoldSlanted][GillSansItalic]
-\definefontsynonym[SansCaps] [GillSansLight]
-
-\stoptypescript
-
-\starttypescript[serif,handwriting][zapfino][uc]
-
-\definefontsynonym[ZapfinoOne] [name:Zapfino\xetexcolon mapping=tex-text] [encoding=uc]
-\definefontsynonym[ZapfinoTwo] [name:Zapfino\xetexcolon mapping=tex-text;%
- Stylistic Variants=First variant glyph set] [encoding=uc]
-\definefontsynonym[ZapfinoThree][name:Zapfino\xetexcolon mapping=tex-text;%
- Stylistic Variants=Second variant glyph set][encoding=uc]
-\definefontsynonym[ZapfinoFour] [name:Zapfino\xetexcolon mapping=tex-text;%
- Stylistic Variants=Third variant glyph set] [encoding=uc]
-\stoptypescript
-
-\starttypescript[handwriting][zapfino][name]
-
-\definefontsynonym[Handwriting][ZapfinoOne]
-
-\stoptypescript
-
-\starttypescript[serif][zapfino][name]
-
-\definefontsynonym[Serif] [ZapfinoOne]
-\definefontsynonym[SerifBold] [ZapfinoThree]
-\definefontsynonym[SerifItalic] [ZapfinoTwo]
-\definefontsynonym[SerifBoldItalic] [ZapfinoTwo]
-\definefontsynonym[SerifSlanted] [ZapfinoThree]
-\definefontsynonym[SerifBoldSlanted][ZapfinoThree]
-\definefontsynonym[SerifCaps] [ZapfinoOne]
-
-\stoptypescript
-
-\starttypescript[serif,calligraphy][applechancery][uc]
-
-\definefontsynonym[AppleChanceryOne] [name:Apple Chancery\xetexcolon mapping=tex-text;%
- Number Case=Old Styles] [encoding=uc]
-\definefontsynonym[AppleChanceryTwo] [name:Apple Chancery\xetexcolon mapping=tex-text;%
- Number Case=Old Styles;%
- Design Complexity=Elegant Design Level][encoding=uc]
-\definefontsynonym[AppleChanceryThree] [name:Apple Chancery\xetexcolon mapping=tex-text;%
- Number Case=Old Styles;%
- Design Complexity=Flourishes Set A] [encoding=uc]
-\definefontsynonym[AppleChanceryFour] [name:Apple Chancery\xetexcolon mapping=tex-text;%
- Number Case=Old Styles;%
- Design Complexity=Flourishes Set B] [encoding=uc]
-\definefontsynonym[AppleChanceryCaps] [name:Apple Chancery\xetexcolon mapping=tex-text;%
- Number Case=Old Styles;%
- Letter Case=Small Caps] [encoding=uc]
-\definefontsynonym[AppleChanceryCapsTwo][name:Apple Chancery\xetexcolon mapping=tex-text;%
- Number Case=Old Styles;%
- Letter Case=Small Caps;%
- Design Complexity=Flourishes Set B] [encoding=uc]
-\stoptypescript
-
-\starttypescript[calligraphy][applechancery][name]
-
-\definefontsynonym[Calligraphy][AppleChanceryOne]
-
-\stoptypescript
-
-\starttypescript[serif][applechancery][name]
-
-\definefontsynonym[Serif] [AppleChanceryOne]
-\definefontsynonym[SerifBold] [AppleChanceryThree]
-\definefontsynonym[SerifItalic] [AppleChanceryTwo]
-\definefontsynonym[SerifBoldItalic] [AppleChanceryFour]
-\definefontsynonym[SerifSlanted] [AppleChanceryThree]
-\definefontsynonym[SerifBoldSlanted][AppleChanceryFour]
-\definefontsynonym[SerifCaps] [AppleChanceryCaps]
-
-\stoptypescript
-
-% MS Office 2004 for Mac has impressive Unicode coverage in
-% many of its fonts.
-
-\starttypescript[serif][timesnewroman][uc]
-
-\definefontsynonym[MSTimes] [name:Times New Roman] [features=default]
-\definefontsynonym[MSTimesItalic] [name:Times New Roman Italic] [features=default]
-\definefontsynonym[MSTimesBold] [name:Times New Roman Bold] [features=default]
-\definefontsynonym[MSTimesBoldItalic][name:Times New Roman Bold Italic][features=default]
-
-\stoptypescript
-
-\starttypescript[serif][timesnewroman][name]
-
-\definefontsynonym[Serif] [MSTimes]
-\definefontsynonym[SerifBold] [MSTimesBold]
-\definefontsynonym[SerifItalic] [MSTimesItalic]
-\definefontsynonym[SerifBoldItalic] [MSTimesBoldItalic]
-\definefontsynonym[SerifSlanted] [MSTimesItalic]
-\definefontsynonym[SerifBoldSlanted][MSTimesBoldItalic]
-\definefontsynonym[SerifCaps] [MSTimes]
-
-\stoptypescript
-
-\starttypescript[sans][arial][uc]
-
-\definefontsynonym[Arial] [name:Arial] [features=default]
-\definefontsynonym[ArialItalic] [name:Arial Italic] [features=default]
-\definefontsynonym[ArialBold] [name:Arial Bold] [features=default]
-\definefontsynonym[ArialBoldItalic][name:Arial Bold Italic][features=default]
-
-\stoptypescript
-
-\starttypescript[sans][arial][name]
-
-\definefontsynonym[Sans] [Arial]
-\definefontsynonym[SansBold] [ArialBold]
-\definefontsynonym[SansItalic] [ArialItalic]
-\definefontsynonym[SansBoldItalic] [ArialBoldItalic]
-\definefontsynonym[SansSlanted] [ArialItalic]
-\definefontsynonym[SansBoldSlanted][ArialBoldItalic]
-\definefontsynonym[SansCaps] [Arial]
-
-\stoptypescript
-
-%D MS Office comes with an installation of the Lucida family in
-%D TrueType form. It's nice, except\dots\ no math, no slanted, no caps
-%D and some other auxiliary fonts.
-
-\starttypescript [serif] [lucida] [uc]
-
- \definefontsynonym [LucidaBright] [name:Lucida Bright] [features=default]
- \definefontsynonym [LucidaBright-Demi] [name:Lucida Bright Demibold][features=default]
- \definefontsynonym [LucidaBright-DemiItalic] [name:Lucida Bright Demibold][features=default]
- \definefontsynonym [LucidaBright-Italic] [name:Lucida Bright] [features=default]
-
- \definefontsynonym [LucidaBrightSmallcaps] [LucidaBright]
- \definefontsynonym [LucidaBrightSmallcaps-Demi][LucidaBright-Demi]
- \definefontsynonym [LucidaBright-Oblique] [LucidaBright-Italic]
-
-\stoptypescript
-
-\starttypescript [sans] [lucida] [uc]
- \definefontsynonym [LucidaSans] [name:Lucida Sans Regular] [features=default]
- \definefontsynonym [LucidaSans-Demi] [name:Lucida Sans Demibold Roman] [features=default]
- \definefontsynonym [LucidaSans-DemiItalic][name:Lucida Sans Demibold Italic][features=default]
- \definefontsynonym [LucidaSans-Italic] [name:Lucida Sans Italic] [features=default]
-
- \definefontsynonym [LucidaSans-Bold] [LucidaSans-Demi]
- \definefontsynonym [LucidaSans-BoldItalic][LucidaSans-DemiItalic]
-
-\stoptypescript
-
-\starttypescript [mono] [lucida] [uc]
-
- \definefontsynonym [LucidaSans-Typewriter] [name:Lucida Sans Typewriter Regular] [encoding=uc]
- \definefontsynonym [LucidaSans-TypewriterBold] [name:Lucida Sans Typewriter Bold] [encoding=uc]
- \definefontsynonym [LucidaSans-TypewriterBoldOblique][name:Lucida Sans Typewriter Bold Oblique][encoding=uc]
- \definefontsynonym [LucidaSans-TypewriterOblique] [name:Lucida Sans Typewriter Oblique] [encoding=uc]
-
-\stoptypescript
-
-\starttypescript [calligraphy] [lucida] [uc]
-
- \definefontsynonym[LucidaCalligraphy-Italic][name:Lucida Calligraphy Italic][features=default]
-
-\stoptypescript
-
-% No casual that I know of
-
-\starttypescript[handwriting][lucida][uc]
-
- \definefontsynonym[LucidaHandwriting-Italic][name:Lucida Handwriting Italic][features=default]
-
-\stoptypescript
-
-\starttypescript[fax][lucida][uc]
-
- \definefontsynonym[LucidaFax] [name:Lucida Fax Regular] [features=default]
- \definefontsynonym[LucidaFax-Demi] [name:Lucida Fax Demibold] [features=default]
- \definefontsynonym[LucidaFax-DemiItalic][name:Lucida Fax Demibold Italic][features=default]
- \definefontsynonym[LucidaFax-Italic] [name:Lucida Fax Italic] [features=default]
-
-\stoptypescript
-
-%D Gentium is from SIL, the fine makers of \XETEX, and it's not only
-%D very complete with Roman and Italic Unicode support, but very
-%D attractive.
-
-\starttypescript[serif][gentium][uc]
-
-\definefontsynonym[Gentium] [name:Gentium] [features=default]
-\definefontsynonym[GentiumItalic][name:Gentium Italic][features=default]
-
-\stoptypescript
-
-\starttypescript[serif][gentium][name]
-
-\definefontsynonym[Serif] [Gentium]
-\definefontsynonym[SerifBold] [Gentium]
-\definefontsynonym[SerifItalic] [GentiumItalic]
-\definefontsynonym[SerifBoldItalic] [GentiumItalic]
-\definefontsynonym[SerifSlanted] [GentiumItalic]
-\definefontsynonym[SerifBoldSlanted][GentiumItalic]
-\definefontsynonym[SerifCaps] [Gentium]
-
-\stoptypescript
-
-\stoptypescriptcollection
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/typo-brk.lua b/Master/texmf-dist/tex/context/base/typo-brk.lua
deleted file mode 100644
index a9d775856b4..00000000000
--- a/Master/texmf-dist/tex/context/base/typo-brk.lua
+++ /dev/null
@@ -1,352 +0,0 @@
-if not modules then modules = { } end modules ['typo-brk'] = {
- version = 1.001,
- comment = "companion to typo-brk.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
--- this code dates from the beginning and is kind of experimental; it
--- will be optimized and improved soon
-
-local next, type, tonumber = next, type, tonumber
-local utfbyte, utfchar = utf.byte, utf.char
-local format = string.format
-
-local trace_breakpoints = false trackers.register("typesetters.breakpoints", function(v) trace_breakpoints = v end)
-
-local report_breakpoints = logs.reporter("typesetting","breakpoints")
-
-local nodes, node = nodes, node
-
-local settings_to_array = utilities.parsers.settings_to_array
-
-local nuts = nodes.nuts
-local tonut = nuts.tonut
-local tonode = nuts.tonode
-
-local getnext = nuts.getnext
-local getprev = nuts.getprev
-local getsubtype = nuts.getsubtype
-local getchar = nuts.getchar
-local getfont = nuts.getfont
-local getid = nuts.getid
-local getfield = nuts.getfield
-local setfield = nuts.setfield
-local getattr = nuts.getattr
-local setattr = nuts.setattr
-
-local copy_node = nuts.copy
-local copy_nodelist = nuts.copy_list
-local free_node = nuts.free
-local insert_node_before = nuts.insert_before
-local insert_node_after = nuts.insert_after
-local remove_node = nuts.remove
-
-local tonodes = nuts.tonodes
-
-local texsetattribute = tex.setattribute
-local unsetvalue = attributes.unsetvalue
-
-local nodepool = nuts.pool
-local tasks = nodes.tasks
-
-local v_reset = interfaces.variables.reset
-
-local implement = interfaces.implement
-
-local new_penalty = nodepool.penalty
-local new_glue = nodepool.glue
-local new_disc = nodepool.disc
-
-local nodecodes = nodes.nodecodes
-local kerncodes = nodes.kerncodes
-
-local glyph_code = nodecodes.glyph
-local kern_code = nodecodes.kern
-
-local kerning_code = kerncodes.kerning
-
-local typesetters = typesetters
-
-typesetters.breakpoints = typesetters.breakpoints or {}
-local breakpoints = typesetters.breakpoints
-
-breakpoints.mapping = breakpoints.mapping or { }
-breakpoints.numbers = breakpoints.numbers or { }
-
-breakpoints.methods = breakpoints.methods or { }
-local methods = breakpoints.methods
-
-local a_breakpoints = attributes.private("breakpoint")
-
-storage.register("typesetters/breakpoints/mapping", breakpoints.mapping, "typesetters.breakpoints.mapping")
-
-local mapping = breakpoints.mapping
-local numbers = breakpoints.mapping
-
-for i=1,#mapping do
- local m = mapping[i]
- numbers[m.name] = m
-end
-
-local function insert_break(head,start,before,after)
- insert_node_before(head,start,new_penalty(before))
- insert_node_before(head,start,new_glue(0))
- insert_node_after(head,start,new_glue(0))
- insert_node_after(head,start,new_penalty(after))
-end
-
-methods[1] = function(head,start)
- if getprev(start) and getnext(start) then
- insert_break(head,start,10000,0)
- end
- return head, start
-end
-
-methods[2] = function(head,start) -- ( => (-
- if getprev(start) and getnext(start) then
- local tmp
- head, start, tmp = remove_node(head,start)
- head, start = insert_node_before(head,start,new_disc())
- -- setfield(start,"attr",copy_nodelist(getfield(tmp,"attr"))) -- just a copy will do
- setfield(start,"attr",getfield(tmp,"attr"))
- setfield(start,"replace",tmp)
- local tmp = copy_node(tmp)
- local hyphen = copy_node(tmp)
- setfield(hyphen,"char",languages.prehyphenchar(getfield(tmp,"lang")))
- setfield(tmp,"next",hyphen)
- setfield(hyphen,"prev",tmp)
- setfield(start,"post",tmp)
- insert_break(head,start,10000,10000)
- end
- return head, start
-end
-
-methods[3] = function(head,start) -- ) => -)
- if getprev(start) and getnext(start) then
- local tmp
- head, start, tmp = remove_node(head,start)
- head, start = insert_node_before(head,start,new_disc())
- -- setfield(start,"attr",copy_nodelist(getfield(tmp,"attr"))) -- just a copy will do
- setfield(start,"attr",getfield(tmp,"attr"))
- setfield(start,"replace",tmp)
- local tmp = copy_node(tmp)
- local hyphen = copy_node(tmp)
- setfield(hyphen,"char",languages.prehyphenchar(getfield(tmp,"lang")))
- setfield(tmp,"prev",hyphen)
- setfield(hyphen,"next",tmp)
- setfield(start,"pre",hyphen)
- insert_break(head,start,10000,10000)
- end
- return head, start
-end
-
-methods[4] = function(head,start) -- - => - - -
- if getprev(start) and getnext(start) then
- local tmp
- head, start, tmp = remove_node(head,start)
- head, start = insert_node_before(head,start,new_disc())
- -- setfield(start,"attr",copy_nodelist(getfield(tmp,"attr"))) -- just a copy will do
- setfield(start,"attr",getfield(tmp,"attr"))
- setfield(start,"pre",copy_node(tmp))
- setfield(start,"post",copy_node(tmp))
- setfield(start,"replace",tmp)
- insert_break(head,start,10000,10000)
- end
- return head, start
-end
-
-methods[5] = function(head,start,settings) -- x => p q r
- if getprev(start) and getnext(start) then
- local tmp
- head, start, tmp = remove_node(head,start)
- head, start = insert_node_before(head,start,new_disc())
- local attr = getfield(tmp,"attr")
- local font = getfont(tmp)
- local left = settings.left
- local right = settings.right
- local middle = settings.middle
- if left then
- setfield(start,"pre",(tonodes(tostring(left),font,attr))) -- was right
- end
- if right then
- setfield(start,"post",(tonodes(tostring(right),font,attr))) -- was left
- end
- if middle then
- setfield(start,"replace",(tonodes(tostring(middle),font,attr)))
- end
- -- setfield(start,"attr",copy_nodelist(attr)) -- todo: critical only -- just a copy will do
- setfield(start,"attr",attr) -- todo: critical only -- just a copy will do
- free_node(tmp)
- insert_break(head,start,10000,10000)
- end
- return head, start
-end
-
-function breakpoints.handler(head)
- head = tonut(head)
- local done, numbers = false, languages.numbers
- local start, n = head, 0
- while start do
- local id = getid(start)
- if id == glyph_code then
- local attr = getattr(start,a_breakpoints)
- if attr and attr > 0 then
- setattr(start,a_breakpoints,unsetvalue) -- maybe test for subtype > 256 (faster)
- -- look ahead and back n chars
- local data = mapping[attr]
- if data then
- local map = data.characters
- local cmap = map[getchar(start)]
- if cmap then
- local lang = getfield(start,"lang")
- -- we do a sanity check for language
- local smap = lang and lang >= 0 and lang < 0x7FFF and (cmap[numbers[lang]] or cmap[""])
- if smap then
- if n >= smap.nleft then
- local m = smap.nright
- local next = getnext(start)
- while next do -- gamble on same attribute (not that important actually)
- local id = getid(next)
- if id == glyph_code then -- gamble on same attribute (not that important actually)
- if map[getchar(next)] then
- break
- elseif m == 1 then
- local method = methods[smap.type]
- if method then
- head, start = method(head,start,smap)
- done = true
- end
- break
- else
- m = m - 1
- next = getnext(next)
- end
- elseif id == kern_code and getsubtype(next) == kerning_code then
- next = getnext(next)
- -- ignore intercharacter kerning, will go way
- else
- -- we can do clever and set n and jump ahead but ... not now
- break
- end
- end
- end
- n = 0
- else
- n = n + 1
- end
- else
- n = n + 1
- end
- else
- n = 0
- end
- else
- -- n = n + 1 -- if we want single char handling (|-|) then we will use grouping and then we need this
- end
- elseif id == kern_code and getsubtype(start) == kerning_code then
- -- ignore intercharacter kerning, will go way
- else
- n = 0
- end
- start = getnext(start)
- end
- return tonode(head), done
-end
-
-local enabled = false
-
-function breakpoints.define(name)
- local data = numbers[name]
- if data then
- -- error
- else
- local number = #mapping + 1
- local data = {
- name = name,
- number = number,
- characters = { },
- }
- mapping[number] = data
- numbers[name] = data
- end
-end
-
-function breakpoints.setreplacement(name,char,language,settings)
- char = utfbyte(char)
- local data = numbers[name]
- if data then
- local characters = data.characters
- local cmap = characters[char]
- if not cmap then
- cmap = { }
- characters[char] = cmap
- end
- local left, right, middle = settings.left, settings.right, settings.middle
- cmap[language or ""] = {
- type = tonumber(settings.type) or 1,
- nleft = tonumber(settings.nleft) or 1,
- nright = tonumber(settings.nright) or 1,
- left = left ~= "" and left or nil,
- right = right ~= "" and right or nil,
- middle = middle ~= "" and middle or nil,
- } -- was { type or 1, before or 1, after or 1 }
- end
-end
-
-function breakpoints.set(n)
- if n == v_reset then
- n = unsetvalue
- else
- n = mapping[n]
- if not n then
- n = unsetvalue
- else
- if not enabled then
- if trace_breakpoints then
- report_breakpoints("enabling breakpoints handler")
- end
- tasks.enableaction("processors","typesetters.breakpoints.handler")
- end
- n = n.number
- end
- end
- texsetattribute(a_breakpoints,n)
-end
-
--- function breakpoints.enable()
--- tasks.enableaction("processors","typesetters.breakpoints.handler")
--- end
-
--- interface
-
-implement {
- name = "definebreakpoints",
- actions = breakpoints.define,
- arguments = "string"
-}
-
-implement {
- name = "definebreakpoint",
- actions = breakpoints.setreplacement,
- arguments = {
- "string",
- "string",
- "string",
- {
- { "type", "integer" },
- { "nleft" },
- { "nright" },
- { "right" },
- { "left" },
- { "middle" },
- }
- }
-}
-
-implement {
- name = "setbreakpoints",
- actions = breakpoints.set,
- arguments = "string"
-}
diff --git a/Master/texmf-dist/tex/context/base/typo-dha.lua b/Master/texmf-dist/tex/context/base/typo-dha.lua
deleted file mode 100644
index 904b774ec30..00000000000
--- a/Master/texmf-dist/tex/context/base/typo-dha.lua
+++ /dev/null
@@ -1,415 +0,0 @@
-if not modules then modules = { } end modules ['typo-dha'] = {
- version = 1.001,
- comment = "companion to typo-dir.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
--- Some analysis by Idris:
---
--- 1. Assuming the reading- vs word-order distinction (bidi-char types) is governing;
--- 2. Assuming that 'ARAB' represents an actual arabic string in raw input order, not word-order;
--- 3. Assuming that 'BARA' represent the correct RL word order;
---
--- Then we have, with input: LATIN ARAB
---
--- \textdir TLT LATIN ARAB => LATIN BARA
--- \textdir TRT LATIN ARAB => LATIN BARA
--- \textdir TRT LRO LATIN ARAB => LATIN ARAB
--- \textdir TLT LRO LATIN ARAB => LATIN ARAB
--- \textdir TLT RLO LATIN ARAB => NITAL ARAB
--- \textdir TRT RLO LATIN ARAB => NITAL ARAB
-
--- elseif d == "es" then -- European Number Separator
--- elseif d == "et" then -- European Number Terminator
--- elseif d == "cs" then -- Common Number Separator
--- elseif d == "nsm" then -- Non-Spacing Mark
--- elseif d == "bn" then -- Boundary Neutral
--- elseif d == "b" then -- Paragraph Separator
--- elseif d == "s" then -- Segment Separator
--- elseif d == "ws" then -- Whitespace
--- elseif d == "on" then -- Other Neutrals
-
--- todo : delayed inserts here
--- todo : get rid of local functions here
--- beware: math adds whatsits afterwards so that will mess things up
--- todo : use new dir functions
--- todo : make faster
--- todo : move dir info into nodes
--- todo : swappable tables and floats i.e. start-end overloads (probably loop in builders)
--- todo : check if we still have crashes in luatex when non-matched (used to be the case)
-
--- I removed the original tracing code and now use the colorful one. If I ever want to change
--- something I will just inject prints for tracing.
-
-local nodes, node = nodes, node
-
-local trace_directions = false trackers.register("typesetters.directions.default", function(v) trace_directions = v end)
-
-local report_directions = logs.reporter("typesetting","text directions")
-
-local nuts = nodes.nuts
-local tonut = nuts.tonut
-local tonode = nuts.tonode
-local nutstring = nuts.tostring
-
-local getnext = nuts.getnext
-local getprev = nuts.getprev
-local getfont = nuts.getfont
-local getchar = nuts.getchar
-local getid = nuts.getid
-local getsubtype = nuts.getsubtype
-local getlist = nuts.getlist
-local getfield = nuts.getfield
-local setfield = nuts.setfield
-local getattr = nuts.getattr
-local getprop = nuts.getprop
-local setprop = nuts.setprop
-
-local insert_node_before = nuts.insert_before
-local insert_node_after = nuts.insert_after
-local remove_node = nuts.remove
-local end_of_math = nuts.end_of_math
-
-local nodepool = nuts.pool
-
-local nodecodes = nodes.nodecodes
-local whatcodes = nodes.whatcodes
-local mathcodes = nodes.mathcodes
-
-local glyph_code = nodecodes.glyph
-local whatsit_code = nodecodes.whatsit
-local math_code = nodecodes.math
-local penalty_code = nodecodes.penalty
-local kern_code = nodecodes.kern
-local glue_code = nodecodes.glue
-local hlist_code = nodecodes.hlist
-local vlist_code = nodecodes.vlist
-
-local localpar_code = whatcodes.localpar
-local dir_code = whatcodes.dir
-
-local new_textdir = nodepool.textdir
-
-local hasbit = number.hasbit
-local formatters = string.formatters
-local insert = table.insert
-
-local fonthashes = fonts.hashes
-local fontdata = fonthashes.identifiers
-local fontchar = fonthashes.characters
-
-local chardirections = characters.directions
-local charmirrors = characters.mirrors
-local charclasses = characters.textclasses
-
-local directions = typesetters.directions
-local setcolor = directions.setcolor
-local getglobal = directions.getglobal
-
-local a_state = attributes.private('state')
-local a_directions = attributes.private('directions')
-
-local strip = false
-
-local s_isol = fonts.analyzers.states.isol
-
-local function stopdir(finish)
- return new_textdir(finish == "TRT" and "-TRT" or "-TLT")
-end
-
-local function startdir(finish)
- return new_textdir(finish == "TRT" and "+TRT" or "+TLT")
-end
-
-local function process(start)
-
- local head = tonut(start) -- we have a global head
-
- local current = head
- local inserted = nil
- local finish = nil
- local autodir = 0
- local embedded = 0
- local override = 0
- local pardir = 0
- local textdir = 0
- local done = false
- local finished = nil
- local finidir = nil
- local stack = { }
- local top = 0
- local obsolete = { }
- local lro = false
- local lro = false
- local prevattr = false
- local fences = { }
-
- local function finish_auto_before()
- head, inserted = insert_node_before(head,current,stopdir(finish))
- finished, finidir, autodir = inserted, finish, 0
- finish, done = nil, true
- end
-
- local function finish_auto_after()
- head, current = insert_node_after(head,current,stopdir(finish))
- finished, finidir, autodir = current, finish, 0
- finish, done = nil, true
- end
-
- local function force_auto_left_before(direction)
- if finish then
- head, inserted = insert_node_before(head,current,stopdir(finish))
- finished = inserted
- finidir = finish
- end
- if embedded >= 0 then
- finish, autodir = "TLT", 1
- else
- finish, autodir = "TRT", -1
- end
- done = true
- if finidir == finish then
- head = remove_node(head,finished,true)
- else
- head, inserted = insert_node_before(head,current,startdir(finish))
- end
- end
-
- local function force_auto_right_before(direction)
- if finish then
- head, inserted = insert_node_before(head,current,stopdir(finish))
- finished = inserted
- finidir = finish
- end
- if embedded <= 0 then
- finish, autodir = "TRT", -1
- else
- finish, autodir = "TLT", 1
- end
- done = true
- if finidir == finish then
- head = remove_node(head,finished,true)
- else
- head, inserted = insert_node_before(head,current,startdir(finish))
- end
- end
-
- local function nextisright(current)
- current = getnext(current)
- local id = getid(current)
- if id == glyph_code then
- local character = getchar(current)
- local direction = chardirections[character]
- return direction == "r" or direction == "al" or direction == "an"
- end
- end
-
- local function previsright(current)
- current = getprev(current)
- local id = getid(current)
- if id == glyph_code then
- local character = getchar(current)
- local direction = chardirections[character]
- return direction == "r" or direction == "al" or direction == "an"
- end
- end
-
- while current do
- local id = getid(current)
- if id == math_code then
- current = getnext(end_of_math(getnext(current)))
- else
- local attr = getattr(current,a_directions)
- if attr and attr > 0 and attr ~= prevattr then
- if not getglobal(a) then
- lro, rlo = false, false
- end
- prevattr = attr
- end
- if id == glyph_code then
- if attr and attr > 0 then
- local character = getchar(current)
- local direction = chardirections[character]
- local reversed = false
- if rlo or override > 0 then
- if direction == "l" then
- direction = "r"
- reversed = true
- end
- elseif lro or override < 0 then
- if direction == "r" or direction == "al" then
- setprop(current,a_state,s_isol)
- direction = "l"
- reversed = true
- end
- end
- if direction == "on" then
- local mirror = charmirrors[character]
- if mirror and fontchar[getfont(current)][mirror] then
- local class = charclasses[character]
- if class == "open" then
- if nextisright(current) then
- if autodir >= 0 then
- force_auto_right_before(direction)
- end
- setfield(current,"char",mirror)
- done = true
- elseif autodir < 0 then
- setfield(current,"char",mirror)
- done = true
- else
- mirror = false
- end
- local fencedir = autodir == 0 and textdir or autodir
- fences[#fences+1] = fencedir
- elseif class == "close" and #fences > 0 then
- local fencedir = fences[#fences]
- fences[#fences] = nil
- if fencedir < 0 then
- setfield(current,"char",mirror)
- done = true
- force_auto_right_before(direction)
- else
- mirror = false
- end
- elseif autodir < 0 then
- setfield(current,"char",mirror)
- done = true
- else
- mirror = false
- end
- end
- if trace_directions then
- setcolor(current,direction,false,mirror)
- end
- elseif direction == "l" then
- if trace_directions then
- setcolor(current,"l",reversed)
- end
- if autodir <= 0 then -- could be option
- force_auto_left_before(direction)
- end
- elseif direction == "r" then
- if trace_directions then
- setcolor(current,"r",reversed)
- end
- if autodir >= 0 then
- force_auto_right_before(direction)
- end
- elseif direction == "en" then -- european number
- if trace_directions then
- setcolor(current,"l")
- end
- if autodir <= 0 then -- could be option
- force_auto_left_before(direction)
- end
- elseif direction == "al" then -- arabic number
- if trace_directions then
- setcolor(current,"r")
- end
- if autodir >= 0 then
- force_auto_right_before(direction)
- end
- elseif direction == "an" then -- arabic number
- if trace_directions then
- setcolor(current,"r")
- end
- if autodir >= 0 then
- force_auto_right_before(direction)
- end
- elseif direction == "lro" then -- Left-to-Right Override -> right becomes left
- top = top + 1
- stack[top] = { override, embedded }
- override = -1
- obsolete[#obsolete+1] = current
- elseif direction == "rlo" then -- Right-to-Left Override -> left becomes right
- top = top + 1
- stack[top] = { override, embedded }
- override = 1
- obsolete[#obsolete+1] = current
- elseif direction == "lre" then -- Left-to-Right Embedding -> TLT
- top = top + 1
- stack[top] = { override, embedded }
- embedded = 1
- obsolete[#obsolete+1] = current
- elseif direction == "rle" then -- Right-to-Left Embedding -> TRT
- top = top + 1
- stack[top] = { override, embedded }
- embedded = -1
- obsolete[#obsolete+1] = current
- elseif direction == "pdf" then -- Pop Directional Format
- if top > 0 then
- local s = stack[top]
- override, embedded = s[1], s[2]
- top = top - 1
- end
- obsolete[#obsolete+1] = current
- elseif trace_directions then
- setcolor(current)
- end
- else
- -- we do nothing
- end
- elseif id == whatsit_code then
- local subtype = getsubtype(current)
- if subtype == localpar_code then
- local dir = getfield(current,"dir")
- if dir == 'TRT' then
- autodir = -1
- elseif dir == 'TLT' then
- autodir = 1
- end
- pardir = autodir
- textdir = pardir
- elseif subtype == dir_code then
- -- todo: also treat as lro|rlo and stack
- if finish then
- finish_auto_before()
- end
- local dir = getfield(current,"dir")
- if dir == "+TRT" then
- finish, autodir = "TRT", -1
- elseif dir == "-TRT" then
- finish, autodir = nil, 0
- elseif dir == "+TLT" then
- finish, autodir = "TLT", 1
- elseif dir == "-TLT" then
- finish, autodir = nil, 0
- end
- textdir = autodir
- else
- if finish then
- finish_auto_before()
- end
- end
- elseif finish then
- finish_auto_before()
- end
- local cn = getnext(current)
- if cn then
- -- we're okay
- elseif finish then
- finish_auto_after()
- end
- current = cn
- end
- end
-
- if done and strip then
- local n = #obsolete
- if n > 0 then
- for i=1,n do
- remove_node(head,obsolete[i],true)
- end
- report_directions("%s character nodes removed",n)
- end
- end
-
- return tonode(head), done
-
-end
-
-directions.installhandler(interfaces.variables.default,process)
-
diff --git a/Master/texmf-dist/tex/context/base/util-sql-tracers.lua b/Master/texmf-dist/tex/context/base/util-sql-tracers.lua
deleted file mode 100644
index 1bd133acba2..00000000000
--- a/Master/texmf-dist/tex/context/base/util-sql-tracers.lua
+++ /dev/null
@@ -1,48 +0,0 @@
-if not modules then modules = { } end modules ['util-sql-tracers'] = {
- version = 1.001,
- comment = "companion to m-sql.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local sql = utilities.sql
-local tracers = { }
-sql.tracers = tracers
-
-sql.setmethod("swiglib")
-
-function sql.tracers.gettables(presets)
- local results, keys = sql.execute {
- presets = presets,
- template = "SHOW TABLES FROM `%database%`",
- variables = {
- database = presets.database,
- },
- }
-
- local key = keys[1]
- local tables = { }
-
- for i=1,#results do
- local name = results[i][key]
- local results, keys = sql.execute {
- presets = presets,
- template = "SHOW FIELDS FROM `%database%`.`%table%` ",
- variables = {
- database = presets.database,
- table = name
- },
- }
- if #results > 0 then
- for i=1,#results do
- results[i] = table.loweredkeys(results[i])
- end
- tables[name] = results
- else
- -- a view
- end
- end
-
- return tables
-end
diff --git a/Master/texmf-dist/tex/context/base/x-asciimath.lua b/Master/texmf-dist/tex/context/base/x-asciimath.lua
deleted file mode 100644
index 51f401e6640..00000000000
--- a/Master/texmf-dist/tex/context/base/x-asciimath.lua
+++ /dev/null
@@ -1,2101 +0,0 @@
-if not modules then modules = { } end modules ['x-asciimath'] = {
- version = 1.001,
- comment = "companion to x-asciimath.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
---[[ldx--
-<p>Some backgrounds are discussed in <t>x-asciimath.mkiv</t>. This is a third version. I first
-tried a to make a proper expression parser but it's not that easy. First we have to avoid left
-recursion, which is not that trivial (maybe a future version of lpeg will provide that), and
-second there is not really a syntax but a mix of expressions and sequences with some fuzzy logic
-applied. Most problematic are fractions and we also need to handle incomplete expressions. So,
-instead we (sort of) tokenize the string and then do some passes over the result. Yes, it's real
-ugly and unsatisfying code mess down here. Don't take this as an example.</p>
---ldx]]--
-
--- todo: spaces around all elements in cleanup?
--- todo: filter from files listed in tuc file
-
-local trace_mapping = false if trackers then trackers.register("modules.asciimath.mapping", function(v) trace_mapping = v end) end
-local trace_detail = false if trackers then trackers.register("modules.asciimath.detail", function(v) trace_detail = v end) end
-local trace_digits = false if trackers then trackers.register("modules.asciimath.digits", function(v) trace_digits = v end) end
-
-local report_asciimath = logs.reporter("mathematics","asciimath")
-
-local asciimath = { }
-local moduledata = moduledata or { }
-moduledata.asciimath = asciimath
-
-if not characters then
- require("char-def")
- require("char-ini")
- require("char-ent")
-end
-
-local type, rawget = type, rawget
-local concat, insert, remove = table.concat, table.insert, table.remove
-local rep, gmatch, gsub, find = string.rep, string.gmatch, string.gsub, string.find
-local utfchar, utfbyte = utf.char, utf.byte
-
-local lpegmatch, patterns = lpeg.match, lpeg.patterns
-local S, P, R, C, V, Cc, Ct, Cs, Carg = lpeg.S, lpeg.P, lpeg.R, lpeg.C, lpeg.V, lpeg.Cc, lpeg.Ct, lpeg.Cs, lpeg.Carg
-
-local sortedhash = table.sortedhash
-local sortedkeys = table.sortedkeys
-local formatters = string.formatters
-
-local entities = characters.entities or { }
-
-local xmltext = xml.text
-local xmlinclusion = xml.inclusion
-local xmlcollected = xml.collected
-
--- todo: use private unicodes as temporary slots ... easier to compare
-
-local s_lparent = "\\left\\lparent"
-local s_lbrace = "\\left\\lbrace"
-local s_lbracket = "\\left\\lbracket"
-local s_langle = "\\left\\langle"
-local s_lfloor = "\\left\\lfloor"
-local s_lceil = "\\left\\lceil"
-local s_left = "\\left."
-
-local s_rparent = "\\right\\rparent"
-local s_rbrace = "\\right\\rbrace"
-local s_rbracket = "\\right\\rbracket"
-local s_rangle = "\\right\\rangle"
-local s_rfloor = "\\right\\rfloor"
-local s_rceil = "\\right\\rceil"
-local s_right = "\\right."
-
-local s_mslash = "\\middle/"
-
-local s_lbar = "\\left\\|"
-local s_mbar = "\\middle\\|"
-local s_rbar = "\\right\\|"
-
-local s_lnothing = "\\left ." -- space fools checker
-local s_rnothing = "\\right ." -- space fools checker
-
-local reserved = {
-
- ["prod"] = { false, "\\prod" },
- ["sinh"] = { false, "\\sinh" },
- ["cosh"] = { false, "\\cosh" },
- ["tanh"] = { false, "\\tanh" },
- ["sum"] = { false, "\\sum" },
- ["int"] = { false, "\\int" },
- ["sin"] = { false, "\\sin" },
- ["cos"] = { false, "\\cos" },
- ["tan"] = { false, "\\tan" },
- ["csc"] = { false, "\\csc" },
- ["sec"] = { false, "\\sec" },
- ["cot"] = { false, "\\cot" },
- ["log"] = { false, "\\log" },
- ["det"] = { false, "\\det" },
- ["lim"] = { false, "\\lim" },
- ["mod"] = { false, "\\mod" },
- ["gcd"] = { false, "\\gcd" },
- ["min"] = { false, "\\min" },
- ["max"] = { false, "\\max" },
- ["ln"] = { false, "\\ln" },
-
- ["atan"] = { false, "\\atan" }, -- extra
- ["acos"] = { false, "\\acos" }, -- extra
- ["asin"] = { false, "\\asin" }, -- extra
- -- extra
- ["arctan"] = { false, "\\arctan" }, -- extra
- ["arccos"] = { false, "\\arccos" }, -- extra
- ["arcsin"] = { false, "\\arcsin" }, -- extra
-
- ["and"] = { false, "\\text{and}" },
- ["or"] = { false, "\\text{or}" },
- ["if"] = { false, "\\text{if}" },
-
- ["sqrt"] = { false, "\\asciimathsqrt", "unary" },
- ["root"] = { false, "\\asciimathroot", "binary" },
- ["frac"] = { false, "\\frac", "binary" },
- ["stackrel"] = { false, "\\asciimathstackrel", "binary" },
- ["hat"] = { false, "\\widehat", "unary" },
- ["bar"] = { false, "\\overbar", "unary" },
- ["overbar"] = { false, "\\overbar", "unary" },
- ["underline"] = { false, "\\underline", "unary" },
- ["ul"] = { false, "\\underline", "unary" },
- ["vec"] = { false, "\\overrightarrow", "unary" },
- ["dot"] = { false, "\\dot", "unary" }, -- 0x2D9
- ["ddot"] = { false, "\\ddot", "unary" }, -- 0xA8
-
- -- binary operators
-
- ["+"] = { true, "+" },
- ["-"] = { true, "-" },
- ["*"] = { true, "â‹…" },
- ["**"] = { true, "⋆" },
- ["//"] = { true, "â„" }, -- \slash
- ["\\"] = { true, "\\" },
- ["xx"] = { true, "×" },
- ["times"] = { true, "×" },
- ["-:"] = { true, "÷" },
- ["@"] = { true, "∘" },
- ["circ"] = { true, "∘" },
- ["o+"] = { true, "⊕" },
- ["ox"] = { true, "⊗" },
- ["o."] = { true, "⊙" },
- ["^^"] = { true, "∧" },
- ["vv"] = { true, "∨" },
- ["nn"] = { true, "∩" },
- ["uu"] = { true, "∪" },
-
- -- big operators
-
- ["^^^"] = { true, "â‹€" },
- ["vvv"] = { true, "â‹" },
- ["nnn"] = { true, "â‹‚" },
- ["uuu"] = { true, "⋃" },
- ["int"] = { true, "∫" },
- ["oint"] = { true, "∮" },
-
- -- brackets
-
- ["("] = { true, "(" },
- [")"] = { true, ")" },
- ["["] = { true, "[" },
- ["]"] = { true, "]" },
- ["{"] = { true, "{" },
- ["}"] = { true, "}" },
-
- -- binary relations
-
- ["="] = { true, "=" },
- ["eq"] = { true, "=" },
- ["!="] = { true, "≠" },
- ["ne"] = { true, "≠" },
- ["neq"] = { true, "≠" },
- ["<"] = { true, "<" },
- ["lt"] = { true, "<" },
- [">"] = { true, ">" },
- ["gt"] = { true, ">" },
- ["<="] = { true, "≤" },
- ["le"] = { true, "≤" },
- ["leq"] = { true, "≤" },
- [">="] = { true, "≥" },
- ["ge"] = { true, "≥" },
- ["geq"] = { true, "≥" },
- ["-<"] = { true, "≺" },
- [">-"] = { true, "≻" },
- ["in"] = { true, "∈" },
- ["!in"] = { true, "∉" },
- ["sub"] = { true, "⊂" },
- ["sup"] = { true, "⊃" },
- ["sube"] = { true, "⊆" },
- ["supe"] = { true, "⊇" },
- ["-="] = { true, "≡" },
- ["~="] = { true, "≅" },
- ["~~"] = { true, "≈" },
- ["prop"] = { true, "âˆ" },
-
- -- arrows
-
- ["rarr"] = { true, "→" },
- ["->"] = { true, "→" },
- ["larr"] = { true, "â†" },
- ["harr"] = { true, "↔" },
- ["uarr"] = { true, "↑" },
- ["darr"] = { true, "↓" },
- ["rArr"] = { true, "⇒" },
- ["lArr"] = { true, "â‡" },
- ["hArr"] = { true, "⇔" },
- ["|->"] = { true, "↦" },
-
- -- logical
-
- ["not"] = { true, "¬" },
- ["=>"] = { true, "⇒" },
- ["iff"] = { true, "⇔" },
- ["AA"] = { true, "∀" },
- ["EE"] = { true, "∃" },
- ["_|_"] = { true, "⊥" },
- ["TT"] = { true, "⊤" },
- ["|--"] = { true, "⊢" },
- ["|=="] = { true, "⊨" },
-
- -- miscellaneous
-
- ["del"] = { true, "∂" },
- ["grad"] = { true, "∇" },
- ["+-"] = { true, "±" },
- ["O/"] = { true, "∅" },
- ["oo"] = { true, "∞" },
- ["aleph"] = { true, "ℵ" },
- ["angle"] = { true, "∠" },
- ["/_"] = { true, "∠" },
- [":."] = { true, "∴" },
- ["..."] = { true, "..." }, -- ldots
- ["ldots"] = { true, "..." }, -- ldots
- ["cdots"] = { true, "⋯" },
- ["vdots"] = { true, "â‹®" },
- ["ddots"] = { true, "⋱" },
- ["diamond"] = { true, "â‹„" },
- ["square"] = { true, "â–¡" },
- ["|__"] = { true, "⌊" },
- ["__|"] = { true, "⌋" },
- ["|~"] = { true, "⌈" },
- ["~|"] = { true, "⌉" },
-
- -- more
-
- ["_="] = { true, "≡" },
-
- -- bonus
-
- ["prime"] = { true, "′" }, -- bonus
- ["'"] = { true, "′" }, -- bonus
- ["''"] = { true, "″" }, -- bonus
- ["'''"] = { true, "‴" }, -- bonus
-
- -- special
-
- ["%"] = { false, "\\mathpercent" },
- ["&"] = { false, "\\mathampersand" },
- ["#"] = { false, "\\mathhash" },
- ["$"] = { false, "\\mathdollar" },
-
- -- blackboard
-
- ["CC"] = { true, "â„‚" },
- ["NN"] = { true, "â„•" },
- ["QQ"] = { true, "â„š" },
- ["RR"] = { true, "â„" },
- ["ZZ"] = { true, "ℤ" },
-
- -- greek lowercase
-
- ["alpha"] = { true, "α" },
- ["beta"] = { true, "β" },
- ["gamma"] = { true, "γ" },
- ["delta"] = { true, "δ" },
- ["epsilon"] = { true, "ε" },
- ["varepsilon"] = { true, "É›" },
- ["zeta"] = { true, "ζ" },
- ["eta"] = { true, "η" },
- ["theta"] = { true, "θ" },
- ["vartheta"] = { true, "Ï‘" },
- ["iota"] = { true, "ι" },
- ["kappa"] = { true, "κ" },
- ["lambda"] = { true, "λ" },
- ["mu"] = { true, "μ" },
- ["nu"] = { true, "ν" },
- ["xi"] = { true, "ξ" },
- ["pi"] = { true, "Ï€" },
- ["rho"] = { true, "Ï" },
- ["sigma"] = { true, "σ" },
- ["tau"] = { true, "Ï„" },
- ["upsilon"] = { true, "Ï…" },
- ["phi"] = { true, "φ" },
- ["varphi"] = { true, "Ï•" },
- ["chi"] = { true, "χ" },
- ["psi"] = { true, "ψ" },
- ["omega"] = { true, "ω" },
-
- -- greek uppercase
-
- ["Gamma"] = { true, "Γ" },
- ["Delta"] = { true, "Δ" },
- ["Theta"] = { true, "Θ" },
- ["Lambda"] = { true, "Λ" },
- ["Xi"] = { true, "Ξ" },
- ["Pi"] = { true, "Π" },
- ["Sigma"] = { true, "Σ" },
- ["Phi"] = { true, "Φ" },
- ["Psi"] = { true, "Ψ" },
- ["Omega"] = { true, "Ω" },
-
- -- blackboard
-
- ["bbb a"] = { true, "ð•’" },
- ["bbb b"] = { true, "ð•“" },
- ["bbb c"] = { true, "ð•”" },
- ["bbb d"] = { true, "ð••" },
- ["bbb e"] = { true, "ð•–" },
- ["bbb f"] = { true, "ð•—" },
- ["bbb g"] = { true, "ð•˜" },
- ["bbb h"] = { true, "ð•™" },
- ["bbb i"] = { true, "ð•š" },
- ["bbb j"] = { true, "ð•›" },
- ["bbb k"] = { true, "ð•œ" },
- ["bbb l"] = { true, "ð•" },
- ["bbb m"] = { true, "ð•ž" },
- ["bbb n"] = { true, "ð•Ÿ" },
- ["bbb o"] = { true, "ð• " },
- ["bbb p"] = { true, "ð•¡" },
- ["bbb q"] = { true, "ð•¢" },
- ["bbb r"] = { true, "ð•£" },
- ["bbb s"] = { true, "ð•¤" },
- ["bbb t"] = { true, "ð•¥" },
- ["bbb u"] = { true, "ð•¦" },
- ["bbb v"] = { true, "ð•§" },
- ["bbb w"] = { true, "ð•¨" },
- ["bbb x"] = { true, "ð•©" },
- ["bbb y"] = { true, "ð•ª" },
- ["bbb z"] = { true, "ð•«" },
-
- ["bbb A"] = { true, "ð”¸" },
- ["bbb B"] = { true, "ð”¹" },
- ["bbb C"] = { true, "â„‚" },
- ["bbb D"] = { true, "ð”»" },
- ["bbb E"] = { true, "ð”¼" },
- ["bbb F"] = { true, "ð”½" },
- ["bbb G"] = { true, "ð”¾" },
- ["bbb H"] = { true, "â„" },
- ["bbb I"] = { true, "ð•€" },
- ["bbb J"] = { true, "ð•" },
- ["bbb K"] = { true, "ð•‚" },
- ["bbb L"] = { true, "ð•ƒ" },
- ["bbb M"] = { true, "ð•„" },
- ["bbb N"] = { true, "â„•" },
- ["bbb O"] = { true, "ð•†" },
- ["bbb P"] = { true, "â„™" },
- ["bbb Q"] = { true, "â„š" },
- ["bbb R"] = { true, "â„" },
- ["bbb S"] = { true, "ð•Š" },
- ["bbb T"] = { true, "ð•‹" },
- ["bbb U"] = { true, "ð•Œ" },
- ["bbb V"] = { true, "ð•" },
- ["bbb W"] = { true, "ð•Ž" },
- ["bbb X"] = { true, "ð•" },
- ["bbb Y"] = { true, "ð•" },
- ["bbb Z"] = { true, "ℤ" },
-
- -- fraktur
-
- ["fr a"] = { true, "ð”ž" },
- ["fr b"] = { true, "ð”Ÿ" },
- ["fr c"] = { true, "ð” " },
- ["fr d"] = { true, "ð”¡" },
- ["fr e"] = { true, "ð”¢" },
- ["fr f"] = { true, "ð”£" },
- ["fr g"] = { true, "ð”¤" },
- ["fr h"] = { true, "ð”¥" },
- ["fr i"] = { true, "ð”¦" },
- ["fr j"] = { true, "ð”§" },
- ["fr k"] = { true, "ð”¨" },
- ["fr l"] = { true, "ð”©" },
- ["fr m"] = { true, "ð”ª" },
- ["fr n"] = { true, "ð”«" },
- ["fr o"] = { true, "ð”¬" },
- ["fr p"] = { true, "ð”­" },
- ["fr q"] = { true, "ð”®" },
- ["fr r"] = { true, "ð”¯" },
- ["fr s"] = { true, "ð”°" },
- ["fr t"] = { true, "ð”±" },
- ["fr u"] = { true, "ð”²" },
- ["fr v"] = { true, "ð”³" },
- ["fr w"] = { true, "ð”´" },
- ["fr x"] = { true, "ð”µ" },
- ["fr y"] = { true, "ð”¶" },
- ["fr z"] = { true, "ð”·" },
-
- ["fr A"] = { true, "ð”„" },
- ["fr B"] = { true, "ð”…" },
- ["fr C"] = { true, "â„­" },
- ["fr D"] = { true, "ð”‡" },
- ["fr E"] = { true, "ð”ˆ" },
- ["fr F"] = { true, "ð”‰" },
- ["fr G"] = { true, "ð”Š" },
- ["fr H"] = { true, "ℌ" },
- ["fr I"] = { true, "â„‘" },
- ["fr J"] = { true, "ð”" },
- ["fr K"] = { true, "ð”Ž" },
- ["fr L"] = { true, "ð”" },
- ["fr M"] = { true, "ð”" },
- ["fr N"] = { true, "ð”‘" },
- ["fr O"] = { true, "ð”’" },
- ["fr P"] = { true, "ð”“" },
- ["fr Q"] = { true, "ð””" },
- ["fr R"] = { true, "ℜ" },
- ["fr S"] = { true, "ð”–" },
- ["fr T"] = { true, "ð”—" },
- ["fr U"] = { true, "ð”˜" },
- ["fr V"] = { true, "ð”™" },
- ["fr W"] = { true, "ð”š" },
- ["fr X"] = { true, "ð”›" },
- ["fr Y"] = { true, "ð”œ" },
- ["fr Z"] = { true, "ℨ" },
-
- -- script
-
- ["cc a"] = { true, "ð’¶" },
- ["cc b"] = { true, "ð’·" },
- ["cc c"] = { true, "ð’¸" },
- ["cc d"] = { true, "ð’¹" },
- ["cc e"] = { true, "ℯ" },
- ["cc f"] = { true, "ð’»" },
- ["cc g"] = { true, "â„Š" },
- ["cc h"] = { true, "ð’½" },
- ["cc i"] = { true, "ð’¾" },
- ["cc j"] = { true, "ð’¿" },
- ["cc k"] = { true, "ð“€" },
- ["cc l"] = { true, "ð“" },
- ["cc m"] = { true, "ð“‚" },
- ["cc n"] = { true, "ð“ƒ" },
- ["cc o"] = { true, "â„´" },
- ["cc p"] = { true, "ð“…" },
- ["cc q"] = { true, "ð“†" },
- ["cc r"] = { true, "ð“‡" },
- ["cc s"] = { true, "ð“ˆ" },
- ["cc t"] = { true, "ð“‰" },
- ["cc u"] = { true, "ð“Š" },
- ["cc v"] = { true, "ð“‹" },
- ["cc w"] = { true, "ð“Œ" },
- ["cc x"] = { true, "ð“" },
- ["cc y"] = { true, "ð“Ž" },
- ["cc z"] = { true, "ð“" },
-
- ["cc A"] = { true, "ð’œ" },
- ["cc B"] = { true, "ℬ" },
- ["cc C"] = { true, "ð’ž" },
- ["cc D"] = { true, "ð’Ÿ" },
- ["cc E"] = { true, "â„°" },
- ["cc F"] = { true, "ℱ" },
- ["cc G"] = { true, "ð’¢" },
- ["cc H"] = { true, "â„‹" },
- ["cc I"] = { true, "â„" },
- ["cc J"] = { true, "ð’¥" },
- ["cc K"] = { true, "ð’¦" },
- ["cc L"] = { true, "â„’" },
- ["cc M"] = { true, "ℳ" },
- ["cc N"] = { true, "ð’©" },
- ["cc O"] = { true, "ð’ª" },
- ["cc P"] = { true, "ð’«" },
- ["cc Q"] = { true, "ð’¬" },
- ["cc R"] = { true, "â„›" },
- ["cc S"] = { true, "ð’®" },
- ["cc T"] = { true, "ð’¯" },
- ["cc U"] = { true, "ð’°" },
- ["cc V"] = { true, "ð’±" },
- ["cc W"] = { true, "ð’²" },
- ["cc X"] = { true, "ð’³" },
- ["cc Y"] = { true, "ð’´" },
- ["cc Z"] = { true, "ð’µ" },
-
- -- bold
-
- ["bb a"] = { true, "ð’‚" },
- ["bb b"] = { true, "ð’ƒ" },
- ["bb c"] = { true, "ð’„" },
- ["bb d"] = { true, "ð’…" },
- ["bb e"] = { true, "ð’†" },
- ["bb f"] = { true, "ð’‡" },
- ["bb g"] = { true, "ð’ˆ" },
- ["bb h"] = { true, "ð’‰" },
- ["bb i"] = { true, "ð’Š" },
- ["bb j"] = { true, "ð’‹" },
- ["bb k"] = { true, "ð’Œ" },
- ["bb l"] = { true, "ð’" },
- ["bb m"] = { true, "ð’Ž" },
- ["bb n"] = { true, "ð’" },
- ["bb o"] = { true, "ð’" },
- ["bb p"] = { true, "ð’‘" },
- ["bb q"] = { true, "ð’’" },
- ["bb r"] = { true, "ð’“" },
- ["bb s"] = { true, "ð’”" },
- ["bb t"] = { true, "ð’•" },
- ["bb u"] = { true, "ð’–" },
- ["bb v"] = { true, "ð’—" },
- ["bb w"] = { true, "ð’˜" },
- ["bb x"] = { true, "ð’™" },
- ["bb y"] = { true, "ð’š" },
- ["bb z"] = { true, "ð’›" },
-
- ["bb A"] = { true, "ð‘¨" },
- ["bb B"] = { true, "ð‘©" },
- ["bb C"] = { true, "ð‘ª" },
- ["bb D"] = { true, "ð‘«" },
- ["bb E"] = { true, "ð‘¬" },
- ["bb F"] = { true, "ð‘­" },
- ["bb G"] = { true, "ð‘®" },
- ["bb H"] = { true, "ð‘¯" },
- ["bb I"] = { true, "ð‘°" },
- ["bb J"] = { true, "ð‘±" },
- ["bb K"] = { true, "ð‘²" },
- ["bb L"] = { true, "ð‘³" },
- ["bb M"] = { true, "ð‘´" },
- ["bb N"] = { true, "ð‘µ" },
- ["bb O"] = { true, "ð‘¶" },
- ["bb P"] = { true, "ð‘·" },
- ["bb Q"] = { true, "ð‘¸" },
- ["bb R"] = { true, "ð‘¹" },
- ["bb S"] = { true, "ð‘º" },
- ["bb T"] = { true, "ð‘»" },
- ["bb U"] = { true, "ð‘¼" },
- ["bb V"] = { true, "ð‘½" },
- ["bb W"] = { true, "ð‘¾" },
- ["bb X"] = { true, "ð‘¿" },
- ["bb Y"] = { true, "ð’€" },
- ["bb Z"] = { true, "ð’" },
-
- -- sans
-
- ["sf a"] = { true, "ð–º" },
- ["sf b"] = { true, "ð–»" },
- ["sf c"] = { true, "ð–¼" },
- ["sf d"] = { true, "ð–½" },
- ["sf e"] = { true, "ð–¾" },
- ["sf f"] = { true, "ð–¿" },
- ["sf g"] = { true, "ð—€" },
- ["sf h"] = { true, "ð—" },
- ["sf i"] = { true, "ð—‚" },
- ["sf j"] = { true, "ð—ƒ" },
- ["sf k"] = { true, "ð—„" },
- ["sf l"] = { true, "ð—…" },
- ["sf m"] = { true, "ð—†" },
- ["sf n"] = { true, "ð—‡" },
- ["sf o"] = { true, "ð—ˆ" },
- ["sf p"] = { true, "ð—‰" },
- ["sf q"] = { true, "ð—Š" },
- ["sf r"] = { true, "ð—‹" },
- ["sf s"] = { true, "ð—Œ" },
- ["sf t"] = { true, "ð—" },
- ["sf u"] = { true, "ð—Ž" },
- ["sf v"] = { true, "ð—" },
- ["sf w"] = { true, "ð—" },
- ["sf x"] = { true, "ð—‘" },
- ["sf y"] = { true, "ð—’" },
- ["sf z"] = { true, "ð—“" },
-
- ["sf A"] = { true, "ð– " },
- ["sf B"] = { true, "ð–¡" },
- ["sf C"] = { true, "ð–¢" },
- ["sf D"] = { true, "ð–£" },
- ["sf E"] = { true, "ð–¤" },
- ["sf F"] = { true, "ð–¥" },
- ["sf G"] = { true, "ð–¦" },
- ["sf H"] = { true, "ð–§" },
- ["sf I"] = { true, "ð–¨" },
- ["sf J"] = { true, "ð–©" },
- ["sf K"] = { true, "ð–ª" },
- ["sf L"] = { true, "ð–«" },
- ["sf M"] = { true, "ð–¬" },
- ["sf N"] = { true, "ð–­" },
- ["sf O"] = { true, "ð–®" },
- ["sf P"] = { true, "ð–¯" },
- ["sf Q"] = { true, "ð–°" },
- ["sf R"] = { true, "ð–±" },
- ["sf S"] = { true, "ð–²" },
- ["sf T"] = { true, "ð–³" },
- ["sf U"] = { true, "ð–´" },
- ["sf V"] = { true, "ð–µ" },
- ["sf W"] = { true, "ð–¶" },
- ["sf X"] = { true, "ð–·" },
- ["sf Y"] = { true, "ð–¸" },
- ["sf Z"] = { true, "ð–¹" },
-
- -- monospace
-
- ["tt a"] = { true, "ðšŠ" },
- ["tt b"] = { true, "ðš‹" },
- ["tt c"] = { true, "ðšŒ" },
- ["tt d"] = { true, "ðš" },
- ["tt e"] = { true, "ðšŽ" },
- ["tt f"] = { true, "ðš" },
- ["tt g"] = { true, "ðš" },
- ["tt h"] = { true, "ðš‘" },
- ["tt i"] = { true, "ðš’" },
- ["tt j"] = { true, "ðš“" },
- ["tt k"] = { true, "ðš”" },
- ["tt l"] = { true, "ðš•" },
- ["tt m"] = { true, "ðš–" },
- ["tt n"] = { true, "ðš—" },
- ["tt o"] = { true, "ðš˜" },
- ["tt p"] = { true, "ðš™" },
- ["tt q"] = { true, "ðšš" },
- ["tt r"] = { true, "ðš›" },
- ["tt s"] = { true, "ðšœ" },
- ["tt t"] = { true, "ðš" },
- ["tt u"] = { true, "ðšž" },
- ["tt v"] = { true, "ðšŸ" },
- ["tt w"] = { true, "ðš " },
- ["tt x"] = { true, "ðš¡" },
- ["tt y"] = { true, "ðš¢" },
- ["tt z"] = { true, "ðš£" },
-
- ["tt A"] = { true, "ð™°" },
- ["tt B"] = { true, "ð™±" },
- ["tt C"] = { true, "ð™²" },
- ["tt D"] = { true, "ð™³" },
- ["tt E"] = { true, "ð™´" },
- ["tt F"] = { true, "ð™µ" },
- ["tt G"] = { true, "ð™¶" },
- ["tt H"] = { true, "ð™·" },
- ["tt I"] = { true, "ð™¸" },
- ["tt J"] = { true, "ð™¹" },
- ["tt K"] = { true, "ð™º" },
- ["tt L"] = { true, "ð™»" },
- ["tt M"] = { true, "ð™¼" },
- ["tt N"] = { true, "ð™½" },
- ["tt O"] = { true, "ð™¾" },
- ["tt P"] = { true, "ð™¿" },
- ["tt Q"] = { true, "ðš€" },
- ["tt R"] = { true, "ðš" },
- ["tt S"] = { true, "ðš‚" },
- ["tt T"] = { true, "ðšƒ" },
- ["tt U"] = { true, "ðš„" },
- ["tt V"] = { true, "ðš…" },
- ["tt W"] = { true, "ðš†" },
- ["tt X"] = { true, "ðš‡" },
- ["tt Y"] = { true, "ðšˆ" },
- ["tt Z"] = { true, "ðš‰" },
-
- -- some more undocumented
-
- ["dx"] = { false, { "d", "x" } }, -- "{dx}" "\\left(dx\\right)"
- ["dy"] = { false, { "d", "y" } }, -- "{dy}" "\\left(dy\\right)"
- ["dz"] = { false, { "d", "z" } }, -- "{dz}" "\\left(dz\\right)"
-
- -- fences
-
- ["(:"] = { true, "(:" },
- ["{:"] = { true, "{:" },
- ["[:"] = { true, "[:" },
- ["("] = { true, "(" },
- ["["] = { true, "[" },
- ["{"] = { true, "{" },
- ["<<"] = { true, "⟨" }, -- why not <:
- ["|_"] = { true, "⌊" },
- ["|~"] = { true, "⌈" },
- ["⟨"] = { true, "⟨" },
- ["〈"] = { true, "⟨" },
- ["〈"] = { true, "⟨" },
-
- [":)"] = { true, ":)" },
- [":}"] = { true, ":}" },
- [":]"] = { true, ":]" },
- [")"] = { true, ")" },
- ["]"] = { true, "]" },
- ["}"] = { true, "}" },
- [">>"] = { true, "⟩" }, -- why not :>
- ["~|"] = { true, "⌉" },
- ["_|"] = { true, "⌋" },
- ["⟩"] = { true, "⟩" },
- ["〉"] = { true, "⟩" },
- ["〉"] = { true, "⟩" },
-
- ["lparent"] = { true, "(" },
- ["lbracket"] = { true, "[" },
- ["lbrace"] = { true, "{" },
- ["langle"] = { true, "⟨" },
- ["lfloor"] = { true, "⌊" },
- ["lceil"] = { true, "⌈" },
-
- ["rparent"] = { true, ")" },
- ["rbracket"] = { true, "]" },
- ["rbrace"] = { true, "}" },
- ["rangle"] = { true, "⟩" },
- ["rfloor"] = { true, "⌋" },
- ["rceil"] = { true, "⌉" },
-
- -- a bit special:
-
- ["\\frac"] = { true, "frac" },
-
- -- now it gets real crazy, only these two:
-
- ["&gt;"] = { true, ">" },
- ["&lt;"] = { true, "<" },
-
-}
-
-for k, v in next, characters.data do
- local name = v.mathname
- if name and not reserved[name] then
- reserved[name] = { true, utfchar(k) }
- end
- local spec = v.mathspec
- -- if spec then
- -- for i=1,#spec do
- -- local name = spec[i].name
- -- if name and not reserved[name] then
- -- reserved[name] = { true, utfchar(k) }
- -- end
- -- end
- -- end
-end
-
-reserved.P = nil
-reserved.S = nil
-
-local isbinary = {
- ["\\frac"] = true,
- ["\\root"] = true,
- ["\\asciimathroot"] = true,
- ["\\asciimathstackrel"] = true,
-}
-
-local isunary = {
- ["\\sqrt"] = true,
- ["\\asciimathsqrt"] = true,
- ["\\text"] = true, -- mathoptext
- ["\\mathoptext"] = true, -- mathoptext
- ["\\asciimathoptext"] = true, -- mathoptext
- ["\\hat"] = true, -- widehat
- ["\\widehat"] = true, -- widehat
- ["\\bar"] = true, --
- ["\\overbar"] = true, --
- ["\\underline"] = true, --
- ["\\vec"] = true, -- overrightarrow
- ["\\overrightarrow"] = true, -- overrightarrow
- ["\\dot"] = true, --
- ["\\ddot"] = true, --
-
-}
-
-local isfunny = {
- ["\\sin"] = true,
-}
-
-local isinfix = {
- ["^"] = true,
- ["_"] = true,
-}
-
-local isleft = {
- [s_lparent] = true,
- [s_lbrace] = true,
- [s_lbracket] = true,
- [s_langle] = true,
- [s_lfloor] = true,
- [s_lceil] = true,
- [s_left] = true,
-}
-
-local isright = {
- [s_rparent] = true,
- [s_rbrace] = true,
- [s_rbracket] = true,
- [s_rangle] = true,
- [s_rfloor] = true,
- [s_rceil] = true,
- [s_right] = true,
-}
-
-local issimplified = {
-}
-
---
-
--- special mess
-
-local d_one = R("09")
-local d_two = d_one * d_one
-local d_three = d_two * d_one
-local d_four = d_three * d_one
-local d_split = P(-1) + P(",")
-
-local d_spaced = (Carg(1) * d_three)^1
-
-local digitized_1 = Cs ( (
- d_three * d_spaced * d_split +
- d_two * d_spaced * d_split +
- d_one * d_spaced * d_split +
- P(1)
- )^1 )
-
-local p_fourbefore = d_four * d_split
-local p_fourafter = d_four * P(-1)
-
-local p_beforecomma = d_three * d_spaced * d_split
- + d_two * d_spaced * d_split
- + d_one * d_spaced * d_split
- + d_one * d_split
-
-local p_aftercomma = p_fourafter
- + d_three * d_spaced
- + d_two * d_spaced
- + d_one * d_spaced
-
-local digitized_2 = Cs (
- p_fourbefore * (p_aftercomma^0) +
- p_beforecomma * ((p_aftercomma + d_one^1)^0)
- )
-
-local p_fourbefore = d_four * d_split
-local p_fourafter = d_four
-local d_spaced = (Carg(1) * (d_three + d_two + d_one))^1
-local p_aftercomma = p_fourafter * P(-1)
- + d_three * d_spaced * P(1)^0
- + d_one^1
-
--- local digitized_3 = Cs (
--- p_fourbefore * p_aftercomma^0 +
--- p_beforecomma * p_aftercomma^0
--- )
-
-local digitized_3 = Cs((p_fourbefore + p_beforecomma) * p_aftercomma^0)
-
-local splitmethods = {
- digitized_1,
- digitized_2,
- digitized_3,
-}
-
-local splitmethod = nil
-
-function asciimath.setup(settings)
- splitmethod = splitmethods[tonumber(settings.splitmethod) or 0]
- if splitmethod then
- local separator = settings.separator
- if separator == true or not interfaces or interfaces.variables.yes then
- digitseparator = utfchar(0x2008)
- elseif type(separator) == "string" and separator ~= "" then
- digitseparator = separator
- else
- splitmethod = nil
- end
- end
-end
-
-local collected_digits = { }
-local collected_filename = "asciimath-digits.lua"
-
-function numbermess(s)
- if splitmethod then
- local d = lpegmatch(splitmethod,s,1,digitseparator)
- if d then
- if trace_digits and s ~= d then
- collected_digits[s] = d
- end
- return d
- end
- end
- return s
-end
-
--- asciimath.setup { splitmethod = 3 }
--- local t = {
--- "1", "12", "123", "1234", "12345", "123456", "1234567", "12345678", "123456789",
--- "1,1",
--- "12,12",
--- "123,123",
--- "1234,123",
--- "1234,1234",
--- "12345,1234",
--- "1234,12345",
--- "12345,12345",
--- "123456,123456",
--- "1234567,1234567",
--- "12345678,12345678",
--- "123456789,123456789",
--- "0,1234",
--- "1234,0",
--- "1234,00",
--- "0,123456789",
--- }
--- for i=1,#t do print(formatters["%-20s : [%s]"](t[i],numbermess(t[i]))) end
-
-statistics.register("asciimath",function()
- if trace_digits then
- local n = table.count(collected_digits)
- if n > 0 then
- table.save(collected_filename,collected_digits)
- return string.format("%s digit conversions saved in %s",n,collected_filename)
- else
- os.remove(collected_filename)
- end
- end
-end)
-
-local p_number_base = patterns.cpnumber or patterns.cnumber or patterns.number
-local p_number = C(p_number_base)
------ p_number = p_number_base
-local p_spaces = patterns.whitespace
-
-local p_utf_base = patterns.utf8character
-local p_utf = C(p_utf_base)
--- local p_entity = (P("&") * C((1-P(";"))^2) * P(";"))/ entities
-
--- entities["gt"] = ">"
--- entities["lt"] = "<"
--- entities["amp"] = "&"
--- entities["dquot"] = '"'
--- entities["quot"] = "'"
-
-local p_onechar = p_utf_base * P(-1)
-
------ p_number = Cs((patterns.cpnumber or patterns.cnumber or patterns.number)/function(s) return (gsub(s,",","{,}")) end)
-
-local sign = P("-")^-1
-local digits = R("09")^1
-local integer = sign * digits
-local real = digits * (S(".") * digits)^-1
-local float = real * (P("E") * integer)^-1
-
--- local number = C(float + integer)
--- local p_number = C(float)
-local p_number = float / numbermess
-
-local k_reserved = sortedkeys(reserved)
-local k_commands = { }
-local k_unicode = { }
-
-asciimath.keys = {
- reserved = k_reserved
-}
-
-local k_reserved_different = { }
-local k_reserved_words = { }
-
-for k, v in sortedhash(reserved) do
- local replacement = v[2]
- if v[1] then
- k_unicode[k] = replacement
- else
- k_unicode[k] = k -- keep them ... later we remap these
- if k ~= replacement then
- k_reserved_different[#k_reserved_different+1] = k
- end
- end
- if not find(k,"[^[a-zA-Z]+$]") then
- k_unicode["\\"..k] = k -- dirty trick, no real unicode
- end
- if not find(k,"[^a-zA-Z]") then
- k_reserved_words[#k_reserved_words+1] = k
- end
- k_commands[k] = replacement
-end
-
-local p_reserved =
- lpeg.utfchartabletopattern(k_reserved_different) / k_commands
-
-local p_unicode =
- lpeg.utfchartabletopattern(table.keys(k_unicode)) / k_unicode
-
--- inspect(k_reserved_different)
-
-local p_texescape = patterns.texescape
-
-local function texescaped(s)
- return lpegmatch(p_texescape,s)
-end
-
-local p_text =
- P("text")
- * p_spaces^0
- * Cc("\\asciimathoptext")
- * ( -- maybe balanced
- Cs( P("{") * ((1-P("}"))^0/texescaped) * P("}") )
- + Cs((P("(")/"{") * ((1-P(")"))^0/texescaped) * (P(")")/"}"))
- )
- + Cc("\\asciimathoptext") * Cs(Cc("{") * (patterns.undouble/texescaped) * Cc("}"))
-
-local m_left = {
- ["(:"] = s_langle,
- ["{:"] = s_left,
- ["[:"] = s_left,
- ["("] = s_lparent,
- ["["] = s_lbracket,
- ["{"] = s_lbrace,
- ["⟨"] = s_langle,
- ["⌈"] = s_lceil,
- ["⌊"] = s_lfloor,
-
- -- ["<<"] = s_langle, -- why not <:
- -- ["|_"] = s_lfloor,
- -- ["|~"] = s_lceil,
- -- ["〈"] = s_langle,
- -- ["〈"] = s_langle,
-
- -- ["lparent"] = s_lparent,
- -- ["lbracket"] = s_lbracket,
- -- ["lbrace"] = s_lbrace,
- -- ["langle"] = s_langle,
- -- ["lfloor"] = s_lfloor,
- -- ["lceil"] = s_lceil,
-}
-
-local m_right = {
- [":)"] = s_rangle,
- [":}"] = s_right,
- [":]"] = s_right,
- [")"] = s_rparent,
- ["]"] = s_rbracket,
- ["}"] = s_rbrace,
- ["⟩"] = s_rangle,
- ["⌉"] = s_rceil,
- ["⌋"] = s_rfloor,
-
- -- [">>"] = s_rangle, -- why not :>
- -- ["~|"] = s_rceil,
- -- ["_|"] = s_rfloor,
- -- ["〉"] = s_rangle,
- -- ["〉"] = s_rangle,
-
- -- ["rparent"] = s_rparent,
- -- ["rbracket"] = s_rbracket,
- -- ["rbrace"] = s_rbrace,
- -- ["rangle"] = s_rangle,
- -- ["rfloor"] = s_rfloor,
- -- ["rceil"] = s_rceil,
-}
-
-local islimits = {
- ["\\sum"] = true,
- -- ["∑"] = true,
- ["\\prod"] = true,
- -- ["âˆ"] = true,
- ["\\lim"] = true,
-}
-
-local p_left =
- lpeg.utfchartabletopattern(m_left) / m_left
-local p_right =
- lpeg.utfchartabletopattern(m_right) / m_right
-
--- special cases
-
--- local p_special =
--- C("/")
--- + P("\\ ") * Cc("{}") * p_spaces^0 * C(S("^_"))
--- + P("\\ ") * Cc("\\space")
--- + P("\\\\") * Cc("\\backslash")
--- + P("\\") * (R("az","AZ")^1/entities)
--- + P("|") * Cc("\\|")
---
--- faster bug also uglier:
-
-local p_special =
- P("|") * Cc("\\|") -- s_mbar -- maybe always add left / right as in mml ?
- + P("\\") * (
- (
- P(" ") * (
- Cc("{}") * p_spaces^0 * C(S("^_"))
- + Cc("\\space")
- )
- )
- + P("\\") * Cc("\\backslash")
- -- + (R("az","AZ")^1/entities)
- + C(R("az","AZ")^1)
- )
-
--- open | close :: {: | :}
-
-local u_parser = Cs ( (
- patterns.doublequoted +
- P("text") * p_spaces^0 * P("(") * (1-P(")"))^0 * P(")") + -- -- todo: balanced
- p_unicode +
- p_utf_base
-)^0 )
-
-local a_parser = Ct { "tokenizer",
- tokenizer = (
- p_spaces
- + p_number
- + p_text
- -- + Ct(p_open * V("tokenizer") * p_close) -- {: (a+b,=,1),(a+b,=,7) :}
- -- + Ct(p_open * V("tokenizer") * p_close_right) -- { (a+b,=,1),(a+b,=,7) :}
- -- + Ct(p_open_left * V("tokenizer") * p_right) -- {: (a+b,=,1),(a+b,=,7) }
- + Ct(p_left * V("tokenizer") * p_right) -- { (a+b,=,1),(a+b,=,7) }
- + p_special
- + p_reserved
- -- + p_utf - p_close - p_right
- + (p_utf - p_right)
- )^1,
-}
-
-local collapse = nil
-local serialize = table.serialize
-local f_state = formatters["level %s : %s : intermediate"]
-
-local function show_state(t,level,state)
- report_asciimath(serialize(t,f_state(level,state)))
-end
-
-local function show_result(original,unicoded,texcoded)
- report_asciimath("original > %s",original)
- report_asciimath("unicoded > %s",unicoded)
- report_asciimath("texcoded > %s",texcoded)
-end
-
-local function collapse_matrices(t)
- local n = #t
- if n > 4 and t[3] == "," then
- local l1 = t[1]
- local r1 = t[n]
- if isleft[l1] and isright[r1] then
- local l2 = t[2]
- local r2 = t[n-1]
- if type(l2) == "table" and type(r2) == "table" then
- -- we have a matrix
- local valid = true
- for i=3,n-2,2 do
- if t[i] ~= "," then
- valid = false
- break
- end
- end
- if valid then
- for i=2,n-1,2 do
- local ti = t[i]
- local tl = ti[1]
- local tr = ti[#ti]
- if isleft[tl] and isright[tr] then
- -- ok
- else
- valid = false
- break
- end
- end
- if valid then
- local omit = l1 == s_left and r1 == s_right
- if omit then
- t[1] = "\\startmatrix"
- else
- t[1] = l1 .. "\\startmatrix"
- end
- for i=2,n-1 do
- if t[i] == "," then
- t[i] = "\\NR"
- else
- local ti = t[i]
- ti[1] = "\\NC"
- for i=2,#ti-1 do
- if ti[i] == "," then
- ti[i] = "\\NC"
- end
- end
- ti[#ti] = nil
- end
- end
- if omit then
- t[n] = "\\NR\\stopmatrix"
- else
- t[n] = "\\NR\\stopmatrix" .. r1
- end
- end
- end
- end
- end
- end
- return t
-end
-
-local function collapse_bars(t)
- local n, i, l, m = #t, 1, false, 0
- while i <= n do
- local current = t[i]
- if current == "\\|" then
- if l then
- m = m + 1
- t[l] = s_lbar
- t[i] = s_rbar
- t[m] = { unpack(t,l,i) }
- l = false
- else
- l = i
- end
- elseif not l then
- m = m + 1
- t[m] = current
- end
- i = i + 1
- end
- if l then
- local tt = { s_lnothing } -- space fools final checker
- local tm = 1
- for i=1,m do
- tm = tm + 1
- tt[tm] = t[i]
- end
- tm = tm + 1
- tt[tm] = s_mbar
- for i=l+1,n do
- tm = tm + 1
- tt[tm] = t[i]
- end
- tm = tm + 1
- tt[tm] = s_rnothing -- space fools final checker
- m = tm
- t = tt
- elseif m < n then
- for i=n,m+1,-1 do
- t[i] = nil
- end
- end
- return t
-end
-
-local function collapse_pairs(t)
- local n, i = #t, 1
- while i < n do
- local current = t[i]
- if current == "/" and i > 1 then
- local tl = t[i-1]
- local tr = t[i+1]
- local tn = t[i+2]
- if type(tl) == "table" then
- if isleft[tl[1]] and isright[tl[#tl]] then
- tl[1] = "" -- todo: remove
- tl[#tl] = nil
- end
- end
- if type(tr) == "table" then
- if tn == "^" then
- -- brr 1/(1+x)^2
- elseif isleft[tr[1]] and isright[tr[#tr]] then
- tr[1] = "" -- todo: remove
- tr[#tr] = nil
- end
- end
- i = i + 2
- elseif current == "," or current == ";" then
- -- t[i] = current .. "\\thinspace" -- look sbad in (a,b)
- i = i + 1
- else
- i = i + 1
- end
- end
- return t
-end
-
-local function collapse_parentheses(t)
- local n, i = #t, 1
- if n > 2 then
- while i < n do
- local current = t[i]
- if type(current) == "table" and isleft[t[i-1]] and isright[t[i+1]] then
- local c = #current
- if c > 2 and isleft[current[1]] and isright[current[c]] then
- remove(current,c)
- remove(current,1)
- end
- i = i + 3
- else
- i = i + 1
- end
- end
- end
- return t
-end
-
-local function collapse_signs(t)
- local n, m, i = #t, 0, 1
- while i <= n do
- m = m + 1
- local current = t[i]
- if isunary[current] then
- local one = t[i+1]
- if not one then
--- m = m + 1
- t[m] = current .. "{}" -- error
-return t
--- break
- end
- if type(one) == "table" then
- if isleft[one[1]] and isright[one[#one]] then
- remove(one,#one)
- remove(one,1)
- end
- one = collapse(one,level)
- elseif one == "-" and i + 2 <= n then -- or another sign ? or unary ?
- local t2 = t[i+2]
- if type(t2) == "string" then
- one = one .. t2
- i = i + 1
- end
- end
- t[m] = current .. "{" .. one .. "}"
- i = i + 2
- elseif i + 2 <= n and isfunny[current] then
- local one = t[i+1]
- if isinfix[one] then
- local two = t[i+2]
- if two == "-" then -- or another sign ? or unary ?
- local three = t[i+3]
- if three then
- if type(three) == "table" then
- three = collapse(three,level)
- end
- t[m] = current .. one .. "{" .. two .. three .. "}"
- i = i + 4
- else
- t[m] = current
- i = i + 1
- end
- else
- t[m] = current
- i = i + 1
- end
- else
- t[m] = current
- i = i + 1
- end
- else
- t[m] = current
- i = i + 1
- end
- end
- if i == n then -- yes?
- m = m + 1
- t[m] = t[n]
- end
- if m < n then
- for i=n,m+1,-1 do
- t[i] = nil
- end
- end
- return t
-end
-
-local function collapse_binaries(t)
- local n, m, i = #t, 0, 1
- while i <= n do
- m = m + 1
- local current = t[i]
- if isbinary[current] then
- local one = t[i+1]
- local two = t[i+2]
- if not one then
- t[m] = current .. "{}{}" -- error
-return t
--- break
- end
- if type(one) == "table" then
- if isleft[one[1]] and isright[one[#one]] then
- remove(one,#one)
- remove(one,1)
- end
- one = collapse(one,level)
- end
- if not two then
- t[m] = current .. "{" .. one .. "}{}"
-return t
--- break
- end
- if type(two) == "table" then
- if isleft[two[1]] and isright[two[#two]] then
- remove(two,#two)
- remove(two,1)
- end
- two = collapse(two,level)
- end
- t[m] = current .. "{" .. one .. "}{" .. two .. "}"
- i = i + 3
- else
- t[m] = current
- i = i + 1
- end
- end
- if i == n then -- yes?
- m = m + 1
- t[m] = t[n]
- end
- if m < n then
- for i=n,m+1,-1 do
- t[i] = nil
- end
- end
- return t
-end
-
-local function collapse_infixes_1(t)
- local n, i = #t, 1
- while i <= n do
- local current = t[i]
- if isinfix[current] then
- local what = t[i+1]
- if what then
- if type(what) == "table" then
- local f, l = what[1], what[#what]
- if isleft[f] and isright[l] then
- remove(what,#what)
- remove(what,1)
- end
- t[i+1] = collapse(what,level) -- collapse ?
- end
- i = i + 2
- else
- break
- end
- else
- i = i + 1
- end
- end
- return t
-end
-
-function collapse_limits(t)
- local n, m, i = #t, 0, 1
- while i <= n do
- m = m + 1
- local current = t[i]
- if islimits[current] then
- local one, two, first, second = nil, nil, t[i+1], t[i+3]
- if first and isinfix[first] then
- one = t[i+2]
- if one then
- -- if type(one) == "table" then
- -- if isleft[one[1]] and isright[one[#one]] then
- -- remove(one,#one)
- -- remove(one,1)
- -- end
- -- one = collapse(one,level)
- -- end
- if second and isinfix[second] then
- two = t[i+4]
- -- if type(two) == "table" then
- -- if isleft[two[1]] and isright[two[#two]] then
- -- remove(two,#two)
- -- remove(two,1)
- -- end
- -- two = collapse(two,level)
- -- end
- end
- if two then
- t[m] = current .. "\\limits" .. first .. "{" .. one .. "}" .. second .. "{" .. two .. "}"
- i = i + 5
- else
- t[m] = current .. "\\limits" .. first .. "{" .. one .. "}"
- i = i + 3
- end
- else
- t[m] = current
- i = i + 1
- end
- else
- t[m] = current
- i = i + 1
- end
- else
- t[m] = current
- i = i + 1
- end
- end
- if i == n then -- yes?
- m = m + 1
- t[m] = t[n]
- end
- if m < n then
- for i=n,m+1,-1 do
- t[i] = nil
- end
- end
- return t
-end
-
-local function collapse_tables(t)
- local n, m, i = #t, 0, 1
- while i <= n do
- m = m + 1
- local current = t[i]
- if type(current) == "table" then
- if current[1] == "\\NC" then
- t[m] = collapse(current,level)
- else
- t[m] = "{" .. collapse(current,level) .. "}"
- end
- i = i + 1
- else
- t[m] = current
- i = i + 1
- end
- end
- if i == n then -- yes?
- m = m + 1
- t[m] = t[n]
- end
- if m < n then
- for i=n,m+1,-1 do
- t[i] = nil
- end
- end
- return t
-end
-
-local function collapse_infixes_2(t)
- local n, m, i = #t, 0, 1
- while i < n do
- local current = t[i]
- if isinfix[current] and i > 1 then
- local tl = t[i-1]
- local tr = t[i+1]
- local ti = t[i+2]
- local tn = t[i+3]
- if ti and tn and isinfix[ti] then
- t[m] = tl .. current .. "{" .. tr .. "}" .. ti .. "{" .. tn .. "}"
- i = i + 4
- else
- t[m] = tl .. current .. "{" .. tr .. "}"
- i = i + 2
- end
- else
- m = m + 1
- t[m] = current
- i = i + 1
- end
- end
- if i == n then
- m = m + 1
- t[m] = t[n]
- end
- if m < n then
- for i=n,m+1,-1 do
- t[i] = nil
- end
- end
- return t
-end
-
-local function collapse_fractions_1(t)
- local n, m, i = #t, 0, 1
- while i < n do
- local current = t[i]
- if current == "/" and i > 1 then
- local tl = t[i-1]
- local tr = t[i+1]
- t[m] = "\\frac{" .. tl .. "}{" .. tr .. "}"
- i = i + 2
- if i < n then
- m = m + 1
- t[m] = t[i]
- i = i + 1
- end
- else
- m = m + 1
- t[m] = current
- i = i + 1
- end
- end
- if i == n then
- m = m + 1
- t[m] = t[n]
- end
- if m < n then
- for i=n,m+1,-1 do
- t[i] = nil
- end
- end
- return t
-end
-
-local function collapse_fractions_2(t)
- local n, m, i = #t, 0, 1
- while i < n do
- local current = t[i]
- if current == "â„" and i > 1 then -- \slash
- t[m] = "{" .. s_left .. t[i-1] .. s_mslash .. t[i+1] .. s_right .. "}"
- i = i + 2
- if i < n then
- m = m + 1
- t[m] = t[i]
- i = i + 1
- end
- else
- m = m + 1
- t[m] = current
- i = i + 1
- end
- end
- if i == n then
- m = m + 1
- t[m] = t[n]
- end
- if m < n then
- for i=n,m+1,-1 do
- t[i] = nil
- end
- end
- return t
-end
-
-local function collapse_result(t)
- local n = #t
- if t[1] == s_left and t[n] == s_right then -- see bar .. space needed there
- return concat(t," ",2,n-1)
- else
- return concat(t," ")
- end
-end
-
-collapse = function(t,level)
- -- check
- if not t then
- return ""
- end
- -- tracing
- if trace_detail then
- if level then
- level = level + 1
- else
- level = 1
- end
- show_state(t,level,"parsed")
- end
- -- steps
- t = collapse_matrices (t) if trace_detail then show_state(t,level,"matrices") end
- t = collapse_bars (t) if trace_detail then show_state(t,level,"bars") end
- t = collapse_pairs (t) if trace_detail then show_state(t,level,"pairs") end
- t = collapse_parentheses(t) if trace_detail then show_state(t,level,"parentheses") end
- t = collapse_signs (t) if trace_detail then show_state(t,level,"signs") end
- t = collapse_binaries (t) if trace_detail then show_state(t,level,"binaries") end
- t = collapse_infixes_1 (t) if trace_detail then show_state(t,level,"infixes (1)") end
- t = collapse_limits (t) if trace_detail then show_state(t,level,"limits") end
- t = collapse_tables (t) if trace_detail then show_state(t,level,"tables") end
- t = collapse_infixes_2 (t) if trace_detail then show_state(t,level,"infixes (2)") end
- t = collapse_fractions_1(t) if trace_detail then show_state(t,level,"fractions (1)") end
- t = collapse_fractions_2(t) if trace_detail then show_state(t,level,"fractions (2)") end
- -- done
- return collapse_result(t)
-end
-
--- todo: cache simple ones, say #str < 10, maybe weak
-
-local context = context
-local ctx_mathematics = context and context.mathematics or report_asciimath
-local ctx_type = context and context.type or function() end
-local ctx_inleft = context and context.inleft or function() end
-
-local function convert(str,totex)
- local unicoded = lpegmatch(u_parser,str) or str
- local texcoded = collapse(lpegmatch(a_parser,unicoded))
- if trace_mapping then
- show_result(str,unicoded,texcoded)
- end
- if totex then
- ctx_mathematics(texcoded)
- else
- return texcoded
- end
-end
-
-local n = 0
-local p = (
- (S("{[(") + P("\\left" )) / function() n = n + 1 end
- + (S("}])") + P("\\right")) / function() n = n - 1 end
- + p_utf_base
-)^0
-
-local function invalidtex(str)
- n = 0
- lpegmatch(p,str)
- if n == 0 then
- return false
- elseif n < 0 then
- return formatters["too many left fences: %s"](-n)
- elseif n > 0 then
- return formatters["not enough right fences: %s"](n)
- end
-end
-
-local collected = { }
-local indexed = { }
-
--- bonus
-
-local p_reserved_spaced =
- C(lpeg.utfchartabletopattern(k_reserved_words)) / " %1 "
-
-local p_text =
- C(P("text")) / " %1 "
- * p_spaces^0
- * ( -- maybe balanced
- (P("{") * (1-P("}"))^0 * P("}"))
- + (P("(") * (1-P(")"))^0 * P(")"))
- )
- + patterns.doublequoted
-
-local p_expand = Cs((p_text + p_reserved_spaced + p_utf_base)^0)
-local p_compress = patterns.collapser
-
-local function cleanedup(str)
- return lpegmatch(p_compress,lpegmatch(p_expand,str)) or str
-end
-
--- so far
-
-local function register(s,cleanedup,collected,shortname)
- local c = cleanedup(s)
- local f = collected[c]
- if f then
- f.count = f.count + 1
- f.files[shortname] = (f.files[shortname] or 0) + 1
- if s ~= c then
- f.cleanedup = f.cleanedup + 1
- end
- f.dirty[s] = (f.dirty[s] or 0) + 1
- else
- local texcoded = convert(s)
- local message = invalidtex(texcoded)
- if message then
- report_asciimath("%s: %s : %s",message,s,texcoded)
- end
- collected[c] = {
- count = 1,
- files = { [shortname] = 1 },
- texcoded = texcoded,
- message = message,
- cleanedup = s ~= c and 1 or 0,
- dirty = { [s] = 1 }
- }
- end
-end
-
-local function wrapup(collected,indexed)
- local n = 0
- for k, v in sortedhash(collected) do
- n = n + 1
- v.n= n
- indexed[n] = k
- end
-end
-
-function collect(fpattern,element,collected,indexed)
- local element = element or "am"
- local mpattern = formatters["<%s>(.-)</%s>"](element,element)
- local filenames = resolvers.findtexfile(fpattern)
- if filenames and filenames ~= "" then
- filenames = { filenames }
- else
- filenames = dir.glob(fpattern)
- end
- local cfpattern = gsub(fpattern,"^%./",lfs.currentdir())
- local cfpattern = gsub(cfpattern,"\\","/")
- local wildcard = string.split(cfpattern,"*")[1]
- if not collected then
- collected = { }
- indexed = { }
- end
- for i=1,#filenames do
- filename = gsub(filenames[i],"\\","/")
- local splitname = (wildcard and wildcard ~= "" and string.split(filename,wildcard)[2]) or filename
- local shortname = gsub(splitname or file.basename(filename),"^%./","")
- if shortname == "" then
- shortname = filename
- end
- local fullname = resolvers.findtexfile(filename) or filename
- if fullname ~= "" then
- for s in gmatch(io.loaddata(fullname),mpattern) do
- register(s,cleanedup,collected,shortname)
- end
- end
- end
- wrapup(collected,indexed)
- return collected, indexed
-end
-
-function filter(root,pattern,collected,indexed)
- if not pattern or pattern == "" then
- pattern = "am"
- end
- if not collected then
- collected = { }
- indexed = { }
- end
- for c in xmlcollected(root,pattern) do
- register(xmltext(c),cleanedup,collected,xmlinclusion(c) or "" )
- end
- wrapup(collected,indexed)
- return collected, indexed
-end
-
-asciimath.convert = convert
-asciimath.reserved = reserved
-asciimath.collect = collect
-asciimath.filter = filter
-asciimath.invalidtex = invalidtex
-asciimath.cleanedup = cleanedup
-
--- sin(x) = 1 : 3.3 uncached 1.2 cached , so no real gain (better optimize the converter then)
-
-local uncrapped = {
- ["%"] = "\\mathpercent",
- ["&"] = "\\mathampersand",
- ["#"] = "\\mathhash",
- ["$"] = "\\mathdollar",
- ["^"] = "\\Hat{\\enspace}", -- terrible hack ... tex really does it sbest to turn any ^ into a superscript
- ["_"] = "\\underline{\\enspace}",
-}
-
-local function convert(str,nowrap)
- if #str > 0 then
- local unicoded = lpegmatch(u_parser,str) or str
- if lpegmatch(p_onechar,unicoded) then
- ctx_mathematics(uncrapped[unicoded] or unicoded)
- else
- local texcoded = collapse(lpegmatch(a_parser,unicoded))
- if trace_mapping then
- show_result(str,unicoded,texcoded)
- end
- if #texcoded == 0 then
- report_asciimath("error in asciimath: %s",str)
- else
- local message = invalidtex(texcoded)
- if message then
- report_asciimath("%s: %s : %s",message,str,texcoded)
- ctx_type(formatters["<%s>"](message))
- elseif nowrap then
- context(texcoded)
- else
- ctx_mathematics(texcoded)
- end
- end
- end
- end
-end
-
-
-local context = context
-
-if not context then
-
--- trace_mapping = true
--- trace_detail = true
-
--- report_asciimath(cleanedup([[ac+sinx+xsqrtx+sinsqrtx+sinsqrt(x)]]))
--- report_asciimath(cleanedup([[a "αsinsqrtx" b]]))
--- report_asciimath(cleanedup([[a "α" b]]))
--- report_asciimath(cleanedup([[//4]]))
-
--- convert([[\^{1/5}log]])
--- convert("sqrt")
--- convert("^")
-
--- convert("\\frac{a}{b}")
--- convert("frac{a}{b}")
--- convert("\\sin{a}{b}")
--- convert("sin{a}{b}")
--- convert("1: rightarrow")
--- convert("2: \\rightarrow")
-
--- convert("((1,2,3),(4,5,6),(7,8,9))")
-
--- convert("1/(t+x)^2")
-
--- convert("AA a > 0 ^^ b > 0 | {:log_g:} a + {:log_g:} b")
--- convert("AA a &gt; 0 ^^ b > 0 | {:log_g:} a + {:log_g:} b")
-
--- convert("10000,00001")
--- convert("4/18*100text(%)~~22,2")
--- convert("4/18*100text(%)≈22,2")
--- convert("62541/(197,6)≈316,05")
-
--- convert([[sum x]])
--- convert([[sum^(1)_(2) x]])
--- convert([[lim_(1)^(2) x]])
--- convert([[lim_(1) x]])
--- convert([[lim^(2) x]])
-
--- convert([[{: rangle]])
--- convert([[\langle\larr]])
--- convert([[langlelarr]])
--- convert([[D_f=[0 ,→〉]])
--- convert([[ac+sinx+xsqrtx]])
--- convert([[ac+\alpha x+xsqrtx-cc b*pi**psi-3alephx / bb X]])
--- convert([[ac+\ ^ x+xsqrtx]])
--- convert([[d/dx(x^2+1)]])
--- convert([[a "αsinsqrtx" b]])
--- convert([[a "α" b]])
--- convert([[//4]])
--- convert([[ {(a+b,=,1),(a+b,=,7)) ]])
-
--- convert([[ 2/a // 5/b = (2 b) / ( a b) // ( 5 a ) / ( a b ) = (2 b ) / ( 5 a ) ]])
--- convert([[ (2+x)/a // 5/b ]])
-
--- convert([[ ( 2/a ) // ( 5/b ) = ( (2 b) / ( a b) ) // ( ( 5 a ) / ( a b ) ) = (2 b ) / ( 5 a ) ]])
-
--- convert([[ (x/y)^3 = x^3/y^3 ]])
-
--- convert([[ {: (1,2) :} ]])
--- convert([[ {: (a+b,=,1),(a+b,=,7) :} ]])
--- convert([[ { (a+b,=,1),(a+b,=,7) :} ]])
--- convert([[ {: (a+b,=,1),(a+b,=,7) } ]])
--- convert([[ { (a+b,=,1),(a+b,=,7) } ]])
-
--- convert([[(1,5 ±sqrt(1,25 ),0 )]])
--- convert([[1//2]])
--- convert([[(p)/sqrt(p)]])
--- convert([[u_tot]])
--- convert([[u_tot=4,4 L+0,054 T]])
-
--- convert([[ [â†;0,2] ]])
--- convert([[ [â†;0,2⟩ ]])
--- convert([[ ⟨â†;0,2 ) ]])
--- convert([[ ⟨â†;0,2 ] ]])
--- convert([[ ⟨â†;0,2⟩ ]])
-
--- convert([[ x^2(x-1/16)=0 ]])
--- convert([[ y = ax + 3 - 3a ]])
--- convert([[ y= ((1/4)) ^x ]])
--- convert([[ x=\ ^ (1/4) log(0 ,002 )= log(0,002) / (log(1/4) ]])
--- convert([[ x=\ ^glog(y) ]])
--- convert([[ x^ (-1 1/2) =1/x^ (1 1/2)=1/ (x^1*x^ (1/2)) =1/ (xsqrt(x)) ]])
--- convert([[ x^2(10 -x)&gt;2 x^2 ]])
--- convert([[ x^4&gt;x ]])
-
- return
-
-end
-
-interfaces.implement {
- name = "asciimath",
- actions = convert,
- arguments = "string"
-}
-
-interfaces.implement {
- name = "justasciimath",
- actions = convert,
- arguments = { "string", true },
-}
-
-local ctx_typebuffer = context.typebuffer
-local ctx_mathematics = context.mathematics
-local ctx_color = context.color
-
-local sequenced = table.sequenced
-local assign_buffer = buffers.assign
-
-local show = { }
-asciimath.show = show
-
-local collected, indexed, ignored = { }, { }, { }
-
-local color = { "darkred" }
-
-function show.ignore(n)
- if type(n) == "string" then
- local c = collected[n]
- n = c and c.n
- end
- if n then
- ignored[n] = true
- end
-end
-
-function show.count(n,showcleanedup)
- local v = collected[indexed[n]]
- local count = v.count
- local cleanedup = v.cleanedup
- if not showcleanedup or cleanedup == 0 then
- context(count)
- elseif count == cleanedup then
- ctx_color(color,count)
- else
- context("%s+",count-cleanedup)
- ctx_color(color,cleanedup)
- end
-end
-
-local h = { }
-local am = { "am" }
-
-function show.nofdirty(n)
- local k = indexed[n]
- local v = collected[k]
- local n = v.cleanedup
- h = { }
- if n > 0 then
- for d, n in sortedhash(v.dirty) do
- if d ~= k then
- h[#h+1] = { d, n }
- end
- end
- end
- context(#h)
-end
-
-function show.dirty(m,wrapped)
- local d = h[m]
- if d then
- ctx_inleft(d[2])
- if wrapped then
- assign_buffer("am",'"' .. d[1] .. '"')
- else
- assign_buffer("am",d[1])
- end
- ctx_typebuffer(am)
- end
-end
-
-function show.files(n)
- context(sequenced(collected[indexed[n]].files," "))
-end
-
-function show.input(n,wrapped)
- if wrapped then
- assign_buffer("am",'"' .. indexed[n] .. '"')
- else
- assign_buffer("am",indexed[n])
- end
- ctx_typebuffer(am)
-end
-
-function show.result(n)
- local v = collected[indexed[n]]
- if ignored[n] then
- context("ignored")
- elseif v.message then
- ctx_color(color, v.message)
- else
- ctx_mathematics(v.texcoded)
- end
-end
-
-function show.load(str,element)
- collected, indexed, ignored = { }, { }, { }
- local t = utilities.parsers.settings_to_array(str)
- for i=1,#t do
- asciimath.collect(t[i],element or "am",collected,indexed)
- end
-end
-
-function show.filter(id,element)
- collected, indexed, ignored = { }, { }, { }
- asciimath.filter(lxml.getid(id),element or "am",collected,indexed)
-end
-
-function show.max()
- context(#indexed)
-end
-
-function show.statistics()
- local usedfiles = { }
- local noffiles = 0
- local nofokay = 0
- local nofbad = 0
- local nofcleanedup = 0
- for k, v in next, collected do
- if ignored[v.n] then
- nofbad = nofbad + v.count
- elseif v.message then
- nofbad = nofbad + v.count
- else
- nofokay = nofokay + v.count
- end
- nofcleanedup = nofcleanedup + v.cleanedup
- for k, v in next, v.files do
- local u = usedfiles[k]
- if u then
- usedfiles[k] = u + 1
- else
- noffiles = noffiles + 1
- usedfiles[k] = 1
- end
- end
- end
- local NC = context.NC
- local NR = context.NR
- local EQ = context.EQ
- context.starttabulate { "|B||" }
- NC() context("files") EQ() context(noffiles) NC() NR()
- NC() context("formulas") EQ() context(nofokay+nofbad) NC() NR()
- NC() context("uniques") EQ() context(#indexed) NC() NR()
- NC() context("cleanedup") EQ() context(nofcleanedup) NC() NR()
- NC() context("errors") EQ() context(nofbad) NC() NR()
- context.stoptabulate()
-end
-
-function show.save(name)
- table.save(name ~= "" and name or "dummy.lua",collected)
-end
diff --git a/Master/texmf-dist/tex/context/base/x-asciimath.mkiv b/Master/texmf-dist/tex/context/base/x-asciimath.mkiv
deleted file mode 100644
index 1d62fb93d32..00000000000
--- a/Master/texmf-dist/tex/context/base/x-asciimath.mkiv
+++ /dev/null
@@ -1,393 +0,0 @@
-%D \module
-%D [ file=x-asciimath,
-%D version=2014.06.01, % 2006.04.24, % 1999.11.06,
-%D title=\CONTEXT\ Modules,
-%D subtitle=AsciiMath,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\registerctxluafile{x-asciimath}{}
-
-%D When the Math4All project started, we immediately started using content \MATHML.
-%D Because in school math there is often a reference to calculator input, we also
-%D provided what we called \quote {calcmath}: a predictable expression based way
-%D entering math. At some point \OPENMATH\ was also used but that was later
-%D abandoned because editing is more cumbersome.
-%D
-%D Due to limitations in the web variant (which is independent of rendering for
-%D paper but often determines the coding of document, not seldom for the worse) the
-%D switch was made to presentational \MATHML. But even that proved to be too complex
-%D for rendering on the web, so it got converted to so called \ASCIIMATH\ which
-%D can be rendered using some \JAVASCRIPT\ magic. However, all the formulas (and
-%D we're talking of tens of thousands of them) were very precisely coded by the main
-%D author. Because in intermediate stages of the editing (by additional authors) a
-%D mixture of \MATHML\ and \ASCIIMATH\ was used, we wrote the first version of this
-%D module. As reference we took \url
-%D {http://www1.chapman.edu/~jipsen/mathml/asciimath.html} and. The idea was to
-%D stick to \MATHML\ as reference and if needed use \ASCIIMATH\ as annotation.
-%D
-%D Eventually we ended up with supporting several math encodings in \CONTEXT\ that
-%D could be used mixed: content \MATHML\ (preferred), presentation \MATHML\ (often
-%D messy), \OPENMATH\ (somewhat minimalistic) calcmath (handy for students who are
-%D accustomed to calculators), \ASCIIMATH\ (to make web support easier) and of
-%D course \TEX.
-%D
-%D The first version had some limitations as we didn't want to support all quirks of
-%D \ASCIIMATH\ and also because I was not really in the mood to write a complex parser
-%D when a bit of sane coding can work equally well. Some comments from that version:
-%D
-%D \startnarrower
-%D \startitemize
-%D \item We support only the syntactically clear variants and as long as lpeg does
-%D not support left recursion this is as far as we want to go.
-%D \item The parser is rather insensitive for spaces but yet the advice is to avoid
-%D weird coding like \type {d/dxf(x)} but use \type {d/dx f(x)} instead. After
-%D all we're not in a compact coding cq.\ parser challenge.
-%D \item We also don't support the somewhat confusing \type {sqrt sqrt 2} nor \type
-%D {root3x} (although the second one kind of works). A bit of defensive coding
-%D does not hurt.
-%D \item We can process \type {a/b/c/d} but it's not compatible with the default
-%D behaviour of \ASCIIMATH. Use grouping instead. Yes, we do support the somewhat
-%D nonstandard grouping token mix.
-%D \item You should use explicit \type {text(..)} directives as one can never be sure
-%D what is a reserved word and not.
-%D \stopitemize
-%D
-%D Actually, as the only parsing sensitive elements of \TEX\ are fractions (\type {\over}
-%D and friends, a restricted use of \TEX\ coding is probably as comprehensive and
-%D parsable. The webpage with examples served as starting point so anything beyond
-%D what can be found there isn't supported.
-%D \stopnarrower
-%D
-%D Then in 2014 something bad happened. Following the fashion of minimal encoding
-%D (which of course means messy encoding of complex cases and which can make authors
-%D sloppy too) the web based support workflow of the mentioned project ran into some
-%D limitations and magically one day all carefully coded \MATHML\ was converted into
-%D \ASCIIMATH. As there was no way to recover the original thousands of files and
-%D tens of thousands of formulas we were suddenly stuck with \ASCIIMATH. Because the
-%D conversion had be done automagically, we also saw numerous errors and were forced
-%D to come up with some methods to check formulas. Because \MATHML\ poses some
-%D restrictions it has predictable rendering; \ASCIIMATH\ on the other hand enforces
-%D no structure. Also, because \MATHML\ has to be valid \XML\ it always processes.
-%D Of course, during the decade that the project had run we also had to built in
-%D some catches for abuse but at least we had a relatively stable and configurable
-%D subsystem. So, in order to deal with less predictable cases as well as extensive
-%D checking, a new \ASCIIMATH\ parser was written, one that could also be used to
-%D trace bad coding.
-%D
-%D Because the formal description is incomplete, and because some links to resources
-%D are broken, and because some testing on the web showed that sequences of characters
-%D are interpreted that were not mentioned anywhere (visible), and because we noticed
-%D that the parser was dangerously tolerant, the new code is quite different from the
-%D old code.
-%D
-%D One need to keep in mind that because spaces are optional, the only robust way to
-%D edit \ASCIIMATH\ is to use a \WYSIWYG\ editor and hope that the parser doesn't
-%D change ever. Keys are picked up from spaceless sequences and when not recognized
-%D a (sequence) of characters is considered to be variables. So, \type {xsqrtx} is
-%D valid and renders as \type {$x\sqrt{x}$}, \type {xx} becomes \type {×} (times)
-%D but \type {ac} becomes \type {$a c$} (a times c). We're lucky that \type {AC} is
-%D not turned into Alternating Current, but who knows what happens a few years from
-%D now. So, we do support this spaceless mess, but users are warned: best use a
-%D spacy sequence. The extra amount of spaces (at one byte each) an author has to
-%D include in his|/|her active writing time probably stays below the size of one
-%D holiday picture. Another complication is that numbers (in Dutch) use commas instead
-%D of periods, but vectors use commas as well. We also hav esome different names for
-%D functions which then can conflict with the expectations about collapsed variables.
-%D
-%D It must be noted that simplified encodings (that seem to be the fashion today)
-%D can demand from applications to apply fuzzy logic to make something work out
-%D well. Because we have sequential data that gets rendered, sometimes wrong input
-%D gets obscured simply by the rendering: like the comma's in numbers as well as
-%D for separators (depending on space usage), or plain wrong symbols that somehow
-%D get a representation anyway. This in itself is more a side effect of trying to
-%D use the simplified encoding without applying rules (in the input) or to use it
-%D beyong its intended usage, which then of course can lead to adapted parsers and
-%D catches that themselves trigger further abuse. Imagine that instead of developing
-%D new cars, planes, space ships, mobile phones, computers we would have adapted
-%D horse cars, kites, firework, old fashioned phones and mechanical calculators in a
-%D similar way: patch upon patch of traditional means for sure would not have
-%D worked. So, when you use \ASCIIMATH\ best check immediately how it gets rendered
-%D in the browser as well as on paper. And be prepared to check the more complex
-%D code in the future again. We don't offer any guarantees but of course will try to
-%D keep up.
-%D
-%D In retrospect I sometimes wonder if the energy put into constantly adapting to
-%D the fashion of the day pays off. Probably not. It definitely doesn't pay of.
-%D
-%D More complex crap:
-%D
-%D 1: $x + \stackrel{comment}{\stackrel{\utfchar{"23DE}}{yyyyyyyy}} = y$ \blank
-%D 2: \asciimath{x + stackrel{\utfchar{"23DE}}{yyyyyyyy} = y} \blank
-%D 3: \asciimath{x + stackrel{yyyyyyyy}{\utfchar{"23DE}} = y} \blank
-%D 4: \asciimath{x + stackrel{"comment"}{stackrel{\utfchar{"23DE}}{yyyyyyyy}} = y} \blank
-
-\usemodule[mathml-basics]
-
-\startmodule[asciimath]
-
-\unprotect
-
-\writestatus{asciimath}{beware, this is an experimental (m4all only) module}
-
-%D Hacks:
-
-\unexpanded\def\asciimathoptext #1{\ifmmode\mathoptext{#1}\else#1\fi}
-\unexpanded\def\asciimathoptexttraced #1{\ifmmode\mathoptext{\color[darkgreen]{#1}}\else\color[darkgreen]{#1}\fi}
-\unexpanded\def\asciimathstackrel #1#2{\mathematics{\mathop{\let\limits\relax\mover{#2}{#1}}}}
-\unexpanded\def\asciimathroot #1#2{\sqrt[#1]{#2}}
-\unexpanded\def\asciimathsqrt #1{\sqrt{#1}}
-
-%D The core commands:
-
-% if we need to set
-
-\installsetuponlycommandhandler {asciimath} {asciimath}
-
-\appendtoks
- \ctxlua{moduledata.asciimath.setup {
- splitmethod = "\asciimathparameter\c!splitmethod",
- separator = "\asciimathparameter\c!separator",
- }}%
-\to \everysetupasciimath
-
-\newtoks\everyascimath
-
-% \appendtoks
-% \ignorediscretionaries
-% \to \everyasciimath
-
-\unexpanded\def\asciimath
- {\doifnextoptionalelse\asciimath_yes\asciimath_nop}
-
-\def\asciimath_yes[#1]#2%
- {\mathematics[#1]{\clf_justasciimath{\detokenize\expandafter{\normalexpanded{#2}}}}}
-
-\def\asciimath_nop#1%
- {\mathematics{\clf_justasciimath{\detokenize\expandafter{\normalexpanded{#1}}}}}
-
-\unexpanded\def\ctxmoduleasciimath#1%
- {\ctxlua{moduledata.asciimath.#1}}
-
-%D Some tracing commands. Using tex commands is 10\% slower that directly piping
-%D from \LUA, but this is non|-|critical code.
-
-\unexpanded\def\ShowAsciiMathLoad [#1]{\ctxlua{moduledata.asciimath.show.load("#1")}}
-\unexpanded\def\ShowAsciiMathIgnore[#1]{\ctxlua{moduledata.asciimath.show.ignore("#1")}}
-\unexpanded\def\ShowAsciiMathXML #1#2{\ctxlua{moduledata.asciimath.show.filter("#1","#2")}}
-\unexpanded\def\ShowAsciiMathStats {\ctxlua{moduledata.asciimath.show.statistics()}}
-\unexpanded\def\ShowAsciiMathMax {\ctxlua{moduledata.asciimath.show.max()}}
-
-\unexpanded\def\ShowAsciiMathResult#1%
- {\begingroup
- \blank
- % if we are in vmode, we don't get positions i.e. a smaller tuc file
- \inleft{\ttbf#1\hfill\ctxlua{moduledata.asciimath.show.count(#1,true)}}%
- \dontleavehmode
- \begingroup
- \ttbf
- \ctxlua{moduledata.asciimath.show.files(#1)}
- \endgroup
- \blank[medium,samepage]
- \startcolor[darkblue]
- \ctxlua{moduledata.asciimath.show.input(#1,true)}
- \stopcolor
- \blank[medium,samepage]
- \doifmode{asciimath:show:dirty} {
- \dorecurse{\ctxlua{moduledata.asciimath.show.nofdirty(#1)}} {
- \ctxlua{moduledata.asciimath.show.dirty(\recurselevel,true)}
- \blank[medium,samepage]
- }
- }
- \ctxlua{moduledata.asciimath.show.result(#1)}
- \blank
- \endgroup}
-
-\unexpanded\def\ShowAsciiMathStart
- {\begingroup
- \let\asciimathoptext\asciimathoptexttraced
- \setuptyping[\v!buffer][\c!before=,\c!after=]
- \setupmargindata[\v!left][\c!style=]}
-
-\unexpanded\def\ShowAsciiMathStop
- {\endgroup}
-
-\unexpanded\def\ShowAsciiMath
- {\dodoubleempty\doShowAsciiMath}
-
-\unexpanded\def\doShowAsciiMath[#1][#2]%
- {\iffirstargument
- \ShowAsciiMathStart
- \ShowAsciiMathLoad[#1]
- \ifsecondargument
- \ShowAsciiMathIgnore[#2]
- \fi
- \dorecurse{\ShowAsciiMathMax}{\ShowAsciiMathResult\recurselevel}
- \page
- \ShowAsciiMathStats
- \ShowAsciiMathStop
- \fi}
-
-\unexpanded\def\xmlShowAsciiMath#1#2%
- {\iffirstargument
- \ShowAsciiMathStart
- \ShowAsciiMathXML{#1}{#2}%
- \dorecurse{\ShowAsciiMathMax}{\ShowAsciiMathResult\recurselevel}
- \page
- \ShowAsciiMathStats
- \ShowAsciiMathStop
- \fi}
-
-\unexpanded\def\ShowAsciiMathSave
- {\dosingleempty\doShowAsciiMathSave}
-
-\unexpanded\def\doShowAsciiMathSave[#1]%
- {\ctxlua{moduledata.asciimath.show.save("#1")}}
-
-\protect
-
-\startsetups asciimath:layout
-
- \setupbodyfont
- % [pagella,10pt]
- [dejavu,10pt]
-
- \setuplayout
- [backspace=35mm,
- leftmargin=20mm,
- rightmargindistance=0pt,
- leftmargindistance=5mm,
- cutspace=1cm,
- topspace=1cm,
- bottomspace=1cm,
- width=middle,
- height=middle,
- header=0cm,
- footer=1cm]
-
- \setupheadertexts
- []
-
- \setupfootertexts
- [\currentdate][\pagenumber]
-
- \setupalign
- [flushleft,verytolerant,stretch]
-
- \dontcomplain
-
-\stopsetups
-
-\stopmodule
-
-\continueifinputfile{x-asciimath.mkiv}
-
-%D This will become an extra.
-
-\showframe
-
-\setups[asciimath:layout]
-
-% \enabletrackers[modules.asciimath.mapping]
-% \enabletrackers[modules.asciimath.detail]
-
-% \starttext
-% \enablemode[asciimath:show:dirty]
-% \ShowAsciiMath[e:/temporary/asciimath/*.xml]
-% % \ShowAsciiMathSave[e:/temporary/asciimath/asciimath.lua]
-% \stoptext
-
-\starttext
-\unexpanded\def\MyAsciiMath#1{\startformula\asciimath{#1}\stopformula}
-\startlines
-\MyAsciiMath{x^2 / 10 // z_12^34 / 20}
-% \MyAsciiMath{{:{:x^2:} / 10:} // {:{:z_12^34 :} / 20:}}
-% \MyAsciiMath{x^2+y_1+z_12^34}
-% \MyAsciiMath{sin^-1(x)}
-% \MyAsciiMath{d/dx f(x)=lim_(h->0) (f(x+h)-f(x))/h}
-% \MyAsciiMath{f(x)=sum_(n=0)^oo(f^((n))(a))/(n!)(x-a)^n}
-% \MyAsciiMath{int_0^1 f(x)dx}
-% \MyAsciiMath{int^1_0 f(x)dx}
-% \MyAsciiMath{a//b}
-% \MyAsciiMath{a//\alpha}
-% \MyAsciiMath{(a/b)/(d/c)}
-% \MyAsciiMath{((a*b))/(d/c)}
-% \MyAsciiMath{[[a,b],[c,d]]((n),(k))}
-% \MyAsciiMath{1/x={(1,text{if } x!=0),(text{undefined},if x=0):}}
-% \MyAsciiMath{{ (1,2), (x,(x + text(x))) }}
-% \MyAsciiMath{{(1,2),(x,(x+text(x))),(x,text(x))}}
-% \MyAsciiMath{{(1,2),(x,(x+text(x))),(x,x text(x))}}
-% \MyAsciiMath{{(1,2/2),(x,(x+x^22+sqrt(xx))),(x,x text(xyz))}}
-% \MyAsciiMath{{(1,2/2),(x,(x+x^22+sqrt(xx))),(x,text(xyz)+1+text(hans))}}
-% \MyAsciiMath{<<a,b>> text{and} {:(x,y),(u,v):}}
-% \MyAsciiMath{(a,b] = {x text(in) RR | a < x <= b}}
-% \MyAsciiMath{a/b / c/d = (a * d) / (b * d) / (b * c) / (b * d) = (a * d) / (b * c)}
-% \MyAsciiMath{ (a/b) // (c/d) = ( (a * d) / (b * d) ) // ( (b * c) / (b * d) ) = (a * d) / (b * c)}
-% \MyAsciiMath{sin(x+1)_3^2/b / c/d}
-% \MyAsciiMath{{:{:sin(x+1)_3^2:}/b:} / {:c/d:}}
-% \MyAsciiMath{cos(a) + sin(x+1)_3^2/b / c/d = (a * d) / (b * d) / (b * c) / (b * d) = (a * d) / (b * c)}
-% \MyAsciiMath{S_(11)}
-% \MyAsciiMath{f(x)}
-% \MyAsciiMath{sin(x)}
-% \MyAsciiMath{sin(x+1)}
-% \MyAsciiMath{sin^-1(x)}
-% \MyAsciiMath{sin(2x)}
-% \MyAsciiMath{a_2^2}
-% \MyAsciiMath{( (S_(11),S_(12),S_(1n)),(vdots,ddots,vdots),(S_(m1),S_(m2),S_(mn)) ]}
-% \MyAsciiMath{frac a b}
-% \MyAsciiMath{sin(x)/2 // cos(x)/pi}
-% \MyAsciiMath{a/13 // c/d}
-% \MyAsciiMath{a/b // c/d}
-% \MyAsciiMath{x}
-% \MyAsciiMath{x^2}
-% \MyAsciiMath{sqrt x}
-% \MyAsciiMath{sqrt (x)}
-% \MyAsciiMath{root 2 x}
-% \MyAsciiMath{x+x}
-% \MyAsciiMath{x/3}
-% \MyAsciiMath{x^2 / 10}
-% \MyAsciiMath{x^2 / 10 // z_12^34 / 20}
-% \MyAsciiMath{a^23}
-% \MyAsciiMath{a^{:b^23:}+3x}
-% \MyAsciiMath{a/b / c/d}
-% \MyAsciiMath{sin(x)/b / c/d}
-% \MyAsciiMath{sin(x)/b // c/d}
-% \MyAsciiMath{a/b / c/d = (a * d) / (b * d) / (b * c) / (b * d) = (a * d) / (b * c) }
-% \MyAsciiMath{{:{:x^2:} / 10:} // {:{:z_12^34 :} / 20:}}
-% \MyAsciiMath{x^2+y_1+z_12^34}
-% \MyAsciiMath{sin^-1(x)}
-% \MyAsciiMath{d/dx f(x)=lim_(h->0) (f(x+h)-f(x))/h}
-% \MyAsciiMath{f(x)=sum_(n=0)^oo(f^((n))(a))/(n!)(x-a)^n}
-% \MyAsciiMath{int_0^1 f(x)dx}
-% \MyAsciiMath{int^1_0 f(x)dx}
-% \MyAsciiMath{2x}
-% \MyAsciiMath{a//b}
-% \MyAsciiMath{a//\alpha}
-% \MyAsciiMath{(a/b)/(d/c)}
-% \MyAsciiMath{((a*b))/(d/c)}
-% \MyAsciiMath{[[a,b],[c,d]]((n),(k))}
-% \MyAsciiMath{1/x={(1,text{if } x!=0),(text{undefined},if x=0):}}
-% \MyAsciiMath{{ (1,2), (x,(x + text(x))) }}
-% \MyAsciiMath{{(1,2),(x,(x+text(x))),(x,text(x))}}
-% \MyAsciiMath{{(1,2),(x,(x+text(x))),(x,x text(x))}}
-% \MyAsciiMath{{(1,2/2),(x,(x+x^22+sqrt(xx))),(x,x text(xyz))}}
-% \MyAsciiMath{{(1,2/2),(x,(x+x^22+sqrt(xx))),(x,text(xyz)+1+text(hans))}}
-% \MyAsciiMath{<<a,b>> text{and} {:(x,y),(u,v):}}
-% \MyAsciiMath{(a,b] = {x text(in) RR | a < x <= b}}
-% \MyAsciiMath{x^-2}
-% \MyAsciiMath{x^2(x-1/16)=0}
-% \MyAsciiMath{y= ((1/4)) ^x}
-% \MyAsciiMath{log (0,002) / (log(1/4))}
-% \MyAsciiMath{x=ax+b \ oeps}
-% \MyAsciiMath{x=\ ^ (1/4) log(x)}
-% \MyAsciiMath{x=\ ^ (1/4) log(0 ,002 )= log(0,002) / (log(1/4))}
-% \MyAsciiMath{x^ (-1 1/2) =1/x^ (1 1/2)=1/ (x^1*x^ (1/2)) =1/ (xsqrt(x))}
-% \MyAsciiMath{x^2(10 -x)&gt;2 x^2}
-% \MyAsciiMath{x^4&gt;x}
-\stoplines
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/x-calcmath.lua b/Master/texmf-dist/tex/context/base/x-calcmath.lua
deleted file mode 100644
index c96d8d0ac51..00000000000
--- a/Master/texmf-dist/tex/context/base/x-calcmath.lua
+++ /dev/null
@@ -1,363 +0,0 @@
-if not modules then modules = { } end modules ['x-calcmath'] = {
- version = 1.001,
- comment = "companion to x-calcmath.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
--- this really needs to be redone
-
-local format, lower, upper, gsub, sub = string.format, string.lower, string.upper, string.gsub, string.sub
-local concat = table.concat
-local lpegmatch = lpeg.match
-
-local calcmath = { }
-local moduledata = moduledata or { }
-moduledata.calcmath = calcmath
-
-local context = context
-
-local list_1 = {
- "median", "min", "max", "round", "ln", "log",
- "sin", "cos", "tan", "sinh", "cosh", "tanh"
-}
-local list_2 = {
- "int", "sum", "prod"
-}
-local list_3 = {
- "f", "g"
-}
-local list_4 = {
- "pi", "inf"
-}
-
-local list_1_1 = { }
-local list_2_1 = { }
-local list_2_2 = { }
-local list_2_3 = { }
-local list_4_1 = { }
-
-local frozen = false
-
-local function freeze()
- for k=1,#list_1 do
- local v = list_1[k]
- list_1_1[v] = "\\".. upper(v) .." "
- end
- for k=1,#list_2 do
- local v = list_2[k]
- list_2_1[v .. "%((.-),(.-),(.-)%)"] = "\\" .. upper(v) .. "^{%1}_{%2}{%3}"
- list_2_2[v .. "%((.-),(.-)%)"] = "\\" .. upper(v) .. "^{%1}{%2}"
- list_2_3[v .. "%((.-)%)"] = "\\" .. upper(v) .. "{%1}"
- end
- for k=1,#list_4 do
- local v = list_4[k]
- list_4_1[v] = "\\" .. upper(v)
- end
- frozen = true
-end
-
-local entities = {
- ['gt'] = '>',
- ['lt'] = '<',
-}
-
-local symbols = {
- ["<="] = "\\LE ",
- [">="] = "\\GE ",
- ["=<"] = "\\LE ",
- ["=>"] = "\\GE ",
- ["=="] = "\\EQ ",
- ["<" ] = "\\LT ",
- [">" ] = "\\GT ",
- ["="] = "\\EQ ",
-}
-
-local function nsub(str,tag,pre,post)
- return (gsub(str,tag .. "(%b())", function(body)
- return pre .. nsub(sub(body,2,-2),tag,pre,post) .. post
- end))
-end
-
-local function totex(str,mode)
- if not frozen then freeze() end
- local n = 0
- -- crap
- str = gsub(str,"%s+",' ')
- -- xml
- str = gsub(str,"&(.-);",entities)
- -- ...E...
- str = gsub(str,"([%-%+]?[%d%.%+%-]+)E([%-%+]?[%d%.]+)", "{\\SCINOT{%1}{%2}}")
- -- ^-..
- str = gsub(str,"%^([%-%+]*%d+)", "^{%1}")
- -- ^(...)
- str = nsub(str,"%^", "^{", "}")
- -- 1/x^2
- repeat
- str, n = gsub(str,"([%d%w%.]+)/([%d%w%.]+%^{[%d%w%.]+})", "\\frac{%1}{%2}")
- until n == 0
- -- todo: autoparenthesis
- -- int(a,b,c)
- for k, v in next, list_2_1 do
- repeat str, n = gsub(str,k,v) until n == 0
- end
- -- int(a,b)
- for k, v in next, list_2_2 do
- repeat str, n = gsub(str,k,v) until n == 0
- end
- -- int(a)
- for k, v in next, list_2_3 do
- repeat str, n = gsub(str,k,v) until n == 0
- end
- -- sin(x) => {\\sin(x)}
- for k, v in next, list_1_1 do
- repeat str, n = gsub(str,k,v) until n == 0
- end
- -- mean
- str = nsub(str, "mean", "\\OVERLINE{", "}")
- -- (1+x)/(1+x) => \\FRAC{1+x}{1+x}
- repeat
- str, n = gsub(str,"(%b())/(%b())", function(a,b)
- return "\\FRAC{" .. sub(a,2,-2) .. "}{" .. sub(b,2,-2) .. "}"
- end )
- until n == 0
- -- (1+x)/x => \\FRAC{1+x}{x}
- repeat
- str, n = gsub(str,"(%b())/([%+%-]?[%.%d%w]+)", function(a,b)
- return "\\FRAC{" .. sub(a,2,-2) .. "}{" .. b .. "}"
- end )
- until n == 0
- -- 1/(1+x) => \\FRAC{1}{1+x}
- repeat
- str, n = gsub(str,"([%.%d%w]+)/(%b())", function(a,b)
- return "\\FRAC{" .. a .. "}{" .. sub(b,2,-2) .. "}"
- end )
- until n == 0
- -- 1/x => \\FRAC{1}{x}
- repeat
- str, n = gsub(str,"([%.%d%w]+)/([%+%-]?[%.%d%w]+)", "\\FRAC{%1}{%2}")
- until n == 0
- -- times
- str = gsub(str,"%*", " ")
- -- symbols -- we can use a table substitution here
- str = gsub(str,"([<>=][<>=]*)", symbols)
- -- functions
- str = nsub(str,"sqrt", "\\SQRT{", "}")
- str = nsub(str,"exp", "e^{", "}")
- str = nsub(str,"abs", "\\left|", "\\right|")
- -- d/D
- str = nsub(str,"D", "{\\FRAC{\\MBOX{d}}{\\MBOX{d}x}{(", ")}}")
- str = gsub(str,"D([xy])", "\\FRAC{{\\RM d}%1}{{\\RM d}x}")
- -- f/g
- for k,v in next, list_3 do -- todo : prepare k,v
- str = nsub(str,"D"..v,"{\\RM "..v.."}^{\\PRIME}(",")")
- str = nsub(str,v,"{\\RM "..v.."}(",")")
- end
- -- more symbols
- for k,v in next, list_4_1 do
- str = gsub(str,k,v)
- end
- -- parenthesis (optional)
- if mode == 2 then
- str = gsub(str,"%(", "\\left(")
- str = gsub(str,"%)", "\\right)")
- end
- -- csnames
- str = gsub(str,"(\\[A-Z]+)", lower)
- -- report
- return str
-end
-
-calcmath.totex = totex
-
-function calcmath.tex(str,mode)
- context(totex(str))
-end
-
-function calcmath.xml(id,mode)
- context(totex(lxml.id(id).dt[1],mode))
-end
-
--- work in progress ... lpeg variant
-
-if false then
-
- -- todo:
-
- -- maybe rewrite to current lpeg, i.e. string replacement and no Cc's
-
- -- table approach we have now is less efficient but more flexible
-
- -- D \frac {\rm d} {{\rm d}x}
- -- Dx Dy \frac {{\rm d}y} {{\rm d}x}
- -- Df Dg {\rm f}^{\prime}
- -- f() g() {\rm f}()
-
- -- valid utf8
-
- local S, P, R, C, V, Cc, Ct = lpeg.S, lpeg.P, lpeg.R, lpeg.C, lpeg.V, lpeg.Cc, lpeg.Ct
-
- local space = S(" \n\r\t")^0
- local integer = P("-")^-1 * R("09")^1
- local realpart = P("-")^-1 * R("09")^1 * S(".")^1 * R("09")^1
- local number = Cc("number") * C(integer) * space
- local real = Cc("real") * C(realpart) * space
- local float = Cc("float") * C(realpart) * lpeg.P("E") * lpeg.C(integer) * space
- local identifier = Cc("identifier") * C(R("az","AZ")) * space
- local compareop = Cc("compare") * C(P("<") + P("=") + P(">") + P(">=") + P("<=") + P("&gt;") + P("&lt;")) * space
- local factorop = Cc("factor") * C(S("+-^_,")) * space
- local termop = Cc("term") * C(S("*/")) * space
- local constant = Cc("constant") * C(P("pi") + lpeg.P("inf")) * space
- local functionop = Cc("function") * C(R("az")^1) * space
- local open = P("(") * space
- local close = P(")") * space
-
- local grammar = P {
- "expression",
- expression = Ct(V("factor") * ((factorop+compareop) * V("factor"))^0),
- factor = Ct(V("term") * (termop * V("term"))^0),
- term = Ct(
- float + real + number +
- (open * V("expression") * close) +
- (functionop * open * (V("expression") * (P(",") * V("expression"))^0) * close) +
- (functionop * V("term")) +
- constant + identifier
- ),
- }
-
- local parser = space * grammar * -1
-
- local function has_factor(t)
- for i=1,#t do
- if t[i] == "factor" then
- return true
- end
- end
- end
-
- -- can be sped up if needed ...
-
- function totex(t)
- if t then
- local one = t[1]
- if type(one) == "string" then
- local two, three = t[2], t[3]
- if one == "number" then
- context(two)
- elseif one == "real" then
- context(two)
- elseif one == "float" then
- context("\\scinot{",two,"}{",three,"}")
- elseif one == "identifier" then
- context(two)
- elseif one == "constant" then
- context("\\"..two)
- elseif one == "function" then
- if two == "sqrt" then
- context("\\sqrt{")
- totex(three)
- context("}")
- elseif two == "exp" then
- context(" e^{")
- totex(three)
- context("}")
- elseif two == "abs" then
- context("\\left|")
- totex(three)
- context("\\right|")
- elseif two == "mean" then
- context("\\overline{")
- totex(three)
- context("}")
- elseif two == "int" or two == "prod" or two == "sum" then
- local four, five = t[4], t[5]
- if five then
- context("\\"..two.."^{") -- context[two]("{")
- totex(three)
- context("}_{")
- totex(four)
- context("}")
- totex(five)
- elseif four then
- context("\\"..two.."^{")
- totex(three)
- context("}")
- totex(four)
- elseif three then
- context("\\"..two.." ") -- " " not needed
- totex(three)
- else
- context("\\"..two)
- end
- else
- context("\\"..two.."(")
- totex(three)
- context(")")
- end
- end
- else
- local nt = #t
- local hasfactor = has_factor(t)
- if hasfactor then
- context("\\left(")
- end
- totex(one)
- for i=2,nt,3 do
- local what, how, rest = t[i], t[i+1], t[i+2]
- if what == "factor" then
- if how == '^' or how == "_" then
- context(how)
- context("{")
- totex(rest)
- context("}")
- else
- context(how)
- totex(rest)
- end
- elseif what == "term" then
- if how == '/' then
- context("\\frac{")
- totex(rest)
- context("}{")
- totex(t[i+3] or "")
- context("}")
- elseif how == '*' then
- context("\\times")
- totex(rest)
- else
- context(how)
- totex(three)
- end
- elseif what == "compare" then
- if two == ">=" then
- context("\\ge")
- elseif two == "<=" then
- context("\\le")
- elseif two == "&gt;" then
- context(">")
- elseif two == "&lt;" then
- context("<")
- end
- totex(three)
- end
- end
- if hasfactor then
- context("\\right)")
- end
- end
- end
- end
-
- calcmath = { }
-
- function calcmath.parse(str)
- return lpegmatch(parser,str)
- end
-
- function calcmath.tex(str)
- str = totex(lpegmatch(parser,str))
- return (str == "" and "[error]") or str
- end
-
-end
diff --git a/Master/texmf-dist/tex/context/base/x-calcmath.mkii b/Master/texmf-dist/tex/context/base/x-calcmath.mkii
deleted file mode 100644
index a649aa64878..00000000000
--- a/Master/texmf-dist/tex/context/base/x-calcmath.mkii
+++ /dev/null
@@ -1,24 +0,0 @@
-%D \module
-%D [ file=m-calcmath,
-%D version=2006.04.24, % 1999.11.06,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Calculator Math,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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
-
-\writestatus{calcmath}{this is not supported in mkii}
-
-\let\inlinecalcmath \inlinemathematics
-\def\displaycalcmath \displaymathematics
-\let\calcmath \inlinecalcmath
-\let\icm \inlinecalcmath
-\let\dcm \displaycalcmath
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/x-calcmath.mkiv b/Master/texmf-dist/tex/context/base/x-calcmath.mkiv
deleted file mode 100644
index dda88bb3ee5..00000000000
--- a/Master/texmf-dist/tex/context/base/x-calcmath.mkiv
+++ /dev/null
@@ -1,80 +0,0 @@
-%D \module
-%D [ file=m-calcmath,
-%D version=2006.04.24, % 1999.11.06,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Calculator Math,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Lua code.
-
-\registerctxluafile{x-calcmath}{}
-
-\def\ctxmodulecalcmath#1{\ctxlua{moduledata.calcmath.#1}}
-
-%D Interface:
-
-\unprotect
-
-\unexpanded\def\inlinecalcmath #1{\mathematics{\ctxmodulecalcmath{tex("#1",1)}}}
-\unexpanded\def\displaycalcmath#1{\startformula\ctxmodulecalcmath{tex("#1",2)}\stopformula}
-
-\let\calcmath\inlinecalcmath
-
-\let\icm\inlinecalcmath
-\let\dcm\displaycalcmath
-
-\startxmlsetups xml:cam:define
- \xmlsetsetup {\xmldocument} {cam:*} {*}
- \xmlsetsetup {\xmldocument} {(icm|dcm)} {cam:*}
-\stopxmlsetups
-
-\xmlregisterns{cam}{calcmath}
-
-\xmlregistersetup{xml:cam:define}
-
-% tex -> lua -> tex -> lua -> tex
-% \mathematics{\ctxmodulecalcmath{xml(\!!bs\xmlflush{#1}\!!es,1)}}
-% tex -> lua -> tex
-% \mathematics{\ctxmodulecalcmath{xml("#1",1)}}%
-
-\startxmlsetups cam:i
- \mathematics{\ctxmodulecalcmath{xml("#1",1)}}%
-\stopxmlsetups
-
-\startxmlsetups cam:d
- \startformula\ctxmodulecalcmath{xml("#1",2)}\stopformula
-\stopxmlsetups
-
-\startxmlsetups cam:icm
- \mathematics{\ctxmodulecalcmath{xml("#1",1)}}
-\stopxmlsetups
-
-\startxmlsetups cam:dcm
- \startformula\ctxmodulecalcmath{xml("#1",2)}\stopformula
-\stopxmlsetups
-
-\protect \endinput
-
-\starttext
-
-% \calcmath{sin(x) + x^2 + x^(1+x) + 1/x^2 + mean(x+mean(y))}
-% \calcmath{int(a,b,c)}
-% \calcmath{(1+x)/(1+x) + (1+x)/(1+(1+x)/(1+x))}
-% \calcmath{10E-2}
-% \calcmath{(1+x)/x}
-% \calcmath{(1+x)/12}
-% \calcmath{(1+x)/-12}
-% \calcmath{1/-12}
-% \calcmath{12x/(1+x)}
-% \calcmath{exp(x+exp(x+1))}
-% \calcmath{abs(x+abs(x+1)) + pi + inf}
-% \calcmath{Dx Dy}
-% \calcmath{D(x+D(y))}
-% \calcmath{Df(x)}
-% \calcmath{g(x)}
diff --git a/Master/texmf-dist/tex/context/base/x-cals.lua b/Master/texmf-dist/tex/context/base/x-cals.lua
deleted file mode 100644
index 3af6106d803..00000000000
--- a/Master/texmf-dist/tex/context/base/x-cals.lua
+++ /dev/null
@@ -1,221 +0,0 @@
-if not modules then modules = { } end modules ['x-cals'] = {
- version = 1.001,
- comment = "companion to x-cals.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local next = next
-local format, lower = string.format, string.lower
-local xmlsprint, xmlcprint, xmlcollected, xmlelements = xml.sprint, xml.cprint, xml.collected, xml.elements
-local n_todimen, s_todimen = number.todimen, string.todimen
-
--- there is room for speedups as well as cleanup (using context functions)
-
-local cals = { }
-moduledata.cals = cals
-lxml.mathml = cals -- for the moment
-
-cals.ignore_widths = false
-cals.shrink_widths = false
-cals.stretch_widths = false
-
--- the following flags only apply to columns that have a specified width
---
--- proportional : shrink or stretch proportionally to the width
--- equal : shrink or stretch equaly distributed
--- n < 1 : shrink or stretch proportionally to the width but multiplied by n
---
--- more clever things, e.g. the same but applied to unspecified widths
--- has to happen at the core-ntb level (todo)
-
-local halignments = {
- left = "flushleft",
- right = "flushright",
- center = "middle",
- centre = "middle",
- justify = "normal",
-}
-
-local valignments = {
- top = "high",
- bottom = "low",
- middle = "lohi",
-}
-
-local function adapt(widths,b,w,delta,sum,n,what)
- if b == "equal" then
- delta = delta/n
- for k, v in next, w do
- widths[k] = n_todimen(v - delta)
- end
- elseif b == "proportional" then
- delta = delta/sum
- for k, v in next, w do
- widths[k] = n_todimen(v - v*delta)
- end
- elseif type(b) == "number" and b < 1 then
- delta = b*delta/sum
- for k, v in next, w do
- widths[k] = n_todimen(v - v*delta)
- end
- end
-end
-
-local function getspecs(root, pattern, names, widths)
- -- here, but actually we need this in core-ntb.tex
- -- but ideally we need an mkiv enhanced core-ntb.tex
- local ignore_widths = cals.ignore_widths
--- local shrink_widths = at.option == "shrink" or cals.shrink_widths
--- local stretch_widths = at.option == "stretch" or cals.stretch_widths
- local shrink_widths = cals.shrink_widths
- local stretch_widths = cals.stretch_widths
- for e in xmlcollected(root,pattern) do
- local at = e.at
- local column = at.colnum
- if column then
- if not ignore_widths then
- local width = at.colwidth
- if width then
- widths[tonumber(column)] = lower(width)
- end
- end
- local name = at.colname
- if name then
- names[name] = tonumber(column)
- end
- end
- end
- if ignore_width then
- -- forget about it
- elseif shrink_widths or stretch_widths then
- local sum, n, w = 0, 0, { }
- for _, v in next, widths do
- n = n + 1
- v = (type(v) == "string" and s_todimen(v)) or v
- if v then
- w[n] = v
- sum = sum + v
- end
- end
- local hsize = tex.hsize
- if type(hsize) == "string" then
- hsize = s_todimen(hsize)
- end
- local delta = sum - hsize
- if shrink_widths and delta > 0 then
- adapt(widths,shrink_widths,w,delta,sum,n,"shrink")
- elseif stretch_widths and delta < 0 then
- adapt(widths,stretch_widths,w,delta,sum,n,"stretch")
- end
- end
-end
-
-local function getspans(root, pattern, names, spans)
- for e in xmlcollected(root,pattern) do
- local at = e.at
- local name, namest, nameend = at.colname, names[at.namest or "?"], names[at.nameend or "?"]
- if name and namest and nameend then
- spans[name] = tonumber(nameend) - tonumber(namest) + 1
- end
- end
-end
-
-local bTR, eTR, bTD, eTD = context.bTR, context.eTR, context.bTD, context.eTD
-
-function cals.table(root,namespace)
-
- local prefix = (namespace or "cals") .. ":"
-
- local prefix = namespace and namespace ~= "" and (namespace .. ":") or ""
- local p = "/" .. prefix
-
- local tgroupspec = p .. "tgroup"
- local colspec = p .. "colspec"
- local spanspec = p .. "spanspec"
- local hcolspec = p .. "thead" .. p .. "colspec"
- local bcolspec = p .. "tbody" .. p .. "colspec"
- local fcolspec = p .. "tfoot" .. p .. "colspec"
- local entryspec = p .. "entry" .. "|" .. prefix .. "entrytbl" -- shouldn't that be p ?
- local hrowspec = p .. "thead" .. p .. "row"
- local browspec = p .. "tbody" .. p .. "row"
- local frowspec = p .. "tfoot" .. p .. "row"
-
- local function tablepart(root, xcolspec, xrowspec, before, after) -- move this one outside
- before()
- local at = root.at
- local pphalign, ppvalign = at.align, at.valign
- local names, widths, spans = { }, { }, { }
- getspecs(root, colspec , names, widths)
- getspecs(root, xcolspec, names, widths)
- getspans(root, spanspec, names, spans)
- for r, d, k in xmlelements(root,xrowspec) do
- bTR()
- local dk = d[k]
- local at = dk.at
- local phalign, pvalign = at.align or pphalign, at.valign or ppvalign -- todo: __p__ test
- local col = 1
- for rr, dd, kk in xmlelements(dk,entryspec) do
- local dk = dd[kk]
- if dk.tg == "entrytbl" then
- -- bTD(function() cals.table(dk) end)
- bTD()
- context("{")
- cals.table(dk)
- context("}")
- eTD()
- col = col + 1
- else
- local at = dk.at
- local b, e, s, m = names[at.namest or "?"], names[at.nameend or "?"], spans[at.spanname or "?"], at.morerows
- local halign, valign = at.align or phalign, at.valign or pvalign
- if b and e then
- s = e - b + 1
- end
- if halign then
- halign = halignments[halign]
- end
- if valign then
- valign = valignments[valign]
- end
- local width = widths[col]
- if s or m or halign or valign or width then -- currently only english interface !
- bTD {
- nx = s or 1,
- ny = (m or 0) + 1,
- align = format("{%s,%s}",halign or "flushleft",valign or "high"),
- width = width or "fit",
- }
- else
- bTD {
- align = "{flushleft,high}",
- width = "fit", -- else problems with vertical material
- }
- end
- xmlcprint(dk)
- eTD()
- col = col + (s or 1)
- end
- end
- eTR()
- end
- after()
- end
-
- for tgroup in lxml.collected(root,tgroupspec) do
- context.directsetup("cals:table:before")
- lxml.directives.before(root,"cdx") -- "cals:table"
- context.bgroup()
- lxml.directives.setup(root,"cdx") -- "cals:table"
- context.bTABLE()
- tablepart(tgroup, hcolspec, hrowspec, context.bTABLEhead, context.eTABLEhead)
- tablepart(tgroup, bcolspec, browspec, context.bTABLEbody, context.eTABLEbody)
- tablepart(tgroup, fcolspec, frowspec, context.bTABLEfoot, context.eTABLEfoot)
- context.eTABLE()
- context.egroup()
- lxml.directives.after(root,"cdx") -- "cals:table"
- context.directsetup("cals:table:after")
- end
-
-end
diff --git a/Master/texmf-dist/tex/context/base/x-cals.mkiv b/Master/texmf-dist/tex/context/base/x-cals.mkiv
deleted file mode 100644
index 31ba2d213a9..00000000000
--- a/Master/texmf-dist/tex/context/base/x-cals.mkiv
+++ /dev/null
@@ -1,45 +0,0 @@
-%D \module
-%D [ file=x-cals,
-%D version=2007.09.05,
-%D title=\CONTEXT\ XML Modules,
-%D subtitle=Cals table renderer,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 XML Macros / Cals Tables}
-
-\startmodule [cals]
-
-\registerctxluafile{x-cals}{}
-
-% \startxmlsetups xml:cals:process
-% \xmlsetsetup {#1} {cals:table} {*}
-% \stopxmlsetups
-% \startxmlsetups cals:table
-% \ctxlua{moduledata.cals.table("#1")}
-% \stopxmlsetups
-% \xmlregistersetup{xml:cals:process}
-
-\startxmlsetups xml:cals:process
-% \xmlsetfunction {\xmldocument} {cals:table} {moduledata.cals.table}
- \xmlsetfunction {#1} {cals:table} {moduledata.cals.table}
-\stopxmlsetups
-
-\startxmlsetups xml:cals:nonamespace
-% \xmlsetfunction {\xmldocument} {table} {moduledata.cals.table}
- \xmlsetfunction {#1} {table} {moduledata.cals.table}
-\stopxmlsetups
-
-\xmlregistersetup{xml:cals:process}
-
-\xmlregisterns{cals}{cals}
-
-%D One can register the nonamespace variant for cases where the cals
-%D model is embedded in the parent DTD.
-
-\stopmodule
diff --git a/Master/texmf-dist/tex/context/base/x-chemml.lua b/Master/texmf-dist/tex/context/base/x-chemml.lua
deleted file mode 100644
index 79c1d9525ce..00000000000
--- a/Master/texmf-dist/tex/context/base/x-chemml.lua
+++ /dev/null
@@ -1,51 +0,0 @@
-if not modules then modules = { } end modules ['x-chemml'] = {
- version = 1.001,
- comment = "companion to x-chemml.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
--- not yet acceptable cld
-
-local format, lower, upper, gsub, sub, match = string.format, string.lower, string.upper, string.gsub, string.sub, string.match
-local concat = table.concat
-
-local chemml = { }
-local moduledata = moduledata or { }
-moduledata.chemml = chemml
-
-function chemml.pi(id)
- local str = xml.content(lxml.id(id))
- local _, class, key, value = match(str,"^(%S+)%s+(%S+)%s+(%S+)%s+(%S+)%s*$")
- if key and value then
- context("\\setupCMLappearance[%s][%s=%s]",class, key, value)
- end
-end
-
-function chemml.do_graphic(id)
- local t = { }
- for r, d, k in xml.elements(lxml.id(id),"cml:graphic") do
- t[#t+1] = xml.tostring(d[k].dt)
- end
- context(concat(t,","))
-end
-
-function chemml.no_graphic(id)
- local t = { }
- for r, d, k in xml.elements(lxml.id(id),"cml:text|cml:oxidation|cml:annotation") do
- local dk = d[k]
- if dk.tg == "oxidation" then
- t[#t+1] = format("\\chemicaloxidation{%s}{%s}{%s}",r.at.sign or "",r.at.n or 1,xml.tostring(dk.dt))
- elseif dk.tg == "annotation" then
- local location = r.at.location or "r"
- local caption = xml.content(xml.first(dk,"cml:caption"))
- local text = xml.content(xml.first(dk,"cml:text"))
- t[#t+1] = format("\\doCMLannotation{%s}{%s}{%s}",location,caption,text)
- else
- t[#t+1] = xml.tostring(dk.dt) or ""
- end
- end
- context(concat(t,","))
-end
-
diff --git a/Master/texmf-dist/tex/context/base/x-chemml.mkii b/Master/texmf-dist/tex/context/base/x-chemml.mkii
deleted file mode 100644
index 08d64e54b80..00000000000
--- a/Master/texmf-dist/tex/context/base/x-chemml.mkii
+++ /dev/null
@@ -1,212 +0,0 @@
-%D \module
-%D [ file=m-chemml,
-%D version=2001.09.12,
-%D title=\CONTEXT\ XML Modules,
-%D subtitle=Loading CHEMML Filters,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\useXMLfilter[cml]
-
-%D Structural formulas are codes in a \PPCHTEX\ way; this
-%D will change -)
-%D
-%D \startbuffer
-%D <dchem>
-%D <structure>
-%D <component>
-%D <graphic>SIX,B</graphic>
-%D <graphic>R135</graphic>
-%D </component>
-%D <component>
-%D <graphic>R246</graphic>
-%D </component>
-%D <component>
-%D <graphic>RZ</graphic>
-%D <text>A,B,C,D,E,F</text>
-%D </component>
-%D <component>
-%D <graphic>Z</graphic>
-%D <oxidation n="3">A</oxidation>
-%D <text>A</text>
-%D <annotation location="t">
-%D <text>B</text>
-%D <caption>x<context:b>x<context:compound token="*"/>x</context:b>x</caption>
-%D </annotation>
-%D <oxidation n="3" sign="+">B</oxidation>
-%D <text>C,D,E,F</text>
-%D </component>
-%D </structure>
-%D <structure>
-%D <component>
-%D <graphic>SIX,B</graphic>
-%D <graphic>r135</graphic>
-%D </component>
-%D <component>
-%D <graphic>R246</graphic>
-%D </component>
-%D <component>
-%D <graphic>RZ</graphic>
-%D <text>A,B,C,D,E,F</text>
-%D </component>
-%D </structure>
-%D </dchem>
-%D \stopbuffer
-%D
-%D \typebuffer
-
-% \ifx\XMLgtoks\undefined \newtoks\XMLgtoks \fi
-% \ifx\XMLttoks\undefined \newtoks\XMLttoks \fi
-%
-% \defineXMLenvironment [structure]
-% {\startchemical\ignorespaces}
-% {\relax\stopchemical}
-%
-% \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
-% \defineXMLargument[graphic]\chemicalXMLg
-% \defineXMLargument[text]\chemicalXMLt
-% \ignorespaces}
-% {\expanded{\chemical[\the\XMLgtoks][\the\XMLttoks]}%
-% \ignorespaces}
-%
-% \defineXMLargument [oxidation] [sign=,n=1] \chemicalXMLo % +/- 1..7
-%
-% \def\chemicalXMLo#1%
-% {\expanded{\chemicalXMLt
-% {\noexpand\chemicaloxidation{\XMLop{sign}}{\XMLop{n}}{#1}}}%
-% \ignorespaces}
-%
-% \defineXMLenvironment [annotation] [location=]
-% {\bgroup
-% \defineXMLenvironmentsave[text]{\ignorespaces}{\ignorespaces}%
-% \defineXMLenvironmentsave[caption]{\ignorespaces}{\ignorespaces}%
-% \ignorespaces}
-% {\scratchtoks{\chemicalright}%
-% \processaction
-% [\XMLop{location}]
-% [ t=>\scratchtoks{\chemicaltop},
-% b=>\scratchtoks{\chemicalbottom},
-% l=>\scratchtoks{\chemicalleft},
-% r=>\scratchtoks{\chemicalright},
-% lc=>\scratchtoks{\chemicalleftcentered},
-% rc=>\scratchtoks{\chemicalrightcentered},
-% tl=>\scratchtoks{\chemicaltopleft},
-% bl=>\scratchtoks{\chemicalbottomleft},
-% tr=>\scratchtoks{\chemicaltopright},
-% br=>\scratchtoks{\chemicalbottomright},
-% lt=>\scratchtoks{\chemicallefttop},
-% lb=>\scratchtoks{\chemicalleftbottom},
-% rt=>\scratchtoks{\chemicalrighttop},
-% rb=>\scratchtoks{\chemicalrightbottom},
-% x=>\scratchtoks{\chemicaltighttext},
-% sl=>\scratchtoks{\chemicalsmashedleft},
-% sm=>\scratchtoks{\chemicalsmashedmiddle},
-% sr=>\scratchtoks{\chemicalsmashedright}]%
-% \expanded{\chemicalXMLt
-% {\the\scratchtoks{\XMLflush{text}}{\XMLflush{caption}}}}%
-% \egroup
-% \ignorespaces}
-%
-% \defineXMLenvironment [forever]
-% {\chemicalXMLt{\[}\ignorespaces}
-% {\chemicalXMLt{\]}\ignorespaces}
-
-\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
-
-\installXMLunknownremapping
-
-% extensions
-
-\remapXMLsequence [structure] [CPA] \doCMLstructure
-\remapXMLsequence [component] [CPA] \doCMLcomponent
-\remapXMLsequence [graphic] [CPA] \doCMLgraphic
-\remapXMLsequence [text] [CPA] \doCMLtext
-
-\remapXMLsequence [caption] [CPA] \doCMLcaption
-\remapXMLsequence [oxidation] [CPA] \doCMLoxidation
-\remapXMLsequence [annotation][CPA] \doCMLannotation
-\remapXMLsequence [forever] [CPA] \doCMLforever
-
-\def\doCMLstructure#1#2%
- {\startchemical\ignorespaces#2\unskip\stopchemical}
-
-\def\doCMLgraphic#1#2%
- {\doifelsenothing{\the\XMLgtoks}
- {\uppercase{\doglobal\appendtoks #2\to\XMLgtoks\ignorespaces}}
- {\uppercase{\doglobal\appendtoks,#2\to\XMLgtoks\ignorespaces}}%
- \ignorespaces}
-
-\def\doCMLtext#1#2%
- {\doifelsenothing{\the\XMLttoks}
- {\doglobal\appendtoks #2\to\XMLttoks\ignorespaces}
- {\doglobal\appendtoks,#2\to\XMLttoks\ignorespaces}%
- \ignorespaces}
-
-\def\doCMLcomponent#1#2%
- {\global\XMLgtoks\emptytoks
- \global\XMLttoks\emptytoks
- \ignorespaces#2\unskip
- \expanded{\chemical[\the\XMLgtoks][\the\XMLttoks]}%
- \ignorespaces}
-
-\def\doCMLannotation#1#2%
- {\getXMLarguments{cml}{location="" #1}%
- \def\dodoCMLannotation##1%
- {\doCMLtext\empty{##1%
- {\let\doCMLtext \secondoftwoarguments\processXMLRchild{text}{#2}}%
- {\let\doCMLcaption\unmapXMLdata \processXMLRchild{caption}{#2}}}}%
- \processaction
- [\XMLpar{cml}{location}{r}]
- [ t=>\dodoCMLannotation\chemicaltop,
- b=>\dodoCMLannotation\chemicalbottom,
- l=>\dodoCMLannotation\chemicalleft,
- r=>\dodoCMLannotation\chemicalright,
- lc=>\dodoCMLannotation\chemicalleftcentered,
- rc=>\dodoCMLannotation\chemicalrightcentered,
- tl=>\dodoCMLannotation\chemicaltopleft,
- bl=>\dodoCMLannotation\chemicalbottomleft,
- tr=>\dodoCMLannotation\chemicaltopright,
- br=>\dodoCMLannotation\chemicalbottomright,
- lt=>\dodoCMLannotation\chemicallefttop,
- lb=>\dodoCMLannotation\chemicalleftbottom,
- rt=>\dodoCMLannotation\chemicalrighttop,
- rb=>\dodoCMLannotation\chemicalrightbottom,
- x=>\dodoCMLannotation\chemicaltighttext,
- sl=>\dodoCMLannotation\chemicalsmashedleft,
- sm=>\dodoCMLannotation\chemicalsmashedmiddle,
- sr=>\dodoCMLannotation\chemicalsmashedright]%
- \ignorespaces}
-
-\def\doCMLoxidation#1#2%
- {\getXMLarguments{cml}{sign="" n="1" #1}%
- \expanded{\doCMLtext{}%
- {\noexpand\chemicaloxidation{\XMLpar{cml}{sign}{}}{\XMLpar{cml}{n}{}}{#2}}}%
- \ignorespaces}
-
-\def\doCMLforever#1#2{\[#2\]}
-
-\stopXMLmapping
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-chemml.mkiv b/Master/texmf-dist/tex/context/base/x-chemml.mkiv
deleted file mode 100644
index bb9065921c7..00000000000
--- a/Master/texmf-dist/tex/context/base/x-chemml.mkiv
+++ /dev/null
@@ -1,228 +0,0 @@
-%D \module
-%D [ file=x-cml,
-%D version=2007.09.03, % reimplementation
-%D title=\CONTEXT\ XML Modules,
-%D subtitle=MkIV ChemML renderer,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% This needs an update!
-
-\writestatus{loading}{ConTeXt XML Macros / Chemistry}
-
-\registerctxluafile{x-chemml}{}
-
-\def\ctxmodulechemml#1{\ctxlua{moduledata.chemml.#1}}
-
-%D The following code assumes a load||flush approach to \XML.
-
-\unprotect
-
-\startxmlsetups xml:cml:process
- \xmlstrip {#1} {cml:chem|cml:ichem|cml:dchem|cml:reaction|cml:molecule|cml:ion|cml:structure}
-
- \xmlgrab {#1} {cml:*} {cml:*}
- \xmlgrab {#1} {cml:gives|cml:equilibrium|cml:mesomeric} {cml:arrow}
- \xmlgrab {#1} {cml:plus|cml:minus|cml:equal} {cml:operator}
- \xmlgrab {#1} {cml:bond|cml:singlebond|cml:doublebound|cml:triplebond} {cml:bond}
-
- \xmlgrab {#1} {pi::chemml} {cml:pi}
-\stopxmlsetups
-
-\xmlregistersetup{xml:cml:process}
-
-\xmlregisterns{cml}{chemml}
-
-\unexpanded\def\setupCMLappearance[#1]{\dodoubleargument\getparameters[@@CML#1]} % old stuff
-
-\setupCMLappearance [ion] [\c!alternative=\v!a]
-
-\def\doifelseCMLvariable#1#2#3% id key value
- {\doifelse{\xmlatt{#1}{#2}}{#3}
- \firstoftwoarguments
- {\doifelse{\getvalue{@@CML\xmltag{#1}#2}}{#3}
- \firstoftwoarguments
- \secondoftwoarguments}}
-
-\startxmlsetups cml:pi
- \ctxmodulechemml{pi(#1)}
-\stopxmlsetups
-
-\startxmlsetups cml:chem
- \automathematics{\xmlflush{#1}}
-\stopxmlsetups
-\startxmlsetups cml:ichem
- \inlinemathematics{\xmlflush{#1}}
-\stopxmlsetups
-\startxmlsetups cml:dchem
- \displaymathematics{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups cml:reaction
- \xmlflush{#1}
-\stopxmlsetups
-
-\unexpanded\def\doCMLtext#1#2#3% main top bot
- {\setbox0\hbox{\doifsomething{#2}{\txx\setstrut\strut\ignorespaces#2\unskip}}%
- \setbox2\hbox{\ignorespaces\strut#1\unskip}%
- \setbox4\hbox{\doifsomething{#3}{\txx\setstrut\strut\ignorespaces#3\unskip}}%
- \scratchdimen=\wd2\advance\scratchdimen-.5em
- \ifdim\wd0>\scratchdimen
- \setbox0\hbox spread .5em{\hss\box0\hss}%
- \fi
- \ifdim\wd4>\scratchdimen
- \setbox4\hbox spread .5em{\hss\box4\hss}%
- \fi
- \setbox6=\vbox
- {\offinterlineskip\halign{\hss##\hss\cr\copy0\cr\copy2\cr\copy4\cr}}%
- \hbox{\lower\ht4\hbox{\lower\dp2\box6}}}
-
-\def\doCMLamount#1%
- {\scratchcounter0\xmlatt{#1}{n}\relax
- \ifnum\scratchcounter>0 \number\scratchcounter \fi}
-
-\startxmlsetups cml:molecule
- \doCMLtext
- {\doCMLamount{#1}
- \xmlall{#1}{cml:atom|cml:bond|cml:singlebond|cml:doublebond|cml:triplebond}}
- {\xmlindex{#1}{cml:caption}{2}}
- {\xmlindex{#1}{cml:caption}{1}}
-\stopxmlsetups
-
-\startxmlsetups cml:atom
- \doCMLtext {
- \lohi {
- $\tfxx\xmlatt{#1}{protons}$
- } {
- $\tfxx\xmlatt{#1}{weight}$
- }
- \xmlflush{#1}
- \lohi {
- $\tfxx\xmlatt{#1}{n}$
- } {
- $\tfxx\xmlatt{#1}{charge}$%
- }
- }
- {\xmlindex{#1}{cml:caption}{2}}
- {\xmlindex{#1}{cml:caption}{1}}
-\stopxmlsetups
-
-\startxmlsetups cml:ion
- \doifelseCMLvariable{#1}{alternative}{b} {
- \left[
- \doCMLtext
- {\doCMLamount{#1}
- \xmlall{#1}{cml:atom}}
- {\xmlindex{#1}{cml:caption}{2}}
- {\xmlindex{#1}{cml:caption}{1}}
- \right]
- } {
- \doCMLtext
- {\doCMLamount{#1}
- \xmlall{#1}{cml:atom}}
- {\xmlindex{#1}{cml:caption}{2}}
- {\xmlindex{#1}{cml:caption}{1}}
- }
- \high {\xmlatt{#1}{charge}}
-\stopxmlsetups
-
-\def\doCMLgives {\xrightarrow}
-\def\doCMLequilibrium{\xleftrightarrow}
-\def\doCMLmesomeric {\xrightoverleftarrow}
-\def\doCMLplus {+}
-\def\doCMLminus {-}
-\def\doCMLequal {=}
-
-\startxmlsetups cml:arrow
- \quad
- \executeifdefined{doCML\xmlname{#1}}\doCMLgives{\tf\xmlindex{#1}{cml:caption}{2}}{\tf\xmlindex{#1}{cml:caption}{1}}
- \quad
-\stopxmlsetups
-
-\startxmlsetups cml:operator
- \quad
- \mathop{\executeifdefined{doCML\xmlname{#1}}\doCMLplus}
- \quad
-\stopxmlsetups
-
-\startxmlsetups cml:bond
- \executeifdefined{doCML\xmlname{#1}} {
- \ifcase0\xmlatt{#1}{n}\relax
- \doCMLsinglebond
- \or
- \doCMLdoublebond
- \or
- \doCMLtriplebond
- \fi
- }
-\stopxmlsetups
-
-\def\doCMLbond
- {\hrule\s!width\hsize\s!height.1ex\relax}
-
-\def\dodoCMLbond#1#2#3%
- {\begingroup
- \setbox\scratchbox\hbox{$M$}%
- \vbox to \ht\scratchbox
- {\hsize\wd\scratchbox
- \vskip.1\wd\scratchbox
- #1\vfill#2\vfill#3%
- \vskip.1\wd\scratchbox}%
- \endgroup}
-
-\def\doCMLsinglebond{\dodoCMLbond\relax \doCMLbond\relax }
-\def\doCMLdoublebond{\dodoCMLbond\doCMLbond\relax \doCMLbond}
-\def\doCMLtriplebond{\dodoCMLbond\doCMLbond\doCMLbond\doCMLbond}
-
-\startxmlsetups cml:structure
- \startchemical
- \xmlall{#1}{cml:component}
- \stopchemical
-\stopxmlsetups
-
-% It makes not much sense to adapt ppchtex to accept different input. Maybe some day.
-
-\startxmlsetups cml:component
- \expanded {
- \chemical
- [\ctxmodulechemml{do_graphic("#1")}]
- [\ctxmodulechemml{no_graphic("#1")}]
- }
-\stopxmlsetups
-
-\unexpanded\def\doCMLannotation#1% #2#3% loc caption text
- {\xmlval{cml:a:l}{#1}{\chemicalright}}% {#2}{#3}}
-
-\xmlmapvalue {cml:a:l} {t} {\chemicaltop}
-\xmlmapvalue {cml:a:l} {b} {\chemicalbottom}
-\xmlmapvalue {cml:a:l} {l} {\chemicalleft}
-\xmlmapvalue {cml:a:l} {r} {\chemicalright}
-\xmlmapvalue {cml:a:l} {lc} {\chemicalleftcentered} % \xmlmapvalue {cml:a:l} {cl} {\chemicalleftcentered}
-\xmlmapvalue {cml:a:l} {rc} {\chemicalrightcentered} % \xmlmapvalue {cml:a:l} {cr} {\chemicalrightcentered}
-\xmlmapvalue {cml:a:l} {tl} {\chemicaltopleft} % \xmlmapvalue {cml:a:l} {lt} {\chemicaltopleft}
-\xmlmapvalue {cml:a:l} {bl} {\chemicalbottomleft} % \xmlmapvalue {cml:a:l} {lb} {\chemicalbottomleft}
-\xmlmapvalue {cml:a:l} {tr} {\chemicaltopright} % \xmlmapvalue {cml:a:l} {rt} {\chemicaltopright}
-\xmlmapvalue {cml:a:l} {br} {\chemicalbottomright} % \xmlmapvalue {cml:a:l} {rb} {\chemicalbottomright}
-\xmlmapvalue {cml:a:l} {lt} {\chemicallefttop} % \xmlmapvalue {cml:a:l} {tl} {\chemicallefttop}
-\xmlmapvalue {cml:a:l} {lb} {\chemicalleftbottom} % \xmlmapvalue {cml:a:l} {bl} {\chemicalleftbottom}
-\xmlmapvalue {cml:a:l} {rt} {\chemicalrighttop} % \xmlmapvalue {cml:a:l} {tr} {\chemicalrighttop}
-\xmlmapvalue {cml:a:l} {rb} {\chemicalrightbottom} % \xmlmapvalue {cml:a:l} {br} {\chemicalrightbottom}
-\xmlmapvalue {cml:a:l} {x} {\chemicaltighttext}
-\xmlmapvalue {cml:a:l} {sl} {\chemicalsmashedleft} % \xmlmapvalue {cml:a:l} {ls} {\chemicalsmashedleft}
-\xmlmapvalue {cml:a:l} {sm} {\chemicalsmashedmiddle} % \xmlmapvalue {cml:a:l} {ms} {\chemicalsmashedmiddle}
-\xmlmapvalue {cml:a:l} {sr} {\chemicalsmashedright} % \xmlmapvalue {cml:a:l} {rs} {\chemicalsmashedright}
-
-\startxmlsetups cml:forever
- \left[\xmlflush{#1}\right]
-\stopxmlsetups
-
-% \starttext
-% \xmlprocess{main}{cmltest.xml}{xml:process}
-% \stoptext
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/x-chemml.xsd b/Master/texmf-dist/tex/context/base/x-chemml.xsd
deleted file mode 100644
index b511219115c..00000000000
--- a/Master/texmf-dist/tex/context/base/x-chemml.xsd
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0"?>
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
-<xsd:annotation>
- <xsd:documentation xml:lang="en">
- <p>This schema covers (basic presentational) Chemical
- markup. We will extend this schema with names and
- predefined components.</p>
- <p>author: Hans Hagen, copyright: PRAGMA-ADE / Hasselt NL</p>
- </xsd:documentation>
-</xsd:annotation>
-
-<xsd:element type="chemType">
- <xsd:sequence>
- <xsd:element ref="chemicalComponentType" />
- <xsd:choice>
- <xsd:element ref="chemicalActionType" />
- <xsd:element ref="chemicalBondType" />
- </xsd:choice>
- </xsd:sequence>
-</xsd:element>
-
-<xsd:element name="chem" type="chemType" />
-<xsd:element name="ichem" type="chemType" />
-<xsd:element name="dchem" type="chemType" />
-
-<xsd:element name="molecule">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:choice>
- <xsd:element name="ion" />
- <xsd:element name="atom" />
- </xsd:choice>
- <xsd:element name="caption" type="chemicalCaptionType" />
- </xsd:sequence>
- <xsd:attribute name="n" type="xsd:positiveInteger" />
- </xsd:complexType>
-</xsd:element>
-
-<xsd:element name="ion">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="atom" />
- </xsd:sequence>
- <xsd:attribute name="n" type="xsd:positiveInteger" />
- <xsd:attribute name="charge" type="xsd:integer" />
- </xsd:complexType>
-</xsd:element>
-
-<xsd:element name="atom" type="xsd:string">
- <xsd:complexType>
- <xsd:attribute name="n" type="xsd:positiveInteger"/>
- <xsd:attribute name="charge" type="xsd:integer" />
- <xsd:attribute name="protons" type="xsd:positiveInteger" />
- <xsd:attribute name="weight" type="xsd:positiveInteger" />
- </xsd:complexType>
-</xsd:element>
-
-<xsd:complexType name="chemicalActionType">
- <xsd:choice>
- <xsd:element name="plus" type="chemicalCaptionType" />
- <xsd:element name="minus" type="chemicalCaptionType" />
- <xsd:element name="equal" type="chemicalCaptionType" />
- <xsd:element name="gives" type="chemicalCaptionType" />
- <xsd:element name="equilibrium" type="chemicalCaptionType" />
- <xsd:element name="mesomeric" type="chemicalCaptionType" />
- </xsd:choice>
-</xsd:complexType>
-
-<xsd:complexType name="chemicalBondType">
- <xsd:choice>
- <xsd:element name="singlebond" />
- <xsd:element name="doublebond" />
- <xsd:element name="triplebond" />
- </xsd:choice>
-</xsd:complexType>
-
-<xsd:complexType name="chemicalComponentType">
- <xsd:choice>
- <xsd:element ref="molecule" />
- <xsd:element ref="ion" />
- <xsd:element ref="atom" />
- </xsd:choice>
-</xsd:complexType>
-
-<xsd:complexType name="chemicalCaptionType" minOccurs="0" maxOccurs="2">
- <xsd:sequence>
- <xsd:element name="caption" type="xsd:string" minOccurs="0" maxOccurs="2" />
- </xsd:sequence>
-</xsd:complexType>
-
-</xsd:schema>
diff --git a/Master/texmf-dist/tex/context/base/x-contml.mkii b/Master/texmf-dist/tex/context/base/x-contml.mkii
deleted file mode 100644
index 22fffa50a37..00000000000
--- a/Master/texmf-dist/tex/context/base/x-contml.mkii
+++ /dev/null
@@ -1,491 +0,0 @@
-%M \usemodule [contml] \autoXMLnamespace [context]
-%M \definefilesynonym [context] [x-contml.xsd]
-
-%D \module
-%D [ file=x-contml,
-%D version=mid 2001,
-%D title=\CONTEXT\ XML Support,
-%D subtitle=Basic \CONTEXT\ commands,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% This module provides some basic \XML\ elements. These definitions
-% are highly experimental and serve as a playground for interface
-% development.
-
-\unprotect
-
-%D \elements {include}
-%D
-%D \startbuffer
-%D You can include another file in the current document with the
-%D <element>include</element> element. When including the file, &context;
-%D will look at the suffix, in order to decide how to include the file.
-%D
-%D <verbatim>
-%D <line><include name="mine"/></line>
-%D <line><include name="mine" type="txt"/></line>
-%D <line><include name="mine" type="tex"/></line>
-%D </verbatim>
-%D \stopbuffer
-%D
-%D \showelements [context] [include]
-
-\defineXMLsingular [context:include] [name=,type=xml]
- {\doifsomethingXMLop{name}
- {\processaction
- [\XMLop{type}]
- [xml=>\readfile{\XMLop{name}}\donothing\donothing,
- tex=>{{\disableXML\readfile{\XMLop{name}}\donothing\donothing}},
- txt=>{{\disableXML\typefile{\XMLop{name}}}}]}}
-
-% or, nicer:
-%
-% \defineXMLsingular [context:include] [name=unknown,type=txt]
-% {\XMLval{include:type}{\XMLop{type}}{}}
-%
-% \mapXMLvalue {include:type} {xml} {\readfile{\XMLop{name}}\donothing\donothing}
-% \mapXMLvalue {include:type} {tex} {{\disableXML\readfile{\XMLop{name}}\donothing\donothing}}
-% \mapXMLvalue {include:type} {txt} {{\disableXML\typefile{\XMLop{name}}}}
-
-%D \elements {compound}
-%D
-%D \startbuffer
-%D Instead of using hard coded compound tokens, you should use the
-%D <element>compound</element> element, as in high<compound token="/" />low.
-%D The overhead in keying is rewarded with proper symbols and hyphenation.
-%D \stopbuffer
-%D
-%D \showelements [context] [compound]
-
-\ifx\normalcompound\undefined \let\normalcompound=| \fi
-
-% \defineXMLsingular [context:compound] [token=]
-% {\expanded{\normalcompound\XMLop{token}}|}
-
-% \defineXMLsingular [context:compound] [token=]
-% {\ifmmode
-% \doifXMLop{token}{\XMLop{token}}{\compoundhyphen}%
-% \else
-% \expanded{\normalcompound\XMLop{token}}|%
-% \fi}
-
-\defineXMLsingular [context:compound] [token=]
- {\mathortext % disc comm looks ahead, so \relax
- {\doifXMLop{token}{\XMLop{token}}\compoundhyphen}%
- {\expanded{\directdiscretionary{\XMLop{token}}}\relax}}
-
-\defineXMLenvironmentsave [context:cp]
- {}
- {\expanded{\directdiscretionary{\XMLflush{cp}}}\relax}
-
-%D \elements {p}
-%D
-%D \startbuffer
-%D <p>Although for &tex; it is often enough to mark the end of a paragraph,
-%D in &xml; we want to add a bit more structure. <p/> This permits a more
-%D robust implementation of begin<compound/>of<compound/>par actions</p>
-%D \stopbuffer
-%D
-%D \showelements [context] [p]
-
-\defineXMLenvironment [context:p] {} \endgraf
-\defineXMLsingular [context:p] \endgraf
-
-%D \elements {pageref,textref,lineref}
-%D
-%D \startbuffer
-%D You can ask for a page (<pageref label="lastpage">the last pagenumber
-%D is</pageref> aka page <pageref label="lastpage"/>), text or line reference
-%D with the following three elements. The label may be any valid &context;
-%D reference label.
-%D \stopbuffer
-%D
-%D \showelements [context] [references]
-
-\defineXMLpickup [context:pageref] [label=] {\at} {[\XMLop{label}]}
-\defineXMLpickup [context:textref] [label=] {\in} {[\XMLop{label}]}
-\defineXMLpickup [context:lineref] [label=] {\inline} {[\XMLop{label}]}
-
-%D \elements{text}
-%D
-%D \startbuffer
-%D If you have a self contained &xml; file, you need to signal &context; the
-%D begin and end of the document. The following elements can be used for
-%D that purpose:
-%D
-%D <verbatim>
-%D <line><text></line>
-%D <line> ...</line>
-%D <line></text></line>
-%D </verbatim>
-%D \stopbuffer
-%D
-%D \showelements [context] [text]
-
-\defineXMLenvironment [context:text] \starttext \stoptext
-
-%D \elements {em}
-%D
-%D \startbuffer
-%D Authors often want some control over the way a text is typeset, which is
-%D why we provide the <element>em</element> element. We may only hope that
-%D the author is <em>consistent</em> in his decisions on what to emphasize.
-%D \stopbuffer
-%D
-%D \showelements [context] [em]
-
-\defineXMLgrouped [context:em] \em
-
-%D \elements {b}
-%D
-%D \startbuffer
-%D Bold is not always <b>beautiful</b> but if you really want it, you can
-%D get it by using this element.
-%D \stopbuffer
-%D
-%D \showelements [context] [b]
-
-\defineXMLgrouped [context:b] \bf
-
-%D \elements {verbatim,typing,line,verb,type}
-%D
-%D \startbuffer
-%D Although the following method can be used to typeset a piece of code
-%D verbatim
-%D
-%D <![CDATA[
-%D Dit \is nogal verbatim !
-%D Dit is {nogal} verbatim !
-%D Dit is <nogal> verbatim !
-%D ]]>
-%D
-%D we prefer the more structured:
-%D
-%D <verbatim>
-%D <line>Dit \is nogal verbatim !</line>
-%D <line>Dit is {nogal} verbatim !</line>
-%D <line>Dit is <nogal> verbatim !</line>
-%D </verbatim>
-%D \stopbuffer
-%D
-%D The element to tag in<compound/>line verbatim is <type><verb></type>.
-%D
-%D \showelements [context] [verbatim]
-
-\defineXMLenvironment [context:verbatim]
- {\startpacked
- \defineXMLargument[context:line]{\endgraf\type}}
- {\stoppacked}
-
-\defineXMLenvironment [context:typing]
- {\startpacked\defineXMLargument[context:line]{\endgraf\type}}
- {\stoppacked}
-
-\defineXMLargument [context:verb] \type
-\defineXMLargument [context:type] \type
-
-%D \elements {itemize,item}
-%D
-%D \startbuffer
-%D Itemized lists are quite common in documents, al least in the ones that
-%D we produce. For the moment we only provide a few options, later we will
-%D hook it into the &context; attribute handler.
-%D
-%D <itemize type="a">
-%D <item label="bla"> test </item>
-%D <item> test </item>
-%D </itemize>
-%D
-%D <itemize packed="yes">
-%D <item label="more bla"> test </item>
-%D <item> test <em>what?</em></item>
-%D </itemize>
-%D \stopbuffer
-%D
-%D \showelements [context] [itemize]
-
-\defineXMLenvironment [context:itemize] [type=,packed=]
- {\let\XMLoptions\empty
- \doifsomethingXMLop{type}{\addtocommalist{\XMLop{type}}\XMLoptions}%
- \doifXMLop{packed}{yes}{\addtocommalist{packed}\XMLoptions}%
- \expanded{\startitemize[\XMLoptions]}}
- {\stopitemize}
-
-\defineXMLenvironment [context:item] [label=]
- {\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 <verbatim>
-%D <line><externalfigure file="cow" width="5cm" /></line>
-%D </verbatim>
-%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 \setupexternalfigures[directory={../sample}]
-%D \startbuffer
-%D Something fixed will end up at the place where it defined in the input
-%D stream. The main idea behind this element is that it gives you control
-%D over the placement.
-%D
-%D <itemize>
-%D <item>
-%D <fixed align="high">
-%D <content>
-%D <externalfigure file="cow" frame="on" height="1cm" />
-%D </content>
-%D </fixed>
-%D </item>
-%D </itemize>
-%D \stopbuffer
-%D
-%D \showelements [context] [fixed]
-
-\defineXMLenvironment [context:fixed] [type=figure,location=,label=]
- {\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}}%
- \stopfixed
- \egroup}
-
-%D \elements {float}
-%D \setupexternalfigures[directory={../sample}]
-%D \startbuffer
-%D A floating body will be placed at the first location available, unless
-%D a location is specified. As with the <element>fixed</element> element,
-%D you can provide a caption.
-%D
-%D <float type="figure">
-%D <content>
-%D <externalfigure file="cow" frame="on" height="3cm" />
-%D </content>
-%D <caption>This is a cow!</caption>
-%D </float>
-%D \stopbuffer
-%D
-%D \showelements [context] [float]
-
-\defineXMLenvironment [context:float] [type=figure,location=here,label=]
- {\bgroup
- \defineXMLsave[context:caption]
- \defineXMLsave[context:content]}
- {\expanded
- {\placefloat
- [\XMLop{type}] [\XMLop{location}] [\XMLop{label}]
- {\XMLflush{context:caption}} {\XMLflush{context:content}}}
- \egroup}
-
-%D \elements {quotation,quote}
-%D
-%D \startbuffer
-%D There is a (not so) subtle difference between a display
-%D <quotation>quotation</quotation> and an <quote>in<compound/>line</quote>
-%D one.
-%D \stopbuffer
-%D
-%D \showelements [context] [table]
-
-\defineXMLgrouped [context:quote] \quote
-\defineXMLgrouped [context:quotation] \quotation
-
-%D \elements {table,tr,td}
-%D
-%D \startbuffer
-%D There are (currently) three table mechanisms in &context;. One of them
-%D resembles the well known &html; tables.
-%D
-%D <?context-command \startlinecorrection[blank] ?>
-%D <table>
-%D <tr> <td>one</td> <td>a</td> <td>first </td> </tr>
-%D <tr> <td>two</td> <td>b</td> <td>second</td> </tr>
-%D </table>
-%D <?context-command \stoplinecorrection ?>
-%D
-%D As you can see here, we use a similar syntax but stick to the &context;
-%D attributes (which provide quite advanced control over the layout).
-%D
-%D <?context-command \startlinecorrection[blank] ?>
-%D <table frame="off" background="color" color="white">
-%D <tr backgroundcolor="red"> <td>xx</td> <td>xx</td> </tr>
-%D <tr backgroundcolor="green"> <td>xx</td> <td>xx</td> </tr>
-%D </table>
-%D <?context-command \stoplinecorrection ?>
-%D \stopbuffer
-%D
-%D \showelements [context] [table]
-
-\defineXMLenvironment [context:table] [\@@tbl\@@tbl]
- {\bgroup
- \defineXMLnested [context:tr] [\@@tbl] {\expanded{\bTR[\theXMLarguments{\@@tbl}}]} \eTR
- \defineXMLnested [context:td] [\@@tbl] {\expanded{\bTD[\theXMLarguments{\@@tbl}}]} \eTD
- \expanded{\bTABLE[\theXMLarguments{\@@tbl\@@tbl}]}}
- {\eTABLE
- \egroup}
-
-%D \elements {tabulate,tspec,thead,tbody,ttail,trule,tr,td}
-%D
-%D \startbuffer
-%D The second mechanism that we support is tabulation. The advantage of this
-%D mechanism is that it it well tuned for tables that have much text in the
-%D cells and cross page boundaires.
-%D
-%D <tabulate>
-%D <tspec>
-%D <tcell align="left"/> <tcell align="middle"/> <tcell align="right"/>
-%D </tspec>
-%D <thead>
-%D <trule/>
-%D <tr> <td> bagger </td> <td> bagger </td> <td> bagger </td> </tr>
-%D <trule/>
-%D </thead>
-%D <ttail>
-%D <trule/>
-%D </ttail>
-%D <tbody>
-%D <tr> <td> bagger </td> <td> bagger </td> <td> bagger </td> </tr>
-%D <tr> <td> bagg </td> <td> ger </td> <td> gr </td> </tr>
-%D <tr> <td> bag </td> <td> er </td> <td> gger </td> </tr>
-%D </tbody>
-%D </tabulate>
-%D \stopbuffer
-%D
-%D \showelements [context] [tabulate]
-
-\newtoks\XMLtabtoks
-
-\defineXMLgrouped [context:tabulate] {\XMLtabtoks{|l|p|}}
-
-\defineXMLpickup [context:tbody]
- {\expanded{\definetabulate[dummy][\the\XMLtabtoks]}
- \startdummy\XMLflush{context:thead}}
- {\XMLflush{context:ttail}\stopdummy}
-
-\defineXMLsave [context:thead]
-\defineXMLsave [context:ttail]
-
-\defineXMLenvironment[context:tspec]
- {\XMLtabtoks\emptytoks}
- {\appendtoks|\to\XMLtabtoks}
-
-\defineXMLsingular [context:trule] % verrrry ugly
- {\crcr\noalign{\kern-\lineheight}\HL}
-
-\defineXMLsingular [context:tcell] [align=]
- {\appendtoks|\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}
-
-%D \elements {hide}
-%D
-%D \startbuffer
-%D This is the way to [<hide>this is gone</hide>] something for the
-%D typesetting engine. Normally this element is only used for testing
-%D purposes.
-%D \stopbuffer
-%D
-%D \showelements [context] [tabulate]
-
-\defineXMLignore[context:hide]
-
-%D \elements {unknown}
-%D
-%D \startbuffer
-%D We can go on and on and <unknown/> with defining elements that map onto
-%D &context; commands, but why not just use &tex; input syntax then?
-%D \stopbuffer
-%D
-%D \showelements [context] [unknown]
-
-\defineXMLsingular [context:unknown] \unknown
-
-%D A (for the moment) private one.
-
-\defineXMLargument [context:element] \type
-
-%D The following common schema definitions apply:
-%D
-%D {\setupcolors[state=stop]\showXSDcomponent[context][definitions]}
-
-\defineXMLargument [context:chapter] [label=] {\chapter[\XMLop{label}]}
-\defineXMLargument [context:section] [label=] {\section[\XMLop{label}]}
-\defineXMLargument [context:subsection] [label=] {\subsection[\XMLop{label}]}
-\defineXMLargument [context:subsubsection] [label=] {\subsubsection[\XMLop{label}]}
-\defineXMLargument [context:subsubsubsection] [label=] {\subsubsubsection[\XMLop{label}]}
-
-\defineXMLargument [context:title] [label=] {\title[\XMLop{label}]}
-\defineXMLargument [context:subject] [label=] {\subject[\XMLop{label}]}
-\defineXMLargument [context:subsubject] [label=] {\subsubject[\XMLop{label}]}
-\defineXMLargument [context:subsubsubject] [label=] {\subsubsubject[\XMLop{label}]}
-\defineXMLargument [context:subsubsubsubject] [label=] {\subsubsubsubject[\XMLop{label}]}
-
-\defineXMLenvironment [context:frontmatter] \startfrontmatter \stopfrontmatter
-\defineXMLenvironment [context:bodymatter] \startbodymatter \stopbodymatter
-\defineXMLenvironment [context:backmatter] \startbackmatter \stopbackmatter
-\defineXMLenvironment [context:appendices] \startappendices \stopappendices
-
-\defineXMLargument [context:index] [key=]
- {\doifelsenothingXMLop{key}{\index}{\expanded{\index[\XMLop{key}]}}}
-
-% \enableXMLfiledata
-
-% Needed for example (stickers and so):
-
-\defineXMLenvironment [context:makeup]
- \startstandardmakeup \stopstandardmakeup
-
-\protect \endinput
-
-% TO DO
-
-\defineXMLenvironment [combination] [columns=2,rows=1]
- {\scratchtoks\emptytoks
- \expanded{\appendtoks \noexpand \startcombination
- [\XMLop{columns}*\XMLop{rows}]}\to \scratchtoks}
- {\appendtoks \stopcombination \to \scratchtoks
- \the\scratchtoks}
-
-\defineXMLprocess[combinationentry]
-
-\defineXMLpickup [combinationitem]
- {\appendtoks\bgroup}{\egroup\to\scratchtoks}
-
-\defineXMLpickup [combinationcaption]
- {\appendtoks\bgroup}{\egroup\to\scratchtoks}
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-contml.xsd b/Master/texmf-dist/tex/context/base/x-contml.xsd
deleted file mode 100644
index 3b71e31e850..00000000000
--- a/Master/texmf-dist/tex/context/base/x-contml.xsd
+++ /dev/null
@@ -1,375 +0,0 @@
-<?xml version="1.0"?>
-
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
-
-<xsd:annotation>
- <xsd:documentation xml:lang="en">
- This schema describes a class of presentations. The structure is
- (normally) reflected in the design.
-
- author: Hans Hagen, copyright: PRAGMA-ADE / Hasselt NL
- </xsd:documentation>
-</xsd:annotation>
-
-
-<?context-block begin definitions ?>
-
- <xsd:complexType name="filename.value">
- <xsd:restriction base="xsd:string">
- <xsd:pattern value='[a-zA-Z0-9\-\:\.]*' />
- </xsd:restriction>
- </xsd:complexType>
-
- <xsd:complexType name="filetype.value">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="tex" />
- <xsd:enumeration value="xml" />
- <xsd:enumeration value="txt" />
- </xsd:restriction>
- </xsd:complexType>
-
- <xsd:complexType name="confirmation.value">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="yes" />
- <xsd:enumeration value="no" />
- </xsd:restriction>
- </xsd:complexType>
-
- <xsd:complexType name="conversion.value">
- <xsd:restriction base="xsd:string">
- <xsd:pattern value='(a|A|n|g|G|r|R|1|2|3|4)' />
- </xsd:restriction>
- </xsd:complexType>
-
- <xsd:complexType name="reference.label.value">
- <xsd:restriction base="xsd:string">
- <xsd:pattern value='([a-zA-Z0-9\-\:]*' />
- </xsd:restriction>
- </xsd:complexType>
-
-<?context-block end definitions ?>
-
-
-<?context-block begin text ?>
-
- <xsd:element name="presentation" mixed="true" />
-
-<?context-block end text ?>
-
-
-<?context-block begin p ?>
-
- <xsd:element name="p" mixed="true" />
-
-<?context-block end p ?>
-
-
-<?context-block begin hide ?>
-
- <xsd:element name="hide" mixed="true" />
-
-<?context-block end hide ?>
-
-
-<?context-block begin em ?>
-
- <xsd:element name="em" mixed="true" />
-
-<?context-block end em ?>
-
-
-<?context-block begin b ?>
-
- <xsd:element name="b" mixed="true" />
-
-<?context-block end b ?>
-
-
-<?context-block begin quote ?>
-
- <xsd:element name="quote" mixed="true" />
- <xsd:element name="quotation" mixed="true" />
-
-<?context-block end quote ?>
-
-
-<?context-block begin include ?>
-
- <xsd:attributeGroup name="include.attributes">
- <xsd:attribute name="file" type="filename.value" use="required" />
- <xsd:attribute name="type" type="filetype.value" />
- </xsd:attributeGroup>
-
- <xsd:complexType type="include.type">
- <xsd:attributeGroup ref="include.attributes" />
- </xsd:complexType>
-
- <xsd:element name="include" type="include.type" />
-
-<?context-block end include ?>
-
-
-<?context-block begin compound ?>
-
- <xsd:attributeGroup name="compound.attributes">
- <xsd:attribute name="token" type="xsd:string" />
- </xsd:attributeGroup>
-
- <xsd:complexType type="compound.type">
- <xsd:attributeGroup ref="compound.attributes" />
- </xsd:complexType>
-
- <xsd:element name="compound" type="compound.type" />
-
-<?context-block end compound ?>
-
-
-<?context-block begin references ?>
-
- <xsd:attributeGroup name="reference.attributes">
- <xsd:attribute name="label" type="reference.label.value" />
- </xsd:attributeGroup>
-
- <xsd:complexType type="reference.type">
- <xsd:attributeGroup ref="reference.attributes" />
- </xsd:complexType>
-
- <xsd:element name="lineref" type="reference.type" />
- <xsd:element name="pageref" type="reference.type" />
- <xsd:element name="textref" type="reference.type" />
-
-<?context-block end references ?>
-
-
-<?context-block begin unknown ?>
-
- <xsd:element name="unknown"/>
-
-<?context-block end unknown ?>
-
-
-<?context-block begin verbatim ?> <!-- string or anyType -->
-
- <xsd:complexType name="verbatim.verbatim">
- <xsd:sequence maxOccurs="unbounded" >
- <xsd:element name="line" type="xsd:string" />
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="verbatim" type="verbatim.verbatim" />
- <xsd:element name="typing" type="verbatim.verbatim" />
-
- <xsd:element name="verb" type="xsd:string" />
- <xsd:element name="type" type="xsd:string" />
-
-<?context-block end verbatim ?>
-
-
-<?context-block begin itemize ?>
-
- <xsd:attributeGroup name="itemize.attributes">
- <xsd:attribute name="type" type="conversion.value" />
- <xsd:attribute name="packed" type="confirmation.value" />
- <xsd:attribute name="label" type="reference.label.value" />
- </xsd:attributeGroup>
-
- <xsd:attributeGroup name="item.attributes">
- <xsd:attribute name="label" type="reference.label.value" />
- </xsd:attributeGroup>
-
- <xsd:complexType name="item.type" mixed="true">
- <xsd:attributeGroup ref="item.attributes" />
- </xsd:complexType>
-
- <xsd:complexType name="itemize.type">
- <xsd:sequence minOccurs="1" maxOccurs="unbounded">
- <xml:element name="item" type="item.type" />
- </xsd:sequence>
- <xsd:attributeGroup ref="itemize.attributes" />
- </xsd:complexType>
-
- <xsd:element name="itemize" type="itemize.type" />
-
-<?context-block end itemize ?>
-
-
-<?context-block begin fixed ?>
-
- <xsd:complexType name="fixed.type.value">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="figure" />
- <xsd:enumeration value="table" />
- </xsd:restriction>
- </xsd:complexType>
-
- <xsd:complexType name="fixed.location.value">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="high" />
- <xsd:enumeration value="low" />
- <xsd:enumeration value="lohi" />
- </xsd:restriction>
- </xsd:complexType>
-
- <xsd:attributeGroup name="fixed.attributes">
- <xsd:attribute name="type" type="fixed.type.value" />
- <xsd:attribute name="location" type="fixed.location.value" />
- <xsd:attribute name="label" type="reference.label.value" />
- </xsd:attributeGroup>
-
- <xsd:complexType name="fixed.type">
- <xsd:all>
- <xsd:element name="caption" mixed="true" />
- <xsd:element name="content" mixed="true" />
- </xsd:all>
- <xsd:attributeGroup ref="fixed.attributes" />
- </xsd:complexType>
-
- <xsd:element name="fixed" type="fixed.type" />
-
-<?context-block end fixed ?>
-
-
-<?context-block begin float ?>
-
- <xsd:complexType name="float.type.value">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="figure" />
- <xsd:enumeration value="table" />
- </xsd:restriction>
- </xsd:complexType>
-
- <xsd:complexType name="float.location.value">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="high" />
- <xsd:enumeration value="low" />
- <xsd:enumeration value="lohi" />
- </xsd:restriction>
- </xsd:complexType>
-
- <xsd:attributeGroup name="float.attributes">
- <xsd:attribute name="type" type="float.type.value" />
- <xsd:attribute name="location" type="float.location.value" />
- <xsd:attribute name="label" type="reference.label.value" />
- </xsd:attributeGroup>
-
- <xsd:complexType name="float.type">
- <xsd:all>
- <xsd:element name="caption" mixed="true" />
- <xsd:element name="content" mixed="true" />
- </xsd:all>
- <xsd:attributeGroup ref="float.attributes" />
- </xsd:complexType>
-
- <xsd:element name="float" type="float.type" />
-
-<?context-block end float ?>
-
-
-<?context-block begin externalfigure ?>
-
- <xsd:attributeGroup name="externalfigure.attributes">
- <xsd:extension base="context.kernel.externalfigure.attributes">
- <xsd:attribute name="base" type="filename.value"/>
- <xsd:attribute name="file" type="filename.value"/>
- <xsd:attribute name="label" type="reference.label.value"/>
- </xsd:extension>
- </xsd:attributeGroup>
-
- <xsd:complexType name="externalfigure.type">
- <xsd:attributeGroup ref="externalfigure.attributes" />
- </xsd:complexType>
-
- <xsd:element name="externalfigure" type="externalfigure.type" />
-
-<?context-block end externalfigure ?>
-
-
-<?context-block begin table ?>
-
- <xsd:attributeGroup name="table.attributes">
- <!-- these elements inherit ConTeXt TABLE parameters -->
- <xsd:extension base="context.kernel.table.attributes" />
- </xsd:attributeGroup>
-
- <xsd:complexType name="table.td.type" mixed="true">
- <xsd:attributeGroup name="table.attributes" />
- </xsd:complexType>
-
- <xsd:complexType name="table.tr.type">
- <xsd:sequence maxOccurs="unbounded">
- <xsd:element name="td" type="table.td.type" />
- </xsd:sequence>
- <xsd:attributeGroup name="table.attributes" />
- </xsd:complexType>
-
- <xsd:complexType name="table.type">
- <xsd:sequence maxOccurs="unbounded">
- <xsd:element name="tr" type="table.tr.type" />
- </xsd:sequence>
- <xsd:attributeGroup name="table.attributes" />
- </xsd:complexType>
-
- <xsd:element name="table" type="table.type" />
-
-<?context-block end table ?>
-
-
-<?context-block begin tabulate ?>
-
- <xsd:complexType name="tabulate.td.type" mixed="true">
- </xsd:complexType>
-
- <xsd:complexType name="tabulate.tr.type">
- <xsd:sequence maxOccurs="unbounded">
- <xsd:element name="td" type="tabulate.td.type" />
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="tabulate.base.type">
- <xsd:sequence maxOccurs="unbounded">
- <xsd:element name="tr" type="tabulate.tr.type" />
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="tabulate.align.value">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="high" />
- <xsd:enumeration value="low" />
- <xsd:enumeration value="lohi" />
- </xsd:restriction>
- </xsd:complexType>
-
- <xsd:attributeGroup name="tabulate.tcell.attributes">
- <xsd:attribute name="align" type="tabulate.align.value" />
- </xsd:attributeGroup>
-
- <xsd:complexType name="tabulate.tcell.type" mixed="true">
- <xsd:attributeGroup ref="tabulate.tcell.attributes" />
- </xsd:complexType>
-
- <xsd:complexType name="tabulate.tcell.type">
- </xsd:complexType>
-
- <xsd:complexType name="tabulate.tcells.type">
- <xsd:sequence maxOccurs="unbounded">
- <xsd:element name="tcell" type="tabulate.tcell.type" />
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="tabulate.type">
- <xsd:sequence>
- <xsd:element name="tcells" type="tabulate.tcells.type" />
- <xsd:element name="thead" type="tabulate.base.type" minOccurs="0" maxOccurs="1" />
- <xsd:element name="ttail" type="tabulate.base.type" minOccurs="0" maxOccurs="1" />
- <xsd:element name="tbody" type="tabulate.base.type" minOccurs="1" maxOccurs="unbounded" />
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="tabulate" type="tabulate.type" />
-
-<?context-block end tabulate ?>
-
-
-</xsd:schema>
diff --git a/Master/texmf-dist/tex/context/base/x-corres.mkii b/Master/texmf-dist/tex/context/base/x-corres.mkii
deleted file mode 100644
index effd79a5b31..00000000000
--- a/Master/texmf-dist/tex/context/base/x-corres.mkii
+++ /dev/null
@@ -1,136 +0,0 @@
-%D \module
-%D [ file=x-corres,
-%D version=2003.12.15, % replaces keep-02a cum suis
-%D title=\CONTEXT\ XML Modules,
-%D subtitle=Handling Correspondence Base,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D The selection spec:
-
-\setvariables
- [contacts]
- [selection=,
- file=x-corres.xml] % fall back
-
-%D First we define the group expansion pass:
-
-\startsetups[contacts:collect]
-
- \defineXMLprocess [contacts]
-
- \defineXMLignore [contact]
-
- \defineXMLargument [contactfile]
- \processfile
-
- \defineXMLenvironmentsave [contactgroup] [label=]
- {\startXMLmappinggroup[contacts]}
- {\XMLaddcontactgrouptoselection
- \stopXMLmappinggroup}
-
-\stopsetups
-
-%D Next we define the main processing pass:
-
-\startsetups[contacts:process]
-
- \defineXMLprocess[contacts]
-
- \defineXMLignore [contactgroup]
-
- \defineXMLargument [contactfile]
- \processfile
-
- \defineXMLenvironmentsave[contact] [label=]
- {\startXMLmappinggroup[contacts]}
- {\XMLselectcontact
- \stopXMLmappinggroup}
-
-\stopsetups
-
-\startXMLmapping[contacts]
-
- \defineXMLsave [initials]
- \defineXMLsave [formalname]
- \defineXMLsave [informalname]
- \defineXMLsave [title]
- \defineXMLsave [prefix]
- \defineXMLsave [suffix]
- \defineXMLsave [telephone]
- \defineXMLsave [mobiletelephone]
- \defineXMLsave [telefax]
- \defineXMLsave [email]
- \defineXMLsave [address]
- \defineXMLsave [information]
-
- \defineXMLenvironment [p] \endgraf \endgraf
-
- \defineXMLargument [member] \XMLaddcontacttoselection
-
-\stopXMLmapping
-
-%D The selection macros: we expand groups and replace them
-%D by contact labels in the selection spec.
-
-\def\XMLaddcontactgrouptoselection
- {\edef\XMLcontactlist{\getvariable{contacts}{selection}}%
- \edef\XMLgrouplabel {\XMLop{label}}%
- \expanded{\doifinset{\XMLgrouplabel}{\XMLcontactlist}}
- {\let\XMLgrouplist\empty
- \XMLflush{contactgroup}%
- \substituteincommalist\XMLgrouplabel\XMLgrouplist\XMLcontactlist
- \expanded
- {\globalsetvariables
- [contacts]
- [selection={\XMLcontactlist}]}}}
-
-\def\XMLaddcontacttoselection#1%
- {\addtocommalist{#1}\XMLgrouplist}
-
-%D The main selector:
-
-\def\XMLselectcontact
- {\edef\XMLcontactlist {\getvariable{contacts}{selection}}%
- \edef\XMLcontactlabel{\XMLop{label}}%
- \doifelsenothing{\XMLcontactlist}
- {\donetrue}
- {\expanded{\doifinsetelse{\XMLcontactlabel}{\XMLcontactlist}}
- {\donetrue}
- {\donefalse}}%
- \ifdone
- \XMLflush{contact}%
- \setups[contact:handle]%
- \fi}
-
-%D The default:
-
-\startsetups[contact:handle]
-
- \XMLflush{address}
-
-\stopsetups
-
-\setups[contacts:process]
-
-%D Handy:
-
-\def\XMLprocesscontacts
- {\dosingleempty\XMLprocesscontacts}
-
-\def\XMLprocesscontacts[#1]%
- {\bgroup
- \doifelsenothing{#1}
- {\XMLprocesscontacts[\getvariable{contacts}{file}]}
- {\setups[contacts:collect]%
- \processcommacommand[#1]\processXMLfile
- \setups[contacts:process]%
- \processcommacommand[#1]\processXMLfile}%
- \egroup}
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-corres.rng b/Master/texmf-dist/tex/context/base/x-corres.rng
deleted file mode 100644
index 09de5d26718..00000000000
--- a/Master/texmf-dist/tex/context/base/x-corres.rng
+++ /dev/null
@@ -1,170 +0,0 @@
-<?xml version="1.0" ?>
-
-<?context-block begin grammar ?>
-
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
- <?context-block end grammar ?>
-
- <?context-block begin contacts ?>
-
- <start>
- <ref name="contacts"/>
- </start>
-
- <define name="contacts">
- <element name="contacts">
- <zeroOrMore>
- <choice>
- <ref name="contacts.contact"/>
- <ref name="contacts.contactgroup"/>
- <ref name="contacts.contactfile"/>
- </choice>
- </zeroOrMore>
- </element>
- </define>
-
- <?context-block end contacts ?>
-
- <?context-block begin contact ?>
-
- <define name="contacts.contact">
- <element name="contact">
- <interleave>
- <optional> <ref name="contact.initials"/> </optional>
- <optional> <ref name="contact.formalname"/> </optional>
- <optional> <ref name="contact.informalname"/> </optional>
- <optional> <ref name="contact.title"/> </optional>
- <optional> <ref name="contact.prefix"/> </optional>
- <optional> <ref name="contact.suffix"/> </optional>
- <optional> <ref name="contact.telephone"/> </optional>
- <optional> <ref name="contact.mobiletelephone"/> </optional>
- <optional> <ref name="contact.telefax"/> </optional>
- <optional> <ref name="contact.email"/> </optional>
- <optional> <ref name="contact.address"/> </optional>
- <optional> <ref name="contact.information"/> </optional>
- </interleave>
- <attribute name="label"/>
- </element>
- </define>
-
- <?context-block end contact ?>
-
- <?context-block begin fields ?>
-
- <define name="contact.initials">
- <element name="initials">
- <text/>
- </element>
- </define>
-
- <define name="contact.formalname">
- <element name="formalname">
- <text/>
- </element>
- </define>
-
- <define name="contact.informalname">
- <element name="informalname">
- <text/>
- </element>
- </define>
-
- <define name="contact.title">
- <element name="title">
- <text/>
- </element>
- </define>
-
- <define name="contact.prefix">
- <element name="prefix">
- <text/>
- </element>
- </define>
-
- <define name="contact.suffix">
- <element name="suffix">
- <text/>
- </element>
- </define>
-
- <define name="contact.telephone">
- <element name="telephone">
- <text/>
- </element>
- </define>
-
- <define name="contact.mobiletelephone">
- <element name="mobiletelephone">
- <text/>
- </element>
- </define>
-
- <define name="contact.telefax">
- <element name="telefax">
- <text/>
- </element>
- </define>
-
- <define name="contact.email">
- <element name="email">
- <text/>
- </element>
- </define>
-
- <define name="contact.address">
- <element name="address">
- <zeroOrMore>
- <ref name="contact.address.p"/>
- </zeroOrMore>
- </element>
- </define>
-
- <define name="contact.information">
- <element name="information">
- <text/>
- </element>
- </define>
-
- <define name="contact.address.p">
- <element name="p">
- <text/>
- </element>
- </define>
-
- <?context-block end fields ?>
-
- <?context-block begin contactgroup ?>
-
- <define name="contacts.contactgroup">
- <element name="contactgroup">
- <zeroOrMore>
- <ref name="contactgroup.member"/>
- </zeroOrMore>
- <attribute name="label"/>
- </element>
- </define>
-
- <define name="contactgroup.member">
- <element name="member">
- <text/>
- </element>
- </define>
-
- <?context-block end contactgroup ?>
-
- <?context-block begin contactfile ?>
-
- <define name="contacts.contactfile">
- <element name="contactfile">
- <text/>
- </element>
- </define>
-
- <?context-block end contactfile ?>
-
- <?context-block begin grammar ?>
-
-</grammar>
-
-<?context-block end grammar ?> \ No newline at end of file
diff --git a/Master/texmf-dist/tex/context/base/x-ct.lua b/Master/texmf-dist/tex/context/base/x-ct.lua
deleted file mode 100644
index 9c647e8e790..00000000000
--- a/Master/texmf-dist/tex/context/base/x-ct.lua
+++ /dev/null
@@ -1,167 +0,0 @@
-if not modules then modules = { } end modules ['x-ct'] = {
- version = 1.001,
- comment = "companion to x-ct.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
--- needs testing
-
-local xmlsprint, xmlcprint, xmlfilter, xmlcollected = xml.sprint, xml.cprint, xml.filter, xml.collected
-local format, concat, rep, find = string.format, table.concat, string.rep, string.find
-
-moduledata.ct = moduledata.ct or { }
-
-local halignments = {
- left = 'l',
- flushleft = 'l',
- right = 'r',
- flushright = 'r',
- center = 'c',
- middle = 'c',
- centre = 'c',
- justify = '',
-}
-
-local templates = { }
-
-function moduledata.ct.registertabulatetemplate(name,str)
- templates[name] = str
-end
-
-local function roottemplate(root)
- local rt = root.at.template
- if rt then
- local template = templates[rt]
- if template then
- return template
- else
- if not find(rt,"|") then
- rt = gsub(rt,",","|")
- end
- if not find(rt,"^|") then rt = "|" .. rt end
- if not find(rt,"|$") then rt = rt .. "|" end
- return rt
- end
- end
-end
-
-local function specifiedtemplate(root,templatespec)
- local template = { }
- for e in xmlcollected(root,templatespec) do
- local at = e.at
- local tm = halignments[at.align] or ""
- if toboolean(at.paragraph) then
- tm = tm .. "p"
- end
- template[#template+1] = tm
- end
- if #template > 0 then
- return "|" .. concat(template,"|") .. "|"
- else
- return nil
- end
-end
-
-local function autotemplate(root,rowspec,cellspec)
- local max = 0
- for e in xmlcollected(root,rowspec) do
- local n = xml.count(e,cellspec)
- if n > max then max = n end
- end
- if max == 2 then
- return "|l|p|"
- elseif max > 0 then
- return "|" .. rep("p|",max)
- else
- return nil
- end
-end
-
-local defaulttemplate = "|l|p|"
-
-function moduledata.ct.tabulate(root,namespace)
- if not root then
- return
- else
- root = lxml.id(root)
- end
-
- local prefix = (namespace or "context") .. ":"
-
- local templatespec = "/" .. prefix .. "template" .. "/" .. prefix .. "column"
- local bodyrowspec = "/" .. prefix .. "body" .. "/" .. prefix .. "row"
- local cellspec = "/" .. prefix .. "cell"
-
- local template =
- roottemplate (root) or
- specifiedtemplate (root,templatespec) or
- autotemplate (root,bodyrowspec,cellspec) or
- defaulttemplate
-
- -- todo: head and foot
-
- local NC, NR = context.NC, context.NR
-
- lxml.directives.before(root,'cdx')
- context.bgroup()
- lxml.directives.setup(root,'cdx')
- context.starttabulate { template }
- for e in xmlcollected(root,bodyrowspec) do
- NC()
- for e in xmlcollected(e,cellspec) do
- xmlcprint(e)
- NC()
- end
- NR()
- end
- context.stoptabulate()
- context.egroup()
- lxml.directives.after(root,'cdx')
-
-end
-
--- todo: use content and caption
-
-function moduledata.ct.combination(root,namespace)
-
- if not root then
- return
- else
- root = lxml.id(root)
- end
-
- local prefix = (namespace or "context") .. ":"
-
- local pairspec = "/" .. prefix .. "pair"
- local contentspec = "/" .. prefix .. "content" .. "/text()"
- local captionspec = "/" .. prefix .. "caption" .. "/text()"
-
- local nx, ny = root.at.nx, root.at.ny
-
- if not (nx or ny) then
- nx = xml.count(root,pairspec) or 2
- end
- local template = format("%s*%s", nx or 1, ny or 1)
-
- lxml.directives.before(root,'cdx')
- context.bgroup()
- lxml.directives.setup(root,'cdx')
- context.startcombination { template }
- for e in xmlcollected(root,pairspec) do
- -- context.combination(
- -- function() xmlfilter(e,contentspec) end,
- -- function() xmlfilter(e,captionspec) end
- -- )
- context("{")
- xmlfilter(e,contentspec)
- context("}{")
- xmlfilter(e,captionspec)
- context("}")
- end
- context.stopcombination()
- context.egroup()
- lxml.directives.after(root,'cdx')
-
-end
diff --git a/Master/texmf-dist/tex/context/base/x-ct.mkiv b/Master/texmf-dist/tex/context/base/x-ct.mkiv
deleted file mode 100644
index 6a6352f0359..00000000000
--- a/Master/texmf-dist/tex/context/base/x-ct.mkiv
+++ /dev/null
@@ -1,29 +0,0 @@
-%D \module
-%D [ file=x-cals,
-%D version=2007.09.05,
-%D title=\CONTEXT\ XML Modules,
-%D subtitle=\CONTEXT\ Structures,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 XML Macros / Basics}
-
-\startmodule [ct]
-
-\registerctxluafile{x-ct}{}
-
-\startxmlsetups xml:context:process
- \xmlsetfunction {\xmldocument} {context:tabulate} {moduledata.ct.tabulate}
- \xmlsetfunction {\xmldocument} {context:combination} {moduledata.ct.combination}
-\stopxmlsetups
-
-\xmlregistersetup{xml:context:process}
-
-\xmlregisterns{context}{context}
-
-\stopmodule
diff --git a/Master/texmf-dist/tex/context/base/x-dir-01.tex b/Master/texmf-dist/tex/context/base/x-dir-01.tex
deleted file mode 100644
index 6e4192a1326..00000000000
--- a/Master/texmf-dist/tex/context/base/x-dir-01.tex
+++ /dev/null
@@ -1,145 +0,0 @@
-%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 ADE \& \CONTEXT\ Development Team}]
-%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]
-
-\setuplayout
- [width=middle,
- height=middle,
- backspace=12pt,
- topspace=12pt,
- bottomspace=32pt,
- header=0pt,
- footer=0pt,
- bottomdistance=9pt,
- bottom=18pt]
-
-\setupinteractionmenu
- [bottom]
- [state=start,
- frame=off,
- rightoffset=-3pt,
- background=color,
- backgroundcolor=TextColor,
- middle=\hskip4pt,
- left=\hfill]
-
-\startinteractionmenu[bottom]
- \but [PreviousJump] Previous Jump \\
- \but [previouspage] Previous Page \\
- \but [nextpage] Next Page \\
-\stopinteractionmenu
-
-\setupbackgrounds
- [page]
- [backgroundoffset=3pt,
- background=color,
- backgroundcolor=PageColor]
-
-\setupbackgrounds
- [text]
- [background=color,
- backgroundcolor=TextColor]
-
-\definecolor [PageColor] [r=.6,g=.7,b=.8]
-\definecolor [TextColor] [r=.7,g=.8,b=.9]
-\definecolor [DoneColor] [s=.5]
-
-\startmode[colorscheme-red]
-
- \definecolor [PageColor] [r=.9,g=.7,b=.6]
- \definecolor [TextColor] [r=.9,g=.8,b=.7]
-
-\stopmode
-
-\startmode[colorscheme-green]
-
- \definecolor [PageColor] [r=.6,g=.8,b=.7]
- \definecolor [TextColor] [r=.7,g=.9,b=.8]
-
-\stopmode
-
-\setupcolors
- [state=start]
-
-\setupinteraction
- [state=start,
- menu=on,
- color=,
- display=new,
- contrastcolor=DoneColor,
- style=]
-
-\definehead
- [directory]
- [subject]
-
-\setuphead
- [directory]
- [style=\tfc]
-
-\setupbodyfont
- [tt]
-
-\defineXMLenvironment [files] [url=]
- {\doifelsenothing{\XMLop{url}}
- {\xdef\XMLDIRurl{}}
- {\xdef\XMLDIRurl{\XMLop{url}/}}
- \startXMLignore}
- {\stopXMLignore}
-
-\newcounter\NOfEntries
-
-\startsetups[xmldir:file]
-
- \doglobal\increment\NOfEntries
-
- \goto {\hbox to \hsize \bgroup
-
- \XMLflush{base}
- \hss
- \hbox to 2em{\XMLflush{type}\hss}
- \quad
- \quad
- \hbox to 5em{\hss\XMLflush{size}}
- \quad
- \quad
- \XMLflush{date}
-
- \egroup} [url(\XMLDIRurl\XMLop{name})]% [program(\XMLDIRurl\XMLop{name})]
-
-\stopsetups
-
-\defineXMLenvironment [directory] [name=]
- {\directory{Path \XMLop{name}}}
- {}
-
-\defineXMLenvironment [file] [name=]
- {\bgroup}
- {\setups[xmldir:file]
- \endgraf
- \egroup}
-
-\defineXMLsave[base]
-\defineXMLsave[type]
-\defineXMLsave[size]
-\defineXMLsave[date]
-
-\starttext
-
- \processXMLfilegrouped{\inputfilename}
-
- \ifnum\NOfEntries=0 There are no files found that match the pattern. \fi
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/x-dir-05.mkii b/Master/texmf-dist/tex/context/base/x-dir-05.mkii
deleted file mode 100644
index 53e73c5eb86..00000000000
--- a/Master/texmf-dist/tex/context/base/x-dir-05.mkii
+++ /dev/null
@@ -1,51 +0,0 @@
-%D \module
-%D [ file=x-dir-05,
-%D version=2003.05.10, % around that time -)
-%D title=\CONTEXT\ Directory Handling,
-%D subtitle=Access,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\setvariables
- [filestate]
- [name=,base=,type=,size=,permissions=,date=]
-
-\def\savefilestate
- {\dodoubleargument\dosavefilestate}
-
-\def\dosavefilestate[#1][#2]%
- {\startnointerference
- \setxvariables
- [#1]
- [name=#2,base=,type=,size=,permissions=,date=]
- \executesystemcommand{texmfstart xmltools.rb --dir --pattern=\getvariable{#1}{name} --output=xmldir.tmp}
- \defineXMLprocess [files]
- \defineXMLprocess [directory]
- \defineXMLenvironment [file]
- {\defineXMLsave [base]
- \defineXMLsave [type]
- \defineXMLsave [size]
- \defineXMLsave [permissions]
- \defineXMLsave [date]}
- {\setxvariables
- [#1]
- [name=\XMLop{name},
- base=\XMLflush{base},
- type=\XMLflush{type},
- size=\XMLflush{size},
- permissions=\XMLflush{permissions},
- date=\XMLflush{date}]}
- \startXMLignore
- \processXMLfile{xmldir.tmp}
- \stopXMLignore
- \stopnointerference}
-
-\def\getfilestate#1% old one
- {\savefilestate[filestate][#1]}
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-dir-05.mkiv b/Master/texmf-dist/tex/context/base/x-dir-05.mkiv
deleted file mode 100644
index 379b3220a0b..00000000000
--- a/Master/texmf-dist/tex/context/base/x-dir-05.mkiv
+++ /dev/null
@@ -1,74 +0,0 @@
-%D \module
-%D [ file=x-dir-05,
-%D version=2003.05.10, % around that time -)
-%D title=\CONTEXT\ Directory Handling,
-%D subtitle=Access,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\setvariables
- [filestate]
- [name=,
- base=,
- type=,
- size=,
- permissions=,
- date=]
-
-% \savefilestate[zip-latest][context/latest/cont-#2.zip]%
-
-% TODO: move to module namespace
-
-\startluacode
- local filestates = { }
- function commands.savefilestate(tag,name)
- if not filestates[tag] then
- local attr = lfs.attributes(name)
- if attr then attr.name = name end
- filestates[tag] = attr
- end
- end
- function commands.getfilestatevariable(tag,name)
- local fs = filestates[tag]
- if fs then
- local value
- if name == "base" then
- value = file.basename(fs.name)
- elseif name == "type" then
- value = file.extname(fs.name)
- elseif name == "date" then
- value = os.date("%Y-%m-%d %H:%M",fs.modification)
- else
- value = fs[name] or ""
- end
- context.sprint(tex.vrbcatcodes,value)
- end
- end
-\stopluacode
-
-\def\getfilestatevariable#1#2%
- {\ctxcommand{getfilestatevariable("#1","#2")}}
-
-\def\savefilestate
- {\dodoubleargument\dosavefilestate}
-
-\def\dosavefilestate[#1][#2]%
- {\ctxcommand{savefilestate("#1","#2")}%
- \setxvariables
- [#1]
- [name={#2},
- base=\getfilestatevariable{#1}{base},
- type=\getfilestatevariable{#1}{type},
- size=\getfilestatevariable{#1}{size},
- date=\getfilestatevariable{#1}{date},
- permissions=\getfilestatevariable{#1}{permissions}]}
-
-\def\getfilestate#1% old one
- {\savefilestate[filestate][#1]}
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-entities.mkiv b/Master/texmf-dist/tex/context/base/x-entities.mkiv
deleted file mode 100644
index 3dd02118adf..00000000000
--- a/Master/texmf-dist/tex/context/base/x-entities.mkiv
+++ /dev/null
@@ -1,18 +0,0 @@
-%D \module
-%D [ file=x-entities,
-%D version=2008.05.29,
-%D title=\CONTEXT\ XML Modules,
-%D subtitle=\HTML\ entities,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 XML Macros / HTML entities}
-
-\ctxlua{characters.registerentities()}
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-fdf-00.mkii b/Master/texmf-dist/tex/context/base/x-fdf-00.mkii
deleted file mode 100644
index fd4bea7e74c..00000000000
--- a/Master/texmf-dist/tex/context/base/x-fdf-00.mkii
+++ /dev/null
@@ -1,41 +0,0 @@
-% <xfdf>
-% <fields>
-% <field name="one">
-% <value>first</value>
-% </field>
-% <field name="two">
-% <value>second</value>
-% </field>
-% </fields>
-% </xfdf>
-%
-% previous method:
-%
-% object
-% data
-% fields
-% field
-
-\defineXMLprocess[fdf:xfdf]
-\defineXMLprocess[fdf:fields]
-\defineXMLignore [fdf:f]
-\defineXMLpush [fdf:value]
-
-\defineXMLenvironment [fdf:field] [name=,value=]
- {\XMLerase{fdf:value}}
- {\gsaveXMLdata{fdf:\XMLop{name}}{fdf:value}}
-
-\defineXMLsingular [fdf:field] [name=,value=]
- {\gsaveXMLasdata{fdf:\XMLop{name}}{\XMLop{value}}}
-
-\def\doifelseFDFfield#1{\doifelseXMLelement{fdf:#1}}
-\def\flushFDFfield #1{\flushXMLelement {fdf:#1}}
-\def\processFDFfield #1{\processXMLelement {fdf:#1}}
-
-\def\loadFDFfile#1%
- {\bgroup
- \autoXMLnamespace[fdf]%
- \processXMLfilegrouped{#1}%
- \egroup}
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-fe.mkii b/Master/texmf-dist/tex/context/base/x-fe.mkii
deleted file mode 100644
index dcf415850a3..00000000000
--- a/Master/texmf-dist/tex/context/base/x-fe.mkii
+++ /dev/null
@@ -1,143 +0,0 @@
-%D \module
-%D [ file=x-fe,
-%D version=2004.03.12, % based on earlier experiments
-%D title=\FOXET,
-%D subtitle=Simple Extensions,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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]
- [category=XML-FO]
- {\expanded{\writestatus{\XMLop{category}}}}
-
-%D Handy
-
-\defineXMLargument
- [fe:trace]
- [attribute=,option=]
- {\showXMLinh[\XMLop{attribute}]%
- \XMLval{fe:trace}{\XMLop{option}}{}}
-
-\mapXMLvalue
- {fe:trace}
- {font}
- {\hbox\bgroup\infofont[%
- \xFOfont/\xFOfontsize/\xFOfontsizeadjust/\xFOfontfamily/\xFOfontweight/\xFOfontstyle/\xFOfontvariant:\FOfontdefinition
- ]\egroup}
-
-%D Extensions:
-
-\startsetups fe:page:option:fit:start
- \startTEXpage[margin=page]
-\stopsetups
-
-\startsetups fe:page:option:fit:stop
- \stopTEXpage
-\stopsetups
-
-\useMPlibrary[pre]
-
-\mapXMLvalue {fe:tracing} {true} {\tracingFOtrue}
-\mapXMLvalue {fe:tracing} {false} {\tracingFOfalse}
-\mapXMLvalue {fe:testgrid} {true} {\setupbackgrounds[page][background=pagegrid]}
-
-\startsetups fe:setup
- \XMLval{fe:tracing} {\XMLop{fe:tracing}} {}
- \XMLval{fe:testgrid}{\XMLop{fe:testgrid}}{}
-\stopsetups
-
-%D Private (testing)
-
-\defineXMLcommand[fe:synchronizeoutput]{\synchronizeoutput}
-
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/x-fig-00.dtd b/Master/texmf-dist/tex/context/base/x-fig-00.dtd
deleted file mode 100644
index 34b4d0bef9b..00000000000
--- a/Master/texmf-dist/tex/context/base/x-fig-00.dtd
+++ /dev/null
@@ -1,24 +0,0 @@
-<!-- author : Taco Hoekwater / Hans Hagen
- info : x-fig-00.tex / x-fig-01.tex
- usage : <!DOCTYPE figurelibrary SYSTEM "x-fig-00.dtd">
- -->
-
-<!ELEMENT figurelibrary (description?,figure*)>
-
-<!ATTLIST figurelibrary language CDATA #IMPLIED>
-<!ATTLIST dummy width CDATA #IMPLIED>
-<!ATTLIST dummy height CDATA #IMPLIED>
-
-<!ELEMENT description (organization?,project?,product?,comment?)>
-<!ELEMENT organization (#PCDATA)>
-<!ELEMENT project (#PCDATA)>
-<!ELEMENT product (#PCDATA)>
-
-<!ELEMENT figure (label,file?,dummy?,copyright?,comment?,status?)>
-<!ELEMENT dummy (#PCDATA)>
-<!ELEMENT file (#PCDATA)>
-<!ELEMENT label (#PCDATA)>
-<!ELEMENT copyright (#PCDATA)>
-<!ELEMENT status (#PCDATA)>
-
-<!ELEMENT comment (#PCDATA)>
diff --git a/Master/texmf-dist/tex/context/base/x-fig-00.mkii b/Master/texmf-dist/tex/context/base/x-fig-00.mkii
deleted file mode 100644
index 2e000c64ca7..00000000000
--- a/Master/texmf-dist/tex/context/base/x-fig-00.mkii
+++ /dev/null
@@ -1,252 +0,0 @@
-%D \module
-%D [ file=x-fig-00,
-%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 ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% \readfile{x-res-04} \donothing \donothing \endinput
-
-% naast label, ook fig als ref en dan naar fig ref springen
-
-%D This module implements an interface to a figure database
-%D and file. The database is formatted in \XML\ conforming
-%D the following \DTD:
-%D
-%D \typefile{x-fig-00.dtd}
-%D
-%D A figure base coded this way looks like:
-%D
-%D \starttyping
-%D <!-- texexec --pdf --use=fig-01 figtest.xml -->
-%D
-%D <figurelibrary language="nl">
-%D
-%D <description>
-%D <organization>PRAGMA Advanced Document Engineering</organization>
-%D <project>Manuals</project>
-%D <product>Beginners Manual</product>
-%D <comment>A bunch of figures.</comment>
-%D </description>
-%D
-%D <figure>
-%D <file>koe.pdf</file>
-%D <label>a dutch cow</label>
-%D <copyright>Corel Draw Suite</copyright>
-%D <comment>I bet that you've seen this cow before.</comment>
-%D </figure>
-%D
-%D <figure>
-%D <dummy width="4cm" height="3cm">non existent</dummy>
-%D <label>a european cow</label>
-%D <copyright>Nobody</copyright>
-%D <comment>When will we talk about European cows?</comment>
-%D </figure>
-%D
-%D </figurelibrary>
-%D \stoptyping
-%D
-%D You can convert this base into a \PDF\ file using
-%D \TEXEXEC\ and another module in this suite.
-%D
-%D \starttyping
-%D texexec --pdf --use=fig-make yourfile.xml
-%D \stoptyping
-%D
-%D You can now select a graphic from this file using the
-%D
-%D \starttyping
-%D \externalfigure[a dutch cow][width=4cm]
-%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 \starttyping
-%D \usemodule [fig-base]
-%D \usefigurebases[yourfile]
-%D \stoptyping
-%D
-%D The special keyword \type {reset} can be used to reset
-%D this list.
-
-%D We park some mkiv code here. Eventually we will hook this into mkiv
-%D searching differently (just a standard feature, no need for loading
-%D modules because we need less code). Actually, what we do here is more
-%D like res-*: we load the xml file once.
-
-% \startluacode
-%
-% document.figurebases = { }
-% document.figurebases.data = { }
-% document.figurebases.found = { }
-%
-% function document.figurebases.find(basename,askedlabel)
-% document.figurebases.found = { }
-% local base = document.figurebases.data[basename]
-% local page = 0
-% if not base then
-% base = xml.load(basename)
-% document.figurebases.data[basename] = base
-% end
-% for e, d, k in xml.elements(base,"figurelibrary/figure/label") do
-% page = page + 1
-% if xml.content(d[k]) == askedlabel then
-% document.figurebases.found = {
-% name = xml.filters.text(e,"file"),
-% page = page,
-% }
-% return true
-% end
-% end
-% return false
-% end
-%
-% function commands.findfigurefilenameinbase(basename,askedlabel)
-% if document.figurebases.find(basename,askedlabel) then
-% commands.xdef("figurefilename",document.figurebases.found.name or "")
-% commands.xdef("figurefilepage",document.figurebases.found.page or "")
-% end
-% end
-%
-% \stopluacode
-%
-% \def\findfigurefilenameinbase#1#2%
-% {\ctxlua{commands.findfigurefilenameinbase("#1","\askedlabel")}}
-
-\startcommands dutch english
- german czech
- italian romanian
-
- usefigurebase: gebruikfiguurbestand usefigurebase
- usefigurebase usefigurebase
- usefigurebase usefigurebase
-
-\stopcommands
-
-\unprotect
-
-\consultutilityfilefalse
-
-\startXMLmapping [-] [figbase]
-
-\defineXMLprocess [figurelibrary]
-\defineXMLignore [description]
-\defineXMLignore [copyright]
-\defineXMLignore [comment]
-\defineXMLignore [status]
-\defineXMLpush [file]
-\defineXMLpush [label]
-\defineXMLpush [dummy]
-\defineXMLenvironment [figure] \figbase@StartFigure \figbase@StopFigure
-
-\stopXMLmapping
-
-\newcounter\figurefilepage
-
-\def\figbase@StartFigure
- {\bgroup}
-
-\def\figbase@StopFigure
- {\doglobal\increment\figurefilepage
- \doif\askedlabel{\XMLpop{label}}
- {\doglobal\settrue\figurefiledone
- \xdef\figurefilename{\XMLpop{file}}\endinput}%
- \egroup}
-
-\def\findfigurefilenameinbase#1#2% sets \figurefilename and \figurefilepage
- {\processXMLfilegrouped{#1}}
-
-\def\getfigurefilename#1#2%
- {\startnointerference
- \traceXMLelementsfalse
- \startXMLmapping[-][figbase]
- \resetfigurefilebase
- \XMLerase{file}
- \XMLerase{dummy}
- \XMLerase{label}
- \xdef\figurefilebase{#1}%
- \doglobal\newcounter\figurefilepage
- \def\askedlabel{#2}
- \processcommacommand[\figurepathlist]\dogetfigurefilename
- \stopXMLmapping
- \stopnointerference}
-
-\globalletempty\figurebasepath
-
-\def\dogetfigurefilename#1%
- {\ifx\figurefilename\empty
- \bgroup
- \xdef\figurefilebasepath{#1}%
- \assignfullfilename{#1}{\figurefilebase}\to\filename
- \doiffileelse{\filename.xml}
- {\doshowfigurestate{base file : \filename}%
- \expanded{\findfigurefilenameinbase{\filename.xml}{\askedlabel}}}
- \donothing
- \ifx\figurefilename\empty\else
-% \globallet\figurefilebase\figurefilebase
- \globallet\figurefilebase\filename % hm, bad omen that this is needed
- \fi
- \egroup
- \fi}
-
-\def\resetfigurefilebase
- {\globalletempty\figurefilebase
- \globalletempty\figurefilename
- \globalletempty\figurefilebasepath
- \globalletempty\figurefilepage}
-
-\def\doanalyzefiguredimensionsfromfile
- {\ifcase\figurestatus \ifx\figurebaselist\empty \else
- \resetfigurefilebase
- \doshowfigurestate{base list : \figurebaselist}%
- \processcommacommand[\figurebaselist]\dodoanalyzefiguredimensionsfromfile
- \ifx\figurefilename\empty
- \doshowfigurestate{base warning : no matching name found}%
- \else
- \doiffileelse{\figurefilebase.pdf}
- {\doshowfigurestate{base file : \figurefilebase.pdf}%
- \doshowfigurestate{base page : \figurefilepage}%
- \let\figurepathlist\figurefilebasepath
- \analyzefigurefilename{\figurefilebase.pdf}\wantedfigurelabel
- \let\wantedfigurepage\figurefilepage}
- {\doshowfigurestate{base missing : \figurefilebase.pdf}}
- \fi
- \ifcase\figurestatus
- \analyzefigurefilename\expandedfigurename\wantedfigurelabel
- \fi
- \fi \fi}
-
-\def\dodoanalyzefiguredimensionsfromfile#1%
- {\doshowfigurestate{base check : \wantedfigurename\space in #1}%
- \getfigurefilename{#1}\wantedfigurename
- \ifx\figurefilename\empty\else
- \quitcommalist
- \fi}
-
-\def\usefigurebase[#1]%
- {\doifelse{#1}\v!reset
- {\let\figurebaselist\empty}
- {\addtocommalist{#1}\figurebaselist}}
-
-\let\figurebaselist\empty
-
-\resetfigurefilebase
-
-\protect \endinput
-
-\usefigurebase[figtest]
-
-\externalfigure[koetje] [width=3cm]
-\externalfigure[de molen op de dijk][width=3cm]
-\externalfigure[de molen op de dijk][width=2cm]
-\externalfigure[weet ik veel] [width=3cm]
-\externalfigure[weet ik veel] [width=2cm]
-\externalfigure[weet ik wat] [width=2cm]
-\externalfigure[koe] [width=2cm]
diff --git a/Master/texmf-dist/tex/context/base/x-fig-00.xsd b/Master/texmf-dist/tex/context/base/x-fig-00.xsd
deleted file mode 100644
index 615841a1e6c..00000000000
--- a/Master/texmf-dist/tex/context/base/x-fig-00.xsd
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0"?>
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
-<xsd:annotation>
- <xsd:documentation xml:lang="en">
- <p>This schema described the figure database. This base
- can be used to collect graphics that later can be used
- in applications like ConTeXt.</p>
- <p>author: Tobias Burnus &amp; Hans Hagen, copyright:
- PRAGMA-ADE / Hasselt NL</p>
- </xsd:documentation>
-</xsd:annotation>
-
-<xsd:element name="figurelibrary" type="figureLibraryType" />
-
-<xsd:element name="comment" type="nonZeroString" />
-
-<xsd:complexType name="figureLibraryType">
- <xsd:sequence>
- <xsd:element name="description" type="descriptionType" />
- <xsd:element name="figure" type="figureType"
- minOccurs="0" maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="language" type="xsd:language" />
-</xsd:complexType>
-
-<xsd:complexType name="descriptionType">
- <xsd:sequence>
- <xsd:element name="organization" type="nonZeroString" />
- <xsd:element name="project" type="nonZeroString" />
- <xsd:element name="product" type="nonZeroString" />
- <xsd:element ref="comment" minOccurs="0" />
- </xsd:sequence>
-</xsd:complexType>
-
-<xsd:complexType name="figureType">
- <xsd:sequence>
- <xsd:choice>
- <xsd:element name="file" type="NZNormalizedString" />
- <xsd:element name="dummy" type="dummyType" />
- </xsd:choice>
- <xsd:element name="label" type="NZNormalizedString" />
- <xsd:element name="copyright" type="nonZeroString" />
- <xsd:element ref="comment" minOccurs="0" />
- </xsd:sequence>
-</xsd:complexType>
-
-<xsd:complexType name="dummyType">
- <xsd:simpleContent>
- <xsd:extension base="nonZeroString">
- <xsd:attribute name="width" type="TeXUnit" use="required" />
- <xsd:attribute name="height" type="TeXUnit" use="required" />
- </xsd:extension>
- </xsd:simpleContent>
-</xsd:complexType>
-
-<xsd:simpleType name="nonZeroString">
- <xsd:restriction base="xsd:string">
- <xsd:minLength value="1" />
- </xsd:restriction>
-</xsd:simpleType>
-
-<xsd:simpleType name="NZNormalizedString">
- <xsd:restriction base="xsd:normalizedString">
- <xsd:minLength value="1" />
- </xsd:restriction>
-</xsd:simpleType>
-
-<xsd:simpleType name="TeXUnit">
- <xsd:restriction base="xsd:string">
- <xsd:pattern
- value='[0-9]*(,|\.|[0-9])?[0-9]*(cm|mm|in|pt|pc|em|ex|bp|dd|cc|sp)' />
- </xsd:restriction>
-</xsd:simpleType>
-
-</xsd:schema>
diff --git a/Master/texmf-dist/tex/context/base/x-fig-01.mkii b/Master/texmf-dist/tex/context/base/x-fig-01.mkii
deleted file mode 100644
index 5a2ea20c83e..00000000000
--- a/Master/texmf-dist/tex/context/base/x-fig-01.mkii
+++ /dev/null
@@ -1,461 +0,0 @@
-%D \module
-%D [ file=x-fig-01,
-%D version=2001.03.21,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Figure Base Generation,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% \readfile {x-res-01} \donothing \donothing \endinput
-
-%D See \type {x-fig-00.tex} for more information on how to use
-%D and generate figure databases. This file loads the file
-%D named \type {\jobfilename} (\TEXEXEC\ will set this
-%D variable). You can apply this style to a database by
-%D saying:
-%D
-%D \starttyping
-%D texexec --pdf --use=fig-make yourfile.xml
-%D \stoptyping
-%D
-%D The following modes are supported:
-%D
-%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 \stoptabulate
-%D
-%D The resulting file has the following characteristics:
-%D
-%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 \item there is no title page, which means that one can
-%D access a figure by page number without offset
-%D \item the document is opened at the first overview page,
-%D that is, when the viewer supports it
-%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 \item the labels can be accessed in an index and list at
-%D the end of the document
-%D \stopitemize
-%D
-%D We use named destinations, which means that one can
-%D access a figure by name from an external application.
-
-\usemodule[fig-00]
-
-\setupoutput[pdftex] \overcomePDFspacefalse
-
-\doifnothing {\jobfilename} {\end}
-\doiffileelse {\jobfilename.xml} {} {\end}
-
-\definesymbol [attachment] [{\bf\color[darkred]{\jobname.xml}}]
-\setupattachments [symbol=attachment]
-\useattachment [datafile] [\jobname.xml]
-
-\def\StartDescription
- {\bgroup
- \defineXMLpush[organization]
- \defineXMLpush[project]
- \defineXMLpush[product]
- \defineXMLpush[comment]}
-
-\def\StopDescription
- {\subject {Figure collection}
- \starttabulate[|lBe|p|]
- \doifXMLdataelse{organization}
- {\NC organization \NC \XMLpop{organization} \NC \NR}{}
- \doifXMLdataelse{project}
- {\NC project \NC \XMLpop{project} \NC \NR}{}
- \doifXMLdataelse{product}
- {\NC product \NC \XMLpop{product} \NC \NR}{}
- \doifXMLdataelse{comment}
- {\NC comment \NC \XMLpop{comment} \NC \NR}{}
- \NC specification \NC \attachment[datafile] \NC \NR
- \stoptabulate
- \blank[2*big]
- \egroup}
-
-\def\StartFigureA
- {\bgroup
- \defineXMLpush[file]
- \XMLassign{file}{buffer}
- \defineXMLpush[dummy]
- \defineXMLpush[label]
- \defineXMLpush[copyright]
- \defineXMLpush[comment]
- \defineXMLpush[status]}
-
-\defineoverlay[page][\overlaybutton{Description}]
-
-\startbuffer
- \framed
- [width=\XMLpar{dummy}{width}{12cm},
- height=\XMLpar{dummy}{height}{8cm},
- background=color,
- backgroundcolor=gray,
- foregroundcolor=darkred,
- frame=off]
- {\bf \XMLpop{dummy}}
-\stopbuffer
-
-\def\StopFigureA
- {\doglobal\increment\CurrentPage
- \setupbackgrounds[page][background=page]
- \doifelsenothing{\XMLpop{label}}
- {\expanded{\definereference[Description][about: \XMLpop{file}]}%
- \pagereference[\XMLpop{file}]}
- {\expanded{\definereference[Description][about: \XMLpop{label}]}%
- \pagereference[\XMLpop{label}]}
- \pagefigure[\XMLpop{file}]
- \setupbackgrounds[page][background=]
- \egroup}
-
-\def\StartFigureB
- {\StartFigureA}
-
-\defineregister
- [figureindex]
- [figureindices]
-
-\setupregister
- [figureindex]
- [ownnumber=yes,
- criterium=text,
- interaction=text,
- indicator=no]
-
-\definelist
- [figurelist]
-
-\setuplist
- [figurelist]
- [criterium=text,
- pagenumber=no,
- width=2em,
- interaction=all]
-
-\setupcolors
- [state=start]
-
-\setuptolerance
- [verytolerant]
-
-% Ugly:
-
-\startnotmode[previewpage-letter,previewpage-S6]
- \enablemode[previewpage-A4]
-\stopnotmode
-
-\startmode[letter] % downward compatible
- \enablemode[previewpage-letter]
-\stopmode
-
-%startbuffer[paper]
-\startsetups[paper]
-\startmode[previewpage-A4]
- \framed
- [width=210mm,height=297mm,offset=overlay,frame=off,
- background=color,backgroundcolor=white]
- {\externalfigure[\XMLpop{file}][reset=yes]}
-\stopmode
-\startmode[previewpage-letter]
- \framed
- [width=8.5in,height=11in,offset=overlay,frame=off,
- background=color,backgroundcolor=white]
- {\externalfigure[\XMLpop{file}][reset=yes]}
-\stopmode
-\startmode[previewpage-S6]
- \framed
- [width=600pt,height=450pt,offset=overlay,frame=off,
- background=color,backgroundcolor=white]
- {\externalfigure[\XMLpop{file}][reset=yes]}
-\stopmode
-\stopsetups
-%stopbuffer
-
-\setupbuttons
- [offset=10pt,
- width=broad,
- strut=no,
- rulethickness=1pt,
- framecolor=darkred]
-
-\def\StopFigureB
- {\par
- \doglobal\increment\CurrentPage
- \doifelsenothing{\XMLpop{label}}
- {\expanded{\definereference[Figure][\XMLpop{file}]}%
- \expanded{\definereference[GridPg][grid:\XMLpop{file}]}}
- {\expanded{\definereference[Figure][\XMLpop{label}]}%
- \expanded{\definereference[GridPg][grid:\XMLpop{label}]}}%
- \button % content in setup
- {\hbox to \hsize
- {\forgetall \dontcomplain
- \doifelsenothing{\XMLpop{label}}
- {\pagereference[about: \XMLpop{file}]}
- {\pagereference[about: \XMLpop{label}]}%
- % moved here, because descriptions may be absent
- \ifnum\CurrentPage=1 \pagereference[begin]\fi
- %
- \expanded{\writetolist[figurelist]{\CurrentPage}{\XMLpop{label}}}%
- \expanded{\figureindex{\CurrentPage}{\XMLpop{label}}}%
- \startnotmode[compact]%
- \vbox to 100pt
- {\hsize30pt
- \vskip5pt
- \hbox to \hsize{\hss\strut\bf\CurrentPage\hss}%
- \vfill}%
- \advance\hsize by -30pt
- \stopnotmode
- \startmode[compact]%
- \advance\hsize by -10pt
- \hskip10pt
- \stopmode
- \button % \framed
- [width=150pt,height=100pt,offset=10pt,frame=off,
- background=color,backgroundcolor=white,color=]
- {\externalfigure
- [\XMLpop{file}]
- [maxheight=80pt,frame=off,maxwidth=130pt,factor=max]}%
- [GridPg]%
- \let\FigWid\figurenaturalwidth
- \let\FigHei\figurenaturalheight
- \advance\hsize by -150pt
- \hskip10pt
- \advance\hsize by -10pt
- \vbox to 100pt
- {\hsize40pt
- %\externalfigure
- % [paper]
- % [type=buffer,frame=on,
- % framecolor=darkred,rulethickness=.5pt,
- % width=40pt,object=no]
- \framed
- [offset=overlay,
- framecolor=darkred,
- rulethickness=.5pt]
- {\scale[width=40pt]{\setups[paper]}}% {\disableXML\getbuffer[paper]}}%
- \startmode[compact]%
- \vfill
- \hbox to \hsize{\hss\strut\bf\CurrentPage\hss}%
- \stopmode
- \vfill}%
- \advance\hsize by -40pt
- \hskip10pt
- \advance\hsize by -10pt
- \vbox to 100pt
- {\blank[disable]
- \starttabulate[|Bel|p|]
- \NC file \NC \XMLpop{file} \NC \NR
- \doifXMLdata{label}
- {\NC label \NC \XMLpop{label} \NC \NR}
- \NC w$\times$h \NC \FigWid$\times$\FigHei \NC \NR
- \doifXMLdata{copyright}
- {\NC copyright \NC \XMLpop{copyright} \NC \NR}
- \doifXMLdata{status}
- {\doifelse{\XMLpop{status}}{obsolete}
- {\NC status \NC \bf\darkred\XMLpop{status} \NC \NR}
- {\NC status \NC \XMLpop{status} \NC \NR}}
- \doifXMLdata{comment}
- {\NC comment \NC \XMLpop{comment} \NC \NR}
- \stoptabulate
- \vfill}}}%
- [Figure]
- \vskip10pt
- \egroup}
-
-\def\StartFigureC
- {\StartFigureA}
-
-\def\StopFigureC
- {\doglobal\increment\NumberOfFigures
- \egroup}
-
-\setuplayout
- [topspace=15pt,backspace=15pt,
- header=0pt,footer=0pt,bottom=20pt,bottomdistance=10pt,
- width=middle,height=fit]
-
-\setupbackgrounds
- [page]
- [background=,
- backgroundcolor=gray]
-
-\setupinteractionscreen
- [width=max,
- height=max]
-
-\setupcolors
- [state=start]
-
-\setupinteraction
- [style=,
- color=,
- contrastcolor=,
- state=start]
-
-\setuphead
- [section]
- [style=bfb]
-
-\setupbodyfont
- [pos]
-
-\setupinteractionmenu
- [bottom]
- [left=\hfill,
- middle=\hskip10pt,
- frame=off,
- style=bold,
- background=color,
- backgroundcolor=darkred,
- foregroundcolor=white]
-
-\startinteractionmenu[bottom]
- \but [begin] begin \\
- \but [index] index \\
- \but [list] list \\
- \but [CloseDocument] close \\
- \but [PreviousJump] go back \\
-\stopinteractionmenu
-
-\setupinteraction
- [openaction=begin]
-
-\defineXMLenvironment [figurelibrary] \StartLibrary \StopLibrary
-
-\starttext
-
-\def\StartLibrary{\mainlanguage[\XMLpar{figurelibrary}{language}{en}]}
-\def\StopLibrary {}
-
-\defineXMLignore [description]
-\defineXMLenvironment [figure] \StartFigureC \StopFigureC
-
-\doglobal\newcounter\CurrentPage
-
-\processXMLfilegrouped{\jobfilename.xml}
-
-\increment\NumberOfFigures
-
-\defineXMLignore [description]
-\defineXMLenvironment [figure] \StartFigureA \StopFigureA
-
-\doglobal\newcounter\CurrentPage
-
-\processXMLfilegrouped{\jobfilename.xml}
-
-\setuppapersize
- [S6][S6]
-
-\setupbackgrounds
- [page]
- [background=color]
-
-\setupinteraction
- [menu=on]
-
-\defineXMLenvironment [description] \StartDescription \StopDescription
-\defineXMLenvironment [figure] \StartFigureB \StopFigureB
-
-\doglobal\newcounter\CurrentPage
-
-\processXMLfilegrouped{\jobfilename.xml} \page
-
-\subject [list] {List of figures}
-
-\placelist[figurelist] \page
-
-\subject [index] {Index of figures}
-
-\startcolumns
-\placeregister[figureindex]
-\stopcolumns
-
-\doifmodeelse{clipgrid-distance,clipgrid-steps}{\page}{\stoptext}
-
-\startuniqueMPgraphic{clipgrid}{dx,dy,nx,ny,type}
- numeric gdx, gdy, lbx, lby ;
- if \MPvar{type}=1 :
- gdx := \MPvar{dy} ;
- gdy := \MPvar{dx} ;
- else :
- gdx := OverlayWidth /\MPvar{nx} ;
- gdy := OverlayHeight/\MPvar{ny} ;
- fi ;
- lbx := gdx ;
- lby := gdy ;
- defaultfont := "\truefontname{Mono}" ;
- defaultscale := .5 ;
- numeric pen ; pen := .25pt ;
- def MyGrid text t =
- draw vlingrid (0,OverlayWidth ,gdy,OverlayWidth ,OverlayHeight) t ;
- draw hlingrid (0,OverlayHeight,gdx,OverlayHeight,OverlayWidth ) t ;
- enddef ;
- pickup pencircle scaled pen ;
- MyGrid withcolor white ;
- MyGrid dashed evenly scaled pen ;
- draw OverlayBox withcolor white ;
- draw OverlayBox dashed evenly scaled pen ;
- draw vlinlabel.bot(0,eps+OverlayWidth /lby,2,OverlayWidth ) ;
- draw hlinlabel.lft(0,eps+OverlayHeight/lbx,2,OverlayHeight) ;
- setbounds currentpicture to OverlayBox enlarged (2*EmWidth) ;
-\stopuniqueMPgraphic
-
-\presetMPvariable[clipgrid][dx=10pt]
-\presetMPvariable[clipgrid][dy=10pt]
-\presetMPvariable[clipgrid][nx=10]
-\presetMPvariable[clipgrid][ny=10]
-
-\startmode[clipgrid-distance]
- \defineoverlay[grid][\uniqueMPgraphic{clipgrid}{type=1}]
-\stopmode
-
-\startmode[clipgrid-steps]
- \defineoverlay[grid][\uniqueMPgraphic{clipgrid}{type=2}]
-\stopmode
-
-\setupexternalfigures
- [background={color,foreground,grid},
- backgroundcolor=white]
-
-\def\StartFigureD
- {\StartFigureA}
-
-\def\StopFigureD
- {\doglobal\increment\CurrentPage
- \setupbackgrounds[page][background=page]
- \startpagefigure[\XMLpop{file}][offset=20pt]%
- \doifelsenothing{\XMLpop{label}}
- {\expanded{\definereference[Description][about: \XMLpop{file}]}%
- \pagereference[grid:\XMLpop{file}]}
- {\expanded{\definereference[Description][about: \XMLpop{label}]}%
- \pagereference[grid:\XMLpop{label}]}
- \stoppagefigure
- %\pagefigure[\XMLpop{file}][offset=20pt]
- \setupbackgrounds[page][background=]
- \egroup}
-
-\defineXMLignore
- [description]
-
-\defineXMLenvironment
- [figure]
- \StartFigureD
- \StopFigureD
-
-\doglobal\newcounter\CurrentPage
-
-\processXMLfilegrouped{\jobfilename.xml} \page
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/x-fig-02.mkii b/Master/texmf-dist/tex/context/base/x-fig-02.mkii
deleted file mode 100644
index a8232fba9e1..00000000000
--- a/Master/texmf-dist/tex/context/base/x-fig-02.mkii
+++ /dev/null
@@ -1,78 +0,0 @@
-%D \module
-%D [ file=x-fig-02,
-%D version=2001.03.21,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Figure Base Inclusion (I),
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% \readfile {x-res-02} \donothing \donothing \endinput
-
-%D This module enables non||\ConTeXt\ users to access the
-%D database. For this, you need to run
-%D
-%D \starttyping
-%D texexec --pdf --use=fig-fake yourfile.xml
-%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 \starttyping
-%D \getfigurefile{label}
-%D \getfigurepage{label}
-%D \stoptyping
-%D
-%D A a bonus, the following macro is defined:
-%D
-%D \starttyping
-%D \includefigurefile width 10cm {label}
-%D \stoptyping
-
-\usemodule[fig-00]
-
-\doifnothing {\jobfilename} {\end}
-\doiffileelse {\jobfilename.xml} {} {\end}
-
-\defineXMLenvironment [figurelibrary] \StartLibrary \StopLibrary
-\defineXMLignore [description]
-\defineXMLenvironment [figure] \StartFigure \StopFigure
-
-\def\StartLibrary
- {\immediate\openout \scratchwrite=\jobfilename.fig
- \immediate\write\scratchwrite{\string\input\space x-fig-03.tex \string\relax}
- \immediate\write\scratchwrite{}}
-
-\def\StopLibrary
- {\immediate\write\scratchwrite{}
- \immediate\write\scratchwrite{\string\endinput}
- \immediate\closeout\scratchwrite}
-
-\def\StartFigure
- {\defineXMLpush[file]
- \defineXMLpush[dummy]
- \defineXMLpush[label]
- \defineXMLpush[copyright]
- \defineXMLpush[comment]
- \defineXMLpush[status]}
-
-\def\StopFigure
- {\doglobal\increment\CurrentPage
- \immediate\write\scratchwrite
- {\string\setfiguredata\space
- {\XMLpop{label}}
- {\jobfilename}
- {\CurrentPage}}}
-
-\doglobal\newcounter\CurrentPage
-
-\starttext
-
-\processXMLfilegrouped{\jobfilename.xml}
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/x-fig-03.mkii b/Master/texmf-dist/tex/context/base/x-fig-03.mkii
deleted file mode 100644
index c7f03453e09..00000000000
--- a/Master/texmf-dist/tex/context/base/x-fig-03.mkii
+++ /dev/null
@@ -1,44 +0,0 @@
-%D \module
-%D [ file=x-fig-03,
-%D version=2001.03.21,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Figure Base Inclusion (II),
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 \undefined \convertMPtoPDF \input supp-pdf.mkii \fi
-\ifx \undefined \includefigurefile \else \expandafter \endinput \fi
-
-\gdef\getfigurefile#1%
- {\expandafter\ifx\csname x-fig-f-#1\endcsname\relax
- \currentfigurefile
- \else
- \csname x-fig-f-#1\endcsname
- \fi}
-
-\gdef\getfigurepage#1%
- {\expandafter\ifx\csname x-fig-p-#1\endcsname\relax
- 1%
- \else
- \csname x-fig-p-#1\endcsname
- \fi}
-
-\gdef\setfiguredata#1#2#3%
- {\gdef\currentfigurefile{#2}%
- \expandafter\gdef\csname x-fig-f-#1\endcsname{#2}%
- \expandafter\gdef\csname x-fig-p-#1\endcsname{#3}}
-
-\def\includefigurefile#1#%
- {\doincludefigurefile{#1}}
-
-\def\doincludefigurefile#1#2%
- {\edef\next{\noexpand\pdfimage
- #1 page \getfigurepage{#2} {\getfigurefile{#2}.pdf}}%
- \next}
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-fo.mkii b/Master/texmf-dist/tex/context/base/x-fo.mkii
deleted file mode 100644
index 3631f6d7e14..00000000000
--- a/Master/texmf-dist/tex/context/base/x-fo.mkii
+++ /dev/null
@@ -1,4057 +0,0 @@
-%D \module
-%D [ file=x-fo,
-%D version=2004.03.12, % based on earlier experiments
-%D title=\FOXET,
-%D subtitle=Formatting Objects,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% \showframe
-
-% This is a first implementation, maybe I will write another one with mixed
-% element indifferent vars and something 'when set, act upon it, and forget',
-% for instance: in each element check if font set, if so, change font and
-% reset font attributes. I'm not sure if this is wise.
-
-% todo: global assignment in order to limit restore
-% todo: combine mp graphics (see end) saves 30%
-% todo: using contants and variables (for internal use)
-
-% todo: language at more levels
-
-% beware: aftergroup vs egroup/endgroup
-
-\useXMLfilter[prs,run]
-
-\unprotect
-
-% syst-new.tex
-
-\long\def\unstringed#1% " ' space
- {\csname\ifcsname @u@s@#1\endcsname @u@s@#1\else\s!empty\fi\endcsname#1}
-
-\long\setvalue{@u@s@"}#1#2"{#2}
-\long\setvalue{@u@s@'}#1#2'{#2}
-\long\setvalue{@u@s@ }#1#2 {#2}
-
-% xtag-ini
-
-\def\letXMLpar #1#2{\@EA \let\csname\@@XMLvariable:#1:#2\endcsname}
-\def\setXMLpar #1#2{\@EA \def\csname\@@XMLvariable:#1:#2\endcsname}
-\def\setXMLepar#1#2{\@EA\edef\csname\@@XMLvariable:#1:#2\endcsname}
-
-\protect
-
-%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 purpose of testing.
-
-\startmode[fo-verbose]
- \def\writeFOstatus{\writestatus{XML-FO}}
-\stopmode
-
-\startnotmode[fo-verbose]
- \let\writeFOstatus\gobbleoneargument
-\stopnotmode
-
-%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,singlesided}, % sic
- 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=0pt,%\XMLop{padding},
- padding-after=0pt,%\XMLop{padding},
- padding-start=0pt,%\XMLop{padding},
- padding-end=0pt,%\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=0pt,% \XMLop{margin},
- margin-bottom=0pt,% \XMLop{margin},
- margin-left=0pt,% \XMLop{margin},
- margin-right=0pt,% \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 % for practical reasons we inherit along the whole chain
- [fo:inherited] % unless we implement relax skipping
- [text-altitude=,
- text-depth=]
-
-\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[inherit]
-
-%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
- \doifsomething{\XMLop{language}}{\mainlanguage[\XMLop{language}]}% todo, everywhere
-\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}}
-
- % we need to freeze the lineheight here
-
- \expanded{\definecolumnset
- [fo:set]
- [n=\XMLpar{fo:region-body}{column-count}{1},
- distance=\FOcolumngap]}
-
- \expanded{\definecolumnsetspan
- [fo:set]
- [n=\XMLpar{fo:region-body}{column-count}{1}]}
-
- \directsetup{fo:font:setup} % else problems
-
- \directsetup{fo:line-height:setup}
-
-% \parseXMLattributes{fo:flow}{line-height='normal'}
-
- \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=0deg,
-% writing-mode=
-
-\defineXMLenvironment
- [fo:simple-page-master-do]
- [\XMLattributeset{fo:inherited}, % added
- \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} {0deg} {0}
-\mapXMLvalue {fo:reference-orientation} {90deg} {90}
-\mapXMLvalue {fo:reference-orientation} {180deg} {180}
-\mapXMLvalue {fo:reference-orientation} {270deg} {270}
-\mapXMLvalue {fo:reference-orientation} {-90deg} {270}
-\mapXMLvalue {fo:reference-orientation} {-180deg} {180}
-\mapXMLvalue {fo:reference-orientation} {-270deg} {90}
-
-\startsetups fo:simple-page-master:start
-
- % nothing
-
-\stopsetups
-
-% can be low level tex
-
-\startsetups fo:simple-page-master:stop
-
- \writeFOstatus{defining papersize '\directsetup{fo:layout:kind}'}
-
- \expanded
- {\definepapersize
- [\directsetup{fo:layout:kind}]
- [width=\XMLop{page-width},
- height=\XMLop{page-height}]}
-
- \checkFOpadding {fo:region-body}
- \checkFOmargin {fo:region-body}
- \checkFOmargin {fo:simple-page-master-do}
-
- \writeFOstatus{defining layout '\directsetup{fo:layout:kind}'}
-
- \FOscratchMT\paperheight \setpercentdimen\FOscratchMT{\XMLpar{fo:simple-page-master-do}{margin-top} \zeropoint}
- \FOscratchMB\paperheight \setpercentdimen\FOscratchMB{\XMLpar{fo:simple-page-master-do}{margin-bottom}\zeropoint}
- \FOscratchML\paperwidth \setpercentdimen\FOscratchML{\XMLpar{fo:simple-page-master-do}{margin-left} \zeropoint}
- \FOscratchMR\paperwidth \setpercentdimen\FOscratchMR{\XMLpar{fo:simple-page-master-do}{margin-right} \zeropoint}
-
- \FOscratchRB\paperheight \setpercentdimen\FOscratchRB{\XMLpar{fo:region-body}{margin-top} \zeropoint}
- \FOscratchRA\paperheight \setpercentdimen\FOscratchRA{\XMLpar{fo:region-body}{margin-bottom}\zeropoint}
- \FOscratchRS\paperwidth \setpercentdimen\FOscratchRS{\XMLpar{fo:region-body}{margin-left} \zeropoint}
- \FOscratchRE\paperwidth \setpercentdimen\FOscratchRE{\XMLpar{fo:region-body}{margin-right} \zeropoint}
-
- \FOscratchPB\paperheight \setpercentdimen\FOscratchPB{\XMLpar{fo:region-body}{padding-top} \zeropoint}
- \FOscratchPA\paperheight \setpercentdimen\FOscratchPA{\XMLpar{fo:region-body}{padding-bottom}\zeropoint}
- \FOscratchPS\paperwidth \setpercentdimen\FOscratchPS{\XMLpar{fo:region-body}{padding-left} \zeropoint}
- \FOscratchPE\paperwidth \setpercentdimen\FOscratchPE{\XMLpar{fo:region-body}{padding-right} \zeropoint}
-
- \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(\FOscratchML+\FOscratchPS+\FOscratchRS),
- cutspace=\the\dimexpr(\FOscratchMR+\FOscratchPE+\FOscratchRE),
- topspace=\the\dimexpr(\FOscratchMT+\FOscratchPB+\FOscratchRB),
- bottomspace=\the\dimexpr(\FOscratchMB+\FOscratchPA+\FOscratchRA)]}
-
- \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 \writeFOstatus{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]
-% {\writeFOstatus{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},
- fe:z-order=above,
- clip=,
- column-count=1,
- column-gap=12pt,
- overflow=,
- region-name=]
- {\directsetup{fo:region-body:process}}
-
-\startsetups fo:region-body:process
- \writeFOstatus{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} {any} {rest} % todo
-\mapXMLvalue {fo:page-position} {first} {current}
-\mapXMLvalue {fo:page-position} {last} {last} % todo
-\mapXMLvalue {fo:page-position} {rest} {rest} % todo
-
-%mapXMLvalue {fo:blank-or-not-blank} {any} {} % todo
-%mapXMLvalue {fo:blank-or-not-blank} {not-blank} {} % todo
-%mapXMLvalue {fo:blank-or-not-blank} {blank} {} % 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}
- {\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 : <color> | inherit
-% border-before-style : <border style> | inherit
-% border-before-width.length|conditional : <border 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
- \writeFOstatus{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}
- \checkFOmargin {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\FOscratchPB \newdimen\FOscratchPA \newdimen\FOscratchPS \newdimen\FOscratchPE
-\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}
- {\XMLpar{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}
- {\XMLpar{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
- {\writeFOstatus{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}
-
- \checkFOmargin{fo:simple-page-master-do}
-
- \FOscratchMT\paperheight \setpercentdimen\FOscratchMT{\XMLpar{fo:simple-page-master-do}{margin-top} \zeropoint}
- \FOscratchMB\paperheight \setpercentdimen\FOscratchMB{\XMLpar{fo:simple-page-master-do}{margin-bottom}\zeropoint}
- \FOscratchML\paperwidth \setpercentdimen\FOscratchML{\XMLpar{fo:simple-page-master-do}{margin-left} \zeropoint}
- \FOscratchMR\paperwidth \setpercentdimen\FOscratchMR{\XMLpar{fo:simple-page-master-do}{margin-right} \zeropoint}
-
- \doif{\XMLpar{fo:region-body}{fe:z-order}{above}}{below}{\directsetup{fo:regions:process:body}}
-
- \FOscratchRB\paperheight \setpercentdimen\FOscratchRB{\XMLpar{fo:region-before}{extent}\zeropoint}
- \FOscratchRA\paperheight \setpercentdimen\FOscratchRA{\XMLpar{fo:region-after} {extent}\zeropoint}
- \FOscratchRS\paperwidth \setpercentdimen\FOscratchRS{\XMLpar{fo:region-start} {extent}\zeropoint}
- \FOscratchRE\paperwidth \setpercentdimen\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}}}
-
- \doif{\XMLpar{fo:region-body}{fe:z-order}{above}}{above}{\directsetup{fo:regions:process:body}}
-
-\stopsetups
-
-\newdimen\FOscratchEB
-\newdimen\FOscratchEA
-
-\chardef\FOregionmode\zerocount
-
-\startmode[fo-pt]
- \chardef\FOregionmode\plusone % fotex mode -)
-\stopmode
-
-\startsetups fo:regions:modes
-
- \ifcase\FOregionmode
- \FOscratchEB\zeropoint
- \FOscratchEA\zeropoint
- \or
- \FOscratchEB\paperheight \setpercentdimen\FOscratchEB{\XMLpar{fo:region-before}{extent}\zeropoint}
- \FOscratchEA\paperheight \setpercentdimen\FOscratchEA{\XMLpar{fo:region-after} {extent}\zeropoint}
- \else
- \FOscratchEB\zeropoint
- \FOscratchEA\zeropoint
- \fi
-
-\stopsetups
-
-\startsetups fo:regions:process:body
-
- \bgroup
-
- \FOscratchRB\paperheight \setpercentdimen\FOscratchRB{\XMLpar{fo:region-body}{margin-top} \zeropoint}
- \FOscratchRA\paperheight \setpercentdimen\FOscratchRA{\XMLpar{fo:region-body}{margin-bottom}\zeropoint}
- \FOscratchRS\paperwidth \setpercentdimen\FOscratchRS{\XMLpar{fo:region-body}{margin-left} \zeropoint}
- \FOscratchRE\paperwidth \setpercentdimen\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}
-
- \egroup
-
-\stopsetups
-
-\startsetups fo:regions:process:true:true
-
- \directsetup{fo:regions:modes}
-
- \ifdim\FOscratchRB>\zeropoint \FOregionbuilder
- {region-before}{lefttop}
- {\FOscratchML}{\FOscratchMT-\FOscratchEB}
- {\paperwidth-\FOscratchML-\FOscratchMR}{\FOscratchRB}
- \fi \ifdim\FOscratchRA>\zeropoint \FOregionbuilder
- {region-after}{leftbottom}
- {\FOscratchML}{\FOscratchMB-\FOscratchEA}
- {\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
-
- \directsetup{fo:regions:modes}
-
- \ifdim\FOscratchRB>\zeropoint \FOregionbuilder
- {region-before}{lefttop}
- {\FOscratchML+\FOscratchRS}{\FOscratchMT-\FOscratchEB}
- {\paperwidth-\FOscratchML-\FOscratchMR-\FOscratchRS-\FOscratchRE}{\FOscratchRB}
- \fi \ifdim\FOscratchRA>\zeropoint \FOregionbuilder
- {region-after}{leftbottom}
- {\FOscratchML}{\FOscratchMB-\FOscratchEA}
- {\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
-
- \directsetup{fo:regions:modes}
-
- \ifdim\FOscratchRB>\zeropoint \FOregionbuilder
- {region-before}{lefttop}
- {\FOscratchML}{\FOscratchMT-\FOscratchEB}
- {\paperwidth-\FOscratchML-\FOscratchMR}{\FOscratchRB}
- \fi \ifdim\FOscratchRA>\zeropoint \FOregionbuilder
- {region-after}{leftbottom}
- {\FOscratchML+\FOscratchRS}{\FOscratchMB-\FOscratchEA}
- {\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
-
- \directsetup{fo:regions:modes}
-
- \ifdim\FOscratchRB>\zeropoint \FOregionbuilder
- {region-before}{lefttop}
- {\FOscratchML+\FOscratchRS}{\FOscratchMT-\FOscratchEB}
- {\paperwidth-\FOscratchML-\FOscratchMR-\FOscratchRS-\FOscratchRE}{\FOscratchRB}
- \fi \ifdim\FOscratchRA>\zeropoint \FOregionbuilder
- {region-after}{leftbottom}
- {\FOscratchML+\FOscratchRS}{\FOscratchMB-\FOscratchEA}
- {\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
-
- \writeFOstatus{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}
-
-\startsetups fo:block:start
-
- \endgraf
-
- \writeFOstatus{fo:block in line \the\inputlineno}
-
-\doif{\XMLpar{fo:block}{span}{}}{all}{\ifinsidecolumns \startcolumnsetspan[fo:set] \fi}
-
- \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
-
- \directsetup{fo:line-height:setup}
-
- \directsetup{fo:indent:setup}% hier ?
-
- \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}
- \directsetup{fo:margin:setup}
-
- \doif{\XMLop{wrap-option}}{no-wrap}
- {\obeylines}
-
- \doif{\XMLop{white-space-collapse}}{false}
- {\obeyspaces}
-
- % todo : remember old one and do like fonts
-
- \directsetup{fo:textindent:setup}
-
-\stopsetups
-
-\startsetups fo:block:stop
-
- \endstrut \endgraf
-
- \getvalue{stopFOattribute-\FOblocklevel}
-
- \endgraf
-
- \endgroup
-
- \directsetup{fo:break-and-space:after}
-
- \endgroup
-
- \doif{\XMLpar{fo:block}{span}{}}{all}{\ifinsidecolumns \stopcolumnsetspan \fi}
-
-\stopsetups
-
-\startsetups fo:textindent:setup
-
- \edefXMLinh\xFOtextindent{text-indent}
-
- \doifsomething\xFOtextindent
- {\scratchdimen\hsize
- \setpercentdimen\scratchdimen\xFOtextindent
- \expanded{\setupindenting[\the\scratchdimen]}}
-
-\stopsetups
-
-\indenting[always] % can be zero points
-
-% 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} {\nobreak}
-
-\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}}{}
-
- \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
-
- \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
-
- \doFOafterskip\currentXMLelement
-
- \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}
-
-% \FOattributeT
-% \FOattributeR
-% \FOattributeB
-% \FOattributeL
-
-
-\stopsetups
-
-\mapXMLvalue {fo:align} {center} {\raggedcenter}
-\mapXMLvalue {fo:align} {left} {\raggedright}
-\mapXMLvalue {fo:align} {right} {\raggedleft}
-\mapXMLvalue {fo:align} {begin} {\raggedright}
-\mapXMLvalue {fo:align} {start} {\raggedright}
-\mapXMLvalue {fo:align} {end} {\raggedleft}
-
-\mapXMLvalue {fo:align-key} {center} {middle}
-\mapXMLvalue {fo:align-key} {left} {flushleft}
-\mapXMLvalue {fo:align-key} {right} {flushright}
-\mapXMLvalue {fo:align-key} {begin} {flushleft}
-\mapXMLvalue {fo:align-key} {start} {flushleft}
-\mapXMLvalue {fo:align-key} {end} {flushright}
-
-\startsetups fo:align:setup
-
- \XMLval{fo:align}{\XMLop{text-align}}{}
-
-\stopsetups
-
-\startsetups fo:margin:setup
-
- \checkFOmargin{fo:block}
-
- \FOscratchML \XMLpar{fo:block}{margin-left} \zeropoint
- \FOscratchMR \XMLpar{fo:block}{margin-right} \zeropoint
- \FOscratchMT \XMLpar{fo:block}{margin-top} \zeropoint
- \FOscratchMB \XMLpar{fo:block}{margin-bottom}\zeropoint
-
- \advance\leftskip \FOscratchML
- \advance\rightskip\FOscratchMR
-
-\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
-
-% 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:Times:small-caps] [Times-Roman]
-\definefontsynonym [FO:Times:bold:small-caps] [Times-Bold]
-\definefontsynonym [FO:Times:italic:small-caps] [Times-Italic]
-\definefontsynonym [FO:Times:bold:italic:small-caps] [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:Helvetica:small-caps] [Helvetica]
-\definefontsynonym [FO:Helvetica:bold:small-caps] [Helvetica-Bold]
-\definefontsynonym [FO:Helvetica:italic:small-caps] [Helvetica-Italic]
-\definefontsynonym [FO:Helvetica:bold:italic:small-caps] [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:Courier:small-caps] [Courier]
-\definefontsynonym [FO:Courier:bold:small-caps] [Courier-Bold]
-\definefontsynonym [FO:Courier:italic:small-caps] [Courier-Oblique]
-\definefontsynonym [FO:Courier:bold:italic:small-caps] [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=\bodyfontsize
-
- \def\FOfontsize {10pt}% {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
-
-\def\FOfontdefinition{}
-\def\FOfontname {}
-
-\directsetup{fo:fonts:reset}
-
-% test for \FOfontvariant: normal or else
-
-\def\setFOfontname
- {\edef\xFOfontname{FO:\FOfontfamily:\FOfontweight:\FOfontstyle:\FOfontvariant}%
- %\begingroup\infofont\xFOfontname]\endgroup
- \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}
-
-% \edef\xFOfont {\XMLpar{fo}{font}{}}
-% \edef\xFOfontsize {\XMLpar{fo}{font-size}{}}
-% \edef\xFOfontsizeadjust{\XMLpar{fo}{font-size-adjust}{}}
-% \edef\xFOfontfamily {\XMLpar{fo}{font-family}{}}
-% \edef\xFOfontweight {\XMLpar{fo}{font-weight}{}}
-% \edef\xFOfontstyle {\XMLpar{fo}{font-style}{}}
-% \edef\xFOfontvariant {\XMLpar{fo}{font-variant}{}}
-
- \donefalse
-
- \ifx\xFOfont\empty \else \ifx\xFOfont\relax \else
- \let\FOfont\xFOfont
- \checkFOfont\FOfont
- \fi \fi
-
- \ifx\xFOfontsize\empty \else \ifx\xFOfontsize\FOfontsize \else
- \let\FOfontsize\xFOfontsize
- \doifXMLvalelse{fo:font-size}\FOfontsize
- {\XMLval{fo:font-size}\FOfontsize\empty}
- {\setpercentdimen\dFOfontsize\FOfontsize}
- \fi \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
- \ifx\FOfontname\empty % klopt dit
- \edef\xFOfontdefinition{\purefontname{\font} at \the\dimexpr(\FOfontsizeadjust\dFOfontsize)}
-% \let\xFOfontdefinition\empty
- \else
- \edef\xFOfontdefinition{\FOfontname\space at \the\dimexpr(\FOfontsizeadjust\dFOfontsize)}
- \fi
- \else
- \edef\xFOfontdefinition{\purefontname{\font} at \the\dimexpr(\FOfontsizeadjust\dFOfontsize)}
- \fi
-
- \ifx\xFOfontdefinition\empty \else
- \ifx\FOfontdefinition\xFOfontdefinition
- \else
- \let\FOfontdefinition\xFOfontdefinition
- \expanded{\definedfont[\FOfontdefinition]}
- \fi
- \fi
-
-\stopsetups
-
-\newdimen\dFOlineheight
-\newdimen\dFOdepth
-\newdimen\dFOaltitude
-
-\let\FOlineheight \empty
-\let\FOtextdepth \empty
-\let\FOtextaltitude\empty
-
-\startsetups fo:line-height:setup
-
- \edefXMLinh\xFOtextdepth {text-depth}
- \edefXMLinh\xFOtextaltitude{text-altitude}
- \edefXMLinh\xFOlineheight {line-height}
-
-% \edef\xFOtextdepth {\XMLpar{fo}{text-depth}{}}
-% \edef\xFOtextaltitude{\XMLpar{fo}{text-altitude}{}}
-% \edef\xFOlineheight {\XMLpar{fo}{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 \dFOaltitude\strutheight \advance\dFOaltitude\strutdepth
- \setpercentdimen\dFOaltitude\FOtextaltitude
- \setupinterlinespace[minheight=\dFOaltitude]}
- \fi \fi
-
-\ifinsidecolumns \else
-
- \ifx\xFOlineheight\empty \else \ifx\xFOlineheight\FOlineheight \else
- \let\FOlineheight\xFOlineheight
- \doifelse\FOlineheight{normal}
- {\dFOlineheight2.8ex
- \setupinterlinespace[line=\dFOlineheight]}
- {\doifnot\FOlineheight{use-font-metrics}
- {\setstrut \dFOlineheight\strutheight \advance\dFOlineheight\strutdepth
- \setpercentdimen\dFOlineheight\FOlineheight
- \setupinterlinespace[line=\dFOlineheight]}}
- \fi \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}
-
-% \edef\xFOhyphenate {\XMLpar{fo}{hyphenate}{}}
-% \edef\xFOwidows {\XMLpar{fo}{widows}{}}
-% \edef\xFOorphans {\XMLpar{fo}{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}}
-
- \iftracingFO \tracelayerstrue \fi
-
- \directsetup{fo:preset:layer}
-
- \setlayerframed
- [\XMLpar{fo:flow}{flow-name}{xsl-region-body}]
- [frame=off,
- 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
-
-% \rotate[rotation=-\XMLop{glyph-orientation-horizontal}]
-
- \doifsomethingXMLop{glyph-orientation-horizontal}
- {\rotate[rotation=\XMLval{fo:reference-orientation}{\XMLop{glyph-orientation-horizontal}}{0}]}
- {\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=,
-% 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}}{scale-to-fit}% is this official ?
- {\FOgraphicwidth\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}}{scale-to-fit}% is this official ?
- {\FOgraphicwidth\zeropoint}
- {\doifelse{\XMLop{content-width}}{auto}
- {\FOgraphicwidth\zeropoint}
- {\FOgraphicwidth1em
- \setpercentdimen\FOgraphicwidth {\XMLop{content-width}}}}}
-
- % leeg maken vars gaat ook goed, dan een \externalfigure
-
- % todo : height/width scale-to-fit: factor=...
-
- \setbox\scratchbox\hbox
- {\setFOimagename{\XMLpar{fo:external-graphic}{src}{dummy}}
- \ifdim\FOgraphicheight>\zeropoint
- \ifdim\FOgraphicwidth>\zeropoint
- \externalfigure[\FOimagename][height=\FOgraphicheight,width=\FOgraphicwidth]
- \else
- \externalfigure[\FOimagename][height=\FOgraphicheight]
- \fi
- \else
- \ifdim\FOgraphicwidth>\zeropoint
- \externalfigure[\FOimagename][width=\FOgraphicwidth]
- \else
- \externalfigure[\FOimagename]
- \fi
- \fi}
-
- \dontleavehmode \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}
-
-\defineXMLsingular
- [fo:inline]
- {}
-
-% baseline-shift: baseline sub super % dimen inherit
-
-\chardef\isolatedwordsmode=1
-
-\newdimen\wordshiftamount
-
-\def\shiftedword{\raise\wordshiftamount\hbox}
-
-\long\def\shiftedwords#1{\processisolatedwords{#1}\shiftedword}
-\long\def\normalwords #1{\processisolatedwords{#1}\hbox}
-\long\def\highwords #1{\processisolatedwords{#1}\high}
-\long\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
-
- \doFOreference{fo:inline}
-
- \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
-
-\enableparpositions % slows down but who uses fo anyway ...
-
-\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:\number\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
- %edefXMLinh \FOlepatwd {leader-pattern-width}
- \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
-
-\defineconversion[1][\numbers]
-
-\long\def\handleFOformat#1#2%
- {\defconvertedargument\ascii{#2}%
- \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=,
-% text-indent=0pt, % yes or no?
- width=]
- {\beginXMLelement
- \bTABLE % [option=stretch] %
- \newcounter\FOtablecolumn}
- {\eTABLE
- \endXMLelement}
-
-\newdimen\FOtableW
-\newdimen\FOtableH
-
-\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=]
- {\directsetup{fo:table-column:action}}
-
-% \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\bTABLEhead}
- {\eTABLEhead\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\bTABLEfoot}
- {\eTABLEfoot\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
- \directsetup{fo:table-row:start}%
- \expanded{\bTR[\the\scratchtoks]}%
- \beginXMLelement}
- {\endXMLelement
- \eTR
- \directsetup{fo:table-row:stop}
- \endXMLelement}
-
-\startsetups fo:table-row:start
-
- \inTABLErowtrue
-
- \scratchtoks\emptytoks
-
- \doifsomething{\XMLop{height}}
- {\FOtableH\textheight
- \setpercentdimen\FOtableH{\XMLop{height}}
- \appendetoks
- height=\the\FOtableH
- \to \scratchtoks}
-
- \appendetoks
- ,extras={\rescanXMLattributes{fo:table-row}}
- \to\scratchtoks
-
-\stopsetups
-
-\startsetups fo:table-row:stop
-
- \inTABLErowfalse
-
-\stopsetups
-
-% \XMLattributeset{fo:aural},
-% display-align=,
-% relative-align=,
-% empty-cells=,
-
-\newif\ifinTABLErow
-\newdimen\FOtablecellwidth
-\newdimen\FOtablecellheight
-
-\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=]
- {\directsetup{fo:table-cell:start}%
- \expanded{\bTD[\the\scratchtoks]}%
- \beginXMLelement}
- {\endXMLelement
- \eTD
- \directsetup{fo:table-cell:stop}}
-
-\startsetups fo:table-column:action
-
- \doifelsenothing{\XMLop{column-number}}
- {\increment\FOtablecolumn}
- {\edef\FOtablecolumn{\XMLop{column-number}}
- \expanded{\setupTABLE[column][\FOtablecolumn][n=\FOtablecolumn]}}
-
- \doifsomething{\XMLop{column-width}}
- {%\setlocalhsize
- %\FOtableW\localhsize
- \analyzefunction{\XMLop{column-width}}%
- % hm, we need to set localhsize earlier
- \doifelse\functionname{proportional-column-width}
- {\FOtableW\functionA\textwidth}
- {\FOtableW\textwidth
- \setpercentdimen\FOtableW{\XMLop{column-width}}}%
- \expanded{\setupTABLE[column][\FOtablecolumn][width=\the\FOtableW]}}
-
- \doif{\XMLop{border-style}}{none}
- {\expanded{\setupTABLE[column][\FOtablecolumn][frame=off]}}
-
- \doifelsenothing{\XMLop{display-align}}
- {\doifsomething{\XMLop{text-align}}
- {\expanded{\setupTABLE[column][\FOtablecolumn]
- [align=\XMLpav{fo:align-key}{fo:table-column}{text-align}{normal}]}}}
- {\doifsomething{\XMLop{text-align}}
- {\expanded{\setupTABLE[column][\FOtablecolumn]
- [align={\XMLpav{fo:display-align}{fo:table-column}{display-align}{high},\XMLpav{fo:align-key}{fo:table-column}{text-align}{normal}}]}}
- {\expanded{\setupTABLE[column][\FOtablecolumn]
- [align=\XMLpav{fo:display-align}{fo:table-column}{display-align}{high}]}}}
-
-\expanded{\setupTABLE[column][\FOtablecolumn][extras={\rescanXMLattributes{fo:table-column}}]}
-
-\stopsetups
-
-\startsetups fo:table-cell:start
-
- \doif{\XMLop{starts-row}}{true}{\ifinTABLErow\eTR\inTABLErowfalse\fi}
-
- \ifinTABLErow\else\bTR\inTABLErowtrue\fi
-
- \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}}
-
-% \doifelse{\XMLpar{fo:table-cell}{width}{}}{}
-% {\def\pFOtablewidth{fit}}
-% {\FOtablecellwidth\textwidth % probably must be localhsize or frozen at an outer level
-% \setpercentdimen\FOtablecellwidth{\XMLpar{fo:table-cell}{width}{0pt}}%
-% \edef\pFOtablewidth{\the\FOtablecellwidth}}%
-
-% \doifelse{\XMLpar{fo:table-cell}{height}{}}{}
-% {\def\pFOtableheight{fit}}
-% {\FOtablecellheight\textheight % probably must be localhsize or frozen at an outer level
-% \setpercentdimen\FOtablecellheight{\XMLpar{fo:table-cell}{height}{0pt}}%
-% \edef\pFOtableheight{\the\FOtablecellheight}}%
-
- \scratchtoks\emptytoks \appendetoks
-% style=\noexpand\directsetup{fo:font:setup}, % else not expanded
- nx=\XMLop{number-columns-spanned},
- ny=\XMLop{number-rows-spanned},
- n=\XMLop{column-number},
- background=\FoTableBG
- \to \scratchtoks
-
- \doifnot{\XMLop{border-style}}{none}
- {\appendetoks
- ,frame=on
- \to\scratchtoks}
-
- \doifsomething{\XMLop{background-color}}
- {\appendetoks
- ,backgroundcolor=\XMLop{background-color}
- \to \scratchtoks}
-
- % todo : padding
-
- \doifsomething{\XMLop{padding}}
- {\appendetoks
- ,offset=\XMLop{padding}
- \to \scratchtoks}
-
- % todo: interference with presets in column (outer level) -> \setupcolumn[column] ...;
- % misschien meerdere align switches
-
- \doifelsenothing{\XMLop{display-align}}
- {\doifsomething{\XMLop{text-align}}
- {\appendetoks
- ,align=\XMLpav{fo:align-key}{fo:table-cell}{text-align}{normal}
- \to \scratchtoks}}
- {\doifsomething{\XMLop{text-align}}
- {\appendetoks
- ,align={\XMLpav{fo:display-align}{fo:table-cell}{display-align}{high},\XMLpav{fo:align-key}{fo:table-cell}{text-align}{normal}},
- \to \scratchtoks}
- {\appendetoks
- ,align=\XMLpav{fo:display-align}{fo:table-cell}{display-align}{high}
- \to \scratchtoks}}
-
- \appendetoks
- ,extras={\rescanXMLattributes{fo:table-cell}}
- \to\scratchtoks
-
-\stopsetups
-
-% \startsetups fo:table-cell:setup
-
-% [\XMLpar{fo:table-cell}{text-indent}{}]
-
-% \edefXMLinhpar\xFOtextindent{fo:table-cell}{text-indent}
-
-% \doifsomething\xFOtextindent
-% {\scratchdimen\hsize
-% \setpercentdimen\scratchdimen\xFOtextindent
-% \expanded{\setupindenting[\the\scratchdimen]}}
-
-% \stopsetups
-
-\startsetups fo:table-cell:stop
-
- \doif{\XMLop{ends-row}}{true}{\eTR\inTABLErowfalse}
-
-\stopsetups
-
-%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=,
-% space-between-list-rows=, % ? mentioned in bradley
-text-indent=0pt, % yes
- keep-with-previous=]
- {\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:break-and-space:before}
- \directsetup{fo:indent:setup}
- \begingroup
-\stopsetups
-
-\startsetups fo:list:stop
- \endgraf
- \endgroup
-% \directsetup{fo:break-and-space:after}
- \endgroup
-\stopsetups
-
-% \XMLattributeset{fo:aural},
-% relative-align=,
-% intrusion-displace=,
-% keep-together=,
-
-% The list model is plain stupid. Instead of just defining a few mechanism
-% or using some kind of type attribute, a strange mechanism of functions is
-% used. Why on the one hand introduce redundant attributes and on the other
-% hand safe a few elements. A proper segmentation of the problem would have
-% brought better solutions.
-
-\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\FOlistitemdistance
-\newdimen\FOlistitemlabelleftskip \newdimen\FOlistitembodyleftskip
-\newdimen\FOlistitemlabelrightskip \newdimen\FOlistitembodyrightskip
-
-\defineXMLnestedsave
- [fo:list-item-body]
- [\XMLattributeset{fo:inherited},
- id=, % keep-together=,
- \XMLattributeset{fo:accessibility}]
-
-\defineXMLnestedsave
- [fo:list-item-label]
- [\XMLattributeset{fo:inherited},
- id=, % keep-together=,
- \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
-
-% todo : relative-align in list item
-
-\newif\ifFOlabelend
-\newif\ifFObodystart
-
-\startsetups fo:list-item:stop
-
- % 24pt en 6pt in fo:root instellen
-
- % \tracebackXMLattribute{provisional-distance-between-starts}
-
- \edefXMLinh \FOprodis {provisional-distance-between-starts}
- \edefXMLinh \FOprolab {provisional-label-separation}
-
-% \edef\FOprodis{\XMLpar{fo}{provisional-distance-between-starts}{}}
-% \edef\FOprolab{\XMLpar{fo}{provisional-label-separation}{}}
-
- \edef\FOprodis{\ifx\FOprodis\empty24pt\else\FOprodis\fi}
- \edef\FOprolab{\ifx\FOprolab\empty 6pt\else\FOprolab\fi}
-
- \setlocalhsize
-
- \FOlistitemlabelleftskip \zeropoint
- \FOlistitemlabelrightskip\zeropoint
- \FOlistitembodyleftskip \zeropoint
- \FOlistitembodyrightskip \zeropoint
-
- \doifelse{\XMLpar{fo:list-item-label}{end-indent} {}}{label-end()} \FOlabelendtrue \FOlabelendfalse
- \doifelse{\XMLpar{fo:list-item-body} {start-indent}{}}{body-start()}\FObodystarttrue\FObodystartfalse
-
- \setpercentdimen\FOlistitemlabelleftskip {\XMLpar{fo:list-item-label}{start-indent}{0pt}}
- \setpercentdimen\FOlistitembodyrightskip {\XMLpar{fo:list-item-body} {end-indent} {0pt}}
-
- % maybe i need to implement something configurable
-
- \ifFObodystart
- \ifFOlabelend
- \FOlistitemlabelrightskip\dimexpr(\localhsize-\FOlistitemlabelleftskip-\FOprodis+\FOprolab)
- \FOlistitembodyleftskip\dimexpr(\FOlistitemlabelleftskip+\FOprodis)
- \FOlistitemlabelhsize\dimexpr(\FOprodis-\FOprolab)
- \else
- \setpercentdimen\FOlistitemlabelrightskip{\XMLpar{fo:list-item-label}{end-indent}{0pt}}
- \FOlistitemlabelhsize\dimexpr(\localhsize-\FOlistitemlabelleftskip-\FOlistitemlabelrightskip)
- \FOlistitembodyleftskip\dimexpr(\FOlistitemlabelleftskip+\FOlistitemlabelhsize+\FOprolab)
- \fi
- \FOlistitemdistance \dimexpr(\FOprolab)
- \else
- \setpercentdimen\FOlistitembodyleftskip{\XMLpar{fo:list-item-body}{start-indent}{0pt}}
- \ifFOlabelend
- \FOlistitemlabelrightskip\dimexpr(\localhsize-\FOlistitembodyleftskip+\FOprolab)
- \FOlistitemlabelhsize\dimexpr(\localhsize-\FOlistitemlabelleftskip-\FOlistitemlabelrightskip)
- \FOlistitemdistance \dimexpr(\FOprolab)
- \else
- \setpercentdimen\FOlistitemlabelrightskip{\XMLpar{fo:list-item-label}{end-indent}{0pt}}
- \FOlistitemlabelhsize\dimexpr(\localhsize-\FOlistitemlabelleftskip-\FOlistitemlabelrightskip)
- \FOlistitemdistance \dimexpr(\FOlistitembodyleftskip-\FOlistitemlabelleftskip-\FOlistitemlabelhsize)
- \fi
- \fi
-
- % is this fall back permitted ?
-
- \ifzeropt\FOlistitemlabelleftskip \ifzeropt\FOlistitemlabelrightskip
- \FOlistitembodyleftskip\FOprodis
- \FOlistitemdistance\FOprolab
- \FOlistitemlabelhsize\dimexpr(\FOlistitembodyleftskip-\FOlistitemdistance)
- \fi \fi
-
- %
-
- \FOlistitembodyhsize\localhsize
-
- \advance\FOlistitembodyhsize-\FOlistitembodyleftskip
- \advance\FOlistitembodyhsize-\FOlistitembodyrightskip
-
- \doifelse{\XMLpar{fo:list-item}{display-align}{}}{center}
- {\directsetup{fo:list-item:display}}
- {\directsetup{fo:list-item:text}}
-
- \egroup
-
-\stopsetups
-
-% todo: textindent
-
-\startsetups fo:list-item:display
-
- \endgraf
-
- \advance\leftskip \FOlistitemlabelleftskip
- \advance\rightskip\FOlistitembodyrightskip
-
- \dontleavehmode \valign\bgroup\forgetall\vss##\vss\cr
- \iftracingFO\ruledvtop\else\vbox\fi{\hsize\FOlistitemlabelhsize\directsetup{fo:list-item-label:setup}\XMLflush{fo:list-item-label}}\cr
- \iftracingFO\ruledvtop\else\vbox\fi{\hsize\FOlistitembodyhsize \directsetup{fo:list-item-body:setup}\XMLflush{fo:list-item-body}}\cr
- \egroup
-
-% \dontleavehmode \placesidebyside % or maybe paired boxes (legends)
-% {\ruledvtop{\forgetall\hsize\FOlistitemlabelhsize\XMLflush{fo:list-item-label}}}
-% {\ruledvtop{\forgetall\hsize\FOlistitembodyhsize \XMLflush{fo:list-item-body}}}
-
- \endgraf
-
-\stopsetups
-
-\newtoks\savedeverypar \savedeverypar\everypar
-
-\startsetups fo:list-item:text
-
- \everypar\savedeverypar % \appendtoksonce\insertparagraphintro\to\everypar % hack, binnen footnote ...
-
- \advance\leftskip \FOlistitembodyleftskip
- \advance\rightskip\FOlistitembodyrightskip
-
- \setupparagraphintro[first][\directsetup{fo:list-item-label:process}]
- \setupparagraphintro[next] [\begstrut\resetpenalties\clubpenalties]
- \directsetup{fo:list-item-body:setup}
- \XMLflush{fo:list-item-body}\endstrut
-
-\stopsetups
-
-\startsetups fo:list-item-label:setups
-
- \edefXMLinhpar\xFOtextindent{fo:item-label}{text-indent}
-
- \doifsomething\xFOtextindent
- {\scratchdimen\hsize
- \setpercentdimen\scratchdimen\xFOtextindent
- \expanded{\setupindenting[\the\scratchdimen]}}
-
-\stopsetups
-
-\startsetups fo:list-item-body:setups
-
- \edefXMLinh\xFOtextindent{fo:item-body}{text-indent}
-
- \doifsomething\xFOtextindent
- {\scratchdimen\hsize
- \setpercentdimen\scratchdimen\xFOtextindent
- \expanded{\setupindenting[\the\scratchdimen]}}
-
-\stopsetups
-
-\newbox\FOitembox
-
-\startsetups fo:list-item-label:process
-
- \setbox \FOitembox \iftracingFO \ruledvtop \else \vtop \fi \bgroup
- \forgetall
- \postponenotes
- \hsize\FOlistitemlabelhsize
- \directsetup{fo:list-item-label:setup}
- \XMLflush{fo:list-item-label}
- \egroup
- \getnoflines{\dimexpr(\ht\FOitembox+\dp\FOitembox)}
- \setpenalties\clubpenalties\noflines\maxdimen
- \strut\llap{\box\FOitembox\hskip\FOlistitemdistance}
-
-\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.
-%
-% <fo:footnote>whatever<fo:footnote-body>note</fo:footnote-body></fo:footnote>
-
-% 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
-
- \doifelsemarking{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
-
-\long\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{\def\FOatt{padding}\checkFOquadruple}
-\def\checkFOmargin {\def\FOatt{margin}\checkFOquadruple}
-
-\def\checkFOquadruple#1%
- {\edef\FOattribute{\XMLpar{#1}\FOatt\empty}%
- \ifx\FOattribute\empty\else
- \edef\FOtag{#1}%
- \scratchcounter\zerocount
- \expanded{\docheckFOquadruple\FOattribute\space\relax\space\relax}\od
- \ifcase\scratchcounter
- \let\FOattributeT\FOattribute
- \let\FOattributeR\FOattribute
- \let\FOattributeB\FOattribute
- \let\FOattributeL\FOattribute
- \or % (tblr)
- \let\FOattributeT\FOattribute
- \let\FOattributeR\FOattribute
- \let\FOattributeB\FOattribute
- \let\FOattributeL\FOattribute
- \or % (tb)(lr)
- \let\FOattributeB\FOattributeT
- \let\FOattributeL\FOattributeR
- \or % (t)(lr)(b)
- \let\FOattributeL\FOattributeR
- \or % (t)(r)(b)(l)
- % already ok
- \fi
- \letXMLpar\FOtag{\FOatt-top}\FOattributeT
- \letXMLpar\FOtag{\FOatt-right}\FOattributeR
- \letXMLpar\FOtag{\FOatt-bottom}\FOattributeB
- \letXMLpar\FOtag{\FOatt-left}\FOattributeL
- \fi}
-
-\def\docheckFOquadruple#1#2 #3%
- {\ifx#1\relax
- \expandafter\noFOchecks
- \else
- \advance\scratchcounter\plusone
- \ifcase\scratchcounter
- \or
- \edef\FOattributeT{#1#2}%
- \or
- \edef\FOattributeR{#1#2}%
- \or
- \edef\FOattributeB{#1#2}%
- \or
- \edef\FOattributeL{#1#2}%
- \fi
- \expandafter\docheckFOquadruple
- \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
-
-\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
-
-\globallet\xFOattribute\empty
-
-\def\checkFOfont#1%
- {\FOfonttoks\emptytoks
- \bgroup
- \catcode`\\=\@@escape
- \catcode`\{=\@@begingroup
- \catcode`\}=\@@endgroup
-% \catcode`\:=\@@letter
-% \catcode`\-=\@@letter
- \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\dFOfontsize{#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}
-
-\def\doFOreference#1%
- {\doifsomething{\XMLpar{#1}{id}{}}
- {\expanded{\reference[\XMLpar{#1}{id}{}]{\XMLpar{fo:page-sequence}{format}{}}}}}
-
-\appendtoks \flushFOreferences \to \everypar
-\appendtoks \flushFOreferences \to \neverypar % check !
-
-%D Graphics: static frames
-
-\startMPinclusions
- input mp-fobg.mp ;
-\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
-
-\startnotmode[fo-no-bg]
-
-\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}]
-
-\stopnotmode
-
-% 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
-
-\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
-% <fo:root>
-% <fo:block-container test='first'><fo:block test='second'>second:</fo:block></fo:block-container>
-% <fo:block>unset:</fo:block>
-% <fo:block test='outer'><fo:block test='nested'>nested:</fo:block>outer:</fo:block>
-% <fo:block test='last'>last:</fo:block>
-% </fo:root>
-% \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
-% <fo:root>
-% <fo:block-container test='first'><fo:block test='second'>second:</fo:block></fo:block-container>
-% <fo:block>unset:</fo:block>
-% <fo:block test='outer'><fo:block test='nested'>nested:</fo:block>outer:</fo:block>
-% <fo:block test='last'>last:</fo:block>
-% </fo:root>
-% \stopXMLdata
diff --git a/Master/texmf-dist/tex/context/base/x-foxet.mkii b/Master/texmf-dist/tex/context/base/x-foxet.mkii
deleted file mode 100644
index d44cf2b7ec7..00000000000
--- a/Master/texmf-dist/tex/context/base/x-foxet.mkii
+++ /dev/null
@@ -1,28 +0,0 @@
-%D \module
-%D [ file=x-foxet,
-%D version=2004.03.12, % based on earlier experiments
-%D title=\FOXET,
-%D subtitle=Formatting Objects,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 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]
-
-\usemodule[fp] % passivetex bonus
-
-% \autoXMLnamespace[mml,mm,mathml]
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-foxet.mkiv b/Master/texmf-dist/tex/context/base/x-foxet.mkiv
deleted file mode 100644
index 80fe7e500ca..00000000000
--- a/Master/texmf-dist/tex/context/base/x-foxet.mkiv
+++ /dev/null
@@ -1,29 +0,0 @@
-%D \module
-%D [ file=x-foxet,
-%D version=2004.03.12, % based on earlier experiments
-%D title=\FOXET,
-%D subtitle=Formatting Objects,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Nota bene: I will reimplement formatting object in proper
-%D \MKIV\ code.
-
-\writestatus{foxet}{the mkiv variant is under construction}
-
-%D This module 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]
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-html.mkiv b/Master/texmf-dist/tex/context/base/x-html.mkiv
deleted file mode 100644
index e1806eb9eb0..00000000000
--- a/Master/texmf-dist/tex/context/base/x-html.mkiv
+++ /dev/null
@@ -1,379 +0,0 @@
-%D \module
-%D [ file=x-html,
-%D version=2011.02.03, % adapted 2014.11.08
-%D title=\CONTEXT\ Modules,
-%D subtitle=HTML,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\startmodule[html]
-
-%D Usage:
-%D
-%D \starttyping
-%D \xmlregistersetup{xml:html:basics}
-%D \xmlregistersetup{xml:html:tables}
-%D \stoptyping
-
-% \xmlsetsetup{#1}{(p|span)[@lang]}{xml:html:lang}
-%
-% \startxmlsetups xml:html:lang
-% \begingroup
-% \language[\xmlatt{#1}{lang}]
-% \xmlsetup{#1}{xml:html:\xmltag{#1}}
-% \endgroup
-% \stopxmlsetups
-
-\unprotect
-
-\definehighlight[b] [\c!command=\v!no,\c!style=\v!bold]
-\definehighlight[i] [\c!command=\v!no,\c!style=\v!italic]
-\definehighlight[bi] [\c!command=\v!no,\c!style=\v!bolditalic]
-\definehighlight[em] [\c!command=\v!no,\c!style=\em]
-\definehighlight[tt] [\c!command=\v!no,\c!style=\v!mono]
-\definehighlight[strong][\c!command=\v!no,\c!style=\v!bold]
-\definehighlight[u] [\c!command=\v!no,\c!style=\directsetbar{\v!underbar}]
-\definehighlight[code] [\c!command=\v!no,\c!style=\v!mono]
-\definehighlight[pre] [\c!command=\v!no]
-
-\protect
-
-% todo: pre
-
-\startxmlsetups xml:html:basics
- \xmlsetsetup{#1}{p|br|b|i|u|em|tt|strong|ul|ol|li|table|thead|tbody|tfoot|tr|td|th|span|img}{xml:html:*}
- \xmlsetsetup{#1}{b/i}{xml:html:bi}
- \xmlsetsetup{#1}{i/b}{xml:html:bi}
- \xmlstripanywhere{#1}{!pre}
-\stopxmlsetups
-
-\startxmlsetups xml:html:tables
- \xmlsetsetup{#1}{table|thead|tbody|tfoot|tr|td|th}{xml:html:*}
-\stopxmlsetups
-
-\startxmlsetups xml:html:p
- \xmldoifnotselfempty {#1} {
- \dontleavehmode
- \ignorespaces
- \xmlflush{#1}
- \removeunwantedspaces
- }
- \par
-\stopxmlsetups
-
-\startxmlsetups xml:html:br
- \crlf
-\stopxmlsetups
-
-\startxmlsetups xml:html:b
- \directhighlight{b}{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups xml:html:i
- \directhighlight{i}{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups xml:html:bi
- \directhighlight{bi}{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups xml:html:em
- \directhighlight{em}{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups xml:html:tt
- \directhighlight{tt}{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups xml:html:strong
- \directhighlight{strong}{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups xml:html:u
- \directhighlight{u}{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups xml:html:ul
- \startitemize[packed]
- \xmlflush{#1}
- \stopitemize
-\stopxmlsetups
-
-\startxmlsetups xml:html:ol
- \startitemize[packed,n]
- \xmlflush{#1}
- \stopitemize
-\stopxmlsetups
-
-\startxmlsetups xml:html:li
- \startitem
- \xmlflush{#1}
- \stopitem
-\stopxmlsetups
-
-\startxmlsetups xml:html:code
- \directhighlight{code}{\xmlflushspacewise{#1}}
-\stopxmlsetups
-
-\startxmlsetups xml:html:pre
- \directhighlight{pre}{\xmlflushspacewise{#1}}
-\stopxmlsetups
-
-\startxmlsetups xml:html:span
- \xmlflush{#1}
-\stopxmlsetups
-
-\startxmlsetups xml:html:img
- \ifhmode
- \dontleavehmode
- \externalfigure[\xmlatt{#1}{src}]
- \else
- \startlinecorrection
- \externalfigure[\xmlatt{#1}{src}]
- \stoplinecorrection
- \fi
-\stopxmlsetups
-
-% tables, maybe we need a generic html table module
-%
-% todo: align
-
-% beware, the padding code is somewhat experimental, eventually the
-% table will be done in cld code
-%
-% we can also use \xmlmap for border etc
-
-\starttexdefinition cssgetsinglepadding #1
- \ctxlua {
- context((moduledata.css.padding(
- "#1",
- \number\dimexpr0.1ex,
- \number\dimexpr0.01\hsize,
- \number\dimexpr1ex,
- \number\dimexpr1em
- ))) % returns 4 values therefore ()
- }sp
-\stoptexdefinition
-
-\startxmlsetups xml:html:table
- \edef\CellPadding{\xmlatt{#1}{cellpadding}}
- \ifx\CellPadding\empty
- \edef\CellPadding{.25ex}
- \else
- \edef\CellPadding{\cssgetsinglepadding\CellPadding}
- \fi
- \startlinecorrection[blank]
- \doifelse {\xmlatt{#1}{border}} {0} {
- \bTABLE[frame=off,offset=\CellPadding]
- \xmlflush{#1}
- \eTABLE
- } {
- \bTABLE[offset=\CellPadding]
- \xmlflush{#1}
- \eTABLE
- }
- \stoplinecorrection
-\stopxmlsetups
-
-\startxmlsetups xml:html:thead
- \bTABLEhead
- \xmlflush{#1}
- \eTABLEhead
-\stopxmlsetups
-
-\startxmlsetups xml:html:tbody
- \bTABLEbody
- \xmlflush{#1}
- \eTABLEbody
-\stopxmlsetups
-
-\startxmlsetups xml:html:tfoot
- \bTABLEfoot
- \xmlflush{#1}
- \eTABLEfoot
-\stopxmlsetups
-
-\startxmlsetups xml:html:tr
- \bTR[ny=\xmlattdef{#1}{rowspan}{1}]
- \xmlflush{#1}
- \eTR
-\stopxmlsetups
-
-\startxmlsetups xml:html:td
- \bTD[nx=\xmlattdef{#1}{colspan}{1}]
- \xmlflush{#1}
- \eTD
-\stopxmlsetups
-
-\startxmlsetups xml:html:th
- \bTH[nx=\xmlattdef{#1}{colspan}{1}]
- \xmlflush{#1}
- \eTH
-\stopxmlsetups
-
-% \xmlregistersetup{xml:html:basics}
-
-%D For old times sake:
-
-\startxmlsetups xml:setups:common
- \xmlsetup{#1}{xml:html:basics}
- \xmlsetup{#1}{xml:html:tables}
-% \ifconditional\qmlcleanuptwo
-% \xmlsetsetup{#1}{html/br[index() == 1]}{xml:noppes:1}
-% \xmlsetsetup{#1}{html/p[index() == lastindex()]/br[index() == lastindex()]}{xml:noppes:2}
-% \xmlsetsetup{#1}{html/br[index() == lastindex()]}{xml:noppes:3}
-% \xmlsetsetup{#1}{br[name(1) == 'img']}{xml:noppes}
-% \xmlsetsetup{#1}{br[name(1) == 'br' and name(2) == 'img']}{xml:noppes}
-% % \xmlsetsetup{#1}{br/following-sibling::img[position()==1]}{xml:noppes}
-% \fi
-\stopxmlsetups
-
-\stopmodule
-
-\continueifinputfile{x-html.mkiv}
-
-\xmlregistersetup{xml:html:basics}
-\xmlregistersetup{xml:html:tables}
-
-\startxmlsetups xml:whatever
- \xmlsetsetup {#1} {
- html|body
- } {xml:html:*}
-\stopxmlsetups
-
-\xmlregisterdocumentsetup{main}{xml:whatever}
-
-\startxmlsetups xml:html:html
- \xmlflush{#1}
-\stopxmlsetups
-
-\startxmlsetups xml:html:body
- \xmlflush{#1}
-\stopxmlsetups
-
-\setuphead[subject][page=yes,style=\bfa]
-
-\starttexdefinition ShowExample#1
- \startsubject[title=#1]
- \typebuffer[#1]
- \starttextrule{result}
- \xmlprocessbuffer{main}{#1}{}
- \stoptextrule
- \stopsubject
-\stoptexdefinition
-
-\starttext
-
-\startbuffer[test 1]
-<html><body>
-<p>test</p>
-<p/>
-<p>test</p>
-</body></html>
-\stopbuffer
-
-\startbuffer[test 2]
-<html><body>
-<p>test (hierna een lf)
-test</p>
-</body></html>
-\stopbuffer
-
-\startbuffer[test 3]
-<html><body>
-<p>test (hierna een lf met lege regel)
-
-test</p>
-</body></html>
-\stopbuffer
-
-\startbuffer[test 4]
-<html><body>
-<p>test (hierna een lf met twee lege regels)
-
-
-test</p>
-</body></html>
-\stopbuffer
-
-\startbuffer[test 5]
-<html><body>
-<p>test (hierna br geen lf)<br/> test</p>
-</body></html>
-\stopbuffer
-
-\startbuffer[test 6]
-<html><body>
-<p>test (hierna br met lf)<br/>
-test</p>
-</body></html>
-\stopbuffer
-
-\startbuffer[test 7]
-<html><body>
-<p>test (hierna br met lf en lege regel)<br/>
-
-test</p>
-</body></html>
-\stopbuffer
-
-\startbuffer[test 8]
-<html><body>
-<p>test (hierna br met lf en twee lege regels)<br/>
-
-
-test</p>
-</body></html>
-\stopbuffer
-
-\startbuffer[test 9]
-<html><body>
-<p>test (hierna bold) <b>bold</b> test</p>
-</body></html>
-\stopbuffer
-
-\startbuffer[test 10]
-<html><body>
-<p>test (hierna lf met bold)
-<b>bold <u>underlined</u></b> test</p>
-</body></html>
-\stopbuffer
-
-\startbuffer[test 11]
-<html><body>
-<p>test (hierna lf met lege regel en bold)
-
-<b>bold</b> test</p>
-</body></html>
-\stopbuffer
-
-\startbuffer[test 12]
-<html><body>
-<p>test (hierna lf met lege regel en lf in bold)
-
-<b>
-bold
-</b> test</p>
-</body></html>
-\stopbuffer
-
-\startbuffer[test 13]
-<html><body>
-<p>test (hierna lf met lege regel en lf en lege regel in bold)
-
-<b>
-
-bold
-
-</b> test</p>
-</body></html>
-\stopbuffer
-
-\dorecurse{13}{\ShowExample{test #1}}
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/x-ldx.ctx b/Master/texmf-dist/tex/context/base/x-ldx.ctx
deleted file mode 100644
index edbffc2854c..00000000000
--- a/Master/texmf-dist/tex/context/base/x-ldx.ctx
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version='1.0' standalone='yes'?>
-
-<ctx:job>
- <ctx:message>Lua Documentation Generator</ctx:message>
- <ctx:preprocess>
- <ctx:processors>
- <ctx:processor name='ldx'>mtxrun --script x-ldx.lua <ctx:value name='old'/> <ctx:value name='new'/></ctx:processor>
- </ctx:processors>
- <ctx:files>
- <ctx:file processor='ldx'><ctx:value name='old'/></ctx:file>
- </ctx:files>
- </ctx:preprocess>
- <ctx:flags>
- <ctx:flag>purge</ctx:flag>
- <ctx:flag>forcexml</ctx:flag>
- </ctx:flags>
- <ctx:process>
- <ctx:resources>
- <ctx:environment>x-ldx.mkiv</ctx:environment>
- </ctx:resources>
- </ctx:process>
-</ctx:job>
-
diff --git a/Master/texmf-dist/tex/context/base/x-ldx.lua b/Master/texmf-dist/tex/context/base/x-ldx.lua
deleted file mode 100644
index 31cbebf1392..00000000000
--- a/Master/texmf-dist/tex/context/base/x-ldx.lua
+++ /dev/null
@@ -1,341 +0,0 @@
-if not modules then modules = { } end modules ['x-ldx'] = {
- version = 1.001,
- comment = "companion to x-ldx.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
--- --[[ldx--
--- <topic>Introduction</topic>
--- --ldx]]--
-
---[[ldx--
-<source>Lua Documentation Module</source>
-
-This file is part of the <logo label='context'/> documentation suite and
-itself serves as an example of using <logo label='lua'/> in combination
-with <logo label='tex'/>.
-
-I will rewrite this using lpeg. On the other hand, we cannot expect proper
-<logo label='tex'/> and for educational purposed the syntax might be wrong.
---ldx]]--
-
--- there is a nice parser on from http://lua-users.org/wiki/LpegRecipes (by
--- Patrick Donnelly) but lua crashes when I apply functions to some of the
--- matches
-
-banner = "version 1.0.1 - 2007+ - PRAGMA ADE / CONTEXT"
-
---[[
-This script needs a few libraries. Instead of merging the code here
-we can use
-
-<typing>
-mtxrun --internal x-ldx.lua
-</typing>
-
-That way, the libraries included in the runner will be used.
-]]--
-
--- libraries l-string.lua l-table.lua l-io.lua l-file.lua
-
--- begin library merge
--- end library merge
-
-local gsub, find, sub = string.gsub, string.find, string.sub
-local splitstring, emptystring = string.split, string.is_empty
-local concat = table.concat
-
---[[
-Just a demo comment line. We will handle such multiline comments but
-only when they start and end at the beginning of a line. More rich
-comments are tagged differently.
-]]--
-
---[[ldx--
-First we define a proper namespace for this module. The <q>l</q> stands for
-<logo label='lua'/>, the <q>d</q> for documentation and the <q>x</q> for
-<logo label='xml'/>.
---ldx]]--
-
-if not ldx then ldx = { } end
-
---[[ldx--
-We load the lua file into a table. The entries in this table themselves are
-tables and have keys like <t>code</t> and <t>comment</t>.
---ldx]]--
-
-function ldx.load(filename)
- local data = file.readdata(filename)
- local expr = "%s*%-%-%[%[ldx%-*%s*(.-)%s*%-%-ldx%]%]%-*%s*"
- local i, j, t = 0, 0, { }
- while true do
- local comment, ni
- ni, j, comment = find(data, expr, j)
- if not ni then break end
- t[#t+1] = { code = sub(data, i, ni-1) }
- t[#t+1] = { comment = comment }
- i = j + 1
- end
- local str = sub(data, i, #data)
- str = gsub(str, "^%s*(.-)%s*$", "%1")
- if #str > 0 then
- t[#t+1] = { code = str }
- end
- return t
-end
-
---[[ldx--
-We will tag keywords so that we can higlight them using a special font
-or color. Users can extend this list when needed.
---ldx]]--
-
-ldx.keywords = { }
-
---[[ldx--
-Here come the reserved words:
---ldx]]--
-
-ldx.keywords.reserved = {
- ["and"] = 1,
- ["break"] = 1,
- ["do"] = 1,
- ["else"] = 1,
- ["elseif"] = 1,
- ["end"] = 1,
- ["false"] = 1,
- ["for"] = 1,
- ["function"] = 1,
- ["if"] = 1,
- ["in"] = 1,
- ["local"] = 1,
- ["nil"] = 1,
- ["not"] = 1,
- ["or"] = 1,
- ["repeat"] = 1,
- ["return"] = 1,
- ["then"] = 1,
- ["true"] = 1,
- ["until"] = 1,
- ["while"] = 1
-}
-
---[[ldx--
-We need to escape a few tokens. We keep the hash local to the
-definition but set it up only once, hence the <key>do</key>
-construction.
---ldx]]--
-
-do
- local e = { [">"] = "&gt;", ["<"] = "&lt;", ["&"] = "&amp;" }
- function ldx.escape(str)
- return (gsub(str, "([><&])",e))
- end
-end
-
---[[ldx--
-Enhancing the code is a bit tricky due to the fact that we have to
-deal with strings and escaped quotes within these strings. Before we
-mess around with the code, we hide the strings, and after that we
-insert them again. Single and double quoted strings are tagged so
-that we can use a different font to highlight them.
---ldx]]--
-
-ldx.make_index = true
-
-function ldx.enhance(data) -- i need to use lpeg and then we can properly autoindent -)
- local e = ldx.escape
- for k=1,#data do
- local v = data[k]
- if v.code then
- local dqs, sqs, com, cmt, cod = { }, { }, { }, { }, e(v.code)
- cod = gsub(cod, '\\"', "##d##")
- cod = gsub(cod, "\\'", "##s##")
- cod = gsub(cod, "%-%-%[%[.-%]%]%-%-", function(s)
- cmt[#cmt+1] = s
- return "<l<<<".. #cmt ..">>>l>"
- end)
- cod = gsub(cod, "%-%-([^\n]*)", function(s)
- com[#com+1] = s
- return "<c<<<".. #com ..">>>c>"
- end)
- cod = gsub(cod, "(%b\"\")", function(s)
- dqs[#dqs+1] = sub(s,2,-2) or ""
- return "<d<<<".. #dqs ..">>>d>"
- end)
- cod = gsub(cod, "(%b\'\')", function(s)
- sqs[#sqs+1] = sub(s,2,-2) or ""
- return "<s<<<".. #sqs ..">>>s>"
- end)
- cod = gsub(cod, "(%a+)",function(key)
- local class = ldx.keywords.reserved[key]
- if class then
- return "<key class='" .. class .. "'>" .. key .. "</key>"
- else
- return key
- end
- end)
- cod = gsub(cod, "<s<<<(%d+)>>>s>", function(s)
- return "<sqs>" .. sqs[tonumber(s)] .. "</sqs>"
- end)
- cod = gsub(cod, "<d<<<(%d+)>>>d>", function(s)
- return "<dqs>" .. dqs[tonumber(s)] .. "</dqs>"
- end)
- cod = gsub(cod, "<c<<<(%d+)>>>c>", function(s)
- return "<com>" .. com[tonumber(s)] .. "</com>"
- end)
- cod = gsub(cod, "<l<<<(%d+)>>>l>", function(s)
- return cmt[tonumber(s)]
- end)
- cod = gsub(cod, "##d##", "\\\"")
- cod = gsub(cod, "##s##", "\\\'")
- if ldx.make_index then
- local lines = splitstring(cod,"\n")
- local f = "(<key class='1'>function</key>)%s+([%w%.]+)%s*%("
- for k=1,#lines do
- local v = lines[k]
- -- functies
- v = gsub(v,f,function(key, str)
- return "<function>" .. str .. "</function>("
- end)
- -- variables
- v = gsub(v,"^([%w][%w%,%s]-)(=[^=])",function(str, rest)
- local t = splitstring(str,",%s*")
- for k=1,#t do
- t[k] = "<variable>" .. t[k] .. "</variable>"
- end
- return concat(t,", ") .. rest
- end)
- -- so far
- lines[k] = v
- end
- v.code = concat(lines,"\n")
- else
- v.code = cod
- end
- end
- end
-end
-
---[[ldx--
-We're now ready to save the file in <logo label='xml'/> format. This boils
-down to wrapping the code and comment as well as the whole document. We tag
-lines in the code as such so that we don't need messy <t>CDATA</t> constructs
-and by calculating the indentation we also avoid space troubles. It also makes
-it possible to change the indentation afterwards.
---ldx]]--
-
-function ldx.as_xml(data) -- ldx: not needed
- local t, cmode = { }, false
- t[#t+1] = "<?xml version='1.0' standalone='yes'?>\n"
- t[#t+1] = "\n<document xmlns:ldx='http://www.pragma-ade.com/schemas/ldx.rng' xmlns='http://www.pragma-ade.com/schemas/ldx.rng'>\n"
- for k=1,#data do
- local v = data[k]
- if v.code and not emptystring(v.code) then
- t[#t+1] = "\n<code>\n"
- local split = splitstring(v.code,"\n")
- for k=1,#split do -- make this faster
- local v = split[k]
- local a, b = find(v,"^(%s+)")
- if v then v = gsub(v,"[\n\r ]+$","") end
- if a and b then
- v = sub(v,b+1,#v)
- if cmode then
- t[#t+1] = "<line comment='yes' n='" .. b .. "'>" .. v .. "</line>\n"
- else
- t[#t+1] = "<line n='" .. b .. "'>" .. v .. "</line>\n"
- end
- elseif emptystring(v) then
- if cmode then
- t[#t+1] = "<line comment='yes'/>\n"
- else
- t[#t+1] = "<line/>\n"
- end
- elseif find(v,"^%-%-%[%[") then
- t[#t+1] = "<line comment='yes'>" .. v .. "</line>\n"
- cmode= true
- elseif find(v,"^%]%]%-%-") then
- t[#t+1] = "<line comment='yes'>" .. v .. "</line>\n"
- cmode= false
- elseif cmode then
- t[#t+1] = "<line comment='yes'>" .. v .. "</line>\n"
- else
- t[#t+1] = "<line>" .. v .. "</line>\n"
- end
- end
- t[#t+1] = "</code>\n"
- elseif v.comment then
- t[#t+1] = "\n<comment>\n" .. v.comment .. "\n</comment>\n"
- else
- -- cannot happen
- end
- end
- t[#t+1] = "\n</document>\n"
- return concat(t,"")
-end
-
---[[ldx--
-Saving the result is a trivial effort.
---ldx]]--
-
-function ldx.save(filename,data)
- file.savedata(filename,ldx.as_xml(data))
-end
-
---[[ldx--
-The next function wraps it all in one call:
---ldx]]--
-
-function ldx.convert(luaname,ldxname)
- if not file.is_readable(luaname) then
- luaname = luaname .. ".lua"
- end
- if file.is_readable(luaname) then
- if not ldxname then
- ldxname = file.replacesuffix(luaname,"ldx")
- end
- local data = ldx.load(luaname)
- if data then
- ldx.enhance(data)
- if ldxname ~= luaname then
- ldx.save(ldxname,data)
- end
- end
- end
-end
-
---[[ldx--
-This module can be used directly:
-
-<typing>
-mtxrun --internal x-ldx somefile.lua
-</typing>
-
-will produce an ldx file that can be processed with <logo label='context'/>
-by running:
-
-<typing>
-context --use=x-ldx --forcexml somefile.ldx
-</typing>
-
-You can do this in one step by saying:
-
-<typing>
-context --ctx=x-ldx somefile.lua
-</typing>
-
-This will trigger <logo label='context'/> into loading the mentioned
-<logo label='ctx'/> file. That file describes the conversion as well
-as the module to be used.
-
-The main conversion call is:
---ldx]]--
-
--- todo: assume usage of "mtxrun --script x-ldx", maybe make it mtx-ldx
-
-if environment.files and environment.files[1] then
- ldx.convert(environment.files[1],environment.files[2])
-end
-
---~ exit(1)
diff --git a/Master/texmf-dist/tex/context/base/x-ldx.mkiv b/Master/texmf-dist/tex/context/base/x-ldx.mkiv
deleted file mode 100644
index 0156f2c5569..00000000000
--- a/Master/texmf-dist/tex/context/base/x-ldx.mkiv
+++ /dev/null
@@ -1,196 +0,0 @@
-%D \module
-%D [ file=x-ldx,
-%D version=2008.06.03,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Lua Source Pretty Printing,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% this will become an extra
-
-\setupxml[default=hidden]
-
-\usemodule[x][mathml]
-\usemodule[abr-02]
-
-\xmlregistersetup{xml:mml:define}
-\xmlregistersetup{xml:ldx:define}
-
-\xmlregisterns{ldx}{ldx}
-
-\startxmlsetups xml:ldx:define
- \xmlsetsetup {#1} {ldx:*} {ldx:*}
-\stopxmlsetups
-
-% % %
-
-\startxmlsetups ldx:p
- \xmlflush{#1}\par
-\stopxmlsetups
-
-\startxmlsetups ldx:source
- \source{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups ldx:key
- \dontleavehmode{\bf\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups ldx:variable
- \xmlflush{#1}
-% \expanded{\variable{\xmlflush{#1}}}
-\stopxmlsetups
-
-\startxmlsetups ldx:function
- \dontleavehmode{\bf function}\space\xmlflush{#1}
-% \expanded{\function{\xmlflush{#1}}}
-\stopxmlsetups
-
-\startxmlsetups ldx:com
- \dontleavehmode{\tt--\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups ldx:document
- \page
- \xmlflush{#1}
- \determineregistercharacteristics[function]
- \startmode[*register]
- \testpage[4]
- \extra{Functions}
- \placeregister[function]
- \stopmode
- \determineregistercharacteristics[variable]
- \startmode[*register]
- \testpage[4]
- \extra{Variables}
- \placeregister[variable]
- \stopmode
-\stopxmlsetups
-
-\newcounter\CommentCounter
-
-\startxmlsetups ldx:comment
- \blank
- \doglobal\increment\CommentCounter
- \margintitle{\bf\CommentCounter}
- \xmlflush{#1}
- \blank
-\stopxmlsetups
-
-\startxmlsetups ldx:dqs
- \dontleavehmode\bgroup\tt"\xmlflush{#1}"\egroup
-\stopxmlsetups
-
-\startxmlsetups ldx:sqs
- \dontleavehmode\bgroup\tt'\xmlflush{#1}'\egroup
-\stopxmlsetups
-
-\startxmlsetups ldx:code
- \startpacked
- \xmlflush{#1}\relax
- \stoppacked
-\stopxmlsetups
-
-\startxmlsetups ldx:lines
- \startpacked
- \xmlflush{#1}
- \stoppacked
-\stopxmlsetups
-
-\startxmlsetups ldx:line
- \doifelsenothing {\xmlflush{#1}} {
- \xmlflush{#1}\crlf
- } {
- \dontleavehmode \hbox to \hsize \bgroup
- \strut
- \hskip.25\dimexpr\xmlattdef{#1}{n}{0}em\relax\relax % extra relax needed !
- \doif {\xmlatt{#1}{comment}} {yes} {\tt}
- \xmlflush{#1}
- \hss
- \egroup
- \endgraf
- }
-\stopxmlsetups
-
-\startxmlsetups ldx:logo
- \uppercasestring\xmlatt{#1}{label}\xmlatt{#1}{name}\to\ascii
- \ifx\ascii\empty\else\getvalue{\ascii}\fi
-\stopxmlsetups
-
-\startxmlsetups ldx:l
- \uppercasestring\xmlatt{#1}{l}\xmlatt{#1}{n}\to\ascii
- \ifx\ascii\empty\else\getvalue{\ascii}\fi
-\stopxmlsetups
-
-\startxmlsetups ldx:typing
- \blank
- \startpacked \tt
- \xmlverbatim{#1}
- \stoppacked
- \blank
-\stopxmlsetups
-
-\startxmlsetups ldx:type
- \dontleavehmode{\tt\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups ldx:t
- \dontleavehmode{\tt\xmlflush{#1}}
-\stopxmlsetups
-
-% key -> kw
-% dqs -> dq
-% sqs -> sq
-% line -> ln
-% code -> cd
-% comment -> tx (text)
-
-\definetypeface[mainfacenormal] [ss][sans] [iwona] [default]
-\definetypeface[mainfacenormal] [rm][serif][palatino] [default]
-\definetypeface[mainfacenormal] [tt][mono] [modern] [default][rscale=1] % 1.1
-\definetypeface[mainfacenormal] [mm][math] [iwona] [default][encoding=default]
-
-\definetypeface[mainfacemedium] [ss][sans] [iwona-medium][default]
-\definetypeface[mainfacenormal] [rm][serif][palatino] [default]
-\definetypeface[mainfacemedium] [tt][mono] [modern] [default][rscale=1] % 1.1
-\definetypeface[mainfacemedium] [mm][math] [iwona-medium][default][encoding=default]
-
-\definetypeface[mainfacenarrowtt][tt][mono] [modern-cond] [default][rscale=1] % 1.1
-
-\setupbodyfont
- [mainfacenormal,11pt]
-
-\setupwhitespace
- [big]
-
-\defineregister[function][functions]
-\defineregister[variable][variables]
-
-\definehead[source][subject]
-\definehead[extra] [subsubject]
-\definehead[topic] [subsubsubject]
-
-\setuphead
- [source]
- [style=\bfb]
-
-\setuphead
- [extra]
- [style=\bfa]
-
-\setuphead
- [topic]
- [style=\bf]
-
-\setuplayout
- [width=middle,
- height=middle,
- backspace=2cm,
- topspace=2cm]
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-math-svg.lua b/Master/texmf-dist/tex/context/base/x-math-svg.lua
deleted file mode 100644
index 8a628816773..00000000000
--- a/Master/texmf-dist/tex/context/base/x-math-svg.lua
+++ /dev/null
@@ -1,176 +0,0 @@
-if not modules then modules = { } end modules ['x-math-svg'] = {
- version = 1.001,
- comment = "companion to x-math-svg.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local tostring, type, next = tostring, type, next
-local lpegmatch, P, Cs = lpeg.match, lpeg.P, lpeg.Cs
-
-local xmlfirst = xml.first
-local xmlconvert = xml.convert
-local xmlload = xml.load
-local xmlsave = xml.save
-local xmlcollected = xml.collected
-local xmldelete = xml.delete
-
-local loadtable = table.load
-local savetable = table.save
-
-local replacesuffix = file.replacesuffix
-local addsuffix = file.addsuffix
-local removefile = os.remove
-local isfile = lfs.isfile
-
-local formatters = string.formatters
-
-moduledata = moduledata or table.setmetatableindex("table")
-local svgmath = moduledata.svgmath -- autodefined
-
-local namedata = { }
-local pagedata = { }
-
-local statusname = "x-math-svg-status.lua"
-local pdfname = "x-math-svg.pdf"
-
-local pdftosvg = os.which("mudraw")
-
-local f_make_tex = formatters[ [[context --global kpse:x-math-svg.mkvi --inputfile="%s" --svgstyle="%s" --batch --noconsole --once --purgeall]] ]
-local f_make_svg = formatters[ [[mudraw -o "math-%%d.svg" "%s" 1-9999]] ]
-
------ f_inline = formatters[ [[<div class='math-inline' style='vertical-align:%p'></div>]] ]
-local f_inline = formatters[ [[<div class='math-inline'></div>]] ]
-local f_display = formatters[ [[<div class='math-display'></div>]] ]
-local f_style = formatters[ [[vertical-align:%p]] ]
-
-local f_math_tmp = formatters[ [[math-%i]] ]
-
-function svgmath.process(filename)
- if not filename then
- -- no filename given
- return
- elseif not isfile(filename) then
- -- invalid filename
- return
- end
- local index = 0
- local page = 0
- local blobs = { }
- local root = xmlload(filename)
- for mth in xmlcollected(root,"math") do
- index = index + 1
- local blob = tostring(mth)
- if blobs[blob] then
- context.ReuseSVGMath(index,blobs[blob])
- else
- page = page + 1
- buffers.assign(f_math_tmp(page),blob)
- context.MakeSVGMath(index,page,mth.at.display)
- blobs[blob] = page
- end
- end
- context(function()
- -- for tracing purposes:
- for mathdata, pagenumber in next, blobs do
- local p = pagedata[pagenumber]
- p.mathml = mathdata
- p.number = pagenumber
- end
- --
- savetable(statusname, {
- pagedata = pagedata,
- namedata = namedata,
- })
- end)
-end
-
-function svgmath.register(index,page,specification)
- if specification then
- pagedata[page] = specification
- end
- namedata[index] = page
-end
-
-function svgmath.convert(filename,svgstyle)
- if not filename then
- -- no filename given
- return false, "no filename"
- elseif not isfile(filename) then
- -- invalid filename
- return false, "invalid filename"
- elseif not pdftosvg then
- return false, "mudraw is not installed"
- end
-
- os.execute(f_make_tex(filename,svgstyle))
-
- local data = loadtable(statusname)
- if not data then
- -- invalid tex run
- return false, "invalid tex run"
- elseif not next(data) then
- return false, "no converson needed"
- end
-
- local pagedata = data.pagedata
- local namedata = data.namedata
-
- os.execute(f_make_svg(pdfname))
-
- local root = xmlload(filename)
- local index = 0
- local done = { }
- local unique = 0
-
- local between = (1-P("<"))^1/""
- local strip = Cs((
- (P("<text") * ((1-P("</text>"))^1) * P("</text>")) * between^0 / "" +
- P(">") * between +
- P(1)
- )^1)
-
- for mth in xmlcollected(root,"m:math") do
- index = index + 1
- local page = namedata[index]
- if done[page] then
- mth.__p__.dt[mth.ni] = done[page]
- else
- local info = pagedata[page]
- local depth = info.depth
- local mode = info.mode
- local svgname = addsuffix(f_math_tmp(page),"svg")
- local action = mode == "inline" and f_inline or f_display
- -- local x_div = xmlfirst(xmlconvert(action(-depth)),"/div")
- local x_div = xmlfirst(xmlconvert(action()),"/div")
- local svgdata = io.loaddata(svgname)
- if not svgdata or svgdata == "" then
- print("error in:",svgname,tostring(mth))
- else
- -- svgdata = string.gsub(svgdata,">%s<","")
- svgdata = lpegmatch(strip,svgdata)
- local x_svg = xmlfirst(xmlconvert(svgdata),"/svg")
- -- xmldelete(x_svg,"text")
-if mode == "inline" then
- x_svg.at.style = f_style(-depth)
-end
-
- x_div.dt = { x_svg }
- mth.__p__.dt[mth.ni] = x_div -- use helper
- end
- done[page] = x_div
- unique = unique + 1
- end
- end
-
--- for k, v in next, data do
--- removefile(addsuffix(k,"svg"))
--- end
--- removefile(statusname)
--- removefile(pdfname)
-
- xmlsave(root,filename)
-
- return true, index, unique
-end
diff --git a/Master/texmf-dist/tex/context/base/x-mathml-basics.mkiv b/Master/texmf-dist/tex/context/base/x-mathml-basics.mkiv
deleted file mode 100644
index e166995b0c8..00000000000
--- a/Master/texmf-dist/tex/context/base/x-mathml-basics.mkiv
+++ /dev/null
@@ -1,276 +0,0 @@
-% macros=mkvi
-
-% makes sense (but rel vs op ...):
-
-% \unexpanded\def\stackrel#1#2{\mathematics{\mathop{\let\limits\relax\mover{#2}{#1}}}}
-
-% this can become a core helper
-
-% bwe could do all of them in lua
-
-\startluacode
-local find = string.find
-local lpegmatch = lpeg.match
-
-local splitter = lpeg.Ct(lpeg.C(lpeg.patterns.nestedbraces + lpeg.patterns.utf8character)^1)
-
-function commands.xmfenced(left,middle,right,content)
- local l = left ~= "" and left or "("
- local r = right ~= "" and right or ")"
- local m = middle ~= "" and middle and lpegmatch(splitter,middle) or { "," }
- local c = find(content,"{") and lpegmatch(splitter,content) or { content }
- local n = #c
- if n > 1 then
- context("\\left%s",l)
- for i=1,n do
- if i > 1 then
- context("%s %s",m[i] or m[#m],c[i])
- else
- context(c[i])
- end
- end
- context("\\right%s",r)
- else
- context("\\left%s %s \\right%s",l,content,r)
- end
-end
-
-\stopluacode
-
-\unprotect
-
-\unexpanded\def\mexecuteifdefined#1%
- {\ifx#1\empty
- \expandafter\secondoftwoarguments
- \else\ifcsname#1\endcsname
- \doubleexpandafter\firstoftwoarguments
- \else
- \doubleexpandafter\secondoftwoarguments
- \fi\fi
- {\csname#1\endcsname}}
-
-% mrow
-
-\let\mrow\mathematics
-
-% msub msup msubsup
-
-\starttexdefinition msub #1#2
- \mathematics {
- #1_{#2}
- }
-\stoptexdefinition
-
-\starttexdefinition msup #1#2
- \mathematics {
- #1^{#2}
- }
-\stoptexdefinition
-
-\starttexdefinition msubsup #1#2#3
- \mathematics {
- #1_{#2}^{#3}
- }
-\stoptexdefinition
-
-% mn mo mi
-
-\let\mn\mathematics
-\let\mo\mathematics
-\let\mi\mathematics
-
-% ms mtext
-
-\starttexdefinition ms #1
- \text {
- "#1"
- }
-\stoptexdefinition
-
-\starttexdefinition mtext #1
- \text {
- #1
- }
-\stoptexdefinition
-
-% mover
-
-\starttexdefinition unexpanded moverabove #1
- \edef\movercommand{\utfmathfiller\movertoken}
- \mexecuteifdefined\movercommand {#1} \relax
-\stoptexdefinition
-\starttexdefinition unexpanded moverbase #1
- \edef\mbasecommand{\utfmathfiller\mbasetoken}
- \mexecuteifdefined\mbasecommand {#1}
- \relax
-\stoptexdefinition
-\starttexdefinition unexpanded moverbasefiller #1#2
- \edef\mbasecommand{e\utfmathcommandfiller\mbasetoken}
- \mexecuteifdefined\mbasecommand \relax {#2} {}
-\stoptexdefinition
-\starttexdefinition unexpanded moveraccent #1#2
- \edef\movercommand{\utfmathcommandabove\movertoken}
- \mexecuteifdefined\movercommand \relax {#1}
-\stoptexdefinition
-\starttexdefinition unexpanded movertext #1#2
- % \mathtriplet {\mathstylehbox{#1}} {#2} {}
- \mathtriplet {\mathematics{#1}} {#2} {}
-\stoptexdefinition
-\starttexdefinition unexpanded moveraccentchecker #1#2
- \edef\movertoken{\tochar{#2}}
- \doifelseutfmathabove\movertoken \moveraccent \movertext {#1}{#2}
-\stoptexdefinition
-
-\starttexdefinition unexpanded mover #1#2
- \mathematics {
- \edef\mbasetoken{\tochar{#1}}
- \doifelseutfmathfiller\mbasetoken \moverbasefiller \moveraccentchecker {#1}{#2}
- }
-\stoptexdefinition
-
-% munder
-
-\starttexdefinition unexpanded munderbelow #1
- \edef\mundercommand{\utfmathfiller\mundertoken}
- \mexecuteifdefined\mundercommand {#1} \relax
-\stoptexdefinition
-\starttexdefinition unexpanded munderbase #1
- \edef\mbasecommand{\utfmathfiller\mbasetoken}
- \mexecuteifdefined\mbasecommand {#1}
- \relax
-\stoptexdefinition
-\starttexdefinition unexpanded munderbasefiller #1#2
- \edef\mbasecommand{e\utfmathcommandfiller\mbasetoken}
- \mexecuteifdefined\mbasecommand \relax {#2} {}
-\stoptexdefinition
-\starttexdefinition unexpanded munderaccent #1#2
- \edef\mundercommand{\utfmathcommandbelow\mundertoken}
- \mexecuteifdefined\mundercommand \relax {#1}
-\stoptexdefinition
-\starttexdefinition unexpanded mundertext #1#2
- % \mathtriplet {\mathstylehbox{#1}} {} {#2}
- \mathtriplet {\mathematics{#1}} {} {#2}
-\stoptexdefinition
-\starttexdefinition unexpanded munderaccentchecker #1#2
- \edef\mundertoken{\tochar{#2}}
- \doifelseutfmathbelow\mundertoken \munderaccent \mundertext {#1}{#2}
-\stoptexdefinition
-
-\starttexdefinition unexpanded munder #1#2
- \mathematics {
- \edef\mbasetoken{\tochar{#1}}
- \doifelseutfmathfiller\mbasetoken \munderbasefiller \munderaccentchecker {#1}{#2}
- }
-\stoptexdefinition
-
-% munderover
-
-% mfenced
-
-% \mfenced{x,y}
-% \mfenced{{x}{y}}
-% \mfenced[separators]{{x}{y}}
-% \mfenced[left][right]{{x}{y}}
-% \mfenced[left][separators][right]{{x}{y}}
-
-\starttexdefinition unexpanded mfenced
- \dotripleempty\do_mfenced
-\stoptexdefinition
-
-\starttexdefinition unexpanded do_mfenced [#1][#2][#3]#4
- \mathematics {
- \ctxcommand{xmfenced(
- \ifthirdargument "#1","#2","#3"\else
- \ifsecondargument "#1",",","#2"\else
- \iffirstargument "(","#1",")"\else
- "(",",",")"\fi\fi\fi
- ,"#4")}
- }
-\stoptexdefinition
-
-% mfrac
-
-\starttexdefinition unexpanded mfrac #1#2
- \mathematics {
- \frac{#1}{#2}
- }
-\stoptexdefinition
-
-% mroot msqrt
-
-\starttexdefinition unexpanded mroot #1#2
- \mathematics {
- \sqrt[#1]{#2}
- }
-\stoptexdefinition
-
-\starttexdefinition unexpanded msqrt #1
- \mathematics {
- \sqrt{#1}
- }
-\stoptexdefinition
-
-% menclose
-
-% merror
-
-% mglyph
-
-% mmultiscripts
-
-% mpadded
-
-% mphantom
-
-% mspace
-
-% mstyle
-
-% mtable mtr mlabeledtr mtd
-
-% maction
-
-% semantics
-
-\protect
-
-\continueifinputfile{x-mathml-basics.mkiv}
-
-\starttext
-
-$\mfenced{1+a}$\par
-$\mfenced[,]{1+a}$\par
-$\mfenced[,]{{1+a}{1+b}}$\par
-
-% $\mover{â†}{test}$\par
-% $\mover{\utfchar{"2190}}{test}$\par
-% $\mover{e:leftarrow}{test}$\par
-% $\mover{x:2190}{test}$\par
-
-% $\mover{test}{âž}$\par
-% $\mover{test}{\utfchar{"23DE}}$\par
-% $\mover{test}{e:overbrace}$\par
-% $\mover{test}{x:23DE}$\par
-% $\mover{test}{over}$\par
-
-% \mover{test}{âž}\par
-% \mover{test}{\utfchar{"23DE}}\par
-% \mover{test}{e:overbrace}\par
-% \mover{test}{x:23DE}\par
-
-% $\munder{â†}{test}$\par
-% $\munder{\utfchar{"2190}}{test}$\par
-% $\munder{e:leftarrow}{test}$\par
-% $\munder{x:2190}{test}$\par
-
-% $\munder{test}{âŸ}$\par
-% $\munder{test}{\utfchar{"23DF}}$\par
-% $\munder{test}{e:underbrace}$\par
-% $\munder{test}{x:23DF}$\par
-% $\munder{test}{under}$\par
-
-% \math{{\msup{x}{2}\mo{+}\mn{2}\mi{x}\mo{+}\mi{b}}}
-
-% \mrow{\msup{x}{2}\mo{+}\mn{2}\mi{x}\mo{+}\mi{b}}
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/x-mathml-html.mkiv b/Master/texmf-dist/tex/context/base/x-mathml-html.mkiv
deleted file mode 100644
index 2ac7d3cba87..00000000000
--- a/Master/texmf-dist/tex/context/base/x-mathml-html.mkiv
+++ /dev/null
@@ -1,40 +0,0 @@
-%D \modul
-%D [ file=x-mathml,
-%D version=2014.05.18,
-%D title=\CONTEXT\ XML Modules,
-%D subtitle=\MATHML\ embedded HTML,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% maybe some more
-
-\startmodule [mathml-html]
-
-\startxmlsetups mml:html:b
- \bold{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups mml:html:i
- \italic{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups mml:html:tt
- \mono{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups mml:html:em
- \emphasized{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups mml:html
- \xmlsetsetup{#1}{mml:b|mml:i|mml:tt|mml:em}{mml:html:*}
-\stopxmlsetups
-
-\xmlregistersetup{mml:html}
-
-\stopmodule
diff --git a/Master/texmf-dist/tex/context/base/x-mathml.lua b/Master/texmf-dist/tex/context/base/x-mathml.lua
deleted file mode 100644
index a0db339bc61..00000000000
--- a/Master/texmf-dist/tex/context/base/x-mathml.lua
+++ /dev/null
@@ -1,896 +0,0 @@
-if not modules then modules = { } end modules ['x-mathml'] = {
- version = 1.001,
- comment = "companion to x-mathml.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
--- This needs an upgrade to the latest greatest mechanisms. But ... it
--- probably doesn't pay back as no mathml support ever did.
-
-local type, next = type, next
-local formatters, lower, find, gsub, match = string.formatters, string.lower, string.find, string.gsub, string.match
-local strip = string.strip
-local xmlsprint, xmlcprint, xmltext, xmlcontent, xmlempty = xml.sprint, xml.cprint, xml.text, xml.content, xml.empty
-local lxmlcollected, lxmlfilter = lxml.collected, lxml.filter
-local getid = lxml.getid
-local utfchar, utfcharacters, utfvalues, utfsplit, utflen = utf.char, utf.characters, utf.values, utf.split, utf.len
-local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
-local P, Cs = lpeg.P, lpeg.Cs
-
-local mathml = { }
-moduledata.mathml = mathml
-lxml.mathml = mathml -- for the moment
-
-local context = context
-
-local ctx_enabledelimiter = context.enabledelimiter
-local ctx_disabledelimiter = context.disabledelimiter
-local ctx_xmlflush = context.xmlflush -- better xmlsprint
-
-local ctx_halign = context.halign
-local ctx_noalign = context.noalign
-local ctx_bgroup = context.bgroup
-local ctx_egroup = context.egroup
-local ctx_crcr = context.crcr
-
-local ctx_bTABLE = context.bTABLE
-local ctx_eTABLE = context.eTABLE
-local ctx_bTR = context.bTR
-local ctx_eTR = context.eTR
-local ctx_bTD = context.bTD
-local ctx_eTD = context.eTD
-
-local ctx_mn = context.mn
-local ctx_mi = context.mi
-local ctx_mo = context.mo
-local ctx_startimath = context.startimath
-local ctx_ignorespaces = context.ignorespaces
-local ctx_removeunwantedspaces = context.removeunwantedspaces
-local ctx_stopimath = context.stopimath
-
-local ctx_mmlapplycsymbol = context.mmlapplycsymbol
-
-local ctx_mathopnolimits = context.mathopnolimits
-local ctx_left = context.left
-local ctx_right = context.right
-
--- an alternative is to remap to private codes, where we can have
--- different properties .. to be done; this will move and become
--- generic; we can then make the private ones active in math mode
-
--- todo: handle opening/closing mo's here ... presentation mml is such a mess ...
-
-characters.registerentities()
-
-local doublebar = utfchar(0x2016)
-
-local n_replacements = {
--- [" "] = utfchar(0x2002), -- "&textspace;" -> tricky, no &; in mkiv
- ["."] = "{.}",
- [","] = "{,}",
- [" "] = "",
-}
-
-local l_replacements = { -- in main table
- ["|"] = "\\mmlleftdelimiter\\vert",
- ["{"] = "\\mmlleftdelimiter\\lbrace",
- ["("] = "\\mmlleftdelimiter(",
- ["["] = "\\mmlleftdelimiter[",
- ["<"] = "\\mmlleftdelimiter<",
- [doublebar] = "\\mmlleftdelimiter\\Vert",
-}
-local r_replacements = { -- in main table
- ["|"] = "\\mmlrightdelimiter\\vert",
- ["}"] = "\\mmlrightdelimiter\\rbrace",
- [")"] = "\\mmlrightdelimiter)",
- ["]"] = "\\mmlrightdelimiter]",
- [">"] = "\\mmlrightdelimiter>",
- [doublebar] = "\\mmlrightdelimiter\\Vert",
-}
-
--- todo: play with asciimode and avoid mmlchar
-
-local o_replacements = { -- in main table
- ["@l"] = "\\mmlleftdelimiter.",
- ["@r"] = "\\mmlrightdelimiter.",
- ["{"] = "\\mmlleftdelimiter \\lbrace",
- ["}"] = "\\mmlrightdelimiter\\rbrace",
- ["|"] = "\\mmlleftorrightdelimiter\\vert",
- -- ["."] = "\\mmlleftorrightdelimiter.",
- ["/"] = "\\mmlleftorrightdelimiter\\solidus",
- [doublebar] = "\\mmlleftorrightdelimiter\\Vert",
- ["("] = "\\mmlleftdelimiter(",
- [")"] = "\\mmlrightdelimiter)",
- ["["] = "\\mmlleftdelimiter[",
- ["]"] = "\\mmlrightdelimiter]",
- -- ["<"] = "\\mmlleftdelimiter<",
- -- [">"] = "\\mmlrightdelimiter>",
- ["#"] = "\\mmlchar{35}",
- ["$"] = "\\mmlchar{36}", -- $
- ["%"] = "\\mmlchar{37}",
- ["&"] = "\\mmlchar{38}",
- ["^"] = "\\mmlchar{94}{}", -- strange, sometimes luatex math sees the char instead of \char
- ["_"] = "\\mmlchar{95}{}", -- so we need the {}
- ["~"] = "\\mmlchar{126}",
- [" "] = "",
- ["°"] = "^\\circ", -- hack
-
- -- [utfchar(0xF103C)] = "\\mmlleftdelimiter<",
- [utfchar(0xF1026)] = "\\mmlchar{38}",
- [utfchar(0x02061)] = "", -- function applicator sometimes shows up in font
- -- [utfchar(0xF103E)] = "\\mmlleftdelimiter>",
- -- [utfchar(0x000AF)] = '\\mmlchar{"203E}', -- 0x203E
-}
-
-local simpleoperatorremapper = utf.remapper(o_replacements)
-
---~ languages.data.labels.functions
-
-local i_replacements = {
- ["sin"] = "\\sin",
- ["cos"] = "\\cos",
- ["abs"] = "\\abs",
- ["arg"] = "\\arg",
- ["codomain"] = "\\codomain",
- ["curl"] = "\\curl",
- ["determinant"] = "\\det",
- ["divergence"] = "\\div",
- ["domain"] = "\\domain",
- ["gcd"] = "\\gcd",
- ["grad"] = "\\grad",
- ["identity"] = "\\id",
- ["image"] = "\\image",
- ["lcm"] = "\\lcm",
- ["lim"] = "\\lim",
- ["max"] = "\\max",
- ["median"] = "\\median",
- ["min"] = "\\min",
- ["mode"] = "\\mode",
- ["mod"] = "\\mod",
- ["polar"] = "\\Polar",
- ["exp"] = "\\exp",
- ["ln"] = "\\ln",
- ["log"] = "\\log",
- ["sin"] = "\\sin",
- ["arcsin"] = "\\arcsin",
- ["sinh"] = "\\sinh",
- ["arcsinh"] = "\\arcsinh",
- ["cos"] = "\\cos",
- ["arccos"] = "\\arccos",
- ["cosh"] = "\\cosh",
- ["arccosh"] = "\\arccosh",
- ["tan"] = "\\tan",
- ["arctan"] = "\\arctan",
- ["tanh"] = "\\tanh",
- ["arctanh"] = "\\arctanh",
- ["cot"] = "\\cot",
- ["arccot"] = "\\arccot",
- ["coth"] = "\\coth",
- ["arccoth"] = "\\arccoth",
- ["csc"] = "\\csc",
- ["arccsc"] = "\\arccsc",
- ["csch"] = "\\csch",
- ["arccsch"] = "\\arccsch",
- ["sec"] = "\\sec",
- ["arcsec"] = "\\arcsec",
- ["sech"] = "\\sech",
- ["arcsech"] = "\\arcsech",
- [" "] = "",
-
- ["false"] = "{\\mathrm false}",
- ["notanumber"] = "{\\mathrm NaN}",
- ["otherwise"] = "{\\mathrm otherwise}",
- ["true"] = "{\\mathrm true}",
- ["declare"] = "{\\mathrm declare}",
- ["as"] = "{\\mathrm as}",
-}
-
--- we could use a metatable or when accessing fallback on the
--- key but at least we now have an overview
-
-local csymbols = {
- arith1 = {
- lcm = "lcm",
- big_lcm = "lcm",
- gcd = "gcd",
- big_gcd = "big_gcd",
- plus = "plus",
- unary_minus = "minus",
- minus = "minus",
- times = "times",
- divide = "divide",
- power = "power",
- abs = "abs",
- root = "root",
- sum = "sum",
- product = "product",
- },
- fns = {
- domain = "domain",
- range = "codomain",
- image = "image",
- identity = "ident",
- -- left_inverse = "",
- -- right_inverse = "",
- inverse = "inverse",
- left_compose = "compose",
- lambda = "labmda",
- },
- linalg1 = {
- vectorproduct = "vectorproduct",
- scalarproduct = "scalarproduct",
- outerproduct = "outerproduct",
- transpose = "transpose",
- determinant = "determinant",
- vector_selector = "selector",
- -- matrix_selector = "matrix_selector",
- },
- logic1 = {
- equivalent = "equivalent",
- ["not"] = "not",
- ["and"] = "and",
- -- big_and = "",
- ["xor"] = "xor",
- -- big_xor = "",
- ["or"] = "or",
- -- big-or = "",
- implies = "implies",
- ["true"] = "true",
- ["false"] = "false",
- },
- nums1 = {
- -- based_integer = "based_integer"
- rational = "rational",
- inifinity = "infinity",
- e = "expenonentiale",
- i = "imaginaryi",
- pi = "pi",
- gamma = "gamma",
- NaN = "NaN",
- },
- relation1 = {
- eq = "eq",
- lt = "lt",
- gt = "gt",
- neq = "neq",
- leq = "leq",
- geq = "geq",
- approx = "approx",
- },
- set1 = {
- cartesian_product = "cartesianproduct",
- empty_set = "emptyset",
- map = "map",
- size = "card",
- -- suchthat = "suchthat",
- set = "set",
- intersect = "intersect",
- -- big_intersect = "",
- union = "union",
- -- big_union = "",
- setdiff = "setdiff",
- subset = "subset",
- ["in"] = "in",
- notin = "notin",
- prsubset = "prsubset",
- notsubset = "notsubset",
- notprsubset = "notprsubset",
- },
- veccalc1 = {
- divergence = "divergence",
- grad = "grad",
- curl = "curl",
- laplacian = "laplacian",
- Laplacian = "laplacian",
- },
- calculus1 = {
- diff = "diff",
- -- nthdiff = "",
- partialdiff = "partialdiff",
- int = "int",
- -- defint = "defint",
- },
- integer1 = {
- factorof = "factorof",
- factorial = "factorial",
- quotient = "quotient",
- remainder = "rem",
- },
- linalg2 = {
- vector = "vector",
- matrix = "matrix",
- matrixrow = "matrixrow",
- },
- mathmkeys = {
- -- equiv = "",
- -- contentequiv = "",
- -- contentequiv_strict = "",
- },
- rounding1 = {
- ceiling = "ceiling",
- floor = "floor",
- -- trunc = "trunc",
- -- round = "round",
- },
- setname1 = {
- P = "primes",
- N = "naturalnumbers",
- Z = "integers",
- rationals = "rationals",
- R = "reals",
- complexes = "complexes",
- },
- complex1 = {
- -- complex_cartesian = "complex_cartesian", -- ci ?
- real = "real",
- imaginary = "imaginary",
- -- complex_polar = "complex_polar", -- ci ?
- argument = "arg",
- conjugate = "conjugate",
- },
- interval1 = { -- not an apply
- -- integer_interval = "integer_interval",
- interval = "interval",
- interval_oo = { tag = "interval", closure = "open" },
- interval_cc = { tag = "interval", closure = "closed" },
- interval_oc = { tag = "interval", closure = "open-closed" },
- interval_co = { tag = "interval", closure = "closed-open" },
- },
- linalg3 = {
- -- vector = "vector.column",
- -- matrixcolumn = "matrixcolumn",
- -- matrix = "matrix.column",
- },
- minmax1 = {
- min = "min",
- -- big_min = "",
- max = "max",
- -- big_max = "",
- },
- piece1 = {
- piecewise = "piecewise",
- piece = "piece",
- otherwise = "otherwise",
- },
- error1 = {
- -- unhandled_symbol = "",
- -- unexpected_symbol = "",
- -- unsupported_CD = "",
- },
- limit1 = {
- -- limit = "limit",
- -- both_sides = "both_sides",
- -- above = "above",
- -- below = "below",
- -- null = "null",
- tendsto = "tendsto",
- },
- list1 = {
- -- map = "",
- -- suchthat = "",
- -- list = "list",
- },
- multiset1 = {
- size = { tag = "card", type = "multiset" },
- cartesian_product = { tag = "cartesianproduct", type = "multiset" },
- empty_set = { tag = "emptyset", type = "multiset" },
- -- multi_set = { tag = "multiset", type = "multiset" },
- intersect = { tag = "intersect", type = "multiset" },
- -- big_intersect = "",
- union = { tag = "union", type = "multiset" },
- -- big_union = "",
- setdiff = { tag = "setdiff", type = "multiset" },
- subset = { tag = "subset", type = "multiset" },
- ["in"] = { tag = "in", type = "multiset" },
- notin = { tag = "notin", type = "multiset" },
- prsubset = { tag = "prsubset", type = "multiset" },
- notsubset = { tag = "notsubset", type = "multiset" },
- notprsubset = { tag = "notprsubset", type = "multiset" },
- },
- quant1 = {
- forall = "forall",
- exists = "exists",
- },
- s_dist = {
- -- mean = "mean.dist",
- -- sdev = "sdev.dist",
- -- variance = "variance.dist",
- -- moment = "moment.dist",
- },
- s_data = {
- mean = "mean",
- sdev = "sdev",
- variance = "vriance",
- mode = "mode",
- median = "median",
- moment = "moment",
- },
- transc1 = {
- log = "log",
- ln = "ln",
- exp = "exp",
- sin = "sin",
- cos = "cos",
- tan = "tan",
- sec = "sec",
- csc = "csc",
- cot = "cot",
- sinh = "sinh",
- cosh = "cosh",
- tanh = "tanh",
- sech = "sech",
- csch = "cscs",
- coth = "coth",
- arcsin = "arcsin",
- arccos = "arccos",
- arctan = "arctan",
- arcsec = "arcsec",
- arcscs = "arccsc",
- arccot = "arccot",
- arcsinh = "arcsinh",
- arccosh = "arccosh",
- arctanh = "arstanh",
- arcsech = "arcsech",
- arccsch = "arccsch",
- arccoth = "arccoth",
- },
-}
-
-function xml.functions.remapmmlcsymbol(e)
- local at = e.at
- local cd = at.cd
- if cd then
- cd = csymbols[cd]
- if cd then
- local tx = e.dt[1]
- if tx and tx ~= "" then
- local tg = cd[tx]
- if tg then
- at.cd = nil
- at.cdbase = nil
- e.dt = { }
- if type(tg) == "table" then
- for k, v in next, tg do
- if k == "tag" then
- e.tg = v
- else
- at[k] = v
- end
- end
- else
- e.tg = tg
- end
- end
- end
- end
- end
-end
-
-function xml.functions.remapmmlbind(e)
- e.tg = "apply"
-end
-
-function xml.functions.remapopenmath(e)
- local tg = e.tg
- if tg == "OMOBJ" then
- e.tg = "math"
- elseif tg == "OMA" then
- e.tg = "apply"
- elseif tg == "OMB" then
- e.tg = "apply"
- elseif tg == "OMS" then
- local at = e.at
- e.tg = "csymbol"
- e.dt = { at.name or "unknown" }
- at.name = nil
- elseif tg == "OMV" then
- local at = e.at
- e.tg = "ci"
- e.dt = { at.name or "unknown" }
- at.name = nil
- elseif tg == "OMI" then
- e.tg = "ci"
- end
- e.rn = "mml"
-end
-
-function mathml.checked_operator(str)
- context(simpleoperatorremapper(str))
-end
-
-function mathml.stripped(str)
- context(strip(str))
-end
-
-local p_entity = (P("&") * ((1-P(";"))^0) * P(";"))
-local p_utfchar = lpegpatterns.utf8character
-local p_spacing = lpegpatterns.whitespace^1
-
-local p_mn = Cs((p_entity/"" + p_spacing/utfchar(0x205F) + p_utfchar/n_replacements)^0)
-local p_strip = Cs((p_entity/"" + p_utfchar )^0)
-local p_mi = Cs((p_entity/"" + p_utfchar/i_replacements)^0)
-
--- function mathml.mn(id,pattern)
--- -- maybe at some point we need to interpret the number, but
--- -- currently we assume an upright font
--- local str = xmlcontent(getid(id)) or ""
--- local rep = gsub(str,"&.-;","")
--- local rep = gsub(rep,"(%s+)",utfchar(0x205F)) -- medspace e.g.: twenty one (nbsp is not seen)
--- local rep = gsub(rep,".",n_replacements)
--- ctx_mn(rep)
--- end
-
-function mathml.mn(id,pattern)
- -- maybe at some point we need to interpret the number, but
- -- currently we assume an upright font
- ctx_mn(lpegmatch(p_mn,xmlcontent(getid(id)) or ""))
-end
-
--- function mathml.mo(id)
--- local str = xmlcontent(getid(id)) or ""
--- local rep = gsub(str,"&.-;","") -- todo
--- context(simpleoperatorremapper(rep) or rep)
--- end
-
-function mathml.mo(id)
- local str = lpegmatch(p_strip,xmlcontent(getid(id)) or "")
- context(simpleoperatorremapper(str) or str)
-end
-
-function mathml.mi(id)
- -- we need to strip comments etc .. todo when reading in tree
- local e = getid(id)
- local str = e.dt
- if type(str) == "table" then
- local n = #str
- if n == 0 then
- -- nothing to do
- elseif n == 1 then
- local first = str[1]
- if type(first) == "string" then
- -- local str = gsub(first,"&.-;","") -- bah
- -- local rep = i_replacements[str]
- -- if not rep then
- -- rep = gsub(str,".",i_replacements)
- -- end
- local str = lpegmatch(p_strip,first)
- local rep = i_replacements[str] or lpegmatch(p_mi,str)
- context(rep)
- -- ctx_mi(rep)
- else
- ctx_xmlflush(id) -- xmlsprint or so
- end
- else
- ctx_xmlflush(id) -- xmlsprint or so
- end
- else
- ctx_xmlflush(id) -- xmlsprint or so
- end
-end
-
-function mathml.mfenced(id) -- multiple separators
- id = getid(id)
- local at = id.at
- local left = at.open or "("
- local right = at.close or ")"
- local separators = at.separators or ","
- local l = l_replacements[left]
- local r = r_replacements[right]
- ctx_enabledelimiter()
- if l then
- context(l_replacements[left] or o_replacements[left] or "")
- else
- context(o_replacements["@l"])
- context(left)
- end
- ctx_disabledelimiter()
- local collected = lxmlfilter(id,"/*") -- check the *
- if collected then
- local n = #collected
- if n == 0 then
- -- skip
- elseif n == 1 then
- xmlsprint(collected[1]) -- to be checked
- else
- local t = utfsplit(separators,true)
- for i=1,n do
- xmlsprint(collected[i]) -- to be checked
- if i < n then
- local m = t[i] or t[#t] or ""
- if m == "|" then
- m = "\\enabledelimiter\\middle|\\relax\\disabledelimiter"
- elseif m == doublebar then
- m = "\\enabledelimiter\\middle|\\relax\\disabledelimiter"
- elseif m == "{" then
- m = "\\{"
- elseif m == "}" then
- m = "\\}"
- end
- context(m)
- end
- end
- end
- end
- ctx_enabledelimiter()
- if r then
- context(r_replacements[right] or o_replacements[right] or "")
- else
- context(right)
- context(o_replacements["@r"])
- end
- ctx_disabledelimiter()
-end
-
-local function flush(e,tag,toggle)
- if tag == "none" then
- -- if not toggle then
- context("{}") -- {} starts a new ^_ set
- -- end
- elseif toggle then
- context("^{")
- xmlsprint(e.dt)
- context("}{}") -- {} starts a new ^_ set
- else
- context("_{")
- xmlsprint(e.dt)
- context("}")
- end
- return not toggle
-end
-
-function mathml.mmultiscripts(id)
- local done, toggle = false, false
- for e in lxmlcollected(id,"/*") do
- local tag = e.tg
- if tag == "mprescripts" then
- context("{}")
- done = true
- elseif done then
- toggle = flush(e,tag,toggle)
- end
- end
- local done, toggle = false, false
- for e in lxmlcollected(id,"/*") do
- local tag = e.tg
- if tag == "mprescripts" then
- break
- elseif done then
- toggle = flush(e,tag,toggle)
- else
- xmlsprint(e)
- done = true
- end
- end
-end
-
-local columnalignments = {
- left = "flushleft",
- right = "flushright",
- center = "middle",
-}
-
-local rowalignments = {
- top = "high",
- bottom = "low",
- center = "lohi",
- baseline = "top",
- axis = "lohi",
-}
-
-local frametypes = {
- none = "off",
- solid = "on",
- dashed = "on",
-}
-
--- crazy element ... should be a proper structure instead of such a mess
-
-function mathml.mcolumn(root)
- root = getid(root)
- local matrix, numbers = { }, 0
- local function collect(m,e)
- local tag = e.tg
- if tag == "mi" or tag == "mn" or tag == "mo" or tag == "mtext" then
- local str = xmltext(e)
- str = lpegmatch(p_strip,str)
- for s in utfcharacters(str) do
- m[#m+1] = { tag, s }
- end
- if tag == "mn" then
- local n = utflen(str)
- if n > numbers then
- numbers = n
- end
- end
- elseif tag == "mspace" or tag == "mline" then
- local str = e.at.spacing or ""
- for s in utfcharacters(str) do
- m[#m+1] = { tag, s }
- end
- -- elseif tag == "mline" then
- -- m[#m+1] = { tag, e }
- end
- end
- for e in lxmlcollected(root,"/*") do
- local m = { }
- matrix[#matrix+1] = m
- if e.tg == "mrow" then
- -- only one level
- for e in lxmlcollected(e,"/*") do
- collect(m,e)
- end
- else
- collect(m,e)
- end
- end
- ctx_halign()
- ctx_bgroup()
- context([[\hss\startimath\alignmark\stopimath\aligntab\startimath\alignmark\stopimath\cr]])
- for i=1,#matrix do
- local m = matrix[i]
- local mline = true
- for j=1,#m do
- if m[j][1] ~= "mline" then
- mline = false
- break
- end
- end
- if mline then
- ctx_noalign([[\obeydepth\nointerlineskip]])
- end
- for j=1,#m do
- local mm = m[j]
- local tag, chr = mm[1], mm[2]
- if tag == "mline" then
- -- This code is under construction ... I need some real motivation
- -- to deal with this kind of crap.
---~ local n, p = true, true
---~ for c=1,#matrix do
---~ local mc = matrix[c][j]
---~ if mc then
---~ mc = mc[2]
---~ if type(mc) ~= "string" then
---~ n, p = false, false
---~ break
---~ elseif find(mc,"^[%d ]$") then -- rangecheck is faster
---~ -- digit
---~ elseif not find(mc,"^[%.%,]$") then -- rangecheck is faster
---~ -- punctuation
---~ else
---~ n = false
---~ break
---~ end
---~ end
---~ end
---~ if n then
---~ chr = "\\mmlmcolumndigitrule"
---~ elseif p then
---~ chr = "\\mmlmcolumnpunctuationrule"
---~ else
---~ chr = "\\mmlmcolumnsymbolrule" -- should be widest char
---~ end
- chr = "\\hrulefill"
- elseif tag == "mspace" then
- chr = "\\mmlmcolumndigitspace" -- utfchar(0x2007)
- end
- if j == numbers + 1 then
- context("\\aligntab")
- end
- local nchr = n_replacements[chr]
- context(nchr or chr)
- end
- ctx_crcr()
- end
- ctx_egroup()
-end
-
-local spacesplitter = lpeg.tsplitat(" ")
-
-function mathml.mtable(root)
- -- todo: align, rowspacing, columnspacing, rowlines, columnlines
- root = getid(root)
- local at = root.at
- local rowalign = at.rowalign
- local columnalign = at.columnalign
- local frame = at.frame
- local rowaligns = rowalign and lpegmatch(spacesplitter,rowalign)
- local columnaligns = columnalign and lpegmatch(spacesplitter,columnalign)
- local frames = frame and lpegmatch(spacesplitter,frame)
- local framespacing = at.framespacing or "0pt"
- local framespacing = at.framespacing or "-\\ruledlinewidth" -- make this an option
-
- ctx_bTABLE { frame = frametypes[frame or "none"] or "off", offset = framespacing, background = "" } -- todo: use xtables and definextable
- for e in lxmlcollected(root,"/(mml:mtr|mml:mlabeledtr)") do
- ctx_bTR()
- local at = e.at
- local col = 0
- local rfr = at.frame or (frames and frames [#frames])
- local rra = at.rowalign or (rowaligns and rowaligns [#rowaligns])
- local rca = at.columnalign or (columnaligns and columnaligns[#columnaligns])
- local ignorelabel = e.tg == "mlabeledtr"
- for e in lxmlcollected(e,"/mml:mtd") do -- nested we can use xml.collected
- col = col + 1
- if ignorelabel and col == 1 then
- -- get rid of label, should happen at the document level
- else
- local at = e.at
- local rowspan = at.rowspan or 1
- local columnspan = at.columnspan or 1
- local cra = rowalignments [at.rowalign or (rowaligns and rowaligns [col]) or rra or "center"] or "lohi"
- local cca = columnalignments[at.columnalign or (columnaligns and columnaligns[col]) or rca or "center"] or "middle"
- local cfr = frametypes [at.frame or (frames and frames [col]) or rfr or "none" ] or "off"
- ctx_bTD { align = formatters["{%s,%s}"](cra,cca), frame = cfr, nx = columnspan, ny = rowspan }
- if xmlempty(e,".") then
- -- nothing, else hsize max
- else
- ctx_startimath()
- -- ctx_ignorespaces()
- xmlcprint(e)
- -- ctx_removeunwantedspaces()
- ctx_stopimath()
- end
- ctx_eTD()
- end
- end
- -- if e.tg == "mlabeledtr" then
- -- ctx_bTD()
- -- xmlcprint(xml.first(e,"/!mml:mtd"))
- -- ctx_eTD()
- -- end
- ctx_eTR()
- end
- ctx_eTABLE()
-end
-
-function mathml.csymbol(root)
- root = getid(root)
- local at = root.at
- local encoding = at.encoding or ""
- local hash = url.hashed(lower(at.definitionUrl or ""))
- local full = hash.original or ""
- local base = hash.path or ""
- local text = strip(xmltext(root) or "")
- ctx_mmlapplycsymbol(full,base,encoding,text)
-end
-
-local p = lpeg.Cs(((1-lpegpatterns.whitespace)^1 / "mml:enclose:%0" + (lpegpatterns.whitespace^1)/",")^1)
-
-function mathml.menclosepattern(root)
- root = getid(root)
- local a = root.at.notation
- if a and a ~= "" then
- context(lpegmatch(p,a))
- end
-end
-
-function xml.is_element(e,name)
- return type(e) == "table" and (not name or e.tg == name)
-end
-
-function mathml.cpolar_a(root)
- root = getid(root)
- local dt = root.dt
- ctx_mathopnolimits("Polar")
- ctx_left(false,"(")
- for k=1,#dt do
- local dk = dt[k]
- if xml.is_element(dk,"sep") then
- context(",")
- else
- xmlsprint(dk)
- end
- end
- ctx_right(false,")")
-end
-
--- crap .. maybe in char-def a mathml overload
-
-local mathmleq = {
- [utfchar(0x00AF)] = utfchar(0x203E),
-}
-
-function mathml.extensible(chr)
- context(mathmleq[chr] or chr)
-end
diff --git a/Master/texmf-dist/tex/context/base/x-mathml.mkii b/Master/texmf-dist/tex/context/base/x-mathml.mkii
deleted file mode 100644
index ccb9fa05463..00000000000
--- a/Master/texmf-dist/tex/context/base/x-mathml.mkii
+++ /dev/null
@@ -1,28 +0,0 @@
-%D \module
-%D [ file=x-mathml,
-%D version=1999.12.20,
-%D title=\CONTEXT\ XML Modules,
-%D subtitle=Loading \MATHML\ Filters,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 have to make sure that some basic entities are
-%D loaded:
-
-\useXMLfilter[ent]
-
-%D Then we load the math:
-
-\useXMLfilter[mml,mmp,mmc]
-
-%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]
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-mathml.mkiv b/Master/texmf-dist/tex/context/base/x-mathml.mkiv
deleted file mode 100644
index 65a7223ce59..00000000000
--- a/Master/texmf-dist/tex/context/base/x-mathml.mkiv
+++ /dev/null
@@ -1,2598 +0,0 @@
-%D \module
-%D [ file=x-mathml,
-%D version=2008.05.29,
-%D title=\CONTEXT\ XML Modules,
-%D subtitle=\MATHML,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% \xmlfilter{#1}{/*/name()} -> \xmltag
-
-% This module is under construction and will be cleaned up. We use a funny mix of
-% xml, tex and lua. I could rewrite the lot but it also shows how context evolves.
-%
-% I might end up with a lua-only implementation some day. I must find a good reason
-% to spend time on it. In fact, it might even be more messy.
-%
-% no m:text strip (needs checking, maybe nbsp is mandate
-%
-% todo: more will be moved to lua (less hassle)
-% todo: move left/right to the lua end
-%
-% this implememation looks like a hack ... this is because we deal with all weird cases we
-% ran into, including abuse that was supposed to render ok (even if it didn't in other
-% renderers) .. it was simply expected to work that way.
-
-\writestatus{loading}{ConTeXt XML Macros / MathML Renderer}
-
-\unprotect
-
-\usemodule[x][calcmath]
-%usemodule[x][asciimath]
-
-\startmodule [mathml]
-
-\registerctxluafile{x-mathml}{}
-
-\def\ctxmodulemathml#1{\ctxlua{moduledata.mathml.#1}}
-
-\startxmlsetups xml:mml:define
- \xmlsetsetup{#1} {(formula|subformula)} {mml:formula}
- \xmlfilter {#1} {omt:*/function(remapopenmath)}
- \xmlfilter {#1} {mml:bind/function(remapmmlbind)}
- \xmlfilter {#1} {mml:csymbol/function(remapmmlcsymbol)}
- \xmlsetsetup{#1} {mml:*} {mml:*}
- \xmlsetsetup{#1} {mml:apply/mml:apply/mml:inverse/../..} {mml:apply:inverse}
- \xmlstrip {#1} {(mml:mi|mml:mo|mml:mn|mml:csymbol)}
-\stopxmlsetups
-
-\xmlregisterns{omt}{openmath}
-\xmlregisterns{mml}{mathml}
-
-\xmlregistersetup{xml:mml:define}
-
-% \unexpanded\def\MMLhack % no longer needed
-% {\let\MMLpar\par
-% \let\par\relax
-% \everyvbox{\let\par\MMLpar}}
-
-\xmlmapvalue {mml:math:mode} {display} {\displaymathematics} % we had this already
-\xmlmapvalue {mml:math:mode} {inline} {\inlinemathematics }
-
-\xmlmapvalue {mml:math:display} {block} {\displaymathematics} % before this showed up
-\xmlmapvalue {mml:math:display} {inline} {\inlinemathematics }
-
-\xmlmapvalue {mml:math:dir} {ltr} {\setfalse\c_math_right_to_left\math_basics_synchronize_direction}
-\xmlmapvalue {mml:math:dir} {rtl} {\settrue \c_math_right_to_left\math_basics_synchronize_direction}
-
-\startxmlsetups mml:math
- \begingroup
- \xmlval {mml:math:dir} {\xmlatt{#1}{dir}} {}
- \xmlval {mml:math:display} {\xmlatt{#1}{display}} {
- \xmlval {mml:math:mode} {\xmlatt{#1}{mode}} {
- \automathematics
- }
- }
- {
- \math_fences_checked_start
- %\MMLhack
- \xmlflush{#1}
- \math_fences_checked_stop
- }
- \endgroup
-\stopxmlsetups
-
-\startxmlsetups mml:imath
- \inlinemathematics {
- \math_fences_checked_start
- %\MMLhack
- \xmlflush{#1}
- \math_fences_checked_stop
- }
-\stopxmlsetups
-
-\startxmlsetups mml:dmath
- \displaymathematics {
- \math_fences_checked_start
- %\MMLhack
- \xmlflush{#1}
- \math_fences_checked_stop
- }
-\stopxmlsetups
-
-%D First we define some general formula elements.
-
-\startxmlsetups mml:formula
- \edef\mmlformulalabel {\xmlatt{#1}{label}\xmlatt{#1}{id}}
- \edef\mmlformulasublabel{\xmlatt{#1}{sublabel}\xmlatt{#1}{id}}
- \doifsomething\mmlformulalabel{\placeformula[\mmlformulalabel]{\mmlformulasublabel}}
- \startformula
- %\MMLhack
- \xmlfirst{#1}{/mml:math}
- \stopformula
-\stopxmlsetups
-
-% old delimiter hacks
-%
-% \setfalse\mmlignoredelimiter
-% \settrue \mmlsomeleftdelimiter
-%
-% \def\MMLleftorright
-% {\ifconditional\mmlsomeleftdelimiter
-% \setfalse\mmlsomeleftdelimiter\expandafter\MMLleft
-% \else
-% \settrue \mmlsomeleftdelimiter\expandafter\MMLright
-% \fi}
-%
-% \ifx\MMLleft \undefined \let\MMLleft \firstofoneargument \fi
-% \ifx\MMLright \undefined \let\MMLright \firstofoneargument \fi
-% \ifx\MMLmiddle\undefined \let\MMLmiddle\firstofoneargument \fi
-%
-% \def\mmlleftdelimiter #1{\ifconditional\mmlignoredelimiter#1\else\normalordelimiter{#1}{\MMLleft #1}\fi}
-% \def\mmlrightdelimiter #1{\ifconditional\mmlignoredelimiter#1\else\normalordelimiter{#1}{\MMLright #1}\fi}
-% \def\mmlmiddledelimiter #1{\ifconditional\mmlignoredelimiter#1\else\normalordelimiter{#1}{\MMLmiddle #1}\fi}
-% \def\mmlleftorrightdelimiter#1{\ifconditional\mmlignoredelimiter#1\else\normalordelimiter{#1}{\MMLleftorright#1}\fi}
-
-% new delimiter hacks (assumes wrapping)
-%
-% \math_fences_checked_start
-% \math_fences_checked_stop
-%
-% \math_fences_checked_left
-% \math_fences_checked_middle
-% \math_fences_checked_right
-% \math_fences_checked_left_or_right
-
-\setfalse\mmlignoredelimiter % alternatively we could turn it on/off inside the start/stop and ignore \left\right\middle otherwise
-
-\def\mmlleftdelimiter {\ifconditional\mmlignoredelimiter\else\expandafter\math_fences_checked_left \fi}
-\def\mmlrightdelimiter {\ifconditional\mmlignoredelimiter\else\expandafter\math_fences_checked_right \fi}
-\def\mmlmiddledelimiter {\ifconditional\mmlignoredelimiter\else\expandafter\math_fences_checked_middle \fi}
-\def\mmlleftorrightdelimiter{\ifconditional\mmlignoredelimiter\else\expandafter\math_fences_checked_left_or_right\fi}
-
-% end of delimiter mess
-
-\def\mmlchar#1{\char#1 } % used in lua code
-
-% \newcount\delimiternesting \appendtoks \delimiternesting\zerocount \to \everymathematics
-
-% \def\mmlleftdelimiter #1{\ifconditional\mmlignoredelimiter#1\else\normalordelimiter{#1}{%
-% \advance\delimiternesting\plusone \MMLleft #1}\fi}
-% \def\mmlrightdelimiter #1{\ifconditional\mmlignoredelimiter#1\else\normalordelimiter{#1}{%
-% \advance\delimiternesting\plusone \MMLright#1}\fi}
-% \def\mmlmiddledelimiter#1{\ifconditional\mmlignoredelimiter#1\else\normalordelimiter{#1}{%
-% \ifcase\delimiternesting\MMLleft\else\MMLmiddle\fi#1}\fi}
-
-%D Remark: from now on this is a module and no longer an xtag
-%D filter. There is an intermediate cleaner module but it has
-%D some namespace limitations. Here we do it the \MKIV\ way.
-
-%D The rendering macros:
-
-\def\MMLrm{\mr}
-
-\def\MMLseparator#1{\removeunwantedspaces{#1}\ignorespaces} % nils space after separator
-\def\MMLseparator#1{,} % todo, for europe we need to block the space
-
-%D Since I only had the draft of MathML 2 and later 3 as example of
-%D rendering, there are probably a lot of omissions and
-%D misinterpretations. At least I learned some bits and
-%D pieces of math rendering.
-%D
-%D The main complications were not so much the math, but to
-%D find the most efficient way to handle elements without
-%D spacing beging messed up. The first implementation was
-%D aimed at getting reasonable output, this second
-%D implementation is already better in terms of handling
-%D nesting, and I will definitely need a third one that has
-%D more efficient and less ugly code.
-%D
-%D The \TEX\ part is not that complicated and once the
-%D preprocessor was okay, the rest way just a lot of keying
-%D and testing. It all comes down to gobbling, redefining,
-%D and not so much to parsing.
-%D
-%D The second implementation expanded the whole math sequence
-%D into an internal \TEX\ representation. This is a rather clean
-%D and fast process. Filtering and testing takes place by
-%D redefining teh internal representation macros.
-%D
-%D The third implementation may look a bit more messy in some
-%D respects. This is because in \TEX\ it's not that trivial to
-%D implement a tree handler. We use a stack for the \type {apply}
-%D element and other sequential content. Occasionally we need to
-%D peek into child elements which involves messy code. This
-%D implementation is closer to the normal \XML\ handling in
-%D \CONTEXT.
-
-%D We start with the parent elements and the option handler.
-
-\unexpanded\def\xmlmathmldirective#1{\dosetvalue{MML#1}}
-
-\xmlinstalldirective{mathml}{xmlmathmldirective}
-
-%def\xmlmathmldirective#1#2#3{[#1][#2][#3]\dosetvalue{MML#1}{#2}{#3}}
-
-%D In the styles, options can be set with:
-
-\unexpanded\def\setupMMLappearance[#1]{\dodoubleargument\getparameters[MML#1]} % no @@ because passed to lua
-
-%D We will apply inner math to all bits and pieces made up by an
-%D \type {apply}.
-
-\def\MMLmathinner
- {\ifinner
- \expandafter\firstofoneargument
- \else
- \expandafter\mathinner
- \fi}
-
-%D Auxiliary MathML macros: (to be generalized)
-
-\def\mmlfirst #1{\xmlelement{#1}{1}} % we can move these inline if needed
-\def\mmlsecond #1{\xmlelement{#1}{2}}
-\def\mmlthird #1{\xmlelement{#1}{3}}
-\def\mmlprelast#1{\xmlelement{#1}{-2}}
-\def\mmllast #1{\xmlelement{#1}{-1}}
-
-\unexpanded\def\mmlunexpandedfirst #1{\xmlelement{#1}{1}} % we can move these inline if needed
-\unexpanded\def\mmlunexpandedsecond #1{\xmlelement{#1}{2}}
-\unexpanded\def\mmlunexpandedthird #1{\xmlelement{#1}{3}}
-
-\starttexdefinition doifelsemmlfunction #1
- \xmldoifelse {#1} {/mml:fn} {
- \firstoftwoarguments
- } {
- \xmldoifelse {#1} {/mml:apply/mml:fn} {
- \firstoftwoarguments
- } {
- \xmldoifelse {#1} {/mml:ci[@type=='fn']} {
- \firstoftwoarguments
- } {
- \secondoftwoarguments
- }
- }
- }
-\stoptexdefinition
-
-%D A couple of lists:
-
-\convertargument
- mml:times|mml:divide|mml:power|%
- mml:lt|mml:gt|mml:eq|mml:leq|mml:geq|%
- mml:in|mml:inverse|%
- mml:fn|%
- mml:floor|mml:ceiling|%
- mml:mean|%
- mml:selector|%
- mml:abs|mml:int|mml:limit|mml:sum|mml:product|%
- mml:outerproduct|mml:innerproduct|mml:scalarproduct%
-\to \MMLcmainresetlist
-
-\convertargument
- mml:sin|mml:arcsin|mml:sinh|mml:arcsinh|%
- mml:cos|mml:arccos|mml:cosh|mml:arccosh|%
- mml:tan|mml:arctan|mml:tanh|mml:arctanh|%
- mml:cot|mml:arccot|mml:coth|mml:arccoth|%
- mml:csc|mml:arccsc|mml:csch|mml:arccsch|%
- mml:sec|mml:arcsec|mml:sech|mml:arcsech|%
- mml:ln|mml:exp|mml:log|%
- mml:abs|mml:int|mml:limit|mml:sum|mml:product|%
- mml:fn%
-\to \MMLcfunctionlist
-
-\convertargument
- mml:sin|mml:arcsin|mml:sinh|mml:arcsinh|%
- mml:cos|mml:arccos|mml:cosh|mml:arccosh|%
- mml:tan|mml:arctan|mml:tanh|mml:arctanh|%
- mml:cot|mml:arccot|mml:coth|mml:arccoth|%
- mml:csc|mml:arccsc|mml:csch|mml:arccsch|%
- mml:sec|mml:arcsec|mml:sech|mml:arcsech|%
- mml:ln|mml:exp|mml:log|%
- mml:abs%
-\to \MMLcpurefunctionlist
-
-\convertargument
- mml:diff|mml:partialdiff|mml:root%
-\to \MMLcconstructlist
-
-%D We use inner and grouping (begin/end and no b/e) else we
-%D get problems with 1/2(1+2) and alike (todo: ask taco).
-%D
-%D The problem with apply is that we need to take care of
-%D several situations, like:
-%D
-%D \starttyping
-%D <apply> <.../> ...
-%D <apply> <fn> ...
-%D <apply> <apply> <ci> ...
-%D <apply> <apply> <fn> <ci> ...
-%D \stoptyping
-%D
-%D Because we translated version 2 of this renderer into
-%D version 3 the following definitions may be sub optimal or
-%D more complex than actually needed.
-
-%D We will more more to lua ...
-
-% simple version
-
-\newcount\@MMLlevel \def\MMLcreset{\@MMLlevel\zerocount}
-
-\let\MMLctempresetlist\empty \def\setMMLcreset{\edef\MMLctempresetlist}
-
-\let\MMLdoL\donothing
-\let\MMLdoR\donothing
-
-\newcount\mmlapplydepth \def\MMLcreset{\mmlapplydepth\zerocount}
-
-% \newtoks \@@postponedMMLactions \setfalse \somepostponedMMLactions
-%
-% \def\postponeMMLactions#1%
-% {\global\settrue\somepostponedMMLactions
-% \global\@@postponedMMLactions\expandafter{\the\@@postponedMMLactions#1}}
-%
-% \def\postponedMMLactions
-% {\global\setfalse\somepostponedMMLactions
-% \@EA\global\@EA\@@postponedMMLactions\@EA\emptytoks
-% \the\@@postponedMMLactions}
-
-\startxmlsetups mml:apply
- \MMLmathinner {
- \xmldoif {#1} {/(\MMLcmainresetlist\string|\MMLctempresetlist)} {
- % \MMLcreset
- }
- \edef\mmlapplyopentoken {\xmlatt{#1}{open}}
- \edef\mmlapplyclosetoken{\xmlatt{#1}{close}}
- \ifcase\mmlapplydepth \else
- \ifx\mmlapplyopentoken\empty
- \def\mmlapplyopentoken {(}
- \def\mmlapplyclosetoken{)}
- \fi
- \fi
- \advance\mmlapplydepth\plusone
- \begingroup
- \ifx\mmlapplyopentoken\empty
- \let\MMLdoL\donothing
- \let\MMLdoR\donothing
- \else
- \edef\MMLdoL{\noexpand\left \mmlapplyopentoken }
- \edef\MMLdoR{\noexpand\right\mmlapplyclosetoken}
- \fi
- \let\MMLctempresetlist\empty
- \xmldoifelse {#1} {/mml:apply} {
-% % <apply> <apply> ... </apply> <ci> .. </ci> </apply>
-% \xmldoifelse {#1} {/mml:apply(mml:plus|mml:minus)} {% [a]
-% % yet incomplete and rather untested
-% % <apply> <apply> <minus/> <tan/> <cos/> </apply> <ci>x</ci> </apply>
- } {% [b]
-% \MMLcreset
- }
-% \MMLdoL
-% \mmlfirst{#1}
-% \ifconditional\somepostponedMMLactions
-% \postponedMMLactions
-% \else
-% \left(\MMLcreset\mmlsecond{#1}\right)
-% \fi
-% \MMLdoR
-% } {
- \edef\mmlapplyaction{\xmlfilter{#1}{/*/name()}}
- \doifelsesetups {mml:apply:mml:\mmlapplyaction} {
- \xmlsetup{#1}{mml:apply:mml:\mmlapplyaction}
- } {
-% \MMLdoL
- \xmlsetup{#1}{mml:\xmlfilter{#1}{/*/name()}}
-% \MMLdoR
- }
-% }
- \endgroup
- \advance\mmlapplydepth\minusone
- }
-\stopxmlsetups
-
-\startxmlsetups mml:apply:mml:apply
- \xmlflush{#1}
- \xmlall{#1}{../[position()>1]}
-\stopxmlsetups
-
-\startxmlsetups mml:apply:mml:fn
- \xmldoifelse {#1} {/mml:fn/mml:ci} {
- \edef\mmlfnci{\xmlstripped{#1}{/mml:fn/mml:ci}}% was xmlcontent
- \doifelsesetups{mmc:fn:\mmlfnci} { % was mmc:fn:...
- \xmlsetup{#1}{mmc:fn:\mmlfnci} % \MMLdoL/MMLdoR to be handled in plugin
- } {
- \MMLcreset
- \MMLdoL
- \mmlfirst{#1}
- \ifnum\xmlcount{#1}{/*}>\plusone
- \negthinspace % not enough
- \left(\MMLcreset\xmlconcatrange{#1}{/*}{2}{}{\MMLseparator,}\right)
- \fi
- \MMLdoR
- }
- } {
- \MMLcreset
- \MMLdoL
- \xmlall{#1}{/*}
- \MMLdoR
- }
-\stopxmlsetups
-
-\startxmlsetups mml:apply:mml:csymbol
- \xmlsetup{#1}{mml:csymbol}% \MMLdoL/MMLdoR to be handled in plugin
-\stopxmlsetups
-
-\startxmlsetups mml:apply:mml:ci
- \xmlfirst{#1}{/mml:ci}
- \ifnum\xmlcount{#1}{/*}>\plusone
- \left(\MMLcreset\xmlconcatrange{#1}{/*}{2}{}{\MMLseparator,}\right)
- \fi
-\stopxmlsetups
-
-% reln
-
-\startxmlsetups mml:reln
- \writestatus{XML}{MathML element "reln" is obsolete}
-\stopxmlsetups
-
-% fn
-
-% plusminus ±
-
-\startxmlsetups mmc:fn:\utfchar{"00B1}
- \MMLdoL
- \xmlconcat{#1}{/[position()>1]}{\utfchar{"00B1}}
- \MMLdoR
-\stopxmlsetups
-
-% minusplus
-
-\startxmlsetups mmc:fn:\utfchar{"2213}
- \MMLdoL
- \xmlconcat{#1}{/[position()>1]}{\utfchar{"2213}}
- \MMLdoR
-\stopxmlsetups
-
-\startxmlsetups mmc:fn
- \begingroup
- \edef\mmlnoffn{\xmlcount{#1}{/*}}
- \ifnum\mmlnoffn>\plustwo
- \def\MMCfnleft {\left(}
- \def\MMCfnright{\right)}
- \else
- \let\MMCfnleft \relax
- \let\MMCfnright\relax
- \fi
- \xmldoifelse {#1} {/mml:ci} { % first
- \edef\mmlfnci{\xmltext{#1}{/mml:ci}}% was xmlcontent
- \doifelsesetups{mmc:fn:\mmlfnci} { % was mmc:fn:...
- \xmlsetup{#1}{mmc:fn:\mmlfnci} % \MMLdoL/MMLdoR to be handled in plugin
- } {
- \MMLcreset
- \mmlfirst{#1}
- }
- } {
- \xmldoifelse {#1} {/mml:apply} { % first
- \xmldoifelse {#1} {/(mml:plus\string|mml:minus)} {
- \left(\mmlfirst{#1}\right)
- } {
- \mmlfirst{#1}
- }
- \ifnum\mmlnoffn>\plusone
- \left(\xmlall{#1}{/!mml:apply}\right)
- \fi
- } {
- \MMLcreset
- \negthinspace
- \MMCfnleft
- \ifnum\mmlnoffn=\plustwo,\fi
- \xmlconcat{#1}{/*}{2}{}{\MMLseparator,}
- \MMCfnright
- }
- }
- \endgroup
-\stopxmlsetups
-
-\startxmlsetups mmc:fn:apply % where used?
- \xmldoifelse {#1} {/mml:ci} { % first
- \edef\mmlfnci{\xmltext{#1}{/mml:ci}}% was xmlcontent
- \doifelsesetups{mmc:fn:\mmlfnci} { % was mmc:fn:...
- \xmlsetup{#1}{mmc:fn:\mmlfnci} % \MMLdoL/MMLdoR to be handled in plugin
- } {
- \MMLcreset
- \mmlfirst{#1}
- \ifnum\xmlcount{#1}{/*}>\plusone
- \negthinspace
- \left(\MMLcreset\xmlconcat{#1}{2}{}{\MMLseparator,}\right)
- \fi
- }
- } {
- \endgroup
- \MMLcreset
- \mmlfirst{#1}
- }
-\stopxmlsetups
-
-%D The next definition provide a kind of plug-in mechanism (see
-%D the open math extension module).
-
-% http://www.publishers.com/somename
-%
-% called at the lua end
-
-\starttexdefinition mmlapplycsymbol #1#2#3#4
- % #1=full url, #2=name, #3=encoding, #4=text
- \doifelse {#3} {text} {
- \text{#4}
- } {
- \doifelsesetups {mml:csymbol:#1} {
- % full url
- \fastsetup{mml:csymbol:#1}
- } {
- % somename (fallback)
- \doifelsesetups {mml:csymbol:#2} {
- \fastsetup{mml:csymbol:#2}
- } {
- \xmlval{mmc:cs}{#3}{}% todo
- }
- }
- }
-\stoptexdefinition
-
-\startxmlsetups mml:csymbol
- \ctxmodulemathml{csymbol("#1")}
-\stopxmlsetups
-
-\startxmlsetups mml:csymbol:cdots
- \cdots
-\stopxmlsetups
-
-% \startxmlsetups mml:csymbol:<url> \stopxmlsetups
-
-%D Alternative b will convert periods into comma's:
-
-\setupMMLappearance[cn] [\c!alternative=\v!a]
-\setupMMLappearance[polar] [\c!alternative=\v!a] % a|b|c
-\setupMMLappearance[float] [\c!symbol=\v!no] % \v!yes|dot
-\setupMMLappearance[enotation][\c!symbol=\v!no] % \v!yes|dot
-\setupMMLappearance[base] [\c!symbol=\v!numbers] % digits|characters|text|no
-
-\startxmlsetups mml:cs \xmlcommand{#1}{/}{mml:cs:\xmlattdef{#1}{type}{default}} \stopxmlsetups
-\startxmlsetups mml:ci \xmlcommand{#1}{/}{mml:ci:\xmlattdef{#1}{type}{default}} \stopxmlsetups
-\startxmlsetups mml:cn \xmlcommand{#1}{/}{mml:cn:\xmlattdef{#1}{type}{default}} \stopxmlsetups
-
-% helpers cn / todo: \mn{...}
-
-\startxmlsetups mml:cn:default
- \mathopnolimits{\xmlflush{#1}}
-\stopxmlsetups
-
-% helpers ci
-
-\startxmlsetups mml:ci:default
- \xmlflush{#1}
-\stopxmlsetups
-
-\startxmlsetups mml:ci:set
- {\blackboard{\xmlflush{#1}}} % todo
-\stopxmlsetups
-
-\startxmlsetups mml:ci:vector
- \overrightarrow{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups mml:ci:matrix
- {\bi\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups mml:ci:function
- \xmlflush{#1}% \negthinspace
-\stopxmlsetups
-
-\startxmlsetups mml:ci:fn
- \xmlsetup{#1}{mml:ci:function}
-\stopxmlsetups
-
-\startxmlsetups mml:ci:complex-cartesian
- \xmlsetup{#1}{mml:cn:complex}
-\stopxmlsetups
-
-\startxmlsetups mml:ci:complex
- \xmlsetup{#1}{mml:cn:complex}
-\stopxmlsetups
-
-\startxmlsetups mml:ci:complex-polar
- \xmlsetup{#1}{mml:cn:polar}
-\stopxmlsetups
-
-\startxmlsetups mml:ci:polar
- \xmlsetup{#1}{mml:cn:polar}
-\stopxmlsetups
-
-% helpers ci
-
-\startxmlsetups mml:cn:default
- \xmlflush{#1}
-\stopxmlsetups
-
-\startxmlsetups mml:cn:integer
- \edef\mmlintegerbase{\xmlattdef{#1}{base}{}}
- \ifx\mmlintegerbase\empty
- \xmlflush{#1}
- \else
- \doifelse \MMLbasesymbol \v!no {
- \MMLcCNbasedata{\xmlflush{#1}}
- } {
- \MMLcCNbasedata{\xmlflush{#1}}\normalsubscript{
- \hbox {\startimath
- \mr
- \scriptscriptstyle
- \processaction
- [\MMLbasesymbol]
- [\v!characters=>\MMLcCNbasestring BODH,
- \v!text=>\MMLcCNbasestring{BIN}{OCT}{DEC}{HEX},
- \s!unknown=>\mmlintegerbase]
- \stopimath}
- }
- }
- \fi
-\stopxmlsetups
-
-\def\MMLcCNbasedata#1%
- {\ifnum\mmlintegerbase>10 \relax{\mr#1}\else#1\fi}
-
-\def\MMLcCNbasestring#1#2#3#4%
- {\ifnum\mmlintegerbase= 2 #1\else
- \ifnum\mmlintegerbase= 8 #2\else
- \ifnum\mmlintegerbase=10 #3\else
- \ifnum\mmlintegerbase=16 #4\else
- \mmlintegerbase \fi\fi\fi\fi}
-
-\startxmlsetups mml:cn:polar
- \xmlsetup{#1}{mml:cn:polar:\MMLpolaralternative}
-\stopxmlsetups
-
-\startxmlsetups mml:cn:polar:a
- \ctxmodulemathml{cpolar_a("#1")}
-\stopxmlsetups
-
-\startxmlsetups mml:cn:polar:b
- {\mr e}\normalsuperscript{\xmlsnippet{#1}{1}+\xmlsnippet{#1}{3}\thinspace{\mr i}}
-\stopxmlsetups
-
-\startxmlsetups mml:cn:polar:c
- \exp\left(\xmlsnippet{#1}{1}+\xmlsnippet{#1}{3}\thinspace{\mr i}\right)
-\stopxmlsetups
-
-\startxmlsetups mml:cn:complex-polar
- \xmlsetup{#1}{mml:cn:polar}
-\stopxmlsetups
-
-\startxmlsetups mml:cn:complex % todo ( )
- \left(\xmlsnippet{#1}{1} + \xmlsnippet{#1}{3}\thinspace{\mr i}\right)
-\stopxmlsetups
-
-\startxmlsetups mml:cn:complex-cartesian
- \xmlsetup{#1}{mml:cn:complex}
-\stopxmlsetups
-
-\startxmlsetups mml:cn:float
- \doifelse \MMLfloatsymbol \v!no {
- % make sure that e shows up ok
- \mathopnolimits{\xmlflush{#1}}
- } {
- % we should ignore \entities !
- \edef\mmlfloatstring{\xmlflush{#1}}
- \splitstring\mmlfloatstring\at e\to\first\and\last
- \ifx\first\empty
- \mmlfloatstring
- \else\ifx\last\empty
- \mmlfloatstring
- \else
- \first
- \doifelse \MMLfloatsymbol {dot} \cdot \times
- 10\normalsuperscript{\last}
- \fi \fi
- }
-\stopxmlsetups
-
-\startxmlsetups mml:cn:real
- \xmlsetup{#1}{mml:cn:float}
-\stopxmlsetups
-
-\startxmlsetups mml:cn:e-notation
- \doifelse \MMLenotationsymbol \v!no {
- \xmlsnippet{#1}{1}
- \unskip\mathopnolimits{e}\ignorespaces
- \xmlsnippet{#1}{3}
- } {
- \xmlsnippet{#1}{1}
- \doifelse \MMLenotationsymbol {dot} \cdot
- \times10\normalsuperscript{\xmlsnippet{#1}{3}}
- }
-\stopxmlsetups
-
-\startxmlsetups mml:cn:logical
- \mathopnolimits{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups mml:cn:rational
- \xmldoifelse {#1} {/mml:sep} {
- \mmlfrac
- {\xmlsnippet{#1}{1}}
- {\xmlsnippet{#1}{3}}
- } {
- \xmlflush{#1}
- }
-\stopxmlsetups
-
-% interval
-
-\setupMMLappearance[interval][\c!alternative=\v!a,\c!separator={,}]
-
-% when empty element, then it's an apply
-
-\startxmlsetups mml:interval
- \doifelse {\xmltag{#1}} {apply} {
- % #1 == apply
- \let\mmlintervalfirst \mmlsecond
- \let\mmlintervalsecond\mmlthird
- \xmlsetup{#1}{mml:interval:\xmlattributedef{#1}{/mml:interval}{closure}{closed}}
- } {
- % #1 == interval
- \let\mmlintervalfirst \mmlfirst
- \let\mmlintervalsecond\mmlsecond
- \xmlsetup{#1}{mml:interval:\xmlattdef{#1}{closure}{closed}}
- }
-\stopxmlsetups
-
-\startxmlsetups mml:interval:closed
- \left[\mmlintervalfirst{#1}\MMLseparator\MMLintervalseparator\mmlintervalsecond{#1}\right]
-\stopxmlsetups
-
-\startxmlsetups mml:interval:open-closed
- \doifelse \MMLintervalalternative \v!b {
- \left<\mmlintervalfirst{#1}\MMLseparator\MMLintervalseparator\mmlintervalsecond{#1}\right]
- } {
- \left(\mmlintervalfirst{#1}\MMLseparator\MMLintervalseparator\mmlintervalsecond{#1}\right]
- }
-\stopxmlsetups
-
-\startxmlsetups mml:interval:closed-open
- \doifelse \MMLintervalalternative \v!b {
- \left[\mmlintervalfirst{#1}\MMLseparator\MMLintervalseparator\mmlintervalsecond{#1}\right>
- } {
- \left[\mmlintervalfirst{#1}\MMLseparator\MMLintervalseparator\mmlintervalsecond{#1}\right)
- }
-\stopxmlsetups
-
-\startxmlsetups mml:interval:open
- \doifelse \MMLintervalalternative \v!b {
- \left<\mmlintervalfirst{#1}\MMLseparator\MMLintervalseparator\mmlintervalsecond{#1}\right>
- } {
- \left(\mmlintervalfirst{#1}\MMLseparator\MMLintervalseparator\mmlintervalsecond{#1}\right)
- }
-\stopxmlsetups
-
-% inverse
-
-\setfalse\xmlinversefunction
-
-\startxmlsetups mml:apply:inverse
- \settrue\xmlinversefunction
- \xmlsetup{#1}{mml:\xmlfilter{#1}{/mml:apply/*[2]/name()}}
-\stopxmlsetups
-
-% condition
-
-% maybe a fast \xmlnonfirst
-
-% instead of the following we could do \xmlcontent{#1}{/mml:bvar} etc
-
-\startxmlsetups mml:bvar \xmlflush{#1} \stopxmlsetups
-\startxmlsetups mml:lowlimit \xmlflush{#1} \stopxmlsetups
-\startxmlsetups mml:uplimit \xmlflush{#1} \stopxmlsetups
-\startxmlsetups mml:degree \xmlflush{#1} \stopxmlsetups
-\startxmlsetups mml:logbase \xmlflush{#1} \stopxmlsetups
-\startxmlsetups mml:fn \xmlflush{#1} \stopxmlsetups
-
-\startxmlsetups mml:condition
-% \xmldoif {#1} {/mml:bvar} {
-% \xmlfirst{#1}{/mml:bvar}\mid
-% }
- \xmlall{#1}{/!(mml:condition\string|mml:bvar)}
-\stopxmlsetups
-
-% declare
-
-\setupMMLappearance[declare][\c!state=\v!start]
-
-\startxmlsetups mml:declare
- \doif \MMLdeclarestate \v!start {
- \mathopnolimits{declare}
- \mmlfirst{#1}
- \ifnum\xmlcount{#1}{/*}>\plusone
- \thickspace
- \mathopnolimits{as}
- \thickspace
- \fi
- \mmlsecond{#1}
- }
-\stopxmlsetups
-
-% lambda
-
-\setupMMLappearance[lambda][\c!alternative=b]
-
-\startxmlsetups mml:lambda
- \begingroup
- \doifelse \MMLlambdaalternative \v!a {
- \lambda\left(\xmlconcat{#1}{/!mml:lambda}{\MMLseparator,}\right)
- } {
- \ifnum\xmlcount{#1}{/mml:bvar}>\plusone
- \left(\xmlconcat{#1}{/mml:bvar}{\MMLseparator,}\right)
- \else
- \xmlfirst{#1}{/mml:bvar}
- \fi
- \mapsto
- \MMLcreset
- \xmlall{#1}{/!(mml:bvar|mml:lambda)}
- }
- \endgroup
-\stopxmlsetups
-
-% compose
-
-\startxmlsetups mml:compose
- \begingroup
- \MMLcreset
-% \let\MMLcCIfunction\firstofoneargument % brrr ? ? ?
- \doifelsemmlfunction {#1} {
- \left(\xmlconcat{#1}{/!mml:compose}{\circ}\right)
- } {
- \xmlconcat{#1}{/!mml:compose}{\circ}
- }
- \endgroup
-\stopxmlsetups
-
-\startxmlsetups mml:image
- \mathopnolimits{image} \left( {\mr\xmlfilter{#1}{/!mml:image/tag()}} \right)
-\stopxmlsetups
-
-\setupMMLappearance[piece][\c!separator=]
-
-\startxmlsetups mml:piecewise
- \processaction
- [\MMLpieceseparator]
- [ \v!yes=>\def\theMMLpieceseparator{,&},
- \v!no=>\def\theMMLpieceseparator{&},
- \s!default=>\def\theMMLpieceseparator{&},
- \s!unknown=>\def\theMMLpieceseparator{\,\,\hbox{\MMLpieceseparator}\,\,}]
- \cases{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups mml:piece
- \mmlfirst{#1}\theMMLpieceseparator\mathematics{\mmlsecond{#1}}\crcr
-\stopxmlsetups
-
-\startxmlsetups mml:otherwise
-% \xmlflush{#1}\MMLcPIECEseparator&{\mr otherwise}\crcr
- \xmlflush{#1}&{\mr otherwise}\crcr
-\stopxmlsetups
-
-% end of piece
-
-\startxmlsetups mml:quotient
- \lfloor\mmlsecond{#1}/\mmlthird{#1}\rfloor
-\stopxmlsetups
-
-\startxmlsetups mml:factorial
- \xmlall{#1}{/!factorial}!
-\stopxmlsetups
-
-\setupMMLappearance [divide] [\c!level=\!!maxcard,\c!alternative=\v!a]
-
-\newcount\mmldividelevel
-
-\startxmlsetups mml:divide
- \advance\mmldividelevel\plusone
- \doifelse \MMLdividealternative \v!b {
- \mmlsecond{#1}/\mmlthird{#1}
- } {
- \ifnum \mmldividelevel > \MMLdividelevel \relax % threshold
- \mmlsecond{#1}/\mmlthird{#1}
- \else
- \MMLcreset
- \mmlfrac{\MMLcreset\mmlsecond{#1}}{\MMLcreset\mmlthird{#1}}
- \fi
- }
- \advance\mmldividelevel\minusone
-\stopxmlsetups
-
-% min max
-
-\startxmlsetups mml:min \mathopnolimits{min} \xmlsetup{#1}{mml:minmax} \stopxmlsetups
-\startxmlsetups mml:max \mathopnolimits{max} \xmlsetup{#1}{mml:minmax} \stopxmlsetups
-
-\startxmlsetups mml:minmax
- \xmldoif {#1} {/mml:bvar} {
- {}\normalsubscript{\xmlfirst{#1}{/mml:bvar}}
- }
- \left\{
- \xmlconcat{#1}{/!(mml:bvar\string|mml:max\string|mml:min)}{\MMLseparator,}
- \right\}
-\stopxmlsetups
-
-% minus plus
-
-\setupMMLappearance [plus] [\c!alternative=\v!a] % b = no sign -> 3 1/4
-\setupMMLappearance [sign] [\c!reduction=\v!yes]
-
-% alternative b -> geen sign
-
-% branch needed, else (a-b) + (c-d) goes wrong
-% reset check in case of (-x) + 37
-% reset check in case of (-x) + 37
-
-\newcount\mmlpluscounter
-
-\startxmlsetups mml:plus
- \doifelse \MMLsignreduction \v!yes {
- \MMLdoL
- \xmlsetup{#1}{mml:plus:reset}
- \xmlcommand{#1}{/!mml:plus}{mml:plus:body}
- \MMLdoR
- } {
- \ifnum\xmlcount{#1}{/!mml:plus}=\plusone
- +\xmlfirst{#1}{/!mml:plus}
- \else
- \MMLdoL
- \xmlconcat{#1}{/!mml:plus}{+}
- \MMLdoR
- \fi
- }
-\stopxmlsetups
-
-\startxmlsetups mml:plus:reset
- \mmlpluscounter\zerocount
-\stopxmlsetups
-
-\startxmlsetups mml:plus:body
- \advance\mmlpluscounter\plusone
- \ifnum\mmlpluscounter>\plusone
- \xmldoifelse{#1}{/mml:minus} {
- \ifnum\xmlcount{#1}{/!mml:minus}>\plusone
- +
- \fi
- } {
- \doifelse {\xmlatt{#1}{type}} {rational} {
- % fraction
- } {
- +
- }
- }
- \fi
- \xmldirect{#1}
-\stopxmlsetups
-
-\newcount\mmlminuscounter
-
-\startsetups mml:minus
- \doifelse \MMLsignreduction \v!yes {
- \ifnum\xmlcount{#1}{/!mml:minus}=\plusone
- -\xmlfirst{#1}{/!mml:minus}
- \else
- \MMLdoL
- \xmlsetup{#1}{mml:minus:reset}
- \xmlcommand{#1}{/!mml:minus}{mml:minus:body}
- \MMLdoR
- \fi
- } {
- \left( % \MMLdoL
- \ifnum\xmlcount{#1}{/!mml:minus}=\plusone
- -\xmlfirst{#1}{/!mml:minus}
- \else
- \xmlsetup{#1}{mml:minus:reset}
- \xmlcommand{#1}{/!mml:minus}{mml:minus:body}
- \fi
- \right) % \MMLdoR
- }
-\stopsetups
-
-\startxmlsetups mml:minus:reset
- \mmlminuscounter\zerocount
-\stopxmlsetups
-
-\startxmlsetups mml:minus:body
- % we can slso use concat here
- \advance\mmlminuscounter\plusone
- \ifnum\mmlminuscounter>\plusone
- -
- \fi
- \xmldirect{#1}
-\stopxmlsetups
-
-% power
-
-\setupMMLappearance[power][\c!reduction=\v!yes]
-
-\let\MMLpowerelement\empty
-
-\startxmlsetups mml:power
- \xmldoifelse {#1} {/mml:apply} {
- \doifelse \MMLpowerreduction \v!yes {
- \xmldoifelse {#1} {/mml:apply/(\MMLcfunctionlist)} {
- \gdef\MMLpowerelement{\mmlthird{#1}}% postpone, no xdef
- \MMLcreset\mmlsecond{#1}
- } {
- \left(\MMLcreset\mmlsecond{#1}\right)\normalsuperscript{\MMLcreset\mmlthird{#1}}
- }
- } {
- \left(\MMLcreset\mmlsecond{#1}\right)\normalsuperscript{\MMLcreset\mmlthird{#1}}
- }
- } {
- \mmlsecond{#1}\normalsuperscript{\MMLcreset\mmlthird{#1}}
- }
-\stopxmlsetups
-
-% rem
-
-\startxmlsetups mml:rem
- \xmlconcat{#1}{/!mml:rem}{\mathopnolimits{mod}}
-\stopxmlsetups
-
-\setupMMLappearance [times] [\c!symbol=\v!no,\c!auto=\v!yes] % new, auto catches cn cn cn
-
-\startxmlsetups mml:times
- \setMMLcreset{\MMLcfunctionlist\string|\MMLcconstructlist}%
- \doifelse\MMLtimesauto\v!no {
- \let\MMLtimes@@symbol\MMLtimessymbol
- } {
- \xmldoifelse {#1} {/mml:cn[name(1) == 'mml:cn']} {% name(1) is next one
- \doifelseinset\MMLtimessymbol{\v!yes,\v!no} {
- \let\MMLtimes@@symbol\v!yes
- } {
- \let\MMLtimes@@symbol\MMLtimessymbol
- }
- } {
- \let\MMLtimes@@symbol\MMLtimessymbol
- }
- }
- \doifelse\MMLtimes@@symbol\v!yes {
- \xmlconcat{#1}{/!mml:times}{\times}
- } {
- \doifelse\MMLtimes@@symbol{dot} {
- \xmlconcat{#1}{/!mml:times}{\cdot}
- } {
- \doifelse\MMLtimes@@symbol{times} {
- \xmlconcat{#1}{/!mml:times}{\times}
- } {
- \xmlall{#1}{/!mml:times}
- }
- }
- }
-\stopxmlsetups
-
-\setupMMLappearance[root][\c!symbol=\v!yes]
-
-\startxmlsetups mml:root
- \xmldoifelse {#1} {/mml:degree} {
- \root
- \doifnot\MMLrootsymbol\v!no{\MMLcreset\xmltext{#1}{/mml:degree}}
- \of
- } {
- \sqrt
- }
- {\MMLcreset\xmlall{#1}{/!(mml:degree\string|mml:root)}}
-\stopxmlsetups
-
-% gcd
-
-\startxmlsetups mml:gcd
- \begingroup
- \gcd\left(\MMLcreset\xmlconcat{#1}{/!mml:gcd}{\MMLseparator,}\right)
- \endgroup
-\stopxmlsetups
-
-% and or xor implies, not
-
-\startxmlsetups mml:and \xmlconcat{#1}{/!mml:and} {\wedge} \stopxmlsetups
-\startxmlsetups mml:or \xmlconcat{#1}{/!mml:or} {\vee} \stopxmlsetups
-\startxmlsetups mml:xor \xmlconcat{#1}{/!mml:xor} {\mathopnolimits{xor}} \stopxmlsetups
-\startxmlsetups mml:implies \xmlconcat{#1}{/!mml:implies}{\Rightarrow} \stopxmlsetups
-\startxmlsetups mml:not \neg \xmlall {#1}{/!mml:not} \stopxmlsetups
-
-% forall exists
-
-%D We need to shift left below rotated A.
-
-\startxmlsetups mml:forall
- \forall \negthinspace \xmlsetup{#1}{mml:forallexists}
-\stopxmlsetups
-
-\startxmlsetups mml:exists
- \exists \xmlsetup{#1}{mml:forallexists}
-\stopxmlsetups
-
-\def\mmlforallexistslist{mml:bvar\string|mml:forall\string|mml:exists\string|mml:condition}
-
-\startxmlsetups mml:forallexists
- \normalsubscript{\xmlconcat{#1}{/mml:bvar}{\MMLseparator,}}
- \xmldoifelse {#1} {/mml:condition} {
- \thickspace
- \begingroup
- \xmlfirst{#1}{/mml:condition}
- \endgroup
- \ifcase\xmlcount{#1}{/!(\mmlforallexistslist)}\relax
- % nothing
- \or
- % == snelle volgende
- \left\vert
- \MMLcreset \medspace \xmlconcat{#1}{/!(\mmlforallexistslist)}{}
- \right.
- \else
- % special case
- \left\vert
- \matrix {
- \xmlconcat{#1}{/!(\mmlforallexistslist)}{\hfill\crcr}
- }
- \right.
- \fi
- } {
- :\xmlfirst{#1}{/!(\mmlforallexistslist)}
- }
-\stopxmlsetups
-
-\startxmlsetups mml:abs
- \left\vert \MMLcreset\xmlall{#1}{/!mml:abs} \right\vert
-\stopxmlsetups
-
-\startxmlsetups mml:conjugate % watch extra {}
- {\overline{\MMLcreset\xmlall{#1}{/!mml:conjugate}}}
-\stopxmlsetups
-
-\startxmlsetups mml:arg
- \mathopnolimits{arg} \left( \MMLcreset\xmlall{#1}{/!mml:arg} \right)
-\stopxmlsetups
-
-\startxmlsetups mml:real
- \Re \left( \MMLcreset \xmlall{#1}{/!mml:real} \right)
-\stopxmlsetups
-
-\startxmlsetups mml:imaginary
- \Im \ left( \MMLcreset \xmlall{#1}{/!mml:imaginary} \right)
-\stopxmlsetups
-
-\startxmlsetups mml:lcm
- \mathopnolimits{lcm} \left( \xmlconcat{#1}{/!mml:lcm}{\MMLseparator,} \right)
-\stopxmlsetups
-
-\startxmlsetups mml:floor
- \lfloor \xmlall{#1}{/!mml:floor} \rfloor
-\stopxmlsetups
-
-\startxmlsetups mml:ceiling
- \lceiling \xmlall{#1}{/!mml:ceiling} \rceiling
-\stopxmlsetups
-
-% relations
-
-% apply attr or eq
-
-\setupMMLappearance[relation][\c!align=\v!no]
-
-\xmlmapvalue {mml:relation} {eq} {=}
-\xmlmapvalue {mml:relation} {neq} {\neq}
-\xmlmapvalue {mml:relation} {gt} {>}
-\xmlmapvalue {mml:relation} {lt} {<}
-\xmlmapvalue {mml:relation} {geq} {\geq}
-\xmlmapvalue {mml:relation} {leq} {\leq}
-\xmlmapvalue {mml:relation} {equivalent} {\equiv}
-\xmlmapvalue {mml:relation} {approx} {\approx}
-\xmlmapvalue {mml:relation} {factorof} {\mid}
-
-\startxmlsetups mml:eq \xmlsetup{#1}{mml:relation} \stopxmlsetups
-\startxmlsetups mml:neq \xmlsetup{#1}{mml:relation} \stopxmlsetups
-\startxmlsetups mml:gt \xmlsetup{#1}{mml:relation} \stopxmlsetups
-\startxmlsetups mml:lt \xmlsetup{#1}{mml:relation} \stopxmlsetups
-\startxmlsetups mml:geq \xmlsetup{#1}{mml:relation} \stopxmlsetups
-\startxmlsetups mml:leq \xmlsetup{#1}{mml:relation} \stopxmlsetups
-\startxmlsetups mml:equivalent \xmlsetup{#1}{mml:relation} \stopxmlsetups
-\startxmlsetups mml:approx \xmlsetup{#1}{mml:relation} \stopxmlsetups
-\startxmlsetups mml:factorof \xmlsetup{#1}{mml:relation} \stopxmlsetups
-
-\startxmlsetups mml:relation
- \edef\mmlapplyaction{\xmlfilter{#1}{/*/name()}}
- \MMLcreset \xmlsetup{#1}{mml:relation:\xmlattdef{#1}{align}{\MMLrelationalign}}
-\stopxmlsetups
-
-\startxmlsetups mml:relation:default
- \xmlconcatrange{#1}{/*}{2}{}{\xmlval{mml:relation}{\mmlapplyaction}{[\mmlapplyaction]}}
-\stopxmlsetups
-\startxmlsetups mml:relation:last
- \eqalign {
- \xmlconcatrange{#1}{/*}{2}{-2}{&\xmlval{mml:relation}{\mmlapplyaction}{[\mmlapplyaction]}\crcr}
- \mmlprelast{#1}&\xmlval{mml:relation}{\mmlapplyaction}{[\mmlapplyaction]}{}\mmllast{#1}
- }
-\stopxmlsetups
-\startxmlsetups mml:relation:first
- \eqalign {
- \mmlsecond{#1}\xmlval{mml:relation}{\mmlapplyaction}{[\mmlapplyaction]}{}
- &\xmlconcatrange{#1}{/*}{3}{}{\crcr\xmlval{mml:relation}{\mmlapplyaction}{[\mmlapplyaction]}{}&}
- }
-\stopxmlsetups
-\startxmlsetups mml:relation:left
- \eqalign {
- \xmlconcatrange{#1}{/*}{2}{}{&\xmlval{mml:relation}{\mmlapplyaction}{[\mmlapplyaction]}\crcr}
- }
-\stopxmlsetups
-\startxmlsetups mml:relation:right
- \eqalign {
- &\xmlconcatrange{#1}{/*}{2}{}{\crcr\xmlval{mml:relation}{\mmlapplyaction}{[\mmlapplyaction]}{}&}
- }
-\stopxmlsetups
-\startxmlsetups mml:relation:no
- \xmlsetup{#1}{mml:relation:default}
-\stopxmlsetups
-\startxmlsetups mml:relation:yes
- \xmlsetup{#1}{mml:relation:left}
-\stopxmlsetups
-
-% personal goody:
-
-\edef\MMLcmainresetlist{\MMLcmainresetlist\string|becomes}
-
-\xmlmapvalue {mml:relation} {mml:becomes} {:=}
-
-\startxmlsetups mml:becomes \xmlsetup{#1}{mml:relation} \stopxmlsetups
-
-% calculus and vector calculus
-
-\startxmlsetups mml:domainofapplication
- \xmlall{#1}{/!mml:domainofapplication}
-\stopxmlsetups
-
-\setupMMLappearance[int][\c!location=\v!top]
-
-\def\doMMLlimits#1{\doifelsevalue{MML#1\c!location}\v!top\limits\nolimits}
-
-\startxmlsetups mml:int
- \MMLcreset
- \xmldoifelse {#1} {/mml:domainofapplication} {
- \int \doMMLlimits{int}\normalsubscript{\xmlfirst{#1}{/mml:domainofapplication}}\relax
- } {
- \xmldoifelse {#1} {/mml:condition} {
- \int \doMMLlimits{int}\normalsubscript{\xmlfirst{#1}{/mml:condition}}\relax
- } {
- \xmldoifelse {#1} {/mml:lowlimit} {
- \int \doMMLlimits{int}\normalsubscript{\xmlfirst{#1}{/mml:lowlimit}}\normalsuperscript{\xmlfirst{#1}{/mml:uplimit}}
- } {
- % funny, why do we have lowlimit/uplimit then
- \xmldoifelse {#1} {/mml:apply/mml:interval} {
- \int \doMMLlimits{int}\normalsubscript{\xmlindex{#1}{/mml:apply}{2}}\normalsuperscript{\xmlindex{#1}{/mml:apply}{3}}
- } {
- \int
- }
- }
- }
- }
- \MMLcreset
- \xmldoifelse {#1} {/mml:apply} {
- \doifelsemmlfunction {#1} { % todo test
- \xmlfirst{#1}{/mml:apply}
- } {
- % if there are too many () now, we need to be more clever
- \left( \xmlfirst{#1}{/mml:apply} \right)
- }
- } {
- \xmlfirst{#1}{/mml:ci}
- }
- \xmldoifelse {#1} {/mml:bvar} {
- \thinspace {\mr d} \xmlfirst{#1}{/mml:bvar}
- } {
- % nothing
- }
-\stopxmlsetups
-
-\setupMMLappearance[diff][\c!location=\v!top,\c!alternative=\v!a]
-
-\startxmlsetups mml:diff
- \MMLcreset
- \doifelse \MMLdiffalternative \v!a {
- \xmldoifelse {#1} {/mml:lambda} {
- % a special case (mathadore/openmath)
- \mmlfrac {
- d
- \normalsuperscript
- {\xmlfirst{#1}{/mml:bvar}\xmlfirst{#1}{/mml:cn}}
- {\xmlfirst{#1}{/mml:lambda}\xmlfirst{#1}{/mml:ci}}
- } {
- d
- {\xmlfirst{#1}{/mml:bvar}\xmlfirst{#1}{/mml:ci}}
- \normalsuperscript
- {\xmlfirst{#1}{/mml:bvar}\xmlfirst{#1}{/mml:cn}}
- }
- } {
- \xmldoifelse {#1} {/mml:bvar} {
- \mmlfrac {
- {\mr d}{
- \xmldoifelse {#1} {/mml:degree} {
- \normalsuperscript{\xmlconcat{#1}{/mml:degree}\empty}
- } {
- \xmldoif {#1} {/mml:bvar/mml:degree} {
- \normalsuperscript{\xmlconcat{#1}{/mml:bvar/mml:degree}+}
- }
- }
- }
- \doif \MMLdifflocation \v!top {
- \xmldoifelse {#1} {/mml:ci} {
- \xmlfirst{#1}{/mml:ci}
- } {
- \MMLcreset
- \ifnum\xmlcount{#1}{/mml:apply/*}>\plustwo % hack
- \left(\xmlfirst{#1}{/mml:apply}\right)
- \else
- \xmlfirst{#1}{/mml:apply}
- \fi
- }
- }
- } {
- {\mr d}
- \xmlfirst{#1}{/mml:bvar/!mml:degree}
- \xmldoif {#1} {/mml:bvar/mml:degree} {
- \normalsuperscript{\xmlfirst{#1}{/mml:bvar/mml:degree}}
- }
- }
- \doifnot \MMLdifflocation \v!top {
- \left(\MMLcreset\xmlfirst{#1}{/(mml:apply\string|mml:ci)}\right)
- }
- } {
- % beware, the second {} is needed for the superscript
- \xmlconcatrange{#1}{/*}{2}{}{}\normalsuperscript\prime
- }
- }
- } {
- \MMLcreset
- \xmlfirst{#1}{/(mml:apply\string|mml:ci)}
- % there can be problems with nested diff's: \normalsuperscript\normalsuperscript{} error
- % so we add an empty group here
- {}\normalsuperscript
- {
- \xmldoifelse {#1} {/mml:degree} {
- \edef\mmldegree{\xmlfirst{#1}{/mml:degree/mml:cn}}
- \ifx\mmldegree\empty
- % what to do here
- \else
- \dorecurse\mmldegree\prime
- \fi
- } {
- \prime
- }
- }
- }
-\stopxmlsetups
-
-\startxmlsetups mml:partialdiff
- \xmldoifelse {#1} {/mml:list} {
- {\mr D}\normalsubscript{
- \begingroup
- \setfalse\mmllistdelimiters
- \xmlall{#1}{/mml:list}
- \endgroup
- }
- \xmlfirst{#1}{/(mml:apply\string|mml:reln\string|mml:ci\string|mml:cn)}
- } {
- \xmldoifelse {#1} {/mml:bvar} {
- \mmlfrac {
- {\mr d}\normalsuperscript{
- \xmldoifelse {#1} {/mml:degree} {
- \xmlconcat{#1}{/mml:degree}\empty
- } {
- \xmlconcat{#1}{/mml:bvar/mml:degree}+
- }
- }
- \MMLcreset
- \xmlfirst{#1}{/(mml:apply\string|mml:reln\string|mml:ci\string|mml:cn)}
- } {
- \xmldoif {#1}{/mml:bvar/!mml:degree} {
- \xmlfirst{#1}{/mml:bvar/!mml:degree} \,
- }
- {\mr d}\xmlfirst{#1}{/(mml:apply\string|mml:reln\string|mml:ci\string|mml:cn)}
- \xmldoif {#1} {/mml:bvar/mml:degree} {
- \normalsuperscript{\xmlfirst{#1}{/mml:bvar/mml:degree}}
- }
- }
- } {
- \xmlfirst{#1}{/(mml:apply\string|mml:reln\string|mml:ci\string|mml:cn)}
- }
- }
-\stopxmlsetups
-
-\startxmlsetups mml:divergence \mathopnolimits{div} \xmlall{#1}{/!mml:divergence} \stopxmlsetups
-\startxmlsetups mml:grad \mathopnolimits{grad} \xmlall{#1}{/!mml:grad} \stopxmlsetups
-\startxmlsetups mml:curl \mathopnolimits{curl} \xmlall{#1}{/!mml:curl} \stopxmlsetups
-\startxmlsetups mml:laplacian \nabla\normalsuperscript2 \xmlall{#1}{/!mml:laplacian} \stopxmlsetups
-\startxmlsetups mml:ident \mathopnolimits{identity} \xmlall{#1}{/!mml:ident} \stopxmlsetups
-
-\setupMMLappearance[domain] [symbol=]
-\setupMMLappearance[codomain][symbol=]
-
-\startxmlsetups mml:domain
- \doifelsenothing \MMLdomainsymbol {
- \mathopnolimits{domain}\MMLcreset\xmlall{#1}{/!mml:domain}
- } {
- \MMLdomainsymbol\normalsubscript{\xmlall{#1}{/!mml:domain}}
- }
-\stopxmlsetups
-
-\startxmlsetups mml:codomain
- \doifelsenothing \MMLcodomainsymbol {
- \mathopnolimits{codomain}\MMLcreset\xmlall{#1}{/!mml:codomain}
- } {
- \MMLcodomainsymbol\normalsubscript{\xmlall{#1}{/!mml:codomain}}
- }
-\stopxmlsetups
-
-% theory of sets
-
-\startxmlsetups mml:set
- \left\{
- \xmldoifelse {#1} {/mml:condition} {
- \xmlfirst{#1}{/mml:bvar}\,\middle\vert\,\xmlfirst{#1}{/mml:condition}
- } {
- \xmlconcat{#1}{/!mml:set}{\MMLseparator,}
- }
- \right\}
- \relax % needed
-\stopxmlsetups
-
-\settrue\mmllistdelimiters
-
-\startxmlsetups mml:list
- \begingroup
- \ifconditional\mmllistdelimiters\left [\fi
- \begingroup
- \settrue\mmllistdelimiters
- \xmlconcat{#1}{/!mml:list}{\MMLseparator,}
- \endgroup
- \ifconditional\mmllistdelimiters\right]\fi
- \endgroup
-\stopxmlsetups
-
-\startxmlsetups mml:union \mmlsecond{#1} \cup \mmlthird{#1} \stopxmlsetups
-\startxmlsetups mml:intersect \mmlsecond{#1} \cap \mmlthird{#1} \stopxmlsetups
-\startxmlsetups mml:in \mmlsecond{#1} \in \mmlthird{#1} \stopxmlsetups
-\startxmlsetups mml:notin \mmlsecond{#1} {\not\in} \mmlthird{#1} \stopxmlsetups
-\startxmlsetups mml:subset \mmlsecond{#1} \subset \mmlthird{#1} \stopxmlsetups
-\startxmlsetups mml:prsubset \mmlsecond{#1} \subseteq \mmlthird{#1} \stopxmlsetups
-\startxmlsetups mml:notsubset \mmlsecond{#1} {\not\subset} \mmlthird{#1} \stopxmlsetups
-\startxmlsetups mml:notprsubset \mmlsecond{#1} {\not\subseteq} \mmlthird{#1} \stopxmlsetups
-\startxmlsetups mml:setdiff \mmlsecond{#1} \setminus \mmlthird{#1} \stopxmlsetups
-
-\startxmlsetups mml:card
- \left\vert \xmlall{#1}{/!mml:card} \right\vert
-\stopxmlsetups
-
-\startxmlsetups mml:cartesianproduct
- \xmlconcat{#1}{/!mml:cartesianproduct}{\times}
-\stopxmlsetups
-
-% sequences and series
-
-\setupMMLappearance[sum] [\c!location=\v!top]
-\setupMMLappearance[product][\c!location=\v!top]
-
-\xmlmapvalue {mml:sumprod} {sum} {\sum}
-\xmlmapvalue {mml:sumprod} {product} {\prod}
-
-\startxmlsetups mml:sum \edef\mmlsumprodname{sum} \xmlsetup{#1}{mml:sumprod} \stopxmlsetups
-\startxmlsetups mml:product \edef\mmlsumprodname{product} \xmlsetup{#1}{mml:sumprod} \stopxmlsetups
-
-\def\mmlstackedsubscripts#1%
- {\vbox
- {\baselineskip\zeropoint % hack, taco vragen
- \halign{\startimath\scriptstyle\hss\alignmark\alignmark\hss\stopimath\cr#1\crcr}}}
-
-% unfinished
-
-\startxmlsetups mml:sumprod
- \begingroup
- \xmldoifelse {#1} {/(mml:condition\string|mml:bvar\string|mml:lowlimit)} {
- \def\mmlsumprodlower{
- \normalsubscript{
- \xmldoifelse {#1} {/mml:condition} {
- \mmlstackedsubscripts{\xmlconcat{#1}{/mml:condition}{\crcr}}
- } {
- \xmldoif {#1} {/mml:bvar} {
- \xmlfirst{#1}{/mml:bvar}
- \xmldoif{#1}{/mml:lowlimit}{=}
- }
- \xmlfirst{#1}{/mml:lowlimit}
- }
- }
- }
- } {
- \let\mmlsumprodlower\empty
- }
- \xmldoifelse {#1} {/mml:uplimit} {
- \def\mmlsumprodupper{\normalsuperscript{\xmlfirst{#1}{/mml:uplimit}}}
- } {
- \let\mmlsumprodupper\empty
- }
- \xmldoif {#1} {/mml:interval} { % open math converter gives this
- \edef\mmlintervalfrom{\xmlindex{#1}{/mml:interval}{1}}
- \edef\mmlintervalto {\xmlindex{#1}{/mml:interval}{2}}
- \ifx \mmlintervalfrom \empty \else
- \def\mmlsumprodlower{\normalsubscript{\xmldoif{#1}{/mml:bvar}{\xmlfirst{#1}{/mml:bvar}{=}}\mmlintervalfrom}}
- \fi
- \ifx \mmlintervalto \empty \else
- \def\mmlsumprodupper{\normalsuperscript{\mmlintervalto}}
- \fi
- }
- \MMLcreset
- \xmlval{mml:sumprod}{\mmlsumprodname}{}\doMMLlimits\mmlsumprodname\mmlsumprodupper\mmlsumprodlower
- \MMLcreset
- \xmldoifelse {#1} {/mml:lambda/mml:apply} {
- \xmlfirst{#1}{/mml:lambda/mml:apply}% a bit of open math conversion mess
- } {
- \xmlfirst{#1}{/(mml:apply\string|mml:lambda\string|mml:ci)}%
- }
- \endgroup
-\stopxmlsetups
-
-\setupMMLappearance[limit][\c!location=\v!top]
-
-\startxmlsetups mml:limit
- \MMLcreset \lim
- \doMMLlimits {limit}\normalsubscript{
- \MMLcreset
- \xmldoifelse {#1} {/mml:condition} {
- \xmlfirst{#1}{/mml:condition}
- } {
- \xmldoif {#1} {/mml:bvar} {
- \xmlfirst{#1}{/mml:bvar}\rightarrow
- }
- \xmlfirst{#1}{/mml:lowlimit}
- }
- }
- \begingroup
- % a bit of open math conversion mess, lambda needed for openmath, ok?
- \MMLcreset
- \xmlfirst{#1}{/mml:lambda/mml:apply}
- \xmlfirst{#1}{/(mml:apply\string|mml:lambda)}
- \endgroup
-\stopxmlsetups
-
-% consider a faster index
-
-\startxmlsetups mml:tendsto
- \MMLcreset \mmlsecond{#1}
- \xmlval {mml:tendsto:type} {\xmlattdef{#1}{type}{default}} {\rightarrow}
- \MMLcreset \mmlthird{#1}
-\stopxmlsetups
-
-\xmlmapvalue {mml:tendsto:type} {above} {\downarrow}
-\xmlmapvalue {mml:tendsto:type} {below} {\uparrow}
-\xmlmapvalue {mml:tendsto:type} {default} {\rightarrow}
-
-% elementary classical functions
-
-\setupMMLappearance[log][\c!location=\v!right]
-
-\startxmlsetups mml:exp
-% {\mr e}\normalsuperscript{\xmlfirst{#1}{/mml:apply\string|mml:reln\string|mml:ci\string|mml:cn}}
- {\mr e}\normalsuperscript{\xmlfirst{#1}{/!mml:exp}}
-\stopxmlsetups
-
-\startxmlsetups mml:log
- \xmldoifelse {#1} {/mml:logbase} {
- \doifelse \MMLloglocation \v!left {
- \mathop {
- {}\normalsuperscript{\xmlfirst{#1}{/mml:logbase}}\negthinspace\mathopnolimits{log}
- }
- } {
- \mathopnolimits{log}\normalsubscript{\xmlfirst{#1}{/mml:logbase}}
- }
-% \MMLcreset
- \xmlfirst{#1}{/(mml:apply\string|mml:reln\string|mml:ci\string|mml:cn)}
-% \xmlsetup{#1}{mml:function} % todo, we start elsewhere
-% \mmlthird{#1}
- } {
- \mathopnolimits{log}
-% \MMLcreset
-% \xmlsetup{#1}{mml:function} % todo, we start elsewhere
- \xmlfirst{#1}{/(mml:apply\string|mml:reln\string|mml:ci\string|mml:cn)}
-% \mmlsecond{#1}
- }
-\stopxmlsetups
-
-\startxmlsetups mml:ln
- \mathopnolimits{ln}
- \xmlsetup{#1}{mml:function}
-\stopxmlsetups
-
-% statistics
-
-\startxmlsetups mml:mean \overline {\mmlsecond{#1}} \stopxmlsetups
-\startxmlsetups mml:sdev \sigma \left(\MMLcreset\mmlsecond{#1}\right) \stopxmlsetups
-\startxmlsetups mml:variance \sigma \left(\MMLcreset\mmlsecond{#1}\right)\normalsuperscript2 \stopxmlsetups
-\startxmlsetups mml:median \mathopnolimits{median}\left(\MMLcreset\mmlsecond{#1}\right) \stopxmlsetups
-\startxmlsetups mml:mode \mathopnolimits{mode} \left(\MMLcreset\mmlsecond{#1}\right) \stopxmlsetups
-
-% moments
-
-\startxmlsetups mml:moment
- \left\langle
- \xmlfirst{#1}{/(mml:apply\string|mml:reln\string|mml:ci\string|mml:cn)}\normalsuperscript{\xmlfirst{#1}{/mml:degree}}
- \right\rangle
- \xmldoif {#1} {mml:momentabout} {
- \normalsubscript{\xmlfirst{#1}{mml:momentabout}}
- }
-\stopxmlsetups
-
-% linear algebra
-
-\setupMMLappearance [vector] [\c!direction=\v!horizontal,\c!separator={,}]
-
-\startxmlsetups mml:vector
- \begingroup
- \ifnum\xmlcount{#1}{/*}>\plusone
- \doifelse\MMLvectordirection\v!horizontal {
- \left(\xmlconcat{#1}{/*}{\MMLseparator\MMLvectorseparator}\right)
- } {
- \MMLcreset\left(\matrix{\xmlconcat{#1}{/*}{\MMLseparator\MMLvectorseparator}}\right)
- }
- \else
- \overrightarrow{\charhtstrut\mmlfirst{#1}}
- \fi
- \endgroup
-\stopxmlsetups
-
-\settrue\MMCdelmatrix % ( ) when true
-
-\startxmlsetups mml:matrix
- \begingroup
- \MMLcreset
- \ifconditional\MMCdelmatrix
- \left(\matrix{\xmlcommand{#1}{/mml:matrixrow}{mml:matrixrow:do}}\right)
- \else
- \settrue\MMCdelmatrix
- \matrix{\xmlcommand{#1}{/mml:matrixrow}{mml:matrixrow:do}}
- \fi
- \endgroup
-\stopxmlsetups
-
-\startxmlsetups mml:matrixrow
- \begingroup
- \MMLcreset
- \left(\xmlsetup{#1}{mml:matrixrow:do}\right)
- \endgroup
-\stopxmlsetups
-
-\startxmlsetups mml:matrixrow:do
- \xmlconcat{#1}{/*}{&}\crcr
-\stopxmlsetups
-
-\startxmlsetups mml:determinant
- \begingroup
- \setfalse\MMCdelmatrix
- \left|\mmlsecond{#1}\right|
- \endgroup
-\stopxmlsetups
-
-\startxmlsetups mml:transpose
- \mmlsecond{#1}\normalsuperscript{\mathopnolimits{T}}
-\stopxmlsetups
-
-\startxmlsetups mml:selector
- \MMLmathinner{\mmlsecond{#1}\normalsubscript{\MMLcreset\xmlconcatrange{#1}{/*}{3}{}{\MMLseparator,}}}
-\stopxmlsetups
-
-\startxmlsetups mml:vectorproduct \mmlsecond{#1}\times \mmlthird{#1} \stopxmlsetups
-\startxmlsetups mml:scalarproduct \mmlsecond{#1}\cdot \mmlthird{#1} \stopxmlsetups
-\startxmlsetups mml:outerproduct \mmlsecond{#1}\otimes\mmlthird{#1} \stopxmlsetups
-
-% semantic mapping elements
-
-\setupMMLappearance[semantics][\c!state=\v!start]
-
-\startxmlsetups mml:semantics
- \doifelse\MMLsemanticsstate\v!start {
- \xmlall{#1}{/mml:annotation}
- } {
- \xmlall{#1}{/!mml:annotation}
- }
-\stopxmlsetups
-
-\startxmlsetups mml:annotation
- \xmldoifelse {#1} {.[oneof(@encoding,'TeX','tex','application/x-tex','TEX','ConTeXt','context','CONTEXT','ctx')]} {
- \xmlflushcontext{#1}
- } {
- \xmldoifelse {#1} {.[oneof(@encoding,'calcmath','cm')]} {
- \expanded{\calcmath{\xmlflush{#1}}}
- } {
- \xmldoifelse {#1} {.[oneof(@encoding,'asciimath','am')]} {
- \ifdefined\asciimath
- \expanded{\asciimath{\xmlflush{#1}}}
- \else
- \hbox{\tt no am loaded}
- \fi
- } {
- \xmlall{#1}{../!mml:annotation}
- }
- }
- }
-\stopxmlsetups
-
-\startxmlsetups mml:annotation-xml
- % maybe diagnostics
-\stopxmlsetups
-
-% misc
-
-\startxmlsetups mml:integers \integers \stopxmlsetups
-\startxmlsetups mml:reals \reals \stopxmlsetups
-\startxmlsetups mml:rationals \rationals \stopxmlsetups
-\startxmlsetups mml:naturalnumbers \naturalnumbers \stopxmlsetups
-\startxmlsetups mml:complexes \complexes \stopxmlsetups
-\startxmlsetups mml:primes \primes \stopxmlsetups
-\startxmlsetups mml:exponentiale \mathopnolimits{e} \stopxmlsetups
-\startxmlsetups mml:imaginaryi \mathopnolimits{i} \stopxmlsetups
-\startxmlsetups mml:notanumber \mathopnolimits{NaN} \stopxmlsetups
-\startxmlsetups mml:true \mathopnolimits{true} \stopxmlsetups
-\startxmlsetups mml:false \mathopnolimits{false} \stopxmlsetups
-\startxmlsetups mml:emptyset \mathopnolimits{Ø} \stopxmlsetups
-\startxmlsetups mml:pi \pi \stopxmlsetups
-\startxmlsetups mml:eulergamma \gamma \stopxmlsetups
-\startxmlsetups mml:infinity \infty \stopxmlsetups
-
-% gonio functions
-
-\setupMMLappearance[function][\c!reduction=\v!yes]
-
-% todo: \mfunction which adapts itself when registered as command
-
-% todo: \def\mmlcfunction#1#2{\mathopnolimits{#2}\xmlsetup{#1}{mml:function}}
-
-\startxmlsetups mml:sin \mathcommand {sin}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:sinh \mathcommand {sinh}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:cos \mathcommand {cos}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:cosh \mathcommand {cosh}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:tan \mathcommand {tan}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:tanh \mathcommand {tanh}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:cot \mathcommand {cot}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:coth \mathcommand {coth}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:csc \mathcommand {csc}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:csch \mathcommand {csch}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:sec \mathcommand {sec}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:sech \mathcommand {sech}\xmlsetup{#1}{mml:function} \stopxmlsetups
-
-\startxmlsetups mml:arcsin \mathcommand {arcsin}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:arcsinh \mathcommand{arcsinh}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:arccos \mathcommand {arccos}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:arccosh \mathcommand{arccosh}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:arctan \mathcommand {arctan}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:arctanh \mathcommand{arctanh}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:arccot \mathcommand {arccot}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:arccoth \mathcommand{arccoth}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:arccsc \mathcommand {arccsc}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:arccsch \mathcommand{arccsch}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:arcsec \mathcommand {arcsec}\xmlsetup{#1}{mml:function} \stopxmlsetups
-\startxmlsetups mml:arcsech \mathcommand{arcsech}\xmlsetup{#1}{mml:function} \stopxmlsetups
-
-\startxmlsetups mml:function
- \ifx\MMLpowerelement\empty
- \ifconditional\xmlinversefunction\normalsuperscript{-1}\fi
- \setfalse\xmlinversefunction
- \else
- \normalsuperscript{\ifconditional\xmlinversefunction-\fi\MMLpowerelement}
- \setfalse\xmlinversefunction
- \glet\MMLpowerelement\empty
- \fi
- \xmlsetup{#1}{mml:function:argument}
-\stopxmlsetups
-
-\startxmlsetups mml:function:argument
- \doifelse \MMLfunctionreduction \v!yes {
- \xmldoifelse {#1} {/mml:apply} {
- \xmldoifelse {#1} {/mml:apply/(\MMLcfunctionlist\string|mml:divide)}
- \donefalse
- \donetrue
- } {
- \donefalse
- }
- } {
- \donetrue
- }
- % beware, we still flush from 2 up
- \ifdone
- \left(
- \MMLcreset
- \xmlall{#1}{/[position()>1]}% \xmlconcatrange{#1}{/*}{2}{}\empty
- \right)
- \else
- \MMLcreset
- \xmlall{#1}{/[position()>1]}
- \fi
-\stopxmlsetups
-
-% PRESENTATION MATHML
-
-% helpers: maybe we can need a setting for the uprights
-
-\xmlmapvalue {mml:s} {normal} {\mathupright} % {\mathtf}
-\xmlmapvalue {mml:s} {double-struck} {\mathblackboard}
-\xmlmapvalue {mml:s} {italic} {\mathit}
-\xmlmapvalue {mml:s} {fraktur} {\mathfraktur}
-\xmlmapvalue {mml:s} {script} {\mathscript}
-\xmlmapvalue {mml:s} {bold} {\mb} % {\mathbf}
-\xmlmapvalue {mml:s} {bold-italic} {\mathbi}
-\xmlmapvalue {mml:s} {bold-fraktur} {\mathfraktur\mathbf}
-\xmlmapvalue {mml:s} {bold-script} {\mathscript\mathbf}
-\xmlmapvalue {mml:s} {sans-serif} {\mathss}
-\xmlmapvalue {mml:s} {bold-sans-serif} {\mathss\mathbf}
-\xmlmapvalue {mml:s} {sans-serif-italic} {\mathss\mathit}
-\xmlmapvalue {mml:s} {sans-serif-bold-italic} {\mathss\mathbi}
-\xmlmapvalue {mml:s} {monospace} {\mathtt}
-
-\xmlmapvalue {mml:l} {-} {\let\mmlfrac\tfrac}
- \let\mmlfrac\frac
-\xmlmapvalue {mml:l} {+} {\let\mmlfrac\sfrac}
-
-% todo: displaystyle=true/false (or whatever else shows up)
-
-\starttexdefinition setmmlmathstyle #1
- \xmlval{mml:s}{\xmlatt{#1}{mathvariant}}\empty % was: \mmmr
-\stoptexdefinition
-
-\starttexdefinition setmmlscriptlevel #1
- \xmlval{mml:l}{\xmlatt{#1}{scriptlevel}}{\let\mmlfrac\frac}
-\stoptexdefinition
-
-\starttexdefinition applymmlmathcolor #1#2
- \edef\mmlmathcolor{\xmlatt{#1}{mathcolor}}
- \ifx \mmlmathcolor \empty
- #2
- \else
- \color[\mmlmathcolor]{#2}
- \fi
-\stoptexdefinition
-
-% todo: textbackgrounds
-
-\starttexdefinition applymmlmathbackground #1#2
- \edef\mmlmathbackground{\xmlatt{#1}{mathbackground}}
- \ifx \mmlmathbackground \empty
- #2
- \else
- \backgroundline[\mmlmathbackground]{#2}
- \fi
-\stoptexdefinition
-
-\newsignal\mmltextsignal % not used
-
-\starttexdefinition applymmlsometext #1#2
- \applymmlmathbackground {#1} {
- \applymmlmathcolor {#1} {
- \setmmlmathstyle {#1}
- #2
- }
- }
-\stoptexdefinition
-
-% probably bugged:
-
-\starttexdefinition doMMLfiller #1
- \pushmacro\doMMLfiller
- \let\doMMLfiller\gobbleoneargument
- \gdef\dodoMMLfiller{% where used
- \disablefiller
- \mathematics{#1}
- }
- \hbox {
- \def\normalorfiller##1##2{
- \gdef\dodoMMLfiller{\enablefiller#1}%
- \let\normalorfiller\gobbletwoarguments
- }
- \mathematics{#1}
- }
- \popmacro\doMMLfiller
-\stoptexdefinition
-
-% setups
-
-\startxmlsetups mml:mi % todo: mathsize (unlikely) mathcolor (easy) mathbackground (easy)
- \begingroup
- \pushmathstyle
- \setmmlmathstyle{#1}
- \setmmlscriptlevel{#1}
- \ctxmodulemathml{mi("#1")}
- \popmathstyle
- \endgroup
-\stopxmlsetups
-
-\startxmlsetups mml:mn
- \ctxmodulemathml{mn("#1")}% no \hbox, would be ok for . , but spoils rest
-\stopxmlsetups
-
-% <m:mo>-</m:mo><m:mn>2</m:mn> and <m:mn>1</m:mn><m:mo>-</m:mo><m:mn>2</m:mn>
-%
-% spacing between - and 2 is taken care of by tex itself
-
-\startxmlsetups mml:mo
- \doif {\xmlatt{#1}{maxsize}} {1} {\settrue\mmlignoredelimiter}
- \doif {\xmlatt{#1}{stretchy}} {false} {\settrue\mmlignoredelimiter}
- \ctxmodulemathml{mo("#1")}
- \setfalse\mmlignoredelimiter
-\stopxmlsetups
-
-% \startxmlsetups mml:mfenced % {} around separator is needed for spacing
-% \def\MMLleft {\left }% weird
-% \def\MMLright {\right}
-% \def\MMLmiddle{\middle}
-% \ctxmodulemathml{mfenced("#1")}
-% \stopxmlsetups
-
-\startxmlsetups mml:mfenced % {} around separator is needed for spacing
- \math_fences_checked_start
- \ctxmodulemathml{mfenced("#1")}
- \math_fences_checked_stop
-\stopxmlsetups
-
-
-\defineoverlay [mml:enclose:box] [\useMPgraphic{mml:enclose:box}]
-\defineoverlay [mml:enclose:roundedbox] [\useMPgraphic{mml:enclose:roundedbox}]
-\defineoverlay [mml:enclose:circle] [\useMPgraphic{mml:enclose:circle}]
-\defineoverlay [mml:enclose:left] [\useMPgraphic{mml:enclose:left}]
-\defineoverlay [mml:enclose:right] [\useMPgraphic{mml:enclose:right}]
-\defineoverlay [mml:enclose:top] [\useMPgraphic{mml:enclose:top}]
-\defineoverlay [mml:enclose:bottom] [\useMPgraphic{mml:enclose:bottom}]
-\defineoverlay [mml:enclose:updiagonalstrike] [\useMPgraphic{mml:enclose:updiagonalstrike}]
-\defineoverlay [mml:enclose:downdiagonalstrike] [\useMPgraphic{mml:enclose:downdiagonalstrike}]
-\defineoverlay [mml:enclose:horizontalstrike] [\useMPgraphic{mml:enclose:horizontalstrike}]
-\defineoverlay [mml:enclose:verticalstrike] [\useMPgraphic{mml:enclose:verticalstrike}]
-
-\startuseMPgraphic{mml:enclose:box}
- draw OverlayBox withpen pencircle scaled (ExHeight/10) ;
-\stopuseMPgraphic
-\startuseMPgraphic{mml:enclose:roundedbox}
- draw OverlayBox cornered .5ExHeight withpen pencircle scaled (ExHeight/10) ;
-\stopuseMPgraphic
-\startuseMPgraphic{mml:enclose:circle}
- draw fullcircle xysized(bbwidth(OverlayBox),bbheight(OverlayBox)) withpen pencircle scaled (ExHeight/10) ;
-\stopuseMPgraphic
-\startuseMPgraphic{mml:enclose:left}
- draw leftboundary OverlayBox withpen pencircle scaled (ExHeight/10) ;
- setbounds currentpicture to OverlayBox ;
-\stopuseMPgraphic
-\startuseMPgraphic{mml:enclose:right}
- draw rightboundary OverlayBox withpen pencircle scaled (ExHeight/10) ;
- setbounds currentpicture to OverlayBox ;
-\stopuseMPgraphic
-\startuseMPgraphic{mml:enclose:top}
- draw topboundary OverlayBox withpen pencircle scaled (ExHeight/10) ;
- setbounds currentpicture to OverlayBox ;
-\stopuseMPgraphic
-\startuseMPgraphic{mml:enclose:bottom}
- draw bottomboundary OverlayBox withpen pencircle scaled (ExHeight/10) ;
- setbounds currentpicture to OverlayBox ;
-\stopuseMPgraphic
-\startuseMPgraphic{mml:enclose:updiagonalstrike}
- path p ; p := OverlayBox enlarged -.25ExHeight ;
- draw llcorner p -- urcorner p withpen pencircle scaled (ExHeight/10) ;
- setbounds currentpicture to OverlayBox ;
-\stopuseMPgraphic
-\startuseMPgraphic{mml:enclose:downdiagonalstrike}
- path p ; p := OverlayBox enlarged -.25ExHeight ;
- draw ulcorner p -- lrcorner p withpen pencircle scaled (ExHeight/10) ;
- setbounds currentpicture to OverlayBox ;
-\stopuseMPgraphic
-\startuseMPgraphic{mml:enclose:horizontalstrike}
- path p ; p := OverlayBox enlarged -.25ExHeight ;
- draw .5[llcorner p,ulcorner p] -- .5[lrcorner p,urcorner p] withpen pencircle scaled (ExHeight/10) ;
- setbounds currentpicture to OverlayBox ;
-\stopuseMPgraphic
-\startuseMPgraphic{mml:enclose:verticalstrike}
- path p ; p := OverlayBox enlarged -.25ExHeight ;
- draw .5[llcorner p,lrcorner p] -- .5[ulcorner p,urcorner p] withpen pencircle scaled (ExHeight/10) ;
- setbounds currentpicture to OverlayBox ;
-\stopuseMPgraphic
-
-\startxmlsetups mml:menclose
- \edef\mmlmenclosenotation{\ctxmodulemathml{menclosepattern("#1")}}
- \ifx\mmlmenclosenotation\empty
- \xmlflush{#1}
- \else
- \doifelse \mmlmenclosenotation {mml:enclose:longdiv} {
- \overline{\left)\strut\xmlflush{#1}\right.}
- } {
- \doifelse \mmlmenclosenotation {mml:enclose:actuarial} {
- \overline{\left.\strut\xmlflush{#1}\right\vert}
- } {
- \doifelse \mmlmenclosenotation {mml:enclose:radical} {
- \sqrt{\xmlflush{#1}}
- } {
- % todo: no framed when longdiv, actuarial or radical ? spec ?
- \vcenter {
- \framed
- [frame=off,strut=no,background={\mmlmenclosenotation}] % offset is kind of undefined
- {\startimath
- \expanded{\doifelseinset {mml:enclose:longdiv} {\mmlmenclosenotation}} {
- \overline{\left)\strut\xmlflush{#1}\right.}
- } {
- \expanded{\doifelseinset {mml:enclose:actuarial} {\mmlmenclosenotation}} {
- \overline{\left.\strut\xmlflush{#1}\right\vert}
- } {
- \expanded{\doifelseinset {mml:enclose:radical} {\mmlmenclosenotation}} {
- \sqrt{\xmlflush{#1}}
- } {
- \xmlflush{#1}
- }
- }
- }
- \stopimath}
- }
- }
- }
- }
- \fi
-\stopxmlsetups
-
-\xmlmapvalue {mml:mfrac:linethickness} {thin} {.2pt}
-\xmlmapvalue {mml:mfrac:linethickness} {medium} {.4pt}
-\xmlmapvalue {mml:mfrac:linethickness} {thick} {.8pt}
-\xmlmapvalue {mml:mfrac:linethickness} {0} {0pt}
-
-\startxmlsetups mml:mfrac % dodo: handle linethickness in lua + unit
- \begingroup
- \edef\mmlfraclinethickness{\xmlatt{#1}{linethickness}}
- \ifx\mmlfraclinethickness\empty
- \doifelse{\xmlatt{#1}{bevelled}}{true} {
- \left.\mmlfirst{#1}\middle/\mmlsecond{#1}\right.% \thinspace\middle/\thinspace
- } {
- \mmlfrac{\mmlfirst{#1}}{\mmlsecond{#1}}
- }
- \else
- \doifelse {\xmlval{mml:mfrac:linethickness}{\mmlfraclinethickness}{}} {} {
- \scratchdimen\xmlval{mml:mfrac:linethickness}\mmlfraclinethickness{.4pt}
- } {
- % probably not yet ok
- \setdimensionwithunit\scratchdimen\mmlfraclinethickness{pt}
- }
- {
- {\mmlfirst{#1}}
- \above\scratchdimen
- {\mmlsecond{#1}}
- }
- \fi
- \endgroup
-\stopxmlsetups
-
-\startxmlsetups mml:ms
- \hbox {
- \tf % else encoding problems
- \edef\mmllquote{\xmlatt{#1}{lquote}}
- \edef\mmlrquote{\xmlatt{#1}{rquote}}
- \ifx\mmllquote\empty\symbol[leftquotation]\else\mmllquote\fi
- \applymmlsometext{#1}{\xmlflush{#1}}
- \ifx\mmlrquote\empty\symbol[rightquotation]\else\mmlrquote\fi
- }
-\stopxmlsetups
-
-\startxmlsetups mml:mstyle
- \begingroup
- \pushmathstyle
- \setmmlmathstyle{#1}
- \setmmlscriptlevel{#1}
- \xmlflush{#1}
- \popmathstyle
- \endgroup
-\stopxmlsetups
-
-\setupMMLappearance[text][\c!alternative=\v!b] % a=normal, b=keep spaces
-
-\startxmlsetups mml:mtext
- \text {
- \applymmlsometext{#1}{
- \doifelse \MMLtextalternative \v!a {
- %\ctxmodulemathml{stripped(\!!bs\xmlflush{#1}\!!es)}
- \ignorespaces
- \xmlflush{#1}
- \removeunwantedspaces
- } {
- \xmlflush{#1}
- }
- }
- }
-\stopxmlsetups
-
-\startxmlsetups mml:merror
- \hbox{\startimath\displaystyle\xmlflush{#1}\stopimath}
-\stopxmlsetups
-
-\startxmlsetups mml:mphantom
-% \phantom{\ignorespaces{}\xmlflush{#1}\unskip} % watch spacing {} hack
-% \phantom{\mathstyle{\ignorespaces{}\xmlflush{#1}\unskip}}%
- \phantom{\triggermathstyle\normalmathstyle\ignorespaces\xmlflush{#1}\removeunwantedspaces}
-% \mktriggereffect\v!hidden
-% \ignorespaces{}\xmlflush{#1}\unskip % no attributes in math yet
-% \mktriggereffect\v!normal
-\stopxmlsetups
-
-\startxmlsetups mml:mpadded % todo
- \xmlflush{#1}
-\stopxmlsetups
-
-% mrow / option: no fenced
-
-\startxmlsetups mml:maction
- \xmlflush{#1}
-\stopxmlsetups
-
-% \startxmlsetups mml:mrow
-% \begingroup
-% \edef\nofmmlrows{\xmlcount{#1}{/mml:mo}}%
-% \ifnum\nofmmlrows=\plustwo
-% \xmldoifelse {#1} {/mml:mo[position()==1 or position()==\nofmmlrows]} {% we need a {}
-% \def\MMLleft {\left }
-% \def\MMLright {\right}
-% \def\MMLmiddle{\middle}
-% \enabledelimiter
-% \checkdelimiters{\xmlall{#1}{/mml:mo}}
-% \fakeleftdelimiter
-% \xmlflush{#1}
-% \fakerightdelimiter
-% \disabledelimiter
-% } {
-% \xmlflush{#1}
-% }
-% \else
-% \xmlflush{#1}
-% \fi
-% \endgroup
-% \stopxmlsetups
-%
-% fails on { ... so we need
-
-% \startxmlsetups mml:mrow
-% \begingroup
-% \xmldoifelse {#1} {/mml:mo[first() or last()]} {% we need a {}
-% \def\MMLleft {\left }
-% \def\MMLright {\right}
-% \def\MMLmiddle{\middle}
-% \enabledelimiter
-% \checkdelimiters{\xmlall{#1}{/mml:mo}}
-% \fakeleftdelimiter
-% \xmlflush{#1}
-% \fakerightdelimiter
-% \disabledelimiter
-% } {
-% \xmlflush{#1}
-% }
-% \endgroup
-% \stopxmlsetups
-%
-% more modern:
-
-\startxmlsetups mml:mrow
- \begingroup
- \xmldoifelse {#1} {/mml:mo[first() or last()]} {% we need a {}
- \math_fences_checked_start
- \xmlflush{#1}
- \math_fences_checked_stop
- } {
- \xmlflush{#1}
- }
- \endgroup
-\stopxmlsetups
-
-\startxmlsetups mml:msqrt
- \sqrt{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups mml:mroot
- \root{\mmlsecond{#1}}\of{\mmlfirst{#1}}
-\stopxmlsetups
-
-\setupMMLappearance[scripts][\c!alternative=\v!a] % {} rond base
-
-% brrr no { } when limop .. todo: better in lua
-% speed up with ifx and setups or just in lua
-
-\let\mmlnucleus\relax
-
-\startxmlsetups mml:msub
- \edef\mmlnucleus{\xmlraw{#1}{/mml:*[1]}}
- \doifelse {\utfmathclass\mmlnucleus} {limop} {
- \mmlfirst{#1} \normalsubscript{\mmlsecond{#1}}
- } {
- \doifelse\MMLscriptsalternative\v!a {
- {\mmlfirst{#1}}\normalsubscript{\mmlsecond{#1}}
- } {
- \mmlfirst{#1} \normalsubscript{\mmlsecond{#1}}
- }
- }
-\stopxmlsetups
-
-\startxmlsetups mml:msup
- \edef\mmlnucleus{\xmlraw{#1}{/mml:*[1]}}
- \doifelse {\utfmathclass\mmlnucleus} {limop} {
- \mmlfirst{#1} \normalsuperscript{\mmlsecond{#1}}
- } {
- \doifelse\MMLscriptsalternative\v!a {
- {\mmlfirst{#1}}\normalsuperscript{\mmlsecond{#1}}
- } {
- \mmlfirst{#1} \normalsuperscript{\mmlsecond{#1}}
- }
- }
-\stopxmlsetups
-
-\startxmlsetups mml:msubsup
- \edef\mmlnucleus{\xmlraw{#1}{/mml:*[1]}}
- \doifelse {\utfmathclass\mmlnucleus} {limop} {
- \mmlfirst{#1}\normalsubscript{\mmlsecond{#1}}\normalsuperscript{\mmlthird{#1}}
- } {
- \doifelse\MMLscriptsalternative\v!a {
- {\mmlfirst{#1}}\normalsubscript{\mmlsecond{#1}}\normalsuperscript{\mmlthird{#1}}
- } {
- \mmlfirst{#1}\normalsubscript{\mmlsecond{#1}}\normalsuperscript{\mmlthird{#1}}
- }
- }
-\stopxmlsetups
-
-% helpers
-
-\unexpanded\def\mmlexecuteifdefined#1%
- {\ifx#1\empty
- \expandafter\secondoftwoarguments
- \else\ifcsname#1\endcsname
- \doubleexpandafter\firstoftwoarguments
- \else
- \doubleexpandafter\secondoftwoarguments
- \fi\fi
- {\csname#1\endcsname}}
-
-\def\mmlextensible#1{\ctxmodulemathml{extensible(\!!bs#1\!!es)}}
-
-\definemathtriplet [\v!mathematics] [mmlovertriplet] % or will we use a special instance
-\definemathtriplet [\v!mathematics] [mmlundertriplet] % or will we use a special instance
-\definemathtriplet [\v!mathematics] [mmldoubletriplet] % or will we use a special instance
-
-% common to munder/mover/munderover
-
-\starttexdefinition unexpanded mmlfencedfirst #1
- \math_fences_checked_start
- \mmlunexpandedfirst{#1}
- \math_fences_checked_stop
-\stoptexdefinition
-\starttexdefinition unexpanded mmlfencedsecond #1
- \math_fences_checked_start
- \mmlunexpandedsecond{#1}
- \math_fences_checked_stop
-\stoptexdefinition
-\starttexdefinition unexpanded mmlfencedthird #1
- \math_fences_checked_start
- \mmlunexpandedthird{#1}
- \math_fences_checked_stop
-\stoptexdefinition
-
-% mover
-
-\starttexdefinition unexpanded mmloverabove #1
- \edef\mmlovercommand{\utfmathfiller\mmlovertoken}
- \mmlexecuteifdefined\mmlovercommand {\mmlfencedsecond{#1}} \relax
-\stoptexdefinition
-\starttexdefinition unexpanded mmloverbase #1
- \edef\mmlbasecommand{\utfmathfiller\mmlbasetoken}
- \mmlexecuteifdefined\mmlbasecommand {\mmlfencedfirst{#1}}
- \relax
-\stoptexdefinition
-\starttexdefinition unexpanded mmloverbasefiller #1
- \edef\mmlbasecommand{e\utfmathcommandfiller\mmlbasetoken}
- \mmlexecuteifdefined\mmlbasecommand \relax {\mmlfencedsecond{#1}} {}
-\stoptexdefinition
-\starttexdefinition unexpanded mmloveraccent #1
- \edef\mmlovercommand{\utfmathcommandabove\mmlovertoken}
- \mmlexecuteifdefined\mmlovercommand \relax {\mmlfencedfirst{#1}}
-\stoptexdefinition
-\starttexdefinition unexpanded mmlovertext #1
- \mmlovertriplet {\mmloverbase{#1}} {\mmloverabove{#1}} {}
-\stoptexdefinition
-\starttexdefinition unexpanded mmloveraccentchecker #1
- \edef\mmlovertoken{\mmlextensible{\xmlraw{#1}{/mml:*[2]}}}% /text()
- \doifelseutfmathabove\mmlovertoken \mmloveraccent \mmlovertext {#1}
-\stoptexdefinition
-
-\startxmlsetups mml:mover
- \edef\mmlbasetoken{\mmlextensible{\xmlraw{#1}{/mml:*[1]}}}% /text()
- \doifelseutfmathfiller\mmlbasetoken \mmloverbasefiller \mmloveraccentchecker {#1}
-\stopxmlsetups
-
-% munder
-
-\starttexdefinition unexpanded mmlunderbelow #1
- \edef\mmlundercommand{\utfmathfiller\mmlundertoken}
- \mmlexecuteifdefined\mmlundercommand {\mmlfencedsecond{#1}} \relax
-\stoptexdefinition
-\starttexdefinition unexpanded mmlunderbase #1
- \edef\mmlbasecommand{\utfmathfiller\mmlbasetoken}
- \mmlexecuteifdefined\mmlbasecommand {\mmlfencedfirst{#1}}
- \relax
-\stoptexdefinition
-\starttexdefinition unexpanded mmlunderbasefiller #1
- \edef\mmlbasecommand{e\utfmathcommandfiller\mmlbasetoken}%
- \mmlexecuteifdefined\mmlbasecommand \relax {} {\mmlfencedsecond{#1}}
-\stoptexdefinition
-\starttexdefinition unexpanded mmlunderaccent #1
- \edef\mmlundercommand{\utfmathcommandbelow\mmlundertoken}
- \mmlexecuteifdefined\mmlundercommand \relax {\mmlfencedfirst{#1}}
-\stoptexdefinition
-\starttexdefinition unexpanded mmlundertext #1
- \mmlundertriplet {\mmlunderbase{#1}} {} {\mmlunderbelow{#1}}
-\stoptexdefinition
-\starttexdefinition unexpanded mmlunderaccentchecker #1
- \edef\mmlundertoken{\mmlextensible{\xmlraw{#1}{/mml:*[2]}}}% /text()
- \doifelseutfmathbelow\mmlundertoken \mmlunderaccent \mmlundertext {#1}
-\stoptexdefinition
-
-\startxmlsetups mml:munder
- \edef\mmlbasetoken{\mmlextensible{\xmlraw{#1}{/mml:*[1]}}}% /text()
- \doifelseutfmathfiller\mmlbasetoken \mmlunderbasefiller \mmlunderaccentchecker {#1}
-\stopxmlsetups
-
-% munderover
-
-\starttexdefinition unexpanded mmlunderoveraccentcheckerUO #1
- \edef\mmlundercommand{\utfmathcommandbelow\mmlundertoken}
- \edef\mmlovercommand {\utfmathcommandabove\mmlovertoken}
- \edef\mmlbasecommand {\mmlovercommand\mmlundercommand}
- \ifcsname\mmlbasecommand\endcsname
- \csname\mmlbasecommand\endcsname {\mmlfencedfirst{#1}}
- \else\ifcsname\mmlundercommand\endcsname
- \ifcsname\mmlovercommand\endcsname
- \csname\mmlovercommand\endcsname {\csname\mmlundercommand\endcsname{\mmlfencedfirst{#1}}}
- \else
- \mmldoubletriplet {\csname\mmlundercommand\endcsname{\mmlfencedfirst{#1}}} {\mmlfencedthird{#1}\mmlfencedthird{#1}} {}
- \fi
- \else\ifcsname\mmlovercommand\endcsname
- \mmldoubletriplet {\csname\mmlovercommand\endcsname{\mmlfencedfirst{#1}}} {} {\mmlfencedsecond{#1}}
- \else
- \mmlunderoveraccentcheckerTT {#1}
- \fi\fi\fi
-\stoptexdefinition
-\starttexdefinition unexpanded mmlunderoveraccentcheckerUT #1
- \edef\mmlundercommand{\utfmathcommandbelow\mmlundertoken}
- \edef\mmlbasecommand {\mmlundercommand text}
- \ifcsname\mmlbasecommand\endcsname
- \csname\mmlbasecommand\endcsname {\mmlfencedfirst{#1}} {\mmlfencedthird{#1}}
- \else\ifcsname\mmlundercommand\endcsname
- \mmldoubletriplet {\csname\mmlundercommand\endcsname{\mmlfencedfirst{#1}}} {\mmlfencedthird{#1}} {}
- \else
- \mmlunderoveraccentcheckerTT {#1}
- \fi\fi
-\stoptexdefinition
-\starttexdefinition unexpanded mmlunderoveraccentcheckerOT #1
- \edef\mmlovercommand{\utfmathcommandabove\mmlovertoken}
- \edef\mmlbasecommand{\mmlovercommand text}
- \ifcsname\mmlbasecommand\endcsname
- \csname\mmlbasecommand\endcsname {\mmlfencedfirst{#1}} {\mmlfencedsecond{#1}}
- \else\ifcsname\mmlovercommand\endcsname
- \mmldoubletriplet {\csname\mmlovercommand\endcsname{\mmlfencedfirst{#1}}} {} {\mmlfencedsecond{#1}}
- \else
- \mmlunderoveraccentcheckerTT {#1}
- \fi\fi
-\stoptexdefinition
-\starttexdefinition unexpanded mmlunderoveraccentcheckerTT #1
- \mmldoubletriplet {\mmlfencedfirst{#1}} {\mmlfencedthird{#1}} {\mmlfencedsecond{#1}} \relax
-\stoptexdefinition
-\starttexdefinition unexpanded mmlunderoveraccentchecker #1
- \edef\mmlundertoken{\mmlextensible{\xmlraw{#1}{/mml:*[2]}}}% /text()
- \edef\mmlovertoken {\mmlextensible{\xmlraw{#1}{/mml:*[3]}}}% /text()
- \doifelseutfmathbelow\mmlundertoken {
- \doifelseutfmathabove\mmlovertoken \mmlunderoveraccentcheckerUO \mmlunderoveraccentcheckerUT {#1}
- } {
- \doifelseutfmathabove\mmlovertoken \mmlunderoveraccentcheckerOT \mmlunderoveraccentcheckerTT {#1}
- }
-\stoptexdefinition
-\starttexdefinition unexpanded mmlunderoverbasefiller #1
- \edef\mmlbasecommand{e\utfmathcommandfiller\mmlbasetoken}%
- \mmlexecuteifdefined\mmlbasecommand \relax {\mmlfencedthird{#1}} {\mmlfencedsecond{#1}}
-\stoptexdefinition
-
-\startxmlsetups mml:munderover
- \edef\mmlbasetoken{\mmlextensible{\xmlraw{#1}{/mml:*[1]}}}% /text()
- \doifelseutfmathfiller\mmlbasetoken \mmlunderoverbasefiller \mmlunderoveraccentchecker {#1}
-\stopxmlsetups
-
-% tables (mml:mtable, mml:mtr, mml:mlabledtr, mml:mtd)
-
-\startxmlsetups mml:mtable % some more attributes need to be supported
- \vcenter {
- \hbox {% needed because otherwise positions makr the vcenter wide
- \ctxmodulemathml{mtable("#1")}
- }
- }
-\stopxmlsetups
-
-\startxmlsetups mml:mcolumn
- \ctxmodulemathml{mcolumn("#1")}
-\stopxmlsetups
-
-\def\mmlsetfakewidth#1{\setbox\scratchbox\hbox{#1}\scratchdimen\wd\scratchbox}
-
-\def\mmlmcolumndigitspace {\mmlsetfakewidth {0}\kern\scratchdimen}
-\def\mmlmcolumndigitrule {\mmlsetfakewidth {0}\vrule \s!width \scratchdimen \s!height .2\points \s!depth .2\points\relax}
-\def\mmlmcolumnsymbolrule {\mmlsetfakewidth{\times}\vrule \s!width \scratchdimen \s!height .2\points \s!depth .2\points\relax}
-\def\mmlmcolumnpunctuationrule{\mmlsetfakewidth {.}\vrule \s!width \scratchdimen \s!height .2\points \s!depth .2\points\relax}
-
-\setupMMLappearance[mspace][\c!option=] % \v!test
-
-\startxmlsetups mml:mspace
- \begingroup
- \edef\mmlspacetext{\xmlatt{#1}{spacing}}
- \ifx\mmlspacetext\empty
- \scratchwidth \xmlattdef{#1}{width} \!!zeropoint % must be string
- \scratchheight\xmlattdef{#1}{height}\!!zeropoint
- \scratchdepth \xmlattdef{#1}{depth} \!!zeropoint
- \ifdim\scratchheight=\zeropoint
- \ifdim\scratchdepth=\zeropoint\else
- \hbox{\vrule\s!depth\scratchdepth\s!height\zeropoint\s!width\zeropoint}%
- \fi
- \else
- \hbox{\vrule\s!depth\zeropoint\s!height\scratchheight\s!width\zeropoint}%
- \fi
- \ifdim\scratchwidth=\zeropoint\else
- \ifx\MMLmspaceoption\v!test
- \hbox to \scratchwidth{\showstruts\strut\hss\lower2\exheight\hbox{\infofont\xmlattdef{#1}{width}}\hss\strut}
- \else
- \hskip\scratchwidth
- \fi
- \fi
- \else
- \ifx\MMLmspaceoption\v!test
- \hbox{\showstruts\strut\phantom{\triggermathstyle\normalmathstyle\mmlspacetext}\strut}
- \else
- \phantom{\triggermathstyle\normalmathstyle\mmlspacetext}
- \fi
- \fi
- \endgroup
-\stopxmlsetups
-
-% later we can do a better job by manipulating node lists
-
-% \startxmlsetups mml:mline
-% % new, rather undefined, we need to capture a few keywords
-% \edef\mmllinewidth {\xmlatt{#1}{linethickness}}
-% \edef\mmllinetext {\xmlatt{#1}{spacing}}
-% \edef\mmllinelength{\xmlattdef{#1}{length}\!!zeropoint}
-% \ifx\mmllinewidth\empty
-% \!!deptha.5\linewidth
-% \else
-% \!!deptha.5\dimexpr\mmllinewidth\relax
-% \fi
-% \!!heighta\!!deptha
-% \ifx\mmllinetext\empty
-% \ifx\mmllinelength\empty
-% \!!widtha\zeropoint
-% \else
-% \!!widtha\mmllinelength
-% \fi
-% \else
-% \setbox\scratchbox\hbox{\mathematics{\mathstyle{\mmllinetext}}}% not ok
-% \!!widtha\wd\scratchbox
-% \fi
-% \hbox{\vrule\s!width\!!widtha\s!depth\!!deptha\s!height\!!heighta}
-% \stopxmlsetups
-
-\startxmlsetups mml:mglyph % probably never ok (hbox is needed in order to switch to normal font)
- \begingroup
- \edef\mmlglyphfontfamily{\xmlatt {#1}{fontfamily}}
- \edef\mmlglyphalt {\xmlattdef{#1}{alt}{unknown}}
- \edef\mmlglyphindex {\xmlatt {#1}{index}}
- \ifx \mmlglyphfontfamily \empty
- \hbox{\tttf[no fontfamily specified for \mmlglyphalt]}
- \else\ifx\mmlglyphindex\empty
- \hbox{\tttf[no index specified for \mmlglyphalt]}
- \else
- \hbox{\getglyph\mmlglyphfontfamily\mmlglyphindex}
- \fi\fi
- \endgroup
-\stopxmlsetups
-
-\startxmlsetups mml:maligngroup \stopxmlsetups % will be done when needed
-\startxmlsetups mml:malignmark \stopxmlsetups % will be done when needed
-
-\startxmlsetups mml:none \stopxmlsetups
-\startxmlsetups mml:mprescripts \stopxmlsetups
-
-\startxmlsetups mml:mmultiscripts
- \ctxmodulemathml{mmultiscripts("#1")}
-\stopxmlsetups
-
-% goodie
-
-\definebuffer[mml]
-
-\def\stopmml{\xmlprocessbuffer{@mml@}{\thedefinedbuffer{mml}}{}}
-
-\stopmodule
-
-\protect \endinput
-
-% TODO:
-%
-% <apply><divide/>
-% <apply><minus/>
-% <apply><minus/><ci>b</ci></apply>
-% <apply><minus/><ci>b</ci></apply>
-% <apply><root/> <ci>a</ci></apply>
-% </apply>
-% <apply><minus/>
-% <apply><minus/><ci>b</ci><ci>b</ci></apply>
-% <apply><minus/><ci>b</ci></apply>
-% <apply><root/> <ci>a</ci></apply>
-% </apply>
-% </apply>
-
-% \startmoduletestsection
-%
-% \def\xflushXMLstackwith#1#2#3#4% num bgroup egroup whatever
-% {\dostepwiserecurse{#1}\XMLstacklevel\plusone
-% {#2\relax
-% \ifnum\recurselevel>#1\relax#4\fi
-% \getXMLstackdata\recurselevel
-% #3}}
-%
-% \def\xflushXMLstackfrom#1#2#3%
-% {\dostepwiserecurse{#1}\XMLstacklevel\plusone
-% {#2\getXMLstackdata\recurselevel#3}}
-%
-% \startxmlsetups mml:minus
-% \doif \MMLsignreduction \v!yes {
-% \setMMLcreset{fn,\MMLcfunctionlist}
-% }
-% \ifcase\XMLstacklevel
-% \or
-% % self
-% \or
-% -\getXMLstackdata\plustwo
-% \else
-% \dostepwiserecurse \plustwo \XMLstacklevel \plusone {
-% \begingroup
-% \doifelse {\getXMLstackname\recurselevel} {apply} {
-% \ifnum\recurselevel=\plustwo
-% \begingroup
-% \dodoifelseMMCfunctioninapply \recurselevel {minus} {
-% \ifnum\XMLstacklevel>\plustwo
-% \endgroup
-% \else
-% \endgroup
-% \MMLcreset
-% \fi
-% } {
-% \endgroup
-% }
-% \else
-% \doifelseMMCfunctioninapply \recurselevel {\MMLcfunctionlist,\MMLcconstructlist} {
-% \MMLcreset
-% } {
-% }
-% \fi
-% } {
-% }
-% \getXMLstackdata\recurselevel
-% \ifnum\recurselevel<\XMLstacklevel\relax
-% -
-% \fi
-% \endgroup
-% }
-% \fi
-% \stopxmlsetups
-%
-% \stopmoduletestsection
diff --git a/Master/texmf-dist/tex/context/base/x-mathml.xsd b/Master/texmf-dist/tex/context/base/x-mathml.xsd
deleted file mode 100644
index 1c29452b06a..00000000000
--- a/Master/texmf-dist/tex/context/base/x-mathml.xsd
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xds="http://www.w3.org/?">
-
-<xsd:schema>
-
-<xsd:element name="imath" type="mathml:math" />
-<xsd:element name="dmath" type="mathml:math" />
-
-</xsd:schema>
diff --git a/Master/texmf-dist/tex/context/base/x-newcml.mkii b/Master/texmf-dist/tex/context/base/x-newcml.mkii
deleted file mode 100644
index 23c2bf1e2c0..00000000000
--- a/Master/texmf-dist/tex/context/base/x-newcml.mkii
+++ /dev/null
@@ -1,456 +0,0 @@
-%D \module
-%D [ file=x-newmml,
-%D version=2006.04.09, % reimplementation
-%D title=\CONTEXT\ XML Macros,
-%D subtitle=ChemML,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 used to be an xtag filter using remapping but the
-%D following is nore in sync with the new mathml methods.
-
-\writestatus{loading}{ConTeXt XML Macros / ChemML}
-
-\useXMLfilter[stk]
-
-\unprotect
-
-\def\setupCMLappearance[#1]{\dodoubleargument\getparameters[@@CML#1]}
-
-\defineXMLdirective [chemml] \setupCMLappearance
-
-\defineXMLargument [chem] \automathematics % \rm
-\defineXMLargument [ichem] \inlinemathematics % \rm
-\defineXMLargument [dchem] \displaymathematics % \rm
-
-\def\doifnotXMLparzero#1#2#3%
- {\ifcase\XMLpar{#1}{#2}{0}\else#3{\XMLpar{#1}{#2}{0}}\fi}
-
-\defineXMLargument [caption] \doCMLcaption
-
-\let\CMLtopcaption\empty
-\let\CMLbotcaption\empty
-
-\chardef\CMLcaptionmode\plusone
-
-\def\doCMLcaption#1%
- {\ifcase\CMLcaptionmode
- % can't happen
- \or
- \def\CMLbotcaption{#1}%
- \chardef\CMLcaptionmode\plustwo
- \or
- \def\CMLtopcaption{#1}%
- \chardef\CMLcaptionmode\plusthree
- \fi}
-
-\def\resetCMLcaption
- {\let\CMLtopcaption\empty
- \let\CMLbotcaption\empty
- \chardef\CMLcaptionmode\plusone}
-
-\resetCMLcaption
-
-\def\doCMLtext#1%
- {\ifx\CMLtopcaption\empty
- \setbox0\null
- \else
- \setbox0\hbox{\txx\setstrut\strut\ignorespaces\CMLtopcaption\unskip}%
- \fi
- \setbox2\hbox{\ignorespaces\strut#1\unskip}%
- \ifx\CMLbotcaption\empty
- \setbox4\null
- \else
- \setbox4\hbox{\txx\setstrut\strut\ignorespaces\CMLbotcaption\unskip}%
- \fi
- \scratchdimen=\wd2\advance\scratchdimen-.5em
- \ifdim\wd0>\scratchdimen
- \setbox0\hbox spread .5em{\hss\box0\hss}%
- \fi
- \ifdim\wd4>\scratchdimen
- \setbox4\hbox spread .5em{\hss\box4\hss}%
- \fi
- \setbox6=\vbox
- {\offinterlineskip\halign{\hss##\hss\cr\copy0\cr\copy2\cr\copy4\cr}}%
- \hbox{\lower\ht4\hbox{\lower\dp2\box6}}}
-
-\def\CMLscript#1%
- {$\scriptscriptstyle\ignorespaces#1\unskip$}
-
-% \startsetups cml:flush:all
-% \ignorespaces
-% \XMLallnamed{atom,bond,singlebond,doublebond,triplebond}
-% \removeunwantedspaces
-% \stopsetups
-
-\newcounter\currentCMLatom
-\newcounter\nofCMLatoms
-
-\defineXMLenvironmentsave
- [atom]
- [n=0,weight=0,protons=0,charge=0]
- {\directsetup{cml:atom:start}}
- {\directsetup{cml:atom:stop}}
-
-\startsetups cml:atom:start
- \removeunwantedspaces
-\stopsetups
-
-\startsetups cml:atom:stop
- \increment\currentCMLatom
- \resetCMLcaption
- \doCMLtext {
- \bgroup
- \lohi {
- \doifnotXMLparzero{atom}{protons}\CMLscript
- } {
- \doifnotXMLparzero{atom}{weight}\CMLscript
- }
- \ignorespaces
- \XMLflush{atom}
- \removeunwantedspaces
- \lohi {
- \doifnotXMLparzero{atom}{n}\CMLscript
- } {
- \ifnum\nofCMLatoms=\currentCMLatom\relax
- \doifnotXMLparzero{ion}{charge}\CMLscript
- \else
- \doifnotXMLparzero{atom}{charge}\CMLscript
- \fi
- }
- \egroup
- }
- \ignorespaces
-\stopsetups
-
-\defineXMLnested % why not environment
- [molecule]
- [n=0]
- {\directsetup{cml:molecule:start}}
- {\directsetup{cml:molecule:stop}}
-
-\startsetups cml:molecule:start
- \removeunwantedspaces
- \begingroup
- \startsavingXMLelements
- \ignorespaces
-\stopsetups
-
-\startsetups cml:molecule:stop
- \removeunwantedspaces
- \stopsavingXMLelements
- \resetCMLcaption
- \XMLfirstnamed{caption}
- \doCMLtext {
- \newcounter\currentCMLatom
- \newcounter\nofCMLatoms
- \doifnotXMLparzero{molecule}{n}\firstofoneargument
- \ignorespaces
- \XMLallnamed{atom,ion,bond,singlebond,doublebond,triplebond}
- \removeunwantedspaces
- }
- \endgroup
- \ignorespaces
-\stopsetups
-
-\setupCMLappearance [ion] [\c!alternative=\v!a]
-
-\defineXMLnested
- [ion]
- [n=0,charge=0]
- {\directsetup{cml:ion:start}}
- {\directsetup{cml:ion:stop}}
-
-\startsetups cml:ion:start
- \begingroup
- \startsavingXMLelements
-\ignorespaces
-\stopsetups
-
-\startsetups cml:ion:stop
- \removeunwantedspaces
- \stopsavingXMLelements
- \resetCMLcaption
- \XMLfirstnamed{caption}
- \doCMLtext {
- \newcounter\currentCMLatom
- \newcounter\nofCMLatoms
- \doifnotXMLparzero{ion}{n}\firstofoneargument
- \doifelse\@@CMLionalternative\v!b {
- [\ignorespaces
- \XMLallnamed{atom,bond,singlebond,doublebond,triplebond}
- \removeunwantedspaces]
- \high {
- \doifnotXMLparzero{ion}{charge}\CMLscript
- }
- } {
- \countXMLnamedstack{atom}
- \edef\nofCMLatoms{\the\scratchcounter}% todo: \nofXMLchildren
- \ignorespaces
- \XMLallnamed{atom,bond,singlebond,doublebond,triplebond}
- \removeunwantedspaces
- }
- }
- \endgroup
- \ignorespaces
-\stopsetups
-
-\let\doCMLsymbol\gobbleoneargument
-\let\doCMLarrow \gobblethreearguments
-
-\defineXMLenvironment
- [reaction]
- {\directsetup{cml:reaction:start}}
- {\directsetup{cml:reaction:stop}}
-
-\startsetups cml:reaction:start
- \begingroup
- \let\doCMLsymbol\dodoCMLsymbol
- \let\doCMLarrow \dodoCMLarrow
-\stopsetups
-
-\startsetups cml:reaction:stop
- \endgroup
-\stopsetups
-
-\defineXMLcommand [plus] {\doCMLsymbol{+}}
-\defineXMLcommand [minus] {\doCMLsymbol{-}}
-\defineXMLcommand [equal] {\doCMLsymbol{=}}
-
-\def\dodoCMLsymbol#1%
- {\removeunwantedspaces\quad
- \mathop{#1}%
- \quad\kern\zeropoint\ignorespaces}
-
-\defineXMLcommand [gives] {\resetCMLcaption\doCMLgives}
-\defineXMLcommand [equilibrium] {\resetCMLcaption\doCMLequilibrium}
-\defineXMLcommand [mesomeric] {\resetCMLcaption\doCMLmesomeric}
-
-\def\dodoCMLarrow#1%
- {\removeunwantedspaces\quad
- \doCMLtext{$\vcenter{\offinterlineskip\halign{##\cr\hskip3em\cr#1\cr}}$}%
- \quad\kern\zeropoint\ignorespaces}
-
-\def\doCMLgives
- {\doCMLarrow{\rightarrowfill}}
-
-\def\doCMLequilibrium
- {\doCMLarrow{\rightarrowfill\cr\noalign{\nointerlineskip}\leftarrowfill}}
-
-\def\doCMLmesomeric
- {\doCMLarrow{$\leftarrow\hskip-1em$\rightarrowfill}}
-
-\defineXMLcommand [bond] [n=1] \doCMLbond
-\defineXMLcommand [singlebond] [n=1] \doCMLsinglebond
-\defineXMLcommand [doublebond] [n=1] \doCMLdoublebond
-\defineXMLcommand [triplebond] [n=1] \doCMLtriplebond
-
-\def\doCMLbond
- {\ifcase\XMLop{n}\relax
- \doCMLsinglebond
- \or
- \doCMLdoublebond
- \or
- \doCMLtriplebond
- \fi}
-
-\def\doCMLbond
- {\removeunwantedspaces
- \hrule \!!width \hsize \!!height .1ex\relax % .4pt
- \ignorespaces}
-
-\def\dodoCMLbond#1#2#3%
- {\removeunwantedspaces
- \begingroup
- \setbox\scratchbox\hbox{$M$}%
- \vbox to \ht\scratchbox
- {\hsize\wd\scratchbox
- \vskip.1\wd\scratchbox
- #1\vfill#2\vfill#3%
- \vskip.1\wd\scratchbox}%
- \endgroup
- \ignorespaces}
-
-\def\doCMLsinglebond{\dodoCMLbond\relax \doCMLbond\relax }
-\def\doCMLdoublebond{\dodoCMLbond\doCMLbond\relax \doCMLbond}
-\def\doCMLtriplebond{\dodoCMLbond\doCMLbond\doCMLbond\doCMLbond}
-
-% extensions (uses m-chemic, which thenneeds to be loaded)
-
-% <dchem>
-% <structure>
-% <component>
-% <graphic>SIX,B</graphic>
-% <graphic>R135</graphic>
-% </component>
-% <component>
-% <graphic>R246</graphic>
-% </component>
-% <component>
-% <graphic>RZ</graphic>
-% <text>A,B,C,D,E,F</text>
-% </component>
-% <component>
-% <graphic>Z</graphic>
-% <oxidation n="3">A</oxidation>
-% <annotation location="tl">
-% <text>B</text>
-% <caption>x</caption>
-% </annotation>
-% <oxidation n="3" sign="+">C</oxidation>
-% <text>D,E,F</text>
-% </component>
-% </structure>
-% <structure>
-% <component>
-% <graphic>SIX,B</graphic>
-% <graphic>r135</graphic>
-% </component>
-% <component>
-% <graphic>R246</graphic>
-% </component>
-% <component>
-% <graphic>RZ</graphic>
-% <text>A,B,C,D,E,F</text>
-% </component>
-% </structure>
-% </dchem>
-
-\ifx\XMLttoks \undefined \newtoks \XMLttoks \fi
-\ifx\XMLgtoks \undefined \newtoks \XMLgtoks \fi
-
-\ifx\startchemical\undefined
- \def\startchemical {\hbox{module chemic is not loaded}}
- \let\stopchemical \relax
- \def\chemical[#1][#2]{}
-\fi
-
-\defineXMLenvironment
- [structure]
- {\startchemical
- \ignorespaces}
- {\removeunwantedspaces
- \stopchemical}
-
-\defineXMLenvironment
- [component]
- {\global\XMLgtoks\emptytoks
- \global\XMLttoks\emptytoks
- \defineXMLargument[graphic]{\dogetCMLgraphic}%
- \defineXMLargument[text] {\dogetCMLtext}%
- \ignorespaces}
- {\removeunwantedspaces
- \expanded{\chemical[\the\XMLgtoks][\the\XMLttoks]}%
- \ignorespaces}
-
-\def\dogetCMLgraphic#1%
- {\doifelsenothing{\the\XMLgtoks}
- {\uppercase{\doglobal\appendtoks #1\to\XMLgtoks}}
- {\uppercase{\doglobal\appendtoks,#1\to\XMLgtoks}}%
- \ignorespaces}
-
-\def\dogetCMLtext#1%
- {\doifelsenothing{\the\XMLttoks}
- {\uppercase{\doglobal\appendtoks #1\to\XMLttoks}}
- {\uppercase{\doglobal\appendtoks,#1\to\XMLttoks}}%
- \ignorespaces}
-
-\defineXMLargument
- [oxidation]
- [sign=,n=1]
- {\doCMLoxidation}
-
-\def\doCMLoxidation#1%
- {\expanded{\dogetCMLtext{\noexpand\chemicaloxidation{\XMLop{sign}}{\XMLop{n}}{#1}}}%
- \ignorespaces}
-
-% \defineXMLenvironment
-% [annotation]
-% [location=]
-% {\defineXMLsave[text]%
-% \defineXMLsave[caption]}
-% {\removeunwantedspaces
-% \processaction
-% [\XMLpar{annotation}{location}{r}]
-% [ t=>\dodoCMLannotation\chemicaltop,
-% b=>\dodoCMLannotation\chemicalbottom,
-% l=>\dodoCMLannotation\chemicalleft,
-% r=>\dodoCMLannotation\chemicalright,
-% lc=>\dodoCMLannotation\chemicalleftcentered,
-% rc=>\dodoCMLannotation\chemicalrightcentered,
-% tl=>\dodoCMLannotation\chemicaltopleft,
-% bl=>\dodoCMLannotation\chemicalbottomleft,
-% tr=>\dodoCMLannotation\chemicaltopright,
-% br=>\dodoCMLannotation\chemicalbottomright,
-% lt=>\dodoCMLannotation\chemicallefttop,
-% lb=>\dodoCMLannotation\chemicalleftbottom,
-% rt=>\dodoCMLannotation\chemicalrighttop,
-% rb=>\dodoCMLannotation\chemicalrightbottom,
-% x=>\dodoCMLannotation\chemicaltighttext,
-% sl=>\dodoCMLannotation\chemicalsmashedleft,
-% sm=>\dodoCMLannotation\chemicalsmashedmiddle,
-% sr=>\dodoCMLannotation\chemicalsmashedright]%
-% \ignorespaces}
-
-% todo: generic mapper t -> top etc
-
-\mapXMLvalue {cml:a:l} {t} {\dodoCMLannotation\chemicaltop}
-\mapXMLvalue {cml:a:l} {b} {\dodoCMLannotation\chemicalbottom}
-\mapXMLvalue {cml:a:l} {l} {\dodoCMLannotation\chemicalleft}
-\mapXMLvalue {cml:a:l} {r} {\dodoCMLannotation\chemicalright}
-\mapXMLvalue {cml:a:l} {lc} {\dodoCMLannotation\chemicalleftcentered}
-\mapXMLvalue {cml:a:l} {rc} {\dodoCMLannotation\chemicalrightcentered}
-\mapXMLvalue {cml:a:l} {tl} {\dodoCMLannotation\chemicaltopleft}
-\mapXMLvalue {cml:a:l} {bl} {\dodoCMLannotation\chemicalbottomleft}
-\mapXMLvalue {cml:a:l} {tr} {\dodoCMLannotation\chemicaltopright}
-\mapXMLvalue {cml:a:l} {br} {\dodoCMLannotation\chemicalbottomright}
-\mapXMLvalue {cml:a:l} {lt} {\dodoCMLannotation\chemicallefttop}
-\mapXMLvalue {cml:a:l} {lb} {\dodoCMLannotation\chemicalleftbottom}
-\mapXMLvalue {cml:a:l} {rt} {\dodoCMLannotation\chemicalrighttop}
-\mapXMLvalue {cml:a:l} {rb} {\dodoCMLannotation\chemicalrightbottom}
-\mapXMLvalue {cml:a:l} {x} {\dodoCMLannotation\chemicaltighttext}
-\mapXMLvalue {cml:a:l} {sl} {\dodoCMLannotation\chemicalsmashedleft}
-\mapXMLvalue {cml:a:l} {sm} {\dodoCMLannotation\chemicalsmashedmiddle}
-\mapXMLvalue {cml:a:l} {sr} {\dodoCMLannotation\chemicalsmashedright}
-
-% \mapXMLvalue {cml:a:l} {cl} {\dodoCMLannotation\chemicalleftcentered}
-% \mapXMLvalue {cml:a:l} {cr} {\dodoCMLannotation\chemicalrightcentered}
-% \mapXMLvalue {cml:a:l} {lt} {\dodoCMLannotation\chemicaltopleft}
-% \mapXMLvalue {cml:a:l} {lb} {\dodoCMLannotation\chemicalbottomleft}
-% \mapXMLvalue {cml:a:l} {rt} {\dodoCMLannotation\chemicaltopright}
-% \mapXMLvalue {cml:a:l} {rb} {\dodoCMLannotation\chemicalbottomright}
-% \mapXMLvalue {cml:a:l} {tl} {\dodoCMLannotation\chemicallefttop}
-% \mapXMLvalue {cml:a:l} {bl} {\dodoCMLannotation\chemicalleftbottom}
-% \mapXMLvalue {cml:a:l} {tr} {\dodoCMLannotation\chemicalrighttop}
-% \mapXMLvalue {cml:a:l} {br} {\dodoCMLannotation\chemicalrightbottom}
-% \mapXMLvalue {cml:a:l} {ls} {\dodoCMLannotation\chemicalsmashedleft}
-% \mapXMLvalue {cml:a:l} {ms} {\dodoCMLannotation\chemicalsmashedmiddle}
-% \mapXMLvalue {cml:a:l} {rs} {\dodoCMLannotation\chemicalsmashedright}
-
-\defineXMLenvironment
- [annotation]
- [location=]
- {\pushXMLmeaning{text}%
- \pushXMLmeaning{caption}%
- \defineXMLsave[text]%
- \defineXMLsave[caption]}
- {\removeunwantedspaces
- \XMLval{cml:a:l}{\XMLpar{annotation}{location}{r}}{\XMLflush{text}}%
- \popXMLmeaning{text}%
- \popXMLmeaning{caption}%
- \ignorespaces}
-
-\def\dodoCMLannotation#1%
- {\expanded{\dogetCMLtext{\noexpand#1{\XMLflush{caption}}{\XMLflush{text}}}}}
-
-\defineXMLenvironment
- [forever]
- {\left[}
- {\right]}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/x-newmme.mkii b/Master/texmf-dist/tex/context/base/x-newmme.mkii
deleted file mode 100644
index 2e0d4c18969..00000000000
--- a/Master/texmf-dist/tex/context/base/x-newmme.mkii
+++ /dev/null
@@ -1,423 +0,0 @@
-%D \module
-%D [ file=m-newmme,
-%D version=2005.06.10, % 1999.12.20,
-%D title=\CONTEXT\ XML Macros,
-%D subtitle=MathML Entities,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 XML Macros / MathML Entities}
-
-\unprotect
-
-%D Used in the manual:
-
-\def\showMMLentity#1%
- {\bgroup
- \doifXMLentityelse{#1}
- {\let\MMLleft\empty\let\MMLright\empty\mathematics{\getXMLentity{#1}{}}}
- {\getXMLentity{unknown}}%
- \egroup}
-
-\newbox\unknownXMLentity
-\setbox\unknownXMLentity\hbox{\inframed[\c!strut=\v!no,\c!offset=1pt]{\ttx ?}}
-
-\defineXMLentity [unknown] {\copy\unknownXMLentity}
-
-%D A (not really needed) precaution:
-
-\ifx\blackboard\undefined
- \def\blackboard{\ifx\Bbb\undefined\else\expandafter\Bbb\fi}
-\fi
-
-%D Basic entities, greek:
-
-\defineXMLentity [alpha] {\mathematics \alpha}
-\defineXMLentity [beta] {\mathematics \beta}
-\defineXMLentity [gamma] {\mathematics \gamma}
-\defineXMLentity [delta] {\mathematics \delta}
-\defineXMLentity [epsilon] {\mathematics \epsilon}
-\defineXMLentity [zeta] {\mathematics \zeta}
-\defineXMLentity [eta] {\mathematics \eta}
-\defineXMLentity [theta] {\mathematics \theta}
-\defineXMLentity [iota] {\mathematics \iota}
-\defineXMLentity [kappa] {\mathematics \kappa}
-\defineXMLentity [lambda] {\mathematics \lambda}
-\defineXMLentity [theta] {\mathematics \theta}
-\defineXMLentity [mu] {\mathematics \mu}
-\defineXMLentity [nu] {\mathematics \nu}
-\defineXMLentity [xi] {\mathematics \xi}
-\defineXMLentity [pi] {\mathematics \pi}
-\defineXMLentity [rho] {\mathematics \rho}
-\defineXMLentity [sigma] {\mathematics \sigma}
-\defineXMLentity [tau] {\mathematics \tau}
-\defineXMLentity [upsilon] {\mathematics \upsilon}
-\defineXMLentity [phi] {\mathematics \phi}
-\defineXMLentity [chi] {\mathematics \chi}
-\defineXMLentity [psi] {\mathematics \psi}
-\defineXMLentity [omega] {\mathematics \omega}
-
-\defineXMLentity [varepsilon] {\mathematics \varepsilon}
-\defineXMLentity [vartheta] {\mathematics \vartheta}
-\defineXMLentity [varpi] {\mathematics \varpi}
-\defineXMLentity [varrho] {\mathematics \varrho}
-\defineXMLentity [varsigma] {\mathematics \varsigma}
-\defineXMLentity [varphi] {\mathematics \varphi}
-
-\defineXMLentity [epsilonv] {\mathematics \varepsilon}
-\defineXMLentity [thetav] {\mathematics \vartheta}
-\defineXMLentity [piv] {\mathematics \varpi}
-\defineXMLentity [rhov] {\mathematics \varrho}
-\defineXMLentity [sigmav] {\mathematics \varsigma}
-\defineXMLentity [phiv] {\mathematics \varphi}
-
-\defineXMLentity [epsi] {\mathematics \epsilon}
-\defineXMLentity [epsiv] {\mathematics \varepsilon}
-
-\defineXMLentity [Alpha] {A}
-\defineXMLentity [Beta] {B}
-\defineXMLentity [Gamma] {\mathematics \Gamma}
-\defineXMLentity [Delta] {\mathematics \Delta}
-\defineXMLentity [Epsilon] {E}
-\defineXMLentity [Zeta] {Z}
-\defineXMLentity [Eta] {N}
-\defineXMLentity [Theta] {\mathematics \Theta}
-\defineXMLentity [Iota] {I}
-\defineXMLentity [Kappa] {K}
-\defineXMLentity [Lambda] {\mathematics \Lambda}
-\defineXMLentity [Mu] {M}
-\defineXMLentity [Nu] {N}
-\defineXMLentity [Xi] {\mathematics \Xi}
-\defineXMLentity [Pi] {\mathematics \Pi}
-\defineXMLentity [Ro] {R}
-\defineXMLentity [Sigma] {\mathematics \Sigma}
-\defineXMLentity [Tau] {T}
-\defineXMLentity [Upsilon] {\mathematics \Upsilon}
-\defineXMLentity [Phi] {\mathematics \Phi}
-\defineXMLentity [Chi] {X}
-\defineXMLentity [Psi] {\mathematics \Psi}
-\defineXMLentity [Omega] {\mathematics \Omega}
-
-%D Basic entities, hebrew:
-
-\defineXMLentity [aleph] {\mathematics \aleph}
-
-%D Basic entities, functions:
-
-\defineXMLentity [abs] {\mathopnolimits{abs}}
-\defineXMLentity [arg] {\mathopnolimits{arg}}
-\defineXMLentity [codomain] {\mathopnolimits{codomain}}
-\defineXMLentity [curl] {\mathopnolimits{curl}}
-\defineXMLentity [determinant] {\mathopnolimits{det}}
-\defineXMLentity [divergence] {\mathopnolimits{div}}
-\defineXMLentity [domain] {\mathopnolimits{domain}}
-\defineXMLentity [false] {\mathopnolimits{false}}
-\defineXMLentity [gcd] {\mathopnolimits{gcd}}
-\defineXMLentity [grad] {\mathopnolimits{grad}}
-\defineXMLentity [identity] {\mathopnolimits{id}}
-\defineXMLentity [image] {\mathopnolimits{image}}
-\defineXMLentity [lcm] {\mathopnolimits{lcm}}
-\defineXMLentity [max] {\mathopnolimits{max}}
-\defineXMLentity [median] {\mathopnolimits{median}}
-\defineXMLentity [min] {\mathopnolimits{min}}
-\defineXMLentity [mode] {\mathopnolimits{mode}}
-\defineXMLentity [mod] {\mathopnolimits{mod}}
-\defineXMLentity [notanumber] {\mathopnolimits{NaN}}
-\defineXMLentity [otherwise] {\mathopnolimits{otherwise}}
-\defineXMLentity [true] {\mathopnolimits{true}}
-\defineXMLentity [declare] {\mathopnolimits{declare}}
-\defineXMLentity [as] {\mathopnolimits{as}}
-\defineXMLentity [polar] {\mathopnolimits{Polar}}
-
-\defineXMLentity [mathematicald] {d}
-
-\defineXMLentity [imaginaryi] {{\rm i}}
-\defineXMLentity [differentiald] {\partial}
-\defineXMLentity [exponentiale] {{\rm e}}
-\defineXMLentity [capitaldifferentiald] {D}
-
-\defineXMLentity [ii] {\getXMLentity{imaginaryi}}
-\defineXMLentity [dd] {\getXMLentity{differentiald}}
-\defineXMLentity [ee] {\getXMLentity{exponentiale}}
-\defineXMLentity [DD] {\getMMLentity{capitaldifferentiald}}
-
-\defineXMLentity [ImaginaryI] {\getXMLentity{imaginaryi}}
-\defineXMLentity [DifferentialD] {\getXMLentity{differentiald}}
-\defineXMLentity [ExponentialE] {\getXMLentity{exponentiale}}
-\defineXMLentity [CapitalDifferentialD] {\getXMLentity{differentiald}}
-
-\defineXMLentity [NaN] {\getXMLentity{notanumber}}
-\defineXMLentity [NotANumber] {\getXMLentity{notanumber}}
-
-\defineXMLentity [and] {\wedge}
-\defineXMLentity [exists] {\exists}
-\defineXMLentity [forall] {\forall}
-\defineXMLentity [implies] {\Rightarrow}
-\defineXMLentity [not] {\neg}
-\defineXMLentity [or] {\vee}
-\defineXMLentity [xor] {\mathopnolimits{xor}}
-
-\defineXMLentity [imaginary] {\Im}
-\defineXMLentity [real] {\Re}
-
-\defineXMLentity [lceiling] {\lceil}
-\defineXMLentity [rceiling] {\rceil}
-
-\defineXMLentity [lfloor] {\lfloor}
-\defineXMLentity [rfloor] {\rfloor}
-
-\defineXMLentity [ne] {\neq}
-\defineXMLentity [neq] {\neq}
-\defineXMLentity [gt] {>}
-\defineXMLentity [lt] {<}
-\defineXMLentity [ge] {\geq}
-\defineXMLentity [geq] {\geq}
-\defineXMLentity [le] {\leq}
-\defineXMLentity [leq] {\leq}
-
-\defineXMLentity [equivalent] {\equiv}
-\defineXMLentity [equiv] {\equiv}
-\defineXMLentity [approx] {\approx}
-
-\defineXMLentity [factorof] {\mid}
-\defineXMLentity [mapsto] {\mapsto}
-
-\defineXMLentity [int] {\int}
-\defineXMLentity [prime] {\prime}
-\defineXMLentity [laplacian] {\nabla^2}
-\defineXMLentity [partial] {\partial}
-
-\defineXMLentity [union] {\cup}
-\defineXMLentity [intersect] {\cap}
-\defineXMLentity [in] {\in}
-\defineXMLentity [notin] {\not\in}
-\defineXMLentity [subset] {\subset}
-\defineXMLentity [prsubset] {\subseteq}
-\defineXMLentity [notsubset] {\not\subset}
-\defineXMLentity [notprsubset] {\not\subseteq}
-\defineXMLentity [setdiff] {\setminus}
-
-\defineXMLentity [card] {\vert}
-\defineXMLentity [cartesianproduct] {\times}
-
-\defineXMLentity [sum] {\sum}
-\defineXMLentity [prod] {\prod}
-\defineXMLentity [product] {\prod}
-\defineXMLentity [lim] {\lim}
-
-\defineXMLentity [exp] {\mathopnolimits{exp}} % {\exp}
-\defineXMLentity [ln] {\mathopnolimits{ln}} % {\ln}
-\defineXMLentity [log] {\mathopnolimits{log}} % {\log}
-
-\defineXMLentity [sin] {\mathopnolimits{sin}}
-\defineXMLentity [arcsin] {\mathopnolimits{arcsin}}
-\defineXMLentity [sinh] {\mathopnolimits{sinh}}
-\defineXMLentity [arcsinh] {\mathopnolimits{arcsinh}}
-\defineXMLentity [cos] {\mathopnolimits{cos}}
-\defineXMLentity [arccos] {\mathopnolimits{arccos}}
-\defineXMLentity [cosh] {\mathopnolimits{cosh}}
-\defineXMLentity [arccosh] {\mathopnolimits{arccosh}}
-\defineXMLentity [tan] {\mathopnolimits{tan}}
-\defineXMLentity [arctan] {\mathopnolimits{arctan}}
-\defineXMLentity [tanh] {\mathopnolimits{tanh}}
-\defineXMLentity [arctanh] {\mathopnolimits{arctanh}}
-\defineXMLentity [cot] {\mathopnolimits{cot}}
-\defineXMLentity [arccot] {\mathopnolimits{arccot}}
-\defineXMLentity [coth] {\mathopnolimits{coth}}
-\defineXMLentity [arccoth] {\mathopnolimits{arccoth}}
-\defineXMLentity [csc] {\mathopnolimits{csc}}
-\defineXMLentity [arccsc] {\mathopnolimits{arccsc}}
-\defineXMLentity [csch] {\mathopnolimits{csch}}
-\defineXMLentity [arccsch] {\mathopnolimits{arccsch}}
-\defineXMLentity [sec] {\mathopnolimits{sec}}
-\defineXMLentity [arcsec] {\mathopnolimits{arcsec}}
-\defineXMLentity [sech] {\mathopnolimits{sech}}
-\defineXMLentity [arcsech] {\mathopnolimits{arcsech}}
-
-\defineXMLentity [transpose] {^{\rm T}}
-
-\defineXMLentity [plusminus] {\mathematics{\pm}}
-\defineXMLentity [minusplus] {\mathematics{\mp}}
-
-\defineXMLentity [vectorproduct] {\times}
-\defineXMLentity [scalarproduct] {\cdot}
-\defineXMLentity [outerproduct] {\otimes}
-
-\defineXMLentity [integers] {\integers}
-\defineXMLentity [reals] {\reals}
-\defineXMLentity [rationals] {\rationals}
-\defineXMLentity [naturalnumbers] {\naturalnumbers}
-\defineXMLentity [complexes] {\complexes}
-\defineXMLentity [primes] {\primes}
-
-\defineXMLentity [emptyset] {\emptyset}
-\defineXMLentity [pi] {\pi}
-\defineXMLentity [eulergamma] {\gamma}
-\defineXMLentity [infinity] {\mathematics{\infty}}
-
-\defineXMLentity [InvisibleTimes] {}
-\defineXMLentity [InvisibleComma] {}
-\defineXMLentity [ApplyFunction] {}
-
-\defineXMLentity [it] {\getXMLentity{InvisibleTines}}
-\defineXMLentity [ic] {\getXMLentity{InvisibleComma}}
-\defineXMLentity [af] {\getXMLentity{ApplyFunction}}
-
-\defineXMLentity [PlusMinus] {\getXMLentity{plusminus}}
-
-\defineXMLentity [infin] {\getXMLentity{infinity}}
-\defineXMLentity [infty] {\getXMLentity{infinity}}
-\defineXMLentity [part] {\getXMLentity{differentiald}}
-
-\defineXMLentity [RightArrow] {\normalorfiller\rightarrow\rightarrowfill}
-\defineXMLentity [LeftArrow] {\normalorfiller\leftarrow\leftarrowfill}
-\defineXMLentity [UnderBrace] {\normalorfiller\empty\upbracefill}
-\defineXMLentity [OverBrace] {\normalorfiller\empty\downbracefill}
-\defineXMLentity [UnderBar] {\normalorfiller\hrule\hrulefill}
-\defineXMLentity [OverBar] {\normalorfiller\hrule\hrulefill}
-\defineXMLentity [Hat] {\normalorfiller\empty\empty} % todo
-
-\defineXMLentity [downarrow] {\mathortext\downarrow\empty}
-\defineXMLentity [uparrow] {\mathortext\uparrow\empty}
-
-\defineXMLentity [Tab] {\hskip4em}
-\defineXMLentity [NewLine] {\mathortext\empty\crlf}
-\defineXMLentity [IndentingNewLine] {\mathortext\empty\crlf}
-
-\defineXMLentity [NoBreak] {\nobreak}
-\defineXMLentity [GoodBreak] {\goodbreak}
-\defineXMLentity [BadBreak] {\nobreak}
-
-\defineXMLentity [Space] {\getXMLentity{MediumSpace}}
-\defineXMLentity [NonBreakingSpace] {\getXMLentity{MediumSpace}}
-\defineXMLentity [ZeroWidthSpace] {}
-
-\def\somespaceentity#1#2%
- {\mathortext
- {\mskip#1mu}
- {\ifvmode\dontleavehmode\else\unskip\fi\hskip#2em\strut\hskip\zeropoint\ignorespaces}%
- \relax}
-
-\defineXMLentity [VeryThinSpace] {\somespaceentity {2}{.125}}
-\defineXMLentity [ThinSpace] {\somespaceentity {3}{.25}}
-\defineXMLentity [MediumSpace] {\somespaceentity {4}{.5}}
-\defineXMLentity [ThickSpace] {\somespaceentity {5}{1}}
-\defineXMLentity [NegativeVeryThinSpace] {\somespaceentity{-2}{-.125}}
-\defineXMLentity [NegativeThinSpace] {\somespaceentity{-3}{-.25}}
-\defineXMLentity [NegativeMediumSpace] {\somespaceentity{-4}{-.5}}
-\defineXMLentity [NegativeThickSpace] {\somespaceentity{-5}{-1}}
-
-\defineXMLentity [NegVeryThinSpace] {\getXMLentity{NegativeVeryThinSpace}}
-\defineXMLentity [NegThinSpace] {\getXMLentity{NegativeThinSpace}}
-\defineXMLentity [NegMediumSpace] {\getXMLentity{NegativeMediumSpace}}
-\defineXMLentity [NegThickSpace] {\getXMLentity{NegativeThickSpace}}
-
-\defineXMLentity [nbsp] {\getXMLentity{NonBreakingSpace}}
-\defineXMLentity [thinsp] {\getXMLentity{ThinSpace}}
-\defineXMLentity [medsp] {\getXMLentity{MediumSpace}}
-\defineXMLentity [thicksp] {\getXMLentity{ThickSpace}}
-
-\defineXMLentity [larr] {\getXMLentity{LeftArrow}}
-\defineXMLentity [rarr] {\getXMLentity{RightArrow}}
-
-\ifx\MMLleft \undefined \let\MMLleft \firstofoneargument \fi
-\ifx\MMLright\undefined \let\MMLright\firstofoneargument \fi
-
-\defineXMLentity [lbrace] {\normalordelimiter{\{}{\MMLleft \{}}
-\defineXMLentity [rbrace] {\normalordelimiter{\}}{\MMLright\}}}
-\defineXMLentity [lbracket] {\normalordelimiter{[}{\MMLleft [}}
-\defineXMLentity [rbracket] {\normalordelimiter{]}{\MMLright]}}
-\defineXMLentity [lparenthesis] {\normalordelimiter{(}{\MMLleft (}}
-\defineXMLentity [rparenthesis] {\normalordelimiter{)}{\MMLright)}}
-\defineXMLentity [langle] {\normalordelimiter{\langle}{\MMLleft \langle}}
-\defineXMLentity [rangle] {\normalordelimiter{\rangle}{\MMLright\rangle}}
-
-\defineXMLentity [lang] {\getXMLentity{langle}}
-\defineXMLentity [rang] {\getXMLentity{rangle}}
-\defineXMLentity [lbrack] {\getXMLentity{lbracket}}
-\defineXMLentity [rbrack] {\getXMLentity{rbracket}}
-\defineXMLentity [lparent] {\getXMLentity{lparenthesis}}
-\defineXMLentity [rparent] {\getXMLentity{rparenthesis}}
-
-\defineXMLentity [\letterleftbrace ] {\getXMLentity{lbrace}}
-\defineXMLentity [\letterrightbrace] {\getXMLentity{rbrace}}
-
-\defineXMLentity [{[}] {\getXMLentity{lbracket}}
-\defineXMLentity [{]}] {\getXMLentity{rbracket}}
-\defineXMLentity [{(}] {\getXMLentity{lparenthesis}}
-\defineXMLentity [{)}] {\getXMLentity{rparenthesis}}
-
-
-\defineXMLentity [times] {\mathematics{\times}}
-\defineXMLentity [minus] {\mathematics{-}}
-\defineXMLentity [plus] {\mathematics{+}}
-\defineXMLentity [plusmn] {\mathematics{\pm}}
-
-\defineXMLentity [nabla] {\nabla}
-
-\def\myspecialnormalvert {\mathematics{\vert}}
-\def\myspecialstretchvert{\;\vrule\;}
-
-\defineXMLentity [,] {{,}}
-\defineXMLentity [.] {{.}}
-\defineXMLentity [+] {+}
-\defineXMLentity [-] {-}
-\defineXMLentity [|] {\myspecialnormalvert}
-\defineXMLentity [/] {/}
-\defineXMLentity [*] {\times}
-\defineXMLentity [=] {=}
-
-% \defineXMLentity [(] {(}
-% \defineXMLentity [)] {)}
-% \defineXMLentity [<] {\mathematics{<}}
-% \defineXMLentity [>] {\mathematics{>}}
-
-% \defineXMLentity [(] {\MMLleft (}
-% \defineXMLentity [)] {\MMLright)}
-
-% \defineXMLentity [{[}] {\MMLleft [}
-% \defineXMLentity [{]}] {\MMLright]}
-
-\defineXMLentity [++] {++}
-\defineXMLentity [--] {--}
-\defineXMLentity [//] {//}
-\defineXMLentity [**] {\times\times}
-\defineXMLentity [==] {==}
-\defineXMLentity [...] {\cdots}
-
-\defineXMLentity [quot] {"}
-
-\defineXMLentity [triangle] {\mathematics\triangle}
-\defineXMLentity [otimes] {\mathematics\otimes}
-\defineXMLentity [oplus] {\mathematics\oplus}
-\defineXMLentity [cup] {\mathematics\cup}
-\defineXMLentity [cap] {\mathematics\cap}
-\defineXMLentity [sdot] {\mathematics\cdot}
-\defineXMLentity [dot] {\mathematics\cdot}
-\defineXMLentity [sim] {\mathematics\sim}
-\defineXMLentity [circ] {\mathematics\circ}
-\defineXMLentity [dagger] {\mathematics\dagger}
-\defineXMLentity [cdots] {\mathematics\cdots}
-
-\defineXMLentity [...] {\getXMLentity{cdots}}
-\defineXMLentity [continued] {\getXMLentity{cdots}}
-
-\defineXMLentity [sub] {\getXMLentity{subset}}
-\defineXMLentity [sube] {\getXMLentity{prsubset}}
-\defineXMLentity [notprsubset] {\getXMLentity{notprsubset}}
-
-\defineXMLentity [ndash] {\endash}
-\defineXMLentity [mdash] {\emdash}
-
-\defineXMLentity [tex-bar] {\mathematics{\vert}}
-\defineXMLentity [tex-dollar] {\dollar}
-\defineXMLentity [tex-backslash] {\backslash}
-\defineXMLentity [tex-leftbrace] {\mathematics{\{}}
-\defineXMLentity [tex-rightbrace] {\mathematics{\}}}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/x-newmml.mkii b/Master/texmf-dist/tex/context/base/x-newmml.mkii
deleted file mode 100644
index e777edca11c..00000000000
--- a/Master/texmf-dist/tex/context/base/x-newmml.mkii
+++ /dev/null
@@ -1,2744 +0,0 @@
-%D \module
-%D [ file=x-newmml,
-%D version=2005.06.10, % 1999.12.20,
-%D title=\CONTEXT\ XML Macros,
-%D subtitle=MathML,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Remark: from now on this is a module and no longer an xtag
-%D filter. In due time it will replace the older renderer (which
-%D we will keep around for sentimental reasons). This variant has
-%D no namespace support yet, but eventually we will use a \MKIV\
-%D version.
-
-\useXMLfilter[stk]
-
-\ifx\inlinemathematics\undefined
- \def\inlinemathematics {\dontleavehmode\mathematics} % already in kernel
- \long\def\inlinemath #1{\dontleavehmode\relax\ifmmode#1\else $#1$\fi}
-\fi
-
-% \defineXMLentity[x000AF]{\normalorfiller{x}\hrulefill}
-% CHECK FOR: \xmlrent
-% \enablemathpunctuation
-
-%D Then we start defining the rendering macros:
-
-\writestatus{loading}{ConTeXt XML Macros / MathML}
-
-\startmodule [mathml]
-
-%D First we load the entities:
-
-\usemodule[newmme]
-
-% \setupmodule[a=c]
-% \setupmodule[a=c]
-
-\unprotect
-
-\def\MMLrm{\mr}
-
-\def\MMLseparator#1{{#1}} % nils space after separator
-
-%D First we define some general formula elements.
-
-\defineXMLenvironment [formula] [label=,sublabel=]
- {\dostartXMLformula\placeformula}
- {\dostopXMLformula}
-
-\defineXMLenvironment [subformula] [label=,sublabel=]
- {\dostartXMLformula\placesubformula}
- {\dostopXMLformula}
-
-\def\dostartXMLformula#1%
- {\doifelsenothingXMLop{label}
- {\startformula}
- {\expanded{#1[\XMLop{label}]{\XMLop{sublabel}}}\startformula}}
-
-\def\dostopXMLformula
- {\stopformula}
-
-%D Since I only had the draft of MathML 2 as example of
-%D rendering, there are probably a lot of omissions and
-%D misinterpretations. At least I learned some bits and
-%D pieces of math rendering.
-%D
-%D The main complications were not so much the math, but to
-%D find the most efficient way to handle elements without
-%D spacing beging messed up. The first implementation was
-%D aimed at getting reasonable output, this second
-%D implementation is already better in terms of handling
-%D nesting, and I will definitely need a third one that has
-%D more efficient and less ugly code.
-%D
-%D The \TEX\ part is not that complicated and once the
-%D preprocessor was okay, the rest way just a lot of keying
-%D and testing. It all comes down to gobbling, redefining,
-%D and not so much to parsing.
-%D
-%D The second implementation expanded the whole math sequence
-%D into an internal \TEX\ representation. This is a rather clean
-%D and fast process. Filtering and testing takes place by
-%D redefining the internal representation macros.
-%D
-%D The third implementation may look a bit more messy in some
-%D respects. This is because in \TEX\ it's not that trivial to
-%D implement a tree handler. We use a stack for the \type {apply}
-%D element and other sequential content. Occasionally we need to
-%D peek into child elements which involves messy code. This
-%D implementation is closer to the normal \XML\ handling in
-%D \CONTEXT.
-
-%D We start with the parent elements and the option handler.
-
-\defineXMLdirective [mathml] \setupMMLappearance
-
-\defineXMLargument [math] \automathematics
-\defineXMLargument [imath] \inlinemathematics
-\defineXMLargument [dmath] \displaymathematics
-\defineXMLargument [m] \inlinemathematics
-
-%D In the styles, options can be set with:
-
-\def\setupMMLappearance[#1]{\dodoubleargument\getparameters[@@MML#1]}
-
-\def\startusingMMLarguments % optional maken
- {\begingroup
- %\expandXMLta % expand entities first
- \getXMLta}
-
-\def\stopusingMMLarguments % optional maken
- {\endgroup}
-
-\def\MMLargumentprefix{@@MML\currentXMLelement}
-
-%D We will apply inner math to all bits and pieces made up by an
-%D \type {apply}.
-
-\def\MMLmathinner
- {\ifinner \expandafter \firstofoneargument \else \expandafter \mathinner \fi}
-
-%D A few math related macros:
-
-\let\MMLctempresetlist\empty \def\setMMLcreset{\edef\MMLctempresetlist}
-
-\newcount\MMLapplydepth \def\MMLcreset{\MMLapplydepth\zerocount}
-
-% Stack handler
-
-\startXMLmapping[xmlstack:test]
-
- \defineXMLnested
- [apply]
- {\startsavingXMLelements}
- {\stopsavingXMLelements}
-
-\stopXMLmapping
-
-%D Auxiliary MathML macros: (to be generalized)
-
-\def\doifelseMMCfunction
- {\begingroup
- \XMLdoifonstackelse{fn}
- {\donetrue}
- {\XMLdoifonstackelse{apply}
- {\defXMLfirstnamedtext\ascii{apply}%
- \startsavingXMLelements % best use a substack so that we do not need to \edef
- \ascii
- \stopsavingXMLelements}
- {}%
- \XMLdoifonstackelse{fn}
- {\donetrue}
- {\defineXMLsave[ci][type=]%
- \XMLfirstnamed{ci}%
- \doifelse{\XMLpar{ci}{type}{}}{fn}
- {\donetrue}
- {\donefalse}}}%
- \ifdone
- \endgroup\expandafter\firstoftwoarguments
- \else
- \endgroup\expandafter\secondoftwoarguments
- \fi}
-
-\def\doifelseMMCfunctioninapply#1#2% grouped
- {\begingroup
- \startXMLmapping[xmlstack:test]% take fast alternative
- \getXMLstackdata{#1}%
- \expanded{\doifinsetelse{\getXMLstackname\plusone}{#2}}
- {\stopXMLmapping
- \endgroup\firstoftwoarguments }
- {\stopXMLmapping
- \endgroup\secondoftwoarguments}}
-
-\def\dodoifelseMMCfunctioninapply#1#2%
- {\startXMLmapping[xmlstack:test]% take fast alternative
- \getXMLstackdata{#1}%
- \expanded{\doifinsetelse{\getXMLstackname\plusone}{#2}}
- {\stopXMLmapping
- \firstoftwoarguments }
- {\stopXMLmapping
- \secondoftwoarguments}}
-
-%D Special features:
-
-\newtoks \@@postponedMMLactions \setfalse \somepostponedMMLactions
-
-\def\postponeMMLactions#1%
- {\global\settrue\somepostponedMMLactions
- \global\@@postponedMMLactions\expandafter{\the\@@postponedMMLactions#1}}
-
-\def\postponedMMLactions
- {\global\setfalse\somepostponedMMLactions
- \@EA\global\@EA\@@postponedMMLactions\@EA\emptytoks
- \the\@@postponedMMLactions}
-
-%D A couple of lists:
-
-\def\MMLcmainresetlist
- {times,divide,power,%
- lt,gt,eq,leq,geq,%
- in,inverse,%
- fn,%
- floor,ceiling,%
- mean,%
- selector,%
- abs,int,limit,sum,product,%
- outerproduct,innerproduct,scalarproduct}
-
-\def\MMLcfunctionlist
- {sin,arcsin,sinh,arcsinh,%
- cos,arccos,cosh,arccosh,%
- tan,arctan,tanh,arctanh,%
- cot,arccot,coth,arccoth,%
- csc,arccsc,csch,arccsch,%
- sec,arcsec,sech,arcsech,%
- ln,exp,log,%
- abs,int,limit,sum,product,%
- fn} % ?
-
-\def\MMLcconstructlist
- {diff,partialdiff,root} % apply goes wrong on 1/2 * (a_2 + b_3)
-
-% apply
-%
-%D We use inner and grouping (begin/end and no b/e) else we
-%D get problems with 1/2(1+2) and alike (todo: ask taco).
-%D
-%D The problem with apply is that we need to take care of
-%D several situations, like:
-%D
-%D \starttyping
-%D <apply> <.../> ...
-%D <apply> <fn> ...
-%D <apply> <apply> <ci> ...
-%D <apply> <apply> <fn> <ci> ...
-%D \stoptyping
-%D
-%D Because we translated version 2 of this renderer into
-%D version 3 the following definitions may be sub optimal or
-%D more complex than actually needed.
-
-\defineXMLnested % why nested? could be just an environment
- [apply]
- [open=,close=]
- {\setups{mmc:apply:start}}
- {\setups{mmc:apply:stop}}
-
-\startsetups mmc:apply:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmc:apply:stop
- \stopsavingXMLelements
- \MMLmathinner {
- \expanded{\doifinsetelse{\getXMLstackname\plusone}{\MMLcmainresetlist,\MMLctempresetlist}}
- \MMLcreset
- \donothing
- \ifcase\MMLapplydepth \else
- \doifXMLparelse{apply}{open} \donothing{\getXMLarguments{apply}{open="("}}% slow
- \doifXMLparelse{apply}{close}\donothing{\getXMLarguments{apply}{close=")"}}% slow
- \fi
- \doifXMLparelse{apply}{open}{\left\XMLpar{apply}{open}{}}\donothing
- \advance\MMLapplydepth\plusone
- \begingroup
- \let\MMLctempresetlist\empty
- \doifelse {\getXMLstackname\plusone} {apply} {
- % <apply> <apply> ... </apply> <ci> .. </ci> </apply>
- \doifelseMMCfunctioninapply \plusone {plus,minus} {
- % yet incomplete and rather untested
- % <apply> <apply> <minus/> <tan/> <cos/> </apply> <ci>x</ci> </apply>
- } {
- \MMLcreset
- }
- \getXMLstackdata\plusone
- \ifconditional\somepostponedMMLactions
- \postponedMMLactions
- \else
- \left(\MMLcreset\getXMLstackdata\plustwo\right)
- \fi
- } {
- \doifelse {\getXMLstackname\plusone} {fn} {
- % also postpone
- \directsetup{mmc:fn:apply}
- } {
- \doifelse {\getXMLstackname\plusone} {csymbol} {
- % also postpone
- \directsetup{mmc:csymbol:apply}
- } {
- \doifelse {\getXMLstackname\plusone} {ci} {
- \getXMLstackdata\plusone
- \ifnum\XMLstacklevel>\plusone
- \left(\MMLcreset\flushXMLstackwith\plustwo{\MMLseparator,}\right)
- \fi
- } {
- \getXMLstackdata\plusone
- }
- }
- }
- }
- \endgroup
- \advance\MMLapplydepth\minusone
- \directsetup{apply:flush}
- \doifXMLparelse{apply}{close}{\right\XMLpar{apply}{close}{}}\donothing
- }
- \endgroup
-\stopsetups
-
-\startsetups apply:flush
-\relax
- \ifcase\MMLapplydepth
- \ifconditional\somepostponedMMLactions
- \postponedMMLactions
- \ifx\MMLpowerelement\empty\else
- ^{\MMLcreset\MMLpowerelement\empty}
- \global\let\MMLpowerelement\empty
- \fi
- \fi
- \fi
-\stopsetups
-
-% reln
-
-\defineXMLnestedenvironmentsave [reln]
- {\writestatus{XML}{MathML element "reln" is obsolete}}
- {}
-
-% fn
-
-\startsetups mmc:fn:plusminus
- \ifnum\XMLstacklevel>\plustwo
- \MMLcreset
- \left(\expandafter\flushXMLstackwith\expandafter\plustwo\expandafter{\XMLfnoperator}\right)
- \else
- \getXMLstackdata\plustwo
- \fi
-\stopsetups
-
-\startsetups mmc:fn:minusplus
- \directsetup{mmc:fn:plusminus}
-\stopsetups
-
-\defineXMLnested
- [fn]
- {\directsetup{mmc:fn:start}}
- {\directsetup{mmc:fn:stop}}
-
-\startsetups mmc:fn:apply
- \begingroup
- \startsavingXMLelements
- \rawXMLstacktext\plusone % still on stack, no check, just fn content
- \stopsavingXMLelements
- \doifelse {\getXMLstackname\plusone} {ci} {
- \flattenXMLcontent{\getXMLstackdata\plusone}
- \doifsetupselse{mmc:fn:\flattenedXMLcontent} {
- \global\defXMLstackdata\XMLfnoperator\plusone
- \expanded{\endgroup\noexpand\directsetup{mmc:fn:\flattenedXMLcontent}}
- } {
- \endgroup
- \MMLcreset
- \getXMLstackdata\plusone
- \ifnum\XMLstacklevel>\plusone
- \getXMLentity{NegThinSpace}
- \left(\MMLcreset\flushXMLstackwith\plustwo{\MMLseparator,}\right)
- \fi
- }
- } {
- \endgroup
- \MMLcreset
- \getXMLstackdata\plusone
- }
-\stopsetups
-
-\startsetups mmc:fn:start
- \ifnum\XMLstacklevel>\plustwo
- \def\MMCfnleft {\left(}
- \def\MMCfnright{\right)}
- \else
- \let\MMCfnleft \relax
- \let\MMCfnright\relax
- \fi
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmc:fn:stop
- \stopsavingXMLelements
- \doifelse {\getXMLstackname\plusone} {ci} {
- \flattenXMLcontent{\getXMLstackdata\plusone}
- \doifsetupselse{mmc:fn:\flattenedXMLcontent} {
- \global\defXMLstackdata\XMLfnoperator\plusone
- \directsetup{mmc:fn:\flattenedXMLcontent}
- } {
- \MMLcreset
- \getXMLstackdata\plusone
- }
- \endgroup
- } {
- \doifelse {\getXMLstackname\plusone} {apply} {
- \doifelseMMCfunctioninapply \plusone {plus,minus} {
- \left(
- \getXMLstackdata\plusone
- \right)
- } {
- \getXMLstackdata\plusone
- }
- \endgroup
- \ifnum\XMLstacklevel>\plusone
- \left(
- \getXMLstackdata\plustwo
- \right)
- \fi
- } {
- \MMLcreset
- \getXMLentity{NegThinSpace}
- \MMCfnleft
- \ifnum\XMLstacklevel=\plustwo\MMLccomma\fi
- \flushXMLstackwith\plustwo\MMLccomma
- \MMCfnright
- \endgroup
- }
- }
-\stopsetups
-
-% c*
-
-\defineXMLargument [ci] [type=] {\XMLval{mmc:ci}{\XMLop{type}} {\firstofoneargument}}
-\defineXMLargument [cn] [type=,base=] {\XMLval{mmc:cn}{\XMLop{type}} {\firstofoneargument}}
-\defineXMLargument [csymbol] [encoding=text] {\XMLval{mmc:cs}{\XMLop{encoding}}{\firstofoneargument}}
-
-%D The next definition provide a kind of plug-in mechanism (see
-%D the open math extension module).
-
-\defineXMLsingular
- [csymbol]
- [encoding=text,
- definitionURL=]
- {\doifsomething{\XMLop{definitionURL}}{\directsetup{mmc:csymbol:apply}}}
-
-\startsetups mmc:csymbol:apply
- \begingroup
- \startsavingXMLelements
- \rawXMLstacktext\plusone % still on stack, no check, just attr test
- \stopsavingXMLelements
- % http://www.publishers.com/SomeName
- \lowercasestring\XMLpar{csymbol}{definitionURL}{}\to\mmcSymbolURL
- \doifsetupselse{mmc:csymbol:} {\mmcSymbolURL} {
- \expanded{\endgroup\noexpand\directsetup{mmc:csymbol:\mmcSymbolURL}}
- } {
- % SomeName (fallback)
- \splitfilename{\XMLpar{csymbol}{definitionURL}{}}
- \doifsetupselse{mmc:csymbol:\splitoffbase} {
- \expanded{\endgroup\noexpand\directsetup{mmc:csymbol:\splitoffbase}}
- } {
- \endgroup
- \XMLval{mmc:cs}{\XMLop{encoding}}{\firstofoneargument}
- }
- }
-\stopsetups
-
-%D Alternative b will convert periods into comma's:
-%D
-%D \startbuffer
-%D \startXMLdata
-%D <imath><apply><cn>1.23</cn></apply></imath>
-%D <dmath><apply><cn>1.23</cn></apply></dmath>
-%D \stopXMLdata
-%D
-%D \type{\setupMMLappearance[cn] [alternative=b]}
-%D
-%D \startXMLdata
-%D <imath><apply><cn>1.23</cn></apply></imath>
-%D <dmath><apply><cn>1.23</cn></apply></dmath>
-%D \stopXMLdata
-%D \stopbuffer
-%D
-%D \start \typebuffer \getbuffer \stop
-
-\setupMMLappearance[cn] [\c!alternative=\v!a]
-
-\defineXMLargument[cn][type=,base=]{\MMLdocn}
-
-\def\MMLdocn#1%
- {\begingroup
- \doif\@@MMLcnalternative\v!b{\redefinemathcharacter [.][ord][mi]["3B]\relax}%
- \XMLval{mmc:cn}{\XMLop{type}}{\firstofoneargument}{#1}%
- \endgroup}
-
-\defineXMLsingular [sep] {\MMLcsep} \def\MMLcsep{\,}
-
-\setupMMLappearance[polar] [\c!alternative=\v!a] % a|b|c
-\setupMMLappearance[float] [\c!symbol=\v!no] % \v!yes|dot
-\setupMMLappearance[enotation][\c!symbol=\v!no] % \v!yes|dot
-\setupMMLappearance[base] [\c!symbol=\v!numbers] % digits|characters|text|no
-
-\mapXMLvalue {mmc:ci} {set} {\MMLcCIset}
-\mapXMLvalue {mmc:ci} {vector} {\MMLcCIvector}
-\mapXMLvalue {mmc:ci} {matrix} {\MMLcCImatrix}
-\mapXMLvalue {mmc:ci} {function} {\MMLcCIfunction}
-\mapXMLvalue {mmc:ci} {complex-cartesian} {\MMLccartesian}
-\mapXMLvalue {mmc:ci} {complex} {\MMLccartesian}
-\mapXMLvalue {mmc:ci} {complex-polar} {\MMLcpolar}
-\mapXMLvalue {mmc:ci} {polar} {\MMLcpolar}
-\mapXMLvalue {mmc:ci} {fn} {\MMLcCIfunction}
-
-\mapXMLvalue {mmc:cn} {integer} {\MMLcCNinteger}
-\mapXMLvalue {mmc:cn} {logical} {\MMLcCNlogical}
-\mapXMLvalue {mmc:cn} {rational} {\MMLcCNrational}
-\mapXMLvalue {mmc:cn} {complex-cartesian} {\MMLccartesian}
-\mapXMLvalue {mmc:cn} {complex} {\MMLccartesian}
-\mapXMLvalue {mmc:cn} {complex-polar} {\MMLcpolar}
-\mapXMLvalue {mmc:cn} {polar} {\MMLcpolar}
-\mapXMLvalue {mmc:cn} {e-notation} {\MMLcenotation} % new
-\mapXMLvalue {mmc:cn} {float} {\MMLcfloat} % obsolete
-\mapXMLvalue {mmc:cn} {real} {\MMLcfloat}
-
-\mapXMLvalue {mmc:cs} {text} {\MMLcCStext}
-
-\def\MMLcpolar#1%
- {\doifdefinedelse{MMLcdopolar\@@MMLpolaralternative}
- {\getvalue{MMLcdopolar\@@MMLpolaralternative}{#1}}
- {#1}}
-
-\def\MMLcdopolara#1%
- {\def\MMLcsep{\MMLseparator,}\getXMLentity{polar}\left(#1\right)}
-
-\def\MMLcdopolarb#1%
- {\def\MMLcsep##1\empty
- {\getXMLentity{exponentiale}^{##1\mskip2mu\getXMLentity{imaginaryi}}}
- #1\empty}
-
-\def\MMLcdopolarc#1%
- {\def\MMLcsep##1\empty
- {\getXMLentity{exp}\left(##1\mskip2mu\getXMLentity{imaginaryi}\right)}%
- #1\empty}
-
-\def\MMLccartesian#1%
- {\def\MMLcsep{+}#1\getXMLentity{imaginaryi}}
-
-% float will be obsolete, and is replace by e-notation
-
-\def\MMLcfloat#1%
- {\doifelse\@@MMLfloatsymbol\v!no
-% {{\MMLrm#1}}% make sure that e shows up ok
- {\mfunction{#1}}% make sure that e shows up ok
- {% we should ignore \entities !
- \beforesplitstring#1\at e\to\first
- \aftersplitstring #1\at e\to\last
- \ifx\first\empty #1\else
- \ifx\last \empty #1\else
- \first
- \doifelse\@@MMLfloatsymbol{dot}\cdot\times
- 10^{\last}%
- \fi\fi}}
-
-% we now have:
-
-\def\MMLcenotation#1%
- {\doifelse\@@MMLenotationsymbol\v!no
-% {\def\MMLcsep {\unskip{\MMLrm e}\ignorespaces}}
- {\def\MMLcsep {\unskip\mfunction{e}\ignorespaces}}
- {\def\MMLcsep##1\empty{\doifelse\@@MMLenotationsymbol{dot}\cdot\times10^{##1}}}%
- #1\empty}
-
-\def\MMLcCIset#1%
- {{\bbd#1}}
-
-\def\widevec#1%
- {\vbox{\mathsurround\zeropoint\ialign{##\crcr
- \rightarrowfill\crcr\noalign{\nointerlineskip}%
- $\hfil\displaystyle{#1}\hfil$\crcr}}}
-
-\def\MMLcCIvector#1%
- {\widevec{#1}}
-
-\def\MMLcCImatrix#1%
- {{\bi#1}}
-
-\def\MMLcCIfunction#1%
- {#1\getXMLentity{NegThinSpace}}
-
-\def\MMLcCNinteger#1%
- {\doifXMLparelse{cn}{base}
- {\def\MMLcCNbase{\XMLpar{cn}{base}{}}%
- \doifelse\@@MMLbasesymbol\v!no
- {\MMLcCNbasedata{#1}}
-% {\MMLcCNbasedata{#1}_{\hbox{$\MMLrm\scriptscriptstyle
- {\MMLcCNbasedata{#1}_{\mfunction{%
- \processaction
- [\@@MMLbasesymbol]
- [\v!characters=>\MMLcCNbasestring BODH,
- \v!text=>\MMLcCNbasestring{BIN}{OCT}{DEC}{HEX},
-% \s!unknown=>\MMLcCNbase]$}}}}
- \s!unknown=>\MMLcCNbase]}}}}
- {#1}}
-
-\def\MMLcCNbasedata#1%
-% {\ifnum\MMLcCNbase>10{\MMLrm#1}\else#1\fi}
- {\ifnum\MMLcCNbase>10\mfunction{#1}\else#1\fi}
-
-\def\MMLcCNbasestring#1#2#3#4%
- {\ifnum\MMLcCNbase= 2 #1\else
- \ifnum\MMLcCNbase= 8 #2\else
- \ifnum\MMLcCNbase=10 #3\else
- \ifnum\MMLcCNbase=16 #4\else
- \MMLcCNbase \fi\fi\fi\fi}
-
-\def\MMLcCNlogical#1%
-% {{\MMLrm#1}}
- {\mfunction{#1}}
-
-\bgroup \catcode`\<=\active
-
- % quick and dirty, best track the stack (todo)
-
- \gdef\MMLcCNrational#1%
- {\ConvertConstantAfter\doifinstringelse{sep}{#1}
- {\doMMLcCNrational#1\empty}
- {#1}}
-
- \gdef\doMMLcCNrational#1<sep#2>#3\empty
- {\hbox{$\frac{#1}{#3}$}}
-
-\egroup
-
-\def\MMLcCStext#1%
-% {{\MMLrm#1}}
- {\mfunction{#1}}
-
-% interval
-
-\defineXMLnested [interval]
- [closure=closed]
- {\directsetup{mmc:interval:start}}
- {\directsetup{mmc:interval:stop}}
-
-\startsetups mmc:interval:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmc:interval:stop
- \stopsavingXMLelements
- \XMLval{mmc:int}{\XMLpar{interval}{closure}{closed}}{error}
- \endgroup
-\stopsetups
-
-\startsetups mmc:interval:fetch
- \defineXMLnested [interval]
- [closure=closed]
- {\directsetup{mmc:interval:fetch:start}}
- {\directsetup{mmc:interval:fetch:stop}}
-\stopsetups
-
-\startsetups mmc:interval:fetch:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmc:interval:fetch:stop
- \stopsavingXMLelements
- \globallet\MMCintervalfrom\empty
- \globallet\MMCintervalto \empty
- \ifcase\XMLstacklevel
- \or
- \xdef\MMCintervalfrom{\getXMLstackdata\plusone}
- \or
- \xdef\MMCintervalfrom{\getXMLstackdata\plusone}
- \xdef\MMCintervalto {\getXMLstackdata\plustwo}
- \fi
- \endgroup
-\stopsetups
-
-\setupMMLappearance[interval][\c!alternative=\v!a,\c!separator={,}]
-
-\mapXMLvalue {mmc:int} {closed}
- {\left[\getXMLstackdata\plusone\MMLseparator\@@MMLintervalseparator\getXMLstackdata\plustwo\right]}
-
-\mapXMLvalue {mmc:int} {open-closed}
- {\doifelse\@@MMLintervalalternative\v!b
- {\left<\getXMLstackdata\plusone\MMLseparator\@@MMLintervalseparator\getXMLstackdata\plustwo\right]}
- {\left(\getXMLstackdata\plusone\MMLseparator\@@MMLintervalseparator\getXMLstackdata\plustwo\right]}}
-
-\mapXMLvalue {mmc:int} {closed-open}
- {\doifelse\@@MMLintervalalternative\v!b
- {\left[\getXMLstackdata\plusone\MMLseparator\@@MMLintervalseparator\getXMLstackdata\plustwo\right>}
- {\left[\getXMLstackdata\plusone\MMLseparator\@@MMLintervalseparator\getXMLstackdata\plustwo\right)}}
-
-\mapXMLvalue {mmc:int} {open}
- {\doifelse\@@MMLintervalalternative\v!b
- {\left<\getXMLstackdata\plusone\MMLseparator\@@MMLintervalseparator\getXMLstackdata\plustwo\right>}
- {\left(\getXMLstackdata\plusone\MMLseparator\@@MMLintervalseparator\getXMLstackdata\plustwo\right)}}
-
-% inverse
-
-\defineXMLcommand [inverse] {\directsetup{mmc:inverse}}
-
-\startsetups mmc:inverse
- \ifnum\XMLstacklevel>\plustwo
- \getXMLentity{\getXMLstackname\plustwo}^{-1}
- \left[\getXMLstackdata\plusthree\right]
- \else
- \xdef\MMLpowerelement{-1}
- \expanded{\postponeMMLactions{\rawXMLstackdata\plustwo}}
- \eraseXMLdataonstack\plustwo
- \fi
-\stopsetups
-
-% condition
-
-\defineXMLnested
- [condition]
- {\directsetup{mmc:condition:start}}
- {\directsetup{mmc:condition:stop}}
-
-\startsetups mmc:condition:start
-% \XMLdoifonstackelse{bvar} {
-% \XMLfirstnamed{bvar}\mid
-% } { }
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmc:condition:stop
- \stopsavingXMLelements
- \flushXMLstackfrom\plusone
- \endgroup
-\stopsetups
-
-% declare
-
-\setupMMLappearance[declare][\c!state=\v!start]
-
-\defineXMLnested
- [declare]
- {\directsetup{mmc:declare:start}}
- {\directsetup{mmc:declare:stop}}
-
-\startsetups mmc:declare:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmc:declare:stop
- \stopsavingXMLelements
- \doif\@@MMLdeclarestate\v!start {
- \getXMLentity{declare}\getXMLstackdata\plusone
- \ifnum\XMLstacklevel>\plusone
- \getXMLentity{ThickSpace}
- \getXMLentity{as}
- \getXMLentity{ThickSpace}
- \fi
- \getXMLstackdata\plustwo
- }
- \endgroup
-\stopsetups
-
-% lambda
-
-\setupMMLappearance[lambda][\c!alternative=b]
-
-\defineXMLnested
- [lambda]
- {\directsetup{mmc:lambda:start}}
- {\directsetup{mmc:lambda:stop}}
-
-\startsetups mmc:lambda:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmc:lambda:stop
- \stopsavingXMLelements
- \doifelse\@@MMLlambdaalternative\v!a {
- \getXMLentity{lambda}(\flushXMLstackwith\plusone{\MMLseparator,})
- } {
- \countXMLnamedstack{bvar}
- \ifnum\scratchcounter>\plusone
- \left(\flushXMLnamedstackwith\plusone{bvar}{\MMLseparator,}\right)
- \else
- \XMLfirstnamed{bvar}
- \fi
- \getXMLentity{mapsto}
- \MMLcreset
- \XMLfirstnamed{apply,reln,ci,cn}
- }
- \endgroup
-\stopsetups
-
-\startsetups mmc:lambda:simple
- \defineXMLnested
- [lambda]
- {\directsetup{mmc:lambda:simple:start}}
- {\directsetup{mmc:lambda:simple:stop}}
-\stopsetups
-
-\startsetups mmc:lambda:simple:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmc:lambda:simple:stop
- \stopsavingXMLelements
- \MMLcreset % new
- \XMLfirstnamed{apply}
- \endgroup
-\stopsetups
-
-% compose
-
-\defineXMLcommand [compose] {\directsetup{mmc:compose}}
-
-\startsetups mmc:compose
- \begingroup
- \MMLcreset
- \let\MMLcCIfunction\firstofoneargument % brrr
- \doifelseMMCfunction {
- \left(\flushXMLstackwith\plustwo\circ\right)
- } {
- \flushXMLstackwith\plustwo\circ
- }
- \endgroup
-\stopsetups
-
-\defineXMLcommand [image] {\directsetup{mmc:image}}
-
-\startsetups mmc:image
- \getXMLentity{image}
- \left(
- \begingroup
- \startlocalsetups [mmc:function]
- \getXMLentity\currentXMLelement
- \stoplocalsetups
- \getXMLstackdata\plustwo
- \endgroup
- \right)
-\stopsetups
-
-\setupMMLappearance[piece][\c!separator=]
-
-\def\setMMLcPIECEseparator
- {\processaction
- [\@@MMLpieceseparator]
- [ \v!yes=>\def\theMMLpieceseparator{,\@col@amp@},
- \v!no=>\let\theMMLpieceseparator\@col@amp@,
- \s!default=>\let\theMMLpieceseparator\@col@amp@,
- \s!unknown=>\def\theMMLpieceseparator{\,\,\hbox{\@@MMLpieceseparator}\,\,}]}
-
-\defineXMLargument[piecewise] {\cases}
-
-\defineXMLnested
- [piece]
- {\directsetup{mmc:piece:start}}
- {\directsetup{mmc:piece:stop}}
-
-\defineXMLenvironmentsave
- [otherwise]
- {}
- {\directsetup{mmc:otherwise}}
-
-\startsetups mmc:piece:start
- \startsavingXMLelements
- \setMMLcPIECEseparator
-\stopsetups
-
-\startsetups mmc:piece:stop
- \stopsavingXMLelements
- \edef\ascii{\getXMLstackdata\plusone}
- \@EA\XMLRtoks\@EA{\ascii\theMMLpieceseparator}
- \edef\ascii{\getXMLstackdata\plustwo}
- \@EA\appendtoks\@EA\mathematics\@EA{\ascii}\to\XMLRtoks
- \the\XMLRtoks\crcr
-\stopsetups
-
-\startsetups mmc:otherwise
- \XMLflush{otherwise}\MMLcPIECEseparator\@col@amp@\mathematics{\getXMLentity{otherwise}}\crcr
-\stopsetups
-
-\defineXMLcommand [quotient] {\directsetup{mmc:quotient}}
-
-\startsetups mmc:quotient
- \lfloor\getXMLstackdata\plustwo/\getXMLstackdata\plusthree\rfloor
-\stopsetups
-
-\defineXMLcommand [factorial] {\getXMLstackdata\plustwo !}
-
-\defineXMLcommand [divide] [\MMLargumentprefix] [] {\directsetup{mmc:divide}} % brr not nested
-
-\setupMMLappearance [divide] [\c!level=\!!maxcard,\c!alternative=\v!a]
-
-\startsetups mmc:divide
- \startusingMMLarguments
- \increment\MMLcDIVIDElevel
- \doifelse \@@MMLdividealternative\v!b {
- \getXMLstackdata\plustwo/\getXMLstackdata\plusthree
- } {
- \ifnum\MMLcDIVIDElevel>\@@MMLdividelevel\space
- \getXMLstackdata\plustwo/\getXMLstackdata\plusthree
- \else
- \MMLcreset
- \frac{\MMLcreset\getXMLstackdata\plustwo}{\MMLcreset\getXMLstackdata\plusthree}%
- \fi
- }
- \decrement\MMLcDIVIDElevel
- \stopusingMMLarguments
-\stopsetups
-
-% min max
-
-\defineXMLcommand [min] {\min\directsetup{mmc:minmax}}
-\defineXMLcommand [max] {\max\directsetup{mmc:minmax}}
-
-\startsetups mmc:minmax
- \doifelse{\getXMLstackdata\plustwo}{bvar} {
- {}_{\getXMLstackdata\plustwo}
- \left\{\flushXMLstackwith\plusthree{\MMLseparator,}\right\}
- } {
- \left\{\flushXMLstackwith\plustwo {\MMLseparator,}\right\}
- }
-\stopsetups
-
-% minus plus
-
-\defineXMLcommand [minus] {\directsetup{mmc:minus}}
-\defineXMLcommand [plus] [\MMLargumentprefix] [] {\directsetup{mmc:plus}}
-
-\setupMMLappearance [plus] [\c!alternative=\v!a] % b = no sign -> 3 1/4
-\setupMMLappearance [sign] [\c!reduction=\v!yes]
-
-\startsetups mmc:minus
- \doif \@@MMLsignreduction \v!yes {
- \setMMLcreset{fn,\MMLcfunctionlist}
- }
- \ifcase\XMLstacklevel
- \or
- % self
- \or
- -\getXMLstackdata\plustwo
- \else
- \flushXMLstackwith\plustwo-
- \fi
-\stopsetups
-
-\startsetups mmc:plus
- \startusingMMLarguments
- \doifelse \@@MMLsignreduction \v!yes {
- \setMMLcreset{fn,plus,minus,\MMLcfunctionlist,\MMLcconstructlist}% was plus/, minus/
- \doifelse{\getXMLstackname\plustwo} {apply} {
- % branch needed, else (a-b) + (c-d) goes wrong
- % reset check in case of (-x) + 37
- \begingroup
- \dodoifelseMMCfunctioninapply \plustwo {minus} {
- \ifnum\XMLstacklevel>\plustwo
- \endgroup
- \else
- \endgroup
- \MMLcreset
- \fi
- } {
- \endgroup
- }
- \doifelse \@@MMLplusalternative \v!b {
- \getXMLstackdata\plustwo \,
- } {
- \flushXMLstackwith\plustwo +
- }
-
- } {
- \flushXMLstackwith\plustwo {
- \doifelse {\getXMLstackname\recurselevel} {apply} {
- \begingroup
- \dodoifelseMMCfunctioninapply \recurselevel {minus} {
- \ifnum\XMLstacklevel>\plustwo +\fi
- } {
- \doifelse \@@MMLplusalternative \v!b {
- \, % maybe 2 1/3
- } {
- +
- }
- }
- \endgroup
- \MMLcreset
- } {
- +
- }
- }
- }
- } {
- \ifcase\XMLstacklevel
- \or
- % self
- \or
- +\getXMLstackdata\plustwo
- \else
- \flushXMLstackwith\plustwo+
- \fi
- }
- \stopusingMMLarguments
-\stopsetups
-
-% power
-
-\defineXMLcommand [power] {\directsetup{mmc:power}}
-
-\setupMMLappearance[power][\c!reduction=\v!yes]
-
-\let\MMLpowerelement\empty
-
-\startsetups mmc:power
- \doifelse {\getXMLstackname\plustwo} {apply} {
- \doifelse\@@MMLpowerreduction\v!yes {
- \doifelseMMCfunctioninapply \plustwo \MMLcfunctionlist {
- \xdef\MMLpowerelement{\getXMLstackdata\plusthree}% postpone
- \MMLcreset\getXMLstackdata\plustwo
- } {
- \left(\MMLcreset\getXMLstackdata\plustwo\right)^{\MMLcreset\getXMLstackdata\plusthree}
- }
- } {
- \left(\MMLcreset\getXMLstackdata\plustwo\right)^{\MMLcreset\getXMLstackdata\plusthree}
- }
- } {
- \getXMLstackdata\plustwo^{\MMLcreset\getXMLstackdata\plusthree}
- }
-\stopsetups
-
-% rem
-
-\defineXMLcommand [rem] {\flushXMLstackwith\plustwo{\getXMLentity{mod}}}
-
-\setupMMLappearance [times] [\c!symbol=\v!no,\c!auto=\v!yes] % new, auto catches cn cn cn
-
-\defineXMLcommand [times] [\MMLargumentprefix] [] {\directsetup{mmc:times}}
-
-\startsetups mmc:times
- \startusingMMLarguments
- \setMMLcreset{\MMLcfunctionlist,\MMLcconstructlist}%
- \doifelse\@@MMLtimesauto\v!no {
- \let\@@MMLtimes@@symbol\@@MMLtimessymbol
- } {
- \countXMLnamedstack {cn}
- \ifnum\scratchcounter>\plusone
- \doifinsetelse\@@MMLtimessymbol{\v!yes,\v!no} {
- \let\@@MMLtimes@@symbol\v!yes
- } {
- \let\@@MMLtimes@@symbol\@@MMLtimessymbol
- }
- \else
- \let\@@MMLtimes@@symbol\@@MMLtimessymbol
- \fi
- }
- \doifelse\@@MMLtimes@@symbol\v!yes {
- \flushXMLstackwith\plustwo\times
- } {
- \doifelse\@@MMLtimes@@symbol{dot} {
- \flushXMLstackwith\plustwo\cdot
- } {
- \doifelse\@@MMLtimes@@symbol{times} {
- \flushXMLstackwith\plustwo\times
- } {
- \flushXMLstackwith\plustwo\empty
- }
- }
- }
- \stopusingMMLarguments
-\stopsetups
-
-\defineXMLcommand [root] {\directsetup{mmc:root}}
-
-\setupMMLappearance[root][\c!symbol=\v!yes]
-
-\startsetups mmc:root
- \XMLdoifonstackelse {degree} {
- \root
- \doifnot\@@MMLrootsymbol\v!no{\MMLcreset\XMLfirstnamed{degree}}
- \of
- } {
- \sqrt
- }
- {\MMLcreset\XMLfirstnamed{apply,reln,ci,cn}}
-\stopsetups
-
-% gcd
-
-\defineXMLcommand [gcd] {\gcd\left(\MMLcreset\flushXMLstackwith\plustwo{\MMLseparator,}\right)}
-
-% and or xor implies
-
-\defineXMLcommand [and] {\flushXMLstackwith\plustwo{\getXMLentity{and}}}
-\defineXMLcommand [or] {\flushXMLstackwith\plustwo{\getXMLentity{or}}}
-\defineXMLcommand [xor] {\flushXMLstackwith\plustwo{\getXMLentity{xor}}}
-\defineXMLcommand [implies] {\flushXMLstackwith\plustwo{\getXMLentity{implies}}}
-
-% not
-
-\defineXMLcommand [not] {\getXMLentity{not}\getXMLstackdata\plustwo}
-
-% forall exists
-
-\defineXMLcommand [forall] {\directsetup{mmc:forall}}
-\defineXMLcommand [exists] {\directsetup{mmc:exists}}
-
-%D We need to shift left below rotated A.
-
-\startsetups mmc:forall
- \getXMLentity{forall}
- \getXMLentity{NegThinSpace}
- \directsetup{mmc:forall-exists}
-\stopsetups
-
-\startsetups mmc:exists
- \getXMLentity{exists}
- \directsetup{mmc:forall-exists}
-\stopsetups
-
-\startsetups mmc:forall-exists
- _{\flushXMLnamedstackwith\plustwo{bvar}{\MMLseparator,}}
- \XMLdoifonstackelse {condition} {
- \getXMLentity{ThickSpace}
- \begingroup
- \XMLfirstnamed{condition}
- \endgroup
- \countXMLnamedstack {apply,reln,ci,cn}
- \ifcase\scratchcounter
- \or
- % == snelle volgende
- \left\vert \MMLcreset
- \getXMLentity{MediumSpace}
- \flushXMLnamedstackwith\plustwo{apply,reln,ci,cn}\empty
- \right.
- \else
- % special case
- % \defineXMLignore[condition]
- \collectXMLnamedstack{apply,reln,ci,cn}{\hfill\crcr}
- \left\vert
- \matrix{\the\XMLRtoks}
- \right.
- \fi
- } {
- :\XMLfirstnamed{apply,reln,ci,cn}
- }
-\stopsetups
-
-\defineXMLcommand [abs] {\left\vert \MMLcreset \flushXMLstackfrom\plustwo \right\vert}
-\defineXMLcommand [conjugate] {{\overline{\MMLcreset \flushXMLstackfrom\plustwo}}} % watch extra {}
-\defineXMLcommand [arg] {\getXMLentity{arg} \left(\MMLcreset\flushXMLstackfrom\plustwo\right)}
-\defineXMLcommand [real] {\getXMLentity{real} \left(\MMLcreset\flushXMLstackfrom\plustwo\right)}
-\defineXMLcommand [imaginary] {\getXMLentity{imaginary}\left(\MMLcreset\flushXMLstackfrom\plustwo\right)}
-\defineXMLcommand [lcm] {\getXMLentity{lcm} \left(\flushXMLstackwith\plustwo{\MMLseparator,}\right)}
-\defineXMLcommand [floor] {\getXMLentity{lfloor} \flushXMLstackfrom\plustwo \getXMLentity{rfloor}}
-\defineXMLcommand [ceiling] {\getXMLentity{lceiling} \flushXMLstackfrom\plustwo \getXMLentity{rceiling}}
-
-% relations
-
-\defineXMLcommand [eq] [\MMLargumentprefix] [\c!align=] {\MMLcrelation=}
-\defineXMLcommand [neq] [\MMLargumentprefix] [\c!align=] {\MMLcrelation\neq}
-\defineXMLcommand [gt] [\MMLargumentprefix] [\c!align=] {\MMLcrelation>}
-\defineXMLcommand [lt] [\MMLargumentprefix] [\c!align=] {\MMLcrelation<}
-\defineXMLcommand [geq] [\MMLargumentprefix] [\c!align=] {\MMLcrelation\geq}
-\defineXMLcommand [leq] [\MMLargumentprefix] [\c!align=] {\MMLcrelation\leq}
-\defineXMLcommand [equivalent] [\MMLargumentprefix] [\c!align=] {\MMLcrelation\equiv}
-\defineXMLcommand [approx] [\MMLargumentprefix] [\c!align=] {\MMLcrelation\approx}
-\defineXMLcommand [factorof] [\MMLargumentprefix] [\c!align=] {\MMLcrelation\mid}
-
-\setupMMLappearance[relation][\c!align=\v!no]
-
-\def\MMLcrelation
- {\startusingMMLarguments
- \MMLcreset
- \edef\@@MMLrelationalign{\executeifdefined{\MMLargumentprefix\c!align}\@@MMLrelationalign}%
- \processaction
- [\@@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}
-
-\def\noMMLcrelation#1%
- {\flushXMLstackwith\plustwo{#1}
- \stopusingMMLarguments}
-
-\def\lastMMLcrelation#1% weird, probably bugged
- {\XMLRtoks\emptytoks
- \dostepwiserecurse\plustwo\XMLstacklevel\plusone
- {\appendetoks\noexpand\getXMLstackdata{\recurselevel}\to\XMLRtoks
- \ifnum\recurselevel<\numexpr\XMLstacklevel-1\relax
- \appendtoks\@col@amp@#1\crcr\to\XMLRtoks
- \else\ifnum\recurselevel=\numexpr\XMLstacklevel-1\relax
- \appendtoks\@col@amp@#1\to\XMLRtoks
- \fi\fi}%
- \eqalign{\the\XMLRtoks\crcr}%
- \stopusingMMLarguments}
-
-\def\firstMMLcrelation#1%
- {\collectXMLstackrows\plusthree{\crcr\@col@amp@#1}%
- \eqalign{\getXMLstackdata\plustwo\@col@amp@#1\the\XMLRtoks}%
- \stopusingMMLarguments}
-
-\def\leftMMLcrelation#1%
- {\collectXMLstackrows\plustwo{\@col@amp@#1\crcr}%
- \eqalign{\the\XMLRtoks}%
- \stopusingMMLarguments}
-
-\def\rightMMLcrelation#1%
- {\collectXMLstackrows\plustwo{\crcr#1{}\@col@amp@}%
- \eqalign{\@col@amp@\the\XMLRtoks\crcr}%
- \stopusingMMLarguments}
-
-\defineXMLcommand [becomes] {\MMLcrelation{:=}}
-
-\addtocommalist{becomes/}\MMLcmainresetlist
-
-% calculus and vector calculus
-
-\setupMMLappearance[int][\c!location=\v!top]
-
-\def\doMMLlimits#1%
- {\doifelsevalue{@@MML#1\c!location}\v!top\limits\nolimits}
-
-\defineXMLnested
- [domainofapplication]
- {\directsetup{mmc:domainofapplication:start}}
- {\directsetup{mmc:domainofapplication:stop}}
-
-\startsetups mmc:domainofapplication:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmc:domainofapplication:stop
- \stopsavingXMLelements
-% \MMLcreset
- \flushXMLstackfrom\plusone
- \endgroup
-\stopsetups
-
-\defineXMLcommand [int] {\directsetup{mmc:int}}
-
-\startsetups mmc:int
- \MMLcreset
- \XMLdoifonstackelse{domainofapplication} {
- \int\doMMLlimits{int}_{\XMLfirstnamed{domainofapplication}}\relax
- } {
- \XMLdoifonstackelse{condition} {
- \int\doMMLlimits{int}_{\XMLfirstnamed{condition}}\relax
- } {
- \XMLdoifonstackelse{lowlimit} {
- \int\doMMLlimits{int}
- _{\XMLfirstnamed{lowlimit}}
- ^{\XMLfirstnamed{uplimit}}
- } {
- % funny, why do we have lowlimit/uplimit then
- \XMLdoifonstackelse{interval} {
- \begingroup
- \startlocalsetups mmc:interval:start %
- \begingroup
- \startsavingXMLelements
- \stoplocalsetups
- \startlocalsetups mmc:interval:stop %
- \stopsavingXMLelements
- \xdef\MMLfirstelement {\getXMLstackdata\plusone}
- \xdef\MMLsecondelement{\getXMLstackdata\plustwo}
- \endgroup
- \stoplocalsetups
- \globallet\MMLfirstelement \empty
- \globallet\MMLsecondelement\empty
- \XMLfirstnamed{interval}
- \endgroup
- \int\doMMLlimits{int}
- _{\MMLfirstelement}
- ^{\MMLsecondelement}
- } {
- \int
- }
- }
- }
- }
- \MMLcreset
- \XMLdoifonstackelse{apply} {
- \doifelseMMCfunction {
- \XMLfirstnamed{apply}
- } {
- % if there are too many () now, we need to be more clever
- \left(\XMLfirstnamed{apply}\right)
- }
- } {
- \XMLfirstnamed{ci}
- }
- \XMLdoifonstackelse{bvar} {
- \,% \getXMLentity{ThinSpace}%
-% {\MMLrm\getXMLentity{mathematicald}}
- \mfunction{\getXMLentity{mathematicald}}
- \XMLfirstnamed{bvar}
- } {
- % nothing
- }
-\stopsetups
-
-\setupMMLappearance[diff][\c!location=\v!top,\c!alternative=\v!a]
-
-\defineXMLcommand [diff] {\directsetup{mmc:diff}}
-\defineXMLcommand [partialdiff] {\directsetup{mmc:partialdiff}}
-
-% \setupMMLappearance[diff][alternative=b]
-%
-% \startXMLdata
-% <math><apply><apply><diff/><bvar><ci>x</ci></bvar><ci>f</ci></apply><ci>a</ci></apply></math>
-% <math><apply><apply><diff/><bvar><ci>x</ci></bvar><degree>2</degree><ci>f</ci></apply><ci>a</ci></apply></math>
-% \stopXMLdata
-
-% d^y/dx^2
-%
-% \startXMLdata
-% <math><apply><diff/>
-% <bvar><ci>x</ci><cn type="integer">2</cn></bvar>
-% <lambda><bvar><ci>x</ci></bvar><ci>y</ci></lambda>
-% </apply></math>
-% \stopXMLdata
-
-\startsetups mmc:diff
- \MMLcreset
- \doifelse\@@MMLdiffalternative\v!a {
- \XMLdoifonstackelse{lambda} {
- % a special case (mathadore/openmath)
- \begingroup
- \defineXMLsave[ci]
- \defineXMLsave[cn]
- \defineXMLprocess[lambda]
- \defineXMLprocess[bvar]
- \frac {
- d^{\XMLfirstnamed{bvar}\XMLflush{cn}}{\XMLfirstnamed{lambda}\XMLflush{ci}}
- } {
- d{\XMLfirstnamed{bvar}\XMLflush{ci}}^{\XMLfirstnamed{bvar}\XMLflush{cn}}
- }
- \endgroup
- } {
- \XMLdoifonstackelse{bvar} {
- \frac {
- \XMLdoifonstackelse{degree} {
- \collectXMLnamedstack{degree}\empty
- } {
- \collectXMLnamedstacknamed{bvar}{degree}+
- }
- \mfunction{\getXMLentity{mathematicald}}
- ^{\the\XMLRtoks}
- \doif\@@MMLdifflocation\v!top {
- \XMLdoifonstackelse{ci} {
- \XMLfirstnamed{ci}
- } {
- \MMLcreset\XMLfirstnamed{apply}
- }
- }
- } {
- \mfunction{\getXMLentity{mathematicald}}
- \begingroup
- \defineXMLsave[degree]
- \XMLfirstnamed{bvar}
- \doifXMLdata{degree} {
- ^{\XMLflush{degree}}
- }
- \endgroup
- }
- \doifnot\@@MMLdifflocation\v!top {
- \left(\MMLcreset\XMLfirstnamed{apply,ci}\right)
- }
- } {
- \flushXMLstackfrom\plustwo^\prime
- }
- }
- } {
- \MMLcreset
- \XMLfirstnamed{apply,ci}
- % there can be problems with nested diff's: ^^{} error
- % so we add an empty group here
- {}^
- {
- \XMLdoifonstackelse{degree} {
- \defXMLfirstnamedtext\ascii{degree}
- \dorecurse\ascii\prime
- } {
- \prime
- }
- }
- }
-\stopsetups
-
-\startsetups mmc:partialdiff
- \XMLdoifonstackelse{list} {
- \getXMLentity{capitaldifferentiald}_{
- \begingroup
- \setfalse\MMLlistdelimiters
- \XMLallnamed{list}
- \endgroup
- }
- \XMLfirstnamed{apply,reln,ci,cn}
- } {
- \XMLdoifonstackelse{bvar} {
- \frac {
- \XMLdoifonstackelse{degree} {
- \collectXMLnamedstack{degree}\empty
- } {
- \collectXMLnamedstacknamed{bvar}{degree}+
- }
- \getXMLentity{differentiald}^{\the\XMLRtoks}
- % \let\MMLcDEGREE\gobbletwoarguments
- % \doifelseMMCfunction\MMLcreset\donothing
- \MMLcreset
- \XMLfirstnamed{apply,reln,ci,cn}
- } {
- \defineXMLnested[bvar]
- {\directsetup{mmc:bvar:diff:start}}
- {\directsetup{mmc:bvar:diff:stop}}
- \XMLfirstnamed{bvar}
- }
- } {
- \XMLfirstnamed{apply,reln,ci,cn}
- }
- }
-\stopsetups
-
-\startsetups mmc:bvar:diff:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmc:bvar:diff:stop
- \stopsavingXMLelements
- \getXMLentity{differentiald}\XMLfirstnamed{apply,reln,ci,cn}
- \XMLdoifonstackelse{degree} {
- ^{\XMLfirstnamed{degree}}
- } {
- % nothing
- }
- \endgroup
-\stopsetups
-
-\def\subMMLcelement #1#2{_{#2}}
-\def\superMMLcelement#1#2{^{#2}}
-
-\defineXMLprocess [lowlimit]
-\defineXMLprocess [uplimit]
-\defineXMLprocess [bvar]
-\defineXMLprocess [degree]
-
-% option:
-%
-% \defineXMLentity [div] {\mathematics{\triangledown\times}}
-% \defineXMLentity [curl] {\mathematics{\triangledown .}}
-% \defineXMLentity [grad] {\mathematics{\triangledown }}
-
-\defineXMLcommand [divergence] {\getXMLentity{divergence}\directsetup{mmc:donamedfunction}}
-\defineXMLcommand [grad] {\getXMLentity {grad}\directsetup{mmc:donamedfunction}}
-\defineXMLcommand [curl] {\getXMLentity {curl}\directsetup{mmc:donamedfunction}}
-\defineXMLcommand [laplacian] {\getXMLentity {laplacian}\directsetup{mmc:donamedfunction}}
-
-\defineXMLcommand [ident] {\getXMLentity {identity}\directsetup{mmc:donamedfunction}}
-% \defineXMLcommand [domain] {\getXMLentity {domain}\directsetup{mmc:donamedfunction}}
-% \defineXMLcommand [codomain] {\getXMLentity {codomain}\directsetup{mmc:donamedfunction}}
-
-\defineXMLcommand[domain] {\directsetup{mmc:domain:action}}
-\defineXMLcommand[codomain]{\directsetup{mmc:codomain:action}}
-
-\setupMMLappearance[domain] [symbol=]
-\setupMMLappearance[codomain][symbol=]
-
-\startsetups mmc:domain:action
- \doifelsenothing\@@MMLdomainsymbol {
- \getXMLentity{domain}\directsetup{mmc:donamedfunction}
- } {
- \@@MMLdomainsymbol_{\flushXMLstackfrom\plustwo}
- }
-\stopsetups
-\startsetups mmc:codomain:action
- \doifelsenothing\@@MMLcodomainsymbol {
- \getXMLentity{codomain}\directsetup{mmc:donamedfunction}
- } {
- \@@MMLcodomainsymbol_{\flushXMLstackfrom\plustwo}
- }
-\stopsetups
-
-
-\startsetups mmc:donamedfunction
-% \left(
-% \begingroup
- \MMLcreset\flushXMLstackfrom\plustwo
-% \endgroup
-% \right)
-\stopsetups
-
-% theory of sets
-
-\defineXMLnested [set]
- {\setups{mmc:set:start}}
- {\setups{mmc:set:stop}}
-
-\startsetups mmc:set:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmc:set:stop
- \stopsavingXMLelements
- \XMLdoifonstackelse{condition} {
- \left\{\XMLfirstnamed{bvar}\,\middle\vert\,\XMLfirstnamed{condition}\right\}
- } {
- \left\{\flushXMLstackwith\plusone{\MMLseparator,}\right\}
- }
- \endgroup
-\stopsetups
-
-\defineXMLnested [list]
- {\setups{mmc:list:start}}
- {\setups{mmc:list:stop}}
-
-\settrue\MMLlistdelimiters
-
-\startsetups mmc:list:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmc:list:stop
- \stopsavingXMLelements
- \ifconditional\MMLlistdelimiters\left [\fi
- \begingroup
- \settrue\MMLlistdelimiters
- \flushXMLstackwith\plusone{\MMLseparator,}
- \endgroup
- \ifconditional\MMLlistdelimiters\right]\fi
- \endgroup
-\stopsetups
-
-\defineXMLcommand [union] {\MMLcset\cup}
-\defineXMLcommand [intersect] {\MMLcset\cap}
-\defineXMLcommand [in] {\MMLcset\in}
-\defineXMLcommand [notin] {\MMLcset{\not\in}}
-\defineXMLcommand [subset] {\MMLcset\subset}
-\defineXMLcommand [prsubset] {\MMLcset\subseteq}
-\defineXMLcommand [notsubset] {\MMLcset{\not\subset}}
-\defineXMLcommand [notprsubset] {\MMLcset{\not\subseteq}}
-\defineXMLcommand [setdiff] {\MMLcset\setminus}
-
-\def\MMLcset#1{\getXMLstackdata\plustwo#1\getXMLstackdata\plusthree}
-
-\defineXMLcommand [card] {\left\vert\flushXMLstackfrom\plustwo\right\vert}
-\defineXMLcommand [cartesianproduct] {\flushXMLstackwith\plustwo\times}
-
-% sequences and series
-
-\defineXMLcommand [sum] {\MMLcSUMandPRODUCT{sum}\sum}
-\defineXMLcommand [product]{\MMLcSUMandPRODUCT{product}\prod}
-
-\setupMMLappearance[sum] [\c!location=\v!top]
-\setupMMLappearance[product][\c!location=\v!top]
-
-\def\stackMMLsubscripts#1%
- {\vbox
- {\baselineskip\zeropoint % hack, taco vragen
- \halign{$\scriptstyle\hss##\hss$\cr#1\crcr}}}
-
-\def\MMLcSUMandPRODUCT#1#2%
- {\begingroup
- \XMLdoifonstackelse{condition,bvar,lowlimit}
- {\def\MMLcSUMlow
- {_{\XMLdoifonstackelse{condition}
- {\collectXMLnamedstack{condition}{\crcr}%
- \stackMMLsubscripts{\the\XMLRtoks}}
- {\XMLdoifonstackelse{bvar}
- {\XMLfirstnamed{bvar}%
- \XMLdoifonstackelse{lowlimit}{=}{}}%
- {}%
- \XMLfirstnamed{lowlimit}}}}}
- {\let\MMLcSUMlow\empty}%
- \XMLdoifonstackelse{uplimit}
- {\def\MMLcSUMup{^{\XMLfirstnamed{uplimit}}}}
- {\let\MMLcSUMup\empty}%
- \XMLdoifonstackelse{interval} % open math converter gives this
- {\begingroup
- \directsetup{mmc:interval:fetch}%
- \XMLfirstnamed{interval}%
- \endgroup
- \ifx\MMCintervalfrom\empty\else
- \def\MMLcSUMlow{_{\XMLdoifonstackelse{bvar}{\XMLfirstnamed{bvar}{=}}{}\MMCintervalfrom}}%
- \fi
- \ifx\MMCintervalto\empty \else
- \def\MMLcSUMup{^{\MMCintervalto}}%
- \fi}
- {}%
- \MMLcreset#2\doMMLlimits{#1}\MMLcSUMup\MMLcSUMlow
- \directsetup{mmc:lambda:simple}% a bit of open math conversion mess
- \MMLcreset\XMLfirstnamed{apply,lambda,ci}%
- \endgroup}
-
-\defineXMLcommand [limit] {\directsetup{mmc:limit}}
-
-\setupMMLappearance[limit][\c!location=\v!top]
-
-\startsetups mmc:limit
- \MMLcreset \lim
- \doMMLlimits{limit}_{
- \MMLcreset
- \XMLdoifonstackelse {condition} {
- \XMLfirstnamed{condition}
- } {
- \XMLdoifonstackelse {bvar} {
- \XMLfirstnamed{bvar}\rightarrow
- } {
- }
- \XMLfirstnamed{lowlimit}
- }
- }
- \begingroup
- \MMLcreset
- \directsetup{mmc:lambda:simple}% a bit of open math conversion mess
- \XMLfirstnamed{apply,lambda}% lambda needed for openmath
- \endgroup
-\stopsetups
-
-\defineXMLcommand [tendsto] [type=default] {\directsetup{mmc:tendsto}}
-
-\startsetups mmc:tendsto
- \MMLcreset \getXMLstackdata\plustwo
- \processaction
- [\XMLpar{tendsto}{type}{default}]
- [ above=>\downarrow,
- below=>\uparrow,
- unknown=>\rightarrow]
- \MMLcreset \getXMLstackdata\plusthree
-\stopsetups
-
-% elementary classical functions
-
-\defineXMLcommand [exp] {\directsetup{mmc:exp}}
-\defineXMLcommand [ln] {\directsetup{mmc:function}}
-\defineXMLcommand [log] {\directsetup{mmc:log}}
-\defineXMLignore [logbase]
-
-\setupMMLappearance[log][\c!location=\v!right]
-
-\startsetups mmc:exp
- \getXMLentity{exponentiale}^{\XMLfirstnamed{apply,reln,ci,cn}}
-\stopsetups
-
-\startsetups mmc:log
- \XMLdoifonstackelse {logbase} {
- \doifelse\@@MMLloglocation\v!left {
- \mathop{{}^{{\defineXMLprocess[logbase]\XMLfirstnamed{logbase}}}
- \getXMLentity{NegThinSpace}
- \getXMLentity{log}}
- } {
- \getXMLentity{log}_{{\defineXMLprocess[logbase]\XMLfirstnamed{logbase}}}
- }
- } {
- \getXMLentity{log}
- }
- \MMLcreset
- % mmc:function:argument assumes that the apply is second in the row (*1*)
- % \removeXMLdatafromstack{logbase}
- \directsetup{mmc:function:argument}
-\stopsetups
-
-% statistics
-
-\defineXMLcommand [mean] {\overline{\getXMLstackdata\plustwo}}
-\defineXMLcommand [sdev] {\sigma(\MMLcreset\getXMLstackdata\plustwo)}
-\defineXMLcommand [variance] {\sigma(\MMLcreset\getXMLstackdata\plustwo)^2}
-\defineXMLcommand [median] {\getXMLentity{median}(\MMLcreset\getXMLstackdata\plustwo)}
-\defineXMLcommand [mode] {\getXMLentity{mode}(\MMLcreset\getXMLstackdata\plustwo)}
-
-% moments
-
-\defineXMLcommand [moment] {\directsetup{mmc:moment}}
-\defineXMLprocess [momentabout]
-
-\startsetups mmc:moment
- \left\langle\XMLfirstnamed{apply,reln,ci,cn}^{\XMLfirstnamed{degree}}\right\rangle
- \XMLdoifonstackelse{momentabout} {
- _{\XMLfirstnamed{momentabout}}
- } {
- }
-\stopsetups
-
-% linear algebra
-
-\defineXMLcommand [vector] {\directsetup{mmc:vector}} % sequence
-
-\setupMMLappearance [vector] [\c!direction=\v!horizontal,\c!separator={,}]
-
-\defineXMLnested
- [vector]
- {\directsetup{mmc:vector:start}}
- {\directsetup{mmc:vector:stop}}
-
-\startsetups mmc:vector:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmc:vector:stop
- \stopsavingXMLelements
- \ifnum\XMLstacklevel>\plusone
- \doifelse\@@MMLvectordirection\v!horizontal {
- \left(\flushXMLstackwith\plusone{\MMLseparator\@@MMLvectorseparator}\right)
- } {
- \collectXMLstack\crcr
- \MMLcreset\left(\matrix{\the\XMLRtoks}\right)
- }
- \else
- \overrightarrow{\charhtstrut\getXMLstackdata\plusone}
- \fi
- \endgroup
-\stopsetups
-
-\defineXMLnestedenvironmentsave [matrix] {} {\directsetup{mmc:matrix}}
-\defineXMLnestedenvironmentsave [matrixrow] {} {\directsetup{mmc:matrixrow}}
-
-\unexpanded\def\@col@amp@{&}
-
-\settrue\MMCdelmatrix %( ) when true
-
-\startsetups mmc:matrix
- \begingroup
- \MMLcreset
- \defineXMLnestedenvironmentsave [matrixrow] {} {\directsetup{mmc:matrixrow:do}}
- \ifconditional\MMCdelmatrix
- \left(\matrix{\XMLflush{matrix}}\right)
- \else
- \settrue\MMCdelmatrix
- \matrix{\XMLflush{matrix}}
- \fi
- \endgroup
-\stopsetups
-
-\startsetups mmc:matrixrow
- \begingroup
- \MMLcreset
- \left(\matrix{\directsetup{mmc:matrixrow:do}}\right)
- \endgroup
-\stopsetups
-
-\startsetups mmc:matrixrow:do
- \begingroup
- \startsavingXMLelements
- \XMLflush{matrixrow}
- \stopsavingXMLelements
- \collectXMLstackrows\plusone\@col@amp@
- \edef\ascii{\the\XMLRtoks}
- \edef\ascii{\ascii}
- \expandafter\endgroup\ascii\crcr
-\stopsetups
-
-\defineXMLcommand [determinant] {\directsetup{mmc:determinant}}
-\defineXMLcommand [transpose] {\directsetup{mmc:transpose}}
-\defineXMLcommand [selector] {\directsetup{mmc:selector}}
-
-\startsetups mmc:determinant
- \begingroup
- \left|
- \setfalse\MMCdelmatrix
- \getXMLstackdata\plustwo
- \right|
- \endgroup
-\stopsetups
-
-\startsetups mmc:transpose
-% \getXMLstackdata\plustwo^{\MMLrm T}
- \getXMLstackdata\plustwo^{\mfunction{T}}
-\stopsetups
-
-\startsetups mmc:selector
- \MMLmathinner{\getXMLstackdata\plustwo}_{\MMLcreset\flushXMLstackwith\plusthree{\MMLseparator,}}
-\stopsetups
-
-\defineXMLcommand [vectorproduct] {\getXMLstackdata\plustwo\getXMLentity{vectorproduct}\getXMLstackdata\plusthree}
-\defineXMLcommand [scalarproduct] {\getXMLstackdata\plustwo\getXMLentity{scalarproduct}\getXMLstackdata\plusthree}
-\defineXMLcommand [outerproduct] {\getXMLstackdata\plustwo\getXMLentity {outerproduct}\getXMLstackdata\plusthree}
-
-% semantic mapping elements
-
-\defineXMLnested
- [semantics]
- {\directsetup{mmc:semantics:start}}
- {\directsetup{mmc:semantics:stop}}
-
-\startsetups mmc:semantics:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmc:semantics:stop
- \stopsavingXMLelements
- \XMLdoifonstackelse {annotation} {
- \flushXMLnamedstackwith\plusone{annotation}\empty
- } {
- \flushXMLnamedstackwith\plusone{apply}\empty
- }
- \endgroup
-\stopsetups
-
-\defineXMLenvironmentsave
- [annotation]
- [encoding=]
- {}
- {\directsetup{mmc:annotation}}
-
-\startsetups mmc:annotation
- \expanded{\doifinset{\XMLpar{annotation}{encoding}{}}{TeX,tex,TEX,ConTeXt,context,CONTEXT}} {
- \XMLtexdata{annotation}
- }
-\stopsetups
-
-\defineXMLignore [annotation-xml]
-
-% misc
-
-\defineXMLcommand [integers] {\getXMLentity{integers}}
-\defineXMLcommand [reals] {\getXMLentity{reals}}
-\defineXMLcommand [rationals] {\getXMLentity{rationals}}
-\defineXMLcommand [naturalnumbers] {\getXMLentity{naturalnumbers}}
-\defineXMLcommand [complexes] {\getXMLentity{complexes}}
-\defineXMLcommand [primes] {\getXMLentity{primes}}
-\defineXMLcommand [exponentiale] {\getXMLentity{ExponentialE}}
-\defineXMLcommand [imaginaryi] {\getXMLentity{ImaginaryI}}
-\defineXMLcommand [notanumber] {\mathop{\mfunction{NaN}}}
-\defineXMLcommand [true] {\mathop{\mfunction{true}}}
-\defineXMLcommand [false] {\mathop{\mfunction{false}}}
-\defineXMLcommand [emptyset] {\mathop{\O}}
-\defineXMLcommand [pi] {\pi}
-\defineXMLcommand [eulergamma] {\gamma}
-\defineXMLcommand [infinity] {\infty}
-
-% gonio functions
-
-\defineXMLcommand[sin] {\directsetup{mmc:function}} \defineXMLcommand[arcsin] {\directsetup{mmc:function}}
-\defineXMLcommand[sinh]{\directsetup{mmc:function}} \defineXMLcommand[arcsinh]{\directsetup{mmc:function}}
-\defineXMLcommand[cos] {\directsetup{mmc:function}} \defineXMLcommand[arccos] {\directsetup{mmc:function}}
-\defineXMLcommand[cosh]{\directsetup{mmc:function}} \defineXMLcommand[arccosh]{\directsetup{mmc:function}}
-\defineXMLcommand[tan] {\directsetup{mmc:function}} \defineXMLcommand[arctan] {\directsetup{mmc:function}}
-\defineXMLcommand[tanh]{\directsetup{mmc:function}} \defineXMLcommand[arctanh]{\directsetup{mmc:function}}
-\defineXMLcommand[cot] {\directsetup{mmc:function}} \defineXMLcommand[arccot] {\directsetup{mmc:function}}
-\defineXMLcommand[coth]{\directsetup{mmc:function}} \defineXMLcommand[arccoth]{\directsetup{mmc:function}}
-\defineXMLcommand[csc] {\directsetup{mmc:function}} \defineXMLcommand[arccsc] {\directsetup{mmc:function}}
-\defineXMLcommand[csch]{\directsetup{mmc:function}} \defineXMLcommand[arccsch]{\directsetup{mmc:function}}
-\defineXMLcommand[sec] {\directsetup{mmc:function}} \defineXMLcommand[arcsec] {\directsetup{mmc:function}}
-\defineXMLcommand[sech]{\directsetup{mmc:function}} \defineXMLcommand[arcsech]{\directsetup{mmc:function}}
-
-\setupMMLappearance[function][\c!reduction=\v!yes]
-
-\startsetups mmc:function
- \getXMLentity\currentXMLelement
- \ifx\MMLpowerelement\empty\else
- ^{\MMLcreset\MMLpowerelement\empty}
- \getXMLentity{NegThinSpace}
- \global\let\MMLpowerelement\empty
- \fi
- \doif {\getXMLstackname\plusone} {\currentXMLelement} {
- % rather fuzzy test; looks like an apply case
- \directsetup{mmc:function:argument}
- }
-\stopsetups
-
-\startsetups mmc:function:argument
- \doifelse\@@MMLfunctionreduction\v!yes {
- % \doifelse {\getXMLstackname\plustwo} {apply} {
- % \doifelseMMCfunctioninapply \plustwo \MMLcfunctionlist \donefalse \donetrue
- %
- % best is to grab the apply (independent of order), (*1*), so:
- %
- \XMLdoifonstackelse {apply} {
- \doifelseMMCfunctioninapply \XMLstackposition {\MMLcfunctionlist,divide} \donefalse \donetrue
- } {
- \donefalse
- }
- } {
- \donetrue
- }
- % beware, we still flush from 2 up
- \ifdone
- \left(\MMLcreset\flushXMLstackfrom\plustwo\right)
- \else
- \MMLcreset\flushXMLstackfrom\plustwo
- \fi
-\stopsetups
-
-% presentation mml
-
-\def\resetMMLseparator
- {\newcounter\MMLxxcounter
- \let\lastMMLseparator\empty}
-
-\def\grabMMLseparator#1%
- {\increment\MMLxxcounter
- \newcounter\MMLyycounter
- \expanded{\dograbMMLseparator#1\noexpand\relax}}
-
-\def\dograbMMLseparator
- {\increment\MMLyycounter
- \doifnextcharelse\relax
- {\lastMMLseparator\gobbleoneargument}
- {\doifnextcharelse\xmlrent\grabMMLseparatora\grabMMLseparatorb}}
-
-\def\grabMMLseparatora#1\xmlrent#2%
- {\ifnum\MMLxxcounter=\MMLyycounter\space
- \def\lastMMLseparator{\xmlrent{#2}}%
- \fi
- \dograbMMLseparator}
-
-\def\grabMMLseparatorb#1%
- {\ifnum\MMLxxcounter=\MMLyycounter\space
- \doifXMLentityelse{#1}
- {\def\lastMMLseparator{\xmlrent{#1}}}
- {\def\lastMMLseparator{#1}}%
- \fi
- \dograbMMLseparator}
-
-%
-
-\defineXMLargument [mi] \MMLpMI
-\defineXMLargument [mn] \MMLpMN
-\defineXMLargument [mo] \MMLpMO
-
-\def\MMLpMI#1%
- {\begingroup
- \setMMLpmathstyle{mstyle}%
- #1%
- \endgroup}
-
-% \def\MMLpMN#1%
-% {\begingroup
-% \MMLrm
-% \setMMLpmathstyle{mstyle}%
-% #1%
-% \endgroup}
-
-\def\MMLpMN#1%
- {\mfunction{\setMMLpmathstyle{mstyle}#1}}
-
-\def\MMLpMO#1% yes or no
- {\flattenXMLcontent{#1}%
- \doifXMLentityelse\flattenedXMLcontent
- {\getXMLentity\flattenedXMLcontent}
- {\ConvertConstantAfter\doifinstringelse{\xmlrent}{#1} % TODO ! ! ! ! ! ! ! !
- {#1}
- {\hbox
- {\setMMLpmathstyle{mstyle}%
- \ignorespaces#1\unskip}}}}
-
-% we need to get rid of spaces: <mo> &RightArrow; </mo>
-
-\def\MMLpMO#1% yes or no
- {\flattenXMLcontent{#1}%
- \doifXMLentityelse\flattenedXMLcontent
- {\getXMLentity\flattenedXMLcontent}
- {\ignorespaces#1\removeunwantedspaces}}
-
-\def\doMMLleft #1{\pushmacro\left \let\left \empty\normalleft #1\popmacro\left}
-\def\doMMLright#1{\pushmacro\right\let\right\empty\normalright#1\popmacro\right}
-
-\let\MMLpopen \empty
-\let\MMLpclose\empty
-
-\defineXMLnested [mfenced] [open=(,close=),separators=]
- {\directsetup{mmp:mfenced:start}}
- {\directsetup{mmp:mfenced:stop}}
-
-\startsetups mmp:mfenced:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmp:mfenced:stop
- \stopsavingXMLelements
- \edef\MMLpopen {\XMLpar{mfenced}{open} {}}
- \edef\MMLpclose{\XMLpar{mfenced}{close}{}}
- \ifx\MMLpopen \space\let\MMLpopen \empty\fi
- \ifx\MMLpclose\space\let\MMLpclose\empty\fi
- \ifx\MMLpopen\empty
- \ifx\MMLpclose\empty
- \else
- \doMMLleft.
- \fi
- \else
- \doMMLleft\MMLpopen
- \fi
- \pushmacro\MMLpopen
- \pushmacro\MMLpclose
- \doifelsenothing{\XMLpar{mfenced}{separators}{}} {
- \flushXMLstackfrom\plusone
- } {
- \resetMMLseparator
- \flushXMLstackwith\plusone {
- \begingroup
- \let\myspecialnormalvert\myspecialstretchvert
- \grabMMLseparator{\XMLpar{mfenced}{separators}{}}
- \endgroup
- }
- }
- \popmacro\MMLpclose
- \popmacro\MMLpopen
- \ifx\MMLpclose\empty
- \ifx\MMLpopen\empty
- \else
- \doMMLright.
- \fi
- \else
- \doMMLright\MMLpclose
- \fi
- \endgroup
-\stopsetups
-
-% \startbuffer
-% <math><mfenced separators="" open="(" close=")"><mi>x</mi></mfenced></math>
-% <math><mfenced separators="" open="" close=")"><mi>x</mi></mfenced></math>
-% <math><mfenced separators="" open="(" close="" ><mi>x</mi></mfenced></math>
-% <math><mfenced separators="" open="" close="" ><mi>x</mi></mfenced></math>
-% <math><mfenced separators="" open="" close=" "><mi>x</mi></mfenced></math>
-% \stopbuffer
-%
-% \processXMLbuffer
-
-\defineXMLnestedenvironmentsave [menclose] [notation=]
- {\directsetup{mmp:menclose:start}}
- {\directsetup{mmp:menclose:stop}}
-
-\startsetups mmp:menclose:start
- \begingroup
-\stopsetups
-
-\startsetups mmp:menclose:stop
- \doifelse{\XMLpar{menclose}{notation}{}}{longdiv} {
- \overline{)\XMLflush{menclose}}
- } {
- \XMLflush{menclose}
- }
- \endgroup
-\stopsetups
-
-\defineXMLnested [mfrac] [linethickness=]
- {\directsetup{mmp:mfrac:start}}
- {\directsetup{mmp:mfrac:stop}}
-
-\startsetups mmp:mfrac:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmp:mfrac:stop
- \stopsavingXMLelements
- \doifXMLparelse{mfrac}{linethickness} {
- \edef\theXMLpar{\XMLpar{mfrac}{linethickness}{1}}
- \processaction
- [\theXMLpar]
- [ thin=>\scratchdimen=.2pt,
- medium=>\scratchdimen=.4pt,
- thick=>\scratchdimen=.8pt,
- unknown=>\setdimensionwithunit\scratchdimen{\theXMLpar}{}]
- {{\getXMLstackdata\plusone}\above\scratchdimen{\getXMLstackdata\plustwo}}
- } {
- \frac{\getXMLstackdata\plusone}{\getXMLstackdata\plustwo}
- }
- \endgroup
-\stopsetups
-
-\defineXMLargument
- [ms]
- [lquote=\xmlrent{quot},
- rquote=\xmlrent{quot},
- fontweight=,
- fontstyle=,
- mathstyle=,
- mathvariant=,
- background=,
- color=]
- {\MMLpSTRING}
-
-\def\MMLpSTRING#1%
- {\hbox
- {\tf % else encoding problems
- \MMLpTEXT{\XMLpar{ms}{lquote}{}%
- \doMMPpbackground{ms}{\doMMPpcolor{ms}{\setMMLptextstyle{ms}\ignorespaces#1\removeunwantedspaces}}%
- \XMLpar{ms}{rquote}{}}}}
-
-\defineXMLenvironment
- [mstyle]
- [fontweight=,
- fontstyle=,
- mathstyle=,
- mathvariant=,
- background=,
- color=]
- {\begingroup}
- {\endgroup}
-
-\defineXMLargument [mtext] [CPA] \MMLpTEXT
-\defineXMLargument [merror] [CPA] \MMLpERROR
-\defineXMLargument [mphantom] [CPA] \MMLpPHANTOM
-\defineXMLargument [mpadded] [CPA] \MMLpPADDED
-
-\mapXMLvalue{mmp}{normal} {\tf} \mapXMLvalue{mmp}{double-stuck} {\bf}
-\mapXMLvalue{mmp}{bolditalic} {\bi} \mapXMLvalue{mmp}{bold-italic} {\bi}
-\mapXMLvalue{mmp}{boldslanted}{\bs} \mapXMLvalue{mmp}{bold-slanted} {\bs}
-\mapXMLvalue{mmp}{boldnormal} {\bf} \mapXMLvalue{mmp}{bold} {\bf}
-\mapXMLvalue{mmp}{slanted} {\sl} \mapXMLvalue{mmp}{normalslanted}{\sl}
-\mapXMLvalue{mmp}{italic} {\it} \mapXMLvalue{mmp}{normalitalic} {\it}
-\mapXMLvalue{mmp}{fraktur} {\bf} \mapXMLvalue{mmp}{bold-fraktur} {\bf}
-\mapXMLvalue{mmp}{script} {\tf} \mapXMLvalue{mmp}{bold-script} {\bf}
-
-% and all kind of other crappy names
-
-\def\setMMLptextstyle#1%
- {\XMLval{mmp}{\XMLpar{#1}{fontweight}{}\XMLpar{#1}{fontstyle}{}}{}}
-
-\def\setMMLpmathstyle#1%
- {\XMLval{mmp}{\XMLpar{#1}{mathvariant}{}}{}}
-
-\def\doMMPpcolor#1#2%
- {\doifXMLparelse{#1}{color}{\color[\XMLpar{#1}{color}{}]{#2}}{#2}}
-
-\def\doMMPpbackground#1#2%
- {\doifXMLparelse{#1}{background}
- {\inframed
- [\c!frame=\v!off,
- \c!background=\v!color,
- \c!backgroundcolor=\XMLpar{#1}{background}{}]
- {#2}}
- {#2}}
-
-\def\MMLpTEXT#1%
- {\hbox
- {\tf % else encoding problems
- \doMMPpbackground{ms}{\doMMPpcolor{ms}{\setMMLptextstyle{ms}\ignorespaces#1\removeunwantedspaces}}}}
-
-\def\MMLpERROR#1%
- {\hbox{$\displaystyle#1$}}
-
-\def\MMLpPHANTOM#1%
- {\phantom{\ignorespaces{}#1\unskip}} % watch spacing {} hack
-
-\def\MMLpPADDED#1%
- {#1}
-
-% mrow
-
-\defineXMLenvironment [mrow] {\resetMMLbounds} {\finishMMLbounds}
-
-% \def\MMLleft #1{\increment\MMLboundslevel\left #1}
-% \def\MMLright#1{\right#1\decrement\MMLboundslevel}
-
-% \def\resetMMLbounds
-% {\let\MMLboundslevel\!!plusone\left.}
-
-% \def\finishMMLbounds
-% {\dorecurse\MMLboundslevel{\right.}}
-
-\def\resetMMLbounds
- {\pushmacro\MMLboundslevel
- \newcounter\MMLboundslevel}
-
-\def\MMLleft #1%
- {\increment\MMLboundslevel
- \normalleft#1}
-
-\def\MMLright#1%
- {\ifnum\MMLboundslevel=0 \normalleft.\!\fi
- \normalright#1%
- \decrement\MMLboundslevel}
-
-\def\finishMMLbounds
- {\ifnum\MMLboundslevel>0
- \normalright.\!%
- \decrement\MMLboundslevel
- \expandafter\finishMMLbounds
- \else
- \popmacro\MMLboundslevel
- \fi}
-
-\defineXMLnested [msqrt] {\directsetup{mmp:msqrt:start}} {\directsetup{mmp:msqrt:stop}}
-\defineXMLnested [mroot] {\directsetup{mmp:mroot:start}} {\directsetup{mmp:mroot:stop}}
-
-\startsetups mmp:msqrt:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmp:msqrt:stop
- \stopsavingXMLelements
- \sqrt{\flushXMLstackfrom\plusone}
- \endgroup
-\stopsetups
-
-\startsetups mmp:mroot:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmp:mroot:stop
- \stopsavingXMLelements
- \root{\getXMLstackdata\plustwo}\of{\getXMLstackdata\plusone}
- \endgroup
-\stopsetups
-
-\setupMMLappearance[scripts][\c!alternative=\v!a]
-
-\defineXMLnested [msub] {\directsetup{mmp:msub:start}} {\directsetup{mmp:msub:stop}}
-\defineXMLnested [msup] {\directsetup{mmp:msup:start}} {\directsetup{mmp:msup:stop}}
-\defineXMLnested [msubsup] {\directsetup{mmp:msbp:start}} {\directsetup{mmp:msbp:stop}}
-
-\startsetups mmp:msub:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmp:msub:stop
- \stopsavingXMLelements
- \doifelse\@@MMLscriptsalternative\v!a {
- {\getXMLstackdata\plusone}_{\getXMLstackdata\plustwo}
- } {
- \getXMLstackdata\plusone_{\getXMLstackdata\plustwo}
- }
- \endgroup
-\stopsetups
-
-\startsetups mmp:msup:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmp:msup:stop
- \stopsavingXMLelements
- \doifelse\@@MMLscriptsalternative\v!a {
- {\getXMLstackdata\plusone}^{\getXMLstackdata\plustwo}
- } {
- \getXMLstackdata\plusone^{\getXMLstackdata\plustwo}
- }
- \endgroup
-\stopsetups
-
-\startsetups mmp:msbp:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmp:msbp:stop
- \stopsavingXMLelements
- \getXMLstackdata\plusone_{\getXMLstackdata\plustwo}^{\getXMLstackdata\plusthree}
- \endgroup
-\stopsetups
-
-\defineXMLnested [mover] {\directsetup{mmp:mover:start}} {\directsetup{mmp:mover:stop}}
-\defineXMLnested [munder] {\directsetup{mmp:munder:start}} {\directsetup{mmp:munder:stop}}
-\defineXMLnested [munderover] {\directsetup{mmp:munderover:start}} {\directsetup{mmp:munderover:stop}}
-
-\startsetups mmp:mover:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmp:mover:stop
- \stopsavingXMLelements
- \mathop{\vbox{\mathsurround\zeropoint\ialign{\hss##\hss\crcr\noalign{\kern3\points}%
- \disabledelimiter\doMMLfiller{\getXMLstackdata\plustwo}
- \crcr\noalign{\kern3\points\nointerlineskip}%
- \disabledelimiter\doMMLfiller{\getXMLstackdata\plusone}
- \crcr}}}
- \limits
- \endgroup
-\stopsetups
-
-\startsetups mmp:munder:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmp:munder:stop
- \stopsavingXMLelements
- \mathop{\vtop{\mathsurround\zeropoint\ialign{\hss##\hss\crcr
- \disabledelimiter\doMMLfiller{\getXMLstackdata\plusone}
- \crcr\noalign{\kern3\points\nointerlineskip}%
- \disabledelimiter\doMMLfiller{\getXMLstackdata\plustwo}
- \crcr\noalign{\kern3\points}}}}
- \limits
- \endgroup
-\stopsetups
-
-\startsetups mmp:munderover:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmp:munderover:stop
- \stopsavingXMLelements
- \getXMLstackdata\plusone
- _{\disablefiller\disabledelimiter\getXMLstackdata\plustwo}
- ^{\disablefiller\disabledelimiter\getXMLstackdata\plusthree}
- \endgroup
-\stopsetups
-
-\def\doMMLfiller#1% bugged
- {\pushmacro\doMMLfiller
- \let\doMMLfiller\gobbleoneargument
- \gdef\dodoMMLfiller{\disablefiller\mathematics{#1}}%
- \hbox
- {\def\normalorfiller##1##2%
- {\gdef\dodoMMLfiller{\enablefiller#1}%
- \let\normalorfiller\gobbletwoarguments}%
- $#1$}%
- \popmacro\doMMLfiller
- \dodoMMLfiller}
-
-% tables
-
-% obsolete: \setupMMLappearance[mtable][\c!alternative=\v!a]
-
-\mapXMLvalue {mmp:mtable} {align:left} {right}
-\mapXMLvalue {mmp:mtable} {align:right} {left}
-\mapXMLvalue {mmp:mtable} {align:center} {middle}
-
-\mapXMLvalue {mmp:mtable} {frame:none} {off}
-\mapXMLvalue {mmp:mtable} {frame:solid} {on}
-\mapXMLvalue {mmp:mtable} {frame:on} {on}
-
-\defineXMLnested
- [mtable]
- [columnalign=,
- columnspacing=.25ex,
- rowspacing=.25ex,
- frame=,
- color=,
- background=]
- {\directsetup{mmp:mtable:start}}
- {\directsetup{mmp:mtable:stop}}
-
-\defineXMLnestedargument
- [mtr]
- {\MMPmtableHANDLEtr}
-
-\defineXMLnestedargument
- [mlabeledtr]
- {\MMPmtableHANDLEtr}
-
-\defineXMLnestedargument
- [mtd]
- [columnalign=,
- columnspacing=.25ex,
- rowspacing=.25ex,
- frame=,
- color=,
- background=]
- {\MMPmtableHANDLEtd}
-
-\startsetups mmp:mtable:start
- \vcenter \bgroup
- \MMLpTABLEsplitter{background} \c!backgroundcolor
- \MMLpTABLEsplitter{color} \c!color
- \MMLpTABLEmapper {frame} \c!frame
- \MMLpTABLEmapper {columnalign}\c!align
- \setMMLpunit{\XMLpar{mtable}{rowspacing}\empty}{.25ex}
- \let\MMLpTABLEoffset\MMLpunit
- \bTABLE[\c!frame=\v!off,\c!background=\v!color,\c!offset=\MMLpTABLEoffset]
-\stopsetups
-
-\startsetups mmp:mtable:stop
- \eTABLE
- \egroup
-\stopsetups
-
-\long\def\MMPmtableHANDLEtr#1{%
- \bTR\ignorespaces#1\removeunwantedspaces\eTR
-}
-
-\long\def\MMPmtableHANDLEtd#1{%
- \let\theMMLpTABLEmap\empty
- \MMLpTABLEmap{background} \c!backgroundcolor
- \MMLpTABLEmap{color} \c!color
- \MMLpTABLEmap{frame} \c!frame
- \MMLpTABLEmap{columnalign}\c!align
- \expanded{\bTD[\theMMLpTABLEmap]}%
- $\ignorespaces#1\removeunwantedspaces$\eTD
-}
-
-\def\MMLpTABLEmapper#1#2%
- {\doifXMLparelse{mtable}{#1}
- {\newcounter\MMLcounter
- \def\docommand##1%
- {\increment\MMLcounter
- \expanded{\setupTABLE[column][\MMLcounter][#2=\XMLval{mmp:mtable}{#2:##1}\empty]}}%
- \expanded{\processseparatedlist[\XMLpar{mtable}{#1}\empty]}[ ]\docommand}
- {}}
-
-\def\MMLpTABLEsplitter#1#2%
- {\doifXMLparelse{mtable}{#1}
- {\newcounter\MMLcounter
- \def\docommand##1%
- {\increment\MMLcounter
- \expanded{\setupTABLE[column][\MMLcounter][#2=##1]}}%
- \expanded{\processseparatedlist[\XMLpar{mtable}{#1}\empty]}[ ]\docommand}
- {}}
-
-\def\MMLpTABLEmap#1#2%
- {\doifXMLparelse{mtd}{#1}
- {\edef\theMMLpTABLEmap{#2=\XMLval{mmp:mtable}{#2:\XMLpar{mtd}{#1}\empty}\empty,\theMMLpTABLEmap}}
- {}}
-
-\defineXMLsingular [mspace] [width=.5em] {\directsetup{mmp:mspace}}
-
-\startsetups mmp:mspace
- \setMMLpunit{\XMLpar{mspace}{width}{}}{.5em}
- \hskip\MMLpunit\relax
-\stopsetups
-
-\def\setMMLpunit#1#2% i've forgotten what this means
- {\setbox\scratchbox=\hbox
- {\edef\ascii{#1}%
- \@EA\aftersplitstring\ascii\at.\to\ascii
- \scratchcounter=\ifx\ascii\empty#1\else\ascii\fi
- \unskip\unskip}%
- \ifdim\wd\scratchbox=\zeropoint
- \edef\MMLpunit{#1em}%
- \else
- \edefconvertedargument\ascii{#1}%
- \convertasciiafter\doifinstringelse{em}{\ascii}{\edef\MMLpunit{#1}}{%
- \convertasciiafter\doifinstringelse{ex}{\ascii}{\edef\MMLpunit{#1}}{%
- \convertasciiafter\doifinstringelse{pt}{\ascii}{\edef\MMLpunit{#1}}{%
- \edef\MMLpunit{#2}}}}%
- \fi}
-
-% end of tables
-
-\def\setMMLpunit#1#2%
- {\setbox\scratchbox=\hbox
- {\edef\ascii{#1}%
- \@EA\aftersplitstring\ascii\at.\to\ascii
- \scratchcounter=\ifx\ascii\empty#1\else\ascii\fi
- \unskip\unskip}%
- \ifdim\wd\scratchbox=\zeropoint
- \edef\MMLpunit{#1em}%
- \else
- \edefconvertedargument\ascii{#1}%
- \convertasciiafter\doifinstringelse{em}{\ascii}{\edef\MMLpunit{#1}}{%
- \convertasciiafter\doifinstringelse{ex}{\ascii}{\edef\MMLpunit{#1}}{%
- \convertasciiafter\doifinstringelse{pt}{\ascii}{\edef\MMLpunit{#1}}{%
- \edef\MMLpunit{#2}}}}%
- \fi}
-
-\defineXMLsingular [mspace] [width=.5em] {\directsetup{mmp:mspace}}
-
-\startsetups mmp:mspace
- \setMMLpunit{\XMLpar{mspace}{width}{}}{.5em}
- \hskip\MMLpunit
-\stopsetups
-
-\defineXMLsingular [mglyph] [fontfamily=,index=1,alt=] {\directsetup{mmp:mglyph}}
-
-\startsetups mmp:mglyph
- \def\MMLpglyph{\XMLpar{mglyph}{fontfamily}{}}%
- \doifelsenothing{\MMLpglyph} {
- \hbox{\tttf[fontfamily unspecified]}
- } {
- \doifdefinedelse{\MMLpglyph} {
- \hbox{\getvalue{\MMLpglyph}\char0\XMLpar{mglyph}{index}{1}}
- } {
- \doifelsenothing{\XMLpar{mglyph}{alt}{}} {
- \hbox{\tttf[unknown fontfamily \XMLpar{mglyph}{fontfamily}{}]}
- } {
- \hbox{\tttf\XMLpar{mglyph}{alt}{}}
- }
- }
- }
-\stopsetups
-
-\defineXMLsingular [malignmark] {}
-\defineXMLsingular [none] {}
-\defineXMLsingular [mprescripts] {}
-
-\defineXMLnested
- [mmultiscripts]
- {\setups{mmp:mmultiscripts:start}}
- {\setups{mmp:mmultiscripts:stop}}
-
-\startsetups mmp:mmultiscripts:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmp:mmultiscripts:stop
- \stopsavingXMLelements
- \donefalse
- \scratchcounter\zerocount
- \dorecurse\XMLstacklevel {
- % watch the extra {}'s
- \ifdone
- \ifodd\scratchcounter
- _{\getXMLstackdata\recurselevel}
- \else
- ^{\getXMLstackdata\recurselevel}{}
- \fi
- \else
- \doif{\getXMLstackname\recurselevel}{mprescripts}{\donetrue{}}
- \fi
- \ifdone \advance\scratchcounter\plusone \fi
-
- }
- \donetrue
- \scratchcounter\zerocount
- \dorecurse\XMLstacklevel {
- \ifdone
- % watch the extra {}'s
- \ifcase\scratchcounter
- \getXMLstackdata\recurselevel
- \else\ifodd\scratchcounter
- _{\getXMLstackdata\recurselevel}
- \else
- ^{\getXMLstackdata\recurselevel}{}
- \fi\fi
- \fi
- \doif{\getXMLstackname\recurselevel}{mprescripts}{\donefalse}
- \ifdone \advance\scratchcounter\plusone \fi
- }
- \endgroup
-\stopsetups
-
-% experimental patches
-
-\startmoduletestsection
-
-\let\MMLdoL\donothing
-\let\MMLdoR\donothing
-
-\startsetups mmc:apply:start
- \begingroup
- \startsavingXMLelements
-\stopsetups
-
-\startsetups mmc:apply:stop
- \stopsavingXMLelements
- \MMLmathinner {
- \expanded{\doifinsetelse{\getXMLstackname\plusone}{\MMLcmainresetlist,\MMLctempresetlist}}
- \MMLcreset
- \donothing
- \ifcase\MMLapplydepth \else
- \doifXMLparelse{apply}{open} \donothing{\getXMLarguments{apply}{open="("}}% slow
- \doifXMLparelse{apply}{close}\donothing{\getXMLarguments{apply}{close=")"}}% slow
- \fi
- \advance\MMLapplydepth\plusone
- \begingroup
- \doifXMLparelse{apply}{open} % now inside the group
- {\edef\MMLdoL{\noexpand\left \XMLpar{apply}{open} {(}}
- \edef\MMLdoR{\noexpand\right\XMLpar{apply}{close}{)}}}
- {\let\MMLdoL\donothing
- \let\MMLdoR\donothing}
- \let\MMLctempresetlist\empty
- \doifelse {\getXMLstackname\plusone} {apply} {
- % <apply> <apply> ... </apply> <ci> .. </ci> </apply>
- \doifelseMMCfunctioninapply \plusone {plus,minus} {
-% [a]
- % yet incomplete and rather untested
- % <apply> <apply> <minus/> <tan/> <cos/> </apply> <ci>x</ci> </apply>
- } {
-% [b]
- \MMLcreset
- }
- \MMLdoL
- \getXMLstackdata\plusone
- \ifconditional\somepostponedMMLactions
- \postponedMMLactions
- \else
- \left(\MMLcreset\getXMLstackdata\plustwo\right)
- \fi
- \MMLdoR
- } {
- \doifelse {\getXMLstackname\plusone} {fn} {
-% [c]
- % \MMLdoL/R are to be taken care of in the next setup
- \directsetup{mmc:fn:apply}
- } {
- \doifelse {\getXMLstackname\plusone} {csymbol} {
- % \MMLdoL/R are to be taken care of in the next setup
-% [d]
- \directsetup{mmc:csymbol:apply}
- } {
- \doifelse {\getXMLstackname\plusone} {ci} {
-% [e]
- % \MMLdoL/R are to be taken care of in the next setup
- \directsetup{mmc:ci:apply}
- } {
-% [f]
- \MMLdoL
- \getXMLstackdata\plusone
- \MMLdoR
- }
- }
- }
- }
- \endgroup
- \advance\MMLapplydepth\minusone
- \directsetup{apply:flush}
- }
- \endgroup
-\stopsetups
-
-\startsetups mmc:fn:apply
- \begingroup
- \startsavingXMLelements
- \rawXMLstacktext\plusone % still on stack, no check, just fn content
- \stopsavingXMLelements
- \doifelse {\getXMLstackname\plusone} {ci} {
- \flattenXMLcontent{\getXMLstackdata\plusone}
- \doifsetupselse{mmc:fn:\flattenedXMLcontent} {
- % \MMLdoL/MMLdoR to be handled in plugin
- \global\defXMLstackdata\XMLfnoperator\plusone
- \expanded{\endgroup\noexpand\directsetup{mmc:fn:\flattenedXMLcontent}}
- } {
- \endgroup
- \MMLcreset
- \MMLdoL
- \getXMLstackdata\plusone
- \ifnum\XMLstacklevel>\plusone
- \getXMLentity{NegThinSpace}
- \left(\MMLcreset\flushXMLstackwith\plustwo{\MMLseparator,}\right)
- \fi
- \MMLdoR
- }
- } {
- \endgroup
- \MMLcreset
- \MMLdoL
- \getXMLstackdata\plusone
- \MMLdoR
- }
-\stopsetups
-
-\startsetups mmc:csymbol:apply
- \begingroup
- \defineXMLsave[csymbol][definitionURL=,encoding=]
- \rawXMLstackdata\plusone % was text % still on stack, no check, just attr test
- % \MMLdoL/MMLdoR to be handled in plugin
- \lowercasestring\XMLpar{csymbol}{definitionURL}{}\to\mmcSymbolURL
- \doifsetupselse{mmc:csymbol:\mmcSymbolURL} {
- \expanded{\endgroup\noexpand\directsetup{mmc:csymbol:\mmcSymbolURL}}
- } {
- \endgroup
- %\XMLval{mmc:cs}{\XMLop{encoding}}{\firstofoneargument}% fails when no content
- \XMLval{mmc:cs}{\XMLop{encoding}}{}
- }
-\stopsetups
-
-\defineXMLsingular
- [csymbol]
- [encoding=text,
- definitionURL=]
- {\directsetup{mmc:csymbol:apply:singular}}
-
-\startsetups mmc:csymbol:apply:singular
- \lowercasestring\XMLpar{csymbol}{definitionURL}{}\to\mmcSymbolURL
- \directsetup{mmc:csymbol:\mmcSymbolURL}
-\stopsetups
-
-\startsetups mmc:ci:apply
- \getXMLstackdata\plusone
- \ifnum\XMLstacklevel>\plusone
- \left(\MMLcreset\flushXMLstackwith\plustwo{\MMLseparator,}\right)
- \fi
-\stopsetups
-
-\def\xflushXMLstackwith#1#2#3#4% num bgroup egroup whatever
- {\dostepwiserecurse{#1}\XMLstacklevel\plusone
- {#2\relax
- \ifnum\recurselevel>#1\relax#4\fi
- \getXMLstackdata\recurselevel
- #3}}
-
-\def\xflushXMLstackfrom#1#2#3%
- {\dostepwiserecurse{#1}\XMLstacklevel\plusone
- {#2\getXMLstackdata\recurselevel#3}}
-
-% <apply><divide/>
-% <apply><minus/>
-% <apply><minus/><ci>b</ci></apply>
-% <apply><minus/><ci>b</ci></apply>
-% <apply><root/> <ci>a</ci></apply>
-% </apply>
-% <apply><minus/>
-% <apply><minus/><ci>b</ci><ci>b</ci></apply>
-% <apply><minus/><ci>b</ci></apply>
-% <apply><root/> <ci>a</ci></apply>
-% </apply>
-% </apply>
-
-\startsetups mmc:minus
- \doif \@@MMLsignreduction \v!yes {
- \setMMLcreset{fn,\MMLcfunctionlist}
- }
- \ifcase\XMLstacklevel
- \or
- % self
- \or
- -\getXMLstackdata\plustwo
- \else
- \dostepwiserecurse\plustwo\XMLstacklevel\plusone {
- \begingroup
- \doifelse {\getXMLstackname\recurselevel} {apply} {
- \ifnum\recurselevel=\plustwo
- \begingroup
- \dodoifelseMMCfunctioninapply \recurselevel {minus} {
- \ifnum\XMLstacklevel>\plustwo
- \endgroup
- \else
- \endgroup
- \MMLcreset
- \fi
- } {
- \endgroup
- }
- \else
- \doifelseMMCfunctioninapply \recurselevel {\MMLcfunctionlist,\MMLcconstructlist} {
- \MMLcreset
- } {
- }
- \fi
- } {
- }
- \getXMLstackdata\recurselevel
- \ifnum\recurselevel<\XMLstacklevel\relax
- -
- \fi
- \endgroup
- }
- \fi
-\stopsetups
-
-\stopmoduletestsection
-
-\stopmodule
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/x-newmml.mkiv b/Master/texmf-dist/tex/context/base/x-newmml.mkiv
deleted file mode 100644
index 4c12daeeeb3..00000000000
--- a/Master/texmf-dist/tex/context/base/x-newmml.mkiv
+++ /dev/null
@@ -1,16 +0,0 @@
-%D \module
-%D [ file=x-newmml,
-%D version=2008.05.28,
-%D title=\CONTEXT\ XML Modules,
-%D subtitle=MathML Renderer,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 x-mathml.mkiv
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-newmmo.mkii b/Master/texmf-dist/tex/context/base/x-newmmo.mkii
deleted file mode 100644
index 97fdeb06c0b..00000000000
--- a/Master/texmf-dist/tex/context/base/x-newmmo.mkii
+++ /dev/null
@@ -1,210 +0,0 @@
-%D \module
-%D [ file=x-newmmo,
-%D version=2006.05.17,
-%D title=\CONTEXT\ XML Macros,
-%D subtitle=MathML Renderer/Open Math Extensions,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Strange things, why not mapped onto normal content MathML and/or
-%D onto processing instructions.
-
-\unprotect
-
-%D \startbuffer
-%D <math xmlns="http://www.w3.org/1998/Math/MathML">
-%D <vector>
-%D <apply>
-%D <csymbol definitionURL="http://www.openmath.org/cd/nums1#rational"/>
-%D <ci>a</ci>
-%D <cn type="integer">2</cn>
-%D </apply>
-%D <ci>a</ci>
-%D </vector>
-%D </math>
-%D \stopbuffer
-%D
-%D \typebuffer \processXMLbuffer
-
-\startsetups mmc:csymbol:http://www.openmath.org/cd/nums1\letterhash rational
- \MMLcreset
- \getXMLstackdata\plustwo/\getXMLstackdata\plusthree
-\stopsetups
-
-%D \startbuffer
-%D <math xmlns="http://www.w3.org/1998/Math/MathML">
-%D <apply>
-%D <csymbol definitionURL="http://www.openmath.org/cd/math4all#diffquot"/>
-%D <ci>y</ci>
-%D <ci>x</ci>
-%D </apply>
-%D </math>
-%D \stopbuffer
-%D
-%D \typebuffer \processXMLbuffer
-
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash diffquot
- \MMLcreset
- \frac {
- \Delta\getXMLstackdata\plustwo
- } {
- \Delta\getXMLstackdata\plusthree
- }
-\stopsetups
-
-%D \startbuffer
-%D <math xmlns="http://www.w3.org/1998/Math/MathML">
-%D <apply>
-%D <csymbol definitionURL="http://www.openmath.org/cd/math4all#difference"/>
-%D <ci>y</ci>
-%D </apply>
-%D </math>
-%D \stopbuffer
-%D
-%D \typebuffer \processXMLbuffer
-%D
-%D \startbuffer
-%D <math xmlns="http://www.w3.org/1998/Math/MathML">
-%D <apply>
-%D <csymbol definitionURL="http://www.openmath.org/cd/math4all#difference"/>
-%D <apply>
-%D <eq/>
-%D <ci>y</ci>
-%D <apply>
-%D <minus/>
-%D <apply>
-%D <ci>f</ci>
-%D <ci>x</ci>
-%D </apply>
-%D <apply>
-%D <ci>f</ci>
-%D <apply>
-%D <minus/>
-%D <ci>x</ci>
-%D <cn type="integer">1</cn>
-%D </apply>
-%D </apply>
-%D </apply>
-%D </apply>
-%D </apply>
-%D </math>
-%D \stopbuffer
-%D
-%D \typebuffer \processXMLbuffer
-
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash difference
- \MMLcreset
- \Delta\getXMLstackdata\plustwo
-\stopsetups
-
-%D \startbuffer
-%D <math xmlns="http://www.w3.org/1998/Math/MathML">
-%D <apply>
-%D <csymbol definitionURL="http://www.openmath.org/cd/math4all#diff"/>
-%D <ci>s</ci>
-%D <ci>t</ci>
-%D </apply>
-%D </math>
-%D \stopbuffer
-%D
-%D \typebuffer \processXMLbuffer
-
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash diff
- \MMLcreset
- \frac {
- \mfunction{\getXMLentity{mathematicald}}\getXMLstackdata\plustwo
- } {
- \mfunction{\getXMLentity{mathematicald}}\getXMLstackdata\plusthree
- }
-\stopsetups
-
-%D A unit mess.
-
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@second {\mr s}\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@minute {\mr m}\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@hour {\mr h}\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@day {\mr d}\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@week {\mr w}\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@month {\mr m}\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@year {\mr y}\stopsetups
-
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@meter {\mr m}\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@gram {\mr g}\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@liter {\mr l}\stopsetups
-
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@watt {\mr W}\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@pascal {\mr P}\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@kelvin {\mr K}\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@celsius {\mr C}\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@newton {\mr N}\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@byte {\mr B}\stopsetups
-
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@pico {\mr p}\getXMLstackdata\plustwo\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@micro \mu\getXMLstackdata\plustwo\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@milli {\mr m}\getXMLstackdata\plustwo\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@centi {\mr c}\getXMLstackdata\plustwo\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@deci {\mr d}\getXMLstackdata\plustwo\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@deca {\mr d}\getXMLstackdata\plustwo\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@hecto {\mr h}\getXMLstackdata\plustwo\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@kilo {\mr k}\getXMLstackdata\plustwo\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@mega {\mr m}\getXMLstackdata\plustwo\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@giga {\mr g}\getXMLstackdata\plustwo\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@tera {\mr t}\getXMLstackdata\plustwo\stopsetups
-
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash procent \procent\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash promille \promille\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash degree ^\circ\stopsetups
-
-% whatever
-
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash triangle
- \Delta\,
-\stopsetups
-
-% crap
-
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@degree_celsius
- \directsetup{mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@celsius}
-\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@degree_kelvin
- \directsetup{mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@kelvin}
-\stopsetups
-
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@metre
- \directsetup{mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@meter}
-\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@gramme
- \directsetup{mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@gram}
-\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@litre
- \directsetup{mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@liter}
-\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@calendar_month
- \directsetup{mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@month}
-\stopsetups
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@calendar_year
- \directsetup{mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@year}
-\stopsetups
-
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash degree_angle
- \directsetup{mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash degree}
-\stopsetups
-
-\defineXMLargument
- [ci]
- {\checkMMLciSYMBOL}
-
-\def\checkMMLciSYMBOL#1%
- {\defconvertedargument\ascii{#1}%
- \executeifdefined{ci:symbol:crap:\ascii}{#1}}
-
-\setvalue{ci:symbol:crap:alpha}{\alpha}
-\setvalue{ci:symbol:crap:beta}{\beta}
-\setvalue{ci:symbol:crap:gamma}{\gamma}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/x-newpml.mkii b/Master/texmf-dist/tex/context/base/x-newpml.mkii
deleted file mode 100644
index ea3bae18262..00000000000
--- a/Master/texmf-dist/tex/context/base/x-newpml.mkii
+++ /dev/null
@@ -1,250 +0,0 @@
-%D \module
-%D [ file=xtag-pml,
-%D version=2001.06.10,
-%D title=\CONTEXT\ XML Support,
-%D subtitle=Units,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 XML Macros / Units}
-
-\usemodule[newmml]
-
-%D Quick and dirty in||line units:
-%D
-%D \startbuffer
-%D <phys>
-%D <cn> 10 </cn>
-%D <cu> <Newton/> <Square/> <Meter/> <Per/> <Sec/> </cu>
-%D </phys>
-%D \stopbuffer
-%D
-%D \typebuffer \processXMLbuffer
-%D
-%D A more \MATHML||like unit application:
-%D
-%D \startbuffer
-%D <phys> <apply> <unit/>
-%D <cn> 10 </cn>
-%D <csymbol> <Square/> <Meter/> <Per/> <Sec/> </csymbol>
-%D </apply> </phys>
-%D \stopbuffer
-%D
-%D \typebuffer \processXMLbuffer
-%D
-%D A bit more compact:
-%D
-%D \startbuffer
-%D <phys> <apply> <unit/>
-%D <cn> 10 </cn>
-%D <cu> <Square/> <Meter/> <Per/> <Sec/> </cu>
-%D </apply> </phys>
-%D \stopbuffer
-%D
-%D \typebuffer \processXMLbuffer
-%D
-%D A bit more complicated:
-%D
-%D \startbuffer
-%D <phys> <apply> <unit/>
-%D <apply> <divide/> <ci> a </ci> <cn> 10 </cn> </apply>
-%D <cu> <Square/> <Meter/> <Per/> <Sec/> </cu>
-%D </apply> </phys>
-%D \stopbuffer
-%D
-%D \typebuffer \processXMLbuffer
-%D
-%D An alternative (equivalent) for \type {</cu>}:
-%D
-%D \startbuffer
-%D <phys> <apply> <unit/>
-%D <cn> 10 </cn> <cunseq> <Square/> <Meter/> <Per/> <Sec/> </cunseq>
-%D </apply> </phys>
-%D \stopbuffer
-%D
-%D \typebuffer \processXMLbuffer
-
-\usemodule[units]
-
-\unprotect
-
-\defineXMLargument [phys] \automathematics
-\defineXMLargument [iphys] \inlinemathematics
-\defineXMLargument [dphys] \displaymathematics
-
-\defineXMLcommand [unit] {\directsetup{pml:unit}}
-
-\startsetups pml:unit
- \flushXMLstackwith\plustwo\relax
-\stopsetups
-
-% \defineXMLenvironment
-% [unit]
-% {\ignorespaces}
-% {\removeunwantedspaces}
-
-\defineXMLsingular
- [unit]
- [label=]
- {\XMLop{label}}
-
-\defineXMLsingular
- [unitmeaning]
- [label=]
- {\expanded{\unitmeaning{\XMLop{label}}}}
-
-\let\handlePMLunit\firstofoneargument
-
-%D All unit commands are remapped in a similar way.
-
-\defineXMLsingular [Atto] {\handlePMLunit\Atto}
-\defineXMLsingular [Femto] {\handlePMLunit\Femto}
-\defineXMLsingular [Pico] {\handlePMLunit\Pico}
-\defineXMLsingular [Nano] {\handlePMLunit\Nano}
-\defineXMLsingular [Micro] {\handlePMLunit\Micro}
-\defineXMLsingular [Milli] {\handlePMLunit\Milli}
-\defineXMLsingular [Centi] {\handlePMLunit\Centi}
-\defineXMLsingular [Deci] {\handlePMLunit\Deci}
-\defineXMLsingular [Hecto] {\handlePMLunit\Hecto}
-\defineXMLsingular [Kilo] {\handlePMLunit\Kilo}
-\defineXMLsingular [Mega] {\handlePMLunit\Mega}
-\defineXMLsingular [Giga] {\handlePMLunit\Giga}
-\defineXMLsingular [Terra] {\handlePMLunit\Terra}
-\defineXMLsingular [Peta] {\handlePMLunit\Peta}
-\defineXMLsingular [Exa] {\handlePMLunit\Exa}
-
-\defineXMLsingular [Times] {\handlePMLunit\Times}
-\defineXMLsingular [Solidus] {\handlePMLunit\Solidus}
-\defineXMLsingular [Per] {\handlePMLunit\Per}
-\defineXMLsingular [OutOf] {\handlePMLunit\OutOf}
-
-\defineXMLsingular [Linear] {\handlePMLunit\Linear}
-\defineXMLsingular [Square] {\handlePMLunit\Square}
-\defineXMLsingular [Cubic] {\handlePMLunit\Cubic}
-
-\defineXMLsingular [Inverse] {\handlePMLunit\Inverse}
-
-\defineXMLsingular [Degrees] {\handlePMLunit\Degrees}
-\defineXMLsingular [Meter] {\handlePMLunit\Meter}
-\defineXMLsingular [Liter] {\handlePMLunit\Liter}
-\defineXMLsingular [Sec] {\handlePMLunit\Sec}
-\defineXMLsingular [Year] {\handlePMLunit\Year}
-\defineXMLsingular [Month] {\handlePMLunit\Month}
-\defineXMLsingular [Week] {\handlePMLunit\Week}
-\defineXMLsingular [Day] {\handlePMLunit\Day}
-\defineXMLsingular [Hour] {\handlePMLunit\Hour}
-\defineXMLsingular [Min] {\handlePMLunit\Min}
-\defineXMLsingular [Minute] {\handlePMLunit\Min}
-\defineXMLsingular [Second] {\handlePMLunit\Sec}
-\defineXMLsingular [Rad] {\handlePMLunit\Rad}
-\defineXMLsingular [Deg] {\handlePMLunit\Deg}
-\defineXMLsingular [Hertz] {\handlePMLunit\Hertz}
-\defineXMLsingular [RevPerSec] {\handlePMLunit\RevPerSec}
-\defineXMLsingular [RevPerMin] {\handlePMLunit\RevPerMin}
-\defineXMLsingular [Gram] {\handlePMLunit\Gram}
-\defineXMLsingular [Atom] {\handlePMLunit\Atom}
-\defineXMLsingular [Newton] {\handlePMLunit\Newton}
-\defineXMLsingular [Pascal] {\handlePMLunit\Pascal}
-\defineXMLsingular [Joule] {\handlePMLunit\Joule}
-\defineXMLsingular [Watt] {\handlePMLunit\Watt}
-\defineXMLsingular [Celsius] {\handlePMLunit\Celsius}
-\defineXMLsingular [Kelvin] {\handlePMLunit\Kelvin}
-\defineXMLsingular [Fahrenheit] {\handlePMLunit\Fahrenheit}
-\defineXMLsingular [Mol] {\handlePMLunit\Mol}
-\defineXMLsingular [Molair] {\handlePMLunit\Molair}
-\defineXMLsingular [Equivalent] {\handlePMLunit\Equivalent}
-\defineXMLsingular [Farad] {\handlePMLunit\Farad}
-\defineXMLsingular [Ohm] {\handlePMLunit\Ohm}
-\defineXMLsingular [Siemens] {\handlePMLunit\Siemens}
-\defineXMLsingular [Ampere] {\handlePMLunit\Ampere}
-\defineXMLsingular [Coulomb] {\handlePMLunit\Coulomb}
-\defineXMLsingular [Volt] {\handlePMLunit\Volt}
-\defineXMLsingular [eVolt] {\handlePMLunit\eVolt}
-\defineXMLsingular [Tesla] {\handlePMLunit\Tesla}
-\defineXMLsingular [VoltAC] {\handlePMLunit\VoltAC}
-\defineXMLsingular [VoltDC] {\handlePMLunit\VoltDC}
-\defineXMLsingular [Baud] {\handlePMLunit\Baud}
-\defineXMLsingular [Bit] {\handlePMLunit\Bit}
-\defineXMLsingular [Byte] {\handlePMLunit\Byte}
-\defineXMLsingular [Bequerel] {\handlePMLunit\Bequerel}
-\defineXMLsingular [Sievert] {\handlePMLunit\Sievert}
-\defineXMLsingular [Candela] {\handlePMLunit\Candela}
-\defineXMLsingular [Bell] {\handlePMLunit\Bell}
-\defineXMLsingular [At] {\handlePMLunit\At}
-\defineXMLsingular [Atm] {\handlePMLunit\Atm}
-\defineXMLsingular [Bar] {\handlePMLunit\Bar}
-\defineXMLsingular [EVolt] {\handlePMLunit\EVolt}
-\defineXMLsingular [Foot] {\handlePMLunit\Foot}
-\defineXMLsingular [Inch] {\handlePMLunit\Inch}
-\defineXMLsingular [Cal] {\handlePMLunit\Cal}
-\defineXMLsingular [Force] {\handlePMLunit\Force}
-\defineXMLsingular [Lux] {\handlePMLunit\Lux}
-\defineXMLsingular [Gray] {\handlePMLunit\Gray}
-\defineXMLsingular [Weber] {\handlePMLunit\Weber}
-\defineXMLsingular [Henry] {\handlePMLunit\Henry}
-\defineXMLsingular [Sterant] {\handlePMLunit\Sterant}
-\defineXMLsingular [Angstrom] {\handlePMLunit\Angstrom}
-\defineXMLsingular [Gauss] {\handlePMLunit\Gauss}
-
-\defineXMLsingular [Percent] {\handlePMLunit\Percent}
-\defineXMLsingular [Promille] {\handlePMLunit\Promille}
-\defineXMLsingular [Permille] {\handlePMLunit\Permille}
-
-\defineXMLsingular [Unit] {\handlePMLunit\Unit}
-\defineXMLsingular [NoUnit] {\handlePMLunit\NoUnit}
-
-\protect \doifnotmode{demo}{\endinput}
-
-\starttext
-
-\startXMLdata
-<phys>
- <apply> <times/>
- <cn> 1 </cn>
- <ci><unit><Milli/><Sec/><Per/><Square/><Kilo/><Meter/></unit> </ci>
- </apply>
-</phys>
-\stopXMLdata
-
-\startXMLdata
-<phys>
- <apply> <divide/>
- <cn> 2 </cn>
- <ci> <unit><Unit/><Milli/><Sec/><Per/><Square/><Kilo/><Meter/></unit> </ci>
- </apply>
-</phys>
-\stopXMLdata
-
-\startXMLdata
-<phys>
- <apply> <times/>
- <cn> 3 </cn>
- <ci> <unit> <Milli/> <Sec/> <Per/> <Square/> <Kilo/> <Meter/> </unit> </ci>
- </apply>
-</phys>
-\stopXMLdata
-
-\startXMLdata
-<phys>
- <apply> <times/>
- <cn> 4 </cn>
- <ci> <unit><Milli/><Sec/><Per/><Square/><Kilo/><Meter/></unit> </ci>
- </apply>
-</phys>
-\stopXMLdata
-
-\startXMLdata
-<phys>
- <apply> <times/>
- <cn> 5 </cn>
- <ci> <unit> <Milli/> <Sec/> <Per/> <Square/> <Kilo/> <Meter/> </unit> </ci>
- </apply>
-</phys>
-\stopXMLdata
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/x-om2cml.xsl b/Master/texmf-dist/tex/context/base/x-om2cml.xsl
deleted file mode 100644
index 4070d94dcc7..00000000000
--- a/Master/texmf-dist/tex/context/base/x-om2cml.xsl
+++ /dev/null
@@ -1,1342 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- This style sheet is used in the Math4All project. This project
- will provide an on-line math method for secondary and tertiary
- education. In addition to the web-bases content the project
- provides high quality typeset output as well.
-
- This stylesheet is a copy of the one used by the group of Arjeh
- Cohen (TU Eindhoven). This steet has multiple authors: David
- Carlisle, and Clare M. So and Hans Cuypers (also see notice
- below.)
-
- In due time we may extend this sheet with options needed for the
- project (alternative rendering, additional dictionaries).
-
- Hans Hagen, PRAGMA ADE, Hasselt NL / 2006-04-14
-
--->
-
-<!-- ********************************************************** -->
-<!-- XSL Transform of OpenMath to Content MathML -->
-<!-- (Based on initial version by David Carlisle) -->
-<!-- -->
-<!-- Author: Clare M. So <clare@scl.csd.uwo.ca> -->
-<!-- -->
-<!-- May to August 2002 -->
-<!-- -->
-<!-- (Last updated July 9, 2003) -->
-<!-- ********************************************************** -->
-
-<!-- ********************************************************** -->
-<!-- CHANGE LOG -->
-<!-- ********************************************************** -->
-<!-- May 13, 2003 - Add template nthdiff of calculus1 CD -->
-<!-- May 14, 2003 - Add templates for moreerrors CD -->
-<!-- May 15, 2003 - Split templates for multiset1, set1, -->
-<!-- and list1 CDs -->
-<!-- Split templates for s_dist1 and s_data1 CDs -->
-<!-- June 4, 2003 - Fix bugs in splitting set1, multiset1, and -->
-<!-- set1 CDs -->
-<!-- - Add templates for transc3 CD -->
-<!-- July 9, 2003 - Add template for nthdiff -->
-
-<!-- Special MathML entities -->
-
-<!DOCTYPE stylesheet [
-<!ENTITY pi "&#x003C0;">
-<!ENTITY e "&#x02147E;">
-<!ENTITY ee "&#x02147E;">
-<!ENTITY ExponentialE "&#x02147E;">
-<!ENTITY ImaginaryI "&#x02148;">
-<!ENTITY ii "&#x02148;">
-<!ENTITY gamma "&#x003B3;">
-<!ENTITY infin "&#x0221E;">
-<!ENTITY infty "&#x0221E;">
-<!ENTITY true "&#xF0002;">
-<!ENTITY false "&#xF0003;">
-<!ENTITY NotANumber "&#xF0001;">
-<!ENTITY NaN "&#xF0001;">
-]>
-
-<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:om="http://www.openmath.org/OpenMath"
- xmlns="http://www.w3.org/1998/Math/MathML"
- exclude-result-prefixes="om"
- version="1.0">
-
- <!-- xsl:output method="xml" indent="yes"/ -->
- <xsl:output method="xml"/>
-
- <xsl:strip-space elements="*"/>
-
- <xsl:variable name="defaultOMSpriority">-10</xsl:variable>
-
- <!-- **************************************************** -->
- <!-- ****************** Basic Elements ****************** -->
- <!-- **************************************************** -->
-
- <!-- OMOBJ (D. Carlisle) / adapted by HH -->
-
-<xsl:template match="om:OMOBJ">
- <xsl:choose>
- <xsl:when test="@style='inline'">
- <imath>
- <xsl:apply-templates/>
- </imath>
- </xsl:when>
- <xsl:when test="@style='display'">
- <dmath>
- <xsl:apply-templates/>
- </dmath>
- </xsl:when>
- <xsl:otherwise>
- <math>
- <xsl:apply-templates/>
- </math>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
- <!-- OMI (D. Carlisle) -->
- <xsl:template match="om:OMI">
- <cn type="integer">
- <xsl:variable name="x" select="normalize-space(.)"/>
- <xsl:choose>
- <xsl:when test="contains($x,'x')">
- <xsl:attribute name="base">16</xsl:attribute>
- <xsl:value-of select="concat(substring-before($x,'x'),substring-after($x,'x'))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$x"/> <!-- default is decimal -->
- </xsl:otherwise>
- </xsl:choose>
- </cn>
- </xsl:template>
-
- <!-- OMV (D. Carlisle) -->
- <xsl:template match="om:OMV">
- <ci>
- <xsl:value-of select="normalize-space(@name)"/>
- </ci>
- </xsl:template>
-
- <!-- OMF (decimal) -->
- <xsl:template match="om:OMF[@dec]">
- <cn>
- <xsl:value-of select="normalize-space(@dec)"/>
- </cn>
- </xsl:template>
-
- <!-- OMF (hex) -->
- <xsl:template match="om:OMF[@hex]">
- <cn base="16">
- <xsl:value-of select="normalize-space(@hex)"/>
- </cn>
- </xsl:template>
-
- <!-- OMA (D. Carlisle) -->
- <xsl:template match="om:OMA">
- <apply>
- <xsl:apply-templates/>
- </apply>
- </xsl:template>
-
- <!-- OMB -->
- <!-- Note: No Content MathML equivalent -->
- <xsl:template match="om:OMB">
- <mtext definitionURL="http://www.openmath.org/objects#OMB">
- <xsl:value-of select="."/>
- </mtext>
- </xsl:template>
-
- <!-- OMSTR (D. Carlisle) -->
- <!-- Note: mtext is a presentational MathML tag -->
- <xsl:template match="om:OMSTR">
- <mtext>
- <xsl:value-of select="."/>
- </mtext>
- </xsl:template>
-
- <!-- ***************************************************** -->
- <!-- ****************** MathML group ******************** -->
- <!-- ***************************************************** -->
-
- <!-- Content Dicitionary: alg1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: zero, one -->
-
- <!-- Trivial cases: none -->
- <xsl:template match="om:OMS[@cd='alg1']">
- <xsl:element name="{@name}"/>
- </xsl:template>
-
- <!-- zero -->
- <xsl:template match="om:OMS[@cd='alg1' and @name='zero']">
- <cn type="integer">0</cn>
- </xsl:template>
-
- <!-- one -->
- <xsl:template match="om:OMS[@cd='alg1' and @name='one']">
- <cn type="integer">1</cn>
- </xsl:template>
-
- <!-- Content Dictionary: arith1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD conatains: abs, divide, gcd, lcm, minus, plus, power, product,
- root, sum, unary_minus -->
-
- <!-- Trivial Cases: abs, divide, gcd, lcm, minus, plus -->
- <xsl:template match="om:OMS[@cd='arith1']">
- <xsl:element name="{@name}">
- <xsl:choose>
- <xsl:when test="@name='times'">
- <xsl:choose>
- <xsl:when test="../@style='empty'">
- <xsl:attribute name='symbol'></xsl:attribute>
- </xsl:when>
- <xsl:when test="../@style='cross'">
- <xsl:attribute name='symbol'>times</xsl:attribute>
- </xsl:when>
- <xsl:when test="../@style=''">
- <!-- inherit from parent times -->
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name='symbol'><xsl:value-of select="../@style"/></xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="@name='divide'">
- <xsl:choose>
- <xsl:when test="../@style='inline'">
- <xsl:attribute name='alternative'>b</xsl:attribute>
- </xsl:when>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="@name='plus'">
- <xsl:choose>
- <xsl:when test="../@style='empty'">
- <xsl:attribute name='alternative'>b</xsl:attribute>
- </xsl:when>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <!-- forget about it -->
- </xsl:otherwise>
- </xsl:choose>
- </xsl:element>
- </xsl:template>
-
- <!-- unary_minus -->
- <xsl:template match="om:OMS[@cd='arith1' and @name='unary_minus']">
- <minus/>
- </xsl:template>
-
- <!-- root -->
- <xsl:template match="om:OMA[om:OMS[@cd='arith1' and @name='root']]">
- <apply>
- <root/>
- <degree>
- <xsl:apply-templates select="*[3]"/>
- </degree>
- <xsl:apply-templates select="*[2]"/>
- </apply>
- </xsl:template>
-
- <!-- sum and product -->
- <xsl:template match="om:OMA[om:OMS[@cd='arith1' and (@name='sum' or @name='product')]]">
- <apply>
- <xsl:element name="{om:OMS[1]/@name}"/>
- <bvar>
- <xsl:apply-templates select="." mode="getVar">
- <xsl:with-param name="NUM" select="3"/> <!-- the bounded var is in the func -->
- </xsl:apply-templates>
- </bvar>
- <xsl:apply-templates select="*[2]"/> <!-- range of product/summation -->
- <xsl:apply-templates select="*[3]"/>
- </apply>
- </xsl:template>
-
- <!-- Content Dictionary: bigfloat1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: bigfloat, bigfloatprec -->
-
- <!-- Trivial cases: none -->
-
- <!-- bigfloat -->
- <xsl:template match="om:OMA[om:OMS[@cd='bigfloat1' and @name='bigfloat']]">
- <apply>
- <times/>
- <xsl:apply-templates select="*[2]"/>
- <apply>
- <power/>
- <xsl:apply-templates select="*[3]"/>
- <xsl:apply-templates select="*[4]"/>
- </apply>
- </apply>
- </xsl:template>
-
- <!-- bigfloatprec -->
- <!-- Note: No Content MathML equivalent -->
- <xsl:template match="om:OMS[@cd='bigfloat1' and @name='bigfloatprec']">
- <csymbol encoding="OpenMath"
- definitionURL="http://www.openmath.org/cd/bigfloat1#bigfloatprec"/>
- </xsl:template>
-
- <!-- Content Dictionary: calculus1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: defint, diff, int, nthdiff, partialdiff -->
-
- <!-- Trivial cases: partialdiff -->
- <xsl:template match="om:OMS[@cd='calculus1']">
- <xsl:element name="{@name}"/>
- </xsl:template>
-
- <!-- diff, int -->
- <xsl:template match="om:OMA[om:OMS[@cd='calculus1' and (@name='diff' or @name='int')]]">
- <apply>
- <xsl:element name="{om:OMS[1]/@name}"/>
- <bvar>
- <xsl:apply-templates select="." mode="getVar">
- <xsl:with-param name="NUM" select="2"/>
- </xsl:apply-templates>
- </bvar>
- <xsl:apply-templates select="*[2]"/>
- </apply>
- </xsl:template>
-
- <!-- defint -->
- <xsl:template match="om:OMA[om:OMS[@cd='calculus1' and @name='defint']]">
- <apply>
- <int/> <!-- pretty much the same as sum and product... CHECK domainofapp -->
- <bvar> <!-- perphaps write a method for the similar parts... -->
- <xsl:apply-templates select="." mode="getVar">
- <xsl:with-param name="NUM" select="3"/>
- </xsl:apply-templates>
- </bvar>
- <xsl:apply-templates select="*[2]"/> <!-- range of diff -->
- <xsl:apply-templates select="*[3]"/>
- </apply>
- </xsl:template>
-
- <!-- nthdiff -->
- <xsl:template match="om:OMA[om:OMS[@cd='calculus1' and @name='nthdiff']]">
- <apply>
- <diff/>
- <bvar>
- <xsl:apply-templates select="." mode="getVar">
- <xsl:with-param name="NUM" select="3"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="*[2]"/>
- </bvar>
- <xsl:apply-templates select="*[3]"/>
- </apply>
- </xsl:template>
-
- <!-- Content Dictionaries: complex1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: argument, complex_cartesian, complex_polar, conjugate,
- imaginary, real -->
-
- <!-- Trivial cases: conjugate, imaginary, real -->
- <xsl:template match="om:OMS[@cd='complex1']">
- <xsl:element name="{@name}"/>
- </xsl:template>
-
- <!-- argument -->
- <xsl:template match="om:OMS[@cd='complex1' and @name='argument']">
- <arg/>
- </xsl:template>
-
- <!-- complex_cartesian or complex_polar -->
- <xsl:template match="om:OMA[om:OMS[@cd='complex1' and (@name='complex_cartesian' or @name='complex_polar')]]">
- <xsl:variable name="type_name" select="translate(om:OMS[1]/@name,'_','-')"/>
- <xsl:choose>
- <xsl:when test="child::om:OMV or child::om:OMA">
- <apply>
- <csymbol definitionURL="{concat('http://www.openmath.org/cd/complex1#',om:OMS[1]/@name)}"/>
- <xsl:apply-templates select="*[2]"/>
- <xsl:apply-templates select="*[3]"/>
- </apply>
- </xsl:when>
- <xsl:otherwise>
- <cn type="{$type_name}">
- <xsl:apply-templates select="*[2]" mode="convert"/>
- <sep/>
- <xsl:apply-templates select="*[3]" mode="convert"/>
- </cn>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!-- Content Dictionary: fns1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: domain, domainofapplication, identity, image, inverse,
- lambda, left_compose, left_inverse, right_inverse -->
-
- <!-- Trivial cases: domain, image, inverse -->
- <xsl:template match="om:OMS[@cd='fns1']">
- <xsl:element name="{@name}"/>
- </xsl:template>
-
- <!-- domainofapplication -->
- <xsl:template match="om:OMA[om:OMS[@cd='fns1' and @name='domainofapplication']]">
- <domainofapplication>
- <xsl:apply-templates select="*[2]"/>
- </domainofapplication>
- </xsl:template>
-
- <!-- identity -->
- <xsl:template match="om:OMS[@cd='fns1' and @name='identity']">
- <ident/>
- </xsl:template>
-
- <!-- lambda -->
- <xsl:template match="om:OMBIND[om:OMS[@cd='fns1' and @name='lambda']]">
- <lambda>
- <xsl:for-each select="om:OMBVAR/child::om:OMV">
- <bvar>
- <xsl:apply-templates select="."/>
- </bvar>
- </xsl:for-each>
- <xsl:apply-templates select="*[3]"/>
- </lambda>
- </xsl:template>
-
- <!-- range -->
- <xsl:template match="om:OMS[@cd='fns1' and @name='range']">
- <codomain/>
- </xsl:template>
-
- <!-- left_compose -->
- <xsl:template match="om:OMS[@cd='fns1' and @name='left_compose']">
- <compose/>
- </xsl:template>
-
- <!-- left_inverse -->
- <xsl:template match="om:OMS[@cd='fns1' and @name='left_inverse']">
- <inverse/>
- </xsl:template>
-
- <!-- right_inverse -->
- <!-- Note: No Content MathML equivalent -->
- <xsl:template match="om:OMS[@cd='fns1' and @name='right_inverse']">
- <inverse encoding="OpenMath" definitionURL="http://www.openmath.org/cd/fns1#right_inverse"/>
- </xsl:template>
-
- <!-- Content Dictionary: integer1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: factorial, factorof, quotient, remainder -->
-
- <!-- Trivial cases: factorof, factorial, quotient -->
- <xsl:template match="om:OMS[@cd='integer1']">
- <xsl:element name="{@name}"/>
- </xsl:template>
-
- <!-- remainder -->
- <xsl:template match="om:OMS[@cd='integer1' and @name='remainder']">
- <rem/>
- </xsl:template>
-
- <!-- Content Dictionary: interval1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: integer_interval, interval, interval_oo, interval_cc,
- interval_oc, interval_co -->
-
- <!-- Trivial case: none -->
-
- <!-- (All) -->
- <xsl:template match="om:OMA[om:OMS[@cd='interval1']]">
- <interval>
- <xsl:choose>
- <xsl:when test="om:OMS[1]/@name='interval_oo'">
- <xsl:attribute name='closure'>open</xsl:attribute>
- </xsl:when>
- <xsl:when test="om:OMS[1]/@name='interval_cc'">
- <xsl:attribute name='closure'>closed</xsl:attribute>
- </xsl:when>
- <xsl:when test="om:OMS[1]/@name='interval_oc'">
- <xsl:attribute name='closure'>open-closed</xsl:attribute>
- </xsl:when>
- <xsl:when test="om:OMS[1]/@name='interval_co'">
- <xsl:attribute name='closure'>closed-open</xsl:attribute>
- </xsl:when>
- </xsl:choose>
- <xsl:apply-templates select="*[2]"/>
- <xsl:apply-templates select="*[3]"/>
- </interval>
- </xsl:template>
-
- <!-- Content Dictionary: linalg1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: determinant, matrix_selector, outerproduct,
- scalarproduct, transpose, vector_selector, vector_product -->
-
- <!-- Trivial cases: determinant, outerproduct, scalarproduct, transpose,
- vectorproduct -->
- <xsl:template match="om:OMS[@cd='linalg1']">
- <xsl:element name="{@name}"/>
- </xsl:template>
-
- <!-- vector_selector -->
- <xsl:template match="om:OMA[om:OMS[@cd='linalg1' and @name='vector_selector']]">
- <apply>
- <selector/>
- <xsl:apply-templates select="*[3]"/> <!-- the vector -->
- <xsl:apply-templates select="*[2]"/>
- </apply>
- </xsl:template>
-
- <!-- matrix_selector -->
- <xsl:template match="om:OMA[om:OMS[@cd='linalg1' and @name='matrix_selector']]">
- <apply>
- <selector/>
- <xsl:apply-templates select="*[4]"/> <!-- the matrix -->
- <xsl:apply-templates select="*[3]"/>
- <xsl:apply-templates select="*[2]"/>
- </apply>
- </xsl:template>
-
- <!-- Content Dictionary: linalg2 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: matrix, matrixrow, vector -->
-
- <!-- Trivial cases: none -->
-
- <!-- matrixrow, matrix -->
- <xsl:template match="om:OMA[om:OMS[@cd='linalg2']]">
- <xsl:element name="{om:OMS[1]/@name}">
- <xsl:apply-templates select="*[position()>1]"/>
- </xsl:element>
- </xsl:template>
-
- <!-- (row) vector -->
- <xsl:template match="om:OMA[om:OMS[@cd='linalg2' and @name='vector']]">
- <apply>
- <transpose/>
- <vector>
- <xsl:apply-templates select="*[position()>1]"/>
- </vector>
- </apply>
- </xsl:template>
-
- <!-- Content Dictionary: limit1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: above, below, bothsides, limit, null -->
-
- <!-- Trivial cases: none -->
-
- <!-- both_sides, above, below, null -->
- <xsl:template match="om:OMA[om:OMS[@cd='limit1']]">
- <apply>
- <limit/>
- <bvar>
- <xsl:apply-templates select="." mode="getVar">
- <xsl:with-param name="NUM" select="4"/>
- </xsl:apply-templates>
- </bvar>
- <xsl:choose>
- <xsl:when test="om:OMS[2]/@name='null'">
- <lowlimit>
- <xsl:apply-templates select="*[2]"/>
- </lowlimit>
- </xsl:when>
- <xsl:otherwise>
- <condition>
- <apply>
- <tendsto>
- <xsl:choose>
- <xsl:when test="om:OMS[2]/@name='both_sides'">
- <xsl:attribute name="type">all</xsl:attribute>
- </xsl:when>
- <xsl:when test="om:OMS[2]/@name='above'">
- <xsl:attribute name="type">above</xsl:attribute>
- </xsl:when>
- <xsl:when test="om:OMS[2]/@name='below'">
- <xsl:attribute name="type">below</xsl:attribute>
- </xsl:when>
- </xsl:choose>
- </tendsto>
- <xsl:apply-templates select="." mode="getVar">
- <xsl:with-param name="NUM" select="4"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="*[2]"/>
- </apply>
- </condition>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:apply-templates select="*[4]"/>
- </apply>
- </xsl:template>
-
- <!-- Content Dictionary: list1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: list, map, suchthat -->
-
- <!-- Trivial cases: none -->
-
- <!-- list -->
- <xsl:template match="om:OMA[om:OMS[@cd='list1' and @name='list']]">
- <list>
- <xsl:apply-templates select="*[position()>1]"/>
- </list>
- </xsl:template>
-
- <!-- map -->
- <xsl:template match="om:OMA[om:OMS[@cd='list1' and @name='map']]">
- <list>
- <xsl:apply-templates select="." mode="map"/>
- </list>
- </xsl:template>
-
- <!-- suchthat -->
- <xsl:template match="om:OMA[om:OMS[@cd='list1' and @name='suchthat']]">
- <list>
- <xsl:apply-templates select="." mode="suchthat"/>
- </list>
- </xsl:template>
-
- <!-- Content Dictionary: logic1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: and, equivalent, false, implies, not, or, true, xor -->
-
- <!-- Trivial cases: all -->
- <xsl:template match="om:OMS[@cd='logic1']">
- <xsl:element name="{@name}"/>
- </xsl:template>
-
- <!-- Content Dictionary: mathmltypes -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: complex_cartesian_type, complex_polar_type, constant_type,
- fn_type, integer_type, list_type, matrix_type, rational_type, real_type,
- set_type, type, vector_type -->
-
- <!-- (All mathmltypes elements) -->
- <xsl:template match="om:OMATTR[om:OMATP[om:OMS[@cd='mathmltypes' and @name='type']]]">
- <xsl:variable name="type_name" select="normalize-space(translate(substring-before(om:OMATP/om:OMS[2]/@name,'_type'),'_','-'))"/>
- <xsl:choose>
- <xsl:when test="*[2]=om:OMV">
- <ci type="{$type_name}">
- <xsl:value-of select="normalize-space(*[2]/@name)"/>
- </ci>
- </xsl:when>
- <xsl:when test="*[2]=om:OMI">
- <cn type="{$type_name}">
- <xsl:variable name="x" select="normalize-space(*[2])"/>
- <xsl:choose>
- <xsl:when test="contains($x,'x')">
- <xsl:attribute name="base">16</xsl:attribute>
- <xsl:value-of select="concat(substring-before($x,'x'),substring-after($x,'x'))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$x"/> <!-- default is decimal -->
- </xsl:otherwise>
- </xsl:choose>
- </cn>
- </xsl:when>
- <xsl:when test="*[2]=om:OMF[@dec]">
- <cn type="{$type_name}">
- <xsl:value-of select="normalize-space(*[2]/@dec)"/>
- </cn>
- </xsl:when>
- <xsl:when test="*[2]=om:OMF[@hex]">
- <cn type="{$type_name}" base="16">
- <xsl:value-of select="normalize-space(*[2]/@hex)"/>
- </cn>
- </xsl:when>
- <xsl:otherwise> <!-- MathML cannot add type attribute to other objects -->
- <xsl:comment>
- Content MathML cannot add type <xsl:value-of select="$type_name"/> for the object after this comment.
- </xsl:comment>
- <xsl:apply-templates select="*[2]"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!-- Content Dictionary: minmax1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: max, min -->
- <xsl:template match="om:OMS[@cd='minmax1']">
- <xsl:element name="{@name}"/>
- </xsl:template>
-
- <!-- Trivial cases: none -->
-
- <!-- max, min -->
- <xsl:template match="om:OMA[om:OMS[@cd='minmax1']]">
- <apply>
- <xsl:element name="{om:OMS/@name}"/>
- <xsl:choose>
- <xsl:when test="*[2]=om:OMA[om:OMS[@cd='set1' and @name='set']]">
- <xsl:apply-templates select="om:OMA/*[position()>1]"/>
- </xsl:when>
- <xsl:when test="*[2]=om:OMA[om:OMS[@cd='multiset1' and @name='multiset']]">
- <xsl:apply-templates select="om:OMA/*[position()>1]"/>
- </xsl:when>
- <xsl:when test="*[2]=om:OMA[om:OMS[@cd='set1' and @name='suchthat']]">
- <xsl:apply-templates select="*[2]" mode="suchthat"/>
- </xsl:when>
- <xsl:when test="*[2]=om:OMA[om:OMS[@cd='set1' and @name='map']]">
- <xsl:apply-templates select="*[2]" mode="map"/>
- </xsl:when>
- <xsl:otherwise>
- <bvar><ci>x</ci></bvar>
- <condition>
- <apply>
- <in/>
- <ci>x</ci>
- <xsl:apply-templates select="*[2]"/>
- </apply>
- </condition>
- </xsl:otherwise>
- </xsl:choose>
- </apply>
- </xsl:template>
-
- <!-- Content Dictionary: multiset1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: cartesian_product, emptyset, in, intersect, multiset,
- notin, notprsubset, notsubset, prsubset, setdiff, size, subset, union -->
-
- <!-- Trivial cases: emptyset, in, interset, notin, notprsubset, notsubset, prsubset,
- subset, union -->
- <xsl:template match="om:OMS[@cd='multiset1']">
- <xsl:element name="{@name}"/>
- </xsl:template>
-
- <!-- cartesian_product -->
- <xsl:template match="om:OMS[@cd='multiset1' and @name='cartesian_product']">
- <cartesianproduct/>
- </xsl:template>
-
-
- <!-- multiset -->
- <xsl:template match="om:OMA[om:OMS[@cd='multiset1' and @name='multiset']]">
- <set type="multiset">
- <xsl:apply-templates select="*[position()>1]"/>
- </set>
- </xsl:template>
-
- <!-- size -->
- <xsl:template match="om:OMS[@cd='multiset1' and @name='size']">
- <card/>
- </xsl:template>
-
- <!-- Content Dictionary: nums1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains based_integer, e, gamma, i, infinity, NaN, pi, rational -->
-
- <!-- Trivial cases: pi, infinity -->
- <xsl:template match="om:OMS[@cd='nums1']">
- <xsl:element name="{@name}"/>
- </xsl:template>
-
- <!-- based_integer -->
- <!-- Note: Content MathML does not support base that is represented by a variable -->
- <xsl:template match="om:OMA[om:OMS[@cd='nums1' and @name='based_integer']]">
- <xsl:choose>
- <xsl:when test="*[2]=om:OMV">
- <apply>
- <csymbol encoding="OpenMath" definitionURL="http://www.openmath.org/cd/nums1#based_integer"/>
- <xsl:apply-templates select="*[2]"/>
- <xsl:apply-templates select="*[3]"/>
- </apply>
- </xsl:when>
- <xsl:otherwise>
- <cn type="integer" base="{normalize-space(*[2])}">
- <xsl:value-of select="normalize-space(om:OMSTR)"/>
- </cn>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!-- e -->
- <xsl:template match="om:OMS[@cd='nums1' and @name='e']">
- <exponentiale/>
- </xsl:template>
-
- <!-- gamma -->
- <xsl:template match="om:OMS[@cd='nums1' and @name='gamma']">
- <eulergamma/>
- </xsl:template>
-
- <!-- i -->
- <xsl:template match="om:OMS[@cd='nums1' and @name='i']">
- <imaginaryi/>
- </xsl:template>
-
- <!-- NaN -->
- <xsl:template match="om:OMS[@cd='nums1' and @name='NaN']">
- <notanumber/>
- </xsl:template>
-
- <!-- rational -->
- <!-- Note: Content MathML does not support rational numbers that are
- made up of variables or other mathematical objects -->
- <xsl:template match="om:OMA[om:OMS[@cd='nums1' and @name='rational']]">
- <xsl:choose>
- <xsl:when test="child::om:OMV or child::om:OMA">
- <apply>
- <csymbol definitionURL="http://www.openmath.org/cd/nums1#rational"/>
- <xsl:apply-templates select="*[2]"/>
- <xsl:apply-templates select="*[3]"/>
- </apply>
- </xsl:when>
- <xsl:otherwise>
- <cn type="rational">
- <xsl:apply-templates select="*[2]" mode="convert"/>
- <sep/>
- <xsl:apply-templates select="*[3]" mode="convert"/>
- </cn>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!-- Content Dictionary: piece1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: otherwise, piece, piecewise -->
-
- <!-- Trivial cases: (All of the OMSs here are almost trivial, except
- that these functions are used without "apply" in Content MathML) -->
-
- <!-- piecewise, piece, otherwise -->
- <xsl:template match="om:OMA[om:OMS[@cd='piece1']]">
- <xsl:element name="{om:OMS/@name}">
- <xsl:apply-templates select="*[position()>1]"/>
- </xsl:element>
- </xsl:template>
-
- <!-- Content Dictionary: quant1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: forall, exists -->
-
- <!-- forall,exists -->
- <xsl:template match="om:OMBIND[om:OMS[@cd='quant1']]">
- <apply>
- <xsl:element name="{om:OMS[1]/@name}"/>
- <xsl:for-each select="om:OMBVAR/om:OMV">
- <bvar>
- <xsl:apply-templates select="."/>
- </bvar>
- </xsl:for-each>
- <xsl:apply-templates select="*[3]"/>
- </apply>
- </xsl:template>
-
- <!-- Content Dictionary: relation1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: approx, eq, geq, gt, leq, lt, neq -->
-
- <!-- Trivial cases: all -->
-
- <xsl:template match="om:OMS[@cd='relation1']">
- <xsl:element name="{@name}">
- <xsl:if test="../@style!=''">
- <xsl:attribute name='align'><xsl:value-of select="../@style"/></xsl:attribute>
- </xsl:if>
- </xsl:element>
- </xsl:template>
-
- <!-- Content Dictionary: setname1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: C, N, P, Q, R, Z -->
-
- <!-- Trivial cases: none -->
-
- <!-- P -->
- <xsl:template match="om:OMS[@cd='setname1' and @name='P']">
- <primes/>
- </xsl:template>
-
- <!-- N -->
- <xsl:template match="om:OMS[@cd='setname1' and @name='N']">
- <naturalnumbers/>
- </xsl:template>
-
- <!-- Z -->
- <xsl:template match="om:OMS[@cd='setname1' and @name='Z']">
- <integers/>
- </xsl:template>
-
- <!-- Z -->
- <xsl:template match="om:OMS[@cd='setname1' and @name='Q']">
- <rationals/>
- </xsl:template>
-
- <!-- R -->
- <xsl:template match="om:OMS[@cd='setname1' and @name='R']">
- <reals/>
- </xsl:template>
-
- <!-- C -->
- <xsl:template match="om:OMS[@cd='setname1' and @name='C']">
- <complexes/>
- </xsl:template>
-
- <!-- Content Dictionary: rounding1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: ceiling, floor, round, trunc -->
-
- <!-- Trivial Cases: ceiling, floor -->
- <xsl:template match="om:OMS[@cd='rounding1']">
- <xsl:element name="{@name}"/>
- </xsl:template>
-
- <!-- trunc -->
- <xsl:template match="om:OMA[om:OMS[@cd='rounding1' and @name='trunc']]">
- <apply>
- <quotient/>
- <xsl:apply-templates select="*[2]"/>
- <cn>1</cn>
- </apply>
- </xsl:template>
-
- <!-- round -->
- <xsl:template match="om:OMA[om:OMS[@cd='rounding1' and @name='round']]">
- <piecewise>
- <piece>
- <apply>
- <floor/>
- <apply>
- <plus/>
- <cn>0.5</cn>
- <xsl:apply-templates select="*[2]"/>
- </apply>
- </apply>
- <apply>
- <geq/>
- <xsl:apply-templates select="*[2]"/>
- <cn>0</cn>
- </apply>
- </piece>
- <piece>
- <apply>
- <ceiling/>
- <apply>
- <minus/>
- <xsl:apply-templates select="*[2]"/>
- <cn>0.5</cn>
- </apply>
- </apply>
- <apply>
- <lt/>
- <xsl:apply-templates select="*[2]"/>
- <cn>0</cn>
- </apply>
- </piece>
- </piecewise>
- </xsl:template>
-
- <!-- Content Dictionary: set1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: cartesian_product, emptyset, in, intersect, map, notin,
- notprsubset, notsubset, prsubset, set, setdiff, size, subset, suchthat, union -->
-
- <!-- Trivial cases: emptyset, in, intersect, notin, notprsubset, notsubset, prsubset
- setdiff, subset, union -->
- <xsl:template match="om:OMS[@cd='set1']">
- <xsl:element name="{@name}"/>
- </xsl:template>
-
- <!-- cartesian_product -->
- <xsl:template match="om:OMS[@cd='set1' and @name='cartesian_product']">
- <cartesianproduct/>
- </xsl:template>
-
- <!-- map -->
- <xsl:template match="om:OMA[om:OMS[@cd='set1' and @name='map']]">
- <set>
- <xsl:apply-templates select="." mode="map"/>
- </set>
- </xsl:template>
-
- <!-- size -->
- <xsl:template match="om:OMS[@cd='set1' and @name='size']">
- <card/>
- </xsl:template>
-
- <!-- suchthat -->
- <xsl:template match="om:OMA[om:OMS[@cd='set1' and @name='suchthat']]">
- <set>
- <xsl:apply-templates select="." mode="suchthat"/>
- </set>
- </xsl:template>
-
- <!-- Content Dictionary: s_data1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: mean, median, mode, moment, sdev, variance -->
-
- <!-- Trivial cases: mean, median, mode, sdev, variance -->
- <xsl:template match="om:OMS[@cd='s_data1']">
- <xsl:element name="{@name}"/>
- </xsl:template>
-
- <!-- moment -->
- <xsl:template match="om:OMA[om:OMS[@cd='s_data1' and @name='moment']]">
- <apply>
- <moment/>
- <degree>
- <xsl:apply-templates select="*[2]"/>
- </degree>
- <momentabout>
- <xsl:apply-templates select="*[3]"/>
- </momentabout>
- <xsl:apply-templates select="*[position()>3]"/>
- </apply>
- </xsl:template>
-
- <!-- Content Dictionary: s_dist1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: mean, moment, sdev, variance -->
-
- <!-- Trivial cases: mean, sdev, variance -->
- <xsl:template match="om:OMS[@cd='s_dist1']">
- <xsl:element name="{@name}"/>
- </xsl:template>
-
- <!-- moment -->
- <xsl:template match="om:OMA[om:OMS[@cd='s_dist1' and @name='moment']]">
- <apply>
- <moment/>
- <degree>
- <xsl:apply-templates select="*[2]"/>
- </degree>
- <momentabout>
- <xsl:apply-templates select="*[3]"/>
- </momentabout>
- <xsl:apply-templates select="*[position()>3]"/>
- </apply>
- </xsl:template>
-
- <!-- Content Dictionary: transc1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: arccos, arccosh, arccot, arccoth, arccsc,
- arccsch, arcsec, arcsech, arcsin, arcsinh, arctan, arctanh, cos,
- cosh, cot, coth, csc, csch, exp, ln, log, sec, sech, sin, sinh,
- tan, tanh -->
-
- <!-- Trivial cases: all except log -->
- <xsl:template match="om:OMS[@cd='transc1']">
- <xsl:element name="{@name}"/>
- </xsl:template>
-
- <!-- log -->
- <xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='log']]">
- <apply>
- <log/>
- <logbase>
- <xsl:apply-templates select="*[2]"/>
- </logbase>
- <xsl:apply-templates select="*[3]"/>
- </apply>
- </xsl:template>
-
- <!-- Content Dictionary: veccalc1 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: curl, divergence, grad, Laplacian -->
-
- <!-- Trivial cases: all except Laplacian -->
- <xsl:template match="om:OMS[@cd='veccalc1']">
- <xsl:element name="{@name}"/>
- </xsl:template>
-
- <!-- Laplacian -->
- <!-- Note: Capital "L" -->
- <xsl:template match="om:OMS[@cd='veccalc1' and @name='Laplacian']">
- <laplacian/>
- </xsl:template>
-
- <!-- Content Dictionary: altenc -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: TeX_encoding, MathML_encoding -->
-
- <!-- Trivial cases: none -->
-
- <!-- (Everything in altenc) -->
- <xsl:template match="om:OMATTR[om:OMATP[om:OMS[@cd='altenc']]]">
- <semantics>
- <xsl:apply-templates select="*[2]"/>
- <xsl:apply-templates select="om:OMATP/child::om:OMS"/>
- </semantics>
- </xsl:template>
-
- <!-- MathML_encoding -->
- <xsl:template match="om:OMS[@cd='altenc' and @name='MathML_encoding']">
- <annotation-xml encoding="MathML">
- <xsl:value-of select="normalize-space(following-sibling::*[position()=1])"/> <!-- OMXML or OMSTR-->
- </annotation-xml>
- </xsl:template>
-
- <!-- TeX_encoding -->
- <xsl:template match="om:OMS[@cd='altenc' and @name='TeX_encoding']">
- <annotation encoding="TeX">
- <xsl:value-of select="normalize-space(following::om:OMSTR)"/>
- </annotation>
- </xsl:template>
-
- <!-- **************************************************** -->
- <!-- ************** Not in MathML group CDs ************* -->
- <!-- **************************************************** -->
-
- <!-- Everything below should not be handled by the Trivial case!) -->
-
- <!-- Content Dictionary: linalg3 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- (column) vector -->
- <xsl:template match="om:OMA[om:OMS[@cd='linalg3' and @name='vector']]">
- <vector>
- <xsl:apply-templates select="*[position()>1]"/>
- </vector>
- </xsl:template>
-
- <!-- Content Dictionary: arith2 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: inverse, times -->
-
- <!-- times -->
- <!-- Note: This function is n-ary just like MathML! -->
- <xsl:template match="om:OMS[@cd='arith2' and @name='times']">
- <times/>
- </xsl:template>
-
- <!-- Content Dictionary: error -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- (all errors) -->
- <xsl:template match="om:OME">
- <mtext>
- <xsl:text>ERROR:</xsl:text>
- <xsl:text> Error Type: </xsl:text><xsl:value-of select="om:OMS[1]/@name"/>
- <xsl:text> Error occured in CD: </xsl:text><xsl:value-of select="om:OMS[2]/@cd"/>
- <xsl:text> Error occured in symbol: </xsl:text><xsl:value-of select="om:OMS[2]/@name"/>
- </mtext>
- </xsl:template>
-
- <!-- Content Dictionary: moreerrors -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: algorithm, asynchronousError, encodingError, limitation,
- unexpected -->
-
- <!-- (all) -->
- <xsl:template match="om:OMA[om:OMS[@cd='moreerrors']]">
- <mtext>
- <xsl:text>ERROR:</xsl:text>
- <xsl:text> Error Type: </xsl:text><xsl:value-of select="normalize-space(om:OMS/@name)"/>
- <xsl:text> Description: </xsl:text><xsl:value-of select="normalize-space(om:OMSTR)"/>
- </mtext>
- </xsl:template>
-
- <!-- Content Dicitionary: transc3 -->
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <!-- This CD contains: arccos, arccosh, arccot, arccoth, arccsc, arccsch,
- arcsec, arcsech, arcsin, arcsinh, arctan, arctanh, ln, log -->
-
- <!-- (all except log) -->
- <xsl:template match="om:OMS[@cd='transc3']">
- <xsl:element name="{@name}"/>
- </xsl:template>
-
- <!-- log -->
- <xsl:template match="om:OMA[om:OMS[@cd='transc3' and @name='log']]">
- <apply>
- <log/>
- <logbase>
- <xsl:apply-templates select="*[3]"/>
- </logbase>
- <xsl:apply-templates select="*[2]"/>
- </apply>
- </xsl:template>
-
- <!-- **************************************************** -->
- <!-- **************** EVERYTHING ELSE ******************* -->
- <!-- **************************************************** -->
-
- <!-- Note: Rather than hard code all of the CDs, I just assign the lowest
- priority among all templates. -->
-
- <xsl:template match="om:OMS[@cd and @name]" priority="-10">
- <csymbol>
- <xsl:attribute name="definitionURL">
- <xsl:value-of select="concat(concat(concat('http://www.openmath.org/cd/',@cd),'#'),@name)"/>
- </xsl:attribute>
- </csymbol>
- </xsl:template>
-
- <!-- **************************************************** -->
- <!-- **************** HELPER TEMPLATES ****************** -->
- <!-- **************************************************** -->
-
- <!-- All mode "convert" templates are for converting OMSs or OMIs to
- numbers including in various cn containing <sep/> -->
-
- <xsl:template match="om:OMS[@cd='alg1' and @name='zero']" mode="convert">0</xsl:template>
-
- <xsl:template match="om:OMS[@cd='alg1' and @name='one']" mode="convert">1</xsl:template>
-
- <xsl:template match="om:OMS" mode="convert">
- <xsl:choose>
- <xsl:when test="@name='pi'">&pi;</xsl:when>
- <xsl:when test="@name='i'">&ii;</xsl:when>
- <xsl:when test="@name='NaN'">&NaN;</xsl:when>
- <xsl:when test="@name='gamma'">&gamma;</xsl:when>
- <xsl:when test="@name='e'">&ee;</xsl:when>
- <xsl:when test="@name='true'">&true;</xsl:when>
- <xsl:when test="@name='false'">&false;</xsl:when>
- <xsl:when test="@name='infinity'">&infin;</xsl:when>
- <xsl:otherwise><xsl:value-of select="normalize-space(.)"/></xsl:otherwise> <!-- for debugging -->
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="om:OMI" mode="convert">
- <xsl:variable name="x" select="normalize-space(.)"/>
- <xsl:choose>
- <xsl:when test="contains($x,'x')">
- <xsl:value-of select="concat(substring-before($x,'x'),substring-after($x,'x'))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$x"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="om:OMF" mode="convert">
- <xsl:value-of select="@*"/>
- </xsl:template>
-
- <!-- The following templates, with mode "map" and "suchthat", are used to contruct sets or lists
- without enumerating every element -->
-
- <xsl:template match="om:OMA" mode="map">
- <bvar>
- <xsl:apply-templates select="." mode="getVar">
- <xsl:with-param name="NUM" select="2"/>
- </xsl:apply-templates>
- </bvar>
- <condition>
- <apply>
- <in/>
- <xsl:apply-templates select="." mode="getVar">
- <xsl:with-param name="NUM" select="2"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="*[3]"/>
- </apply>
- </condition>
- <xsl:apply-templates select="*[2]"/>
- </xsl:template>
-
- <xsl:template match="om:OMA" mode="suchthat">
- <bvar>
- <xsl:apply-templates select="." mode="getVar">
- <xsl:with-param name="NUM" select="3"/>
- </xsl:apply-templates>
- </bvar>
- <condition>
- <apply>
- <and/>
- <xsl:apply-templates select="*[3]"/>
- <apply>
- <in/>
- <xsl:apply-templates select="." mode="getVar">
- <xsl:with-param name="NUM" select="3"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="*[2]"/>
- </apply>
- </apply>
- </condition>
- </xsl:template>
-
- <!-- This template is for getting bound variables (all variables in <OMBIND>) -->
- <!-- Note: Default bound variable is "x" -->
-
- <xsl:template match="om:OMA" mode="getVar">
- <xsl:param name="NUM" select="3"/>
- <xsl:choose>
- <xsl:when test="*[$NUM]=om:OMBIND">
- <xsl:apply-templates select="*[$NUM]/om:OMBVAR/om:OMV[position()>0]"/>
- </xsl:when>
- <xsl:otherwise> <!-- default -->
- <ci>x</ci>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!-- Added by Hans Hagen -->
-
- <xsl:template match="om:OMS[@cd='altenc' and @name='TeX_encoding']">
- <annotation encoding="TeX">
- <xsl:value-of select="normalize-space(following::om:OMSTR)"/>
- </annotation>
- </xsl:template>
-
- <xsl:template match="om:OMS[(@cd='math4all' or @cd='mathadore' or @cd='m4all') and @name]">
- <csymbol>
- <xsl:attribute name="definitionURL">
- <xsl:value-of select="concat(concat('http://www.openmath.org/cd/mathadore','#'),@name)"/>
- </xsl:attribute>
- </csymbol>
- </xsl:template>
-
-<!--
- <xsl:template match="om:OMS[@cd='mathadore' and @name]">
- <csymbol>
- <xsl:attribute name="definitionURL">
- <xsl:value-of select="concat(concat(@cd,'#'),@name)"/>
- </xsl:attribute>
- </csymbol>
- </xsl:template>
--->
-
- <xsl:template match="om:OMA[om:OMS[@cd='combinat1' and @name='binomial']]">
- <matrix>
- <matrixrow><xsl:apply-templates select="*[2]"/></matrixrow>
- <matrixrow><xsl:apply-templates select="*[3]"/></matrixrow>
- </matrix>
- </xsl:template>
-
- <!-- <OMS cd="units_siprefix1" name="centi" cdbase="mathadore"/> -->
- <!-- <OMS cd="units_metric1" name="metre" cdbase="mathadore"/> -->
-
- <xsl:template match="om:OMS[contains(@cd,'units_')]">
- <csymbol>
- <xsl:attribute name="definitionURL">
- <xsl:value-of select="concat(concat(concat(concat(
- 'http://www.openmath.org/cd/mathadore','#'),@cd),'@'),@name)"/>
- </xsl:attribute>
- </csymbol>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/Master/texmf-dist/tex/context/base/x-openmath.mkii b/Master/texmf-dist/tex/context/base/x-openmath.mkii
deleted file mode 100644
index 38474996e1b..00000000000
--- a/Master/texmf-dist/tex/context/base/x-openmath.mkii
+++ /dev/null
@@ -1,4 +0,0 @@
-% This module is yet empty. We assume a transformation using
-% x-openmath.xsl.
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-openmath.xsl b/Master/texmf-dist/tex/context/base/x-openmath.xsl
deleted file mode 100644
index ffb40493951..00000000000
--- a/Master/texmf-dist/tex/context/base/x-openmath.xsl
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
- <xsl:output method="xml"/>
-
- <!-- newline, temp hack, latest texexec handles it okay -->
-
- <xsl:template match="processing-instruction()"><xsl:copy/><xsl:text>
- </xsl:text></xsl:template>
-
- <!-- xsl:template match="*"><xsl:copy/></xsl:template -->
- <!-- xsl:element name="{name(current())}"><xsl:apply-templates/></xsl:element -->
-
-<!--
- <xsl:template match="*">
- <xsl:copy>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
--->
-
- <xsl:template match="node()|@*" >
- <xsl:copy>
- <xsl:apply-templates select = "node()|@*" />
- </xsl:copy>
- </xsl:template>
-
- <xsl:template match="comment"></xsl:template>
-
- <xsl:variable name='openmath-to-content-mathml'><value-of select='$stylesheet-path'/>/x-openmath.xsl</xsl:variable>
-
- <xsl:include href="x-om2cml.xsl"/>
-
-</xsl:stylesheet>
diff --git a/Master/texmf-dist/tex/context/base/x-pfs-01.mkiv b/Master/texmf-dist/tex/context/base/x-pfs-01.mkiv
deleted file mode 100644
index 8b06bd873ff..00000000000
--- a/Master/texmf-dist/tex/context/base/x-pfs-01.mkiv
+++ /dev/null
@@ -1,399 +0,0 @@
-% pfsense status info, work in progress
-%
-% usage:
-%
-% context --environment=x-pfs-01 filename.xml
-%
-% or
-%
-% <?context-directive job ctxfile x-pfsense.ctx ?>
-
-\setupbodyfont
- [dejavu,10pt]
-
-\setuplayout
- [topspace=1cm,
- backspace=1cm,
- footer=0pt,
- header=1cm,
- width=middle,
- height=middle]
-
-\setupheader
- [style=bold]
-
-\setuphead
- [section]
- [style=\bfb]
-
-\setuphead
- [subsection]
- [style=\bfa]
-
-\setuppagenumbering
- [location=]
-
-\dontcomplain
-
-% todo: show all values and map keys onto longer names via labels
-
-\startxmlsetups xml:system
-
- \startsection[title={System}]
-
- \startsubsection[title={Properties}]
-
- \starttabulate[|B|T|]
- \NC hostname \NC \xmlfirst{#1}{hostname} \NC \NR
- \NC domain \NC \xmlfirst{#1}{domain} \NC \NR
- \NC timezone \NC \xmlfirst{#1}{timezone} \NC \NR
- \NC timeservers \NC \xmlfirst{#1}{timeservers} \NC \NR
- \NC dnsserver \NC \xmlfirst{#1}{dnsserver} \NC \NR
- \stoptabulate
-
- \stopsubsection
-
- \startsubsection[title={Groups}]
- \xmlfilter{#1}{group/command(xml:system:group)}
- \stopsubsection
-
- \startsubsection[title={Users}]
- \xmlfilter{#1}{user/command(xml:system:user)}
- \stopsubsection
-
- \stopsection
-
-\stopxmlsetups
-
-\startxmlsetups xml:system:group
-
- \starttabulate[|B|T|]
- \NC name \NC \xmlfirst{#1}{/name} \NC \NR
- \NC description \NC \xmlfirst{#1}{/descr} \NC \NR
- \NC scope \NC \xmlfirst{#1}{/scope} \NC \NR
- \NC gid \NC \xmlfirst{#1}{/gid} \NC \NR
- \NC privilege \NC \xmlfirst{#1}{/priv} \NC \NR
- \NC members \NC \xmlconcat{#1}{/member}{ } \NC \NR
- \stoptabulate
-
-\stopxmlsetups
-
-\startxmlsetups xml:system:user
-
- \starttabulate[|B|T|]
- \NC name \NC \xmlfirst{#1}{/name} \NC \NR
- \NC description \NC \xmlfirst{#1}{/descr} \NC \NR
- \NC scope \NC \xmlfirst{#1}{/scope} \NC \NR
- \NC uid \NC \xmlfirst{#1}{/uid} \NC \NR
- \NC group \NC \xmlfirst{#1}{/groupname} \NC \NR
- \NC privilege \NC \xmlfirst{#1}{/priv} \NC \NR
- \NC password \NC \xmldoifelsetext{#1}{/password}{set}{unset} \NC \NR
- \NC ipsec psk \NC \xmldoifelsetext{#1}{/ipsecpsk}{set}{unset} \NC \NR
- \NC certificate \NC \xmldoifelsetext{#1}{/cert} {set}{unset} \NC \NR
- \stoptabulate
-
-\stopxmlsetups
-
-\startxmlsetups xml:interfaces
-
- \startsection[title={Interfaces}]
-
- \xmlfilter{#1}{*/command(xml:interfaces:network)}
-
- \stopsection
-
-\stopxmlsetups
-
-\startxmlsetups xml:interfaces:network
-
- \startsubsection[title={\xmltag{#1}}]
-
- % <blockpriv/> <blockbogons/> <spoofmac/> <enable/>
-
- \starttabulate[|B|T|]
- \NC interface \NC \xmlfirst{#1}{/if} \NC \NR
- \NC block private \NC \xmldoifelse{#1}{/blockpriv} {yes}{no} \NC \NR
- \NC block bogons \NC \xmldoifelse{#1}{/blockbogons}{yes}{no} \NC \NR
- \NC spoof mac address \NC \xmldoifelse{#1}{/spoofmac} {yes}{no} \NC \NR
- \NC enable interface \NC \xmldoifelse{#1}{/enable} {yes}{no} \NC \NR
- \NC ipaddress \NC \xmlfirst{#1}{/ipaddr} \NC \NR
- \NC subnet \NC \xmlfirst{#1}{/subnet} \NC \NR
- \NC gateway \NC \xmlfirst{#1}{/gateway} \NC \NR
- \NC description \NC \xmlfirst{#1}{/descr} \NC \NR
- \stoptabulate
-
- \stopsubsection
-
-\stopxmlsetups
-
-\startxmlsetups xml:gateways
-
- \startsection[title={Gateways}]
-
- \xmlfilter{#1}{*/command(xml:gateways:entry)}
-
- \stopsection
-
-\stopxmlsetups
-
-\startxmlsetups xml:gateways:entry
-
- \starttabulate[|B|T|]
- \NC interface \NC \xmlfirst{#1}{/interface} \NC \NR
- \NC gateway \NC \xmlfirst{#1}{/gateway} \NC \NR
- \NC name \NC \xmlfirst{#1}{/name} \NC \NR
- \NC weight \NC \xmlfirst{#1}{/weight} \NC \NR
- \NC interval \NC \xmlfirst{#1}{/interval} \NC \NR
- \NC description \NC \xmlfirst{#1}{/descr} \NC \NR
- \NC disable monitor \NC \xmlfirst{#1}{/monitor_disable} \NC \NR
- \NC default gateway \NC \xmlfirst{#1}{/defaultgw} \NC \NR
- \stoptabulate
-
-\stopxmlsetups
-
-\startxmlsetups xml:virtualips
-
- \startsection[title={Virtual ipadresses}]
-
- \xmlfilter{#1}{*/command(xml:virtualips:entry)}
-
- \stopsection
-
-\stopxmlsetups
-
-\startxmlsetups xml:virtualips:entry
-
- \starttabulate[|B|T|]
- \NC interface \NC \xmlfirst{#1}{/interface} \NC \NR
- \NC type \NC \xmlfirst{#1}{/type} \NC \NR
- \NC mode \NC \xmlfirst{#1}{/mode} \NC \NR
- \NC subnet \NC \xmlfirst{#1}{/subnet}
- /\xmlfirst{#1}{/subnet_bits} \NC \NR
- \NC description \NC \xmlfirst{#1}{/descr} \NC \NR
- \stoptabulate
-
-\stopxmlsetups
-
-\startxmlsetups xml:dhcp
-
- \startsection[title={DHCP}]
-
- \xmlfilter{#1}{*/command(xml:dhcp:network)}
-
- \stopsection
-
-\stopxmlsetups
-
-\startxmlsetups xml:dhcp:network
-
- \startsubsection[title={\xmltag{#1}}]
-
- \starttabulate[|B|T|]
- \NC range \NC \xmlfirst{#1}{/range/from} \endash\ \xmlfirst{#1}{/range/to} \NC \NR
- \NC domain \NC \xmlfirst{#1}{/domain} \NC \NR
- \NC dnsserver \NC \xmlfirst{#1}{/dnsserver} \NC \NR
- \NC gateway \NC \xmlfirst{#1}{/gateway} \NC \NR
- \NC ddnsdomain \NC \xmlfirst{#1}{/ddnsdomain} \NC \NR
- \stoptabulate
-
- \xmldoif {#1} {/staticmap} {
-
- \starttabulate[|T|T|T|p|]
- \NC \rm\bf macaddress
- \NC \rm\bf ipaddress
- \NC \rm\bf hostname
- \NC \rm\bf description
- \NC \NR
- \HL
- \xmlfilter{#1}{/staticmap/command(xml:dhcp:network:entry)}
- \stoptabulate
-
- }
-
- \stopsubsection
-
-\stopxmlsetups
-
-\startxmlsetups xml:dhcp:network:entry
-
- \NC \xmlfirst{#1}{/mac}
- \NC \xmlfirst{#1}{/ipaddr}
- \NC \xmlfirst{#1}{/hostname}
- \NC \xmlfirst{#1}{/descr}
- \NC \NR
-
-\stopxmlsetups
-
-\startxmlsetups xml:dnsmasq
-
- \startsection[title={DNS MASQ}]
-
- \starttabulate[|T|T|T|p|]
- \NC \rm\bf host
- \NC \rm\bf domain
- \NC \rm\bf ipaddress
- \NC \rm\bf description
- \NC \NR
- \HL
- \xmlfilter{#1}{/hosts/command(xml:dnsmasq:hosts)}
- \stoptabulate
-
- \stopsection
-
-\stopxmlsetups
-
-
-\startxmlsetups xml:dnsmasq:hosts
-
- \NC \xmlfirst{#1}{/host}
- \NC \xmlfirst{#1}{/domain}
- \NC \xmlfirst{#1}{/ip}
- \NC \xmlfirst{#1}{/descr}
- \NC \NR
-
-\stopxmlsetups
-
-\startxmlsetups xml:nat
-
- \startsection[title={NAT}]
-
- \startsubsection[title={Rules}]
-
- \starttabulate[|T|T|T|T|T|p|]
- \NC \rm\bf interface
- \NC \rm\bf protocol
- \NC \rm\bf source
- \NC \rm\bf destination
- \NC \rm\bf target
- \NC \rm\bf description
- \NC \NR
- \HL
- \xmlfilter{#1}{/rule/command(xml:nat:rule)}
- \stoptabulate
-
- \stopsubsection
-
- \startsubsection[title={One to one}]
-
- \starttabulate[|T|T|T|T|T|p|]
- \NC \rm\bf interface
- \NC \rm\bf protocol
- \NC \rm\bf source
- \NC \rm\bf destination
- \NC \rm\bf external
- \NC \rm\bf description
- \NC \NR
- \HL
- \xmlfilter{#1}{/onetoone/command(xml:nat:onetoone)}
- \stoptabulate
-
- \stopsubsection
-
-\stopsection
-
-\stopxmlsetups
-
-\startxmlsetups xml:nat:rule
-
- \NC \xmlfilter{#1}{/interface/command(xml:checked)}
- \NC \xmlfilter{#1}{/protocol/command(xml:checked)}
- \NC \xmlfilter{#1}{/source/command(xml:checked)}
- \NC \xmlfilter{#1}{/destination/(address|any)/command(xml:checked)}
- :\xmlfilter{#1}{/destination/port/command(xml:checked)}
- \NC \xmlfilter{#1}{/target/command(xml:checked)}
- :\xmlfilter{#1}{/local-port/command(xml:checked)}
- \NC \xmlfirst {#1}{/descr}
- \NC \NR
-
-\stopxmlsetups
-
-\startxmlsetups xml:nat:onetoone
-
- \NC \xmlfilter{#1}{/interface/command(xml:checked)}
- \NC \xmlfilter{#1}{/protocol/command(xml:checked)}
- \NC \xmlfilter{#1}{/source/command(xml:checked)}
- \NC \xmlfilter{#1}{/destination/(address|any)/command(xml:checked)}
- :\xmlfilter{#1}{/destination/port/command(xml:checked)}
- \NC \xmlfilter{#1}{/external/command(xml:checked)}
- :\xmlfilter{#1}{/local-port/command(xml:checked)}
- \NC \xmlfirst {#1}{/descr}
- \NC \NR
-
-\stopxmlsetups
-
-\startxmlsetups xml:checked
- \xmldoifelse {#1} {/any} {
- *
- } {
- \xmldoifelsetext {#1} {.} {
- \xmlflush{#1}
- } {
- *
- }
- }
-\stopxmlsetups
-
-\startxmlsetups xml:filter
-
- \startsection[title={Filter}]
-
- \startsubsection[title={Rules}]
-
- \starttabulate[|T|T|T|T|T|p|]
- \NC \rm\bf type
- \NC \rm\bf interface
- \NC \rm\bf protocol
- \NC \rm\bf source
- \NC \rm\bf destination
- \NC \rm\bf description
- \NC \NR
- \HL
- \xmlfilter{#1}{/rule/command(xml:filter:rule)}
- \stoptabulate
-
- \stopsubsection
-
- \stopsubsection
-
-\stopxmlsetups
-
-\startxmlsetups xml:filter:rule
-
- \NC \xmlfilter{#1}{/type/command(xml:checked)}
- \NC \xmlfilter{#1}{/interface/command(xml:checked)}
- \NC \xmlfilter{#1}{/protocol/command(xml:checked)}
- \NC \xmlfilter{#1}{/source/(address|any)/command(xml:checked)}:
- :\xmlfilter{#1}{/source/port/command(xml:checked)}
- \NC \xmlfilter{#1}{/destination/(address|any)/command(xml:checked)}
- :\xmlfilter{#1}{/destination/port/command(xml:checked)}
- \NC \xmlfirst {#1}{/descr}
- \NC \NR
-
-\stopxmlsetups
-
-\starttext
-
- \doifelse {\inputfilename} {x-pfs-01.mkiv} {
-
- \xmlloadonly{main}{router.xml}{}
-
- \setupheadertexts[router.xml][\pagenumber]
-
- } {
-
- \xmlloadonly{main}{\inputfilename}{}
-
- \setupheadertexts[\inputfilename][\pagenumber]
-
- }
-
- \xmlfilter{main}{/pfsense/system/command(xml:system)}
- \xmlfilter{main}{/pfsense/interfaces/command(xml:interfaces)}
- \xmlfilter{main}{/pfsense/gateways/command(xml:gateways)}
- \xmlfilter{main}{/pfsense/virtualip/command(xml:virtualips)}
- \xmlfilter{main}{/pfsense/dhcpd/command(xml:dhcp)}
- \xmlfilter{main}{/pfsense/dnsmasq/command(xml:dnsmasq)}
- \xmlfilter{main}{/pfsense/nat/command(xml:nat)}
- \xmlfilter{main}{/pfsense/filter/command(xml:filter)}
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/x-pfsense.ctx b/Master/texmf-dist/tex/context/base/x-pfsense.ctx
deleted file mode 100644
index 8d7087cf222..00000000000
--- a/Master/texmf-dist/tex/context/base/x-pfsense.ctx
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version='1.0' standalone='yes'?>
-
-<!-- this is also a demo of using the xml interface -->
-
-<ctx:job>
- <ctx:message>pfsense configuration listing</ctx:message>
- <ctx:process>
- <ctx:flags>
- <ctx:flag>purge</ctx:flag>
- </ctx:flags>
- <ctx:resources>
- <ctx:environment>x-pfs-01.mkiv</ctx:environment>
- </ctx:resources>
- </ctx:process>
-</ctx:job>
diff --git a/Master/texmf-dist/tex/context/base/x-physml.mkii b/Master/texmf-dist/tex/context/base/x-physml.mkii
deleted file mode 100644
index 4d9cffe3325..00000000000
--- a/Master/texmf-dist/tex/context/base/x-physml.mkii
+++ /dev/null
@@ -1,16 +0,0 @@
-%D \module
-%D [ file=m-physml,
-%D version=2001.09.04,
-%D title=\CONTEXT\ XML Modules,
-%D subtitle=Loading PHYSML Filters,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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[units] \useXMLfilter[pml,pmu]
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-physml.mkiv b/Master/texmf-dist/tex/context/base/x-physml.mkiv
deleted file mode 100644
index dd9a164dd19..00000000000
--- a/Master/texmf-dist/tex/context/base/x-physml.mkiv
+++ /dev/null
@@ -1,16 +0,0 @@
-%D \module
-%D [ file=m-physml,
-%D version=2001.09.04,
-%D title=\CONTEXT\ XML Modules,
-%D subtitle=Loading PHYSML Filters,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-physml.xsd b/Master/texmf-dist/tex/context/base/x-physml.xsd
deleted file mode 100644
index 865d88c58ed..00000000000
--- a/Master/texmf-dist/tex/context/base/x-physml.xsd
+++ /dev/null
@@ -1,172 +0,0 @@
-<?xml version="1.0"?>
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
-<xsd:annotation>
- <xsd:documentation xml:lang="en">
- This schema covers (basic presentational) Physics
- markup. It combines the power of MathML and the ConTeXt
- units engine.
-
- author: Hans Hagen, copyright: PRAGMA-ADE / Hasselt NL
- </xsd:documentation>
-</xsd:annotation>
-
-<xsd:complexType name="unit.power.type">
- <xsd:element name="Inverse" minOccurs="0" maxOccurs="1" />
- <xsd:choice>
- <xsd:element name="Linear" />
- <xsd:element name="Square" />
- <xsd:element name="Cubic" />
- </xsd:choice>
-</xsd:complexType>
-
-<xsd:complexType name="unit.prefix.type">
- <xsd:choice>
- <xsd:element name="Atto" />
- <xsd:element name="Femto" />
- <xsd:element name="Pico" />
- <xsd:element name="Nano" />
- <xsd:element name="Micro" />
- <xsd:element name="Milli" />
- <xsd:element name="Centi" />
- <xsd:element name="Deci" />
- <xsd:element name="Hecto" />
- <xsd:element name="Kilo" />
- <xsd:element name="Mega" />
- <xsd:element name="Giga" />
- <xsd:element name="Terra" />
- <xsd:element name="Peta" />
- <xsd:element name="Exa" />
-
- <xsd:element name="NoUnit" />
- </xsd:choice>
-</xsd:complexType>
-
-<xsd:complexType name="unit.midfix.type">
- <xsd:choice>
- <xsd:element name="Per" />
- <xsd:element name="Times" />
- <xsd:element name="Solidus" />
- <xsd:element name="OutOf" />
- </xsd:choice>
-</xsd:complexType>
-
-<xsd:complexType name="unit.suffix.type">
- <xsd:choice>
- <xsd:element name="Ampere" />
- <xsd:element name="Angstrom" />
- <xsd:element name="At" />
- <xsd:element name="Atm" />
- <xsd:element name="Atom" />
- <xsd:element name="Bar" />
- <xsd:element name="Baud" />
- <xsd:element name="Bell" />
- <xsd:element name="Bequerel" />
- <xsd:element name="Bit" />
- <xsd:element name="Byte" />
- <xsd:element name="Cal" />
- <xsd:element name="Candela" />
- <xsd:element name="Celsius" />
- <xsd:element name="Coulomb" />
- <xsd:element name="Day" />
- <xsd:element name="Deg" />
- <xsd:element name="Degrees" />
- <xsd:element name="Equivalent" />
- <xsd:element name="EVolt" />
- <xsd:element name="eVolt" />
- <xsd:element name="Fahrenheit" />
- <xsd:element name="Farad" />
- <xsd:element name="Foot" />
- <xsd:element name="Force" />
- <xsd:element name="Gauss" />
- <xsd:element name="Gram" />
- <xsd:element name="Gray" />
- <xsd:element name="Henry" />
- <xsd:element name="Hertz" />
- <xsd:element name="Hour" />
- <xsd:element name="Inch" />
- <xsd:element name="Joule" />
- <xsd:element name="Kelvin" />
- <xsd:element name="Liter" />
- <xsd:element name="Lux" />
- <xsd:element name="Meter" />
- <xsd:element name="Min" />
- <xsd:element name="Mol" />
- <xsd:element name="Molair" />
- <xsd:element name="Month" />
- <xsd:element name="Newton" />
- <xsd:element name="Ohm" />
- <xsd:element name="Pascal" />
- <xsd:element name="Rad" />
- <xsd:element name="RevPerMin" />
- <xsd:element name="RevPerSec" />
- <xsd:element name="Sec" />
- <xsd:element name="Second" />
- <xsd:element name="Siemens" />
- <xsd:element name="Sievert" />
- <xsd:element name="Sterant" />
- <xsd:element name="Tesla" />
- <xsd:element name="Volt" />
- <xsd:element name="VoltAC" />
- <xsd:element name="VoltDC" />
- <xsd:element name="Watt" />
- <xsd:element name="Weber" />
- <xsd:element name="Week" />
- <xsd:element name="Year" />
-
- <xsd:element name="Unit" />
- </xsd:choice>
-</xsd:complexType>
-
-<xsd:complexType name="unit.component.type">
- <xsd:sequence>
- <xsd:element ref="unit.power.type" minOccurs="0" maxOccurs="1" />
- <xsd:element ref="unit.prefix.type" minOccurs="0" maxOccurs="1" />
- <xsd:element ref="unit.suffix.type" minOccurs="0" maxOccurs="1" />
- </xsd:sequence>
-</xsd:complexType>
-
-<xsd:complexType name="unit.type">
- <xsd:choice>
- <xsd:sequence>
- <xsd:element ref="unit.component.type" minOccurs="1" maxOccurs="1" />
- </xsd:sequence>
- <xsd:sequence>
- <xsd:element ref="unit.component.type" minOccurs="1" maxOccurs="1" />
- <xsd:element ref="unit.midfix.type" minOccurs="1" maxOccurs="1" />
- <xsd:element ref="unit.component.type" minOccurs="1" maxOccurs="1" />
- </xsd:sequence>
- </xsd:choice>
-</xsd:complexType>
-
-<xsd:element name="unit" type="unit.type" />
-
-<xsd:element name="physics.type">
- <choice>
- <xsd:element name="apply">
- <xsd:sequence>
- <xsd:element name="unit" minOccurs="1" maxOccurs="1" />
- <xsd:element name="some kind of mml result" minOccurs="0" maxOccurs="1" />
- <choice>
- <xsd:element name="cu" type=unit.type minOccurs="0" maxOccurs="1" />
- <xsd:element name="cunseq" type=unit.type minOccurs="0" maxOccurs="1" />
- <xsd:element name="csymbol" type=unit.type minOccurs="0" maxOccurs="1" />
- </choice>
- </xsd:sequence>
- </xsd:element>
- <xsd:sequence>
- <choice>
- <xsd:element name="cn" minOccurs="0" maxOccurs="1" />
- <xsd:element name="ci" minOccurs="0" maxOccurs="1" />
- </choice>
- <xsd:element name="cu" type="unit.type" minOccurs="0" maxOccurs="1" />
- </xsd:sequence>
- </choice>
-</xsd:element>
-
-<xsd:element name="phys" type="physics.type" />
-<xsd:element name="iphys" type="physics.type" />
-<xsd:element name="dphys" type="physics.type" />
-
-</xsd:schema>
diff --git a/Master/texmf-dist/tex/context/base/x-res-00.mkii b/Master/texmf-dist/tex/context/base/x-res-00.mkii
deleted file mode 100644
index d031e1453ed..00000000000
--- a/Master/texmf-dist/tex/context/base/x-res-00.mkii
+++ /dev/null
@@ -1,67 +0,0 @@
-%D \module
-%D [ file=x-res-00,
-%D version=2001.03.21,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Resource Libraries,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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
-
-% \defineXMLcommandpush [rl:instance] (todo)
-% \rawframed == [frame=off,offset=overlay]
-
-% resource library
-
-\defineXMLprocess [rl:figurelibrary] % not to be used any longer
-\defineXMLprocess [rl:library]
-
-% resource library description
-
-\defineXMLignore [rl:description]
-
-\defineXMLpush [rl:organization]
-\defineXMLpush [rl:product]
-\defineXMLpush [rl:project]
-\defineXMLpush [rl:collection]
-
-% resource library entries (better use XMLignore)
-
-\defineXMLignore [rl:applet]
-\defineXMLignore [rl:application]
-\defineXMLignore [rl:figure]
-\defineXMLignore [rl:movie]
-\defineXMLignore [rl:sound]
-
-\defineXMLpush [rl:type]
-\defineXMLpush [rl:state]
-\defineXMLpush [rl:width]
-\defineXMLpush [rl:height]
-\defineXMLpush [rl:file]
-\defineXMLpush [rl:label]
-\defineXMLpush [rl:original]
-\defineXMLpush [rl:title]
-\defineXMLpush [rl:alternative]
-\defineXMLpush [rl:dummy]
-\defineXMLpush [rl:icon]
-\defineXMLpush [rl:copyright]
-\defineXMLpush [rl:comment]
-\defineXMLpush [rl:status]
-\defineXMLpush [rl:original]
-\defineXMLpush [rl:manipulation]
-
-% instances
-
-\defineXMLignore [rl:instance]
-
-\defineXMLpush [rl:background]
-\defineXMLpush [rl:viewport]
-\defineXMLpush [rl:dimension]
-\defineXMLpush [rl:position]
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/x-res-01.mkii b/Master/texmf-dist/tex/context/base/x-res-01.mkii
deleted file mode 100644
index 41580a0b8ef..00000000000
--- a/Master/texmf-dist/tex/context/base/x-res-01.mkii
+++ /dev/null
@@ -1,487 +0,0 @@
-%D \module
-%D [ file=x-fig-01,
-%D version=2001.03.21,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Figure Base Generation,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 See \type {x-fig-00.tex} and \type {x-fig-04.tex} for more
-%D information on how to use and generate figure databases.
-%D This file loads the file named \type {\jobfilename}
-%D (\TEXEXEC\ will set this variable). You can apply this
-%D style to a database by saying:
-%D
-%D \starttyping
-%D texexec --pdf --use=fig-make yourfile.xml
-%D \stoptyping
-%D
-%D The following modes are supported:
-%D
-%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 \NC clipgrid-distance \NC add a copy with grid overlayed \NC \NR
-%D \NC clipgrid-steps \NC add a copy with grid overlayed \NC \NR
-%D \NC previewpage-A4 \NC show graphic relative to A4 \NC \NR
-%D \NC previewpage-letter \NC show graphic relative to letter \NC \NR
-%D \NC previewpage-S6 \NC show graphic relative to S6 \NC \NR
-%D \stoptabulate
-%D
-%D The resulting file has the following characteristics:
-%D
-%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 \item there is no title page, which means that one can
-%D access a figure by page number without offset
-%D \item the document is opened at the first overview page,
-%D that is, when the viewer supports it
-%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 \item the labels can be accessed in an index and list at
-%D the end of the document
-%D \stopitemize
-%D
-%D We use named destinations, which means that one can
-%D access a figure by name from an external application.
-
-\usemodule[res-00]
-
-\autoXMLnamespace[rl]
-
-\setupoutput[pdftex] \overcomePDFspacefalse
-
-\setjobfullname {xml} % default suffix
-
-\doifnothing {\jobfullname} {\end}
-\doiffileelse {\jobfullname} {} {\end}
-
-\definesymbol [attachment] [{\bf\color[darkred]{\jobname.xml}}]
-\setupattachments [symbol=attachment]
-\useattachment [datafile] [\jobname.xml]
-
-\def\StartDescription
- {\bgroup}
-
-\def\StopDescription
- {\subject {Figure collection}
- \starttabulate[|lBe|p|]
- \doifXMLdataelse{rl:organization}
- {\NC organization \NC \XMLflush{rl:organization} \NC \NR}{}
- \doifXMLdataelse{rl:project}
- {\NC project \NC \XMLflush{rl:project} \NC \NR}{}
- \doifXMLdataelse{rl:product}
- {\NC product \NC \XMLflush{rl:product} \NC \NR}{}
- \doifXMLdataelse{rl:comment}
- {\NC comment \NC \XMLflush{rl:comment} \NC \NR}{}
- \NC specification \NC \attachment[datafile] \NC \NR
- \stoptabulate
- \blank[2*big]
- \egroup}
-
-
-\def\localexternalfigurereplacement#1#2#3% hack, no reuse of dummies (yet), todo: pass objname
- {\doifelsenothing{\XMLflush{rl:label}}
- {\edef\FigureName{\XMLflush{rl:label}}}
- {\edef\FigureName{\XMLflush{rl:file}}}%
- \doifobjectfoundelse{rl}\FigureName
- {}
- {\setobject{rl}\FigureName\vbox{\normalexternalfigurereplacement{#1}{#2}{#3}}}%
- \getobject{rl}\FigureName}
-
-\startmode[dummy]
-
- \useMPlibrary[dum]
-
- \def\StartFigureA
- {\bgroup
- \XMLassign{rl:file}{dummy}}
-
- \let\normalexternalfigurereplacement\externalfigurereplacement
- \let\externalfigurereplacement \localexternalfigurereplacement
-
-\stopmode
-
-\startnotmode[dummy]
-
- \def\StartFigureA
- {\bgroup
- \XMLassign{rl:file}{unknown}}
-
-\stopnotmode
-
-\startbuffer[unknown]
- \framed
- [width=\XMLpar{rl:dummy}{width}{12cm},
- height=\XMLpar{rl:dummy}{height}{8cm},
- background=color,
- backgroundcolor=gray,
- foregroundcolor=darkred,
- align={lohi,middle}, % normal,
- frame=off]
- {\bf \XMLflush{rl:dummy}}
-\stopbuffer
-
-\useexternalfigure[unknown][unknown][type=buffer,object=no]
-
-\defineoverlay[page][\overlaybutton{Description}]
-
-% \def\externalfigurereplacement#1#2#3%
-% {\getbuffer[rl-unknown]}
-
-\def\StopFigureA
- {\doglobal\increment\CurrentPage
- \setupbackgrounds[page][background=page]
- \doifelsenothing{\XMLflush{rl:label}}
- {\expanded{\definereference[Description][about:\XMLflush{rl:file}]}%
- \expanded{\pagereference[\XMLflush{rl:file}]}}
- {\expanded{\definereference[Description][about:\XMLflush{rl:label}]}%
- \expanded{\pagereference[\XMLflush{rl:label}]}}
- \pagefigure[\XMLflush{rl:file}]
- \setupbackgrounds[page][background=]
- \egroup}
-
-\def\StartFigureB
- {\StartFigureA}
-
-\defineregister
- [figureindex]
- [figureindices]
-
-\setupregister
- [figureindex]
- [ownnumber=yes,
- criterium=text,
- interaction=text,
- indicator=no]
-
-\definelist
- [figurelist]
-
-\setuplist
- [figurelist]
- [criterium=text,
- pagenumber=no,
- width=2em,
- interaction=all]
-
-\setupcolors
- [state=start]
-
-\setuptolerance
- [verytolerant]
-
-% Ulgy:
-
-\startmode[letter] % downward compatible
- \enablemode[previewpage-letter]
-\stopmode
-
-\startnotmode[previewpage-letter,previewpage-S6]
- \enablemode[previewpage-A4]
-\stopnotmode
-
-\startsetups[paper]
-\startmode[previewpage-A4]
- \framed
- [width=210mm,height=297mm,offset=overlay,frame=off,
- background=color,backgroundcolor=white]
- {\externalfigure[\XMLflush{rl:file}][reset=yes]}
-\stopmode
-\startmode[previewpage-letter]
- \framed
- [width=8.5in,height=11in,offset=overlay,frame=off,
- background=color,backgroundcolor=white]
- {\externalfigure[\XMLflush{rl:file}][reset=yes]}
-\stopmode
-\startmode[previewpage-S6]
- \framed
- [width=600pt,height=450pt,offset=overlay,frame=off,
- background=color,backgroundcolor=white]
- {\externalfigure[\XMLflush{rl:file}][reset=yes]}
-\stopmode
-\stopsetups
-
-\setupbuttons
- [offset=10pt,
- width=broad,
- strut=no,
- rulethickness=1pt,
- framecolor=darkred]
-
-\definecolor[XMLRLcolor][white]
-
-\def\StopFigureB
- {\doglobal\increment\CurrentPage
- \doifelsenothing{\XMLflush{rl:label}}
- {\expanded{\definereference[Figure][\XMLflush{rl:file}]}%
- \expanded{\definereference[GridPg][grid:\XMLflush{rl:file}]}}
- {\expanded{\definereference[Figure][\XMLflush{rl:label}]}%
- \expanded{\definereference[GridPg][grid:\XMLflush{rl:label}]}}%
- \button
- {\hbox to \hsize
- {\forgetall \dontcomplain
- \doifelsenothing{\XMLflush{rl:label}}
- {\expanded{\pagereference[about:\XMLflush{rl:file}]}}
- {\expanded{\pagereference[about:\XMLflush{rl:label}]}}%
- % moved here, because descriptions may be absent
- \ifnum\CurrentPage=1 \pagereference[begin]\fi
- %
- \expanded{\writetolist[figurelist]{\CurrentPage}{\XMLflush{rl:label}}}%
- \expanded{\figureindex{\CurrentPage}{\XMLflush{rl:label}}}%
- \startnotmode[compact]%
- \vbox to 100pt
- {\hsize30pt
- \vskip5pt
- \hbox to \hsize{\hss\strut\bf\CurrentPage\hss}%
- \vfill}%
- \advance\hsize by -30pt
- \stopnotmode
- \startmode[compact]%
- \advance\hsize by -10pt
- \hskip10pt
- \stopmode
- \button % \framed
- [width=150pt,height=100pt,offset=10pt,frame=off,
- background=color,backgroundcolor=white,color=]
- {\externalfigure
- [\XMLflush{rl:file}]
- %[maxheight=80pt,frame=off,maxwidth=130pt,factor=max]}%
- [factor=max]}%
- [GridPg]%
- \let\FigWid\figurenaturalwidth
- \let\FigHei\figurenaturalheight
- \advance\hsize by -150pt
- \hskip10pt
- \advance\hsize by -10pt
- \vbox to 100pt
- {\hsize40pt
- %\externalfigure
- % [paper]
- % [type=buffer,frame=on,
- % framecolor=darkred,rulethickness=.5pt,
- % width=40pt,object=no]
- \framed
- [offset=overlay,
- framecolor=darkred,
- rulethickness=.5pt]
- {\scale[width=40pt]{\setups[paper]}}%
- \startmode[compact]%
- \vfill
- \hbox to \hsize{\hss\strut\bf\CurrentPage\hss}%
- \stopmode
- \vfill}%
- \advance\hsize by -40pt
- \hskip10pt
- \advance\hsize by -10pt
- \vbox to 100pt
- {\blank[disable]
- \starttabulate[|Bel|p|]
- \NC file \NC \XMLflush{rl:file} \NC \NR
- \doifXMLdata{rl:label}
- {\NC label \NC \XMLflush{rl:label} \NC \NR}
- \NC w$\times$h \NC \FigWid$\times$\FigHei \NC \NR
- \doifXMLdata{rl:copyright}
- {\NC copyright \NC \XMLflush{rl:copyright} \NC \NR}
- \doifXMLdata{rl:status}
- {\doifelse{\XMLflush{rl:status}}{obsolete}
- {\NC status \NC \dontleavehmode \color[darkred]{\bf\XMLflush{rl:status}} \NC \NR}
- {\NC status \NC \XMLflush{rl:status} \NC \NR}}
- \doifXMLdata{rl:comment}
- {\NC comment \NC \XMLflush{rl:comment} \NC \NR}
- \stoptabulate
- \vfill}}}%
- [Figure]
- \vskip10pt
- \egroup}
-
-\def\StartFigureC
- {\StartFigureA}
-
-\def\StopFigureC
- {\doglobal\increment\NumberOfFigures
- \egroup}
-
-\setuplayout
- [topspace=15pt,backspace=15pt,
- header=0pt,footer=0pt,bottom=20pt,bottomdistance=10pt,
- width=middle,height=fit]
-
-\setupbackgrounds
- [page]
- [background=,
- backgroundcolor=gray]
-
-\setupinteractionscreen
- [width=max,
- height=max]
-
-\setupcolors
- [state=start]
-
-\setupinteraction
- [style=,
- color=,
- contrastcolor=,
- state=start]
-
-\setuphead
- [section]
- [style=bfb]
-
-% \setupbodyfont
-% [pos]
-
-\setupinteractionmenu
- [bottom]
- [left=\hfill,
- middle=\hskip10pt,
- frame=off,
- style=bold,
- background=color,
- backgroundcolor=darkred,
- foregroundcolor=white]
-
-\startinteractionmenu[bottom]
- \but [begin] begin \\
- \but [index] index \\
- \but [list] list \\
- \but [CloseDocument] close \\
- \but [PreviousJump] go back \\
-\stopinteractionmenu
-
-\setupinteraction
- [openaction=begin]
-
-\defineXMLenvironment [rl:figurelibrary] \StartLibrary \StopLibrary
-\defineXMLenvironment [rl:library] \StartLibrary \StopLibrary
-
-\starttext
-
-\def\StartLibrary{\mainlanguage[\XMLpar{rl:library}{language}{en}]}
-\def\StopLibrary {}
-
-\defineXMLignore [rl:description]
-\defineXMLenvironment [rl:figure] \StartFigureC \StopFigureC
-
-\doglobal\newcounter\CurrentPage
-
-\processXMLfilegrouped{\jobfullname}
-
-\increment\NumberOfFigures
-
-\defineXMLignore [rl:description]
-\defineXMLenvironment [rl:figure] \StartFigureA \StopFigureA
-
-\doglobal\newcounter\CurrentPage
-
-\processXMLfilegrouped{\jobfullname}
-
-\setuppapersize
- [S6][S6]
-
-\setupbackgrounds
- [page]
- [background=color]
-
-\setupinteraction
- [menu=on]
-
-\defineXMLenvironment [rl:description] \StartDescription \StopDescription
-\defineXMLenvironment [rl:figure] \StartFigureB \StopFigureB
-
-\doglobal\newcounter\CurrentPage
-
-\processXMLfilegrouped{\jobfullname} \page
-
-\subject [list] {List of figures}
-
-\placelist[figurelist] \page
-
-\subject [index] {Index of figures}
-
-\startcolumns
-\placeregister[figureindex]
-\stopcolumns
-
-\doifmodeelse{clipgrid-distance,clipgrid-steps}{\page}{\stoptext}
-
-\startuniqueMPgraphic{clipgrid}{dx,dy,nx,ny,type}
- numeric gdx, gdy, lbx, lby ;
- if \MPvar{type}=1 :
- gdx := \MPvar{dy} ;
- gdy := \MPvar{dx} ;
- else :
- gdx := OverlayWidth /\MPvar{nx} ;
- gdy := OverlayHeight/\MPvar{ny} ;
- fi ;
- lbx := gdx ;
- lby := gdy ;
- defaultfont := "\truefontname{Mono}" ;
- defaultscale := .5 ;
- numeric pen ; pen := .25pt ;
- def MyGrid text t =
- draw vlingrid (0,OverlayWidth ,gdy,OverlayWidth ,OverlayHeight) t ;
- draw hlingrid (0,OverlayHeight,gdx,OverlayHeight,OverlayWidth ) t ;
- enddef ;
- pickup pencircle scaled pen ;
- MyGrid withcolor white ;
- MyGrid dashed evenly scaled pen ;
- draw OverlayBox withcolor white ;
- draw OverlayBox dashed evenly scaled pen ;
- draw vlinlabel.bot(0,eps+OverlayWidth /lby,2,OverlayWidth ) ;
- draw hlinlabel.lft(0,eps+OverlayHeight/lbx,2,OverlayHeight) ;
- setbounds currentpicture to OverlayBox enlarged (2*EmWidth) ;
-\stopuniqueMPgraphic
-
-\presetMPvariable[clipgrid][dx=10pt]
-\presetMPvariable[clipgrid][dy=10pt]
-\presetMPvariable[clipgrid][nx=10]
-\presetMPvariable[clipgrid][ny=10]
-
-\startmode[clipgrid-distance]
- \defineoverlay[grid][\uniqueMPgraphic{clipgrid}{type=1}]
-\stopmode
-
-\startmode[clipgrid-steps]
- \defineoverlay[grid][\uniqueMPgraphic{clipgrid}{type=2}]
-\stopmode
-
-\setupexternalfigures
- [background={color,foreground,grid},
- backgroundcolor=white]
-
-\def\StartFigureD
- {\StartFigureA}
-
-\def\StopFigureD
- {\doglobal\increment\CurrentPage
- \setupbackgrounds[page][background=page]
- \startpagefigure[\XMLflush{rl:file}][offset=20pt]%
- \doifelsenothing{\XMLflush{rl:label}}
- {\expanded{\definereference[Description][about:\XMLflush{rl:file}]}%
- \expanded{\pagereference[grid:\XMLflush{rl:file}]}}
- {\expanded{\definereference[Description][about:\XMLflush{rl:label}]}%
- \expanded{\pagereference[grid:\XMLflush{rl:label}]}}
- \stoppagefigure
- %\pagefigure[\XMLflush{rl:file}][offset=20pt]
- \setupbackgrounds[page][background=]
- \egroup}
-
-\defineXMLignore [rl:description]
-\defineXMLenvironment [rl:figure] \StartFigureD \StopFigureD
-
-\doglobal\newcounter\CurrentPage
-
-\processXMLfilegrouped{\jobfullname} \page
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/x-res-01.mkiv b/Master/texmf-dist/tex/context/base/x-res-01.mkiv
deleted file mode 100644
index 36070c61599..00000000000
--- a/Master/texmf-dist/tex/context/base/x-res-01.mkiv
+++ /dev/null
@@ -1,427 +0,0 @@
-%D \module
-%D [ file=x-fig-01,
-%D version=2001.03.21,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Figure Base Generation,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 See \type {x-fig-00.tex} and \type {x-fig-04.tex} for more
-%D information on how to use and generate figure databases.
-%D This file loads the file named \type {\jobfilename}
-%D (\TEXEXEC\ will set this variable). You can apply this
-%D style to a database by saying:
-%D
-%D \starttyping
-%D context --input=d-res-01.xml auto:x-res-01.mkiv
-%D \stoptyping
-%D
-%D The following modes are supported (not all yet in mkiv):
-%D
-%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 \NC clipgrid-distance \NC add a copy with grid overlayed \NC \NR
-%D \NC clipgrid-steps \NC add a copy with grid overlayed \NC \NR
-%D \NC previewpage-A4 \NC show graphic relative to A4 \NC \NR
-%D \NC previewpage-letter \NC show graphic relative to letter \NC \NR
-%D \NC previewpage-S6 \NC show graphic relative to S6 \NC \NR
-%D \stoptabulate
-%D
-%D The resulting file has the following characteristics:
-%D
-%D \startitemize[packed]
-%D \startitem the document is split into three sections: first each
-%D figure is shown at its own page, then an overview of figures is
-%D shown with some data alongside, and finally an index and table of
-%D contents shows up \stopitem
-%D \startitem there is no title page, which means that one can access
-%D a figure by page number without offset \stopitem
-%D \startitem the document is opened at the first overview page, that
-%D is, when the viewer supports it \stopitem
-%D \startitem the graphic is shown 3~times: on a page of its own,
-%D scaled to a fixed dimension, and relative to a4 or letter paper
-%D size \stopitem
-%D \startitem the labels can be accessed in an index and list at the
-%D end of the document \stopitem
-%D \stopitemize
-
-\defineregister
- [figureindex]
-
-\setupregister
- [figureindex]
- [criterium=text,
- interaction=text,
- pagenumber=no,
- indicator=no]
-
-\setuptolerance
- [verytolerant]
-
-\setupbuttons
- [offset=10pt,
- width=broad,
- strut=no,
- rulethickness=1pt,
- framecolor=darkred]
-
-\setuplayout
- [topspace=15pt,
- backspace=15pt,
- header=0pt,
- footer=0pt,
- bottom=20pt,
- bottomdistance=10pt,
- width=middle,
- height=fit]
-
-\setupbackgrounds
- [page]
- [background=,
- backgroundcolor=gray]
-
-\setupinteractionscreen
- [width=max,
- height=max]
-
-\setupinteraction
- [style=,
- color=,
- contrastcolor=,
- state=start]
-
-\setuphead
- [section]
- [style=bfb]
-
-\setupinteractionmenu
- [bottom]
- [left=\hfill,
- middle=\hskip10pt,
- frame=off,
- style=bold,
- background=color,
- backgroundcolor=darkred,
- foregroundcolor=white]
-
-\startinteractionmenu[bottom]
- \but [begin] begin \\
- \but [index] index \\
- \but [list] list \\
- \but [CloseDocument] close \\
- \but [PreviousJump] go back \\
-\stopinteractionmenu
-
-\setupinteraction
- [openaction=begin]
-
-\setuppapersize
- [S6][S6]
-
-\setupbackgrounds
- [page]
- [background=color]
-
-\setupinteraction
- [menu=on]
-
-\setupbodyfont
- [tt,10pt]
-
-\definesymbol [attachment] [{\strut\bf\color[darkred]{\inputfilename}}] % jobname.xml}}]
-\setupattachments [symbol=attachment,alternative=,location=text]
-\useattachment [datafile] [\inputfilename]
-
-\xmlloadonly{main}{\inputfilename}{}
-
-\mainlanguage[\xmlattributedef{main}{/rlx:library}{language}{en}]
-
-\startxmlsetups xml:resource:asis
- \startTEXpage[pagestate=start]
- \xmldoifelsetext{#1}{/rlx:label} {
- \edef\CurrentLabel{\xmltext{#1}{rlx:label}}
- } {
- \edef\CurrentLabel{\xmltext{#1}{rlx:file}}
- }
- \pagereference [
- asis:\CurrentLabel
- ]
- \gotobox {
- \externalfigure[\xmltext{#1}{/rlx:file}]
- }[% tricky no space before [
- data:\CurrentLabel
- ]
- \stopTEXpage
-\stopxmlsetups
-
-\definemeasure[figure:width] [210mm]
-\definemeasure[figure:height][297mm]
-
-\startmode[letter]
- \enablemode[previewpage-letter]
-\stopmode
-
-\startmode[previewpage-A4]
- \definemeasure[figure:width] [210mm]
- \definemeasure[figure:height][297mm]
-\stopmode
-
-\startmode[previewpage-letter]
- \definemeasure[figure:width] [8.5in]
- \definemeasure[figure:height][11in]
-\stopmode
-
-\startmode[previewpage-S6]
- \definemeasure[figure:width] [600pt]
- \definemeasure[figure:height][450pt]
-\stopmode
-
-\startxmlsetups xml:resource:a
- \button
- [
- width=150pt,
- height=100pt,
- offset=10pt,
- frame=off,
- background=color,
- backgroundcolor=white,
- color=
- ]
- {
- \externalfigure
- [\xmltext{#1}{rlx:file}]
- [factor=max]
- }
- [
- grid:\CurrentLabel
- ]
-\stopxmlsetups
-
-\startxmlsetups xml:resource:b
- \framed
- [
- width=150pt,
- height=100pt,
- offset=10pt,
- frame=off,
- background=color,
- backgroundcolor=white,
- color=
- ]
- {
- \externalfigure [
- \xmltext{#1}{rlx:file}
- ] [
- factor=max
- ]
- }
-\stopxmlsetups
-
-\startxmlsetups xml:resource:data
-
- % using a layer makes more sense but we had this ...
-
- \xmldoifelsetext{#1}{/rlx:label} {
- \edef\CurrentLabel{\xmltext{#1}{rlx:label}}
- } {
- \edef\CurrentLabel{\xmltext{#1}{rlx:file}}
- }
-
- \button {
- \hbox to \hsize {
- \forgetall
- \dontcomplain
- \pagereference[data:\CurrentLabel]
-
- %\ifnum\CurrentPage=1 \pagereference[begin]\fi
-
- \expanded{\figureindex{\xmltext{#1}{/rlx:label}}}
-
- \vbox to 100pt {
- \hsize30pt
- \vskip5pt
- \hbox to \hsize {
- \hss
- \strut
- \bf
- \at[asis:\CurrentLabel]
- \hss
- }
- \vfill
- }
- \advance\hsize by -30pt
- \doifelsemode {clipgrid-distance,clipgrid-steps} {
- \xmlsetup{#1}{xml:resource:a}
- } {
- \xmlsetup{#1}{xml:resource:b}
- }
- \edef\CurrentWidth {\the\dimexpr\figurenaturalwidth}
- \edef\CurrentHeight{\the\dimexpr\figurenaturalheight}
- \advance\hsize by -150pt
- \hskip10pt
- \advance\hsize by -10pt
- \vbox to 100pt {
- \hsize40pt
- \framed [
- offset=overlay,
- framecolor=darkred,
- rulethickness=.5pt
- ] {
- \scale [
- width=40pt
- ] {
- \framed [
- width=\measure{figure:width},
- height=\measure{figure:height},
- offset=overlay,
- frame=off,
- background=color,
- backgroundcolor=white
- ] {
- \externalfigure
- [
- \xmltext{#1}{rlx:file}
- ] [
- reset=yes
- ]
- }
- }
- }
- \vfill
- }
- \advance\hsize by -40pt
- \hskip10pt
- \advance\hsize by -10pt
- \vbox to 100pt {
- \blank[disable]
- \starttabulate[|Bel|p|]
- \NC file \NC \xmltext{#1}{/rlx:file} \NC \NR
- \xmldoif{#1}{/rlx:label} {\NC label \NC \xmltext{#1}{/rlx:label} \NC \NR}
- \NC dimensions \NC \CurrentWidth\ * \CurrentHeight \NC \NR
- \xmldoif{#1}{/rlx:copyright} {\NC copyright \NC \xmltext{#1}{/rlx:copyright} \NC \NR}
- \xmldoif{#1}{/rlx:status} {\NC status \NC \xmltext{#1}{/rlx:status} \NC \NR}
- \xmldoif{#1}{/rlx:comment} {\NC comment \NC \xmltext{#1}{/rlx:comment} \NC \NR}
- \stoptabulate
- \vfill
- }
- }
- } [
- asis:\CurrentLabel
- ]
-
- \vskip10pt
-
-\stopxmlsetups
-
-\startxmlsetups xml:description
-
- \starttabulate[|lBe|p|]
- \xmldoif{#1}{/rlx:organization} {\NC organization \NC \xmltext{#1}{/rlx:organization} \NC \NR}
- \xmldoif{#1}{/rlx:project} {\NC project \NC \xmltext{#1}{/rlx:project} \NC \NR}
- \xmldoif{#1}{/rlx:product} {\NC product \NC \xmltext{#1}{/rlx:product} \NC \NR}
- \xmldoif{#1}{/rlx:comment} {\NC comment \NC \xmltext{#1}{/rlx:comment} \NC \NR}
- \NC specification \NC \attachment[datafile] \NC \NR
- \stoptabulate
-
-\stopxmlsetups
-
-\starttext
-
- \xmlfilter{main}{/rlx:library/rlx:resource/command(xml:resource:asis)}
-
- \subject {Figure collection}
-
- \xmlfilter{main}{/rlx:library/rlx:description/command(xml:description)}
-
- \subject [list] {List of figures}
-
- \xmlfilter{main}{/rlx:library/rlx:resource/command(xml:resource:data)}
-
- \page
-
- \subject [index] {Index of figures}
-
- \startcolumns
- \placeregister[figureindex]
- \stopcolumns
-
-\stoptext
-
-% \doifmodeelse{clipgrid-distance,clipgrid-steps}{\page}{\stoptext}
-
-% \startuniqueMPgraphic{clipgrid}{dx,dy,nx,ny,type}
-% numeric gdx, gdy, lbx, lby ;
-% if \MPvar{type}=1 :
-% gdx := \MPvar{dy} ;
-% gdy := \MPvar{dx} ;
-% else :
-% gdx := OverlayWidth /\MPvar{nx} ;
-% gdy := OverlayHeight/\MPvar{ny} ;
-% fi ;
-% lbx := gdx ;
-% lby := gdy ;
-% defaultfont := "\truefontname{Mono}" ;
-% defaultscale := .5 ;
-% numeric pen ; pen := .25pt ;
-% def MyGrid text t =
-% draw vlingrid (0,OverlayWidth ,gdy,OverlayWidth ,OverlayHeight) t ;
-% draw hlingrid (0,OverlayHeight,gdx,OverlayHeight,OverlayWidth ) t ;
-% enddef ;
-% pickup pencircle scaled pen ;
-% MyGrid withcolor white ;
-% MyGrid dashed evenly scaled pen ;
-% draw OverlayBox withcolor white ;
-% draw OverlayBox dashed evenly scaled pen ;
-% draw vlinlabel.bot(0,eps+OverlayWidth /lby,2,OverlayWidth ) ;
-% draw hlinlabel.lft(0,eps+OverlayHeight/lbx,2,OverlayHeight) ;
-% setbounds currentpicture to OverlayBox enlarged (2*EmWidth) ;
-% \stopuniqueMPgraphic
-
-% \presetMPvariable[clipgrid][dx=10pt]
-% \presetMPvariable[clipgrid][dy=10pt]
-% \presetMPvariable[clipgrid][nx=10]
-% \presetMPvariable[clipgrid][ny=10]
-
-% \startmode[clipgrid-distance]
-% \defineoverlay[grid][\uniqueMPgraphic{clipgrid}{type=1}]
-% \stopmode
-
-% \startmode[clipgrid-steps]
-% \defineoverlay[grid][\uniqueMPgraphic{clipgrid}{type=2}]
-% \stopmode
-
-% \setupexternalfigures
-% [background={color,foreground,grid},
-% backgroundcolor=white]
-
-% \def\StartFigureD
-% {\StartFigureA}
-
-% \def\StopFigureD
-% {\doglobal\increment\CurrentPage
-% \setupbackgrounds[page][background=page]
-% \startpagefigure[\XMLflush{rlx:file}][offset=20pt]%
-% \doifelsenothing{\XMLflush{rlx:label}}
-% {\expanded{\definereference[Description][about:\XMLflush{rlx:file}]}%
-% \expanded{\pagereference[grid:\XMLflush{rlx:file}]}}
-% {\expanded{\definereference[Description][about:\XMLflush{rlx:label}]}%
-% \expanded{\pagereference[grid:\XMLflush{rlx:label}]}}
-% \stoppagefigure
-% %\pagefigure[\XMLflush{rlx:file}][offset=20pt]
-% \setupbackgrounds[page][background=]
-% \egroup}
-
-% \defineXMLignore [rlx:description]
-% \defineXMLenvironment [rlx:figure] \StartFigureD \StopFigureD
-
-% \doglobal\newcounter\CurrentPage
-
-% \processXMLfilegrouped{\jobfullname} \page
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/x-res-02.mkii b/Master/texmf-dist/tex/context/base/x-res-02.mkii
deleted file mode 100644
index f8502dbac1c..00000000000
--- a/Master/texmf-dist/tex/context/base/x-res-02.mkii
+++ /dev/null
@@ -1,72 +0,0 @@
-%D \module
-%D [ file=x-res-02,
-%D version=2001.03.21,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Figure Base Inclusion (I),
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 enables non||\ConTeXt\ users to access the
-%D database. For this, you need to run
-%D
-%D \starttyping
-%D texexec --pdf --use=fig-fake yourfile.xml
-%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 \starttyping
-%D \getfigurefile{label}
-%D \getfigurepage{label}
-%D \stoptyping
-%D
-%D A a bonus, the following macro is defined:
-%D
-%D \starttyping
-%D \includefigurefile width 10cm {label}
-%D \stoptyping
-
-\usemodule[res-00]
-
-\doifnothing {\jobfullname} {\end}
-\doiffileelse {\jobfullname} {} {\end}
-
-\defineXMLenvironment [rl:figurelibrary] \StartLibrary \StopLibrary
-\defineXMLenvironment [rl:library] \StartLibrary \StopLibrary
-\defineXMLenvironment [rl:figure] \StartFigure \StopFigure
-
-\def\StartLibrary
- {\immediate\openout \scratchwrite=\jobfilename.fig
- \immediate\write\scratchwrite{\string\input\space x-fig-03.tex \string\relax}
- \immediate\write\scratchwrite{}}
-
-\def\StopLibrary
- {\immediate\write\scratchwrite{}
- \immediate\write\scratchwrite{\string\endinput}
- \immediate\closeout\scratchwrite}
-
-\def\StartFigure
- {\bgroup}
-
-\def\StopFigure
- {\doglobal\increment\CurrentPage
- \immediate\write\scratchwrite
- {\string\setfiguredata\space
- {\XMLpop{rl:label}}
- {\jobfilename}
- {\CurrentPage}}
- \egroup}
-
-\doglobal\newcounter\CurrentPage
-
-\starttext
-
-\processXMLfilegrouped{\jobfullname}
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/x-res-03.mkii b/Master/texmf-dist/tex/context/base/x-res-03.mkii
deleted file mode 100644
index 15f2620c1be..00000000000
--- a/Master/texmf-dist/tex/context/base/x-res-03.mkii
+++ /dev/null
@@ -1,44 +0,0 @@
-%D \module
-%D [ file=x-fig-03,
-%D version=2001.03.21,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Figure Base Inclusion (II),
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 \undefined \convertMPtoPDF \input supp-pdf.tex \fi
-\ifx \undefined \includefigurefile \else \expandafter \endinput \fi
-
-\gdef\getfigurefile#1%
- {\expandafter\ifx\csname x-fig-f-#1\endcsname\relax
- \currentfigurefile
- \else
- \csname x-fig-f-#1\endcsname
- \fi}
-
-\gdef\getfigurepage#1%
- {\expandafter\ifx\csname x-fig-p-#1\endcsname\relax
- 1%
- \else
- \csname x-fig-p-#1\endcsname
- \fi}
-
-\gdef\setfiguredata#1#2#3%
- {\gdef\currentfigurefile{#2}%
- \expandafter\gdef\csname x-fig-f-#1\endcsname{#2}%
- \expandafter\gdef\csname x-fig-p-#1\endcsname{#3}}
-
-\def\includefigurefile#1#%
- {\doincludefigurefile{#1}}
-
-\def\doincludefigurefile#1#2%
- {\edef\next{\noexpand\pdfimage
- #1 page \getfigurepage{#2} {\getfigurefile{#2}.pdf}}%
- \next}
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-res-04.mkii b/Master/texmf-dist/tex/context/base/x-res-04.mkii
deleted file mode 100644
index b22e9ffa439..00000000000
--- a/Master/texmf-dist/tex/context/base/x-res-04.mkii
+++ /dev/null
@@ -1,336 +0,0 @@
-%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 ADE \& \CONTEXT\ Development Team}]
-%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
-% caption : \figurebasevariable{caption}
-% background : rgb cmyk gray name
-% dimensions : width height offset (l,r,t,b) area
-% alternative : tag label / evt list
-%
-% movie
-% sound
-% applet
-% application
-
-\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
-%D the following \DTD:
-%D
-%D \typefile{x-fig-00.dtd}
-%D
-%D A figure base coded this way looks like:
-%D
-%D \starttyping
-%D <!-- texexec --pdf --use=fig-01 figtest.xml -->
-%D
-%D <?xml version='1.0'?>
-%D
-%D <rl:library language="nl">
-%D
-%D <rl:description>
-%D <organization>PRAGMA Advanced Document Engineering</rl:organization>
-%D <project>Manuals</rl:project>
-%D <product>Beginners Manual</rl:product>
-%D <comment>A bunch of figures.</rl:comment>
-%D </rl:description>
-%D
-%D <rl:figure>
-%D <rl:file>koe.pdf</rl:file>
-%D <rl:label>a dutch cow</rl:label>
-%D <rl:copyright>Corel Draw Suite</rl:copyright>
-%D <rl:comment>I bet that you've seen this cow before.</rl:comment>
-%D </rl:figure>
-%D
-%D <rl:figure>
-%D <rl:dummy width="4cm" height="3cm">non existent</rl:dummy>
-%D <rl:label>a european cow</rl:label>
-%D <rl:copyright>Nobody</rl:copyright>
-%D <rl:comment>When will we talk about European cows?</rl:comment>
-%D </rl:figure>
-%D
-%D </rl:library>
-%D \stoptyping
-%D
-%D You can convert this base into a \PDF\ file using
-%D \TEXEXEC\ and another module in this suite.
-%D
-%D \starttyping
-%D texexec --pdf --use=fig-make yourfile.xml
-%D \stoptyping
-%D
-%D You can now select a graphic from this file using the
-%D
-%D \starttyping
-%D \externalfigure[a dutch cow][width=4cm]
-%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 \starttyping
-%D \usemodule [fig-base]
-%D \usefigurebases[yourfile]
-%D \stoptyping
-%D
-%D The special keyword \type {reset} can be used to reset
-%D this list.
-
-\startcommands dutch english
- german czech
- italian romanian
-
- usefigurebase: gebruikfiguurbestand usefigurebase
- usefigurebase usefigurebase
- usefigurebase usefigurebase
-
-\stopcommands
-
-\unprotect
-
-\consultutilityfilefalse
-
-% 0 = no loading
-% 1 = selective loading
-% 2 = full loading
-
-\chardef\figurebasemode=1 % 2
-
-\newcounter\figurefilepage
-
-% loading a complete figure base
-
-\startXMLmapping[rl:load]
-
-\defineXMLenvironmentsave [rl:figure]
- {\bgroup}
- {\XMLflush{rl:figure}
- \doglobal\increment\figurefilepage
- \figbase@savedata{\XMLflush{rl:label}}\figurefilepage
- \egroup}
-
-\stopXMLmapping
-
-\def\loadfigurebase#1%
- {\doifnotflagged{rl:#1}
- {\writestatus{figbase}{loading #1 into memory}%
- \startnointerference
- \autoXMLnamespace[rl]
- \startXMLmapping[rl:load]
- \doglobal\newcounter\figurefilepage
- \processXMLfilegrouped{#1.xml}
- \stopXMLmapping
- \doglobal\setflag{rl:#1}
- \stopnointerference}}
-
-\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
-
-\startXMLmapping[rl:find]
-
-\defineXMLenvironment[rl:instance]
- {\bgroup}
- {\doif\askedlabel{\XMLflush{rl:label}}
- {\doglobal\saveXMLdata{rl:g:manipulation}{rl:manipulation}%
- \doifXMLdata{rl:original}
- {\xdef\askedlabel{\XMLflush{rl:original}}}}%
- \egroup}
-
-\defineXMLenvironmentsave [rl:figure]
- {\bgroup}
- {\XMLflush{rl:figure}
- \doglobal\increment\figurefilepage
- %\doshowfigurestate{base : comparing \askedlabel\space with \XMLflush{rl:label}}%
- \doif\askedlabel{\XMLflush{rl:label}}
- {\doshowfigurestate{base label : found \askedlabel}%
- \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}}
- \endinput}%
- \egroup}
-
-\defineXMLenvironment [rl:record]
- {}
- {\xdef\figurefilename{\XMLpop{rl:file}}
- \xdef\figurefilepage{\XMLop {page}}}
-
-\stopXMLmapping
-
-\def\getfigurefilename#1#2%
- {\ifnum\figurebasemode=\plustwo \loadfigurebase{#1} \fi
- \startnointerference
- \traceXMLelementsfalse
- \resetfigurefilebase
- \doglobal\newcounter\figurefilepage
- \autoXMLnamespace[rl]
- \startXMLmapping[rl:find]
- \xdef\figurefilebase{#1}%
- \def\askedlabel{#2}%
- \doifelseXMLelement{rl:rl:\askedlabel}
- {\enableXMLelements\flushXMLelement{rl:rl:\askedlabel}}
- {\doshowfigurestate{base path : \figurepathlist}%
- \processcommacommand[\figurepathlist]\dogetfigurefilename}%
- \stopXMLmapping
- \stopnointerference}
-
-% todo: niet toegekende naam doorgeven aan calculate en pad
-% in padstring
-
-\def\dogetfigurefilename#1%
- {\ifx\figurefilename\empty
- \bgroup
- \doglobal\newcounter\figurefilepage
- \globalletempty\figurefilelabel
- \globalletempty\figurefileoriginal
- \globalletempty\figurefilefile
- \xdef\figurefilebasepath{#1}%
- \assignfullfilename{#1}{\figurefilebase}\to\filename
- \doiffileelse{\filename.xml}
- {\doshowfigurestate{base file : \filename}%
- \expanded{\processXMLfilegrouped{\filename.xml}}}
- \donothing
- \ifx\figurefilename\empty \else
-% \global\let\figurefilebase\figurefilebase
- \globallet\figurefilebase\filename % hm, bad omen that this is needed
- \fi
- \egroup
- \fi}
-
-\newtoks\figurebaseresets
-
-\appendtoks
- \globalletempty\figurefilebase
- \globalletempty\figurefilename
- \globalletempty\figurefilebasepath
- \globalletempty\figurefilepage
- \globalletempty\figurefilelabel
- %\globalletempty\figurefileoriginal
- %\globalletempty\figurefilefile
-\to\figurebaseresets
-
-\def\resetfigurefilebase
- {\the\figurebaseresets}
-
-\ifx\doshowfigurestate\undefined \let\doshowfigurestate\gobbleoneargument \fi
-
-\def\doanalyzefiguredimensionsfromfile
- {\ifcase\figurestatus \ifx\figurebaselist\empty \else
- \resetfigurefilebase
- \doshowfigurestate{base list : \figurebaselist}%
- \processcommacommand[\figurebaselist]\dodoanalyzefiguredimensionsfromfile
- \ifx\figurefilename\empty
- \doshowfigurestate{base warning : no matching name found}%
- \else
- \doiffileelse{\figurefilebase.pdf}
- {\doshowfigurestate{base file : \figurefilebase.pdf}%
- \doshowfigurestate{base page : \figurefilepage}%
- \let\figurepathlist\figurefilebasepath
- \analyzefigurefilename{\figurefilebase.pdf}\wantedfigurelabel
- \let\wantedfigurepage\figurefilepage}
- {\doshowfigurestate{base missing : \figurefilebase.pdf}}
- \fi
- \ifcase\figurestatus
- \analyzefigurefilename\expandedfigurename\wantedfigurelabel
- \fi
- \fi \fi}
-
-\def\dodoanalyzefiguredimensionsfromfile#1%
- {\doshowfigurestate{base check : \wantedfigurename\space in #1}%
- \getfigurefilename{#1}\wantedfigurename
- \ifx\figurefilename\empty\else
- \quitcommalist
- \fi}
-
-% management
-
-% will become \useresourcelibrary
-
-\def\usefigurebase[#1]%
- {\doifelse{#1}\v!reset
- {\let\figurebaselist\empty}
- {\addtocommalist{#1}\figurebaselist}}
-
-\let\figurebaselist\empty
-
-\resetfigurefilebase
-
-% manipulations / todo: fixed order
-
-\defineXMLsave [rl:manipulation]
-
-\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!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
- \clip
- [\XMLta]
- {\box\foundexternalfigure}}%
- \global\setbox\foundexternalfigure\vbox
- {\scale
- [\c!width=\figurewidth,\c!height=\figureheight]
- {\box\foundexternalfigure}}}
-
-\defineXMLsingular [rl:dimensions] [width=,height=]
- {}
-
-\defineXMLsingular [rl:position] [offset=,width=,height=,hoffset=,voffset=]
- {}
-
-\appendtoks
- \doglobal\eraseXMLelement{rl:l:manipulation}%
- \doglobal\eraseXMLelement{rl:g:manipulation}%
-\to \figurebaseresets
-
-\appendtoks
- \startnointerference
- \processXMLelement{rl:l:manipulation}%
- \processXMLelement{rl:g:manipulation}%
- \stopnointerference
-\to \externalfigurepostprocessors
-
-\protect \doifnotmode{demo}{\endinput}
-
-\starttext
-
-\setupcolors[state=start]
-
-\usefigurebase[d-fig-01]
-
-\externalfigure[part of a dutch cow][width=3cm,frame=on]
-\externalfigure[a simple dutch cow][width=5cm,frame=on]
-\externalfigure[another simple dutch cow][width=5cm,frame=on]
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/x-res-08.mkii b/Master/texmf-dist/tex/context/base/x-res-08.mkii
deleted file mode 100644
index 0805f071fdb..00000000000
--- a/Master/texmf-dist/tex/context/base/x-res-08.mkii
+++ /dev/null
@@ -1,129 +0,0 @@
-%D \module
-%D [ file=x-fig-08,
-%D version=2002.06.27,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Resource Reporting,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 TODO: make rlxtools callable from texexec (class), speeds up things.
-
-%D Experimental module!
-%D
-%D \starttyping
-%D <rl:library>
-%D <rl:usage>
-%D <rl:type>figure</rl:type>
-%D <rl:state>found|missing</rl:state>
-%D <rl:name>filename</rl:name>
-%D <rl:suffix>filesuffix</rl:suffix>
-%D <rl:width>width in pt</rl:width>
-%D <rl:height>height in pt</rl:height>
-%D <rl:comment>text</rl:comment>
-%D </rl:usage>
-%D </rl:library>
-%D \stoptyping
-
-\unprotect \doifnotmode{\systemmodeprefix\v!first}{\protect\endinput}
-
-\def\XMLrlprefix{rl:}
-
-\newwrite\XMLrllog
-
-\def\openXMLresourcelog
- {\immediate\openout\XMLrllog\jobname.rlg\relax
- \immediate\write\XMLrllog{\XMLbanner{standalone='yes'}}%
- \immediate\write\XMLrllog{\writtenXMLstart{\XMLrlprefix library}}}
-
-\def\closeXMLresourcelog
- {\immediate\write\XMLrllog{\writtenXMLend{\XMLrlprefix library}}%
- \immediate\closeout\XMLrllog}
-
-\let\figurefilelabel \empty
-\let\figurefileoriginal \empty
-\let\figurefilefile \empty
-\let\figurefilepath \empty
-\let\figurefileconversion\empty
-\let\figurefileprefix \empty
-
-\def\XMLfeedbackresource#1#2%
- {\begingroup
- \defconvertedcommand\currentresourcecomment\currentresourcecomment
- \doifnothing\figurefilefile{\edef\figurefilefile{\figurefilename.\figurefiletype}}%
- \immediate\write\XMLrllog
- {\writtenXMLelement{\XMLrlprefix usage}%
- {\writtenXMLelement{\XMLrlprefix type}{#2}% 'figure' not the type in \extenalfigure
- \writtenXMLelement{\XMLrlprefix state}{#1}% 'missing' 'found' etc
- \ifx\figurefilelabel\empty
- \ifx\figurelabel\s!dummy \else % otherwise label equals filename
- \writtenXMLelementcs{\XMLrlprefix label}\figurelabel
- \fi
- \writtenXMLelementcs{\XMLrlprefix file}\figurefilefile % complete name
- \writtenXMLelementcs{\XMLrlprefix name}\figurefilename % no suffix
- \writtenXMLelementcs{\XMLrlprefix suffix}\figurefiletype
- \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
- \writtenXMLelementcs{\XMLrlprefix base}\figurefilename
- \writtenXMLelementcs{\XMLrlprefix label}\figurefilelabel
- \writtenXMLelementcs{\XMLrlprefix file}\figurefilefile
- \fi
- \writtenXMLelementcs{\XMLrlprefix path}\figurefilepath
- \writtenXMLelementcs{\XMLrlprefix original}\figurefileoriginal
- \writtenXMLelementcs{\XMLrlprefix conversion}\figurefileconversion
- \writtenXMLelementcs{\XMLrlprefix prefix}\figurefileprefix
- \writtenXMLelementcs{\XMLrlprefix cache}\figurefilecache
- \ifnum\figurefilepage>\zerocount
- \writtenXMLelement{\XMLrlprefix page}\figurefilepage
- \fi
- \writtenXMLelementcs{\XMLrlprefix comment}\currentresourcecomment
- \ifconditional\externalfigureflush
- \writtenXMLelementcs{\XMLrlprefix width}\figurewidth
- \writtenXMLelementcs{\XMLrlprefix height}\figureheight
- \fi}}%
- \endgroup}
-
-\def\XMLfeedbackexternalfigure
- {\doifmodeelse{*\v!figure}%
- {\XMLfeedbackresource{found}}%
- {\XMLfeedbackresource{\ifconditional\externalfigureflush missing\else registered\fi}}%
- {figure}}
-
-\setvariables
- [rl:manipulate]
- [file=rlxtools.rlx]
-
-% \startsetups[rl:manipulate]
-% \doiflocfileelse{\jobname.rlx}
-% {\installprogram{texmfstart rlxtools --manipulate kpse:\jobname.rlx \jobname.rlg}}
-% {\installprogram{texmfstart rlxtools --manipulate kpse:\getvariabledefault{rl:manipulate}{file}{rlxtools.rlx} \jobname.rlg}}
-% \stopsetups
-%
-% no longer need for \setups[rl:manipulate]
-
-\ifx\nofconversionfigures\undefined \chardef\nofconversionfigures\plusone \fi
-
-\appendtoks
- \ifcase\nofconversionfigures
- \writestatus\m!systems{not registering rlxtools (manipulator)}%
- \else
- \writestatus\m!systems{registering rlxtools (manipulator)}%
- \doiflocfileelse{\jobname.rlx}
- {\installprogram{texmfstart rlxtools --manipulate "kpse:\jobname.rlx" "\jobname.rlg"}}
- {\installprogram{texmfstart rlxtools --manipulate "kpse:\getvariabledefault{rl:manipulate}{file}{rlxtools.rlx}" "\jobname.rlg"}}%
- \fi
-\to \everybye % \everylastshipout
-
-\appendtoks \openXMLresourcelog \to \everystarttext
-\appendtoks \closeXMLresourcelog \to \everystoptext
-
-\let \feedbackexternalfigure \XMLfeedbackexternalfigure
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/x-res-09.mkii b/Master/texmf-dist/tex/context/base/x-res-09.mkii
deleted file mode 100644
index e3354e9a422..00000000000
--- a/Master/texmf-dist/tex/context/base/x-res-09.mkii
+++ /dev/null
@@ -1,69 +0,0 @@
-%D \module
-%D [ file=x-fig-09,
-%D version=2002.06.27,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Resource Reporting (2),
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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]
-
-\defineXMLenvironment [rl:library]
- {\starttext}
- {\stoptext}
-
-\defineXMLenvironment [rl:usage]
- {\bgroup}
- {\doifnot{\XMLflush{rl:file}}{dummy}{\setups[rl:usage]}%
- \egroup}
-
-\defineXMLsave [rl:base] % base
-\defineXMLsave [rl:type] % figure
-\defineXMLsave [rl:state] % found|missing
-\defineXMLsave [rl:label] % label
-\defineXMLsave [rl:file] % filename
-\defineXMLsave [rl:suffix] % filesuffix
-\defineXMLsave [rl:comment] % text
-\defineXMLsave [rl:width] % width in pt
-\defineXMLsave [rl:height] % height in pt
-\defineXMLsave [rl:page] % page from file
-
-\def\XMLbpentry#1%
- {\PointsToWholeBigPoints{\XMLflush{#1}}\temp\temp bp}
-
-% \def\XMLrlentry#1#2#3%
-% {\doiftextelse{\XMLflush{#2}}
-% {\NC\bf#1\NC\XMLflush{#2}\doif{#3}{1}{ (\XMLbpentry{#2})}\NC\NR}
-% {}}
-
-\def\XMLrlentry#1#2#3%
- {\tableiftextelse{\XMLflush{#2}}
- {\NC\bf#1\NC\XMLflush{#2}\doif{#3}{1}{ (\XMLbpentry{#2})}\NC\NR}{}}
-
-\startsetups[rl:usage]
-
-% by using a dedicated tabulation, we permit usage in dutch interface
-
-\definetabulate[XMLRLG][|lw(4.5em)|p|]
-
-\startXMLRLG
- \XMLrlentry {base} {rl:base} {0}
- \XMLrlentry {type} {rl:type} {0}
- \XMLrlentry {state} {rl:state} {0}
- \XMLrlentry {file} {rl:file} {0}
- \XMLrlentry {label} {rl:label} {0}
- \XMLrlentry {suffix} {rl:suffix} {0}
- \XMLrlentry {page} {rl:page} {0}
- \XMLrlentry {width} {rl:width} {1}
- \XMLrlentry {height} {rl:height} {1}
- \XMLrlentry {comment}{rl:comment}{0}
-\stopXMLRLG
-
-\stopsetups
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-res-10.mkii b/Master/texmf-dist/tex/context/base/x-res-10.mkii
deleted file mode 100644
index 833bce776e1..00000000000
--- a/Master/texmf-dist/tex/context/base/x-res-10.mkii
+++ /dev/null
@@ -1,75 +0,0 @@
-%D \module
-%D [ file=x-fig-10,
-%D version=2003.08.02,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Resource Dummy Generation,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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]
-
-\defineXMLenvironment [rl:library]
- {\starttext}
- {\stoptext}
-
-\defineXMLenvironment [rl:usage]
- {\bgroup}
- {\doif{\XMLflush{rl:type}-\XMLflush{rl:state}}{figure-missing}
- {\doifnot{\XMLflush{rl:file}}{dummy}{\setups[rl:usage]}}
- \egroup}
-
-\defineXMLsave [rl:type] % figure
-\defineXMLsave [rl:state] % found|missing
-\defineXMLsave [rl:file] % filename
-
-\defineXMLsavecontent [rl:width] {12cm} % width in pt
-\defineXMLsavecontent [rl:height] {9cm} % height in pt
-
-\useMPlibrary
- [dum]
-
-\setupcolors
- [state=start]
-
-\defineoverlay
- [rl:banner]
- [\setups{rl:banner}]
-
-\startsetups[rl:banner]
-
- \framed [frame=off,offset=none,align={lohi,middle}]
- \bgroup
- \tt \white \XMLflush{rl:file}
- \egroup
-
-\stopsetups
-
-\startsetups[rl:usage]
-
- \startTEXpage
-
- % \externalfigure
- % [\XMLflush{rl:file}] % goes wrong when file present
- % [object=no,
- % backgroundcolor=green,background={foreground,color,rl:banner},
- % width=\XMLflush{rl:width},
- % height=\XMLflush{rl:height}]
-
- \def\figurewidth {\XMLflush{rl:width}}
- \def\figureheight{\XMLflush{rl:height}}
-
- \externalfigurereplacement
- {\XMLflush{rl:file}}
- {\XMLflush{rl:file}}
- {\XMLflush{rl:state}}
-
- \stopTEXpage
-
-\stopsetups
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-res-11.mkii b/Master/texmf-dist/tex/context/base/x-res-11.mkii
deleted file mode 100644
index 84157be883a..00000000000
--- a/Master/texmf-dist/tex/context/base/x-res-11.mkii
+++ /dev/null
@@ -1,110 +0,0 @@
-%D \module
-%D [ file=x-fig-11,
-%D version=2003.02.08,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Resource Reporting (3),
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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]
-
-\defineXMLenvironment [rl:library]
- {\starttext
- \doiffileelse{\outputfilename.zip}{\setups[rl:attach]}{}
- \disablemode[rl:used]}
- {\doifnotmode{rl:used}{No images processed.}
- \page
- \stoptext}
-
-\defineXMLenvironment [rl:usage]
- {\bgroup}
- {\doifnot{\XMLflush{rl:file}}{dummy}
- {\setups[rl:usage]
- \enablemode[rl:used]}
- \egroup}
-
-\defineXMLsave [rl:base] % base
-\defineXMLsave [rl:type] % figure
-\defineXMLsave [rl:state] % found|missing
-\defineXMLsave [rl:label] % label
-\defineXMLsave [rl:file] % filename
-\defineXMLsave [rl:suffix] % filesuffix
-\defineXMLsave [rl:comment] % text
-\defineXMLsave [rl:width] % width in pt
-\defineXMLsave [rl:height] % height in pt
-\defineXMLsave [rl:page] % page from file
-
-\def\XMLbpentry#1%
- {\PointsToWholeBigPoints{\XMLflush{#1}}\temp\temp bp}
-
-\def\XMLrlentry#1#2#3%
- {\tableiftextelse{\XMLflush{#2}}
- {\NC\bf#1\NC\XMLflush{#2}\doif{#3}{1}{ (\XMLbpentry{#2})}\NC\NR}{}}
-
-\unprotect
-
-\setuplayout[\v!middle]
-
-\startsetups[rl:figure]
-
- \externalfigure[\XMLflush{rl:file}][\c!width=4cm]
-
-\stopsetups
-
-\startsetups[rl:table]
-
-% by using a dedicated tabulation, we permit usage in dutch interface
-
-\definetabulate[XMLRLG][|lw(4.5em)|p|]
-
-\startXMLRLG
- \XMLrlentry {base} {rl:base} {0}
- \XMLrlentry {type} {rl:type} {0}
- \XMLrlentry {state} {rl:state} {0}
- \XMLrlentry {file} {rl:file} {0}
- \XMLrlentry {label} {rl:label} {0}
- \XMLrlentry {suffix} {rl:suffix} {0}
- \XMLrlentry {page} {rl:page} {0}
- \XMLrlentry {width} {rl:width} {1}
- \XMLrlentry {height} {rl:height} {1}
- \XMLrlentry {comment}{rl:comment}{0}
-\stopXMLRLG
-
-\stopsetups
-
-\startsetups[rl:usage]
-
- \startfiguretext {\v!none} {\setups[rl:figure]}
- \setups[rl:table]
- \stopfiguretext
-
-\stopsetups
-
-\startsetups[rl:attach]
-
- \useMPlibrary[nav]
-
- \setupcolors[\c!state=\v!start]
-
- \setupinteraction[\c!state=\v!start]
-
- \useattachment[whatever][\outputfilename.zip]
-
- \startlocalsetups[rl:attach:button]
-
- \inframed
- [\c!offset=\v!overlay,\c!frame=\v!off]
- {\attachment[whatever]}
-
- \stoplocalsetups
-
- \setupfootertexts[archive with dummies: \setups{rl:attach:button}]
-
-\stopsetups
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/x-res-12.mkii b/Master/texmf-dist/tex/context/base/x-res-12.mkii
deleted file mode 100644
index 81761ae9ad1..00000000000
--- a/Master/texmf-dist/tex/context/base/x-res-12.mkii
+++ /dev/null
@@ -1,53 +0,0 @@
-%D \module
-%D [ file=x-fig-12,
-%D version=2005.05.05,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Resource Checking,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 implements the dimension checking using \RLXTOOLS.
-
-\unprotect
-
-\chardef\figurerlxmode\plusone % rlx permitted
-
-\startXMLmapping[rli]
- \defineXMLprocess[rl:identify]
- \defineXMLsavecontent[rl:width] {\!!zeropoint}
- \defineXMLsavecontent[rl:height]{\!!zeropoint}
-\stopXMLmapping
-
-\def\doanalyzefiguredimensionsrlx
- {\ifcase\figurestatus \ifcase\figurerlxmode \else
- \doifnotfile{\wantedfigurefullname.rli}
- {% let's try runtime running first
- \doshowfiguremessage6\wantedfigurefullname
- \executesystemcommand{texmfstart rlxtools --identify \wantedfigurefullname}}%
- \doifnotfile{\wantedfigurefullname.rli}
- {% we assume that runtime running failed
- \doshowfiguremessage6\wantedfigurefullname
- \installprogram{texmfstart rlxtools --identify \wantedfigurefullname}}%
- \doiffile{\wantedfigurefullname.rli}
- {\global\let\analyzedfigurewidth \!!zeropoint
- \global\let\analyzedfigureheight\!!zeropoint
- \startnointerference % groups
- \startXMLmapping[rli]%
- \startXMLignore
- \processXMLfile{\wantedfigurefullname.rli}%
- \xdef\analyzedfigurewidth {\the\dimexpr\XMLflush{rl:width} \relax}% turn whatever into pt
- \xdef\analyzedfigureheight{\the\dimexpr\XMLflush{rl:height}\relax}% turn whatever into pt
- \stopXMLignore
- \stopXMLmapping
- \stopnointerference
- \setanalyzedfiguredimensions\!!twelve}%
- \fi\fi}
-
-\let\doanalyzefiguredimensionsexternal\doanalyzefiguredimensionsrlx
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/x-res-20.mkii b/Master/texmf-dist/tex/context/base/x-res-20.mkii
deleted file mode 100644
index 0bc1358ec41..00000000000
--- a/Master/texmf-dist/tex/context/base/x-res-20.mkii
+++ /dev/null
@@ -1,231 +0,0 @@
-%D \module
-%D [ file=x-res-20,
-%D version=2006.08.20,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Figure Lists,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 For the beginning we have used \TEXUTIL\ to hels us deal with
-%D graphics whose dimensions could not be determines and|/|or to
-%D provide placeholder info for graphics that were not available.
-%D Much of this functionality is now moved to \RLXTOOLS\ and
-%D therefore it makes sense to reimplement the code that deals with
-%D producing an overview of grapghics as well. At the same time we
-%D move some \TEX\ code from \TEXEXEC\ to here.
-%D
-%D Because the show commands are not used in real documents, but
-%D only for special purposed, it does not harm that this
-%D functionality is now part of a module. We no longer use the
-%D parsing code in \TEXUTIL, but rely on \IMAGEMAGICK's
-%D identify functionility.
-%D
-%D At the end of the file we kept the old code from \type {core-fig}.
-
-\unprotect
-
-\startXMLmapping[rlx:list]
-
- \defineXMLprocess
- [rl:identification]
-
- \defineXMLenvironment
- [rl:identify] [name=]
- {\bgroup\ignorespaces}
- {\removeunwantedspaces\doRLhandlegraphic\egroup}
-
- \defineXMLsave[rl:size]
- \defineXMLsave[rl:path]
- \defineXMLsave[rl:width]
- \defineXMLsave[rl:height]
-
-\stopXMLmapping
-
-\def\showexternalfigures
- {\dosingleempty\doshowexternalfigures}
-
-\let\doRLhandlegraphic\relax
-\let\doRLstartgraphics\relax
-\let\doRLstopgraphics \relax
-
-\let\RLfigurewidth \empty
-\let\RLfigureheight\empty
-\let\RLfiguresize \empty
-\let\RLfigurefile \empty
-
-\def\doRLpresetgraphic
- {\edef\RLfigurewidth {\the\dimexpr \XMLflush{rl:width}\relax}%
- \edef\RLfigureheight{\the\dimexpr \XMLflush{rl:height}\relax}%
- \edef\RLfiguresize {\the\numexpr0\XMLflush{rl:size}\relax}%
- \edef\RLfigurefile {\XMLpar{rl:identify}{name}{unknown}}}
-
-\def\doshowexternalfigures[#1]%
- {\bgroup
- \dontcomplain
- \setupcolors[\c!state=\v!start]% to prevent mps color conversion
- \getparameters[\??ex][\c!file=rlxtools.rli,\c!alternative=a,\c!offset=\!!zeropoint,\c!size=,#1]%
- \getvalue{\strippedcsname\doRLhandlegraphic\@@exalternative}%
- \startXMLmapping[rlx:list]%
- \startXMLignore
- \doRLstartgraphics
- \processXMLfilegrouped{\@@exfile}% \readjobfile\@@exfile\donothing\donothing
- \doRLstopgraphics
- \stopXMLignore
- \stopXMLmapping
- \egroup}
-
-\def\doRLhandlegraphica
- {\def\doRLhandlegraphic
- {\doRLpresetgraphic
- \getvalue{\e!start\v!figure\e!text}[\v!left,\v!none][]
- {}
- {\hbox
- {\externalfigure[\RLfigurefile][\c!frame=\v!on,\c!width=6cm,\c!size=\@@exsize]%
- \quad
- \framed[\c!width=\figurewidth,\c!height=\figureheight]{}%
- \quad}}%
- {\hbox{\tt\tfa\setstrut\strut\expanded{\asciistr{\RLfigurefile}}}}%
- \blank
- \tfx
- \starttabulate[|l|l|]
- \NC width \EQ \RLfigurewidth \NC \NR
- \NC height \EQ \RLfigureheight \NC \NR
- \NC size \EQ \RLfiguresize \NC \NR
- \stoptabulate
- \getvalue{\e!stop\v!figure\e!text}}}
-
-\def\doRLhandlegraphicb
- {\def\doRLhandlegraphic
- {\dontleavehmode
- \vbox
- {\doRLpresetgraphic
- \hsize\dimexpr.2\hsize-.8em\relax
- \cbox{\externalfigure[\RLfigurefile][\c!frame=\v!on,\c!factor=\v!max,\c!width=\hsize,\c!size=\@@exsize]}%
- \vskip.5\lineheight
- \midaligned{\tttf\RLfigurefile}}%
- \vadjust{\vskip.2\lineheight}%
- \quad\allowbreak}}
-
-\def\doRLhandlegraphicc
- {\def\doRLhandlegraphic
- {\doRLpresetgraphic
- \pagefigure[\RLfigurefile]}}
-
-\def\doRLhandlegraphicd % this one builds a dimension file for metapost/metafun
- {\def\doRLstartgraphics
- {\immediate\openout\scratchwrite=mpfigs.mp\relax
- \immediate\write\scratchwrite{\letterpercent\space graphic dimension file for metapost/metafun}}%
- \def\doRLstopgraphics
- {\immediate\closeout\scratchwrite}%
- \def\doRLhandlegraphic
- {\doRLpresetgraphic
- \immediate\write\scratchwrite{registerfigure("\RLfigurefile",\RLfigurewidth,\RLfigureheight);}}}
-
-% \showexternalfigures[alternative=b]
-
-\protect \endinput
-
-%D Old code:
-
-\def\doshowexternalfigures[#1]%
- {\bgroup
- \setupcolors[\c!state=\v!start]% to prevent mps color conversion
- \getparameters[\??ex][\c!alternative=a,\c!offset=\!!zeropoint,\c!size=,#1]%
- \getvalue{\strippedcsname\showexternalfigure\@@exalternative}%
- \egroup}
-
-\def\showexternalfigures
- {\dosingleempty\doshowexternalfigures}
-
-\def\showexternalfigurea
- {\bgroup
- \dontcomplain
- \def\presetfigure[##1][##2]%
- {\getvalue{\e!start\v!figure\e!text}[\v!left,\v!none][]
- {}
- {\hbox
- {\externalfigure[##1][\c!frame=\v!on,\c!width=6cm,\c!size=\@@exsize][##2]%
- \tfskip
- \framed[\c!width=\figurewidth,\c!height=\figureheight]{}}}%
- {\tt\tfa\expanded{\asciistr{##1}}}%
- \blank
- \tfx
- \def\docommand####1%
- {\beforesplitstring####1\at=\to\asciia
- \aftersplitstring ####1\at=\to\asciib
- \defconvertedcommand\asciib\asciib
- \doifsomething\asciib
- {\hsmash{\hbox to .75em{\asciia\hss}: \asciib}\endgraf}}%
- \processcommalist[##2]\docommand
- \strut
- \endgraf
- \getvalue{\e!stop\v!figure\e!text}}%
- \pushendofline
- \readjobfile\@@exfile\donothing\donothing
- \popendofline
- \egroup}
-
-\def\showexternalfigureb % instelbaar maken
- {\bgroup
- \def\total{5}%
- \globalletempty\allfigures
- \doglobal\newcounter\figurecounter
- \dontcomplain
- \def\docommand##1{##1&}%
- \def\figurecaptions%
- {\crcr
- \noalign{\nobreak\vskip.5em}%
- \@EA\globalprocesscommalist\@EA[\allfigures]\docommand
- \globalletempty\allfigures
- \crcr
- \noalign{\vskip1em\goodbreak}}%
- \def\presetfigure[##1][##2]%
- {\vbox
- {\divide\hsize \total
- \advance\hsize -1em
- \externalfigure
- [##1]
- [\c!frame=\v!on,\c!factor=\v!max,\c!width=\hsize,\c!size=\@@exsize][##2]}%
- \doglobal\addtocommalist{##1}\allfigures
- %\getvalue{\s!figurepreset}%
- \doglobal\increment\figurecounter
- \ifnum\figurecounter=\total
- \doglobal\newcounter\figurecounter
- \def\next{\figurecaptions}%
- \else
- \def\next{&}%
- \fi
- \next}%
- \pushendofline
- \tabskip\zeropoint \!!plus 1fill
- \halign to \hsize
- {&\hss##\hss\cr\readjobfile\@@exfile\donothing\donothing\crcr
- \figurecaptions}
- \popendofline
- \egroup}
-
-\def\showexternalfigurec
- {\bgroup
- \def\presetfigure[##1][##2]{\expanded{\pagefigure[##1][\c!size=\@@exsize]}}% else loop
- \pushendofline
- \readjobfile\@@exfile\donothing\donothing
- \popendofline
- \egroup}
-
-\def\showexternalfigured % to be documented; this one builds a dimension file for
- {\bgroup % metapost/metafun
- \immediate\openout\scratchwrite=mpfigs.mp
- \def\presetfigure[##1][##2]%
- {\getfiguredimensionsonly[##1]% \pagefigure[##1]%
- \immediate\write\scratchwrite
- {registerfigure("##1",\figurewidth,\figureheight);}}
- \pushendofline
- \readjobfile\@@exfile\donothing\donothing
- \popendofline
- \immediate\closeout\scratchwrite
- \egroup}
diff --git a/Master/texmf-dist/tex/context/base/x-res-50.mkii b/Master/texmf-dist/tex/context/base/x-res-50.mkii
deleted file mode 100644
index 3c3e758a7d2..00000000000
--- a/Master/texmf-dist/tex/context/base/x-res-50.mkii
+++ /dev/null
@@ -1,427 +0,0 @@
-%D \module
-%D [ file=x-res-50,
-%D version=2004.02.18,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Multimedia Presentation,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D This is a preliminary module, using a preliminary xml media format that
-%D looks as follows (record is embedded in resource library element):
-%D
-%D \starttyping
-%D <rl:mediaclip label="sample 1">
-%D <rl:name>Sample One</rl:name>
-%D <rl:mime>application/x-shockwave-flash</rl:mime>
-%D <rl:file>http://localhost/mb.swf</rl:file>
-%D <rl:width>8cm</rl:width>
-%D <rl:height>6cm</rl:height>
-%D <rl:text>Nothing special to be said.</rl:text>
-%D <rl:picture>cow.pdf</rl:picture>
-%D </rl:mediaclip>
-%D
-%D <rl:mediaclip label="sample 2">
-%D <rl:name>Sample Two</rl:name>
-%D <rl:mime>audio/mpeg</rl:mime>
-%D <rl:file>mb.mp3</rl:file>
-%D <rl:picture>mb.jpg</rl:picture>
-%D </rl:mediaclip>
-%D \stoptyping
-%D
-%D \starttyping
-%D texexec --pdf --use=med-show yourfile.xml
-%D \stoptyping
-%D
-%D Bonus:
-%D
-%D \starttyping
-%D --arg="url=http://localhost:8881/e:/media"
-%D \stoptyping
-
-% output=pdftex
-
-% \nopdfcompression
-
-% bugs in recognizing embedded stream cq. player
-% bugs in layers + hide/vide
-% bugs in save javascripts
-% bugs all over the place
-
-% in principe kan menu overal hetzelfde zijn als we via JS per pagina de clip var zetten,
-% hoewel, misschien zal het menu gaan afhangen van de soort clip
-
-% property (eigenschap) aan framed en layer
-
-\usemodule[meta-dum] \usemodule[contml] \autoXMLnamespace [context]
-
-\doifelsevariable{environment}{url}
- {\setvariables[mediaclip][url=\getvariable{environment}{url}/]}
- {\setvariables[mediaclip][url=]}
-
-\startmode [silent]
-
- \setvariables[mediaclip:option][start=]
-
-\stopmode
-
-\startnotmode [silent]
-
- \setvariables[mediaclip:option][start=auto]
-
-\stopnotmode
-
-\chardef\XMLtokensreduction=1 \dontcomplain % \showframe \pdfcompresslevel=0
-
-\setuppapersize
- [S6][S6]
-
-\definemeasure [GapSize] [\dimexpr( 15pt)]
-\definemeasure [EdgeWidth] [\dimexpr(100pt)]
-\definemeasure [TextWidth] [\dimexpr(.5\textwidth)]
-\definemeasure [RenderingWidth] [\dimexpr(\textwidth)]
-\definemeasure [RenderingHeight] [\dimexpr(\textheight)]
-
-% \XMLflush{rl:ratio}\dimexpr(.75\textwidth),
-
-\setuplayout
- [backspace=\measure{GapSize},
- topspace=\measure{GapSize},
- header=0pt,
- footer=0pt,
- margin=0pt,
- edgedistance=2\measure{GapSize},
- rightedge=\measure{EdgeWidth},
- bottomdistance=2\measure{GapSize},
- bottom=2\measure{GapSize},
- height=fit,
- width=fit]
-
-\setupinteraction
- [state=start,
- color=lightgray,
- contrastcolor=lightgray,
- openaction=PresetFields,
- closeaction=ForgetChanges,
- menu=on,
- click=no]
-
-\setupinteractionscreen
- [option=max]
-
-\setupcolors
- [state=start]
-
-\usetypescript
- [palatino][texnansi]
-
-\setupbodyfont
- [palatino]
-
-\definecolor[darkgray] [s=.2]
-\definecolor[mediumgray][s=.5]
-\definecolor[lightgray] [s=.8]
-\definecolor[transgray] [s=1,t=.9,a=1]
-
-\setupbackgrounds
- [page]
- [backgroundoffset=\measure{GapSize},
- background={color,pagebutton},
- backgroundcolor=black]
-
-\definelayer
- [main]
- [width=\textwidth,
- height=\textheight]
-
-\definelayer
- [extra]
- [width=\rightedgewidth,
- height=\bottomheight]
-
-\setupbackgrounds
- [text]
- [backgroundoffset=0pt,
- background=main]
-
-\setupbackgrounds
- [bottom][rightedge]
- [backgroundoffset=0pt,
- background=extra]
-
-% java scripts
-
-\startJSpreamble {handy} used now
-
- function ForgetChanges ()
- { this.dirty = false }
-
- function PresetFields ()
- { this.syncAnnotScan() }
-
-\stopJSpreamble
-
-\definereference[PresetFields] [JS(PresetFields)]
-\definereference[ForgetChanges][JS(ForgetChanges)]
-
-% layers
-
-\defineproperty [menulayer] [layer] [title=menulayer]
-\defineproperty [textlayer] [layer] [title=textlayer,state=stop]
-\defineproperty [datalayer] [layer] [title=datalayer,state=stop]
-
-\setupfield
- [rollbutton]
- [fieldlayer=menulayer]
-
-\setupfield
- [rollbutton]
- [option=auto]
-
-\definepalet
- [rollover]
- [n=darkgray,
- r=lightgray,
- d=darkgray]
-
-% list
-
-\definelist
- [clips]
- [expansion=yes,
- criterium=text,
- alternative=f]
-
-% navigation
-
-\defineoverlay[pagebutton][\overlaybutton{HideLayer{textlayer},HideLayer{datalayer},ToggleLayer{menulayer}}]
-\defineoverlay[textbutton][\overlaybutton{HideLayer{textlayer},HideLayer{datalayer}}]
-\defineoverlay[databutton][\overlaybutton{HideLayer{textlayer},HideLayer{datalayer}}]
-
-% clips
-
-\defineXMLenvironment
- [rl:mediaclip]
- {\setups[mediaclip:start]}
- {\setups[mediaclip:stop]}
-
-\newcounter\MediaClip
-
-\startsetups[mediaclip:start]
-
- \bgroup \startXMLignore
-
- % no \startstandardmakeup here since we need the dsta in the menuconstruction
-
- \defineXMLsave [rl:name]
- \defineXMLsave [rl:visualization]
- \defineXMLsave [rl:file]
- \defineXMLsave [rl:mime]
- \defineXMLsave [rl:picture] [backgroundcolor=lightgray]
-
- \defineXMLsavecontent [rl:text] {No additional info.}
- \defineXMLsavecontent [rl:width] {\measure{RenderingWidth}}
- \defineXMLsavecontent [rl:height] {\measure{RenderingHeight}}
- \defineXMLsavecontent [rl:aspect] {1}
-
-\stopsetups
-
-\startsetups[mediaclip:stop]
-
- \startstandardmakeup
-
- \doifXMLdataelse{rl:file}
- {\setups[mediaclip:file:yes]}
- {}
-
- \doifXMLdataelse{rl:picture}
- {\doifelse{\XMLflush{rl:picture}}{self}
- {\setups[mediaclip:picture:self]}
- {\setups[mediaclip:picture:yes]}}
- {\setups[mediaclip:picture:no]}
-
- \doifXMLdata{rl:text}
- {\setups[mediaclip:text]}
-
- \setlayerframed
- [extra]
- [preset=rightbottom]
- [frame=off,offset=overlay,width=fit,background=databutton,align=left]
- {\startproperty[datalayer]\setups[mediaclip:data]\stopproperty}
-
- \doifXMLdataelse{rl:name}
- {\writetolist[clips]{}{\XMLflush{rl:name}}}
- {\writetolist[clips]{}{\XMLpar{rl:mediaclip}{label}{unknown}}}
-
- \stopstandardmakeup
-
- \stopXMLignore \egroup
-
-\stopsetups
-
-\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\expanded{\rlCleanupFileName{\XMLflush{rl:file}}}}
-
- \vskip.75\measure{GapSize}
-
- \noindent \buttonframed
- [framecolor=lightgray,
- foregroundcolor=lightgray]
- {\bf\XMLflush{rl:mime}}
-
-\stopsetups
-
-\startsetups[mediaclip:picture:self]
-
- \definerenderingwindow
- [mediaclip]
- [width=\XMLflush{rl:width},
- height=\XMLflush{rl:height},
- frame=off,
- openpageaction=StartCurrentRendering,
- closepageaction=StopCurrentRendering]
-
- \setlayer
- [main]
- {\placerenderingwindow[mediaclip][mediaclip-\MediaClip]}
-
-\stopsetups
-
-\startsetups[mediaclip:picture:yes]
-
- \setlayer
- [main]
- {\externalfigure
- [\XMLflush{rl:picture}]
- [background=color,
- backgroundcolor=\XMLpar{rl:picture}{backgroundcolor}{lightgray},
- factor=max,
- width=\XMLflush{rl:width},
- height=\XMLflush{rl:height}]}
-
-\stopsetups
-
-\startsetups[mediaclip:picture:no]
-
- \setlayer
- [main]
- {\externalfigure
- [dummy]
- [width=\XMLflush{rl:width},
- height=\XMLflush{rl:height}]}
-
-\stopsetups
-
-\startsetups[mediaclip:file:yes]
-
- \doglobal\increment\MediaClip
-
- \useexternalrendering
- [mediaclip-\MediaClip]
- [\XMLflush{rl:mime}]
- [\getvariable{mediaclip}{url}\XMLflush{rl:file}]
- [\getvariable{mediaclip:option}{start}]
-
-\stopsetups
-
-\defineinteractionmenu
- [navigation] [right]
-
-\defineinteractionmenu
- [control] [bottom]
-
-\setupinteractionmenu
- [navigation,control]
- [state=start,
- frame=on,
- middle=\hskip.5\measure{GapSize},
- inbetween=\vskip.5\measure{GapSize}]
-
-\setupinteractionmenu
- [right,bottom]
- [distance=overlay]
-
-\startinteractionmenu [navigation]
- \rob [HideLayer{textlayer},FirstPage] First Page \\
- \rob [HideLayer{textlayer},PreviousPage] Previous Page \\
- \rob [HideLayer{textlayer},NextPage] Next Page \\
- \rob [HideLayer{textlayer},LastPage] Last Page \\
- \rob [HideLayer{textlayer},clips] List Of Clips \\
- \rob [ForgetChanges,CloseDocument] Close Document \\
-\stopinteractionmenu
-
-\startinteractionmenu [control]
- \rob [StartRendering{mediaclip-\MediaClip}] Start \\
- \rob [StopRendering{mediaclip-\MediaClip}] Stop \\
- \rob [PauseRendering{mediaclip-\MediaClip}] Pause \\
- \rob [ResumeRendering{mediaclip-\MediaClip}] Resume \\
- \rob [ToggleLayer{datalayer}] Info \\
- \doifXMLdata{rl:text}{\rob [HideLayer{datalayer},ToggleLayer{textlayer}] Text \\}
-\stopinteractionmenu
-
-\startsetups[mediaclip:text]
-
- \setlayer
- [extra]
- [preset=rightbottom]
- {\startproperty[textlayer]
- \framed
- [align=normal,
- frame=off,
- width=\measure{TextWidth},
- foregroundcolor=darkgray,
- background={color,textbutton},
- backgroundcolor=lightgray]
- {\XMLflush{rl:text}}
- \stopproperty}
-
-\stopsetups
-
-\setupcolors[textcolor=lightgray]
-
-\startsetups [library:start]
-
- \starttext
-
- \setupinteractionmenu[control][state=stop]
-
- \title[clips]{List of Media Clips}
-
- \placelist[clips] \page
-
- \setupinteractionmenu[control][state=start]
-
-\stopsetups
-
-\startsetups [library:stop]
-
- \stoptext
-
-\stopsetups
-
-\defineXMLenvironment [rl:resourcelibrary]
- {\setups[library:start]}
- {\setups[library:stop]}
-
-\doifelsenothing{\inputfilename}
- {\processXMLfile{mediaclient.xml}}
- {\processXMLfile{\inputfilename}}
diff --git a/Master/texmf-dist/tex/context/base/x-res-50.mkiv b/Master/texmf-dist/tex/context/base/x-res-50.mkiv
deleted file mode 100644
index 62a86b7a744..00000000000
--- a/Master/texmf-dist/tex/context/base/x-res-50.mkiv
+++ /dev/null
@@ -1,431 +0,0 @@
-%D \module
-%D [ file=x-res-50,
-%D version=2004.02.18,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Multimedia Presentation,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D The xml mapping has to be redone!
-
-\endinput
-
-%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 \starttyping
-%D <rl:mediaclip label="sample 1">
-%D <rl:name>Sample One</rl:name>
-%D <rl:mime>application/x-shockwave-flash</rl:mime>
-%D <rl:file>http://localhost/mb.swf</rl:file>
-%D <rl:width>8cm</rl:width>
-%D <rl:height>6cm</rl:height>
-%D <rl:text>Nothing special to be said.</rl:text>
-%D <rl:picture>cow.pdf</rl:picture>
-%D </rl:mediaclip>
-%D
-%D <rl:mediaclip label="sample 2">
-%D <rl:name>Sample Two</rl:name>
-%D <rl:mime>audio/mpeg</rl:mime>
-%D <rl:file>mb.mp3</rl:file>
-%D <rl:picture>mb.jpg</rl:picture>
-%D </rl:mediaclip>
-%D \stoptyping
-%D
-%D \starttyping
-%D texexec --pdf --use=med-show yourfile.xml
-%D \stoptyping
-%D
-%D Bonus:
-%D
-%D \starttyping
-%D --arg="url=http://localhost:8881/e:/media"
-%D \stoptyping
-
-% output=pdftex
-
-% \nopdfcompression
-
-% bugs in recognizing embedded stream cq. player
-% bugs in layers + hide/vide
-% bugs in save javascripts
-% bugs all over the place
-
-% in principe kan menu overal hetzelfde zijn als we via JS per pagina de clip var zetten,
-% hoewel, misschien zal het menu gaan afhangen van de soort clip
-
-% viewerlayer (eigenschap) aan framed en layer
-
-\usemodule[meta-dum] \usemodule[contml] \autoXMLnamespace [context]
-
-\doifelsevariable{environment}{url}
- {\setvariables[mediaclip][url=\getvariable{environment}{url}/]}
- {\setvariables[mediaclip][url=]}
-
-\startmode [silent]
-
- \setvariables[mediaclip:option][start=]
-
-\stopmode
-
-\startnotmode [silent]
-
- \setvariables[mediaclip:option][start=auto]
-
-\stopnotmode
-
-\chardef\XMLtokensreduction=1 \dontcomplain % \showframe \pdfcompresslevel=0
-
-\setuppapersize
- [S6][S6]
-
-\definemeasure [GapSize] [\dimexpr( 15pt)]
-\definemeasure [EdgeWidth] [\dimexpr(100pt)]
-\definemeasure [TextWidth] [\dimexpr(.5\textwidth)]
-\definemeasure [RenderingWidth] [\dimexpr(\textwidth)]
-\definemeasure [RenderingHeight] [\dimexpr(\textheight)]
-
-% \XMLflush{rl:ratio}\dimexpr(.75\textwidth),
-
-\setuplayout
- [backspace=\measure{GapSize},
- topspace=\measure{GapSize},
- header=0pt,
- footer=0pt,
- margin=0pt,
- edgedistance=2\measure{GapSize},
- rightedge=\measure{EdgeWidth},
- bottomdistance=2\measure{GapSize},
- bottom=2\measure{GapSize},
- height=fit,
- width=fit]
-
-\setupinteraction
- [state=start,
- color=lightgray,
- contrastcolor=lightgray,
- openaction=PresetFields,
- closeaction=ForgetChanges,
- menu=on,
- click=no]
-
-\setupinteractionscreen
- [option=max]
-
-\setupcolors
- [state=start]
-
-\usetypescript
- [palatino][texnansi]
-
-\setupbodyfont
- [palatino]
-
-\definecolor[darkgray] [s=.2]
-\definecolor[mediumgray][s=.5]
-\definecolor[lightgray] [s=.8]
-\definecolor[transgray] [s=1,t=.9,a=1]
-
-\setupbackgrounds
- [page]
- [backgroundoffset=\measure{GapSize},
- background={color,pagebutton},
- backgroundcolor=black]
-
-\definelayer
- [main]
- [width=\textwidth,
- height=\textheight]
-
-\definelayer
- [extra]
- [width=\rightedgewidth,
- height=\bottomheight]
-
-\setupbackgrounds
- [text]
- [backgroundoffset=0pt,
- background=main]
-
-\setupbackgrounds
- [bottom][rightedge]
- [backgroundoffset=0pt,
- background=extra]
-
-% java scripts
-
-\startJSpreamble {handy} used now
-
- function ForgetChanges ()
- { this.dirty = false }
-
- function PresetFields ()
- { this.syncAnnotScan() }
-
-\stopJSpreamble
-
-\definereference[PresetFields] [JS(PresetFields)]
-\definereference[ForgetChanges][JS(ForgetChanges)]
-
-% layers
-
-\defineviewerlayer [menulayer] [title=menulayer]
-\defineviewerlayer [textlayer] [title=textlayer,state=stop]
-\defineviewerlayer [datalayer] [title=datalayer,state=stop]
-
-\setupfield
- [rollbutton]
- [fieldlayer=menulayer]
-
-\setupfield
- [rollbutton]
- [option=auto]
-
-\definepalet
- [rollover]
- [n=darkgray,
- r=lightgray,
- d=darkgray]
-
-% list
-
-\definelist
- [clips]
- [expansion=yes,
- criterium=text,
- alternative=f]
-
-% navigation
-
-\defineoverlay[pagebutton][\overlaybutton{HideLayer{textlayer},HideLayer{datalayer},ToggleLayer{menulayer}}]
-\defineoverlay[textbutton][\overlaybutton{HideLayer{textlayer},HideLayer{datalayer}}]
-\defineoverlay[databutton][\overlaybutton{HideLayer{textlayer},HideLayer{datalayer}}]
-
-% clips
-
-\defineXMLenvironment
- [rl:mediaclip]
- {\setups[mediaclip:start]}
- {\setups[mediaclip:stop]}
-
-\newcounter\MediaClip
-
-\startsetups[mediaclip:start]
-
- \bgroup \startXMLignore
-
- % no \startstandardmakeup here since we need the dsta in the menuconstruction
-
- \defineXMLsave [rl:name]
- \defineXMLsave [rl:visualization]
- \defineXMLsave [rl:file]
- \defineXMLsave [rl:mime]
- \defineXMLsave [rl:picture] [backgroundcolor=lightgray]
-
- \defineXMLsavecontent [rl:text] {No additional info.}
- \defineXMLsavecontent [rl:width] {\measure{RenderingWidth}}
- \defineXMLsavecontent [rl:height] {\measure{RenderingHeight}}
- \defineXMLsavecontent [rl:aspect] {1}
-
-\stopsetups
-
-\startsetups[mediaclip:stop]
-
- \startstandardmakeup
-
- \doifXMLdataelse{rl:file}
- {\setups[mediaclip:file:yes]}
- {}
-
- \doifXMLdataelse{rl:picture}
- {\doifelse{\XMLflush{rl:picture}}{self}
- {\setups[mediaclip:picture:self]}
- {\setups[mediaclip:picture:yes]}}
- {\setups[mediaclip:picture:no]}
-
- \doifXMLdata{rl:text}
- {\setups[mediaclip:text]}
-
- \setlayerframed
- [extra]
- [preset=rightbottom]
- [frame=off,offset=overlay,width=fit,background=databutton,align=left]
- {\startviewerlayer[datalayer]\setups[mediaclip:data]\stopviewerlayer}
-
- \doifXMLdataelse{rl:name}
- {\writetolist[clips]{}{\XMLflush{rl:name}}}
- {\writetolist[clips]{}{\XMLpar{rl:mediaclip}{label}{unknown}}}
-
- \stopstandardmakeup
-
- \stopXMLignore \egroup
-
-\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\expanded{\rlCleanupFileName{\XMLflush{rl:file}}}}
-
- \vskip.75\measure{GapSize}
-
- \noindent \buttonframed
- [framecolor=lightgray,
- foregroundcolor=lightgray]
- {\bf\XMLflush{rl:mime}}
-
-\stopsetups
-
-\startsetups[mediaclip:picture:self]
-
- \definerenderingwindow
- [mediaclip]
- [width=\XMLflush{rl:width},
- height=\XMLflush{rl:height},
- frame=off,
- openpageaction=StartCurrentRendering,
- closepageaction=StopCurrentRendering]
-
- \setlayer
- [main]
- {\placerenderingwindow[mediaclip][mediaclip-\MediaClip]}
-
-\stopsetups
-
-\startsetups[mediaclip:picture:yes]
-
- \setlayer
- [main]
- {\externalfigure
- [\XMLflush{rl:picture}]
- [background=color,
- backgroundcolor=\XMLpar{rl:picture}{backgroundcolor}{lightgray},
- factor=max,
- width=\XMLflush{rl:width},
- height=\XMLflush{rl:height}]}
-
-\stopsetups
-
-\startsetups[mediaclip:picture:no]
-
- \setlayer
- [main]
- {\externalfigure
- [dummy]
- [width=\XMLflush{rl:width},
- height=\XMLflush{rl:height}]}
-
-\stopsetups
-
-\startsetups[mediaclip:file:yes]
-
- \doglobal\increment\MediaClip
-
- \useexternalrendering
- [mediaclip-\MediaClip]
- [\XMLflush{rl:mime}]
- [\getvariable{mediaclip}{url}\XMLflush{rl:file}]
- [\getvariable{mediaclip:option}{start}]
-
-\stopsetups
-
-\defineinteractionmenu
- [navigation] [right]
-
-\defineinteractionmenu
- [control] [bottom]
-
-\setupinteractionmenu
- [navigation,control]
- [state=start,
- frame=on,
- middle=\hskip.5\measure{GapSize},
- inbetween=\vskip.5\measure{GapSize}]
-
-\setupinteractionmenu
- [right,bottom]
- [distance=overlay]
-
-\startinteractionmenu [navigation]
- \rob [HideLayer{textlayer},FirstPage] First Page \\
- \rob [HideLayer{textlayer},PreviousPage] Previous Page \\
- \rob [HideLayer{textlayer},NextPage] Next Page \\
- \rob [HideLayer{textlayer},LastPage] Last Page \\
- \rob [HideLayer{textlayer},clips] List Of Clips \\
- \rob [ForgetChanges,CloseDocument] Close Document \\
-\stopinteractionmenu
-
-\startinteractionmenu [control]
- \rob [StartRendering{mediaclip-\MediaClip}] Start \\
- \rob [StopRendering{mediaclip-\MediaClip}] Stop \\
- \rob [PauseRendering{mediaclip-\MediaClip}] Pause \\
- \rob [ResumeRendering{mediaclip-\MediaClip}] Resume \\
- \rob [ToggleLayer{datalayer}] Info \\
- \doifXMLdata{rl:text}{\rob [HideLayer{datalayer},ToggleLayer{textlayer}] Text \\}
-\stopinteractionmenu
-
-\startsetups[mediaclip:text]
-
- \setlayer
- [extra]
- [preset=rightbottom]
- {\startviewerlayer[textlayer]
- \framed
- [align=normal,
- frame=off,
- width=\measure{TextWidth},
- foregroundcolor=darkgray,
- background={color,textbutton},
- backgroundcolor=lightgray]
- {\XMLflush{rl:text}}
- \stopviewerlayer}
-
-\stopsetups
-
-\setupcolors[textcolor=lightgray]
-
-\startsetups [library:start]
-
- \starttext
-
- \setupinteractionmenu[control][state=stop]
-
- \title[clips]{List of Media Clips}
-
- \placelist[clips] \page
-
- \setupinteractionmenu[control][state=start]
-
-\stopsetups
-
-\startsetups [library:stop]
-
- \stoptext
-
-\stopsetups
-
-\defineXMLenvironment [rl:resourcelibrary]
- {\setups[library:start]}
- {\setups[library:stop]}
-
-\doifelsenothing{\inputfilename}
- {\processXMLfile{mediaclient.xml}}
- {\processXMLfile{\inputfilename}}
diff --git a/Master/texmf-dist/tex/context/base/x-sch-00.mkii b/Master/texmf-dist/tex/context/base/x-sch-00.mkii
deleted file mode 100644
index 5b4da0825b3..00000000000
--- a/Master/texmf-dist/tex/context/base/x-sch-00.mkii
+++ /dev/null
@@ -1,382 +0,0 @@
-%D \module
-%D [ file=x-sch-00,
-%D version=2001.10.02,
-%D title=\CONTEXT\ Style File,
-%D subtitle=XML Schema Basics,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 Schema support was implemented right after euro\TeX\ 2001,
-%D when Tobias Burnus send me a schema for the XML figure
-%D base. Since it happened that I needed schemata for other
-%D projects too, I wrote this mapper. Thanks to Tobias for
-%D testing it.
-
-\newcounter\XSDprefix
-\newif\ifXDScomposite
-
-\definelist [xsd:names]
-\defineregister [xsd:index] [xsd:indices]
-
-\setuplist [xsd:names] [expansion=yes]
-\setupregister [xsd:index] [expansion=yes]
-
-\def\dodoXSDkeyval#1#2#3%
- {\framed
- [width=\hsize,background=color,backgroundcolor=xsd:0,
- framecolor=xsd:0,frame=off,align=right]
- {\hbox to 5em % %to 8em % .2\hsize
- {\bf
- %\doifsomething{#1}{#1 }
- \ignorespaces#2\unskip\hss}
- %\ignorespaces#2\unskip:}%
- \space
- \ignorespaces#3\unskip}}
-
-\def\doXSDkeyval#1#2#3#4%
- {\bgroup
- \edef\XSDtemp{\XMLpar{#3}{#4}{}}%
- \doifsomething{\XSDtemp}
- {\def\doXSDtemp{\dodoXSDkeyval{#1}{#2}{\XSDtemp}}%
- \def\doXSDtype{\dodoXSDkeyval{#1}{#2}{\XMLtyp{#3}{#4}{}}}%
- \setupinteraction[color=,contrastcolor=,style=]%
- \processaction
- [#4]
- [ value=>\doXSDtype,
- name=>{\writetolist[xsd:names]{}{\XSDtemp}%
- \writetoregister[xsd:index]{\XSDtemp}%
- \ifXDScomposite \else
- \pagereference[xsd:\XSDprefix:\XSDtemp]%
- \fi
- \doXSDtemp},
- type=>{\doifinstringelse{xsd:}{\XSDtemp}
- {\doXSDtemp}
- {\gotobox{\doXSDtemp}[xsd:\XSDprefix:\XSDtemp]}},
- ref=>{\doifinstringelse{xsd:}{\XSDtemp}
- {\doXSDtemp}
- {\gotobox{\doXSDtemp}[xsd:\XSDprefix:\XSDtemp]}},
- unknown=>\doXSDtemp]}%
- \endgraf
- \egroup}
-
-\def\doXSDkeyvals#1#2#3%
- {\def\docommand##1{\doXSDkeyval{#1}{##1}{#2}{##1}}%
- \processcommalist[#3]\docommand}
-
-\def\dodoXSDbanner#1%
- {\framed
- [width=\hsize,framecolor=xsd:0,frame=off,
- background=color,backgroundcolor=xsd:0]
- {\ignorespaces#1\unskip}}
-
-\def\doXSDtitle#1#2#3%
- {\edef\XSDtemp{\XMLpar{#2}{#3}{}}%
- \dodoXSDbanner
- {{\bf\ignorespaces#1\unskip}%
- \doifsomething{\XSDtemp}
- {:\space\ignorespaces\XSDtemp\unskip
- \pagereference[xsd:\XSDprefix:\XSDtemp]}}}
-
-\def\doXSDbanner#1%
- {\dodoXSDbanner{\bf#1}}
-
-%D We use colored backgrounds for meaningful blocks.
-
-\definecolor [xsd:0] [white]
-
-\definecolor [xsd:1] [s=.30]
-\definecolor [xsd:2] [s=.55]
-\definecolor [xsd:3] [s=.70]
-\definecolor [xsd:4] [s=.85]
-
-\definecolor [xsd:5] [r=.6,g=.7,b=.8]
-\definecolor [xsd:6] [r=.7,g=.8,b=.6]
-\definecolor [xsd:7] [r=1,g=1,b=.6]
-\definecolor [xsd:8] [r=.8,g=.7,b=.6]
-
-\defineframedtext [XSDannotation] [backgroundcolor=xsd:0]
-
-\defineframedtext [XSDelement] [backgroundcolor=xsd:5]
-\defineframedtext [XSDattribute] [backgroundcolor=xsd:6]
-\defineframedtext [XSDsimpleType] [backgroundcolor=xsd:7]
-\defineframedtext [XSDcomplexType] [backgroundcolor=xsd:8]
-
-\defineframedtext [XSDcomplexContent] [backgroundcolor=xsd:1]
-\defineframedtext [XSDsimpleContent] [backgroundcolor=xsd:1]
-\defineframedtext [XSDattributeGroup] [backgroundcolor=xsd:1]
-
-\defineframedtext [XSDcapsule] [backgroundcolor=xsd:2]
-\defineframedtext [XSDsequence] [backgroundcolor=xsd:3]
-
-\def\XDSstructures% handy for external settings
- {XSDannotation,
- XSDcomplexType,XSDsimpleType,XSDelement,XSDattribute,
- XSDcomplexContent,XSDsimpleContent,XSDattributeGroup,
- XSDcapsule,XSDsequence}
-
-\setupframedtexts
- [\XDSstructures]
- [width=\hsize,
- offset=.5\bodyfontsize,
- location=none,
- background=color,
- framecolor=xsd:0,
- before=\ifinframed\else\blank\fi,
- after=\ifinframed\else\blank\fi,
- depthcorrection=off,
- rulethickness=1pt,
- strut=no]
-
-\definesymbol[xsd][{\blackrule[width=4em]}]
-
-\def\placeXSDlegenda
- {\startbaselinecorrection
- \starttabulate[|l|l|]
- \HL
- \NC \bf color \NC \bf meaning \NC \NR
- \HL
- \NC \color[xsd:1]{\symbol[xsd]} \NC complexContent \unskip\quad
- simpleContent \unskip\quad
- attributeGroup \NC \NR
- \NC \color[xsd:2]{\symbol[xsd]} \NC capsule \NC \NR
- \NC \color[xsd:3]{\symbol[xsd]} \NC sequence \NC \NR
- \HL
- \NC \color[xsd:5]{\symbol[xsd]} \NC element \NC \NR
- \NC \color[xsd:6]{\symbol[xsd]} \NC attribute \NC \NR
- \NC \color[xsd:7]{\symbol[xsd]} \NC simpleType \NC \NR
- \NC \color[xsd:8]{\symbol[xsd]} \NC complexType \NC \NR
- \HL
- \stoptabulate
- \stopbaselinecorrection}
-
-\defineXMLenvironment [xsd:all] [id=]
- {\startXSDcapsule
- \doXSDbanner{all}
- \doXSDkeyvals{all}{xsd:all}{id}
- \XDScompositetrue}
- {\stopXSDcapsule}
-
-\defineXMLenvironment [xsd:annotation]
- {\startXSDcapsule
- \doXSDbanner{annotation}
- \startXSDannotation}
- {\stopXSDannotation
- \stopXSDcapsule}
-
-\defineXMLignore [xsd:appInfo]
-
-\defineXMLenvironment [xsd:attribute]
- [id=,name=,ref=,type=,form=,use=,value=]
- {\startXSDattribute
- \doifelsenothing{\XMLpar{xsd:attribute}{ref}{}}
- {\doXSDkeyvals{attribute}{xsd:attribute}{name,type}}
- {\doXSDkeyvals{attribute}{xsd:attribute}{ref}}
- \doXSDkeyvals{attribute}{xsd:attribute}{id,form,use,value}
- \XDScompositetrue}
- {\stopXSDattribute}
-
-\defineXMLenvironment [xsd:attributeGroup] [id=,name=,ref=]
- {\startXSDattributeGroup
- \doXSDtitle{attribute group}{xsd:attributeGroup}{name}
- \doXSDkeyvals{attr group}{xsd:attributeGroup}{id,name,ref}
- \XDScompositetrue}
- {\stopXSDattributeGroup}
-
-\defineXMLenvironment [xsd:choice] [id=,minOccurs=,maxOccurs=]
- {\startXSDcapsule
- \doXSDbanner{choice}
- \doXSDkeyvals{choice}{xsd:choice}{id,minOccurs,maxOccurs}
- \XDScompositetrue}
- {\stopXSDcapsule}
-
-\defineXMLenvironment [xsd:complexContent] [id=,mixed=]
- {\startXSDcomplexContent
- \doXSDkeyvals{complex content}{xsd:complexContent}{id,mixed}
- \XDScompositetrue}
- {\stopXSDcomplexContent}
-
-\defineXMLenvironment [xsd:complexType]
- [id=,abstract=,block=,final=,mixed=,name=]
- {\startXSDcomplexType
- \doXSDtitle{complex type}{xsd:complexType}{name}
- \doXSDkeyvals{complex type}{xsd:complexType}{id,abstract,block,final,mixed}
- \XDScompositetrue}
- {\stopXSDcomplexType}
-
-\defineXMLenvironment [xsd:documentation] [source=,xml:lang=]
- {\endgraf\bgroup\setupwhitespace[big]}
- {\endgraf\egroup}
-
-\defineXMLenvironment [xsd:element]
- [name=,type=,ref=,
- abstract=,block=,default=,final=,fixed=,form=,id=,
- minOccurs=,maxOccurs=,nullable=,substitutionGroup=]
- {\startXSDelement
- \doifelsenothing{\XMLpar{xsd:element}{ref}{}}
- {\doXSDkeyvals{element}{xsd:element}{name,type}}
- {\doXSDkeyvals{element}{xsd:element}{ref}}
- \doXSDkeyvals{element}{xsd:element}
- {id,abstract,block,default,final,fixed,form,
- minOccurs,maxOccurs,nullable,substitutionGroup}
- \XDScompositetrue}
- {\stopXSDelement}
-
-\defineXMLenvironment [xsd:extension] [id=,base=]
- {\startXSDcapsule
- \doXSDbanner{extension}
- \doXSDkeyvals{extension}{xsd:extension}{id,base}
- \XDScompositetrue}
- {\stopXSDcapsule}
-
-\defineXMLenvironment [xsd:group]
- [id=,name=,ref=,minOccurs=,maxOccurs=]
- {\startXSDcapsule
- \doXSDbanner{group}
- \doXSDkeyvals{group}{xsd:group}{id,name,ref,minOccurs,maxOccurs}
- \XDScompositetrue}
- {\stopXSDcapsule}
-
-\defineXMLenvironment [xsd:key] [id=,name=]
- {\startXSDcapsule
- \doXSDbanner{key}
- \doXSDkeyvals{key}{xsd:key}{id,name}
- \XDScompositetrue}
- {\stopXSDcapsule}
-
-\defineXMLenvironment [xsd:keyref] [id=,name=,refer=]
- {\startXSDcapsule
- \doXSDbanner{keyref}
- \doXSDkeyvals{key ref}{xsd:keyref}{id,name,refer}
- \XDScompositetrue}
- {\stopXSDcapsule}
-
-\defineXMLenvironment [xsd:list] [id=,itemType=]
- {\startXSDcapsule
- \doXSDbanner{list}
- \doXSDkeyvals{list}{xsd:list}{id,itemType}
- \XDScompositetrue}
- {\stopXSDcapsule}
-
-\defineXMLenvironment [xsd:redefine] [schemaLocation=]
- {\startXSDcapsule
- \doXSDbanner{redefine}
- \doXSDkeyvals{redefine}{xsd:redefine}{schemaLocation}
- \XDScompositetrue}
- {\stopXSDcapsule}
-
-\defineXMLenvironment [xsd:restriction] [id=,base=]
- {\startXSDcapsule
- \doXSDbanner{restriction}
- \doXSDkeyvals{restriction}{xsd:restriction}{id,base}
- \XDScompositetrue}
- {\stopXSDcapsule}
-
-\defineXMLenvironment [xsd:schema]
- [attributeFormDefault=,blockDefault=,elementFormDefault=,
- finalDefault=,id=,targetNamespace=,version=]
- {\startXSDcapsule
- \doglobal\increment\XSDprefix
- \doXSDbanner{schema}
- \doXSDkeyvals{schema}{xsd:schema}
- {attributeFormDefault,blockDefault,elementFormDefault,
- finalDefault,id,targetNamespace,version}
- \stopXSDcapsule}
- {}
-
-\defineXMLenvironment [xsd:sequence] [id=,minOccurs=,maxOccurs=]
- {\startXSDsequence
- \doXSDbanner{sequence}
- \doXSDkeyvals{sequence}{xsd:sequence}{id,minOccurs,maxOccurs}
- \XDScompositetrue}
- {\stopXSDsequence}
-
-\defineXMLenvironment [xsd:simpleContent] [id=]
- {\startXSDsimpleContent
- \doXSDkeyvals{simple content}{xsd:simpleContent}{id}
- \XDScompositetrue}
- {\stopXSDsimpleContent}
-
-\defineXMLenvironment [xsd:simpleType] [id=,name=]
- {\startXSDsimpleType
- \doXSDtitle{simple type}{xsd:simpleType}{name}
- \doXSDkeyvals{simple type}{xsd:simpleType}{id}
- \XDScompositetrue}
- {\stopXSDsimpleType}
-
-\defineXMLenvironment [xsd:union] [id=,memberTypes=]
- {\startXSDcapsule
- \doXSDbanner{union}
- \doXSDkeyvals{union}{xsd:union}{id,memberTypes}
- \XDScompositetrue}
- {\stopXSDcapsule}
-
-\defineXMLenvironment [xsd:unique] [id=,name=]
- {\startXSDcapsule
- \doXSDbanner{unique}
- \doXSDkeyvals{unique}{xsd:unique}{id,name}
- \XDScompositetrue}
- {\stopXSDcapsule}
-
-\def\defineXSDfacet
- {\dotripleempty\dodefineXSDfacet}
-
-\def\dodefineXSDfacet[#1][#2][#3]%
- {\defineXMLenvironment[xsd:#1][#2]
- {\startXSDcapsule
- \doXSDkeyvals{#1}{xsd:#1}{#3}
- \XDScompositetrue}
- {\stopXSDcapsule}
- \defineXMLsingular[xsd:#1][#2]
- {\doXSDkeyvals{#1}{xsd:#1}{#3}}}
-
-\defineXSDfacet [duration] [id=,value=,fixed=] [id,value,fixed]
-\defineXSDfacet [encoding] [id=,value=,fixed=] [id,value,fixed]
-\defineXSDfacet [enumeration] [id=,value=,fixed=] [id,value,fixed]
-
-\defineXSDfacet [length] [id=,value=,fixed=] [id,value,fixed]
-\defineXSDfacet [minLength] [id=,value=,fixed=] [id,value,fixed]
-\defineXSDfacet [maxLength] [id=,value=,fixed=] [id,value,fixed]
-\defineXSDfacet [minInclusive] [id=,value=,fixed=] [id,value,fixed]
-\defineXSDfacet [maxInclusive] [id=,value=,fixed=] [id,value,fixed]
-\defineXSDfacet [minExclusive] [id=,value=,fixed=] [id,value,fixed]
-\defineXSDfacet [maxExclusive] [id=,value=,fixed=] [id,value,fixed]
-
-\defineXSDfacet [pattern] [id=,value=,fixed=] [id,value,fixed]
-\defineXSDfacet [period] [id=,value=,fixed=] [id,value,fixed]
-\defineXSDfacet [precision] [id=,value=,fixed=] [id,value,fixed]
-\defineXSDfacet [scale] [id=,value=,fixed=] [id,value,fixed]
-
-\defineXSDfacet [field] [id=,xpath=] [id,xpath]
-\defineXSDfacet [selector] [id=,xpath=] [id,xpath]
-
-\defineXSDfacet
- [any]
- [id=,namespace=,minOccurs=,maxOccurs=,processContents=]
- [id,namespace,minOccurs,maxOccurs,processContent]
-
-\defineXSDfacet
- [anyAttribute]
- [id=,namespace=,processContents=]
- [id,namespace,processContents]
-
-\defineXSDfacet
- [import]
- [id=,namespace=,schemaLocation=]
- [id,namespace,schemaLocation]
-
-\defineXSDfacet
- [include]
- [id=,schemaLocation=]
- [id,schemaLocation]
-
-\defineXSDfacet
- [notation]
- [id=,name=,public=,system=]
- [id,name,public,system]
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/x-sch-01.mkii b/Master/texmf-dist/tex/context/base/x-sch-01.mkii
deleted file mode 100644
index 5bdf088fe71..00000000000
--- a/Master/texmf-dist/tex/context/base/x-sch-01.mkii
+++ /dev/null
@@ -1,122 +0,0 @@
-%D \module
-%D [ file=x-sch-01,
-%D version=2001.10.04,
-%D title=\CONTEXT\ Style File,
-%D subtitle=XML Schema Presentation,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 style wraps around the core schema visualizer,
-%D implemented in \type {x-sch-00}. This is an experimental
-%D style, more will follow.
-%D
-%D \starttyping
-%D texexec --use=sch-01 x-fig-00.xsd --pdf
-%D \stoptyping
-
-\doifnothing {\jobfilename} {\end}
-\doiffileelse {\jobfilename.xsd} {} {\end}
-
-\usemodule[sch-00,con-01]
-
-\remapXMLnamespace [xs] [xsd]
-
-\setuplayout
- [backspace=1.5cm,
- topspace=1.5cm,
- bottomspace=1cm,
- width=middle,
- height=middle,
- header=1.5cm,
- footer=1.5cm]
-
-\setupcolors
- [state=start]
-
-\setupbackgrounds
- [page]
- [background=goback]
-
-\setupbackgrounds
- [text]
- [background=gonext]
-
-\defineoverlay
- [goback]
- [\overlaybutton{PreviousJump}]
-
-\defineoverlay
- [gonext]
- [\overlaybutton{nextpage}]
-
-\setuppagenumbering
- [location=footer]
-
-\usetypescript
- [palatino]
- [\defaultencoding]
-
-\setupbodyfont
- [palatino,10pt]
-
-%\setupinteraction
-% [state=start,
-% color=,
-% contrastcolor=,
-% style=]
-
-\setuplist
- [xsd:names]
- [interaction=all,
- width=0pt,
- alternative=c]
-
-\setupregister
- [xsd:index]
- [interaction=text,
- symbol=none]
-
-\setuphead
- [chapter]
- [style=\bfd,
- header=high]
-
-\setuphead
- [section]
- [style=\bfb]
-
-\lowercasestring \jobfilename \to \lcjobfilename
-
-\setupheadertexts
- [\lcjobfilename]
-
-\starttext
-
-\title{Schema \quote{\lcjobfilename.xsd}}
-
-\subject{Names in order of definition}
-
-\startcolumns[n=3]
- \placelist[xsd:names][criterium=current]
-\stopcolumns
-
-\subject{Names in alphabetic order}
-
-\startcolumns[n=3]
- \placeregister[xsd:index][criterium=current]
-\stopcolumns
-
-\subject{Meaning of background colors}
-
-\placeXSDlegenda
-
-\subject{Schema components}
-
-\processXMLfilegrouped{\jobfilename.xsd}
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/x-set-01.mkii b/Master/texmf-dist/tex/context/base/x-set-01.mkii
deleted file mode 100644
index 814ea5fc6c5..00000000000
--- a/Master/texmf-dist/tex/context/base/x-set-01.mkii
+++ /dev/null
@@ -1,79 +0,0 @@
-%D \module
-%D [ file=x-set-01,
-%D version=2004.10.31,
-%D remark=setupx.tex: 1998.07.20 and later,
-%D title=\CONTEXT\ Setup Mappings,
-%D subtitle=Macro Definitions,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 file is obsolete.
-
-\endinput
-
-\unprotect
-
-\def\SETUPnamespace{xmlns:cd="http://www.pragma-ade.com/commands"}
-
-\bgroup \catcode`\<=\@@other
-
-\unexpanded\gdef\dostring#1#2#3%
- {\immediate\write\scratchwrite{#1<#2cd:#3>}}
-
-\gdef\doline#1%
- {\immediate\write\scratchwrite{#1}}
-
-\egroup
-
-\def\startsetupfile
- {\immediate\openout\scratchwrite=keys-\currentlanguage.xml
- \doline{\string<?xml version="1.0"?>}
- \doline{}
- \dostring{}{}{interface \SETUPnamespace\space name="context" language="\currentlanguage" version="\contextversion"}}
-
-\def\stopsetupfile
- {\doline{}
- \dostring{}{/}{interface}
- \immediate\closeout\scratchwrite}
-
-\def\interfacecomponenttoxml#1#2#3%
- {\doifelse{#3}\nointerfaceobject
- {\dostring{\space\space\space\space}{}{#1 name="#2" value="#2"/}}
- {\dostring{\space\space\space\space}{}{#1 name="#2" value="#3"/}}}
-
-\def\setinterfaceconstant{\interfacecomponenttoxml{constant}}
-\def\setinterfacevariable{\interfacecomponenttoxml{variable}}
-\def\setinterfaceelement {\interfacecomponenttoxml{element}}
-\def\setinterfacecommand {\interfacecomponenttoxml{command}}
-
-\def\startinterfacexmlcomponent{\doline{}\dostring{\space\space}{}} % #1
-\def\stopinterfacexmlcomponent {\dostring{\space\space}{/}} % #1
-
-\let\normalstartvariables\startvariables \let\normalstopvariables\stopvariables
-\let\normalstartconstants\startconstants \let\normalstopconstants\stopconstants
-\let\normalstartcommands \startcommands \let\normalstopcommands \stopcommands
-\let\normalstartelements \startelements \let\normalstopelements \stopelements
-
-\def\startvariables{\startinterfacexmlcomponent{variables}\normalstartvariables}
-\def\startconstants{\startinterfacexmlcomponent{constants}\normalstartconstants}
-\def\startcommands {\startinterfacexmlcomponent{commands} \normalstartcommands }
-\def\startelements {\startinterfacexmlcomponent{elements} \normalstartelements }
-
-\def\stopvariables{\stopinterfacexmlcomponent{variables}\normalstopvariables}
-\def\stopconstants{\stopinterfacexmlcomponent{constants}\normalstopconstants}
-\def\stopcommands {\stopinterfacexmlcomponent{commands} \normalstopcommands }
-\def\stopelements {\stopinterfacexmlcomponent{elements} \normalstopelements }
-
-\protect
-
-\starttext
- \startsetupfile
- \input mult-con.tex
- \input mult-com.tex
- \stopsetupfile
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/x-set-02.mkii b/Master/texmf-dist/tex/context/base/x-set-02.mkii
deleted file mode 100644
index 7a2cd77016b..00000000000
--- a/Master/texmf-dist/tex/context/base/x-set-02.mkii
+++ /dev/null
@@ -1,30 +0,0 @@
-%D \module
-%D [ file=x-set-02,
-%D version=2004.10.31,
-%D remark=setupx.tex: 1998.07.20 and later,
-%D title=\CONTEXT\ Setup Mappings,
-%D subtitle=Macro Definitions,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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 \bgroup \catcode`\<=\@@other
-
-\def\setinterfacecomponent#1#2#3%
- {\setgvalue{\string<#1\string:#2\string>}{#3}}
-
-\gdef\getinterfacecomponent#1#2%
- {\executeifdefined{\string<#1\string:#2\string>}{#2}}
-
-\def\setinterfaceconstant{\setinterfacecomponent{constant}} % constant
-\def\setinterfacevariable{\setinterfacecomponent{variable}} % variable
-\def\setinterfaceelement {\setinterfacecomponent{string}} % element
-\def\setinterfacecommand {\setinterfacecomponent{string}} % command
-
-\input mult-\userinterfacetag.mkii
-
-\egroup \protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/x-set-11.mkii b/Master/texmf-dist/tex/context/base/x-set-11.mkii
deleted file mode 100644
index 8c8f614a5b4..00000000000
--- a/Master/texmf-dist/tex/context/base/x-set-11.mkii
+++ /dev/null
@@ -1,837 +0,0 @@
-%D \module
-%D [ file=x-set-11,
-%D version=2004.10.31,
-%D remark=setupx.tex: 1998.07.20 and later,
-%D title=\CONTEXT\ Setup Definitions,
-%D subtitle=Macro Definitions,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% module x-set-02 loads the mapping, after that we can say:
-%
-% texmfstart texexec --int=nl --pdf --global --result=setup-nl x-set-12
-
-\startmessages dutch library: setup
- title: setup
- formula: formule
- number: getal
- list: lijst
- dimension: maat
- mark: markering
- reference: verwijzing
- command: commando
- file: file
- name: naam
- identifier: naam
- text: tekst
- section: sectie
- singular: naam enkelvoud
- plural: naam meervoud
- matrix: n*m
- see: zie
- inherits: erft van
- 1: de karakters < en > zijn globaal actief!
- 2: -- wordt verwerkt
- 3: -- is niet gedefinieerd
- 4: -- wordt nogmaals verwerkt
- optional: optioneel
- displaymath: formule
- index: ingang
- math: formule
- nothing: leeg
- file: file
- position: positie
- reference: verwijzing
- csname: naam
- destination: bestemming
- triplet: triplet
- word: woord
- content: tekst
-\stopmessages
-
-\startmessages english library: setup
- title: setup
- formula: formula
- number: number
- list: list
- dimension: dimension
- mark: mark
- reference: reference
- command: command
- file: file
- name: name
- identifier: identifier
- text: text
- section: section
- singular: singular name
- plural: plural name
- matrix: n*m
- see: see
- inherits: inherits from
- 1: the characters < and > are globally active!
- 2: -- is processed
- 3: -- is undefined
- 4: -- is processed again
- optional: optional
- displaymath: formula
- index: entry
- math: formula
- nothing: empty
- file: file
- position: position
- reference: reference
- csname: name
- destination: destination
- triplet: triplet
- word: word
- content: text
-\stopmessages
-
-\startmessages german library: setup
- title: Setup
- formula: Formel
- number: Nummer
- list: Liste
- dimension: Dimension
- mark: Beschriftung
- reference: Referenz
- command: Befehl
- file: Datei
- name: Name
- identifier: Name
- text: Text
- section: Abschnitt
- singular: singular
- plural: plural
- matrix: n*m
- see: siehe
- inherits: inherits from
- 1: Die Zeichen < und > gelten global!
- 2: -- wird verarbeitet
- 3: -- ist undefiniert
- 4: -- ist mehrmals verarbeitet
- optional: optioneel
- displaymath: formula
- index: entry
- math: formula
- nothing: empty
- file: file
- position: position
- reference: reference
- csname: name
- destination: destination
- triplet: triplet
- word: word
- content: text
-\stopmessages
-
-\startmessages czech library: setup
- title: setup
- formula: rovnice
- number: cislo
- list: seznam
- dimension: dimenze
- mark: znacka
- reference: reference
- command: prikaz
- file: soubor
- name: jmeno
- identifier: jmeno
- text: text
- section: sekce
- singular: jmeno v singularu
- plural: jmeno v pluralu
- matrix: n*m
- see: viz
- inherits: inherits from
- 1: znaky < a > jsou globalne aktivni!
- 2: -- je zpracovano
- 3: -- je nedefinovano
- 4: -- je zpracovano znovu
- optional: optioneel
- displaymath: formula
- index: entry
- math: formula
- nothing: empty
- file: file
- position: position
- reference: reference
- csname: name
- destination: destination
- triplet: triplet
- word: word
- content: text
-\stopmessages
-
-\startmessages italian library: setup
- title: setup
- formula: formula
- number: number
- list: list
- dimension: dimension
- mark: mark
- reference: reference
- command: command
- file: file
- name: name
- identifier: name
- text: text
- section: section
- singular: singular name
- plural: plural name
- matrix: n*m
- see: see
- inherits: inherits from
- 1: the characters < and > are globally active!
- 2: -- is processed
- 3: -- is undefined
- 4: -- is processed again
- optional: optioneel
- displaymath: formula
- index: entry
- math: formula
- nothing: empty
- file: file
- position: position
- reference: reference
- csname: name
- destination: destination
- triplet: triplet
- word: word
- content: text
-\stopmessages
-
-\startmessages romanian library: setup
- title: setari
- formula: formula
- number: numar
- list: lista
- dimension: dimensiune
- mark: marcaj
- reference: referinta
- command: comanda
- file: fisier
- name: nume
- identifier: nume
- text: text
- section: sectiune
- singular: nume singular
- plural: nume pluram
- matrix: n*m
- see: vezi
- inherits: inherits from
- 1: caracterele < si > sunt active global!
- 2: este procesat --
- 3: -- este nedefinit
- 4: -- este procesat din nou
- optional: optioneel
- displaymath: formula
- index: entry
- math: formula
- nothing: empty
- file: file
- position: position
- reference: reference
- csname: name
- destination: destination
- triplet: triplet
- word: word
- content: text
-\stopmessages
-
-\startmessages french library: setup
- title: réglage
- formula: formule
- number: numéro
- list: liste
- dimension: dimension
- mark: marquage
- reference: reference
- command: commande
- file: fichier
- name: nom
- identifier: identificateur
- text: texte
- section: section
- singular: nom singulier
- plural: nom pluriel
- matrix: n*m
- see: vois
- inherits: herite de
- 1: les caractères < et > sont globalement actifs !
- 2: -- est traité
- 3: -- n'est pas défini
- 4: -- est traité de nouveau
- optional: optionel
- displaymath: formule
- index: entrée
- math: formule
- nothing: vide
- file: fichier
- position: position
- reference: réference
- csname: nom
- destination: destination
- triplet: triplet
- word: mot
- content: texte
-\stopmessages
-
-\unprotect
-
-% general
-
-\def\setupnumfont {}
-\def\setuptxtfont {}
-\def\setupintfont#1{\uppercase{#1}}
-\def\setupvarfont {\sl}
-\def\setupoptfont {\sl}
-\def\setupalwcolor {}
-\def\setupoptcolor {darkgray}
-
-\defineXMLenvironmentsave [cd:content] [list=,state=]
- {\simpleSETUPargument{content}\blank[\v!halfline]\ignorespaces}
- {\ignorespaces}
-
-\def\c!setup!internal!#1%
- {{\setmessagetext{setup}{#1}%
- \expanded{\setupintfont{\currentmessagetext}}}}
-
-\def\c!setup!text!#1%
- {{\setmessagetext{setup}{#1}%
- \setupvarfont{\currentmessagetext}}}
-
-\def\c!setup!command!#1%
- {{\setupvarfont{\texescape...#1}}}
-
-\def\??stp{@@stp}
-
-\defineregister
- [texmacro]
- [texmacros]
-
-\definesorting
- [texcommand]
- [texcommands]
-
-\setupsorting
- [texcommand]
- [\c!command=\@@stpcommand,
- \c!criterium=\@@stpcriterium]
-
-\definesorting
- [eachtexcommand]
- [alltexcommands]
-
-\setupsorting
- [eachtexcommand]
- [\c!command=\@@stpcommand,
- \c!criterium=\v!all]
-
-\pushmacro\setuptext
-
-\defineframedtext
- [setuptext]
- [\c!width=\hsize,
- \c!height=\v!fit,
- \c!align=\v!right,
- \c!offset=0.75em]
-
-\popmacro\setuptext
-
-\newif\ifshortsetup
-
-\def\doshowsetup
- {\dosingleempty\dodoshowsetup}
-
-\def\dodoshowsetup[#1]%
- {\iffirstargument
- \doshowsetup{#1}%
- \else
- \expandafter\doshowsetup
- \fi}
-
-\bgroup \catcode`\<=\active
-
-\gdef\doshowsetup#1%
- {\bgroup
- \def<<##1>>{##1}%
- \edef\ascii{#1}%
- \enableXML
- \doifelseXMLelement{stp:\ascii}
- {\expanded{\flushXMLelement{stp:\ascii}}}
- {\doifelseXMLelement{stp:\ascii:1}
- {\expanded{\flushXMLelement{stp:\ascii:1}}}
- {\defconvertedargument\ascii{#1}%
- \em unknown setup \quote{\ascii}}}
- \egroup}
-
-\egroup
-
-\def\setup {\shortsetupfalse\doshowsetup}
-\def\showsetup {\shortsetupfalse\doshowsetup}
-\def\shortsetup{\shortsetuptrue \doshowsetup}
-\def\setupsetup{\dodoubleargument\getparameters[\??stp]}
-
-\setupsetup
- [\c!before=,
- \c!after=,
- \c!command=\setup,
- \c!criterium=\v!used]
-
-% verwijzing: 0 geen verwijzingen plaatsen / wel genereren
-% 1 alleen bij zie plaatsen / wel genereren
-% 2 alle verwijzingen plaatsen / niet genereren
-% 3 bij zie commando klikken / wel genereren
-
-\setupsetup
- [\c!reference=0]
-
-\def\placesetup
- {\bgroup
- \getvalue{\e!place\e!listof texcommands}%
- \egroup}
-
-\def\placeallsetups
- {\bgroup
- \setupsetup[\c!reference=2]%
- \setupreferencing[\c!state=\v!stop]%
- \getvalue{\e!place\e!listof alltexcommands}%
- \egroup}
-
-\let\placeeverysetup\placeallsetups
-
-\let\plaatssetup \placesetup
-\let\plaatselkesetup\placeallsetups
-
-% we use :1 as fallback
-%
-% \setup{setupinterlinespace}
-% \setup{setupinterlinespace:1}
-% \setup{setupinterlinespace:2}
-
-% todo: make this proper mkiv xml
-
-\defineXMLenvironmentsave [cd:define] [name=]
- {}
- {\setxvalue{cd:def:\XMLop{name}}{\XMLflush{cd:define}}}
-
-\defineXMLsingular [cd:resolve] [name=]
- {\ignorespaces\getvalue{cd:def:\XMLop{name}}\ignorespaces}
-
-\defineXMLenvironment [cd:command] [name=,type=,generated=,interactive=,variant=]
- {}
- {\showSETUPrecord}
-
-\def\showSETUPrecord
- {\getvalue{\e!start setuptext}
- \tttf
- \nohyphens
- \veryraggedright
- \startXMLmapping [one]
- \doglobal\newcounter\currentSETUPargument
- \global\let\maximumSETUPargument\currentSETUPargument
- \bgroup
- \doif{\XMLpar{cd:command}{generated}{}}{yes}{\ttsl}%
- \doifelseXMLop{type}{environment}
- {\tex{\e!start}}{\tex{}}\ignorespaces
- \XMLflush{cd:sequence}\ignorespaces
- \egroup
- \doifelseXMLempty{cd:arguments}
- {}
- {\bgroup
- \setbox0=\hbox{\XMLflush{cd:arguments}}%
- \global\let\maximumSETUPargument\currentSETUPargument
- \doglobal\newcounter\currentSETUPargument
- \ignorespaces\XMLflush{cd:arguments}%
- \doif{\XMLpar{cd:command}{type}{}}{environment}
- {\hskip.5em\unknown\hskip.5em
- \doif{\XMLpar{cd:command}{generated}{}}{yes}{\ttsl}%
- \tex{\e!stop}\ignorespaces\XMLflush{cd:sequence}}%
- \endgraf
- \egroup
- %\bgroup
- % \tx
- % \doif{\XMLpar{cd:command}{interactive}{}}{yes} {\quad INTERACTIVE}%
- % \doif{\XMLpar{cd:command}{interactive}{}}{exclusive}{\quad INTERACTIVE ONLY}%
- %\egroup
- \startXMLmapping [two]
- \bgroup
- \doglobal\newcounter\currentSETUPargument
- \blank[\v!line]
- \switchtobodyfont[small] % kan sneller
- \ignorespaces\XMLflush{cd:arguments}\endgraf
- \egroup
- \stopXMLmapping}
- \stopXMLmapping
- \getvalue{\e!stop setuptext}}
-
-\defineXMLenvironmentsave [cd:sequence] \ignorespaces \ignorespaces
-\defineXMLenvironmentsave [cd:arguments] \ignorespaces \ignorespaces
-
-%D This is the first pass; here we generate the top line.
-
-\newcounter\currentSETUPargument
-\def\currentSETUPwidth{0pt}
-
-% environmentsave ?
-
-\startXMLmapping [one]
-
-\defineXMLenvironmentsave [cd:string] [value=]
- {\XMLop{value}\ignorespaces}
- {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:variable] [value=]
- {{\expanded{\setupintfont{\XMLop{value}}}}\ignorespaces}
- {\ignorespaces}
-
-% moet een standaard type worden
-
-\defineXMLenvironmentsave [cd:assignments] [list=,state=]
- {\showSETUPassignment\ignorespaces} {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:keywords] [list=,state=]
- {\showSETUPkeyword\ignorespaces} {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:content] [list=,state=]
- {\showSETUPcontent\ignorespaces} {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:displaymath] [list=,state=]
- {\showSETUPdisplaymath\ignorespaces} {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:index] [list=,state=]
- {\showSETUPindex\ignorespaces} {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:math] [list=,state=]
- {\showSETUPmath\ignorespaces} {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:nothing] [list=,state=]
- {\showSETUPnothing\ignorespaces} {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:file] [list=,state=]
- {\showSETUPfile\ignorespaces} {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:position] [list=,state=]
- {\showSETUPposition\ignorespaces} {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:reference] [list=,state=]
- {\showSETUPreference\ignorespaces} {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:csname] [list=,state=]
- {\showSETUPcsname\ignorespaces} {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:destination] [list=,state=]
- {\showSETUPdestination\ignorespaces} {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:triplet] [list=,state=]
- {\showSETUPtriplet\ignorespaces} {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:word] [list=,state=]
- {\showSETUPword\ignorespaces} {\ignorespaces}
-
-\stopXMLmapping
-
-%D This is the second pass; here we generate the table.
-
-\startXMLmapping [two]
-
-\def\startfirstSETUPcolumn#1%
- {\bgroup
- \advance\leftskip 2em
- \noindent\llap{\hbox to 2em{#1\hss}}}
-
-\def\stopfirstSETUPcolumn
- {\endgraf
- \egroup}
-
-\def\startsecondSETUPcolumn#1#2%
- {\bgroup
- \advance\hangindent \currentSETUPwidth
- \advance\hangindent 2.5em
- \noindent \hbox to \hangindent{#1\hss\hbox to 2.5em{\hss#2\hss}}%
- \ignorespaces}
-
-\def\stopsecondSETUPcolumn
- {\endgraf
- \egroup}
-
-\def\secondSETUPcolumn#1#2%
- {\startsecondSETUPcolumn{#1}{#2}\stopsecondSETUPcolumn}
-
-\def\previousSETUPargument{\currentSETUPargument}
-
-\defineXMLenvironmentsave [cd:assignments]
- {}
- {\xdef\currentSETUPwidth{0pt}%
- \bgroup
- \defineXMLenvironment [cd:parameter] [name=]
- {\setbox0=\hbox{\potentialXMLentity{\XMLop{name}}}%
- \ifdim\wd0>\currentSETUPwidth\xdef\currentSETUPwidth{\the\wd0}\fi}%
- {}%
- \setbox0=\vbox{\XMLflush{cd:assignments}}%
- \egroup
- \startfirstSETUPcolumn{\showSETUPnumber}%
- \doifelseXMLempty{cd:assignments}
- {\secondSETUPcolumn{\c!setup!text!{see} \previousSETUPargument}{}}
- {\ignorespaces
- \XMLflush{cd:assignments}%
- \let\previousSETUPargument\currentSETUPargument}%
- \stopfirstSETUPcolumn
- \blank[\v!halfline]
- \ignorespaces}
-
-\defineXMLenvironmentsave [cd:keywords] [optional=no]
- {}
- {\startfirstSETUPcolumn{\showSETUPnumber}%
- \doifelseXMLempty{cd:keywords}
- {\secondSETUPcolumn{see \previousSETUPargument}{}}
- {\ignorespaces
- \XMLflush{cd:keywords}%
- \let\previousSETUPargument\currentSETUPargument}%
- \stopfirstSETUPcolumn
- \blank[\v!halfline]
- \ignorespaces}
-
-\defineXMLenvironment [cd:parameter] [name=]
- {\startsecondSETUPcolumn{\potentialXMLentity{\XMLop{name}}}{=}%
- \ignorespaces}
- {\stopsecondSETUPcolumn
- \ignorespaces}
-
-\defineXMLenvironmentsave [cd:constant] [type=,default=]
- {\doifXMLop{default}{yes}{\underbar}%
- {\potentialXMLentity{\XMLop{type}}}\space\ignorespaces}
- {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:variable] [value=]
- {\potentialXMLentity{\XMLop{value}}\space\ignorespaces}
- {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:inherit] [name=]
- {\secondSETUPcolumn{\c!setup!text!{inherits} \tex{}\XMLop{name}}{}\ignorespaces}
- {\ignorespaces}
-
-\def\simpleSETUPargument#1%
- {\startfirstSETUPcolumn{\showSETUPnumber}%
- \c!setup!internal!{#1}%
- \stopfirstSETUPcolumn}
-
-\defineXMLenvironmentsave [cd:content] [list=,state=]
- {\simpleSETUPargument{content}\blank[\v!halfline]\ignorespaces}
- {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:displaymath] [list=,state=]
- {\simpleSETUPargument{display math}\blank[\v!halfline]\ignorespaces}
- {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:index] [list=,state=]
- {\simpleSETUPargument{index}\blank[\v!halfline]\ignorespaces}
- {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:math] [list=,state=]
- {\simpleSETUPargument{math}\blank[\v!halfline]\ignorespaces}
- {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:nothing] [list=,state=]
- {\simpleSETUPargument{nothing}\blank[\v!halfline]\ignorespaces}
- {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:file] [list=,state=]
- {\simpleSETUPargument{file name}\blank[\v!halfline]\ignorespaces}
- {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:position] [list=,state=]
- {\simpleSETUPargument{position}\blank[\v!halfline]\ignorespaces}
- {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:reference] [list=,state=]
- {\simpleSETUPargument{reference}\blank[\v!halfline]\ignorespaces}
- {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:csname] [list=,state=]
- {\simpleSETUPargument{csname}\blank[\v!halfline]\ignorespaces}
- {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:destination] [list=,state=]
- {\simpleSETUPargument{destination}\blank[\v!halfline]\ignorespaces}
- {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:triplet] [list=,state=]
- {\simpleSETUPargument{triplet}\blank[\v!halfline]\ignorespaces}
- {\ignorespaces}
-
-\defineXMLenvironmentsave [cd:word] [list=,state=]
- {\simpleSETUPargument{word}\blank[\v!halfline]\ignorespaces}
- {\ignorespaces}
-
-\stopXMLmapping
-
-\defineXMLentity [cd:command] {\c!setup!internal!{command}}
-\defineXMLentity [cd:dimension] {\c!setup!internal!{dimension}}
-\defineXMLentity [cd:file] {\c!setup!internal!{file}}
-\defineXMLentity [cd:name] {\c!setup!internal!{identifier}}
-\defineXMLentity [cd:character] {\c!setup!internal!{character}}
-\defineXMLentity [cd:mark] {\c!setup!internal!{mark}}
-\defineXMLentity [cd:number] {\c!setup!internal!{number}}
-\defineXMLentity [cd:reference] {\c!setup!internal!{reference}}
-\defineXMLentity [cd:plural] {\c!setup!internal!{plural}}
-\defineXMLentity [cd:singular] {\c!setup!internal!{singular}}
-\defineXMLentity [cd:text] {\c!setup!internal!{text}}
-\defineXMLentity [cd:formula] {\c!setup!internal!{formula}}
-\defineXMLentity [cd:file] {\c!setup!internal!{file}}
-\defineXMLentity [cd:matrix] {\c!setup!internal!{matrix}}
-\defineXMLentity [cd:list] {\c!setup!internal!{list}}
-\defineXMLentity [cd:section] {\c!setup!internal!{section}}
-
-\defineXMLentity [cd:noargument] {\c!setup!command!{}}
-\defineXMLentity [cd:oneargument] {\c!setup!command!{\#1}}
-\defineXMLentity [cd:twoarguments] {\c!setup!command!{\#1\#2}}
-\defineXMLentity [cd:threearguments] {\c!setup!command!{\#1\#2\#3}}
-
-%D Todo:
-
-\defineXMLprocess [cd:choice]
-
-%D Auxiliary.
-
-\unexpanded\def\showSETUP#1#2%
- {\bgroup
- \doglobal\increment\currentSETUPargument
- \setbox0=\hbox
- {\doifelseXMLop{list}{yes}{#2}{#1}}%
- \setbox2=\hbox to \wd0
- {\hss
- \raise1ex\hbox
- {\tx\ifcase\maximumSETUPargument\relax
- \or*\else\currentSETUPargument
- \fi}%
- \hss}%
- \setbox4=\hbox to \wd0
- {\hss
- \lower2ex\hbox
- \bgroup
- \txx\doifXMLop{optional}{yes}{\c!setup!internal!{optional}}%
- \egroup
- \hss}%
- \ht2\ht\strutbox
- \dp4\dp\strutbox
- \hskip.5em\hsmash{\box0}\hsmash{\box4}\box2%
- \egroup}
-
-\def\showSETUPnumber
- {\doglobal\increment\currentSETUPargument
- \hbox to 2em
- {\ifcase\maximumSETUPargument\relax
- \or*\else\currentSETUPargument
- \fi
- \hss}}
-
-\def\showSETUPassignment {\showSETUP
- {[.\lower.5ex\hbox{=}.]}
- {[..,.\lower.5ex\hbox{=}.,..]}}
-
-\def\showSETUPkeyword {\showSETUP
- {[...]}
- {[...,...]}}
-
-\def\showSETUPargument {\showSETUP
- {\leftargument..\rightargument}
- {\leftargument..,...,..\rightargument}}
-
-\def\showSETUPdisplaymath {\showSETUP
- {\$\$...\$\$}
- {\$\$...\$\$}}
-
-\def\showSETUPindex {\showSETUP
- {\leftargument...\rightargument}
- {\leftargument..+...+..\rightargument}}
-
-\def\showSETUPmath {\showSETUP
- {\$...\$}
- {\$...\$}}
-
-\def\showSETUPnothing {\showSETUP
- {...}
- {}}
-
-\def\showSETUPfile {\showSETUP
- {~...~}
- {}}
-
-\def\showSETUPposition {\showSETUP
- {(...)}
- {(...,...)}}
-
-\def\showSETUPreference {\showSETUP
- {[...]}
- {[...,...]}}
-
-\def\showSETUPcsname {\showSETUP
- {{\c!setup!command!{}}}
- {}}
-
-\def\showSETUPdestination {\showSETUP
- {[\leftargument..[ref]\rightargument]}
- {[..,\leftargument..[ref,..]\rightargument,..]}}
-
-\def\showSETUPtriplet {\showSETUP
- {[x:y:z=]}
- {[x:y:z=,..]}}
-
-\def\showSETUPword {\showSETUP
- {\leftargument...\rightargument}
- {\leftargument.. ... ..\rightargument}}
-
-\def\showSETUPcontent {\showSETUP
- {\leftargument...\rightargument}
- {\leftargument.. ... ..\rightargument}}
-
-%\def\c!par!{\c!setup!internal!{endofpar}}
-%\def\c!repeat!{\c!opt!{{\setupvarfont n}*}}
-%\showSETUP\def\c!par!{\texescape par}
-%\showSETUP\def\c!sep!{\texescape\texescape}
-%\def\c!par!{\addtypespec{delimiter}{par}} % \par
-%\def\c!sep!{\addtypespec{separator}{backslash}} % \\
-%\def\c!repeat!{}
-%\def\c!tex!#1{\addtypespec{command}{#1}\doanother{tex}}
-
-\startXMLmapping[zero]
-
-\defineXMLenvironmentsave [cd:command] [name=,type=,generated=,interactive=,variant=]
- {}
- {\doifelseXMLop{type}{environment}
- {\edef\currentSETUPname{start\XMLop{name}}}
- {\edef\currentSETUPname{\XMLop{name}}}%
- \doifsomething{\XMLop{variant}}
- {\edef\currentSETUPname{\currentSETUPname:\XMLop{variant}}}% like setupinterlinespace:1
- \doifXMLop{generated}{yes}
- {\edef\currentSETUPname{\currentSETUPname*}}%
- \doglobal\saveXMLdatainelement{stp:\currentSETUPname}{cd:command}{cd:command}%
- \expanded{\eachtexcommand[stp:x:\currentSETUPname]{\currentSETUPname}}%
- \expanded{\texcommand [stp:y:\currentSETUPname]{\currentSETUPname}}}
-
-\stopXMLmapping
-
-\def\loadsetups{\complexorsimple\loadsetups}
-
-\def\simpleloadsetups
- {\doifnotmode{no-setup-main}
- {\complexloadsetups[cont-en.xml]}}
-
-\def\complexloadsetups[#1]%
- {\doifsomething{#1}
- {\doifnotmode{no-setup-all}
- {\startXMLmapping[zero]
- \expanded{\processXMLfilegrouped{#1}}%
- \stopXMLmapping}}}
-
-\defineXMLsingular [cd:include] [file=]
- {\complexloadsetups[\XMLop{file}]}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/x-set-11.mkiv b/Master/texmf-dist/tex/context/base/x-set-11.mkiv
deleted file mode 100644
index 73e68e0738c..00000000000
--- a/Master/texmf-dist/tex/context/base/x-set-11.mkiv
+++ /dev/null
@@ -1,855 +0,0 @@
-%D \module
-%D [ file=x-set-11,
-%D version=2004.10.31,
-%D remark=setupx.tex: 1998.07.20 and later,
-%D title=\CONTEXT\ Setup Definitions,
-%D subtitle=Macro Definitions,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% we can make this module a bit cleaner using more recent features
-% like sorting the xml directly
-
-% \startluacode
-% collectgarbage("stop")
-% function collectgarbage() return 0 end
-% \stopluacode
-
-% todo: for fun: pure lua interface, but as this style evolved over 15 years
-% it's a waste of time
-%
-% todo:
-%
-% \setup{setupinterlinespace}
-% \setup{setupinterlinespace:1}
-% \setup{setupinterlinespace:2}
-%
-% cd:include -> filename
-% cd:choice
-%
-% register, interaction
-
-\startmessages dutch library: setup
- title: setup
- formula: formule
- number: getal
- list: lijst
- dimension: maat
- mark: markering
- reference: verwijzing
- command: commando
- file: file
- name: naam
- identifier: naam
- text: tekst
- section: sectie
- singular: naam enkelvoud
- plural: naam meervoud
- matrix: n*m
- see: zie
- inherits: erft van
- 1: de karakters < en > zijn globaal actief!
- 2: -- wordt verwerkt
- 3: -- is niet gedefinieerd
- 4: -- wordt nogmaals verwerkt
- optional: opt
- displaymath: formule
- index: ingang
- math: formule
- nothing: leeg
- file: file
- position: positie
- reference: verwijzing
- csname: naam
- destination: bestemming
- triplet: triplet
- word: woord
- content: tekst
-\stopmessages
-
-\startmessages english library: setup
- title: setup
- formula: formula
- number: number
- list: list
- dimension: dimension
- mark: mark
- reference: reference
- command: command
- file: file
- name: name
- identifier: identifier
- text: text
- section: section
- singular: singular name
- plural: plural name
- matrix: n*m
- see: see
- inherits: inherits from
- 1: the characters < and > are globally active!
- 2: -- is processed
- 3: -- is undefined
- 4: -- is processed again
- optional: opt
- displaymath: formula
- index: entry
- math: formula
- nothing: empty
- file: file
- position: position
- reference: reference
- csname: name
- destination: destination
- triplet: triplet
- word: word
- content: text
-\stopmessages
-
-\startmessages german library: setup
- title: Setup
- formula: Formel
- number: Nummer
- list: Liste
- dimension: Dimension
- mark: Beschriftung
- reference: Referenz
- command: Befehl
- file: Datei
- name: Name
- identifier: Name
- text: Text
- section: Abschnitt
- singular: singular
- plural: plural
- matrix: n*m
- see: siehe
- inherits: inherits from
- 1: Die Zeichen < und > gelten global!
- 2: -- wird verarbeitet
- 3: -- ist undefiniert
- 4: -- ist mehrmals verarbeitet
- optional: opt
- displaymath: formula
- index: entry
- math: formula
- nothing: empty
- file: file
- position: position
- reference: reference
- csname: name
- destination: destination
- triplet: triplet
- word: word
- content: text
-\stopmessages
-
-\startmessages czech library: setup
- title: setup
- formula: rovnice
- number: cislo
- list: seznam
- dimension: dimenze
- mark: znacka
- reference: reference
- command: prikaz
- file: soubor
- name: jmeno
- identifier: jmeno
- text: text
- section: sekce
- singular: jmeno v singularu
- plural: jmeno v pluralu
- matrix: n*m
- see: viz
- inherits: inherits from
- 1: znaky < a > jsou globalne aktivni!
- 2: -- je zpracovano
- 3: -- je nedefinovano
- 4: -- je zpracovano znovu
- optional: opt
- displaymath: formula
- index: entry
- math: formula
- nothing: empty
- file: file
- position: position
- reference: reference
- csname: name
- destination: destination
- triplet: triplet
- word: word
- content: text
-\stopmessages
-
-\startmessages italian library: setup
- title: setup
- formula: formula
- number: number
- list: list
- dimension: dimension
- mark: mark
- reference: reference
- command: command
- file: file
- name: name
- identifier: name
- text: text
- section: section
- singular: singular name
- plural: plural name
- matrix: n*m
- see: see
- inherits: inherits from
- 1: the characters < and > are globally active!
- 2: -- is processed
- 3: -- is undefined
- 4: -- is processed again
- optional: opt
- displaymath: formula
- index: entry
- math: formula
- nothing: empty
- file: file
- position: position
- reference: reference
- csname: name
- destination: destination
- triplet: triplet
- word: word
- content: text
-\stopmessages
-
-\startmessages romanian library: setup
- title: setari
- formula: formula
- number: numar
- list: lista
- dimension: dimensiune
- mark: marcaj
- reference: referinta
- command: comanda
- file: fisier
- name: nume
- identifier: nume
- text: text
- section: sectiune
- singular: nume singular
- plural: nume pluram
- matrix: n*m
- see: vezi
- inherits: inherits from
- 1: caracterele < si > sunt active global!
- 2: este procesat --
- 3: -- este nedefinit
- 4: -- este procesat din nou
- optional: opt
- displaymath: formula
- index: entry
- math: formula
- nothing: empty
- file: file
- position: position
- reference: reference
- csname: name
- destination: destination
- triplet: triplet
- word: word
- content: text
-\stopmessages
-
-\startmessages french library: setup
- title: réglage
- formula: formule
- number: numéro
- list: liste
- dimension: dimension
- mark: marquage
- reference: reference
- command: commande
- file: fichier
- name: nom
- identifier: identificateur
- text: texte
- section: section
- singular: nom singulier
- plural: nom pluriel
- matrix: n*m
- see: vois
- inherits: herite de
- 1: les caractères < et > sont globalement actifs !
- 2: -- est traité
- 3: -- n'est pas défini
- 4: -- est traité de nouveau
- optional: opt
- displaymath: formule
- index: entrée
- math: formule
- nothing: vide
- file: fichier
- position: position
- reference: réference
- csname: nom
- destination: destination
- triplet: triplet
- word: mot
- content: texte
-\stopmessages
-
-\unprotect
-
-% general
-
-\unexpanded\def\setupnumfont {}
-\unexpanded\def\setuptxtfont {}
-\unexpanded\def\setupintfont {\WORD}
-\unexpanded\def\setupvarfont {\sl}
-\unexpanded\def\setupoptfont {\sl}
-\unexpanded\def\setupalwcolor{}
-\unexpanded\def\setupoptcolor{darkgray}
-
-\def\c!setup!definereserved#1#2%
- {\setvalue{c!setup!:r:#1}{#2}}
-
-\def\c!setup!reserved!#1%
- {\executeifdefined{c!setup!:r:#1}{#1}}
-
-\def\c!setup!internal!#1%
- {\dontleavehmode
- \begingroup
- \setupintfont{#1}%
- \endgroup}
-
-\def\c!setup!text!#1%
- {\dontleavehmode
- \begingroup
- \setupvarfont{#1}%
- \endgroup}
-
-\def\c!setup!command!#1%
- {{\setupvarfont{\texescape...#1}}}
-
-\def\??stp{@@stp}
-
-\defineregister
- [texmacro]
-% [texmacros]
-
-\definesorting
- [texcommand]
-% [texcommands]
-
-\setupsorting
- [texcommand]
- [\c!command=\showsetupinlist,
- \c!criterium=\@@stpcriterium]
-
-\pushmacro\setuptext
-
-\defineframedtext
- [setuptext]
- [\c!width=\hsize,
- \c!height=\v!fit,
- \c!align=\v!right,
- \c!offset=0.75em]
-
-\popmacro\setuptext
-
-%D Loading:
-
-\let\currentSETUPfullname\s!unknown
-
-\startxmlsetups xml:setups:assemblename
- \doifelse {\xmlatt{#1}{type}} {environment} {
- \let\currentSETUPprefix\e!start
- } {
- \let\currentSETUPprefix\empty
- }
- % \edef\currentSETUPname{\xmlatt{#1}{name}}
- \edef\currentSETUPname{\xmlattribute{#1}{/sequence/string[1]}{value}}%
- \doifelse {\xmlatt{#1}{generated}} {yes} {
- \def\currentSETUPgenerated{*}
- } {
- \let\currentSETUPgenerated\empty
- }
- \doifelsenothing {\xmlatt{#1}{variant}} {
- \let\currentSETUPvariant\empty
- } {
- \def\currentSETUPvariant{:\xmlatt{#1}{variant}}
- }
- \edef\currentSETUPfullname {
- \currentSETUPprefix
- \currentSETUPname
- \currentSETUPvariant
- \currentSETUPgenerated
- }
-\stopxmlsetups
-
-\startxmlsetups xml:setups:register
- \xmlsetup{#1}{xml:setups:assemblename}
- % not really needed if we just use setups
- \expanded{\texcommand[stp:x:\currentSETUPfullname]{#1}}
-\stopxmlsetups
-
-\startxmlsetups xml:setups:basics
- \xmlinclude{#1}{include}{filename}%
- \xmlsetsetup {#1} {
- sequence|string|variable|assignments|keywords|content|displaymath|index|math|
- nothing|file|position|reference|csname|destination|triplet|word|
- resolve|parameter|constant|inherit|parameter|define
- } {xml:setups:*}
-\stopxmlsetups
-
-\xmlregisterdocumentsetup{setups}{xml:setups:basics}
-
-\unexpanded\def\loadsetups{\complexorsimple\loadsetups}
-
-\let\loadedsetups\empty % we load more setups, setups:<name>
-
-\def\simpleloadsetups
- {\doifnotmode{no-setup-main}{\complexloadsetups[cont-en.xml]}}
-
-\def\complexloadsetups[#1]%
- {\doifsomething{#1}
- {\doonlyonce{setups:#1}
- {\doglobal\prependtocommalist{setups:#1}\loadedsetups % last overloads first
- \xmlloadonly{setups:#1}{#1}{setups}%
- \xmlfilter{setups:#1}{/interface/command/command(xml:setups:register)}}}} % qualified path saves > 50% runtime
-
-\newif\ifshortsetup
-
-\unexpanded\def\setup {\shortsetupfalse\doshowsetup}
-\unexpanded\def\showsetup {\shortsetupfalse\doshowsetup}
-\unexpanded\def\shortsetup{\shortsetuptrue \doshowsetup}
-\unexpanded\def\setupsetup{\dodoubleargument\getparameters[\??stp]}
-
-%unexpanded\def\showsetupinlist#1#2#3{\shortsetupfalse\showsetupindeed{#3}\par}
-\unexpanded\def\showsetupinlist#1#2#3{\shortsetupfalse\xmlsetup{#3}{xml:setups:typeset}\par}
-
-% todo: only references in lists
-
-\def\doshowsetup
- {\dosingleempty\dodoshowsetup}
-
-\def\dodoshowsetup[#1]%
- {\iffirstargument
- \dododoshowsetup{#1}%
- \else
- \expandafter\dododoshowsetup
- \fi}
-
-\def\dododoshowsetup#1% this will trigger 'used'
- {\registersort[texcommand][stp:x:#1]%
- \showsetupindeed{#1}}
-
-% \def\showsetupindeed#1%
-% {\xmlfilterlist{\loadedsetups}{interface/command[@name='#1']/command(xml:setups:typeset)}}
-
-% \def\showsetupindeed#1%
-% {\xmlfilterlist{\loadedsetups}{/interface/command['#1' == (@type=='environment' and 'start' or '') .. @name]/command(xml:setups:typeset)}}
-
-% \setelementnature[setup][display]
-% \setelementnature[setup][mixed]
-
-\def\showsetupindeed#1%
- {\startelement[setup][name=#1]%
- \startelement[noexport][comment={setup definition #1}]
- \xmlfilterlist{\loadedsetups}{/interface/command['#1' == (@type=='environment' and '\e!start' or '') .. @name]/command(xml:setups:typeset)}%
- \stopelement
- \stopelement}
-
-\unexpanded\def\placesetup {\placelistofsorts[texcommand][\c!criterium=\v!used]}
-\unexpanded\def\placeallsetups{\placelistofsorts[texcommand][\c!criterium=\v!all ]}
-
-\let\placeeverysetup\placeallsetups
-
-%D Typesetting:
-
-\setupxml
- [%\c!method=mkiv, % mixed mode
- \c!default=\v!hidden, % ignore elements that are not defined
- \c!compress=\v!yes, % strip comment
- \c!entities=\v!yes] % replace entities
-
-\newcounter\currentSETUPargument
-\newcounter\maximumSETUPargument
-
-\def\currentSETUPwidth{0pt}
-
-\startxmlsetups xml:setups:typeset
- \getvalue{\e!start setuptext}
- \tttf
- \nohyphens
- \veryraggedright
- \doglobal\newcounter\currentSETUPargument
- \xdef\maximumSETUPargument{\xmlcount{#1}{/arguments/*}}
- \edef\currentSETUPhash{\xmlatt{#1}{hash}}
- \bgroup
- \enablemode[setups-pass-one]%
- \doif {\xmlatt{#1}{generated}} {yes} {
- \ttsl
- }
- \letterbackslash
- \doif {\xmlatt{#1}{type}} {environment} {
- \e!start
- }
- \xmlfilter{#1}{/sequence/first()}
- \ignorespaces
- \egroup
- \ifshortsetup
- % nothing
- \else
- \xmldoif{#1}{/arguments} {
- \bgroup
- \enablemode[setups-pass-one]
- \doglobal\newcounter\currentSETUPargument
- \ignorespaces
- \xmlfilter{#1}{/arguments/text()}
- \egroup
- }
- \doif {\xmlatt{#1}{type}} {environment} {
- \bgroup
- \enablemode[setups-pass-one]%
- \hskip.5em\unknown\hskip.5em
- \doif {\xmlatt{#1}{generated}} {yes} {
- \ttsl
- }
- \tex{\e!stop}
- \xmlfilter{#1}{/sequence/first()}
- \ignorespaces
- \egroup
- }
- \endgraf
- \xmldoif{#1}{/arguments} {
- \bgroup
- \enablemode[setups-pass-two]
- \doglobal\newcounter\currentSETUPargument
- %\blank[\v!line] % packed mode (we could do \startunpacked ...)
- \godown[.75\lineheight]
- \switchtobodyfont[\v!small]
- \ignorespaces\xmlfilter{#1}{/arguments/text()}\endgraf
- \egroup
- }
- \fi
- \getvalue{\e!stop setuptext}
-\stopxmlsetups
-
-\setupsetup
- [\c!before=,
- \c!after=,
- \c!command=\setup,
- \c!criterium=\v!used]
-
-\startxmlsetups xml:setups:resolve
- \ignorespaces
- \xmlfilterlist{\loadedsetups}{/interface/define[@name='\xmlatt{#1}{name}']/first()}
-\stopxmlsetups
-
-%D This is the first pass; here we generate the top line.
-
-\startxmlsetups xml:setups:define
- \ignorespaces\xmlflush{#1}
-\stopxmlsetups
-
-\startxmlsetups xml:setups:sequence
- \ignorespaces\xmlflush{#1}
-\stopxmlsetups
-
-\startxmlsetups xml:setups:string
- \xmlatt{#1}{value}\ignorespaces
-\stopxmlsetups
-
-\startxmlsetups xml:setups:content \showSETUPcomponent{#1}{content} {content} \stopxmlsetups
-\startxmlsetups xml:setups:displaymath \showSETUPcomponent{#1}{displaymath}{display math}\stopxmlsetups
-\startxmlsetups xml:setups:index \showSETUPcomponent{#1}{index} {index} \stopxmlsetups
-\startxmlsetups xml:setups:math \showSETUPcomponent{#1}{math} {math} \stopxmlsetups
-\startxmlsetups xml:setups:nothing \showSETUPcomponent{#1}{nothing} {nothing} \stopxmlsetups
-\startxmlsetups xml:setups:file \showSETUPcomponent{#1}{file} {file name} \stopxmlsetups
-\startxmlsetups xml:setups:position \showSETUPcomponent{#1}{position} {position} \stopxmlsetups
-\startxmlsetups xml:setups:reference \showSETUPcomponent{#1}{reference} {reference} \stopxmlsetups
-\startxmlsetups xml:setups:csname \showSETUPcomponent{#1}{csname} {csname} \stopxmlsetups
-\startxmlsetups xml:setups:destination \showSETUPcomponent{#1}{destination}{destination} \stopxmlsetups
-\startxmlsetups xml:setups:triplet \showSETUPcomponent{#1}{triplet} {triplet} \stopxmlsetups
-\startxmlsetups xml:setups:word \showSETUPcomponent{#1}{word} {word} \stopxmlsetups
-
-\def\showSETUPcomponent#1#2#3%
- {\doifelsemode{setups-pass-one}
- {\getvalue{showSETUP#2}{#1}}
- {\simpleSETUPargument{#3}}}
-
-%D This is the second pass; here we generate the table.
-
-\unexpanded\def\startfirstSETUPcolumn#1%
- {\bgroup
- \advance\leftskip 2em
- \noindent\llap{\hbox to 2em{#1\hss}}}
-
-\unexpanded\def\stopfirstSETUPcolumn
- {\endgraf
- \egroup}
-
-\unexpanded\def\startsecondSETUPcolumn#1#2%
- {\bgroup
- \advance\hangindent\dimexpr\currentSETUPwidth+2.5em\relax
- \noindent \hbox to \hangindent{#1\hss\hbox to 2.5em{\hss#2\hss}}}
-
-\unexpanded\def\stopsecondSETUPcolumn
- {\endgraf
- \egroup}
-
-\def\secondSETUPcolumn#1#2%
- {\startsecondSETUPcolumn{#1}{#2}\stopsecondSETUPcolumn}
-
-\def\previousSETUPargument{\currentSETUPargument}
-
-\startxmlsetups xml:setups:parameter:measure
- \setbox0=\hbox{\c!setup!reserved!{\xmlatt{#1}{name}}}
- \ifdim\wd0>\currentSETUPwidth\xdef\currentSETUPwidth{\the\wd0}\fi
-\stopxmlsetups
-
-\startxmlsetups xml:setups:assignments
- \doifelsemode{setups-pass-one} {
- \showSETUPassignment{#1}
- } {
- \xdef\currentSETUPwidth{0pt}%
- \bgroup
- \xmlfilter{#1}{/parameter/command(xml:setups:parameter:measure)}
- \egroup
- \startfirstSETUPcolumn{\showSETUPnumber}%
- \ignorespaces
- \xmldoifelse{#1}{/(parameter|inherit)}{
- \xmlflush{#1}
- } {
- ...
- }
- \let\previousSETUPargument\currentSETUPargument
- \stopfirstSETUPcolumn
- \blank[\v!halfline]
- \ignorespaces
- }
-\stopxmlsetups
-
-\startxmlsetups xml:setups:keywords
- \doifelsemode{setups-pass-one} {
- \showSETUPkeyword{#1}
- } {
- \startfirstSETUPcolumn{\showSETUPnumber}%
- \ignorespaces
- \xmlflush{#1}
- \let\previousSETUPargument\currentSETUPargument
- \stopfirstSETUPcolumn
- \blank[\v!halfline]
- \ignorespaces
- }
-\stopxmlsetups
-
-\startxmlsetups xml:setups:parameter
- \startsecondSETUPcolumn{\c!setup!reserved!{\xmlatt{#1}{name}}}{=}
- \ignorespaces
- \xmlflush{#1}
- \doifmode{interface:setup:defaults} {
- \ifx\currentSETUPhash\empty \else
- \begingroup
- % todo, make a one level expansion of parameter
- \let\emwidth \relax
- \let\exheight\relax
- \edef\currentSETUPvalue{\csname named\currentSETUPhash parameter\endcsname\empty{\xmlatt{#1}{name}}}
- \ifx\currentSETUPvalue\empty \else
- =\space
- \detokenize\expandafter{\currentSETUPvalue}
- \fi
- \endgroup
- \fi
- }
- \stopsecondSETUPcolumn
- \ignorespaces
-\stopxmlsetups
-
-\startxmlsetups xml:setups:constant
- \doifelsemode {setups-pass-one} {
- } {
- \doif {\xmlatt{#1}{default}} {yes} {
- \underbar % next needs to be {braced}
- }
- {\c!setup!reserved!{\xmlatt{#1}{type}}}
- \space
- \ignorespaces
- }
-\stopxmlsetups
-
-\startxmlsetups xml:setups:variable
- \doifelsemode {setups-pass-one} {
- \expanded{\setupintfont{\xmlatt{#1}{value}}}\ignorespaces
- } {
- \c!setup!reserved!{\xmlatt{#1}{value}}
- \space
- \ignorespaces
- }
-\stopxmlsetups
-
-\startxmlsetups xml:setups:inherit
- \secondSETUPcolumn {
- \c!setup!text!{\getmessage{setup}{inherits}}
- \enspace
- \letterbackslash
- \xmlatt{#1}{name}
- } {}
- \ignorespaces
-\stopxmlsetups
-
-\def\simpleSETUPargument#1%
- {\startfirstSETUPcolumn{\showSETUPnumber}%
- \c!setup!internal!{#1}%
- \stopfirstSETUPcolumn
- \blank[\v!halfline]
- \ignorespaces}
-
-\c!setup!definereserved {cd:command} {\c!setup!internal!{\getmessage{setup}{command}}}
-\c!setup!definereserved {cd:dimension} {\c!setup!internal!{\getmessage{setup}{dimension}}}
-\c!setup!definereserved {cd:file} {\c!setup!internal!{\getmessage{setup}{file}}}
-\c!setup!definereserved {cd:name} {\c!setup!internal!{\getmessage{setup}{identifier}}}
-\c!setup!definereserved {cd:character} {\c!setup!internal!{\getmessage{setup}{character}}}
-\c!setup!definereserved {cd:mark} {\c!setup!internal!{\getmessage{setup}{mark}}}
-\c!setup!definereserved {cd:number} {\c!setup!internal!{\getmessage{setup}{number}}}
-\c!setup!definereserved {cd:reference} {\c!setup!internal!{\getmessage{setup}{reference}}}
-\c!setup!definereserved {cd:plural} {\c!setup!internal!{\getmessage{setup}{plural}}}
-\c!setup!definereserved {cd:singular} {\c!setup!internal!{\getmessage{setup}{singular}}}
-\c!setup!definereserved {cd:text} {\c!setup!internal!{\getmessage{setup}{text}}}
-\c!setup!definereserved {cd:formula} {\c!setup!internal!{\getmessage{setup}{formula}}}
-\c!setup!definereserved {cd:file} {\c!setup!internal!{\getmessage{setup}{file}}}
-\c!setup!definereserved {cd:matrix} {\c!setup!internal!{\getmessage{setup}{matrix}}}
-\c!setup!definereserved {cd:list} {\c!setup!internal!{\getmessage{setup}{list}}}
-\c!setup!definereserved {cd:section} {\c!setup!internal!{\getmessage{setup}{section}}}
-
-\c!setup!definereserved {cd:noargument} {\c!setup!command! {}}
-\c!setup!definereserved {cd:oneargument} {\c!setup!command! {\#1}}
-\c!setup!definereserved {cd:twoarguments} {\c!setup!command! {\#1\#2}}
-\c!setup!definereserved {cd:threearguments} {\c!setup!command! {\#1\#2\#3}}
-
-%D Auxiliary.
-
-\unexpanded\def\showSETUP#1#2#3%
- {\bgroup
- \doglobal\increment\currentSETUPargument
- \setbox0=\hbox
- {\doifelse{\xmlatt{#1}{list}}{yes}{#3}{#2}}%
- \setbox2=\hbox to \wd0
- {\hss
- \raise1ex\hbox
- {\tx\ifcase\maximumSETUPargument\relax
- \or*\else\currentSETUPargument
- \fi}%
- \hss}%
- \setbox4=\hbox to \wd0
- {\hss
- \lower2ex\hbox
- \bgroup
- \txx\doif{\xmlatt{#1}{optional}}{yes}{\c!setup!internal!{\getmessage{setup}{optional}}}%
- \egroup
- \hss}%
- \ht2\ht\strutbox
- \dp4\dp\strutbox
- \hskip.5em\hsmash{\box0}\hsmash{\box4}\box2%
- \egroup
- \ignorespaces}
-
-\def\showSETUPnumber
- {\doglobal\increment\currentSETUPargument
- \hbox to 2em
- {\ifcase\maximumSETUPargument\relax
- \or*\else\currentSETUPargument
- \fi
- \hss}}
-
-\def\showSETUPassignment #1{\showSETUP{#1}{[.\lower.5ex\hbox{=}.]} {[..,.\lower.5ex\hbox{=}.,..]}}
-\def\showSETUPkeyword #1{\showSETUP{#1}{[...]} {[...,...]}}
-\def\showSETUPargument #1{\showSETUP{#1}{\leftargument..\rightargument} {\leftargument..,...,..\rightargument}}
-\def\showSETUPdisplaymath#1{\showSETUP{#1}{\$\$...\$\$} {\$\$...\$\$}}
-\def\showSETUPindex #1{\showSETUP{#1}{\leftargument...\rightargument} {\leftargument..+...+..\rightargument}}
-\def\showSETUPmath #1{\showSETUP{#1}{\$...\$} {\$...\$}}
-\def\showSETUPnothing #1{\showSETUP{#1}{...} {}}
-\def\showSETUPfile #1{\showSETUP{#1}{~...~} {}}
-\def\showSETUPposition #1{\showSETUP{#1}{(...)} {(...,...)}}
-\def\showSETUPreference #1{\showSETUP{#1}{[...]} {[...,...]}}
-\def\showSETUPcsname #1{\showSETUP{#1}{{\c!setup!command!{}}} {}}
-\def\showSETUPdestination#1{\showSETUP{#1}{[\leftargument..[ref]\rightargument]}{[..,\leftargument..[ref,..]\rightargument,..]}}
-\def\showSETUPtriplet #1{\showSETUP{#1}{[x:y:z=]} {[x:y:z=,..]}}
-\def\showSETUPword #1{\showSETUP{#1}{\leftargument...\rightargument} {\leftargument.. ... ..\rightargument}}
-\def\showSETUPcontent #1{\showSETUP{#1}{\leftargument...\rightargument} {\leftargument.. ... ..\rightargument}}
-
-% A prelude to a rewrite and some more:
-
-\definetype[parametercommand][type]
-\definetype[parameterkey] [type]
-\definetype[parametervalue] [type][space=on]
-
-\setuptype[parametercommand] [color=darkmagenta]
-\setuptype[parametervalue] [color=darkyellow]
-
-\startxmlsetups xml:setups:parameters:value
- \edef\currentsetupparameterkey {\xmlatt{#1}{name}}
- \edef\currentsetupparametervalue{\csname named\currentsetupparametercategory parameter\endcsname\currentsetupparameterinstance\currentsetupparameterkey}
- \ifx\currentsetupparameterinstance\empty
- \expanded {
- \NC \parameterkey {\currentsetupparameterkey}
- \NC \parametervalue{\detokenize\expandafter{\currentsetupparametervalue}}
- \NC \NR
- }
- \else\ifx\currentsetupparametervalue\empty
- \else
- \edef\currentsetupparameterdefault{\csname named\currentsetupparametercategory parameter\endcsname\empty\currentsetupparameterkey}
- \ifx\currentsetupparametervalue\currentsetupparameterdefault
- % skip
- \else
- \expanded {
- \NC \parameterkey {\currentsetupparameterkey}
- \NC \parametervalue{\detokenize\expandafter{\currentsetupparametervalue}}
- \NC \NR
- }
- \fi
- \fi\fi
-\stopxmlsetups
-
-\startxmlsetups xml:setups:parameters:values
- \blank[big]
- \expanded {
- \parametercommand {
- \currentsetupparametercommand
- \space:\space
- \ifx\currentsetupparameterinstance\empty
- defaults
- \else
- \currentsetupparameterinstance
- \fi
- }
- }
- \blank[big,samepage]
- \starttabulate[|l|p|]
- \xmlall
- {#1}
- {/interface/command[@name=='\currentsetupparametercommand']/arguments/assignments/parameter/command(xml:setups:parameters:value)}
- \ifnum\noftabulaterows = \zerocount
- \NC \parameterkey{no specific settings} \NC \NC \NR
- \fi
- \stoptabulate
-\stopxmlsetups
-
-\starttexdefinition showrootvalues [#1]
- \edef\currentsetupparametercategory{#1}
- \edef\currentsetupparametercommand{setup#1}
- \let\currentsetupparameterinstance\empty
- \xmlsetup{\loadedsetups}{xml:setups:parameters:values}
-\stoptexdefinition
-
-\starttexdefinition showinstancevalues [#1]#2[#3]
- \edef\currentsetupparametercategory{#1}
- \edef\currentsetupparametercommand{setup#1}
- \edef\currentsetupparameterinstance{#3}
- \xmlsetup{\loadedsetups}{xml:setups:parameters:values}
-\stoptexdefinition
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/x-set-12.mkii b/Master/texmf-dist/tex/context/base/x-set-12.mkii
deleted file mode 100644
index c2aa265c3f2..00000000000
--- a/Master/texmf-dist/tex/context/base/x-set-12.mkii
+++ /dev/null
@@ -1,258 +0,0 @@
-%D \module
-%D [ file=x-set-12,
-%D version=2004.10.31,
-%D remark=setupx.tex: 1998.07.20 and later,
-%D title=\CONTEXT\ Setup Definitions,
-%D subtitle=Macro Definitions,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%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[set-11]
-
-\unprotect
-
-% \starttext
-% \setup{installlanguage}
-% \placesetup
-% \stoptext
-
-\definecolor[TitleColor][r=.375,g=.125,b=.125]
-\definecolor[TitleColor][r=.125,g=.375,b=.125]
-\definecolor[TitleColor][r=.125,g=.125,b=.375]
-\definecolor[TitleColor][r=.375,g=.375,b=.125]
-\definecolor[TitleColor][r=.375,g=.125,b=.375]
-\definecolor[TitleColor][r=.125,g=.375,b=.375]
-
-\definecolor[TitleColor][r=.25,g=.20,b=.15]
-\definecolor[TitleColor][r=.25,g=.15,b=.20]
-\definecolor[TitleColor][r=.20,g=.15,b=.25]
-\definecolor[TitleColor][r=.20,g=.25,b=.15]
-\definecolor[TitleColor][r=.15,g=.20,b=.25]
-\definecolor[TitleColor][r=.15,g=.25,b=.20]
-
-\startinterface english \loadsetups[cont-en.xml] \stopinterface
-\startinterface dutch \loadsetups[cont-nl.xml] \stopinterface
-\startinterface german \loadsetups[cont-de.xml] \stopinterface
-\startinterface french \loadsetups[cont-fr.xml] \stopinterface
-\startinterface italian \loadsetups[cont-it.xml] \stopinterface
-\startinterface czech \loadsetups[cont-cs.xml] \stopinterface
-\startinterface romanian \loadsetups[cont-ro.xml] \stopinterface
-
-\startinterface dutch \definecolor[LocalColor][r=.75,g=.25,b=.25] \stopinterface
-\startinterface english \definecolor[LocalColor][r=.25,g=.75,b=.25] \stopinterface
-\startinterface german \definecolor[LocalColor][r=.25,g=.25,b=.75] \stopinterface
-\startinterface french \definecolor[LocalColor][r=.75,g=.75,b=.25] \stopinterface
-\startinterface czech \definecolor[LocalColor][r=.75,g=.25,b=.75] \stopinterface
-\startinterface italian \definecolor[LocalColor][r=.25,g=.75,b=.75] \stopinterface
-\startinterface romanian \definecolor[LocalColor][r=.5,g=.4,b=.3] \stopinterface
-% \definecolor[LocalColor][r=.5,g=.3,b=.4]
-% \definecolor[LocalColor][r=.4,g=.3,b=.5]
-% \definecolor[LocalColor][r=.4,g=.5,b=.3]
-% \definecolor[LocalColor][r=.3,g=.4,b=.5]
-% \definecolor[LocalColor][r=.3,g=.5,b=.4]
-
-\startinterface english \definecolor[TitleColor][r=.375,g=.125,b=.125] \stopinterface
-\startinterface dutch \definecolor[TitleColor][r=.125,g=.375,b=.125] \stopinterface
-\startinterface german \definecolor[TitleColor][r=.125,g=.125,b=.375] \stopinterface
-\startinterface french \definecolor[TitleColor][r=.375,g=.375,b=.125] \stopinterface
-\startinterface italian \definecolor[TitleColor][r=.375,g=.125,b=.375] \stopinterface
-\startinterface czech \definecolor[TitleColor][r=.125,g=.375,b=.375] \stopinterface
-\startinterface romanian \definecolor[TitleColor][r=.25,g=.20,b=.15] \stopinterface
-% \definecolor[TitleColor][r=.25,g=.15,b=.20]
-% \definecolor[TitleColor][r=.20,g=.15,b=.25]
-% \definecolor[TitleColor][r=.20,g=.25,b=.15]
-% \definecolor[TitleColor][r=.15,g=.20,b=.25]
-% \definecolor[TitleColor][r=.15,g=.25,b=.20]
-
-\definecolor [lightgray] [s=.9]
-\definecolor [darkgray] [s=.1]
-
-\usetypescript[palatino]
-\setupbodyfont[palatino,9pt]
-
-\setupcolors
- [\c!state=\v!start]
-
-\defineoverlay
- [cover]
- [\hbox to \paperwidth{\hss\reuseMPgraphic{cover+back}}]
-
-\defineoverlay
- [back]
- [\hbox to \paperwidth{\reuseMPgraphic{cover+back}\hss}]
-
-\startreusableMPgraphic{cover+back}
- numeric h, w ; path p, q, r ; color f, d ; pair s ;
- h := OverlayHeight ; w := 2*OverlayWidth ;
- r := unitsquare xyscaled (w,h) ;
- fill r withcolor \MPcolor{lightgray} ;
- set_grid(w,h,w/8,w/16) ;
- forever :
- s := center r randomized (w,h) ;
- if new_on_grid(xpart s, ypart s) :
- s := (dx,dy) ;
- p := fullsquare xyscaled(w/4,w/8) ;
- q := (-4w,ypart ulcorner p) --
- .5[ulcorner p, urcorner p] --
- (4w,ypart urcorner p) ;
- q := q shifted (0,-w/24) ;
- p := p randomized (w/40,w/40) ;
- q := q randomized (0,w/100) ;
- q := q cutafter (p cutafter point 3 of p) ;
- q := q cutbefore (p cutbefore point 3 of p) ;
- d := .5[\MPcolor{LocalColor},\MPcolor{lightgray}] randomized (.5,.9) ;
- f := \MPcolor{lightgray} randomized (.5,.9) ;
- pickup pencircle scaled (w/100) ;
- fill p shifted s withcolor f ;
- draw p shifted s withcolor d ;
- draw q shifted s withcolor d ;
- fi ;
- exitif grid_full ;
- endfor ;
- setbounds currentpicture to r ;
-\stopreusableMPgraphic
-
-\definelayout
- [titlepage]
- [\c!backspace=1cm,
- \c!topspace=1cm,
- \c!width=\v!middle,
- \c!height=\v!middle,
- \c!header=0pt,
- \c!footer=0pt]
-
-\setuplayout
- [\c!backspace=2cm,
- \c!topspace=1.5cm,
- \c!header=0cm,
- \c!footer=0cm,
- \c!width=\v!middle,
- \c!height=\v!middle]
-
-\setuppagenumbering
- [\c!alternative=\v!doublesided]
-
-\setupsetup
- [\c!criterium=\v!all,
- \c!reference=0]
-
-\setupframedtexts
- [setuptext]
- [\c!frame=\v!on,
- \c!rulethickness=1pt,
- \c!framecolor=TitleColor]
-
-\setupunderbar
- [\c!rulethickness=1pt,
- \c!rulecolor=TitleColor]
-
-\starttext
-
-\setupbackgrounds
- [\v!rightpage]
- [\c!background=cover]
-
-\setuplayout
- [titlepage]
-
-\startsetups text:commands
- \startinterface dutch \strut commando's \par \stopinterface
- \startinterface english \strut commands \par \stopinterface
- \startinterface german \strut befehle \par \stopinterface
- \startinterface french \strut commandes \par \stopinterface
- \startinterface czech \strut p\v{r}ikazy \par \stopinterface
- \startinterface italian \strut comandi \par \stopinterface
- \startinterface romanian \strut comenzile \par \stopinterface
-\stopsetups
-
-\startsetups text:uppercase
- \startinterface dutch NL\stopinterface
- \startinterface english EN\stopinterface
- \startinterface german DE\stopinterface
- \startinterface french FR\stopinterface
- \startinterface czech CS\stopinterface
- \startinterface italian IT\stopinterface
- \startinterface romanian RO\stopinterface
-\stopsetups
-
-\startsetups text:lowercase
- \startinterface dutch \strut nl / nederlands \par \stopinterface
- \startinterface english \strut en / english \par \stopinterface
- \startinterface german \strut de / deutsch \par \stopinterface
- \startinterface french \strut fr / fran\c{c}ais \par \stopinterface
- \startinterface czech \strut cs / \v{c}esk\'y \par \stopinterface
- \startinterface italian \strut it / italiano \par \stopinterface
- \startinterface romanian \strut ro / rom\^{a}n\u{a} \par \stopinterface
-\stopsetups
-
-\startmakeup[\v!standard]
- \dontcomplain
- \setupalign[\v!left]
- \startcolor[TitleColor]
- \definedfont[RegularBold at 100pt]\setstrut
- \strut Con\TeX t \par
- \definedfont[RegularBold at 50pt]\setstrut
- \setups[text:commands]
- \vfill
- \definedfont[RegularBold at 150pt]\setstrut
- \setups[text:uppercase]
- \stopcolor
-\stopmakeup
-
-\setuplayout % needed ?
-
-\setupbackgrounds
- [\v!rightpage]
- [\c!background=]
-
-\startmakeup[\v!standard]
- \dontcomplain
- \startcolor[TitleColor]
- \definedfont[RegularBold at 100pt]\setstrut
- \setupalign[\v!left]
- \strut Con\TeX t \par
- \definedfont[RegularBold at 50pt]\setstrut
- \setups[text:commands]
- \vfill
- \definedfont[RegularBold at 24pt]\setupinterlinespace
- \setups[text:lowercase]
- \par \strut \currentdate \par
- \stopcolor
-\stopmakeup
-
-\protect
-
-\placeeverysetup
-
-\unprotect
-
-\page[\v!yes,\v!blank,\v!right,\v!left]
-
-\setuplayout
- [titlepage]
-
-\setupbackgrounds
- [\v!leftpage]
- [\c!background=back]
-
-\startmakeup[\v!standard][\c!page=]
- \dontcomplain
- \startcolor[TitleColor]
- \definedfont[RegularBold at 24pt]\setupinterlinespace
- \setupalign[\v!left]
- \vfill
- PRAGMA ADE \par
- Ridderstraat 27 \par
- 8061GH Hasselt NL \par
- www.pragma-ade.com \par
- \stopcolor
-\stopmakeup
-
-\protect
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/x-set-12.mkiv b/Master/texmf-dist/tex/context/base/x-set-12.mkiv
deleted file mode 100644
index c60445313ee..00000000000
--- a/Master/texmf-dist/tex/context/base/x-set-12.mkiv
+++ /dev/null
@@ -1,267 +0,0 @@
-%D \module
-%D [ file=x-set-12,
-%D version=2004.10.31,
-%D remark=setupx.tex: 1998.07.20 and later,
-%D title=\CONTEXT\ Setup Definitions,
-%D subtitle=Macro Definitions,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% included loading overhead
-%
-% 2.55 / 2.40 (luatex)
-% 1.90 / 1.80 (luajittex)
-
-% \newif\ifcachedcommand
-% \newif\ifcalledcommand
-%
-% \cachedcommandtrue
-% \calledcommandtrue
-%
-% \usemodule[speedtest]
-
-\usemodule[set-11]
-
-\unprotect
-
-% \starttext
-% \setup{installlanguage}
-% \placesetup
-% \stoptext
-
-\definecolor[TitleColor][r=.375,g=.125,b=.125]
-\definecolor[TitleColor][r=.125,g=.375,b=.125]
-\definecolor[TitleColor][r=.125,g=.125,b=.375]
-\definecolor[TitleColor][r=.375,g=.375,b=.125]
-\definecolor[TitleColor][r=.375,g=.125,b=.375]
-\definecolor[TitleColor][r=.125,g=.375,b=.375]
-
-\definecolor[TitleColor][r=.25,g=.20,b=.15]
-\definecolor[TitleColor][r=.25,g=.15,b=.20]
-\definecolor[TitleColor][r=.20,g=.15,b=.25]
-\definecolor[TitleColor][r=.20,g=.25,b=.15]
-\definecolor[TitleColor][r=.15,g=.20,b=.25]
-\definecolor[TitleColor][r=.15,g=.25,b=.20]
-
-\startinterface english \loadsetups[cont-en.xml] \stopinterface
-\startinterface dutch \loadsetups[cont-nl.xml] \stopinterface
-\startinterface german \loadsetups[cont-de.xml] \stopinterface
-\startinterface french \loadsetups[cont-fr.xml] \stopinterface
-\startinterface italian \loadsetups[cont-it.xml] \stopinterface
-\startinterface czech \loadsetups[cont-cs.xml] \stopinterface
-\startinterface romanian \loadsetups[cont-ro.xml] \stopinterface
-
-\startinterface dutch \definecolor[LocalColor][r=.75,g=.25,b=.25] \stopinterface
-\startinterface english \definecolor[LocalColor][r=.25,g=.75,b=.25] \stopinterface
-\startinterface german \definecolor[LocalColor][r=.25,g=.25,b=.75] \stopinterface
-\startinterface french \definecolor[LocalColor][r=.75,g=.75,b=.25] \stopinterface
-\startinterface czech \definecolor[LocalColor][r=.75,g=.25,b=.75] \stopinterface
-\startinterface italian \definecolor[LocalColor][r=.25,g=.75,b=.75] \stopinterface
-\startinterface romanian \definecolor[LocalColor][r=.5,g=.4,b=.3] \stopinterface
-% \definecolor[LocalColor][r=.5,g=.3,b=.4]
-% \definecolor[LocalColor][r=.4,g=.3,b=.5]
-% \definecolor[LocalColor][r=.4,g=.5,b=.3]
-% \definecolor[LocalColor][r=.3,g=.4,b=.5]
-% \definecolor[LocalColor][r=.3,g=.5,b=.4]
-
-\startinterface english \definecolor[TitleColor][r=.375,g=.125,b=.125] \stopinterface
-\startinterface dutch \definecolor[TitleColor][r=.125,g=.375,b=.125] \stopinterface
-\startinterface german \definecolor[TitleColor][r=.125,g=.125,b=.375] \stopinterface
-\startinterface french \definecolor[TitleColor][r=.375,g=.375,b=.125] \stopinterface
-\startinterface italian \definecolor[TitleColor][r=.375,g=.125,b=.375] \stopinterface
-\startinterface czech \definecolor[TitleColor][r=.125,g=.375,b=.375] \stopinterface
-\startinterface romanian \definecolor[TitleColor][r=.25,g=.20,b=.15] \stopinterface
-% \definecolor[TitleColor][r=.25,g=.15,b=.20]
-% \definecolor[TitleColor][r=.20,g=.15,b=.25]
-% \definecolor[TitleColor][r=.20,g=.25,b=.15]
-% \definecolor[TitleColor][r=.15,g=.20,b=.25]
-% \definecolor[TitleColor][r=.15,g=.25,b=.20]
-
-\definecolor [lightgray] [s=.9]
-\definecolor [darkgray] [s=.1]
-
-\usetypescript[palatino]
-\setupbodyfont[palatino,9pt]
-
-\defineoverlay
- [cover]
- [\hbox to \paperwidth{\hss\reuseMPgraphic{cover+back}}]
-
-\defineoverlay
- [back]
- [\hbox to \paperwidth{\reuseMPgraphic{cover+back}\hss}]
-
-\startreusableMPgraphic{cover+back}
- numeric h, w ; path p, q, r ; color f, d ; pair s ;
- h := OverlayHeight ; w := 2*OverlayWidth ;
- r := unitsquare xyscaled (w,h) ;
- fill r withcolor \MPcolor{lightgray} ;
- set_grid(w,h,w/8,w/16) ;
- forever :
- s := center r randomized (w,h) ;
- if new_on_grid(xpart s, ypart s) :
- s := (dx,dy) ;
- p := fullsquare xyscaled(w/4,w/8) ;
- q := (-4w,ypart ulcorner p) -- .5[ulcorner p, urcorner p] -- (4w,ypart urcorner p) ;
- q := q shifted (0,-w/24) ;
- p := p randomized (w/40,w/40) ;
- q := q randomized (0,w/100) ;
- q := q cutafter (p cutafter point 3 of p) ;
- q := q cutbefore (p cutbefore point 3 of p) ;
- d := .5[\MPcolor{LocalColor},\MPcolor{lightgray}] randomized (.5,.9) ;
- f := \MPcolor{lightgray} randomized (.5,.9) ;
- pickup pencircle scaled (w/100) ;
- fill p shifted s withcolor f ;
- draw p shifted s withcolor d ;
- draw q shifted s withcolor d ;
- fi ;
- exitif grid_full ;
- endfor ;
- setbounds currentpicture to r ;
-\stopreusableMPgraphic
-
-\definelayout
- [titlepage]
- [\c!backspace=1cm,
- \c!topspace=1cm,
- \c!width=\v!middle,
- \c!height=\v!middle,
- \c!header=0pt,
- \c!footer=0pt]
-
-\setuplayout
- [\c!backspace=2cm,
- \c!topspace=1.5cm,
- \c!header=0cm,
- \c!footer=0cm,
- \c!width=\v!middle,
- \c!height=\v!middle]
-
-\setuppagenumbering
- [\c!alternative=\v!doublesided]
-
-\setupsetup
- [\c!criterium=\v!all]
-
-\setupframedtexts
- [setuptext]
- [\c!before=\blank,
- \c!after=\blank,
- \c!frame=\v!on,
- \c!rulethickness=1pt,
- \c!framecolor=TitleColor]
-
-\setupunderbar
- [\c!rulethickness=1pt,
- \c!rulecolor=TitleColor]
-
-\starttext
-
-\setupbackgrounds
- [\v!rightpage]
- [\c!background=cover]
-
-\setuplayout
- [titlepage]
-
-\startsetups text:commands
- \startinterface dutch \strut commando's \par \stopinterface
- \startinterface english \strut commands \par \stopinterface
- \startinterface german \strut befehle \par \stopinterface
- \startinterface french \strut commandes \par \stopinterface
- \startinterface czech \strut p\v{r}ikazy \par \stopinterface
- \startinterface italian \strut comandi \par \stopinterface
- \startinterface romanian \strut comenzile \par \stopinterface
-\stopsetups
-
-\startsetups text:uppercase
- \startinterface dutch NL\stopinterface
- \startinterface english EN\stopinterface
- \startinterface german DE\stopinterface
- \startinterface french FR\stopinterface
- \startinterface czech CS\stopinterface
- \startinterface italian IT\stopinterface
- \startinterface romanian RO\stopinterface
-\stopsetups
-
-\startsetups text:lowercase
- \startinterface dutch \strut nl / nederlands \par \stopinterface
- \startinterface english \strut en / english \par \stopinterface
- \startinterface german \strut de / deutsch \par \stopinterface
- \startinterface french \strut fr / fran\c{c}ais \par \stopinterface
- \startinterface czech \strut cs / \v{c}esk\'y \par \stopinterface
- \startinterface italian \strut it / italiano \par \stopinterface
- \startinterface romanian \strut ro / rom\^{a}n\u{a} \par \stopinterface
-\stopsetups
-
-\startmakeup[\v!standard]
- \dontcomplain
- \setupalign[\v!left]
- \startcolor[TitleColor]
- \definedfont[RegularBold at 100pt]\setstrut
- \strut Con\TeX t \par
- \definedfont[RegularBold at 50pt]\setstrut
- \setups[text:commands]
- \vfill
- \definedfont[RegularBold at 150pt]\setstrut
- \setups[text:uppercase]
- \stopcolor
-\stopmakeup
-
-\setuplayout % needed ?
-
-\setupbackgrounds
- [\v!rightpage]
- [\c!background=]
-
-\startmakeup[\v!standard]
- \dontcomplain
- \startcolor[TitleColor]
- \definedfont[RegularBold at 100pt]\setstrut
- \setupalign[\v!left]
- \strut Con\TeX t \par
- \definedfont[RegularBold at 50pt]\setstrut
- \setups[text:commands]
- \vfill
- \definedfont[RegularBold at 24pt]\setupinterlinespace
- \setups[text:lowercase]
- \par \strut \currentdate \par
- \stopcolor
-\stopmakeup
-
-\protect
-
-\placeeverysetup
-
-\unprotect
-
-\page[\v!yes,\v!blank,\v!right,\v!left]
-
-\setuplayout
- [titlepage]
-
-\setupbackgrounds
- [\v!leftpage]
- [\c!background=back]
-
-\startmakeup[\v!standard][\c!page=]
- \dontcomplain
- \startcolor[TitleColor]
- \definedfont[RegularBold at 24pt]\setupinterlinespace
- \setupalign[\v!left]
- \vfill
- PRAGMA ADE \par
- Ridderstraat 27 \par
- 8061GH Hasselt NL \par
- www.pragma-ade.com \par
- \stopcolor
-\stopmakeup
-
-\protect
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/x-sm2om.xsl b/Master/texmf-dist/tex/context/base/x-sm2om.xsl
deleted file mode 100644
index 93e1a12c549..00000000000
--- a/Master/texmf-dist/tex/context/base/x-sm2om.xsl
+++ /dev/null
@@ -1,233 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- This style sheet is used in the Math4All project. This project
- will provide an on-line math method for secondary and tertiary
- education. In addition to the web-bases content the project
- provides high quality typeset output as well.
-
- This style converts some elements to open math alternatives and
- its sole purpose is to easy the input of inline math.
-
- <i>x</i> identifier (use <v>x</v> when possible)
- <n>5</n> number
- <v>5</v> variable
- <r>1:2</r> interval (range)
- <r>x:y</r> interval (range) using variables
-
- This style is dedicated to Frits Spijkers, an open minded math
- author who patiently tested all the related TeX things.
-
- Hans Hagen, PRAGMA ADE, Hasselt NL / 2006-04-27
-
--->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
- <xsl:output method="xml"/>
-
- <xsl:template match="processing-instruction()"><xsl:copy/><xsl:text>
- </xsl:text></xsl:template>
-
- <xsl:template match="node()|@*" >
- <xsl:copy>
- <xsl:apply-templates select = "node()|@*" />
- </xsl:copy>
- </xsl:template>
-
- <xsl:template match="comment"></xsl:template>
-
- <xsl:variable name='openmath-to-content-mathml'><value-of select='$stylesheet-path'/>/x-openmath.xsl</xsl:variable>
-
- <xsl:template name='om-minus'>
- <OMS cd="arith1" name="unary_minus"/>
- </xsl:template>
- <xsl:template name='om-infinity'>
- <OMS cd="nums1" name="infinity"/>
- </xsl:template>
- <xsl:template name='om-interval-oo'>
- <OMS cd="interval1" name="interval_oo"/>
- </xsl:template>
- <xsl:template name='om-interval-oc'>
- <OMS cd="interval1" name="interval_oc"/>
- </xsl:template>
- <xsl:template name='om-interval-co'>
- <OMS cd="interval1" name="interval_co"/>
- </xsl:template>
- <xsl:template name='om-interval-cc'>
- <OMS cd="interval1" name="interval_cc"/>
- </xsl:template>
-
- <xsl:template name='om-kind-of-data'>
- <xsl:param name='arg'/>
- <xsl:choose>
- <xsl:when test="contains($arg,'/')">
- <xsl:element name="OMA">
- <xsl:element name="OMS">
- <xsl:attribute name="cd">nums1</xsl:attribute>
- <xsl:attribute name="name">rational</xsl:attribute>
- </xsl:element>
- <xsl:call-template name="om-kind-of-data">
- <xsl:with-param name='arg' select="substring-before($arg,'/')"/>
- </xsl:call-template>
- <xsl:call-template name="om-kind-of-data">
- <xsl:with-param name='arg' select="substring-after($arg,'/')"/>
- </xsl:call-template>
- </xsl:element>
- </xsl:when>
- <xsl:when test="contains($arg,'.') or contains($arg,',')">
- <xsl:element name="OMF">
- <xsl:attribute name="dec"><xsl:value-of select="$arg"/></xsl:attribute>
- </xsl:element>
- </xsl:when>
- <xsl:when test="number($arg)">
- <xsl:choose>
- <xsl:when test="contains($arg,'-')">
- <xsl:element name="OMA">
- <xsl:call-template name='om-minus'/>
- <xsl:element name="OMI">
- <xsl:value-of select="substring-after($arg,'-')"/>
- </xsl:element>
- </xsl:element>
- </xsl:when>
- <xsl:when test="contains($arg,'+')">
- <xsl:element name="OMI">
- <xsl:value-of select="substring-after($arg,'+')"/>
- </xsl:element>
- </xsl:when>
- <xsl:otherwise>
- <xsl:element name="OMI">
- <xsl:value-of select="$arg"/>
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:element name="OMV">
- <xsl:attribute name="name"><xsl:value-of select="$arg"/></xsl:attribute>
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match='i|n'>
- <xsl:element name="OMOBJ">
- <xsl:attribute name="style">inline</xsl:attribute>
- <xsl:attribute name="xmlns">http://www.openmath.org/OpenMath</xsl:attribute>
- <xsl:attribute name="version">2.0</xsl:attribute>
- <xsl:call-template name="om-kind-of-data">
- <xsl:with-param name='arg' select="text()"/>
- </xsl:call-template>
- </xsl:element>
- </xsl:template>
-
- <xsl:template match='v'>
- <xsl:element name="OMOBJ">
- <xsl:attribute name="style">inline</xsl:attribute>
- <xsl:attribute name="xmlns">http://www.openmath.org/OpenMath</xsl:attribute>
- <xsl:attribute name="version">2.0</xsl:attribute>
- <xsl:element name="OMV">
- <xsl:attribute name="name"><xsl:apply-templates/></xsl:attribute>
- </xsl:element>
- </xsl:element>
- </xsl:template>
-
- <!-- r a/b split in two parts -->
-
- <xsl:template match='r'>
- <xsl:element name="OMOBJ">
- <xsl:attribute name="style">inline</xsl:attribute>
- <xsl:attribute name="xmlns">http://www.openmath.org/OpenMath</xsl:attribute>
- <xsl:attribute name="version">2.0</xsl:attribute>
- <xsl:element name="OMA">
- <xsl:variable name='type'>
- <xsl:choose>
- <xsl:when test="@type=''">
- cc
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@type"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="@type='io'">
- <xsl:call-template name='om-interval-oo'/>
- <xsl:element name="OMA">
- <xsl:call-template name='om-minus'/>
- <xsl:call-template name='om-infinity'/>
- </xsl:element>
- <xsl:element name="OMI">
- <xsl:call-template name='om-kind-of-data'>
- <xsl:with-param name='arg' select='text()'/>
- </xsl:call-template>
- </xsl:element>
- </xsl:when>
- <xsl:when test="@type='oi'">
- <xsl:call-template name='om-interval-oo'/>
- <xsl:element name="OMI">
- <xsl:call-template name='om-kind-of-data'>
- <xsl:with-param name='arg' select='text()'/>
- </xsl:call-template>
- </xsl:element>
- <xsl:call-template name='om-infinity'/>
- </xsl:when>
- <xsl:when test="@type='ic'">
- <xsl:call-template name='om-interval-oc'/>
- <xsl:element name="OMA">
- <xsl:call-template name='om-minus'/>
- <xsl:call-template name='om-infinity'/>
- </xsl:element>
- <xsl:element name="OMI">
- <xsl:call-template name='om-kind-of-data'>
- <xsl:with-param name='arg' select='text()'/>
- </xsl:call-template>
- </xsl:element>
- </xsl:when>
- <xsl:when test="@type='ci'">
- <xsl:call-template name='om-interval-co'/>
- <xsl:element name="OMI">
- <xsl:call-template name='om-kind-of-data'>
- <xsl:with-param name='arg' select='text()'/>
- </xsl:call-template>
- </xsl:element>
- <xsl:call-template name='om-infinity'/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:element name="OMS">
- <xsl:attribute name="cd">interval1</xsl:attribute>
- <xsl:attribute name="name">interval_<xsl:value-of select="$type"/></xsl:attribute>
- </xsl:element>
- <xsl:call-template name="om-kind-of-data">
- <xsl:with-param name='arg' select="substring-before(text(),':')"/>
- </xsl:call-template>
- <xsl:call-template name="om-kind-of-data">
- <xsl:with-param name='arg' select="substring-after(text(),':')"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:element>
- </xsl:element>
- </xsl:template>
-
- <xsl:template match='c'>
- <xsl:element name="OMOBJ">
- <xsl:attribute name="style">inline</xsl:attribute>
- <xsl:attribute name="xmlns">http://www.openmath.org/OpenMath</xsl:attribute>
- <xsl:attribute name="version">2.0</xsl:attribute>
- <xsl:element name="OMA">
- <xsl:element name="OMS">
- <xsl:attribute name="cd">linalg3</xsl:attribute>
- <xsl:attribute name="name">vector</xsl:attribute>
- </xsl:element>
- <xsl:call-template name="om-kind-of-data">
- <xsl:with-param name='arg' select="substring-before(text(),':')"/>
- </xsl:call-template>
- <xsl:call-template name="om-kind-of-data">
- <xsl:with-param name='arg' select="substring-after(text(),':')"/>
- </xsl:call-template>
- </xsl:element>
- </xsl:element>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/Master/texmf-dist/tex/context/base/x-steps.mkii b/Master/texmf-dist/tex/context/base/x-steps.mkii
deleted file mode 100644
index 47141699a93..00000000000
--- a/Master/texmf-dist/tex/context/base/x-steps.mkii
+++ /dev/null
@@ -1,85 +0,0 @@
-%D \module
-%D [ file=m-steps,
-%D version=2001.05.28,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Step Charts \& Tables,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D The \XML\ interface:
-
-\usemodule[m][steps]
-
-\unprotect
-
-\defineXMLdirective [stepchart] [charts] \setupSTEPcharts
-\defineXMLdirective [stepchart] [cells] \setupSTEPcells
-\defineXMLdirective [stepchart] [texts] \setupSTEPtexts
-\defineXMLdirective [stepchart] [lines] \setupSTEPlines
-
-\defineXMLdirective [steptable] [tables] \setupSTEPtables
-\defineXMLdirective [steptable] [cells] \setupSTEPcells
-\defineXMLdirective [steptable] [texts] \setupSTEPtexts
-\defineXMLdirective [steptable] [lines] \setupSTEPlines
-
-\defineXMLpickup[stepchart][@@STPC]
- {\bgroup
- \defineXMLpush[top]%
- \defineXMLpush[bot]%
- \defineXMLenvironment[lines][@@STEL]
- {\expanded{\startlines[\theXMLarguments{@@STEL}]}}
- {\stoplines}%
- \defineXMLenvironment[cells][@@STEC]
- {\XMLerase{top}\XMLerase{bot}}
- {\expanded{\cells[\theXMLarguments{@@STEC}]{\XMLpop{top}}{\XMLpop{bot}}}}%
- \defineXMLenvironment[texts][@@STET]
- {\XMLerase{top}\XMLerase{bot}}
- {\expanded{\texts[\theXMLarguments{@@STET}]{\XMLpop{top}}{\XMLpop{bot}}}}%
- \defineXMLenvironmentpush[cell][@@STEC]
- {\XMLerase{cell}}
- {\expanded{\cell [\theXMLarguments{@@STEC}]{\XMLpop{cell}}}}%
- \defineXMLenvironmentpush [text] [@@STET]
- {\XMLerase{text}}
- {\expanded{\text [\theXMLarguments{@@STET}]{\XMLpop{text}}}}%
- \expanded{\startSTEPchart[\theXMLarguments{@@STPC}]}}
- {\stopSTEPchart
- \egroup}
-
-\defineXMLpickup[steptable][@@STPT]
- {\bgroup
- \defineXMLenvironment[lines][@@STEL]
- {\expanded{\startlines[\theXMLarguments{@@STEL}]}}
- {\stoplines}%
- \defineXMLargument[cell][@@STEC]
- {\expanded{\cell[\theXMLarguments{@@STEC}]}}%
- \defineXMLargument[text][@@STET]
- {\expanded{\text[\theXMLarguments{@@STET}]}}%
- \defineXMLargument[prep]
- {\prep}%
- \expanded{\startSTEPtable[\theXMLarguments{@@STPT}]}}
- {\stopSTEPtable
- \egroup}
-
-\defineXMLpickup[stepaligntable][@@STPT]
- {\bgroup
- \defineXMLenvironment[lines][@@STEL]
- {\expanded{\setupSTEPlines[\theXMLarguments{@@STEL}]}}
- {}%
- \defineXMLpush[c1]\defineXMLpush[c2]\defineXMLpush[c3]%
- \defineXMLenvironment[cells][@@STEC]
- {\XMLerase{c1}\XMLerase{c1}\XMLerase{c3}}
- {\expanded{\cells[\theXMLarguments{@@STEC}]{\XMLpop{c1}}{\XMLpop{c2}}{\XMLpop{c3}}}}%
- \defineXMLargument[text][@@STET]
- {\expanded{\text[\theXMLarguments{@@STET}]}}%
- \defineXMLargument[prep]
- {\prep}%
- \expanded{\startSTEPaligntable[\theXMLarguments{@@STPT}]}}
- {\stopSTEPaligntable
- \egroup}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/x-steps.mkiv b/Master/texmf-dist/tex/context/base/x-steps.mkiv
deleted file mode 100644
index 29b3f7eaa6e..00000000000
--- a/Master/texmf-dist/tex/context/base/x-steps.mkiv
+++ /dev/null
@@ -1,102 +0,0 @@
-%D \module
-%D [ file=m-steps,
-%D version=2001.05.28,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Step Charts \& Tables,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D The \XML\ interface. This module can be made way more efficient
-%D in \MKIV\ using textext but it makes only sense to do this when
-%D I really need it in a demanding application. Probably half of the
-%D code in m-steps.tex can go.
-
-\usemodule[m][steps]
-
-\unprotect
-
-\installcorenamespace {xmlstepchart}
-\installcorenamespace {xmlsteptable}
-
-\def\xmlstepchartdirective#1{\executeifdefined{\??xmlstepchart#1}\gobbletwoarguments} % {#2}{#3}
-\def\xmlsteptabledirective#1{\executeifdefined{\??xmlsteptable#1}\gobbletwoarguments} % {#2}{#3}
-
-\setvalue{\??xmlstepchart charts}{\setsomevalue\@@STPC}
-\setvalue{\??xmlstepchart cells}{\setsomevalue\@@STEC}
-\setvalue{\??xmlstepchart texts}{\setsomevalue\@@STET}
-\setvalue{\??xmlstepchart lines}{\setsomevalue\@@STEL}
-
-\setvalue{\??xmlsteptable tables}{\setsomevalue\@@STPT}
-\setvalue{\??xmlsteptable cells}{\setsomevalue\@@STEC}
-\setvalue{\??xmlsteptable texts}{\setsomevalue\@@STET}
-\setvalue{\??xmlsteptable lines}{\setsomevalue\@@STEL}
-
-\startxmlsetups xml:ct:define
- \xmlsetsetup {#1} {ct:*} {xml:ct:*}
- % \xmlsetsetup {#1} {ct:stepaligntable/cells} {xml:ct:stepaligntable:cells}
- % \xmlsetsetup {#1} {ct:stepaligntable/lines} {xml:ct:stepaligntable:lines}
-\stopxmlsetups
-
-\xmlregisterns{ct}{stepcharts}
-
-\xmlregistersetup{xml:ct:define}
-
-\startxmlsetups xml:ct:prep
- \expanded{\prep[\xmltoparameters{#1}]}{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups xml:ct:text
- \expanded{\text[\xmltoparameters{#1}]}{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups xml:ct:texts
- \expanded{\texts[\xmltoparameters{#1}]}{\xmltext{#1}{/top}} {\xmltext{#1}{/bot}}
-\stopxmlsetups
-
-\startxmlsetups xml:ct:cell
- \expanded{\cell[\xmltoparameters{#1}]}{\xmlflush{#1}}
-\stopxmlsetups
-
-\startxmlsetups xml:ct:cells
- \expanded{\cells[\xmltoparameters{#1}]}{\xmltext{#1}{/top}} {\xmltext{#1}{/bot}}
-\stopxmlsetups
-
-\startxmlsetups xml:ct:lines
- \expanded{\startlines[\xmltoparameters{#1}]}
- \xmlflush{#1}
- \stoplines
-\stopxmlsetups
-
-\startxmlsetups xml:ct:steptable
- \expanded{\startSTEPtable[\xmltoparameters{#1}]}
- \xmlflush{#1}
- \stopSTEPtable
-\stopxmlsetups
-
-\startxmlsetups xml:ct:stepchart
- \expanded{\startSTEPchart[\xmltoparameters{#1}]}
- \xmlflush{#1}
- \stopSTEPchart
-\stopxmlsetups
-
-% \startxmlsetups xml:ct:stepaligntable
-% \expanded{\startSTEPaligntable[\xmltoparameters{#1}]}
-% \xmlflush{#1}
-% \stopSTEPaligntable
-% \stopxmlsetups
-%
-% \startxmlsetups xml:ct:stepaligntable:cells
-% \expanded{\cells[\xmltoparameters{#1}]} {\xmltext{#1}{/ct:c1}} {\xmltext{#1}{/ct:c2}} {\xmltext{#1}{/ct:c3}}
-% \stopxmlsetups
-%
-% \startxmlsetups xml:ct:stepaligntable:lines
-% \expanded{\setupSTEPlines[\xmltoparameters{#1}]}
-% \xmlflush{#1}
-% \stopxmlsetups
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/x-udhr.mkiv b/Master/texmf-dist/tex/context/base/x-udhr.mkiv
deleted file mode 100644
index e081bfd5971..00000000000
--- a/Master/texmf-dist/tex/context/base/x-udhr.mkiv
+++ /dev/null
@@ -1,98 +0,0 @@
-%D \module
-%D [ file=x-udhr,
-%D version=2011.06.11,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Unicode Language Test Files,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D The XML files can be fetched from: \from[http://unicode.org/udhr/].
-
-\startmodule[udhr]
-
-\startxmlsetups udhr:basics
- \xmlsetsetup {#1} {*} {udhr:*}
-\stopxmlsetups
-
-\xmlregistersetup{udhr:basics}
-
-\startxmlsetups udhr:udhr
-
- \mainlanguage[\xmlatt{#1}{language}]
-
- \starttitle[title=\xmltext{#1}{/title}]
- \xmlfirst{#1}{/preamble}
- \xmlall{#1}{/article}
- \stoptitle
-
-\stopxmlsetups
-
-\startxmlsetups udhr:preamble
- \startsubject[title=\xmltext{#1}{/title}]
- \xmlall{#1}{/*)}
- \stopsubject
-\stopxmlsetups
-
-\startxmlsetups udhr:article
- \startsubject[title=\xmltext{#1}{/title}]
- \xmlall{#1}{/*)}
- \stopsubject
-\stopxmlsetups
-
-\startxmlsetups udhr:orderedlist
- \startitemize[n]
- \xmlflush{#1}
- \stopitemize
-\stopxmlsetups
-
-\startxmlsetups udhr:listitem
- \startitem
- \xmlflush{#1}
- \stopitem
-\stopxmlsetups
-
-\startxmlsetups udhr:para
- \xmlflush{#1}
- \par
-\stopxmlsetups
-
-\setupbodyfont
- [dejavu,10pt]
-
-\setuplayout
- [width-=middle,
- height=middle,
- footer=0cm,
- header=1.5cm]
-
-\setupwhitespace
- [big]
-
-\setuphead
- [chapter]
- [header=high,
- style=\bfb,
- align=middle]
-
-\setuphead
- [section]
- [style=\bfa,
- align=middle]
-
-\setuptolerance
- [verytolerant]
-
-\continueifinputfile{x-udhr.mkiv}
-
-% todo: when argument given then process it
-
-\starttext
- \xmlprocessfile{main}{udhr_nld.xml}{}
-\stoptext
-
-\stopmodule
diff --git a/Master/texmf-dist/tex/context/base/x-xfdf.mkiv b/Master/texmf-dist/tex/context/base/x-xfdf.mkiv
deleted file mode 100644
index 460220ed943..00000000000
--- a/Master/texmf-dist/tex/context/base/x-xfdf.mkiv
+++ /dev/null
@@ -1,72 +0,0 @@
-%D \module
-%D [ file=x-xfdf,
-%D version=2011.09.07,
-%D title=\CONTEXT\ XML Modules,
-%D subtitle=\XFDF,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D This is a revival of using \XFDF, but now in a more \MKIV-ish way. We
-%D supported it long ago already in \MKII\ but never used it at a large
-%D scale (not that much user interest anyway).
-
-\startmodule[xfdf]
-
-% see xfdf-001.xfdf and xfdf-001.tex
-
-% %D Possible speedup but hardly worth the trouble.
-%
-% \startluacode
-%
-% local hashes = { } table.setmetatableindex(hashes,function(t,k) local v = { } t[k] = v return v end)
-%
-% function xml.functions.xfdf_collect_values(root)
-% local hash = hashes[root]
-% for c in xml.collected(root,"/xfdf/fields/field/value") do
-% hash[xml.parent(c).at.name] = c
-% end
-% end
-%
-% function xml.functions.xfdf_get_values(root,name)
-% return hashes[root][name]
-% end
-%
-% function lxml.xfdf_get_values(root,name)
-% xml.sprint(hashes[lxml.id(root)][name])
-% end
-%
-% \stopluacode
-%
-% \def\xfdfvalue#1#2%
-% {\ctxlua{lxml.xfdf_get_values("#1","#2")}}
-
-\startxmlsetups xfdf:define
- \xmlsetsetup{#1}{*}{xfdf:*}
- % \xmlfilter {#1}{./function(xfdf_collect_values)}
-\stopxmlsetups
-
-\xmlregisterns{xfdf}{http://ns.adobe.com/xfdf/}
-
-\xmlregisterdocumentsetup{xfdf}{xfdf:define}
-
-\startxmlsetups xfdf:value
- \xmlflush{#1}
-\stopxmlsetups
-
-\def\xfdfload #1#2{\xmlloadonly{#1}{#2}{xfdf}}
-\def\xfdfvalue#1#2{\xmlfirst{#1}{/xfdf/fields/field[@name='#2']/value}}
-\def\xfdftext #1#2{\xmlfirst{#1}{/xfdf/fields/field[@name='#2']/value/paragraphs()}}
-
-% \startxmlsetups xfdf:b
-% \bold{\xmlflush{#1}}
-% \stopxmlsetups
-
-% \xfdfload {whatever}{xfdf-001.xfdf}
-% \xfdfvalue{whatever}{somefield}
-
-\stopmodule
diff --git a/Master/texmf-dist/tex/context/base/x-xml-01.mkii b/Master/texmf-dist/tex/context/base/x-xml-01.mkii
deleted file mode 100644
index 95ce51fc888..00000000000
--- a/Master/texmf-dist/tex/context/base/x-xml-01.mkii
+++ /dev/null
@@ -1,91 +0,0 @@
-%D \module
-%D [ file=x-xml-01,
-%D version=2001.10.10,
-%D title=\CONTEXT\ XML Style File,
-%D subtitle=Formatting X?? files,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% texexec --use=xml-format yourfile.x** [--mode=packed,wide]
-%
-% pdftotext yourfile.pdf yournewfile.x**
-
-\doifnothing {\inputfilename} {\end}
-\doiffileelse {\inputfilename} {} {\end}
-
-% The following makes pdftotext too slow:
-%
-% \definepapersize
-% [mine]
-% [height=.99\maxdimen,
-% width=200cm]
-%
-% \setuppapersize
-% [mine]
-% [mine]
-%
-% \setupbodyfont
-% [0.4pt,tt]
-%
-% this is faster
-%
-% \setuppapersize
-% [A0][A0]
-%
-% but normal A4 combined with 1 pt font size is the best
-%
-% An alternative is to use a small size, but this leads to
-% too many messages
-%
-% \setupbodyfont
-% [1pt,tt]
-%
-% so we stick to a more normal alternive.
-
-\unprotect
-
-\setuplayout
- [\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!verytolerant]
-\setupalign [\v!broad,\v!right]
-\setupXMLfile [\c!level=2]
-
-\startmode[wide]
-
- \setuplayout [\c!width=250cm]
-
-\stopmode
-
-\startmode[packed]
-
-% \setupXMLfile [inbetween=]
- \setupXMLfile [\c!tussen=]
-
-\stopmode
-
-\protect
-
-% The main text:
-
-\def\XMLbannerprocessor#1{\string<\string ?xml #1\string ?\string>\endgraf}
-
-\defineXMLprocessor [xml] {\XMLbannerprocessor}
-
-\starttext
-
- \dontcomplain \showXMLfile{\inputfilename}
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/x-xml-02.mkii b/Master/texmf-dist/tex/context/base/x-xml-02.mkii
deleted file mode 100644
index e33ab9ee4ce..00000000000
--- a/Master/texmf-dist/tex/context/base/x-xml-02.mkii
+++ /dev/null
@@ -1,91 +0,0 @@
-%D \module
-%D [ file=x-xml-02,
-%D version=2001.10.10,
-%D title=\CONTEXT\ XML Style File,
-%D subtitle=Pretty Printing,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%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}
-
-\startmode[letter]
- \setuppapersize[letter][letter]
-\stopmode
-
-\setuplayout
- [backspace=1.5cm,
- topspace=1.5cm,
- bottomspace=1cm,
- width=middle,
- height=middle,
- header=1.5cm,
- footer=1.5cm]
-
-\setupcolors
- [state=local]
-
-\setuppagenumbering
- [location=]
-
-\setuplayout
- [style=type]
-
-\setupbodyfont
- [10pt,tt]
-
-\setuptolerance
- [verytolerant]
-
-\setupalign
- [broad,right]
-
-\lowercasestring\inputfilename \to \lcinputfilename
-\defconvertedcommand\lcinputfilename\lcinputfilename % make _ safe
-
-\setupheadertexts
- [\lcinputfilename]
-
-\setupfootertexts
- [\currentdate\space\string| \currenttime\space \string| \pagenumber]
-
-% let's have a look at the type of content:
-
-\setupXMLfile
- [level=2]
-
-\startmode[*suffix-xml]
- % ok
-\stopmode
-
-\startmode[*suffix-rng]
- \showXMLlin[value]
-\stopmode
-
-\startmode[*suffix-rlg]
- \showXMLlin
- [rl:type,rl:state,rl:name,rl:suffix,rl:label,rl:file,rl:original,
- rl:width,rl:height,rl:base,rl:page]
-\stopmode
-
-\startmode[*suffix-exa]
- \showXMLlin
- [exa:resolve,exa:include]
-\stopmode
-
-\def\XMLbannerprocessor#1{\string<\string ?xml #1\string ?\string>\endgraf}
-
-\defineXMLprocessor [xml] {\XMLbannerprocessor}
-
-\starttext
-
-\showXMLfile{\inputfilename}
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/x-xml-11.mkii b/Master/texmf-dist/tex/context/base/x-xml-11.mkii
deleted file mode 100644
index 047561370e9..00000000000
--- a/Master/texmf-dist/tex/context/base/x-xml-11.mkii
+++ /dev/null
@@ -1,134 +0,0 @@
-%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 ADE \& \CONTEXT\ Development Team}]
-%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}
-
-\doifnothing {\jobfullname} {\end}
-\doiffileelse {\jobfullname} {} {\end}
-
-\useXMLfilter[ent]
-\useXMLfilter[utf]
-
-\chardef\XMLtokensreduction\plustwo
-
-\definehead
- [SomeElement]
- [subsection]
-
-\setuphead
- [SomeElement]
- [ownnumber=yes,
- style=\tfb,
- numberstyle=\tfxx,
- alternative=margin]
-
-\setuplayout
- [width=middle,
- height=middle,
- backspace=2cm,
- cutspace=1cm,
- topspace=1cm,
- header=0pt]
-
-\setupfootertexts
- [\jobfullname] % [\inputfilename]
-
-\usetypescript[modern][texnansi] \setupbodyfont[modern,tt,10pt]
-
-\defineXMLenvironment
- [document]
- {}
- {}
-
-\defineXMLpickup
- [entities][n=0]
- {\expanded{\SomeElement{\XMLop{n}}{Entities}}
- \starttabulate[|l|l|l|]}
- {\stoptabulate}
-
-\defineXMLcommand % ugly hack (make macro of it)
- [entity][name=,n=0]
- {\startexpanded
- \noexpand \NC \XMLop{name}
- \noexpand \NC \XMLop{n}
- \noexpand \NC \noexpand\doXMLentity\XMLop{name};
- \noexpand \NC
- \noexpand \NR
- \stopexpanded}
-
-\defineXMLpickup
- [characters][n=0]
- {\expanded{\SomeElement{\XMLop{n}}{Characters}}
- \bgroup
- \let\nonbreakablespace\empty % messes up the table
- \starttabulate[|l|r|r|l|l|l|l|]}
- {\stoptabulate
- \egroup}
-
-% todo: narrowtt
-
-\defineXMLcommand
- [character][number=,utf=,n=0,uname=,pname=,cname=]
- {\startexpanded
- \noexpand \NC \noexpand \unicodehexnumber{\XMLop{number}}
- \noexpand \NC \XMLop{number}
- \noexpand \NC \XMLop{n}
- \noexpand \NC \noexpand \unicodechar {\XMLop{number}}
- \noexpand \NC \tx \lowercase\expandafter{\XMLop{uname}}
- \noexpand \NC \tx \noexpand \unicodepair {\XMLop{number}}
- \noexpand \NC \tx \XMLop{cname}
- \noexpand \NC
- \noexpand \NR
- \stopexpanded}
-
-\defineXMLenvironment
- [elements]
- {}
- {}
-
-\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}
-\processXMLfilegrouped{\jobfullname}
-
-\stoptext
diff --git a/Master/texmf-dist/tex/context/base/x-xtag.mkiv b/Master/texmf-dist/tex/context/base/x-xtag.mkiv
deleted file mode 100644
index ab95c567eec..00000000000
--- a/Master/texmf-dist/tex/context/base/x-xtag.mkiv
+++ /dev/null
@@ -1,90 +0,0 @@
-%D \module
-%D [ file=x-xtag,
-%D version=2009.09.23,
-%D title=\CONTEXT\ Modules,
-%D subtitle=\XML\ stream handler,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D Here we load the \MKII\ (mostly) streaming \XML\ parser. We
-%D define a couple of catcode regimes first.
-
-\endinput
-
-\writestatus{xtag}{this module is obsolete, use the mkiv-xml features or use mkii instead}
-
-%D Well, at this time (2011.12.28) I'm not sure if this code still works in
-%D \MKIV. But in any case we move snippets here that are only needed for old
-%D \MKII\ code.
-
-\unprotect
-
-\newif\ifforcefileexpansion % handy for document level overload
-
-\def\installexpander#1#2#3% changed, no longer \convert..\to...
- {\setvalue{\s!do\c!expansion#1l}{#2}%
- \setvalue{\s!do\c!expansion#1g}{#3}}%
-
-\def\doconvertexpanded#1#2#3% #4 % [l|g] \cs {kind} {data}
- {\csname % that we assign all exp a value
- \s!do\c!expansion
- \ifforcefileexpansion
- \v!yes
- \else\ifcsname\s!do\c!expansion#3#1\endcsname
- #3%
- \else
- \s!default
- \fi\fi
- #1%
- \endcsname#2}% #3
-
-\def\defconvertexpanded {\doconvertexpanded l}
-\def\gdefconvertexpanded{\doconvertexpanded g}
-
-\installexpander\v!command \defconvertedcommand \gdefconvertedcommand
-\installexpander\s!default \defconvertedargument \gdefconvertedargument
-\installexpander\empty \defconvertedargument \gdefconvertedargument
-\installexpander\v!no \defconvertedargument \gdefconvertedargument
-\installexpander\v!yes \defconvertedmeaning \gdefconvertedmeaning
-\installexpander\v!yes \defconvertedmeaning \gdefconvertedmeaning
-\installexpander\v!strict \defreducedargument \gdefreducedargument
-\installexpander {utf} \defreducedtoutf \gdefreducedtoutf
-
-\def\dodefconvertedmeaning#1#2#3% watch the double expansion !
- {\bgroup
- \xdef\@@globalexpanded{#3}%
- \xdef\@@globalexpanded{\@@globalexpanded}%
- \egroup
- #1#2\@@globalexpanded}
-
-\def\defconvertedmeaning {\dodefconvertedmeaning\defconvertedcommand}
-\def\gdefconvertedmeaning{\dodefconvertedmeaning\gdefconvertedcommand}
-
-\def\dodefreducedargument#1#2#3%
- {\begingroup
- \reducetocoding[raw]%
- \edef\ascii{#3}%
- \expandafter\endgroup\expandafter#1\expandafter#2\expandafter{\ascii}}
-
-\def\defreducedargument {\dodefreducedargument\edef}
-\def\gdefreducedargument{\dodefreducedargument\xdef}
-
-\protect
-
-%D The \XML\ modules.
-
-\loadmarkfile{catc-xml}
-
-\loadcorefile{xtag-ini.mkii}
-\loadcorefile{xtag-ext.mkii}
-\loadcorefile{xtag-exp.mkii}
-\loadcorefile{xtag-pre.mkii} % has old encoding code
-\loadcorefile{xtag-xsd.mkii} % will go away (stub anyway)
-\loadcorefile{xtag-rng.mkii} % will go away (stub anyway)
-
-\endinput