texlive[67034] trunk: luametatex 2.10.08, context 2023.05.05 18:36
commits+karl at tug.org
commits+karl at tug.org
Sun May 7 00:03:58 CEST 2023
Revision: 67034
http://tug.org/svn/texlive?view=revision&revision=67034
Author: karl
Date: 2023-05-07 00:03:57 +0200 (Sun, 07 May 2023)
Log Message:
-----------
luametatex 2.10.08, context 2023.05.05 18:36
Modified Paths:
--------------
trunk/Master/bin/aarch64-linux/luametatex
trunk/Master/bin/amd64-freebsd/luametatex
trunk/Master/bin/armhf-linux/luametatex
trunk/Master/bin/i386-freebsd/luametatex
trunk/Master/bin/i386-linux/luametatex
trunk/Master/bin/i386-solaris/luametatex
trunk/Master/bin/windows/context.lua
trunk/Master/bin/windows/luametatex.exe
trunk/Master/bin/windows/mtxrun.lua
trunk/Master/bin/x86_64-darwinlegacy/luametatex
trunk/Master/bin/x86_64-linuxmusl/luametatex
trunk/Master/bin/x86_64-solaris/luametatex
trunk/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-context.lua
trunk/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metapost.lua
trunk/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-tex.lua
trunk/Master/texmf-dist/context/data/scite/context/scite-context-data-context.properties
trunk/Master/texmf-dist/context/data/scite/context/scite-context-data-metapost.properties
trunk/Master/texmf-dist/context/data/scite/context/scite-context-data-tex.properties
trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-alignments.pdf
trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-boxes.pdf
trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-characters.pdf
trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-conditionals.pdf
trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-expansion.pdf
trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-grouping.pdf
trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-inserts.pdf
trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-loops.pdf
trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-macros.pdf
trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-marks.pdf
trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-paragraphs.pdf
trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-registers.pdf
trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-scope.pdf
trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-security.pdf
trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel.pdf
trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.html
trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.man
trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.xml
trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/detcow.mp
trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-building.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-fonts.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-languages.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-modifications.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-nodes.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-pdf.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-style.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-fonts.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-languages.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-lua.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-modifications.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/gracht.mp
trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/mycow.mp
trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-dk.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget.tex
trunk/Master/texmf-dist/doc/man/man1/context.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-babel.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-base.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-bibtex.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-cache.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-chars.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-check.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-colors.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-context.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-dvi.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-epub.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-evohome.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-fcd.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-flac.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-fonts.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-grep.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-interface.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-metapost.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-modules.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-package.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-patterns.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-pdf.1
trunk/Master/texmf-dist/doc/man/man1/mtx-pdf.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-plain.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-profile.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-rsync.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-scite.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-server.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-spell.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-texworks.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-timing.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-tools.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-unicode.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-unzip.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-update.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-vscode.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-watch.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtx-youless.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/mtxrun.man1.pdf
trunk/Master/texmf-dist/metapost/context/base/mpxl/mp-base.mpxl
trunk/Master/texmf-dist/metapost/context/base/mpxl/mp-xbox.mpxl
trunk/Master/texmf-dist/scripts/context/lua/mtx-context.lua
trunk/Master/texmf-dist/scripts/context/lua/mtx-ctan.lua
trunk/Master/texmf-dist/scripts/context/lua/mtx-fonts.lua
trunk/Master/texmf-dist/scripts/context/lua/mtx-install.lua
trunk/Master/texmf-dist/scripts/context/lua/mtx-pdf.lua
trunk/Master/texmf-dist/scripts/context/lua/mtx-update.lua
trunk/Master/texmf-dist/scripts/context/lua/mtxrun.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/anch-pos.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/attr-ini.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/attr-mkr.mkiv
trunk/Master/texmf-dist/tex/context/base/mkiv/bibl-bib.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/char-def.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/char-ini.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/char-tex.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/char-utf.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/chem-ini.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv
trunk/Master/texmf-dist/tex/context/base/mkiv/context.mkiv
trunk/Master/texmf-dist/tex/context/base/mkiv/core-con.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/core-dat.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/core-two.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/core-uti.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/data-con.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/data-res.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/data-tar.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/data-tmp.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/data-zip.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/file-ini.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/file-mod.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-afk.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-con.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-def.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-enc.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-fbk.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-imp-tex.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-ini.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-log.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-nod.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-one.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-onr.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-ota.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-otc.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-otl.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-oto.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-ots.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-sol.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-syn.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-tfm.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-trt.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/font-vir.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/good-ini.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/l-dir.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/lang-def.mkiv
trunk/Master/texmf-dist/tex/context/base/mkiv/lang-txt.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/lang-url.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/lpdf-mis.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/luat-cbk.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/luat-fmt.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/luat-ini.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-ent.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-lpt.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-mis.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-tab.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/math-def.mkiv
trunk/Master/texmf-dist/tex/context/base/mkiv/math-map.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/math-vfu.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/meta-fun.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/mlib-fio.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/mlib-run.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/mult-low.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/mult-mps.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/mult-prm.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/node-ini.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/node-res.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/node-tra.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/pack-obj.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/pack-rul.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/phys-dim.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/publ-dat.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.mkvi
trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-aps.mkvi
trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-chicago.mkvi
trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-cite.mkvi
trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-definitions.mkvi
trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-list.mkvi
trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-page.mkvi
trunk/Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/publ-ini.mkiv
trunk/Master/texmf-dist/tex/context/base/mkiv/regi-ini.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/scrn-fld.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/scrn-fld.mkvi
trunk/Master/texmf-dist/tex/context/base/mkiv/sort-ini.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/status-files.pdf
trunk/Master/texmf-dist/tex/context/base/mkiv/status-lua.pdf
trunk/Master/texmf-dist/tex/context/base/mkiv/syst-con.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkiv
trunk/Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.mkiv
trunk/Master/texmf-dist/tex/context/base/mkiv/toks-scn.mkiv
trunk/Master/texmf-dist/tex/context/base/mkiv/trac-lmx.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/typo-duc.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/util-dim.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/util-fmt.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/util-prs.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/util-sac.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/util-sbx.lua
trunk/Master/texmf-dist/tex/context/base/mkiv/util-seq.lua
trunk/Master/texmf-dist/tex/context/base/mkxl/anch-box.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/attr-eff.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/attr-ini.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/attr-mkr.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/attr-neg.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/catc-ini.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/char-tex.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/cldf-ini.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/cldf-lmt.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/cont-new.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/context.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/core-dat.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/core-two.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/core-uti.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/data-vir.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/driv-shp.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/driv-usr.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/enco-ini.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/file-job.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/file-job.mklx
trunk/Master/texmf-dist/tex/context/base/mkxl/file-mod.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/font-chk.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/font-con.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/font-ctx.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/font-def.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/font-fbk.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/font-fil.mklx
trunk/Master/texmf-dist/tex/context/base/mkxl/font-ini.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/font-ini.mklx
trunk/Master/texmf-dist/tex/context/base/mkxl/font-lib.mklx
trunk/Master/texmf-dist/tex/context/base/mkxl/font-mat.mklx
trunk/Master/texmf-dist/tex/context/base/mkxl/font-one.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/font-onr.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/font-ota.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/font-ots.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/font-tex.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/font-tfm.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/font-txt.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/lang-def.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/lang-lab.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/lang-url.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-ano.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-img.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-lmt.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-pde.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-rul.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-xmp.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/luat-cbk.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/luat-cnf.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/luat-cod.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/luat-ini.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/luat-lib.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/luat-run.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/lxml-ini.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/math-acc.mklx
trunk/Master/texmf-dist/tex/context/base/mkxl/math-act.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/math-ali.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/math-def.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/math-dif.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/math-dld.mklx
trunk/Master/texmf-dist/tex/context/base/mkxl/math-fen.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/math-fnt.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/math-frc.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/math-ini.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/math-ini.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/math-map.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/math-noa.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/math-rad.mklx
trunk/Master/texmf-dist/tex/context/base/mkxl/math-spa.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/math-stc.mklx
trunk/Master/texmf-dist/tex/context/base/mkxl/math-ttv.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/math-twk.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/math-vfu.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/meta-imp-threesix.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/meta-ini.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/mlib-run.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/mult-sys.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/node-ali.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/node-dir.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/node-ini.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/node-ref.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/node-res.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/node-tra.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/node-tsk.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/pack-box.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/pack-com.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/pack-lyr.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/pack-obj.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/pack-rul.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/pack-rul.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/page-brk.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/page-flt.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/page-imp.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/page-inj.mklx
trunk/Master/texmf-dist/tex/context/base/mkxl/page-mbk.mklx
trunk/Master/texmf-dist/tex/context/base/mkxl/phys-dim.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/publ-ini.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/regi-ini.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/scrn-fld.mklx
trunk/Master/texmf-dist/tex/context/base/mkxl/scrn-ref.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/scrn-wid.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/spac-ali.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/spac-ali.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/spac-hor.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/spac-pag.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/strc-doc.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/strc-flt.mklx
trunk/Master/texmf-dist/tex/context/base/mkxl/strc-itm.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/strc-itm.mklx
trunk/Master/texmf-dist/tex/context/base/mkxl/strc-lst.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/strc-lst.mklx
trunk/Master/texmf-dist/tex/context/base/mkxl/strc-mar.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/strc-mar.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/strc-mat.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/strc-not.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/strc-ref.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/strc-ref.mklx
trunk/Master/texmf-dist/tex/context/base/mkxl/strc-reg.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/strc-reg.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/strc-sec.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/strc-syn.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/supp-box.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/symb-emj.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/syst-aux.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/syst-ini.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/syst-lua.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-com.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-ntb.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-tab.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-tbl.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-xtb.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/task-ini.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/toks-aux.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/toks-ini.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/toks-scn.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/trac-deb.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/trac-inf.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/trac-vis.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/type-set.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/typo-ada.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/typo-ada.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/typo-adj.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/typo-bld.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/typo-cln.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/typo-del.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/typo-dir.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/typo-duc.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/typo-lbx.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/typo-lin.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/typo-prc.mklx
trunk/Master/texmf-dist/tex/context/base/mkxl/unic-ini.mkxl
trunk/Master/texmf-dist/tex/context/fonts/mkiv/antykwa-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/bonum-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/cambria-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/common-math-jmn.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/common-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/concrete-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/dejavu-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/ebgaramond-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/erewhon-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/euler-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/iwona-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/kpfonts-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/kurier-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/libertinus-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/modern-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/newcomputermodern-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/pagella-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/schola-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/stixtwo-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/termes-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-antykwa.mkiv
trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-concrete.mkiv
trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-dejavu.mkiv
trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-ebgaramond.mkiv
trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-erewhon.mkiv
trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-iwona.mkiv
trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-kpfonts.mkiv
trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-kurier.mkiv
trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-latinmodern.mkiv
trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-libertinus.mkiv
trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-newcomputermodern.mkiv
trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-stix.mkiv
trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-texgyre.mkiv
trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-xcharter.mkiv
trunk/Master/texmf-dist/tex/context/fonts/mkiv/xcharter-math.lfg
trunk/Master/texmf-dist/tex/context/modules/mkiv/m-tikz.mkiv
trunk/Master/texmf-dist/tex/context/modules/mkiv/s-abbreviations-logos.tex
trunk/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-tables.lua
trunk/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv
trunk/Master/texmf-dist/tex/context/modules/mkiv/x-asciimath.lua
trunk/Master/texmf-dist/tex/context/modules/mkxl/m-tikz-pgfplots.tex
trunk/Master/texmf-dist/tex/context/modules/mkxl/m-tikz.mkxl
trunk/Master/texmf-dist/tex/context/modules/mkxl/s-math-atoms.mkxl
trunk/Master/texmf-dist/tex/context/modules/mkxl/s-system-macros.mkxl
trunk/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua
trunk/Master/texmf-dist/tex/generic/context/luatex/luatex-mplib.lua
trunk/Master/texmf-dist/tex/generic/context/luatex/luatex-preprocessor.lua
trunk/Master/tlpkg/doc/releng.txt
trunk/Master/tlpkg/libexec/ctan2tds
trunk/Master/tlpkg/tlpsrc/context.tlpsrc
Added Paths:
-----------
trunk/Master/source/luametatex-2.10.08.tar.xz
trunk/Master/texmf-dist/context/data/texfont/
trunk/Master/texmf-dist/context/data/texfont/type-buy.dat
trunk/Master/texmf-dist/context/data/texfont/type-fsf.dat
trunk/Master/texmf-dist/context/data/texfont/type-ghz.dat
trunk/Master/texmf-dist/context/data/texfont/type-tmf.dat
trunk/Master/texmf-dist/doc/context/README.adoc
trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-buffers.pdf
trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-localboxes.pdf
trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-tokens.pdf
trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-tokens.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-hownotto.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-texlive.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-unicode.tex
trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-fairphone.tex
trunk/Master/texmf-dist/scripts/context/lua/mtx-install-tikz.lua
trunk/Master/texmf-dist/scripts/context/lua/texlua.lua
trunk/Master/texmf-dist/tex/context/base/mkxl/attr-eff.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/attr-mkr.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/attr-neg.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/cldf-pos.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/cldf-pos.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/core-dat.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/core-pag.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/core-pag.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/core-two.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/data-sch.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/font-oto.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/meta-imp-kaktovik.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/meta-imp-newmath.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/node-pag.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/node-pag.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/phys-dim.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/typo-cln.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/typo-dha.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/unic-ini.lmt
trunk/Master/texmf-dist/tex/context/base/mkxl/util-sbx.lmt
trunk/Master/texmf-dist/tex/context/fonts/mkiv/dejavu-text.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/ebgaramond-text.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/erewhon-text.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/kpfonts-text.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/libertinus-text.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/modern-text.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/newcomputermodern-text.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/stixtwo-text.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/texgyre-text.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/xcharter-text.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkxl/type-imp-bengali.mkxl
trunk/Master/texmf-dist/tex/context/fonts/mkxl/type-imp-braille.mkxl
trunk/Master/texmf-dist/tex/context/fonts/mkxl/type-imp-devanagari.mkxl
trunk/Master/texmf-dist/tex/context/fonts/mkxl/type-imp-euler.mkxl
trunk/Master/texmf-dist/tex/context/fonts/mkxl/type-imp-gujarati.mkxl
trunk/Master/texmf-dist/tex/context/fonts/mkxl/type-imp-indic.mkxl
trunk/Master/texmf-dist/tex/context/fonts/mkxl/type-imp-kannada.mkxl
trunk/Master/texmf-dist/tex/context/fonts/mkxl/type-imp-malayalam.mkxl
trunk/Master/texmf-dist/tex/context/fonts/mkxl/type-imp-tamil.mkxl
trunk/Master/texmf-dist/tex/context/fonts/mkxl/type-imp-telugu.mkxl
trunk/Master/texmf-dist/tex/context/modules/mkxl/s-math-tests.mkxl
trunk/Master/texmf-dist/tex/context/modules/mkxl/s-text-tests.mkxl
trunk/Master/texmf-dist/tex/generic/context/ppchtex/
trunk/Master/texmf-dist/tex/generic/context/ppchtex/m-ch-de.tex
trunk/Master/texmf-dist/tex/generic/context/ppchtex/m-ch-en.tex
trunk/Master/texmf-dist/tex/generic/context/ppchtex/m-ch-nl.tex
trunk/Master/texmf-dist/tex/generic/context/ppchtex/ppchtex.noc
trunk/Master/tlpkg/bin/tl-update-lmtx-bin
Removed Paths:
-------------
trunk/Build/source/texk/texlive/linked_scripts/context/stubs/
trunk/Master/source/luametatex-230310.tar.xz
trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.1
trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.man1.pdf
trunk/Master/texmf-dist/doc/man/man1/luatools.1
trunk/Master/texmf-dist/doc/man/man1/luatools.man1.pdf
trunk/Master/texmf-dist/fonts/map/dvips/context/
trunk/Master/texmf-dist/fonts/map/luatex/context/
trunk/Master/texmf-dist/fonts/map/pdftex/context/
trunk/Master/texmf-dist/tex/context/base/mkxl/type-imp-bengali.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/type-imp-braille.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/type-imp-devanagari.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/type-imp-euler.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/type-imp-gujarati.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/type-imp-indic.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/type-imp-kannada.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/type-imp-malayalam.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/type-imp-tamil.mkxl
trunk/Master/texmf-dist/tex/context/base/mkxl/type-imp-telugu.mkxl
trunk/Master/texmf-dist/tex/context/colors/icc/profiles/
trunk/Master/texmf-dist/tex/context/fonts/mkiv/koeielettersot.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/lucida-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/lucida-typeone-math.lfg
trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-koeielettersot.mkiv
trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-lucida-typeone.mkiv
trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-lucida.mkiv
Modified: trunk/Master/bin/aarch64-linux/luametatex
===================================================================
(Binary files differ)
Modified: trunk/Master/bin/amd64-freebsd/luametatex
===================================================================
(Binary files differ)
Modified: trunk/Master/bin/armhf-linux/luametatex
===================================================================
(Binary files differ)
Modified: trunk/Master/bin/i386-freebsd/luametatex
===================================================================
(Binary files differ)
Modified: trunk/Master/bin/i386-linux/luametatex
===================================================================
(Binary files differ)
Modified: trunk/Master/bin/i386-solaris/luametatex
===================================================================
(Binary files differ)
Modified: trunk/Master/bin/windows/context.lua
===================================================================
--- trunk/Master/bin/windows/context.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/bin/windows/context.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1,41 +1,41 @@
--- This file is a companion to "context(.exe)" and is effectively the same
--- as:
---
--- mtxrun -script context ...
---
--- which will locate "mtx-context.lua" and load that one. The binary is a
--- copy of "luametatex(.exe)" aka luatex 2.0 for context lmtx. In a similar
--- fashion "mtxrun(.exe)" will load the "mtrun.lua" script.
---
--- The installation of context should do this on Windows:
---
--- luametatex.exe -> tex/texmf-win64/bin/luatex.exe
--- luametatex.exe -> tex/texmf-win64/bin/mtxrun.exe
--- luametatex.exe -> tex/texmf-win64/bin/context.exe
--- mtxrun.lua -> tex/texmf-win64/bin/mtxrun.lua
--- context.lua -> tex/texmf-win64/bin/context.lua
---
--- and this on Unix:
---
--- luametatex -> tex/texmf-linux-64/bin/luatex
--- luametatex -> tex/texmf-linux-64/bin/mtxrun
--- luametatex -> tex/texmf-linux-64/bin/context
--- mtxrun.lua -> tex/texmf-linux-64/bin/mtxrun.lua
--- context.lua -> tex/texmf-linux-64/bin/context.lua
---
--- The static binary is smaller than 3MB so the few copies provide no real
--- overhead.
-
-local selfpath = os.selfpath
-
-if not arg or not selfpath then
- print("invalid stub")
- os.exit()
-end
-
-arg[0] = "mtxrun"
-
-table.insert(arg,1,"mtx-context")
-table.insert(arg,1,"--script")
-
-dofile(selfpath .. "/" .. "mtxrun.lua")
+-- This file is a companion to "context(.exe)" and is effectively the same
+-- as:
+--
+-- mtxrun -script context ...
+--
+-- which will locate "mtx-context.lua" and load that one. The binary is a
+-- copy of "luametatex(.exe)" aka luatex 2.0 for context lmtx. In a similar
+-- fashion "mtxrun(.exe)" will load the "mtrun.lua" script.
+--
+-- The installation of context should do this on Windows:
+--
+-- luametatex.exe -> tex/texmf-win64/bin/luatex.exe
+-- luametatex.exe -> tex/texmf-win64/bin/mtxrun.exe
+-- luametatex.exe -> tex/texmf-win64/bin/context.exe
+-- mtxrun.lua -> tex/texmf-win64/bin/mtxrun.lua
+-- context.lua -> tex/texmf-win64/bin/context.lua
+--
+-- and this on Unix:
+--
+-- luametatex -> tex/texmf-linux-64/bin/luatex
+-- luametatex -> tex/texmf-linux-64/bin/mtxrun
+-- luametatex -> tex/texmf-linux-64/bin/context
+-- mtxrun.lua -> tex/texmf-linux-64/bin/mtxrun.lua
+-- context.lua -> tex/texmf-linux-64/bin/context.lua
+--
+-- The static binary is smaller than 3MB so the few copies provide no real
+-- overhead.
+
+local selfpath = os.selfpath
+
+if not arg or not selfpath then
+ print("invalid stub")
+ os.exit()
+end
+
+arg[0] = "mtxrun"
+
+table.insert(arg,1,"mtx-context")
+table.insert(arg,1,"--script")
+
+dofile(selfpath .. "/" .. "mtxrun.lua")
Modified: trunk/Master/bin/windows/luametatex.exe
===================================================================
(Binary files differ)
Modified: trunk/Master/bin/windows/mtxrun.lua
===================================================================
--- trunk/Master/bin/windows/mtxrun.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/bin/windows/mtxrun.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -5136,7 +5136,7 @@
package.loaded["l-dir"] = package.loaded["l-dir"] or true
--- original size: 18893, stripped down to: 11170
+-- original size: 19139, stripped down to: 11345
if not modules then modules={} end modules ['l-dir']={
version=1.001,
@@ -5154,7 +5154,7 @@
local dir=dir
local lfs=lfs
local attributes=lfs.attributes
-local walkdir=lfs.dir
+local scandir=lfs.dir
local isdir=lfs.isdir
local isfile=lfs.isfile
local currentdir=lfs.currentdir
@@ -5185,6 +5185,15 @@
lfs.isdir=isdir
lfs.isfile=isfile
end
+local isreadable=file.isreadable
+local walkdir=function(p,...)
+ if isreadable(p.."/.") then
+ return scandir(p,...)
+ else
+ return function() end
+ end
+end
+lfs.walkdir=walkdir
function dir.current()
return (gsub(currentdir(),"\\","/"))
end
@@ -8657,7 +8666,7 @@
package.loaded["util-sac"] = package.loaded["util-sac"] or true
--- original size: 14071, stripped down to: 10417
+-- original size: 14107, stripped down to: 10453
if not modules then modules={} end modules ['util-sac']={
version=1.001,
@@ -9136,13 +9145,13 @@
local extract=bit32.extract
local char=string.char
streams.tocardinal1=char
- function streams.tocardinal2(n) return char(extract(8,8),extract(0,8)) end
- function streams.tocardinal3(n) return char(extract(16,8),extract(8,8),extract(0,8)) end
- function streams.tocardinal4(n) return char(extract(24,8),extract(16,8),extract(8,8),extract(0,8)) end
+ function streams.tocardinal2(n) return char(extract(n,8,8),extract(n,0,8)) end
+ function streams.tocardinal3(n) return char(extract(n,16,8),extract(n,8,8),extract(n,0,8)) end
+ function streams.tocardinal4(n) return char(extract(n,24,8),extract(n,16,8),extract(n,8,8),extract(n,0,8)) end
streams.tocardinal1le=char
- function streams.tocardinal2le(n) return char(extract(0,8),extract(8,8)) end
- function streams.tocardinal3le(n) return char(extract(0,8),extract(8,8),extract(16,8)) end
- function streams.tocardinal4le(n) return char(extract(0,8),extract(8,8),extract(16,8),extract(24,8)) end
+ function streams.tocardinal2le(n) return char(extract(n,0,8),extract(n,8,8)) end
+ function streams.tocardinal3le(n) return char(extract(n,0,8),extract(n,8,8),extract(n,16,8)) end
+ function streams.tocardinal4le(n) return char(extract(n,0,8),extract(n,8,8),extract(n,16,8),extract(n,24,8)) end
end
if not streams.readcstring then
local readchar=streams.readchar
@@ -9338,7 +9347,7 @@
package.loaded["util-prs"] = package.loaded["util-prs"] or true
--- original size: 25542, stripped down to: 16783
+-- original size: 25716, stripped down to: 16805
if not modules then modules={} end modules ['util-prs']={
version=1.001,
@@ -9546,7 +9555,9 @@
if not pattern then
local symbols=S(symbol)
local separator=space^0*symbols*space^0
- local value=lbrace*C((nobrace+nestedbraces)^0)*rbrace+C((nestedbraces+(1-(space^0*(symbols+P(-1)))))^0)
+ local value=lbrace*C((nobrace+nestedbraces)^0)
+*(rbrace*(#symbols+P(-1)))
++C((nestedbraces+(1-(space^0*(symbols+P(-1)))))^0)
if withaction then
local withvalue=Carg(1)*value/function(f,s) return f(s) end
pattern=spaces*withvalue*(separator*withvalue)^0
@@ -9940,7 +9951,7 @@
package.loaded["util-fmt"] = package.loaded["util-fmt"] or true
--- original size: 2541, stripped down to: 1624
+-- original size: 3379, stripped down to: 2273
if not modules then modules={} end modules ['util-fmt']={
version=1.001,
@@ -9953,7 +9964,7 @@
utilities.formatters=utilities.formatters or {}
local formatters=utilities.formatters
local concat,format=table.concat,string.format
-local tostring,type=tostring,type
+local tostring,type,unpack=tostring,type,unpack
local strip=string.strip
local lpegmatch=lpeg.match
local stripper=lpeg.patterns.stripzeros
@@ -9960,12 +9971,14 @@
function formatters.stripzeros(str)
return lpegmatch(stripper,str)
end
-function formatters.formatcolumns(result,between)
+function formatters.formatcolumns(result,between,header)
if result and #result>0 then
- between=between or " "
- local widths,numbers={},{}
+ local widths={}
+ local numbers={}
+ local templates={}
local first=result[1]
local n=#first
+ between=between or " "
for i=1,n do
widths[i]=0
end
@@ -9987,31 +10000,61 @@
end
end
end
+ if header then
+ for i=1,#header do
+ local h=header[i]
+ for j=1,n do
+ local hj=tostring(h[j])
+ h[j]=hj
+ local w=#hj
+ if w>widths[j] then
+ widths[j]=w
+ end
+ end
+ end
+ end
for i=1,n do
local w=widths[i]
if numbers[i] then
if w>80 then
- widths[i]="%s"..between
- else
- widths[i]="%0"..w.."i"..between
+ templates[i]="%s"..between
+ else
+ templates[i]="% "..w.."i"..between
end
else
if w>80 then
- widths[i]="%s"..between
- elseif w>0 then
- widths[i]="%-"..w.."s"..between
+ templates[i]="%s"..between
+ elseif w>0 then
+ templates[i]="%-"..w.."s"..between
else
- widths[i]="%s"
+ templates[i]="%s"
end
end
end
- local template=strip(concat(widths))
+ local template=strip(concat(templates))
for i=1,#result do
local str=format(template,unpack(result[i]))
result[i]=strip(str)
end
+ if header then
+ for i=1,n do
+ local w=widths[i]
+ if w>80 then
+ templates[i]="%s"..between
+ elseif w>0 then
+ templates[i]="%-"..w.."s"..between
+ else
+ templates[i]="%s"
+ end
+ end
+ local template=strip(concat(templates))
+ for i=1,#header do
+ local str=format(template,unpack(header[i]))
+ header[i]=strip(str)
+ end
+ end
end
- return result
+ return result,header
end
@@ -14760,7 +14803,7 @@
package.loaded["util-sbx"] = package.loaded["util-sbx"] or true
--- original size: 21145, stripped down to: 13271
+-- original size: 21146, stripped down to: 13272
if not modules then modules={} end modules ['util-sbx']={
version=1.001,
@@ -15070,7 +15113,7 @@
if trace then
report("resultof: %s",command)
end
- local handle=iopopen(command,"r")
+ local handle=iopopen(command,"rb")
if handle then
local result=handle:read("*all") or ""
handle:close()
@@ -16395,7 +16438,7 @@
package.loaded["lxml-tab"] = package.loaded["lxml-tab"] or true
--- original size: 62810, stripped down to: 36225
+-- original size: 62221, stripped down to: 36225
if not modules then modules={} end modules ['lxml-tab']={
version=1.001,
@@ -17876,7 +17919,7 @@
package.loaded["lxml-lpt"] = package.loaded["lxml-lpt"] or true
--- original size: 54733, stripped down to: 31258
+-- original size: 54589, stripped down to: 31258
if not modules then modules={} end modules ['lxml-lpt']={
version=1.001,
@@ -19127,7 +19170,7 @@
package.loaded["lxml-mis"] = package.loaded["lxml-mis"] or true
--- original size: 3574, stripped down to: 1808
+-- original size: 3542, stripped down to: 1808
if not modules then modules={} end modules ['lxml-mis']={
version=1.001,
@@ -19196,7 +19239,7 @@
package.loaded["lxml-aux"] = package.loaded["lxml-aux"] or true
--- original size: 34661, stripped down to: 21511
+-- original size: 34522, stripped down to: 21511
if not modules then modules={} end modules ['lxml-aux']={
version=1.001,
@@ -21703,7 +21746,7 @@
package.loaded["data-tmp"] = package.loaded["data-tmp"] or true
--- original size: 16456, stripped down to: 11636
+-- original size: 16433, stripped down to: 11636
if not modules then modules={} end modules ['data-tmp']={
version=1.100,
@@ -22238,7 +22281,7 @@
package.loaded["data-res"] = package.loaded["data-res"] or true
--- original size: 69576, stripped down to: 44470
+-- original size: 70711, stripped down to: 44839
if not modules then modules={} end modules ['data-res']={
version=1.001,
@@ -22306,13 +22349,15 @@
if environment.default_texmfcnf then
resolvers.luacnfspec="home:texmf/web2c;"..environment.default_texmfcnf
else
- resolvers.luacnfspec=concat ({
- "home:texmf/web2c",
- "selfautoparent:/texmf-local/web2c",
- "selfautoparent:/texmf-context/web2c",
- "selfautoparent:/texmf-dist/web2c",
- "selfautoparent:/texmf/web2c",
- },";")
+ local texroot=environment.texroot
+ resolvers.luacnfspec="home:texmf/web2c;selfautoparent:/texmf-local/web2c;selfautoparent:/texmf-context/web2c;selfautoparent:/texmf/web2c"
+ if texroot and isdir(texroot.."/texmf-context") then
+ elseif texroot and isdir(texroot.."/texmf-dist") then
+ resolvers.luacnfspec="home:texmf/web2c;selfautoparent:/texmf-local/web2c;selfautoparent:/texmf-dist/web2c;selfautoparent:/texmf/web2c"
+ elseif ostype~="windows" and isdir("/etc/texmf/web2c") then
+ resolvers.luacnfspec="home:texmf/web2c;/etc/texmf/web2c;selfautodir:/share/texmf/web2c"
+ else
+ end
end
local unset_variable="unset"
local formats=resolvers.formats
@@ -24247,7 +24292,7 @@
package.loaded["data-con"] = package.loaded["data-con"] or true
--- original size: 5487, stripped down to: 3757
+-- original size: 5477, stripped down to: 3757
if not modules then modules={} end modules ['data-con']={
version=1.100,
@@ -24465,7 +24510,7 @@
package.loaded["data-zip"] = package.loaded["data-zip"] or true
--- original size: 10805, stripped down to: 7951
+-- original size: 10789, stripped down to: 7951
if not modules then modules={} end modules ['data-zip']={
version=1.001,
@@ -25806,7 +25851,7 @@
package.loaded["luat-fmt"] = package.loaded["luat-fmt"] or true
--- original size: 11691, stripped down to: 8350
+-- original size: 12056, stripped down to: 8398
if not modules then modules={} end modules ['luat-fmt']={
version=1.001,
@@ -26093,8 +26138,8 @@
-- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua libs-ini.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1035743
--- stripped bytes : 408144
+-- original bytes : 1037585
+-- stripped bytes : 408686
-- end library merge
Modified: trunk/Master/bin/x86_64-darwinlegacy/luametatex
===================================================================
(Binary files differ)
Modified: trunk/Master/bin/x86_64-linuxmusl/luametatex
===================================================================
(Binary files differ)
Modified: trunk/Master/bin/x86_64-solaris/luametatex
===================================================================
(Binary files differ)
Added: trunk/Master/source/luametatex-2.10.08.tar.xz
===================================================================
(Binary files differ)
Index: trunk/Master/source/luametatex-2.10.08.tar.xz
===================================================================
--- trunk/Master/source/luametatex-2.10.08.tar.xz 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/source/luametatex-2.10.08.tar.xz 2023-05-06 22:03:57 UTC (rev 67034)
Property changes on: trunk/Master/source/luametatex-2.10.08.tar.xz
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Deleted: trunk/Master/source/luametatex-230310.tar.xz
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-context.lua
===================================================================
--- trunk/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-context.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-context.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1,4 +1,4 @@
return {
- ["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "pluseleven", "plustwelve", "plussixteen", "plusfifty", "plushundred", "plusonehundred", "plustwohundred", "plusfivehundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "maxiterator", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "centeringskip", "stretchingskip", "shrinkingskip", "centeringfillskip", "stretchingfillskip", "shrinkingfillskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "binaryshiftedten", "binaryshiftedtwenty", "binaryshiftedthirty", "thickermuskip", "directionlefttoright", "directionrighttoleft", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "prerollrun", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "contextformat", "contextversion", "contextlmtxmode", "contextmark", "mksuffix", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "statuswrite", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "rlncatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "!
invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "commaasciicode", "spaceasciicode", "periodasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "semicolonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "leftparentasciicode", "rightparentasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "percentasciicode", "leftbracketasciicode", "rightbracketasciicode", "hsizefrozenparcode", "skipfrozenparcode", "hangfrozenparcode", "indentfrozenparcode", "parfillfrozenparcode", "adjustfrozenparcode", "protrudefrozenparcode", "tolerancefrozenparcode", "stretchfrozenparcode", "loosenessfrozenparcode", "lastlinefrozenparcode", "linepenaltyfrozenparcode", "clubpenaltyfrozenparcode", "widowpenaltyfrozenparcode", "displaypenaltyfrozenparcode", "brokenpenaltyfrozenparcode", "demeritsfrozenparcode", "shapefrozenparcode", "linefrozenparcode", "hyphenationfrozenparcode", "shapingpenaltyfrozenparcode", "orphanpenaltyfrozenparcode", "allfrozenparcode", "mathpenaltyfrozenparcode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vadjustgroupcode", "vcentergroupcode", "mathabovegroupcode", "mathchoicegroupcode", "alsosimplegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "localboxgroupcode", "splitoffgroupcode", "sp!
litkeepgroupcode", "preamblegroupcode", "alignsetgroupcode", "finrowgroupcode", "discretionarygroupcode", "markautomigrationcode", "insertautomigrationcode", "adjustautomigrationcode", "preautomigrationcode", "postautomigrationcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "overrulemathcontrolcode", "underrulemathcontrolcode", "radicalrulemathcontrolcode", "fractionrulemathcontrolcode", "accentskewhalfmathcontrolcode", "accentskewapplymathcontrolcode", "applyordinarykernpairmathcontrolcode", "applyverticalitalickernmathcontrolcode", "applyordinaryitalickernmathcontrolcode", "applycharitalickernmathcontrolcode", "reboxcharitalickernmathcontrolcode", "applyboxeditalickernmathcontrolcode", "staircasekernmathcontrolcode", "applytextitalickernmathcontrolcode", "applyscriptitalickernmathcontrolcode", "checkspaceitalickernmathcontrolcode", "checktextitalickernmathcontrolcode", "analyzescriptnucleuscharmathcontrolcode", "analyzescriptnucleuslistmathcontrolcode", "analyzescriptnucleusboxmathcontrolcode", "accenttopskewwithoffsetmathcontrolcode", "ignorekerndimensionsmathcontrolcode", "ignoreflataccentsmathcontrolcode", "extendaccentsmathcontrolcode", "extenddelimitersmathcontrolcode", "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", "noleftkerningglyphoptioncode", "noleftligaturingglyphoptioncode", "norightkerningglyphoptioncode", "norightligaturingglyphoptioncode", "noitaliccorrectionglyphoptioncode", "islargeoperatorglyphoptioncode", "hasitalicshapeglyphoptioncode", "normalparcontextcode", "vmodeparcontextcode", "vboxparcontextcode", "vtopparcontextcode", "vcenterparcontextcode", "vadjustparcontextcode", "insertparcontextcode", "outputparcontextcode", "alignparcontextcode", "noalignparcontextcode", "spanparcont!
extcode", "resetparcontextcode", "leftoriginlistanchorcode", "leftheightlistanchorcode", "leftdepthlistanchorcode", "rightoriginlistanchorcode", "rightheightlistanchorcode", "rightdepthlistanchorcode", "centeroriginlistanchorcode", "centerheightlistanchorcode", "centerdepthlistanchorcode", "halfwaytotallistanchorcode", "halfwayheightlistanchorcode", "halfwaydepthlistanchorcode", "halfwayleftlistanchorcode", "halfwayrightlistanchorcode", "negatexlistsigncode", "negateylistsigncode", "negatelistsigncode", "fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink", "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", "mathexheight", "mathemwidth", "interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace", "mathaxisheight", "muquad", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifelsemode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "unexpandeddocumentvariable", "setupdocument", "presetdocument", "doifelsedocumentvariable", "doifdocumentvariableelse", "doifdocumentvariable", "doifnotdocumentvariable", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "everystoptext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "definemode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", "mathordinarycode", "matho!
rdcode", "mathoperatorcode", "mathopcode", "mathbinarycode", "mathbincode", "mathrelationcode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctuationcode", "mathpunctcode", "mathovercode", "mathundercode", "mathinnercode", "mathradicalcode", "mathfractioncode", "mathmiddlecode", "mathaccentcode", "mathfencedcode", "mathghostcode", "mathvariablecode", "mathactivecode", "mathvcentercode", "mathconstructcode", "mathwrappedcode", "mathbegincode", "mathendcode", "mathexplicitcode", "mathdivisioncode", "mathfactorialcode", "mathdimensioncode", "mathexperimentalcode", "mathtextpunctuationcode", "mathimaginarycode", "mathdifferentialcode", "mathexponentialcode", "mathellipsiscode", "mathfunctioncode", "mathdigitcode", "mathalphacode", "mathboxcode", "mathchoicecode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathunsetcode", "mathunspacedcode", "mathallcode", "mathfakecode", "mathunarycode", "mathmaybeordinarycode", "mathmayberelationcode", "mathmaybebinarycode", "mathnumbergroupcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "lrm", "rlm", "bidilre", "bidirle", "bidipop", "bidilro", "bidirlo", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "enquad", "emquad", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar", "softhyphen", "autoinsertedspace", "Ux", "eUx", "parfillleftskip", "parfillrightskip", "startlmtxmode", "stoplmtxmode", "startmkivmode", "stopmkivmode", "wildcardsymbol", "normalhyphenationcode", "automatichyphenationcode", "explicithyphenationcode", "syllablehyphenationcode", "uppercasehyphenationcode", "collapsehyphenationcode", "compoundhyphenationcode", "s!
trictstarthyphenationcode", "strictendhyphenationcode", "automaticpenaltyhyphenationcode", "explicitpenaltyhyphenationcode", "permitgluehyphenationcode", "permitallhyphenationcode", "permitmathreplacehyphenationcode", "forcecheckhyphenationcode", "lazyligatureshyphenationcode", "forcehandlerhyphenationcode", "feedbackcompoundhyphenationcode", "ignoreboundshyphenationcode", "partialhyphenationcode", "completehyphenationcode", "normalizelinenormalizecode", "parindentskipnormalizecode", "swaphangindentnormalizecode", "swapparsshapenormalizecode", "breakafterdirnormalizecode", "removemarginkernsnormalizecode", "clipwidthnormalizecode", "flattendiscretionariesnormalizecode", "discardzerotabskipsnormalizecode", "flattenhleadersnormalizecode", "normalizeparnormalizeparcode", "flattenvleadersnormalizeparcode", "nopreslackclassoptioncode", "nopostslackclassoptioncode", "lefttopkernclassoptioncode", "righttopkernclassoptioncode", "leftbottomkernclassoptioncode", "rightbottomkernclassoptioncode", "lookaheadforendclassoptioncode", "noitaliccorrectionclassoptioncode", "defaultmathclassoptions", "checkligatureclassoptioncode", "checkitaliccorrectionclassoptioncode", "checkkernpairclassoptioncode", "flattenclassoptioncode", "omitpenaltyclassoptioncode", "unpackclassoptioncode", "raiseprimeclassoptioncode", "carryoverlefttopkernclassoptioncode", "carryoverleftbottomkernclassoptioncode", "carryoverrighttopkernclassoptioncode", "carryoverrightbottomkernclassoptioncode", "preferdelimiterdimensionsclassoptioncode", "autoinjectclassoptioncode", "removeitaliccorrectionclassoptioncode", "operatoritaliccorrectionclassoptioncode", "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noleftligatureglyphoptioncode", "noleftkernglyphoptioncode", "norightligatureglyphoptioncode", "norightkernglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", "noitaliccorrectionglyphoptioncode", "nokerningcode", "noligaturingcode", "frozenflagcode", "tolerantflagcode", "protectedflagcode", "primitiveflagcode", "permanentfla!
gcode", "noalignedflagcode", "immutableflagcode", "mutableflagcode", "globalflagcode", "overloadedflagcode", "immediateflagcode", "conditionalflagcode", "valueflagcode", "instanceflagcode", "ordmathflattencode", "binmathflattencode", "relmathflattencode", "punctmathflattencode", "innermathflattencode", "normalworddiscoptioncode", "preworddiscoptioncode", "postworddiscoptioncode", "continueifinputfile", "continuewhenlmtxmode", "continuewhenmkivmode" },
- ["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "texdefinition", "doifelsesetups", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "fastsetup", "copysetups", "resetsetups", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "globalsetmode", "globalresetmode", "globalsetsystemmode", "globalresetsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "newinteger", "newdimension", "newgluespec", "newmugluespec", "aliasinteger", "aliasdimension", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "nofarguments", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "vkern", "hkern", "vpenalty", "hpenalty", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "untraceddonothing", "dontcomplain", "moreboxtracing", "lessboxtracing", "noboxtracing", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "stoppickupmath", "reqno", "forceinline!
math", "mathortext", "thebox", "htdp", "unvoidbox", "hfilll", "vfilll", "mathbox", "mathlimop", "mathnolop", "mathnothing", "mathalpha", "currentcatcodetable", "defaultcatcodetable", "catcodetablename", "newcatcodetable", "startcatcodetable", "stopcatcodetable", "startextendcatcodetable", "stopextendcatcodetable", "pushcatcodetable", "popcatcodetable", "restorecatcodes", "setcatcodetable", "letcatcodecommand", "defcatcodecommand", "uedcatcodecommand", "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", "hsplit", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruleddbox", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "ruleddpack", "ruledvsplit", "ruledtsplit", "ruleddsplit", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchstring", "scratchstringone", "scratchstringtwo", "tempstring", "scratchcounter", "globalscratchcounter", "privatescratchcounter", "scratchdimen", "globalscratchdimen", "privatescratchdimen", "scratchskip", "globalscratchskip", "privatescratchskip", "scratchmuskip", "globalscratchmuskip", "privatescratchmuskip", "scratchtoks", "globalscratchtoks", "privatescratchtoks", "scratchbox", "globalscratchbox", "privatescratchbox", "scratchmacro", "scratchmacroone", "scratchmacrotwo", "scratchconditiontrue", "scratchconditionfalse", "ifscratchcondition", "scratchconditiononetrue", "scratchconditiononefalse", "ifscratchconditionone", "scratchconditiontwotrue", "scratchconditiontwofalse", "ifscratchconditiontwo", "globalscratchcounterone", "globalscratchcountertwo", "globalscratchcounterthree", "groupedcommand", "groupedcommand!
cs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "simplegroupedcommandcs", "pickupgroupedcommand", "pickupgroupedcommandcs", "mathgroupedcommandcs", "usedbaselineskip", "usedlineskip", "usedlineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "boxisempty", "boxtostring", "contentostring", "prerolltostring", "givenwidth", "givenheight", "givendepth", "scangivendimensions", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchtotal", "scratchitalic", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchcounterfour", "scratchcounterfive", "scratchcountersix", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchdimenfour", "scratchdimenfive", "scratchdimensix", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchskipfour", "scratchskipfive", "scratchskipsix", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchmuskipfour", "scratchmuskipfive", "scratchmuskipsix", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchtoksfour", "scratchtoksfive", "scratchtokssix", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchboxfour", "scratchboxfive", "scratchboxsix", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchmin", "scratchmax", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "firstinset", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "doifelsenextcharcs", "doifnextcharcselse", "doifelsenextoptional", "doifnextoption!
alelse", "doifelsenextoptionalcs", "doifnextoptionalcselse", "doifelsefastoptionalcheck", "doiffastoptionalcheckelse", "doifelsefastoptionalcheckcs", "doiffastoptionalcheckcselse", "doifelsenextbgroup", "doifnextbgroupelse", "doifelsenextbgroupcs", "doifnextbgroupcselse", "doifelsenextparenthesis", "doifnextparenthesiselse", "doifelseundefined", "doifundefinedelse", "doifelsedefined", "doifdefinedelse", "doifundefined", "doifdefined", "doifelsevalue", "doifvalue", "doifnotvalue", "doifnothing", "doifsomething", "doifelsenothing", "doifnothingelse", "doifelsesomething", "doifsomethingelse", "doifvaluenothing", "doifvaluesomething", "doifelsevaluenothing", "doifvaluenothingelse", "doifelsedimension", "doifdimensionelse", "doifelsenumber", "doifnumberelse", "doifnumber", "doifnotnumber", "doifelsecommon", "doifcommonelse", "doifcommon", "doifnotcommon", "doifinstring", "doifnotinstring", "doifelseinstring", "doifinstringelse", "doifelseassignment", "doifassignmentelse", "docheckassignment", "doifelseassignmentcs", "doifassignmentelsecs", "validassignment", "novalidassignment", "doiftext", "doifelsetext", "doiftextelse", "doifnottext", "quitcondition", "truecondition", "falsecondition", "tracingall", "tracingnone", "loggingall", "tracingcatcodes", "showluatokens", "aliasmacro", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeytabs", "obeypages", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "naturalspace", "controlspace", "normalspaces", "ignoretabs", "ignorelines", "ignorepages", "ignoreeofs", "setcontrolspaces", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "onlynonbreakablespace", "wait", "writestatus", "define", "def!
ineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "directmeasure", "setquantity", "setequantity", "setgquantity", "setxquantity", "definequantity", "freezequantity", "quantity", "quantitied", "directquantity", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", "resetdummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleni!
nearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "doloopovermatch", "doloopovermatched", "doloopoverlist", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "setconditional", "newmacro", "setnewmacro", "newfraction", "newsignal", "newboundary", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "onlypdfobjectcompression", "nopdfobjectcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "mathclassvalue", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "aligncontentleft", "aligncontentmiddle", "aligncontentright", "shiftbox", "vpackbox", "hpackbox", "vpackedbox", "hpackedbox", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "no!
rmalprimescript", "superscript", "subscript", "nosuperscript", "nosubscript", "primescript", "superprescript", "subprescript", "nosuperprescript", "nosubsprecript", "uncramped", "cramped", "mathstyletrigger", "triggermathstyle", "triggeredmathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", "pushmathstyle", "popmathstyle", "triggerdisplaystyle", "triggertextstyle", "triggerscriptstyle", "triggerscriptscriptstyle", "triggeruncrampedstyle", "triggercrampedstyle", "triggersmallstyle", "triggeruncrampedsmallstyle", "triggercrampedsmallstyle", "triggerbigstyle", "triggeruncrampedbigstyle", "triggercrampedbigstyle", "luaexpr", "expelsedoif", "expdoif", "expdoifnot", "expdoifelsecommon", "expdoifcommonelse", "expdoifelseinset", "expdoifinsetelse", "ctxdirectlua", "ctxlatelua", "ctxsprint", "ctxwrite", "ctxcommand", "ctxdirectcommand", "ctxlatecommand", "ctxreport", "ctxlua", "luacode", "lateluacode", "directluacode", "registerctxluafile", "ctxloadluafile", "luaversion", "luamajorversion", "luaminorversion", "ctxluacode", "luaconditional", "luaexpanded", "ctxluamatch", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installprotectedctxfunction", "installprotectedctxscanner", "installctxscanner", "resetctxscanner", "cldprocessfile", "cldloadfile", "cldloadviafile", "cldcontext", "cldcommand", "carryoverpar", "freezeparagraphproperties", "defrostparagraphproperties", "setparagraphfreezing", "forgetparagraphfreezing", "updateparagraphproperties", "updateparagraphpenalties", "updateparagraphdemerits", "updateparagraphshapes", "updateparagraphl!
ines", "lastlinewidth", "assumelongusagecs", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "rtltext", "ltrtext", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "dohyphencollapsing", "nohyphencollapsing", "compounddiscretionary", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "naturaltpack", "reversehbox", "reversevbox", "reversevtop", "reversehpack", "reversevpack", "reversetpack", "hcontainer", "vcontainer", "tcontainer", "frule", "compoundhyphenpenalty", "start", "stop", "unsupportedcs", "openout", "closeout", "write", "openin", "closein", "read", "readline", "readfromterminal", "boxlines", "boxline", "setboxline", "copyboxline", "boxlinewd", "boxlineht", "boxlinedp", "boxlinenw", "boxlinenh", "boxlinend", "boxlinels", "boxliners", "boxlinelh", "boxlinerh", "boxlinelp", "boxlinerp", "boxlinein", "boxrangewd", "boxrangeht", "boxrangedp", "bitwiseset", "bitwiseand", "bitwiseor", "bitwisexor", "bitwisenot", "bitwisenil", "ifbitwiseand", "bitwise", "bitwiseshift", "bitwiseflip", "textdir", "linedir", "pardir", "boxdir", "prelistbox", "postlistbox", "prelistcopy", "postlistcopy", "setprelistbox", "setpostlistbox", "noligaturing", "nokerning", "noexpansion", "noprotrusion", "noleftkerning", "noleftligaturing", "norightkerning", "norightligaturing", "noitaliccorrection", "futureletnexttoken", "defbackslashbreak", "letbackslashbreak", "pushoverloadmode", "popoverloadmode", "pushrunstate", "poprunstate", "sugges!
tedalias", "showboxhere", "discoptioncodestring", "flagcodestring", "frozenparcodestring", "glyphoptioncodestring", "groupcodestring", "hyphenationcodestring", "mathcontrolcodestring", "mathflattencodestring", "normalizecodestring", "parcontextcodestring", "newlocalcount", "newlocaldimen", "newlocalskip", "newlocalmuskip", "newlocaltoks", "newlocalbox", "newlocalwrite", "newlocalread", "setnewlocalcount", "setnewlocaldimen", "setnewlocalskip", "setnewlocalmuskip", "setnewlocaltoks", "setnewlocalbox", "ifexpression" },
+ ["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "pluseleven", "plustwelve", "plussixteen", "plusfifty", "plushundred", "plusonehundred", "plustwohundred", "plusfivehundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "maxiterator", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "centeringskip", "stretchingskip", "shrinkingskip", "centeringfillskip", "stretchingfillskip", "shrinkingfillskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "binaryshiftedten", "binaryshiftedtwenty", "binaryshiftedthirty", "thickermuskip", "directionlefttoright", "directionrighttoleft", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "prerollrun", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "contextformat", "contextversion", "contextlmtxmode", "contextmark", "mksuffix", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "statuswrite", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "rlncatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "!
invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "commaasciicode", "spaceasciicode", "periodasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "semicolonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "leftparentasciicode", "rightparentasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "percentasciicode", "leftbracketasciicode", "rightbracketasciicode", "hsizefrozenparcode", "skipfrozenparcode", "hangfrozenparcode", "indentfrozenparcode", "parfillfrozenparcode", "adjustfrozenparcode", "protrudefrozenparcode", "tolerancefrozenparcode", "stretchfrozenparcode", "loosenessfrozenparcode", "lastlinefrozenparcode", "linepenaltyfrozenparcode", "clubpenaltyfrozenparcode", "widowpenaltyfrozenparcode", "displaypenaltyfrozenparcode", "brokenpenaltyfrozenparcode", "demeritsfrozenparcode", "shapefrozenparcode", "linefrozenparcode", "hyphenationfrozenparcode", "shapingpenaltyfrozenparcode", "orphanpenaltyfrozenparcode", "allfrozenparcode", "mathpenaltyfrozenparcode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vadjustgroupcode", "vcentergroupcode", "mathabovegroupcode", "mathchoicegroupcode", "alsosimplegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "localboxgroupcode", "splitoffgroupcode", "sp!
litkeepgroupcode", "preamblegroupcode", "alignsetgroupcode", "finrowgroupcode", "discretionarygroupcode", "markautomigrationcode", "insertautomigrationcode", "adjustautomigrationcode", "preautomigrationcode", "postautomigrationcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "overrulemathcontrolcode", "underrulemathcontrolcode", "radicalrulemathcontrolcode", "fractionrulemathcontrolcode", "accentskewhalfmathcontrolcode", "accentskewapplymathcontrolcode", "applyordinarykernpairmathcontrolcode", "applyverticalitalickernmathcontrolcode", "applyordinaryitalickernmathcontrolcode", "applycharitalickernmathcontrolcode", "reboxcharitalickernmathcontrolcode", "applyboxeditalickernmathcontrolcode", "staircasekernmathcontrolcode", "applytextitalickernmathcontrolcode", "applyscriptitalickernmathcontrolcode", "checkspaceitalickernmathcontrolcode", "checktextitalickernmathcontrolcode", "analyzescriptnucleuscharmathcontrolcode", "analyzescriptnucleuslistmathcontrolcode", "analyzescriptnucleusboxmathcontrolcode", "accenttopskewwithoffsetmathcontrolcode", "ignorekerndimensionsmathcontrolcode", "ignoreflataccentsmathcontrolcode", "extendaccentsmathcontrolcode", "extenddelimitersmathcontrolcode", "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", "noleftkerningglyphoptioncode", "noleftligaturingglyphoptioncode", "norightkerningglyphoptioncode", "norightligaturingglyphoptioncode", "noitaliccorrectionglyphoptioncode", "islargeoperatorglyphoptioncode", "hasitalicshapeglyphoptioncode", "normalparcontextcode", "vmodeparcontextcode", "vboxparcontextcode", "vtopparcontextcode", "vcenterparcontextcode", "vadjustparcontextcode", "insertparcontextcode", "outputparcontextcode", "alignparcontextcode", "noalignparcontextcode", "spanparcont!
extcode", "resetparcontextcode", "leftoriginlistanchorcode", "leftheightlistanchorcode", "leftdepthlistanchorcode", "rightoriginlistanchorcode", "rightheightlistanchorcode", "rightdepthlistanchorcode", "centeroriginlistanchorcode", "centerheightlistanchorcode", "centerdepthlistanchorcode", "halfwaytotallistanchorcode", "halfwayheightlistanchorcode", "halfwaydepthlistanchorcode", "halfwayleftlistanchorcode", "halfwayrightlistanchorcode", "negatexlistsigncode", "negateylistsigncode", "negatelistsigncode", "fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink", "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", "mathexheight", "mathemwidth", "interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace", "mathaxisheight", "muquad", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifelsemode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startlocalcomponent", "stoplocalcomponent", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "unexpandeddocumentvariable", "setupdocument", "presetdocument", "doifelsedocumentvariable", "doifdocumentvariableelse", "doifdocumentvariable", "doifnotdocumentvariable", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "everystoptext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "definemode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree",!
"mathsizesuffix", "mathordinarycode", "mathordcode", "mathoperatorcode", "mathopcode", "mathbinarycode", "mathbincode", "mathrelationcode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctuationcode", "mathpunctcode", "mathovercode", "mathundercode", "mathinnercode", "mathradicalcode", "mathfractioncode", "mathmiddlecode", "mathaccentcode", "mathfencedcode", "mathghostcode", "mathvariablecode", "mathactivecode", "mathvcentercode", "mathconstructcode", "mathwrappedcode", "mathbegincode", "mathendcode", "mathexplicitcode", "mathdivisioncode", "mathfactorialcode", "mathdimensioncode", "mathexperimentalcode", "mathtextpunctuationcode", "mathimaginarycode", "mathdifferentialcode", "mathexponentialcode", "mathellipsiscode", "mathfunctioncode", "mathdigitcode", "mathalphacode", "mathboxcode", "mathchoicecode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathunsetcode", "mathunspacedcode", "mathallcode", "mathfakecode", "mathunarycode", "mathmaybeordinarycode", "mathmayberelationcode", "mathmaybebinarycode", "mathnumbergroupcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "lrm", "rlm", "bidilre", "bidirle", "bidipop", "bidilro", "bidirlo", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "enquad", "emquad", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar", "softhyphen", "autoinsertedspace", "Ux", "eUx", "parfillleftskip", "parfillrightskip", "startlmtxmode", "stoplmtxmode", "startmkivmode", "stopmkivmode", "wildcardsymbol", "normalhyphenationcode", "automatichyphenationcode", "explicithyphenationcode", "syllablehyphenationcode", "uppercasehyphenationcode", "collapsehy!
phenationcode", "compoundhyphenationcode", "strictstarthyphenationcode", "strictendhyphenationcode", "automaticpenaltyhyphenationcode", "explicitpenaltyhyphenationcode", "permitgluehyphenationcode", "permitallhyphenationcode", "permitmathreplacehyphenationcode", "forcecheckhyphenationcode", "lazyligatureshyphenationcode", "forcehandlerhyphenationcode", "feedbackcompoundhyphenationcode", "ignoreboundshyphenationcode", "partialhyphenationcode", "completehyphenationcode", "normalizelinenormalizecode", "parindentskipnormalizecode", "swaphangindentnormalizecode", "swapparsshapenormalizecode", "breakafterdirnormalizecode", "removemarginkernsnormalizecode", "clipwidthnormalizecode", "flattendiscretionariesnormalizecode", "discardzerotabskipsnormalizecode", "flattenhleadersnormalizecode", "normalizeparnormalizeparcode", "flattenvleadersnormalizeparcode", "nopreslackclassoptioncode", "nopostslackclassoptioncode", "lefttopkernclassoptioncode", "righttopkernclassoptioncode", "leftbottomkernclassoptioncode", "rightbottomkernclassoptioncode", "lookaheadforendclassoptioncode", "noitaliccorrectionclassoptioncode", "defaultmathclassoptions", "checkligatureclassoptioncode", "checkitaliccorrectionclassoptioncode", "checkkernpairclassoptioncode", "flattenclassoptioncode", "omitpenaltyclassoptioncode", "unpackclassoptioncode", "raiseprimeclassoptioncode", "carryoverlefttopkernclassoptioncode", "carryoverleftbottomkernclassoptioncode", "carryoverrighttopkernclassoptioncode", "carryoverrightbottomkernclassoptioncode", "preferdelimiterdimensionsclassoptioncode", "autoinjectclassoptioncode", "removeitaliccorrectionclassoptioncode", "operatoritaliccorrectionclassoptioncode", "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noleftligatureglyphoptioncode", "noleftkernglyphoptioncode", "norightligatureglyphoptioncode", "norightkernglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", "noitaliccorrectionglyphoptioncode", "nokerningcode", "noligaturingcode", "frozenflagcode", "tolerantflagcode", "protected!
flagcode", "primitiveflagcode", "permanentflagcode", "noalignedflagcode", "immutableflagcode", "mutableflagcode", "globalflagcode", "overloadedflagcode", "immediateflagcode", "conditionalflagcode", "valueflagcode", "instanceflagcode", "ordmathflattencode", "binmathflattencode", "relmathflattencode", "punctmathflattencode", "innermathflattencode", "normalworddiscoptioncode", "preworddiscoptioncode", "postworddiscoptioncode", "continueifinputfile", "continuewhenlmtxmode", "continuewhenmkivmode" },
+ ["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "texdefinition", "doifelsesetups", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "fastsetup", "copysetups", "resetsetups", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "globalsetmode", "globalresetmode", "globalsetsystemmode", "globalresetsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newfloat", "newlanguage", "newfamily", "newfam", "newhelp", "newinteger", "newdimension", "newgluespec", "newmugluespec", "newposit", "aliasinteger", "aliasdimension", "aliasposit", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "nofarguments", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "vkern", "hkern", "vpenalty", "hpenalty", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "untraceddonothing", "dontcomplain", "moreboxtracing", "lessboxtracing", "noboxtracing", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "!
stoppickupmath", "reqno", "forceinlinemath", "mathortext", "thebox", "htdp", "unvoidbox", "hfilll", "vfilll", "mathbox", "mathlimop", "mathnolop", "mathnothing", "mathalpha", "currentcatcodetable", "defaultcatcodetable", "catcodetablename", "newcatcodetable", "startcatcodetable", "stopcatcodetable", "startextendcatcodetable", "stopextendcatcodetable", "pushcatcodetable", "popcatcodetable", "restorecatcodes", "setcatcodetable", "letcatcodecommand", "defcatcodecommand", "uedcatcodecommand", "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", "hsplit", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruleddbox", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "ruleddpack", "ruledvsplit", "ruledtsplit", "ruleddsplit", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchstring", "scratchstringone", "scratchstringtwo", "tempstring", "scratchcounter", "globalscratchcounter", "privatescratchcounter", "scratchdimen", "globalscratchdimen", "privatescratchdimen", "scratchskip", "globalscratchskip", "privatescratchskip", "scratchmuskip", "globalscratchmuskip", "privatescratchmuskip", "scratchtoks", "globalscratchtoks", "privatescratchtoks", "scratchbox", "globalscratchbox", "privatescratchbox", "scratchmacro", "scratchmacroone", "scratchmacrotwo", "scratchconditiontrue", "scratchconditionfalse", "ifscratchcondition", "scratchconditiononetrue", "scratchconditiononefalse", "ifscratchconditionone", "scratchconditiontwotrue", "scratchconditiontwofalse", "ifscratchconditiontwo", "globalscratchcounterone", "globalscratchcountertwo", "globalscratchcounterthr!
ee", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "simplegroupedcommandcs", "pickupgroupedcommand", "pickupgroupedcommandcs", "mathgroupedcommandcs", "usedbaselineskip", "usedlineskip", "usedlineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "boxisempty", "boxtostring", "contentostring", "prerolltostring", "givenwidth", "givenheight", "givendepth", "scangivendimensions", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchtotal", "scratchitalic", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchcounterfour", "scratchcounterfive", "scratchcountersix", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchdimenfour", "scratchdimenfive", "scratchdimensix", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchskipfour", "scratchskipfive", "scratchskipsix", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchmuskipfour", "scratchmuskipfive", "scratchmuskipsix", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchtoksfour", "scratchtoksfive", "scratchtokssix", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchboxfour", "scratchboxfive", "scratchboxsix", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchmin", "scratchmax", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "firstinset", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "doifelsenextcharcs", "doifnextcharcselse", "!
doifelsenextoptional", "doifnextoptionalelse", "doifelsenextoptionalcs", "doifnextoptionalcselse", "doifelsefastoptionalcheck", "doiffastoptionalcheckelse", "doifelsefastoptionalcheckcs", "doiffastoptionalcheckcselse", "doifelsenextbgroup", "doifnextbgroupelse", "doifelsenextbgroupcs", "doifnextbgroupcselse", "doifelsenextparenthesis", "doifnextparenthesiselse", "doifelseundefined", "doifundefinedelse", "doifelsedefined", "doifdefinedelse", "doifundefined", "doifdefined", "doifelsevalue", "doifvalue", "doifnotvalue", "doifnothing", "doifsomething", "doifelsenothing", "doifnothingelse", "doifelsesomething", "doifsomethingelse", "doifvaluenothing", "doifvaluesomething", "doifelsevaluenothing", "doifvaluenothingelse", "doifelsedimension", "doifdimensionelse", "doifelsenumber", "doifnumberelse", "doifnumber", "doifnotnumber", "doifelsecommon", "doifcommonelse", "doifcommon", "doifnotcommon", "doifinstring", "doifnotinstring", "doifelseinstring", "doifinstringelse", "doifelseassignment", "doifassignmentelse", "docheckassignment", "doifelseassignmentcs", "doifassignmentelsecs", "validassignment", "novalidassignment", "doiftext", "doifelsetext", "doiftextelse", "doifnottext", "quitcondition", "truecondition", "falsecondition", "tracingall", "tracingnone", "loggingall", "tracingcatcodes", "showluatokens", "aliasmacro", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeytabs", "obeypages", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "naturalspace", "controlspace", "normalspaces", "ignoretabs", "ignorelines", "ignorepages", "ignoreeofs", "setcontrolspaces", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "onlynonbreakablespace",!
"wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "directmeasure", "setquantity", "setequantity", "setgquantity", "setxquantity", "definequantity", "freezequantity", "quantity", "quantitied", "directquantity", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", "resetdummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenargumen!
ts", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "doloopovermatch", "doloopovermatched", "doloopoverlist", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "setconditional", "newmacro", "setnewmacro", "newfraction", "newsignal", "newboundary", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "onlypdfobjectcompression", "nopdfobjectcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "mathclassvalue", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "aligncontentleft", "aligncontentmiddle", "aligncontentright", "shiftbox", "vpackbox", "hpackbox", "vpackedbox", "hpackedbox", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalno!
superscript", "normalnosubscript", "normalprimescript", "superscript", "subscript", "nosuperscript", "nosubscript", "primescript", "superprescript", "subprescript", "nosuperprescript", "nosubsprecript", "uncramped", "cramped", "mathstyletrigger", "triggermathstyle", "triggeredmathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", "pushmathstyle", "popmathstyle", "triggerdisplaystyle", "triggertextstyle", "triggerscriptstyle", "triggerscriptscriptstyle", "triggeruncrampedstyle", "triggercrampedstyle", "triggersmallstyle", "triggeruncrampedsmallstyle", "triggercrampedsmallstyle", "triggerbigstyle", "triggeruncrampedbigstyle", "triggercrampedbigstyle", "luaexpr", "expelsedoif", "expdoif", "expdoifnot", "expdoifelsecommon", "expdoifcommonelse", "expdoifelseinset", "expdoifinsetelse", "ctxdirectlua", "ctxlatelua", "ctxsprint", "ctxwrite", "ctxcommand", "ctxdirectcommand", "ctxlatecommand", "ctxreport", "ctxlua", "luacode", "lateluacode", "directluacode", "registerctxluafile", "ctxloadluafile", "luaversion", "luamajorversion", "luaminorversion", "ctxluacode", "luaconditional", "luaexpanded", "ctxluamatch", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installprotectedctxfunction", "installprotectedctxscanner", "installctxscanner", "resetctxscanner", "cldprocessfile", "cldloadfile", "cldloadviafile", "cldcontext", "cldcommand", "carryoverpar", "freezeparagraphproperties", "defrostparagraphproperties", "setparagraphfreezing", "forgetparagraphfreezing", "updateparagraphproperties", "updateparagraphpenalties", "updateparagraphdemerits", "upd!
ateparagraphshapes", "updateparagraphlines", "lastlinewidth", "assumelongusagecs", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "rtltext", "ltrtext", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "dohyphencollapsing", "nohyphencollapsing", "compounddiscretionary", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "naturaltpack", "reversehbox", "reversevbox", "reversevtop", "reversehpack", "reversevpack", "reversetpack", "hcontainer", "vcontainer", "tcontainer", "frule", "compoundhyphenpenalty", "start", "stop", "unsupportedcs", "openout", "closeout", "write", "openin", "closein", "read", "readline", "readfromterminal", "boxlines", "boxline", "setboxline", "copyboxline", "boxlinewd", "boxlineht", "boxlinedp", "boxlinenw", "boxlinenh", "boxlinend", "boxlinels", "boxliners", "boxlinelh", "boxlinerh", "boxlinelp", "boxlinerp", "boxlinein", "boxrangewd", "boxrangeht", "boxrangedp", "bitwiseset", "bitwiseand", "bitwiseor", "bitwisexor", "bitwisenot", "bitwisenil", "ifbitwiseand", "bitwise", "bitwiseshift", "bitwiseflip", "textdir", "linedir", "pardir", "boxdir", "prelistbox", "postlistbox", "prelistcopy", "postlistcopy", "setprelistbox", "setpostlistbox", "noligaturing", "nokerning", "noexpansion", "noprotrusion", "noleftkerning", "noleftligaturing", "norightkerning", "norightligaturing", "noitaliccorrection", "futureletnexttoken", "defbackslashbreak", "letbackslashbreak", "pushoverloadmode", "popoverloadmode", !
"pushrunstate", "poprunstate", "suggestedalias", "showboxhere", "discoptioncodestring", "flagcodestring", "frozenparcodestring", "glyphoptioncodestring", "groupcodestring", "hyphenationcodestring", "mathcontrolcodestring", "mathflattencodestring", "normalizecodestring", "parcontextcodestring", "newlocalcount", "newlocaldimen", "newlocalskip", "newlocalmuskip", "newlocaltoks", "newlocalbox", "newlocalwrite", "newlocalread", "setnewlocalcount", "setnewlocaldimen", "setnewlocalskip", "setnewlocalmuskip", "setnewlocaltoks", "setnewlocalbox", "ifexpression" },
}
\ No newline at end of file
Modified: trunk/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metapost.lua
===================================================================
--- trunk/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metapost.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metapost.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1,5 +1,5 @@
return {
- ["commands"]={ "on", "off", "interpath", "upto", "downto", "beginfig", "endfig", "beginglyph", "endglyph", "beginfont", "endfont", "rotatedaround", "reflectedabout", "arrowhead", "currentpen", "currentpicture", "cuttings", "defaultfont", "extra_beginfig", "extra_endfig", "down", "evenly", "fullcircle", "halfcircle", "identity", "in", "left", "pensquare", "penrazor", "penspec", "origin", "quartercircle", "right", "unitsquare", "up", "withdots", "abs", "bbox", "ceiling", "cutafter", "cutbefore", "dir", "directionpoint", "div", "dotprod", "intersectionpoint", "inverse", "mod", "round", "unitvector", "whatever", "cutdraw", "draw", "drawarrow", "drawdblarrow", "fill", "filldraw", "drawdot", "loggingall", "interact", "tracingall", "tracingnone", "pickup", "undraw", "unfill", "unfilldraw", "buildcycle", "dashpattern", "decr", "dotlabel", "dotlabels", "drawoptions", "incr", "label", "labels", "max", "min", "thelabel", "z", "beginchar", "blacker", "capsule_end", "change_width", "define_blacker_pixels", "define_corrected_pixels", "define_good_x_pixels", "define_good_y_pixels", "define_horizontal_corrected_pixels", "define_pixels", "define_whole_blacker_pixels", "define_whole_pixels", "define_whole_vertical_blacker_pixels", "define_whole_vertical_pixels", "endchar", "extra_beginchar", "extra_endchar", "extra_setup", "font_coding_scheme", "clearxy", "clearit", "clearpen", "shipit", "font_extra_space", "exitunless", "relax", "hide", "gobble", "gobbled", "stop", "blankpicture", "counterclockwise", "tensepath", "takepower", "direction", "softjoin", "makelabel", "rotatedabout", "flex", "superellipse", "image", "nullpen", "savepen", "clearpen", "penpos", "penlabels", "range", "thru", "z", "laboff", "bye", "red", "green", "blue", "cyan", "magenta", "yellow", "black", "white", "background", "mm", "pt", "dd", "bp", "cm", "pc", "cc", "in", "dk", "triplet", "quadruplet", "totransform", "bymatrix", "closedcurve", "closedlines", "primitive", "permanent", "immutable", "mutable", "frozen", "showproperty", "showhashentry", "top"!
, "bot", "lft", "rt", "ulft", "urt", "llft", "lrt" },
+ ["commands"]={ "on", "off", "interpath", "upto", "downto", "beginfig", "endfig", "beginglyph", "endglyph", "beginfont", "endfont", "rotatedaround", "reflectedabout", "arrowhead", "currentpen", "currentpicture", "cuttings", "defaultfont", "extra_beginfig", "extra_endfig", "down", "evenly", "fullcircle", "halfcircle", "identity", "in", "left", "pensquare", "penrazor", "penspec", "origin", "quartercircle", "right", "unitsquare", "up", "withdots", "abs", "bbox", "ceiling", "cutafter", "cutbefore", "dir", "directionpoint", "div", "dotprod", "intersectionpoint", "inverse", "mod", "round", "unitvector", "whatever", "cutdraw", "draw", "drawarrow", "drawdblarrow", "fill", "filldraw", "drawdot", "loggingall", "interact", "tracingall", "tracingnone", "pickup", "undraw", "unfill", "unfilldraw", "buildcycle", "dashpattern", "decr", "dotlabel", "dotlabels", "drawoptions", "incr", "label", "labels", "max", "min", "thelabel", "z", "beginchar", "blacker", "capsule_end", "change_width", "define_blacker_pixels", "define_corrected_pixels", "define_good_x_pixels", "define_good_y_pixels", "define_horizontal_corrected_pixels", "define_pixels", "define_whole_blacker_pixels", "define_whole_pixels", "define_whole_vertical_blacker_pixels", "define_whole_vertical_pixels", "endchar", "extra_beginchar", "extra_endchar", "extra_setup", "font_coding_scheme", "clearxy", "clearit", "clearpen", "shipit", "font_extra_space", "exitunless", "relax", "hide", "gobble", "gobbled", "stop", "blankpicture", "counterclockwise", "tensepath", "takepower", "direction", "softjoin", "makelabel", "rotatedabout", "flex", "superellipse", "image", "nullpen", "savepen", "clearpen", "penpos", "penlabels", "range", "thru", "z", "laboff", "bye", "red", "green", "blue", "cyan", "magenta", "yellow", "black", "white", "background", "mm", "pt", "dd", "bp", "cm", "pc", "cc", "in", "dk", "es", "ts", "triplet", "quadruplet", "totransform", "bymatrix", "closedcurve", "closedlines", "primitive", "permanent", "immutable", "mutable", "frozen", "showproperty", "showhashe!
ntry", "top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt" },
["disabled"]={ "verbatimtex", "troffmode" },
["internals"]={ "mitered", "rounded", "beveled", "butt", "squared", "eps", "epsilon", "infinity", "bboxmargin", "ahlength", "ahangle", "labeloffset", "dotlabeldiam", "defaultpen", "defaultscale", "join_radius", "charscale", "inicatcoderegime", "texcatcoderegime", "luacatcoderegime", "notcatcoderegime", "vrbcatcoderegime", "prtcatcoderegime", "ctxcatcoderegime", "txtcatcoderegime", "catcoderegime", "ditto", "EOF", "pen_lft", "pen_rt", "pen_top", "pen_bot" },
["metafont"]={ "autorounding", "beginchar", "blacker", "boundarychar", "capsule_def", "capsule_end", "change_width", "chardp", "chardx", "chardy", "charexists", "charext", "charht", "charic", "charlist", "charwd", "cull", "cullit", "currenttransform", "currentwindow", "define_blacker_pixels", "define_corrected_pixels", "define_good_x_pixels", "define_good_y_pixels", "define_horizontal_corrected_pixels", "define_pixels", "define_whole_blacker_pixels", "define_whole_pixels", "define_whole_vertical_blacker_pixels", "define_whole_vertical_pixels", "designsize", "display", "displaying", "endchar", "extensible", "extra_beginchar", "extra_endchar", "extra_setup", "fillin", "font_coding_scheme", "font_extra_space", "font_identifier", "font_normal_shrink", "font_normal_space", "font_normal_stretch", "font_quad", "font_size", "font_slant", "font_x_height", "fontdimen", "fontmaking", "gfcorners", "granularity", "grayfont", "headerbyte", "hppp", "hround", "imagerules", "italcorr", "kern", "labelfont", "ligtable", "lowres_fix", "makebox", "makegrid", "maketicks", "mode_def", "mode_setup", "nodisplays", "notransforms", "numspecial", "o_correction", "openit", "openwindow", "pixels_per_inch", "proofing", "proofoffset", "proofrule", "proofrulethickness", "rulepen", "screenchars", "screenrule", "screenstrokes", "screen_cols", "screen_rows", "showit", "slantfont", "smode", "smoothing", "titlefont", "totalweight", "tracingedges", "tracingpens", "turningcheck", "unitpixel", "vppp", "vround", "xoffset", "yoffset" },
Modified: trunk/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-tex.lua
===================================================================
--- trunk/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-tex.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-tex.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1,7 +1,7 @@
return {
["aleph"]={ "Alephminorversion", "Alephrevision", "Alephversion" },
["etex"]={ "botmarks", "clubpenalties", "currentgrouplevel", "currentgrouptype", "currentifbranch", "currentiflevel", "currentiftype", "detokenize", "dimexpr", "displaywidowpenalties", "everyeof", "firstmarks", "fontchardp", "fontcharht", "fontcharic", "fontcharwd", "glueexpr", "glueshrink", "glueshrinkorder", "gluestretch", "gluestretchorder", "gluetomu", "ifcsname", "ifdefined", "iffontchar", "interactionmode", "interlinepenalties", "lastlinefit", "lastnodetype", "marks", "muexpr", "mutoglue", "numexpr", "pagediscards", "parshapedimen", "parshapeindent", "parshapelength", "predisplaydirection", "protected", "savinghyphcodes", "savingvdiscards", "scantokens", "showgroups", "showifs", "showtokens", "splitbotmarks", "splitdiscards", "splitfirstmarks", "topmarks", "tracingassigns", "tracinggroups", "tracingifs", "tracingnesting", "unexpanded", "unless", "widowpenalties" },
- ["luatex"]={ "Uabove", "Uabovewithdelims", "Uatop", "Uatopwithdelims", "Uchar", "Udelcode", "Udelimited", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Uleft", "Umathaccent", "Umathaccentbasedepth", "Umathaccentbaseheight", "Umathaccentbottomovershoot", "Umathaccentbottomshiftdown", "Umathaccentextendmargin", "Umathaccentsuperscriptdrop", "Umathaccentsuperscriptpercent", "Umathaccenttopovershoot", "Umathaccenttopshiftup", "Umathaccentvariant", "Umathadapttoleft", "Umathadapttoright", "Umathaxis", "Umathbottomaccentvariant", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharslot", "Umathclass", "Umathcode", "Umathconnectoroverlapmin", "Umathdegreevariant", "Umathdelimiterovervariant", "Umathdelimiterpercent", "Umathdelimitershortfall", "Umathdelimiterundervariant", "Umathdenominatorvariant", "Umathdict", "Umathdictdef", "Umathdiscretionary", "Umathextrasubpreshift", "Umathextrasubprespace", "Umathextrasubshift", "Umathextrasubspace", "Umathextrasuppreshift", "Umathextrasupprespace", "Umathextrasupshift", "Umathextrasupspace", "Umathflattenedaccentbasedepth", "Umathflattenedaccentbaseheight", "Umathflattenedaccentbottomshiftdown", "Umathflattenedaccenttopshiftup", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathfractionvariant", "Umathhextensiblevariant", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathlimits", "Umathnoaxis", "Umathnolimits", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathnumeratorvariant", "Umathopenupdepth", "Umathopenupheight", "Umathoperatorsize", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervariant", "Umathoverdelimitervgap", "Umathoverlayaccentvariant", "Umathoverlinevariant", "Umathphantom", "Umathpresubshiftdistance", "Umathpresupshiftdistance", "Umathprimeraise", "Umathprim!
eraisecomposed", "Umathprimeshiftdrop", "Umathprimeshiftup", "Umathprimespaceafter", "Umathprimevariant", "Umathprimewidth", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalextensibleafter", "Umathradicalextensiblebefore", "Umathradicalkern", "Umathradicalrule", "Umathradicalvariant", "Umathradicalvgap", "Umathruledepth", "Umathruleheight", "Umathskeweddelimitertolerance", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathsource", "Umathspaceafterscript", "Umathspacebeforescript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvariant", "Umathstackvgap", "Umathsubscriptvariant", "Umathsubshiftdistance", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsuperscriptvariant", "Umathsupshiftdistance", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathtopaccentvariant", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervariant", "Umathunderdelimitervgap", "Umathunderlinevariant", "Umathuseaxis", "Umathvextensiblevariant", "Umathvoid", "Umathxscale", "Umathyscale", "Umiddle", "Unosubprescript", "Unosubscript", "Unosuperprescript", "Unosuperscript", "Uoperator", "Uover", "Uoverdelimiter", "Uoverwithdelims", "Uprimescript", "Uradical", "Uright", "Uroot", "Urooted", "Ushiftedsubprescript", "Ushiftedsubscript", "Ushiftedsuperprescript", "Ushiftedsuperscript", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustartmathmode", "Ustopdisplaymath", "Ustopmath", "Ustopmathmode", "Ustretched", "Ustretchedwithdelims", "Ustyle", "Usubprescript", "Usubscript", "Usuperprescript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "adjustspacingshrink", "adjustspacingstep", "adjustspacingstretch", "afterassigned", "aftergrouped", "aliased", "aligncontent", "alignmark", "alignmentcellsource", "alignmentwrapsource", "aligntab", "allcrampedstyles", "alldisplay!
styles", "allmainstyles", "allmathstyles", "allscriptscriptstyles", "allscriptstyles", "allsplitstyles", "alltextstyles", "alluncrampedstyles", "allunsplitstyles", "amcode", "atendofgroup", "atendofgrouped", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenpenalty", "automigrationmode", "autoparagraphmode", "begincsname", "beginlocalcontrol", "beginmathgroup", "beginsimplegroup", "boundary", "boxadapt", "boxanchor", "boxanchors", "boxattribute", "boxdirection", "boxfreeze", "boxgeometry", "boxorientation", "boxrepack", "boxshift", "boxsource", "boxtarget", "boxtotal", "boxvadjust", "boxxmove", "boxxoffset", "boxymove", "boxyoffset", "catcodetable", "cdef", "cdefcsname", "cfcode", "clearmarks", "constant", "copymathatomrule", "copymathparent", "copymathspacing", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "csactive", "csstring", "currentloopiterator", "currentloopnesting", "currentmarks", "dbox", "defcsname", "detokenized", "dimensiondef", "dimexpression", "directlua", "dpack", "dsplit", "edefcsname", "efcode", "endlocalcontrol", "endmathgroup", "endsimplegroup", "enforced", "etoks", "etoksapp", "etokspre", "everybeforepar", "everymathatom", "everytab", "exceptionpenalty", "expand", "expandactive", "expandafterpars", "expandafterspaces", "expandcstoken", "expanded", "expandedafter", "expandedloop", "expandtoken", "explicitdiscretionary", "explicithyphenpenalty", "firstvalidlanguage", "flushmarks", "fontcharta", "fontid", "fontmathcontrol", "fontspecdef", "fontspecid", "fontspecifiedname", "fontspecifiedsize", "fontspecscale", "fontspecxscale", "fontspecyscale", "fonttextcontrol", "formatname", "frozen", "futurecsname", "futuredef", "futureexpand", "futureexpandis", "futureexpandisap", "gdefcsname", "gleaders", "glet", "gletcsname", "glettonothing", "gluespecdef", "glyph", "glyphdatafield", "glyphoptions", "glyphscale", "glyphscriptfield", "glyphscriptscale", "glyphscriptscriptscale", "glyphstatefield", "glyphtextscale", "glyphxoffset", "glyphx!
scale", "glyphxscaled", "glyphyoffset", "glyphyscale", "glyphyscaled", "gtoksapp", "gtokspre", "hccode", "hjcode", "hmcode", "holdingmigrations", "hpack", "hyphenationmin", "hyphenationmode", "ifabsdim", "ifabsnum", "ifarguments", "ifboolean", "ifchkdim", "ifchkdimension", "ifchknum", "ifchknumber", "ifcmpdim", "ifcmpnum", "ifcondition", "ifcstok", "ifdimexpression", "ifdimval", "ifempty", "ifflags", "ifhaschar", "ifhastok", "ifhastoks", "ifhasxtoks", "ifincsname", "ifinsert", "ifmathparameter", "ifmathstyle", "ifnumexpression", "ifnumval", "ifparameter", "ifparameters", "ifrelax", "iftok", "ifzerodim", "ifzeronum", "ignorearguments", "ignoredepthcriterium", "ignorepars", "immediate", "immutable", "indexofcharacter", "indexofregister", "inherited", "initcatcodetable", "insertbox", "insertcopy", "insertdepth", "insertdistance", "insertheight", "insertheights", "insertlimit", "insertmaxdepth", "insertmode", "insertmultiplier", "insertpenalty", "insertprogress", "insertstorage", "insertstoring", "insertunbox", "insertuncopy", "insertwidth", "instance", "integerdef", "lastarguments", "lastatomclass", "lastboundary", "lastchkdim", "lastchknum", "lastleftclass", "lastloopiterator", "lastnamedcs", "lastnodesubtype", "lastpageextra", "lastparcontext", "lastrightclass", "leftmarginkern", "letcharcode", "letcsname", "letfrozen", "letmathatomrule", "letmathparent", "letmathspacing", "letprotected", "lettonothing", "linebreakcriterium", "linedirection", "localbrokenpenalty", "localcontrol", "localcontrolled", "localcontrolledloop", "localinterlinepenalty", "localleftbox", "localleftboxbox", "localmiddlebox", "localmiddleboxbox", "localrightbox", "localrightboxbox", "lpcode", "luabytecode", "luabytecodecall", "luacopyinputnodes", "luadef", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathaccent", "mathatom", "mathatomglue", "mathatomskip", "mathbackwardpenalties", "mathbeginclass", "mathbinary", "mathcheckfencesmode", "mathclose", "mathdictgroup", "mathdictpropertie!
s", "mathdirection", "mathdisplaymode", "mathdisplayskipmode", "mathdoublescriptmode", "mathendclass", "matheqnogapstep", "mathfenced", "mathfontcontrol", "mathforwardpenalties", "mathfraction", "mathghost", "mathgluemode", "mathgroupingmode", "mathinner", "mathleftclass", "mathlimitsmode", "mathmainstyle", "mathmiddle", "mathnolimitsmode", "mathopen", "mathoperator", "mathordinary", "mathoverline", "mathpenaltiesmode", "mathpunctuation", "mathradical", "mathrelation", "mathrightclass", "mathrulesfam", "mathrulesmode", "mathscale", "mathscriptsmode", "mathslackmode", "mathspacingmode", "mathstackstyle", "mathstyle", "mathstylefontid", "mathsurroundmode", "mathsurroundskip", "maththreshold", "mathunderline", "meaningasis", "meaningfull", "meaningless", "mugluespecdef", "mutable", "noaligned", "noatomruling", "noboundary", "nohrule", "norelax", "normalizelinemode", "normalizeparmode", "nospaces", "novrule", "numericscale", "numexpression", "orelse", "orphanpenalties", "orphanpenalty", "orunless", "outputbox", "overloaded", "overloadmode", "overshoot", "pageboundary", "pageextragoal", "pagevsize", "parametercount", "parametermark", "parattribute", "pardirection", "permanent", "pettymuskip", "postexhyphenchar", "posthyphenchar", "postinlinepenalty", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "preinlinepenalty", "prerelpenalty", "protrudechars", "protrusionboundary", "pxdimen", "quitloop", "quitvmode", "resetmathspacing", "retokenized", "rightmarginkern", "rpcode", "savecatcodetable", "scaledemwidth", "scaledexheight", "scaledextraspace", "scaledfontdimen", "scaledinterwordshrink", "scaledinterwordspace", "scaledinterwordstretch", "scaledmathstyle", "scaledslantperpoint", "scantextokens", "semiexpand", "semiexpanded", "semiprotected", "setdefaultmathcodes", "setfontid", "setmathatomrule", "setmathdisplaypostpenalty", "setmathdisplayprepenalty", "setmathignore", "setmathoptions", "setmathpostpenalty", "setmathprepenalty", "setmathspacing", "shapingpenaltiesmode", "shapingpenalty", "s!
napshotpar", "srule", "supmarkmode", "swapcsvalues", "tabsize", "textdirection", "thewithoutunit", "tinymuskip", "todimension", "tohexadecimal", "tointeger", "tokenized", "toksapp", "tokspre", "tolerant", "tomathstyle", "toscaled", "tosparsedimension", "tosparsescaled", "tpack", "tracingadjusts", "tracingalignments", "tracingexpressions", "tracingfonts", "tracingfullboxes", "tracinghyphenation", "tracinginserts", "tracinglevels", "tracinglists", "tracingmarks", "tracingmath", "tracingnodes", "tracingpenalties", "tsplit", "uleaders", "undent", "unexpandedloop", "unhpack", "unletfrozen", "unletprotected", "untraced", "unvpack", "variablefam", "virtualhrule", "virtualvrule", "vpack", "wordboundary", "wrapuppar", "xdefcsname", "xtoks", "xtoksapp", "xtokspre" },
+ ["luatex"]={ "Uabove", "Uabovewithdelims", "Uatop", "Uatopwithdelims", "Uchar", "Udelcode", "Udelimited", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Uleft", "Umathaccent", "Umathaccentbasedepth", "Umathaccentbaseheight", "Umathaccentbottomovershoot", "Umathaccentbottomshiftdown", "Umathaccentextendmargin", "Umathaccentsuperscriptdrop", "Umathaccentsuperscriptpercent", "Umathaccenttopovershoot", "Umathaccenttopshiftup", "Umathaccentvariant", "Umathadapttoleft", "Umathadapttoright", "Umathaxis", "Umathbottomaccentvariant", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharslot", "Umathclass", "Umathcode", "Umathconnectoroverlapmin", "Umathdegreevariant", "Umathdelimiterextendmargin", "Umathdelimiterovervariant", "Umathdelimiterpercent", "Umathdelimitershortfall", "Umathdelimiterundervariant", "Umathdenominatorvariant", "Umathdict", "Umathdictdef", "Umathdiscretionary", "Umathextrasubpreshift", "Umathextrasubprespace", "Umathextrasubshift", "Umathextrasubspace", "Umathextrasuppreshift", "Umathextrasupprespace", "Umathextrasupshift", "Umathextrasupspace", "Umathflattenedaccentbasedepth", "Umathflattenedaccentbaseheight", "Umathflattenedaccentbottomshiftdown", "Umathflattenedaccenttopshiftup", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathfractionvariant", "Umathhextensiblevariant", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathlimits", "Umathnoaxis", "Umathnolimits", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathnumeratorvariant", "Umathopenupdepth", "Umathopenupheight", "Umathoperatorsize", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervariant", "Umathoverdelimitervgap", "Umathoverlayaccentvariant", "Umathoverlinevariant", "Umathphantom", "Umathpresubshiftdistance", "Umathpresupshiftdistance",!
"Umathprimeraise", "Umathprimeraisecomposed", "Umathprimeshiftdrop", "Umathprimeshiftup", "Umathprimespaceafter", "Umathprimevariant", "Umathprimewidth", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalextensibleafter", "Umathradicalextensiblebefore", "Umathradicalkern", "Umathradicalrule", "Umathradicalvariant", "Umathradicalvgap", "Umathruledepth", "Umathruleheight", "Umathskeweddelimitertolerance", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathsource", "Umathspaceafterscript", "Umathspacebeforescript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvariant", "Umathstackvgap", "Umathsubscriptvariant", "Umathsubshiftdistance", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsuperscriptvariant", "Umathsupshiftdistance", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathtopaccentvariant", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervariant", "Umathunderdelimitervgap", "Umathunderlinevariant", "Umathuseaxis", "Umathvextensiblevariant", "Umathvoid", "Umathxscale", "Umathyscale", "Umiddle", "Unosubprescript", "Unosubscript", "Unosuperprescript", "Unosuperscript", "Uoperator", "Uover", "Uoverdelimiter", "Uoverwithdelims", "Uprimescript", "Uradical", "Uright", "Uroot", "Urooted", "Ushiftedsubprescript", "Ushiftedsubscript", "Ushiftedsuperprescript", "Ushiftedsuperscript", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustartmathmode", "Ustopdisplaymath", "Ustopmath", "Ustopmathmode", "Ustretched", "Ustretchedwithdelims", "Ustyle", "Usubprescript", "Usubscript", "Usuperprescript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "adjustspacingshrink", "adjustspacingstep", "adjustspacingstretch", "afterassigned", "aftergrouped", "aliased", "aligncontent", "alignmark", "alignmentcellsource", "alignmentwrapsource", "aligntab", "!
allcrampedstyles", "alldisplaystyles", "allmainstyles", "allmathstyles", "allscriptscriptstyles", "allscriptstyles", "allsplitstyles", "alltextstyles", "alluncrampedstyles", "allunsplitstyles", "amcode", "atendofgroup", "atendofgrouped", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenpenalty", "automigrationmode", "autoparagraphmode", "begincsname", "beginlocalcontrol", "beginmathgroup", "beginsimplegroup", "boundary", "boxadapt", "boxanchor", "boxanchors", "boxattribute", "boxdirection", "boxfreeze", "boxgeometry", "boxorientation", "boxrepack", "boxshift", "boxsource", "boxtarget", "boxtotal", "boxvadjust", "boxxmove", "boxxoffset", "boxymove", "boxyoffset", "catcodetable", "cdef", "cdefcsname", "cfcode", "clearmarks", "constant", "copymathatomrule", "copymathparent", "copymathspacing", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "csactive", "csstring", "currentloopiterator", "currentloopnesting", "currentmarks", "dbox", "defcsname", "deferred", "detokenized", "dimensiondef", "dimexpression", "directlua", "dpack", "dsplit", "edefcsname", "efcode", "endlocalcontrol", "endmathgroup", "endsimplegroup", "enforced", "etoks", "etoksapp", "etokspre", "eufactor", "everybeforepar", "everymathatom", "everytab", "exceptionpenalty", "expand", "expandactive", "expandafterpars", "expandafterspaces", "expandcstoken", "expanded", "expandedafter", "expandedloop", "expandtoken", "explicitdiscretionary", "explicithyphenpenalty", "firstvalidlanguage", "float", "floatdef", "floatexpr", "flushmarks", "fontcharba", "fontcharta", "fontid", "fontmathcontrol", "fontspecdef", "fontspecid", "fontspecifiedname", "fontspecifiedsize", "fontspecscale", "fontspecxscale", "fontspecyscale", "fonttextcontrol", "formatname", "frozen", "futurecsname", "futuredef", "futureexpand", "futureexpandis", "futureexpandisap", "gdefcsname", "gleaders", "glet", "gletcsname", "glettonothing", "gluespecdef", "glyph", "glyphdatafield", "glyphoptions", "glyphscale", "glyphscriptfield", "gly!
phscriptscale", "glyphscriptscriptscale", "glyphstatefield", "glyphtextscale", "glyphxoffset", "glyphxscale", "glyphxscaled", "glyphyoffset", "glyphyscale", "glyphyscaled", "gtoksapp", "gtokspre", "hccode", "hjcode", "hmcode", "holdingmigrations", "hpack", "hyphenationmin", "hyphenationmode", "ifabsdim", "ifabsfloat", "ifabsnum", "ifarguments", "ifboolean", "ifchkdim", "ifchkdimension", "ifchknum", "ifchknumber", "ifcmpdim", "ifcmpnum", "ifcondition", "ifcstok", "ifdimexpression", "ifdimval", "ifempty", "ifflags", "iffloat", "ifhaschar", "ifhastok", "ifhastoks", "ifhasxtoks", "ifincsname", "ifinsert", "ifmathparameter", "ifmathstyle", "ifnumexpression", "ifnumval", "ifparameter", "ifparameters", "ifrelax", "iftok", "ifzerodim", "ifzerofloat", "ifzeronum", "ignorearguments", "ignoredepthcriterium", "ignorepars", "immediate", "immutable", "indexofcharacter", "indexofregister", "inherited", "initcatcodetable", "insertbox", "insertcopy", "insertdepth", "insertdistance", "insertheight", "insertheights", "insertlimit", "insertmaxdepth", "insertmode", "insertmultiplier", "insertpenalty", "insertprogress", "insertstorage", "insertstoring", "insertunbox", "insertuncopy", "insertwidth", "instance", "integerdef", "lastarguments", "lastatomclass", "lastboundary", "lastchkdim", "lastchknum", "lastleftclass", "lastloopiterator", "lastnamedcs", "lastnodesubtype", "lastpageextra", "lastparcontext", "lastrightclass", "leftmarginkern", "letcharcode", "letcsname", "letfrozen", "letmathatomrule", "letmathparent", "letmathspacing", "letprotected", "lettonothing", "linebreakcriterium", "linedirection", "localbrokenpenalty", "localcontrol", "localcontrolled", "localcontrolledloop", "localinterlinepenalty", "localleftbox", "localleftboxbox", "localmiddlebox", "localmiddleboxbox", "localrightbox", "localrightboxbox", "lpcode", "luabytecode", "luabytecodecall", "luacopyinputnodes", "luadef", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathaccent", "mathatom", "mathatomglue", "m!
athatomskip", "mathbackwardpenalties", "mathbeginclass", "mathbinary", "mathcheckfencesmode", "mathclose", "mathdictgroup", "mathdictproperties", "mathdirection", "mathdisplaymode", "mathdisplayskipmode", "mathdoublescriptmode", "mathendclass", "matheqnogapstep", "mathfenced", "mathfontcontrol", "mathforwardpenalties", "mathfraction", "mathghost", "mathgluemode", "mathgroupingmode", "mathinner", "mathleftclass", "mathlimitsmode", "mathmainstyle", "mathmiddle", "mathnolimitsmode", "mathopen", "mathoperator", "mathordinary", "mathoverline", "mathpenaltiesmode", "mathpunctuation", "mathradical", "mathrelation", "mathrightclass", "mathrulesfam", "mathrulesmode", "mathscale", "mathscriptsmode", "mathslackmode", "mathspacingmode", "mathstackstyle", "mathstyle", "mathstylefontid", "mathsurroundmode", "mathsurroundskip", "maththreshold", "mathunderline", "meaningasis", "meaningful", "meaningfull", "meaningles", "meaningless", "mugluespecdef", "mutable", "noaligned", "noatomruling", "noboundary", "nohrule", "norelax", "normalizelinemode", "normalizeparmode", "nospaces", "novrule", "numericscale", "numexpression", "orelse", "orphanpenalties", "orphanpenalty", "orunless", "outputbox", "overloaded", "overloadmode", "overshoot", "pageboundary", "pageextragoal", "pagevsize", "parametercount", "parametermark", "parattribute", "pardirection", "permanent", "pettymuskip", "positdef", "postexhyphenchar", "posthyphenchar", "postinlinepenalty", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "preinlinepenalty", "prerelpenalty", "protrudechars", "protrusionboundary", "pxdimen", "quitloop", "quitvmode", "resetmathspacing", "retokenized", "rightmarginkern", "rpcode", "savecatcodetable", "scaledemwidth", "scaledexheight", "scaledextraspace", "scaledfontdimen", "scaledinterwordshrink", "scaledinterwordspace", "scaledinterwordstretch", "scaledmathstyle", "scaledslantperpoint", "scantextokens", "semiexpand", "semiexpanded", "semiprotected", "setdefaultmathcodes", "setfontid", "setmathatomrule", "setmathdisplay!
postpenalty", "setmathdisplayprepenalty", "setmathignore", "setmathoptions", "setmathpostpenalty", "setmathprepenalty", "setmathspacing", "shapingpenaltiesmode", "shapingpenalty", "snapshotpar", "srule", "supmarkmode", "swapcsvalues", "tabsize", "textdirection", "thewithoutunit", "tinymuskip", "todimension", "tohexadecimal", "tointeger", "tokenized", "toksapp", "tokspre", "tolerant", "tomathstyle", "toscaled", "tosparsedimension", "tosparsescaled", "tpack", "tracingadjusts", "tracingalignments", "tracingexpressions", "tracingfonts", "tracingfullboxes", "tracinghyphenation", "tracinginserts", "tracinglevels", "tracinglists", "tracingmarks", "tracingmath", "tracingnodes", "tracingpenalties", "tsplit", "uleaders", "undent", "unexpandedloop", "unhpack", "unletfrozen", "unletprotected", "untraced", "unvpack", "variablefam", "virtualhrule", "virtualvrule", "vpack", "wordboundary", "wrapuppar", "xdefcsname", "xtoks", "xtoksapp", "xtokspre" },
["omega"]={ "Omegaminorversion", "Omegarevision", "Omegaversion" },
["pdftex"]={ "ifpdfabsdim", "ifpdfabsnum", "ifpdfprimitive", "pdfadjustspacing", "pdfannot", "pdfcatalog", "pdfcolorstack", "pdfcolorstackinit", "pdfcompresslevel", "pdfcopyfont", "pdfcreationdate", "pdfdecimaldigits", "pdfdest", "pdfdestmargin", "pdfdraftmode", "pdfeachlinedepth", "pdfeachlineheight", "pdfendlink", "pdfendthread", "pdffirstlineheight", "pdffontattr", "pdffontexpand", "pdffontname", "pdffontobjnum", "pdffontsize", "pdfgamma", "pdfgentounicode", "pdfglyphtounicode", "pdfhorigin", "pdfignoreddimen", "pdfignoreunknownimages", "pdfimageaddfilename", "pdfimageapplygamma", "pdfimagegamma", "pdfimagehicolor", "pdfimageresolution", "pdfincludechars", "pdfinclusioncopyfonts", "pdfinclusionerrorlevel", "pdfinfo", "pdfinfoomitdate", "pdfinsertht", "pdflastannot", "pdflastlinedepth", "pdflastlink", "pdflastobj", "pdflastxform", "pdflastximage", "pdflastximagepages", "pdflastxpos", "pdflastypos", "pdflinkmargin", "pdfliteral", "pdfmajorversion", "pdfmapfile", "pdfmapline", "pdfminorversion", "pdfnames", "pdfnoligatures", "pdfnormaldeviate", "pdfobj", "pdfobjcompresslevel", "pdfomitcharset", "pdfomitcidset", "pdfomitinfodict", "pdfoutline", "pdfoutput", "pdfpageattr", "pdfpagebox", "pdfpageheight", "pdfpageref", "pdfpageresources", "pdfpagesattr", "pdfpagewidth", "pdfpkfixeddpi", "pdfpkmode", "pdfpkresolution", "pdfprimitive", "pdfprotrudechars", "pdfpxdimen", "pdfrandomseed", "pdfrecompress", "pdfrefobj", "pdfrefxform", "pdfrefximage", "pdfreplacefont", "pdfrestore", "pdfretval", "pdfsave", "pdfsavepos", "pdfsetmatrix", "pdfsetrandomseed", "pdfstartlink", "pdfstartthread", "pdfsuppressoptionalinfo", "pdfsuppressptexinfo", "pdftexbanner", "pdftexrevision", "pdftexversion", "pdfthread", "pdfthreadmargin", "pdftracingfonts", "pdftrailer", "pdftrailerid", "pdfuniformdeviate", "pdfuniqueresname", "pdfvorigin", "pdfxform", "pdfxformattr", "pdfxformmargin", "pdfxformname", "pdfxformresources", "pdfximage" },
["tex"]={ " ", "-", "/", "above", "abovedisplayshortskip", "abovedisplayskip", "abovewithdelims", "accent", "adjdemerits", "advance", "advanceby", "afterassignment", "aftergroup", "atop", "atopwithdelims", "badness", "baselineskip", "batchmode", "begingroup", "belowdisplayshortskip", "belowdisplayskip", "binoppenalty", "botmark", "box", "boxmaxdepth", "brokenpenalty", "catcode", "char", "chardef", "cleaders", "clubpenalty", "copy", "count", "countdef", "cr", "crcr", "csname", "day", "deadcycles", "def", "defaulthyphenchar", "defaultskewchar", "delcode", "delimiter", "delimiterfactor", "delimitershortfall", "dimen", "dimendef", "discretionary", "displayindent", "displaylimits", "displaystyle", "displaywidowpenalty", "displaywidth", "divide", "divideby", "doublehyphendemerits", "dp", "dump", "edef", "else", "emergencystretch", "end", "endcsname", "endgroup", "endinput", "endlinechar", "eqno", "errhelp", "errmessage", "errorcontextlines", "errorstopmode", "escapechar", "everycr", "everydisplay", "everyhbox", "everyjob", "everymath", "everypar", "everyvbox", "exhyphenchar", "exhyphenpenalty", "expandafter", "fam", "fi", "finalhyphendemerits", "firstmark", "floatingpenalty", "font", "fontdimen", "fontname", "futurelet", "gdef", "global", "globaldefs", "halign", "hangafter", "hangindent", "hbadness", "hbox", "hfil", "hfill", "hfilneg", "hfuzz", "holdinginserts", "hrule", "hsize", "hskip", "hss", "ht", "hyphenation", "hyphenchar", "hyphenpenalty", "if", "ifcase", "ifcat", "ifdim", "iffalse", "ifhbox", "ifhmode", "ifinner", "ifmmode", "ifnum", "ifodd", "iftrue", "ifvbox", "ifvmode", "ifvoid", "ifx", "ignorespaces", "indent", "input", "inputlineno", "insert", "insertpenalties", "interlinepenalty", "jobname", "kern", "language", "lastbox", "lastkern", "lastpenalty", "lastskip", "lccode", "leaders", "left", "lefthyphenmin", "leftskip", "leqno", "let", "limits", "linepenalty", "lineskip", "lineskiplimit", "long", "looseness", "lower", "lowercase", "mark", "mathbin", "mathchar", "mathchardef", "mathchoice", "mathco!
de", "mathop", "mathord", "mathpunct", "mathrel", "mathsurround", "maxdeadcycles", "maxdepth", "meaning", "medmuskip", "message", "middle", "mkern", "month", "moveleft", "moveright", "mskip", "multiply", "multiplyby", "muskip", "muskipdef", "newlinechar", "noalign", "noexpand", "noindent", "nolimits", "nonscript", "nonstopmode", "nulldelimiterspace", "nullfont", "number", "omit", "or", "outer", "output", "outputpenalty", "over", "overfullrule", "overline", "overwithdelims", "pagedepth", "pagefilllstretch", "pagefillstretch", "pagefilstretch", "pagegoal", "pageshrink", "pagestretch", "pagetotal", "par", "parfillleftskip", "parfillskip", "parindent", "parinitleftskip", "parinitrightskip", "parshape", "parskip", "patterns", "pausing", "penalty", "postdisplaypenalty", "predisplaypenalty", "predisplaysize", "pretolerance", "prevdepth", "prevgraf", "radical", "raise", "relax", "relpenalty", "right", "righthyphenmin", "rightskip", "romannumeral", "scriptfont", "scriptscriptfont", "scriptscriptstyle", "scriptspace", "scriptstyle", "scrollmode", "setbox", "setlanguage", "sfcode", "shipout", "show", "showbox", "showboxbreadth", "showboxdepth", "showlists", "shownodedetails", "showthe", "skewchar", "skip", "skipdef", "spacefactor", "spaceskip", "span", "splitbotmark", "splitfirstmark", "splitmaxdepth", "splittopskip", "string", "tabskip", "textfont", "textstyle", "the", "thickmuskip", "thinmuskip", "time", "toks", "toksdef", "tolerance", "topmark", "topskip", "tracingcommands", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingpages", "tracingparagraphs", "tracingrestores", "tracingstats", "uccode", "uchyph", "unboundary", "underline", "unhbox", "unhcopy", "unkern", "unpenalty", "unskip", "unvbox", "unvcopy", "uppercase", "vadjust", "valign", "vbadness", "vbox", "vcenter", "vfil", "vfill", "vfilneg", "vfuzz", "vrule", "vsize", "vskip", "vsplit", "vss", "vtop", "wd", "widowpenalty", "xdef", "xleaders", "xspaceskip", "year" },
Modified: trunk/Master/texmf-dist/context/data/scite/context/scite-context-data-context.properties
===================================================================
--- trunk/Master/texmf-dist/context/data/scite/context/scite-context-data-context.properties 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/context/data/scite/context/scite-context-data-context.properties 2023-05-06 22:03:57 UTC (rev 67034)
@@ -70,56 +70,56 @@
startmodeset stopmodeset startallmodes stopallmodes startnotallmodes \
stopnotallmodes doifallmodes doifelseallmodes doifallmodeselse doifnotallmodes \
startenvironment stopenvironment environment startcomponent stopcomponent \
-component startproduct stopproduct product startproject \
-stopproject project starttext stoptext startnotext \
-stopnotext startdocument stopdocument documentvariable unexpandeddocumentvariable \
-setupdocument presetdocument doifelsedocumentvariable doifdocumentvariableelse doifdocumentvariable \
-doifnotdocumentvariable startmodule stopmodule usemodule usetexmodule \
-useluamodule setupmodule currentmoduleparameter moduleparameter everystarttext \
-everystoptext startTEXpage stopTEXpage enablemode disablemode \
-preventmode definemode globalenablemode globaldisablemode globalpreventmode \
-pushmode popmode typescriptone typescripttwo typescriptthree \
-mathsizesuffix mathordinarycode mathordcode mathoperatorcode mathopcode \
-mathbinarycode mathbincode mathrelationcode mathrelcode mathopencode \
-mathclosecode mathpunctuationcode mathpunctcode mathovercode mathundercode \
-mathinnercode mathradicalcode mathfractioncode mathmiddlecode mathaccentcode \
-mathfencedcode mathghostcode mathvariablecode mathactivecode mathvcentercode \
-mathconstructcode mathwrappedcode mathbegincode mathendcode mathexplicitcode \
-mathdivisioncode mathfactorialcode mathdimensioncode mathexperimentalcode mathtextpunctuationcode \
-mathimaginarycode mathdifferentialcode mathexponentialcode mathellipsiscode mathfunctioncode \
-mathdigitcode mathalphacode mathboxcode mathchoicecode mathnothingcode \
-mathlimopcode mathnolopcode mathunsetcode mathunspacedcode mathallcode \
-mathfakecode mathunarycode mathmaybeordinarycode mathmayberelationcode mathmaybebinarycode \
-mathnumbergroupcode constantnumber constantnumberargument constantdimen constantdimenargument \
-constantemptyargument luastringsep !!bs !!es lefttorightmark \
-righttoleftmark lrm rlm bidilre bidirle \
-bidipop bidilro bidirlo breakablethinspace nobreakspace \
-nonbreakablespace narrownobreakspace zerowidthnobreakspace ideographicspace ideographichalffillspace \
-twoperemspace threeperemspace fourperemspace fiveperemspace sixperemspace \
-figurespace punctuationspace hairspace enquad emquad \
-zerowidthspace zerowidthnonjoiner zerowidthjoiner zwnj zwj \
-optionalspace asciispacechar softhyphen autoinsertedspace Ux \
-eUx parfillleftskip parfillrightskip startlmtxmode stoplmtxmode \
-startmkivmode stopmkivmode wildcardsymbol normalhyphenationcode automatichyphenationcode \
-explicithyphenationcode syllablehyphenationcode uppercasehyphenationcode collapsehyphenationcode compoundhyphenationcode \
-strictstarthyphenationcode strictendhyphenationcode automaticpenaltyhyphenationcode explicitpenaltyhyphenationcode permitgluehyphenationcode \
-permitallhyphenationcode permitmathreplacehyphenationcode forcecheckhyphenationcode lazyligatureshyphenationcode forcehandlerhyphenationcode \
-feedbackcompoundhyphenationcode ignoreboundshyphenationcode partialhyphenationcode completehyphenationcode normalizelinenormalizecode \
-parindentskipnormalizecode swaphangindentnormalizecode swapparsshapenormalizecode breakafterdirnormalizecode removemarginkernsnormalizecode \
-clipwidthnormalizecode flattendiscretionariesnormalizecode discardzerotabskipsnormalizecode flattenhleadersnormalizecode normalizeparnormalizeparcode \
-flattenvleadersnormalizeparcode nopreslackclassoptioncode nopostslackclassoptioncode lefttopkernclassoptioncode righttopkernclassoptioncode \
-leftbottomkernclassoptioncode rightbottomkernclassoptioncode lookaheadforendclassoptioncode noitaliccorrectionclassoptioncode defaultmathclassoptions \
-checkligatureclassoptioncode checkitaliccorrectionclassoptioncode checkkernpairclassoptioncode flattenclassoptioncode omitpenaltyclassoptioncode \
-unpackclassoptioncode raiseprimeclassoptioncode carryoverlefttopkernclassoptioncode carryoverleftbottomkernclassoptioncode carryoverrighttopkernclassoptioncode \
-carryoverrightbottomkernclassoptioncode preferdelimiterdimensionsclassoptioncode autoinjectclassoptioncode removeitaliccorrectionclassoptioncode operatoritaliccorrectionclassoptioncode \
-noligaturingglyphoptioncode nokerningglyphoptioncode noleftligatureglyphoptioncode noleftkernglyphoptioncode norightligatureglyphoptioncode \
-norightkernglyphoptioncode noexpansionglyphoptioncode noprotrusionglyphoptioncode noitaliccorrectionglyphoptioncode nokerningcode \
-noligaturingcode frozenflagcode tolerantflagcode protectedflagcode primitiveflagcode \
-permanentflagcode noalignedflagcode immutableflagcode mutableflagcode globalflagcode \
-overloadedflagcode immediateflagcode conditionalflagcode valueflagcode instanceflagcode \
-ordmathflattencode binmathflattencode relmathflattencode punctmathflattencode innermathflattencode \
-normalworddiscoptioncode preworddiscoptioncode postworddiscoptioncode continueifinputfile continuewhenlmtxmode \
-continuewhenmkivmode
+component startlocalcomponent stoplocalcomponent startproduct stopproduct \
+product startproject stopproject project starttext \
+stoptext startnotext stopnotext startdocument stopdocument \
+documentvariable unexpandeddocumentvariable setupdocument presetdocument doifelsedocumentvariable \
+doifdocumentvariableelse doifdocumentvariable doifnotdocumentvariable startmodule stopmodule \
+usemodule usetexmodule useluamodule setupmodule currentmoduleparameter \
+moduleparameter everystarttext everystoptext startTEXpage stopTEXpage \
+enablemode disablemode preventmode definemode globalenablemode \
+globaldisablemode globalpreventmode pushmode popmode typescriptone \
+typescripttwo typescriptthree mathsizesuffix mathordinarycode mathordcode \
+mathoperatorcode mathopcode mathbinarycode mathbincode mathrelationcode \
+mathrelcode mathopencode mathclosecode mathpunctuationcode mathpunctcode \
+mathovercode mathundercode mathinnercode mathradicalcode mathfractioncode \
+mathmiddlecode mathaccentcode mathfencedcode mathghostcode mathvariablecode \
+mathactivecode mathvcentercode mathconstructcode mathwrappedcode mathbegincode \
+mathendcode mathexplicitcode mathdivisioncode mathfactorialcode mathdimensioncode \
+mathexperimentalcode mathtextpunctuationcode mathimaginarycode mathdifferentialcode mathexponentialcode \
+mathellipsiscode mathfunctioncode mathdigitcode mathalphacode mathboxcode \
+mathchoicecode mathnothingcode mathlimopcode mathnolopcode mathunsetcode \
+mathunspacedcode mathallcode mathfakecode mathunarycode mathmaybeordinarycode \
+mathmayberelationcode mathmaybebinarycode mathnumbergroupcode constantnumber constantnumberargument \
+constantdimen constantdimenargument constantemptyargument luastringsep !!bs \
+!!es lefttorightmark righttoleftmark lrm rlm \
+bidilre bidirle bidipop bidilro bidirlo \
+breakablethinspace nobreakspace nonbreakablespace narrownobreakspace zerowidthnobreakspace \
+ideographicspace ideographichalffillspace twoperemspace threeperemspace fourperemspace \
+fiveperemspace sixperemspace figurespace punctuationspace hairspace \
+enquad emquad zerowidthspace zerowidthnonjoiner zerowidthjoiner \
+zwnj zwj optionalspace asciispacechar softhyphen \
+autoinsertedspace Ux eUx parfillleftskip parfillrightskip \
+startlmtxmode stoplmtxmode startmkivmode stopmkivmode wildcardsymbol \
+normalhyphenationcode automatichyphenationcode explicithyphenationcode syllablehyphenationcode uppercasehyphenationcode \
+collapsehyphenationcode compoundhyphenationcode strictstarthyphenationcode strictendhyphenationcode automaticpenaltyhyphenationcode \
+explicitpenaltyhyphenationcode permitgluehyphenationcode permitallhyphenationcode permitmathreplacehyphenationcode forcecheckhyphenationcode \
+lazyligatureshyphenationcode forcehandlerhyphenationcode feedbackcompoundhyphenationcode ignoreboundshyphenationcode partialhyphenationcode \
+completehyphenationcode normalizelinenormalizecode parindentskipnormalizecode swaphangindentnormalizecode swapparsshapenormalizecode \
+breakafterdirnormalizecode removemarginkernsnormalizecode clipwidthnormalizecode flattendiscretionariesnormalizecode discardzerotabskipsnormalizecode \
+flattenhleadersnormalizecode normalizeparnormalizeparcode flattenvleadersnormalizeparcode nopreslackclassoptioncode nopostslackclassoptioncode \
+lefttopkernclassoptioncode righttopkernclassoptioncode leftbottomkernclassoptioncode rightbottomkernclassoptioncode lookaheadforendclassoptioncode \
+noitaliccorrectionclassoptioncode defaultmathclassoptions checkligatureclassoptioncode checkitaliccorrectionclassoptioncode checkkernpairclassoptioncode \
+flattenclassoptioncode omitpenaltyclassoptioncode unpackclassoptioncode raiseprimeclassoptioncode carryoverlefttopkernclassoptioncode \
+carryoverleftbottomkernclassoptioncode carryoverrighttopkernclassoptioncode carryoverrightbottomkernclassoptioncode preferdelimiterdimensionsclassoptioncode autoinjectclassoptioncode \
+removeitaliccorrectionclassoptioncode operatoritaliccorrectionclassoptioncode noligaturingglyphoptioncode nokerningglyphoptioncode noleftligatureglyphoptioncode \
+noleftkernglyphoptioncode norightligatureglyphoptioncode norightkernglyphoptioncode noexpansionglyphoptioncode noprotrusionglyphoptioncode \
+noitaliccorrectionglyphoptioncode nokerningcode noligaturingcode frozenflagcode tolerantflagcode \
+protectedflagcode primitiveflagcode permanentflagcode noalignedflagcode immutableflagcode \
+mutableflagcode globalflagcode overloadedflagcode immediateflagcode conditionalflagcode \
+valueflagcode instanceflagcode ordmathflattencode binmathflattencode relmathflattencode \
+punctmathflattencode innermathflattencode normalworddiscoptioncode preworddiscoptioncode postworddiscoptioncode \
+continueifinputfile continuewhenlmtxmode continuewhenmkivmode
keywordclass.context.helpers=\
startsetups stopsetups startxmlsetups stopxmlsetups \
@@ -134,184 +134,184 @@
pushsystemmode popsystemmode globalsetmode globalresetmode globalsetsystemmode \
globalresetsystemmode booleanmodevalue newcount newdimen newskip \
newmuskip newbox newtoks newread newwrite \
-newmarks newinsert newattribute newif newlanguage \
-newfamily newfam newhelp newinteger newdimension \
-newgluespec newmugluespec aliasinteger aliasdimension then \
-begcsname autorule strippedcsname checkedstrippedcsname nofarguments \
-firstargumentfalse firstargumenttrue secondargumentfalse secondargumenttrue thirdargumentfalse \
-thirdargumenttrue fourthargumentfalse fourthargumenttrue fifthargumentfalse fifthargumenttrue \
-sixthargumentfalse sixthargumenttrue seventhargumentfalse seventhargumenttrue vkern \
-hkern vpenalty hpenalty doglobal dodoglobal \
-redoglobal resetglobal donothing untraceddonothing dontcomplain \
-moreboxtracing lessboxtracing noboxtracing forgetall donetrue \
-donefalse foundtrue foundfalse inlineordisplaymath indisplaymath \
-forcedisplaymath startforceddisplaymath stopforceddisplaymath startpickupmath stoppickupmath \
-reqno forceinlinemath mathortext thebox htdp \
-unvoidbox hfilll vfilll mathbox mathlimop \
-mathnolop mathnothing mathalpha currentcatcodetable defaultcatcodetable \
-catcodetablename newcatcodetable startcatcodetable stopcatcodetable startextendcatcodetable \
-stopextendcatcodetable pushcatcodetable popcatcodetable restorecatcodes setcatcodetable \
-letcatcodecommand defcatcodecommand uedcatcodecommand hglue vglue \
-hfillneg vfillneg hfilllneg vfilllneg hsplit \
-ruledhss ruledhfil ruledhfill ruledhfilll ruledhfilneg \
-ruledhfillneg normalhfillneg normalhfilllneg ruledvss ruledvfil \
-ruledvfill ruledvfilll ruledvfilneg ruledvfillneg normalvfillneg \
-normalvfilllneg ruledhbox ruledvbox ruledvtop ruleddbox \
-ruledvcenter ruledmbox ruledhpack ruledvpack ruledtpack \
-ruleddpack ruledvsplit ruledtsplit ruleddsplit ruledhskip \
-ruledvskip ruledkern ruledmskip ruledmkern ruledhglue \
-ruledvglue normalhglue normalvglue ruledpenalty filledhboxb \
-filledhboxr filledhboxg filledhboxc filledhboxm filledhboxy \
-filledhboxk scratchstring scratchstringone scratchstringtwo tempstring \
-scratchcounter globalscratchcounter privatescratchcounter scratchdimen globalscratchdimen \
-privatescratchdimen scratchskip globalscratchskip privatescratchskip scratchmuskip \
-globalscratchmuskip privatescratchmuskip scratchtoks globalscratchtoks privatescratchtoks \
-scratchbox globalscratchbox privatescratchbox scratchmacro scratchmacroone \
-scratchmacrotwo scratchconditiontrue scratchconditionfalse ifscratchcondition scratchconditiononetrue \
-scratchconditiononefalse ifscratchconditionone scratchconditiontwotrue scratchconditiontwofalse ifscratchconditiontwo \
-globalscratchcounterone globalscratchcountertwo globalscratchcounterthree groupedcommand groupedcommandcs \
-triggergroupedcommand triggergroupedcommandcs simplegroupedcommand simplegroupedcommandcs pickupgroupedcommand \
-pickupgroupedcommandcs mathgroupedcommandcs usedbaselineskip usedlineskip usedlineskiplimit \
-availablehsize localhsize setlocalhsize distributedhsize hsizefraction \
-next nexttoken nextbox dowithnextbox dowithnextboxcs \
-dowithnextboxcontent dowithnextboxcontentcs flushnextbox boxisempty boxtostring \
-contentostring prerolltostring givenwidth givenheight givendepth \
-scangivendimensions scratchwidth scratchheight scratchdepth scratchoffset \
-scratchdistance scratchtotal scratchitalic scratchhsize scratchvsize \
-scratchxoffset scratchyoffset scratchhoffset scratchvoffset scratchxposition \
-scratchyposition scratchtopoffset scratchbottomoffset scratchleftoffset scratchrightoffset \
-scratchcounterone scratchcountertwo scratchcounterthree scratchcounterfour scratchcounterfive \
-scratchcountersix scratchdimenone scratchdimentwo scratchdimenthree scratchdimenfour \
-scratchdimenfive scratchdimensix scratchskipone scratchskiptwo scratchskipthree \
-scratchskipfour scratchskipfive scratchskipsix scratchmuskipone scratchmuskiptwo \
-scratchmuskipthree scratchmuskipfour scratchmuskipfive scratchmuskipsix scratchtoksone \
-scratchtokstwo scratchtoksthree scratchtoksfour scratchtoksfive scratchtokssix \
-scratchboxone scratchboxtwo scratchboxthree scratchboxfour scratchboxfive \
-scratchboxsix scratchnx scratchny scratchmx scratchmy \
-scratchunicode scratchmin scratchmax scratchleftskip scratchrightskip \
-scratchtopskip scratchbottomskip doif doifnot doifelse \
-firstinset doifinset doifnotinset doifelseinset doifinsetelse \
-doifelsenextchar doifnextcharelse doifelsenextcharcs doifnextcharcselse doifelsenextoptional \
-doifnextoptionalelse doifelsenextoptionalcs doifnextoptionalcselse doifelsefastoptionalcheck doiffastoptionalcheckelse \
-doifelsefastoptionalcheckcs doiffastoptionalcheckcselse doifelsenextbgroup doifnextbgroupelse doifelsenextbgroupcs \
-doifnextbgroupcselse doifelsenextparenthesis doifnextparenthesiselse doifelseundefined doifundefinedelse \
-doifelsedefined doifdefinedelse doifundefined doifdefined doifelsevalue \
-doifvalue doifnotvalue doifnothing doifsomething doifelsenothing \
-doifnothingelse doifelsesomething doifsomethingelse doifvaluenothing doifvaluesomething \
-doifelsevaluenothing doifvaluenothingelse doifelsedimension doifdimensionelse doifelsenumber \
-doifnumberelse doifnumber doifnotnumber doifelsecommon doifcommonelse \
-doifcommon doifnotcommon doifinstring doifnotinstring doifelseinstring \
-doifinstringelse doifelseassignment doifassignmentelse docheckassignment doifelseassignmentcs \
-doifassignmentelsecs validassignment novalidassignment doiftext doifelsetext \
-doiftextelse doifnottext quitcondition truecondition falsecondition \
-tracingall tracingnone loggingall tracingcatcodes showluatokens \
-aliasmacro removetoks appendtoks prependtoks appendtotoks \
-prependtotoks to endgraf endpar reseteverypar \
-finishpar empty null space quad \
-enspace emspace charspace nbsp crlf \
-obeyspaces obeylines obeytabs obeypages obeyedspace \
-obeyedline obeyedtab obeyedpage normalspace naturalspace \
-controlspace normalspaces ignoretabs ignorelines ignorepages \
-ignoreeofs setcontrolspaces executeifdefined singleexpandafter doubleexpandafter \
-tripleexpandafter dontleavehmode removelastspace removeunwantedspaces keepunwantedspaces \
-removepunctuation ignoreparskip forcestrutdepth onlynonbreakablespace wait \
-writestatus define defineexpandable redefine setmeasure \
-setemeasure setgmeasure setxmeasure definemeasure freezemeasure \
-measure measured directmeasure setquantity setequantity \
-setgquantity setxquantity definequantity freezequantity quantity \
-quantitied directquantity installcorenamespace getvalue getuvalue \
-setvalue setevalue setgvalue setxvalue letvalue \
-letgvalue resetvalue undefinevalue ignorevalue setuvalue \
-setuevalue setugvalue setuxvalue globallet udef \
-ugdef uedef uxdef checked unique \
-getparameters geteparameters getgparameters getxparameters forgetparameters \
-copyparameters getdummyparameters dummyparameter directdummyparameter setdummyparameter \
-letdummyparameter setexpandeddummyparameter resetdummyparameter usedummystyleandcolor usedummystyleparameter \
-usedummycolorparameter processcommalist processcommacommand quitcommalist quitprevcommalist \
-processaction processallactions processfirstactioninset processallactionsinset unexpanded \
-expanded startexpanded stopexpanded protect unprotect \
-firstofoneargument firstoftwoarguments secondoftwoarguments firstofthreearguments secondofthreearguments \
-thirdofthreearguments firstoffourarguments secondoffourarguments thirdoffourarguments fourthoffourarguments \
-firstoffivearguments secondoffivearguments thirdoffivearguments fourthoffivearguments fifthoffivearguments \
-firstofsixarguments secondofsixarguments thirdofsixarguments fourthofsixarguments fifthofsixarguments \
-sixthofsixarguments firstofoneunexpanded firstoftwounexpanded secondoftwounexpanded firstofthreeunexpanded \
-secondofthreeunexpanded thirdofthreeunexpanded gobbleoneargument gobbletwoarguments gobblethreearguments \
-gobblefourarguments gobblefivearguments gobblesixarguments gobblesevenarguments gobbleeightarguments \
-gobbleninearguments gobbletenarguments gobbleoneoptional gobbletwooptionals gobblethreeoptionals \
-gobblefouroptionals gobblefiveoptionals dorecurse doloop exitloop \
-dostepwiserecurse recurselevel recursedepth dofastloopcs fastloopindex \
-fastloopfinal dowith doloopovermatch doloopovermatched doloopoverlist \
-newconstant setnewconstant setconstant setconstantvalue newconditional \
-settrue setfalse settruevalue setfalsevalue setconditional \
-newmacro setnewmacro newfraction newsignal newboundary \
-dosingleempty dodoubleempty dotripleempty doquadrupleempty doquintupleempty \
-dosixtupleempty doseventupleempty dosingleargument dodoubleargument dotripleargument \
-doquadrupleargument doquintupleargument dosixtupleargument doseventupleargument dosinglegroupempty \
-dodoublegroupempty dotriplegroupempty doquadruplegroupempty doquintuplegroupempty permitspacesbetweengroups \
-dontpermitspacesbetweengroups nopdfcompression maximumpdfcompression normalpdfcompression onlypdfobjectcompression \
-nopdfobjectcompression modulonumber dividenumber getfirstcharacter doifelsefirstchar \
-doiffirstcharelse mathclassvalue startnointerference stopnointerference twodigits \
-threedigits leftorright offinterlineskip oninterlineskip nointerlineskip \
-strut halfstrut quarterstrut depthstrut halflinestrut \
-noheightstrut setstrut strutbox strutht strutdp \
-strutwd struthtdp strutgap begstrut endstrut \
-lineheight leftboundary rightboundary signalcharacter aligncontentleft \
-aligncontentmiddle aligncontentright shiftbox vpackbox hpackbox \
-vpackedbox hpackedbox normalreqno startimath stopimath \
-normalstartimath normalstopimath startdmath stopdmath normalstartdmath \
-normalstopdmath normalsuperscript normalsubscript normalnosuperscript normalnosubscript \
-normalprimescript superscript subscript nosuperscript nosubscript \
-primescript superprescript subprescript nosuperprescript nosubsprecript \
-uncramped cramped mathstyletrigger triggermathstyle triggeredmathstyle \
-mathstylefont mathsmallstylefont mathstyleface mathsmallstyleface mathstylecommand \
-mathpalette mathstylehbox mathstylevbox mathstylevcenter mathstylevcenteredhbox \
-mathstylevcenteredvbox mathtext setmathsmalltextbox setmathtextbox pushmathstyle \
-popmathstyle triggerdisplaystyle triggertextstyle triggerscriptstyle triggerscriptscriptstyle \
-triggeruncrampedstyle triggercrampedstyle triggersmallstyle triggeruncrampedsmallstyle triggercrampedsmallstyle \
-triggerbigstyle triggeruncrampedbigstyle triggercrampedbigstyle luaexpr expelsedoif \
-expdoif expdoifnot expdoifelsecommon expdoifcommonelse expdoifelseinset \
-expdoifinsetelse ctxdirectlua ctxlatelua ctxsprint ctxwrite \
-ctxcommand ctxdirectcommand ctxlatecommand ctxreport ctxlua \
-luacode lateluacode directluacode registerctxluafile ctxloadluafile \
-luaversion luamajorversion luaminorversion ctxluacode luaconditional \
-luaexpanded ctxluamatch startluaparameterset stopluaparameterset luaparameterset \
-definenamedlua obeylualines obeyluatokens startluacode stopluacode \
-startlua stoplua startctxfunction stopctxfunction ctxfunction \
-startctxfunctiondefinition stopctxfunctiondefinition installctxfunction installprotectedctxfunction installprotectedctxscanner \
-installctxscanner resetctxscanner cldprocessfile cldloadfile cldloadviafile \
-cldcontext cldcommand carryoverpar freezeparagraphproperties defrostparagraphproperties \
-setparagraphfreezing forgetparagraphfreezing updateparagraphproperties updateparagraphpenalties updateparagraphdemerits \
-updateparagraphshapes updateparagraphlines lastlinewidth assumelongusagecs righttolefthbox \
-lefttorighthbox righttoleftvbox lefttorightvbox righttoleftvtop lefttorightvtop \
-rtlhbox ltrhbox rtlvbox ltrvbox rtlvtop \
-ltrvtop autodirhbox autodirvbox autodirvtop leftorrighthbox \
-leftorrightvbox leftorrightvtop lefttoright righttoleft checkedlefttoright \
-checkedrighttoleft synchronizelayoutdirection synchronizedisplaydirection synchronizeinlinedirection dirlre \
-dirrle dirlro dirrlo rtltext ltrtext \
-lesshyphens morehyphens nohyphens dohyphens dohyphencollapsing \
-nohyphencollapsing compounddiscretionary Ucheckedstartdisplaymath Ucheckedstopdisplaymath break \
-nobreak allowbreak goodbreak nospace nospacing \
-dospacing naturalhbox naturalvbox naturalvtop naturalhpack \
-naturalvpack naturaltpack reversehbox reversevbox reversevtop \
-reversehpack reversevpack reversetpack hcontainer vcontainer \
-tcontainer frule compoundhyphenpenalty start stop \
-unsupportedcs openout closeout write openin \
-closein read readline readfromterminal boxlines \
-boxline setboxline copyboxline boxlinewd boxlineht \
-boxlinedp boxlinenw boxlinenh boxlinend boxlinels \
-boxliners boxlinelh boxlinerh boxlinelp boxlinerp \
-boxlinein boxrangewd boxrangeht boxrangedp bitwiseset \
-bitwiseand bitwiseor bitwisexor bitwisenot bitwisenil \
-ifbitwiseand bitwise bitwiseshift bitwiseflip textdir \
-linedir pardir boxdir prelistbox postlistbox \
-prelistcopy postlistcopy setprelistbox setpostlistbox noligaturing \
-nokerning noexpansion noprotrusion noleftkerning noleftligaturing \
-norightkerning norightligaturing noitaliccorrection futureletnexttoken defbackslashbreak \
-letbackslashbreak pushoverloadmode popoverloadmode pushrunstate poprunstate \
-suggestedalias showboxhere discoptioncodestring flagcodestring frozenparcodestring \
-glyphoptioncodestring groupcodestring hyphenationcodestring mathcontrolcodestring mathflattencodestring \
-normalizecodestring parcontextcodestring newlocalcount newlocaldimen newlocalskip \
-newlocalmuskip newlocaltoks newlocalbox newlocalwrite newlocalread \
-setnewlocalcount setnewlocaldimen setnewlocalskip setnewlocalmuskip setnewlocaltoks \
-setnewlocalbox ifexpression
+newmarks newinsert newattribute newif newfloat \
+newlanguage newfamily newfam newhelp newinteger \
+newdimension newgluespec newmugluespec newposit aliasinteger \
+aliasdimension aliasposit then begcsname autorule \
+strippedcsname checkedstrippedcsname nofarguments firstargumentfalse firstargumenttrue \
+secondargumentfalse secondargumenttrue thirdargumentfalse thirdargumenttrue fourthargumentfalse \
+fourthargumenttrue fifthargumentfalse fifthargumenttrue sixthargumentfalse sixthargumenttrue \
+seventhargumentfalse seventhargumenttrue vkern hkern vpenalty \
+hpenalty doglobal dodoglobal redoglobal resetglobal \
+donothing untraceddonothing dontcomplain moreboxtracing lessboxtracing \
+noboxtracing forgetall donetrue donefalse foundtrue \
+foundfalse inlineordisplaymath indisplaymath forcedisplaymath startforceddisplaymath \
+stopforceddisplaymath startpickupmath stoppickupmath reqno forceinlinemath \
+mathortext thebox htdp unvoidbox hfilll \
+vfilll mathbox mathlimop mathnolop mathnothing \
+mathalpha currentcatcodetable defaultcatcodetable catcodetablename newcatcodetable \
+startcatcodetable stopcatcodetable startextendcatcodetable stopextendcatcodetable pushcatcodetable \
+popcatcodetable restorecatcodes setcatcodetable letcatcodecommand defcatcodecommand \
+uedcatcodecommand hglue vglue hfillneg vfillneg \
+hfilllneg vfilllneg hsplit ruledhss ruledhfil \
+ruledhfill ruledhfilll ruledhfilneg ruledhfillneg normalhfillneg \
+normalhfilllneg ruledvss ruledvfil ruledvfill ruledvfilll \
+ruledvfilneg ruledvfillneg normalvfillneg normalvfilllneg ruledhbox \
+ruledvbox ruledvtop ruleddbox ruledvcenter ruledmbox \
+ruledhpack ruledvpack ruledtpack ruleddpack ruledvsplit \
+ruledtsplit ruleddsplit ruledhskip ruledvskip ruledkern \
+ruledmskip ruledmkern ruledhglue ruledvglue normalhglue \
+normalvglue ruledpenalty filledhboxb filledhboxr filledhboxg \
+filledhboxc filledhboxm filledhboxy filledhboxk scratchstring \
+scratchstringone scratchstringtwo tempstring scratchcounter globalscratchcounter \
+privatescratchcounter scratchdimen globalscratchdimen privatescratchdimen scratchskip \
+globalscratchskip privatescratchskip scratchmuskip globalscratchmuskip privatescratchmuskip \
+scratchtoks globalscratchtoks privatescratchtoks scratchbox globalscratchbox \
+privatescratchbox scratchmacro scratchmacroone scratchmacrotwo scratchconditiontrue \
+scratchconditionfalse ifscratchcondition scratchconditiononetrue scratchconditiononefalse ifscratchconditionone \
+scratchconditiontwotrue scratchconditiontwofalse ifscratchconditiontwo globalscratchcounterone globalscratchcountertwo \
+globalscratchcounterthree groupedcommand groupedcommandcs triggergroupedcommand triggergroupedcommandcs \
+simplegroupedcommand simplegroupedcommandcs pickupgroupedcommand pickupgroupedcommandcs mathgroupedcommandcs \
+usedbaselineskip usedlineskip usedlineskiplimit availablehsize localhsize \
+setlocalhsize distributedhsize hsizefraction next nexttoken \
+nextbox dowithnextbox dowithnextboxcs dowithnextboxcontent dowithnextboxcontentcs \
+flushnextbox boxisempty boxtostring contentostring prerolltostring \
+givenwidth givenheight givendepth scangivendimensions scratchwidth \
+scratchheight scratchdepth scratchoffset scratchdistance scratchtotal \
+scratchitalic scratchhsize scratchvsize scratchxoffset scratchyoffset \
+scratchhoffset scratchvoffset scratchxposition scratchyposition scratchtopoffset \
+scratchbottomoffset scratchleftoffset scratchrightoffset scratchcounterone scratchcountertwo \
+scratchcounterthree scratchcounterfour scratchcounterfive scratchcountersix scratchdimenone \
+scratchdimentwo scratchdimenthree scratchdimenfour scratchdimenfive scratchdimensix \
+scratchskipone scratchskiptwo scratchskipthree scratchskipfour scratchskipfive \
+scratchskipsix scratchmuskipone scratchmuskiptwo scratchmuskipthree scratchmuskipfour \
+scratchmuskipfive scratchmuskipsix scratchtoksone scratchtokstwo scratchtoksthree \
+scratchtoksfour scratchtoksfive scratchtokssix scratchboxone scratchboxtwo \
+scratchboxthree scratchboxfour scratchboxfive scratchboxsix scratchnx \
+scratchny scratchmx scratchmy scratchunicode scratchmin \
+scratchmax scratchleftskip scratchrightskip scratchtopskip scratchbottomskip \
+doif doifnot doifelse firstinset doifinset \
+doifnotinset doifelseinset doifinsetelse doifelsenextchar doifnextcharelse \
+doifelsenextcharcs doifnextcharcselse doifelsenextoptional doifnextoptionalelse doifelsenextoptionalcs \
+doifnextoptionalcselse doifelsefastoptionalcheck doiffastoptionalcheckelse doifelsefastoptionalcheckcs doiffastoptionalcheckcselse \
+doifelsenextbgroup doifnextbgroupelse doifelsenextbgroupcs doifnextbgroupcselse doifelsenextparenthesis \
+doifnextparenthesiselse doifelseundefined doifundefinedelse doifelsedefined doifdefinedelse \
+doifundefined doifdefined doifelsevalue doifvalue doifnotvalue \
+doifnothing doifsomething doifelsenothing doifnothingelse doifelsesomething \
+doifsomethingelse doifvaluenothing doifvaluesomething doifelsevaluenothing doifvaluenothingelse \
+doifelsedimension doifdimensionelse doifelsenumber doifnumberelse doifnumber \
+doifnotnumber doifelsecommon doifcommonelse doifcommon doifnotcommon \
+doifinstring doifnotinstring doifelseinstring doifinstringelse doifelseassignment \
+doifassignmentelse docheckassignment doifelseassignmentcs doifassignmentelsecs validassignment \
+novalidassignment doiftext doifelsetext doiftextelse doifnottext \
+quitcondition truecondition falsecondition tracingall tracingnone \
+loggingall tracingcatcodes showluatokens aliasmacro removetoks \
+appendtoks prependtoks appendtotoks prependtotoks to \
+endgraf endpar reseteverypar finishpar empty \
+null space quad enspace emspace \
+charspace nbsp crlf obeyspaces obeylines \
+obeytabs obeypages obeyedspace obeyedline obeyedtab \
+obeyedpage normalspace naturalspace controlspace normalspaces \
+ignoretabs ignorelines ignorepages ignoreeofs setcontrolspaces \
+executeifdefined singleexpandafter doubleexpandafter tripleexpandafter dontleavehmode \
+removelastspace removeunwantedspaces keepunwantedspaces removepunctuation ignoreparskip \
+forcestrutdepth onlynonbreakablespace wait writestatus define \
+defineexpandable redefine setmeasure setemeasure setgmeasure \
+setxmeasure definemeasure freezemeasure measure measured \
+directmeasure setquantity setequantity setgquantity setxquantity \
+definequantity freezequantity quantity quantitied directquantity \
+installcorenamespace getvalue getuvalue setvalue setevalue \
+setgvalue setxvalue letvalue letgvalue resetvalue \
+undefinevalue ignorevalue setuvalue setuevalue setugvalue \
+setuxvalue globallet udef ugdef uedef \
+uxdef checked unique getparameters geteparameters \
+getgparameters getxparameters forgetparameters copyparameters getdummyparameters \
+dummyparameter directdummyparameter setdummyparameter letdummyparameter setexpandeddummyparameter \
+resetdummyparameter usedummystyleandcolor usedummystyleparameter usedummycolorparameter processcommalist \
+processcommacommand quitcommalist quitprevcommalist processaction processallactions \
+processfirstactioninset processallactionsinset unexpanded expanded startexpanded \
+stopexpanded protect unprotect firstofoneargument firstoftwoarguments \
+secondoftwoarguments firstofthreearguments secondofthreearguments thirdofthreearguments firstoffourarguments \
+secondoffourarguments thirdoffourarguments fourthoffourarguments firstoffivearguments secondoffivearguments \
+thirdoffivearguments fourthoffivearguments fifthoffivearguments firstofsixarguments secondofsixarguments \
+thirdofsixarguments fourthofsixarguments fifthofsixarguments sixthofsixarguments firstofoneunexpanded \
+firstoftwounexpanded secondoftwounexpanded firstofthreeunexpanded secondofthreeunexpanded thirdofthreeunexpanded \
+gobbleoneargument gobbletwoarguments gobblethreearguments gobblefourarguments gobblefivearguments \
+gobblesixarguments gobblesevenarguments gobbleeightarguments gobbleninearguments gobbletenarguments \
+gobbleoneoptional gobbletwooptionals gobblethreeoptionals gobblefouroptionals gobblefiveoptionals \
+dorecurse doloop exitloop dostepwiserecurse recurselevel \
+recursedepth dofastloopcs fastloopindex fastloopfinal dowith \
+doloopovermatch doloopovermatched doloopoverlist newconstant setnewconstant \
+setconstant setconstantvalue newconditional settrue setfalse \
+settruevalue setfalsevalue setconditional newmacro setnewmacro \
+newfraction newsignal newboundary dosingleempty dodoubleempty \
+dotripleempty doquadrupleempty doquintupleempty dosixtupleempty doseventupleempty \
+dosingleargument dodoubleargument dotripleargument doquadrupleargument doquintupleargument \
+dosixtupleargument doseventupleargument dosinglegroupempty dodoublegroupempty dotriplegroupempty \
+doquadruplegroupempty doquintuplegroupempty permitspacesbetweengroups dontpermitspacesbetweengroups nopdfcompression \
+maximumpdfcompression normalpdfcompression onlypdfobjectcompression nopdfobjectcompression modulonumber \
+dividenumber getfirstcharacter doifelsefirstchar doiffirstcharelse mathclassvalue \
+startnointerference stopnointerference twodigits threedigits leftorright \
+offinterlineskip oninterlineskip nointerlineskip strut halfstrut \
+quarterstrut depthstrut halflinestrut noheightstrut setstrut \
+strutbox strutht strutdp strutwd struthtdp \
+strutgap begstrut endstrut lineheight leftboundary \
+rightboundary signalcharacter aligncontentleft aligncontentmiddle aligncontentright \
+shiftbox vpackbox hpackbox vpackedbox hpackedbox \
+normalreqno startimath stopimath normalstartimath normalstopimath \
+startdmath stopdmath normalstartdmath normalstopdmath normalsuperscript \
+normalsubscript normalnosuperscript normalnosubscript normalprimescript superscript \
+subscript nosuperscript nosubscript primescript superprescript \
+subprescript nosuperprescript nosubsprecript uncramped cramped \
+mathstyletrigger triggermathstyle triggeredmathstyle mathstylefont mathsmallstylefont \
+mathstyleface mathsmallstyleface mathstylecommand mathpalette mathstylehbox \
+mathstylevbox mathstylevcenter mathstylevcenteredhbox mathstylevcenteredvbox mathtext \
+setmathsmalltextbox setmathtextbox pushmathstyle popmathstyle triggerdisplaystyle \
+triggertextstyle triggerscriptstyle triggerscriptscriptstyle triggeruncrampedstyle triggercrampedstyle \
+triggersmallstyle triggeruncrampedsmallstyle triggercrampedsmallstyle triggerbigstyle triggeruncrampedbigstyle \
+triggercrampedbigstyle luaexpr expelsedoif expdoif expdoifnot \
+expdoifelsecommon expdoifcommonelse expdoifelseinset expdoifinsetelse ctxdirectlua \
+ctxlatelua ctxsprint ctxwrite ctxcommand ctxdirectcommand \
+ctxlatecommand ctxreport ctxlua luacode lateluacode \
+directluacode registerctxluafile ctxloadluafile luaversion luamajorversion \
+luaminorversion ctxluacode luaconditional luaexpanded ctxluamatch \
+startluaparameterset stopluaparameterset luaparameterset definenamedlua obeylualines \
+obeyluatokens startluacode stopluacode startlua stoplua \
+startctxfunction stopctxfunction ctxfunction startctxfunctiondefinition stopctxfunctiondefinition \
+installctxfunction installprotectedctxfunction installprotectedctxscanner installctxscanner resetctxscanner \
+cldprocessfile cldloadfile cldloadviafile cldcontext cldcommand \
+carryoverpar freezeparagraphproperties defrostparagraphproperties setparagraphfreezing forgetparagraphfreezing \
+updateparagraphproperties updateparagraphpenalties updateparagraphdemerits updateparagraphshapes updateparagraphlines \
+lastlinewidth assumelongusagecs righttolefthbox lefttorighthbox righttoleftvbox \
+lefttorightvbox righttoleftvtop lefttorightvtop rtlhbox ltrhbox \
+rtlvbox ltrvbox rtlvtop ltrvtop autodirhbox \
+autodirvbox autodirvtop leftorrighthbox leftorrightvbox leftorrightvtop \
+lefttoright righttoleft checkedlefttoright checkedrighttoleft synchronizelayoutdirection \
+synchronizedisplaydirection synchronizeinlinedirection dirlre dirrle dirlro \
+dirrlo rtltext ltrtext lesshyphens morehyphens \
+nohyphens dohyphens dohyphencollapsing nohyphencollapsing compounddiscretionary \
+Ucheckedstartdisplaymath Ucheckedstopdisplaymath break nobreak allowbreak \
+goodbreak nospace nospacing dospacing naturalhbox \
+naturalvbox naturalvtop naturalhpack naturalvpack naturaltpack \
+reversehbox reversevbox reversevtop reversehpack reversevpack \
+reversetpack hcontainer vcontainer tcontainer frule \
+compoundhyphenpenalty start stop unsupportedcs openout \
+closeout write openin closein read \
+readline readfromterminal boxlines boxline setboxline \
+copyboxline boxlinewd boxlineht boxlinedp boxlinenw \
+boxlinenh boxlinend boxlinels boxliners boxlinelh \
+boxlinerh boxlinelp boxlinerp boxlinein boxrangewd \
+boxrangeht boxrangedp bitwiseset bitwiseand bitwiseor \
+bitwisexor bitwisenot bitwisenil ifbitwiseand bitwise \
+bitwiseshift bitwiseflip textdir linedir pardir \
+boxdir prelistbox postlistbox prelistcopy postlistcopy \
+setprelistbox setpostlistbox noligaturing nokerning noexpansion \
+noprotrusion noleftkerning noleftligaturing norightkerning norightligaturing \
+noitaliccorrection futureletnexttoken defbackslashbreak letbackslashbreak pushoverloadmode \
+popoverloadmode pushrunstate poprunstate suggestedalias showboxhere \
+discoptioncodestring flagcodestring frozenparcodestring glyphoptioncodestring groupcodestring \
+hyphenationcodestring mathcontrolcodestring mathflattencodestring normalizecodestring parcontextcodestring \
+newlocalcount newlocaldimen newlocalskip newlocalmuskip newlocaltoks \
+newlocalbox newlocalwrite newlocalread setnewlocalcount setnewlocaldimen \
+setnewlocalskip setnewlocalmuskip setnewlocaltoks setnewlocalbox ifexpression
Modified: trunk/Master/texmf-dist/context/data/scite/context/scite-context-data-metapost.properties
===================================================================
--- trunk/Master/texmf-dist/context/data/scite/context/scite-context-data-metapost.properties 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/context/data/scite/context/scite-context-data-metapost.properties 2023-05-06 22:03:57 UTC (rev 67034)
@@ -28,11 +28,12 @@
bye red green blue cyan \
magenta yellow black white background \
mm pt dd bp cm \
-pc cc in dk triplet \
-quadruplet totransform bymatrix closedcurve closedlines \
-primitive permanent immutable mutable frozen \
-showproperty showhashentry top bot lft \
-rt ulft urt llft lrt
+pc cc in dk es \
+ts triplet quadruplet totransform bymatrix \
+closedcurve closedlines primitive permanent immutable \
+mutable frozen showproperty showhashentry top \
+bot lft rt ulft urt \
+llft lrt
keywordclass.metapost.disabled=\
verbatimtex troffmode
Modified: trunk/Master/texmf-dist/context/data/scite/context/scite-context-data-tex.properties
===================================================================
--- trunk/Master/texmf-dist/context/data/scite/context/scite-context-data-tex.properties 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/context/data/scite/context/scite-context-data-tex.properties 2023-05-06 22:03:57 UTC (rev 67034)
@@ -23,73 +23,75 @@
Umathaccentsuperscriptpercent Umathaccenttopovershoot Umathaccenttopshiftup Umathaccentvariant Umathadapttoleft \
Umathadapttoright Umathaxis Umathbottomaccentvariant Umathchar Umathcharclass \
Umathchardef Umathcharfam Umathcharslot Umathclass Umathcode \
-Umathconnectoroverlapmin Umathdegreevariant Umathdelimiterovervariant Umathdelimiterpercent Umathdelimitershortfall \
-Umathdelimiterundervariant Umathdenominatorvariant Umathdict Umathdictdef Umathdiscretionary \
-Umathextrasubpreshift Umathextrasubprespace Umathextrasubshift Umathextrasubspace Umathextrasuppreshift \
-Umathextrasupprespace Umathextrasupshift Umathextrasupspace Umathflattenedaccentbasedepth Umathflattenedaccentbaseheight \
-Umathflattenedaccentbottomshiftdown Umathflattenedaccenttopshiftup Umathfractiondelsize Umathfractiondenomdown Umathfractiondenomvgap \
-Umathfractionnumup Umathfractionnumvgap Umathfractionrule Umathfractionvariant Umathhextensiblevariant \
-Umathlimitabovebgap Umathlimitabovekern Umathlimitabovevgap Umathlimitbelowbgap Umathlimitbelowkern \
-Umathlimitbelowvgap Umathlimits Umathnoaxis Umathnolimits Umathnolimitsubfactor \
-Umathnolimitsupfactor Umathnumeratorvariant Umathopenupdepth Umathopenupheight Umathoperatorsize \
-Umathoverbarkern Umathoverbarrule Umathoverbarvgap Umathoverdelimiterbgap Umathoverdelimitervariant \
-Umathoverdelimitervgap Umathoverlayaccentvariant Umathoverlinevariant Umathphantom Umathpresubshiftdistance \
-Umathpresupshiftdistance Umathprimeraise Umathprimeraisecomposed Umathprimeshiftdrop Umathprimeshiftup \
-Umathprimespaceafter Umathprimevariant Umathprimewidth Umathquad Umathradicaldegreeafter \
-Umathradicaldegreebefore Umathradicaldegreeraise Umathradicalextensibleafter Umathradicalextensiblebefore Umathradicalkern \
-Umathradicalrule Umathradicalvariant Umathradicalvgap Umathruledepth Umathruleheight \
-Umathskeweddelimitertolerance Umathskewedfractionhgap Umathskewedfractionvgap Umathsource Umathspaceafterscript \
-Umathspacebeforescript Umathstackdenomdown Umathstacknumup Umathstackvariant Umathstackvgap \
-Umathsubscriptvariant Umathsubshiftdistance Umathsubshiftdown Umathsubshiftdrop Umathsubsupshiftdown \
-Umathsubsupvgap Umathsubtopmax Umathsupbottommin Umathsuperscriptvariant Umathsupshiftdistance \
-Umathsupshiftdrop Umathsupshiftup Umathsupsubbottommax Umathtopaccentvariant Umathunderbarkern \
-Umathunderbarrule Umathunderbarvgap Umathunderdelimiterbgap Umathunderdelimitervariant Umathunderdelimitervgap \
-Umathunderlinevariant Umathuseaxis Umathvextensiblevariant Umathvoid Umathxscale \
-Umathyscale Umiddle Unosubprescript Unosubscript Unosuperprescript \
-Unosuperscript Uoperator Uover Uoverdelimiter Uoverwithdelims \
-Uprimescript Uradical Uright Uroot Urooted \
-Ushiftedsubprescript Ushiftedsubscript Ushiftedsuperprescript Ushiftedsuperscript Uskewed \
-Uskewedwithdelims Ustack Ustartdisplaymath Ustartmath Ustartmathmode \
-Ustopdisplaymath Ustopmath Ustopmathmode Ustretched Ustretchedwithdelims \
-Ustyle Usubprescript Usubscript Usuperprescript Usuperscript \
-Uunderdelimiter Uvextensible adjustspacing adjustspacingshrink adjustspacingstep \
-adjustspacingstretch afterassigned aftergrouped aliased aligncontent \
-alignmark alignmentcellsource alignmentwrapsource aligntab allcrampedstyles \
-alldisplaystyles allmainstyles allmathstyles allscriptscriptstyles allscriptstyles \
-allsplitstyles alltextstyles alluncrampedstyles allunsplitstyles amcode \
-atendofgroup atendofgrouped attribute attributedef automaticdiscretionary \
-automatichyphenpenalty automigrationmode autoparagraphmode begincsname beginlocalcontrol \
-beginmathgroup beginsimplegroup boundary boxadapt boxanchor \
-boxanchors boxattribute boxdirection boxfreeze boxgeometry \
-boxorientation boxrepack boxshift boxsource boxtarget \
-boxtotal boxvadjust boxxmove boxxoffset boxymove \
-boxyoffset catcodetable cdef cdefcsname cfcode \
-clearmarks constant copymathatomrule copymathparent copymathspacing \
-crampeddisplaystyle crampedscriptscriptstyle crampedscriptstyle crampedtextstyle csactive \
-csstring currentloopiterator currentloopnesting currentmarks dbox \
-defcsname detokenized dimensiondef dimexpression directlua \
-dpack dsplit edefcsname efcode endlocalcontrol \
-endmathgroup endsimplegroup enforced etoks etoksapp \
-etokspre everybeforepar everymathatom everytab exceptionpenalty \
-expand expandactive expandafterpars expandafterspaces expandcstoken \
-expanded expandedafter expandedloop expandtoken explicitdiscretionary \
-explicithyphenpenalty firstvalidlanguage flushmarks fontcharta fontid \
-fontmathcontrol fontspecdef fontspecid fontspecifiedname fontspecifiedsize \
-fontspecscale fontspecxscale fontspecyscale fonttextcontrol formatname \
-frozen futurecsname futuredef futureexpand futureexpandis \
-futureexpandisap gdefcsname gleaders glet gletcsname \
-glettonothing gluespecdef glyph glyphdatafield glyphoptions \
-glyphscale glyphscriptfield glyphscriptscale glyphscriptscriptscale glyphstatefield \
-glyphtextscale glyphxoffset glyphxscale glyphxscaled glyphyoffset \
-glyphyscale glyphyscaled gtoksapp gtokspre hccode \
-hjcode hmcode holdingmigrations hpack hyphenationmin \
-hyphenationmode ifabsdim ifabsnum ifarguments ifboolean \
-ifchkdim ifchkdimension ifchknum ifchknumber ifcmpdim \
-ifcmpnum ifcondition ifcstok ifdimexpression ifdimval \
-ifempty ifflags ifhaschar ifhastok ifhastoks \
-ifhasxtoks ifincsname ifinsert ifmathparameter ifmathstyle \
-ifnumexpression ifnumval ifparameter ifparameters ifrelax \
-iftok ifzerodim ifzeronum ignorearguments ignoredepthcriterium \
+Umathconnectoroverlapmin Umathdegreevariant Umathdelimiterextendmargin Umathdelimiterovervariant Umathdelimiterpercent \
+Umathdelimitershortfall Umathdelimiterundervariant Umathdenominatorvariant Umathdict Umathdictdef \
+Umathdiscretionary Umathextrasubpreshift Umathextrasubprespace Umathextrasubshift Umathextrasubspace \
+Umathextrasuppreshift Umathextrasupprespace Umathextrasupshift Umathextrasupspace Umathflattenedaccentbasedepth \
+Umathflattenedaccentbaseheight Umathflattenedaccentbottomshiftdown Umathflattenedaccenttopshiftup Umathfractiondelsize Umathfractiondenomdown \
+Umathfractiondenomvgap Umathfractionnumup Umathfractionnumvgap Umathfractionrule Umathfractionvariant \
+Umathhextensiblevariant Umathlimitabovebgap Umathlimitabovekern Umathlimitabovevgap Umathlimitbelowbgap \
+Umathlimitbelowkern Umathlimitbelowvgap Umathlimits Umathnoaxis Umathnolimits \
+Umathnolimitsubfactor Umathnolimitsupfactor Umathnumeratorvariant Umathopenupdepth Umathopenupheight \
+Umathoperatorsize Umathoverbarkern Umathoverbarrule Umathoverbarvgap Umathoverdelimiterbgap \
+Umathoverdelimitervariant Umathoverdelimitervgap Umathoverlayaccentvariant Umathoverlinevariant Umathphantom \
+Umathpresubshiftdistance Umathpresupshiftdistance Umathprimeraise Umathprimeraisecomposed Umathprimeshiftdrop \
+Umathprimeshiftup Umathprimespaceafter Umathprimevariant Umathprimewidth Umathquad \
+Umathradicaldegreeafter Umathradicaldegreebefore Umathradicaldegreeraise Umathradicalextensibleafter Umathradicalextensiblebefore \
+Umathradicalkern Umathradicalrule Umathradicalvariant Umathradicalvgap Umathruledepth \
+Umathruleheight Umathskeweddelimitertolerance Umathskewedfractionhgap Umathskewedfractionvgap Umathsource \
+Umathspaceafterscript Umathspacebeforescript Umathstackdenomdown Umathstacknumup Umathstackvariant \
+Umathstackvgap Umathsubscriptvariant Umathsubshiftdistance Umathsubshiftdown Umathsubshiftdrop \
+Umathsubsupshiftdown Umathsubsupvgap Umathsubtopmax Umathsupbottommin Umathsuperscriptvariant \
+Umathsupshiftdistance Umathsupshiftdrop Umathsupshiftup Umathsupsubbottommax Umathtopaccentvariant \
+Umathunderbarkern Umathunderbarrule Umathunderbarvgap Umathunderdelimiterbgap Umathunderdelimitervariant \
+Umathunderdelimitervgap Umathunderlinevariant Umathuseaxis Umathvextensiblevariant Umathvoid \
+Umathxscale Umathyscale Umiddle Unosubprescript Unosubscript \
+Unosuperprescript Unosuperscript Uoperator Uover Uoverdelimiter \
+Uoverwithdelims Uprimescript Uradical Uright Uroot \
+Urooted Ushiftedsubprescript Ushiftedsubscript Ushiftedsuperprescript Ushiftedsuperscript \
+Uskewed Uskewedwithdelims Ustack Ustartdisplaymath Ustartmath \
+Ustartmathmode Ustopdisplaymath Ustopmath Ustopmathmode Ustretched \
+Ustretchedwithdelims Ustyle Usubprescript Usubscript Usuperprescript \
+Usuperscript Uunderdelimiter Uvextensible adjustspacing adjustspacingshrink \
+adjustspacingstep adjustspacingstretch afterassigned aftergrouped aliased \
+aligncontent alignmark alignmentcellsource alignmentwrapsource aligntab \
+allcrampedstyles alldisplaystyles allmainstyles allmathstyles allscriptscriptstyles \
+allscriptstyles allsplitstyles alltextstyles alluncrampedstyles allunsplitstyles \
+amcode atendofgroup atendofgrouped attribute attributedef \
+automaticdiscretionary automatichyphenpenalty automigrationmode autoparagraphmode begincsname \
+beginlocalcontrol beginmathgroup beginsimplegroup boundary boxadapt \
+boxanchor boxanchors boxattribute boxdirection boxfreeze \
+boxgeometry boxorientation boxrepack boxshift boxsource \
+boxtarget boxtotal boxvadjust boxxmove boxxoffset \
+boxymove boxyoffset catcodetable cdef cdefcsname \
+cfcode clearmarks constant copymathatomrule copymathparent \
+copymathspacing crampeddisplaystyle crampedscriptscriptstyle crampedscriptstyle crampedtextstyle \
+csactive csstring currentloopiterator currentloopnesting currentmarks \
+dbox defcsname deferred detokenized dimensiondef \
+dimexpression directlua dpack dsplit edefcsname \
+efcode endlocalcontrol endmathgroup endsimplegroup enforced \
+etoks etoksapp etokspre eufactor everybeforepar \
+everymathatom everytab exceptionpenalty expand expandactive \
+expandafterpars expandafterspaces expandcstoken expanded expandedafter \
+expandedloop expandtoken explicitdiscretionary explicithyphenpenalty firstvalidlanguage \
+float floatdef floatexpr flushmarks fontcharba \
+fontcharta fontid fontmathcontrol fontspecdef fontspecid \
+fontspecifiedname fontspecifiedsize fontspecscale fontspecxscale fontspecyscale \
+fonttextcontrol formatname frozen futurecsname futuredef \
+futureexpand futureexpandis futureexpandisap gdefcsname gleaders \
+glet gletcsname glettonothing gluespecdef glyph \
+glyphdatafield glyphoptions glyphscale glyphscriptfield glyphscriptscale \
+glyphscriptscriptscale glyphstatefield glyphtextscale glyphxoffset glyphxscale \
+glyphxscaled glyphyoffset glyphyscale glyphyscaled gtoksapp \
+gtokspre hccode hjcode hmcode holdingmigrations \
+hpack hyphenationmin hyphenationmode ifabsdim ifabsfloat \
+ifabsnum ifarguments ifboolean ifchkdim ifchkdimension \
+ifchknum ifchknumber ifcmpdim ifcmpnum ifcondition \
+ifcstok ifdimexpression ifdimval ifempty ifflags \
+iffloat ifhaschar ifhastok ifhastoks ifhasxtoks \
+ifincsname ifinsert ifmathparameter ifmathstyle ifnumexpression \
+ifnumval ifparameter ifparameters ifrelax iftok \
+ifzerodim ifzerofloat ifzeronum ignorearguments ignoredepthcriterium \
ignorepars immediate immutable indexofcharacter indexofregister \
inherited initcatcodetable insertbox insertcopy insertdepth \
insertdistance insertheight insertheights insertlimit insertmaxdepth \
@@ -114,33 +116,33 @@
mathpenaltiesmode mathpunctuation mathradical mathrelation mathrightclass \
mathrulesfam mathrulesmode mathscale mathscriptsmode mathslackmode \
mathspacingmode mathstackstyle mathstyle mathstylefontid mathsurroundmode \
-mathsurroundskip maththreshold mathunderline meaningasis meaningfull \
-meaningless mugluespecdef mutable noaligned noatomruling \
-noboundary nohrule norelax normalizelinemode normalizeparmode \
-nospaces novrule numericscale numexpression orelse \
-orphanpenalties orphanpenalty orunless outputbox overloaded \
-overloadmode overshoot pageboundary pageextragoal pagevsize \
-parametercount parametermark parattribute pardirection permanent \
-pettymuskip postexhyphenchar posthyphenchar postinlinepenalty prebinoppenalty \
-predisplaygapfactor preexhyphenchar prehyphenchar preinlinepenalty prerelpenalty \
-protrudechars protrusionboundary pxdimen quitloop quitvmode \
-resetmathspacing retokenized rightmarginkern rpcode savecatcodetable \
-scaledemwidth scaledexheight scaledextraspace scaledfontdimen scaledinterwordshrink \
-scaledinterwordspace scaledinterwordstretch scaledmathstyle scaledslantperpoint scantextokens \
-semiexpand semiexpanded semiprotected setdefaultmathcodes setfontid \
-setmathatomrule setmathdisplaypostpenalty setmathdisplayprepenalty setmathignore setmathoptions \
-setmathpostpenalty setmathprepenalty setmathspacing shapingpenaltiesmode shapingpenalty \
-snapshotpar srule supmarkmode swapcsvalues tabsize \
-textdirection thewithoutunit tinymuskip todimension tohexadecimal \
-tointeger tokenized toksapp tokspre tolerant \
-tomathstyle toscaled tosparsedimension tosparsescaled tpack \
-tracingadjusts tracingalignments tracingexpressions tracingfonts tracingfullboxes \
-tracinghyphenation tracinginserts tracinglevels tracinglists tracingmarks \
-tracingmath tracingnodes tracingpenalties tsplit uleaders \
-undent unexpandedloop unhpack unletfrozen unletprotected \
-untraced unvpack variablefam virtualhrule virtualvrule \
-vpack wordboundary wrapuppar xdefcsname xtoks \
-xtoksapp xtokspre
+mathsurroundskip maththreshold mathunderline meaningasis meaningful \
+meaningfull meaningles meaningless mugluespecdef mutable \
+noaligned noatomruling noboundary nohrule norelax \
+normalizelinemode normalizeparmode nospaces novrule numericscale \
+numexpression orelse orphanpenalties orphanpenalty orunless \
+outputbox overloaded overloadmode overshoot pageboundary \
+pageextragoal pagevsize parametercount parametermark parattribute \
+pardirection permanent pettymuskip positdef postexhyphenchar \
+posthyphenchar postinlinepenalty prebinoppenalty predisplaygapfactor preexhyphenchar \
+prehyphenchar preinlinepenalty prerelpenalty protrudechars protrusionboundary \
+pxdimen quitloop quitvmode resetmathspacing retokenized \
+rightmarginkern rpcode savecatcodetable scaledemwidth scaledexheight \
+scaledextraspace scaledfontdimen scaledinterwordshrink scaledinterwordspace scaledinterwordstretch \
+scaledmathstyle scaledslantperpoint scantextokens semiexpand semiexpanded \
+semiprotected setdefaultmathcodes setfontid setmathatomrule setmathdisplaypostpenalty \
+setmathdisplayprepenalty setmathignore setmathoptions setmathpostpenalty setmathprepenalty \
+setmathspacing shapingpenaltiesmode shapingpenalty snapshotpar srule \
+supmarkmode swapcsvalues tabsize textdirection thewithoutunit \
+tinymuskip todimension tohexadecimal tointeger tokenized \
+toksapp tokspre tolerant tomathstyle toscaled \
+tosparsedimension tosparsescaled tpack tracingadjusts tracingalignments \
+tracingexpressions tracingfonts tracingfullboxes tracinghyphenation tracinginserts \
+tracinglevels tracinglists tracingmarks tracingmath tracingnodes \
+tracingpenalties tsplit uleaders undent unexpandedloop \
+unhpack unletfrozen unletprotected untraced unvpack \
+variablefam virtualhrule virtualvrule vpack wordboundary \
+wrapuppar xdefcsname xtoks xtoksapp xtokspre
keywordclass.tex.omega=\
Omegaminorversion Omegarevision Omegaversion
Added: trunk/Master/texmf-dist/context/data/texfont/type-buy.dat
===================================================================
--- trunk/Master/texmf-dist/context/data/texfont/type-buy.dat (rev 0)
+++ trunk/Master/texmf-dist/context/data/texfont/type-buy.dat 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,146 @@
+# itc officina
+
+--en=? --ve=itc --co=officina --re
+--en=? --ve=itc --co=officina --so=itc/officina --ma --in
+
+--en=? --ve=itc --co=officina --so=itc/officina --ca=* --pattern=ovbk_*
+--en=? --ve=itc --co=officina --so=itc/officina --sl=* --pattern=ovbk_*
+--en=? --ve=itc --co=officina --so=itc/officina --sl=* --pattern=ovb_*
+
+--en=? --ve=itc --co=officina --so=itc/officina --ca=* --pattern=owbk_*
+--en=? --ve=itc --co=officina --so=itc/officina --sl=* --pattern=owbk_*
+--en=? --ve=itc --co=officina --so=itc/officina --sl=* --pattern=owb_*
+
+# bh lucida
+
+--en=? --ve=bh --co=lucida --re
+--en=? --ve=bh --co=lucida --so=bh/lucida --ma --in --expert
+
+# fontfont meta
+
+--en=? --ve=fontfont --co=meta --re
+--en=? --ve=fontfont --co=meta --so=fontfont/meta-1 --ma --in --expert
+--en=? --ve=fontfont --co=meta --so=fontfont/meta-2 --ma --in --expert
+
+--en=? --ve=fontfont --co=meta --so=fontfont/meta-1 --sl=* --pattern=mtbk_*
+--en=? --ve=fontfont --co=meta --so=fontfont/meta-1 --sl=* --pattern=mtbd_*
+
+# lucas sun
+
+--en=? --ve=lucas --co=sun --re
+--en=? --ve=lucas --co=sun --so=lucas/sun --ma --in
+
+# lucas antiqua
+
+--en=? --ve=lucas --co=antiqua --re
+--en=? --ve=lucas --co=antiqua --so=lucas/antiqua --ma --in
+
+# lucas thesans
+
+--en=? --ve=lucas --co=thesans --re
+--en=? --ve=lucas --co=thesans --so=lucas/thesans --ma --in
+--en=? --ve=lucas --co=thesans --so=lucas/thesans --ma --in --expert
+
+# creative arcadia
+
+--en=? --ve=creative --co=arcadia --re
+--en=? --ve=creative --co=arcadia --so=creative/arcadia --ma --in
+
+# creative industria
+
+--en=? --ve=creative --co=industria --re
+--en=? --ve=creative --co=industria --so=creative/industria --ma --in
+
+# creative insignia
+
+--en=? --ve=creative --co=insignia --re
+--en=? --ve=creative --co=insignia --so=creative/insignia --ma --in
+
+# fontfont din
+
+--en=? --ve=fontfont --co=din --re
+--en=? --ve=fontfont --co=din --so=fontfont/din --ma --in
+
+# adobe myriad
+
+--en=? --so=adobe/myriad --weight=400 --width=600 MyriadMM
+--en=? --so=adobe/myriad --weight=700 --width=600 MyriadMM
+--en=? --so=adobe/myriad --weight=400 --width=600 MyriadMM-It
+--en=? --so=adobe/myriad --weight=700 --width=600 MyriadMM-It
+
+--en=? --ve=adobe --co=myriad --so=adobe/myriad --ma --in --pattern=MyriadMM-we*
+--en=? --ve=adobe --co=myriad --so=adobe/myriad --ma --in --pattern=MyriadMM-It-we*
+
+--en=? --ve=adobe --co=myriad --so=adobe/myriad --sl=* --pattern=MyriadMM-we*
+--en=? --ve=adobe --co=myriad --so=adobe/myriad --ca=* --pattern=MyriadMM-we*
+
+# adobe frutiger
+
+--en=? --ve=adobe --co=frutiger --re
+--en=? --ve=adobe --co=frutiger --so=adobe/frutiger --ma --in
+
+# itc mendoza
+
+--en=? --ve=itc --co=mendoza --re
+--en=? --ve=itc --co=mendoza --so=itc/mendoza --ma --in
+
+# linotype univers
+
+--en=? --ve=linotype --co=univers --re
+--en=? --ve=linotype --co=univers --so=linotype/univers --ma --in
+
+# linotype linoletter
+
+--en=? --ve=linotype --co=linoletter --re
+--en=? --ve=linotype --co=linoletter --so=linotype/linoletter --ma --in
+
+# adobe utopia
+#
+# --en=? --ve=adobe --co=utopia --re
+# --en=? --ve=adobe --co=utopia --so=adobe/utopia --ma --in
+
+# itc kabel
+
+--en=? --ve=itc --co=kabel --re
+--en=? --ve=itc --co=kabel --so=itc/kabel --ma --in
+
+# monotype sabon
+
+--en=? --ve=monotype --co=sabon --re
+--en=? --ve=monotype --co=sabon --so=monotype/sabon --ma --in
+
+# linotype industria
+
+--en=? --ve=linotype --co=industria --re
+--en=? --ve=linotype --co=industria --so=linotype/industria --ma --in
+
+# itc stone
+
+--en=? --ve=itc --co=stone --re
+--en=? --ve=itc --co=stone --so=itc/stone --ma --in
+
+# itc bauhaus
+
+--en=? --ve=itc --co=bauhaus --re
+--en=? --ve=itc --co=bauhaus --so=itc/bauhaus --ma --in
+--en=? --ve=itc --co=bauhaus --so=itc/bauhaus --sl=* --pattern=bh*
+
+# ef swift
+
+--en=? --ve=ef --co=swift --re
+--en=? --ve=ef --co=swift --so=ef/swift --ma --in --pattern=sw*
+
+# linotype optima-nova
+
+--en=? --ve=linotype --co=optima-nova --re
+--en=? --ve=linotype --co=optima-nova --so=linotype/optima-nova --ma --in
+
+# linotype palatino-nova
+
+--en=? --ve=linotype --co=palatino-nova --re
+--en=? --ve=linotype --co=palatino-nova --so=linotype/palatino-nova --ma --in
+
+# linotype syntax
+
+--en=? --ve=linotype --co=syntax --re
+--en=? --ve=linotype --co=syntax --so=linotype/syntax --ma --in
Added: trunk/Master/texmf-dist/context/data/texfont/type-fsf.dat
===================================================================
--- trunk/Master/texmf-dist/context/data/texfont/type-fsf.dat (rev 0)
+++ trunk/Master/texmf-dist/context/data/texfont/type-fsf.dat 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,25 @@
+# Please use the originals instead ! ! ! ! !
+
+# fontsite opus
+
+--en=? --ve=fontsite --co=opus --re
+--en=? --ve=fontsite --co=opus --so=fsf/all --ma --in --pattern=opus*
+
+--en=? --ve=fontsite --co=opus --so=fsf/all --sl=* --pattern=opusrg_*
+--en=? --ve=fontsite --co=opus --so=fsf/all --sl=* --pattern=opusb_*
+
+# fontsite typewriter
+
+--en=? --ve=fontsite --co=typewriter --re
+--en=? --ve=fontsite --co=typewriter --so=fsf/all --ma --in --pattern=type*
+
+--en=? --ve=fontsite --co=typewriter --so=fsf/all --sl=* --pattern=typerg_*
+--en=? --ve=fontsite --co=typewriter --so=fsf/all --sl=* --pattern=typeb_*
+
+# fontsite garamond
+
+--en=? --ve=fontsite --co=garamond --re
+--en=? --ve=fontsite --co=garamond --so=fsf/all --ma --in --pattern=gara*
+
+--en=? --ve=fontsite --co=garamond --so=fsf/all --sl=* --pattern=garamond*
+--en=? --ve=fontsite --co=garamond --so=fsf/all --sl=* --pattern=garab_*
Added: trunk/Master/texmf-dist/context/data/texfont/type-ghz.dat
===================================================================
--- trunk/Master/texmf-dist/context/data/texfont/type-ghz.dat (rev 0)
+++ trunk/Master/texmf-dist/context/data/texfont/type-ghz.dat 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,78 @@
+# Gudrun and Hermann Zapf Collection
+
+# linotype alcuin
+
+# linotype aldus
+
+# linotype ams-euler
+
+# linotype ariadne
+
+# linotype aurelia
+
+# linotype carmina
+
+# linotype colombine
+
+# linotype diotima
+
+# linotype edison
+
+# linotype itc-zapf-book
+
+# linotype itc-zapf-chancery
+
+# linotype itc-zapf-dingbats
+
+# linotype itc-zapf-international-lt
+
+# linotype kompakt
+
+# linotype zapfino
+
+--en=? --ve=linotype --co=zapfino --re
+--en=? --ve=linotype --co=zapfino --so=ghz/linotype-zapfino --ma --in
+
+# linotype marconi
+
+# linotype medici-script
+
+# linotype melior
+
+--en=? --ve=linotype --co=melior --re
+--en=? --ve=linotype --co=melior --so=ghz/melior --ma --in
+
+# linotype noris
+
+# linotype optima
+
+--en=? --ve=linotype --co=optima --re
+--en=? --ve=linotype --co=optima --so=ghz/optima --ma --in
+
+# linotype optima-nova
+
+--en=? --ve=linotype --co=optima-nova --re
+--en=? --ve=linotype --co=optima-nova --so=linotype/optima-nova --ma --in
+
+# linotype orion
+
+# linotype palatino
+
+--en=? --ve=linotype --co=palatino --re
+--en=? --ve=linotype --co=palatino --so=ghz/palatino --ma --in
+
+# linotype saphir
+
+# linotype shakespeare
+
+# linotype sistina
+
+# linotype smaragd
+
+# linotype vario
+
+# linotype venture-script
+
+# linotype zapf-essentials-lt
+
+# linotype zapf-renaissance-antiqua
Added: trunk/Master/texmf-dist/context/data/texfont/type-tmf.dat
===================================================================
--- trunk/Master/texmf-dist/context/data/texfont/type-tmf.dat (rev 0)
+++ trunk/Master/texmf-dist/context/data/texfont/type-tmf.dat 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,75 @@
+# You can process this file as follows, using texfont.pl:
+#
+# texfont --encoding=ec --batch texfont.dat
+#
+# where 'ec' can be replaced by 'texnansi', '8r' or otherwise.
+#
+# The TEXMFTE and TEXMFGW paths are used by gwtex.
+
+
+# public antp
+
+--en=? --ve=public --co=antp --so=auto --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+
+# no longer needed, public antt
+#
+# --en=? --ve=public --co=antt --so=auto --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+
+# urw helvetica
+
+--en=? --ve=urw --co=helvetica --so=auto --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+
+# urw courier
+
+--en=? --ve=urw --co=courier --so=auto --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+
+# urw zapfchan
+
+--en=? --ve=urw --co=zapfchan --so=auto --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+
+# urw times
+
+--en=? --ve=urw --co=times --so=auto --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+--en=? --ve=urw --co=times --so=auto --ca=* utmr8a --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+--en=? --ve=urw --co=times --so=auto --sl=* utmr8a --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+--en=? --ve=urw --co=times --so=auto --sl=* utmb8a --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+
+# urw palatino
+
+--en=? --ve=urw --co=palatino --so=auto --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+--en=? --ve=urw --co=palatino --so=auto --ca=* uplr8a --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+--en=? --ve=urw --co=palatino --so=auto --sl=* uplr8a --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+--en=? --ve=urw --co=palatino --so=auto --sl=* uplb8a --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+
+# adobe utopia
+
+--en=? --ve=adobe --co=utopia --so=auto --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+--en=? --ve=adobe --co=utopia --so=auto --ca=* putr8a --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+--en=? --ve=adobe --co=utopia --so=auto --sl=* putr8a --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+--en=? --ve=adobe --co=utopia --so=auto --sl=* putb8a --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+
+--en=? --ve=adobe --co=utopia --so=auto --ro=TEXMFMAIN,TEXMFEXTRA,TEXMFTE,TEXMFGW
+--en=? --ve=adobe --co=utopia --so=auto --ca=* putr8a --ro=TEXMFMAIN,TEXMFEXTRA,TEXMFTE,TEXMFGW
+--en=? --ve=adobe --co=utopia --so=auto --sl=* putr8a --ro=TEXMFMAIN,TEXMFEXTRA,TEXMFTE,TEXMFGW
+--en=? --ve=adobe --co=utopia --so=auto --sl=* putb8a --ro=TEXMFMAIN,TEXMFEXTRA,TEXMFTE,TEXMFGW
+
+# bitstream charter
+
+--en=? --ve=bitstrea --co=charter --so=auto --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+--en=? --ve=bitstrea --co=charter --so=auto --ca=* bchr8a --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+--en=? --ve=bitstrea --co=charter --so=auto --sl=* bchr8a --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+--en=? --ve=bitstrea --co=charter --so=auto --sl=* bchb8a --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+
+# uwr bookman
+
+--en=? --ve=urw --co=bookman --so=auto --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+--en=? --ve=urw --co=bookman --so=auto --ca=* ubkl8a --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+--en=? --ve=urw --co=bookman --so=auto --sl=* ubkl8a --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+--en=? --ve=urw --co=bookman --so=auto --sl=* ubkd8a --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+
+# uwr schoolbook
+
+--en=? --ve=urw --co=ncntrsbk --so=auto --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+--en=? --ve=urw --co=ncntrsbk --so=auto --ca=* uncr8a --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+--en=? --ve=urw --co=ncntrsbk --so=auto --sl=* uncr8a --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
+--en=? --ve=urw --co=ncntrsbk --so=auto --sl=* uncb8a --ro=TEXMFMAIN,TEXMFTE,TEXMFGW
Added: trunk/Master/texmf-dist/doc/context/README.adoc
===================================================================
--- trunk/Master/texmf-dist/doc/context/README.adoc (rev 0)
+++ trunk/Master/texmf-dist/doc/context/README.adoc 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,18 @@
+== ConTeXt source code
+
+This repository hosts ConTeXt, a TeX macro package. There are three versions:
+
+MkII:: the frozen version meant for pdfTeX
+MkIV:: the mostly frozen version meant for LuaTeX
+MkXL:: the latest version running on LuaMetaTeX
+
+Here we collect all the file needed to run ConTeXt, including the sources of
+LuaMetaTeX. More information can be found on the wiki:
+
+* https://wiki.contextgarden.net
+
+For support there is a mailing list available ntg-context at ntg.nl
+
+* https://www.ntg.nl/mailman/listinfo/ntg-context
+
+Hans Hagen
Property changes on: trunk/Master/texmf-dist/doc/context/README.adoc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-alignments.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-boxes.pdf
===================================================================
(Binary files differ)
Added: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-buffers.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-buffers.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-buffers.pdf 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-buffers.pdf 2023-05-06 22:03:57 UTC (rev 67034)
Property changes on: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-buffers.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-characters.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-conditionals.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-expansion.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-grouping.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-inserts.pdf
===================================================================
(Binary files differ)
Added: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-localboxes.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-localboxes.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-localboxes.pdf 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-localboxes.pdf 2023-05-06 22:03:57 UTC (rev 67034)
Property changes on: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-localboxes.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-loops.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-macros.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-marks.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-paragraphs.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-registers.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-scope.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-security.pdf
===================================================================
(Binary files differ)
Added: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-tokens.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-tokens.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-tokens.pdf 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-tokens.pdf 2023-05-06 22:03:57 UTC (rev 67034)
Property changes on: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-tokens.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel.pdf
===================================================================
(Binary files differ)
Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.1
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.1 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.1 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1,33 +0,0 @@
-.TH "mptopdf" "1" "01-01-2023" "version 1.4.1" "convert MetaPost figures to PDF"
-.SH NAME
- mptopdf - convert MetaPost figures to PDF
-.SH SYNOPSIS
-.B mptopdf [
-.I OPTIONS ...
-.B ] [
-.I FILENAMES
-.B ]
-.SH DESCRIPTION
-.B convert MetaPost figures to PDF
-.SH OPTIONS
-.TP
-.B --metafun
-use the metafun format to process the file (default is mpost)
-.TP
-.B --texexec
-use texexec (context) to process text snippets
-.TP
-.B --latex
-use latex to process text snippets
-.SH AUTHOR
-More information about ConTeXt and the tools that come with it can be found at:
-
-
-.B "maillist:"
-ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
-
-.B "webpage:"
-http://www.pragma-ade.nl / http://tex.aanhet.net
-
-.B "wiki:"
-http://contextgarden.net
Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.html 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.html 2023-05-06 22:03:57 UTC (rev 67034)
@@ -44,6 +44,7 @@
<tr><th>--pretty</th><td></td><td>replace newlines in metadata</td></tr>
<tr><th>--fonts</th><td></td><td>show used fonts (--detail)</td></tr>
<tr><th>--object</th><td></td><td>show object"/></td></tr>
+ <tr><th>--links</th><td></td><td>show links"/></td></tr>
<tr><th/><td/><td/></tr>
</table>
<br/>
Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.man 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.man 2023-05-06 22:03:57 UTC (rev 67034)
@@ -25,6 +25,9 @@
.TP
.B --object
show object"/>
+.TP
+.B --links
+show links"/>
.SH AUTHOR
More information about ConTeXt and the tools that come with it can be found at:
Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.xml 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.xml 2023-05-06 22:03:57 UTC (rev 67034)
@@ -13,6 +13,7 @@
<flag name="pretty"><short>replace newlines in metadata</short></flag>
<flag name="fonts"><short>show used fonts (<ref name="detail)"/></short></flag>
<flag name="object"><short>show object"/></short></flag>
+ <flag name="links"><short>show links"/></short></flag>
</subcategory>
<subcategory>
<example><command>mtxrun --script pdf --info foo.pdf</command></example>
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/detcow.mp
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/detcow.mp 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/detcow.mp 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1,6 +1,4 @@
% Converted from PostScript(TM) to MetaPost by pstoedit
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
% MetaPost backend contributed by Scott Pakin <pakin at uiuc.edu>
% pstoedit is Copyright (C) 1993 - 1999 Wolfgang Glunz <wglunz at geocities.com>
Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-tokens.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-tokens.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-tokens.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,540 @@
+% language=us runpath=texruns:manuals/lowlevel
+
+\environment lowlevel-style
+
+\usemodule[system-tokens]
+
+\startdocument
+ [title=tokens,
+ color=middleblue]
+
+\startsectionlevel[title=Introduction]
+
+Most users don't need to know anything about tokens but it happens that when \TEX
+ies meet in person (users group meetings), or online (support platforms) there
+always seem to pop up folks who love token speak. When you try to explain
+something to a user it makes sense to talk in terms of characters but then those
+token speakers can jump in and start correcting you. In the past I have been
+puzzled by this because, when one can write a decent macro that does the job
+well, it really doesn't matter if one knows about tokens. Of course one should
+never make the assumption that token speakers really know \TEX\ that well or can
+come up with better solutions than users but that is another matter. \footnote
+{Talking about fashion: it would be more impressive to talk about \TEX\ and
+friends as a software stack than calling it a distribution. Today, it's all about
+marketing.}
+
+That said, because in documents about \TEX\ the word \quote {token} does pop up I
+will try to give a little insight here. But for using \TEX\ it's mostly
+irrelevant. The descriptions below for sure won't match the proper token speak
+criteria which is why at a presentation for the 2020 user meeting I used the
+title \quotation {Tokens as I see them.}
+
+\stopsectionlevel
+
+\startsectionlevel[title=What are tokens]
+
+Both the words \quote {node} and \quote {token} are quite common in programming
+and also rather old which is proven by the fact that they also are used in the
+\TEX\ source. A node is a storage container that is part of a linked list. When
+you input the characters \type {tex} the three characters become part of the
+current linked list. They become \quote {character} nodes (or in \LUATEX\ speak
+\quote {glyph} nodes) with properties like the font and the character referred
+to. But before that happens, the three characters in the input \type {t}, \type
+{e} and \type {x}, are interpreted as in this case being just that: characters.
+When you enter \type {\TeX} the input processors first sees a backslash and
+because that has a special meaning in \TEX\ it will read following characters and
+when done does a lookup in it's internal hash table to see what it actually is: a
+macro that assembled the word \TEX\ in uppercase with special kerning and a
+shifted (therefore boxed) \quote {E}. When you enter \type {$} \TEX\ will look
+ahead for a second one in order to determine display math, push back the found
+token when there is no match and then enter inline math mode.
+
+A token is internally just a 32 bit number that encodes what \TEX\ has seen. It
+is the assembled token that travels through the system, get stored, interpreted
+and often discarded afterwards. So, the character \quote {e} in our example gets
+tagged as such and encoded in this number in a way that the intention can be
+derived later on.
+
+Now, the way \TEX\ looks at these tokens can differ. In some cases it will just
+look at this (32 bit) number, for instance when checking for a specific token,
+which is fast, but sometimes it needs to know some detail. The mentioned integer
+actually encodes a command (opcode) and a so called char code (operand). The
+second name is somewhat confusing because in many cases that code is not
+representing a character but that is not that relevant here. When you look at the
+source code of a \TEX\ engine it is enough to know that a char can also be a sub
+command.
+
+\startlinecorrection[blank]
+ \setupTABLE[each][align=middle]
+ \setupTABLE[c][1][width=44mm]
+ \setupTABLE[c][2][width=4em]
+ \setupTABLE[c][3][width=11mm]
+ \setupTABLE[c][4][width=33mm]
+ \bTABLE
+ \bTR
+ \bTD token \eTD
+ \bTD[frame=off] = \eTD
+ \bTD cmd \eTD
+ \bTD chr \eTD
+ \eTR
+ \eTABLE
+\stoplinecorrection
+
+Back to the three characters: these become tokens where the command code
+indicates that it is a letter and the char code stores what letter we have at
+hand and in the case of \LUATEX\ and \LUAMETATEX\ these are \UNICODE\ values.
+Contrary to the traditional 8 bit \TEX\ engine, in the \UNICODE\ engines an \UTF\
+sequence is read, but these multiple bytes still become one number that will be
+encoded in the token number. In order to determine that something is a letter the
+engine has to be told (which is what a macro package does when it sets up the
+engine). For instance, digits are so called other characters and the backslash is
+called escape. Every \TEX\ user knows that curly braces are special and so are
+dollar symbols and hashes. If this rings a bell, and you relate this to catcodes,
+you can indeed assume that the command codes of these tokens have the same
+numbers as the catcodes. Given that \UNICODE\ has plenty of characters slots you
+can imagine that combining 16 catcode commands with all the possible \UNICODE\
+values makes a large repertoire of tokens.
+
+There are more commands than the 16 basic characters related ones, in
+\LUAMETATEX\ we have just over 150 command codes (\LUATEX\ has a few more but
+they are also organized differently). Each of these codes can have a sub
+command, For instance the primitives \type {\vbox} and \type {\hbox} are both a
+\type {make_box_cmd} (we use the symbolic name here) and in \LUAMETATEX\ the
+first one has sub command code 9 (\type {vbox_code}) and the second one has code
+10 (\type {hbox_code}). There are twelve primitives that are in the same
+category. The many primitives that make up the core of the engine are grouped in
+a way that permits processing similar ones with one function and also makes it
+possible to distinguish between the way commands are handled, for instance with
+respect to expansion.
+
+Now, before we move on it is important to know that al these codes are in fact
+abstract numbers. Although it is quite likely that engines that are derived from
+each other have similar numbers (just more) this is not the case for \LUAMETATEX.
+Because the internals have been opened up (even more than in \LUATEX) the command
+and char codes have been reorganized in a such a way that exposure is consistent.
+We could not use some of the reuse and remap tricks that the other engines use
+because it would simply be too confusing (and demand real in depth knowledge of
+the internals). This is also the reason why development took some time. You
+probably won't notice it from the current source but it was a very stepwise
+process. We not only had to make sure that all kept working (\CONTEXT\ \LMTX\ and
+\LUAMETATEX\ were pretty useable during the process), but also had to
+(re)consider intermediate choices.
+
+So, input is converted into tokens, in most cases one|-|by|-|one. When a token is
+assembled, it either gets stored (deliberately or as part of some look ahead
+scanning), or it immediately gets (what is called:) expanded. Depending on what
+the command is, some action is triggered. For instance, a character gets appended
+to the node list immediately. An \type {\hbox} command will start assembling a
+box which its own node list that then gets some treatment: if this primitive was a
+follow up on \type {\setbox} it will get stored, otherwise it might end up in the
+current node list as so called hlist node. Commands that relate to registers have
+\type {0xFFFF} char codes because that is how many registers we have per category.
+
+When a token gets stored for later processing it becomes part of a larger data
+structure, a so called memory word. These memory words are taken from a large
+pool of words and they store a token and additional properties. The info field
+contains the token value, the mentioned command and char. When there is no linked
+list, the link can actually be used to store a value, something that in
+\LUAMETATEX\ we actually do.
+
+\startlinecorrection[blank]
+ \setupTABLE[each][align=middle]
+ \setupTABLE[c][1][width=8mm]
+ \setupTABLE[c][2][width=64mm]
+ \setupTABLE[c][3][width=64mm]
+ \bTABLE
+ \bTR \bTD 1 \eTD \bTD info \eTD \bTD link \eTD \eTR
+ \bTR \bTD 2 \eTD \bTD info \eTD \bTD link \eTD \eTR
+ \bTR \bTD 3 \eTD \bTD info \eTD \bTD link \eTD \eTR
+ \bTR \bTD n \eTD \bTD info \eTD \bTD link \eTD \eTR
+ \eTABLE
+\stoplinecorrection
+
+When for instance we say \typ {\toks 0 {tex}} the scanner sees an escape,
+followed by 4 letters (\type {toks}) and the escape triggers a lookup of the
+primitive (or macro or \unknown) with that name, in this case a primitive
+assignment command. The found primitive (its property gets stored in the token)
+triggers scanning for a number and when that is successful scanning of a brace
+delimited token list starts. The three characters become three letter tokens and
+these are a linked list of the mentioned memory words. This list then gets stored
+in token register zero. The input sequence \typ {\the \toks 0} will push back a
+copy of this list into the input.
+
+In addition to the token memory pool, there is also a table of equivalents. That
+one is part of a larger table of memory words where \TEX\ stores all it needs to
+store. The 16 groups of character commands are virtual, storing these makes no
+sense, so the first real entries are all these registers (count, dimension, skip,
+box, etc). The rest is taken up by possible hash entries.
+
+\startlinecorrection[blank]
+ \bTABLE
+ \bTR \bTD[ny=4] main hash \eTD \bTD null control sequence \eTD \eTR
+ \bTR \bTD 128K hash entries \eTD \eTR
+ \bTR \bTD frozen control sequences \eTD \eTR
+ \bTR \bTD special sequences (undefined) \eTD \eTR
+ \bTR \bTD[ny=7] registers \eTD \bTD 17 internal & 64K user glues \eTD \eTR
+ \bTR \bTD 4 internal & 64K user mu glues \eTD \eTR
+ \bTR \bTD 12 internal & 64K user tokens \eTD \eTR
+ \bTR \bTD 2 internal & 64K user boxes \eTD \eTR
+ \bTR \bTD 116 internal & 64K user integers \eTD \eTR
+ \bTR \bTD 0 internal & 64K user attribute \eTD \eTR
+ \bTR \bTD 22 internal & 64K user dimensions \eTD \eTR
+ \bTR \bTD specifications \eTD \bTD 5 internal & 0 user \eTD \eTR
+ \bTR \bTD extra hash \eTD \bTD additional entries (grows dynamic) \eTD \eTR
+ \eTABLE
+\stoplinecorrection
+
+So, a letter token \type {t} is just that, a token. A token referring to a register
+is again just a number, but its char code points to a slot in the equivalents table.
+A macro, which we haven't discussed yet, is actually just a token list. When a name
+lookup happens the hash table is consulted and that one runs in parallel to part of the
+table of equivalents. When there is a match, the corresponding entry in the equivalents
+table points to a token list.
+
+\startlinecorrection[blank]
+ \setupTABLE[each][align=middle]
+ \setupTABLE[c][1][width=16mm]
+ \setupTABLE[c][2][width=64mm]
+ \setupTABLE[c][3][width=64mm]
+ \bTABLE
+ \bTR \bTD 1 \eTD \bTD string index \eTD \bTD equivalents or (next > n) index \eTD \eTR
+ \bTR \bTD 2 \eTD \bTD string index \eTD \bTD equivalents or (next > n) index \eTD \eTR
+ \bTR \bTD n \eTD \bTD string index \eTD \bTD equivalents or (next > n) index \eTD \eTR
+ \bTR \bTD n + 1 \eTD \bTD string index \eTD \bTD equivalents or (next > n) index \eTD \eTR
+ \bTR \bTD n + 2 \eTD \bTD string index \eTD \bTD equivalents or (next > n) index \eTD \eTR
+ \bTR \bTD n + m \eTD \bTD string index \eTD \bTD equivalents or (next > n) index \eTD \eTR
+ \eTABLE
+\stoplinecorrection
+
+It sounds complex and it actually also is somewhat complex. It is not made easier
+by the fact that we also track information related to grouping (saving and
+restoring), need reference counts for copies of macros and token lists, sometimes
+store information directly instead of via links to token lists, etc. And again
+one cannot compare \LUAMETATEX\ with the other engines. Because we did away with
+some of the limitations of the traditional engine we not only could save some
+memory but in the end also simplify matters (we're 32/64 bit after all). On the one
+hand some traditional speedups were removed but these have been compensated by
+improvements elsewhere, so overall processing is more efficient.
+
+\startlinecorrection[blank]
+ \setupTABLE[each][align=middle]
+ \setupTABLE[c][1][width=8mm]
+ \setupTABLE[c][2][width=32mm]
+ \setupTABLE[c][3][width=16mm]
+ \setupTABLE[c][4][width=16mm]
+ \setupTABLE[c][5][width=64mm]
+ \bTABLE
+ \bTR \bTD 1 \eTD \bTD level \eTD \bTD type \eTD \bTD flag \eTD \bTD value \eTD \eTR
+ \bTR \bTD 2 \eTD \bTD level \eTD \bTD type \eTD \bTD flag \eTD \bTD value \eTD \eTR
+ \bTR \bTD 3 \eTD \bTD level \eTD \bTD type \eTD \bTD flag \eTD \bTD value \eTD \eTR
+ \bTR \bTD n \eTD \bTD level \eTD \bTD type \eTD \bTD flag \eTD \bTD value \eTD \eTR
+ \eTABLE
+\stoplinecorrection
+
+So, here \LUAMETATEX\ differs from other engines because it combines two tables,
+which is possible because we have at least 32 bits. There are at most \type
+{0xFFFF} levels but we need at most \type {0xFF} types. in \LUAMETATEX\ macros
+can have extra properties (flags) and these also need one byte. Contrary to the
+other engines, \type {\protected} macros are native and have their own command
+code, but \type {\tolerant} macros duplicate that (so we have four distinct macro
+commands). All other properties, like the \type {\permanent} ones are stored in
+the flags.
+
+Because a macro starts with a reference count we have some room in the info field
+to store information about it having arguments or not. It is these details that
+make \LUAMETATEX\ a bit more efficient in terms of memory usage and performance
+than its ancestor \LUATEX. But as with the other changes, it was a very stepwise
+process in order to keep the system compatible and working.
+
+\stopsectionlevel
+
+\startsectionlevel[title=Some implementation details]
+
+Sometimes there is a special head token at the start. This makes for easier
+appending of extra tokens. In traditional \TEX\ node lists are forward linked, in
+\LUATEX\ they are double linked \footnote {On the agenda of \LUAMETATEX\ is to
+use this property in the underlying code, that doesn't yet profit from this and
+therefore keep previous pointers in store.}. Token lists are always forward
+linked. Shared token lists use the head node for a reference count.
+
+For various reasons original \TEX\ uses global variables temporary lists. This is
+for instance needed when we expand (nested) and need to report issues. But in
+\LUATEX\ we often just serialize lists and using local variables makes more
+sense. One of the first things done in \LUAMETATEX\ was to group all global
+variables in (still global) structures but well isolated. That also made it
+possible to actually get rid of some globals.
+
+Because \TEX\ had to run on machines that we nowadays consider rather limited, it
+had to be sparse and efficient. There are quite some optimizations to limit code
+and memory consumption. The engine also does its own memory management. Freed
+token memory words are collected in a cache and reused but they can get scattered
+which is not that bad, apart from maybe cache hits. In \LUAMETATEX\ we stay as
+close to original \TEX\ as possible but there have been some improvements. The
+\LUA\ interfaces force us to occasionally divert from the original, and that in
+fact might lead to some retrofit but the original documentation still mostly
+applies. However, keep in mind that in \LUATEX\ we store much more in nodes (each
+has a prev pointer and an attribute list pointer and for instance glyph nodes
+have some 20 extra fields compared to traditional \TEX\ character nodes).
+
+\stopsectionlevel
+
+\startsectionlevel[title=Other data management]
+
+There is plenty going on in \TEX\ when it processes your input, just to mention a
+few:
+
+\startitemize[packed]
+\startitem Grouping is handled by a nesting stack. \stopitem
+\startitem Nested conditionals (\type {\if...}) have their own stack. \stopitem
+\startitem The values before assignments are saved on the save stack. \stopitem
+\startitem Also other local changes (housekeeping) ends up in the save stack. \stopitem
+\startitem Token lists and macro aliases have references pointers (reuse). \stopitem
+\startitem Attributes, being linked node lists, have their own management. \stopitem
+\stopitemize
+
+In all these subsystems tokens or references to tokens can play a role. Reading a
+single character from the input can trigger a lot of action. A curly brace tagged
+as begin group command will push the grouping level and from then on registers
+and some other quantities that are changed will be stored on the save stack
+so that after the group ends they can be restored. When primitives take keywords,
+and no match happens, tokens are pushed back into the input which introduces a
+new input level (also some stack). When numbers are read a token that represents
+no digit is pushed back too and macro packages use numbers and dimensions a lot.
+It is a surprise that \TEX\ is so fast.
+
+\stopsectionlevel
+
+\startsectionlevel[title=Macros]
+
+There is a distinction between primitives, the build in commands, and macros, the
+commands defined by users. A primitive relates to a command code and char code
+but macros are, unless they are made an alias to something else, like a \type
+{\countdef} or \type {\let} does, basically pointers to a token list. There is
+some additional data stored that makes it possible to parse and grab arguments.
+
+When we have a control sequence (macro) \type {\controlsequence} the name is
+looked up in the hash table. When found its value will point to the table of
+equivalents. As mentioned, that table keeps track of the cmd and points to a
+token list (the meaning). We saw that this table also stores the current level
+of grouping and flags.
+
+If we say, in the input, \typ {\hbox to 10pt {x\hss}}, the box is assembled as we
+go and when it is appended to the current node list there are no tokens left.
+When scanning this, the engine literally sees a backslash and the four letters
+\type {hbox}. However when we have this:
+
+\starttyping[option=TEX]
+\def\MyMacro{\hbox to 10pt {x\hss}}
+\stoptyping
+
+the \type {\hbox} has become one memory word which has a token representing the
+\type {\hbox} primitive plus a link to the next token. The space after a control
+sequence is gobbled so the next two tokens, again stored in a linked memory word,
+are letter tokens, followed by two other and two letter tokens for the
+dimensions. Then we have a space, a brace, a letter, a primitive and a brace. The
+about 20 characters in the input became a dozen memory words each two times four
+bytes, so in terms of memory usage we end up with quite a bit more. However, when
+\TEX\ runs over that list it only has to interpret the token values because the
+scanning and conversion already happened. So, the space that a macro takes is
+more than compensated by efficient reprocessing.
+
+\stopsectionlevel
+
+\startsectionlevel[title=Looking at tokens]
+
+When you say \type {\tracingall} you will see what the engine does: read input,
+expand primitives and macros, typesetting etc.\ You might need to set \type
+{\tracingonline} to get a bit more output on the console. One way to look at
+macros is to use the \type {\meaning} command, so if we have:
+
+\startbuffer[definition]
+\permanent\protected\def\MyMacro#1#2{Do #1 or #2!}
+\stopbuffer
+
+\startbuffer[meaning]
+\meaning \MyMacro
+\meaningless\MyMacro
+\meaningfull\MyMacro
+\stopbuffer
+
+\typebuffer[definition][option=TEX]
+
+we can say this:
+
+\typebuffer[meaning][option=TEX]
+
+and get:
+
+{\getbuffer[definition]\startlines\tttf \getbuffer[meaning]\stoplines}
+
+You get less when you ask for the meaning of a primitive, just its name. The
+\type {\meaningfull} primitive gives the most information. In \LUAMETATEX\
+protected macros are first class commands: they have their own command code. In
+the other engines they are just regular macros with an initial token indicating
+that they are protected. There are specific command codes for \type {\outer} and
+\type {\long} macros but we dropped that in \LUAMETATEX . Instead we have \type
+{\tolerant} macros but that's another story. The flags that were mentioned can
+mark macros in a way that permits overload protection as well as some special
+treatment in otherwise tricky cases (like alignments). The overload related flags
+permits a rather granular way to prevent users from redefining macros and such.
+They are set via prefixes, and add to that repertoire: we have 14 prefixes but
+only some eight deal with flags (we can add more if really needed). The probably
+most wel known prefix is \type {\global} and that one will not become a flag: it
+has immediate effect.
+
+For the above definition, the \type {\showluatokens} command will show a meaning
+on the console.
+
+\starttyping[option=TEX]
+\showluatokens\MyMacro
+\stoptyping
+
+% {\getbuffer[definition]\getbuffer}
+
+This gives the next list, where the first column is the address of the token, the
+second one the command code, and the third one the char code. When there are
+arguments involved, the list of what needs to get matched is shown.
+
+\starttyping
+permanent protected control sequence: MyMacro
+501263 19 49 match argument 1
+501087 19 50 match argument 2
+385528 20 0 end match
+--------------
+501090 11 68 letter D (U+00044)
+ 30833 11 111 letter o (U+0006F)
+500776 10 32 spacer
+385540 21 1 parameter reference
+112057 10 32 spacer
+431886 11 111 letter o (U+0006F)
+ 30830 11 114 letter r (U+00072)
+ 30805 10 32 spacer
+500787 21 2 parameter reference
+213412 12 33 other char ! (U+00021)
+\stoptyping
+
+In the next subsections I will give some examples. This time we use
+helper defined in a module:
+
+\starttyping[option=TEX]
+\usemodule[system-tokens]
+\stoptyping
+
+\startsectionlevel[title=Example 1: in the input]
+
+\startbuffer
+\luatokentable{1 \bf{2} 3\what {!}}
+\stopbuffer
+
+\typebuffer[option=TEX] \blank[line] {\switchtobodyfont[8pt] \getbuffer}
+
+\stopsectionlevel
+
+\startsectionlevel[title=Example 2: in the input]
+
+\startbuffer
+\luatokentable{a \the\scratchcounter b \the\parindent \hbox to 10pt{x}}
+\stopbuffer
+
+\typebuffer[option=TEX] \blank[line] {\switchtobodyfont[8pt] \getbuffer}
+
+\stopsectionlevel
+
+\startsectionlevel[title=Example 3: user registers]
+
+\startbuffer
+\scratchtoks{foo \framed{\red 123}456}
+
+\luatokentable\scratchtoks
+\stopbuffer
+
+\typebuffer[option=TEX] \blank[line] {\switchtobodyfont[8pt] \getbuffer}
+
+\stopsectionlevel
+
+\startsectionlevel[title=Example 4: internal variables]
+
+\startbuffer
+\luatokentable\everypar
+\stopbuffer
+
+\typebuffer[option=TEX] \blank[line] {\switchtobodyfont[8pt] \getbuffer}
+
+\stopsectionlevel
+
+\startsectionlevel[title=Example 5: macro definitions]
+
+\startbuffer
+\protected\def\whatever#1[#2](#3)\relax
+ {oeps #1 and #2 & #3 done ## error}
+
+\luatokentable\whatever
+\stopbuffer
+
+\typebuffer[option=TEX] \blank[line] {\switchtobodyfont[8pt] \getbuffer}
+
+\stopsectionlevel
+
+\startsectionlevel[title=Example 6: commands]
+
+\startbuffer
+\luatokentable\startitemize
+\luatokentable\stopitemize
+\stopbuffer
+
+\typebuffer[option=TEX] \blank[line] {\switchtobodyfont[8pt] \getbuffer}
+
+\stopsectionlevel
+
+\startsectionlevel[title=Example 7: commands]
+
+\startbuffer
+\luatokentable\doifelse
+\stopbuffer
+
+\typebuffer[option=TEX] \blank[line] {\switchtobodyfont[8pt] \getbuffer }
+
+\stopsectionlevel
+
+\startsectionlevel[title=Example 8: nothing]
+
+\startbuffer
+\luatokentable\relax
+\stopbuffer
+
+\typebuffer[option=TEX] \blank[line] {\switchtobodyfont[8pt] \getbuffer }
+
+\stopsectionlevel
+
+\startsectionlevel[title=Example 9: hashes]
+
+\startbuffer
+\edef\foo#1#2{(#1)(\letterhash)(#2)} \luatokentable\foo
+\stopbuffer
+
+\typebuffer[option=TEX] \blank[line] {\switchtobodyfont[8pt] \getbuffer }
+
+\stopsectionlevel
+
+\startsectionlevel[title=Example 10: nesting]
+
+\startbuffer
+\def\foo#1{\def\foo##1{(#1)(##1)}} \luatokentable\foo
+\stopbuffer
+
+\typebuffer[option=TEX] \blank[line] {\switchtobodyfont[8pt] \getbuffer }
+
+\stopsectionlevel
+
+\startsectionlevel[title=Remark]
+
+In all these examples the numbers are to be seen as abstractions. Some command
+codes and sub command codes might change as the engine evolves. This is why the
+\LUAMETATEX\ engine has lots of \LUA\ functions that provide information about
+what number represents what command.
+
+\stopsectionlevel
+
+\stopsectionlevel
+
+\stopdocument
Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-tokens.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -39,6 +39,7 @@
\startsectionlevel[title=Loops] \component [lowlevel-loops] \stopsectionlevel
\startsectionlevel[title=Tokens] \component [lowlevel-tokens] \stopsectionlevel
\startsectionlevel[title=Buffers] \component [lowlevel-buffers] \stopsectionlevel
+ % \startsectionlevel[title=Accuracy] \component [lowlevel-accuracy] \stopsectionlevel
\stoptext
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-building.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-building.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-building.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -792,6 +792,60 @@
{everybeforepar}, \prm {snapshotpar}, \prm {wrapuppar}, etc. For the moment the
manuals that come with \CONTEXT\ have to do.}
+% The concept of paragraph in \TEX\ can be a bit confusing, and what follows here
+% is even more so. In \LUAMETATEX\ we distinguish three different cases:
+%
+% \startitemize[packed]
+% \starthead {normal}
+% This state is entered when we have an explicit \type {\par}.
+% \stophead
+% \starthead {inserted}
+% This state is entered when \TEX\ forces a new paragraph which can happen when
+% we automatically change to horizontal mode.
+% \stophead
+% \starthead{newline}
+% This state is entered when an empty line is encoduntered.
+% \stophead
+% \stopitemize
+%
+% When defining macros, a \type {\par} can be a delimiter and an empty line is then
+% equivalent to that. With \type {\autoparagraphmode} we can change this behaviour.
+% The bits set in this variable determines how \type {\par} tokens are interpreted
+% and processed in different situations. It is good to know that this experimental
+% feature is pretty much \CONTEXT\ specific. Here are a few characteristics:
+%
+% \startitemize[packed]
+% \startitem
+% When any bit is set, a par token is appended when with property inserted.
+% The reason behind different properties (mentioned above) is that we can
+% intercept them with callbacks.
+% \stopitem
+% \startitem
+% When bit~1 (text) is set, \type {\par} will be appended to a string when
+% a token list is serialized.
+% \stopitem
+% \startitem
+% When bit~2 (macro) is set when a macro is defined there is an explicit
+% check for a par token when \type {\par} is part of the preamble.
+% \stopitem
+% \startitem
+% When bit~4 (go on) is not set we enter the same state as a new line.
+% After that when bit~1 (text) is set, a regular par token command is
+% injected (with an associated newline state), otherwise the meaning of
+% \type {\par} kicks in (users can have redefined \type {\par}).
+% \stopitem
+% \stopitemize
+%
+% In \CONTEXT\ we currently default to one, because we still have a few \type {\par}
+% delimited macros but these will go and then we will set the mode to two. This
+% means that in \CONTEXT\ such macro expects an explicit \type {\par} and not an
+% empty line which in turn encourages users to use the proper alternatives. We
+% anyway don't support redefined \type {\par} tokens. Therefore, when we load for
+% instance tikz, we set the mode to zero (normal \TEX) and afterwards back to one.
+% This is still an experimental feature that we occasionally review so don't bother
+% us with questions about it (just don't set the mode).
+
+
\stopsubsection
\startsubsection[title=Penalties]
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -248,7 +248,7 @@
engines. The affected commands with an altered initial (left of the equal sign)
or secondary (right of the equal sign) value are: \prm {char}, \prm {lccode},
\prm {uccode}, \prm {hjcode}, \prm {catcode}, \prm {sfcode}, \prm {efcode}, \prm
-{lpcode}, \prm {rpcode}, \prm {chardef}.
+{cfcode}, \prm {lpcode}, \prm {rpcode}, \prm {chardef}.
As far as the core engine is concerned, all input and output to text files is
\UTF-8 encoded. Input files can be pre|-|processed using the \type {reader}
@@ -1710,7 +1710,8 @@
macros the way macros are traced can be different in details (we therefore have
for instance \prm {meaningfull} (double l's indeed) and \prm {meaningless} as
variants of \prm {meaning} as well as \prm {meaningasis} for more literal
-alternative).
+alternative). The \prm {meaningful} and \prm {meaningles} variants show no body
+but do show the preamble when we have arguments.
\stopsubsection
@@ -1914,6 +1915,16 @@
\stopsubsection
+\startsubsection[title={\prm{cdef}, \prm {cdefcsname} and \prm {constant}}]
+
+These primitives are like \prm {edef} and \prm {edefcsname} but tag the macro as
+being kind of simple, which means that in some scenarios they are serialized in a
+fast way, not going through the expansion machinery. This is actually an
+experiment but it will stay. The \prm {constant} prefix can be used with other
+definition primitives instead.
+
+\stopsubsection
+
\startsubsection[title={\prm {csstring}, \prm {begincsname} and \prm {lastnamedcs}}]
These are somewhat special. The \prm {csstring} primitive is like
@@ -2002,6 +2013,21 @@
\stopsubsection
+\startsubsection[title=Prefixes]
+
+Quite some primitive usage can be preceded by a prefix. For instance assignments
+can be \prm {global} and macros can be defined \prm {protected}. In \LUAMETATEX\
+we have more prefixes, like \prm {tolerant} that signals a different way of
+interpreting macro arguments and \type {permanent} that flags a definition in
+away that, when overload protection is enabled, will prevent redefinition.
+Prefixes like \prm {immediate} and its counterpart \prm {deferred} are backend
+related and, as we don't have one in the engine, are not doing much. They are
+just intercepted and passed to e.g.\ some \LUA\ function called so that one can
+use them to construct additional (\LUA\ based) pseudo primitives. Various
+prefixes are discussed elsewhere.
+
+\stopsubsection
+
\startsubsection[title=Arguments]
\topicindex {macros+arguments}
@@ -2421,6 +2447,45 @@
\stopsubsection
+\startsubsection[title={Units}]
+
+The familiar \TEX\ units like \type {pt} and \type {cm} are supported but since
+the 2021 \CONTEXT\ meeting we also support the Knuthian Potrzebie, cf.\ \typ
+{en.wikipedia.org/wiki/Potrzebie}. The two character acronym is \type {dk}. One
+\type {dk} is 6.43985pt. This unit is particularly suited for offsets in framed
+examples.
+
+In 2023 we added the Edith (\type {es}) and Tove (\type {ts}) as metric
+replacements for the inch (\type {in}). As with the \type {dk} more background
+information can be found in documents that come with \CONTEXT\ and user group
+journals. The \type {eu} unit starts out as one \type {es} but can be scaled with
+\prm {eufactor}.
+
+\startbuffer
+\localcontrolledloop -5 55 5 {
+ \eufactor=\currentloopiterator
+ \dontleavehmode\strut
+ \vrule height .1es depth .25ts width 1dk\relax\quad
+ \vrule height .1es depth .25ts width 1eu\relax\quad
+ \the\currentloopiterator
+ \par
+}
+\stopbuffer
+
+\typebuffer
+
+This example code shows all four new units. Watch how \prm {eufactor} is clipped
+to a value in the range $1-50$. The default factor of $10$ makes the European
+Unit equivalent to ten Toves or one Edith.
+
+\startpacked
+\startcolor[darkgray]
+\getbuffer
+\stopcolor
+\stoppacked
+
+\stopsubsection
+
\stopsection
\startsection[title=Expressions]
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-fonts.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-fonts.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-fonts.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -130,8 +130,14 @@
\NC \type {leftprotruding} \NC number \NC left protruding factor (\prm {lpcode}) \NC\NR
\NC \type {rightprotruding} \NC number \NC right protruding factor (\prm {rpcode}) \NC\NR
\NC \type {expansion} \NC number \NC expansion factor (\prm {efcode}) \NC\NR
+\NC \type {compression} \NC number \NC compression factor (\prm {cfcode}) \NC\NR
\stoptabulate
+The \prm {lpcode}, \prm {rpcode} and \prm {efcode} are comparable to the ones
+introduced by \PDFTEX, while \prm {cfcode} complements \prm {efcode}: a
+compression alongside expansion code per character. In \LUAMETATEX\ the expansion
+mechanism is also available in math.
+
From \TEX\ we inherit the following tables. Ligatures are only used in so call
base mode, when the engine does the font magic. Kerns are used in text and
optionally in math: More details follow below.
@@ -850,15 +856,15 @@
\stopsubsection
-\startsubsection[title={\prm{fontcharta}}]
+\startsubsection[title={\prm{fontcharta} and \prm{fontcharba}}]
\topicindex {glyphs + properties}
The \prm {fontcharwd}, \prm {fontcharht}, \prm {fontchardp} and \prm {fontcharic}
give access to character properties. To this repertoire \LUAMETATEX\ adds the top
-accent accessor \prm {fontcharta} which came in handy for tracing. You pass a
-font reference and character code. Normally only \OPENTYPE\ math fonts have this
-property.
+and bottom accent accessors \prm {fontcharta} and \prm {fontcharba} that came in
+handy for tracing. You pass a font reference and character code. Normally only
+\OPENTYPE\ math fonts have this property.
\stopsubsection
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -130,7 +130,7 @@
\NC \LUAMETATEX\ Version \EQ \currentdate \NC \NR
\NC \CONTEXT\ Version \EQ LMTX \contextversion \NC \NR
\NC \LUATEX\ Team \EQ Hans Hagen, Hartmut Henkel, Taco Hoekwater, Luigi Scarso \NC \NR
-\NC \LUAMETATEX\ Team \EQ Hans Hagen, Alan Braslau, Mojca Miklavec and Wolfgang Schuster, Mikael Sundqvist \NC \NR
+\NC \LUAMETATEX\ Team \EQ Hans Hagen, Alan Braslau, Mojca Miklavec, Wolfgang Schuster and Mikael Sundqvist \NC \NR
\NC resources and info at \EQ www.contextgarden.net\space\vl\space
www.pragma-ade.nl\space\vl\space
www.luametatex.org\space\vl\space
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-languages.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-languages.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-languages.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -130,7 +130,7 @@
constructed. When \prm {savinghyphcodes} was zero when the language got
initialized you start out with nothing, otherwise you already have a set.
-When a \prm {hjcode} is greater than 0 but less than 32 is indicates the
+When a \prm {hjcode} is greater than 0 but less than 32 the value indicates the
to be used length. In the following example we map a character (\type {x}) onto
another one in the patterns and tell the engine that \type {œ} counts as two
characters. Because traditionally zero itself is reserved for inhibiting
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-modifications.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-modifications.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-modifications.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -588,17 +588,19 @@
When it became unavoidable that we output more detail, it also became clear that
it made no sense to stay log and trace compatible. Some is controlled by
parameters in order to stay close the original, but \CONTEXT\ is configured such
-that we benefit from the new possibilities. Examples are that in addition to
-\prm {meaning} we have \prm {meaningfull} that also exposes macro properties,
-and \prm {meaningless} that only exposes the body. The \prm {untraced} prefix
-will suppress some in the log, and we set \prm {tracinglevels} to 3 in order to
-get details about the input and grouping level. When there's less shown than
-expected keep in mind that \LUAMETATEX\ has a somewhat optimized saving and
-restoring of meanings so less can happen which is reflected in tracing. When node
-lists are serialized (as with \prm {showbox}) some nodes, like discretionaries
-report more detail. The compact serializer, used for instance to signal overfull
-boxes, also shows a bit more detail with respect to non|-|content nodes. I math
-more is shown if only because we have more control and additional mechanisms.
+that we benefit from the new possibilities. Examples are that in addition to \prm
+{meaning} we have \prm {meaningfull} that also exposes macro properties, and \prm
+{meaningless} that only exposes the body; their companions \prm {meaningful} and
+\prm {meaningles} show no body but do show the preamble when present. The \prm
+{untraced} prefix will suppress some in the log, and we set \prm {tracinglevels}
+to 3 in order to get details about the input and grouping level. When there's
+less shown than expected keep in mind that \LUAMETATEX\ has a somewhat optimized
+saving and restoring of meanings so less can happen which is reflected in
+tracing. When node lists are serialized (as with \prm {showbox}) some nodes, like
+discretionaries report more detail. The compact serializer, used for instance to
+signal overfull boxes, also shows a bit more detail with respect to non|-|content
+nodes. I math more is shown if only because we have more control and additional
+mechanisms.
\stopsubsection
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-nodes.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-nodes.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-nodes.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -24,22 +24,64 @@
\blank
You can ask for a list of fields with \type {node.fields} and for valid subtypes
-with \type {node.subtypes}. The \type {node.values} function reports some used
-values. Valid arguments are \type {glue}, \type {style} and \type {math}. Keep in
-mind that the setters normally expect a number, but this helper gives you a list
-of what numbers matter. For practical reason the \type {pagestate} values are
-also reported with this helper, but they are backend specific.
+with \type {node.subtypes}. There are plenty specific field values and you can
+some idea about them by calling \type {tex.get*values()} which returns a table if
+numbers (exclusive numbers or bits):
-\def\ShowValues#1{
+\starttexdefinition ShowTeXValues #1
\blank
\dontleavehmode
- {\bf The return values of \type {node.values("#1")} are:}
+% {\bf The return values of \type {tex.get#1values()} are:}\space
+ {\bf #1:}\space
\showvalues{#1}
+% \showhexvalues{#1}
\blank
-}
+\stoptexdefinition
-\ShowValues{glue} \ShowValues{style} \ShowValues{math} \ShowValues{pagestate}
+\ShowTeXValues{fill}
+\ShowTeXValues{alignmentcontext}
+\ShowTeXValues{appendlinecontext}
+% \ShowTeXValues{automigration}
+\ShowTeXValues{charactertag}
+\ShowTeXValues{direction}
+\ShowTeXValues{discoption}
+\ShowTeXValues{discstate}
+% \ShowTeXValues{error}
+% \ShowTeXValues{flag}
+% \ShowTeXValues{frozenpar}
+\ShowTeXValues{glyphoption}
+\ShowTeXValues{group}
+\ShowTeXValues{hyphenation}
+\ShowTeXValues{io}
+\ShowTeXValues{kerneloption}
+\ShowTeXValues{listanchor}
+\ShowTeXValues{listgeometry}
+\ShowTeXValues{listsign}
+\ShowTeXValues{mathclassoption}
+\ShowTeXValues{mathcontrol}
+\ShowTeXValues{mathparameter}
+\ShowTeXValues{mathstylename}
+\ShowTeXValues{mathstyle}
+% \ShowTeXValues{mathvariant}
+% \ShowTeXValues{mode}
+\ShowTeXValues{noadoption}
+\ShowTeXValues{normalizeline}
+\ShowTeXValues{normalizepar}
+\ShowTeXValues{packtype}
+\ShowTeXValues{pagecontext}
+\ShowTeXValues{parbegin}
+\ShowTeXValues{parcontext}
+\ShowTeXValues{parmode}
+% \ShowTeXValues{runstate}
+% \ShowTeXValues{shapingpenalties}
+% \ShowTeXValues{specialmathclass}
+% \ShowTeXValues{textcontrol}
+There are a lot of helpers, especially for direct nodes. When possible they adapt
+to the kind of node they get passed. Often multiple values are returned which
+lessens the number of additional calls. It will take a while before all gets
+documented (which is no big deal as the main usage for them is in \CONTEXT).
+
\stopsection
\startsection[title={Main text nodes}]
@@ -754,8 +796,6 @@
\LL
\stoptabulate
-Valid styles are: \showvalues{style}.
-
\stopsubsubsection
\startsubsubsection[title={\nod {parameter} nodes}]
@@ -1381,7 +1421,7 @@
Only nodes with a subtype less than 256 are seen.
\startfunctioncall
-<direct> n, font, char = node.direct.traversechar(<direct> n)
+<direct> n, char, font = node.direct.traversechar(<direct> n)
\stopfunctioncall
The \type{traverseglyph} iterator loops over a list and returns the list and
@@ -1388,7 +1428,7 @@
filters all glyphs:
\startfunctioncall
-<direct> n, font, char = node.traverseglyph(<direct> n)
+<direct> n, char, font = node.traverseglyph(<direct> n)
\stopfunctioncall
These functions are only available for direct nodes.
@@ -2398,9 +2438,9 @@
nodes (although this last one is not used in native \SYNCTEX).
\startfunctioncall
-node.setsynctexfields(<integer> f, <integer> l)
+node.direct.setsynctexfields(<integer> f, <integer> l)
<integer> f, <integer> l =
- node.getsynctexfields(<node> n)
+ node.direct.getsynctexfields(<node> n)
\stopfunctioncall
Of course you need to know what you're doing as no checking on sane values takes
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-pdf.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-pdf.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-pdf.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -83,12 +83,12 @@
The returned codes are:
\starttabulate[|c|l|]
-\DB value \BC explanation \NC \NR
+\DB value \BC explanation \NC \NR
\TB
-\NC \type {-2} \NC the document failed to open \NC \NR
-\NC \type {-1} \NC the document is (still) protected \NC \NR
-\NC \type {0} \NC the document is not encrypted \NC \NR
-\NC \type {2} \NC the document has been unencrypted \NC \NR
+\NC \type {-2} \NC the document is (still) protected \NC \NR
+\NC \type {-1} \NC the document failed to open \NC \NR
+\NC \type {0} \NC the document is not encrypted \NC \NR
+\NC \type {1} \NC the document has been unencrypted \NC \NR
\LL
\stoptabulate
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-style.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-style.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-style.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -84,13 +84,14 @@
end
end
- function document.functions.showvalues(l)
+ function document.functions.showvalues(l,hex)
if l then
local n = table.count(l)
local i = 0
+ local f = hex and "%s{\\tttf %s} (0x%02X)" or "%s{\\tttf %s} (%i)"
for k, v in table.sortedhash(l) do
i = i + 1
- context("%s{\\tttf %s} (%i)", (i == 1 and "") or (i == n and " and ") or ", ", v,k)
+ context(f, (i == 1 and "") or (i == n and " and ") or ", ", v,k)
end
end
end
@@ -120,11 +121,11 @@
\protected\def\showfields #1{\ctxlua{document.functions.showfields("#1")}}
\protected\def\showid #1{\ctxlua{document.functions.showid("#1")}}
\protected\def\showsubtypes #1{\ctxlua{document.functions.showsubtypes("#1")}}
-\protected\def\showvalues #1{\ctxlua{document.functions.showvalues(node.values("#1"))}}
+\protected\def\showvalues #1{\ctxlua{document.functions.showvalues(tex.get#1values())}}
+\protected\def\showhexvalues#1{\ctxlua{document.functions.showvalues(tex.get#1values(),true)}}
\protected\def\showtypes {\ctxlua{document.functions.showvalues(node.types())}}
\protected\def\showvaluelist#1{\ctxlua{document.functions.showvalues(#1)}}
-
\definecolor[blue] [b=.5]
\definecolor[red] [r=.5]
\definecolor[green] [g=.5]
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -110,7 +110,7 @@
% because the amount of output which is sensitive for refresh delays set. The new
% target is nwo 50 pages per second for this manual but on this laptop that is
% unlikely to happen any time soon. With tabulateusesize and tabulatesparseskips
-% experimends enabled we needed 8.1 second and 44.3 pps.
+% experiments enabled we needed 8.1 second and 44.3 pps.
% \enableexperiments [tabulateusesize]
% \enableexperiments [tabulatesparseskips]
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-fonts.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-fonts.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-fonts.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -728,12 +728,13 @@
Note that at the moment, each access to the \type {font.fonts} or call to \type
{font.getfont} creates a \LUA\ table for the whole font unless you cached it.
+If you want a copy of the internal data you can use \type {font.getcopy}:
\startfunctioncall
-<table> f = font.getfont(<number> n)
+<table> f = font.getcopy(<number> n)
\stopfunctioncall
-So, this one will return a table of the parameters as known to \TEX. These can be
+This one will return a table of the parameters as known to \TEX. These can be
different from the ones in the cached table:
\startfunctioncall
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-languages.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-languages.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-languages.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -140,7 +140,7 @@
constructed. When \prm {savinghyphcodes} was zero when the language got
initialized you start out with nothing, otherwise you already have a set.
-When a \lpr {hjcode} is greater than 0 but less than 32 is indicates the
+When a \lpr {hjcode} is greater than 0 but less than 32 it indicates the
to be used length. In the following example we map a character (\type {x}) onto
another one in the patterns and tell the engine that \type {œ} counts as one
character. Because traditionally zero itself is reserved for inhibiting
@@ -369,7 +369,7 @@
\stopcombination
\stopbuffer
-\startplacefigure[locationreference=automatichyphenmode:1,title={The automatic modes \type {0} (default), \type {1} and \type {2}, with a \prm {hsize}
+\startplacefigure[reference=automatichyphenmode:1,title={The automatic modes \type {0} (default), \type {1} and \type {2}, with a \prm {hsize}
of 6em and 2pt (which triggers a linebreak).}]
\dontcomplain \tt \getbuffer[demo]
\stopplacefigure
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-lua.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-lua.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-lua.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -68,40 +68,41 @@
consequence. The following command|-|line options are understood:
\starttabulate[|l|p|]
-\DB commandline argument \BC explanation \NC \NR
+\DB commandline argument \BC explanation \NC \NR
\TB
-\NC \type{--credits} \NC display credits and exit \NC \NR
-\NC \type{--debug-format} \NC enable format debugging \NC \NR
-\NC \type{--draftmode} \NC switch on draft mode i.e.\ generate no output in \PDF\ mode \NC \NR
-\NC \type{--[no-]file-line-error} \NC disable/enable \type {file:line:error} style messages \NC \NR
-\NC \type{--[no-]file-line-error-style} \NC aliases of \type {--[no-]file-line-error} \NC \NR
-\NC \type{--fmt=FORMAT} \NC load the format file \type {FORMAT} \NC\NR
-\NC \type{--halt-on-error} \NC stop processing at the first error\NC \NR
-\NC \type{--help} \NC display help and exit \NC\NR
-\NC \type{--ini} \NC be \type {iniluatex}, for dumping formats \NC\NR
-\NC \type{--interaction=STRING} \NC set interaction mode: \type {batchmode}, \type {nonstopmode},
- \type {scrollmode} or \type {errorstopmode} \NC \NR
-\NC \type{--jobname=STRING} \NC set the job name to \type {STRING} \NC \NR
-\NC \type{--kpathsea-debug=NUMBER} \NC set path searching debugging flags according to the bits of
- \type {NUMBER} \NC \NR
-\NC \type{--lua=FILE} \NC load and execute a \LUA\ initialization script \NC\NR
-\NC \type{--[no-]mktex=FMT} \NC disable/enable \type {mktexFMT} generation with \type {FMT} is
- \type {tex} or \type {tfm} \NC \NR
-\NC \type{--nosocket} \NC disable the \LUA\ socket library \NC\NR
-\NC \type{--output-comment=STRING} \NC use \type {STRING} for \DVI\ file comment instead of date (no
- effect for \PDF) \NC \NR
-\NC \type{--output-directory=DIR} \NC use \type {DIR} as the directory to write files to \NC \NR
-\NC \type{--output-format=FORMAT} \NC use \type {FORMAT} for job output; \type {FORMAT} is \type {dvi}
- or \type {pdf} \NC \NR
-\NC \type{--progname=STRING} \NC set the program name to \type {STRING} \NC \NR
-\NC \type{--recorder} \NC enable filename recorder \NC \NR
-\NC \type{--safer} \NC disable easily exploitable \LUA\ commands \NC\NR
-\NC \type{--[no-]shell-escape} \NC disable/enable system calls \NC \NR
-\NC \type{--shell-restricted} \NC restrict system calls to a list of commands given in \type
- {texmf.cnf} \NC \NR
-\NC \type{--synctex=NUMBER} \NC enable \type {synctex} \NC \NR
-\NC \type{--utc} \NC use utc times when applicable \NC \NR
-\NC \type{--version} \NC display version and exit \NC \NR
+\NC \type{--credits} \NC display credits and exit \NC \NR
+\NC \type{--debug-format} \NC enable format debugging \NC \NR
+\NC \type{--draftmode} \NC switch on draft mode i.e.\ generate no output in \PDF\ mode \NC \NR
+\NC \type{--[no-]file-line-error} \NC disable/enable \type {file:line:error} style messages \NC \NR
+\NC \type{--[no-]file-line-error-style} \NC aliases of \type {--[no-]file-line-error} \NC \NR
+\NC \type{--fmt=FORMAT} \NC load the format file \type {FORMAT} \NC\NR
+\NC \type{--halt-on-error} \NC stop processing at the first error\NC \NR
+\NC \type{--help} \NC display help and exit \NC\NR
+\NC \type{--ini} \NC be \type {iniluatex}, for dumping formats \NC\NR
+\NC \type{--interaction=STRING} \NC set interaction mode: \type {batchmode}, \type {nonstopmode},
+ \type {scrollmode} or \type {errorstopmode} \NC \NR
+\NC \type{--jobname=STRING} \NC set the job name to \type {STRING} \NC \NR
+\NC \type{--kpathsea-debug=NUMBER} \NC set path searching debugging flags according to the bits of
+ \type {NUMBER} \NC \NR
+\NC \type{--lua=FILE} \NC load and execute a \LUA\ initialization script \NC\NR
+\NC \type{--[no-]mktex=FMT} \NC disable/enable \type {mktexFMT} generation with \type {FMT} is
+ \type {tex} or \type {tfm} \NC \NR
+\NC \type{--nosocket} or \type{--no-socket} \NC disable the \LUA\ socket library \NC\NR
+\NC \type{--socket} \NC enable the \LUA\ socket library \NC\NR
+\NC \type{--output-comment=STRING} \NC use \type {STRING} for \DVI\ file comment instead of date (no
+ effect for \PDF) \NC \NR
+\NC \type{--output-directory=DIR} \NC use \type {DIR} as the directory to write files to \NC \NR
+\NC \type{--output-format=FORMAT} \NC use \type {FORMAT} for job output; \type {FORMAT} is \type {dvi}
+ or \type {pdf} \NC \NR
+\NC \type{--progname=STRING} \NC set the program name to \type {STRING} \NC \NR
+\NC \type{--recorder} \NC enable filename recorder \NC \NR
+\NC \type{--safer} \NC disable easily exploitable \LUA\ commands \NC\NR
+\NC \type{--[no-]shell-escape} \NC disable/enable system calls \NC \NR
+\NC \type{--shell-restricted} \NC restrict system calls to a list of commands given in \type
+ {texmf.cnf} \NC \NR
+\NC \type{--synctex=NUMBER} \NC enable \type {synctex} \NC \NR
+\NC \type{--utc} \NC use utc times when applicable \NC \NR
+\NC \type{--version} \NC display version and exit \NC \NR
\LL
\stoptabulate
@@ -146,10 +147,10 @@
\startitem
First, it will parse the command line as usual, but it will only interpret a
- small subset of the options immediately: \type {--safer}, \type {--nosocket},
- \type {--[no-]shell-escape}, \type {--enable-write18}, \type
- {--disable-write18}, \type {--shell-restricted}, \type {--help}, \type
- {--version}, and \type {--credits}.
+ small subset of the options immediately: \type {--safer}, \type {--nosocket}
+ (\type {--no-socket}), \type {--socket}, \type {--[no-]shell-escape}, \type
+ {--enable-write18}, \type {--disable-write18}, \type {--shell-restricted},
+ \type {--help}, \type {--version}, and \type {--credits}.
\stopitem
\startitem
@@ -169,7 +170,8 @@
\starttabulate[|c|l|]
\DB library \BC functions \NC \NR
\TB
- \NC \type {os} \NC \type {execute} \type {exec} \type {spawn} \type {setenv}
+ \NC \type {os} \NC \type {execute} \type {exec} \type{kpsepopen}
+ \type {spawn} \type {setenv}
\type {rename} \type {remove} \type {tmpdir} \NC \NR
\NC \type {io} \NC \type {popen} \type {output} \type {tmpfile} \NC \NR
\NC \type {lfs} \NC \type {rmdir} \type {mkdir} \type {chdir} \type {lock}
@@ -181,6 +183,9 @@
Furthermore, it disables loading of compiled \LUA\ libraries and it makes
\type {io.open()} fail on files that are opened for anything besides reading.
+
+ Finally, it disables the \type {socket} library unconditionally (but not the
+ \type {mime} library which is always available).
\stopitem
\startitem
@@ -193,13 +198,24 @@
os.setlocale(nil,nil)
\stoptyping
- The \type {--nosocket} option makes the socket library unavailable, so that \LUA\
- cannot use networking.
+ The \type {--nosocket} (\type {--no-socket}) option makes the socket library
+ unavailable, so that \LUA\ cannot use networking; the \type {--socket} option
+ makes the socket library available.
- The switches \type {--[no-]shell-escape}, \type {--[enable|disable]-write18}, and
- \type {--shell-restricted} have the same effects as in \PDFTEX, and additionally
- make \type {io.popen()}, \type {os.execute}, \type {os.exec} and \type {os.spawn}
- adhere to the requested option.
+ The switches \type {--[no-]shell-escape}, \type {--[enable|disable]-write18},
+ and \type {--shell-restricted} have the same effects as in \PDFTEX, and
+ additionally make \type {io.popen()}, \type {os.execute}, \type {os.exec},
+ \type {os.kpsepopen} and \type {os.spawn} adhere to the requested option.
+
+ By default the socket library is not enabled: one can enable it with with
+ \type {--socket} or with \type {--shell-escape} (but without \type
+ {--shell-restricted}) and disable it with \type {--nosocket} (\type
+ {--no-socket}) or unconditionally with \type {--safer}.
+
+ In case of conflictual options, the most restrictive wins.
+
+ The \type{mime} library is always available.
+
\stopitem
\startitem
@@ -319,8 +335,8 @@
\startsubsection[title={Executing programs}]
-In keeping with the other \TEX|-|like programs in \TEXLIVE, the two \LUA\ functions
-\type {os.execute} and \type {io.popen}, as well as the two new functions \type
+In keeping with the other \TEX|-|like programs in \TEXLIVE, the \LUA\ functions
+\type {os.execute}, \type{os.kpsepopen} and \type {io.popen}, as well as the two new functions \type
{os.exec} and \type {os.spawn} that are explained below, take the value of \type
{shell_escape} and|/|or \type {shell_escape_commands} in account. Whenever
\LUATEX\ is run with the assumed intention to typeset a document (and by that we
@@ -339,7 +355,7 @@
{lfs.shortname} takes a file name and returns its short name on \type {win32}
platforms. Finally, for non|-|\type {win32} platforms only, we provided \type
{lfs.readlink} that takes an existing symbolic link as argument and returns its
-name. However, the \type library evolved so we have dropped these in favour of
+name. However, the \type {lfs} library evolved so we have dropped these in favour of
pure \LUA\ variants. The \type {shortname} helper is obsolete and now just
returns the name.
@@ -372,7 +388,7 @@
\type {string.utfcharacters(s)}: a string with a single \UTF-8 token in it
\stopitem
\startitem
- \type {string.cWharacters(s)}: a string containing one byte
+ \type {string.characters(s)}: a string containing one byte
\stopitem
\startitem
\type {string.characterpairs(s)}: two strings each containing one byte or an
@@ -421,7 +437,7 @@
the given code points
\stopitem
\startitem
- \type {string.utflength(s)}: returns the length oif the given string
+ \type {string.utflength(s)}: returns the length of the given string
\stopitem
\stopitemize
@@ -432,10 +448,14 @@
\startsubsection[title={Extra \type {os} library functions}]
-The \type {os} library has a few extra functions and variables: \libidx {os}
-{selfdir}, \libidx {os} {exec}, \libidx {os} {spawn}, \libidx {os} {setenv},
-\libidx {os} {env}, \libidx {os} {gettimeofday}, \libidx {os} {times}, \libidx
-{os} {tmpdir}, \libidx {os} {type}, \libidx {os} {name} and \libidx {os} {uname},
+The \type {os} library has a few extra functions and
+variables: \libidx {os} {selfdir}, \libidx {os} {exec},
+\libidx {os} {kpsepopen},
+\libidx {os} {socketgettime}, \libidx {os} {socketsleep},
+\libidx {os} {spawn}, \libidx {os} {setenv},
+\libidx {os} {env}, \libidx {os} {gettimeofday}, \libidx {os} {times},
+\libidx {os} {sleep}, \libidx {os} {tmpdir}, \libidx {os} {type},
+\libidx {os} {name} and \libidx {os} {uname},{os} {uname},
that we will discuss here.
\startitemize
@@ -496,6 +516,18 @@
\stopitem
\startitem
+ \type {os.kpsepopen(commandline,[opt])} is similar to \type {io.popen}
+ but with a preliminary check of the commandline;
+ if the check is ok then the return value is the same as in \type{io.popen};
+ Otherwise it will return the two values \type {nil} and \type {error}.
+\stopitem
+
+\startitem
+ \type {os.socketgettime} and \type {os.socketsleep} are the same as for
+ \type{socket.gettime} and \type{socket.sleep} but they are always available.
+\stopitem
+
+\startitem
\type {os.spawn(commandline)} is a returning version of \type {os.exec},
with otherwise identical calling conventions.
@@ -522,7 +554,7 @@
\stopitem
\startitem
- \type {os.times()}returns the current process times according to \ the
+ \type {os.times()}returns the current process times according to the
\UNIX\ C library function \quote {times}. This function is not available on
the \MSWINDOWS\ and \SUNOS\ platforms, so do not use this function for
portable documents.
@@ -529,12 +561,22 @@
\stopitem
\startitem
- \type {os.tmpdir()} creates a directory in the \quote {current directory}
+ \type {os.sleep(interval[, unit])} suspends the execution of the current run for
+ a given number of seconds. If the optional argument \type {unit} is present, the
+ function waits \type {interval / units} seconds. \type {os.sleep(1, 1000)}
+ for example pauses the program for one millisecond.
+\stopitem
+
+\startitem
+ \type {os.tmpdir([template])} creates a directory in the \quote {current directory}
with the name \type {luatex.XXXXXX} where the \type {X}-es are replaced by a
unique string. The function also returns this string, so you can \type
{lfs.chdir()} into it, or \type {nil} if it failed to create the directory.
The user is responsible for cleaning up at the end of the run, it does not
- happen automatically.
+ happen automatically. You can also use your own \type {template} for the name
+ of the temporary folder. However, the passed string must end with six capital
+ \type {X}-es. For example, the template \type {tmp.XXXXXX} could result in the
+ folder name \type {tmp.vX3gPo}.
\stopitem
\startitem
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-modifications.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-modifications.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-modifications.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1148,7 +1148,7 @@
paragraphs with only a local par node followed by direction synchronization
nodes. Paragraphs like that are seen as empty paragraphs and therefore ignored.
Because \type {\noindent} doesn't inject anything but a \type {\indent} injects
-an box, paragraphs with only an indent and directions are handles ad paragraphs
+an box, paragraphs with only an indent and directions are handled as paragraphs
with content.
\stopsubsection
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-nodes.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-nodes.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -962,7 +962,7 @@
\NC \type{width} \NC number \NC the width (not used in calculations) \NC \NR
\NC \type{height} \NC number \NC the height (not used in calculations) \NC \NR
\NC \type{depth} \NC number \NC the depth (not used in calculations) \NC \NR
-\NC \type{objnum} \NC number \NC the referenced \PDF\ (structure) object number \NC \NR
+\NC \type{objnum} \NC number \NC the referenced \PDF\ object number \NC \NR
\NC \type{data} \NC string \NC the annotation data \NC \NR
\LL
\stoptabulate
@@ -1005,7 +1005,7 @@
\NC \NC string \NC the destination name \NC \NR
\NC \type{dest_type} \NC number \NC type of destination \NC \NR
\NC \type{xyz_zoom} \NC number \NC the zoom factor (times 1000) \NC \NR
-\NC \type{objnum} \NC number \NC the \PDF\ object number \NC \NR
+\NC \type{objnum} \NC number \NC the \PDF\ object number; for structure references the \PDF\ object number of the linked structure element \NC \NR
\LL
\stoptabulate
@@ -1250,9 +1250,9 @@
\libindex {type}
\libindex {subtype}
-If the argument is a number, then the next function converts an internal
-numeric representation to an external string representation. Otherwise, it will
-return the string \type {node} if the object represents a node, and \type {nil}
+If the argument is a number, then the next function converts an internal numeric
+representation to an external string representation. Otherwise, it will return
+the string \type {node} if the object represents a node, and \type {nil}
otherwise.
\startfunctioncall
@@ -1321,7 +1321,7 @@
\libindex{flush_node}
\libindex{flush_list}
-The next one the node \type {n} from \TEX's memory. Be careful: no checks are
+The next one removes the node \type {n} from \TEX's memory. Be careful: no checks are
done on whether this node is still pointed to from a register or some \type
{next} field: it is up to you to make sure that the internal data structures
remain correct.
@@ -1722,7 +1722,7 @@
Only nodes with a subtype less than 256 are seen.
\startfunctioncall
-<node> n, font, char =
+<node> n, char, font =
node.traverse_char(<node> n)
\stopfunctioncall
@@ -1730,7 +1730,7 @@
filters all glyphs:
\startfunctioncall
-<node> n, font, char =
+<node> n, char, font =
node.traverse_glyph(<node> n)
\stopfunctioncall
@@ -1877,7 +1877,7 @@
\startfunctioncall
node.unprotect_glyph(<node> n)
-node.unprotect_glyphs(<node> n,[<node> n])
+node.unprotect_glyphs(<node> n,[<node> ,m])
\stopfunctioncall
Subtracts 256 from all glyph node subtypes. This and the next function are
@@ -1891,7 +1891,7 @@
\startfunctioncall
node.protect_glyph(<node> n)
-node.protect_glyphs(<node> n,[<node> n])
+node.protect_glyphs(<node> n,[<node> m])
\stopfunctioncall
Adds 256 to all glyph node subtypes in the node list starting at \type {n},
@@ -2195,8 +2195,8 @@
userdata nodes and there numeric references and back with:
\startfunctioncall
-<integer> d = node.todirect(<node> n))
-<node> n = node.tonode(<integer> d))
+<integer> d = node.direct.todirect(<node> n))
+<node> n = node.direct.tonode(<integer> d))
\stopfunctioncall
The userdata model is rather robust as it is a virtual interface with some
@@ -2334,11 +2334,14 @@
\supported {fields} \yes \nop
\supported {find_attribute} \yes \yes
\supported {first_glyph} \yes \yes
+\supported {fix_node_lists} \yes \nop
\supported {flatten_discretionaries} \yes \yes
\supported {flush_list} \yes \yes
\supported {flush_node} \yes \yes
+\supported {flush_properties_table} \yes \yes
\supported {free} \yes \yes
\supported {get_attribute} \yes \yes
+\supported {get_properties_table} \yes \yes
\supported {get_synctex_fields} \nop \yes
\supported {getattributelist} \nop \yes
\supported {getboth} \yes \yes
@@ -2345,10 +2348,12 @@
\supported {getbox} \nop \yes
\supported {getchar} \yes \yes
\supported {getcomponents} \nop \yes
+\supported {getdata} \nop \yes
\supported {getdepth} \nop \yes
\supported {getdirection} \nop \yes
\supported {getdir} \nop \yes
\supported {getdisc} \yes \yes
+\supported {getexpansion} \nop \yes
\supported {getfam} \nop \yes
\supported {getfield} \yes \yes
\supported {getfont} \yes \yes
@@ -2369,7 +2374,6 @@
\supported {getsubtype} \yes \yes
\supported {getsub} \nop \yes
\supported {getsup} \nop \yes
-\supported {getdata} \nop \yes
\supported {getwhd} \yes \yes
\supported {getwidth} \nop \yes
\supported {has_attribute} \yes \yes
@@ -2376,6 +2380,7 @@
\supported {has_field} \yes \yes
\supported {has_glyph} \yes \yes
\supported {hpack} \yes \yes
+\supported {hyphenating} \nop \yes
\supported {id} \yes \nop
\supported {insert_after} \yes \yes
\supported {insert_before} \yes \yes
@@ -2388,10 +2393,11 @@
\supported {last_node} \yes \yes
\supported {length} \yes \yes
\supported {ligaturing} \yes \yes
+\supported {make_extensible} \yes \nop
\supported {mlist_to_hlist} \yes \nop
\supported {new} \yes \yes
\supported {next} \yes \nop
-\supported {prepend_prevdepth} \nop \yes
+\supported {prepend_prevdepth} \yes \yes
\supported {prev} \yes \nop
\supported {protect_glyphs} \yes \yes
\supported {protect_glyph} \yes \yes
@@ -2399,6 +2405,7 @@
\supported {rangedimensions} \yes \yes
\supported {remove} \yes \yes
\supported {set_attribute} \yes \yes
+\supported {set_properties_mode} \yes \yes
\supported {set_synctex_fields} \nop \yes
\supported {setattributelist} \nop \yes
\supported {setboth} \nop \yes
@@ -2405,14 +2412,15 @@
\supported {setbox} \nop \yes
\supported {setchar} \nop \yes
\supported {setcomponents} \nop \yes
+\supported {setdata} \nop \yes
\supported {setdepth} \nop \yes
\supported {setdirection} \nop \yes
\supported {setdir} \nop \yes
\supported {setdisc} \nop \yes
+\supported {setexpansion} \nop \yes
\supported {setfam} \nop \yes
\supported {setfield} \yes \yes
\supported {setfont} \nop \yes
-\supported {setexpansion} \nop \yes
\supported {setglue} \yes \yes
\supported {setheight} \nop \yes
\supported {setkern} \nop \yes
@@ -2437,12 +2445,13 @@
\supported {subtypes} \yes \nop
\supported {subtype} \yes \nop
\supported {tail} \yes \yes
-\supported {todirect} \yes \yes
-\supported {tonode} \yes \yes
+\supported {todirect} \nop \yes
+\supported {tonode} \nop \yes
\supported {tostring} \yes \yes
\supported {traverse_char} \yes \yes
\supported {traverse_glyph} \yes \yes
\supported {traverse_id} \yes \yes
+\supported {traverse_list} \nop \yes
\supported {traverse} \yes \yes
\supported {types} \yes \nop
\supported {type} \yes \nop
@@ -2451,6 +2460,7 @@
\supported {unset_attribute} \yes \yes
\supported {usedlist} \yes \yes
\supported {uses_font} \yes \yes
+\supported {values} \yes \nop
\supported {vpack} \yes \yes
\supported {whatsits} \yes \nop
\supported {write} \yes \yes
@@ -2490,9 +2500,9 @@
nodes (although this last one is not used in native \SYNCTEX).
\startfunctioncall
-node.set_synctex_fields(<integer> f, <integer> l)
+node.direct.set_synctex_fields(<integer> n, <integer> f, <integer> l)
<integer> f, <integer> l =
- node.get_synctex_fields(<node> n)
+ node.direct.get_synctex_fields(<integer> n)
\stopfunctioncall
Of course you need to know what you're doing as no checking on sane values takes
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -73,7 +73,7 @@
\startdocument
[manual=Lua\TeX,
status=stable,
- version=1.10]
+ version=1.16]
\startnotmode[*export]
\component luatex-titlepage
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/gracht.mp
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/gracht.mp 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/gracht.mp 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1,6 +1,4 @@
% Converted from PostScript(TM) to MetaPost by pstoedit
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
% MetaPost backend contributed by Scott Pakin <pakin at uiuc.edu>
% pstoedit is Copyright (C) 1993 - 1999 Wolfgang Glunz <wglunz at geocities.com>
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/mycow.mp
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/mycow.mp 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/mycow.mp 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1,6 +1,4 @@
% Converted from PostScript(TM) to MetaPost by pstoedit
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
% MetaPost backend contributed by Scott Pakin <pakin at uiuc.edu>
% pstoedit is Copyright (C) 1993 - 1999 Wolfgang Glunz <wglunz at geocities.com>
Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-hownotto.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-hownotto.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-hownotto.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,76 @@
+% language=us runpath=texruns:manuals/musings
+
+\startcomponent musings-hownotto
+
+\environment musings-style
+
+\startchapter[title={How not to install \CONTEXT}]
+
+\startalign[flushleft]
+
+Installing LuaMetaTeX can be a complex process that requires some technical
+expertise, but the following steps should give you a general idea of what is
+involved:
+
+\startitemize[n]
+
+\startitem
+ First, you need to ensure that you have a recent version of the Lua
+ programming language installed on your system. You can download the latest
+ version of Lua from the official website at http://www.lua.org/download.html.
+ \footnote {The \LUA\ code needed is part of the source tree that can be
+ downloaded from GitHub or websites.}
+\stopitem
+
+\startitem
+ Next, you need to download the latest version of the MetaTeX distribution,
+ which includes the LuaMetaTeX engine, from the official ConTeXt Garden
+ website at https://wiki.contextgarden.net/ConTeXt_Standalone. \footnote
+ {There is no \METATEX, although we sometimes joke about it.}
+\stopitem
+
+\startitem
+ Once you have downloaded the MetaTeX distribution, extract the files to a
+ directory on your system. \footnote {So here one is stuck.}
+\stopitem
+
+\startitem
+ You can then run the LuaMetaTeX engine by opening a command prompt or
+ terminal window and navigating to the directory where you extracted the
+ MetaTeX files. From there, you can run the command "luametatex" followed by
+ the name of the TeX file you want to process. \footnote {Shouldn't it be
+ compiled first? And even then it needs some format, so one needs \type
+ {context} and \type {mtxrun}.}
+\stopitem
+
+\startitem
+ To make it easier to use LuaMetaTeX with your favorite text editor, you may
+ also want to install a TeX distribution such as TeX Live or MiKTeX, which
+ includes support for LuaMetaTeX. These distributions typically include a
+ graphical user interface that makes it easier to manage your TeX installation
+ and configure your system for use with LuaMetaTeX. \footnote {Indeed
+ installing \TEXLIVE\ is easier, as is installing the smaller reference
+ installation which uses \LUAMETATEX\ as its own installer. As far as we know,
+ \MIKTEX\ doesn't include \LMTX. And yes, consulting the documentation might
+ be best.}
+\stopitem
+
+\stopitemize
+
+It's worth noting that the exact steps for installing LuaMetaTeX may vary
+depending on your operating system and the specific TeX distribution you are
+using. For more detailed instructions, you may want to consult the official
+documentation for LuaMetaTeX and the TeX distribution you are using. \footnote
+{So here is the way out of the proposed mess.}
+
+\start \blank
+\bf by ChatGPT
+\footnote {Queried by Mikael Sundqvist.}
+\footnote {Which (at least here) is more about well formed sentences than about
+verified content. We can only hope that new \TEX\ users are able to recognize
+a fake.}
+\stop
+
+\stopalign
+
+\stoptext
Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-hownotto.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-texlive.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-texlive.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-texlive.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,319 @@
+% language=us runpath=texruns:manuals/musings
+
+\startcomponent musings-assumptions
+
+\environment musings-style
+
+\setuptolerance[tolerant,stretch]
+
+\startchapter[title={\CONTEXT\ in \TEXLIVE\ 2023}]
+
+Starting with \TEXLIVE\ 2023 the default \CONTEXT\ distribution is \LMTX, a
+follow up on \MKIV, running on top of the \LUAMETATEX\ engine instead of \LUATEX.
+Already for a long time the \MKII\ version used with \PDFTEX, \XETEX\ and \ALEPH\
+has been frozen and most users moved on from \MKIV\ to \LMTX\ (a more distinctive
+tag for what internally is version \MKXL).
+
+In principle one can argue that we now have three versions of \CONTEXT\ and there
+can be the impression that they are very different. However, although \MKXL\ can
+do more than \MKIV\ which can do more than \MKII, the user interface hasn't
+changed that much and old functionality is available in newer versions. Of course
+some old features make no sense in newer variants, like eight|-|bit font
+encodings in an \OPENTYPE\ font realm and input encodings when one uses \UTF,
+although we still support input encodings a.k.a.\ regimes. When we started using
+the \type {Mk*} suffixes the main reason was that we had to distinguish files and
+the official \TEX\ distribution doesn't permit duplicate file names. Using a
+distinctive suffix also makes it possible to treat files differently.
+
+\starttabulate[|T|c|c|c|Tl|]
+\BC suffix \BC engine \BC template \BC arguments \BC main file \NC \NR
+\HL
+\NC MkII \NC \PDFTEX, \XETEX, \ALEPH \NC \NC \NC context.mkii \NC \NR
+\HL
+\NC MkIV \NC \LUATEX, \LUAJITTEX, \LUAMETATEX \NC \NC \NC context.mkiv \NC \NR
+\NC MkVI \NC idem \NC \NC yes \NC \NC \NR
+\NC MkIX \NC idem \NC yes \NC \NC \NC \NR
+\NC MkXI \NC idem \NC yes \NC yes \NC \NC \NR
+\HL
+\NC MkXL \NC \LUAMETATEX \NC \NC \NC context.mkxl \NC \NR
+\NC MkLX \NC idem \NC \NC yes \NC \NC \NR
+\stoptabulate
+
+In this table \quote {template} files are a mix of \TEX\ and \LUA\ and originate
+in the early days of \MKIV; basically, they are a wink to active server pages.
+With \quote {arguments} we refer to files that accept named macro arguments which
+means that they need to be preprocessed. That started as a proof of concept but
+some core files are defined that way. Users will normally just use a \type {.tex}
+file.
+
+The \LUA\ files in the code base have the suffix \type {lua}, or when meant for
+\LUAMETATEX\ that uses a newer \LUA\ engine they can have the suffix \type {lmt}.
+There can also be \type {lfg} (font goodies) and \type {llg} (language goodies)
+plus byte|-|compiled files with various suffixes but these are normally not seen
+by users. We leave it at that.
+
+So, while \TEXLIVE\ 2022 installed \MKII\ and \MKIV, \TEXLIVE\ 2023 installs
+\MKIV\ and \LMTX. Therefore the most significant upgrade is in the engine that is
+used by default: \LUAMETATEX\ instead of \LUATEX. The \MKII\ files are no longer
+installed so we don't need \PDFTEX.
+
+So how did we end up here? Initially the idea was that, because \LUATEX\ is
+basically frozen, \LUAMETATEX\ would be the engine that we conduct experiments
+with and from which occasionally we could backport code to \LUATEX. However it
+soon became clear that this would not work out well so backporting is off the
+table now. Just for the record: the project started years ago so we're not
+talking about something experimental here. There have been articles in \TUGBOAT\
+about what we've been doing over the years.
+
+One of the first decisions I made when starting with \LUAMETATEX\ was to remove
+the built|-|in backend, which then meant also removing the bitmap image inclusion
+code. That made us get rid of dependencies on external libraries. In fact, a
+proof|-|of|-|concept experimental variant didn't use the built|-|in backend at
+all. The font loading code could be removed as well because that was not used in
+\MKIV\ either. In \MKIV\ we also don't use the \KPSE\ library for managing files
+so that code could be dropped from the engine tool; it can be loaded as
+so|-|called optional library if needed but I'll not discuss that here. If you
+look at what happens with the \LUATEX\ code base, you'll notice that updating
+libraries happens frequently and that is not a burden that we want to impose on
+users, especially because it also can involve updating build|-|related files.
+Another advantage of not using them is that the code base remains small.
+
+A direct consequence of all this was that the build process became much more
+efficient and less complex. A fast compilation (seconds instead of minutes) meant
+that more drastic experiments became possible, like most recently an upgrade of
+the math subsystem. All this, combined with an overhaul of the code base, both
+the \TEX\ and \METAPOST\ part, meant that backporting was no longer reasonable.
+Being freed from the constraint that other macro packages might use \LUAMETATEX\
+in turn resulted in more drastic experiments and adding features that had been on
+our wish list for decades. Another side effect was that we could easily compile
+native \MSWINDOWS\ binaries and immediately support transitions to \ARM|-|based
+hardware.
+
+Instead of \quotation {backporting after experimenting}, a leading motive became
+\quotation {fundamentally move forward} while at the same time tightening the
+relation between \CONTEXT\ and the engine: the engine code became part of the
+distribution so that users can compile themselves, which fits perfectly in the
+paradigm (and demands) of distributing all the source code, even that of the
+engine. There is also less danger that patches on behalf of other usage
+interferes with stable support for \CONTEXT. A specific installation is now more
+or less long|-|term stable by design because it no longer depends on binaries
+and|/|or libraries being provided for a specific platform and operating system
+version. Of course installers and \TEXLIVE\ do provide the binaries, so users
+aren't forced to worry about it, but they can move along with a system update by
+recompiling an old, and for their purpose, frozen \CONTEXT\ code base.
+
+An unofficial objective (or challenge) became that the accumulated source stays
+around 12~\MB\ uncompressed, (compressed a bit over 2~\MB) and the binary around
+3~\MB\ so that we could use the engine as an efficient \LUA\ runner as well as a
+launcher stub, thereby removing yet another dependency. That way the official
+\CONTEXT\ distribution didn't grow much in size. A bonus is that we now use the
+same setup for all operating systems. It also opened up the possibility of a
+exceptionally small installation with all bells and whistles included. Another
+nice side effect, combined with automatic compilation on the compile farm, makes
+that we can provide installations that reflect the latest state of affairs: a
+recent binary combined with the latest \CONTEXT. As a result, most users quickly
+went for \LMTX\ instead of \MKIV.
+
+In the code base we avoid dependencies on specific platforms but there are a few
+cases where the code for \MSWINDOWS\ and \UNIX\ differs. However, the
+functionality should be the same. A good test is that for \MSWINDOWS\ we can
+compile with mingw (cross|-|compilation), \MSVC\ (native) and clang (native);
+that order is also the order of runtime performance. The native \MSVC\ binary is
+the smallest but users probably don't care. In any case, it is nice to have a
+fallback plan in place. The code is all in \CCODE; the \METAPOST\ code is
+converted from \CWEB\ into \CCODE\ using a \LUA\ script but we also ship the
+resulting \CCODE\ code. The code base provides a couple of \CMAKE\ files and
+comes with a trivial build script.
+
+When I say that there are no libraries used, I mean external libraries. We do use
+code from elsewhere: adapted \type {avl} as well as \type {decnumber} (for the
+\METAPOST\ library), adapted \type {hjn} (hyphenation), \type {miniz} (zip
+compression), \type {pplib} (for loading \PDF\ files), \type {libcerf} (to
+complement other math library support, but it might be dropped), and \type
+{mimalloc} for memory management. However all the code is in the \LUAMETATEX\
+code base and only updated after checking what changed. The most important
+library originating elsewhere is of course \LUA: we use the latest and greatest
+(currently) 5.4 release. We kept the \type {socket} library but it might be
+dropped or replaced at some point. In addition there is a subsystem for
+dynamically loading libraries; the main reason for that being that I needed \type
+{zint} for barcodes, interfaces to sql databases, a bunch of compression
+libraries, etc. But all that is tagged {\em optional} and \CONTEXT\ will never
+depend on it. There are no consequences for compilation either because we don't
+need the header files. The glue code is very minimalistic and most work gets
+delegated to \LUA.
+
+Initially, because the backend is written in \LUA, there was a drop in
+performance of some 15\percent\ but that was stepwise compensated by gains in
+performance in the engine and additional or improved functionality. The \CONTEXT\
+code base is rather optimized so there was little to gain there, apart from using
+new features. Existing primitive support could also be done a bit more
+efficiently; it helps if one knows where potential bottlenecks are. Therefore, in
+the meantime an \LMTX\ run can be quite a bit faster than a \MKIV\ run and it can
+even outperform a \LUAJITTEX\ run. In practice, the difference between an
+eight|-|bit \MKII\ run using the eight|-|bit \PDFTEX\ engine and a 32|-|bit
+\LUAMETATEX\ run with \LMTX\ can be neglected, definitely on more complex
+documents. I never get complaints about performance from \CONTEXT\ users, so it
+might be a minor concern.
+
+So what are the main differences in the installation? If you really want to
+experience it you should use the standard installation. Currently the small
+installer is the engine that synchronizes the installation over the net and,
+assuming a reasonable internet connection, that takes little time. The
+installation is relatively small, and many of the bytes used are for the
+documentation. Updates are done by transferring only the changed files. The
+\TEXLIVE\ installation is a bit larger because it shares for instance fonts with
+the main installation and these come with resources used by other macro packages.
+Both installations bring \MKIV\ as well as \LMTX\ and therefore provide \LUATEX\
+as well as \LUAMETATEX. However, a \MKIV\ run is now managed by \LUAMETATEX\
+because we use that engine for the runner. The \MKII\ code is no longer in
+\TEXLIVE\ but is in the repositories and used to test and compare with \PDFTEX.
+It just works.
+
+The number of binaries and stubs is reduced to a minimum:
+
+\starttabulate[|T|T||]
+\BC file \BC symlink \BC \NC \NR
+\NC tex/texmf-platform/luametatex \NC \NC combined \TEX, \METAPOST\ and \LUA\ engine \NC \NR
+\NC tex/texmf-platform/mtxrun \NC luametatex \NC script runner, binary \NC \NR
+\NC tex/texmf-platform/context \NC luametatex \NC CONTEXT\ runner, binary \NC \NR
+\NC tex/texmf-platform/mtxrun.lua \NC \NC script runner, lua code \NC \NR
+\NC tex/texmf-platform/context.lua \NC \NC loader for \CONTEXT\ runner \NC \NR
+\NC tex/texmf-platform/luatex \NC \NC the good old ancestor \NC \NR
+\stoptabulate
+
+All of these programs are in the \CONTEXT\ distribution directory \typ
+{tex/texmf-<platform>/}. In addition, \type {context} and \type {mtxrun} are
+symlinks to the \type {luametatex} binary, where possible.
+
+So, the \type {context} command runs \type {luametatex}, but loads the \LUA\ file
+with the same name which in turn will locate the \CONTEXT\ management script
+(\type {mtx-context}) in the \TEX\ tree and run it. The same is true for \type
+{mtxrun}: it is a binary (link) that loads the script in (this time) the same
+path and then can perform numerous tasks. For instance, identifying the installed
+fonts so that they can be accessed by name is done with:
+
+\starttyping
+mtxrun --script font --reload
+\stoptyping
+
+Where in \MKII\ we had stubs for various utility scripts, already in \MKIV\ we
+went for a generic runner and a bit more keying. It's not like these scripts are
+used a lot and by avoiding shortcuts there is also little danger for a mixup with
+the ever|-|growing list of other scripts in \TEXLIVE\ or commands that the
+operating system provides.
+
+The \LUATEX\ binary is optional and only needed if a user also wants to process
+\MKIV\ files. There are no shell scripts used for launching. The two main calls
+used by users are:
+
+\starttyping
+context foo.tex
+context --luatex foo.tex
+\stoptyping
+
+A user has only to make sure that the binaries are in the path specification.
+When you run from an editor, the next command does the work:
+
+\starttyping
+mtxrun --autogenerate --script context <filename>
+\stoptyping
+
+with \type {<filename>} being an editor|-|specific placeholder. Like other
+engines, \LUAMETATEX\ (and \CONTEXT) needs a file database and format file, and
+although it should generate these automatically you can make them with:
+
+\starttyping
+mtxrun --generate
+context --make
+\stoptyping
+
+The rest of the installation is similar to what we always had and is \TDS\
+compliant. The source code of \LUAMETATEX\ is included in the distribution itself
+(which nicely fulfills the requirements) but can also be found at:
+
+\starttyping
+https://github.com/contextgarden/luametatex
+\stoptyping
+
+There are also some optional libraries there but \CONTEXT\ works fine without
+them. The official latest distribution of \CONTEXT\ itself is:
+
+\starttyping
+https://github.com/contextgarden/context
+https://github.com/contextgarden/context-distribution-fonts
+\stoptyping
+
+We see users grab fonts from the Internet and play with them. They can install
+additional fonts in \typ {tex/texmf-fonts/data/<vendor>}. Project|-|specific
+files can be collected in \typ {tex/texmf-project/tex/context/user/<project>}.
+These directories are not touched by installations and can easily be copied or
+shared between different installations. After adding files to the tree \typ
+{mtxrun --generate} will update the file database.
+
+In the distribution there are plenty of documents that describe how \LUAMETATEX\
+with \LMTX\ differs from \MKIV\ with \LUATEX: new primitives, macro extensions,
+more granular math rendering, improved memory management, new (or extended)
+(rendering) concepts, more \METAPOST\ features; most is covered in one way or
+another, and much is already applied in the \CONTEXT\ source code. After all, it
+took a few years before we arrived here so you can expect substantial refactoring
+of the engine as well as the code base, and therefore eventually there is (and
+will be) more than in \MKIV.
+
+When you compare a \CONTEXT\ installation with what is needed for other macro
+packages you will notice a few differences. One concerns the way \TEX\ is
+launched. An engine starts with a blank slate but can be populated with a
+so|-|called format file that is basically a memory dump of a preloaded macro
+package. So, the original way to process a file is to pass a format filename to
+the engine. In order to avoid that a trick is used: when an engine (or
+symlink|/|stub to it) is launched by its format name, the loading happens
+automatically. So, for instance \type {pdflatex} is actually an equivalent for
+starting \PDFTEX\ with the format file \typ {pdflatex.fmt} while \type {latex} is
+\PDFTEX\ with another format file (\typ {latex.fmt}) starting up in \DVI\ mode.
+And, as there are many engines, a specific macro package can have many such
+combinations of its name and engine.
+
+In \CONTEXT\ we don't do it that way. One reason is that we never distinguished
+between backends: \MKII\ uses an abstract backend layer and load driver files at
+runtime (it was one of the reasons why we could support \ACROBAT\ as soon as it
+showed up, because we already supported the now obsolete but quite nice
+\DVIWINDO\ viewer). And that model hasn't changed much as we moved on. Because we
+use a runner, we also don't need to distinguish between engines: all formats have
+the same name but sit on an engine subpath in the \TEX\ tree. Anyway, this
+already removes quite some formats. On the other hand, \CONTEXT\ can be run with
+different language specific user interfaces which means that instead of just
+\type {context.fmt} we have \type {cont-en.fmt} and possibly more, like \type
+{cont-nl.fmt}. So that can increase the number again but by default only the
+English interface is installed. As a side note: where with \MKII\ we needed to
+generate \METAPOST\ mem files, with its descendants having \MPLIB\ we load the
+(actually quite a bit of) \METAPOST\ code at runtime. \footnote {Occasionally I
+do experiments with loading the \TEX\ format code at runtime, but at this moment
+the difference in startup time of about one second (assuming files are cached) is
+too large and running over networks will be less fun, so the format file will
+stay. The time involved in loading \METAPOST\ can be brought down but for now I
+leave it as it is.}
+
+In addition to a format file, for the \LUATEX\ and \LUAMETATEX\ engine we also
+have a (small) \LUA\ loader alongside the format file. All this is handled by the
+runner, also because we provide extensive command line features, and therefore of
+no concern to users and package maintainers. However, it does make integrating
+\CONTEXT\ in for instance \TEXLIVE\ different from other macro packages and
+thereby puts an extra burden on the \TEXLIVE\ team. Here I want to thank the team
+for making it possible to move forward this way, in spite of this rather
+different approach. Hopefully a \LUAMETATEX\ integration is a bit easier in the
+long run because we no longer have different stubs per platform and at least the
+binary part now has no dependencies and only has a handful of files.
+
+For those new to \CONTEXT\ or those who want to try it in \TEXLIVE\ 2023 there is
+not much difference between the versions. However, \MKIV\ is now frozen and new
+functionality only gets added to \LMTX. Of course we could backport some but with
+most users already having moved on, it makes no sense. Just as we keep \MKII\
+around for testing with \PDFTEX, we also keep \MKIV\ alive for testing with
+\LUATEX. Maybe in a couple of years \MKIV\ will go the same route as \MKII:
+ending up in the archives as an optional installation. \footnote {This text
+appeared in \TUGBOAT\ around the 2023 \TEXLIVE\ release. Thanks to Karl Berry for
+his careful reading and fixing of the text and of course for keeping \TEXLIVE\
+alive.}
+
+\stopchapter
+
+\stopcomponent
Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-texlive.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-unicode.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-unicode.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-unicode.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,1584 @@
+% language=us runpath=texruns:manuals/math
+
+\def\unichar#1#2{#1 (U+#2: \char"#2)}
+
+\def\APL{\ss apl}
+
+% \useMPlibrary[dum]
+
+\startcomponent musings-unicode
+
+\environment musings-style
+
+% \usemodule[mathfun]
+
+\startchapter[title=Unicode]
+
+\startsection[title=Introduction]
+
+When working on a \TEX\ macro package for decades one can hardly avoid dealing
+with math; after all \TEX\ is pretty much about math. When this wonderful
+typesetting infrastructure was written it was all about quality and how to make
+your documents look nice. And for sure, Don Knuths documents looks nice, also
+because he pays a lot of attention to the \quotation {fine points of math
+typesetting}.
+
+The constraints of those time (like hardware, compilers, fonts, and for sure also
+time) made \TEX\ into what it is: eight bit character sets, eight bit fonts,
+eight bit hyphenation patterns, efficient memory usage and therefore carrying
+around as little as possible. It all makes sense. But one needs to pay attention.
+\footnote {And that is what Mikael Sundqvist and I have been doing a lot since we
+started upgrading math in \CONTEXT\ in combination with enhancing the math engine
+in \LUAMETATEX. The story here is a byproduct of our explorations and very much a
+combined effort.}
+
+Math typesetting is actually a sort of separated process in the engine:
+unprocessed lists go in and after some juggling a list of assembled boxes,
+glyphs, glues and penalties come out. I will not go into detail about that and
+only mention that in \LUAMETATEX\ we extended all this to be a bit more flexible
+and controllable, something that has been driven by the fact that we need to
+support \UNICODE\ fonts. This is all part of a related effort to move from eight
+bit \quote {everything} to \UNICODE\ \quote {everywhere}.
+
+Now, one can say a lot about \UNICODE\ but the main advantage is that it tries to
+cover \quote {all} characters ever encountered, including scripts (used in
+languages) that are long gone, as well as these little pictures that people like
+to see on the web: emojis. One can safely say that \UNICODE\ simplifies mixing
+languages and scripts, and thereby makes \TEX\ macro packages less complex. On
+the other hand, \UNICODE\ (or more precisely, related wide) fonts makes all kind
+of features possible and thereby add a complication.
+
+So, how about math? When Don Knuth gave us \TEX\ he also gave us fonts and there
+are plenty symbols in these fonts. But, as mathematicians seem to love variations
+on symbols soon more fonts arrived, most noticeably those from the \AMS\ that
+also added some more alphabets: mathematicians also love to render the shapes of
+letters differently. In order to access these glyphs names were invented that
+also sometimes suggested that there was some order in the matter. And, for some
+reason these names got aliases and soon we had a huge list of often obscure and
+inconsistent macro names. It didn't take long for a little mess and confusion to
+creep in.
+
+It has been said that the verbose \TEX\ math \ASCII\ input format is also a way
+for mathematicians to communicate, just because many use the same tool to render
+the formulas. Of course that gets obscured when one starts to add additional
+macros. It gets even more tricky once we start talking \quote {standard} as in
+\quotation {\LATEX\ is the standard}. That has for instance resulted in browsers
+interpreting \TEX\ like input without using \TEX\ (so how about expansion?). It
+has also sort of put \TEX\ into the range of possible word processing systems,
+which in turn leads to these \MSWORD\ versus Google docs versus \LATEX\ debates
+that can get rather nasty and unrealistic when it comes to discussing usage and
+quality. Interestingly, \MSWORD\ now has reasonable math, to some extent
+modelled after \TEX. It has some verbose \TEX\ like (but constrained) input and
+would do well for probably mostly people who occasionally have to inject some
+math. There were also attempts by the people at \MICROSOFT\ to normalize the
+input but we leave that aside now.
+
+However, because we now do have all these symbols and because source code editors
+make them accessible and show them there is a good chance that users will inject
+them, if only by cut and paste, so we do have to deal with that. This
+automatically puts us in the position that we need to deal with different
+meanings for the same symbol, which in turn might demand different spacing,
+penalties and such. In the end it is users that drive all this, not publishers;
+they don't really care and out|-|source typesetting anyway. We're not aware of
+any research and development being done and I suppose we would have noticed
+because after all we're involved in developing \LUATEX. It is one of the engines
+that does \OPENTYPE\ and \UNICODE\ math and no publisher or supplier ever took
+serious interest in it. From our perspective what users do is visible, everything
+else is hidden behind corporate curtains. And this is why nowadays we only need
+to care about users (mainly authors).
+
+Back to typesetting. For a long time all went well: one could typeset documents
+that looked good. Okay, not all looked good because not everyone paid attention to
+details, and the more the web evolved the more patching cut'n'paste of bad
+examples made its way into documents, but let's not start talking quality here.
+But then came \UNICODE\ and a while later people started talking about
+accessibility, cutting and pasting and more. In the meantime there had been
+developments like \MATHML\ and \OPENMATH\ that tried to structure and organize
+formulas in a more symbolic way. \footnote {It probably went unnoticed that
+\CONTEXT\ always supported rendering \MATHML, and as such had to deal with all
+the weird aspects (read: way it was used). Although one is not supposed to
+directly edit \MATHML\ we work with authors who are quite happy to do that simply
+because they code the documents in \XML\ because there is a need for high quality
+\PDF\ as well as \HTML\ output and a \CONTEXT\ based workflow can handle the
+\XML\ well. We're talking of large volumes here (mostly for basically free
+school math).}
+
+In the meantime the \TEX\ community had lost the edge on fonts, and \OPENTYPE\
+math was invented by \MICROSOFT\ and implemented in \MSWORD\ before a substantial
+number of \TEX\ users understood what was happening. They had it coming. To a
+large extend one can say the same about math in \UNICODE. Where a Greek capital
+\quote {A} is seen as different from a Latin capital \quote {A}, even when they
+often have the same shape, a math italic variable \quote {h} was made synonym to
+\quote {Planck constant}, as if the letters used in math had no meaning at all.
+We'll see that a wide hat is an extensible character of zero width combining hat
+accent, which makes for curious handling of the initial character. There is more
+granularity in some symbols, especially popular symbols like slashes and bars,
+than in letters. It is as if the math community didn't care much about how the
+letters (variables) were communicated and perceived but were picky about the
+slope of slashes. It seems more of a visual world, which might actually be the
+reason structured input never really took of. Maybe \TEX ies just love the mix of
+characters, commands, spacing directives. Maybe they just love to reposition and
+space these glyphs to suit all kind of curious non|-|standard math rendering.
+
+All this makes it pretty hard to communicate meaning, and it is just one of the
+examples where the \TEX\ community, for as far involved, failed to make a strong
+case. Our personal opinion is that no one really cared because in the \TEX\
+community it is all about rendering. The fact that we use math to communicate
+only gained attention when accessibility became hot and by then it was too late.
+Efforts like \OPENMATH\ started ambitious and in the end basically failed. Coding
+in \XML\ using \MATHML\ isn't much better and one always had to adapt to the
+latest fashion. Also, once plenty code shows up bugs become features. Browser
+support came and went and came back. Simplified input using for instance
+\ASCIIMATH\ started indeed simple but quickly became a (somewhat inconsistent)
+mess. What we see here is the same as everything web (and computer languages): we
+can do better, we start some project, then move on, and we end up with half|-|way
+abandoned results. The development cycles are short, results have to be achieved
+fast, there is no time (or interest) for iterating and refactoring. The word
+\quote {standard} and mantra \quote {everyone should use this} are quite popular.
+
+So where does that leave us with \TEX ? Well, with a mess. Decades of various
+efforts have not brought us a coherent system of organizing symbols and
+properties, made us end up with inconsistencies, made users revert to hacks,
+didn't make math easily transferable and complicates rendering. Personally we
+find it sort of strange that we spend time on for instance tagging and
+accessibility before we get these math alphabets and shared math specific symbols
+sorted out. If we cannot make good arguments for that (math being a script on its
+own with semantics and such) we waste energy and are pulling a dead horse. What
+puzzles us most is that one would expect mathematicians to be able to come up
+with strong arguments for a structured approach. But maybe it was simply the fact
+that \TEX\ math typesetting was pretty much driven by large commercial publishers
+and those providing services for them: the first category doesn't invest in these
+matters and even less today, and the second category makes money from sorting out
+the mess, so why get rid of it. Who knows. For us, it means that any complain
+about these matters deserves the same answer: the \TEX\ community created this
+mess, so it has to live with it. And the bad thing is: bugs and work|-|arounds
+eventually become features and then one is supposed to conform, even if deep down
+one knows better. It doesn't help that the community is proud of what it can
+render and has built itself a reputation that all is good.
+
+So why this criticism? Why not just abandon \TEX ? The answer is simple: \TEX\ is
+quite okay and cannot be blamed for where we are now. We need to think of
+solutions and in that respect the \CONTEXT\ users are lucky! They have always
+been told not to use this macro package for math because there are other
+standards and because publishers want \LATEX\ (even if they just let the
+manuscripts be recoded). That means that we don't really need to care much about
+the past. Those who use \CONTEXT\ can benefit from the compatibility we have
+anyway but also move forward to more structured and consistent math. It is in
+this perspective that we will discuss some more details next so that eventually
+we can draw some conclusions. The end goal is to have an additional layer of
+grouping math symbols that permits consistent high quality rendering in a mixed
+input environment.
+
+\stopsection
+
+\startsection[title=Molecules]
+
+Before we go into details about some characters, we spend some word on the
+rendering. The building blocks of a formula are atoms and internally the term
+nucleus is used for what we have without scripts. The simple sequence \type {1 +
+x} will result in a linked list of three atoms with three nuclei. In \type {x^2}
+the \type {x} is the nucleus. Atoms can have scripts: prescripts, postscripts and
+a prime. The majority of \UNICODE\ math characters become such atoms (nuclei and
+scripts) and they get a class property that determines their spacing, but that is
+not part of the \UNICODE\ specification. From the upcoming sections it will be
+clear that when we classify we don't get that much help from \MATHML\ or even the
+\TEX\ community either.
+
+In addition to these atoms the \LUAMETATEX\ engine (which builds upon \TEX) has
+what we can call molecules. There are several types: fractions, accents, fences,
+radicals. This distinction is to some extent present in \UNICODE: plenty of
+fraction related slashes, all kind of accents, vertical delimiters that can be
+made from snippets and act as fences, and a radical symbol. In \MATHML\ we see
+similar constructs but there in practice quite often operators need to be
+interpreted in a way that can distinguish between atoms and molecules. That is
+partly a side effect of applications that generate \MATHML. And as usual with
+standards pushed upon the world without years of exploration the confusion became
+part of the norm and will stay.
+
+In the \TEX\ engine over and under delimiters are implemented on top of radicals
+(using the same noad, the wrapper node for yet unprocessed math) but they have
+different code paths. Basically we have vertically fenced material and just like
+fractions have left and right fences as part of the concept (for binominals) the
+radical has a sort of left fence too. You can also wonder why we need accent
+noads while we support other delimiters with radicals. This organization mostly
+relates to subtypes and classes (and likely some limitations of the past) that
+have related spacing properties, but we can think if a generic structure noad and
+meaningful subtypes. However, that is not what we get so let's be more precise:
+
+{\bf Fractions:} these stack two atoms (or molecules) and separate them by a
+visible or phantom rule, or in \LUAMETATEX\ by a delimiter. They can have a left
+and right fence which originates in them also suitable for binominals. You may
+wonder why we don't use regular fences here. One reason we can think of is that
+when you fence something, you have an open and close class at the edges while
+with a fenced fraction the whole still is fraction. In \LUAMETATEX\ we can tweak
+classes at the edges but in regular \TEX\ there are fewer classes, so there
+constructs become ordinary or inner.
+
+{\bf Accents:} these put something on top of or below an atom (or molecule) and
+are driven by characters. The accent related commands take an integer
+(traditional) or three integers (extended) and it is this expected input that
+drives it. However, they are treated like delimiters. In traditional \TEX\ a
+delimiter is defined by two characters: the direct unscaled one, and when not
+found a second one drives the lookup from wider variants and eventually an
+extensible character. Accents just have the second one, which probably relates to
+the fact that the text ones that would be the starting point make no sense. It is
+this \quote {looking} for a single code point that makes that accents are not
+merged with the more general radical command space. Another reason is that
+accents deal a bit different with spacing and italic correction so even if we
+could merge, it would be more confusing in the end.
+
+{\bf Fences:} these come in pairs with optional middle ones. The reason for
+pairing is that they need to get the same size. That means that before we
+construct them the atom or molecule that they fence has to be analyzed. It also
+makes the result a construct of its own, although in \LUAMETATEX\ we can unpack
+that result so that it can be broken across lines. In practice that was never an
+issue because in a running text unscaled fences are used (just atoms with open
+and close classes assigned) but as soon as one goes to multi|-|line displays
+formulas things become more hairy. The related commands expect delimiters (the
+two part character definitions) but in the meantime are also happy with a single
+one because in the end \OPENTYPE\ math has all in one font.
+
+{\bf Radicals:} originally this only concerned roots but because they are
+basically wrappers we also use them for content that gets a delimiter above,
+below or both. In that sense the term radical can also be interpreted as \quote
+{extreme}, more than a carrot looking symbol. The related commands take one or
+more delimiters (or character) because we support left as well as right
+delimiters connected by a rule, so in the end radicals evolved into a construct
+with delimiters of all kind. So, the unique property of radicals is that the
+fences assume a cooperation between one or more glyphs and a rule. In \CONTEXT\
+we support actuarian hooks as radicals that are used for annuity expressions,
+otherwise the \UNICODE\ symbols is useless and the \MATHML\ construct complex.
+
+So, where accents take numbers as delimiter specification, fences, fractions and
+radicals take specific math quantities or just letters. This makes that we will
+not merge these into one scanner and handler even if they all use the same
+(large) noad to store and carry around their properties. Also, it has some charm
+to keep the original \TEX\ distinctions. After all, it's not like \UNICODE,
+\MATHML\ or \OPENTYPE\ math fonts have brought some new insights: in the end they
+all draw from \TEX\ and they way it's done there.
+
+\stopsection
+
+\startsection[title=Symbols]
+
+There are plenty of symbols in \UNICODE. When we try to get an idea how we ended
+up with that set we're surprised that not much seems to be known about it. There
+are references to \ISO\ standards, usage by specific organizations (like those
+dealing with patents), there are references to lists of publishers. In personal
+communications with people involved it becomes clear that the criterion that some
+symbols really has to be used somewhere doesn't apply to these math symbols.
+There are bizarre specimens that we cannot locate anywhere. They are often
+assigned the \quote {relation} property which for \TEX\ is a safe bet because
+binary and relations get similar spacing, but binary makes an exception when it
+sits at the front. The fact that relation spacing is used can even obscure the
+fact that some characters have zero width properties; the results just look
+somewhat bad and one can always blame the font or renderer and adding some thin
+spacing is accepted behavior. So one can make the argument that because \TEX\ was
+the main renderer of math, a safe bet was better than a confusing and
+unproven|-|by|-|usage assignment to some category.
+
+In \TEX\ some symbols have multiple names, even when they have the same class.
+This indicates the wish for meaning at one end but shape at the other, and once a
+name has been assigned it sticks. It would be interesting to know how
+mathematicians see formulas: if one puts \type {\bar}s around a variable does one
+see \quotation {bar x bar} or \quotation {the modulus of x}, and how is translation
+to audio to be performed?
+
+One important aspect of using any symbol in \TEX, or basically any typesetting
+system that deals with math, is that the spacing depends on the meaning. Now, in
+the perspective of \UNICODE\ meaning is somewhat diffuse. A Latin capital \quote
+{A} related to \quote {a} is not the same as a Greek capital \quote {A} that
+relates to \quote {\alpha}. So, from the shape one cannot beforehand deduce what is
+meant, but when copying it the \UNICODE\ will expose the meaning. This is not the
+case in math: although many symbols have one meaning only, there are also plenty
+that can mean different things and the (\TEX) math community has not been able to
+make a strong case for providing different slots. Maybe the reason was that there
+already was a tradition of using commands that then relate a shape to a class
+that then results in appropriate spacing. Maybe it is also assumed that an
+article or book starts by explaining what a specific symbol means in that
+particular context. But that doesn't help much for copying. It also doesn't help
+with direct \UNICODE\ input. The way out for this last problem is that in
+\CONTEXT\ we will add additional properties to characters that then can
+communicate the class and thereby control the spacing. Although we initially did
+that at the \LUA\ end we now use the lightweight dictionary feature of the
+engine: a property, group, slot model. The main reason is that we foresee that at
+some point we might have to add property based rendering to the engine, and this
+opens up that possibility. Ever since we started with \LUATEX\ and \MKIV\ we have
+used the character database (in \LUA\ format) to store most properties so that we
+have all in one place.
+
+For figuring out the properties we can look at how traditionally symbols got
+multiple commands associated, how \MATHML\ looks at it, what \UNICODE\ reveals and
+what we find in fonts. It is a bit of jungle out there so for sure we have to
+make decisions ourselves. We next turn to that exploration.
+
+\stopsection
+
+\startsection[title=Slashes]
+
+The definition on the \WIKIPEDIA\ page [1] of slashes is as follows:
+
+\startquotation
+ The slash is an oblique slanting line punctuation mark /. Once used to mark
+ periods and commas, the slash is now used to represent exclusive or inclusive
+ or, division and fractions, and as a date separator. It is called a solidus
+ in \UNICODE, is also known as an oblique stroke, and has several other
+ historical or technical names including oblique and virgule.
+\stopquotation
+
+The page then has a very detailed description on how slashes are used in text,
+mathematics, computing, currency, dates, numbering, linguistic transcriptions,
+line breaks, abbreviations, proofreading, fiction, libraries, addresses, poetry,
+music, sports, and text messages. It is a pretty good and detailed page which also
+gives a nice summary of usage in math.
+
+In mathematics, we use the slash (a forward leaning bar) for fractions, division,
+and quotient of set. Examples of fractions are $\vfrac {1} {2}$ but also
+$\percent$ sits in this category.
+
+\starttabulate[|T|l|l|]
+\NC U+0002F \NC \switchtobodyfont[stixtwo]$\utfchar{"0002F}$ \NC this is the official solidus \NC \NR % /
+\NC U+02044 \NC \switchtobodyfont[stixtwo]$\utfchar{"02044}$ \NC the mathematical fraction slash \NC \NR % ⁄
+\NC U+02215 \NC \switchtobodyfont[stixtwo]$\utfchar{"02215}$ \NC the mathematical division slash \NC \NR % ∕
+\NC U+02571 \NC \switchtobodyfont[stixtwo]$\utfchar{"02571}$ \NC a diagonal box drawing line \NC \NR % ╱
+\NC U+029F8 \NC \switchtobodyfont[stixtwo]$\utfchar{"029F8}$ \NC the mathematical big solidus \NC \NR % ⧸
+\NC U+0FF0F \NC \switchtobodyfont[stixtwo]$\utfchar{"0FF0F}$ \NC a full width solidus \NC \NR % /
+\NC U+1F67C \NC \switchtobodyfont[stixtwo]$\utfchar{"1F67C}$ \NC the very heavy solidus \NC \NR % 🙼
+\stoptabulate
+
+The \STIX\ fonts have the first five, the rest is not there, so we can safely
+assume that they are not used in math. That brings us to the question that, say
+that the other ones are used, how does the user access them? In the editor they
+often look pretty much the same. For \TEX ies the answer is easy: you use a
+command. But as we already mentioned, there we enter a real fuzzy area: these
+commands either describe a shape or they communicate a meaning, at least, in an
+ideal world. Sometimes wrapping in a macro helps, like \typ {$\vfrac {1} {2}$}.
+
+In the document that explains \UNICODE\ math there is a section \quotation
+{Fraction Slash and Other Diagonals}. Even if we limit ourselves to the forward
+leaning slashes it looks like we need to include
+exotic symbols, as the empty set symbol with an left arrow on top: \type
+{U+29B4} a circle with left pointing arrow on top, that doesn't show up in most
+math fonts but \STIX\ has it {\switchtobodyfont[stixtwo]{$⦴$}}. We quote:
+
+\startquotation
+ \type {U+2044 ⁄} \typ {FRACTION SLASH} is typically used to build up simple
+ skewed fractions in running text. It applies to immediately adjacent
+ sequences of decimal digits, that is, to spans of characters with the General
+ Category property value \type {Nd}. For example, \type {1⁄2} should be
+ displayed as \type {½}. In ordinary plain text, any character other than a
+ digit delimits the numerator or denominator. So \type {5 1⁄2} should be
+ displayed as \type {5½} since a space follows the \type {5}. In general
+ mathematical use, a more versatile method for layout of fractions is needed
+ (see, for example, Section 2.1 of [UnicodeMath]), however parsers of
+ mathematical texts should be prepared to handle \typ {FRACTION SLASH} when it
+ is received from other sources. \type {U+27CB}
+ \typ {MATHEMATICAL RISING DIAGONAL} and \type {U+27CD}
+ \typ {MATHEMATICAL FALLING DIAGONAL} are
+ mathematical symbols for specific uses, to be distinguished from the more
+ widely used solidi and reverse solidi operators as well as from
+ nonmathematical diagonals.
+\stopquotation
+
+In \TEX\ there is no parsing going on: we just get sequences of atoms and the
+inter atom spacing applies. Curly braced arguments are used to communicate units
+that needs to be treated a while. As side note: where for some scripts there are
+special characters that tell where something (state) starts and ends this is not
+available for math, which makes it impossible to mark a sequence of characters as
+being something math. The whole repertoire of pre|-|composed fractions and super-
+and subscripted \UNICODE\ symbols are not to be used in math.
+
+Most documents that somehow relate to or (partially) originate in \TEX\ can
+be rather fuzzy, so we can read here:
+
+\startquotation
+ \type {U+27CB} corresponds to the \LATEX\ entity \type {\diagup} and \type
+ {U+27CD} to \type {\diagdown}. Their glyphs are invariably drawn with 45° and
+ 135° slopes, respectively, instead of the more upright slants typical for the
+ solidi operators. The diagonals are also to be distinguished from the two box
+ drawing characters \type {U+2571} and \type {U+2572}. While in some fonts
+ those characters may be drawn with 45° and 135° slopes, respectively, they
+ are not intended to be used as mathematical symbols. One usage recorded for
+ \type {U+27CB} and \type {U+27CD} is in the notation for spaces of double
+ cosets.
+\stopquotation
+
+So, it is the angles that math users should translate into meaning which I guess
+is natural for them. From the above we cannot deduce if we should take them into
+account in a macro package.
+
+The \MATHML\ specification [3] keeps it abstract and talks about division without
+mentioning the rendering. In content \MATHML\ we have:
+
+\starttyping
+divide = element divide { CommonAtt, DefEncAtt, empty}
+\stoptyping
+
+and the suggested rendering (from an example) is a slash.
+
+In the chapter \quotation {Characters, Entities and Fonts} there is mentioning of:
+
+\startquotation
+ There is one more case where combining characters turn up naturally in
+ mathematical markup. Some relations have associated negations, such as \type
+ {U+226F} [\typ {NOT GREATER-THAN}] for the negation of U+003E [\typ
+ {GREATER-THAN SIGN}]. The glyph for U+226F [NOT GREATER-THAN] is usually just
+ that for U+003E [\typ {GREATER-THAN SIGN}] with a slash through it. Thus it
+ could also be expressed by \type {U+003E}|-|\type {U+0338} making use of the
+ combining slash \type {U+0338} [COMBINING LONG SOLIDUS OVERLAY]. That is true
+ of 25 other characters in common enough mathematical use to merit their own
+ \UNICODE\ code points. In the other direction there are 31 character entity
+ names listed in [\typ {Entities}] which are to be expressed using \type
+ {U+0338} [\typ {COMBINING LONG SOLIDUS OVERLAY}].
+\stopquotation
+
+A curious note is this:
+
+\startquotation
+ For special purposes, one may need a symbol which does not have a \UNICODE\
+ representation. In these cases one may use the \type {mglyph} element for
+ direct access to a glyph as an image, or (in some systems) from a font that
+ uses a non|-|\UNICODE\ encoding. All \MATHML\ token elements accept
+ characters in their content and also accept an \type {mglyph} there. Beware,
+ however, that use of \type {mglyph} to access a font is deprecated and the
+ mechanism may not work in all systems. The \type {mglyph} element should
+ always supply a useful alternative representation in its alt attribute.
+\stopquotation
+
+At some point we experimented with very precise positioned \HTML\ from \TEX\
+(read: \CONTEXT) and that worked very well: the rendering was exactly the same as
+\PDF\ but then suddenly it was no longer possible to access glyphs from fonts. The
+assumption had become that one should feed text into the font rendering machinery
+and use \OPENTYPE\ features to access specific shapes, which of course is a
+fragile approach (the libraries and logic keep evolving, and the most robust
+access is simply by index, or by glyph name if present, assuming that one uses
+the font that was meant to be used). So, how the \MATHML\ glyph element is
+supposed to work out well is not clear. Anyway, as we want nicely typeset math we
+don't care that much if features present in \LUAMETATEX\ and \CONTEXT\ are unique
+and cannot be reproduced otherwise.
+
+In \type {mathclass.txt} [4] which is \quotation {{\em not} formally part of the
+\UNICODE\ Character Database at this time} we see a classification:
+
+\starttabulate[|T|l|]
+\NC U+0002F \NC binary \NC \NR
+\NC U+02044 \NC binary \NC \NR
+\NC U+02215 \NC binary \NC \NR
+\NC U+02571 \NC not mentioned \NC \NR
+\NC U+029F8 \NC n-ary or large operator, often takes limits \NC \NR
+\NC U+0FF0F \NC not mentioned \NC \NR
+\NC U+1F67C \NC not mentioned \NC \NR
+\stoptabulate
+
+So, in the end we can focus on the four that are mentioned, and we will do that
+with the above in mind as well as what is common in the \TEX\ world. We will look
+at usage, classification (groups) and classes.
+
+% modern % ok, both the same
+% cambria % different, no extensible /
+% bonum % ok, both the same
+% pagella % ok, both the same
+% stixtwo % only / extensible, 2044 useless
+% lucida % both extensible, 2044 looks bad and more slope
+
+Unfortunately this sort of mess also results in a mess in fonts. For instance
+when we checked out the difference between \type {U+002F} and \type {U+2044} we
+found that in the fonts produced by the \TEX Gyre project both have proper
+dimensions (and look the same), so they can be used stand alone, but also as
+delimiters. In Cambria the dimensions are okay but only \type {U+2044} has
+extensible characters. In \CONTEXT\ we have defined \type {\slash} to use that slot but
+when you test Lucida and \STIX2 the results are disappointing: In Lucida the
+width of \type {U+2044} makes it unusable (it looks bad anyway), and in \STIX2 it
+is a bit wider so in the end it even becomes fuzzy what to recommend as fix:
+quarter width, half width or full width. Defining \type {\slash} as any of them
+gives at some point an issue so in the end we just patch the font in the goodie
+file: we make them the same and make sure they have extensible characters. After all,
+chances are slim that this will ever be fixed. In that respect a newer engine
+doesn't change the problem: we need to handle it in the macro package, but at
+least that can be done a bit more natural. \footnote {In principle, we can support
+the goodies in the generic font handler, but we think it makes no sense because it
+also relates to the way math is handled in general and supporting a wide range of
+different applications can only cripple the code, let along that agreeing on
+matters can be hard.}
+
+% \ctxlua{table.tocontext(characters.data[0x002F],"[0x002F]")}
+% \ctxlua{table.tocontext(characters.data[0x2044],"[0x2044]")}
+% \ctxlua{table.tocontext(characters.data[0x2215],"[0x2215]")}
+% \ctxlua{table.tocontext(characters.data[0x2571],"[0x2571]")}
+% \ctxlua{table.tocontext(characters.data[0x29F8],"[0x29F8]")}
+
+\stopsection
+
+\startsection[title=Bars]
+
+Again we start with the \WIKIPEDIA\ page, this time the one dedicated to bars
+[5]. The page starts with mathematics so that suggests that the (initial) author
+is familiar with usage in that field: if we cut and paste the itemized list we
+even get \TEX\ math (sort of). Examples of usage are: absolute value,
+cardinality, conditional probability, determinant, distance, divisibility,
+function evaluation, length, norm, order, restriction, set|-|builder notation,
+the Sheffer stroke in logic, subtraction, but also \quotation {A vertical bar can
+be used to separate variables from fixed parameters in a function, or in the
+notation for elliptic integrals}.
+
+Among the objectives of our exploration are grouping symbols in sets that
+represent related meanings and usage. Within these groups we can fine tune with
+classes but that is more geared at rendering. Although currently users enter
+specific usage of symbols with the same shape (or even \UNICODE) with commands we
+can imagine them entering the \quote {real} characters and in that case we need
+some automatic class assignment based on a group (or set of groups). The
+\WIKIPEDIA\ page mentions that in physics \quotation {The vertical bar is used in
+bra|–|ket notation in quantum physics}. It then goes on about usage in computing,
+phonetics and literature. This ordering is different from the slashes, but okay.
+
+The page then makes a distinction between solid and broken bars and there is some
+interesting history behind that, which relates to typewriters, terminals and
+printers in the perspective of distinction and indeed we noticed that on our
+keyboard the broken bar is still used, even if the rendering is solid. The
+page ends with the \UNICODE\ bars and entities. We mention most:
+
+\starttabulate[|T|l|l|]
+\NC U+007C \NC \switchtobodyfont[stixtwo]$\utfchar{"007C}$ \NC a single vertical line \NC \NR % |
+\NC U+00A6 \NC \switchtobodyfont[stixtwo]$\utfchar{"00A6}$ \NC a single broken line \NC \NR % ¦
+\NC U+2016 \NC \switchtobodyfont[stixtwo]$\utfchar{"2016}$ \NC a double vertical line (norms) \NC \NR % ‖
+\NC U+2223 \NC \switchtobodyfont[stixtwo]$\utfchar{"2223}$ \NC divides \NC \NR % ∣
+\NC U+2225 \NC \switchtobodyfont[stixtwo]$\utfchar{"2225}$ \NC parallel lines \NC \NR % ∥
+\NC U+2502 \NC \switchtobodyfont[stixtwo]$\utfchar{"2502}$ \NC a vertical box drawing line \NC \NR % │
+\NC U+FF5C \NC \switchtobodyfont[stixtwo]$\utfchar{"FF5C}$ \NC a fullwidth vertical line \NC \NR % |
+\stoptabulate
+
+Given the mentioned wide range of usage it will be clear bars that can be confusing
+and are pretty overloaded. We're not aware of broken bars being used in math, so
+we ignore these.
+
+The \UNICODE\ math draft talks of \quote {vertical lines} and distinguishes two
+series, delimiters:
+
+\starttabulate[|T|l|l|]
+\NC U+007C \NC \switchtobodyfont[stixtwo]$\utfchar{"007C}$ \NC single vertical lines \NC \NR
+\NC U+2016 \NC \switchtobodyfont[stixtwo]$\utfchar{"2016}$ \NC double vertical lines \NC \NR
+\NC U+2980 \NC \switchtobodyfont[stixtwo]$\utfchar{"2980}$ \NC triple vertical lines \NC \NR
+\stoptabulate
+
+and operators:
+
+\starttabulate[|T|l|l|]
+\NC U+2223 \NC \switchtobodyfont[stixtwo]$\utfchar{"2223}$ \NC divides (single line) \NC \NR
+\NC U+2225 \NC \switchtobodyfont[stixtwo]$\utfchar{"2225}$ \NC parallel (double lines) \NC \NR
+\NC U+2AF4 \NC \switchtobodyfont[stixtwo]$\utfchar{"2AF4}$ \NC binary relation (tripple lines) \NC \NR
+\NC U+2AFC \NC \switchtobodyfont[stixtwo]$\utfchar{"2AFC}$ \NC s large triplle operator \NC \NR
+\stoptabulate
+
+Watch the triples: these are not (yet) in the \WIKIPEDIA\ summary. Rightfully
+there is a remark that the official \UNICODE\ descriptions use \typ {BAR} and
+\typ {LINE} but \TEX ies can't complain about that, can they? After all, they
+also use these terms mixed.
+
+The delimiters sit at the edges but sometimes also in the middle. The operators
+are between other elements and the document states that they also should grow.
+And is it mentioned that spacing depends on usage. The large triple is an n-ary
+operator but as usual with math symbols the user (reader) has to guess what that
+actually means.
+
+It is actually unfortunate that the fences have no left, middle and right
+variant. Even if these render the same it would make life easier and consistency
+with other fences is also worth something. One wonders how it would have looked
+if accessibility demands had kicked in earlier. The \UNICODE\ \type
+{mathclass.txt} [4] provides:
+
+\starttabulate[|T|l|]
+\NC U+007C \NC fence (unpaired delimiter) \NC \NR
+\NC U+2016 \NC fence (unpaired delimiter) \NC \NR
+\NC U+2980 \NC fence (unpaired delimiter) \NC \NR
+\stoptabulate
+
+We assume that the unpaired qualification is actually an indication that usage as
+what in \TEX\ is called \quote {middle} is okay. The operators are classified as:
+
+\starttabulate[|T|l|]
+\NC U+2223 \NC relation \NC \NR
+\NC U+2225 \NC relation \NC \NR
+\NC U+2AF4 \NC binary \NC \NR
+\NC U+2AFC \NC large n-ary \NC \NR
+\stoptabulate
+
+% \ctxlua{table.tocontext(characters.data[0x007C],"[0x007C]")}
+% \ctxlua{table.tocontext(characters.data[0x00A6],"[0x00A6]")}
+% \ctxlua{table.tocontext(characters.data[0x2016],"[0x2016]")}
+% \ctxlua{table.tocontext(characters.data[0x2980],"[0x2980]")}
+% \ctxlua{table.tocontext(characters.data[0x2223],"[0x2223]")}
+% \ctxlua{table.tocontext(characters.data[0x2225],"[0x2225]")}
+% \ctxlua{table.tocontext(characters.data[0x2AF4],"[0x2AF4]")}
+% \ctxlua{table.tocontext(characters.data[0x2AFC],"[0x2AFC]")}
+
+The main problem with bars in \TEX\ is that there is no distinction between a
+left and right bar which makes it impossible to use them directly as fences. On
+can consider this to be an omission to \UNICODE\ math because shape rules over
+meaning. So anyway, this is something that a macro package has to deal with. If
+needed these can get a class on their own in which case we can define atom
+spacing rules that deal with them ending up left or right. In \UNICODE\ there are
+signals that deal with bidirectional text, so we see no reason why there shouldn't
+be similar provisions for math.
+
+\stopsection
+
+\startsection[title=Hyphens and Dashes]
+
+This section applies to text and math as both are riddled with horizontal lines:
+easy to scratch in wood, chisel in stone or draw on paper symbols. We limit
+ourselves to the straight ones, but similar observations can be made for curved
+ones.
+
+\WIKIPEDIA\ distinguishes hyphens, minus, and dashes so there are multiple pages
+dedicated to this. The page about minus mentions that there are three usages
+(somewhat rephrased):
+
+\startitemize[packed]
+ \startitem
+ It is used as subtraction operator and therefore a binary operator
+ that indicates the operation of subtraction.
+ \stopitem
+ \startitem
+ It can be function whose value for any real or complex argument is the
+ additive inverse of that argument.
+ \stopitem
+ \startitem
+ It can serve as a prefix of a numeric constant. When it is placed
+ immediately before an unsigned numeral, the combination names a negative
+ number, the additive inverse of the positive number that the numeral
+ would otherwise name.
+ \stopitem
+\stopitemize
+
+The functional variant is how content \MATHML\ sees it: you apply a minus
+operator to something, singular of multiple. We were surprised to see that there
+is a distinctive rendering suggested, something we have argued for at several
+occasions (mostly \TEX\ meetings):
+
+\startquotation
+ In many contexts, it does not matter whether the second or the third of these
+ usages is intended: \type {−5} is the same number. When it is important to
+ distinguish them, a raised minus sign \type {¯} is sometimes used for negative
+ constants, as in elementary education, the programming language \APL, and some
+ early graphing calculators.
+\stopquotation
+
+Unfortunately that distinction was not recognized by the \TEX\ community at large
+which (we guess) is why we don't see it in \UNICODE, which on the other hand has
+plenty dashes as we will see soon.
+
+The page mentions usage in indicating blood types and music, which is a nice
+detail. It also mentions usage in computing, including regular expressions and in
+physics and chemistry indicating charge. It lists these codes for minus symbols:
+
+\starttabulate[|Tl|l|]
+\NC U+002D \NC hyphen minus \NC \NR
+\NC U+2212 \NC minus \NC \NR
+\NC U+FE63 \NC small hyphen minus \NC \NR
+\NC U+FF0D \NC full width hyphen minus \NC \NR
+\stoptabulate
+
+The page also mentions the commercial minus \type {⁒} (see also [7]) and division
+sign \type {÷} (see also [8]) and we think these should be supported in math mode
+simply because they can be part of (even simple text style) formulas.
+
+The fact that we use the hyphen as minus and expect it to render as a wider dash
+like shape is something that related to math mode in \TEX\ speak. In text mode we
+expect it to be seen as hyphenation related indicator. We won't go into details
+about automated hyphenation and explicit hyphens in text mode but here are the
+hyphens as mentioned on the hyphen specific \WIKIPEDIA\ page:
+
+\starttabulate[|Tl|l|]
+\NC U+002D \NC hyphen minus \NC \NR
+\NC U+00AD \NC soft hyphen \NC \NR
+\NC U+2010 \NC hyphen \NC \NR
+\NC U+2011 \NC non breaking hyphen \NC \NR
+\stoptabulate
+
+You might wonder why we mention text variants here and one reason is that we
+actually might need to provide a catch for the last two: maybe when a user copies
+these from a document (when rendered at all) we need to treat them as the simple
+hyphen minus and just remap them to the math minus when in math mode. Below, we
+will discuss dashes, and although these are also meant for text, a reason for
+exploring these can be found in the fact that \TEX\ users like to decorate the
+content in unexpected ways and lines (or rules) fit into that. The \WIKIPEDIA\
+pages go into some details about the hyphens being used in compounds and there
+can be some confusion about whether to use endashes or hyphens for that. We're
+pretty sure that typesetting wars have been fought over that. Usage as pre- and
+suffixes definitely is worth noting (and we use them as such in this sentence).
+
+We leave out all the other usages and see what there is to tell about related
+symbols. The \WIKIPEDIA\ page about dashes is an extensive one. It starts out with
+the distinction between \unichar {figure dash} {2012}, \unichar {endash} {2013},
+\unichar {emdash} {2014} and \unichar {horizontal bar} {2015}. Of these a \TEX ie
+will for sure recognize the endash and emdash. The hyphen is not a dash but if
+you look at \TEX\ input that double or triple hyphens get ligatured into en- and
+emdashes! The only certainty one has is that the endash is often half the width
+of an emdash. Also, the width of the emdash is often the same as the font size.
+
+One reason why a language subsystem of a \TEX\ macro package is complex is that
+it has to deal with cultural aspects and the usage as well as spacing around all
+these dashes can differ. When trying to support that a macro writer soon finds
+out that one user of language~X can tell you the rules are done this way, and a
+while later you get a mail from another user who claims that in language~X the
+rules are done that way. Word processing and dominance of English probably adds
+to the confusion. The same is true for quotes, but math doesn't need these, so we
+skip them. Now wait, you will say: does math use these dashes? Users probably
+will mix them in but more important is that the width of these dashes also has
+associated skips: \type {\enspace} and \type {\emspace} or \type {\quad} and
+these one definitely see users mix into math.
+
+The figure dash has the same width as digits which makes them useful in tables. In
+the fonts that come with \TEX\ it is the reverse: the digits have the same width
+and that width matches the endash. There is no habit of using the figuredash, but
+we might need to change that. After all, we now have the fonts! We do need to
+deal with the figure dash because users might mix math and text in tables, and
+although you can find plenty of badly typeset by \TEX\ tables, this is no excuse
+for using a mix of minus and figure dash in inconsistent ways.
+
+The \WIKIPEDIA\ page mentions the usage of the endash: as connector, as compound
+hyphen, and as sentence interrupter. Now the one that needs some attention is the
+second one. In Dutch, we can combine words in many ways and for educational
+purposes adding a compound dash makes sense. However, because the weight of the
+hyphen and endash in \TEX\ fonts is rather incompatible, in \CONTEXT\ we use(d)
+fakes: two overlapping hyphens. Another complication is that one has to wrap that
+in a discretionary node in order to make the hyphenator happy, but that is now
+delegated to the engine that can be configured to see certain characters as valid
+hyphenation points. Although we support discretionaries in math this doesn't
+relate to dashes but to pluses and minuses and such. The engine supports explicit
+discretionaries but can also automatically repeat symbols that are set up as
+repeatable across lines. We're not sure if users actually use en- and emdashes in
+math mode, but one can occasionally run into examples (on the web) where special
+effects are achieved in curious ways. \footnote {The math stream doesn't go
+through the font handler although embedded \type {\hbox}es get that treatment.
+This means that two hyphens in a row are just two atoms and not get collapsed to
+an endash.}
+
+It is worth pointing out that \WIKIPEDIA\ discusses \quotation {Ranges of values}
+and this is something we need to investigate in the perspective of math! Strictly
+spoken that is a text thing, but \unknown\ Among the many observed and suggested
+patterns we note that among \TEX ies using the endash as itemize symbols is
+also popular.
+
+Usage of the emdash is related to the use of parenthesis or colons, so it is more
+a kind of punctuation. It can also be used as an interrupt and again it is a
+candidate for an itemize symbol. There is of course a \TEX\ thing there: lack of
+text symbols made for a rather mixed usage of math and text symbols in
+itemizations. For instance a dotted one uses the well visible math dot instead of
+the often hardly visible text dot that simply was not present in \TEX\ fonts, so
+our eyes got accustomed to the bolder ones. It is one of the reasons why a \TEX\
+macro package load a math font even when no math is used. Over the years in \TEX\
+math and text symbols have been mixed in various ways, also a side effect if the
+limited amount of characters in text fonts and the abundance of them in math
+mode, even if most are only accessible by name. We need to deal with that
+historic mix.
+
+The page rightfully mentions that \TEX\ has no horizontal bar, also known as
+\quote {quotation dash}, used for dialogues in some languages. We should make a
+note then that it might be good to see if we have to reconfigure the
+sub|-|sentence presets to match that expectation. The proposed hack {\red MPS:
+where?} for a missing symbol is somewhat curious:
+
+\starttyping
+x \hbox{---}\kern-.5em--- x
+\stoptyping
+
+\startbuffer[dash-example]
+\uleaders \hbox to 1.5em {---\hskip 0pt minus .5em---} \hskip.125em minus .125em \relax
+\stopbuffer
+
+Why not \type {\hbox {---\kern-.5em---}} or just \type {---\kern-.5em---} to get
+the same effect? This also assumes that the font collapses these three hyphens
+into a dash, then it backtracks the symbol width and does a second one.
+\footnote {Here is some food for thought: for this kind of usage one can argue
+that such a dash should have some stretch. In \LUAMETATEX\ and therefore
+\CONTEXT\ we can do this: \typeinlinebuffer [dash-example] and get: \dorecurse
+{30} {x \getbuffer [dash-example] x}. Boxed material can be stretched and be
+taken into account when creating paragraphs. It is no big deal to wrap that in a
+macro, say \type {\figuredashed}.} Anyway, where figure dashes are related to
+minuses we can probably ignore this super minus resembling horizontal bar.
+\footnote {We can actually issue a warning when it is used in math mode.}
+
+The \WIKIPEDIA\ page ends with a summary of all kind of dashes, including
+underscores, script specific symbols, accents (like macron), modifiers and curly
+ones. Here we only mention the ones that can end up in some source when one cuts
+and pastes. Doing that can result in missing characters (because not all fonts
+provides them) or a change in meaning (for as far as the symbols relates to an
+intention). We show some that fit into this discussion and also mention the
+\UNICODE\ description:
+
+\starttabulate[|T|lb{\ttx}|p|]
+\NC U+002D \NC HYPHEN-MINUS \NC the usual hyphen but also used as minus \NC \NR
+\NC U+005F \NC LOW LINE \NC aka underscore \NC \NR
+\NC U+00AD \NC SOFT HYPHEN \NC valid hyphenation point (invisible) \NC \NR
+\NC U+2010 \NC HYPHEN \NC the real hyphen but more work on a keyboard \NC \NR
+\NC U+2011 \NC NON-BREAKING HYPHEN \NC a hard hyphen, disables following hyphenation \NC \NR
+\NC U+2012 \NC FIGURE DASH \NC see discussion above \NC \NR
+\NC U+2013 \NC EN DASH \NC see discussion above \NC \NR
+\NC U+2014 \NC EM DASH \NC see discussion above \NC \NR
+\NC U+2015 \NC HORIZONTAL BAR \NC see discussion above \NC \NR
+\NC U+2043 \NC HYPHEN BULLET \NC used in itemized lists \NC \NR
+\NC U+207B \NC SUPERSCRIPT MINUS \NC combined with pre-superscripted characters \NC \NR
+\NC U+208B \NC SUBSCRIPT MINUS \NC combined with pre-subscripted characters \NC \NR
+\NC U+2212 \NC MINUS SIGN \NC the math minus (rendering of hyphen) \NC \NR
+\NC U+23AF \NC HORIZONTAL LINE EXTENSION \NC build long connected horizontal lines \NC \NR
+\NC U+23E4 \NC STRAIGHTNESS \NC represents line straightness in technical context \NC \NR
+\NC U+2500 \NC BOX DRAWINGS LIGHT HORIZONTAL \NC part of the box-drawing repertoire \NC \NR
+\NC U+2796 \NC HEAVY MINUS SIGN \NC a visual variant with no meaning \NC \NR
+\NC U+2E3A \NC TWO-EM DASH \NC a visual variant with no meaning \NC \NR
+\NC U+2E3B \NC THREE-EM DASH \NC a visual variant with no meaning \NC \NR
+\NC U+FE58 \NC SMALL EM DASH \NC a visual variant with no meaning \NC \NR
+\NC U+FE63 \NC SMALL HYPHEN-MINUS \NC a visual variant with no meaning \NC \NR
+\NC U+FF0D \NC FULLWIDTH HYPHEN-MINUS \NC a visual variant with no meaning \NC \NR
+\stoptabulate
+
+The \UNICODE\ math draft only mentions the hyphen: \footnote {When I copy this
+snippet into the document source there are \typ {START OF TEXT} symbols at the
+places where a hyphenation occurs, which is probably a side effect of a bad \type
+{TOUNICODE} entry in the \PDF\ file, but it is kind of interesting in this
+perspective as definitely a hyphen is rendered.}
+
+\startquotation
+ Minus sign. \type {U+2212} [or] \type{−} [known as] \typ {MINUS SIGN} is the
+ preferred representation of the unary and binary minus sign rather than the
+ \ASCII|-|derived \type {U+002D} [or] \type {-} [known as] \typ
+ {HYPHEN-MINUS}, because minus sign is unambiguous and because it is rendered
+ with a more desirable length, usually longer than a hyphen.
+\stopquotation
+
+and elsewhere we can read:
+
+\startquotation
+ The \ASCII\ hyphen minus \type {U+002D} [or] \type {-} is a weakly
+ mathematical character that may be used for the subtraction operator, but
+ \type {U+2212} [or] \type {−} [known as] \typ {MINUS SIGN} is preferred for
+ this purpose and looks better.
+\stopquotation
+
+We are not aware of the concept of weak mathematical characters, so we will not
+take that property too serious when we try to improve the rendering.
+
+This is basically it. There is no mentioning of classes (after all, traditional
+\TEX\ has no unary class) so it is assumed that the renderer does the right
+thing: interpreting the sequence of characters and apply spacing accordingly.
+There are users who like to see a unary minus being rendered differently, just as
+the minus that a student is supposed to key in a calculator and while the
+\WIKIPEDIA\ page mentions this explicitly, it is ignored here. Yes, having two
+distinctive slots for this would have been great. Maybe it is not seen as
+relevant enough by the community that would benefit most, but who knows what had
+happened it the \WIKIPEDIA\ page had been there before!
+
+The minus is mentioned in the somewhat curious section about how shapes should be
+positioned relative to the baseline, where the position of the minus relates to
+what in \TEX\ speak is the math axis. There is also some mentioning of non-mathematical use, like:
+
+\startquotation
+ The concept of mathematical use is deliberately kept broad; therefore the
+ Math property is also given to characters that are used as operators, but are
+ not part of standard mathematical notation, such as \type {U+2052} \typ
+ {COMMERCIAL MINUS}.
+\stopquotation
+
+There should be no confusion with the \typ {SET MINUS} which renders as a
+backslash, a \typ {(NEG\-ATED) MINUS TILDE} or \typ {(NEG\-ATED) SIMILAR MINUS
+SIMILAR} that look more like relations. {\red MPS: overfull hbox, and do you
+intend to hyphenate?}
+
+The \MATHML\ document recognizes the minus as being unary or binary. In content
+\MATHML\ it is easy: when applied to a single atom it is a unary. In presentation
+\MATHML\ minus is an operator that sits at the front of a row (unary) or in the
+middle (binary). Keep in mind that we are limited to \type {mn} for numbers,
+\type {mi} for alphabetic symbols and \type {mo} for operators, not to be
+confused with \TEX's math operators, because in \MATHML\ relations are also
+operators. One can wonder about a minus in \type {mn} elements.
+
+So to summarize: we definitely need to make sure that (whatever renders as)
+hyphens is dealt with in math as minus. We can wonder what to do with
+(especially) en- and emdashes and the other horizontal lines that actually might
+show up as (what we call) middle delimiters in mathematical constructs: if it's
+there, \TEX ies will use it! The lack of specific symbols for unary minus has to
+be compensated at the macro package level.
+
+% \ctxlua{table.tocontext(characters.data[0x002D],"[0x002D]")}
+% \ctxlua{table.tocontext(characters.data[0x2010],"[0x2010]")}
+% \ctxlua{table.tocontext(characters.data[0x2011],"[0x2011]")}
+% \ctxlua{table.tocontext(characters.data[0x2212],"[0x2212]")}
+% \ctxlua{table.tocontext(characters.data[0x2212],"[0x2213]")}
+% \ctxlua{table.tocontext(characters.data[0x2212],"[0x2214]")}
+% \ctxlua{table.tocontext(characters.data[0x2212],"[0x2215]")}
+% \ctxlua{table.tocontext(characters.data[0xFE63],"[0xFE63]")}
+% \ctxlua{table.tocontext(characters.data[0xFF0D],"[0xFF0D]")}
+
+% U+2043 HYPHEN BULLET
+% U+207B SUPERSCRIPT MINUS
+% U+208B SUBSCRIPT MINUS
+
+\stopsection
+
+\startsection[title=Pieces]
+
+In \UNICODE\ one can find all kind of constructors, for instance characters that
+find their origin in those character sets that had lines and corners for drawing
+on a terminal. It is therefore no surprise that there are also some constructors
+that relate to math. An example demonstrates this:
+
+\startbuffer[definition]
+\def\makeweird#1#2#3#4%
+ {\vcenter\bgroup
+ \offinterlineskip
+ \hbox{$\scriptscriptstyle\char"#1$}\par
+ \hbox{$\scriptscriptstyle\char"#2$}\par
+ \hbox{$\scriptscriptstyle\char"#3$}\par
+ \hbox{$\scriptscriptstyle\char"#4$}%
+ \egroup}
+
+\def\lwA{\mathopen {\makeweird{23A7}{23A8}{23A8}{23A9}}}
+\def\rwA{\mathclose{\makeweird{23AB}{23AC}{23AC}{23AD}}}
+\def\lwB{\mathopen {\makeweird{23A7}{23AC}{23AC}{23A9}}}
+\def\rwB{\mathclose{\makeweird{23AB}{23A8}{23A8}{23AD}}}
+\def\lwC{\mathopen {\makeweird{23A7}{23AC}{23A8}{23A9}}}
+\def\rwC{\mathclose{\makeweird{23AB}{23A8}{23AC}{23AD}}}
+\stopbuffer
+
+\startbuffer[demo]
+$\lwA x + 4 + \lwB x^2 + 4^2 + \lwC x^3 + 4^3 \rwC \rwB \rwA$
+\stopbuffer
+
+\typebuffer[definition,demo]
+
+This renders as:
+
+\startlinecorrection
+\getbuffer[definition]
+\scale[width=\textwidth]{\getbuffer[demo]}
+\stoplinecorrection
+
+So, we have official \UNICODE\ characters for constructing large fences. In the
+\UNICODE\ math documents there is some mentioning of this and interesting is that
+there are suggested compositions expressed in 2, 3, 5 etc. stacked \quote {lines}
+which makes one wonder how math is perceived (or supposed to be rendered). But
+what is really weird is that there are plenty of arrows but no snippets defined that
+can be used to create extended ones. Why vertical snippets and no horizontal
+ones? This is clearly an omission and the \TEX\ community did take care of this
+need. So, for horizontal arrows and alike one expects the font to handle it and
+for fences not?
+
+It is not only fences that have snippets, we also find them for integrals. But
+for vertical arrows they are lacking: that is completely up to the font. Now, for
+us that is fine, but again, for consistency they could have been there. It would
+make it possible to filter bits and pieces from fonts using official slots
+instead of private ones. So, to some extent we can best assume there is nothing
+like that and ignore whatever pieces are in \UNICODE\ anyway (like the braces in
+the example). One can even argue that because of this inconsistency a font
+designed can as well only use private slots and not provide snippets at all.
+
+So, how do we get out of this situation? Because no one cared getting it in
+\UNICODE, we can do as we like. Of course, we can define arrow fillers as has
+always been done in \TEX, but because in \LUAMETATEX\ we have a bit more in our
+toolkit, and because we want to support stretch fractions (where the rule is
+replaced by a horizontal delimiter) it was decided to define a tweak that deals
+with this: when the basic arrows have no horizontal parts defined, we just
+assemble them. For those arrows that have a hook or so at the other end, we use
+the space as extender. \footnote {Actually we no longer do that because the
+engine will center the arrow anyway when it's too short.} If we ever end up with
+proper snippets un \UNICODE\ then we also need adapted fonts, and then we can get
+rid of these hacks. That said: because all decent math fonts do have the three
+pairs or fences (brace, parenthesis, bracket) the vertical snippets are rather
+useless, unless one wants to construct assembled weird ones. This would be
+different for horizontal assemblies, because there is more variety in them.
+
+The official name for all related to characters that can stretch is \quote
+{delimiter}. In traditional \TEX\ one can define a command that becomes a
+character. In that case a family, class and slot is assigned. You can also
+directly access a character in which case one will assign these properties
+otherwise (no command is defined). The same is true for these delimiters.
+However, in traditional \TEX\ the larger character usually comes from a so called
+extension font and uses family~3). In \OPENTYPE\ fonts we have all in one font so
+there the large family, class, and slot are not used.
+
+An interesting side effect of the updated math machinery in \LUAMETATEX\ is that
+we no longer really need delimiter specifications when we use \OPENTYPE\ fonts.
+This is because in practice the only two classes that really matter are the open
+and close ones. There are basically two kinds of delimiters: fences and
+singulars. Fences need open and close and only bars have a dual character. So,
+when we don't define it as delimiter, the engine can still use that character and
+take its assigned class when used stand|-|alone, while in the case of fences
+these themselves are of class open and close. And, for instance a left brace can
+get class open because when used stand alone it is an unscaled left fence. In the
+rare case that one really need a different class we are using commands: some
+characters can be binary, ordinary or whatever so then commands relate a name to
+a class|-|character combination. Actually, in \CONTEXT\ we will switch to using
+dictionaries and field specific rendering instead, but that is a different story.
+We can illustrate the arrows with an example:
+
+\startbuffer
+$ x +
+ \left\downarrow a \uparrow \frac{1}{b} \downarrow c \right\uparrow
+= y $
+\stopbuffer
+
+\typebuffer
+
+The stand alone arrows are defines with class relation but when used as fences
+their spacing is driven by the fences themselves.
+
+\startlinecorrection
+\scale[width=\textwidth]{\showmakeup[mathglue]\mathspacingmode1\showglyphs\getbuffer}
+\stoplinecorrection
+
+This means that in \CONTEXT\ \LMTX\ we no longer have delimiter code definitions.
+Of course the engine has to be able to use math characters of any kind (by
+commands, direct or as \UTF) as delimiters, but that was not that hard to
+provide. It also simplifies the code we use for fencing as it can be less
+selective.
+
+Another interesting side effect of once again looking into these stretched
+characters is that the fraction mechanism that already was extended with skewed
+fractions, now supports any stretchable character as alternative for a fraction
+rule.
+
+\startbuffer
+$
+ p \leftarrowtext {a + b + c + d}{x + y} q
+ \quad
+ p \frac {a + b + c + d}{x + y} q
+$
+\stopbuffer
+
+\typebuffer
+
+Watch the difference in spacing: here the class of the used delimiter determines the
+spacing around the (pseudo) fraction:
+
+\startlinecorrection
+\scale[width=\textwidth]{\showmakeup[mathglue]\mathspacingmode1\showglyphs\getbuffer}
+\stoplinecorrection
+
+Again this simplifies some code because normally one ends up with stacking stuff
+using leaders in between.
+
+\stopsection
+
+\startsection[title=Accents]
+
+When we talk about accents, we refer to tiny symbols that anchor themselves onto
+base characters. We limit ourselves to the ones common in Latin scripts because
+they are the ones used in math. Accents in \UNICODE\ are somewhat special. In
+the past, when encoding vectors were limited, accents were entered as part of an
+input sequence and then anchored by the renderer. Nowadays often pre|-|composed
+characters are used. A very cheap way of anchoring is to have accents that just
+overlay, and in practice centering an accent over a base character works sort of
+okay. As an example of an accent we will use the hat:
+
+\starttabulate[|T|c|l|c|]
+\NC U+005E \NC x\char"005E x m\char"005E m\NC \tex {Hat} \NC \im{x \char"005E x + m\char"005E m} \NC \NR % 94
+\NC U+02C6 \NC x\char"02C6 x m\char"02C6 m\NC \tex {hat} \NC \im{x \char"02C6 x + m\char"02C6 m} \NC \NR % 710
+\NC U+0302 \NC x\char"0302 x m\char"0302 m\NC \tex {widehat} \NC \im{x \char"0302 x + m\char"0302 m} \NC \NR % 770
+\stoptabulate
+
+Normally the font handler will take care of anchoring \type {U+0302}, but it can
+only be done properly when there are anchors defined for what are called \quote
+{marks}: the official feature description is mark|-|to|-|base (or simply \type
+{mark}). The last column in the above table shows math and as we input a raw
+character we don't get proper anchoring: the zero width makes it overlap.
+
+% till here
+
+Now wait, you will say, but why does it actually overlap? The reason is that zero
+width is not actually zero width here! The glyph has a bounding box that goes
+into the negative horizontal direction and therefore, when such a shape gets
+injected into the output, the rendering in the viewer will move the left edge to
+the left. But because the \TEX\ engine only handles positive widths and because
+the width is explicitly part of a character specification anyway\footnote {The
+height and depth are not: these we derive from the bounding box.} we don't
+progress (advance) which is why the overlapping sort of works for the $x$ but
+less so for the $m$: in math mode we need to use these \type {\hat} and \type
+{\widehat} commands.
+
+The hat and widehat assignments were those of August 2022. In plain \TEX\ we see
+these definitions:
+
+\starttyping
+\def\hat {\mathaccent"705E }
+\def\widehat{\mathaccent"0362 }
+\stoptyping
+
+The \type {\mathaccent} primitive takes an integer that encodes the class, family,
+and slot in the 8 bit font encoding. Here we see that the hat comes from family
+0, the upright math font. The widehat comes from extensible family 3. These two
+are independently defined. When you want a hat that spans the nucleus, you need to
+use the widehat. In the math engine spanning actually means that we have a
+delimiter and normally that means: start with a basic shape, when that is too
+narrow, go to the extensible font and follow the chain with increasing sizes and
+when you run out of those apply an extensible recipe. The sequence and extensible
+are both optional and the important part is that we first look at what is called
+the small character and then to the large one(s).
+
+However, the \type {\mathaccent} primitives doesn't take a delimiter! It directly
+starts following a chain if the given character has it (and then the character
+itself is of course the first in that chain). And this is where the problems
+start when we move to \OPENTYPE\ and \UNICODE\ math.
+
+\starttabulate[|T|l|l|]
+\NC U+005E \NC Hat \NC some useless, often ugly large glyph \NC \NR % 94
+\NC U+02C6 \NC hat \NC it has width but no extensibles \NC \NR % 710
+\NC U+0302 \NC widehat \NC it has zero width and extensibles \NC \NR % 770
+\stoptabulate
+
+Now, if we define \type {\hat} as \type {U+02C6} we don't get the extensibles,
+and it basically is what was always done in \TEX\ macro packages following the
+plain suggestions. If we define \type {\widehat} we start out with a glyph that
+has likely zero width\footnote {Over the many years that \LUATEX\ evolved this
+was not guaranteed, for instance when wide (\UNICODE) fonts were constructed from
+traditional eight bit (\TEX\ encoded) fonts.} And, because \OPENTYPE\ starts with
+the base glyph and {\em then} uses a set of variants of eventually a recipe of
+parts, we suddenly have a different situation with \type {\mathaccent} than we
+normally have, where these are decoupled. Therefore, the definition of \type {\hat}
+and \type {\widehat} determines what an \OPENTYPE\ math engine will do, just as
+in regular \TEX, but we might need them to be defined differently.
+
+A solution would be to let \type {\mathaccent} (or \type {\Umathaccent}) directly
+go to the variants, but that is sort of weird. Because a zero width glyph doesn't
+match the criteria to span a nucleus it is likely to be skipped anyway, although
+there can be a case where the next in size overruns the width of the nucleus in
+which case the zero width one is used which itself is not that nice. We could
+actually derive the width from the boundingbox, but that would be a bit abnormal,
+and it makes no sense to burden the font machinery with that exception. Another
+approach we can follow is to just copy the extensibles from \type {U+0302} to
+\type {02C6} and use that one for \type {\hat} as well as \type {\widehat} and
+then make \type {\widehat} an alias to \type {\hat}. After, all, the main reason
+why we have two commands comes from the fact that \type {\mathaccent} doesn't
+take a delimiter but single character reference (encoded in an integer).
+
+Here is the whole list of accents:
+
+\starttabulate[||T||T|]
+\NC \tex{grave} \NC U+0060 \NC \tex{widegrave} \NC U+0300 \NC \NR
+\NC \tex{ddot} \NC U+00A8 \NC \tex{wideddot} \NC U+0308 \NC \NR
+\NC \tex{bar} \NC U+00AF \NC \tex{widebar} \NC U+0304 \NC \NR
+\NC \tex{acute} \NC U+00B4 \NC \tex{wideacute} \NC U+0301 \NC \NR
+\NC \tex{hat} \NC U+02C6 \NC \tex{widehat} \NC U+0302 \NC \NR
+\NC \tex{check} \NC U+02C7 \NC \tex{widecheck} \NC U+030C \NC \NR
+\NC \tex{breve} \NC U+02D8 \NC \tex{widebreve} \NC U+0306 \NC \NR
+\NC \tex{dot} \NC U+02D9 \NC \tex{widedot} \NC U+0307 \NC \NR
+\NC \tex{ring} \NC U+02DA \NC \tex{widering} \NC U+030A \NC \NR
+\NC \tex{tilde} \NC U+02DC \NC \tex{widetilde} \NC U+0303 \NC \NR
+\NC \tex{dddot} \NC U+20DB \NC \tex{widedddot} \NC U+20DB \NC \NR
+\stoptabulate
+
+The only accent that is an exception is the last one but is it really used? It
+anyway makes no real sense to assume that users will ever directly input the
+\UTF\ characters conforming the last column, so we can just go for the first one
+and use the extensibles from the second and see where we end up. Neither \MATHML\
+nor \TEX\ related specifications seem to cover this well, so we can just do what
+suits us best.
+
+\startbuffer
+\showglyphs
+\im {\widehat{a} + \widehat {aa}} =
+\im {\hat {a} + \hat {aa}} =
+\im {\hat {a} + \hat[stretch=yes]{aa}} =
+\setupmathaccent[top][stretch=yes]
+\im {\hat {a} + \hat {aa}}
+\stopbuffer
+
+Because all has to fit into the \CONTEXT\ user interface and because we also want
+to be backward compatible (command wise), we end up with something:
+
+\typebuffer
+
+that gives us:
+
+\startpacked \glyphscale = \numexpr2*\glyphscale\relax \getbuffer \stoppacked
+
+Now, one problem, is of course that users can enter these modifiers as \UTF\
+sequence in the input, just like they do with delimiters. Therefore we do support
+the following feature (which is under class control so disabled by default):
+
+\startbuffer
+\Umathcode "02C6 \mathaccentcode 0 "02C6
+\edef \HiHatA {\Uchar"02C6}
+\Umathchardef \HiHatB \mathaccentcode 0 "02C6
+
+$ \Uchar"02C6{x} + \HiHatA{xx} + \HiHatB{xx} = \widehat {xxxx} $
+\stopbuffer
+
+\typebuffer
+
+You get this:
+
+\start
+ \pushoverloadmode \getbuffer \popoverloadmode
+\stop
+
+The only cheat here is that normally accents come after the accentee, but we can
+live with that. After all, it's all about convenience.
+
+There is another aspect of accents that we need to mention here. The hat, tilde,
+and check are often used over not only single letters but also small expressions.
+So how come that fonts have only very few variants defined? We can imagine that
+in eight bit fonts the number of available slots plays a role but in \OPENTYPE\
+fonts that is not the case. It therefore can be considered an
+oversight that usage of these wide accents has not be communicated well to the
+font designers.
+
+\def\CrappyHack#1{\im{
+ #1{a} + #1{a+b} + #1{a+b+c} +
+ #1{a+b+c+d} + #1{a+b+c+d+e} + #1{a+b+c+d+e+f}
+}\par}
+
+\startpacked
+\CrappyHack\widehat
+\CrappyHack\widetilde
+\CrappyHack\widecheck
+\stoppacked
+
+The previous lines demonstrate that we can actually cheat a little for these
+three top accents: we can just scale the last variant horizontally. It was a few
+lines patch to \LUAMETATEX\ to make this automatic and triggered by setting the
+\type {extensible} field in a character table to \type {true} instead of a
+recipe. The ingredients to get this working were already there, and it works out
+quite well. The only complication was that the \type {flac} feature (that
+provides flat accents for cases where the nucleus is rather high) could interfere,
+but that was trivial to deal with in the code that does the goodies. \footnote
+{When we were testing fonts this got us by surprise when we tested Cambria that
+has these flat overloads for the tilde and check. Because supports this automatic
+(hidden from the user) one doesn't look into that direction when testing
+something.}
+
+When it comes to these delimiters that have no real solution in the font, we can
+consider delegating coming up with a glyph to the macro package at the time it is
+needed, and we can actually do that. However, this is mostly interesting for
+educational usage, where the amount of delimiters is predictable and limited.
+About a decade ago some mechanism was added to the \MKIV\ math machinery that
+support plugins so that we could use \METAFUN\ to generate (most noticeably)
+square root symbols the way we liked. \footnote {This was a fun project of Alan
+and Hans.} The main drawback is that mixing this in means matching to a font, and
+that is not always trivial. But it is this kind of trickery that makes working
+with \TEX\ fun. That said: what we are discussing here is more fundamental in the
+sense that we try to come up with generic engine solutions that just rely on the
+fonts. That way complex math with all reasonable symbols is also served.
+\footnote {These \METAFUN\ plugins are still possible, but we need to adapt some
+to \LMTX\ which will happen as we go.}
+
+Interestingly there are some arrows that act like accents. There are over- and
+under ones as well as combining (often zero width) accents. Fonts are not always
+consistent in how these extends (the wide ones). Often the combining accents are
+smaller and closer to the running text. Traditionally in \TEX\ fonts there are no
+extensible arrows: they are constructed from arrow heads, minus and equal signs
+with some negative spacing in between. One can therefore wonder is the smaller
+combining ones are appreciated by those who want stable math. It definitely means
+that we have to make choices. Even more interesting is that while \UNICODE\ has
+some means to construct braces from predictable \UNICODE\ slots. there is no way
+to do the same with arrows and (indeed) there are fonts out there with shaped
+arrows that demand different middle and end pieces. In fact, the same is true for
+rules that are not simple rectangles and radical extensions that are not flat
+rules either. In all these cases the usage patterns of accents and similar
+constructs has not really been fed back into the way \UNICODE\ and \OPENTYPE\
+fonts support math. \footnote {One can argue that this is not what \UNICODE\ is
+for but if so, then some other bits and pieces also make little sense.}
+
+\stopsection
+
+\startsection[title=Bullets]
+
+In \TEX\ usage bullets are a it special. Because fonts had a limited number of slots
+available, bullets in for instance itemized lists traditionally were taken from
+a math font. The bullet in Computer Modern has a comfortable size and is quite
+useful for that. Bullets in text fonts often were (are) relatively small so even when
+they were available they were not really used. The official \UNICODE\ slot for
+bullet is \type {U+2022} and in this font it shows up as \quote {•}. The \WIKIPEDIA\ page
+on bullets (typography) mentions:
+
+\startquotation
+ A variant, the bullet operator (\type {U+2219} ∙ \typ {BULLET OPERATOR}) is
+ used as a math symbol, akin to the dot operator. Specifically, in logic, $x •
+ y$ means logical conjunction. It is the same as saying \quotation {x and y}
+\stopquotation
+
+The page also mentions that \quotation {glyphs such as {\switchtobodyfont
+[stixtwo]$•$} and {\switchtobodyfont [stixtwo]$◦$}} have \quotation {reversed
+variants {\switchtobodyfont [stixtwo]$◘$} and {\switchtobodyfont [stixtwo]$◙$}}
+although we haven't see the reverse once in \TEX\ documents (yet), like these (we
+use \STIX2\ to show them):
+
+\starttabulate[|Tl|l|l|]
+\NC U+2022 \NC \switchtobodyfont[stixtwo]$•$ \NC BULLET \NC \NR
+\NC U+2023 \NC \switchtobodyfont[stixtwo]$‣$ \NC TRIANGULAR BULLET \NC \NR
+\NC U+2043 \NC \switchtobodyfont[stixtwo]$⁃$\NC HYPHEN BULLET \NC \NR
+\NC U+204C \NC \switchtobodyfont[stixtwo]$⁌$\NC LACK LEFTWARDS BULLET \NC \NR
+\NC U+204D \NC \switchtobodyfont[stixtwo]$⁍$\NC LACK RIGHTWARDS BULLET \NC \NR
+\NC U+2219 \NC \switchtobodyfont[stixtwo]$∙$ \NC BULLET OPERATOR (math) \NC \NR
+\NC U+25CB \NC \switchtobodyfont[stixtwo]$○$ \NC WHITE CIRCLE \NC \NR
+\NC U+25CF \NC \switchtobodyfont[stixtwo]$●$ \NC BLACK CIRCLE \NC \NR
+\NC U+25D8 \NC \switchtobodyfont[stixtwo]$◘$ \NC INVERSE BULLET \NC \NR
+\NC U+25E6 \NC \switchtobodyfont[stixtwo]$◦$ \NC WHITE BULLET \NC \NR
+\NC U+29BE \NC \switchtobodyfont[stixtwo]$⦾$ \NC CIRCLED WHITE BULLET \NC \NR
+\NC U+29BF \NC \switchtobodyfont[stixtwo]$⦿$ \NC CIRCLED BULLET \NC \NR
+\stoptabulate
+
+The reverse ones are not really reverse in \STIX2\ as they have bigger circles.
+There are a few more bullets mentioned but probably only because they have the
+word bullet in their description and they don't really look like bullets. Given
+the already discussed lack of granularity in some math symbols with multiple
+usage it is somewhat surprising that we have a math bullet. The weird looking
+left- and rightward bullets are kind of hard to distinguish. Let's hope that
+mathematicians don't discover these!
+
+This brings us to the more general way of looking at these bullets because among
+the popular math symbols used in text are also the triangles and (\TEX) math
+fonts came with. When we have a few commands for circular shapes like \typ
+{$\bullet \bigcirc \circ$} giving $\bullet \bigcirc \circ$ we have plenty of
+(black) triangles.
+
+For instance, we have \type {\triangledown} and \type {\bigtriangledown} and these
+have corresponding \UNICODE\ slots \type {U+25BD} and \type {U+25BF} but when
+you try these in for instance \STIX2, Pagella and Cambria you got:
+▽ + ▿, ▽ + ? and ? + ?, where the question mark indicates a missing character.
+
+It is for that reason that \type {\triangledown} and \type {\bigtriangledown} are
+both defined as using the large one. This test also demonstrated us that we
+didn't have to waste time looking up what \MATHML\ had to tell about it. A
+typeset version of that specification was never a visual highlight and missing
+glyphs only makes that worse. And, when fonts lack shapes no one uses them
+anyway.
+
+However, it makes sense to think a bit about how to deal with this properly, and
+we will likely add some checking to the goodie files for it, so that when we do
+have them, we use them. \footnote {Most practical is to add this information to
+the character database which is a bit of work}. But even then, most troublesome
+is that the size (and even positioning) of these symbols is rather inconsistent
+across math fonts, but because they are seldom used it doesn't make much sense to
+compensate for that (read: we just wait till users ask for it).
+
+% {\switchtobodyfont[stixtwo]$\char"25BD+\char"25BF$}% +\triangledown+\bigtriangledown$
+% {\switchtobodyfont[pagella]$\char"25BD+\char"25BF$}% +\triangledown+\bigtriangledown$
+% {\switchtobodyfont[cambria]$\char"25BD+\char"25BF$}% +\triangledown+\bigtriangledown$
+
+\stopsection
+
+\startsection[title=Punctuation]
+
+There are quite some punctuation symbols in \UNICODE\ but not for math where the
+main troublemakers are the period, comma, colon and semicolon. The first two can
+be used as separator in numbers, in which case we don't want any spacing, or they
+can be part of a (pseudo) sentence in a formula, or they can separate entries in
+a list (take coordinates).
+
+\starttyping
+1.1 + 1.2
+(1.1, 1.2)
+x + 1.1, x + 1.2
+\stoptyping
+
+When used as separator in a sentence, which is more likely in display math than
+in inline math, the spacing after it can be either regular (as in text) or wide.
+And the symbol can come from the math font or text (and these can actually look
+different). In \CONTEXT\ (also pre \LMTX) we have some special trickery at work
+for spacing comma's and periods but we leave that aside now. What should be noted
+is that out|-|of|-|the|-|box spaces are ignored when math is scanned so we cannot
+take that surrounding into account when dealing with spacing in the engine.
+
+Although the \UNICODE\ specification provides a classification of characters that
+includes punctuation in practice we need to deal with it ourselves. For instance,
+by default a period is not considered punctuation but a command and semi colon
+are, while a colon is a relation!
+
+Take for instance $f.$ (math italic f followed by a period). Italic correction
+and math glyphs have this special relationship and it also shows up in
+punctuation. Imagine that we have a sequence of characters, say $fx$. These are
+actually two ordinary atoms but in $f,$ we have an ordinary atom followed by a
+punctuation atom so here spacing is determined by how these classes are set up.
+But, given the shape if the $f$ we actually don't want italic correction here.
+
+\startbuffer
+$fx + f. +f, + f: + f; + a. +a, + a: + a; + x, +x, + x: + x;$%
+\stopbuffer
+
+\startlinecorrection
+\scale[width=\textwidth]{%
+ \getbuffer
+}
+\blank[halfline]
+\scale[width=\textwidth]{%
+ \showmakeup[mathglue]%
+ \mathspacingmode\plusone
+ \showfontitalics
+ \showfontkerns
+ \showglyphs
+ \getbuffer
+}
+\stoplinecorrection
+
+When you zoom in you can see the subtle spacing differences. We can compensate
+for the semi colon being a bit higher than the period by applying some kern,
+something that we can set up in the goodie file.
+
+Actually, if we assume that periods only occur in numbers we can make it
+punctuation and set it up for digit spacing but then commas etc also get done
+that way. A variant is to have two punctuation classes (or cheat and put the
+period in the digit class). No matter what we do, no help can be expected from
+documents mentioned: it's mostly a visual thing anyway.
+
+Let's end with the visual aspect: in most fonts the two colons \type {0x003A} and
+\type {0x2236} are different: one has more distance between the periods. Which
+one? Well, that depends on the font! Latin Modern has a cramped \type {0x2236}
+while \STIX2 has a cramped \type {0x003A}. Cambria has square dots for the
+{0x003A} and round ones slightly more cramped for \type {0x2236}. Lucida goes
+extreme: it has smaller dots far apart for \type {0x2236}. If the idea is that a
+reader should get from the shape what it's about one can wonder if texts get read
+the way the author intended. Of maybe shapes don't matter. Of course a macro
+package can obscure these inconsistencies by setting the math character code of
+\type {0x003A} to \type {0x2236} but that only obscures the fact that little
+attention has been paid: what one can consider bugs became features.
+
+\stopsection
+
+\startsection[title=Special ones]
+
+There are quite some characters that really depend on a math renderer. Examples
+are wide accents, fences, and arrows. Some constructs, like fractions use rules
+and these don't come from \UNICODE\ nor fonts. A mixed case is radicals: there
+is a \UNICODE\ point and fonts can provide larger variants. Normally one steps up
+a slightly slanted version but when things get large the radical becomes an
+extensible and therefore gets an upright shape. The engine is supposed to add a
+horizontal rule at the right location. Interesting is that there is no provision
+for a right end cap. The reason probably is that \TEX, being the major renderer,
+has no combined horizontal and vertical extenders and \OPENTYPE\ doesn't have
+that either. Some properties are driven by the fonts' math parameters which sort
+of makes the radical rendering a very restricted adventure: it is supposed to be
+used for roots only, either of not with a degree anchored in the right top area.
+It looks like that degree is not really to extend much beyond the left edge of
+the symbol.
+
+In \UNICODE\ there is an actuarian character \type {U+20E7} and support in fonts
+is not that good. We do support it because we ran into in \MATHML. However, it is
+a hack. The symbol as provided by fonts is rather useless.
+
+\startbuffer
+$ \sqrt {x + 1} + \annuity{x + 1} $
+\stopbuffer
+
+\typebuffer
+
+Let's see how it renders:
+
+\startlinecorrection
+\scale[width=.5\textwidth]{\getbuffer}
+\stoplinecorrection
+
+We take the dimensions of a radical as template and when we look at the bare
+glyphs we see this:
+
+\startlinecorrection
+\scale[height=2\lineheight]{$\char"221A \enspace \char"20E7$}
+\stoplinecorrection
+
+Basically we have a right actuarian character like we have a left radical. But In
+this case the rule will go left instead of right. This is implemented on top of
+radicals so and driven by \type {\Udelimited} that takes two delimiters and
+doesn't scan for a degree. For two-sided roots (with degree) we have \type
+{\Urooted}. And like normal radicals the delimited one adapts itself to the
+content:
+
+\startbuffer
+$ \sqrt {x + \frac{1}{x}} + \annuity {x + \frac{1}{x}} $
+\stopbuffer
+
+\typebuffer
+
+So we get:
+
+\startlinecorrection
+\scale[width=.5\textwidth]{\showstruts \getbuffer}
+\stoplinecorrection
+
+For the record: in \CONTEXT\ spacing is also driven by the struts and because we
+use the radicals renderer the gap and distance parameters also apply. It might
+look spacy, but keep in mind that we want radicals to look similar when we have
+more of them in line, and we can configure all. We have also enabled the feature
+that radicals at the same level are normalized in height and depth. Here are some
+variants:
+
+\startbuffer
+$ \lannuity {x + \frac{1}{x}} +
+ \rannuity {x + \frac{1}{x}} +
+ \lrannuity {x + \frac{1}{x}} $
+\stopbuffer
+
+\typebuffer
+
+This gives:
+
+\startlinecorrection
+\scale[width=.75\textwidth]{\getbuffer}
+\stoplinecorrection
+
+So we can have a mix of left, right and both end radical like symbols that
+encompass the nucleus. We're not aware of more such characters in \UNICODE\ but
+when they show up we are prepared. Only real usage can result in some parameters
+being fine|-|tuned.
+
+\stopsection
+
+% \startsection[title=Summary]
+%
+% Here we give a summary of some of the things that added on top of \UNICODE\ and
+% \OPENTYPE\ math in order to be able to properly render these more complex atoms
+% and molecules.
+%
+% \stopsection
+
+\startsection[title=Final words]
+
+This text was written in 2022 when we were working on math, extending the goodie
+files with new tweaks, checking support in fonts and updating manuals. But, as we
+moved forward, for instance with adapting \TYPEONE\ support of Antykwa and Iwona
+to the new possibilities again we had to go back in time and figure out why
+actually things were done in certain ways. And I have to admit that we had some
+good laughs and quite some fun on seeing how strange and inconsistent the assumed
+structured and logical \TEX\ ecosystem deals with math. A wrapup like is is never
+complete and we can keep adding to it so just consider it to be a momentary
+impression.
+
+Personally I have to admit that I've always overestimated what happened outside
+the \CONTEXT\ bubble, especially given the claims made. Consistency in \UNICODE\
+math is probably not as good as is could have been and the same is true for
+\OPENTYPE\ math support, but maybe I'm naive in expecting consistency and logic
+in math related work. The mere fact that Donald Knuth pays a lot of attention to
+the math in his writing doesn't automatically translate in all \TEX ies doing the
+same. I don't claim that \CONTEXT\ is doing better but I do hope that its users
+keep going for the best outcome.
+
+\stopsection
+
+\startsection[title=Resources]
+
+\starttyping
+[1] https://en.wikipedia.org/wiki/Slash_(punctuation)
+[2] http://www.unicode.org/reports/tr25
+[3] https://www.w3.org/TR/MathML3
+[4] https://www.unicode.org/Public/math/revision-15/MathClass-15.txt
+[5] https://en.wikipedia.org/wiki/Vertical_bar
+[6] https://en.wikipedia.org/wiki/Dash
+[7] https://en.wikipedia.org/wiki/Commercial_minus_sign
+[8] https://en.wikipedia.org/wiki/Division_sign
+[9] https://en.wikipedia.org/wiki/Bullet_(typography)
+\stoptyping
+
+\stopsection
+
+% After reading the \UNICODE\ report about math I don't feel too guilty when people
+% complain about the \CONTEXT\ manuals. It is a curious mix of discussing
+% organization of symbols, rendering, usage, structure, exchange, parsing,
+% confusion, etc. and it is clearly a mix of experiences with the web, word
+% processing and \TEX\ and as such not that useable because it is just not how
+% \TEX\ works with input and fonts and how users perceive matters. But it
+% definitely helps to get an idea why we ended up with the current situation: the
+% unification of math was more a combination of what was there and not a fresh
+% start. Maybe that is not really possible anyway. If we flash forward a couple of
+% pages it will all look the same to us as stone age chiseling in stone.
+
+\stopchapter
+
+\stopcomponent
Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-unicode.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -29,6 +29,7 @@
\component musings-dontusetex
\component musings-speed
\component musings-texlive
+ \component musings-hownotto
\stopbodymatter
\stopproduct
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-dk.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-dk.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-dk.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -9,8 +9,8 @@
At the \CONTEXT\ 2021 meeting I mixed my \TEX\ talks with showing some of the
(upcoming) \LUAMETATEX\ source code. One evening we had a extension party where a
new unit was implemented, the \type {dk}. This event was triggered by a remark
-Hraban [Ramm] made on the participants list in advance of the meeting, where he pointed
-to a Wikipedia article from which we quote:
+Hraban [Ramm] made on the participants list in advance of the meeting, where he
+pointed to a Wikipedia article from which we quote:
\startquotation
In issue 33, Mad published a partial table of the \quotation {Potrzebie System of
Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-fairphone.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-fairphone.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-fairphone.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,58 @@
+% language=us runpath=texruns:manuals/ontarget
+
+\startcomponent ontarget-fairphone
+
+\environment ontarget-style
+
+\startchapter[title={\LMTX\ on a phone}]
+
+When my FairPhone~2 started to get issues (running hot and then rebooting) and
+some spare parts became hard to get, I moved on to a FairPhone~4. We're talking
+early 2022. The specifications of that little computer, which comes with a 5 year
+warrantee and long term support are quite okay: a 1080x2340 pixel display, a
+Qualcomm SM7225 Snapdragon 750G (Octa|-|core (2x2.2 GHz Kryo 570 & 6x1.8 GHz Kryo
+570), an Adreno 619 GPU, 8GB memory. an 256GB solid state disk, the usual
+phone gadgets like audio, camera, wireless, bluetooth and gps, and an
+USB Type-C 3.0 connector with support for OTG and DisplayPort.
+
+Why do these specification matter? One reason is that in the compile farm we
+generate binaries for ARM processors and this phone has a decent one. The fast
+cores are in the same league as an over|-|clocked RaspberryPi~4 that we use in
+the compile farm for generating 32~bit binaries; the 64~bit binaries are generated
+in a virtual machine on a Mac Mini. So, in 2023, when looking at that phone, I
+wondered if we could run \LMTX\ on it. I installed the UserLand \LINUX\ stub from
+the Android Playstore and got myself an Ubuntu headless installation. After
+downloading the \LMTX\ installer indeed I could install the distribution on the
+little machine.
+
+A next step was trying to connect the phone to the display on my desk and after
+getting the right USB|-|C cable from the local computer shop I managed to get a
+bit larger terminal although Android~12 seems not able to use the whole 4K
+screen. Putting it in developers mode made it possible to enable the Android
+desktop interface in an external monitor. A bluetooth keyboard and mouse
+completed the setup. Later I tried a \LINUX\ desktop but that was quite a
+disappointment so more research is needed there.
+
+A predictable next step was to see if I could compile the \LUAMETATEX\ source
+that is part of the installation. Installing \GCC\ and \CMAKE\ was easy and indeed
+compilation went pretty well after that.
+
+A quick performance test showed that making a format, which includes generating
+the file database, initially takes 10~seconds but less that 4~seconds once files
+are cached. Processing 1000 paragraphs from the \type {tufte} sample file is done
+with a reasonable 55~pages per second. I didn't test more complex documents but
+that might happen later, when the dock that I ordered has arrived, and when I
+have a decent display setup.
+
+Given the fact that I only use a handful of applications on the laptop one can
+wonder when the moment is there that a properly dockable phone can do the job. Of
+course a disadvantage is that batteries are too small so one needs to provide
+power, but one needs a monitor, keyboard and mouse anyway. Wear and tear of the
+\SSD\ can also be an issue but when storage is plenty that should work out all
+right. Of course it also assumes a stable operating system with one's favourite
+editing platform and viewer available.
+
+\stopchapter
+
+\stopcomponent
+
Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-fairphone.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget.tex 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget.tex 2023-05-06 22:03:57 UTC (rev 67034)
@@ -25,6 +25,9 @@
\component ontarget-alsomath
\component ontarget-ridofjit
\component ontarget-gettingridof
+ \component ontarget-registers
+ \component ontarget-fairphone
+ % \component ontarget-mathsizes
\stopbodymatter
\stopdocument
Modified: trunk/Master/texmf-dist/doc/man/man1/context.man1.pdf
===================================================================
(Binary files differ)
Deleted: trunk/Master/texmf-dist/doc/man/man1/luatools.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/luatools.1 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/man/man1/luatools.1 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1,78 +0,0 @@
-.TH "luatools" "1" "01-01-2023" "version 1.35" "ConTeXt TDS Management Tool (aka luatools)"
-.SH NAME
- luatools - ConTeXt TDS Management Tool (aka luatools)
-.SH SYNOPSIS
-.B luatools [
-.I OPTIONS ...
-.B ] [
-.I FILENAMES
-.B ]
-.SH DESCRIPTION
-.B ConTeXt TDS Management Tool (aka luatools)
-.SH OPTIONS
-.TP
-.B --generate
-generate file database
-.TP
-.B --variables
-show configuration variables
-.TP
-.B --configurations
-show configuration order
-.TP
-.B --expand-braces
-expand complex variable
-.TP
-.B --expand-path
-expand variable (resolve paths)
-.TP
-.B --expand-var
-expand variable (resolve references)
-.TP
-.B --show-path
-show path expansion of ...
-.TP
-.B --var-value
-report value of variable
-.TP
-.B --find-file
-report file location
-.TP
-.B --find-path
-report path of file
-.TP
-.B --make
-[or --ini] make luatex format
-.TP
-.B --run
-[or --fmt] run luatex format
-.TP
-.B --compile
-assemble and compile lua inifile
-.TP
-.B --verbose
-give a bit more info
-.TP
-.B --all
-show all found files
-.TP
-.B --format=str
-filter cf format specification (default 'tex', use 'any' for any match)
-.TP
-.B --pattern=str
-filter variables
-.TP
-.B --trackers=list
-enable given trackers
-.SH AUTHOR
-More information about ConTeXt and the tools that come with it can be found at:
-
-
-.B "maillist:"
-ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
-
-.B "webpage:"
-http://www.pragma-ade.nl / http://tex.aanhet.net
-
-.B "wiki:"
-http://contextgarden.net
Deleted: trunk/Master/texmf-dist/doc/man/man1/luatools.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-babel.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-base.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-bibtex.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-cache.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-chars.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-check.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-colors.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-context.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-dvi.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-epub.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-evohome.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-fcd.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-flac.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-fonts.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-grep.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-interface.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-metapost.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-modules.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-package.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-patterns.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-pdf.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/mtx-pdf.1 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/doc/man/man1/mtx-pdf.1 2023-05-06 22:03:57 UTC (rev 67034)
@@ -25,6 +25,9 @@
.TP
.B --object
show object"/>
+.TP
+.B --links
+show links"/>
.SH AUTHOR
More information about ConTeXt and the tools that come with it can be found at:
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-pdf.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-plain.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-profile.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-rsync.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-scite.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-server.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-spell.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-texworks.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-timing.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-tools.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-unicode.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-unzip.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-update.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-vscode.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-watch.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-youless.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/mtxrun.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/metapost/context/base/mpxl/mp-base.mpxl
===================================================================
--- trunk/Master/texmf-dist/metapost/context/base/mpxl/mp-base.mpxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/metapost/context/base/mpxl/mp-base.mpxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -639,7 +639,9 @@
%% units of measure
-mm := 2.83464 ;
+newinternal mm, pt, dd, bp, cm, pc, cc, in, dk, es, ts ;
+
+mm := 2.83464 ; % ibm odd/even rounding
pt := 0.99626 ;
dd := 1.06601 ; % 1.0660068107174
bp := 1 ;
@@ -648,6 +650,8 @@
cc := 12.79213 ;
in := 72 ;
dk := 6.41577 ; % 6.4157650704225 ;
+es := 71.13174 ; % ibm odd/even rounding
+ts := 7.11317 ;
immutable mm, pt, bp, cm, in ; % we don't protect (yet): dd, pc cc (used as locals)
Modified: trunk/Master/texmf-dist/metapost/context/base/mpxl/mp-xbox.mpxl
===================================================================
--- trunk/Master/texmf-dist/metapost/context/base/mpxl/mp-xbox.mpxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/metapost/context/base/mpxl/mp-xbox.mpxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -10,10 +10,7 @@
% copyright : Public domain
% patched : Hans Hagen
%
-% The code is the same but I've added a boxes_ namespace for some so that we don't
-% clash with metafun.
-
-% The code is the same but I've added s boxes_ namespace for soem so that we don't
+% The code is the same but I've added s boxes_ namespace for somd so that we don't
% clash with metafun. Loading and initialization is now under metafun control.
if known metafun_loaded_xbox : endinput ; fi ;
Modified: trunk/Master/texmf-dist/scripts/context/lua/mtx-context.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/context/lua/mtx-context.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/scripts/context/lua/mtx-context.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -704,6 +704,8 @@
--
a_batchmode = (a_batchmode and "batchmode") or (a_nonstopmode and "nonstopmode") or (a_scrollmode and "scrollmode") or nil
--
+ local changed = { }
+ --
for i=1,#filelist do
--
local filename = filelist[i]
@@ -731,6 +733,10 @@
-- local jobname = removesuffix(filename)
local ctxname = ctxdata and ctxdata.ctxname
--
+ if changed[jobname] == nil then
+ changed[jobname] = false
+ end
+ --
local analysis = preamble_analyze(filename)
--
if a_mkii or analysis.engine == 'pdftex' or analysis.engine == 'xetex' then
@@ -962,6 +968,7 @@
if not multipass_forcedruns then
newhash = multipass_hashfiles(jobname)
if multipass_changed(oldhash,newhash) then
+ changed[jobname] = true
oldhash = newhash
else
break
@@ -1096,6 +1103,21 @@
end
end
--
+ if #filelist > 1 then
+ local done = false
+ for k, v in sortedhash(changed) do
+ if v then
+ if not done then
+ report()
+ done = true
+ end
+ report("file %a was changed",k)
+ end
+ end
+ if done then
+ report()
+ end
+ end
end
function scripts.context.pipe() -- still used?
Modified: trunk/Master/texmf-dist/scripts/context/lua/mtx-ctan.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/context/lua/mtx-ctan.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/scripts/context/lua/mtx-ctan.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -34,9 +34,9 @@
<flags>
<category name="basic">
<subcategory>
- <flag name="packages"><short>list available packages</short></flag>
- <flag name="topics"><short>list available topics</short></flag>
- <flag name="detail"><short>show details about package</short></flag>
+ <flag name="packages"><short>list available packages [--field=key|name|caption]</short></flag>
+ <flag name="topics"><short>list available topics [--field=key|name|details]</short></flag>
+ <flag name="details"><short>show details about package</short></flag>
<flag name="pattern" value="string"><short>use this pattern, otherwise first argument</short></flag>
</subcategory>
</category>
@@ -71,7 +71,7 @@
-- what is the url to fetch a zip
-- We cannot use the socket library because we don't compile that massive amount of
--- ssl code into lua(meta)tex. aybe some day one fo these small embedded libraries
+-- ssl code into lua(meta)tex. Maybe some day one fo these small embedded libraries
-- makes sense but there are so many changes in all that security stuff that it
-- defeats long term stability of the ecosystem anyway ... just like some of my old
-- devices suddenly are no longer accessible with modern browsers I expect it to
@@ -185,7 +185,7 @@
-- report("key : %s",data.key or "-")
report("name : %s",data.name or "-")
report("caption : %s",data.caption or "-")
- report("path : %s",data.ctan.path or "-")
+ report("path : %s",data.ctan and data.ctan.path or "-")
report("")
end
end
@@ -207,7 +207,7 @@
scripts.ctan.packages = json and
- function(pattern)
+ function(pattern,field)
local data = validdata(fetched("packages"))
if data then
local found = {
@@ -216,10 +216,27 @@
}
pattern = checkedpattern(pattern)
for i=1,#data do
- local entry = data[i]
- if strfound(pattern,entry.caption) then
- found[#found+1] = { entry.key, entry.name, entry.caption }
+ local entry = data[i]
+ local key = entry.key
+ local name = entry.name
+ local caption = entry.caption
+ local where
+ if field == "name" then
+ where = name
+ elseif field == "caption" then
+ where = caption
+ elseif field == "key" then
+ where = key
end
+ if where then
+ if strfound(pattern,where) then
+ found[#found+1] = { key, name, caption }
+ end
+ else
+ if strfound(pattern,name) or strfound(pattern,caption) then
+ found[#found+1] = { key, name, caption }
+ end
+ end
end
showresult(found)
end
@@ -256,10 +273,28 @@
}
pattern = checkedpattern(pattern)
for i=1,#data do
- local entry = data[i]
- if strfound(pattern,entry.details) then
- found[#found+1] = { entry.key or entry.name, entry.details } -- inconsistency between json and xml
+ -- inconsistency between json and xml
+ local entry = data[i]
+ local key = entry.key
+ local name = entry.name
+ local details = entry.details
+ local where
+ if field == "name" then
+ where = name or key
+ elseif field == "details" then
+ where = details
+ elseif field == "key" then
+ where = key or name
end
+ if where then
+ if strfound(pattern,where) then
+ found[#found+1] = { key or name, details }
+ end
+ else
+ if strfound(pattern,name) or strfound(pattern,details) then
+ found[#found+1] = { key or name, details }
+ end
+ end
end
showresult(found)
end
@@ -292,9 +327,20 @@
report("")
end
+-- scripts.ctan.packages(environment.argument("pattern") or environment.files[1])
+-- scripts.ctan.packages("font")
+-- scripts.ctan.details("tex")
+-- scripts.ctan.details("ipaex")
+
+-- scripts.ctan.packages("Półtawskiego")
+-- scripts.ctan.packages("Poltawskiego")
+
+-- scripts.ctan.topics("font")
+-- scripts.ctan.topics()
+
if environment.argument("packages") then
whatever()
- scripts.ctan.packages(environment.argument("pattern") or environment.files[1])
+ scripts.ctan.packages(environment.argument("pattern") or environment.files[1], environment.argument("field"))
elseif environment.argument("topics") then
whatever()
scripts.ctan.topics(environment.argument("pattern") or environment.files[1])
@@ -306,14 +352,3 @@
else
application.help()
end
-
--- scripts.ctan.packages(environment.argument("pattern") or environment.files[1])
--- scripts.ctan.packages("font")
--- scripts.ctan.details("tex")
--- scripts.ctan.details("ipaex")
-
--- scripts.ctan.packages("Półtawskiego")
--- scripts.ctan.packages("Poltawskiego")
-
--- scripts.ctan.topics("font")
--- scripts.ctan.topics()
Modified: trunk/Master/texmf-dist/scripts/context/lua/mtx-fonts.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/context/lua/mtx-fonts.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/scripts/context/lua/mtx-fonts.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -358,9 +358,14 @@
fontweight(entry.fontweight),
}
end
- table.insert(s,1,{"familyname","weight","style","width","variant","fontname","filename","subfont","fontweight"})
- table.insert(s,2,{"","","","","","","","",""})
- utilities.formatters.formatcolumns(s)
+ local h = {
+ {"familyname","weight","style","width","variant","fontname","filename","subfont","fontweight"},
+ {"","","","","","","","",""}
+ }
+ utilities.formatters.formatcolumns(s,false,h)
+ for k=1,#h do
+ write_nl(h[k])
+ end
for k=1,#s do
write_nl(s[k])
end
Added: trunk/Master/texmf-dist/scripts/context/lua/mtx-install-tikz.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/context/lua/mtx-install-tikz.lua (rev 0)
+++ trunk/Master/texmf-dist/scripts/context/lua/mtx-install-tikz.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,162 @@
+if not modules then modules = { } end modules ['mtx-install-tikz'] = {
+ version = 1.234,
+ comment = "companion to mtxrun.lua",
+ author = "Hans Hagen",
+ copyright = "ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- Installing tikz is a bit tricky because there are many packages involved and it's
+-- sort of impossible to derive from the names what to include in the installation.
+-- I tried to use the ctan scrips we ship but there is no way to reliably derive a
+-- set from the topics or packages using the web api (there are also some
+-- inconsistencies between the jkson and xml interfaces that will not be fixed). A
+-- wildcard pull of everything tikz/pgf is likely to fail or at least gives files we
+-- don't want and/or need, the solution is to be specific.
+--
+-- We use curl and not the built in socket library because all kind of ssl and
+-- redirection can kick in and who know how it evolves.
+--
+-- We use the context unzipper because we cannot be sure if unzip is present on the
+-- system. In many cases windows, linux and osx installations lack it by default.
+--
+-- This script has no help info etc as it's a rather dumb downloader. One can always
+-- do a better job than this suboptimal quick hack. Let me know if I forget to wipe
+-- something.
+--
+-- mtxrun --script install-tikz
+--
+-- It should be run in the tex root and will quit when there is no texmf-context
+-- path found. The modules path will be created when absent.
+
+local okay, curl = pcall(require,"libs-imp-curl")
+
+local fetched = curl and curl.fetch and function(str)
+ local data, message = curl.fetch {
+ url = str,
+ followlocation = true,
+ sslverifyhost = false,
+ sslverifypeer = false,
+ }
+ if not data then
+ report("some error: %s",message)
+ end
+ return data
+end or function(str)
+ -- So, no redirect to http, which means that we cannot use the built in socket
+ -- library. What if the client is happy with http?
+ local data = os.resultof("curl -sSL " .. str)
+ return data
+end
+
+local ctanurl = "https://mirrors.ctan.org/install"
+local tmpzipfile = "temp.zip"
+local checkdir = "texmf-context"
+local targetdir = "texmf-modules"
+
+local report = logs.reporter("install")
+
+scripts = scripts or { }
+scripts.ctan = scripts.ctan or { }
+
+function scripts.ctan.install(list)
+ if type(list) ~= "table"then
+ report("unknown specification")
+ end
+ local zips = list.zips
+ local wipes = list.wipes
+ if type(zips) ~= "table" or type(wipes) ~= "table" then
+ report("incomplete specification")
+ elseif not lfs.isdir(checkdir) then
+ report("unknown subdirectory %a",checkdir)
+ elseif not dir.mkdirs(targetdir) then
+ report("unable to create %a",targetdir)
+ elseif not lfs.chdir(targetdir) then
+ report("unable to go into %a",targetdir)
+ else
+ report("installing into %a",targetdir)
+ for i=1,#zips do
+ local where = ctanurl .. "/" .. zips[i]
+ local data = fetched(where)
+ if string.find(data,"^PK") then
+ io.savedata(tmpzipfile,data)
+ report("from %a",where)
+ report("into %a",targetdir)
+ utilities.zipfiles.unzipdir {
+ zipname = tmpzipfile,
+ path = ".",
+ verbose = "steps",
+ }
+ os.remove(tmpzipfile)
+ else
+ report("unknown %a",where)
+ end
+ end
+
+ local function wiper(wipes)
+ for i=1,#wipes do
+ local s = wipes[i]
+ if type(s) == "table" then
+ wiper(s)
+ elseif type(s) == "string" then
+ local t = dir.glob(s)
+ report("wiping %i files in %a",#t,s)
+ for i=1,#t do
+ os.remove(t[i])
+ end
+ end
+ end
+ end
+
+ wiper(wipes)
+
+ report("renewing file database")
+ resolvers.renewcache()
+ resolvers.load()
+ end
+end
+
+local function wipers(s)
+ return {
+ "tex/context/third/" ..s.. "/**",
+ "doc/context/third/" ..s.. "/**",
+ "source/context/third/" ..s.. "/**",
+
+ "tex/context/" ..s.. "/**",
+ "doc/context/" ..s.. "/**",
+ "source/context/" ..s.. "/**",
+
+ "scripts/" ..s.. "/**",
+ }
+end
+
+local defaults = {
+ "tex/latex/**",
+ "tex/plain/**",
+
+ "doc/latex/**",
+ "doc/plain/**",
+ "doc/generic/**",
+
+ "source/latex/**",
+ "source/plain/**",
+ "source/generic/**",
+}
+
+local lists = {
+ tikz = {
+ zips = {
+ "graphics/pgf/base/pgf.tds.zip",
+ "graphics/pgf/contrib/pgfplots.tds.zip",
+ "graphics/pgf/contrib/circuitikz.tds.zip",
+ },
+ wipes = {
+ wipers("pgf"),
+ wipers("pgfplots"),
+ wipers("circuitikz"),
+ defaults,
+ }
+ },
+}
+
+scripts.ctan.install(lists.tikz)
Property changes on: trunk/Master/texmf-dist/scripts/context/lua/mtx-install-tikz.lua
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/scripts/context/lua/mtx-install.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/context/lua/mtx-install.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/scripts/context/lua/mtx-install.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -124,9 +124,9 @@
--
["linux-armhf"] = "linux-armhf",
--
- ["openbsd"] = "openbsd7.2",
- ["openbsd-i386"] = "openbsd7.2",
- ["openbsd-amd64"] = "openbsd7.2-amd64",
+ ["openbsd"] = "openbsd7.3",
+ ["openbsd-i386"] = "openbsd7.3",
+ ["openbsd-amd64"] = "openbsd7.3-amd64",
--
["freebsd"] = "freebsd",
["freebsd-i386"] = "freebsd",
Modified: trunk/Master/texmf-dist/scripts/context/lua/mtx-pdf.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/context/lua/mtx-pdf.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/scripts/context/lua/mtx-pdf.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -9,7 +9,7 @@
local tonumber = tonumber
local format, gmatch, gsub, match, find = string.format, string.gmatch, string.gsub, string.match, string.find
local utfchar = utf.char
-local concat = table.concat
+local concat, insert, swapped = table.concat, table.insert, table.swapped
local setmetatableindex, sortedhash, sortedkeys = table.setmetatableindex, table.sortedhash, table.sortedkeys
local helpinfo = [[
@@ -28,6 +28,7 @@
<flag name="pretty"><short>replace newlines in metadata</short></flag>
<flag name="fonts"><short>show used fonts (<ref name="detail)"/></short></flag>
<flag name="object"><short>show object"/></short></flag>
+ <flag name="links"><short>show links"/></short></flag>
</subcategory>
<subcategory>
<example><command>mtxrun --script pdf --info foo.pdf</command></example>
@@ -365,6 +366,110 @@
end
end
+function scripts.pdf.links(filename,asked)
+ local pdffile = loadpdffile(filename)
+ if pdffile then
+
+ local pages = pdffile.pages
+ local nofpages = pdffile.nofpages
+
+ if asked and (asked < 1 or asked > nofpages) then
+ report("")
+ report("no page %i, last page %i",asked,nofpages)
+ report("")
+ return
+ end
+
+ local reverse = swapped(pages)
+
+ local function show(pagenumber)
+ local page = pages[pagenumber]
+ local annots = page.Annots
+ if annots then
+ report("")
+ report("annotations @ page %i",pagenumber)
+ report("")
+ for i=1,#annots do
+ local annot = annots[i]
+ if annot.Subtype == "Link" then
+ local A = annot.A
+ if A then
+ local S = A.S
+ local D = A.D
+ if S == "GoTo" then
+ if D then
+ local D1 = D[1]
+ local R1 = reverse[D1]
+ if tonumber(R1) then
+ report("intern, page % 4i",R1 or 0)
+ else
+ report("intern, name %s",tostring(D1))
+ end
+ end
+ elseif S == "GoToR" then
+ if D then
+ local F = A.F
+ if F then
+ local D1 = D[1]
+ if tonumber(D1) then
+ report("extern, page % 4i, file %s",D1 + 1,F)
+ else
+ report("extern, page % 4i, file %s, name %s",0,F,D[1])
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+
+ if asked then
+ show(asked)
+ else
+ for pagenumber=1,nofpages do
+ show(pagenumber)
+ end
+ end
+
+ local destinations = pdffile.destinations
+ if destinations then
+ if asked then
+ report("")
+ report("destinations to page %i",asked)
+ report("")
+ for k, v in sortedhash(destinations) do
+ local D = v.D
+ if D then
+ local p = reverse[D[1]] or 0
+ if p == asked then
+ report(k)
+ end
+ end
+ end
+ else
+ report("")
+ report("destinations")
+ report("")
+ local list = setmetatableindex("table")
+ for k, v in sortedhash(destinations) do
+ local D = v.D
+ if D then
+ local p = reverse[D[1]]
+ report("tag %s, page % 4i",k,p)
+ insert(list[p],k)
+ end
+ end
+ for k, v in sortedhash(list) do
+ report("")
+ report("page %i, names % t",k,v)
+ end
+ end
+ end
+ end
+end
+
-- scripts.pdf.info("e:/tmp/oeps.pdf")
-- scripts.pdf.metadata("e:/tmp/oeps.pdf")
-- scripts.pdf.fonts("e:/tmp/oeps.pdf")
@@ -382,6 +487,8 @@
scripts.pdf.fonts(filename)
elseif environment.argument("object") then
scripts.pdf.object(filename,tonumber(environment.argument("object")))
+elseif environment.argument("links") then
+ scripts.pdf.links(filename,tonumber(environment.argument("page")))
elseif environment.argument("exporthelp") then
application.export(environment.argument("exporthelp"),filename)
else
Modified: trunk/Master/texmf-dist/scripts/context/lua/mtx-update.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/context/lua/mtx-update.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/scripts/context/lua/mtx-update.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -178,9 +178,9 @@
--
["linux-armhf"] = "linux-armhf",
--
- ["openbsd"] = "openbsd7.2",
- ["openbsd-i386"] = "openbsd7.2",
- ["openbsd-amd64"] = "openbsd7.2-amd64",
+ ["openbsd"] = "openbsd7.3",
+ ["openbsd-i386"] = "openbsd7.3",
+ ["openbsd-amd64"] = "openbsd7.3-amd64",
--
["freebsd"] = "freebsd",
["freebsd-i386"] = "freebsd",
Modified: trunk/Master/texmf-dist/scripts/context/lua/mtxrun.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/context/lua/mtxrun.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/scripts/context/lua/mtxrun.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -5136,7 +5136,7 @@
package.loaded["l-dir"] = package.loaded["l-dir"] or true
--- original size: 18893, stripped down to: 11170
+-- original size: 19139, stripped down to: 11345
if not modules then modules={} end modules ['l-dir']={
version=1.001,
@@ -5154,7 +5154,7 @@
local dir=dir
local lfs=lfs
local attributes=lfs.attributes
-local walkdir=lfs.dir
+local scandir=lfs.dir
local isdir=lfs.isdir
local isfile=lfs.isfile
local currentdir=lfs.currentdir
@@ -5185,6 +5185,15 @@
lfs.isdir=isdir
lfs.isfile=isfile
end
+local isreadable=file.isreadable
+local walkdir=function(p,...)
+ if isreadable(p.."/.") then
+ return scandir(p,...)
+ else
+ return function() end
+ end
+end
+lfs.walkdir=walkdir
function dir.current()
return (gsub(currentdir(),"\\","/"))
end
@@ -8657,7 +8666,7 @@
package.loaded["util-sac"] = package.loaded["util-sac"] or true
--- original size: 14071, stripped down to: 10417
+-- original size: 14107, stripped down to: 10453
if not modules then modules={} end modules ['util-sac']={
version=1.001,
@@ -9136,13 +9145,13 @@
local extract=bit32.extract
local char=string.char
streams.tocardinal1=char
- function streams.tocardinal2(n) return char(extract(8,8),extract(0,8)) end
- function streams.tocardinal3(n) return char(extract(16,8),extract(8,8),extract(0,8)) end
- function streams.tocardinal4(n) return char(extract(24,8),extract(16,8),extract(8,8),extract(0,8)) end
+ function streams.tocardinal2(n) return char(extract(n,8,8),extract(n,0,8)) end
+ function streams.tocardinal3(n) return char(extract(n,16,8),extract(n,8,8),extract(n,0,8)) end
+ function streams.tocardinal4(n) return char(extract(n,24,8),extract(n,16,8),extract(n,8,8),extract(n,0,8)) end
streams.tocardinal1le=char
- function streams.tocardinal2le(n) return char(extract(0,8),extract(8,8)) end
- function streams.tocardinal3le(n) return char(extract(0,8),extract(8,8),extract(16,8)) end
- function streams.tocardinal4le(n) return char(extract(0,8),extract(8,8),extract(16,8),extract(24,8)) end
+ function streams.tocardinal2le(n) return char(extract(n,0,8),extract(n,8,8)) end
+ function streams.tocardinal3le(n) return char(extract(n,0,8),extract(n,8,8),extract(n,16,8)) end
+ function streams.tocardinal4le(n) return char(extract(n,0,8),extract(n,8,8),extract(n,16,8),extract(n,24,8)) end
end
if not streams.readcstring then
local readchar=streams.readchar
@@ -9338,7 +9347,7 @@
package.loaded["util-prs"] = package.loaded["util-prs"] or true
--- original size: 25542, stripped down to: 16783
+-- original size: 25716, stripped down to: 16805
if not modules then modules={} end modules ['util-prs']={
version=1.001,
@@ -9546,7 +9555,9 @@
if not pattern then
local symbols=S(symbol)
local separator=space^0*symbols*space^0
- local value=lbrace*C((nobrace+nestedbraces)^0)*rbrace+C((nestedbraces+(1-(space^0*(symbols+P(-1)))))^0)
+ local value=lbrace*C((nobrace+nestedbraces)^0)
+*(rbrace*(#symbols+P(-1)))
++C((nestedbraces+(1-(space^0*(symbols+P(-1)))))^0)
if withaction then
local withvalue=Carg(1)*value/function(f,s) return f(s) end
pattern=spaces*withvalue*(separator*withvalue)^0
@@ -9940,7 +9951,7 @@
package.loaded["util-fmt"] = package.loaded["util-fmt"] or true
--- original size: 2541, stripped down to: 1624
+-- original size: 3379, stripped down to: 2273
if not modules then modules={} end modules ['util-fmt']={
version=1.001,
@@ -9953,7 +9964,7 @@
utilities.formatters=utilities.formatters or {}
local formatters=utilities.formatters
local concat,format=table.concat,string.format
-local tostring,type=tostring,type
+local tostring,type,unpack=tostring,type,unpack
local strip=string.strip
local lpegmatch=lpeg.match
local stripper=lpeg.patterns.stripzeros
@@ -9960,12 +9971,14 @@
function formatters.stripzeros(str)
return lpegmatch(stripper,str)
end
-function formatters.formatcolumns(result,between)
+function formatters.formatcolumns(result,between,header)
if result and #result>0 then
- between=between or " "
- local widths,numbers={},{}
+ local widths={}
+ local numbers={}
+ local templates={}
local first=result[1]
local n=#first
+ between=between or " "
for i=1,n do
widths[i]=0
end
@@ -9987,31 +10000,61 @@
end
end
end
+ if header then
+ for i=1,#header do
+ local h=header[i]
+ for j=1,n do
+ local hj=tostring(h[j])
+ h[j]=hj
+ local w=#hj
+ if w>widths[j] then
+ widths[j]=w
+ end
+ end
+ end
+ end
for i=1,n do
local w=widths[i]
if numbers[i] then
if w>80 then
- widths[i]="%s"..between
- else
- widths[i]="%0"..w.."i"..between
+ templates[i]="%s"..between
+ else
+ templates[i]="% "..w.."i"..between
end
else
if w>80 then
- widths[i]="%s"..between
- elseif w>0 then
- widths[i]="%-"..w.."s"..between
+ templates[i]="%s"..between
+ elseif w>0 then
+ templates[i]="%-"..w.."s"..between
else
- widths[i]="%s"
+ templates[i]="%s"
end
end
end
- local template=strip(concat(widths))
+ local template=strip(concat(templates))
for i=1,#result do
local str=format(template,unpack(result[i]))
result[i]=strip(str)
end
+ if header then
+ for i=1,n do
+ local w=widths[i]
+ if w>80 then
+ templates[i]="%s"..between
+ elseif w>0 then
+ templates[i]="%-"..w.."s"..between
+ else
+ templates[i]="%s"
+ end
+ end
+ local template=strip(concat(templates))
+ for i=1,#header do
+ local str=format(template,unpack(header[i]))
+ header[i]=strip(str)
+ end
+ end
end
- return result
+ return result,header
end
@@ -14760,7 +14803,7 @@
package.loaded["util-sbx"] = package.loaded["util-sbx"] or true
--- original size: 21145, stripped down to: 13271
+-- original size: 21146, stripped down to: 13272
if not modules then modules={} end modules ['util-sbx']={
version=1.001,
@@ -15070,7 +15113,7 @@
if trace then
report("resultof: %s",command)
end
- local handle=iopopen(command,"r")
+ local handle=iopopen(command,"rb")
if handle then
local result=handle:read("*all") or ""
handle:close()
@@ -16395,7 +16438,7 @@
package.loaded["lxml-tab"] = package.loaded["lxml-tab"] or true
--- original size: 62810, stripped down to: 36225
+-- original size: 62221, stripped down to: 36225
if not modules then modules={} end modules ['lxml-tab']={
version=1.001,
@@ -17876,7 +17919,7 @@
package.loaded["lxml-lpt"] = package.loaded["lxml-lpt"] or true
--- original size: 54733, stripped down to: 31258
+-- original size: 54589, stripped down to: 31258
if not modules then modules={} end modules ['lxml-lpt']={
version=1.001,
@@ -19127,7 +19170,7 @@
package.loaded["lxml-mis"] = package.loaded["lxml-mis"] or true
--- original size: 3574, stripped down to: 1808
+-- original size: 3542, stripped down to: 1808
if not modules then modules={} end modules ['lxml-mis']={
version=1.001,
@@ -19196,7 +19239,7 @@
package.loaded["lxml-aux"] = package.loaded["lxml-aux"] or true
--- original size: 34661, stripped down to: 21511
+-- original size: 34522, stripped down to: 21511
if not modules then modules={} end modules ['lxml-aux']={
version=1.001,
@@ -21703,7 +21746,7 @@
package.loaded["data-tmp"] = package.loaded["data-tmp"] or true
--- original size: 16456, stripped down to: 11636
+-- original size: 16433, stripped down to: 11636
if not modules then modules={} end modules ['data-tmp']={
version=1.100,
@@ -22238,7 +22281,7 @@
package.loaded["data-res"] = package.loaded["data-res"] or true
--- original size: 69576, stripped down to: 44470
+-- original size: 70711, stripped down to: 44839
if not modules then modules={} end modules ['data-res']={
version=1.001,
@@ -22306,13 +22349,15 @@
if environment.default_texmfcnf then
resolvers.luacnfspec="home:texmf/web2c;"..environment.default_texmfcnf
else
- resolvers.luacnfspec=concat ({
- "home:texmf/web2c",
- "selfautoparent:/texmf-local/web2c",
- "selfautoparent:/texmf-context/web2c",
- "selfautoparent:/texmf-dist/web2c",
- "selfautoparent:/texmf/web2c",
- },";")
+ local texroot=environment.texroot
+ resolvers.luacnfspec="home:texmf/web2c;selfautoparent:/texmf-local/web2c;selfautoparent:/texmf-context/web2c;selfautoparent:/texmf/web2c"
+ if texroot and isdir(texroot.."/texmf-context") then
+ elseif texroot and isdir(texroot.."/texmf-dist") then
+ resolvers.luacnfspec="home:texmf/web2c;selfautoparent:/texmf-local/web2c;selfautoparent:/texmf-dist/web2c;selfautoparent:/texmf/web2c"
+ elseif ostype~="windows" and isdir("/etc/texmf/web2c") then
+ resolvers.luacnfspec="home:texmf/web2c;/etc/texmf/web2c;selfautodir:/share/texmf/web2c"
+ else
+ end
end
local unset_variable="unset"
local formats=resolvers.formats
@@ -24247,7 +24292,7 @@
package.loaded["data-con"] = package.loaded["data-con"] or true
--- original size: 5487, stripped down to: 3757
+-- original size: 5477, stripped down to: 3757
if not modules then modules={} end modules ['data-con']={
version=1.100,
@@ -24465,7 +24510,7 @@
package.loaded["data-zip"] = package.loaded["data-zip"] or true
--- original size: 10805, stripped down to: 7951
+-- original size: 10789, stripped down to: 7951
if not modules then modules={} end modules ['data-zip']={
version=1.001,
@@ -25806,7 +25851,7 @@
package.loaded["luat-fmt"] = package.loaded["luat-fmt"] or true
--- original size: 11691, stripped down to: 8350
+-- original size: 12056, stripped down to: 8398
if not modules then modules={} end modules ['luat-fmt']={
version=1.001,
@@ -26093,8 +26138,8 @@
-- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua libs-ini.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1035743
--- stripped bytes : 408144
+-- original bytes : 1037585
+-- stripped bytes : 408686
-- end library merge
Added: trunk/Master/texmf-dist/scripts/context/lua/texlua.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/context/lua/texlua.lua (rev 0)
+++ trunk/Master/texmf-dist/scripts/context/lua/texlua.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,141 @@
+-- version = 1.000,
+-- comment = "companion to luametatex",
+-- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+-- copyright = "PRAGMA ADE / ConTeXt Development Team",
+-- license = "see context related readme files"
+
+-- If you copy or link 'luametatex' to 'texlua' and put this script in the same path
+-- we have a more pure Lua runner (as with luatex and texlua).
+
+-- todo: error trace
+-- todo: protect these locals
+
+local texlua_load = load
+local texlua_loadfile = loadfile
+local texlua_type = type
+local texlua_xpcall = xpcall
+local texlua_find = string.find
+local texlua_dump = string.dump
+local texlua_open = io.open
+local texlua_print = print
+local texlua_show = luac.print
+
+function texlua_inspect(v)
+ if texlua_type(v) == "function" then
+ local ok, str = texlua_xpcall(texlua_dump,function() end,v)
+ if ok then
+ v = str
+ end
+ end
+ if type(v) == "string" then
+ texlua_show(v,true)
+ else
+ texlua_print(v)
+ end
+end
+
+local function main_execute(str,loader)
+ if str and str ~= "" then
+ local str = loader(str)
+ if texlua_type(str) == "function" then
+ str()
+ end
+ end
+end
+
+local function main_compile(str,loader,out,strip)
+ if str and str ~= "" then
+ local str = loader(str)
+ if texlua_type(str) == "function" then
+ str = texlua_dump(str,strip)
+ if type(out) == "string" and out ~= "" then
+ local f = texlua_open(out,"wb")
+ if f then
+ f:write(str)
+ f:close()
+ end
+ elseif out == true then
+ texlua_inspect(str)
+ else
+ texlua_print(str)
+ end
+ end
+ end
+end
+
+local function main_help()
+ texlua_print("LuaMetaTeX in Lua mode:")
+ texlua_print("")
+ texlua_print("-o 'filename' output filename")
+ texlua_print("-e 'string' execute loaded string")
+ texlua_print("-f 'filename' execute loaded file")
+ texlua_print("-d 'string' dump bytecode of loaded string")
+ texlua_print("-c 'filename' dump bytecode of loaded file")
+ texlua_print("-i 'string' list bytecode of loaded string")
+ texlua_print("-l 'filename' list bytecode of loaded file")
+ texlua_print("-s strip byte code")
+ texlua_print(" 'filename' execute loaded file")
+end
+
+local function main()
+ local i = 1
+ local o = ""
+ local s = false
+ while true do
+ local option = arg[i] or ""
+ if option == "" then
+ if i == 1 then
+ main_help()
+ end
+ break
+ elseif option == "-e" then
+ i = i + 1
+ main_execute(arg[i],texlua_load)
+ o = ""
+ s = false
+ elseif option == "-f" then
+ i = i + 1
+ main_execute(arg[i],texlua_loadfile)
+ o = ""
+ s = false
+ elseif option == "-d" then
+ i = i + 1
+ main_compile(arg[i],texlua_load,o,s)
+ o = ""
+ s = false
+ elseif option == "-c" then
+ i = i + 1
+ main_compile(arg[i],texlua_loadfile,o,s)
+ o = ""
+ s = false
+ elseif option == "-i" then
+ i = i + 1
+ main_compile(arg[i],texlua_load,true)
+ o = ""
+ s = false
+ elseif option == "-l" then
+ i = i + 1
+ main_compile(arg[i],texlua_loadfile,true)
+ o = ""
+ s = false
+ elseif option == "-s" then
+ s = true
+ elseif option == "-o" then
+ i = i + 1
+ o = arg[i] or ""
+ if texlua_find(o,"^%-") then
+ help()
+ break
+ end
+ elseif not texlua_find(option,"^%-") then
+ main_execute(option,texlua_loadfile)
+ break
+ else
+ main_help()
+ break
+ end
+ i = i + 1
+ end
+end
+
+main()
Property changes on: trunk/Master/texmf-dist/scripts/context/lua/texlua.lua
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/anch-pos.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/anch-pos.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/anch-pos.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,12 +6,9 @@
license = "see context related readme files"
}
---[[ldx--
-<p>We save positional information in the main utility table. Not only
-can we store much more information in <l n='lua'/> but it's also
-more efficient.</p>
---ldx]]--
-
+-- We save positional information in the main utility table. Not only can we store
+-- much more information in Lua but it's also more efficient.
+--
-- plus (extra) is obsolete but we will keep it for a while
--
-- maybe replace texsp by our own converter (stay at the lua end)
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/attr-ini.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/attr-ini.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/attr-ini.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -9,10 +9,8 @@
local next, type = next, type
local osexit = os.exit
---[[ldx--
-<p>We start with a registration system for atributes so that we can use the
-symbolic names later on.</p>
---ldx]]--
+-- We start with a registration system for atributes so that we can use the symbolic
+-- names later on.
local nodes = nodes
local context = context
@@ -54,17 +52,13 @@
-- end
-- end
---[[ldx--
-<p>We reserve this one as we really want it to be always set (faster).</p>
---ldx]]--
+-- We reserve this one as we really want it to be always set (faster).
names[0], numbers["fontdynamic"] = "fontdynamic", 0
---[[ldx--
-<p>private attributes are used by the system and public ones are for users. We use dedicated
-ranges of numbers for them. Of course a the <l n='context'/> end a private attribute can be
-accessible too, so a private attribute can have a public appearance.</p>
---ldx]]--
+-- Private attributes are used by the system and public ones are for users. We use
+-- dedicated ranges of numbers for them. Of course a the TeX end a private attribute
+-- can be accessible too, so a private attribute can have a public appearance.
sharedstorage.attributes_last_private = sharedstorage.attributes_last_private or 15 -- very private
sharedstorage.attributes_last_public = sharedstorage.attributes_last_public or 1024 -- less private
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/attr-mkr.mkiv
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/attr-mkr.mkiv 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/attr-mkr.mkiv 2023-05-06 22:03:57 UTC (rev 67034)
@@ -20,6 +20,7 @@
\unexpanded\def\definemarker [#1]{\defineattribute[\s!marker:#1]}
\unexpanded\def\setmarker [#1]#2[#3]{\dosetattribute{\s!marker:#1}{#3}}
\unexpanded\def\resetmarker [#1]{\dogetattribute{\s!marker:#1}}
- \def\boxmarker #1#2{attr \numexpr\dogetattributeid{\s!marker:#1}\numexpr \numexpr#2\relax}
+ \def\boxmarker #1#2{attr \numexpr\dogetattributeid{\s!marker:#1}\relax \numexpr\numexpr#2\relax}
+\unexpanded\def\marker #1{\numexpr\dogetattributeid{\s!marker:#1}\relax}
\protect \endinput
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/bibl-bib.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/bibl-bib.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/bibl-bib.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,11 +6,9 @@
license = "see context related readme files"
}
---[[ldx--
-<p>This is a prelude to integrated bibliography support. This file just loads
-bibtex files and converts them to xml so that the we access the content
-in a convenient way. Actually handling the data takes place elsewhere.</p>
---ldx]]--
+-- This is a prelude to integrated bibliography support. This file just loads bibtex
+-- files and converts them to xml so that the we access the content in a convenient
+-- way. Actually handling the data takes place elsewhere.
local lower, format, gsub, concat = string.lower, string.format, string.gsub, table.concat
local next = next
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/char-def.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/char-def.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/char-def.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -67155,6 +67155,7 @@
description="MINUS SIGN",
direction="es",
linebreak="pr",
+ mathextensible="h",
mathgroup="binary arithmetic",
mathspec={
{
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/char-ini.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/char-ini.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/char-ini.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -36,20 +36,16 @@
local report_defining = logs.reporter("characters")
---[[ldx--
-<p>This module implements some methods and creates additional datastructured
-from the big character table that we use for all kind of purposes:
-<type>char-def.lua</type>.</p>
-
-<p>We assume that at this point <type>characters.data</type> is already
-loaded!</p>
---ldx]]--
-
+-- This module implements some methods and creates additional datastructured from
+-- the big character table that we use for all kind of purposes: 'char-def.lua'.
+--
+-- We assume that at this point 'characters.data' is already populated!
+--
-- todo: in 'char-def.lua' assume defaults:
--
--- directions = l
--- cjkwd = a
--- linebreak = al
+-- directions = l
+-- cjkwd = a
+-- linebreak = al
characters = characters or { }
local characters = characters
@@ -62,9 +58,7 @@
os.exit()
end
---[[ldx--
-Extending the table.
---ldx]]--
+-- Extending the table.
if context and CONTEXTLMTXMODE == 0 then
@@ -84,9 +78,7 @@
end
---[[ldx--
-<p>This converts a string (if given) into a number.</p>
---ldx]]--
+-- This converts a string (if given) into a number.
local pattern = (P("0x") + P("U+")) * ((R("09","AF")^1 * P(-1)) / function(s) return tonumber(s,16) end)
@@ -957,10 +949,8 @@
on = "Other Neutrals",
}
---[[ldx--
-<p>At this point we assume that the big data table is loaded. From this
-table we derive a few more.</p>
---ldx]]--
+-- At this point we assume that the big data table is loaded. From this table we
+-- derive a few more.
if not characters.fallbacks then
@@ -1037,10 +1027,8 @@
return false
end)
---[[ldx--
-<p>Next comes a whole series of helper methods. These are (will be) part
-of the official <l n='api'/>.</p>
---ldx]]--
+-- Next comes a whole series of helper methods. These are (will be) part of the
+-- official API.
-- we could make them virtual: characters.contextnames[n]
@@ -1433,9 +1421,7 @@
return concat(new)
end
---[[ldx--
-<p>Requesting lower and uppercase codes:</p>
---ldx]]--
+-- Requesting lower and uppercase codes:
function characters.uccode(n) return uccodes[n] end -- obsolete
function characters.lccode(n) return lccodes[n] end -- obsolete
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/char-tex.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/char-tex.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/char-tex.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -42,18 +42,15 @@
local report_defining = logs.reporter("characters")
---[[ldx--
-<p>In order to deal with 8-bit output, we need to find a way to go from <l n='utf'/> to
-8-bit. This is handled in the <l n='luatex'/> engine itself.</p>
+-- In order to deal with 8-bit output, we need to find a way to go from UTF to
+-- 8-bit. This is handled in the 32 bit engine itself. This leaves us problems with
+-- characters that are specific to TeX, like curly braces and dollars. We can remap
+-- some chars that tex input files are sensitive for to a private area (while
+-- writing to a utility file) and revert then to their original slot when we read in
+-- such a file. Instead of reverting, we can (when we resolve characters to glyphs)
+-- map them to their right glyph there. For this purpose we can use the private
+-- planes 0x0F0000 and 0x100000.
-<p>This leaves us problems with characters that are specific to <l n='tex'/> like
-<type>{}</type>, <type>$</type> and alike. We can remap some chars that tex input files
-are sensitive for to a private area (while writing to a utility file) and revert then
-to their original slot when we read in such a file. Instead of reverting, we can (when
-we resolve characters to glyphs) map them to their right glyph there. For this purpose
-we can use the private planes 0x0F0000 and 0x100000.</p>
---ldx]]--
-
local low = allocate()
local high = allocate()
local escapes = allocate()
@@ -102,21 +99,6 @@
private.replace = utf.remapper(low) -- maybe: ,"dynamic"
private.revert = utf.remapper(high) -- maybe: ,"dynamic"
---[[ldx--
-<p>We get a more efficient variant of this when we integrate
-replacements in collapser. This more or less renders the previous
-private code redundant. The following code is equivalent but the
-first snippet uses the relocated dollars.</p>
-
-<typing>
-[x] [$x$]
-</typing>
---ldx]]--
-
--- using the tree-lpeg-mapper would be nice but we also need to deal with end-of-string
--- cases: "\"\i" and don't want "\relax" to be seen as \r e lax" (for which we need to mess
--- with spaces
-
local accentmapping = allocate {
['"'] = { [""] = "¨",
A = "Ä", a = "ä",
@@ -452,10 +434,8 @@
actions = texcharacters.defineaccents
}
---[[ldx--
-<p>Instead of using a <l n='tex'/> file to define the named glyphs, we
-use the table. After all, we have this information available anyway.</p>
---ldx]]--
+-- Instead of using a TeX file to define the named glyphs, we use the table. After
+-- all, we have this information available anyway.
function commands.makeactive(n,name) -- not used
contextsprint(ctxcatcodes,format("\\catcode%s=13\\unexpanded\\def %s{\\%s}",n,utfchar(n),name))
@@ -747,9 +727,7 @@
tex.catcodetable = saved
end
---[[ldx--
-<p>Setting the lccodes is also done in a loop over the data table.</p>
---ldx]]--
+-- -- Setting the lccodes is also done in a loop over the data table.
-- function characters.setcodes() -- we could loop over csletters
-- if trace_defining then
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/char-utf.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/char-utf.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/char-utf.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,22 +6,20 @@
license = "see context related readme files"
}
---[[ldx--
-<p>When a sequence of <l n='utf'/> characters enters the application, it may be
-neccessary to collapse subsequences into their composed variant.</p>
+-- When a sequence of UTF characters enters the application, it may be
+-- neccessary to collapse subsequences into their composed variant.
+--
+-- This module implements methods for collapsing and expanding UTF sequences. We
+-- also provide means to deal with characters that are special to TeX as well as
+-- 8-bit characters that need to end up in special kinds of output (for instance
+-- PDF).
+--
+-- We implement these manipulations as filters. One can run multiple filters over a
+-- string.
+--
+-- The old code has now been moved to char-obs.lua which we keep around for
+-- educational purposes.
-<p>This module implements methods for collapsing and expanding <l n='utf'/>
-sequences. We also provide means to deal with characters that are special to
-<l n='tex'/> as well as 8-bit characters that need to end up in special kinds
-of output (for instance <l n='pdf'/>).</p>
-
-<p>We implement these manipulations as filters. One can run multiple filters
-over a string.</p>
-
-<p>The old code has now been moved to char-obs.lua which we keep around for
-educational purposes.</p>
---ldx]]--
-
local next, type = next, type
local gsub, find = string.gsub, string.find
local concat, sortedhash, keys, sort = table.concat, table.sortedhash, table.keys, table.sort
@@ -55,10 +53,8 @@
local data = characters.data
---[[ldx--
-<p>It only makes sense to collapse at runtime, since we don't expect source code
-to depend on collapsing.</p>
---ldx]]--
+-- It only makes sense to collapse at runtime, since we don't expect source code to
+-- depend on collapsing.
-- for the moment, will be entries in char-def.lua .. this is just a subset that for
-- typographic (font) reasons we want to have split ... if we decompose all, we get
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/chem-ini.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/chem-ini.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/chem-ini.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -19,11 +19,9 @@
chemistry = chemistry or { }
local chemistry = chemistry
---[[
-<p>The next code started out as adaptation of code from Wolfgang Schuster as
-posted on the mailing list. The current version supports nested braces and
-unbraced integers as scripts.</p>
-]]--
+-- The next code started out as adaptation of code from Wolfgang Schuster as posted
+-- on the mailing list. The current version supports nested braces and unbraced
+-- integers as scripts.
local moleculeparser = cpatterns.scripted
chemistry.moleculeparser = moleculeparser
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -455,11 +455,11 @@
if CONTEXTLMTXMODE > 0 then
- callback.register("show_lua_call", function(what, slot)
+ callbacks.register("show_lua_call", function(what, slot)
local name = namesofscanners[slot]
-- return name and formatters["%s: \\%s, slot: %i"](what,name,slot) or ""
return name and formatters["%s \\%s"](what,name) or ""
- end)
+ end, "provide lua call details")
end
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv 2023-05-06 22:03:57 UTC (rev 67034)
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2023.03.10 12:15}
+\newcontextversion{2023.05.05 18:36}
%D This file is loaded at runtime, thereby providing an excellent place for hacks,
%D patches, extensions and new features. There can be local overloads in cont-loc
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/context.mkiv
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/context.mkiv 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/context.mkiv 2023-05-06 22:03:57 UTC (rev 67034)
@@ -13,7 +13,7 @@
%D There is some residual code in \MKIV\ that results from the transition to \LMTX\
%D but removeing it can have side effects due to oversights. There is no impact on
-%D performance to I leave at that.
+%D performance to I leave at that.
% Here is some timing (2015-04-01) luajittex format generation:
%
@@ -49,7 +49,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2023.03.10 12:15}
+\edef\contextversion{2023.05.05 18:36}
%D Kind of special:
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/core-con.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/core-con.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/core-con.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -8,14 +8,10 @@
-- todo: split into lang-con.lua and core-con.lua
---[[ldx--
-<p>This module implements a bunch of conversions. Some are more
-efficient than their <l n='tex'/> counterpart, some are even
-slower but look nicer this way.</p>
+-- This module implements a bunch of conversions. Some are more efficient than their
+-- TeX counterpart, some are even slower but look nicer this way. Some code may move
+-- to a module in the language namespace.
-<p>Some code may move to a module in the language namespace.</p>
---ldx]]--
-
local floor = math.floor
local osdate, ostime, ostimezone = os.date, os.time, os.timezone
local concat, insert, reverse = table.concat, table.insert, table.reverse
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/core-dat.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/core-dat.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/core-dat.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,10 +6,8 @@
license = "see context related readme files"
}
---[[ldx--
-<p>This module provides a (multipass) container for arbitrary data. It
-replaces the twopass data mechanism.</p>
---ldx]]--
+-- This module provides a (multipass) container for arbitrary data. It replaces the
+-- twopass data mechanism.
local tonumber, tostring, type = tonumber, tostring, type
@@ -231,9 +229,7 @@
actions = datasetvariablefromjob
}
---[[ldx--
-<p>We also provide an efficient variant for page states.</p>
---ldx]]--
+-- We also provide an efficient variant for page states.
local collected = allocate()
local tobesaved = allocate()
@@ -250,13 +246,9 @@
tobesaved = pagestates.tobesaved
end
-job.register('job.pagestates.collected', tobesaved, initializer, nil)
+job.register("job.pagestates.collected", tobesaved, initializer, nil)
-table.setmetatableindex(tobesaved, function(t,k)
- local v = { }
- t[k] = v
- return v
-end)
+table.setmetatableindex(tobesaved, "table")
local function setstate(settings)
local name = settings.name
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/core-two.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/core-two.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/core-two.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,15 +6,14 @@
license = "see context related readme files"
}
+-- This is actually one of the oldest MkIV files and basically a port of MkII but
+-- the old usage has long be phased out. Also, the public part is now handled by
+-- datasets which makes this a more private store.
+
local next = next
local remove, concat = table.remove, table.concat
local allocate = utilities.storage.allocate
---[[ldx--
-<p>We save multi-pass information in the main utility table. This is a
-bit of a mess because we support old and new methods.</p>
---ldx]]--
-
local collected = allocate()
local tobesaved = allocate()
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/core-uti.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/core-uti.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/core-uti.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,17 +6,14 @@
license = "see context related readme files"
}
--- todo: keep track of changes here (hm, track access, and only true when
--- accessed and changed)
+-- A utility file has always been part of ConTeXt and with the move to LuaTeX we
+-- also moved a lot of multi-pass info to a Lua table. Instead of loading a TeX
+-- based utility file under different setups, we now load a table once. This saves
+-- much runtime but at the cost of more memory usage.
+--
+-- In the meantime the overhead is a bit more due to the amount of data being saved
+-- and more agressive compacting.
---[[ldx--
-<p>A utility file has always been part of <l n='context'/> and with
-the move to <l n='luatex'/> we also moved a lot of multi-pass info
-to a <l n='lua'/> table. Instead of loading a <l n='tex'/> based
-utility file under different setups, we now load a table once. This
-saves much runtime but at the cost of more memory usage.</p>
---ldx]]--
-
local math = math
local format, match = string.format, string.match
local next, type, tostring, tonumber = next, type, tostring, tonumber
@@ -46,15 +43,10 @@
job.version = 1.32
job.packversion = 1.02
--- some day we will implement loading of other jobs and then we need
--- job.jobs
+-- Variables are saved using in the previously defined table and passed onto TeX
+-- using the following method. Of course one can also directly access the variable
+-- using a Lua call.
---[[ldx--
-<p>Variables are saved using in the previously defined table and passed
-onto <l n='tex'/> using the following method. Of course one can also
-directly access the variable using a <l n='lua'/> call.</p>
---ldx]]--
-
local savelist, comment = { }, { }
function job.comment(key,value)
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/data-con.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/data-con.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/data-con.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -13,20 +13,18 @@
local trace_containers = false trackers.register("resolvers.containers", function(v) trace_containers = v end)
local trace_storage = false trackers.register("resolvers.storage", function(v) trace_storage = v end)
---[[ldx--
-<p>Once we found ourselves defining similar cache constructs several times,
-containers were introduced. Containers are used to collect tables in memory and
-reuse them when possible based on (unique) hashes (to be provided by the calling
-function).</p>
+-- Once we found ourselves defining similar cache constructs several times,
+-- containers were introduced. Containers are used to collect tables in memory and
+-- reuse them when possible based on (unique) hashes (to be provided by the calling
+-- function).
+--
+-- Caching to disk is disabled by default. Version numbers are stored in the saved
+-- table which makes it possible to change the table structures without bothering
+-- about the disk cache.
+--
+-- Examples of usage can be found in the font related code. This code is not ideal
+-- but we need it in generic too so we compromise.
-<p>Caching to disk is disabled by default. Version numbers are stored in the
-saved table which makes it possible to change the table structures without
-bothering about the disk cache.</p>
-
-<p>Examples of usage can be found in the font related code. This code is not
-ideal but we need it in generic too so we compromise.</p>
---ldx]]--
-
containers = containers or { }
local containers = containers
containers.usecache = true
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/data-res.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/data-res.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/data-res.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -135,16 +135,35 @@
-- we also report weird ones, with weird being: (1) duplicate /texmf or (2) no /web2c in
-- the names.
+-- if environment.default_texmfcnf then
+-- resolvers.luacnfspec = "home:texmf/web2c;" .. environment.default_texmfcnf -- texlive + home: for taco etc
+-- else
+-- resolvers.luacnfspec = concat ( {
+-- "home:texmf/web2c",
+-- "selfautoparent:/texmf-local/web2c",
+-- "selfautoparent:/texmf-context/web2c",
+-- "selfautoparent:/texmf-dist/web2c",
+-- "selfautoparent:/texmf/web2c",
+-- }, ";")
+-- end
+
if environment.default_texmfcnf then
+ -- this will go away (but then also no more checking in mtxrun.lua itself)
resolvers.luacnfspec = "home:texmf/web2c;" .. environment.default_texmfcnf -- texlive + home: for taco etc
else
- resolvers.luacnfspec = concat ( {
- "home:texmf/web2c",
- "selfautoparent:/texmf-local/web2c",
- "selfautoparent:/texmf-context/web2c",
- "selfautoparent:/texmf-dist/web2c",
- "selfautoparent:/texmf/web2c",
- }, ";")
+ local texroot = environment.texroot
+ resolvers.luacnfspec = "home:texmf/web2c;selfautoparent:/texmf-local/web2c;selfautoparent:/texmf-context/web2c;selfautoparent:/texmf/web2c"
+ if texroot and isdir(texroot .. "/texmf-context") then
+ -- we're okay and run the lean and mean installation
+ elseif texroot and isdir(texroot .. "/texmf-dist") then
+ -- we're in texlive where texmf-dist is leading
+ resolvers.luacnfspec = "home:texmf/web2c;selfautoparent:/texmf-local/web2c;selfautoparent:/texmf-dist/web2c;selfautoparent:/texmf/web2c"
+ elseif ostype ~= "windows" and isdir("/etc/texmf/web2c") then
+ -- we have some linux distribution that does it its own way
+ resolvers.luacnfspec = "home:texmf/web2c;/etc/texmf/web2c;selfautodir:/share/texmf/web2c"
+ else
+ -- we stick to the reference specification
+ end
end
local unset_variable = "unset"
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/data-tar.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/data-tar.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/data-tar.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -12,15 +12,11 @@
local report_tar = logs.reporter("resolvers","tar")
---[[ldx--
-<p>We use a url syntax for accessing the tar file itself and file in it:</p>
+-- We use a url syntax for accessing the tar file itself and file in it:
+--
+-- tar:///oeps.tar?name=bla/bla.tex
+-- tar:///oeps.tar?tree=tex/texmf-local
-<typing>
-tar:///oeps.tar?name=bla/bla.tex
-tar:///oeps.tar?tree=tex/texmf-local
-</typing>
---ldx]]--
-
local resolvers = resolvers
local findfile = resolvers.findfile
local registerfile = resolvers.registerfile
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/data-tmp.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/data-tmp.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/data-tmp.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,21 +6,16 @@
license = "see context related readme files"
}
---[[ldx--
-<p>This module deals with caching data. It sets up the paths and implements
-loaders and savers for tables. Best is to set the following variable. When not
-set, the usual paths will be checked. Personally I prefer the (users) temporary
-path.</p>
+-- This module deals with caching data. It sets up the paths and implements loaders
+-- and savers for tables. Best is to set the following variable. When not set, the
+-- usual paths will be checked. Personally I prefer the (users) temporary path.
+--
+-- TEXMFCACHE=$TMP;$TEMP;$TMPDIR;$TEMPDIR;$HOME;$TEXMFVAR;$VARTEXMF;.
+--
+-- Currently we do no locking when we write files. This is no real problem because
+-- most caching involves fonts and the chance of them being written at the same time
+-- is small. We also need to extend luatools with a recache feature.
-</code>
-TEXMFCACHE=$TMP;$TEMP;$TMPDIR;$TEMPDIR;$HOME;$TEXMFVAR;$VARTEXMF;.
-</code>
-
-<p>Currently we do no locking when we write files. This is no real problem
-because most caching involves fonts and the chance of them being written at the
-same time is small. We also need to extend luatools with a recache feature.</p>
---ldx]]--
-
local next, type = next, type
local pcall, loadfile, collectgarbage = pcall, loadfile, collectgarbage
local format, lower, gsub = string.format, string.lower, string.gsub
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/data-zip.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/data-zip.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/data-zip.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -14,18 +14,14 @@
local report_zip = logs.reporter("resolvers","zip")
---[[ldx--
-<p>We use a url syntax for accessing the zip file itself and file in it:</p>
+-- We use a url syntax for accessing the zip file itself and file in it:
+--
+-- zip:///oeps.zip?name=bla/bla.tex
+-- zip:///oeps.zip?tree=tex/texmf-local
+-- zip:///texmf.zip?tree=/tex/texmf
+-- zip:///texmf.zip?tree=/tex/texmf-local
+-- zip:///texmf-mine.zip?tree=/tex/texmf-projects
-<typing>
-zip:///oeps.zip?name=bla/bla.tex
-zip:///oeps.zip?tree=tex/texmf-local
-zip:///texmf.zip?tree=/tex/texmf
-zip:///texmf.zip?tree=/tex/texmf-local
-zip:///texmf-mine.zip?tree=/tex/texmf-projects
-</typing>
---ldx]]--
-
local resolvers = resolvers
local findfile = resolvers.findfile
local registerfile = resolvers.registerfile
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/file-ini.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/file-ini.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/file-ini.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,12 +6,9 @@
license = "see context related readme files"
}
---[[ldx--
-<p>It's more convenient to manipulate filenames (paths) in <l n='lua'/> than in
-<l n='tex'/>. These methods have counterparts at the <l n='tex'/> end.</p>
---ldx]]--
+-- It's more convenient to manipulate filenames (paths) in Lua than in TeX. These
+-- methods have counterparts at the TeX end.
-
local implement = interfaces.implement
local setmacro = interfaces.setmacro
local setcount = interfaces.setcount
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/file-mod.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/file-mod.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/file-mod.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,18 +6,12 @@
license = "see context related readme files"
}
--- This module will be redone! For instance, the prefixes will move to data-*
--- as they arr sort of generic along with home:// etc/.
+-- This module will be redone! For instance, the prefixes will move to data-* as
+-- they are sort of generic along with home:// etc/.
+--
+-- It is more convenient to manipulate filenames (paths) in Lua than in TeX. The
+-- methods below have counterparts at the TeX end.
--- context is not defined yet! todo! (we need to load tupp-fil after cld)
--- todo: move startreadingfile to lua and push regime there
-
---[[ldx--
-<p>It's more convenient to manipulate filenames (paths) in
-<l n='lua'/> than in <l n='tex'/>. These methods have counterparts
-at the <l n='tex'/> side.</p>
---ldx]]--
-
local format, find, concat, tonumber = string.format, string.find, table.concat, tonumber
local sortedhash = table.sortedhash
local basename = file.basename
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-afk.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-afk.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-afk.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -7,11 +7,9 @@
dataonly = true,
}
---[[ldx--
-<p>For ligatures, only characters with a code smaller than 128 make sense,
-anything larger is encoding dependent. An interesting complication is that a
-character can be in an encoding twice but is hashed once.</p>
---ldx]]--
+-- For ligatures, only characters with a code smaller than 128 make sense, anything
+-- larger is encoding dependent. An interesting complication is that a character can
+-- be in an encoding twice but is hashed once.
local allocate = utilities.storage.allocate
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-con.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-con.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-con.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,6 +6,9 @@
license = "see context related readme files"
}
+-- Todo: Enable fixes from the lmt to here. Also in font-oto.lua wrt the changed
+-- assignments. (Around texlive 2024 in order not to disturb generic.)
+
-- some names of table entries will be changed (no _)
local next, tostring, tonumber, rawget = next, tostring, tonumber, rawget
@@ -22,12 +25,10 @@
local report_defining = logs.reporter("fonts","defining")
--- watch out: no negative depths and negative eights permitted in regular fonts
+-- Watch out: no negative depths and negative heights are permitted in regular
+-- fonts. Also, the code in LMTX is a bit different. Here we only implement a
+-- few helper functions.
---[[ldx--
-<p>Here we only implement a few helper functions.</p>
---ldx]]--
-
local fonts = fonts
local constructors = fonts.constructors or { }
fonts.constructors = constructors
@@ -59,11 +60,9 @@
local loadedfonts = allocate()
constructors.loadedfonts = loadedfonts
---[[ldx--
-<p>We need to normalize the scale factor (in scaled points). This has to
-do with the fact that <l n='tex'/> uses a negative multiple of 1000 as
-a signal for a font scaled based on the design size.</p>
---ldx]]--
+-- We need to normalize the scale factor (in scaled points). This has to do with the
+-- fact that TeX uses a negative multiple of 1000 as a signal for a font scaled
+-- based on the design size.
local factors = {
pt = 65536.0,
@@ -118,23 +117,19 @@
end
end
---[[ldx--
-<p>Beware, the boundingbox is passed as reference so we may not overwrite it
-in the process; numbers are of course copies. Here 65536 equals 1pt. (Due to
-excessive memory usage in CJK fonts, we no longer pass the boundingbox.)</p>
---ldx]]--
+-- Beware, the boundingbox is passed as reference so we may not overwrite it in the
+-- process; numbers are of course copies. Here 65536 equals 1pt. (Due to excessive
+-- memory usage in CJK fonts, we no longer pass the boundingbox.)
+--
+-- The scaler is only used for OTF and AFM and virtual fonts. If a virtual font has
+-- italic correction make sure to set the hasitalics flag. Some more flags will be
+-- added in the future.
+--
+-- The reason why the scaler was originally split, is that for a while we
+-- experimented with a helper function. However, in practice the API calls are too
+-- slow to make this profitable and the Lua based variant was just faster. A days
+-- wasted day but an experience richer.
--- The scaler is only used for otf and afm and virtual fonts. If a virtual font has italic
--- correction make sure to set the hasitalics flag. Some more flags will be added in the
--- future.
-
---[[ldx--
-<p>The reason why the scaler was originally split, is that for a while we experimented
-with a helper function. However, in practice the <l n='api'/> calls are too slow to
-make this profitable and the <l n='lua'/> based variant was just faster. A days
-wasted day but an experience richer.</p>
---ldx]]--
-
function constructors.cleanuptable(tfmdata)
-- This no longer makes sense because the addition of font.getcopy and its
-- possible usage in generic implicates that we need to return the whole
@@ -656,6 +651,14 @@
if changed then
local c = changed[unicode]
if c and c ~= unicode then
+ -- local cc = changed[c]
+ -- if cc then
+ -- while cc do
+ -- c = cc
+ -- cc = changed[c]
+ -- end
+ -- end
+ -- check not needed:
if c then
description = descriptions[c] or descriptions[unicode] or character
character = characters[c] or character
@@ -1093,9 +1096,7 @@
return tfmdata
end
---[[ldx--
-<p>A unique hash value is generated by:</p>
---ldx]]--
+-- A unique hash value is generated by:
local hashmethods = { }
constructors.hashmethods = hashmethods
@@ -1154,13 +1155,11 @@
end
end
---[[ldx--
-<p>In principle we can share tfm tables when we are in need for a font, but then
-we need to define a font switch as an id/attr switch which is no fun, so in that
-case users can best use dynamic features ... so, we will not use that speedup. Okay,
-when we get rid of base mode we can optimize even further by sharing, but then we
-loose our testcases for <l n='luatex'/>.</p>
---ldx]]--
+-- In principle we can share tfm tables when we are in need for a font, but then we
+-- need to define a font switch as an id/attr switch which is no fun, so in that
+-- case users can best use dynamic features ... so, we will not use that speedup.
+-- Okay, when we get rid of base mode we can optimize even further by sharing, but
+-- then we loose our testcases for LuaTeX.
function constructors.hashinstance(specification,force)
local hash = specification.hash
@@ -1516,10 +1515,7 @@
end
---[[ldx--
-<p>We need to check for default features. For this we provide
-a helper function.</p>
---ldx]]--
+-- We need to check for default features. For this we provide a helper function.
function constructors.checkedfeatures(what,features)
local defaults = handlers[what].features.defaults
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -528,27 +528,20 @@
end
---[[ldx--
-<p>So far we haven't really dealt with features (or whatever we want
-to pass along with the font definition. We distinguish the following
-situations:</p>
-situations:</p>
+-- So far we haven't really dealt with features (or whatever we want to pass along
+-- with the font definition. We distinguish the following situations:
+--
+-- name:xetex like specs
+-- name at virtual font spec
+-- name*context specification
+--
+-- Currently fonts are scaled while constructing the font, so we have to do scaling
+-- of commands in the vf at that point using e.g. "local scale = g.parameters.factor
+-- or 1" after all, we need to work with copies anyway and scaling needs to be done
+-- at some point; however, when virtual tricks are used as feature (makes more
+-- sense) we scale the commands in fonts.constructors.scale (and set the factor
+-- there).
-<code>
-name:xetex like specs
-name at virtual font spec
-name*context specification
-</code>
---ldx]]--
-
--- currently fonts are scaled while constructing the font, so we
--- have to do scaling of commands in the vf at that point using e.g.
--- "local scale = g.parameters.factor or 1" after all, we need to
--- work with copies anyway and scaling needs to be done at some point;
--- however, when virtual tricks are used as feature (makes more
--- sense) we scale the commands in fonts.constructors.scale (and set the
--- factor there)
-
local loadfont = definers.loadfont
function definers.loadfont(specification,size,id) -- overloads the one in font-def
@@ -2385,10 +2378,8 @@
dimenfactors["%"] = nil
dimenfactors.pct = nil
---[[ldx--
-<p>Before a font is passed to <l n='tex'/> we scale it. Here we also need
-to scale virtual characters.</p>
---ldx]]--
+-- Before a font is passed to TeX we scale it. Here we also need to scale virtual
+-- characters.
do
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-def.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-def.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-def.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -24,10 +24,9 @@
local report_defining = logs.reporter("fonts","defining")
---[[ldx--
-<p>Here we deal with defining fonts. We do so by intercepting the
-default loader that only handles <l n='tfm'/>.</p>
---ldx]]--
+-- Here we deal with defining fonts. We do so by intercepting the default loader
+-- that only handles TFM files. Although, we started out that way but in the
+-- meantime we can hardly speak of TFM any more.
local fonts = fonts
local fontdata = fonts.hashes.identifiers
@@ -53,26 +52,19 @@
local resolvefile = fontgoodies and fontgoodies.filenames and fontgoodies.filenames.resolve or function(s) return s end
---[[ldx--
-<p>We hardly gain anything when we cache the final (pre scaled)
-<l n='tfm'/> table. But it can be handy for debugging, so we no
-longer carry this code along. Also, we now have quite some reference
-to other tables so we would end up with lots of catches.</p>
---ldx]]--
+-- We hardly gain anything when we cache the final (pre scaled) TFM table. But it
+-- can be handy for debugging, so we no longer carry this code along. Also, we now
+-- have quite some reference to other tables so we would end up with lots of
+-- catches.
+--
+-- We can prefix a font specification by "name:" or "file:". The first case will
+-- result in a lookup in the synonym table.
+--
+-- [ name: | file: ] identifier [ separator [ specification ] ]
+--
+-- The following function split the font specification into components and prepares
+-- a table that will move along as we proceed.
---[[ldx--
-<p>We can prefix a font specification by <type>name:</type> or
-<type>file:</type>. The first case will result in a lookup in the
-synonym table.</p>
-
-<typing>
-[ name: | file: ] identifier [ separator [ specification ] ]
-</typing>
-
-<p>The following function split the font specification into components
-and prepares a table that will move along as we proceed.</p>
---ldx]]--
-
-- beware, we discard additional specs
--
-- method:name method:name(sub) method:name(sub)*spec method:name*spec
@@ -164,9 +156,7 @@
end
---[[ldx--
-<p>We can resolve the filename using the next function:</p>
---ldx]]--
+-- We can resolve the filename using the next function:
definers.resolvers = definers.resolvers or { }
local resolvers = definers.resolvers
@@ -258,24 +248,18 @@
return specification
end
---[[ldx--
-<p>The main read function either uses a forced reader (as determined by
-a lookup) or tries to resolve the name using the list of readers.</p>
+-- The main read function either uses a forced reader (as determined by a lookup) or
+-- tries to resolve the name using the list of readers.
+--
+-- We need to cache when possible. We do cache raw tfm data (from TFM, AFM or OTF).
+-- After that we can cache based on specificstion (name) and size, that is, TeX only
+-- needs a number for an already loaded fonts. However, it may make sense to cache
+-- fonts before they're scaled as well (store TFM's with applied methods and
+-- features). However, there may be a relation between the size and features (esp in
+-- virtual fonts) so let's not do that now.
+--
+-- Watch out, here we do load a font, but we don't prepare the specification yet.
-<p>We need to cache when possible. We do cache raw tfm data (from <l
-n='tfm'/>, <l n='afm'/> or <l n='otf'/>). After that we can cache based
-on specificstion (name) and size, that is, <l n='tex'/> only needs a number
-for an already loaded fonts. However, it may make sense to cache fonts
-before they're scaled as well (store <l n='tfm'/>'s with applied methods
-and features). However, there may be a relation between the size and
-features (esp in virtual fonts) so let's not do that now.</p>
-
-<p>Watch out, here we do load a font, but we don't prepare the
-specification yet.</p>
---ldx]]--
-
--- very experimental:
-
function definers.applypostprocessors(tfmdata)
local postprocessors = tfmdata.postprocessors
if postprocessors then
@@ -439,18 +423,14 @@
return fontdata[id], id
end
---[[ldx--
-<p>So far the specifiers. Now comes the real definer. Here we cache
-based on id's. Here we also intercept the virtual font handler. Since
-it evolved stepwise I may rewrite this bit (combine code).</p>
+-- So far the specifiers. Now comes the real definer. Here we cache based on id's.
+-- Here we also intercept the virtual font handler.
+--
+-- In the previously defined reader (the one resulting in a TFM table) we cached the
+-- (scaled) instances. Here we cache them again, but this time based on id. We could
+-- combine this in one cache but this does not gain much. By the way, passing id's
+-- back to in the callback was introduced later in the development.
-In the previously defined reader (the one resulting in a <l n='tfm'/>
-table) we cached the (scaled) instances. Here we cache them again, but
-this time based on id. We could combine this in one cache but this does
-not gain much. By the way, passing id's back to in the callback was
-introduced later in the development.</p>
---ldx]]--
-
function definers.registered(hash)
local id = internalized[hash]
return id, id and fontdata[id]
@@ -522,9 +502,7 @@
return fontdata[id] -- otherwise issues
end
---[[ldx--
-<p>We overload the <l n='tfm'/> reader.</p>
---ldx]]--
+-- We overload the <l n='tfm'/> reader.
if not context then
callbacks.register('define_font', definers.read, "definition of fonts (tfmdata preparation)")
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-enc.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-enc.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-enc.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -16,10 +16,8 @@
local allocate = utilities.storage.allocate
local mark = utilities.storage.mark
---[[ldx--
-<p>Because encodings are going to disappear, we don't bother defining
-them in tables. But we may do so some day, for consistency.</p>
---ldx]]--
+-- Because encodings are going to disappear, we don't bother defining them in
+-- tables. But we may do so some day, for consistency.
local report_encoding = logs.reporter("fonts","encoding")
@@ -43,25 +41,20 @@
return containers.is_valid(encodings.cache,encoding)
end
---[[ldx--
-<p>An encoding file looks like this:</p>
+-- An encoding file looks like this:
+--
+-- /TeXnANSIEncoding [
+-- /.notdef
+-- /Euro
+-- ...
+-- /ydieresis
+-- ] def
+--
+-- Beware! The generic encoding files don't always apply to the ones that ship with
+-- fonts. This has to do with the fact that names follow (slightly) different
+-- standards. However, the fonts where this applies to (for instance Latin Modern or
+-- TeXGyre come in OpenType variants too, so these will be used.
-<typing>
-/TeXnANSIEncoding [
-/.notdef
-/Euro
-...
-/ydieresis
-] def
-</typing>
-
-<p>Beware! The generic encoding files don't always apply to the ones that
-ship with fonts. This has to do with the fact that names follow (slightly)
-different standards. However, the fonts where this applies to (for instance
-Latin Modern or <l n='tex'> Gyre) come in OpenType variants too, so these
-will be used.</p>
---ldx]]--
-
local enccodes = characters.enccodes or { }
function encodings.load(filename)
@@ -120,10 +113,7 @@
return containers.write(encodings.cache, name, data)
end
---[[ldx--
-<p>There is no unicode encoding but for practical purposes we define
-one.</p>
---ldx]]--
+-- There is no unicode encoding but for practical purposes we define one.
-- maybe make this a function:
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-fbk.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-fbk.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-fbk.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -10,10 +10,6 @@
local utfbyte, utfchar = utf.byte, utf.char
local next = next
---[[ldx--
-<p>This is very experimental code!</p>
---ldx]]--
-
local trace_visualize = false trackers.register("fonts.composing.visualize", function(v) trace_visualize = v end)
local trace_define = false trackers.register("fonts.composing.define", function(v) trace_define = v end)
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-imp-tex.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-imp-tex.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-imp-tex.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -13,36 +13,31 @@
local registerotffeature = otf.features.register
local addotffeature = otf.addfeature
--- tlig (we need numbers for some fonts so ...)
+-- We provide a few old and obsolete compatibility input features. We need numbers
+-- for some fonts so no names here. Do we also need them for afm fonts?
-local specification = {
+local tlig = {
type = "ligature",
order = { "tlig" },
prepend = true,
data = {
- -- endash = "hyphen hyphen",
- -- emdash = "hyphen hyphen hyphen",
- [0x2013] = { 0x002D, 0x002D },
- [0x2014] = { 0x002D, 0x002D, 0x002D },
- -- quotedblleft = "quoteleft quoteleft",
- -- quotedblright = "quoteright quoteright",
- -- quotedblleft = "grave grave",
- -- quotedblright = "quotesingle quotesingle",
- -- quotedblbase = "comma comma",
+ [0x2013] = { 0x002D, 0x002D },
+ [0x2014] = { 0x002D, 0x002D, 0x002D },
},
}
-addotffeature("tlig",specification)
-
-registerotffeature {
- -- this makes it a known feature (in tables)
- name = "tlig",
- description = "tex ligatures",
+local tquo = {
+ type = "ligature",
+ order = { "tquo" },
+ prepend = true,
+ data = {
+ [0x201C] = { 0x0060, 0x0060 },
+ [0x201D] = { 0x0027, 0x0027 },
+ [0x201E] = { 0x002C, 0x002C },
+ },
}
--- trep
-
-local specification = {
+local trep = {
type = "substitution",
order = { "trep" },
prepend = true,
@@ -53,13 +48,13 @@
},
}
-addotffeature("trep",specification)
+addotffeature("trep",trep) -- last
+addotffeature("tlig",tlig)
+addotffeature("tquo",tquo) -- first
-registerotffeature {
- -- this makes it a known feature (in tables)
- name = "trep",
- description = "tex replacements",
-}
+registerotffeature { name = "tlig", description = "tex ligatures" }
+registerotffeature { name = "tquo", description = "tex quotes" }
+registerotffeature { name = "trep", description = "tex replacements" }
-- some day this will be moved to font-imp-scripts.lua
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-ini.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-ini.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-ini.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,9 +6,7 @@
license = "see context related readme files"
}
---[[ldx--
-<p>Not much is happening here.</p>
---ldx]]--
+-- Not much is happening here.
local allocate = utilities.storage.allocate
local sortedhash = table.sortedhash
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-log.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-log.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-log.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -19,12 +19,9 @@
local usedfonts = utilities.storage.allocate()
----- loadedfonts = utilities.storage.allocate()
---[[ldx--
-<p>The following functions are used for reporting about the fonts
-used. The message itself is not that useful in regular runs but since
-we now have several readers it may be handy to know what reader is
-used for which font.</p>
---ldx]]--
+-- The following functions are used for reporting about the fonts used. The message
+-- itself is not that useful in regular runs but since we now have several readers
+-- it may be handy to know what reader is used for which font.
function loggers.onetimemessage(font,char,message,reporter)
local tfmdata = fonts.hashes.identifiers[font]
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-nod.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-nod.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-nod.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -7,11 +7,6 @@
license = "see context related readme files"
}
---[[ldx--
-<p>This is rather experimental. We need more control and some of this
-might become a runtime module instead. This module will be cleaned up!</p>
---ldx]]--
-
local utfchar = utf.char
local concat, fastcopy = table.concat, table.fastcopy
local match, rep = string.match, string.rep
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-one.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-one.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-one.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -7,19 +7,17 @@
license = "see context related readme files"
}
---[[ldx--
-<p>Some code may look a bit obscure but this has to do with the fact that we also use
-this code for testing and much code evolved in the transition from <l n='tfm'/> to
-<l n='afm'/> to <l n='otf'/>.</p>
+-- Some code may look a bit obscure but this has to do with the fact that we also
+-- use this code for testing and much code evolved in the transition from TFM to AFM
+-- to OTF.
+--
+-- The following code still has traces of intermediate font support where we handles
+-- font encodings. Eventually font encoding went away but we kept some code around
+-- in other modules.
+--
+-- This version implements a node mode approach so that users can also more easily
+-- add features.
-<p>The following code still has traces of intermediate font support where we handles
-font encodings. Eventually font encoding went away but we kept some code around in
-other modules.</p>
-
-<p>This version implements a node mode approach so that users can also more easily
-add features.</p>
---ldx]]--
-
local fonts, logs, trackers, containers, resolvers = fonts, logs, trackers, containers, resolvers
local next, type, tonumber, rawget = next, type, tonumber, rawget
@@ -71,16 +69,14 @@
local applyruntimefixes = fonts.treatments and fonts.treatments.applyfixes
---[[ldx--
-<p>We cache files. Caching is taken care of in the loader. We cheat a bit by adding
-ligatures and kern information to the afm derived data. That way we can set them faster
-when defining a font.</p>
+-- We cache files. Caching is taken care of in the loader. We cheat a bit by adding
+-- ligatures and kern information to the afm derived data. That way we can set them
+-- faster when defining a font.
+--
+-- We still keep the loading two phased: first we load the data in a traditional
+-- fashion and later we transform it to sequences. Then we apply some methods also
+-- used in opentype fonts (like tlig).
-<p>We still keep the loading two phased: first we load the data in a traditional
-fashion and later we transform it to sequences. Then we apply some methods also
-used in opentype fonts (like <t>tlig</t>).</p>
---ldx]]--
-
function afm.load(filename)
filename = resolvers.findfile(filename,'afm') or ""
if filename ~= "" and not fonts.names.ignoredfile(filename) then
@@ -312,10 +308,8 @@
end
end
---[[ldx--
-<p>These helpers extend the basic table with extra ligatures, texligatures
-and extra kerns. This saves quite some lookups later.</p>
---ldx]]--
+-- These helpers extend the basic table with extra ligatures, texligatures and extra
+-- kerns. This saves quite some lookups later.
local addthem = function(rawdata,ligatures)
if ligatures then
@@ -349,18 +343,15 @@
addthem(rawdata,afm.helpdata.ligatures)
end
---[[ldx--
-<p>We keep the extra kerns in separate kerning tables so that we can use
-them selectively.</p>
---ldx]]--
+-- We keep the extra kerns in separate kerning tables so that we can use them
+-- selectively.
+--
+-- This is rather old code (from the beginning when we had only tfm). If we unify
+-- the afm data (now we have names all over the place) then we can use shcodes but
+-- there will be many more looping then. But we could get rid of the tables in
+-- char-cmp then. Als, in the generic version we don't use the character database.
+-- (Ok, we can have a context specific variant).
--- This is rather old code (from the beginning when we had only tfm). If
--- we unify the afm data (now we have names all over the place) then
--- we can use shcodes but there will be many more looping then. But we
--- could get rid of the tables in char-cmp then. Als, in the generic version
--- we don't use the character database. (Ok, we can have a context specific
--- variant).
-
local function enhance_add_extra_kerns(rawdata) -- using shcodes is not robust here
local descriptions = rawdata.descriptions
local resources = rawdata.resources
@@ -440,9 +431,7 @@
do_it_copy(afm.helpdata.rightkerned)
end
---[[ldx--
-<p>The copying routine looks messy (and is indeed a bit messy).</p>
---ldx]]--
+-- The copying routine looks messy (and is indeed a bit messy).
local function adddimensions(data) -- we need to normalize afm to otf i.e. indexed table instead of name
if data then
@@ -619,11 +608,9 @@
return nil
end
---[[ldx--
-<p>Originally we had features kind of hard coded for <l n='afm'/> files but since I
-expect to support more font formats, I decided to treat this fontformat like any
-other and handle features in a more configurable way.</p>
---ldx]]--
+-- Originally we had features kind of hard coded for AFM files but since I expect to
+-- support more font formats, I decided to treat this fontformat like any other and
+-- handle features in a more configurable way.
function afm.setfeatures(tfmdata,features)
local okay = constructors.initializefeatures("afm",tfmdata,features,trace_features,report_afm)
@@ -715,13 +702,10 @@
end
end
---[[ldx--
-<p>As soon as we could intercept the <l n='tfm'/> reader, I implemented an
-<l n='afm'/> reader. Since traditional <l n='pdftex'/> could use <l n='opentype'/>
-fonts with <l n='afm'/> companions, the following method also could handle
-those cases, but now that we can handle <l n='opentype'/> directly we no longer
-need this features.</p>
---ldx]]--
+-- As soon as we could intercept the TFM reader, I implemented an AFM reader. Since
+-- traditional pdfTeX could use OpenType fonts with AFM companions, the following
+-- method also could handle those cases, but now that we can handle OpenType
+-- directly we no longer need this features.
local function read_from_afm(specification)
local tfmdata = afmtotfm(specification)
@@ -736,9 +720,7 @@
return tfmdata
end
---[[ldx--
-<p>We have the usual two modes and related features initializers and processors.</p>
---ldx]]--
+-- We have the usual two modes and related features initializers and processors.
registerafmfeature {
name = "mode",
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-onr.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-onr.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-onr.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -7,19 +7,17 @@
license = "see context related readme files"
}
---[[ldx--
-<p>Some code may look a bit obscure but this has to do with the fact that we also use
-this code for testing and much code evolved in the transition from <l n='tfm'/> to
-<l n='afm'/> to <l n='otf'/>.</p>
+-- Some code may look a bit obscure but this has to do with the fact that we also
+-- use this code for testing and much code evolved in the transition from TFM to AFM
+-- to OTF.
+--
+-- The following code still has traces of intermediate font support where we handles
+-- font encodings. Eventually font encoding went away but we kept some code around
+-- in other modules.
+--
+-- This version implements a node mode approach so that users can also more easily
+-- add features.
-<p>The following code still has traces of intermediate font support where we handles
-font encodings. Eventually font encoding went away but we kept some code around in
-other modules.</p>
-
-<p>This version implements a node mode approach so that users can also more easily
-add features.</p>
---ldx]]--
-
local fonts, logs, trackers, resolvers = fonts, logs, trackers, resolvers
local next, type, tonumber, rawset = next, type, tonumber, rawset
@@ -44,12 +42,9 @@
afm.version = 1.513 -- incrementing this number one up will force a re-cache
---[[ldx--
-<p>We start with the basic reader which we give a name similar to the built in <l n='tfm'/>
-and <l n='otf'/> reader.</p>
-<p>We use a new (unfinished) pfb loader but I see no differences between the old
-and new vectors (we actually had one bad vector with the old loader).</p>
---ldx]]--
+-- We start with the basic reader which we give a name similar to the built in TFM
+-- and OTF reader. We use a PFB loader but I see no differences between the old and
+-- new vectors (we actually had one bad vector with the old loader).
local get_indexes, get_shapes
@@ -305,11 +300,10 @@
end
---[[ldx--
-<p>We start with the basic reader which we give a name similar to the built in <l n='tfm'/>
-and <l n='otf'/> reader. We only need data that is relevant for our use. We don't support
-more complex arrangements like multiple master (obsolete), direction specific kerning, etc.</p>
---ldx]]--
+-- We start with the basic reader which we give a name similar to the built in TFM
+-- and OTF reader. We only need data that is relevant for our use. We don't support
+-- more complex arrangements like multiple master (obsolete), direction specific
+-- kerning, etc.
local spacer = patterns.spacer
local whitespace = patterns.whitespace
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-ota.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-ota.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-ota.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -54,10 +54,8 @@
local otffeatures = fonts.constructors.features.otf
local registerotffeature = otffeatures.register
---[[ldx--
-<p>Analyzers run per script and/or language and are needed in order to
-process features right.</p>
---ldx]]--
+-- Analyzers run per script and/or language and are needed in order to process
+-- features right.
local setstate = nuts.setstate
local getstate = nuts.getstate
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-otc.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-otc.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-otc.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -786,7 +786,12 @@
local list = askedsteps[i]
local coverage = nil
local format = nil
- if featuretype == "substitution" then
+if type(list) == "function" then
+ list = list(data,specification,list,i)
+end
+ if not list then
+ -- see ebgaramond hack
+ elseif featuretype == "substitution" then
-- see font-imp-tweaks: we directly pass a mapping so no checks done
category = "gsub"
coverage = (mapping and list) or prepare_substitution(list,featuretype,nocheck)
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-otl.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-otl.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-otl.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -52,7 +52,7 @@
local fonts = fonts
local otf = fonts.handlers.otf
-otf.version = 3.132 -- beware: also sync font-mis.lua and in mtx-fonts
+otf.version = 3.133 -- beware: also sync font-mis.lua and in mtx-fonts
otf.cache = containers.define("fonts", "otl", otf.version, true)
otf.svgcache = containers.define("fonts", "svg", otf.version, true)
otf.pngcache = containers.define("fonts", "png", otf.version, true)
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-oto.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-oto.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-oto.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,6 +6,9 @@
license = "see context related readme files"
}
+-- Todo: Enable fixes from the lmt to here. Also in font-con.lua wrt the changed
+-- assignments. (Around texlive 2024 in order not to disturb generic.)
+
local concat, unpack = table.concat, table.unpack
local insert, remove = table.insert, table.remove
local format, gmatch, gsub, find, match, lower, strip = string.format, string.gmatch, string.gsub, string.find, string.match, string.lower, string.strip
@@ -260,7 +263,9 @@
for i=1,#steps do
for unicode, data in next, steps[i].coverage do
if unicode ~= data then
+-- if not changed[unicode] then
changed[unicode] = data
+-- end
end
if trace_singles then
report_substitution(feature,sequence,descriptions,unicode,data)
@@ -273,7 +278,9 @@
local replacement = data[alternate]
if replacement then
if unicode ~= replacement then
+-- if not changed[unicode] then
changed[unicode] = replacement
+-- end
end
if trace_alternatives then
report_alternate(feature,sequence,descriptions,unicode,replacement,value,"normal")
@@ -281,7 +288,9 @@
elseif defaultalt == "first" then
replacement = data[1]
if unicode ~= replacement then
+-- if not changed[unicode] then
changed[unicode] = replacement
+-- end
end
if trace_alternatives then
report_alternate(feature,sequence,descriptions,unicode,replacement,value,defaultalt)
@@ -289,7 +298,9 @@
elseif defaultalt == "last" then
replacement = data[#data]
if unicode ~= replacement then
+-- if not changed[unicode] then
changed[unicode] = replacement
+-- end
end
if trace_alternatives then
report_alternate(feature,sequence,descriptions,unicode,replacement,value,defaultalt)
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-ots.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-ots.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-ots.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -7,92 +7,90 @@
license = "see context related readme files",
}
---[[ldx--
-<p>I need to check the description at the microsoft site ... it has been improved
-so maybe there are some interesting details there. Most below is based on old and
-incomplete documentation and involved quite a bit of guesswork (checking with the
-abstract uniscribe of those days. But changing things is tricky!</p>
-
-<p>This module is a bit more split up that I'd like but since we also want to test
-with plain <l n='tex'/> it has to be so. This module is part of <l n='context'/>
-and discussion about improvements and functionality mostly happens on the
-<l n='context'/> mailing list.</p>
-
-<p>The specification of OpenType is (or at least decades ago was) kind of vague.
-Apart from a lack of a proper free specifications there's also the problem that
-Microsoft and Adobe may have their own interpretation of how and in what order to
-apply features. In general the Microsoft website has more detailed specifications
-and is a better reference. There is also some information in the FontForge help
-files. In the end we rely most on the Microsoft specification.</p>
-
-<p>Because there is so much possible, fonts might contain bugs and/or be made to
-work with certain rederers. These may evolve over time which may have the side
-effect that suddenly fonts behave differently. We don't want to catch all font
-issues.</p>
-
-<p>After a lot of experiments (mostly by Taco, me and Idris) the first implementation
-was already quite useful. When it did most of what we wanted, a more optimized version
-evolved. Of course all errors are mine and of course the code can be improved. There
-are quite some optimizations going on here and processing speed is currently quite
-acceptable and has been improved over time. Many complex scripts are not yet supported
-yet, but I will look into them as soon as <l n='context'/> users ask for it.</p>
-
-<p>The specification leaves room for interpretation. In case of doubt the Microsoft
-implementation is the reference as it is the most complete one. As they deal with
-lots of scripts and fonts, Kai and Ivo did a lot of testing of the generic code and
-their suggestions help improve the code. I'm aware that not all border cases can be
-taken care of, unless we accept excessive runtime, and even then the interference
-with other mechanisms (like hyphenation) are not trivial.</p>
-
-<p>Especially discretionary handling has been improved much by Kai Eigner who uses complex
-(latin) fonts. The current implementation is a compromis between his patches and my code
-and in the meantime performance is quite ok. We cannot check all border cases without
-compromising speed but so far we're okay. Given good test cases we can probably improve
-it here and there. Especially chain lookups are non trivial with discretionaries but
-things got much better over time thanks to Kai.</p>
-
-<p>Glyphs are indexed not by unicode but in their own way. This is because there is no
-relationship with unicode at all, apart from the fact that a font might cover certain
-ranges of characters. One character can have multiple shapes. However, at the
-<l n='tex'/> end we use unicode so and all extra glyphs are mapped into a private
-space. This is needed because we need to access them and <l n='tex'/> has to include
-then in the output eventually.</p>
-
-<p>The initial data table is rather close to the open type specification and also not
-that different from the one produced by <l n='fontforge'/> but we uses hashes instead.
-In <l n='context'/> that table is packed (similar tables are shared) and cached on disk
-so that successive runs can use the optimized table (after loading the table is
-unpacked).</p>
-
-<p>This module is sparsely documented because it is has been a moving target. The
-table format of the reader changed a bit over time and we experiment a lot with
-different methods for supporting features. By now the structures are quite stable</p>
-
-<p>Incrementing the version number will force a re-cache. We jump the number by one
-when there's a fix in the reader or processing code that can result in different
-results.</p>
-
-<p>This code is also used outside context but in context it has to work with other
-mechanisms. Both put some constraints on the code here.</p>
-
---ldx]]--
-
--- Remark: We assume that cursives don't cross discretionaries which is okay because it
--- is only used in semitic scripts.
+-- I need to check the description at the microsoft site ... it has been improved so
+-- maybe there are some interesting details there. Most below is based on old and
+-- incomplete documentation and involved quite a bit of guesswork (checking with the
+-- abstract uniscribe of those days. But changing things is tricky!
--
+-- This module is a bit more split up that I'd like but since we also want to test
+-- with plain TeX it has to be so. This module is part of ConTeXt and discussion
+-- about improvements and functionality mostly happens on the ConTeXt mailing list.
+--
+-- The specification of OpenType is (or at least decades ago was) kind of vague.
+-- Apart from a lack of a proper free specifications there's also the problem that
+-- Microsoft and Adobe may have their own interpretation of how and in what order to
+-- apply features. In general the Microsoft website has more detailed specifications
+-- and is a better reference. There is also some information in the FontForge help
+-- files. In the end we rely most on the Microsoft specification.
+--
+-- Because there is so much possible, fonts might contain bugs and/or be made to
+-- work with certain rederers. These may evolve over time which may have the side
+-- effect that suddenly fonts behave differently. We don't want to catch all font
+-- issues.
+--
+-- After a lot of experiments (mostly by Taco, me and Idris) the first
+-- implementation was already quite useful. When it did most of what we wanted, a
+-- more optimized version evolved. Of course all errors are mine and of course the
+-- code can be improved. There are quite some optimizations going on here and
+-- processing speed is currently quite acceptable and has been improved over time.
+-- Many complex scripts are not yet supported yet, but I will look into them as soon
+-- as ConTeXt users ask for it.
+--
+-- The specification leaves room for interpretation. In case of doubt the Microsoft
+-- implementation is the reference as it is the most complete one. As they deal with
+-- lots of scripts and fonts, Kai and Ivo did a lot of testing of the generic code
+-- and their suggestions help improve the code. I'm aware that not all border cases
+-- can be taken care of, unless we accept excessive runtime, and even then the
+-- interference with other mechanisms (like hyphenation) are not trivial.
+--
+-- Especially discretionary handling has been improved much by Kai Eigner who uses
+-- complex (latin) fonts. The current implementation is a compromis between his
+-- patches and my code and in the meantime performance is quite ok. We cannot check
+-- all border cases without compromising speed but so far we're okay. Given good
+-- test cases we can probably improve it here and there. Especially chain lookups
+-- are non trivial with discretionaries but things got much better over time thanks
+-- to Kai.
+--
+-- Glyphs are indexed not by unicode but in their own way. This is because there is
+-- no relationship with unicode at all, apart from the fact that a font might cover
+-- certain ranges of characters. One character can have multiple shapes. However, at
+-- the TeX end we use unicode so and all extra glyphs are mapped into a private
+-- space. This is needed because we need to access them and TeX has to include then
+-- in the output eventually.
+--
+-- The initial data table is rather close to the open type specification and also
+-- not that different from the one produced by Fontforge but we uses hashes instead.
+-- In ConTeXt that table is packed (similar tables are shared) and cached on disk so
+-- that successive runs can use the optimized table (after loading the table is
+-- unpacked).
+--
+-- This module is sparsely documented because it is has been a moving target. The
+-- table format of the reader changed a bit over time and we experiment a lot with
+-- different methods for supporting features. By now the structures are quite stable
+--
+-- Incrementing the version number will force a re-cache. We jump the number by one
+-- when there's a fix in the reader or processing code that can result in different
+-- results.
+--
+-- This code is also used outside ConTeXt but in ConTeXt it has to work with other
+-- mechanisms. Both put some constraints on the code here.
+--
+-- Remark: We assume that cursives don't cross discretionaries which is okay because
+-- it is only used in semitic scripts.
+--
-- Remark: We assume that marks precede base characters.
--
--- Remark: When complex ligatures extend into discs nodes we can get side effects. Normally
--- this doesn't happen; ff\d{l}{l}{l} in lm works but ff\d{f}{f}{f}.
+-- Remark: When complex ligatures extend into discs nodes we can get side effects.
+-- Normally this doesn't happen; ff\d{l}{l}{l} in lm works but ff\d{f}{f}{f}.
--
-- Todo: check if we copy attributes to disc nodes if needed.
--
--- Todo: it would be nice if we could get rid of components. In other places we can use
--- the unicode properties. We can just keep a lua table.
+-- Todo: it would be nice if we could get rid of components. In other places we can
+-- use the unicode properties. We can just keep a lua table.
--
--- Remark: We do some disc juggling where we need to keep in mind that the pre, post and
--- replace fields can have prev pointers to a nesting node ... I wonder if that is still
--- needed.
+-- Remark: We do some disc juggling where we need to keep in mind that the pre, post
+-- and replace fields can have prev pointers to a nesting node ... I wonder if that
+-- is still needed.
--
-- Remark: This is not possible:
--
@@ -1038,10 +1036,8 @@
end
end
---[[ldx--
-<p>We get hits on a mark, but we're not sure if the it has to be applied so
-we need to explicitly test for basechar, baselig and basemark entries.</p>
---ldx]]--
+-- We get hits on a mark, but we're not sure if the it has to be applied so we need
+-- to explicitly test for basechar, baselig and basemark entries.
function handlers.gpos_mark2base(head,start,dataset,sequence,markanchors,rlmode,skiphash)
local markchar = getchar(start)
@@ -1236,10 +1232,8 @@
return head, start, false
end
---[[ldx--
-<p>I will implement multiple chain replacements once I run into a font that uses
-it. It's not that complex to handle.</p>
---ldx]]--
+-- I will implement multiple chain replacements once I run into a font that uses it.
+-- It's not that complex to handle.
local chainprocs = { }
@@ -1292,30 +1286,23 @@
chainprocs.reversesub = reversesub
---[[ldx--
-<p>This chain stuff is somewhat tricky since we can have a sequence of actions to be
-applied: single, alternate, multiple or ligature where ligature can be an invalid
-one in the sense that it will replace multiple by one but not neccessary one that
-looks like the combination (i.e. it is the counterpart of multiple then). For
-example, the following is valid:</p>
+-- This chain stuff is somewhat tricky since we can have a sequence of actions to be
+-- applied: single, alternate, multiple or ligature where ligature can be an invalid
+-- one in the sense that it will replace multiple by one but not neccessary one that
+-- looks like the combination (i.e. it is the counterpart of multiple then). For
+-- example, the following is valid:
+--
+-- xxxabcdexxx [single a->A][multiple b->BCD][ligature cde->E] xxxABCDExxx
+--
+-- Therefore we we don't really do the replacement here already unless we have the
+-- single lookup case. The efficiency of the replacements can be improved by
+-- deleting as less as needed but that would also make the code even more messy.
+--
+-- Here we replace start by a single variant.
+--
+-- To be done : what if > 1 steps (example needed)
+-- This is messy: do we need this disc checking also in alternates?
-<typing>
-<line>xxxabcdexxx [single a->A][multiple b->BCD][ligature cde->E] xxxABCDExxx</line>
-</typing>
-
-<p>Therefore we we don't really do the replacement here already unless we have the
-single lookup case. The efficiency of the replacements can be improved by deleting
-as less as needed but that would also make the code even more messy.</p>
---ldx]]--
-
---[[ldx--
-<p>Here we replace start by a single variant.</p>
---ldx]]--
-
--- To be done (example needed): what if > 1 steps
-
--- this is messy: do we need this disc checking also in alternates?
-
local function reportzerosteps(dataset,sequence)
logwarning("%s: no steps",cref(dataset,sequence))
end
@@ -1390,9 +1377,7 @@
return head, start, false
end
---[[ldx--
-<p>Here we replace start by new glyph. First we delete the rest of the match.</p>
---ldx]]--
+-- Here we replace start by new glyph. First we delete the rest of the match.
-- char_1 mark_1 -> char_x mark_1 (ignore marks)
-- char_1 mark_1 -> char_x
@@ -1444,9 +1429,7 @@
return head, start, false
end
---[[ldx--
-<p>Here we replace start by a sequence of new glyphs.</p>
---ldx]]--
+-- Here we replace start by a sequence of new glyphs.
function chainprocs.gsub_multiple(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
local mapping = currentlookup.mapping
@@ -1470,11 +1453,9 @@
return head, start, false
end
---[[ldx--
-<p>When we replace ligatures we use a helper that handles the marks. I might change
-this function (move code inline and handle the marks by a separate function). We
-assume rather stupid ligatures (no complex disc nodes).</p>
---ldx]]--
+-- When we replace ligatures we use a helper that handles the marks. I might change
+-- this function (move code inline and handle the marks by a separate function). We
+-- assume rather stupid ligatures (no complex disc nodes).
-- compare to handlers.gsub_ligature which is more complex ... why
@@ -2532,7 +2513,7 @@
-- fonts can have many steps (each doing one check) or many contexts
-- todo: make a per-char cache so that we have small contexts (when we have a context
- -- n == 1 and otherwise it can be more so we can even distingish n == 1 or more)
+ -- n == 1 and otherwise it can be more so we can even distinguish n == 1 or more)
local nofcontexts = contexts.n -- #contexts
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-sol.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-sol.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-sol.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -111,7 +111,7 @@
local fontkern_code = kerncodes.fontkern
-local righttoleft_code = nodes.dirvalues.righttoleft
+local righttoleft_code = (tex.directioncodes and tex.directioncodes.righttoleft) or nodes.dirvalues.righttoleft -- LMTX
local userdefinedwhatsit_code = whatsitcodes.userdefined
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-syn.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-syn.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-syn.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -56,10 +56,8 @@
local report_names = logs.reporter("fonts","names")
---[[ldx--
-<p>This module implements a name to filename resolver. Names are resolved
-using a table that has keys filtered from the font related files.</p>
---ldx]]--
+-- This module implements a name to filename resolver. Names are resolved using a
+-- table that has keys filtered from the font related files.
fonts = fonts or { } -- also used elsewhere
@@ -88,10 +86,6 @@
directives.register("fonts.autoreload", function(v) autoreload = toboolean(v) end)
directives.register("fonts.usesystemfonts", function(v) usesystemfonts = toboolean(v) end)
---[[ldx--
-<p>A few helpers.</p>
---ldx]]--
-
-- -- what to do with these -- --
--
-- thin -> thin
@@ -305,10 +299,8 @@
end
end
---[[ldx--
-<p>It would make sense to implement the filters in the related modules,
-but to keep the overview, we define them here.</p>
---ldx]]--
+-- It would make sense to implement the filters in the related modules, but to keep
+-- the overview, we define them here.
filters.afm = fonts.handlers.afm.readers.getinfo
filters.otf = fonts.handlers.otf.readers.getinfo
@@ -412,11 +404,9 @@
-- end
-- end
---[[ldx--
-<p>The scanner loops over the filters using the information stored in
-the file databases. Watch how we check not only for the names, but also
-for combination with the weight of a font.</p>
---ldx]]--
+-- The scanner loops over the filters using the information stored in the file
+-- databases. Watch how we check not only for the names, but also for combination
+-- with the weight of a font.
filters.list = {
"otf", "ttf", "ttc", "afm", -- no longer dfont support (for now)
@@ -1402,11 +1392,8 @@
end
end
---[[ldx--
-<p>The resolver also checks if the cached names are loaded. Being clever
-here is for testing purposes only (it deals with names prefixed by an
-encoding name).</p>
---ldx]]--
+-- The resolver also checks if the cached names are loaded. Being clever here is for
+-- testing purposes only (it deals with names prefixed by an encoding name).
local function fuzzy(mapping,sorted,name,sub) -- no need for reverse sorted here
local condensed = gsub(name,"[^%a%d]","")
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-tfm.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-tfm.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-tfm.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -50,22 +50,19 @@
fonts.formats.tfm = "type1" -- we need to have at least a value here
fonts.formats.ofm = "type1" -- we need to have at least a value here
---[[ldx--
-<p>The next function encapsulates the standard <l n='tfm'/> loader as
-supplied by <l n='luatex'/>.</p>
---ldx]]--
-
--- this might change: not scaling and then apply features and do scaling in the
--- usual way with dummy descriptions but on the other hand .. we no longer use
--- tfm so why bother
-
--- ofm directive blocks local path search unless set; btw, in context we
--- don't support ofm files anyway as this format is obsolete
-
--- we need to deal with nested virtual fonts, but because we load in the
--- frontend we also need to make sure we don't nest too deep (esp when sizes
--- get large)
+-- The next function encapsulates the standard TFM loader as supplied by LuaTeX.
--
+-- This might change: not scaling and then apply features and do scaling in the
+-- usual way with dummy descriptions but on the other hand. However, we no longer
+-- use TFM (except for the JMN math fonts) so why bother.
+--
+-- The ofm directive blocks a local path search unless set. Actually, in ConTeXt we
+-- never had to deal with OFM files anyway as this format is obsolete (there are
+-- hardly any fonts in that format that are of use).
+--
+-- We need to deal with nested virtual fonts, but because we load in the frontend we
+-- also need to make sure we don't nest too deep (esp when sizes get large)
+--
-- (VTITLE Example of a recursion)
-- (MAPFONT D 0 (FONTNAME recurse)(FONTAT D 2))
-- (CHARACTER C A (CHARWD D 1)(CHARHT D 1)(MAP (SETRULE D 1 D 1)))
@@ -72,7 +69,7 @@
-- (CHARACTER C B (CHARWD D 2)(CHARHT D 2)(MAP (SETCHAR C A)))
-- (CHARACTER C C (CHARWD D 4)(CHARHT D 4)(MAP (SETCHAR C B)))
--
--- we added the same checks as below to the luatex engine
+-- We added the same checks as below to the LuaTeX engine.
function tfm.setfeatures(tfmdata,features)
local okay = constructors.initializefeatures("tfm",tfmdata,features,trace_features,report_tfm)
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-trt.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-trt.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-trt.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -12,11 +12,9 @@
local splitbase = file.splitbase
local lower = string.lower
---[[ldx--
-<p>We provide a simple treatment mechanism (mostly because I want to demonstrate
-something in a manual). It's one of the few places where an lfg file gets loaded
-outside the goodies manager.</p>
---ldx]]--
+-- We provide a simple treatment mechanism (mostly because I want to demonstrate
+-- something in a manual). It's one of the few places where an lfg file gets loaded
+-- outside the goodies manager.
local treatments = fonts.treatments or { }
fonts.treatments = treatments
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-vir.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-vir.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-vir.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,9 +6,8 @@
license = "see context related readme files"
}
---[[ldx--
-<p>This is very experimental code! Not yet adapted to recent changes. This will change.</p>
---ldx]]--
+-- This is very experimental code! Not yet adapted to recent changes. This will
+-- change. Actually we moved on.
-- present in the backend but unspecified:
--
@@ -25,10 +24,8 @@
local vf = constructors.handlers.vf
vf.version = 1.000 -- same as tfm
---[[ldx--
-<p>We overload the <l n='vf'/> reader.</p>
---ldx]]--
-
+-- -- We overload the VF reader.:
+--
-- general code / already frozen
--
-- function vf.find(name)
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/good-ini.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/good-ini.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/good-ini.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -9,12 +9,14 @@
-- depends on ctx
local type, next = type, next
-local gmatch = string.gmatch
-local sortedhash, insert = table.sortedhash, table.insert
+local gmatch, find, topattern = string.gmatch, string.find, string.topattern
+local sortedhash, insert, contains = table.sortedhash, table.insert, table.contains
local fonts = fonts
-local trace_goodies = false trackers.register("fonts.goodies", function(v) trace_goodies = v end)
+local trace_goodies = false trackers.register("fonts.goodies", function(v) trace_goodies = v end)
+local trace_extensions = false trackers.register("fonts.goodies.extensions", function(v) trace_extensions = v end)
+
local report_goodies = logs.reporter("fonts","goodies")
local allocate = utilities.storage.allocate
@@ -324,15 +326,43 @@
local function setextensions(tfmdata)
local goodies = tfmdata.goodies
if goodies then
+ local shared = tfmdata.shared
+ local metadata = shared and shared.rawdata and shared.rawdata.metadata
for i=1,#goodies do
local g = goodies[i]
local e = g.extensions
if e then
- local goodie = g.name or "unknown"
+ local goodie = g.name or "unknown"
+ local fontname = metadata and metadata.fontname
+ if trace_extensions then
+ report_goodies("checking extensions for font %a",fontname or "unknown")
+ end
for i=1,#e do
- local name = "extension-" .. i
- -- report_goodies("adding extension %s from %s",name,goodie)
- otf.enhancers.addfeature(tfmdata.shared.rawdata,name,e[i])
+ local entry = e[i]
+ local fnames = entry.fonts
+ local tnames = type(fnames)
+ local valid = false
+ if not fontname then
+ valid = true
+ elseif tnames == "table" then
+ if fnames[fontname] then
+ valid = true
+ elseif #fnames > 0 and contains(fnames,fontname) then
+ valid = true
+ end
+ elseif tnames == "string" then
+ fnames = topattern(fnames)
+ valid = find(fontname,fnames) and true
+ else
+ valid = true
+ end
+ if valid then
+ local name = "extension-" .. i
+ if trace_extensions then
+ report_goodies("adding extension %a from %a for font %a",name,goodie,fontname or "unknown")
+ end
+ otf.enhancers.addfeature(tfmdata.shared.rawdata,name,entry)
+ end
end
end
end
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/l-dir.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/l-dir.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/l-dir.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -21,7 +21,8 @@
local lfs = lfs
local attributes = lfs.attributes
-local walkdir = lfs.dir
+----- walkdir = lfs.dir
+local scandir = lfs.dir
local isdir = lfs.isdir -- not robust, will be overloaded anyway
local isfile = lfs.isfile -- not robust, will be overloaded anyway
local currentdir = lfs.currentdir
@@ -69,6 +70,20 @@
end
+-- safeguard
+
+local isreadable = file.isreadable
+
+local walkdir = function(p,...)
+ if isreadable(p.."/.") then
+ return scandir(p,...)
+ else
+ return function() end
+ end
+end
+
+lfs.walkdir = walkdir
+
-- handy
function dir.current()
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/lang-def.mkiv
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/lang-def.mkiv 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/lang-def.mkiv 2023-05-06 22:03:57 UTC (rev 67034)
@@ -273,7 +273,7 @@
[\s!hy]
[\c!spacing=\v!packed,
\c!leftsentence=\endash, % *sentences not confirmed
- \c!rightsentence=\endash,
+ \c!rightsentence=\endash,
\c!leftsubsentence=\endash,
\c!rightsubsentence=\endash,
\c!leftquote=\guilsingleleft,
@@ -781,8 +781,9 @@
\c!rightquote=\upperrightsingleninequote,
\c!leftquotation=\upperleftdoublesixquote,
\c!rightquotation=\upperrightdoubleninequote,
- \c!date={\v!year,\space,\v!month,\space,\v!day}]
+ \c!date={\v!day,\space,\v!month,\space,\v!year}]
+
\installlanguage[\s!pt-br][\c!default=\s!pt] % Brazil
\installlanguage[\s!es-es][\c!default=\s!es] % Spain
\installlanguage[\s!es-la][\c!default=\s!es] % Latin America
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/lang-txt.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/lang-txt.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/lang-txt.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -49,7 +49,7 @@
-- nn Norwegian Hans Fredrik Nordhaug, ...
-- nl Dutch Hans Hagen
-- pl Polish Grzegorz Sapijaszko (2011)
--- pt Portuguese Pedro F. M. Mendonça
+-- pt Portuguese Pedro F. M. Mendonça; additions Joana Sophia Bogas Carneiro (2023)
-- ro Romanian Dan Seracu, ...
-- ru Russian Olga Briginets, Alexander Bokovoy, Victor Figurnov, ...
-- sk Slovak Tomáš Hála (2012, 2022)
@@ -56,7 +56,7 @@
-- sl Slovenian Mojca Miklavec
-- sr Serbian Ivan Pešić (2020)
-- sr-latn Serbian Ivan Pešić (2020)
--- sv Swedish ...
+-- sv Swedish ...; additions Edith and Mikael Sundqvist (2023)
-- tk Turkish Tobias Burnus
-- tr Turkmen Nazar Annagurban
-- ua Ukrainian Olga Briginets, Alexander Bokovoy, Victor Figurnov, ...
@@ -69,6 +69,11 @@
-- thinspace == sixperemspace = 0x2006
-- print("!"..utf.char(0x2006).."!")
+-- Will be done when needed:
+-- (TH) editor|editors:mnem missing
+-- (HH) save memory at functions
+-- (MS) btx settings for sv
+
languages = languages or { }
local languages = languages
@@ -84,7 +89,7 @@
["be"]="У",
["bg"]="в",
["ca"]="En",
- ["cs"]={ "In", "V" },
+ ["cs"]="In",
["de"]="In",
["en"]="In",
["eo"]="En",
@@ -93,7 +98,7 @@
["fr"]="Dans",
["hy"]="Մեջ",
["mk"]="во",
- ["sk"]={ "In", "V" },
+ ["sk"]="In",
["sr"]="У",
["sr-latn"]="U",
},
@@ -113,6 +118,7 @@
["hy"]="Համար",
["mk"]="Број",
["nl"]="Nummer",
+ ["pt"]="Numero",
["sk"]="Číslo",
["sr"]="Број",
["sr-latn"]="Broj",
@@ -134,6 +140,7 @@
["hy"]="Ծավալ",
["mk"]="Том",
["nl"]="Deel",
+ ["pt"]="Volume",
["sk"]="Zväzok",
["sr"]="Том",
["sr-latn"]="Tom",
@@ -156,6 +163,7 @@
["it"]="e",
["mk"]="и",
["nl"]="en",
+ ["pt"]="e",
["sk"]="a",
["sr"]="и",
["sr-latn"]="i",
@@ -166,7 +174,7 @@
["be"]="Выданне",
["bg"]="издание",
["ca"]="Edició",
- ["cs"]="Vydání",
+ ["cs"]="vydání",
["de"]="Auflage",
["en"]="edition",
["eo"]="eldono",
@@ -179,7 +187,8 @@
["it"]="edizione",
["mk"]="издание",
["nl"]="editie",
- ["sk"]="Vydanie",
+ ["pt"]="edicao",
+ ["sk"]="vydanie",
["sr"]="издање",
["sr-latn"]="izdanje",
},
@@ -186,10 +195,10 @@
},
["editor"]={
["labels"]={
- ["be"]="Рэдактар",
+ ["be"]="реэдактар",
["bg"]="редактор",
- ["ca"]="Editor",
- ["cs"]={ "Editor", "Editorka" },
+ ["ca"]="editor",
+ ["cs"]="editor",
["de"]="Herausgeber",
["en"]="editor",
["eo"]="eldonisto",
@@ -200,17 +209,24 @@
["hy"]="խմբագիր",
["it"]="a cura di",
["mk"]="уредник",
- ["sk"]={ "Editor", "Editorka" },
+ ["pt"]="editor",
+ ["sk"]="editor",
["sr"]="уредник",
["sr-latn"]="urednik",
},
},
+ ["editor:f"]={
+ ["labels"]={
+ ["cs"]="editorka",
+ ["sk"]="editorka",
+ },
+ },
["editors"]={
["labels"]={
- ["be"]="Рэдактары",
+ ["be"]="рэдактары",
["bg"]="редактори",
- ["ca"]="Editors",
- ["cs"]="Editoři",
+ ["ca"]="editors",
+ ["cs"]="editoři",
["de"]="Herausgeber",
["en"]="editors",
["eo"]="eldonistoj",
@@ -220,7 +236,8 @@
["hy"]="խմբագիրներ",
["it"]="a cura di",
["mk"]="уредници",
- ["sk"]="Editori",
+ ["pt"]="editores",
+ ["sk"]="editori",
["sr"]="уредници",
["sr-latn"]="urednici",
},
@@ -227,16 +244,10 @@
},
["editors:f"]={
["labels"]={
- ["cs"]="Editorky",
- ["sk"]="Editorky",
+ ["cs"]="editorky",
+ ["sk"]="editorky",
},
},
- ["editors:m"]={
- ["labels"]={
- ["cs"]="Editoři",
- ["sk"]="Editori",
- },
- },
["in"]={
["labels"]={
["be"]="у",
@@ -251,6 +262,7 @@
["fr"]="dans",
["hy"]="մեջ",
["mk"]="во",
+ ["pt"]="em",
["sk"]="v",
["sr"]="у",
["sr-latn"]="u",
@@ -274,6 +286,7 @@
["it"]="Tesi di laurea",
["mk"]="Магистерска дисертација",
["nl"]="Masterproef",
+ ["pt"]="Tese de mestrado",
["sk"]="Diplomová práca",
["sr"]="Мастер дисертација",
["sr-latn"]="Master disertacija",
@@ -295,6 +308,7 @@
["hy"]="համար",
["mk"]="број",
["nl"]="nummer",
+ ["pt"]="numero",
["sk"]="číslo",
["sr"]="број",
["sr-latn"]="broj",
@@ -314,6 +328,7 @@
["hy"]="-ից",
["mk"]="од",
["nl"]="van",
+ ["pt"]="de",
["sk"]="z",
["sr"]="од",
["sr-latn"]="od",
@@ -322,7 +337,7 @@
["others"]={
["labels"]={
["ca"]="et al.",
- ["cs"]={ "a~kol.", "et al."},
+ ["cs"]="a~kol.",
["de"]="et al.",
["en"]="et al.",
["eo"]="aliaj",
@@ -331,7 +346,8 @@
["fr"]="et al.",
["hy"]="եւ այլն",
["mk"]="и др.",
- ["sk"]={ "a~kol.", "et al."},
+ ["pt"]="etc",
+ ["sk"]="a~kol.",
["sr"]="и др.",
["sr-latn"]="i dr.",
},
@@ -350,6 +366,7 @@
["fr"]="p.",
["hy"]="էջ",
["mk"]="стр.",
+ ["pt"]="p",
["sk"]="s.",
["sr"]="стр.",
["sr-latn"]="str.",
@@ -372,6 +389,7 @@
["hy"]="էջեր",
["mk"]="страници",
["nl"]="paginas",
+ ["pt"]="paginas",
["sk"]="strany",
["sr"]="страницa",
["sr-latn"]="stranica",
@@ -394,6 +412,7 @@
["it"]="Brevetto",
["mk"]="Патент",
["nl"]="Octrooi",
+ ["pt"]="Patente",
["sk"]="Patent",
["sr"]="Патент",
["sr-latn"]="Patent",
@@ -416,6 +435,7 @@
["it"]="Tesi di dottorato",
["mk"]="Докторска дисертација",
["nl"]="Proefschrift",
+ ["pt"]="Tese de douturamento",
["sk"]="Dizertačná práca",
["sr"]="Докторска дисертација",
["sr-latn"]="Doktorska disertacija",
@@ -433,6 +453,7 @@
["fa"]="صص",
["hy"]="էջ",
["mk"]="стр.",
+ ["pt"]="pp",
["sk"]="s.",
["sr"]="стр.",
["sr-latn"]="str.",
@@ -456,6 +477,7 @@
["it"]="Relazione tecnica",
["mk"]="Технички извештај",
["nl"]="Technisch rapport",
+ ["pt"]="Reporte tecnico",
["sk"]="Technická zpráva",
["sr"]="Технички извештај",
["sr-latn"]="Tehnički izveštaj",
@@ -477,6 +499,7 @@
["hy"]="ծավալ",
["mk"]="том",
["nl"]="deel",
+ ["pt"]="volume",
["sk"]="zväzok",
["sr"]="том",
["sr-latn"]="tom",
@@ -499,6 +522,7 @@
["it"]="con",
["mk"]="со",
["nl"]="met",
+ ["pt"]="com",
["sk"]="s",
["sr"]="са",
["sr-latn"]="sa",
@@ -515,9 +539,11 @@
["es"]="Pr",
["hy"]="P",
["mk"]="P",
+ ["pt"]="Pr",
["sk"]="P",
["sr"]="P",
["sr-latn"]="P",
+ ["sv"]="Pr",
},
},
["arccos"]={
@@ -531,9 +557,11 @@
["hy"]="arccos",
["mk"]="arccos",
["pl"]="arc\\sixperemspace cos",
+ ["pt"]="arccos",
["sk"]="arccos",
["sr"]="arccos",
["sr-latn"]="arccos",
+ ["sv"]="arccos",
},
},
["arccosh"]={
@@ -547,9 +575,11 @@
["hy"]="arccosh",
["mk"]="arccosh",
["pl"]="arc\\sixperemspace cosh",
+ ["pt"]="arccosh",
["sk"]="arccosh",
["sr"]="arccosh",
["sr-latn"]="arccosh",
+ ["sv"]="arcosh",
},
},
["arccot"]={
@@ -563,9 +593,11 @@
["hy"]="arcctg",
["mk"]="arccotg",
["pl"]="arc\\sixperemspace ctg",
+ ["pt"]="arccot",
["sk"]="arccotg",
["sr"]="arcctg",
["sr-latn"]="arcctg",
+ ["sv"]="arccot",
},
},
["arcsin"]={
@@ -579,9 +611,11 @@
["hy"]="arcsin",
["mk"]="arcsin",
["pl"]="arc\\sixperemspace sin",
+ ["pt"]="arcsin",
["sk"]="arcsin",
["sr"]="arcsin",
["sr-latn"]="arcsin",
+ ["sv"]="arcsin",
},
},
["arcsinh"]={
@@ -595,9 +629,11 @@
["hy"]="arcsinh",
["mk"]="arcsinh",
["pl"]="arc\\sixperemspace sinh",
+ ["pt"]="arcsinh",
["sk"]="arcsinh",
["sr"]="arcsinh",
["sr-latn"]="arcsinh",
+ ["sv"]="arsinh",
},
},
["arctan"]={
@@ -611,9 +647,11 @@
["hy"]="arctan",
["mk"]="arctg",
["pl"]="arc\\sixperemspace tg",
+ ["pt"]="arctan",
["sk"]="arctg",
["sr"]="arctg",
["sr-latn"]="arctg",
+ ["sv"]="arctan",
},
},
["arctanh"]={
@@ -627,9 +665,11 @@
["hy"]="arctanh",
["mk"]="arctgh",
["pl"]="arc\\sixperemspace tgh",
+ ["pt"]="arctanh",
["sk"]="arctgh",
["sr"]="arctgh",
["sr-latn"]="arctgh",
+ ["sv"]="artanh",
},
},
["arg"]={
@@ -641,9 +681,11 @@
["es"]="arg",
["hy"]="arg",
["mk"]="arg",
+ ["pt"]="arg",
["sk"]="arg",
["sr"]="arg",
["sr-latn"]="arg",
+ ["sv"]="arg",
},
},
["cos"]={
@@ -655,9 +697,11 @@
["es"]="cos",
["hy"]="cos",
["mk"]="cos",
+ ["pt"]="cos",
["sk"]="cos",
["sr"]="cos",
["sr-latn"]="cos",
+ ["sv"]="cos",
},
},
["cosh"]={
@@ -669,9 +713,11 @@
["es"]="cosh",
["hy"]="cosh",
["mk"]="cosh",
+ ["pt"]="cosh",
["sk"]="cosh",
["sr"]="cosh",
["sr-latn"]="cosh",
+ ["sv"]="cosh",
},
},
["cot"]={
@@ -685,9 +731,11 @@
["hy"]="cot",
["mk"]="ctg",
["pl"]="ctg",
+ ["pt"]="cot",
["sk"]="cotg",
["sr"]="ctg",
["sr-latn"]="ctg",
+ ["sv"]="cot",
},
},
["coth"]={
@@ -699,9 +747,11 @@
["es"]="coth",
["hy"]="coth",
["mk"]="ctgh",
+ ["pt"]="coth",
["sk"]="cotgh",
["sr"]="ctgh",
["sr-latn"]="ctgh",
+ ["sv"]="coth",
},
},
["csc"]={
@@ -713,28 +763,13 @@
["es"]="csc",
["hy"]="csc",
["mk"]="cosec",
+ ["pt"]="csc",
["sk"]="cosec",
["sr"]="cosec",
["sr-latn"]="cosec",
+ ["sv"]="csc",
},
},
---[[ ["ctg"]={
- ["labels"]={
- ["ca"]="cot",
- ["cs"]="cotg",
- ["en"]="cot",
- ["eo"]="cotan",
- ["es"]="cot",
- ["hr"]="ctg",
- ["hy"]="cot",
- ["mk"]="ctg",
- ["pl"]="ctg",
- ["sk"]="cotg",
- ["sr"]="ctg",
- ["sr-latn"]="ctg",
- },
- },
---]]
["deg"]={
["labels"]={
["ca"]="gr",
@@ -744,9 +779,11 @@
["es"]="gr",
["hy"]="deg",
["mk"]="deg",
+ ["pt"]="deg",
["sk"]="deg",
["sr"]="deg",
["sr-latn"]="deg",
+ ["sv"]="deg",
},
},
["det"]={
@@ -757,9 +794,11 @@
["eo"]="det",
["es"]="det",
["hy"]="det",
+ ["pt"]="det",
["sk"]="det",
["sr"]="det",
["sr-latn"]="det",
+ ["sv"]="det",
},
},
["diff"]={
@@ -769,7 +808,9 @@
["en"]="d",
["eo"]="dif",
["hy"]="d",
+ ["pt"]="d",
["sk"]="d",
+ ["sv"]="d",
},
},
["dim"]={
@@ -781,9 +822,11 @@
["es"]="dim",
["hy"]="dim",
["mk"]="dim",
+ ["pt"]="dim",
["sk"]="dim",
["sr"]="dim",
["sr-latn"]="dim",
+ ["sv"]="dim",
},
},
["exp"]={
@@ -794,9 +837,11 @@
["eo"]="eksp",
["es"]="exp",
["hy"]="exp",
+ ["pt"]="exp",
["sk"]="exp",
["sr"]="exp",
["sr-latn"]="exp",
+ ["sv"]="exp",
},
},
["gcd"]={
@@ -811,9 +856,11 @@
["hy"]="ԱԸԲ",
["mk"]="НЗД",
["nl"]="ggd",
+ ["pt"]="gcd",
["sk"]="NSD",
["sr"]="НЗД",
["sr-latn"]="NZD",
+ ["sv"]="sgd",
},
},
["hom"]={
@@ -824,7 +871,9 @@
["eo"]="hom",
["es"]="hom",
["hy"]="հոմ",
+ ["pt"]="hom",
["sk"]="Hom",
+ ["sv"]="hom",
},
},
["inf"]={
@@ -836,9 +885,11 @@
["es"]="inf",
["hy"]="inf",
["mk"]="inf",
+ ["pt"]="inf",
["sk"]="inf",
["sr"]="inf",
["sr-latn"]="inf",
+ ["sv"]="inf",
},
},
["injlim"]={
@@ -849,9 +900,11 @@
["eo"]="",
["es"]="lím\\sixperemspace iny",
["hy"]="inj\\sixperemspace lim",
+ ["pt"]="inj\\sixperemspace lim",
["sk"]="inj\\sixperemspace lim",
["sr"]="inj\\sixperemspace lim",
["sr-latn"]="inj\\sixperemspace lim",
+ ["sv"]="inj\\sixperemspace lim",
},
},
["inv"]={
@@ -863,9 +916,11 @@
["es"]="inv",
["hy"]="inv",
["mk"]="inv",
+ ["pt"]="inv",
["sk"]="inv",
["sr"]="inv",
["sr-latn"]="inv",
+ ["sv"]="inv",
},
},
["ker"]={
@@ -876,9 +931,11 @@
["eo"]="",
["es"]="Ker",
["hy"]="ker",
+ ["pt"]="ker",
["sk"]="ker",
["sr"]="ker",
["sr-latn"]="ker",
+ ["sv"]="ker",
},
},
["lcm"]={
@@ -893,9 +950,11 @@
["hy"]="աըբ",
["mk"]="НЗС",
["nl"]="kgv",
+ ["pt"]="lcm",
["sk"]="NSN",
["sr"]="НЗС",
["sr-latn"]="NZS",
+ ["sv"]="lcm",
},
},
["lg"]={
@@ -909,9 +968,11 @@
["fr"]="log",
["hy"]="lg",
["mk"]="lg",
+ ["pt"]="lg",
["sk"]="log",
["sr"]="lg",
["sr-latn"]="lg",
+ ["sv"]="lg",
},
},
["lim"]={
@@ -923,9 +984,11 @@
["es"]="lím",
["hy"]="lim",
["mk"]="lim",
+ ["pt"]="lim",
["sk"]="lim",
["sr"]="lim",
["sr-latn"]="lim",
+ ["sv"]="lim",
},
},
["liminf"]={
@@ -937,9 +1000,11 @@
["es"]="lím\\sixperemspace inf",
["hy"]="lim\\sixperemspace infs",
["mk"]="lim\\sixperemspace inf",
+ ["pt"]="lim\\sixperemspace inf",
["sk"]="lim\\sixperemspace inf",
["sr"]="lim\\sixperemspace inf",
["sr-latn"]="lim\\sixperemspace inf",
+ ["sv"]="lim\\sixperemspace inf",
},
},
["limsup"]={
@@ -951,9 +1016,11 @@
["es"]="lím\\sixperemspace sup",
["hy"]="lim\\sixperemspace sup",
["mk"]="lim\\sixperemspace sup",
+ ["pt"]="lim\\sixperemspace sup",
["sk"]="lim\\sixperemspace sup",
["sr"]="lim\\sixperemspace sup",
["sr-latn"]="lim\\sixperemspace sup",
+ ["sv"]="lim\\sixperemspace sup",
},
},
["ln"]={
@@ -965,9 +1032,11 @@
["es"]="ln",
["hy"]="ln",
["mk"]="ln",
+ ["pt"]="ln",
["sk"]="ln",
["sr"]="ln",
["sr-latn"]="ln",
+ ["sv"]="ln",
},
},
["log"]={
@@ -979,9 +1048,11 @@
["es"]="log",
["hy"]="log",
["mk"]="log",
+ ["pt"]="log",
["sk"]="log",
["sr"]="log",
["sr-latn"]="log",
+ ["sv"]="log",
},
},
["max"]={
@@ -994,15 +1065,17 @@
["fi"]="max",
["hy"]="max",
["mk"]="max",
+ ["pt"]="max",
["sk"]="max",
["sr"]="max",
["sr-latn"]="max",
+ ["sv"]="max",
},
},
["median"]={
["labels"]={
+ ["comment"]=[[ cs+sk: \tilde won't work]],
["ca"]="mitjana",
- -- ["cs"]="\\tilde", -- won't work
["cs"]="Me",
["en"]="median",
["eo"]="mediano",
@@ -1010,10 +1083,11 @@
["fi"]="mediaani",
["fr"]="médiane",
["hy"]="միջին",
- -- ["sk"]="\\tilde", -- won't work
+ ["pt"]="median",
["sk"]="Med",
["sr"]="median",
["sr-latn"]="median",
+ ["sv"]="median",
},
},
["min"]={
@@ -1026,9 +1100,11 @@
["fi"]="min",
["hy"]="min",
["mk"]="min",
+ ["pt"]="min",
["sk"]="min",
["sr"]="min",
["sr-latn"]="min",
+ ["sv"]="min",
},
},
["mod"]={
@@ -1041,9 +1117,11 @@
["fi"]="mod",
["hy"]="mod",
["mk"]="mod",
+ ["pt"]="mod",
["sk"]="mod",
["sr"]="mod",
["sr-latn"]="mod",
+ ["sv"]="mod",
},
},
["projlim"]={
@@ -1054,9 +1132,11 @@
["eo"]="",
["es"]="lím\\sixperemspace proy",
["hy"]="proj\\sixperemspace lim",
+ ["pt"]="proj\\sixperemspace lim",
["sk"]="proj\\sixperemspace lim",
["sr"]="proj\\sixperemspace lim",
["sr-latn"]="proj\\sixperemspace lim",
+ ["sv"]="proj\\sixperemspace lim",
},
},
["sec"]={
@@ -1069,9 +1149,11 @@
["fi"]="sek",
["hy"]="sec",
["mk"]="sec",
+ ["pt"]="sec",
["sk"]="sec",
["sr"]="sec",
["sr-latn"]="sec",
+ ["sv"]="sec",
},
},
["sin"]={
@@ -1084,9 +1166,11 @@
["fi"]="sin",
["hy"]="sin",
["mk"]="sin",
+ ["pt"]="sen",
["sk"]="sin",
["sr"]="sin",
["sr-latn"]="sin",
+ ["sv"]="sin",
},
},
["sinh"]={
@@ -1098,9 +1182,11 @@
["es"]="senh",
["hy"]="sinh",
["mk"]="sinh",
+ ["pt"]="sinh",
["sk"]="sinh",
["sr"]="sinh",
["sr-latn"]="sinh",
+ ["sv"]="sinh",
},
},
["sup"]={
@@ -1111,9 +1197,11 @@
["es"]="sup",
["hy"]="sup",
["mk"]="sup",
+ ["pt"]="sup",
["sk"]="sup",
["sr"]="sup",
["sr-latn"]="sup",
+ ["sv"]="sup",
},
},
["tan"]={
@@ -1126,9 +1214,11 @@
["hy"]="tan",
["mk"]="tg",
["pl"]="tg",
+ ["pt"]="tan",
["sk"]="tg",
["sr"]="tg",
["sr-latn"]="tg",
+ ["sv"]="tan",
},
},
["tanh"]={
@@ -1139,9 +1229,11 @@
["es"]="tanh",
["hy"]="tanh",
["mk"]="tgh",
+ ["pt"]="tanh",
["sk"]="tgh",
["sr"]="tgh",
["sr-latn"]="tgh",
+ ["sv"]="tanh",
},
},
},
@@ -1172,13 +1264,13 @@
["nl"]=" en ",
["nn"]="",
["pl"]=" i ",
- ["pt"]="",
+ ["pt"]=" e ",
["ro"]="",
["ru"]="",
["sk"]=" a ",
["sl"]="",
["sr"]=" и ",
- ["sv"]="",
+ ["sv"]=" och ",
["tk"]="",
["tr"]="",
["ua"]="",
@@ -1190,18 +1282,18 @@
["labels"]={
["af"]="Bylae ",
["ar"]="ملحق ",
- ["be"]="Апендыцыт",
+ ["be"]="Апендыцыт ",
["ca"]="Apèndix ",
- ["cn"]="附录",
+ ["cn"]="附录 ",
["cs"]="Příloha ",
["da"]="Bilag ",
["de"]="Anhang ",
["en"]="Appendix ",
- ["eo"]="Anekso",
+ ["eo"]="Anekso ",
["es"]="Apéndice ",
["et"]="Lisa ",
["fa"]="پیوست ",
- ["fi"]="liite",
+ ["fi"]="Liite ",
["fr"]="Annexe ",
["gr"]="Παράρτημα ",
["hr"]="Dodatak ",
@@ -1217,7 +1309,7 @@
["nl"]="",
["nn"]="Tillegg ",
["pl"]="Dodatek ",
- ["pt"]="",
+ ["pt"]="Apendice ",
["ro"]="",
["ru"]="",
["sk"]="Príloha ",
@@ -1224,7 +1316,7 @@
["sl"]="Dodatek ",
["sr"]="Додатак ",
["sr-latn"]="Dodatak ",
- ["sv"]="",
+ ["sv"]="Bilaga ",
["tk"]="Goşmaça ",
["tr"]="",
["ua"]="",
@@ -1331,16 +1423,16 @@
["labels"]={
["af"]="",
["ar"]="في صفحة ",
- ["ca"]="a la pagina",
+ ["ca"]="a la pagina ",
["cs"]="na straně ",
["da"]="på side ",
["de"]="auf Seite ",
["en"]="at page ",
- ["eo"]="je paĝo",
+ ["eo"]="je paĝo ",
["es"]="en la página ",
["et"]="leheküljel ",
["fa"]="در صفحه ",
- ["fi"]="sivulla",
+ ["fi"]="sivulla ",
["fr"]="à la page ",
["gr"]="",
["hr"]="na stranici ",
@@ -1354,7 +1446,7 @@
["nl"]="op pagina ",
["nn"]="på side ",
["pl"]="na stronie ",
- ["pt"]="",
+ ["pt"]="na pagina",
["ro"]="",
["ru"]="на странице ",
["sk"]="na strane ",
@@ -1473,18 +1565,18 @@
["be"]="Глава ",
["bg"]="Eпизод ",
["ca"]="Capítol ",
- ["cn"]={ "第", "章" },
+ ["cn"]={ "第 ", " 章" },
["cs"]="Kapitola ",
["da"]="",
["de"]="Kapitel ",
["en"]="Chapter ",
- ["eo"]="Ĉapitro",
+ ["eo"]="Ĉapitro ",
["es"]="Capítulo ",
["et"]="Peatükk ",
["fa"]="فصل ",
["fi"]="luku",
["fr"]="Chapitre ",
- ["gr"]="Κεφάλαιο",
+ ["gr"]="Κεφάλαιο ",
["hr"]="Poglavlje ",
["hu"]={ "", " fejezet" },
["hy"]="Գլուխ ",
@@ -1498,7 +1590,7 @@
["nl"]="",
["nn"]="",
["pl"]="Rozdział ",
- ["pt"]="",
+ ["pt"]="Capitulo ",
["ro"]="",
["ru"]="",
["sk"]="Kapitola ",
@@ -1505,8 +1597,8 @@
["sl"]="Poglavje ",
["sr"]="Глава ",
["sr-latn"]="Glava ",
- ["sv"]="",
- ["tk"]="Bap",
+ ["sv"]="Kapitel ",
+ ["tk"]="Bap ",
["tr"]="",
["ua"]="",
["vi"]="Chương ",
@@ -1540,7 +1632,7 @@
["nl"]=" (vervolgd)",
["nn"]="",
["pl"]="",
- ["pt"]="",
+ ["pt"]=" (continua)",
["ro"]="",
["ru"]="",
["sk"]=" (pokračovanie)",
@@ -1547,7 +1639,7 @@
["sl"]="",
["sr"]=" (наставак)",
["sr-latn"]=" (nastavak)",
- ["sv"]="",
+ ["sv"]=" (forts.)",
["tk"]="",
["tr"]="",
["ua"]="",
@@ -1554,11 +1646,17 @@
["vi"]="",
},
},
+ ["day:genetiv"]={
+ ["labels"]={
+ ["cs"]="dne",
+ ["sk"]="dňa",
+ },
+ },
["day"]={
["labels"]={
["bg"]="ден",
["ca"]="dia",
- ["cs"]="den", -- {"den", "dne" }
+ ["cs"]="den",
["de"]="Tag",
["en"]="day",
["eo"]="tago",
@@ -1570,9 +1668,11 @@
["kr"]="일",
["mk"]="ден",
["nl"]="dag",
- ["sk"]="deň", -- {"deň", "dňa" }
+ ["pt"]="dia",
+ ["sk"]="deň",
["sr"]="дан",
["sr-latn"]="dan",
+ ["sv"]="dag",
},
},
["december"]={
@@ -1771,10 +1871,10 @@
["labels"]={
["af"]="Figuur ",
["ar"]="شكل ",
- ["be"]="Малюнак",
- ["bg"]="Фигура",
+ ["be"]="Малюнак ",
+ ["bg"]="Фигура ",
["ca"]="Figura ",
- ["cn"]="图",
+ ["cn"]="图 ",
["cs"]="Obrázek ",
["da"]="Figur ",
["de"]="Abbildung ",
@@ -1785,7 +1885,7 @@
["fa"]="شکل ",
["fi"]="Kuva ",
["fr"]="Figure ",
- ["gr"]="Σχήμα",
+ ["gr"]="Σχήμα ",
["hr"]="Slika ",
["hu"]={ "", " ábra" },
["hy"]="Նկար ",
@@ -1807,7 +1907,7 @@
["sr"]="Слика ",
["sr-latn"]="Slika ",
["sv"]="Figur ",
- ["tk"]="Surat",
+ ["tk"]="Surat ",
["tr"]="Şekil ",
["ua"]="Малюнок ",
["vi"]="Hình ",
@@ -1821,7 +1921,9 @@
["eo"]="sekvv",
["fr"]=hairspace .. "sqq",
["hy"]="ff.",
+ ["pt"]="seg",
["sk"]="násl.",
+ ["sv"]="ff.",
},
},
["following:singular"]={
@@ -1832,7 +1934,9 @@
["eo"]="sekv",
["fr"]=hairspace .. "sq",
["hy"]="f.",
+ ["pt"]="seg",
["sk"]="násl.",
+ ["sv"]="f.",
},
},
["followingpage"]={
@@ -1850,9 +1954,11 @@
["hy"]="Հաջորդ էջում",
["mk"]="на следната страница",
["nl"]="op een volgende bladzijde",
+ ["pt"]="pagina seguinte",
["sk"]="na nasledujúcej strane",
["sr"]="на следећој страници",
["sr-latn"]="na sledećoj stranici",
+ ["sv"]="på nästa sida",
},
},
["friday"]={
@@ -1925,21 +2031,21 @@
["be"]="Графіка ",
["bg"]="Графичен ",
["ca"]="Gràfica ",
- ["cn"]="插图",
+ ["cn"]="插图 ",
["cs"]="Graf ",
["da"]="Grafik ",
["de"]="Grafik ",
["en"]="Graphic ",
- ["eo"]="Grafiko",
+ ["eo"]="Grafiko ",
["es"]="Gráfico ",
["et"]="Pilt ",
["fa"]="طرح ",
["fi"]="Grafiikka ",
["fr"]="Illustration ",
- ["gr"]="Γραφικό",
+ ["gr"]="Γραφικό ",
["hr"]="Slika ",
["hu"]={ "", " kép" },
- ["hy"]="Գրաֆ",
+ ["hy"]="Գրաֆ ",
["it"]="Grafico ",
["ja"]="イラスト",
["la"]="Typus ",
@@ -1957,10 +2063,10 @@
["sr"]="График ",
["sr-latn"]="Grafik ",
["sv"]="Grafik ",
- ["tk"]="Grafik",
- ["tr"]="Grafik",
+ ["tk"]="Grafik ",
+ ["tr"]="Grafik ",
["ua"]="График ",
- ["vi"]="Đồ thị",
+ ["vi"]="Đồ thị ",
},
},
["hencefore"]={
@@ -1969,10 +2075,10 @@
["ar"]="كما وضحنا سابقا",
["be"]="гл. вышэй",
["bg"]="виж по-горе",
- ["ca"]="com es mostra dalt ",
+ ["ca"]="com es mostra dalt",
["cs"]="viz výše",
["da"]="se foroven",
- ["de"]="siehe oben", -- better "oben"?
+ ["de"]="siehe oben",
["en"]="as we show above",
["eo"]="laŭsupre",
["es"]="como se muestra arriba",
@@ -1993,7 +2099,7 @@
["nl"]="hierboven",
["nn"]="som vist over",
["pl"]="jak pokazano wyżej",
- ["pt"]="",
+ ["pt"]="como mostrado em cima",
["ro"]="",
["ru"]="см. выше",
["sk"]="pozri hore",
@@ -2016,7 +2122,7 @@
["ca"]="com es mostra baix",
["cs"]="viz níže",
["da"]="se forneden",
- ["de"]="siehe unten", -- better "nachstehend"?
+ ["de"]="siehe unten",
["en"]="as we show below",
["eo"]="laŭsube",
["es"]="como se muestra abajo",
@@ -2037,7 +2143,7 @@
["nl"]="hieronder",
["nn"]="som vist under",
["pl"]="jak pokazano niżej",
- ["pt"]="",
+ ["pt"]="como mostrado em baixo",
["ro"]="",
["ru"]="см. ниже",
["sk"]="pozri ďalej",
@@ -2058,20 +2164,20 @@
["be"]="Інтэрмецца ",
["bg"]="Интермецо ",
["ca"]="Intermedi ",
- ["cn"]="퉣",
+ ["cn"]="퉣 ",
["cs"]="Intermezzo ",
["da"]="Intermezzo ",
["de"]="Intermezzo ",
["en"]="Intermezzo ",
- ["eo"]="Intermezo",
+ ["eo"]="Intermezo ",
["es"]="Intermedio ",
["et"]="Vahemäng ",
["fi"]="Intermezzo ",
["fr"]="Intermède ",
- ["gr"]="Παύση",
+ ["gr"]="Παύση ",
["hr"]="Intermeco ",
["hu"]={ "", " intermezzo" },
- ["hy"]="Ինտերմեցո",
+ ["hy"]="Ինտերմեցո ",
["it"]="Intermezzo ",
["ja"]="間奏曲",
["kr"]="간주곡",
@@ -2090,10 +2196,10 @@
["sr"]="Дигресија ",
["sr-latn"]="Digresija ",
["sv"]="Intermezzo ",
- ["tk"]="Arakesme",
+ ["tk"]="Arakesme ",
["tr"]="",
["ua"]="Вставка ",
- ["vi"]="intermezzo",
+ ["vi"]="Intermezzo ",
},
},
["january"]={
@@ -2395,7 +2501,7 @@
["be"]="радок ",
["bg"]="ред ",
["ca"]="línia ",
- ["cn"]="行",
+ ["cn"]="行 ",
["cs"]="řádek ",
["da"]="linie ",
["de"]="Zeile ",
@@ -2406,7 +2512,7 @@
["fa"]="سطر ",
["fi"]="rivi ",
["fr"]="ligne ",
- ["gr"]="Γραμμή",
+ ["gr"]="Γραμμή ",
["hr"]="redak ",
["hu"]={ "", " sor" },
["hy"]="Տող ",
@@ -2428,7 +2534,7 @@
["sr"]="линија ",
["sr-latn"]="linija ",
["sv"]="rad ",
- ["tk"]="setir",
+ ["tk"]="setir ",
["tr"]="satır ",
["ua"]="рядок ",
["vi"]="dòng ",
@@ -2441,7 +2547,7 @@
["be"]="радкi ",
["bg"]="редове ",
["ca"]="línies ",
- ["cn"]="行",
+ ["cn"]="行 ",
["cs"]="řádky ",
["da"]="linier ",
["de"]="Zeilen ",
@@ -2452,7 +2558,7 @@
["fa"]="سطرهای ",
["fi"]="rivie ",
["fr"]="lignes ",
- ["gr"]="Γραμμές",
+ ["gr"]="Γραμμές ",
["hr"]="retci ",
["hu"]="sorok ",
["hy"]="Տողեր ",
@@ -2474,7 +2580,7 @@
["sr"]="линије ",
["sr-latn"]="linije ",
["sv"]="rader ",
- ["tk"]="setirler",
+ ["tk"]="setirler ",
["tr"]="satırlar ",
["ua"]="рядки ",
["vi"]="dòng ",
@@ -2742,6 +2848,7 @@
["be"]="месяц",
["bg"]="месец",
["ca"]="mes",
+ ["cs"]="měsíc",
["de"]="Monat",
["en"]="month",
["eo"]="monato",
@@ -2754,8 +2861,11 @@
["kr"]="월",
["mk"]="месец",
["nl"]="maand",
+ ["pt"]="mes",
+ ["sk"]="mesiac",
["sr"]="месец",
["sr-latn"]="mesec",
+ ["sv"]="månad",
},
},
["november"]={
@@ -2956,7 +3066,7 @@
["af"]="",
["ar"]="صفحة ",
["be"]="старонка ",
- ["bg"]="страна",
+ ["bg"]="страна ",
["ca"]="pagina ",
["cs"]="strana ",
["da"]="Side ",
@@ -2966,7 +3076,7 @@
["es"]="página ",
["et"]="lehekülg ",
["fa"]="صفحه ",
- ["fi"]="Sivu",
+ ["fi"]="Sivu ",
["fr"]="page ",
["gr"]="",
["hr"]="stranica ",
@@ -2981,7 +3091,7 @@
["nl"]="pagina ",
["nn"]="side ",
["pl"]="strona ",
- ["pt"]="",
+ ["pt"]="pagina ",
["ro"]="",
["ru"]="страница ",
["sk"]="strana ",
@@ -3002,7 +3112,7 @@
["be"]="Частка ",
["bg"]="Частка ",
["ca"]="Part ",
- ["cn"]={ "第", "部分" },
+ ["cn"]={ "第 ", " 部分" },
["cs"]="Část ",
["da"]="Del ",
["de"]="Teil ",
@@ -3013,7 +3123,7 @@
["fa"]="قسمت ",
["fi"]="Osa ",
["fr"]="Partie ",
- ["gr"]="Μέρος",
+ ["gr"]="Μέρος ",
["hr"]="Dio ",
["hu"]={ "", " rész" },
["hy"]="Մաս ",
@@ -3022,10 +3132,9 @@
["kr"]={ "제", "부" },
["la"]="Pars ",
["lt"]={ "", " dalis" },
- ["mk"]="Дел ",
["nb"]="Del ",
["nl"]="Deel ",
- ["nn"]="Del",
+ ["nn"]="Del ",
["pl"]="Część ",
["pt"]="Parte ",
["ro"]="Partea ",
@@ -3035,7 +3144,7 @@
["sr"]="Део ",
["sr-latn"]="Deo ",
["sv"]="Del ",
- ["tk"]="Bölüm",
+ ["tk"]="Bölüm ",
["tr"]="Cilt ",
["ua"]="Частина ",
["vi"]="Phần ",
@@ -3043,9 +3152,10 @@
},
["precedingpage"]={
["labels"]={
+ ["comment"]=[[ "auf der vorigen Seite" ok, but not "auf einer vorigen Seite" ]],
["ca"]="en una pagina anterior",
["cs"]="na předchozí straně",
- ["de"]="oben", -- "auf der vorigen Seite" ok, but not "auf einer vorigen Seite"
+ ["de"]="oben",
["en"]="on a preceding page",
["eo"]="sur antaŭa paĝo",
["es"]="en la pagina anterior",
@@ -3056,9 +3166,11 @@
["hy"]="նախորդ էջ",
["mk"]="на претходната страница",
["nl"]="op een voorgaande bladzijde",
+ ["pt"]="na seguinte pagina",
["sk"]="na predchádzajúcej strane",
["sr"]="на претходној страници",
["sr-latn"]="na prethodnoj stranici",
+ ["sv"]="på föregående sida",
},
},
["saturday"]={
@@ -3130,18 +3242,18 @@
["ar"]="فصل ",
["bg"]="Cекция ",
["ca"]="Secció ",
- ["cn"]={ "第", "节" },
+ ["cn"]={ "第 ", " 节" },
["cs"]="Sekce ",
["da"]="",
["de"]="Abschnitt ",
- ["en"]="Section",
+ ["en"]="Section ",
["eo"]="Sekcio ",
["es"]="Sección ",
["et"]="jaos ",
["fa"]="بخش ",
- ["fi"]="Osio",
+ ["fi"]="Osio ",
["fr"]="Section ",
- ["gr"]="Ενότητα",
+ ["gr"]="Ενότητα ",
["hr"]="Odjeljak ",
["hu"]="Fejezet ",
["hy"]="Բաժին ",
@@ -3162,7 +3274,7 @@
["sl"]="",
["sr"]="Одељак ",
["sr-latn"]="Odeljak ",
- ["sv"]="",
+ ["sv"]="Avsnitt",
["tk"]="",
["tr"]="",
["ua"]="",
@@ -3174,7 +3286,7 @@
["af"]="",
["ar"]="انظر ",
["be"]="гл. ",
- ["bg"]="погледни",
+ ["bg"]="погледни ",
["ca"]="vore ",
["cs"]="viz ",
["da"]="se ",
@@ -3184,7 +3296,7 @@
["es"]="ver: ",
["et"]="vaadake ",
["fa"]="نگاه کنید به ",
- ["fi"]="Katso",
+ ["fi"]="katso ",
["fr"]="cf. ",
["gr"]="",
["hr"]="vidi ",
@@ -3199,7 +3311,7 @@
["nl"]="zie ",
["nn"]="sjå ",
["pl"]="patrz ",
- ["pt"]="",
+ ["pt"]="ver ",
["ro"]="",
["ru"]="см. ",
["sk"]="pozri ",
@@ -3320,7 +3432,7 @@
["cs"]="Podsekce ",
["da"]="",
["de"]="Unterabschnitt ",
- ["en"]="Subsection",
+ ["en"]="Subsection ",
["eo"]="Subsekcio ",
["es"]="Subsección ",
["et"]="alajaotis ",
@@ -3327,7 +3439,7 @@
["fa"]="زیربخش ",
["fi"]="Alajakso",
["fr"]="Soussection ",
- ["gr"]="Υπόενότητα",
+ ["gr"]="Υπόενότητα ",
["hr"]="Pododjeljak ",
["hu"]="Alfejezet ",
["hy"]=" Ենթաբաժին ",
@@ -3340,7 +3452,7 @@
["nl"]="",
["nn"]="",
["pl"]="Podpodrozdział ",
- ["pt"]="",
+ ["pt"]="Subsecçao ",
["ro"]="",
["ru"]="",
["sk"]="Podsekcia ",
@@ -3347,7 +3459,7 @@
["sl"]="",
["sr"]="Пододељак ",
["sr-latn"]="Pododeljak ",
- ["sv"]="",
+ ["sv"]="Underavsnitt",
["tk"]="",
["tr"]="",
["ua"]="",
@@ -3365,12 +3477,12 @@
["cs"]="Podpodsekce ",
["da"]="",
["de"]="Unterunterabschnitt ",
- ["en"]="Subsubsection",
+ ["en"]="Subsubsection ",
["eo"]="Subsubsekcio ",
["es"]="Subsubsección ",
["et"]="alamjaotis ",
["fa"]="زیرزیربخش ",
- ["fi"]="Alakohta",
+ ["fi"]="Alakohta ",
["fr"]="Soussoussection ",
["gr"]="",
["hr"]="Podpododjeljak ",
@@ -3385,7 +3497,7 @@
["nl"]="",
["nn"]="",
["pl"]="",
- ["pt"]="",
+ ["pt"]="Subsubsecçao ",
["ro"]="",
["ru"]="",
["sk"]="Podpodsekcia ",
@@ -3392,7 +3504,7 @@
["sl"]="",
["sr"]="Подпододељак ",
["sr-latn"]="Podpododeljak ",
- ["sv"]="",
+ ["sv"]="Underunderavsnitt",
["tk"]="",
["tr"]="",
["ua"]="",
@@ -3409,13 +3521,13 @@
["cn"]="",
["cs"]="Podpodpodsekce ",
["da"]="",
- ["de"]="Unterunterunterabschnitt",
- ["en"]="Subsubsubsection",
+ ["de"]="Unterunterunterabschnitt ",
+ ["en"]="Subsubsubsection ",
["eo"]="Subsubsubsekcio ",
["es"]="Subsubsubsección ",
["et"]="",
["fa"]="زیرزیرزیربخش ",
- ["fi"]="Ala-alakohta",
+ ["fi"]="Ala-alakohta ",
["fr"]="Soussoussoussection ",
["gr"]="",
["hr"]="Podpodpododjeljak ",
@@ -3430,7 +3542,7 @@
["nl"]="",
["nn"]="",
["pl"]="",
- ["pt"]="",
+ ["pt"]="Subsubsubsecçao ",
["ro"]="",
["ru"]="",
["sk"]="Podpodpodsekcia ",
@@ -3513,7 +3625,7 @@
["be"]="Табліца ",
["bg"]="Таблица ",
["ca"]="Taula ",
- ["cn"]="表",
+ ["cn"]="表 ",
["cs"]="Tabulka ",
["da"]="Tabel ",
["de"]="Tabelle ",
@@ -3524,7 +3636,7 @@
["fa"]="جدول ",
["fi"]="Taulukko ",
["fr"]="Tableau ",
- ["gr"]="Πίνακας",
+ ["gr"]="Πίνακας ",
["hr"]="Tablica ",
["hu"]={ "", " táblázat" },
["hy"]="Աղյուսակ ",
@@ -3546,7 +3658,7 @@
["sr"]="Табела ",
["sr-latn"]="Tabela ",
["sv"]="Tabell ",
- ["tk"]="Tablisa",
+ ["tk"]="Tablisa ",
["tr"]="Tablo ",
["ua"]="Таблиця ",
["vi"]="Bảng ",
@@ -3758,9 +3870,11 @@
["kr"]="년",
["mk"]="година",
["nl"]="jaar",
+ ["pt"]="ano",
["sk"]="rok",
["sr"]="година",
["sr-latn"]="godina",
+ ["sv"]="år",
},
},
},
@@ -3773,7 +3887,7 @@
["bg"]="Съкращения",
["ca"]="Abreviacions",
["cn"]="缩略语",
- ["cs"]="Seznam zkratek", --"Zkratky"
+ ["cs"]="Seznam zkratek",
["da"]="Forkortelser",
["de"]="Abkürzungen",
["en"]="Abbreviations",
@@ -3800,7 +3914,7 @@
["pt"]="Abreviaturas",
["ro"]="Abrevieri",
["ru"]="Список сокращений",
- ["sk"]="Zoznam skratiek", -- "Skratky"
+ ["sk"]="Zoznam skratiek",
["sl"]="Kratice",
["sr"]="Скраћенице",
["sr-latn"]="Skraćenice",
@@ -3863,7 +3977,7 @@
["ar"]="الأشكال",
["be"]="Спіс ілюстрацый",
["ca"]="Figures",
- ["cn"]="图形",
+ ["cn"]="图",
["cs"]="Seznam obrázků",
["da"]="Figurer",
["de"]="Abbildungen",
@@ -4046,7 +4160,7 @@
["be"]="Лагатыпы",
["bg"]="Логотипи",
["ca"]="Logotips",
- ["cn"]="徽贬",
+ ["cn"]="徽标",
["cs"]="Loga",
["da"]="Logoer",
["de"]="Logos",
@@ -4112,7 +4226,7 @@
["nl"]="Literatuur",
["nn"]="",
["pl"]="Bibliografia",
- ["pt"]="",
+ ["pt"]="Referencias",
["ro"]="",
["ru"]="",
["sk"]="Literatúra",
@@ -4119,7 +4233,7 @@
["sl"]="Literatura",
["sr"]="Литература",
["sr-latn"]="Literatura",
- ["sv"]="",
+ ["sv"]="Litteraturförteckning",
["tk"]="",
["tr"]="",
["ua"]="",
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/lang-url.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/lang-url.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/lang-url.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -21,12 +21,10 @@
local is_letter = characters.is_letter
---[[
-<p>Hyphenating <l n='url'/>'s is somewhat tricky and a matter of taste. I did
-consider using a dedicated hyphenation pattern or dealing with it by node
-parsing, but the following solution suits as well. After all, we're mostly
-dealing with <l n='ascii'/> characters.</p>
-]]--
+-- Hyphenating URL's is somewhat tricky and a matter of taste. I did consider using
+-- a dedicated hyphenation pattern or dealing with it by node parsing, but the
+-- following solution suits as well. After all, we're mostly dealing with ASCII
+-- characters.
local urls = { }
languages.urls = urls
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/lpdf-mis.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/lpdf-mis.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/lpdf-mis.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -246,7 +246,8 @@
addtoinfo("ConTeXt.Version",version)
addtoinfo("ConTeXt.Time",os.date("%Y-%m-%d %H:%M"))
addtoinfo("ConTeXt.Jobname",jobname)
- addtoinfo("ConTeXt.Url","www.pragma-ade.com")
+ -- addtoinfo("ConTeXt.Url","www.pragma-ade.com")
+ addtoinfo("ConTeXt.Url","github.com/contextgarden/context")
addtoinfo("ConTeXt.Support","contextgarden.net")
addtoinfo("TeX.Support","tug.org")
--
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/luat-cbk.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/luat-cbk.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/luat-cbk.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -12,20 +12,16 @@
local round = math.round
local sortedhash, sortedkeys, tohash = table.sortedhash, table.sortedkeys, table.tohash
---[[ldx--
-<p>Callbacks are the real asset of <l n='luatex'/>. They permit you to hook
-your own code into the <l n='tex'/> engine. Here we implement a few handy
-auxiliary functions.</p>
---ldx]]--
+-- Callbacks are the real asset of LuaTeX. They permit you to hook your own code
+-- into the TeX engine. Here we implement a few handy auxiliary functions. Watch
+-- out, there are diferences between LuateX and LuaMetaTeX.
callbacks = callbacks or { }
local callbacks = callbacks
---[[ldx--
-<p>When you (temporarily) want to install a callback function, and after a
-while wants to revert to the original one, you can use the following two
-functions. This only works for non-frozen ones.</p>
---ldx]]--
+-- When you (temporarily) want to install a callback function, and after a while
+-- wants to revert to the original one, you can use the following two functions.
+-- This only works for non-frozen ones.
local trace_callbacks = false trackers.register("system.callbacks", function(v) trace_callbacks = v end)
local trace_calls = false -- only used when analyzing performance and initializations
@@ -47,13 +43,12 @@
local permit_overloads = false
local block_overloads = false
---[[ldx--
-<p>By now most callbacks are frozen and most provide a way to plug in your own code. For instance
-all node list handlers provide before/after namespaces and the file handling code can be extended
-by adding schemes and if needed I can add more hooks. So there is no real need to overload a core
-callback function. It might be ok for quick and dirty testing but anyway you're on your own if
-you permanently overload callback functions.</p>
---ldx]]--
+-- By now most callbacks are frozen and most provide a way to plug in your own code.
+-- For instance all node list handlers provide before/after namespaces and the file
+-- handling code can be extended by adding schemes and if needed I can add more
+-- hooks. So there is no real need to overload a core callback function. It might be
+-- ok for quick and dirty testing but anyway you're on your own if you permanently
+-- overload callback functions.
-- This might become a configuration file only option when it gets abused too much.
@@ -279,65 +274,50 @@
-- callbacks.freeze("read_.*_file","reading file")
-- callbacks.freeze("open_.*_file","opening file")
---[[ldx--
-<p>The simple case is to remove the callback:</p>
-
-<code>
-callbacks.push('linebreak_filter')
-... some actions ...
-callbacks.pop('linebreak_filter')
-</code>
-
-<p>Often, in such case, another callback or a macro call will pop
-the original.</p>
-
-<p>In practice one will install a new handler, like in:</p>
-
-<code>
-callbacks.push('linebreak_filter', function(...)
- return something_done(...)
-end)
-</code>
-
-<p>Even more interesting is:</p>
-
-<code>
-callbacks.push('linebreak_filter', function(...)
- callbacks.pop('linebreak_filter')
- return something_done(...)
-end)
-</code>
-
-<p>This does a one-shot.</p>
---ldx]]--
-
---[[ldx--
-<p>Callbacks may result in <l n='lua'/> doing some hard work
-which takes time and above all resourses. Sometimes it makes
-sense to disable or tune the garbage collector in order to
-keep the use of resources acceptable.</p>
-
-<p>At some point in the development we did some tests with counting
-nodes (in this case 121049).</p>
-
-<table>
-<tr><td>setstepmul</td><td>seconds</td><td>megabytes</td></tr>
-<tr><td>200</td><td>24.0</td><td>80.5</td></tr>
-<tr><td>175</td><td>21.0</td><td>78.2</td></tr>
-<tr><td>150</td><td>22.0</td><td>74.6</td></tr>
-<tr><td>160</td><td>22.0</td><td>74.6</td></tr>
-<tr><td>165</td><td>21.0</td><td>77.6</td></tr>
-<tr><td>125</td><td>21.5</td><td>89.2</td></tr>
-<tr><td>100</td><td>21.5</td><td>88.4</td></tr>
-</table>
-
-<p>The following code is kind of experimental. In the documents
-that describe the development of <l n='luatex'/> we report
-on speed tests. One observation is that it sometimes helps to
-restart the collector. Okay, experimental code has been removed,
-because messing aroudn with the gc is too unpredictable.</p>
---ldx]]--
-
+-- The simple case is to remove the callback:
+--
+-- callbacks.push('linebreak_filter')
+-- ... some actions ...
+-- callbacks.pop('linebreak_filter')
+--
+-- Often, in such case, another callback or a macro call will pop the original.
+--
+-- In practice one will install a new handler, like in:
+--
+-- callbacks.push('linebreak_filter', function(...)
+-- return something_done(...)
+-- end)
+--
+-- Even more interesting is:
+--
+-- callbacks.push('linebreak_filter', function(...)
+-- callbacks.pop('linebreak_filter')
+-- return something_done(...)
+-- end)
+--
+-- This does a one-shot.
+--
+-- Callbacks may result in Lua doing some hard work which takes time and above all
+-- resourses. Sometimes it makes sense to disable or tune the garbage collector in
+-- order to keep the use of resources acceptable.
+--
+-- At some point in the development we did some tests with counting nodes (in this
+-- case 121049).
+--
+-- setstepmul seconds megabytes
+-- 200 24.0 80.5
+-- 175 21.0 78.2
+-- 150 22.0 74.6
+-- 160 22.0 74.6
+-- 165 21.0 77.6
+-- 125 21.5 89.2
+-- 100 21.5 88.4
+--
+-- The following code is kind of experimental. In the documents that describe the
+-- development of LuaTeX we report on speed tests. One observation is that it
+-- sometimes helps to restart the collector. Okay, experimental code has been
+-- removed, because messing around with the gc is too unpredictable.
+--
-- For the moment we keep this here and not in util-gbc.lua or so.
utilities = utilities or { }
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/luat-fmt.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/luat-fmt.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/luat-fmt.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -15,6 +15,11 @@
-- I'll strip the code here because something generic will never take of and we
-- moved on to luametatex anyway.
+-- Per 2023-04-25 we need to explicitly pass --socket and --shell-escape because
+-- other macro packages need these libraries to be disabled due to lack of control.
+-- So a quite drastic break of downward compatibility (context could not generate a
+-- format otherwise). Yet another reason to move on to luametatex.
+
local format = string.format
local concat = table.concat
local quoted = string.quoted
@@ -64,7 +69,7 @@
-- The silent option is for Taco. It's a bit of a hack because we cannot yet mess
-- with directives. In fact, I could probably clean up the maker a bit by now.
-local template = [[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %redirect%]]
+local template = [[--ini %primaryflags% --socket --shell-escape --lua=%luafile% %texfile% %secondaryflags% %redirect%]]
local checkers = {
primaryflags = "verbose", -- "flags"
@@ -225,7 +230,7 @@
lfs.chdir(startupdir)
end
-local template = [[%primaryflags% --fmt=%fmtfile% --lua=%luafile% %texfile% %secondaryflags%]]
+local template = [[%primaryflags% --socket --shell-escape --fmt=%fmtfile% --lua=%luafile% %texfile% %secondaryflags%]]
local checkers = {
primaryflags = "verbose",
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/luat-ini.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/luat-ini.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/luat-ini.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,11 +6,9 @@
license = "see context related readme files"
}
---[[ldx--
-<p>We cannot load anything yet. However what we will do us reserve a few tables.
-These can be used for runtime user data or third party modules and will not be
-cluttered by macro package code.</p>
---ldx]]--
+-- We cannot load anything yet. However what we will do us reserve a few tables.
+-- These can be used for runtime user data or third party modules and will not be
+-- cluttered by macro package code.
userdata = userdata or { } -- for users (e.g. functions etc)
thirddata = thirddata or { } -- only for third party modules
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -110,12 +110,8 @@
return collected
end
---[[ldx--
-<p>The following functions collect elements and texts.</p>
---ldx]]--
+-- The following functions collect elements and texts.
--- are these still needed -> lxml-cmp.lua
-
function xml.collect(root, pattern)
return xmlapplylpath(root,pattern)
end
@@ -153,9 +149,7 @@
end
end
---[[ldx--
-<p>We've now arrived at the functions that manipulate the tree.</p>
---ldx]]--
+-- We've now arrived at the functions that manipulate the tree.
local no_root = { no_root = true }
@@ -780,9 +774,7 @@
end
end
---[[ldx--
-<p>Helper (for q2p).</p>
---ldx]]--
+-- Helper (for q2p).
function xml.cdatatotext(e)
local dt = e.dt
@@ -879,9 +871,7 @@
-- xml.addentitiesdoctype(x,"hexadecimal")
-- print(x)
---[[ldx--
-<p>Here are a few synonyms.</p>
---ldx]]--
+-- Here are a few synonyms:
xml.all = xml.each
xml.insert = xml.insertafter
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-ent.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-ent.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-ent.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -10,15 +10,11 @@
local byte, format = string.byte, string.format
local setmetatableindex = table.setmetatableindex
---[[ldx--
-<p>We provide (at least here) two entity handlers. The more extensive
-resolver consults a hash first, tries to convert to <l n='utf'/> next,
-and finaly calls a handler when defines. When this all fails, the
-original entity is returned.</p>
+-- We provide (at least here) two entity handlers. The more extensive resolver
+-- consults a hash first, tries to convert to UTF next, and finaly calls a handler
+-- when defines. When this all fails, the original entity is returned. We do things
+-- different now but it's still somewhat experimental.
-<p>We do things different now but it's still somewhat experimental</p>
---ldx]]--
-
local trace_entities = false trackers.register("xml.entities", function(v) trace_entities = v end)
local report_xml = logs.reporter("xml")
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-lpt.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-lpt.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-lpt.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -20,29 +20,22 @@
-- beware, this is not xpath ... e.g. position is different (currently) and
-- we have reverse-sibling as reversed preceding sibling
---[[ldx--
-<p>This module can be used stand alone but also inside <l n='mkiv'/> in
-which case it hooks into the tracker code. Therefore we provide a few
-functions that set the tracers. Here we overload a previously defined
-function.</p>
-<p>If I can get in the mood I will make a variant that is XSLT compliant
-but I wonder if it makes sense.</P>
---ldx]]--
+-- This module can be used stand alone but also inside ConTeXt in which case it
+-- hooks into the tracker code. Therefore we provide a few functions that set the
+-- tracers. Here we overload a previously defined function.
+--
+-- If I can get in the mood I will make a variant that is XSLT compliant but I
+-- wonder if it makes sense.
+--
+-- Expecially the lpath code is experimental, we will support some of xpath, but
+-- only things that make sense for us; as compensation it is possible to hook in
+-- your own functions. Apart from preprocessing content for ConTeXt we also need
+-- this module for process management, like handling CTX and RLX files.
+--
+-- a/b/c /*/c
+-- a/b/c/first() a/b/c/last() a/b/c/index(n) a/b/c/index(-n)
+-- a/b/c/text() a/b/c/text(1) a/b/c/text(-1) a/b/c/text(n)
---[[ldx--
-<p>Expecially the lpath code is experimental, we will support some of xpath, but
-only things that make sense for us; as compensation it is possible to hook in your
-own functions. Apart from preprocessing content for <l n='context'/> we also need
-this module for process management, like handling <l n='ctx'/> and <l n='rlx'/>
-files.</p>
-
-<typing>
-a/b/c /*/c
-a/b/c/first() a/b/c/last() a/b/c/index(n) a/b/c/index(-n)
-a/b/c/text() a/b/c/text(1) a/b/c/text(-1) a/b/c/text(n)
-</typing>
---ldx]]--
-
local trace_lpath = false
local trace_lparse = false
local trace_lprofile = false
@@ -62,11 +55,9 @@
end)
end
---[[ldx--
-<p>We've now arrived at an interesting part: accessing the tree using a subset
-of <l n='xpath'/> and since we're not compatible we call it <l n='lpath'/>. We
-will explain more about its usage in other documents.</p>
---ldx]]--
+-- We've now arrived at an interesting part: accessing the tree using a subset of
+-- XPATH and since we're not compatible we call it LPATH. We will explain more about
+-- its usage in other documents.
local xml = xml
@@ -1273,10 +1264,9 @@
end
local applylpath = xml.applylpath
---[[ldx--
-<p>This is the main filter function. It returns whatever is asked for.</p>
---ldx]]--
+-- This is the main filter function. It returns whatever is asked for.
+
function xml.filter(root,pattern) -- no longer funny attribute handling here
return applylpath(root,pattern)
end
@@ -1525,22 +1515,17 @@
end
end
---[[ldx--
-<p>Often using an iterators looks nicer in the code than passing handler
-functions. The <l n='lua'/> book describes how to use coroutines for that
-purpose (<url href='http://www.lua.org/pil/9.3.html'/>). This permits
-code like:</p>
+-- Often using an iterators looks nicer in the code than passing handler functions.
+-- The LUA book describes how to use coroutines for that purpose
+-- 'href="http://www.lua.org/pil/9.3.html"'. This permits code like:
+--
+-- for r, d, k in xml.elements(xml.load('text.xml'),"title") do
+-- print(d[k]) -- old method
+-- end
+-- for e in xml.collected(xml.load('text.xml'),"title") do
+-- print(e) -- new one
+-- end
-<typing>
-for r, d, k in xml.elements(xml.load('text.xml'),"title") do
- print(d[k]) -- old method
-end
-for e in xml.collected(xml.load('text.xml'),"title") do
- print(e) -- new one
-end
-</typing>
---ldx]]--
-
-- local wrap, yield = coroutine.wrap, coroutine.yield
-- local dummy = function() end
--
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-mis.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-mis.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-mis.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -17,13 +17,10 @@
lpegpatterns.xml = lpegpatterns.xml or { }
local xmlpatterns = lpegpatterns.xml
---[[ldx--
-<p>The following helper functions best belong to the <t>lxml-ini</t>
-module. Some are here because we need then in the <t>mk</t>
-document and other manuals, others came up when playing with
-this module. Since this module is also used in <l n='mtxrun'/> we've
-put them here instead of loading mode modules there then needed.</p>
---ldx]]--
+-- The following helper functions best belong to the 'lxml-ini' module. Some are
+-- here because we need then in the 'mk' document and other manuals, others came up
+-- when playing with this module. Since this module is also used in 'mtxrun' we've
+-- put them here instead of loading mode modules there then needed.
local function xmlgsub(t,old,new) -- will be replaced
local dt = t.dt
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-tab.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-tab.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/lxml-tab.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -18,13 +18,12 @@
local report_xml = logs and logs.reporter("xml","core") or function(...) print(string.format(...)) end
---[[ldx--
-<p>The parser used here is inspired by the variant discussed in the lua book, but
-handles comment and processing instructions, has a different structure, provides
-parent access; a first version used different trickery but was less optimized to we
-went this route. First we had a find based parser, now we have an <l n='lpeg'/> based one.
-The find based parser can be found in l-xml-edu.lua along with other older code.</p>
---ldx]]--
+-- The parser used here is inspired by the variant discussed in the lua book, but
+-- handles comment and processing instructions, has a different structure, provides
+-- parent access; a first version used different trickery but was less optimized to
+-- we went this route. First we had a find based parser, now we have an LPEG based
+-- one. The find based parser can be found in l-xml-edu.lua along with other older
+-- code.
if lpeg.setmaxstack then lpeg.setmaxstack(1000) end -- deeply nested xml files
@@ -42,27 +41,20 @@
local P, S, R, C, V, C, Cs = lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.V, lpeg.C, lpeg.Cs
local formatters = string.formatters
---[[ldx--
-<p>First a hack to enable namespace resolving. A namespace is characterized by
-a <l n='url'/>. The following function associates a namespace prefix with a
-pattern. We use <l n='lpeg'/>, which in this case is more than twice as fast as a
-find based solution where we loop over an array of patterns. Less code and
-much cleaner.</p>
---ldx]]--
+-- First a hack to enable namespace resolving. A namespace is characterized by a
+-- URL. The following function associates a namespace prefix with a pattern. We use
+-- LPEG, which in this case is more than twice as fast as a find based solution
+-- where we loop over an array of patterns. Less code and much cleaner.
do -- begin of namespace closure (we ran out of locals)
xml.xmlns = xml.xmlns or { }
---[[ldx--
-<p>The next function associates a namespace prefix with an <l n='url'/>. This
-normally happens independent of parsing.</p>
+-- The next function associates a namespace prefix with an URL. This normally
+-- happens independent of parsing.
+--
+-- xml.registerns("mml","mathml")
-<typing>
-xml.registerns("mml","mathml")
-</typing>
---ldx]]--
-
local check = P(false)
local parse = check
@@ -71,16 +63,12 @@
parse = P { P(check) + 1 * V(1) }
end
---[[ldx--
-<p>The next function also registers a namespace, but this time we map a
-given namespace prefix onto a registered one, using the given
-<l n='url'/>. This used for attributes like <t>xmlns:m</t>.</p>
+-- The next function also registers a namespace, but this time we map a given
+-- namespace prefix onto a registered one, using the given URL. This used for
+-- attributes like 'xmlns:m'.
+--
+-- xml.checkns("m","http://www.w3.org/mathml")
-<typing>
-xml.checkns("m","http://www.w3.org/mathml")
-</typing>
---ldx]]--
-
function xml.checkns(namespace,url)
local ns = lpegmatch(parse,lower(url))
if ns and namespace ~= ns then
@@ -88,69 +76,55 @@
end
end
---[[ldx--
-<p>Next we provide a way to turn an <l n='url'/> into a registered
-namespace. This used for the <t>xmlns</t> attribute.</p>
+-- Next we provide a way to turn an URL into a registered namespace. This used for
+-- the 'xmlns' attribute.
+--
+-- resolvedns = xml.resolvens("http://www.w3.org/mathml")
+--
+-- This returns MATHML.
-<typing>
-resolvedns = xml.resolvens("http://www.w3.org/mathml")
-</typing>
-
-This returns <t>mml</t>.
---ldx]]--
-
function xml.resolvens(url)
return lpegmatch(parse,lower(url)) or ""
end
---[[ldx--
-<p>A namespace in an element can be remapped onto the registered
-one efficiently by using the <t>xml.xmlns</t> table.</p>
---ldx]]--
+-- A namespace in an element can be remapped onto the registered one efficiently by
+-- using the 'xml.xmlns' table.
end -- end of namespace closure
---[[ldx--
-<p>This version uses <l n='lpeg'/>. We follow the same approach as before, stack and top and
-such. This version is about twice as fast which is mostly due to the fact that
-we don't have to prepare the stream for cdata, doctype etc etc. This variant is
-is dedicated to Luigi Scarso, who challenged me with 40 megabyte <l n='xml'/> files that
-took 12.5 seconds to load (1.5 for file io and the rest for tree building). With
-the <l n='lpeg'/> implementation we got that down to less 7.3 seconds. Loading the 14
-<l n='context'/> interface definition files (2.6 meg) went down from 1.05 seconds to 0.55.</p>
+-- This version uses LPEG. We follow the same approach as before, stack and top and
+-- such. This version is about twice as fast which is mostly due to the fact that we
+-- don't have to prepare the stream for cdata, doctype etc etc. This variant is is
+-- dedicated to Luigi Scarso, who challenged me with 40 megabyte XML files that took
+-- 12.5 seconds to load (1.5 for file io and the rest for tree building). With the
+-- LPEG implementation we got that down to less 7.3 seconds. Loading the 14 ConTeXt
+-- interface definition files (2.6 meg) went down from 1.05 seconds to 0.55.
+--
+-- Next comes the parser. The rather messy doctype definition comes in many
+-- disguises so it is no surprice that later on have to dedicate quite some LPEG
+-- code to it.
+--
+-- <!DOCTYPE Something PUBLIC "... ..." "..." [ ... ] >
+-- <!DOCTYPE Something PUBLIC "... ..." "..." >
+-- <!DOCTYPE Something SYSTEM "... ..." [ ... ] >
+-- <!DOCTYPE Something SYSTEM "... ..." >
+-- <!DOCTYPE Something [ ... ] >
+-- <!DOCTYPE Something >
+--
+-- The code may look a bit complex but this is mostly due to the fact that we
+-- resolve namespaces and attach metatables. There is only one public function:
+--
+-- local x = xml.convert(somestring)
+--
+-- An optional second boolean argument tells this function not to create a root
+-- element.
+--
+-- Valid entities are:
+--
+-- <!ENTITY xxxx SYSTEM "yyyy" NDATA zzzz>
+-- <!ENTITY xxxx PUBLIC "yyyy" >
+-- <!ENTITY xxxx "yyyy" >
-<p>Next comes the parser. The rather messy doctype definition comes in many
-disguises so it is no surprice that later on have to dedicate quite some
-<l n='lpeg'/> code to it.</p>
-
-<typing>
-<!DOCTYPE Something PUBLIC "... ..." "..." [ ... ] >
-<!DOCTYPE Something PUBLIC "... ..." "..." >
-<!DOCTYPE Something SYSTEM "... ..." [ ... ] >
-<!DOCTYPE Something SYSTEM "... ..." >
-<!DOCTYPE Something [ ... ] >
-<!DOCTYPE Something >
-</typing>
-
-<p>The code may look a bit complex but this is mostly due to the fact that we
-resolve namespaces and attach metatables. There is only one public function:</p>
-
-<typing>
-local x = xml.convert(somestring)
-</typing>
-
-<p>An optional second boolean argument tells this function not to create a root
-element.</p>
-
-<p>Valid entities are:</p>
-
-<typing>
-<!ENTITY xxxx SYSTEM "yyyy" NDATA zzzz>
-<!ENTITY xxxx PUBLIC "yyyy" >
-<!ENTITY xxxx "yyyy" >
-</typing>
---ldx]]--
-
-- not just one big nested table capture (lpeg overflow)
local nsremap, resolvens = xml.xmlns, xml.resolvens
@@ -1332,10 +1306,8 @@
return xc
end
---[[ldx--
-<p>Packaging data in an xml like table is done with the following
-function. Maybe it will go away (when not used).</p>
---ldx]]--
+-- Packaging data in an xml like table is done with the following function. Maybe it
+-- will go away (when not used).
function xml.is_valid(root)
return root and root.dt and root.dt[1] and type(root.dt[1]) == "table" and not root.dt[1].er
@@ -1354,11 +1326,8 @@
xml.errorhandler = report_xml
---[[ldx--
-<p>We cannot load an <l n='lpeg'/> from a filehandle so we need to load
-the whole file first. The function accepts a string representing
-a filename or a file handle.</p>
---ldx]]--
+-- We cannot load an LPEG from a filehandle so we need to load the whole file first.
+-- The function accepts a string representing a filename or a file handle.
function xml.load(filename,settings)
local data = ""
@@ -1382,10 +1351,8 @@
end
end
---[[ldx--
-<p>When we inject new elements, we need to convert strings to
-valid trees, which is what the next function does.</p>
---ldx]]--
+-- When we inject new elements, we need to convert strings to valid trees, which is
+-- what the next function does.
local no_root = { no_root = true }
@@ -1398,11 +1365,9 @@
end
end
---[[ldx--
-<p>For copying a tree we use a dedicated function instead of the
-generic table copier. Since we know what we're dealing with we
-can speed up things a bit. The second argument is not to be used!</p>
---ldx]]--
+-- For copying a tree we use a dedicated function instead of the generic table
+-- copier. Since we know what we're dealing with we can speed up things a bit. The
+-- second argument is not to be used!
-- local function copy(old)
-- if old then
@@ -1466,13 +1431,10 @@
xml.copy = copy
---[[ldx--
-<p>In <l n='context'/> serializing the tree or parts of the tree is a major
-actitivity which is why the following function is pretty optimized resulting
-in a few more lines of code than needed. The variant that uses the formatting
-function for all components is about 15% slower than the concatinating
-alternative.</p>
---ldx]]--
+-- In ConTeXt serializing the tree or parts of the tree is a major actitivity which
+-- is why the following function is pretty optimized resulting in a few more lines
+-- of code than needed. The variant that uses the formatting function for all
+-- components is about 15% slower than the concatinating alternative.
-- todo: add <?xml version='1.0' standalone='yes'?> when not present
@@ -1490,10 +1452,8 @@
end
end
---[[ldx--
-<p>At the cost of some 25% runtime overhead you can first convert the tree to a string
-and then handle the lot.</p>
---ldx]]--
+-- At the cost of some 25% runtime overhead you can first convert the tree to a
+-- string and then handle the lot.
-- new experimental reorganized serialize
@@ -1711,22 +1671,19 @@
}
}
---[[ldx--
-<p>How you deal with saving data depends on your preferences. For a 40 MB database
-file the timing on a 2.3 Core Duo are as follows (time in seconds):</p>
-<lines>
-1.3 : load data from file to string
-6.1 : convert string into tree
-5.3 : saving in file using xmlsave
-6.8 : converting to string using xml.tostring
-3.6 : saving converted string in file
-</lines>
+-- How you deal with saving data depends on your preferences. For a 40 MB database
+-- file the timing on a 2.3 Core Duo are as follows (time in seconds):
+--
+-- 1.3 : load data from file to string
+-- 6.1 : convert string into tree
+-- 5.3 : saving in file using xmlsave
+-- 6.8 : converting to string using xml.tostring
+-- 3.6 : saving converted string in file
+--
+-- Beware, these were timing with the old routine but measurements will not be that
+-- much different I guess.
-<p>Beware, these were timing with the old routine but measurements will not be that
-much different I guess.</p>
---ldx]]--
-
-- maybe this will move to lxml-xml
local result
@@ -1827,10 +1784,8 @@
xml.serialize = serialize
xml.tostring = xmltostring
---[[ldx--
-<p>The next function operated on the content only and needs a handle function
-that accepts a string.</p>
---ldx]]--
+-- The next function operated on the content only and needs a handle function that
+-- accepts a string.
local function xmlstring(e,handle)
if not handle or (e.special and e.tg ~= "@rt@") then
@@ -1849,9 +1804,7 @@
xml.string = xmlstring
---[[ldx--
-<p>A few helpers:</p>
---ldx]]--
+-- A few helpers:
--~ xmlsetproperty(root,"settings",settings)
@@ -1899,11 +1852,9 @@
end
end
---[[ldx--
-<p>The next helper erases an element but keeps the table as it is,
-and since empty strings are not serialized (effectively) it does
-not harm. Copying the table would take more time. Usage:</p>
---ldx]]--
+-- The next helper erases an element but keeps the table as it is, and since empty
+-- strings are not serialized (effectively) it does not harm. Copying the table
+-- would take more time.
function xml.erase(dt,k)
if dt then
@@ -1915,14 +1866,10 @@
end
end
---[[ldx--
-<p>The next helper assigns a tree (or string). Usage:</p>
+-- The next helper assigns a tree (or string). Usage:
+--
+-- dt[k] = xml.assign(root) or xml.assign(dt,k,root)
-<typing>
-dt[k] = xml.assign(root) or xml.assign(dt,k,root)
-</typing>
---ldx]]--
-
function xml.assign(dt,k,root)
if dt and k then
dt[k] = type(root) == "table" and xml.body(root) or root
@@ -1932,16 +1879,11 @@
end
end
--- the following helpers may move
+-- The next helper assigns a tree (or string). Usage:
+--
+-- xml.tocdata(e)
+-- xml.tocdata(e,"error")
---[[ldx--
-<p>The next helper assigns a tree (or string). Usage:</p>
-<typing>
-xml.tocdata(e)
-xml.tocdata(e,"error")
-</typing>
---ldx]]--
-
function xml.tocdata(e,wrapper) -- a few more in the aux module
local whatever = type(e) == "table" and xmltostring(e.dt) or e or ""
if wrapper then
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/math-def.mkiv
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/math-def.mkiv 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/math-def.mkiv 2023-05-06 22:03:57 UTC (rev 67034)
@@ -47,6 +47,9 @@
\definemathcommand [deg] [nolop] {\mfunctionlabeltext{deg}}
\definemathcommand [det] [limop] {\mfunctionlabeltext{det}}
\definemathcommand [dim] [nolop] {\mfunctionlabeltext{dim}}
+%definemathcommand [erf] [nolop] {\mfunctionlabeltext{erf}}
+%definemathcommand [erfc] [nolop] {\mfunctionlabeltext{erfc}}
+%definemathcommand [erfi] [nolop] {\mfunctionlabeltext{erfi}}
\definemathcommand [exp] [nolop] {\mfunctionlabeltext{exp}}
\definemathcommand [gcd] [limop] {\mfunctionlabeltext{gcd}}
\definemathcommand [hom] [nolop] {\mfunctionlabeltext{hom}}
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/math-map.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/math-map.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/math-map.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -7,32 +7,14 @@
license = "see context related readme files"
}
--- todo: make sparse .. if self
+-- persian: we will also provide mappers for other scripts
+-- todo : alphabets namespace
+-- maybe : script/scriptscript dynamic,
+-- check : (U+2202,U+1D715) : upright
+-- (U+2202,U+1D715) : italic
+-- (U+2202,U+1D715) : upright
+-- add them to the regular vectors below so that they honor \it etc
---[[ldx--
-<p>Remapping mathematics alphabets.</p>
---ldx]]--
-
--- oldstyle: not really mathematics but happened to be part of
--- the mathematics fonts in cmr
---
--- persian: we will also provide mappers for other
--- scripts
-
--- todo: alphabets namespace
--- maybe: script/scriptscript dynamic,
-
--- superscripped primes get unscripted !
-
--- to be looked into once the fonts are ready (will become font
--- goodie):
---
--- (U+2202,U+1D715) : upright
--- (U+2202,U+1D715) : italic
--- (U+2202,U+1D715) : upright
---
--- plus add them to the regular vectors below so that they honor \it etc
-
local type, next = type, next
local merged, sortedhash = table.merged, table.sortedhash
local extract = bit32.extract
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/math-vfu.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/math-vfu.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/math-vfu.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -620,8 +620,10 @@
end
local m = mathencodings[name]
local r = { }
- for u, i in next, m do
- r[i] = u
+ if type(m) == "table" then
+ for u, i in next, m do
+ r[i] = u
+ end
end
reverse[name] = r
return r
@@ -714,8 +716,9 @@
local start = (trace_virtual or trace_timings) and os.clock()
local okset = { }
local n = 0
- for s=1,#set do
- local ss = set[s]
+ local setlist = set.recipe or set
+ for s=1,#setlist do
+ local ss = setlist[s]
local ssname = ss.name
if add_optional and ss.optional then
if trace_virtual then
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/meta-fun.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/meta-fun.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/meta-fun.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -13,15 +13,18 @@
local context = context
local metapost = metapost
-metapost.metafun = metapost.metafun or { }
-local metafun = metapost.metafun
+local metafun = metapost.metafun or { }
+metapost.metafun = metafun
function metafun.topath(t,connector)
context("(")
if #t > 0 then
+ if not connector then
+ connector = ".."
+ end
for i=1,#t do
if i > 1 then
- context(connector or "..")
+ context(connector)
end
local ti = t[i]
if type(ti) == "string" then
@@ -39,12 +42,15 @@
function metafun.interpolate(f,b,e,s,c)
local done = false
context("(")
- for i=b,e,(e-b)/s do
- local d = load(format("return function(x) return %s end",f))
- if d then
- d = d()
+ local d = load(format("return function(x) return %s end",f))
+ if d then
+ d = d()
+ if not c then
+ c = "..."
+ end
+ for i=b,e,(e-b)/s do
if done then
- context(c or "...")
+ context(c)
else
done = true
end
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/mlib-fio.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/mlib-fio.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/mlib-fio.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -54,8 +54,18 @@
end
end
+local remapped = {
+ -- We don't yet have an interface for adding more here but when needed
+ -- there will be one.
+ ["hatching.mp"] = "mp-remapped-hatching.mp",
+ ["boxes.mp"] = "mp-remapped-boxes.mp",
+ ["hatching"] = "mp-remapped-hatching.mp",
+ ["boxes"] = "mp-remapped-boxes.mp",
+}
+
finders.file = function(specification,name,mode,ftype)
- return resolvers.findfile(name,validftype(ftype))
+ local usedname = remapped[name] or name
+ return resolvers.findfile(usedname,validftype(ftype))
end
local function i_finder(name,mode,ftype) -- fake message for mpost.map and metafun.mpvi
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/mlib-run.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/mlib-run.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/mlib-run.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,29 +6,13 @@
license = "see context related readme files",
}
--- cmyk -> done, native
--- spot -> done, but needs reworking (simpler)
--- multitone ->
--- shade -> partly done, todo: cm
--- figure -> done
--- hyperlink -> low priority, easy
+-- The directional helpers and pen analysis are more or less translated from the C
+-- code. It really helps that Taco know that source so well. Taco and I spent quite
+-- some time on speeding up the Lua and C code. There is not much to gain,
+-- especially if one keeps in mind that when integrated in TeX only a part of the
+-- time is spent in MetaPost. Of course an integrated approach is way faster than an
+-- external MetaPost and processing time nears zero.
--- new * run
--- or
--- new * execute^1 * finish
-
--- a*[b,c] == b + a * (c-b)
-
---[[ldx--
-<p>The directional helpers and pen analysis are more or less translated from the
-<l n='c'/> code. It really helps that Taco know that source so well. Taco and I spent
-quite some time on speeding up the <l n='lua'/> and <l n='c'/> code. There is not
-much to gain, especially if one keeps in mind that when integrated in <l n='tex'/>
-only a part of the time is spent in <l n='metapost'/>. Of course an integrated
-approach is way faster than an external <l n='metapost'/> and processing time
-nears zero.</p>
---ldx]]--
-
local type, tostring, tonumber, next = type, tostring, tonumber, next
local find, striplines = string.find, utilities.strings.striplines
local concat, insert, remove = table.concat, table.insert, table.remove
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/mult-low.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/mult-low.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/mult-low.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -146,7 +146,7 @@
"startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes",
"doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes",
"startenvironment", "stopenvironment", "environment",
- "startcomponent", "stopcomponent", "component",
+ "startcomponent", "stopcomponent", "component", "startlocalcomponent", "stoplocalcomponent",
"startproduct", "stopproduct", "product",
"startproject", "stopproject", "project",
"starttext", "stoptext", "startnotext", "stopnotext",
@@ -259,11 +259,11 @@
"globalsetmode", "globalresetmode", "globalsetsystemmode", "globalresetsystemmode",
"booleanmodevalue",
--
- "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif",
+ "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newfloat",
"newlanguage", "newfamily", "newfam", "newhelp", -- not used
--
- "newinteger", "newdimension", "newgluespec", "newmugluespec",
- "aliasinteger", "aliasdimension",
+ "newinteger", "newdimension", "newgluespec", "newmugluespec", "newposit",
+ "aliasinteger", "aliasdimension", "aliasposit",
--
"then",
"begcsname",
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/mult-mps.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/mult-mps.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/mult-mps.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -127,7 +127,7 @@
--
"red", "green", "blue", "cyan", "magenta", "yellow", "black", "white", "background",
--
- "mm", "pt", "dd", "bp", "cm", "pc", "cc", "in", "dk",
+ "mm", "pt", "dd", "bp", "cm", "pc", "cc", "in", "dk", "es", "ts",
--
"triplet", "quadruplet", "totransform", "bymatrix", "closedcurve", "closedlines",
--
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/mult-prm.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/mult-prm.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/mult-prm.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -99,6 +99,7 @@
"Umathcode",
"Umathconnectoroverlapmin",
"Umathdegreevariant",
+ "Umathdelimiterextendmargin",
"Umathdelimiterovervariant",
"Umathdelimiterpercent",
"Umathdelimitershortfall",
@@ -318,6 +319,7 @@
"currentmarks",
"dbox",
"defcsname",
+ "deferred",
"detokenized",
"dimensiondef",
"dimexpression",
@@ -333,6 +335,7 @@
"etoks",
"etoksapp",
"etokspre",
+ "eufactor",
"everybeforepar",
"everymathatom",
"everytab",
@@ -349,7 +352,11 @@
"explicitdiscretionary",
"explicithyphenpenalty",
"firstvalidlanguage",
+ "float",
+ "floatdef",
+ "floatexpr",
"flushmarks",
+ "fontcharba",
"fontcharta",
"fontid",
"fontmathcontrol",
@@ -399,6 +406,7 @@
"hyphenationmin",
"hyphenationmode",
"ifabsdim",
+ "ifabsfloat",
"ifabsnum",
"ifarguments",
"ifboolean",
@@ -414,6 +422,7 @@
"ifdimval",
"ifempty",
"ifflags",
+ "iffloat",
"ifhaschar",
"ifhastok",
"ifhastoks",
@@ -429,6 +438,7 @@
"ifrelax",
"iftok",
"ifzerodim",
+ "ifzerofloat",
"ifzeronum",
"ignorearguments",
"ignoredepthcriterium",
@@ -556,7 +566,9 @@
"maththreshold",
"mathunderline",
"meaningasis",
+ "meaningful",
"meaningfull",
+ "meaningles",
"meaningless",
"mugluespecdef",
"mutable",
@@ -588,6 +600,7 @@
"pardirection",
"permanent",
"pettymuskip",
+ "positdef",
"postexhyphenchar",
"posthyphenchar",
"postinlinepenalty",
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/node-ini.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/node-ini.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/node-ini.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,51 +6,39 @@
license = "see context related readme files"
}
---[[ldx--
-<p>Most of the code that had accumulated here is now separated in modules.</p>
---ldx]]--
+-- Most of the code that had accumulated here is now separated in modules.
--- I need to clean up this module as it's a bit of a mess now. The latest luatex
--- has most tables but we have a few more in luametatex. Also, some are different
--- between these engines. We started out with hardcoded tables, that then ended
--- up as comments and are now gone (as they differ per engine anyway).
-
local next, type, tostring = next, type, tostring
local gsub = string.gsub
local concat, remove = table.concat, table.remove
local sortedhash, sortedkeys, swapped = table.sortedhash, table.sortedkeys, table.swapped
---[[ldx--
-<p>Access to nodes is what gives <l n='luatex'/> its power. Here we implement a
-few helper functions. These functions are rather optimized.</p>
---ldx]]--
+-- Access to nodes is what gives LuaTeX its power. Here we implement a few helper
+-- functions. These functions are rather optimized.
+--
+-- When manipulating node lists in ConTeXt, we will remove nodes and insert new
+-- ones. While node access was implemented, we did quite some experiments in order
+-- to find out if manipulating nodes in Lua was feasible from the perspective of
+-- performance.
+--
+-- First of all, we noticed that the bottleneck is more with excessive callbacks
+-- (some gets called very often) and the conversion from and to TeX's
+-- datastructures. However, at the Lua end, we found that inserting and deleting
+-- nodes in a table could become a bottleneck.
+--
+-- This resulted in two special situations in passing nodes back to TeX: a table
+-- entry with value 'false' is ignored, and when instead of a table 'true' is
+-- returned, the original table is used.
+--
+-- Insertion is handled (at least in ConTeXt as follows. When we need to insert a
+-- node at a certain position, we change the node at that position by a dummy node,
+-- tagged 'inline' which itself has_attribute the original node and one or more new
+-- nodes. Before we pass back the list we collapse the list. Of course collapsing
+-- could be built into the TeX engine, but this is a not so natural extension.
---[[ldx--
-<p>When manipulating node lists in <l n='context'/>, we will remove nodes and
-insert new ones. While node access was implemented, we did quite some experiments
-in order to find out if manipulating nodes in <l n='lua'/> was feasible from the
-perspective of performance.</p>
+-- When we collapse (something that we only do when really needed), we also ignore
+-- the empty nodes. [This is obsolete!]
-<p>First of all, we noticed that the bottleneck is more with excessive callbacks
-(some gets called very often) and the conversion from and to <l n='tex'/>'s
-datastructures. However, at the <l n='lua'/> end, we found that inserting and
-deleting nodes in a table could become a bottleneck.</p>
-
-<p>This resulted in two special situations in passing nodes back to <l n='tex'/>:
-a table entry with value <type>false</type> is ignored, and when instead of a
-table <type>true</type> is returned, the original table is used.</p>
-
-<p>Insertion is handled (at least in <l n='context'/> as follows. When we need to
-insert a node at a certain position, we change the node at that position by a
-dummy node, tagged <type>inline</type> which itself has_attribute the original
-node and one or more new nodes. Before we pass back the list we collapse the
-list. Of course collapsing could be built into the <l n='tex'/> engine, but this
-is a not so natural extension.</p>
-
-<p>When we collapse (something that we only do when really needed), we also
-ignore the empty nodes. [This is obsolete!]</p>
---ldx]]--
-
-- local gf = node.direct.getfield
-- local n = table.setmetatableindex("number")
-- function node.direct.getfield(a,b) n[b] = n[b] + 1 print(b,n[b]) return gf(a,b) end
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/node-res.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/node-res.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/node-res.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -9,11 +9,6 @@
local type, next = type, next
local gmatch, format = string.gmatch, string.format
---[[ldx--
-<p>The next function is not that much needed but in <l n='context'/> we use
-for debugging <l n='luatex'/> node management.</p>
---ldx]]--
-
local nodes, node = nodes, node
local report_nodes = logs.reporter("nodes","housekeeping")
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/node-tra.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/node-tra.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/node-tra.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,10 +6,8 @@
license = "see context related readme files"
}
---[[ldx--
-<p>This is rather experimental. We need more control and some of this
-might become a runtime module instead. This module will be cleaned up!</p>
---ldx]]--
+-- Some of the code here might become a runtime module instead. This old module will
+-- be cleaned up anyway!
local next = next
local utfchar = utf.char
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/pack-obj.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/pack-obj.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/pack-obj.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,10 +6,8 @@
license = "see context related readme files"
}
---[[ldx--
-<p>We save object references in the main utility table. jobobjects are
-reusable components.</p>
---ldx]]--
+-- We save object references in the main utility table; job objects are reusable
+-- components.
local context = context
local codeinjections = backends.codeinjections
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/pack-rul.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/pack-rul.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/pack-rul.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -7,10 +7,6 @@
license = "see context related readme files"
}
---[[ldx--
-<p>An explanation is given in the history document <t>mk</t>.</p>
---ldx]]--
-
-- we need to be careful with display math as it uses shifts
-- \framed[align={lohi,middle}]{$x$}
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/phys-dim.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/phys-dim.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/phys-dim.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -452,7 +452,7 @@
s = "second",
g = "gram",
n = "newton",
- v = "volt",
+ V = "volt",
t = "tonne",
l = "liter",
-- w = "watt",
@@ -460,6 +460,12 @@
-- a = "ampere",
A = "ampere",
+ Ω = "ohm",
+
+-- C = "coulomb", -- needs checking with (c)enti
+-- K = "kelvin", -- needs checking with (k)ilo
+-- N = "newton", -- needs checking with (n)ewton
+
min = "minute",
[utfchar(0x2103)] = "celsius",
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/publ-dat.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/publ-dat.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/publ-dat.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -11,12 +11,6 @@
-- todo: dataset = datasets[dataset] => current = datasets[dataset]
-- todo: maybe split this file
---[[ldx--
-<p>This is a prelude to integrated bibliography support. This file just loads
-bibtex files and converts them to xml so that the we access the content
-in a convenient way. Actually handling the data takes place elsewhere.</p>
---ldx]]--
-
if not characters then
dofile(resolvers.findfile("char-utf.lua"))
dofile(resolvers.findfile("char-tex.lua"))
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -95,14 +95,11 @@
"year",
"subtitle", "type", "file",
"journal", "volume", "number", "pages",
- "doi", "note",
+ "doi", "issn", "note",
-- APA ignores this:
--
-- "month",
--
- -- fields defined in jabref but presently ignored:
- --
- -- "issn",
},
}
@@ -120,7 +117,7 @@
"subtitle", "type", "file",
"number",
"month", "day",
- "doi", "note",
+ "doi", "issn", "note",
},
}
@@ -142,7 +139,7 @@
"subtitle", "file",
"series", "volume", "number", "month",
"organization",
- "doi", "note",
+ "doi", "issn", "note",
},
}
@@ -157,7 +154,7 @@
"author",
"year",
"title", "subtitle",
- "doi", "note",
+ "doi", "isbn", "note",
},
optional = {
"withauthor", "translator",
@@ -181,7 +178,7 @@
"subtitle", "type", "file",
"editionset", "series",
"address",
- "doi", "note",
+ "doi", "isbn", "note",
"abstract",
},
}
@@ -208,7 +205,7 @@
"editionset", "series",
"month",
"address",
- "doi", "note",
+ "doi", "isbn", "note",
},
}
@@ -236,7 +233,7 @@
-- APA ignores this: "chapter",
"month",
"address",
- "doi", "note",
+ "doi", "isbn", "note",
},
}
@@ -257,7 +254,7 @@
"year", "month",
"subtitle", "type", "file",
"address",
- "doi", "note",
+ "doi", "isbn", "note",
},
}
@@ -281,7 +278,7 @@
"editionset", "series",
"month",
"address",
- "doi", "note",
+ "doi", "isbn", "note",
},
}
@@ -296,7 +293,7 @@
"month",
"edition", "series",
"address", "organization",
- "doi", "note",
+ "doi", "isbn", "note",
},
}
@@ -320,7 +317,7 @@
"subtitle", "file",
"month",
"address",
- "doi", "note",
+ "doi", "isbn", "note",
},
}
@@ -338,7 +335,7 @@
"subtitle", "file",
"month",
"address",
- "doi", "note",
+ "doi", "isbn", "note",
},
}
categories.phdthesis = categories.mastersthesis
@@ -365,7 +362,7 @@
"subtitle", "file",
"editionset",
"month",
- "doi", "note",
+ "doi", "isbn", "note",
},
}
@@ -387,7 +384,7 @@
"address",
"subtitle", "file",
"editionset", "month", "year",
- "doi", "note",
+ "doi", "isbn", "note",
-- "abstract",
},
}
@@ -515,7 +512,7 @@
"title", "subtitle", "file",
"year", "month",
"howpublished",
- "doi", "note",
+ "doi", "isbn", "note",
},
}
@@ -533,7 +530,7 @@
optional = {
"withauthor", "translator",
"subtitle", "file",
- "doi", "note",
+ "doi", "isbn", "note",
},
}
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.mkvi
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.mkvi 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.mkvi 2023-05-06 22:03:57 UTC (rev 67034)
@@ -113,6 +113,14 @@
[apa:\s!list]
\definebtx
+ [apa:\s!list:isbn]
+ [apa:\s!list]
+
+\definebtx
+ [apa:\s!list:issn]
+ [apa:\s!list]
+
+\definebtx
[apa:\s!list:\s!page]
[apa:\s!list]
[\c!separator:2={\btxcomma},
@@ -521,6 +529,14 @@
[apa:\s!cite:url]
\definebtx
+ [apa:\s!cite:isbn]
+ [apa:\s!cite]
+
+\definebtx
+ [apa:\s!cite:issn]
+ [apa:\s!cite]
+
+\definebtx
[apa:\s!cite:num]
[apa:\s!cite]
[\c!left={[},
@@ -879,6 +895,11 @@
\endgroup
% which namespace?
%\doif{\btxparameter{translate}}\v!yes {
+ %
+ % An option is unnecessary because the translated title
+ % only gets placed if the user includes a title:xx field
+ % for the entry - not standard for bibtex...
+ %
\texdefinition{btx:apa:translated-title}{#title}
%}
\btxstopstyleandcolor
@@ -1140,7 +1161,12 @@
}
\btxdoif {edition} {
\texdefinition{btx:apa:leftparenthesis-or-comma}
- \btxflush{edition}
+ % the edition= field is often language-dependent
+ % (i.e. second, 2nd, revised, etc.)
+ % so we handle an optional edition:xx= field:
+ \btxdoifelse {edition:\mainbtxlanguage}
+ {\btxflush{edition:\mainbtxlanguage}}
+ {\btxflush{edition}}
\btxspace
\btxlabeltext{apa:edition}
}
@@ -1309,6 +1335,14 @@
\btxspace
\texdefinition{btx:apa:doi}
}
+ \btxdoif {issn} {
+ \btxspace
+ issn\colon\btxflush{issn}
+ }
+ \btxdoif {isbn} {
+ \btxspace
+ isbn\colon\btxflush{isbn}
+ }
\texdefinition{btx:apa:note}
\removeunwantedspaces
\stoptexdefinition
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-aps.mkvi
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-aps.mkvi 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-aps.mkvi 2023-05-06 22:03:57 UTC (rev 67034)
@@ -807,6 +807,7 @@
\stoptexdefinition
\starttexdefinition mutable protected btx:aps:doi-url #text
+ % no: \texdefinition {btx:format:goto} because different test
\ifconditional\btxinteractive
\btxdoifelse {doi} {
\goto {#text} [url(http://dx.doi.org/\btxflush{doi})]
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-chicago.mkvi
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-chicago.mkvi 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-chicago.mkvi 2023-05-06 22:03:57 UTC (rev 67034)
@@ -887,11 +887,11 @@
\setmode{btx:chicago:title-placed}
% we make the title active, opening "file"
\btxdoifelse {file} {
- \texdefinition{btx:format:inject}
- {url(file:\btxflush{file})}
- {
- \texdefinition{btx:chicago:composed-title}{title}
- }
+ \texdefinition{btx:format:goto} {
+ url(file:\btxflush{file})
+ } {
+ \texdefinition{btx:chicago:composed-title}{title}
+ }
} {
\texdefinition{btx:chicago:composed-title}{title}
}
@@ -1049,8 +1049,7 @@
\starttexdefinition mutable protected btx:chicago:authoryear
% we make the authoryear active, pointing to the citation
- \texdefinition{btx:format:inject}
- {internal(\currentbtxinternal)}
+ \texdefinition{btx:format:gotointernal}
{
\doifelsesetups{chicago:list:sameauthor} {
\btxdoifelsesameasprevious {author} {
@@ -1256,15 +1255,11 @@
\starttexdefinition mutable protected btx:chicago:url
\begingroup
\setbreakpoints[doi]
- \ifconditional\btxinteractive
- \goto {
- \hyphenatedurl{\btxflush{url}}
- } [
- url(\btxflush{url})
- ]
- \else
+ \texdefinition {btx:format:goto} {
+ url(\btxflush{url})
+ } {
\hyphenatedurl{\btxflush{url}}
- \fi
+ }
\endgroup
\stoptexdefinition
@@ -1273,15 +1268,11 @@
\starttexdefinition mutable protected btx:chicago:doi
\begingroup
\setbreakpoints[doi]
- \ifconditional\btxinteractive
- \goto {
- \hyphenatedurl{doi:\btxflush{doi}}
- } [
- url(http://dx.doi.org/\btxflush{doi})
- ]
- \else
+ \texdefinition {btx:format:goto} {
+ url(http://dx.doi.org/\btxflush{doi})
+ } {
\hyphenatedurl{doi:\btxflush{doi}}
- \fi
+ }
\endgroup
\stoptexdefinition
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-cite.mkvi
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-cite.mkvi 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-cite.mkvi 2023-05-06 22:03:57 UTC (rev 67034)
@@ -14,19 +14,9 @@
\unprotect
\starttexdefinition mutable protected btx:cite:inject #content
- \ifconditional\btxinteractive
- \ifx\currentbtxinternal\empty
- #content
- \else
- \goto {
- #content
- } [
- \s!internal(\currentbtxinternal)
- ]
- \fi
- \else
+ \texdefinition{btx:format:gotointernal} {
#content
- \fi
+ }
\stoptexdefinition
\starttexdefinition mutable protected btx:cite:checkconcat
@@ -252,33 +242,27 @@
\startsetups btx:cite:url
\ifx\currentbtxfirst\empty
\fastsetup{\s!btx:\s!cite:\s!empty}
- \else\ifconditional\btxinteractive
- \goto {
+ \else
+ \texdefinition {btx:format:goto} {
+ url(\currentbtxfirst)
+ } {
\btxcitereference
\hyphenatedurl{\currentbtxfirst}
- } [
- url(\currentbtxfirst)
- ]
- \else
- \btxcitereference
- \hyphenatedurl{\currentbtxfirst}
- \fi\fi
+ }
+ \fi
\stopsetups
\startsetups btx:cite:doi
\ifx\currentbtxfirst\empty
\fastsetup{\s!btx:\s!cite:\s!empty}
- \else\ifconditional\btxinteractive
- \goto {
+ \else
+ \texdefinition {btx:format:goto} {
+ url(http://dx.doi.org/\currentbtxfirst)
+ } {
\btxcitereference
\hyphenatedurl{doi:\currentbtxfirst}
- } [
- url(http://dx.doi.org/\currentbtxfirst)
- ]
- \else
- \btxcitereference
- \hyphenatedurl{doi:\currentbtxfirst}
- \fi\fi
+ }
+ \fi
\stopsetups
\protect
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-definitions.mkvi
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-definitions.mkvi 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-definitions.mkvi 2023-05-06 22:03:57 UTC (rev 67034)
@@ -27,14 +27,24 @@
\btxfield{short}
\stopxmlsetups
-\starttexdefinition mutable protected btx:format:inject #link #content
+\starttexdefinition mutable protected btx:format:gotointernal #content
\ifx\currentbtxinternal\empty
#content
+ \else\ifnum\currentbtxinternal=\zerocount
+ #content
\else\ifconditional\btxinteractive
+ \goto {#content} [\s!internal(\currentbtxinternal)]
+ \else
+ #content
+ \fi\fi\fi
+\stoptexdefinition
+
+\starttexdefinition mutable protected btx:format:goto #link #content
+ \ifconditional\btxinteractive
\goto {#content} [#link]
\else
#content
- \fi\fi
+ \fi
\stoptexdefinition
\startxmlsetups btx:format:doi
@@ -41,11 +51,13 @@
\edef\currentbtxfielddoi{\btxfield{doi}}
\ifx\currentbtxfielddoi\empty
{\tttf no-doi}
- \else\ifconditional\btxinteractive
- \goto{\hyphenatedurl{\currentbtxfielddoi}}[url(http://dx.doi.org/\currentbtxfielddoi)]
\else
- \hyphenatedurl{\currentbtxfielddoi}
- \fi\fi
+ \texdefinition {btx:format:goto} {
+ url(http://dx.doi.org/\currentbtxfielddoi)
+ } {
+ \hyphenatedurl{\currentbtxfielddoi}
+ }
+ \fi
\stopxmlsetups
\startxmlsetups btx:format:url
@@ -52,11 +64,13 @@
\edef\currentbtxfieldurl{\btxfield{url}}
\ifx\currentbtxfieldurl\empty
{\tttf no-url}
- \else\ifconditional\btxinteractive
- \goto{\hyphenatedurl{\currentbtxfieldurl}}[url(\currentbtxfieldurl)]
\else
- \hyphenatedurl{\currentbtxfieldurl}
- \fi\fi
+ \texdefinition {btx:format:goto} {
+ url(\currentbtxfieldurl)
+ } {
+ \hyphenatedurl{\currentbtxfieldurl}
+ }
+ \fi
\stopxmlsetups
\startxmlsetups btx:format:year
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-list.mkvi
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-list.mkvi 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-list.mkvi 2023-05-06 22:03:57 UTC (rev 67034)
@@ -14,19 +14,9 @@
\unprotect
\starttexdefinition mutable protected btx:list:inject:text #content
- \ifconditional\btxinteractivetext
- \ifx\currentbtxinternal\empty
- #content
- \else
- \goto {
- #content
- } [
- \s!internal(\currentbtxinternal)
- ]
- \fi
- \else
+ \texdefinition{btx:format:gotointernal} {
#content
- \fi
+ }
\stoptexdefinition
\startsetups \s!btx:\s!list:text
@@ -40,19 +30,9 @@
\stopsetups
\starttexdefinition mutable protected btx:list:inject:number #content
- \ifconditional\btxinteractivenumber
- \ifx\currentbtxinternal\empty
- #content
- \else
- \goto {
- #content
- } [
- \s!internal(\currentbtxinternal)
- ]
- \fi
- \else
+ \texdefinition{btx:format:gotointernal} {
#content
- \fi
+ }
\stoptexdefinition
\starttexdefinition mutable protected btx:list:helpers:concat
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-page.mkvi
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-page.mkvi 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/publ-imp-page.mkvi 2023-05-06 22:03:57 UTC (rev 67034)
@@ -25,6 +25,17 @@
\fastsetup{\s!btx:\s!list:\s!page:concat}
\fastsetup{\s!btx:\currentbtxspecification:\s!list:page-or-pages}
\ifconditional\btxinteractivepage
+ \ifx\currentbtxfirstinternal\empty
+ \donefalse
+ \else\ifnum\currentbtxfirstinternal=\zerocount
+ \donefalse
+ \else
+ \donetrue
+ \fi\fi
+ \else
+ \donefalse
+ \fi
+ \ifdone
\goto {
\currentbtxfirstpage
} [
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -296,7 +296,8 @@
local checksum = nil
local username = file.addsuffix(file.robustname(formatters["%s-btx-%s"](prefix,name)),"lua")
if userdata and next(userdata) then
- if job.passes.first then
+ if environment.currentrun == 1 then
+ -- if job.passes.first then
local newdata = serialize(userdata)
checksum = md5.HEX(newdata)
io.savedata(username,newdata)
@@ -1803,10 +1804,14 @@
-- todo: names = { "btx" }
+ local function collectresult(rendering)
+ return structures.lists.filter(rendering.specifications) or { }
+ end
+
methods[v_force] = function (dataset,rendering,keyword)
-- only for checking, can have duplicates, todo: collapse page numbers, although
-- we then also needs deferred writes
- local result = structures.lists.filter(rendering.specifications) or { }
+ local result = collectresult(rendering)
local list = rendering.list
local current = datasets[dataset]
local luadata = current.luadata
@@ -1831,7 +1836,7 @@
-- global : if tag and not alldone[tag] and done[tag] ~= section then ...
methods[v_local] = function(dataset,rendering,keyword)
- local result = structures.lists.filter(rendering.specifications) or { }
+ local result = collectresult(rendering)
local section = sections.currentid()
local list = rendering.list
local repeated = rendering.repeated == v_yes
@@ -1903,7 +1908,7 @@
if not dataset then
return
end
- local rendering = renderings[dataset]
+ local rendering = renderings[dataset]
if not rendering then
return
end
@@ -1919,6 +1924,7 @@
rendering.repeated = specification.repeated or v_no
rendering.group = specification.group or ""
rendering.specifications = specification
+ rendering.collected = false
local filtermethod = methods[method]
if not filtermethod then
report_list("invalid method %a",method or "")
@@ -1932,6 +1938,16 @@
else
keyword = nil
end
+ local filename = specification.filename
+ if filename and filename ~= "" then
+ local utilitydata = job.loadother(filename)
+ local lists = utilitydata and utilitydata.structures.lists
+ if lists then
+ rendering.collected = lists.collected
+ else
+ return
+ end
+ end
filtermethod(dataset,rendering,keyword)
local list = rendering.list
if list and filter ~= "" then
@@ -2094,15 +2110,20 @@
flush()
end
local nofranges = #ranges
+local interactive = not rendering.collected
for i=1,nofranges do
local r = ranges[i]
ctx_btxsetconcat(concatstate(i,nofranges))
local first = r[1]
local last = r[2]
+if interactive then
ctx_btxsetfirstinternal(first[2].internal)
+end
ctx_btxsetfirstpage(first[1])
if last then
+if interactive then
ctx_btxsetlastinternal(last[2].internal)
+end
ctx_btxsetlastpage(last[1])
end
if trace_details then
@@ -2261,15 +2282,17 @@
local list = rendering.list
local li = list[i]
if li then
- local data = datasets[dataset]
- local luadata = data.luadata
- local details = data.details
- local tag = li[1]
- local listindex = li[2]
- local n = li[3]
- local entry = luadata[tag]
- local detail = details[tag]
+ local data = datasets[dataset]
+ local luadata = data.luadata
+ local details = data.details
+ local tag = li[1]
+ local listindex = li[2]
+ local n = li[3]
+ local entry = luadata[tag]
+ local detail = details[tag]
--
+ local interactive = not rendering.collected
+ --
ctx_btxstartlistentry()
ctx_btxsetcurrentlistentry(i) -- redundant
ctx_btxsetcurrentlistindex(listindex or 0)
@@ -2282,6 +2305,7 @@
ctx_btxsettag(tag)
ctx_btxsetnumber(n)
--
+if interactive then
local citation = citetolist[n]
if citation then
local references = citation.references
@@ -2291,6 +2315,7 @@
ctx_btxsetinternal(internal)
end
end
+end
end
--
if language then
@@ -2384,6 +2409,7 @@
{ "ignored" },
{ "group" },
{ "filter" },
+ { "filename" },
}
}
}
@@ -2805,6 +2831,7 @@
-- we refer to a previous list entry
bl = entry.internal
end
+ -- no check for external (yet)
ctx_btxsetinternal(bl and bl > 0 and bl or "")
end
local language = entry.language
@@ -3255,7 +3282,7 @@
ctx_btxsettag(tag)
ctx_btxsetbacklink(currentcitation)
local bl = listtocite[currentcitation]
- ctx_btxsetinternal(bl and bl.references.internal or "")
+-- ctx_btxsetinternal(bl and bl.references.internal or "")
if first then
ctx_btxsetfirst(first[key] or "") -- f_missing(first.tag))
local suffix = entry.suffix
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/publ-ini.mkiv
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/publ-ini.mkiv 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/publ-ini.mkiv 2023-05-06 22:03:57 UTC (rev 67034)
@@ -342,7 +342,7 @@
\newtoks\t_btx_cmd
\newbox \b_btx_cmd
-\t_btx_cmd{\global\setbox\b_btx_cmd\hpack{\clf_btxcmdstring}}
+\t_btx_cmd{\global\setbox\b_btx_cmd\hbox{\clf_btxcmdstring}} % no \hpack, otherwise prerolling --- doesn't work
\let\btxcmd\btxcommand
@@ -1143,7 +1143,7 @@
{\the\t_btx_reference_inject
\strc_lists_inject_direct % todo: make like \btx_list_reference_inject_now with { }
[\s!btx]%
- [\c!type=\s!btx]% \c!location=\v!none
+ [\c!type=\s!btx,\c!location=\v!here]%
[\ifx\currentbtxdataset\v!default\else\s!btxset=\currentbtxdataset,\fi%
\s!btxref=\currentbtxtag,%
%\ifx\currentbtxcombis \empty\else\s!btxcom={\currentbtxcombis},\fi%
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/regi-ini.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/regi-ini.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/regi-ini.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,11 +6,8 @@
license = "see context related readme files"
}
---[[ldx--
-<p>Regimes take care of converting the input characters into
-<l n='utf'/> sequences. The conversion tables are loaded at
-runtime.</p>
---ldx]]--
+-- Regimes take care of converting the input characters into UTF sequences. The
+-- conversion tables are loaded at runtime.
-- Todo: use regi-imp*.lua instead
@@ -30,9 +27,7 @@
local textlineactions = resolvers.openers.helpers.textlineactions
local setmetatableindex = table.setmetatableindex
---[[ldx--
-<p>We will hook regime handling code into the input methods.</p>
---ldx]]--
+-- We will hook regime handling code into the input methods.
local trace_translating = false trackers.register("regimes.translating", function(v) trace_translating = v end)
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/scrn-fld.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/scrn-fld.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/scrn-fld.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -183,7 +183,7 @@
}
implement {
- name = "doiffieldsetelse",
+ name = "doifelsefieldset",
arguments = "string",
actions = function(name)
ctx_doifelse(codeinjections.validfieldset(name))
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/scrn-fld.mkvi
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/scrn-fld.mkvi 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/scrn-fld.mkvi 2023-05-06 22:03:57 UTC (rev 67034)
@@ -275,7 +275,7 @@
%D A few testing macros:
-\def\doifelsefieldbody #tag{\clf_doifelsefield{#tag}}
+\def\doifelsefieldbody #tag{\clf_doifelsefieldset{#tag}}
\def\doifelsefieldcategory#tag{\clf_doifelsefieldcategory{#tag}}
\let\doiffieldbodyelse \doifelsefieldbody
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/sort-ini.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/sort-ini.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/sort-ini.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,50 +6,46 @@
license = "see context related readme files"
}
--- It took a while to get there, but with Fleetwood Mac's "Don't Stop"
--- playing in the background we sort of got it done.
+-- It took a while to get there, but with Fleetwood Mac's "Don't Stop" playing in
+-- the background we sort of got it done.
+--
+-- The code here evolved from the rather old mkii approach. There we concatinate the
+-- key and (raw) entry into a new string. Numbers and special characters get some
+-- treatment so that they sort ok. In addition some normalization (lowercasing,
+-- accent stripping) takes place and again data is appended ror prepended.
+-- Eventually these strings are sorted using a regular string sorter. The relative
+-- order of character is dealt with by weighting them. It took a while to figure
+-- this all out but eventually it worked ok for most languages, given that the right
+-- datatables were provided.
+--
+-- Here we do follow a similar approach but this time we don't append the
+-- manipulated keys and entries but create tables for each of them with entries
+-- being tables themselves having different properties. In these tables characters
+-- are represented by numbers and sorting takes place using these numbers. Strings
+-- are simplified using lowercasing as well as shape codes. Numbers are filtered and
+-- after getting an offset they end up at the right end of the spectrum (more clever
+-- parser will be added some day). There are definitely more solutions to the
+-- problem and it is a nice puzzle to solve.
+--
+-- In the future more methods can be added, as there is practically no limit to what
+-- goes into the tables. For that we will provide hooks.
+--
+-- Todo: decomposition with specific order of accents, this is relatively easy to
+-- do.
+--
+-- Todo: investigate what standards and conventions there are and see how they map
+-- onto this mechanism. I've learned that users can come up with any demand so
+-- nothing here is frozen.
+--
+-- Todo: I ran into the Unicode Collation document and noticed that there are some
+-- similarities (like the weights) but using that method would still demand extra
+-- code for language specifics. One option is to use the allkeys.txt file for the uc
+-- vectors but then we would also use the collapsed key (sq, code is now commented).
+-- In fact, we could just hook those into the replacer code that we reun beforehand.
+--
+-- In the future index entries will become more clever, i.e. they will have language
+-- etc properties that then can be used.
---[[<p>The code here evolved from the rather old mkii approach. There
-we concatinate the key and (raw) entry into a new string. Numbers and
-special characters get some treatment so that they sort ok. In
-addition some normalization (lowercasing, accent stripping) takes
-place and again data is appended ror prepended. Eventually these
-strings are sorted using a regular string sorter. The relative order
-of character is dealt with by weighting them. It took a while to
-figure this all out but eventually it worked ok for most languages,
-given that the right datatables were provided.</p>
-
-<p>Here we do follow a similar approach but this time we don't append
-the manipulated keys and entries but create tables for each of them
-with entries being tables themselves having different properties. In
-these tables characters are represented by numbers and sorting takes
-place using these numbers. Strings are simplified using lowercasing
-as well as shape codes. Numbers are filtered and after getting an offset
-they end up at the right end of the spectrum (more clever parser will
-be added some day). There are definitely more solutions to the problem
-and it is a nice puzzle to solve.</p>
-
-<p>In the future more methods can be added, as there is practically no
-limit to what goes into the tables. For that we will provide hooks.</p>
-
-<p>Todo: decomposition with specific order of accents, this is
-relatively easy to do.</p>
-
-<p>Todo: investigate what standards and conventions there are and see
-how they map onto this mechanism. I've learned that users can come up
-with any demand so nothing here is frozen.</p>
-
-<p>Todo: I ran into the Unicode Collation document and noticed that
-there are some similarities (like the weights) but using that method
-would still demand extra code for language specifics. One option is
-to use the allkeys.txt file for the uc vectors but then we would also
-use the collapsed key (sq, code is now commented). In fact, we could
-just hook those into the replacer code that we reun beforehand.</p>
-
-<p>In the future index entries will become more clever, i.e. they will
-have language etc properties that then can be used.</p>
-]]--
-
local gsub, find, rep, sub, sort, concat, tohash, format = string.gsub, string.find, string.rep, string.sub, table.sort, table.concat, table.tohash, string.format
local utfbyte, utfchar, utfcharacters = utf.byte, utf.char, utf.characters
local next, type, tonumber, rawget, rawset = next, type, tonumber, rawget, rawset
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/status-files.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/status-lua.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/syst-con.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/syst-con.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/syst-con.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -20,10 +20,9 @@
local formatters = string.formatters
---[[ldx--
-<p>For raw 8 bit characters, the offset is 0x110000 (bottom of plane 18) at
-the top of <l n='luatex'/>'s char range but outside the unicode range.</p>
---ldx]]--
+-- For raw 8 bit characters, the offset is 0x110000 (bottom of plane 18) at the top
+-- of LuaTeX's char range but outside the unicode range. This is no longer the case
+-- in LuaMetaTeX.
function converters.hexstringtonumber(n) tonumber(n,16) end
function converters.octstringtonumber(n) tonumber(n, 8) end
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkiv
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkiv 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkiv 2023-05-06 22:03:57 UTC (rev 67034)
@@ -253,6 +253,9 @@
\let\newfam\newfamily
+\let\newinteger \newcount % just in case
+\let\newdimension\newdimen % just in case
+
\firstvalidlanguage\plusone
% Watch out, for the moment we disable the check for already being defined
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.mkiv
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.mkiv 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.mkiv 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1551,7 +1551,8 @@
\fi}
\def\tabl_tabulate_vrule_reset_indeed
- {\dofastloopcs\c_tabl_tabulate_max_vrulecolumn\tabl_tabulate_vrule_reset_step
+ {\gletcsname\??tabulatevrule0\endcsname\undefined
+ \dofastloopcs\c_tabl_tabulate_max_vrulecolumn\tabl_tabulate_vrule_reset_step
\global\c_tabl_tabulate_max_vrulecolumn\zerocount}
\def\tabl_tabulate_vrule_reset_step % undefined or relax
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/toks-scn.mkiv
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/toks-scn.mkiv 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/toks-scn.mkiv 2023-05-06 22:03:57 UTC (rev 67034)
@@ -18,9 +18,6 @@
\registerctxluafile{toks-scn}{}
\registerctxluafile{cldf-scn}{}
\registerctxluafile{cldf-stp}{}
+%registerctxluafile{cldf-lmt}{}
-\ifcase \contextlmtxmode \else
- \registerctxluafile{cldf-lmt}{}
-\fi
-
\protect \endinput
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/trac-lmx.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/trac-lmx.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/trac-lmx.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,7 +6,8 @@
license = "see context related readme files"
}
--- this one will be adpated to the latest helpers
+-- This one will be adpated to the latest helpers. It might even become a
+-- module instead.
local type, tostring, rawget, loadstring, pcall = type, tostring, rawget, loadstring, pcall
local format, sub, gsub = string.format, string.sub, string.gsub
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/typo-duc.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/typo-duc.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/typo-duc.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -599,23 +599,23 @@
else -- only more efficient when we have es/cs
local runner = start + 2
if runner <= limit then
- local before = list[start]
- local entry = list[start + 1]
- local after = list[runner]
+ local before = list[start]
+ local current = list[start + 1]
+ local after = list[runner]
while after do
- local direction = entry.direction
+ local direction = current.direction
if direction == "es" then
if before.direction == "en" and after.direction == "en" then
- entry.direction = "en"
+ current.direction = "en"
end
elseif direction == "cs" then
local prevdirection = before.direction
if prevdirection == "en" then
if after.direction == "en" then
- entry.direction = "en"
+ current.direction = "en"
end
elseif prevdirection == "an" and after.direction == "an" then
- entry.direction = "an"
+ current.direction = "an"
end
end
before = current
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/util-dim.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/util-dim.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/util-dim.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,14 +6,10 @@
license = "see context related readme files"
}
---[[ldx--
-<p>Internally <l n='luatex'/> work with scaled point, which are
-represented by integers. However, in practice, at east at the
-<l n='tex'/> end we work with more generic units like points (pt). Going
-from scaled points (numbers) to one of those units can be
-done by using the conversion factors collected in the following
-table.</p>
---ldx]]--
+-- Internally LuaTeX work with scaled point, which are represented by integers.
+-- However, in practice, at east at the TeX end we work with more generic units like
+-- points (pt). Going from scaled points (numbers) to one of those units can be done
+-- by using the conversion factors collected in the following table.
local format, match, gsub, type, setmetatable = string.format, string.match, string.gsub, type, setmetatable
local P, S, R, Cc, C, lpegmatch = lpeg.P, lpeg.S, lpeg.R, lpeg.Cc, lpeg.C, lpeg.match
@@ -45,7 +41,9 @@
["dd"] = ( 1157/ 1238)/65536,
["cc"] = ( 1157/14856)/65536,
-- ["nd"] = (20320/21681)/65536,
- -- ["nc"] = ( 5080/65043)/65536
+ -- ["nc"] = ( 5080/65043)/65536,
+ ["es"] = ( 9176/ 129)/65536,
+ ["ts"] = ( 4588/ 645)/65536,
}
-- print(table.serialize(dimenfactors))
@@ -86,10 +84,8 @@
-- ["sp"]=1,
-- }
---[[ldx--
-<p>A conversion function that takes a number, unit (string) and optional
-format (string) is implemented using this table.</p>
---ldx]]--
+-- A conversion function that takes a number, unit (string) and optional format
+-- (string) is implemented using this table.
local f_none = formatters["%s%s"]
local f_true = formatters["%0.5F%s"]
@@ -110,9 +106,7 @@
end
end
---[[ldx--
-<p>We collect a bunch of converters in the <type>number</type> namespace.</p>
---ldx]]--
+-- We collect a bunch of converters in the 'number' namespace.
number.maxdimen = 1073741823
number.todimen = numbertodimen
@@ -122,7 +116,7 @@
function number.toinches (n,fmt) return numbertodimen(n,"in",fmt) end
function number.tocentimeters (n,fmt) return numbertodimen(n,"cm",fmt) end
function number.tomillimeters (n,fmt) return numbertodimen(n,"mm",fmt) end
-function number.toscaledpoints(n,fmt) return numbertodimen(n,"sp",fmt) end
+-------- number.toscaledpoints(n,fmt) return numbertodimen(n,"sp",fmt) end
function number.toscaledpoints(n) return n .. "sp" end
function number.tobasepoints (n,fmt) return numbertodimen(n,"bp",fmt) end
function number.topicas (n,fmt) return numbertodimen(n "pc",fmt) end
@@ -130,14 +124,13 @@
function number.tociceros (n,fmt) return numbertodimen(n,"cc",fmt) end
-------- number.tonewdidots (n,fmt) return numbertodimen(n,"nd",fmt) end
-------- number.tonewciceros (n,fmt) return numbertodimen(n,"nc",fmt) end
+function number.toediths (n,fmt) return numbertodimen(n,"es",fmt) end
+function number.totoves (n,fmt) return numbertodimen(n,"ts",fmt) end
---[[ldx--
-<p>More interesting it to implement a (sort of) dimen datatype, one
-that permits calculations too. First we define a function that
-converts a string to scaledpoints. We use <l n='lpeg'/>. We capture
-a number and optionally a unit. When no unit is given a constant
-capture takes place.</p>
---ldx]]--
+-- More interesting it to implement a (sort of) dimen datatype, one that permits
+-- calculations too. First we define a function that converts a string to
+-- scaledpoints. We use LPEG. We capture a number and optionally a unit. When no
+-- unit is given a constant capture takes place.
local amount = (S("+-")^0 * R("09")^0 * P(".")^0 * R("09")^0) + Cc("0")
local unit = R("az")^1 + P("%")
@@ -152,11 +145,8 @@
return lpegmatch(splitter,str)
end
---[[ldx--
-<p>We use a metatable to intercept errors. When no key is found in
-the table with factors, the metatable will be consulted for an
-alternative index function.</p>
---ldx]]--
+-- We use a metatable to intercept errors. When no key is found in the table with
+-- factors, the metatable will be consulted for an alternative index function.
setmetatableindex(dimenfactors, function(t,s)
-- error("wrong dimension: " .. (s or "?")) -- better a message
@@ -163,10 +153,8 @@
return false
end)
---[[ldx--
-<p>We redefine the following function later on, so we comment it
-here (which saves us bytecodes.</p>
---ldx]]--
+-- We redefine the following function later on, so we comment it here (which saves
+-- us bytecodes.
-- function string.todimen(str)
-- if type(str) == "number" then
@@ -182,44 +170,38 @@
local stringtodimen -- assigned later (commenting saves bytecode)
local amount = S("+-")^0 * R("09")^0 * S(".,")^0 * R("09")^0
-local unit = P("pt") + P("cm") + P("mm") + P("sp") + P("bp") + P("in") +
- P("pc") + P("dd") + P("cc") + P("nd") + P("nc")
+local unit = P("pt") + P("cm") + P("mm") + P("sp") + P("bp")
+ + P("es") + P("ts") + P("pc") + P("dd") + P("cc")
+ + P("in")
+ -- + P("nd") + P("nc")
local validdimen = amount * unit
lpeg.patterns.validdimen = validdimen
---[[ldx--
-<p>This converter accepts calls like:</p>
+-- This converter accepts calls like:
+--
+-- string.todimen("10")
+-- string.todimen(".10")
+-- string.todimen("10.0")
+-- string.todimen("10.0pt")
+-- string.todimen("10pt")
+-- string.todimen("10.0pt")
+--
+-- With this in place, we can now implement a proper datatype for dimensions, one
+-- that permits us to do this:
+--
+-- s = dimen "10pt" + dimen "20pt" + dimen "200pt"
+-- - dimen "100sp" / 10 + "20pt" + "0pt"
+--
+-- We create a local metatable for this new type:
-<typing>
-string.todimen("10")
-string.todimen(".10")
-string.todimen("10.0")
-string.todimen("10.0pt")
-string.todimen("10pt")
-string.todimen("10.0pt")
-</typing>
-
-<p>With this in place, we can now implement a proper datatype for dimensions, one
-that permits us to do this:</p>
-
-<typing>
-s = dimen "10pt" + dimen "20pt" + dimen "200pt"
- - dimen "100sp" / 10 + "20pt" + "0pt"
-</typing>
-
-<p>We create a local metatable for this new type:</p>
---ldx]]--
-
local dimensions = { }
---[[ldx--
-<p>The main (and globally) visible representation of a dimen is defined next: it is
-a one-element table. The unit that is returned from the match is normally a number
-(one of the previously defined factors) but we also accept functions. Later we will
-see why. This function is redefined later.</p>
---ldx]]--
+-- The main (and globally) visible representation of a dimen is defined next: it is
+-- a one-element table. The unit that is returned from the match is normally a
+-- number (one of the previously defined factors) but we also accept functions.
+-- Later we will see why. This function is redefined later.
-- function dimen(a)
-- if a then
@@ -241,11 +223,9 @@
-- end
-- end
---[[ldx--
-<p>This function return a small hash with a metatable attached. It is
-through this metatable that we can do the calculations. We could have
-shared some of the code but for reasons of speed we don't.</p>
---ldx]]--
+-- This function return a small hash with a metatable attached. It is through this
+-- metatable that we can do the calculations. We could have shared some of the code
+-- but for reasons of speed we don't.
function dimensions.__add(a, b)
local ta, tb = type(a), type(b)
@@ -281,21 +261,17 @@
return setmetatable({ - a }, dimensions)
end
---[[ldx--
-<p>It makes no sense to implement the power and modulo function but
-the next two do make sense because they permits is code like:</p>
+-- It makes no sense to implement the power and modulo function but
+-- the next two do make sense because they permits is code like:
+--
+-- local a, b = dimen "10pt", dimen "11pt"
+-- ...
+-- if a > b then
+-- ...
+-- end
+--
+-- This also makes no sense: dimensions.__pow and dimensions.__mod.
-<typing>
-local a, b = dimen "10pt", dimen "11pt"
-...
-if a > b then
- ...
-end
-</typing>
---ldx]]--
-
--- makes no sense: dimensions.__pow and dimensions.__mod
-
function dimensions.__lt(a, b)
return a[1] < b[1]
end
@@ -304,25 +280,18 @@
return a[1] == b[1]
end
---[[ldx--
-<p>We also need to provide a function for conversion to string (so that
-we can print dimensions). We print them as points, just like <l n='tex'/>.</p>
---ldx]]--
+-- We also need to provide a function for conversion to string (so that we can print
+-- dimensions). We print them as points, just like TeX.
function dimensions.__tostring(a)
return a[1]/65536 .. "pt" -- instead of todimen(a[1])
end
---[[ldx--
-<p>Since it does not take much code, we also provide a way to access
-a few accessors</p>
+-- Since it does not take much code, we also provide a way to access a few accessors
+--
+-- print(dimen().pt)
+-- print(dimen().sp)
-<typing>
-print(dimen().pt)
-print(dimen().sp)
-</typing>
---ldx]]--
-
function dimensions.__index(tab,key)
local d = dimenfactors[key]
if not d then
@@ -332,42 +301,35 @@
return 1/d
end
---[[ldx--
-<p>In the converter from string to dimension we support functions as
-factors. This is because in <l n='tex'/> we have a few more units:
-<type>ex</type> and <type>em</type>. These are not constant factors but
-depend on the current font. They are not defined by default, but need
-an explicit function call. This is because at the moment that this code
-is loaded, the relevant tables that hold the functions needed may not
-yet be available.</p>
---ldx]]--
+-- In the converter from string to dimension we support functions as factors. This
+-- is because in TeX we have a few more units: 'ex' and 'em'. These are not constant
+-- factors but depend on the current font. They are not defined by default, but need
+-- an explicit function call. This is because at the moment that this code is
+-- loaded, the relevant tables that hold the functions needed may not yet be
+-- available.
- dimenfactors["ex"] = 4 * 1/65536 -- 4pt
- dimenfactors["em"] = 10 * 1/65536 -- 10pt
--- dimenfactors["%"] = 4 * 1/65536 -- 400pt/100
+ dimenfactors["ex"] = 4 /65536 -- 4pt
+ dimenfactors["em"] = 10 /65536 -- 10pt
+-- dimenfactors["%"] = 4 /65536 -- 400pt/100
+ dimenfactors["eu"] = (9176/129)/65536 -- 1es
---[[ldx--
-<p>The previous code is rather efficient (also thanks to <l n='lpeg'/>) but we
-can speed it up by caching converted dimensions. On my machine (2008) the following
-loop takes about 25.5 seconds.</p>
+-- The previous code is rather efficient (also thanks to LPEG) but we can speed it
+-- up by caching converted dimensions. On my machine (2008) the following loop takes
+-- about 25.5 seconds.
+--
+-- for i=1,1000000 do
+-- local s = dimen "10pt" + dimen "20pt" + dimen "200pt"
+-- - dimen "100sp" / 10 + "20pt" + "0pt"
+-- end
+--
+-- When we cache converted strings this becomes 16.3 seconds. In order not to waste
+-- too much memory on it, we tag the values of the cache as being week which mean
+-- that the garbage collector will collect them in a next sweep. This means that in
+-- most cases the speed up is mostly affecting the current couple of calculations
+-- and as such the speed penalty is small.
+--
+-- We redefine two previous defined functions that can benefit from this:
-<typing>
-for i=1,1000000 do
- local s = dimen "10pt" + dimen "20pt" + dimen "200pt"
- - dimen "100sp" / 10 + "20pt" + "0pt"
-end
-</typing>
-
-<p>When we cache converted strings this becomes 16.3 seconds. In order not
-to waste too much memory on it, we tag the values of the cache as being
-week which mean that the garbage collector will collect them in a next
-sweep. This means that in most cases the speed up is mostly affecting the
-current couple of calculations and as such the speed penalty is small.</p>
-
-<p>We redefine two previous defined functions that can benefit from
-this:</p>
---ldx]]--
-
local known = { } setmetatable(known, { __mode = "v" })
function dimen(a)
@@ -436,15 +398,11 @@
return format("%0.5f",d/0x10000) -- 2^16
end
---[[ldx--
-<p>In a similar fashion we can define a glue datatype. In that case we
-probably use a hash instead of a one-element table.</p>
---ldx]]--
+-- In a similar fashion we can define a glue datatype. In that case we probably use
+-- a hash instead of a one-element table.
+--
+-- A goodie:
---[[ldx--
-<p>Goodie:s</p>
---ldx]]--
-
function number.percent(n,d) -- will be cleaned up once luatex 0.30 is out
d = d or texget("hsize")
if type(d) == "string" then
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/util-fmt.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/util-fmt.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/util-fmt.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -11,7 +11,7 @@
local formatters = utilities.formatters
local concat, format = table.concat, string.format
-local tostring, type = tostring, type
+local tostring, type, unpack = tostring, type, unpack
local strip = string.strip
local lpegmatch = lpeg.match
@@ -21,12 +21,15 @@
return lpegmatch(stripper,str)
end
-function formatters.formatcolumns(result,between)
+function formatters.formatcolumns(result,between,header)
if result and #result > 0 then
- between = between or " "
- local widths, numbers = { }, { }
- local first = result[1]
- local n = #first
+ local widths = { }
+ local numbers = { }
+ local templates = { }
+ local first = result[1]
+ local n = #first
+ between = between or " "
+ --
for i=1,n do
widths[i] = 0
end
@@ -35,13 +38,6 @@
for j=1,n do
local rj = r[j]
local tj = type(rj)
--- if tj == "number" then
--- numbers[j] = true
--- end
--- if tj ~= "string" then
--- rj = tostring(rj)
--- r[j] = rj
--- end
if tj == "number" then
numbers[j] = true
rj = tostring(rj)
@@ -55,29 +51,59 @@
end
end
end
+ if header then
+ for i=1,#header do
+ local h = header[i]
+ for j=1,n do
+ local hj = tostring(h[j])
+ h[j] = hj
+ local w = #hj
+ if w > widths[j] then
+ widths[j] = w
+ end
+ end
+ end
+ end
for i=1,n do
local w = widths[i]
if numbers[i] then
if w > 80 then
- widths[i] = "%s" .. between
- else
- widths[i] = "%0" .. w .. "i" .. between
+ templates[i] = "%s" .. between
+ else
+ templates[i] = "% " .. w .. "i" .. between
end
else
if w > 80 then
- widths[i] = "%s" .. between
- elseif w > 0 then
- widths[i] = "%-" .. w .. "s" .. between
+ templates[i] = "%s" .. between
+ elseif w > 0 then
+ templates[i] = "%-" .. w .. "s" .. between
else
- widths[i] = "%s"
+ templates[i] = "%s"
end
end
end
- local template = strip(concat(widths))
+ local template = strip(concat(templates))
for i=1,#result do
local str = format(template,unpack(result[i]))
result[i] = strip(str)
end
+ if header then
+ for i=1,n do
+ local w = widths[i]
+ if w > 80 then
+ templates[i] = "%s" .. between
+ elseif w > 0 then
+ templates[i] = "%-" .. w .. "s" .. between
+ else
+ templates[i] = "%s"
+ end
+ end
+ local template = strip(concat(templates))
+ for i=1,#header do
+ local str = format(template,unpack(header[i]))
+ header[i] = strip(str)
+ end
+ end
end
- return result
+ return result, header
end
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/util-prs.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/util-prs.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/util-prs.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -264,8 +264,13 @@
if not pattern then
local symbols = S(symbol)
local separator = space^0 * symbols * space^0
- local value = lbrace * C((nobrace + nestedbraces)^0) * rbrace
- + C((nestedbraces + (1-(space^0*(symbols+P(-1)))))^0)
+ local value =
+ lbrace
+ * C((nobrace + nestedbraces)^0)
+ -- * rbrace
+ * (rbrace * (#symbols + P(-1))) -- new per 2023-03-11
+ +
+ C((nestedbraces + (1-(space^0*(symbols+P(-1)))))^0)
if withaction then
local withvalue = Carg(1) * value / function(f,s) return f(s) end
pattern = spaces * withvalue * (separator*withvalue)^0
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/util-sac.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/util-sac.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/util-sac.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -551,14 +551,14 @@
local char = string.char
streams.tocardinal1 = char
- function streams.tocardinal2(n) return char(extract( 8,8),extract( 0,8)) end
- function streams.tocardinal3(n) return char(extract(16,8),extract( 8,8),extract(0,8)) end
- function streams.tocardinal4(n) return char(extract(24,8),extract(16,8),extract(8,8),extract(0,8)) end
+ function streams.tocardinal2(n) return char(extract(n, 8,8),extract(n, 0,8)) end
+ function streams.tocardinal3(n) return char(extract(n,16,8),extract(n, 8,8),extract(n,0,8)) end
+ function streams.tocardinal4(n) return char(extract(n,24,8),extract(n,16,8),extract(n,8,8),extract(n,0,8)) end
streams.tocardinal1le = char
- function streams.tocardinal2le(n) return char(extract(0,8),extract(8,8)) end
- function streams.tocardinal3le(n) return char(extract(0,8),extract(8,8),extract(16,8)) end
- function streams.tocardinal4le(n) return char(extract(0,8),extract(8,8),extract(16,8),extract(24,8)) end
+ function streams.tocardinal2le(n) return char(extract(n,0,8),extract(n,8,8)) end
+ function streams.tocardinal3le(n) return char(extract(n,0,8),extract(n,8,8),extract(n,16,8)) end
+ function streams.tocardinal4le(n) return char(extract(n,0,8),extract(n,8,8),extract(n,16,8),extract(n,24,8)) end
end
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/util-sbx.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/util-sbx.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/util-sbx.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -394,7 +394,7 @@
if trace then
report("resultof: %s",command)
end
- local handle = iopopen(command,"r") -- already has flush
+ local handle = iopopen(command,"rb") -- already has flush
if handle then
local result = handle:read("*all") or ""
handle:close()
Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/util-seq.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/util-seq.lua 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/util-seq.lua 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,15 +6,13 @@
license = "see context related readme files"
}
---[[ldx--
-<p>Here we implement a mechanism for chaining the special functions
-that we use in <l n="context"> to deal with mode list processing. We
-assume that namespaces for the functions are used, but for speed we
-use locals to refer to them when compiling the chain.</p>
---ldx]]--
-
+-- Here we implement a mechanism for chaining the special functions that we use in
+-- ConteXt to deal with mode list processing. We assume that namespaces for the
+-- functions are used, but for speed we use locals to refer to them when compiling
+-- the chain.
+--
-- todo: delayed: i.e. we register them in the right order already but delay usage
-
+--
-- todo: protect groups (as in tasks)
local gsub, gmatch = string.gsub, string.gmatch
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/anch-box.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/anch-box.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/anch-box.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -32,6 +32,11 @@
linecolor=\namedboxanchorcontentparameter{#1}{\c!rulecolor},
#2}
+\mutable\lettonothing\boxanchorone
+\mutable\lettonothing\boxanchortwo
+\mutable\lettonothing\boxanchorposone
+\mutable\lettonothing\boxanchorpostwo
+
\tolerant\permanent\protected\def\connectboxanchors[#1]#*[#2]#*[#3]#*[#4]#*#:#5#6%
{\begingroup
%
Added: trunk/Master/texmf-dist/tex/context/base/mkxl/attr-eff.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/attr-eff.lmt (rev 0)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/attr-eff.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,134 @@
+if not modules then modules = { } end modules ['attr-eff'] = {
+ version = 1.001,
+ comment = "companion to attr-eff.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local attributes, nodes, backends, utilities = attributes, nodes, backends, utilities
+local tex = tex
+
+local states = attributes.states
+local enableaction = nodes.tasks.enableaction
+local nodeinjections = backends.nodeinjections
+local texsetattribute = tex.setattribute
+local allocate = utilities.storage.allocate
+local setmetatableindex = table.setmetatableindex
+local formatters = string.formatters
+
+local interfaces = interfaces
+local implement = interfaces.implement
+
+local variables = interfaces.variables
+local v_normal = variables.normal
+
+attributes.effects = attributes.effects or { }
+local effects = attributes.effects
+
+local a_effect = attributes.private('effect')
+
+effects.data = allocate()
+effects.values = effects.values or { }
+effects.registered = effects.registered or { }
+effects.attribute = a_effect
+
+local data = effects.data
+local registered = effects.registered
+local values = effects.values
+
+local f_stamp = formatters["%s:%s:%s"]
+
+storage.register("attributes/effects/registered", registered, "attributes.effects.registered")
+storage.register("attributes/effects/values", values, "attributes.effects.values")
+
+-- valid effects: normal inner outer both hidden (stretch,rulethickness,effect)
+
+local function effect(...) effect = nodeinjections.effect return effect(...) end
+
+local function extender(effects,key)
+ if key == "none" then
+ local d = effect(0,0,0)
+ effects.none = d
+ return d
+ end
+end
+
+local function reviver(data,n)
+ local e = values[n] -- we could nil values[n] now but hardly needed
+ local d = effect(e[1],e[2],e[3])
+ data[n] = d
+ return d
+end
+
+setmetatableindex(effects, extender)
+setmetatableindex(effects.data, reviver)
+
+effects.handler = nodes.installattributehandler {
+ name = "effect",
+ namespace = effects,
+ initializer = states.initialize,
+ finalizer = states.finalize,
+ processor = states.process,
+}
+
+local function register(specification)
+ local alternative, stretch, rulethickness
+ if specification then
+ alternative = specification.alternative or v_normal
+ stretch = specification.stretch or 0
+ rulethickness = specification.rulethickness or 0
+ else
+ alternative = v_normal
+ stretch = 0
+ rulethickness = 0
+ end
+ local stamp = f_stamp(alternative,stretch,rulethickness)
+ local n = registered[stamp]
+ if not n then
+ n = #values + 1
+ values[n] = { alternative, stretch, rulethickness }
+ registered[stamp] = n
+ end
+ return n
+end
+
+local enabled = false
+
+local function enable()
+ if not enabled then
+ enableaction("shipouts","attributes.effects.handler")
+ enabled = true
+ end
+end
+
+effects.register = register
+effects.enable = enable
+
+-- interface
+
+implement {
+ name = "seteffect",
+ actions = function(specification)
+ if not enabled then
+ enable()
+ end
+ texsetattribute(a_effect,register(specification))
+ end,
+ arguments = {
+ {
+ { "alternative", "string" },
+ { "stretch", "integer" },
+ { "rulethickness", "dimen" }
+ }
+ }
+}
+
+implement {
+ name = "reseteffect",
+ actions = function()
+ if enabled then
+ texsetattribute(a_effect,register())
+ end
+ end
+}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/attr-eff.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/attr-eff.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/attr-eff.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Attribute Macros / Effects}
-\registerctxluafile{attr-eff}{}
+\registerctxluafile{attr-eff}{autosuffix}
\unprotect
@@ -22,7 +22,7 @@
\installcommandhandler \??effect {effect} \??effect
\setupeffect
- [\c!method=\v!none,
+ [\c!method=\v!none, % should become command or define or so
\c!stretch=\zerocount,
\c!rulethickness=\zeropoint,
\c!alternative=\v!normal]
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/attr-ini.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/attr-ini.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/attr-ini.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -10,10 +10,8 @@
local osexit = os.exit
local sortedhash = table.sortedhash
---[[ldx--
-<p>We start with a registration system for atributes so that we can use the
-symbolic names later on.</p>
---ldx]]--
+-- We start with a registration system for atributes so that we can use the symbolic
+-- names later on.
local nodes = nodes
local context = context
@@ -71,17 +69,13 @@
-- end
-- end
---[[ldx--
-<p>We reserve this one as we really want it to be always set (faster).</p>
---ldx]]--
+-- We reserve this one as we really want it to be always set (faster).
names[0], numbers["fontdynamic"] = "fontdynamic", 0
---[[ldx--
-<p>private attributes are used by the system and public ones are for users. We use dedicated
-ranges of numbers for them. Of course a the <l n='context'/> end a private attribute can be
-accessible too, so a private attribute can have a public appearance.</p>
---ldx]]--
+-- Private attributes are used by the system and public ones are for users. We use
+-- dedicated ranges of numbers for them. Of course a the TeX end a private attribute
+-- can be accessible too, so a private attribute can have a public appearance.
sharedstorage.attributes_last_private = sharedstorage.attributes_last_private or 15 -- very private
sharedstorage.attributes_last_public = sharedstorage.attributes_last_public or 1024 -- less private
Added: trunk/Master/texmf-dist/tex/context/base/mkxl/attr-mkr.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/attr-mkr.lmt (rev 0)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/attr-mkr.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,40 @@
+if not modules then modules = { } end modules ['attr-mkr'] = {
+ version = 1.001,
+ comment = "companion to attr-mkr.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local markers = nodes.markers or { }
+nodes.markers = markers
+
+local cache = { }
+local numbers = attributes.numbers
+local a_unknown = attributes.private("marker:unknown")
+
+local nuts = nodes.nuts
+local tonut = nodes.tonut
+local setattr = nuts.setattr
+local getattr = nuts.getattr
+
+table.setmetatableindex(cache,function(t,k)
+ local k = "marker:" .. k
+ local v = numbers[k] or a_unknown
+ t[k] = v
+ return v
+end)
+
+function markers.get(n,name)
+ local a = cache[name]
+ if a then
+ getattr(tonut(n),a)
+ end
+end
+
+function markers.set(n,name,v)
+ local a = cache[name]
+ if a then
+ setattr(tonut(n),a,v)
+ end
+end
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/attr-mkr.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/attr-mkr.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/attr-mkr.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -15,11 +15,12 @@
\unprotect
-\registerctxluafile{attr-mkr}{}
+\registerctxluafile{attr-mkr}{autosuffix}
\permanent \protected\def\definemarker [#1]{\defineattribute[\s!marker:#1]}
\permanent\tolerant\protected\def\setmarker [#1]#*[#2]{\dosetattribute{\s!marker:#1}{#2}}
\permanent \protected\def\resetmarker [#1]{\dogetattribute{\s!marker:#1}}
-\permanent \def\boxmarker #1#2{attr \numexpr\dogetattributeid{\s!marker:#1}\numexpr \numexpr#2\relax}
+\permanent \def\boxmarker #1#2{attr \numexpr\dogetattributeid{\s!marker:#1}\relax \numexpr#2\relax}
+\permanent \protected\def\marker #1{\numexpr\dogetattributeid{\s!marker:#1}\relax}
\protect \endinput
Added: trunk/Master/texmf-dist/tex/context/base/mkxl/attr-neg.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/attr-neg.lmt (rev 0)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/attr-neg.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,104 @@
+if not modules then modules = { } end modules ['attr-neg'] = {
+ version = 1.001,
+ comment = "companion to attr-neg.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- this module is being reconstructed and code will move to other places
+-- we can also do the nsnone via a metatable and then also se index 0
+
+local format = string.format
+
+local attributes, nodes, utilities, logs, backends = attributes, nodes, utilities, logs, backends
+local commands, context, interfaces = commands, context, interfaces
+local tex = tex
+
+local states = attributes.states
+local enableaction = nodes.tasks.enableaction
+local nodeinjections = backends.nodeinjections
+local texsetattribute = tex.setattribute
+local variables = interfaces.variables
+local allocate = utilities.storage.allocate
+local setmetatableindex = table.setmetatableindex
+
+--- negative / positive
+
+attributes.negatives = attributes.negatives or { }
+local negatives = attributes.negatives
+
+local a_negative = attributes.private("negative")
+
+local v_none = interfaces.variables.none
+
+negatives.data = allocate()
+negatives.attribute = a_negative
+
+negatives.registered = allocate {
+ [variables.positive] = 1,
+ [variables.negative] = 2,
+}
+
+local data = negatives.data
+local registered = negatives.registered
+
+local function extender(negatives,key)
+ if key == "none" then -- v_none then
+ local d = data[1]
+ negatives.none = d
+ return d
+ end
+end
+
+local function reviver(data,n)
+ if n == 1 then
+ local d = nodeinjections.positive() -- called once
+ data[1] = d
+ return d
+ elseif n == 2 then
+ local d = nodeinjections.negative() -- called once
+ data[2] = d
+ return d
+ end
+end
+
+setmetatableindex(negatives, extender)
+setmetatableindex(negatives.data, reviver)
+
+negatives.handler = nodes.installattributehandler {
+ name = "negative",
+ namespace = negatives,
+ initializer = states.initialize,
+ finalizer = states.finalize,
+ processor = states.process,
+}
+
+local function register(stamp)
+ return registered[stamp] or registered.positive
+end
+
+local function enable()
+ enableaction("shipouts","attributes.negatives.handler")
+end
+
+negatives.register = register
+negatives.enable = enable
+
+-- interface
+
+local enabled = false
+
+function negatives.set(stamp)
+ if not enabled then
+ enable()
+ enabled = true
+ end
+ texsetattribute(a_negative,register(stamp))
+end
+
+interfaces.implement {
+ name = "setnegative",
+ actions = negatives.set,
+ arguments = "argument",
+}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/attr-neg.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/attr-neg.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/attr-neg.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -13,16 +13,19 @@
\writestatus{loading}{ConTeXt Attribute Macros / Negation}
-\registerctxluafile{attr-neg}{}
+\registerctxluafile{attr-neg}{autosuffix}
\unprotect
+%D This feature is kind of useless because only \ACROBAT\ seems to support it and
+%D even rather complete mupdf based viewers seem to ignore it.
+
% positive and negative are preregistered
-\permanent\protected\def\startnegative{\clf_setnegative{\v!negative}}
-\permanent\protected\def\stopnegative {\clf_setnegative{\v!positive}}
+\permanent\protected\def\startnegative{\clf_setnegative\v!negative}
+\permanent\protected\def\stopnegative {\clf_setnegative\v!positive}
-\permanent\protected\def\startpositive{\clf_setnegative{\v!positive}}
-\permanent\protected\def\stoppositive {\clf_setnegative{\v!negative}}
+\permanent\protected\def\startpositive{\clf_setnegative\v!positive}
+\permanent\protected\def\stoppositive {\clf_setnegative\v!negative}
\protect \endinput
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/catc-ini.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/catc-ini.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/catc-ini.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -236,8 +236,10 @@
%\letcsname\Uchar"FFFF\Uchar\expandafter`\string#1\endcsname\m_active
\letcsname\csactive#1\endcsname\m_active}
+\mutable\integerdef\c_active_char_code\zerocount
+
\permanent\protected\def\pushactivecharcode{\afterassignment\syst_active_push\integerdef\c_active_char_code}
-\permanent\protected\def\popactivecharcode {\afterassignment\syst_active_pop\integerdef \c_active_char_code}
+\permanent\protected\def\popactivecharcode {\afterassignment\syst_active_pop \integerdef\c_active_char_code}
\permanent\protected\def\syst_active_push
{\expandafter\let\expandafter\m_active\csname\csactive\Uchar\c_active_char_code\endcsname
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/char-tex.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/char-tex.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/char-tex.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -23,6 +23,8 @@
local context = context
local commands = commands
+if not characters then require("char-ini") require("char-utf") end
+
local characters = characters
local texcharacters = { }
characters.tex = texcharacters
@@ -44,18 +46,15 @@
local report_defining = logs.reporter("characters")
---[[ldx--
-<p>In order to deal with 8-bit output, we need to find a way to go from <l n='utf'/> to
-8-bit. This is handled in the <l n='luatex'/> engine itself.</p>
+-- In order to deal with 8-bit output, we need to find a way to go from UTF to
+-- 8-bit. This is handled in the 32 bit engine itself. This leaves us problems with
+-- characters that are specific to TeX, like curly braces and dollars. We can remap
+-- some chars that tex input files are sensitive for to a private area (while
+-- writing to a utility file) and revert then to their original slot when we read in
+-- such a file. Instead of reverting, we can (when we resolve characters to glyphs)
+-- map them to their right glyph there. For this purpose we can use the private
+-- planes 0x0F0000 and 0x100000.
-<p>This leaves us problems with characters that are specific to <l n='tex'/> like
-<type>{}</type>, <type>$</type> and alike. We can remap some chars that tex input files
-are sensitive for to a private area (while writing to a utility file) and revert then
-to their original slot when we read in such a file. Instead of reverting, we can (when
-we resolve characters to glyphs) map them to their right glyph there. For this purpose
-we can use the private planes 0x0F0000 and 0x100000.</p>
---ldx]]--
-
local low = allocate()
local high = allocate()
local escapes = allocate()
@@ -104,21 +103,6 @@
private.replace = utf.remapper(low) -- maybe: ,"dynamic"
private.revert = utf.remapper(high) -- maybe: ,"dynamic"
---[[ldx--
-<p>We get a more efficient variant of this when we integrate
-replacements in collapser. This more or less renders the previous
-private code redundant. The following code is equivalent but the
-first snippet uses the relocated dollars.</p>
-
-<typing>
-[x] [$x$]
-</typing>
---ldx]]--
-
--- using the tree-lpeg-mapper would be nice but we also need to deal with end-of-string
--- cases: "\"\i" and don't want "\relax" to be seen as \r e lax" (for which we need to mess
--- with spaces
-
local accentmapping = allocate {
['"'] = { [""] = "¨",
A = "Ä", a = "ä",
@@ -286,12 +270,12 @@
texcharacters.commandmapping = commandmapping
-local ligaturemapping = allocate {
- ["''"] = "”",
- ["``"] = "“",
- ["--"] = "–",
- ["---"] = "—",
-}
+-- local ligaturemapping = allocate {
+-- ["''"] = "”",
+-- ["``"] = "“",
+-- ["--"] = "–",
+-- ["---"] = "—",
+-- }
-- Older accent handling code can be found in char-def.lua but in the meantime
-- we moved on. First the one with commands:
@@ -319,9 +303,9 @@
hash["{\\"..k.."}"] = v
hash["{\\"..k.." }"] = v
end
- for k, v in next, ligaturemapping do
- hash[k] = v
- end
+ -- for k, v in next, ligaturemapping do
+ -- hash[k] = v
+ -- end
untex = utfchartabletopattern(hash) / hash
end
return untex
@@ -374,9 +358,9 @@
for k, v in next, commandmapping do
hash[k] = v
end
- for k, v in next, ligaturemapping do
- hash[k] = v
- end
+ -- for k, v in next, ligaturemapping do
+ -- hash[k] = v
+ -- end
untex = utfchartabletopattern(hash) / hash
end
return untex
@@ -401,7 +385,7 @@
local implement = interfaces.implement
-local pattern
+local pattern1, pattern2
local verbosemarks = characters.verbosemarks
@@ -418,6 +402,7 @@
["grave"] = utfchar(0x300),
["acute"] = utfchar(0x301),
["circumflex"] = utfchar(0x302),
+ ["circumflex"] = utfchar(0x302),
["tilde"] = utfchar(0x303),
["macron"] = utfchar(0x304), ["line"] = utfchar(0x304),
["overline"] = utfchar(0x305),
@@ -442,6 +427,7 @@
["macron below"] = utfchar(0x331), ["line below"] = utfchar(0x331),
["hook below"] = utfchar(0x1FA9D),
+
}
characters.verbosemarks = verbosemarks
@@ -452,38 +438,56 @@
end
-local function prepare()
- pattern = Cs((utfchartabletopattern(verbosemarks) / verbosemarks + lpegpatterns.space/"" + lpegpatterns.utf8character)^0)
- return pattern
+local function prepare1()
+ pattern1 = Cs(
+ (
+P("\\")/"" * (utfchartabletopattern(commandmapping) / commandmapping) * (P(" ")/"")
++ utfchartabletopattern(verbosemarks) / verbosemarks
+ + lpegpatterns.space/""
+ + lpegpatterns.utf8character
+ )^0
+ )
+ return pattern1
end
+local function prepare2()
+ local back = {
+ ["ı"] = "i",
+ ["ȷ"] = "j",
+ }
+ pattern2 = Cs(
+ (
+ utfchartabletopattern(back) / back
+ + lpegpatterns.utf8character
+ )^0
+ )
+ return pattern2
+end
+
local hash = table.setmetatableindex(function(t,k)
- local f = ""
- k = lpegmatch(pattern or prepare(),k) or k
+ local f = k
+ k = lpegmatch(pattern1 or prepare1(),k) or k
+ k = lpegmatch(pattern2 or prepare2(),k) or k
local v = collapse(k) or k -- char specials
--- print("collapse",k,v)
if k ~= v then
goto DONE
end
v = combine(k) or k -- with specials
--- print("combine",k,v)
if k ~= v then
goto DONE
end
v = commandmapping[k] or k
--- print("command",k,v)
if k ~= v then
- f = "\\"
+ f = "\\" .. f
goto DONE
end
v = textoutf(k) or k
--- print("utf",k,v)
if k ~= v then
- f = "\\"
+ f = "\\" .. f
goto DONE
end
::DONE::
- report_defining("instead of old school '%s%s' you can input the utf sequence %s",f,k,v)
+ report_defining("instead of old school '%s' you can input the utf sequence %s",f,v)
t[k] = v
return v
end)
@@ -490,10 +494,12 @@
implement {
name = "chr",
- arguments = "argument",
+ -- arguments = "argument", -- not here
+ arguments = "string",
public = true,
actions = function(str)
- context(hash[str]) -- expandable
+ local hsh = hash[str]
+ context(hsh) -- expandable
end
}
@@ -556,10 +562,8 @@
actions = texcharacters.defineaccents
}
---[[ldx--
-<p>Instead of using a <l n='tex'/> file to define the named glyphs, we
-use the table. After all, we have this information available anyway.</p>
---ldx]]--
+-- Instead of using a TeX file to define the named glyphs, we use the table. After
+-- all, we have this information available anyway.
local function to_number(s)
local n = tonumber(s)
@@ -854,10 +858,6 @@
tex.catcodetable = saved
end
---[[ldx--
-<p>Setting the lccodes is also done in a loop over the data table.</p>
---ldx]]--
-
implement {
name = "chardescription",
arguments = "integer",
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/cldf-ini.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/cldf-ini.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/cldf-ini.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1,5 +1,5 @@
%D \module
-%D [ file=cldf-int,
+%D [ file=cldf-ini,
%D version=2019.01.01,
%D title=\CONTEXT\ Data Macros,
%D subtitle=Integer,
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/cldf-lmt.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/cldf-lmt.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/cldf-lmt.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1008,6 +1008,7 @@
return integer_code, code[n]
else
local v = scaninteger(true)
+ -- local v = scancardinal(true)
-- if isglobal(what) then
if what and (tonumber(what) & global_code) then
setsparse(code,"global",n,v)
Added: trunk/Master/texmf-dist/tex/context/base/mkxl/cldf-pos.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/cldf-pos.lmt (rev 0)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/cldf-pos.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,187 @@
+if not modules then modules = { } end modules ['cldf-pos'] = {
+ version = 1.001,
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- https://cse512-19s.github.io/FP-Well-Rounded/
+
+local tostring, load, type, tonumber = tostring, load, type, tonumber
+local lpegmatch = lpeg.match
+local context = context
+
+local setmetatableindex = table.setmetatableindex
+
+local implement = interfaces.implement
+
+local fromposit = posit.fromposit
+local toposit = posit.toposit
+local posittonumber = posit.tonumber
+
+local values = tokens.values
+local boolean_code = values.boolean
+local float_code = values.float
+
+local scanners = tokens.scanners
+local scanposit = scanners.posit
+local scanfloat = scanners.float
+local scaninteger = scanners.integer
+local scancsname = scanners.csname
+
+do -- these are only for testing and might go to a module eventually
+
+ local codes = tex.codes
+
+ local global_code = tex.flagcodes.global
+
+ local savelua = token.savelua
+ ----- isdefined = token.isdefined
+
+ local newsparse = sparse.new
+ local setsparse = sparse.set
+ ----- wipesparse = sparse.wipe
+ local restoresparse = sparse.restore
+
+ local registerfunction = context.functions.register
+
+ implement {
+ name = "positunumdef",
+ public = true,
+ untraced = true,
+ protected = true,
+ actions = function(what)
+ local name = scancsname(true)
+ local code = newsparse()
+ local restore = registerfunction(function() restoresparse(code) end)
+ implement {
+ name = name,
+ public = true,
+ protected = true,
+ usage = "value",
+ actions = function(what)
+ local n = scaninteger()
+ if what == "value" then
+ local v = fromposit(code[n])
+ -- return float_code, v
+ context("%.99g",v)
+ else
+ local v = toposit(scanfloat())
+ if what and (tonumber(what) & global_code) then
+ setsparse(code,"global",n,v)
+ else
+ savelua(restore,true) -- only once
+ setsparse(code,n,v)
+ end
+ end
+ end,
+ }
+ codes[name] = code
+ end,
+ }
+
+ do
+
+ local p_number = lpeg.patterns.number
+ local p = lpeg.Cs(
+ lpeg.Cc("local new = new ; return ")
+ * (
+ lpeg.C(p_number) / function(s)
+ return "new(" .. s .. ")"
+ end
+ + lpeg.P(1)
+ )^0
+ )
+
+ local t = setmetatableindex({ new = posit.new }, posit)
+
+ local function calculate(s)
+ local new = lpegmatch(p,s)
+ new = load(new,nil,nil,t)
+ if new then
+ new = new()
+ if new then
+ return new
+ end
+ end
+ return old
+ end
+
+ implement {
+ name = "positunum",
+ public = true,
+ arguments = "string",
+ actions = function(s)
+ local r = calculate(s)
+ local t = type(r)
+ if t == "boolean" then
+ context(tostring(r))
+ elseif t == "string" then
+ context(r)
+ else
+ context("%N",posittonumber(r))
+ end
+ end
+ }
+
+ implement {
+ name = "ifpositunum",
+ public = true,
+ usage = "condition",
+ arguments = "string",
+ actions = function(s)
+ return boolean_code, calculate(s) and true or false
+ end,
+ }
+
+ end
+
+end
+
+do
+
+ local xsin = xmath.sin local xasin = xmath.asin local xsinh = xmath.sinh local xasinh = xmath.asinh
+ local xcos = xmath.cos local xacos = xmath.acos local xcosh = xmath.cosh local xacosh = xmath.acosh
+ local xtan = xmath.tan local xatan = xmath.atan local xtanh = xmath.tanh local xatanh = xmath.atanh
+
+ local xsqrt = xmath.sqrt
+ local xlog = xmath.log
+ local xexp = xmath.exp
+ local xpow = xmath.pow
+ local xceil = xmath.ceil
+ local xfloor = xmath.floor
+ local xround = xmath.round
+ local xabs = xmath.fabs
+ local xmod = xmath.fmod
+ local xrem = xmath.remainder
+ local xrad = xmath.rad
+ local xdeg = xmath.deg
+ local xatan2 = xmath.atan2
+
+ implement { name = "pfsin", public = true, usage = "value", actions = function() return float_code, xsin (scanposit(true)) end }
+ implement { name = "pfcos", public = true, usage = "value", actions = function() return float_code, xcos (scanposit(true)) end }
+ implement { name = "pftan", public = true, usage = "value", actions = function() return float_code, xtan (scanposit(true)) end }
+ implement { name = "pfasin", public = true, usage = "value", actions = function() return float_code, xasin (scanposit(true)) end }
+ implement { name = "pfacos", public = true, usage = "value", actions = function() return float_code, xacos (scanposit(true)) end }
+ implement { name = "pfatan", public = true, usage = "value", actions = function() return float_code, xatan (scanposit(true)) end }
+ implement { name = "pfsinh", public = true, usage = "value", actions = function() return float_code, xsinh (scanposit(true)) end }
+ implement { name = "pfcosh", public = true, usage = "value", actions = function() return float_code, xcosh (scanposit(true)) end }
+ implement { name = "pftanh", public = true, usage = "value", actions = function() return float_code, xtanh (scanposit(true)) end }
+ implement { name = "pfasinh", public = true, usage = "value", actions = function() return float_code, xasinh(scanposit(true)) end }
+ implement { name = "pfacosh", public = true, usage = "value", actions = function() return float_code, xacosh(scanposit(true)) end }
+ implement { name = "pfatanh", public = true, usage = "value", actions = function() return float_code, xatanh(scanposit(true)) end }
+ implement { name = "pfsqrt", public = true, usage = "value", actions = function() return float_code, xsqrt (scanposit(true)) end }
+ implement { name = "pflog", public = true, usage = "value", actions = function() return float_code, xlog (scanposit(true)) end }
+ implement { name = "pfexp", public = true, usage = "value", actions = function() return float_code, xexp (scanposit(true)) end }
+ implement { name = "pfceil", public = true, usage = "value", actions = function() return float_code, xceil (scanposit(true)) end }
+ implement { name = "pffloor", public = true, usage = "value", actions = function() return float_code, xfloor(scanposit(true)) end }
+ implement { name = "pfround", public = true, usage = "value", actions = function() return float_code, xround(scanposit(true)) end }
+ implement { name = "pfabs", public = true, usage = "value", actions = function() return float_code, xabs (scanposit(true)) end }
+ implement { name = "pfrad", public = true, usage = "value", actions = function() return float_code, xrad (scanposit(true)) end }
+ implement { name = "pfdeg", public = true, usage = "value", actions = function() return float_code, xdeg (scanposit(true)) end }
+ implement { name = "pfatantwo", public = true, usage = "value", actions = function() return float_code, xatan2(scanposit(true),scanposit(true)) end }
+ implement { name = "pfpow", public = true, usage = "value", actions = function() return float_code, xpow (scanposit(true),scanposit(true)) end }
+ implement { name = "pfmod", public = true, usage = "value", actions = function() return float_code, xmod (scanposit(true),scanposit(true)) end }
+ implement { name = "pfrem", public = true, usage = "value", actions = function() return float_code, xrem (scanposit(true),scanposit(true)) end }
+
+end
Added: trunk/Master/texmf-dist/tex/context/base/mkxl/cldf-pos.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/cldf-pos.mkxl (rev 0)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/cldf-pos.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,36 @@
+%D \module
+%D [ file=cldf-pos,
+%D version=2023.04.21,
+%D title=\CONTEXT\ Data Macros,
+%D subtitle=Posit,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Posit Numbers / Initialization}
+
+\registerctxluafile{cldf-pos}{autosuffix}
+
+\newposit\pfpi \pfpi 3.1415926535897932384626433832795028841971
+\newposit\pftwopi \pftwopi \floatexpr \pfpi * 2 \relax
+
+% \newfloat\fooA
+%
+% \scratchdimen=123.456pt\relax [\type{dim:} \the\scratchdimen==123.456pt]\par
+% \fooA =123.456\relax [\type{pos:} \the\fooA ==123.456] \par
+% \fooA =\scratchdimen\relax [\type{pos:} \the\fooA ==123.456] \par
+% \scratchdimen=\fooA\relax [\type{dim:} \the\scratchdimen==123.456pt]\par
+% \scratchdimen\dimexpr\fooA+10pt\relax[\type{dim:} \the\scratchdimen==133.456pt]\par
+%
+% \fooA\pfsin \pfpi [\the\fooA]\par
+% \fooA\pfcos \pfpi [\the\fooA]\par
+% \fooA\pfsqrt\pfpi [\the\fooA]\par
+% \fooA\pfexp \pfpi [\the\fooA]\par
+% \fooA\pflog \pfpi [\the\fooA]\par
+% \fooA\pfpow \pfpi 2 [\the\fooA]\par
+
+\endinput
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/cont-new.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/cont-new.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/cont-new.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2023.03.10 12:15}
+\newcontextversion{2023.05.05 18:36}
%D This file is loaded at runtime, thereby providing an excellent place for hacks,
%D patches, extensions and new features. There can be local overloads in cont-loc
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/context.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/context.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/context.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -29,7 +29,7 @@
%D {YYYY.MM.DD HH:MM} format.
\immutable\edef\contextformat {\jobname}
-\immutable\edef\contextversion{2023.03.10 12:15}
+\immutable\edef\contextversion{2023.05.05 18:36}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
@@ -104,6 +104,7 @@
\loadmkxlfile{luat-ini}
\loadmkxlfile{toks-scn}
+\loadmkxlfile{cldf-pos}
\loadmkxlfile{syst-aux}
\loadmkxlfile{syst-lua}
@@ -162,7 +163,7 @@
\loadmkxlfile{node-fin}
\loadmkxlfile{node-mig}
-%loadmkxlfile{node-pag}
+\loadmkxlfile{node-pag}
\loadmkxlfile{driv-ini} % after node-ini (ext)
@@ -215,8 +216,9 @@
\loadmkxlfile{unic-ini}
-\loadmkxlfile{core-two}
+%loadmkxlfile{core-two} % retired, not in testsuite, not on garden, not in styles
\loadmkxlfile{core-dat}
+\loadmkxlfile{core-pag}
\loadmkxlfile{colo-ini}
\loadmkxlfile{colo-nod}
@@ -647,30 +649,26 @@
% we will definitely freeze mkiv and then use lmt files for futher development
% of lmtx. We also no longer use the macro feature to replace 5.3 compatible
% function calls by native 5.4 features as lmt files assume 5.4 anyway. This
-% makes format generation a little faster (not that it's that slow). It might \
+% makes format generation a little faster (not that it's that slow). It might
% take a while before we dealt with all of them because I'll also clean them
-% up a bit when doing.
+% up a bit when doing. Some will probably always be shared, like char-def.lua.
%
-% % luat-bas.mkxl l-macro-imp-optimize % this will go away
+% % luat-bas.mkxl l-macro-imp-optimize % this is no longer used
-% c:/data/develop/context/sources/attr-eff.lua
-% c:/data/develop/context/sources/attr-mkr.lua
-% c:/data/develop/context/sources/attr-neg.lua
-
-% c:/data/develop/context/sources/buff-imp-default.lua
-% c:/data/develop/context/sources/buff-imp-escaped.lua
-% c:/data/develop/context/sources/buff-imp-lua.lua
-% c:/data/develop/context/sources/buff-imp-mp.lua
-% c:/data/develop/context/sources/buff-imp-nested.lua
-% c:/data/develop/context/sources/buff-imp-parsed-xml.lua
-% c:/data/develop/context/sources/buff-imp-tex.lua
-% c:/data/develop/context/sources/buff-imp-xml.lua
-
% c:/data/develop/context/sources/buff-par.lua
% c:/data/develop/context/sources/buff-ver.lua
+%
+% c:/data/develop/context/sources/buff-imp-default.lua % shared
+% c:/data/develop/context/sources/buff-imp-escaped.lua % shared
+% c:/data/develop/context/sources/buff-imp-lua.lua % shared
+% c:/data/develop/context/sources/buff-imp-mp.lua % shared
+% c:/data/develop/context/sources/buff-imp-nested.lua % shared
+% c:/data/develop/context/sources/buff-imp-parsed-xml.lua % shared
+% c:/data/develop/context/sources/buff-imp-tex.lua % shared
+% c:/data/develop/context/sources/buff-imp-xml.lua % shared
% c:/data/develop/context/sources/char-cjk.lua
-% c:/data/develop/context/sources/char-def.lua
+% c:/data/develop/context/sources/char-def.lua % shared data file, a real big one
% c:/data/develop/context/sources/char-enc.lua
% c:/data/develop/context/sources/char-ent.lua
% c:/data/develop/context/sources/char-fio.lua
@@ -684,7 +682,7 @@
% c:/data/develop/context/sources/cldf-com.lua
% c:/data/develop/context/sources/cldf-ini.lua
-% c:/data/develop/context/sources/cldf-prs.lua % use in chemistry
+% c:/data/develop/context/sources/cldf-prs.lua % used in chemistry
% c:/data/develop/context/sources/cldf-scn.lua
% c:/data/develop/context/sources/cldf-stp.lua
% c:/data/develop/context/sources/cldf-ver.lua
@@ -694,8 +692,6 @@
% c:/data/develop/context/sources/core-con.lua
% c:/data/develop/context/sources/core-ctx.lua
-% c:/data/develop/context/sources/core-dat.lua
-% c:/data/develop/context/sources/core-two.lua
% data...
@@ -704,7 +700,7 @@
% c:/data/develop/context/sources/file-res.lua
% c:/data/develop/context/sources/font-afk.lua
-% c:/data/develop/context/sources/font-agl.lua
+% c:/data/develop/context/sources/font-agl.lua % shared data file
% c:/data/develop/context/sources/font-aux.lua
% c:/data/develop/context/sources/font-cid.lua
% c:/data/develop/context/sources/font-enc.lua
@@ -728,16 +724,16 @@
% c:/data/develop/context/sources/font-trt.lua
% c:/data/develop/context/sources/font-web.lua % proof of concept, never used
-% c:/data/develop/context/sources/font-imp-combining.lua % shared, like typescript
-% c:/data/develop/context/sources/font-imp-dimensions.lua % idem
-% c:/data/develop/context/sources/font-imp-italics.lua % idem
-% c:/data/develop/context/sources/font-imp-notused.lua % idem
-% c:/data/develop/context/sources/font-imp-properties.lua % idem
-% c:/data/develop/context/sources/font-imp-reorder.lua % idem
-% c:/data/develop/context/sources/font-imp-spacekerns.lua % idem
-% c:/data/develop/context/sources/font-imp-tex.lua % idem
-% c:/data/develop/context/sources/font-imp-tweaks.lua % idem
-% c:/data/develop/context/sources/font-imp-unicode.lua % idem
+% c:/data/develop/context/sources/font-imp-combining.lua % shared
+% c:/data/develop/context/sources/font-imp-dimensions.lua % shared
+% c:/data/develop/context/sources/font-imp-italics.lua % shared
+% c:/data/develop/context/sources/font-imp-notused.lua % shared
+% c:/data/develop/context/sources/font-imp-properties.lua % shared
+% c:/data/develop/context/sources/font-imp-reorder.lua % shared
+% c:/data/develop/context/sources/font-imp-spacekerns.lua % shared
+% c:/data/develop/context/sources/font-imp-tex.lua % shared
+% c:/data/develop/context/sources/font-imp-tweaks.lua % shared
+% c:/data/develop/context/sources/font-imp-unicode.lua % shared
% c:/data/develop/context/sources/good-ctx.lua
% c:/data/develop/context/sources/good-ini.lua
@@ -753,9 +749,9 @@
% c:/data/develop/context/sources/java-ini.lua
-% c:/data/develop/context/sources/lang-cnt.lua
-% c:/data/develop/context/sources/lang-def.lua % these are data files
-% c:/data/develop/context/sources/lang-txt.lua % these are data files
+% c:/data/develop/context/sources/lang-cnt.lua % shared data file
+% c:/data/develop/context/sources/lang-def.lua % shared data file
+% c:/data/develop/context/sources/lang-txt.lua % shared data file
% c:/data/develop/context/sources/lang-wrd.lua
% c:/data/develop/context/sources/luat-exe.lua
@@ -762,17 +758,17 @@
% c:/data/develop/context/sources/luat-iop.lua
% c:/data/develop/context/sources/luat-mac.lua % will become lmt
-% c:/data/develop/context/sources/lxml-aux.lua
-% c:/data/develop/context/sources/lxml-css.lua
-% c:/data/develop/context/sources/lxml-dir.lua
-% c:/data/develop/context/sources/lxml-ent.lua
-% c:/data/develop/context/sources/lxml-ini.lua
-% c:/data/develop/context/sources/lxml-lpt.lua
-% c:/data/develop/context/sources/lxml-mis.lua
-% c:/data/develop/context/sources/lxml-sor.lua
-% c:/data/develop/context/sources/lxml-tab.lua
-% c:/data/develop/context/sources/lxml-tex.lua
-% c:/data/develop/context/sources/lxml-xml.lua
+% c:/data/develop/context/sources/lxml-aux.lua % the xml interfcace is rather stable
+% c:/data/develop/context/sources/lxml-css.lua % and is also provided/used in lua so
+% c:/data/develop/context/sources/lxml-dir.lua % might as well share these because they
+% c:/data/develop/context/sources/lxml-ent.lua % are unlikely to change
+% c:/data/develop/context/sources/lxml-ini.lua %
+% c:/data/develop/context/sources/lxml-lpt.lua %
+% c:/data/develop/context/sources/lxml-mis.lua %
+% c:/data/develop/context/sources/lxml-sor.lua %
+% c:/data/develop/context/sources/lxml-tab.lua %
+% c:/data/develop/context/sources/lxml-tex.lua %
+% c:/data/develop/context/sources/lxml-xml.lua %
% c:/data/develop/context/sources/meta-blb.lua
% c:/data/develop/context/sources/meta-fun.lua
@@ -791,19 +787,17 @@
% c:/data/develop/context/sources/page-mix.lua
% c:/data/develop/context/sources/page-pst.lua
-% c:/data/develop/context/sources/phys-dim.lua
-
% c:/data/develop/context/sources/publ-aut.lua % shared
-% c:/data/develop/context/sources/publ-dat.lua
-% c:/data/develop/context/sources/publ-fnd.lua
-% c:/data/develop/context/sources/publ-inc.lua
-% c:/data/develop/context/sources/publ-ini.lua
-% c:/data/develop/context/sources/publ-jrn.lua
-% c:/data/develop/context/sources/publ-oth.lua
-% c:/data/develop/context/sources/publ-reg.lua
-% c:/data/develop/context/sources/publ-sor.lua
-% c:/data/develop/context/sources/publ-tra.lua
-% c:/data/develop/context/sources/publ-usr.lua
+% c:/data/develop/context/sources/publ-dat.lua % shared
+% c:/data/develop/context/sources/publ-fnd.lua % shared
+% c:/data/develop/context/sources/publ-inc.lua % shared
+% c:/data/develop/context/sources/publ-ini.lua % shared
+% c:/data/develop/context/sources/publ-jrn.lua % shared
+% c:/data/develop/context/sources/publ-oth.lua % shared
+% c:/data/develop/context/sources/publ-reg.lua % shared
+% c:/data/develop/context/sources/publ-sor.lua % shared
+% c:/data/develop/context/sources/publ-tra.lua % shared
+% c:/data/develop/context/sources/publ-usr.lua % shared
% c:/data/develop/context/sources/scrn-but.lua
% c:/data/develop/context/sources/scrn-fld.lua
@@ -834,8 +828,3 @@
% c:/data/develop/context/sources/trac-lmx.lua
% c:/data/develop/context/sources/trac-par.lua
% c:/data/develop/context/sources/trac-tex.lua
-
-% c:/data/develop/context/sources/typo-cln.lua -- wrong name for what it does
-% c:/data/develop/context/sources/typo-dha.lua
-
-% c:/data/develop/context/sources/unic-ini.lua
Added: trunk/Master/texmf-dist/tex/context/base/mkxl/core-dat.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/core-dat.lmt (rev 0)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/core-dat.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,225 @@
+if not modules then modules = { } end modules ['core-dat'] = {
+ version = 1.001,
+ comment = "companion to core-dat.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This module provides a (multipass) container for arbitrary data. It replaces the
+-- twopass data mechanism.
+
+local tonumber, tostring, type = tonumber, tostring, type
+
+local context = context
+
+local trace_datasets = false trackers.register("job.datasets" , function(v) trace_datasets = v end)
+
+local report_dataset = logs.reporter("dataset")
+
+local allocate = utilities.storage.allocate
+local settings_to_hash = utilities.parsers.settings_to_hash
+
+local texgetcount = tex.getcount
+local texsetcount = tex.setcount
+
+local v_yes = interfaces.variables.yes
+
+local new_latelua = nodes.pool.latelua
+
+local implement = interfaces.implement
+
+local c_realpageno = tex.iscount("realpageno")
+
+local collected = allocate()
+local tobesaved = allocate()
+
+local datasets = {
+ collected = collected,
+ tobesaved = tobesaved,
+}
+
+job.datasets = datasets
+
+local function initializer()
+ collected = datasets.collected
+ tobesaved = datasets.tobesaved
+end
+
+job.register('job.datasets.collected', tobesaved, initializer, nil)
+
+local sets = { }
+
+table.setmetatableindex(tobesaved, function(t,k)
+ local v = { }
+ t[k] = v
+ return v
+end)
+
+table.setmetatableindex(sets, function(t,k)
+ local v = {
+ index = 0,
+ order = 0,
+ }
+ t[k] = v
+ return v
+end)
+
+local function setdata(settings)
+ local name = settings.name
+ local tag = settings.tag
+ local data = settings.data
+ local list = tobesaved[name]
+ if settings.convert and type(data) == "string" then
+ data = settings_to_hash(data)
+ end
+ if type(data) ~= "table" then
+ data = { data = data }
+ end
+ if not tag then
+ tag = #list + 1
+ else
+ tag = tonumber(tag) or tag -- autonumber saves keys
+ end
+ list[tag] = data
+ if settings.delay == v_yes then
+ local set = sets[name]
+ local index = set.index + 1
+ set.index = index
+ data.index = index
+ data.order = index
+ data.realpage = texgetcount(c_realpageno)
+ if trace_datasets then
+ report_dataset("action %a, name %a, tag %a, index %a","assign delayed",name,tag,index)
+ end
+ elseif trace_datasets then
+ report_dataset("action %a, name %a, tag %a","assign immediate",name,tag)
+ end
+ return name, tag, data
+end
+
+datasets.setdata = setdata
+
+function datasets.extend(name,tag)
+ if type(name) == "table" then
+ name, tag = name.name, name.tag
+ end
+ local set = sets[name]
+ local order = set.order + 1
+ local realpage = texgetcount(c_realpageno)
+ set.order = order
+ local t = tobesaved[name][tag]
+ t.realpage = realpage
+ t.order = order
+ if trace_datasets then
+ report_dataset("action %a, name %a, tag %a, page %a, index %a","flush by order",name,tag,t.index or 0,order,realpage)
+ end
+end
+
+function datasets.getdata(name,tag,key,default)
+ local t = collected[name]
+ if t == nil then
+ if trace_datasets then
+ report_dataset("error: unknown dataset, name %a",name)
+ end
+ elseif type(t) ~= "table" then
+ return t
+ else
+ t = t[tag] or t[tonumber(tag)]
+ if not t then
+ if trace_datasets then
+ report_dataset("error: unknown dataset, name %a, tag %a",name,tag)
+ end
+ elseif key then
+ return t[key] or default
+ else
+ return t
+ end
+ end
+ return default
+end
+
+local function setdataset(settings)
+ settings.convert = true
+ local name, tag = setdata(settings)
+ if settings.delay ~= v_yes then
+ --
+ else
+ context(new_latelua { action = job.datasets.extend, name = name, tag = tag })
+ end
+end
+
+local cache = table.setmetatableindex(function(t,k)
+ local v = table.load(k..".tuc")
+ if v then
+ v = v.job
+ if v then
+ v = v.datasets
+ if v then
+ v = v.collected
+ end
+ end
+ end
+ if not v then
+ v = { }
+ if trace_datasets then
+ report_dataset("error: unknown dataset job %a",k)
+ end
+ end
+ t[k] = v
+ return v
+end)
+
+local function datasetvariable(name,tag,key,cache)
+ local t = (cache or collected)[name]
+ if t == nil then
+ if trace_datasets then
+ report_dataset("error: unknown dataset, name %a, tag %a, not passed to tex",name) -- no tag
+ end
+ elseif type(t) ~= "table" then
+ context(tostring(t))
+ else
+ t = t and (t[tag] or t[tonumber(tag)])
+ if not t then
+ if trace_datasets then
+ report_dataset("error: unknown dataset, name %a, tag %a, not passed to tex",name,tag)
+ end
+ elseif type(t) == "table" then
+ local s = t[key]
+ if type(s) ~= "table" then
+ context(tostring(s))
+ elseif trace_datasets then
+ report_dataset("error: unknown dataset, name %a, tag %a, not passed to tex",name,tag)
+ end
+ end
+ end
+end
+
+local function datasetvariablefromjob(jobnname,name,tag,key)
+ datasetvariable(name,tag,key,cache[jobnname])
+end
+
+implement {
+ name = "setdataset",
+ actions = setdataset,
+ arguments = {
+ {
+ { "name" },
+ { "tag" },
+ { "delay" },
+ { "data" },
+ }
+ }
+}
+
+implement {
+ name = "datasetvariable",
+ actions = datasetvariable,
+ arguments = "3 strings",
+}
+
+implement {
+ name = "datasetvariablefromjob",
+ arguments = { "string", "string", "string", "string" },
+ actions = datasetvariablefromjob
+}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/core-dat.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/core-dat.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/core-dat.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1,6 +1,6 @@
%D \module
%D [ file=core-dat,
-%D version=20122.04.17, % replaces core-two from 1997.03.31,
+%D version=2021.04.17, % replaces core-two from 1997.03.31,
%D title=\CONTEXT\ Core Macros,
%D subtitle=Multipass Datasets,
%D author=Hans Hagen,
@@ -42,7 +42,7 @@
\unprotect
-\registerctxluafile{core-dat}{}
+\registerctxluafile{core-dat}{autosuffix}
\installcorenamespace{dataset}
@@ -78,50 +78,4 @@
\expandafter\clf_datasetvariable
\fi}
-\installcorenamespace{pagestate}
-\installcorenamespace{pagestatecounter}
-
-\installcommandhandler \??pagestate {pagestate} \??pagestate
-
-\def\syst_pagestates_allocate
- {\expandafter\newinteger\csname\??pagestatecounter\currentpagestate\endcsname}
-
-\appendtoks
- \syst_pagestates_allocate
-\to \everydefinepagestate
-
-\setuppagestate
- [\c!delay=\v!yes]
-
-\permanent\tolerant\protected\def\setpagestate[#1]#*[#2]%
- {\begingroup
- \edef\currentpagestate{#1}%
- \ifcsname\??pagestatecounter\currentpagestate\endcsname
- \scratchcounter\lastnamedcs
- \advanceby\scratchcounter\plusone
- \else
- \scratchcounter\plusone
- \syst_pagestates_allocate
- \fi
- \global\csname\??pagestatecounter\currentpagestate\endcsname\scratchcounter
- \clf_setpagestate
- name {\currentpagestate}%
- tag {\ifparameter#2\or#2\else\number\scratchcounter\fi}%
- delay {\pagestateparameter\c!delay}%
- \relax
- \endgroup}
-
-\permanent\protected\def\autosetpagestate#1%
- {\setpagestate[#1]\relax}
-
-\permanent\def\autopagestatenumber#1{\begincsname\??pagestatecounter#1\endcsname}
-
-\permanent\def\pagestaterealpage #1#2{\clf_pagestaterealpage {#1}{#2}}
-\permanent\def\setpagestaterealpageno#1#2{\clf_setpagestaterealpageno{#1}{#2}}
-\permanent\def\pagestaterealpageorder#1#2{\clf_pagestaterealpageorder{#1}#2\relax}
-
-\permanent\def\autopagestaterealpage #1{\clf_pagestaterealpage {#1}{\number\autopagestatenumber{#1}}}
-\permanent\def\setautopagestaterealpageno#1{\clf_setpagestaterealpageno{#1}{\number\autopagestatenumber{#1}}}
-\permanent\def\autopagestaterealpageorder#1{\clf_pagestaterealpageorder{#1}\numexpr\autopagestatenumber{#1}\relax}
-
\protect
Added: trunk/Master/texmf-dist/tex/context/base/mkxl/core-pag.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/core-pag.lmt (rev 0)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/core-pag.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,160 @@
+if not modules then modules = { } end modules ['core-dat'] = {
+ version = 1.001,
+ comment = "companion to core-dat.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This module provides a (multipass) container for arbitrary data. It replaces the
+-- twopass data mechanism.
+
+local tonumber = tonumber
+
+local context = context
+local ctx_latelua = context.latelua
+
+local trace_pagestates = false trackers.register("job.pagestates", function(v) trace_pagestates = v end)
+
+local report_pagestate = logs.reporter("pagestate")
+
+local allocate = utilities.storage.allocate
+
+local texgetcount = tex.getcount
+local texsetcount = tex.setcount
+
+local new_latelua = nodes.pool.latelua
+
+local implement = interfaces.implement
+local getnamespace = interfaces.getnamespace
+
+local c_realpageno = tex.iscount("realpageno")
+local c_realpagestateno = tex.iscount("realpagestateno")
+
+local collected = allocate()
+local tobesaved = allocate()
+
+local pagestates = {
+ collected = collected,
+ tobesaved = tobesaved,
+}
+
+job.pagestates = pagestates
+
+local function initializer()
+ collected = pagestates.collected
+ tobesaved = pagestates.tobesaved
+end
+
+job.register("job.pagestates.collected", tobesaved, initializer, nil)
+
+table.setmetatableindex(tobesaved, "table")
+
+local function setstate(settings)
+ local name = settings.name
+ local tag = settings.tag
+ local list = tobesaved[name]
+ if not tag then
+ tag = #list + 1
+ else
+ tag = tonumber(tag) or tag -- autonumber saves keys
+ end
+ local realpage = texgetcount(c_realpageno)
+ local data = realpage
+ list[tag] = data
+ if trace_pagestates then
+ report_pagestate("action %a, name %a, tag %a, preset %a","set",name,tag,realpage)
+ end
+ return name, tag, data
+end
+
+local function extend(name,tag)
+ local realpage = texgetcount(c_realpageno)
+ if trace_pagestates then
+ report_pagestate("action %a, name %a, tag %a, preset %a","synchronize",name,tag,realpage)
+ end
+ tobesaved[name][tag] = realpage
+end
+
+local function realpage(name,tag,default)
+ local t = collected[name]
+ if t then
+ t = t[tag] or t[tonumber(tag)]
+ if t then
+ return tonumber(t or default)
+ elseif trace_pagestates then
+ report_pagestate("error: unknown dataset, name %a, tag %a",name,tag)
+ end
+ elseif trace_pagestates then
+ report_pagestate("error: unknown dataset, name %a, tag %a",name) -- nil
+ end
+ return default
+end
+
+local function realpageorder(name,tag)
+ local t = collected[name]
+ if t then
+ local p = t[tag]
+ if p then
+ local n = 1
+ for i=tag-1,1,-1 do
+ if t[i] == p then
+ n = n +1
+ end
+ end
+ return n
+ end
+ end
+ return 0
+end
+
+pagestates.setstate = setstate
+pagestates.extend = extend
+pagestates.realpage = realpage
+pagestates.realpageorder = realpageorder
+
+function pagestates.countervalue(name)
+ return name and texgetcount(getnamespace("pagestatecounter") .. name) or 0
+end
+
+local function setpagestate(settings)
+ local name, tag = setstate(settings)
+ -- context(new_latelua(function() extend(name,tag) end))
+ ctx_latelua(function() extend(name,tag) end)
+end
+
+local function setpagestaterealpageno(name,tag)
+ local t = collected[name]
+ t = t and (t[tag] or t[tonumber(tag)])
+ texsetcount("realpagestateno",t or texgetcount(c_realpageno))
+end
+
+implement {
+ name = "setpagestate",
+ actions = setpagestate,
+ arguments = {
+ {
+ { "name" },
+ { "tag" },
+ { "delay" },
+ }
+ }
+}
+
+implement {
+ name = "pagestaterealpage",
+ actions = { realpage, context },
+ arguments = "2 strings",
+}
+
+implement {
+ name = "setpagestaterealpageno",
+ actions = setpagestaterealpageno,
+ arguments = "2 strings",
+}
+
+implement {
+ name = "pagestaterealpageorder",
+ actions = { realpageorder, context },
+ arguments = { "string", "integer" }
+}
Added: trunk/Master/texmf-dist/tex/context/base/mkxl/core-pag.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/core-pag.mkxl (rev 0)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/core-pag.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,68 @@
+%D \module
+%D [ file=core-pag,
+%D version=2023.03.23, % moved from core-dat
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Multipass Pagestate,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Core Macros / Multipass Pagestate}
+
+\unprotect
+
+\newinteger\realpagestateno
+
+\registerctxluafile{core-pag}{autosuffix}
+
+\installcorenamespace{pagestate}
+\installcorenamespace{pagestatecounter}
+
+\installcommandhandler \??pagestate {pagestate} \??pagestate
+
+\def\syst_pagestates_allocate
+ {\expandafter\newinteger\csname\??pagestatecounter\currentpagestate\endcsname}
+
+\appendtoks
+ \syst_pagestates_allocate
+\to \everydefinepagestate
+
+\setuppagestate
+ [\c!delay=\v!yes]
+
+\permanent\tolerant\protected\def\setpagestate[#1]#*[#2]%
+ {\begingroup
+ \edef\currentpagestate{#1}%
+ \ifcsname\??pagestatecounter\currentpagestate\endcsname
+ \scratchcounter\lastnamedcs
+ \advanceby\scratchcounter\plusone
+ \else
+ \scratchcounter\plusone
+ \syst_pagestates_allocate
+ \fi
+ \global\csname\??pagestatecounter\currentpagestate\endcsname\scratchcounter
+ \clf_setpagestate
+ name {\currentpagestate}%
+ tag {\ifparameter#2\or#2\else\number\scratchcounter\fi}%
+ delay {\pagestateparameter\c!delay}%
+ \relax
+ \endgroup}
+
+\permanent\protected\def\autosetpagestate#1%
+ {\setpagestate[#1]\relax}
+
+\permanent\def\autopagestatenumber#1{\begincsname\??pagestatecounter#1\endcsname}
+
+\permanent\def\pagestaterealpage #1#2{\clf_pagestaterealpage {#1}{#2}}
+\permanent\def\setpagestaterealpageno#1#2{\clf_setpagestaterealpageno{#1}{#2}}
+\permanent\def\pagestaterealpageorder#1#2{\clf_pagestaterealpageorder{#1}#2\relax}
+
+\permanent\def\autopagestaterealpage #1{\clf_pagestaterealpage {#1}{\number\autopagestatenumber{#1}}}
+\permanent\def\setautopagestaterealpageno#1{\clf_setpagestaterealpageno{#1}{\number\autopagestatenumber{#1}}}
+\permanent\def\autopagestaterealpageorder#1{\clf_pagestaterealpageorder{#1}\numexpr\autopagestatenumber{#1}\relax}
+
+\protect
Added: trunk/Master/texmf-dist/tex/context/base/mkxl/core-two.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/core-two.lmt (rev 0)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/core-two.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,210 @@
+if not modules then modules = { } end modules ['core-two'] = {
+ version = 1.001,
+ comment = "companion to core-two.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is actually one of the oldest MkIV files and basically a port of MkII but
+-- the old usage has long be phased out. Also, the public part is now handled by
+-- datasets which makes this a more private store.
+
+-- local next = next
+-- local remove, concat = table.remove, table.concat
+
+local allocate = utilities.storage.allocate
+
+local collected = allocate()
+local tobesaved = allocate()
+
+local jobpasses = {
+ collected = collected,
+ tobesaved = tobesaved,
+}
+
+job.passes = jobpasses
+
+local function initializer()
+ collected = jobpasses.collected
+ tobesaved = jobpasses.tobesaved
+end
+
+job.register('job.passes.collected', tobesaved, initializer, nil)
+
+function jobpasses.getcollected(id)
+ return collected[id] or { }
+end
+
+function jobpasses.gettobesaved(id)
+ local t = tobesaved[id]
+ if not t then
+ t = { }
+ tobesaved[id] = t
+ end
+ return t
+end
+
+-- local function define(id)
+-- local p = tobesaved[id]
+-- if not p then
+-- p = { }
+-- tobesaved[id] = p
+-- end
+-- return p
+-- end
+--
+-- local function save(id,str,index)
+-- local jti = define(id)
+-- if index then
+-- jti[index] = str
+-- else
+-- jti[#jti+1] = str
+-- end
+-- end
+--
+-- local function savetagged(id,tag,str)
+-- local jti = define(id)
+-- jti[tag] = str
+-- end
+--
+-- local function getdata(id,index,default)
+-- local jti = collected[id]
+-- local value = jti and jti[index]
+-- return value ~= "" and value or default or ""
+-- end
+--
+-- local function getfield(id,index,tag,default)
+-- local jti = collected[id]
+-- jti = jti and jti[index]
+-- local value = jti and jti[tag]
+-- return value ~= "" and value or default or ""
+-- end
+--
+-- local function getcollected(id)
+-- return collected[id] or { }
+-- end
+--
+-- local function gettobesaved(id)
+-- return define(id)
+-- end
+--
+-- local function get(id)
+-- local jti = collected[id]
+-- if jti and #jti > 0 then
+-- return remove(jti,1)
+-- end
+-- end
+--
+-- local function first(id)
+-- local jti = collected[id]
+-- return jti and jti[1]
+-- end
+--
+-- local function last(id)
+-- local jti = collected[id]
+-- return jti and jti[#jti]
+-- end
+--
+-- local function find(id,n)
+-- local jti = collected[id]
+-- return jti and jti[n] or nil
+-- end
+--
+-- local function count(id)
+-- local jti = collected[id]
+-- return jti and #jti or 0
+-- end
+--
+-- local function list(id)
+-- local jti = collected[id]
+-- if jti then
+-- return concat(jti,',')
+-- end
+-- end
+--
+-- local function inlist(id,str)
+-- local jti = collected[id]
+-- if jti then
+-- for _, v in next, jti do
+-- if v == str then
+-- return true
+-- end
+-- end
+-- end
+-- return false
+-- end
+--
+-- local check = first
+--
+-- jobpasses.define = define
+-- jobpasses.save = save
+-- jobpasses.savetagged = savetagged
+-- jobpasses.getdata = getdata
+-- jobpasses.getfield = getfield
+-- jobpasses.getcollected = getcollected
+-- jobpasses.gettobesaved = gettobesaved
+-- jobpasses.get = get
+-- jobpasses.first = first
+-- jobpasses.last = last
+-- jobpasses.find = find
+-- jobpasses.list = list
+-- jobpasses.count = count
+-- jobpasses.check = check
+-- jobpasses.inlist = inlist
+--
+-- -- interface
+--
+-- local implement = interfaces.implement
+--
+-- implement { name = "gettwopassdata", actions = { get, context }, arguments = "string" }
+-- implement { name = "getfirsttwopassdata",actions = { first, context }, arguments = "string" }
+-- implement { name = "getlasttwopassdata", actions = { last, context }, arguments = "string" }
+-- implement { name = "findtwopassdata", actions = { find, context }, arguments = "2 strings" }
+-- implement { name = "gettwopassdatalist", actions = { list, context }, arguments = "string" }
+-- implement { name = "counttwopassdata", actions = { count, context }, arguments = "string" }
+-- implement { name = "checktwopassdata", actions = { check, context }, arguments = "string" }
+--
+-- implement {
+-- name = "definetwopasslist",
+-- actions = define,
+-- arguments = "string"
+-- }
+--
+-- implement {
+-- name = "savetwopassdata",
+-- actions = save,
+-- arguments = "2 strings",
+-- }
+--
+-- implement {
+-- name = "savetaggedtwopassdata",
+-- actions = savetagged,
+-- arguments = "3 strings",
+-- }
+--
+-- implement {
+-- name = "doifelseintwopassdata",
+-- actions = { inlist, commands.doifelse },
+-- arguments = "2 strings",
+-- }
+--
+-- -- local ctx_latelua = context.latelua
+--
+-- -- implement {
+-- -- name = "lazysavetwopassdata",
+-- -- arguments = "3 strings",
+-- -- public = true,
+-- -- actions = function(a,b,c)
+-- -- ctx_latelua(function() save(a,c) end)
+-- -- end,
+-- -- }
+--
+-- -- implement {
+-- -- name = "lazysavetaggedtwopassdata",
+-- -- arguments = "3 strings",
+-- -- public = true,
+-- -- actions = function(a,b,c)
+-- -- ctx_latelua(function() savetagged(a,b,c) end)
+-- -- end,
+-- -- }
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/core-two.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/core-two.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/core-two.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1,6 +1,6 @@
%D \module
%D [ file=core-two, % moved from core-uti
-%D version=1997.03.31,
+%D version=1997.03.31, % stripped down 2023-03-21
%D title=\CONTEXT\ Core Macros,
%D subtitle=Two Pass Data,
%D author=Hans Hagen,
@@ -11,102 +11,110 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+%D The public interface is replaced by datasets and two pass data is now private
+%D to the engine. For the moment we keep some commands commented. The unused
+%D (second) argument is an inheritance from \MKII. If needed we can bring back
+%D a compatible interface.
+
\writestatus{loading}{ConTeXt Core Macros / Two Pass Data}
-%D This is a rather old mechanism which has not changed much over time, apart from
-%D adding a few more selectors. This code used to be part of \type {core-uti}. The
-%D following examples demonstrate the interface.
-%D
-%D \startbuffer
-%D \definetwopasslist{test-1}
-%D
-%D \gettwopassdatalist{test-1} [\twopassdatalist=]
-%D \checktwopassdata {test-1} [\twopassdata=]
-%D \checktwopassdata {test-1} [\twopassdata=]
-%D \gettwopassdata {test-1} [\twopassdata=]
-%D \gettwopassdata {test-1} [\twopassdata=]
-%D
-%D \definetwopasslist{test-2}
-%D
-%D \lazysavetwopassdata{test-2}{1}{x}
-%D \lazysavetwopassdata{test-2}{2}{y}
-%D \lazysavetwopassdata{test-2}{3}{z}
-%D
-%D \gettwopassdatalist{test-2} [\twopassdatalist=x,y,z]
-%D \checktwopassdata {test-2} [\twopassdata=x]
-%D \checktwopassdata {test-2} [\twopassdata=x]
-%D \gettwopassdata {test-2} [\twopassdata=x]
-%D \gettwopassdata {test-2} [\twopassdata=y]
-%D \gettwopassdata {test-2} [\twopassdata=z]
-%D \gettwopassdata {test-2} [\twopassdata=]
-%D
-%D \definetwopasslist{test-3}
-%D
-%D \lazysavetaggedtwopassdata{test-3}{1}{x}{a}
-%D \lazysavetaggedtwopassdata{test-3}{2}{y}{b}
-%D \lazysavetaggedtwopassdata{test-3}{3}{z}{c}
-%D
-%D \findtwopassdata{test-3}{x} [\twopassdata=a]
-%D \findtwopassdata{test-3}{y} [\twopassdata=b]
-%D \findtwopassdata{test-3}{z} [\twopassdata=c]
-%D \findtwopassdata{test-3}{w} [\twopassdata=]
-%D
-%D \definetwopasslist{test-4}
-%D
-%D \lazysavetwopassdata{test-4}{1}{A}
-%D \lazysavetwopassdata{test-4}{2}{B}
-%D \lazysavetwopassdata{test-4}{3}{C}
-%D
-%D \getfirsttwopassdata{test-4} [\twopassdata=A]
-%D \getlasttwopassdata {test-4} [\twopassdata=C]
-%D \getfirsttwopassdata{test-4} [\twopassdata=A]
-%D \getlasttwopassdata {test-4} [\twopassdata=C]
-%D \getfromtwopassdata {test-4}{1} [\twopassdata=A]
-%D \getfromtwopassdata {test-4}{3} [\twopassdata=C]
-%D \getfromtwopassdata {test-4}{2} [\twopassdata=B]
-%D \stopbuffer
-%D
-%D \getbuffer \typebuffer
-
\unprotect
-\registerctxluafile{core-two}{}
+\registerctxluafile{core-two}{autosuffix}
-\permanent\def\immediatesavetwopassdata #1#2#3{\normalexpanded{\noexpand\clf_savetwopassdata{#1}{#3}}}
-\permanent\def \lazysavetwopassdata #1#2#3{\normalexpanded{\noexpand\ctxlatecommand{savetwopassdata("#1","#3")}}}
-\permanent\let \savetwopassdata \lazysavetwopassdata
-\permanent\def \savetaggedtwopassdata#1#2#3#4{\normalexpanded{\noexpand\clf_savetaggedtwopassdata{#1}{#3}{#4}}}
-\permanent\def\lazysavetaggedtwopassdata#1#2#3#4{\normalexpanded{\noexpand\ctxlatecommand{savetaggedtwopassdata("#1",'#3',"#4")}}}
+% %D This is a rather old mechanism which has not changed much over time, apart from
+% %D adding a few more selectors. This code used to be part of \type {core-uti}. The
+% %D following examples demonstrate the interface.
+% %D
+% %D \startbuffer
+% %D \definetwopasslist{test-1}
+% %D
+% %D \gettwopassdatalist{test-1} [\twopassdatalist=]
+% %D \checktwopassdata {test-1} [\twopassdata=]
+% %D \checktwopassdata {test-1} [\twopassdata=]
+% %D \gettwopassdata {test-1} [\twopassdata=]
+% %D \gettwopassdata {test-1} [\twopassdata=]
+% %D
+% %D \definetwopasslist{test-2}
+% %D
+% %D \lazysavetwopassdata{test-2}{1}{x}
+% %D \lazysavetwopassdata{test-2}{2}{y}
+% %D \lazysavetwopassdata{test-2}{3}{z}
+% %D
+% %D \gettwopassdatalist{test-2} [\twopassdatalist=x,y,z]
+% %D \checktwopassdata {test-2} [\twopassdata=x]
+% %D \checktwopassdata {test-2} [\twopassdata=x]
+% %D \gettwopassdata {test-2} [\twopassdata=x]
+% %D \gettwopassdata {test-2} [\twopassdata=y]
+% %D \gettwopassdata {test-2} [\twopassdata=z]
+% %D \gettwopassdata {test-2} [\twopassdata=]
+% %D
+% %D \definetwopasslist{test-3}
+% %D
+% %D \lazysavetaggedtwopassdata{test-3}{1}{x}{a}
+% %D \lazysavetaggedtwopassdata{test-3}{2}{y}{b}
+% %D \lazysavetaggedtwopassdata{test-3}{3}{z}{c}
+% %D
+% %D \findtwopassdata{test-3}{x} [\twopassdata=a]
+% %D \findtwopassdata{test-3}{y} [\twopassdata=b]
+% %D \findtwopassdata{test-3}{z} [\twopassdata=c]
+% %D \findtwopassdata{test-3}{w} [\twopassdata=]
+% %D
+% %D \definetwopasslist{test-4}
+% %D
+% %D \lazysavetwopassdata{test-4}{1}{A}
+% %D \lazysavetwopassdata{test-4}{2}{B}
+% %D \lazysavetwopassdata{test-4}{3}{C}
+% %D
+% %D \getfirsttwopassdata{test-4} [\twopassdata=A]
+% %D \getlasttwopassdata {test-4} [\twopassdata=C]
+% %D \getfirsttwopassdata{test-4} [\twopassdata=A]
+% %D \getlasttwopassdata {test-4} [\twopassdata=C]
+% %D \getfromtwopassdata {test-4}{1} [\twopassdata=A]
+% %D \getfromtwopassdata {test-4}{3} [\twopassdata=C]
+% %D \getfromtwopassdata {test-4}{2} [\twopassdata=B]
+% %D \stopbuffer
+% %D
+% %D \getbuffer \typebuffer
+%
+% %D The next code can be simplified (read: defined at the \LUA\ end) but we never use this
+% %D mechanism which has been replaced by datasets so it's not worth the effort.
+%
+% \permanent\def\immediatesavetwopassdata #1#2#3{\normalexpanded{\noexpand\clf_savetwopassdata{#1}{#3}}}
+% \permanent\def \lazysavetwopassdata #1#2#3{\normalexpanded{\noexpand\ctxlatecommand{savetwopassdata("#1","#3")}}}
+% \permanent\let \savetwopassdata \lazysavetwopassdata
+% \permanent\def \savetaggedtwopassdata#1#2#3#4{\normalexpanded{\noexpand\clf_savetaggedtwopassdata{#1}{#3}{#4}}}
+% \permanent\def\lazysavetaggedtwopassdata#1#2#3#4{\normalexpanded{\noexpand\ctxlatecommand{savetaggedtwopassdata("#1","#3","#4")}}}
+%
+% % temp hack: needs a proper \starteverytimeluacode
+%
+% \setfalse\twopassdatafound
+%
+% \mutable\lettonothing\twopassdata
+% \mutable\lettonothing\twopassdatalist
+%
+% \mutable\let\noftwopassitems\!!zeropoint
+%
+% \def\syst_twopass_check % can be delegated to lua once obsolete is gone
+% {\ifempty\twopassdata
+% \setfalse\twopassdatafound
+% \else
+% \settrue\twopassdatafound
+% \fi}
+%
+% \permanent\protected\def\definetwopasslist #1{\clf_definetwopasslist{#1}}
+% \permanent\protected\def\gettwopassdata #1{\edef\twopassdata {\clf_gettwopassdata {#1}}\syst_twopass_check}
+% \permanent\protected\def\checktwopassdata #1{\edef\twopassdata {\clf_checktwopassdata {#1}}\syst_twopass_check}
+% \permanent\protected\def\findtwopassdata #1#2{\edef\twopassdata {\clf_findtwopassdata {#1}{#2}}\syst_twopass_check}
+% \permanent\protected\def\getfirsttwopassdata #1{\edef\twopassdata {\clf_getfirsttwopassdata {#1}}\syst_twopass_check}
+% \permanent\protected\def\getlasttwopassdata #1{\edef\twopassdata {\clf_getlasttwopassdata {#1}}%
+% \edef\noftwopassitems{\clf_counttwopassdata {#1}}\syst_twopass_check}
+% \permanent\protected\def\getnamedtwopassdatalist#1#2{\edef #1{\clf_gettwopassdatalist {#2}}}
+% \permanent\protected\def\gettwopassdatalist #1{\edef\twopassdatalist{\clf_gettwopassdatalist {#1}}}
+%
+% \permanent\protected\def\doifelseintwopassdata #1#2{\clf_doifelseintwopassdata{#1}{#2}}
+%
+% \aliased\let\doifintwopassdataelse\doifelseintwopassdata
+% \aliased\let\getfromtwopassdata \findtwopassdata
-% temp hack: needs a proper \starteverytimeluacode
-
-\setfalse\twopassdatafound
-
-\mutable\lettonothing\twopassdata
-\mutable\lettonothing\twopassdatalist
-
-\mutable\let\noftwopassitems\!!zeropoint
-
-\def\syst_twopass_check % can be delegated to lua once obsolete is gone
- {\ifempty\twopassdata
- \setfalse\twopassdatafound
- \else
- \settrue\twopassdatafound
- \fi}
-
-\permanent\protected\def\definetwopasslist #1{\clf_definetwopasslist{#1}}
-\permanent\protected\def\gettwopassdata #1{\edef\twopassdata {\clf_gettwopassdata {#1}}\syst_twopass_check}
-\permanent\protected\def\checktwopassdata #1{\edef\twopassdata {\clf_checktwopassdata {#1}}\syst_twopass_check}
-\permanent\protected\def\findtwopassdata #1#2{\edef\twopassdata {\clf_findtwopassdata {#1}{#2}}\syst_twopass_check}
-\permanent\protected\def\getfirsttwopassdata #1{\edef\twopassdata {\clf_getfirsttwopassdata {#1}}\syst_twopass_check}
-\permanent\protected\def\getlasttwopassdata #1{\edef\twopassdata {\clf_getlasttwopassdata {#1}}%
- \edef\noftwopassitems{\clf_counttwopassdata {#1}}\syst_twopass_check}
-\permanent\protected\def\getnamedtwopassdatalist#1#2{\edef #1{\clf_gettwopassdatalist {#2}}}
-\permanent\protected\def\gettwopassdatalist #1{\edef\twopassdatalist{\clf_gettwopassdatalist {#1}}}
-
-\permanent\protected\def\doifelseintwopassdata #1#2{\clf_doifelseintwopassdata{#1}{#2}}
-
-\aliased\let\doifintwopassdataelse\doifelseintwopassdata
-\aliased\let\getfromtwopassdata \findtwopassdata
-
\protect \endinput
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/core-uti.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/core-uti.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/core-uti.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,17 +6,14 @@
license = "see context related readme files"
}
--- todo: keep track of changes here (hm, track access, and only true when
--- accessed and changed)
+-- A utility file has always been part of ConTeXt and with the move to LuaTeX we
+-- also moved a lot of multi-pass info to a Lua table. Instead of loading a TeX
+-- based utility file under different setups, we now load a table once. This saves
+-- much runtime but at the cost of more memory usage.
+--
+-- In the meantime the overhead is a bit more due to the amount of data being saved
+-- and more agressive compacting.
---[[ldx--
-<p>A utility file has always been part of <l n='context'/> and with
-the move to <l n='luatex'/> we also moved a lot of multi-pass info
-to a <l n='lua'/> table. Instead of loading a <l n='tex'/> based
-utility file under different setups, we now load a table once. This
-saves much runtime but at the cost of more memory usage.</p>
---ldx]]--
-
local math = math
local next, type, tostring, tonumber, setmetatable, load = next, type, tostring, tonumber, setmetatable, load
local format, match = string.format, string.match
@@ -46,15 +43,10 @@
job.version = 1.33
job.packversion = 1.02
--- some day we will implement loading of other jobs and then we need
--- job.jobs
+-- Variables are saved using in the previously defined table and passed onto TeX
+-- using the following method. Of course one can also directly access the variable
+-- using a Lua call.
---[[ldx--
-<p>Variables are saved using in the previously defined table and passed
-onto <l n='tex'/> using the following method. Of course one can also
-directly access the variable using a <l n='lua'/> call.</p>
---ldx]]--
-
local savelist, comment = { }, { }
function job.comment(key,value)
@@ -382,13 +374,18 @@
end
function job.loadother(filename)
- statistics.starttiming(loadedfiles)
+ local jobname = environment.jobname
+ if filename == jobname then
+ return
+ end
filename = file.addsuffix(filename,"tuc")
local unpacked = othercache[filename]
if not unpacked then
- -- so we can register the same name twice(in loading order)
+ -- so we can register the same name twice (in loading order) ... needs checking if we want this
+ statistics.starttiming(loadedfiles)
local utilitydata = load(filename)
if utilitydata then
+ report_passes("integrating list %a into %a",filename,jobname)
local jobpacker = utilitydata.job.packed
unpacknumberdata(jobpacker.index)
unpacked = { }
@@ -403,14 +400,15 @@
end
unpacked.job.packed = nil -- nicer in inspecting
othercache[filename] = unpacked
- --
+ --
+ utilitydata.components, utilitydata.namestack = collectstructure(utilitydata.job.structure.collected)
+ --
structures.lists .integrate(utilitydata)
structures.registers .integrate(utilitydata)
structures.references.integrate(utilitydata)
- --
end
+ statistics.stoptiming(loadedfiles)
end
- statistics.stoptiming(loadedfiles)
return unpacked
end
Added: trunk/Master/texmf-dist/tex/context/base/mkxl/data-sch.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/data-sch.lmt (rev 0)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/data-sch.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,312 @@
+if not modules then modules = { } end modules ['data-sch'] = {
+ version = 1.001,
+ comment = "companion to luat-lib.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local load, tonumber, require = load, tonumber, require
+local gsub, format = string.gsub, string.format
+local savedata = io.savedata
+local sortedhash, concat = table.sortedhash, table.concat
+local finders, openers, loaders = resolvers.finders, resolvers.openers, resolvers.loaders
+local addsuffix, suffix, splitbase = file.addsuffix, file.suffix, file.splitbase
+local md5hex = md5.hex
+local removefile, renamefile, fileexists = os.remove, os.rename, io.exists
+
+-- todo: more locals
+
+local trace_schemes = false trackers.register("resolvers.schemes",function(v) trace_schemes = v end)
+local report_schemes = logs.reporter("resolvers","schemes")
+
+local http = require("socket.http")
+local ltn12 = require("ltn12")
+
+if mbox then mbox = nil end -- useless and even bugged (helper overwrites lib)
+
+local resolvers = resolvers
+local schemes = resolvers.schemes or { }
+resolvers.schemes = schemes
+
+local cleaners = { }
+schemes.cleaners = cleaners
+
+local threshold = 24 * 60 * 60
+local inmemory = false
+local uselibrary = false
+
+directives.register("schemes.threshold", function(v) threshold = tonumber(v) or threshold end)
+directives.register("schemes.inmemory", function(v) inmemory = v end)
+directives.register("schemes.uselibrary", function(v) uselibrary = v end)
+
+function cleaners.none(specification)
+ return specification.original
+end
+
+-- function cleaners.strip(specification)
+-- -- todo: only keep suffix periods, so after the last
+-- return (gsub(specification.original,"[^%a%d%.]+","-")) -- so we keep periods
+-- end
+
+function cleaners.strip(specification) -- keep suffixes
+ local path, name = splitbase(specification.original)
+ if path == "" then
+ return (gsub(name,"[^%a%d%.]+","-"))
+ else
+ return (gsub((gsub(path,"%.","-") .. "-" .. name),"[^%a%d%.]+","-"))
+ end
+end
+
+function cleaners.md5(specification)
+ return addsuffix(md5hex(specification.original),suffix(specification.path))
+end
+
+local cleaner = cleaners.strip
+
+directives.register("schemes.cleanmethod", function(v) cleaner = cleaners[v] or cleaners.strip end)
+
+function resolvers.schemes.cleanname(specification)
+ local hash = cleaner(specification)
+ if trace_schemes then
+ report_schemes("hashing %a to %a",specification.original,hash)
+ end
+ return hash
+end
+
+local cached = { }
+local loaded = { }
+local reused = { }
+local thresholds = { }
+local handlers = { }
+
+local function fetcher(report)
+ if uselibrary then
+ local curl = require("curl") or require("libs-imp-curl") -- we have curl preloaded
+ local fetch = curl and curl.fetch
+ if fetch then
+ return function(str)
+ local data, message = fetch {
+ url = str,
+ followlocation = true,
+ sslverifyhost = false,
+ sslverifypeer = false,
+ }
+ if not data then
+ report("some error: %s",message)
+ end
+ return data
+ end
+ end
+ end
+end
+
+local runner = sandbox.registerrunner {
+ name = "to file curl resolver",
+ method = "execute",
+ program = "curl",
+ template = '--silent --insecure --create-dirs --output "%cachename%" "%original%"',
+ internal = function(specification)
+ local fetch = fetcher(specification.reporter)
+ return fetch and function(name,program,template,checkers,defaults,variables,reporter,finalized)
+ local data = fetch(variables.original)
+ savedata(variables.cachename,data or "")
+ end
+ end,
+ checkers = {
+ cachename = "cache",
+ original = "url",
+ }
+}
+
+local memrunner = sandbox.registerrunner {
+ name = "in memory curl resolver",
+ method = "resultof",
+ program = "curl",
+ template = '--silent --insecure "%original%"',
+ internal = function(specification)
+ local fetch = fetcher(specification.reporter)
+ return fetch and function(name,program,template,checkers,defaults,variables,reporter,finalized)
+ return fetch(variables.original) or ""
+ end
+ end,
+ checkers = {
+ original = "url",
+ }
+}
+
+local function fetch(specification)
+ local original = specification.original
+ local scheme = specification.scheme
+ local cleanname = schemes.cleanname(specification)
+ if inmemory then
+ statistics.starttiming(schemes)
+ local cachename = resolvers.savers.virtualname(cleanname)
+ local handler = handlers[scheme]
+ -- if handler and not uselibrary then
+ if handler then -- internal sockets are twice as fast as library
+ if trace_schemes then
+ report_schemes("fetching %a, protocol %a, method %a",original,scheme,"built-in")
+ end
+ logs.flush()
+ handler(specification,cachename)
+ else
+ if trace_schemes then
+ report_schemes("fetching %a, protocol %a, method %a",original,scheme,"curl")
+ end
+ logs.flush()
+ local result = memrunner {
+ original = original,
+ }
+ resolvers.savers.directvirtual(cachename,result,true) -- persistent
+ end
+ loaded[scheme] = loaded[scheme] + 1
+ statistics.stoptiming(schemes)
+ return cachename
+ else
+ local cachename = caches.setfirstwritablefile(cleanname,"schemes")
+ if not cached[original] or threshold == 0 then
+ statistics.starttiming(schemes)
+ if threshold == 0 or not fileexists(cachename) or (os.difftime(os.time(),lfs.attributes(cachename).modification) > (thresholds[protocol] or threshold)) then
+ -- removefile(cachename)
+ cached[original] = cachename
+ local handler = handlers[scheme]
+ if handler then
+ if trace_schemes then
+ report_schemes("fetching %a, protocol %a, method %a",original,scheme,"built-in")
+ end
+ logs.flush()
+ handler(specification,cachename)
+ else
+ if trace_schemes then
+ report_schemes("fetching %a, protocol %a, method %a",original,scheme,"curl")
+ end
+ logs.flush()
+ runner {
+ original = original,
+ cachename = cachename,
+ }
+ end
+ end
+ if fileexists(cachename) then
+ cached[original] = cachename
+ if trace_schemes then
+ report_schemes("using cached %a, protocol %a, cachename %a",original,scheme,cachename)
+ end
+ else
+ cached[original] = ""
+ if trace_schemes then
+ report_schemes("using missing %a, protocol %a",original,scheme)
+ end
+ end
+ loaded[scheme] = loaded[scheme] + 1
+ statistics.stoptiming(schemes)
+ else
+ if trace_schemes then
+ report_schemes("reusing %a, protocol %a",original,scheme)
+ end
+ reused[scheme] = reused[scheme] + 1
+ end
+ return cached[original]
+ end
+end
+
+local function finder(specification,filetype)
+ return resolvers.methodhandler("finders",fetch(specification),filetype)
+end
+
+local opener = openers.file
+local loader = loaders.file
+
+local function install(scheme,handler,newthreshold)
+ handlers [scheme] = handler
+ loaded [scheme] = 0
+ reused [scheme] = 0
+ finders [scheme] = finder
+ openers [scheme] = opener
+ loaders [scheme] = loader
+ thresholds[scheme] = newthreshold or threshold
+end
+
+schemes.install = install
+
+local function http_handler(specification,cachename)
+ if inmemory then
+ local result = { }
+ local status, message = http.request {
+ url = specification.original,
+ sink = ltn12.sink.table(result)
+ }
+ resolvers.savers.directvirtual(cachename,concat(result),true) -- persistent
+ else
+ local tempname = cachename .. ".tmp"
+ local handle = io.open(tempname,"wb")
+ local status, message = http.request {
+ url = specification.original,
+ sink = ltn12.sink.file(handle)
+ }
+ if not status then
+ removefile(tempname)
+ else
+ removefile(cachename)
+ renamefile(tempname,cachename)
+ end
+ end
+ return cachename
+end
+
+install('http',http_handler)
+install('https') -- see pod
+install('ftp')
+
+statistics.register("scheme handling time", function()
+ local l, r, nl, nr = { }, { }, 0, 0
+ for k, v in sortedhash(loaded) do
+ if v > 0 then
+ nl = nl + 1
+ l[nl] = k .. ":" .. v
+ end
+ end
+ for k, v in sortedhash(reused) do
+ if v > 0 then
+ nr = nr + 1
+ r[nr] = k .. ":" .. v
+ end
+ end
+ local n = nl + nr
+ if n > 0 then
+ if nl == 0 then l = { "none" } end
+ if nr == 0 then r = { "none" } end
+ return format("%s seconds, %s processed, threshold %s seconds, loaded: %s, reused: %s",
+ statistics.elapsedtime(schemes), n, threshold, concat(l," "), concat(l," "))
+ else
+ return nil
+ end
+end)
+
+-- We provide a few more helpers:
+
+----- http = require("socket.http")
+local httprequest = http.request
+local toquery = url.toquery
+
+local function fetchstring(url,data)
+ local q = data and toquery(data)
+ if q then
+ url = url .. "?" .. q
+ end
+ local reply = httprequest(url)
+ return reply -- just one argument
+end
+
+schemes.fetchstring = fetchstring
+
+function schemes.fetchtable(url,data)
+ local reply = fetchstring(url,data)
+ if reply then
+ local s = load("return " .. reply)
+ if s then
+ return s()
+ end
+ end
+end
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/data-vir.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/data-vir.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/data-vir.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -20,26 +20,42 @@
local cleaners = resolvers.cleaners
local data = { }
+local keep = { }
local n = 0 -- hm, number can be query
local f_virtual_n = formatters["virtual://%s.%s"]
local f_virtual_y = formatters["virtual://%s-%s.%s"]
-function savers.virtual(specification,content,suffix)
+local function virtualname(specification,suffix)
n = n + 1 -- one number for all namespaces
local path = type(specification) == "table" and specification.path or specification
if type(path) ~= "string" or path == "" then
path = "virtualfile"
end
- local filename = suffix and f_virtual_y(path,n,suffix) or f_virtual_n(path,n)
+ return suffix and f_virtual_y(path,n,suffix) or f_virtual_n(path,n)
+end
+
+local function directvirtual(filename,content,persistent)
+ if not content then
+ content = ""
+ end
if trace_virtual then
- report_virtual("saver: file %a saved",filename)
+ report_virtual("saver: file %a saved, size %i",filename,#content)
end
- data[filename] = content
+ data[filename] = content or ""
+ keep[filename] = persistent
return filename
end
+function savers.virtual(specification,content,suffix)
+ return directvirtual(virtualname(specification,suffix),content)
+end
+
+savers.virtualname = virtualname
+savers.directvirtual = directvirtual
+
function cleaners.virtual(filename)
data[filename] = nil
+ keep[filename] = nil
end
local finders = resolvers.finders
@@ -94,7 +110,10 @@
if trace_virtual then
report_virtual("loader: file %a loaded",original)
end
- data[original] = nil
+ if not keep[original] then
+ data[original] = nil
+ keep[original] = nil
+ end
return true, d, #d
end
if trace_virtual then
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/driv-shp.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/driv-shp.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/driv-shp.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -69,11 +69,11 @@
local nodecodes = nodes.nodecodes
local whatsitcodes = nodes.whatsitcodes
local gluecodes = nodes.gluecodes
-local dirvalues = nodes.dirvalues
local subtypes = nodes.subtypes
-local lefttoright_code = dirvalues.lefttoright
-local righttoleft_code = dirvalues.righttoleft
+local directioncodes = tex.directioncodes
+local lefttoright_code = directioncodes.lefttoright
+local righttoleft_code = directioncodes.righttoleft
local glyph_code = nodecodes.glyph
local kern_code = nodecodes.kern
@@ -1804,7 +1804,7 @@
literal = showdetails,
}
- callback.register("show_whatsit",function(n,what,l,tlp,l1,l2)
+ callbacks.register("show_whatsit",function(n,what,l,tlp,l1,l2)
local s = nodes.whatsitcodes[n.subtype]
if what == 1 then
return s or "unknown"
@@ -1815,12 +1815,10 @@
w(n,l,tlp,l1,l2)
end
end
- end)
+ end,"provide whatsit details")
- local names = attributes.names
+ local names = attributes.names -- we show the name and number
- callback.register("get_attribute",function(k,v)
- return attributes.names[k], nil -- we show the name and number
- end)
+ callbacks.register("get_attribute",function(k,v) return attributes.names[k], nil end,"provide verbose attrbute name")
end
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/driv-usr.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/driv-usr.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/driv-usr.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -40,10 +40,10 @@
local nodecodes = nodes.nodecodes
local whatsitcodes = nodes.whatsitcodes
-local dirvalues = nodes.dirvalues
-local lefttoright_code = dirvalues.lefttoright
-local righttoleft_code = dirvalues.righttoleft
+local directioncodes = tex.directioncodes
+local lefttoright_code = directioncodes.lefttoright
+local righttoleft_code = directioncodes.righttoleft
local glyph_code = nodecodes.glyph
local kern_code = nodecodes.kern
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/enco-ini.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/enco-ini.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/enco-ini.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -74,6 +74,17 @@
\immutable\letcsname\??accents\endcsname\empty
%D Because now have this (\type {\chr} issues a one|-|time warning):
+%D
+%D \stopbuffer
+%D \chr {e acute}
+%D \chr {i circumflex}
+%D \^{i} \^i \^{\i}
+%D \^{a} \"{a}
+%D \withcircumflex{a}
+%D \withdiaeresis{a}
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
\permanent\protected\def\dodefinecombine#1#2%
{\ifcsname\string#1\endcsname\else
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/file-job.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/file-job.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/file-job.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -13,7 +13,7 @@
local gsub, match, gmatch, ind = string.gsub, string.match, string.gmatch, string.find
local insert, remove, concat, unique, imerged = table.insert, table.remove, table.concat, table.unique, table.imerged
local validstring, formatters = string.valid, string.formatters
-local sortedhash = table.sortedhash
+local sortedhash, copytable = table.sortedhash, table.copy
local setmetatableindex, setmetatablenewindex = table.setmetatableindex, table.setmetatablenewindex
local commands = commands
@@ -24,10 +24,12 @@
local implement = interfaces.implement
-local trace_jobfiles = false trackers.register("system.jobfiles", function(v) trace_jobfiles = v end)
+local trace_jobfiles = false trackers.register("system.jobfiles", function(v) trace_jobfiles = v end)
+local trace_structure = false trackers.register("system.structure", function(v) trace_structure = v end)
local report = logs.reporter("system")
local report_jobfiles = logs.reporter("system", "jobfiles")
+local report_structure = logs.reporter("system", "structure")
local report_functions = logs.reporter("system", "functions")
local texsetcount = tex.setcount
@@ -69,6 +71,12 @@
local v_component = variables.component
local v_yes = variables.yes
+local v_local = variables["local"]
+local v_global = variables["global"]
+
+local e_start = elements.start
+local e_stop = elements.stop
+
-- main code .. there is some overlap .. here we have loc://
local function findctxfile(name) -- loc ? any ?
@@ -402,7 +410,7 @@
local function dummyfunction() end
local function startstoperror()
- report("invalid \\%s%s ... \\%s%s structure",elements.start,v_text,elements.stop,v_text)
+ report("invalid \\%s%s ... \\%s%s structure",e_start,v_text,e_stop,v_text)
startstoperror = dummyfunction
end
@@ -528,6 +536,10 @@
local treestack = { }
local top = tree.branches
local root = tree
+local namestack = { }
+local namelist = { }
+local namehash = { }
+local nametop = false
local project_stack = { }
local product_stack = { }
@@ -550,6 +562,15 @@
top = t
end
+local function pushcurrent(what,name)
+ if what == v_product or what == v_component or what == v_text then
+ insert(namestack,name)
+ nametop = copytable(namestack)
+ namelist[#namelist+1] = nametop
+ insert(namehash,#namelist)
+ end
+end
+
local function poptree()
top = remove(treestack)
if #top[#top].branches == 0 then
@@ -557,6 +578,13 @@
end
end
+local function popcurrent(what)
+ if what == v_product or what == v_component then
+ remove(namestack)
+ remove(namehash)
+ end
+end
+
do
local function log_tree(report,top,depth)
@@ -600,24 +628,77 @@
jobstructure.collected = jobstructure.collected or { }
jobstructure.tobesaved = root
jobstructure.components = { }
+jobstructure.namestack = { }
-local function initialize()
- local function collect(root,result)
+function collectstructure(collected)
+ local namestack = { }
+ local n = 0
+ local function collect(root,result,stack)
local branches = root.branches
if branches then
+ local s = copytable(stack)
+ local m = #s + 1
for i=1,#branches do
local branch = branches[i]
- if branch.type == "component" then
+ local what = branch.type
+ if what == v_component then
result[#result+1] = branch.name
end
- collect(branch,result)
+ s[m] = branch.name
+ if what == v_product or what == v_component then
+ n = n + 1
+ namestack[n] = copytable(s)
+ end
+ collect(branch,result,s)
end
end
return result
end
- jobstructure.components = collect(jobstructure.collected,{})
+ local components = collect(collected,{},{})
+-- inspect(namestack)
+ return components, namestack
end
+local function initialize()
+ jobstructure.components, jobstructure.namestack = collectstructure(jobstructure.collected)
+end
+
+function jobresolvers.collectstructure(collected)
+ return collectstructure(collected or jobstructure.collected)
+end
+
+do
+ local reported = { }
+
+ function jobresolvers.currentstructure()
+-- inspect(namehash)
+ local n = namehash[#namehash]
+ if trace_structure and not reported[n] then
+ local namestack = jobstructure.namestack
+ local new = namelist [n]
+ local old = namestack[n]
+ new = new and concat(new," ") or ""
+ old = old and concat(old," ") or ""
+ if old == new then
+ report_structure("%02i : %a",n,old)
+ else
+ report_structure("%02i : %a <> %a",n,old,new)
+ end
+ reported[n] = true
+ end
+ return n, namelist[n]
+ end
+
+end
+
+function jobresolvers.namelist(n,utilitydata)
+ if utilitydata then
+ return utilitydata.namestack[n]
+ else
+ return namelist[n] or jobstructure.namestack[n]
+ end
+end
+
job.register('job.structure.collected',root,initialize)
-- component: small unit, either or not components itself
@@ -836,36 +917,32 @@
-- [v_environment] = context.stopenvironmentindeed,
-- }
-local start = {
- [v_project] = "startprojectindeed",
- [v_product] = "startproductindeed",
- [v_component] = "startcomponentindeed",
- [v_environment] = "startenvironmentindeed",
-}
+-- local start = {
+-- [v_project] = "startprojectindeed",
+-- [v_product] = "startproductindeed",
+-- [v_component] = "startcomponentindeed",
+-- [v_environment] = "startenvironmentindeed",
+-- }
-local stop = {
- [v_project] = "stopprojectindeed",
- [v_product] = "stopproductindeed",
- [v_component] = "stopcomponentindeed",
- [v_environment] = "stopenvironmentindeed",
-}
+-- local stop = {
+-- [v_project] = "stopprojectindeed",
+-- [v_product] = "stopproductindeed",
+-- [v_component] = "stopcomponentindeed",
+-- [v_environment] = "stopenvironmentindeed",
+-- }
-local function gotonextlevel(what,name) -- todo: something with suffix name
+local function gotonextlevel(what,how,name) -- todo: something with suffix name
insert(stacks[what],name)
insert(typestack,currenttype)
currenttype = what
pushtree(what,name)
- if start[what] then
- -- start[what]()
- token.expandmacro(start[what])
- end
+ pushcurrent(what,name)
+ token.expandmacro(e_start..":"..what..":"..how)
end
-local function gotopreviouslevel(what)
- if stop[what] then
- token.expandmacro(stop[what])
- -- stop[what]() -- not immediate
- end
+local function gotopreviouslevel(what,how)
+ token.expandmacro(e_stop..":"..what..":"..how)
+ popcurrent(what)
poptree()
currenttype = remove(typestack) or v_text
remove(stacks[what]) -- not currenttype ... weak recovery
@@ -881,20 +958,22 @@
return name
end
-implement { name = "startproject", public = true, protected = true, actions = function() gotonextlevel(v_project, autoname()) end }
-implement { name = "startproduct", public = true, protected = true, actions = function() gotonextlevel(v_product, autoname()) end }
-implement { name = "startcomponent", public = true, protected = true, actions = function() gotonextlevel(v_component, autoname()) end }
-implement { name = "startenvironment", public = true, protected = true, actions = function() gotonextlevel(v_environment,autoname()) end }
+implement { name = "startproject", public = true, protected = true, actions = function() gotonextlevel(v_project, v_global, autoname()) end }
+implement { name = "startproduct", public = true, protected = true, actions = function() gotonextlevel(v_product, v_global, autoname()) end }
+implement { name = "startcomponent", public = true, protected = true, actions = function() gotonextlevel(v_component, v_global, autoname()) end }
+implement { name = "startlocalcomponent", public = true, protected = true, actions = function() gotonextlevel(v_component, v_local, autoname()) end }
+implement { name = "startenvironment", public = true, protected = true, actions = function() gotonextlevel(v_environment, v_global, autoname()) end }
-implement { name = "stopproject", public = true, protected = true, actions = function() gotopreviouslevel(v_project ) end }
-implement { name = "stopproduct", public = true, protected = true, actions = function() gotopreviouslevel(v_product ) end }
-implement { name = "stopcomponent", public = true, protected = true, actions = function() gotopreviouslevel(v_component ) end }
-implement { name = "stopenvironment", public = true, protected = true, actions = function() gotopreviouslevel(v_environment) end }
+implement { name = "stopproject", public = true, protected = true, actions = function() gotopreviouslevel(v_project, v_global) end }
+implement { name = "stopproduct", public = true, protected = true, actions = function() gotopreviouslevel(v_product, v_global) end }
+implement { name = "stopcomponent", public = true, protected = true, actions = function() gotopreviouslevel(v_component, v_global) end }
+implement { name = "stoplocalcomponent", public = true, protected = true, actions = function() gotopreviouslevel(v_component, v_local ) end }
+implement { name = "stopenvironment", public = true, protected = true, actions = function() gotopreviouslevel(v_environment, v_global) end }
-implement { name = "currentproject", public = true, actions = function() context(topofstack(v_project )) end }
-implement { name = "currentproduct", public = true, actions = function() context(topofstack(v_product )) end }
-implement { name = "currentcomponent", public = true, actions = function() context(topofstack(v_component )) end }
-implement { name = "currentenvironment", public = true, actions = function() context(topofstack(v_environment)) end }
+implement { name = "currentproject", public = true, actions = function() context(topofstack(v_project )) end }
+implement { name = "currentproduct", public = true, actions = function() context(topofstack(v_product )) end }
+implement { name = "currentcomponent", public = true, actions = function() context(topofstack(v_component )) end }
+implement { name = "currentenvironment", public = true, actions = function() context(topofstack(v_environment)) end }
-- -- -- this will move -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/file-job.mklx
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/file-job.mklx 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/file-job.mklx 2023-05-06 22:03:57 UTC (rev 67034)
@@ -184,43 +184,54 @@
\newsystemmode\v!component
\newsystemmode\v!environment
-\permanent\protected\def\startprojectindeed
+\permanent\protected\defcsname\e!start:\v!project:\v!global\endcsname
{%starttext
\pushsystemmode\v!project
\setsystemmode\v!project}
-\permanent\protected\def\stopprojectindeed
+\permanent\protected\defcsname\e!stop:\v!project:\v!global\endcsname
{\popsystemmode\v!project
%stoptext
\endinput}
-\permanent\protected\def\startproductindeed
+\permanent\protected\defcsname\e!start:\v!product:\v!global\endcsname
{\starttext
\pushsystemmode\v!product
\setsystemmode\v!product}
-\permanent\protected\def\stopproductindeed
+\permanent\protected\defcsname\e!stop:\v!product:\v!global\endcsname
{\popsystemmode\v!product
\stoptext
\endinput}
-\permanent\protected\def\startcomponentindeed
+\permanent\protected\defcsname\e!start:\v!component:\v!global\endcsname
{\starttext
\pushreferenceprefix\currentcomponent
\pushsystemmode\v!component
\setsystemmode\v!component}
-\permanent\protected\def\stopcomponentindeed
+\permanent\protected\defcsname\e!stop:\v!component:\v!global\endcsname
{\popsystemmode\v!component
\popreferenceprefix
\stoptext
\endinput}
-\permanent\protected\def\startenvironmentindeed
+\permanent\protected\defcsname\e!start:\v!component:\v!local\endcsname
+ {\starttext
+ \pushreferenceprefix\currentcomponent
+ \pushsystemmode\v!component
+ \setsystemmode\v!component}
+
+\permanent\protected\defcsname\e!stop:\v!component:\v!local\endcsname
+ {\popsystemmode\v!component
+ \popreferenceprefix
+ \stoptext}
+
+\permanent\protected\defcsname\e!start:\v!environment:\v!global\endcsname
{\pushsystemmode\v!environment
\setsystemmode\v!environment}
-\permanent\protected\def\stopenvironmentindeed
+\permanent\protected\defcsname\e!stop:\v!environment:\v!global\endcsname
{\popsystemmode\v!environment
\endinput}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/file-mod.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/file-mod.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/file-mod.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,18 +6,12 @@
license = "see context related readme files"
}
--- This module will be redone! For instance, the prefixes will move to data-*
--- as they arr sort of generic along with home:// etc/.
+-- This module will be redone! For instance, the prefixes will move to data-* as
+-- they are sort of generic along with home:// etc/.
+--
+-- It is more convenient to manipulate filenames (paths) in Lua than in TeX. The
+-- methods below have counterparts at the TeX end.
--- context is not defined yet! todo! (we need to load tupp-fil after cld)
--- todo: move startreadingfile to lua and push regime there
-
---[[ldx--
-<p>It's more convenient to manipulate filenames (paths) in
-<l n='lua'/> than in <l n='tex'/>. These methods have counterparts
-at the <l n='tex'/> side.</p>
---ldx]]--
-
local format, find, concat, tonumber = string.format, string.find, table.concat, tonumber
local sortedhash = table.sortedhash
local basename = file.basename
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/font-chk.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/font-chk.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/font-chk.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -487,7 +487,7 @@
local cache = table.setmetatableindex("table")
- callback.register("missing_character", function(n,f,c)
+ callbacks.register("missing_character", function(n,f,c)
local cached = cache[f]
local found = cached[c]
if found == nil then
@@ -530,7 +530,7 @@
n.font = found[1]
n.scale = found[2]
end
- end)
+ end,"report details about a missing character")
function definers.registerfallbackfont(style,list)
local l = fallbacks[style]
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/font-con.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/font-con.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/font-con.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -22,12 +22,10 @@
local report_defining = logs.reporter("fonts","defining")
--- watch out: no negative depths and negative eights permitted in regular fonts
+-- Watch out: no negative depths and negative heights are permitted in regular
+-- fonts. Also, the code in LMTX is a bit different. Here we only implement a
+-- few helper functions.
---[[ldx--
-<p>Here we only implement a few helper functions.</p>
---ldx]]--
-
local fonts = fonts
local constructors = fonts.constructors or { }
fonts.constructors = constructors
@@ -53,11 +51,9 @@
----- scalecommands = fonts.helpers.scalecommands
---[[ldx--
-<p>We need to normalize the scale factor (in scaled points). This has to
-do with the fact that <l n='tex'/> uses a negative multiple of 1000 as
-a signal for a font scaled based on the design size.</p>
---ldx]]--
+-- We need to normalize the scale factor (in scaled points). This has to do with the
+-- fact that TeX uses a negative multiple of 1000 as a signal for a font scaled
+-- based on the design size.
local factors = {
pt = 65536.0,
@@ -112,34 +108,30 @@
end
end
---[[ldx--
-<p>Beware, the boundingbox is passed as reference so we may not overwrite it
-in the process; numbers are of course copies. Here 65536 equals 1pt. (Due to
-excessive memory usage in CJK fonts, we no longer pass the boundingbox.)</p>
---ldx]]--
+-- Beware, the boundingbox is passed as reference so we may not overwrite it in the
+-- process; numbers are of course copies. Here 65536 equals 1pt. (Due to excessive
+-- memory usage in CJK fonts, we no longer pass the boundingbox.)
+--
+-- The scaler is only used for OTF and AFM and virtual fonts. If a virtual font has
+-- italic correction make sure to set the hasitalics flag. Some more flags will be
+-- added in the future.
+--
+-- The reason why the scaler was originally split, is that for a while we
+-- experimented with a helper function. However, in practice the API calls are too
+-- slow to make this profitable and the Lua based variant was just faster. A days
+-- wasted day but an experience richer.
--- The scaler is only used for otf and afm and virtual fonts. If a virtual font has italic
--- correction make sure to set the hasitalics flag. Some more flags will be added in the
--- future.
-
---[[ldx--
-<p>The reason why the scaler was originally split, is that for a while we experimented
-with a helper function. However, in practice the <l n='api'/> calls are too slow to
-make this profitable and the <l n='lua'/> based variant was just faster. A days
-wasted day but an experience richer.</p>
---ldx]]--
-
-- experimental, sharing kerns (unscaled and scaled) saves memory
-- local sharedkerns, basekerns = constructors.check_base_kerns(tfmdata)
-- loop over descriptions (afm and otf have descriptions, tfm not)
-- there is no need (yet) to assign a value to chr.tonunicode
-
+--
-- constructors.prepare_base_kerns(tfmdata) -- optimalization
+--
+-- We have target.name = metricfile and target.fullname = RealName and
+-- target.filename = diskfilename when collapsing fonts. LuaTeX looks at both
+-- target.name and target.fullname because TTC files can have multiple subfonts.
--- we have target.name=metricfile and target.fullname=RealName and target.filename=diskfilename
--- when collapsing fonts, luatex looks as both target.name and target.fullname as ttc files
--- can have multiple subfonts
-
function constructors.calculatescale(tfmdata,scaledpoints)
-- implemented in font-ctx.lmt
end
@@ -597,6 +589,14 @@
if changed then
local c = changed[unicode]
if c and c ~= unicode then
+ local cc = changed[c]
+ if cc then
+ while cc do
+ c = cc
+ cc = changed[c]
+ end
+ end
+ -- check not needed:
if c then
description = descriptions[c] or descriptions[unicode] or character
character = characters[c] or character
@@ -1008,9 +1008,7 @@
return tfmdata
end
---[[ldx--
-<p>A unique hash value is generated by:</p>
---ldx]]--
+-- A unique hash value is generated by:
local hashmethods = { }
constructors.hashmethods = hashmethods
@@ -1069,13 +1067,11 @@
end
end
---[[ldx--
-<p>In principle we can share tfm tables when we are in need for a font, but then
-we need to define a font switch as an id/attr switch which is no fun, so in that
-case users can best use dynamic features ... so, we will not use that speedup. Okay,
-when we get rid of base mode we can optimize even further by sharing, but then we
-loose our testcases for <l n='luatex'/>.</p>
---ldx]]--
+-- In principle we can share tfm tables when we are in need for a font, but then we
+-- need to define a font switch as an id/attr switch which is no fun, so in that
+-- case users can best use dynamic features ... so, we will not use that speedup.
+-- Okay, when we get rid of base mode we can optimize even further by sharing, but
+-- then we loose our testcases for LuaTeX.
function constructors.hashinstance(specification,force)
-- implemented in font-ctx.lmt
@@ -1407,10 +1403,7 @@
end
---[[ldx--
-<p>We need to check for default features. For this we provide
-a helper function.</p>
---ldx]]--
+-- We need to check for default features. For this we provide a helper function.
function constructors.checkedfeatures(what,features)
local defaults = handlers[what].features.defaults
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/font-ctx.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/font-ctx.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/font-ctx.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -529,19 +529,13 @@
end
---[[ldx--
-<p>So far we haven't really dealt with features (or whatever we want
-to pass along with the font definition. We distinguish the following
-situations:</p>
-situations:</p>
-
-<code>
-name:xetex like specs
-name at virtual font spec
-name*context specification
-</code>
---ldx]]--
-
+-- So far we haven't really dealt with features (or whatever we want to pass along
+-- with the font definition. We distinguish the following situations:
+--
+-- name:xetex like specs
+-- name at virtual font spec
+-- name*context specification
+--
-- Currently fonts are scaled while constructing the font, so we have to do scaling
-- of commands in the vf at that point using e.g. "local scale = g.parameters.factor
-- or 1" after all, we need to work with copies anyway and scaling needs to be done
@@ -1383,25 +1377,35 @@
local characters = tfmdata.characters
local parameters = tfmdata.parameters
local properties = tfmdata.properties
- -- we use char0 as signal; cf the spec pdf can handle this (no char in slot)
- characters[0] = nil
- tfmdata.original = specification.specification
- local id = definefont(tfmdata,properties.id)
- csnames[id] = specification.cs
- properties.id = id -- already set
- definers.register(tfmdata,id) -- to be sure, normally already done
- texdefinefont(global,cs,id)
- -- texdefinefont(cs,id,global and "global")
- constructors.finalize(tfmdata)
- if trace_defining then
- report_defining("defining %a, id %a, target %a, features %a / %a, fallbacks %a / %a, step %a",
- name,id,nice_cs(cs),classfeatures,fontfeatures,classfallbacks,fontfallbacks,"-")
+ if characters then
+ -- we use char0 as signal; cf the spec pdf can handle this (no char in slot)
+ characters[0] = nil
+ tfmdata.original = specification.specification
+ local id = definefont(tfmdata,properties.id)
+ csnames[id] = specification.cs
+ properties.id = id -- already set
+ definers.register(tfmdata,id) -- to be sure, normally already done
+ texdefinefont(global,cs,id)
+ -- texdefinefont(cs,id,global and "global")
+ constructors.finalize(tfmdata)
+ if trace_defining then
+ report_defining("defining %a, id %a, target %a, features %a / %a, fallbacks %a / %a, step %a",
+ name,id,nice_cs(cs),classfeatures,fontfeatures,classfallbacks,fontfallbacks,"-")
+ end
+ -- resolved (when designsize is used):
+ local size = round(tfmdata.parameters.size or 655360)
+ setmacro("somefontsize",size.."sp")
+ texsetcount(c_scaledfontsize,size)
+ lastfontid = id
+ else
+ -- case 1: same as **
+ local nice = nice_cs(cs)
+ if not reported[name][nice] then
+ report_defining("unable to define %a as %a",name,nice)
+ end
+ lastfontid = -1
+ texsetcount(c_scaledfontsize,0)
end
- -- resolved (when designsize is used):
- local size = round(tfmdata.parameters.size or 655360)
- setmacro("somefontsize",size.."sp")
- texsetcount(c_scaledfontsize,size)
- lastfontid = id
elseif tfmtype == "number" then
if trace_defining then
report_defining("reusing %s, id %a, target %a, features %a / %a, fallbacks %a / %a, goodies %a / %a, designsize %a / %a",
@@ -1417,6 +1421,7 @@
texsetcount(c_scaledfontsize,size)
lastfontid = tfmdata
else
+ -- case 2: same as **
local nice = nice_cs(cs)
if not reported[name][nice] then
report_defining("unable to define %a as %a",name,nice)
@@ -1592,7 +1597,7 @@
return (define { name = name, size = size } or 0)
end
- callbacks.register('define_font', read, "definition of fonts (tfmdata preparation)")
+ callbacks.register("define_font",read,"define and/or load a font")
-- here
@@ -2258,10 +2263,8 @@
dimenfactors["%"] = nil
dimenfactors.pct = nil
---[[ldx--
-<p>Before a font is passed to <l n='tex'/> we scale it. Here we also need
-to scale virtual characters.</p>
---ldx]]--
+-- Before a font is passed to TeX we scale it. Here we also need to scale virtual
+-- characters.
do
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/font-def.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/font-def.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/font-def.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -24,10 +24,9 @@
local report_defining = logs.reporter("fonts","defining")
---[[ldx--
-<p>Here we deal with defining fonts. We do so by intercepting the
-default loader that only handles <l n='tfm'/>.</p>
---ldx]]--
+-- Here we deal with defining fonts. We do so by intercepting the default loader
+-- that only handles TFM files. Although, we started out that way but in the
+-- meantime we can hardly speak of TFM any more.
local nextfont = font.nextid
@@ -55,26 +54,19 @@
local resolvefile = fontgoodies and fontgoodies.filenames and fontgoodies.filenames.resolve or function(s) return s end
---[[ldx--
-<p>We hardly gain anything when we cache the final (pre scaled)
-<l n='tfm'/> table. But it can be handy for debugging, so we no
-longer carry this code along. Also, we now have quite some reference
-to other tables so we would end up with lots of catches.</p>
---ldx]]--
+-- We hardly gain anything when we cache the final (pre scaled) TFM table. But it
+-- can be handy for debugging, so we no longer carry this code along. Also, we now
+-- have quite some reference to other tables so we would end up with lots of
+-- catches.
+--
+-- We can prefix a font specification by "name:" or "file:". The first case will
+-- result in a lookup in the synonym table.
+--
+-- [ name: | file: ] identifier [ separator [ specification ] ]
+--
+-- The following function split the font specification into components and prepares
+-- a table that will move along as we proceed.
---[[ldx--
-<p>We can prefix a font specification by <type>name:</type> or
-<type>file:</type>. The first case will result in a lookup in the
-synonym table.</p>
-
-<typing>
-[ name: | file: ] identifier [ separator [ specification ] ]
-</typing>
-
-<p>The following function split the font specification into components
-and prepares a table that will move along as we proceed.</p>
---ldx]]--
-
-- beware, we discard additional specs
--
-- method:name method:name(sub) method:name(sub)*spec method:name*spec
@@ -166,9 +158,7 @@
end
---[[ldx--
-<p>We can resolve the filename using the next function:</p>
---ldx]]--
+-- We can resolve the filename using the next function:
definers.resolvers = definers.resolvers or { }
local resolvers = definers.resolvers
@@ -261,24 +251,18 @@
return specification
end
---[[ldx--
-<p>The main read function either uses a forced reader (as determined by
-a lookup) or tries to resolve the name using the list of readers.</p>
+-- The main read function either uses a forced reader (as determined by a lookup) or
+-- tries to resolve the name using the list of readers.
+--
+-- We need to cache when possible. We do cache raw tfm data (from TFM, AFM or OTF).
+-- After that we can cache based on specificstion (name) and size, that is, TeX only
+-- needs a number for an already loaded fonts. However, it may make sense to cache
+-- fonts before they're scaled as well (store TFM's with applied methods and
+-- features). However, there may be a relation between the size and features (esp in
+-- virtual fonts) so let's not do that now.
+--
+-- Watch out, here we do load a font, but we don't prepare the specification yet.
-<p>We need to cache when possible. We do cache raw tfm data (from <l
-n='tfm'/>, <l n='afm'/> or <l n='otf'/>). After that we can cache based
-on specificstion (name) and size, that is, <l n='tex'/> only needs a number
-for an already loaded fonts. However, it may make sense to cache fonts
-before they're scaled as well (store <l n='tfm'/>'s with applied methods
-and features). However, there may be a relation between the size and
-features (esp in virtual fonts) so let's not do that now.</p>
-
-<p>Watch out, here we do load a font, but we don't prepare the
-specification yet.</p>
---ldx]]--
-
--- very experimental:
-
function definers.applypostprocessors(tfmdata)
local postprocessors = tfmdata.postprocessors
if postprocessors then
@@ -431,18 +415,14 @@
return fontdata[id], id
end
---[[ldx--
-<p>So far the specifiers. Now comes the real definer. Here we cache
-based on id's. Here we also intercept the virtual font handler. Since
-it evolved stepwise I may rewrite this bit (combine code).</p>
+-- So far the specifiers. Now comes the real definer. Here we cache based on id's.
+-- Here we also intercept the virtual font handler.
+--
+-- In the previously defined reader (the one resulting in a TFM table) we cached the
+-- (scaled) instances. Here we cache them again, but this time based on id. We could
+-- combine this in one cache but this does not gain much. By the way, passing id's
+-- back to in the callback was introduced later in the development.
-In the previously defined reader (the one resulting in a <l n='tfm'/>
-table) we cached the (scaled) instances. Here we cache them again, but
-this time based on id. We could combine this in one cache but this does
-not gain much. By the way, passing id's back to in the callback was
-introduced later in the development.</p>
---ldx]]--
-
function definers.registered(hash)
local id = internalized[hash]
return id, id and fontdata[id]
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/font-fbk.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/font-fbk.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/font-fbk.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -10,10 +10,6 @@
local utfbyte, utfchar = utf.byte, utf.char
local next = next
---[[ldx--
-<p>This is very experimental code!</p>
---ldx]]--
-
local trace_visualize = false trackers.register("fonts.composing.visualize", function(v) trace_visualize = v end)
local trace_define = false trackers.register("fonts.composing.define", function(v) trace_define = v end)
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/font-fil.mklx
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/font-fil.mklx 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/font-fil.mklx 2023-05-06 22:03:57 UTC (rev 67034)
@@ -104,6 +104,11 @@
{\letcsname\??fontfile\fontclass\m_font_name\endcsname\m_font_file
\normalexpanded{\font_basics_define_font_synonym_yes_opt[#spec]}}
+\let\p_features \undefined
+\let\p_fallbacks \undefined
+\let\p_goodies \undefined
+\let\p_designsize\undefined
+
\protected\def\font_basics_define_font_synonym_nop_opt[#specification]%
{\let\p_features \undefined
\let\p_fallbacks \undefined
@@ -294,7 +299,7 @@
% pre-expansion.
\def\font_helpers_update_font_class_parameters
- {\edef\m_font_class_direction {\begincsname\??fontclass\fontclass\fontstyle\s!direction \endcsname}%
+ {%edef\m_font_class_direction {\begincsname\??fontclass\fontclass\fontstyle\s!direction \endcsname}%
\edef\m_font_class_features {\begincsname\??fontclass\fontclass\fontstyle\s!features \endcsname}%
\edef\m_font_class_fallbacks {\begincsname\??fontclass\fontclass\fontstyle\s!fallbacks \endcsname}%
\edef\m_font_class_goodies {\begincsname\??fontclass\fontclass\fontstyle\s!goodies \endcsname}%
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/font-ini.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/font-ini.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/font-ini.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,10 +6,6 @@
license = "see context related readme files"
}
---[[ldx--
-<p>Not much is happening here.</p>
---ldx]]--
-
local sortedhash, setmetatableindex = table.sortedhash, table.setmetatableindex
local allocate = utilities.storage.allocate
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/font-ini.mklx
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/font-ini.mklx 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/font-ini.mklx 2023-05-06 22:03:57 UTC (rev 67034)
@@ -755,6 +755,16 @@
\immutable\dimensiondef\d_font_default_size 10pt
+%lettonothing\m_font_class_direction % no longer used
+\lettonothing\m_font_class_features
+\lettonothing\m_font_class_fallbacks
+\lettonothing\m_font_class_goodies
+
+\lettonothing\m_font_direction
+\lettonothing\m_font_features
+\lettonothing\m_font_fallbacks
+\lettonothing\m_font_goodies
+
\protected\def\font_helpers_low_level_define
{\ifconditional\c_font_compact
\expandafter\font_helpers_low_level_define_compact
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/font-lib.mklx
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/font-lib.mklx 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/font-lib.mklx 2023-05-06 22:03:57 UTC (rev 67034)
@@ -52,7 +52,7 @@
\registerctxluafile{font-oti}{} % otf initialization
\registerctxluafile{font-ott}{} % otf tables (first)
\registerctxluafile{font-otl}{autosuffix}
-\registerctxluafile{font-oto}{}
+\registerctxluafile{font-oto}{autosuffix}
\registerctxluafile{font-otj}{autosuffix}
\registerctxluafile{font-oup}{}
\registerctxluafile{font-ota}{autosuffix}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/font-mat.mklx
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/font-mat.mklx 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/font-mat.mklx 2023-05-06 22:03:57 UTC (rev 67034)
@@ -337,16 +337,18 @@
%D 0 while in rl mode 0 is a copy of 1. There is no real overhead involved in this.
%D This also permits different font definitions for normal and mixed.
-\lettonothing\m_font_class_direction
-\lettonothing\m_font_class_features
-\lettonothing\m_font_class_fallbacks
-\lettonothing\m_font_class_goodies
+% moved to ini
+%
+% \lettonothing\m_font_class_direction
+% \lettonothing\m_font_class_features
+% \lettonothing\m_font_class_fallbacks
+% \lettonothing\m_font_class_goodies
+%
+% \lettonothing\m_font_direction
+% \lettonothing\m_font_features
+% \lettonothing\m_font_fallbacks
+% \lettonothing\m_font_goodies
-\lettonothing\m_font_direction
-\lettonothing\m_font_features
-\lettonothing\m_font_fallbacks
-\lettonothing\m_font_goodies
-
\appendtoks
\font_helpers_set_math_family\c_font_fam_mr\s!mr
\to \t_font_math_strategies
@@ -531,7 +533,12 @@
\else
\c_math_m_scaled\numericscale#1\relax
\fi
- \scaledmathstyle\c_math_m_scaled
+ \scaledmathstyle
+ \ifnum\glyphscale=\plusthousand
+ \c_math_m_scaled
+ \else
+ \numexpr(\c_math_m_scaled*\glyphscale)/\plusthousand\relax
+ \fi
\fi}
%D This is nasty, as the engine only stores the last set family parameters (per style) which
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/font-one.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/font-one.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/font-one.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -7,19 +7,17 @@
license = "see context related readme files"
}
---[[ldx--
-<p>Some code may look a bit obscure but this has to do with the fact that we also use
-this code for testing and much code evolved in the transition from <l n='tfm'/> to
-<l n='afm'/> to <l n='otf'/>.</p>
+-- Some code may look a bit obscure but this has to do with the fact that we also
+-- use this code for testing and much code evolved in the transition from TFM to AFM
+-- to OTF.
+--
+-- The following code still has traces of intermediate font support where we handles
+-- font encodings. Eventually font encoding went away but we kept some code around
+-- in other modules.
+--
+-- This version implements a node mode approach so that users can also more easily
+-- add features.
-<p>The following code still has traces of intermediate font support where we handles
-font encodings. Eventually font encoding went away but we kept some code around in
-other modules.</p>
-
-<p>This version implements a node mode approach so that users can also more easily
-add features.</p>
---ldx]]--
-
local fonts, logs, trackers, containers, resolvers = fonts, logs, trackers, containers, resolvers
local next, type, tonumber, rawget = next, type, tonumber, rawget
@@ -71,16 +69,14 @@
local applyruntimefixes = fonts.treatments and fonts.treatments.applyfixes
---[[ldx--
-<p>We cache files. Caching is taken care of in the loader. We cheat a bit by adding
-ligatures and kern information to the afm derived data. That way we can set them faster
-when defining a font.</p>
+-- We cache files. Caching is taken care of in the loader. We cheat a bit by adding
+-- ligatures and kern information to the afm derived data. That way we can set them
+-- faster when defining a font.
+--
+-- We still keep the loading two phased: first we load the data in a traditional
+-- fashion and later we transform it to sequences. Then we apply some methods also
+-- used in opentype fonts (like tlig).
-<p>We still keep the loading two phased: first we load the data in a traditional
-fashion and later we transform it to sequences. Then we apply some methods also
-used in opentype fonts (like <t>tlig</t>).</p>
---ldx]]--
-
function afm.load(filename)
filename = resolvers.findfile(filename,'afm') or ""
if filename ~= "" and not fonts.names.ignoredfile(filename) then
@@ -312,10 +308,8 @@
end
end
---[[ldx--
-<p>These helpers extend the basic table with extra ligatures, texligatures
-and extra kerns. This saves quite some lookups later.</p>
---ldx]]--
+-- These helpers extend the basic table with extra ligatures, texligatures and extra
+-- kerns. This saves quite some lookups later.
local addthem = function(rawdata,ligatures)
if ligatures then
@@ -349,18 +343,15 @@
addthem(rawdata,afm.helpdata.ligatures)
end
---[[ldx--
-<p>We keep the extra kerns in separate kerning tables so that we can use
-them selectively.</p>
---ldx]]--
+-- We keep the extra kerns in separate kerning tables so that we can use them
+-- selectively.
+--
+-- This is rather old code (from the beginning when we had only tfm). If we unify
+-- the afm data (now we have names all over the place) then we can use shcodes but
+-- there will be many more looping then. But we could get rid of the tables in
+-- char-cmp then. Als, in the generic version we don't use the character database.
+-- (Ok, we can have a context specific variant).
--- This is rather old code (from the beginning when we had only tfm). If
--- we unify the afm data (now we have names all over the place) then
--- we can use shcodes but there will be many more looping then. But we
--- could get rid of the tables in char-cmp then. Als, in the generic version
--- we don't use the character database. (Ok, we can have a context specific
--- variant).
-
local function enhance_add_extra_kerns(rawdata) -- using shcodes is not robust here
local descriptions = rawdata.descriptions
local resources = rawdata.resources
@@ -440,9 +431,7 @@
do_it_copy(afm.helpdata.rightkerned)
end
---[[ldx--
-<p>The copying routine looks messy (and is indeed a bit messy).</p>
---ldx]]--
+-- The copying routine looks messy (and is indeed a bit messy).
local function adddimensions(data) -- we need to normalize afm to otf i.e. indexed table instead of name
if data then
@@ -619,11 +608,9 @@
return nil
end
---[[ldx--
-<p>Originally we had features kind of hard coded for <l n='afm'/> files but since I
-expect to support more font formats, I decided to treat this fontformat like any
-other and handle features in a more configurable way.</p>
---ldx]]--
+-- Originally we had features kind of hard coded for AFM files but since I expect to
+-- support more font formats, I decided to treat this fontformat like any other and
+-- handle features in a more configurable way.
function afm.setfeatures(tfmdata,features)
local okay = constructors.initializefeatures("afm",tfmdata,features,trace_features,report_afm)
@@ -715,13 +702,10 @@
end
end
---[[ldx--
-<p>As soon as we could intercept the <l n='tfm'/> reader, I implemented an
-<l n='afm'/> reader. Since traditional <l n='pdftex'/> could use <l n='opentype'/>
-fonts with <l n='afm'/> companions, the following method also could handle
-those cases, but now that we can handle <l n='opentype'/> directly we no longer
-need this features.</p>
---ldx]]--
+-- As soon as we could intercept the TFM reader, I implemented an AFM reader. Since
+-- traditional pdfTeX could use OpenType fonts with AFM companions, the following
+-- method also could handle those cases, but now that we can handle OpenType
+-- directly we no longer need this features.
local function read_from_afm(specification)
local tfmdata = afmtotfm(specification)
@@ -736,9 +720,7 @@
return tfmdata
end
---[[ldx--
-<p>We have the usual two modes and related features initializers and processors.</p>
---ldx]]--
+-- We have the usual two modes and related features initializers and processors.
registerafmfeature {
name = "mode",
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/font-onr.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/font-onr.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/font-onr.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -7,19 +7,17 @@
license = "see context related readme files"
}
---[[ldx--
-<p>Some code may look a bit obscure but this has to do with the fact that we also use
-this code for testing and much code evolved in the transition from <l n='tfm'/> to
-<l n='afm'/> to <l n='otf'/>.</p>
+-- Some code may look a bit obscure but this has to do with the fact that we also
+-- use this code for testing and much code evolved in the transition from TFM to AFM
+-- to OTF.
+--
+-- The following code still has traces of intermediate font support where we handles
+-- font encodings. Eventually font encoding went away but we kept some code around
+-- in other modules.
+--
+-- This version implements a node mode approach so that users can also more easily
+-- add features.
-<p>The following code still has traces of intermediate font support where we handles
-font encodings. Eventually font encoding went away but we kept some code around in
-other modules.</p>
-
-<p>This version implements a node mode approach so that users can also more easily
-add features.</p>
---ldx]]--
-
local fonts, logs, trackers, resolvers = fonts, logs, trackers, resolvers
local next, type, tonumber, rawset = next, type, tonumber, rawset
@@ -49,12 +47,9 @@
local readers = afm.readers or { }
afm.readers = readers
---[[ldx--
-<p>We start with the basic reader which we give a name similar to the built in <l n='tfm'/>
-and <l n='otf'/> reader.</p>
-<p>We use a new (unfinished) pfb loader but I see no differences between the old
-and new vectors (we actually had one bad vector with the old loader).</p>
---ldx]]--
+-- We start with the basic reader which we give a name similar to the built in TFM
+-- and OTF reader. We use a PFB loader but I see no differences between the old and
+-- new vectors (we actually had one bad vector with the old loader).
local get_indexes, get_shapes
@@ -71,7 +66,7 @@
-- local plain = bxor(cipher,rshift(r,8))
local plain = (cipher ~ ((r >> 8) & 0xFFFFFFFF))
-- r = ((cipher + r) * c1 + c2) % 65536
- r = ((cipher + r) * c1 + c2) % 0x10000
+ r = ((cipher + r) * c1 + c2) % 0x10000
return char(plain)
end
@@ -366,11 +361,10 @@
end
---[[ldx--
-<p>We start with the basic reader which we give a name similar to the built in <l n='tfm'/>
-and <l n='otf'/> reader. We only need data that is relevant for our use. We don't support
-more complex arrangements like multiple master (obsolete), direction specific kerning, etc.</p>
---ldx]]--
+-- We start with the basic reader which we give a name similar to the built in TFM
+-- and OTF reader. We only need data that is relevant for our use. We don't support
+-- more complex arrangements like multiple master (obsolete), direction specific
+-- kerning, etc.
local spacer = patterns.spacer
local whitespace = patterns.whitespace
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/font-ota.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/font-ota.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/font-ota.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -56,10 +56,8 @@
local otffeatures = fonts.constructors.features.otf
local registerotffeature = otffeatures.register
---[[ldx--
-<p>Analyzers run per script and/or language and are needed in order to
-process features right.</p>
---ldx]]--
+-- Analyzers run per script and/or language and are needed in order to process
+-- features right.
local setstate = nuts.setstate
local getstate = nuts.getstate
Added: trunk/Master/texmf-dist/tex/context/base/mkxl/font-oto.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/font-oto.lmt (rev 0)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/font-oto.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,556 @@
+if not modules then modules = { } end modules ['font-oto'] = { -- original tex
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local concat, unpack = table.concat, table.unpack
+local insert, remove = table.insert, table.remove
+local format, gmatch, gsub, find, match, lower, strip = string.format, string.gmatch, string.gsub, string.find, string.match, string.lower, string.strip
+local type, next, tonumber, tostring = type, next, tonumber, tostring
+
+local trace_baseinit = false trackers.register("otf.baseinit", function(v) trace_baseinit = v end)
+local trace_singles = false trackers.register("otf.singles", function(v) trace_singles = v end)
+local trace_multiples = false trackers.register("otf.multiples", function(v) trace_multiples = v end)
+local trace_alternatives = false trackers.register("otf.alternatives", function(v) trace_alternatives = v end)
+local trace_ligatures = false trackers.register("otf.ligatures", function(v) trace_ligatures = v end)
+local trace_kerns = false trackers.register("otf.kerns", function(v) trace_kerns = v end)
+local trace_preparing = false trackers.register("otf.preparing", function(v) trace_preparing = v end)
+
+local report_prepare = logs.reporter("fonts","otf prepare")
+
+local fonts = fonts
+local otf = fonts.handlers.otf
+
+local otffeatures = otf.features
+local registerotffeature = otffeatures.register
+
+otf.defaultbasealternate = "none" -- first last
+
+local getprivate = fonts.constructors.getprivate
+
+local wildcard = "*"
+local default = "dflt"
+
+local formatters = string.formatters
+local f_unicode = formatters["%U"]
+local f_uniname = formatters["%U (%s)"]
+local f_unilist = formatters["% t (% t)"]
+
+local function gref(descriptions,n)
+ if type(n) == "number" then
+ local name = descriptions[n].name
+ if name then
+ return f_uniname(n,name)
+ else
+ return f_unicode(n)
+ end
+ elseif n then
+ local num = { }
+ local nam = { }
+ local j = 0
+ for i=1,#n do
+ local ni = n[i]
+ if tonumber(ni) then -- first is likely a key
+ j = j + 1
+ local di = descriptions[ni]
+ num[j] = f_unicode(ni)
+ nam[j] = di and di.name or "-"
+ end
+ end
+ return f_unilist(num,nam)
+ else
+ return "<error in base mode tracing>"
+ end
+end
+
+local function cref(feature,sequence)
+ return formatters["feature %a, type %a, (chain) lookup %a"](feature,sequence.type,sequence.name)
+end
+
+local function report_substitution(feature,sequence,descriptions,unicode,substitution)
+ if unicode == substitution then
+ report_prepare("%s: base substitution %s maps onto itself",
+ cref(feature,sequence),
+ gref(descriptions,unicode))
+ else
+ report_prepare("%s: base substitution %s => %S",
+ cref(feature,sequence),
+ gref(descriptions,unicode),
+ gref(descriptions,substitution))
+ end
+end
+
+local function report_alternate(feature,sequence,descriptions,unicode,replacement,value,comment)
+ if unicode == replacement then
+ report_prepare("%s: base alternate %s maps onto itself",
+ cref(feature,sequence),
+ gref(descriptions,unicode))
+ else
+ report_prepare("%s: base alternate %s => %s (%S => %S)",
+ cref(feature,sequence),
+ gref(descriptions,unicode),
+ replacement and gref(descriptions,replacement),
+ value,
+ comment)
+ end
+end
+
+local function report_ligature(feature,sequence,descriptions,unicode,ligature)
+ report_prepare("%s: base ligature %s => %S",
+ cref(feature,sequence),
+ gref(descriptions,ligature),
+ gref(descriptions,unicode))
+end
+
+local function report_kern(feature,sequence,descriptions,unicode,otherunicode,value)
+ report_prepare("%s: base kern %s + %s => %S",
+ cref(feature,sequence),
+ gref(descriptions,unicode),
+ gref(descriptions,otherunicode),
+ value)
+end
+
+-- We need to make sure that luatex sees the difference between base fonts that have
+-- different glyphs in the same slots in fonts that have the same fullname (or filename).
+-- LuaTeX will merge fonts eventually (and subset later on). If needed we can use a more
+-- verbose name as long as we don't use <()<>[]{}/%> and the length is < 128.
+
+local basehash, basehashes, applied = { }, 1, { }
+
+local function registerbasehash(tfmdata)
+ local properties = tfmdata.properties
+ local hash = concat(applied," ")
+ local base = basehash[hash]
+ if not base then
+ basehashes = basehashes + 1
+ base = basehashes
+ basehash[hash] = base
+ end
+ properties.basehash = base
+ properties.fullname = (properties.fullname or properties.name) .. "-" .. base
+ -- report_prepare("fullname base hash '%a, featureset %a",tfmdata.properties.fullname,hash)
+ applied = { }
+end
+
+local function registerbasefeature(feature,value)
+ applied[#applied+1] = feature .. "=" .. tostring(value)
+end
+
+-- The original basemode ligature builder used the names of components and did some expression
+-- juggling to get the chain right. The current variant starts with unicodes but still uses
+-- names to make the chain. This is needed because we have to create intermediates when needed
+-- but use predefined snippets when available. To some extend the current builder is more stupid
+-- but I don't worry that much about it as ligatures are rather predicatable.
+--
+-- Personally I think that an ff + i == ffi rule as used in for instance latin modern is pretty
+-- weird as no sane person will key that in and expect a glyph for that ligature plus the following
+-- character. Anyhow, as we need to deal with this, we do, but no guarantes are given.
+--
+-- latin modern dejavu
+--
+-- f+f 102 102 102 102
+-- f+i 102 105 102 105
+-- f+l 102 108 102 108
+-- f+f+i 102 102 105
+-- f+f+l 102 102 108 102 102 108
+-- ff+i 64256 105 64256 105
+-- ff+l 64256 108
+--
+-- As you can see here, latin modern is less complete than dejavu but
+-- in practice one will not notice it.
+--
+-- The while loop is needed because we need to resolve for instance pseudo names like
+-- hyphen_hyphen to endash so in practice we end up with a bit too many definitions but the
+-- overhead is neglectable. We can have changed[first] or changed[second] but it quickly becomes
+-- messy if we need to take that into account.
+
+local function makefake(tfmdata,name,present)
+ local private = getprivate(tfmdata)
+ local character = { intermediate = true, ligatures = { } }
+ tfmdata.resources.unicodes[name] = private
+ tfmdata.characters[private] = character
+ tfmdata.descriptions[private] = { name = name }
+ present[name] = private
+ return character
+end
+
+local function make_1(present,tree,name)
+ if tonumber(tree) then
+ present[name] = v
+ else
+ for k, v in next, tree do
+ if k == "ligature" then
+ present[name] = v
+ else
+ make_1(present,v,name .. "_" .. k)
+ end
+ end
+ end
+end
+
+local function make_3(present,tfmdata,characters,tree,name,preceding,unicode,done,v)
+ local character = characters[preceding]
+ if not character then
+ if trace_baseinit then
+ report_prepare("weird ligature in lookup %a, current %C, preceding %C",sequence.name,v,preceding)
+ end
+ character = makefake(tfmdata,name,present)
+ end
+ local ligatures = character.ligatures
+ if ligatures then
+ ligatures[unicode] = { char = v }
+ else
+ character.ligatures = { [unicode] = { char = v } }
+ end
+ if done then
+ local d = done[name]
+ if not d then
+ done[name] = { "dummy", v }
+ else
+ d[#d+1] = v
+ end
+ end
+end
+
+local function make_2(present,tfmdata,characters,tree,name,preceding,unicode,done)
+ if tonumber(tree) then
+ make_3(present,tfmdata,characters,tree,name,preceding,unicode,done,tree)
+ else
+ for k, v in next, tree do
+ if k == "ligature" then
+ make_3(present,tfmdata,characters,tree,name,preceding,unicode,done,v)
+ else
+ local code = present[name] or unicode
+ local name = name .. "_" .. k
+ make_2(present,tfmdata,characters,v,name,code,k,done)
+ end
+ end
+ end
+end
+
+local function preparesubstitutions(tfmdata,feature,value,validlookups,lookuplist)
+ local characters = tfmdata.characters
+ local descriptions = tfmdata.descriptions
+ local resources = tfmdata.resources
+ local changed = tfmdata.changed
+
+ local ligatures = { }
+ local alternate = tonumber(value) or true and 1
+ local defaultalt = otf.defaultbasealternate
+ local trace_singles = trace_baseinit and trace_singles
+ local trace_alternatives = trace_baseinit and trace_alternatives
+ local trace_ligatures = trace_baseinit and trace_ligatures
+
+ -- A chain of changes is handled in font-con which is cleaner because
+ -- we can have shared changes and such.
+
+ if not changed then
+ changed = { }
+ tfmdata.changed = changed
+ end
+
+ for i=1,#lookuplist do
+ local sequence = lookuplist[i]
+ local steps = sequence.steps
+ local kind = sequence.type
+ if kind == "gsub_single" then
+ for i=1,#steps do
+ for unicode, data in next, steps[i].coverage do
+ if unicode ~= data and not changed[unicode] then
+ changed[unicode] = data
+ end
+ if trace_singles then
+ report_substitution(feature,sequence,descriptions,unicode,data)
+ end
+ end
+ end
+ elseif kind == "gsub_alternate" then
+ for i=1,#steps do
+ for unicode, data in next, steps[i].coverage do
+ local replacement = data[alternate]
+ if replacement then
+ if unicode ~= replacement and not changed[unicode] then
+ changed[unicode] = replacement
+ end
+ if trace_alternatives then
+ report_alternate(feature,sequence,descriptions,unicode,replacement,value,"normal")
+ end
+ elseif defaultalt == "first" then
+ replacement = data[1]
+ if unicode ~= replacement and not changed[unicode] then
+ changed[unicode] = replacement
+ end
+ if trace_alternatives then
+ report_alternate(feature,sequence,descriptions,unicode,replacement,value,defaultalt)
+ end
+ elseif defaultalt == "last" then
+ replacement = data[#data]
+ if unicode ~= replacement and not changed[unicode] then
+ changed[unicode] = replacement
+ end
+ if trace_alternatives then
+ report_alternate(feature,sequence,descriptions,unicode,replacement,value,defaultalt)
+ end
+ else
+ if trace_alternatives then
+ report_alternate(feature,sequence,descriptions,unicode,replacement,value,"unknown")
+ end
+ end
+ end
+ end
+ elseif kind == "gsub_ligature" then
+ for i=1,#steps do
+ for unicode, data in next, steps[i].coverage do
+ ligatures[#ligatures+1] = { unicode, data, "" } -- lookupname }
+ if trace_ligatures then
+ report_ligature(feature,sequence,descriptions,unicode,data)
+ end
+ end
+ end
+ end
+ end
+
+ local nofligatures = #ligatures
+
+ if nofligatures > 0 then
+ local characters = tfmdata.characters
+ local present = { }
+ local done = trace_baseinit and trace_ligatures and { }
+
+ for i=1,nofligatures do
+ local ligature = ligatures[i]
+ local unicode = ligature[1]
+ local tree = ligature[2]
+ make_1(present,tree,"ctx_"..unicode)
+ end
+
+ for i=1,nofligatures do
+ local ligature = ligatures[i]
+ local unicode = ligature[1]
+ local tree = ligature[2]
+ local lookupname = ligature[3]
+ make_2(present,tfmdata,characters,tree,"ctx_"..unicode,unicode,unicode,done,sequence)
+ end
+
+ end
+
+end
+
+local function preparepositionings(tfmdata,feature,value,validlookups,lookuplist)
+ local characters = tfmdata.characters
+ local descriptions = tfmdata.descriptions
+ local resources = tfmdata.resources
+ local properties = tfmdata.properties
+ local traceindeed = trace_baseinit and trace_kerns
+ -- check out this sharedkerns trickery
+ for i=1,#lookuplist do
+ local sequence = lookuplist[i]
+ local steps = sequence.steps
+ local kind = sequence.type
+ local format = sequence.format
+ if kind == "gpos_pair" then
+ for i=1,#steps do
+ local step = steps[i]
+ local format = step.format
+ if format == "kern" or format == "move" then
+ for unicode, data in next, steps[i].coverage do
+ local character = characters[unicode]
+ local kerns = character.kerns
+ if not kerns then
+ kerns = { }
+ character.kerns = kerns
+ end
+ if traceindeed then
+ for otherunicode, kern in next, data do
+ if not kerns[otherunicode] and kern ~= 0 then
+ kerns[otherunicode] = kern
+ report_kern(feature,sequence,descriptions,unicode,otherunicode,kern)
+ end
+ end
+ else
+ for otherunicode, kern in next, data do
+ if not kerns[otherunicode] and kern ~= 0 then
+ kerns[otherunicode] = kern
+ end
+ end
+ end
+ end
+ else
+ for unicode, data in next, steps[i].coverage do
+ local character = characters[unicode]
+ local kerns = character.kerns
+ for otherunicode, kern in next, data do
+ -- kern[2] is true (all zero) or a table
+ local other = kern[2]
+ if other == true or (not other and not (kerns and kerns[otherunicode])) then
+ local kern = kern[1]
+ if kern == true then
+ -- all zero
+ elseif kern[1] ~= 0 or kern[2] ~= 0 or kern[4] ~= 0 then
+ -- a complex pair not suitable for basemode
+ else
+ kern = kern[3]
+ if kern ~= 0 then
+ if kerns then
+ kerns[otherunicode] = kern
+ else
+ kerns = { [otherunicode] = kern }
+ character.kerns = kerns
+ end
+ if traceindeed then
+ report_kern(feature,sequence,descriptions,unicode,otherunicode,kern)
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+
+end
+
+local function initializehashes(tfmdata)
+ -- already done
+end
+
+local function checkmathreplacements(tfmdata,fullname,fixitalics)
+ if tfmdata.mathparameters then
+ local characters = tfmdata.characters
+ local changed = tfmdata.changed
+ if next(changed) then
+ if trace_preparing or trace_baseinit then
+ report_prepare("checking math replacements for %a",fullname)
+ end
+ for unicode, replacement in next, changed do
+ local u = characters[unicode]
+ local r = characters[replacement]
+ if u and r then
+ local n = u.next
+ local v = u.vert_variants
+ local h = u.horiz_variants
+ if fixitalics then
+ -- quite some warnings on stix ...
+ local ui = u.italic
+ if ui and not r.italic then
+ if trace_preparing then
+ report_prepare("using %i units of italic correction from %C for %U",ui,unicode,replacement)
+ end
+ r.italic = ui -- print(ui,ri)
+ end
+ end
+ if n and not r.next then
+ if trace_preparing then
+ report_prepare("forcing %s for %C substituted by %U","incremental step",unicode,replacement)
+ end
+ r.next = n
+ end
+ if v and not r.vert_variants then
+ if trace_preparing then
+ report_prepare("forcing %s for %C substituted by %U","vertical variants",unicode,replacement)
+ end
+ r.vert_variants = v
+ end
+ if h and not r.horiz_variants then
+ if trace_preparing then
+ report_prepare("forcing %s for %C substituted by %U","horizontal variants",unicode,replacement)
+ end
+ r.horiz_variants = h
+ end
+ else
+ if trace_preparing then
+ report_prepare("error replacing %C by %U",unicode,replacement)
+ end
+ end
+ end
+ end
+ end
+end
+
+local function featuresinitializer(tfmdata,value)
+ if true then -- value then
+ local starttime = trace_preparing and os.clock()
+ local features = tfmdata.shared.features
+ local fullname = tfmdata.properties.fullname or "?"
+ if features then
+ initializehashes(tfmdata)
+ local collectlookups = otf.collectlookups
+ local rawdata = tfmdata.shared.rawdata
+ local properties = tfmdata.properties
+ local script = properties.script
+ local language = properties.language
+ local rawresources = rawdata.resources
+ local rawfeatures = rawresources and rawresources.features
+ local basesubstitutions = rawfeatures and rawfeatures.gsub
+ local basepositionings = rawfeatures and rawfeatures.gpos
+ local substitutionsdone = false
+ local positioningsdone = false
+ --
+ if basesubstitutions or basepositionings then
+ local sequences = tfmdata.resources.sequences
+ for s=1,#sequences do
+ local sequence = sequences[s]
+ local sfeatures = sequence.features
+ if sfeatures then
+ local order = sequence.order
+ if order then
+ for i=1,#order do --
+ local feature = order[i]
+ local value = features[feature]
+ if value then
+ local validlookups, lookuplist = collectlookups(rawdata,feature,script,language)
+-- if not validlookups and not lookuplist and script == "math" then
+-- validlookups, lookuplist = collectlookups(rawdata,feature,"dflt","dflt")
+-- end
+ if not validlookups then
+ -- skip
+ elseif basesubstitutions and basesubstitutions[feature] then
+ if trace_preparing then
+ report_prepare("filtering base %s feature %a for %a with value %a","sub",feature,fullname,value)
+ end
+ preparesubstitutions(tfmdata,feature,value,validlookups,lookuplist)
+ registerbasefeature(feature,value)
+ substitutionsdone = true
+ elseif basepositionings and basepositionings[feature] then
+ if trace_preparing then
+ report_prepare("filtering base %a feature %a for %a with value %a","pos",feature,fullname,value)
+ end
+ preparepositionings(tfmdata,feature,value,validlookups,lookuplist)
+ registerbasefeature(feature,value)
+ positioningsdone = true
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ --
+ if substitutionsdone then
+ checkmathreplacements(tfmdata,fullname,features.fixitalics)
+ end
+ --
+ registerbasehash(tfmdata)
+ end
+ if trace_preparing then
+ report_prepare("preparation time is %0.3f seconds for %a",os.clock()-starttime,fullname)
+ end
+ end
+end
+
+registerotffeature {
+ name = "features",
+ description = "features",
+ default = true,
+ initializers = {
+ -- position = 1, -- after setscript (temp hack ... we need to force script / language to 1
+ base = featuresinitializer,
+ }
+}
+
+otf.basemodeinitializer = featuresinitializer
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/font-ots.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/font-ots.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/font-ots.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -7,92 +7,90 @@
license = "see context related readme files",
}
---[[ldx--
-<p>I need to check the description at the microsoft site ... it has been improved
-so maybe there are some interesting details there. Most below is based on old and
-incomplete documentation and involved quite a bit of guesswork (checking with the
-abstract uniscribe of those days. But changing things is tricky!</p>
-
-<p>This module is a bit more split up that I'd like but since we also want to test
-with plain <l n='tex'/> it has to be so. This module is part of <l n='context'/>
-and discussion about improvements and functionality mostly happens on the
-<l n='context'/> mailing list.</p>
-
-<p>The specification of OpenType is (or at least decades ago was) kind of vague.
-Apart from a lack of a proper free specifications there's also the problem that
-Microsoft and Adobe may have their own interpretation of how and in what order to
-apply features. In general the Microsoft website has more detailed specifications
-and is a better reference. There is also some information in the FontForge help
-files. In the end we rely most on the Microsoft specification.</p>
-
-<p>Because there is so much possible, fonts might contain bugs and/or be made to
-work with certain rederers. These may evolve over time which may have the side
-effect that suddenly fonts behave differently. We don't want to catch all font
-issues.</p>
-
-<p>After a lot of experiments (mostly by Taco, me and Idris) the first implementation
-was already quite useful. When it did most of what we wanted, a more optimized version
-evolved. Of course all errors are mine and of course the code can be improved. There
-are quite some optimizations going on here and processing speed is currently quite
-acceptable and has been improved over time. Many complex scripts are not yet supported
-yet, but I will look into them as soon as <l n='context'/> users ask for it.</p>
-
-<p>The specification leaves room for interpretation. In case of doubt the Microsoft
-implementation is the reference as it is the most complete one. As they deal with
-lots of scripts and fonts, Kai and Ivo did a lot of testing of the generic code and
-their suggestions help improve the code. I'm aware that not all border cases can be
-taken care of, unless we accept excessive runtime, and even then the interference
-with other mechanisms (like hyphenation) are not trivial.</p>
-
-<p>Especially discretionary handling has been improved much by Kai Eigner who uses complex
-(latin) fonts. The current implementation is a compromis between his patches and my code
-and in the meantime performance is quite ok. We cannot check all border cases without
-compromising speed but so far we're okay. Given good test cases we can probably improve
-it here and there. Especially chain lookups are non trivial with discretionaries but
-things got much better over time thanks to Kai.</p>
-
-<p>Glyphs are indexed not by unicode but in their own way. This is because there is no
-relationship with unicode at all, apart from the fact that a font might cover certain
-ranges of characters. One character can have multiple shapes. However, at the
-<l n='tex'/> end we use unicode so and all extra glyphs are mapped into a private
-space. This is needed because we need to access them and <l n='tex'/> has to include
-then in the output eventually.</p>
-
-<p>The initial data table is rather close to the open type specification and also not
-that different from the one produced by <l n='fontforge'/> but we uses hashes instead.
-In <l n='context'/> that table is packed (similar tables are shared) and cached on disk
-so that successive runs can use the optimized table (after loading the table is
-unpacked).</p>
-
-<p>This module is sparsely documented because it is has been a moving target. The
-table format of the reader changed a bit over time and we experiment a lot with
-different methods for supporting features. By now the structures are quite stable</p>
-
-<p>Incrementing the version number will force a re-cache. We jump the number by one
-when there's a fix in the reader or processing code that can result in different
-results.</p>
-
-<p>This code is also used outside context but in context it has to work with other
-mechanisms. Both put some constraints on the code here.</p>
-
---ldx]]--
-
--- Remark: We assume that cursives don't cross discretionaries which is okay because it
--- is only used in semitic scripts.
+-- I need to check the description at the microsoft site ... it has been improved so
+-- maybe there are some interesting details there. Most below is based on old and
+-- incomplete documentation and involved quite a bit of guesswork (checking with the
+-- abstract uniscribe of those days. But changing things is tricky!
--
+-- This module is a bit more split up that I'd like but since we also want to test
+-- with plain TeX it has to be so. This module is part of ConTeXt and discussion
+-- about improvements and functionality mostly happens on the ConTeXt mailing list.
+--
+-- The specification of OpenType is (or at least decades ago was) kind of vague.
+-- Apart from a lack of a proper free specifications there's also the problem that
+-- Microsoft and Adobe may have their own interpretation of how and in what order to
+-- apply features. In general the Microsoft website has more detailed specifications
+-- and is a better reference. There is also some information in the FontForge help
+-- files. In the end we rely most on the Microsoft specification.
+--
+-- Because there is so much possible, fonts might contain bugs and/or be made to
+-- work with certain rederers. These may evolve over time which may have the side
+-- effect that suddenly fonts behave differently. We don't want to catch all font
+-- issues.
+--
+-- After a lot of experiments (mostly by Taco, me and Idris) the first
+-- implementation was already quite useful. When it did most of what we wanted, a
+-- more optimized version evolved. Of course all errors are mine and of course the
+-- code can be improved. There are quite some optimizations going on here and
+-- processing speed is currently quite acceptable and has been improved over time.
+-- Many complex scripts are not yet supported yet, but I will look into them as soon
+-- as ConTeXt users ask for it.
+--
+-- The specification leaves room for interpretation. In case of doubt the Microsoft
+-- implementation is the reference as it is the most complete one. As they deal with
+-- lots of scripts and fonts, Kai and Ivo did a lot of testing of the generic code
+-- and their suggestions help improve the code. I'm aware that not all border cases
+-- can be taken care of, unless we accept excessive runtime, and even then the
+-- interference with other mechanisms (like hyphenation) are not trivial.
+--
+-- Especially discretionary handling has been improved much by Kai Eigner who uses
+-- complex (latin) fonts. The current implementation is a compromis between his
+-- patches and my code and in the meantime performance is quite ok. We cannot check
+-- all border cases without compromising speed but so far we're okay. Given good
+-- test cases we can probably improve it here and there. Especially chain lookups
+-- are non trivial with discretionaries but things got much better over time thanks
+-- to Kai.
+--
+-- Glyphs are indexed not by unicode but in their own way. This is because there is
+-- no relationship with unicode at all, apart from the fact that a font might cover
+-- certain ranges of characters. One character can have multiple shapes. However, at
+-- the TeX end we use unicode so and all extra glyphs are mapped into a private
+-- space. This is needed because we need to access them and TeX has to include then
+-- in the output eventually.
+--
+-- The initial data table is rather close to the open type specification and also
+-- not that different from the one produced by Fontforge but we uses hashes instead.
+-- In ConTeXt that table is packed (similar tables are shared) and cached on disk so
+-- that successive runs can use the optimized table (after loading the table is
+-- unpacked).
+--
+-- This module is sparsely documented because it is has been a moving target. The
+-- table format of the reader changed a bit over time and we experiment a lot with
+-- different methods for supporting features. By now the structures are quite stable
+--
+-- Incrementing the version number will force a re-cache. We jump the number by one
+-- when there's a fix in the reader or processing code that can result in different
+-- results.
+--
+-- This code is also used outside ConTeXt but in ConTeXt it has to work with other
+-- mechanisms. Both put some constraints on the code here.
+--
+-- Remark: We assume that cursives don't cross discretionaries which is okay because
+-- it is only used in semitic scripts.
+--
-- Remark: We assume that marks precede base characters.
--
--- Remark: When complex ligatures extend into discs nodes we can get side effects. Normally
--- this doesn't happen; ff\d{l}{l}{l} in lm works but ff\d{f}{f}{f}.
+-- Remark: When complex ligatures extend into discs nodes we can get side effects.
+-- Normally this doesn't happen; ff\d{l}{l}{l} in lm works but ff\d{f}{f}{f}.
--
-- Todo: check if we copy attributes to disc nodes if needed.
--
--- Todo: it would be nice if we could get rid of components. In other places we can use
--- the unicode properties. We can just keep a lua table.
+-- Todo: it would be nice if we could get rid of components. In other places we can
+-- use the unicode properties. We can just keep a lua table.
--
--- Remark: We do some disc juggling where we need to keep in mind that the pre, post and
--- replace fields can have prev pointers to a nesting node ... I wonder if that is still
--- needed.
+-- Remark: We do some disc juggling where we need to keep in mind that the pre, post
+-- and replace fields can have prev pointers to a nesting node ... I wonder if that
+-- is still needed.
--
-- Remark: This is not possible:
--
@@ -254,8 +252,8 @@
local dir_code = nodecodes.dir
local par_code = nodecodes.par
-local lefttoright_code = nodes.dirvalues.lefttoright
-local righttoleft_code = nodes.dirvalues.righttoleft
+local lefttoright_code = tex.directioncodes.lefttoright
+local righttoleft_code = tex.directioncodes.righttoleft
local discretionarydisc_code = nodes.disccodes.discretionary
@@ -1092,10 +1090,8 @@
end
end
---[[ldx--
-<p>We get hits on a mark, but we're not sure if the it has to be applied so
-we need to explicitly test for basechar, baselig and basemark entries.</p>
---ldx]]--
+-- We get hits on a mark, but we're not sure if the it has to be applied so we need
+-- to explicitly test for basechar, baselig and basemark entries.
function handlers.gpos_mark2base(head,start,dataset,sequence,markanchors,rlmode,skiphash)
local markchar = getchar(start)
@@ -1292,10 +1288,8 @@
return head, start, false
end
---[[ldx--
-<p>I will implement multiple chain replacements once I run into a font that uses
-it. It's not that complex to handle.</p>
---ldx]]--
+-- I will implement multiple chain replacements once I run into a font that uses it.
+-- It's not that complex to handle.
local chainprocs = { }
@@ -1348,30 +1342,23 @@
chainprocs.reversesub = reversesub
---[[ldx--
-<p>This chain stuff is somewhat tricky since we can have a sequence of actions to be
-applied: single, alternate, multiple or ligature where ligature can be an invalid
-one in the sense that it will replace multiple by one but not neccessary one that
-looks like the combination (i.e. it is the counterpart of multiple then). For
-example, the following is valid:</p>
+-- This chain stuff is somewhat tricky since we can have a sequence of actions to be
+-- applied: single, alternate, multiple or ligature where ligature can be an invalid
+-- one in the sense that it will replace multiple by one but not neccessary one that
+-- looks like the combination (i.e. it is the counterpart of multiple then). For
+-- example, the following is valid:
+--
+-- xxxabcdexxx [single a->A][multiple b->BCD][ligature cde->E] xxxABCDExxx
+--
+-- Therefore we we don't really do the replacement here already unless we have the
+-- single lookup case. The efficiency of the replacements can be improved by
+-- deleting as less as needed but that would also make the code even more messy.
+--
+-- Here we replace start by a single variant.
+--
+-- To be done : what if > 1 steps (example needed)
+-- This is messy: do we need this disc checking also in alternates?
-<typing>
-<line>xxxabcdexxx [single a->A][multiple b->BCD][ligature cde->E] xxxABCDExxx</line>
-</typing>
-
-<p>Therefore we we don't really do the replacement here already unless we have the
-single lookup case. The efficiency of the replacements can be improved by deleting
-as less as needed but that would also make the code even more messy.</p>
---ldx]]--
-
---[[ldx--
-<p>Here we replace start by a single variant.</p>
---ldx]]--
-
--- To be done (example needed): what if > 1 steps
-
--- this is messy: do we need this disc checking also in alternates?
-
local function reportzerosteps(dataset,sequence)
logwarning("%s: no steps",cref(dataset,sequence))
end
@@ -1446,9 +1433,7 @@
return head, start, false
end
---[[ldx--
-<p>Here we replace start by new glyph. First we delete the rest of the match.</p>
---ldx]]--
+-- Here we replace start by new glyph. First we delete the rest of the match.
-- char_1 mark_1 -> char_x mark_1 (ignore marks)
-- char_1 mark_1 -> char_x
@@ -1500,9 +1485,7 @@
return head, start, false
end
---[[ldx--
-<p>Here we replace start by a sequence of new glyphs.</p>
---ldx]]--
+-- Here we replace start by a sequence of new glyphs.
function chainprocs.gsub_multiple(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
local mapping = currentlookup.mapping
@@ -1526,11 +1509,9 @@
return head, start, false
end
---[[ldx--
-<p>When we replace ligatures we use a helper that handles the marks. I might change
-this function (move code inline and handle the marks by a separate function). We
-assume rather stupid ligatures (no complex disc nodes).</p>
---ldx]]--
+-- When we replace ligatures we use a helper that handles the marks. I might change
+-- this function (move code inline and handle the marks by a separate function). We
+-- assume rather stupid ligatures (no complex disc nodes).
-- compare to handlers.gsub_ligature which is more complex ... why
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/font-tex.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/font-tex.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/font-tex.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -186,10 +186,10 @@
-- fonts.helpers.registerboxglyph { category = "demo", unicode = 105 }
-- fonts.helpers.registerboxglyph { category = "demo", unicode = 106 }
-local callbacks = fonts.callbacks or { }
-fonts.callbacks = callbacks
+local fontcallbacks = fonts.callbacks or { }
+fonts.callbacks = fontcallbacks
-function callbacks.devirtualize(chardata,f,c)
+function fontcallbacks.devirtualize(chardata,f,c)
if chardata.commands then
local h = node.hpack(nodes.pool.glyph(f,c))
local p = setboxdirectly(f,c,h)
@@ -205,7 +205,7 @@
if chardata then
local callback = chardata.callback
if callback then
- local action = type(callback) == "function" and callback or callbacks[callback]
+ local action = type(callback) == "function" and callback or fontcallbacks[callback]
if action then
action(chardata,f,c)
end
@@ -213,6 +213,6 @@
end
end
-callback.register("process_character",processcallback)
+callbacks.register("process_character",processcallback,"apply an action to a character in a font")
-callbacks.callback = processcallback
+fontcallbacks.callback = processcallback
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/font-tfm.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/font-tfm.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/font-tfm.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -50,22 +50,19 @@
fonts.formats.tfm = "type1" -- we need to have at least a value here
fonts.formats.ofm = "type1" -- we need to have at least a value here
---[[ldx--
-<p>The next function encapsulates the standard <l n='tfm'/> loader as
-supplied by <l n='luatex'/>.</p>
---ldx]]--
-
--- this might change: not scaling and then apply features and do scaling in the
--- usual way with dummy descriptions but on the other hand .. we no longer use
--- tfm so why bother
-
--- ofm directive blocks local path search unless set; btw, in context we
--- don't support ofm files anyway as this format is obsolete
-
--- we need to deal with nested virtual fonts, but because we load in the
--- frontend we also need to make sure we don't nest too deep (esp when sizes
--- get large)
+-- The next function encapsulates the standard TFM loader as supplied by LuaTeX.
--
+-- This might change: not scaling and then apply features and do scaling in the
+-- usual way with dummy descriptions but on the other hand. However, we no longer
+-- use TFM (except for the JMN math fonts) so why bother.
+--
+-- The ofm directive blocks a local path search unless set. Actually, in ConTeXt we
+-- never had to deal with OFM files anyway as this format is obsolete (there are
+-- hardly any fonts in that format that are of use).
+--
+-- We need to deal with nested virtual fonts, but because we load in the frontend we
+-- also need to make sure we don't nest too deep (esp when sizes get large)
+--
-- (VTITLE Example of a recursion)
-- (MAPFONT D 0 (FONTNAME recurse)(FONTAT D 2))
-- (CHARACTER C A (CHARWD D 1)(CHARHT D 1)(MAP (SETRULE D 1 D 1)))
@@ -72,7 +69,8 @@
-- (CHARACTER C B (CHARWD D 2)(CHARHT D 2)(MAP (SETCHAR C A)))
-- (CHARACTER C C (CHARWD D 4)(CHARHT D 4)(MAP (SETCHAR C B)))
--
--- we added the same checks as below to the luatex engine
+-- The virtual fonts are handled in the backend and therefore LMTX provides more
+-- features than in the original specification. LuaTeX already had a few more.
function tfm.setfeatures(tfmdata,features)
local okay = constructors.initializefeatures("tfm",tfmdata,features,trace_features,report_tfm)
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/font-txt.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/font-txt.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/font-txt.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -122,7 +122,7 @@
local dir_code = nodecodes.dir
local par_code = nodecodes.par
-local righttoleft_code = nodes.dirvalues.righttoleft
+local righttoleft_code = tex.directioncodes.righttoleft
local txtdirstate = otf.helpers.txtdirstate
local pardirstate = otf.helpers.pardirstate
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/lang-def.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/lang-def.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/lang-def.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -257,7 +257,7 @@
\installlanguage
[\s!sl]
- [\c!command=\v!no,
+ [\c!define=\v!no,
\c!spacing=\v!packed,
\c!leftsentence=\hbox{\endash\space},
\c!rightsentence=\hbox{\space\endash},
@@ -271,7 +271,7 @@
\installlanguage % for now we copy from slovenian
[\s!sq]
- [\c!command=\v!no,
+ [\c!define=\v!no,
\s!lefthyphenmin=2,
\s!righthyphenmin=2,
\c!spacing=\v!packed,
@@ -284,12 +284,12 @@
\c!leftquotation=\rightguillemot,
\c!rightquotation=\leftguillemot,
\c!date={\v!day,{.},\space,\v!month,\space,\v!year}]
-
+
\installlanguage
[\s!hy]
[\c!spacing=\v!packed,
\c!leftsentence=\endash, % *sentences not confirmed
- \c!rightsentence=\endash,
+ \c!rightsentence=\endash,
\c!leftsubsentence=\endash,
\c!rightsubsentence=\endash,
\c!leftquote=\guilsingleleft,
@@ -613,7 +613,7 @@
\installlanguage
[\s!lt]
- [\c!command=\v!no,
+ [\c!define=\v!no,
\c!spacing=\v!packed,
\c!leftsentence=\emdash,
\c!rightsentence=\emdash,
@@ -755,7 +755,7 @@
\installlanguage
[\s!it]
- [\c!command=\v!no,
+ [\c!define=\v!no,
\c!spacing=\v!packed,
\c!leftsentence=\emdash,
\c!rightsentence=\emdash,
@@ -798,7 +798,7 @@
\c!rightquote=\upperrightsingleninequote,
\c!leftquotation=\upperleftdoublesixquote,
\c!rightquotation=\upperrightdoubleninequote,
- \c!date={\v!year,\space,\v!month,\space,\v!day}]
+ \c!date={\v!day,\space,\v!month,\space,\v!year}]
\installlanguage[\s!pt-br][\c!default=\s!pt] % Brazil
\installlanguage[\s!es-es][\c!default=\s!es] % Spain
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/lang-lab.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/lang-lab.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/lang-lab.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -375,4 +375,27 @@
\permanent\protected\def\LABELTEXT#1{\WORD{\labeltext{#1}}} % only for simple cases!
+%D For publications we have gender specific ones (one could use the main one for a
+%D gender neutral one).
+%D
+%D \startbuffer
+%D \startlines
+%D (\labeltext {demo-texts})
+%D (\labeltexts {demo-texts}{ TEST })
+%D (\leftlabeltext {demo-texts})
+%D (\rightlabeltext{demo-texts})
+%D \stoplines
+%D
+%D \startlines \mainlanguage[cs]
+%D test \btxlabeltext{editor} \par
+%D test \btxlabeltext{editor:f} \par
+%D test \btxlabeltext{editor:m} \par
+%D test \btxlabeltext{editors} \par
+%D test \btxlabeltext{editors:f} \par
+%D test \btxlabeltext{editors:m} \par
+%D \stoplines
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
\protect \endinput
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/lang-url.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/lang-url.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/lang-url.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -23,12 +23,10 @@
local is_letter = characters.is_letter
---[[
-<p>Hyphenating <l n='url'/>'s is somewhat tricky and a matter of taste. I did
-consider using a dedicated hyphenation pattern or dealing with it by node
-parsing, but the following solution suits as well. After all, we're mostly
-dealing with <l n='ascii'/> characters.</p>
-]]--
+-- Hyphenating URL's is somewhat tricky and a matter of taste. I did consider using
+-- a dedicated hyphenation pattern or dealing with it by node parsing, but the
+-- following solution suits as well. After all, we're mostly dealing with ASCII
+-- characters.
local urls = { }
languages.urls = urls
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-ano.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-ano.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-ano.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -26,11 +26,12 @@
local min = math.min
local lpegmatch = lpeg.match
local formatters = string.formatters
-local sortedkeys, concat = table.sortedkeys, table.concat
+local sortedkeys, concat, swapped = table.sortedkeys, table.concat, table.swapped
local trace_references = false trackers.register("references.references", function(v) trace_references = v end)
local trace_destinations = false trackers.register("references.destinations", function(v) trace_destinations = v end)
local trace_bookmarks = false trackers.register("references.bookmarks", function(v) trace_bookmarks = v end)
+local trace_externals = false trackers.register("references.externals", function(v) trace_externals = v end)
local log_destinations = false directives.register("destinations.log", function(v) log_destinations = v end)
local untex_urls = true directives.register("references.untexurls", function(v) untex_urls = v end)
@@ -510,59 +511,65 @@
if method == v_page then
for n=1,#names do
local name = names[n]
- local used = usedviews[name]
- if used and used ~= true then
- -- already done, maybe a warning
- elseif type(name) == "number" then
- -- if noview then
- -- usedviews[name] = view
- -- names[n] = false
- -- else
+ if name then
+ local used = usedviews[name]
+ if used and used ~= true then
+ -- already done, maybe a warning
+ elseif type(name) == "number" then
+ -- if noview then
+ -- usedviews[name] = view
+ -- names[n] = false
+ -- else
+ usedviews[name] = view
+ names[n] = false
+ -- end
+ else
usedviews[name] = view
- names[n] = false
- -- end
- else
- usedviews[name] = view
+ end
end
end
elseif method == v_name then
for n=1,#names do
local name = names[n]
- local used = usedviews[name]
- if used and used ~= true then
- -- already done, maybe a warning
- elseif type(name) == "number" then
- local used = usedinternals[name]
- usedviews[name] = view
- names[n] = registerautoprefix(name)
- doview = true
- else
- usedviews[name] = view
- doview = true
+ if name then
+ local used = usedviews[name]
+ if used and used ~= true then
+ -- already done, maybe a warning
+ elseif type(name) == "number" then
+ local used = usedinternals[name]
+ usedviews[name] = view
+ names[n] = registerautoprefix(name)
+ doview = true
+ else
+ usedviews[name] = view
+ doview = true
+ end
end
end
else
for n=1,#names do
local name = names[n]
- if usedviews[name] then
- -- already done, maybe a warning
- elseif type(name) == "number" then
- if noview then
- usedviews[name] = view
- names[n] = false
- else
- local used = usedinternals[name]
- if used and used ~= defaultview then
+ if name then
+ if usedviews[name] then
+ -- already done, maybe a warning
+ elseif type(name) == "number" then
+ if noview then
usedviews[name] = view
- names[n] = registerautoprefix(name)
- doview = true
+ names[n] = false
else
- names[n] = false
+ local used = usedinternals[name]
+ if used and used ~= defaultview then
+ usedviews[name] = view
+ names[n] = registerautoprefix(name)
+ doview = true
+ else
+ names[n] = false
+ end
end
+ else
+ usedviews[name] = view
+ doview = true
end
- else
- usedviews[name] = view
- doview = true
end
end
end
@@ -634,20 +641,95 @@
-- annotations
-local function pdffilelink(filename,destination,page,actions)
- if not filename or filename == "" or file.basename(filename) == tex.jobname then
- return false
+local pdffilelink do
+
+ local valid = table.setmetatableindex(function(t,filename)
+ local found = false
+ if lfs.isfile(filename) then
+ report_destinations("loading destinations from file %a",filename)
+ local pdffile = lpdf.epdf.load(filename)
+ if pdffile then
+ local pages = pdffile.pages
+ local nofpages = pdffile.nofpages
+ local destinations = pdffile.destinations
+ if pages and nofpages > 0 and destinations then
+ local reverse = swapped(pages)
+ local total = 0
+ found = { }
+ for k, v in next, destinations do
+ local D = v.D
+ if D then
+ found[k] = reverse[D[1]]
+ total = total + 1
+ end
+ end
+ t[filename] = found
+ report_destinations("%i destinations on %i pages found",total,nofpages)
+ end
+ end
+ end
+ return found
+ end)
+
+ local pagefromhash = structures.references.pagefromhash
+
+ pdffilelink = function(filename,destination,page,actions)
+ if not filename or filename == "" or file.basename(filename) == tex.jobname then
+ return false
+ end
+ filename = file.addsuffix(filename,"pdf")
+ -- page auto name
+ local forcepage = false
+ if not destination or destination == "" then
+ forcepage = true
+ elseif references.outermethod == v_page then
+ if not page then
+ local hash = valid[filename]
+ page = hash and hash[destination]
+ if not page or trace_externals then
+ report_destinations("no %s destination %a in file %a","page",destination,filename)
+ end
+ end
+ forcepage = true
+ else -- name or auto, maybe only check with auto
+ local hash = valid[filename]
+ if hash then
+ local p = nil
+ p, destination = pagefromhash(hash,destination,page,actions)
+ if p then
+ if references.outermethod == v_name then
+ -- keep destination string
+ elseif page then
+ if p ~= page then
+ report_destinations("page %i for destination %a in %a conflicts, %i expected",page,destination,filename,p)
+ page = p
+ end
+ forcepage = true
+ elseif p then
+ page = p
+ forcepage = true
+ end
+ else
+ if not page or trace_externals then
+ report_destinations("no %s destination %a in file %a","name",destination,filename)
+ end
+ forcepage = true
+ end
+ -- else
+ -- keep destination string
+ end
+ end
+ if forcepage then
+ destination = pdfarray { (page or 1) - 1, pdf_fit }
+ end
+ return pdfdictionary {
+ S = pdf_gotor, -- can also be pdf_launch
+ F = filename,
+ D = destination or defaultdestination,
+ NewWindow = actions.newwindow and true or nil,
+ }
end
- filename = file.addsuffix(filename,"pdf")
- if (not destination or destination == "") or (references.outermethod == v_page) then
- destination = pdfarray { (page or 1) - 1, pdf_fit }
- end
- return pdfdictionary {
- S = pdf_gotor, -- can also be pdf_launch
- F = filename,
- D = destination or defaultdestination,
- NewWindow = actions.newwindow and true or nil,
- }
+
end
local untex = references.urls.untex
@@ -725,6 +807,7 @@
function codeinjections.prerollreference(actions) -- share can become option
if actions then
+-- inspect(actions)
local main, n = pdfaction(actions)
if main then
local bs, bc = pdfborder()
@@ -980,6 +1063,9 @@
end
runners["outer with inner"] = function(var,actions)
+ if var.r then
+ actions.realpage = var.r
+ end
return pdffilelink(references.checkedfile(var.outer),var.inner,var.r,actions)
end
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-img.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-img.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-img.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -67,6 +67,7 @@
local zlibdecompress = xzip.decompress
local trace = false
+local cleanvirtual = resolvers.cleaners.virtual -- false -- for now
local report_jpg = logs.reporter("graphics","jpg")
local report_jp2 = logs.reporter("graphics","jp2")
@@ -74,6 +75,8 @@
trackers.register("graphics.backend", function(v) trace = v end)
+directives.register("graphics.cleanvirtuals", function(v) cleanvirtual = v and resolvers.cleaners.virtual or false end)
+
local injectors = { }
lpdf.injectors = injectors
@@ -158,6 +161,9 @@
if trace then
report_jpg("%s: width %i, height %i, colordepth %i, size %i",filename,xsize,ysize,colordepth,#content)
end
+ if cleanvirtual then
+ cleanvirtual(filename)
+ end
return createimage {
bbox = { 0, 0, specification.width/xsize, specification.height/ysize }, -- mandate
transform = specification.transform,
@@ -197,6 +203,9 @@
if trace then
report_jp2("%s: width %i, height %i, size %i",filename,xsize,ysize,#content)
end
+ if cleanvirtual then
+ cleanvirtual(filename)
+ end
return createimage {
bbox = { 0, 0, specification.width/xsize, specification.height/ysize }, -- mandate
transform = specification.transform,
@@ -1211,6 +1220,9 @@
end
local width = specification.width or xsize * 65536
local height = specification.height or ysize * 65536
+ if cleanvirtual then
+ cleanvirtual(filename)
+ end
return createimage {
bbox = { 0, 0, width/xsize, height/ysize }, -- mandate
transform = specification.transform,
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-lmt.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-lmt.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-lmt.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -38,6 +38,7 @@
local concat, sortedhash = table.concat, table.sortedhash
local setmetatableindex = table.setmetatableindex
local loaddata = io.loaddata
+local ceil = math.ceil
local bpfactor <const> = number.dimenfactors.bp
@@ -2272,11 +2273,16 @@
}
end
if xformtype == 0 or xformtype == 1 or xformtype == 3 then
+-- wrapper.BBox = pdfarray {
+-- -margin * bpfactor,
+-- -margin * bpfactor,
+-- (boundingbox[3] + margin) * bpfactor,
+-- (boundingbox[4] + margin) * bpfactor,
wrapper.BBox = pdfarray {
- -margin * bpfactor,
- -margin * bpfactor,
- (boundingbox[3] + margin) * bpfactor,
- (boundingbox[4] + margin) * bpfactor,
+ -ceil( margin * bpfactor),
+ -ceil( margin * bpfactor),
+ ceil((boundingbox[3] + margin) * bpfactor),
+ ceil((boundingbox[4] + margin) * bpfactor),
}
end
if xformtype == 0 or xformtype == 2 or xformtype == 3 then
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-pde.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-pde.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-pde.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -67,7 +67,6 @@
local lpdf_epdf = { }
lpdf.epdf = lpdf_epdf
-local pdfopen = pdfe.open
local pdfopenfile = pdfe.openfile
local pdfnew = pdfe.new
local pdfclose = pdfe.close
@@ -540,10 +539,9 @@
local __file__
if fromstring then
__data__ = pdfnew(filename,#filename)
- elseif pdfopenfile then
- __data__ = pdfopenfile(ioopen(filename,"rb"))
else
- __data__ = pdfopen(filename)
+ local f = ioopen(filename,"rb")
+ __data__ = f and pdfopenfile(f)
end
if __data__ then
if userpassword and getstatus(__data__) < 0 then
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-rul.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-rul.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-rul.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -21,7 +21,7 @@
local getwhd = nuts.getwhd
-local lefttoright_code = nodes.dirvalues.lefttoright
+local lefttoright_code = tex.directioncodes.lefttoright
local mpcolor = attributes.colors.mpcolor
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-xmp.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-xmp.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/lpdf-xmp.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -346,7 +346,8 @@
pdfaddtoinfo("ConTeXt.Jobname",jobname)
end
--
- pdfaddtoinfo("ConTeXt.Url","www.pragma-ade.com")
+ -- pdfaddtoinfo("ConTeXt.Url","www.pragma-ade.com")
+ pdfaddtoinfo("ConTeXt.Url","github.com/contextgarden/context")
pdfaddtoinfo("ConTeXt.Support","contextgarden.net")
pdfaddtoinfo("TeX.Support","tug.org")
--
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/luat-cbk.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/luat-cbk.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/luat-cbk.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -12,20 +12,16 @@
local round = math.round
local sortedhash, sortedkeys, tohash = table.sortedhash, table.sortedkeys, table.tohash
---[[ldx--
-<p>Callbacks are the real asset of <l n='luatex'/>. They permit you to hook
-your own code into the <l n='tex'/> engine. Here we implement a few handy
-auxiliary functions.</p>
---ldx]]--
+-- Callbacks are the real asset of LuaTeX. They permit you to hook your own code
+-- into the TeX engine. Here we implement a few handy auxiliary functions. Watch
+-- out, there are diferences between LuateX and LuaMetaTeX.
callbacks = callbacks or { }
local callbacks = callbacks
---[[ldx--
-<p>When you (temporarily) want to install a callback function, and after a
-while wants to revert to the original one, you can use the following two
-functions. This only works for non-frozen ones.</p>
---ldx]]--
+-- When you (temporarily) want to install a callback function, and after a while
+-- wants to revert to the original one, you can use the following two functions.
+-- This only works for non-frozen ones.
local trace_callbacks = false trackers.register("system.callbacks", function(v) trace_callbacks = v end)
local trace_calls = false -- only used when analyzing performance and initializations
@@ -47,13 +43,12 @@
local permit_overloads = false
local block_overloads = false
---[[ldx--
-<p>By now most callbacks are frozen and most provide a way to plug in your own code. For instance
-all node list handlers provide before/after namespaces and the file handling code can be extended
-by adding schemes and if needed I can add more hooks. So there is no real need to overload a core
-callback function. It might be ok for quick and dirty testing but anyway you're on your own if
-you permanently overload callback functions.</p>
---ldx]]--
+-- By now most callbacks are frozen and most provide a way to plug in your own code.
+-- For instance all node list handlers provide before/after namespaces and the file
+-- handling code can be extended by adding schemes and if needed I can add more
+-- hooks. So there is no real need to overload a core callback function. It might be
+-- ok for quick and dirty testing but anyway you're on your own if you permanently
+-- overload callback functions.
-- This might become a configuration file only option when it gets abused too much.
@@ -171,12 +166,15 @@
end
function callbacks.report()
+ local usage = list_callbacks()
for name, _ in sortedhash(list) do
local str = frozen[name]
+ local sta = state(name)
+ local use = usage[name] and "+" or "-"
if str then
- report_callbacks("%s: %s -> %s",state(name),name,str)
+ report_callbacks("%-9s : %s : %-22s -> %s",sta,use,name,str)
else
- report_callbacks("%s: %s",state(name),name)
+ report_callbacks("%-9s : %s : %-22s", sta,use,name)
end
end
end
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/luat-cnf.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/luat-cnf.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/luat-cnf.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -60,7 +60,7 @@
-- not in luametatex
"unicode", "utf", "gzip", "zip", "zlib",
-- in luametatex
- "xzip", "xmath", "xcomplex", "xdecimal", "basexx",
+ "xzip", "xmath", "xcomplex", "xdecimal", "basexx", "posit",
-- maybe some day in luametatex
"lz4", "lzo",
-- always (mime can go)
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/luat-cod.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/luat-cod.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/luat-cod.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -42,7 +42,7 @@
\toksapp \everydump {%
\permanent\let\ctxlatelua \latelua
\permanent\def\ctxlatecommand#1{\latelua{commands.#1}}%
- \aliased\let\lateluacode \ctxlatelua
+ \aliased\let\lateluacode \ctxlatelua
} % no \appendtoks yet
\protect \endinput
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/luat-ini.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/luat-ini.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/luat-ini.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,11 +6,9 @@
license = "see context related readme files"
}
---[[ldx--
-<p>We cannot load anything yet. However what we will do us reserve a few tables.
-These can be used for runtime user data or third party modules and will not be
-cluttered by macro package code.</p>
---ldx]]--
+-- We cannot load anything yet. However what we will do us reserve a few tables.
+-- These can be used for runtime user data or third party modules and will not be
+-- cluttered by macro package code.
userdata = userdata or { } -- for users (e.g. functions etc)
thirddata = thirddata or { } -- only for third party modules
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/luat-lib.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/luat-lib.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/luat-lib.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -34,7 +34,7 @@
\registerctxluafile{util-sta}{}
-\registerctxluafile{util-sbx}{} % needs tracker and templates
+\registerctxluafile{util-sbx}{autosuffix} % needs tracker and templates
\registerctxluafile{util-soc-imp-reset} {}
\registerctxluafile{util-soc-imp-socket} {}
@@ -66,7 +66,7 @@
\registerctxluafile{data-dec}{}
\registerctxluafile{data-tar}{}
%registerctxluafile{data-crl}{}
-\registerctxluafile{data-sch}{}
+\registerctxluafile{data-sch}{autosuffix}
\registerctxluafile{data-tre}{}
\registerctxluafile{data-lua}{}
\registerctxluafile{data-ctx}{}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/luat-run.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/luat-run.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/luat-run.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -156,10 +156,10 @@
-- this can be done later
-callbacks.register('start_run', start_run, "actions performed at the beginning of a run")
-callbacks.register('stop_run', stop_run, "actions performed at the end of a run")
+callbacks.register("start_run", start_run, "actions performed at the beginning of a run")
+callbacks.register("stop_run", stop_run, "actions performed at the end of a run")
callbacks.register("pre_dump", pre_dump_actions, "lua related finalizers called before we dump the format") -- comes after \everydump
-callbacks.register('wrapup_run', wrapup_run, "actions performed after closing files")
+callbacks.register("wrapup_run", wrapup_run, "actions performed after closing files")
-- an example:
@@ -201,8 +201,6 @@
local report_close = logs.reporter("close source")
local report_load = logs.reporter("load resource")
-local register = callbacks.register
-
local level = 0
local total = 0
local stack = { }
@@ -211,57 +209,58 @@
return stack[#stack] or tex.jobname
end
+function luatex.currentlevel()
+ return level
+end
+
+function luatex.currenttotal()
+ return total
+end
+
+local enabled = true directives.register("system.reportfiles", function(v) enabled = v end)
+
local function report_start(name,rest)
- if rest then
- -- luatex
- if name ~= 1 then
+ if enabled then
+ if rest then
+ -- luatex
+ if name ~= 1 then
+ insert(stack,false)
+ return
+ end
+ name = rest
+ end
+ if find(name,"virtual://",1,true) then
insert(stack,false)
- return
+ else
+ insert(stack,name)
+ total = total + 1
+ level = level + 1
+ -- report_open("%i > %i > %s",level,total,name or "?")
+ report_open("level %i, order %i, name %a",level,total,name or "?")
+ synctex.setfilename(name)
end
- name = rest
end
- if find(name,"virtual://",1,true) then
- insert(stack,false)
- else
- insert(stack,name)
- total = total + 1
- level = level + 1
- -- report_open("%i > %i > %s",level,total,name or "?")
- report_open("level %i, order %i, name %a",level,total,name or "?")
- synctex.setfilename(name)
- end
end
local function report_stop()
- local name = remove(stack)
- if name then
- -- report_close("%i > %i > %s",level,total,name or "?")
- report_close("level %i, order %i, name %a",level,total,name or "?")
- level = level - 1
- name = stack[#stack]
--- synctex.setfilename(stack[#stack] or tex.jobname)
+ if enabled then
+ local name = remove(stack)
if name then
- synctex.setfilename(name)
+ -- report_close("%i > %i > %s",level,total,name or "?")
+ report_close("level %i, order %i, name %a",level,total,name or "?")
+ level = level - 1
+ name = stack[#stack]
+ -- synctex.setfilename(stack[#stack] or tex.jobname)
+ if name then
+ synctex.setfilename(name)
+ end
end
end
end
-local function report_none()
-end
+callbacks.register("start_file",report_start,"report opening of a file")
+callbacks.register("stop_file", report_stop, "report closing of a file")
-register("start_file",report_start)
-register("stop_file", report_stop)
-
-directives.register("system.reportfiles", function(v)
- if v then
- register("start_file",report_start)
- register("stop_file", report_stop)
- else
- register("start_file",report_none)
- register("stop_file", report_none)
- end
-end)
-
-- start_run doesn't work
-- luatex.registerstartactions(function()
@@ -273,7 +272,7 @@
local report = logs.reporter("csname overload")
local reported = { }
-callback.register("handle_overload", function(fatal,overload,csname,flags)
+callbacks.register("handle_overload", function(fatal,overload,csname,flags)
if not reported[csname] then
logs.newline()
local readstate = status.readstate
@@ -295,7 +294,7 @@
osexit(1)
end
end
-end)
+end,"handle primitive and macro overload protection")
-- bonus
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/lxml-ini.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/lxml-ini.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/lxml-ini.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -83,7 +83,7 @@
\immutable\def\xmltempbuffername{xml-temp}
\permanent\protected\def\prettyprintbuffer#1#2% only used here
- {\ifdefined\scitebuffer
+ {\ifdefined\scitebuffer % we could predefine to relax
\scitebuffer[#2][#1]%
\else
\typebuffer[#1][\c!option=#2]%
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/math-acc.mklx
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/math-acc.mklx 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/math-acc.mklx 2023-05-06 22:03:57 UTC (rev 67034)
@@ -32,6 +32,49 @@
%D Older implementations are kept in the \MKII\ and \MKIV\ modules for educational
%D purposes.
+%D Only very few fonts provide flat accents but we emulate them for those that don't
+%D have them. We also need to fix the related font parameter for a few fonts like
+%D Lucida and Garamond.
+
+% \startbuffer
+% \im{
+% \dostepwiserecurse{`A}{`Z}{1}{
+% \blackrule[height=\the\Umathflattenedaccentbaseheight\textstyle,depth=0pt,width=0.05ts]
+% \hat{\char#1}
+% }
+% }
+% \stopbuffer
+%
+% \start % TEXpage[offset=1ts]
+% \showglyphs
+% \switchtobodyfont[modern] \getbuffer\par
+% \switchtobodyfont[erewhon] \getbuffer\par
+% \switchtobodyfont[concrete] \getbuffer\par
+% \switchtobodyfont[libertinus] \getbuffer\par
+% \switchtobodyfont[stixtwo] \getbuffer\par
+% \switchtobodyfont[kpfonts] \getbuffer\par
+% \switchtobodyfont[minion] \getbuffer\par
+% \switchtobodyfont[schola] \getbuffer\par
+% \switchtobodyfont[lucida] \getbuffer\par
+% \switchtobodyfont[xcharter] \getbuffer\par
+% \switchtobodyfont[libertinus] \getbuffer\par
+% \switchtobodyfont[termes] \getbuffer\par
+% \stop %TEXpage
+
+% scale:
+%
+% no : only use base
+% yes : use base, variants and extensible, stretch and shrink when set
+% keep : use base, variants and extensible, stretch and shrink when set, but keep base
+%
+% alignsymbol:
+%
+% center when accent is wider than base
+%
+% stretch|shrink:
+%
+% scale accent to fit (base and variants depending on 'scale' value)
+
\installcorenamespace{mathaccents}
\installcommandhandler \??mathaccents {mathaccent} \??mathaccents
@@ -43,7 +86,10 @@
\c!bottom=,
\c!mathstyle=,
\c!color=,
- \c!stretch=\v!no,
+ \c!scale=\v!no,
+ \c!alignsymbol=\v!yes,
+ %\c!stretch=\v!no,
+ %\c!shrink=\v!no,
\c!define=\v!yes] % not used
\definemathaccent
@@ -92,23 +138,51 @@
\installlocalcurrenthandler \??mathaccents {mathaccent}
+%D \starttyping
+%D \im { \showboxes \showglyphs
+%D \hat{\tilde{\dot{x}}}
+%D }
+%D \im { \showboxes \showglyphs
+%D \hat[align=middle]{\tilde[align=middle]{\dot{x}}}
+%D }
+%D \stoptyping
+
\tolerant\protected\def\math_accent_make_double#class#kind#top#bottom#*[#settings]#:#content%
{\beginmathgroup
\setlocalmathaccentcurrent{#class}% \edef\currentmathaccent{#class}%
\startusemathstyleparameter\mathaccentparameter\c!mathstyle
\setupcurrentmathaccent[#settings]%
- \edef\m_fixed{\ifcstok{\mathaccentparameter\c!stretch}\v!yes\else\s!fixed\fi}%
+ \edef\p_scale{\mathaccentparameter\c!scale}%
+ \ifx\p_scale\v!keep
+ \lettonothing\m_fixed
+ \orelse\ifx\p_scale\v!yes
+ \lettonothing\m_fixed
+ \else
+ \let\m_fixed\s!fixed
+ \fi
\Umathaccent
\usedcolorparameterattributes{\mathaccentparameter\c!color}%
- % nooverflow % there is never na overflow anyway but we do accept thekey
+ % nooverflow % there is never na overflow anyway but we do accept the key
+ \ifcstok{\mathaccentparameter\c!align }\v!middle\s!center \space\fi
+ \ifcstok{\mathaccentparameter\c!stretch}\v!yes \s!stretch\space\fi
+ \ifcstok{\mathaccentparameter\c!shrink }\v!yes \s!shrink \space\fi
+ \ifx\p_scale\v!keep
+ \s!keepbase\space
+ \fi
+ \ifcstok{\mathaccentparameter\c!alignsymbol}\v!yes
+ \s!nooverflow\space
+ \fi
\ifcase#kind\or
- top \m_fixed
+ \s!top\space
+ \m_fixed
\fam\zerocount#top
\or
- bottom \m_fixed
+ \s!bottom\space
+ \m_fixed
\fam\zerocount#bottom
\or
- both \m_fixed
+ \s!both\space
+ \m_fixed
\fam\zerocount#bottom
\fam\zerocount#top
\fi
@@ -135,7 +209,7 @@
\pushoverloadmode
% These retain the given unicode values ... but can stretch when configured
-% to do so: \setupmathaccent[\v!top][\c!stretch=\v!yes]
+% to do so: \setupmathaccent[\v!top][\c!scale=\v!yes]
% Extended/modified below
%
@@ -155,7 +229,7 @@
\definemathtopaccent[\v!top][acute] ["0301]
\definemathtopaccent[\v!top][hat] ["0302]
\definemathtopaccent[\v!top][tilde] ["0303]
-\definemathtopaccent[\v!top][bar] ["0304]
+\definemathtopaccent[\v!top][bar] ["0305]
%definemathtopaccent[\v!top][overbar] ["0305]% We expect overbar to stretch, so later
\definemathtopaccent[\v!top][breve] ["0306]
\definemathtopaccent[\v!top][dot] ["0307]
@@ -170,8 +244,8 @@
%definemathtopaccent[\v!top][overturnedcomma] ["0312]
%definemathtopaccent[\v!top][overcommatopright] ["0315]
%definemathtopaccent[\v!top][leftangleabove] ["031A]
-\definemathtopaccent[\v!top][leftharpoonaccent] ["20D0]
-\definemathtopaccent[\v!top][rightharpoonaccent] ["20D1]
+\definemathtopaccent[\v!top][overleftharpoon] ["20D0]
+\definemathtopaccent[\v!top][overrightharpoon] ["20D1]
%definemathtopaccent[\v!top][verticaloverlayaccent]["20D2]
%definemathtopaccent[\v!top][vec] ["20D7]% We expect vec to stretch, so later
\definemathtopaccent[\v!top][dddot] ["20DB]
@@ -189,17 +263,17 @@
\definemathaccent
[\v!top:\v!stretch]
[\v!top]
- [\c!stretch=\v!yes]
+ [\c!scale=\v!keep,\c!stretch=\v!yes,\c!shrink=\v!yes]
\definemathaccent
[\v!bottom:\v!stretch]
[\v!bottom]
- [\c!stretch=\v!yes]
+ [\c!scale=\v!keep,\c!stretch=\v!yes,\c!shrink=\v!yes]
\definemathaccent
[\v!both:\v!stretch]
[\v!both]
- [\c!stretch=\v!yes]
+ [\c!scale=\v!keep,\c!stretch=\v!yes,\c!shrink=\v!yes]
%D We have a problem. We can use stackers but then we need to adapt the dimensions
%D which is font dependent. So, for now we keep them as accents.
@@ -208,7 +282,7 @@
\definemathtopaccent[\v!top:\v!stretch][wideacute]["0301]
\definemathtopaccent[\v!top:\v!stretch][widehat] ["0302]
\definemathtopaccent[\v!top:\v!stretch][widetilde]["0303]
-\definemathtopaccent[\v!top:\v!stretch][widebar] ["0305]%or 305
+\definemathtopaccent[\v!top:\v!stretch][widebar] ["0305]% (not 304, the caret)
\definemathtopaccent[\v!top:\v!stretch][widebreve]["0306]
\definemathtopaccent[\v!top:\v!stretch][widedot] ["0307]
\definemathtopaccent[\v!top:\v!stretch][wideddot] ["0308]
@@ -220,17 +294,17 @@
\definemathtopaccent[\v!top:\v!stretch][wideoverleftharpoon] ["20D0]
\definemathtopaccent[\v!top:\v!stretch][wideoverrightharpoon] ["20D1]
-\definemathtopaccent[\v!top:\v!stretch][wideoverleftarrow] ["20D6]
-\definemathtopaccent[\v!top:\v!stretch][wideoverrightarrow] ["20D7]
+\definemathtopaccent[\v!top:\v!stretch][wideoverleftarrow] ["20D6]
+\definemathtopaccent[\v!top:\v!stretch][wideoverrightarrow] ["20D7]
\definemathtopaccent[\v!top:\v!stretch][wideoverleftrightarrow]["20E1]
-\definemathbottomaccent[\v!bottom:\v!stretch][wideundertilde]["0330]
-\definemathbottomaccent[\v!bottom:\v!stretch][wideunderbar]["0332]
-\definemathbottomaccent[\v!bottom:\v!stretch][wideunderleftrightarrow]["034D]
-\definemathbottomaccent[\v!bottom:\v!stretch][wideunderrightharpoon]["20EC]
-\definemathbottomaccent[\v!bottom:\v!stretch][wideunderleftharpoon]["20ED]
-\definemathbottomaccent[\v!bottom:\v!stretch][wideunderleftarrow]["20EE]
-\definemathbottomaccent[\v!bottom:\v!stretch][wideunderrightarrow]["20EF]
+\definemathbottomaccent[\v!bottom:\v!stretch][wideundertilde] ["0330]
+\definemathbottomaccent[\v!bottom:\v!stretch][wideunderbar] ["0332]
+\definemathbottomaccent[\v!bottom:\v!stretch][wideunderleftrightarrow]["034D] % weird code
+\definemathbottomaccent[\v!bottom:\v!stretch][wideunderrightharpoon] ["20EC]
+\definemathbottomaccent[\v!bottom:\v!stretch][wideunderleftharpoon] ["20ED]
+\definemathbottomaccent[\v!bottom:\v!stretch][wideunderleftarrow] ["20EE]
+\definemathbottomaccent[\v!bottom:\v!stretch][wideunderrightarrow] ["20EF]
\aliased\let\mathring\ring % for a while
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/math-act.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/math-act.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/math-act.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -18,6 +18,7 @@
local fastcopy, copytable, insert, remove, concat = table.fastcopy, table.copy, table.insert, table.remove, table.concat
local formatters = string.formatters
local byte = string.byte
+local max = math.max
local setmetatableindex, sortedkeys, sortedhash = table.setmetatableindex, table.sortedkeys, table.sortedhash
local lpegmatch = lpeg.match
@@ -45,13 +46,18 @@
local stepper = utilities.parsers.stepper
local helpers = fonts.helpers
-local upcommand = helpers.commands.up
-local downcommand = helpers.commands.down
-local rightcommand = helpers.commands.right
-local leftcommand = helpers.commands.left
-local charcommand = helpers.commands.char
local prependcommands = helpers.prependcommands
+local vfcommands = helpers.commands
+local upcommand = vfcommands.up
+local downcommand = vfcommands.down
+local rightcommand = vfcommands.right
+local leftcommand = vfcommands.left
+local slotcommand = vfcommands.slot
+local charcommand = vfcommands.char
+local push = vfcommands.push
+local pop = vfcommands.pop
+
local sequencers = utilities.sequencers
local appendgroup = sequencers.appendgroup
local appendaction = sequencers.appendaction
@@ -290,7 +296,7 @@
metadata and metadata.fontname or "unknown",
parameters.size or 655360,
parameters.mathsize or 1,
- string.formatters[fmt](...)
+ formatters[fmt](...)
)
else
print("something is wrong")
@@ -427,6 +433,8 @@
return nxt
end
end
+ elseif list == "flataccent" then
+ return c.flataccent
end
end
end
@@ -527,7 +535,7 @@
k = mathgaps[k] or k
local character = targetcharacters[k]
if character then
--- if not character.tweaked then -- todo: add a force
+ -- if not character.tweaked then -- todo: add a force
local t = type(v)
if t == "number" then
v = list[v]
@@ -660,7 +668,7 @@
else
report_mathtweak("invalid dimension entry %U",k)
end
--- character.tweaked = true
+ -- character.tweaked = true
if v.all then
local nxt = character.next
if nxt then
@@ -674,7 +682,7 @@
end
end
end
--- end
+ -- end
else
report_tweak("no character %U",target,original,k)
end
@@ -1303,6 +1311,7 @@
else
c.width = width
end
+c.bottomanchor = width/2 -- maybe optional
end
if italic then
c.italic = nil
@@ -1343,8 +1352,9 @@
end
end
end
- return
- elseif not list or list == "all" or list == true or parameters.all then
+ goto done
+ end
+ if not list or list == "all" or list == true or parameters.all then
list = sortedkeys(targetcharacters)
elseif type(list) == "string" then
list = { list }
@@ -1371,6 +1381,7 @@
end
end
end
+ ::done::
feedback_tweak(whatever,target,original,done)
end
@@ -1695,7 +1706,8 @@
accent = {
[0x0300] = over, -- widegrave
[0x0308] = over, -- wideddot
- [0x0304] = over, -- widebar
+ [0x0304] = over, -- macron (bar)
+ [0x0305] = over, -- widebar
[0x0301] = over, -- wideacute
[0x0302] = over, -- widehat
[0x030C] = over, -- widecheck
@@ -1710,7 +1722,7 @@
datasets.accentdimensions = candidates
local function adapt(c,factor,baseheight,basedepth)
--- if not c.tweaked then
+ if not c.tweaked then
local height = c.height or 0
local depth = c.depth or 0
local yoffset = 0
@@ -1736,8 +1748,8 @@
c.yoffset = yoffset ~= 0 and yoffset or nil
c.height = height > 0 and height or nil
c.depth = depth > 0 and depth or nil
--- c.tweaked = true
--- end
+ c.tweaked = true
+ end
end
local function process(target,original,characters,list,baseheight,basedepth)
@@ -1806,46 +1818,18 @@
do
- local addprivate = fonts.helpers.addprivate
- local privateslot = fonts.helpers.privateslot
+ local addprivate = fonts.helpers.addprivate
+ local privateslot = fonts.helpers.privateslot
+ local newprivateslot = fonts.helpers.newprivateslot
- -- function mathtweaks.addrules(target,original,parameters)
- -- local characters = target.characters
- -- local height = target.mathparameters.OverbarRuleThickness
- -- local depth = target.mathparameters.UnderbarRuleThickness
- -- local width = target.parameters.emwidth/2
- -- local step = 0.8 * width
- -- characters[0x203E] = { -- over
- -- width = width,
- -- height = height,
- -- depth = 0,
- -- unicode = 0x203E,
- -- commands = { { "rule", height, width } },
- -- parts = {
- -- { advance = width, ["end"] = step, glyph = 0x203E, start = 0 },
- -- { advance = width, ["end"] = 0, glyph = 0x203E, start = step, extender = 1 },
- -- }
- -- }
- -- characters[0x0332] = { -- under
- -- width = width,
- -- height = 0,
- -- depth = depth,
- -- yoffset = -depth,
- -- unicode = 0x0332,
- -- commands = { { "rule", height, width } },
- -- parts = {
- -- { advance = width, ["end"] = step, glyph = 0x0332, start = 0 },
- -- { advance = width, ["end"] = 0, glyph = 0x0332, start = step, extender = 1 },
- -- }
- -- }
- -- end
-
function mathtweaks.addrules(target,original,parameters)
local characters = target.characters
local thickness = target.mathparameters.OverbarRuleThickness
local width = target.parameters.emwidth / 2
- local step = 0.8 * width
- characters[0x203E] = { -- over
+ local width = target.parameters.emwidth / 3
+-- local step = 0.8 * width
+ local step = 0.5 * width
+ characters[0x203E] = { -- middle used for all kind
width = width,
height = thickness / 2,
depth = thickness / 2,
@@ -1858,9 +1842,44 @@
},
partsorientation = "horizontal",
}
+ local function build(target,leftarrow,rightarrow)
+ if leftarrow and rightarrow then
+ -- actually the same sort of code as we have for antykwa
+ local left = leftarrow.parts
+ local right = rightarrow.parts
+ if left and right then
+ local leftline = right[1].glyph
+ local rightline = left [#left].glyph
+ local leftdata = characters[leftline]
+ local rightdata = characters[rightline]
+ local leftwidth = leftdata.width
+ local rightwidth = rightdata.width
+ local result = characters[target] -- copytable(leftdata)
+ if not result or result.width == 0 then
+ result = {
+ height = leftdata.height,
+ depth = leftdata.depth,
+ width = 0.9*leftwidth + rightwidth,
+ unicode = target,
+ commands = {
+ slotcommand[0][leftline],
+ leftcommand[0.1*leftwidth],
+ slotcommand[0][rightline],
+ },
+ }
+ characters[target] = result
+ end
+ result.parts = {
+ { advance = leftwidth, glyph = leftline, ["end"] = .9*leftwidth, start = 0 },
+ { advance = rightwidth, glyph = rightline, ["end"] = .1*leftwidth, start = .9*rightwidth, extender = 1 },
+ }
+ result.partsorientation = "horizontal"
+ end
+ end
+ end
+ build(0x305,characters[0x20D6],characters[0x20D7]) -- overbar accent
+ build(0x332,characters[0x20EE],characters[0x20EF]) -- underbar accent
--
- characters[0x0332] = characters[0x203E]
- --
-- lucida lacks them ...
--
local half = thickness / 2
@@ -1875,11 +1894,16 @@
commands = { { "rule", thickness * 2.5, thickness } },
})
characters[0x23B4] = { -- over
- width = width,
+-- width = width,
+ width = 2*thickness+width,
height = half,
depth = double,
unicode = 0x23B4,
- commands = { { "rule", thickness, width } },
+ commands = {
+ slotcommand[0][tpiece],
+ slotcommand[0][0x203E],
+ slotcommand[0][tpiece],
+ },
parts = {
{ advance = thickness, glyph = tpiece, ["end"] = 0, start = half },
{ advance = width, glyph = 0x203E, ["end"] = step, start = step, extender = 1 },
@@ -1896,12 +1920,16 @@
yoffset = - half,
commands = { { "rule", thickness * 2.5, thickness } },
})
- characters[0x23B5] = { -- over
- width = width,
+ characters[0x23B5] = { -- under
+ width = 2*thickness+width,
height = double,
depth = half,
unicode = 0x23B5,
- commands = { { "rule", thickness, width } },
+ commands = {
+ slotcommand[0][bpiece],
+ slotcommand[0][0x203E],
+ slotcommand[0][bpiece],
+ },
parts = {
{ advance = thickness, glyph = bpiece, ["end"] = 0, start = half },
{ advance = width, glyph = 0x203E, ["end"] = step, start = step, extender = 1 },
@@ -1913,10 +1941,216 @@
--
end
+ -- vfmath.builders.extension(target)
+
+ local rbe = newprivateslot("radical bar extender")
+ local fbe = newprivateslot("fraction bar extender")
+
+ local frp = {
+ newprivateslot("flat rule left piece"),
+ newprivateslot("flat rule middle piece"),
+ newprivateslot("flat rule right piece"),
+ }
+
+ local rrp = {
+ newprivateslot("radical rule left piece"),
+ newprivateslot("radical rule middle piece"),
+ newprivateslot("radical rule right piece"),
+ }
+
+ local mrp = {
+ newprivateslot("minus rule left piece"),
+ newprivateslot("minus rule middle piece"),
+ newprivateslot("minus rule right piece"),
+ }
+
+ local function useminus(target,unicode,characters,parameters,skipfirst,what,tounicode)
+ local minus = characters[0x2212]
+ local parts = minus.parts
+ if parameters == true then
+ parameters = { }
+ end
+ if parts then
+ what = copytable(what)
+ parts = copytable(parts)
+ local xscale = parameters.xscale or 1 -- why not applied to width ?
+ local yscale = parameters.yscale or 1
+ local mwidth = minus.width
+ local mheight = minus.height
+ local height = (parameters.height or 1) * mheight
+ local yshift = (parameters.yoffset or 0) * mheight
+ local loverlap = parameters.leftoverlap or 0
+ local roverlap = parameters.rightoverlap or 0
+ local loffset = parameters.leftoffset or 0
+ local roffset = parameters.rightoffset or 0
+ if skipfirst then
+ remove(parts,1)
+ remove(what,1)
+ end
+ height = height / 2
+ yshift = yshift + height
+ for i=1,#parts do
+ local part = parts[i]
+ local glyph = part.glyph
+ local gdata = characters[glyph]
+ local width = gdata.width
+ local xshift = 0
+ if i == 1 and loverlap ~= 0 then
+ xshift = loverlap * width
+ width = width - xshift
+ elseif i == #parts and roverlap ~= 0 then
+ width = width + roverlap * width
+ end
+ characters[what[i]] = {
+ height = height,
+ depth = height,
+ width = width,
+ advance = gdata.width,
+ commands = {
+ leftcommand[xshift],
+ downcommand[yshift],
+ { "slot", 0, glyph, xscale, yscale },
+ },
+ }
+if part["start"] >= width then
+ part["start"] = width
+end
+if part["end"] >= width then
+ part["end"] = width
+end
+part.advance = width
+ part.glyph = what[i]
+ end
+ xshift = loffset * mwidth + loverlap * mwidth
+ width = mwidth - xshift - roffset * mwidth - roverlap * mwidth
+ characters[unicode] = {
+ -- base character
+ height = height,
+ depth = height,
+ width = width,
+ commands = {
+ leftcommand[xshift],
+ downcommand[yshift],
+ { "slot", 0, 0x2212, xscale, yscale },
+ },
+ unicode = tounicode or unicode,
+ -- extensibles
+ parts = parts,
+ partsorientation = "horizontal",
+ }
+ end
+ end
+
+ -- add minus parts of not there and create clipped clone
+
+ local function checkminus(target,unicode,characters,parameters,skipfirst,what,tounicode)
+ local minus = characters[unicode]
+ local parts = minus.parts
+ if parameters == true then
+ parameters = { }
+ end
+ local p_normal = 0
+ local p_flat = 0
+ local mwidth = minus.width
+ local height = minus.height
+ local depth = minus.depth
+ local loffset = parameters.leftoffset or 0
+ local roffset = parameters.rightoffset or 0
+ local lshift = mwidth * loffset
+ local rshift = mwidth * roffset
+ local width = mwidth - lshift - rshift
+ if parts then
+ -- print("minus has parts")
+ if lshift ~= 0 or width ~= mwidth then
+ parts = copytable(parts)
+ for i=1,#parts do
+ local part = parts[i]
+ local glyph = part.glyph
+ local gdata = characters[glyph]
+ local width = gdata.width
+ local advance = part.advance
+ local lshift = 0
+ if i == 1 and left ~= 0 then
+ lshift = loffset * width
+ width = width - lshift
+ advance = advance - lshift
+ elseif i == #parts and roffset ~= 0 then
+ width = width - rshift
+ advance = advance - rshift
+ end
+ characters[what[i]] = {
+ height = height,
+ depth = depth,
+ width = width,
+ commands = {
+ leftcommand[lshift],
+ slotcommand[0][glyph],
+-- { "offset", lshift, 0, glyph },
+ },
+ }
+ part.glyph = what[i]
+ part.advance = advance
+ end
+ minus.parts = parts
+ minus.partsorientation = "horizontal"
+
+ end
+ else
+ local f_normal = formatters["M-NORMAL-%H"](unicode)
+ -- local p_normal = hasprivate(main,f_normal)
+ p_normal = addprivate(target,f_normal,{
+ height = height,
+ width = width,
+ commands = {
+ push,
+ leftcommand[lshift],
+ slotcommand[0][unicode],
+ pop,
+-- { "offset", lshift, 0, unicode },
+ },
+ })
+-- local step = width/2
+ local step = .8*width
+ minus.parts = {
+ { extender = 0, glyph = p_normal, ["end"] = step, start = 0, advance = width },
+ { extender = 1, glyph = p_normal, ["end"] = step, start = step, advance = width },
+ { extender = 0, glyph = p_normal, ["end"] = 0, start = step, advance = width },
+ }
+ minus.partsorientation = "horizontal"
+ end
+ minus.unicode = tounicode or unicode
+ end
+
+ function mathtweaks.replacerules(target,original,parameters)
+ local characters = target.characters
+ local minus = parameters.minus
+ local fraction = parameters.fraction
+ local radical = parameters.radical
+ local stacker = parameters.stacker
+ if minus then
+ checkminus(target,0x2212,characters,minus,false,mrp)
+ end
+ if fraction then
+ useminus(target,fbe,characters,fraction,false,frp,0x2044) -- division slash
+ end
+ if radical then
+if not characters[rbe] then
+ local skipfirst = true
+ if radical.skipfirst == false then -- explicit
+ skipfirst = false
+ end
+ useminus(target,rbe,characters,radical,skipfirst,rrp,0x2061) -- apply function
+end
+ end
+ if stacker then
+ useminus(target,0x203E,characters,stacker,false,frp)
+ end
+ end
+
local force = false experiments.register("math.arrows", function(v) force = v end)
local function tighten(target,unicode,left,right,squeeze,yoffset)
- local name = string.formatters["math tightened %U %.3N %.3N %.3N %.3N"](unicode,left,right,squeeze,yoffset)
+ local name = formatters["math tightened %U %.3N %.3N %.3N %.3N"](unicode,left,right,squeeze,yoffset)
local slot = privateslot(target,name)
if not slot then
local characters = target.characters
@@ -1947,7 +2181,7 @@
if chardata and (force or overloads[unicode] == false or not chardata.parts) then
if not list then
-- chardata.parts = nil -- when we test
- chardata.parts = { { glyph = unicode } }
+-- chardata.parts = { { glyph = unicode } }
else
local overload = overloads[unicode]
local parts = { }
@@ -1982,7 +2216,8 @@
end
end
if #parts == #list then
- chardata.parts = parts
+ chardata.parts = parts
+ chardata.partsorientation = "horizontal"
end
end
end
@@ -2024,6 +2259,7 @@
return {
--
[0x002D] = { { left = slack, right = slack, glyph = 0x2212 }, single }, -- rel
+-- [0x2212] = { { left = slack, right = slack, glyph = 0x2212 }, single }, -- rel
--
[0x2190] = leftsingle, -- leftarrow
[0x219E] = leftsingle, -- twoheadleftarrow
@@ -2259,7 +2495,8 @@
local function fix(target,original,characters,u,l)
local data = characters[u]
if data then
- data.innerlocation = l.location == "right" and 2 or 1
+ -- data.innerlocation = l.location == "right" and 2 or 1
+ data.innerlocation = l.location == "right" and "right" or "left"
data.innerxoffset = (l.hfactor or 1) * (data.width or 0)
data.inneryoffset = (l.vfactor or 1) * ((data.height or 0) + (data.depth or 0))
end
@@ -2451,17 +2688,18 @@
local nps = fonts.helpers.newprivateslot
local mapping = {
- [0x0300] = { 0x0060, false, nps("flat 0x0060 1") },
- [0x0308] = { 0x00A8, false, nps("flat 0x00A8 1") },
- [0x0304] = { 0x00AF, false, nps("flat 0x00AF 1") },
- [0x0301] = { 0x00B4, false, nps("flat 0x00B4 1") },
- [0x0302] = { 0x02C6, true, nps("flat 0x02C6 1") },
- [0x030C] = { 0x02C7, true, nps("flat 0x02C7 1") },
- [0x0306] = { 0x02D8, false, nps("flat 0x02D8 1") },
- [0x0307] = { 0x02D9, false, nps("flat 0x02D9 1") },
- [0x030A] = { 0x02DA, false, nps("flat 0x02DA 1") },
- [0x0303] = { 0x02DC, true, nps("flat 0x02DC 1") },
- [0x20DB] = { 0x20DB, false, nps("flat 0x20DB 1") },
+ [0x0300] = { 0x0060, false },
+ [0x0308] = { 0x00A8, false },
+ [0x0304] = { 0x00AF, false }, -- 305
+ [0x0301] = { 0x00B4, false },
+ [0x0302] = { 0x02C6, true },
+ [0x030C] = { 0x02C7, true },
+ [0x0306] = { 0x02D8, false },
+ [0x0307] = { 0x02D9, false },
+ [0x030A] = { 0x02DA, false },
+ [0x0303] = { 0x02DC, true },
+ [0x20DB] = { 0x20DB, false },
+-- [0x20EF] = { 0x20EF, false },
}
datasets.fixaccents = mapping
@@ -2469,6 +2707,18 @@
datasets.flattenaccents = mapping
datasets.copyaccents = mapping
+ -- local flat = stretchingdata.flataccent
+ -- if flat then
+ -- -- Nasty! xoffset needed. Check this when we patch vf.
+ -- local flatdata = characters[flat]
+ -- flatdata.width = width
+ -- flatdata.advance = 0
+ -- flatdata.topanchor = topanchor
+ -- flatdata.xoffset = width + topanchor
+ -- end
+
+local cdata = characters.data
+
function mathtweaks.fixaccents(target,original,parameters)
local characters = target.characters
local done = false
@@ -2476,13 +2726,27 @@
local alias = entry[1]
local stretchingdata = characters[stretching]
if stretchingdata and stretchingdata.width == 0 then
+if false then
+ local b = target.descriptions[stretching].boundingbox
+ if b then
+ local llx = b[1] * target.parameters.hfactor
+ local urx = b[3] * target.parameters.hfactor
+ width = urx - llx
+ stretchingdata.width = width
+ stretchingdata.xoffset = - llx
+ stretchingdata.advance = urx
+ stretchingdata.topanchor = width/2
+ stretchingdata.bottomanchor = width/2
+ end
+else
local topanchor = stretchingdata.topanchor or 0
local width = -topanchor
- topanchor = width/2
+ topanchor = width/2
stretchingdata.width = width
stretchingdata.advance = 0
stretchingdata.topanchor = topanchor
stretchingdata.commands = { rightcommand[width + topanchor], charcommand[stretching] }
+end
if not trace_tweaking then
done = true
elseif done then
@@ -2495,6 +2759,56 @@
feedback_tweak("fixaccents",target,original,done)
end
+ function mathtweaks.checkaccents(target,original,parameters)
+ local characters = target.characters
+ local done = false
+ local factor = target.parameters.hfactor
+ for unicode, data in sortedhash(characters) do
+ local width = data.width
+ if width == 0 then
+ local d = chardata[data.unicode or unicode]
+ local c = d and d.category
+ if c == "mn" or c == "sk" or c == "lm" then -- we can probably can go
+ local b = target.descriptions[unicode].boundingbox
+ if b then
+ local topanchor = data.topanchor or 0
+ local llx = b[1] * factor
+ local urx = b[3] * factor
+-- if topanchor < 0 then
+if true then
+ -- width = - topanchor
+ width = 2 * (topanchor - llx)
+-- data.commands = {
+-- -- rightcommand[width+width/2],
+-- rightcommand[-llx],
+-- slotcommand[0][unicode]
+-- }
+data.xoffset = -llx
+else
+ width = urx - llx
+ -- data.advance = urx
+ data.commands = {
+ leftcommand[llx],
+ slotcommand[0][unicode]
+ }
+end
+ data.width = width
+ data.topanchor = width/2
+ data.bottomanchor = width/2
+ end
+ if not trace_tweaking then
+ done = true
+ elseif done then
+ done[unicode] = true
+ else
+ done = { [unicode] = true }
+ end
+ end
+ end
+ end
+ feedback_tweak("checkaccents",target,original,done)
+ end
+
-- all true|number false
function mathtweaks.extendaccents(target,original,parameters)
@@ -2550,24 +2864,40 @@
-- offset factor 0.9|calculated
-- squeeze factor 0.1|calculated
+ local f_flat = formatters["flat accent %05X"]
+
function mathtweaks.flattenaccents(target,original,parameters)
local characters = target.characters
local force = parameters.force
- local squeeze = parameters.squeeze or 0.8
- local ofactor = parameters.offset or (squeeze/2)
- local hfactor = parameters.height or (1 - ofactor)
+ local squeeze = parameters.squeeze or 0.85
+ local ofactor = parameters.offset or (squeeze/8.5)
+ local hfactor = parameters.height or 0.95 -- (1 - ofactor)
local done = false
for stretching, entry in sortedhash(mapping) do
- local last = characters[stretching]
+ local code = stretching
+ local last = characters[stretching]
while last do
if force or not last.flataccent then
- local slot = entry[3]
- local data = copytable(last)
- local height = data.height or 0
- data.effect = { squeeze = squeeze }
- data.height = hfactor * height
- data.yoffset = ofactor * height
- characters[slot] = data
+ local slot = nps(f_flat(code))
+ local height = last.height or 0
+-- print(last.width/65536,code,slot)
+-- data.effect = { squeeze = squeeze }
+characters[slot] = {
+ width = last.width,
+ depth = last.depth,
+ height = last.height * hfactor,
+ topanchor = last.topanchor,
+ bottomanchor = last.bottomanchor,
+ commands = { { "offset", 0, ofactor * height, code, 1, squeeze } },
+-- commands = { slotcommand[0][code] },
+-- effect = { squeeze = squeeze },
+-- next = last.next,
+ unicode = last.unicode,
+}
+-- if code == 770 then
+-- inspect(last)
+-- end
+
last.flataccent = slot
if not trace_tweaking then
done = true
@@ -2577,9 +2907,9 @@
done = { [stretching] = true }
end
end
- local n = last.next
- if n then
- last = characters[n]
+ code = last.next
+ if code then
+ last = characters[code]
else
break
end
@@ -2602,7 +2932,8 @@
height = stretchingdata.height,
depth = stretchingdata.depth,
next = stretchingdata.next,
- commands = { charcommand[stretching] },
+-- commands = { charcommand[stretching] },
+ commands = stretchingdata.commands or { charcommand[stretching] },
topanchor = stretchingdata.topanchor,
-- unicode = stretching, -- when we alias to combiners
unicode = alias, -- when we keep the original
@@ -2620,6 +2951,34 @@
feedback_tweak("copyaccents",target,original,done)
end
+ function mathtweaks.keepbases(target,original,parameters)
+ local characters = target.characters
+ local done = false
+ local list = parameters.list
+ if list == "default" then
+ list = sortedkeys(mapping)
+ end
+ if list and #list > 0 then
+ for i=1,#list do -- assumes sorting
+ local unicode = list[i]
+ local chardata = characters[unicode]
+ if chardata then
+ chardata.keepbase = true
+ if not trace_tweaking then
+ done = true
+ elseif done then
+ done[unicode] = true
+ else
+ done = { [unicode] = true }
+ end
+ end
+ end
+ else
+ -- maybe also hash
+ end
+ feedback_tweak("keepbases",target,original,done)
+ end
+
end
do
@@ -2636,40 +2995,119 @@
end
+-- do
+--
+-- local single <const> = 0x003D
+-- local double <const> = 0x2A75
+-- local triple <const> = 0x2A76
+--
+-- function mathtweaks.addequals(target,original,parameters)
+-- local characters = target.characters
+-- local basechar = characters[single]
+-- local width = basechar.width
+-- local height = basechar.height
+-- local depth = basechar.depth
+-- local advance = (parameters.advance or 1/20) * width
+-- local char = charcommand[single]
+-- local left = leftcommand[advance]
+-- characters[double] = {
+-- unicode = double,
+-- width = 2*width - 1*advance,
+-- height = height,
+-- depth = depth,
+-- commands = { char, left, char },
+-- }
+-- characters[triple] = {
+-- unicode = triple,
+-- width = 3*width - 2*advance,
+-- height = height,
+-- depth = depth,
+-- commands = { char, left, char, left, char },
+-- }
+-- if trace_tweaking then
+-- report_tweak("double %U and triple %U equals added",target,original,double,triple)
+-- end
+-- end
+--
+-- end
+
do
- local single <const> = 0x003D
- local double <const> = 0x2A75
- local triple <const> = 0x2A76
+ local function jointwo(characters,force,unicode,ds,u1,d12,u2)
+ if force or not characters[unicode] then
+ local c1 = characters[u1]
+ local c2 = characters[u2]
+ if c1 and c2 then
+ local w1 = c1.width
+ local w2 = c2.width
+ local width
+ if d12 == false then
+ d12 = 0
+ width = w2
+ elseif d12 < 0 then
+ d12 = d12 * w2
+ width = w2
+ else
+ d12 = d12 * ds
+ width = w1 + w2 - d12
+ end
+ characters[unicode] = {
+ unicode = unicode,
+ width = width,
+ height = max(c1.height or 0, c2.height or 0),
+ depth = max(c1.depth or 0, c2.depth or 0),
+keepvirtual = true,
+ commands = {
+ -- { "inspect" },
+ -- { "trace" },
+ slotcommand[0][u1],
+ -- { "trace" },
+ d12 ~= 0 and leftcommand[d12] or false,
+ slotcommand[0][u2],
+ -- { "trace" },
+ },
+ }
+ end
+ end
+ end
+ local function jointhree(characters,force,unicode,ds,u1,d12,u2,d23,u3)
+ if force or not characters[unicode] then
+ local c1 = characters[u1]
+ local c2 = characters[u2]
+ local c3 = characters[u3]
+ if c1 and c2 and c3 then
+ local w1 = c1.width
+ local w2 = c2.width
+ local w3 = c3.width
+ d12 = d12 * ds
+ d23 = d23 * ds
+ characters[unicode] = {
+ unicode = unicode,
+ width = w1 + w2 + w3 - d12 - d23,
+ height = max(c1.height or 0, c2.height or 0, c3.height or 0),
+ depth = max(c1.depth or 0, c2.depth or 0, c3.depth or 0),
+ commands = {
+ slotcommand[0][u1],
+ d12 ~= 0 and leftcommand[d12] or false,
+ slotcommand[0][u2],
+ d23 ~= 0 and leftcommand[d23] or false,
+ slotcommand[0][u3],
+ }
+ }
+ end
+ end
+ end
+
function mathtweaks.addequals(target,original,parameters)
local characters = target.characters
- local basechar = characters[single]
- local width = basechar.width
- local height = basechar.height
- local depth = basechar.depth
- local advance = (parameters.advance or 1/20) * width
- local char = charcommand[single]
- local left = leftcommand[advance]
- characters[double] = {
- unicode = double,
- width = 2*width - 1*advance,
- height = height,
- depth = depth,
--- callback = "devirtualize",
- commands = { char, left, char },
- }
- characters[triple] = {
- unicode = triple,
- width = 3*width - 2*advance,
- height = height,
- depth = depth,
--- callback = "devirtualize",
- commands = { char, left, char, left, char },
- }
- if trace_tweaking then
- report_tweak("double %U and triple %U equals added",target,original,double,triple)
- end
+ local step = target.parameters.size/18
+ local force = parameters.force
+force = true
+ jointwo (characters,force,0x2254,step,0x03A,0,0x03D) -- :=
+ jointhree(characters,force,0x2A74,step,0x03A,0,0x03A,0,0x03D) -- ::=
+ jointwo (characters,force,0x2A75,step,0x03D,0,0x03D) -- ==
+ jointhree(characters,force,0x2A76,step,0x03D,0,0x03D,0,0x03D) -- ===
end
end
@@ -2807,28 +3245,45 @@
{ 0x030A, nps("delimited right ring"), nps("delimited ghost ring") },
{ 0x0303, nps("delimited right tilde"), nps("delimited ghost tilde") },
{ 0x20DB, nps("delimited right dddot"), nps("delimited ghost dddot") },
+
+ { 0x231C, nps("delimited left upper corner"), nps("delimited ghost upper corner") },
+ { 0x231D, nps("delimited right upper corner"), nps("delimited ghost upper corner") },
+ { 0x231E, nps("delimited left lower corner"), nps("delimited ghost lower corner"), true },
+ { 0x231F, nps("delimited right lower corner"), nps("delimited ghost lower corner"), true },
+
+ -- If needed we can have an installer:
+
{ 0x2020, nps("delimited right dagger"), nps("delimited ghost dagger") },
{ 0x2021, nps("delimited right ddagger"), nps("delimited ghost ddagger") },
{ 0x2217, nps("delimited right ast"), nps("delimited ghost ast") },
{ 0x22C6, nps("delimited right star"), nps("delimited ghost star") },
- { 0x231C, nps("delimited left upper corner"), nps("delimited ghost upper corner") },
- { 0x231D, nps("delimited right upper corner"), nps("delimited ghost upper corner") },
- { 0x231E, nps("delimited left lower corner"), nps("delimited ghost lower corner"), true },
- { 0x231F, nps("delimited right lower corner"), nps("delimited ghost lower corner"), true },
+ { 0x2020, nps("delimited right dagger 1"), nps("delimited ghost dagger 1"), false, 1 },
+ { 0x2021, nps("delimited right ddagger 1"), nps("delimited ghost ddagger 1"), false, 1 },
+ { 0x2217, nps("delimited right ast 1"), nps("delimited ghost ast 1"), false, 1 },
+ { 0x22C6, nps("delimited right star 1"), nps("delimited ghost star 1"), false, 1 },
}
function mathtweaks.addfourier(target,original,parameters)
local characters = target.characters
for i=1,#list do
- local entry = list[i]
- local basecode = entry[1]
- local fouriercode = entry[2]
- local movecode = entry[3]
- local reverse = entry[4]
- local basechar = characters[basecode]
+ local entry = list[i]
+ local basecode = entry[1]
+ local fouriercode = entry[2]
+ local movecode = entry[3]
+ local reverse = entry[4]
+ local size = entry[5] or 0
+ local basechar = characters[basecode]
+ local compactscale = 1
+ if basechar and target.properties.compactmath and size > 0 then
+ compactscale = target.parameters[size > 1 and "scriptscriptscale" or "scriptscale"] / 1000
+ for i=1,size do
+ basecode = basechar.smaller or basecode
+ basechar = characters[basecode]
+ end
+ end
if basechar then
- local scale = parameters.scale or 1
+ local scale = (parameters.scale or 1) * compactscale
local variant = parameters.variant
if variant then
for i=1,variant do
@@ -2846,9 +3301,9 @@
local basewidth = scale * (basechar.width or 0)
local used = baseheight/2
local total = baseheight + basedepth
-if reverse then
- used = total / 2 -- basedepth / 2
-end
+ if reverse then
+ used = total / 2 -- basedepth / 2
+ end
characters[movecode] = {
width = basewidth,
height = used,
@@ -2908,59 +3363,6 @@
local double <const> = 0x2016
local triple <const> = 0x2980
- -- local nps = fonts.helpers.newprivateslot
- --
- -- local function variantlist(characters,unicode,chardata,what,total,used)
- -- local parenthesis = characters[0x28].next
- -- local width = chardata.width
- -- local height = chardata.height
- -- local depth = chardata.depth
- -- local total = height + depth
- -- local count = 1
- -- while parenthesis do
- -- local private = nps(what .. " size " .. count)
- -- local pardata = characters[parenthesis]
- -- local parheight = pardata.height
- -- local pardepth = pardata.depth
- -- local scale = (parheight+pardepth)/total
- -- local offset = - pardepth + scale * depth
- -- chardata.next = private
- -- chardata = {
- -- unicode = unicode,
- -- width = width,
- -- height = parheight,
- -- depth = pardepth,
- -- commands = {
- -- { "offset", 0, offset, unicode, 1, scale }
- -- },
- -- }
- -- characters[private] = chardata
- -- parenthesis = pardata.next
- -- if paranthesis then
- -- pardata = characters[parenthesis]
- -- end
- -- count = count + 1
- -- end
- -- chardata.parts = {
- -- {
- -- advance = total,
- -- ["end"] = used,
- -- glyph = unicode,
- -- start = 0,
- -- -- start = used/5,
- -- },
- -- {
- -- advance = total,
- -- -- ["end"] = 0,
- -- ["end"] = used/5, -- prevents small gap with inward curved endpoints
- -- extender = 1,
- -- glyph = unicode,
- -- start = used,
- -- },
- -- }
- -- chardata.partsorientation = "vertical"
- -- end
-
local function variantlist(unicode,chardata,total,used)
chardata.varianttemplate = 0x0028
chardata.parts = {
@@ -3126,6 +3528,45 @@
do
+ function mathtweaks.sortvariants(target,original,parameters)
+ local list = parameters.list
+ if list then
+ local characters = target.characters
+ local horizontal = parameters.orientation == "horizontal"
+ for i=1,#list do
+ local u = list[i]
+ local c = characters[u]
+ if c then
+ local t = { }
+ while true do
+ local n = c.next
+ if n then
+ c = characters[n]
+ end
+ if c and not c.parts then
+ if horizontal then
+ t[c.width or 0] = n
+ else
+ t[(c.height or 0) + (c.depth or 0)] = n
+ end
+ else
+ break
+ end
+ end
+ local c = characters[u]
+ for k, v in sortedhash(t) do
+ c.next = v
+ c = characters[v]
+ end
+ end
+ end
+ end
+ end
+
+end
+
+do
+
-- We started with the list that xits has in rtlm but most of them can be derived from
-- the database, and others need to be added.
@@ -3251,7 +3692,11 @@
end
local next = data.next
if next then
- add(target,original,characters,next,"next")
+ if next == unicode then
+ report_tweak("skipping cyclic %U (%s)",target,original,unicode,"next")
+ else
+ add(target,original,characters,next,"next")
+ end
end
end
end
@@ -3424,7 +3869,7 @@
end
end
- -- there is no real need for thios but let's play nice with memory anyway
+ -- there is no real need for this but let's play nice with memory anyway
local efindex = 0
local effects = setmetatableindex (function (t,k)
@@ -3462,6 +3907,7 @@
local feature = entry.feature
local thesource = entry.source
local thetarget = entry.target or thesource
+ local keep = (entry.keep == true) or (parameters.keep == true)
if thesource and thetarget then
local sourcerange = type(thesource) == "table" and thesource or blocks[thesource] -- .gaps
local targetrange = type(thetarget) == "table" and thetarget or blocks[thetarget] -- .gaps
@@ -3504,13 +3950,17 @@
local sourceunicode = mathgaps[s] or s
if chars[sourceunicode] then
local targetunicode = mathgaps[t] or t
- if feature then
- sourceunicode = getsubstitution(dropin,sourceunicode,feature,true,"math","dflt") or sourceunicode
+ if keep and characters[targetunicode] then
+ -- okay
+ else
+ if feature then
+ sourceunicode = getsubstitution(dropin,sourceunicode,feature,true,"math","dflt") or sourceunicode
+ end
+-- if trace_tweaking then
+-- report_tweak("copying %s %U from file %a to %s %U",target,original,thesource,sourceunicode,filename,thetarget,targetunicode)
+-- end
+ characters[targetunicode] = copiedglyph(target,characters,chars,sourceunicode,index)
end
--- if trace_tweaking then
--- report_tweak("copying %s %U from file %a to %s %U",target,original,thesource,sourceunicode,filename,thetarget,targetunicode)
--- end
- characters[targetunicode] = copiedglyph(target,characters,chars,sourceunicode,index)
end
end
--
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/math-ali.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/math-ali.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/math-ali.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -938,7 +938,8 @@
\def\math_cases_NC_two
{\ifmmode\stopimath\fi}
-\def\math_cases_TC_zero
+\def\math_cases_TC_zero % needs checking
+ %{\ifmmode\else\startimath\fi}
{}
\def\math_cases_TC_one
@@ -945,6 +946,10 @@
{\ifmmode\stopimath\fi
\aligntab}
+\def\math_cases_TC_two
+ %{\ifmmode\stopimath\fi} % needs checking
+ {}
+
\permanent\protected\def\math_cases_NC
{\ifcase\c_math_cases_nc
\expandafter\math_cases_NC_zero
@@ -1268,6 +1273,7 @@
\newconditional\c_math_matrix_first
\newconstant \c_math_matrix_anchor_mode
+\newconditional\c_math_matrix_sl_seen
% enabled : 1
% left/both : 2
@@ -1403,9 +1409,41 @@
\c!toffset=.25\exheight,
\c!boffset=\mathmatrixparameter\c!toffset]
-\noaligned\permanent\tolerant\protected\def\math_matrix_HL[#1]#*%
+% \noaligned\permanent\tolerant\protected\def\math_matrix_HL[#1]#*%
+% {\noalign\bgroup
+% \math_matrix_check_rule[#1]%
+% \divideby\scratchdimen\plustwo
+% \ifdim\scratchdimen>\zeropoint
+% % \autorule\s!height\scratchdimen\s!depth\scratchdimen\relax
+% \scratchdistance\mathmatrixparameter\c!toffset\relax
+% \ifdim\scratchdistance>\zeropoint
+% \nohrule
+% \s!attr \mathalignmentvruleattribute\plustwo
+% \s!height\scratchdistance
+% \s!depth \zeropoint
+% \relax
+% \fi
+% \hrule
+% \s!attr \mathalignmentvruleattribute\plusthree
+% \s!height\scratchdimen
+% \s!depth \scratchdimen
+% \relax
+% \scratchdistance\mathmatrixparameter\c!boffset\relax
+% \ifdim\scratchdistance>\zeropoint
+% \nohrule
+% \s!attr \mathalignmentvruleattribute\plusfour
+% \s!height\zeropoint
+% \s!depth \scratchdistance
+% \relax
+% \fi
+% \else
+% % zero dimensions disable the rule
+% \fi
+% \egroup}
+
+\def\math_matrix_HL_indeed#1#2%
{\noalign\bgroup
- \math_matrix_check_rule[#1]%
+ \math_matrix_check_rule[#2]%
\divideby\scratchdimen\plustwo
\ifdim\scratchdimen>\zeropoint
% \autorule\s!height\scratchdimen\s!depth\scratchdimen\relax
@@ -1422,6 +1460,17 @@
\s!height\scratchdimen
\s!depth \scratchdimen
\relax
+ \ifnum#1>\plusone
+ \localcontrolledloop\plustwo#1\plusone
+ {\kern.125\d_math_eqalign_distance % hskip
+ \hrule
+ \s!attr \mathalignmentvruleattribute\plusthree
+ \s!height\scratchdimen
+ \s!depth \scratchdimen
+ \relax}%
+ \kern-2\scratchdimen
+ \kern-.125\d_math_eqalign_distance % hskip
+ \fi
\scratchdistance\mathmatrixparameter\c!boffset\relax
\ifdim\scratchdistance>\zeropoint
\nohrule
@@ -1435,6 +1484,9 @@
\fi
\egroup}
+\permanent\tolerant\noaligned\protected\def\math_matrix_HL [#1]#*{\math_matrix_HL_indeed\plusone{#1}}
+\permanent\tolerant\noaligned\protected\def\math_matrix_HLHL[#1]#*{\math_matrix_HL_indeed\plustwo{#1}}
+
\protected\def\math_matrix_vertical_rule_indeed#1#2%
{\math_matrix_check_rule[#2]%
\enablematrixrules
@@ -1456,7 +1508,7 @@
\protected\def\math_matrix_horizontal_rule_indeed#1#2%
{\math_matrix_check_rule[#2]%
\global\setfalse\c_math_matrix_first
- \global\settrue\c_math_matrix_sl_seen
+ \global\settrue \c_math_matrix_sl_seen
\enablematrixrules
\leaders#1%
\s!attr \mathalignmenthruleattribute\plusone
@@ -1514,13 +1566,29 @@
%boundary\c_math_matrix_sl_boundary
\enforced\let\NR\math_matrix_NL_NR}
-\permanent\tolerant\protected\def\math_matrix_VL[#1]#*%
+% \permanent\tolerant\protected\def\math_matrix_VL[#1]#*%
+% {\span\omit
+% \ifconditional\c_math_matrix_first\else
+% \kern.5\d_math_eqalign_distance % hskip
+% \fi
+% \math_matrix_vertical_rule_yes{#1}%
+% \kern.5\d_math_eqalign_distance % hskip
+% \global\setfalse\c_math_matrix_first
+% \aligntab
+% \boundary\c_math_matrix_vl_boundary
+% \enforced\let\NR\math_matrix_NL_NR
+% }
+
+\def\math_matrix_VL_indeed#1#2%%
{\span\omit
\ifconditional\c_math_matrix_first\else
\kern.5\d_math_eqalign_distance % hskip
\fi
- \math_matrix_vertical_rule_yes{#1}%
- \kern.5\d_math_eqalign_distance % hskip
+ \math_matrix_vertical_rule_yes{#2}%
+ \localcontrolledloop\plustwo#1\plusone
+ {\kern.125\d_math_eqalign_distance % hskip
+ \math_matrix_vertical_rule_yes{#2}}%
+ \kern.5\d_math_eqalign_distance
\global\setfalse\c_math_matrix_first
\aligntab
\boundary\c_math_matrix_vl_boundary
@@ -1527,6 +1595,9 @@
\enforced\let\NR\math_matrix_NL_NR
}
+\permanent\tolerant\protected\def\math_matrix_VL [#1]#*{\math_matrix_VL_indeed\plusone{#1}}
+\permanent\tolerant\protected\def\math_matrix_VLVL[#1]#*{\math_matrix_VL_indeed\plustwo{#1}}
+
\permanent\tolerant\protected\def\math_matrix_NL[#1]#*%
{\span\omit
\ifconditional\c_math_matrix_first\else
@@ -1585,6 +1656,9 @@
\enforced\let\VC\math_matrix_VC % bonus, extra column
\enforced\let\VT\math_matrix_VT % bonus, idem but tight
\enforced\let\TB\math_common_TB
+ % just because it's easy:
+ \enforced\let\VLVL\math_matrix_VLVL
+ \enforced\let\HLHL\math_matrix_HLHL
\to \everymathmatrix
\definesystemattribute[mathmatrixornament][public]
@@ -2818,6 +2892,8 @@
{\unskip
\strc_formulas_place_number_nested{#1}{#2}\crcr}
+\aliased\let\math_align_strut\relax
+
\permanent\tolerant\protected\def\math_simplealign_start[#1]#*[#2]%
{\begingroup
\edef\currentmathsimplealign{#1}%
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/math-def.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/math-def.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/math-def.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -46,6 +46,9 @@
\definemathfunction [deg]
\definemathfunction [det] [\c!mathlimits=\v!yes]
\definemathfunction [dim]
+\definemathfunction [erf]
+\definemathfunction [erfc]
+\definemathfunction [erfi]
\definemathfunction [exp]
\definemathfunction [gcd] [\c!mathlimits=\v!yes]
\definemathfunction [hom]
@@ -139,36 +142,57 @@
%D \formula {A \simcoloncolon B}
%D \stoplines
%D
-%D The next macros take care of the space between the colon and the
-%D relation symbol.
+%D The next macros take care of the space between the colon and the relation symbol,
+%D but they are kind of weird and not in \UNICODE. Either we define them virtual or
+%D we just keep these as bonus.
\pushoverloadmode
-\definemathcommand [colonsep] {\mkern-1.2mu}
-\definemathcommand [doublecolonsep] {\mkern-0.9mu}
+\protected\def\math_relation_atom_ordinary{\mathatom \s!class \mathrelationcode \s!all \mathordcode}
-\definemathcommand [centercolon] [\s!relation] {\mathstylevcenteredhbox\colon}
-\definemathcommand [colonminus] [\s!relation] {\centercolon\colonsep\mathrel{-}}
-%definemathcommand [minuscolon] [\s!relation] {\mathrel{-}\colonsep\centercolon} % native char
-%definemathcommand [colonequals] [\s!relation] {\centercolon\colonsep=} % native char
-%definemathcommand [equalscolon] [\s!relation] {=\centercolon\colonsep} % native char
-\definemathcommand [colonapprox] [\s!relation] {\centercolon\colonsep\approx}
-\definemathcommand [approxcolon] [\s!relation] {\approx\centercolon\colonsep}
-\definemathcommand [colonsim] [\s!relation] {\centercolon\colonsep\sim}
-\definemathcommand [simcolon] [\s!relation] {\sim\centercolon\colonsep}
+\definemathcommand [centercolon] {\math_relation_atom_ordinary{\colon}}
+\definemathcommand [colonminus] {\math_relation_atom_ordinary{\colon\minus}}
+\definemathcommand [colonapprox] {\math_relation_atom_ordinary{\colon\approx}}
+\definemathcommand [approxcolon] {\math_relation_atom_ordinary{\approx\colon}}
+\definemathcommand [colonsim] {\math_relation_atom_ordinary{\colon\sim}}
+\definemathcommand [simcolon] {\math_relation_atom_ordinary{\sim\colon}}
-\definemathcommand [coloncolon] [\s!relation] {\centercolon\doublecolonsep\centercolon}
-\definemathcommand [coloncolonminus] [\s!relation] {\coloncolon\colonsep\mathrel{-}}
-\definemathcommand [minuscoloncolon] [\s!relation] {\mathrel{-}\colonsep\coloncolon}
-\definemathcommand [coloncolonequals] [\s!relation] {\coloncolon\colonsep=} % native char
-\definemathcommand [equalscoloncolon] [\s!relation] {=\coloncolon\colonsep}
-\definemathcommand [coloncolonapprox] [\s!relation] {\coloncolon\colonsep\approx}
-\definemathcommand [approxcoloncolon] [\s!relation] {\approx\coloncolon\colonsep}
-\definemathcommand [coloncolonsim] [\s!relation] {\coloncolon\colonsep\sim}
-\definemathcommand [simcoloncolon] [\s!relation] {\sim\coloncolon\colonsep}
+\definemathcommand [coloncolon] {\math_relation_atom_ordinary{\colon\colon}}
+\definemathcommand [coloncolonminus] {\math_relation_atom_ordinary{\colon\colon\minus}}
+\definemathcommand [minuscoloncolon] {\math_relation_atom_ordinary{\minus\colon\colon}}
+\definemathcommand [coloncolonequals] {\math_relation_atom_ordinary{\colon\colon\eq}} % native char
+\definemathcommand [equalscoloncolon] {\math_relation_atom_ordinary{\eq\colon\colon}}
+\definemathcommand [coloncolonapprox] {\math_relation_atom_ordinary{\colon\colon\approx}}
+\definemathcommand [approxcoloncolon] {\math_relation_atom_ordinary{\approx\colon\colon}}
+\definemathcommand [coloncolonsim] {\math_relation_atom_ordinary{\colon\colon\sim}}
+\definemathcommand [simcoloncolon] {\math_relation_atom_ordinary{\sim\colon\colon}}
+% \definemathcommand [manycolons] [relation] [ordinary] {\colon\colon\colon\colon\colon\colon\colon}
+
\popoverloadmode
+%D \macros
+%D {amedian}
+%D
+%D Something language specific, the arithmic median:
+%D
+%D \starttyping
+%D \im {x + \amedian {x - a} + x}
+%D \mainlanguage[cs] \im {x + \amedian {x - a} + x}
+%D \stoptyping
+
+\defcsname \s!en:amedian\endcsname#1{\widebar {#1}}
+\defcsname \s!cs:amedian\endcsname#1{\widetilde{#1}}
+\defcsname \s!sk:amedian\endcsname#1{\widetilde{#1}}
+
+\permanent\protected\def\amedian
+ {\csname
+ \ifcsname\currentmainlanguage:amedian\endcsname
+ \currentmainlanguage\else\s!en
+ \fi
+ :amedian%
+ \endcsname}
+
% \appendtoks
% \def\over{\primitive\over}%
% \to \everymathematics
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/math-dif.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/math-dif.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/math-dif.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -19,8 +19,8 @@
% For new times sake:
- \let\normal_math_dd\dd
- \let\normal_math_DD\DD
+ \ifdefined\dd \aliased\let\normal_math_dd\dd \else \lettonothing\normal_math_dd \fi
+ \ifdefined\DD \aliased\let\normal_math_DD\DD \else \lettonothing\normal_math_DD \fi
\def\c!differentiald{differentiald} % for now
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/math-dld.mklx
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/math-dld.mklx 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/math-dld.mklx 2023-05-06 22:03:57 UTC (rev 67034)
@@ -28,7 +28,8 @@
\installcommandhandler \??mathdelimited {mathdelimited} \??mathdelimited
\setupmathdelimited
- [\c!alternative=\v!normal,
+ [\c!define=\v!yes,
+ \c!alternative=\v!normal,
\c!mpoffset=.25\exheight,
\c!topoffset=\zeropoint,
\c!bottomoffset=\zeropoint,
@@ -43,7 +44,7 @@
\c!rightmargin=\zeropoint]
\appendtoks
- \ifcstok{\mathdelimitedparameter\c!rightmargin}\v!no\else
+ \ifcstok{\mathdelimitedparameter\c!define}\v!yes
\frozen\protected\instance\edefcsname\currentmathdelimited\endcsname{\math_delimited_handle{\currentmathdelimited}}
\fi
\to \everydefinemathdelimited
@@ -70,7 +71,7 @@
\s!depth \dimexpr\mathdelimitedparameter\c!depth+\mathdelimitedparameter\c!bottomoffset\relax
\s!source\numexpr\namedboxanchor{\mathdelimitedparameter\c!source}\relax
\s!style \normalmathstyle
- \s!size \numexpr\namedboxanchor{\mathdelimitedparameter\c!size}\relax
+ \s!size \numexpr\mathdelimitedparameter\c!size\relax
\zerocount \mathdelimitedparameter\c!left
\zerocount \mathdelimitedparameter\c!right
\relax}
@@ -88,7 +89,6 @@
{\popcolor#body}%
\fi}
-
%integerdef\delimitedrightgraveuc \privatecharactercode{delimited right grave}
\integerdef\delimitedrightddotuc \privatecharactercode{delimited right ddot}
\integerdef\delimitedrightbaruc \privatecharactercode{delimited right bar}
@@ -100,10 +100,6 @@
\integerdef\delimitedrightringuc \privatecharactercode{delimited right ring}
\integerdef\delimitedrighttildeuc \privatecharactercode{delimited right tilde}
\integerdef\delimitedrightdddotuc \privatecharactercode{delimited right dddot}
-\integerdef\delimitedrightdaggeruc \privatecharactercode{delimited right dagger}
-\integerdef\delimitedrightddaggeruc \privatecharactercode{delimited right ddagger}
-\integerdef\delimitedrightastuc \privatecharactercode{delimited right ast}
-\integerdef\delimitedrightstaruc \privatecharactercode{delimited right star}
% \integerdef\delimitedrighthatuc \privatecharactercode{delimited right hat}
% \integerdef\delimitedrighttildeuc \privatecharactercode{delimited right tilde}
@@ -114,33 +110,38 @@
\definemathdelimited
[marked]
- [\c!command=\v!no,
+ [\c!define=\v!no,
\c!topoffset=.2\exheight]
\definemathdelimited
[ddotmarked]
[marked]
- [\c!right=\delimitedrightddotuc]
+ [\c!define=\v!yes,
+ \c!right=\delimitedrightddotuc]
\definemathdelimited
[barmarked]
[marked]
- [\c!right=\delimitedrightbaruc]
+ [\c!define=\v!yes,
+ \c!right=\delimitedrightbaruc]
\definemathdelimited
[hatmarked]
[marked]
- [\c!right=\delimitedrighthatuc]
+ [\c!define=\v!yes,
+ \c!right=\delimitedrighthatuc]
\definemathdelimited
[checkmarked]
[marked]
- [\c!right=\delimitedrightcheckuc]
+ [\c!define=\v!yes,
+ \c!right=\delimitedrightcheckuc]
\definemathdelimited
[brevemarked]
[marked]
- [\c!right=\delimitedrightbreveuc]
+ [\c!define=\v!yes,
+ \c!right=\delimitedrightbreveuc]
\definemathdelimited
[dotmarked]
@@ -150,44 +151,78 @@
\definemathdelimited
[ringmarked]
[marked]
- [\c!right=\delimitedrightringuc]
+ [\c!define=\v!yes,
+ \c!right=\delimitedrightringuc]
\definemathdelimited
[tildemarked]
[marked]
- [\c!right=\delimitedrighttildeuc]
+ [\c!define=\v!yes,
+ \c!right=\delimitedrighttildeuc]
\definemathdelimited
[dddotmarked]
[marked]
- [\c!right=\delimitedrightdddotuc]
+ [\c!define=\v!yes,
+ \c!right=\delimitedrightdddotuc]
% The following ones are
% not really belonging here,
% but convenient
+% If there are more needed we can have:
+%
+% \c!ight=\privatecharactercode{delimited right dagger \mathdelimitedparameter\c!size}
+%
+% or even:
+%
+% \def\privatedelimitedcode#1{\privatecharactercode{delimited #1 \mathdelimitedparameter\c!size}}
+%
+% \c!right=\privatedelimitedcode{right dagger}
+%
+% with some glyph installer btu let's for now save some bytes in the format.
+
+\integerdef\delimitedrightdaggeruc \privatecharactercode{delimited right dagger}
+\integerdef\delimitedrightddaggeruc \privatecharactercode{delimited right ddagger}
+\integerdef\delimitedrightastuc \privatecharactercode{delimited right ast}
+\integerdef\delimitedrightstaruc \privatecharactercode{delimited right star}
+
+\integerdef\delimitedscriptrightdaggeruc \privatecharactercode{delimited right dagger 1}
+\integerdef\delimitedscriptrightddaggeruc \privatecharactercode{delimited right ddagger 1}
+\integerdef\delimitedscriptrightastuc \privatecharactercode{delimited right ast 1}
+\integerdef\delimitedscriptrightstaruc \privatecharactercode{delimited right star 1}
+
\definemathdelimited
[daggermarked]
[marked]
- [\c!size=1,
- \c!right=\delimitedrightdaggeruc]
+ [\c!define=\v!yes,
+ \c!size=1,
+ \c!right=\delimitedscriptrightdaggeruc]
+ %\c!right=\privatedelimitedcode{right dagger}]
\definemathdelimited
[ddaggermarked]
[marked]
- [\c!size=1,
- \c!right=\delimitedrightddaggeruc]
+ [\c!define=\v!yes,
+ \c!size=1,
+ \c!right=\delimitedscriptrightddaggeruc]
+ %\c!right=\privatedelimitedcode{right ddagger}]
\definemathdelimited
[astmarked]
- [\c!size=1,
- \c!right=\delimitedrightastuc]
+ [marked]
+ [\c!define=\v!yes,
+ \c!size=1,
+ \c!right=\delimitedscriptrightastuc]
+ %\c!right=\privatedelimitedcode{right ast}]
\definemathdelimited
[starmarked]
[marked]
- [\c!size=1,
- \c!right=\delimitedrightstaruc]
+ [\c!define=\v!yes,
+ \c!size=1,
+ \c!right=\delimitedscriptrightstaruc]
+ %\c!right=\privatedelimitedcode{right star}]
% More contextual
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/math-fen.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/math-fen.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/math-fen.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -15,7 +15,7 @@
\unprotect
-% \definemathfence [fancybracket] [bracket] [command=yes,color=blue]
+% \definemathfence [fancybracket] [bracket] [define=yes,color=blue]
%
% test $|x|$ test \par
% test $||x||$ test (okay) \par
@@ -42,7 +42,7 @@
\c!middle=,
\c!mathstyle=,
\c!color=,
- \c!command=,
+ \c!define=, % was \c!command
\c!mathclass=,
\c!leftclass=\mathopencode,
\c!rightclass=\mathclosecode,
@@ -59,9 +59,7 @@
\c!factor=\v!auto]
\appendtoks
- \edef\p_command{\mathfenceparameter\c!command}%
- \ifx\p_command\v!yes
- % \instance
+ \ifcstok{\mathfenceparameter\c!define}\v!yes
\protected\edefcsname\currentmathfence\endcsname{\math_fenced_fenced{\currentmathfence}}%
\fi
\to \everydefinemathfence
@@ -307,6 +305,9 @@
\directsetup{math:fence:set:bar}
\stopsetups
+\mutable\lettonothing\suchthat
+% \fastsetup{math:fence:set}
+
\protected\def\math_fenced_middle_common
{\math_fenced_middle} % redefined inside atom
@@ -338,6 +339,19 @@
% \definemathfence [tupdownarrows] [text] [\c!left="2191,\c!right="2193]
+\def\math_fenced_check#1%
+ {\iftok{\mathfenceparameter#1}\emptytoks\letmathfenceparameter#1\v!none\fi}
+
+\appendtoks
+ \math_fenced_check\c!left
+ \math_fenced_check\c!right
+\to \everysetupmathfence
+
+\appendtoks
+ \math_fenced_check\c!left
+ \math_fenced_check\c!right
+\to \everydefinemathfence
+
\protected\def\math_fenced_horizontal_common#1#2#3#4% \Uwhatever class symbol source
{\c_math_fenced_class\math_class_by_parameter\mathfenceparameter#2\relax
\edef\p_fence{#3}%
@@ -387,7 +401,7 @@
\setupmathfence
[\v!text]
[\c!text=\v!yes,
- \c!command=\v!yes,
+ \c!define=\v!yes,
\c!distance=.125\emwidth]
\tolerant\protected\def\math_fenced_vertical#1#*[#2]%
@@ -653,11 +667,24 @@
\immutable\protected\def\Lopenbracketmirrored {\math_fenced_fenced_stop {mirroredopenbracket}} \immutable\protected\def\Ropenbracketmirrored {\math_fenced_fenced_start{mirroredopenbracket}}
\immutable\protected\def\Lnothingmirrored {\math_fenced_fenced_stop {mirrorednothing}} \immutable\protected\def\Rnothingmirrored {\math_fenced_fenced_start{mirrorednothing}}
-\definemathfence [interval] [\c!left="2997,\c!right="2998]
-\definemathfence [openinterval] [interval] [\c!left="2998,\c!right="2998]
-\definemathfence [leftopeninterval] [interval] [\c!left="2997,\c!right="2997]
-\definemathfence [rightopeninterval] [interval] [\c!left="2998,\c!right="2998]
+% These tortoise chars almost only exist in stix (and ar not commonly used)
+% \definemathfence [interval] [\c!left="2997,\c!right="2998]
+% \definemathfence [openinterval] [interval] [\c!left="2998,\c!right="2998]
+% \definemathfence [leftopeninterval] [interval] [\c!left="2997,\c!right="2997]
+% \definemathfence [rightopeninterval] [interval] [\c!left="2998,\c!right="2998]
+
+% Different intervals. The variants are the ones suggested by Bourbaki.
+
+\definemathfence [interval] [\c!left="005B,\c!right="005D]
+\definemathfence [openinterval] [interval] [\c!left="0028,\c!right="0029]
+\definemathfence [closedinterval] [interval] [\c!left="005B,\c!right="005D]
+\definemathfence [leftopeninterval] [interval] [\c!left="0028,\c!right="005D]
+\definemathfence [rightopeninterval] [interval] [\c!left="005B,\c!right="0029]
+\definemathfence [varopeninterval] [interval] [\c!left="005D,\c!right="005B]
+\definemathfence [varleftopeninterval] [interval] [\c!left="005D,\c!right="005D]
+\definemathfence [varrightopeninterval] [interval] [\c!left="005B,\c!right="005B]
+
\immutable\protected\def\Linterval {\math_fenced_fenced_start{interval}}
\immutable\protected\def\Lointerval {\math_fenced_fenced_start{openinterval}}
\immutable\protected\def\Llointerval {\math_fenced_fenced_start{leftopeninterval}}
@@ -693,6 +720,10 @@
% \im { \left\{ \frac{1}{2} \right\} }
% \im { \left\lbrace \frac{1}{2} \right\rbrace }
+\lettonothing\math_fenced_x_p_left
+\lettonothing\math_fenced_x_p_right
+\lettonothing\math_fenced_x_p_middle
+
\def\math_fenced_x_left
{\advanceby\c_math_fence_nesting\plusone
\ifx\math_fenced_x_p_left\bgroup\let\math_fenced_x_p_left\letterleftbrace\fi
@@ -957,7 +988,11 @@
\protected\def\math_choosemathbig_math#1#2% so we accept \big{||} as well
{\math_fenced_force_size\bigmathdelimitervariant{#1}\relax
- \Uvextensible#2\relax
+ \Uvextensible
+ \s!axis
+ \s!exact
+ #2%
+ \relax
\c_attr_mathsize\attributeunsetvalue}
\protected\def\math_choosemathbig_text#1#2% so we accept \big{||} as well
@@ -972,7 +1007,11 @@
\permanent\protected\def\mathdelimiterstep#1#2% not used, only in example
{\begingroup
\math_fenced_force_size\plusone{#1}%
- \Uvextensible#2\relax
+ \Uvextensible
+ \s!axis
+ \s!exact
+ #2%
+ \relax
\endgroup}
\definemathcommand [big] {\choosemathbig1}
@@ -1004,7 +1043,7 @@
% \vrule height 3cm depth 3cm
% \right\rintegral
-%definemathfence [fancybracket] [bracket] [command=yes,color=red]
+%definemathfence [fancybracket] [bracket] [define=yes,color=red]
%D The nested fences recovery code is needed for mathml and the original
%D code can still be found in the mkiv file.
@@ -1014,7 +1053,7 @@
\let\math_fences_normal_left \left
\let\math_fences_normal_right \right
\let\math_fences_normal_middle\middle
-\let\math_fences_normal_both \leftorright
+\let\math_fences_normal_both \relax % undefined
\protected\def\math_fences_auto_left #1{\c_attr_mathautofence\plusone #1\c_attr_mathautofence\attributeunsetvalue}
\protected\def\math_fences_auto_right #1{\c_attr_mathautofence\plustwo #1\c_attr_mathautofence\attributeunsetvalue}
@@ -1187,6 +1226,8 @@
{\let\math_fenced_trace\math_fenced_trace_indeed}
{\let\math_fenced_trace\donothing}
+\mutable\integerdef\c_math_fence_level\minusone
+
\appendtoks
\integerdef\c_math_fence_level\minusone
\c_math_fence_nesting\zerocount
@@ -1211,10 +1252,10 @@
% $x + \tdownuparrows{left}{right} + x$
% $x + \tupanddownarrows[color=red,leftcolor=green,rightcolor=blue]{left}{right} + x$
-\definemathfence [tupanddownarrows] [\v!text] [\c!left="2191,\c!right="2193]
-\definemathfence [tupdownarrows] [\v!text] [\c!left="21C5,\c!right=0]
-\definemathfence [tdownuparrows] [\v!text] [\c!middle="21F5]
-\definemathfence [tuparrow] [\v!text] [\c!middle="2191]
-\definemathfence [tdownarrow] [\v!text] [\c!middle="2193]
+\definemathfence [tupanddownarrows][\v!text][\c!left="2191,\c!right="2193]
+\definemathfence [tupdownarrows] [\v!text][\c!left="21C5,\c!right=0]
+\definemathfence [tdownuparrows] [\v!text][\c!middle="21F5]
+\definemathfence [tuparrow] [\v!text][\c!middle="2191]
+\definemathfence [tdownarrow] [\v!text][\c!middle="2193]
\protect
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/math-fnt.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/math-fnt.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/math-fnt.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -54,98 +54,100 @@
return v
end)
+local enabled = "vertical" directives.register("math.extensibles", function(v) enabled = v end) -- default per 2022-08-25
+
local function register_extensible(font,char,style,box)
- -- We don't share (yet)!
- local fontdata = chardata[font]
- local oldchar = fontdata[char]
- if oldchar and oldchar.keepvirtual then
- -- for now, needed for iwona etc
- return nil
- else
- local bx = tonut(box)
- updaters.apply("tagging.state.disable") -- fast enough
- nodes.handlers.finalizelist(bx)
- updaters.apply("tagging.state.enable")
- local id = getid(bx)
- local al = getattrlst(bx)
- local wd, ht, dp = getwhd(bx)
- local unicode = oldchar.unicode or char
- -- we cannot have self referencing t3 fonts
- local oldcommands = oldchar.oldcommands
- local newcommands = oldchar.commands
- if oldcommands then
- oldchar.commands = oldcommands
- end
- --
- local p = fonts.hashes.parameters[font]
- local sx = round(1000/p.extendfactor)
- local sy = round(1000/p.squeezefactor)
- -- we saved a scaled glyph stream so we now use an unscaled one ... horrible hack:
- if sx ~= 1000 then
- wd = wd * 7200/7227
- end
- if sy ~= 1000 then
- ht = ht * 7200/7227
- dp = dp * 7200/7227
- end
- --
- -- local private = fonts.helpers.setboxdirectly(font,unicode,box)
- local private = cache[wd][ht][dp][font][unicode]
- if not private then
- private = fonts.helpers.setboxdirectly(font,unicode,box)
- cache[wd][ht][dp][font][unicode] = private
- end
- local glyph = new_glyph(font,private,al)
- nuts.setscales(glyph,1000,sx,sy)
- --
- -- if fonts.hashes.properties[font].compactmath then
- -- nuts.setscales(g,1000,1000,1000)
- -- end
- --
- -- nasty, testcase: bold math sqrt extensible
- --
- local n = new_hlist(glyph)
- --
- if newcommands then
- oldchar.commands = newcommands
- end
- --
- -- local newchar = {
- -- unicode = unicode,
- -- width = wd,
- -- height = ht,
- -- depth = dp,
- -- }
- -- local p = oldchar.vparts
- -- if p then
- -- local first = fontdata[p[#p].glyph]
- -- local last = fontdata[p[ 1].glyph]
- -- if first then
- -- newchar.topleft = first.topleft
- -- newchar.topright = first.topright
- -- end
- -- if last then
- -- newchar.bottomleft = last.bottomleft
- -- newchar.bottomright = last.bottomright
- -- end
- -- end
- -- addcharacters(font, { [private] = newchar })
- -- so the dimensions of the box don't match the glyph scale!
- setwhd(n,wd,ht,dp)
- setattrlst(n,al)
- if id == vlist_code then
- n = new_vlist(n)
+ if enabled then
+ -- We don't share (yet)!
+ local fontdata = chardata[font]
+ local oldchar = fontdata[char]
+ if oldchar and not oldchar.keepvirtual then
+if enabled == true or enabled == "both" or oldchar.partsorientation == enabled then
+ -- we're okay
+else
+ return
+end
+ local bx = tonut(box)
+ -- actually we don't want colors and such so if we do finalize we
+ -- should be more selctive:
+ -- updaters.apply("tagging.state.disable")
+ -- nodes.handlers.finalizelist(bx)
+ -- updaters.apply("tagging.state.enable")
+ local id = getid(bx)
+ local al = getattrlst(bx)
+ local wd, ht, dp = getwhd(bx)
+ local unicode = oldchar.unicode or char
+ -- we cannot have self referencing t3 fonts
+ local oldcommands = oldchar.oldcommands
+ local newcommands = oldchar.commands
+ if oldcommands then
+ oldchar.commands = oldcommands
+ end
+ --
+ local p = fonts.hashes.parameters[font]
+ local sx = round(1000/p.extendfactor)
+ local sy = round(1000/p.squeezefactor)
+ -- we saved a scaled glyph stream so we now use an unscaled one ... horrible hack:
+ if sx ~= 1000 then
+ wd = wd * 7200/7227
+ end
+ if sy ~= 1000 then
+ ht = ht * 7200/7227
+ dp = dp * 7200/7227
+ end
+ --
+ -- local private = fonts.helpers.setboxdirectly(font,unicode,box)
+ local private = cache[wd][ht][dp][font][unicode]
+ if not private then
+ private = fonts.helpers.setboxdirectly(font,unicode,box)
+ cache[wd][ht][dp][font][unicode] = private
+ end
+ local glyph = new_glyph(font,private,al)
+ nuts.setscales(glyph,1000,sx,sy)
+ --
+ -- if fonts.hashes.properties[font].compactmath then
+ -- nuts.setscales(g,1000,1000,1000)
+ -- end
+ --
+ -- nasty, testcase: bold math sqrt extensible
+ --
+ local n = new_hlist(glyph)
+ --
+ if newcommands then
+ oldchar.commands = newcommands
+ end
+ --
+ -- local newchar = {
+ -- unicode = unicode,
+ -- width = wd,
+ -- height = ht,
+ -- depth = dp,
+ -- }
+ -- local p = oldchar.vparts
+ -- if p then
+ -- local first = fontdata[p[#p].glyph]
+ -- local last = fontdata[p[ 1].glyph]
+ -- if first then
+ -- newchar.topleft = first.topleft
+ -- newchar.topright = first.topright
+ -- end
+ -- if last then
+ -- newchar.bottomleft = last.bottomleft
+ -- newchar.bottomright = last.bottomright
+ -- end
+ -- end
+ -- addcharacters(font, { [private] = newchar })
+ -- so the dimensions of the box don't match the glyph scale!
setwhd(n,wd,ht,dp)
setattrlst(n,al)
+ if id == vlist_code then
+ n = new_vlist(n)
+ setwhd(n,wd,ht,dp)
+ setattrlst(n,al)
+ end
+ return tonode(n)
end
- return tonode(n)
end
end
-directives.register("math.extensibles", function(v)
- callback.register("register_extensible", v and register_extensible or nil)
-end)
-
--- Default per 2022-08-25
-
-callback.register("register_extensible", register_extensible)
+callbacks.register("register_extensible",register_extensible,"register math extensible construct")
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/math-frc.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/math-frc.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/math-frc.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -104,6 +104,14 @@
\c!vfactor=\plusthousand,
\c!rule=\v!auto]
+%D We now default to nice bars:
+
+\integerdef\fractionbarextenderuc \privatecharactercode{fraction bar extender}
+
+\setupmathfractions
+ [\c!rule=\v!symbol,
+ \c!symbol=\fractionbarextenderuc]
+
\appendtoks
\instance\frozen\protected\edefcsname\currentmathfraction\endcsname{\math_frac{\currentmathfraction}}%
\to \everydefinemathfraction
@@ -303,15 +311,23 @@
{\edef\p_method {\mathfractionparameter\c!method}%
\edef\p_rule {\mathfractionparameter\c!rule}%
\edef\p_thickness{\mathfractionparameter\c!rulethickness}%
- \scratchcounterone \mathfractionparameter\c!left \relax
- \scratchcountertwo \mathfractionparameter\c!right \relax
- \scratchcounterthree \mathfractionparameter\c!middle \relax
+ \scratchcounterone \mathfractionparameter\c!left \relax
+ \scratchcountertwo \mathfractionparameter\c!right \relax
+ \scratchcounterthree
+ \ifx\p_method\v!horizontal
+ \mathfractionparameter\c!middle
+ \orelse\ifx\p_method\v!line
+ \mathfractionparameter\c!middle
+ \else
+ \mathfractionparameter\c!symbol
+ \fi
+ \relax
\ifcsname
\??fractionmethods
\p_method
\ifx\p_method\v!horizontal
\orelse\ifx\p_method\v!line
- \orelse\ifcsname\??fractionmethods\p_method\p_rule\endcsname
+ \orelse\ifcsname\??fractionmethods\p_method\p_rule\endcsname % \v!vertical
\p_rule
\else
\v!auto
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/math-ini.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/math-ini.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/math-ini.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -169,12 +169,11 @@
local fontchardata = fonts.hashes.characters
local f_dictionary = false
- local register = callback.register
local whatdetail = "all"
local function trace(n,properties,group,index,font,char)
-- local properties, group, index, font, char = nodes.nuts.getchardict(nodes.nuts.tonut(n))
- if properties ~= 0 or group ~= 0 or index ~= 0 then
+ if whatdetail and (properties ~= 0 or group ~= 0 or index ~= 0) then
local char = fontchardata[font][char]
if char or whatdetail == "all" then
local unicode = char and char.unicode
@@ -199,16 +198,9 @@
end
end
- trackers.register("math.dictionaries",function(v)
- whatdetail = v
- if whatdetail then
- register("get_math_dictionary",trace)
- else
- register("get_math_dictionary")
- end
- end)
+ trackers.register("math.dictionaries",function(v) whatdetail = v end)
- register("get_math_dictionary",trace)
+ callbacks.register("get_math_dictionary",trace,"provide math dictionary details")
-- This is experimental and a prelude to the long pending "relate math rendering to
-- some field" wish. In TeX characters and symbols are grouped by class but that is
@@ -410,7 +402,7 @@
classes["begin"] = specialclasses["begin"] classnames[specialclasses["begin"]] = "beg"
classes["end"] = specialclasses["end"] classnames[specialclasses["end"] ] = "end"
-callback.register("get_noad_class", function(n) return classnames[n] end)
+callbacks.register("get_noad_class", function(n) return classnames[n] end,"provide math class name")
local function registerprivateclass(name,parent)
local class = parent and classes[parent] or classes[name]
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/math-ini.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/math-ini.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/math-ini.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1399,6 +1399,10 @@
% \im{1\unit{hour} 20 \unit{minute} 56 \unit{second}}
%
\inherited\setmathspacing \mathdimensioncode \mathdigitcode \allmathstyles \thickmuskip
+ \inherited\setmathspacing \mathdimensioncode \mathbinarycode \allsplitstyles \medmuskip
+ \inherited\setmathspacing \mathdimensioncode \mathbinarycode \allunsplitstyles \pettymuskip
+ \inherited\setmathspacing \mathdimensioncode \mathrelationcode \allsplitstyles \thickmuskip
+ \inherited\setmathspacing \mathdimensioncode \mathrelationcode \allunsplitstyles \pettymuskip
%
\inherited\setmathspacing \mathfakecode \mathallcode \allmathstyles \tinymuskip
\inherited\setmathspacing \mathallcode \mathfakecode \allmathstyles \tinymuskip
@@ -1418,20 +1422,20 @@
\inherited\setmathspacing \mathtextpunctuationcode \mathdifferentialcode \allmathstyles \mathinterwordmuskip
\inherited\setmathspacing \mathtextpunctuationcode \mathpunctuationcode \allmathstyles \mathinterwordmuskip
%
- \inherited\setmathspacing \mathordinarycode \mathtextpunctuationcode \allmathstyles \tinymuskip
- \inherited\setmathspacing \mathoperatorcode \mathtextpunctuationcode \allmathstyles \tinymuskip
- \inherited\setmathspacing \mathbinarycode \mathtextpunctuationcode \allmathstyles \tinymuskip
- \inherited\setmathspacing \mathrelationcode \mathtextpunctuationcode \allmathstyles \tinymuskip
- \inherited\setmathspacing \mathopencode \mathtextpunctuationcode \allmathstyles \tinymuskip
- \inherited\setmathspacing \mathmiddlecode \mathtextpunctuationcode \allmathstyles \tinymuskip
- \inherited\setmathspacing \mathclosecode \mathtextpunctuationcode \allmathstyles \tinymuskip
- \inherited\setmathspacing \mathpunctuationcode \mathtextpunctuationcode \allmathstyles \tinymuskip
- \inherited\setmathspacing \mathconstructcode \mathtextpunctuationcode \allmathstyles \tinymuskip
- \inherited\setmathspacing \mathellipsiscode \mathtextpunctuationcode \allmathstyles \tinymuskip
- \inherited\setmathspacing \mathfractioncode \mathtextpunctuationcode \allmathstyles \tinymuskip
- \inherited\setmathspacing \mathradicalcode \mathtextpunctuationcode \allmathstyles \tinymuskip
- \inherited\setmathspacing \mathdifferentialcode \mathtextpunctuationcode \allmathstyles \tinymuskip
- \inherited\setmathspacing \mathpunctuationcode \mathtextpunctuationcode \allmathstyles \tinymuskip
+ \inherited\setmathspacing \mathordinarycode \mathtextpunctuationcode \allmathstyles \pettymuskip
+ \inherited\setmathspacing \mathoperatorcode \mathtextpunctuationcode \allmathstyles \pettymuskip
+ \inherited\setmathspacing \mathbinarycode \mathtextpunctuationcode \allmathstyles \pettymuskip
+ \inherited\setmathspacing \mathrelationcode \mathtextpunctuationcode \allmathstyles \pettymuskip
+ \inherited\setmathspacing \mathopencode \mathtextpunctuationcode \allmathstyles \pettymuskip
+ \inherited\setmathspacing \mathmiddlecode \mathtextpunctuationcode \allmathstyles \pettymuskip
+ \inherited\setmathspacing \mathclosecode \mathtextpunctuationcode \allmathstyles \pettymuskip
+ \inherited\setmathspacing \mathpunctuationcode \mathtextpunctuationcode \allmathstyles \pettymuskip
+ \inherited\setmathspacing \mathconstructcode \mathtextpunctuationcode \allmathstyles \pettymuskip
+ \inherited\setmathspacing \mathellipsiscode \mathtextpunctuationcode \allmathstyles \pettymuskip
+ \inherited\setmathspacing \mathfractioncode \mathtextpunctuationcode \allmathstyles \pettymuskip
+ \inherited\setmathspacing \mathradicalcode \mathtextpunctuationcode \allmathstyles \pettymuskip
+ \inherited\setmathspacing \mathdifferentialcode \mathtextpunctuationcode \allmathstyles \pettymuskip
+ \inherited\setmathspacing \mathpunctuationcode \mathtextpunctuationcode \allmathstyles \pettymuskip
\stopsetups
\directsetup{math:spacing:default}
@@ -1732,6 +1736,9 @@
\permanent\protected\def\mathcodecommand#1%
{\mathatom \s!class \mathcodechecked{#1}}
+\permanent\protected\def\mathcodeallcommand#1#2%
+ {\mathatom \s!class \mathcodechecked{#1} \s!all \mathcodechecked{#2}}
+
\def\math_class_by_parameter #1#2{\normalexpanded{\noexpand\mathcodechecked{#1#2}}}
\def\math_atom_by_parameter #1{\normalexpanded{\noexpand\math_atom_by_parameter_indeed{#1\c!mathclass}}}
\def\math_atom_by_parameter_indeed#1{\mathatom \s!class \mathcodechecked{#1}}
@@ -1750,15 +1757,14 @@
\installcorenamespace{mathcommand}
-% todo: define these commands as frozen!
-
\permanent\tolerant\protected\def\definemathcommand[#1]#*[#2]#*[#3]#:#*#4% command class args meaning
{\ifparameter#3\or
- \edef\scratchstringone{#3}% make this one m_arguments
- \ifx\scratchstringone\v!one
+ \ifcstok{#3}\v!one
\frozen\protected\defcsname\??mathcommand#1\endcsname##1{\mathcodecommand{#2}{#4{##1}}}%
- \orelse\ifx\scratchstringone\v!two
+ \orelse\ifcstok{#3}\v!two
\frozen\protected\defcsname\??mathcommand#1\endcsname##1##2{\mathcodecommand{#2}{#4{##1}{##2}}}%
+ \orelse\ifchknum\mathcodechecked{#3}\or
+ \frozen\protected\defcsname\??mathcommand#1\endcsname{\mathcodeallcommand{#2}{#3}{#4}}%
\else
\frozen\protected\defcsname\??mathcommand#1\endcsname{\mathcodecommand{#2}{#4}}%
\fi
@@ -2812,51 +2818,84 @@
\installcorenamespace {mathautopunctuation}
-\bgroup
+% \bgroup
+%
+% \catcode\commaasciicode \activecatcode
+% \catcode\periodasciicode \activecatcode
+% \catcode\semicolonasciicode\activecatcode
+%
+% \gdefcsname\??mathautopunctuation\v!no\endcsname
+% {\let,\math_punctuation_nop_comma
+% \let.\math_punctuation_nop_period
+% \let;\math_punctuation_nop_semicolon}
+%
+% \gdefcsname\??mathautopunctuation\v!yes\endcsname
+% {\let,\math_punctuation_yes_comma
+% \let.\math_punctuation_yes_period
+% \let;\math_punctuation_nop_semicolon}
+%
+% \gdefcsname\??mathautopunctuation\v!all\endcsname
+% {\let,\math_punctuation_all_comma
+% \let.\math_punctuation_all_period
+% \let;\math_punctuation_nop_semicolon}
+%
+% \gdefcsname\??mathautopunctuation comma\endcsname
+% {\let,\math_punctuation_yes_comma
+% \let.\math_punctuation_yes_period
+% \let;\math_punctuation_nop_semicolon}
+%
+% \gdefcsname\??mathautopunctuation\v!yes\string,semicolon\endcsname
+% {\let,\math_punctuation_yes_comma
+% \let.\math_punctuation_yes_period
+% \let;\math_punctuation_yes_semicolon}
+%
+% \gdefcsname\??mathautopunctuation comma\string,semicolon\endcsname
+% {\let,\math_punctuation_yes_comma
+% \let.\math_punctuation_yes_period
+% \let;\math_punctuation_yes_semicolon}
+%
+% \gdefcsname\??mathautopunctuation\v!all\string,semicolon\endcsname
+% {\let,\math_punctuation_all_comma
+% \let.\math_punctuation_all_period
+% \let;\math_punctuation_all_semicolon}
+%
+% \egroup
- % This can and will be replaced by classes:
+\defcsname\??mathautopunctuation\v!no\endcsname
+ {\letcharcode\commaasciicode \math_punctuation_nop_comma
+ \letcharcode\periodasciicode \math_punctuation_nop_period
+ \letcharcode\semicolonasciicode\math_punctuation_nop_semicolon}
- \catcode\commaasciicode \activecatcode
- \catcode\periodasciicode \activecatcode
- \catcode\semicolonasciicode\activecatcode
+\defcsname\??mathautopunctuation\v!yes\endcsname
+ {\letcharcode\commaasciicode \math_punctuation_yes_comma
+ \letcharcode\periodasciicode \math_punctuation_yes_period
+ \letcharcode\semicolonasciicode\math_punctuation_nop_semicolon}
- \gdefcsname\??mathautopunctuation\v!no\endcsname
- {\let,\math_punctuation_nop_comma
- \let.\math_punctuation_nop_period
- \let;\math_punctuation_nop_semicolon}
+\defcsname\??mathautopunctuation\v!all\endcsname
+ {\letcharcode\commaasciicode \math_punctuation_all_comma
+ \letcharcode\periodasciicode \math_punctuation_all_period
+ \letcharcode\semicolonasciicode\math_punctuation_nop_semicolon}
- \gdefcsname\??mathautopunctuation\v!yes\endcsname
- {\let,\math_punctuation_yes_comma
- \let.\math_punctuation_yes_period
- \let;\math_punctuation_nop_semicolon}
+\defcsname\??mathautopunctuation comma\endcsname
+ {\letcharcode\commaasciicode \math_punctuation_yes_comma
+ \letcharcode\periodasciicode \math_punctuation_yes_period
+ \letcharcode\semicolonasciicode\math_punctuation_nop_semicolon}
- \gdefcsname\??mathautopunctuation\v!all\endcsname
- {\let,\math_punctuation_all_comma
- \let.\math_punctuation_all_period
- \let;\math_punctuation_nop_semicolon}
+\defcsname\??mathautopunctuation\v!yes\string,semicolon\endcsname
+ {\letcharcode\commaasciicode \math_punctuation_yes_comma
+ \letcharcode\periodasciicode \math_punctuation_yes_period
+ \letcharcode\semicolonasciicode\math_punctuation_yes_semicolon}
- \gdefcsname\??mathautopunctuation comma\endcsname
- {\let,\math_punctuation_yes_comma
- \let.\math_punctuation_yes_period
- \let;\math_punctuation_nop_semicolon}
+\defcsname\??mathautopunctuation comma\string,semicolon\endcsname
+ {\letcharcode\commaasciicode \math_punctuation_yes_comma
+ \letcharcode\periodasciicode \math_punctuation_yes_period
+ \letcharcode\semicolonasciicode\math_punctuation_yes_semicolon}
- \gdefcsname\??mathautopunctuation\v!yes\string,semicolon\endcsname
- {\let,\math_punctuation_yes_comma
- \let.\math_punctuation_yes_period
- \let;\math_punctuation_yes_semicolon}
+\defcsname\??mathautopunctuation\v!all\string,semicolon\endcsname
+ {\letcharcode\commaasciicode \math_punctuation_all_comma
+ \letcharcode\periodasciicode \math_punctuation_all_period
+ \letcharcode\semicolonasciicode\math_punctuation_all_semicolon}
- \gdefcsname\??mathautopunctuation comma\string,semicolon\endcsname
- {\let,\math_punctuation_yes_comma
- \let.\math_punctuation_yes_period
- \let;\math_punctuation_yes_semicolon}
-
- \gdefcsname\??mathautopunctuation\v!all\string,semicolon\endcsname
- {\let,\math_punctuation_all_comma
- \let.\math_punctuation_all_period
- \let;\math_punctuation_all_semicolon}
-
-\egroup
-
% \appendtoks
% \global\mathcode\commaasciicode \c_math_special
% \global\mathcode\periodasciicode \c_math_special
@@ -4548,8 +4587,8 @@
\def\math_axis_inject_indeed#1%
{\srule
- \s!height \dimexpr\scratchdimentwo+\scratchdimenone\relax
- \s!depth -\dimexpr\scratchdimentwo-\scratchdimenone\relax
+ \s!height \dimexpr(\scratchdimentwo+\scratchdimenone)*\c_math_m_scaled/\plusthousand\relax
+ \s!depth -\dimexpr(\scratchdimentwo-\scratchdimenone)*\c_math_m_scaled/\plusthousand\relax
\s!attr \mathaxisattribute#1%
\relax}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/math-map.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/math-map.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/math-map.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -7,32 +7,14 @@
license = "see context related readme files"
}
--- todo: make sparse .. if self
+-- persian: we will also provide mappers for other scripts
+-- todo : alphabets namespace
+-- maybe : script/scriptscript dynamic,
+-- check : (U+2202,U+1D715) : upright
+-- (U+2202,U+1D715) : italic
+-- (U+2202,U+1D715) : upright
+-- add them to the regular vectors below so that they honor \it etc
---[[ldx--
-<p>Remapping mathematics alphabets.</p>
---ldx]]--
-
--- oldstyle: not really mathematics but happened to be part of
--- the mathematics fonts in cmr
---
--- persian: we will also provide mappers for other
--- scripts
-
--- todo: alphabets namespace
--- maybe: script/scriptscript dynamic,
-
--- superscripped primes get unscripted !
-
--- to be looked into once the fonts are ready (will become font
--- goodie):
---
--- (U+2202,U+1D715) : upright
--- (U+2202,U+1D715) : italic
--- (U+2202,U+1D715) : upright
---
--- plus add them to the regular vectors below so that they honor \it etc
-
local type, next = type, next
local merged, sortedhash = table.merged, table.sortedhash
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/math-noa.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/math-noa.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/math-noa.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -881,48 +881,49 @@
local method = div(a,100)
local size = a % 100
setattr(pointer,a_mathsize,0)
- local delimiter = getdelimiter(pointer)
- if delimiter then
- local oldchar, font, fam = getcharspec(delimiter)
- if oldchar > 0 and font > 0 then
- local ht = getheight(pointer)
- local dp = getdepth(pointer)
- local data = fontdata[font]
- local characters = data.characters
- local olddata = characters[oldchar]
--- local oldheight = olddata.height or 0
--- local olddepth = olddata.depth or 0
- local template = olddata.varianttemplate
- local newchar = mathematics.big(data,template or oldchar,size,method)
- local newdata = characters[newchar]
- local newheight = newdata.height or 0
- local newdepth = newdata.depth or 0
- if template then
--- local ratio = (newheight + newdepth) / (oldheight + olddepth)
--- setheight(pointer,ratio * oldheight)
--- setdepth(pointer,ratio * olddepth)
- setheight(pointer,newheight)
- setdepth(pointer,newdepth)
- if not olddata.extensible then
- -- check this on bonum and antykwa
- setoptions(pointer,0)
+ if size ~= 0 then
+ local delimiter = getdelimiter(pointer)
+ if delimiter then
+ local oldchar, font, fam = getcharspec(delimiter)
+ if oldchar > 0 and font > 0 then
+ local ht = getheight(pointer)
+ local dp = getdepth(pointer)
+ local data = fontdata[font]
+ local characters = data.characters
+ local olddata = characters[oldchar]
+ if olddata then
+ local template = olddata.varianttemplate
+ local newchar = mathematics.big(data,template or oldchar,size,method)
+ local newdata = characters[newchar]
+ local newheight = newdata.height or 0
+ local newdepth = newdata.depth or 0
+ if template then
+ setheight(pointer,newheight)
+ setdepth(pointer,newdepth)
+ if not olddata.extensible then
+ -- check this on bonum and antykwa
+ setoptions(pointer,0)
+ end
+ setoptions(pointer,getoptions(pointer)| tex.noadoptioncodes.scale )
+ if trace_fences then
+ report_fences("replacing %C using method %a, size %a and template %C",newchar,method,size,template)
+ end
+ else
+ -- 1 scaled point is a signal, for now
+ if ht == 1 then
+ setheight(pointer,newheight)
+ end
+ if dp == 1 then
+ setdepth(pointer,newdepth)
+ end
+ setchar(delimiter,newchar)
+ if trace_fences then
+ report_fences("replacing %C by %C using method %a and size %a",oldchar,char,method,size)
+ end
+ end
+ elseif trace_fences then
+ report_fences("not replacing %C using method %a and size %a",oldchar,method,size)
end
- if trace_fences then
--- report_fences("replacing %C using method %a, size %a, template %C and ratio %.3f",newchar,method,size,template,ratio)
- report_fences("replacing %C using method %a, size %a and template %C",newchar,method,size,template)
- end
- else
- -- 1 scaled point is a signal, for now
- if ht == 1 then
- setheight(pointer,newheight)
- end
- if dp == 1 then
- setdepth(pointer,newdepth)
- end
- setchar(delimiter,newchar)
- if trace_fences then
- report_fences("replacing %C by %C using method %a and size %a",oldchar,char,method,size)
- end
end
end
end
@@ -1552,18 +1553,22 @@
local attributes = mathalternates.attributes
local registered = mathalternates.registered
local hashes = mathalternates.hashes
+ local newchar = nil
for i=1,#registered do
local r = registered[i]
if (a & r) ~= 0 then
- local char = getchar(pointer)
+ local char = newchar or getchar(pointer)
local alt = hashes[i][char]
if alt == nil then
local what = attributes[r]
+local list = what.list
+if not list or list[char] then
alt = otf.getalternate(fontdata[fontid],char,what.feature,what.value) or false
if alt == char then
alt = false
end
hashes[i][char] = alt
+end
end
if alt then
if trace_alternates then
@@ -1571,11 +1576,15 @@
report_alternates("alternate %a, value %a, replacing glyph %U by glyph %U",
tostring(what.feature),tostring(what.value),char,alt)
end
- setchar(pointer,alt)
- break
+ -- setchar(pointer,alt)
+ -- break
+ newchar = alt
end
end
end
+ if newchar then
+ setchar(pointer,newchar)
+ end
end
end
end
@@ -2974,7 +2983,7 @@
return head
end
-callbacks.register('mlist_to_hlist',processors.mlisttohlist,"preprocessing math list")
+callbacks.register("mlist_to_hlist",processors.mlisttohlist,"convert a noad list into a node list")
-- tracing
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/math-rad.mklx
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/math-rad.mklx 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/math-rad.mklx 2023-05-06 22:03:57 UTC (rev 67034)
@@ -195,8 +195,8 @@
\zerocount
\fi
\Urooted
- \s!height\dimexpr\mathradicalparameter\c!height\relax
- \s!depth \dimexpr\mathradicalparameter\c!depth\relax
+ \s!height\dimexpr\ifcstok{\mathradicalparameter\c!height}\v!none\scaledpoint\else\mathradicalparameter\c!height\fi\relax
+ \s!depth \dimexpr\ifcstok{\mathradicalparameter\c!depth }\v!none\scaledpoint\else\mathradicalparameter\c!depth \fi\relax
\s!source\numexpr\namedboxanchor{\mathradicalparameter\c!source}\relax
\s!style \normalmathstyle
\ifzeronum\scratchcounter\else
@@ -378,6 +378,12 @@
\integerdef\delimitedrightanutityuc \privatecharactercode{delimited right annuity}
\integerdef\radicalbarextenderuc \privatecharactercode{radical bar extender}
+%D We now default to nice bars:
+
+\setupmathradical
+ [\c!rule=\v!symbol,
+ \c!top=\radicalbarextenderuc]
+
\definemathradical
[rannuity]
[\c!left=\zerocount,
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/math-spa.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/math-spa.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/math-spa.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -41,6 +41,7 @@
local getbox = nuts.getbox
local setoffsets = nuts.setoffsets
local addxoffset = nuts.addxoffset
+local setattrlist = nuts.setattrlist
local nextglue = nuts.traversers.glue
local nextlist = nuts.traversers.list
@@ -47,6 +48,11 @@
local nextboundary = nuts.traversers.boundary
local nextnode = nuts.traversers.node
+local insertafter = nuts.insertafter
+local insertbefore = nuts.insertbefore
+local newkern = nuts.pool.kern
+local newstrutrule = nuts.pool.strutrule
+
local texsetdimen = tex.setdimen
local texgetdimen = tex.getdimen
local texsetcount = tex.setcount
@@ -65,6 +71,10 @@
local d_strc_math_last_depth = texisdimen("d_strc_math_last_depth")
local d_strc_math_indent = texisdimen("d_strc_math_indent")
+local report = logs.reporter("mathalign")
+
+local trace = false trackers.register("mathalign",function(v) trace = v end )
+
local function moveon(s)
for n, id, subtype in nextnode, getnext(s) do
s = n
@@ -83,42 +93,6 @@
return s
end
--- stages[1] = function(specification,stage)
--- local box = getbox(specification.box)
--- local head = getlist(box)
--- local align = specification.alignstate
--- local distance = specification.distance
--- for s in nextboundary, head do
--- local data = getdata(s)
--- if data == boundary then
--- -- todo: skip over ghost, maybe penalty, maybe glues all in one loop
--- s = moveon(s)
--- for n, id, subtype in nextnode, getnext(s) do
--- s = n
--- if id == kern_code then
--- -- move on (s_2 case)
--- elseif id == glue_code then
--- -- move on
--- elseif id == penalty_code then
--- -- move on (untested)
--- elseif id == hlist_code and subtype == ghost_code then
--- -- move on
--- else
--- break
--- end
--- end
--- distance = distance + getdimensions(head,s)
--- break
--- end
--- end
--- texsetdimen("global",d_strc_math_indent,distance)
--- if align == 2 then
--- for n in nextglue, head do
--- setglue(n,getwidth(n),0,0,0,0)
--- end
--- end
--- end
-
-- -- todo: skip over ghost, maybe penalty, maybe glues all in one loop
--
-- local n = getnext(s)
@@ -171,16 +145,20 @@
p = getprev(p)
end
end
- -- we use a hangindent so we need to treat the first one
- local f = found[1]
- local delta = f[2] - max
- if delta ~= 0 then
- nuts.insertafter(head,moveon(head),nuts.pool.kern(-delta))
- end
- for i=2,#found do
+ for i=1,#found do
local f = found[i]
- local delta = f[2] - max
- nuts.insertafter(head,moveon(f[3]),nuts.pool.kern(-f[2])) -- check head
+ local w = f[2]
+ local d = i == 1 and (max-w) or -w
+ local k = newkern(d)
+ local r = newstrutrule(0,2*65536,2*65536)
+ local s = moveon(f[3])
+ if trace then
+ report("row %i, width %p, delta %p",i,w,d)
+ end
+ setattrlist(r,head)
+ setattrlist(k,head)
+ insertbefore(head,s,r)
+ insertafter(head,r,k)
end
end
texsetdimen("global",d_strc_math_indent,max)
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/math-stc.mklx
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/math-stc.mklx 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/math-stc.mklx 2023-05-06 22:03:57 UTC (rev 67034)
@@ -78,47 +78,35 @@
% At some point we can consider to use the more natural \LUAMETATEX\ features but the
% problem is that we lack proper support in fonts and we also have less control.
-\installcorenamespace {mathextensiblefallbacks}
+%installcorenamespace {mathextensiblefallbacks}
-% currently no italic correction ... problem is that we don't know yet if we have an italic
-% below so we we need to postpone
+% In math mode we no longer fallback, simply because only a few fonts implement
+% extensible using minus and equal signs. So either we provide a tweaked one or we
+% simply ignore the lack. Better choose a font that matches expectations that some
+% fragile imperfect hackery.
-% \def\math_stackers_fallback
-% {\hbox to \scratchwidth{\csname\??mathextensiblefallbacks\ifcsname\??mathextensiblefallbacks\number\scratchunicode\endcsname\number\scratchunicode\fi\endcsname}}
-% %{\csname\??mathextensiblefallbacks\ifcsname\??mathextensiblefallbacks\number\scratchunicode\endcsname\number\scratchunicode\fi\endcsname }
-
\def\math_stackers_fallback
{\mathstylehbox to \scratchwidth{\usemathstackerscolorparameter\c!color
\hss
\hskip\mathstackersparameter\c!topoffset\relax % for manual italic correction
- \ifcsname\??mathextensiblefallbacks\number\scratchunicode\endcsname
- \lastnamedcs
- \else
+ % \ifcsname\??mathextensiblefallbacks\number\scratchunicode\endcsname
+ % \lastnamedcs
+ % \else
\Umathchar\zerocount\zerocount\scratchunicode
- \fi
+ % \fi
\hss}}
-% \def\math_stackers_regular
-% {\mathstylehbox{\usemathstackerscolorparameter\c!color
-% \hskip\d_math_stackers_offset_l
-% \Umathaccent\zerocount\zerocount\scratchunicode
-% {\hskip\dimexpr\scratchwidth-\d_math_stackers_offset_l-\d_math_stackers_offset_r}%
-% \hskip\d_math_stackers_offset_r
-% }}
-
-% \def\math_stackers_stretch % we don't have that one yet
-% {\mathstylehbox{\usemathstackerscolorparameter\c!color
-% \hskip\d_math_stackers_offset_l
-% \Umathaccent\zerocount\zerocount\scratchunicode
-% {\hskip\dimexpr\hsize-\d_math_stackers_offset_l-\d_math_stackers_offset_r}%
-% \hskip\d_math_stackers_offset_r
-% }}
-
\def\math_stackers_regular
{\mathstylehbox{\usemathstackerscolorparameter\c!color
\hskip\d_math_stackers_offset_l
\Uhextensible
middle
+ \ifcstok{\mathstackersparameter\c!stretch}\v!yes
+ stretch
+ \fi
+ \ifcstok{\mathstackersparameter\c!shrink}\v!yes
+ shrink
+ \fi
width \dimexpr\scratchwidth-\d_math_stackers_offset_l-\d_math_stackers_offset_r\relax
\zerocount\scratchunicode
\relax
@@ -130,19 +118,9 @@
% $\Umathaccent 0 0 "2190{x}$ \par $\Umathaccent 0 0 "27F8{x}$\par
% $\Udelimiterunder 0 "2190{x}$ \par $\Udelimiterunder 0 "27F8{x}$\par
-\defcsname\??mathextensiblefallbacks\endcsname
- {\hpack{\vrule\s!width\scratchwidth\s!height.1\mathexheight\s!depth\zeropoint}}
+% \defcsname\??mathextensiblefallbacks\endcsname
+% {\hpack{\vrule\s!width\scratchwidth\s!height.1\mathexheight\s!depth\zeropoint}}
-% \def\math_stackers_with_fallback#codepoint%
-% {\begingroup
-% \scratchunicode#codepoint\relax
-% \ifcase\mathextensiblecode\fam\scratchunicode\relax
-% \math_stackers_fallback
-% \else
-% \math_stackers_stretch
-% \fi
-% \endgroup}
-
%D We don't really need this because we can assume that fonts have the right
%D extensibles. If needed I will make a general virtual extender for \OPENTYPE\
%D fonts.
@@ -337,6 +315,28 @@
\scratchbottomoffset\zeropoint
\fi}
+\def\math_stackers_get_max_width
+ {\ifdim\wd\scratchboxone>\scratchwidth
+ \scratchwidth\wd\scratchboxone
+ \fi
+ \ifdim\wd\scratchboxtwo>\scratchwidth
+ \scratchwidth\wd\scratchboxtwo
+ \fi
+ \ifdim\wd\scratchboxthree>\scratchwidth
+ \scratchwidth\wd\scratchboxthree
+ \fi}
+
+\def\math_stackers_set_max_width
+ {\ifdim\wd\scratchboxone<\scratchwidth
+ \setbox\scratchboxone\hpack to \scratchwidth{\hss\unhbox\scratchboxone\hss}% unhboxing makes leaders work
+ \fi
+ \ifdim\wd\scratchboxtwo<\scratchwidth
+ \setbox\scratchboxtwo\hpack to \scratchwidth{\hss\unhbox\scratchboxtwo\hss}%
+ \fi
+ \ifdim\wd\scratchboxthree<\scratchwidth
+ \setbox\scratchboxthree\hpack to \scratchwidth{\hss\unhbox\scratchboxthree\hss}%
+ \fi}
+
\protected\def\math_stackers_triplet#method#category#codepoint#toptext#bottomtext%
{\begingroup
\edef\currentmathstackers{#category}%
@@ -395,19 +395,7 @@
\else
\setmathtextbox\scratchboxthree\hbox{\math_stackers_middletext}%
\fi
- \scratchwidth\wd
- \ifdim\wd\scratchboxone>\wd\scratchboxtwo
- \ifdim\wd\scratchboxone>\wd\scratchboxthree
- \scratchboxone
- \else
- \scratchboxthree
- \fi
- \orelse\ifdim\wd\scratchboxtwo>\wd\scratchboxthree
- \scratchboxtwo
- \else
- \scratchboxthree
- \fi
- \relax
+ \math_stackers_get_max_width
\fi
%
\scratchdimen\mathstackersparameter\c!minwidth\relax
@@ -421,19 +409,11 @@
\setbox\scratchboxthree\csname\??mathstackersalternative\p_alternative\endcsname
\dostoptagged
\fi
- \ifdim\wd\scratchboxthree>\scratchwidth
- \scratchwidth\wd\scratchboxthree
- \fi
+% \ifdim\wd\scratchboxthree>\scratchwidth
+% \scratchwidth\wd\scratchboxthree
+% \fi
%
- \ifdim\wd\scratchboxone<\scratchwidth
- \setbox\scratchboxone\hpack to \scratchwidth{\hss\unhbox\scratchboxone\hss}% unhboxing makes leaders work
- \fi
- \ifdim\wd\scratchboxtwo<\scratchwidth
- \setbox\scratchboxtwo\hpack to \scratchwidth{\hss\unhbox\scratchboxtwo\hss}%
- \fi
- \ifdim\wd\scratchboxthree<\scratchwidth
- \setbox\scratchboxthree\hpack to \scratchwidth{\hss\unhbox\scratchboxthree\hss}%
- \fi
+ \math_stackers_set_max_width
%
\ifcsname\??mathstackerslocation\p_location\endcsname
\ifcase\csname\??mathstackerslocation\p_location\endcsname\relax
@@ -458,7 +438,6 @@
\ifzeropt\scratchdistance\else
\setbox\scratchboxthree\hpack{\lower\scratchdistance\box\scratchboxthree}%
\fi
- %
\math_stackers_normalize_three
% analysis
\ifdim\htdp\scratchboxtwo>\zeropoint
@@ -625,6 +604,8 @@
\fi
%
\math_stackers_normalize_three
+ \math_stackers_get_max_width
+ \math_stackers_set_max_width
% analysis
\ifcase\c_math_stackers_bottom
\ifcase\c_math_stackers_top
@@ -654,7 +635,7 @@
\math_stackers_bottom\bgroup
\lower\dimexpr
\scratchdepth
- +\ht\scratchboxtwo
+ +\ht\ifcase\c_math_stackers_top\scratchboxtwo\else\scratchboxone\fi
+\mathstackersparameter\c!distance % was \c!voffset
\relax
\ifcase\c_math_stackers_top
@@ -973,6 +954,7 @@
[\v!both]
[\v!mathematics]
[\c!location=\v!top, % ?
+ \c!mathclass=\s!accent, % check chemistry
\c!strut=\v!no,
\c!middlecommand=\mathematics,
\c!hoffset=\zeropoint]
@@ -989,7 +971,10 @@
[\v!vfenced]
[\v!both]
[\c!mathclass=\s!ordinary,
- \c!mathlimits=\v!yes]
+ \c!mathlimits=\v!yes,
+ % only these arrows make sense
+ \c!stretch=\v!yes,
+ \c!shrink=\v!yes]
% these are needed for mathml:
@@ -1037,7 +1022,7 @@
\immutable\protected\def\normaldoublebrace {\Umathaccent \s!both \zerocount \zerocount "23DE \zerocount \zerocount "23DF }
\immutable\protected\def\normaldoubleparent{\Umathaccent \s!both \zerocount \zerocount "23DC \zerocount \zerocount "23DD }
-% let's keep this
+% let's keep this .. some are not defined so there's nothing normal
\aliased\let\normaloverbrace \overbrace
\aliased\let\normalunderbrace \underbrace
@@ -1045,11 +1030,12 @@
\aliased\let\normalunderparent \underparent
\aliased\let\normaloverbracket \overbracket
\aliased\let\normalunderbracket \underbracket
-\aliased\let\normalunderleftarrow \underleftarrow
-\aliased\let\normaloverleftarrow \overleftarrow
-\aliased\let\normalunderrightarrow\underrightarrow
-\aliased\let\normaloverrightarrow \overrightarrow
+%aliased\let\normalunderleftarrow \underleftarrow
+%aliased\let\normaloverleftarrow \overleftarrow
+%aliased\let\normalunderrightarrow\underrightarrow
+%aliased\let\normaloverrightarrow \overrightarrow
+
%D Here come the new ones:
\definemathstackers [\v!none] [\v!mathematics] [\c!hoffset=\zeropoint]
@@ -1058,7 +1044,7 @@
\definemathstackers [\v!medium] [\v!mathematics] [\c!hoffset=1.5\mathemwidth]
\definemathstackers [\v!big] [\v!mathematics] [\c!hoffset=2\mathemwidth]
-\definemathextensible [\v!reverse] [xrel] ["002D]
+\definemathextensible [\v!reverse] [xrel] ["2212] % ["002D]
\definemathextensible [\v!reverse] [xequal] ["003D]
\definemathextensible [\v!reverse] [xleftarrow] ["2190] % ["27F5]
\definemathextensible [\v!reverse] [xrightarrow] ["2192] % ["27F6]
@@ -1081,14 +1067,14 @@
\definemathextensible [\v!reverse] [xrightleftharpoons] ["21CC]
\definemathextensible [\v!reverse] [xtriplerel] ["2261]
-\definemathextensible [\v!mathematics] [mrel] ["002D]
+\definemathextensible [\v!mathematics] [mrel] ["2212] % ["002D]
\definemathextensible [\v!mathematics] [mequal] ["003D]
\definemathextensible [\v!mathematics] [mleftarrow] ["2190] % ["27F5]
\definemathextensible [\v!mathematics] [mrightarrow] ["2192] % ["27F6]
-\definemathextensible [\v!mathematics] [mleftrightarrow] ["27F7]
-\definemathextensible [\v!mathematics] [mLeftarrow] ["27F8]
-\definemathextensible [\v!mathematics] [mRightarrow] ["27F9]
-\definemathextensible [\v!mathematics] [mLeftrightarrow] ["27FA]
+\definemathextensible [\v!mathematics] [mleftrightarrow] ["2194]
+\definemathextensible [\v!mathematics] [mLeftarrow] ["21D0]
+\definemathextensible [\v!mathematics] [mRightarrow] ["21D2]
+\definemathextensible [\v!mathematics] [mLeftrightarrow] ["21D4]
\definemathextensible [\v!mathematics] [mtwoheadleftarrow] ["219E]
\definemathextensible [\v!mathematics] [mtwoheadrightarrow] ["21A0]
\definemathextensible [\v!mathematics] [mmapsto] ["21A6]
@@ -1104,17 +1090,18 @@
\definemathextensible [\v!mathematics] [mrightleftharpoons] ["21CC]
\definemathextensible [\v!mathematics] [mtriplerel] ["2261]
-\definemathextensible [\v!text] [trel] ["002D]
+\definemathextensible [\v!text] [trel] ["2212] % ["002D]
\definemathextensible [\v!text] [tequal] ["003D]
\definemathextensible [\v!text] [tmapsto] ["21A6]
\definemathextensible [\v!text] [tleftarrow] ["2190] % ["27F5]
\definemathextensible [\v!text] [trightarrow] ["2192] % ["27F6]
-\definemathextensible [\v!text] [tleftrightarrow] ["27F7]
-\definemathextensible [\v!text] [tLeftarrow] ["27F8]
-\definemathextensible [\v!text] [tRightarrow] ["27F9]
-\definemathextensible [\v!text] [tLeftrightarrow] ["27FA]
+\definemathextensible [\v!text] [tleftrightarrow] ["2194]
+\definemathextensible [\v!text] [tLeftarrow] ["21D0]
+\definemathextensible [\v!text] [tRightarrow] ["21D2]
+\definemathextensible [\v!text] [tLeftrightarrow] ["21D4]
\definemathextensible [\v!text] [ttwoheadleftarrow] ["219E]
\definemathextensible [\v!text] [ttwoheadrightarrow] ["21A0]
+\definemathextensible [\v!text] [tmapsto] ["21A6]
\definemathextensible [\v!text] [thookleftarrow] ["21A9]
\definemathextensible [\v!text] [thookrightarrow] ["21AA]
\definemathextensible [\v!text] [tleftharpoondown] ["21BD]
@@ -1127,25 +1114,47 @@
\definemathextensible [\v!text] [trightleftharpoons] ["21CC]
\definemathextensible [\v!text] [ttriplerel] ["2261]
-\definemathoverextensible [\v!top] [overleftarrow] ["2190] % ["27F5]
-\definemathoverextensible [\v!top] [overrightarrow] ["2192] % ["27F6]
-\definemathoverextensible [\v!top] [overleftrightarrow] ["27F7]
-\definemathoverextensible [\v!top] [overtwoheadleftarrow] ["27F8]
-\definemathoverextensible [\v!top] [overtwoheadrightarrow] ["27F9]
-\definemathoverextensible [\v!top] [overleftharpoondown] ["21BD]
-\definemathoverextensible [\v!top] [overleftharpoonup] ["21BC]
-\definemathoverextensible [\v!top] [overrightharpoondown] ["21C1]
-\definemathoverextensible [\v!top] [overrightharpoonup] ["21C0]
+\definemathoverextensible [\v!top] [overleftarrow] ["2190] % ["27F5]
+\definemathoverextensible [\v!top] [overrightarrow] ["2192] % ["27F6]
+\definemathoverextensible [\v!top] [overleftrightarrow] ["2194] % ["27F7]
+\definemathoverextensible [\v!top] [overtwoheadleftarrow] ["219E] % ["27F8]
+\definemathoverextensible [\v!top] [overtwoheadrightarrow] ["21A0] % ["27F9]
+\definemathoverextensible [\v!top] [overlefttailarrow] ["21A2]
+\definemathoverextensible [\v!top] [overrighttailarrow] ["21A3]
+\definemathoverextensible [\v!top] [overleftbararrow] ["21A4]
+\definemathoverextensible [\v!top] [overrightbararrow] ["21A6]
+\definemathoverextensible [\v!top] [overlefthookarrow] ["21A9]
+\definemathoverextensible [\v!top] [overrighthookarrow] ["21AA]
+\definemathoverextensible [\v!top] [overleftharpoondown] ["21BD]
+\definemathoverextensible [\v!top] [overleftharpoonup] ["21BC]
+\definemathoverextensible [\v!top] [overrightharpoondown] ["21C1]
+\definemathoverextensible [\v!top] [overrightharpoonup] ["21C0]
+\definemathoverextensible [\v!top] [overRightarrow] ["21D2] % ["27F9]
+\definemathoverextensible [\v!top] [overLeftarrow] ["21D0] % ["27F8]
+\definemathoverextensible [\v!top] [overLeftrightarrow] ["21D4] % ["27F8]
+\definemathoverextensible [\v!top] [overLeftbararrow] ["2906]
+\definemathoverextensible [\v!top] [overRightbararrow] ["2907]
\definemathunderextensible [\v!bottom] [underleftarrow] ["2190] % ["27F5]
\definemathunderextensible [\v!bottom] [underrightarrow] ["2192] % ["27F6]
-\definemathunderextensible [\v!bottom] [underleftrightarrow] ["27F7]
-\definemathunderextensible [\v!bottom] [undertwoheadleftarrow] ["27F8]
-\definemathunderextensible [\v!bottom] [undertwoheadrightarrow] ["27F9]
+\definemathunderextensible [\v!bottom] [underleftrightarrow] ["2194] % ["27F7]
+\definemathunderextensible [\v!bottom] [undertwoheadleftarrow] ["219E] % ["27F8]
+\definemathunderextensible [\v!bottom] [undertwoheadrightarrow] ["21A0] % ["27F9]
+\definemathunderextensible [\v!bottom] [underlefttailarrow] ["21A2]
+\definemathunderextensible [\v!bottom] [underrighttailarrow] ["21A3]
+\definemathunderextensible [\v!bottom] [underleftbararrow] ["21A4]
+\definemathunderextensible [\v!bottom] [underrightbararrow] ["21A6]
+\definemathunderextensible [\v!bottom] [underlefthookarrow] ["21A9]
+\definemathunderextensible [\v!bottom] [underrighthookarrow] ["21AA]
\definemathunderextensible [\v!bottom] [underleftharpoondown] ["21BD]
\definemathunderextensible [\v!bottom] [underleftharpoonup] ["21BC]
\definemathunderextensible [\v!bottom] [underrightharpoondown] ["21C1]
\definemathunderextensible [\v!bottom] [underrightharpoonup] ["21C0]
+\definemathunderextensible [\v!bottom] [underRightarrow] ["21D2] % ["27F9]
+\definemathunderextensible [\v!bottom] [underLeftarrow] ["21D0] % ["27F8]
+\definemathunderextensible [\v!bottom] [underLeftrightarrow] ["21D4] % ["27F8]
+\definemathunderextensible [\v!bottom] [underLeftbararrow] ["2906]
+\definemathunderextensible [\v!bottom] [underRightbararrow] ["2907]
%D We don't use overline and underline. This is one of the overlooked aspects of
%D unicode cq. opentype math: why treat rules different than e.g. arrows and
@@ -1160,9 +1169,9 @@
%D in the backend (okay, we still need to deal with some cut and paste issues but at
%D least we now know what we deal with.
-\definemathoverextensible [\v!vfenced] [overbar] ["203E]
-\definemathunderextensible [\v!vfenced] [underbar] ["203E] % ["0332]
-\definemathdoubleextensible [\v!vfenced] [doublebar] ["203E] ["203E] % ["0332]
+\definemathoverextensible [\v!vfenced] [overbar] ["203E] % todo: private
+\definemathunderextensible [\v!vfenced] [underbar] ["203E] % todo: private
+\definemathdoubleextensible [\v!vfenced] [doublebar] ["203E] ["203E] % todo: private
\definemathoverextensible [\v!vfenced] [overbrace] ["23DE]
\definemathunderextensible [\v!vfenced] [underbrace] ["23DF]
@@ -1178,13 +1187,13 @@
%D For mathml:
-\definemathdoubleextensible [\v!both] [overbarunderbar] ["203E] ["203E]
+\definemathdoubleextensible [\v!both] [overbarunderbar] ["203E] ["203E] % todo: private
\definemathdoubleextensible [\v!both] [overbraceunderbrace] ["23DE] ["23DF]
\definemathdoubleextensible [\v!both] [overparentunderparent] ["23DC] ["23DD]
\definemathdoubleextensible [\v!both] [overbracketunderbracket] ["23B4] ["23B5]
-\definemathovertextextensible [\v!bothtext] [overbartext] ["203E]
-\definemathundertextextensible [\v!bothtext] [underbartext] ["203E]
+\definemathovertextextensible [\v!bothtext] [overbartext] ["203E] % todo: private
+\definemathundertextextensible [\v!bothtext] [underbartext] ["203E] % todo: private
\definemathovertextextensible [\v!bothtext] [overbracetext] ["23DE]
\definemathundertextextensible [\v!bothtext] [underbracetext] ["23DF]
\definemathovertextextensible [\v!bothtext] [overparenttext] ["23DC]
@@ -1206,56 +1215,79 @@
\definemathextensible [\v!chemistry] [crightoverleftarrow] ["21C4]
\definemathextensible [\v!chemistry] [cleftoverrightarrow] ["21C6]
-\def\math_stackers_hacked_fill#1#2#3%
- {\mathematics
- {\begingroup
- \mathsurround\zeropoint
- \thickmuskip \zeromuskip
- \medmuskip \zeromuskip
- \thinmuskip \zeromuskip
- \tinymuskip \zeromuskip
- \pettymuskip \zeromuskip
- \ifrelax#1%
- \cleaders\mathstylehbox{#2}\hfill
- \else
- #1%
- \mkern-7\onemuskip
- \cleaders\mathstylehbox{\mkern-2\onemuskip#2\mkern-2\onemuskip}\hfill
- \mkern-7\onemuskip
- #3%
- \fi
- \endgroup}}
+% \def\math_stackers_hacked_fill#1#2#3%
+% {\mathematics
+% {\begingroup
+% \mathsurround\zeropoint
+% \thickmuskip \zeromuskip
+% \medmuskip \zeromuskip
+% \thinmuskip \zeromuskip
+% \tinymuskip \zeromuskip
+% \pettymuskip \zeromuskip
+% \ifrelax#1%
+% \cleaders\mathstylehbox{#2}\hfill
+% \else
+% #1%
+% \mkern-7\onemuskip
+% \cleaders\mathstylehbox{\mkern-2\onemuskip#2\mkern-2\onemuskip}\hfill
+% \mkern-7\onemuskip
+% #3%
+% \fi
+% \endgroup}}
+%
+% \immutable\protected\def\rightarrowfill {\math_stackers_hacked_fill \relbar \relbar \rightarrow}
+% \immutable\protected\def\leftarrowfill {\math_stackers_hacked_fill \leftarrow \relbar \relbar}
+% \immutable\protected\def\rightoverleftarrowfill{\math_stackers_hacked_fill \relax \crightoverleftarrow \relax}
+% \immutable\protected\def\leftoverrightarrowfill{\math_stackers_hacked_fill \relax \cleftoverrightarrow \relax}
+% \immutable\protected\def\equalfill {\math_stackers_hacked_fill \Relbar \Relbar \Relbar}
+% \immutable\protected\def\Rightarrowfill {\math_stackers_hacked_fill \Relbar \Relbar \Rightarrow}
+% \immutable\protected\def\Leftarrowfill {\math_stackers_hacked_fill \Leftarrow \Relbar \Relbar}
+% \immutable\protected\def\Leftrightarrowfill {\math_stackers_hacked_fill \Leftarrow \Relbar \Rightarrow}
+% \immutable\protected\def\leftrightarrowfill {\math_stackers_hacked_fill \leftarrow \relbar \rightarrow}
+% \immutable\protected\def\mapstofill {\math_stackers_hacked_fill{\mapstochar\relbar} \relbar \rightarrow}
+% \immutable\protected\def\twoheadrightarrowfill {\math_stackers_hacked_fill \relbar \relbar \twoheadrightarrow}
+% \immutable\protected\def\twoheadleftarrowfill {\math_stackers_hacked_fill \twoheadleftarrow \relbar \relbar}
+% \immutable\protected\def\rightharpoondownfill {\math_stackers_hacked_fill \relbar \relbar \rightharpoondown}
+% \immutable\protected\def\rightharpoonupfill {\math_stackers_hacked_fill \relbar \relbar \rightharpoonup}
+% \immutable\protected\def\leftharpoondownfill {\math_stackers_hacked_fill \leftharpoondown \relbar \relbar}
+% \immutable\protected\def\leftharpoonupfill {\math_stackers_hacked_fill \leftharpoonup \relbar \relbar}
+% \immutable\protected\def\hookleftfill {\math_stackers_hacked_fill \leftarrow \relbar {\relbar\joinrel\rhook}}
+% \immutable\protected\def\hookrightfill {\math_stackers_hacked_fill{\lhook\joinrel\relbar}\relbar \rightarrow}
+% \immutable\protected\def\relfill {\math_stackers_hacked_fill \relbar \relbar \relbar}
+% \immutable\protected\def\triplerelfill {\math_stackers_hacked_fill \equiv \equiv \equiv}
+%
+% \permanent\tolerant\protected\def\defineextensiblefiller[#1]#*[#2]%
+% {\immutable\letcsname\??mathextensiblefallbacks\number#2\expandafter\endcsname\csname#1\endcsname}
-\immutable\protected\def\rightarrowfill {\math_stackers_hacked_fill \relbar \relbar \rightarrow}
-\immutable\protected\def\leftarrowfill {\math_stackers_hacked_fill \leftarrow \relbar \relbar}
-\immutable\protected\def\rightoverleftarrowfill{\math_stackers_hacked_fill \relax \crightoverleftarrow \relax}
-\immutable\protected\def\leftoverrightarrowfill{\math_stackers_hacked_fill \relax \cleftoverrightarrow \relax}
-\immutable\protected\def\equalfill {\math_stackers_hacked_fill \Relbar \Relbar \Relbar}
-\immutable\protected\def\Rightarrowfill {\math_stackers_hacked_fill \Relbar \Relbar \Rightarrow}
-\immutable\protected\def\Leftarrowfill {\math_stackers_hacked_fill \Leftarrow \Relbar \Relbar}
-\immutable\protected\def\Leftrightarrowfill {\math_stackers_hacked_fill \Leftarrow \Relbar \Rightarrow}
-\immutable\protected\def\leftrightarrowfill {\math_stackers_hacked_fill \leftarrow \relbar \rightarrow}
-\immutable\protected\def\mapstofill {\math_stackers_hacked_fill{\mapstochar\relbar} \relbar \rightarrow}
-\immutable\protected\def\twoheadrightarrowfill {\math_stackers_hacked_fill \relbar \relbar \twoheadrightarrow}
-\immutable\protected\def\twoheadleftarrowfill {\math_stackers_hacked_fill \twoheadleftarrow \relbar \relbar}
-\immutable\protected\def\rightharpoondownfill {\math_stackers_hacked_fill \relbar \relbar \rightharpoondown}
-\immutable\protected\def\rightharpoonupfill {\math_stackers_hacked_fill \relbar \relbar \rightharpoonup}
-\immutable\protected\def\leftharpoondownfill {\math_stackers_hacked_fill \leftharpoondown \relbar \relbar}
-\immutable\protected\def\leftharpoonupfill {\math_stackers_hacked_fill \leftharpoonup \relbar \relbar}
-\immutable\protected\def\hookleftfill {\math_stackers_hacked_fill \leftarrow \relbar {\relbar\joinrel\rhook}}
-\immutable\protected\def\hookrightfill {\math_stackers_hacked_fill{\lhook\joinrel\relbar}\relbar \rightarrow}
-\immutable\protected\def\relfill {\math_stackers_hacked_fill \relbar \relbar \relbar}
-\immutable\protected\def\triplerelfill {\math_stackers_hacked_fill \equiv \equiv \equiv}
+\installcorenamespace {mathadaptiveextensible}
-%D For the moment (needs checking):
+\defineadaptive
+ [mathfiller]
+ [\c!setups=adaptive:mathfiller,
+ \c!stretch=1fill]
+\startsetups adaptive:mathfiller
+ \setbox\usedadaptivebox\hbox to \usedadaptivewidth \bgroup
+ \startimath
+ \Uhextensible
+ \s!width \usedadaptivewidth
+ \s!middle \zerocount \usedadaptivealternative
+ \relax
+ \stopimath
+ \egroup
+\stopsetups
+
+\def\mathfiller#1%
+ {\begingroup
+ \scratchunicode#1\relax
+ \adaptivebox[mathfiller][\c!alternative=#1]{\hss\strut\hss}%
+ \endgroup}
+
\permanent\tolerant\protected\def\defineextensiblefiller[#1]#*[#2]%
- {\immutable\letcsname\??mathextensiblefallbacks\number#2\expandafter\endcsname\csname#1\endcsname
- %\immutable\letcsname#1\expandafter\endcsname\csname#1\endcsname
- } % huh?
+ {\frozen\instance\edefcsname#1\endcsname{\mathfiller{\number#2}}}
-%defineextensiblefiller [barfill] ["203E] % yet undefined
-\defineextensiblefiller [relfill] ["002D]
+%defineextensiblefiller [barfill] ["203E] % % todo: private
+\defineextensiblefiller [relfill] ["2212] % ["002D]
\defineextensiblefiller [equalfill] ["003D]
\defineextensiblefiller [leftarrowfill] ["2190]
\defineextensiblefiller [rightarrowfill] ["2192]
@@ -1302,14 +1334,18 @@
{\begingroup
\edef\currentmathstackers{#category}%
\edef\p_moffset{\mathstackersparameter\c!moffset}%
- \ifempty\p_moffset \else
- \mskip\p_moffset\relax
+ \ifconditional\indisplaymath
+ \ifempty\p_moffset \else
+ \ifmmode\mskip\else\hskip\fi\p_moffset\relax
+ \fi
\fi
\ifmmode\math_atom_by_parameter\mathstackersparameter\else\dontleavehmode\fi
{\usemathstackerscolorparameter\c!color
\Umathchar\zerocount\zerocount#codepoint}%
- \ifempty\p_moffset \else
- \mskip\p_moffset\relax
+ \ifconditional\indisplaymath
+ \ifempty\p_moffset \else
+ \ifmmode\mskip\else\hskip\fi\p_moffset\relax
+ \fi
\fi
\endgroup}
@@ -1319,6 +1355,7 @@
\definemathunstacked [\v!wide] [impliedby] ["27F8] % \mathrel{\;\Longleftarrow\;}
\definemathunstacked [\v!wide] [implies] ["27F9] % \mathrel{\;\Longrightarrow\;}
\definemathunstacked [\v!wide] [iff] ["27FA] % \mathrel{\;\Longleftrightarrow\;}
+\definemathunstacked [\v!wide] [impliesby] ["27FA] % \mathrel{\;\Longleftrightarrow\;}
% New (an example of using \mathexheight):
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/math-ttv.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/math-ttv.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/math-ttv.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -130,6 +130,7 @@
mathencodings["tex-mr"] = {
[0x00393] = 0x00, -- Gamma
[0x00394] = 0x01, -- Delta
+ [0x02206] = 0x01, -- Laplace
[0x00398] = 0x02, -- Theta
[0x0039B] = 0x03, -- Lambda
[0x0039E] = 0x04, -- Xi
@@ -144,7 +145,8 @@
-- [0x002C7] = 0x14, -- [math]check
-- [0x002D8] = 0x15, -- [math]breve
-- [0x000AF] = 0x16, -- [math]bar
--- [0x00021] = 0x21, -- !
+[0x00021] = 0x21, -- ! -- MS
+[0x00026] = 0x26, -- & -- MS
[0x00028] = 0x28, -- (
[0x00029] = 0x29, -- )
[0x0002B] = 0x2B, -- +
@@ -485,7 +487,8 @@
[0x02240] = 0x6F, -- wr
[0x0221A] = 0x70, -- sqrt. AM: Check surd??
[0x02A3F] = 0x71, -- amalg
- [0x1D6FB] = 0x72, -- nabla
+ [0x02207] = 0x72, -- nabla (upright)
+ [0x1D6FB] = 0x72, -- nabla (italic)
-- [0x0222B] = 0x73, -- smallint (TODO: what about intop?)
[0x02294] = 0x74, -- sqcup
[0x02293] = 0x75, -- sqcap
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/math-twk.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/math-twk.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/math-twk.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -95,5 +95,12 @@
\permanent\protected\def\minute{\iffontchar\font\textminute\textminute\else\mathminute\fi}
\permanent\protected\def\second{\iffontchar\font\textsecond\textsecond\else\mathsecond\fi}
+% \startsetups[math:rules]
+% \letmathfractionparameter\c!rule\v!symbol
+% \setmathfractionparameter\c!middle{"203E}%
+% \letmathradicalparameter \c!rule\v!symbol
+% \setmathradicalparameter \c!top{\radicalbarextenderuc}%
+% \setmathfenceparameter \c!alternative{1}%
+% \stopsetups
\protect
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/math-vfu.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/math-vfu.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/math-vfu.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,6 +6,8 @@
license = "see context related readme files"
}
+-- somehow an italic gets passed for 'next'
+
-- All these math vectors .. thanks to Aditya and Mojca they become better and
-- better. If you have problems with math fonts or miss characters report it to the
-- ConTeXt mailing list. Also thanks to Boguslaw for finding a couple of errors.
@@ -62,27 +64,56 @@
local nps = fonts.helpers.newprivateslot
local ps = fonts.helpers.privateslot
+nps("rule middle piece")
+nps("rule right piece")
+nps("rule left piece")
+nps("double rule middle piece")
+nps("double rule right piece")
+nps("double rule left piece")
+nps("arrow left piece")
+nps("arrow right piece")
+nps("double arrow left piece")
+nps("double arrow right piece")
+
+nps("flat rule left piece")
+nps("flat rule middle piece")
+nps("flat rule right piece")
+
+nps("flat double rule left piece")
+nps("flat double rule middle piece")
+nps("flat double rule right piece")
+
+nps("minus rule left piece")
+nps("minus rule middle piece")
+nps("minus rule right piece")
+
do
- local function horibar(main,unicode,rule,left,right,normal)
+ -- this overlaps with math-act
+
+ local function horibar(main,unicode,rule,left,right,normal,force,m,l,r)
local characters = main.characters
- if not characters[unicode] then
+ local data = characters[unicode]
+ if force or not data then
local height = main.mathparameters.defaultrulethickness or 4*65536/10
- local f_rule = rule and formatters["M-HORIBAR-RULE-%H"](rule)
- local p_rule = rule and hasprivate(main,f_rule)
+ local f_rule = rule and formatters["M-HORIBAR-M-%H"](rule)
+ local p_rule = rule and hasprivate(main,f_rule)
+ local ndata = normal and characters[normal]
if rule and left and right and normal then
- local ldata = characters[left]
- local mdata = characters[rule]
- local rdata = characters[right]
- local ndata = characters[normal]
+ local ldata = characters[l or left]
+ local mdata = characters[m or rule]
+ local rdata = characters[r or right]
local lwidth = ldata.width or 0
local mwidth = mdata.width or 0
local rwidth = rdata.width or 0
local nwidth = ndata.width or 0
local down = (mdata.height / 2) - height
- --
- local f_left = right and formatters["M-HORIBAR-LEFT-%H"](right)
- local f_right = right and formatters["M-HORIBAR-RIGHT-%H"](right)
+if unicode == normal then
+ height = ndata.height
+ down = 0
+end --
+ local f_left = left and formatters["M-HORIBAR-L-%H"](left)
+ local f_right = right and formatters["M-HORIBAR-R-%H"](right)
local p_left = left and hasprivate(main,f_left)
local p_right = right and hasprivate(main,f_right)
--
@@ -89,13 +120,13 @@
if not characters[p_rule] then
p_rule = addprivate(main,f_rule,{
height = height,
- width = mwidth,
- width = .95*mwidth,
+ width = .95*mwidth,
+-- keepvirtual = true,
commands = {
push,
- leftcommand[.025*mwidth],
+ leftcommand[.025*mwidth],
downcommand[down],
- slotcommand[0][rule],
+ slotcommand[0][m or rule],
pop,
},
})
@@ -103,13 +134,13 @@
if not characters[p_left] then
p_left = addprivate(main,f_left,{
height = height,
- width = lwidth,
- width = .95*lwidth,
+ width = .95*lwidth,
+-- keepvirtual = true,
commands = {
push,
- leftcommand[.025*lwidth],
+ leftcommand[.025*lwidth],
downcommand[down],
- slotcommand[0][left],
+ slotcommand[0][l or left],
pop,
},
})
@@ -117,50 +148,78 @@
if not characters[p_right] then
p_right = addprivate(main,f_right,{
height = height,
- width = rwidth,
- width = .95*rwidth,
+ width = .95*rwidth,
+-- keepvirtual = true,
commands = {
push,
- leftcommand[.025*rwidth],
+ leftcommand[.025*rwidth],
downcommand[down],
- slotcommand[0][right],
+ slotcommand[0][r or right],
pop,
},
})
end
- characters[unicode] = {
- keepvirtual = true,
- partsorientation = "horizontal",
- height = height,
- width = nwidth,
- commands = {
+if unicode ~= normal then
+ data = {
+ unicode = unicode,
+ height = height,
+ width = nwidth,
+ commands = {
downcommand[down],
slotcommand[0][normal]
},
- parts = {
- { glyph = p_left, ["end"] = 0.4*lwidth },
- { glyph = p_rule, extender = 1, ["start"] = mwidth, ["end"] = mwidth },
- { glyph = p_right, ["start"] = 0.6*rwidth },
- }
}
+ characters[unicode] = data
+end
+ data.parts = {
+ { glyph = p_left, ["end"] = 0.4*lwidth },
+ { glyph = p_rule, extender = 1, ["start"] = mwidth, ["end"] = mwidth },
+ { glyph = p_right, ["start"] = 0.6*rwidth },
+ }
else
- local width = main.parameters.quad/4 or 4*65536
+ local width = main.parameters.quad/2 or 4*65536 -- 3
if not characters[p_rule] then
- p_rule = addprivate(main,f_rule,{
- height = height,
- width = width,
- commands = { push, { "rule", height, width }, pop },
- })
+ if unicode == normal then
+ p_rule = addprivate(main,f_rule,{
+ height = ndata.height,
+ width = width,
+ commands = {
+ push,
+ upcommand[(ndata.height - height)/2],
+ { "rule", height, width },
+ pop
+ },
+ })
+ else
+ p_rule = addprivate(main,f_rule,{
+ height = height,
+ width = width,
+ commands = {
+ push,
+ { "rule", height, width },
+ pop
+ },
+ })
+ end
end
- characters[unicode] = {
- keepvirtual = true,
- partsorientation = "horizontal",
- parts = {
- { glyph = p_rule },
- { glyph = p_rule, extender = 1, ["start"] = width/2, ["end"] = width/2 },
+if unicode ~= normal then
+ data = {
+ unicode = unicode,
+ height = height,
+ width = width,
+ commands = {
+ slotcommand[0][p_rule]
}
}
+ characters[unicode] = data
+end
+ data.parts = {
+ { glyph = p_rule, ["start"] = width/2, ["end"] = width/2 },
+ { glyph = p_rule, extender = 1, ["start"] = width/2, ["end"] = width/2 },
+ }
end
+ data.keepvirtual = true -- i need to figure this out
+ data.partsorientation = "horizontal"
end
end
@@ -180,8 +239,8 @@
local nwidth = ndata.width or 0
local down = (mdata.height / 2) - height
--
- local f_rule = rule and formatters["M-ROOTBAR-RULE-%H"](rule)
- local f_right = right and formatters["M-ROOTBAR-RIGHT-%H"](right)
+ local f_rule = rule and formatters["M-ROOTBAR-M-%H"](rule)
+ local f_right = right and formatters["M-ROOTBAR-R-%H"](right)
local p_rule = rule and hasprivate(main,f_rule)
local p_right = right and hasprivate(main,f_right)
--
@@ -234,13 +293,19 @@
if characters[unicode] then
local template = characters[first]
if template then
- if not characters[rule] then
- local xheight = main.mathparameters.xheight
+ local crule = characters[rule]
+ local xheight = main.mathparameters.xheight
+ local rheight = 0
+ local rdepth = 0
+-- if crule then
+-- rheight = crule.height
+-- rdepth = crule.depth
+-- else
local width = template.width / 4
local height = template.height
local depth = template.depth
- local rheight = where == "top" and height or 3*height
- local rdepth = where == "top" and 2*height or 0
+ rheight = where == "top" and height or 3*height
+ rdepth = where == "top" and 2*height or 0
characters[rule] = {
height = rheight,
depth = rdepth,
@@ -247,8 +312,10 @@
width = width,
commands = { push, { "rule", height, width }, pop },
}
- characters[first].depth = rdepth
- characters[last] .depth = rdepth
+-- end
+ characters[first].depth = rdepth
+ characters[last] .depth = rdepth
+ if where == "top" then
while true do
chardata.height = chardata.height - xheight
chardata.depth = 0
@@ -261,12 +328,23 @@
break
end
end
+ else
+ while true do
+ chardata.height = 0
+ local next = chardata.next
+ if next then
+ unicode = next
+ chardata = characters[unicode]
+ else
+ break
+ end
+ end
end
chardata.keepvirtual = true
chardata.partsorientation = "horizontal"
chardata.parts = {
{ glyph = first },
- { glyph = rule, extender = 1 },
+ { glyph = rule, extender = 1, start = width/2, ["end"] = width/2 },
{ glyph = last },
}
end
@@ -273,29 +351,26 @@
end
end
- local function brace(main,unicode,first,rule,left,right,rule,last)
+ local function brace(main,unicode,first,rule,left,right,rule,last,where)
local characters = main.characters
local chardata = characters[unicode]
if chardata then
local template = characters[first]
if template then
- if not characters[rule] then
- local xheight = main.mathparameters.xheight
- local width = template.width / 4
- local height = template.height
- local depth = template.depth
- local rheight = 3*height
- local rdepth = 2*height
- characters[rule] = {
- height = rheight,
- depth = rdepth,
- width = width,
- commands = { push, { "rule", height, width }, pop },
- }
- characters[first].depth = rdepth
- characters[last] .depth = rdepth
- characters[left] .height = rheight
- characters[right].height = rheight
+ local xheight = main.mathparameters.xheight
+ local width = template.width / 4
+ local height = template.height
+ local depth = template.depth
+ local rheight = 3*height
+ local rdepth = 2*height
+ characters[rule] = {
+ height = rheight,
+ depth = rdepth,
+ width = width,
+ commands = { push, { "rule", height, width }, pop },
+ }
+ -- don't change snippets, they serve dual purposes
+ if where == "top" then
while true do
chardata.height = chardata.height - xheight
chardata.depth = 0
@@ -308,15 +383,26 @@
break
end
end
+ else
+ while true do
+ chardata.height = 0
+ local next = chardata.next
+ if next then
+ unicode = next
+ chardata = characters[unicode]
+ else
+ break
+ end
+ end
end
chardata.keepvirtual = true
chardata.partsorientation = "horizontal"
chardata.parts = {
{ glyph = first },
- { glyph = rule, extender = 1 },
+ { glyph = rule, extender = 1, start = width/2, ["end"] = width/2 },
{ glyph = left },
{ glyph = right },
- { glyph = rule, extender = 1 },
+ { glyph = rule, extender = 1, start = width/2, ["end"] = width/2 },
{ glyph = last },
}
end
@@ -436,9 +522,11 @@
width = w1 + w2 - d12
end
characters[unicode] = {
+ unicode = unicode,
width = width,
height = max(c1.height or 0, c2.height or 0),
depth = max(c1.depth or 0, c2.depth or 0),
+keepvirtual = true,
commands = {
-- { "inspect" },
-- { "trace" },
@@ -482,10 +570,11 @@
local w1 = c1.width
local w2 = c2.width
local w3 = c3.width
- local mu = main.parameters.size/18
+ local ds = main.parameters.size/18
d12 = d12 * ds
d23 = d23 * ds
characters[unicode] = {
+ unicode = unicode,
width = w1 + w2 + w3 - d12 - d23,
height = max(c1.height or 0, c2.height or 0, c3.height or 0),
depth = max(c1.depth or 0, c2.depth or 0, c3.depth or 0),
@@ -572,6 +661,40 @@
end
end
+ local function extension(main,unicode,first,middle,last,ffactor,mfactor,lfactor)
+ local characters = main.characters
+ local chardata = characters[unicode]
+ if chardata then
+ local fw = first and characters[first]
+ local mw = middle and characters[middle]
+ local lw = last and characters[last]
+ if fw and lw then
+ fw = fw.width ; if fw == 0 then fw = 1 end
+ lw = lw.width ; if lw == 0 then lw = 1 end
+ if middle == "left" then
+ chardata.parts = {
+ { extender = 0, glyph = first, ["end"] = fw/2, start = 0, advance = fw },
+ { extender = 1, glyph = last, ["end"] = lw/2, start = lw/2, advance = lw },
+ }
+ elseif middle == "right" then
+ chardata.parts = {
+ { extender = 1, glyph = first, ["end"] = fw/2, start = fw/2, advance = fw },
+ { extender = 0, glyph = last, ["end"] = lw/2, start = 0, advance = lw },
+ }
+ elseif mw then
+ mw = mw.width ; if mw == 0 then mw = 1 end
+ chardata.parts = {
+ { extender = 0, glyph = first, ["end"] = fw/2, start = 0, advance = (ffactor or 1)*fw },
+ { extender = 1, glyph = middle, ["end"] = mw/2, start = mw/2, advance = (mfactor or 1)*mw },
+ { extender = 0, glyph = last, ["end"] = 0, start = lw/2, advance = (lfactor or 1)*lw },
+ }
+ end
+ chardata.keepvirtual = true -- why this issue with nested virtuals
+ chardata.partsorientation = "horizontal"
+ end
+ end
+ end
+
vfmath.builders = {
horibar = horibar,
rootbar = rootbar,
@@ -583,6 +706,7 @@
jointhree = jointhree,
stack = stack,
repeated = repeated,
+ extension = extension,
}
-- todo: move this to the lfg files
@@ -621,6 +745,7 @@
kerns = olddata.kerns,
mathkerns = olddata.mathkerns,
tounicode = olddata.tounicode,
+-- smaller = olddata.smaller,
commands = { slotcommand[slot][unicode] },
}
local glyphdata = newdata
@@ -755,7 +880,7 @@
end
end
-function vfmath.define(specification,set,goodies)
+function vfmath.define(specification,virtual,goodies)
local name = specification.name -- symbolic name
local size = specification.size -- given size
local loaded = { }
@@ -766,8 +891,9 @@
local okset = { }
local n = 0
local f_extra = formatters["virtual.extra.%05X"]
- for s=1,#set do
- local ss = set[s]
+ local setlist = virtual.recipe or virtual
+ for s=1,#setlist do
+ local ss = setlist[s]
local ssname = ss.name
if add_optional and ss.optional then
if trace_virtual then
@@ -781,6 +907,8 @@
main = s
end
local alreadyloaded = names[ssname] -- for px we load one twice (saves .04 sec)
+-- local sshash = name .. ":" .. ssname
+-- local alreadyloaded = names[sshash] -- for px we load one twice (saves .04 sec)
local f, id
if alreadyloaded then
f, id = alreadyloaded.f, alreadyloaded.id
@@ -790,6 +918,7 @@
else
f, id = fonts.constructors.readanddefine(ssname,size)
names[ssname] = {
+-- names[sshash] = {
f = f,
id = id,
fontname = ssname, -- diagnostics
@@ -934,7 +1063,7 @@
mathparameters.axisheight = newparameters[22] or 0 -- axisheight : height of fraction lines above the baseline
-- report_virtual("loading and virtualizing font %a at size %p, setting sy parameters",name,size)
end
- -- We no longer care about kerns and ligatures here. We use backmack because we need to know
+ -- We no longer care about kerns and ligatures here. We use backmap because we need to know
-- the original order and the loader has made a unicode font of it and weird glyph names have
-- spoiled that a bit too.
if ss.overlay then
@@ -1087,9 +1216,32 @@
fontname = name, -- diagnostics
}
--
- local addmissing = goodies.mathematics.addmissing
- if type(addmissing) == "function" then
- addmissing(main)
+ local virtualtweaks = virtual.tweaks
+ if virtualtweaks then
+ --
+ local mathtweaks = mathematics.tweaks
+ local knowntweaks = {
+ addmissing = function(main,specification)
+ local action = specification.action
+ if action then
+ action(main,specification) -- source == target
+ end
+ end
+ }
+ --
+ for i=1,#virtualtweaks do
+ local specification = virtualtweaks[i]
+ local tweak = specification.tweak
+ local action = knowntweaks[tweak]
+ if action then
+ action(main,specification)
+ else
+ action = mathtweaks[tweak]
+ if action then
+ action(main,main,specification)
+ end
+ end
+ end
end
--
mathematics.addfallbacks(main)
@@ -1102,22 +1254,6 @@
main.MathConstants = main.mathconstants
main.nomath = false
--
- mathematics.tweaks.setoptions(main,main,{
- tweak = "setoptions",
- set = { "ignorekerndimensions" }
- }) -- we have dp > ht fences
- --
- mathematics.tweaks.fixprimes(main, main, {
- tweak = "fixprimes",
- factor = 1, -- accent base height
- fake = 0.9, -- replace multiples with this width proportion
- })
- --
--- mathematics.tweaks.addbars(main,main,{
--- tweak = "addbars",
--- advance = 0.52,
--- })
- --
if trace_virtual or trace_timings then
report_virtual("loading and virtualizing font %a at size %p took %0.3f seconds",name,size,os.clock()-start)
end
@@ -1148,40 +1284,6 @@
end
end
--- local function extension(main,characters,id,size,unicode,first,middle,last)
--- local chr = characters[unicode]
--- if not chr then
--- return -- skip
--- end
--- local fw = characters[first]
--- if not fw then
--- return
--- end
--- local mw = characters[middle]
--- if not mw then
--- return
--- end
--- local lw = characters[last]
--- if not lw then
--- return
--- end
--- fw = fw.width
--- mw = mw.width
--- lw = lw.width
--- if fw == 0 then
--- fw = 1
--- end
--- if lw == 0 then
--- lw = 1
--- end
--- chr.partsorientation = "horizontal"
--- chr.parts = {
--- { extender = 0, glyph = first, ["end"] = fw/2, start = 0, advance = fw },
--- { extender = 1, glyph = middle, ["end"] = mw/2, start = mw/2, advance = mw },
--- { extender = 0, glyph = last, ["end"] = 0, start = lw/2, advance = lw },
--- }
--- end
-
-- local step = 0.2 -- 0.1 is nicer but gives larger files
-- local function clipped(main,characters,id,size,unicode,original) -- push/pop needed?
Added: trunk/Master/texmf-dist/tex/context/base/mkxl/meta-imp-kaktovik.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/meta-imp-kaktovik.mkxl (rev 0)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/meta-imp-kaktovik.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,251 @@
+%D \module
+%D [ file=meta-imp-kaktovik,
+%D version=2023.04.18,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Kaktovik Numbers,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D Just a quick hack for Hraban (after a post on the mailing list).
+
+\startMPcalculation{simplefun}
+
+ path kaktovik_glyphs[] ;
+
+ def InitializeKaktovik =
+
+ save p, d, u ;
+
+ pair p[] ; numeric d ; d := .1 ; numeric u ; u := .15 ;
+
+ % d := getparameterdefault "mpsfont" "d" .10 ;
+ % u := getparameterdefault "mpsfont" "u" .15 ;
+
+ p[0] := (0,1) ;
+ p[1] := (1,0) ;
+ p[2] := (2,1 - d) ;
+ p[3] := (3,0) ;
+ p[4] := (4,1 - 2d) ;
+
+ p[5] := (4,1 + u) ;
+ p[6] := (0,1 + 2u) ;
+ p[7] := (4,1 + 4u) ;
+
+ kaktovik_glyphs[0] := (1,1) { right } .. { left } (2,1/2) { left } .. { right } (3,1);
+
+ for i= 1 upto 4 :
+ kaktovik_glyphs[i] := p[0] for j=1 upto i : -- p[j] endfor ;
+ endfor ;
+
+ kaktovik_glyphs[ 5] := p[5] -- p[0] ; for i= 6 upto 9 : kaktovik_glyphs[i] := p[5] -- kaktovik_glyphs[i-5] ; endfor ;
+ kaktovik_glyphs[10] := p[6] -- kaktovik_glyphs[ 5] ; for i=11 upto 14 : kaktovik_glyphs[i] := p[6] -- kaktovik_glyphs[i-5] ; endfor ;
+ kaktovik_glyphs[15] := p[7] -- kaktovik_glyphs[10] ; for i=16 upto 19 : kaktovik_glyphs[i] := p[7] -- kaktovik_glyphs[i-5] ; endfor ;
+
+ enddef ;
+
+ vardef Kaktovik(expr i) =
+ draw image (
+ draw kaktovik_glyphs[i]
+ xscaled (10/20 -1/20)
+ yscaled (25/20 -2/20)
+ withpen (pencircle xscaled 1/20 yscaled 5/20) rotated -(2*20)
+ % withpen (pencircle xscaled 1/40 yscaled 5/40) rotated -(2*20)
+ % withpen (pencircle xscaled 2.5/40 yscaled 5/40) rotated -(2*20)
+ ;
+ ) shifted (2/20,2/20)
+ enddef ;
+
+ lmt_registerglyphs [
+ name = "kaktovik",
+ units = 2,
+ usecolor = true,
+ width = 2,
+ height = 2,
+ depth = 0,
+ preamble = "InitializeKaktovik"
+ ] ;
+
+ for i=0 upto 19 :
+ lmt_registerglyph [
+ category = "kaktovik",
+ unicode = 119488 + i, % "0x1D2C0"
+ code = "Kaktovik(" & decimal i & ")"
+ ] ;
+ endfor ;
+
+\stopMPcalculation
+
+\startluacode
+ local kaktovik = moduledata.kaktovik or { }
+ moduledata.kaktovik = kaktovik
+
+ local tonumber = tonumber
+ local load = load
+ local reverse = table.reverse
+ local utfchar = utf.char
+ local gsub = string.gsub
+ local concat = table.concat
+ local utfvalues = string.utfvalues
+ local lpegmatch = lpeg.match
+
+ function kaktovik.tointeger(s)
+ local n = 0
+ for b in utfvalues(s) do
+ local k = b - 0x1D2C0
+ n = n * 20 + k
+ end
+ return n
+ end
+
+-- function kaktovik.tostring(n)
+-- local digits = { }
+-- local count = 1
+-- while true do
+-- digits[count] = utfchar(0x1D2C0 + (n % 20))
+-- n = n // 20
+-- if n == 0 then
+-- break;
+-- end
+-- count = count + 1
+-- end
+-- return concat(reverse(digits))
+-- end
+
+ local f = string.formatters["%N"]
+
+ function kaktovik.tostring(n)
+ if n >= 0 and n <= 19 then
+ return utfchar(0x1D2C0 + n)
+ else
+ -- no need to optimize
+ local result = gsub(f(n),"(%d+)",function(s)
+ local digits = { }
+ local count = 1
+ local n = tonumber(s)
+ while true do
+ digits[count] = utfchar(0x1D2C0 + (n % 20))
+ n = n // 20
+ if n == 0 then
+ break;
+ end
+ count = count + 1
+ end
+ return concat(reverse(digits))
+ end)
+ return result
+ end
+ end
+
+ do
+
+ local k = { }
+ local n = 0
+ for i=0x1D2C0,0x1D2C0+19 do
+ k[utf.char(i)] = n
+ n = n + 1
+ end
+
+ local p = lpeg.Cs (
+ lpeg.Cc("return ")
+ * (
+ lpeg.utfchartabletopattern(k) / k
+ + lpeg.P(1)
+ )^0
+ )
+
+ local t = setmetatable({ },{ __index = math })
+
+ function kaktovik.calculate(old)
+ local new = lpegmatch(p,old)
+ if new then
+ new = load(new,nil,nil,t)
+ if type(new) == "function" then
+ new = new()
+ if new then
+ return new
+ end
+ end
+ end
+ return old
+ end
+
+ end
+
+ interfaces.implement {
+ name = "kaktoviknumerals",
+ arguments = "integer",
+ actions = { kaktovik.tostring, context }
+ }
+ interfaces.implement {
+ name = "kaktovikcalculate",
+ public = true,
+ arguments = "string",
+ actions = { kaktovik.calculate, kaktovik.tostring, context }
+ }
+\stopluacode
+
+\unprotect
+
+\permanent\def\kaktoviknumerals#1{\clf_kaktoviknumerals\numexpr#1\relax}
+
+\defineconversion [kaktoviknumerals] [\kaktoviknumerals]
+\defineconversion [K] [\kaktoviknumerals]
+
+\definefontfeature
+ [kaktovik]
+ [metapost=kaktovik]
+
+\protect
+
+\continueifinputfile{meta-imp-kaktovik.mkxl}
+
+\definefontfeature
+ [default]
+ [default]
+ [metapost=kaktovik]
+% [metapost={category=kaktovik,u=.25,d=.20,x=}]
+
+\setupbodyfont[dejavu]
+
+% \nopdfcompression
+
+\startTEXpage[offset=1ts,width=3es]
+
+ \start
+ \showglyphs
+ KAKTOVIK
+ \dostepwiserecurse{0}{19}{1}{\kaktoviknumerals{#1}\space }
+ \stop
+
+ kaktovik \start
+ \red\glyphxscale 700
+ \dostepwiserecurse{0}{19}{1}{\kaktoviknumerals{#1}\space }
+ \stop
+
+ \startitemize[packed,K][color=orange,stopper=]
+ \startitem first \stopitem
+ \startitem second \stopitem
+ \startitem third \stopitem
+ \stopitemize
+
+ KAKTOVIK \start
+ \red \kaktoviknumerals{2023} --
+ \green\kaktoviknumerals{4} --
+ \blue \kaktoviknumerals{18}
+ \stop
+
+ KAKTOVIK
+
+ 𝋂 + 𝋂 = \kaktovikcalculate{𝋂 + 𝋂} = \kaktoviknumerals{4}
+
+ \protected\def\ForWilli#1{#1 = \kaktovikcalculate{#1}}
+
+ \ForWilli{(𝋂 + 𝋂) ^ (𝋂 + 𝋂)}
+
+ \ForWilli{(sin ( 𝋂𝋓 ) )}
+\stopTEXpage
Added: trunk/Master/texmf-dist/tex/context/base/mkxl/meta-imp-newmath.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/meta-imp-newmath.mkxl (rev 0)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/meta-imp-newmath.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,76 @@
+%D \module
+%D [ file=meta-imp-newmath,
+%D version=2023.04.01,
+%D title=\METAPOST\ Graphics,
+%D subtitle=New Math Symbols,
+%D author=Mikael Sundqvist & Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D In this file we will collect solutions for special math symbols. When such symbols
+%D are used in publications the CMS will contact the Unicode Consortium to suggest that
+%D they get a slot, because then we have proof of usage. We also consider old obsolete
+%D symbols because they can be treated like some ancient out|-|of|-|use script and fit
+%D into the \type {ancient math script}.
+
+\startMPextensions
+ vardef math_ornament_hat(expr w,h,d,o,l) =
+ image ( path p ; p :=
+ (w/2,h + 10l) --
+ (o + w,h + o) --
+ (w/2,h + 7l) --
+ (-o,h + o) --
+ cycle ;
+ fill p randomized o ;
+ setbounds currentpicture to (-o,0) -- (w+o,0) -- (w+o,h+2o) -- (-o,h+2o) -- cycle ;
+ )
+ enddef ;
+\stopMPextensions
+
+\startuniqueMPgraphic{math:ornament:hat}
+ draw
+ math_ornament_hat(
+ OverlayWidth,
+ OverlayHeight,
+ OverlayDepth,
+ OverlayOffset,
+ OverlayLineWidth
+ )
+ withpen
+ pencircle
+ xscaled (2OverlayLineWidth)
+ yscaled (3OverlayLineWidth/4)
+ rotated 30
+ withcolor
+ OverlayLineColor ;
+% draw boundingbox currentpicture;
+\stopuniqueMPgraphic
+
+\definemathornament [widerandomhat] [mp=math:ornament:hat]
+
+\continueifinputfile{meta-imp-newnmath.mkxl}
+
+\starttext
+
+This symbol was designed for one of Mikaels students working on a thesis on
+probability. This student needed to typeset the characteristic function of a
+random variable \im {X} with density function \im {f_{X}}, and it was insisted to
+use another notation than the (wide) hat, that was already used for something
+else. For this reason the \tex {widerandomhat} was introduced,
+
+\startformula
+ E[\ee^{\ii tX}] = \widerandomhat{f_{X}}(t)\mtp{,}
+ E[\ee^{\ii t(X_1+X_2)}] = \widerandomhat{f_{X_1} \ast f_{X_2}}(t)\mtp{.}
+\stopformula
+
+Naturally, it is automatically scaled, just like the ordinary wide hat
+
+\startformula
+ \widehat{a+b+c+d+e+f} \neq \widerandomhat{a+b+c+d+e+f}
+\stopformula
+
+\stoptext
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/meta-imp-threesix.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/meta-imp-threesix.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/meta-imp-threesix.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -56,6 +56,15 @@
["X"] = [[1111001110 1111000110 0001101000 0000110000 0000110000 0001011000 0110001111 0111001111]],
["Y"] = [[111100011 111100011 011000010 001110100 000111000 000011000 001111110 001111110]],
["Z"] = [[11111111 10000111 00001110 00011100 00111000 01110000 11100001 11111111]],
+
+ [","] = [[0000 0000 0000 0000 0000 0011 0111 0111]],
+ [";"] = [[0011 0011 0011 0000 0000 0011 0111 0111]],
+ ["."] = [[0000 0000 0000 0000 0000 0111 0111 0111]],
+ [":"] = [[0111 0111 0111 0000 0000 0111 0111 0111]],
+ ["!"] = [[0111 0111 0111 0111 0111 0000 0111 0111]],
+ ["?"] = [[11111 10111 00111 01110 01110 00000 01110 01110]],
+
+ [utf.char(0xAD)] = [[00000 00000 00000 11111 11111 00000 00000 00000]], -- hyphen
}
local f_code = string.formatters["ThreeSix(%s);"]
@@ -206,41 +215,24 @@
[metapost={category=fontthreesix,shape=diamond,color=random,pen=fancy,spread=.1,random=yes}]
\definefont[DEKFontA][Serif*fontthreesix-color @ 200pt]
-\definefont[DEKFontB][Serif*fontthreesix-color @ 60pt]
+\definefont[DEKFontB][Serif*fontthreesix-color @ 12pt]
% Or course:
-\startTEXpage
+\startTEXpage[offset=1dk]
\DEKFontA TEX
\stopTEXpage
-\startTEXpage
+\startTEXpage[offset=1dk]
\DEKFontA T\kern-0.05em\lower.75\exheight\hbox{E}\kern-.05emX
\stopTEXpage
-% One of the \CONTEXT\ 2020 posters (inspired by NewYork State AC's press
-% conferences as these keywords apply quite well to the audience of the
-% meeting):
+% We only have uppercase characters! But I added a few punctuation symbols so that
+% we can do the following. Actually we can consider lowercase to be just smaller and
+% another shape.
-% \startTEXpage[align={lohi,middle,nothyphenated},offset=20pt]
-% \offinterlineskip \vskip10pt
-% \DEKFontA T\kern-0.05em\lower.75\exheight\hbox{E}\kern-.05emX \vskip60pt
-% \DEKFontB TOUGH \vskip20pt
-% SMART \vskip20pt
-% UNITED \vskip20pt
-% DISCIPLINED \vskip20pt
-% LOVING \vskip10pt
-% \stopTEXpage
+\startTEXpage[offset=1dk,align=flushleft,foregroundstyle=\DEKFontB]
+ \WORD{\input{knuth}}
+\stopTEXpage
-\startpagemakeup
- \setupalign[middle,nothyphenated]
- \offinterlineskip \vfil\vfil
- \DEKFontA T\kern-0.05em\lower.75\exheight\hbox{E}\kern-.05emX \vfil\vfil\vfil
- \DEKFontB TOUGH \vfil
- SMART \vfil
- UNITED \vfil
- DISCIPLINED \vfil
- LOVING \vfil
-\stoppagemakeup
-
\stoptext
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/meta-ini.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/meta-ini.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/meta-ini.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -211,6 +211,7 @@
\defineMPinstance[doublefun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes,\c!method=\s!double]
\defineMPinstance[binaryfun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes,\c!method=\s!binary]
\defineMPinstance[decimalfun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes,\c!method=\s!decimal]
+\defineMPinstance[positfun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes,\c!method=\s!posit]
\defineMPinstance[mprun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes]
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/mlib-run.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/mlib-run.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/mlib-run.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,29 +6,17 @@
license = "see context related readme files",
}
--- cmyk -> done, native
--- spot -> done, but needs reworking (simpler)
--- multitone ->
--- shade -> partly done, todo: cm
--- figure -> done
--- hyperlink -> low priority, easy
+-- The directional helpers and pen analysis are more or less translated from the C
+-- code. In LuaTeX we spent quite some time on speeding up the Lua interface as well
+-- as the C code. There is not much to gain, especially if one keeps in mind that
+-- when integrated in TeX only a part of the time is spent in MetaPost. Of course an
+-- integrated approach is way faster than an external MetaPost and processing time
+-- nears zero.
+--
+-- In LuaMetaTeX the MetaPost core has been cleaned up a it and as a result
+-- processing in double mode is now faster than in scaled mode. There are also extra
+-- features and interfaces, so the MkIV and MkXL (LMTX) implementation differ!
--- new * run
--- or
--- new * execute^1 * finish
-
--- a*[b,c] == b + a * (c-b)
-
---[[ldx--
-<p>The directional helpers and pen analysis are more or less translated from the
-<l n='c'/> code. It really helps that Taco know that source so well. Taco and I spent
-quite some time on speeding up the <l n='lua'/> and <l n='c'/> code. There is not
-much to gain, especially if one keeps in mind that when integrated in <l n='tex'/>
-only a part of the time is spent in <l n='metapost'/>. Of course an integrated
-approach is way faster than an external <l n='metapost'/> and processing time
-nears zero.</p>
---ldx]]--
-
local type, tostring, tonumber, next = type, tostring, tonumber, next
local find, striplines = string.find, utilities.strings.striplines
local concat, insert, remove, sortedkeys = table.concat, table.insert, table.remove, table.sortedkeys
@@ -164,6 +152,7 @@
-- binary = "binary",
binary = "double",
decimal = "decimal",
+ posit = "posit",
default = "scaled",
}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/mult-sys.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/mult-sys.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/mult-sys.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -114,6 +114,7 @@
%D For proper \UNICODE\ support we need a few font related constants.
+\definesystemconstant {accent}
\definesystemconstant {action}
\definesystemconstant {all}
\definesystemconstant {ampersand}
@@ -164,6 +165,7 @@
\definesystemconstant {leftclass}
\definesystemconstant {rightclass}
\definesystemconstant {calligraphic}
+\definesystemconstant {center}
\definesystemconstant {clone}
\definesystemconstant {close}
\definesystemconstant {cmyk}
@@ -255,6 +257,7 @@
\definesystemconstant {italic}
%definesystemconstant {it}
\definesystemconstant {itemgroupcolumns}
+\definesystemconstant {keepbase}
\definesystemconstant {kernpairs}
\definesystemconstant {language}
\definesystemconstant {lcgreek}
@@ -310,6 +313,7 @@
\definesystemconstant {noheight}
\definesystemconstant {nomath}
\definesystemconstant {none}
+\definesystemconstant {nooverflow}
\definesystemconstant {noskips}
\definesystemconstant {normal}
\definesystemconstant {Normal}
@@ -331,6 +335,7 @@
\definesystemconstant {pickup}
\definesystemconstant {plural}
\definesystemconstant {plus}
+\definesystemconstant {posit}
%definesystemconstant {pt}
\definesystemconstant {realpage}
\definesystemconstant {register}
@@ -373,6 +378,7 @@
\definesystemconstant {setup}
\definesystemconstant {set}
\definesystemconstant {themaintextcolor}
+\definesystemconstant {shrink}
\definesystemconstant {simple}
\definesystemconstant {Simple}
\definesystemconstant {single}
@@ -393,6 +399,7 @@
\definesystemconstant {ss}
\definesystemconstant {start}
\definesystemconstant {stop}
+\definesystemconstant {stretch}
\definesystemconstant {subpage}
\definesystemconstant {subtype}
\definesystemconstant {sub}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/node-ali.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/node-ali.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/node-ali.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -21,7 +21,6 @@
local getnext = nuts.getnext
local getprev = nuts.getprev
local getboth = nuts.getboth
-local setglue = nuts.setglue
local getglue = nuts.getglue
local setglue = nuts.setglue
local getwhd = nuts.getwhd
@@ -372,6 +371,7 @@
if noflines > 0 then
local currentline = 1
for n, subtype in nextglue, head do
+-- print(currentline,height/65536,depth/65536)
-- one day we can decide what to do with intertext stuff based on the
-- subtype but not now ... on our agenda (intertext etc)
if subtype == baselineskip_code or subtype == lineskip_code then
@@ -383,9 +383,11 @@
if prevdp < depth then
setdepth(lines[currentline][1],depth)
delta = delta + (depth - prevdp)
+-- lines[currentline][5] = depth
end
if nextht < height then
setheight(lines[nextline][1],height)
+-- lines[nextline][4] = height
delta = delta + (height - nextht)
end
-- if subtype == lineskip_code then
@@ -394,7 +396,7 @@
-- else
setglue(n,amount+inbetween-delta,stretch,shrink)
-- end
- curline = nextline
+ currentline = nextline -- was curline
-- if currentline > noflines then
-- break
-- end
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/node-dir.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/node-dir.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/node-dir.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -14,8 +14,9 @@
local vlist_code = nodecodes.vlist
local normaldir_code = nodes.dircodes.normal
local line_code = nodes.listcodes.line
-local lefttoright_code = nodes.dirvalues.lefttoright
+local lefttoright_code = tex.directioncodes.lefttoright
+
local getnext = nuts.getnext
local getlist = nuts.getlist
local getwhd = nuts.getwhd
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/node-ini.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/node-ini.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/node-ini.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,19 +6,13 @@
license = "see context related readme files"
}
---[[ldx--
-<p>Most of the code that had accumulated here is now separated in modules.</p>
---ldx]]--
-
local next, type, tostring = next, type, tostring
local gsub = string.gsub
local concat, remove = table.concat, table.remove
local sortedhash, sortedkeys, swapped = table.sortedhash, table.sortedkeys, table.swapped
---[[ldx--
-<p>Access to nodes is what gives <l n='luatex'/> its power. Here we implement a
-few helper functions. These functions are rather optimized.</p>
---ldx]]--
+-- Access to nodes is what gives LuaTeX its power. Here we implement a few helper
+-- functions. These functions are rather optimized.
nodes = nodes or { }
local nodes = nodes
@@ -29,7 +23,7 @@
local formatcolumns = utilities.formatters.formatcolumns
local getsubtypes = node.subtypes
-local getvalues = node.values
+----- getvalues = node.values
local listcodes = mark(getsubtypes("list"))
local rulecodes = mark(getsubtypes("rule"))
@@ -51,10 +45,6 @@
local parcodes = mark(getsubtypes("par"))
local attributecodes = mark(getsubtypes("attribute"))
-local fillvalues = mark(getvalues("fill"))
-local dirvalues = mark(getvalues("dir"))
-local mathvalues = mark(getvalues("math"))
-
local function simplified(t)
local r = { }
for k, v in next, t do
@@ -63,17 +53,17 @@
return r
end
-local noadoptions = allocate {
- set = 0x08,
- unused_1 = 0x00 + 0x08,
- unused_2 = 0x01 + 0x08,
- axis = 0x02 + 0x08,
- no_axis = 0x04 + 0x08,
- exact = 0x10 + 0x08,
- left = 0x11 + 0x08,
- middle = 0x12 + 0x08,
- right = 0x14 + 0x08,
-}
+-- local noadoptions = allocate {
+-- set = 0x08,
+-- unused_1 = 0x00 + 0x08,
+-- unused_2 = 0x01 + 0x08,
+-- axis = 0x02 + 0x08,
+-- no_axis = 0x04 + 0x08,
+-- exact = 0x10 + 0x08,
+-- left = 0x11 + 0x08,
+-- middle = 0x12 + 0x08,
+-- right = 0x14 + 0x08,
+-- }
local nodecodes = simplified(node.types())
@@ -96,12 +86,7 @@
parcodes = allocate(swapped(parcodes,parcodes))
attributecodes = allocate(swapped(attributecodes,attributecodes))
rulecodes = allocate(swapped(rulecodes,rulecodes))
-noadoptions = allocate(swapped(noadoptions,noadoptions))
-dirvalues = allocate(swapped(dirvalues,dirvalues))
-fillvalues = allocate(swapped(fillvalues,fillvalues))
-mathvalues = allocate(swapped(mathvalues,mathvalues))
-
nodes.gluecodes = gluecodes
nodes.dircodes = dircodes
nodes.markcodes = markcodes
@@ -121,24 +106,26 @@
nodes.attributecodes = attributecodes
nodes.rulecodes = rulecodes
-nodes.noadoptions = noadoptions
-nodes.fillvalues = fillvalues
-nodes.fillcodes = fillvalues -- for now
-nodes.dirvalues = dirvalues
-nodes.mathvalues = mathvalues
+nodes.nodecodes = nodecodes
-nodes.nodecodes = nodecodes
+-- these are now in tex namespace but we keep them for old times sake
+nodes.fillvalues = tex.fillcodes
+nodes.fillcodes = tex.fillcodes
+nodes.dirvalues = tex.directioncodes
+nodes.directionvalues = tex.directioncodes
+nodes.mathvalues = tex.mathparametercodes
+
-- we will transition to more verbose subtypes (after other math is done)
-noadcodes.ord = noadcodes.ord or noadcodes.ordinary
-noadcodes.operator = noadcodes.op or noadcodes.operator
-noadcodes.bin = noadcodes.bin or noadcodes.binary
-noadcodes.rel = noadcodes.rel or noadcodes.relation
-noadcodes.punct = noadcodes.punct or noadcodes.punctuation
-noadcodes.rad = noadcodes.rad or noadcodes.radical
-noadcodes.frac = noadcodes.frac or noadcodes.fraction
-noadcodes.acc = noadcodes.acc or noadcodes.accent
+noadcodes.ord = noadcodes.ord or noadcodes.ordinary
+noadcodes.operator = noadcodes.op or noadcodes.operator
+noadcodes.bin = noadcodes.bin or noadcodes.binary
+noadcodes.rel = noadcodes.rel or noadcodes.relation
+noadcodes.punct = noadcodes.punct or noadcodes.punctuation
+noadcodes.rad = noadcodes.rad or noadcodes.radical
+noadcodes.frac = noadcodes.frac or noadcodes.fraction
+noadcodes.acc = noadcodes.acc or noadcodes.accent
-- so for now:
@@ -194,8 +181,6 @@
nodes.directioncodes = dircodes
nodes.discretionarycodes = disccodes
-nodes.directionvalues = dirvalues
-
glyphcodes.glyph = glyphcodes.character
gluecodes.parfillrightskip = gluecodes.parfillrightskip or gluecodes.parfillskip
@@ -207,18 +192,6 @@
kerncodes.kerning = kerncodes.fontkern
kerncodes.italiccorrection = kerncodes.italiccorrection or 1 -- new
-nodes.noadoptions = {
- set = 0x08,
- unused_1 = 0x00 + 0x08,
- unused_2 = 0x01 + 0x08,
- axis = 0x02 + 0x08,
- no_axis = 0x04 + 0x08,
- exact = 0x10 + 0x08,
- left = 0x11 + 0x08,
- middle = 0x12 + 0x08,
- right = 0x14 + 0x08,
-}
-
-- We use the real node code numbers.
local texsetintegervalue = tex.setintegervalue
Added: trunk/Master/texmf-dist/tex/context/base/mkxl/node-pag.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/node-pag.lmt (rev 0)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/node-pag.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,32 @@
+if not modules then modules = { } end modules ['node-pag'] = {
+ version = 1.001,
+ comment = "companion to node-pag.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- Currently we have no usage for this and it can even be dangerous to mess with
+-- the list at this stage, so this is effectively just a placeholder. Users can
+-- only mess with before and after hooks.
+
+pagebuilders = pagebuilders or { }
+
+local starttiming, stoptiming = statistics.starttiming, statistics.stoptiming
+
+local actions = nodes.tasks.actions("pagebuilders")
+
+local function processor(head,groupcode,size,packtype,maxdepth,direction)
+ if head then
+ starttiming(pagebuilders)
+ head = actions(head,groupcode,size,packtype,maxdepth,direction)
+ stoptiming(pagebuilders)
+ end
+ return head
+end
+
+callbacks.register("pre_output_filter",processor,"preparing output box")
+
+statistics.register("output preparation time", function()
+ return statistics.elapsedseconds(pagebuilders)
+end)
Added: trunk/Master/texmf-dist/tex/context/base/mkxl/node-pag.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/node-pag.mkxl (rev 0)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/node-pag.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,20 @@
+%D \module
+%D [ file=node-pag,
+%D version=2008.09.30,
+%D title=\CONTEXT\ Node Macros,
+%D subtitle=Page Building,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Node Macros / Page Building}
+
+\unprotect
+
+\registerctxluafile{node-pag}{}
+
+\protect \endinput
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/node-ref.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/node-ref.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/node-ref.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -96,9 +96,9 @@
local gluecodes = nodes.gluecodes
local listcodes = nodes.listcodes
-local dirvalues = nodes.dirvalues
-local lefttoright_code = dirvalues.lefttoright
-local righttoleft_code = dirvalues.righttoleft
+local directioncodes = tex.directioncodes
+local lefttoright_code = directioncodes.lefttoright
+local righttoleft_code = directioncodes.righttoleft
local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
@@ -689,7 +689,8 @@
local function setdestination(n,h,d,name,view) -- n = grouplevel, name == table
topofstack = topofstack + 1
- stack[topofstack] = { n, h, d, name, view }
+ -- stack[topofstack] = { n, h, d, name, view }
+ stack[topofstack] = { n, h or false, d or false, name, view }
return topofstack
end
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/node-res.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/node-res.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/node-res.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -10,11 +10,6 @@
local gmatch, format = string.gmatch, string.format
local round = math.round
---[[ldx--
-<p>The next function is not that much needed but in <l n='context'/> we use
-for debugging <l n='luatex'/> node management.</p>
---ldx]]--
-
local nodes, node = nodes, node
local report_nodes = logs.reporter("nodes","housekeeping")
@@ -179,7 +174,7 @@
-- the dir field needs to be set otherwise crash:
-local lefttoright_code = nodes.dirvalues.lefttoright
+local lefttoright_code = tex.directioncodes.lefttoright
local rule = register_nut(new_nut(rule_code)) -- setdirection(rule, lefttoright_code)
local emptyrule = register_nut(new_nut(rule_code,rulecodes.empty)) -- setdirection(rule, lefttoright_code)
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/node-tra.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/node-tra.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/node-tra.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,10 +6,8 @@
license = "see context related readme files"
}
---[[ldx--
-<p>This is rather experimental. We need more control and some of this
-might become a runtime module instead. This module will be cleaned up!</p>
---ldx]]--
+-- Some of the code here might become a runtime module instead. This old module will
+-- be cleaned up anyway!
local next = next
local utfchar = utf.char
@@ -67,7 +65,7 @@
local nodecodes = nodes.nodecodes
local whatsitcodes = nodes.whatsitcodes
-local fillcodes = nodes.fillcodes
+local fillcodes = tex.fillcodes
local subtypes = nodes.subtypes
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/node-tsk.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/node-tsk.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/node-tsk.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1016,6 +1016,56 @@
-- }
-- }
+tasks.new {
+ name = "pagebuilders",
+ processor = nodeprocessor,
+ sequence = {
+ "before", -- for users
+ "normalizers",
+ "after", -- for users
+ },
+ templates = {
+
+default = [[
+return function(head)
+ return head
+end
+]],
+
+process = [[
+local tonut = nodes.tonut
+local tonode = nodes.nuts.tonode
+
+%localize%
+
+return function(head,groupcode,size,packtype,maxdepth,direction)
+ local nuthead = tonut(head)
+
+%actions%
+ return tonode(nuthead)
+end
+]],
+
+step = [[
+ nuthead = tonut((%action%(tonode(nuthead),groupcode,size,packtype,maxdepth,direction)))
+]],
+
+nut = [[
+ nuthead = %action%(nuthead,groupcode,size,packtype,maxdepth,direction)
+]],
+
+nohead = [[
+ %action%(tonode(nuthead),groupcode,size,packtype,maxdepth,direction)
+]],
+
+nonut = [[
+ %action%(nuthead,groupcode,size,packtype,maxdepth,direction)
+]],
+
+ }
+
+}
+
-- for now quite useless (too fuzzy)
--
-- tasks.new {
@@ -1135,3 +1185,106 @@
}
}
+
+-- -- quality -- --
+
+tasks.new {
+ name = "hquality",
+ processor = nodeprocessor,
+ sequence = {
+ "before", -- for users
+ "system",
+ "after", -- for users
+ },
+ templates = {
+
+default = [[
+return function(how,detail,nod,first,last,filename)
+ -- nil
+end
+]],
+
+process = [[
+local tonut = nodes.tonut
+local tonode = nodes.nuts.tonode
+
+%localize%
+
+return function(how,detail,nod,first,last,filename)
+ local nut = tonut(nod)
+ local rul = nil
+
+%actions%
+
+ return rul and tonode(rul)
+end
+]],
+
+step = [[
+ rul = tonut((%action%(how,detail,nod,first,last,filename,rul and tonode(rul))))
+]],
+
+nut = [[
+ rul = %action%(how,detail,nut,first,last,filename,rul)
+]],
+
+nohead = [[
+ %action%(how,detail,nod,first,last,filename,rul and tonode(rul))
+]],
+
+nonut = [[
+ %action%(how,detail,nut,first,last,filename,rul)
+]],
+
+ }
+}
+
+tasks.new {
+ name = "vquality",
+ processor = nodeprocessor,
+ sequence = {
+ "before", -- for users
+ "system",
+ "after", -- for users
+ },
+ templates = {
+
+default = [[
+return function(how,detail,nod,first,last,filename)
+ -- nil
+end
+]],
+
+process = [[
+local tonut = nodes.tonut
+local tonode = nodes.nuts.tonode
+
+%localize%
+
+return function(how,detail,nod,first,last,filename)
+ local nut = tonut(nod)
+ local rul = nil
+
+%actions%
+ return rul and tonode(rul)
+end
+]],
+
+step = [[
+ rul = tonut((%action%(how,detail,nod,first,last,filename,tonode(rul))))
+]],
+
+nut = [[
+ rul = %action%(how,detail,nut,first,last,filename,rul)
+]],
+
+nohead = [[
+ %action%(how,detail,nod,first,last,filename,rul and tonode(rul))
+]],
+
+nonut = [[
+ %action%(how,detail,nut,first,last,filename,rul)
+]],
+
+ }
+}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/pack-box.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/pack-box.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/pack-box.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1165,6 +1165,8 @@
\fi
\endgroup}
+\mutable\lettonothing\currentanchorbox
+
\permanent\tolerant\protected\def\setanchorbox[#1]#*[#2]%
{\begingroup
\dowithnextbox
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/pack-com.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/pack-com.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/pack-com.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -501,8 +501,10 @@
\def\pack_combinations_caption_second
{\ifx\nexttoken\egroup
% the caption is empty
- \orelse\ifx\nexttoken\stopcaption
+ \orelse\ifx\nexttoken\stopcaption % language
% the caption is empty (new per 2014-05-24)
+ \orelse\ifx\nexttoken\pack_combinations_float_hack_b
+ % make sure we honor empty captions (new per 2023-04-20)
\else
% todo: \p_pack_combinations_alternative\v!none: no style, strut etc
\hsize\wd\b_pack_combinations_content
@@ -509,9 +511,14 @@
\usealignparameter\combinationparameter
\usecombinationstyleandcolor\c!style\c!color
\bgroup
- \aftergroup\endstrut
- \aftergroup\egroup
- \begstrut
+ \ifcstok{\combinationparameter\c!strut}\v!no
+ % make sure we have empty captions (new per 2023-04-20)
+ \aftergroup\egroup
+ \else
+ \aftergroup\endstrut
+ \aftergroup\egroup
+ \begstrut
+ \fi
\fi}
\def\pack_combinations_pickup_package_pair % we need to store the caption row
@@ -624,6 +631,10 @@
%D
%D \typebuffer \getbuffer
+\definecombination
+ [\v!float]
+% [\c!strut=\v!no] % not needed, we intercept anyway
+
\protected\def\pack_combinations_float_hack_a#1%
{\strc_floats_build_box_separate_split{#1}%
\box\b_strc_floats_separate_content}
@@ -657,7 +668,8 @@
{\pack_combinations_float_hack_b{\recurselevel}}%
\to\scratchtoks}% brrr
\let\pack_combinations_check_x_y\pack_combinations_float_check_x_y
- \normalexpanded{\startcombination[#1]\the\scratchtoks}\stopcombination
+ % \normalexpanded{\startcombination[#1]\the\scratchtoks}\stopcombination
+ \normalexpanded{\startcombination[\v!float][#1]\the\scratchtoks}\stopcombination
\resetlocalfloats
\egroup}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/pack-lyr.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/pack-lyr.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/pack-lyr.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -97,36 +97,36 @@
\permanent\def\layeranchor{\currentlayer:\the\realpageno}
+\lettonothing\m_pack_layers_anchor
+\lettonothing\m_pack_layers_page
+\lettonothing\m_pack_layers_region
+\lettonothing\m_pack_layers_target
+\lettonothing\p_pack_layers_column
+\lettonothing\p_pack_layers_corner
+\lettonothing\p_pack_layers_direction
\lettonothing\p_pack_layers_doublesided
-\lettonothing\p_pack_layers_state
+\lettonothing\p_pack_layers_dx
+\lettonothing\p_pack_layers_dy
+\lettonothing\p_pack_layers_height
+\lettonothing\p_pack_layers_hoffset
+\lettonothing\p_pack_layers_line
+\lettonothing\p_pack_layers_location
+\lettonothing\p_pack_layers_method
+\lettonothing\p_pack_layers_offset
\lettonothing\p_pack_layers_option
-\lettonothing\p_pack_layers_method
+\lettonothing\p_pack_layers_position
\lettonothing\p_pack_layers_preset
+\lettonothing\p_pack_layers_region
+\lettonothing\p_pack_layers_repeat
\lettonothing\p_pack_layers_rotation
-\lettonothing\p_pack_layers_position
-\lettonothing\p_pack_layers_hoffset
-\lettonothing\p_pack_layers_voffset
-\lettonothing\p_pack_layers_offset
-\lettonothing\p_pack_layers_dx
-\lettonothing\p_pack_layers_dy
+\lettonothing\p_pack_layers_state
\lettonothing\p_pack_layers_sx
\lettonothing\p_pack_layers_sy
+\lettonothing\p_pack_layers_voffset
+\lettonothing\p_pack_layers_width
\lettonothing\p_pack_layers_x
\lettonothing\p_pack_layers_y
-\lettonothing\p_pack_layers_corner
-\lettonothing\p_pack_layers_location
-\lettonothing\p_pack_layers_line
-\lettonothing\p_pack_layers_column
-\lettonothing\p_pack_layers_width
-\lettonothing\p_pack_layers_height
-\lettonothing\p_pack_layers_direction
-\lettonothing\p_pack_layers_region
-\lettonothing\m_pack_layers_page
-\lettonothing\m_pack_layers_target
-\lettonothing\m_pack_layers_region
-\lettonothing\m_pack_layers_anchor
-
\newconditional\c_pack_layers_repeated
\newconditional\c_pack_layers_trace
\newinteger \c_pack_layers_current_data
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/pack-obj.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/pack-obj.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/pack-obj.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,10 +6,8 @@
license = "see context related readme files"
}
---[[ldx--
-<p>We save object references in the main utility table. jobobjects are
-reusable components.</p>
---ldx]]--
+-- We save object references in the main utility table; job objects are reusable
+-- components.
local context = context
local codeinjections = backends.codeinjections
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/pack-rul.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/pack-rul.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/pack-rul.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -7,10 +7,6 @@
license = "see context related readme files"
}
---[[ldx--
-<p>An explanation is given in the history document <t>mk</t>.</p>
---ldx]]--
-
-- we need to be careful with display math as it uses shifts
-- \framed[align={lohi,middle}]{$x$}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/pack-rul.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/pack-rul.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/pack-rul.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -237,30 +237,34 @@
%newdimen \d_framed_linewidth \aliased\let \ruledlinewidth\d_framed_linewidth % needed at lua end
\newdimension\d_framed_linewidth \aliasdimension\ruledlinewidth\d_framed_linewidth % needed at lua end
-\lettonothing\p_framed_frame % \framedparameter\c!frame
-\lettonothing\p_framed_backgroundoffset
-\lettonothing\p_framed_foregroundstyle
+\lettonothing\p_frame
+\lettonothing\p_framed_adaptive
+\lettonothing\p_framed_anchoring
\lettonothing\p_framed_autostrut
-\lettonothing\p_framed_location
-\lettonothing\p_framed_orientation
-\lettonothing\p_framed_anchoring
-\lettonothing\p_framed_synchronize
\lettonothing\p_framed_autowidth
-\lettonothing\p_framed_franalyze
+\lettonothing\p_framed_background
+\lettonothing\p_framed_backgroundcolor
\lettonothing\p_framed_backgroundcorner
+\lettonothing\p_framed_backgroundoffset
\lettonothing\p_framed_backgroundradius
+\lettonothing\p_framed_component
+\lettonothing\p_framed_empty
+\lettonothing\p_framed_foregroundcolor
+\lettonothing\p_framed_foregroundstyle
+\lettonothing\p_framed_frame % \framedparameter\c!frame
+\lettonothing\p_framed_framecolor
\lettonothing\p_framed_framecorner
\lettonothing\p_framed_frameradius
+\lettonothing\p_framed_franalyze
\lettonothing\p_framed_lines
-\lettonothing\p_framed_empty
-\lettonothing\p_framed_backgroundcolor
-\lettonothing\p_framed_framecolor
-\lettonothing\p_framed_component
-\lettonothing\p_framed_background
+\lettonothing\p_framed_location
+\lettonothing\p_framed_minheight
+\lettonothing\p_framed_orientation
\lettonothing\p_framed_rulethickness
-\lettonothing\p_framed_foregroundcolor
\lettonothing\p_framed_setups
\lettonothing\p_framed_synchronize
+\lettonothing\p_framed_text_depthcorrection
+\lettonothing\p_framed_text_strut
%D We don't have to stick to a \TEX\ drawn rule, but also can use rounded
%D or even fancier shapes, as we will see later on.
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/page-brk.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/page-brk.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/page-brk.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -90,7 +90,7 @@
% disable reset after shipout
\global\pageornamentstate\plustwo
\fi
- % maybe \ifcstok{#1}\emptytoks
+ % maybe \iftok{#1}\emptytoks
\ifparameter#1\or
\page_breaks_handle{#1}%
\else % so, no pagebreak when \pagebreak[] ! ! !
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/page-flt.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/page-flt.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/page-flt.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -297,7 +297,31 @@
\newtoks\everybeforeflushedpagefloat
-\def\page_floats_flush_page_floats_indeed#1% future releases can do more clever things
+\let\m_page_otr_checked_page_float\relax
+
+\newconditional\c_page_floats_flushed
+
+% \def\page_floats_flush_page_floats_indeed#1% future releases can do more clever things
+% {\page_floats_flush{#1}\plusone
+% \edef\floatspecification{\clf_getfloatvariable{specification}}% Is this okay?
+% \the\everybeforeflushedpagefloat
+% \vpack to \textheight
+% {\doifnotinset\v!high\floatspecification\vfill
+% \box\floatbox
+% \doifnotinset\v!low\floatspecification\vfill}%
+% \page_otr_fill_and_eject_page}
+
+% \protected\def\page_floats_flush_page_floats % used in postpone
+% {\edef\m_page_otr_checked_page_float{\clf_checkedpagefloat}%
+% \ifempty\m_page_otr_checked_page_float
+% % nothing
+% \orelse\ifx\m_page_otr_checked_page_float\v!empty
+% \emptyhbox \page_otr_fill_and_eject_page % why not dummy_page
+% \else
+% \page_floats_flush_page_floats_indeed\m_page_otr_checked_page_float
+% \fi}
+
+\def\page_floats_flush_page_floats_inject#1% future releases can do more clever things
{\page_floats_flush{#1}\plusone
\edef\floatspecification{\clf_getfloatvariable{specification}}% Is this okay?
\the\everybeforeflushedpagefloat
@@ -305,18 +329,26 @@
{\doifnotinset\v!high\floatspecification\vfill
\box\floatbox
\doifnotinset\v!low\floatspecification\vfill}%
- \page_otr_fill_and_eject_page}
+ % \page_otr_fill_and_eject_page
+ \global\settrue\c_page_floats_flushed}
-\let\m_page_otr_checked_page_float\relax
+\protected\def\page_floats_flush_page_floats % used in postpone
+ {\global\setfalse\c_page_floats_flushed
+ \page_floats_flush_page_floats_indeed
+ \ifconditional\c_page_floats_flushed
+ \page_otr_fill_and_eject_page
+ \fi}
-\protected\def\page_floats_flush_page_floats % used in postpone
+\protected\def\page_floats_flush_page_floats_indeed % used in postpone
{\edef\m_page_otr_checked_page_float{\clf_checkedpagefloat}%
\ifempty\m_page_otr_checked_page_float
% nothing
\orelse\ifx\m_page_otr_checked_page_float\v!empty
\emptyhbox \page_otr_fill_and_eject_page % why not dummy_page
+ \expandafter\page_floats_flush_page_floats
\else
- \page_floats_flush_page_floats_indeed\m_page_otr_checked_page_float
+ \page_floats_flush_page_floats_inject\m_page_otr_checked_page_float
+ \expandafter\page_floats_flush_page_floats
\fi}
% temp hack, needed to prevent floatbox being forgotten during
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/page-imp.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/page-imp.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/page-imp.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1264,7 +1264,7 @@
%
% \starttext \dorecurse{30}{test \recurselevel \page} \stoptext
-\permanent\protected\protected\def\pusharrangedpageXY#1%
+\permanent\protected\def\pusharrangedpageXY#1%
{\advancearrangedpageN
\global\advanceby\arrangedpageM\plusone
\reportarrangedpage\arrangedpageN
@@ -1300,7 +1300,7 @@
\poparrangedpages
\fi}
-\permanent\protected\protected\def\poparrangedpagesXY
+\permanent\protected\def\poparrangedpagesXY
{\ifnum\arrangedpageN>\zerocount
\paperwidth \arrangedpageX\paperwidth
\paperheight\arrangedpageY\paperheight
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/page-inj.mklx
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/page-inj.mklx 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/page-inj.mklx 2023-05-06 22:03:57 UTC (rev 67034)
@@ -32,6 +32,12 @@
\let\page_boxes_flush_before\clf_flushpageinjectionsbefore
\let\page_boxes_flush_after \clf_flushpageinjectionsafter
+\lettonothing\p_page_injections_delay
+\lettonothing\p_page_injections_n
+\lettonothing\p_page_injections_page
+\lettonothing\p_page_injections_pagestate
+\lettonothing\p_page_injections_state
+
\def\page_injections_flush_indeed
{\begingroup
\setbox\scratchbox\normalhpack
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/page-mbk.mklx
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/page-mbk.mklx 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/page-mbk.mklx 2023-05-06 22:03:57 UTC (rev 67034)
@@ -75,12 +75,16 @@
\setfalse\c_page_margin_blocks_enabled
+\let\page_margin_blocks_stop_block\relax
+
\permanent\tolerant\protected\def\startmarginblock[#tag]%
{\begingroup
\edef\currentmarginblock{#tag}%
- \doifelse{\marginblockparameter\c!state}\v!start
- \page_margin_blocks_start_block_yes
- \page_margin_blocks_start_block_nop}
+ \ifcstok{\marginblockparameter\c!state}\v!start
+ \expandafter\page_margin_blocks_start_block_yes
+ \else
+ \expandafter\page_margin_blocks_start_block_nop
+ \fi}
\permanent\protected\def\stopmarginblock
{\page_margin_blocks_stop_block
Added: trunk/Master/texmf-dist/tex/context/base/mkxl/phys-dim.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/phys-dim.lmt (rev 0)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/phys-dim.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -0,0 +1,1118 @@
+if not modules then modules = { } end modules ['phys-dim'] = {
+ version = 1.001,
+ comment = "companion to phys-dim.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is pretty old code that I found back, but let's give it a try
+-- in practice. It started out as m-units.lua but as we want to keep that
+-- module around we moved the code to the dimensions module.
+--
+-- todo: maybe also an sciunit command that converts to si units (1 inch -> 0.0254 m)
+-- etc .. typical something to do when listening to a news whow or b-movie
+--
+-- todo: collect used units for logging (and list of units, but then we need
+-- associations too).
+
+-- The lists have been checked and completed by Robin Kirkham.
+
+-- dubious/wrong
+
+-- Atom = [[u]], -- should be amu (atomic mass unit)
+-- Bell = [[B]], -- should be bel
+-- Sterant = [[sr]], -- should be steradian
+-- Equivalent = [[eql]], -- qualifier?
+-- At = [[at]], -- qualifier?
+-- Force = [[f]], -- qualifier?
+-- eVolt = [[eV]],
+-- -- AC or DC voltages should be qualified in the text
+-- VoltAC = [[V\unitsbackspace\unitslower{ac}]],
+-- VoltDC = [[V\unitsbackspace\unitslower{dc}]],
+-- AC = [[V\unitsbackspace\unitslower{ac}]],
+-- DC = [[V\unitsbackspace\unitslower{dc}]],
+-- -- probably not harmful but there are better alternatives
+-- -- e.g., revolution per second (rev/s)
+-- RPS = [[RPS]],
+-- RPM = [[RPM]],
+-- RevPerSec = [[RPS]],
+-- RevPerMin = [[RPM]],
+
+local rawset, next = rawset, next
+local V, P, S, R, C, Cc, Cs, matchlpeg = lpeg.V, lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.Cc, lpeg.Cs, lpeg.match
+local format, lower, gsub = string.format, string.lower, string.gsub
+local appendlpeg = lpeg.append
+local utfchartabletopattern = lpeg.utfchartabletopattern
+local mergetable, mergedtable, keys, loweredkeys, sortedhash = table.merge, table.merged, table.keys, table.loweredkeys, table.sortedhash
+local setmetatablenewindex = table.setmetatablenewindex
+local utfchar = utf.char
+
+physics = physics or { }
+physics.units = physics.units or { }
+
+local allocate = utilities.storage.allocate
+
+local context = context
+local commands = commands
+local implement = interfaces.implement
+
+local trace_units = false
+local report_units = logs.reporter("units")
+
+trackers.register("physics.units", function(v) trace_units = v end)
+
+-- digits parser (todo : use patterns)
+
+local math_one = Cs((P("$") /"") * (1-P("$"))^1 * (P("$")/"")) / context.m
+local math_two = Cs((P("\\m {")/"") * (1-P("}"))^1 * (P("}")/"")) / context.m -- watch the space after \m
+
+local digit = R("09")
+local plus = P("+")
+local minus = P("-")
+local plusminus = P("±")
+local sign = plus + minus
+local power = S("^e")
+local digitspace = S("~@_")
+local comma = P(",")
+local period = P(".")
+local semicolon = P(";")
+local colon = P(":")
+local signspace = P("/")
+local positive = P("++") -- was p
+local negative = P("--") -- was n
+local highspace = P("//") -- was s
+local padding = P("=")
+local space = P(" ")
+local lparent = P("(")
+local rparent = P(")")
+
+local lbrace = P("{")
+local rbrace = P("}")
+
+local digits = digit^1
+
+local powerdigits = plus * C(digits) / context.digitspowerplus
+ + minus * C(digits) / context.digitspowerminus
+ + C(digits) / context.digitspower
+
+local ddigitspace = digitspace / "" / context.digitsspace
+local ddigit = digits / context.digitsdigit
+local dsemicomma = semicolon / "" / context.digitsseparatorspace
+local dsemiperiod = colon / "" / context.digitsseparatorspace
+local dfinalcomma = comma / "" / context.digitsfinalcomma
+local dfinalperiod = period / "" / context.digitsfinalperiod
+local dintercomma = comma / "" / context.digitsintermediatecomma
+local dinterperiod = period / "" / context.digitsintermediateperiod
+local dskipcomma = comma / "" / context.digitsseparatorspace
+local dskipperiod = period / "" / context.digitsseparatorspace
+local dsignspace = signspace / "" / context.digitssignspace
+local dpositive = positive / "" / context.digitspositive
+local dnegative = negative / "" / context.digitsnegative
+local dhighspace = highspace / "" / context.digitshighspace
+local dsomesign = plus / "" / context.digitsplus
+ + minus / "" / context.digitsminus
+ + plusminus / "" / context.digitsplusminus
+local dpower = power / "" * ( powerdigits + lbrace * powerdigits * rbrace )
+
+local dpadding = padding / "" / context.digitszeropadding -- todo
+
+local dleader = (dpositive + dnegative + dhighspace + dsomesign + dsignspace)^0
+local dtrailer = dpower^0
+local dfinal = P(-1) + #P(1 - comma - period - semicolon - colon)
+local dnumber = (ddigitspace + ddigit)^1
+
+-- ___,000,000 ___,___,000 ___,___,__0 000,000,000 000.00 000,000,000.00 000,000,000.==
+
+-- : ; for the moment not used, maybe for invisible fraction . , when no leading number
+
+-- local c_p = (ddigitspace^1 * dskipcomma)^0 -- ___,
+-- * (ddigitspace^0 * ddigit * dintercomma)^0 -- _00, 000,
+-- * ddigitspace^0 * ddigit^0 -- _00 000
+-- * (
+-- dfinalperiod * ddigit -- .00
+-- + dskipperiod * dpadding^1 -- .==
+-- + dsemiperiod * ddigit -- :00
+-- + dsemiperiod * dpadding^1 -- :==
+-- )^0
+-- + ddigit -- 00
+--
+-- local p_c = (ddigitspace^1 * dskipperiod)^0 -- ___.
+-- * (ddigitspace^0 * ddigit * dinterperiod)^0 -- _00. 000.
+-- * ddigitspace^0 * ddigit^0 -- _00 000
+-- * (
+-- dfinalcomma * ddigit -- ,00
+-- + dskipcomma * dpadding^1 -- ,==
+-- + dsemicomma * ddigit -- :00
+-- + dsemicomma * dpadding^1 -- :==
+-- )^0
+-- + ddigit -- 00
+--
+-- fix by WS/SB (needs further testing)
+
+local c_p = (ddigitspace^1 * dskipcomma)^0 -- ___,
+ * (ddigitspace^0 * ddigit * dintercomma)^0 -- _00, 000,
+ * ddigitspace^0 * ddigit^0 -- _00 000
+ * (
+ dfinalperiod * ddigit^1 * dpadding^1 -- .0=
+ + dfinalperiod * ddigit * (dintercomma * ddigit)^0 -- .00
+ + dskipperiod * dpadding^1 -- .==
+ + dsemiperiod * ddigit * (dintercomma * ddigit)^0 -- :00
+ + dsemiperiod * dpadding^1 -- :==
+ )^0
+ + ddigit -- 00
+
+local p_c = (ddigitspace^1 * dskipperiod)^0 -- ___.
+ * (ddigitspace^0 * ddigit * dinterperiod)^0 -- _00. 000.
+ * ddigitspace^0 * ddigit^0 -- _00 000
+ * (
+ dfinalcomma * ddigit^1 * dpadding^1 -- ,0=
+ + dfinalcomma * ddigit * (dinterperiod * ddigit)^0 -- 00
+ + dskipcomma * dpadding^1 -- ,==
+ + dsemicomma * ddigit * (dinterperiod * ddigit)^0 -- :00
+ + dsemicomma * dpadding^1 -- :==
+ )^0
+ + ddigit -- 00
+
+local p_c_dparser = math_one + math_two + dleader * p_c * dtrailer * dfinal
+local c_p_dparser = math_one + math_two + dleader * c_p * dtrailer * dfinal
+
+local function makedigits(str,reverse)
+ if reverse then
+ matchlpeg(p_c_dparser,str)
+ else
+ matchlpeg(c_p_dparser,str)
+ end
+end
+
+-- tables:
+
+local user_long_prefixes = { }
+local user_long_units = { }
+local user_long_operators = { }
+local user_long_suffixes = { }
+local user_symbol_units = { }
+local user_packaged_units = { }
+
+local user_short_prefixes = { }
+local user_short_units = { }
+local user_short_operators = { }
+local user_short_suffixes = { }
+
+local long_prefixes = {
+
+ -- Le Système international d'unités (SI) 8e édition (Table 5)
+
+ Yocto = "yocto", -- 10^{-24}
+ Zepto = "zepto", -- 10^{-21}
+ Atto = "atto", -- 10^{-18}
+ Femto = "femto", -- 10^{-15}
+ Pico = "pico", -- 10^{-12}
+ Nano = "nano", -- 10^{-9}
+ Micro = "micro", -- 10^{-6}
+ Milli = "milli", -- 10^{-3}
+ Centi = "centi", -- 10^{-2}
+ Deci = "deci", -- 10^{-1}
+
+ Deca = "deca", -- 10^{1}
+ Hecto = "hecto", -- 10^{2}
+ Kilo = "kilo", -- 10^{3}
+ Mega = "mega", -- 10^{6}
+ Giga = "giga", -- 10^{9}
+ Tera = "tera", -- 10^{12}
+ Peta = "peta", -- 10^{15}
+ Exa = "exa", -- 10^{18}
+ Zetta = "zetta", -- 10^{21}
+ Yotta = "yotta", -- 10^{24}
+
+ -- IEC 60027-2: 2005, third edition, Part 2
+
+ Kibi = "kibi", -- 2^{10} (not ki)
+ Mebi = "mebi", -- 2^{20}
+ Gibi = "gibi", -- 2^{30}
+ Tebi = "tebi", -- 2^{40}
+ Pebi = "pebi", -- 2^{50}
+ Exbi = "exbi", -- 2^{60}
+
+ -- not standard
+
+ Zebi = "zebi", -- binary
+ Yobi = "yobi", -- binary
+
+ Micro = "micro",
+ Root = "root",
+}
+
+local long_units = {
+
+ -- Le Système international d'unités (SI) 8e édition (except synonyms)
+ -- SI base units (Table 1)
+
+ Meter = "meter",
+ Gram = "gram",
+ Second = "second",
+ Ampere = "ampere",
+ Kelvin = "kelvin",
+ Mole = "mole",
+ Candela = "candela",
+
+ -- synonyms
+
+ Mol = "mole",
+ Metre = "meter",
+
+ -- SI derived units with special names (Table 3)
+
+ Radian = "radian",
+ Steradian = "steradian",
+ Hertz = "hertz",
+ Newton = "newton",
+ Pascal = "pascal",
+ Joule = "joule",
+ Watt = "watt",
+ Coulomb = "coulomb",
+ Volt = "volt",
+ Farad = "farad",
+ Ohm = "ohm",
+ Siemens = "siemens",
+ Weber = "weber",
+ Tesla = "tesla",
+ Henry = "henry",
+ Celsius = "celsius",
+ Lumen = "lumen",
+ Lux = "lux",
+ Becquerel = "becquerel",
+ Gray = "gray",
+ Sievert = "sievert",
+ Katal = "katal",
+
+ -- non SI units accepted for use with SI (Table 6)
+
+ Minute = "minute",
+ Hour = "hour",
+ Day = "day",
+
+ -- (degree, minute, second of arc are treated specially later)
+
+ Gon = "gon",
+ Grad = "grad",
+ Hectare = "hectare",
+ Liter = "liter",
+
+ Tonne = "tonne",
+
+ -- synonyms
+
+ MetricTon = "tonne",
+ Litre = "liter",
+
+ ["Metric Ton"] = "tonne",
+
+ -- non-SI units whose values must be obtained experimentally (Table 7)
+
+ AtomicMassUnit = "atomicmassunit",
+ AstronomicalUnit = "astronomicalunit",
+ ElectronVolt = "electronvolt",
+ Dalton = "dalton",
+
+ ["Atomic Mass Unit"] = "atomicmassunit",
+ ["Astronomical Unit"] = "astronomicalunit",
+ ["Electron Volt"] = "electronvolt",
+
+ -- special cases (catch doubles, okay, a bit over the top)
+
+ DegreesCelsius = "celsius",
+ DegreesFahrenheit = "fahrenheit",
+ DegreeCelsius = "celsius",
+ DegreeFahrenheit = "fahrenheit",
+
+ ["Degrees Celsius"] = "celsius",
+ ["Degrees Fahrenheit"] = "fahrenheit",
+ ["Degree Celsius"] = "celsius",
+ ["Degree Fahrenheit"] = "fahrenheit",
+
+ -- too late as we already have connected symbols catched:
+ --
+ -- ["° Celsius"] = "celsius",
+ -- ["° Fahrenheit"] = "fahrenheit",
+ -- ["°Celsius"] = "celsius",
+ -- ["°Fahrenheit"] = "fahrenheit",
+
+ -- the "natural units" and "atomic units" are omitted for now
+ -- synonyms
+
+ eV = "electronvolt",
+ AMU = "atomicmassunit",
+
+ -- other non-SI units (Table 8)
+
+ Bar = "bar",
+ Hg = "mercury",
+ -- ["Millimetre Of Mercury"] = [[mmHg]],
+ Angstrom = "angstrom", -- strictly Ångström
+ NauticalMile = "nauticalmile",
+ Barn = "barn",
+ Knot = "knot",
+ Neper = "neper",
+ Bel = "bel", -- in practice only decibel used
+
+ ["Nautical Mile"] = "nauticalmile",
+
+ -- other non-SI units from CGS system (Table 9)
+
+ Erg = "erg",
+ Dyne = "dyne",
+ Poise = "poise",
+ Stokes = "stokes",
+ Stilb = "stilb",
+ Phot = "phot",
+ Gal = "gal",
+ Maxwell = "maxwell",
+ Gauss = "gauss",
+ Oersted = "oersted",
+
+ -- end of SI
+
+ -- data: for use with the binary prefixes (except Erlang)
+
+ Bit = "bit",
+ Byte = "byte" ,
+ Baud = "baud",
+ Erlang = "erlang",
+
+ -- common units, not part of SI
+
+ Atmosphere = "atmosphere",
+ Revolution = "revolution",
+
+ -- synonyms
+
+ Atm = "atmosphere",
+ Rev = "revolution",
+
+ -- imperial units (very incomplete)
+
+ Fahrenheit = "fahrenheit",
+ Foot = "foot",
+ Inch = "inch",
+ Calorie = "calorie",
+
+ -- synonyms
+
+ Cal = "calorie",
+
+}
+
+local long_operators = {
+
+ Times = "times",
+ Solidus = "solidus",
+ Per = "per",
+ OutOf = "outof",
+
+}
+
+local long_suffixes = {
+
+ Linear = "linear",
+ Square = "square",
+ Cubic = "cubic",
+ Quadratic = "quadratic",
+ Inverse = "inverse",
+ ILinear = "ilinear",
+ ISquare = "isquare",
+ ICubic = "icubic",
+ IQuadratic = "iquadratic",
+
+}
+
+local short_prefixes = {
+
+ y = "yocto",
+ z = "zetto",
+ a = "atto",
+ f = "femto",
+ p = "pico",
+ n = "nano",
+ u = "micro",
+ m = "milli",
+ c = "centi",
+ d = "deci",
+ da = "deca",
+ h = "hecto",
+ k = "kilo",
+ M = "mega",
+ G = "giga",
+ T = "tera",
+ P = "peta",
+ E = "exa",
+ Z = "zetta",
+ Y = "yotta",
+
+}
+
+local short_units = { -- I'm not sure about casing
+
+ m = "meter",
+ Hz = "hertz",
+ hz = "hertz",
+ B = "bel",
+ b = "bel",
+ lx = "lux",
+ -- da = "dalton",
+ h = "hour",
+ s = "second",
+ g = "gram",
+ n = "newton",
+ V = "volt",
+ t = "tonne",
+ l = "liter",
+ -- w = "watt",
+ W = "watt",
+ -- a = "ampere",
+ A = "ampere",
+
+ Ω = "ohm",
+
+-- C = "coulomb", -- needs checking with (c)enti
+-- K = "kelvin", -- needs checking with (k)ilo
+-- N = "newton", -- needs checking with (n)ewton
+
+ min = "minute",
+
+ [utfchar(0x2103)] = "celsius",
+ [utfchar(0x2109)] = "fahrenheit",
+}
+
+local short_operators = {
+ ["."] = "times",
+ ["*"] = "times",
+ ["/"] = "solidus",
+ [":"] = "outof",
+}
+
+local short_suffixes = { -- maybe just raw digit match
+ ["1"] = "linear",
+ ["2"] = "square",
+ ["3"] = "cubic",
+ ["4"] = "quadratic",
+ ["+1"] = "linear",
+ ["+2"] = "square",
+ ["+3"] = "cubic",
+ ["+4"] = "quadratic",
+ ["-1"] = "inverse",
+ ["-1"] = "ilinear",
+ ["-2"] = "isquare",
+ ["-3"] = "icubic",
+ ["-4"] = "iquadratic",
+ ["^1"] = "linear",
+ ["^2"] = "square",
+ ["^3"] = "cubic",
+ ["^4"] = "quadratic",
+ ["^+1"] = "linear",
+ ["^+2"] = "square",
+ ["^+3"] = "cubic",
+ ["^+4"] = "quadratic",
+ ["^-1"] = "inverse",
+ ["^-1"] = "ilinear",
+ ["^-2"] = "isquare",
+ ["^-3"] = "icubic",
+ ["^-4"] = "iquadratic",
+}
+
+local symbol_units = {
+ Degrees = "degree",
+ Degree = "degree",
+ -- Deg = "degree",
+ ["°"] = "degree",
+ ArcMinute = "arcminute",
+ ["′"] = "arcminute", -- 0x2032
+ ArcSecond = "arcsecond",
+ ["″"] = "arcsecond", -- 0x2033
+ Percent = "percent",
+ ["%"] = "percent",
+ Promille = "permille",
+ Permille = "permille",
+}
+
+local packaged_units = {
+ Micron = "micron",
+ mmHg = "millimetermercury",
+}
+
+-- rendering:
+
+local ctx_unitsPUS = context.unitsPUS
+local ctx_unitsPU = context.unitsPU
+local ctx_unitsPS = context.unitsPS
+local ctx_unitsP = context.unitsP
+local ctx_unitsUS = context.unitsUS
+local ctx_unitsU = context.unitsU
+local ctx_unitsS = context.unitsS
+local ctx_unitsO = context.unitsO
+local ctx_unitsN = context.unitsN
+local ctx_unitsC = context.unitsC
+local ctx_unitsQ = context.unitsQ
+local ctx_unitsRPM = context.unitsRPM
+local ctx_unitsRTO = context.unitsRTO
+local ctx_unitsRabout = context.unitsRabout
+local ctx_unitsNstart = context.unitsNstart
+local ctx_unitsNstop = context.unitsNstop
+local ctx_unitsNspace = context.unitsNspace
+local ctx_unitsPopen = context.unitsPopen
+local ctx_unitsPclose = context.unitsPclose
+
+local labels = languages.data.labels
+
+labels.prefixes = allocate {
+ yocto = { labels = { en = [[y]] } }, -- 10^{-24}
+ zepto = { labels = { en = [[z]] } }, -- 10^{-21}
+ atto = { labels = { en = [[a]] } }, -- 10^{-18}
+ femto = { labels = { en = [[f]] } }, -- 10^{-15}
+ pico = { labels = { en = [[p]] } }, -- 10^{-12}
+ nano = { labels = { en = [[n]] } }, -- 10^{-9}
+ micro = { labels = { en = [[\mu]] } }, -- 10^{-6}
+ milli = { labels = { en = [[m]] } }, -- 10^{-3}
+ centi = { labels = { en = [[c]] } }, -- 10^{-2}
+ deci = { labels = { en = [[d]] } }, -- 10^{-1}
+ deca = { labels = { en = [[da]] } }, -- 10^{1}
+ hecto = { labels = { en = [[h]] } }, -- 10^{2}
+ kilo = { labels = { en = [[k]] } }, -- 10^{3}
+ mega = { labels = { en = [[M]] } }, -- 10^{6}
+ giga = { labels = { en = [[G]] } }, -- 10^{9}
+ tera = { labels = { en = [[T]] } }, -- 10^{12}
+ peta = { labels = { en = [[P]] } }, -- 10^{15}
+ exa = { labels = { en = [[E]] } }, -- 10^{18}
+ zetta = { labels = { en = [[Z]] } }, -- 10^{21}
+ yotta = { labels = { en = [[Y]] } }, -- 10^{24}
+ kibi = { labels = { en = [[Ki]] } }, -- 2^{10} (not ki)
+ mebi = { labels = { en = [[Mi]] } }, -- 2^{20}
+ gibi = { labels = { en = [[Gi]] } }, -- 2^{30}
+ tebi = { labels = { en = [[Ti]] } }, -- 2^{40}
+ pebi = { labels = { en = [[Pi]] } }, -- 2^{50}
+ exbi = { labels = { en = [[Ei]] } }, -- 2^{60}
+ zebi = { labels = { en = [[Zi]] } }, -- binary
+ yobi = { labels = { en = [[Yi]] } }, -- binary
+ micro = { labels = { en = [[µ]] } }, -- 0x00B5 \textmu
+ root = { labels = { en = [[√]] } }, -- 0x221A
+}
+
+labels.units = allocate {
+ meter = { labels = { en = [[m]] } },
+ gram = { labels = { en = [[g]] } }, -- strictly kg is the base unit
+ second = { labels = { en = [[s]] } },
+ ampere = { labels = { en = [[A]] } },
+ kelvin = { labels = { en = [[K]] } },
+ mole = { labels = { en = [[mol]] } },
+ candela = { labels = { en = [[cd]] } },
+ mol = { labels = { en = [[mol]] } },
+ radian = { labels = { en = [[rad]] } },
+ steradian = { labels = { en = [[sr]] } },
+ hertz = { labels = { en = [[Hz]] } },
+ newton = { labels = { en = [[N]] } },
+ pascal = { labels = { en = [[Pa]] } },
+ joule = { labels = { en = [[J]] } },
+ watt = { labels = { en = [[W]] } },
+ coulomb = { labels = { en = [[C]] } },
+ volt = { labels = { en = [[V]] } },
+ farad = { labels = { en = [[F]] } },
+ ohm = { labels = { en = [[Ω]] } }, -- 0x2126 \textohm
+ siemens = { labels = { en = [[S]] } },
+ weber = { labels = { en = [[Wb]] } },
+ mercury = { labels = { en = [[Hg]] } },
+ millimetermercury = { labels = { en = [[mmHg]] } }, -- connected
+ tesla = { labels = { en = [[T]] } },
+ henry = { labels = { en = [[H]] } },
+ celsius = { labels = { en = [[\checkedtextcelsius]] } }, -- 0x2103
+ lumen = { labels = { en = [[lm]] } },
+ lux = { labels = { en = [[lx]] } },
+ becquerel = { labels = { en = [[Bq]] } },
+ gray = { labels = { en = [[Gy]] } },
+ sievert = { labels = { en = [[Sv]] } },
+ katal = { labels = { en = [[kat]] } },
+ minute = { labels = { en = [[min]] } },
+ hour = { labels = { en = [[h]] } },
+ day = { labels = { en = [[d]] } },
+ gon = { labels = { en = [[gon]] } },
+ grad = { labels = { en = [[grad]] } },
+ hectare = { labels = { en = [[ha]] } },
+ liter = { labels = { en = [[l]] } }, -- symbol l or L
+ tonne = { labels = { en = [[t]] } },
+ electronvolt = { labels = { en = [[eV]] } },
+ dalton = { labels = { en = [[Da]] } },
+ atomicmassunit = { labels = { en = [[u]] } },
+ astronomicalunit = { labels = { en = [[au]] } },
+ bar = { labels = { en = [[bar]] } },
+ angstrom = { labels = { en = [[Å]] } }, -- strictly Ångström
+ nauticalmile = { labels = { en = [[M]] } },
+ barn = { labels = { en = [[b]] } },
+ knot = { labels = { en = [[kn]] } },
+ neper = { labels = { en = [[Np]] } },
+ bel = { labels = { en = [[B]] } }, -- in practice only decibel used
+ erg = { labels = { en = [[erg]] } },
+ dyne = { labels = { en = [[dyn]] } },
+ poise = { labels = { en = [[P]] } },
+ stokes = { labels = { en = [[St]] } },
+ stilb = { labels = { en = [[sb]] } },
+ phot = { labels = { en = [[phot]] } },
+ gal = { labels = { en = [[gal]] } },
+ maxwell = { labels = { en = [[Mx]] } },
+ gauss = { labels = { en = [[G]] } },
+ oersted = { labels = { en = [[Oe]] } }, -- strictly Œrsted
+ bit = { labels = { en = [[bit]] } },
+ byte = { labels = { en = [[B]] } },
+ baud = { labels = { en = [[Bd]] } },
+ erlang = { labels = { en = [[E]] } },
+ atmosphere = { labels = { en = [[atm]] } },
+ revolution = { labels = { en = [[rev]] } },
+ fahrenheit = { labels = { en = [[\checkedtextfahrenheit]] } }, -- 0x2109
+ foot = { labels = { en = [[ft]] } },
+ inch = { labels = { en = [[inch]] } },
+ calorie = { labels = { en = [[cal]] } },
+ --
+ degree = { labels = { en = [[°]]} },
+ arcminute = { labels = { en = [[\checkedtextprime]] } }, -- ′ 0x2032
+ arcsecond = { labels = { en = [[\checkedtextdoubleprime]] } }, -- ″ 0x2033
+ percent = { labels = { en = [[\percent]] } },
+ permille = { labels = { en = [[\promille]] } },
+ --
+ micron = { labels = { en = [[\textmu m]] } },
+}
+
+labels.operators = allocate {
+ times = { labels = { en = [[\unitsTIMES]] } },
+ solidus = { labels = { en = [[\unitsSOLIDUS]] } },
+ per = { labels = { en = [[\unitsSOLIDUS]] } },
+ outof = { labels = { en = [[\unitsOUTOF]] } },
+}
+
+labels.suffixes = allocate {
+ linear = { labels = { en = [[1]] } },
+ square = { labels = { en = [[2]] } },
+ cubic = { labels = { en = [[3]] } },
+ quadratic = { labels = { en = [[4]] } },
+ inverse = { labels = { en = [[\mathminus1]] } },
+ ilinear = { labels = { en = [[\mathminus1]] } },
+ isquare = { labels = { en = [[\mathminus2]] } },
+ icubic = { labels = { en = [[\mathminus3]] } },
+ iquadratic = { labels = { en = [[\mathminus4]] } },
+}
+
+local function dimpus(p,u,s)
+ if trace_units then
+ report_units("prefix %a, unit %a, suffix %a",p,u,s)
+ end --
+ if p ~= "" then
+ if u ~= "" then
+ if s ~= "" then
+ ctx_unitsPUS(p,u,s)
+ else
+ ctx_unitsPU(p,u)
+ end
+ elseif s ~= "" then
+ ctx_unitsPS(p,s)
+ else
+ ctx_unitsP(p)
+ end
+ else
+ if u ~= "" then
+ if s ~= "" then
+ ctx_unitsUS(u,s)
+ -- elseif c then
+ -- ctx_unitsC(u)
+ else
+ ctx_unitsU(u)
+ end
+ elseif s ~= "" then
+ ctx_unitsS(s)
+ else
+ ctx_unitsP(p)
+ end
+ end
+end
+
+local function dimspu(s,p,u)
+ return dimpus(p,u,s)
+end
+
+local function dimop(o)
+ if trace_units then
+ report_units("operator %a",o)
+ end
+ if o then
+ ctx_unitsO(o)
+ end
+end
+
+local function dimsym(s)
+ if trace_units then
+ report_units("symbol %a",s)
+ end
+ s = symbol_units[s] or s
+ if s then
+ ctx_unitsC(s)
+ end
+end
+
+local function dimpre(p)
+ if trace_units then
+ report_units("prefix [%a",p)
+ end
+ p = packaged_units[p] or p
+ if p then
+ ctx_unitsU(p)
+ end
+end
+
+-- patterns:
+--
+-- space inside Cs else funny captures and args to function
+--
+-- square centi meter per square kilo seconds
+
+-- todo 0x -> rm
+
+local function update_parsers(keepcase) -- todo: don't remap utf sequences
+
+ local all_long_prefixes = { }
+ local all_long_units = { }
+ local all_long_operators = { }
+ local all_long_suffixes = { }
+ local all_symbol_units = { }
+ local all_packaged_units = { }
+
+ local all_short_prefixes = { }
+ local all_short_units = { }
+ local all_short_operators = { }
+ local all_short_suffixes = { }
+
+ for k, v in sortedhash(long_prefixes) do all_long_prefixes [k] = v all_long_prefixes [lower(k)] = v end
+ for k, v in sortedhash(long_units) do all_long_units [k] = v all_long_units [lower(k)] = v end
+ for k, v in sortedhash(long_operators) do all_long_operators[k] = v all_long_operators[lower(k)] = v end
+ for k, v in sortedhash(long_suffixes) do all_long_suffixes [k] = v all_long_suffixes [lower(k)] = v end
+ for k, v in sortedhash(symbol_units) do all_symbol_units [k] = v all_symbol_units [lower(k)] = v end
+ for k, v in sortedhash(packaged_units) do all_packaged_units[k] = v all_packaged_units[lower(k)] = v end
+
+ for k, v in sortedhash(user_long_prefixes) do all_long_prefixes [k] = v if not keepcase then all_long_prefixes [lower(k)] = v end end
+ for k, v in sortedhash(user_long_units) do all_long_units [k] = v if not keepcase then all_long_units [lower(k)] = v end end
+ for k, v in sortedhash(user_long_operators) do all_long_operators[k] = v if not keepcase then all_long_operators[lower(k)] = v end end
+ for k, v in sortedhash(user_long_suffixes) do all_long_suffixes [k] = v if not keepcase then all_long_suffixes [lower(k)] = v end end
+ for k, v in sortedhash(user_symbol_units) do all_symbol_units [k] = v if not keepcase then all_symbol_units [lower(k)] = v end end
+ for k, v in sortedhash(user_packaged_units) do all_packaged_units[k] = v if not keepcase then all_packaged_units[lower(k)] = v end end
+
+ for k, v in sortedhash(short_prefixes) do all_short_prefixes [k] = v end
+ for k, v in sortedhash(short_units) do all_short_units [k] = v end
+ for k, v in sortedhash(short_operators) do all_short_operators[k] = v end
+ for k, v in sortedhash(short_suffixes) do all_short_suffixes [k] = v end
+
+ for k, v in sortedhash(user_short_prefixes) do all_short_prefixes [k] = v end
+ for k, v in sortedhash(user_short_units) do all_short_units [k] = v end
+ for k, v in sortedhash(user_short_operators) do all_short_operators[k] = v end
+ for k, v in sortedhash(user_short_suffixes) do all_short_suffixes [k] = v end
+
+ local somespace = P(" ")^0/""
+
+ local p_long_prefix = appendlpeg(all_long_prefixes,nil,true)
+ local p_long_unit = appendlpeg(all_long_units,nil,true)
+ local p_long_operator = appendlpeg(all_long_operators,nil,true)
+ local p_long_suffix = appendlpeg(all_long_suffixes,nil,true)
+ local p_symbol = appendlpeg(all_symbol_units,nil,true)
+ local p_packaged = appendlpeg(all_packaged_units,nil,true)
+
+ local p_short_prefix = appendlpeg(all_short_prefixes)
+ local p_short_unit = appendlpeg(all_short_units)
+ local p_short_operator = appendlpeg(all_short_operators)
+ local p_short_suffix = appendlpeg(all_short_suffixes)
+
+ -- more efficient but needs testing
+
+-- local p_long_prefix = utfchartabletopattern(all_long_prefixes) / all_long_prefixes
+-- local p_long_unit = utfchartabletopattern(all_long_units) / all_long_units
+-- local p_long_operator = utfchartabletopattern(all_long_operators) / all_long_operators
+-- local p_long_suffix = utfchartabletopattern(all_long_suffixes) / all_long_suffixes
+-- local p_symbol = utfchartabletopattern(all_symbol_units) / all_symbol_units
+-- local p_packaged = utfchartabletopattern(all_packaged_units) / all_packaged_units
+
+-- local p_short_prefix = utfchartabletopattern(all_short_prefixes) / all_short_prefixes
+-- local p_short_unit = utfchartabletopattern(all_short_units) / all_short_units
+-- local p_short_operator = utfchartabletopattern(all_short_operators) / all_short_operators
+-- local p_short_suffix = utfchartabletopattern(all_short_suffixes) / all_short_suffixes
+
+ -- we can can cleanup some space issues here (todo)
+
+ local unitparser = P { "unit",
+ --
+ longprefix = Cs(V("somespace") * p_long_prefix),
+ shortprefix = Cs(V("somespace") * p_short_prefix),
+ longsuffix = Cs(V("somespace") * p_long_suffix),
+ shortsuffix = Cs(V("somespace") * p_short_suffix),
+ shortunit = Cs(V("somespace") * p_short_unit),
+ longunit = Cs(V("somespace") * p_long_unit),
+ longoperator = Cs(V("somespace") * p_long_operator),
+ shortoperator = Cs(V("somespace") * p_short_operator),
+ packaged = Cs(V("somespace") * p_packaged),
+ --
+ nothing = Cc(""),
+ somespace = somespace,
+ nospace = (1-somespace)^1, -- was 0
+ -- ignore = P(-1),
+ --
+ qualifier = Cs(V("somespace") * (lparent/"") * (1-rparent)^1 * (rparent/"")),
+ --
+ somesymbol = V("somespace")
+ * (p_symbol/dimsym)
+ * V("somespace"),
+ somepackaged = V("somespace")
+ * (V("packaged") / dimpre)
+ * V("somespace"),
+ -- someunknown = V("somespace")
+ -- * (V("nospace")/ctx_unitsU)
+ -- * V("somespace"),
+ --
+ combination = V("longprefix") * V("longunit") -- centi meter
+ + V("nothing") * V("longunit")
+ + V("shortprefix") * V("shortunit") -- c m
+ + V("nothing") * V("shortunit")
+ + V("longprefix") * V("shortunit") -- centi m
+ + V("shortprefix") * V("longunit"), -- c meter
+
+-- combination = ( V("longprefix") -- centi meter
+-- + V("nothing")
+-- ) * V("longunit")
+-- + ( V("shortprefix") -- c m
+-- + V("nothing")
+-- + V("longprefix")
+-- ) * V("shortunit") -- centi m
+-- + ( V("shortprefix") -- c meter
+-- ) * V("longunit"),
+
+
+ dimension = V("somespace")
+ * (
+ V("packaged") / dimpre
+ + (V("longsuffix") * V("combination")) / dimspu
+ + (V("combination") * (V("shortsuffix") + V("nothing"))) / dimpus
+ )
+ * (V("qualifier") / ctx_unitsQ)^-1
+ * V("somespace"),
+ operator = V("somespace")
+ * ((V("longoperator") + V("shortoperator")) / dimop)
+ * V("somespace"),
+ snippet = V("dimension")
+ + V("somesymbol"),
+ unit = ( V("snippet") * (V("operator") * V("snippet"))^0
+ + V("somepackaged")
+ )^1,
+ }
+
+ -- todo: avoid \ctx_unitsNstart\ctx_unitsNstop (weird that it can happen .. now catched at tex end)
+
+ local letter = R("az","AZ")
+ local bound = #(1-letter)
+ -- local number = lpeg.patterns.number
+ local number = Cs( P("$") * (1-P("$"))^1 * P("$")
+ + P([[\m{]]) * (1-P("}"))^1 * P("}")
+ + (1-letter-P(" "))^1 -- todo: catch { } -- not ok
+ ) / ctx_unitsN
+
+ local start = Cc(nil) / ctx_unitsNstart
+ local stop = Cc(nil) / ctx_unitsNstop
+ local space = P(" ") * Cc(nil) / ctx_unitsNspace
+ local open = P("(") * Cc(nil) / ctx_unitsPopen
+ local close = P(")") * Cc(nil) / ctx_unitsPclose
+
+ local range = somespace
+ * ( (P("±") + P("pm") * bound) / "" / ctx_unitsRPM
+ + (P("–") + P("to") * bound) / "" / ctx_unitsRTO )
+ * somespace
+
+ local about = (P("±") + P("pm") * bound) / "" / ctx_unitsRabout
+ * somespace
+
+ -- todo: start / stop
+
+ local function combine(parser)
+ return P { "start",
+ number = start * dleader * (parser + number) * stop,
+ anumber = space
+ * open
+ * V("about")^-1
+ * V("number")
+ * close,
+ rule = V("number")^-1
+ * (V("range") * V("number") + V("anumber"))^-1,
+ unit = unitparser,
+ about = about,
+ range = range,
+ space = space,
+ start = V("rule")
+ * V("unit")
+ * (V("space") * V("rule") * V("unit"))^0
+ + open
+ * V("number")
+ * (V("range") * V("number"))^-1
+ * close
+ * dtrailer^-1
+ * V("unit")
+ + V("number")
+ }
+ end
+
+ return combine(p_c_dparser), combine(c_p_dparser)
+end
+
+local p_c_parser_lowercase = nil
+local c_p_parser_lowercase = nil
+local p_c_parser_keepcase = nil
+local c_p_parser_keepcase = nil
+
+local dirty_lowercase = true
+local dirty_keepcase = true
+
+local v_reverse = interfaces.variables.reverse
+local v_keep = interfaces.variables.keep
+
+local function makeunit(order,option,str)
+ local reverse = order == v_reverse
+ local keep = option == v_keep
+ local parser
+ if keep then
+ if dirty_keepcase then
+ if trace_units then
+ report_units("initializing case %s parser","sensititive")
+ end
+ p_c_parser_keepcase, c_p_parser_keepcase = update_parsers(true)
+ dirty_keepcase = false
+ end
+ parser = reverse and p_c_parser_keepcase or c_p_parser_keepcase
+ else
+ if dirty_lowercase then
+ if trace_units then
+ report_units("initializing case %s parser","insensititive")
+ end
+ p_c_parser_lowercase, c_p_parser_lowercase = update_parsers()
+ dirty_lowercase = false
+ end
+ parser = reverse and p_c_parser_lowercase or c_p_parser_lowercase
+ end
+ if not matchlpeg(parser,str) then
+ report_units("unable to parse: %s",str)
+ context(str)
+ end
+end
+
+local function trigger(t,k,v)
+ rawset(t,k,v)
+ dirty_lowercase = true
+ dirty_keepcase = true
+end
+
+local t_units = {
+ prefixes = setmetatablenewindex(long_prefixes,trigger),
+ units = setmetatablenewindex(long_units,trigger),
+ operators = setmetatablenewindex(long_operators,trigger),
+ suffixes = setmetatablenewindex(long_suffixes,trigger),
+ symbols = setmetatablenewindex(symbol_units,trigger),
+ packaged = setmetatablenewindex(packaged_units,trigger),
+}
+
+local t_shortcuts = {
+ prefixes = setmetatablenewindex(short_prefixes,trigger),
+ units = setmetatablenewindex(short_units,trigger),
+ operators = setmetatablenewindex(short_operators,trigger),
+ suffixes = setmetatablenewindex(short_suffixes,trigger),
+}
+
+local t_userunits = {
+ prefixes = setmetatablenewindex(user_long_prefixes,trigger),
+ units = setmetatablenewindex(user_long_units,trigger),
+ operators = setmetatablenewindex(user_long_operators,trigger),
+ suffixes = setmetatablenewindex(user_long_suffixes,trigger),
+ symbols = setmetatablenewindex(user_symbol_units,trigger),
+ packaged = setmetatablenewindex(user_packaged_units,trigger),
+}
+
+local t_usershortcuts = {
+ prefixes = setmetatablenewindex(user_short_prefixes,trigger),
+ units = setmetatablenewindex(user_short_units,trigger),
+ operators = setmetatablenewindex(user_short_operators,trigger),
+ suffixes = setmetatablenewindex(user_short_suffixes,trigger),
+}
+
+physics.units.tables = allocate {
+ units = t_units,
+ shortcuts = t_shortcuts,
+ userunits = t_userunits,
+ usershortcuts = t_usershortcuts,
+}
+
+local mapping = {
+ prefix = "prefixes",
+ unit = "units",
+ operator = "operators",
+ suffix = "suffixes",
+ symbol = "symbols",
+ packaged = "packaged",
+}
+
+local function register(category,list,target)
+ if not list or list == "" then
+ list = category
+ category = "unit"
+ end
+ local t = target[mapping[category]]
+ if t then
+ for k, v in next, utilities.parsers.settings_to_hash(list or "") do
+ t[k] = v
+ end
+ end
+ -- inspect(tables)
+end
+
+local function registerunit (category,list) register(category,list,t_userunits) end
+local function registershortcut(category,list) register(category,list,t_usershortcuts) end
+
+physics.units.registerunit = registerunit
+physics.units.registershortcut = registershortcut
+
+implement {
+ name = "digits_normal",
+ actions = makedigits,
+ arguments = "string",
+}
+
+implement {
+ name = "digits_reverse",
+ actions = makedigits,
+ arguments = { "string", true },
+}
+
+implement {
+ name = "unit",
+ actions = makeunit,
+ arguments = "3 strings"
+}
+
+implement {
+ name = "registerunit",
+ actions = registerunit,
+ arguments = "2 strings",
+}
+
+implement {
+ name = "registerunitshortcut",
+ actions = registershortcut,
+ arguments = "2 strings",
+}
+
+implement {
+ name = "hyphenateddigits",
+ public = true,
+ protected = true,
+ arguments = { "optional", "string" },
+ actions = function(filler, digits)
+ digits = gsub(digits,"(%d)","%1\\digitsbreak ") -- space needed for following letters
+ digits = gsub(digits,"\\-$",filler)
+ context(digits)
+ end
+}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/phys-dim.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/phys-dim.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/phys-dim.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{phys-dim}{}
+\registerctxluafile{phys-dim}{autosuffix}
% TAGGING NEEDS CHECKING ... WILL DO WHEN PARSER IS OK
@@ -354,7 +354,8 @@
[\c!alternative=, % done: text
\c!separator=\v!normal, % done: cdot|big|medium|space
\s!language=\currentlanguage, % done: (no interface yet)
- \c!order=\v!normal, % ,. (reverse: .,)
+ \c!order=, % reverse
+ \c!option=, % keep (case)
\c!method=0,
%\c!grid=\v!yes, % (maybe)
%\c!style=..., % done
@@ -431,7 +432,7 @@
\to \everyunits
\appendtoks
- \frozen\instance\setuevalue\currentunit{\phys_units_direct{\currentunit}}
+ \frozen\protected\instance\edefcsname\currentunit\endcsname{\phys_units_direct{\currentunit}}
\to \everydefineunit
\protected\def\phys_units_direct#1%
@@ -441,9 +442,10 @@
\settrue\c_phys_units_dospace
\removelastskip
\fi
+ \edef\currentunit{#1}%
\c_phys_digits_method\unitparameter\c!method\relax
\ifmmode\else\dontleavehmode\fi
- \edef\currentunit{#1}%
+% \edef\currentunit{#1}%
\enforced\edef\unitlanguage{\unitparameter\s!language}%
\enforced\let\prefixlanguage\unitlanguage
\enforced\let\operatorlanguage\unitlanguage
@@ -503,9 +505,17 @@
\let\phys_units_direct\phys_units_direct_nested
\to \everyunits
+% \protected\def\phys_units_indeed#1%
+% {\edef\p_order{\unitparameter\c!order}%
+% \ifx\p_order\v!reverse
+% \expandafter\clf_unit_reverse
+% \else
+% \expandafter\clf_unit_normal
+% \fi
+% {\detokenize{#1}}}
+
\protected\def\phys_units_indeed#1%
- {\edef\p_order{\unitparameter\c!order}%
- \ifx\p_order\v!reverse\expandafter\clf_unit_reverse\else\expandafter\clf_unit_normal\fi{\detokenize{#1}}}
+ {\clf_unit{\unitparameter\c!order}{\unitparameter\c!option}{\detokenize{#1}}}
\permanent\protected\def\unitsPUS#1#2#3{\phys_units_next\prefixtext{#1}\unittext{#2}\unitsraise{\suffixtext{#3}}\c_phys_units_state\plusone} % suffix
\permanent\protected\def\unitsPU #1#2{\phys_units_next\prefixtext{#1}\unittext{#2}\c_phys_units_state\plusthree} % unit
@@ -521,10 +531,10 @@
\permanent\protected\def\unitsR #1#2{% todo: tagging
\ifmmode
#2%
- \orelse\ifnum#1=\plusone
+ \orelse\ifnum#1=\plusone % why this test if we do the same in both cases
\digitstextbinop{#2}% before and after
\else
- \digitstextbinnop{#2}% after
+ \digitstextbinop{#2}% after
\fi
\c_phys_units_state\zerocount
\setfalse\c_phys_units_dospace
@@ -682,7 +692,7 @@
\setfalse\c_phys_units_dospace
\phys_units_start}
-\permanent\protected\def\unitsTIMES % GP: Does this do anything? HH: yes "times"
+\permanent\protected\def\unitsTIMES % GP: Does this do anything? HH: yes "times"
{\ifnum\c_phys_units_state=\plusone % suffix
\else
\unitssmallspace
@@ -696,9 +706,16 @@
\fi
:}
+% \permanent\protected\def\unitsSOLIDUS
+% {\ifnum\c_phys_units_state=\plusone % suffix
+% \unitsbackspace
+% \fi
+% {/}%
+% }%\unitsbackspace}
+
\permanent\protected\def\unitsSOLIDUS
{\ifnum\c_phys_units_state=\plusone % suffix
- \unitsbackspace
+ \ifmmode\else\unitsbackspace\fi % we have advanced solidus handling in math
\fi
{/}%
}%\unitsbackspace}
@@ -737,9 +754,45 @@
%D cicero=cc]
%D \stoptyping
-\permanent\tolerant\protected\def\registerunit[#1]#*[#2]% todo: public implementer
- {\clf_registerunit{#1}{#2}}
+\permanent\tolerant\protected\def\registerunit [#1]#*[#2]{\clf_registerunit {#1}{#2}}
+\permanent\tolerant\protected\def\registerunitshortcut[#1]#*[#2]{\clf_registerunitshortcut{#1}{#2}}
+%D \starttyping
+%D \registerunit
+%D [unit]
+%D [Point=PT,
+%D point=pt,
+%D Basepoint=BP,
+%D % basepoint=bp,
+%D ]
+%D
+%D \registerunitshortcut
+%D [unit]
+%D [C=coulomb]
+%D
+%D \startlines
+%D 10 \unit {square meter per second}
+%D 10 \unit {square Meter per Second}
+%D 10 \unit {point}
+%D 10 \unit {Point}
+%D 10 \unit {basepoint}
+%D 10 \unit {Basepoint}
+%D 10 \unit {C}
+%D \stoplines
+%D
+%D \setupunit[unit][option=keep]
+%D
+%D \startlines
+%D 10 \unit {square meter per second}
+%D 10 \unit {square Meter per Second}
+%D 10 \unit {point}
+%D 10 \unit {Point}
+%D 10 \unit {basepoint}
+%D 10 \unit {Basepoint}
+%D 10 \unit {C}
+%D \stoplines
+%D \stoptyping
+
%D You can generate a list as follows:
%D
%D \starttyping
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/publ-ini.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/publ-ini.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/publ-ini.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -342,7 +342,7 @@
\newtoks\t_btx_cmd
\newbox \b_btx_cmd
-\t_btx_cmd{\global\setbox\b_btx_cmd\hpack{\clf_btxcmdstring}}
+\t_btx_cmd{\global\setbox\b_btx_cmd\hbox{\clf_btxcmdstring}} % no \hpack, otherwise prerolling --- doesn't work
\aliased\let\btxcmd\btxcommand
@@ -876,6 +876,7 @@
ignored {\btxrenderingparameter\c!ignore}%
group {\btxrenderingparameter\c!group}%
filter {\btxrenderingparameter\c!filter}%
+ filename {\btxrenderingparameter\c!file}% for now
\relax
\ifnum\nofbtxlistentries>\zerocount
\clf_btxpreparelistentries{\currentbtxdataset}% could be put in collect
@@ -1155,7 +1156,7 @@
{\the\t_btx_reference_inject
\strc_lists_inject_direct % todo: make like \btx_list_reference_inject_now with { }
[\s!btx]%
- [\c!type=\s!btx]% \c!location=\v!none
+ [\c!type=\s!btx,\c!location=\v!here]%
[\ifx\currentbtxdataset\v!default\else\s!btxset=\currentbtxdataset,\fi%
\s!btxref=\currentbtxtag,%
%\ifempty\currentbtxcombis \else\s!btxcom={\currentbtxcombis},\fi%
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/regi-ini.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/regi-ini.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/regi-ini.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,11 +6,8 @@
license = "see context related readme files"
}
---[[ldx--
-<p>Regimes take care of converting the input characters into
-<l n='utf'/> sequences. The conversion tables are loaded at
-runtime.</p>
---ldx]]--
+-- Regimes take care of converting the input characters into UTF sequences. The
+-- conversion tables are loaded at runtime.
local tostring = tostring
local utfchar = utf.char
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/scrn-fld.mklx
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/scrn-fld.mklx 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/scrn-fld.mklx 2023-05-06 22:03:57 UTC (rev 67034)
@@ -274,7 +274,7 @@
%D A few testing macros (expandable for historic reasons):
-\permanent\def\doifelsefieldbody #tag{\clf_doifelsefield{#tag}}
+\permanent\def\doifelsefieldbody #tag{\clf_doifelsefieldset{#tag}}
\permanent\def\doifelsefieldcategory#tag{\clf_doifelsefieldcategory{#tag}}
\aliased\let\doiffieldbodyelse \doifelsefieldbody
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/scrn-ref.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/scrn-ref.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/scrn-ref.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -51,7 +51,26 @@
end
end
-implement { name = "setopendocumentaction", arguments = "string", actions = references.setopendocumentaction }
-implement { name = "setclosedocumentaction", arguments = "string", actions = references.setclosedocumentaction }
-implement { name = "setopenpageaction", arguments = "string", actions = references.setopenpageaction }
-implement { name = "setclosepageaction", arguments = "string", actions = references.setclosepageaction }
+implement {
+ name = "setopendocumentaction",
+ arguments = "string",
+ actions = references.setopendocumentaction
+}
+
+implement {
+ name = "setclosedocumentaction",
+ arguments = "string",
+ actions = references.setclosedocumentaction
+}
+
+implement {
+ name = "setopenpageaction",
+ arguments = "string",
+ actions = references.setopenpageaction
+}
+
+implement {
+ name = "setclosepageaction",
+ arguments = "string",
+ actions = references.setclosepageaction
+}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/scrn-wid.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/scrn-wid.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/scrn-wid.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -42,8 +42,6 @@
local texsetbox = tex.setbox
-local jobpasses = job.passes
-
local texgetcount = tex.getcount
local codeinjections = backends.codeinjections
@@ -277,8 +275,25 @@
}
}
--- Linkedlists (only a context interface)
+-- Linkedlists (only a context interface) .. untested, just adapted from old code.
+local collected = allocate()
+local tobesaved = allocate()
+
+local linkedlists = {
+ collected = collected,
+ tobesaved = tobesaved,
+}
+
+job.linkedlists = linkedlists
+
+local function initializer()
+ collected = linkedlists.collected
+ tobesaved = linkedlists.tobesaved
+end
+
+job.register("job.linkedlists.collected", tobesaved, initializer, nil)
+
implement {
name = "definelinkedlist",
arguments = "string",
@@ -291,10 +306,12 @@
name = "enhancelinkedlist",
arguments = { "string", "integer" },
actions = function(tag,n)
- local ll = jobpasses.gettobesaved(tag)
- if ll then
- ll[n] = texgetcount("realpageno")
+ local linkedlist = tobesaved[tag]
+ if not linkedlist then
+ linkedlist = { }
+ tobesaved[tag] = linkedlist
end
+ linkedlist[n] = texgetcount("realpageno")
end
}
@@ -302,15 +319,18 @@
name = "addlinklistelement",
arguments = "string",
actions = function(tag)
- local tobesaved = jobpasses.gettobesaved(tag)
- local collected = jobpasses.getcollected(tag) or { }
+ local tobesaved = tobesaved[tag] or { }
+ local collected = collected[tag] or { }
local currentlink = #tobesaved + 1
local noflinks = #collected
- tobesaved[currentlink] = 0
+ --
+ tobesaved[currentlink] = 0 -- needs checking
+ --
local f = collected[1] or 0
local l = collected[noflinks] or 0
local p = collected[currentlink-1] or f
local n = collected[currentlink+1] or l
+ --
context.setlinkedlistproperties(currentlink,noflinks,f,p,n,l)
-- context.ctxlatelua(function() commands.enhancelinkedlist(tag,currentlink) end)
end
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/spac-ali.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/spac-ali.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/spac-ali.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -22,7 +22,8 @@
local getwidth = nuts.getwidth
local findtail = nuts.tail
-local righttoleft_code = nodes.dirvalues.righttoleft
+local righttoleft_code = tex.directioncodes.righttoleft
+
local linelist_code = nodes.listcodes.line
local hpack_nodes = nuts.hpack
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/spac-ali.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/spac-ali.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/spac-ali.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1325,4 +1325,17 @@
\permanent\protected\def\spaceorpar{\endgraf\ifhmode\space\fi}
+%D Kind of documenting:
+%D
+%D \starttyping
+%D \disabletrackers[builders.hpack.quality] % enabled by default
+%D \enabletrackers[builders.hpack.collect]
+%D \enabletrackers[builders.hpack.overflow]
+%D
+%D \starttext
+%D {\hsize 4cm \input tufte \par} \page
+%D {\hsize 8cm \input tufte \par} \page
+%D \stoptext
+%D \stoptyping
+
\protect \endinput
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/spac-hor.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/spac-hor.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/spac-hor.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -269,9 +269,15 @@
\aliased\let\dorechecknextindentation\relax % public (in macros)
-\permanent\protected\protected\def\spac_indentation_check_next_indentation
+% \permanent\protected\def\spac_indentation_check_next_indentation
+% {\global\enforced\let\dorechecknextindentation\relax
+% \doifelsenextchar\par\donothing\spac_indentation_variant_no} % messy check as next is seldom \par
+
+\permanent\protected\def\spac_indentation_check_next_indentation
{\global\enforced\let\dorechecknextindentation\relax
- \doifelsenextchar\par\donothing\spac_indentation_variant_no} % messy check as next is seldom \par
+ \begingroup
+ \autoparagraphmode\zerocount
+ \doifelsenextchar\par\endgroup{\endgroup\spac_indentation_variant_no}} % messy check as next is seldom \par
\def\spac_indentation_variant_auto
{\global\enforced\let\dorechecknextindentation\spac_indentation_check_next_indentation}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/spac-pag.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/spac-pag.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/spac-pag.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -16,7 +16,6 @@
\unprotect
\newif \ifpagestatemismatch
-\newinteger \realpagestateno
\newconstant\frozenpagestate
\permanent\protected\def\dotrackpagestate#1#2%
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/strc-doc.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/strc-doc.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/strc-doc.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -47,6 +47,7 @@
\mutable\lettonothing\currentstructurecomponentbookmark
\mutable\lettonothing\currentstructurecomponentcatcodes
\mutable\lettonothing\currentstructurecomponentcoding
+\mutable\lettonothing\currentstructurecomponentcounter
\mutable\lettonothing\currentstructurecomponentexpansion
\mutable\lettonothing\currentstructurecomponentlabel
\mutable\lettonothing\currentstructurecomponentlevel
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/strc-flt.mklx
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/strc-flt.mklx 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/strc-flt.mklx 2023-05-06 22:03:57 UTC (rev 67034)
@@ -531,9 +531,9 @@
\def\strc_floats_apply_caption_command
{\setbox\b_strc_floats_caption\hbox\bgroup
- %\unless\ifcstok{\floatcaptionparameter\c!command}\emptytoks
+ %\unless\iftok{\floatcaptionparameter\c!command}\emptytoks
\floatcaptionparameter\c!command{\box\b_strc_floats_caption}%
- %\orunless\ifcstok{\floatcaptionparameter\c!deeptextcommand}\emptytoks
+ %\orunless\iftok{\floatcaptionparameter\c!deeptextcommand}\emptytoks
% \floatcaptionparameter\c!deeptextcommand{\unvbox\b_strc_floats_caption}%
%\else
% \box\b_strc_floats_caption
@@ -742,7 +742,7 @@
\edef\p_location {\floatcaptionparameter\c!location}%
\edef\p_topoffset {\floatcaptionparameter\c!topoffset}%
\edef\p_bottomoffset{\floatcaptionparameter\c!bottomoffset}%
- \edef\P_freeregion {\floatcaptionparameter\c!freeregion}%
+ \edef\p_freeregion {\floatcaptionparameter\c!freeregion}%
% preset
\resetfloatcaptionparameter \c!location
\setexpandedfloatcaptionparameter\c!topoffset {\floatparameter\c!topoffset}%
@@ -778,7 +778,7 @@
\letfloatcaptionparameter\c!location \p_location
\letfloatcaptionparameter\c!topoffset \p_topoffset
\letfloatcaptionparameter\c!bottomoffset\p_bottomoffset
- \letfloatcaptionparameter\c!freeregion \P_freeregion
+ \letfloatcaptionparameter\c!freeregion \p_freeregion
%
\strc_floats_analyze_location
\doifelseinset\v!split\floatlocation\strc_floats_place_next_box_split\strc_floats_place_next_box_normal
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/strc-itm.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/strc-itm.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/strc-itm.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,21 +6,29 @@
license = "see context related readme files"
}
-local structures = structures
-local itemgroups = structures.itemgroups
-local jobpasses = job.passes
-
+local allocate = utilities.storage.allocate
local implement = interfaces.implement
-local setvariable = jobpasses.save
-local getvariable = jobpasses.getfield
-
local texsetcount = tex.setcount
local texsetdimen = tex.setdimen
-local f_stamp = string.formatters["itemgroup:%s:%s"]
-local counts = table.setmetatableindex("number")
+local itemgroups = structures.itemgroups
+local collected = allocate()
+local tobesaved = allocate()
+
+itemgroups.collected = collected
+itemgroups.tobesaved = tobesaved
+
+local function initializer()
+ collected = itemgroups.collected
+ tobesaved = itemgroups.tobesaved
+end
+
+if job then
+ job.register("structures.itemgroups.collected", tobesaved, initializer)
+end
+
local c_strc_itemgroups_max_items = tex.iscount("c_strc_itemgroups_max_items")
local d_strc_itemgroups_max_width = tex.isdimen("d_strc_itemgroups_max_width")
@@ -28,6 +36,8 @@
-- an itemgroup which in turn makes for less passes when one itemgroup
-- entry is added or removed.
+local counts = table.setmetatableindex("number")
+
local trialtypesetting = context.trialtypesetting
local function analyzeitemgroup(name,level)
@@ -36,16 +46,37 @@
n = n + 1
counts[name] = n
end
- local stamp = f_stamp(name,n)
- texsetcount(c_strc_itemgroups_max_items,getvariable(stamp,level,1,0))
- texsetdimen(d_strc_itemgroups_max_width,getvariable(stamp,level,2,0))
+ local items = 0
+ local width = 0
+ local itemgroup = collected[name]
+ if itemgroup then
+ local entry = itemgroup[n]
+ if entry then
+ local l = entry[level]
+ if l then
+ items = l[1] or 0
+ width = l[2] or 0
+ end
+ end
+ end
+ texsetcount(c_strc_itemgroups_max_items,items)
+ texsetdimen(d_strc_itemgroups_max_width,width)
end
local function registeritemgroup(name,level,nofitems,maxwidth)
local n = counts[name]
if not trialtypesetting() then
- -- no trialtypsetting
- setvariable(f_stamp(name,n), { nofitems, maxwidth }, level)
+ local itemgroup = tobesaved[name]
+ if not itemgroup then
+ itemgroup = { }
+ tobesaved[name] = itemgroup
+ end
+ local entry = itemgroup[n]
+ if not entry then
+ entry = { }
+ itemgroup[n] = entry
+ end
+ entry[level] = { nofitems, maxwidth }
elseif level == 1 then
counts[name] = n - 1
end
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/strc-itm.mklx
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/strc-itm.mklx 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/strc-itm.mklx 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1325,7 +1325,7 @@
\strc_itemgroups_stop_head_indeed
\strc_itemgroups_head_body_indeed}
-\protected\permanent\def\stopitemgrouphead
+\permanent\protected\def\stopitemgrouphead
{\dostoptagged
\stopitemgroupitem}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/strc-lst.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/strc-lst.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/strc-lst.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -37,7 +37,8 @@
local ctx_latelua = context.latelua
-local cheat = true
+----- cheat = true -- fragile when we have a multi-component document with cross references
+local cheat = false -- so this will become a directive or maybe even just an experiment
local structures = structures
local lists = structures.lists
@@ -259,28 +260,35 @@
numberdata.numbers = cached[groupindex].numberdata.numbers
end
end
- local setcomponent = references.setcomponent
- if setcomponent then
- setcomponent(t) -- can be inlined
- end
+ --
+-- local setcomponent = references.setcomponent
+-- if setcomponent then
+-- setcomponent(t) -- can be inlined, will be replaced by setstructure below
+-- end
+ --
local r = t.references
- if r and not r.section then
- r.section = structures.sections.currentid()
- end
- local b = r and t.block
- if r and not b then
- local s = r.section
- if s then
- s = structures.sections.tobesaved[s]
- r.block = s and s.block or nil
- end
- end
local i = r and r.internal or 0 -- brrr
- if r and kind and name then
- local tag = tags.getid(kind,name)
- if tag and tag ~= "?" then
- r.tag = tag -- todo: use internal ... is unique enough
+ if r then
+ if not r.section then
+ r.section = structures.sections.currentid()
end
+ if not r.structure then
+ r.structure = resolvers.jobs.currentstructure()
+ end
+ local b = r and t.block
+ if not b then
+ local s = r.section
+ if s then
+ s = structures.sections.tobesaved[s]
+ r.block = s and s.block or nil
+ end
+ end
+ if kind and name then
+ local tag = tags.getid(kind,name)
+ if tag and tag ~= "?" then
+ r.tag = tag -- todo: use internal ... is unique enough
+ end
+ end
end
local p = pushed[i]
if not p then
@@ -597,7 +605,7 @@
return result
end
-filters[v_reference] = function(specification)
+filters[v_reference] = function(specification) -- this will go away
local collected = specification.collected
local result = { }
local nofresult = 0
@@ -954,7 +962,6 @@
for i=1,#collected do
local v = collected[i]
local r = v.references
--- inspect(v)
if r and (not block or not r.block or pblock == r.block) then
local sectionnumber = sections[r.section]
if sectionnumber then
@@ -1016,10 +1023,9 @@
local references = listentry.references
local special = specials and numberdata and specials[zerostrippedconcat(numberdata.numbers,".")] or ""
local view = usedviews[i]
- -- if cheat and references then
- -- -- HH: I still need to test this patch:
+-- if cheat and references and cheats[view] then
if cheat and references and view and cheats[view] then
- -- this permits runs=2 with interactivity
+ -- this permits runs=2 with interactivity
local internal = references.internal
usedinternals[internal] = true
usedviews [internal] = references.view
@@ -1571,7 +1577,7 @@
function lists.integrate(utilitydata)
local filename = utilitydata.comment.file
- if filename then
+ if filename and filename ~= environment.jobname then
local structures = utilitydata.structures
if structures then
local lists = structures.lists.collected or { }
@@ -1591,6 +1597,12 @@
-- references.internal = nil
-- references.realpage = nil
-- references.section = nil
+ if references.view then
+ references.view = nil
+ end
+ if references.used then
+ references.used = nil
+ end
if references.x then
references.x = nil
end
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/strc-lst.mklx
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/strc-lst.mklx 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/strc-lst.mklx 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1257,8 +1257,8 @@
\noindent % otherwise annotations are mirrored up
\typo_injectors_mark_list
\hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute {
- \letlistparameter \c!depth\zeropoint
- \resettlistparameter\c!color
+ \letlistparameter \c!depth\zeropoint
+ \resetlistparameter\c!color
\inheritedlistframed {
\letinteractionparameter\c!strut\v!no % still needed?
\strc_lists_set_style_color\c!style\c!color\v!all
@@ -1498,7 +1498,8 @@
\ifcsname\??listinteractions\p_interaction_forward\endcsname
%\expandafter\let\expandafter\p_interaction_forward\csname\??listinteractions\p_interaction_forward\endcsname
\expandafter\let\expandafter\p_interaction_forward\lastnamedcs
- \ifcstok{\structurelistexternal}\emptytoks % luacall
+ %\ifcstok{\structurelistexternal}\emptytoks % luacall
+ \iftok{\structurelistexternal}\emptytoks % luacall
\strc_references_get_simple_reference{internal(\currentlistentrylocation)}%
\else
% \writestatus{FAR OUT LIST}{\structurelistexternal::page(\number\structurelistrealpagenumber)}%
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/strc-mar.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/strc-mar.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/strc-mar.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -109,7 +109,7 @@
}
implement {
- name = "getsynchronizedmarking",
+ name = "getsynchronizemarking",
arguments = { "integer", "string", "string" },
actions = function(class,category,what)
local category, n = lpegmatch(pattern,category)
@@ -136,7 +136,7 @@
}
implement {
- name = "resetsynchronizedmarking",
+ name = "resetsynchronizemarking",
arguments = "argument",
actions = function(category)
local category, n = lpegmatch(pattern,category)
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/strc-mar.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/strc-mar.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/strc-mar.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -169,7 +169,7 @@
\ifcstok{#2}\v!page
\markingcommand{#1}{\csname\??markingfilter#3\endcsname{#1}}%
\else
- \markingcommand{#1}{\clf_getsynchronizedmarking\begincsname\??markingclass#1\endcsname{#2}{#3}}%
+ \markingcommand{#1}{\clf_getsynchronizemarking\begincsname\??markingclass#1\endcsname{#2}{#3}}%
\fi
\orelse\ifparameter#2\or
\markingcommand{#1}{\csname\??markingfilter#2\endcsname{#1}}%
@@ -208,7 +208,7 @@
\ifcstok{#2}\v!page
\markingcommand{#1}{\begincsname\??markingfilter#3\endcsname{#1}}%
\else
- \markingcommand{#1}{\clf_getsynchronizedmarking{#1}{#2}}%
+ \markingcommand{#1}{\clf_getsynchronizemarking{#1}{#2}}%
\fi
\fi
\fi}
@@ -221,9 +221,9 @@
\markingseparator{#1}%
\markingcommand{#1}{\begincsname\??markingfilter\v!last\endcsname{#1}}%
\else
- \markingcommand{#1}{\clf_getsynchronizedmarking{#1}\v!first}%
+ \markingcommand{#1}{\clf_getsynchronizemarking{#1}\v!first}%
\markingseparator{#1}%
- \markingcommand{#1}{\clf_getsynchronizedmarking{#1}\v!last}%
+ \markingcommand{#1}{\clf_getsynchronizemarking{#1}\v!last}%
\fi
\fi
\fi}
@@ -240,9 +240,9 @@
\else
%\markingcommand{#1}{\begincsname\??markclass:\v!previous\endcsname{#1}}%
%\markingseparator{#1}%
- \markingcommand{#1}{\clf_getsynchronizedmarking{#1}\v!first}%
+ \markingcommand{#1}{\clf_getsynchronizemarking{#1}\v!first}%
\markingseparator{#1}%
- \markingcommand{#1}{\clf_getsynchronizedmarking{#1}\v!last}%
+ \markingcommand{#1}{\clf_getsynchronizemarking{#1}\v!last}%
\fi
\fi
\fi}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/strc-mat.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/strc-mat.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/strc-mat.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1035,6 +1035,28 @@
\boundary\c_bndr_mathalign
\fi}
+% \tolerant\protected\def\strc_math_skip_here[#1]%
+% {% no strut as it will influence fences
+% \ifconditional\c_strc_math_trace_hang
+% \strc_math_trace_okay{darkblue}{S #1}%
+% \fi
+% \scratchdimen\dimexpr\formulaparameter\c!textmargin\relax
+% \ifchkdim#1\or
+% \d_strc_math_hang_state#1%
+% \orelse\ifchknum#1\or
+% \d_strc_math_hang_state#1\scratchdimen
+% \orelse\iftok{#1}{+}%
+% \advanceby\d_strc_math_hang_state\scratchdimen
+% \orelse\iftok{#1}{-}%
+% \advanceby\d_strc_math_hang_state-\scratchdimen
+% \else
+% \d_strc_math_hang_state\scratchdimen
+% \fi
+% \kern\d_strc_math_hang_state
+% \strc_math_pickup_again}
+
+\newboundary\c_bndr_skiphere
+
\tolerant\protected\def\strc_math_skip_here[#1]%
{% no strut as it will influence fences
\ifconditional\c_strc_math_trace_hang
@@ -1052,6 +1074,7 @@
\else
\d_strc_math_hang_state\scratchdimen
\fi
+ \boundary\c_bndr_skiphere
\kern\d_strc_math_hang_state
\strc_math_pickup_again}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/strc-not.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/strc-not.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/strc-not.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -520,7 +520,7 @@
-- only notes, kind of hardcoded .. bah
-callback.register("build_page_insert", function(index,slot)
+local function action(index,slot)
local state = notes.numbers[index]
if state then
return tonode(newgluespec(check_spacing(index,slot)))
@@ -527,4 +527,6 @@
else
return tonode(newgluespec())
end
-end)
+end
+
+callbacks.register("build_page_insert",action,"check spacing around inserts")
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/strc-ref.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/strc-ref.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/strc-ref.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -30,6 +30,7 @@
local trace_analyzing = false trackers.register("structures.referencing.analyzing", function(v) trace_analyzing = v end)
local trace_identifying = false trackers.register("structures.referencing.identifying", function(v) trace_identifying = v end)
local trace_importing = false trackers.register("structures.referencing.importing", function(v) trace_importing = v end)
+local trace_external = false trackers.register("structures.referencing.external", function(v) trace_external = v end)
local trace_empty = false trackers.register("structures.referencing.empty", function(v) trace_empty = v end)
local check_duplicates = true
@@ -39,6 +40,7 @@
local report_references = logs.reporter("references")
local report_identifying = logs.reporter("references","identifying")
local report_importing = logs.reporter("references","importing")
+local report_external = logs.reporter("references","external")
local report_empty = logs.reporter("references","empty")
local report = report_references
@@ -174,6 +176,11 @@
if i then
internals[i] = data
usedinternals[i] = r.used
+ local structure = r.structure
+ if structure then
+ structure = resolvers.jobs.namelist(structure,namestack)
+ r.namestack = structure
+ end
end
end
end
@@ -347,34 +354,45 @@
return orders[kind] and orders[kind][name] or lastorder
end
-local function setcomponent(data)
- -- we might consider doing this at the tex end, just like prefix
- local component = productcomponent()
- if component then
- local references = data and data.references
- if references then
- references.component = component
- if references.prefix == component then
- references.prefix = nil
- end
- end
- return component
- end
- -- but for the moment we do it here (experiment)
-end
+-- local function setstructure(data)
+-- local structure = resolvers.jobs.currentnamehash()
+-- if structure then
+-- local references = data and data.references
+-- if references then
+-- references.structure = structure
+-- end
+-- end
+-- end
+-- local function setcomponent(data)
+-- -- we might consider doing this at the tex end, just like prefix
+-- local component = productcomponent() -- todo: maybe a list
+-- -- local component = resolvers.jobs.currentcomponent()
+-- if component then
+-- local references = data and data.references
+-- if references then
+-- references.component = component
+-- if references.prefix == component then
+-- references.prefix = nil
+-- end
+-- end
+-- return component
+-- end
+-- end
+
references.setnextorder = setnextorder
references.setnextinternal = setnextinternal
references.currentorder = currentorder
-references.setcomponent = setcomponent
+references.setstructure = resolvers.jobs.currentstructure -- yes or no here
+----------.setcomponent = setcomponent
+implement {
+ name = "setnextreferenceorder", -- used in strc-enu
+ actions = setnextorder,
+ arguments = "2 strings",
+}
+
-- implement {
--- name = "setnextreferenceorder",
--- actions = setnextorder,
--- arguments = "2 strings",
--- }
---
--- implement {
-- name = "currentreferenceorder",
-- actions = { currentorder, context },
-- arguments = "2 strings",
@@ -405,6 +423,9 @@
-- report_references("invalid reference") -- harmless
return 0
end
+ --
+ references.structure = resolvers.jobs.currentstructure()
+ --
local prefix = references.prefix or ""
local pd = tobesaved[prefix] -- nicer is a metatable
if not pd then
@@ -497,31 +518,82 @@
-- no metatable here .. better be sparse
-local function register_from_list(collected,derived,external)
+local function register_from_list(collected,derived,external,namestack)
local derived_g = derived[""] -- global
local derived_p = nil
local derived_c = nil
local prefix = nil
- local component = nil
+-- local component = nil
local entry = nil
if not derived_g then
derived_g = { }
derived[""] = derived_g
end
- local function action(s)
- if trace_referencing then
- report_references("list entry %a provides %a reference %a on realpage %a",i,kind,s,realpage)
+ local action = trace_external and
+ function(s)
+ if structure then
+ for i=1,#structure do
+ local si = structure[i]
+ -- if si == component then
+ -- -- skipped
+ -- elseif si == prefix then
+ -- -- skipped
+ -- else
+ local ds = derived[si]
+ if not ds then
+ derived[si] = { [s] = entry }
+ report_external("reference %a, %s %a",s,"structure",si)
+ elseif not ds[s] then
+ ds[s] = entry
+ report_external("reference %a, %s %a",s,"structure",si)
+ end
+ -- end
+ end
+ end
+ if derived_p and not derived_p[s] then
+ report_external("reference %a, %s %a",s,"prefix",prefix)
+ derived_p[s] = entry
+
+ end
+-- if derived_c and not derived_c[s] then
+-- report_external("reference %a, %s %a",s,"component",component)
+-- derived_c[s] = entry
+-- end
+ if not derived_g[s] then
+ report_external("reference %a, %s %a",s,"global","")
+ derived_g[s] = entry -- first wins
+ end
end
- if derived_p and not derived_p[s] then
- derived_p[s] = entry
+ or
+ function(s)
+ if derived_p and not derived_p[s] then
+ derived_p[s] = entry
+ end
+-- if derived_c and not derived_c[s] then
+-- derived_c[s] = entry
+-- end
+ if not derived_g[s] then
+ derived_g[s] = entry -- first wins
+ end
+ if structure then
+ for i=1,#structure do
+ local si = structure[i]
+ if si == component then
+ -- skipped
+ elseif si == prefix then
+ -- skipped
+ else
+ local ds = derived[si]
+ if not ds then
+ derived[si] = { [s] = entry }
+ elseif not ds[s] then
+ ds[s] = entry
+ end
+ end
+ end
+ end
end
- if derived_c and not derived_c[s] then
- derived_c[s] = entry
- end
- if not derived_g[s] then
- derived_g[s] = entry -- first wins
- end
- end
+ --
for i=1,#collected do
entry = collected[i]
local metadata = entry.metadata
@@ -535,7 +607,7 @@
local realpage = references.realpage
if realpage then
prefix = references.prefix
- component = references.component
+-- component = references.component
if prefix and prefix ~= "" then
derived_p = derived[prefix]
if not derived_p then
@@ -542,14 +614,26 @@
derived_p = { }
derived[prefix] = derived_p
end
+ else
+ derived_p = nil
end
- if component and component ~= "" and component ~= prefix then
- derived_c = derived[component]
- if not derived_c then
- derived_c = { }
- derived[component] = derived_c
- end
+-- if component and component ~= "" and component ~= prefix then
+-- derived_c = derived[component]
+-- if not derived_c then
+-- derived_c = { }
+-- derived[component] = derived_c
+-- end
+-- else
+-- derived_c = nil
+-- end
+ structure = references.structure
+ if structure then
+ structure = resolvers.jobs.namelist(structure,namestack)
+ references.namestack = structure
end
+ if trace_referencing or trace_external then
+ report_references("list entry %a provides %a reference %a on realpage %a",i,kind,reference,realpage)
+ end
process_settings(reference,action)
end
end
@@ -561,13 +645,13 @@
function references.integrate(utilitydata)
local filename = utilitydata.comment.file
- if filename then
+ if filename and filename ~= environment.jobname then
-- lists are already internalized
local structures = utilitydata.structures
if structures then
local lists = structures.lists.collected
if lists then
- register_from_list(lists,derived,filename)
+ register_from_list(lists,derived,filename,utilitydata)
end
end
end
@@ -575,7 +659,7 @@
references.registerinitializer(function()
-- the main document
- register_from_list(lists.collected,derived)
+ register_from_list(lists.collected,derived) -- false, false
end)
-- tracing
@@ -652,10 +736,10 @@
-- urls
-local urls = references.urls or { }
-references.urls = urls
-local urldata = urls.data or { }
-urls.data = urldata
+local urls = references.urls or { }
+references.urls = urls
+local urldata = urls.data or { }
+urls.data = urldata
local p_untexurl = Cs ( (
P("\\")/"" * (P("%")/"%%" + P(1))
@@ -1097,13 +1181,6 @@
target = { }
external[prefix] = target
end
- -- for s in gmatch(reference,"%s*([^,]+)") do
- -- if trace_importing then
- -- report_importing("registering %s reference, kind %a, name %a, prefix %a, reference %a",
- -- "external",kind,name,prefix,s)
- -- end
- -- target[s] = target[s] or entry
- -- end
local function action(s)
if trace_importing then
report_importing("registering %s reference, kind %a, name %a, prefix %a, reference %a",
@@ -1147,7 +1224,7 @@
return false
end)
-local productdata = allocate {
+local productdata = allocate { -- will go
productreferences = { },
componentreferences = { },
components = { },
@@ -1196,6 +1273,13 @@
if kind and realpage then
local prefix = references.prefix or ""
local component = references.component
+
+ -- local structure = references.structure
+ -- print("!!!!!!!!",structure)
+ -- if structure then
+ -- inspect(resolvers.job.namelist(structure))
+ -- end
+
local ctarget, ptarget
if not component or component == componentname then
-- skip
@@ -1327,7 +1411,7 @@
loadproductvariables (product,component,utilitydata)
loadproductcomponents(product,component,utilitydata)
loadproductreferences(product,component,utilitydata)
--- loadproductcomponents(product,component,utilitydata)
+ -- loadproductcomponents(product,component,utilitydata)
end
end
end
@@ -1483,11 +1567,20 @@
-- foo:bar -> foo == prefix (first we try the global one)
-- -:bar -> ignore prefix
-local function finish_inner(var,p,i)
- var.kind = "inner"
+local function finish_inner(set,var,p,i)
+ local external = i.references.external
+ local realpage = (i.references and i.references.realpage) or (i.pagedata and i.pagedata.realpage) or 1
+ if external then
+ var.kind = "outer with inner"
+ var.external = true
+ var.outer = external
+ set.external = true -- probably not needed
+ else
+ var.kind = "inner"
+ var.p = p
+ end
+ var.r = realpage
var.i = i
- var.p = p
- var.r = (i.references and i.references.realpage) or (i.pagedata and i.pagedata.realpage) or 1
return var
end
@@ -1506,7 +1599,7 @@
if i then
i = i[splitinner]
if i then
- return finish_inner(var,"",i)
+ return finish_inner(set,var,"",i)
end
end
end
@@ -1514,7 +1607,7 @@
if i then
i = i[splitinner]
if i then
- return finish_inner(var,splitprefix,i)
+ return finish_inner(set,var,splitprefix,i)
end
end
if derived then
@@ -1522,11 +1615,13 @@
-- using the prefix that is active at this moment (so we overload the given
-- these are taken from other data structures (like lists)
if splitprefix == "-" then
+-- loop over the current structure list reversed
+-- and end with "" .. needs example
local i = derived[""]
if i then
i = i[splitinner]
if i then
- return finish_inner(var,"",i)
+ return finish_inner(set,var,"",i)
end
end
end
@@ -1534,7 +1629,7 @@
if i then
i = i[splitinner]
if i then
- return finish_inner(var,splitprefix,i)
+ return finish_inner(set,var,splitprefix,i)
end
end
end
@@ -1545,7 +1640,7 @@
if i then
i = i[inner]
if i then
- return finish_inner(var,prefix,i)
+ return finish_inner(set,var,prefix,i)
end
end
if not i and derived then
@@ -1554,9 +1649,24 @@
if i then
i = i[inner]
if i then
- return finish_inner(var,prefix,i)
+ return finish_inner(set,var,prefix,i)
end
end
+ --
+ local n, list = resolvers.jobs.currentstructure()
+ if list then
+ for i=#list,1,-1 do
+ local l = list[i]
+ local i = derived[l]
+ if i then
+ i = i[inner]
+ if i then
+ -- return finish_inner(set,var,"",i)
+ return finish_inner(set,var,l,i)
+ end
+ end
+ end
+ end
end
return false
end
@@ -1571,10 +1681,7 @@
(derived and derived [""] and derived [""][inner]) or
(tobesaved and tobesaved[""] and tobesaved[""][inner])
if i then
- var.kind = "inner"
- var.p = ""
- var.i = i
- var.r = (i.references and i.references.realpage) or (i.pagedata and i.pagedata.realpage) or 1
+ finish_inner(set,var,"",i)
else
var.error = "unknown inner or special"
end
@@ -1611,13 +1718,13 @@
end
end
-- escape from prefix
--- local pdata = odata[""]
--- if pdata then
--- local r = pdata[inner]
--- if r then
--- return okay(o,"2h")
--- end
--- end
+ -- local pdata = odata[""]
+ -- if pdata then
+ -- local r = pdata[inner]
+ -- if r then
+ -- return okay(o,"2h")
+ -- end
+ -- end
else
for p, pdata in sortedhash(odata) do
local r = pdata[inner]
@@ -1765,7 +1872,6 @@
local function identify_inner_or_outer(set,var,i)
-- here we fall back on product data
local inner = var.inner
-
if inner and inner ~= "" then
-- first we look up in collected and derived using the current prefix
@@ -1780,7 +1886,8 @@
return v
end
- if var.inner == var.reference and identify_auto(set,var,i) and var.outer and var.outer ~= "" then
+-- if var.inner == var.reference and identify_auto(set,var,i) and var.outer and var.outer ~= "" then
+ if var.inner == var.reference and var.outer and var.outer ~= "" then
return identify_outer(set,var,i)
end
@@ -1804,7 +1911,6 @@
end
-- as a last resort we will consult the global lists
-
local v = unprefixed_inner(set,var,"",collected,derived,tobesaved)
if v then
if trace_identifying then
@@ -1873,6 +1979,7 @@
end
end
end
+
var.error = "unknown inner"
else
var.error = "no inner"
@@ -1896,40 +2003,51 @@
return var
end
+local function identify_outer_component_step(set,var,vi,i,component,where)
+ if vi then
+ var.outer = component
+ var.i = vi
+ var.kind = "outer with inner"
+ set.external = true
+ if trace_identifying then
+ report_identify_outer(set,var,i,where)
+ end
+ return true
+ end
+end
+
local function identify_outer_component(set,var,i)
local component = var.component
- local inner = var.inner
+ local inner = var.inner
+ --
local data = productdata.componentreferences[component]
if data then
local d = data[""]
- local vi = d and d[inner]
- if vi then
- var.inner = inner
- var.outer = component
- var.i = vi
- var.kind = "outer with inner"
- set.external = true
- if trace_identifying then
- report_identify_outer(set,var,i,"6a")
- end
+ local d = d and d[inner]
+ if d and identify_outer_component_step(set,var,d,i,component,"6a") then
return var
end
end
+ --
local data = productdata.productreferences[component]
if data then
- local vi = data[inner]
- if vi then
- var.inner = inner
- var.outer = component
- var.i = vi
- var.kind = "outer with inner"
- set.external = true
- if trace_identifying then
- report_identify_outer(set,var,i,"6b")
- end
+ local d = data[inner]
+ if d and identify_outer_component_step(set,var,d,i,component,"6b") then
return var
end
end
+ --
+if texconditionals.autocrossfilereferences then
+ references.loadpresets(component,component)
+ local data = productdata.productreferences[component]
+ if data then
+ local d = data[inner]
+ if d and identify_outer_component_step(set,var,d,i,component,"6c") then
+ return var
+ end
+ end
+end
+ --
var.error = "unknown component"
if trace_identifying then
report_identify_outer(set,var,i,"6c")
@@ -1962,6 +2080,8 @@
var = identify_outer(set,var,i)
elseif var.arguments then
var = identify_arguments(set,var,i)
+-- else
+-- var = identify_inner_or_outer(set,var,i)
elseif not var.component then
var = identify_inner_or_outer(set,var,i)
elseif productcomponent() then
@@ -2364,6 +2484,7 @@
if data then
if name == "realpage" then
local cs = references.analyze() -- normally already analyzed but also sets state
+ -- or just get from references.realpage when present
context(tonumber(cs.realpage) or 0)
else -- assumes data is table
local kind = false
@@ -2399,6 +2520,26 @@
return filterreference("default",getcurrentprefixspec("default"))
end
+local function getreferencesectionnumber(reference)
+ if references.valid("",reference,{},false) then
+ local data = currentreference and currentreference.i
+ if type(data) == "table" then
+ local metadata = data.metadata
+ if metadata and metadata.kind == "section" then
+ local numberdata = data.numberdata
+ if numberdata then
+ numberdata = numberdata.numbers
+ context(numberdata[#numberdata] or 0)
+ return
+ end
+ end
+ elseif trace_referencing then
+ report_references("name %a, no reference",reference)
+ end
+ end
+ context(0)
+end
+
references.filter = filterreference
references.filterdefault = filterreferencedefault
@@ -2418,6 +2559,13 @@
}
}
+implement {
+ name = "getreferencesectionnumber",
+ actions = getreferencesectionnumber,
+ arguments = "string",
+ public = true,
+}
+
function genericfilters.title(data)
if data then
local titledata = data.titledata or data.useddata
@@ -2691,6 +2839,7 @@
actions.pagestate = checkedpagestate(actions.n,realpage,actions,position,spread)
end
end
+-- inspect(actions)
return actions
end
@@ -2698,6 +2847,8 @@
local actions = references.currentset
if not actions then
return 0
+ elseif actions.external then
+ return 0
else
local pagestate = actions.pagestate
for i=1,#actions do
@@ -3067,3 +3218,32 @@
name = "popreferenceprefix",
actions = { popreferenceprefix, context }, -- we can use setmacro
}
+
+-- a bit weird one, used for checkinh in the backend
+
+function references.pagefromhash(hash,destination,page,actions)
+ local r = actions[1]
+ if type(r) == "table" then
+ r = r.i
+ if r then
+ r = r.references
+ if r then
+ local structure = r.structure
+ if structure then
+ local namestack = r.namestack
+ if namestack then
+ for i=#namestack,1,-1 do
+ local d = namestack[i] .. ":" .. destination
+ page = hash[d]
+ if page then
+ destination = d
+ break
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ return page, destination
+end
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/strc-ref.mklx
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/strc-ref.mklx 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/strc-ref.mklx 2023-05-06 22:03:57 UTC (rev 67034)
@@ -994,6 +994,8 @@
\aliased\let\from \strc_references_from
\to \everydump
+% can be defined visible at lua end
+
\permanent \def\filterreference #key{\clf_filterreference{#key}} % no checking, expandable
\permanent\protected\def\getreferenceentry#key{\clf_filterreference{#key}} % no checking, not expandable
@@ -1005,7 +1007,6 @@
\permanent\def\currentreferencerealpage{\clf_filterreference{realpage}}
\aliased \let\currentreferenceorder \getinternalorderreference
-
%D The most straightforward way of retrieving references is using \type {\ref}.
\permanent\tolerant\protected\def\getreference[#key]#spacer[#label]% #key = number page title text default realpage ...
@@ -1017,6 +1018,25 @@
\aliased\let\ref\getreference
+% setnumber-001.tex
+%
+% \starttext
+% \chapter[one]{One} see setnumber-002
+% \chapter[two]{Two} see setnumber-002
+% \stoptext
+%
+% setnumber-002.tex
+%
+% \setupreferencing[autofile=yes]
+% \useexternaldocument[foo] [setnumber-001] [{TEST 1}]
+% \setupheadnumber[chapter][\getreferencesectionnumber{foo::two}]
+% \starttext
+% \chapter[three]{Three} from setnumber-001, one: \getreferencesectionnumber{foo::one}\par
+% \chapter[four] {Four} from setnumber-001, two: \getreferencesectionnumber{foo::two}\par
+% \stoptext
+%
+% \getreferencesectionnumber{reference} : defined at the lua end
+
%D Special cases:
\permanent\protected\def\strc_references_about[#label]%
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/strc-reg.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/strc-reg.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/strc-reg.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -536,7 +536,13 @@
end
local seeword = rawdata.seeword
if seeword then
- seeword.processor, seeword.text = splitprocessor(seeword.text or "")
+ local text = seeword.text or ""
+ local sp, st = splitprocessor(text)
+ seeword.text = text
+ -- seeword.list = lpegmatch(coding == "xml" and entrysplitter_xml or entrysplitter_tex,st)
+ if sp then
+ seeword.processor = sp
+ end
end
end
@@ -585,8 +591,10 @@
rawdata.userdata = touserdata(userdata)
end
--
- references.section = currentid()
- metadata.level = currentlevel()
+ references.block = structures.sections.currentblock()
+ references.structure = resolvers.jobs.currentstructure()
+ references.section = currentid()
+ metadata.level = currentlevel()
--
local data = notsaved and collected[name] or tobesaved[name]
local entries = data.entries
@@ -1045,6 +1053,7 @@
filename = filename,
data = job.loadother(filename),
prefix = prefix or class,
+ label = prefix or class,
}
end
@@ -1054,13 +1063,43 @@
actions = registers.use,
}
+-- function registers.use(tag,specification)
+-- local class = specification.class
+-- local filename = specification.filename
+-- local prefix = specification.prefix or class
+-- local label = specification.label or prefix
+-- if class and filename then
+-- used[tag] = {
+-- class = class,
+-- filename = filename,
+-- data = job.loadother(filename),
+-- prefix = prefix,
+-- label = label,
+-- }
+-- end
+-- end
+
+-- implement {
+-- name = "useregister",
+-- actions = registers.use,
+-- arguments = {
+-- "string",
+-- {
+-- { "filename" },
+-- { "class" },
+-- { "prefix" },
+-- { "label" },
+-- },
+-- }
+-- }
+
implement {
- name = "registerprefix",
+ name = "registerlabel",
arguments = "string",
actions = function(tag)
local u = used[tag]
if u then
- context(u.prefix)
+ context(u.label)
end
end
}
@@ -1075,8 +1114,14 @@
local list = utilities.parsers.settings_to_array(class)
local entries = { }
local nofentries = 0
- local metadata = false
+ local multiple = false
for i=1,#list do
+ if used[list[i]] then
+ multiple = true
+ break
+ end
+ end
+ for i=1,#list do
local l = list[i]
local u = used[l]
local d = collected[l]
@@ -1089,16 +1134,26 @@
end
if d then
local e = d.entries
- local u = u and { u.prefix } or nil
+-- local u = u and { u.prefix } or nil
+local u = multiple and { string.formatters["%03i"](i) } or nil -- maybe prefix but then how about main
for i=1,#e do
+ -- see has no pagedata
local ei = e[i]
+ local external = ei.external
+if multiple and ei.metadata.kind == "see" and external then
+ -- too messy, could be an option but useless
+else
+
nofentries = nofentries + 1
entries[nofentries] = ei
if u then
local eil = ei.list
eil[#eil+1] = u
+if external then
ei.external = l -- this is the (current) abstract tag, used for prefix
+end
end
+end
end
if not metadata then
metadata = d.metadata
@@ -1107,9 +1162,11 @@
end
data = {
metadata = metadata or { },
+ multiple = multiple,
entries = entries,
}
collected[class] = data
+ options.multiple = multiple
end
if data and data.entries then
options = options or { }
@@ -1322,7 +1379,9 @@
-- report_registers("invalid see entry in register %a, reference %a",entry.metadata.name,list[1][1])
end
end
- if entry.external then
+-- move up ?
+-- if entry.external then
+ if options.multiple or entry.external then
local list = entry.list
list[#list] = nil
end
@@ -1538,6 +1597,10 @@
local seetext = seeword.text or ""
local processor = seeword.processor or (entry.processors and entry.processors[1]) or ""
local seeindex = entry.external or entry.references.seeindex or ""
+ local seelist = lpegmatch(coding == "xml" and entrysplitter_xml or entrysplitter_tex,seetext)
+ if #seelist > 1 then
+ seetext = concat(seelist,", ")
+ end
ctx_registerseeword(
metadata.name or "",
i,
@@ -1741,7 +1804,7 @@
function registers.integrate(utilitydata)
local filename = utilitydata.comment.file
- if filename then
+ if filename and filename ~= environment.jobname then
local structures = utilitydata.structures
if structures then
local registers = structures.registers.collected or { }
@@ -1772,6 +1835,7 @@
end
references.external = filename -- not really needed
end
+ entry.external = true
end
end
end
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/strc-reg.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/strc-reg.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/strc-reg.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -155,16 +155,17 @@
\mutable\lettonothing\currentregisternumber
\mutable\lettonothing\currentregisterownnumber
\mutable\lettonothing\currentregisterpageindex
+\mutable\lettonothing\currentregisterpageprefix
\mutable\lettonothing\currentregisterpagesymbol
+\mutable\lettonothing\currentregisterprocessors
+\mutable\lettonothing\currentregisterprocessorsa
+\mutable\lettonothing\currentregisterprocessorsb
+\mutable\lettonothing\currentregisterprocessorsc
\mutable\lettonothing\currentregistersectionindex
\mutable\lettonothing\currentregisterseeindex
\mutable\lettonothing\currentregisterseeword
\mutable\lettonothing\currentregistersynchronize
\mutable\lettonothing\currentregisterxmlsetup
-\mutable\lettonothing\currentregisterprocessors
-\mutable\lettonothing\currentregisterprocessorsa
-\mutable\lettonothing\currentregisterprocessorsb
-\mutable\lettonothing\currentregisterprocessorsc
\newconditional\c_strc_registers_defining
\setnewconstant\c_strc_registers_maxlevel \plusfive
@@ -792,6 +793,25 @@
{\doifelsefiledefined{#1}{}{\usefile[#1][#2]}%
\clf_useregister{#1}{#2}{#3}{#4}}
+% \permanent\protected\tolerant\def\useregister[#1]#*[#2]#*[#3]#*[#4]% tag file class prefix
+% {\begingroup
+% \doifelsefiledefined{#1}{}{\usefile[#1][#2]}%
+% \ifhastok={#4}%
+% \getdummyparameters[\c!prefix=#1,\c!label=#1,#4]%
+% \else
+% \getdummyparameters[\c!prefix=#4,\c!label=#4]%
+% \fi
+% \clf_useregister
+% {#1}
+% {
+% filename {#2}
+% class {#3}
+% prefix {\dummyparameter\c!prefix}
+% label {\dummyparameter\c!label}
+% }
+% \relax
+% \endgroup}
+
%D Character rendering (sections):
\installcorenamespace{registerindicator}
@@ -975,6 +995,8 @@
\setfalse\settrue\c_strc_registers_vertical
\to \everysetupregister
+\mutable\lettonothing\currentnestedregister
+
\permanent\protected\def\usenestedregisterstyleandcolor#1#2% will change
{\useregisterstyleandcolor#1#2%
% how about style
@@ -1123,8 +1145,9 @@
% todo: adapt \strc_references_goto_internal to take an extra argument, the ref
\permanent\protected\def\withregisterpagecommand#1#2#3#4% #1:processor #2:internal #3:realpage #4:page
- {\ifcase#3\relax
- {\tt [entry\space not\space flushed]}%
+ {\begingroup
+ \ifcase#3\relax
+ \tt [entry\space not\space flushed]%
\else
\def\currentregisterpageindex{#2}%
\def\currentregisterrealpage{#3}%
@@ -1131,7 +1154,7 @@
\ifchknum\currentregisterpageindex\or
\lettonothing\currentregisterpageprefix
\else
- \def\currentregisterpageprefix{\clf_registerprefix{\currentregisterpageindex}}%
+ \def\currentregisterpageprefix{\clf_registerlabel{\currentregisterpageindex}}%
\fi
\iflocation
\ifempty\currentregisterpageprefix
@@ -1144,7 +1167,8 @@
\setlocationattributes
\fi
\applyprocessor{#1}{\currentregisterpageprefix\registerparameter\c!pagecommand{#4}}%
- \fi}
+ \fi
+ \endgroup}
\lettonothing\m_current_register
@@ -1281,7 +1305,7 @@
\ifchknum\currentregisterseeindex\or
\lettonothing\currentregisterpageprefix
\else
- \def\currentregisterpageprefix{\clf_registerprefix{\currentregisterseeindex}}%
+ \def\currentregisterpageprefix{\clf_registerlabel{\currentregisterseeindex}}%
\fi
\iflocation
\ifempty\currentregisterpageprefix
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/strc-sec.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/strc-sec.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/strc-sec.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -704,7 +704,8 @@
\ifcsname\??headincrement\currentheadincrement\endcsname
\lastnamedcs
\else
- \settrue \c_strc_sectioning_increment\settrue \c_strc_sectioning_to_list
+ \settrue\c_strc_sectioning_increment
+ \settrue\c_strc_sectioning_to_list
% \filterheadnumber
\fi}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/strc-syn.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/strc-syn.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/strc-syn.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -266,6 +266,7 @@
\mutable\lettonothing\currentsynonym
\mutable\lettonothing\currentsynonymtag
\mutable\lettonothing\currentsynonymtext
+\mutable\lettonothing\currentsynonymsortkey
\permanent\tolerant\protected\def\definesynonyms[#1]#*[#2]#*[#3]#*[#4]% name plural \meaning \use
{\ifnum\lastarguments=\plusfour
@@ -626,7 +627,6 @@
\permanent\protected\def\currentsortingname {\clf_synonymname\currentsimplelist\currentsortingtag}
\permanent\protected\def\currentsortingpages {\clf_synonympages\currentsimplelist\currentsortingtag}
\permanent\protected\def\doifelsecurrentsortingused {\clf_doifelsesynonymused\currentsimplelist\currentsortingtag}
-\permanent\protected\def\resetusedsortings [#1]{\clf_resetusedsynonyms{#1}}
\permanent\protected\def\sortingname [#1]#*[#2]{\clf_synonymname {#1}{#2}}
\permanent\protected\def\sortingpages[#1]#*[#2]{\clf_synonympages{#1}{#2}}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/supp-box.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/supp-box.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/supp-box.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -481,9 +481,9 @@
do
- local dirvalues = nodes.dirvalues
- local lefttoright_code = dirvalues.lefttoright
- local righttoleft_code = dirvalues.righttoleft
+ local directioncodes = tex.directioncodes
+ local lefttoright_code = directioncodes.lefttoright
+ local righttoleft_code = directioncodes.righttoleft
local function firstdirinbox(n)
local b = getbox(n)
@@ -1395,6 +1395,8 @@
actions = boxlinecount,
}
+ -- todoL: just inline so that s-system-macros can find them
+
define_one("boxline", "get")
define_one("setboxline", "set")
define_one("copyboxline", "copy")
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/symb-emj.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/symb-emj.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/symb-emj.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -6,8 +6,6 @@
license = "see context related readme files"
}
--- processors.hpack_filter does it all
-
local symbols = fonts.symbols
local resolvedemoji = characters.emoji.resolve
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/syst-aux.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/syst-aux.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/syst-aux.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -587,7 +587,7 @@
% or (test this):
%
% \permanent\protected\def\processallactionsinset[#1]%
-% {\ifcstok{#1}\emptytoks
+% {\iftok{#1}\emptytoks
% \expandafter\processaction
% \else
% \expandafter\syst_helpers_process_all_actions_in_set_indeed
@@ -6854,6 +6854,8 @@
%D
%D \typebuffer \startpacked \getbuffer \stoppacked
+\lettonothing\syst_helpers_wipe_tokens_yes
+
\def\syst_helpers_wipe_tokens_nop#-^^04{}%
\permanent\def\wipetokens#1#2%
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/syst-ini.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/syst-ini.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/syst-ini.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -322,6 +322,7 @@
\permanent\countdef\c_syst_max_allocated_toks = 216 \c_syst_max_allocated_toks = \directlua{tex.write(tex.magicconstants.max_toks_register_index)} % idem
\permanent\countdef\c_syst_max_allocated_read = 217 \c_syst_max_allocated_read = \c_syst_max_allocated_iohandle
\permanent\countdef\c_syst_max_allocated_write = 218 \c_syst_max_allocated_write = \c_syst_max_allocated_iohandle
+\permanent\countdef\c_syst_max_allocated_float = 220 \c_syst_max_allocated_float = \directlua{tex.write(tex.magicconstants.max_float_register_index or 0)} % idem
\permanent\countdef\c_syst_last_allocated_count = 221 \c_syst_last_allocated_count = \c_syst_min_allocated_register
\permanent\countdef\c_syst_last_allocated_dimen = 222 \c_syst_last_allocated_dimen = \c_syst_min_allocated_register
@@ -332,6 +333,7 @@
\permanent\countdef\c_syst_last_allocated_read = 227 \c_syst_last_allocated_read = \c_syst_min_allocated_iohandle
\permanent\countdef\c_syst_last_allocated_write = 228 \c_syst_last_allocated_write = \c_syst_min_allocated_iohandle
\permanent\countdef\c_syst_last_allocated_marks = 229 \c_syst_last_allocated_marks = \c_syst_min_allocated_mark
+\permanent\countdef\c_syst_last_allocated_float = 230 \c_syst_last_allocated_float = \c_syst_min_allocated_register
\permanent\countdef\c_syst_min_counter_value = 253 \c_syst_min_counter_value = -"7FFFFFFF
\permanent\countdef\c_syst_max_counter_value = 254 \c_syst_max_counter_value = "7FFFFFFF
@@ -358,6 +360,7 @@
\permanent\protected\def\newdimension #1{\dimensiondef #1\zeropoint}
\permanent\protected\def\newgluespec #1{\gluespecdef #1\zeropoint}
\permanent\protected\def\newmugluespec#1{\mugluespecdef#1\zeropoint}
+\permanent\protected\def\newposit #1{\positdef #1\zerocount}
%D The aliasing here is tricky: we need to make sure the alias is not let to the
%D current value but behaves dynamic. Instead we can use just \newcount, unless of
@@ -366,6 +369,7 @@
\protected\def\aliasinteger #1#2{\untraced\protected\def#1{#2}}% name parent
\protected\def\aliasdimension#1#2{\untraced\protected\def#1{#2}}% name parent
+\protected\def\aliasposit #1#2{\untraced\protected\def#1{#2}}% name parent
%D So, effectively we start allocating from 256 and upwards. The inserts sit in the
%D range 128 upto 254. Page numbers use the counters 0 upto 9 and the pagebox is
@@ -386,6 +390,7 @@
\permanent\protected\def\newread {\syst_basics_allocate\c_syst_last_allocated_read \read \integerdef\c_syst_max_allocated_read}
\permanent\protected\def\newwrite {\syst_basics_allocate\c_syst_last_allocated_write \write \integerdef\c_syst_max_allocated_write}
\permanent\protected\def\newmarks {\syst_basics_allocate\c_syst_last_allocated_marks \marks \integerdef\c_syst_max_allocated_mark}
+\permanent\protected\def\newfloat {\syst_basics_allocate\c_syst_last_allocated_float \float \floatdef \c_syst_max_allocated_float}
\firstvalidlanguage \plusone % so zero is ignored in hyphenation, this might become the default
@@ -1308,7 +1313,7 @@
\endlocalcontrol
#2}
-\permanent\protected\def\suggestedalias#1#2%
+\permanent\protected\def\suggestedalias#1#2% old new
{\ifflags#2\permanent\permanent\fi % the rest is taken with the copy
\def#1{\syst_suggested_alias#1#2}}
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/syst-lua.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/syst-lua.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/syst-lua.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -58,6 +58,9 @@
local ctx_firstofoneargument = context.firstofoneargument
local ctx_gobbleoneargument = context.gobbleoneargument
+local values = tokens.values
+local boolean_code = values.boolean
+
implement { -- will be overloaded later
name = "writestatus",
arguments = "2 arguments",
@@ -309,6 +312,21 @@
do
+ interfaces.implement {
+ name = "iflua",
+ public = true,
+ usage = "condition",
+ arguments = "string",
+ actions = function(s)
+ local c = load("return(" .. s .. ")")
+ return boolean_code, (c and c()) and true or false
+ end,
+ }
+
+end
+
+do
+
-- This is some 20% slower than native but we only provide this for compatibility
-- reasons so we don't care that much about it. Eventually we can drop the built-in
-- method.
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-com.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-com.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-com.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -49,6 +49,7 @@
\permanent\protected\lettonothing\BH
\permanent\protected\lettonothing\BL
\permanent\protected\lettonothing\BR
+\permanent\protected\lettonothing\BT
\permanent\protected\lettonothing\CC
\permanent\protected\lettonothing\CL
\permanent\protected\lettonothing\CM
@@ -68,6 +69,8 @@
\permanent\protected\lettonothing\HL
\permanent\protected\lettonothing\HQ
\permanent\protected\lettonothing\HR
+\permanent\protected\lettonothing\HF
+\permanent\protected\lettonothing\HLHL
\permanent\protected\lettonothing\LB
\permanent\protected\lettonothing\LC
\permanent\protected\lettonothing\LT
@@ -94,9 +97,13 @@
\permanent\protected\lettonothing\SM
\permanent\protected\lettonothing\SR
\permanent\protected\lettonothing\TB
+\permanent\protected\lettonothing\TC
\permanent\protected\lettonothing\TL
+\permanent\protected\lettonothing\TM
\permanent\protected\lettonothing\TR
+\permanent\protected\lettonothing\TT
\permanent\protected\lettonothing\VL
+\permanent\protected\lettonothing\VLVL
\permanent\protected\lettonothing\VC
\permanent\protected\lettonothing\VD
\permanent\protected\lettonothing\VN
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-ntb.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-ntb.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-ntb.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -1634,13 +1634,22 @@
% enabled per 2018-02-22
-\def\tabl_ntb_table_get_max_width_step
- {\advanceby\scratchdimen\tabl_ntb_get_wid\fastloopindex
- \advanceby\scratchdimen\tabl_ntb_get_dis\fastloopindex}
+% \def\tabl_ntb_table_get_max_width_step
+% {\advanceby\scratchdimen\tabl_ntb_get_wid\fastloopindex
+% \advanceby\scratchdimen\tabl_ntb_get_dis\fastloopindex}
+%
+% \def\tabl_ntb_table_get_max_width
+% {\scratchdimen\zeropoint
+% \dofastloopcs\c_tabl_ntb_maximum_col\tabl_ntb_table_get_max_width_step
+% \ifdim\scratchdimen<\wd\scratchbox\relax
+% \scratchdimen\wd\scratchbox\relax
+% \fi}
\def\tabl_ntb_table_get_max_width
{\scratchdimen\zeropoint
- \dofastloopcs\c_tabl_ntb_maximum_col\tabl_ntb_table_get_max_width_step
+ \localcontrolledloop\zerocount\c_tabl_ntb_maximum_col\plusone
+ {\advanceby\scratchdimen\tabl_ntb_get_wid\currentloopiterator
+ \advanceby\scratchdimen\tabl_ntb_get_dis\currentloopiterator}%
\ifdim\scratchdimen<\wd\scratchbox\relax
\scratchdimen\wd\scratchbox\relax
\fi}
@@ -2377,7 +2386,7 @@
\tabl_ntb_section_disable}
\tolerant\permanent\protected\def\bTABLEsection[#1]%
- {\ifempty{#1}%
+ {\iftok{#1}\emptytoks
\global\c_tabl_ntb_section_repeat\zerocount
\else
\letdummyparameter\c!repeat\zerocount
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-tab.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-tab.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-tab.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -58,7 +58,7 @@
\tabl_table_restore_lineskips
\normalbaselines
% \enforced\let~\fixedspace
-` \enforced\letcharcode\tildeasciicode\fixedspace % why
+ \enforced\letcharcode\tildeasciicode\fixedspace % why
\inhibitblank % \blank[\v!disable]% % added
\the\everytableparbox}
@@ -504,7 +504,7 @@
% Key "M": Displaymath mode.
\newtableformatkey M%
- {\doreadtableformatkeys \{ b{\normalstartimath\displaystyle} a{\normalstopimath}}
+ {\doreadtableformatkeys \{ b{\normalstartimath\forcedisplaymath} a{\normalstopimath}}
% Key "\m": Template ${}#\hfil$
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-tbl.mkxl
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-tbl.mkxl 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-tbl.mkxl 2023-05-06 22:03:57 UTC (rev 67034)
@@ -589,7 +589,7 @@
\installtabulatepreambleoption{m}{\t_tabl_tabulate_bmath{\normalstartimath}%
\t_tabl_tabulate_emath{\normalstopimath}%
\tabl_tabulate_set_preamble}
-\installtabulatepreambleoption{M}{\t_tabl_tabulate_bmath{\normalstartimath\displaystyle}%
+\installtabulatepreambleoption{M}{\t_tabl_tabulate_bmath{\normalstartimath\forcedisplaymath}%
\t_tabl_tabulate_emath{\normalstopimath}%
\tabl_tabulate_set_preamble}
\installtabulatepreambleoption{h}{\tabl_tabulate_set_hook}
@@ -791,6 +791,7 @@
\defcsname\??tabulatewidth\v!auto\endcsname
{\c_tabl_tabulate_modus\plusthree\settrue\c_tabl_tabulate_reshape}
+\lettonothing\tabl_tabulate_hook_box
\lettonothing\tabl_tabulate_hook_box_begin
\lettonothing\tabl_tabulate_hook_box_end
@@ -1608,13 +1609,19 @@
\tabl_tabulate_vrule_reset_indeed
\fi}
+% \def\tabl_tabulate_vrule_reset_indeed
+% {\gletcsname\??tabulatevrule0\endcsname\undefined
+% \dofastloopcs\c_tabl_tabulate_max_vrulecolumn\tabl_tabulate_vrule_reset_step
+% \global\c_tabl_tabulate_max_vrulecolumn\zerocount}
+%
+% \def\tabl_tabulate_vrule_reset_step % undefined or relax
+% {\gletcsname\??tabulatevrule\the\fastloopindex\endcsname\undefined}
+
\def\tabl_tabulate_vrule_reset_indeed
- {\dofastloopcs\c_tabl_tabulate_max_vrulecolumn\tabl_tabulate_vrule_reset_step
+ {\localcontrolledloop\zerocount\c_tabl_tabulate_max_vrulecolumn\plusone % start at 0
+ {\gletcsname\??tabulatevrule\the\currentloopiterator\endcsname\undefined}%
\global\c_tabl_tabulate_max_vrulecolumn\zerocount}
-\def\tabl_tabulate_vrule_reset_step % undefined or relax
- {\gletcsname\??tabulatevrule\the\fastloopindex\endcsname\undefined}
-
\appendtoks
\tabl_tabulate_vrule_reset
\to \t_tabl_tabulate_every_after_row
@@ -1798,12 +1805,17 @@
\tabl_tabulate_color_reset_indeed
\fi}
+% \def\tabl_tabulate_color_reset_indeed
+% {\dofastloopcs\c_tabl_tabulate_max_colorcolumn\tabl_tabulate_color_reset_step}
+%
+% \def\tabl_tabulate_color_reset_step % undefined or empty?
+% {\gletcsname\??tabulatecolor\number\fastloopindex\endcsname\undefined}
+
\def\tabl_tabulate_color_reset_indeed
- {\dofastloopcs\c_tabl_tabulate_max_colorcolumn\tabl_tabulate_color_reset_step}
+ {\localcontrolledloop\zerocount\c_tabl_tabulate_max_colorcolumn\plusone % start at 1
+ {\gletcsname\??tabulatecolor\the\currentloopiterator\endcsname\undefined}%
+ \global\c_tabl_tabulate_max_colorcolumn\zerocount} % why not like vrule?
-\def\tabl_tabulate_color_reset_step % undefined or empty?
- {\gletcsname\??tabulatecolor\number\fastloopindex\endcsname\undefined}
-
\appendtoks
\tabl_tabulate_color_reset
\to \t_tabl_tabulate_every_after_row
@@ -2201,24 +2213,30 @@
% {\glettonothing\tabl_tabulate_flush_collected_indeed
% \global\c_tabl_tabulate_column\zerocount
% \tabl_tabulate_pbreak_check
+% \global\setfalse\c_tabl_tabulate_split_done % new 27/12/2022
% \dofastloopcs\c_tabl_tabulate_columns\tabl_tabulate_flush_second_step
+% \ifconditional\c_tabl_tabulate_split_done\else
+% \glet\tabl_tabulate_tm\s!reset % new 27/12/2022
+% \fi
% \global\settrue\c_tabl_tabulate_firstflushed}
-%
+
% \protected\def\tabl_tabulate_flush_second_step
-% {\ifvoid\b_tabl_tabulate_current\fastloopindex\else
+% {\ifvoid\b_tabl_tabulate_current\fastloopindex
+% \else
% \gdef\tabl_tabulate_flush_collected_indeed{\the\t_tabl_tabulate_dummy}%
+% \ifvoid\b_tabl_tabulate_current\fastloopindex \else
+% \global\settrue\c_tabl_tabulate_split_done % new 27/12/2022
+% \fi
% \fi}
-%
-% \def\tabl_tabulate_flush_second
-% {\noalign{\tabl_tabulate_flush_second_indeed}%
-% \tabl_tabulate_flush_collected_indeed}
+\newconditional\c_tabl_tabulate_split_done
+
\protected\def\tabl_tabulate_flush_second_indeed
{\glettonothing\tabl_tabulate_flush_collected_indeed
\global\c_tabl_tabulate_column\zerocount
\tabl_tabulate_pbreak_check
\global\setfalse\c_tabl_tabulate_split_done % new 27/12/2022
- \dofastloopcs\c_tabl_tabulate_columns\tabl_tabulate_flush_second_step
+ \localcontrolledloop\plusone\c_tabl_tabulate_columns\plusone{\tabl_tabulate_flush_second_step}%
\ifconditional\c_tabl_tabulate_split_done\else
\glet\tabl_tabulate_tm\s!reset % new 27/12/2022
\fi
@@ -2225,10 +2243,10 @@
\global\settrue\c_tabl_tabulate_firstflushed}
\protected\def\tabl_tabulate_flush_second_step
- {\ifvoid\b_tabl_tabulate_current\fastloopindex
+ {\ifvoid\b_tabl_tabulate_current\currentloopiterator
\else
\gdef\tabl_tabulate_flush_collected_indeed{\the\t_tabl_tabulate_dummy}%
- \ifvoid\b_tabl_tabulate_current\fastloopindex \else
+ \ifvoid\b_tabl_tabulate_current\currentloopiterator \else
\global\settrue\c_tabl_tabulate_split_done % new 27/12/2022
\fi
\fi}
@@ -3016,7 +3034,7 @@
\lettonothing\m_table_current_row_background
\lettonothing\m_table_current_row_background_default
\lettonothing\m_table_current_row_background_filler
-\lettonothing\m_table_current_row_background_defaultfiller
+\lettonothing\m_table_current_row_background_default_filler
\lettonothing\m_table_current_row_background_auto
\protected\def\tabl_register_row_background#1%
@@ -3262,7 +3280,7 @@
%\letcsname\??tabulatespana r\endcsname\relax
\noaligned\tolerant\def\tabl_tabulate_NS[#1]#*[#2]%
- {\NC\loopcs{#1}\tabl_tabulate_span
+ {\NC\loopcs{#1}\tabl_tabulate_span % use localloop and quit
\gdef\tabl_tabulate_kooh
{\begincsname\??tabulatespana#2\endcsname
\glet\tabl_tabulate_kooh\relax}%
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-xtb.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-xtb.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/tabl-xtb.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -87,7 +87,7 @@
local new_kern = nodepool.kern
local new_hlist = nodepool.hlist
-local lefttoright_code = nodes.dirvalues.lefttoright
+local lefttoright_code = tex.directioncodes.lefttoright
local v_stretch = variables.stretch
local v_normal = variables.normal
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/task-ini.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/task-ini.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/task-ini.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -176,12 +176,21 @@
appendaction("localboxes", "lists", "typesetters.localboxes.handler", nil, "nut", "enabled" )
+appendaction("hquality", "system", "builders.hpack.report", nil, "nonut", "enabled" )
+appendaction("hquality", "system", "builders.hpack.show", nil, "nut", "enabled" )
+appendaction("vquality", "system", "builders.vpack.report", nil, "nonut", "enabled" )
+------------("vquality", "system", "builders.vpack.show", nil, "nut", "enabled" )
+
-- some protection
-freezecallbacks("find_.*_file", "find file using resolver")
-freezecallbacks("read_.*_file", "read file at once")
-freezecallbacks("open_.*_file", "open file for reading")
+freezecallbacks("find_log_file", "provide the log file name")
+freezecallbacks("find_format_file", "locate the format file")
+freezecallbacks("open_data_file", "open the given file for reading")
+freezecallbacks("process_jobname", "manipulate jobname")
+freezecallbacks("trace_memory", "show memory usage details")
+freezecallbacks("hpack_filter", "hlist processing (not used, replaced)") -- no need to add more overhead
+
-- experimental (needs to be updated):
freezegroup("processors", "normalizers")
@@ -197,6 +206,9 @@
freezegroup("math", "normalizers")
freezegroup("math", "builders")
+freezegroup("hquality", "system")
+freezegroup("vquality", "system")
+
freezegroup("shipouts", "normalizers")
freezegroup("shipouts", "finishers")
freezegroup("shipouts", "wrapup")
@@ -204,8 +216,8 @@
freezegroup("mvlbuilders", "normalizers")
freezegroup("vboxbuilders", "normalizers")
------------("parbuilders", "lists")
------------("pagebuilders", "lists")
+-----------("parbuilders", "normalizers")
+freezegroup("pagebuilders", "normalizers")
freezegroup("math", "normalizers")
freezegroup("math", "builders")
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/toks-aux.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/toks-aux.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/toks-aux.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -197,6 +197,9 @@
tex.classoptioncodes = getthem(tex.getmathclassoptionvalues, "classoptioncode")
---.alignmentcontextcodes = getthem(tex.getalignmentcontextvalues ) -- only at lua end
tex.specialmathclasscodes = getthem(tex.getspecialmathclassvalues ) -- only at lua end
+tex.directioncodes = getthem(tex.getdirectionvalues ) -- only at lua end (todo tex)
+tex.fillcodes = getthem(tex.getfillvalues ) -- only at lua end (todo tex)
+tex.mathparametercodes = getthem(tex.getmathparametervalues ) -- only at lua end (todo tex)
function tex.stringtocodesbitmap(str,codes)
local bitmap = 0
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/toks-ini.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/toks-ini.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/toks-ini.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -48,6 +48,7 @@
local scanchar = token.scanchar
local scancsname = token.scancsname
local scannextchar = token.scannextchar
+local scanposit = token.scanposit
local scanreal = token.scanreal
local scanfloat = token.scanfloat
local scanluanumber = token.scanluanumber
@@ -160,6 +161,7 @@
gluespec = scanskip,
integer = scaninteger,
cardinal = scancardinal,
+ posit = scanposit,
real = scanreal,
float = scanfloat,
luanumber = scanluanumber,
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/toks-scn.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/toks-scn.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/toks-scn.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -29,6 +29,7 @@
local scaninteger = scanners.integer
local scancardinal = scanners.cardinal
local scannumber = scanners.number
+local scanfloat = scanners.float
local scankeyword = scanners.keyword
local scankeywordcs = scanners.keywordcs
local scanword = scanners.word
@@ -226,6 +227,7 @@
scaninteger = scaninteger,
scancardinal = scancardinal,
scannumber = scannumber,
+ scanfloat = scanfloat,
scantable = scantable, -- not directly useable
scankeyword = scankeyword,
scankeywordcs = scankeywordcs,
@@ -262,6 +264,7 @@
toboolean = toboolean,
inspect = inspect,
report = report_scan,
+ posit = posit,
}
tokens.shortcuts = shortcuts
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/trac-deb.lmt
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkxl/trac-deb.lmt 2023-05-06 19:56:02 UTC (rev 67033)
+++ trunk/Master/texmf-dist/tex/context/base/mkxl/trac-deb.lmt 2023-05-06 22:03:57 UTC (rev 67034)
@@ -289,15 +289,15 @@
directives.register("system.errorcontext", function(v)
local register = callback.register
if v then
- register('show_error_message', nop)
- register('show_warning_message', function() processwarning(v) end)
- register('intercept_lua_error', function() processerror(v) end)
- register('intercept_tex_error', function(mode,eof) processerror(v,eof) return mode end)
+ register("show_error_message", nop)
+ register("show_warning_message", function() processwarning(v) end)
+ register("intercept_lua_error", function() processerror(v) end)
+ register("intercept_tex_error", function(mode,eof) processerror(v,eof) return mode end)
else
- register('show_error_message', nil)
- register('show_warning_message', nil)
- register('intercept_lua_error', nil)
- register('intercept_tex_error', nil)
+ register("show_error_message", nil)
+ register("show_warning_message", nil)
+ register("intercept_lua_error", nil)
+ register("intercept_tex_error", nil)
end
end)
Modified: trunk/Master/texmf-dist/tex/context/base/mkxl/trac-inf.lmt
===================================================================
@@ Diff output truncated at 1234567 characters. @@
More information about the tex-live-commits
mailing list.