summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-11-01 12:10:24 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-11-01 12:10:24 +0100
commit5fd6625a09421c86f7bf27efaff9a64cc5cf3d0f (patch)
tree32c7f9643a7edc077bbce72414afc7ab52e61ac7 /tex
parent7fc4b935d045c84e89459e726ff54ae331e4c574 (diff)
downloadcontext-5fd6625a09421c86f7bf27efaff9a64cc5cf3d0f.tar.gz
2017-11-01 12:01:00
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkiv/anch-pgr.mkiv2
-rw-r--r--tex/context/base/mkiv/anch-pos.mkiv2
-rw-r--r--tex/context/base/mkiv/attr-col.mkiv2
-rw-r--r--tex/context/base/mkiv/attr-eff.mkiv2
-rw-r--r--tex/context/base/mkiv/attr-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/attr-lay.mkiv2
-rw-r--r--tex/context/base/mkiv/attr-mkr.mkiv2
-rw-r--r--tex/context/base/mkiv/attr-neg.mkiv2
-rw-r--r--tex/context/base/mkiv/back-exp.mkiv2
-rw-r--r--tex/context/base/mkiv/back-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/back-pdf.lua2
-rw-r--r--tex/context/base/mkiv/back-pdf.mkiv42
-rw-r--r--tex/context/base/mkiv/bibl-bib.mkiv2
-rw-r--r--tex/context/base/mkiv/bibl-tra.mkiv2
-rw-r--r--tex/context/base/mkiv/blob-ini.mkiv4
-rw-r--r--tex/context/base/mkiv/buff-imp-default.mkiv2
-rw-r--r--tex/context/base/mkiv/buff-imp-escaped.mkiv2
-rw-r--r--tex/context/base/mkiv/buff-imp-lua.mkiv2
-rw-r--r--tex/context/base/mkiv/buff-imp-mp.mkiv2
-rw-r--r--tex/context/base/mkiv/buff-imp-nested.mkiv2
-rw-r--r--tex/context/base/mkiv/buff-imp-parsed-xml.mkiv2
-rw-r--r--tex/context/base/mkiv/buff-imp-tex.mkiv2
-rw-r--r--tex/context/base/mkiv/buff-imp-xml.mkiv2
-rw-r--r--tex/context/base/mkiv/buff-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/buff-par.mkvi2
-rw-r--r--tex/context/base/mkiv/buff-ver.mkiv2
-rw-r--r--tex/context/base/mkiv/catc-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/char-enc.mkiv2
-rw-r--r--tex/context/base/mkiv/char-ini.mkiv8
-rw-r--r--tex/context/base/mkiv/char-utf.mkiv8
-rw-r--r--tex/context/base/mkiv/chem-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/chem-str.mkiv2
-rw-r--r--tex/context/base/mkiv/cldf-bas.mkiv4
-rw-r--r--tex/context/base/mkiv/cldf-com.mkiv4
-rw-r--r--tex/context/base/mkiv/cldf-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/cldf-int.mkiv2
-rw-r--r--tex/context/base/mkiv/cldf-ver.mkiv2
-rw-r--r--tex/context/base/mkiv/colo-icc.lua9
-rw-r--r--tex/context/base/mkiv/colo-ini.mkiv4
-rw-r--r--tex/context/base/mkiv/colo-run.mkiv2
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/cont-run.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/core-con.mkiv2
-rw-r--r--tex/context/base/mkiv/core-ctx.mkiv2
-rw-r--r--tex/context/base/mkiv/core-dat.mkiv2
-rw-r--r--tex/context/base/mkiv/core-env.mkiv2
-rw-r--r--tex/context/base/mkiv/core-sys.mkiv2
-rw-r--r--tex/context/base/mkiv/core-two.mkiv2
-rw-r--r--tex/context/base/mkiv/core-uti.mkiv2
-rw-r--r--tex/context/base/mkiv/data-use.lua5
-rw-r--r--tex/context/base/mkiv/file-ini.mkvi2
-rw-r--r--tex/context/base/mkiv/file-job.lua2
-rw-r--r--tex/context/base/mkiv/file-job.mkvi2
-rw-r--r--tex/context/base/mkiv/file-lib.mkvi2
-rw-r--r--tex/context/base/mkiv/file-mod.mkvi2
-rw-r--r--tex/context/base/mkiv/file-res.mkvi2
-rw-r--r--tex/context/base/mkiv/file-syn.mkvi2
-rw-r--r--tex/context/base/mkiv/font-chk.mkiv2
-rw-r--r--tex/context/base/mkiv/font-col.mkvi2
-rw-r--r--tex/context/base/mkiv/font-dsp.lua33
-rw-r--r--tex/context/base/mkiv/font-gds.mkvi2
-rw-r--r--tex/context/base/mkiv/font-lib.mkvi119
-rw-r--r--tex/context/base/mkiv/font-map.lua17
-rw-r--r--tex/context/base/mkiv/font-one.lua4
-rw-r--r--tex/context/base/mkiv/font-otr.lua3
-rw-r--r--tex/context/base/mkiv/font-sel.mkvi2
-rw-r--r--tex/context/base/mkiv/font-sol.mkvi2
-rw-r--r--tex/context/base/mkiv/font-ttf.lua80
-rw-r--r--tex/context/base/mkiv/grph-epd.mkiv2
-rw-r--r--tex/context/base/mkiv/grph-inc.mkiv12
-rw-r--r--tex/context/base/mkiv/grph-pat.mkiv2
-rw-r--r--tex/context/base/mkiv/grph-raw.mkiv2
-rw-r--r--tex/context/base/mkiv/grph-rul.mkiv2
-rw-r--r--tex/context/base/mkiv/java-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/l-bit32.lua148
-rw-r--r--tex/context/base/mkiv/l-lua.lua32
-rw-r--r--tex/context/base/mkiv/l-macro-imp-optimize.lua63
-rw-r--r--tex/context/base/mkiv/l-macro.lua225
-rw-r--r--tex/context/base/mkiv/l-math.lua120
-rw-r--r--tex/context/base/mkiv/l-number.lua166
-rw-r--r--tex/context/base/mkiv/l-package.lua5
-rw-r--r--tex/context/base/mkiv/l-unicode.lua85
-rw-r--r--tex/context/base/mkiv/lang-hyp.mkiv4
-rw-r--r--tex/context/base/mkiv/lang-ini.mkiv6
-rw-r--r--tex/context/base/mkiv/lang-lab.mkiv4
-rw-r--r--tex/context/base/mkiv/lang-rep.mkiv2
-rw-r--r--tex/context/base/mkiv/lang-url.mkiv2
-rw-r--r--tex/context/base/mkiv/lang-wrd.mkiv2
-rw-r--r--tex/context/base/mkiv/layo-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/lpdf-ini.lua17
-rw-r--r--tex/context/base/mkiv/luat-bas.mkiv61
-rw-r--r--tex/context/base/mkiv/luat-cod.lua16
-rw-r--r--tex/context/base/mkiv/luat-cod.mkiv4
-rw-r--r--tex/context/base/mkiv/luat-env.lua12
-rw-r--r--tex/context/base/mkiv/luat-lib.mkiv130
-rw-r--r--tex/context/base/mkiv/luat-usr.mkiv2
-rw-r--r--tex/context/base/mkiv/lxml-css.mkiv2
-rw-r--r--tex/context/base/mkiv/lxml-ctx.mkiv2
-rw-r--r--tex/context/base/mkiv/lxml-ini.mkiv18
-rw-r--r--tex/context/base/mkiv/lxml-sor.mkiv2
-rw-r--r--tex/context/base/mkiv/m-fonts-plugins.mkiv4
-rw-r--r--tex/context/base/mkiv/math-frc.mkiv2
-rw-r--r--tex/context/base/mkiv/math-ini.mkiv26
-rw-r--r--tex/context/base/mkiv/math-map.lua6
-rw-r--r--tex/context/base/mkiv/math-noa.lua6
-rw-r--r--tex/context/base/mkiv/meta-fnt.mkiv2
-rw-r--r--tex/context/base/mkiv/meta-fun.mkiv2
-rw-r--r--tex/context/base/mkiv/meta-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/meta-lua.mkiv2
-rw-r--r--tex/context/base/mkiv/meta-pdf.mkiv2
-rw-r--r--tex/context/base/mkiv/meta-pdh.mkiv2
-rw-r--r--tex/context/base/mkiv/meta-tex.mkiv2
-rw-r--r--tex/context/base/mkiv/mlib-ctx.mkiv8
-rw-r--r--tex/context/base/mkiv/mlib-pdf.mkiv2
-rw-r--r--tex/context/base/mkiv/mlib-pps.mkiv2
-rw-r--r--tex/context/base/mkiv/mult-aux.mkiv2
-rw-r--r--tex/context/base/mkiv/mult-chk.mkiv2
-rw-r--r--tex/context/base/mkiv/mult-fun.lua2
-rw-r--r--tex/context/base/mkiv/mult-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/node-bck.mkiv2
-rw-r--r--tex/context/base/mkiv/node-fin.mkiv4
-rw-r--r--tex/context/base/mkiv/node-ini.mkiv40
-rw-r--r--tex/context/base/mkiv/node-mig.mkiv2
-rw-r--r--tex/context/base/mkiv/node-pag.mkiv2
-rw-r--r--tex/context/base/mkiv/node-rul.mkiv2
-rw-r--r--tex/context/base/mkiv/pack-obj.mkiv2
-rw-r--r--tex/context/base/mkiv/pack-rul.mkiv2
-rw-r--r--tex/context/base/mkiv/page-cst.mkiv2
-rw-r--r--tex/context/base/mkiv/page-flt.mkiv2
-rw-r--r--tex/context/base/mkiv/page-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/page-inj.mkvi2
-rw-r--r--tex/context/base/mkiv/page-ins.mkiv2
-rw-r--r--tex/context/base/mkiv/page-lin.mkvi2
-rw-r--r--tex/context/base/mkiv/page-mix.mkiv2
-rw-r--r--tex/context/base/mkiv/page-otr.mkvi2
-rw-r--r--tex/context/base/mkiv/page-pst.mkiv2
-rw-r--r--tex/context/base/mkiv/page-run.mkiv2
-rw-r--r--tex/context/base/mkiv/page-str.mkiv2
-rw-r--r--tex/context/base/mkiv/publ-imp-apa.mkvi26
-rw-r--r--tex/context/base/mkiv/publ-ini.lua40
-rw-r--r--tex/context/base/mkiv/publ-ini.mkiv18
-rw-r--r--tex/context/base/mkiv/publ-tra.mkiv2
-rw-r--r--tex/context/base/mkiv/regi-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/scrn-but.mkvi2
-rw-r--r--tex/context/base/mkiv/scrn-fld.mkvi2
-rw-r--r--tex/context/base/mkiv/scrn-hlp.mkvi2
-rw-r--r--tex/context/base/mkiv/scrn-ini.mkvi2
-rw-r--r--tex/context/base/mkiv/scrn-pag.mkvi2
-rw-r--r--tex/context/base/mkiv/scrn-ref.mkvi2
-rw-r--r--tex/context/base/mkiv/scrn-wid.mkvi2
-rw-r--r--tex/context/base/mkiv/scrp-ini.mkiv8
-rw-r--r--tex/context/base/mkiv/sort-ini.mkiv4
-rw-r--r--tex/context/base/mkiv/spac-adj.mkiv2
-rw-r--r--tex/context/base/mkiv/spac-ali.mkiv2
-rw-r--r--tex/context/base/mkiv/spac-chr.mkiv2
-rw-r--r--tex/context/base/mkiv/spac-hor.mkiv2
-rw-r--r--tex/context/base/mkiv/spac-prf.mkvi2
-rw-r--r--tex/context/base/mkiv/spac-ver.mkiv2
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin25838 -> 25792 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin249883 -> 249879 bytes
-rw-r--r--tex/context/base/mkiv/strc-bkm.mkiv2
-rw-r--r--tex/context/base/mkiv/strc-blk.mkiv2
-rw-r--r--tex/context/base/mkiv/strc-con.mkvi2
-rw-r--r--tex/context/base/mkiv/strc-def.mkiv2
-rw-r--r--tex/context/base/mkiv/strc-doc.mkiv2
-rw-r--r--tex/context/base/mkiv/strc-flt.mkvi2
-rw-r--r--tex/context/base/mkiv/strc-ini.mkvi2
-rw-r--r--tex/context/base/mkiv/strc-itm.mkvi2
-rw-r--r--tex/context/base/mkiv/strc-lev.mkvi2
-rw-r--r--tex/context/base/mkiv/strc-lst.mkvi2
-rw-r--r--tex/context/base/mkiv/strc-mar.mkiv2
-rw-r--r--tex/context/base/mkiv/strc-mat.mkiv2
-rw-r--r--tex/context/base/mkiv/strc-not.mkvi2
-rw-r--r--tex/context/base/mkiv/strc-num.mkiv2
-rw-r--r--tex/context/base/mkiv/strc-pag.mkiv2
-rw-r--r--tex/context/base/mkiv/strc-ref.mkvi6
-rw-r--r--tex/context/base/mkiv/strc-reg.mkiv2
-rw-r--r--tex/context/base/mkiv/strc-syn.mkiv2
-rw-r--r--tex/context/base/mkiv/strc-tag.mkiv2
-rw-r--r--tex/context/base/mkiv/supp-box.mkiv2
-rw-r--r--tex/context/base/mkiv/supp-ran.mkiv2
-rw-r--r--tex/context/base/mkiv/symb-emj.mkiv2
-rw-r--r--tex/context/base/mkiv/symb-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/syst-aux.mkiv2
-rw-r--r--tex/context/base/mkiv/syst-con.mkiv2
-rw-r--r--tex/context/base/mkiv/syst-lua.mkiv2
-rw-r--r--tex/context/base/mkiv/tabl-tbl.mkiv2
-rw-r--r--tex/context/base/mkiv/tabl-xtb.mkvi2
-rw-r--r--tex/context/base/mkiv/task-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/toks-ini.mkiv8
-rw-r--r--tex/context/base/mkiv/toks-map.mkiv2
-rw-r--r--tex/context/base/mkiv/toks-tra.mkiv2
-rw-r--r--tex/context/base/mkiv/trac-ctx.mkiv2
-rw-r--r--tex/context/base/mkiv/trac-deb.mkiv4
-rw-r--r--tex/context/base/mkiv/trac-jus.mkiv2
-rw-r--r--tex/context/base/mkiv/trac-tex.mkiv2
-rw-r--r--tex/context/base/mkiv/trac-vis.lua50
-rw-r--r--tex/context/base/mkiv/trac-vis.mkiv2
-rw-r--r--tex/context/base/mkiv/type-ini.mkvi2
-rw-r--r--tex/context/base/mkiv/typo-bld.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-brk.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-cap.lua15
-rw-r--r--tex/context/base/mkiv/typo-cap.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-chr.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-cln.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-dha.lua1
-rw-r--r--tex/context/base/mkiv/typo-dig.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-dir.lua6
-rw-r--r--tex/context/base/mkiv/typo-dir.mkiv10
-rw-r--r--tex/context/base/mkiv/typo-drp.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-fkr.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-fln.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-inj.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-itc.mkvi2
-rw-r--r--tex/context/base/mkiv/typo-krn.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-lan.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-lin.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-mar.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-pag.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-par.mkiv4
-rw-r--r--tex/context/base/mkiv/typo-prc.mkvi4
-rw-r--r--tex/context/base/mkiv/typo-rep.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-rub.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-spa.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-sus.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-tal.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-txt.mkvi2
-rw-r--r--tex/context/base/mkiv/typo-wrp.mkiv2
-rw-r--r--tex/context/base/mkiv/unic-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/util-fil.lua42
-rw-r--r--tex/context/base/mkiv/util-lua.lua15
-rw-r--r--tex/context/interface/mkiv/context-en.xml192
-rw-r--r--tex/context/interface/mkiv/i-boxes.xml134
-rw-r--r--tex/context/interface/mkiv/i-capitals.xml2
-rw-r--r--tex/context/interface/mkiv/i-color.xml4
-rw-r--r--tex/context/interface/mkiv/i-columns.xml4
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin839263 -> 839408 bytes
-rw-r--r--tex/context/interface/mkiv/i-counter.xml2
-rw-r--r--tex/context/interface/mkiv/i-floats.xml2
-rw-r--r--tex/context/interface/mkiv/i-fonts.xml2
-rw-r--r--tex/context/interface/mkiv/i-hspace.xml2
-rw-r--r--tex/context/interface/mkiv/i-margindata.xml2
-rw-r--r--tex/context/interface/mkiv/i-math.xml6
-rw-r--r--tex/context/interface/mkiv/i-metapost.xml4
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin60775 -> 60775 bytes
-rw-r--r--tex/context/interface/mkiv/i-system.xml30
-rw-r--r--tex/context/interface/mkiv/i-tex.xml457
-rw-r--r--tex/context/interface/mkiv/i-translate.xml4
-rw-r--r--tex/context/modules/mkiv/m-database.mkiv2
-rw-r--r--tex/context/modules/mkiv/m-escrito.mkiv2
-rw-r--r--tex/context/modules/mkiv/m-markdown.mkiv2
-rw-r--r--tex/context/modules/mkiv/m-matrix.mkiv2
-rw-r--r--tex/context/modules/mkiv/m-media.mkiv12
-rw-r--r--tex/context/modules/mkiv/m-nodechart.mkvi2
-rw-r--r--tex/context/modules/mkiv/m-punk.mkiv5
-rw-r--r--tex/context/modules/mkiv/m-spreadsheet.mkiv2
-rw-r--r--tex/context/modules/mkiv/x-html.mkiv2
-rw-r--r--tex/context/modules/mkiv/x-setups-basics.mkiv6
-rw-r--r--tex/generic/context/luatex/luatex-core.lua146
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua237
264 files changed, 2338 insertions, 1106 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index fb24a8705..188ed8a6e 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2017.10.29 15:44}
+\newcontextversion{2017.11.01 11:55}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/mkii/context.mkii b/tex/context/base/mkii/context.mkii
index 9bdd54063..063737437 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2017.10.29 15:44}
+\edef\contextversion{2017.11.01 11:55}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/anch-pgr.mkiv b/tex/context/base/mkiv/anch-pgr.mkiv
index 1a583142e..e49d18b8f 100644
--- a/tex/context/base/mkiv/anch-pgr.mkiv
+++ b/tex/context/base/mkiv/anch-pgr.mkiv
@@ -16,7 +16,7 @@
%D Before we come to graphics support, we have to make sure of the reference point
%D on the page. The next macros do so and are hooked into the page building routine.
-\registerctxluafile{anch-pgr}{1.001}
+\registerctxluafile{anch-pgr}{}
\unprotect
diff --git a/tex/context/base/mkiv/anch-pos.mkiv b/tex/context/base/mkiv/anch-pos.mkiv
index 8b33dfce8..ab199eb1e 100644
--- a/tex/context/base/mkiv/anch-pos.mkiv
+++ b/tex/context/base/mkiv/anch-pos.mkiv
@@ -17,7 +17,7 @@
%D early, but starting in 2012 more dramatic changes started to happen, especially
%D in relation to background graphics. It will probably take some time to settle.
-\registerctxluafile{anch-pos}{1.001}
+\registerctxluafile{anch-pos}{}
\unprotect
diff --git a/tex/context/base/mkiv/attr-col.mkiv b/tex/context/base/mkiv/attr-col.mkiv
index 6231755e9..db4eea9e9 100644
--- a/tex/context/base/mkiv/attr-col.mkiv
+++ b/tex/context/base/mkiv/attr-col.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Attribute Macros / Color}
-\registerctxluafile{attr-col}{1.001}
+\registerctxluafile{attr-col}{}
\unprotect
diff --git a/tex/context/base/mkiv/attr-eff.mkiv b/tex/context/base/mkiv/attr-eff.mkiv
index 859814ebc..66721aa5e 100644
--- a/tex/context/base/mkiv/attr-eff.mkiv
+++ b/tex/context/base/mkiv/attr-eff.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Attribute Macros / Effects}
-\registerctxluafile{attr-eff}{1.001}
+\registerctxluafile{attr-eff}{}
\unprotect
diff --git a/tex/context/base/mkiv/attr-ini.mkiv b/tex/context/base/mkiv/attr-ini.mkiv
index 77959c988..d537cebfa 100644
--- a/tex/context/base/mkiv/attr-ini.mkiv
+++ b/tex/context/base/mkiv/attr-ini.mkiv
@@ -19,7 +19,7 @@
\unprotect
-\registerctxluafile{attr-ini}{1.001}
+\registerctxluafile{attr-ini}{}
\installcorenamespace{attributecount} % the counter representing the attribute (attrdef'd)
\installcorenamespace{attributeid} % the internal number
diff --git a/tex/context/base/mkiv/attr-lay.mkiv b/tex/context/base/mkiv/attr-lay.mkiv
index 14ef4a6d4..ae5c12f97 100644
--- a/tex/context/base/mkiv/attr-lay.mkiv
+++ b/tex/context/base/mkiv/attr-lay.mkiv
@@ -22,7 +22,7 @@
\unprotect
-\registerctxluafile{attr-lay}{1.001}
+\registerctxluafile{attr-lay}{}
% needs to work over stopitemize grouping etc
diff --git a/tex/context/base/mkiv/attr-mkr.mkiv b/tex/context/base/mkiv/attr-mkr.mkiv
index c8818ebae..544558dcf 100644
--- a/tex/context/base/mkiv/attr-mkr.mkiv
+++ b/tex/context/base/mkiv/attr-mkr.mkiv
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{attr-mkr}{1.001}
+\registerctxluafile{attr-mkr}{}
\unexpanded\def\definemarker [#1]{\defineattribute[\s!marker:#1]}
\unexpanded\def\setmarker [#1]#2[#3]{\dosetattribute{\s!marker:#1}{#3}}
diff --git a/tex/context/base/mkiv/attr-neg.mkiv b/tex/context/base/mkiv/attr-neg.mkiv
index ff1f52a96..465f2b2e7 100644
--- a/tex/context/base/mkiv/attr-neg.mkiv
+++ b/tex/context/base/mkiv/attr-neg.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Attribute Macros / Negation}
-\registerctxluafile{attr-neg}{1.001}
+\registerctxluafile{attr-neg}{}
\unprotect
diff --git a/tex/context/base/mkiv/back-exp.mkiv b/tex/context/base/mkiv/back-exp.mkiv
index 4cab46bdd..6803c2a92 100644
--- a/tex/context/base/mkiv/back-exp.mkiv
+++ b/tex/context/base/mkiv/back-exp.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Backend Macros / XML export}
-\registerctxluafile{back-exp.lua}{1.001}
+\registerctxluafile{back-exp}{}
%D This is an experimental exporter and a logical follow up on tagging. The
%D exporter assumes a properly tagged document. Some elements get a couple
diff --git a/tex/context/base/mkiv/back-ini.mkiv b/tex/context/base/mkiv/back-ini.mkiv
index 9859f026a..e810ecde5 100644
--- a/tex/context/base/mkiv/back-ini.mkiv
+++ b/tex/context/base/mkiv/back-ini.mkiv
@@ -16,7 +16,7 @@
\writestatus{loading}{ConTeXt Backend Macros / Initialization}
-\registerctxluafile{back-ini}{1.001}
+\registerctxluafile{back-ini}{}
%D We currently have a curious mix between tex and lua backend
%D handling but eventually most will move to lua.
diff --git a/tex/context/base/mkiv/back-pdf.lua b/tex/context/base/mkiv/back-pdf.lua
index 587092d47..f45783e51 100644
--- a/tex/context/base/mkiv/back-pdf.lua
+++ b/tex/context/base/mkiv/back-pdf.lua
@@ -263,7 +263,7 @@ scanners.pdfdest = function()
view = "xyz"
if scankeyword("zoom") then
report("\\pdfdest zoom is ignored")
- zoom = scancount()
+ zoom = scancount() -- will be divided by 1000 in the backend
end
elseif scankeyword("fitbh") then
view = "fitbh"
diff --git a/tex/context/base/mkiv/back-pdf.mkiv b/tex/context/base/mkiv/back-pdf.mkiv
index 54b1a830f..af5fcecd5 100644
--- a/tex/context/base/mkiv/back-pdf.mkiv
+++ b/tex/context/base/mkiv/back-pdf.mkiv
@@ -15,27 +15,27 @@
\writestatus{loading}{ConTeXt Backend Macros / PDF}
-%registerctxluafile{lpdf-aux}{1.001} % common helpers
-\registerctxluafile{lpdf-ini}{1.001}
-\registerctxluafile{lpdf-nod}{1.001}
-\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}
-\registerctxluafile{lpdf-wid}{1.001}
-\registerctxluafile{lpdf-fld}{1.001}
-\registerctxluafile{lpdf-mov}{1.001}
-\registerctxluafile{lpdf-u3d}{1.001} % this will become a module
-\registerctxluafile{lpdf-swf}{1.001} % this will become a module
-\registerctxluafile{lpdf-tag}{1.001}
-\registerctxluafile{lpdf-fmt}{1.001}
-\registerctxluafile{lpdf-epd}{1.001}
-\registerctxluafile{lpdf-epa}{1.001}
-
-\registerctxluafile{back-pdf}{1.001} % some code will move to lpdf-*
+%registerctxluafile{lpdf-aux}{optimize} % common helpers
+\registerctxluafile{lpdf-ini}{optimize}
+\registerctxluafile{lpdf-nod}{}
+\registerctxluafile{lpdf-col}{}
+\registerctxluafile{lpdf-xmp}{}
+\registerctxluafile{lpdf-ano}{}
+\registerctxluafile{lpdf-res}{}
+\registerctxluafile{lpdf-mis}{}
+\registerctxluafile{lpdf-ren}{}
+\registerctxluafile{lpdf-grp}{}
+\registerctxluafile{lpdf-wid}{}
+\registerctxluafile{lpdf-fld}{}
+\registerctxluafile{lpdf-mov}{}
+\registerctxluafile{lpdf-u3d}{} % this will become a module
+\registerctxluafile{lpdf-swf}{} % this will become a module
+\registerctxluafile{lpdf-tag}{}
+\registerctxluafile{lpdf-fmt}{}
+\registerctxluafile{lpdf-epd}{}
+\registerctxluafile{lpdf-epa}{}
+
+\registerctxluafile{back-pdf}{} % some code will move to lpdf-*
\loadmarkfile{back-u3d} % this will become a module
\loadmarkfile{back-swf} % this will become a module
diff --git a/tex/context/base/mkiv/bibl-bib.mkiv b/tex/context/base/mkiv/bibl-bib.mkiv
index f5d911ea7..784c87a02 100644
--- a/tex/context/base/mkiv/bibl-bib.mkiv
+++ b/tex/context/base/mkiv/bibl-bib.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Bibliography Support / Experimental BibTeX}
-\registerctxluafile{bibl-bib}{1.001}
+\registerctxluafile{bibl-bib}{}
\unprotect
diff --git a/tex/context/base/mkiv/bibl-tra.mkiv b/tex/context/base/mkiv/bibl-tra.mkiv
index 93f84872a..3ff07ead5 100644
--- a/tex/context/base/mkiv/bibl-tra.mkiv
+++ b/tex/context/base/mkiv/bibl-tra.mkiv
@@ -34,7 +34,7 @@
\definefilesynonym[bib][obsolete]
-\registerctxluafile{bibl-tra}{1.001}
+\registerctxluafile{bibl-tra}{}
%D The original was developed independantly by Taco Hoekwater while still working for Kluwer
%D Academic publishers (it still used the dutch interface then). Development continued after
diff --git a/tex/context/base/mkiv/blob-ini.mkiv b/tex/context/base/mkiv/blob-ini.mkiv
index 64582c0db..3cee3ff2f 100644
--- a/tex/context/base/mkiv/blob-ini.mkiv
+++ b/tex/context/base/mkiv/blob-ini.mkiv
@@ -18,8 +18,8 @@
%D down the road (close to version 1.00 of \LUATEX). Typesetting in
%D pure \LUA\ sometimes makes sense.
-\registerctxluafile{node-typ}{1.001} % experimental
-\registerctxluafile{blob-ini}{1.001}
+\registerctxluafile{node-typ}{} % experimental
+\registerctxluafile{blob-ini}{}
%D For the moment here:
diff --git a/tex/context/base/mkiv/buff-imp-default.mkiv b/tex/context/base/mkiv/buff-imp-default.mkiv
index 5cff34c70..a4ad788bb 100644
--- a/tex/context/base/mkiv/buff-imp-default.mkiv
+++ b/tex/context/base/mkiv/buff-imp-default.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{buff-imp-default.lua}{1.001}
+\registerctxluafile{buff-imp-default}{}
\unprotect
diff --git a/tex/context/base/mkiv/buff-imp-escaped.mkiv b/tex/context/base/mkiv/buff-imp-escaped.mkiv
index 13850475a..bbd8b7bac 100644
--- a/tex/context/base/mkiv/buff-imp-escaped.mkiv
+++ b/tex/context/base/mkiv/buff-imp-escaped.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{buff-imp-escaped.lua}{1.001}
+\registerctxluafile{buff-imp-escaped}{}
\unprotect
diff --git a/tex/context/base/mkiv/buff-imp-lua.mkiv b/tex/context/base/mkiv/buff-imp-lua.mkiv
index dc601bd7b..186d94b33 100644
--- a/tex/context/base/mkiv/buff-imp-lua.mkiv
+++ b/tex/context/base/mkiv/buff-imp-lua.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{buff-imp-lua.lua}{1.001}
+\registerctxluafile{buff-imp-lua}{}
\unprotect
diff --git a/tex/context/base/mkiv/buff-imp-mp.mkiv b/tex/context/base/mkiv/buff-imp-mp.mkiv
index a40eb6c30..95ca9b978 100644
--- a/tex/context/base/mkiv/buff-imp-mp.mkiv
+++ b/tex/context/base/mkiv/buff-imp-mp.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{buff-imp-mp.lua}{1.001}
+\registerctxluafile{buff-imp-mp}{}
\unprotect
diff --git a/tex/context/base/mkiv/buff-imp-nested.mkiv b/tex/context/base/mkiv/buff-imp-nested.mkiv
index 7815086db..f6a25b5f8 100644
--- a/tex/context/base/mkiv/buff-imp-nested.mkiv
+++ b/tex/context/base/mkiv/buff-imp-nested.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{buff-imp-nested.lua}{1.001}
+\registerctxluafile{buff-imp-nested}{}
\unprotect
diff --git a/tex/context/base/mkiv/buff-imp-parsed-xml.mkiv b/tex/context/base/mkiv/buff-imp-parsed-xml.mkiv
index bd348a67d..29e42d083 100644
--- a/tex/context/base/mkiv/buff-imp-parsed-xml.mkiv
+++ b/tex/context/base/mkiv/buff-imp-parsed-xml.mkiv
@@ -13,7 +13,7 @@
% todo: color specific elements
-\registerctxluafile{buff-imp-parsed-xml.lua}{1.001}
+\registerctxluafile{buff-imp-parsed-xml}{}
\unprotect
diff --git a/tex/context/base/mkiv/buff-imp-tex.mkiv b/tex/context/base/mkiv/buff-imp-tex.mkiv
index c582523d5..b768c9fd5 100644
--- a/tex/context/base/mkiv/buff-imp-tex.mkiv
+++ b/tex/context/base/mkiv/buff-imp-tex.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{buff-imp-tex.lua}{1.001}
+\registerctxluafile{buff-imp-tex}{}
\unprotect
diff --git a/tex/context/base/mkiv/buff-imp-xml.mkiv b/tex/context/base/mkiv/buff-imp-xml.mkiv
index f880ab882..0e3c251eb 100644
--- a/tex/context/base/mkiv/buff-imp-xml.mkiv
+++ b/tex/context/base/mkiv/buff-imp-xml.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{buff-imp-xml.lua}{1.001}
+\registerctxluafile{buff-imp-xml}{}
\unprotect
diff --git a/tex/context/base/mkiv/buff-ini.mkiv b/tex/context/base/mkiv/buff-ini.mkiv
index 7cc6cdbd4..1a5ce4591 100644
--- a/tex/context/base/mkiv/buff-ini.mkiv
+++ b/tex/context/base/mkiv/buff-ini.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Buffer Macros / Buffers}
-\registerctxluafile{buff-ini}{1.001}
+\registerctxluafile{buff-ini}{}
\unprotect
diff --git a/tex/context/base/mkiv/buff-par.mkvi b/tex/context/base/mkiv/buff-par.mkvi
index 189e68eec..0ee66dd01 100644
--- a/tex/context/base/mkiv/buff-par.mkvi
+++ b/tex/context/base/mkiv/buff-par.mkvi
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Buffer Macros / Parallel}
-\registerctxluafile{buff-par}{1.001}
+\registerctxluafile{buff-par}{}
%D This module is made for Thomas Schmitz as part of a project. There is
%D no documentation yet. Also, this code is unfinished and not tested well.
diff --git a/tex/context/base/mkiv/buff-ver.mkiv b/tex/context/base/mkiv/buff-ver.mkiv
index 30527da12..558049dcc 100644
--- a/tex/context/base/mkiv/buff-ver.mkiv
+++ b/tex/context/base/mkiv/buff-ver.mkiv
@@ -15,7 +15,7 @@
\writestatus{loading}{ConTeXt Buffer Macros / Verbatim}
-\registerctxluafile{buff-ver}{1.001}
+\registerctxluafile{buff-ver}{}
\unprotect
diff --git a/tex/context/base/mkiv/catc-ini.mkiv b/tex/context/base/mkiv/catc-ini.mkiv
index 440d53efe..471e4d1c8 100644
--- a/tex/context/base/mkiv/catc-ini.mkiv
+++ b/tex/context/base/mkiv/catc-ini.mkiv
@@ -14,7 +14,7 @@
%D We've split the functionality of syst-cat.* over more files
%D now so that we can load more selectively.
-\registerctxluafile{catc-ini}{1.001}
+\registerctxluafile{catc-ini}{}
\unprotect
diff --git a/tex/context/base/mkiv/char-enc.mkiv b/tex/context/base/mkiv/char-enc.mkiv
index 86ab2591a..d0dd3d20a 100644
--- a/tex/context/base/mkiv/char-enc.mkiv
+++ b/tex/context/base/mkiv/char-enc.mkiv
@@ -13,6 +13,6 @@
\writestatus{loading}{ConTeXt Character Support / Encodings}
-\registerctxluafile{char-enc}{1.001}
+\registerctxluafile{char-enc}{}
\endinput
diff --git a/tex/context/base/mkiv/char-ini.mkiv b/tex/context/base/mkiv/char-ini.mkiv
index 8f5a8da8f..9c41df673 100644
--- a/tex/context/base/mkiv/char-ini.mkiv
+++ b/tex/context/base/mkiv/char-ini.mkiv
@@ -13,10 +13,10 @@
\writestatus{loading}{ConTeXt Character Support / Initialization}
-\registerctxluafile{char-fio}{1.001}
-\registerctxluafile{char-map}{1.001} % maybe we will load this someplace else
-\registerctxluafile{char-tex}{1.001}
-\registerctxluafile{char-ent}{1.001}
+\registerctxluafile{char-fio}{}
+\registerctxluafile{char-map}{} % maybe we will load this someplace else
+\registerctxluafile{char-tex}{}
+\registerctxluafile{char-ent}{}
\unprotect
diff --git a/tex/context/base/mkiv/char-utf.mkiv b/tex/context/base/mkiv/char-utf.mkiv
index 3b77771a7..ccca72a18 100644
--- a/tex/context/base/mkiv/char-utf.mkiv
+++ b/tex/context/base/mkiv/char-utf.mkiv
@@ -22,10 +22,10 @@
\unprotect
-\registerctxluafile{char-def}{1.001}
-\registerctxluafile{char-ini}{1.001}
-\registerctxluafile{char-utf}{1.001}
-\registerctxluafile{char-cjk}{1.001}
+\registerctxluafile{char-def}{}
+\registerctxluafile{char-ini}{}
+\registerctxluafile{char-utf}{}
+\registerctxluafile{char-cjk}{}
%D We enable collapsing (combining characters) by default, but
%D since the source files are rather simple, we postpone the
diff --git a/tex/context/base/mkiv/chem-ini.mkiv b/tex/context/base/mkiv/chem-ini.mkiv
index d18ba47a1..c3569eea5 100644
--- a/tex/context/base/mkiv/chem-ini.mkiv
+++ b/tex/context/base/mkiv/chem-ini.mkiv
@@ -14,7 +14,7 @@
\writestatus{loading}{ConTeXt Chemistry Macros / Initialization} % might become Inline
-\registerctxluafile{chem-ini}{1.001}
+\registerctxluafile{chem-ini}{}
\unprotect
diff --git a/tex/context/base/mkiv/chem-str.mkiv b/tex/context/base/mkiv/chem-str.mkiv
index 2ff229b12..646cf13f1 100644
--- a/tex/context/base/mkiv/chem-str.mkiv
+++ b/tex/context/base/mkiv/chem-str.mkiv
@@ -17,7 +17,7 @@
\writestatus{loading}{ConTeXt Chemistry Macros / Structure}
-\registerctxluafile{chem-str}{1.001}
+\registerctxluafile{chem-str}{}
% We have a slightly different interface. This is unchanged:
%
diff --git a/tex/context/base/mkiv/cldf-bas.mkiv b/tex/context/base/mkiv/cldf-bas.mkiv
index f8b5b5d6a..962db5209 100644
--- a/tex/context/base/mkiv/cldf-bas.mkiv
+++ b/tex/context/base/mkiv/cldf-bas.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Lua Documents / Basics}
-\registerctxluafile{cldf-bas}{1.001}
-\registerctxluafile{cldf-prs}{1.001}
+\registerctxluafile{cldf-bas}{}
+\registerctxluafile{cldf-prs}{}
\endinput
diff --git a/tex/context/base/mkiv/cldf-com.mkiv b/tex/context/base/mkiv/cldf-com.mkiv
index 491909888..a1e442872 100644
--- a/tex/context/base/mkiv/cldf-com.mkiv
+++ b/tex/context/base/mkiv/cldf-com.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Lua Documents / Functions}
-\registerctxluafile{cldf-com}{1.001}
-\registerctxluafile{cldf-ver}{1.001}
+\registerctxluafile{cldf-com}{}
+\registerctxluafile{cldf-ver}{}
\endinput
diff --git a/tex/context/base/mkiv/cldf-ini.mkiv b/tex/context/base/mkiv/cldf-ini.mkiv
index a985f204e..27ce42aa2 100644
--- a/tex/context/base/mkiv/cldf-ini.mkiv
+++ b/tex/context/base/mkiv/cldf-ini.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Lua Documents / Initialization}
-\registerctxluafile{cldf-ini}{1.001}
+\registerctxluafile{cldf-ini}{}
%D With each new update of \MKIV\ we can join Within Temptation in
%D singing:
diff --git a/tex/context/base/mkiv/cldf-int.mkiv b/tex/context/base/mkiv/cldf-int.mkiv
index da684694a..d30ce6811 100644
--- a/tex/context/base/mkiv/cldf-int.mkiv
+++ b/tex/context/base/mkiv/cldf-int.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Multilingual Macros / Lua}
-\registerctxluafile{cldf-int}{1.001}
+\registerctxluafile{cldf-int}{}
\unprotect
diff --git a/tex/context/base/mkiv/cldf-ver.mkiv b/tex/context/base/mkiv/cldf-ver.mkiv
index 8e009035d..0ff63810e 100644
--- a/tex/context/base/mkiv/cldf-ver.mkiv
+++ b/tex/context/base/mkiv/cldf-ver.mkiv
@@ -13,6 +13,6 @@
\writestatus{loading}{ConTeXt Lua Documents / Verbatim}
-\registerctxluafile{cldf-ver}{1.001}
+\registerctxluafile{cldf-ver}{}
\endinput
diff --git a/tex/context/base/mkiv/colo-icc.lua b/tex/context/base/mkiv/colo-icc.lua
index 638c6c4c4..54072fefa 100644
--- a/tex/context/base/mkiv/colo-icc.lua
+++ b/tex/context/base/mkiv/colo-icc.lua
@@ -8,6 +8,7 @@ if not modules then modules = { } end modules ['colo-icc'] = {
local char, byte, gsub, match, format, strip = string.char, string.byte, string.gsub, string.match, string.format, string.strip
local readstring, readnumber = io.readstring, io.readnumber
+local band = bit32.band
local colors = attributes and attributes.colors or { } -- when used in mtxrun
@@ -78,10 +79,10 @@ function colors.iccprofile(filename,verbose)
o == 1 and "dependent" or "unknown"
local d = header.deviceattributes
header.deviceattributes = {
- [number.hasbit(d,1) and "transparency" or "reflective"] = true,
- [number.hasbit(d,2) and "mate" or "glossy" ] = true,
- [number.hasbit(d,3) and "negative" or "positive" ] = true,
- [number.hasbit(d,4) and "bw" or "color" ] = true,
+ [band(d,1) ~= 0 and "transparency" or "reflective"] = true,
+ [band(d,2) ~= 0 and "mate" or "glossy" ] = true,
+ [band(d,3) ~= 0 and "negative" or "positive" ] = true,
+ [band(d,4) ~= 0 and "bw" or "color" ] = true,
}
local r = header.renderingintent
header.renderingintent =
diff --git a/tex/context/base/mkiv/colo-ini.mkiv b/tex/context/base/mkiv/colo-ini.mkiv
index 5d6046904..a726a91d6 100644
--- a/tex/context/base/mkiv/colo-ini.mkiv
+++ b/tex/context/base/mkiv/colo-ini.mkiv
@@ -32,8 +32,8 @@
\installcorenamespace{colorconversions}
\installcorenamespace{colornumber}
-\registerctxluafile{colo-ini}{1.000}
-\registerctxluafile{colo-icc}{1.000}
+\registerctxluafile{colo-ini}{}
+\registerctxluafile{colo-icc}{}
\unprotect
diff --git a/tex/context/base/mkiv/colo-run.mkiv b/tex/context/base/mkiv/colo-run.mkiv
index 37a9de190..24f7cc052 100644
--- a/tex/context/base/mkiv/colo-run.mkiv
+++ b/tex/context/base/mkiv/colo-run.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{colo-run}{1.000}
+\registerctxluafile{colo-run}{}
\unprotect
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 596562074..9bf6dc266 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2017.10.29 15:44}
+\newcontextversion{2017.11.01 11:55}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/mkiv/cont-run.mkiv b/tex/context/base/mkiv/cont-run.mkiv
index 8a6d49d7d..b650be67d 100644
--- a/tex/context/base/mkiv/cont-run.mkiv
+++ b/tex/context/base/mkiv/cont-run.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Core Macros / Runner}
-\registerctxluafile{cont-run}{1.001}
+\registerctxluafile{cont-run}{}
% \enabletrackers[system.synctex.visualize]
% \enabletrackers[system.synctex.xml]
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 34a8d186c..6bbd3c88d 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -41,7 +41,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2017.10.29 15:44}
+\edef\contextversion{2017.11.01 11:55}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/core-con.mkiv b/tex/context/base/mkiv/core-con.mkiv
index 09e4cccdb..b4f247fcb 100644
--- a/tex/context/base/mkiv/core-con.mkiv
+++ b/tex/context/base/mkiv/core-con.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Core Macros / Conversion}
-\registerctxluafile{core-con}{1.001}
+\registerctxluafile{core-con}{}
% todo: iso date ranges (from/to)
diff --git a/tex/context/base/mkiv/core-ctx.mkiv b/tex/context/base/mkiv/core-ctx.mkiv
index e6372d099..77fb0f139 100644
--- a/tex/context/base/mkiv/core-ctx.mkiv
+++ b/tex/context/base/mkiv/core-ctx.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Core Macros / Job Control}
-\registerctxluafile{core-ctx}{1.000}
+\registerctxluafile{core-ctx}{}
\unprotect
diff --git a/tex/context/base/mkiv/core-dat.mkiv b/tex/context/base/mkiv/core-dat.mkiv
index 26b1f14b5..3bb923af4 100644
--- a/tex/context/base/mkiv/core-dat.mkiv
+++ b/tex/context/base/mkiv/core-dat.mkiv
@@ -32,7 +32,7 @@
\unprotect
-\registerctxluafile{core-dat}{1.001}
+\registerctxluafile{core-dat}{}
\installcorenamespace{dataset}
diff --git a/tex/context/base/mkiv/core-env.mkiv b/tex/context/base/mkiv/core-env.mkiv
index 0b8894265..c93350db0 100644
--- a/tex/context/base/mkiv/core-env.mkiv
+++ b/tex/context/base/mkiv/core-env.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Core Macros / Environments}
-\registerctxluafile{core-env}{1.001}
+\registerctxluafile{core-env}{}
\unprotect
diff --git a/tex/context/base/mkiv/core-sys.mkiv b/tex/context/base/mkiv/core-sys.mkiv
index a821c7868..4d99d8647 100644
--- a/tex/context/base/mkiv/core-sys.mkiv
+++ b/tex/context/base/mkiv/core-sys.mkiv
@@ -15,7 +15,7 @@
\writestatus{loading}{ConTeXt Core Macros / System}
-\registerctxluafile{core-sys}{1.001}
+\registerctxluafile{core-sys}{}
\unprotect
diff --git a/tex/context/base/mkiv/core-two.mkiv b/tex/context/base/mkiv/core-two.mkiv
index 5a791dea2..f83d63042 100644
--- a/tex/context/base/mkiv/core-two.mkiv
+++ b/tex/context/base/mkiv/core-two.mkiv
@@ -71,7 +71,7 @@
\unprotect
-\registerctxluafile{core-two}{1.001}
+\registerctxluafile{core-two}{}
\def\immediatesavetwopassdata #1#2#3{\normalexpanded{\noexpand\clf_savetwopassdata{#1}{#3}}}
\def\savetwopassdata #1#2#3{\normalexpanded{\noexpand\ctxlatecommand{savetwopassdata('#1',"#3")}}}
diff --git a/tex/context/base/mkiv/core-uti.mkiv b/tex/context/base/mkiv/core-uti.mkiv
index c50a0eacc..68965707f 100644
--- a/tex/context/base/mkiv/core-uti.mkiv
+++ b/tex/context/base/mkiv/core-uti.mkiv
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{core-uti}{1.001}
+\registerctxluafile{core-uti}{}
\def\savecurrentvalue#1#2% immediate, so not \unexpanded
{\clf_savevariable{\csstring#1}{#2}}
diff --git a/tex/context/base/mkiv/data-use.lua b/tex/context/base/mkiv/data-use.lua
index 65fcc5dc3..ff25c803a 100644
--- a/tex/context/base/mkiv/data-use.lua
+++ b/tex/context/base/mkiv/data-use.lua
@@ -65,6 +65,7 @@ function statistics.savefmtstatus(texname,formatbanner,sourcefile,kind,banner) -
formatbanner = formatbanner,
sourcehash = md5.hex(io.loaddata(resolvers.findfile(sourcefile)) or "unknown"),
sourcefile = sourcefile,
+ luaversion = LUAVERSION,
}
io.savedata(luvname,table.serialize(luvdata,true))
lua.registerfinalizer(function()
@@ -94,6 +95,10 @@ function statistics.checkfmtstatus(texname)
if luvhash ~= sourcehash then
return format("source mismatch (luv: %s <> bin: %s)",luvhash,sourcehash)
end
+ local luvluaversion = luv.luaversion or 0
+ if luvluaversion ~= LUAVERSION then
+ return format("lua mismatch (luv: %s <> bin: %s)",luvluaversion,LUAVERSION)
+ end
else
return "invalid status file"
end
diff --git a/tex/context/base/mkiv/file-ini.mkvi b/tex/context/base/mkiv/file-ini.mkvi
index 9f12e9a3b..225b6b40d 100644
--- a/tex/context/base/mkiv/file-ini.mkvi
+++ b/tex/context/base/mkiv/file-ini.mkvi
@@ -28,7 +28,7 @@
\writestatus{loading}{ConTeXt File Macros / Helpers}
-\registerctxluafile{file-ini}{1.001}
+\registerctxluafile{file-ini}{}
\unprotect
diff --git a/tex/context/base/mkiv/file-job.lua b/tex/context/base/mkiv/file-job.lua
index 61f467a22..af15eff56 100644
--- a/tex/context/base/mkiv/file-job.lua
+++ b/tex/context/base/mkiv/file-job.lua
@@ -1175,7 +1175,7 @@ if environment.initex then
stopfilelogging()
startfilelogging(report,"stored modules")
for k,v in sortedhash(lua.bytedata) do
- report("%03i %s %s",k,v[2],v[1])
+ report("%03i %s %s",k,v.name)
end
stopfilelogging()
startfilelogging(report,"stored attributes")
diff --git a/tex/context/base/mkiv/file-job.mkvi b/tex/context/base/mkiv/file-job.mkvi
index 49598a494..e1ea405c0 100644
--- a/tex/context/base/mkiv/file-job.mkvi
+++ b/tex/context/base/mkiv/file-job.mkvi
@@ -17,7 +17,7 @@
\unprotect
-\registerctxluafile{file-job}{1.001}
+\registerctxluafile{file-job}{}
% processing
diff --git a/tex/context/base/mkiv/file-lib.mkvi b/tex/context/base/mkiv/file-lib.mkvi
index 76137ce15..c2ec555cf 100644
--- a/tex/context/base/mkiv/file-lib.mkvi
+++ b/tex/context/base/mkiv/file-lib.mkvi
@@ -15,6 +15,6 @@
\unprotect
-\registerctxluafile{file-lib}{1.001}
+\registerctxluafile{file-lib}{}
\protect \endinput
diff --git a/tex/context/base/mkiv/file-mod.mkvi b/tex/context/base/mkiv/file-mod.mkvi
index b769b52c5..a2a3b7793 100644
--- a/tex/context/base/mkiv/file-mod.mkvi
+++ b/tex/context/base/mkiv/file-mod.mkvi
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{file-mod}{1.001}
+\registerctxluafile{file-mod}{}
%D \macros
%D {usemodule}
diff --git a/tex/context/base/mkiv/file-res.mkvi b/tex/context/base/mkiv/file-res.mkvi
index 17f4cf44c..c5bef27a9 100644
--- a/tex/context/base/mkiv/file-res.mkvi
+++ b/tex/context/base/mkiv/file-res.mkvi
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{file-res}{1.001}
+\registerctxluafile{file-res}{}
%D \macros
%D {readfile,ReadFile}
diff --git a/tex/context/base/mkiv/file-syn.mkvi b/tex/context/base/mkiv/file-syn.mkvi
index 52ecd0d71..f25861772 100644
--- a/tex/context/base/mkiv/file-syn.mkvi
+++ b/tex/context/base/mkiv/file-syn.mkvi
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{file-syn}{1.001}
+\registerctxluafile{file-syn}{}
%D \macros
%D {definefilesynonym,definefilefallback}
diff --git a/tex/context/base/mkiv/font-chk.mkiv b/tex/context/base/mkiv/font-chk.mkiv
index 4c8967532..303acea43 100644
--- a/tex/context/base/mkiv/font-chk.mkiv
+++ b/tex/context/base/mkiv/font-chk.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Font Macros / Checking}
-\registerctxluafile{font-chk}{1.001}
+\registerctxluafile{font-chk}{}
\tracinglostchars\zerocount
diff --git a/tex/context/base/mkiv/font-col.mkvi b/tex/context/base/mkiv/font-col.mkvi
index b13047e50..a9c461e44 100644
--- a/tex/context/base/mkiv/font-col.mkvi
+++ b/tex/context/base/mkiv/font-col.mkvi
@@ -26,7 +26,7 @@
\writestatus{loading}{ConTeXt Font Macros / Collections}
-\registerctxluafile{font-col}{1.001}
+\registerctxluafile{font-col}{}
\unprotect
diff --git a/tex/context/base/mkiv/font-dsp.lua b/tex/context/base/mkiv/font-dsp.lua
index 34497ece7..5ecb9cce3 100644
--- a/tex/context/base/mkiv/font-dsp.lua
+++ b/tex/context/base/mkiv/font-dsp.lua
@@ -52,7 +52,6 @@ if not modules then modules = { } end modules ['font-dsp'] = {
-- multi-gig videos pass through our networks and storage and memory is abundant.
local next, type = next, type
-local bittest = bit32.btest
local band = bit32.band
local extract = bit32.extract
local bor = bit32.bor
@@ -273,7 +272,7 @@ local lookupnames = {
-- local lookupstate = setmetatableindex(function(t,k)
-- local v = { }
-- for kk, vv in next, lookupbits do
--- if bittest(k,kk) then
+-- if band(k,kk) ~= 0 then
-- v[vv] = true
-- end
-- end
@@ -283,10 +282,10 @@ local lookupnames = {
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
+ band(k,0x0008) ~= 0 and true or false, -- ignoremarks
+ band(k,0x0004) ~= 0 and true or false, -- ignoreligatures
+ band(k,0x0002) ~= 0 and true or false, -- ignorebaseglyphs
+ band(k,0x0001) ~= 0 and true or false, -- r2l
}
t[k] = v
return v
@@ -738,15 +737,15 @@ local function readposition(f,format,mainoffset,getdelta)
-- ....
-- end
--
- local x = bittest(format,0x01) and readshort(f) or 0 -- x placement
- local y = bittest(format,0x02) and readshort(f) or 0 -- y placement
- local h = bittest(format,0x04) and readshort(f) or 0 -- h advance
- local v = bittest(format,0x08) and readshort(f) or 0 -- v advance
+ local x = band(format,0x1) ~= 0 and readshort(f) or 0 -- x placement
+ local y = band(format,0x2) ~= 0 and readshort(f) or 0 -- y placement
+ local h = band(format,0x4) ~= 0 and readshort(f) or 0 -- h advance
+ local v = band(format,0x8) ~= 0 and readshort(f) or 0 -- v advance
if format >= 0x10 then
- local X = bittest(format,0x10) and skipshort(f) or 0
- local Y = bittest(format,0x20) and skipshort(f) or 0
- local H = bittest(format,0x40) and skipshort(f) or 0
- local V = bittest(format,0x80) and skipshort(f) or 0
+ local X = band(format,0x10) ~= 0 and skipshort(f) or 0
+ local Y = band(format,0x20) ~= 0 and skipshort(f) or 0
+ local H = band(format,0x40) ~= 0 and skipshort(f) or 0
+ local V = band(format,0x80) ~= 0 and skipshort(f) or 0
local s = skips[extract(format,4,4)]
if s > 0 then
skipshort(f,s)
@@ -2020,7 +2019,7 @@ do
subtables[j] = offset + readushort(f) -- we can probably put lookupoffset here
end
-- which one wins?
- local markclass = bittest(flagbits,0x0010) -- usemarkfilteringset
+ local markclass = band(flagbits,0x0010) ~= 0 -- usemarkfilteringset
if markclass then
markclass = readushort(f) -- + 1
end
@@ -2464,7 +2463,7 @@ do
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
+ local format = rshift(coverage,8) -- is this ok
if format == 0 then
local nofpairs = readushort(f)
local searchrange = readushort(f)
@@ -2917,7 +2916,7 @@ local function readmathvariants(f,fontdata,offset)
advance = readushort(f),
}
local flags = readushort(f)
- if bittest(flags,0x0001) then
+ if band(flags,0x0001) ~= 0 then
p.extender = 1 -- true
end
parts[i] = p
diff --git a/tex/context/base/mkiv/font-gds.mkvi b/tex/context/base/mkiv/font-gds.mkvi
index e9c34e807..549ede46f 100644
--- a/tex/context/base/mkiv/font-gds.mkvi
+++ b/tex/context/base/mkiv/font-gds.mkvi
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Font Support / Colorschemes}
-%registerctxluafile{font-gds}{1.001}
+%registerctxluafile{font-gds}{}
\unprotect
diff --git a/tex/context/base/mkiv/font-lib.mkvi b/tex/context/base/mkiv/font-lib.mkvi
index 2e8d7aa06..24ab68781 100644
--- a/tex/context/base/mkiv/font-lib.mkvi
+++ b/tex/context/base/mkiv/font-lib.mkvi
@@ -15,101 +15,84 @@
\unprotect
-\registerctxluafile{font-ini}{1.001}
-\registerctxluafile{font-log}{1.001}
-\registerctxluafile{font-con}{1.001}
-\registerctxluafile{font-cft}{1.001}
-\registerctxluafile{font-enc}{1.001}
-\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}
+\registerctxluafile{font-ini}{}
+\registerctxluafile{font-log}{}
+\registerctxluafile{font-con}{}
+\registerctxluafile{font-cft}{}
+\registerctxluafile{font-enc}{}
+\registerctxluafile{font-agl}{} % if needed we can comment this and delay loading
+\registerctxluafile{font-cid}{} % cid maps
+\registerctxluafile{font-map}{optimize}
% the otf font loader:
-\registerctxluafile{font-otr}{1.001} % opentype fontloader
-\registerctxluafile{font-web}{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-hsh}{1.001} % hashes used by context
-\registerctxluafile{font-nod}{1.001}
-
-\registerctxluafile{font-oti}{1.001} % otf initialization
-\registerctxluafile{font-ott}{1.001} % otf tables (first)
-
-\registerctxluafile{font-otl}{1.001}
-\registerctxluafile{font-oto}{1.001}
-\registerctxluafile{font-otj}{1.001}
-
-% \doifelsefile{font-oup-new.lua} {
-% \registerctxluafile{font-oup-new}{1.001}
-% } {
- \registerctxluafile{font-oup}{1.001}
-% }
-
-\registerctxluafile{font-ota}{1.001}
-
-% \doifelsefile{font-ots-new.lua} {
-% \registerctxluafile{font-ots-new}{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-ocl}{1.001}
+\registerctxluafile{font-otr}{optimize} % opentype fontloader
+\registerctxluafile{font-web}{} % opentype fontloader
+\registerctxluafile{font-cff}{optimize} % quadratic outlines
+\registerctxluafile{font-ttf}{optimize} % cubic outlines
+\registerctxluafile{font-dsp}{optimize} % ... for this one
+\registerctxluafile{font-hsh}{} % hashes used by context
+\registerctxluafile{font-nod}{}
+\registerctxluafile{font-oti}{} % otf initialization
+\registerctxluafile{font-ott}{} % otf tables (first)
+\registerctxluafile{font-otl}{}
+\registerctxluafile{font-oto}{}
+\registerctxluafile{font-otj}{}
+\registerctxluafile{font-oup}{}
+\registerctxluafile{font-ota}{}
+\registerctxluafile{font-ots}{}
+\registerctxluafile{font-otd}{}
+\registerctxluafile{font-otc}{}
+\registerctxluafile{font-oth}{}
+\registerctxluafile{font-osd}{}
+\registerctxluafile{font-ocl}{}
% we use otf code for type one
-\registerctxluafile{font-onr}{1.001}
-\registerctxluafile{font-one}{1.001}
-\registerctxluafile{font-afk}{1.001}
+\registerctxluafile{font-onr}{optimize}
+\registerctxluafile{font-one}{optimize}
+\registerctxluafile{font-afk}{}
% tfm
-\registerctxluafile{font-tfm}{1.001}
+\registerctxluafile{font-tfm}{}
% name database
-\registerctxluafile{font-syn}{1.001}
-\registerctxluafile{font-trt}{1.001}
+\registerctxluafile{font-syn}{}
+\registerctxluafile{font-trt}{}
% shapes
-\registerctxluafile{font-shp}{1.001}
+\registerctxluafile{font-shp}{}
% so far
-\registerctxluafile{font-pat}{1.001} % patchers
+\registerctxluafile{font-pat}{} % patchers
-\registerctxluafile{node-fnt}{1.001} % here
+\registerctxluafile{node-fnt}{} % here
-\registerctxluafile{font-mps}{1.001} % outline fun
+\registerctxluafile{font-mps}{} % outline fun
-\registerctxluafile{font-lua}{1.001}
+\registerctxluafile{font-lua}{}
-\registerctxluafile{font-vir}{1.001}
-\registerctxluafile{font-enh}{1.001}
+\registerctxluafile{font-vir}{}
+\registerctxluafile{font-enh}{}
-\registerctxluafile{good-ini}{1.001}
-\registerctxluafile{good-gen}{1.001}
-\registerctxluafile{good-ctx}{1.001}
-\registerctxluafile{good-mth}{1.001}
+\registerctxluafile{good-ini}{}
+\registerctxluafile{good-gen}{}
+\registerctxluafile{good-ctx}{}
+\registerctxluafile{good-mth}{}
-\registerctxluafile{font-def}{1.001}
-\registerctxluafile{font-ctx}{1.001} % after def as it overloads
+\registerctxluafile{font-def}{}
+\registerctxluafile{font-ctx}{} % after def as it overloads
-\registerctxluafile{font-ext}{1.001}
-\registerctxluafile{font-fbk}{1.001}
+\registerctxluafile{font-ext}{}
+\registerctxluafile{font-fbk}{}
-\registerctxluafile{font-aux}{1.001}
+\registerctxluafile{font-aux}{}
-\registerctxluafile{font-lig}{1.001} % only for experiments so try to avoid it
+\registerctxluafile{font-lig}{} % only for experiments so try to avoid it
%D Some low level helpers
%D
diff --git a/tex/context/base/mkiv/font-map.lua b/tex/context/base/mkiv/font-map.lua
index ebc74b1d0..d4a1b4594 100644
--- a/tex/context/base/mkiv/font-map.lua
+++ b/tex/context/base/mkiv/font-map.lua
@@ -10,9 +10,9 @@ 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 floor = math.floor
local formatters = string.formatters
local sortedhash, sortedkeys = table.sortedhash, table.sortedkeys
+local rshift = bit32.rshift
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_mapping = v end)
@@ -78,6 +78,9 @@ end
local f_single = formatters["%04X"]
local f_double = formatters["%04X%04X"]
+-- floor(x/256) => rshift(x, 8)
+-- floor(x/1024) => rshift(x,10)
+
-- 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)
@@ -88,7 +91,7 @@ local f_double = formatters["%04X%04X"]
-- s = f_single(unicode)
-- else
-- unicode = unicode - 0x10000
--- s = f_double(floor(unicode/1024)+0xD800,unicode%1024+0xDC00)
+-- s = f_double(rshift(unicode,10)+0xD800,unicode%1024+0xDC00)
-- end
-- t[unicode] = s
-- return s
@@ -147,7 +150,7 @@ local function tounicode16(unicode)
return f_single(unicode)
else
unicode = unicode - 0x10000
- return f_double(floor(unicode/1024)+0xD800,unicode%1024+0xDC00)
+ return f_double(rshift(unicode,10)+0xD800,unicode%1024+0xDC00)
end
end
@@ -159,7 +162,7 @@ local function tounicode16sequence(unicodes)
t[l] = f_single(u)
else
u = u - 0x10000
- t[l] = f_double(floor(u/1024)+0xD800,u%1024+0xDC00)
+ t[l] = f_double(rshift(u,10)+0xD800,u%1024+0xDC00)
end
end
return concat(t)
@@ -174,7 +177,7 @@ local function tounicode(unicode)
t[l] = f_single(u)
else
u = u - 0x10000
- t[l] = f_double(floor(u/1024)+0xD800,u%1024+0xDC00)
+ t[l] = f_double(rshift(u,10)+0xD800,u%1024+0xDC00)
end
end
return concat(t)
@@ -183,7 +186,7 @@ local function tounicode(unicode)
return f_single(unicode)
else
unicode = unicode - 0x10000
- return f_double(floor(unicode/1024)+0xD800,unicode%1024+0xDC00)
+ return f_double(rshift(unicode,10)+0xD800,unicode%1024+0xDC00)
end
end
end
@@ -196,7 +199,7 @@ end
-- v = f_single(u)
-- else
-- u = u - 0x10000
--- v = f_double(floor(u/1024)+0xD800,u%1024+0xDC00)
+-- v = f_double(rshift(u,10)+0xD800,u%1024+0xDC00)
-- end
-- t[u] = v
-- return v
diff --git a/tex/context/base/mkiv/font-one.lua b/tex/context/base/mkiv/font-one.lua
index 1b5bebb82..a3dc7b038 100644
--- a/tex/context/base/mkiv/font-one.lua
+++ b/tex/context/base/mkiv/font-one.lua
@@ -22,10 +22,8 @@ add features.</p>
local fonts, logs, trackers, containers, resolvers = fonts, logs, trackers, containers, resolvers
local next, type, tonumber, rawget = next, type, tonumber, rawget
-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 match, gsub = string.match, string.gsub
local abs = math.abs
-local bxor, rshift = bit32.bxor, bit32.rshift
local P, S, R, Cmt, C, Ct, Cs, Carg = lpeg.P, lpeg.S, lpeg.R, lpeg.Cmt, lpeg.C, lpeg.Ct, lpeg.Cs, lpeg.Carg
local lpegmatch, patterns = lpeg.match, lpeg.patterns
local sortedhash = table.sortedhash
diff --git a/tex/context/base/mkiv/font-otr.lua b/tex/context/base/mkiv/font-otr.lua
index 8fd84015a..c36f1ae42 100644
--- a/tex/context/base/mkiv/font-otr.lua
+++ b/tex/context/base/mkiv/font-otr.lua
@@ -70,6 +70,7 @@ local byte, lower, char, gsub = string.byte, string.lower, string.char, string.g
local floor, round = math.floor, 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 rshift = bit32.rshift
local setmetatableindex = table.setmetatableindex
local formatters = string.formatters
@@ -1809,7 +1810,7 @@ function readers.kern(f,fontdata,specification)
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?
+ local format = rshift(coverage,8) -- is this ok?
if format == 0 then
local nofpairs = readushort(f)
local searchrange = readushort(f)
diff --git a/tex/context/base/mkiv/font-sel.mkvi b/tex/context/base/mkiv/font-sel.mkvi
index a78742928..87617d2d1 100644
--- a/tex/context/base/mkiv/font-sel.mkvi
+++ b/tex/context/base/mkiv/font-sel.mkvi
@@ -10,7 +10,7 @@
\writestatus{loading}{ConTeXt User Module / Selectfont}
-\registerctxluafile{font-sel}{1.001}
+\registerctxluafile{font-sel}{}
\unprotect
diff --git a/tex/context/base/mkiv/font-sol.mkvi b/tex/context/base/mkiv/font-sol.mkvi
index d065b78ea..c908001ff 100644
--- a/tex/context/base/mkiv/font-sol.mkvi
+++ b/tex/context/base/mkiv/font-sol.mkvi
@@ -72,7 +72,7 @@
%D \disabletrackers[parbuilders.solutions.splitters.colors]
%D \stoptyping
-\registerctxluafile{font-sol}{1.001}
+\registerctxluafile{font-sol}{}
\unprotect
diff --git a/tex/context/base/mkiv/font-ttf.lua b/tex/context/base/mkiv/font-ttf.lua
index 339764d4a..df08787f9 100644
--- a/tex/context/base/mkiv/font-ttf.lua
+++ b/tex/context/base/mkiv/font-ttf.lua
@@ -33,7 +33,7 @@ if not modules then modules = { } end modules ['font-ttf'] = {
-- delta = (1-factor)*left + factor * right
local next, type, unpack = next, type, unpack
-local bittest, band, rshift = bit32.btest, bit32.band, bit32.rshift
+local band, rshift = bit32.band, bit32.rshift
local sqrt, round = math.sqrt, math.round
local char = string.char
local concat = table.concat
@@ -698,7 +698,7 @@ local function readglyph(f,nofcontours) -- read deltas here, saves space
while i <= nofpoints do
local flag = readbyte(f)
flags[i] = flag
- if bittest(flag,0x08) then
+ if band(flag,0x08) ~= 0 then
for j=1,readbyte(f) do
i = i + 1
flags[i] = flag
@@ -711,8 +711,8 @@ local function readglyph(f,nofcontours) -- read deltas here, saves space
local x = 0
for i=1,nofpoints do
local flag = flags[i]
- local short = bittest(flag,0x02)
- local same = bittest(flag,0x10)
+ local short = band(flag,0x02) ~= 0
+ local same = band(flag,0x10) ~= 0
if short then
if same then
x = x + readbyte(f)
@@ -724,13 +724,13 @@ local function readglyph(f,nofcontours) -- read deltas here, saves space
else
x = x + readshort(f)
end
- points[i] = { x, 0, bittest(flag,0x01) }
+ points[i] = { x, 0, band(flag,0x01) ~= 0 }
end
local y = 0
for i=1,nofpoints do
local flag = flags[i]
- local short = bittest(flag,0x04)
- local same = bittest(flag,0x20)
+ local short = band(flag,0x04) ~= 0
+ local same = band(flag,0x20) ~= 0
if short then
if same then
y = y + readbyte(f)
@@ -759,19 +759,19 @@ local function readcomposite(f)
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)
+ ----- f_words = band(flags,0x0001) ~= 0
+ local f_xyarg = band(flags,0x0002) ~= 0
+ ----- f_round = band(flags,0x0006) ~= 0 -- 2 + 4
+ ----- f_scale = band(flags,0x0008) ~= 0
+ ----- f_reserved = band(flags,0x0010) ~= 0
+ ----- f_more = band(flags,0x0020) ~= 0
+ ----- f_xyscale = band(flags,0x0040) ~= 0
+ ----- f_matrix = band(flags,0x0080) ~= 0
+ ----- f_instruct = band(flags,0x0100) ~= 0
+ ----- f_usemine = band(flags,0x0200) ~= 0
+ ----- f_overlap = band(flags,0x0400) ~= 0
+ local f_offset = band(flags,0x0800) ~= 0
+ ----- f_uoffset = band(flags,0x1000) ~= 0
local xscale = 1
local xrotate = 0
local yrotate = 0
@@ -781,7 +781,7 @@ local function readcomposite(f)
local base = false
local reference = false
if f_xyarg then
- if bittest(flags,0x0001) then -- f_words
+ if band(flags,0x0001) ~= 0 then -- f_words
xoffset = readshort(f)
yoffset = readshort(f)
else
@@ -789,7 +789,7 @@ local function readcomposite(f)
yoffset = readchar(f) -- signed byte, stupid name
end
else
- if bittest(flags,0x0001) then -- f_words
+ if band(flags,0x0001) ~= 0 then -- f_words
base = readshort(f)
reference = readshort(f)
else
@@ -797,21 +797,21 @@ local function readcomposite(f)
reference = readchar(f) -- signed byte, stupid name
end
end
- if bittest(flags,0x0008) then -- f_scale
+ if band(flags,0x0008) ~= 0 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
+ elseif band(flags,0x0040) ~= 0 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
+ elseif band(flags,0x0080) ~= 0 then -- f_matrix
xscale = read2dot14(f)
xrotate = read2dot14(f)
yrotate = read2dot14(f)
@@ -824,16 +824,16 @@ local function readcomposite(f)
nofcomponents = nofcomponents + 1
components[nofcomponents] = {
index = index,
- usemine = bittest(flags,0x0200), -- f_usemine
- round = bittest(flags,0x0006), -- f_round,
+ usemine = band(flags,0x0200) ~= 0, -- f_usemine
+ round = band(flags,0x0006) ~= 0, -- f_round,
base = base,
reference = reference,
matrix = { xscale, xrotate, yrotate, yscale, xoffset, yoffset },
}
- if bittest(flags,0x0100) then
+ if band(flags,0x0100) ~= 0 then
instructions = true
end
- if not bittest(flags,0x0020) then -- f_more
+ if not band(flags,0x0020) ~= 0 then -- f_more
break
end
end
@@ -963,7 +963,7 @@ local function readpoints(f)
else
if count < 128 then
-- no second byte, use count
- elseif bittest(count,0x80) then
+ elseif band(count,0x80) ~= 0 then
count = band(count,0x7F) * 256 + readbyte(f)
else
-- bad news
@@ -973,7 +973,7 @@ local function readpoints(f)
local n = 1 -- indices
while p < count do
local control = readbyte(f)
- local runreader = bittest(control,0x80) and readushort or readbyte
+ local runreader = band(control,0x80) ~= 0 and readushort or readbyte
local runlength = band(control,0x7F)
for i=1,runlength+1 do
n = n + runreader(f)
@@ -994,12 +994,12 @@ local function readdeltas(f,nofpoints)
if not control then
break
end
- local allzero = bittest(control,0x80)
+ local allzero = band(control,0x80) ~= 0
local runlength = band(control,0x3F) + 1
if allzero then
z = z + runlength
else
- local runreader = bittest(control,0x40) and readshort or readinteger
+ local runreader = band(control,0x40) ~= 0 and readshort or readinteger
if z > 0 then
for i=1,z do
p = p + 1
@@ -1035,7 +1035,7 @@ local function readdeltas(f,nofpoints)
while nofpoints > 0 do
local control = readbyte(f)
if control then
- local allzero = bittest(control,0x80)
+ local allzero = band(control,0x80) ~= 0
local runlength = band(control,0x3F) + 1
if allzero then
for i=1,runlength do
@@ -1043,7 +1043,7 @@ local function readdeltas(f,nofpoints)
deltas[p] = 0
end
else
- local runreader = bittest(control,0x40) and readshort or readinteger
+ local runreader = band(control,0x40) ~= 0 and readshort or readinteger
for i=1,runlength do
p = p + 1
deltas[p] = runreader(f)
@@ -1088,7 +1088,7 @@ function readers.gvar(f,fontdata,specification,glyphdata,shapedata)
local dowidth = not fontdata.variabledata.hvarwidths
-- there is one more offset (so that one can calculate the size i suppose)
-- so we could test for overflows but we simply assume sane font files
- if bittest(flags,0x0001) then
+ if band(flags,0x0001) ~= 0 then
for i=1,nofglyphs+1 do
data[i] = dataoffset + readulong(f)
end
@@ -1130,7 +1130,7 @@ function readers.gvar(f,fontdata,specification,glyphdata,shapedata)
local allpoints = (shape.nofpoints or 0) -- + 1
local shared = false
local nofshared = 0
- if bittest(flags,0x8000) then -- has shared points
+ if band(flags,0x8000) ~= 0 then -- has shared points
-- go to the packed stream (get them once)
local current = getposition(f)
setposition(f,offset)
@@ -1143,9 +1143,9 @@ function readers.gvar(f,fontdata,specification,glyphdata,shapedata)
local size = readushort(f) -- check
local flags = readushort(f)
local index = band(flags,0x0FFF)
- local haspeak = bittest(flags,0x8000)
- local intermediate = bittest(flags,0x4000)
- local private = bittest(flags,0x2000)
+ local haspeak = band(flags,0x8000) ~= 0
+ local intermediate = band(flags,0x4000) ~= 0
+ local private = band(flags,0x2000) ~= 0
local peak = nil
local start = nil
local stop = nil
diff --git a/tex/context/base/mkiv/grph-epd.mkiv b/tex/context/base/mkiv/grph-epd.mkiv
index 8152772aa..153979fcc 100644
--- a/tex/context/base/mkiv/grph-epd.mkiv
+++ b/tex/context/base/mkiv/grph-epd.mkiv
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{grph-epd}{1.001}
+\registerctxluafile{grph-epd}{}
\def\figurereference{\clf_figurestatus{reference}{}} % might become private
diff --git a/tex/context/base/mkiv/grph-inc.mkiv b/tex/context/base/mkiv/grph-inc.mkiv
index eb8d8c104..a44d81e15 100644
--- a/tex/context/base/mkiv/grph-inc.mkiv
+++ b/tex/context/base/mkiv/grph-inc.mkiv
@@ -20,12 +20,12 @@
\writestatus{loading}{ConTeXt Graphic Macros / Figure Inclusion}
-\registerctxluafile{grph-inc}{1.001}
-\registerctxluafile{grph-con}{1.001}
-\registerctxluafile{grph-fil}{1.001}
-\registerctxluafile{grph-mem}{1.001}
-\registerctxluafile{grph-u3d}{1.001} % this will become a module
-\registerctxluafile{grph-swf}{1.001} % this will become a module
+\registerctxluafile{grph-inc}{}
+\registerctxluafile{grph-con}{}
+\registerctxluafile{grph-fil}{}
+\registerctxluafile{grph-mem}{}
+\registerctxluafile{grph-u3d}{} % this will become a module
+\registerctxluafile{grph-swf}{} % this will become a module
\unprotect
diff --git a/tex/context/base/mkiv/grph-pat.mkiv b/tex/context/base/mkiv/grph-pat.mkiv
index 0126647cc..c5f5fe7cf 100644
--- a/tex/context/base/mkiv/grph-pat.mkiv
+++ b/tex/context/base/mkiv/grph-pat.mkiv
@@ -22,7 +22,7 @@
\unprotect
-\registerctxluafile{grph-pat}{1.001}
+\registerctxluafile{grph-pat}{}
\unexpanded\def\registerpattern
{\begingroup
diff --git a/tex/context/base/mkiv/grph-raw.mkiv b/tex/context/base/mkiv/grph-raw.mkiv
index 8978ba267..4029c7cbd 100644
--- a/tex/context/base/mkiv/grph-raw.mkiv
+++ b/tex/context/base/mkiv/grph-raw.mkiv
@@ -39,7 +39,7 @@
%D draw textext("\bitmapimage[x=200,y=50]{\TestBitmap{50}{200}}") xsized 10cm ;
%D \stopMPcode
-\registerctxluafile{grph-raw}{1.001}
+\registerctxluafile{grph-raw}{}
\unprotect
diff --git a/tex/context/base/mkiv/grph-rul.mkiv b/tex/context/base/mkiv/grph-rul.mkiv
index 98aab3650..cdf39ae42 100644
--- a/tex/context/base/mkiv/grph-rul.mkiv
+++ b/tex/context/base/mkiv/grph-rul.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Graphic Macros / Rule Trickery}
-\registerctxluafile{grph-rul}{1.001}
+\registerctxluafile{grph-rul}{}
\unprotect
diff --git a/tex/context/base/mkiv/java-ini.mkiv b/tex/context/base/mkiv/java-ini.mkiv
index d6fe4dd8a..25b8ba600 100644
--- a/tex/context/base/mkiv/java-ini.mkiv
+++ b/tex/context/base/mkiv/java-ini.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt JavaScript Macros / Initialization}
-\registerctxluafile{java-ini}{1.001}
+\registerctxluafile{java-ini}{}
\unprotect
diff --git a/tex/context/base/mkiv/l-bit32.lua b/tex/context/base/mkiv/l-bit32.lua
new file mode 100644
index 000000000..592c48f8e
--- /dev/null
+++ b/tex/context/base/mkiv/l-bit32.lua
@@ -0,0 +1,148 @@
+if not modules then modules = { } end modules ['l-bit32'] = {
+ version = 1.001,
+ license = "the same as regular Lua",
+ source = "bitwise.lua, v 1.24 2014/12/26 17:20:53 roberto",
+ comment = "drop-in for bit32, adapted a bit by Hans Hagen",
+
+}
+
+-- Lua 5.3 has bitwise operators built in but code meant for 5.2 can expect the
+-- bit32 library to be present. For the moment (and maybe forever) we will ship
+-- the bit32 library as part of LuaTeX bit just in case it is missing, here is a
+-- drop-in. The code is an adapted version of code by Roberto. The Luajit variant
+-- is a mixture of mapping and magic.
+
+if bit32 then
+
+ -- lua 5.2: we're okay
+
+elseif utf8 then
+
+ -- lua 5.3: bitwise.lua, v 1.24 2014/12/26 17:20:53 roberto
+
+ bit32 = load ( [[
+local select = select -- instead of: arg = { ... }
+
+bit32 = {
+ bnot = function (a)
+ return ~a & 0xFFFFFFFF
+ end,
+ band = function (x, y, z, ...)
+ if not z then
+ return ((x or -1) & (y or -1)) & 0xFFFFFFFF
+ else
+ local res = x & y & z
+ for i=1,select("#",...) do
+ res = res & select(i,...)
+ end
+ return res & 0xFFFFFFFF
+ end
+ end,
+ bor = function (x, y, z, ...)
+ if not z then
+ return ((x or 0) | (y or 0)) & 0xFFFFFFFF
+ else
+ local res = x | y | z
+ for i=1,select("#",...) do
+ res = res | select(i,...)
+ end
+ return res & 0xFFFFFFFF
+ end
+ end,
+ bxor = function (x, y, z, ...)
+ if not z then
+ return ((x or 0) ~ (y or 0)) & 0xFFFFFFFF
+ else
+ local res = x ~ y ~ z
+ for i=1,select("#",...) do
+ res = res ~ select(i,...)
+ end
+ return res & 0xFFFFFFFF
+ end
+ end,
+ btest = function (x, y, z, ...)
+ if not z then
+ return (((x or -1) & (y or -1)) & 0xFFFFFFFF) ~= 0
+ else
+ local res = x & y & z
+ for i=1,select("#",...) do
+ res = res & select(i,...)
+ end
+ return (res & 0xFFFFFFFF) ~= 0
+ end
+ end,
+ lshift = function (a, b)
+ return ((a & 0xFFFFFFFF) << b) & 0xFFFFFFFF
+ end,
+ rshift = function (a, b)
+ return ((a & 0xFFFFFFFF) >> b) & 0xFFFFFFFF
+ end,
+ arshift = function (a, b)
+ a = a & 0xFFFFFFFF
+ if b <= 0 or (a & 0x80000000) == 0 then
+ return (a >> b) & 0xFFFFFFFF
+ else
+ return ((a >> b) | ~(0xFFFFFFFF >> b)) & 0xFFFFFFFF
+ end
+ end,
+ lrotate = function (a ,b)
+ b = b & 31
+ a = a & 0xFFFFFFFF
+ a = (a << b) | (a >> (32 - b))
+ return a & 0xFFFFFFFF
+ end,
+ rrotate = function (a, b)
+ b = -b & 31
+ a = a & 0xFFFFFFFF
+ a = (a << b) | (a >> (32 - b))
+ return a & 0xFFFFFFFF
+ end,
+ extract = function (a, f, w)
+ return (a >> f) & ~(-1 << (w or 1))
+ end,
+ replace = function (a, v, f, w)
+ local mask = ~(-1 << (w or 1))
+ return ((a & ~(mask << f)) | ((v & mask) << f)) & 0xFFFFFFFF
+ end,
+}
+ ]] )
+
+elseif bit then
+
+ -- luajit (for now)
+
+ bit32 = load ( [[
+local band, bnot, rshift, lshift = bit.band, bit.bnot, bit.rshift, bit.lshift
+
+bit32 = {
+ arshift = bit.arshift,
+ band = band,
+ bnot = bnot,
+ bor = bit.bor,
+ bxor = bit.bxor,
+ btest = function(...)
+ return band(...) ~= 0
+ end,
+ extract = function(a,f,w)
+ return band(rshift(a,f),2^(w or 1)-1)
+ end,
+ lrotate = bit.rol,
+ lshift = lshift,
+ replace = function(a,v,f,w)
+ local mask = 2^(w or 1)-1
+ return band(a,bnot(lshift(mask,f)))+lshift(band(v,mask),f)
+ end,
+ rrotate = bit.ror,
+ rshift = rshift,
+}
+ ]] )
+
+else
+
+ -- hope for the best or fail
+
+ bit32 = require("bit32")
+
+end
+
+return bit32
diff --git a/tex/context/base/mkiv/l-lua.lua b/tex/context/base/mkiv/l-lua.lua
index aa2644b9f..02e139eb1 100644
--- a/tex/context/base/mkiv/l-lua.lua
+++ b/tex/context/base/mkiv/l-lua.lua
@@ -228,31 +228,7 @@ elseif not ffi.number then
ffi.number = tonumber
end
--- if not bit32 then
--- bit32 = load ( [[ return {
--- band = function(a,b)
--- return (a & b)
--- end,
--- bnot = function(a)
--- return ~a & 0xFFFFFFFF
--- end,
--- bor = function(a,b)
--- return (a | b) & 0xFFFFFFFF
--- end,
--- btest = function(a,b)
--- return (a & b) ~= 0
--- end,
--- bxor = function(a,b)
--- return (a ~ b) & 0xFFFFFFFF
--- end,
--- extract = function(a,b,c)
--- return (a >> b) & ~(-1 << (c or 1))
--- end,
--- lshift = function(a,b)
--- return (a << b) & 0xFFFFFFFF
--- end,
--- rshift = function(a,b)
--- return (a >> b)
--- end,
--- } ]] ) ()
--- end
+if not bit32 and utf8 then
+ -- bit32 = load ( [[ -- replacement code with 5.3 syntax so that 5.2 doesn't bark on it ]] )
+ bit32 = require("l-bit32")
+end
diff --git a/tex/context/base/mkiv/l-macro-imp-optimize.lua b/tex/context/base/mkiv/l-macro-imp-optimize.lua
new file mode 100644
index 000000000..b2515af74
--- /dev/null
+++ b/tex/context/base/mkiv/l-macro-imp-optimize.lua
@@ -0,0 +1,63 @@
+if not modules then modules = { } end modules ['l-macro-imp-optimize'] = {
+ 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"
+}
+
+-- This is for ConTeXt only and used in development. Only in rare cases we
+-- will use this to gain a bit of performance or adapt to specific versions
+-- of Lua.
+
+-- There is no real gain as we hardly use these:
+--
+-- lua.macros.resolvestring [[
+-- #define round(a) ((a+0.5)//1)
+-- #define div(a,b) floor(a/b)
+-- #define mod(a,b) (a % b)
+-- #define odd(a) (a % 2 ~= 0)
+-- #define even(a) (a % 2 == 0)
+-- #define pow(x,y) (x^y)
+-- ]]
+
+if LUAVERSION >= 5.3 and lua.macros then
+
+ -- For the moment we only optimize in Lua 5.3:
+
+ lua.macros.enabled = true
+
+ -- This indirect method makes it possible to use both the functions
+ -- and the inline variant (which often looks better). Also, a mixed
+ -- 5,2 and 5.3 source is not possible because the 5.2 doesn't deal
+ -- with the newer 5.3 syntax.
+
+ -- We need to check for 64 usage: 0xFFFFFFFFFFFFFFFF (-1)
+
+ -- lua.macros.resolvestring [[
+ -- #define band(a,b) (a & b)
+ -- #define bnot(a) (~a & 0xFFFFFFFF)
+ -- #define bor(a,b) ((a | b) & 0xFFFFFFFF)
+ -- #define btest(a,b) ((a & b) ~= 0)
+ -- #define bxor(a,b) ((a ~ b) & 0xFFFFFFFF)
+ -- #define rshift(a,b) ((a & b) ~= 0)
+ -- #define extract(a,b,c) ((a >> b) & ~(-1 << c))
+ -- #define extract(a,b) ((a >> b) & 0x1))
+ -- #define lshift(a,b) ((a << b) & 0xFFFFFFFF)
+ -- #define rshift(a,b) ((a >> b) & 0xFFFFFFFF)
+ -- ]]
+
+ lua.macros.resolvestring [[
+ #define band(a,b) (a&b)
+ #define bnot(a) (~a&0xFFFFFFFF)
+ #define bor(a,b) ((a|b)&0xFFFFFFFF)
+ #define btest(a,b) ((a&b)~=0)
+ #define bxor(a,b) ((a~b)&0xFFFFFFFF)
+ #define rshift(a,b) ((a&b)~=0)
+ #define extract(a,b,c) ((a>>b)&~(-1<<c))
+ #define extract(a,b) ((a>>b)&0x1))
+ #define lshift(a,b) ((a<<b)&0xFFFFFFFF)
+ #define rshift(a,b) ((a>>b)&0xFFFFFFFF)
+ ]]
+
+end
diff --git a/tex/context/base/mkiv/l-macro.lua b/tex/context/base/mkiv/l-macro.lua
new file mode 100644
index 000000000..d2b8c7ae4
--- /dev/null
+++ b/tex/context/base/mkiv/l-macro.lua
@@ -0,0 +1,225 @@
+if not modules then modules = { } end modules ['l-macros'] = {
+ 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"
+}
+
+-- This is actually rather old code that I made as a demo for Luigi but that
+-- now comes in handy when we switch to Lua 5.3. The reason for using it (in
+-- in transition) is that we cannot mix 5.3 bit operators in files that get
+-- loaded in 5.2 (parsing happens before conditional testing).
+
+local S, P, R, V, C, Cs, Cc, Ct, Carg = lpeg.S, lpeg.P, lpeg.R, lpeg.V, lpeg.C, lpeg.Cs, lpeg.Cc, lpeg.Ct, lpeg.Carg
+local lpegmatch = lpeg.match
+local concat = table.concat
+local next = next
+
+local newline = S("\n\r")^1
+local continue = P("\\") * newline
+local spaces = S(" \t") + continue
+local name = R("az","AZ","__","09")^1
+local body = ((1+continue/"")-newline)^1
+local lparent = P("(")
+local rparent = P(")")
+local noparent = 1 - (lparent + rparent)
+local nested = P { lparent * (noparent + V(1))^0 * rparent }
+local escaped = P("\\") * P(1)
+local squote = P("'")
+local dquote = P('"')
+local quoted = dquote * (escaped + (1-dquote))^0 * dquote
+ + squote * (escaped + (1-squote))^0 * squote
+
+local arguments = lparent * Ct((Cs((nested+(quoted + 1 - S("),")))^1) + S(", "))^0) * rparent
+
+local macros = lua.macros or { }
+lua.macros = macros
+
+local patterns = { }
+local definitions = { }
+local resolve
+local subparser
+
+-- todo: zero case
+
+resolve = C(C(name) * arguments^-1) / function(raw,s,a)
+ local d = definitions[s]
+ if d then
+ if a then
+ local n = #a
+ local p = patterns[s][n]
+ if p then
+ local d = d[n]
+ for i=1,n do
+ a[i] = lpegmatch(subparser,a[i]) or a[i]
+ end
+ return lpegmatch(p,d,1,a) or d
+ else
+ return raw
+ end
+ else
+ return d[0] or raw
+ end
+ elseif a then
+ for i=1,#a do
+ a[i] = lpegmatch(subparser,a[i]) or a[i]
+ end
+ return s .. "(" .. concat(a,",") .. ")"
+ else
+ return raw
+ end
+end
+
+subparser = Cs((resolve + P(1))^1)
+
+local enddefine = P("#enddefine") / ""
+
+local beginregister = (C(name) * spaces^0 * (arguments + Cc(false)) * C((1-enddefine)^1) * enddefine) / function(k,a,v)
+ local n = 0
+ if a then
+ n = #a
+ local pattern = P(false)
+ for i=1,n do
+ pattern = pattern + (P(a[i]) * Carg(1)) / function(t) return t[i] end
+ end
+ pattern = Cs((pattern + P(1))^1)
+ local p = patterns[k]
+ if not p then
+ p = { [0] = false, false, false, false, false, false, false, false, false }
+ patterns[k] = p
+ end
+ p[n] = pattern
+ end
+ local d = definitions[k]
+ if not d then
+ d = { [0] = false, false, false, false, false, false, false, false, false }
+ definitions[k] = d
+ end
+ d[n] = lpegmatch(subparser,v) or v
+ return ""
+end
+
+local register = (C(name) * spaces^0 * (arguments + Cc(false)) * spaces^0 * C(body)) / function(k,a,v)
+ local n = 0
+ if a then
+ n = #a
+ local pattern = P(false)
+ for i=1,n do
+ pattern = pattern + (P(a[i]) * Carg(1)) / function(t) return t[i] end
+ end
+ pattern = Cs((pattern + P(1))^1)
+ local p = patterns[k]
+ if not p then
+ p = { [0] = false, false, false, false, false, false, false, false, false }
+ patterns[k] = p
+ end
+ p[n] = pattern
+ end
+ local d = definitions[k]
+ if not d then
+ d = { [0] = false, false, false, false, false, false, false, false, false }
+ definitions[k] = d
+ end
+ d[n] = lpegmatch(subparser,v) or v
+ return ""
+end
+
+local unregister = (C(name) * spaces^0 * (arguments + Cc(false))) / function(k,a)
+ local n = 0
+ if a then
+ n = #a
+ local p = patterns[k]
+ if p then
+ p[n] = false
+ end
+ end
+ local d = definitions[k]
+ if d then
+ d[n] = false
+ end
+ return ""
+end
+
+local begindefine = (P("begindefine") * spaces^0 / "") * beginregister
+local define = (P("define" ) * spaces^0 / "") * register
+local undefine = (P("undefine" ) * spaces^0 / "") * unregister
+
+local parser = Cs( ( ( (P("#")/"") * (define + begindefine + undefine) * (newline^0/"") ) + resolve + P(1) )^0 )
+
+function macros.reset()
+ definitions = { }
+ patterns = { }
+end
+
+function macros.resolvestring(str)
+ return lpegmatch(parser,str) or str
+end
+
+function macros.resolving()
+ return next(patterns)
+end
+
+-- local str = [[
+-- #define check(p,q) (p ~= 0) and (p > q)
+--
+-- #define oeps a > 10
+--
+-- #define whatever oeps
+--
+-- if whatever and check(1,2) then print("!") end
+-- if whatever and check(1,3) then print("!") end
+-- if whatever and check(1,4) then print("!") end
+-- if whatever and check(1,5) then print("!") end
+-- if whatever and check(1,6) then print("!") end
+-- if whatever and check(1,7) then print("!") end
+-- ]]
+--
+-- print(macros.resolvestring(str))
+--
+-- macros.resolvestring(io.loaddata("mymacros.lua"))
+-- loadstring(macros.resolvestring(io.loaddata("mytestcode.lua")))
+
+-- local luamacros = [[
+-- #begindefine setnodecodes
+-- local nodecodes = nodes.codes
+-- local hlist_code = nodecodes.hlist
+-- local vlist_code = nodecodes.vlist
+-- local glyph_code = nodecodes.glyph
+-- #enddefine
+--
+-- #define hlist(id) id == hlist_code
+-- #define vlist(id) id == vlist_code
+-- #define glyph(id) id == glyph_code
+-- ]]
+--
+-- local luacode = [[
+-- setnodecodes
+--
+-- if hlist(id) or vlist(id) then
+-- print("we have a list")
+-- elseif glyph(id) then
+-- print("we have a glyph")
+-- else
+-- print("i'm stymied")
+-- end
+--
+-- local z = band(0x23,x)
+-- local z = btest(0x23,x)
+-- local z = rshift(0x23,x)
+-- local z = lshift(0x23,x)
+-- ]]
+--
+-- require("l-macros-test-001")
+--
+-- macros.resolvestring(luamacros)
+--
+-- local newcode = macros.resolvestring(luacode)
+--
+-- print(newcode)
+--
+-- macros.reset()
+
+-- local d = io.loaddata("t:/sources/font-otr.lua")
+-- local n = macros.resolvestring(d)
+-- io.savedata("r:/tmp/o.lua",n)
diff --git a/tex/context/base/mkiv/l-math.lua b/tex/context/base/mkiv/l-math.lua
index ec62919b4..b764ab206 100644
--- a/tex/context/base/mkiv/l-math.lua
+++ b/tex/context/base/mkiv/l-math.lua
@@ -6,33 +6,145 @@ if not modules then modules = { } end modules ['l-math'] = {
license = "see context related readme files"
}
-local floor, sin, cos, tan = math.floor, math.sin, math.cos, math.tan
-
if not math.ceiling then
+
math.ceiling = math.ceil
+
end
if not math.round then
+
+ local floor = math.floor
+
function math.round(x) return floor(x + 0.5) end
+
end
if not math.div then
+
+ local floor = math.floor
+
function math.div(n,m) return floor(n/m) end
+
end
if not math.mod then
+
function math.mod(n,m) return n % m end
-end
-local pipi = 2*math.pi/360
+end
if not math.sind then
+
+ local sin, cos, tan = math.sin, math.cos, math.tan
+
+ local pipi = 2*math.pi/360
+
function math.sind(d) return sin(d*pipi) end
function math.cosd(d) return cos(d*pipi) end
function math.tand(d) return tan(d*pipi) end
+
end
if not math.odd then
+
function math.odd (n) return n % 2 ~= 0 end
function math.even(n) return n % 2 == 0 end
+
+end
+
+if not math.cosh then
+
+ local exp = math.exp
+
+ function math.cosh(x)
+ local xx = exp(x)
+ return (xx+1/xx)/2
+ end
+ function math.sinh(x)
+ local xx = exp(x)
+ return (xx-1/xx)/2
+ end
+ function math.tanh(x)
+ local xx = exp(x)
+ return (xx-1/xx)/(xx+1/xx)
+ end
+
+end
+
+if not math.pow then
+
+ function math.pow(x,y)
+ return x^y
+ end
+
+end
+
+if not math.atan2 then
+
+ math.atan2 = math.atan
+
+end
+
+if not math.ldexp then
+
+ function math.ldexp(x,e)
+ return x * 2.0^e
+ end
+
+end
+
+-- if not math.frexp then
+--
+-- -- not a oneliner so use a math library instead
+--
+-- function math.frexp(x,e)
+-- -- returns m and e such that x = m2e, e is an integer and the absolute
+-- -- value of m is in the range [0.5, 1) (or zero when x is zero)
+-- end
+--
+-- end
+
+if not math.log10 then
+
+ local ln = math.ln
+ local lt = ln(10)
+
+ function math.log10(x)
+ return ln(x) / lt
+ end
+
+end
+
+if not math.type then
+
+ function math.type()
+ return "float"
+ end
+
+end
+
+if not math.tointeger then
+
+ math.mininteger = -0x4FFFFFFFFFFF
+ math.maxinteger = 0x4FFFFFFFFFFF
+
+ local floor = math.floor
+
+ function math.tointeger(n)
+ local f = floor(n)
+ return f == n and f or nil
+ end
+
+end
+
+if not math.ult then
+
+ local floor = math.floor
+
+ function math.tointeger(m,n)
+ -- not ok but i'm not motivated to look into it now
+ return floor(m) < floor(n) -- unsigned comparison needed
+ end
+
end
diff --git a/tex/context/base/mkiv/l-number.lua b/tex/context/base/mkiv/l-number.lua
index c6f1e3359..a83e8f8f9 100644
--- a/tex/context/base/mkiv/l-number.lua
+++ b/tex/context/base/mkiv/l-number.lua
@@ -18,46 +18,50 @@ local floor = math.floor
number = number or { }
local number = number
-if bit32 then -- I wonder if this is faster
+-- begin obsolete code --
- local btest, bor = bit32.btest, bit32.bor
-
- function number.bit(p)
- return 2 ^ (p - 1) -- 1-based indexing
- end
-
- number.hasbit = btest
- number.setbit = bor
-
- function number.setbit(x,p) -- why not bor?
- return btest(x,p) and x or x + p
- end
-
- function number.clearbit(x,p)
- return btest(x,p) and x - p or x
- end
-
-else
-
- -- http://ricilake.blogspot.com/2007/10/iterating-bits-in-lua.html
-
- function number.bit(p)
- return 2 ^ (p - 1) -- 1-based indexing
- end
-
- function number.hasbit(x, p) -- typical call: if hasbit(x, bit(3)) then ...
- return x % (p + p) >= p
- end
-
- function number.setbit(x, p)
- return (x % (p + p) >= p) and x or x + p
- end
-
- function number.clearbit(x, p)
- return (x % (p + p) >= p) and x - p or x
- end
+-- if bit32 then
+--
+-- local btest, bor = bit32.btest, bit32.bor
+--
+-- function number.bit(p)
+-- return 2 ^ (p - 1) -- 1-based indexing
+-- end
+--
+-- number.hasbit = btest
+-- number.setbit = bor
+--
+-- function number.setbit(x,p) -- why not bor?
+-- return btest(x,p) and x or x + p
+-- end
+--
+-- function number.clearbit(x,p)
+-- return btest(x,p) and x - p or x
+-- end
+--
+-- else
+--
+-- -- http://ricilake.blogspot.com/2007/10/iterating-bits-in-lua.html
+--
+-- function number.bit(p)
+-- return 2 ^ (p - 1) -- 1-based indexing
+-- end
+--
+-- function number.hasbit(x, p) -- typical call: if hasbit(x, bit(3)) then ...
+-- return x % (p + p) >= p
+-- end
+--
+-- function number.setbit(x, p)
+-- return (x % (p + p) >= p) and x or x + p
+-- end
+--
+-- function number.clearbit(x, p)
+-- return (x % (p + p) >= p) and x - p or x
+-- end
+--
+-- end
-end
+-- end obsolete code --
-- print(number.tobitstring(8))
-- print(number.tobitstring(14))
@@ -152,60 +156,60 @@ function number.toevenhex(n)
end
end
--- a,b,c,d,e,f = number.toset(100101)
+-- -- a,b,c,d,e,f = number.toset(100101)
+-- --
+-- -- function number.toset(n)
+-- -- return match(tostring(n),"(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)")
+-- -- end
+-- --
+-- -- -- the lpeg way is slower on 8 digits, but faster on 4 digits, some 7.5%
+-- -- -- on
+-- --
+-- -- for i=1,1000000 do
+-- -- local a,b,c,d,e,f,g,h = number.toset(12345678)
+-- -- local a,b,c,d = number.toset(1234)
+-- -- local a,b,c = number.toset(123)
+-- -- local a,b,c = number.toset("123")
+-- -- end
+--
+-- local one = lpeg.C(1-lpeg.S('')/tonumber)^1
--
-- function number.toset(n)
--- return match(tostring(n),"(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)")
+-- return lpegmatch(one,tostring(n))
-- end
--
--- -- the lpeg way is slower on 8 digits, but faster on 4 digits, some 7.5%
--- -- on
+-- -- function number.bits(n,zero)
+-- -- local t, i = { }, (zero and 0) or 1
+-- -- while n > 0 do
+-- -- local m = n % 2
+-- -- if m > 0 then
+-- -- insert(t,1,i)
+-- -- end
+-- -- n = floor(n/2)
+-- -- i = i + 1
+-- -- end
+-- -- return t
+-- -- end
+-- --
+-- -- -- a bit faster
--
--- for i=1,1000000 do
--- local a,b,c,d,e,f,g,h = number.toset(12345678)
--- local a,b,c,d = number.toset(1234)
--- local a,b,c = number.toset(123)
--- local a,b,c = number.toset("123")
--- end
-
-local one = lpeg.C(1-lpeg.S('')/tonumber)^1
-
-function number.toset(n)
- return lpegmatch(one,tostring(n))
-end
-
--- function number.bits(n,zero)
--- local t, i = { }, (zero and 0) or 1
--- while n > 0 do
+-- local function bits(n,i,...)
+-- if n > 0 then
-- local m = n % 2
+-- local n = floor(n/2)
-- if m > 0 then
--- insert(t,1,i)
+-- return bits(n, i+1, i, ...)
+-- else
+-- return bits(n, i+1, ...)
-- end
--- n = floor(n/2)
--- i = i + 1
+-- else
+-- return ...
-- end
--- return t
-- end
--
--- -- a bit faster
-
-local function bits(n,i,...)
- if n > 0 then
- local m = n % 2
- local n = floor(n/2)
- if m > 0 then
- return bits(n, i+1, i, ...)
- else
- return bits(n, i+1, ...)
- end
- else
- return ...
- end
-end
-
-function number.bits(n)
- return { bits(n,1) }
-end
+-- function number.bits(n)
+-- return { bits(n,1) }
+-- end
function number.bytetodecimal(b)
local d = floor(b * 100 / 255 + 0.5)
diff --git a/tex/context/base/mkiv/l-package.lua b/tex/context/base/mkiv/l-package.lua
index 5f72dd6b2..6a4f9d011 100644
--- a/tex/context/base/mkiv/l-package.lua
+++ b/tex/context/base/mkiv/l-package.lua
@@ -22,9 +22,12 @@ local gsub, format, find = string.gsub, string.format, string.find
local P, S, Cs, lpegmatch = lpeg.P, lpeg.S, lpeg.Cs, lpeg.match
local package = package
-local searchers = package.searchers or package.loaders
+local searchers = package.searchers
local insert, remove = table.insert, table.remove
+-------.loaders = nil -- old stuff that we don't want
+-------.seeall = nil -- old stuff that we don't want
+
-- dummies
local filejoin = file and file.join or function(path,name) return path .. "/" .. name end
diff --git a/tex/context/base/mkiv/l-unicode.lua b/tex/context/base/mkiv/l-unicode.lua
index e4a182980..a470fe1ff 100644
--- a/tex/context/base/mkiv/l-unicode.lua
+++ b/tex/context/base/mkiv/l-unicode.lua
@@ -37,6 +37,8 @@ local type = type
local char, byte, format, sub, gmatch = string.char, string.byte, string.format, string.sub, string.gmatch
local concat = table.concat
local P, C, R, Cs, Ct, Cmt, Cc, Carg, Cp = lpeg.P, lpeg.C, lpeg.R, lpeg.Cs, lpeg.Ct, lpeg.Cmt, lpeg.Cc, lpeg.Carg, lpeg.Cp
+local floor = math.floor
+local rshift = bit32.rshift
local lpegmatch = lpeg.match
local patterns = lpeg.patterns
@@ -73,7 +75,7 @@ if not utf.char then
-- no multiples
- local floor, char = math.floor, string.char
+ local char = string.char
function utf.char(n)
if n < 0x80 then
@@ -82,17 +84,26 @@ if not utf.char then
elseif n < 0x800 then
-- 110bbbaa : 0xC0 : n >> 6
-- 10aaaaaa : 0x80 : n & 0x3F
+-- return char(
+-- 0xC0 + floor(n/0x40),
+-- 0x80 + (n % 0x40)
+-- )
return char(
- 0xC0 + floor(n/0x40),
+ 0xC0 + rshift(n,6),
0x80 + (n % 0x40)
)
elseif n < 0x10000 then
-- 1110bbbb : 0xE0 : n >> 12
-- 10bbbbaa : 0x80 : (n >> 6) & 0x3F
-- 10aaaaaa : 0x80 : n & 0x3F
+-- return char(
+-- 0xE0 + floor(n/0x1000),
+-- 0x80 + (floor(n/0x40) % 0x40),
+-- 0x80 + (n % 0x40)
+-- )
return char(
- 0xE0 + floor(n/0x1000),
- 0x80 + (floor(n/0x40) % 0x40),
+ 0xE0 + rshift(n,12),
+ 0x80 + (rshift(n,6) % 0x40),
0x80 + (n % 0x40)
)
elseif n < 0x200000 then
@@ -101,10 +112,16 @@ if not utf.char then
-- 10bbbbaa : 0x80 : (n >> 6) & 0x3F
-- 10aaaaaa : 0x80 : n & 0x3F
-- dddd : ccccc - 1
+-- return char(
+-- 0xF0 + floor(n/0x40000),
+-- 0x80 + (floor(n/0x1000) % 0x40),
+-- 0x80 + (floor(n/0x40) % 0x40),
+-- 0x80 + (n % 0x40)
+-- )
return char(
- 0xF0 + floor(n/0x40000),
- 0x80 + (floor(n/0x1000) % 0x40),
- 0x80 + (floor(n/0x40) % 0x40),
+ 0xF0 + rshift(n,18),
+ 0x80 + (rshift(n,12) % 0x40),
+ 0x80 + (rshift(n,6) % 0x40),
0x80 + (n % 0x40)
)
else
@@ -188,43 +205,6 @@ local one = P(1)
local two = C(1) * C(1)
local four = C(R(utfchar(0xD8),utfchar(0xFF))) * C(1) * C(1) * C(1)
--- actually one of them is already utf ... sort of useless this one
-
--- function utf.char(n)
--- if n < 0x80 then
--- return char(n)
--- elseif n < 0x800 then
--- return char(
--- 0xC0 + floor(n/0x40),
--- 0x80 + (n % 0x40)
--- )
--- elseif n < 0x10000 then
--- return char(
--- 0xE0 + floor(n/0x1000),
--- 0x80 + (floor(n/0x40) % 0x40),
--- 0x80 + (n % 0x40)
--- )
--- elseif n < 0x40000 then
--- return char(
--- 0xF0 + floor(n/0x40000),
--- 0x80 + floor(n/0x1000),
--- 0x80 + (floor(n/0x40) % 0x40),
--- 0x80 + (n % 0x40)
--- )
--- else
--- -- return char(
--- -- 0xF1 + floor(n/0x1000000),
--- -- 0x80 + floor(n/0x40000),
--- -- 0x80 + floor(n/0x1000),
--- -- 0x80 + (floor(n/0x40) % 0x40),
--- -- 0x80 + (n % 0x40)
--- -- )
--- return "?"
--- end
--- end
---
--- merge into:
-
local pattern = P("\254\255") * Cs( (
four / function(a,b,c,d)
local ab = 0xFF * byte(a) + byte(b)
@@ -1062,23 +1042,28 @@ function utf.utf32_to_utf8_t(t,endian)
return endian and utf32_to_utf8_be_t(t) or utf32_to_utf8_le_t(t) or t
end
+-- floor(b/256) => rshift(b, 8)
+-- floor(b/1024) => rshift(b,10)
+
local function little(b)
if b < 0x10000 then
- return char(b%256,b/256)
+ return char(b%256,rshift(b,8))
else
b = b - 0x10000
- local b1, b2 = b/1024 + 0xD800, b%1024 + 0xDC00
- return char(b1%256,b1/256,b2%256,b2/256)
+ local b1 = rshift(b,10) + 0xD800
+ local b2 = b%1024 + 0xDC00
+ return char(b1%256,rshift(b1,8),b2%256,rshift(b2,8))
end
end
local function big(b)
if b < 0x10000 then
- return char(b/256,b%256)
+ return char(rshift(b,8),b%256)
else
b = b - 0x10000
- local b1, b2 = b/1024 + 0xD800, b%1024 + 0xDC00
- return char(b1/256,b1%256,b2/256,b2%256)
+ local b1 = rshift(b,10) + 0xD800
+ local b2 = b%1024 + 0xDC00
+ return char(rshift(b1,8),b1%256,rshift(b2,8),b2%256)
end
end
diff --git a/tex/context/base/mkiv/lang-hyp.mkiv b/tex/context/base/mkiv/lang-hyp.mkiv
index c111bc31a..feec82659 100644
--- a/tex/context/base/mkiv/lang-hyp.mkiv
+++ b/tex/context/base/mkiv/lang-hyp.mkiv
@@ -30,8 +30,8 @@
\writestatus{loading}{ConTeXt Language Macros / Initialization}
-\registerctxluafile{lang-dis}{1.001}
-\registerctxluafile{lang-hyp}{1.001}
+\registerctxluafile{lang-dis}{}
+\registerctxluafile{lang-hyp}{}
\unprotect
diff --git a/tex/context/base/mkiv/lang-ini.mkiv b/tex/context/base/mkiv/lang-ini.mkiv
index 34e4dfa49..9c5251913 100644
--- a/tex/context/base/mkiv/lang-ini.mkiv
+++ b/tex/context/base/mkiv/lang-ini.mkiv
@@ -22,9 +22,9 @@
\writestatus{loading}{ConTeXt Language Macros / Initialization}
-\registerctxluafile{lang-ini}{1.001}
-\registerctxluafile{lang-def}{1.001}
-\registerctxluafile{lang-cnt}{1.001}
+\registerctxluafile{lang-ini}{}
+\registerctxluafile{lang-def}{}
+\registerctxluafile{lang-cnt}{}
\unprotect
diff --git a/tex/context/base/mkiv/lang-lab.mkiv b/tex/context/base/mkiv/lang-lab.mkiv
index b4875dd59..73637753d 100644
--- a/tex/context/base/mkiv/lang-lab.mkiv
+++ b/tex/context/base/mkiv/lang-lab.mkiv
@@ -13,8 +13,8 @@
\writestatus{loading}{ConTeXt Language Macros / Labels}
-\registerctxluafile{lang-lab}{1.001}
-\registerctxluafile{lang-txt}{1.001}
+\registerctxluafile{lang-lab}{}
+\registerctxluafile{lang-txt}{}
\unprotect
diff --git a/tex/context/base/mkiv/lang-rep.mkiv b/tex/context/base/mkiv/lang-rep.mkiv
index cdb98a154..7864b029a 100644
--- a/tex/context/base/mkiv/lang-rep.mkiv
+++ b/tex/context/base/mkiv/lang-rep.mkiv
@@ -19,7 +19,7 @@
\unprotect
-\registerctxluafile{lang-rep}{1.001}
+\registerctxluafile{lang-rep}{}
\definesystemattribute[replacements][public,global]
diff --git a/tex/context/base/mkiv/lang-url.mkiv b/tex/context/base/mkiv/lang-url.mkiv
index 833a583f9..6afef63ce 100644
--- a/tex/context/base/mkiv/lang-url.mkiv
+++ b/tex/context/base/mkiv/lang-url.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{lang-url}{1.001}
+\registerctxluafile{lang-url}{}
\unprotect
diff --git a/tex/context/base/mkiv/lang-wrd.mkiv b/tex/context/base/mkiv/lang-wrd.mkiv
index 8c544773b..75eec48b1 100644
--- a/tex/context/base/mkiv/lang-wrd.mkiv
+++ b/tex/context/base/mkiv/lang-wrd.mkiv
@@ -15,7 +15,7 @@
\writestatus{loading}{ConTeXt Language Macros / Checking}
-\registerctxluafile{lang-wrd}{1.001}
+\registerctxluafile{lang-wrd}{}
\unprotect
diff --git a/tex/context/base/mkiv/layo-ini.mkiv b/tex/context/base/mkiv/layo-ini.mkiv
index 9097265c9..fc0286fdd 100644
--- a/tex/context/base/mkiv/layo-ini.mkiv
+++ b/tex/context/base/mkiv/layo-ini.mkiv
@@ -26,6 +26,6 @@
\ifdefined\pagenoshift \else \newcount \pagenoshift \fi
\ifdefined\realpageno \else \newcount \realpageno \fi
-\registerctxluafile{layo-ini}{1.001}
+\registerctxluafile{layo-ini}{}
\protect \endinput
diff --git a/tex/context/base/mkiv/lpdf-ini.lua b/tex/context/base/mkiv/lpdf-ini.lua
index 3e05bff77..e197e201f 100644
--- a/tex/context/base/mkiv/lpdf-ini.lua
+++ b/tex/context/base/mkiv/lpdf-ini.lua
@@ -11,11 +11,12 @@ if not modules then modules = { } end modules ['lpdf-ini'] = {
local setmetatable, getmetatable, type, next, tostring, tonumber, rawset = setmetatable, getmetatable, type, next, tostring, tonumber, rawset
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 sind, cosd, max, min = math.sind, math.cosd, 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
+local rshift = bit32.rshift
local report_objects = logs.reporter("backend","objects")
local report_finalizing = logs.reporter("backend","finalizing")
@@ -253,8 +254,7 @@ end
-- if b < 0x10000 then
-- r[n] = format("%04x",b)
-- else
--- -- r[n] = format("%04x%04x",b/1024+0xD800,b%1024+0xDC00)
--- r[n] = format("%04x%04x",floor(b/1024),b%1024+0xDC00) --bit32.rshift(b,10)
+-- r[n] = format("%04x%04x",rshift(b,10),b%1024+0xDC00)
-- end
-- end
-- n = n + 1
@@ -268,8 +268,7 @@ local cache = table.setmetatableindex(function(t,k) -- can be made weak
if v < 0x10000 then
v = format("%04x",v)
else
- -- v = format("%04x%04x",v/1024+0xD800,v%1024+0xDC00)
- v = format("%04x%04x",floor(v/1024),v%1024+0xDC00)
+ v = format("%04x%04x",rshift(v,10),v%1024+0xDC00)
end
t[k] = v
return v
@@ -1268,11 +1267,13 @@ do
-- todo: use tounicode from the font mapper
+ -- floor(unicode/1024) => rshift(unicode,10) -- better for 5.3
+
function codeinjections.unicodetoactualtext(unicode,pdfcode)
if unicode < 0x10000 then
return f_actual_text_one(unicode,pdfcode)
else
- return f_actual_text_two(unicode/1024+0xD800,unicode%1024+0xDC00,pdfcode)
+ return f_actual_text_two(rshift(unicode,10)+0xD800,unicode%1024+0xDC00,pdfcode)
end
end
@@ -1282,7 +1283,7 @@ do
elseif unicode < 0x10000 then
return f_actual_text_one_b(unicode)
else
- return f_actual_text_two_b(unicode/1024+0xD800,unicode%1024+0xDC00)
+ return f_actual_text_two_b(rshift(unicode,10)+0xD800,unicode%1024+0xDC00)
end
end
@@ -1296,7 +1297,7 @@ do
elseif unicode < 0x10000 then
return f_actual_text_one_b_not(unicode)
else
- return f_actual_text_two_b_not(unicode/1024+0xD800,unicode%1024+0xDC00)
+ return f_actual_text_two_b_not(rshift(unicode,10)+0xD800,unicode%1024+0xDC00)
end
end
diff --git a/tex/context/base/mkiv/luat-bas.mkiv b/tex/context/base/mkiv/luat-bas.mkiv
index cb00d8f55..b1af4da3e 100644
--- a/tex/context/base/mkiv/luat-bas.mkiv
+++ b/tex/context/base/mkiv/luat-bas.mkiv
@@ -13,35 +13,38 @@
\writestatus{loading}{ConTeXt Lua Macros / Basic Lua Libraries}
-\registerctxluafile{l-lua} {1.001} % before sandbox
-\registerctxluafile{l-sandbox} {1.001}
-\registerctxluafile{l-package} {1.001}
-\registerctxluafile{l-lpeg} {1.001}
-\registerctxluafile{l-function}{1.001}
-\registerctxluafile{l-string} {1.001}
-\registerctxluafile{l-table} {1.001}
-\registerctxluafile{l-boolean} {1.001}
-\registerctxluafile{l-number} {1.001}
-\registerctxluafile{l-math} {1.001}
-%registerctxluafile{l-aux} {1.001}
-\registerctxluafile{l-io} {1.001}
-\registerctxluafile{l-os} {1.001}
-\registerctxluafile{l-file} {1.001}
-\registerctxluafile{l-gzip} {1.001}
-\registerctxluafile{l-md5} {1.001}
-\registerctxluafile{l-dir} {1.001}
-\registerctxluafile{l-unicode} {1.001}
-%registerctxluafile{l-utils} {1.001}
-\registerctxluafile{l-url} {1.001}
-\registerctxluafile{l-set} {1.001}
+\registerctxluafile{l-lua} {} % before sandbox
+\registerctxluafile{l-macro} {}
+\registerctxluafile{l-sandbox} {}
+\registerctxluafile{l-package} {}
+\registerctxluafile{l-lpeg} {}
+\registerctxluafile{l-function}{}
+\registerctxluafile{l-string} {}
+\registerctxluafile{l-table} {}
+\registerctxluafile{l-boolean} {}
+\registerctxluafile{l-number} {}
+\registerctxluafile{l-math} {}
+%registerctxluafile{l-aux} {}
+\registerctxluafile{l-io} {}
+\registerctxluafile{l-os} {}
+\registerctxluafile{l-file} {}
+\registerctxluafile{l-gzip} {}
+\registerctxluafile{l-md5} {}
+\registerctxluafile{l-dir} {}
+\registerctxluafile{l-unicode} {optimize}
+%registerctxluafile{l-utils} {}
+\registerctxluafile{l-url} {}
+\registerctxluafile{l-set} {}
-% \registerctxluafile{socket.lua}{}
-% \registerctxluafile{ltn12.lua} {}
-% \registerctxluafile{mime.lua} {}
-% \registerctxluafile{http.lua} {}
-% \registerctxluafile{url.lua} {}
-% \registerctxluafile{tp.lua} {}
-% \registerctxluafile{ftp.lua} {}
-% %registerctxluafile{smtp.lua} {}
+\registerctxluafile{l-macro-imp-optimize}{}
+
+% \registerctxluafile{socket}{}
+% \registerctxluafile{ltn12} {}
+% \registerctxluafile{mime} {}
+% \registerctxluafile{http} {}
+% \registerctxluafile{url} {}
+% \registerctxluafile{tp} {}
+% \registerctxluafile{ftp} {}
+% %registerctxluafile{smtp} {}
\endinput
diff --git a/tex/context/base/mkiv/luat-cod.lua b/tex/context/base/mkiv/luat-cod.lua
index 88b7039d9..3b0881147 100644
--- a/tex/context/base/mkiv/luat-cod.lua
+++ b/tex/context/base/mkiv/luat-cod.lua
@@ -7,7 +7,7 @@ if not modules then modules = { } end modules ['luat-cod'] = {
}
local type, loadfile, tonumber = type, loadfile, tonumber
-local match, gsub, find, format = string.match, string.gsub, string.find, string.format
+local match, gsub, find, format, gmatch = string.match, string.gsub, string.find, string.format, string.gmatch
local texconfig, lua = texconfig, lua
@@ -37,22 +37,28 @@ end
-- no file.* functions yet
-function lua.registercode(filename,version)
+function lua.registercode(filename,options)
local barename = gsub(filename,"%.[%a%d]+$","")
if barename == filename then filename = filename .. ".lua" end
local basename = match(barename,"^.+[/\\](.-)$") or barename
if not bytedone[basename] then
- local code = environment.luafilechunk(filename)
+ local opts = { }
+ if options ~= "" then
+ for s in gmatch(options,"([a-z]+)") do
+ opts[s] = true
+ end
+ end
+ local code = environment.luafilechunk(filename,false,opts.optimize)
if code then
bytedone[basename] = true
if environment.initex then
local n = lua.lastbytecode + 1
- bytedata[n] = { barename, version or "0.000" }
+ bytedata[n] = { name = barename, options = opts }
bytecode[n] = code
lua.lastbytecode = n
end
elseif environment.initex then
- texio.write_nl("\nerror loading file: " .. filename .. " (aborting)")
+ texio.write_nl(format("\nerror loading file: %s (aborting)",filename))
os.exit()
end
end
diff --git a/tex/context/base/mkiv/luat-cod.mkiv b/tex/context/base/mkiv/luat-cod.mkiv
index 9ce6161c3..823b918c3 100644
--- a/tex/context/base/mkiv/luat-cod.mkiv
+++ b/tex/context/base/mkiv/luat-cod.mkiv
@@ -67,12 +67,12 @@
%D Reporting the version of \LUA\ that we use is done as follows:
-\edef\luaversion{\ctxwrite{_VERSION}}
+\def\luaversion{\ctxwrite{LUAVERSION}}
\def\registerctxluafile#1#2{\ctxlua{lua.registercode("#1","#2")}}
\def\ctxloadluafile #1{\ctxlua{lua.registercode("#1")}}
-\registerctxluafile{luat-cod}{1.001}
+\registerctxluafile{luat-cod}{}
% \everydump\expandafter{\the\everydump\ctxlua{lua.finalize()}}
diff --git a/tex/context/base/mkiv/luat-env.lua b/tex/context/base/mkiv/luat-env.lua
index 5f2a0d281..5b46b4036 100644
--- a/tex/context/base/mkiv/luat-env.lua
+++ b/tex/context/base/mkiv/luat-env.lua
@@ -97,24 +97,16 @@ local function strippable(filename)
end
end
-function environment.luafilechunk(filename,silent) -- used for loading lua bytecode in the format
+function environment.luafilechunk(filename,silent,macros) -- used for loading lua bytecode in the format
filename = file.replacesuffix(filename, "lua")
local fullname = environment.luafile(filename)
if fullname and fullname ~= "" then
- local data = luautilities.loadedluacode(fullname,strippable,filename) -- can be overloaded
--- if trace_locating then
--- report_lua("loading file %a %s",fullname,not data and "failed" or "succeeded")
--- elseif not silent then
--- texio.write("<",data and "+ " or "- ",fullname,">")
--- end
+ local data = luautilities.loadedluacode(fullname,strippable,filename,macros)
if not silent then
report_lua("loading file %a %s",fullname,not data and "failed" or "succeeded")
end
return data
else
--- if trace_locating then
--- report_lua("unknown file %a",filename)
--- end
if not silent then
report_lua("unknown file %a",filename)
end
diff --git a/tex/context/base/mkiv/luat-lib.mkiv b/tex/context/base/mkiv/luat-lib.mkiv
index c75b9c6b1..0df31a4e5 100644
--- a/tex/context/base/mkiv/luat-lib.mkiv
+++ b/tex/context/base/mkiv/luat-lib.mkiv
@@ -13,80 +13,80 @@
\writestatus{loading}{ConTeXt Lua Macros / Libraries}
-\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}
-%registerctxluafile{util-mrg}{1.001} % not needed in context itself, only mtxrun
-%registerctxluafile{util-lua}{1.001} % moved
-\registerctxluafile{util-prs}{1.001}
-\registerctxluafile{util-fmt}{1.001}
-\registerctxluafile{util-dim}{1.001}
+\registerctxluafile{util-str}{}
+\registerctxluafile{util-tab}{}
+\registerctxluafile{util-fil}{optimize}
+\registerctxluafile{util-sac}{optimize}
+\registerctxluafile{util-sto}{} % could also be done in trac-deb.mkiv
+\registerctxluafile{util-pck}{}
+\registerctxluafile{util-seq}{}
+%registerctxluafile{util-mrg}{} % not needed in context itself, only mtxrun
+%registerctxluafile{util-lua}{} % moved
+\registerctxluafile{util-prs}{}
+\registerctxluafile{util-fmt}{}
+\registerctxluafile{util-dim}{}
-%registerctxluafile{trac-inf}{1.001}
-\registerctxluafile{trac-set}{1.001}
-\registerctxluafile{trac-log}{1.001}
-\registerctxluafile{trac-inf}{1.001}
-%registerctxluafile{trac-pro}{1.001}
-\registerctxluafile{util-lua}{1.001}
-\registerctxluafile{util-deb}{1.001} % could also be done in trac-deb.mkiv
+%registerctxluafile{trac-inf}{}
+\registerctxluafile{trac-set}{}
+\registerctxluafile{trac-log}{}
+\registerctxluafile{trac-inf}{}
+%registerctxluafile{trac-pro}{}
+\registerctxluafile{util-lua}{}
+\registerctxluafile{util-deb}{} % could also be done in trac-deb.mkiv
-\registerctxluafile{util-tpl}{1.001} % needs tracker
+\registerctxluafile{util-tpl}{} % needs tracker
-\registerctxluafile{util-sta}{1.001}
+\registerctxluafile{util-sta}{}
-\registerctxluafile{util-sbx}{1.001} % needs tracker and templates
+\registerctxluafile{util-sbx}{} % needs tracker and templates
-\registerctxluafile{data-ini}{1.001}
-\registerctxluafile{data-exp}{1.001}
-\registerctxluafile{data-env}{1.001}
-\registerctxluafile{data-tmp}{1.001}
-\registerctxluafile{data-met}{1.001}
-\registerctxluafile{data-res}{1.001}
-\registerctxluafile{data-inp}{1.001}
-\registerctxluafile{data-out}{1.001}
-\registerctxluafile{data-fil}{1.001}
+\registerctxluafile{data-ini}{}
+\registerctxluafile{data-exp}{}
+\registerctxluafile{data-env}{}
+\registerctxluafile{data-tmp}{}
+\registerctxluafile{data-met}{}
+\registerctxluafile{data-res}{}
+\registerctxluafile{data-inp}{}
+\registerctxluafile{data-out}{}
+\registerctxluafile{data-fil}{}
-\registerctxluafile{data-pre}{1.001}
-\registerctxluafile{data-tex}{1.001}
-\registerctxluafile{data-vir}{1.001}
-\registerctxluafile{data-bin}{1.001}
-\registerctxluafile{data-zip}{1.001}
-%registerctxluafile{data-crl}{1.001}
-\registerctxluafile{data-sch}{1.001}
-\registerctxluafile{data-tre}{1.001}
-\registerctxluafile{data-lua}{1.001}
-\registerctxluafile{data-ctx}{1.001}
-\registerctxluafile{data-con}{1.001}
-\registerctxluafile{data-use}{1.001}
-\registerctxluafile{data-aux}{1.001}
+\registerctxluafile{data-pre}{}
+\registerctxluafile{data-tex}{}
+\registerctxluafile{data-vir}{}
+\registerctxluafile{data-bin}{}
+\registerctxluafile{data-zip}{}
+%registerctxluafile{data-crl}{}
+\registerctxluafile{data-sch}{}
+\registerctxluafile{data-tre}{}
+\registerctxluafile{data-lua}{}
+\registerctxluafile{data-ctx}{}
+\registerctxluafile{data-con}{}
+\registerctxluafile{data-use}{}
+\registerctxluafile{data-aux}{}
-\registerctxluafile{util-lib}{1.001}
+\registerctxluafile{util-lib}{}
-\registerctxluafile{luat-cbk}{1.001}
-\registerctxluafile{luat-run}{1.001}
-\registerctxluafile{luat-fio}{1.001}
-\registerctxluafile{luat-cnf}{1.001}
-\registerctxluafile{luat-lua}{1.001}
-\registerctxluafile{luat-sto}{1.001}
-\registerctxluafile{luat-ini}{1.001}
-\registerctxluafile{util-env}{1.001}
-\registerctxluafile{luat-env}{1.001}
-\registerctxluafile{luat-exe}{1.001} % simplified
-\registerctxluafile{luat-iop}{1.001} % simplified
-\registerctxluafile{luat-bwc}{1.001}
-\registerctxluafile{trac-lmx}{1.001} % might become l-lmx or luat-lmx
-\registerctxluafile{luat-mac}{1.001}
-%registerctxluafile{luat-prp}{1.001} % for the moment of not much use
+\registerctxluafile{luat-cbk}{}
+\registerctxluafile{luat-run}{}
+\registerctxluafile{luat-fio}{}
+\registerctxluafile{luat-cnf}{}
+\registerctxluafile{luat-lua}{}
+\registerctxluafile{luat-sto}{}
+\registerctxluafile{luat-ini}{}
+\registerctxluafile{util-env}{}
+\registerctxluafile{luat-env}{}
+\registerctxluafile{luat-exe}{} % simplified
+\registerctxluafile{luat-iop}{} % simplified
+\registerctxluafile{luat-bwc}{}
+\registerctxluafile{trac-lmx}{} % might become l-lmx or luat-lmx
+\registerctxluafile{luat-mac}{}
+%registerctxluafile{luat-prp}{} % for the moment of not much use
-\registerctxluafile{lxml-tab}{1.001}
-\registerctxluafile{lxml-lpt}{1.001}
-\registerctxluafile{lxml-xml}{1.001}
-\registerctxluafile{lxml-aux}{1.001}
-\registerctxluafile{lxml-mis}{1.001}
+\registerctxluafile{lxml-tab}{}
+\registerctxluafile{lxml-lpt}{}
+\registerctxluafile{lxml-xml}{}
+\registerctxluafile{lxml-aux}{}
+\registerctxluafile{lxml-mis}{}
\normalprotected\def\writestatus#1#2{\ctxlua{logs.status([==[#1]==],[==[#2]==])}}
\normalprotected\def\writestring #1{\ctxlua{logs.writer([==[#1]==],"\string\n")}}
diff --git a/tex/context/base/mkiv/luat-usr.mkiv b/tex/context/base/mkiv/luat-usr.mkiv
index 92d40010c..760de9f21 100644
--- a/tex/context/base/mkiv/luat-usr.mkiv
+++ b/tex/context/base/mkiv/luat-usr.mkiv
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{luat-usr}{1.001}
+\registerctxluafile{luat-usr}{}
%D A few goodies:
%D
diff --git a/tex/context/base/mkiv/lxml-css.mkiv b/tex/context/base/mkiv/lxml-css.mkiv
index 33d372569..cb8735485 100644
--- a/tex/context/base/mkiv/lxml-css.mkiv
+++ b/tex/context/base/mkiv/lxml-css.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{lxml-css}{1.001}
+\registerctxluafile{lxml-css}{}
\def\ctxmodulecss#1{\ctxlua{moduledata.css.#1}}
diff --git a/tex/context/base/mkiv/lxml-ctx.mkiv b/tex/context/base/mkiv/lxml-ctx.mkiv
index 6691e36bb..e0beb22bf 100644
--- a/tex/context/base/mkiv/lxml-ctx.mkiv
+++ b/tex/context/base/mkiv/lxml-ctx.mkiv
@@ -16,7 +16,7 @@
\writestatus{loading}{ConTeXt XML Support / Goodies}
-\registerctxluafile{lxml-ctx}{1.001}
+\registerctxluafile{lxml-ctx}{}
\unprotect
diff --git a/tex/context/base/mkiv/lxml-ini.mkiv b/tex/context/base/mkiv/lxml-ini.mkiv
index 9c0b70b0b..ef00316f0 100644
--- a/tex/context/base/mkiv/lxml-ini.mkiv
+++ b/tex/context/base/mkiv/lxml-ini.mkiv
@@ -16,15 +16,15 @@
\writestatus{loading}{ConTeXt XML Support / Initialization}
-%registerctxluafile{lxml-tab}{1.001} % loader
-%registerctxluafile{lxml-lpt}{1.001} % parser
-%registerctxluafile{lxml-xml}{1.001} % xml finalizers
-%registerctxluafile{lxml-aux}{1.001} % extras using parser
-%registerctxluafile{lxml-mis}{1.001} % extras independent of parser
-\registerctxluafile{lxml-ent}{1.001} % entity hacks
-\registerctxluafile{lxml-tex}{1.001} % tex finalizers
-\registerctxluafile{lxml-dir}{1.001} % ctx hacks
-\registerctxluafile{lxml-ini}{1.001} % interface
+%registerctxluafile{lxml-tab}{} % loader
+%registerctxluafile{lxml-lpt}{} % parser
+%registerctxluafile{lxml-xml}{} % xml finalizers
+%registerctxluafile{lxml-aux}{} % extras using parser
+%registerctxluafile{lxml-mis}{} % extras independent of parser
+\registerctxluafile{lxml-ent}{} % entity hacks
+\registerctxluafile{lxml-tex}{} % tex finalizers
+\registerctxluafile{lxml-dir}{} % ctx hacks
+\registerctxluafile{lxml-ini}{} % interface
\unprotect
diff --git a/tex/context/base/mkiv/lxml-sor.mkiv b/tex/context/base/mkiv/lxml-sor.mkiv
index 0d8eb6ba1..298828611 100644
--- a/tex/context/base/mkiv/lxml-sor.mkiv
+++ b/tex/context/base/mkiv/lxml-sor.mkiv
@@ -15,7 +15,7 @@
\writestatus{loading}{ConTeXt XML Support / Sorting}
-\registerctxluafile{lxml-sor}{1.001}
+\registerctxluafile{lxml-sor}{}
\unprotect
diff --git a/tex/context/base/mkiv/m-fonts-plugins.mkiv b/tex/context/base/mkiv/m-fonts-plugins.mkiv
index 85411025f..b74b8c3d0 100644
--- a/tex/context/base/mkiv/m-fonts-plugins.mkiv
+++ b/tex/context/base/mkiv/m-fonts-plugins.mkiv
@@ -21,8 +21,8 @@
% \enabletrackers[resolvers.ffilib]
-\registerctxluafile{font-txt}{1.001} % generic text handler
-\registerctxluafile{font-phb}{1.001} % harfbuzz plugin
+\registerctxluafile{font-txt}{} % generic text handler
+\registerctxluafile{font-phb}{} % harfbuzz plugin
\startluacode
diff --git a/tex/context/base/mkiv/math-frc.mkiv b/tex/context/base/mkiv/math-frc.mkiv
index b1efb7703..9a5ce62b0 100644
--- a/tex/context/base/mkiv/math-frc.mkiv
+++ b/tex/context/base/mkiv/math-frc.mkiv
@@ -26,7 +26,7 @@
%D This module is reimplemented in \MKIV\ style.
-\registerctxluafile{math-frc}{1.001}
+\registerctxluafile{math-frc}{}
%D \macros
%D {frac, xfrac, xxfrac}
diff --git a/tex/context/base/mkiv/math-ini.mkiv b/tex/context/base/mkiv/math-ini.mkiv
index 0dbee83bf..f951d7571 100644
--- a/tex/context/base/mkiv/math-ini.mkiv
+++ b/tex/context/base/mkiv/math-ini.mkiv
@@ -64,19 +64,19 @@
% test [[\char948 \cldcontext{utf.char(948)}]]
% test $[[\char948 \cldcontext{utf.char(948)}]]$
-\registerctxluafile{math-ini}{1.001}
-\registerctxluafile{math-dim}{1.001}
-\registerctxluafile{math-act}{1.001}
-\registerctxluafile{math-ext}{1.001}
-\registerctxluafile{math-vfu}{1.001}
-\registerctxluafile{math-ttv}{1.001}
-\registerctxluafile{math-map}{1.001}
-\registerctxluafile{math-ren}{1.001}
-\registerctxluafile{math-noa}{1.001}
-\registerctxluafile{math-tag}{1.001}
-\registerctxluafile{math-fbk}{1.001}
-\registerctxluafile{math-dir}{1.001}
-\registerctxluafile{math-spa}{1.001}
+\registerctxluafile{math-ini}{}
+\registerctxluafile{math-dim}{}
+\registerctxluafile{math-act}{}
+\registerctxluafile{math-ext}{}
+\registerctxluafile{math-vfu}{}
+\registerctxluafile{math-ttv}{}
+\registerctxluafile{math-map}{optimize}
+\registerctxluafile{math-ren}{}
+\registerctxluafile{math-noa}{optimize}
+\registerctxluafile{math-tag}{}
+\registerctxluafile{math-fbk}{}
+\registerctxluafile{math-dir}{}
+\registerctxluafile{math-spa}{}
%D A starter:
%D
diff --git a/tex/context/base/mkiv/math-map.lua b/tex/context/base/mkiv/math-map.lua
index f1b0c14e3..9e896e9ed 100644
--- a/tex/context/base/mkiv/math-map.lua
+++ b/tex/context/base/mkiv/math-map.lua
@@ -740,17 +740,17 @@ function mathematics.remapalphabets(char,mathalphabet,mathgreek)
if not isgreek[char] then
-- nothing needed
elseif islcgreek[char] then
- local lc = extract(mathgreek,4,4)
+ local lc = extract(mathgreek,4,4) -- (mathgreek >> 4) & ~(-1 << 4)
if lc > 1 then
mathalphabet = remapgreek(mathalphabet,lc,"lowercase",char)
end
elseif isucgreek[char] then
- local uc = extract(mathgreek,0,4)
+ local uc = extract(mathgreek,0,4) -- (mathgreek >> 0) & ~(-1 << 4)
if uc > 1 then
mathalphabet = remapgreek(mathalphabet,uc,"uppercase",char)
end
elseif issygreek[char] then
- local sy = extract(mathgreek,8,4)
+ local sy = extract(mathgreek,8,4) -- (mathgreek >> 8) & ~(-1 << 4)
if sy > 1 then
mathalphabet = remapgreek(mathalphabet,sy,"symbol",char)
end
diff --git a/tex/context/base/mkiv/math-noa.lua b/tex/context/base/mkiv/math-noa.lua
index 1d7c6eb05..f20712b31 100644
--- a/tex/context/base/mkiv/math-noa.lua
+++ b/tex/context/base/mkiv/math-noa.lua
@@ -29,7 +29,7 @@ local formatters, gmatch = string.formatters, string.gmatch
local sortedhash = table.sortedhash
local insert, remove = table.insert, table.remove
local div = math.div
-local setbit, hasbit = number.setbit, number.hasbit
+local bor, band = bit32.bor, bit32.band
local fonts = fonts
local nodes = nodes
@@ -1145,7 +1145,7 @@ do
local last = 0
local known = setmetatableindex(function(t,k)
- local v = setbit(0,2^last)
+ local v = bor(0,2^last)
t[k] = v
last = last + 1
return v
@@ -1307,7 +1307,7 @@ do
local hashes = mathalternates.hashes
for i=1,#registered do
local r = registered[i]
- if hasbit(a,r) then
+ if band(a,r) ~= 0 then
local char = getchar(pointer)
local alt = hashes[i][char]
if alt == nil then
diff --git a/tex/context/base/mkiv/meta-fnt.mkiv b/tex/context/base/mkiv/meta-fnt.mkiv
index e54c0be0a..c248f752b 100644
--- a/tex/context/base/mkiv/meta-fnt.mkiv
+++ b/tex/context/base/mkiv/meta-fnt.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{MetaPost Graphics / Fonts}
-\registerctxluafile{meta-fnt}{1.001}
+\registerctxluafile{meta-fnt}{}
\unprotect
diff --git a/tex/context/base/mkiv/meta-fun.mkiv b/tex/context/base/mkiv/meta-fun.mkiv
index c3a4ce8d4..e30660392 100644
--- a/tex/context/base/mkiv/meta-fun.mkiv
+++ b/tex/context/base/mkiv/meta-fun.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{MetaPost Graphics / Goodies}
-\registerctxluafile{meta-fun}{1.001}
+\registerctxluafile{meta-fun}{}
\unprotect
diff --git a/tex/context/base/mkiv/meta-ini.mkiv b/tex/context/base/mkiv/meta-ini.mkiv
index 03d800958..f9e69b7e1 100644
--- a/tex/context/base/mkiv/meta-ini.mkiv
+++ b/tex/context/base/mkiv/meta-ini.mkiv
@@ -58,7 +58,7 @@
\writestatus{loading}{MetaPost Graphics / Initializations}
-\registerctxluafile{meta-ini}{1.001}
+\registerctxluafile{meta-ini}{}
\unprotect
diff --git a/tex/context/base/mkiv/meta-lua.mkiv b/tex/context/base/mkiv/meta-lua.mkiv
index 1d550ea47..e06677d5e 100644
--- a/tex/context/base/mkiv/meta-lua.mkiv
+++ b/tex/context/base/mkiv/meta-lua.mkiv
@@ -22,7 +22,7 @@
\writestatus{loading}{MetaPost Library Graphics / Templates}
-\registerctxluafile{meta-lua}{1.001}
+\registerctxluafile{meta-lua}{}
\continueifinputfile{meta-lua.mkiv}
diff --git a/tex/context/base/mkiv/meta-pdf.mkiv b/tex/context/base/mkiv/meta-pdf.mkiv
index 14c97042e..38ffb72f8 100644
--- a/tex/context/base/mkiv/meta-pdf.mkiv
+++ b/tex/context/base/mkiv/meta-pdf.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{meta-pdf}{1.003}
+\registerctxluafile{meta-pdf}{}
\writestatus{loading}{MetaPost Graphics / MPS to PDF}
diff --git a/tex/context/base/mkiv/meta-pdh.mkiv b/tex/context/base/mkiv/meta-pdh.mkiv
index 3787a5638..9f726e6f9 100644
--- a/tex/context/base/mkiv/meta-pdh.mkiv
+++ b/tex/context/base/mkiv/meta-pdh.mkiv
@@ -29,7 +29,7 @@
%
% timings may differ now that we revamped the backend
-\registerctxluafile{meta-pdf}{1.003}
+\registerctxluafile{meta-pdf}{}
%D We will clean up the color mess later.
diff --git a/tex/context/base/mkiv/meta-tex.mkiv b/tex/context/base/mkiv/meta-tex.mkiv
index 8d24f687c..03ad5ee39 100644
--- a/tex/context/base/mkiv/meta-tex.mkiv
+++ b/tex/context/base/mkiv/meta-tex.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{meta-tex}{1.001}
+\registerctxluafile{meta-tex}{}
\unprotect
diff --git a/tex/context/base/mkiv/mlib-ctx.mkiv b/tex/context/base/mkiv/mlib-ctx.mkiv
index a7bb612c8..1f05b6ef8 100644
--- a/tex/context/base/mkiv/mlib-ctx.mkiv
+++ b/tex/context/base/mkiv/mlib-ctx.mkiv
@@ -16,10 +16,10 @@
\writestatus{loading}{MetaPost Library Graphics / Initializations}
-\registerctxluafile{mlib-run}{1.001}
-\registerctxluafile{mlib-ctx}{1.001}
-\registerctxluafile{mlib-lua}{1.001}
-\registerctxluafile{mlib-int}{1.001} % here ?
+\registerctxluafile{mlib-run}{}
+\registerctxluafile{mlib-ctx}{}
+\registerctxluafile{mlib-lua}{}
+\registerctxluafile{mlib-int}{} % here ?
\unprotect
diff --git a/tex/context/base/mkiv/mlib-pdf.mkiv b/tex/context/base/mkiv/mlib-pdf.mkiv
index 2f283ff1a..147b67f74 100644
--- a/tex/context/base/mkiv/mlib-pdf.mkiv
+++ b/tex/context/base/mkiv/mlib-pdf.mkiv
@@ -16,7 +16,7 @@
% We use bit more code that needed because we want to limit the
% amount of boxing.
-\registerctxluafile{mlib-pdf}{1.001}
+\registerctxluafile{mlib-pdf}{}
%D Some code is shared between MPLIB and MPS. The following variables
%D are also available for introspection and other purposes.
diff --git a/tex/context/base/mkiv/mlib-pps.mkiv b/tex/context/base/mkiv/mlib-pps.mkiv
index a2eb44826..c9d181bf9 100644
--- a/tex/context/base/mkiv/mlib-pps.mkiv
+++ b/tex/context/base/mkiv/mlib-pps.mkiv
@@ -13,7 +13,7 @@
\unprotect
-\registerctxluafile{mlib-pps}{1.001}
+\registerctxluafile{mlib-pps}{}
%D Todo: catch nested graphics like external figures with dummies.
diff --git a/tex/context/base/mkiv/mult-aux.mkiv b/tex/context/base/mkiv/mult-aux.mkiv
index a64e09305..35b3fb189 100644
--- a/tex/context/base/mkiv/mult-aux.mkiv
+++ b/tex/context/base/mkiv/mult-aux.mkiv
@@ -25,7 +25,7 @@
\writestatus{loading}{ConTeXt Multilingual Macros / Helpers}
-\registerctxluafile{mult-aux}{1.001}
+\registerctxluafile{mult-aux}{}
\unprotect
diff --git a/tex/context/base/mkiv/mult-chk.mkiv b/tex/context/base/mkiv/mult-chk.mkiv
index 9208a73e1..b3005b012 100644
--- a/tex/context/base/mkiv/mult-chk.mkiv
+++ b/tex/context/base/mkiv/mult-chk.mkiv
@@ -33,7 +33,7 @@
\unprotect
-\registerctxluafile{mult-chk}{1.001}
+\registerctxluafile{mult-chk}{}
\unexpanded\def\setvalidparameterkeys{\dodoubleargument\mult_checkers_set_valid_parameter_keys}
\unexpanded\def\addvalidparameterkeys{\dodoubleargument\mult_checkers_add_valid_parameter_keys}
diff --git a/tex/context/base/mkiv/mult-fun.lua b/tex/context/base/mkiv/mult-fun.lua
index dc0a0366a..34492b30a 100644
--- a/tex/context/base/mkiv/mult-fun.lua
+++ b/tex/context/base/mkiv/mult-fun.lua
@@ -24,7 +24,7 @@ return {
--
"sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian",
"tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos",
- "invsin", "invcos", "invtan", "acosh", "asinh", "sinh", "cosh",
+ "invsin", "invcos", "invtan", "acosh", "asinh", "sinh", "cosh", "tanh",
"zmod",
"paired", "tripled",
"unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "unittriangle", "fulltriangle",
diff --git a/tex/context/base/mkiv/mult-ini.mkiv b/tex/context/base/mkiv/mult-ini.mkiv
index 8fd0d9472..288d19271 100644
--- a/tex/context/base/mkiv/mult-ini.mkiv
+++ b/tex/context/base/mkiv/mult-ini.mkiv
@@ -19,7 +19,7 @@
\unprotect
-\registerctxluafile{mult-ini}{1.001}
+\registerctxluafile{mult-ini}{}
%D \macros
%D [constanten,variabelen,commands]
diff --git a/tex/context/base/mkiv/node-bck.mkiv b/tex/context/base/mkiv/node-bck.mkiv
index 58edab668..6bfc43d6a 100644
--- a/tex/context/base/mkiv/node-bck.mkiv
+++ b/tex/context/base/mkiv/node-bck.mkiv
@@ -21,7 +21,7 @@
\unprotect
-\registerctxluafile{node-bck}{1.001}
+\registerctxluafile{node-bck}{}
% \backgroundvbox[green] {\input tufte } \par
% \backgroundvbox[blue] {\input ward } \par
diff --git a/tex/context/base/mkiv/node-fin.mkiv b/tex/context/base/mkiv/node-fin.mkiv
index 6c5bf17f1..4f1ff2aba 100644
--- a/tex/context/base/mkiv/node-fin.mkiv
+++ b/tex/context/base/mkiv/node-fin.mkiv
@@ -18,8 +18,8 @@
\unprotect
-\registerctxluafile{node-shp}{1.001}
-\registerctxluafile{node-fin}{1.001} % we might generalize this one
+\registerctxluafile{node-shp}{}
+\registerctxluafile{node-fin}{} % we might generalize this one
% we might have two variants at some point (efficiency)
diff --git a/tex/context/base/mkiv/node-ini.mkiv b/tex/context/base/mkiv/node-ini.mkiv
index 0f5a2df7e..8f1079163 100644
--- a/tex/context/base/mkiv/node-ini.mkiv
+++ b/tex/context/base/mkiv/node-ini.mkiv
@@ -17,26 +17,26 @@
\newcount\filterstate \filterstate\plusone % hm, public
-\registerctxluafile{node-ini}{1.001}
-\registerctxluafile{node-met}{1.001}
-\registerctxluafile{node-nut}{1.001}
-\registerctxluafile{node-res}{1.001}
-\registerctxluafile{node-ppt}{1.001} % experimental
-\registerctxluafile{node-dir}{1.001}
-\registerctxluafile{node-aux}{1.001}
-\registerctxluafile{node-tst}{1.001}
-\registerctxluafile{node-tra}{1.001} % we might split it off (module)
-\registerctxluafile{node-snp}{1.001}
-\registerctxluafile{node-tsk}{1.001}
-\registerctxluafile{node-tex}{1.001}
-\registerctxluafile{node-pro}{1.001}
-\registerctxluafile{node-ser}{1.001}
-\registerctxluafile{node-ext}{1.001}
-\registerctxluafile{node-acc}{1.001} % experimental
-%registerctxluafile{node-prp}{1.001} % makes no sense (yet)
-\registerctxluafile{node-ppt}{1.001}
-\registerctxluafile{node-scn}{1.001}
-\registerctxluafile{node-syn}{1.001}
+\registerctxluafile{node-ini}{}
+\registerctxluafile{node-met}{}
+\registerctxluafile{node-nut}{}
+\registerctxluafile{node-res}{}
+\registerctxluafile{node-ppt}{} % experimental
+\registerctxluafile{node-dir}{}
+\registerctxluafile{node-aux}{}
+\registerctxluafile{node-tst}{}
+\registerctxluafile{node-tra}{} % we might split it off (module)
+\registerctxluafile{node-snp}{}
+\registerctxluafile{node-tsk}{}
+\registerctxluafile{node-tex}{}
+\registerctxluafile{node-pro}{}
+\registerctxluafile{node-ser}{}
+\registerctxluafile{node-ext}{}
+\registerctxluafile{node-acc}{} % experimental
+%registerctxluafile{node-prp}{} % makes no sense (yet)
+\registerctxluafile{node-ppt}{}
+\registerctxluafile{node-scn}{}
+\registerctxluafile{node-syn}{}
\newcount\c_node_tracers_show_box % box number
diff --git a/tex/context/base/mkiv/node-mig.mkiv b/tex/context/base/mkiv/node-mig.mkiv
index 143fd4466..010d009b3 100644
--- a/tex/context/base/mkiv/node-mig.mkiv
+++ b/tex/context/base/mkiv/node-mig.mkiv
@@ -40,7 +40,7 @@
\unprotect
-\registerctxluafile{node-mig}{1.001}
+\registerctxluafile{node-mig}{}
\newtoks\everyautomigratefootnotes
\newtoks\everyautomigratemarks
diff --git a/tex/context/base/mkiv/node-pag.mkiv b/tex/context/base/mkiv/node-pag.mkiv
index b8ed197fe..970939dcf 100644
--- a/tex/context/base/mkiv/node-pag.mkiv
+++ b/tex/context/base/mkiv/node-pag.mkiv
@@ -15,6 +15,6 @@
\unprotect
-\registerctxluafile{node-pag}{1.001}
+\registerctxluafile{node-pag}{}
\protect \endinput
diff --git a/tex/context/base/mkiv/node-rul.mkiv b/tex/context/base/mkiv/node-rul.mkiv
index 661c8d7ef..643e93c42 100644
--- a/tex/context/base/mkiv/node-rul.mkiv
+++ b/tex/context/base/mkiv/node-rul.mkiv
@@ -71,7 +71,7 @@
%definesystemattribute[ruled]
%definesystemattribute[shifted]
-\registerctxluafile{node-rul}{1.001}
+\registerctxluafile{node-rul}{}
\installcorenamespace{bar}
\installcorenamespace{barindex}
diff --git a/tex/context/base/mkiv/pack-obj.mkiv b/tex/context/base/mkiv/pack-obj.mkiv
index b0b1607be..aeb5cb4f4 100644
--- a/tex/context/base/mkiv/pack-obj.mkiv
+++ b/tex/context/base/mkiv/pack-obj.mkiv
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{pack-obj}{1.001}
+\registerctxluafile{pack-obj}{}
%D \macros
%D {setobject,getobject,ifinobject}
diff --git a/tex/context/base/mkiv/pack-rul.mkiv b/tex/context/base/mkiv/pack-rul.mkiv
index ac2a3f171..068cb2dc9 100644
--- a/tex/context/base/mkiv/pack-rul.mkiv
+++ b/tex/context/base/mkiv/pack-rul.mkiv
@@ -18,7 +18,7 @@
%D packaging and expansion we also keep tracing reasonable. For instance, multiple
%D stacked backgrounds can slow down a run if not optimized this way.
-\registerctxluafile{pack-rul}{1.001}
+\registerctxluafile{pack-rul}{}
\unprotect
diff --git a/tex/context/base/mkiv/page-cst.mkiv b/tex/context/base/mkiv/page-cst.mkiv
index 1dc324d8c..e71da688b 100644
--- a/tex/context/base/mkiv/page-cst.mkiv
+++ b/tex/context/base/mkiv/page-cst.mkiv
@@ -18,7 +18,7 @@
\writestatus{loading}{ConTeXt Page Macros / Page Grids}
-\registerctxluafile{page-cst}{1.001}
+\registerctxluafile{page-cst}{}
\unprotect
diff --git a/tex/context/base/mkiv/page-flt.mkiv b/tex/context/base/mkiv/page-flt.mkiv
index aafa15287..17e24fe27 100644
--- a/tex/context/base/mkiv/page-flt.mkiv
+++ b/tex/context/base/mkiv/page-flt.mkiv
@@ -16,7 +16,7 @@
%D This module has code that previously was in other modules. There is
%D also float related code in \type {strc-flt.mkiv}.
-\registerctxluafile{page-flt}{1.001}
+\registerctxluafile{page-flt}{}
\unprotect
diff --git a/tex/context/base/mkiv/page-ini.mkiv b/tex/context/base/mkiv/page-ini.mkiv
index 3e145690f..6440bd80d 100644
--- a/tex/context/base/mkiv/page-ini.mkiv
+++ b/tex/context/base/mkiv/page-ini.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Page Macros / Initializations}
-\registerctxluafile{page-ini}{1.001}
+\registerctxluafile{page-ini}{}
%D The \type {\processpage} command has become obsolete. It's original
%D purpose was to flush only parts of a document but nowadays we have
diff --git a/tex/context/base/mkiv/page-inj.mkvi b/tex/context/base/mkiv/page-inj.mkvi
index 03472fe55..e03569f23 100644
--- a/tex/context/base/mkiv/page-inj.mkvi
+++ b/tex/context/base/mkiv/page-inj.mkvi
@@ -20,7 +20,7 @@
\unprotect
-\registerctxluafile{page-inj}{1.001}
+\registerctxluafile{page-inj}{}
\installcorenamespace {pageinjection}
\installcorenamespace {pageinjectionalternative}
diff --git a/tex/context/base/mkiv/page-ins.mkiv b/tex/context/base/mkiv/page-ins.mkiv
index 09ba70b70..3b473343a 100644
--- a/tex/context/base/mkiv/page-ins.mkiv
+++ b/tex/context/base/mkiv/page-ins.mkiv
@@ -17,7 +17,7 @@
%D page builder. When multiple footnote classes were introduced, I decided to
%D isolate some of the functionality in a module.
-\registerctxluafile{page-ins}{1.001}
+\registerctxluafile{page-ins}{}
\unprotect
diff --git a/tex/context/base/mkiv/page-lin.mkvi b/tex/context/base/mkiv/page-lin.mkvi
index 2692087cc..4348d6770 100644
--- a/tex/context/base/mkiv/page-lin.mkvi
+++ b/tex/context/base/mkiv/page-lin.mkvi
@@ -37,7 +37,7 @@
%
% some line
-\registerctxluafile{page-lin}{1.001}
+\registerctxluafile{page-lin}{}
\definesystemattribute[linenumber] [public]
\definesystemattribute[linereference][public]
diff --git a/tex/context/base/mkiv/page-mix.mkiv b/tex/context/base/mkiv/page-mix.mkiv
index 73ed9466c..7f512732e 100644
--- a/tex/context/base/mkiv/page-mix.mkiv
+++ b/tex/context/base/mkiv/page-mix.mkiv
@@ -35,7 +35,7 @@
%
% \ctxlua{tex.setbox("global",0,node.hpack(nodes.pool.glyph("a",font.current())))}\box0
-\registerctxluafile{page-mix}{1.001}
+\registerctxluafile{page-mix}{}
\unprotect
diff --git a/tex/context/base/mkiv/page-otr.mkvi b/tex/context/base/mkiv/page-otr.mkvi
index 172363da5..f4633f1fd 100644
--- a/tex/context/base/mkiv/page-otr.mkvi
+++ b/tex/context/base/mkiv/page-otr.mkvi
@@ -19,7 +19,7 @@
% 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}
+\registerctxluafile{page-otr}{}
\unprotect
diff --git a/tex/context/base/mkiv/page-pst.mkiv b/tex/context/base/mkiv/page-pst.mkiv
index 05b4f4209..746356495 100644
--- a/tex/context/base/mkiv/page-pst.mkiv
+++ b/tex/context/base/mkiv/page-pst.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Page Macros / Postponing}
-\registerctxluafile{page-pst}{1.001}
+\registerctxluafile{page-pst}{}
\unprotect
diff --git a/tex/context/base/mkiv/page-run.mkiv b/tex/context/base/mkiv/page-run.mkiv
index ce5923f02..19adfaa9c 100644
--- a/tex/context/base/mkiv/page-run.mkiv
+++ b/tex/context/base/mkiv/page-run.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Page Macros / Runtime Macros}
-\registerctxluafile{page-run}{1.001}
+\registerctxluafile{page-run}{}
\unprotect
diff --git a/tex/context/base/mkiv/page-str.mkiv b/tex/context/base/mkiv/page-str.mkiv
index b6b8d1cce..57a465603 100644
--- a/tex/context/base/mkiv/page-str.mkiv
+++ b/tex/context/base/mkiv/page-str.mkiv
@@ -29,7 +29,7 @@
%D
%D Remark: marknotes are gone, at least for a while.
-\registerctxluafile{page-str}{1.001}
+\registerctxluafile{page-str}{}
\unprotect
diff --git a/tex/context/base/mkiv/publ-imp-apa.mkvi b/tex/context/base/mkiv/publ-imp-apa.mkvi
index 6cf79fe49..38841b16b 100644
--- a/tex/context/base/mkiv/publ-imp-apa.mkvi
+++ b/tex/context/base/mkiv/publ-imp-apa.mkvi
@@ -346,6 +346,14 @@
[apa:\s!cite]
\definebtx
+ [apa:\s!cite:editor]
+ [apa:\s!cite:author]
+
+\definebtx
+ [apa:\s!cite:translator]
+ [apa:\s!cite:author]
+
+\definebtx
[apa:\s!cite:organization]
[apa:\s!cite]
@@ -856,7 +864,11 @@
\starttexdefinition unexpanded btx:apa:author-or-editor #author
\btxdoifelse {#author} {
- \btxflush{#author}
+ \btxstartstyleandcolor[apa:\s!list:#author]
+ \btxusecommand[apa:\s!list:#author]{
+ \btxflush{#author}
+ }
+ \btxstopstyleandcolor
% use \processaction [] [] here?
\doifelse {\btxfoundname{#author}} {editor} {
\btxleftparenthesis
@@ -902,7 +914,11 @@
\btxrightparenthesis
\removeunwantedspaces
\btxparameter{\c!separator:names:3}
- \btxflush{director}
+ \btxstartstyleandcolor[apa:\s!list:director]
+ \btxusecommand[apa:\s!list:director]{
+ \btxflush{director}
+ }
+ \btxstopstyleandcolor
\btxleftparenthesis
\btxsingularorplural {director} {
\btxlabeltext{apa:Director}
@@ -917,7 +933,11 @@
\btxleftparenthesis
\btxlabeltext{with}
\btxspace
- \btxflush{withauthor}
+ \btxstartstyleandcolor[apa:\s!list:withauthor]
+ \btxusecommand[apa:\s!list:withauthor]{
+ \btxflush{withauthor}
+ }
+ \btxstopstyleandcolor
\btxrightparenthesis
}
} {
diff --git a/tex/context/base/mkiv/publ-ini.lua b/tex/context/base/mkiv/publ-ini.lua
index ed3050f35..130f9a49b 100644
--- a/tex/context/base/mkiv/publ-ini.lua
+++ b/tex/context/base/mkiv/publ-ini.lua
@@ -2364,16 +2364,34 @@ do
local function btxvalidcitevariant(dataset,variant)
local citevariant = rawget(citevariants,variant)
if citevariant then
- return variant, citevariant
+ return citevariant
end
- local variant = specifications[dataset].types[variant]
- if variant then
- citevariant = rawget(citevariants,variant)
+ local s = datasets[dataset]
+ if s then
+ s = s.specifications
end
- if citevariant then
- return variant, citevariant
+ if s then
+ for k, v in sortedhash(s) do
+ s = k
+ break
+ end
+ end
+ if s then
+ s = specifications[s]
+ end
+ if s then
+ s = s.types
+ end
+ if s then
+ variant = s[variant]
+ if variant then
+ citevariant = rawget(citevariants,variant)
+ end
+ if citevariant then
+ return citevariant
+ end
end
- return "default", citevariants.default
+ return citevariants.default
end
local function btxhandlecite(specification)
@@ -2419,8 +2437,7 @@ do
--
ctx_btxsetdataset(dataset)
--
- local variant, citevariant = btxvalidcitevariant(dataset,variant)
- specification.variant = variant -- the used one
+ local citevariant = btxvalidcitevariant(dataset,variant)
--
citevariant(specification) -- we always fall back on default
end
@@ -2677,6 +2694,11 @@ do
ctx_btxsettag(tag)
ctx_btxsetcategory(entry.category or "unknown")
--
+ local language = entry.language
+ if language then
+ ctx_btxsetlanguage(language)
+ end
+ --
if lefttext then local text = lefttext [i] ; if text and text ~= "" then ctx_btxsetlefttext (text) end end
if righttext then local text = righttext[i] ; if text and text ~= "" then ctx_btxsetrighttext(text) end end
if before then local text = before [i] ; if text and text ~= "" then ctx_btxsetbefore (text) end end
diff --git a/tex/context/base/mkiv/publ-ini.mkiv b/tex/context/base/mkiv/publ-ini.mkiv
index 4a31076c1..5e496866b 100644
--- a/tex/context/base/mkiv/publ-ini.mkiv
+++ b/tex/context/base/mkiv/publ-ini.mkiv
@@ -45,15 +45,15 @@
\writestatus{loading}{ConTeXt Publication Support / Initialization}
-\registerctxluafile{publ-dat}{1.001}
-\registerctxluafile{publ-ini}{1.001}
-\registerctxluafile{publ-sor}{1.001}
-\registerctxluafile{publ-aut}{1.001}
-\registerctxluafile{publ-usr}{1.001}
-\registerctxluafile{publ-oth}{1.001} % this could become an option
-\registerctxluafile{publ-fnd}{1.001} % new method (for the moment only local)
-\registerctxluafile{publ-jrn}{1.001}
-\registerctxluafile{publ-reg}{1.001}
+\registerctxluafile{publ-dat}{}
+\registerctxluafile{publ-ini}{}
+\registerctxluafile{publ-sor}{}
+\registerctxluafile{publ-aut}{}
+\registerctxluafile{publ-usr}{}
+\registerctxluafile{publ-oth}{} % this could become an option
+\registerctxluafile{publ-fnd}{} % new method (for the moment only local)
+\registerctxluafile{publ-jrn}{}
+\registerctxluafile{publ-reg}{}
\unprotect
diff --git a/tex/context/base/mkiv/publ-tra.mkiv b/tex/context/base/mkiv/publ-tra.mkiv
index 5f9da651f..e5f23259b 100644
--- a/tex/context/base/mkiv/publ-tra.mkiv
+++ b/tex/context/base/mkiv/publ-tra.mkiv
@@ -16,7 +16,7 @@
\writestatus{loading}{ConTeXt Publication Support / Tracing}
-\registerctxluafile{publ-tra}{1.001}
+\registerctxluafile{publ-tra}{}
\unprotect
diff --git a/tex/context/base/mkiv/regi-ini.mkiv b/tex/context/base/mkiv/regi-ini.mkiv
index 6190393d8..532a4db0b 100644
--- a/tex/context/base/mkiv/regi-ini.mkiv
+++ b/tex/context/base/mkiv/regi-ini.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{regi-ini}{1.001}
+\registerctxluafile{regi-ini}{}
\unprotect
diff --git a/tex/context/base/mkiv/scrn-but.mkvi b/tex/context/base/mkiv/scrn-but.mkvi
index 65b0d2c4e..fdb80e64b 100644
--- a/tex/context/base/mkiv/scrn-but.mkvi
+++ b/tex/context/base/mkiv/scrn-but.mkvi
@@ -16,7 +16,7 @@
\writestatus{loading}{ConTeXt Screen Macros / Buttons}
-\registerctxluafile{scrn-but}{1.001}
+\registerctxluafile{scrn-but}{}
\unprotect
diff --git a/tex/context/base/mkiv/scrn-fld.mkvi b/tex/context/base/mkiv/scrn-fld.mkvi
index d69e7beb9..38c4e1461 100644
--- a/tex/context/base/mkiv/scrn-fld.mkvi
+++ b/tex/context/base/mkiv/scrn-fld.mkvi
@@ -21,7 +21,7 @@
\unprotect
-\registerctxluafile{scrn-fld}{1.001}
+\registerctxluafile{scrn-fld}{}
%D In \MKII\ we had to cheat a bit with setups in order not to run
%D out of memory with thousands of fields, which we happen to need at
diff --git a/tex/context/base/mkiv/scrn-hlp.mkvi b/tex/context/base/mkiv/scrn-hlp.mkvi
index a342221c3..97c930669 100644
--- a/tex/context/base/mkiv/scrn-hlp.mkvi
+++ b/tex/context/base/mkiv/scrn-hlp.mkvi
@@ -18,7 +18,7 @@
%D upgraded and usage has changed a bit. We also use some
%D \LUA\ magic in order to avoid multiple passes.
-\registerctxluafile{scrn-hlp}{1.001}
+\registerctxluafile{scrn-hlp}{}
%D Using help boils down to plugging the placement macro
%D someplace visible, like:
diff --git a/tex/context/base/mkiv/scrn-ini.mkvi b/tex/context/base/mkiv/scrn-ini.mkvi
index 93dde6962..e1be43f37 100644
--- a/tex/context/base/mkiv/scrn-ini.mkvi
+++ b/tex/context/base/mkiv/scrn-ini.mkvi
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{scrn-ini}{1.001}
+\registerctxluafile{scrn-ini}{}
%D There is no interaction at all unless enabled by saying:
%D
diff --git a/tex/context/base/mkiv/scrn-pag.mkvi b/tex/context/base/mkiv/scrn-pag.mkvi
index b7e056e2b..573b61696 100644
--- a/tex/context/base/mkiv/scrn-pag.mkvi
+++ b/tex/context/base/mkiv/scrn-pag.mkvi
@@ -15,7 +15,7 @@
\writestatus{loading}{ConTeXt Screen Macros / Pages}
-\registerctxluafile{scrn-pag}{1.001}
+\registerctxluafile{scrn-pag}{}
\unprotect
diff --git a/tex/context/base/mkiv/scrn-ref.mkvi b/tex/context/base/mkiv/scrn-ref.mkvi
index a01e3ac3e..bace13312 100644
--- a/tex/context/base/mkiv/scrn-ref.mkvi
+++ b/tex/context/base/mkiv/scrn-ref.mkvi
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Screen Macros / References}
-\registerctxluafile{scrn-ref}{1.001}
+\registerctxluafile{scrn-ref}{}
\unprotect
diff --git a/tex/context/base/mkiv/scrn-wid.mkvi b/tex/context/base/mkiv/scrn-wid.mkvi
index 78c389a86..c74125c72 100644
--- a/tex/context/base/mkiv/scrn-wid.mkvi
+++ b/tex/context/base/mkiv/scrn-wid.mkvi
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Interaction Macros / Widgets}
-\registerctxluafile{scrn-wid}{1.001}
+\registerctxluafile{scrn-wid}{}
% todo: expansion in comments (default is expanded)
% todo: check renderings ... acrobat crashes too easily on missing one
diff --git a/tex/context/base/mkiv/scrp-ini.mkiv b/tex/context/base/mkiv/scrp-ini.mkiv
index cd060c02b..8f28f505d 100644
--- a/tex/context/base/mkiv/scrp-ini.mkiv
+++ b/tex/context/base/mkiv/scrp-ini.mkiv
@@ -13,10 +13,10 @@
% here we collect code from other places (was organized differently)
-\registerctxluafile{scrp-ini}{1.001}
-\registerctxluafile{scrp-cjk}{1.001}
-\registerctxluafile{scrp-eth}{1.001}
-\registerctxluafile{scrp-tha}{1.001}
+\registerctxluafile{scrp-ini}{}
+\registerctxluafile{scrp-cjk}{}
+\registerctxluafile{scrp-eth}{}
+\registerctxluafile{scrp-tha}{}
\definesystemattribute[scriptinjection][public]
\definesystemattribute[scriptsplitting][public]
diff --git a/tex/context/base/mkiv/sort-ini.mkiv b/tex/context/base/mkiv/sort-ini.mkiv
index b7b490255..d9f9628d5 100644
--- a/tex/context/base/mkiv/sort-ini.mkiv
+++ b/tex/context/base/mkiv/sort-ini.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Sorting Macros / Initialization}
-\registerctxluafile{sort-ini}{1.001}
-\registerctxluafile{sort-lan}{1.001}
+\registerctxluafile{sort-ini}{}
+\registerctxluafile{sort-lan}{}
\endinput
diff --git a/tex/context/base/mkiv/spac-adj.mkiv b/tex/context/base/mkiv/spac-adj.mkiv
index 936e00624..d29d15c17 100644
--- a/tex/context/base/mkiv/spac-adj.mkiv
+++ b/tex/context/base/mkiv/spac-adj.mkiv
@@ -18,7 +18,7 @@
% Very nasty but needed for margin stuff inside colored
% paragraphs. Obsolete for while .
-\registerctxluafile{spac-adj}{1.001}
+\registerctxluafile{spac-adj}{}
\definesystemattribute [graphicvadjust] [public]
diff --git a/tex/context/base/mkiv/spac-ali.mkiv b/tex/context/base/mkiv/spac-ali.mkiv
index 07c89bcae..3eb13769e 100644
--- a/tex/context/base/mkiv/spac-ali.mkiv
+++ b/tex/context/base/mkiv/spac-ali.mkiv
@@ -27,7 +27,7 @@
%
% but that also means myoption gets frozen due to caching.
-\registerctxluafile{spac-ali}{1.001}
+\registerctxluafile{spac-ali}{}
\definesystemattribute[realign] [public] % might be combined with the next one
\definesystemattribute[alignstate][public] % will make a single attributes for several states
diff --git a/tex/context/base/mkiv/spac-chr.mkiv b/tex/context/base/mkiv/spac-chr.mkiv
index c4aadd49f..d153997cf 100644
--- a/tex/context/base/mkiv/spac-chr.mkiv
+++ b/tex/context/base/mkiv/spac-chr.mkiv
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{spac-chr}{1.001}
+\registerctxluafile{spac-chr}{}
\definesystemattribute[characters][public]
diff --git a/tex/context/base/mkiv/spac-hor.mkiv b/tex/context/base/mkiv/spac-hor.mkiv
index 405abcb5d..ba1b833ce 100644
--- a/tex/context/base/mkiv/spac-hor.mkiv
+++ b/tex/context/base/mkiv/spac-hor.mkiv
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{spac-hor}{1.001}
+\registerctxluafile{spac-hor}{}
\let \parfillrightskip \parfillskip
\newskip\parfillleftskip
diff --git a/tex/context/base/mkiv/spac-prf.mkvi b/tex/context/base/mkiv/spac-prf.mkvi
index 8d150f58d..9a00da395 100644
--- a/tex/context/base/mkiv/spac-prf.mkvi
+++ b/tex/context/base/mkiv/spac-prf.mkvi
@@ -21,7 +21,7 @@
\unprotect
-\registerctxluafile{spac-prf}{1.001}
+\registerctxluafile{spac-prf}{}
\definesystemattribute[profilemethod][public]
diff --git a/tex/context/base/mkiv/spac-ver.mkiv b/tex/context/base/mkiv/spac-ver.mkiv
index 934577b17..f0e60e32e 100644
--- a/tex/context/base/mkiv/spac-ver.mkiv
+++ b/tex/context/base/mkiv/spac-ver.mkiv
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{spac-ver}{1.001}
+\registerctxluafile{spac-ver}{}
% todo: use usernodes ?
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 9cd88d681..b8453d9ce 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 4f6c0e8cb..f11fba9d4 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/strc-bkm.mkiv b/tex/context/base/mkiv/strc-bkm.mkiv
index 5a8dba562..8172030b1 100644
--- a/tex/context/base/mkiv/strc-bkm.mkiv
+++ b/tex/context/base/mkiv/strc-bkm.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Structure Macros / Bookmarks}
-\registerctxluafile{strc-bkm}{1.001}
+\registerctxluafile{strc-bkm}{}
% \enabledirectives[references.bookmarks.preroll]
diff --git a/tex/context/base/mkiv/strc-blk.mkiv b/tex/context/base/mkiv/strc-blk.mkiv
index fe259d223..c42bb25ec 100644
--- a/tex/context/base/mkiv/strc-blk.mkiv
+++ b/tex/context/base/mkiv/strc-blk.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Structure Macros / Blockmoves}
-\registerctxluafile{strc-blk}{1.001}
+\registerctxluafile{strc-blk}{}
\unprotect
diff --git a/tex/context/base/mkiv/strc-con.mkvi b/tex/context/base/mkiv/strc-con.mkvi
index 522026556..58e83a009 100644
--- a/tex/context/base/mkiv/strc-con.mkvi
+++ b/tex/context/base/mkiv/strc-con.mkvi
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Structure Macros / Constructions}
-\registerctxluafile{strc-con}{1.001}
+\registerctxluafile{strc-con}{}
% todo: check why \copy .. probably mkii leftover
%
diff --git a/tex/context/base/mkiv/strc-def.mkiv b/tex/context/base/mkiv/strc-def.mkiv
index b2e86c140..db97d8626 100644
--- a/tex/context/base/mkiv/strc-def.mkiv
+++ b/tex/context/base/mkiv/strc-def.mkiv
@@ -12,7 +12,7 @@
\writestatus{loading}{ConTeXt Structure Macros / Definitions}
-%registerctxluafile{strc-def}{1.001}
+%registerctxluafile{strc-def}{}
\unprotect
diff --git a/tex/context/base/mkiv/strc-doc.mkiv b/tex/context/base/mkiv/strc-doc.mkiv
index 5f40521fa..805525487 100644
--- a/tex/context/base/mkiv/strc-doc.mkiv
+++ b/tex/context/base/mkiv/strc-doc.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Structure Macros / Document Structure}
-\registerctxluafile{strc-doc}{1.001}
+\registerctxluafile{strc-doc}{}
\unprotect
diff --git a/tex/context/base/mkiv/strc-flt.mkvi b/tex/context/base/mkiv/strc-flt.mkvi
index 160001114..1b75c7011 100644
--- a/tex/context/base/mkiv/strc-flt.mkvi
+++ b/tex/context/base/mkiv/strc-flt.mkvi
@@ -15,7 +15,7 @@
\writestatus{loading}{ConTeXt Structure Macros / Float Numbering}
-\registerctxluafile{strc-flt}{1.001}
+\registerctxluafile{strc-flt}{}
\unprotect
diff --git a/tex/context/base/mkiv/strc-ini.mkvi b/tex/context/base/mkiv/strc-ini.mkvi
index ad83cbc58..56621b6e6 100644
--- a/tex/context/base/mkiv/strc-ini.mkvi
+++ b/tex/context/base/mkiv/strc-ini.mkvi
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Structure Macros / Initialization & Helpers}
-\registerctxluafile{strc-ini}{1.001}
+\registerctxluafile{strc-ini}{}
\unprotect
diff --git a/tex/context/base/mkiv/strc-itm.mkvi b/tex/context/base/mkiv/strc-itm.mkvi
index d69a75af0..6d9ab7b46 100644
--- a/tex/context/base/mkiv/strc-itm.mkvi
+++ b/tex/context/base/mkiv/strc-itm.mkvi
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Structure Macros / Itemgroups}
-\registerctxluafile{strc-itm}{1.001}
+\registerctxluafile{strc-itm}{}
%D As we analyze/register widths and such we could as well push and pop the
%D numbers at the \LUA\ end (which saves a few calls).
diff --git a/tex/context/base/mkiv/strc-lev.mkvi b/tex/context/base/mkiv/strc-lev.mkvi
index 6e08e7c07..b8b633c32 100644
--- a/tex/context/base/mkiv/strc-lev.mkvi
+++ b/tex/context/base/mkiv/strc-lev.mkvi
@@ -19,7 +19,7 @@
%D it as core functionality. For the moment this an experiment that
%D Alan and I conduct so it might evolve.
-\registerctxluafile{strc-lev}{1.001}
+\registerctxluafile{strc-lev}{}
\unprotect
diff --git a/tex/context/base/mkiv/strc-lst.mkvi b/tex/context/base/mkiv/strc-lst.mkvi
index 392d92aea..b33ebc5d0 100644
--- a/tex/context/base/mkiv/strc-lst.mkvi
+++ b/tex/context/base/mkiv/strc-lst.mkvi
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Structure Macros / Lists}
-\registerctxluafile{strc-lst}{1.001}
+\registerctxluafile{strc-lst}{}
% clean up in progress ...
%
diff --git a/tex/context/base/mkiv/strc-mar.mkiv b/tex/context/base/mkiv/strc-mar.mkiv
index 4e8df5f5d..df5cae692 100644
--- a/tex/context/base/mkiv/strc-mar.mkiv
+++ b/tex/context/base/mkiv/strc-mar.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Structure Macros / Markings}
-\registerctxluafile{strc-mar}{1.001}
+\registerctxluafile{strc-mar}{}
\unprotect
diff --git a/tex/context/base/mkiv/strc-mat.mkiv b/tex/context/base/mkiv/strc-mat.mkiv
index e79db99d1..507ae5548 100644
--- a/tex/context/base/mkiv/strc-mat.mkiv
+++ b/tex/context/base/mkiv/strc-mat.mkiv
@@ -14,7 +14,7 @@
\writestatus{loading}{ConTeXt Structure Macros / Math Numbering}
-\registerctxluafile{strc-mat}{1.001}
+\registerctxluafile{strc-mat}{}
% -- we have potential for captions
% -- this module will use the commandhandler
diff --git a/tex/context/base/mkiv/strc-not.mkvi b/tex/context/base/mkiv/strc-not.mkvi
index 2428f15e4..70a1d5ce8 100644
--- a/tex/context/base/mkiv/strc-not.mkvi
+++ b/tex/context/base/mkiv/strc-not.mkvi
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Structure Macros / Note Handling}
-\registerctxluafile{strc-not}{1.001}
+\registerctxluafile{strc-not}{}
\unprotect
diff --git a/tex/context/base/mkiv/strc-num.mkiv b/tex/context/base/mkiv/strc-num.mkiv
index 4b222801a..be35e7671 100644
--- a/tex/context/base/mkiv/strc-num.mkiv
+++ b/tex/context/base/mkiv/strc-num.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Structure Macros / Basic Numbering}
-\registerctxluafile{strc-num}{1.001}
+\registerctxluafile{strc-num}{}
\unprotect
diff --git a/tex/context/base/mkiv/strc-pag.mkiv b/tex/context/base/mkiv/strc-pag.mkiv
index 21758d671..d56f0de54 100644
--- a/tex/context/base/mkiv/strc-pag.mkiv
+++ b/tex/context/base/mkiv/strc-pag.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Structure Macros / Pagenumbering}
-\registerctxluafile{strc-pag}{1.001}
+\registerctxluafile{strc-pag}{}
\unprotect
diff --git a/tex/context/base/mkiv/strc-ref.mkvi b/tex/context/base/mkiv/strc-ref.mkvi
index 43d4d1f5b..d0752407c 100644
--- a/tex/context/base/mkiv/strc-ref.mkvi
+++ b/tex/context/base/mkiv/strc-ref.mkvi
@@ -27,9 +27,9 @@
\writestatus{loading}{ConTeXt Structure Macros / Cross Referencing}
-\registerctxluafile{strc-rsc}{1.001}
-\registerctxluafile{strc-ref}{1.001}
-\registerctxluafile{node-ref}{1.001}
+\registerctxluafile{strc-rsc}{}
+\registerctxluafile{strc-ref}{}
+\registerctxluafile{node-ref}{}
\unprotect
diff --git a/tex/context/base/mkiv/strc-reg.mkiv b/tex/context/base/mkiv/strc-reg.mkiv
index 380cc9f22..04fdef9ad 100644
--- a/tex/context/base/mkiv/strc-reg.mkiv
+++ b/tex/context/base/mkiv/strc-reg.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Structure Macros / Registers}
-\registerctxluafile{strc-reg}{1.001}
+\registerctxluafile{strc-reg}{}
\unprotect
diff --git a/tex/context/base/mkiv/strc-syn.mkiv b/tex/context/base/mkiv/strc-syn.mkiv
index 75001be27..85398106d 100644
--- a/tex/context/base/mkiv/strc-syn.mkiv
+++ b/tex/context/base/mkiv/strc-syn.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Structure Macros / Synonyms and Sorting}
-\registerctxluafile{strc-syn}{1.001}
+\registerctxluafile{strc-syn}{}
%D Although we could nowadays build this on top of regular lists we keep this
%D more efficient variant around. Eventually we can add some options to lists
diff --git a/tex/context/base/mkiv/strc-tag.mkiv b/tex/context/base/mkiv/strc-tag.mkiv
index 9a234d6c8..2ee71d67c 100644
--- a/tex/context/base/mkiv/strc-tag.mkiv
+++ b/tex/context/base/mkiv/strc-tag.mkiv
@@ -16,7 +16,7 @@
\writestatus{loading}{ConTeXt Structure Macros / Tags}
-\registerctxluafile{strc-tag}{1.001}
+\registerctxluafile{strc-tag}{}
\unprotect
diff --git a/tex/context/base/mkiv/supp-box.mkiv b/tex/context/base/mkiv/supp-box.mkiv
index 348120e22..eb824ee31 100644
--- a/tex/context/base/mkiv/supp-box.mkiv
+++ b/tex/context/base/mkiv/supp-box.mkiv
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{supp-box}{1.001}
+\registerctxluafile{supp-box}{}
% This file is partially cleaned up.
diff --git a/tex/context/base/mkiv/supp-ran.mkiv b/tex/context/base/mkiv/supp-ran.mkiv
index 5b70a075f..59707836a 100644
--- a/tex/context/base/mkiv/supp-ran.mkiv
+++ b/tex/context/base/mkiv/supp-ran.mkiv
@@ -16,7 +16,7 @@
%D This module is downward compatible in the sense that we've kept
%D the user interface (which uses intermediate variables).
-\registerctxluafile{supp-ran}{1.001}
+\registerctxluafile{supp-ran}{}
\unprotect
diff --git a/tex/context/base/mkiv/symb-emj.mkiv b/tex/context/base/mkiv/symb-emj.mkiv
index 22d8b4a07..e063b6a7a 100644
--- a/tex/context/base/mkiv/symb-emj.mkiv
+++ b/tex/context/base/mkiv/symb-emj.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Symbol Libraries / Emoji}
-\registerctxluafile{symb-emj}{1.001}
+\registerctxluafile{symb-emj}{}
\unprotect
diff --git a/tex/context/base/mkiv/symb-ini.mkiv b/tex/context/base/mkiv/symb-ini.mkiv
index e16cb48b3..e4950e09d 100644
--- a/tex/context/base/mkiv/symb-ini.mkiv
+++ b/tex/context/base/mkiv/symb-ini.mkiv
@@ -17,7 +17,7 @@
\writestatus{loading}{ConTeXt Symbol Libraries / Initialization}
-\registerctxluafile{symb-ini}{1.001}
+\registerctxluafile{symb-ini}{}
\unprotect
diff --git a/tex/context/base/mkiv/syst-aux.mkiv b/tex/context/base/mkiv/syst-aux.mkiv
index dcad3b873..55015b43f 100644
--- a/tex/context/base/mkiv/syst-aux.mkiv
+++ b/tex/context/base/mkiv/syst-aux.mkiv
@@ -16,7 +16,7 @@
%D used. After all it's not that urgent and replacing helpers is a delicate process.
%D Don't depend on it.
-\registerctxluafile{syst-aux}{1.001}
+\registerctxluafile{syst-aux}{}
% A dedicated primitive \ifvoidmacro\cs == \ifx\cs\empty is some 10% faster but
% probably not that noticeable in practice. An \ifvoidtoks might make sense but we
diff --git a/tex/context/base/mkiv/syst-con.mkiv b/tex/context/base/mkiv/syst-con.mkiv
index 17c407819..afbdf8605 100644
--- a/tex/context/base/mkiv/syst-con.mkiv
+++ b/tex/context/base/mkiv/syst-con.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{syst-con}{1.001}
+\registerctxluafile{syst-con}{}
\unprotect
diff --git a/tex/context/base/mkiv/syst-lua.mkiv b/tex/context/base/mkiv/syst-lua.mkiv
index b5001ab62..ca5f9679f 100644
--- a/tex/context/base/mkiv/syst-lua.mkiv
+++ b/tex/context/base/mkiv/syst-lua.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{syst-lua}{1.001}
+\registerctxluafile{syst-lua}{}
\unprotect
diff --git a/tex/context/base/mkiv/tabl-tbl.mkiv b/tex/context/base/mkiv/tabl-tbl.mkiv
index 28baf7f5d..edaf231e2 100644
--- a/tex/context/base/mkiv/tabl-tbl.mkiv
+++ b/tex/context/base/mkiv/tabl-tbl.mkiv
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{tabl-tbl.lua}{1.001} % experiment
+\registerctxluafile{tabl-tbl}{} % experiment
%D I can probably reimplement this using a \LUATEX\ combination
%D but it does not pay of in development time. If I need something
diff --git a/tex/context/base/mkiv/tabl-xtb.mkvi b/tex/context/base/mkiv/tabl-xtb.mkvi
index f7d682631..24b004b2b 100644
--- a/tex/context/base/mkiv/tabl-xtb.mkvi
+++ b/tex/context/base/mkiv/tabl-xtb.mkvi
@@ -15,7 +15,7 @@
\writestatus{loading}{ConTeXt Table Macros / Xtreme}
-\registerctxluafile{tabl-xtb}{1.001}
+\registerctxluafile{tabl-xtb}{}
% todo:
%
diff --git a/tex/context/base/mkiv/task-ini.mkiv b/tex/context/base/mkiv/task-ini.mkiv
index 6cdbe739f..77e4fa985 100644
--- a/tex/context/base/mkiv/task-ini.mkiv
+++ b/tex/context/base/mkiv/task-ini.mkiv
@@ -17,6 +17,6 @@
%D Maybe we will make things configureable (speed up and such).
-\registerctxluafile{task-ini}{1.001}
+\registerctxluafile{task-ini}{}
\protect \endinput
diff --git a/tex/context/base/mkiv/toks-ini.mkiv b/tex/context/base/mkiv/toks-ini.mkiv
index aaa735207..9d3375432 100644
--- a/tex/context/base/mkiv/toks-ini.mkiv
+++ b/tex/context/base/mkiv/toks-ini.mkiv
@@ -17,9 +17,9 @@
\newtoks\t_get_macro % will go away
-\registerctxluafile{toks-ini}{1.001}
-\registerctxluafile{toks-scn}{1.001}
-\registerctxluafile{cldf-scn}{1.001}
-\registerctxluafile{cldf-stp}{1.001}
+\registerctxluafile{toks-ini}{}
+\registerctxluafile{toks-scn}{}
+\registerctxluafile{cldf-scn}{}
+\registerctxluafile{cldf-stp}{}
\protect \endinput
diff --git a/tex/context/base/mkiv/toks-map.mkiv b/tex/context/base/mkiv/toks-map.mkiv
index f1b63a68b..829daa39d 100644
--- a/tex/context/base/mkiv/toks-map.mkiv
+++ b/tex/context/base/mkiv/toks-map.mkiv
@@ -13,7 +13,7 @@
% \writestatus{loading}{ConTeXt Token Support / Remapping}
%
-% \registerctxluafile{toks-map}{1.001}
+% \registerctxluafile{toks-map}{}
%
% \unprotect
%
diff --git a/tex/context/base/mkiv/toks-tra.mkiv b/tex/context/base/mkiv/toks-tra.mkiv
index 6186402a7..04f837f1c 100644
--- a/tex/context/base/mkiv/toks-tra.mkiv
+++ b/tex/context/base/mkiv/toks-tra.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Token Support / Tracing}
-\registerctxluafile{toks-tra}{1.001}
+\registerctxluafile{toks-tra}{}
\unprotect
diff --git a/tex/context/base/mkiv/trac-ctx.mkiv b/tex/context/base/mkiv/trac-ctx.mkiv
index 4240281a6..66b5ef1ee 100644
--- a/tex/context/base/mkiv/trac-ctx.mkiv
+++ b/tex/context/base/mkiv/trac-ctx.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Tracing Macros / TeX Trackers}
-\registerctxluafile{trac-ctx}{1.001}
+\registerctxluafile{trac-ctx}{}
\unprotect
diff --git a/tex/context/base/mkiv/trac-deb.mkiv b/tex/context/base/mkiv/trac-deb.mkiv
index 1e61a3512..b5366d88c 100644
--- a/tex/context/base/mkiv/trac-deb.mkiv
+++ b/tex/context/base/mkiv/trac-deb.mkiv
@@ -15,8 +15,8 @@
\unprotect
-%registerctxluafile{trac-lmx}{1.001}
-\registerctxluafile{trac-deb}{1.001}
+%registerctxluafile{trac-lmx}{}
+\registerctxluafile{trac-deb}{}
\unexpanded\def\breakpoint {\showdebuginfo\wait}
diff --git a/tex/context/base/mkiv/trac-jus.mkiv b/tex/context/base/mkiv/trac-jus.mkiv
index 71d88b00e..f2e93eff7 100644
--- a/tex/context/base/mkiv/trac-jus.mkiv
+++ b/tex/context/base/mkiv/trac-jus.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Tracing Macros / Justification}
-\registerctxluafile{trac-jus}{1.001}
+\registerctxluafile{trac-jus}{}
\unprotect
diff --git a/tex/context/base/mkiv/trac-tex.mkiv b/tex/context/base/mkiv/trac-tex.mkiv
index 53c95ab01..4c2db68f3 100644
--- a/tex/context/base/mkiv/trac-tex.mkiv
+++ b/tex/context/base/mkiv/trac-tex.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Tracking Macros / TeX}
-\registerctxluafile{trac-tex}{1.001}
+\registerctxluafile{trac-tex}{}
%D All tracing flags at the \TEX\ end will be redone this way so
%D that we have a similar mechanism for \TEX\ and \LUA. Also, the
diff --git a/tex/context/base/mkiv/trac-vis.lua b/tex/context/base/mkiv/trac-vis.lua
index e60eb1443..3822aa4a6 100644
--- a/tex/context/base/mkiv/trac-vis.lua
+++ b/tex/context/base/mkiv/trac-vis.lua
@@ -116,10 +116,8 @@ local stoptiming = statistics.stoptiming
local a_visual = attributes.private("visual")
local a_layer = attributes.private("viewerlayer")
-local hasbit = number.hasbit
-local bit = number.bit
-local setbit = number.setbit
-local clearbit = number.clearbit
+local band = bit32.band
+local bor = bit32.bor
local enableaction = nodes.tasks.enableaction
@@ -238,13 +236,13 @@ local function setvisual(n,a,what,list) -- this will become more efficient when
if not a or a == 0 or a == unsetvalue then
a = preset_makeup
else
- a = setbit(a,preset_makeup)
+ a = bor(a,preset_makeup)
end
elseif n == "boxes" then
if not a or a == 0 or a == unsetvalue then
a = preset_boxes
else
- a = setbit(a,preset_boxes)
+ a = bor(a,preset_boxes)
end
elseif n == "all" then
if what == false then
@@ -252,7 +250,7 @@ local function setvisual(n,a,what,list) -- this will become more efficient when
elseif not a or a == 0 or a == unsetvalue then
a = preset_all
else
- a = setbit(a,preset_all)
+ a = bor(a,preset_all)
end
else
for s in gmatch(n,"[a-z]+") do
@@ -262,7 +260,7 @@ local function setvisual(n,a,what,list) -- this will become more efficient when
elseif not a or a == 0 or a == unsetvalue then
a = m
else
- a = setbit(a,m)
+ a = bor(a,m)
end
end
end
@@ -1153,24 +1151,24 @@ do
trace_expansion = false
trace_line = 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_italic = hasbit(a, 8192)
- trace_origin = hasbit(a, 16384)
- trace_discretionary = hasbit(a, 32768)
- trace_expansion = hasbit(a, 65536)
- trace_line = hasbit(a,131072)
+ trace_hbox = band(a, 1) ~= 0
+ trace_vbox = band(a, 2) ~= 0
+ trace_vtop = band(a, 4) ~= 0
+ trace_kern = band(a, 8) ~= 0
+ trace_glue = band(a, 16) ~= 0
+ trace_penalty = band(a, 32) ~= 0
+ trace_fontkern = band(a, 64) ~= 0
+ trace_strut = band(a, 128) ~= 0
+ trace_whatsit = band(a, 256) ~= 0
+ trace_glyph = band(a, 512) ~= 0
+ trace_simple = band(a, 1024) ~= 0
+ trace_user = band(a, 2048) ~= 0
+ trace_math = band(a, 4096) ~= 0
+ trace_italic = band(a, 8192) ~= 0
+ trace_origin = band(a, 16384) ~= 0
+ trace_discretionary = band(a, 32768) ~= 0
+ trace_expansion = band(a, 65536) ~= 0
+ trace_line = band(a,131072) ~= 0
end
attr = a
end
diff --git a/tex/context/base/mkiv/trac-vis.mkiv b/tex/context/base/mkiv/trac-vis.mkiv
index 8f9a90f2f..922e78a7c 100644
--- a/tex/context/base/mkiv/trac-vis.mkiv
+++ b/tex/context/base/mkiv/trac-vis.mkiv
@@ -32,7 +32,7 @@
\writestatus{loading}{ConTeXt Tracing Macros / Visualization}
-\registerctxluafile{trac-vis}{1.001}
+\registerctxluafile{trac-vis}{optimize}
\unprotect
diff --git a/tex/context/base/mkiv/type-ini.mkvi b/tex/context/base/mkiv/type-ini.mkvi
index 3969a5b95..9e6e13c9b 100644
--- a/tex/context/base/mkiv/type-ini.mkvi
+++ b/tex/context/base/mkiv/type-ini.mkvi
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Typescript Macros / Initialization}
-\registerctxluafile{type-ini}{1.001}
+\registerctxluafile{type-ini}{}
%D The default fontclass is empty. We could demand always using fontclasses,
%D and then make the calling macros simplier (always assume fontclass) but
diff --git a/tex/context/base/mkiv/typo-bld.mkiv b/tex/context/base/mkiv/typo-bld.mkiv
index 621d81c52..8929fa22c 100644
--- a/tex/context/base/mkiv/typo-bld.mkiv
+++ b/tex/context/base/mkiv/typo-bld.mkiv
@@ -35,7 +35,7 @@
\unprotect
-\registerctxluafile{typo-bld}{1.001}
+\registerctxluafile{typo-bld}{}
\definesystemattribute[parbuilder][public]
diff --git a/tex/context/base/mkiv/typo-brk.mkiv b/tex/context/base/mkiv/typo-brk.mkiv
index 3f9ce6f3a..10b2f8e21 100644
--- a/tex/context/base/mkiv/typo-brk.mkiv
+++ b/tex/context/base/mkiv/typo-brk.mkiv
@@ -21,7 +21,7 @@
%
% -- we might eventually stick to only method 5
-\registerctxluafile{typo-brk}{1.001}
+\registerctxluafile{typo-brk}{}
\definesystemattribute[breakpoint][public,global]
diff --git a/tex/context/base/mkiv/typo-cap.lua b/tex/context/base/mkiv/typo-cap.lua
index ea0aad422..4dffd1c49 100644
--- a/tex/context/base/mkiv/typo-cap.lua
+++ b/tex/context/base/mkiv/typo-cap.lua
@@ -78,7 +78,6 @@ local a_cases = attributes.private("case")
local extract = bit32.extract
local run = 0 -- a trick to make neighbouring ranges work
-
local blocked = { }
local function set(tag,font)
@@ -93,12 +92,18 @@ local function set(tag,font)
end
local function get(a)
- local font = extract(a,16,12) -- 4000
- local tag = extract(a, 8, 8) -- 250
- local run = extract(a, 0, 8) -- 50
- return tag, font, run
+ return
+ extract(a, 8, 8), -- tag
+ extract(a,16,12), -- font
+ extract(a, 0, 8) -- run
end
+-- local function get(a)
+-- return
+-- (a >> 8) & ~(-1 << 8), -- & 0x0FF -- tag
+-- (a >> 16) & ~(-1 << 12), -- & 0xFFF -- font
+-- (a >> 0) & ~(-1 << 8) -- & 0x0FF -- run
+-- end
-- print(get(set( 1, 0)))
-- print(get(set( 1, 99)))
diff --git a/tex/context/base/mkiv/typo-cap.mkiv b/tex/context/base/mkiv/typo-cap.mkiv
index 96f3e28d6..4d1272e10 100644
--- a/tex/context/base/mkiv/typo-cap.mkiv
+++ b/tex/context/base/mkiv/typo-cap.mkiv
@@ -18,7 +18,7 @@
%D Maybe we need a more clever system: either command or style mode etc. so
%D that we can avoid the grouped mess in a simple style switch.
-\registerctxluafile{typo-cap}{1.001}
+\registerctxluafile{typo-cap}{optimize}
% \definesystemattribute[case][public] % already predefined
diff --git a/tex/context/base/mkiv/typo-chr.mkiv b/tex/context/base/mkiv/typo-chr.mkiv
index dc0c68664..c92c4562e 100644
--- a/tex/context/base/mkiv/typo-chr.mkiv
+++ b/tex/context/base/mkiv/typo-chr.mkiv
@@ -34,7 +34,7 @@
%D for instance when combining bit and pieces where keeping a state is complex compared
%D to cleaning up unwanted stuff.
-\registerctxluafile{typo-chr}{1.001}
+\registerctxluafile{typo-chr}{}
\definesystemattribute[marked][public]
diff --git a/tex/context/base/mkiv/typo-cln.mkiv b/tex/context/base/mkiv/typo-cln.mkiv
index 193198dc5..efc278cfa 100644
--- a/tex/context/base/mkiv/typo-cln.mkiv
+++ b/tex/context/base/mkiv/typo-cln.mkiv
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{typo-cln}{1.001}
+\registerctxluafile{typo-cln}{}
\definesystemattribute[cleaner][public]
diff --git a/tex/context/base/mkiv/typo-dha.lua b/tex/context/base/mkiv/typo-dha.lua
index f7f3dee2e..af01f0f0d 100644
--- a/tex/context/base/mkiv/typo-dha.lua
+++ b/tex/context/base/mkiv/typo-dha.lua
@@ -84,7 +84,6 @@ local parfillskip_code = skipcodes.parfillskip
local new_textdir = nodepool.textdir
-local hasbit = number.hasbit
local insert = table.insert
local fonthashes = fonts.hashes
diff --git a/tex/context/base/mkiv/typo-dig.mkiv b/tex/context/base/mkiv/typo-dig.mkiv
index aa610b3c9..0f957fbc1 100644
--- a/tex/context/base/mkiv/typo-dig.mkiv
+++ b/tex/context/base/mkiv/typo-dig.mkiv
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{typo-dig}{1.001}
+\registerctxluafile{typo-dig}{}
\definesystemattribute[digits][public]
diff --git a/tex/context/base/mkiv/typo-dir.lua b/tex/context/base/mkiv/typo-dir.lua
index 5645cd433..7fbf5f6d3 100644
--- a/tex/context/base/mkiv/typo-dir.lua
+++ b/tex/context/base/mkiv/typo-dir.lua
@@ -40,7 +40,7 @@ local one_too = false directives.register("typesetters.directions
local report_textdirections = logs.reporter("typesetting","text directions")
----- report_mathdirections = logs.reporter("typesetting","math directions")
-local hasbit = number.hasbit
+local band = bit32.band
local texsetattribute = tex.setattribute
local unsetvalue = attributes.unsetvalue
@@ -111,11 +111,11 @@ local function tomode(specification)
end
local function getglobal(a)
- return a and a > 0 and hasbit(a,m_global)
+ return a and a > 0 and band(a,m_global) ~= 0
end
local function getfences(a)
- return a and a > 0 and hasbit(a,m_fences)
+ return a and a > 0 and band(a,m_fences) ~= 0
end
local function getmethod(a)
diff --git a/tex/context/base/mkiv/typo-dir.mkiv b/tex/context/base/mkiv/typo-dir.mkiv
index eaff408ba..03d2b4717 100644
--- a/tex/context/base/mkiv/typo-dir.mkiv
+++ b/tex/context/base/mkiv/typo-dir.mkiv
@@ -18,11 +18,11 @@
\unprotect
-\registerctxluafile{typo-dir}{1.001}
-\registerctxluafile{typo-dha}{1.001}
-\registerctxluafile{typo-dua}{1.001}
-\registerctxluafile{typo-dub}{1.001}
-\registerctxluafile{typo-duc}{1.001}
+\registerctxluafile{typo-dir}{}
+\registerctxluafile{typo-dha}{}
+\registerctxluafile{typo-dua}{}
+\registerctxluafile{typo-dub}{}
+\registerctxluafile{typo-duc}{}
\definesystemattribute[directions][public]
diff --git a/tex/context/base/mkiv/typo-drp.mkiv b/tex/context/base/mkiv/typo-drp.mkiv
index 2520c3bfd..371ea38d6 100644
--- a/tex/context/base/mkiv/typo-drp.mkiv
+++ b/tex/context/base/mkiv/typo-drp.mkiv
@@ -17,7 +17,7 @@
\unprotect
-\registerctxluafile{typo-drp}{1.001}
+\registerctxluafile{typo-drp}{}
\definesystemattribute[initial][public]
diff --git a/tex/context/base/mkiv/typo-fkr.mkiv b/tex/context/base/mkiv/typo-fkr.mkiv
index 684d831bc..7444db511 100644
--- a/tex/context/base/mkiv/typo-fkr.mkiv
+++ b/tex/context/base/mkiv/typo-fkr.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Typesetting Macros / Additional Font Kerning}
-\registerctxluafile{typo-fkr}{1.001}
+\registerctxluafile{typo-fkr}{}
\definesystemattribute[extrafontkern][public]
diff --git a/tex/context/base/mkiv/typo-fln.mkiv b/tex/context/base/mkiv/typo-fln.mkiv
index e883c57d2..37348be29 100644
--- a/tex/context/base/mkiv/typo-fln.mkiv
+++ b/tex/context/base/mkiv/typo-fln.mkiv
@@ -50,7 +50,7 @@
\unprotect
-\registerctxluafile{typo-fln}{1.001}
+\registerctxluafile{typo-fln}{}
\definesystemattribute[firstline][public]
diff --git a/tex/context/base/mkiv/typo-ini.mkiv b/tex/context/base/mkiv/typo-ini.mkiv
index 1c2d6617a..3e0790af0 100644
--- a/tex/context/base/mkiv/typo-ini.mkiv
+++ b/tex/context/base/mkiv/typo-ini.mkiv
@@ -20,7 +20,7 @@
\writestatus{loading}{ConTeXt Typographic Macros / Initialization}
-\registerctxluafile{typo-ini}{1.001}
+\registerctxluafile{typo-ini}{}
\unprotect
diff --git a/tex/context/base/mkiv/typo-inj.mkiv b/tex/context/base/mkiv/typo-inj.mkiv
index 59f35378f..3b77379b3 100644
--- a/tex/context/base/mkiv/typo-inj.mkiv
+++ b/tex/context/base/mkiv/typo-inj.mkiv
@@ -24,7 +24,7 @@
\unprotect
-\registerctxluafile{typo-inj}{1.001}
+\registerctxluafile{typo-inj}{}
% todo: no need in trialmode
diff --git a/tex/context/base/mkiv/typo-itc.mkvi b/tex/context/base/mkiv/typo-itc.mkvi
index b0d2673cd..5aeb67239 100644
--- a/tex/context/base/mkiv/typo-itc.mkvi
+++ b/tex/context/base/mkiv/typo-itc.mkvi
@@ -22,7 +22,7 @@
%D \setupitaliccorrection[global,always]
%D \stoptyping
-\registerctxluafile{typo-itc}{1.001}
+\registerctxluafile{typo-itc}{}
\definesystemattribute[italics] [public]
\definesystemattribute[mathitalics][public]
diff --git a/tex/context/base/mkiv/typo-krn.mkiv b/tex/context/base/mkiv/typo-krn.mkiv
index 6d6126542..fedbce4d1 100644
--- a/tex/context/base/mkiv/typo-krn.mkiv
+++ b/tex/context/base/mkiv/typo-krn.mkiv
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{typo-krn}{1.001}
+\registerctxluafile{typo-krn}{}
\definesystemattribute[kern][public]
diff --git a/tex/context/base/mkiv/typo-lan.mkiv b/tex/context/base/mkiv/typo-lan.mkiv
index 6bc052b99..fed88789a 100644
--- a/tex/context/base/mkiv/typo-lan.mkiv
+++ b/tex/context/base/mkiv/typo-lan.mkiv
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{typo-lan}{1.001}
+\registerctxluafile{typo-lan}{}
%D \macros
%D {averagecharwidth, charwidthlanguage}
diff --git a/tex/context/base/mkiv/typo-lin.mkiv b/tex/context/base/mkiv/typo-lin.mkiv
index eba08b4c8..a05f770fe 100644
--- a/tex/context/base/mkiv/typo-lin.mkiv
+++ b/tex/context/base/mkiv/typo-lin.mkiv
@@ -15,7 +15,7 @@
%D Beware: the mvl callback is also called when a line is added to a vbox.
-\registerctxluafile{typo-lin}{1.001}
+\registerctxluafile{typo-lin}{}
\unprotect
diff --git a/tex/context/base/mkiv/typo-mar.mkiv b/tex/context/base/mkiv/typo-mar.mkiv
index 462cc633e..f265f173c 100644
--- a/tex/context/base/mkiv/typo-mar.mkiv
+++ b/tex/context/base/mkiv/typo-mar.mkiv
@@ -36,7 +36,7 @@
%D need an extra pass to get inner and outer alignments in sync with
%D the pagebuilder.
-\registerctxluafile{typo-mar}{1.001}
+\registerctxluafile{typo-mar}{}
%definesystemattribute[margindata] % only at the lua end
diff --git a/tex/context/base/mkiv/typo-pag.mkiv b/tex/context/base/mkiv/typo-pag.mkiv
index 30d2b51b7..07443eb16 100644
--- a/tex/context/base/mkiv/typo-pag.mkiv
+++ b/tex/context/base/mkiv/typo-pag.mkiv
@@ -15,6 +15,6 @@
\unprotect
-\registerctxluafile{typo-pag}{1.001}
+\registerctxluafile{typo-pag}{}
\protect \endinput
diff --git a/tex/context/base/mkiv/typo-par.mkiv b/tex/context/base/mkiv/typo-par.mkiv
index 8572f31b8..3db0ffa45 100644
--- a/tex/context/base/mkiv/typo-par.mkiv
+++ b/tex/context/base/mkiv/typo-par.mkiv
@@ -23,7 +23,7 @@
\unprotect
-\registerctxluafile{node-ltp}{1.001}
-\registerctxluafile{trac-par}{1.001}
+\registerctxluafile{node-ltp}{}
+\registerctxluafile{trac-par}{}
\protect \endinput
diff --git a/tex/context/base/mkiv/typo-prc.mkvi b/tex/context/base/mkiv/typo-prc.mkvi
index 49a165696..859c33a65 100644
--- a/tex/context/base/mkiv/typo-prc.mkvi
+++ b/tex/context/base/mkiv/typo-prc.mkvi
@@ -16,8 +16,8 @@
%D For the moment manipulators are loaded here too, as they're in the same
%D category as processors. This might change. (They are used in publications.)
-\registerctxluafile{typo-prc}{1.001}
-\registerctxluafile{typo-man}{1.001}
+\registerctxluafile{typo-prc}{}
+\registerctxluafile{typo-man}{}
\unprotect
diff --git a/tex/context/base/mkiv/typo-rep.mkiv b/tex/context/base/mkiv/typo-rep.mkiv
index c1146997e..df8408999 100644
--- a/tex/context/base/mkiv/typo-rep.mkiv
+++ b/tex/context/base/mkiv/typo-rep.mkiv
@@ -33,7 +33,7 @@
\unprotect
-\registerctxluafile{typo-rep}{1.001}
+\registerctxluafile{typo-rep}{}
\definesystemattribute[stripping][public]
diff --git a/tex/context/base/mkiv/typo-rub.mkiv b/tex/context/base/mkiv/typo-rub.mkiv
index 7b996089b..d51c53aa4 100644
--- a/tex/context/base/mkiv/typo-rub.mkiv
+++ b/tex/context/base/mkiv/typo-rub.mkiv
@@ -19,7 +19,7 @@
\unprotect
-\registerctxluafile{typo-rub}{1.001}
+\registerctxluafile{typo-rub}{}
\definesystemattribute[ruby][public]
diff --git a/tex/context/base/mkiv/typo-spa.mkiv b/tex/context/base/mkiv/typo-spa.mkiv
index 2e3e71bf3..fc73ef021 100644
--- a/tex/context/base/mkiv/typo-spa.mkiv
+++ b/tex/context/base/mkiv/typo-spa.mkiv
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{typo-spa}{1.001}
+\registerctxluafile{typo-spa}{}
\definesystemattribute[spacing][public]
diff --git a/tex/context/base/mkiv/typo-sus.mkiv b/tex/context/base/mkiv/typo-sus.mkiv
index fe44e6327..508580e85 100644
--- a/tex/context/base/mkiv/typo-sus.mkiv
+++ b/tex/context/base/mkiv/typo-sus.mkiv
@@ -16,7 +16,7 @@
%D This is a rather special module, mostly needed by ourselves for
%D projects where copy||editing is not that precise.
-\registerctxluafile{typo-sus}{1.001}
+\registerctxluafile{typo-sus}{}
\unexpanded\def\showsuspects{\enabletrackers[typesetters.suspects]}
diff --git a/tex/context/base/mkiv/typo-tal.mkiv b/tex/context/base/mkiv/typo-tal.mkiv
index 570f1a1f5..5ac0eeea4 100644
--- a/tex/context/base/mkiv/typo-tal.mkiv
+++ b/tex/context/base/mkiv/typo-tal.mkiv
@@ -22,7 +22,7 @@
\unprotect
-\registerctxluafile{typo-tal}{1.001}
+\registerctxluafile{typo-tal}{}
\definesystemattribute[characteralign][public]
diff --git a/tex/context/base/mkiv/typo-txt.mkvi b/tex/context/base/mkiv/typo-txt.mkvi
index 7562fe70c..e7d16fd00 100644
--- a/tex/context/base/mkiv/typo-txt.mkvi
+++ b/tex/context/base/mkiv/typo-txt.mkvi
@@ -17,7 +17,7 @@
\unprotect
-% registerctxluafile{typo-txt}{1.001}
+% registerctxluafile{typo-txt}{}
%D \macros
%D {normalizefontheight,normalizefontwidth,normalizedfontsize}
diff --git a/tex/context/base/mkiv/typo-wrp.mkiv b/tex/context/base/mkiv/typo-wrp.mkiv
index 081349050..0e010515b 100644
--- a/tex/context/base/mkiv/typo-wrp.mkiv
+++ b/tex/context/base/mkiv/typo-wrp.mkiv
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{typo-wrp}{1.001}
+\registerctxluafile{typo-wrp}{}
%D This definition has moved from page-lin.tex to spac-hor.tex (due to
%D visualization added in august 2003) and now to here (november 2014)
diff --git a/tex/context/base/mkiv/unic-ini.mkiv b/tex/context/base/mkiv/unic-ini.mkiv
index 9d8574e35..684e3aa04 100644
--- a/tex/context/base/mkiv/unic-ini.mkiv
+++ b/tex/context/base/mkiv/unic-ini.mkiv
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Unicode Support / Initialization}
-\registerctxluafile{unic-ini}{1.001}
+\registerctxluafile{unic-ini}{}
\unprotect
diff --git a/tex/context/base/mkiv/util-fil.lua b/tex/context/base/mkiv/util-fil.lua
index 6100f36f6..b44dbc3fe 100644
--- a/tex/context/base/mkiv/util-fil.lua
+++ b/tex/context/base/mkiv/util-fil.lua
@@ -8,8 +8,9 @@ if not modules then modules = { } end modules ['util-fil'] = {
local byte = string.byte
local char = string.char
-local extract = bit32 and bit32.extract
-local floor = math.floor
+local extract = bit32.extract
+local rshift = bit32.rshift
+local band = bit32.band
-- 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
@@ -236,24 +237,17 @@ function files.readfixed4(f)
end
end
-if extract then
+-- (real) ((n<<16)>>(16+14)) + ((n&0x3fff)/16384.0))
- local extract = bit32.extract
- local band = bit32.band
-
- -- (real) ((n<<16)>>(16+14)) + ((n&0x3fff)/16384.0))
-
- function files.read2dot14(f)
- local a, b = byte(f:read(2),1,2)
- if a >= 0x80 then
- local n = -(0x100 * a + b)
- return - (extract(n,14,2) + (band(n,0x3FFF) / 16384.0))
- else
- local n = 0x100 * a + b
- return (extract(n,14,2) + (band(n,0x3FFF) / 16384.0))
- end
+function files.read2dot14(f)
+ local a, b = byte(f:read(2),1,2)
+ if a >= 0x80 then
+ local n = -(0x100 * a + b)
+ return - (extract(n,14,2) + (band(n,0x3FFF) / 16384.0))
+ else
+ local n = 0x100 * a + b
+ return (extract(n,14,2) + (band(n,0x3FFF) / 16384.0))
end
-
end
function files.skipshort(f,n)
@@ -268,18 +262,18 @@ end
function files.writecardinal2(f,n)
local a = char(n % 256)
- n = floor(n/256)
+ n = rshift(n,8)
local b = char(n % 256)
f:write(b,a)
end
function files.writecardinal4(f,n)
local a = char(n % 256)
- n = floor(n/256)
+ n = rshift(n,8)
local b = char(n % 256)
- n = floor(n/256)
+ n = rshift(n,8)
local c = char(n % 256)
- n = floor(n/256)
+ n = rshift(n,8)
local d = char(n % 256)
f:write(d,c,b,a)
end
@@ -302,8 +296,8 @@ if fio and fio.readcardinal1 then
files.readinteger2 = fio.readinteger2
files.readinteger3 = fio.readinteger3
files.readinteger4 = fio.readinteger4
- -- files.readfixed2 = fio.readfixed2 -- needs recent luatex
- -- files.readfixed4 = fio.readfixed4 -- needs recent luatex
+ files.readfixed2 = fio.readfixed2
+ files.readfixed4 = fio.readfixed4
files.read2dot14 = fio.read2dot14
files.setposition = fio.setposition
files.getposition = fio.getposition
diff --git a/tex/context/base/mkiv/util-lua.lua b/tex/context/base/mkiv/util-lua.lua
index 27daa516f..1c25bcc03 100644
--- a/tex/context/base/mkiv/util-lua.lua
+++ b/tex/context/base/mkiv/util-lua.lua
@@ -72,12 +72,21 @@ end
-- quite subtle ... doing this wrong incidentally can give more bytes
-function luautilities.loadedluacode(fullname,forcestrip,name)
+function luautilities.loadedluacode(fullname,forcestrip,name,macros)
-- quite subtle ... doing this wrong incidentally can give more bytes
name = name or fullname
local code, message
- if environment.loadpreprocessedfile then
- code, message = environment.loadpreprocessedfile(fullname)
+ if macros then
+ macros = lua.macros
+ end
+ if macros and macros.enabled then
+ -- local c = io.loaddata(fullname) -- not yet available
+ local f = io.open(fullname,"rb") local c = f:read("*a") f:close()
+ local n = c and macros.resolvestring(c)
+ if n and #n ~= #c then
+ report_lua("preprocessed file %a: %i => %i bytes",fullname,#c,#n)
+ end
+ code, message = load(n or c)
else
code, message = loadfile(fullname)
end
diff --git a/tex/context/interface/mkiv/context-en.xml b/tex/context/interface/mkiv/context-en.xml
index 7c6d3ba86..e3b626c2a 100644
--- a/tex/context/interface/mkiv/context-en.xml
+++ b/tex/context/interface/mkiv/context-en.xml
@@ -1685,27 +1685,27 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="rlap">
+ <cd:command file="supp-box.mkiv" level="system" name="rlap">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="llap">
+ <cd:command file="supp-box.mkiv" level="system" name="llap">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="clap">
+ <cd:command file="supp-box.mkiv" level="system" name="clap">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="tlap">
+ <cd:command file="supp-box.mkiv" level="system" name="tlap">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="blap">
+ <cd:command file="supp-box.mkiv" level="system" name="blap">
<cd:arguments>
<cd:content/>
</cd:arguments>
@@ -1757,7 +1757,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="limitatetext">
+ <cd:command file="supp-box.mkiv" level="system" name="limitatetext">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -1770,7 +1770,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="limitatetext" variant="list">
+ <cd:command file="supp-box.mkiv" level="system" name="limitatetext" variant="list">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -1783,7 +1783,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="limitatefirstline">
+ <cd:command file="supp-box.mkiv" level="system" name="limitatefirstline">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -1876,27 +1876,27 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="sbox">
+ <cd:command file="supp-box.mkiv" level="system" name="sbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="inlinedbox">
+ <cd:command file="supp-box.mkiv" level="system" name="inlinedbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="struttedbox">
+ <cd:command file="supp-box.mkiv" level="system" name="struttedbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="topskippedbox">
+ <cd:command file="supp-box.mkiv" level="system" name="topskippedbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="centeredbox">
+ <cd:command file="supp-box.mkiv" level="system" name="centeredbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -1904,7 +1904,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="centerednextbox">
+ <cd:command file="supp-box.mkiv" level="system" name="centerednextbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -1912,7 +1912,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="centerbox">
+ <cd:command file="supp-box.mkiv" level="system" name="centerbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -1965,7 +1965,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="doifcontent">
+ <cd:command file="supp-box.mkiv" level="system" name="doifcontent">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
@@ -1980,8 +1980,8 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="overlay" type="environment"/>
- <cd:command file="supp-box.mkiv" name="fakebox">
+ <cd:command file="supp-box.mkiv" level="system" name="overlay" type="environment"/>
+ <cd:command file="supp-box.mkiv" level="system" name="fakebox">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -1989,7 +1989,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="lbox">
+ <cd:command file="supp-box.mkiv" level="system" name="lbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -1997,7 +1997,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="cbox">
+ <cd:command file="supp-box.mkiv" level="system" name="cbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2005,7 +2005,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="rbox">
+ <cd:command file="supp-box.mkiv" level="system" name="rbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2013,7 +2013,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="ltop">
+ <cd:command file="supp-box.mkiv" level="system" name="ltop">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2021,7 +2021,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="ctop">
+ <cd:command file="supp-box.mkiv" level="system" name="ctop">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2029,7 +2029,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="rtop">
+ <cd:command file="supp-box.mkiv" level="system" name="rtop">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2037,47 +2037,47 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="tbox">
+ <cd:command file="supp-box.mkiv" level="system" name="tbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="bbox">
+ <cd:command file="supp-box.mkiv" level="system" name="bbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="lhbox">
+ <cd:command file="supp-box.mkiv" level="system" name="lhbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="mhbox">
+ <cd:command file="supp-box.mkiv" level="system" name="mhbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="rhbox">
+ <cd:command file="supp-box.mkiv" level="system" name="rhbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="lefthbox">
+ <cd:command file="supp-box.mkiv" level="system" name="lefthbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="midhbox">
+ <cd:command file="supp-box.mkiv" level="system" name="midhbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="righthbox">
+ <cd:command file="supp-box.mkiv" level="system" name="righthbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="boxofsize">
+ <cd:command file="supp-box.mkiv" level="system" name="boxofsize">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="none" list="yes" optional="yes">
@@ -2086,7 +2086,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="limitatelines">
+ <cd:command file="supp-box.mkiv" level="system" name="limitatelines">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -2099,98 +2099,98 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="fittopbaselinegrid">
+ <cd:command file="supp-box.mkiv" level="system" name="fittopbaselinegrid">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="boxcursor"/>
- <cd:command file="supp-box.mkiv" name="placedbox">
+ <cd:command file="supp-box.mkiv" level="system" name="boxcursor"/>
+ <cd:command file="supp-box.mkiv" level="system" name="placedbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="rightbox">
+ <cd:command file="supp-box.mkiv" level="system" name="rightbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="leftbox">
+ <cd:command file="supp-box.mkiv" level="system" name="leftbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="topbox">
+ <cd:command file="supp-box.mkiv" level="system" name="topbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="bottombox">
+ <cd:command file="supp-box.mkiv" level="system" name="bottombox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="lefttopbox">
+ <cd:command file="supp-box.mkiv" level="system" name="lefttopbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="righttopbox">
+ <cd:command file="supp-box.mkiv" level="system" name="righttopbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="leftbottombox">
+ <cd:command file="supp-box.mkiv" level="system" name="leftbottombox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="rightbottombox">
+ <cd:command file="supp-box.mkiv" level="system" name="rightbottombox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="topleftbox">
+ <cd:command file="supp-box.mkiv" level="system" name="topleftbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="toprightbox">
+ <cd:command file="supp-box.mkiv" level="system" name="toprightbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="bottomleftbox">
+ <cd:command file="supp-box.mkiv" level="system" name="bottomleftbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="bottomrightbox">
+ <cd:command file="supp-box.mkiv" level="system" name="bottomrightbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="middlebox">
+ <cd:command file="supp-box.mkiv" level="system" name="middlebox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="baselinemiddlebox">
+ <cd:command file="supp-box.mkiv" level="system" name="baselinemiddlebox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="baselineleftbox">
+ <cd:command file="supp-box.mkiv" level="system" name="baselineleftbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="baselinerightbox">
+ <cd:command file="supp-box.mkiv" level="system" name="baselinerightbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="lrtbbox">
+ <cd:command file="supp-box.mkiv" level="system" name="lrtbbox">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -2207,7 +2207,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="toplinebox">
+ <cd:command file="supp-box.mkiv" level="system" name="toplinebox">
<cd:arguments>
<cd:content/>
</cd:arguments>
@@ -2335,9 +2335,9 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="removedepth"/>
- <cd:command file="supp-box.mkiv" name="obeydepth"/>
- <cd:command file="supp-box.mkiv" name="undepthed">
+ <cd:command file="supp-box.mkiv" level="system" name="removedepth"/>
+ <cd:command file="supp-box.mkiv" level="system" name="obeydepth"/>
+ <cd:command file="supp-box.mkiv" level="system" name="undepthed">
<cd:arguments>
<cd:content/>
</cd:arguments>
@@ -2352,7 +2352,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="raisebox">
+ <cd:command file="supp-box.mkiv" level="system" name="raisebox">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -2361,7 +2361,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="lowerbox">
+ <cd:command file="supp-box.mkiv" level="system" name="lowerbox">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -2370,12 +2370,12 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="halfwaybox">
+ <cd:command file="supp-box.mkiv" level="system" name="halfwaybox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="depthonlybox">
+ <cd:command file="supp-box.mkiv" level="system" name="depthonlybox">
<cd:arguments>
<cd:content/>
</cd:arguments>
@@ -2747,17 +2747,17 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="spac-ali.mkiv" name="ibox">
+ <cd:command file="spac-ali.mkiv" level="system" name="ibox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="spac-ali.mkiv" name="obox">
+ <cd:command file="spac-ali.mkiv" level="system" name="obox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="spac-ali.mkiv" name="definehbox">
+ <cd:command file="spac-ali.mkiv" level="system" name="definehbox">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -2767,7 +2767,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="spac-ali.mkiv" generated="yes" name="hbox" variant="example">
+ <cd:command file="spac-ali.mkiv" generated="yes" level="system" name="hbox" variant="example">
<cd:sequence>
<cd:string value="hbox"/>
<cd:variable value="box"/>
@@ -2776,7 +2776,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" name="lastlinewidth"/>
+ <cd:command file="supp-box.mkiv" level="system" name="lastlinewidth"/>
<cd:command file="supp-box.mkiv" level="system" name="putboxincache">
<cd:arguments>
<cd:keywords delimiters="braces">
@@ -3490,7 +3490,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts" file="typo-cap.mkiv" levle="style" name="smallcapped">
+ <cd:command category="fonts" file="typo-cap.mkiv" level="style" name="smallcapped">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -4615,7 +4615,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command _error_="category=&quot;colors&quot; file=&quot;colo-ini.mkiv&quot;" level="document" name="color">
+ <cd:command category="colors" file="colo-ini.mkiv" level="document" name="color">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:color"/>
@@ -4813,7 +4813,7 @@
</cd:arguments>
</cd:command>
<cd:command category="colors" file="colo-ini.mkiv" level="system" name="paletsize"/>
- <cd:command ategory="colors" clevel="style" file="colo-ini.mkiv" name="setuppalet">
+ <cd:command category="colors" file="colo-ini.mkiv" level="style" name="setuppalet">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -5150,7 +5150,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="columns" file="page-mul.mkiv" name="setsimplecolumnhsize">
+ <cd:command category="columns" file="page-mul.mkiv" level="system" name="setsimplecolumnhsize">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="n">
@@ -5168,7 +5168,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="columns" file="page-mul.mkiv" name="simplecolumns" type="environment">
+ <cd:command category="columns" file="page-mul.mkiv" level="system" name="simplecolumns" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setsimplecolumnhsize"/>
@@ -7064,7 +7064,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter" file="strc-ini.mkvi" name="defineseparatorset">
+ <cd:command category="counter" file="strc-ini.mkvi" level="style" name="defineseparatorset">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -9965,7 +9965,7 @@
<cd:constant default="yes" type="normal"/>
</cd:parameter>
<cd:parameter name="grid">
- <cd:constant type="cd:string"/>
+ <cd:inherit name="snaptogrid"/>
</cd:parameter>
<cd:parameter name="local">
<cd:constant type="yes"/>
@@ -11737,7 +11737,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command ategory="fonts" clevel="system" file="font-ini.mkvi" name="bodyfontsize"/>
+ <cd:command category="fonts" file="font-ini.mkvi" level="system" name="bodyfontsize"/>
<cd:command category="fonts" file="font-ini.mkvi" level="system" name="normalizebodyfontsize">
<cd:arguments>
<cd:csname/>
@@ -15122,7 +15122,7 @@
</cd:arguments>
</cd:command>
<cd:command category="whitespace" file="spac-hor.mkiv" level="style" name="hairspace"/>
- <cd:command category="whitespace" file="spac-hor.mkiv" level="document" name="thinspace"/>
+ <cd:command category="whitespace" file="spac-hor.mkiv" level="style" name="thinspace"/>
<cd:command category="whitespace" file="spac-hor.mkiv" level="style" name="medspace"/>
<cd:command category="whitespace" file="spac-hor.mkiv" level="style" name="thickspace"/>
<cd:command category="whitespace" file="spac-hor.mkiv" level="style" name="autoinsertnextspace"/>
@@ -21601,10 +21601,14 @@
<cd:constant type="none"/>
<cd:constant type="reset"/>
</cd:parameter>
- <cd:parameter name="autopunctuation">
+ <cd:parameter list="yes" name="autopunctuation">
<cd:constant type="yes"/>
<cd:constant default="yes" type="no"/>
<cd:constant type="all"/>
+ <cd:constant type="comma"/>
+ <cd:constant type="yes,semicolon"/>
+ <cd:constant type="comma,semicolon"/>
+ <cd:constant type="all,semicolon"/>
</cd:parameter>
<cd:parameter name="setups">
<cd:constant type="cd:name"/>
@@ -23296,7 +23300,7 @@
</cd:command>
<cd:command category="graphics metapost" file="meta-ini.mkiv" level="document" name="resetMPdrawing"/>
<cd:command category="graphics metapost" file="meta-ini.mkiv" level="document" name="getMPdrawing"/>
- <cd:command _error_="level=&quot;system&quot; type=&quot;environment&quot; begin=&quot;push&quot; end=&quot;pop&quot; category=&quot;graphics metapost&quot; file=&quot;meta-ini.mkiv&quot;" name="MPdrawing"/>
+ <cd:command begin="push" category="graphics metapost" end="pop" file="meta-ini.mkiv" level="system" name="MPdrawing" type="environment"/>
<cd:command category="graphics metapost" file="meta-ini.mkiv" level="document" name="MPdrawing">
<cd:arguments>
<cd:content/>
@@ -23519,7 +23523,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command ategory="graphics" clevel="style" file="meta-ini.mkiv" name="resetMPenvironment"/>
+ <cd:command category="graphics" file="meta-ini.mkiv" level="style" name="resetMPenvironment"/>
<cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="useMPenvironmentbuffer">
<cd:arguments>
<cd:keywords>
@@ -39611,16 +39615,16 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" name="localhsize"/>
- <cd:command file="syst-aux.mkiv" name="setlocalhsize">
+ <cd:command file="syst-aux.mkiv" level="system" name="localhsize"/>
+ <cd:command file="syst-aux.mkiv" level="system" name="setlocalhsize">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant method="none" prefix="cd:sign" type="cd:dimension"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" name="availablehsize"/>
- <cd:command file="syst-aux.mkiv" name="distributedhsize">
+ <cd:command file="syst-aux.mkiv" level="system" name="availablehsize"/>
+ <cd:command file="syst-aux.mkiv" level="system" name="distributedhsize">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -40135,7 +40139,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" name="dontleavehmode"/>
+ <cd:command file="syst-aux.mkiv" level="style" name="dontleavehmode"/>
<cd:command file="syst-aux.mkiv" level="system" name="utfupper">
<cd:arguments>
<cd:keywords delimiters="braces">
@@ -40418,7 +40422,7 @@
<cd:content optional="yes"/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" name="definemeasure">
+ <cd:command file="syst-aux.mkiv" level="style" name="definemeasure">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -40428,7 +40432,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" name="freezemeasure">
+ <cd:command file="syst-aux.mkiv" level="system" name="freezemeasure">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -40438,7 +40442,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" name="setmeasure">
+ <cd:command file="syst-aux.mkiv" level="system" name="setmeasure">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -40448,7 +40452,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" name="setgmeasure">
+ <cd:command file="syst-aux.mkiv" level="system" name="setgmeasure">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -40458,7 +40462,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" name="setemeasure">
+ <cd:command file="syst-aux.mkiv" level="system" name="setemeasure">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -40468,7 +40472,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" name="setxmeasure">
+ <cd:command file="syst-aux.mkiv" level="system" name="setxmeasure">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -40478,21 +40482,21 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" name="measure">
+ <cd:command file="syst-aux.mkiv" level="style" name="measure">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" name="measured">
+ <cd:command file="syst-aux.mkiv" level="style" name="measured">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" name="dividedsize">
+ <cd:command file="syst-aux.mkiv" level="system" name="dividedsize">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -40836,7 +40840,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" name="showtimer">
+ <cd:command file="syst-aux.mkiv" level="system" name="showtimer">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
diff --git a/tex/context/interface/mkiv/i-boxes.xml b/tex/context/interface/mkiv/i-boxes.xml
index 366004840..dd5c30529 100644
--- a/tex/context/interface/mkiv/i-boxes.xml
+++ b/tex/context/interface/mkiv/i-boxes.xml
@@ -76,31 +76,31 @@
</cd:arguments>
</cd:command>
- <cd:command name="rlap" file="supp-box.mkiv">
+ <cd:command name="rlap" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="llap" file="supp-box.mkiv">
+ <cd:command name="llap" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="clap" file="supp-box.mkiv">
+ <cd:command name="clap" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="tlap" file="supp-box.mkiv">
+ <cd:command name="tlap" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="blap" file="supp-box.mkiv">
+ <cd:command name="blap" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
@@ -142,7 +142,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="limitatetext" file="supp-box.mkiv">
+ <cd:command name="limitatetext" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:keywords delimiters="braces">
@@ -152,7 +152,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="limitatetext" variant="list" file="supp-box.mkiv">
+ <cd:command name="limitatetext" variant="list" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:keywords delimiters="braces" list="yes">
@@ -162,7 +162,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="limitatefirstline" file="supp-box.mkiv">
+ <cd:command name="limitatefirstline" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-dimension"/>
@@ -240,45 +240,45 @@
</cd:arguments>
</cd:command>
- <cd:command name="sbox" file="supp-box.mkiv">
+ <cd:command name="sbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="inlinedbox" file="supp-box.mkiv">
+ <cd:command name="inlinedbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="struttedbox" file="supp-box.mkiv">
+ <cd:command name="struttedbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="topskippedbox" file="supp-box.mkiv">
+ <cd:command name="topskippedbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="centeredbox" file="supp-box.mkiv">
+ <cd:command name="centeredbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="centerednextbox" file="supp-box.mkiv">
+ <cd:command name="centerednextbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="centerbox" file="supp-box.mkiv">
+ <cd:command name="centerbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
@@ -327,7 +327,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifcontent" file="supp-box.mkiv">
+ <cd:command name="doifcontent" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
<cd:resolve name="argument-command"/>
@@ -337,105 +337,105 @@
</cd:arguments>
</cd:command>
- <cd:command name="overlay" type="environment" file="supp-box.mkiv"/>
+ <cd:command name="overlay" type="environment" level="system" file="supp-box.mkiv"/>
- <cd:command name="fakebox" file="supp-box.mkiv">
+ <cd:command name="fakebox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="lbox" file="supp-box.mkiv">
+ <cd:command name="lbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="cbox" file="supp-box.mkiv">
+ <cd:command name="cbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="rbox" file="supp-box.mkiv">
+ <cd:command name="rbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="ltop" file="supp-box.mkiv">
+ <cd:command name="ltop" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="ctop" file="supp-box.mkiv">
+ <cd:command name="ctop" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="rtop" file="supp-box.mkiv">
+ <cd:command name="rtop" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="tbox" file="supp-box.mkiv">
+ <cd:command name="tbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="bbox" file="supp-box.mkiv">
+ <cd:command name="bbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="lhbox" file="supp-box.mkiv">
+ <cd:command name="lhbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="mhbox" file="supp-box.mkiv">
+ <cd:command name="mhbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="rhbox" file="supp-box.mkiv">
+ <cd:command name="rhbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="lefthbox" file="supp-box.mkiv">
+ <cd:command name="lefthbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="midhbox" file="supp-box.mkiv">
+ <cd:command name="midhbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="righthbox" file="supp-box.mkiv">
+ <cd:command name="righthbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="boxofsize" file="supp-box.mkiv">
+ <cd:command name="boxofsize" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="none" list="yes" optional="yes">
@@ -445,7 +445,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="limitatelines" file="supp-box.mkiv">
+ <cd:command name="limitatelines" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-command"/>
@@ -453,117 +453,117 @@
</cd:arguments>
</cd:command>
- <cd:command name="fittopbaselinegrid" file="supp-box.mkiv">
+ <cd:command name="fittopbaselinegrid" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="boxcursor" file="supp-box.mkiv"/>
+ <cd:command name="boxcursor" level="system" file="supp-box.mkiv"/>
- <cd:command name="placedbox" file="supp-box.mkiv">
+ <cd:command name="placedbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="rightbox" file="supp-box.mkiv">
+ <cd:command name="rightbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="leftbox" file="supp-box.mkiv">
+ <cd:command name="leftbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="topbox" file="supp-box.mkiv">
+ <cd:command name="topbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="bottombox" file="supp-box.mkiv">
+ <cd:command name="bottombox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="lefttopbox" file="supp-box.mkiv">
+ <cd:command name="lefttopbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="righttopbox" file="supp-box.mkiv">
+ <cd:command name="righttopbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="leftbottombox" file="supp-box.mkiv">
+ <cd:command name="leftbottombox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="rightbottombox" file="supp-box.mkiv">
+ <cd:command name="rightbottombox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="topleftbox" file="supp-box.mkiv">
+ <cd:command name="topleftbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="toprightbox" file="supp-box.mkiv">
+ <cd:command name="toprightbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="bottomleftbox" file="supp-box.mkiv">
+ <cd:command name="bottomleftbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="bottomrightbox" file="supp-box.mkiv">
+ <cd:command name="bottomrightbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="middlebox" file="supp-box.mkiv">
+ <cd:command name="middlebox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="baselinemiddlebox" file="supp-box.mkiv">
+ <cd:command name="baselinemiddlebox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="baselineleftbox" file="supp-box.mkiv">
+ <cd:command name="baselineleftbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="baselinerightbox" file="supp-box.mkiv">
+ <cd:command name="baselinerightbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="lrtbbox" file="supp-box.mkiv">
+ <cd:command name="lrtbbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:resolve name="argument-dimension"/>
@@ -573,7 +573,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="toplinebox" file="supp-box.mkiv">
+ <cd:command name="toplinebox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
@@ -664,11 +664,11 @@
</cd:arguments>
</cd:command>
- <cd:command name="removedepth" file="supp-box.mkiv"/>
+ <cd:command name="removedepth" level="system" file="supp-box.mkiv"/>
- <cd:command name="obeydepth" file="supp-box.mkiv"/>
+ <cd:command name="obeydepth" level="system" file="supp-box.mkiv"/>
- <cd:command name="undepthed" file="supp-box.mkiv">
+ <cd:command name="undepthed" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
@@ -684,7 +684,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="raisebox" file="supp-box.mkiv">
+ <cd:command name="raisebox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:csname/>
@@ -692,7 +692,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="lowerbox" file="supp-box.mkiv">
+ <cd:command name="lowerbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:csname/>
@@ -700,13 +700,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="halfwaybox" file="supp-box.mkiv">
+ <cd:command name="halfwaybox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="depthonlybox" file="supp-box.mkiv">
+ <cd:command name="depthonlybox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
@@ -1014,26 +1014,26 @@
</cd:arguments>
</cd:command>
- <cd:command name="ibox" file="spac-ali.mkiv">
+ <cd:command name="ibox" level="system" file="spac-ali.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="obox" file="spac-ali.mkiv">
+ <cd:command name="obox" level="system" file="spac-ali.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="definehbox" file="spac-ali.mkiv">
+ <cd:command name="definehbox" level="system" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="hbox" generated="yes" variant="example" file="spac-ali.mkiv">
+ <cd:command name="hbox" generated="yes" variant="example" level="system" file="spac-ali.mkiv">
<cd:sequence>
<cd:string value="hbox"/>
<cd:variable value="box"/>
@@ -1043,7 +1043,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="lastlinewidth" file="supp-box.mkiv"/>
+ <cd:command name="lastlinewidth" level="system" file="supp-box.mkiv"/>
<cd:command name="putboxincache" level="system" file="supp-box.mkiv">
<cd:arguments>
diff --git a/tex/context/interface/mkiv/i-capitals.xml b/tex/context/interface/mkiv/i-capitals.xml
index d02874de0..4cfb4a080 100644
--- a/tex/context/interface/mkiv/i-capitals.xml
+++ b/tex/context/interface/mkiv/i-capitals.xml
@@ -143,7 +143,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="smallcapped" levle="style" category="fonts" file="typo-cap.mkiv">
+ <cd:command name="smallcapped" level="style" category="fonts" file="typo-cap.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
diff --git a/tex/context/interface/mkiv/i-color.xml b/tex/context/interface/mkiv/i-color.xml
index af3a575cd..80da11f3b 100644
--- a/tex/context/interface/mkiv/i-color.xml
+++ b/tex/context/interface/mkiv/i-color.xml
@@ -207,7 +207,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="color" level="document"category="colors" file="colo-ini.mkiv">
+ <cd:command name="color" level="document" category="colors" file="colo-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-color"/>
<cd:content/>
@@ -392,7 +392,7 @@
<cd:command name="paletsize" level="system" category="colors" file="colo-ini.mkiv"/>
- <cd:command name="setuppalet" clevel="style" ategory="colors" file="colo-ini.mkiv">
+ <cd:command name="setuppalet" level="style" category="colors" file="colo-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
diff --git a/tex/context/interface/mkiv/i-columns.xml b/tex/context/interface/mkiv/i-columns.xml
index 5c8be8685..9fdd209c0 100644
--- a/tex/context/interface/mkiv/i-columns.xml
+++ b/tex/context/interface/mkiv/i-columns.xml
@@ -81,7 +81,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setsimplecolumnhsize" category="columns" file="page-mul.mkiv">
+ <cd:command name="setsimplecolumnhsize" level="system" category="columns" file="page-mul.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="n">
@@ -100,7 +100,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="simplecolumns" type="environment" category="columns" file="page-mul.mkiv">
+ <cd:command name="simplecolumns" type="environment" level="system" category="columns" file="page-mul.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setsimplecolumnhsize"/>
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 7ff109649..d4b789c4c 100644
--- a/tex/context/interface/mkiv/i-context.pdf
+++ b/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-counter.xml b/tex/context/interface/mkiv/i-counter.xml
index 70527123f..ec841a597 100644
--- a/tex/context/interface/mkiv/i-counter.xml
+++ b/tex/context/interface/mkiv/i-counter.xml
@@ -416,7 +416,7 @@
-->
- <cd:command name="defineseparatorset" category="counter" file="strc-ini.mkvi">
+ <cd:command name="defineseparatorset" level="style" category="counter" file="strc-ini.mkvi">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
diff --git a/tex/context/interface/mkiv/i-floats.xml b/tex/context/interface/mkiv/i-floats.xml
index b01c72a87..c05fae69f 100644
--- a/tex/context/interface/mkiv/i-floats.xml
+++ b/tex/context/interface/mkiv/i-floats.xml
@@ -68,7 +68,7 @@
<cd:constant type="normal" default="yes"/>
</cd:parameter>
<cd:parameter name="grid">
- <cd:constant type="cd:string"/>
+ <cd:inherit name="snaptogrid"/>
</cd:parameter>
<!--
<cd:parameter name="topoffset">
diff --git a/tex/context/interface/mkiv/i-fonts.xml b/tex/context/interface/mkiv/i-fonts.xml
index ea9711787..4dfd8214d 100644
--- a/tex/context/interface/mkiv/i-fonts.xml
+++ b/tex/context/interface/mkiv/i-fonts.xml
@@ -579,7 +579,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="bodyfontsize" clevel="system" ategory="fonts" file="font-ini.mkvi"/>
+ <cd:command name="bodyfontsize" level="system" category="fonts" file="font-ini.mkvi"/>
<cd:command name="normalizebodyfontsize" level="system" category="fonts" file="font-ini.mkvi">
<cd:arguments>
diff --git a/tex/context/interface/mkiv/i-hspace.xml b/tex/context/interface/mkiv/i-hspace.xml
index 75932d2fc..c1626e7b1 100644
--- a/tex/context/interface/mkiv/i-hspace.xml
+++ b/tex/context/interface/mkiv/i-hspace.xml
@@ -42,7 +42,7 @@
<cd:command name="hairspace" level="style" category="whitespace" file="spac-hor.mkiv"/>
- <cd:command name="thinspace" level="style" level="document" category="whitespace" file="spac-hor.mkiv"/>
+ <cd:command name="thinspace" level="style" category="whitespace" file="spac-hor.mkiv"/>
<cd:command name="medspace" level="style" category="whitespace" file="spac-hor.mkiv"/>
diff --git a/tex/context/interface/mkiv/i-margindata.xml b/tex/context/interface/mkiv/i-margindata.xml
index 0ebf17825..a157aaf9c 100644
--- a/tex/context/interface/mkiv/i-margindata.xml
+++ b/tex/context/interface/mkiv/i-margindata.xml
@@ -149,7 +149,7 @@
</cd:instances>
</cd:command>
- <cd:command name="margindata" level="document" level="document" category="structure" file="typo-mar.mkiv">
+ <cd:command name="margindata" level="document" category="structure" file="typo-mar.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes" optional="yes">
diff --git a/tex/context/interface/mkiv/i-math.xml b/tex/context/interface/mkiv/i-math.xml
index 6563590ef..6ae5e97ce 100644
--- a/tex/context/interface/mkiv/i-math.xml
+++ b/tex/context/interface/mkiv/i-math.xml
@@ -63,10 +63,14 @@
<cd:constant type="none"/>
<cd:constant type="reset"/>
</cd:parameter>
- <cd:parameter name="autopunctuation">
+ <cd:parameter name="autopunctuation" list="yes">
<cd:constant type="yes"/>
<cd:constant type="no" default="yes"/>
<cd:constant type="all"/>
+ <cd:constant type="comma"/>
+ <cd:constant type="yes,semicolon"/>
+ <cd:constant type="comma,semicolon"/>
+ <cd:constant type="all,semicolon"/>
</cd:parameter>
<cd:parameter name="setups">
<cd:constant type="cd:name"/>
diff --git a/tex/context/interface/mkiv/i-metapost.xml b/tex/context/interface/mkiv/i-metapost.xml
index 0e703d66f..1c8fd2d0b 100644
--- a/tex/context/interface/mkiv/i-metapost.xml
+++ b/tex/context/interface/mkiv/i-metapost.xml
@@ -107,7 +107,7 @@
<cd:command name="getMPdrawing" level="document" category="graphics metapost" file="meta-ini.mkiv"/>
- <cd:command name="MPdrawing"level="system" type="environment" begin="push" end="pop" category="graphics metapost" file="meta-ini.mkiv"/>
+ <cd:command name="MPdrawing" level="system" type="environment" begin="push" end="pop" category="graphics metapost" file="meta-ini.mkiv"/>
<cd:command name="MPdrawing" level="document" category="graphics metapost" file="meta-ini.mkiv">
<cd:arguments>
@@ -286,7 +286,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="resetMPenvironment" clevel="style" ategory="graphics" file="meta-ini.mkiv"/>
+ <cd:command name="resetMPenvironment" level="style" category="graphics" file="meta-ini.mkiv"/>
<cd:command name="useMPenvironmentbuffer" level="style" category="graphics metapost" file="meta-ini.mkiv">
<cd:arguments>
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index a98b91a6b..67e5997ce 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-system.xml b/tex/context/interface/mkiv/i-system.xml
index ba622940c..44def10e0 100644
--- a/tex/context/interface/mkiv/i-system.xml
+++ b/tex/context/interface/mkiv/i-system.xml
@@ -2515,9 +2515,9 @@
</cd:arguments>
</cd:command>
- <cd:command name="localhsize" file="syst-aux.mkiv"/>
+ <cd:command name="localhsize" level="system" file="syst-aux.mkiv"/>
- <cd:command name="setlocalhsize" file="syst-aux.mkiv">
+ <cd:command name="setlocalhsize" level="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:dimension" prefix="cd:sign" method="none"/>
@@ -2525,9 +2525,9 @@
</cd:arguments>
</cd:command>
- <cd:command name="availablehsize" file="syst-aux.mkiv"/>
+ <cd:command name="availablehsize" level="system" file="syst-aux.mkiv"/>
- <cd:command name="distributedhsize" file="syst-aux.mkiv">
+ <cd:command name="distributedhsize" level="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:resolve name="argument-dimension"/>
@@ -2878,7 +2878,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="dontleavehmode" file="syst-aux.mkiv"/>
+ <cd:command name="dontleavehmode" level="style" file="syst-aux.mkiv"/>
<cd:command name="utfupper" level="system" file="syst-aux.mkiv">
<cd:arguments>
@@ -3114,61 +3114,61 @@
</cd:arguments>
</cd:command>
- <cd:command name="definemeasure" file="syst-aux.mkiv">
+ <cd:command name="definemeasure" level="style" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="freezemeasure" file="syst-aux.mkiv">
+ <cd:command name="freezemeasure" level="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="setmeasure" file="syst-aux.mkiv">
+ <cd:command name="setmeasure" level="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="setgmeasure" file="syst-aux.mkiv">
+ <cd:command name="setgmeasure" level="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="setemeasure" file="syst-aux.mkiv">
+ <cd:command name="setemeasure" level="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="setxmeasure" file="syst-aux.mkiv">
+ <cd:command name="setxmeasure" level="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="measure" file="syst-aux.mkiv">
+ <cd:command name="measure" level="style" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="measured" file="syst-aux.mkiv">
+ <cd:command name="measured" level="style" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="dividedsize" file="syst-aux.mkiv">
+ <cd:command name="dividedsize" level="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:resolve name="argument-dimension"/>
@@ -3412,7 +3412,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="showtimer" file="syst-aux.mkiv">
+ <cd:command name="showtimer" level="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
diff --git a/tex/context/interface/mkiv/i-tex.xml b/tex/context/interface/mkiv/i-tex.xml
new file mode 100644
index 000000000..277c4db95
--- /dev/null
+++ b/tex/context/interface/mkiv/i-tex.xml
@@ -0,0 +1,457 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?context-directive job ctxfile x-setups.ctx ?>
+
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
+
+ <cd:command name="␣" level="primitive"/>
+
+ <cd:command name="-" level="primitive"/>
+
+ <cd:command name="/" level="primitive"/>
+
+ <cd:command name="above" level="primitive">
+ <cd:arguments>
+ <cd:resolve name="string-dimension"/>
+ </cd:arguments>
+ </cd:command>
+
+ <!--
+
+ <cd:command name="abovedisplayshortskip" level="primitive">
+
+ -->
+
+ <cd:command name="abovedisplayshortskip" level="primitive">
+ <cd:arguments>
+ <cd:resolve name="string-assignment-optional"/>
+ <cd:resolve name="string-dimension"/>
+ </cd:arguments>
+ </cd:command>
+
+ <!--
+
+ <cd:command name="abovedisplayskip" level="primitive"/>
+
+ -->
+
+ <cd:command name="abovedisplayskip" level="primitive">
+ <cd:arguments>
+ <cd:resolve name="string-assignment-optional"/>
+ <cd:resolve name="string-dimension"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="abovewithdelims" level="primitive">
+ <cd:arguments>
+ <cd:resolve name="string-text"/>
+ <cd:resolve name="string-text"/>
+ <cd:resolve name="string-dimension"/>
+ </cd:arguments>
+ </cd:command>
+
+<cd:command name="accent" level="primitive"/>
+<cd:command name="adjdemerits" level="primitive"/>
+<cd:command name="advance" level="primitive"/>
+<cd:command name="afterassignment" level="primitive"/>
+<cd:command name="aftergroup" level="primitive"/>
+<cd:command name="atop" level="primitive"/>
+<cd:command name="atopwithdelims" level="primitive"/>
+<cd:command name="badness" level="primitive"/>
+<cd:command name="baselineskip" level="primitive"/>
+<cd:command name="batchmode" level="primitive"/>
+<cd:command name="begingroup" level="primitive"/>
+<cd:command name="belowdisplayshortskip" level="primitive"/>
+<cd:command name="belowdisplayskip" level="primitive"/>
+<cd:command name="binoppenalty" level="primitive"/>
+<cd:command name="botmark" level="primitive"/>
+<cd:command name="box" level="primitive"/>
+<cd:command name="boxmaxdepth" level="primitive"/>
+<cd:command name="brokenpenalty" level="primitive"/>
+<cd:command name="catcode" level="primitive"/>
+<cd:command name="char" level="primitive"/>
+<cd:command name="chardef" level="primitive"/>
+<cd:command name="cleaders" level="primitive"/>
+<cd:command name="closein" level="primitive"/>
+<cd:command name="closeout" level="primitive"/>
+<cd:command name="clubpenalty" level="primitive"/>
+<cd:command name="copy" level="primitive"/>
+<cd:command name="count" level="primitive"/>
+<cd:command name="countdef" level="primitive"/>
+<cd:command name="cr" level="primitive"/>
+<cd:command name="crcr" level="primitive"/>
+<cd:command name="csname" level="primitive"/>
+<cd:command name="day" level="primitive"/>
+<cd:command name="deadcycles" level="primitive"/>
+<cd:command name="def" level="primitive"/>
+<cd:command name="defaulthyphenchar" level="primitive"/>
+<cd:command name="defaultskewchar" level="primitive"/>
+<cd:command name="delcode" level="primitive"/>
+<cd:command name="delimiter" level="primitive"/>
+<cd:command name="delimiterfactor" level="primitive"/>
+<cd:command name="delimitershortfall" level="primitive"/>
+<cd:command name="dimen" level="primitive"/>
+<cd:command name="dimendef" level="primitive"/>
+<cd:command name="discretionary" level="primitive"/>
+<cd:command name="displayindent" level="primitive"/>
+<cd:command name="displaylimits" level="primitive"/>
+<cd:command name="displaystyle" level="primitive"/>
+<cd:command name="displaywidowpenalty" level="primitive"/>
+<cd:command name="displaywidth" level="primitive"/>
+<cd:command name="divide" level="primitive"/>
+<cd:command name="doublehyphendemerits" level="primitive"/>
+<cd:command name="dp" level="primitive"/>
+<cd:command name="dump" level="primitive"/>
+<cd:command name="edef" level="primitive"/>
+<cd:command name="else" level="primitive"/>
+<cd:command name="emergencystretch" level="primitive"/>
+<cd:command name="end" level="primitive"/>
+<cd:command name="endcsname" level="primitive"/>
+<cd:command name="endgroup" level="primitive"/>
+<cd:command name="endinput" level="primitive"/>
+<cd:command name="endlinechar" level="primitive"/>
+<cd:command name="eqno" level="primitive"/>
+<cd:command name="errhelp" level="primitive"/>
+<cd:command name="errmessage" level="primitive"/>
+<cd:command name="errorcontextlines" level="primitive"/>
+<cd:command name="errorstopmode" level="primitive"/>
+<cd:command name="escapechar" level="primitive"/>
+<cd:command name="everycr" level="primitive"/>
+<cd:command name="everydisplay" level="primitive"/>
+<cd:command name="everyhbox" level="primitive"/>
+<cd:command name="everyjob" level="primitive"/>
+<cd:command name="everymath" level="primitive"/>
+<cd:command name="everypar" level="primitive"/>
+<cd:command name="everyvbox" level="primitive"/>
+<cd:command name="exhyphenpenalty" level="primitive"/>
+<cd:command name="expandafter" level="primitive"/>
+<cd:command name="fam" level="primitive"/>
+<cd:command name="fi" level="primitive"/>
+<cd:command name="finalhyphendemerits" level="primitive"/>
+<cd:command name="firstmark" level="primitive"/>
+<cd:command name="floatingpenalty" level="primitive"/>
+<cd:command name="font" level="primitive"/>
+<cd:command name="fontdimen" level="primitive"/>
+<cd:command name="fontname" level="primitive"/>
+<cd:command name="futurelet" level="primitive"/>
+<cd:command name="gdef" level="primitive"/>
+<cd:command name="global" level="primitive"/>
+<cd:command name="globaldefs" level="primitive"/>
+<cd:command name="halign" level="primitive"/>
+<cd:command name="hangafter" level="primitive"/>
+<cd:command name="hangindent" level="primitive"/>
+<cd:command name="hbadness" level="primitive"/>
+<cd:command name="hbox" level="primitive"/>
+<cd:command name="hfil" level="primitive"/>
+<cd:command name="hfill" level="primitive"/>
+<cd:command name="hfilneg" level="primitive"/>
+<cd:command name="hfuzz" level="primitive"/>
+<cd:command name="hoffset" level="primitive"/>
+<cd:command name="holdinginserts" level="primitive"/>
+<cd:command name="hrule" level="primitive"/>
+<cd:command name="hsize" level="primitive"/>
+<cd:command name="hskip" level="primitive"/>
+<cd:command name="hss" level="primitive"/>
+<cd:command name="ht" level="primitive"/>
+<cd:command name="hyphenation" level="primitive"/>
+<cd:command name="hyphenchar" level="primitive"/>
+<cd:command name="hyphenpenalty" level="primitive"/>
+
+ <!--
+
+ <cd:command name="if" level="primitive"/>
+
+ -->
+
+ <cd:command name="if" level="primitive">
+ <cd:arguments>
+ <cd:resolve name="string-text"/>
+ <cd:resolve name="string-text"/>
+ <cd:resolve name="string-text"/>
+ <cd:delimiter name="else"/>
+ <cd:resolve name="string-text"/>
+ <cd:delimiter name="fi"/>
+ </cd:arguments>
+ </cd:command>
+
+ <!--
+
+ <cd:command name="ifcase" level="primitive"/>
+
+ -->
+
+ <cd:command name="ifcase" level="primitive">
+ <cd:arguments>
+ <cd:resolve name="string-number"/>
+ <cd:resolve name="string-text"/>
+ <cd:delimiter name="or"/>
+ <cd:resolve name="string-text"/>
+ <cd:delimiter name="else"/>
+ <cd:resolve name="string-text"/>
+ <cd:delimiter name="fi"/>
+ </cd:arguments>
+ </cd:command>
+
+ <!--
+
+ <cd:command name="ifcat" level="primitive"/>
+
+ -->
+
+ <cd:command name="ifcat" level="primitive">
+ <cd:arguments>
+ <cd:resolve name="string-text"/>
+ <cd:resolve name="string-text"/>
+ <cd:resolve name="string-text"/>
+ <cd:delimiter name="else"/>
+ <cd:resolve name="string-text"/>
+ <cd:delimiter name="fi"/>
+ </cd:arguments>
+ </cd:command>
+
+<cd:command name="ifdim" level="primitive"/>
+<cd:command name="ifeof" level="primitive"/>
+
+ <!--
+
+ <cd:command name="iffalse" level="primitive"/>
+
+ -->
+
+ <cd:command name="iffalse" level="primitive">
+ <cd:arguments>
+ <cd:resolve name="string-text"/>
+ <cd:delimiter name="else"/>
+ <cd:resolve name="string-text"/>
+ <cd:delimiter name="fi"/>
+ </cd:arguments>
+ </cd:command>
+
+<cd:command name="ifhbox" level="primitive"/>
+<cd:command name="ifhmode" level="primitive"/>
+<cd:command name="ifinner" level="primitive"/>
+<cd:command name="ifmmode" level="primitive"/>
+<cd:command name="ifnum" level="primitive"/>
+<cd:command name="ifodd" level="primitive"/>
+
+ <!--
+
+ <cd:command name="iftrue" level="primitive"/>
+
+ -->
+
+ <cd:command name="iftrue" level="primitive">
+ <cd:arguments>
+ <cd:resolve name="string-text"/>
+ <cd:delimiter name="else"/>
+ <cd:resolve name="string-text"/>
+ <cd:delimiter name="fi"/>
+ </cd:arguments>
+ </cd:command>
+
+<cd:command name="ifvbox" level="primitive"/>
+<cd:command name="ifvmode" level="primitive"/>
+<cd:command name="ifvoid" level="primitive"/>
+<cd:command name="ifx" level="primitive"/>
+<cd:command name="ignorespaces" level="primitive"/>
+<cd:command name="immediate" level="primitive"/>
+<cd:command name="indent" level="primitive"/>
+<cd:command name="input" level="primitive"/>
+<cd:command name="inputlineno" level="primitive"/>
+<cd:command name="insert" level="primitive"/>
+<cd:command name="insertpenalties" level="primitive"/>
+<cd:command name="interlinepenalty" level="primitive"/>
+<cd:command name="jobname" level="primitive"/>
+<cd:command name="kern" level="primitive"/>
+<cd:command name="language" level="primitive"/>
+<cd:command name="lastbox" level="primitive"/>
+<cd:command name="lastkern" level="primitive"/>
+<cd:command name="lastpenalty" level="primitive"/>
+<cd:command name="lastskip" level="primitive"/>
+<cd:command name="lccode" level="primitive"/>
+<cd:command name="leaders" level="primitive"/>
+<cd:command name="left" level="primitive"/>
+<cd:command name="lefthyphenmin" level="primitive"/>
+<cd:command name="leftskip" level="primitive"/>
+<cd:command name="leqno" level="primitive"/>
+<cd:command name="let" level="primitive"/>
+<cd:command name="limits" level="primitive"/>
+<cd:command name="linepenalty" level="primitive"/>
+<cd:command name="lineskip" level="primitive"/>
+<cd:command name="lineskiplimit" level="primitive"/>
+<cd:command name="long" level="primitive"/>
+<cd:command name="looseness" level="primitive"/>
+<cd:command name="lower" level="primitive"/>
+<cd:command name="lowercase" level="primitive"/>
+<cd:command name="mag" level="primitive"/>
+<cd:command name="mark" level="primitive"/>
+<cd:command name="mathaccent" level="primitive"/>
+<cd:command name="mathbin" level="primitive"/>
+<cd:command name="mathchar" level="primitive"/>
+<cd:command name="mathchardef" level="primitive"/>
+<cd:command name="mathchoice" level="primitive"/>
+<cd:command name="mathclose" level="primitive"/>
+<cd:command name="mathcode" level="primitive"/>
+<cd:command name="mathinner" level="primitive"/>
+<cd:command name="mathop" level="primitive"/>
+<cd:command name="mathopen" level="primitive"/>
+<cd:command name="mathord" level="primitive"/>
+<cd:command name="mathpunct" level="primitive"/>
+<cd:command name="mathrel" level="primitive"/>
+<cd:command name="mathsurround" level="primitive"/>
+<cd:command name="maxdeadcycles" level="primitive"/>
+<cd:command name="maxdepth" level="primitive"/>
+<cd:command name="meaning" level="primitive"/>
+<cd:command name="medmuskip" level="primitive"/>
+<cd:command name="message" level="primitive"/>
+<cd:command name="mkern" level="primitive"/>
+<cd:command name="month" level="primitive"/>
+<cd:command name="moveleft" level="primitive"/>
+<cd:command name="moveright" level="primitive"/>
+<cd:command name="mskip" level="primitive"/>
+<cd:command name="multiply" level="primitive"/>
+<cd:command name="muskip" level="primitive"/>
+<cd:command name="muskipdef" level="primitive"/>
+<cd:command name="newlinechar" level="primitive"/>
+<cd:command name="noalign" level="primitive"/>
+<cd:command name="noboundary" level="primitive"/>
+<cd:command name="noexpand" level="primitive"/>
+<cd:command name="noindent" level="primitive"/>
+<cd:command name="nolimits" level="primitive"/>
+<cd:command name="nonscript" level="primitive"/>
+<cd:command name="nonstopmode" level="primitive"/>
+<cd:command name="nulldelimiterspace" level="primitive"/>
+<cd:command name="nullfont" level="primitive"/>
+<cd:command name="number" level="primitive"/>
+<cd:command name="omit" level="primitive"/>
+<cd:command name="openin" level="primitive"/>
+<cd:command name="openout" level="primitive"/>
+<cd:command name="or" level="primitive"/>
+<cd:command name="outer" level="primitive"/>
+<cd:command name="output" level="primitive"/>
+<cd:command name="outputpenalty" level="primitive"/>
+<cd:command name="over" level="primitive"/>
+<cd:command name="overfullrule" level="primitive"/>
+<cd:command name="overline" level="primitive"/>
+<cd:command name="overwithdelims" level="primitive"/>
+<cd:command name="pagedepth" level="primitive"/>
+<cd:command name="pagefilllstretch" level="primitive"/>
+<cd:command name="pagefillstretch" level="primitive"/>
+<cd:command name="pagefilstretch" level="primitive"/>
+<cd:command name="pagegoal" level="primitive"/>
+<cd:command name="pageshrink" level="primitive"/>
+<cd:command name="pagestretch" level="primitive"/>
+<cd:command name="pagetotal" level="primitive"/>
+<cd:command name="par" level="primitive"/>
+<cd:command name="parfillskip" level="primitive"/>
+<cd:command name="parindent" level="primitive"/>
+<cd:command name="parshape" level="primitive"/>
+<cd:command name="parskip" level="primitive"/>
+<cd:command name="patterns" level="primitive"/>
+<cd:command name="pausing" level="primitive"/>
+<cd:command name="penalty" level="primitive"/>
+<cd:command name="postdisplaypenalty" level="primitive"/>
+<cd:command name="predisplaypenalty" level="primitive"/>
+<cd:command name="predisplaysize" level="primitive"/>
+<cd:command name="pretolerance" level="primitive"/>
+<cd:command name="prevdepth" level="primitive"/>
+<cd:command name="prevgraf" level="primitive"/>
+<cd:command name="radical" level="primitive"/>
+<cd:command name="raise" level="primitive"/>
+<cd:command name="read" level="primitive"/>
+
+ <cd:command name="relax" level="primitive"/>
+
+<cd:command name="relpenalty" level="primitive"/>
+<cd:command name="right" level="primitive"/>
+<cd:command name="righthyphenmin" level="primitive"/>
+<cd:command name="rightskip" level="primitive"/>
+<cd:command name="romannumeral" level="primitive"/>
+<cd:command name="scriptfont" level="primitive"/>
+<cd:command name="scriptscriptfont" level="primitive"/>
+<cd:command name="scriptscriptstyle" level="primitive"/>
+<cd:command name="scriptspace" level="primitive"/>
+<cd:command name="scriptstyle" level="primitive"/>
+<cd:command name="scrollmode" level="primitive"/>
+<cd:command name="setbox" level="primitive"/>
+<cd:command name="setlanguage" level="primitive"/>
+<cd:command name="sfcode" level="primitive"/>
+<cd:command name="shipout" level="primitive"/>
+<cd:command name="show" level="primitive"/>
+<cd:command name="showbox" level="primitive"/>
+<cd:command name="showboxbreadth" level="primitive"/>
+<cd:command name="showboxdepth" level="primitive"/>
+<cd:command name="showlists" level="primitive"/>
+<cd:command name="showthe" level="primitive"/>
+<cd:command name="skewchar" level="primitive"/>
+<cd:command name="skip" level="primitive"/>
+<cd:command name="skipdef" level="primitive"/>
+<cd:command name="spacefactor" level="primitive"/>
+<cd:command name="spaceskip" level="primitive"/>
+<cd:command name="span" level="primitive"/>
+<cd:command name="special" level="primitive"/>
+<cd:command name="splitbotmark" level="primitive"/>
+<cd:command name="splitfirstmark" level="primitive"/>
+<cd:command name="splitmaxdepth" level="primitive"/>
+<cd:command name="splittopskip" level="primitive"/>
+<cd:command name="string" level="primitive"/>
+<cd:command name="tabskip" level="primitive"/>
+<cd:command name="textfont" level="primitive"/>
+<cd:command name="textstyle" level="primitive"/>
+<cd:command name="the" level="primitive"/>
+<cd:command name="thickmuskip" level="primitive"/>
+<cd:command name="thinmuskip" level="primitive"/>
+<cd:command name="time" level="primitive"/>
+<cd:command name="toks" level="primitive"/>
+<cd:command name="toksdef" level="primitive"/>
+<cd:command name="tolerance" level="primitive"/>
+<cd:command name="topmark" level="primitive"/>
+<cd:command name="topskip" level="primitive"/>
+<cd:command name="tracingcommands" level="primitive"/>
+<cd:command name="tracinglostchars" level="primitive"/>
+<cd:command name="tracingmacros" level="primitive"/>
+<cd:command name="tracingonline" level="primitive"/>
+<cd:command name="tracingoutput" level="primitive"/>
+<cd:command name="tracingpages" level="primitive"/>
+<cd:command name="tracingparagraphs" level="primitive"/>
+<cd:command name="tracingrestores" level="primitive"/>
+<cd:command name="tracingstats" level="primitive"/>
+<cd:command name="uccode" level="primitive"/>
+<cd:command name="uchyph" level="primitive"/>
+<cd:command name="underline" level="primitive"/>
+<cd:command name="unhbox" level="primitive"/>
+<cd:command name="unhcopy" level="primitive"/>
+<cd:command name="unkern" level="primitive"/>
+<cd:command name="unpenalty" level="primitive"/>
+<cd:command name="unskip" level="primitive"/>
+<cd:command name="unvbox" level="primitive"/>
+<cd:command name="unvcopy" level="primitive"/>
+<cd:command name="uppercase" level="primitive"/>
+<cd:command name="vadjust" level="primitive"/>
+<cd:command name="valign" level="primitive"/>
+<cd:command name="vbadness" level="primitive"/>
+<cd:command name="vbox" level="primitive"/>
+<cd:command name="vcenter" level="primitive"/>
+
+ <cd:command name="vfil" level="primitive"/>
+
+ <cd:command name="vfill" level="primitive"/>
+
+<cd:command name="vfilneg" level="primitive"/>
+<cd:command name="vfuzz" level="primitive"/>
+<cd:command name="voffset" level="primitive"/>
+<cd:command name="vrule" level="primitive"/>
+<cd:command name="vsize" level="primitive"/>
+<cd:command name="vskip" level="primitive"/>
+<cd:command name="vsplit" level="primitive"/>
+<cd:command name="vss" level="primitive"/>
+<cd:command name="vtop" level="primitive"/>
+<cd:command name="wd" level="primitive"/>
+<cd:command name="widowpenalty" level="primitive"/>
+<cd:command name="write" level="primitive"/>
+<cd:command name="xdef" level="primitive"/>
+<cd:command name="xleaders" level="primitive"/>
+<cd:command name="xspaceskip" level="primitive"/>
+<cd:command name="year" level="primitive"/>
+
+</cd:interface> \ No newline at end of file
diff --git a/tex/context/interface/mkiv/i-translate.xml b/tex/context/interface/mkiv/i-translate.xml
index 4dc5d93e9..a865a4dd0 100644
--- a/tex/context/interface/mkiv/i-translate.xml
+++ b/tex/context/interface/mkiv/i-translate.xml
@@ -13,9 +13,9 @@
<cd:command name="resetinputtranslation" level="system" category="language" file="m-translate.mkiv"/>
- <cd:command name="enableinputtranslation" level="style" category="language" level="style" file="m-translate.mkiv"/>
+ <cd:command name="enableinputtranslation" level="style" category="language" file="m-translate.mkiv"/>
- <cd:command name="disableinputtranslation" level="style" category="language" level="style" file="m-translate.mkiv"/>
+ <cd:command name="disableinputtranslation" level="style" category="language" file="m-translate.mkiv"/>
<cd:command name="readtranslatedfile" level="document" category="language" file="m-translate.mkiv">
<cd:arguments>
diff --git a/tex/context/modules/mkiv/m-database.mkiv b/tex/context/modules/mkiv/m-database.mkiv
index cc7dd3d72..49d62ea3d 100644
--- a/tex/context/modules/mkiv/m-database.mkiv
+++ b/tex/context/modules/mkiv/m-database.mkiv
@@ -13,7 +13,7 @@
%D For Mojca.
-\registerctxluafile{m-database}{1.001}
+\registerctxluafile{m-database}{}
\unprotect
diff --git a/tex/context/modules/mkiv/m-escrito.mkiv b/tex/context/modules/mkiv/m-escrito.mkiv
index 763857918..2d69fb218 100644
--- a/tex/context/modules/mkiv/m-escrito.mkiv
+++ b/tex/context/modules/mkiv/m-escrito.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{m-escrito}{1.001}
+\registerctxluafile{m-escrito}{}
%D This is a fun project and not meant for production (yet). It's a follow up on a
%D project by Taco presented at a Bacho\TeX\ meeting years ago. I probably messed up
diff --git a/tex/context/modules/mkiv/m-markdown.mkiv b/tex/context/modules/mkiv/m-markdown.mkiv
index 6e0036513..29d41341e 100644
--- a/tex/context/modules/mkiv/m-markdown.mkiv
+++ b/tex/context/modules/mkiv/m-markdown.mkiv
@@ -19,7 +19,7 @@
%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}
+\registerctxluafile{m-markdown}{}
\unprotect
diff --git a/tex/context/modules/mkiv/m-matrix.mkiv b/tex/context/modules/mkiv/m-matrix.mkiv
index fe947c02c..c5ace0b33 100644
--- a/tex/context/modules/mkiv/m-matrix.mkiv
+++ b/tex/context/modules/mkiv/m-matrix.mkiv
@@ -17,7 +17,7 @@
%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
+% \registerctxluafile{l-matrix}{} % not yet
\startmodule[matrix]
diff --git a/tex/context/modules/mkiv/m-media.mkiv b/tex/context/modules/mkiv/m-media.mkiv
index d86394ea5..e2b324279 100644
--- a/tex/context/modules/mkiv/m-media.mkiv
+++ b/tex/context/modules/mkiv/m-media.mkiv
@@ -19,12 +19,12 @@
\unprotect
-\registerctxluafile{grph-u3d}{1.001} % grph-inc.mkiv
-\registerctxluafile{lpdf-u3d}{1.001} % back-u3d.mkiv
-\registerctxluafile{back-u3d}{1.001} % back-pdf.mkiv
+\registerctxluafile{grph-u3d}{} % grph-inc.mkiv
+\registerctxluafile{lpdf-u3d}{} % back-u3d.mkiv
+\registerctxluafile{back-u3d}{} % back-pdf.mkiv
-\registerctxluafile{grph-swf}{1.001} % grph-inc.mkiv
-\registerctxluafile{lpdf-swf}{1.001} % back-u3d.mkiv
-\registerctxluafile{back-swf}{1.001} % back-pdf.mkiv
+\registerctxluafile{grph-swf}{} % grph-inc.mkiv
+\registerctxluafile{lpdf-swf}{} % back-u3d.mkiv
+\registerctxluafile{back-swf}{} % back-pdf.mkiv
\protect \endinput
diff --git a/tex/context/modules/mkiv/m-nodechart.mkvi b/tex/context/modules/mkiv/m-nodechart.mkvi
index c9d985850..ab117efe0 100644
--- a/tex/context/modules/mkiv/m-nodechart.mkvi
+++ b/tex/context/modules/mkiv/m-nodechart.mkvi
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{m-nodechart}{1.001}
+\registerctxluafile{m-nodechart}{}
\usemodule[chart]
diff --git a/tex/context/modules/mkiv/m-punk.mkiv b/tex/context/modules/mkiv/m-punk.mkiv
index f7e17da83..b72abd64d 100644
--- a/tex/context/modules/mkiv/m-punk.mkiv
+++ b/tex/context/modules/mkiv/m-punk.mkiv
@@ -13,6 +13,7 @@
\startluacode
local concat = table.concat
+local round = math.round
local chardata = characters.data
local fontdata = fonts.hashes.identifiers
@@ -85,7 +86,7 @@ function metapost.characters.process(mpxformat, name, instances, scalefactor)
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 hash = file.robustname(string.format("%s %05i %03i", fontname, round(scalefactor*1000), instances))
local lists = containers.read(fonts.mp.cache, hash)
if not lists then
statistics.starttiming(flusher)
@@ -203,7 +204,7 @@ 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)
+ return string.format("%i glyphs, %.3f seconds runtime, %0.3f glyphs/second", total, time, total/time)
else
return string.format("%i glyphs, %.3f seconds runtime", total, time)
end
diff --git a/tex/context/modules/mkiv/m-spreadsheet.mkiv b/tex/context/modules/mkiv/m-spreadsheet.mkiv
index 914a2b57a..1d76d86ab 100644
--- a/tex/context/modules/mkiv/m-spreadsheet.mkiv
+++ b/tex/context/modules/mkiv/m-spreadsheet.mkiv
@@ -13,7 +13,7 @@
%D This is an experimental follow up on discussion on the mailing list.
-\registerctxluafile{m-spreadsheet}{1.001}
+\registerctxluafile{m-spreadsheet}{}
\unprotect
diff --git a/tex/context/modules/mkiv/x-html.mkiv b/tex/context/modules/mkiv/x-html.mkiv
index 723872dfd..9fdbe38fd 100644
--- a/tex/context/modules/mkiv/x-html.mkiv
+++ b/tex/context/modules/mkiv/x-html.mkiv
@@ -148,7 +148,7 @@
%
% we can also use \xmlmap for border etc
-% \registerctxluafile{lxml-css}{1.001}
+% \registerctxluafile{lxml-css}{}
\starttexdefinition cssgetsinglepadding #1
\ctxlua {
diff --git a/tex/context/modules/mkiv/x-setups-basics.mkiv b/tex/context/modules/mkiv/x-setups-basics.mkiv
index 87dd7241d..f3c5d2d53 100644
--- a/tex/context/modules/mkiv/x-setups-basics.mkiv
+++ b/tex/context/modules/mkiv/x-setups-basics.mkiv
@@ -183,7 +183,8 @@
\def\docommand##1{
\xmlsetup{#1}{xml:setups:assemblename:instance}
\ifconditional\c_cmd_show_registered
- \writestatus{known setup}{\currentSETUPinclusion stp:x:\currentSETUPfullname:##1}%
+ %\writestatus{known setup}{\currentSETUPinclusion stp:x:\currentSETUPfullname:##1}%
+ \writestatus{known setup}{\currentSETUPinclusion \currentSETUPfullname:##1}%
\fi
\expanded{\texcommand[stp:x:\currentSETUPfullname:##1]{{#1}{##1}}}}%
\processcommacommand[\clf_getinstances{#1}]\docommand
@@ -503,6 +504,9 @@
\ifx\cmd_id\empty
missing: stp:x:#1
\else
+ \ifx\m_cmd_instance\empty
+ \edef\m_cmd_instance{\expandafter\secondoftwoarguments\cmd_id}%
+ \fi
\xmlsetup{\expandafter\firstoftwoarguments\cmd_id}{xml:setups:typeset}
\fi
\stopelement
diff --git a/tex/generic/context/luatex/luatex-core.lua b/tex/generic/context/luatex/luatex-core.lua
index 870a25d48..2d6f6a73d 100644
--- a/tex/generic/context/luatex/luatex-core.lua
+++ b/tex/generic/context/luatex/luatex-core.lua
@@ -182,12 +182,158 @@ if md5 then
end
+-- compatibility
+
+if not unpack then
+ unpack = table.unpack
+end
+
+if not package.loaders then
+ package.loaders = package.searchers
+end
+
+if bit32 then
+
+ -- lua 5.2: we're okay
+
+elseif utf8 then
+
+ -- lua 5.3: bitwise.lua, v 1.24 2014/12/26 17:20:53 roberto
+
+ bit32 = load ( [[
+local select = select -- instead of: arg = { ... }
+
+bit32 = {
+ bnot = function (a)
+ return ~a & 0xFFFFFFFF
+ end,
+ band = function (x, y, z, ...)
+ if not z then
+ return ((x or -1) & (y or -1)) & 0xFFFFFFFF
+ else
+ local res = x & y & z
+ for i=1,select("#",...) do
+ res = res & select(i,...)
+ end
+ return res & 0xFFFFFFFF
+ end
+ end,
+ bor = function (x, y, z, ...)
+ if not z then
+ return ((x or 0) | (y or 0)) & 0xFFFFFFFF
+ else
+ local res = x | y | z
+ for i=1,select("#",...) do
+ res = res | select(i,...)
+ end
+ return res & 0xFFFFFFFF
+ end
+ end,
+ bxor = function (x, y, z, ...)
+ if not z then
+ return ((x or 0) ~ (y or 0)) & 0xFFFFFFFF
+ else
+ local res = x ~ y ~ z
+ for i=1,select("#",...) do
+ res = res ~ select(i,...)
+ end
+ return res & 0xFFFFFFFF
+ end
+ end,
+ btest = function (x, y, z, ...)
+ if not z then
+ return (((x or -1) & (y or -1)) & 0xFFFFFFFF) ~= 0
+ else
+ local res = x & y & z
+ for i=1,select("#",...) do
+ res = res & select(i,...)
+ end
+ return (res & 0xFFFFFFFF) ~= 0
+ end
+ end,
+ lshift = function (a, b)
+ return ((a & 0xFFFFFFFF) << b) & 0xFFFFFFFF
+ end,
+ rshift = function (a, b)
+ return ((a & 0xFFFFFFFF) >> b) & 0xFFFFFFFF
+ end,
+ arshift = function (a, b)
+ a = a & 0xFFFFFFFF
+ if b <= 0 or (a & 0x80000000) == 0 then
+ return (a >> b) & 0xFFFFFFFF
+ else
+ return ((a >> b) | ~(0xFFFFFFFF >> b)) & 0xFFFFFFFF
+ end
+ end,
+ lrotate = function (a ,b)
+ b = b & 31
+ a = a & 0xFFFFFFFF
+ a = (a << b) | (a >> (32 - b))
+ return a & 0xFFFFFFFF
+ end,
+ rrotate = function (a, b)
+ b = -b & 31
+ a = a & 0xFFFFFFFF
+ a = (a << b) | (a >> (32 - b))
+ return a & 0xFFFFFFFF
+ end,
+ extract = function (a, f, w)
+ return (a >> f) & ~(-1 << (w or 1))
+ end,
+ replace = function (a, v, f, w)
+ local mask = ~(-1 << (w or 1))
+ return ((a & ~(mask << f)) | ((v & mask) << f)) & 0xFFFFFFFF
+ end,
+}
+ ]] )
+
+elseif bit then
+
+ -- luajit (for now)
+
+ bit32 = load ( [[
+local band, bnot, rshift, lshift = bit.band, bit.bnot, bit.rshift, bit.lshift
+
+bit32 = {
+ arshift = bit.arshift,
+ band = band,
+ bnot = bnot,
+ bor = bit.bor,
+ bxor = bit.bxor,
+ btest = function(...)
+ return band(...) ~= 0
+ end,
+ extract = function(a,f,w)
+ return band(rshift(a,f),2^(w or 1)-1)
+ end,
+ lrotate = bit.rol,
+ lshift = lshift,
+ replace = function(a,v,f,w)
+ local mask = 2^(w or 1)-1
+ return band(a,bnot(lshift(mask,f)))+lshift(band(v,mask),f)
+ end,
+ rrotate = bit.ror,
+ rshift = rshift,
+}
+ ]] )
+
+else
+
+ -- hope for the best or fail
+
+ bit32 = require("bit32")
+
+end
+
+-- so far
+
if utilities and utilities.merger and utilities.merger.compact then
local byte, format, gmatch = string.byte, string.format, string.gmatch
local concat = table.concat
local data = gsub(io.loaddata('luatex-core.lua'),'if%s+utilities.*','')
+
local t = { }
local r = { }
local n = 0
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 014b110ab..23a87b4ff 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 10/29/17 15:44:10
+-- merge date : 11/01/17 11:55:46
do -- begin closure to overcome local limits and interference
@@ -119,6 +119,9 @@ if not FFISUPPORTED then
elseif not ffi.number then
ffi.number=tonumber
end
+if not bit32 and utf8 then
+ bit32=require("l-bit32")
+end
end -- closure
@@ -2919,21 +2922,23 @@ if not modules then modules={} end modules ['l-math']={
copyright="PRAGMA ADE / ConTeXt Development Team",
license="see context related readme files"
}
-local floor,sin,cos,tan=math.floor,math.sin,math.cos,math.tan
if not math.ceiling then
math.ceiling=math.ceil
end
if not math.round then
+ local floor=math.floor
function math.round(x) return floor(x+0.5) end
end
if not math.div then
+ local floor=math.floor
function math.div(n,m) return floor(n/m) end
end
if not math.mod then
function math.mod(n,m) return n%m end
end
-local pipi=2*math.pi/360
if not math.sind then
+ local sin,cos,tan=math.sin,math.cos,math.tan
+ local pipi=2*math.pi/360
function math.sind(d) return sin(d*pipi) end
function math.cosd(d) return cos(d*pipi) end
function math.tand(d) return tan(d*pipi) end
@@ -2942,6 +2947,61 @@ if not math.odd then
function math.odd (n) return n%2~=0 end
function math.even(n) return n%2==0 end
end
+if not math.cosh then
+ local exp=math.exp
+ function math.cosh(x)
+ local xx=exp(x)
+ return (xx+1/xx)/2
+ end
+ function math.sinh(x)
+ local xx=exp(x)
+ return (xx-1/xx)/2
+ end
+ function math.tanh(x)
+ local xx=exp(x)
+ return (xx-1/xx)/(xx+1/xx)
+ end
+end
+if not math.pow then
+ function math.pow(x,y)
+ return x^y
+ end
+end
+if not math.atan2 then
+ math.atan2=math.atan
+end
+if not math.ldexp then
+ function math.ldexp(x,e)
+ return x*2.0^e
+ end
+end
+if not math.log10 then
+ local ln=math.ln
+ local lt=ln(10)
+ function math.log10(x)
+ return ln(x)/lt
+ end
+end
+if not math.type then
+ function math.type()
+ return "float"
+ end
+end
+if not math.tointeger then
+ math.mininteger=-0x4FFFFFFFFFFF
+ math.maxinteger=0x4FFFFFFFFFFF
+ local floor=math.floor
+ function math.tointeger(n)
+ local f=floor(n)
+ return f==n and f or nil
+ end
+end
+if not math.ult then
+ local floor=math.floor
+ function math.tointeger(m,n)
+ return floor(m)<floor(n)
+ end
+end
end -- closure
@@ -2961,6 +3021,8 @@ local type=type
local char,byte,format,sub,gmatch=string.char,string.byte,string.format,string.sub,string.gmatch
local concat=table.concat
local P,C,R,Cs,Ct,Cmt,Cc,Carg,Cp=lpeg.P,lpeg.C,lpeg.R,lpeg.Cs,lpeg.Ct,lpeg.Cmt,lpeg.Cc,lpeg.Carg,lpeg.Cp
+local floor=math.floor
+local rshift=bit32.rshift
local lpegmatch=lpeg.match
local patterns=lpeg.patterns
local tabletopattern=lpeg.utfchartabletopattern
@@ -2983,26 +3045,26 @@ end
if not utf.char then
utf.char=string.utfcharacter or (utf8 and utf8.char)
if not utf.char then
- local floor,char=math.floor,string.char
+ local char=string.char
function utf.char(n)
if n<0x80 then
return char(n)
elseif n<0x800 then
return char(
- 0xC0+floor(n/0x40),
+ 0xC0+rshift(n,6),
0x80+(n%0x40)
)
elseif n<0x10000 then
return char(
- 0xE0+floor(n/0x1000),
- 0x80+(floor(n/0x40)%0x40),
+ 0xE0+rshift(n,12),
+ 0x80+(rshift(n,6)%0x40),
0x80+(n%0x40)
)
elseif n<0x200000 then
return char(
- 0xF0+floor(n/0x40000),
- 0x80+(floor(n/0x1000)%0x40),
- 0x80+(floor(n/0x40)%0x40),
+ 0xF0+rshift(n,18),
+ 0x80+(rshift(n,12)%0x40),
+ 0x80+(rshift(n,6)%0x40),
0x80+(n%0x40)
)
else
@@ -3431,20 +3493,22 @@ function utf.utf32_to_utf8_t(t,endian)
end
local function little(b)
if b<0x10000 then
- return char(b%256,b/256)
+ return char(b%256,rshift(b,8))
else
b=b-0x10000
- local b1,b2=b/1024+0xD800,b%1024+0xDC00
- return char(b1%256,b1/256,b2%256,b2/256)
+ local b1=rshift(b,10)+0xD800
+ local b2=b%1024+0xDC00
+ return char(b1%256,rshift(b1,8),b2%256,rshift(b2,8))
end
end
local function big(b)
if b<0x10000 then
- return char(b/256,b%256)
+ return char(rshift(b,8),b%256)
else
b=b-0x10000
- local b1,b2=b/1024+0xD800,b%1024+0xDC00
- return char(b1/256,b1%256,b2/256,b2%256)
+ local b1=rshift(b,10)+0xD800
+ local b2=b%1024+0xDC00
+ return char(rshift(b1,8),b1%256,rshift(b2,8),b2%256)
end
end
local l_remap=Cs((p_utf8byte/little+P(1)/"")^0)
@@ -4355,8 +4419,9 @@ if not modules then modules={} end modules ['util-fil']={
}
local byte=string.byte
local char=string.char
-local extract=bit32 and bit32.extract
-local floor=math.floor
+local extract=bit32.extract
+local rshift=bit32.rshift
+local band=bit32.band
utilities=utilities or {}
local files={}
utilities.files=files
@@ -4526,18 +4591,14 @@ function files.readfixed4(f)
return (0x100*a+b )+(0x100*c+d)/0x10000
end
end
-if extract then
- local extract=bit32.extract
- local band=bit32.band
- function files.read2dot14(f)
- local a,b=byte(f:read(2),1,2)
- if a>=0x80 then
- local n=-(0x100*a+b)
- return-(extract(n,14,2)+(band(n,0x3FFF)/16384.0))
- else
- local n=0x100*a+b
- return (extract(n,14,2)+(band(n,0x3FFF)/16384.0))
- end
+function files.read2dot14(f)
+ local a,b=byte(f:read(2),1,2)
+ if a>=0x80 then
+ local n=-(0x100*a+b)
+ return-(extract(n,14,2)+(band(n,0x3FFF)/16384.0))
+ else
+ local n=0x100*a+b
+ return (extract(n,14,2)+(band(n,0x3FFF)/16384.0))
end
end
function files.skipshort(f,n)
@@ -4548,17 +4609,17 @@ function files.skiplong(f,n)
end
function files.writecardinal2(f,n)
local a=char(n%256)
- n=floor(n/256)
+ n=rshift(n,8)
local b=char(n%256)
f:write(b,a)
end
function files.writecardinal4(f,n)
local a=char(n%256)
- n=floor(n/256)
+ n=rshift(n,8)
local b=char(n%256)
- n=floor(n/256)
+ n=rshift(n,8)
local c=char(n%256)
- n=floor(n/256)
+ n=rshift(n,8)
local d=char(n%256)
f:write(d,c,b,a)
end
@@ -4577,6 +4638,8 @@ if fio and fio.readcardinal1 then
files.readinteger2=fio.readinteger2
files.readinteger3=fio.readinteger3
files.readinteger4=fio.readinteger4
+ files.readfixed2=fio.readfixed2
+ files.readfixed4=fio.readfixed4
files.read2dot14=fio.read2dot14
files.setposition=fio.setposition
files.getposition=fio.getposition
@@ -9113,9 +9176,9 @@ if not modules then modules={} end modules ['font-map']={
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 floor=math.floor
local formatters=string.formatters
local sortedhash,sortedkeys=table.sortedhash,table.sortedkeys
+local rshift=bit32.rshift
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_mapping=v end)
local report_fonts=logs.reporter("fonts","loading")
@@ -9153,7 +9216,7 @@ local function tounicode16(unicode)
return f_single(unicode)
else
unicode=unicode-0x10000
- return f_double(floor(unicode/1024)+0xD800,unicode%1024+0xDC00)
+ return f_double(rshift(unicode,10)+0xD800,unicode%1024+0xDC00)
end
end
local function tounicode16sequence(unicodes)
@@ -9164,7 +9227,7 @@ local function tounicode16sequence(unicodes)
t[l]=f_single(u)
else
u=u-0x10000
- t[l]=f_double(floor(u/1024)+0xD800,u%1024+0xDC00)
+ t[l]=f_double(rshift(u,10)+0xD800,u%1024+0xDC00)
end
end
return concat(t)
@@ -9178,7 +9241,7 @@ local function tounicode(unicode)
t[l]=f_single(u)
else
u=u-0x10000
- t[l]=f_double(floor(u/1024)+0xD800,u%1024+0xDC00)
+ t[l]=f_double(rshift(u,10)+0xD800,u%1024+0xDC00)
end
end
return concat(t)
@@ -9187,7 +9250,7 @@ local function tounicode(unicode)
return f_single(unicode)
else
unicode=unicode-0x10000
- return f_double(floor(unicode/1024)+0xD800,unicode%1024+0xDC00)
+ return f_double(rshift(unicode,10)+0xD800,unicode%1024+0xDC00)
end
end
end
@@ -9714,6 +9777,7 @@ local byte,lower,char,gsub=string.byte,string.lower,string.char,string.gsub
local floor,round=math.floor,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 rshift=bit32.rshift
local setmetatableindex=table.setmetatableindex
local formatters=string.formatters
local sortedkeys=table.sortedkeys
@@ -10876,7 +10940,7 @@ function readers.kern(f,fontdata,specification)
local version=readushort(f)
local length=readushort(f)
local coverage=readushort(f)
- local format=bit32.rshift(coverage,8)
+ local format=rshift(coverage,8)
if format==0 then
local nofpairs=readushort(f)
local searchrange=readushort(f)
@@ -13331,7 +13395,7 @@ if not modules then modules={} end modules ['font-ttf']={
license="see context related readme files"
}
local next,type,unpack=next,type,unpack
-local bittest,band,rshift=bit32.btest,bit32.band,bit32.rshift
+local band,rshift=bit32.band,bit32.rshift
local sqrt,round=math.sqrt,math.round
local char=string.char
local concat=table.concat
@@ -13923,7 +13987,7 @@ local function readglyph(f,nofcontours)
while i<=nofpoints do
local flag=readbyte(f)
flags[i]=flag
- if bittest(flag,0x08) then
+ if band(flag,0x08)~=0 then
for j=1,readbyte(f) do
i=i+1
flags[i]=flag
@@ -13934,8 +13998,8 @@ local function readglyph(f,nofcontours)
local x=0
for i=1,nofpoints do
local flag=flags[i]
- local short=bittest(flag,0x02)
- local same=bittest(flag,0x10)
+ local short=band(flag,0x02)~=0
+ local same=band(flag,0x10)~=0
if short then
if same then
x=x+readbyte(f)
@@ -13946,13 +14010,13 @@ local function readglyph(f,nofcontours)
else
x=x+readshort(f)
end
- points[i]={ x,0,bittest(flag,0x01) }
+ points[i]={ x,0,band(flag,0x01)~=0 }
end
local y=0
for i=1,nofpoints do
local flag=flags[i]
- local short=bittest(flag,0x04)
- local same=bittest(flag,0x20)
+ local short=band(flag,0x04)~=0
+ local same=band(flag,0x20)~=0
if short then
if same then
y=y+readbyte(f)
@@ -13979,8 +14043,8 @@ local function readcomposite(f)
while true do
local flags=readushort(f)
local index=readushort(f)
- local f_xyarg=bittest(flags,0x0002)
- local f_offset=bittest(flags,0x0800)
+ local f_xyarg=band(flags,0x0002)~=0
+ local f_offset=band(flags,0x0800)~=0
local xscale=1
local xrotate=0
local yrotate=0
@@ -13990,7 +14054,7 @@ local function readcomposite(f)
local base=false
local reference=false
if f_xyarg then
- if bittest(flags,0x0001) then
+ if band(flags,0x0001)~=0 then
xoffset=readshort(f)
yoffset=readshort(f)
else
@@ -13998,7 +14062,7 @@ local function readcomposite(f)
yoffset=readchar(f)
end
else
- if bittest(flags,0x0001) then
+ if band(flags,0x0001)~=0 then
base=readshort(f)
reference=readshort(f)
else
@@ -14006,21 +14070,21 @@ local function readcomposite(f)
reference=readchar(f)
end
end
- if bittest(flags,0x0008) then
+ if band(flags,0x0008)~=0 then
xscale=read2dot14(f)
yscale=xscale
if f_xyarg and f_offset then
xoffset=xoffset*xscale
yoffset=yoffset*yscale
end
- elseif bittest(flags,0x0040) then
+ elseif band(flags,0x0040)~=0 then
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
+ elseif band(flags,0x0080)~=0 then
xscale=read2dot14(f)
xrotate=read2dot14(f)
yrotate=read2dot14(f)
@@ -14033,16 +14097,16 @@ local function readcomposite(f)
nofcomponents=nofcomponents+1
components[nofcomponents]={
index=index,
- usemine=bittest(flags,0x0200),
- round=bittest(flags,0x0006),
+ usemine=band(flags,0x0200)~=0,
+ round=band(flags,0x0006)~=0,
base=base,
reference=reference,
matrix={ xscale,xrotate,yrotate,yscale,xoffset,yoffset },
}
- if bittest(flags,0x0100) then
+ if band(flags,0x0100)~=0 then
instructions=true
end
- if not bittest(flags,0x0020) then
+ if not band(flags,0x0020)~=0 then
break
end
end
@@ -14149,7 +14213,7 @@ local function readpoints(f)
return nil,0
else
if count<128 then
- elseif bittest(count,0x80) then
+ elseif band(count,0x80)~=0 then
count=band(count,0x7F)*256+readbyte(f)
else
end
@@ -14158,7 +14222,7 @@ local function readpoints(f)
local n=1
while p<count do
local control=readbyte(f)
- local runreader=bittest(control,0x80) and readushort or readbyte
+ local runreader=band(control,0x80)~=0 and readushort or readbyte
local runlength=band(control,0x7F)
for i=1,runlength+1 do
n=n+runreader(f)
@@ -14178,12 +14242,12 @@ local function readdeltas(f,nofpoints)
if not control then
break
end
- local allzero=bittest(control,0x80)
+ local allzero=band(control,0x80)~=0
local runlength=band(control,0x3F)+1
if allzero then
z=z+runlength
else
- local runreader=bittest(control,0x40) and readshort or readinteger
+ local runreader=band(control,0x40)~=0 and readshort or readinteger
if z>0 then
for i=1,z do
p=p+1
@@ -14209,7 +14273,7 @@ local function readdeltas(f,nofpoints)
while nofpoints>0 do
local control=readbyte(f)
if control then
- local allzero=bittest(control,0x80)
+ local allzero=band(control,0x80)~=0
local runlength=band(control,0x3F)+1
if allzero then
for i=1,runlength do
@@ -14217,7 +14281,7 @@ local function readdeltas(f,nofpoints)
deltas[p]=0
end
else
- local runreader=bittest(control,0x40) and readshort or readinteger
+ local runreader=band(control,0x40)~=0 and readshort or readinteger
for i=1,runlength do
p=p+1
deltas[p]=runreader(f)
@@ -14255,7 +14319,7 @@ function readers.gvar(f,fontdata,specification,glyphdata,shapedata)
local tuples={}
local glyphdata=fontdata.glyphs
local dowidth=not fontdata.variabledata.hvarwidths
- if bittest(flags,0x0001) then
+ if band(flags,0x0001)~=0 then
for i=1,nofglyphs+1 do
data[i]=dataoffset+readulong(f)
end
@@ -14296,7 +14360,7 @@ function readers.gvar(f,fontdata,specification,glyphdata,shapedata)
local allpoints=(shape.nofpoints or 0)
local shared=false
local nofshared=0
- if bittest(flags,0x8000) then
+ if band(flags,0x8000)~=0 then
local current=getposition(f)
setposition(f,offset)
shared,nofshared=readpoints(f)
@@ -14307,9 +14371,9 @@ function readers.gvar(f,fontdata,specification,glyphdata,shapedata)
local size=readushort(f)
local flags=readushort(f)
local index=band(flags,0x0FFF)
- local haspeak=bittest(flags,0x8000)
- local intermediate=bittest(flags,0x4000)
- local private=bittest(flags,0x2000)
+ local haspeak=band(flags,0x8000)~=0
+ local intermediate=band(flags,0x4000)~=0
+ local private=band(flags,0x2000)~=0
local peak=nil
local start=nil
local stop=nil
@@ -14404,7 +14468,6 @@ if not modules then modules={} end modules ['font-dsp']={
license="see context related readme files"
}
local next,type=next,type
-local bittest=bit32.btest
local band=bit32.band
local extract=bit32.extract
local bor=bit32.bor
@@ -14553,10 +14616,10 @@ local lookupnames={
}
local lookupflags=setmetatableindex(function(t,k)
local v={
- bittest(k,0x0008) and true or false,
- bittest(k,0x0004) and true or false,
- bittest(k,0x0002) and true or false,
- bittest(k,0x0001) and true or false,
+ band(k,0x0008)~=0 and true or false,
+ band(k,0x0004)~=0 and true or false,
+ band(k,0x0002)~=0 and true or false,
+ band(k,0x0001)~=0 and true or false,
}
t[k]=v
return v
@@ -14927,15 +14990,15 @@ local function readposition(f,format,mainoffset,getdelta)
return { 0,0,h,0 }
end
end
- local x=bittest(format,0x01) and readshort(f) or 0
- local y=bittest(format,0x02) and readshort(f) or 0
- local h=bittest(format,0x04) and readshort(f) or 0
- local v=bittest(format,0x08) and readshort(f) or 0
+ local x=band(format,0x1)~=0 and readshort(f) or 0
+ local y=band(format,0x2)~=0 and readshort(f) or 0
+ local h=band(format,0x4)~=0 and readshort(f) or 0
+ local v=band(format,0x8)~=0 and readshort(f) or 0
if format>=0x10 then
- local X=bittest(format,0x10) and skipshort(f) or 0
- local Y=bittest(format,0x20) and skipshort(f) or 0
- local H=bittest(format,0x40) and skipshort(f) or 0
- local V=bittest(format,0x80) and skipshort(f) or 0
+ local X=band(format,0x10)~=0 and skipshort(f) or 0
+ local Y=band(format,0x20)~=0 and skipshort(f) or 0
+ local H=band(format,0x40)~=0 and skipshort(f) or 0
+ local V=band(format,0x80)~=0 and skipshort(f) or 0
local s=skips[extract(format,4,4)]
if s>0 then
skipshort(f,s)
@@ -16075,7 +16138,7 @@ do
for j=1,nofsubtables do
subtables[j]=offset+readushort(f)
end
- local markclass=bittest(flagbits,0x0010)
+ local markclass=band(flagbits,0x0010)~=0
if markclass then
markclass=readushort(f)
end
@@ -16469,7 +16532,7 @@ do
local version=readushort(f)
local length=readushort(f)
local coverage=readushort(f)
- local format=bit32.rshift(coverage,8)
+ local format=rshift(coverage,8)
if format==0 then
local nofpairs=readushort(f)
local searchrange=readushort(f)
@@ -16889,7 +16952,7 @@ local function readmathvariants(f,fontdata,offset)
advance=readushort(f),
}
local flags=readushort(f)
- if bittest(flags,0x0001) then
+ if band(flags,0x0001)~=0 then
p.extender=1
end
parts[i]=p
@@ -30124,10 +30187,8 @@ if not modules then modules={} end modules ['font-one']={
}
local fonts,logs,trackers,containers,resolvers=fonts,logs,trackers,containers,resolvers
local next,type,tonumber,rawget=next,type,tonumber,rawget
-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 match,gsub=string.match,string.gsub
local abs=math.abs
-local bxor,rshift=bit32.bxor,bit32.rshift
local P,S,R,Cmt,C,Ct,Cs,Carg=lpeg.P,lpeg.S,lpeg.R,lpeg.Cmt,lpeg.C,lpeg.Ct,lpeg.Cs,lpeg.Carg
local lpegmatch,patterns=lpeg.match,lpeg.patterns
local sortedhash=table.sortedhash